query
stringlengths
7
5.25k
document
stringlengths
15
1.06M
metadata
dict
negatives
sequencelengths
3
101
negative_scores
sequencelengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
/ Load configuration data
private function _load($session) { if (isset($session['configuration']) && is_array($session['configuration'])) { $this->_configuration = $session['configuration']; } else { $this->_configuration = include 'config.php'; $this->_check(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function loadConfig($data);", "abstract protected function loadConfig();", "function load_config() {\n\t\t$conf_file = @file_get_contents( LDAP_LOGIN_PATH.'data.dat' );\n\t\tif ($conf_file!==false)\n\t\t{\n\t\t\t$this->config = unserialize($conf_file);\n\t\t}\n\t}", "public static function load()\n {\n $entries = Configuration::get();\n \n foreach ($entries as $entry) {\n self::$config[$entry->id] = unserialize($entry->value);\n }\n }", "function loadConfig(){\n $file = file_get_contents($this->config_dir, FILE_USE_INCLUDE_PATH);\n $urls = json_decode($file,TRUE);\n //not the best way but error handling\n if ($file == NULL || $urls == NUll ){\n print(\"Error reading the config file or it it is empty\");\n }\n else{\n $this->config_data = $urls;\n\n }\n }", "public function load()\n\t{\n\t\tif (file_exists(self::$configPath))\n\t\t{\n\t\t\t$this->config = json_decode(file_get_contents(self::$configPath), true);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->config = array();\n\t\t}\n\t}", "static function loadConfig() {\n\t\t$config = self::file($_SERVER[\"DOCUMENT_ROOT\"] . \"/../config.json\");\n\t\tif (!is_null($config))\n\t\t\tself::$config = json_decode($config);\n\t}", "public function loadConfig()\n {\n $this->setGlobalStoreOfShopNumber($this->getShopNumber());\n $this->loadArray($this->toArray());\n $this->setExportTmpAndLogSettings();\n }", "private function LoadConfigFile(){\n $a = file_get_contents($this->RootDIR . 'config/main.json');\n $this->Config = json_decode($a, true);\n }", "protected function loadConfig() {\n $json = new JSON();\n $viewConfig = $json->readFile(__SITE_PATH . \"\\\\config\\\\view.json\");\n $this->meta_info = $viewConfig['meta'];\n $this->js_files = $viewConfig['javascript'];\n $this->css_files = $viewConfig['css'];\n }", "public abstract function loadConfig($fileName);", "private function loadConfig()\n {\n $this->category->config = [];\n $this->loadMeta('admins', 'array');\n $this->loadMeta('members', 'array');\n $this->loadMeta('template');\n $this->loadMeta('category', 'array');\n //$this->loadMetaCategory();\n $this->loadInitScript();\n }", "private function loadConfig()\n {\n\n $this->config = include(__DIR__ . '/../../config/config.php');\n\n }", "private static function loadConfigurationFile()\n {\n if(self::$ConfigurationData == null)\n {\n $file_contents = file_get_contents(CONFIGURATION_FILE);\n $json_data = json_decode($file_contents, true);\n\n if(empty($json_data))\n {\n throw new Exception(\"Invalid JSON data in the configuration file\");\n }\n\n self::$ConfigurationData = $json_data;\n }\n }", "public function load_config() {\n if (!isset($this->config)) {\n $name = $this->get_name();\n $this->config = get_config(\"local_$name\");\n }\n }", "private function load_config() {\n $this->config = new Config();\n }", "public function load()\n {\n $ini = APP_DIR.'config/'.ENVIRONMENT.'.ini';\n\n if(!file_exists($ini))\n Clockwork::throwError('Could not load config ('.$ini.')');\n\n $this->data = parse_ini_file($ini, true);\n \n $this->setValues();\n }", "abstract public function loadConfig(array $config);", "public function loadConfigs()\n {\n self::$country_configs = self::getCountryConfigs();\n $configs = new parent();\n self::$categories = $configs->getCategories();\n self::$site_data = self::get_site_data();\n self::$payments_name = self::setPaymentGateway();\n }", "private static function loadAppConfig() {\n\t\t\t$appConfJson = file_get_contents(JIAOYU_PROJECT_HOME.\"/app/conf/config.json\");\n\t\t\ttry {\n\t\t\t\t$appConf = JsonUtils::decode($appConfJson);\n\t\t\t} catch (JsonException $e) {\n\t\t\t\tthrow new ConfigurationException(\"Error initializing app config: \".$e->getMessage());\n\t\t\t}\n\n\t\t\t// OK - now we can load up the config array from the file\n\t\t\tforeach ($appConf as $configKey => $configValue) {\n\t\t\t\tself::$config[$configKey] = $configValue;\n\t\t\t}\n\t\t}", "public function readConfigurationValues();", "function loadFromDatabase(){\n global $DB;\n $resource = $DB->config->get();\n $list = array();\n while($row = $DB->fetchAssoc($resource))\n {\n if(!isset($this->sections[$row['section']])) $this->sections[$row['section']] = new ConfigSection($row['section']);\n $this->sections[$row['section']]->registerFromDatabase($row);\n }\n }", "abstract protected function loadConfig(array $config);", "private static function getConfig() {\n\n\t\t$pathRoot = $_SERVER['DOCUMENT_ROOT'].substr($_SERVER['PHP_SELF'],0, strpos($_SERVER['PHP_SELF'],\"/\",1)).\"/config/\";\n\n\t\t$jsonConfig = file_get_contents($pathRoot.'config.json');\n\t\tself::$arrayConfig = json_decode($jsonConfig);\n\t}", "function load_config()\n\t{\n\t\t$sql = \"SELECT * FROM config\";\n\n\t\t$dbdata = $this->conn->prepare($sql);\n\t\t$dbdata->execute();\n\n\t\tforeach ($dbdata->fetchAll(PDO::FETCH_OBJ) as $conf) {\n\t\t\tif ($conf->value == 'true') {\n\t\t\t\t$conf->value = true;\n\t\t\t} elseif ($conf->value == 'false') {\n\t\t\t\t$conf->value = false;\n\t\t\t}\n\n\t\t\t$this->config->set($conf->param, $conf->value);\n\t\t}\n\t}", "public function readConfig() {\n if ( file_exists( $this->path . '/config/config.php' ) ) {\n require_once $this->path . '/config/config.php';\n }\n }", "protected function setUpConfigurationData() {}", "private function read_config() {\n\t\t$sections = parse_ini_file($this->config['conf'], true);\n\t\tforeach ($sections as $sectionk => $sectionv) {\n\t\t\tforeach ($sectionv as $key => $var)\n\t\t\t\t$this->config[$sectionk . '.' . $key] = $var;\n\t\t}\n\t}", "protected function load_config() {\n $this->config = Kohana::$config->load('imagecache');\n $this->config_patterns = Kohana::$config->load('imagecache_patterns');\n }", "abstract protected function loadConfiguration($name);", "private function loadConfig(){\n $DB = DB::pass();\n $conf = $DB->loadConfig();\n if ( count($conf) > 0 ){\n foreach($conf as $c){\n $this->config->set($c['cluster'] . \".\" . $c['name'],$c['value']);\n }\n } else {\n throw new SystemException(\"No database configuration\");\n }\n }", "public function initConfig() {\r\n\t$config = array();\r\n\tinclude($this->name . '/config.php');\r\n\t\\app::$config = array_merge(\\app::$config, $config);\r\n }", "private function loadConfig() {\n if (file_exists($this->_data['cache_config_file'])) {\n $data = unserialize(file_get_contents($this->_data['cache_config_file']));\n \n self::$_configInstance = (object)$data; //instance of stdClass with all the properties public\n //$this->_data = (array)$data; \n return true;\n } \n return false;\n }", "public static function load()\n {\n $files = glob(BASEDIR . '/config/*.php');\n foreach ($files as $file){\n $key = str_replace('.php', '', basename($file));\n static::$values[$key] = include $file;\n }\n }", "abstract protected function loadSettings();", "function configurationLoad() {\n\t\tglobal $podserver_config_map;\n\t\t$item_idx = 0;\n\t\tunset($this->itemsConfiguration);\n\t\t$this->itemsConfiguration = array();\n\t\t// load the configuration details for each item in the map\n\t\tforeach ($podserver_config_map as $itemToConfigure){\n\t\t\t// get the configuration variable by indirection ($$)\n\t\t\tglobal $$itemToConfigure[0];\n\t\t\t// get the label for the item in the correct language by indirection ($$)\n\t\t\t$label_item_variable = 'label_'.$itemToConfigure[0];\n\t\t\tglobal $$label_item_variable;\n\t\t\tif ($$label_item_variable == '') $$label_item_variable = '$'.$label_item_variable;\n\t\t\tif (isset($_SESSION['lang']) && $_SESSION['lang'] == 'debug') $$label_item_variable = '$'.$label_item_variable;\n\t\t\t// get the help for the item in the correct language by indirection ($$)\n\t\t\t$help_item_variable = 'help_'.$itemToConfigure[0];\n\t\t\tglobal $$help_item_variable;\n\t\t\tif (isset($_SESSION['lang']) && $_SESSION['lang'] == 'debug') $$help_item_variable = '$'.$help_item_variable;\n\t\t\t// get the title for the item in the correct language by indirection ($$)\n\t\t\t$title_item_variable = 'title_'.$itemToConfigure[0];\n\t\t\tglobal $$title_item_variable;\n\t\t\t// show title variable name for language debug\n\t\t\tif (isset($_SESSION['lang']) && $_SESSION['lang'] == 'debug') $$title_item_variable = '$'.$title_item_variable;\n\t\t\t// get the default value from configuration map if no value found for the item in the configuration file\n\t\t\tif ($$itemToConfigure[0] == '') $$itemToConfigure[0] = $itemToConfigure[4];\n\t\t\t// load the item with all datas (map, value, title and label)\n\t\t\t$this->itemsConfiguration[] = new ItemConfiguration(\n\t\t\t\t\t\t\t$itemToConfigure[0],\n\t\t\t\t\t\t\t$itemToConfigure[1],\n\t\t\t\t\t\t\t$itemToConfigure[2],\n\t\t\t\t\t\t\t$itemToConfigure[3],\n\t\t\t\t\t\t\t$$itemToConfigure[0],\n\t\t\t\t\t\t\t$itemToConfigure[5],\n\t\t\t\t\t\t\t$$label_item_variable,\n\t\t\t\t\t\t\t$$title_item_variable,\n\t\t\t\t\t\t\t$$help_item_variable\n\t\t\t\t\t\t\t);\t\t\t\n\t\t}\n\t}", "protected function _load_config()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n try {\n $config_file = new Configuration_File(self::FILE_CONFIG);\n $rawdata = $config_file->load();\n } catch (File_Not_Found_Exception $e) {\n // Not fatal, set defaults below\n } catch (Engine_Exception $e) {\n throw new Engine_Exception($e->get_message(), CLEAROS_WARNING);\n }\n\n if (isset($rawdata['allow_shell']) && preg_match(\"/(true|1)/i\", $rawdata['allow_shell']))\n $this->config['allow_shell'] = TRUE;\n else\n $this->config['allow_shell'] = FALSE;\n\n if (isset($rawdata['theme_mode']) && !empty($rawdata['theme_mode']))\n $this->config['theme_mode'] = $rawdata['theme_mode'];\n else\n $this->config['theme_mode'] = 'normal';\n\n if (isset($rawdata['theme']) && !empty($rawdata['theme']))\n $this->config['theme'] = $rawdata['theme'];\n else\n $this->config['theme'] = 'default';\n\n $this->is_loaded = TRUE;\n }", "private function loadConfig() {\n $config = array();\n\n $this->config = $config;\n if (file_exists(__DIR__ . '/../config.php')) {\n require_once(__DIR__. '/../config.php');\n $this->config = array_merge($this->config, $config);\n //TODO check for required config entries\n } else {\n //TODO handle this nicer\n $this->fatalErr('NO_CFG', 'Unable to load config file');\n }\n\n if (array_key_exists('THEME', $this->config)) {\n $this->pageLoader->setTheme($this->config['THEME']);\n }\n }", "private function loadConfiguration()\n {\n /** @var ConfigurationManager $configurationManager */\n $configurationManager = ConfigurationManager::getInstance();\n $this->configuration = $configurationManager->getMainConfiguration();\n }", "private function setUpConfig() {\n\n //Get the file where the configs are and process the arrays\n require($this->_data['pathtodata']);\n\n $this->_data = array_merge($this->_data,$acs_confdata);\n\n if (empty($this->_data['indexfile']))\n $this->_data['indexfile'] = 'index';\n\n if (empty($this->_data['common_extension']))\n $this->_data['common_extension'] = COMMON_EXTENSION;\n \n $this->setUriData($this->_data); \n \n //Create the cache file of the config\n if (isset($this->_data['cache_config']) && $this->_data['cache_config'])\n $this->saveConfig();\n else\n if (file_exists($this->_data['cache_config_file']))\n unlink($this->_data['cache_config_file']); \n }", "private function loadConfiguration()\n {\n if (!Configuration::configurationIsLoaded()) {\n Configuration::loadConfiguration();\n }\n }", "function config_load() {\n\t\t$config_camera = '/^\\s*([^:]+)\\s*:\\s*([0-9a-f]{2})[:-]?([0-9a-f]{2})[:-]?([0-9a-f]{2})[:-]?([0-9a-f]{2})[:-]?([0-9a-f]{2})[:-]?([0-9a-f]{2})\\s+(\\d+)\\s*x\\s*(\\d+)\\s*$/iu';\n\t\t$config_gate = '/^\\s*(.+)\\s*\\((\\d+)\\s*,\\s*(\\d+)\\)\\s*\\((\\d+),(\\d+)\\)\\s*$/u';\n\n\t\t$data = file(CONFIG_PATH);\n\t\tif ($data === NULL) {\n\t\t\treturn array();\n\t\t}\n\n\t\t$config = array();\n\n\t\t$status = 0;\n\t\tfor ($n=0; $n<sizeof($data); $n++) {\n\t\t\t$str = $data[$n];\n\t\t\n\t\t\tif (preg_match($config_camera, $str, $matches)) {\n\t\t\t\t$name = trim($matches[1]);\n\t\t\t\t$hw_id = $matches[2].$matches[3].$matches[4].$matches[5].$matches[6].$matches[7];\n\t\t\t\t$width = $matches[8];\n\t\t\t\t$height= $matches[9];\n\n\t\t\t\t$gates = array();\n\t\t\t\tarray_push($config, \n\t\t\t\t\t\t array(\"hw\" => $hw_id, \n\t\t\t\t\t\t \"name\" => $name, \n\t\t\t\t\t\t\t\t \"gates\" => &$gates,\n\t\t\t\t\t\t\t\t \"width\" => $width,\n\t\t\t\t\t\t\t\t \"height\"=> $height));\n\t\t\t\t$status = 1;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ($status == 1 && preg_match($config_gate, $str, $matches)) {\n\t\t\t\tarray_push($gates, array(\"name\"=>trim($matches[1]),\n\t\t\t\t\t\t\t\t\t\t \"x1\" =>$matches[2],\n\t\t\t\t\t\t\t\t\t\t \"y1\" =>$matches[3],\n\t\t\t\t\t\t\t\t\t\t \"x2\" =>$matches[4],\n\t\t\t\t\t\t\t\t\t\t \"y2\" =>$matches[5]));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\treturn $config;\n\t}", "protected function loadSettings() {}", "protected function loadSettings() {}", "public function readConfigFile(): void\n {\n $configPath = __DIR__ . '/../../.config';\n if (!file_exists($configPath)) {\n echo \"Could not find .config\\n\";\n die;\n }\n $lines = preg_split('/[\\r\\n]+/', file_get_contents($configPath));\n foreach ($lines as $line) {\n if (empty($line)) {\n continue;\n }\n if (substr($line, 0, 1) == '#') {\n continue;\n }\n $kv = preg_split(\"/=/\", $line);\n $key = $kv[0];\n $value = $kv[1];\n $this->data[$key] = $value;\n }\n }", "protected function loadSettings() {}", "public function load_config() {\n if (!isset($this->config)) {\n $settingspluginname = 'assessmentsettings';\n $this->config = get_config(\"local_$settingspluginname\");\n }\n }", "protected function _load_config()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n try {\n $config_file = new Configuration_File(self::APP_CONFIG);\n $this->config = $config_file->load();\n } catch (File_Not_Found_Exception $e) {\n // Not fatal\n }\n\n $this->is_loaded = TRUE;\n }", "public function load(): ConfigStoreInterface;", "public static function load_db_conf(){\n $db_config = include(CONFIGPATH.'db.conf.php');\n return $db_config;\n }", "private function loadConfig()\n {\n $files = scandir($this->configPath());\n $configs = [];\n\n foreach ($files as $file) {\n $filePath = $this->configPath() . DIRECTORY_SEPARATOR . $file;\n\n if (is_file($filePath)) {\n $config = [basename($file, '.php') => include $filePath];\n if (is_array($config)) {\n $configs = array_merge($configs, $config);\n }\n }\n }\n\n $this->config = $configs;\n }", "public function loadConfiguration()\n {\n // Get bundles paths\n $bundles = $this->kernel->getBundles();\n $paths = array();\n $pathInBundles = 'Resources' . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'nekland_admin.yml';\n\n foreach ($bundles as $bundle) {\n $paths[] = $bundle->getPath() . DIRECTORY_SEPARATOR . $pathInBundles;\n }\n $this->configuration->setPaths($paths);\n $this->configuration->loadConfigFiles();\n }", "protected static function loadConfiguration()\n {\n if (null === self::$configuration) {\n self::$configuration = Register::getRegister();\n }\n }", "protected function loadConfig() : \\codename\\core\\config {\r\n return new \\codename\\core\\config\\json('config/model/' . $this->schema . '_' . $this->table . '.json', true, true);\r\n }", "public static function load()\n {\n if(!self::$loaded)\n {\n $GLOBALS['_EZMVC_SYS_CONFIG'] = require __DIR__ . '/system.config.php'; //Load config file\n $GLOBALS['_EZMVC_SYS_CONFIG'] = is_array($GLOBALS['_EZMVC_SYS_CONFIG']) ? $GLOBALS['_EZMVC_SYS_CONFIG'] : []; //Make sure its an array\n\n $GLOBALS['_EZMVC_APP_CONFIG'] = require dirname(__DIR__) . '/app/config/app.config.php';\n $GLOBALS['_EZMVC_APP_CONFIG'] = is_array($GLOBALS['_EZMVC_APP_CONFIG']) ? $GLOBALS['_EZMVC_APP_CONFIG'] : [];\n }\n }", "private function loadConfig() {\n\n //get pachage and configuration\n $pkg = Package::getByHandle(\"c5authy\");\n Loader::library('authy', $pkg);\n\n $co = new Config();\n $co->setPackageObject($pkg);\n\n $production = ( $co->get('authy_server_production') == \"1\" ? true : false );\n\n //set the values\n $this->api_key = $co->get('authy_api_key');\n $this->server = $production ? self::LIVE_SERVER : self::SANDBOX_SERVER;\n $this->auth_type = $co->get('authy_type');\n $this->sms_token = $co->get('authy_sms_tokens');\n }", "private function initConfig() {\n\t\t$configLoader = new ConfigLoader($this->_env);\n\n /** set config to Di container */\n $this->_di->set('config', $configLoader, TRUE);\n $this->_config = $configLoader;\n\t}", "private function load()\n {\n if (!file_exists($this->file)) {\n throw new Exception('config file not found');\n }\n // read contents of wordpress config\n // we can not require the configuration because it requires a shit load of other files\n $this->config = file_get_contents($this->file);\n }", "public function initConfigData($host){}", "public function populateLocalConfiguration() {}", "public function loadConfig()\n {\n return parse_ini_file(\n DIR_ROOT . '/config.ini', False\n );\n }", "public function loadSettings()\n {\n $this->loadJSON($this->settings);\n }", "public static function load()\n {\n $configFile = self::getConfigFilePath();\n\n if (!is_file($configFile)) {\n self::save([]);\n }\n\n $config = require($configFile);\n\n if (!is_array($config))\n return array();\n\n return $config;\n }", "private function readConfig(){\n\n\t\t$this->_ini_array = parse_ini_file(CONFIG.'system.ini');\n\n\t\t$this->_host =\t$this->_ini_array['db_host'];\n\t\t$this->_username = $this->_ini_array['db_username'];\n\t\t$this->_password = $this->_ini_array['db_password'];\n\t\t$this->_database = $this->_ini_array['db_database'];\n\t\n\t\t$this->_log_enabled=$this->_ini_array['log_enabled'];\n\t\t$this->_log_level=$this->_ini_array['log_level'];\n\t\t$this->_log_file_path=$this->_ini_array['log_path'];\n\t\n\n\t\t$this->_lang_default=$this->_ini_array['lang_default'];\n\n\t}", "public function loadConfig() {\n return (object)$this->config;\n }", "function __loadConfig() {\n\t\t$area = $this->__determineArea();\n\t\tConfigure::write('Area', $area);\n\t\t$user = $this->User->findById($this->Session->read('Auth.User.id'));\n\t\tConfigure::write('User', $user['User']);\n\t}", "abstract public function loadData();", "public function loadConfig(){\n\t\t\n\t\t$opt[] = [\n\t\t\t'method' => 'setFormParams',\n\t\t\t'value'=>$this->paramsLoad(3, \\sevian\\s::getReq('command_idx'), \\sevian\\s::getReq('unit_idx'))\n\t\t\t\n\t\t];\n\t\t$this->info = $opt;//$form->getInfo();\n\t}", "public function loadConfiguration()\n {\n \\Env::init();\n\n if (file_exists(SRC_ROOT . '/.env')) {\n $dotenv = new Dotenv(SRC_ROOT);\n $dotenv->load();\n $dotenv->required([\n 'DB_NAME',\n 'DB_USER',\n 'DB_PASSWORD',\n 'DB_HOST'\n ]);\n }\n\n define('APP_ENV', env('APP_ENV') ?: self::ENV_LIVE);\n\n if (!in_array(APP_ENV, $this->getAllowedEnvironments(), true)) {\n die('Invalid environment');\n }\n\n $configFileName = SRC_ROOT . '/config/env/' . APP_ENV . '.php';\n\n if (file_exists($configFileName)) {\n require $configFileName;\n }\n }", "function __construct() {\n if (!file_exists($this->configuration_file_path)) {\n \n die(\"FATAL: Missing \" . $this->configuration_file_path . `pwd` );\n \n }\n \n $raw_contents = file_get_contents($this->configuration_file_path);\n\n\n //parse json object\n try {\n\n $this->Config = json_decode( $raw_contents );\n\n } catch (Exception $e) {\n\n die(\"FATAL: Bad configuration file? \");\n\n }\n \n\n }", "public function testConfigFromSingleFile()\n {\n $cfg = new Configuration();\n $cfg->setBaseDirectories($this->dirs);\n $config = $cfg->load(\"view\");\n\n $this->assertInternalType(\"array\", $config);\n $this->assertArrayHasKey(\"file\", $config);\n $this->assertArrayHasKey(\"config\", $config);\n $this->assertArrayNotHasKey(\"items\", $config);\n $this->assertContains(\"a view\", $config[\"config\"]);\n }", "function LoadConfiguration()\r\n\t{\r\n\t\t$cinfFilePath = Site::GetConfigFilePath ();\r\n\t\t$config = simplexml_load_file ( $cinfFilePath );\r\n\t\t\r\n\t\t// load languages\r\n\t\tif (isset ( $config->languages ))\r\n\t\t{\r\n\t\t\t$langs = ( array ) $config->languages;\r\n\t\t\t$langsA = $langs ['language'];\r\n\t\t\t\r\n\t\t\tif (! is_array ( $langsA ))\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\t$linkID = ( string ) $langsA->linkID;\r\n\t\t\t\t$linkName = ( string ) $langsA->linkName;\r\n\t\t\t\t$this->m_languages [$linkID] = $linkName;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tforeach ( $langsA as $lang )\r\n\t\t\t\t{\r\n\t\t\t\t\t$linkID = ( string ) $lang->linkID;\r\n\t\t\t\t\t$linkName = ( string ) $lang->linkName;\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->m_languages [$linkID] = $linkName;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$langKes = array_keys ( $this->m_languages );\r\n\t\t\t$this->m_languageDefault = $langKes [0];\r\n\t\t}\r\n\t\t\r\n\t\t// load templates\r\n\t\tif (isset ( $config->templates ))\r\n\t\t{\r\n\t\t\t$templates = ( array ) $config->templates;\r\n\t\t\t$langsA = $templates ['template'];\r\n\t\t\t\r\n\t\t\tif (! is_array ( $langsA ))\r\n\t\t\t{\r\n\t\t\t\t$this->m_templates = null;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->m_templates = array ();\r\n\t\t\t\t\r\n\t\t\t\tforeach ( $langsA as $lang )\r\n\t\t\t\t{\r\n\t\t\t\t\t$fileName = ( string ) $lang;\r\n\t\t\t\t\tarray_push ( $this->m_templates, $fileName );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// load siteURL\r\n\t\tif (isset ( $config->url ))\r\n\t\t{\r\n\t\t\t$this->m_URL = ( string ) $config->url;\r\n\t\t\t$this->m_URL = trim ( $this->m_URL );\r\n\t\t}\r\n\t\t\r\n\t\t// load siteURL\r\n\t\tif (isset ( $config->maxImageWidth ))\r\n\t\t{\r\n\t\t\t$this->m_maxImageWidth = ( int ) $config->maxImageWidth;\r\n\t\t}\r\n\t\t\r\n\t\t// secuirity-file root\r\n\t\tif (isset ( $config->securFolder ))\r\n\t\t{\r\n\t\t\t$this->m_sfRoot = ( string ) $config->securFolder;\r\n\t\t\t$this->m_sfRoot = trim ( $this->m_sfRoot );\r\n\t\t}\r\n\t\t\r\n\t\t// boxes\r\n\t\tif (isset ( $config->boxes ))\r\n\t\t{\r\n\t\t\t$boxes = ( array ) $config->boxes;\r\n\t\t\t$boxes = $boxes ['box'];\r\n\t\t\tif (! is_array ( $boxes ))\r\n\t\t\t{\r\n\t\t\t\t$this->m_boxes = array ($boxes );\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->m_boxes = $boxes;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// product image root\r\n\t\tif (isset ( $config->productImageRoot ))\r\n\t\t{\r\n\t\t\t$str = ( string ) $config->productImageRoot;\r\n\t\t\t$this->m_prodImagRoot = trim ( $str );\r\n\t\t}\r\n\t\t\r\n\t\t// product image root\r\n\t\tif (isset ( $config->galleryRoot ))\r\n\t\t{\r\n\t\t\t$str = ( string ) $config->galleryRoot;\r\n\t\t\t$this->m_galleryImageRoot = trim ( $str );\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "private function loadArray(){\n if(file_exists($this->fullPath.$this->arrayFile)){\n include_once($this->fullPath.$this->arrayFile);\n if(!empty($arCfg)){\n $this->loadConfigs($arCfg);\n }\n }\n }", "private function load_options()\n\t\t{\n\t\t\t$options = NULL;\n\n\t\t\t// load from persistent store\n\t\t\tif ( NULL !== $this->option_name ) {\n\t\t\t\t// reading from database\n\t\t\t\t$options = get_option( $this->option_name, $this->defaults );\n\t\t\t} else if ( NULL !== $this->filename ) {\n\t\t\t\t// reading from filesystem\n\t\t\t\tif ( file_exists( $this->filename ) ) {\n\t\t\t\t\t$data = file_get_contents( $this->filename );\n\t\t\t\t\t$options = json_decode( $data, TRUE );\n\t\t\t\t}\n\t\t\t}\n\t\t\t// TODO: add capability to store in DS specific table\n\n\t\t\t// this ensures we have *something*, even if it's an empty array\n\t\t\tif ( NULL === $options )\n\t\t\t\t$options = $this->defaults;\n\n\t\t\t$this->_options = array_merge( $this->defaults, $options );\n\t\t}", "function load_configs($file, $is_global = true)\n{\n\n if (substr($file, -5) != '.json') {\n throw new Exception('Invalid config file found in configs folder.');\n }\n\n $fname = strtolower(substr(basename($file), 0, - (strlen('.json'))));\n\n $GLOBALS[\"__CONFIG__{$fname}__\"] = json_decode(file_get_contents($file), true);\n}", "private function loadJson(){\n if(file_exists($this->fullPath.$this->jsonFile)) {\n $arCfg = get_object_vars(json_decode(file_get_contents($this->fullPath.$this->jsonFile)));\n $this->loadConfigs($arCfg);\n }\n }", "private static function readConfig()\n {\n $handler = self::getHandler();\n if (null == $handler->arrConfigGlobal && null == $handler->arrConfigLocal && null == $handler->arrConfigSecure) {\n include dirname(__FILE__) . '/../../config/default.php';\n\n $handler->arrConfigLocal = $APPCONFIG;\n\n $db = Base_Database::getConnection();\n try {\n // This is just for things like API keys, password salts etc.\n // If we have, at a later point, a function to export the database\n // en masse, then we can encrypt all the output from the secureconfig\n // table. It shouldn't overide the global or local config settings\n $sql = \"SELECT * FROM secureconfig\";\n $query = $db->prepare($sql);\n $query->execute();\n $handler->arrConfigSecure = $query->fetchAll(PDO::FETCH_COLUMN|PDO::FETCH_GROUP);\n\n // This is just the regular global configuration settings.\n $sql = \"SELECT * FROM config\";\n $query = $db->prepare($sql);\n $query->execute();\n $handler->arrConfigGlobal = $query->fetchAll(PDO::FETCH_COLUMN|PDO::FETCH_GROUP);\n foreach ($handler->arrConfigGlobal as $key => $value) {\n $handler->arrConfig[$key] = array('isLocal' => false, 'isOverriden' => false, 'value' => $value[0]);\n }\n \n // This is the configuration settings local to this individual machine.\n foreach ($handler->arrConfigLocal as $key => $value) {\n if (isset($handler->arrConfig[$key])) {\n $handler->arrConfig[$key] = array('isLocal' => true, 'isOverriden' => true, 'value' => $value);\n } else {\n $handler->arrConfig[$key] = array('isLocal' => true, 'isOverriden' => false, 'value' => $value);\n }\n }\n } catch(Exception $e) {\n error_log($e);\n die();\n }\n }\n }", "private function load_settings() {\n\t\t\n\t}", "protected function _initConfig() {\n $path = APPLICATION_PATH.'/configs/application.ini';\n \n //Get the configuration data\n $config = new Zend_Config_Ini($path);\n \n //Filter by data by environement value (production, staging, testing, development)\n $config = $config->get(APPLICATION_ENV);\n \n //Store data in the registry to access it everywhere\n Zend_Registry::set('config', $config);\n }", "public function initialize()\n {\n if (!$this->checked) {\n $this->config->checkConfig();\n $this->checked = true;\n $this->data = $this->config->get($this->path, $this->default);\n }\n }", "protected function initConfig()\n {\n $this->di->setShared('config', function () {\n $path = BASE_DIR . 'app/config/';\n\n if (!is_readable($path . 'config.php')) {\n throw new RuntimeException(\n 'Unable to read config from ' . $path . 'config.php'\n );\n }\n\n $config = include $path . 'config.php';\n\n if (is_array($config)) {\n $config = new Config($config);\n }\n\n if (!$config instanceof Config) {\n $type = gettype($config);\n if ($type == 'boolean') {\n $type .= ($type ? ' (true)' : ' (false)');\n } elseif (is_object($type)) {\n $type = get_class($type);\n }\n\n throw new RuntimeException(\n sprintf(\n 'Unable to read config file. Config must be either an array or Phalcon\\Config instance. Got %s',\n $type\n )\n );\n }\n\n if (is_readable($path . APPLICATION_ENV . '.php')) {\n $override = include_once $path . APPLICATION_ENV . '.php';\n\n if (is_array($override)) {\n $override = new Config($override);\n }\n\n if ($override instanceof Config) {\n $config->merge($override);\n }\n }\n\n return $config;\n });\n }", "public function getConfigFromData(array $data = array());", "public function loadConfiguration()\n\t{\n\t\t// Set the configuration file path for the application.\n\t\t$file = JPATH_CONFIGURATION . '/configuration.php';\n\n\t\t// Verify the configuration exists and is readable.\n\t\tif (!is_readable($file))\n\t\t{\n\t\t\tthrow new \\RuntimeException('Configuration file does not exist or is unreadable.');\n\t\t}\n\n\t\t// Load the configuration file into an object.\n\t\trequire $file ;\n\t\t$config = new JConfig;\n\n\t\tif ($config === null)\n\t\t{\n\t\t\tthrow new \\RuntimeException(sprintf('Unable to parse the configuration file %s.', $file));\n\t\t}\n\n\t\t// Get the FB config file path\n\t\t$file = JPATH_BASE . '/config_fb.json';\n\n\t\t// Verify the configuration exists and is readable.\n\t\tif (!is_readable($file))\n\t\t{\n\t\t\tthrow new \\RuntimeException('FB-Configuration file does not exist or is unreadable.');\n\t\t}\n\n\t\t// Load the configuration file into an object.\n\t\t$configFb = json_decode(file_get_contents($file));\n\n\t\tif ($configFb === null)\n\t\t{\n\t\t\tthrow new \\RuntimeException(sprintf('Unable to parse the configuration file %s.', $file));\n\t\t}\n\n\t\t// Merge the configuration\n\t\t$config->fb_app_id \t\t= $configFb->app_id;\n\t\t$config->fb_app_secret \t= $configFb->app_secret;\n\n\t\t$this->config->loadObject($config);\n\n\t\treturn $this;\n\t}", "protected function loadConfigsForRegister(): void\n {\n $shipConfigs = $this->getConfigsFromShip();\n $containersConfigs = $this->getConfigsFromContainers();\n\n $configs = array_merge($shipConfigs, $containersConfigs);\n\n foreach ($configs as $file){\n $filename = pathinfo($file, PATHINFO_FILENAME);\n $this->mergeConfigFrom($file, $filename);\n }\n }", "static public function load($filename) {\n\t\t$filename .= '.php';\n\n\t\tif (!file_exists($filename)) {\n\t\t\tthrow new \\Exception('Configuration file not found: ' . $filename);\n\t\t}\n\n\t\tinclude $filename;\n\n\t\tif (!isset($config)) {\n\t\t\tthrow new \\Exception('No variable $config found in ' . $filename);\n\t\t}\n\n\t\tself::$values = $config;\n\t}", "private function loadConfigRepository(): void\n {\n // Check Config\n if (\\count($this->configs) > 0) {\n return;\n }\n\n // Load Cache|Repository\n $store = $this->configRepo->findAll();\n foreach ($store as $config) {\n if (count($config->getValue()) === 1) {\n $val = $config->getValue()[0];\n\n if ('true' === $val) {\n $val = true;\n } elseif ('false' === $val) {\n $val = false;\n }\n } else {\n $val = $config->getValue();\n }\n\n $this->configs[$config->getName()] = $val;\n }\n }", "protected function getConfiguration() {}", "public static function load_app_conf() {\n $app_config = include(CONFIGPATH.'app.conf.php');\n return $app_config;\n }", "private function load()\n {\n if ($this->sites) {\n return;\n }\n $data = Yaml::parse(file_get_contents($this->file));\n $this->sites = $data['sites'];\n }", "function load_config($conf) {\n $this->conf = $conf; // Store configuration\n\n $this->pi_setPiVarDefaults(); // Set default piVars from TS\n $this->pi_initPIflexForm(); // Init FlexForm configuration for plugin\n\n // Read extension configuration\n $extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$this->extKey]);\n\n if (is_array($extConf)) {\n $conf = t3lib_div::array_merge($extConf, $conf);\n\n }\n\n // Read TYPO3_CONF_VARS configuration\n $varsConf = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->extKey];\n\n if (is_array($varsConf)) {\n\n $conf = t3lib_div::array_merge($varsConf, $conf);\n\n }\n\n // Read FlexForm configuration\n if ($this->cObj->data['pi_flexform']['data']) {\n\n foreach ($this->cObj->data['pi_flexform']['data'] as $sheetName => $sheet) {\n\n foreach ($sheet as $langName => $lang) {\n foreach(array_keys($lang) as $key) {\n\n $flexFormConf[$key] = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], \n $key, $sheetName, $langName);\n\n if (!$flexFormConf[$key]) {\n unset($flexFormConf[$key]);\n\n }\n }\n }\n }\n }\n\n if (is_array($flexFormConf)) {\n\n $conf = t3lib_div::array_merge($conf, $flexFormConf);\n }\n\n $this->conf = $conf;\n\n }", "public function getConfiguration();", "public function getConfiguration();", "public function getConfiguration();", "private function init(){\r\n\t\t$this->readDescriptionConfig();\r\n\t\t$this->readKeywordsConfig();\r\n\t\t$this->readMetaConfig();\r\n\t\t$this->readLinksConfig();\r\n\t\t$this->readScriptsConfig();\r\n\t}", "function load_config($path) {\n \n // Check path\n if(file_exists($path) == false) {\n throw new Exception(\"Unable to load configuration -- file not found: $path\");\n }\n \n // Check file\n if(is_file($path) == false) {\n throw new Exception(\"Unable to load configuration -- not a file: $path\");\n }\n \n // Check permissions\n if(is_readable($path) == false) {\n throw new Exception(\"Unable to load configuration -- access denied: $path\");\n }\n \n // Check size \n if(filesize($path) == 0) {\n throw new Exception(\"Unable to load configuration -- file is empty: $path\");\n }\n \n // Load parser\n require_once(YAML_PARSER);\n \n // Load config\n $config = Spyc::YAMLLoad($path);\n \n // Check result - if empty, throw an exception\n if(sizeof($config) == 0) {\n throw new Exception(\"Unable to load configuration -- parse error: $path\");\n }\n \n // General application options\n if(isset($config['info']['name'])) { $this->set_name($config['info']['name']); }\n if(isset($config['info']['admin email'])) { $this->set_admin_email($config['info']['admin email']); }\n if(isset($config['info']['admin name'])) { $this->set_admin_name($config['info']['admin name']); }\n if(isset($config['info']['base url'])) { $this->set_base_url($config['info']['base url']); }\n if(isset($config['info']['base directory'])) { $this->set_base_dir($config['info']['base directory']); }\n \n // Database\n if(isset($config['database']['name'])) { \n \n // Initialize db object\n $this->db = new StanfordDatabase();\n \n // Credentials\n if(isset($config['database']['name'])) { $this->db->set_database($config['database']['name']); }\n if(isset($config['database']['username'])) { $this->db->set_username($config['database']['username']); }\n if(isset($config['database']['password'])) { $this->db->set_password($config['database']['password']); }\n \n // Encryption\n if(isset($config['database']['use encryption'])) { $this->db->use_encryption($config['database']['use encryption']); }\n else { $this->db->use_encryption(false); }\n\n }\n \n // Use mysql sessions set to true\n if(isset($config['database']['use mysql sessions']) && $config['database']['use mysql sessions'] == true ) {\n \n // Check DB\n if($this->db instanceof StanfordDatabase) {\n \n // Enable MySQL sessions\n $this->db->setup_mysql_sessions();\n \n }\n else {\n \n // DB not configured\n throw new Exception(\"Cannot enable MySQL-based sessions -- database credentials not provided\"); \n \n }\n }\n \n // Logging\n if(isset($config['settings']['logging mode'])) {\n $this->util->set_error_reporting($config['settings']['logging mode']);\n }\n \n // Undo magic quotes\n if(isset($config['settings']['undo magic quotes']) && $config['settings']['undo magic quotes'] == true) {\n $this->util->undo_magic_quotes();\n }\n }", "public function load_options() {\n\t\treturn $this->get_config();\n\t}", "protected function loadJSON(&$data)\n {\n if ($this->use_apcu && apcu_exists(\"config_settings\")) {\n $data = apcu_fetch(\"config_settings\");\n if (!empty($data)) {\n return;\n }\n }\n \n $this->validateParameters();\n \n if (!file_exists($this->save_path) && empty($this->config_file_must_exist)) {\n return;\n }\n \n if (!file_exists($this->save_path) || !is_readable($this->save_path)) {\n throw new \\Exception(sprintf(\"The config file '%s' cannot be read!\", $this->save_path));\n }\n \n $json = file_get_contents($this->save_path);\n if ($json === false) {\n throw new \\Exception(sprintf(\"The config file '%s' cannot be read!\", $this->save_path));\n }\n \n if (!empty($this->save_encrypted)) {\n $json = aes_256_decrypt($json, $this->salt_key);\n }\n \n try {\n json_to_array($json, $data);\n } catch (\\Throwable $ex) {\n throw new \\Exception(\"JSON parse error: \" . $ex->getMessage());\n }\n \n if ($this->use_apcu) {\n apcu_store(\"config_settings\", $data);\n }\n }", "public static function getConfiguration();", "public function parseConfig()\n {\n $fileContents = file_get_contents($this->filename);\n if (!$fileContents) {\n $this->error = 'Failed to read file contents';\n\n return false;\n }\n\n $config = json_decode($fileContents, true);\n if (json_last_error()) {\n $this->error = json_last_error_msg();\n\n return false;\n }\n\n $this->config = new Data(array_replace_recursive($config, $this->overrides));\n\n return true;\n }", "private function __construct() {\n if (!$this->read() and !INSTALLING)\n trigger_error(\n __(\"Could not read the configuration file.\"),\n E_USER_ERROR\n );\n\n fallback($this->data[\"sql\"], array());\n fallback($this->data[\"enabled_modules\"], array());\n fallback($this->data[\"enabled_feathers\"], array());\n fallback($this->data[\"routes\"], array());\n }", "protected function loadConfiguration()\n {\n $config_path = __DIR__ . '/../../config/tintin.php';\n\n if (!$this->isLumen()) {\n $this->publishes([\n $config_path => config_path('view.php')\n ], 'config');\n }\n\n $this->mergeConfigFrom($config_path, 'view');\n }" ]
[ "0.84316874", "0.8128195", "0.7795825", "0.7561144", "0.75552887", "0.75482875", "0.75088036", "0.73999274", "0.7296254", "0.72635525", "0.7245357", "0.72373927", "0.7215795", "0.7177752", "0.71097696", "0.7104384", "0.7100882", "0.7094294", "0.70674855", "0.70559895", "0.7055416", "0.70461696", "0.7014426", "0.69130534", "0.6895876", "0.68862283", "0.68618554", "0.6832017", "0.679593", "0.6752179", "0.67305773", "0.67207605", "0.6711771", "0.67098725", "0.66836786", "0.66669065", "0.6657017", "0.6654151", "0.6649281", "0.6634155", "0.66151965", "0.66073954", "0.66014844", "0.66014844", "0.66010404", "0.66007257", "0.6573371", "0.6554543", "0.6552966", "0.6546918", "0.65433747", "0.6542894", "0.65400094", "0.6528521", "0.6488265", "0.64745426", "0.6469771", "0.64400834", "0.6437408", "0.64321727", "0.6408062", "0.6401093", "0.63923365", "0.63722956", "0.63560396", "0.6355976", "0.635453", "0.63523066", "0.6316445", "0.6311108", "0.62960327", "0.62729114", "0.6261431", "0.6258291", "0.6242484", "0.62322456", "0.622089", "0.62194884", "0.6217805", "0.620772", "0.6203031", "0.62011325", "0.6200395", "0.61974645", "0.6196909", "0.61946595", "0.61673576", "0.6167305", "0.6165248", "0.6164676", "0.6163736", "0.6163736", "0.6163736", "0.615988", "0.6156092", "0.6154818", "0.61412925", "0.6140519", "0.6123156", "0.6116023", "0.61147606" ]
0.0
-1
/ Return configuration data
public function get() { return $this->_configuration; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getConfigData()\n {\n return [\n 'alias' => $this->getAlias(),\n 'dbName' => $this->getName(),\n 'dbHost' => $this->getHost(),\n 'dbType' => $this->getType(),\n 'dbUser' => $this->getUserName(),\n 'dbPass' => $this->getPassword()\n ];\n }", "public function getDataConfig()\n {\n return $this->dataConfig;\n }", "public function getData()\n {\n if ($this->configIsValid('common')) {\n return $this->Config['common']; \n }\n }", "function get_settings_config_data() {\n $config = $this->config;//get instance config\n\n //if config doesn't exist - create it\n if (!isset($config)) {\n $config = new stdClass();\n }\n\n //if data doesn't exist = make it an empty array\n if (!isset($config->data))\n $config->data = array();\n\n //return config\n return $config;\n }", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfigData() {\n\t\treturn array(\n\t\t\t'storageType' => StorageFactory::TYPE_DUMMY,\n\t\t\t'debuggerDisabled' => $this->debuggerDisabled,\n\t\t);\n\t}", "function get_config_data()\n{\n global $dbh;\n $config = null;\n\n $result = $dbh->query(\"SELECT * FROM configuration\");\n if ($result)\n $config = $result->fetch(PDO::FETCH_OBJ);\n\n return $config;\n}", "abstract public function getConfig();", "public function getConfiguration()\n {\n return self::$config_array;\n }", "abstract protected function getConfig();", "function getConfig()\n {\n return $this->_api->doRequest(\"GET\", \"{$this->getBaseApiPath()}/config\");\n }", "public function getConfig() {}", "public static function read()\n {\n return self::$config;\n }", "public function getDataConfig()\n {\n return $this->params;\n }", "public function config()\n\t{\n\t\treturn $this->config;\n\t}", "public function config()\n\t{\n\t\treturn $this->config;\n\t}", "function getConfiguration() ;", "public function getConfig() {\r\n\r\n\t}", "public function getConfiguration();", "public function getConfiguration();", "public function getConfiguration();", "public function get_config()\n\t{\n\t\treturn $this->cfg;\n\t}", "function getConfigurationValues() ;", "public static function getConfigData()\n\t\t{\n\t\t\t$sConfigFile = self::getConfigFile();\n\n\t\t\t// Detect DB settings via configuration file\n\t\t\tif(is_file($sConfigFile))\n\t\t\t{\n\t\t\t\treturn file_get_contents($sConfigFile);\n\t\t\t}\n\n\t\t\treturn '';\n\t\t}", "public function readConfigurationValues();", "function configuration()\r\n {\r\n global $db;\r\n $default_conf = $this->default_configuration();\r\n $conf = $db->getAssoc('\r\n select configuration_key, configuration_value from !\r\n where module_key = ?\r\n ', false, array(TABLE_CONFIGURATION, $this->module_key()));\r\n return array_merge($default_conf, $conf);\r\n }", "public function getConfig(){\n\t\treturn $this->_config;\n\t}", "public static function getConfiguration();", "public function getConfiguration() {\n\t\treturn $this->_getResponse(self::URL_CONFIGURATION);\n\t}", "public function getConfig(){\n return $this->config;\n }", "public function getConfig() {\n \t\n \t// Return our configuration\n \treturn $this->aConfig;\n }", "public function getConfig() \n {\n return $this->config;\n }", "public function getConfigurationValues() {}", "public function getConfigurationValues() {}", "public function getConfigurationValues() {}", "public function getConfigurationValues() {}", "public function config()\n {\n return $this->config;\n }", "public function getConfigurarion()\n {\n return $this->configuration;\n }", "public function getConfiguration() {}", "function getConfigContents() {\n\t\treturn $this->configContents;\n\t}", "public function getConfiguration() {}", "protected abstract static function getConfig(): array;", "public function getConfig(): array;", "public function config()\n {\n return $this->context->getConfig();\n }", "public function getConfiguration(): array;", "public function getConfiguration(): array;", "public function getConfig()\n\t{\n\t\treturn $this->config;\n\t}", "public function getConfig()\n\t{\n\t\treturn $this->config;\n\t}", "public function getConfig()\n\t{\n\t\treturn $this->config;\n\t}", "public function getConfig()\n\t{\n\t\treturn $this->config;\n\t}", "public function getConfig()\n {\n return $this->get('config');\n }", "public function getConfiguration()\n {\n return $this->_config;\n }", "public static function getConfig() {\n\t\tif (self::$temp_config !== null) {\n\t\t\treturn self::$temp_config;\n\t\t}\n\n\t\t$config_file = self::getConfigFile();\n\t\treturn (!file_exists($config_file)) ? array() : json_decode(file_get_contents($config_file), true);\n\t}", "public function getConfig()\n {\n return $this->config;\n }", "function getConfig()\n {\n return $this->config;\n }", "private function _Config() {\n $data['ttcConfig'] = $this->cNavMenuBuilder->Config();\n return $data;\n }", "public function getConfig()\n {\n return $this->_config;\n }", "public function getConfig()\n {\n return $this->_config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public static function getConfig()\n {\n return self::$config;\n }", "public function getConfig() {\n return $this->_config;\n }", "private static function getConfig() {\n\n\t\t$pathRoot = $_SERVER['DOCUMENT_ROOT'].substr($_SERVER['PHP_SELF'],0, strpos($_SERVER['PHP_SELF'],\"/\",1)).\"/config/\";\n\n\t\t$jsonConfig = file_get_contents($pathRoot.'config.json');\n\t\tself::$arrayConfig = json_decode($jsonConfig);\n\t}", "public static function getConfig(){\n\t\tif(CoreConfig::$config == null){\n\t\t\t$query = \"SELECT module, name, value FROM config ORDER by module, name\";\n\t\t\t$table = DB::getTable($query);\n\t\t\tforeach($table as $row) {\n\t\t\t\tCoreConfig::$config[$row['module']][$row['name']] = $row['value'];\n\t\t\t}\n\t\t}\n\t\treturn CoreConfig::$config;\n\t}", "private function getConfig() {\r\n\t\techo '<reply action=\"ok\">';\r\n\t\techo $this->data->asXML();\r\n\t\techo '</reply>';\r\n\t}", "public function getConfig() {\r\n return $this->config;\r\n }", "protected function getConfiguration() {}", "static function config() {\n\t\t//\t\tif (self::$configuration === null) {\n\t\t//\t\t\tself::$configuration = include self::themepath().'wpgrade-config'.EXT;\n\t\t//\t\t}\n\t\t//\n\t\t//\t\treturn self::$configuration;\n\t\treturn self::get_config();\n\t}", "public function getConfig()\n {\n return $this['config'];\n }", "public function getConfig() {\n if (is_null($this->getData(\"config\"))) {\n $this->setData(\"config\", Mage::getModel(\"cloudiq_callme/config\"));\n }\n\n return $this->getData(\"config\");\n }", "static function getConfig() {\n\t\treturn self::getRegistry()->get(self::REGISTRY_CONFIG);\n\t}", "public function getConfiguration()\n {\n return $this->getResponse(self::URL_CONFIGURATION);\n }", "public function infosConfig(){\n $get_configuration_infos = \\App\\Helpers\\ConfigurationHelper\\Configuration::get_configuration_infos(1);\n return $get_configuration_infos;\n }", "public function getConfig()\n {\n return $this->_getConfigFile();\n }", "public function getConfig()\n\t{\n\t\t$config = new \\stdClass();\n\t\t$config->siteurl = $this->_config->siteurl;\n\t\t$config->host = $this->_config->host;\n\t\t$config->port = $this->_config->port;\n\t\t$config->dbname = $this->_config->dbname;\n\t\t$config->username = $this->_config->username;\n\t\t$config->password = $this->_config->password;\n\t\t$config->path = $this->_config->path;\n\t\t$config->options = $this->_config->options;\n\t\t$config->affiliateId = $this->_config->affiliateId;\n\n\t\treturn $config;\n\t}", "public function getConfig()\n {\n return $this->traitGetConfig();\n }", "public function getConfiguration()\n\t{\n\t\treturn $this->configuration;\n\t}", "public function getConfig() : \\codename\\core\\config {\r\n return $this->config;\r\n }", "public function getConfiguration()\n {\n $configuration = parent::getConfiguration();\n $configuration['debug'] = isset($configuration['debug']) ? $configuration['debug'] : false;\n $configuration['fileUri'] = $this->container->getParameter(\"mapbender.uploads_dir\") . \"/data-store\";\n\n if (isset($configuration[\"schemes\"]) && is_array($configuration[\"schemes\"])) {\n foreach ($configuration[\"schemes\"] as $key => &$scheme) {\n if (is_string($scheme['dataStore'])) {\n $storeId = $scheme['dataStore'];\n $dataStore = $this->container->getParameter('dataStores');\n $scheme['dataStore'] = $dataStore[ $storeId ];\n $scheme['dataStore'][\"id\"] = $storeId;\n //$dataStore = new DataStore($this->container, $configuration['source']);\n }\n if (isset($scheme['formItems'])) {\n $scheme['formItems'] = $this->prepareItems($scheme['formItems']);\n }\n }\n }\n return $configuration;\n }", "function get_config() {\n //$memcached = new \\Memcached();\n //$memcached->addServer(MEMCACHED_HOST, MEMCACHED_PORT);\n \n if (false) {//$memcached->get('lc_config') && MEMCACHED_ENABLED) {\n //return $memcached->get('lc_config');\n }\n else { \n // Load our master config\n $master_config = parse_ini_file(LC_HOME . LC_MASTER_CONFIG, True);\n \n // Let's get the local config based on the resource type (an action parameter)\n if (!empty($this->http_request->action_params['resource_type'])){\n $resource_type = $this->http_request->action_params['resource_type'];\n if (!empty($resource_type) && !in_array($resource_type, array_keys($master_config['resource_types']))) {\n throw new \\Exception('Incorrect resource type specified' .\n ' --> ' . $resource_type . ' <-- See ' .\n $master_config['doc']['lc_doc_loc'] . ' for documention on resource types.');\n }\n }\n \n $resource_config = parse_ini_file(LC_HOME . $master_config['resource_types'][$resource_type]);\n\n // Since we turn all sections in our master config into arrays (this \n // way we can validate keys easily), we need to flatten it back down\n $flattened_master_config = array();\n foreach ($master_config as $top_level_element) {\n foreach ($top_level_element as $key => $value) {\n $flattened_master_config[$key] = $value;\n }\n }\n\n $merged = array_merge($flattened_master_config, $resource_config);\n //$memcached->set('lc_config', $merged);\n return $merged;\n }\n }", "protected function getConfig()\n\t{\n\t\treturn $this->oConfig;\n\t}" ]
[ "0.79169494", "0.7797594", "0.77622676", "0.77231556", "0.76405793", "0.76405793", "0.76405793", "0.76405793", "0.76405793", "0.76405793", "0.76405793", "0.76405793", "0.7612983", "0.7576414", "0.75605094", "0.75511986", "0.7532274", "0.7505278", "0.75039536", "0.7486115", "0.74560755", "0.7443541", "0.7443541", "0.7438685", "0.7427672", "0.742", "0.742", "0.742", "0.7414465", "0.7408489", "0.74064225", "0.7396438", "0.7392285", "0.73910916", "0.736351", "0.7358743", "0.7349729", "0.7342079", "0.73354286", "0.73190117", "0.731811", "0.731811", "0.731811", "0.73178065", "0.7316202", "0.72962075", "0.729615", "0.7295424", "0.7291375", "0.7287708", "0.7274929", "0.7268429", "0.7268429", "0.7259166", "0.7259166", "0.7259166", "0.7259166", "0.7242485", "0.7233032", "0.7221043", "0.7219311", "0.7212637", "0.7205437", "0.7193287", "0.7193287", "0.7191477", "0.7191477", "0.7191477", "0.7191477", "0.7191477", "0.7191477", "0.7191477", "0.7191477", "0.7191477", "0.7191477", "0.7191477", "0.7191477", "0.7191477", "0.7191477", "0.7191477", "0.71903163", "0.7181275", "0.71771985", "0.71636355", "0.71596265", "0.71593404", "0.71442014", "0.71407706", "0.7135795", "0.7112659", "0.71003735", "0.7088329", "0.7081862", "0.7056419", "0.70281017", "0.7021955", "0.70114046", "0.7010469", "0.7006585", "0.699508", "0.6994567" ]
0.0
-1
/ Check configuration data
private function _check() { $cfgStrKey = array('nkVersion', 'nkMinimumVersion', 'minimalPhpVersion', 'partnersKey'); $cfgArrayKey = array('phpExtension', 'uploadDir', 'changelog', 'infoList', 'deprecatedFiles'); $i18n = i18n::getInstance(); foreach (array_merge($cfgStrKey, $cfgArrayKey) as $cfgKey) { if (! array_key_exists($cfgKey, $this->_configuration)) throw new Exception(sprintf($i18n['MISSING_CONFIG_KEY'], $cfgKey)); if (in_array($cfgKey, $cfgStrKey) && (! is_string($this->_configuration[$cfgKey]) || empty($this->_configuration[$cfgKey]))) throw new Exception(sprintf($i18n['CONFIG_KEY_MUST_BE_STRING'], $cfgKey)); elseif (in_array($cfgKey, $cfgArrayKey) && (! is_array($this->_configuration[$cfgKey]) || empty($this->_configuration[$cfgKey]))) throw new Exception(sprintf($i18n['CONFIG_KEY_MUST_BE_ARRAY'], $cfgKey)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function checkConfig();", "private function check_conf() {\n ConfigChecker::check();\n }", "public function hasConfig();", "public function checkConfiguration() {\n\t\tif(empty($this->configuration['appKey'])) {\n\t\t\t$this->error = '<div>You have to set App key first and save the record.</div>';\n\t\t\treturn false;\n\t\t}\n\t\tif(empty($this->configuration['appSecret'])) {\n\t\t\t$this->error = '<div>You have to set App key first and save the record.</div>';\n\t\t\treturn false;\n\t\t}\n\t\tif(empty($this->configuration['accessType'])) {\n\t\t\t$this->error = '<div>You have to save this record first.</div>';\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public function _checkConfig(){\n return true;\n if(count($this->moduleConfig) > 0) return true;\n return false;\n }", "public static function checkConf()\n\t{\n\t\treturn array();\n\t}", "public static function checkConf()\n\t{\n\t\treturn array();\n\t}", "private static function check_config ()\n\t{\n\t\t// load config file here\n\t\tif (count(self::$_config) == 0)\n\t\t{\n\t\t\tself::LoadConfigFile();\n\t\t}\n\t}", "function checkConfig()\n\t{\n\t\t$confDefault = array(\n\t\t\t'effects',\n\t\t\t'effectsCoin',\n\t\t\t'nivoThemeFolder',\n\t\t\t'effectsNivo',\n\t\t\t'useSelectInsteadCheckbox',\n\t\t\t'allowedDbTypesForCaption',\n\t\t);\n\t\t$confArr = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['imagecycle']);\n\t\tforeach ($confDefault as $val) {\n\t\t\tif (! isset($confArr[$val]) && ! isset($_POST['data'][$val])) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public static function checkConfig() {\n\t\tlog::add('surveillanceStation', 'debug', ' ┌──── Verification des configurations du plugin');\n\t\t// Checking snapLocation\n\t\tif (config::byKey('snapLocation', 'surveillanceStation') == 'synology') {\n\t\t\tconfig::save('snapRetention', '', 'surveillanceStation');\n\t\t\tlog::add('surveillanceStation', 'debug', ' │ checkConfig::snapRetention Nettoyage des valeurs');\n\t\t}\n\t\t// Checking Integer fields\n\t\tforeach (array('port', 'snapRetention') as $field) {\n\t\t\tif ( ! empty(config::byKey($field, 'surveillanceStation'))) {\n\t\t\t\tswitch($field) {\n\t\t\t\t\tcase 'port':\n\t\t\t\t\t\t$min_range = 1;\n\t\t\t\t\t\t$max_range = 65535;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$min_range = 0;\n\t\t\t\t\t\t$max_range = 9999;\n\t\t\t\t}\n\t\t\t\tif(!filter_var(config::byKey($field, 'surveillanceStation'), FILTER_VALIDATE_INT, array('options' => array('min_range' => $min_range, 'max_range' => $max_range)))){\n\t\t\t\t\tlog::add('surveillanceStation', 'debug', ' │ ERROR : checkConfig::'.$field.' est invalide. La configuration doit être un nombre (entier) compris entre '.$min_range.' et '.$max_range);\n\t\t\t\t\tlog::add('surveillanceStation', 'debug', ' └────────────');\n\t\t\t\t\tthrow new Exception(__($field.' est invalide. La configuration doit être un nombre (entier) compris entre '.$min_range.' et '.$max_range, __FILE__));\n\t\t\t\t} else {\n\t\t\t\t\tlog::add('surveillanceStation', 'debug', ' │ checkConfig::'.$field.' OK with value ' . config::byKey($field, 'surveillanceStation'));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tlog::add('surveillanceStation', 'debug', ' └────────────');\n }", "public function checkConfiguration(array $data, ArrayAccess $errors);", "private function configurationChecks()\n {\n\n // Debug Check: If debug enabled, check that debug email is set\n if ($this->salesforceDebug && is_string($this->salesforceDebugEmail) && $this->salesforceDebugEmail != '') {\n throw new \\InvalidArgumentException('With debug mode enabled, you must set the debug email address.');\n }\n\n\n // OID Check: Make sure the unique Salesforce account identifier is set and is a string\n if (!$this->defaultFields['oid'] && is_string($this->defaultFields['oid']) && $this->defaultFields['oid'] != '') {\n throw new \\InvalidArgumentException('The unique Salesforce account ID (oid) must be set as a string.');\n }\n\n return true;\n }", "private function _loadConfig() {\n\t\t$this->_config = $this->_call('configuration', '');\n\n\t\treturn ! empty($this->_config);\n\t}", "public function validate($configData);", "private function _checkConfig() {\n // Ftp configuration can be namespaced with the 'ftp' keyword\n if (isset($this->_config['ftp']))\n $this->_config = $this->_config['ftp'];\n\n // Check each configuration entry\n if (empty($this->_config) || !is_array($this->_config))\n throw new \\InvalidArgumentException(\"Configuration should be an array\");\n else if (empty($this->_config['host']))\n throw new \\InvalidArgumentException(\"Ftp server host not specified in configuration\");\n else if (empty($this->_config['port']))\n throw new \\InvalidArgumentException(\"Ftp server port not specified in configuration\");\n else if (empty($this->_config['user']))\n throw new \\InvalidArgumentException(\"Ftp user not specified in configuration\");\n else if (empty($this->_config['private_key']))\n throw new \\InvalidArgumentException(\"Ftp user ssh private key not specified in configuration\");\n else if (!is_readable($this->_baseDir.'/'.$this->_config['private_key']))\n throw new \\InvalidArgumentException(\"Ftp user ssh private key not found or not readable at: \".$this->_baseDir.'/'.$this->_config['private_key']);\n else if (empty($this->_config['public_key']))\n throw new \\InvalidArgumentException(\"Ftp user ssh public key not specified in configuration\");\n else if (!is_readable($this->_baseDir.'/'.$this->_config['public_key']))\n throw new \\InvalidArgumentException(\"Ftp user ssh public key not found or not readable at: \".$this->_baseDir.'/'.$this->_config['public_key']);\n }", "public function checkIfEssentialConfigurationExists() {}", "public function checkConfig() {\n\t\tglobal $dbKITregistryCfg;\n\t\t$message = '';\n\t\t// ueberpruefen, ob ein Eintrag geaendert wurde\n\t\tif ((isset($_REQUEST[self::request_items])) && (!empty($_REQUEST[self::request_items]))) {\n\t\t\t$ids = explode(\",\", $_REQUEST[self::request_items]);\n\t\t\tforeach ($ids as $id) {\n\t\t\t\tif (isset($_REQUEST[dbKITregistryCfg::field_value.'_'.$id])) {\n\t\t\t\t\t$value = $_REQUEST[dbKITregistryCfg::field_value.'_'.$id];\n\t\t\t\t\t$where = array();\n\t\t\t\t\t$where[dbKITregistryCfg::field_id] = $id;\n\t\t\t\t\t$config = array();\n\t\t\t\t\tif (!$dbKITregistryCfg->sqlSelectRecord($where, $config)) {\n\t\t\t\t\t\t$this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $dbKITregistryCfg->getError()));\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\tif (sizeof($config) < 1) {\n\t\t\t\t\t\t$this->setError(sprintf(reg_error_cfg_id, $id));\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\t$config = $config[0];\n\t\t\t\t\tif ($config[dbKITregistryCfg::field_value] != $value) {\n\t\t\t\t\t\t// Wert wurde geaendert\n\t\t\t\t\t\t\tif (!$dbKITregistryCfg->setValue($value, $id) && $dbKITregistryCfg->isError()) {\n\t\t\t\t\t\t\t\t$this->setError($dbKITregistryCfg->getError());\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telseif ($dbKITregistryCfg->isMessage()) {\n\t\t\t\t\t\t\t\t$message .= $dbKITregistryCfg->getMessage();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t// Datensatz wurde aktualisiert\n\t\t\t\t\t\t\t\t$message .= sprintf(reg_msg_cfg_id_updated, $config[dbKITregistryCfg::field_name]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->setMessage($message);\n\t\treturn $this->dlgConfig();\n\t}", "public abstract function validateConfig($config);", "function checkConfig() {\n $config = CRM_Core_Config::singleton( );\n\n $error = array( );\n\n if (empty($this->_paymentProcessor['user_name'])) {\n $error[] = ts('Merchant ID is not set in the Administer CiviCRM &raquo; Payment Processor.');\n }\n if (empty($this->_paymentProcessor['password'])) {\n $error[] = ts('Password is not set in the Administer CiviCRM &raquo; Payment Processor.');\n }\n \n if (!empty($error)) {\n return implode('<p>', $error);\n }\n\n return null;\n\t}", "public function check() {\n\t\t$values = array($this->value);\n\t\tif ($this->value == 'On') {\n\t\t\t$values[] = '1';\n\t\t}\n\t\telseif ($this->value == 'Off') {\n\t\t\t// TODO check it, empty is default value\n\t\t\t$values[] = '';\n\t\t\t$values[] = '0';\n\t\t}\n\t\tif (!in_array(ini_get($this->name), $values)) {\n\t\t\t$this->log('Setting '.$this->name.'='.ini_get($this->name).'. \"'.$this->value.'\" is required', Project::MSG_ERR);\n\t\t\treturn 1;\n\t\t}\n\t\t\n\t\t$this->log('Setting '.$this->name.' is passed', Project::MSG_VERBOSE);\n\t\treturn 0;\n\t}", "function has_config() {\n return true;\n }", "public function testConfigExists() {\n if (isset($this->app->config) && sizeof($this->app->config) > 0) {\n $this->pass(\"The configuration file has been loaded.\");\n }\n else {\n $this->fail(\"The configuration file was not loaded or is empty.\");\n }\n }", "private function valid() {\n\t\tforeach($this->config['checks'] as $key) {\n\t\t\tif(!array_key_exists($key, $this->config)) {\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\treturn TRUE;\n\t}", "protected function checkConfiguration() {\n\t\t$pass = FALSE;\n\t\ttry {\n\t\t\tTx_CzWkhtmltopdf_Config::getBinaryPath();\n\t\t\t$pass = TRUE;\n\t\t}\n\t\tcatch(InvalidArgumentException $e) {}\n\n\t\t$this->reports[] = t3lib_div::makeInstance('tx_reports_reports_status_Status',\n\t\t\t'Configuration', // title\n\t\t\t$pass ? 'OK' : 'ERROR', // value\n\t\t\t$pass ? '' : 'Please go to the Extension Manager and hit the \"Update\" button of the configuration of '.Tx_CzWkhtmltopdf_Config::EXTKEY , //message\n\t\t\t$pass ? tx_reports_reports_status_Status::OK : tx_reports_reports_status_Status::ERROR //severity\n\t\t);\n\n\t\treturn $pass;\n\t}", "function has_configuration() {\n\t\treturn true;\n\t}", "function process_config($config) {\n\t\treturn true;\n\t}", "public function checkSetup()\n {\n if ($this->itemType == \"\") {\n die(\"No itemType provided!\");\n }\n if ($this->classPathBase == \"\") {\n die(\"No classPathBase provided!\");\n }\n if ($this->listView == \"\" && empty($this->listNames)) {\n die(\"Provide either a list view OR fields!\");\n }\n if ($this->createView == \"\" && empty($this->editSettings)) {\n die(\"No create view OR editSettings provided!\");\n }\n\n if (! empty($this->editSettings)) {\n $fields = ['label','type'];\n foreach ($this->editSettings as $key => $es) {\n foreach ($fields as $f) {\n if (empty($es[$f])) {\n die(\"An edit parameter - {$f} - is missing or blank in your config for \\\"{$key}\\\".\");\n }\n }\n }\n }\n }", "public function checkConfiguration()\n\t{\n\t\tglobal $langs;\n\n\t\t$errors = array();\n\n\t\t$filename = $this->getFilename();\n\n\t\tif (file_exists($filename) && is_writable($filename))\n\t\t{\n\t\t\tdol_syslog('admin/syslog: file '.$filename);\n\t\t}\n\t\telse $errors[] = $langs->trans(\"ErrorFailedToOpenFile\", $filename);\n\n\t\treturn $errors;\n\t}", "public function has_config() {\n return false;\n }", "public function has_config() {\n return false;\n }", "protected function isConfigurationComplete() {}", "function cfg_check(...$args)\n{\n\tglobal $CONFIG;\n\tswitch( count($args) )\n\t{\n\t\tcase 2: if( !isset($CONFIG[$args[0]]) || !$CONFIG[$args[0]] ) WdfException::Raise($args[1]); break;\n\t\tcase 3: if( !isset($CONFIG[$args[0]][$args[1]]) || !$CONFIG[$args[0]][$args[1]] ) WdfException::Raise($args[2]); break;\n\t\tcase 4: if( !isset($CONFIG[$args[0]][$args[1]][$args[2]]) || $CONFIG[$args[0]][$args[1]][$args[2]] ) WdfException::Raise($args[3]); break;\n\t\tcase 5: if( !isset($CONFIG[$args[0]][$args[1]][$args[2]][$args[3]]) || $CONFIG[$args[0]][$args[1]][$args[2]][$args[3]] ) WdfException::Raise($args[4]); break;\n\t\tcase 6: if( !isset($CONFIG[$args[0]][$args[1]][$args[2]][$args[3]][$args[4]]) || !$CONFIG[$args[0]][$args[1]][$args[2]][$args[3]][$args[4]] ) WdfException::Raise($args[5]); break;\n\t\tcase 7: if( !isset($CONFIG[$args[0]][$args[1]][$args[2]][$args[3]][$args[4]][$args[5]]) || !$CONFIG[$args[0]][$args[1]][$args[2]][$args[3]][$args[4]][$args[5]] ) WdfException::Raise($args[6]); break;\n\t\tdefault: WdfException::Raise(\"Illegal argument count: \".count($args));\n\t}\n}", "public function checkDefaultValues() {\n return is_file($this->STR_PROJECT_CONFIG_FILE);\n }", "public function validateConfig()\n\t{\n\t\t$schemaContent = @file_get_contents(Config::$schemaFile);\n\t\tif($schemaContent === FALSE) {\n\t\t\t$this->errors['File not found'][] = [\n\t\t\t\t'property' => Config::$schemaFile,\n\t\t\t\t'message' => 'Schema file not found.'\n\t\t\t];\n\t\t\treturn;\n\t\t}\n\n\t\t$schema = Json::decode($schemaContent);\n\n\t\t$this->schemaValidator->check($this->config, $schema);\n\n\t\tif (!$this->schemaValidator->isValid()) {\n\t\t\t$this->errors['schema'] = $this->schemaValidator->getErrors();\n\t\t}\n\t}", "static function valid_config_fields($array)\n {\n return isset($array['host']) && isset($array['db'])\n && isset($array['dbuser']) && isset($array['dbpass'])\n && isset($array['site-name']) && isset($array['copyright'])\n && isset($array['google']) && (count($array) === 7);\n }", "function instance_allow_config()\r\n\t\t{\r\n\t\t\r\n\t\t}", "function ConfigFile() {\n $options = array(\n 'pipe' => NULL,\n 'config' => UNISH_SANDBOX,\n 'root' => $this->root,\n 'uri' => $this->env,\n );\n $this->drush('core-status', array('Drush configuration'), $options);\n $output = trim($this->getOutput());\n $loaded = explode(' ', $output);\n $this->assertSame(array_values($this->exists), $loaded);\n }", "public function has_config() {\n return true;\n }", "public function has_config() {\n return true;\n }", "private function _validate_settings()\n\t{\n\n\t\treturn TRUE;\n\t}", "function getConfigurationValues() ;", "function validate_configuration($attr)\r\n {\r\n return array();\r\n }", "private function _configurationExists($input) {\n\t\t$check = $this->db->queryFetchSingle(\"SELECT * FROM \"._WE_CREDITSYS_.\" WHERE config_id = ?\", array($input));\n\t\tif($check) return true;\n\t\treturn false;\n\t}", "public static function checkConf()\n\t{\n\t\treturn array( 'convert_attachments' );\n\t}", "function plugin_satisfactionsmiley_check_config() {\n return true;\n}", "public function validate() {\n\n if (empty($this->config['default_pool_read'])) {\n throw new neoform\\config\\exception('\"default_pool_read\" must be set');\n }\n\n if (empty($this->config['default_pool_write'])) {\n throw new neoform\\config\\exception('\"default_pool_write\" must be set');\n }\n\n if (empty($this->config['pools']) || ! is_array($this->config['pools']) || ! $this->config['pools']) {\n throw new neoform\\config\\exception('\"pools\" must contain at least one server');\n }\n }", "public function hasConfig($key);", "function validateSetup()\n\t{\n\t\tforeach ($this->setup->getClient()->status as $key => $val)\n\t\t{\n\t\t\tif ($key != \"finish\" and $key != \"access\")\n\t\t\t{\n\t\t\t\tif ($val[\"status\"] != true)\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n//$this->setup->getClient()->setSetting(\"zzz\", \"V\");\n\t\t$clientlist = new ilClientList($this->setup->db_connections);\n//$this->setup->getClient()->setSetting(\"zzz\", \"W\");\n\t\t$list = $clientlist->getClients();\n//$this->setup->getClient()->setSetting(\"zzz\", \"X\");\n\t\tif (count($list) == 1)\n\t\t{\n\t\t\t$this->setup->ini->setVariable(\"clients\",\"default\",$this->setup->getClient()->getId());\n\t\t\t$this->setup->ini->write();\n\n\t\t\t$this->setup->getClient()->ini->setVariable(\"client\",\"access\",1);\n\t\t\t$this->setup->getClient()->ini->write();\n\t\t}\n//$this->setup->getClient()->setSetting(\"zzz\", \"Y\");\n\t\treturn true;\n\t}", "function getConfiguration() ;", "public function has_configuration()\n {\n return true;\n }", "public function has_configuration()\n {\n return true;\n }", "abstract public function isConfigurationValid(array $configuration): bool;", "protected function validateConfigurationOptions()\n {\n if (empty($this->dataKeys)) {\n throw new MissConfiguredException(__('There are not columns specified for your datatable.'));\n }\n\n if (empty($this->configColumns)) {\n throw new MissConfiguredException(__('Column renders are not specified for your datatable.'));\n }\n }", "function processConfiguration() ;", "public static function checkConfiguration($config = array()){\n\t\t$params = compact('config');\n\t\treturn static::_filter(__FUNCTION__, $params, function($self, $params) {\n\t\t\textract($params);\n\n\t\t\tif (!$config){\n\t\t\t$config = $self::invokeMethod('config');\n\t\t\t}\n\t\t\tif (empty($config['appId'])){\n\t\t\t\tthrow new ConfigException('Configuration: `appId` should be set');\n\t\t\t}\n\t\t\tif (empty($config['secret'])){\n\t\t\t\tthrow new ConfigException('Configuration: `secret` should be set');\n\t\t\t}\n\t\t\tif (!empty($config['cookie'])){\n\t\t\t\tthrow new ConfigException('Configuration: `cookie` not yet supported');\n\t\t\t}\n\t\t\tif (!empty($config['domain'])){\n\t\t\t\tthrow new ConfigException('Configuration: `domain` not yet supported');\n\t\t\t}\n\t\t\tif (!empty($config['fileUpload'])){\n\t\t\t\tthrow new ConfigException('Configuration: `fileUpload` not yet supported');\n\t\t\t}\n\t\t\treturn true;\n\t\t});\n\t}", "public function validateDatabaseConfig(Database_Config $databaseConfig);", "public function validateConfig() {\n\t\t\t$two_step_id = $this->config['l_id'];\n\t\t\tif ( empty( $two_step_id ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$two_step = tve_leads_get_form_type( $two_step_id, array( 'get_variations' => false ) );\n\t\t\tif ( empty( $two_step ) || $two_step->post_status === 'trash' || $two_step->post_type != TVE_LEADS_POST_TWO_STEP_LIGHTBOX ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}", "public function hasConfig($package);", "function self_check()\n\t{\n\t\tif ($gpg = $this->call('--list-config'))\n\t\t{\n\t\t\t$gpg = explode(\"\\n\", $gpg);\n\n\t\t\t// no gpg version string in the wrapper output\n\t\t\tif (is_array($gpg) === false || false === is_array($sub = explode(':', $gpg[0])))\n\t\t\t{\n\t\t\t\t return 2;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ($sub[0] == 'cfg' && $sub[1] == 'version')\n\t\t\t\t{\n\t\t\t\t\t// version number requirement is not met\n\t\t\t\t\tif ($sub[2] < GPG_VERSION_MIN)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn 3;\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\treturn 2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// no output from the backend wrapper\n\t\t\treturn 1;\n\t\t}\n\t\t// everything's okay\n\t\treturn 0;\n\t}", "protected function checkSettings()\n {\n if (empty($this->settings)\n || empty($this->settings['column_1']) || empty($this->settings['column_2']) \n || empty($this->settings['compare_type']) || !isset($this->settings['configuration']))\n return false;\n \n return $this->checkCompareType();\n }", "private function validateConfig()\n {\n // Throw error when username is missing from the config files.\n if (! config('mailcamp.username')) {\n throw new MailcampException('Mailcamp API error: No username is specified for connecting with Mailcamp.');\n }\n\n // Throw error when token is missing from the config files.\n if (! config('mailcamp.token')) {\n throw new MailcampException('Mailcamp API error: No token is specified for connecting with Mailcamp.');\n }\n\n // Throw error when endpoint is missing from the config files.\n if (! config('mailcamp.endpoint')) {\n throw new MailcampException('Mailcamp API error: No endpoint is specified for connecting with Mailcamp.');\n }\n\n // Set connection details.\n $this->config = new \\stdClass();\n $this->config->username = config('mailcamp.username');\n $this->config->token = config('mailcamp.token');\n $this->config->endpoint = config('mailcamp.endpoint');\n }", "public function testInvalidConfig(): void\n {\n $result = $this->check->run('Books', [ 'icon_bad_values' => ['cube'], 'display_field_bad_values' => [\"title2\"] ]);\n $result = $this->check->getErrors();\n\n $this->assertTrue(is_array($result), \"getErrors() returned a non-array result\");\n $this->assertContains('[Books][config] parse : [/table/icon]: Matched a schema which it should not', $result);\n $this->assertContains('[Books][config] parse : [/table/display_field]: Matched a schema which it should not', $result);\n }", "function instance_allow_config() {\n return true;\n }", "private function _passed_config_test() {\n\t\tif ( ! is_subclass_of( $this, 'SN_Type_Base' ) )\n\t\t\treturn false;\n\n\t\t$errors = array();\n\t\t$required_properties = array(\n\t\t\t'post_type' => $this->post_type,\n\t\t\t'post_type_title' => $this->post_type_title,\n\t\t\t'post_type_single' => $this->post_type_single,\n\t\t);\n\n\t\tforeach ( $required_properties as $property_name => $property ) {\n\t\t\tif ( is_null( $property ) )\n\t\t\t\t$errors[] = \"Property {$property_name} has not been set in your sub-class.\\n\";\n\t\t} // foreach()\n\n\t\tif ( empty( $errors ) ) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\tforeach ( $errors as $error )\n\t\t\t\techo esc_html( $error );\n\t\t} // if/each()\n\n\t\treturn false;\n\t}", "public function canWriteConfiguration() {}", "private function checkConfiguration()\n {\n if (!isset($this->getConf()->{'privatedir'})) {\n // @codeCoverageIgnoreStart\n throw new \\Exception('Empty privatedir');\n // @codeCoverageIgnoreEnd\n }\n }", "protected function setUpConfigurationData() {}", "public function instance_allow_config() {\n return true;\n }", "public function hasConfig() {\n\t\treturn (bool)@file_exists($this->fullModulePath.'/config.ini');\n\t}", "public function hasConfig(string $key): bool;", "public function checkConfig() : void\n {\n $ref = new \\ReflectionClass($this);\n $interfaces = $ref->getInterfaces();\n $errors = array();\n foreach($interfaces as $name => $i) {\n if ($name == 'KS\\ConfigInterface') continue;\n $methods = $i->getMethods();\n foreach($methods as $m) {\n $m = $m->getName();\n if (substr($m,0,3) == 'get' && strlen($m) > 3) {\n try {\n $this->$m();\n } catch (InvalidConfigException $e) {\n $errors[] = \"Interface $name: {$e->getMessage()}\";\n }\n }\n }\n }\n\n if (count($errors) > 0) {\n $e = new InvalidConfigException(\"Your configuration is incomplete:\\n\\n \".implode(\"\\n \", $errors));\n foreach ($errors as $err) {\n $e->addConfigError($err);\n }\n throw $e;\n }\n }", "public function testSpecifiedConfig(): void\n {\n $process = $this->phpbench('run --verbose --config=env/config_valid/phpbench.json');\n $this->assertExitCode(0, $process);\n $this->assertStringContainsString('Subjects', $process->getErrorOutput());\n }", "public function is_running_config() {\n\t\treturn isset( $this->config ) && count( $this->config ) > count( self::$must_have_plugins );\n\t}", "public function checkSettings()\n\t{\n\t\tif (Configuration::get('STRIPE_MODE'))\n\t\t\treturn Configuration::get('STRIPE_PUBLIC_KEY_LIVE') != '' && Configuration::get('STRIPE_PRIVATE_KEY_LIVE') != '';\n\t\telse\n\t\t\treturn Configuration::get('STRIPE_PUBLIC_KEY_TEST') != '' && Configuration::get('STRIPE_PRIVATE_KEY_TEST') != '';\n\t}", "function check() {\n global $db;\n if (!isset($this->_check)) {\n $check_query = $db->Execute(\"select configuration_value from \" . TABLE_CONFIGURATION . \" where configuration_key = 'MODULE_PAYMENT_PAYMENTECH_STATUS'\");\n $this->_check = $check_query->RecordCount();\n }\n return $this->_check;\n }", "function configEnabled() { global $db;\n global $lang;\n\n $dbtst = $db->query(\"SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = '\".$lang[\"config_db_name\"].\"'\");\n if($dbtst->num_rows == 0) {\n $prepReturn = prepConfig();\n if ($prepReturn == \"Ready\"){\n return true;\n } else {\n return $prepReturn;\n }\n } else {\n return true;\n }\n }", "function instance_allow_config() {\n //allow instances to have their own configuration\n return false;\n }", "public function validate_config_on_load($host_obj)\n\t\t{\n\t\t}", "public function validate_config_on_load($host_obj)\n\t\t{\n\t\t}", "public function isValidConfigFile($file);", "function conditional_config($config_key) {\n\tif(!chevereto_config($config_key)) {\n\t\treturn false;\n\t} else {\n\t\treturn true;\n\t}\n}", "public function getConfigurationValues() {}", "public function getConfigurationValues() {}", "public function getConfigurationValues() {}", "public function getConfigurationValues() {}", "public function parseConfig()\n {\n $fileContents = file_get_contents($this->filename);\n if (!$fileContents) {\n $this->error = 'Failed to read file contents';\n\n return false;\n }\n\n $config = json_decode($fileContents, true);\n if (json_last_error()) {\n $this->error = json_last_error_msg();\n\n return false;\n }\n\n $this->config = new Data(array_replace_recursive($config, $this->overrides));\n\n return true;\n }", "protected function getConfiguration() {}", "public function configurationIsCached();", "public function check_setting()\n\t{\n\t\tif ($this->db->count_all('setting') == 0) {\n\t\t\t$this->db->insert('setting',[\n\t\t\t\t'title' => 'bdtask Treading System',\n\t\t\t\t'description' => '123/A, Street, State-12345, Demo',\n\t\t\t\t'time_zone' => 'Asia/Dhaka',\n\t\t\t\t'footer_text' => '2018&copy;Copyright',\n\t\t\t]);\n\n\t\t}\n\n\t}", "public function readConfigurationValues();", "function check() {\n if (!isset($this->_check)) {\n $check_query = tep_db_query(\"select configuration_value from \" . TABLE_CONFIGURATION . \" where configuration_key = 'MODULE_PAYMENT_PAYPAL_DIRECT_3D_STATUS'\");\n $this->_check = tep_db_num_rows($check_query);\n }\n return $this->_check;\n }", "function check() {\n if (! isset($this->_check)) {\n $check_query = tep_db_query(\"select configuration_value from \" . TABLE_CONFIGURATION . \" where configuration_key = 'MODULE_PAYMENT_CGP_\" . $this->module_cgp_text . \"_STATUS'\");\n $this->_check = tep_db_num_rows($check_query);\n }\n return $this->_check;\n }", "public function isValid($data)\n {\n if (!parent::isValid($data)) {\n return false;\n }\n\n $sourceKey = 'source' . $data['config']['sourceType'];\n if (empty($data['config'][$sourceKey])) {\n $this->getElement($sourceKey)->addError(\n \"You must enter a \" . $this->getElement($sourceKey)->getLabel() . \".\"\n );\n return false;\n }\n return true;\n }", "public function validateConfig() {\n // Validate the site has default content configuration.\n if (empty($this->defaultContentConfig)) {\n throw new \\Exception(\"No default content configuration exists for current site.\");\n }\n\n // Validate the configuration specifies a valid path.\n if (isset($this->defaultContentConfig['path']) && !is_dir($this->defaultContentConfig['path'])) {\n throw new \\Exception(\"Configured default content path is not a valid directory. Check the site's configuration.\");\n }\n\n // Validate that default entities to export are given.\n if (empty($this->defaultContentConfig['default-entities']) || !is_array($this->defaultContentConfig['default-entities'])) {\n throw new \\Exception(\"Default entities are not properly configured. Ensure entity types are listed.\");\n }\n\n // Validate a proper default_author value is passed.\n if (isset($this->defaultContentConfig['default_author']) && $this->defaultContentConfig['default_author'] != self::DEFAULT_AUTHOR_PRESERVE) {\n if (!is_numeric($this->defaultContentConfig['default_author'])) {\n throw new \\Exception(\"Assigned default_author value is not an integer. Assign to a valid UID.\");\n }\n }\n }", "public function testValidateConfiguration()\n\t{\n\t\t$method = $this->setAccessibleMethod('validateConfig');\n\n\t\t$results = $method->invoke($this->dbConfiguration->newInstance([\n\t\t\t'default' => 'default',\n\t\t\t'connections' => [\n\t\t\t\t'default' => [\n\t\t\t\t\t'hostname' => 'localhost',\n\t\t\t\t\t'driver' => 'mysql',\n\t\t\t\t\t'database' => 'database'\n\t\t\t\t]\n\t\t\t]\n\t\t]));\n\n\t\t$this->assertSame(null, $results);\n\t}", "private function isConfigured() : bool\n {\n if (!is_readable($this->settings['sp_key_file'])) {\n return false;\n }\n if (!is_readable($this->settings['sp_cert_file'])) {\n return false;\n }\n $key = file_get_contents($this->settings['sp_key_file']);\n if (!openssl_get_privatekey($key)) {\n return false;\n }\n $cert = file_get_contents($this->settings['sp_cert_file']);\n if (!openssl_get_publickey($cert)) {\n return false;\n }\n if (!SignatureUtils::certDNEquals($cert, $this->settings)) {\n return false;\n }\n return true;\n }", "public function getConfiguration();", "public function getConfiguration();", "public function getConfiguration();", "public function configFileExists() {\n $_fileName = \\Config::get('fontello::config.file');\n $_folderName = \\Config::get('fontello::config.folder');\n if (\\File::exists($_folderName . $_fileName)) {\n $this->_configFile = $_folderName . $_fileName;\n return true;\n }\n return false;\n }" ]
[ "0.8522281", "0.7721374", "0.7414345", "0.7411104", "0.7384851", "0.7359051", "0.7359051", "0.7248139", "0.7194977", "0.71415055", "0.7057584", "0.69108814", "0.6890064", "0.6869496", "0.6743789", "0.6737687", "0.6712126", "0.6706744", "0.66644657", "0.66509163", "0.6637919", "0.661576", "0.65988505", "0.6551133", "0.6540751", "0.65323853", "0.65071076", "0.6501283", "0.6446572", "0.6446572", "0.64463395", "0.6437885", "0.6429511", "0.6425725", "0.64240426", "0.64176947", "0.64171064", "0.640984", "0.640984", "0.6404178", "0.6396053", "0.6391222", "0.6379851", "0.6375389", "0.63667035", "0.63541144", "0.6348965", "0.634078", "0.63231623", "0.63154405", "0.63154405", "0.62625283", "0.6228869", "0.62196386", "0.6191878", "0.61891186", "0.6185816", "0.615874", "0.6154356", "0.6150174", "0.61468285", "0.61429745", "0.61406624", "0.6128754", "0.61163956", "0.61143434", "0.60789293", "0.60783", "0.60712004", "0.6061628", "0.60580736", "0.605493", "0.6054189", "0.6025034", "0.6022908", "0.6022366", "0.6016634", "0.60154825", "0.60154825", "0.60020745", "0.59963185", "0.5982439", "0.5981149", "0.5981149", "0.5981149", "0.5980934", "0.59801894", "0.59509796", "0.59458923", "0.5938984", "0.5933017", "0.5922348", "0.59221745", "0.59214216", "0.59204906", "0.59177244", "0.59170204", "0.59170204", "0.59170204", "0.59127784" ]
0.71149665
10
Create a new controller instance.
public function __construct() { $this->middleware('auth')->except(['show', 'members']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createController()\n {\n $this->createClass('controller');\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->getNameInput()));\n\n $modelName = $this->qualifyClass('Models/'.$this->getNameInput());\n\n $this->call('make:controller', array_filter([\n 'name' => \"{$controller}Controller\",\n '--model' => $modelName,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n $model_name = $this->qualifyClass($this->getNameInput());\n $name = Str::contains($model_name, ['\\\\']) ? Str::afterLast($model_name, '\\\\') : $model_name;\n\n $this->call('make:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $model_name,\n ]);\n\n $path = base_path() . \"/app/Http/Controllers/{$controller}Controller.php\";\n $this->cleanupDummy($path, $name);\n }", "private function makeInitiatedController()\n\t{\n\t\t$controller = new TestEntityCRUDController();\n\n\t\t$controller->setLoggerWrapper(Logger::create());\n\n\t\treturn $controller;\n\t}", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n ]));\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"Api/{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $name = str_replace(\"Service\",\"\",$this->argument('name'));\n\n $this->call('make:controller', [\n 'name' => \"{$name}Controller\"\n ]);\n }", "protected function createController()\n {\n $params = [\n 'name' => $this->argument('name'),\n ];\n\n if ($this->option('api')) {\n $params['--api'] = true;\n }\n\n $this->call('wizard:controller', $params);\n }", "public function generateController () {\r\n $controllerParam = \\app\\lib\\router::getPath();\r\n $controllerName = \"app\\controller\\\\\" . end($controllerParam);\r\n $this->controller = new $controllerName;\r\n }", "public static function newController($controller)\n\t{\n\t\t$objController = \"App\\\\Controllers\\\\\".$controller;\n\t\treturn new $objController;\n\t}", "public function createController()\n\t{\n\t\tif(class_exists($this->controller))\n\t\t{\n\t\t\t// get the parent class he extends\n\t\t\t$parents = class_parents($this->controller);\n\n\t\t\t// $parents = class_implements($this->controller); used if our Controller was just an interface not a class\n\n\t\t\t// check if the class implements our Controller Class\n\t\t\tif(in_array(\"Controller\", $parents))\n\t\t\t{\n\t\t\t\t// check if the action in the request exists in that class\n\t\t\t\tif(method_exists($this->controller, $this->action))\n\t\t\t\t{\n\t\t\t\t\treturn new $this->controller($this->action, $this->request);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Action is not exist\n\t\t\t\t\techo 'Method '. $this->action .' doesn\\'t exist in '. $this->controller;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// The controller doesn't extends our Controller Class\n\t\t\t\techo $this->controller.' doesn\\'t extends our Controller Class';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Controller Doesn't exist\n\t\t\techo $this->controller.' doesn\\'t exist';\n\t\t}\n\t}", "public function createController( ezcMvcRequest $request );", "public function createController() {\n //check our requested controller's class file exists and require it if so\n /*if (file_exists(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\")) {\n require(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\");\n } else {\n throw new Exception('Route does not exist');\n }*/\n\n try {\n require_once __DIR__ . '/../Controllers/' . $this->controllerName . '.php';\n } catch (Exception $e) {\n return $e;\n }\n \n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n \n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\",$parents)) { \n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->endpoint)) {\n return new $this->controllerClass($this->args, $this->endpoint, $this->domain);\n } else {\n throw new Exception('Action does not exist');\n }\n } else {\n throw new Exception('Class does not inherit correctly.');\n }\n } else {\n throw new Exception('Controller does not exist.');\n }\n }", "public static function create()\n\t{\n\t\t//check, if a JobController instance already exists\n\t\tif(JobController::$jobController == null)\n\t\t{\n\t\t\tJobController::$jobController = new JobController();\n\t\t}\n\n\t\treturn JobController::$jobController;\n\t}", "private function controller()\n {\n $location = $this->args[\"location\"] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n $relative_location = $this->args['application_folder'] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n\n if (!empty($this->args['subdirectories']))\n {\n $location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n $relative_location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n }\n\n if (!is_dir($location))\n {\n mkdir($location, 0755, TRUE);\n }\n\n $relative_location .= $this->args['filename'];\n $filename = $location . $this->args['filename'];\n\n $args = array(\n \"class_name\" => ApplicationHelpers::camelize($this->args['name']),\n \"filename\" => $this->args['filename'],\n \"application_folder\" => $this->args['application_folder'],\n \"parent_class\" => (isset($this->args['parent'])) ? $this->args['parent'] : $this->args['parent_controller'],\n \"extra\" => $this->extra,\n 'relative_location' => $relative_location,\n 'helper_name' => strtolower($this->args['name']) . '_helper',\n );\n\n $template = new TemplateScanner(\"controller\", $args);\n $controller = $template->parse();\n\n $message = \"\\t\";\n if (file_exists($filename))\n {\n $message .= 'Controller already exists : ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'light_blue');\n }\n $message .= $relative_location;\n }\n elseif (file_put_contents($filename, $controller))\n {\n $message .= 'Created controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'green');\n }\n $message .= $relative_location;\n }\n else\n {\n $message .= 'Unable to create controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'red');\n }\n $message .= $relative_location;\n }\n\n // The controller has been generated, output the confirmation message\n fwrite(STDOUT, $message . PHP_EOL);\n\n // Create the helper files.\n $this->helpers();\n\n $this->assets();\n\n // Create the view files.\n $this->views();\n\n return;\n }", "public function createController( $controllerName ) {\r\n\t\t$refController \t\t= $this->instanceOfController( $controllerName );\r\n\t\t$refConstructor \t= $refController->getConstructor();\r\n\t\tif ( ! $refConstructor ) return $refController->newInstance();\r\n\t\t$initParameter \t\t= $this->setParameter( $refConstructor );\r\n\t\treturn $refController->newInstanceArgs( $initParameter ); \r\n\t}", "public function create($controllerName) {\r\n\t\tif (!$controllerName)\r\n\t\t\t$controllerName = $this->defaultController;\r\n\r\n\t\t$controllerName = ucfirst(strtolower($controllerName)).'Controller';\r\n\t\t$controllerFilename = $this->searchDir.'/'.$controllerName.'.php';\r\n\r\n\t\tif (preg_match('/[^a-zA-Z0-9]/', $controllerName))\r\n\t\t\tthrow new Exception('Invalid controller name', 404);\r\n\r\n\t\tif (!file_exists($controllerFilename)) {\r\n\t\t\tthrow new Exception('Controller not found \"'.$controllerName.'\"', 404);\r\n\t\t}\r\n\r\n\t\trequire_once $controllerFilename;\r\n\r\n\t\tif (!class_exists($controllerName) || !is_subclass_of($controllerName, 'Controller'))\r\n\t\t\tthrow new Exception('Unknown controller \"'.$controllerName.'\"', 404);\r\n\r\n\t\t$this->controller = new $controllerName();\r\n\t\treturn $this;\r\n\t}", "private function createController($controllerName)\n {\n $className = ucfirst($controllerName) . 'Controller';\n ${$this->lcf($controllerName) . 'Controller'} = new $className();\n return ${$this->lcf($controllerName) . 'Controller'};\n }", "public function createControllerObject(string $controller)\n {\n $this->checkControllerExists($controller);\n $controller = $this->ctlrStrSrc.$controller;\n $controller = new $controller();\n return $controller;\n }", "public function create_controller($controller, $action){\n\t $creado = false;\n\t\t$controllers_dir = Kumbia::$active_controllers_dir;\n\t\t$file = strtolower($controller).\"_controller.php\";\n\t\tif(file_exists(\"$controllers_dir/$file\")){\n\t\t\tFlash::error(\"Error: El controlador '$controller' ya existe\\n\");\n\t\t} else {\n\t\t\tif($this->post(\"kind\")==\"applicationcontroller\"){\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends ApplicationController {\\n\\n\\t\\tfunction $action(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tif(@file_put_contents(\"$controllers_dir/$file\", $filec)){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends StandardForm {\\n\\n\\t\\tpublic \\$scaffold = true;\\n\\n\\t\\tpublic function __construct(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tfile_put_contents(\"$controllers_dir/$file\", $filec);\n\t\t\t\tif($this->create_model($controller, $controller, \"index\")){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($creado){\n\t\t\t Flash::success(\"Se cre&oacute; correctamente el controlador '$controller' en '$controllers_dir/$file'\");\n\t\t\t}else {\n\t\t\t Flash::error(\"Error: No se pudo escribir en el directorio, verifique los permisos sobre el directorio\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t$this->route_to(\"controller: $controller\", \"action: $action\");\n\t}", "private function instanceController( string $controller_class ): Controller {\n\t\treturn new $controller_class( $this->request, $this->site );\n\t}", "public function makeController($controller_name)\n\t{\n\t\t$model\t= $this->_makeModel($controller_name, $this->_storage_type);\n\t\t$view\t= $this->_makeView($controller_name);\n\t\t\n\t\treturn new $controller_name($model, $view);\n\t}", "public function create()\n {\n $output = new \\Symfony\\Component\\Console\\Output\\ConsoleOutput();\n $output->writeln(\"<info>Controller Create</info>\");\n }", "protected function createDefaultController() {\n Octopus::requireOnce($this->app->getOption('OCTOPUS_DIR') . 'controllers/Default.php');\n return new DefaultController();\n }", "private function createControllerDefinition()\n {\n $id = $this->getServiceId('controller');\n if (!$this->container->has($id)) {\n $definition = new Definition($this->getServiceClass('controller'));\n $definition\n ->addMethodCall('setConfiguration', [new Reference($this->getServiceId('configuration'))])\n ->addMethodCall('setContainer', [new Reference('service_container')])\n ;\n $this->container->setDefinition($id, $definition);\n }\n }", "public function createController( $ctrlName, $action ) {\n $args['action'] = $action;\n $args['path'] = $this->path . '/modules/' . $ctrlName;\n $ctrlFile = $args['path'] . '/Controller.php';\n // $args['moduleName'] = $ctrlName;\n if ( file_exists( $ctrlFile ) ) {\n $ctrlPath = str_replace( CITRUS_PATH, '', $args['path'] );\n $ctrlPath = str_replace( '/', '\\\\', $ctrlPath ) . '\\Controller';\n try { \n $r = new \\ReflectionClass( $ctrlPath ); \n $inst = $r->newInstanceArgs( $args ? $args : array() );\n\n $this->controller = Citrus::apply( $inst, Array( \n 'name' => $ctrlName, \n ) );\n if ( $this->controller->is_protected == null ) {\n $this->controller->is_protected = $this->is_protected;\n }\n return $this->controller;\n } catch ( \\Exception $e ) {\n prr($e, true);\n }\n } else {\n return false;\n }\n }", "protected function createTestController() {\n\t\t$controller = new CController('test');\n\n\t\t$action = $this->getMock('CAction', array('run'), array($controller, 'test'));\n\t\t$controller->action = $action;\n\n\t\tYii::app()->controller = $controller;\n\t\treturn $controller;\n\t}", "public static function newController($controllerName, $params = [], $request = null) {\n\n\t\t$controller = \"App\\\\Controllers\\\\\".$controllerName;\n\n\t\treturn new $controller($params, $request);\n\n\t}", "private function loadController() : void\n\t{\n\t\t$this->controller = new $this->controllerName($this->request);\n\t}", "public function createController($pi, array $params)\n {\n $class = $pi . '_Controller_' . ucfirst($params['page']);\n\n return new $class();\n }", "public function createController() {\n //check our requested controller's class file exists and require it if so\n \n if (file_exists(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\" ) && $this->controllerName != 'error') {\n require(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\");\n \n } else {\n \n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n\n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\", $parents)) {\n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->action)) { \n return new $this->controllerClass($this->action, $this->urlValues);\n \n } else {\n //bad action/method error\n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badview\", $this->urlValues);\n }\n } else {\n $this->urlValues['controller'] = \"error\";\n //bad controller error\n echo \"hjh\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"b\", $this->urlValues);\n }\n } else {\n \n //bad controller error\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n }", "protected static function createController($name) {\n $result = null;\n\n $name = self::$_namespace . ($name ? $name : self::$defaultController) . 'Controller';\n if(class_exists($name)) {\n $controllerClass = new \\ReflectionClass($name);\n if($controllerClass->hasMethod('run')) {\n $result = new $name();\n }\n }\n\n return $result;\n }", "public function createController(): void\n {\n $minimum_buffer_min = 3;\n $token_ok = $this->routerService->ds_token_ok($minimum_buffer_min);\n if ($token_ok) {\n # 2. Call the worker method\n # More data validation would be a good idea here\n # Strip anything other than characters listed\n $results = $this->worker($this->args);\n\n if ($results) {\n # Redirect the user to the NDSE view\n # Don't use an iFrame!\n # State can be stored/recovered using the framework's session or a\n # query parameter on the returnUrl\n header('Location: ' . $results[\"redirect_url\"]);\n exit;\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "protected function createController($controllerClass)\n {\n $cls = new ReflectionClass($controllerClass);\n return $cls->newInstance($this->environment);\n }", "protected function createController($name)\n {\n $controllerClass = 'controller\\\\'.ucfirst($name).'Controller';\n\n if(!class_exists($controllerClass)) {\n throw new \\Exception('Controller class '.$controllerClass.' not exists!');\n }\n\n return new $controllerClass();\n }", "protected function initController() {\n\t\tif (!isset($_GET['controller'])) {\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$controllerClass = $_GET['controller'].\"Controller\";\n\t\tif (!class_exists($controllerClass)) {\n\t\t\t//Console::error(@$_GET['controller'].\" doesn't exist\");\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$this->controller = new $controllerClass();\n\t}", "public function makeTestController(TestController $controller)\r\n\t{\r\n\t}", "static function factory($GET=array(), $POST=array(), $FILES=array()) {\n $type = (isset($GET['type'])) ? $GET['type'] : '';\n $objectController = $type.'_Controller';\n $addLocation = $type.'/'.$objectController.'.php';\n foreach ($_ENV['locations'] as $location) {\n if (is_file($location.$addLocation)) {\n return new $objectController($GET, $POST, $FILES);\n } \n }\n throw new Exception('The controller \"'.$type.'\" does not exist.');\n }", "public function create()\n {\n $general = new ModeloController();\n\n return $general->create();\n }", "public function makeController($controllerNamespace, $controllerName, Log $log, $session, Request $request, Response $response)\r\n\t{\r\n\t\t$fullControllerName = '\\\\Application\\\\Controller\\\\' . (!empty($controllerNamespace) ? $controllerNamespace . '\\\\' : '') . $controllerName;\r\n\t\t$controller = new $fullControllerName();\r\n\t\t$controller->setConfig($this->config);\r\n\t\t$controller->setRequest($request);\r\n\t\t$controller->setResponse($response);\r\n\t\t$controller->setLog($log);\r\n\t\tif (isset($session))\r\n\t\t{\r\n\t\t\t$controller->setSession($session);\r\n\t\t}\r\n\r\n\t\t// Execute additional factory method, if available (exists in \\Application\\Controller\\Factory)\r\n\t\t$method = 'make' . $controllerName;\r\n\t\tif (is_callable(array($this, $method)))\r\n\t\t{\r\n\t\t\t$this->$method($controller);\r\n\t\t}\r\n\r\n\t\t// If the controller has an init() method, call it now\r\n\t\tif (is_callable(array($controller, 'init')))\r\n\t\t{\r\n\t\t\t$controller->init();\r\n\t\t}\r\n\r\n\t\treturn $controller;\r\n\t}", "public static function create()\n\t{\n\t\t//check, if an AccessGroupController instance already exists\n\t\tif(AccessGroupController::$accessGroupController == null)\n\t\t{\n\t\t\tAccessGroupController::$accessGroupController = new AccessGroupController();\n\t\t}\n\n\t\treturn AccessGroupController::$accessGroupController;\n\t}", "public static function buildController()\n\t{\n\t\t$file = CONTROLLER_PATH . 'indexController.class.php';\n\n\t\tif(!file_exists($file))\n\t\t{\n\t\t\tif(\\RCPHP\\Util\\Check::isClient())\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \"Welcome RcPHP!\\n\";\n }\n}';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \\'<style type=\"text/css\">*{ padding: 0; margin: 0; } div{ padding: 4px 48px;} body{ background: #fff; font-family: \"微软雅黑\"; color: #333;} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.8em; font-size: 36px }</style><div style=\"padding: 24px 48px;\"> <h1>:)</h1><p>Welcome <b>RcPHP</b>!</p></div>\\';\n }\n}';\n\t\t\t}\n\t\t\tfile_put_contents($file, $controller);\n\t\t}\n\t}", "public function getController( );", "public static function getInstance() : Controller {\n if ( null === self::$instance ) {\n self::$instance = new self();\n self::$instance->options = new Options(\n self::OPTIONS_KEY\n );\n }\n\n return self::$instance;\n }", "static function appCreateController($entityName, $prefijo = '') {\n\n $controller = ControllerBuilder::getController($entityName, $prefijo);\n $entityFile = ucfirst(str_replace($prefijo, \"\", $entityName));\n $fileController = \"../../modules/{$entityFile}/{$entityFile}Controller.class.php\";\n\n $result = array();\n $ok = self::createArchive($fileController, $controller);\n ($ok) ? array_push($result, \"Ok, {$fileController} created\") : array_push($result, \"ERROR creating {$fileController}\");\n\n return $result;\n }", "public static function newInstance($path = \\simpleChat\\Utility\\ROOT_PATH)\n {\n $request = new Request();\n \n \n if ($request->isAjax())\n {\n return new AjaxController();\n }\n else if ($request->jsCode())\n {\n return new JsController();\n }\n else\n {\n return new StandardController($path);\n }\n }", "private function createInstance()\n {\n $objectManager = new \\Magento\\Framework\\TestFramework\\Unit\\Helper\\ObjectManager($this);\n $this->controller = $objectManager->getObject(\n \\Magento\\NegotiableQuote\\Controller\\Adminhtml\\Quote\\RemoveFailedSku::class,\n [\n 'context' => $this->context,\n 'logger' => $this->logger,\n 'messageManager' => $this->messageManager,\n 'cart' => $this->cart,\n 'resultRawFactory' => $this->resultRawFactory\n ]\n );\n }", "function loadController(){\n $name = ucfirst($this->request->controller).'Controller' ;\n $file = ROOT.DS.'Controller'.DS.$name.'.php' ;\n /*if(!file_exists($file)){\n $this->error(\"Le controleur \".$this->request->controller.\" n'existe pas\") ;\n }*/\n require_once $file;\n $controller = new $name($this->request);\n return $controller ;\n }", "public function __construct(){\r\n $app = Application::getInstance();\r\n $this->_controller = $app->getController();\r\n }", "public static function & instance()\n {\n if (self::$instance === null) {\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Include the Controller file\n require Router::$controller_path;\n\n try {\n // Start validation of the controller\n $class = new ReflectionClass(ucfirst(Router::$controller).'_Controller');\n } catch (ReflectionException $e) {\n // Controller does not exist\n Event::run('system.404');\n }\n\n if ($class->isAbstract() or (IN_PRODUCTION and $class->getConstant('ALLOW_PRODUCTION') == false)) {\n // Controller is not allowed to run in production\n Event::run('system.404');\n }\n\n // Run system.pre_controller\n Event::run('system.pre_controller');\n\n // Create a new controller instance\n $controller = $class->newInstance();\n\n // Controller constructor has been executed\n Event::run('system.post_controller_constructor');\n\n try {\n // Load the controller method\n $method = $class->getMethod(Router::$method);\n\n // Method exists\n if (Router::$method[0] === '_') {\n // Do not allow access to hidden methods\n Event::run('system.404');\n }\n\n if ($method->isProtected() or $method->isPrivate()) {\n // Do not attempt to invoke protected methods\n throw new ReflectionException('protected controller method');\n }\n\n // Default arguments\n $arguments = Router::$arguments;\n } catch (ReflectionException $e) {\n // Use __call instead\n $method = $class->getMethod('__call');\n\n // Use arguments in __call format\n $arguments = array(Router::$method, Router::$arguments);\n }\n\n // Stop the controller setup benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Start the controller execution benchmark\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_execution');\n\n // Execute the controller method\n $method->invokeArgs($controller, $arguments);\n\n // Controller method has been executed\n Event::run('system.post_controller');\n\n // Stop the controller execution benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_execution');\n }\n\n return self::$instance;\n }", "protected function instantiateController($class)\n {\n $controller = new $class();\n\n if ($controller instanceof Controller) {\n $controller->setContainer($this->container);\n }\n\n return $controller;\n }", "public function __construct (){\n $this->AdminController = new AdminController();\n $this->ArticleController = new ArticleController();\n $this->AuditoriaController = new AuditoriaController();\n $this->CommentController = new CommentController();\n $this->CourseController = new CourseController();\n $this->InscriptionsController = new InscriptionsController();\n $this->ModuleController = new ModuleController();\n $this->PlanController = new PlanController();\n $this->ProfileController = new ProfileController();\n $this->SpecialtyController = new SpecialtyController();\n $this->SubscriptionController = new SubscriptionController();\n $this->TeacherController = new TeacherController();\n $this->UserController = new UserController();\n $this->WebinarController = new WebinarController();\n }", "protected function makeController($prefix)\n {\n new MakeController($this, $this->files, $prefix);\n }", "public function createController($route)\n {\n $controller = parent::createController('gymv/' . $route);\n return $controller === false\n ? parent::createController($route)\n : $controller;\n }", "public static function createFrontController()\n {\n return self::createInjectorWithBindings(self::extractArgs(func_get_args()))\n ->getInstance('net::stubbles::websites::stubFrontController');\n }", "public static function controller($name)\n {\n $name = ucfirst(strtolower($name));\n \n $directory = 'controller';\n $filename = $name;\n $tracker = 'controller';\n $init = (boolean) $init;\n $namespace = 'controller';\n $class_name = $name;\n \n return self::_load($directory, $filename, $tracker, $init, $namespace, $class_name);\n }", "protected static function instantiateMockController()\n {\n /** @var Event $oEvent */\n $oEvent = Factory::service('Event');\n\n if (!$oEvent->hasBeenTriggered(Events::SYSTEM_STARTING)) {\n\n require_once BASEPATH . 'core/Controller.php';\n\n load_class('Output', 'core');\n load_class('Security', 'core');\n load_class('Input', 'core');\n load_class('Lang', 'core');\n\n new NailsMockController();\n }\n }", "private static function controller()\n {\n $files = ['Controller'];\n $folder = static::$root.'MVC'.'/';\n\n self::call($files, $folder);\n }", "public function createController()\n\t{\n\t\t$originalFile = app_path('Http/Controllers/Reports/SampleReport.php');\n\t\t$newFile = dirname($originalFile) . DIRECTORY_SEPARATOR . $this->class . $this->sufix . '.php';\n\n\t\t// Read original file\n\t\tif( ! $content = file_get_contents($originalFile))\n\t\t\treturn false;\n\n\t\t// Replace class name\n\t\t$content = str_replace('SampleReport', $this->class . $this->sufix, $content);\n\n\t\t// Write new file\n\t\treturn (bool) file_put_contents($newFile, $content);\n\t}", "public function runController() {\n // Check for a router\n if (is_null($this->getRouter())) {\n \t // Set the method to load\n \t $sController = ucwords(\"{$this->getController()}Controller\");\n } else {\n\n // Set the controller with the router\n $sController = ucwords(\"{$this->getController()}\".ucfirst($this->getRouter()).\"Controller\");\n }\n \t// Check for class\n \tif (class_exists($sController, true)) {\n \t\t// Set a new instance of Page\n \t\t$this->setPage(new Page());\n \t\t// The class exists, load it\n \t\t$oController = new $sController();\n\t\t\t\t// Now check for the proper method \n\t\t\t\t// inside of the controller class\n\t\t\t\tif (method_exists($oController, $this->loadConfigVar('systemSettings', 'controllerLoadMethod'))) {\n\t\t\t\t\t// We have a valid controller, \n\t\t\t\t\t// execute the initializer\n\t\t\t\t\t$oController->init($this);\n\t\t\t\t\t// Set the variable scope\n\t \t\t$this->setViewScope($oController);\n\t \t\t// Render the layout\n\t \t\t$this->renderLayout();\n\t\t\t\t} else {\n\t\t\t\t\t// The initializer does not exist, \n\t\t\t\t\t// which means an invalid controller, \n\t\t\t\t\t// so now we let the caller know\n\t\t\t\t\t$this->setError($this->loadConfigVar('errorMessages', 'invalidController'));\n\t\t\t\t\t// Run the error\n\t\t\t\t\t// $this->runError();\n\t\t\t\t}\n \t// The class does not exist\n \t} else {\n\t\t\t\t// Set the system error\n\t \t\t$this->setError(\n\t\t\t\t\tstr_replace(\n\t\t\t\t\t\t':controllerName', \n\t\t\t\t\t\t$sController, \n\t\t\t\t\t\t$this->loadConfigVar(\n\t\t\t\t\t\t\t'errorMessages', \n\t\t\t\t\t\t\t'controllerDoesNotExist'\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n \t\t// Run the error\n\t\t\t\t// $this->runError();\n \t}\n \t// Return instance\n \treturn $this;\n }", "public function controller()\n\t{\n\t\n\t}", "protected function buildController()\n {\n $columns = collect($this->columns)->pluck('column')->implode('|');\n\n $permissions = [\n 'create:'.$this->module->createPermission->name,\n 'edit:'.$this->module->editPermission->name,\n 'delete:'.$this->module->deletePermission->name,\n ];\n\n $this->controller = [\n 'name' => $this->class,\n '--model' => $this->class,\n '--request' => $this->class.'Request',\n '--permissions' => implode('|', $permissions),\n '--view-folder' => snake_case($this->module->name),\n '--fields' => $columns,\n '--module' => $this->module->id,\n ];\n }", "function getController(){\n\treturn getFactory()->getBean( 'Controller' );\n}", "protected function getController()\n {\n $uri = WingedLib::clearPath(static::$parentUri);\n if (!$uri) {\n $uri = './';\n $explodedUri = ['index', 'index'];\n } else {\n $explodedUri = explode('/', $uri);\n if (count($explodedUri) == 1) {\n $uri = './' . $explodedUri[0] . '/';\n } else {\n $uri = './' . $explodedUri[0] . '/' . $explodedUri[1] . '/';\n }\n }\n\n $indexUri = WingedLib::clearPath(\\WingedConfig::$config->INDEX_ALIAS_URI);\n if ($indexUri) {\n $indexUri = explode('/', $indexUri);\n }\n\n if ($indexUri) {\n if ($explodedUri[0] === 'index' && isset($indexUri[0])) {\n static::$controllerName = Formater::camelCaseClass($indexUri[0]) . 'Controller';\n $uri = './' . $indexUri[0] . '/';\n }\n if (isset($explodedUri[1]) && isset($indexUri[1])) {\n if ($explodedUri[1] === 'index') {\n static::$controllerAction = 'action' . Formater::camelCaseMethod($indexUri[1]);\n $uri .= $indexUri[1] . '/';\n }\n } else {\n $uri .= 'index/';\n }\n }\n\n $controllerDirectory = new Directory(static::$parent . 'controllers/', false);\n if ($controllerDirectory->exists()) {\n $controllerFile = new File($controllerDirectory->folder . static::$controllerName . '.php', false);\n if ($controllerFile->exists()) {\n include_once $controllerFile->file_path;\n if (class_exists(static::$controllerName)) {\n $controller = new static::$controllerName();\n if (method_exists($controller, static::$controllerAction)) {\n try {\n $reflectionMethod = new \\ReflectionMethod(static::$controllerName, static::$controllerAction);\n $pararms = [];\n foreach ($reflectionMethod->getParameters() as $parameter) {\n $pararms[$parameter->getName()] = $parameter->isOptional();\n }\n } catch (\\Exception $exception) {\n $pararms = [];\n }\n return [\n 'uri' => $uri,\n 'params' => $pararms,\n ];\n }\n }\n }\n }\n return false;\n }", "public function __construct()\n {\n $this->controller = new DHTController();\n }", "public function createController($controllers) {\n\t\tforeach($controllers as $module=>$controllers) {\n\t\t\tforeach($controllers as $key=>$controller) {\n\t\t\t\tif(!file_exists(APPLICATION_PATH.\"/modules/$module/controllers/\".ucfirst($controller).\"Controller.php\")) {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",\"Create '\".ucfirst($controller).\"' controller in $module\");\t\t\t\t\n\t\t\t\t\texec(\"zf create controller $controller index-action-included=0 $module\");\t\t\t\t\t\n\t\t\t\t}\telse {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",ucfirst($controller).\"' controller in $module already exists\");\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t}", "protected function instantiateController($class)\n {\n return new $class($this->routesMaker);\n }", "private function createController($table){\n\n // Filtering file name\n $fileName = $this::cleanToName($table[\"name\"]) . 'Controller.php';\n\n // Prepare the Class scheme inside the controller\n $contents = '<?php '.$fileName.' ?>';\n\n\n // Return a boolean to process completed\n return Storage::disk('controllers')->put($this->appNamePath.'/'.$fileName, $contents);\n\n }", "public function GetController()\n\t{\n\t\t$params = $this->QueryVarArrayToParameterArray($_GET);\n\t\tif (!empty($_POST)) {\n\t\t\t$params = array_merge($params, $this->QueryVarArrayToParameterArray($_POST));\n\t\t}\n\n\t\tif (!empty($_GET['q'])) {\n\t\t\t$restparams = GitPHP_Router::ReadCleanUrl($_SERVER['REQUEST_URI']);\n\t\t\tif (count($restparams) > 0)\n\t\t\t\t$params = array_merge($params, $restparams);\n\t\t}\n\n\t\t$controller = null;\n\n\t\t$action = null;\n\t\tif (!empty($params['action']))\n\t\t\t$action = $params['action'];\n\n\t\tswitch ($action) {\n\n\n\t\t\tcase 'search':\n\t\t\t\t$controller = new GitPHP_Controller_Search();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commitdiff':\n\t\t\tcase 'commitdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Commitdiff();\n\t\t\t\tif ($action === 'commitdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blobdiff':\n\t\t\tcase 'blobdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Blobdiff();\n\t\t\t\tif ($action === 'blobdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'history':\n\t\t\t\t$controller = new GitPHP_Controller_History();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'shortlog':\n\t\t\tcase 'log':\n\t\t\t\t$controller = new GitPHP_Controller_Log();\n\t\t\t\tif ($action === 'shortlog')\n\t\t\t\t\t$controller->SetParam('short', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'snapshot':\n\t\t\t\t$controller = new GitPHP_Controller_Snapshot();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tree':\n\t\t\tcase 'trees':\n\t\t\t\t$controller = new GitPHP_Controller_Tree();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tags':\n\t\t\t\tif (empty($params['tag'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Tags();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tcase 'tag':\n\t\t\t\t$controller = new GitPHP_Controller_Tag();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'heads':\n\t\t\t\t$controller = new GitPHP_Controller_Heads();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blame':\n\t\t\t\t$controller = new GitPHP_Controller_Blame();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blob':\n\t\t\tcase 'blobs':\n\t\t\tcase 'blob_plain':\t\n\t\t\t\t$controller = new GitPHP_Controller_Blob();\n\t\t\t\tif ($action === 'blob_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'atom':\n\t\t\tcase 'rss':\n\t\t\t\t$controller = new GitPHP_Controller_Feed();\n\t\t\t\tif ($action == 'rss')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::RssFormat);\n\t\t\t\telse if ($action == 'atom')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::AtomFormat);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commit':\n\t\t\tcase 'commits':\n\t\t\t\t$controller = new GitPHP_Controller_Commit();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'summary':\n\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'project_index':\n\t\t\tcase 'projectindex':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('txt', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'opml':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('opml', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'login':\n\t\t\t\t$controller = new GitPHP_Controller_Login();\n\t\t\t\tif (!empty($_POST['username']))\n\t\t\t\t\t$controller->SetParam('username', $_POST['username']);\n\t\t\t\tif (!empty($_POST['password']))\n\t\t\t\t\t$controller->SetParam('password', $_POST['password']);\n\t\t\t\tbreak;\n\n\t\t\tcase 'logout':\n\t\t\t\t$controller = new GitPHP_Controller_Logout();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'graph':\n\t\t\tcase 'graphs':\n\t\t\t\t//$controller = new GitPHP_Controller_Graph();\n\t\t\t\t//break;\n\t\t\tcase 'graphdata':\n\t\t\t\t//$controller = new GitPHP_Controller_GraphData();\n\t\t\t\t//break;\n\t\t\tdefault:\n\t\t\t\tif (!empty($params['project'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\t} else {\n\t\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t}\n\t\t}\n\n\t\tforeach ($params as $paramname => $paramval) {\n\t\t\tif ($paramname !== 'action')\n\t\t\t\t$controller->SetParam($paramname, $paramval);\n\t\t}\n\n\t\t$controller->SetRouter($this);\n\n\t\treturn $controller;\n\t}", "public function testCreateTheControllerClass()\n {\n $controller = new Game21Controller();\n $this->assertInstanceOf(\"\\App\\Http\\Controllers\\Game21Controller\", $controller);\n }", "public static function createController( MShop_Context_Item_Interface $context, $name = null );", "public function __construct()\n {\n\n $url = $this->splitURL();\n // echo $url[0];\n\n // check class file exists\n if (file_exists(\"../app/controllers/\" . strtolower($url[0]) . \".php\")) {\n $this->controller = strtolower($url[0]);\n unset($url[0]);\n }\n\n // echo $this->controller;\n\n require \"../app/controllers/\" . $this->controller . \".php\";\n\n // create Instance(object)\n $this->controller = new $this->controller(); // $this->controller is an object from now on\n if (isset($url[1])) {\n if (method_exists($this->controller, $url[1])) {\n $this->method = $url[1];\n unset($url[1]);\n }\n }\n\n // run the class and method\n $this->params = array_values($url); // array_values 값들인 인자 0 부터 다시 배치\n call_user_func_array([$this->controller, $this->method], $this->params);\n }", "public function getController();", "public function getController();", "public function getController();", "public function createController($pageType, $template)\n {\n $controller = null;\n\n // Use factories first\n if (isset($this->controllerFactories[$pageType])) {\n $callable = $this->controllerFactories[$pageType];\n $controller = $callable($this, 'templates/'.$template);\n\n if ($controller) {\n return $controller;\n }\n }\n\n // See if a default controller exists in the theme namespace\n $class = null;\n if ($pageType == 'posts') {\n $class = $this->namespace.'\\\\Controllers\\\\PostsController';\n } elseif ($pageType == 'post') {\n $class = $this->namespace.'\\\\Controllers\\\\PostController';\n } elseif ($pageType == 'page') {\n $class = $this->namespace.'\\\\Controllers\\\\PageController';\n } elseif ($pageType == 'term') {\n $class = $this->namespace.'\\\\Controllers\\\\TermController';\n }\n\n if (class_exists($class)) {\n $controller = new $class($this, 'templates/'.$template);\n\n return $controller;\n }\n\n // Create a default controller from the stem namespace\n if ($pageType == 'posts') {\n $controller = new PostsController($this, 'templates/'.$template);\n } elseif ($pageType == 'post') {\n $controller = new PostController($this, 'templates/'.$template);\n } elseif ($pageType == 'page') {\n $controller = new PageController($this, 'templates/'.$template);\n } elseif ($pageType == 'search') {\n $controller = new SearchController($this, 'templates/'.$template);\n } elseif ($pageType == 'term') {\n $controller = new TermController($this, 'templates/'.$template);\n }\n\n return $controller;\n }", "private function loadController($controller)\r\n {\r\n $className = $controller.'Controller';\r\n \r\n $class = new $className($this);\r\n \r\n $class->init();\r\n \r\n return $class;\r\n }", "public static function newInstance ($class)\n {\n try\n {\n // the class exists\n $object = new $class();\n\n if (!($object instanceof sfController))\n {\n // the class name is of the wrong type\n $error = 'Class \"%s\" is not of the type sfController';\n $error = sprintf($error, $class);\n\n throw new sfFactoryException($error);\n }\n\n return $object;\n }\n catch (sfException $e)\n {\n $e->printStackTrace();\n }\n }", "public function create()\n {\n //TODO frontEndDeveloper \n //load admin.classes.create view\n\n\n return view('admin.classes.create');\n }", "private function generateControllerClass()\n {\n $dir = $this->bundle->getPath();\n\n $parts = explode('\\\\', $this->entity);\n $entityClass = array_pop($parts);\n $entityNamespace = implode('\\\\', $parts);\n\n $target = sprintf(\n '%s/Controller/%s/%sController.php',\n $dir,\n str_replace('\\\\', '/', $entityNamespace),\n $entityClass\n );\n\n if (file_exists($target)) {\n throw new \\RuntimeException('Unable to generate the controller as it already exists.');\n }\n\n $this->renderFile($this->skeletonDir, 'controller.php', $target, array(\n 'actions' => $this->actions,\n 'route_prefix' => $this->routePrefix,\n 'route_name_prefix' => $this->routeNamePrefix,\n 'dir' => $this->skeletonDir,\n 'bundle' => $this->bundle->getName(),\n 'entity' => $this->entity,\n 'entity_class' => $entityClass,\n 'namespace' => $this->bundle->getNamespace(),\n 'entity_namespace' => $entityNamespace,\n 'format' => $this->format,\n ));\n }", "static public function Instance()\t\t// Static so we use classname itself to create object i.e. Controller::Instance()\r\n {\r\n // Only one object of this class is required\r\n // so we only create if it hasn't already\r\n // been created.\r\n if(!isset(self::$_instance))\r\n {\r\n self::$_instance = new self();\t// Make new instance of the Controler class\r\n self::$_instance->_commandResolver = new CommandResolver();\r\n\r\n ApplicationController::LoadViewMap();\r\n }\r\n return self::$_instance;\r\n }", "private function create_mock_controller() {\n eval('class TestController extends cyclone\\request\\SkeletonController {\n function before() {\n DispatcherTest::$beforeCalled = TRUE;\n DispatcherTest::$route = $this->_request->route;\n }\n\n function after() {\n DispatcherTest::$afterCalled = TRUE;\n }\n\n function action_act() {\n DispatcherTest::$actionCalled = TRUE;\n }\n}');\n }", "public function AController() {\r\n\t}", "protected function initializeController() {}", "public function dispatch()\n { \n $controller = $this->formatController();\n $controller = new $controller($this);\n if (!$controller instanceof ControllerAbstract) {\n throw new Exception(\n 'Class ' . get_class($controller) . ' is not a valid controller instance. Controller classes must '\n . 'derive from \\Europa\\ControllerAbstract.'\n );\n }\n $controller->action();\n return $controller;\n }", "public function controller()\n {\n $method = $_SERVER['REQUEST_METHOD'];\n if ($method == 'GET') {\n $this->getController();\n };\n if ($method == 'POST') {\n check_csrf();\n $this->createController();\n };\n }", "private function addController($controller)\n {\n $object = new $controller($this->app);\n $this->controllers[$controller] = $object;\n }", "function Controller($ControllerName = Web\\Application\\DefaultController) {\n return Application()->Controller($ControllerName);\n }", "public function getController($controllerName) {\r\n\t\tif(!isset(self::$instances[$controllerName])) {\r\n\t\t $package = $this->getPackage(Nomenclature::getVendorAndPackage($controllerName));\r\n\t\t if(!$package) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t return $controller;\r\n\t\t //return false;\r\n\t\t }\r\n\r\n\t\t if(!$package || !$package->controllerExists($controllerName)) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t $package->addController($controller);\r\n\t\t } else {\r\n\t\t $controller = $package->getController($controllerName);\r\n\t\t }\r\n\t\t} else {\r\n\t\t $controller = self::$instances[$controllerName];\r\n\t\t}\r\n\t\treturn $controller;\r\n\t}", "public function testInstantiateSessionController()\n {\n $controller = new SessionController();\n\n $this->assertInstanceOf(\"App\\Http\\Controllers\\SessionController\", $controller);\n }", "private static function loadController($str) {\n\t\t$str = self::formatAsController($str);\n\t\t$app_controller = file_exists(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t$lib_controller = file_exists(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\n\t\tif ( $app_controller || $lib_controller ) {\n\t\t\tif ($app_controller) {\n\t\t\t\trequire_once(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\t\telse {\n\t\t\t\trequire_once(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\n\t\t\t$controller = new $str();\n\t\t\t\n\t\t\tif (!$controller instanceof Controller) {\n\t\t\t\tthrow new IsNotControllerException();\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn $controller;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthrow new ControllerNotExistsException($str);\n\t\t}\n\t}", "public function __construct()\n {\n // and $url[1] is a controller method\n if ($_GET['url'] == NULL) {\n $url = explode('/', env('defaultRoute'));\n } else {\n $url = explode('/', rtrim($_GET['url'],'/'));\n }\n\n $file = 'controllers/' . $url[0] . '.php';\n if (file_exists($file)) {\n require $file;\n $controller = new $url[0];\n\n if (isset($url[1])) {\n $controller->{$url[1]}();\n }\n } else {\n echo \"404 not found\";\n }\n }", "protected function _controllers()\n {\n $this['watchController'] = $this->factory(static function ($c) {\n return new Controller\\WatchController($c['app'], $c['searcher']);\n });\n\n $this['runController'] = $this->factory(static function ($c) {\n return new Controller\\RunController($c['app'], $c['searcher']);\n });\n\n $this['customController'] = $this->factory(static function ($c) {\n return new Controller\\CustomController($c['app'], $c['searcher']);\n });\n\n $this['waterfallController'] = $this->factory(static function ($c) {\n return new Controller\\WaterfallController($c['app'], $c['searcher']);\n });\n\n $this['importController'] = $this->factory(static function ($c) {\n return new Controller\\ImportController($c['app'], $c['saver'], $c['config']['upload.token']);\n });\n\n $this['metricsController'] = $this->factory(static function ($c) {\n return new Controller\\MetricsController($c['app'], $c['searcher']);\n });\n }", "public function __construct() {\r\n $this->controllerLogin = new ControllerLogin();\r\n $this->controllerGame = new ControllerGame();\r\n $this->controllerRegister = new ControllerRegister();\r\n }", "public function controller ($post = array())\n\t{\n\n\t\t$name = $post['controller_name'];\n\n\t\tif (is_file(APPPATH.'controllers/'.$name.'.php')) {\n\n\t\t\t$message = sprintf(lang('Controller_s_is_existed'), APPPATH.'controllers/'.$name.'.php');\n\n\t\t\t$this->msg[] = $message;\n\n\t\t\treturn $this->result(false, $this->msg[0]);\n\n\t\t}\n\n\t\t$extends = null;\n\n\t\tif (isset($post['crud'])) {\n\n\t\t\t$crud = true;\n\t\t\t\n\t\t}\n\t\telse{\n\n\t\t\t$crud = false;\n\n\t\t}\n\n\t\t$file = $this->_create_folders_from_name($name, 'controllers');\n\n\t\t$data = '';\n\n\t\t$data .= $this->_class_open($file['file'], __METHOD__, $extends);\n\n\t\t$crud === FALSE || $data .= $this->_crud_methods_contraller($post);\n\n\t\t$data .= $this->_class_close();\n\n\t\t$path = APPPATH . 'controllers/' . $file['path'] . strtolower($file['file']) . '.php';\n\n\t\twrite_file($path, $data);\n\n\t\t$this->msg[] = sprintf(lang('Created_controller_s'), $path);\n\n\t\t//echo $this->_messages();\n\t\treturn $this->result(true, $this->msg[0]);\n\n\t}", "protected function getController(Request $request) {\n try {\n $controller = $this->objectFactory->create($request->getControllerName(), self::INTERFACE_CONTROLLER);\n } catch (ZiboException $exception) {\n throw new ZiboException('Could not create controller ' . $request->getControllerName(), 0, $exception);\n }\n\n return $controller;\n }", "public function create() {}", "public function __construct()\n {\n $this->dataController = new DataController;\n }", "function __contrruct(){ //construdor do controller, nele é possivel carregar as librari, helpers, models que serão utilizados nesse controller\n\t\tparent::__contrruct();//Chamando o construtor da classe pai\n\t}", "public function __construct() {\n\n // Get the URL elements.\n $url = $this->_parseUrl();\n\n // Checks if the first URL element is set / not empty, and replaces the\n // default controller class string if the given class exists.\n if (isset($url[0]) and ! empty($url[0])) {\n $controllerClass = CONTROLLER_PATH . ucfirst(strtolower($url[0]));\n unset($url[0]);\n if (class_exists($controllerClass)) {\n $this->_controllerClass = $controllerClass;\n }\n }\n\n // Replace the controller class string with a new instance of the it.\n $this->_controllerClass = new $this->_controllerClass;\n\n // Checks if the second URL element is set / not empty, and replaces the\n // default controller action string if the given action is a valid class\n // method.\n if (isset($url[1]) and ! empty($url[1])) {\n if (method_exists($this->_controllerClass, $url[1])) {\n $this->_controllerAction = $url[1];\n unset($url[1]);\n }\n }\n\n // Check if the URL has any remaining elements, setting the controller\n // parameters as a rebase of it if true or an empty array if false.\n $this->_controllerParams = $url ? array_values($url) : [];\n\n // Call the controller and action with parameters.\n call_user_func_array([$this->_controllerClass, $this->_controllerAction], $this->_controllerParams);\n }", "private function setUpController()\n {\n $this->controller = new TestObject(new SharedControllerTestController);\n\n $this->controller->dbal = DBAL::getDBAL('testDB', $this->getDBH());\n }", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }" ]
[ "0.82668066", "0.8173394", "0.78115296", "0.77052677", "0.7681875", "0.7659338", "0.74860525", "0.74064577", "0.7297601", "0.7252339", "0.7195181", "0.7174191", "0.70150065", "0.6989306", "0.69835985", "0.69732994", "0.6963521", "0.6935819", "0.68973273", "0.68920785", "0.6877748", "0.68702674", "0.68622285", "0.6839049", "0.6779292", "0.6703522", "0.66688496", "0.66600126", "0.6650373", "0.66436416", "0.6615505", "0.66144013", "0.6588728", "0.64483404", "0.64439476", "0.6429303", "0.6426485", "0.6303757", "0.6298291", "0.6293319", "0.62811387", "0.6258778", "0.62542456", "0.616827", "0.6162314", "0.61610043", "0.6139887", "0.613725", "0.61334985", "0.6132223", "0.6128982", "0.61092585", "0.6094611", "0.60889256", "0.6074893", "0.60660255", "0.6059098", "0.60565156", "0.6044235", "0.60288006", "0.6024102", "0.60225666", "0.6018304", "0.60134345", "0.60124683", "0.6010913", "0.6009284", "0.6001683", "0.5997471", "0.5997012", "0.59942573", "0.5985074", "0.5985074", "0.5985074", "0.5967613", "0.5952533", "0.5949068", "0.5942203", "0.5925731", "0.5914304", "0.5914013", "0.59119135", "0.5910308", "0.5910285", "0.59013796", "0.59003943", "0.5897524", "0.58964556", "0.58952993", "0.58918965", "0.5888943", "0.5875413", "0.5869938", "0.58627135", "0.58594996", "0.5853714", "0.5839484", "0.5832913", "0.582425", "0.58161044", "0.5815566" ]
0.0
-1
Display a listing of the resource.
public function index() { // }
{ "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.7286258", "0.71454436", "0.7132821", "0.6640289", "0.6621105", "0.6566493", "0.65255576", "0.65087926", "0.6448317", "0.63752604", "0.63736314", "0.6365631", "0.6365631", "0.6365631", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229" ]
0.0
-1
Display the specified resource.
public function show(User $user, Topic $topic) { $topic_counter = Topic::where('user_id', $user->id)->count(); $reply_counter = Reply::where('user_id', $user->id)->count(); return view('users.show', compact('user', 'reply_counter', 'topic_counter')); }
{ "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(User $user) { // }
{ "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, User $user) { // }
{ "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(User $user) { // }
{ "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
se elimina un profesional.
public function execute() { $id = FormatUtils::getParam('id'); //se inicia una transacción. DbManager::begin_tran(); try { $manager = new ProfesionalManager(); $manager->eliminarProfesional($id); $forward = 'eliminar_profesional_success'; //commit de la transacción. DbManager::save(); } catch (GenericException $ex) { $forward = 'eliminar_profesional_error'; $this->setDs_forward_params('er=1' . '&msg=' . $ex->getMessage() . '&code=' . $ex->getCode()); //rollback de la transacción. DbManager::undo(); } return $forward; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function opcion__eliminar()\n\t{\n\t\t$id_proyecto = $this->get_id_proyecto_actual();\n\t\tif ( $id_proyecto == 'toba' ) {\n\t\t\tthrow new toba_error(\"No es posible eliminar el proyecto 'toba'\");\n\t\t}\n\t\ttry {\n\t\t\t$p = $this->get_proyecto();\n\t\t\tif ( $this->consola->dialogo_simple(\"Desea ELIMINAR los metadatos y DESVINCULAR el proyecto '\"\n\t\t\t\t\t.$id_proyecto.\"' de la instancia '\"\n\t\t\t\t\t.$this->get_id_instancia_actual().\"'\") ) {\n\t\t\t\t$p->eliminar_autonomo();\n\t\t\t}\n\t\t} catch (toba_error $e) {\n\t\t\t$this->consola->error($e->__toString());\n\t\t}\n\t\t$this->get_instancia()->desvincular_proyecto( $id_proyecto );\n\t}", "protected function avantSuppression() {\n $passagers = $this->getListePassagers();\n foreach ($passagers as $passager) {\n $passager->supprimer();\n }\n }", "function supprimerProduit($code) {\n\t // echo \"<p> supprimer $code </p>\";\n\t \n\t /* on verifie si le produit est dans le panier */\n\t if ( isset($this->lignes[$code]) ) {\n\t /* il y est, donc on retrouve la ligne de panier */\n\t $lp = $this->lignes[$code] ;\n\t \n\t /* on supprime 1 de la quantite */\n\t $lp->qte = $lp->qte - 1 ; \n\t \n\t // echo \"<p> nouvelle qte : \" . $lp->qte . \"</p>\" ;\n\t \n\t /* si qte<1, on supprime toute la ligne du tableau */\n\t if ( $lp->qte < 1) {\n\t unset($this->lignes[$code]);\n\t // echo \"<p> produit $code supprime \" . count($this->lignes) . \"</p>\";\n\t \n\t /* on enleve un produit de nbProduits */\n\t $this->nbProduits = $this->nbProduits - 1;\n\t }\n\t }\t \n\t }", "function eliminarAnalisisPorqueDet(){\n\t\t$this->procedimiento='gem.ft_analisis_porque_det_ime';\n\t\t$this->transaccion='GM_DET_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_analisis_porque_det','id_analisis_porque_det','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function eliminarUcedifobracivil(){\n\t\t$this->procedimiento='snx.ft_ucedifobracivil_ime';\n\t\t$this->transaccion='SNX_UDOC_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_ucedifobracivil','id_ucedifobracivil','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function eliminar($bd);", "function borrarInscrito() {\n //Creamos la evaluacion\n leerClase('Evaluacion');\n leerClase('Estudiante');\n leerClase('Proyecto_dicta');\n $estudiante = new Estudiante($this->estudiante_id);\n $evaluacion = new Evaluacion($this->evaluacion_id);\n $protecto=$estudiante->getProyecto();\n $sql = \"select p.id as id from \" . $this->getTableName('Proyecto_dicta') . \" as p where p.proyecto_id = '$protecto->id' and p.dicta_id = '$this->dicta_id' \";\n $resultado = mysql_query($sql);\n\n $proyecto_array = mysql_fetch_array($resultado);\n $proyecto_dicta = new Proyecto_dicta($proyecto_array);\n $proyecto_dicta->delete();\n $evaluacion->delete();\n $this->delete();\n }", "function eliminarPresupuesto(){\n\t\t$this->procedimiento='pre.ft_presupuesto_ime';\n\t\t$this->transaccion='PRE_PRE_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_presupuesto','id_presupuesto','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function removeProcessoPronto(){\n\tunset($_SESSION['fila'][0]);\n\n\t/*REORGANIZA O ARRAY DE PROCESSOS PRONTOS*/\n\t$_SESSION['fila'] = array_values($_SESSION['fila']);\n}", "public function eliminar($objeto){\r\n\t}", "public function Eliminar(){\n\t\t\t$enlace = AccesoBD::Conexion();\n\n\t\t\t$sql = \"DELETE FROM denuncia WHERE ID_DENUNCIA = '$this->idDenuncia'\";\n\n\t\t\tif ($enlace->query($sql) !== TRUE) {\n \t\t\techo \"Error al eliminar la denuncia\";\n \t\t\texit();\n\t\t\t}\n\t\t\techo \"Denuncia eliminada\";\n\t\t}", "static function eliminar_instancia()\n\t{\n\t\tself::$instancia = null;\n\t}", "function eliminar_autonomo()\n\t{\n\t\ttry {\n\t\t\t$this->db->abrir_transaccion();\n\t\t\t$this->db->retrasar_constraints();\n\t\t\t$this->eliminar();\n\t\t\t$this->db->cerrar_transaccion();\n\t\t\t$this->manejador_interface->mensaje(\"El proyecto '{$this->identificador}' ha sido eliminado\");\n\t\t} catch ( toba_error $e ) {\n\t\t\t$this->db->abortar_transaccion();\n\t\t\t$this->manejador_interface->error( \"Ha ocurrido un error durante la eliminacion de TABLAS de la instancia:\\n\".\n\t\t\t\t\t\t\t\t\t\t\t\t$e->getMessage() );\n\t\t}\n\t}", "function elimina(&$valores)\n {\n $this->iniVar();\n if (isset($this->bvictimacolectiva->_do->id_grupoper)) {\n $this->eliminaVic($this->bvictimacolectiva->_do, true);\n $_SESSION['fvc_total']--;\n }\n }", "public function EliminarPerfil()\n {\n $this->db->where('idPerfil', $_POST['idPerfil']);\n $row = $this->db->get('perfil');\n $query=$row->row();\n\n /** Registro de Historial **/\n $Mensaje=\" Se Eliminó Perfil: \".$query->DescripcionPerfil.\"\";\n $this->db->select(\"FU_REGISTRO_HISTORIAL(5,\".$this->glob['idUsuario'].\",'\".$Mensaje.\"','\".$this->glob['FechaAhora'].\"') AS Respuesta\");\n $func[\"Historial\"] = $this->db->get();\n\n\n\n $this->db->where('idPerfil', $_POST['idPerfil']);\n $delete_data[\"Delete\"] = $this->db->delete('perfil');\n $delete_data[\"errDB\"] = $this->db->error();\n\n return $delete_data;\n\n }", "function supprimerEpreuve ($numE) {\n\t if (creepanier ()) {\n\t\t //Nous allons faire recours à un tableau temporaire\n\t\t$tmp = array ();\n\t\t$tmp['numE'] = array ();\n\t\t$tmp['forme'] = array();\n\t\t$tmp['nomE'] = array();\n\t\t$tmp['dateE'] = array();\n\t\t$tmp['categ'] = array();\n\t\t$tmp['prix'] = array ();\n\t\t$tmp['nbr'] = array();\n\t\tfor ($i = 0 ; $i < count ($_SESSION['panier']['numE']);$i ++) {\n\t\t\tif ($_SESSION['panier']['numE'][$i] !== $numE)\n\t\t\t{\n\t\t\t\tarray_push( $tmp['numE'],$_SESSION['panier']['numE'][$i]);\n\t\t\t\tarray_push( $tmp['forme'],$_SESSION['panier']['forme'][$i]);\n\t\t\t\tarray_push( $tmp['nomE'],$_SESSION['panier']['nomE'][$i]);\n\t\t\t\tarray_push( $tmp['dateE'],$_SESSION['panier']['dateE'][$i]);\n\t\t\t\tarray_push( $tmp['categ'],$_SESSION['panier']['categ'][$i]);\n\t\t\t\tarray_push( $tmp['prix'],$_SESSION['panier']['prix'][$i]);\n\t\t\t\tarray_push( $tmp['nbr'],$_SESSION['panier']['nbr'][$i]);\n\t\t\t}\n\t\t}\n\t\t//on affecte le contenu du panier temporaire dans notre panier principale\n\t\t$_SESSION['panier'] = $tmp;\n\t\t//On efface notre panier temporaire\n unset($tmp);\n\t } else {\n\t\t echo \"<p class=\\\"erreur\\\">Erreur réessyer ou contacter l'aministrateur</p>\";\n\t }\n }", "function eliminarHerrajeaccesorio(){\n\t\t$this->procedimiento='snx.ft_herrajeaccesorio_ime';\n\t\t$this->transaccion='SNX_HAC_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_herrajeaccesorio','id_herrajeaccesorio','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function eliminarpermiso()\n {\n $oconexion = new conectar();\n //se establece conexión con la base de datos\n $conexion = $oconexion->conexion();\n //consulta para eliminar el registro\n $sql = \"UPDATE permiso SET eliminado=1 WHERE id_permiso=$this->id_permiso\";\n // $sql=\"DELETE FROM estudiante WHERE id=$this->id\";\n //se ejecuta la consulta\n $result = mysqli_query($conexion, $sql);\n return $result;\n }", "function removeAval($codUsr,$cod,$tipo){\r\n\t\t$fAval = new fachada_avaliacao();\r\n\t\t$fAval->removeAval($codUsr,$cod,$tipo);\r\n\t}", "public function eliminar()\n\t{\n\t\t$idestado = $_POST['idestado'];\n\t\t//en viamos por parametro el id del estado a eliminar\n\t\tEstado::delete($idestado);\n\t}", "function eliminarSolicitudMayor500000(){\n\t\t$this->procedimiento='mat.ft_solicitud_mayor_500000_ime';\n\t\t$this->transaccion='MAT_SMI_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_sol','id_sol','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function eliminarPartidaEjecucion(){\n\t\t$this->procedimiento='pre.ft_partida_ejecucion_ime';\n\t\t$this->transaccion='PRE_PAREJE_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_partida_ejecucion','id_partida_ejecucion','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function eliminar_insumos($objeto){\n\t\t$sql=\"\tDELETE FROM\n\t\t\t\t\t app_producto_material\n\t\t\t\tWHERE\n\t\t\t\t\tid_producto =\".$objeto['id'];\n\t\t// return $sql;\n\t\t$result = $this->query($sql);\n\n\t\treturn $result;\n\t}", "abstract public function mass_remove();", "function removePacote($campos){\n\t\t\t$listDel = $campos['InputDelPacote'];\t\t\t\n\t\t\t\t\n\t\t\t\tif(!empty($listDel)){\n\t\t\t\t\n\t\t\t\tfor($i=0;$i<sizeof($listDel);$i++){\n\t\t\t\t\t\tif($listDel[$i] != 0){\n\t\t\t\t\t\t\t\t$sql = \" DELETE FROM vekttor_venda_pacote WHERE pacotes_id = '$listDel[$i]' AND vekttor_venda_id = '$campos[venda_id]'\";\n\t\t\t\t\t\t\t\t//echo $sql;\n\t\t\t\t\t\t\t\tmysql_query($sql);\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t/*Seleciona os pacote para trazer os modulos */\n\t\t\t\t\t$sqlPacote = mysql_query($tn=\" SELECT * FROM pacote_item WHERE pacote_id = '$listDel[$i]' \");\n\t\t\t\t\t\twhile($pct=mysql_fetch_object($sqlPacote)){\n\t\t\t\t\t\t\t\t$modulos[] = $pct->sis_modulo_id;\n\t\t\t\t\t\t}\n\t\t\t\t} /*Fim de For*/\n\t\t\t\t\n\t\t\t\t\tfor($j=0;$j<sizeof($modulos);$j++){\n\t\t\t\t\t\t\t$sqlModulos = \" DELETE FROM usuario_tipo_modulo WHERE modulo_id = '$modulos[$j]' AND usuario_tipo_id = '$campos[id_usuario_tipo]'\";\n\t\t\t\t\t\t\tmysql_query($sqlModulos);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n}", "public function eliminar() {\n\t\t\n\t\t\n\t\t$juradodni = $_GET[\"dniJurado\"];\n\t\t\n\t\t$this -> JuradoMapper -> delete($juradodni);\n\n\t\t\n\t\t$this -> view -> redirect(\"jurado\", \"listar\");\n\t\t//falta cambiar\n\t}", "private function get_sql_eliminacion()\n\t{\n\t\t// Tablas\n\t\t$tablas = array();\n\t\t//Busco las TABLAS y sus WHERES\n\t\t$catalogos = array();\n\t\t$catalogos['toba_db_tablas_componente'][] = 'get_lista';\n\t\t$catalogos['toba_db_tablas_proyecto'][] = 'get_lista';\n\t\t$catalogos['toba_db_tablas_proyecto'][] = 'get_lista_permisos';\n\t\t$catalogos['toba_db_tablas_instancia'][] = 'get_lista_proyecto';\n\t\t$catalogos['toba_db_tablas_instancia'][] = 'get_lista_proyecto_usuario';\n\t\tforeach( $catalogos as $catalogo => $indices ) {\n\t\t\tforeach( $indices as $indice ) {\n\t\t\t\t$lista_tablas = call_user_func( array( $catalogo, $indice ) );\n\t\t\t\tforeach ( $lista_tablas as $t ) {\n\t\t\t\t\t$info_tabla = call_user_func( array( $catalogo, $t ) );\n\t\t\t\t\tif( isset( $info_tabla['dump_where'] ) ) {\n\t\t\t\t\t\t$where = \" WHERE \" . str_replace('%%', $this->identificador, stripslashes($info_tabla['dump_where']) );\n\t\t\t\t\t\t$where = str_replace(\" dd\", $t, $where);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$where = \" WHERE proyecto = '{$this->identificador}'\";\n\t\t\t\t\t}\n\t\t\t\t\t$tablas[ $t ] = $where;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$sql = sql_array_tablas_delete( $tablas );\n\t\treturn $sql;\n\t}", "function supprimerPanier()\n{\n\tunset($_SESSION['produits']);\n}", "function gaus_jordan_metoda_eliminacije_pokusaj_2($niz_cvorovi, $tacke_x) // $matrica, \n{\n\t// ------------------------------------- Priprema matrice -----------------------------------//\n\n\t// FORMIRANJE MATRICE NA OSNOVU CVOROVA\n\t// $niz_cvorovi = niz_cvorovi($cvorovi);\n // $niz_tacke = niz_tacke($tacke_x);\n $niz_tacke = $tacke_x;\n // sortirani cvorovi po x vrednosti u rastucem poretku radi formiranja intervala\n $niz_cvorovi = sortiranje_cvorova_po_intervalu($niz_cvorovi);\n\n $niz_intervali = niz_intervali($niz_cvorovi);\n // var_dump($niz_intervali);\n $matrica = formiranje_matrice($niz_cvorovi, $niz_intervali);\n\n // -----------------------------------------------------------------------------------------//\n\n\n\t//---------------------------------- RESAVANJE SISTEMA JEDNACINA(matrice) ------------------//\n\n\t$matrica = sort_gl_dijagonala($matrica);\n\t// echo ( napravi_tabelu( $matrica ) );\n\t// exit();\n\n\t// echo ( napravi_tabelu( zaokruzi_koeficijente_za_prikaz ($matrica) ) );\n\t// exit();\n\n\t$matrica = gauss_nuliranje_matrice($matrica);\n\n\t$matrica = jordan_nuliranje_matrice($matrica);\n\n\n\t// -----------------------------------------------------------------------------------------//\n\n\n\t//------------------------ Formiranje konacnih formula za odgovarajuce intervale -----------//\n\n\t$niz_koeficijenata_sa_vrednostima = niz_koeficijenata_sa_vrednostima($matrica);\n\t$abc_grupe = abc_grupe($niz_koeficijenata_sa_vrednostima);\n\t// var_dump($abc_grupe);\n\t// var_dump($niz_koeficijenata_sa_vrednostima);\n\t$formule = formiraj_string_formula_sa_intervalima($niz_koeficijenata_sa_vrednostima);\n\n\t// ispisi formule\n\tfor($form = 1; $form <= count($formule); $form++)\n\t{\n\t\t$formula_str = $formule[$form];\n\t\t$interval_levi = $niz_intervali[$form - 1][0];\n\t\t$interval_desni = $niz_intervali[$form - 1][1];\n\t\techo \"Interval {$form}. je [{$interval_levi}, {$interval_desni}], a formula: {$formula_str} \" . \"<br>\";\n\t}\n\techo \"<br>\";\n\t// -----------------------------------------------------------------------------------------//\n\n\n\t// ------------------------------------Interpolacija----------------------------------------//\n\t$niz_interpoliranih_tacaka = array();\n\tif(!empty($niz_tacke))\n\t{\n\t\tfor($x = 0; $x < count($niz_tacke); $x++)\n\t\t{\n\t\t\t// kriva\n\t\t\t$kr = u_kom_intervalu_je_input($niz_intervali, $niz_tacke[$x]) + 1; // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n\t\t\t// Pn(x)\t=\t\t\t x * x * An + x * Bn + Cn \n\t\t\t$vrednost_y = ( $niz_tacke[$x] * $niz_tacke[$x] * $abc_grupe[$kr][0] ) + ( $niz_tacke[$x] * $abc_grupe[$kr][1] ) + $abc_grupe[$kr][2];\n\t\t\t$niz_interpoliranih_tacaka[] = array($niz_tacke[$x], $vrednost_y);\n\n\t\t\t// $prvi = $niz_intervali[$u_kom_intervalu_je_input][0];\n\t\t\t// $drugi = $niz_intervali[$u_kom_intervalu_je_input][1];\n\t\t\t// $t = $niz_tacke[$x];\n\t\t\t// echo \"{$x}. tacka - {$t} - je u intervalu: {$prvi}, {$drugi}\" . \"<br>\";\n\t\t}\n\t}\n\n\t// -----------------------------------------------------------------------------------------//\n\n\treturn array($matrica, $niz_interpoliranih_tacaka);\n\t\n}", "function eliminarFactura(){\r\n\t\t$this->procedimiento='tesor.f_factura_ime';\r\n\t\t$this->transaccion='TSR_FAC_ELI';\r\n\t\t$this->tipo_procedimiento='IME';\r\n\t\t\t\t\r\n\t\t//Define los parametros para la funcion\r\n\t\t$this->setParametro('id_factura','id_factura','int4');\r\n\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\t\t$this->ejecutarConsulta();\r\n\r\n\t\t//Devuelve la respuesta\r\n\t\treturn $this->respuesta;\r\n\t}", "function eliminar()\n{\n\t$sql=\"delete FROM slc_unid_medida WHERE id_unid_medida ='$this->cod'\";\n\t\t$result=mysql_query($sql,$this->conexion);\n\t\tif ($result) \n\t\t\t return true;\n\t\telse\n\t\t\t return false;\n\t\n}", "function action_remove() {\n\t\t\t$data = UTIL::get_post('data');\n\t\t\t$id = (int)$data['rem_id'];\n\t\t\t$table = $data['rem_table'];\n\t\t\t\n\t\t\t$choosen = $this->SESS->get('objbrowser', 'choosen');\n\t\t\tunset($choosen[$table][$id]);\n\t\t\tif (count($choosen[$table]) == 0) unset($choosen[$table]);\n\t\t\t\n\t\t\t$this->SESS->set('objbrowser', 'choosen', $choosen);\n\t\t}", "public function desverificarintranet()\n\t{\n\t\tif( $this->session->userdata('logueado') > 0)\n\t\t{\n\t\t\t$userintran = $this->session->userdata('intranet');\n\t\t\t$sqllimpiatableviewbyentidadporusuario = \"DROP TABLE IF EXISTS registro_gastos_\".$userintran.\" ;\";\n\t\t\t$this->load->database('gastossystema');\n\t\t\t$this->db->query($sqllimpiatableviewbyentidadporusuario);\n\t\t}\n\t\t// destruir la session e invalidarla\n\t\t$usuario_data = array('logueado' => 0);\n\t\t$this->session->set_userdata($usuario_data);\n\t\t$this->session->sess_destroy();\n\t\t$this->index();\n\t}", "public function EliminarCaja()\n\t\t{\n\n\t\t\t$sql = \" select codcaja from ventas where codcaja = ? \";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->execute( array(base64_decode($_GET[\"codcaja\"])) );\n\t\t\t$num = $stmt->rowCount();\n\t\t\tif($num == 0)\n\t\t\t{\n\n\t\t\t\t$sql = \" delete from cajas where codcaja = ? \";\n\t\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t\t$stmt->bindParam(1,$codcaja);\n\t\t\t\t$codcaja = base64_decode($_GET[\"codcaja\"]);\n\t\t\t\t$stmt->execute();\n\n\t\t\t\theader(\"Location: cajas?mesage=1\");\n\t\t\t\texit;\n\n\t\t\t}else {\n\n\t\t\t\theader(\"Location: cajas?mesage=2\");\n\t\t\t\texit;\n\t\t\t}\n\n\t\t}", "function eliminarUoFuncionario(){\r\n\t\t$this->objFunSeguridad=$this->create('MODUoFuncionario');\t\r\n\t\t$this->res=$this->objFunSeguridad->eliminarUoFuncionario($this->objParam);\r\n\t\t$this->res->imprimirRespuesta($this->res->generarJson());\r\n\r\n\t}", "function eliminarPrograma(){\n\t\t$this->procedimiento='sigep.ft_programa_ime';\n\t\t$this->transaccion='SIGEP_PRO_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_programa_boa','id_programa_boa','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "protected function pruning()\n {\n $this->pizzas()->detach();\n }", "public function Eliminar()\n {\n $sentenciaSql = \"DELETE FROM \n detalle_orden \n WHERE \n id_detalle_orden = $this->idDetalleOrden\";\n $this->conn->preparar($sentenciaSql);\n $this->conn->ejecutar();\n }", "public function excluirprofessor() {\n\t\t//Recupera id do aluno\n\t\tif(!$this->uri->segment(\"3\"))\n\t\t\tredirect('/administracao/painel');\n\t\telse \n\t\t\t$intID =$this->uri->segment(\"3\");\n\n\t\t/* Carrega o modelo */\n\t\t$this->load->model('professores_model');\n\n\t\t/* Chama a função excluir do modelo */\n\t\tif ($this->professores_model->delete($intID)) {\n\t\t\tlog_message('success', 'Professor excluido com sucesso!');\n\t\t\tredirect('/administracao/listaprofessores');\n\t\t} else {\n\t\t\tlog_message('error', 'Erro ao excluir o aluno!');\n\t\t}\n\t}", "public function delete()\n {\n //recuperation des informations pour la suppression d'une matière\n $data = $this->request->data;\n $id_planing = (int)$data['id_planing'] ?? null;\n \n if (empty($id_planing)) {\n $this->_return('Veillez spécifier l\\'identifiant du programme à supprimer', false);\n }\n\n if (true === $this->model->exist('id_planing', (int)$data['id_planing'], 'Presences')) {\n $this->_return('impossible de supprimer ce planing car il comporte encore des presences ', false);\n }\n\n try {\n $this->model->remove($id_planing);\n $this->_return('La matière a étè supprimer avec succès', true);\n //code...\n } catch (Exception $e) {\n $this->_exception($e);\n }\n }", "function removeProcessoPronto(){\n\tunset($_SESSION['processosProntos'][0]);\n\n\t/*REORGANIZA O ARRAY DE PROCESSOS PRONTOS*/\n\t$_SESSION['processosProntos'] = array_values($_SESSION['processosProntos']);\n}", "function eliminarImagenSusQ($campo, $tabla, $idAsignacion)\n {\n $data=$this->analisisRiesgo->getNombreImagen($campo, $tabla, $idAsignacion);\n //Delete el nombre de la imagen de la base de datos\n $borrar=Array($campo => null);\n $this->analisisRiesgo->deleteImagen($borrar, $tabla, $idAsignacion);\n //Unlink el nombre de la imagen del servidor\n foreach($data as $row)\n {\n $nombreImagen=$row[$campo];\n unlink(\"assets/img/fotoAnalisisRiesgo/fotoSustanciasQuimicas/$nombreImagen\");\n echo \"OK\";\n }\n\n }", "public function Elimina_Eletiva(&$Faltantes, $Possiveis) {\n\t\t// ToDo: Usar ID ao inves de sigla\n\t\t$creditos = 0;\n\t\t$ret = array('creditos' => 0, 'diff_creditos' => 0, 'siglas' => array());\n\t\tforeach($Faltantes as $c => $Faltante) {\n\t\t\t// Cria (ou usa uma copia anterior) desta CurriculoEletiva\n\t\t\t$Faltantes[$c] = $Faltante = $Faltante->Copia();\n\t\t\t$Conjunto = $Faltante->getConjuntos(true);\n\t\t\tforeach($Conjunto as $indice => $Bloco) {\n\t\t\t\t$sigla = $Bloco->getSigla(false);\n\t\t\t\t$Disciplina = $Bloco->getDisciplina(true);\n\t\t\t\tif($Bloco->Fechada() === true) { // Fechada\n\t\t\t\t\t$Eliminadas = $this->Elimina($Disciplina, $Possiveis);\n\t\t\t\t\tif($Eliminadas !== false) {\n\t\t\t\t\t\tforeach($Eliminadas as $Eli) {\n\t\t\t\t\t\t\t$ret['creditos'] += $Eli->getDisciplina(true)->getCreditos(false);\n\t\t\t\t\t\t\t$ret['siglas'][] = $Eli->getDisciplina(true)->getSigla(false);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Se ela foi eliminada por equivalencia, e as equivalentes somam mais creditos que a original...\n\t\t\t\t\t\tif($ret['creditos'] > $Disciplina->getCreditos())\n\t\t\t\t\t\t\t$ret['diff_creditos'] += $creditos - $Disciplina->getCreditos();\n\t\t\t\t\t\t$creditos = $Faltante->getCreditos();\n\t\t\t\t\t\t$creditos -= $Disciplina->getCreditos();\n\t\t\t\t\t\tif($creditos <= 0)\n\t\t\t\t\t\t\tunset($Faltantes[$c]);\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$Conjunto->remove($indice);\n\t\t\t\t\t\t\t$Faltantes[$c]->setConjuntos($Conjunto);\n\t\t\t\t\t\t\t$Faltantes[$c]->setCreditos($creditos);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$ret['eliminada'] = $sigla;\n\t\t\t\t\t\t$ret['sobraram'] = $creditos;\n\t\t\t\t\t\treturn $ret;\n\t\t\t\t\t}\n\t\t\t\t} else { // Livre ou semi-livre\n\t\t\t\t\tif(CurriculoEletiva::Bate_Eletiva($sigla, $this->getDisciplina(true)->getSigla(false), true)) {\n\t\t\t\t\t\t$ret['creditos'] = $this->getDisciplina(true)->getCreditos();\n\t\t\t\t\t\t$ret['siglas'] = array($this->getDisciplina(true)->getSigla(false));\n\t\t\t\t\t\t$ret['eliminada'] = $sigla;\n\t\t\t\t\t\t$creditos = $Faltante->getCreditos();\n\t\t\t\t\t\t$creditos -= $ret['creditos'];\n\t\t\t\t\t\tif($creditos <= 0) {\n\t\t\t\t\t\t\t$ret['diff_creditos'] = $creditos * -1;\n\t\t\t\t\t\t\tunset($Faltantes[$c]);\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t$Faltantes[$c]->setCreditos($creditos);\n\t\t\t\t\t\t$ret['sobraram'] = $creditos;\n\t\t\t\t\t\treturn $ret;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "function SupprimerProfil($pseudonyme){\r\n\t\t$conn = mysqli_connect(\"localhost\", \"root\", \"\", \"bddfinale\");\r\n\t\t$requete = \"DELETE FROM allinformations WHERE Pseudo='$pseudonyme'\";\r\n\t\t$ligne= mysqli_query($conn, $requete);\t\r\n\t\tmysqli_close($conn);\t\t\r\n\t\t}", "function eliminarMaquinaria(){\n\t\t$this->procedimiento='snx.ft_maquinaria_ime';\n\t\t$this->transaccion='SNX_MAQ_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_maquinaria','id_maquinaria','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function delIdentity()\n\t{\n\t\t// Verifier l'adhesion\n\t\t$q = new Bn_query('u2a', '_asso');\n\t\t$q->setFields('u2a_adherentid');\n\t\t$q->addWhere('u2a_userid='. $this->getVal('id', -1));\n\t\t$adheId = $q->getOne();\n\t\t$q->deleteRow();\n\t\t$q->setTables('adherents');\n\t\t$q->deleteRow('adhe_id=' . $adheId);\n\t}", "public function eliminar()\r\n {\r\n $data = new stdClass();\r\n $data->horario = $this->session->horario;\r\n\r\n $this->load->view('overall/head');\r\n $this->load->view('overall/header');\r\n $this->load->view('eliminar/content', $data);\r\n $this->load->view('overall/footer');\r\n }", "private function removeFilmsSinFuncionesDePeliculas(){\n \n $query = \n \"DELETE p\n FROM \" . $this->tableName . \" p\n LEFT JOIN funciones f\n ON p.id = f.id_pelicula\n WHERE f.id_pelicula IS NULL\";\n try{\n $this->connection = Connection::GetInstance();\n $this->connection->ExecuteNonQuery($query);\n\n } catch (Exception $ex){ \n throw $ex;\n }\n }", "function eliminar_asignacion_f($grupo_id)\n {\n \n $this->output->enable_profiler(TRUE);\n \n //Cargando modelo de flipbooks\n $this->load->model('Flipbook_model');\n \n $resultado['num_insertados'] = 0;\n \n //\n $flipbook_id = $this->input->post('flipbook_id');\n \n //Creando registro\n //Variables comunes\n $condicion['flipbook_id'] = $flipbook_id;\n \n //Lista de estudiantes, estudiantes que están asociados a un flipbook\n $this->db->where('flipbook_id', $flipbook_id);\n $this->db->where('usuario.grupo_id', $grupo_id);\n $this->db->join('usuario', 'usuario.id = usuario_flipbook.usuario_id');\n \n $estudiantes = $this->db->get('usuario_flipbook');\n \n //\n \n $resultado['num_eliminados'] = 0;\n \n //Se recorre toda la lista de estudiantes del grupo\n foreach ($estudiantes->result() as $row_estudiante){\n \n //Si para el estudiante la casilla del formulario está marcada, se elimina el registro\n if ( $this->input->post($row_estudiante->id) ){\n //Se completa el array condición para ser utilizado en $this->where\n $condicion['usuario_id'] = $row_estudiante->id;\n $resultado['num_eliminados'] += $this->Flipbook_model->eliminar_uf($condicion);\n }\n }\n \n $this->session->set_flashdata('resultado', $resultado);\n \n redirect(\"grupos/quitar_flipbook/{$grupo_id}/{$flipbook_id}\");\n \n }", "public function remover() {\n \n $queryVerificaInscricao = '\n select * from tb_inscricao_atividade where id_atividade = :id_atividade \n ';\n \n $stmtInscAtt = $this->conexao->prepare($queryVerificaInscricao);\n $stmtInscAtt->bindValue(':id_atividade', $_GET['id_att']);\n $stmtInscAtt->execute();\n \n $inscAtt = $stmtInscAtt->fetchAll(PDO::FETCH_OBJ);\n \n // echo '<pre>';\n // print_r($inscAtt);\n // echo '</pre>';\n \n if (!empty($inscAtt)) {\n foreach ($inscAtt as $inscAttInd) {\n $queryDeleteInscAtt = 'delete from tb_inscricao_atividade where \n id_atividade = :id_atividadeDel and \n id_evento = :id_eventoDel and \n id_usuario = :id_usuarioDel';\n \n $stmtInscAttDel = $this->conexao->prepare($queryDeleteInscAtt);\n $stmtInscAttDel->bindValue(':id_atividadeDel', $inscAttInd->id_atividade);\n $stmtInscAttDel->bindValue(':id_eventoDel', $inscAttInd->id_evento);\n $stmtInscAttDel->bindValue(':id_usuarioDel', $inscAttInd->id_usuario);\n $stmtInscAttDel->execute();\n }\n }\n\n $queryInscCupomAtt = '\n select * from tb_cupom where id_atividade = :id_atividadeCupDel\n ';\n\n $stmtInscCupomAtt = $this->conexao->prepare($queryInscCupomAtt);\n $stmtInscCupomAtt->bindValue(':id_atividadeCupDel', $_GET['id_att']);\n $stmtInscCupomAtt->execute();\n\n $cupomAtt = $stmtInscCupomAtt->fetchAll(PDO::FETCH_OBJ);\n\n // echo '<pre>';\n // print_r($cupomAtt);\n // echo '</pre>';\n\n if (!empty($cupomAtt)) {\n foreach ($cupomAtt as $cupomAttInd) {\n $queryDeleteCupomAtt = '\n delete from tb_cupom where id = :id_cupomDel\n ';\n\n echo $cupomAttInd->id;\n\n $stmtInscCupomAttDel = $this->conexao->prepare($queryDeleteCupomAtt);\n $stmtInscCupomAttDel->bindValue(':id_cupomDel', $cupomAttInd->id);\n $stmtInscCupomAttDel->execute();\n }\n }\n \n $query = '\n delete from tb_atividade \n where id = :id';\n\n $stmt = $this->conexao->prepare($query);\n $stmt->bindValue(':id', $_GET['id_att']);\n\n return $stmt->execute();\n }", "function eliminarReenvioFactura(){\n\t\t$this->procedimiento='vef.ft_reenvio_factura_ime';\n\t\t$this->transaccion='VF_REFACOR_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_reenvio_factura','id_reenvio_factura','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function EliminarProveedores()\n\t\t{\n\t\t\tif($_SESSION['acceso'] == \"administrador\") {\n\n\t\t\t\t$sql = \" select codproveedor from compras where codproveedor = ? \";\n\t\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t\t$stmt->execute( array(base64_decode($_GET[\"codproveedor\"])) );\n\t\t\t\t$num = $stmt->rowCount();\n\t\t\t\tif($num == 0)\n\t\t\t\t{\n\n\t\t\t\t\t$sql = \" delete from proveedores where codproveedor = ? \";\n\t\t\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t\t\t$stmt->bindParam(1,$codproveedor);\n\t\t\t\t\t$codproveedor = base64_decode($_GET[\"codproveedor\"]);\n\t\t\t\t\t$stmt->execute();\n\n\t\t\t\t\theader(\"Location: proveedores?mesage=1\");\n\t\t\t\t\texit;\n\n\t\t\t\t}else {\n\n\t\t\t\t\theader(\"Location: proveedores?mesage=2\");\n\t\t\t\t\texit;\n\t\t\t\t} \n\n\t\t\t} else {\n\n\t\t\t\theader(\"Location: proveedores?mesage=3\");\n\t\t\t\texit;\n\t\t\t}\t\n\t\t}", "function cancella_valore($chiave) {\n unset($_SESSION[$chiave]);\n }", "public function excluir_prof_turma($id)\n {\n $this->db->where('id_prof_turma', $id);\n $this->db->delete('prof_turma');\n return TRUE;\n }", "protected function eliminar($id)\n {\n }", "public function eliminar(){\n $sql = \"UPDATE especialidad SET Estado = ? WHERE Id_Especialidad = ?;\";\n //preparando la consulta\n $query = $this->conexion->prepare($sql);\n //bindeando los parametros de la consulta prepar\n $query->bindParam(1, $this->estado);\n $query->bindParam(2, $this->id_especialidad);\n //ejecutando\n $result = $query->execute();\n //retornando true si se ejecuto, false si no\n return $result;\n }", "private function removeFilmsSinFuncionesDePeliculaxgenero(){\n \n $query = \n \"DELETE pg\n FROM peliculaxgenero pg\n LEFT JOIN funciones f\n ON pg.id_pelicula = f.id_pelicula\n WHERE f.id_pelicula IS NULL\";\n try{\n $this->connection = Connection::GetInstance();\n $this->connection->ExecuteNonQuery($query);\n\n } catch (Exception $ex){ \n throw $ex;\n }\n }", "private function eliminarEmpleadoRepetido()\n {\n //Sino me los trata como strings\n $this->empleados = array_unique($this->empleados, SORT_REGULAR);\n }", "function supprimerArticle($id_produit){\n //Si le panier existe\n if (creating_cart())\n {\n //Nous allons passer par un panier temporaire\n $tmp=array();\n\t $tmp['id_produit'] = array();\n $tmp['nom_produit'] = array();\n $tmp['prix_produit'] = array();\n $tmp['qte_produit'] = array();\n $tmp['desc_produit'] = array();\n\t $tmp['img_produit'] = array();\n\t $tmp['ptsfid_produit'] = array();\n\n\n\n for($i = 0; $i < count($_SESSION['panier']['id_produit']); $i++)\n {\n if ($_SESSION['panier']['id_produit'][$i] !== $id_produit)\n {\n array_push( $tmp['id_produit'],$_SESSION['panier']['id_produit'][$i]);\n array_push( $tmp['nom_produit'],$_SESSION['panier']['nom_produit'][$i]);\n array_push( $tmp['prix_produit'],$_SESSION['panier']['prix_produit'][$i]);\n array_push( $tmp['qte_produit'],$_SESSION['panier']['qte_produit'][$i]);\n array_push( $tmp['desc_produit'],$_SESSION['panier']['desc_produit'][$i]);\n\t\t\tarray_push( $tmp['img_produit'],$_SESSION['panier']['img_produit'][$i]);\n\t\t\tarray_push( $tmp['ptsfid_produit'],$_SESSION['panier']['ptsfid_produit'][$i]);\n\n }\n\n }\n //On remplace le panier en session par notre panier temporaire à jour\n $_SESSION['panier'] = $tmp;\n //On efface notre panier temporaire\n unset($tmp);\n\t \theader(\"Location: panier.php\");\n\t\tdie();\n }\n else\n echo \"Un problème est survenu veuillez contacter l'administrateur du site.\";\n}", "function eliminarViajeroInterno(){\n\t\t$this->procedimiento='obingresos.ft_viajero_interno_ime';\n\t\t$this->transaccion='OBING_CVI_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_viajero_interno','id_viajero_interno','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function eliminarVentas($id_unico){\n //echo($id_unico);\n date_default_timezone_set('America/La_Paz');\n $fecha_actual = date(\"y-m-d H:i:s\");\n $datos['vent_prof_cab_usr_baja'] = $_SESSION['login'];\n $datos['vent_prof_cab_fech_hr_baja'] = $fecha_actual;\n $condicion = \"vent_prof_cab_cod_unico='\".$id_unico.\"'\";\n return $this->mysql->update('vent_prof_cab', $datos, $condicion);\n //$this->mysql->update('vent_prof_cab',$datos,'vent_prof_cab_cod_unico='.$id_unico.'');\n }", "public function eliminarVertice($v){\n\t\tif(isset($this->vectorV[$v])){\n\t\t\tforeach ($this->matrizA as $vp => $adya) {\n\t\t\t\tif($adya !=null){\n\t\t\t\t\tforeach ($adya as $de => $pe) {\n\t\t\t\t\t\tif($de == $v){\n\t\t\t\t\t\t\tunset($this->matrizA[$vp][$de]);\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\tunset($this->matrizA[$v]);\n\t\t\tunset($this->vectorV[$v]);\n\t\t} else{\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\n\t}", "public function decopersonnel()\n {\n $this->session-> unset_userdata('admin','info','id');\n $this ->session->sess_destroy();\n $this->template->display('acceuil');\n }", "function desactivar(){\n\t\t// $rs = $this->ejecuta($sql);\n\t\t// if($this->como_va()){\n\t\t// \treturn false;\n\t\t// }else{\n\t\t \t$sql = \"UPDATE proveedor SET status='0' WHERE id_prov='$this->cod_prov'\";\n\t\t\t$this->ejecuta($sql);\n\t}", "function eliminarProcesoCompra(){\n\t\t$this->procedimiento='adq.f_proceso_compra_ime';\n\t\t$this->transaccion='ADQ_PROC_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_proceso_compra','id_proceso_compra','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function galeriaExcluir_action()\n\t{\n\t\t$bd = new GaleriasImagens_Model();\n\t\t$id = abs((int) $this->getParam(3));\n\t\t$resultado = $bd->read(\"galeria={$id} AND usuario={$this->_usuario}\");\n\t\tforeach($resultado as $dados){\n\t\t\tunlink('uploads/img_'.$dados['imagem']);\n\t\t\tunlink('uploads/tb_'.$dados['imagem']);\n\t\t\tunlink('uploads/destaque_'.$dados['imagem']);\n\t\t}\n\t\t$bd->delete(\"galeria={$id} AND usuario={$this->_usuario}\");\n\t\t\n\t\t$bd = new Galerias_Model();\n\t\t$bd->delete(\"id={$id} AND usuario={$this->_usuario}\");\n\t\t\n\t\tHTML::certo('Galeria exclu&iacute;da.');\n\t\t//POG Temporário\n\t\tHTML::Imprime('<script>Abrir(\"#abreGaleriasListar\",\"#galerias\");</script>');\n\t}", "function supprimePanier()\n {\n\tif (isset($_SESSION['panier']))\n\t{\n unset($_SESSION['panier']);\n\t}\n}", "public function Eliminar_Exp_Laboral($data){\n $modelo = new HojaVida();\n $fechahora = $modelo->get_fecha_actual();\n $datosfecha = explode(\" \",$fechahora);\n $fechalog = $datosfecha[0];\n $horalog = $datosfecha[1];\n $tiporegistro = \"Experiencia Laboral\";\n $accion = \"Elimina una Nueva \".$tiporegistro.\" de el Sistema (Hoja vida) TALENTO HUMANO\";\n $detalle = $_SESSION['nombre'].\" \".$accion.\" \".$fechalog.\" \".\"a las: \".$horalog;\n $tipolog = 15;\n $idusuario = $_SESSION['idUsuario'];\n //$idusuario = $_POST['id_user'];;\n try {\n $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); \n //EMPIEZA LA TRANSACCION\n $this->pdo->beginTransaction();\n $sql = \"DELETE FROM th_experiencia_laboral WHERE exp_id = ?\";\n\n $this->pdo->prepare($sql)\n ->execute(\n array(\n $data->id\n )\n ); \n $this->pdo->exec(\"INSERT INTO log (fecha, accion,detalle,idusuario,idtipolog) VALUES ('$fechalog', '$accion','$detalle','$idusuario','$tipolog')\");\n //SE TERMINA LA TRANSACCION \n $this->pdo->commit();\n } catch (Exception $e) {\n $this->pdo->rollBack();\n die($e->getMessage());\n }\n }", "function deletefinite($val1,$val2)\t// elimina la identificacion\n\t{\n $obj_Gurpo=new Conexion();\n $query=\"delete from fin where id_exp=$val1 and id_fin=$val2\";\n\t\t\t$obj_Gurpo->consulta($query); // ejecuta la consulta para borrar la identificacion\n\t\t\treturn '<div id=\"mensaje\"><p/><h4>Se Habilito el Expediente</h4></div>'; // retorna todos los registros afectados\n\n }", "public function destroy(Profesor $profesor)\n {\n //\n }", "function runEliminar(){\n \n $sql = \"DELETE FROM mec_met WHERE id_mecanismos IN (SELECT id_mecanismos FROM mecanismos WHERE id_componente=\".$this->_datos.\")\";\n $this->QuerySql($sql);\n $sql = \"DELETE FROM mecanismos WHERE id_componente=\".$this->_datos;\n $this->QuerySql($sql);\n $sql = \"DELETE FROM componentes WHERE id_componentes=\".$this->_datos;\n $_respuesta = array('Codigo' => 0, \"Mensaje\" => '<strong> OK: </strong> El registro se ha eliminado.');\n try { \n $this->QuerySql($sql);\n }\n catch (exception $e) {\n $_respuesta = array('Codigo' => 99, \"Mensaje\" => $e->getMessage());\n }\n \n print_r(json_encode($_respuesta));\n }", "public function eliminar()\n\t{\n\t\textract($_REQUEST);\n\t\t$db=new clasedb;\n\t\t$conex=$db->conectar();\n\t\t$sql=\"DELETE FROM asistencias WHERE id=\".$id_asistencias;\n\t\t\n\t$res=mysqli_query($conex,$sql);\n\t\tif ($res) {\n\t\t\t?>\n\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\talert(\"Registro eliminado\");\n\t\t\t\t\twindow.location=\"ControlA.php?operacion=index\";\n\t\t\t\t</script>\n\t\t\t<?php\n\t\t} else {\n\t\t\t?>\n\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\talert(\"Registro no pudo ser eliminado, Vuelva a intentarlo!\");\n\t\t\t\t\twindow.location=\"ControlA.php?operacion=index\";\n\t\t\t\t</script>\n\t\t\t<?php\n\t\t}\n\t}", "function procesar_delete ($datos){\n \n $this->dep('datos')->tabla('asignacion')->cargar(array('id_asignacion'=>$this->s__id_asignacion));\n $asignacion=$this->dep('datos')->tabla('asignacion')->get();\n $this->dep('datos')->tabla('asignacion')->eliminar_fila($asignacion['x_dbr_clave']);\n $this->dep('datos')->tabla('asignacion')->sincronizar();\n }", "function elimina_vetrina()\n {\n $peer = new VetrinaPeer();\n $do = $peer->find_by_id(Params::get(\"id_vetrina\"));\n $peer->delete($do);\n\n $peer2 = new ProdottoServizioVetrinaPeer();\n $peer2->id_vetrina__EQUAL(Params::get(\"id_vetrina\"));\n $elenco_prodotti_servizi = $peer2->find();\n foreach ($elenco_prodotti_servizi as $ps)\n $peer2->delete($ps);\n\n if (is_html())\n return Redirect::success();\n else\n return Result::ok();\n }", "public function eliminarItemsVentas($id_unico){\n //echo($id_unico.\"---\");\n \n date_default_timezone_set('America/La_Paz');\n $fecha_actual = date(\"y-m-d H:i:s\");\n $datos['vent_prof_det_usr_baja'] = $_SESSION['login'];\n $datos['vent_prof_det_fech_hr_baja'] = $fecha_actual;\n $condicion = \"vent_prof_det_cod_unico='\".$id_unico.\"'\";\n return $this->mysql->update('vent_prof_det', $datos, $condicion);\n //$this->mysql->update('vent_prof_cab',$datos,'vent_prof_cab_cod_unico='.$id_unico.'');\n }", "public function EliminarMovimientoCajas()\n{\n\tif($_SESSION['acceso'] == \"administrador\") {\n\n#################### AQUI AGREGAMOS EL INGRESO A ARQUEO DE CAJA ####################\n\t$sql = \"select montoinicial, ingresos, egresos from arqueocaja where codcaja = '\".base64_decode($_GET[\"codcaja\"]).\"' and statusarqueo = '1'\";\n\tforeach ($this->dbh->query($sql) as $row)\n\t{\n\t\t$this->p[] = $row;\n\t}\n\t$inicial = $row['montoinicial'];\n\t$ingreso = $row['ingresos'];\n\t$egreso = $row['egresos'];\n\nif(base64_decode($_GET[\"tipomovimientocaja\"])==\"INGRESO\"){\n\n\t\t$sql = \" update arqueocaja set \"\n\t\t.\" ingresos = ? \"\n\t\t.\" where \"\n\t\t.\" codcaja = ? and statusarqueo = '1';\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $ingresos);\n\t\t$stmt->bindParam(2, $codcaja);\n\n\t\t$entro = base64_decode($_GET[\"montomovimientocaja\"]);\n\t\t$ingresos = rount($ingreso-$entro,2);\n\t\t$codcaja = base64_decode($_GET[\"codcaja\"]);\n\t\t$stmt->execute();\n\n} else {\n\n\t\t$sql = \" update arqueocaja set \"\n\t\t.\" egresos = ? \"\n\t\t.\" where \"\n\t\t.\" codcaja = ? and statusarqueo = '1';\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $egresos);\n\t\t$stmt->bindParam(2, $codcaja);\n\n\t\t$salio = base64_decode($_GET[\"montomovimientocaja\"]);\n\t\t$egresos = rount($egreso-$salio,2);\n\t\t$codcaja = base64_decode($_GET[\"codcaja\"]);\n\t\t$stmt->execute();\n }\n\n\t\t$sql = \" delete from movimientoscajas where codmovimientocaja = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codmovimientocaja);\n\t\t$codmovimientocaja = base64_decode($_GET[\"codmovimientocaja\"]);\n\t\t$stmt->execute();\n\n\t\theader(\"Location: movimientoscajas?mesage=1\");\n\t\texit;\n\n\t} else {\n\n\t\theader(\"Location: movimientoscajas?mesage=2\");\n\t\texit;\n\t} \n}", "function eliminarImagenArreglo($campo, $tabla, $llavePrimaria, $campoLlave)\n {\n $data=$this->analisisRiesgo->getNombreImagenTabla($campo, $tabla, $llavePrimaria, $campoLlave);\n //Delete el nombre de la imagen de la base de datos\n $borrar=Array($campo => null);\n $this->analisisRiesgo->deleteImagenTabla($borrar, $tabla, $llavePrimaria, $campoLlave);\n //Unlink el nombre de la imagen del servidor\n foreach($data as $row)\n {\n $nombreImagen=$row[$campo];\n unlink(\"assets/img/fotoAnalisisRiesgo/$campo/$nombreImagen\");\n echo \"OK\";\n }\n\n }", "function eliminarTabla(){\n\t\t$this->procedimiento='wf.ft_tabla_ime';\n\t\t$this->transaccion='WF_tabla_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_tabla','id_tabla','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "static public function ctrEliminarGaleria(){\n\t\tif(isset($_POST[\"accionGaleria\"]) && $_POST[\"accionGaleria\"] == \"eliminar\"){\t\t\t\n\t\t\t$tabla1 = \"vtaca_galeria\";\n\t\t\t$tabla2 = \"vtade_galeria\";\n\t\t\t$codigo = $_POST[\"codigoGaleria\"];\t\t\t\n\t\t\t//OBTENER IMAGENES\n\t\t\t$item = \"cod_galeria\";\n\t\t\t$entrada = \"imagenTipoGaleria\";\n\t\t\t$imagenes = ModeloGaleria::mdlMostrarGaleriaDetalle($tabla2,$item,$codigo,$entrada);\n\t\t\t//ELIMINAR GALERIA\n\t\t\t$respuesta = ModeloGaleria::mdlEliminarGaleria($tabla1,$tabla2,$codigo);\t\t\t\n\t\t\tif($respuesta == \"ok\"){\n\t\t\t\t$rutaGlobal = realpath(dirname(__FILE__));\n\t\t\t\t$rutaGlobal = rutaGlobal($rutaGlobal);\n\t\t\t\tforeach ($imagenes as $key => $value) {\n\t\t\t\t\t$rutaEliminarImagen = $rutaGlobal.\"/archivos/galeria/\".utf8_decode($value[\"imagen\"]);\n\t\t\t\t\tunlink($rutaEliminarImagen);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $respuesta;\n\t\t}//if\n\t}", "function eliminarConceptoCta(){\n\t\t$this->procedimiento='pre.f_concepto_cta_ime';\n\t\t$this->transaccion='PRE_CCTA_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_concepto_cta','id_concepto_cta','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function eliminarCuentaBancaria(){\n\t\t$this->procedimiento='sigep.ft_cuenta_bancaria_ime';\n\t\t$this->transaccion='SIGEP_CUEN_BAN_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cuenta_bancaria_boa','id_cuenta_bancaria_boa','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "protected\n function eliminar($id)\n {\n }", "function supprimerArticle($Libelle_Produit) {\n if (isset($_SESSION['panier'])) {\n // Création du panier temporaire\n $tmp = array();\n $tmp['Id_Produit'] = array();\n $tmp['Libelle_Produit'] = array();\n $tmp['Prix'] = array();\n\n for ($i = 0; $i < count($_SESSION['panier']['Libelle_Produit']); $i++) {\n if ($_SESSION['panier']['Libelle_Produit'][$i] !== $Libelle_Produit) {\n array_push($tmp['Id_Produit'], $_SESSION['panier']['Id_Produit'][$i]);\n array_push($tmp['Libelle_Produit'], $_SESSION['panier']['Libelle_Produit'][$i]);\n array_push($tmp['Prix'], $_SESSION['panier']['Prix'][$i]);\n }\n }\n // On remplace notre panier session par le panier temp\n $_SESSION['panier'] = $tmp;\n // On efface le panier temporaire\n unset($tmp);\n } else {\n echo \"Un problème est survenu veuillez contacter l'administrateur du site.\";\n }\n}", "public function EliminarDetallesVentas()\n{\n\tif($_SESSION['acceso'] == \"administrador\") {\n\n\t\tself::SetNames();\n\n\t\t$sql = \" select * from detalleventas where codventa = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array(strip_tags($_GET[\"codventa\"])) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num > 1)\n\t\t{\n\n\t$sql2 = \"select existencia from productos where codproducto = ?\";\n\t$stmt = $this->dbh->prepare($sql2);\n\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t$num = $stmt->rowCount();\n\n\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t$existenciadb = $p[0][\"existencia\"];\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t$sql = \" update productos set \"\n\t.\" existencia = ? \"\n\t.\" where \"\n\t.\" codproducto = ?;\n\t\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->bindParam(1, $existencia);\n\t$stmt->bindParam(2, $codproducto);\n\t$cantventa = strip_tags(base64_decode($_GET[\"cantventa\"]));\n\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t$existencia = $existenciadb + $cantventa;\n\t$stmt->execute();\n\n\t$sql = \" delete from detalleventas where coddetalleventa = ? \";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->bindParam(1,$coddetalleventa);\n\t$coddetalleventa = base64_decode($_GET[\"coddetalleventa\"]);\n\t$stmt->execute();\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t$sql = \" delete from kardexproductos where codproceso = ? and codproducto = ?\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->bindParam(1,$codventa);\n\t$stmt->bindParam(2,$codproducto);\n\t$codventa = strip_tags(strip_tags($_GET[\"codventa\"]));\n\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t$stmt->execute();\n\n################## CONSULTO LA TABLA PARA VERIFICAR SI EXISTEN PRODUCTOS #################\n$sql = \"select * from productosvsingredientes where codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($codproducto));\n\t\t$num = $stmt->rowCount();\n if($num>0) {\n\n$sql = \"select * from productosvsingredientes LEFT JOIN ingredientes ON productosvsingredientes.codingrediente = ingredientes.codingrediente where productosvsingredientes.codproducto = '\".$codproducto.\"'\";\n\n\t$array=array();\n\n\t\tforeach ($this->dbh->query($sql) as $row)\n\t\t{\n\t\t$this->p[] = $row;\n\n\t\t$codproducto = $row['codproducto'];\n\t\t$codingrediente = $row['codingrediente'];\n\t\t$cantracion = $row['cantracion'];\n\t\t$cantingrediente = $row['cantingrediente'];\n\t\t$costoingrediente = $row['costoingrediente'];\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexingredientes where codprocesoing = ? and codproducto = ? and codingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codventa);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$stmt->bindParam(3,$codingrediente);\n\t\t$codventa = strip_tags(strip_tags($_GET[\"codventa\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$codingrediente = strip_tags($codingrediente);\n\t\t$stmt->execute();\n\n\t\t$update = \" update ingredientes set \"\n\t\t.\" cantingrediente = ? \"\n\t\t.\" where \"\n\t\t.\" codingrediente = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($update);\n\t\t$stmt->bindParam(1, $cantidadracion);\n\t\t$stmt->bindParam(2, $codingrediente);\n\n\t\t$cantventa = strip_tags(base64_decode($_GET[\"cantventa\"]));\n\t\t$racion = rount($cantracion*$cantventa,2);\n\t\t$cantidadracion = rount($cantingrediente+$racion,2);\n\t\t$stmt->execute();\n\n\t\t }\n}\n############ FIN DE CONSULTO LA TABLA PARA VERIFICAR SI EXISTEN PRODUCTOS REGISTRADOS ##############\n\n\t$sql4 = \"select * from ventas where codventa = ? \";\n\t\t$stmt = $this->dbh->prepare($sql4);\n\t\t$stmt->execute( array(strip_tags($_GET[\"codventa\"])) );\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$paea[] = $row;\n\t\t}\n\t\t$subtotalivasive = $paea[0][\"subtotalivasive\"];\n\t\t$subtotalivanove = $paea[0][\"subtotalivanove\"];\n\t\t$iva = $paea[0][\"ivave\"]/100;\n\t\t$descuento = $paea[0][\"descuentove\"]/100;\n\t\t$totalivave = $paea[0][\"totalivave\"];\n\t\t$totaldescuentove = $paea[0][\"totaldescuentove\"];\n\t\t$totaldb = $paea[0][\"totalpago\"];\n\t\t$montopagado = $paea[0][\"montopagado\"];\n\t\t\t\n\t\t\n$sql3 = \"select sum(importe) as importe, sum(importe2) as importe2, sum(preciocompra) as preciocompra from detalleventas where codventa = ? and ivaproducto = 'SI'\";\n\t\t$stmt = $this->dbh->prepare($sql3);\n\t\t$stmt->execute( array(strip_tags($_GET[\"codventa\"])));\n\t\t$num = $stmt->rowCount();\n\t\t \n\t\t if($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$pae[] = $row;\n\t\t\t}\n\t\t$preciocompraiva = ($pae[0][\"preciocompra\"]== \"\" ? \"0\" : $pae[0][\"preciocompra\"]);\n\t\t$importeivasi = ($pae[0][\"importe\"]== \"\" ? \"0\" : $pae[0][\"importe\"]);\n\t\t$importe2si = ($pae[0][\"importe2\"]== \"\" ? \"0\" : $pae[0][\"importe2\"]);\n\t\n$sql5 = \"select sum(importe) as importe, sum(importe2) as importe2, sum(preciocompra) as preciocompra from detalleventas where codventa = ? and ivaproducto = 'NO'\";\n\t\t$stmt = $this->dbh->prepare($sql5);\n\t\t$stmt->execute( array(strip_tags($_GET[\"codventa\"])));\n\t\t$num = $stmt->rowCount();\n\t\t \n\t\t if($roww = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$p[] = $roww;\n\t\t\t}\n\t\t$preciocompra = ($roww[\"preciocompra\"]== \"\" ? \"0\" : $roww[\"preciocompra\"]);\n\t\t$importeivano = ($roww[\"importe\"]== \"\" ? \"0\" : $roww[\"importe\"]);\n\t\t$importe2 = ($roww[\"importe2\"]== \"\" ? \"0\" : $roww[\"importe2\"]);\n\t\t\nif(base64_decode($_GET[\"ivaproducto\"])==\"SI\"){\t\n\n\t\t$sql = \" update ventas set \"\n\t\t\t .\" subtotalivasive = ?, \"\n\t\t\t .\" totalivave = ?, \"\n\t\t\t .\" totaldescuentove = ?, \"\n\t\t\t .\" totalpago= ?, \"\n\t\t\t .\" montodevuelto= ? \"\n\t\t\t .\" where \"\n\t\t\t .\" codventa = ?;\n\t\t\t \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $subtotal);\n\t\t$stmt->bindParam(2, $totaliva);\n\t\t$stmt->bindParam(3, $totaldescuentove);\n\t\t$stmt->bindParam(4, $totalpago);\n\t\t$stmt->bindParam(5, $devuelto);\n\t\t$stmt->bindParam(6, $codventa);\n\t\t\n\t\t$subtotal= strip_tags($importeivasi);\n $totaliva= rount($subtotal*$iva,2);\n\t\t$tot= rount($subtotal+$subtotalivanove+$totaliva,2);\n\t\t$totaldescuentove= rount($tot*$descuento,2);\n\t\t$totalpago= rount($tot-$totaldescuentove,2);\n\t\t$devuelto= ($montopagado== \"0.00\" ? \"0\" : rount($montopagado-$totalpago,2));\n\t\t$codventa = strip_tags($_GET[\"codventa\"]);\n\t\t$stmt->execute();\n\n#################### AQUI AGREGAMOS EL INGRESO A ARQUEO DE CAJA ####################\nif (base64_decode($_GET[\"tipopagove\"])==\"CONTADO\"){\n\n$sql = \"select ingresos from arqueocaja where codcaja = '\".strip_tags($_GET[\"codcaja\"]).\"' and statusarqueo = '1'\";\n\t\tforeach ($this->dbh->query($sql) as $row)\n\t\t{\n\t\t\t$this->p[] = $row;\n\t\t}\n\t\t$ingreso = ($row['ingresos']== \"\" ? \"0.00\" : $row['ingresos']);\n\n\t\t$sql = \" update arqueocaja set \"\n\t\t.\" ingresos = ? \"\n\t\t.\" where \"\n\t\t.\" codcaja = ? and statusarqueo = '1';\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $txtTotal);\n\t\t$stmt->bindParam(2, $codcaja);\n\n\t\t$calculo=rount($totaldb-$totalpago,2);\n\t\t$txtTotal = rount($ingreso-$calculo,2);\n\t\t$codcaja = strip_tags($_GET[\"codcaja\"]);\n\t\t$stmt->execute();\n\t}\n#################### AQUI AGREGAMOS EL INGRESO A ARQUEO DE CAJA ####################\n\t\t\n\t\t } else {\n\n $sql = \" update ventas set \"\n\t\t\t .\" subtotalivanove = ?, \"\n\t\t\t .\" totaldescuentove = ?, \"\n\t\t\t .\" totalpago= ?, \"\n\t\t\t .\" montodevuelto= ? \"\n\t\t\t .\" where \"\n\t\t\t .\" codventa = ?;\n\t\t\t \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $subtotal);\n\t\t$stmt->bindParam(2, $totaldescuentove);\n\t\t$stmt->bindParam(3, $totalpago);\n\t\t$stmt->bindParam(4, $devuelto);\n\t\t$stmt->bindParam(5, $codventa);\n\t\t\n\t\t$subtotal= strip_tags($importeivano);\n\t\t$tot= rount($subtotal+$subtotalivasive+$totalivave,2);\n\t\t$totaldescuentove= rount($tot*$descuento,2);\n\t\t$totalpago= rount($tot-$totaldescuentove,2);\n\t\t$devuelto= ($montopagado== \"0.00\" ? \"0\" : rount($montopagado-$totalpago,2));\n\t\t$codventa = strip_tags($_GET[\"codventa\"]);\n\t\t$stmt->execute();\n\n#################### AQUI AGREGAMOS EL INGRESO A ARQUEO DE CAJA ####################\nif (base64_decode($_GET[\"tipopagove\"])==\"CONTADO\"){\n\n$sql = \"select ingresos from arqueocaja where codcaja = '\".strip_tags($_GET[\"codcaja\"]).\"' and statusarqueo = '1'\";\n\t\tforeach ($this->dbh->query($sql) as $row)\n\t\t{\n\t\t\t$this->p[] = $row;\n\t\t}\n\t\t$ingreso = ($row['ingresos']== \"\" ? \"0.00\" : $row['ingresos']);\n\n\t\t$sql = \" update arqueocaja set \"\n\t\t.\" ingresos = ? \"\n\t\t.\" where \"\n\t\t.\" codcaja = ? and statusarqueo = '1';\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $txtTotal);\n\t\t$stmt->bindParam(2, $codcaja);\n\n\t\t$calculo=rount($totaldb-$totalpago,2);\n\t\t$txtTotal = rount($ingreso-$calculo,2);\n\t\t$codcaja = strip_tags($_GET[\"codcaja\"]);\n\t\t$stmt->execute();\n\t}\n#################### AQUI AGREGAMOS EL INGRESO A ARQUEO DE CAJA ####################\n\t\t\n\t } \n\necho \"<div class='alert alert-info'>\";\necho \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\necho \"<center><span class='fa fa-check-square-o'></span> EL DETALLE DE VENTA DE PRODUCTO FUE ELIMINADO EXITOSAMENTE </center>\";\necho \"</div>\";\nexit;\n\t\t}\n\t\telse\n\t\t{\n\n\t\t\t$sql2 = \"select existencia from productos where codproducto = ?\";\n\t\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t\t$num = $stmt->rowCount();\n\n\t\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$p[] = $row;\n\t\t\t}\n\t\t\t$existenciadb = $p[0][\"existencia\"];\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t\t$sql = \" update productos set \"\n\t\t\t.\" existencia = ? \"\n\t\t\t.\" where \"\n\t\t\t.\" codproducto = ?;\n\t\t\t\";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1, $existencia);\n\t\t\t$stmt->bindParam(2, $codproducto);\n\t\t\t$cantventa = strip_tags(base64_decode($_GET[\"cantventa\"]));\n\t\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t\t$existencia = $existenciadb + $cantventa;\n\t\t\t$stmt->execute();\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t\t$sql = \" delete from kardexproductos where codproceso = ? and codproducto = ?\";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1,$codventa);\n\t\t\t$stmt->bindParam(2,$codproducto);\n\t\t\t$codventa = strip_tags(strip_tags($_GET[\"codventa\"]));\n\t\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t\t$stmt->execute();\n\n\n################## CONSULTO LA TABLA PARA VERIFICAR SI EXISTEN PRODUCTOS #######################\n$sql = \"select * from productosvsingredientes where codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($codproducto));\n\t\t$num = $stmt->rowCount();\nif($num>0) {\n\n\n\t$sql = \"select * from productosvsingredientes LEFT JOIN ingredientes ON productosvsingredientes.codingrediente = ingredientes.codingrediente where productosvsingredientes.codproducto = '\".$codproducto.\"'\";\n\n\t$array=array();\n\n\tforeach ($this->dbh->query($sql) as $row)\n\t{\n\t\t$this->p[] = $row;\n\n\t\t$codproducto = $row['codproducto'];\n\t\t$codingrediente = $row['codingrediente'];\n\t\t$cantracion = $row['cantracion'];\n\t\t$cantingrediente = $row['cantingrediente'];\n\t\t$costoingrediente = $row['costoingrediente'];\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexingredientes where codprocesoing = ? and codproducto = ? and codingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codventa);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$stmt->bindParam(3,$codingrediente);\n\t\t$codventa = strip_tags(strip_tags($_GET[\"codventa\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$codingrediente = strip_tags($codingrediente);\n\t\t$stmt->execute();\n\n\n\t\t$update = \" update ingredientes set \"\n\t\t.\" cantingrediente = ? \"\n\t\t.\" where \"\n\t\t.\" codingrediente = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($update);\n\t\t$stmt->bindParam(1, $cantidadracion);\n\t\t$stmt->bindParam(2, $codingrediente);\n\n\t\t$cantventa = strip_tags(base64_decode($_GET[\"cantventa\"]));\n\t\t$racion = rount($cantracion*$cantventa,2);\n\t\t$cantidadracion = rount($cantingrediente+$racion,2);\n\t\t$stmt->execute();\n\n\n\t\t }\n\n}\n################### FIN DE CONSULTO LA TABLA PARA VERIFICAR SI EXISTEN PRODUCTOS ###################\n\n\n#################### AQUI AGREGAMOS EL INGRESO A ARQUEO DE CAJA ####################\n\tif (base64_decode($_GET[\"tipopagove\"])==\"CONTADO\"){\n\n\t\t$sql4 = \"select * from ventas where codventa = ? \";\n\t\t$stmt = $this->dbh->prepare($sql4);\n\t\t$stmt->execute( array(strip_tags($_GET[\"codventa\"])) );\n\t\t$num = $stmt->rowCount();\n\n\t\t\tif($roww = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$paea[] = $roww;\n\t\t\t}\n\t\t$totaldb = $roww[\"totalpago\"];\n\n\t\t$sql = \"select ingresos from arqueocaja where codcaja = '\".strip_tags($_GET[\"codcaja\"]).\"' and statusarqueo = '1'\";\n\t\tforeach ($this->dbh->query($sql) as $row)\n\t\t{\n\t\t\t$this->p[] = $row;\n\t\t}\n\t\tif (isset($row['ingresos'])) { $ingreso = $row['ingresos']; } else { $ingreso ='0.00'; }\n\t\t//$ingreso = $row['ingresos'];\n\n\t\t$sql = \" update arqueocaja set \"\n\t\t.\" ingresos = ? \"\n\t\t.\" where \"\n\t\t.\" codcaja = ? and statusarqueo = '1';\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $txtTotal);\n\t\t$stmt->bindParam(2, $codcaja);\n\n\t\t$txtTotal = rount($ingreso-$totaldb,2);\n\t\t$codcaja = strip_tags($_GET[\"codcaja\"]);\n\t\t$stmt->execute();\n\t}\n#################### AQUI AGREGAMOS EL INGRESO A ARQUEO DE CAJA ####################\n\n#################### AQUI ACTUALIZAMOS EL STATUS DE MESA ####################\n\t\t$sql = \" update mesas set \"\n\t\t.\" statusmesa = ? \"\n\t\t.\" where \"\n\t\t.\" codmesa = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $statusmesa);\n\t\t$stmt->bindParam(2, $codmesa);\n\n\t\t$statusmesa = strip_tags('0');\n\t\t$codmesa = base64_decode($_GET[\"codmesa\"]);\n\t\t$stmt->execute();\n#################### AQUI ACTUALIZAMOS EL STATUS DE MESA ####################\n\n\t\t$sql = \" delete from ventas where codventa = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codventa);\n\t\t$codventa = strip_tags($_GET[\"codventa\"]);\n\t\t$stmt->execute();\n\n\t\t$sql = \" delete from detalleventas where coddetalleventa = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$coddetalleventa);\n\t\t$coddetalleventa = base64_decode($_GET[\"coddetalleventa\"]);\n\t\t$stmt->execute();\n\n\techo \"<div class='alert alert-info'>\";\n\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\techo \"<center><span class='fa fa-check-square-o'></span> EL DETALLE DE VENTA DE PRODUCTO FUE ELIMINADO EXITOSAMENTE </center>\";\n\techo \"</div>\";\n\texit;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\techo \"<div class='alert alert-info'>\";\n\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\techo \"<center><span class='fa fa-check-square-o'></span> USTED NO PUEDE ELIMINAR DETALLES EN VENTAS, NO ERES EL ADMINISTRADOR DEL SISTEMA</center>\";\n\techo \"</div>\";\n\texit;\n\t\t}\n\t}", "function supprimer1($connexion,$nomTable,$nomClePrimaire,$valeurClePrimaire) { \n $req =$connexion -> query(\"DELETE FROM $nomTable WHERE $nomClePrimaire = '$valeurClePrimaire'\");\n }", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "public function EliminarMesas()\n\t{\n\n\t\t$sql = \" select codmesa from ventas where codmesa = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codmesa\"])) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num == 0)\n\t\t{\n\n\t\t\t$sql = \" delete from mesas where codmesa = ? \";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1,$codmesa);\n\t\t\t$codmesa = base64_decode($_GET[\"codmesa\"]);\n\t\t\t$stmt->execute();\n\n\t\t\theader(\"Location: mesas?mesage=1\");\n\t\t\texit;\n\n\t\t}else {\n\n\t\t\theader(\"Location: mesas?mesage=2\");\n\t\t\texit;\n\t\t}\n\n\t}", "function eliminarTablaInstancia(){\n\t\t$this->procedimiento='wf.ft_tabla_instancia_ime';\n\t\t$this->transaccion='WF_TABLAINS_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_tabla','id_tabla','integer');\n\t\t$this->setParametro('tipo_estado','tipo_estado','varchar');\n\t\t$this->setParametro('tipo_proceso','tipo_proceso','varchar');\n\t\t$aux = $this->objParam->getParametro('0');\n\t\t\n\t\t$bd_nombre_tabla = $_SESSION['_wf_ins_'.$aux['tipo_proceso'].'_'.$aux['tipo_estado']]['atributos']['bd_nombre_tabla'];\n\t\t$this->setParametro('id_'.$bd_nombre_tabla,'id_'.$bd_nombre_tabla,'integer');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function eliminarCuentaBancaria(){\n\t\t$this->procedimiento='tes.f_cuenta_bancaria_ime';\n\t\t$this->transaccion='TES_CTABAN_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cuenta_bancaria','id_cuenta_bancaria','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function eliminarCapacidad($condiciones ) {\r\n \r\n \t$this->pdo->beginTransaction();\t\r\n\r\n\r\n\t$r1 = $this->pdo->_delete('tr012_capacidad', $condiciones);\r\n\t\r\n\tif($r1)\r\n\t\t\t{$this->pdo->commit(); return true;}\r\n\telse\t\t\r\n\t\t\t{$this->pdo->rollback(); return \"Error : 1= \".$r1;\t }\r\n }", "public function eliminaAreaFun($id_areafun){\r\n\t\tself::$datoDB->deleteAreaFun($id_areafun);\r\n\t\tself::grillaAreaFun();\r\n\t}", "function eliminar_alumno($codigo){\r\n\t\t\t\t$cn = $this->conexion();\r\n\r\n if($cn!=\"no_conexion\"){\r\n \t$sql=\"delete from $this->nombre_tabla_alumnos where codigo='$codigo'\";\r\n\t\t\t$rs = mysql_query($sql,$cn);\r\n\t\t\tmysql_close($cn);\t\t\t \r\n\t\t\treturn \"mysql_si\";\r\n\t\t\r\n\t\t\t\r\n\t\t}else{\r\n\t\treturn \"mysql_no\";\r\n\t\t}\r\n\t}", "public function EliminarJugador()\n\t{\n\t\t$data['contenido'] = \"Contenido de eliminar Jugador\"; /* Identificador para la carga en la vista */\n\t\t$data['header'] = \"menum\"; /* Identificador para la carga en la vista */\n\n\t\t$this->load->view(\"jugador/EliminarJugador\",$data);\n\t}", "public function removeProfile();", "public function galeriasExcluir_action()\n\t{\n\t\t$bd = new GaleriasImagens_Model();\n\t\t$id = abs((int) $this->getParam(2));\n\t\t$resultado = $bd->read(\"id={$id} AND usuario={$this->_usuario}\");\n\t\tunlink('uploads/img_'.$resultado[0]['imagem']);\n\t\tunlink('uploads/tb_'.$resultado[0]['imagem']);\n\t\tunlink('uploads/destaque_'.$resultado[0]['imagem']);\n\t\t$bd->delete(\"id={$id} AND usuario={$this->_usuario}\");\n\t\tHTML::certo('Imagem exclu&iacute;da.');\n\t\t//POG Temporário\n\t\tHTML::Imprime('<script>Abrir(\"#abreImagemGaleria\",\"#imagens\");</script>');\n\t}", "public function eliminar()\n {\n if (isset ($_REQUEST['id'])){\n $id=$_REQUEST['id'];\n $miConexion=HelperDatos::obtenerConexion();\n $resultado=$miConexion->query(\"call eliminar_localidad($id)\");\n }\n }", "function borrar_prov_serv_cost($idproveedor,$idservicio){\n\t\t$sql=\"\n\t\tDELETE FROM catalogo_proveedor_servicio_costo_negociado WHERE IDPROVEEDOR='$idproveedor' AND IDSERVICIO='$idservicio'\n\t\t\";\n\t\t$this->query($sql);\n\t\treturn;\n\t}" ]
[ "0.6317899", "0.62474984", "0.6086223", "0.6080738", "0.6080181", "0.60276467", "0.60126454", "0.6006299", "0.59553045", "0.59521186", "0.5892324", "0.58873576", "0.5886923", "0.58514565", "0.58043236", "0.5790806", "0.57646465", "0.5762933", "0.570856", "0.57061356", "0.56978685", "0.5683054", "0.566877", "0.56602", "0.5648763", "0.56415504", "0.5641228", "0.56305814", "0.5614312", "0.56001514", "0.55815876", "0.55801475", "0.5571827", "0.55695176", "0.5565493", "0.55591834", "0.5546721", "0.5528741", "0.5527775", "0.55267435", "0.5523698", "0.5522736", "0.55207294", "0.55102354", "0.55014104", "0.5496791", "0.5496696", "0.54952574", "0.5491169", "0.5489648", "0.54829633", "0.5472619", "0.5472433", "0.54688615", "0.5468232", "0.5464818", "0.54594404", "0.5454326", "0.5452609", "0.545201", "0.5451964", "0.54512334", "0.5446076", "0.5440318", "0.5439284", "0.54387414", "0.5435104", "0.5432497", "0.5428546", "0.542631", "0.5424453", "0.54198015", "0.5416861", "0.5416616", "0.5414471", "0.5411739", "0.54075027", "0.5404383", "0.53968424", "0.53945875", "0.5389912", "0.53893405", "0.5388928", "0.53843284", "0.53723836", "0.53714776", "0.53714776", "0.53714776", "0.53714776", "0.53615266", "0.5356061", "0.5352512", "0.53511536", "0.53442883", "0.53435314", "0.5341444", "0.53362113", "0.5327348", "0.5326605", "0.5318968" ]
0.5551863
36
Run the database seeds.
public function run() { Model::unguard(); $this->call(ClubTableSeeder::class); $this->command->info('Clubs table seeded!'); $this->call(DistanceTableSeeder::class); $this->command->info('Distances table seeded!'); $this->call(GenderTableSeeder::class); $this->command->info('Genders table seeded!'); $this->call(RecordTableSeeder::class); $this->command->info('Records table seeded!'); $this->call(RoleTableSeeder::class); $this->command->info('Roles table seeded!'); $this->call(StateTableSeeder::class); $this->command->info('States table seeded!'); $this->call(UserTableSeeder::class); $this->command->info('Users table seeded!'); Model::reguard(); }
{ "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
add index/indexes in specific table columns
function add_index($index, $table, $column) { global $langIndexAdded, $langIndexExists, $langToTable; $num_of_args = func_num_args(); if ($num_of_args <= 3) { $ind_sql = Database::get()->queryArray("SHOW INDEX FROM $table"); foreach ($ind_sql as $i) { if ($i->Key_name == $index) { $retString = "<p>$langIndexExists $table</p>"; return $retString; } } Database::get()->query("ALTER TABLE $table ADD INDEX `$index` ($column)"); } else { $arguments = func_get_args(); // cut the first and second argument array_shift($arguments); array_shift($arguments); $st = ''; for ($j = 0; $j < count($arguments); $j++) { $st .= $arguments[$j] . ','; } $ind_sql = Database::get()->queryArray("SHOW INDEXES FROM `$table`"); foreach ($ind_sql as $i) { if ($i->Key_name == $index) { $retString = "<p>$langIndexExists $table</p>"; return $retString; } } $sql = "ALTER TABLE $table ADD INDEX `$index` ($st)"; $sql = str_replace(',)', ')', $sql); Database::get()->query($sql); } $retString = "<p>$langIndexAdded $langToTable $table</p>"; return $retString; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_additional_index() {\n\t\t$table_name = $this->db->prefix . self::BASE_TABLE;\n\n\t\t$sql = 'ALTER TABLE ' . $table_name . ' ADD `index_8` VARCHAR(127)';\n\n\t\t$this->db->query( $sql );\n\t}", "public function addIndex( $table, $name, $fieldlist, $isPrimary=false );", "function add_clean_index($table, $index)\n {\n }", "protected function setUpIndex()\n {\n $this->getOldTable()->createColumn('foo', Type::STRING, array('length' => 50));\n $this->getOldTable()->createColumn('bar', Type::STRING, array('length' => 50));\n\n $this->getOldTable()->createIndex(array('foo'), false, 'idx_foo');\n\n $this->createOldTable();\n }", "public function addIndex($columns, array $options = [])\r\n {\r\n }", "protected function addIndexes(Table $table)\n {\n $stmt = $this->dbh->query(\"SHOW INDEX FROM `\" . $table->getName() . \"`\");\n\n // Loop through the returned results, grouping the same key_name together\n // adding each column for that key.\n\n $indexes = array();\n while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {\n $colName = $row[\"Column_name\"];\n $name = $row[\"Key_name\"];\n\n if ($name == \"PRIMARY\") {\n continue;\n }\n\n if (!isset($indexes[$name])) {\n $isUnique = ($row[\"Non_unique\"] == 0);\n if ($isUnique) {\n $indexes[$name] = new Unique($name);\n } else {\n $indexes[$name] = new Index($name);\n }\n if ($this->addVendorInfo) {\n $vi = $this->getNewVendorInfoObject($row);\n $indexes[$name]->addVendorInfo($vi);\n }\n $table->addIndex($indexes[$name]);\n }\n\n $indexes[$name]->addColumn($table->getColumn($colName));\n }\n }", "public function addIndex($tableName, $schemaName, $index){ }", "abstract protected function getIndexTableFields();", "abstract protected function makeIndex(string $table, DoctrineDBALIndex $index): Index;", "public function addIndex($type, $name, $column) {\n\t\t$table = $type;\n\t\t$table = $this->safeTable($table);\n\t\t$name = preg_replace('/\\W/','',$name);\n\t\t$column = $this->safeColumn($column);\n\t\tforeach( $this->adapter->get(\"SHOW INDEX FROM $table \") as $ind) {\n\t\t\tif ($ind['Key_name']===$name) return;\n\t\t}\n\t\ttry{ $this->adapter->exec(\"CREATE INDEX $name ON $table ($column) \"); }catch(Exception $e){}\n\t}", "function yy_r40(){ $this->_retvalue = new SQL\\AlterTable\\AddIndex($this->yystack[$this->yyidx + -3]->minor, $this->yystack[$this->yyidx + -1]->minor, $this->yystack[$this->yyidx + 0]->minor); }", "public function hasIndex($tableName, $columns);", "public static function updateIndexes(Connection $conn, Table $dataSetImportTable, DataSetInterface $dataSet, &$removedIndexesCount = 0)\n {\n $inUsedIndexes = [];\n $columnIndexes = [];\n $columnIndexesDatetime = [];\n //$overwriteDateIndex = new ColumnIndex(DataSetInterface::OVERWRITE_DATE, FieldType::DATETIME);\n\n // get custom index config\n $customIndexConfigs = $dataSet->getCustomIndexConfig();\n $dimensionsAndMetrics = $dataSet->getAllDimensionMetrics();\n\n if (empty($customIndexConfigs)) {\n // create default index\n // only add indexes for date columns\n foreach ($dataSet->getDimensions() as $fieldName => $fieldType) {\n if (!in_array($fieldType, [FieldType::DATE, FieldType::DATETIME])) {\n continue;\n }\n\n $columnIndexesDatetime [] = new ColumnIndex($fieldName, $fieldType);\n\n }\n $columnIndexes [] = $columnIndexesDatetime;\n } else {\n // create custom index according config has already had before\n foreach ($customIndexConfigs as $customIndexConfig) {\n foreach ($customIndexConfig as $subField) {\n if ($dataSetImportTable->hasColumn($subField)) {\n if (array_key_exists($subField, $dimensionsAndMetrics)){\n $columnIndex [] = new ColumnIndex($subField, $dimensionsAndMetrics[$subField]);\n }\n }\n }\n if (isset($columnIndex) && !empty($columnIndex))\n $columnIndexes [] = $columnIndex;\n $customIndexConfigs [] = $customIndexConfig;\n\n //reset $columnIndex\n $columnIndex = [];\n }\n }\n\n $createdIndexesCount = 0;\n\n // execute prepared statement for creating indexes\n $conn->beginTransaction();\n\n foreach ($columnIndexes as $multipleColumnIndexes) {\n /** @var ColumnIndex[] $multipleColumnIndexes */\n if (!is_array($multipleColumnIndexes)) {\n continue;\n }\n\n $columnNamesAndLengths = []; // for building sql create index\n\n // build index for multiple columns\n foreach ($multipleColumnIndexes as $singleColumnIndex) {\n if (!$singleColumnIndex instanceof ColumnIndex) {\n continue;\n }\n\n $columnName = $singleColumnIndex->getColumnName();\n if (!$dataSetImportTable->hasColumn($columnName)) {\n continue; // column not found\n }\n\n $columnLength = $singleColumnIndex->getColumnLength();\n $columnNamesAndLengths[] = (null === $columnLength)\n ? $columnName\n : sprintf('%s(%s)', $columnName, $columnLength);\n }\n\n // sure have columns to be created index\n if (empty($columnNamesAndLengths)) {\n continue;\n }\n\n $indexName = self::getDataSetImportTableIndexName($dataSetImportTable->getName());\n\n // update inUsedIndexes\n $inUsedIndexes[] = $indexName;\n\n if ($dataSetImportTable->hasIndex($indexName)) {\n continue; // already has index\n }\n\n $createdIndexesCount++;\n\n self::prepareStatementCreateIndex($conn, $indexName, $dataSetImportTable->getName(), $columnNamesAndLengths);\n sleep(1);\n }\n\n try {\n $conn->commit();\n } catch (\\Exception $e) {\n\n }\n\n // remove non existing indexes\n $conn->beginTransaction();\n\n $allIndexObjects = $dataSetImportTable->getIndexes();\n $allIndexes = array_map(function (Index $indexObject) {\n return $indexObject->getName();\n }, $allIndexObjects);\n\n $nonExistingIndexes = array_diff($allIndexes, $inUsedIndexes);\n foreach ($nonExistingIndexes as $nonExistingIndex) {\n // exclude 'primary' and 'unique_hash_idx' indexes\n if (in_array($nonExistingIndex, self::REQUIRED_INDEXES)) {\n continue;\n }\n\n self::prepareStatementDropIndex($conn, $nonExistingIndex, $dataSetImportTable->getName());\n\n $removedIndexesCount++;\n }\n\n try {\n $conn->commit();\n } catch (\\Exception $e) {\n\n }\n\n return $createdIndexesCount;\n }", "public function buildIndex();", "public function addFulltextIndex( $table, $field );", "private function processIndexes()\n {\n foreach ($this->indexes as $index) {\n foreach ($index->columns as $indexColumn) {\n $indexColumnName = $indexColumn['name'];\n if (!array_key_exists(strtolower($indexColumnName), $this->columns)) {\n throw new RuntimeException(\"Key column '$indexColumnName' doesn't exist in table\");\n }\n }\n }\n\n // figure out all sequences of columns covered by non-FK indexes\n foreach ($this->indexes as $index) {\n if ($index->type !== 'FOREIGN KEY') {\n foreach ($index->getCovers() as $cover) {\n $lookup = implode('\\0', $cover);\n $this->covers[$lookup] = true;\n }\n }\n }\n\n $indexes = [];\n $foreigns = [];\n $ibfkCounter = 0;\n\n foreach ($this->indexes as $index) {\n if ($index->type === 'FOREIGN KEY') {\n if ($this->addIndexForForeignKey) {\n // TODO - doesn't correctly deal with indexes like foo(10)\n $lookup = implode('\\0', $index->getColumns());\n if (!array_key_exists($lookup, $this->covers)) {\n $newIndex = new IndexDefinition();\n $newIndex->type = 'KEY';\n $newIndex->columns = $index->columns;\n if (!is_null($index->constraint)) {\n $newIndex->name = $index->constraint;\n } elseif (!is_null($index->name)) {\n $newIndex->name = $index->name;\n }\n $indexes[] = $newIndex;\n }\n }\n\n $foreign = new IndexDefinition();\n if (is_null($index->constraint)) {\n $foreign->constraint = $this->name . '_ibfk_' . ++$ibfkCounter;\n } else {\n $foreign->constraint = $index->constraint;\n }\n $foreign->type = 'FOREIGN KEY';\n $foreign->columns = $index->columns;\n $foreign->reference = $index->reference;\n $foreigns[] = $foreign;\n } else {\n $indexes[] = $index;\n }\n }\n\n // now synthesise names for any unnamed indexes,\n // and collect indexes by type\n $usedName = [];\n $keyTypes = [\n 'PRIMARY KEY',\n 'UNIQUE KEY',\n 'KEY',\n 'FULLTEXT KEY',\n 'FOREIGN KEY',\n ];\n $indexesByType = array_fill_keys($keyTypes, []);\n foreach ($indexes as $index) {\n $name = $index->name;\n if ($index->type === 'PRIMARY KEY') {\n $name = 'PRIMARY';\n } elseif (is_null($name)) {\n $base = $index->columns[0]['name'];\n $name = $base;\n $i = 1;\n while (isset($usedName[$name])) {\n $name = $base . '_' . ++$i;\n }\n $index->name = $name;\n } elseif (array_key_exists(strtolower($name), $usedName)) {\n throw new RuntimeException(\"Duplicate key name '$name'\");\n }\n $index->name = $name;\n $usedName[strtolower($name)] = true;\n\n $indexesByType[$index->type][] = $index;\n }\n\n if (count($indexesByType['PRIMARY KEY']) > 1) {\n throw new RuntimeException(\"Multiple PRIMARY KEYs defined\");\n }\n\n foreach ($indexesByType['PRIMARY KEY'] as $pk) {\n foreach ($pk->columns as $indexColumn) {\n $column = $this->columns[strtolower($indexColumn['name'])];\n if ($column->nullable) {\n $column->nullable = false;\n if (is_null($column->default)) {\n $column->default = $column->getUninitialisedValue();\n }\n }\n }\n }\n\n $this->indexes = [];\n foreach (array_reduce($indexesByType, 'array_merge', []) as $index) {\n $this->indexes[$index->name] = $index;\n }\n foreach ($foreigns as $foreign) {\n $this->foreigns[$foreign->constraint] = $foreign;\n }\n }", "public function addIndex($table, Index $index) {\n if(!is_string($table)) {\n $table_name = $table->getName();\n } else {\n $table_name = $table;\n }\n\n $columns = \"(`\".implode(\"`,`\", $index->getColumns()).\"`)\";\n\n if($index->getPrimary()) {\n $sql = sprintf(config('sql.index.add_primary_key'), $table_name, $columns);\n } elseif($index->getUnique()) {\n $sql = sprintf(config('sql.index.add_unique_key'), $table_name, $index->getName(), $columns);\n } else {\n $sql = sprintf(config('sql.index.add_index'), $table_name, $index->getName(), $columns);\n }\n $sql .= \"\\n\";\n\n return $sql;\n }", "public function hasIndex($columns)\r\n {\r\n }", "public static function createAllTableIndexes()\n {\n $result = true;\n \n // tdo_lists\n// if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_list_deleted_index on tdo_lists(deleted)\") == false)\n// $result = false;\n \n // tdo_list_memberships\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_list_membership_userid_index on tdo_list_memberships(userid(10))\") == false)\n $result = false;\n\n // tdo_user_sessions\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_user_sessions_userid_index on tdo_user_sessions(userid(10))\") == false)\n $result = false;\n\n \n // tdo_tasks\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_tasks_listid_index on tdo_tasks(listid(10))\") == false)\n $result = false;\n\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_tasks_parentid_index on tdo_tasks(parentid(10))\") == false)\n $result = false;\n\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_tasks_duedate_index on tdo_tasks(duedate)\") == false)\n $result = false;\n\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_tasks_timestamp_index on tdo_tasks(timestamp)\") == false)\n $result = false;\n\n \n //tdo_completed_tasks\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_completed_tasks_listid_index on tdo_completed_tasks(listid(10))\") == false)\n $result = false;\n\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_completed_tasks_parentid_index on tdo_completed_tasks(parentid(10))\") == false)\n $result = false;\n\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_completed_tasks_completiondate_index on tdo_completed_tasks(completiondate)\") == false)\n $result = false;\n\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_completed_tasks_timestamp_index on tdo_completed_tasks(timestamp)\") == false)\n $result = false;\n\n \n //tdo_deleted_tasks\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_deleted_tasks_listid_index on tdo_deleted_tasks(listid(10))\") == false)\n $result = false;\n\t\t\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_deleted_tasks_parentid_index on tdo_deleted_tasks(parentid(10))\") == false)\n $result = false;\n\n \n //tdo_archived_tasks\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_archived_tasks_listid_index on tdo_archived_tasks(listid(10))\") == false)\n $result = false;\n\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_archived_tasks_timestamp_index on tdo_archived_tasks(timestamp)\") == false)\n $result = false;\n\n \n // tdo_taskitos\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_taskitos_parentid_index on tdo_taskitos(parentid(10))\") == false)\n $result = false;\n\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_taskitos_timestamp_index on tdo_taskitos(timestamp)\") == false)\n $result = false;\n\n // tdo_archived_taskitos\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_archived_taskitos_parentid_index on tdo_archived_taskitos(parentid(10))\") == false)\n $result = false;\n \n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_archived_taskitos_timestamp_index on tdo_archived_taskitos(timestamp)\") == false)\n $result = false;\n \n // tdo_tag_assignments\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_tag_assignments_taskid_index on tdo_tag_assignments(taskid(10))\") == false)\n $result = false;\n \n // tdo_contexts\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_contexts_context_timestamp_index on tdo_contexts(context_timestamp)\") == false)\n $result = false;\n\n // tdo_context_assignments\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_context_assignments_userid_index on tdo_context_assignments(userid(10))\") == false)\n $result = false;\n\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_context_assignments_taskid_index on tdo_context_assignments(taskid(10))\") == false)\n $result = false;\n\n // tdo_comments\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_comments_itemid_index on tdo_comments(itemid(10))\") == false)\n $result = false;\n \n // tdo_task_notifications\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_task_notifications_taskid_index on tdo_task_notifications(taskid(10))\") == false)\n $result = false;\n\n // tdo_change_log\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_change_log_listid_index on tdo_change_log(listid(10))\") == false)\n $result = false;\n\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_change_log_itemid_index on tdo_change_log(itemid(10))\") == false)\n $result = false;\n \n return $result;\n }", "function yy_r41(){\n $this->_retvalue = new SQL\\AlterTable\\AddIndex($this->yystack[$this->yyidx + -5]->minor, $this->yystack[$this->yyidx + -3]->minor, $this->yystack[$this->yyidx + 0]->minor);\n $this->_retvalue->setTableName($this->yystack[$this->yyidx + -1]->minor);\n }", "public function _INDEX()\n\t{\n\t\t\n\t}", "function _alterIndexes($table, $indexes) {\n\t\t$alter = array();\n\t\tif (isset($indexes['drop'])) {\n\t\t\tforeach($indexes['drop'] as $name => $value) {\n\t\t\t\t$out = 'DROP ';\n\t\t\t\tif ($name == 'PRIMARY') {\n\t\t\t\t\t$out .= 'PRIMARY KEY';\n\t\t\t\t} else {\n\t\t\t\t\t$out .= 'KEY ' . $name;\n\t\t\t\t}\n\t\t\t\t$alter[] = $out;\n\t\t\t}\n\t\t}\n\t\tif (isset($indexes['add'])) {\n\t\t\tforeach ($indexes['add'] as $name => $value) {\n\t\t\t\t$out = 'ADD ';\n\t\t\t\tif ($name == 'PRIMARY') {\n\t\t\t\t\t$out .= 'PRIMARY ';\n\t\t\t\t\t$name = null;\n\t\t\t\t} else {\n\t\t\t\t\tif (!empty($value['unique'])) {\n\t\t\t\t\t\t$out .= 'UNIQUE ';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (is_array($value['column'])) {\n\t\t\t\t\t$out .= 'KEY '. $name .' (' . implode(', ', array_map(array(&$this, 'name'), $value['column'])) . ')';\n\t\t\t\t} else {\n\t\t\t\t\t$out .= 'KEY '. $name .' (' . $this->name($value['column']) . ')';\n\t\t\t\t}\n\t\t\t\t$alter[] = $out;\n\t\t\t}\n\t\t}\n\t\treturn $alter;\n\t}", "protected function addVirtualColumns()\n {\n \n }", "public function createTable(Table $table, array $columns = [], array $indexes = []);", "public function modifyTable()\n {\n // create columns if they are not already added to the table\n foreach ($this->getParameter('columns') as $column) {\n if (!$this->getTable()->containsColumn($column)) {\n $this->getTable()->addColumn(array(\n 'name' => $column,\n 'type' => 'INTEGER',\n ));\n }\n }\n }", "function index($model) {\n\t\t$index = array();\n\t\t$table = $this->fullTableName($model);\n\t\tif ($table) {\n\t\t\t$indexes = $this->query('SHOW INDEX FROM ' . $table);\n\t\t\tif (isset($indexes[0]['STATISTICS'])) {\n\t\t\t\t$keys = Set::extract($indexes, '{n}.STATISTICS');\n\t\t\t} else {\n\t\t\t\t$keys = Set::extract($indexes, '{n}.0');\n\t\t\t}\n\t\t\tforeach ($keys as $i => $key) {\n\t\t\t\tif (!isset($index[$key['Key_name']])) {\n\t\t\t\t\t$col = array();\n\t\t\t\t\t$index[$key['Key_name']]['column'] = $key['Column_name'];\n\t\t\t\t\t$index[$key['Key_name']]['unique'] = intval($key['Non_unique'] == 0);\n\t\t\t\t} else {\n\t\t\t\t\tif (!is_array($index[$key['Key_name']]['column'])) {\n\t\t\t\t\t\t$col[] = $index[$key['Key_name']]['column'];\n\t\t\t\t\t}\n\t\t\t\t\t$col[] = $key['Column_name'];\n\t\t\t\t\t$index[$key['Key_name']]['column'] = $col;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $index;\n\t}", "public function indexes($table, $like = '') {\n\t\t$builder = DB_SQL::select($this->data_source)\n\t\t\t->column('t1.NAME', 'schema')\n\t\t\t->column('t0.NAME', 'table')\n\t\t\t->column('t2.NAME', 'index')\n\t\t\t->column('t4.NAME', 'column')\n\t\t\t->column('t3.KEY_ORDINAL', 'seq_index')\n\t\t\t->column('t2.IS_PRIMARY_KEY', 'primary')\n\t\t\t->column('t2.IS_UNIQUE', 'unique')\n\t\t\t->from('SYS.TABLES', 't0')\n\t\t\t->join(DB_SQL_JoinType::_LEFT_, 'SYS.SCHEMAS', 't1')\n\t\t\t->on('t1.SCHEMA_ID', DB_SQL_Operator::_EQUAL_TO_, 't0.SCHEMA_ID')\n\t\t\t->join(DB_SQL_JoinType::_LEFT_, 'SYS.INDEXES', 't2')\n\t\t\t->on('t2.OBJECT_ID', DB_SQL_Operator::_EQUAL_TO_, 't0.OBJECT_ID')\n\t\t\t->join(DB_SQL_JoinType::_LEFT_, 'SYS.INDEX_COLUMNS', 't3')\n\t\t\t->on('t3.OBJECT_ID', DB_SQL_Operator::_EQUAL_TO_, 't0.OBJECT_ID')\n\t\t\t->on('t3.INDEX_ID', DB_SQL_Operator::_EQUAL_TO_, 't2.INDEX_ID')\n\t\t\t->join(DB_SQL_JoinType::_LEFT_, 'SYS.COLUMNS', 't4')\n\t\t\t->on('t4.OBJECT_ID', DB_SQL_Operator::_EQUAL_TO_, 't0.OBJECT_ID')\n\t\t\t->on('t4.COLUMN_ID', DB_SQL_Operator::_EQUAL_TO_, 't3.COLUMN_ID')\n\t\t\t->where('t0.NAME', DB_SQL_Operator::_EQUAL_TO_, $table)\n\t\t\t->where('t2.IS_DISABLED', DB_SQL_Operator::_EQUAL_TO_, 0)\n\t\t\t->order_by(DB_SQL::expr('UPPER([t1].[NAME])'))\n\t\t\t->order_by(DB_SQL::expr('UPPER([t0].[NAME])'))\n\t\t\t->order_by(DB_SQL::expr('UPPER([t2].[NAME])'))\n\t\t\t->order_by('t3.KEY_ORDINAL');\n\n\t\tif ( ! empty($like)) {\n\t\t\t$builder->where('t2.NAME', DB_SQL_Operator::_LIKE_, $like);\n\t\t}\n\n\t\treturn $builder->query();\n\t}", "static public function addNewIndexes(Adapter $db, TableDef $tableDef) {\n $indexDef = $tableDef->getDbIndexes();\n $tableName = $tableDef->getName();\n $tableSchema = $tableDef->getSchema();\n\n $newIndexes = [];\n foreach ($indexDef as $index) {\n $newIndexes[$index->getName()] = $index;\n }\n\n $myIndexes = [];\n $current = $db->describeIndexes($tableName, $tableSchema);\n foreach ($current as $index) {\n $myIndexes[$index->getName()] = $index;\n }\n\n foreach ($indexDef as $newIndex) {\n $newIndexName = $newIndex->getName();\n\n if (!isset($myIndexes[$newIndexName])) {\n if ($newIndexName == 'PRIMARY') {\n $db->addPrimaryKey($tableName, $tableSchema, $newIndex);\n } else {\n $db->addIndex($tableName, $tableSchema, $newIndex);\n }\n }\n }\n }", "public static function at()\n\t{\n\t\t\n\t\t$alter_info = array(\n\t\t\t// deleted columns, simple 1d array\n\t\t\t//'drop' => array('ii'),\n\t\t\t\n\t\t\t// old name => new name and definition\n\t\t\t//'change' => array(\n\t\t\t//\t'thing' => 'trong INT( 11 ) NOT NULL'\n\t\t\t//),\n\t\t\t\n\t\t\t// new column definitions\n\t\t\t'add' => array(\n\t\t\t\t'mpc_convs smallint unsigned not null default 0',\n\t\t\t\t'vt_convs smallint unsigned not null default 0'\n\t\t\t)\n\t\t);\n\t\t$ta = new table_alterer('g_data', 'keywords_11', $alter_info);\n\t\t$ta->go();\n\t}", "function indexInfo( $table, $index, $fname = __METHOD__ );", "public function describeIndexes($table, $schema=null){ }", "private function rebuildIndex()\n {\n foreach ($this->rows as $id => $row) {\n $label = $row->getColumn('label');\n if ($label !== false) {\n $this->rowsIndexByLabel[$label] = $id;\n }\n }\n $this->indexNotUpToDate = false;\n }", "public function defineIndexes()\n\t{\n\t\treturn array();\n\t}", "public function addIndex($tableName, $columnNames, $options = array()) {\n\t\t$this->_connection->addIndex($tableName, $columnNames, $options);\n\t}", "public function addIndexes(\n $tablename, \n $indexes, \n $execute = true\n )\n {\n $alters = $this->getHelper()->keysSQL($indexes,true,'ADD');\n $sql = \"ALTER TABLE $tablename $alters\";\n if ($execute) \n $this->query($sql);\n return $sql;\n }", "private function createNewColumnsInBaseTable()\n {\n\n Schema::table($this->baseTable, function (Blueprint $table) {\n\n //If no associative columns, the use same column name as merge column.\n if(empty($this->associativeColumns))\n {\n $columns = Schema::getColumnListing($this->mergeTable);\n\n foreach($columns as $key){\n if(!Schema::hasColumn($table->getTable(),$key)) {\n $table->text($key)->nullable();\n }\n }\n //Otherwise create only the table columns in baseTable which appears in array.\n }else{\n foreach ($this->associativeColumns as $baseColumn => $mergeColumn)\n {\n if(!Schema::hasColumn($table->getTable(),$baseColumn)) {\n $table->text($baseColumn)->nullable();\n }\n }\n }\n\n });\n }", "public function checkForIndex( $index, $table );", "function create_index()\n\t{\n\t\tinclude_once(dirname(__FILE__) . '/../../include/class/adodb/adodb.inc.php');\n\t\t$conn = &ADONewConnection($_SESSION['db_type']);\n\t\t$conn->PConnect($_SESSION['db_server'], $_SESSION['db_user'], $_SESSION['db_password'], $_SESSION['db_database']);\n\t\t$config['table_prefix'] = $_SESSION['table_prefix'] . $_SESSION['or_install_lang'] . '_';\n\t\t$config['table_prefix_no_lang'] = $_SESSION['table_prefix'];\n\n\t\t$sql_insert[] = \"CREATE INDEX idx_user_name ON \" . $config['table_prefix'] . \"userdb (userdb_user_name);\";\n\t\t$sql_insert[] = \"CREATE INDEX idx_active ON \" . $config['table_prefix'] . \"listingsdb (listingsdb_active);\";\n\t\t$sql_insert[] = \"CREATE INDEX idx_user ON \" . $config['table_prefix'] . \"listingsdb (userdb_id);\";\n\t\t$sql_insert[] = \"CREATE INDEX idx_name ON \" . $config['table_prefix'] . \"listingsdbelements (listingsdbelements_field_name);\";\n\t\t// CHANGED: blob or text fields can only index a max of 255 (mysql) and you have to specify\n\t\tif ($_SESSION['db_type'] == 'mysql') {\n\t\t\t$sql_insert[] = \"CREATE INDEX idx_value ON \" . $config['table_prefix'] . \"listingsdbelements (listingsdbelements_field_value(255));\";\n\t\t}else {\n\t\t\t$sql_insert[] = \"CREATE INDEX idx_value ON \" . $config['table_prefix'] . \"listingsdbelements (listingsdbelements_field_value);\";\n\t\t}\n\t\t$sql_insert[] = \"CREATE INDEX idx_images_listing_id ON \" . $config['table_prefix'] . \"listingsimages (listingsdb_id);\";\n\t\t$sql_insert[] = \"CREATE INDEX idx_searchable ON \" . $config['table_prefix'] . \"listingsformelements (listingsformelements_searchable);\";\n\t\t$sql_insert[] = \"CREATE INDEX idx_mlsexport ON \" . $config['table_prefix'] . \"listingsdb (listingsdb_mlsexport);\";\n\t\t$sql_insert[] = \"CREATE INDEX idx_listing_id ON \" . $config['table_prefix'] . \"listingsdbelements (listingsdb_id);\";\n\t\t$sql_insert[] = \"CREATE INDEX idx_field_type ON \" . $config['table_prefix'] . \"listingsformelements (listingsformelements_field_type);\";\n\t\t$sql_insert[] = \"CREATE INDEX idx_browse ON \" . $config['table_prefix'] . \"listingsformelements (listingsformelements_display_on_browse);\";\n\t\t$sql_insert[] = \"CREATE INDEX idx_field_name ON \" . $config['table_prefix'] . \"listingsformelements (listingsformelements_field_name);\";\n\t\t$sql_insert[] = \"CREATE INDEX idx_rank ON \" . $config['table_prefix'] . \"listingsformelements (listingsformelements_rank);\";\n\t\t$sql_insert[] = \"CREATE INDEX idx_search_rank ON \" . $config['table_prefix'] . \"listingsformelements (listingsformelements_search_rank);\";\n\t\t$sql_insert[] = \"CREATE INDEX idx_images_rank ON \" . $config['table_prefix'] . \"listingsimages (listingsimages_rank);\";\n\t\t$sql_insert[] = \"CREATE INDEX idx_forgot_email ON \" . $config['table_prefix_no_lang'] . \"forgot (forgot_email);\";\n\n\t\t$sql_insert[] = \"CREATE INDEX idx_classformelements_class_id ON \" . $config['table_prefix_no_lang'] . \"classformelements (class_id);\";\n\t\t$sql_insert[] = \"CREATE INDEX idx_classformelements_listingsformelements_id ON \" . $config['table_prefix_no_lang'] . \"classformelements (listingsformelements_id);\";\n\n\t\t$sql_insert[] = \"CREATE INDEX idx_classlistingsdb_class_id ON \" . $config['table_prefix_no_lang'] . \"classlistingsdb (class_id);\";\n\t\t$sql_insert[] = \"CREATE INDEX idx_classlistingsdb_listingsdb_id ON \" . $config['table_prefix_no_lang'] . \"classlistingsdb (listingsdb_id);\";\n\n\t\t$sql_insert[] = \"CREATE INDEX idx_class_rank ON \" . $config['table_prefix'] . \"class (class_rank);\";\n\t\t//Add indexes for userdbelements tables\n\t\t// CHANGED: blob or text fields can only index a max of 255 (mysql) and you have to specify\n\t\tif ($_SESSION['db_type'] == 'mysql') {\n\t\t\t$sql_insert[] = \"CREATE INDEX idx_user_field_value ON \" . $config['table_prefix'] . \"userdbelements (userdbelements_field_value(255));\";\n\t\t}else {\n\t\t\t$sql_insert[] = \"CREATE INDEX idx_user_field_value ON \" . $config['table_prefix'] . \"userdbelements (userdbelements_field_value);\";\n\t\t}\n\t\t$sql_insert[] = \"CREATE INDEX idx_user_field_name ON \" . $config['table_prefix'] . \"userdbelements (userdbelements_field_name);\";\n\t\t$sql_insert[] = \"CREATE INDEX idx_userdb_userid ON \" . $config['table_prefix'] . \"userdbelements (userdb_id);\";\n\t\t$sql_insert[] = \"CREATE INDEX idx_listfieldmashup ON \" . $config['table_prefix'] . \"listingsdb (listingsdb_id ,listingsdb_active,userdb_id);\";\n\t\t$sql_insert[] = \"CREATE INDEX idx_fieldmashup ON \" . $config['table_prefix'] . \"listingsdbelements (listingsdbelements_field_name,listingsdb_id);\";\n\t\t$sql_insert[] = \"CREATE INDEX idx_classfieldmashup ON \" . $config['table_prefix_no_lang'] . \"classlistingsdb (listingsdb_id ,class_id);\";\n\t\t// ADDED foreach to run through array with errorchecking to see if something went wrong\n\t\twhile (list($elementIndexValue, $elementContents) = each($sql_insert)) {\n\t\t\t$recordSet = $conn->Execute($elementContents);\n\t\t\tif ($recordSet === false) {\n\t\t\t\tif ($_SESSION['devel_mode'] == 'no') {\n\t\t\t\t\tdie (\"<strong><span style=\\\"red\\\">ERROR - $elementContents</span></strong><br />\");\n\t\t\t\t}else {\n\t\t\t\t\techo \"<strong><span style=\\\"red\\\">ERROR - $elementContents</span></strong><br />\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\techo 'Indexes Created<br />';\n\t}", "function isIndexable()\n {\n return true;\n }", "protected function getIndexLine($index) {\n $sql = array();\n \n $sql[] = 'ALTER TABLE `'.$index['Table'].'` ADD';\n \n if($index['Key_name'] == 'PRIMARY') {\n $sql[] = 'PRIMARY KEY ('.$index['Column_name'].')';\n } else {\n if($index['Non_unique'] == '0') {\n $sql[] = 'UNIQUE';\n } else {\n #$sql[] = $index['Index_type'];\n if(strtolower(trim($index['Index_type'])) == 'fulltext') {\n $sql[] = 'FULLTEXT';\n }\n }\n \n $sql[] = 'INDEX ('.$index['Column_name'].')';\n }\n \n return implode(' ', $sql).';';\n }", "public function indexes()\n {\n return array_merge(parent::indexes(), array(\n 'userId' => array(\n 'key' => array(\n 'userId' => \\EMongoCriteria::SORT_ASC,\n ),\n 'unique' => true,\n ),\n ));\n }", "private function createNewColumnsInBaseTable()\n {\n\n Schema::table($this->baseTable, function (Blueprint $table) {\n\n //If no associative columns, the use same column name as merge column.\n if (empty($this->columns)) {\n $columns = Schema::getColumnListing($this->mergeTable);\n\n foreach ($columns as $key) {\n if (!Schema::hasColumn($table->getTable(), $key)) {\n $table->text($key)->nullable();\n }\n }\n //Otherwise create only the table columns in baseTable which appears in array.\n } else {\n foreach ($this->columns as $baseColumn => $mergeColumn) {\n if (!Schema::hasColumn($table->getTable(), $baseColumn)) {\n $table->text($baseColumn)->nullable();\n }\n }\n }\n\n });\n }", "public function getTableIndexes(string $table)\n {\n if(!\\adminer\\support('indexes'))\n {\n return null;\n }\n\n // From table.inc.php\n $indexes = \\adminer\\indexes($table);\n $main_actions = [\n 'create' => \\adminer\\lang('Alter indexes'),\n ];\n\n $headers = [\n \\adminer\\lang('Name'),\n \\adminer\\lang('Type'),\n \\adminer\\lang('Column'),\n ];\n\n $details = [];\n // From adminer.inc.php\n if(!$indexes)\n {\n $indexes = [];\n }\n foreach($indexes as $name => $index) {\n \\ksort($index['columns']); // enforce correct columns order\n $print = [];\n foreach($index['columns'] as $key => $val)\n {\n $value = '<i>' . \\adminer\\h($val) . '</i>';\n if(\\array_key_exists('lengths', $index) &&\n \\is_array($index['lengths']) &&\n \\array_key_exists($key, $index['lengths']))\n {\n $value .= '(' . $index['lengths'][$key] . ')';\n }\n if(\\array_key_exists('descs', $index) &&\n \\is_array($index['descs']) &&\n \\array_key_exists($key, $index['descs']))\n {\n $value .= ' DESC';\n }\n $print[] = $value;\n }\n $details[] = [\n 'name' => \\adminer\\h($name),\n 'type' => $index['type'],\n 'desc' => \\implode(', ', $print),\n ];\n }\n\n return \\compact('main_actions', 'headers', 'details');\n }", "protected function setCanonicalIndex(): void\n {\n $got = $this->redisConn->hget($this->index, IndexInterface::STRUCTURE);\n $data = (null === $got) ? [] : $this->unser($got);\n if (empty($data)) { // just fill-in new index data\n $data[$this->index] = [\n IndexInterface::ALIASES => [],\n ];\n $this->setMappings($data);\n $this->redisConn->hset($this->index, IndexInterface::STRUCTURE, $this->ser($data));\n } else if (empty($this->indexType) === false\n && empty($data[$this->index][IndexInterface::MAPPINGS][$this->indexType])\n ) {// check for type and update if there is no alike\n $this->setMappings($data);\n $this->redisConn->hset($this->index, IndexInterface::STRUCTURE, $this->ser($data));\n } else { // setting new fields with whitespace type by default\n $this->setMappings($data, true);\n if (true === $this->isNewField) {\n $this->redisConn->hset($this->index, IndexInterface::STRUCTURE, $this->ser($data));\n }\n }\n }", "function addColumn($table, $name, $type);", "public function getMyIndexTablesWithColumns() {\n $aMyColumnsByTable = [];\n\n # Build Query to get User Based Columns\n $oColumnSel = new Select(CoreEntityModel::$aEntityTables['user-table-cols']->getTable());\n $oColumnSel->join(['core_field'=>'core_form_field'],'core_field.Field_ID = user_table_column.field_idfs');\n $oColumnSel->where(['user_idfs'=>$this->getID()]);\n\n # Get Users Index Table Columns from DB\n $aMyColumnsDB = CoreEntityModel::$aEntityTables['user-table-cols']->selectWith($oColumnSel);\n foreach($aMyColumnsDB as $oCol) {\n if(!array_key_exists($oCol->tbl_name,$aMyColumnsByTable)) {\n $aMyColumnsByTable[$oCol->tbl_name] = [];\n }\n $aMyColumnsByTable[$oCol->tbl_name][$oCol->fieldkey] = $oCol;\n }\n\n return $aMyColumnsByTable;\n }", "function isIndexable()\n {\n return true;\n }", "public function index($columns)\n {\n // Default the index\n $index = null;\n\n // Get the args\n $args = func_get_args();\n if (count($args) == 1) {\n if (is_string($columns)) {\n $indexName = \"idx_$this->tableName\".\"_$columns\";\n $index = new DbIndex($this, $indexName);\n $index->column($columns);\n } // end if string\n\n if (is_object($columns)) {\n if ($columns->name && $columns->sortType) {\n $indexName = \"idx_$this->table_name\".\"_$columns->name\";\n $index = new DbIndex($this, $indexName);\n $index->column($columns->name, $columns->sortType);\n } // end if correct object\n } // end if object\n\n if (is_array($columns)) {\n $indexName = \"idx_\".$this->tableName;\n $cols = [];\n foreach($columns as $col) {\n $indexName .= \"_\".$col;\n $indexColumn = new stdClass;\n $indexColumn->name = $col;\n $indexColumn->sortType = DbSortTypes::Asc;\n $cols[] = $indexColumn;\n } // end foreach\n\n // We create the index\n // Assign the columns\n $index = new DbIndex($this, $indexName, false, $cols);\n } // end if array\n } else {\n // Several columns, default ASC\n // The name:\n $indexName = \"idx_\".$this->tableName;\n $cols = [];\n foreach($args as $arg) {\n $indexName .= \"_\".$arg;\n $indexColumn = new stdClass;\n $indexColumn->name = $arg;\n $indexColumn->sortType = DbSortTypes::Asc;\n $cols[] = $indexColumn;\n } // end foreach\n\n // We create the index\n // Assign the columns\n $index = new DbIndex($this, $indexName, false, $cols);\n } // end if one arg\n\n if ($index) {\n $this->indexes[] = $index;\n return $this->indexes[count($this->indexes)-1];\n } // end if index\n\n // If we got here, it's an error\n throw new Exception(\"Index cannot be form\");\n }", "public function rebuildIndex()\n {\n $this->elastic->deleteIndex(self::INDEX);\n $this->elastic->addIndexCompanion(self::INDEX);\n }", "private function initColumnArrays()\n {\n foreach ($this->columns as $key => $column) {\n $dql = $this->accessor->getValue($column, 'dql');\n $data = $this->accessor->getValue($column, 'data');\n\n $currentPart = $this->entityShortName;\n $currentAlias = $currentPart;\n $metadata = $this->metadata;\n\n if (true === $this->accessor->getValue($column, 'customDql')) {\n $columnAlias = str_replace('.', '_', $data);\n\n // Select\n $selectDql = preg_replace('/\\{([\\w]+)\\}/', '$1', $dql);\n $this->addSelectColumn(null, $selectDql.' '.$columnAlias);\n // Order on alias column name\n $this->addOrderColumn($column, null, $columnAlias);\n // Fix subqueries alias duplication\n $searchDql = preg_replace('/\\{([\\w]+)\\}/', '$1_search', $dql);\n $this->addSearchColumn($column, null, $searchDql);\n } elseif (true === $this->accessor->getValue($column, 'selectColumn')) {\n $parts = explode('.', $dql);\n\n while (count($parts) > 1) {\n $previousPart = $currentPart;\n $previousAlias = $currentAlias;\n\n $currentPart = array_shift($parts);\n $currentAlias = ($previousPart === $this->entityShortName ? '' : $previousPart.'_').$currentPart;\n\n if (!array_key_exists($previousAlias.'.'.$currentPart, $this->joins)) {\n $this->addJoin($previousAlias.'.'.$currentPart, $currentAlias, $this->accessor->getValue($column, 'joinType'));\n }\n\n $metadata = $this->setIdentifierFromAssociation($currentAlias, $currentPart, $metadata);\n }\n\n $this->addSelectColumn($currentAlias, $this->getIdentifier($metadata));\n $this->addSelectColumn($currentAlias, $parts[0]);\n $this->addSearchOrderColumn($column, $currentAlias, $parts[0]);\n } else {\n // Add Order-Field for VirtualColumn\n if ($this->accessor->isReadable($column, 'orderColumn') && true === $this->accessor->getValue($column, 'orderable')) {\n $orderColumn = $this->accessor->getValue($column, 'orderColumn');\n $orderParts = explode('.', $orderColumn);\n if (count($orderParts) < 2) {\n $orderColumn = $this->entityShortName.'.'.$orderColumn;\n }\n $this->orderColumns[] = $orderColumn;\n } else {\n $this->orderColumns[] = null;\n }\n\n // Add Search-Field for VirtualColumn\n if ($this->accessor->isReadable($column, 'searchColumn') && true === $this->accessor->getValue($column, 'searchable')) {\n $searchColumn = $this->accessor->getValue($column, 'searchColumn');\n $searchParts = explode('.', $searchColumn);\n if (count($searchParts) < 2) {\n $searchColumn = $this->entityShortName.'.'.$searchColumn;\n }\n $this->searchColumns[] = $searchColumn;\n } else {\n $this->searchColumns[] = null;\n }\n }\n }\n\n return $this;\n }", "public function addIndexToModel($index)\n {\n\t$this->query('insert into [indexes] values( null, %s, %s, %s, %s)',\n\t $index->getName(),\n\t $index->getModel()->getTableName(),\n\t $index->getHash(),\n\t $index->isUnique());\n\n\tPerfORMController::getBuilder()->createIndex($index);\n }", "public function addUniqueIndex( $table,$columns ) {\n\t\t$table = $this->safeTable($table);\n\t\t$name = \"UQ_\".sha1(implode(',',$columns));\n\t\t$sql = \"CREATE UNIQUE INDEX IF NOT EXISTS $name ON $table (\".implode(\",\",$columns).\")\";\n\t\t$this->adapter->exec($sql);\n\t}", "public function addPrimaryKey($tableName, $schemaName, $index){ }", "public function table_index_edit ( $tname, $field, $value, $key )\n\t{\n\t}", "public function createIndex(): void;", "function isIndexable()\r\n {\r\n return true;\r\n }", "public function change()\n {\n $articlesTags = $this->table('articles_tags', ['id' => false]);\n $articlesTags\n ->addColumn('article_id', 'integer', ['limit' => 11])\n ->addColumn('tag_id', 'integer', ['limit' => 11])\n ->addIndex(['tag_id'])\n ->save();\n \n }", "public function up()\n {\n $this->table('search_indexes', [\n 'collation' => 'utf8mb4_general_ci'\n ])\n ->addColumn('type', 'string', ['null' => true, 'default' => null, 'limit' => 100])\n ->addColumn('model', 'string', ['null' => true, 'default' => null, 'limit' => 50])\n ->addColumn('model_id', 'integer', ['null' => true, 'default' => null, 'limit' => 8])\n ->addColumn('site_id', 'integer', ['null' => true, 'default' => null, 'limit' => 8])\n ->addColumn('content_id', 'integer', ['null' => true, 'default' => null, 'limit' => 8])\n ->addColumn('content_filter_id', 'integer', ['null' => true, 'default' => null, 'limit' => 8])\n ->addColumn('lft', 'integer', ['null' => true, 'default' => null, 'limit' => 8])\n ->addColumn('rght', 'integer', ['null' => true, 'default' => null, 'limit' => 8])\n ->addColumn('title', 'string', ['null' => true, 'default' => null, 'limit' => null])\n ->addColumn('detail', 'text', ['null' => true, 'default' => null, 'limit' => null])\n ->addColumn('url', 'text', ['null' => true, 'default' => null, 'limit' => null])\n ->addColumn('status', 'boolean', ['null' => true, 'default' => null, 'limit' => null])\n ->addColumn('priority', 'string', ['null' => true, 'default' => null, 'limit' => 3])\n ->addColumn('publish_begin', 'datetime', ['null' => true, 'default' => null, 'limit' => null])\n ->addColumn('publish_end', 'datetime', ['null' => true, 'default' => null, 'limit' => null])\n ->addColumn('created', 'datetime', ['null' => true, 'default' => null, 'limit' => null])\n ->addColumn('modified', 'datetime', ['null' => true, 'default' => null, 'limit' => null])\n ->create();\n }", "function putIndex(){\n\n }", "function putIndex(){\n\n }", "protected function addIndicesToFields(DOMXPath $rootPath)\n {\n $fetchedNodes = [];\n $fields = $this->getFields();\n $multipleIndices = [];\n $idMap = array_flip(\n array_map(\n function (MigrationField $field) {\n return $field->getId();\n },\n $fields\n )\n );\n\n /** @var MigrationField $field */\n foreach ($fields as $name => $field) {\n $usedId = $field->getId();\n $indexNodes = $rootPath->query(\n './value[@content-struct-name=\"db.mysql.Index\" and @key=\"indices\"]/' .\n 'value[@type=\"object\" and @struct-name=\"db.mysql.Index\"]//' .\n 'value[@type=\"object\" and @struct-name=\"db.mysql.IndexColumn\"]//' .\n 'link[@type=\"object\" and @struct-name=\"db.Column\" and @key=\"referencedColumn\" ' .\n 'and text() = \"' . $usedId . '\"]/' .\n '../' .\n '../' .\n '..'\n );\n\n if ($indexNodes && $indexNodes->length) {\n $fks = $this->getForeignKeysForField($field, $rootPath);\n\n /** @var \\DOMNode $indexNode */\n foreach ($indexNodes as $indexNode) {\n if (in_array($nodeId = $indexNode->attributes->getNamedItem('id')->nodeValue, $fetchedNodes)) {\n continue;\n } // if\n\n $fetchedNodes[] = $nodeId;\n\n $indexColumns = $rootPath->query(\n './/link[@type=\"object\" and @struct-name=\"db.Column\" and @key=\"referencedColumn\"]',\n $indexNode\n );\n\n $isSingleColumn = $indexColumns && $indexColumns->length <= 1;\n $genericCall = !$isSingleColumn ? new Base() : null;\n\n if ($rootPath->evaluate(\n 'boolean(./value[@type=\"int\" and @key=\"unique\" and number() = 1])',\n $indexNode\n )\n ) {\n if ($isSingleColumn) {\n $field->addAdditionalOption('unique');\n } // if\n else {\n $genericMethod = 'unique';\n } // else\n } // if\n\n $hasIndex = $rootPath->evaluate(\n 'boolean(./value[@type=\"string\" and @key=\"indexType\" and text() = \"INDEX\"])',\n $indexNode\n );\n\n if ($hasIndex && (!$fks || !$fks->length)) {\n if ($isSingleColumn) {\n $field->addAdditionalOption('index');\n } // if\n else {\n $genericMethod = 'index';\n } // else\n } // if\n\n if ($rootPath->evaluate(\n 'boolean(./value[@type=\"string\" and @key=\"indexType\" and text() = \"PRIMARY\"])',\n $indexNode\n )\n ) {\n if ($isSingleColumn) {\n $field->addAdditionalOption('primary');\n } // if\n else {\n $genericMethod = 'primary';\n } // else\n } // if\n\n if ($genericCall && $genericMethod) {\n $genericParams = [];\n /** @var DOMNode $column */\n foreach ($indexColumns as $column) {\n $genericParams[] = $idMap[$column->nodeValue];\n } // foreach\n\n $this->addGenericCall(call_user_func_array(\n [$genericCall, $genericMethod],\n $genericParams ? [$genericParams] : []\n ));\n }\n }\n }\n }\n\n return array_unique($multipleIndices);\n }", "abstract public function tableColumns();", "public function getMyIndexTablesWithColumns()\n {\n $aMyColumnsByTable = [];\n\n # Build Query to get User Based Columns\n $oColumnSel = new Select(CoreEntityModel::$aEntityTables['user-table-cols']->getTable());\n $oColumnSel->join(['core_field' => 'core_form_field'], 'core_field.Field_ID = user_table_column.field_idfs');\n $oColumnSel->where(['user_idfs' => $this->getID()]);\n\n # Get Users Index Table Columns from DB\n $aMyColumnsDB = CoreEntityModel::$aEntityTables['user-table-cols']->selectWith($oColumnSel);\n foreach ($aMyColumnsDB as $oCol) {\n if (! array_key_exists($oCol->tbl_name, $aMyColumnsByTable)) {\n $aMyColumnsByTable[$oCol->tbl_name] = [];\n }\n $aMyColumnsByTable[$oCol->tbl_name][$oCol->fieldkey] = $oCol;\n }\n\n return $aMyColumnsByTable;\n }", "public function setDefaultColumns()\n {\n foreach ($this->Model->columnsInformation as $column) {\n // Set indexes\n if ($column['Key'] == \"PRI\") {\n $this->indexes[] = $this->table . \".\" . $column['Field'];\n }\n // Set columns\n $this->columns[] = $this->table . \".\" . $column['Field'];\n }\n // Set default columns\n $this->defaultColumns = $this->columns;\n // Add actions column\n $this->addCustomColumn($this->builtInCustomColumns['actions']);\n // Add no column\n $this->addCustomColumnAsFirstColumn($this->builtInCustomColumns['no']);\n }", "private function setAddColumnSql() {\n\n if (!empty($this->add_columns)) {\n\n foreach ($this->add_columns as $key => $value) {\n\n foreach ($value as $keys) {\n\n $column_data = $this->one_db_table_columns[$key][$keys];\n\n\n\n $add_colum_params = \"\";\n $default_is_string = false;\n $null_string = \"\";\n $default_string = \"\";\n\n\n\n\n //Sütun tipi\n $add_colum_params .= \" \" . $column_data['Type'] . \" \";\n\n\n if ($column_data['Null'] == \"NO\") {\n\n $null_string = \"NOT NULL\";\n } else if ($column_data['Null'] == \"YES\") {\n\n $null_string = \"NULL\";\n }\n\n\n\n $field_type_detect = substr($column_data['Type'], 0, 4);\n\n if (\n $field_type_detect == \"varc\" ||\n $field_type_detect == \"text\" ||\n $field_type_detect == \"date\") {\n\n $default_is_string = true;\n }\n\n\n\n if ($column_data['Default'] != \"\" || !empty($column_data['Default']) || $column_data['Default'] != NULL) {\n\n\n $default_string = \" DEFAULT \";\n\n\n if ($default_is_string) {\n\n\n $default_string .= \" '\" . $column_data['Default'] . \"' \";\n } else {\n\n $default_string .= \" \" . $column_data['Default'] . \" \";\n }\n }\n\n\n\n $add_colum_params .= $null_string . $default_string;\n\n $writesql = <<< EOT\nALTER TABLE {$key} ADD COLUMN {$column_data['Field']} {$add_colum_params};\nEOT;\n\n $this->execute_sql[\"add_columns\"][] = $writesql;\n }\n }\n }\n }", "public function addIndex(string $tableName, string $schemaName, \\Phalcon\\Db\\IndexInterface $index) : string\n {\n $indexType = $index->getType();\n if (!empty($indexType)) {\n $sql = ' CREATE '.$indexType.' INDEX ';\n } else {\n $sql = ' CREATE INDEX ';\n }\n\n $sql = '['.$index->getName().'] ON '.$this->prepareTable($tableName, $schemaName).' ('.$this->getColumnList($index->getColumns()).')';\n\n return $sql;\n }", "public function addIndexImplicit(Index $index) {\n $columns = \"(`\".implode(\"`,`\", $index->getColumns()).\"`)\";\n\n if($index->getPrimary()) {\n $sql = sprintf(config('sql.index.implicit.primary'), $columns);\n } elseif($index->getUnique()) {\n $sql = sprintf(config('sql.index.implicit.unique'), $index->getName(), $columns);\n } else {\n $sql = sprintf(config('sql.index.implicit.key'), $index->getName(), $columns);\n }\n\n return $sql;\n }", "public function testIndexComposite()\n {\n $statement = (new CreateTable($this->mockConnection));\n $return = $statement->index(['column1', 'column2']);\n $array = $statement->toArray();\n\n $this->assertInstanceOf(CreateTable::class, $return);\n $this->assertEquals([\n 'constraints' => [\n [\n 'type' => 'index',\n 'name' => null,\n 'columns' => ['column1', 'column2']\n ]\n ],\n ], $array);\n }", "public function addColumn()\n {\n if ($this->name || $this->timestamps) {\n $this->columns[] = [\n 'column' => $this->name,\n 'length' => $this->length,\n 'dataType' => $this->dataType,\n 'nullable' => $this->nullable,\n 'unsigned' => $this->unsigned,\n 'pk' => $this->pk,\n 'timestamps' => $this->timestamps,\n 'autoIncrement' => $this->autoIncrement,\n 'default' => $this->default,\n 'comment' => $this->comment,\n 'unique' => $this->unique,\n ];\n $this->reset();\n }\n if ($this->foreignKey) {\n $this->columns[] = [\n 'foreignKey' => $this->foreignKey,\n 'references' => $this->references,\n 'on' => $this->on,\n 'onUpdate' => $this->onUpdate,\n 'onDelete' => $this->onDelete,\n ];\n $this->reset();\n }\n }", "function indexes($table)\n{\n\treturn $this->drv->indexes($table);\n}", "function get_table_indexes($db, $table, $cnx='', $reload=false, $mode='mysql'){\n\tif($mode!=='mysql') exit('only mysql index mode developed');\n\tglobal $get_table_indexes, $dbTypeArray;\n\tif(!$cnx)$cnx=C_MASTER;\n\tif($get_table_indexes[$db][$table] && !$reload){\n\t\treturn $get_table_indexes[$db][$table];\n\t}else{\n\t\t$fl=__FILE__;\n\t\t$ln=__LINE__+1;\n\t\tob_start();\n\t\t$result=q(\"SHOW INDEXES FROM `$db`.`$table`\", $cnx, ERR_ECHO, O_DO_NOT_REMEDIATE);\n\t\t$err=ob_get_contents();\n\t\tob_end_clean();\n\t\tif($err)return false;\n\t\t\n\t\t$typeFlip = array_flip($dbTypeArray);\n\t\t$inCompound=false;\n\t\twhile($v=mysqli_fetch_array($result,MYSQLI_ASSOC)){\n\t\t\t$w++;\n\t\t\t@extract($v);\n\t\t\tif($buffer==$Key_name){\n\t\t\t\t//duplicate part of a key\n\t\t\t\tif(!$inCompound){\n\t\t\t\t\t$multiIdx[$Key_name][]=$singleIdx[count($singleIdx)-1];\n\t\t\t\t\tunset($singleIdx[count($singleIdx)-1]);\n\t\t\t\t\t//next two lines overcome \"bug\" in php: just cause I unset the highest element, this will not reset the next index assigned when I say $singleIdx[]=.. later on.\n\t\t\t\t\t$clr=$singleIdx;\n\t\t\t\t\t$singleIdx=$clr;\n\t\t\t\t}\n\t\t\t\t$multiIdx[$Key_name][]=$v;\n\t\t\t\t$inCompound=true;\n\t\t\t}else{\n\t\t\t\t$singleIdx[]=$v;\n\t\t\t\t$buffer=$Key_name;\n\t\t\t\t$inCompound=false;\n\t\t\t}\n\t\t}\n\t\t//set $singleIdx as assoc for reference\n\t\tif(count($singleIdx)){\n\t\t\tforeach($singleIdx as $v) $a[strtolower($v['Column_name'])]=$v;\n\t\t\t$singleIdx=$a;\n\t\t}\n\t\t//store compound keys as XML\n\t\tif($multiIdx){\n\t\t\t$compoundKey='';\n\t\t\tforeach($multiIdx as $n=>$v){\n\t\t\t\t$ci.='<compoundKey Key_name=\"'.$n.'\" Column_count=\"'.count($v).'\"';\n\t\t\t\t$i=0;\n\t\t\t\tforeach($v as $w){\n\t\t\t\t\t$i++;\n\t\t\t\t\tif($i==1)$ci.=' Non_unique=\"'.$w['Non_unique'].'\">'.\"\\n\";\n\t\t\t\t\t$ci.='<keyColumn Seq_in_index=\"'.$w['Seq_in_index'].'\" Column_name=\"'.$w['Column_name'].'\" Sub_part=\"'.$w['Sub_part'].'\" Comment=\"'.htmlentities($w['Comment']).'\">'.\"\\n\";\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t$ci.='</compoundKey>';\n\t\t\t}\n\t\t}\n\t\t$get_table_indexes[$db][$table]=array('singleIdx'=>$singleIdx, 'multiIdx'=>$multiIdx, 'compoundXML'=>$ci);\n\t\treturn $get_table_indexes[$db][$table];\n\t}\n}", "public function indexExists( $tablename, $indexname );", "public function createIndexByList($table, $list)\n {\n foreach ($list as $fields => $unique) {\n if (is_numeric($fields)) {\n // if set only fields, then not unique index\n $fields = $unique;\n $unique = 0;\n }\n $fields = explode(',', $fields);\n $fullTableName = strpos($table, '{{%') === 0 ? $table : $this->tn($table);\n $this->createIndex($table . '_' . implode('_', $fields), $fullTableName, $fields, (bool)$unique);\n }\n }", "public function modifyTable() {\n $table = $this->getTable();\n\n $table->addColumn([\n 'name' => $this->getParameter('table_column'),\n 'type' => 'VARCHAR'\n ]);\n }", "public function column($column_key, $index_key=null): GenericCollection;", "public function addColumns()\n {\n add_filter( 'manage_edit-' . $this->post_type . '_columns', array($this, 'editColumns') ) ; // Add or Remove a Column\n add_action( 'manage_' . $this->post_type . '_posts_custom_column', array($this, 'manageColumns') ); //Show and Modify Column Data\n add_filter( 'manage_edit-' . $this->post_type . '_sortable_columns', array($this, 'sortableColumns') ); // Flags sortable Columns\n add_action( 'load-edit.php', array($this, 'loadSortColumns') );\n }", "public function create_foreign_key_and_index()\n {\n $constrain = collect(DB::select(\"PRAGMA index_list(logs)\"))\n ->where('name', '=', 'logs_user_id_index')->first();\n\n $this->assertNotNull(\n $constrain\n );\n }", "public function change(): void\n {\n if(!$this->hasTable(\"expostion\")){\n\n $this->table(\"expostion\", [\"id\"=>\"id_expos\"])\n ->addColumn(\"code_expos\", \"string\", [\"limit\"=>225, \"null\"=>true, \"comment\"=>\"Code de l'exposition\"])\n ->addColumn(\"image_expos\", \"string\", [\"limit\"=>225, \"null\"=>true, \"comment\"=>\"Image de l'exposition\"])\n ->addColumn(\"titre_expos\", \"string\", [\"limit\"=>225, \"null\"=>true, \"comment\"=>\"Titre de l'exposition\"])\n ->addColumn(\"soustitre_expos\", \"string\", [\"limit\"=>225, \"null\"=>true, \"comment\"=>\"Sous-titre de l'exposition\"])\n ->addColumn(\"prix_expos\", \"float\", [\"limit\"=>10, \"null\"=>true, \"comment\"=>\"prix article de l'exposition\"])\n ->addColumn(\"details_expos\", \"text\", [\"limit\"=>MysqlAdapter::TEXT_MEDIUM, \"comment\"=>\"Details de l'article de l'exposition\"])\n\n ->addIndex(\"code_expos\", [\"unique\"=>true, \"name\"=>\"indexExposition\"])\n\n ->create();\n }\n }", "public function addIndex( $table, $definition, $discardDuplicates=TRUE )\n\t{\n\t\t/* If it's a unique index, make sure there won't be any duplicates */\n\t\tif ( $discardDuplicates and in_array( $definition['type'], array( 'primary', 'unique' ) ) )\n\t\t{\n\t\t\t$this->duplicateTableStructure( $table, \"{$table}_temp\" );\n\t\t\t$this->addIndex( \"{$table}_temp\", $definition, FALSE );\n\t\t\t$this->insert( \"{$table}_temp\", \\IPS\\Db::i()->select( '*', $table ), FALSE, TRUE );\n\t\t\t$this->dropTable( $table );\n\t\t\t$this->renameTable( \"{$table}_temp\", $table );\n\t\t}\n\t\t/* Otherwise just do it normally */\n\t\telse\n\t\t{\n\t\t\treturn $this->query( \"ALTER TABLE `{$this->prefix}{$this->escape_string( $table )}` {$this->buildIndex( $table, $definition )}\" );\n\t\t}\n\t}", "public function addColumn($column,$table = \"\", $as = \"\");", "protected function getTableIndexes(Connection $connection, $table, &$definition) {\n // Note, this query doesn't support ordering, so that is worked around\n // below by keying the array on Seq_in_index.\n $query = $connection->query(\"SHOW INDEX FROM {\" . $table . \"}\");\n while (($row = $query->fetchAssoc()) !== FALSE) {\n $index_name = $row['Key_name'];\n $column = $row['Column_name'];\n // Key the arrays by the index sequence for proper ordering (start at 0).\n $order = $row['Seq_in_index'] - 1;\n\n // If specified, add length to the index.\n if ($row['Sub_part']) {\n $column = [$column, $row['Sub_part']];\n }\n\n if ($index_name === 'PRIMARY') {\n $definition['primary key'][$order] = $column;\n }\n elseif ($row['Non_unique'] == 0) {\n $definition['unique keys'][$index_name][$order] = $column;\n }\n else {\n $definition['indexes'][$index_name][$order] = $column;\n }\n }\n }", "public function getDbIndexName($context, DbalSchema $dbal_schema, $drupal_table_name, $index_name, array $table_prefix_info);", "function add_columns_init() {\r\n\r\n\t\t// don't add the column for any taxonomy that has specifically\r\n\t\t// disabled showing the admin column when registering the taxonomy\r\n\t\tif( ! isset( $this->tax_obj->show_admin_column ) || ! $this->tax_obj->show_admin_column )\r\n\t\t\treturn;\r\n\r\n\t\t// also grab all the post types the tax is registered to\r\n\t\tif( isset( $this->tax_obj->object_type ) && is_array( $this->tax_obj->object_type ) ) foreach ( $this->tax_obj->object_type as $post_type ){\r\n\r\n\t\t\t//add some hidden data that we'll need for the quickedit\r\n\t\t\tadd_filter( \"manage_{$post_type}_posts_columns\", array( $this, 'add_tax_columns' ) );\r\n\t\t\tadd_action( \"manage_{$post_type}_posts_custom_column\", array( $this, 'custom_tax_columns' ), 99, 2);\r\n\r\n\t\t}\r\n\r\n\t}", "public function addUniqueIndex( $table,$columns ) {\n\t\t$table = $this->safeTable($table);\n\t\tsort($columns); //else we get multiple indexes due to order-effects\n\t\tforeach($columns as $k=>$v) {\n\t\t\t$columns[$k]= $this->safeColumn($v);\n\t\t}\n\t\t$r = $this->adapter->get(\"SHOW INDEX FROM $table\");\n\t\t$name = 'UQ_'.sha1(implode(',',$columns));\n\t\tif ($r) {\n\t\t\tforeach($r as $i) {\n\t\t\t\tif (strtoupper($i['Key_name'])== strtoupper($name)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$sql = \"ALTER TABLE $table\n ADD CONSTRAINT UNIQUE $name (\".implode(',',$columns).\")\";\n\t\t$this->adapter->exec($sql);\n\t}", "private function createIndexs()\n {\n if(is_array($this->queryIndex) && count($this->queryIndex) > 0){\n $queryIndex = implode(', ', $this->queryIndex);\n return \", {$queryIndex}\";\n }\n }", "abstract public function add_column($table_name, $column_name, $params);", "public function compileIndex(Blueprint $blueprint, Fluent $command)\n {\n $columns = $this->columnize ( $command->columns );\n $table = $this->wrapTable ( $blueprint );\n return \"create index {$command->index} on {$table} ({$columns})\";\n }", "protected static function initIndexes()\n {\n static::$indexes = [];\n foreach (static::$indexesConf as $name => &$index) {\n if (!isset($index['type'])) {\n $index['type'] = 'Generic';\n }\n $index['name'] = $name;\n $index['modelClass'] = static::class;\n\n $class = ClassFinder::getNamespace(\\Zer0\\Model\\Indexes\\AbstractIndex::class) . '\\\\' . $index['type'];\n\n static::$indexes[$name] = new $class($index);\n }\n }", "public function fetchAllIndexedByCol($col);", "function masterAllIndexes() {\n $this->db_master->executeSQL(\"SELECT \" . $this->idx_master . \" from \" . $this->db_master->database . \".\" . $this->table_master);\n }", "public function addIndex($columns)\n {\n $index = new Index($columns, $this);\n\n $this->actions[] = function () use ($index) {\n return $this->manipulation->create($index);\n };\n\n return $this;\n }", "protected function alterTable($conn=null) {\n\t\tif ($conn == null) $conn = DB::Connect();\t// provide a default connection if none given\n\n\t\tforeach ($this->columns as $idx => $column) {\n\t\t\t$field = $this->fields[$idx];\n\t\t\t$type = $this->getFieldType($this->$field);\n\t\t\t$ALTER_QUERY = \"ALTER TABLE $this->table ADD $column $type\";\n\t\t\t\n\t\t\t// HACK: Ignore existing columns\n\t\t\t// How? We ignore exceptions with phrase \"duplicate\" in them\n\t\t\ttry{\n\t\t\t\t$conn->exec($ALTER_QUERY);\n\t\t\t} catch (PDOException $e) {\n\t\t\t\tif (strstr($e->getMessage(), \"duplicate\") === FALSE)\n\t\t\t\t\tthrow $e;\n\t\t\t}\n\t\t}\n\t}", "public function testAddingIndex()\n\t{\n\t\tR::nuke();\n\t\t\n\t\t$sql = 'CREATE TABLE song ( \n\t\t\tid INTEGER PRIMARY KEY AUTOINCREMENT, \n\t\t\talbum_id INTEGER,\n\t\t\tcategory TEXT\n\t\t) ';\n\t\t\n\t\tR::exec( $sql );\n\t\t\n\t\t$writer = R::getWriter();\n\t\t\n\t\t$indexes = R::getAll('PRAGMA index_list(\"song\") ');\n\t\t\n\t\tasrt( count( $indexes ), 0 );\n\t\t\n\t\t$writer->addIndex( 'song', 'index1', 'album_id' );\n\t\t\n\t\t$indexes = R::getAll('PRAGMA index_list(\"song\") ');\n\t\t\n\t\tasrt( count( $indexes ), 1 );\n\t\t\n\t\t$writer->addIndex( 'song', 'index1', 'album_id' );\n\t\t\n\t\t$indexes = R::getAll('PRAGMA index_list(\"song\") ');\n\t\t\n\t\tasrt( count( $indexes ), 1 );\n\t\t\n\t\t$writer->addIndex( 'song', 'index2', 'category' );\n\t\t\n\t\t$indexes = R::getAll('PRAGMA index_list(\"song\") ');\n\t\t\n\t\tasrt( count( $indexes ), 2 );\n\t\t\n\t\ttry {\n\t\t\t$writer->addIndex( 'song', 'index1', 'nonexistant' );\n\t\t\tpass();\n\t\t} catch ( \\Exception $ex ) {\n\t\t\tfail();\n\t\t}\n\t\t\n\t\t$indexes = R::getAll('PRAGMA index_list(\"song\") ');\n\t\tasrt( count( $indexes ), 2 );\n\t\t\n\t\ttry {\n\t\t\t$writer->addIndex( 'nonexistant', 'index1', 'nonexistant' );\n\t\t\tpass();\n\t\t} catch ( \\Exception $ex ) {\n\t\t\tfail();\n\t\t}\n\t\t\n\t\t$indexes = R::getAll('PRAGMA index_list(\"song\") ');\n\t\tasrt( count( $indexes ), 2 );\n\t}", "function buildIndex($indexes, $table = null) {\n $join = array();\n\n foreach ($indexes as $name => $value) {\n\n if ($name == 'PRIMARY') {\n continue;\n }\n $out = 'CREATE ';\n\n if (!empty($value['unique'])) {\n $out .= 'UNIQUE ';\n }\n if (is_array($value['column'])) {\n $value['column'] = implode(', ', array_map(array(&$this, 'name'), $value['column']));\n } else {\n $value['column'] = $this->name($value['column']);\n }\n $out .= \"INDEX {$name} ON {$table}({$value['column']});\";\n $join[] = $out;\n }\n return $join;\n }", "public function isIndex();", "public function enableIndexing()\n {\n $this->setConfig('autoIndex', true);\n }", "abstract protected function loadTableIndexes(string $tableName): array;", "function __alter_table($table, $alterdefs)\r\n{\r\n global $g_current_db;\r\n\r\n $sql = \"SELECT sql,name,type FROM sqlite_master WHERE tbl_name = '\" . $table . \"' ORDER BY type DESC\";\r\n $result = sqlite_query($g_current_db, $sql);\r\n\r\n if (($result === false) || (sqlite_num_rows($result) <= 0)) {\r\n trigger_error('no such table: ' . $table, E_USER_WARNING);\r\n return false;\r\n }\r\n // ------------------------------------- Build the queries\r\n $row = sqlite_fetch_array($result);\r\n $tmpname = 't' . time();\r\n $origsql = trim(preg_replace(\"/[\\s]+/\", \" \", str_replace(\",\", \", \", preg_replace(\"/[\\(]/\", \"( \", $row['sql'], 1))));\r\n $createtemptableSQL = 'CREATE TEMPORARY ' . substr(trim(preg_replace(\"'\" . $table . \"'\", $tmpname, $origsql, 1)), 6);\r\n $origsql = substr($origsql, 0, strlen($origsql)-1); // chops the ) at end\r\n $createindexsql = array();\r\n $i = 0;\r\n $defs = preg_split(\"/[,]+/\", $alterdefs, -1, PREG_SPLIT_NO_EMPTY);\r\n $prevword = $table;\r\n $oldcols = preg_split(\"/[,]+/\", substr(trim($createtemptableSQL), strpos(trim($createtemptableSQL), '(') + 1), -1, PREG_SPLIT_NO_EMPTY);\r\n $oldcols = preg_split(\"/[,]+/\", substr(trim($origsql), strpos(trim($origsql), '(') + 1), -1, PREG_SPLIT_NO_EMPTY);\r\n $newcols = array();\r\n\r\n for($i = 0;$i < sizeof($oldcols);$i++) {\r\n $colparts = preg_split(\"/[\\s]+/\", $oldcols[$i], -1, PREG_SPLIT_NO_EMPTY);\r\n $oldcols[$i] = $colparts[0];\r\n $newcols[$colparts[0]] = $colparts[0];\r\n }\r\n\r\n $newcolumns = '';\r\n $oldcolumns = '';\r\n reset($newcols);\r\n\r\n while (list($key, $val) = each($newcols)) {\r\n $newcolumns .= ($newcolumns?', ':'') . $val;\r\n $oldcolumns .= ($oldcolumns?', ':'') . $key;\r\n }\r\n\r\n $copytotempsql = 'INSERT INTO ' . $tmpname . '(' . $newcolumns . ') SELECT ' . $oldcolumns . ' FROM ' . $table;\r\n $dropoldsql = 'DROP TABLE ' . $table;\r\n $createtesttableSQL = $createtemptableSQL;\r\n\r\n $newname = \"\";\r\n\r\n foreach($defs as $def) {\r\n $defparts = preg_split(\"/[\\s]+/\", $def, -1, PREG_SPLIT_NO_EMPTY);\r\n $action = strtolower($defparts[0]);\r\n\r\n switch ($action) {\r\n case 'add':\r\n\r\n if (sizeof($defparts) <= 2) {\r\n /**\r\n * * mySQL gives no such user_warning\r\n * trigger_error('near \"' . $defparts[0] . ($defparts[1]?' ' . $defparts[1]:'') . '\": SQLITE syntax error', E_USER_WARNING);\r\n *\r\n * //\r\n */\r\n return false;\r\n }\r\n $createtesttableSQL = substr($createtesttableSQL, 0, strlen($createtesttableSQL)-1) . ',';\r\n for($i = 1;$i < sizeof($defparts);$i++)\r\n $createtesttableSQL .= ' ' . $defparts[$i];\r\n $createtesttableSQL .= ')';\r\n break;\r\n\r\n case 'change':\r\n\r\n if (sizeof($defparts) <= 2) {\r\n trigger_error('near \"' . $defparts[0] . ($defparts[1]?' ' . $defparts[1]:'') . ($defparts[2]?' ' . $defparts[2]:'') . '\": SQLITE syntax error', E_USER_WARNING);\r\n return false;\r\n }\r\n if ($severpos = strpos($createtesttableSQL, ' ' . $defparts[1] . ' ')) {\r\n if ($newcols[$defparts[1]] != $defparts[1]) {\r\n trigger_error('unknown column \"' . $defparts[1] . '\" in \"' . $table . '\"', E_USER_WARNING);\r\n return false;\r\n }\r\n $newcols[$defparts[1]] = $defparts[2];\r\n $nextcommapos = strpos($createtesttableSQL, ',', $severpos);\r\n $insertval = '';\r\n for($i = 2;$i < sizeof($defparts);$i++)\r\n $insertval .= ' ' . $defparts[$i];\r\n if ($nextcommapos)\r\n $createtesttableSQL = substr($createtesttableSQL, 0, $severpos) . $insertval . substr($createtesttableSQL, $nextcommapos);\r\n else\r\n $createtesttableSQL = substr($createtesttableSQL, 0, $severpos - (strpos($createtesttableSQL, ',')?0:1)) . $insertval . ')';\r\n } else {\r\n trigger_error('unknown column \"' . $defparts[1] . '\" in \"' . $table . '\"', E_USER_WARNING);\r\n return false;\r\n }\r\n break;\r\n\r\n case 'drop';\r\n\r\n if (sizeof($defparts) < 2) {\r\n trigger_error('near \"' . $defparts[0] . ($defparts[1]?' ' . $defparts[1]:'') . '\": SQLITE syntax error', E_USER_WARNING);\r\n return false;\r\n }\r\n /**\r\n * if ($severpos = strpos($createtesttableSQL, ' ' . $defparts[1] . ' ')) {\r\n * could end with , or ) if no type!!!!\r\n *\r\n * //\r\n */\r\n if (($severpos = strpos($createtesttableSQL, ' ' . $defparts[1] . ' ')) || ($severpos = strpos($createtesttableSQL, ' ' . $defparts[1] . ',')) || ($severpos = strpos($createtesttableSQL, ' ' . $defparts[1] . ')'))) {\r\n $nextcommapos = strpos($createtesttableSQL, ',', $severpos);\r\n if ($nextcommapos)\r\n $createtesttableSQL = substr($createtesttableSQL, 0, $severpos) . substr($createtesttableSQL, $nextcommapos + 1);\r\n else\r\n $createtesttableSQL = substr($createtesttableSQL, 0, $severpos - (strpos($createtesttableSQL, ',')?0:1)) . ')';\r\n unset($newcols[$defparts[1]]);\r\n /* RUBEM */ $createtesttableSQL = str_replace(\",)\", \")\", $createtesttableSQL);\r\n } else {\r\n trigger_error('unknown column \"' . $defparts[1] . '\" in \"' . $table . '\"', E_USER_WARNING);\r\n return false;\r\n }\r\n break;\r\n\r\n case 'rename'; // RUBEM\r\n if (sizeof($defparts) < 2) {\r\n trigger_error('near \"' . $defparts[0] . ($defparts[1]?' ' . $defparts[1]:'') . '\": SQLITE syntax error', E_USER_WARNING);\r\n return false;\r\n }\r\n $newname = $defparts[2];\r\n break;\r\n\r\n default:\r\n\r\n trigger_error('near \"' . $prevword . '\": SQLITE syntax error', E_USER_WARNING);\r\n return false;\r\n } // switch\r\n $prevword = $defparts[sizeof($defparts)-1];\r\n } // foreach\r\n // This block of code generates a test table simply to verify that the columns specifed are valid\r\n // in an sql statement. This ensures that no reserved words are used as columns, for example\r\n sqlite_query($g_current_db, $createtesttableSQL);\r\n $err = sqlite_last_error($g_current_db);\r\n if ($err) {\r\n trigger_error(\"Invalid SQLITE code block: \" . sqlite_error_string($err) . \"\\n\", E_USER_WARNING);\r\n return false;\r\n }\r\n $droptempsql = 'DROP TABLE ' . $tmpname;\r\n sqlite_query($g_current_db, $droptempsql);\r\n // End test block\r\n // Is it a Rename?\r\n if (strlen($newname) > 0) {\r\n // $table = preg_replace(\"/([a-z]_)[a-z_]*/i\", \"\\\\1\" . $newname, $table);\r\n // what do want with the regex? the expression should be [a-z_]! hans\r\n // why not just\r\n $table = $newname;\r\n }\r\n $createnewtableSQL = 'CREATE ' . substr(trim(preg_replace(\"'\" . $tmpname . \"'\", $table, $createtesttableSQL, 1)), 17);\r\n\r\n $newcolumns = '';\r\n $oldcolumns = '';\r\n reset($newcols);\r\n\r\n while (list($key, $val) = each($newcols)) {\r\n $newcolumns .= ($newcolumns?', ':'') . $val;\r\n $oldcolumns .= ($oldcolumns?', ':'') . $key;\r\n }\r\n $copytonewsql = 'INSERT INTO ' . $table . '(' . $newcolumns . ') SELECT ' . $oldcolumns . ' FROM ' . $tmpname;\r\n // ------------------------------------- Perform the actions\r\n if (sqlite_query($g_current_db, $createtemptableSQL) === false) return false; //create temp table\r\n if (sqlite_query($g_current_db, $copytotempsql) === false) return false; //copy to table\r\n if (sqlite_query($g_current_db, $dropoldsql) === false) return false; //drop old table\r\n if (sqlite_query($g_current_db, $createnewtableSQL) === false) return false; //recreate original table\r\n if (sqlite_query($g_current_db, $copytonewsql) === false) return false; //copy back to original table\r\n if (sqlite_query($g_current_db, $droptempsql) === false) return false; //drop temp table\r\n return true;\r\n}", "public function updateIndex()\n {\n if ($this->es_index_helper) {\n call_user_func($this->es_index_helper, $this);\n }\n }", "public function tableColumns($table,$column);" ]
[ "0.7181902", "0.7013335", "0.67576694", "0.6672179", "0.66462904", "0.65270966", "0.6461437", "0.64391017", "0.6427341", "0.6282906", "0.6196372", "0.6153922", "0.6110154", "0.6059058", "0.6037748", "0.60365874", "0.6021988", "0.60199684", "0.60148954", "0.6013287", "0.6000504", "0.59874946", "0.59309715", "0.58950895", "0.5868895", "0.5826201", "0.5825416", "0.57978046", "0.579426", "0.57726127", "0.5757635", "0.57435083", "0.5723494", "0.5689352", "0.5682667", "0.5643718", "0.5637579", "0.56375045", "0.5585639", "0.55752414", "0.554258", "0.55407846", "0.5533167", "0.55294687", "0.5528078", "0.5523117", "0.5522942", "0.552187", "0.5521595", "0.5520511", "0.5513321", "0.5513118", "0.54816437", "0.547673", "0.5474183", "0.54640657", "0.5458085", "0.5455222", "0.545291", "0.545291", "0.54474086", "0.5445655", "0.54415786", "0.54390603", "0.5437346", "0.54239166", "0.5418696", "0.5416884", "0.5390894", "0.5360438", "0.535873", "0.534149", "0.53400266", "0.5332504", "0.5327807", "0.53256935", "0.53192794", "0.53186226", "0.5284027", "0.5284022", "0.52830523", "0.5282094", "0.5277101", "0.5274769", "0.52729374", "0.52669185", "0.52500516", "0.5246664", "0.5245636", "0.52404016", "0.52395177", "0.5236443", "0.52354884", "0.5220079", "0.52122396", "0.5209381", "0.51826036", "0.5182297", "0.51689416", "0.5168355" ]
0.6986675
2
We need some messages from all languages to upgrade course accueil table
function load_global_messages() { global $global_messages, $session, $webDir, $language_codes; // these may seem unused, but they are needed when including messages.inc.php global $siteName, $InstitutionUrl, $Institution; foreach ($session->native_language_names as $code => $name) { // include_messages include "$webDir/lang/$code/common.inc.php"; $extra_messages = "config/{$language_codes[$code]}.inc.php"; if (file_exists($extra_messages)) { include $extra_messages; } else { $extra_messages = false; } include "$webDir/lang/$code/messages.inc.php"; if ($extra_messages) { include $extra_messages; } $global_messages['langCourseDescription'][$code] = $langCourseDescription; $global_messages['langCourseUnits'][$code] = $langCourseUnits; $global_messages['langGlossary'][$code] = $langGlossary; $global_messages['langEBook'][$code] = $langEBook; $global_messages['langVideo'][$code] = $langVideo; $global_messages['langDropBox'][$code] = $langDropBox; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function install_translations() {\n $db = DB::getInstance();\n if(!$db->query(file_get_contents(CORE_INSTALLER_FILES_PATH.'/db/translation.sql'))->error()) {\n return true;\n }\n else {\n System::addMessage('error', rt('An error occurred during the installation of your chosen language'));\n }\n return false;\n}", "public function get_upgrade_messages()\n {\n }", "function install_languages() {\n $db = DB::getInstance();\n if(!$db->query(file_get_contents(CORE_INSTALLER_FILES_PATH.'/db/languages.sql'))->error()) {\n return true;\n }\n else {\n System::addMessage('error', rt('An error occurred during the installation of the languages supported by core'));\n }\n return false;\n}", "public function passo3() {\n $filename= 'f' . gmdate('YmdHis');\n foreach ($this->langarr as $k => $v):\n\n $path = ROOT.DS.'app'.DS.'locale'.DS.$v;\n if (!file_exists($path)) mkdir($path);\n \t$path .= DS.'LC_MESSAGES';\n if (!file_exists($path)) mkdir($path);\n \t$file = $path.DS.$filename;\n if (!file_exists($path)) touch($file);\n\n $file = new File($path.DS.$filename);\n $tmprec = $this->Traducao->find('all',array('conditions' => array('Traducao.locale' => $k)));\n foreach ($tmprec as $rec):\n $file->write('msgid \"' .$rec['Traducao']['msgid'] .'\"'.\"\\n\");\n $file->write('msgstr \"'.$rec['Traducao']['msgstr'].'\"'.\"\\n\");\n endforeach;\n $file->close();\n\n if (file_exists($path.DS.'default.po'))\n rename ($path.DS.'default.po',$path.DS.'default.po.old'.gmdate('YmdHis'));\n\t \n rename ($path.DS.$filename,$path.DS.'default.po');\n endforeach;\n }", "public function languageAction() {\n\t\n\t\t//START LANGUAGE WORK\n\t\tEngine_Api::_()->getApi('language', 'sitestore')->languageChanges();\n\t\t//END LANGUAGE WORK\n\t\t$redirect = $this->_getParam('redirect', false);\n\t\tif($redirect == 'install') {\n\t\t\t$this->_redirect('install/manage');\n\t\t} elseif($redirect == 'query') {\n\t\t\t$this->_redirect('install/manage/complete');\n\t\t}\n\t}", "static private function CreateLanguageMessage() {\n\t\tif (!IllaUser::loggedIn()) {\n\t\t\t$german_browser = (ereg('de', $_SERVER['HTTP_ACCEPT_LANGUAGE']) ? true : false);\n\t\t}else {\n\t\t\t$german_browser = IllaUser::german();\n\t\t}\n\t\tif (($german_browser && self::isEnglish()) || (!$german_browser && self::isGerman())) {\n\t\t\t$short_filename = substr_replace(basename($_SERVER['PHP_SELF']), '', 0, 2);\n\t\t\t$path = str_replace($short_filename, '', $_SERVER['PHP_SELF']);\n\t\t\t$path = substr_replace($path, '', - 2, 2);\n\n\t\t\tif (count($_GET) > 0) {\n\t\t\t\t$getparams = array();\n\t\t\t\tforeach ($_GET as $key => $value) {\n\t\t\t\t\t$getparams[] = htmlentities($key) . '=' . htmlentities($value);\n\t\t\t\t}\n\t\t\t\t$getparams = '?' . implode('&amp;', $getparams);\n\t\t\t}else {\n\t\t\t\t$getparams = '';\n\t\t\t}\n\n\t\t\tif (self::isEnglish() && file_exists('de' . $short_filename)) {\n\t\t\t\tMessages::add('<a href=\"' . $path . 'de' . $short_filename . $getparams . '\" hreflang=\"de\">Deine bevorzugte Sprache scheint Deutsch zu sein. Klick hier um zur deutschen Fassung dieser Seite zu wechseln.</a>', 'note');\n\t\t\t\tMessages::add('<a href=\"' . $path . 'de' . $short_filename . $getparams . '\" hreflang=\"de\">Your favoured language seems to be German. Click here to view the German version of this page.</a>', 'note');\n\t\t\t} elseif (self::isGerman() && file_exists('us' . $short_filename)) {\n\t\t\t\tMessages::add('<a href=\"' . $path . 'us' . $short_filename . $getparams . '\" hreflang=\"us\">Deine bevorzugte Sprache scheint Englisch zu sein. Klick hier um zur englischen Fassung dieser Seite zu wechseln.</a>', 'note');\n\t\t\t\tMessages::add('<a href=\"' . $path . 'us' . $short_filename . $getparams . '\" hreflang=\"us\">Your favoured language seems to be English. Click here to view the English version of this page.</a>', 'note');\n\t\t\t}\n\t\t}\n\t}", "public function migrate()\n\t{\n\t\t\\Aimeos\\MW\\Common\\Base::checkClass( '\\\\Aimeos\\\\MShop\\\\Context\\\\Item\\\\Iface', $this->additional );\n\n\t\t$this->msg( 'Add locale data for languages and currencies', 0 );\n\t\t$this->status( '' );\n\n\n\t\t$ds = DIRECTORY_SEPARATOR;\n\t\t$localeManager = \\Aimeos\\MShop\\Locale\\Manager\\Factory::createManager( $this->additional, 'Standard' );\n\n\n\t\t$filename = __DIR__ . $ds . 'default'. $ds . 'data'. $ds . 'language.php';\n\n\t\tif( ( $data = include( $filename ) ) == false ) {\n\t\t\tthrow new \\Aimeos\\MW\\Setup\\Exception( sprintf( 'No data file \"%1$s\" found', $filename ) );\n\t\t}\n\n\t\tif( isset( $data['locale/language'] ) ) {\n\t\t\t$this->addLocaleLanguageData( $localeManager, $data['locale/language'] );\n\t\t}\n\n\n\t\t$filename = __DIR__ . $ds . 'default'. $ds . 'data'. $ds . 'currency.php';\n\n\t\tif( ( $data = include( $filename ) ) == false ) {\n\t\t\tthrow new \\Aimeos\\MW\\Setup\\Exception( sprintf( 'No data file \"%1$s\" found', $filename ) );\n\t\t}\n\n\t\tif( isset( $data['locale/currency'] ) ) {\n\t\t\t$this->addLocaleCurrencyData( $localeManager, $data['locale/currency'] );\n\t\t}\n\t}", "private function localise_sysLanguage()\n {\n // Get table and field\n list( $table, $field ) = explode( '.', $this->curr_tableField );\n\n // Get localisation configuration\n $l10n_mode = null;\n $l10n_mode = $GLOBALS[ 'TCA' ][ $table ][ 'columns' ][ $field ][ 'l10n_mode' ];\n $l10n_displayCsv = $GLOBALS[ 'TCA' ][ $table ][ 'columns' ][ $field ][ 'l10n_display' ];\n $l10n_displayArr = null;\n $l10n_displayArr = $this->pObj->objZz->getCSVasArray( $l10n_displayCsv );\n // Get localisation configuration\n // RETURN current field isn't localised\n switch ( true )\n {\n case( in_array( 'defaultAsReadonly', $l10n_displayArr ) ):\n return;\n //break;\n case( $l10n_mode == 'exclude' ):\n return;\n //break;\n }\n // RETURN current field isn't localised\n // Get SQL ressource for localised records\n $arr_return = $this->sql_resSysLanguageRows();\n $res = $arr_return[ 'data' ][ 'res' ];\n\n if ( $arr_return[ 'error' ][ 'status' ] )\n {\n $debugTrailLevel = 1;\n $this->pObj->timeTracking_log( $debugTrailLevel, 'end' );\n $header = null;\n $text = null;\n $prompt = $arr_return[ 'error' ][ 'header' ] . $arr_return[ 'error' ][ 'prompt' ];\n $this->pObj->drs_die( $header, $text, $prompt );\n }\n $res = $arr_return[ 'data' ][ 'res' ];\n unset( $arr_return );\n // Get SQL ressource for all filter items\n // Get rows\n $rows_sysLanguage = $this->sql_resToRows( $res );\n\n // Get label for gthe field with the language record pid\n $transOrigPointerField = $this->sql_filterFields[ $this->curr_tableField ][ 'transOrigPointerField' ];\n\n // Override class var $rows\n foreach ( $rows_sysLanguage as $row_sysLanguage )\n {\n if ( !empty( $row_sysLanguage[ $this->curr_tableField ] ) )\n {\n $pidLl = $row_sysLanguage[ $transOrigPointerField ];\n $this->rows[ $pidLl ][ $this->curr_tableField ] = $row_sysLanguage[ $this->curr_tableField ];\n }\n }\n // Override class var $rows\n //:TODO:\n if ( $this->pObj->b_drs_devTodo )\n {\n $prompt = 'sys_language: order rows!';\n t3lib_div::devlog( '[INFO/TODO] ' . $prompt, $this->pObj->extKey, 0 );\n }\n }", "public function installComponentLanguages()\n\t{\n\t$mainframe =& JFactory::getApplication();\n\t//$lang = JFactory::getLanguage(); \n\t\n $db =& JFactory::getDBO();\n $query = $db->getQuery(true);\n $type = \"language\";\n $query->select('a.element');\n $query->from('#__extensions AS a');\n $type = $db->Quote($type);\n\t$query->where('(a.type = '.$type.')');\n\t$query->group('a.element');\n $db->setQuery($query);\n $langlist = $db->loadObjectList();\n\t//echo 'Language -> <pre>'.print_r($langlist,true).'</pre><br>';\n\t\n\t//$languages = JLanguageHelper::getLanguages('lang_code');\n// echo 'Copy Administration language(s) provided by <a href=\"https://opentranslators.transifex.com/projects/p/joomleague/\">Transifex</a><br>';\n\t\n \t//echo 'Language -> <pre>'.print_r($languages,true).'</pre><br>';\n \n foreach ( $langlist as $key )\n {\n //$mainframe->enqueueMessage('Language installed -> ' . $key,'Notice');\n echo 'Copy Administration language( '.$key->element.' ) provided by <a href=\"https://opentranslators.transifex.com/projects/p/joomleague/\">Transifex</a><br>';\n \n $src=JPATH_ADMINISTRATOR.DS.'components'.DS.'com_joomleague'.DS;\n\t\t$dest=JPATH_ADMINISTRATOR.DS.'modules';\n\t\tJFolder::copy($src.DS.'language'.DS.$key->element, JPATH_ADMINISTRATOR.DS.'language'.DS.$key->element, '', true);\n\t\t\n\t\techo ' - <span style=\"color:green\">'.JText::_('Success-> '.$key->element).'</span><br />';\n\t\techo 'Copy Site language( '.$key->element.' ) provided by <a href=\"https://opentranslators.transifex.com/projects/p/joomleague/\">Transifex</a><br>';\n\t\t$src=JPATH_SITE.DS.'components'.DS.'com_joomleague'.DS;\n\t\t$dest=JPATH_SITE.DS;\n\t\tJFolder::copy($src.DS.'language'.DS.$key->element, JPATH_SITE.DS.'language'.DS.$key->element, '', true);\n\t\techo ' - <span style=\"color:green\">'.JText::_('Success -> '.$key->element).'</span><br />';\n\t\t}\n\t\t\n\t}", "private function translationWorkaround()\n {\n L10n::__('BudgetMailer Sign Up Form for WordPress');\n L10n::__('BudgetMailer Sign Up');\n }", "public function interested_lang($data){\n\t\n\t$id = $_SESSION['id'];\n\n\t\t$q = \"SELECT * FROM interested\";\n\t\t$result = $this->connection->query($q);\n\n\t\tif($result->num_rows > 0){\n\n\n\t\t\t$q = \"DELETE FROM interested WHERE u_id='$id'\";\n\t\t\t$result = $this->connection->query($q);\n\n\t\t\tforeach ($data['interested'] as $value) \n\t\t {\n\n\t\t $q = \"INSERT INTO interested (u_id, lang_id) VALUES ($id, $value)\";\n\t\t $result = $this->connection->query($q);\n\n\t\t }\n\n\t\t}else{\n\n foreach ($data['interested'] as $value) \n\t\t {\n\n\t\t $q = \"INSERT INTO interested (u_id, lang_id) VALUES ($id, $value)\";\n\t\t $result = $this->connection->query($q);\n\n\t\t }\n\t\t}\n }", "function changeLang($i) //show and change the language for user\n{\n global $message_id;\n global $user_id;\n global $text;\n global $db;\n global $locale;\n if ($i == 0)\n {\n\n mysqli_query($db, \"UPDATE padporsc_bot4.users SET current_level = 'watching_change_language' WHERE user_id = {$user_id}\");\n\n if ($locale == \"farsi\")\n makeCurl(\"editMessageText\", [\"chat_id\" => $user_id, \"message_id\" => $message_id, \"text\" => \"انتخاب کن.\", \"reply_markup\" => json_encode([\n \"inline_keyboard\" =>[\n [\n [\"text\" => \"فارسی\", \"callback_data\" => \"chang3_T0_p3Rs1an\"], [\"text\" => \"انگلیسی\", \"callback_data\" => \"chang3_T0_3nGl1sH\"]\n ],\n [\n [\"text\" => \" بازگشت\", \"callback_data\" => \"R3tuRn\"]\n ]\n ]\n ])]);\n elseif ($locale == \"english\")\n makeCurl(\"editMessageText\", [\"chat_id\" => $user_id, \"message_id\" => $message_id, \"text\" => \"Choose\", \"reply_markup\" => json_encode([\n \"inline_keyboard\" =>[\n [\n [\"text\" => \"Farsi\", \"callback_data\" => \"chang3_T0_p3Rs1an\"], [\"text\" => \"English\", \"callback_data\" => \"chang3_T0_3nGl1sH\"]\n ],\n [\n [\"text\" => \"Return\", \"callback_data\" => \"R3tuRn\"]\n ]\n ]\n ])]);\n }\n elseif ($i == 1)\n {\n\n $result = mysqli_query($db, \"SELECT * FROM padporsc_bot4.users WHERE user_id = {$user_id}\");\n $row = mysqli_fetch_array($result);\n\n if($row['question_string'] == \"111111\")\n $b = 1;\n else\n $b = 0;\n if ($text == \"R3tuRn\")\n userMenu(1, $b);\n elseif ($text == \"chang3_T0_p3Rs1an\")\n {\n $locale = \"farsi\";\n\n mysqli_query($db, \"UPDATE padporsc_bot4.users SET locale = 'farsi' WHERE user_id = {$user_id}\");\n\n userMenu(1, $b);\n }\n elseif ($text == \"chang3_T0_3nGl1sH\")\n {\n $locale = \"english\";\n\n mysqli_query($db, \"UPDATE padporsc_bot4.users SET locale = 'english' WHERE user_id = {$user_id}\");\n\n userMenu(1, $b);\n }\n }\n\n}", "public\tfunction passo2() {\n\n $trec = $this->Traducao->findAllByLocale($this->defaultLang);\n foreach ($trec as $rec):\n foreach ($this->langarr as $k => $v):\n $tmprec = $this->Traducao->find('all',array('conditions' => array('Traducao.locale' => $k,'Traducao.msgid'=> $rec['Traducao']['msgid'])));\n if (count($tmprec) == 0) {\n $this->data['Traducao']['msgstr'] = $this->Traduzir->translate($rec['Traducao']['msgid'], $this->defaultLang, $k);\n $this->data['Traducao']['msgid'] = $rec\n['Traducao']['msgid'];\n $this->data['Traducao']['locale'] = $k;\n $this->data['Traducao']['status'] = 'm';\n $this->Traducao->save($this->data);\n }\n endforeach;\n\n endforeach;\n }", "function setSystemConfig() {\n global $_ARRLANG, $_CONFIG, $arrLanguages, $language;\n\n $userLangId = \"\";\n foreach ($arrLanguages as $langId => $arrLanguage) {\n if ($language == $arrLanguage['lang']) {\n $userLangId = $langId;\n break;\n }\n }\n\n $statusMsg = \"\";\n\n $objDb = $this->_getDbObject($statusMsg);\n if ($objDb === false) {\n return $statusMsg;\n } else {\n // deactivate all languages\n $query = \"UPDATE `\".$_SESSION['installer']['config']['dbTablePrefix'].\"languages`\n SET `frontend` = '0', `backend` = '0', `is_default` = 'false'\";\n if (!@$objDb->Execute($query)) {\n $statusMsg .= $_ARRLANG['TXT_COULD_NOT_DEACTIVATE_UNUSED_LANGUAGES'].\"<br />\";\n }\n \n // activate german and set it to default\n $query = '\n UPDATE `'.$_SESSION['installer']['config']['dbTablePrefix'].'languages`\n SET `frontend` = 1, backend = 1, `is_default` = \"true\"\n WHERE `lang` = \"de\"\n ';\n if (!@$objDb->Execute($query)) {\n $statusMsg .= $_ARRLANG['TXT_COULD_NOT_ACTIVATE_DEFAULT_LANGUAGE'].\"<br />\";\n }\n\n // activate english\n $query = 'UPDATE `'.$_SESSION['installer']['config']['dbTablePrefix'].'languages`\n SET `frontend` = \"1\", `backend` = \"1\" WHERE `lang` = \"en\"';\n if (!@$objDb->Execute($query)) {\n $statusMsg .= $_ARRLANG['TXT_COULD_NOT_ACTIVATE_CURRENT_LANGUAGE'].\"<br />\";\n }\n\n // set admin email\n $query = \"UPDATE `\".$_SESSION['installer']['config']['dbTablePrefix'].\"settings`\n SET `setvalue` = '\".$_SESSION['installer']['sysConfig']['adminEmail'].\"'\n WHERE `setname` = 'coreAdminEmail'\";\n if (!@$objDb->Execute($query)) {\n $statusMsg .= $_ARRLANG['TXT_COULD_NOT_SET_ADMIN_EMAIL'].\"<br />\";\n }\n\n // set admin name\n $query = \"UPDATE `\".$_SESSION['installer']['config']['dbTablePrefix'].\"settings`\n SET `setvalue` = '\".$_SESSION['installer']['sysConfig']['adminName'].\"'\n WHERE `setname` = 'coreAdminName'\";\n if (!@$objDb->Execute($query)) {\n $statusMsg .= $_ARRLANG['TXT_COULD_NOT_SET_ADMIN_NAME'].\"<br />\";\n }\n\n if (($arrTables = $objDb->MetaTables('TABLES')) === false) {\n $statusMsg .= $_ARRLANG['TXT_COULD_NOT_GATHER_ALL_DATABASE_TABLES'].\"<br />\";\n return $statusMsg;\n }\n\n // set access emails\n $query = \"UPDATE `\".$_SESSION['installer']['config']['dbTablePrefix'].\"access_settings`\n SET `value` = '\".$_SESSION['installer']['sysConfig']['adminEmail'].\"'\n WHERE `key` = 'notification_address'\";\n if (!@$objDb->Execute($query)) {\n $statusMsg .= $_ARRLANG['TXT_COULD_NOT_SET_ADMIN_EMAIL'].\"<br />\";\n }\n $query = \"UPDATE `\".$_SESSION['installer']['config']['dbTablePrefix'].\"access_user_mail`\n SET `sender_mail` = '\".$_SESSION['installer']['sysConfig']['adminEmail'].\"'\";\n if (!@$objDb->Execute($query)) {\n $statusMsg .= $_ARRLANG['TXT_COULD_NOT_SET_ADMIN_EMAIL'].\"<br />\";\n }\n\n // set newsletter emails\n if (in_array($_SESSION['installer']['config']['dbTablePrefix'].\"module_newsletter_settings\", $arrTables)) {\n $query = \"UPDATE `\".$_SESSION['installer']['config']['dbTablePrefix'].\"module_newsletter_settings`\n SET `setvalue` = '\".$_SESSION['installer']['sysConfig']['adminEmail'].\"'\n WHERE `setname` = 'sender_mail' OR `setname` = 'reply_mail' OR `setname` = 'test_mail'\";\n if (!@$objDb->Execute($query)) {\n $statusMsg .= $_ARRLANG['TXT_COULD_NOT_SET_NEWSLETTER_EMAILS'].\"<br />\";\n }\n\n // set newsletter name\n $query = \"UPDATE `\".$_SESSION['installer']['config']['dbTablePrefix'].\"module_newsletter_settings`\n SET `setvalue` = '\".$_SESSION['installer']['sysConfig']['adminName'].\"'\n WHERE `setname` = 'sender_name'\";\n if (!@$objDb->Execute($query)) {\n $statusMsg .= $_ARRLANG['TXT_COULD_NOT_SET_NEWSLETTER_SENDER'].\"<br />\";\n }\n }\n\n // set contact email\n $query = \"UPDATE `\".$_SESSION['installer']['config']['dbTablePrefix'].\"settings`\n SET `setvalue` = '\".$_SESSION['installer']['sysConfig']['contactEmail'].\"'\n WHERE `setname` = 'contactFormEmail'\";\n if (!@$objDb->Execute($query)) {\n $statusMsg .= $_ARRLANG['TXT_COULD_NOT_SET_CONTACT_EMAIL'].\"<br />\";\n }\n\n $query = \"UPDATE `\".$_SESSION['installer']['config']['dbTablePrefix'].\"module_contact_form`\n SET `mails` = '\".$_SESSION['installer']['sysConfig']['contactEmail'].\"'\n WHERE `id` = 1\";\n if (!@$objDb->Execute($query)) {\n $statusMsg .= $_ARRLANG['TXT_COULD_NOT_SET_CONTACT_EMAIL'].\"<br />\";\n }\n\n // set domain url\n if (preg_match('#^https?://#', $_SESSION['installer']['sysConfig']['domainURL'])) {\n $statusMsg .= $_ARRLANG['TXT_SET_VALID_DOMAIN_URL'];\n } else {\n if (substr($_SESSION['installer']['sysConfig']['domainURL'], -1) == '/') {\n $_SESSION['installer']['sysConfig']['domainURL'] = substr($_SESSION['installer']['sysConfig']['domainURL'], 0, -1);\n }\n\n $query = \"UPDATE `\".$_SESSION['installer']['config']['dbTablePrefix'].\"settings`\n SET `setvalue` = '\".$_SESSION['installer']['sysConfig']['domainURL'].\"'\n WHERE `setname` = 'domainUrl'\";\n if (!@$objDb->Execute($query)) {\n $statusMsg .= $_ARRLANG['TXT_COULD_NOT_SET_DOMAIN_URL'].\"<br />\";\n }\n }\n\n if (in_array($_SESSION['installer']['config']['dbTablePrefix'].\"module_shop_config\", $arrTables)) {\n // set shop email\n $query = \"UPDATE `\".$_SESSION['installer']['config']['dbTablePrefix'].\"module_shop_config`\n SET `value` = '\".$_SESSION['installer']['sysConfig']['adminEmail'].\"'\n WHERE `name` = 'email' OR `name` = 'confirmation_emails' OR `name` = 'paypal_account_email'\";\n if (!@$objDb->Execute($query)) {\n $statusMsg .= $_ARRLANG['TXT_COULD_NOT_SET_CONTACT_EMAIL'].\"<br />\";\n }\n }\n\n if (in_array($_SESSION['installer']['config']['dbTablePrefix'].\"module_shop_mail_content\", $arrTables)) {\n // set shop email\n $query = \"UPDATE `\".$_SESSION['installer']['config']['dbTablePrefix'].\"module_shop_mail_content`\n SET `from_mail` = '\".$_SESSION['installer']['sysConfig']['adminEmail'].\"'\";\n if (!@$objDb->Execute($query)) {\n $statusMsg .= $_ARRLANG['TXT_COULD_NOT_SET_CONTACT_EMAIL'].\"<br />\";\n }\n }\n\n if (in_array($_SESSION['installer']['config']['dbTablePrefix'].'module_egov_products', $arrTables)) {\n $query = \"UPDATE `\".$_SESSION['installer']['config']['dbTablePrefix'].\"module_egov_products`\n SET `product_target_email` = '\".$_SESSION['installer']['sysConfig']['adminEmail'].\"'\";\n if (!@$objDb->Execute($query)) {\n $statusMsg .= $_ARRLANG['TXT_COULD_NOT_SET_CONTACT_EMAIL'].\"<br />\";\n }\n }\n\n $_SESSION['installer']['sysConfig']['iid'] = $this->updateCheck();\n\n $query = \"UPDATE `\".$_SESSION['installer']['config']['dbTablePrefix'].\"settings`\n SET `setvalue` = '\".$_SESSION['installer']['sysConfig']['iid'].\"'\n WHERE `setname` = 'installationId'\";\n if (!@$objDb->Execute($query)) {\n $statusMsg .= $_ARRLANG['TXT_COULD_NOT_SET_INSTALLATIONID'].\"<br />\";\n }\n\n $arrTimezones = timezone_identifiers_list();\n $query = \"UPDATE `\".$_SESSION['installer']['config']['dbTablePrefix'].\"settings`\n SET `setvalue` = '\".$arrTimezones[$_SESSION['installer']['config']['timezone']].\"'\n WHERE `setname` = 'timezone'\";\n if (!@$objDb->Execute($query) || (!isset($_SESSION['installer']['config']['timezone']) && !isset($arrTimezones[$_SESSION['installer']['config']['timezone']]))) {\n $statusMsg .= $_ARRLANG['TXT_COULD_NOT_SET_TIMEZONE'].\"<br />\";\n }\n\n /*\n // set rss title\n $query = \"UPDATE `\".$_SESSION['installer']['config']['dbTablePrefix'].\"module_news_settings`\n SET `value` = '\".$_SESSION['installer']['sysConfig']['rssTitle'].\"'\n WHERE `name` = 'news_feed_title'\";\n if (!@$objDb->Execute($query)) {\n $statusMsg .= $_ARRLANG['TXT_COULD_NOT_SET_RSS_TITLE'].\"<br />\";\n }\n\n // set rss description\n $query = \"UPDATE `\".$_SESSION['installer']['config']['dbTablePrefix'].\"module_news_settings`\n SET `value` = '\".$_SESSION['installer']['sysConfig']['rssDescription'].\"'\n WHERE `name` = 'news_feed_description'\";\n if (!@$objDb->Execute($query)) {\n $statusMsg .= $_ARRLANG['TXT_COULD_NOT_SET_RSS_DESCRIPTION'].\"<br />\";\n }\n */\n }\n\n if (isset($_SESSION['installer']['config']['cachingByDefault']) && $_SESSION['installer']['config']['cachingByDefault']) {\n // configure caching\n $this->configureCaching();\n }\n\n if (empty($statusMsg)) {\n return $this->_createSettingsFile();\n } else {\n return $statusMsg;\n }\n }", "function forum_lang( $old_lang ){\n\n\t$loc = HOME . '_plugins/Forum/lang/';\n\tif( file_exists( $loc . LANG . '.php' ) )\n\t\trequire $loc . LANG . '.php';\n\telse\n\t\trequire $loc . 'English.php';\n\n\treturn array_merge( $old_lang, $lang );\n}", "function get_chevereto_safe_lang() {\n\tglobal $backup_lang;\n\tforeach($backup_lang as $key=>$value) {\n\t\t$safe_lang[$key] = get_lang_txt($key);\n\t}\n\tunset($safe_lang['critical_js']);\n\tunset($safe_lang['critical_js_step_1']);\n\tunset($safe_lang['critical_js_step_2']);\n\treturn $safe_lang;\n}", "protected function initErrorMessages($lang)\n\t{\n\t\t// Empty previous error messages\n\t\t$this->errorMessages = array();\n\n\t\t// French error messages\n\t\tif ($lang == 'fr') {\n\t\t\t$this->errorMessages['INVALID_FILE_EXTENSION'] = '%sLe téléchargement de ce type de fichier n\\'est pas permise. (Types permises: %s)';\n\t\t\t$this->errorMessages['FILE_UPLOAD_SIZE_TOO_LARGE'] = '%sLe poids du téléchargement dépasse la limite permise de %s. (Votre fichier: %s)';\n\t\t\t$this->errorMessages['FILE_SIZE_TOO_LARGE'] = '%sLe poids du téléchargement dépasse la limite permise de %s.';\n\t\t\t$this->errorMessages['FILE_SIZE_ZERO'] = '%sLe fichier n\\'a pas été téléchargé parce qu\\'il contient zéro octets.';\n\t\t\t$this->errorMessages['INVALID_IMAGE_DIMENSIONS'] = '%sLe serveur ne peut déterminer les dimensions de l\\'image.';\n\t\t\t$this->errorMessages['IMAGE_DIMENSIONS_OOB'] = '%sL\\'image doit avoir %s et %s. (Votre image: %dpx en largeur et %dpx en hauteur)';\n\t\t\t$this->errorMessages['INVALID_FILENAME'] = '%sLe nom du fichier doit contenir seulement des caractères alphanumériques ou les caractères suivants: ()._-';\n\t\t\t$this->errorMessages['FILENAME_TOO_LONG'] = '%sLe nom du fichier ne doit contenir plus de %s caractères. (Votre fichier: %d caractères)';\n\t\t\t$this->errorMessages['MOVE_UPLOADED_FILE_FAILED'] = '%sLe serveur n\\'a pu copier le fichier du dossier temporaire.';\n\t\t\t$this->errorMessages['FILE_UPLOAD_PARTIAL'] = '%sLe fichier n\\'a été que partiellement téléchargé.';\n\t\t\t$this->errorMessages['NO_FILE_UPLOADED'] = '%sAucun fichier n\\'a été envoyé.';\n\t\t\t$this->errorMessages['MISSING_TEMPORARY_FOLDER'] = '%sIl manque un dossier temporaire pour stocker le fichier.';\n\t\t\t$this->errorMessages['FAILED_WRITE_TO_DISK'] = '%sLe fichier n\\'a pu être copié.';\n\t\t\t$this->errorMessages['STOPPED_BY_EXT'] = '%sLe téléchargement a été stoppé à cause de l\\'extension.';\n\t\t\t$this->errorMessages['UNKNOWN_ERROR'] = '%sUne erreur inconnue est survenue lors du téléchargement. (Code: %d)';\n\t\t} else {\n\t\t\t$this->errorMessages['INVALID_FILE_EXTENSION'] = '%sFile uploads are restricted to only the following types: (%s)';\n\t\t\t$this->errorMessages['FILE_UPLOAD_SIZE_TOO_LARGE'] = '%sThe file upload cannot exceed %s in size. (Your file: %s)';\n\t\t\t$this->errorMessages['FILE_SIZE_TOO_LARGE'] = '%sThe file upload cannot exceed %s in size.';\n\t\t\t$this->errorMessages['FILE_SIZE_ZERO'] = '%sThe file was not uploaded because it contains zero bytes.';\n\t\t\t$this->errorMessages['INVALID_IMAGE_DIMENSIONS'] = '%sThe server was unable to determine the image\\'s dimensions.';\n\t\t\t$this->errorMessages['IMAGE_DIMENSIONS_OOB'] = '%sThe image must be %s and %s. (Your image: %dpx wide by %dpx high)';\n\t\t\t$this->errorMessages['INVALID_FILENAME'] = '%sThe name of the file you are trying to upload is invalid. File names can only contain letters, digits, underscores, hyphens, parentheses, and/or periods.';\n\t\t\t$this->errorMessages['FILENAME_TOO_LONG'] = \"%sThe file name cannot exceed %d characters. (Your file: %d characters)\";\n\t\t\t$this->errorMessages['MOVE_UPLOADED_FILE_FAILED'] = '%sThe server could not move the uploaded file from the temporary directory.';\n\t\t\t$this->errorMessages['FILE_UPLOAD_PARTIAL'] = '%sThe file was only partially uploaded.';\n\t\t\t$this->errorMessages['NO_FILE_UPLOADED'] = '%sNo File was uploaded.';\n\t\t\t$this->errorMessages['MISSING_TEMPORARY_FOLDER'] = '%sA temporary folder for the uploaded file is missing.';\n\t\t\t$this->errorMessages['FAILED_WRITE_TO_DISK'] = '%sThe file could not be written to disk.';\n\t\t\t$this->errorMessages['STOPPED_BY_EXT'] = '%sThe upload was stopped by imgExtension.';\n\t\t\t$this->errorMessages['UNKNOWN_ERROR'] = '%sAn unhandled error occured. (Code: %d)';\n\t\t}\n\t}", "function xmldb_enrol_lmb_upgrade($oldversion=0) {\n\n global $CFG, $THEME, $DB;\n\n $dbman = $DB->get_manager();\n\n $result = true;\n\n if ($result && $oldversion < 2007072501) {\n $table = new xmldb_table('lmb_enrolments');\n if (!$dbman->field_exists($table, new xmldb_field('succeeded'))) {\n $field = new xmldb_field('succeeded');\n $field->set_attributes(XMLDB_TYPE_INTEGER, '4', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, '0', 'status');\n\n $result = $result && $dbman->add_field($table, $field);\n }\n\n $table = new xmldb_table('lmb_crosslist');\n if (!$dbman->field_exists($table, new xmldb_field('timemodified'))) {\n $field = new xmldb_field('timemodified');\n $field->set_attributes(XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, '0', 'crosslistsourcedid');\n\n $result = $result && $dbman->add_field($table, $field);\n }\n if (!$dbman->field_exists($table, new xmldb_field('coursesourcedidsource'))) {\n $field = new xmldb_field('coursesourcedidsource');\n $field->set_attributes(XMLDB_TYPE_TEXT, 'medium', null, null, null, null, 'id');\n\n $result = $result && $dbman->add_field($table, $field);\n }\n if (!$dbman->field_exists($table, new xmldb_field('crosssourcedidsource'))) {\n $field = new xmldb_field('crosssourcedidsource');\n $field->set_attributes(XMLDB_TYPE_TEXT, 'medium', null, null, null, null, 'coursesourcedid');\n\n $result = $result && $dbman->add_field($table, $field);\n }\n if (!$dbman->field_exists($table, new xmldb_field('status'))) {\n $field = new xmldb_field('status');\n $field->set_attributes(XMLDB_TYPE_INTEGER, '4', null, XMLDB_NOTNULL, null, '-1', 'crosslistsourcedid');\n\n $result = $result && $dbman->add_field($table, $field);\n }\n }\n\n if ($result && $oldversion < 2007101701) {\n unset_config('enrol_lmb_bannercron');\n unset_config('enrol_lmb_bannercronhr');\n unset_config('enrol_lmb_bannercronmin');\n set_config('enrol_lmb_storexml', 'always');\n }\n\n if ($result && $oldversion < 2008050501) {\n $table = new xmldb_table('lmb_crosslist');\n if (!$dbman->field_exists($table, new xmldb_field('manual'))) {\n $field = new xmldb_field('manual');\n $field->set_attributes(XMLDB_TYPE_INTEGER, '1', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, '0', 'status');\n\n $result = $result && $dbman->add_field($table, $field);\n }\n }\n\n if ($result && $oldversion < 2008073101) {\n $table = new xmldb_table('lmb_enrolments');\n if (!$dbman->field_exists($table, new xmldb_field('midtermgrademode'))) {\n $field = new xmldb_field('midtermgrademode');\n $field->set_attributes(XMLDB_TYPE_TEXT, 'small', null, null, null, null, 'succeeded');\n\n $result = $result && $dbman->add_field($table, $field);\n }\n if (!$dbman->field_exists($table, new xmldb_field('midtermsubmitted'))) {\n $field = new xmldb_field('midtermsubmitted');\n $field->set_attributes(XMLDB_TYPE_INTEGER, '1', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, '0', 'midtermgrademode');\n\n $result = $result && $dbman->add_field($table, $field);\n }\n if (!$dbman->field_exists($table, new xmldb_field('finalgrademode'))) {\n $field = new xmldb_field('finalgrademode');\n $field->set_attributes(XMLDB_TYPE_TEXT, 'small', null, null, null, null, 'midtermsubmitted');\n\n $result = $result && $dbman->add_field($table, $field);\n }\n if (!$dbman->field_exists($table, new xmldb_field('finalsubmitted'))) {\n $field = new xmldb_field('finalsubmitted');\n $field->set_attributes(XMLDB_TYPE_INTEGER, '1', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, '0', 'finalgrademode');\n\n $result = $result && $dbman->add_field($table, $field);\n }\n }\n\n if ($result && $oldversion < 2008073102) {\n $table = new xmldb_table('lmb_enrolments');\n\n if (!$dbman->field_exists($table, new xmldb_field('gradable'))) {\n $field = new xmldb_field('gradable');\n $field->set_attributes(XMLDB_TYPE_INTEGER, '1', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, '0', 'succeeded');\n\n // Launch add field gradable.\n $result = $result && $dbman->add_field($table, $field);\n }\n }\n\n if ($result && $oldversion < 2008073104) {\n $table = new xmldb_table('lmb_terms');\n $field = new xmldb_field('active');\n $field->set_attributes(XMLDB_TYPE_INTEGER, '1', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, '1', 'studentshowtime');\n\n $result = $result && $dbman->add_field($table, $field);\n }\n\n if ($result && $oldversion < 2008081302) {\n $table = new xmldb_table('lmb_crosslist');\n $field = new xmldb_field('type');\n $field->set_attributes(XMLDB_TYPE_CHAR, '8', null, null, null, $CFG->enrol_lmb_xlstype, 'manual');\n\n $result = $result && $dbman->add_field($table, $field);\n\n $field->set_attributes(XMLDB_TYPE_CHAR, '8', null, null, null, null, 'manual');\n\n $result = $result && $dbman->change_field_default($table, $field);\n }\n\n if ($result && $oldversion < 2008082001) {\n set_config('silent', 1, 'enrol/lmb');\n }\n\n if ($result && $oldversion < 2008082201) {\n set_config('logtolocation', $CFG->enrol_lmb_logtolocation, 'enrol/lmb');\n unset_config('enrol_lmb_logtolocation');\n\n set_config('performlmbcheck', $CFG->enrol_lmb_performlmbcheck, 'enrol/lmb');\n unset_config('enrol_lmb_performlmbcheck');\n\n set_config('startbiztimehr', $CFG->enrol_lmb_startbiztimehr, 'enrol/lmb');\n unset_config('enrol_lmb_startbiztimehr');\n\n set_config('startbiztimemin', $CFG->enrol_lmb_startbiztimemin, 'enrol/lmb');\n unset_config('enrol_lmb_startbiztimemin');\n\n set_config('endbiztimehr', $CFG->enrol_lmb_endbiztimehr, 'enrol/lmb');\n unset_config('enrol_lmb_endbiztimehr');\n\n set_config('endbiztimemin', $CFG->enrol_lmb_endbiztimemin, 'enrol/lmb');\n unset_config('enrol_lmb_endbiztimemin');\n\n set_config('bizgrace', $CFG->enrol_lmb_bizgrace, 'enrol/lmb');\n unset_config('enrol_lmb_bizgrace');\n\n set_config('nonbizgrace', $CFG->enrol_lmb_nonbizgrace, 'enrol/lmb');\n unset_config('enrol_lmb_nonbizgrace');\n\n set_config('emails', $CFG->enrol_lmb_emails, 'enrol/lmb');\n unset_config('enrol_lmb_emails');\n\n set_config('bannerxmllocation', $CFG->enrol_lmb_bannerxmllocation, 'enrol/lmb');\n unset_config('enrol_lmb_bannerxmllocation');\n\n set_config('bannercron', $CFG->enrol_lmb_bannercron, 'enrol/lmb');\n unset_config('enrol_lmb_bannercron');\n\n set_config('bannercronhr', $CFG->enrol_lmb_bannercronhr, 'enrol/lmb');\n unset_config('enrol_lmb_bannercronhr');\n\n set_config('bannercronmin', $CFG->enrol_lmb_bannercronmin, 'enrol/lmb');\n unset_config('enrol_lmb_bannercronmin');\n\n set_config('coursetitle', $CFG->enrol_lmb_coursetitle, 'enrol/lmb');\n unset_config('enrol_lmb_coursetitle');\n\n set_config('courseshorttitle', $CFG->enrol_lmb_courseshorttitle, 'enrol/lmb');\n unset_config('enrol_lmb_courseshorttitle');\n\n set_config('cattype', $CFG->enrol_lmb_cattype, 'enrol/lmb');\n unset_config('enrol_lmb_cattype');\n\n set_config('catselect', $CFG->enrol_lmb_catselect, 'enrol/lmb');\n unset_config('enrol_lmb_catselect');\n\n set_config('xlstitle', $CFG->enrol_lmb_xlstitle, 'enrol/lmb');\n unset_config('enrol_lmb_xlstitle');\n\n set_config('xlsshorttitle', $CFG->enrol_lmb_xlsshorttitle, 'enrol/lmb');\n unset_config('enrol_lmb_xlsshorttitle');\n\n set_config('xlstype', $CFG->enrol_lmb_xlstype, 'enrol/lmb');\n unset_config('enrol_lmb_xlstype');\n\n set_config('createnewusers', $CFG->enrol_lmb_createnewusers, 'enrol/lmb');\n unset_config('enrol_lmb_createnewusers');\n\n set_config('createusersemaildomain', $CFG->enrol_lmb_createusersemaildomain, 'enrol/lmb');\n unset_config('enrol_lmb_createusersemaildomain');\n\n set_config('imsdeleteusers', $CFG->enrol_lmb_imsdeleteusers, 'enrol/lmb');\n unset_config('enrol_lmb_imsdeleteusers');\n\n set_config('usernamesource', $CFG->enrol_lmb_usernamesource, 'enrol/lmb');\n unset_config('enrol_lmb_usernamesource');\n\n set_config('useridtypeother', $CFG->enrol_lmb_useridtypeother, 'enrol/lmb');\n unset_config('enrol_lmb_useridtypeother');\n\n set_config('auth', $CFG->enrol_lmb_auth, 'enrol/lmb');\n unset_config('enrol_lmb_auth');\n\n set_config('passwordnamesource', $CFG->enrol_lmb_passwordnamesource, 'enrol/lmb');\n unset_config('enrol_lmb_passwordnamesource');\n\n set_config('passworduseridtypeother', $CFG->enrol_lmb_passworduseridtypeother, 'enrol/lmb');\n unset_config('enrol_lmb_passworduseridtypeother');\n\n set_config('defaultcity', $CFG->enrol_lmb_defaultcity, 'enrol/lmb');\n unset_config('enrol_lmb_defaultcity');\n\n set_config('standardcity', $CFG->enrol_lmb_standardcity, 'enrol/lmb');\n unset_config('enrol_lmb_standardcity');\n\n set_config('imsrolemap01', $CFG->enrol_lmb_imsrolemap01, 'enrol/lmb');\n unset_config('enrol_lmb_imsrolemap01');\n set_config('imsrolemap02', $CFG->enrol_lmb_imsrolemap02, 'enrol/lmb');\n unset_config('enrol_lmb_imsrolemap02');\n\n set_config('unenrolmember', $CFG->enrol_lmb_unenrolmember, 'enrol/lmb');\n unset_config('enrol_lmb_unenrolmember');\n }\n\n if ($result && $oldversion < 2008082301) {\n set_config('xlstitlerepeat', $CFG->enrol_lmb_xlstitlerepeat, 'enrol/lmb');\n unset_config('enrol_lmb_xlstitlerepeat');\n\n set_config('xlstitledivider', $CFG->enrol_lmb_xlstitledivider, 'enrol/lmb');\n unset_config('enrol_lmb_xlstitledivider');\n\n set_config('xlsshorttitlerepeat', $CFG->enrol_lmb_xlsshorttitlerepeat, 'enrol/lmb');\n unset_config('enrol_lmb_xlsshorttitlerepeat');\n\n set_config('xlsshorttitledivider', $CFG->enrol_lmb_xlsshorttitledivider, 'enrol/lmb');\n unset_config('enrol_lmb_xlsshorttitledivider');\n\n set_config('storexml', $CFG->enrol_lmb_storexml, 'enrol/lmb');\n unset_config('enrol_lmb_storexml');\n\n set_config('sourcedidfallback', $CFG->enrol_lmb_sourcedidfallback, 'enrol/lmb');\n unset_config('enrol_lmb_sourcedidfallback');\n\n unset_config('enrol_lmb_movinglogs');\n\n set_config('logerrors', $CFG->enrol_lmb_logerrors, 'enrol/lmb');\n unset_config('enrol_lmb_logerrors');\n\n set_config('includetelephone', $CFG->enrol_lmb_includetelephone, 'enrol/lmb');\n unset_config('enrol_lmb_includetelephone');\n\n set_config('includeaddress', $CFG->enrol_lmb_includeaddress, 'enrol/lmb');\n unset_config('enrol_lmb_includeaddress');\n\n set_config('forcetitle', $CFG->enrol_lmb_forcetitle, 'enrol/lmb');\n unset_config('enrol_lmb_forcetitle');\n\n set_config('forcetelephone', $CFG->enrol_lmb_forcetelephone, 'enrol/lmb');\n unset_config('enrol_lmb_forcetelephone');\n\n set_config('forceshorttitle', $CFG->enrol_lmb_forceshorttitle, 'enrol/lmb');\n unset_config('enrol_lmb_forceshorttitle');\n\n set_config('forcename', $CFG->enrol_lmb_forcename, 'enrol/lmb');\n unset_config('enrol_lmb_forcename');\n\n set_config('forceemail', $CFG->enrol_lmb_forceemail, 'enrol/lmb');\n unset_config('enrol_lmb_forceemail');\n\n set_config('forcecat', $CFG->enrol_lmb_forcecat, 'enrol/lmb');\n unset_config('enrol_lmb_forcecat');\n\n set_config('forceaddress', $CFG->enrol_lmb_forceaddress, 'enrol/lmb');\n unset_config('enrol_lmb_forceaddress');\n\n set_config('coursehidden', $CFG->enrol_lmb_coursehidden, 'enrol/lmb');\n unset_config('enrol_lmb_coursehidden');\n\n set_config('consolidateusernames', $CFG->enrol_lmb_consolidateusernames, 'enrol/lmb');\n unset_config('enrol_lmb_consolidateusernames');\n }\n\n if ($result && $oldversion < 2008082402) {\n $sql = 'SELECT MAX(timereceived) FROM '.$CFG->prefix.'lmb_raw_xml';\n\n if ($lasttime = get_field_sql($sql)) {\n set_config('lastlmbmessagetime', $lasttime, 'enrol/lmb');\n }\n\n }\n\n if ($result && $oldversion < 2008082402) {\n set_config('ignoreusernamecase', 0, 'enrol/lmb');\n }\n\n if ($result && $oldversion < 2008082601) {\n $table = new xmldb_table('lmb_enrolments');\n $field = new xmldb_field('extractstatus');\n $field->set_attributes(XMLDB_TYPE_INTEGER, '1', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, '0', 'status');\n\n $result = $result && $dbman->add_field($table, $field);\n }\n\n if ($result && $oldversion < 2009081302) {\n set_config('lastunhidetime', time(), 'enrol/lmb');\n set_config('cronunhidecourses', 0, 'enrol/lmb');\n\n if (isset($config->coursehidden) && ($config->coursehidden == 1)) {\n set_config('coursehidden', 'always', 'enrol/lmb');\n } else {\n set_config('coursehidden', 'never', 'enrol/lmb');\n }\n }\n\n if ($result && $oldversion < 2009082001) {\n $table = new xmldb_table('lmb_enrolments');\n $field = new xmldb_field('extractstatus');\n $field->set_attributes(XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, '0', 'status');\n\n // Launch change of precision for field extractstatus.\n $result = $result && $dbman->change_field_precision($table, $field);\n }\n\n if ($result && $oldversion < 2009082201) {\n\n // Define field crosslistgroupid to be added to lmb_crosslist.\n $table = new xmldb_table('lmb_crosslist');\n $field = new xmldb_field('crosslistgroupid');\n $field->set_attributes(XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, null, null, null, 'crosslistsourcedid');\n\n // Launch add field crosslistgroupid.\n $result = $result && $dbman->add_field($table, $field);\n }\n\n if ($result && $oldversion < 2010012001) {\n\n // Define table lmb_categories to be created.\n $table = new xmldb_table('lmb_categories');\n\n // Adding fields to table lmb_categories.\n $table->add_field('id', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, XMLDB_SEQUENCE, null);\n $table->add_field('termsourcedid', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, null, null, null);\n $table->add_field('sourcedidsource', XMLDB_TYPE_TEXT, 'medium', null, null, null, null);\n $table->add_field('dept', XMLDB_TYPE_TEXT, 'medium', null, null, null, null);\n $table->add_field('categoryid', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, null, null, null);\n $table->add_field('cattype', XMLDB_TYPE_TEXT, 'medium', null, null, null, null);\n\n // Adding keys to table lmb_categories.\n $table->add_key('primary', XMLDB_KEY_PRIMARY, array('id'));\n\n // Launch create table for lmb_categories.\n $result = $result && $dbman->create_table($table);\n\n $depts = get_records_sql('SELECT MIN(id), depttitle FROM '.$CFG->prefix.'lmb_courses GROUP BY depttitle');\n $xl = new stdClass();\n $xl->depttitle = 'Crosslisted';\n $depts[] = $xl;\n if ($terms = get_records('lmb_terms')) {\n foreach ($terms as $term) {\n if ($term->categoryid) {\n $cat = new stdClass();\n $cat->categoryid = $term->categoryid;\n $cat->termsourcedid = $term->sourcedid;\n $cat->sourcedidsource = $term->sourcedidsource;\n $cat->cattype = 'term';\n\n insert_record('lmb_categories', addslashes_object($cat));\n unset($cat);\n\n if ($depts) {\n foreach ($depts as $dept) {\n if ($catid = get_field('course_categories', 'id', 'name',\n addslashes($dept->depttitle), 'parent', $term->categoryid)) {\n $cat = new stdClass();\n $cat->categoryid = $catid;\n $cat->termsourcedid = $term->sourcedid;\n $cat->sourcedidsource = $term->sourcedidsource;\n $cat->dept = $dept->depttitle;\n $cat->cattype = 'termdept';\n\n insert_record('lmb_categories', addslashes_object($cat));\n unset($cat);\n }\n }\n }\n }\n }\n }\n\n if ($depts) {\n foreach ($depts as $dept) {\n if ($catid = get_field('course_categories', 'id', 'name', addslashes($dept->depttitle), 'parent', 0)) {\n $cat = new stdClass();\n $cat->categoryid = $catid;\n $cat->dept = $dept->depttitle;\n $cat->cattype = 'dept';\n\n insert_record('lmb_categories', addslashes_object($cat));\n unset($cat);\n }\n }\n }\n\n // Define field categoryid to be dropped from lmb_terms.\n $table = new xmldb_table('lmb_terms');\n $field = new xmldb_field('categoryid');\n\n // Launch drop field categoryid.\n $result = $result && $dbman->drop_field($table, $field);\n\n }\n\n if ($result && $oldversion < 2010082701) {\n $config = get_config('enrol/lmb');\n\n $curtime = time();\n $endtoday = mktime(23, 59, 59, date('n', $curtime), date('j', $curtime), date('Y', $curtime));\n\n set_config('nextunhiderun', $endtoday, 'enrol/lmb');\n\n if (isset($config->lastunhidetime) && ($lasttime = $config->lastunhidetime)) {\n $lastdaytime = mktime(23, 59, 59, date('n', $lasttime), date('j', $lasttime), date('Y', $lasttime));\n $lastendtime = $lastdaytime + ($config->cronunhidedays * 86400);\n\n set_config('prevunhideendtime', $lastendtime, 'enrol/lmb');\n }\n\n unset_config('lastunhidetime', 'enrol/lmb');\n }\n\n if ($oldversion < 2011012501) {\n $config_bad = get_config('enrol/lmb');\n\n $objarray = get_object_vars($config_bad);\n\n foreach ($objarray as $key => $val) {\n if (get_config('enrol_lmb', $key) === false) {\n set_config($key, $val, 'enrol_lmb');\n }\n unset_config($key, 'enrol/lmb');\n }\n\n // Changing type of field sourcedidsource on table lmb_terms to char.\n $table = new xmldb_table('lmb_terms');\n $field = new xmldb_field('sourcedidsource', XMLDB_TYPE_CHAR, '128', null, null, null, null, 'sourcedid');\n\n // Launch change of type for field sourcedidsource.\n $dbman->change_field_type($table, $field);\n\n // Changing type of field sourcedid on table lmb_courses to char.\n $table = new xmldb_table('lmb_courses');\n $field = new xmldb_field('sourcedid', XMLDB_TYPE_CHAR, '128', null, null, null, null, 'id');\n\n // Launch change of type for field sourcedid.\n $dbman->change_field_type($table, $field);\n\n // Changing type of field sourcedidsource on table lmb_courses to char.\n $table = new xmldb_table('lmb_courses');\n $field = new xmldb_field('sourcedidsource', XMLDB_TYPE_CHAR, '128', null, null, null, null, 'sourcedid');\n\n // Launch change of type for field sourcedidsource.\n $dbman->change_field_type($table, $field);\n\n // Changing type of field cattype on table lmb_categories to char.\n $table = new xmldb_table('lmb_categories');\n $field = new xmldb_field('cattype', XMLDB_TYPE_CHAR, '32', null, null, null, null, 'categoryid');\n\n // Launch change of type for field cattype.\n $dbman->change_field_type($table, $field);\n\n // LMB savepoint reached.\n upgrade_plugin_savepoint(true, 2011012501, 'enrol', 'lmb');\n }\n\n if ($oldversion < 2011012502) {\n // Changing type of field coursesourcedid on table lmb_enrolments to char.\n $table = new xmldb_table('lmb_enrolments');\n $field = new xmldb_field('coursesourcedid', XMLDB_TYPE_CHAR, '128', null, null, null, null, 'id');\n\n // Launch change of type for field coursesourcedid.\n $dbman->change_field_type($table, $field);\n\n // LMB savepoint reached.\n upgrade_plugin_savepoint(true, 2011012502, 'enrol', 'lmb');\n }\n\n if ($oldversion < 2011012503) {\n // Changing type of field coursesourcedidsource on table lmb_crosslist to char.\n $table = new xmldb_table('lmb_crosslist');\n $field = new xmldb_field('coursesourcedidsource', XMLDB_TYPE_CHAR, '128', null, null, null, null, 'id');\n\n // Launch change of type for field coursesourcedidsource.\n $dbman->change_field_type($table, $field);\n\n $field = new xmldb_field('coursesourcedid', XMLDB_TYPE_CHAR, '128', null, null, null, null, 'coursesourcedidsource');\n\n // Launch change of type for field coursesourcedid.\n $dbman->change_field_type($table, $field);\n\n $field = new xmldb_field('crosssourcedidsource', XMLDB_TYPE_CHAR, '128', null, null, null, null, 'coursesourcedid');\n\n // Launch change of type for field crosssourcedidsource.\n $dbman->change_field_type($table, $field);\n\n $field = new xmldb_field('crosslistsourcedid', XMLDB_TYPE_CHAR, '128', null, null, null, null, 'crosssourcedidsource');\n\n // Launch change of type for field crosslistsourcedid.\n $dbman->change_field_type($table, $field);\n\n // LMB savepoint reached.\n upgrade_plugin_savepoint(true, 2011012503, 'enrol', 'lmb');\n }\n\n if ($oldversion < 2011020301) {\n $table = new xmldb_table('lmb_enrolments');\n $field = new xmldb_field('personsourcedid', XMLDB_TYPE_CHAR, '128', null, XMLDB_NOTNULL, null, '0', 'coursesourcedid');\n\n // Launch change of type for field personsourcedid.\n $dbman->change_field_type($table, $field);\n\n // Changing type of field sourcedid on table lmb_people to char.\n $table = new xmldb_table('lmb_people');\n $field = new xmldb_field('sourcedid', XMLDB_TYPE_CHAR, '128', null, XMLDB_NOTNULL, null, '0', 'id');\n\n // Launch change of type for field sourcedid.\n $dbman->change_field_type($table, $field);\n\n // LMB savepoint reached.\n upgrade_plugin_savepoint(true, 2011020301, 'enrol', 'lmb');\n }\n\n if ($oldversion < 2011030801) {\n // Changing type of field sourcedid on table lmb_terms to char.\n $table = new xmldb_table('lmb_terms');\n $field = new xmldb_field('sourcedid', XMLDB_TYPE_CHAR, '128', null, XMLDB_NOTNULL, null, '0', 'id');\n\n // Launch change of type for field sourcedid.\n $dbman->change_field_type($table, $field);\n\n // Changing type of field term on table lmb_courses to char.\n $table = new xmldb_table('lmb_courses');\n $field = new xmldb_field('term', XMLDB_TYPE_CHAR, '128', null, XMLDB_NOTNULL, null, '0', 'coursenumber');\n\n // Launch change of type for field term.\n $dbman->change_field_type($table, $field);\n\n // Changing type of field term on table lmb_enrolments to char.\n $table = new xmldb_table('lmb_enrolments');\n $field = new xmldb_field('term', XMLDB_TYPE_CHAR, '128', null, XMLDB_NOTNULL, null, '0', 'personsourcedid');\n\n // Launch change of type for field term.\n $dbman->change_field_type($table, $field);\n\n // Changing type of field termsourcedid on table lmb_categories to char.\n $table = new xmldb_table('lmb_categories');\n $field = new xmldb_field('termsourcedid', XMLDB_TYPE_CHAR, '128', null, null, null, null, 'id');\n\n // Launch change of type for field termsourcedid.\n $dbman->change_field_type($table, $field);\n\n // LMB savepoint reached.\n upgrade_plugin_savepoint(true, 2011030801, 'enrol', 'lmb');\n }\n\n if ($oldversion < 2011122501) {\n\n // Changing type of field sourcedidsource on table lmb_categories to char.\n $table = new xmldb_table('lmb_categories');\n $field = new xmldb_field('sourcedidsource', XMLDB_TYPE_CHAR, '128', null, null, null, null, 'termsourcedid');\n\n // Launch change of type for field sourcedidsource.\n $dbman->change_field_type($table, $field);\n\n // Changing type of field dept on table lmb_categories to char.\n $field = new xmldb_field('dept', XMLDB_TYPE_CHAR, '255', null, null, null, null, 'sourcedidsource');\n\n // Launch change of type for field dept.\n $dbman->change_field_type($table, $field);\n\n // LMB savepoint reached.\n upgrade_plugin_savepoint(true, 2011122501, 'enrol', 'lmb');\n }\n\n if ($oldversion < 2012032701) {\n\n // Define field nickname to be added to lmb_people.\n $table = new xmldb_table('lmb_people');\n $field = new xmldb_field('nickname', XMLDB_TYPE_TEXT, 'small', null, null, null, null, 'givenname');\n\n // Conditionally launch add field nickname.\n if (!$dbman->field_exists($table, $field)) {\n $dbman->add_field($table, $field);\n }\n\n // LMB savepoint reached.\n upgrade_plugin_savepoint(true, 2012032701, 'enrol', 'lmb');\n }\n\n if ($oldversion < 2012032901) {\n\n // Define table lmb_courses to be renamed to enrol_lmb_courses.\n $table = new xmldb_table('lmb_courses');\n\n // Launch rename table for lmb_courses.\n $dbman->rename_table($table, 'enrol_lmb_courses');\n\n // Define table lmb_people to be renamed to enrol_lmb_people.\n $table = new xmldb_table('lmb_people');\n\n // Launch rename table for lmb_people.\n $dbman->rename_table($table, 'enrol_lmb_people');\n\n // Define table lmb_enrolments to be renamed to enrol_lmb_enrolments.\n $table = new xmldb_table('lmb_enrolments');\n\n // Launch rename table for lmb_enrolments.\n $dbman->rename_table($table, 'enrol_lmb_enrolments');\n\n // Define table lmb_raw_xml to be renamed to enrol_lmb_raw_xml.\n $table = new xmldb_table('lmb_raw_xml');\n\n // Launch rename table for lmb_courses.\n $dbman->rename_table($table, 'enrol_lmb_raw_xml');\n\n // Define table lmb_crosslist to be renamed to enrol_lmb_crosslists.\n $table = new xmldb_table('lmb_crosslist');\n\n // Launch rename table for lmb_crosslist.\n $dbman->rename_table($table, 'enrol_lmb_crosslists');\n\n // Define table lmb_courses to be renamed to enrol_lmb_terms.\n $table = new xmldb_table('lmb_terms');\n\n // Launch rename table for lmb_terms.\n $dbman->rename_table($table, 'enrol_lmb_terms');\n\n // Define table lmb_categories to be renamed to enrol_lmb_categories.\n $table = new xmldb_table('lmb_categories');\n\n // Launch rename table for lmb_categories.\n $dbman->rename_table($table, 'enrol_lmb_categories');\n\n // LMB savepoint reached.\n upgrade_plugin_savepoint(true, 2012032901, 'enrol', 'lmb');\n }\n\n if ($oldversion < 2012033004) {\n $config_bad = get_config('enrol/lmb');\n\n $objarray = get_object_vars($config_bad);\n\n foreach ($objarray as $key => $val) {\n if (get_config('enrol_lmb', $key) === false) {\n set_config($key, $val, 'enrol_lmb');\n }\n unset_config($key, 'enrol/lmb');\n }\n\n upgrade_plugin_savepoint(true, 2012033004, 'enrol', 'lmb');\n }\n\n if ($oldversion < 2012033005) {\n if (($config = get_config('enrol_lmb', 'enrol_lmb/endbiztimemin')) !== false) {\n set_config('endbiztimemin', $config, 'enrol_lmb');\n unset_config('enrol_lmb/endbiztimemin', 'enrol_lmb');\n }\n\n if (($config = get_config('enrol_lmb', 'enrol_lmb/startbiztimemin')) !== false) {\n set_config('startbiztimemin', $config, 'enrol_lmb');\n unset_config('enrol_lmb/startbiztimemin', 'enrol_lmb');\n }\n\n upgrade_plugin_savepoint(true, 2012033005, 'enrol', 'lmb');\n }\n\n if ($oldversion < 2012040101) {\n $config = get_config('enrol_lmb');\n\n if (!isset($config->parsecoursexml)) {\n set_config('parsecoursexml', 1, 'enrol_lmb');\n }\n\n if (!isset($config->parsexlsxml)) {\n set_config('parsexlsxml', 1, 'enrol_lmb');\n }\n\n if (!isset($config->parsepersonxml)) {\n set_config('parsepersonxml', 1, 'enrol_lmb');\n }\n\n if (!isset($config->parseenrolxml)) {\n set_config('parseenrolxml', 1, 'enrol_lmb');\n }\n\n upgrade_plugin_savepoint(true, 2012040101, 'enrol', 'lmb');\n }\n\n if ($oldversion < 2012060702) {\n // Define index enrolmbcour_sou_ix (not unique) to be added to enrol_lmb_courses.\n $table = new xmldb_table('enrol_lmb_courses');\n $index = new xmldb_index('enrolmbcour_sou_ix', XMLDB_INDEX_NOTUNIQUE, array('sourcedid'));\n\n // Conditionally launch add index enrolmbcour_sou_ix.\n if (!$dbman->index_exists($table, $index)) {\n $dbman->add_index($table, $index);\n }\n\n // Define index enrolmbpeop_sou_ix (not unique) to be added to enrol_lmb_people.\n $table = new xmldb_table('enrol_lmb_people');\n $index = new xmldb_index('enrolmbpeop_sou_ix', XMLDB_INDEX_NOTUNIQUE, array('sourcedid'));\n\n // Conditionally launch add index enrolmbpeop_sou_ix.\n if (!$dbman->index_exists($table, $index)) {\n $dbman->add_index($table, $index);\n }\n\n // Define index enrolmbcour_per_ix (not unique) to be added to enrol_lmb_enrolments.\n $table = new xmldb_table('enrol_lmb_enrolments');\n $index = new xmldb_index('enrolmbenro_per_ix', XMLDB_INDEX_NOTUNIQUE, array('personsourcedid'));\n\n // Conditionally launch add index enrolmbcour_per_ix.\n if (!$dbman->index_exists($table, $index)) {\n $dbman->add_index($table, $index);\n }\n\n // Define index enrolmbcour_cou_ix (not unique) to be added to enrol_lmb_enrolments.\n $table = new xmldb_table('enrol_lmb_enrolments');\n $index = new xmldb_index('enrolmbenro_cou_ix', XMLDB_INDEX_NOTUNIQUE, array('coursesourcedid'));\n\n // Conditionally launch add index enrolmbcour_cou_ix.\n if (!$dbman->index_exists($table, $index)) {\n $dbman->add_index($table, $index);\n }\n\n // Define index enrolmbcros_cou_ix (not unique) to be added to enrol_lmb_crosslists.\n $table = new xmldb_table('enrol_lmb_crosslists');\n $index = new xmldb_index('enrolmbcros_cou_ix', XMLDB_INDEX_NOTUNIQUE, array('coursesourcedid'));\n\n // Conditionally launch add index enrolmbcros_cou_ix.\n if (!$dbman->index_exists($table, $index)) {\n $dbman->add_index($table, $index);\n }\n\n // Define index enrolmbcros_cro_ix (not unique) to be added to enrol_lmb_crosslists.\n $table = new xmldb_table('enrol_lmb_crosslists');\n $index = new xmldb_index('enrolmbcros_cro_ix', XMLDB_INDEX_NOTUNIQUE, array('crosslistsourcedid'));\n\n // Conditionally launch add index enrolmbcros_cro_ix.\n if (!$dbman->index_exists($table, $index)) {\n $dbman->add_index($table, $index);\n }\n\n // Define index enrolmbterm_sou_ix (not unique) to be added to enrol_lmb_terms.\n $table = new xmldb_table('enrol_lmb_terms');\n $index = new xmldb_index('enrolmbterm_sou_ix', XMLDB_INDEX_NOTUNIQUE, array('sourcedid'));\n\n // Conditionally launch add index enrolmbterm_sou_ix.\n if (!$dbman->index_exists($table, $index)) {\n $dbman->add_index($table, $index);\n }\n\n // Define index enrolmbcate_ter_ix (not unique) to be added to enrol_lmb_categories.\n $table = new xmldb_table('enrol_lmb_categories');\n $index = new xmldb_index('enrolmbcate_ter_ix', XMLDB_INDEX_NOTUNIQUE, array('termsourcedid'));\n\n // Conditionally launch add index enrolmbcate_ter_ix.\n if (!$dbman->index_exists($table, $index)) {\n $dbman->add_index($table, $index);\n }\n\n // Define index enrolmbcate_dep_ix (not unique) to be added to enrol_lmb_categories.\n $table = new xmldb_table('enrol_lmb_categories');\n $index = new xmldb_index('enrolmbcate_dep_ix', XMLDB_INDEX_NOTUNIQUE, array('dept'));\n\n // Conditionally launch add index enrolmbcate_dep_ix.\n if (!$dbman->index_exists($table, $index)) {\n $dbman->add_index($table, $index);\n }\n\n // LMB savepoint reached.\n upgrade_plugin_savepoint(true, 2012060702, 'enrol', 'lmb');\n }\n\n if ($oldversion < 2012091201) {\n // Define field customfield1 to be added to enrol_lmb_people.\n $table = new xmldb_table('enrol_lmb_people');\n $field = new xmldb_field('customfield1', XMLDB_TYPE_TEXT, null, null, null, null, null, 'academicmajor');\n\n // Conditionally launch add field customfield1.\n if (!$dbman->field_exists($table, $field)) {\n $dbman->add_field($table, $field);\n }\n\n // LMB savepoint reached.\n upgrade_plugin_savepoint(true, 2012091201, 'enrol', 'lmb');\n }\n\n if ($oldversion < 2013071601) {\n // Define field beginrestrict to be added to enrol_lmb_enrolments.\n $table = new xmldb_table('enrol_lmb_enrolments');\n $field = new xmldb_field('beginrestrict', XMLDB_TYPE_INTEGER, '1', null, XMLDB_NOTNULL, null, '0', 'status');\n\n // Conditionally launch add field beginrestrict.\n if (!$dbman->field_exists($table, $field)) {\n $dbman->add_field($table, $field);\n }\n\n $field = new xmldb_field('beginrestricttime', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, '0', 'beginrestrict');\n\n // Conditionally launch add field beginrestricttime.\n if (!$dbman->field_exists($table, $field)) {\n $dbman->add_field($table, $field);\n }\n\n $field = new xmldb_field('endrestrict', XMLDB_TYPE_INTEGER, '1', null, XMLDB_NOTNULL, null, '0', 'beginrestricttime');\n\n // Conditionally launch add field endrestrict.\n if (!$dbman->field_exists($table, $field)) {\n $dbman->add_field($table, $field);\n }\n\n $field = new xmldb_field('endrestricttime', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, '0', 'endrestrict');\n\n // Conditionally launch add field endrestricttime.\n if (!$dbman->field_exists($table, $field)) {\n $dbman->add_field($table, $field);\n }\n\n // Lmb savepoint reached.\n upgrade_plugin_savepoint(true, 2013071601, 'enrol', 'lmb');\n }\n\n if ($oldversion < 2013080202) {\n if (enrol_is_enabled('lmb')) {\n $config = get_config('enrol_lmb');\n if (((!isset($config->lmbusername)) || empty($config->lmbusername)) && ((!isset($config->lmbpasswd)) || empty($config->lmbpasswd))) {\n set_config('disablesecurity', 1, 'enrol_lmb');\n }\n }\n\n // Lmb savepoint reached.\n upgrade_plugin_savepoint(true, 2013080202, 'enrol', 'lmb');\n }\n\n if ($oldversion < 2014121402) {\n $config = get_config('enrol_lmb');\n if (isset($config->includeaddress)) {\n set_config('includecity', $config->includeaddress, 'enrol_lmb');\n unset_config('includeaddress', 'enrol_lmb');\n }\n if (isset($config->forceaddress)) {\n set_config('forcecity', $config->forceaddress, 'enrol_lmb');\n unset_config('forceaddress', 'enrol_lmb');\n }\n\n // Lmb savepoint reached.\n upgrade_plugin_savepoint(true, 2014121402, 'enrol', 'lmb');\n }\n\n if ($oldversion < 2016020901) {\n\n // Define field sctid to be added to enrol_lmb_people.\n $table = new xmldb_table('enrol_lmb_people');\n $field = new xmldb_field('sctid', XMLDB_TYPE_CHAR, '127', null, null, null, null, 'sourcedidsource');\n\n // Conditionally launch add field sctid.\n if (!$dbman->field_exists($table, $field)) {\n $dbman->add_field($table, $field);\n }\n\n // Lmb savepoint reached.\n upgrade_plugin_savepoint(true, 2016020901, 'enrol', 'lmb');\n }\n\n if ($oldversion < 2019060501) {\n\n // Define table enrol_lmb_colleges to be created.\n $table = new xmldb_table('enrol_lmb_colleges');\n\n // Adding fields to table enrol_lmb_colleges.\n $table->add_field('id', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, XMLDB_SEQUENCE, null);\n $table->add_field('sourcedid', XMLDB_TYPE_CHAR, '128', null, XMLDB_NOTNULL, null, null);\n $table->add_field('sourcedidsource', XMLDB_TYPE_CHAR, '128', null, null, null, null);\n $table->add_field('shortdescription', XMLDB_TYPE_TEXT, null, null, XMLDB_NOTNULL, null, null);\n $table->add_field('longdescription', XMLDB_TYPE_TEXT, null, null, null, null, null);\n $table->add_field('timemodified', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, null);\n\n // Adding keys to table enrol_lmb_colleges.\n $table->add_key('primary', XMLDB_KEY_PRIMARY, ['id']);\n\n // Conditionally launch create table for enrol_lmb_colleges.\n if (!$dbman->table_exists($table)) {\n $dbman->create_table($table);\n }\n\n // Define field collegesourcedid to be added to enrol_lmb_categories.\n $table = new xmldb_table('enrol_lmb_categories');\n $field = new xmldb_field('collegesourcedid', XMLDB_TYPE_CHAR, '128', null, null, null, null, 'cattype');\n\n // Conditionally launch add field collegesourcedid.\n if (!$dbman->field_exists($table, $field)) {\n $dbman->add_field($table, $field);\n }\n\n // Define field collegesourcedid to be added to enrol_lmb_courses.\n $table = new xmldb_table('enrol_lmb_courses');\n $field = new xmldb_field('collegesourcedid', XMLDB_TYPE_CHAR, '128', null, null, null, null, 'term');\n\n // Conditionally launch add field collegesourcedid.\n if (!$dbman->field_exists($table, $field)) {\n $dbman->add_field($table, $field);\n }\n \n // Lmb savepoint reached.\n upgrade_plugin_savepoint(true, 2019060501, 'enrol', 'lmb');\n }\n\n if ($oldversion < 2019060601) {\n\n // Rename field collegesourcedid on table enrol_lmb_courses to coursesourceid.\n $table = new xmldb_table('enrol_lmb_courses');\n $field = new xmldb_field('collegesourcedid', XMLDB_TYPE_CHAR, '128', null, null, null, null, 'term');\n\n // Launch rename field coursesourcedid.\n $dbman->rename_field($table, $field, 'coursesourceid');\n\n // Define table enrol_lmb_colleges to be created.\n $table = new xmldb_table('enrol_lmb_coursebase');\n\n // Adding fields to table enrol_lmb_colleges.\n $table->add_field('id', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, XMLDB_SEQUENCE, null);\n $table->add_field('sourcedid', XMLDB_TYPE_CHAR, '128', null, XMLDB_NOTNULL, null, null);\n $table->add_field('sourcedidsource', XMLDB_TYPE_CHAR, '128', null, null, null, null);\n $table->add_field('shortdescription', XMLDB_TYPE_TEXT, null, null, XMLDB_NOTNULL, null, null);\n $table->add_field('longdescription', XMLDB_TYPE_TEXT, null, null, null, null, null);\n $table->add_field('collegesourcedid', XMLDB_TYPE_CHAR, '128', null, null, null, null);\n $table->add_field('timemodified', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, null);\n\n // Adding keys to table enrol_lmb_colleges.\n $table->add_key('primary', XMLDB_KEY_PRIMARY, ['id']);\n\n // Conditionally launch create table for enrol_lmb_colleges.\n if (!$dbman->table_exists($table)) {\n $dbman->create_table($table);\n }\n\n // Lmb savepoint reached.\n upgrade_plugin_savepoint(true, 2019060601, 'enrol', 'lmb');\n }\n\n return $result;\n}", "function onMissingTranslation(&$row_to_translate, $language, $reference_table, $tableArray){\n\n //0:Original content\n\t\t//1:Placeholder\n\t\t//2:Original with info\n\t\t//3:Original with alt\n\n $noTranslationBehaviour = 2;\n\n $default_language =JComponentHelper::getParams('com_languages')->get('site','en-GB');\n if ($noTranslationBehaviour >= 1 && ($reference_table == 'content' || $reference_table == 'k2_items' ) && $default_language != $language) {\n\n $defaultText = '<div class=\"falang-missing\">' .JText::_($this->params->get('missing-text')). '</div>';\n\n if ($this->params->get('bootstrap-alert')) {\n $defaultText = '<div class=\"falang-missing alert '.$this->params->get('bootstrap-alert-style').' alert-dismissable\"><button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">&times;</button>' .JText::_($this->params->get('missing-text')). '</div>';\n }\n\n if ($noTranslationBehaviour==3 && isset($row_to_translate->id)){\n $defaultText=\"{jfalternative}\".$row_to_translate->id.\"|content|$defaultText{/jfalternative}\";\n }\n\n\n $cache = JFactory::getCache();\n// $fieldInfo = $cache->call(\"Falang::contentElementFields\",$reference_table, $language);\n $fieldInfo = $cache->call(array(\"Falang\",\"contentElementFields\"),$reference_table, $language);\n\n $textFields = $fieldInfo[\"textFields\"];\n if( $textFields !== null ) {\n $defaultSet = false;\n foreach ($textFields as $field) {\n if( !$defaultSet && $fieldInfo[\"fieldTypes\"][$field]==\"htmltext\") {\n if ($noTranslationBehaviour==1)\t{\n $row_to_translate->$field = $defaultText;\n } else if ($noTranslationBehaviour>=2) {\n $cr=\"<br/>\";\n $row_to_translate->$field = $defaultText .$cr.(isset($row_to_translate->$field)?$row_to_translate->$field:\"\");\n }\n $defaultSet = true;\n } else {\n if ($noTranslationBehaviour==1)\t{\n $row_to_translate->$field = \"\";\n } else if ($noTranslationBehaviour>=2) {\n if ($fieldInfo[\"fieldTypes\"][$field]==\"htmltext\"){\n $cr=\"<br/>\";\n } else {\n $cr=\"\\n\";\n }\n $row_to_translate->$field = (isset($row_to_translate->$field)?$row_to_translate->$field:\"\");\n }\n }\n }\n }\n }\n }", "function signup_get_available_languages()\n {\n }", "public function synchTranslations() {\n\t\t//header('Content-type: text/html; charset=utf-8');\n\t\t$player = User::getUser();\n\t\t$lang = $this->params['lang'];\n\n\t\t//ONLY English!\n\t\t$lang = \"EN\";\n\t\tif (!$player or $player->canAccess('Super Admin Interface') !== TRUE or strlen($lang) != 2) {\n\t\t\tDooUriRouter::redirect(Doo::conf()->APP_URL);\n\t\t\treturn false;\n\t\t}\n\n\t\t$file_names = array();\n\t\t$path = Doo::conf()->SITE_PATH . 'protected';\n\t\tExternalController::scanFileNameRecursivly($path, $file_names);\n\n\t\t//$translator = Doo::translator('Csv', Doo::conf()->SITE_PATH . 'protected/lang/' . $lang . '/' . $lang . //'.csv');\n\t\t$translator = Doo::translator('database', $lang);\n\n\t\t$fileResult = array();\n\n\t\tforeach ($file_names as $file) {\n\n\t\t\tif (file_exists($file)) {\n\n\t\t\t\t$content = file_get_contents($file);\n\n\t\t\t\t$clen = strlen($content);\n\n\t\t\t\t$pos = 0;\n\t\t\t\twhile ($pos = strpos($content, 'this'.'->__(', $pos))\n\t\t\t\t{\n\t\t\t\t\tif ($pos)\n\t\t\t\t\t{\n\t\t\t\t\t\t//Get ''\n\t\t\t\t\t\tif ($content[$pos+9]==\"'\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$res = \"\";\n\t\t\t\t\t\t\t$pos1 = strpos($content, \"'\", $pos+1);\n\t\t\t\t\t\t\t$pos2 = strpos($content, \"'\", $pos1+1);\n\n\t\t\t\t\t\t\tfor ($i=$pos1+1;$i<$pos2;$i++)\n\t\t\t\t\t\t\t\t$res .= $content[$i];\n\t\t\t\t\t\t\t$fileResult[] = $res;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//Get \"\"\n\t\t\t\t\t\tif ($content[$pos+9]=='\"')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$res = \"\";\n\t\t\t\t\t\t\t$pos1 = strpos($content, '\"', $pos+1);\n\t\t\t\t\t\t\t$pos2 = strpos($content, '\"', $pos1+1);\n\n\t\t\t\t\t\t\tfor ($i=$pos1+1;$i<$pos2;$i++)\n\t\t\t\t\t\t\t\t$res .= $content[$i];\n\t\t\t\t\t\t\t$fileResult[] = $res;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$pos++;\n\t\t\t\t}\n\n\t\t\t\t// Check for snController - used when this can not be used\n\t\t\t\t$pos = 0;\n\t\t\t\twhile ($pos = strpos($content, 'snController'.'->__(', $pos))\n\t\t\t\t{\n\t\t\t\t\tif ($pos)\n\t\t\t\t\t{\n\t\t\t\t\t\t//Get ''\n\t\t\t\t\t\tif ($content[$pos+17]==\"'\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$res = \"\";\n\t\t\t\t\t\t\t$pos1 = strpos($content, \"'\", $pos+1);\n\t\t\t\t\t\t\t$pos2 = strpos($content, \"'\", $pos1+1);\n\n\t\t\t\t\t\t\tfor ($i=$pos1+1;$i<$pos2;$i++)\n\t\t\t\t\t\t\t\t$res .= $content[$i];\n\t\t\t\t\t\t\t$fileResult[] = $res;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//Get \"\"\n\t\t\t\t\t\tif ($content[$pos+17]=='\"')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$res = \"\";\n\t\t\t\t\t\t\t$pos1 = strpos($content, '\"', $pos+1);\n\t\t\t\t\t\t\t$pos2 = strpos($content, '\"', $pos1+1);\n\n\t\t\t\t\t\t\tfor ($i=$pos1+1;$i<$pos2;$i++)\n\t\t\t\t\t\t\t\t$res .= $content[$i];\n\t\t\t\t\t\t\t$fileResult[] = $res;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$pos++;\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\techo \"No file\";\n\t\t\t}\n\t\t}\n $fileResult = array_unique($fileResult);\n //Fetch and compare texts from database with collected fileresults to find unused texts and delete them\n if (!empty($fileResult)) {\n echo \"TRANSLATION KEY DELETION: <br/><br/>\";\n\n $dRows = 0;\n $screentexts = new GeScreenTexts();\n $params['select'] = \"{$screentexts->_table}.ID_TEXT, {$screentexts->_table}.TransKey\";\n $dbKeys = Doo::db()->find('GeScreenTexts', $params);\n foreach($dbKeys as $text) {\n $key = array_search($text->TransKey, $fileResult);\n // If key isn't used, delete it\n if(!$key) {\n $query = \"DELETE FROM ge_screentexts WHERE ID_TEXT={$text->ID_TEXT}\";\n echo \"Deleted: $text->TransKey<br/>\";\n Doo::db()->query($query);\n $dRows++;\n }\n }\n echo \"$dRows keys deleted<br/><br/>\";\n }\n\n\t\t//Loop thru the collected fileresults and find new untranslated texts and insert them\n\t\tif (!empty($fileResult)) {\n\t\t\techo \"FILE TRANSLATION: <br/><br/>\";\n\n\t\t\t$nRows = 0;\n\t\t\tforeach ($fileResult as $item)\n\t\t\t{\n\t\t\t\t$query = \"SELECT COUNT(*) as n FROM ge_screentexts WHERE TransKey=\" .'\"' . $item . '\"';\n\n\t\t\t\t$o = (object)Doo::db()->fetchRow($query);\n\t\t\t\t$n = $o->n;\n\n\t\t\t\tif ($n==0)\n\t\t\t\t{\n\t\t\t\t\t$query = \"INSERT INTO ge_screentexts\".\n\t\t\t\t\t\t\t \"(TransKey,TransTextEN,TransTextDA,TransTextDE,TransTextFR,TransTextES,TransTextRO,TransTextLT,TransTextBG,\".\n\t\t\t\t\t\t\t \"TransTextNL,TransTextEL,TransTextTR,TransTextZH,TransTextIS,TransTextBR,TransTextTH,TransTextPT,TransTextRU,\".\n\t\t\t\t\t\t\t \"TransTextPL,TransTextFI,TransTextFA,TransTextDR,TransTextNO,TransTextSE,TransTextHU,TransTextAR,TransTextET)\".\n\t\t\t\t\t\t\t \"VALUES (\".'\"'.$item.'\",\"'.$item.'\"'.\",'','','','','','','','','','','','','','','','','','','','','','','','','')\";\n\t\t\t\t\techo \"New: $item<br/>\";\n\t\t\t\t\tDoo::db()->query($query);\n\t\t\t\t\t//echo \" - $query<br/>\";\n\t\t\t\t\t$nRows++;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\techo \"$nRows new rows added<br/>\";\n\t\t}\n\n\n\t\techo \"<p>Synch translations done</p>\";\n\t\texit;\n\n\t}", "public function iN_Languages() {\n\t\t$query = mysqli_query($this->db, \"SELECT * FROM i_langs WHERE lang_status = '1'\") or die(mysqli_error($this->db));\n\t\twhile ($row = mysqli_fetch_array($query, MYSQLI_ASSOC)) {\n\t\t\t$data[] = $row;\n\t\t}\n\t\tif (!empty($data)) {\n\t\t\treturn $data;\n\t\t}\n\t}", "function displayLanguages()\n\t{\n\t\t$this->checkDisplayMode(\"setup_languages\");\n\n\t\tif (!$this->setup->getClient()->db_installed)\n\t\t{\n\t\t\t// program should never come to this place\n\t\t\t$message = \"No database found! Please install database first.\";\n\t\t\tilUtil::sendFailure($message);\n\t\t}\n\n\t\tinclude_once(\"./setup/classes/class.ilSetupLanguageTableGUI.php\");\n\t\t$tab = new ilSetupLanguageTableGUI($this->setup->getClient());\n\t\t$this->tpl->setVariable(\"SETUP_CONTENT\", $tab->getHTML());\n\n\t\t$this->tpl->setVariable(\"TXT_SETUP_TITLE\",ucfirst(trim($this->lng->txt(\"setup_languages\"))));\n\t\t$this->tpl->setVariable(\"TXT_INFO\", $this->lng->txt(\"info_text_lang\"));\n\n\t\t$installed_langs = $this->lng->getInstalledLanguages();\n\t\t$lang_count = count($installed_langs);\n\t\tif ($lang_count > 0)\n\t\t{\n\t\t\t$this->setup->getClient()->status[\"lang\"][\"status\"] = true;\n\t\t\t$this->setup->getClient()->status[\"lang\"][\"comment\"] = $lang_count.\" \".$this->lng->txt(\"languages_installed\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->setup->getClient()->status[\"lang\"][\"status\"] = false;\n\t\t\t$this->setup->getClient()->status[\"lang\"][\"comment\"] = $this->lng->txt(\"lang_none_installed\");\n\t\t}\n\n\t\t$this->setButtonPrev(\"lang\");\n\n\t\tif ($lang_count > 0)\n\t\t{\n\t\t\t$this->setButtonNext(\"contact\");\n\t\t}\n\n\t\t$this->checkPanelMode();\n\t}", "public function initializeLanguages() {}", "protected abstract function getTranslations();", "public function translate_notice() {\n\t\tglobal $current_user;\n\t\t$user_id = $current_user->ID;\n\n\t\t/* Check that the user hasn't already clicked to ignore the message */\n\t\tif ( get_user_meta( $user_id, 'hestia_ignore_multi_language_upsell_notice' ) ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( ! $this->should_display_translate_notice() ) {\n\t\t\treturn;\n\t\t}\n\n\t\techo '<div class=\"notice notice-warning\" style=\"position:relative;\">';\n\t\tprintf( '<a href=\"%s\" class=\"notice-dismiss\" style=\"text-decoration:none;\"></a>', '?hestia_nag_ignore=0' );\n\t\techo '<p>';\n\t\t/* translators: Upsell to get the pro version */\n\t\tprintf( esc_html__( 'Hestia front-page is not multi-language compatible, for this feature %s.', 'hestia' ), sprintf( '<a href=\"%1$s\" target=\"_blank\">%2$s</a>', esc_url( apply_filters( 'hestia_upgrade_link_from_child_theme_filter', 'https://themeisle.com/themes/hestia-pro/upgrade/' ) ), esc_html__( 'Get the PRO version!', 'hestia' ) ) );\n\t\techo '</p>';\n\t\techo '</div>';\n\t}", "private function sql_select_addLL_sysLanguage()\n {\n // Get table and field\n list( $table ) = explode( '.', $this->curr_tableField );\n\n // RETURN no languageField\n if ( !isset( $GLOBALS[ 'TCA' ][ $table ][ 'ctrl' ][ 'languageField' ] ) )\n {\n if ( $this->pObj->b_drs_filter || $this->pObj->b_drs_sql || $this->pObj->b_drs_localisation )\n {\n $prompt = $table . ' isn\\'t a localised localTable: TCA.' . $table . 'ctrl.languageField is missing.';\n t3lib_div::devlog( '[INFO/FILTER+SQL+LOCALISATION] ' . $prompt, $this->pObj->extKey, 0 );\n }\n return;\n }\n // RETURN no languageField\n // RETURN no transOrigPointerField\n if ( !isset( $GLOBALS[ 'TCA' ][ $table ][ 'ctrl' ][ 'transOrigPointerField' ] ) )\n {\n if ( $this->pObj->b_drs_filter || $this->pObj->b_drs_sql || $this->pObj->b_drs_localisation )\n {\n $prompt = $table . ' isn\\'t a localised localTable: TCA.' . $table . 'ctrl.transOrigPointerField is missing.';\n t3lib_div::devlog( '[INFO/FILTER+SQL+LOCALISATION] ' . $prompt, $this->pObj->extKey, 0 );\n }\n return;\n }\n // RETURN no transOrigPointerField\n // Get field labels\n $languageField = $GLOBALS[ 'TCA' ][ $table ][ 'ctrl' ][ 'languageField' ];\n $languageField = $table . '.' . $languageField;\n $transOrigPointerField = $GLOBALS[ 'TCA' ][ $table ][ 'ctrl' ][ 'transOrigPointerField' ];\n $transOrigPointerField = $table . '.' . $transOrigPointerField;\n // Get field labels\n // addSelect\n $addSelect = \", \" .\n $languageField . \" AS '\" . $languageField . \"', \" .\n $transOrigPointerField . \" AS '\" . $transOrigPointerField . \"'\";\n // addSelect\n // Add $languageField and $transOrigPointerField to the class var sql_filterFields\n $this->sql_filterFields[ $this->curr_tableField ][ 'languageField' ] = $languageField;\n $this->sql_filterFields[ $this->curr_tableField ][ 'transOrigPointerField' ] = $transOrigPointerField;\n\n // DRS\n if ( $this->pObj->b_drs_filter || $this->pObj->b_drs_sql || $this->pObj->b_drs_localisation )\n {\n $prompt = $table . ' is a localised localTable. SELECT is localised.';\n t3lib_div::devlog( '[INFO/FILTER+SQL+LOCALISATION] ' . $prompt, $this->pObj->extKey, 0 );\n }\n // DRS\n // RETURN addSelect\n return $addSelect;\n }", "function getMessages() {\n\t\t$pre= $this->code;\n\t\tif (defined('CACHE_IDENTIFIER')) {\n\t\t\t$pre= CACHE_IDENTIFIER;\n\t\t}\n\n\t\tif (function_exists('apc_fetch') && (DEBUG < 1)) {\n\t\t\t$temp= apc_fetch($pre.'_lang_'.$this->code);\n\t\t\tif (false != $temp) {\n\t\t\t\t$this->messages= & $temp;\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else {\n\t\t\t//TODO eaccellerator? cacheutil?\n\t\t}\n\n\t\t$messages= array ();\n\t\tinclude (ROOT.'controllers'.DS.'lang'.DS.$this->code.'.php');\n\t\t$this->messages= & $messages;\n\n\t\tif (function_exists('apc_store') && (DEBUG < 1)) {\n\t\t\tapc_store($pre.'lang_'.$this->code, $this->messages, 300);\n\t\t} else {\n\t\t\t//TODO eaccellerator? cacheutil?\n\t\t}\n\t}", "public function getMultilingual();", "function final_status_hook() {\n\t$missing = '';\n\tif (isset($_SESSION['exp_missing_titles']) and is_array($_SESSION['exp_missing_titles'])) {\n\t\tforeach ($_SESSION['exp_missing_titles'] as $title => $is_missing) {\n\t\t\tif (!$is_missing)\n\t\t\t\tcontinue;\n\n\t\t\t$missing .= '<li>“' . $title . \"”</li>\\n\";\n\t\t}\n\t}\n\n\tif ($missing)\n\t\treturn <<<EOM\nThe following document titles were not translated in every language.<br/>\nThey may be untranslatable:\n<ul>\n$missing</ul>\nEOM;\n\n\treturn '';\n}", "public static function setupMultilingual()\n {\n $db = JFactory::getDbo();\n $query = $db->getQuery(true);\n $languages = self::getLanguages();\n if (count($languages)) {\n //states table\n $db->setQuery(\"SHOW COLUMNS FROM #__osrs_states\");\n $fields = $db->loadObjectList();\n if (count($fields) > 0) {\n $fieldArr = array();\n for ($i = 0; $i < count($fields); $i++) {\n $field = $fields[$i];\n $fieldname = $field->Field;\n $fieldArr[$i] = $fieldname;\n }\n }\n foreach ($languages as $language) {\n #Process for #__osrs_states table\n $prefix = $language->sef;\n if (!in_array('state_name_' . $prefix, $fieldArr)) {\n $fieldName = 'state_name_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_states` ADD `$fieldName` VARCHAR( 255 );\";\n $db->setQuery($sql);\n $db->execute();\n }\n }\n\n //cities table\n $db->setQuery(\"SHOW COLUMNS FROM #__osrs_cities\");\n $fields = $db->loadObjectList();\n if (count($fields) > 0) {\n $fieldArr = array();\n for ($i = 0; $i < count($fields); $i++) {\n $field = $fields[$i];\n $fieldname = $field->Field;\n $fieldArr[$i] = $fieldname;\n }\n }\n foreach ($languages as $language) {\n #Process for #__osrs_cities table\n $prefix = $language->sef;\n if (!in_array('city_' . $prefix, $fieldArr)) {\n $fieldName = 'city_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_cities` ADD `$fieldName` VARCHAR( 255 );\";\n $db->setQuery($sql);\n $db->execute();\n }\n }\n\n\n\t\t\t//cities table\n $db->setQuery(\"SHOW COLUMNS FROM #__osrs_countries\");\n $fields = $db->loadObjectList();\n if (count($fields) > 0) {\n $fieldArr = array();\n for ($i = 0; $i < count($fields); $i++) {\n $field = $fields[$i];\n $fieldname = $field->Field;\n $fieldArr[$i] = $fieldname;\n }\n }\n foreach ($languages as $language) {\n #Process for #__osrs_countries table\n $prefix = $language->sef;\n if (!in_array('country_name_' . $prefix, $fieldArr)) {\n $fieldName = 'country_name_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_countries` ADD `$fieldName` VARCHAR( 255 );\";\n $db->setQuery($sql);\n $db->execute();\n }\n }\n\n //tags table\n $db->setQuery(\"SHOW COLUMNS FROM #__osrs_tags\");\n $fields = $db->loadObjectList();\n if (count($fields) > 0) {\n $fieldArr = array();\n for ($i = 0; $i < count($fields); $i++) {\n $field = $fields[$i];\n $fieldname = $field->Field;\n $fieldArr[$i] = $fieldname;\n }\n }\n foreach ($languages as $language) {\n #Process for #__osrs_emails table\n $prefix = $language->sef;\n //$fields = array_keys($db->getTableColumns('#__osrs_emails'));\n if (!in_array('keyword_' . $prefix, $fieldArr)) {\n $fieldName = 'keyword_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_tags` ADD `$fieldName` VARCHAR( 255 );\";\n $db->setQuery($sql);\n $db->execute();\n }\n }\n\n\n //emails table\n $db->setQuery(\"SHOW COLUMNS FROM #__osrs_emails\");\n $fields = $db->loadObjectList();\n if (count($fields) > 0) {\n $fieldArr = array();\n for ($i = 0; $i < count($fields); $i++) {\n $field = $fields[$i];\n $fieldname = $field->Field;\n $fieldArr[$i] = $fieldname;\n }\n }\n foreach ($languages as $language) {\n #Process for #__osrs_emails table\n $prefix = $language->sef;\n //$fields = array_keys($db->getTableColumns('#__osrs_emails'));\n if (!in_array('email_title_' . $prefix, $fieldArr)) {\n $fieldName = 'email_title_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_emails` ADD `$fieldName` VARCHAR( 255 );\";\n $db->setQuery($sql);\n $db->execute();\n\n $fieldName = 'email_content_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_emails` ADD `$fieldName` TEXT NULL;\";\n $db->setQuery($sql);\n $db->execute();\n }\n }\n\n //categories table\n $db->setQuery(\"SHOW COLUMNS FROM #__osrs_categories\");\n $fields = $db->loadObjectList();\n if (count($fields) > 0) {\n $fieldArr = array();\n for ($i = 0; $i < count($fields); $i++) {\n $field = $fields[$i];\n $fieldname = $field->Field;\n $fieldArr[$i] = $fieldname;\n }\n }\n foreach ($languages as $language) {\n #Process for #__osrs_categories table\n $prefix = $language->sef;\n if (!in_array('category_name_' . $prefix, $fieldArr)) {\n $fieldName = 'category_name_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_categories` ADD `$fieldName` VARCHAR( 255 );\";\n $db->setQuery($sql);\n $db->execute();\n\n $fieldName = 'category_alias_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_categories` ADD `$fieldName` VARCHAR( 255 );\";\n $db->setQuery($sql);\n $db->execute();\n\n $fieldName = 'category_description_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_categories` ADD `$fieldName` TEXT NULL;\";\n $db->setQuery($sql);\n $db->execute();\n }\n }\n\n\n //amenities table\n $db->setQuery(\"SHOW COLUMNS FROM #__osrs_amenities\");\n $fields = $db->loadObjectList();\n if (count($fields) > 0) {\n $fieldArr = array();\n for ($i = 0; $i < count($fields); $i++) {\n $field = $fields[$i];\n $fieldname = $field->Field;\n $fieldArr[$i] = $fieldname;\n }\n }\n foreach ($languages as $language) {\n #Process for #__osrs_amenities table\n $prefix = $language->sef;\n if (!in_array('amenities_' . $prefix, $fieldArr)) {\n $fieldName = 'amenities_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_amenities` ADD `$fieldName` VARCHAR( 255 );\";\n $db->setQuery($sql);\n $db->execute();\n }\n }\n\n //field group table\n $db->setQuery(\"SHOW COLUMNS FROM #__osrs_fieldgroups\");\n $fields = $db->loadObjectList();\n if (count($fields) > 0) {\n $fieldArr = array();\n for ($i = 0; $i < count($fields); $i++) {\n $field = $fields[$i];\n $fieldname = $field->Field;\n $fieldArr[$i] = $fieldname;\n }\n }\n foreach ($languages as $language) {\n #Process for #__osrs_amenities table\n $prefix = $language->sef;\n if (!in_array('group_name_' . $prefix, $fieldArr)) {\n $fieldName = 'group_name_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_fieldgroups` ADD `$fieldName` VARCHAR( 255 );\";\n $db->setQuery($sql);\n $db->execute();\n }\n }\n\n //extra field table\n $db->setQuery(\"SHOW COLUMNS FROM #__osrs_extra_fields\");\n $fields = $db->loadObjectList();\n if (count($fields) > 0) {\n $fieldArr = array();\n for ($i = 0; $i < count($fields); $i++) {\n $field = $fields[$i];\n $fieldname = $field->Field;\n $fieldArr[$i] = $fieldname;\n }\n }\n foreach ($languages as $language) {\n #Process for #__osrs_amenities table\n $prefix = $language->sef;\n if (!in_array('field_label_' . $prefix, $fieldArr)) {\n $fieldName = 'field_label_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_extra_fields` ADD `$fieldName` VARCHAR( 255 );\";\n $db->setQuery($sql);\n $db->execute();\n\n $fieldName = 'field_description_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_extra_fields` ADD `$fieldName` TEXT NULL;\";\n $db->setQuery($sql);\n $db->execute();\n }\n }\n\n\n //field group table\n $db->setQuery(\"SHOW COLUMNS FROM #__osrs_extra_field_options\");\n $fields = $db->loadObjectList();\n if (count($fields) > 0) {\n $fieldArr = array();\n for ($i = 0; $i < count($fields); $i++) {\n $field = $fields[$i];\n $fieldname = $field->Field;\n $fieldArr[$i] = $fieldname;\n }\n }\n foreach ($languages as $language) {\n #Process for #__osrs_amenities table\n $prefix = $language->sef;\n if (!in_array('field_option_' . $prefix, $fieldArr)) {\n $fieldName = 'field_option_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_extra_field_options` ADD `$fieldName` VARCHAR( 255 );\";\n $db->setQuery($sql);\n $db->execute();\n }\n }\n\n //osrs_property_field_value table\n $db->setQuery(\"SHOW COLUMNS FROM #__osrs_property_field_value\");\n $fields = $db->loadObjectList();\n if (count($fields) > 0) {\n $fieldArr = array();\n for ($i = 0; $i < count($fields); $i++) {\n $field = $fields[$i];\n $fieldname = $field->Field;\n $fieldArr[$i] = $fieldname;\n }\n }\n foreach ($languages as $language) {\n #Process for #__osrs_amenities table\n $prefix = $language->sef;\n if (!in_array('value_' . $prefix, $fieldArr)) {\n $fieldName = 'value_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_property_field_value` ADD `$fieldName` VARCHAR( 255 );\";\n $db->setQuery($sql);\n $db->execute();\n }\n }\n\n //types table\n $db->setQuery(\"SHOW COLUMNS FROM #__osrs_types\");\n $fields = $db->loadObjectList();\n if (count($fields) > 0) {\n $fieldArr = array();\n for ($i = 0; $i < count($fields); $i++) {\n $field = $fields[$i];\n $fieldname = $field->Field;\n $fieldArr[$i] = $fieldname;\n }\n }\n foreach ($languages as $language) {\n #Process for #__osrs_amenities table\n $prefix = $language->sef;\n if (!in_array('type_name_' . $prefix, $fieldArr)) {\n $fieldName = 'type_name_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_types` ADD `$fieldName` VARCHAR( 255 );\";\n $db->setQuery($sql);\n $db->execute();\n\n $fieldName = 'type_alias_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_types` ADD `$fieldName` VARCHAR( 255 );\";\n $db->setQuery($sql);\n $db->execute();\n }\n }\n\n\n //properties table\n $db->setQuery(\"SHOW COLUMNS FROM #__osrs_properties\");\n $fields = $db->loadObjectList();\n if (count($fields) > 0) {\n $fieldArr = array();\n for ($i = 0; $i < count($fields); $i++) {\n $field = $fields[$i];\n $fieldname = $field->Field;\n $fieldArr[$i] = $fieldname;\n }\n }\n foreach ($languages as $language) {\n #Process for #__osrs_properties table\n $prefix = $language->sef;\n if (!in_array('pro_name_' . $prefix, $fieldArr)) {\n $fieldName = 'pro_name_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_properties` ADD `$fieldName` VARCHAR( 255 );\";\n $db->setQuery($sql);\n $db->execute();\n\n $fieldName = 'pro_alias_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_properties` ADD `$fieldName` VARCHAR( 255 );\";\n $db->setQuery($sql);\n $db->execute();\n }\n if (!in_array('address_' . $prefix, $fieldArr)) {\n $fieldName = 'address_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_properties` ADD `$fieldName` VARCHAR( 255 );\";\n $db->setQuery($sql);\n $db->execute();\n }\n\t\t\t\tif (!in_array('price_text_' . $prefix, $fieldArr)) {\n $fieldName = 'price_text_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_properties` ADD `$fieldName` VARCHAR( 255 );\";\n $db->setQuery($sql);\n $db->execute();\n }\n if (!in_array('pro_small_desc_' . $prefix, $fieldArr)) {\n $fieldName = 'pro_small_desc_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_properties` ADD `$fieldName` TEXT NULL;\";\n $db->setQuery($sql);\n $db->execute();\n\n $fieldName = 'pro_full_desc_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_properties` ADD `$fieldName` TEXT NULL;\";\n $db->setQuery($sql);\n $db->execute();\n }\n if (!in_array('metadesc_' . $prefix, $fieldArr)) {\n $fieldName = 'metadesc_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_properties` ADD `$fieldName` VARCHAR (255) DEFAULT '' NOT NULL;\";\n $db->setQuery($sql);\n $db->execute();\n\n $fieldName = 'metakey_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_properties` ADD `$fieldName` VARCHAR (255) DEFAULT '' NOT NULL;\";\n $db->setQuery($sql);\n $db->execute();\n }\n\t\t\t\tif (!in_array('pro_browser_title_' . $prefix, $fieldArr)) {\n $fieldName = 'pro_browser_title_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_properties` ADD `$fieldName` VARCHAR( 255 ) DEFAULT '' NOT NULL;\";\n $db->setQuery($sql);\n $db->execute();\n }\n }\n\n //types table\n $db->setQuery(\"SHOW COLUMNS FROM #__osrs_agents\");\n $fields = $db->loadObjectList();\n if (count($fields) > 0) {\n $fieldArr = array();\n for ($i = 0; $i < count($fields); $i++) {\n $field = $fields[$i];\n $fieldname = $field->Field;\n $fieldArr[$i] = $fieldname;\n }\n }\n foreach ($languages as $language) {\n #Process for #__osrs_amenities table\n $prefix = $language->sef;\n if (!in_array('bio_' . $prefix, $fieldArr)) {\n $fieldName = 'bio_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_agents` ADD `$fieldName` TEXT NULL;\";\n $db->setQuery($sql);\n $db->execute();\n }\n }\n\n\n //companies table\n $db->setQuery(\"SHOW COLUMNS FROM #__osrs_companies\");\n $fields = $db->loadObjectList();\n if (count($fields) > 0) {\n $fieldArr = array();\n for ($i = 0; $i < count($fields); $i++) {\n $field = $fields[$i];\n $fieldname = $field->Field;\n $fieldArr[$i] = $fieldname;\n }\n }\n foreach ($languages as $language) {\n #Process for #__osrs_amenities table\n $prefix = $language->sef;\n if (!in_array('company_description_' . $prefix, $fieldArr)) {\n $fieldName = 'company_description_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_companies` ADD `$fieldName` TEXT NULL;\";\n $db->setQuery($sql);\n $db->execute();\n }\n }\n\n }\n }", "function db_upgrade_all($iOldDBVersion) {\n /// This function does anything necessary to upgrade\n /// older versions to match current functionality\n global $modifyoutput;\n Yii::app()->loadHelper('database');\n\n $sUserTemplateRootDir = Yii::app()->getConfig('usertemplaterootdir');\n $sStandardTemplateRootDir = Yii::app()->getConfig('standardtemplaterootdir');\n echo str_pad(gT('The LimeSurvey database is being upgraded').' ('.date('Y-m-d H:i:s').')',14096).\".<br /><br />\". gT('Please be patient...').\"<br /><br />\\n\";\n\n $oDB = Yii::app()->getDb();\n $oDB->schemaCachingDuration=0; // Deactivate schema caching\n $oTransaction = $oDB->beginTransaction();\n try\n {\n if ($iOldDBVersion < 111)\n {\n // Language upgrades from version 110 to 111 because the language names did change\n\n $aOldNewLanguages=array('german_informal'=>'german-informal',\n 'cns'=>'cn-Hans',\n 'cnt'=>'cn-Hant',\n 'pt_br'=>'pt-BR',\n 'gr'=>'el',\n 'jp'=>'ja',\n 'si'=>'sl',\n 'se'=>'sv',\n 'vn'=>'vi');\n foreach ($aOldNewLanguages as $sOldLanguageCode=>$sNewLanguageCode)\n {\n alterLanguageCode($sOldLanguageCode,$sNewLanguageCode);\n }\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>111),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 112) {\n // New size of the username field (it was previously 20 chars wide)\n $oDB->createCommand()->alterColumn('{{users}}','users_name',\"string(64) NOT NULL\");\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>112),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 113) {\n //Fixes the collation for the complete DB, tables and columns\n\n if (Yii::app()->db->driverName=='mysql')\n {\n $sDatabaseName=getDBConnectionStringProperty('dbname');\n fixMySQLCollations();\n modifyDatabase(\"\",\"ALTER DATABASE `$sDatabaseName` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;\");echo $modifyoutput; flush();@ob_flush();\n }\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>113),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 114) {\n $oDB->createCommand()->alterColumn('{{saved_control}}','email',\"string(320) NOT NULL\");\n $oDB->createCommand()->alterColumn('{{surveys}}','adminemail',\"string(320) NOT NULL\");\n $oDB->createCommand()->alterColumn('{{users}}','email',\"string(320) NOT NULL\");\n $oDB->createCommand()->insert('{{settings_global}}',array('stg_name'=>'SessionName','stg_value'=>randomChars(64,'ABCDEFGHIJKLMNOPQRSTUVWXYZ!\"$%&/()=?`+*~#\",;.:abcdefghijklmnopqrstuvwxyz123456789')));\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>114),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 126) {\n\n addColumn('{{surveys}}','printanswers',\"string(1) default 'N'\");\n addColumn('{{surveys}}','listpublic',\"string(1) default 'N'\");\n\n upgradeSurveyTables126();\n upgradeTokenTables126();\n\n // Create quota table\n $oDB->createCommand()->createTable('{{quota}}',array(\n 'id' => 'pk',\n 'sid' => 'integer',\n 'qlimit' => 'integer',\n 'name' => 'string',\n 'action' => 'integer',\n 'active' => 'integer NOT NULL DEFAULT 1'\n ));\n\n // Create quota_members table\n $oDB->createCommand()->createTable('{{quota_members}}',array(\n 'id' => 'pk',\n 'sid' => 'integer',\n 'qid' => 'integer',\n 'quota_id' => 'integer',\n 'code' => 'string(5)'\n ));\n $oDB->createCommand()->createIndex('sid','{{quota_members}}','sid,qid,quota_id,code',true);\n\n\n // Create templates_rights table\n $oDB->createCommand()->createTable('{{templates_rights}}',array(\n 'uid' => 'integer NOT NULL',\n 'folder' => 'string NOT NULL',\n 'use' => 'integer',\n 'PRIMARY KEY (uid, folder)'\n ));\n\n // Create templates table\n $oDB->createCommand()->createTable('{{templates}}',array(\n 'folder' => 'string NOT NULL',\n 'creator' => 'integer NOT NULL',\n 'PRIMARY KEY (folder)'\n ));\n\n // Rename Norwegian language codes\n alterLanguageCode('no','nb');\n\n addColumn('{{surveys}}','htmlemail',\"string(1) default 'N'\");\n addColumn('{{surveys}}','tokenanswerspersistence',\"string(1) default 'N'\");\n addColumn('{{surveys}}','usecaptcha',\"string(1) default 'N'\");\n addColumn('{{surveys}}','bounce_email','text');\n addColumn('{{users}}','htmleditormode',\"string(7) default 'default'\");\n addColumn('{{users}}','superadmin',\"integer NOT NULL default '0'\");\n addColumn('{{questions}}','lid1',\"integer NOT NULL default '0'\");\n\n alterColumn('{{conditions}}','value',\"string\",false,'');\n alterColumn('{{labels}}','title',\"text\");\n\n $oDB->createCommand()->update('{{users}}',array('superadmin'=>1),\"create_survey=1 AND create_user=1 AND move_user=1 AND delete_user=1 AND configurator=1\");\n $oDB->createCommand()->update('{{conditions}}',array('method'=>'=='),\"(method is null) or method='' or method='0'\");\n\n dropColumn('{{users}}','move_user');\n\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>126),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 127) {\n modifyDatabase(\"\",\"create index answers_idx2 on {{answers}} (sortorder)\"); echo $modifyoutput;\n modifyDatabase(\"\",\"create index assessments_idx2 on {{assessments}} (sid)\"); echo $modifyoutput;\n modifyDatabase(\"\",\"create index assessments_idx3 on {{assessments}} (gid)\"); echo $modifyoutput;\n modifyDatabase(\"\",\"create index conditions_idx2 on {{conditions}} (qid)\"); echo $modifyoutput;\n modifyDatabase(\"\",\"create index conditions_idx3 on {{conditions}} (cqid)\"); echo $modifyoutput;\n modifyDatabase(\"\",\"create index groups_idx2 on {{groups}} (sid)\"); echo $modifyoutput;\n modifyDatabase(\"\",\"create index question_attributes_idx2 on {{question_attributes}} (qid)\"); echo $modifyoutput;\n modifyDatabase(\"\",\"create index questions_idx2 on {{questions}} (sid)\"); echo $modifyoutput;\n modifyDatabase(\"\",\"create index questions_idx3 on {{questions}} (gid)\"); echo $modifyoutput;\n modifyDatabase(\"\",\"create index questions_idx4 on {{questions}} (type)\"); echo $modifyoutput;\n modifyDatabase(\"\",\"create index quota_idx2 on {{quota}} (sid)\"); echo $modifyoutput;\n modifyDatabase(\"\",\"create index saved_control_idx2 on {{saved_control}} (sid)\"); echo $modifyoutput;\n modifyDatabase(\"\",\"create index user_in_groups_idx1 on {{user_in_groups}} (ugid, uid)\"); echo $modifyoutput;\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>127),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 128) {\n upgradeTokens128();\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>128),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 129) {\n addColumn('{{surveys}}','startdate',\"datetime\");\n addColumn('{{surveys}}','usestartdate',\"string(1) NOT NULL default 'N'\");\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>129),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 130)\n {\n addColumn('{{conditions}}','scenario',\"integer NOT NULL default '1'\");\n $oDB->createCommand()->update('{{conditions}}',array('scenario'=>'1'),\"(scenario is null) or scenario=0\");\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>130),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 131)\n {\n addColumn('{{surveys}}','publicstatistics',\"string(1) NOT NULL default 'N'\");\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>131),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 132)\n {\n addColumn('{{surveys}}','publicgraphs',\"string(1) NOT NULL default 'N'\");\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>132),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 133)\n {\n addColumn('{{users}}','one_time_pw','binary');\n // Add new assessment setting\n addColumn('{{surveys}}','assessments',\"string(1) NOT NULL default 'N'\");\n // add new assessment value fields to answers & labels\n addColumn('{{answers}}','assessment_value',\"integer NOT NULL default '0'\");\n addColumn('{{labels}}','assessment_value',\"integer NOT NULL default '0'\");\n // copy any valid codes from code field to assessment field\n switch (Yii::app()->db->driverName){\n case 'mysql':\n case 'mysqli':\n $oDB->createCommand(\"UPDATE {{answers}} SET assessment_value=CAST(`code` as SIGNED) where `code` REGEXP '^-?[0-9]+$'\")->execute();\n $oDB->createCommand(\"UPDATE {{labels}} SET assessment_value=CAST(`code` as SIGNED) where `code` REGEXP '^-?[0-9]+$'\")->execute();\n // copy assessment link to message since from now on we will have HTML assignment messages\n $oDB->createCommand(\"UPDATE {{assessments}} set message=concat(replace(message,'/''',''''),'<br /><a href=\\\"',link,'\\\">',link,'</a>')\")->execute();\n break;\n case 'sqlsrv':\n case 'dblib':\n case 'mssql':\n try{\n $oDB->createCommand(\"UPDATE {{answers}} SET assessment_value=CAST([code] as int) WHERE ISNUMERIC([code])=1\")->execute();\n $oDB->createCommand(\"UPDATE {{labels}} SET assessment_value=CAST([code] as int) WHERE ISNUMERIC([code])=1\")->execute();\n } catch(Exception $e){};\n // copy assessment link to message since from now on we will have HTML assignment messages\n alterColumn('{{assessments}}','link',\"text\",false);\n alterColumn('{{assessments}}','message',\"text\",false);\n $oDB->createCommand(\"UPDATE {{assessments}} set message=replace(message,'/''','''')+'<br /><a href=\\\"'+link+'\\\">'+link+'</a>'\")->execute();\n break;\n case 'pgsql':\n $oDB->createCommand(\"UPDATE {{answers}} SET assessment_value=CAST(code as integer) where code ~ '^[0-9]+'\")->execute();\n $oDB->createCommand(\"UPDATE {{labels}} SET assessment_value=CAST(code as integer) where code ~ '^[0-9]+'\")->execute();\n // copy assessment link to message since from now on we will have HTML assignment messages\n $oDB->createCommand(\"UPDATE {{assessments}} set message=replace(message,'/''','''')||'<br /><a href=\\\"'||link||'\\\">'||link||'</a>'\")->execute();\n break;\n default: die('Unknown database type');\n }\n // activate assessment where assessment rules exist\n $oDB->createCommand(\"UPDATE {{surveys}} SET assessments='Y' where sid in (SELECT sid FROM {{assessments}} group by sid)\")->execute();\n // add language field to assessment table\n addColumn('{{assessments}}','language',\"string(20) NOT NULL default 'en'\");\n // update language field with default language of that particular survey\n $oDB->createCommand(\"UPDATE {{assessments}} SET language=(select language from {{surveys}} where sid={{assessments}}.sid)\")->execute();\n // drop the old link field\n dropColumn('{{assessments}}','link');\n\n // Add new fields to survey language settings\n addColumn('{{surveys_languagesettings}}','surveyls_url',\"string\");\n addColumn('{{surveys_languagesettings}}','surveyls_endtext','text');\n // copy old URL fields ot language specific entries\n $oDB->createCommand(\"UPDATE {{surveys_languagesettings}} set surveyls_url=(select url from {{surveys}} where sid={{surveys_languagesettings}}.surveyls_survey_id)\")->execute();\n // drop old URL field\n dropColumn('{{surveys}}','url');\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>133),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 134)\n {\n // Add new tokens setting\n addColumn('{{surveys}}','usetokens',\"string(1) NOT NULL default 'N'\");\n addColumn('{{surveys}}','attributedescriptions','text');\n dropColumn('{{surveys}}','attribute1');\n dropColumn('{{surveys}}','attribute2');\n upgradeTokenTables134();\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>134),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 135)\n {\n alterColumn('{{question_attributes}}','value','text');\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>135),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 136) //New Quota Functions\n {\n addColumn('{{quota}}','autoload_url',\"integer NOT NULL default 0\");\n // Create quota table\n $aFields = array(\n 'quotals_id' => 'pk',\n 'quotals_quota_id' => 'integer NOT NULL DEFAULT 0',\n 'quotals_language' => \"string(45) NOT NULL default 'en'\",\n 'quotals_name' => 'string',\n 'quotals_message' => 'text NOT NULL',\n 'quotals_url' => 'string',\n 'quotals_urldescrip' => 'string',\n );\n $oDB->createCommand()->createTable('{{quota_languagesettings}}',$aFields);\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>136),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 137) //New Quota Functions\n {\n addColumn('{{surveys_languagesettings}}','surveyls_dateformat',\"integer NOT NULL default 1\");\n addColumn('{{users}}','dateformat',\"integer NOT NULL default 1\");\n $oDB->createCommand()->update('{{surveys}}',array('startdate'=>NULL),\"usestartdate='N'\");\n $oDB->createCommand()->update('{{surveys}}',array('expires'=>NULL),\"useexpiry='N'\");\n dropColumn('{{surveys}}','useexpiry');\n dropColumn('{{surveys}}','usestartdate');\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>137),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 138) //Modify quota field\n {\n alterColumn('{{quota_members}}','code',\"string(11)\");\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>138),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 139) //Modify quota field\n {\n upgradeSurveyTables139();\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>139),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 140) //Modify surveys table\n {\n addColumn('{{surveys}}','emailresponseto','text');\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>140),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 141) //Modify surveys table\n {\n addColumn('{{surveys}}','tokenlength','integer NOT NULL default 15');\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>141),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 142) //Modify surveys table\n {\n upgradeQuestionAttributes142();\n $oDB->createCommand()->alterColumn('{{surveys}}','expires',\"datetime\");\n $oDB->createCommand()->alterColumn('{{surveys}}','startdate',\"datetime\");\n $oDB->createCommand()->update('{{question_attributes}}',array('value'=>0),\"value='false'\");\n $oDB->createCommand()->update('{{question_attributes}}',array('value'=>1),\"value='true'\");\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>142),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 143)\n {\n addColumn('{{questions}}','parent_qid','integer NOT NULL default 0');\n addColumn('{{answers}}','scale_id','integer NOT NULL default 0');\n addColumn('{{questions}}','scale_id','integer NOT NULL default 0');\n addColumn('{{questions}}','same_default','integer NOT NULL default 0');\n dropPrimaryKey('answers');\n addPrimaryKey('answers', array('qid','code','language','scale_id'));\n\n $aFields = array(\n 'qid' => \"integer NOT NULL default 0\",\n 'scale_id' => 'integer NOT NULL default 0',\n 'sqid' => 'integer NOT NULL default 0',\n 'language' => 'string(20) NOT NULL',\n 'specialtype' => \"string(20) NOT NULL default ''\",\n 'defaultvalue' => 'text',\n );\n $oDB->createCommand()->createTable('{{defaultvalues}}',$aFields);\n addPrimaryKey('defaultvalues', array('qid','specialtype','language','scale_id','sqid'));\n\n // -Move all 'answers' that are subquestions to the questions table\n // -Move all 'labels' that are answers to the answers table\n // -Transscribe the default values where applicable\n // -Move default values from answers to questions\n upgradeTables143();\n\n dropColumn('{{answers}}','default_value');\n dropColumn('{{questions}}','lid');\n dropColumn('{{questions}}','lid1');\n\n $aFields = array(\n 'sesskey' => \"string(64) NOT NULL DEFAULT ''\",\n 'expiry' => \"datetime NOT NULL\",\n 'expireref' => \"string(250) DEFAULT ''\",\n 'created' => \"datetime NOT NULL\",\n 'modified' => \"datetime NOT NULL\",\n 'sessdata' => 'text'\n );\n $oDB->createCommand()->createTable('{{sessions}}',$aFields);\n addPrimaryKey('sessions',array('sesskey'));\n $oDB->createCommand()->createIndex('sess2_expiry','{{sessions}}','expiry');\n $oDB->createCommand()->createIndex('sess2_expireref','{{sessions}}','expireref');\n // Move all user templates to the new user template directory\n echo \"<br>\".sprintf(gT(\"Moving user templates to new location at %s...\"),$sUserTemplateRootDir).\"<br />\";\n $hTemplateDirectory = opendir($sStandardTemplateRootDir);\n $aFailedTemplates=array();\n // get each entry\n while($entryName = readdir($hTemplateDirectory)) {\n if (!in_array($entryName,array('.','..','.svn')) && is_dir($sStandardTemplateRootDir.DIRECTORY_SEPARATOR.$entryName) && !isStandardTemplate($entryName))\n {\n if (!rename($sStandardTemplateRootDir.DIRECTORY_SEPARATOR.$entryName,$sUserTemplateRootDir.DIRECTORY_SEPARATOR.$entryName))\n {\n $aFailedTemplates[]=$entryName;\n };\n }\n }\n if (count($aFailedTemplates)>0)\n {\n echo \"The following templates at {$sStandardTemplateRootDir} could not be moved to the new location at {$sUserTemplateRootDir}:<br /><ul>\";\n foreach ($aFailedTemplates as $sFailedTemplate)\n {\n echo \"<li>{$sFailedTemplate}</li>\";\n }\n echo \"</ul>Please move these templates manually after the upgrade has finished.<br />\";\n }\n // close directory\n closedir($hTemplateDirectory);\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>143),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 145)\n {\n addColumn('{{surveys}}','savetimings',\"string(1) NULL default 'N'\");\n addColumn('{{surveys}}','showXquestions',\"string(1) NULL default 'Y'\");\n addColumn('{{surveys}}','showgroupinfo',\"string(1) NULL default 'B'\");\n addColumn('{{surveys}}','shownoanswer',\"string(1) NULL default 'Y'\");\n addColumn('{{surveys}}','showqnumcode',\"string(1) NULL default 'X'\");\n addColumn('{{surveys}}','bouncetime','integer');\n addColumn('{{surveys}}','bounceprocessing',\"string(1) NULL default 'N'\");\n addColumn('{{surveys}}','bounceaccounttype',\"string(4)\");\n addColumn('{{surveys}}','bounceaccounthost',\"string(200)\");\n addColumn('{{surveys}}','bounceaccountpass',\"string(100)\");\n addColumn('{{surveys}}','bounceaccountencryption',\"string(3)\");\n addColumn('{{surveys}}','bounceaccountuser',\"string(200)\");\n addColumn('{{surveys}}','showwelcome',\"string(1) default 'Y'\");\n addColumn('{{surveys}}','showprogress',\"string(1) default 'Y'\");\n addColumn('{{surveys}}','allowjumps',\"string(1) default 'N'\");\n addColumn('{{surveys}}','navigationdelay',\"integer default 0\");\n addColumn('{{surveys}}','nokeyboard',\"string(1) default 'N'\");\n addColumn('{{surveys}}','alloweditaftercompletion',\"string(1) default 'N'\");\n\n\n $aFields = array(\n 'sid' => \"integer NOT NULL\",\n 'uid' => \"integer NOT NULL\",\n 'permission' => 'string(20) NOT NULL',\n 'create_p' => \"integer NOT NULL default 0\",\n 'read_p' => \"integer NOT NULL default 0\",\n 'update_p' => \"integer NOT NULL default 0\",\n 'delete_p' => \"integer NOT NULL default 0\",\n 'import_p' => \"integer NOT NULL default 0\",\n 'export_p' => \"integer NOT NULL default 0\"\n );\n $oDB->createCommand()->createTable('{{survey_permissions}}',$aFields);\n addPrimaryKey('survey_permissions', array('sid','uid','permission'));\n\n upgradeSurveyPermissions145();\n\n // drop the old survey rights table\n $oDB->createCommand()->dropTable('{{surveys_rights}}');\n\n // Add new fields for email templates\n addColumn('{{surveys_languagesettings}}','email_admin_notification_subj',\"string\");\n addColumn('{{surveys_languagesettings}}','email_admin_responses_subj',\"string\");\n addColumn('{{surveys_languagesettings}}','email_admin_notification',\"text\");\n addColumn('{{surveys_languagesettings}}','email_admin_responses',\"text\");\n\n //Add index to questions table to speed up subquestions\n $oDB->createCommand()->createIndex('parent_qid_idx','{{questions}}','parent_qid');\n\n addColumn('{{surveys}}','emailnotificationto',\"text\");\n\n upgradeSurveys145();\n dropColumn('{{surveys}}','notification');\n alterColumn('{{conditions}}','method',\"string(5)\",false,'');\n\n $oDB->createCommand()->renameColumn('{{surveys}}','private','anonymized');\n $oDB->createCommand()->update('{{surveys}}',array('anonymized'=>'N'),\"anonymized is NULL\");\n alterColumn('{{surveys}}','anonymized',\"string(1)\",false,'N');\n\n //now we clean up things that were not properly set in previous DB upgrades\n $oDB->createCommand()->update('{{answers}}',array('answer'=>''),\"answer is NULL\");\n $oDB->createCommand()->update('{{assessments}}',array('scope'=>''),\"scope is NULL\");\n $oDB->createCommand()->update('{{assessments}}',array('name'=>''),\"name is NULL\");\n $oDB->createCommand()->update('{{assessments}}',array('message'=>''),\"message is NULL\");\n $oDB->createCommand()->update('{{assessments}}',array('minimum'=>''),\"minimum is NULL\");\n $oDB->createCommand()->update('{{assessments}}',array('maximum'=>''),\"maximum is NULL\");\n $oDB->createCommand()->update('{{groups}}',array('group_name'=>''),\"group_name is NULL\");\n $oDB->createCommand()->update('{{labels}}',array('code'=>''),\"code is NULL\");\n $oDB->createCommand()->update('{{labelsets}}',array('label_name'=>''),\"label_name is NULL\");\n $oDB->createCommand()->update('{{questions}}',array('type'=>'T'),\"type is NULL\");\n $oDB->createCommand()->update('{{questions}}',array('title'=>''),\"title is NULL\");\n $oDB->createCommand()->update('{{questions}}',array('question'=>''),\"question is NULL\");\n $oDB->createCommand()->update('{{questions}}',array('other'=>'N'),\"other is NULL\");\n\n alterColumn('{{answers}}','answer',\"text\",false);\n alterColumn('{{answers}}','assessment_value','integer',false , '0');\n alterColumn('{{assessments}}','scope',\"string(5)\",false , '');\n alterColumn('{{assessments}}','name',\"text\",false);\n alterColumn('{{assessments}}','message',\"text\",false);\n alterColumn('{{assessments}}','minimum',\"string(50)\",false , '');\n alterColumn('{{assessments}}','maximum',\"string(50)\",false , '');\n // change the primary index to include language\n if (Yii::app()->db->driverName=='mysql') // special treatment for mysql because this needs to be in one step since an AUTOINC field is involved\n {\n modifyPrimaryKey('assessments', array('id', 'language'));\n }\n else\n {\n dropPrimaryKey('assessments');\n addPrimaryKey('assessments',array('id','language'));\n }\n\n\n alterColumn('{{conditions}}','cfieldname',\"string(50)\",false , '');\n dropPrimaryKey('defaultvalues');\n alterColumn('{{defaultvalues}}','specialtype',\"string(20)\",false , '');\n addPrimaryKey('defaultvalues', array('qid','specialtype','language','scale_id','sqid'));\n\n alterColumn('{{groups}}','group_name',\"string(100)\",false , '');\n alterColumn('{{labels}}','code',\"string(5)\",false , '');\n dropPrimaryKey('labels');\n alterColumn('{{labels}}','language',\"string(20)\",false , 'en');\n addPrimaryKey('labels', array('lid', 'sortorder', 'language'));\n alterColumn('{{labelsets}}','label_name',\"string(100)\",false , '');\n alterColumn('{{questions}}','parent_qid','integer',false ,'0');\n alterColumn('{{questions}}','title',\"string(20)\",false , '');\n alterColumn('{{questions}}','question',\"text\",false);\n try { setTransactionBookmark(); $oDB->createCommand()->dropIndex('questions_idx4','{{questions}}'); } catch(Exception $e) { rollBackToTransactionBookmark();}\n\n alterColumn('{{questions}}','type',\"string(1)\",false , 'T');\n try{ $oDB->createCommand()->createIndex('questions_idx4','{{questions}}','type');} catch(Exception $e){};\n alterColumn('{{questions}}','other',\"string(1)\",false , 'N');\n alterColumn('{{questions}}','mandatory',\"string(1)\");\n alterColumn('{{question_attributes}}','attribute',\"string(50)\");\n alterColumn('{{quota}}','qlimit','integer');\n\n $oDB->createCommand()->update('{{saved_control}}',array('identifier'=>''),\"identifier is NULL\");\n alterColumn('{{saved_control}}','identifier',\"text\",false);\n $oDB->createCommand()->update('{{saved_control}}',array('access_code'=>''),\"access_code is NULL\");\n alterColumn('{{saved_control}}','access_code',\"text\",false);\n alterColumn('{{saved_control}}','email',\"string(320)\");\n $oDB->createCommand()->update('{{saved_control}}',array('ip'=>''),\"ip is NULL\");\n alterColumn('{{saved_control}}','ip',\"text\",false);\n $oDB->createCommand()->update('{{saved_control}}',array('saved_thisstep'=>''),\"saved_thisstep is NULL\");\n alterColumn('{{saved_control}}','saved_thisstep',\"text\",false);\n $oDB->createCommand()->update('{{saved_control}}',array('status'=>''),\"status is NULL\");\n alterColumn('{{saved_control}}','status',\"string(1)\",false , '');\n $oDB->createCommand()->update('{{saved_control}}',array('saved_date'=>'1980-01-01 00:00:00'),\"saved_date is NULL\");\n alterColumn('{{saved_control}}','saved_date',\"datetime\",false);\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>''),\"stg_value is NULL\");\n alterColumn('{{settings_global}}','stg_value',\"string\",false , '');\n\n alterColumn('{{surveys}}','admin',\"string(50)\");\n $oDB->createCommand()->update('{{surveys}}',array('active'=>'N'),\"active is NULL\");\n\n alterColumn('{{surveys}}','active',\"string(1)\",false , 'N');\n\n alterColumn('{{surveys}}','startdate',\"datetime\");\n alterColumn('{{surveys}}','adminemail',\"string(320)\");\n alterColumn('{{surveys}}','anonymized',\"string(1)\",false , 'N');\n\n alterColumn('{{surveys}}','faxto',\"string(20)\");\n alterColumn('{{surveys}}','format',\"string(1)\");\n alterColumn('{{surveys}}','language',\"string(50)\");\n alterColumn('{{surveys}}','additional_languages',\"string\");\n alterColumn('{{surveys}}','printanswers',\"string(1)\",true , 'N');\n alterColumn('{{surveys}}','publicstatistics',\"string(1)\",true , 'N');\n alterColumn('{{surveys}}','publicgraphs',\"string(1)\",true , 'N');\n alterColumn('{{surveys}}','assessments',\"string(1)\",true , 'N');\n alterColumn('{{surveys}}','usetokens',\"string(1)\",true , 'N');\n alterColumn('{{surveys}}','bounce_email',\"string(320)\");\n alterColumn('{{surveys}}','tokenlength','integer',true , 15);\n\n $oDB->createCommand()->update('{{surveys_languagesettings}}',array('surveyls_title'=>''),\"surveyls_title is NULL\");\n alterColumn('{{surveys_languagesettings}}','surveyls_title',\"string(200)\",false);\n alterColumn('{{surveys_languagesettings}}','surveyls_endtext',\"text\");\n alterColumn('{{surveys_languagesettings}}','surveyls_url',\"string\");\n alterColumn('{{surveys_languagesettings}}','surveyls_urldescription',\"string\");\n alterColumn('{{surveys_languagesettings}}','surveyls_email_invite_subj',\"string\");\n alterColumn('{{surveys_languagesettings}}','surveyls_email_remind_subj',\"string\");\n alterColumn('{{surveys_languagesettings}}','surveyls_email_register_subj',\"string\");\n alterColumn('{{surveys_languagesettings}}','surveyls_email_confirm_subj',\"string\");\n alterColumn('{{surveys_languagesettings}}','surveyls_dateformat','integer',false , 1);\n\n $oDB->createCommand()->update('{{users}}',array('users_name'=>''),\"users_name is NULL\");\n $oDB->createCommand()->update('{{users}}',array('full_name'=>''),\"full_name is NULL\");\n alterColumn('{{users}}','users_name',\"string(64)\",false , '');\n alterColumn('{{users}}','full_name',\"string(50)\",false);\n alterColumn('{{users}}','lang',\"string(20)\");\n alterColumn('{{users}}','email',\"string(320)\");\n alterColumn('{{users}}','superadmin','integer',false , 0);\n alterColumn('{{users}}','htmleditormode',\"string(7)\",true,'default');\n alterColumn('{{users}}','dateformat','integer',false , 1);\n try{\n setTransactionBookmark();\n $oDB->createCommand()->dropIndex('email','{{users}}');\n }\n catch(Exception $e)\n {\n // do nothing\n rollBackToTransactionBookmark();\n }\n\n $oDB->createCommand()->update('{{user_groups}}',array('name'=>''),\"name is NULL\");\n $oDB->createCommand()->update('{{user_groups}}',array('description'=>''),\"description is NULL\");\n alterColumn('{{user_groups}}','name',\"string(20)\",false);\n alterColumn('{{user_groups}}','description',\"text\",false);\n\n try { $oDB->createCommand()->dropIndex('user_in_groups_idx1','{{user_in_groups}}'); } catch(Exception $e) {}\n try { addPrimaryKey('user_in_groups', array('ugid','uid')); } catch(Exception $e) {}\n\n addColumn('{{surveys_languagesettings}}','surveyls_numberformat',\"integer NOT NULL DEFAULT 0\");\n\n $oDB->createCommand()->createTable('{{failed_login_attempts}}',array(\n 'id' => \"pk\",\n 'ip' => 'string(37) NOT NULL',\n 'last_attempt' => 'string(20) NOT NULL',\n 'number_attempts' => \"integer NOT NULL\"\n ));\n upgradeTokens145();\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>145),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 146) //Modify surveys table\n {\n upgradeSurveyTimings146();\n // Fix permissions for new feature quick-translation\n try { setTransactionBookmark(); $oDB->createCommand(\"INSERT into {{survey_permissions}} (sid,uid,permission,read_p,update_p) SELECT sid,owner_id,'translations','1','1' from {{surveys}}\")->execute(); echo $modifyoutput; flush();@ob_flush();} catch(Exception $e) { rollBackToTransactionBookmark();}\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>146),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 147)\n {\n addColumn('{{users}}','templateeditormode',\"string(7) NOT NULL default 'default'\");\n addColumn('{{users}}','questionselectormode',\"string(7) NOT NULL default 'default'\");\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>147),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 148)\n {\n addColumn('{{users}}','participant_panel',\"integer NOT NULL default 0\");\n\n $oDB->createCommand()->createTable('{{participants}}',array(\n 'participant_id' => 'string(50) NOT NULL',\n 'firstname' => 'string(40) default NULL',\n 'lastname' => 'string(40) default NULL',\n 'email' => 'string(80) default NULL',\n 'language' => 'string(40) default NULL',\n 'blacklisted' => 'string(1) NOT NULL',\n 'owner_uid' => \"integer NOT NULL\"\n ));\n addPrimaryKey('participants', array('participant_id'));\n\n $oDB->createCommand()->createTable('{{participant_attribute}}',array(\n 'participant_id' => 'string(50) NOT NULL',\n 'attribute_id' => \"integer NOT NULL\",\n 'value' => 'string(50) NOT NULL'\n ));\n addPrimaryKey('participant_attribute', array('participant_id','attribute_id'));\n\n $oDB->createCommand()->createTable('{{participant_attribute_names}}',array(\n 'attribute_id' => 'autoincrement',\n 'attribute_type' => 'string(4) NOT NULL',\n 'visible' => 'string(5) NOT NULL',\n 'PRIMARY KEY (attribute_id,attribute_type)'\n ));\n\n $oDB->createCommand()->createTable('{{participant_attribute_names_lang}}',array(\n 'attribute_id' => 'integer NOT NULL',\n 'attribute_name' => 'string(30) NOT NULL',\n 'lang' => 'string(20) NOT NULL'\n ));\n addPrimaryKey('participant_attribute_names_lang', array('attribute_id','lang'));\n\n $oDB->createCommand()->createTable('{{participant_attribute_values}}',array(\n 'attribute_id' => 'integer NOT NULL',\n 'value_id' => 'pk',\n 'value' => 'string(20) NOT NULL'\n ));\n\n $oDB->createCommand()->createTable('{{participant_shares}}',array(\n 'participant_id' => 'string(50) NOT NULL',\n 'share_uid' => 'integer NOT NULL',\n 'date_added' => 'datetime NOT NULL',\n 'can_edit' => 'string(5) NOT NULL'\n ));\n addPrimaryKey('participant_shares', array('participant_id','share_uid'));\n\n $oDB->createCommand()->createTable('{{survey_links}}',array(\n 'participant_id' => 'string(50) NOT NULL',\n 'token_id' => 'integer NOT NULL',\n 'survey_id' => 'integer NOT NULL',\n 'date_created' => 'datetime NOT NULL'\n ));\n addPrimaryKey('survey_links', array('participant_id','token_id','survey_id'));\n // Add language field to question_attributes table\n addColumn('{{question_attributes}}','language',\"string(20)\");\n upgradeQuestionAttributes148();\n fixSubquestions();\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>148),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 149)\n {\n $aFields = array(\n 'id' => 'integer',\n 'sid' => 'integer',\n 'parameter' => 'string(50)',\n 'targetqid' => 'integer',\n 'targetsqid' => 'integer'\n );\n $oDB->createCommand()->createTable('{{survey_url_parameters}}',$aFields);\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>149),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 150)\n {\n addColumn('{{questions}}','relevance','TEXT');\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>150),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 151)\n {\n addColumn('{{groups}}','randomization_group',\"string(20) NOT NULL default ''\");\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>151),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 152)\n {\n $oDB->createCommand()->createIndex('question_attributes_idx3','{{question_attributes}}','attribute');\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>152),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 153)\n {\n $oDB->createCommand()->createTable('{{expression_errors}}',array(\n 'id' => 'pk',\n 'errortime' => 'string(50)',\n 'sid' => 'integer',\n 'gid' => 'integer',\n 'qid' => 'integer',\n 'gseq' => 'integer',\n 'qseq' => 'integer',\n 'type' => 'string(50)',\n 'eqn' => 'text',\n 'prettyprint' => 'text'\n ));\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>153),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 154)\n {\n $oDB->createCommand()->addColumn('{{groups}}','grelevance',\"text\");\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>154),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 155)\n {\n addColumn('{{surveys}}','googleanalyticsstyle',\"string(1)\");\n addColumn('{{surveys}}','googleanalyticsapikey',\"string(25)\");\n try { setTransactionBookmark(); $oDB->createCommand()->renameColumn('{{surveys}}','showXquestions','showxquestions');} catch(Exception $e) { rollBackToTransactionBookmark();}\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>155),\"stg_name='DBVersion'\");\n }\n\n\n if ($iOldDBVersion < 156)\n {\n try\n {\n $oDB->createCommand()->dropTable('{{survey_url_parameters}}');\n }\n catch(Exception $e)\n {\n // do nothing\n }\n $oDB->createCommand()->createTable('{{survey_url_parameters}}',array(\n 'id' => 'pk',\n 'sid' => 'integer NOT NULL',\n 'parameter' => 'string(50) NOT NULL',\n 'targetqid' => 'integer',\n 'targetsqid' => 'integer'\n ));\n\n $oDB->createCommand()->dropTable('{{sessions}}');\n if (Yii::app()->db->driverName=='mysql')\n {\n $oDB->createCommand()->createTable('{{sessions}}',array(\n 'id' => 'string(32) NOT NULL',\n 'expire' => 'integer',\n 'data' => 'longtext'\n ));\n }\n else\n {\n $oDB->createCommand()->createTable('{{sessions}}',array(\n 'id' => 'string(32) NOT NULL',\n 'expire' => 'integer',\n 'data' => 'text'\n ));\n }\n\n addPrimaryKey('sessions', array('id'));\n addColumn('{{surveys_languagesettings}}','surveyls_attributecaptions',\"TEXT\");\n addColumn('{{surveys}}','sendconfirmation',\"string(1) default 'Y'\");\n\n upgradeSurveys156();\n\n // If a survey has an deleted owner, re-own the survey to the superadmin\n $oDB->schema->refresh();\n Survey::model()->refreshMetaData();\n $surveys = Survey::model();\n $surveys = $surveys->with(array('owner'))->findAll();\n foreach ($surveys as $row)\n {\n if (!isset($row->owner->attributes))\n {\n Survey::model()->updateByPk($row->sid,array('owner_id'=>1));\n }\n }\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>156),\"stg_name='DBVersion'\");\n $oTransaction->commit();\n $oTransaction=$oDB->beginTransaction();\n }\n\n if ($iOldDBVersion < 157)\n {\n // MySQL DB corrections\n try { setTransactionBookmark(); $oDB->createCommand()->dropIndex('questions_idx4','{{questions}}'); } catch(Exception $e) { rollBackToTransactionBookmark();}\n\n alterColumn('{{answers}}','assessment_value','integer',false , '0');\n dropPrimaryKey('answers');\n alterColumn('{{answers}}','scale_id','integer',false , '0');\n addPrimaryKey('answers', array('qid','code','language','scale_id'));\n alterColumn('{{conditions}}','method',\"string(5)\",false , '');\n alterColumn('{{participants}}','owner_uid','integer',false);\n alterColumn('{{participant_attribute_names}}','visible','string(5)',false);\n alterColumn('{{questions}}','type',\"string(1)\",false , 'T');\n alterColumn('{{questions}}','other',\"string(1)\",false , 'N');\n alterColumn('{{questions}}','mandatory',\"string(1)\");\n alterColumn('{{questions}}','scale_id','integer',false , '0');\n alterColumn('{{questions}}','parent_qid','integer',false ,'0');\n\n alterColumn('{{questions}}','same_default','integer',false , '0');\n alterColumn('{{quota}}','qlimit','integer');\n alterColumn('{{quota}}','action','integer');\n alterColumn('{{quota}}','active','integer',false , '1');\n alterColumn('{{quota}}','autoload_url','integer',false , '0');\n alterColumn('{{saved_control}}','status',\"string(1)\",false , '');\n try { setTransactionBookmark(); alterColumn('{{sessions}}','id',\"string(32)\",false); } catch(Exception $e) { rollBackToTransactionBookmark();}\n alterColumn('{{surveys}}','active',\"string(1)\",false , 'N');\n alterColumn('{{surveys}}','anonymized',\"string(1)\",false,'N');\n alterColumn('{{surveys}}','format',\"string(1)\");\n alterColumn('{{surveys}}','savetimings',\"string(1)\",false , 'N');\n alterColumn('{{surveys}}','datestamp',\"string(1)\",false , 'N');\n alterColumn('{{surveys}}','usecookie',\"string(1)\",false , 'N');\n alterColumn('{{surveys}}','allowregister',\"string(1)\",false , 'N');\n alterColumn('{{surveys}}','allowsave',\"string(1)\",false , 'Y');\n alterColumn('{{surveys}}','autonumber_start','integer' ,false, '0');\n alterColumn('{{surveys}}','autoredirect',\"string(1)\",false , 'N');\n alterColumn('{{surveys}}','allowprev',\"string(1)\",false , 'N');\n alterColumn('{{surveys}}','printanswers',\"string(1)\",false , 'N');\n alterColumn('{{surveys}}','ipaddr',\"string(1)\",false , 'N');\n alterColumn('{{surveys}}','refurl',\"string(1)\",false , 'N');\n alterColumn('{{surveys}}','publicstatistics',\"string(1)\",false , 'N');\n alterColumn('{{surveys}}','publicgraphs',\"string(1)\",false , 'N');\n alterColumn('{{surveys}}','listpublic',\"string(1)\",false , 'N');\n alterColumn('{{surveys}}','htmlemail',\"string(1)\",false , 'N');\n alterColumn('{{surveys}}','sendconfirmation',\"string(1)\",false , 'Y');\n alterColumn('{{surveys}}','tokenanswerspersistence',\"string(1)\",false , 'N');\n alterColumn('{{surveys}}','assessments',\"string(1)\",false , 'N');\n alterColumn('{{surveys}}','usecaptcha',\"string(1)\",false , 'N');\n alterColumn('{{surveys}}','usetokens',\"string(1)\",false , 'N');\n alterColumn('{{surveys}}','tokenlength','integer',false, '15');\n alterColumn('{{surveys}}','showxquestions',\"string(1)\", true , 'Y');\n alterColumn('{{surveys}}','showgroupinfo',\"string(1) \", true , 'B');\n alterColumn('{{surveys}}','shownoanswer',\"string(1) \", true , 'Y');\n alterColumn('{{surveys}}','showqnumcode',\"string(1) \", true , 'X');\n alterColumn('{{surveys}}','bouncetime','integer');\n alterColumn('{{surveys}}','showwelcome',\"string(1)\", true , 'Y');\n alterColumn('{{surveys}}','showprogress',\"string(1)\", true , 'Y');\n alterColumn('{{surveys}}','allowjumps',\"string(1)\", true , 'N');\n alterColumn('{{surveys}}','navigationdelay','integer', false , '0');\n alterColumn('{{surveys}}','nokeyboard',\"string(1)\", true , 'N');\n alterColumn('{{surveys}}','alloweditaftercompletion',\"string(1)\", true , 'N');\n alterColumn('{{surveys}}','googleanalyticsstyle',\"string(1)\");\n\n alterColumn('{{surveys_languagesettings}}','surveyls_dateformat','integer',false , 1);\n try { setTransactionBookmark(); alterColumn('{{survey_permissions}}','sid',\"integer\",false); } catch(Exception $e) { rollBackToTransactionBookmark();}\n try { setTransactionBookmark(); alterColumn('{{survey_permissions}}','uid',\"integer\",false); } catch(Exception $e) { rollBackToTransactionBookmark();}\n alterColumn('{{survey_permissions}}','create_p', 'integer',false , '0');\n alterColumn('{{survey_permissions}}','read_p', 'integer',false , '0');\n alterColumn('{{survey_permissions}}','update_p','integer',false , '0');\n alterColumn('{{survey_permissions}}','delete_p' ,'integer',false , '0');\n alterColumn('{{survey_permissions}}','import_p','integer',false , '0');\n alterColumn('{{survey_permissions}}','export_p' ,'integer',false , '0');\n\n alterColumn('{{survey_url_parameters}}','targetqid' ,'integer');\n alterColumn('{{survey_url_parameters}}','targetsqid' ,'integer');\n\n alterColumn('{{templates_rights}}','use','integer',false );\n\n alterColumn('{{users}}','create_survey','integer',false, '0');\n alterColumn('{{users}}','create_user','integer',false, '0');\n alterColumn('{{users}}','participant_panel','integer',false, '0');\n alterColumn('{{users}}','delete_user','integer',false, '0');\n alterColumn('{{users}}','superadmin','integer',false, '0');\n alterColumn('{{users}}','configurator','integer',false, '0');\n alterColumn('{{users}}','manage_template','integer',false, '0');\n alterColumn('{{users}}','manage_label','integer',false, '0');\n alterColumn('{{users}}','dateformat','integer',false, 1);\n alterColumn('{{users}}','participant_panel','integer',false , '0');\n alterColumn('{{users}}','parent_id','integer',false);\n try { setTransactionBookmark(); alterColumn('{{surveys_languagesettings}}','surveyls_survey_id',\"integer\",false); } catch(Exception $e) { rollBackToTransactionBookmark(); }\n alterColumn('{{user_groups}}','owner_id',\"integer\",false);\n dropPrimaryKey('user_in_groups');\n alterColumn('{{user_in_groups}}','ugid',\"integer\",false);\n alterColumn('{{user_in_groups}}','uid',\"integer\",false);\n\n // Additional corrections for Postgres\n try{ setTransactionBookmark(); $oDB->createCommand()->createIndex('questions_idx3','{{questions}}','gid');} catch(Exception $e) { rollBackToTransactionBookmark(); };\n try{ setTransactionBookmark(); $oDB->createCommand()->createIndex('conditions_idx3','{{conditions}}','cqid');} catch(Exception $e) { rollBackToTransactionBookmark(); };\n try{ setTransactionBookmark(); $oDB->createCommand()->createIndex('questions_idx4','{{questions}}','type');} catch(Exception $e) { rollBackToTransactionBookmark(); };\n try{ setTransactionBookmark(); $oDB->createCommand()->dropIndex('user_in_groups_idx1','{{user_in_groups}}');} catch(Exception $e) { rollBackToTransactionBookmark(); };\n try{ setTransactionBookmark(); $oDB->createCommand()->dropIndex('{{user_name_key}}','{{users}}');} catch(Exception $e) { rollBackToTransactionBookmark(); };\n try{ setTransactionBookmark(); $oDB->createCommand()->createIndex('users_name','{{users}}','users_name',true);} catch(Exception $e) { rollBackToTransactionBookmark(); };\n try{ setTransactionBookmark(); addPrimaryKey('user_in_groups', array('ugid','uid'));} catch(Exception $e) { rollBackToTransactionBookmark(); };\n\n alterColumn('{{participant_attribute}}','value',\"string(50)\", false);\n try{ setTransactionBookmark(); alterColumn('{{participant_attribute_names}}','attribute_type',\"string(4)\", false);} catch(Exception $e) { rollBackToTransactionBookmark(); };\n try{ setTransactionBookmark(); dropColumn('{{participant_attribute_names_lang}}','id');} catch(Exception $e) { rollBackToTransactionBookmark(); };\n try{ setTransactionBookmark(); addPrimaryKey('participant_attribute_names_lang',array('attribute_id','lang'));} catch(Exception $e) { rollBackToTransactionBookmark(); };\n try{ setTransactionBookmark(); $oDB->createCommand()->renameColumn('{{participant_shares}}','shared_uid','share_uid');} catch(Exception $e) { rollBackToTransactionBookmark(); };\n alterColumn('{{participant_shares}}','date_added',\"datetime\", false);\n alterColumn('{{participants}}','firstname',\"string(40)\");\n alterColumn('{{participants}}','lastname',\"string(40)\");\n alterColumn('{{participants}}','email',\"string(80)\");\n alterColumn('{{participants}}','language',\"string(40)\");\n alterColumn('{{quota_languagesettings}}','quotals_name',\"string\");\n try{ setTransactionBookmark(); alterColumn('{{survey_permissions}}','sid','integer',false); } catch(Exception $e) { rollBackToTransactionBookmark(); };\n try{ setTransactionBookmark(); alterColumn('{{survey_permissions}}','uid','integer',false); } catch(Exception $e) { rollBackToTransactionBookmark(); };\n alterColumn('{{users}}','htmleditormode',\"string(7)\",true,'default');\n\n // Sometimes the survey_links table was deleted before this step, if so\n // we recreate it (copied from line 663)\n if (!tableExists('{survey_links}')) {\n $oDB->createCommand()->createTable('{{survey_links}}',array(\n 'participant_id' => 'string(50) NOT NULL',\n 'token_id' => 'integer NOT NULL',\n 'survey_id' => 'integer NOT NULL',\n 'date_created' => 'datetime NOT NULL'\n ));\n addPrimaryKey('survey_links', array('participant_id','token_id','survey_id'));\n }\n alterColumn('{{survey_links}}','date_created',\"datetime\",true);\n alterColumn('{{saved_control}}','identifier',\"text\",false);\n alterColumn('{{saved_control}}','email',\"string(320)\");\n alterColumn('{{surveys}}','adminemail',\"string(320)\");\n alterColumn('{{surveys}}','bounce_email',\"string(320)\");\n alterColumn('{{users}}','email',\"string(320)\");\n\n try{ setTransactionBookmark(); $oDB->createCommand()->dropIndex('assessments_idx','{{assessments}}');} catch(Exception $e) { rollBackToTransactionBookmark(); };\n try{ setTransactionBookmark(); $oDB->createCommand()->createIndex('assessments_idx3','{{assessments}}','gid');} catch(Exception $e) { rollBackToTransactionBookmark(); };\n\n try{ setTransactionBookmark(); $oDB->createCommand()->dropIndex('ixcode','{{labels}}');} catch(Exception $e) { rollBackToTransactionBookmark(); };\n try{ setTransactionBookmark(); $oDB->createCommand()->dropIndex('{{labels_ixcode_idx}}','{{labels}}');} catch(Exception $e) { rollBackToTransactionBookmark(); };\n try{ setTransactionBookmark(); $oDB->createCommand()->createIndex('labels_code_idx','{{labels}}','code');} catch(Exception $e) { rollBackToTransactionBookmark(); };\n\n\n\n if (Yii::app()->db->driverName=='pgsql')\n {\n try{ setTransactionBookmark(); $oDB->createCommand(\"ALTER TABLE ONLY {{user_groups}} ADD PRIMARY KEY (ugid); \")->execute;} catch(Exception $e) { rollBackToTransactionBookmark(); };\n try{ setTransactionBookmark(); $oDB->createCommand(\"ALTER TABLE ONLY {{users}} ADD PRIMARY KEY (uid); \")->execute;} catch(Exception $e) { rollBackToTransactionBookmark(); };\n }\n\n // Additional corrections for MSSQL\n alterColumn('{{answers}}','answer',\"text\",false);\n alterColumn('{{assessments}}','name',\"text\",false);\n alterColumn('{{assessments}}','message',\"text\",false);\n alterColumn('{{defaultvalues}}','defaultvalue',\"text\");\n alterColumn('{{expression_errors}}','eqn',\"text\");\n alterColumn('{{expression_errors}}','prettyprint',\"text\");\n alterColumn('{{groups}}','description',\"text\");\n alterColumn('{{groups}}','grelevance',\"text\");\n alterColumn('{{labels}}','title',\"text\");\n alterColumn('{{question_attributes}}','value',\"text\");\n alterColumn('{{questions}}','preg',\"text\");\n alterColumn('{{questions}}','help',\"text\");\n alterColumn('{{questions}}','relevance',\"text\");\n alterColumn('{{questions}}','question',\"text\",false);\n alterColumn('{{quota_languagesettings}}','quotals_quota_id',\"integer\",false);\n alterColumn('{{quota_languagesettings}}','quotals_message',\"text\",false);\n alterColumn('{{saved_control}}','refurl',\"text\");\n alterColumn('{{saved_control}}','access_code',\"text\",false);\n alterColumn('{{saved_control}}','ip',\"text\",false);\n alterColumn('{{saved_control}}','saved_thisstep',\"text\",false);\n alterColumn('{{saved_control}}','saved_date',\"datetime\",false);\n alterColumn('{{surveys}}','attributedescriptions',\"text\");\n alterColumn('{{surveys}}','emailresponseto',\"text\");\n alterColumn('{{surveys}}','emailnotificationto',\"text\");\n\n alterColumn('{{surveys_languagesettings}}','surveyls_description',\"text\");\n alterColumn('{{surveys_languagesettings}}','surveyls_welcometext',\"text\");\n alterColumn('{{surveys_languagesettings}}','surveyls_email_invite',\"text\");\n alterColumn('{{surveys_languagesettings}}','surveyls_email_remind',\"text\");\n alterColumn('{{surveys_languagesettings}}','surveyls_email_register',\"text\");\n alterColumn('{{surveys_languagesettings}}','surveyls_email_confirm',\"text\");\n alterColumn('{{surveys_languagesettings}}','surveyls_attributecaptions',\"text\");\n alterColumn('{{surveys_languagesettings}}','email_admin_notification',\"text\");\n alterColumn('{{surveys_languagesettings}}','email_admin_responses',\"text\");\n alterColumn('{{surveys_languagesettings}}','surveyls_endtext',\"text\");\n alterColumn('{{user_groups}}','description',\"text\",false);\n\n\n\n alterColumn('{{conditions}}','value','string',false,'');\n alterColumn('{{participant_shares}}','can_edit',\"string(5)\",false);\n\n alterColumn('{{users}}','password',\"binary\",false);\n dropColumn('{{users}}','one_time_pw');\n addColumn('{{users}}','one_time_pw','binary');\n\n\n $oDB->createCommand()->update('{{question_attributes}}',array('value'=>'1'),\"attribute = 'random_order' and value = '2'\");\n\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>157),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 158)\n {\n LimeExpressionManager::UpgradeConditionsToRelevance();\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>158),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 159)\n {\n alterColumn('{{failed_login_attempts}}', 'ip', \"string(40)\",false);\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>159),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 160)\n {\n alterLanguageCode('it','it-informal');\n alterLanguageCode('it-formal','it');\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>160),\"stg_name='DBVersion'\");\n }\n if ($iOldDBVersion < 161)\n {\n addColumn('{{survey_links}}','date_invited','datetime NULL default NULL');\n addColumn('{{survey_links}}','date_completed','datetime NULL default NULL');\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>161),\"stg_name='DBVersion'\");\n }\n if ($iOldDBVersion < 162)\n {\n /* Fix participant db types */\n alterColumn('{{participant_attribute}}', 'value', \"text\", false);\n alterColumn('{{participant_attribute_names_lang}}', 'attribute_name', \"string(255)\", false);\n alterColumn('{{participant_attribute_values}}', 'value', \"text\", false);\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>162),\"stg_name='DBVersion'\");\n }\n if ($iOldDBVersion < 163)\n {\n //Replace by <script type=\"text/javascript\" src=\"{TEMPLATEURL}template.js\"></script> by {TEMPLATEJS}\n\n $replacedTemplate=replaceTemplateJS();\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>163),\"stg_name='DBVersion'\");\n\n }\n\n if ($iOldDBVersion < 164)\n {\n upgradeTokens148(); // this should have bee done in 148 - that's why it is named this way\n // fix survey tables for missing or incorrect token field\n upgradeSurveyTables164();\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>164),\"stg_name='DBVersion'\");\n\n // Not updating settings table as upgrade process takes care of that step now\n }\n\n if ($iOldDBVersion < 165)\n {\n $oDB->createCommand()->createTable('{{plugins}}', array(\n 'id' => 'pk',\n 'name' => 'string NOT NULL',\n 'active' => 'boolean'\n ));\n $oDB->createCommand()->createTable('{{plugin_settings}}', array(\n 'id' => 'pk',\n 'plugin_id' => 'integer NOT NULL',\n 'model' => 'string',\n 'model_id' => 'integer',\n 'key' => 'string',\n 'value' => 'text'\n ));\n alterColumn('{{surveys_languagesettings}}','surveyls_url',\"text\");\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>165),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 166)\n {\n $oDB->createCommand()->renameTable('{{survey_permissions}}', '{{permissions}}');\n dropPrimaryKey('permissions');\n alterColumn('{{permissions}}', 'permission', \"string(100)\", false);\n $oDB->createCommand()->renameColumn('{{permissions}}','sid','entity_id');\n alterColumn('{{permissions}}', 'entity_id', \"string(100)\", false);\n addColumn('{{permissions}}','entity',\"string(50)\");\n $oDB->createCommand(\"update {{permissions}} set entity='survey'\")->query();\n addColumn('{{permissions}}','id','pk');\n $oDB->createCommand()->createIndex('idxPermissions','{{permissions}}','entity_id,entity,permission,uid',true);\n\n upgradePermissions166();\n dropColumn('{{users}}','create_survey');\n dropColumn('{{users}}','create_user');\n dropColumn('{{users}}','delete_user');\n dropColumn('{{users}}','superadmin');\n dropColumn('{{users}}','configurator');\n dropColumn('{{users}}','manage_template');\n dropColumn('{{users}}','manage_label');\n dropColumn('{{users}}','participant_panel');\n $oDB->createCommand()->dropTable('{{templates_rights}}');\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>166),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 167)\n {\n addColumn('{{surveys_languagesettings}}', 'attachments', 'text');\n addColumn('{{users}}', 'created', 'datetime');\n addColumn('{{users}}', 'modified', 'datetime');\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>167),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 168)\n {\n addColumn('{{participants}}', 'created', 'datetime');\n addColumn('{{participants}}', 'modified', 'datetime');\n addColumn('{{participants}}', 'created_by', 'integer');\n $oDB->createCommand('update {{participants}} set created_by=owner_uid')->query();\n alterColumn('{{participants}}', 'created_by', \"integer\", false);\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>168),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 169)\n {\n // Add new column for question index options.\n addColumn('{{surveys}}', 'questionindex', 'integer not null default 0');\n // Set values for existing surveys.\n $oDB->createCommand(\"update {{surveys}} set questionindex = 0 where allowjumps <> 'Y'\")->query();\n $oDB->createCommand(\"update {{surveys}} set questionindex = 1 where allowjumps = 'Y'\")->query();\n\n // Remove old column.\n dropColumn('{{surveys}}', 'allowjumps');\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>169),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 170)\n {\n // renamed advanced attributes fields dropdown_dates_year_min/max\n $oDB->createCommand()->update('{{question_attributes}}',array('attribute'=>'date_min'),\"attribute='dropdown_dates_year_min'\");\n $oDB->createCommand()->update('{{question_attributes}}',array('attribute'=>'date_max'),\"attribute='dropdown_dates_year_max'\");\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>170),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 171)\n {\n try {\n dropColumn('{{sessions}}','data');\n }\n catch (Exception $e) {\n \n }\n switch (Yii::app()->db->driverName){\n case 'mysql':\n case 'mysqli':\n addColumn('{{sessions}}', 'data', 'longbinary');\n break;\n case 'sqlsrv':\n case 'dblib':\n case 'mssql':\n addColumn('{{sessions}}', 'data', 'VARBINARY(MAX)');\n break;\n case 'pgsql':\n addColumn('{{sessions}}', 'data', 'BYTEA');\n break;\n default: die('Unknown database type');\n }\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>171),\"stg_name='DBVersion'\");\n }\n if ($iOldDBVersion < 172)\n {\n switch (Yii::app()->db->driverName){\n case 'pgsql':\n // Special treatment for Postgres as it is too dumb to convert a string to a number without explicit being told to do so ... seriously?\n alterColumn('{{permissions}}', 'entity_id', \"INTEGER USING (entity_id::integer)\", false);\n break;\n case 'sqlsrv':\n case 'dblib':\n case 'mssql':\n try{ setTransactionBookmark(); $oDB->createCommand()->dropIndex('permissions_idx2','{{permissions}}');} catch(Exception $e) { rollBackToTransactionBookmark(); };\n try{ setTransactionBookmark(); $oDB->createCommand()->dropIndex('idxPermissions','{{permissions}}');} catch(Exception $e) { rollBackToTransactionBookmark(); };\n alterColumn('{{permissions}}', 'entity_id', \"INTEGER\", false);\n $oDB->createCommand()->createIndex('permissions_idx2','{{permissions}}','entity_id,entity,permission,uid',true);\n break;\n default:\n alterColumn('{{permissions}}', 'entity_id', \"INTEGER\", false);\n }\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>172),\"stg_name='DBVersion'\");\n }\n if ($iOldDBVersion < 173)\n {\n addColumn('{{participant_attribute_names}}','defaultname',\"string(50) NOT NULL default ''\");\n upgradeCPDBAttributeDefaultNames173();\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>173),\"stg_name='DBVersion'\");\n }\n if ($iOldDBVersion < 174)\n {\n alterColumn('{{participants}}', 'email', \"string(254)\");\n alterColumn('{{saved_control}}', 'email', \"string(254)\");\n alterColumn('{{surveys}}', 'adminemail', \"string(254)\");\n alterColumn('{{surveys}}', 'bounce_email', \"string(254)\");\n switch (Yii::app()->db->driverName){\n case 'sqlsrv':\n case 'dblib':\n case 'mssql': dropUniqueKeyMSSQL('email','{{users}}');\n }\n alterColumn('{{users}}', 'email', \"string(254)\");\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>174),\"stg_name='DBVersion'\");\n }\n if ($iOldDBVersion < 175)\n {\n switch (Yii::app()->db->driverName){\n case 'pgsql':\n // Special treatment for Postgres as it is too dumb to convert a boolean to a number without explicit being told to do so\n alterColumn('{{plugins}}', 'active', \"INTEGER USING (active::integer)\", false);\n break;\n default:\n alterColumn('{{plugins}}', 'active', \"integer\",false,'0');\n }\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>175),\"stg_name='DBVersion'\");\n }\n if ($iOldDBVersion < 176)\n {\n upgradeTokens176();\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>176),\"stg_name='DBVersion'\");\n }\n if ($iOldDBVersion < 177)\n {\n if ( Yii::app()->getConfig('auth_webserver') === true ) {\n // using auth webserver, now activate the plugin with default settings.\n if (!class_exists('Authwebserver', false)) {\n $plugin = Plugin::model()->findByAttributes(array('name'=>'Authwebserver'));\n if (!$plugin) {\n $plugin = new Plugin();\n $plugin->name = 'Authwebserver';\n $plugin->active = 1;\n $plugin->save();\n $plugin = App()->getPluginManager()->loadPlugin('Authwebserver', $plugin->id);\n $aPluginSettings = $plugin->getPluginSettings(true);\n $aDefaultSettings = array();\n foreach ($aPluginSettings as $key => $settings) {\n if (is_array($settings) && array_key_exists('current', $settings) ) {\n $aDefaultSettings[$key] = $settings['current'];\n }\n }\n $plugin->saveSettings($aDefaultSettings);\n } else {\n $plugin->active = 1;\n $plugin->save();\n }\n }\n }\n upgradeSurveys177();\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>177),\"stg_name='DBVersion'\");\n }\n if ($iOldDBVersion < 178)\n {\n if (Yii::app()->db->driverName=='mysql' || Yii::app()->db->driverName=='mysqli')\n {\n modifyPrimaryKey('questions', array('qid','language'));\n }\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>178),\"stg_name='DBVersion'\");\n }\n if ($iOldDBVersion < 179)\n {\n upgradeSurveys177(); // Needs to be run again to make sure\n upgradeTokenTables179();\n alterColumn('{{participants}}', 'email', \"string(254)\", false);\n alterColumn('{{participants}}', 'firstname', \"string(150)\", false);\n alterColumn('{{participants}}', 'lastname', \"string(150)\", false);\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>179),\"stg_name='DBVersion'\");\n }\n if ($iOldDBVersion < 180)\n {\n $aUsers = User::model()->findAll();\n $aPerm = array(\n 'entity_id' => 0,\n 'entity' => 'global',\n 'uid' => 0,\n 'permission' => 'auth_db',\n 'create_p' => 0,\n 'read_p' => 1,\n 'update_p' => 0,\n 'delete_p' => 0,\n 'import_p' => 0,\n 'export_p' => 0\n );\n\n foreach ($aUsers as $oUser)\n {\n if (!Permission::model()->hasGlobalPermission('auth_db','read',$oUser->uid))\n {\n $oPermission = new Permission;\n foreach ($aPerm as $k => $v)\n {\n $oPermission->$k = $v;\n }\n $oPermission->uid = $oUser->uid;\n $oPermission->save();\n }\n }\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>180),\"stg_name='DBVersion'\");\n \n }\n if ($iOldDBVersion < 181)\n {\n upgradeTokenTables181();\n upgradeSurveyTables181();\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>181),\"stg_name='DBVersion'\");\n } \n if ($iOldDBVersion < 182)\n {\n fixKCFinder182();\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>182),\"stg_name='DBVersion'\");\n } \n $oTransaction->commit();\n // Activate schema caching\n $oDB->schemaCachingDuration=3600;\n // Load all tables of the application in the schema\n $oDB->schema->getTables();\n // clear the cache of all loaded tables\n $oDB->schema->refresh();\n }\n catch(Exception $e)\n {\n $oTransaction->rollback();\n // Activate schema caching\n $oDB->schemaCachingDuration=3600;\n // Load all tables of the application in the schema\n $oDB->schema->getTables();\n // clear the cache of all loaded tables\n $oDB->schema->refresh();\n echo '<br /><br />'.gT('An non-recoverable error happened during the update. Error details:').\"<p>\".htmlspecialchars($e->getMessage()).'</p><br />';\n return false;\n }\n fixLanguageConsistencyAllSurveys();\n echo '<br /><br />'.sprintf(gT('Database update finished (%s)'),date('Y-m-d H:i:s')).'<br /><br />';\n return true;\n}", "function wp_get_translation_updates()\n {\n }", "public function listeLesLangues()\r\n\t\t{\r\n\t\t$liste = '<TABLE>';\r\n\t\tforeach ($this->lesLangues as $uneLangue)\r\n\t\t\t{\r\n\t\t\t$liste = $liste.'<TR><TD>';\r\n\t\t\t$liste = $liste.'Langue \"'.$uneLangue->getLibelleLangue();\r\n\t\t\t$liste = $liste.'<TD><A href = \"index.php?vue=langue&action=detail&numero='.$uneLangue->getIdLangue().'\">Voir le detail des guides</A></TD></TR>';\r\n\t\t\t}\r\n\t\treturn $liste.'</TABLE>';\r\n\t\t}", "private function updateEasyCreditTranslations()\n {\n $sql = \"UPDATE `s_core_snippets` SET `value` = 'ratenkauf by easyCredit' \"\n . \"WHERE `namespace` = 'frontend/checkout/shipping_payment' AND `name` = 'FRONTEND_PM_EASYCREDIT'\";\n Shopware()->Db()->query($sql);\n\n $sql = \"UPDATE `s_core_config_elements` SET `label` = 'ratenkauf by easyCredit' \"\n . \"WHERE `name` = 'BACKEND_PM_EASYCREDIT'\";\n Shopware()->Db()->query($sql);\n\n $elementId = $this->getElementId('BACKEND_PM_EASYCREDIT');\n $sql = \"UPDATE `s_core_config_element_translations` SET `label` = 'ratenkauf by easyCredit' \"\n . \"WHERE `element_id` = '\" . $elementId . \"'\";\n Shopware()->Db()->query($sql);\n\n $sql = \"UPDATE `s_core_paymentmeans` SET `description` = 'ratenkauf by easyCredit' \"\n . \"WHERE `name` = 'vrpay_easycredit'\";\n Shopware()->Db()->query($sql);\n }", "public function messages()\n {\n $pieces = explode('\\\\', __CLASS__);\n $pack = mb_strtolower($pieces[1]);\n // dddx($pieces);\n $pieces = \\array_slice($pieces, 3);\n $pieces = collect($pieces)->map(\n function ($item) {\n return snake_case($item);\n }\n )->all();\n $trad_name = $pack.'::'.implode('.', $pieces);\n $trad = trans($trad_name);\n if (! \\is_array($trad)) {\n // dddx($trad_name.' is not an array');\n $trad = [];\n }\n $tradGeneric = trans('ui::generic'); // deve funzionare anche senza il pacchetto \"food\", invece \"extend\" e' un pacchetto primario\n if (! \\is_array($tradGeneric)) {\n $tradGeneric = [];\n }\n $trad = array_merge($tradGeneric, $trad);\n\n return $trad;\n }", "public function accueil() {\r\n $tickets = $this->ticket->getTickets();\r\n $vue = new Vue(\"Accueil\");\r\n $vue->generer(array('tickets' => $tickets));\r\n }", "function phpgwapi_upgrade1_0_0_000()\n\t{\n\t\t$GLOBALS['phpgw_setup']->oProc->DropColumn('phpgw_languages',array(\n\t\t\t'fd' => array(\n\t\t\t\t'lang_id' => array('type' => 'varchar','precision' => '5','nullable' => False),\n\t\t\t\t'lang_name' => array('type' => 'varchar','precision' => '50','nullable' => False)\n\t\t\t),\n\t\t\t'pk' => array('lang_id'),\n\t\t\t'ix' => array(),\n\t\t\t'fk' => array(),\n\t\t\t'uc' => array()\n\t\t),'available');\n\n\t\t// correcting the id for Catalan\n//\t\t$GLOBALS['phpgw_setup']->oProc->query(\"UPDATE phpgw_languages SET lang_id='es-ca' WHERE lang_id='ca'\");\n\n\t\t$GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.0.0.001';\n\t\treturn $GLOBALS['setup_info']['phpgwapi']['currentver'];\n\t}", "public function actionLanguageChanged() {\n\t\t$action = $_GET['action'];\n\t\tYii::app()->session['lang'] = $_GET['lang'];\n\t\tif (!Yii::app()->user->isGuest){\n\t\t\tYii::app()->user->lang = $_GET['lang'];\n\t\t}\n\t\tself::$trans=new Translations($_GET['lang']);\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} else {\n\t\t\tif ($action == 'register'){\n\t\t\t\t$model=new Profiles('register');\n\t\t\t} else {\n\t\t\t\t$model=new Profiles();\n\t\t\t}\n\t\t}\n\t\t$model->PRF_LANG = $_GET['lang'];\n\n\t\tYii::app()->session[$this->createBackup] = $model;\n\t\tif (isset($_GET['id'])){\n\t\t\t$this->redirect(array($action, 'id'=>$_GET['id']));\n\t\t} else {\n\t\t\t$this->redirect(array($action));\n\t\t}\n\t}", "public function translationMessages()\n {\n return [];\n }", "protected static function setLanguageKeys() {}", "function AddDetailsForDefaultLang()\n\t{\t$this->AddDetailsForLang($this->def_lang);\n\t}", "function export_language($k,$v,$export_data,$type) {\n $filename= 'f' . gmdate('YmdHis');\n \n\t $path = ROOT . DS . $type . DS . 'Locale' . DS;\n\t\t\n\t\t $path .= $v;\n if (!file_exists($path)){ mkdir($path); }\n\t\t// die;\n $path .= DS.'LC_MESSAGES';\n\t\t \n if (!file_exists($path)) mkdir($path);\n $file = $path.DS.$filename;\n if (!file_exists($path)) touch($file);\n\t\t$this->loadModel('Translation');\n $file = new File($path.DS.$filename);\n\t\t\n $tmprec = $export_data;\n\t\t\n foreach ($tmprec as $rec):\n $file->write('msgid \"' .$rec['msgid'] .'\"'.\"\\n\");\n $file->write('msgstr \"'.$rec['msgstr'].'\"'.\"\\n\");\n endforeach;\n $file->close();\n\t\t // pr($tmprec); die;\n\n if (file_exists($path.DS.'default.po'))\n rename ($path.DS.'default.po',$path.DS.'default.po.old'.gmdate('YmdHis'));\n\t\t\trename ($path.DS.$filename,$path.DS.'default.po');\n\t\t\t\n\t return 1;\n\t\t\n }", "private function insertTranslations()\n {\n $sql = \"INSERT INTO s_core_snippets (namespace, shopID, localeID, name, value) VALUES \"\n .\"('frontend/\". $this->getPaymentController() .\"/form/cp', 1,1, 'FRONTEND_BT_CANCEL', 'Abbrechen'),\n ('frontend/\". $this->getPaymentController() .\"/form/cp', 1,2, 'FRONTEND_BT_CANCEL', 'Cancel'),\n ('frontend/\". $this->getPaymentController() .\"/form/cp', 1,1, 'FRONTEND_TT_TESTMODE', 'TESTMODUS \"\n .\": ES FINDET KEINE REALE ZAHLUNG STATT'),\n ('frontend/\". $this->getPaymentController() .\"/form/cp', 1,2, 'FRONTEND_TT_TESTMODE', 'THIS IS A \"\n .\"TEST. NO REAL MONEY WILL BE TRANSFERED') ,\n ('frontend/\". $this->getPaymentController() .\"/form/cp', 1,1, 'FRONTEND_MC_PAYANDSAFE', 'Zahlung \"\n .\"abschlie&szlig;en und Daten hinterlegen'),\n ('frontend/\". $this->getPaymentController() .\"/form/cp', 1,2, 'FRONTEND_MC_PAYANDSAFE', 'Pay and \"\n .\"Save Payment Information'),\n ('frontend/\". $this->getPaymentController() .\"/form/cp', 1,1, 'FRONTEND_RECURRING_WIDGET_HEADER1', \"\n .\"'Hinterlegte Zahlungsdaten verwenden'),\n ('frontend/\". $this->getPaymentController() .\"/form/cp', 1,2, 'FRONTEND_RECURRING_WIDGET_HEADER1', \"\n .\"'Use stored payment data'),\n ('frontend/\". $this->getPaymentController() .\"/form/cp', 1,1, 'FRONTEND_RECURRING_WIDGET_HEADER2', \"\n .\"'Alternative Zahlungsdaten verwenden'),\n ('frontend/\". $this->getPaymentController() .\"/form/cp', 1,2, 'FRONTEND_RECURRING_WIDGET_HEADER2', \"\n .\"'Use alternative payment data'),\n ('frontend/\". $this->getPaymentController() .\"/form/cp', 1,1, 'FRONTEND_MERCHANT_LOCATION_DESC', \"\n .\"'Zahlungsempfänger: '),\n ('frontend/\". $this->getPaymentController() .\"/form/cp', 1,2, 'FRONTEND_MERCHANT_LOCATION_DESC', \"\n .\"'Payee: '),\n\n\n ('frontend/\". $this->getPaymentController() .\"/form/paypalsaved', 1,1, 'FRONTEND_BT_CANCEL', 'Abbrechen'),\n ('frontend/\". $this->getPaymentController() .\"/form/paypalsaved', 1,2, 'FRONTEND_BT_CANCEL', 'Cancel'),\n ('frontend/\". $this->getPaymentController() .\"/form/paypalsaved', 1,1, 'FRONTEND_TT_TESTMODE', 'TESTMODUS \"\n .\": ES FINDET KEINE REALE ZAHLUNG STATT'),\n ('frontend/\". $this->getPaymentController() .\"/form/paypalsaved', 1,2, 'FRONTEND_TT_TESTMODE', 'THIS IS A \"\n .\"TEST. NO REAL MONEY WILL BE TRANSFERED') ,\n ('frontend/\". $this->getPaymentController() .\"/form/paypalsaved', 1,1, 'FRONTEND_MC_PAYANDSAFE', 'Zahlung \"\n .\"abschlie&szlig;en und Daten hinterlegen'),\n ('frontend/\". $this->getPaymentController() .\"/form/paypalsaved', 1,2, 'FRONTEND_MC_PAYANDSAFE', 'Pay and \"\n .\"Save Payment Information') ,\n ('frontend/\". $this->getPaymentController() .\"/form/paypalsaved', 1,1, 'FRONTEND_BT_PAYNOW', 'Jetzt bezahlen'),\n ('frontend/\". $this->getPaymentController() .\"/form/paypalsaved', 1,2, 'FRONTEND_BT_PAYNOW', 'Pay now'),\n ('frontend/\". $this->getPaymentController() .\"/form/paypalsaved', 1,1, 'FRONTEND_RECURRING_WIDGET_HEADER1', \"\n .\"'Hinterlegte Zahlungsdaten verwenden'),\n ('frontend/\". $this->getPaymentController() .\"/form/paypalsaved', 1,2, 'FRONTEND_RECURRING_WIDGET_HEADER1', \"\n .\"'Use stored payment data'),\n ('frontend/\". $this->getPaymentController() .\"/form/paypalsaved', 1,1, 'FRONTEND_RECURRING_WIDGET_HEADER2', \"\n .\"'Alternative Zahlungsdaten verwenden'),\n ('frontend/\". $this->getPaymentController() .\"/form/paypalsaved', 1,2, 'FRONTEND_RECURRING_WIDGET_HEADER2', \"\n .\"'Use alternative payment data'),\n\n ('frontend/\". $this->getPaymentController() .\"/confirmation', 1,1, 'SHOPWARE_BILLING_ADDRESS', 'Rechnungsadresse'),\n ('frontend/\". $this->getPaymentController() .\"/confirmation', 1,2, 'SHOPWARE_BILLING_ADDRESS', 'Billing address'),\n ('frontend/\". $this->getPaymentController() .\"/confirmation', 1,1, 'SHOPWARE_SHIPPING_ADDRESS', 'Lieferadresse'),\n ('frontend/\". $this->getPaymentController() .\"/confirmation', 1,2, 'SHOPWARE_SHIPPING_ADDRESS', 'Shipping address'),\n ('frontend/\". $this->getPaymentController() .\"/confirmation', 1,1, 'FRONTEND_EASYCREDIT_LINK', 'Vorvertragliche \"\n .\"Informationen zum Ratenkauf hier abrufen'),\n ('frontend/\". $this->getPaymentController() .\"/confirmation', 1,2, 'FRONTEND_EASYCREDIT_LINK', 'Read pre-contractual \"\n .\"information on Installments'),\n ('frontend/\". $this->getPaymentController() .\"/confirmation', 1,1, 'SHOPWARE_PAYMENT_BUTTON', 'Zahlungspflichtig bestellen'),\n ('frontend/\". $this->getPaymentController() .\"/confirmation', 1,2, 'SHOPWARE_PAYMENT_BUTTON', 'Complete payment'),\n ('frontend/\". $this->getPaymentController() .\"/confirmation', 1,1, 'SHOPWARE_PAYMENT_DISPATCH', 'Zahlung und Versand'),\n ('frontend/\". $this->getPaymentController() .\"/confirmation', 1,2, 'SHOPWARE_PAYMENT_DISPATCH', 'Payment and dispatch'),\n ('frontend/\". $this->getPaymentController() .\"/confirmation', 1,1, 'FRONTEND_EASYCREDIT_INTEREST', 'Zinsbetrag'),\n ('frontend/\". $this->getPaymentController() .\"/confirmation', 1,2, 'FRONTEND_EASYCREDIT_INTEREST', 'Sum of Interest'),\n ('frontend/\". $this->getPaymentController() .\"/confirmation', 1,1, 'FRONTEND_EASYCREDIT_INTEREST_OF_INSTALLMENT', 'Zinsen für Ratenzahlung'),\n ('frontend/\". $this->getPaymentController() .\"/confirmation', 1,2, 'FRONTEND_EASYCREDIT_INTEREST_OF_INSTALLMENT', 'Interest on installment'),\n ('frontend/\". $this->getPaymentController() .\"/confirmation', 1,1, 'FRONTEND_EASYCREDIT_TOTAL', 'Endbetrag'),\n ('frontend/\". $this->getPaymentController() .\"/confirmation', 1,2, 'FRONTEND_EASYCREDIT_TOTAL', 'Order Total'),\n\n ('frontend/account/payment', 1,1, 'MODULE_PAYMENT_VRPAYECOMMERCE_EASYCREDIT_TEXT_ERROR_CREDENTIALS', \"\n .\"'VR pay eCommerce General Setting Müssen ausgefüllt werden'),\n ('frontend/account/payment', 1,2, 'MODULE_PAYMENT_VRPAYECOMMERCE_EASYCREDIT_TEXT_ERROR_CREDENTIALS', \"\n .\"'VR pay eCommerce General Setting must be filled'),\n ('frontend/account/payment', 1,1, 'ERROR_MESSAGE_EASYCREDIT_AMOUNT_NOTALLOWED', 'Der Finanzierungsbetrag \"\n .\"liegt außerhalb der zulässigen Beträge (200 - 5.000 EUR).'),\n ('frontend/account/payment', 1,2, 'ERROR_MESSAGE_EASYCREDIT_AMOUNT_NOTALLOWED', 'The financing amount is \"\n .\"outside the permitted amounts (200 - 5,000 EUR).'),\n ('frontend/account/payment', 1,1, 'ERROR_EASYCREDIT_BILLING_NOTEQUAL_SHIPPING', 'Um mit easyCredit \"\n .\"bezahlen zu können, muss die Lieferadresse mit der Rechnungsadresse übereinstimmen.'),\n ('frontend/account/payment', 1,2, 'ERROR_EASYCREDIT_BILLING_NOTEQUAL_SHIPPING', 'In order to be able \"\n .\"to pay with easyCredit, the delivery address must match the invoice address.'),\n ('frontend/account/payment', 1,1, 'ERROR_MESSAGE_EASYCREDIT_PARAMETER_GENDER', 'Bitte geben Sie Ihr \"\n .\"Geschlecht an um die Zahlung mit easyCredit durchzuführen.'),\n ('frontend/account/payment', 1,2, 'ERROR_MESSAGE_EASYCREDIT_PARAMETER_GENDER', 'Please enter your gender to\"\n .\" make payment with easyCredit.'),\"\n .\"('frontend/account/payment', 1,1, 'FRONTEND_EASYCREDIT_TERMS', 'Ja, ich möchte per Ratenkauf\"\n .\" zahlen und willge ein, dass %x Ratenkauf der TeamBank AG (Partner der genossenschaftlichen FiinanzGrupper \"\n .\"Volksbanken Raiffeisenbanken), %y zur Identitäts- und Bonitätsprüfung sowie Betrugsprävention Anrede und \"\n .\"Name, Geburtsdatum und -ort, Kontaktdaten (Adresse, Telefon, E-mail) sowie Angaben zur aktuallen und zu \"\n .\"früheren Bestellungen übermittlet und das Prüfungsergebnis zu diesem Zweck erhält.'),\"\n .\"('frontend/account/payment', 1,2, 'FRONTEND_EASYCREDIT_TERMS', 'Yes, I would like to pay by installment \"\n .\"and I agree that %x installment purchase of TeamBank AG (Partner of the Cooperative FiinanzGrupper Volksbanken \"\n .\"Raiffeisenbanken), %y gets for identity and credit checks and fraud prevention title and \"\n .\"surname, date and place of birth, contact details ( Address, telephone, e-mail) as well as details\"\n .\" of current and past orders and receives the test result for this purpose.'),\n ('frontend/\". $this->getPaymentController() .\"/form/response_redirect', 1,1, 'ERROR_MESSAGE_EASYCREDIT_BEFORE_PAYMENT', \"\n .\"'Please make sure your payment method is correct!'),\n ('frontend/\". $this->getPaymentController() .\"/form/response_redirect', 1,2, 'ERROR_MESSAGE_EASYCREDIT_BEFORE_PAYMENT', \"\n .\"'Please make sure your payment method is correct!'),\n\n ('frontend/\". $this->getPaymentController() .\"/result', 1,1, 'SHOPWARE_FAILPAYMENTTITLE', 'Die Zahlung kann \"\n .\"nicht abgeschlossen werden'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,2, 'SHOPWARE_FAILPAYMENTTITLE', 'Payment cannot \"\n .\"be completed'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,1, 'SHOPWARE_CLICKTITLE', 'Klicken'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,2, 'SHOPWARE_CLICKTITLE', 'Click'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,1, 'SHOPWARE_HERETITLE', 'hierher'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,2, 'SHOPWARE_HERETITLE', 'here'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,1, 'SHOPWARE_TOCONTINUETITLE', 'Weiter'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,2, 'SHOPWARE_TOCONTINUETITLE', 'Continue'),\n\n ('frontend/checkout/shipping_payment', 1,1, 'FRONTEND_PM_CC', 'Kreditkarte'),\n ('frontend/checkout/shipping_payment', 1,2, 'FRONTEND_PM_CC', 'Credit Cards'),\n ('frontend/checkout/shipping_payment', 1,1, 'FRONTEND_PM_CCSAVED', 'Kreditkarte'),\n ('frontend/checkout/shipping_payment', 1,2, 'FRONTEND_PM_CCSAVED', 'Credit Card'),\n ('frontend/checkout/shipping_payment', 1,1, 'FRONTEND_PM_DC', 'Debit Card'),\n ('frontend/checkout/shipping_payment', 1,2, 'FRONTEND_PM_DC', 'Debit Card'),\n ('frontend/checkout/shipping_payment', 1,1, 'FRONTEND_PM_DD', 'Lastschrift'),\n ('frontend/checkout/shipping_payment', 1,2, 'FRONTEND_PM_DD', 'Direct Debit'),\n ('frontend/checkout/shipping_payment', 1,1, 'FRONTEND_PM_DDSAVED', 'Lastschrift'),\n ('frontend/checkout/shipping_payment', 1,2, 'FRONTEND_PM_DDSAVED', 'Direct Debit'),\n ('frontend/checkout/shipping_payment', 1,1, 'FRONTEND_PM_EPS', 'eps'),\n ('frontend/checkout/shipping_payment', 1,2, 'FRONTEND_PM_EPS', 'eps'),\n ('frontend/checkout/shipping_payment', 1,1, 'FRONTEND_PM_GIROPAY', 'Giropay'),\n ('frontend/checkout/shipping_payment', 1,2, 'FRONTEND_PM_GIROPAY', 'Giropay'),\n ('frontend/checkout/shipping_payment', 1,1, 'FRONTEND_PM_IDEAL', 'iDeal'),\n ('frontend/checkout/shipping_payment', 1,2, 'FRONTEND_PM_IDEAL', 'iDeal'),\n ('frontend/checkout/shipping_payment', 1,1, 'FRONTEND_PM_KLARNAPAYLATER', 'Rechnung.'),\n ('frontend/checkout/shipping_payment', 1,2, 'FRONTEND_PM_KLARNAPAYLATER', 'Pay later.'),\n ('frontend/checkout/shipping_payment', 1,1, 'FRONTEND_PM_KLARNASLICEIT', 'Ratenkauf.'),\n ('frontend/checkout/shipping_payment', 1,2, 'FRONTEND_PM_KLARNASLICEIT', 'Slice it.'),\n ('frontend/checkout/shipping_payment', 1,1, 'FRONTEND_PM_MASTERPASS', 'Masterpass'),\n ('frontend/checkout/shipping_payment', 1,2, 'FRONTEND_PM_MASTERPASS', 'Masterpass'),\n ('frontend/checkout/shipping_payment', 1,1, 'FRONTEND_PM_PAYPAL', 'PayPal'),\n ('frontend/checkout/shipping_payment', 1,2, 'FRONTEND_PM_PAYPAL', 'PayPal'),\n ('frontend/checkout/shipping_payment', 1,1, 'FRONTEND_PM_PAYPALSAVED', 'PayPal'),\n ('frontend/checkout/shipping_payment', 1,2, 'FRONTEND_PM_PAYPALSAVED', 'PayPal'),\n ('frontend/checkout/shipping_payment', 1,1, 'FRONTEND_PM_PAYDIREKT', 'paydirekt'),\n ('frontend/checkout/shipping_payment', 1,2, 'FRONTEND_PM_PAYDIREKT', 'paydirekt'),\n ('frontend/checkout/shipping_payment', 1,1, 'FRONTEND_PM_KLARNAOBT', 'Sofort.'),\n ('frontend/checkout/shipping_payment', 1,2, 'FRONTEND_PM_KLARNAOBT', 'Online Bank Transfer.'),\n ('frontend/checkout/shipping_payment', 1,1, 'FRONTEND_PM_SWISSPOSTFINANCE', 'Swiss Postfinance'),\n ('frontend/checkout/shipping_payment', 1,2, 'FRONTEND_PM_SWISSPOSTFINANCE', 'Swiss Postfinance'),\n ('frontend/checkout/shipping_payment', 1,1, 'FRONTEND_PM_EASYCREDIT', 'ratenkauf by easyCredit'),\n ('frontend/checkout/shipping_payment', 1,2, 'FRONTEND_PM_EASYCREDIT', 'ratenkauf by easyCredit'),\n\n ('frontend/\". $this->getPaymentController() .\"/result', 1,2, 'ERROR_CC_ACCOUNT', 'The account holder entered \"\n .\"does not match your name. Please use an account that is registered on your name.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,2, 'ERROR_CC_INVALIDDATA', 'Unfortunately, the \"\n .\"card/account data you entered was not correct. Please try again.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,2, 'ERROR_CC_BLACKLIST', 'Unfortunately, the credit \"\n .\"card you entered can not be accepted. Please choose a different card or payment method.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,2, 'ERROR_CC_DECLINED_CARD', 'Unfortunately, the credit \"\n .\"card you entered can not be accepted. Please choose a different card or payment method.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,2, 'ERROR_CC_EXPIRED', 'Unfortunately, the credit card \"\n .\"you entered is expired. Please choose a different card or payment method.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,2, 'ERROR_CC_INVALIDCVV', 'Unfortunately, the CVV/CVC you \"\n .\"entered is not correct. Please try again.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,2, 'ERROR_CC_EXPIRY', 'Unfortunately, the expiration date \"\n .\"you entered is not correct. Please try again.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,2, 'ERROR_CC_LIMIT_EXCEED', 'Unfortunately, the limit of \"\n .\"your credit card is exceeded. Please choose a different card or payment method.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,2, 'ERROR_CC_3DAUTH', 'Unfortunately, the password you \"\n .\"entered was not correct. Please try again.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,2, 'ERROR_CC_3DERROR', 'Unfortunately, there has been an \"\n .\"error while processing your request. Please try again.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,2, 'ERROR_CC_NOBRAND', 'Unfortunately, there has been an \"\n .\"error while processing your request. Please try again.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,2, 'ERROR_GENERAL_LIMIT_AMOUNT', 'Unfortunately, your \"\n .\"credit limit is exceeded. Please choose a different card or payment method.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,2, 'ERROR_GENERAL_LIMIT_TRANSACTIONS', 'Unfortunately, \"\n .\"your limit of transaction is exceeded. Please try again later. '),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,2, 'ERROR_CC_DECLINED_AUTH', 'Unfortunately, your \"\n .\"transaction has failed. Please choose a different card or payment method.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,2, 'ERROR_GENERAL_DECLINED_RISK', 'Unfortunately, \"\n .\"your transaction has failed. Please choose a different card or payment method.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,2, 'ERROR_CC_ADDRESS', 'We are sorry. We could no \"\n .\"accept your card as its origin does not match your address.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,2, 'ERROR_GENERAL_CANCEL', 'You cancelled the payment \"\n .\"prior to its execution. Please try again.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,2, 'ERROR_CC_RECURRING', 'Recurring transactions have \"\n .\"been deactivated for this credit card. Please choose a different card or payment method.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,2, 'ERROR_CC_REPEATED', 'Unfortunately, your transaction \"\n .\"has been declined due to invalid data. Please choose a different card or payment method.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,2, 'ERROR_GENERAL_ADDRESS', 'Unfortunately, your transaction \"\n .\"has failed. Please check the personal data you entered.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,2, 'ERROR_GENERAL_BLACKLIST', 'The chosen payment method \"\n .\"is not available at the moment. Please choose a different card or payment method.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,2, 'ERROR_GENERAL_GENERAL', 'Unfortunately, your transaction \"\n .\"has failed. Please try again.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,2, 'ERROR_GENERAL_TIMEOUT', 'Unfortunately, your transaction \"\n .\"has failed. Please try again. '),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,2, 'ERROR_GIRO_NOSUPPORT', 'Giropay is not supported for \"\n .\"this transaction. Please choose a different payment method.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,2, 'ERROR_ADDRESS_PHONE', 'Unfortunately, your transaction has \"\n .\"failed. Please enter a valid telephone number.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,2, 'ERROR_GENERAL_REDIRECT', 'Error before redirect.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,2, 'ERROR_CAPTURE_BACKEND', 'Transaction can not be captured.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,2, 'ERROR_MERCHANT_SSL_CERTIFICATE',\n 'SSL certificate problem, please contact the merchant.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,2, 'ERROR_UNKNOWN', 'Unfortunately, your transaction has \"\n .\"failed. Please try again.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,2, 'ERROR_GENERAL_NORESPONSE', 'Unfortunately, the confirmation \"\n .\"of your payment failed. Please contact your merchant for clarification.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,2, 'ERROR_MESSAGE_SESSION_TIMEOUT', 'your payment is refunded \"\n .\"due to the session timeout, please login to finish the payment.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,2, 'ERROR_MESSAGE_SESSION_TIMEOUT_WHITOUT_REFUND', 'Your payment \"\n .\"is failed due to the session timeout'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,2, 'ERROR_EASYCREDIT_IBAN', 'The IBAN \"\n .\"does not correspond to the IBAN country format.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,2, 'ERROR_EASYCREDIT_DOB', 'The date entered must be in the past'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,2, 'ERROR_EASYCREDIT_ADDRESS', 'The address could not be found. \"\n .\"Please select a different delivery and billing address or choose another payment method.'),\n\n ('frontend/\". $this->getPaymentController() .\"/result', 1,1, 'ERROR_CC_ACCOUNT', 'Sie sind nicht der Inhaber des \"\n .\"eingegebenen Kontos. Bitte w&auml;hlen Sie ein Konto das auf Ihren Namen l&auml;uft.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,1, 'ERROR_CC_INVALIDDATA', 'Ihre Karten-/Kontodaten sind leider \"\n .\"nicht korrekt. Bitte versuchen Sie es erneut.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,1, 'ERROR_CC_BLACKLIST', 'Leider kann die eingegebene Kreditkarte \"\n .\"nicht akzeptiert werden. Bitte w&auml;hlen Sie eine andere Karte oder Bezahlungsmethode.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,1, 'ERROR_CC_DECLINED_CARD', 'Leider kann die eingegebene \"\n .\"Kreditkarte nicht akzeptiert werden. Bitte w&auml;hlen Sie eine andere Karte oder Bezahlungsmethode.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,1, 'ERROR_CC_EXPIRED', 'Leider ist die eingegebene Kreditkarte \"\n .\"abgelaufen. Bitte w&auml;hlen Sie eine andere Karte oder Bezahlungsmethode.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,1, 'ERROR_CC_INVALIDCVV', 'Leider ist die eingegebene \"\n .\"Kartenpr&uuml;fnummer nicht korrekt. Bitte versuchen Sie es erneut.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,1, 'ERROR_CC_EXPIRY', 'Leider ist das eingegebene Ablaufdatum \"\n .\"nicht korrekt. Bitte versuchen Sie es erneut.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,1, 'ERROR_CC_LIMIT_EXCEED', 'Leider &uuml;bersteigt der zu \"\n .\"zahlende Betrag das Limit Ihrer Kreditkarte. Bitte w&auml;hlen Sie eine andere Karte oder \"\n .\"Bezahlsmethode.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,1, 'ERROR_CC_3DAUTH', 'Ihr Passwort wurde leider nicht korrekt \"\n .\"eingegeben. Bitte versuchen Sie es erneut.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,1, 'ERROR_CC_3DERROR', 'Leider gab es einen Fehler bei der \"\n .\"Durchf&uuml;hrung Ihrer Zahlung. Bitte versuchen Sie es erneut.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,1, 'ERROR_CC_NOBRAND', 'Leider gab es einen Fehler bei der \"\n .\"Durchf&uuml;hrung Ihrer Zahlung. Bitte versuchen Sie es erneut.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,1, 'ERROR_GENERAL_LIMIT_AMOUNT', 'Leider &uuml;bersteigt der \"\n .\"zu zahlende Betrag Ihr Limit. Bitte w&auml;hlen Sie eine andere Bezahlsmethode.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,1, 'ERROR_GENERAL_LIMIT_TRANSACTIONS', 'Leider &uuml;bersteigt \"\n .\"der zu zahlende Betrag Ihr Transaktionslimit. Bitte w&auml;hlen Sie eine andere Bezahlsmethode.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,1, 'ERROR_CC_DECLINED_AUTH', 'Leider ist Ihre Zahlung \"\n .\"fehlgeschlagen. Bitte versuchen Sie es erneut.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,1, 'ERROR_GENERAL_DECLINED_RISK', 'Leider ist Ihre Zahlung \"\n .\"fehlgeschlagen. Bitte versuchen Sie es erneut.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,1, 'ERROR_CC_ADDRESS', 'Leider konnten wir Ihre Kartendaten \"\n .\"nicht akzeptieren. Ihre Adresse stimmt nicht mit der Herkunft Ihrer Karte &uuml;berein.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,1, 'ERROR_GENERAL_CANCEL', 'Der Vorgang wurde auf Ihren Wunsch \"\n .\"abgebrochen. Bitte versuchen Sie es erneut.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,1, 'ERROR_CC_RECURRING', 'F&uuml;r die gewählte Karte wurden \"\n .\"wiederkehrende Zahlungen deaktiviert. Bitte w&auml;len Sie eine andere Bezahlmethode.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,1, 'ERROR_CC_REPEATED', 'Leider ist Ihre Zahlung fehlgeschlagen, \"\n .\"da Sie mehrfach fehlerhafte Angaben gemacht haben. Bitte w&auml;len Sie eine andere Bezahlmethode.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,1, 'ERROR_GENERAL_ADDRESS', 'Leider ist Ihre Zahlung \"\n .\"fehlgeschlagen. Bitte kontrollieren Sie Ihre pers&ouml;nlichen Angaben.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,1, 'ERROR_GENERAL_BLACKLIST', 'Die gew&auml;hlte Bezahlmethode \"\n .\"steht leider nicht zur Verfügung. Bitte w&auml;len Sie eine andere Bezahlmethode.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,1, 'ERROR_GENERAL_GENERAL', 'Leider konnten wir Ihre Transaktion \"\n .\"nicht durchf&uuml;hren. Bitte versuchen Sie es erneut.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,1, 'ERROR_GENERAL_TIMEOUT', 'Leider konnten wir Ihre Transaktion \"\n .\"nicht durchf&uuml;hren. Bitte versuchen Sie es erneut.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,1, 'ERROR_GIRO_NOSUPPORT', 'Giropay wird leider f&uuml;r diese \"\n .\"Transaktion nicht unterstützt. Bitte w&auml;len Sie eine andere Bezahlmethode.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,1, 'ERROR_ADDRESS_PHONE', 'Leider ist Ihre Zahlung \"\n .\"fehlgeschlagen. Bitte geben Sie eine korrekte Telefonnummer an.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,1, 'ERROR_GENERAL_REDIRECT', 'Fehler vor Weiterleitung.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,1, 'ERROR_CAPTURE_BACKEND', 'Die Transaktion kann nicht gecaptured werden.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,1, 'ERROR_MERCHANT_SSL_CERTIFICATE',\n 'SSL-Zertifikat Problem, wenden Sie sich bitte an den Händler.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,1, 'ERROR_UNKNOWN', 'Leider konnten wir Ihre Transaktion \"\n .\"nicht durchf&uuml;hren. Bitte versuchen Sie es erneut.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,1, 'ERROR_GENERAL_NORESPONSE', 'Leider konnte ihre Zahlung \"\n .\"nicht best&auml;tigt werden. Bitte setzen Sie sich mit dem Händler in Verbindung.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,1, 'ERROR_MESSAGE_SESSION_TIMEOUT', 'Ihre Zahlung wird \"\n .\"zurückerstattet wegen der Session Timeout, bitte anmelden, um die Zahlung zu beenden.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,1, 'ERROR_MESSAGE_SESSION_TIMEOUT_WHITOUT_REFUND', 'Ihre Zahlung \"\n .\"ist aufgrund des Session-Timeouts fehlgeschlagen'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,1, 'ERROR_EASYCREDIT_IBAN', 'Die IBAN \"\n .\"entspricht nicht dem IBAN-Länder-Format.'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,1, 'ERROR_EASYCREDIT_DOB', 'Das eingegebene Datum muss in \"\n .\"der Vergangenheit liegen'),\n ('frontend/\". $this->getPaymentController() .\"/result', 1,1, 'ERROR_EASYCREDIT_ADDRESS', 'Die Adresse konnte nicht gefunden \"\n .\"werden. Bitte wählen Sie eine andere Liefer- und Rechnungsadresse oder wählen Sie eine andere Zahlungsart.'),\n\n ('sidebar', 1,2, 'FRONTEND_MC_INFO', 'My Payment Information'),\n ('sidebar', 1,1, 'FRONTEND_MC_INFO', 'Meine Zahlungsarten'),\n\n ('frontend/account/sidebar', 1,2, 'FRONTEND_MC_INFO', 'My Payment Information'),\n ('frontend/account/sidebar', 1,1, 'FRONTEND_MC_INFO', 'Meine Zahlungsarten'),\n\n ('frontend/payment_information/information', 1,2, 'FRONTEND_MC_INFO', 'My Payment Information'),\n ('frontend/payment_information/information', 1,2, 'SUCCESS_MC_ADD', 'Congratulations, your \"\n .\"payment information were successfully saved.'),\n ('frontend/payment_information/information', 1,2, 'SUCCESS_MC_UPDATE', 'Congratulations, your \"\n .\"payment information were successfully updated.'),\n ('frontend/payment_information/information', 1,2, 'SUCCESS_MC_DELETE', 'Congratulations, your \"\n .\"payment information were successfully deleted.'),\n ('frontend/payment_information/information', 1,2, 'FRONTEND_MC_CC', 'Credit Cards'),\n ('frontend/payment_information/information', 1,2, 'FRONTEND_MC_ENDING', 'ending in:'),\n ('frontend/payment_information/information', 1,2, 'FRONTEND_MC_VALIDITY', 'expires on:'),\n ('frontend/payment_information/information', 1,2, 'FRONTEND_MC_BT_DEFAULT', 'Default'),\n ('frontend/payment_information/information', 1,2, 'FRONTEND_MC_BT_SETDEFAULT', 'Set as Default'),\n ('frontend/payment_information/information', 1,2, 'FRONTEND_MC_BT_CHANGE', 'Change'),\n ('frontend/payment_information/information', 1,2, 'FRONTEND_MC_BT_DELETE', 'Delete'),\n ('frontend/payment_information/information', 1,2, 'FRONTEND_MC_BT_ADD', 'Add'),\n ('frontend/payment_information/information', 1,2, 'FRONTEND_MC_DD', 'Direct Debit'),\n ('frontend/payment_information/information', 1,2, 'FRONTEND_MC_ACCOUNT', 'Account: ****'),\n ('frontend/payment_information/information', 1,2, 'FRONTEND_MC_HOLDER', 'Holder:'),\n ('frontend/payment_information/information', 1,2, 'FRONTEND_MC_PAYPAL', 'PayPal'),\n ('frontend/payment_information/information', 1,2, 'FRONTEND_MC_EMAIL', 'Email:'),\n ('frontend/payment_information/information', 1,2, 'ERROR_MC_ADD', 'We are sorry. Your attempt \"\n .\"to save your payment information was not successful, please try again.'),\n ('frontend/payment_information/information', 1,2, 'ERROR_MC_UPDATE', 'We are sorry. Your \"\n .\"attempt to update your payment information was not successful, please try again.'),\n ('frontend/payment_information/information', 1,2, 'ERROR_MC_DELETE', 'We are sorry. Your \"\n .\"attempt to delete your payment information was not successful, please try again.'),\n\n ('frontend/payment_information/information', 1,1, 'FRONTEND_MC_INFO', 'Meine Zahlungsarten'),\n ('frontend/payment_information/information', 1,1, 'SUCCESS_MC_ADD', 'Ihre Zahlungsart wurde \"\n .\"erfolgreich angelegt'),\n ('frontend/payment_information/information', 1,1, 'SUCCESS_MC_UPDATE', 'Ihre Zahlungsdaten \"\n .\"wurden erfolgreich ge&auml;ndert'),\n ('frontend/payment_information/information', 1,1, 'SUCCESS_MC_DELETE', 'Ihre Zahlungsart \"\n .\"wurde erfolgreich gel&ouml;scht'),\n ('frontend/payment_information/information', 1,1, 'FRONTEND_MC_CC', 'Kreditkarten'),\n ('frontend/payment_information/information', 1,1, 'FRONTEND_MC_ENDING', 'endet auf:'),\n ('frontend/payment_information/information', 1,1, 'FRONTEND_MC_VALIDITY', 'g&uuml;ltig bis:'),\n ('frontend/payment_information/information', 1,1, 'FRONTEND_MC_BT_DEFAULT', 'Standard'),\n ('frontend/payment_information/information', 1,1, 'FRONTEND_MC_BT_SETDEFAULT', 'Als Standard \"\n .\"setzen'),\n ('frontend/payment_information/information', 1,1, 'FRONTEND_MC_BT_CHANGE', '&Auml;ndern'),\n ('frontend/payment_information/information', 1,1, 'FRONTEND_MC_BT_DELETE', 'Entfernen'),\n ('frontend/payment_information/information', 1,1, 'FRONTEND_MC_BT_ADD', 'Hinzuf&uuml;gen'),\n ('frontend/payment_information/information', 1,1, 'FRONTEND_MC_DD', 'Lastschrift'),\n ('frontend/payment_information/information', 1,1, 'FRONTEND_MC_ACCOUNT', 'Konto: ****'),\n ('frontend/payment_information/information', 1,1, 'FRONTEND_MC_HOLDER', 'Inhaber:'),\n ('frontend/payment_information/information', 1,1, 'FRONTEND_MC_PAYPAL', 'PayPal'),\n ('frontend/payment_information/information', 1,1, 'FRONTEND_MC_EMAIL', 'Email:'),\n ('frontend/payment_information/information', 1,1, 'ERROR_MC_ADD', 'Leider ist das Anlegen Ihrer \"\n .\"Zahlungsart fehlgeschlagen. Bitte versuchen Sie es erneut'),\n ('frontend/payment_information/information', 1,1, 'ERROR_MC_UPDATE', 'Leider ist die &Auml;nderung \"\n .\"Ihrer Zahlungsdaten fehlgeschlagen. Bitte versuchen Sie es erneut'),\n ('frontend/payment_information/information', 1,1, 'ERROR_MC_DELETE', 'Leider ist das l&ouml;schen \"\n .\"Ihrer Zahlungsart fehlgeschlagen. Bitte versuchen Sie es erneut'),\n\n ('frontend/payment_information/form/register_cp', 1,2, 'FRONTEND_MC_SAVE', 'Save Payment Information'),\n ('frontend/payment_information/form/register_cp', 1,2, 'ERROR_MC_ADD', 'We are sorry. Your attempt \"\n .\"to save your payment information was not successful, please try again.'),\n ('frontend/payment_information/form/register_cp', 1,2, 'FRONTEND_BT_CANCEL', 'Cancel'),\n ('frontend/payment_information/form/register_cp', 1,2, 'FRONTEND_BT_REGISTER', 'Register'),\n ('frontend/payment_information/form/register_cp', 1,2, 'FRONTEND_TT_TESTMODE', 'THIS IS A TEST. \"\n .\"NO REAL MONEY WILL BE TRANSFERED'),\n ('frontend/payment_information/form/register_cp', 1,2, 'FRONTEND_TT_REGISTRATION', 'A small amount \"\n .\"(<1 &euro;) will be charged and instantly refunded to verify your account/card details. '),\n\n ('frontend/payment_information/form/register_cp', 1,1, 'FRONTEND_MC_SAVE', 'Zahlungsarten anlegen'),\n ('frontend/payment_information/form/register_cp', 1,1, 'ERROR_MC_ADD', 'Leider ist das Anlegen \"\n .\"Ihrer Zahlungsart fehlgeschlagen. Bitte versuchen Sie es erneut'),\n ('frontend/payment_information/form/register_cp', 1,1, 'FRONTEND_BT_CANCEL', 'Abbrechen'),\n ('frontend/payment_information/form/register_cp', 1,1, 'FRONTEND_BT_REGISTER', 'Registrieren'),\n ('frontend/payment_information/form/register_cp', 1,1, 'FRONTEND_TT_TESTMODE', 'TESTMODUS : ES \"\n .\"FINDET KEINE REALE ZAHLUNG STATT'),\n ('frontend/payment_information/form/register_cp', 1,1, 'FRONTEND_TT_REGISTRATION', 'Hinweis: Bei \"\n .\"der Registrierung wird zur Verifizierung Ihrer Konten/Kartendaten ein kleiner Betrag <1 &euro; \"\n .\"belastet und sofort wieder gut geschrieben. '),\n\n ('frontend/payment_information/form/change_cp', 1,2, 'FRONTEND_MC_CHANGE', 'Change Payment \"\n .\"Information'),\n ('frontend/payment_information/form/change_cp', 1,2, 'ERROR_MC_UPDATE', 'We are sorry. Your \"\n .\"attempt to update your payment information was not successful, please try again.'),\n ('frontend/payment_information/form/change_cp', 1,2, 'FRONTEND_BT_CANCEL', 'Cancel'),\n ('frontend/payment_information/form/change_cp', 1,2, 'FRONTEND_MC_BT_CHANGE', 'Change'),\n ('frontend/payment_information/form/change_cp', 1,2, 'FRONTEND_TT_TESTMODE', 'THIS IS A TEST. \"\n .\"NO REAL MONEY WILL BE TRANSFERED'),\n ('frontend/payment_information/form/change_cp', 1,2, 'FRONTEND_TT_REGISTRATION', 'A small \"\n .\"amount (<1 &euro;) will be charged and instantly refunded to verify your account/card details. '),\n\n ('frontend/payment_information/form/change_cp', 1,1, 'FRONTEND_MC_CHANGE', 'Zahlungsarten \"\n .\"&Auml;ndern'),\n ('frontend/payment_information/form/change_cp', 1,1, 'ERROR_MC_UPDATE', 'Leider ist die &Auml;nderung \"\n .\"Ihrer Zahlungsdaten fehlgeschlagen. Bitte versuchen Sie es erneut'),\n ('frontend/payment_information/form/change_cp', 1,1, 'FRONTEND_BT_CANCEL', 'Abbrechen'),\n ('frontend/payment_information/form/change_cp', 1,1, 'FRONTEND_MC_BT_CHANGE', '&Auml;ndern'),\n ('frontend/payment_information/form/change_cp', 1,1, 'FRONTEND_TT_TESTMODE', 'TESTMODUS : ES FINDET \"\n .\"KEINE REALE ZAHLUNG STATT'),\n ('frontend/payment_information/form/change_cp', 1,1, 'FRONTEND_TT_REGISTRATION', 'Hinweis: Bei der \"\n .\"Registrierung wird zur Verifizierung Ihrer Konten/Kartendaten ein kleiner Betrag <1 &euro; belastet \"\n .\"und sofort wieder gut geschrieben. '),\n\n ('frontend/payment_information/delete', 1,2, 'FRONTEND_MC_DELETE', 'Delete Payment Information'),\n ('frontend/payment_information/delete', 1,2, 'ERROR_MC_DELETE', 'We are sorry. Your attempt to delete \"\n .\"your payment information was not successful, please try again.'),\n ('frontend/payment_information/delete', 1,2, 'FRONTEND_MC_DELETESURE', 'Are you sure to delete this \"\n .\"payment information?'),\n ('frontend/payment_information/delete', 1,2, 'FRONTEND_BT_CANCEL', 'Cancel'),\n ('frontend/payment_information/delete', 1,2, 'FRONTEND_BT_CONFIRM', 'Confirm'),\n\n ('frontend/payment_information/delete', 1,1, 'FRONTEND_MC_DELETE', 'Zahlungsarten l&ouml;schen'),\n ('frontend/payment_information/delete', 1,1, 'ERROR_MC_DELETE', 'Leider ist das l&ouml;schen Ihrer \"\n .\"Zahlungsart fehlgeschlagen. Bitte versuchen Sie es erneut'),\n ('frontend/payment_information/delete', 1,1, 'FRONTEND_MC_DELETESURE', 'Sind Sie sicher, dass Sie \"\n .\"diese Zahlungsart l&ouml;schen m&ouml;chten?'),\n ('frontend/payment_information/delete', 1,1, 'FRONTEND_BT_CANCEL', 'Abbrechen'),\n ('frontend/payment_information/delete', 1,1, 'FRONTEND_BT_CONFIRM', 'Best&auml;tigen'),\n\n ('backend/order/main', 1,2, 'SUCCESS_IN_REVIEW', 'Transaction succeeded but has been suspended for \"\n .\"manual review. Please update transaction status in 24 hours.'),\n ('backend/order/main', 1,1, 'SUCCESS_IN_REVIEW', 'Die Transaktion war erfolgreich, sollte aber \"\n .\"manuell überprüft werden. Bitte aktualisieren Sie den Status der Transaktion manuell nach 24 Stunden'),\n\n ('backend/error/index', 1,1, 'ERROR_CAPTURE_BACKEND', 'Transaction can not be captured.'),\n ('backend/error/index', 1,2, 'ERROR_CAPTURE_BACKEND', 'Die Transaktion kann nicht gecaptured werden.'),\n ('backend/error/index', 1,2, 'ERROR_REFUND_BACKEND', 'Transaction can not be refunded or reversed.'),\n ('backend/error/index', 1,1, 'ERROR_REFUND_BACKEND', 'Die Transaktion kann nichrt refunded oder \"\n .\"reversed werden.'),\n ('backend/error/index', 1,1, 'ERROR_REORDER_BACKEND', 'Card holder has advised his bank to stop \"\n .\"this recurring payment.'),\n ('backend/error/index', 1,2, 'ERROR_REORDER_BACKEND', 'Der Kunde hat seine Bank angewiesen, keine \"\n .\"wiederkehrenden Zahlungen mehr zuzulassen. .'),\n ('backend/error/index', 1,1, 'ERROR_RECEIPT_BACKEND', 'Receipt can not be performed.'),\n ('backend/error/index', 1,2, 'ERROR_RECEIPT_BACKEND', 'Das Receipt kann nicht prozessiert werden.'),\"\n .\"('confirm', 1,2, 'FRONTEND_EASYCREDIT_CONFIRM_BUTTON', 'Continue to Ratenkauf by easyCredit'),\n ('confirm', 1,1, 'FRONTEND_EASYCREDIT_CONFIRM_BUTTON', 'Weiter zu Ratenkauf by easyCredit')\n \"\n ;\n\n Shopware()->Db()->query($sql);\n }", "public function messages()\n {\n // use trans instead on Lang \n return [\n\t\t 'product-name.required' => 'Kindly ask you to specify the title',\n\t\t 'hidden-captcha-array.required' => 'Please select captcha images',\n\t\t //'product-name.regex' => 'Post title must be in format Post + number....',\n\t\t //'article-author.required' => 'Kindly ask you to specify the author',\n\t\t //'article-author.integer' => 'Author must be integer',\n\t\t //'image.required' => 'Kindly ask you to specify the image',\n\t\t //'image.mimes' => 'Image must be jpeg,png,jpg,gif,svg',\n\t\t \n\t\t \n //'username.required' => Lang::get('userpasschange.usernamerequired'),\n\t //'u_name.required' => 'We need u to specify your name',\n\t //'u_email.email' => 'Give us real email',\n\t //'u_phone.regex' => 'Phone must be in format +380....',\n\t\t];\n\t}", "protected function sectionTranslations()\n {\n $found = []; // translations found in latte templates\n foreach (glob('template/*.latte') as $file) {\n $tempFileContents = file_get_contents($file);\n Assert::string($tempFileContents);\n preg_match_all('~\\{=(\"([^\"]+)\"|\\'([^\\']+)\\')\\|translate\\}~i', $tempFileContents, $matches);\n $found = array_merge($found, $matches[2]);\n }\n $found = array_unique($found);\n $output = '<h1><i class=\"fa fa-globe\"></i> ' . $this->tableAdmin->translate('Translations')\n . '</h1><div id=\"agenda-translations\">'\n . '<form action=\"\" method=\"post\" onsubmit=\"return confirm(\\''\n . $this->tableAdmin->translate('Are you sure?') . '\\')\">'\n . Tools::htmlInput('translations', '', 1, array('type' => 'hidden'))\n . Tools::htmlInput('token', '', end($_SESSION['token']), 'hidden')\n . Tools::htmlInput('old_name', '', '', array('type' => 'hidden', 'id' => 'old_name'))\n . '<table class=\"table table-striped\"><thead><tr><th style=\"width:'\n . intval(100 / (count($this->MyCMS->TRANSLATIONS) + 1)) . '%\">'\n . Tools::htmlInput('one', '', false, 'radio') . '</th>';\n $translations = $keys = [];\n $localisation = new L10n($this->prefixUiL10n, $this->MyCMS->TRANSLATIONS);\n foreach ($this->MyCMS->TRANSLATIONS as $key => $value) {\n $output .= \"<th>$value</th>\";\n $translations[$key] = $localisation->readLocalisation($key);\n $keys = array_merge($keys, array_keys($translations[$key]));\n }\n $output .= '</tr></thead><tbody>' . PHP_EOL;\n $keys = array_unique($keys);\n natcasesort($keys);\n foreach ($keys as $key) {\n $output .= '<tr><th>'\n . Tools::htmlInput('one', '', $key, array('type' => 'radio', 'class' => 'translation')) . ' '\n . Tools::h((string) $key) . '</th>';\n foreach ($this->MyCMS->TRANSLATIONS as $code => $value) {\n $output .= '<td>' . Tools::htmlInput(\n \"tr[$code][$key]\",\n '',\n Tools::set($translations[$code][$key], ''),\n ['class' => 'form-control form-control-sm', 'title' => \"$code: $key\"]\n ) . '</td>';\n }\n $output .= '</tr>' . PHP_EOL;\n if ($key = array_search($key, $found)) {\n unset($found[$key]);\n }\n }\n $output .= '<tr><td>' . Tools::htmlInput(\n 'new[0]',\n '',\n '',\n array('class' => 'form-control form-control-sm', 'title' => $this->tableAdmin->translate('New record'))\n ) . '</td>';\n foreach ($this->MyCMS->TRANSLATIONS as $key => $value) {\n $output .= '<td>' . Tools::htmlInput(\n \"new[$key]\",\n '',\n '',\n ['class' => 'form-control form-control-sm',\n 'title' => $this->tableAdmin->translate('New record') . ' (' . $value . ')']\n ) . '</td>';\n }\n $output .= '</tr></tbody></table>\n <button name=\"translations\" type=\"submit\" class=\"btn btn-secondary\"><i class=\"fa fa-save\"></i> '\n . $this->tableAdmin->translate('Save') . '</button>\n <button name=\"delete\" type=\"submit\" class=\"btn btn-secondary\" value=\"1\"><i class=\"fa fa-dot-circle\"></i>\n <i class=\"fa fa-trash\"></i> ' . $this->tableAdmin->translate('Delete') . '</button>\n <fieldset class=\"d-inline-block position-relative\"><div class=\"input-group\" id=\"rename-fieldset\">'\n . '<div class=\"input-group-prepend\">\n <button class=\"btn btn-secondary\" type=\"submit\"><i class=\"fa fa-dot-circle\"></i> '\n . '<i class=\"fa fa-i-cursor\"></i> ' . $this->tableAdmin->translate('Rename') . '</button>\n </div>'\n . Tools::htmlInput('new_name', '', '', array('class' => 'form-control', 'id' => 'new_name'))\n . '</div></fieldset>\n </form></div>' . PHP_EOL;\n $output .= count($found) ? '<h2 class=\"mt-4\">' .\n $this->tableAdmin->translate('Missing translations in templates') . '</h2><ul>' : '';\n foreach ($found as $value) {\n $output .= '<li><code>' . Tools::h($value) . '</code></li>' . PHP_EOL;\n }\n $output .= count($found) ? '</ul>' : '';\n return $output;\n }", "public function getAllLangue(){\n\n global $conn;\n \n $request_all = \"SELECT * FROM `langue`\";\n $get_all_langue = $conn->query($request_all);\n\n return $get_all_langue;\n }", "function writeReportForAll()\t{\n\t\tGLOBAL $LANG;\n\n\t\t@ob_end_clean();\n\t\tob_start();\n\t\t$startTime = time();\n\t\techo '<h2>'.$LANG->getLL('report_translation_status').' '.t3lib_BEfunc::dateTime(time()).'</h2>';\n\n\t\t$details = $header = '';\n\n\t\t$header.= '<tr>\n\t\t<td><b>'.$LANG->getLL('report_language').'</b></td>\n\t\t<td><b>'.$LANG->getLL('report_langkey').'</b></td>\n\t\t<td><b>'.$LANG->getLL('report_label_mising').'</b></td\n\t\t<td><b>'.$LANG->getLL('report_complete').'</b></td>\n\t\t<td><b>'.$LANG->getLL('report_missing').'</b></td>\n\t\t<td><b>'.$LANG->getLL('report_download').'</b></td>\n\t\t</tr>';\n\t\t\t// Find all files:\n\t\t$files = array();\n\t\tforeach($this->extPathList as $path)\t{\n\t\t\t$files = array_merge($files, $this->getllxmlFiles(PATH_site . $path));\n\t\t}\n\n\t\tt3lib_div::loadTCA('be_users');\n\t\tforeach($GLOBALS['TCA']['be_users']['columns']['lang']['config']['items'] as $pair)\t{\n\t\t\tif ($pair[1])\t{\n\t\t\t\t\t// Re-generate status\n\t\t\t\t$this->MOD_SETTINGS['editLang'] = $pair[1];\n\t\t\t\t$statInfo = $this->loadTranslationStatus($files, true);\n\n\t\t\t\t$header.= '<tr>\n\t\t\t\t<td><a href=\"#'.$pair[1].'\">'.$pair[0].'</a></td>\n\t\t\t\t<td>'.$pair[1].'</td>\n\t\t\t\t<td>'.$statInfo['Labels missing translation'].'</td>\n\t\t\t\t<td>'.round(100-$statInfo['Labels missing translation']/($statInfo['Labels missing translation']+$statInfo['labels']['ok'])*100).'%</td>\n\t\t\t\t<td>'.($statInfo['csh']['new']+$statInfo['csh']['changed']+$statInfo['csh']['unknown']).'</td>\n\t\t\t\t<td>'.\n\t\t\t\t\t(@is_file(PATH_site.'typo3conf/l10n/'.$pair[1].'.zip') ? '<a href=\"'.$pair[1].'.zip\">'.$pair[1].'.zip</a> ' : '').\n\t\t\t\t\t(@is_file(PATH_site.'typo3conf/l10n/'.$pair[1].'.tgz') ? '<a href=\"'.$pair[1].'.tgz\">'.$pair[1].'.tgz</a> ' : '').\n\t\t\t\t\t'</td>\n\t\t\t\t</tr>';\n\n\n\t\t\t\t$details.= '<h3 id=\"'.$pair[1].'\">'.$pair[0].' ('.$pair[1].')</h3>';\n\n\t\t\t\tif (class_exists('t3lib_utility_Debug')) {\n\t\t\t\t\t$details .= t3lib_utility_Debug::viewArray($statInfo);\n\t\t\t\t} else {\n\t\t\t\t\t$details .= t3lib_div::view_array($statInfo);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t\t// Output:\n\t\techo '<table border=\"1\">'.$header.'</table>';\n\t\techo '<h3>'.$LANG->getLL('report_files').'</h3>';\n\t\tt3lib_utility_Debug::debug($files);\n\t\techo $details;\n\n\t\techo '<hr>'.sprintf($LANG->getLL('report_files'),floor((time()-$startTime)/60),((time()-$startTime)%60));\n\n\t\t// Output:\n\t\t$output = ob_get_contents().chr(10);\n\t\tob_end_clean();\n\n\t\treturn $output;\n\t}", "function list_translation_updates()\n {\n }", "static function getAllmsg($table='',$lang_id=_LANG_ID)\n {\n if ($table==='') $table=TblBackMulti;\n $rezult= array();\n $db= DBs::getInstance();\n $q = \"SELECT `name`,`cod` FROM `\".$table.\"` WHERE lang_id='\".$lang_id.\"' \";\n $res = $db->db_Query($q);\n //echo '<br>q='.$q.' res='.$res.' $tmp_db->result='.$db->result;\n if ( !$res OR !$db->result ) return false;\n $rows = $db->db_GetNumRows();\n for($i=0; $i<$rows; $i++)\n {\n $row_spr=$db->db_FetchAssoc();\n $rezult[$row_spr['cod']]=stripslashes($row_spr['name']);\n }\n return $rezult;\n }", "public function languages();", "function wp_load_translations_early()\n {\n }", "function wp_get_available_translations()\n {\n }", "function convertheck()\n\t {\n\t return \"\"; // method causes fatal error. Could not find a way to make this working.\n\n\t // Get a reference to the databeest\n\t \t$db = &atkGetDb();\n\n\t // Detect the old datastructure\n\t \t$showtable = $db->getrows(\"SHOW TABLES LIKE 'hours_approved'\");\n\n // If old datastructures found, then show link to conversion action\n\t \tif (!empty($showtable[0]))\n\t {\n\t return href(dispatch_url(\"timereg.hours_approve\",\"convert_old\"), \"Converteer oude gegevens\"); // @todo translate\n\t }\n\t else\n\t {\n\t return \"\";\n\t }\n\t }", "function bot_wtc_gTxt($what) {\nglobal $event;\nif($event !== 'article') {\n\treturn;\n}\n\tglobal $language;\n\n\t$en_us = array(\n\t\t'install_message' => 'bot_wtc is not yet properly initialized. Use the button below to create the preferences table.',\n\t\t'upgrade_message' => 'bot_wtc must be upgraded. Use the button below to add the new fields to the preferences table.',\n\t\t'uninstall' => 'Uninstall',\n\t\t'uninstall_message' => 'Using the button below will remove all preferences from the db. <br />Use before a complete uninstall or to reset all preferences. ',\n\t\t'uninstall_confirm' => 'Are you sure you want to delete the preferences table?',\n\t\t'td_warning' => 'Columns cannot be moved relative to single items and vice-versa',\n\t\t'same_item_warning' => 'Oops! You are trying to move an item relative to itself',\n\t\t'combo_warning' => 'Oops! You tried to insert an incomplete rule',\n\t\t);\n\n\t$lang = array(\n\t\t'en-us' => $en_us\n\t\t);\n\n\t\t$language = (isset($lang[$language])) ? $language : 'en-us';\n\t\t$msg = (isset($lang[$language][$what])) ? $lang[$language][$what] : $what;\n\t\treturn $msg;\n}", "private static function getEnglish($textId)\n {\n switch ($textId)\n {\n case StringID::ServerSideRuntimeError: return \"Server-side runtime error\";\n case StringID::InsufficientPrivileges: return \"You do not have sufficient privileges to perform this action.\";\n case StringID::InvalidLogin: return \"This user does not exist or is not activated or the password is incorrect.\";\n case StringID::UploadUnsuccessful: return \"Upload failed. Try again or try submitting another file.\";\n case StringID::HackerError: return \"Unexpected error in reaction to input data. Please contact the administrator and give him as much information about the action you attempted as possible.\";\n\n case StringID::MailError: return \"E-mail could not be sent.\";\n case StringID::DatabaseError: return \"Database query was not successful.\";\n case StringID::InvalidInput: return \"Your input is incomplete or invalid. Please modify it in accordance with the displayed instructions.\";\n case StringID::FileSystemError: return \"A file system operation failed. The administrator should verify that correct access rights are set for relevant directories.\";\n case StringID::SessionInvalidated: return \"Your session has become invalid. Perhaps you were inactive for too long or the program was updated to a newer version. Please log out, refresh the page (Ctrl+F5) and log in again.\";\n\n case StringID::ProblemNameExists: return \"A problem with this name already exists.\";\n case StringID::GroupNameExists: return \"A group with this name already exists.\";\n case StringID::NoPluginUsed: return \"This problem has no automatic grading.\";\n case StringID::InvalidActivationCode: return \"This activation code does not exist.\";\n case StringID::NotAuthorizedForName: return \"hidden\";\n\n case StringID::YouCannotRemoveYourself: return \"You cannot remove yourself.\";\n case StringID::CannotRemoveBasicStudentType: return \"User type 'STUDENT' (ID 1) cannot be removed, because this type is automatically assigned to newly registered users.\";\n case StringID::CannotDeleteGradedSubmissions: return \"It is not permitted to delete a graded submission.\";\n\n\n case StringID::ReloadManifests_InvalidFolder: return \"In the database, this plugin does not have a correctly filled mainfile entry and will probably not work. Nothing was changed now.\";\n case StringID::ReloadManifests_MalformedXmlOrFileMissing: return \"The manifest XML file is missing or malformed. Nothing was changed now.\";\n case StringID::ReloadManifests_DescriptionMismatch: return \"Descriptions did not match. Database description amended.\";\n case StringID::ReloadManifests_IdentifierMismatch: return \"Plugin identifiers did not match. Database record amended.\";\n case StringID::ReloadManifests_ArgumentsMismatch: return \"Argument descriptions did not match. Database argument descriptions amended.\";\n case StringID::ReloadManifests_DatabaseCorrespondsToManifests: return \"All plugin descriptions in the database already matched the plugin descriptions in the manifests.\";\n\n case StringID::TestCannotContainQuestionsOfDifferentLectures: return \"A test cannot contain questions from two different lectures.\";\n case StringID::ChooseAtLeastOneQuestion: return \"At least one question must be chosen.\";\n case StringID::AttachmentBelongsToAnotherLecture: return \"One of the attachments to this question are associated with another lecture.\";\n\n case StringID::PluginNameAlreadyExists: return \"A plugin with this name already exists.\";\n case StringID::PluginFolderAlreadyExists: return \"There is already a folder with this plugin name.\";\n case StringID::UnzipUnsuccessful: return \"Unzipping the uploaded file failed.\";\n case StringID::BadlyFormedPlugin: return \"This plugin file is malformed, perhaps it's missing the manifest file, the main file or the manifest file is malformed.\";\n\n case StringID::AttachmentExists: return \"An attachment with this name already exists for this lecture.\";\n case StringID::ResetLinkDoesNotExist: return \"This password reset code is not present in the database. Perhaps it was overwritten by a newly generated one.\";\n case StringID::ResetLinkExpired: return \"More than 24 hours elapsed since this code was generated and it was therefore disabled. Please generate a new one.\";\n case StringID::UserNameExists: return \"This user name is already taken.\";\n\n case StringID::ThisSubmissionIsPlagiarism : return \"This submission is suspiciously similar to another one.\";\n case StringID::ThisSubmissionIsInnocent: return \"Similarity analysis: The system did not detect significant similarity to any other submission.\";\n case StringID::ThisHasYetToBeCheckedForPlagiarism : return \"Similarity analysis: This submission is queued for similarity analysis.\";\n case StringID::GradingRequested : return \"Grading requested by student!\";\n case StringID::CannotDeleteQuestionThatsPartOfATest: return \"The question cannot be deleted because it is part of a test. Delete the test first.\";\n case StringID::SubscriptionNotYetAccepted: return \"The tutor has yet to confirm your membership in this assignment's group.\";\n case StringID::CannotDeleteHandsoffSubmissions: return \"You cannot delete a submission if you requested its grading. You should contact your tutor by e-mail if you do not wish the submission to be graded.\";\n }\n throw new \\Exception(\"This string (\" . $textId . \") does not exist.\");\n }", "function languages()\n\t{\n\t\t$this->ipsclass->input['step']++;\n\t\t$uninstall = ( $this->ipsclass->input['un'] == 1 ) ? \"&amp;un=1\" : \"\";\n\t\t\n\t\t$object = ( $this->tasks['languages'] == 1 ) ? 'Language String' : 'Language Strings';\n\t\t$operation = ( $this->ipsclass->input['un'] ) ? 'removed' : 'created';\n\t\t\n\t\t$api = $this->ipsclass->load_class( IPS_API_PATH.'/api_language.php', 'api_language' );\n\t\t$api->path_to_ipb = ROOT_PATH;\n\t\t$api->api_init();\n\t\t\n\t\tforeach ( $this->xml_array['languages_group']['language'] as $k => $v )\n\t\t{\n\t\t\tif ( !$this->ipsclass->input['un'] )\n\t\t\t{\n\t\t\t\t$api->lang_add_strings( array( $v['key']['VALUE'] => $v['text']['VALUE'] ), $v['file']['VALUE'] );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tforeach ( $this->ipsclass->cache['languages'] as $kk => $vv )\n\t\t\t\t{\n\t\t\t\t\t$lang = array();\n\t\t\t\t\trequire( CACHE_PATH.'cache/lang_cache/'.$vv['ldir'].'/'.$v['file']['VALUE'].'.php' );\n\t\t\t\t\t\n\t\t\t\t\tunset( $lang[ $v['key']['VALUE'] ] );\n\t\t\t\t\t\n\t\t\t\t\t$start = \"<?php\\n\\n\".'$lang = array('.\"\\n\";\n\t\t\t\t\t\n\t\t\t\t\tforeach ( $lang as $kkk => $vvv )\n\t\t\t\t\t{\n\t\t\t\t\t\t$vvv = preg_replace( \"/\\n{1,}$/\", \"\", $vvv );\n\t\t\t\t\t\t$vvv \t= stripslashes( $vvv );\n\t\t\t\t\t\t$vvv\t= preg_replace( '/\"/', '\\\\\"', $vvv );\n\t\t\t\t\t\t$start .= \"\\n'\".$kkk.\"' => \\\"\".$vvv.\"\\\",\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$start .= \"\\n\\n);\\n\\n?\".\">\";\n\t\t\t\t\t\n\t\t\t\t\tif ( $fh = @fopen( CACHE_PATH.'cache/lang_cache/'.$vv['ldir'].'/'.$v['file']['VALUE'].'.php', 'w' ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t@fwrite( $fh, $start );\n\t\t\t\t\t\t@fclose( $fh );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tunset( $lang, $start, $fh );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->ipsclass->admin->redirect( \"{$this->ipsclass->form_code}&amp;code=work&amp;mod={$this->ipsclass->input['mod']}&amp;step={$this->ipsclass->input['step']}{$uninstall}&amp;st={$this->ipsclass->input['st']}\", \"{$this->xml_array['mod_info']['title']['VALUE']}<br />{$this->tasks['languages']} {$object} {$operation}....\" );\n\t}", "function hs_courses_importer_post_update_8003() {\n $migrations = hs_field_helpers_migration_list();\n /** @var \\Drupal\\migrate_plus\\Entity\\Migration $course_migration */\n $course_migration = $migrations['hs_courses']['hs_courses'];\n $log = new MigrateMessage();\n $executable = new MigrateExecutable($course_migration, $log);\n $executable->import();\n}", "public function languageArray(){\n [\n // Contact Lifestage\n __('Customers'),\n __('Leads'),\n __('Opportunities'),\n __('Subscriber'),\n // Contact Source\n __('Advertisement'),\n __('Chat'),\n __('Contact Form'),\n __('Employee Referral'),\n __('External Referral'),\n __('Marketing campaign'),\n __('Newsletter'),\n __('OnlineStore'),\n __('Optin Forms'),\n __('Partner'),\n __('Phone Call'),\n __('Public Relations'),\n __('Sales Mail Alias'),\n __('Search Engine'),\n __('Seminar-Internal'),\n __('Seminar Partner'),\n __('Social Media'),\n __('Trade Show'),\n __('Web Download'),\n __('Web Research'),\n //log activity type\n __('Log A Call'),\n __('Log A Email'),\n __('Log A SMS'),\n __('Log A Meeting'),\n //scheduele type\n __('Meeting'),\n __('Call'),\n //employee type\n __('Full Time'),\n __('Part Time'),\n __('On Contract'),\n __('Temporary'),\n __('Trainee'),\n //employee status\n __('Active'),\n __('Inactive'),\n __('Terminated'),\n __('Deceased'),\n __('Resigned'),\n //source of hire\n __('Direct'),\n __('Referral'),\n __('Web'),\n __('Newspaper'),\n __('Advertisement'),\n __('Social Network'),\n __('Other'),\n //pay type\n __('Hourly'),\n __('Daily'),\n __('Weekly'),\n __('Biweekly'),\n __('Monthly'),\n __('Contract'),\n //gender\n __('Male'),\n __('Female'),\n __('Other'),\n //marital status\n __('Single'),\n __('Married'),\n __('Widowed'),\n //performance_review\n __('Very Bad'),\n __('Poor'),\n __('Average'),\n __('Good'),\n __('Excellent'),\n //send announcement to\n __('All Users'),\n __('Selected User'),\n __('By Department'),\n __('By Designation'),\n //product_category type\n __('Product & Service'),\n __('Income'),\n __('Expense'),\n //product_type\n __('Inventory'),\n __('Service'),\n //project_status\n __('On Hold'),\n __('In Progress'),\n __('Complete'),\n __('Canceled'),\n //project status_color\n __('warning'),\n __('info'),\n __('success'),\n __('danger'),\n //project task priority\n __('Critical'),\n __('High'),\n __('Medium'),\n __('Low'),\n ];\n }", "function admin_l10n($l10n)\n {\n }", "public function system_language_file_variables(){\n\t // Verify app level lang\n $my_files = $this->zajlib->file->get_files('app/lang/', true);\n foreach($my_files as $f){\n $file = str_ireplace('app/lang/', '', $this->zajlib->file->get_relative_path($f));\n $fdata = explode('.', $file);\n // Check for old data\n if(strlen($fdata[1]) < 5) $this->zajlib->test->notice(\"Found old language file format: \".$file);\n else{\n $file = trim($fdata[0], '/');\n $this->verify_single_language_file($file);\n }\n }\n\n\t\t// Get all of the plugins (local lang files are in _project plugin)\n\t\tforeach($this->zajlib->plugin->get_plugins('app') as $plugin){\n\t\t\t$my_files = $this->zajlib->file->get_files('plugins/'.$plugin.'/lang/', true);\n\t\t\tforeach($my_files as $f){\n\t\t\t\t$file = str_ireplace('plugins/'.$plugin.'/lang/', '', $this->zajlib->file->get_relative_path($f));\n\t\t\t\t$fdata = explode('.', $file);\n\t\t\t\t// Check for old data\n\t\t\t\tif(strlen($fdata[1]) < 5) $this->zajlib->test->notice(\"Found old language file format: \".$file);\n\t\t\t\telse{\n\t\t\t\t\t$file = trim($fdata[0], '/');\n\t\t\t\t\t$this->verify_single_language_file($file);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Get all of the plugins (local lang files are in _project plugin)\n\t\tforeach($this->zajlib->plugin->get_plugins('system') as $plugin){\n\t\t\t$my_files = $this->zajlib->file->get_files('system/plugins/'.$plugin.'/lang/', true);\n\t\t\tforeach($my_files as $f){\n\t\t\t\t$file = str_ireplace('system/plugins/'.$plugin.'/lang/', '', $this->zajlib->file->get_relative_path($f));\n\t\t\t\t$fdata = explode('.', $file);\n\t\t\t\t// Check for old data\n\t\t\t\tif(strlen($fdata[1]) < 5) $this->zajlib->test->notice(\"Found old language file format: \".$file);\n\t\t\t\telse{\n\t\t\t\t\t$file = trim($fdata[0], '/');\n\t\t\t\t\t$this->verify_single_language_file($file);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function create_new_lang()\n {\n $root_directory = FCPATH.\"application/language/\";\n $scan_root_directory = array_diff(scandir($root_directory),array('.','..'));\n $data['root_dir'] = $scan_root_directory;\n\n // Application Languages\n $directory = FCPATH.\"application/language/english\";\n $file_lists = scandir($directory,0);\n $total_file = count($file_lists);\n $language_Files = array();\n\n for($i = 2; $i< $total_file; $i++) \n {\n array_push($language_Files, $file_lists[$i]);\n }\n\n for ($i = 0; $i < count($language_Files); $i++) \n {\n $file_name = $language_Files[$i];\n include FCPATH.\"application/language/english/\".$file_name;\n $data['file_name'][$i] = $file_name;\n }\n\n // datatables plugins language\n $directory2 = FCPATH.\"assets/modules/datatables/language/english.json\";\n $plugin_file = file_get_contents($directory2);\n $plugin_file_contents = json_decode($plugin_file,TRUE);\n\n $lang = array();\n\n foreach ($plugin_file_contents as $key => $value) \n {\n if($key == \"oPaginate\")\n {\n foreach ($value as $key1 => $value1) \n {\n $lang[$key1] = $value1;\n }\n\n } else if ($key =='oAria') {\n\n foreach ($value as $key1 => $value1) \n {\n $lang[$key1] = $value1;\n }\n } else {\n $lang[$key] = $value;\n\n } \n }\n\n\n // Addon Language\n $addon_directory = FCPATH.\"application/modules/\";\n $scan_directory = scandir($addon_directory,0);\n $addon_files = array();\n\n for ($i = 2; $i < count($scan_directory) ; $i++) \n {\n array_push($addon_files, $scan_directory[$i]);\n }\n\n $addon_lang_folder = array();\n for ($i = 0; $i < count($addon_files); $i++) \n {\n $module_directory = FCPATH.\"application/modules/\".$addon_files[$i].\"/language\";\n if(file_exists($module_directory))\n {\n $scan_module_directories = array_diff(scandir($module_directory),array('.','..'));\n if(!empty($scan_module_directories))\n {\n $addon_name = $addon_directory.$addon_files[$i];\n array_push($addon_lang_folder,$addon_name);\n }\n }\n }\n\n\n $addon_dir_arr = array();\n for ($i = 0; $i < count($addon_lang_folder); $i++) \n {\n $addon_lang_file = $addon_lang_folder[$i];\n $addon_lang_file_dir = $addon_lang_file.\"/language/english/\";\n $addon_lang_file_dir_scan[] = scandir($addon_lang_file_dir,1);\n array_push($addon_dir_arr,$addon_lang_file_dir_scan[$i][0]);\n }\n $data['addons'] = $addon_dir_arr;\n\n $data['body'] = 'admin/multi_language/add_language';\n $data['page_title'] = $this->lang->line(\"New Language\");\n $this->_viewcontroller($data);\n }", "public function loadLang(){\n\n if($this->id == -1 || empty($this->databasePath))\n return \"\";\n\n $sqlQuery = 'SELECT L.lang_code as lang FROM books_languages_link BLL, languages L WHERE BLL.lang_code = L.id AND BLL.book = '.$this->id;\n\n $pdo = new SPDO($this->databasePath);\n foreach ($pdo->query($sqlQuery) as $row)\n return $row['lang'];\n \n return \"\";\n }", "protected function migration_process() {\n\t\t$available_languages = Fusion_Multilingual::get_available_languages();\n\t\tself::$available_languages = ( ! empty( $available_languages ) ) ? $available_languages : [ '' ];\n\n\t\t$this->migrate_options();\n\t}", "public static function init(){\n self::$language = config::getMainIni('language');\n\n $system_lang = array();\n $db = new db();\n $system_language = $db->select(\n 'language',\n 'language',\n config::$vars['coscms_main']['language']\n );\n\n // create system lanugage for all modules\n if (!empty($system_language)){\n foreach($system_language as $key => $val){\n $module_lang = unserialize($val['translation']);\n $system_lang+= $module_lang;\n }\n } \n self::$dict = $system_lang;\n }", "public function _loadLanguage($code)\n\t{\n $table_p_language\t = $this->prefix.'admin_language';\n //se cambia el campo enable a 0 para todos los lenguajes\n $update=$this->app['dbs']['mysql_silex']->executeQuery(\"Update {$table_p_language} set enable=0\");\n //se estable el lenguaje indicado como default\n $update=$this->app['dbs']['mysql_silex']->update($table_p_language, array('enable' =>1), array('code' => $code)); \n\t}", "public function incLocalLang() {}", "function insert_lang_comcode_attachments($level,$text,$type,$id,$connection=NULL,$insert_as_admin=false,$for_member=NULL)\n{\n\tif (is_null($connection)) $connection=$GLOBALS['SITE_DB'];\n\n\trequire_lang('comcode');\n\n\t_check_attachment_count();\n\n\t$_info=do_comcode_attachments($text,$type,$id,false,$connection,$insert_as_admin,$for_member);\n\t$text2=$_info['tempcode']->to_assembly();\n\t$member=(function_exists('get_member'))?get_member():$GLOBALS['FORUM_DRIVER']->get_guest_id();\n\n\t$lang_id=NULL;\n\tif (user_lang()=='Gibb') // Debug code to help us spot language layer bugs. We expect &keep_lang=EN to show EnglishEnglish content, but otherwise no EnglishEnglish content.\n\t{\n\t\t$lang_id=$GLOBALS['SITE_DB']->query_value('translate','MAX(id)');\n\t\t$lang_id=($lang_id===null)?null:($lang_id+1);\n\t\t$connection->query_insert('translate',array('id'=>$lang_id,'source_user'=>$member,'broken'=>0,'importance_level'=>$level,'text_original'=>'EnglishEnglishWarningWrongLanguageWantGibberishLang','text_parsed'=>'','language'=>'EN'));\n\t}\n\tif (is_null($lang_id))\n\t{\n\t\t$lang_id=$GLOBALS['SITE_DB']->query_value('translate','MAX(id)');\n\t\t$lang_id=($lang_id===null)?null:($lang_id+1);\n\t}\n\t$connection->query_insert('translate',array('id'=>$lang_id,'source_user'=>$member,'broken'=>0,'importance_level'=>$level,'text_original'=>$_info['comcode'],'text_parsed'=>$text2,'language'=>user_lang()));\n\n\tfinal_attachments_from_preview($id,$connection);\n\n\treturn $lang_id;\n}", "function initialize_i18n($language) {\n\t$locales_root = \"./Locale\";\n putenv(\"LANG=\" . $language); \n\tputenv(\"LC_ALL=en_us\"); \n\tsetlocale(LC_ALL, $language);\n $domains = glob($locales_root.'/'.$language.'/LC_MESSAGES/messages-*.mo');\t\n\t$newTimeStamp = time();\n $current = basename($domains[0],'.mo');\n $timestamp = preg_replace('{messages-}i','',$current);\n\t$oldFileName = $domains[0];\n\t$newFileName = $locales_root.\"/\".$language.\"/LC_MESSAGES/messages-\".$newTimeStamp.\".mo\";\n\t$newFile = \"messages-\".$newTimeStamp;\n\trename($oldFileName, $newFileName);\n bindtextdomain($newFile,$locales_root);\n\tbind_textdomain_codeset($newFile, 'UTF-8');\n textdomain($newFile);\n}", "function phpgwapi_upgrade0_9_13_015()\n\t{\n\t\tif(phpversion() >= '4.0.5' && @$GLOBALS['phpgw_setup']->db->Type == 'mysql')\n\t\t{\n\t\t\t$_ver_str = @mysql_get_server_info();\n\t\t\t$_ver_arr = explode(\".\",$_ver_str);\n\t\t\t$_ver = $_ver_arr[1];\n\t\t\tif((int)$_ver < 23)\n\t\t\t{\n\t\t\t\t$GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.13.016';\n\t\t\t\treturn $GLOBALS['setup_info']['phpgwapi']['currentver'];\n\t\t\t}\n\t\t}\n\n\t\t$GLOBALS['phpgw_setup']->oProc->AlterColumn(\n\t\t\t'lang',\n\t\t\t'message_id',\n\t\t\tarray(\n\t\t\t\t'type' => 'varchar',\n\t\t\t\t'precision' => 255,\n\t\t\t\t'nullable' => false,\n\t\t\t\t'default' => ''\n\t\t\t)\n\t\t);\n\n\t\t$GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.13.016';\n\t\treturn $GLOBALS['setup_info']['phpgwapi']['currentver'];\n\t}", "protected function checkIfLanguagesExist() {}", "function shGetActiveLanguages()\n{\n\tShlSystem_Log::debug('sh404sef', 'Using deprecated ' . __FUNCTION__ . ', removed as not applicable anymore');\n}", "function upgrade_1_23(){\n\t\t\tglobal $sql, $sql2, $eArrayStorage, $tp, $aa;\n\n\t\t\t$upgrade = TRUE;\n\n\t\t\t$sqlc = new db;\n\t\t\t$sqld = new db;\n\t\t\t//add new preferences in core\n\t\t\tif($sqlc -> db_Select(\"core\", \"*\", \"e107_name='pcontent' \")){\n\t\t\t\t$row = $sqlc -> db_Fetch();\n\n\t\t\t\t$content_pref = $eArrayStorage->ReadArray($row['e107_value']);\n\n\t\t\t\t//add new options to the preferences\n\t\t\t\tif(!isset($content_pref['content_admin_subheading'])){\n\t\t\t\t\t$content_pref = $this->upgrade_1_23_prefs($content_pref);\n\n\t\t\t\t\t$tmp1 = $eArrayStorage->WriteArray($content_pref);\n\t\t\t\t\t$sqld -> db_Update(\"core\", \"e107_value = '{$tmp1}' WHERE e107_name = 'pcontent' \");\n\t\t\t\t}else{\n\t\t\t\t\t$upgrade=FALSE;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//add new preferences for each main parent\n\t\t\tif($sqlc -> db_Select(\"pcontent\", \"content_id, content_heading, content_pref\", \"content_parent = '0' \")){\n\t\t\t\twhile($row=$sqlc->db_Fetch()){\n\n\t\t\t\t\t$id = $row['content_id'];\n\t\t\t\t\t$content_pref = $eArrayStorage->ReadArray($row['content_pref']);\n\n\t\t\t\t\tif(!isset($content_pref['content_admin_subheading'])){\n\t\t\t\t\t\t//add new options to the preferences\n\t\t\t\t\t\t$content_pref = $this->upgrade_1_23_prefs($content_pref);\n\n\t\t\t\t\t\t$tmp1 = $eArrayStorage->WriteArray($content_pref);\n\t\t\t\t\t\t$sqld -> db_Update(\"pcontent\", \"content_pref='{$tmp1}' WHERE content_id='$id' \");\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$upgrade=FALSE;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($upgrade===TRUE){\n\t\t\t\treturn CONTENT_ADMIN_CONVERSION_LAN_67.\"<br />\";\n\t\t\t}\n\t\t}", "function resource_upgrade($oldversion) {\n// This function does anything necessary to upgrade\n// older versions to match current functionality\n \n global $CFG ;\n\n if ($oldversion < 2004013101) {\n modify_database(\"\", \"INSERT INTO prefix_log_display VALUES ('resource', 'update', 'resource', 'name');\");\n modify_database(\"\", \"INSERT INTO prefix_log_display VALUES ('resource', 'add', 'resource', 'name');\");\n }\n\n if ($oldversion < 2004071000) {\n table_column(\"resource\", \"\", \"popup\", \"text\", \"\", \"\", \"\", \"\", \"alltext\");\n if ($resources = get_records_select(\"resource\", \"type='3' OR type='5'\", \"\", \"id, alltext\")) {\n foreach ($resources as $resource) {\n $resource->popup = addslashes($resource->alltext);\n $resource->alltext = \"\";\n if (!update_record(\"resource\", $resource)) {\n notify(\"Error updating popup field for resource id = $resource->id\");\n } \n }\n }\n require_once(\"$CFG->dirroot/course/lib.php\");\n rebuild_course_cache();\n }\n \n if ($oldversion < 2004071300) {\n table_column(\"resource\", \"\", \"options\", \"varchar\", \"255\", \"\", \"\", \"\", \"popup\");\n }\n\n if ($oldversion < 2004071303) {\n table_column(\"resource\", \"type\", \"type\", \"varchar\", \"30\", \"\", \"\", \"\", \"\");\n\n modify_database(\"\", \"UPDATE prefix_resource SET type='reference' WHERE type='1';\");\n modify_database(\"\", \"UPDATE prefix_resource SET type='file', options='frame' WHERE type='2';\");\n modify_database(\"\", \"UPDATE prefix_resource SET type='file' WHERE type='3';\");\n modify_database(\"\", \"UPDATE prefix_resource SET type='text', options='0' WHERE type='4';\");\n modify_database(\"\", \"UPDATE prefix_resource SET type='file' WHERE type='5';\");\n modify_database(\"\", \"UPDATE prefix_resource SET type='html' WHERE type='6';\");\n modify_database(\"\", \"UPDATE prefix_resource SET type='file' WHERE type='7';\");\n modify_database(\"\", \"UPDATE prefix_resource SET type='text', options='3' WHERE type='8';\");\n modify_database(\"\", \"UPDATE prefix_resource SET type='directory' WHERE type='9';\");\n }\n\n if ($oldversion < 2004080801) {\n modify_database(\"\", \"UPDATE prefix_resource SET alltext=reference,type='html' WHERE type='reference';\");\n rebuild_course_cache();\n }\n\n if ($oldversion < 2004111200) {//drop first to avoid conflicts when upgrading\n execute_sql(\"DROP INDEX {$CFG->prefix}resource_course_idx;\",false);\n\n modify_database('','CREATE INDEX prefix_resource_course_idx ON prefix_resource (course);');\n }\n \n if ($oldversion < 2005041100) { // replace wiki-like with markdown\n include_once( \"$CFG->dirroot/lib/wiki_to_markdown.php\" );\n $wtm = new WikiToMarkdown();\n $wtm->update( 'resource','alltext','options' );\n }\n\n return true;\n}", "function ajax_addLanguage( $data )\n\t{\n\t\tglobal $_response;\n\n\t\t// check admin session expire\n\t\tif ( $this -> checkSessionExpire() === false )\n\t\t{\n\t\t\t$redirect_url = RL_URL_HOME . ADMIN .\"/index.php\";\n\t\t\t$redirect_url .= empty($_SERVER['QUERY_STRING']) ? '?session_expired' : '?'. $_SERVER['QUERY_STRING'] .'&session_expired';\n\t\t\t$_response -> redirect( $redirect_url );\n\t\t}\n\t\t\n\t\tloadUTF8functions('ascii', 'utf8_to_ascii', 'unicode');\n\t\t$lang_name = $lang_key = $this -> rlValid -> xSql( str_replace( array( '\"', \"'\" ), array( '', '' ), $data[0][1] ) );\n\t\t\n\t\tif ( empty($lang_name) )\n\t\t{\n\t\t\t$error[] = $GLOBALS['lang']['name_field_empty'];\n\t\t}\n\t\t\n\t\tif ( !utf8_is_ascii( $lang_name ) )\n\t\t{\n\t\t\t$lang_key = utf8_to_ascii( $lang_name );\n\t\t}\n\t\t\n\t\t$lang_key = strtolower( str_replace( array( '\"', \"'\" ), array( '', '' ), $lang_key ) );\n\t\t\n\t\t$iso_code = $this -> rlValid -> xSql( $data[1][1] );\n\t\t\n\t\tif ( !utf8_is_ascii( $iso_code ) )\n\t\t{\n\t\t\t$error = $GLOBALS['lang']['iso_code_incorrect_charset'];\n\t\t}\n\t\telse \n\t\t{\n\t\t\tif ( strlen( $iso_code )!= 2 )\n\t\t\t{\n\t\t\t\t$error[] = $GLOBALS['lang']['iso_code_incorrect_number'];\n\t\t\t}\n\t\t\t\n\t\t\t//check language exist\n\t\t\t$lang_exist = $this -> fetch( '*', array( 'Code' => $iso_code ), null, null, 'languages' );\n\n\t\t\tif ( !empty( $lang_exist ) )\n\t\t\t{\n\t\t\t\t$error[] = $GLOBALS['lang']['iso_code_incorrect_exist'];\n\t\t\t}\n\t\t}\n\n\t\t/* check direction */\n\t\t$direction = $data[4][1];\n\t\t\n\t\tif ( !in_array($direction, array('rtl', 'ltr')) )\n\t\t{\n\t\t\t$error[] = $GLOBALS['lang']['text_direction_fail'];\n\t\t}\n\t\t\n\t\t/* check date format */\n\t\t$date_format = $this -> rlValid -> xSql( $data[2][1] );\n\t\t\n\t\tif ( empty($date_format) || strlen($date_format) < 5 )\n\t\t{\n\t\t\t$error[] = $GLOBALS['lang']['language_incorrect_date_format'];\n\t\t}\n\t\t\n\t\tif ( !empty($error) )\n\t\t{\n\t\t\t/* print errors */\n\t\t\t$error_content = '<ul>';\n\t\t\tforeach ($error as $err)\n\t\t\t{\n\t\t\t\t$error_content .= \"<li>{$err}</li>\";\n\t\t\t}\n\t\t\t$error_content .= '</ul>';\n\t\t\t$_response -> script( 'printMessage(\"error\", \"'. $error_content .'\")' );\n\t\t}\n\t\telse \n\t\t{\n\t\t\t/* get & optimize new language phrases*/\n\t\t\t$source_code = $this -> rlValid -> xSql( $data[3][1] );\n\t\t\t$this -> setTable( 'lang_keys' );\n\t\t\t\n\t\t\t$source_phrases = $this -> fetch( '*', array( 'Code' => $source_code ) );\n\t\n\t\t\tif ( !empty($source_phrases) )\n\t\t\t{\n\t\t\t\t$step = 1;\n\t\t\t\t\n\t\t\t\tforeach ( $source_phrases as $item => $row )\n\t\t\t\t{\n\t\t\t\t\t$insert_phrases[$item] = $source_phrases[$item];\n\t\t\t\t\t$insert_phrases[$item]['Code'] = $iso_code;\n\t\t\t\t\n\t\t\t\t\tunset( $insert_phrases[$item]['ID'] );\n\t\t\t\t\t\t\n\t\t\t\t\tif ($step % 500 == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this -> rlActions -> insert( $insert_phrases, 'lang_keys' );\n\t\t\t\t\t\tunset($insert_phrases);\n\t\t\t\t\t\t$step = 1;\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$step++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( !empty($insert_phrases) )\n\t\t\t\t{\n\t\t\t\t\t$this -> rlActions -> insert( $insert_phrases, 'lang_keys' );\n\t\t\t\t}\n\t\n\t\t\t\t$additional_row = array(\n\t\t\t\t\t'Code' => $iso_code,\n\t\t\t\t\t'Module' => 'common',\n\t\t\t\t\t'Key' => 'languages+name+' . $lang_key,\n\t\t\t\t\t'Value' => $lang_name,\n\t\t\t\t\t'Status' => 'active'\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\t$this -> rlActions -> insertOne( $additional_row, 'lang_keys' );\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\t$error[] = $GLOBALS['lang']['language_no_phrases'];\n\t\t\t}\n\t\t\t\n\t\t\tif ( !empty($error) )\n\t\t\t{\n\t\t\t\t/* print errors */\n\t\t\t\t$_response -> script(\"printMessage('error', '{$error}')\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$insert = array(\n\t\t\t\t\t'Code' => $iso_code,\n\t\t\t\t\t'Direction' => $direction,\n\t\t\t\t\t'Key' => $lang_key,\n\t\t\t\t\t'Status' => 'active',\n\t\t\t\t\t'Date_format' => $date_format\n\t\t\t\t);\n\t\t\t\t$this -> rlActions -> insertOne( $insert, 'languages' );\n\t\t\t\t\t\t\t\t\n\t\t\t\t/* print notice */\n\t\t\t\t$_response -> script(\"\n\t\t\t\t\tprintMessage('notice', '{$GLOBALS['lang']['language_added']}');\n\t\t\t\t\tshow('lang_add_container');\n\t\t\t\t\tlanguagesGrid.reload();\n\t\t\t\t\");\n\t\t\t}\n\t\t}\n\t\t\n\t\t$_response -> script( \"$('#lang_add_load').fadeOut('slow');\" );\n\n\t\treturn $_response;\n\t}", "function update_translations()\n\t{\n\t\t$this->load->library('translator');\n\t\t\n\t\t//application language folder\n\t\t$language_folder=APPPATH.'language/';\n\t\t\n\t\t//template language \n\t\t$language='base';\n\t\t\n\t\t//path to the language folder\n\t\t$language_path=$language_folder.$language;\n\t\t\n\t\t//get a list of all translation files for the given language \n\t\t$files=$this->translator->get_language_files_array($language_path);\n\t\t\n\t\t//will be updated with additons from the BASE language file\n\t\t$target_language=$this->config->item(\"language\");\n\t\t\n\t\tif (!$target_language)\n\t\t{\n\t\t\techo \"language $target_language was not found\";\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tforeach($files as $file)\n\t\t{\n\t\t\t$target_filepath=$language_folder.'/'.$target_language.'/'.$file;\n\n\t\t\t//merge source and target language file to fill in missing translations for the target language\n\t\t\t$data['translations']=$this->translator->merge_language_keys($language_path.'/'.$file,$target_filepath);\n\t\t\t$data['language_name']=$target_language;\n\t\t\t$data['translation_file']=$file;\n\t\t\t\n\t\t\t//target language file content\n\t\t\t$content='<?php '.\"\\n\\n\".$this->load->view('translator/save',$data,TRUE);\n\t\t\t\n\t\t\t//update the target language file\n\t\t\t$save_result=@file_put_contents($target_filepath,$content);\n\t\t\t\n\t\t\tif($save_result)\n\t\t\t{\n\t\t\t\techo \"Language file updated: \" . $target_filepath.'<br />';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo \"<div style='color:red;'>Language file update failed: \" . $target_filepath.'</div>';\n\t\t\t}\n\t\t}\t\t\n\t}", "protected function lang($key)\n {\n }", "public function accueil()\n {\n }", "public function messages()\n {\n return [\n 'inscripcion_id.unique' => 'Ya existe una asistencia para este comensal en el dia de la fecha'\n ];\n }", "function wp_get_installed_translations($type)\n {\n }", "function cnvlanguagelist()\n{\n $cnvlang['af'] = \"eng\";\n $cnvlang['sq'] = \"eng\";\n $cnvlang['ar-bh'] = \"ara\";\n $cnvlang['eu'] = \"eng\";\n $cnvlang['be'] = \"eng\";\n $cnvlang['bg'] = \"bul\";\n $cnvlang['ca'] = \"eng\";\n $cnvlang['zh-cn'] = 'zho';\n $cnvlang['zh-tw'] = 'zho';\n $cnvlang['hr'] = 'cro';\n $cnvlang['cs'] = 'ces';\n $cnvlang['da'] = 'dan';\n $cnvlang['nl'] = 'nld';\n $cnvlang['nl-be'] = 'nld';\n $cnvlang['nl-nl'] = 'nld';\n $cnvlang['en'] = 'eng';\n $cnvlang['en-au'] = 'eng';\n $cnvlang['en-bz'] = 'eng';\n $cnvlang['en-ca'] = 'eng';\n $cnvlang['en-ie'] = 'eng';\n $cnvlang['en-jm'] = 'eng';\n $cnvlang['en-nz'] = 'eng';\n $cnvlang['en-ph'] = 'eng';\n $cnvlang['en-za'] = 'eng';\n $cnvlang['en-tt'] = 'eng';\n $cnvlang['en-gb'] = 'eng';\n $cnvlang['en-us'] = 'eng';\n $cnvlang['en-zw'] = 'eng';\n $cnvlang['fo'] = 'eng';\n $cnvlang['fi'] = 'fin';\n $cnvlang['fr'] = 'fra';\n $cnvlang['fr-be'] = 'fra';\n $cnvlang['fr-ca'] = 'fra';\n $cnvlang['fr-fr'] = 'fra';\n $cnvlang['fr-lu'] = 'fra';\n $cnvlang['fr-mc'] = 'fra';\n $cnvlang['fr-ch'] = 'fra';\n $cnvlang['gl'] = 'eng';\n $cnvlang['gd'] = 'eng';\n $cnvlang['de'] = 'deu';\n $cnvlang['de-at'] = 'deu';\n $cnvlang['de-de'] = 'deu';\n $cnvlang['de-li'] = 'deu';\n $cnvlang['de-lu'] = 'deu';\n $cnvlang['de-ch'] = 'deu';\n $cnvlang['el'] = 'ell';\n $cnvlang['hu'] = 'hun';\n $cnvlang['is'] = 'isl';\n $cnvlang['in'] = 'ind';\n $cnvlang['ga'] = 'eng';\n $cnvlang['it'] = 'ita';\n $cnvlang['it-it'] = 'ita';\n $cnvlang['it-ch'] = 'ita';\n $cnvlang['ja'] = 'jpn';\n $cnvlang['ko'] = 'kor';\n $cnvlang['mk'] = 'mkd';\n $cnvlang['no'] = 'nor';\n $cnvlang['pl'] = 'pol';\n $cnvlang['pt'] = 'por';\n $cnvlang['pt-br'] = 'por';\n $cnvlang['pt-pt'] = 'por';\n $cnvlang['ro'] = 'ron';\n $cnvlang['ro-mo'] = 'ron';\n $cnvlang['ro-ro'] = 'ron';\n $cnvlang['ru'] = 'rus';\n $cnvlang['KOI8-R'] = 'rus';\n $cnvlang['ru-mo'] = 'rus';\n $cnvlang['ru-ru'] = 'rus';\n $cnvlang['sr'] = 'eng';\n $cnvlang['sk'] = 'slv';\n $cnvlang['sl'] = 'slv';\n $cnvlang['es'] = 'spa';\n $cnvlang['es-ar'] = 'spa';\n $cnvlang['es-bo'] = 'spa';\n $cnvlang['es-cl'] = 'spa';\n $cnvlang['es-co'] = 'spa';\n $cnvlang['es-cr'] = 'spa';\n $cnvlang['es-do'] = 'spa';\n $cnvlang['es-ec'] = 'spa';\n $cnvlang['es-sv'] = 'spa';\n $cnvlang['es-gt'] = 'spa';\n $cnvlang['es-hn'] = 'spa';\n $cnvlang['es-mx'] = 'spa';\n $cnvlang['es-ni'] = 'spa';\n $cnvlang['es-pa'] = 'spa';\n $cnvlang['es-py'] = 'spa';\n $cnvlang['es-pe'] = 'spa';\n $cnvlang['es-pr'] = 'spa';\n $cnvlang['es-es'] = 'spa';\n $cnvlang['es-uy'] = 'spa';\n $cnvlang['es-ve'] = 'spa';\n $cnvlang['sv'] = 'swe';\n $cnvlang['sv-fi'] = 'swe';\n $cnvlang['sv-se'] = 'swe';\n $cnvlang['th'] = 'tha';\n $cnvlang['tr'] = 'tur';\n $cnvlang['uk'] = 'ukr';\n $cnvlang['ar'] = 'ara';\n $cnvlang['ar-ae'] = 'ara';\n $cnvlang['ar-bh'] = 'ara';\n $cnvlang['ar-dz'] = 'ara';\n $cnvlang['ar-eg'] = 'ara';\n $cnvlang['ar-iq'] = 'ara';\n $cnvlang['ar-jo'] = 'ara';\n $cnvlang['ar-kw'] = 'ara';\n $cnvlang['ar-lb'] = 'ara';\n $cnvlang['ar-ly'] = 'ara';\n $cnvlang['ar-ma'] = 'ara';\n $cnvlang['ar-mr'] = 'ara';\n $cnvlang['ar-om'] = 'ara';\n $cnvlang['ar-qa'] = 'ara';\n $cnvlang['ar-sa'] = 'ara';\n $cnvlang['ar-sd'] = 'ara';\n $cnvlang['ar-so'] = 'ara';\n $cnvlang['ar-sy'] = 'ara';\n $cnvlang['ar-tn'] = 'ara';\n $cnvlang['ar-ye'] = 'ara';\n $cnvlang['ar-km'] = 'ara';\n $cnvlang['ar-dj'] = 'ara';\n asort($cnvlang);\n return $cnvlang;\n}", "function caldera_forms_pro_db_delta_1(){\n\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\tglobal $wpdb;\n\t$charset_collate = '';\n\n\tif ( ! empty( $wpdb->charset ) ) {\n\t\t$charset_collate = \"DEFAULT CHARACTER SET $wpdb->charset\";\n\t}\n\n\tif ( ! empty( $wpdb->collate ) ) {\n\t\t$charset_collate .= \" COLLATE $wpdb->collate\";\n\t}\n\t$table = \"CREATE TABLE `\" . $wpdb->prefix . \"cf_pro_messages` (\n\t\t\t`ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT,\n\t\t\t`cfp_id` bigint(20) unsigned DEFAULT NULL,\n\t\t\t`entry_id` bigint(20) unsigned DEFAULT NULL,\n\t\t\t`hash` varchar(255) DEFAULT NULL,\n\t\t\t`type` varchar(255) DEFAULT NULL,\n\t\t\tPRIMARY KEY ( `ID` )\n\t\t\t) \" . $charset_collate . \";\";\n\n\tdbDelta( $table );\n\n\n}", "public function messages()\n {\n\t\t\n\t\t\n // use trans instead on Lang \n return [\n //'username.required' => Lang::get('userpasschange.usernamerequired'),\n\t\t 'title.required' => 'Kindly asking for a title',\n\t 'body.required' => 'We need u to specify the article text',\n\t\t 'body.min' => 'We kindly require more than 5 letters for article text',\n 'selectV.required' => 'We need u to specify the category',\n 'selectV.in' => 'You enetered invalid category',\n\t\t 'imagesZZZ.required' => 'Image is very much required',\n\t\t 'imagesZZZ.image' => 'Make sure it is an image',\n\t\t 'imagesZZZ.mimes' => 'Must be .jpeg, .png, .jpg, .gif, .svg file. Max size is 2048',\n\t\t 'imagesZZZ.max' => 'Sorry! Maximum allowed size for an image is 2MB',\n\t\t //'imagesZZZ.min' => 'Your image is too small',\n\t\t];\n\t}", "public function getTranslations()\n {\n }", "public function install() {\n $strReturn = \"\";\n\n $strReturn .= \"Assigning null-properties and elements to the default language.\\n\";\n if($this->strContentLanguage == \"de\") {\n\n $strReturn .= \" Target language: de\\n\";\n\n if(class_exists(\"class_module_pages_page\", false) || class_classloader::getInstance()->loadClass(\"class_module_pages_page\") !== false)\n class_module_pages_page::assignNullProperties(\"de\", true);\n if(class_exists(\"class_module_pages_pageelement\", false) || class_classloader::getInstance()->loadClass(\"class_module_pages_pageelement\") !== false)\n class_module_pages_pageelement::assignNullElements(\"de\");\n\n $objLang = new class_module_languages_language();\n $objLang->setStrAdminLanguageToWorkOn(\"de\");\n }\n else {\n\n $strReturn .= \" Target language: en\\n\";\n\n if(class_exists(\"class_module_pages_page\", false) || class_classloader::getInstance()->loadClass(\"class_module_pages_page\") !== false)\n class_module_pages_page::assignNullProperties(\"en\", true);\n if(class_exists(\"class_module_pages_pageelement\", false) || class_classloader::getInstance()->loadClass(\"class_module_pages_pageelement\") !== false)\n class_module_pages_pageelement::assignNullElements(\"en\");\n\n $objLang = new class_module_languages_language();\n $objLang->setStrAdminLanguageToWorkOn(\"en\");\n\n }\n\n\n return $strReturn;\n }", "public function getAllTranslationByLanguage();", "function languages($args, &$request) {\n\t\t$this->validate();\n\t\t$this->setupTemplate(true);\n\n\t\t$site =& $request->getSite();\n\n\t\t$templateMgr =& TemplateManager::getManager();\n\t\t$templateMgr->assign('localeNames', AppLocale::getAllLocales());\n\t\t$templateMgr->assign('primaryLocale', $site->getPrimaryLocale());\n\t\t$templateMgr->assign('supportedLocales', $site->getSupportedLocales());\n\t\t$localesComplete = array();\n\t\tforeach (AppLocale::getAllLocales() as $key => $name) {\n\t\t\t$localesComplete[$key] = AppLocale::isLocaleComplete($key);\n\t\t}\n\t\t$templateMgr->assign('localesComplete', $localesComplete);\n\n\t\t$templateMgr->assign('installedLocales', $site->getInstalledLocales());\n\t\t$templateMgr->assign('uninstalledLocales', array_diff(array_keys(AppLocale::getAllLocales()), $site->getInstalledLocales()));\n\t\t$templateMgr->assign('helpTopicId', 'site.siteManagement');\n\n\t\timport('classes.i18n.LanguageAction');\n\t\t$languageAction = new LanguageAction();\n\t\tif ($languageAction->isDownloadAvailable()) {\n\t\t\t$templateMgr->assign('downloadAvailable', true);\n\t\t\t$templateMgr->assign('downloadableLocales', $languageAction->getDownloadableLocales());\n\t\t}\n\n\t\t$templateMgr->display('admin/languages.tpl');\n\t}", "function sitemgr_upgrade1_5_001()\n{\n\t// (unserialzied) string in that (unserialized) column,\n\t// to easy the conversation from iso-... --> utf-8 (all serialized content with non-ascii chars get lost!)\n\tforeach($GLOBALS['egw_setup']->db->select('egw_sitemgr_content_lang','*',false,__LINE__,__FILE__,false,'','sitemgr') as $row)\n\t{\n\t\tif ($row['arguments_lang'] && ($arr = unserialize($row['arguments_lang'])) !== false &&\n\t\t\tis_array($arr) && count($arr) == 1 && isset($arr['htmlcontent']))\n\t\t{\n\t\t\t$row['arguments_lang'] = $arr['htmlcontent'];\n\t\t\t$GLOBALS['egw_setup']->db->update('egw_sitemgr_content_lang',array(\n\t\t\t\t'arguments_lang' => $row['arguments_lang'],\n\t\t\t),array(\n\t\t\t\t'version_id' => $row['version_id'],\n\t\t\t\t'lang' => $row['lang'],\n\t\t\t),__LINE__,__FILE__,'sitemgr');\n\t\t}\n\t}\n\treturn $GLOBALS['setup_info']['sitemgr']['currentver'] = '1.5.002';\n}", "private function _customizeDatabase(){\n\n // Core conversations integration\n $db = ConnectionManager::getDataSource('default');\n if(isset($db->config['prefix'])){\n $userTable = $db->config['prefix'].\"users\";\n $queryGetFirstUser = \"SELECT * FROM $userTable LIMIT 1\";\n $queryAddChatCountField = \"ALTER TABLE $userTable ADD `chat_count` INT NOT NULL DEFAULT '0' \";\n\n try\n {\n\n $result = $db->fetchAll($queryGetFirstUser);\n if($result){\n $user = $result[0][$userTable];\n if(!isset($user[\"chat_count\"])){\n try\n {\n $db->rawQuery($queryAddChatCountField);\n }catch(Exception $ex)\n {\n echo $ex->getMessage();\n die();\n }\n\n }\n\n }\n }\n catch (Exception $ex)\n {\n echo $ex->getMessage();\n die();\n }\n //$db = ConnectionManager::getDataSource('default');\n $roomTable = $db->config['prefix'].\"chat_rooms\";\n $messagesTable = $db->config['prefix'].\"chat_messages\";\n $queryRoomIds = \"SELECT id FROM $roomTable WHERE latest_mesasge_id=0\";\n $queryLastestMessage = \"SELECT MAX(id) AS id FROM $messagesTable WHERE room_id=%s\";\n $queryUpdateRoom = \"UPDATE $roomTable SET latest_mesasge_id=%s WHERE id=%s\";\n try\n {\n\n $result = $db->fetchAll($queryRoomIds);\n if($result){\n\n foreach ($result as $i){\n\n try\n {\n $messageId = $db->fetchAll(sprintf($queryLastestMessage,$i[$roomTable][\"id\"]));\n if($messageId){\n try\n {\n if(!empty($messageId[0][0][\"id\"])){\n $db->rawQuery(sprintf($queryUpdateRoom,$messageId[0][0][\"id\"],$i[$roomTable][\"id\"]));\n }\n\n }catch(Exception $ex)\n {\n echo $ex->getMessage();\n die();\n }\n }\n }catch(Exception $ex)\n {\n echo $ex->getMessage();\n die();\n }\n }\n }\n }\n catch (Exception $ex)\n {\n echo $ex->getMessage();\n die();\n }\n }\n }", "private function deleteTranslations()\n {\n $sql = \"DELETE FROM s_core_snippets WHERE namespace in ('frontend/\". $this->getPaymentController() .\"/form/cp',\"\n . \"'frontend/\". $this->getPaymentController() .\"/form/paypalsaved', 'frontend/\". $this->getPaymentController() .\"/result', \"\n . \"'frontend/\". $this->getPaymentController() .\"/confirmation', \"\n . \"'frontend/payment_information/information', 'frontend/payment_information/form/register_cp',\"\n . \"'frontend/payment_information/form/change_cp', 'frontend/payment_information/delete',\n 'frontend/\". $this->getPaymentController() .\"/form/response_redirect')\";\n Shopware()->Db()->query($sql);\n $sql = \"DELETE FROM s_core_snippets WHERE namespace in ('frontend/checkout/shipping_payment',\"\n . \"'sidebar', 'frontend/account/sidebar', 'backend/error/index', \"\n . \"'frontend/account/payment', 'backend/order/main') \"\n . \"AND name IN ('FRONTEND_PM_CC','FRONTEND_PM_CCSAVED','FRONTEND_PM_DC','FRONTEND_PM_DD',\"\n . \"'FRONTEND_PM_DDSAVED','FRONTEND_PM_EPS','FRONTEND_PM_GIROPAY','FRONTEND_PM_IDEAL',\"\n . \"'FRONTEND_PM_KLARNAPAYLATER','FRONTEND_PM_EASYCREDIT',\"\n . \"'FRONTEND_PM_KLARNASLICEIT','FRONTEND_PM_MASTERPASS',\"\n . \"'FRONTEND_PM_PAYPAL','FRONTEND_PM_PAYPALSAVED','FRONTEND_PM_PAYDIREKT','FRONTEND_PM_KLARNAOBT',\"\n . \"'FRONTEND_PM_SWISSPOSTFINANCE','FRONTEND_MC_INFO',\"\n . \"'MODULE_PAYMENT_VRPAYECOMMERCE_EASYCREDIT_TEXT_ERROR_CREDENTIALS', 'ERROR_EASYCREDIT_FUTURE_DOB',\"\n . \"'ERROR_EASYCREDIT_PARAMETER_DOB','ERROR_MESSAGE_EASYCREDIT_PARAMETER_GENDER','ERROR_CAPTURE_BACKEND',\"\n . \"'ERROR_MESSAGE_EASYCREDIT_AMOUNT_NOTALLOWED','ERROR_EASYCREDIT_BILLING_NOTEQUAL_SHIPPING',\"\n . \"'ERROR_REFUND_BACKEND','ERROR_REORDER_BACKEND', 'ERROR_RECEIPT_BACKEND', 'SUCCESS_IN_REVIEW',\"\n .\"'FRONTEND_EASYCREDIT_TERMS')\";\n Shopware()->Db()->query($sql);\n $sql = \"DELETE FROM s_core_snippets WHERE namespace in ('confirm') \"\n . \"AND name IN ('FRONTEND_EASYCREDIT_CONFIRM_BUTTON')\";\n Shopware()->Db()->query($sql);\n }", "public static function loadLanguages()\n\t{\n\t\tself::$_LANGUAGES = array();\n\t\t$result = Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'Language`');\n\t\tforeach ($result AS $row)\n\t\t\tself::$_LANGUAGES[(int)$row['LanguageId']] = $row;\n\t}", "private function sql_select_addLL_langOl()\n {\n // get table and field\n list( $table, $field ) = explode( '.', $this->curr_tableField );\n\n // Load TCA\n $this->pObj->objZz->loadTCA( $table );\n\n // Get language overlay appendix\n $lang_ol = $this->pObj->objLocalise->conf_localisation[ 'TCA.' ][ 'field.' ][ 'appendix' ];\n\n // Label of the field for language overlay\n $field_lang_ol = $field . $lang_ol;\n\n // RETURN no field for language overlay\n if ( !isset( $GLOBALS[ 'TCA' ][ $table ][ 'columns' ][ $field_lang_ol ] ) )\n {\n // DRS\n if ( $this->pObj->b_drs_filter || $this->pObj->b_drs_sql || $this->pObj->b_drs_localisation )\n {\n $prompt = $table . ' isn\\'t a localised foreignTable: ' .\n 'TCA.' . $table . 'columns.' . $field_lang_ol . ' is missing.';\n t3lib_div::devlog( '[INFO/FILTER+SQL+LOCALISATION] ' . $prompt, $this->pObj->extKey, 0 );\n }\n // DRS\n return;\n }\n // RETURN no field for language overlay\n // addSelect\n $tableField_ol = $table . '.' . $field_lang_ol;\n $addSelect = \", \" . $tableField_ol . \" AS '\" . $tableField_ol . \"'\";\n // addSelect\n // Add field to the class var sql_filterFields\n $this->sql_filterFields[ $this->curr_tableField ][ 'lang_ol' ] = $tableField_ol;\n\n // DRS\n if ( $this->pObj->b_drs_filter || $this->pObj->b_drs_sql || $this->pObj->b_drs_localisation )\n {\n $prompt = $table . ' is a localised foreignTable. SELECT is localised.';\n t3lib_div::devlog( '[INFO/FILTER+SQL+LOCALISATION] ' . $prompt, $this->pObj->extKey, 0 );\n }\n // DRS\n // RETURN addSelect\n return $addSelect;\n }", "function hs_courses_importer_post_update_8002() {\n $source = new FileStorage('../config/default');\n /** @var \\Drupal\\Core\\Config\\CachedStorage $config_storage */\n $config_storage = \\Drupal::service('config.storage');\n $config_storage->write('migrate_plus.migration.hs_courses', $source->read('migrate_plus.migration.hs_courses'));\n\n // I added the course id & course code to source.ids. Anytime the ids are\n // added/deleted the table must be deleted so that it can be rebuilt with the\n // additional columns on the next import.\n \\Drupal::database()->schema()->dropTable('migrate_map_hs_courses');\n drupal_flush_all_caches();\n}", "function generator_decla_upgrade($nom_meta_base_version, $version_cible) {\n\t\n\t$maj = array();\n\n\tinclude_spip('base/upgrade');\n\tmaj_plugin($nom_meta_base_version, $version_cible, $maj);\n}", "public function appLanguageVersion() {\n // get version\n $this->loadModel('Versions');\n $version = $this->Versions->findAppLanguageVersion();\n\n // get language\n $this->loadModel('AppLanguages');\n $arrayLanguages = $this->AppLanguages->findAllLanguages();\n $this->set(compact(\"version\", \"arrayLanguages\"));\n }", "private function build_migration_required() {\n\t\t$message = array();\n\t\t$actions = array();\n\n\t\t$link_pattern = '<a href=\"%1$s\" target=\"_blank\">%2$s</a>';\n\t\t$ask_us_link = sprintf(\n\t\t\t$link_pattern,\n\t\t\t'https://wpml.org/forums/topic/im-not-sure-if-i-need-to-run-icanlocalize-migration/',\n\t\t\tesc_html__( 'Ask us', 'wpml-translation-management' )\n\t\t);\n\n\t\t$button_label = esc_html__( 'Start the update', 'wpml-translation-management' );\n\n\t\t$title = '<h3>WPML needs to update your ICanLocalize account settings</h3>';\n\n\t\t$message[] = esc_html__(\n\t\t\t'WPML 3.9 changes the way it works with ICanLocalize. This requires WPML to move to a new interface with ICanLocalize.',\n\t\t\t'wpml-translation-management'\n\t\t);\n\t\t$message[] = esc_html__(\n\t\t\t'If you are in a production site, you have to run this update before you can send more content for translation and receive completed translations.',\n\t\t\t'wpml-translation-management'\n\t\t);\n\t\t$message[] = esc_html__(\n\t\t\t\"If this is not your production site (it's a staging or testing site), please do not run the update.\",\n\t\t\t'wpml-translation-management'\n\t\t);\n\t\t$message[] = esc_html__(\n\t\t\t'Running this update on a non-production site will make it impossible to correctly run it on the production site.',\n\t\t\t'wpml-translation-management'\n\t\t);\n\t\t$message[] = '';\n\t\t$message[] = sprintf( esc_html__( 'Not sure? %s.', 'wpml-translation-management' ), $ask_us_link );\n\t\t$message[] = '';\n\n\t\t$message[] = $this->get_user_confirmation_input();\n\n\t\t$text = $title . '<p>' . implode( '</p><p>', $message ) . '</p>';\n\n\t\t$actions[] = $this->notices->get_new_notice_action( $button_label, '#', false, false, true );\n\n\t\t$this->create_notice( $text, $actions );\n\t}", "function sitemgr_upgrade0_9_15_005()\n{\n\tforeach(array(\n\t\t'phpgw_sitemgr_pages_lang',\n\t\t'phpgw_sitemgr_categories_lang',\n\t\t'phpgw_sitemgr_blocks_lang',\n\t\t'phpgw_sitemgr_content_lang',\n\t) as $table)\n\t{\n\t\t$GLOBALS['egw_setup']->oProc->AlterColumn($table,'lang',array(\n\t\t\t'type' => 'varchar',\n\t\t\t'precision' => '5',\n\t\t\t'nullable' => False\n\t\t));\n\t}\n\t$GLOBALS['setup_info']['sitemgr']['currentver'] = '0.9.15.006';\n\treturn $GLOBALS['setup_info']['sitemgr']['currentver'];\n}", "public function messages($lang)\n\t{\n $lang = isset($lang)?$lang:Yii::app()->language; \n\t //Yii::log('GET MESSAGES LANG='.$lang. ' session[ulang]='.Yii::app()->session['ulang'],'warning');\n return $this->loadMessages('app', $lang) ;\n ///$this->basePath=Yii::getPathOfAlias('application.messages');\n \n\t}", "protected function loadLocalization() {}", "public function translatableMessages()\n {\n return [];\n }" ]
[ "0.6307929", "0.6279423", "0.6018871", "0.5987484", "0.5985052", "0.5924254", "0.58560616", "0.5830143", "0.5816742", "0.5757681", "0.5741451", "0.572128", "0.5715325", "0.5713798", "0.5693484", "0.5685896", "0.56601316", "0.5642704", "0.56161267", "0.5614208", "0.5584372", "0.55698055", "0.55652034", "0.55599564", "0.5554988", "0.5531956", "0.5529283", "0.55245644", "0.55218965", "0.55202734", "0.5519359", "0.5517307", "0.55162656", "0.54977757", "0.5486304", "0.54849535", "0.5478517", "0.54646885", "0.5463128", "0.54544467", "0.5448581", "0.54484314", "0.5437192", "0.5422204", "0.5416467", "0.5416166", "0.5409558", "0.5407977", "0.5405204", "0.5402913", "0.5398313", "0.53888285", "0.5385437", "0.5385186", "0.537383", "0.53719735", "0.5363318", "0.53549904", "0.5349985", "0.5349374", "0.53486395", "0.53442526", "0.5335809", "0.5332175", "0.53213245", "0.532057", "0.53188163", "0.5318121", "0.5317789", "0.53170353", "0.5311306", "0.53102624", "0.530941", "0.53070366", "0.53068656", "0.5305261", "0.5303007", "0.5297556", "0.5297084", "0.52925897", "0.5277614", "0.5275508", "0.52643764", "0.5260082", "0.5259621", "0.5245483", "0.5245011", "0.5243701", "0.52423537", "0.5240439", "0.52362615", "0.5235418", "0.5230153", "0.5230115", "0.52260876", "0.52258164", "0.52220106", "0.52216226", "0.52167296", "0.52165574" ]
0.5639213
18
Quote string for output in config.php file
function quote($s) { return "'" . addslashes(canonicalize_whitespace($s)) . "'"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function escaped()\n {\n return preg_quote('='.env($this->key()), '/');\n }", "function add_quote($value) {\n\t\treturn '\"' . addslashes($value) . '\"';\n\t}", "protected function declareConfig(){\n\n $output = '';\n \n foreach( $this->getConfig() as $key => $value ){\n \n $output .= $key . '=' . json_encode( $value ) . ';';\n \n }\n \n return $output;\n\n }", "function privDisableMagicQuotes()\n {\n }", "protected function quote_escaped()\n {\n }", "public function __toString() {\r\n return \"database config: dbPath: $this->dbPath, dbExtenstion: $this->dbExtension, delimiter: $this->delimiter\";\r\n }", "function wp_magic_quotes()\n {\n }", "private function quoted(string $value): string\n {\n return sprintf('\\'%s\\'', $value);\n }", "public function getConfigurationExample() {\n\t\treturn '\nsource = xls\nsource {\n\t# in KB\n\tmaxFileSize = 10000 \n\tarchivePath = uploads/tx_cabagimport/\n\t\n\t# force charset if you have problems with umlaute\n\tforceCharset = en_US.UTF-8\n\t\n\t# interpreter which parses the data\n\tinterpret = csv\n\tinterpret {\n\t\t# csv options\n\t\tdelimiter = ,\n\t\t\n\t\tenclosure = \"\n\t}\n}';\n\t}", "public function buildConfigText() {\n\t\t$this->setPrimaryDomain();\n\t\n\t\tob_start();\n\t\t$installation_path = $this->installation_path;\n\t\t$name = $this->sitename;\n\t\t$domains = array(\n\t\t\t$this->primary_domain\n\t\t);\n\t\t$redirrectdomains = array();\n\t\tinclude(SHARED_PATH . 'provisioning/httpd.tpl');\n\t\t$config_text = ob_get_clean ();\n\t\treturn $config_text;\n\t\t\n\t}", "public function toString()\n {\n return json_encode($this->config);\n }", "protected function _toConfigurationString($data = null)\n {\n $configText = var_export($data, true);\n\n // Fix pathes. This related to windows directory separator.\n $configText = str_replace('\\\\\\\\', DS, $configText);\n\n $configText = str_replace(\"'\" . ROOT_PATH, \"ROOT_PATH . '\", $configText);\n $headerText = '<?php\n/**\n* WARNING\n*\n* Manual changes to this file may cause a malfunction of the system.\n* Be careful when changing settings!\n*\n*/\n\nreturn ';\n return $headerText . $configText . ';';\n }", "function createPrintSettingsConfFile() {\r\n\t \t\r\n\t $fileContent = \"<?php \\n\";\r\n\t $fileContent .= \" /** \\n\";\r\n\t $fileContent .= \" * @name QR code for Virtuemart \\n\";\r\n\t $fileContent .= \" * @version\t1.0: crop.php 2011-06-06 \\n\";\r\n\t $fileContent .= \" * @since Joomla 1.5 \\n\";\r\n\t $fileContent .= \" * @subpackage\tcom_qrcode \\n\";\r\n\t $fileContent .= \" * @author contus support \\n\";\r\n\t $fileContent .= \" * @copyright Copyright (C) 2011 Contus Support \\n\";\r\n\t $fileContent .= \" * @license GNU/GPL http://www.gnu.org/copyleft/gpl.html \\n\";\r\n\t $fileContent .= \" * @abstract Constants for print setting. \\n\";\r\n\t $fileContent .= \" **/ \\n\";\r\n\t $fileContent .= \"define('conf__QRCODE_PRINT_SIZE','\" . JRequest::getVar(\"size\") . \"');\\n \";\r\n\t $fileContent .= \"define('conf__QRCODE_PRINT_ORIENTATION','\" . JRequest::getVar(\"orientation\") . \"');\\n \";\r\n\t $fileContent .= \"?>\";\r\n\t $path = JPATH_COMPONENT_ADMINISTRATOR . DS . \"helpers\" . DS . \"printSettings.php\";\r\n\t $fp = fopen($path, \"w\");\r\n\t if ($fp) \r\n\t {\r\n\t fwrite($fp, $fileContent);\r\n\t fclose($fp);\r\n\t return true;\r\n\t }\r\n\t else\r\n\t return false;\r\n\t }", "public function __toString()\n {\n try {\n return (string) $this->configuration;\n } catch (Exception $exception) {\n return '';\n }\n }", "public static function setQuoteSeparator() {\n if (is_null(self::$quoteSeparator)) {\n switch(self::$connector->getAttribute(PDO::ATTR_DRIVER_NAME)) {\n case 'pgsql':\n case 'sqlsrv':\n case 'dblib':\n case 'mssql':\n case 'sybase':\n self::$quoteSeparator = '\"';\n break;\n case 'mysql':\n case 'sqlite':\n case 'sqlite2':\n default:\n self::$quoteSeparator = '`';\n }\n }\n }", "function add_magic_quotes($input_array)\n {\n }", "public function getFileEnclosure()\n {\n $value = $this->_config->get('file/enclosure');\n\n if ($value === null) {\n $value = '\"';\n }\n\n return $value;\n }", "function bab_pm_quote($str)\n{\n return '\"' . str_replace('\"', '\"\"', $str) . '\"';\n}", "public static function intoQuote($string){ return \"'\".$string.\"'\"; }", "protected function quote(?string $value): string {\n\n\t\t\t$quote = $this->quoteInputEncoded;\n\n\t\t\tif ($value === null)\n\t\t\t\treturn \"{$quote}{$quote}\";\n\n\t\t\t$value = str_replace($quote, \"{$quote}{$quote}\", $value);\n\n\t\t\treturn \"{$quote}{$value}{$quote}\";\n\t\t}", "public function writewebconfig()\n {\n //<add fileExtension=\"supersake\" allowed=\"false\"/>\n }", "protected function quote()\n {\n }", "function write_configuration(&$d) {\n\t\t$my_config_array = array(\n\t\t\t\"AP_UNIQUE_ID\" => htmlentities($d['AP_UNIQUE_ID'], ENT_QUOTES, 'UTF-8'),\n\t\t\t\"AP_SIGN_KEY\" => htmlentities($d['AP_SIGN_KEY'], ENT_QUOTES, 'UTF-8'),\n\t\t\t\"AP_FRAME_URL\" => htmlentities($d['AP_FRAME_URL'], ENT_QUOTES, 'UTF-8'),\n\t\t\t\"AP_PAYMENT_SRC\" => htmlentities($d['AP_PAYMENT_SRC'], ENT_QUOTES, 'UTF-8'),\n\t\t\t\"AP_PAYER_CALLBACK_URL\" => htmlentities($d['AP_PAYER_CALLBACK_URL'], ENT_QUOTES, 'UTF-8'),\n\t\t\t\"AP_PAYMENT_CALLBACK_URL\" => htmlentities($d['AP_PAYMENT_CALLBACK_URL'], ENT_QUOTES, 'UTF-8'),\n\t\t\t\"AP_ALLOWED_IP\" => htmlentities($d['AP_ALLOWED_IP'], ENT_QUOTES, 'UTF-8'),\n\t\t\t\"AP_CSS_FILE\" => htmlentities($d['AP_CSS_FILE'], ENT_QUOTES, 'UTF-8'),\n\t\t\t\"AP_FRAME_MODE\" => htmlentities($d['AP_FRAME_MODE'], ENT_QUOTES, 'UTF-8'),\n\t\t\t\"AP_FRAME_PARAMS\" => addslashes($d['AP_FRAME_PARAMS'])\n\t\t);\n\n\t\tif (isset($my_config_array['AP_FRAME_PARAMS'])) {\n\t\t\t$frame_params = $my_config_array['AP_FRAME_PARAMS'];\n\t\t \t$pattern = '/[\\s]+/';\n\t\t \t$iframe_attributes = preg_split($pattern, trim($frame_params));\n\t\t \tforeach ($iframe_attributes as $pair) {\n\t\t \t\t$attribute = explode(\"=\", $pair);\n\t\t \t\t$available_attributes = array(\"width\", \"height\", \"scrolling\", \n\t\t\t \t\"frameborder\", \"allign\", \"marginheight\", \"marginwidth\");\n\t\t\t\tif (!in_array(trim($attribute[0]), $available_attributes)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\n\t\t$config = \"<?php\\n\";\n\t\t$config .= \"if( !defined( '_VALID_MOS' ) && !defined( '_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not allowed.' ); \\n\\n\";\n\t\tforeach( $my_config_array as $key => $value ) {\n\t\t\t$config .= \"define ('$key', '$value');\\n\";\n\t\t}\n\n\t\t$config .= \"?>\";\n\n\t\tif ($fp = fopen(CLASSPATH .\"payment/\".__CLASS__.\".cfg.php\", \"w\")) {\n\t\t\tfputs($fp, $config, strlen($config));\n\t\t\tfclose ($fp);\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "function getConfig($config)\n{ \n return config(\"system.$config\");\n}", "public function configM4() {\n $ALIAS = strtoupper($this->alias);\n ob_start();\n ?>\ndnl Koda, <?=date(\"Y-m-d H:i:s\")?>.\n\nPHP_ARG_WITH(<?=$this->alias?>, for <?=$this->alias?> support,\n[ --with-<?=$this->alias?> Include <?=$this->alias?> support])\n\nif test \"$PHP_<?=$ALIAS?>\" != \"no\"; then\n\tPHP_ADD_INCLUDE(.)\n<? foreach($this->includes as $include): ?>\n PHP_ADD_INCLUDE(<?=$include?>)\n<? endforeach ?>\n\n PHP_NEW_EXTENSION(<?=$this->alias?>, \"<?=implode(\" \", $this->sources)?>\", $ext_shared)\nfi\n<?php\n return ob_get_clean();\n }", "function write_setting($data) {\n return '';\n }", "public function getConfigFileName() {\n return \\Config::get('fontello::config.file');\n }", "static function quote($value)\n\t{\n\t\treturn \"'\" . str_replace(\"'\", \"\\\\'\", $value) . \"'\";\n\t}", "private function getRealUrlConfigurationTemplateContent()\n {\n $template = tx_mktools_util_miscTools::getRealUrlConfigurationTemplate();\n if (empty($template)) {\n return '';\n }\n\n return str_replace(\n '$TYPO3_CONF_VARS',\n '$GLOBALS[\\'TYPO3_CONF_VARS\\']',\n file_get_contents($template)\n );\n }", "protected function _compile_config()\n {\n $output = \"\\n\\n\";\n $output .= '<fieldset id=\"ci_profiler_config\" style=\"border:1px solid #000;padding:6px 10px 10px 10px;margin:20px 0 20px 0;background-color:#eee\">';\n $output .= \"\\n\";\n $output .= '<legend style=\"color:#000;\">&nbsp;&nbsp;'.$this->CI->lang->line('profiler_config').'&nbsp;&nbsp;(<span style=\"cursor: pointer;\" onclick=\"var s=document.getElementById(\\'ci_profiler_config_table\\').style;s.display=s.display==\\'none\\'?\\'\\':\\'none\\';this.innerHTML=this.innerHTML==\\''.$this->CI->lang->line('profiler_section_show').'\\'?\\''.$this->CI->lang->line('profiler_section_hide').'\\':\\''.$this->CI->lang->line('profiler_section_show').'\\';\">'.$this->CI->lang->line('profiler_section_show').'</span>)</legend>';\n $output .= \"\\n\";\n\n $output .= \"\\n\\n<table style='width:100%; display:none' id='ci_profiler_config_table'>\\n\";\n\n foreach ($this->CI->config->config as $config=>$val)\n {\n if (is_array($val)||is_object($val))\n {\n $val = print_r($val, TRUE);\n }\n\n $output .= \"<tr><td style='padding:5px; vertical-align: top;color:#900;background-color:#ddd;'>\".$config.\"&nbsp;&nbsp;</td><td style='padding:5px; color:#000;background-color:#ddd;'>\".htmlspecialchars($val).\"</td></tr>\\n\";\n }\n\n $output .= \"</table>\\n\";\n $output .= \"</fieldset>\";\n\n return $output;\n }", "function toString() {\r\n\r\n\t\t$sb = 'ForwardConfig[';\r\n\t\t$sb .= 'name=';\r\n\t\t$sb .= $this->name;\r\n\t\t$sb .= ',path=';\r\n\t\t$sb .= $this->path;\r\n\t\t$sb .= ',redirect=';\r\n\t\t$sb .= $this->redirect;\r\n\t\t$sb .= ']';\r\n\t\treturn $sb;\r\n\r\n\t}", "public function addDoubleQuotes($str){\n\t\treturn '\"'.$str.'\"';\n\t}", "public function getConfigToString() {\n return serialize($this->_options);\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 generateConfigCommand()\n {\n $this->outputLine('Making the following config settings:');\n foreach ($this->configSettings as $key => $value) {\n $this->h5pFramework->setOption($key, $value);\n $this->outputLine(\"<b>$key:</b> $value\");\n }\n }", "public function doubleQuoteEscapingAtTheEOL()\n {\n\n $data = [\"Section\" => [\"key1\" => \"\\\"\\nwhatever\\\"\"]];\n $ini = StringUtils::ensureLf(<<<'INI'\n[Section]\nkey1 = \"\\\"\nwhatever\\\"\"\n\nINI\n );\n\n $this->assertSame($ini, IniSerializer::serialize($data));\n $this->assertSame($data, IniSerializer::deserialize($ini));\n\n }", "protected function repoOptionString()\n {\n $str = 'ahem::';\n $args = func_get_args();\n foreach ($args as $arg) \n {\n $str .= !empty($arg) ? $arg.'.' : '';\n }\n $str = rtrim($str,'.');\n return $str;\n \n }", "public function quote(string $value): string\n {\n return implode('.', array_map(function ($part) {\n return \"`$part`\";\n }, explode('.', $value)));\n }", "protected function getConfigParameterOptions(): string\n {\n $options = '';\n foreach ($this->configParameters as $name => $value) {\n $options .= ' -c ' . escapeshellarg($name . '=' . $value);\n }\n return $options;\n }", "function get($key)\n {\n return stripslashes($this->config[$key]);\n }", "protected function quoteContent(string $content): string {\n return \"'\".str_replace(\n ['\\\\', \"\\r\", \"\\n\", \"'\"],\n ['\\\\\\\\', '\\\\r', '\\\\n', \"\\\\'\"],\n $content\n ).\"'\";\n }", "private function quote( )\n {\n if ( @ count( $this->data_buffer ) == 0 )\n return;\n foreach ( $this->data_buffer as $key => $val )\n {\n if ( in_array( $key, $this->string_fields ))\n $this->data_buffer[$key] = @\"'\".mysql_real_escape_string($val,underQL::$db_handle).\"'\";\n else\n $this->data_buffer[$key] = $val;\n }\n }", "function Quote( $text ) {\n\t\treturn '\\'' . getEscaped( $text ) . '\\'';\n\t}", "function getStringtoAppend($aDataInFormat, $sConfigItemName, $sFormat) {\n\n\t\t$bString = \"\\n\\n\";\n\t\t$bString .= '$config' . \"['\". $sConfigItemName.\"_\".$sFormat. \"'] = \";\n\t\t$bString .= var_export($aDataInFormat, true);\n\t\t$bString .= ';';\n\n\t\treturn $bString;\n\t}", "abstract public function quoteString($value);", "public function generateSnippet() {\n $output = '\"' . $this->_command_name . '\": {';\n if($this->_language && $this->_language !== '') {\n $output .= '\"language\":\"' . $this->_language . '\"';\n }\n $output .= '}';\n \n return $output;\n }", "public function __toString() {\n return get_class($this).spl_object_hash($this).\"=( \".\n \"file=\".$this->file.\", \".\n \"class=\".$this->class.\", \".\n \"conf=\".preg_replace(\"/( |\\r|\\n|\\t)+/\", \n \" \", var_export($this->conf,true)).\" )\";\n }", "function toString() {\r\n\r\n\t\t$sb = 'MessageResourcesConfig[';\r\n\t\t$sb .= 'factory=';\r\n\t\t$sb .= $this->factory;\r\n\t\t$sb .= 'null=';\r\n\t\t$sb .= $this->nullValue;\r\n\t\t$sb .= ',parameter=';\r\n\t\t$sb .= $this->parameter;\r\n\t\t$sb .= ']';\r\n\t\treturn $sb;\r\n\r\n\t}", "public function getConfigFileName() {\n return realpath(FileHelper::getPrivateFolderLocation()) . EnvatoLicense::EnvatoLicenseFileNameJSON;\n }", "public function quote($value) {\n $connection = $this -> connect();\n return \"'\" . $connection -> real_escape_string($value) . \"'\";\n }", "public function printConfiguration () {\n echo static::substituteTemplateVariables($this->template);\n }", "function wrapFileContents($sFileContents) {\n\t\t$sString = \"<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');\";\n\t\t$sString .= \"\\n\\n\";\n\t\t$sString .= \"\n\t\t/**\n\t\t *\n\t\t *\n\t\t * =============== IMPORTANT ===============\n\t\t *\n\t\t * This FILE IS GENERATED VIA CODE...\n\t\t * Do not edit directly!! Refer to Data_model.\n\t\t *\n\t\t * =============== IMPORTANT ===============\n\t\t *\n\t\t */\n\t\t\";\n\t\t$sString .= \"\\n\\n\";\n\t\t$sString .= $sFileContents;\n\n\t\t/*$sString .= '?>';*/ \t// IMPORTANT : we are not added the closing php tag /\n\t\t\t\t\t\t\t\t// This way, we can append to the config file later on\n\n\t\treturn $sString;\n\t}", "protected function appendGenericConfig($cmd)\n {\n return sprintf(\n '%s --custom-configuration-dir=tests/acceptance/app/etc/configuration --magento-edition=%s --magento-version=%s --source-dir=%s',\n $cmd,\n $this->magentoEdition,\n $this->magentoVersion,\n $this->sourceDir\n );\n }", "public function quote($value)\n\t{\n\t\treturn $this->c->quote($value);\n\t}", "public function getConfigurationExample() {\n\t\treturn '\n\t# can be used for usergroup relation in fe_users if they have to be generated\n\tadd_to_commaseparated_list_example {\n\t\trequired = 1\n\t\t\t\t\n\t\tstack {\n\t\t\t\n\t\t\t1 = TEXT\n\t\t\t1.value = {$org1}+{$org2}\n\t\t\t\n\t\t\t3 = add_to_commaseparated_list\n\t\t\t3 {\n\t\t\t\t# glue between the relations (normaly commaseparated)\n\t\t\t\tsplit = +\n\t\t\t\t\n\t\t\t\t# add record if not found\n\t\t\t\taddIfMissing = 1\n\t\t\t\t\n\t\t\t\t# table to relate to\n\t\t\t\ttable = fe_groups\n\t\t\t\t\t\t\t\t\n\t\t\t\t# field to relate to and add value if record is missing\n\t\t\t\ttablekeyfield = title\n\t\t\t}\n\t\t}\n\t}';\n\t}", "function quote_smart($value)\n {\n return $value;\n }", "function tep_html_quotes($string) {\n return str_replace(\"'\", \"&#39;\", $string);\n }", "function tep_html_quotes($string) {\n return str_replace(\"'\", \"&#39;\", $string);\n }", "static public function addSingleQuotes($arg) \n { \n /* single quote and escape single quotes and backslashes */ \n return \"'\" . addcslashes($arg, \"'\\\\\") . \"'\"; \n }", "function escapeQuote($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}", "function escapeQuote($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}", "function escapeQuote($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 quote($value) {\n\t\t$connection = $this -> connect();\n\t\treturn \"'\" . $connection -> real_escape_string($value) . \"'\";\n\t}", "static function quote($s){\r\n return '\"' . str_replace('\"', '\\\"', $s) . '\"';\r\n }", "public function dump($config): string;", "public static function escapeQuote($val){\n\t\t\tswitch(gettype($val)){\n\t\t\t\tcase 'array': case 'object':\n\t\t\t\t\t$val=(array)$val;\n\t\t\t\t\tforeach($val as $k=>$v)\n\t\t\t\t\t\t$val[$k]=self::escapeQuote($v);\n\t\t\t\t\treturn $val;\n\t\t\t\tcase 'string':\n\t\t\t\t\treturn '\"'.self::escape($val).'\"';\n\t\t\t\tcase 'NULL':\n\t\t\t\t\treturn 'NULL';\n\t\t\t\tcase 'boolean':\n\t\t\t\t\treturn $val ? 'TRUE' : 'FALSE';\n\t\t\t\tdefault:\n\t\t\t\t\treturn strval($val); \n\t\t\t}\n\t\t}", "public function checkConstantsConfigFile($config)\n {\n if (!file_exists($config)) {\n $constantFile = fopen($config, 'w');\n $data = \"<?php \n return array(\n 'site_title' => '',\n 'site_logo' => '',\n 'site_email' => '',\n 'site_icon' => '',\n 'site_copyright' => '',\n 'stripe_publishable_key' => '',\n 'stripe_secret_key' => '',\n 'contact_number' => '',\n 'timezone' => '',\n \n 'demo_mode' => '',\n \n 'store_link_android_user' => '',\n 'version_android_user' => '',\n 'store_link_android_provider' => '',\n 'version_android_provider' => '',\n 'store_link_ios_user' => '',\n 'version_ios_user' => '',\n 'store_link_ios_provider' => '',\n 'version_ios_provider' => '',\n 'facebook_link' => '',\n 'instagram_link' => '',\n 'twitter_link' => '',\n \n 'social_login' => '',\n 'fb_public_key' => '',\n 'fb_secret_key' => '',\n 'fb_redirect_url' => '',\n 'google_public_key' => '',\n 'google_secret_key' => '',\n 'google_redirect_url' => '',\n \n 'provider_accept_timeout' => '',\n 'provider_search_radius' => '',\n 'distance_map' => '',\n \n 'map_key' => '',\n 'server_map_key' => '',\n 'fb_app_version' => '',\n 'android_sender_key' => '',\n \n 'ios_push_environment' => '',\n 'ios_push_user_permission' => '',\n 'ios_push_provider_permission' => '',\n 'ios_push_password' => '',\n 'android_push_key' => '',\n \n 'send_mail' => '',\n 'mail_driver' => '',\n 'mail_host' => '',\n 'mail_port' => '',\n 'mail_username' => '',\n 'mail_password' => '',\n 'mail_from_address' => '',\n 'mail_from_name' => '',\n 'mail_encryption' => '',\n 'referral' => '',\n 'referral_count' => '',\n 'referral_amount' => '',\n 'booking_id_prefix' => '',\n 'currency' => '',\n 'currency_exchange_key' => '',\n \n 'cash_payment' => '',\n 'online_payment' => '',\n 'stripe_payment' => '',\n\n 'ride_toll' => '0',\n 'ride_otp' => '0',\n \n 'payment_daily_target' => '',\n 'tax_percentage' => '',\n 'commission_percentage' => '',\n 'agent_commission_percentage' => '',\n 'payment_peakHours_commission' => '',\n 'payment_mini_negative_bal' => '',\n );\";\n\n fwrite($constantFile, $data);\n fclose($constantFile);\n chmod($config, 0777);\n }\n }", "public function quote($value) {\n\t\treturn $this -> getAdapter() -> quote($value);\n\t}", "function write_config()\n\t{\n\t\t$charmap \t= $this->paths['tempdir'].'/'.$this->paths['config'];\n\t\t$handle \t= @fopen( $charmap, 'w' );\n\t\t\n\t if ($handle)\n\t {\n\t fwrite( $handle, '<?php $chars = array();');\n\t \n\t foreach($this->svg_config[$this->font_name] as $unicode)\n\t {\n\t \tif(!empty($unicode))\n\t \t{\n\t \t\t$delimiter = \"'\";\n\t \t\tif(strpos($unicode, \"'\") !== false) $delimiter = '\"';\n\t \t\tfwrite( $handle, \"\\r\\n\".'$chars[\\''.$this->font_name.'\\']['.$delimiter.$unicode.$delimiter.'] = '.$delimiter.$unicode.$delimiter.';' );\n\t \t}\n\t } \t \n\t \n\t fclose( $handle );\n\t }\n\t else\n\t {\n\t \t$this->delete_folder($this->paths['tempdir']);\n\t\t\texit('Was not able to write a config file');\n\t }\n\t\t\n\t\t\n\t}", "function replace_in_config($name_var, $value)\n{\n\t\n\t$source = file_get_contents('includes/config.php');\n\t$value_formatted = var_export($value, true);\n\t$replace = \"\\n\\$\" . $name_var . \" = \" . $value_formatted . \";\";\n\t\n\t$new_source = preg_replace('#\\n\\$' . $name_var . '(.*?)\\;#s', \n\t\t\t\t \"$replace\", $source);\n\n\tif ($handle = @fopen('includes/config.php', 'w')) {\n\t\tfwrite($handle, $new_source);\n\t\tfclose($handle);\n\t\treturn TRUE;\n\t}\n\telse\n\t\treturn FALSE;\n}", "public function getConfigurationExample() {\n\t\treturn '\nstorage = tce\nstorage {\n\tdontUpdateFields = password\n\tdontUsePidForKeyField = 0\n\t\n\t# only update existing records but dont create new ones\n\t# dontAllowInserts = 1\n\t\n\t# needed for ordering records in TYPO3\n\t// moveAfterField = myFunnyFieldWithUIDofpreviousRecord\n\t\n\t# if set to 1, deleted records will be reactivated when they get imported again\n\treactivateDeletedRecords = 0\n}';\n\t}", "public function doubleQuoteValue($value) {\n\t\t$value = addcslashes(\n\t\t\t$value,\n\t\t\timplode('', static::DOUBLE_QUOTED_MUST_ESCAPE)\n\t\t);\n\t\treturn '\"' . $value . '\"';\n\t}", "public function save()\n\t{\n\t\t$h = fopen(WEBDEV_CONFIG_FILE, 'w');\n\t\tfwrite($h, \"<?php\\n return \" .var_export($this->config->all(), true) .';');\n\t\tfclose($h);\n\t}", "protected function getConfigFileName() {\n return $this->sourceName.\"-\".$this->_cnfName;\n }", "function quote( $string, $quotes = false ) {\r\n return $this->link->quote( ( $quotes )? stripslashes( $string ) : $string, null, true, true );\r\n }", "public function __toString()\n {\n $s = \"\";\n if ($this->sections != null) {\n foreach ($this->sections as $section => $name) {\n $s.= sprintf(\"[%s]\\n\", $section);\n if (is_array($name)) {\n foreach ($name as $key => $val) {\n $s.= sprintf(\"\\t%s = %s\\n\", $key, $val);\n }\n }\n }\n return $s;\n }\n if (!isset($this->filename)) {\n throw new Config_Lite_RuntimeException(\n 'Did not read a Configuration File.'\n );\n }\n return $s;\n }", "public function quote($string)\n {\n return $string;\n }", "public function config_print() {\n\t\t// 6th = image HTML\n\t\t$this->config_print_engine('s3generic', 'S3', __('S3 (Compatible)', 'updraftplus'), 'S3', '', '', true);\n\t}", "public function renderJSConfig() {\n\t\n\t\t$config = $this->wire('config'); \n\t\n\t\t$jsConfig = $config->js();\n\t\t$jsConfig['debug'] = $config->debug;\n\t\n\t\t$jsConfig['urls'] = array(\n\t\t\t'root' => $config->urls->root, \n\t\t\t'admin' => $config->urls->admin, \n\t\t\t'modules' => $config->urls->modules, \n\t\t\t'core' => $config->urls->core, \n\t\t\t'files' => $config->urls->files, \n\t\t\t'templates' => $config->urls->templates,\n\t\t\t'adminTemplates' => $config->urls->adminTemplates,\n\t\t\t); \n\t\n\t\treturn \"var config = \" . json_encode($jsConfig);\n\t}", "private function quoteVar($in)\n\t{\n\t\treturn sprintf('\"%s\"', $in);\n\t}", "public function meta_quote($arg) {\n if (is_array($arg)) {\n $Q_args = array();\n foreach ($arg as $item) {\n $Q_args[] = $this -> meta_quote($item);\n }\n return \"(\".implode(\" , \",$Q_args).\")\";\n }\n else {\n return \"`\".str_replace('.','`.`',$arg).\"`\";\n }\n }", "protected function enclosureCharacter () : string {\n return '\"';\n }", "public function getIncludeQuote()\n {\n return $this->include_quote;\n }", "public function getIncludeQuote()\n {\n return $this->include_quote;\n }", "function privSwapBackMagicQuotes()\n {\n }", "function script_concat_settings()\n {\n }", "protected function _getEnclosure() {\n\t\treturn '\"';\n\t}", "function quote($s) { \n return \"'\".str_replace('\\\\\"', '\"', addslashes($s)).\"'\"; \n }", "function smartaddslashes($str) {\n\t\tif ( get_magic_quotes_gpc() == false ) {\n\t\t\t$str = addslashes( $str );\n\t\t}\n\t\treturn $str;\n\t}", "protected function con() {\n // must have space after it\n return 'CON ';\n }", "private function quote($string)\n {\n return \"'\" . addcslashes($string, \"'\") . \"'\";\n }", "function escape($inString) {\r\n\t\treturn str_replace('\"', '\\\"', $inString);\r\n\t}", "function escape_cron () {\n global $CFG;\n\n return true;\n}", "function Event_Config_File()\n {\n return join(\"/\",array($this->Event_Config_Path,$this->Event_Config_File));\n }", "public function testUrlOptionQuotes()\n {\n $this->assertProduces('text [url=\"http://example.com/?a=b&c=d\"]this is a \"link\"[/url]', 'text <a href=\"http://example.com/?a=b&amp;c=d\">this is a &quot;link&quot;</a>');\n }", "public function render()\n {\n Admin::script($this->script());\n\n $setting = trans('admin.setting');\n\n return <<<EOT\n \n<div class=\"pull-right\">\n<a href=\"{$this->grid->resource()}/setting\" class=\"btn btn-sm btn-success grid-setting\" title=\"$setting\"><i class=\"fa fa-gear\"></i><span class=\"hidden-xs\"> $setting</span></a>\n</div>\nEOT;\n }", "public function addSlashes(&$value){\nreturn $value = \"'$value'\";\n}", "public function formatConfig(){\r\n\t\tforeach($this->template as $k=>$v){\r\n\t\t\tif(preg_match('/{\\s+\\#/', $v, $matches)){\r\n\t\t\t\t$this->config_lines = ($k+1);\r\n\t\t\t\t$this->error_notice[($k+1)] = 'Config format error: The blank is not allowed with \\'{\\' near '.$matches[0].' in '.$this->template_file.$this->template_postfix.' on line '.($k+1);\r\n\t\t\t}\r\n\t\t\tif(preg_match('/\\#\\s+}/', $v, $matches)){\r\n\t\t\t\t$this->config_lines = ($k+1);\r\n\t\t\t\t$this->error_notice[($k+1)] = 'Config format error: The blank is not allowed with \\'}\\' near '.$matches[0].' in '.$this->template_file.$this->template_postfix.' on line '.($k+1);\r\n\t\t\t}\r\n\t\t\tif(preg_match('/{#\\s+(\\w+)#}/', $v, $matches)){\r\n\t\t\t\t$this->config_lines = ($k+1);\r\n\t\t\t\t$this->error_notice[($k+1)] = 'Config format error: The blank is not allowed with \\'{#\\' near '.$matches[0].' in '.$this->template_file.$this->template_postfix.' on line '.($k+1);\r\n\t\t\t}\r\n\t\t\tif(preg_match('/{#(\\w+)\\s+#}/', $v, $matches)){\r\n\t\t\t\t$this->config_lines = ($k+1);\r\n\t\t\t\t$this->error_notice[($k+1)] = 'Config format error: The blank is not allowed with \\'#}\\' near '.$matches[0].' in '.$this->template_file.$this->template_postfix.' on line '.($k+1);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function admin_custom_config()\n {\n\n $db = DataAccess::GetInstance();\n\n $tpl = new geoTemplate('admin');\n\n $tpl->assign('payment_type', self::gateway_name);\n\n $tpl->assign('commonAdminOptions', $this->_showCommonAdminOptions());\n\n $values['sid'] = geoString::specialChars($this->get('sid'));\n $values['secret'] = geoString::specialChars($this->get('secret'));\n $tpl->assign('values', $values);\n\n $responseURL = self::_getResponseURL();\n $tpl->assign('responseURL', $responseURL);\n //store the response url in the registry so it only has to be derived once\n $this->set('responseURL', $responseURL);\n $this->serialize();\n\n return $tpl->fetch('payment_gateways/twocheckout.tpl');\n }", "function cs_footer_settings() {\n global $cs_theme_option;\n echo htmlspecialchars_decode($cs_theme_option['analytics']);\n}", "public function __toString() {\n\t\t$ostr = '===================================================' . \"\\n\";\n\t\t$ostr .= '| netxConfig Object |' . \"\\n\";\n\t\t$ostr .= '===================================================' . \"\\n\";\n\t\t$ostr .= ' Username: ' . $this->netxUsername . \"\\n\";\n\t\t$ostr .= ' Password: ' . $this->netxPassword . \"\\n\";\n\t\t$ostr .= ' Host name: ' . $this->netxHostname . \"\\n\";\n\t\t$ostr .= ' HTTP Log Turned On? ' . (($this->httpLoggingOn) ? \"yes\" : \"no\") . \"\\n\";\n\t\t$ostr .= ' HTTP Log Path: ' . $this->httpLogPath . \"\\n\";\n\t\t$ostr .= ' API Log Turned On? ' . (($this->apiLoggingOn) ? \"yes\" : \"no\") . \"\\n\";\n\t\t$ostr .= ' API Log Path: ' . $this->apiLogPath . \"\\n\";\n\t\t$ostr .= ' Files Path: ' . $this->uploadPath . \"\\n\";\n\t\t$ostr .= 'Delete files after NetX Import? ' . (($this->deleteAfterImport) ? \"yes\" : \"no\") . \"\\n\";\n\t\t$ostr .= ' Cache Lifetime: ' . $this->cacheLifetime . \"\\n\";\n\t\t$ostr .= ' Cache Path: ' . $this->cacheDirectory . \"\\n\";\n\t\t$ostr .= ' Is caching on? ' . (($this->cachingFlag) ? \"yes\" : \"no\") . \"\\n\";\n\t\t$ostr .= '===================================================' . \"\\n\";\n\t\treturn $ostr;\n\t}" ]
[ "0.6332523", "0.62850296", "0.6124192", "0.6039647", "0.5989027", "0.5978696", "0.5957611", "0.583147", "0.58181745", "0.58175284", "0.5789202", "0.57187307", "0.56831586", "0.56153107", "0.55616164", "0.55193055", "0.5510798", "0.54999834", "0.54973906", "0.548826", "0.54634875", "0.54574704", "0.5418015", "0.5415457", "0.5406486", "0.5395569", "0.53728163", "0.5369167", "0.5358237", "0.5352758", "0.535037", "0.53369385", "0.53254485", "0.53202397", "0.53023726", "0.5295801", "0.5295166", "0.5293027", "0.5289896", "0.52876467", "0.52825207", "0.52569336", "0.5250971", "0.52498066", "0.52282155", "0.5209323", "0.5206717", "0.52042884", "0.5201966", "0.5199123", "0.51985526", "0.51867807", "0.5184476", "0.51774013", "0.51709586", "0.5161917", "0.5159315", "0.5159315", "0.5143441", "0.51377535", "0.51377535", "0.51377535", "0.5133225", "0.513171", "0.51316994", "0.51267457", "0.5124966", "0.5123457", "0.5120297", "0.5119946", "0.51082015", "0.51049095", "0.50958896", "0.50843203", "0.5084054", "0.5066503", "0.5065979", "0.5062679", "0.5049992", "0.50480103", "0.5047768", "0.5047253", "0.5044441", "0.5044441", "0.5032087", "0.50315654", "0.5031161", "0.5029329", "0.50286734", "0.50252044", "0.50169456", "0.5012156", "0.5011172", "0.5009359", "0.5004457", "0.5001854", "0.5001747", "0.5000334", "0.4999305", "0.49989805", "0.4989495" ]
0.0
-1
install ready to use badge icons
function installBadgeIcons($root_dir) { $cert_default_dir = $root_dir . "/template/default/img/game"; foreach (glob("$cert_default_dir/*.png") as $icon) { $iconname = preg_replace('|.*/(.*)\.png|', '$1', $icon); $filename = $iconname . '.png'; if (!copy($icon, $root_dir . BADGE_TEMPLATE_PATH . $filename)) { die("Error copying badge icon!"); } Database::get()->query("INSERT INTO badge_icon (name, description, filename) VALUES (?s, '', ?s)", $iconname, $filename); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function buildCssAndRegisterIcons() {}", "function load_icons() {\n themify_get_icon( 'ti-import' );\n themify_get_icon( 'ti-export' );\n Themify_Enqueue_Assets::loadIcons();\n }", "public function get_icon() {\n return 'eicon-heading apr-badge';\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}", "private function set_update_badge() {\n\t\tglobal $submenu;\n\t\t$updates = get_site_transient( 'mscr_update' );\n\n\t\tif ( $updates === false OR empty( $updates['updates'] ) )\n\t\t\treturn;\n\n\t\tif ( ! isset( $submenu['index.php'] ) )\n\t\t\treturn;\n\n\t\t$update_count = count( $updates['updates'] );\n\t\t$existing_count = 0;\n\n\t\t// Find the update-core submenu\n\t\tforeach ( $submenu['index.php'] as &$item ) {\n\t\t\tif ( isset( $item[2] ) && $item[2] == 'update-core.php' ) {\n\t\t\t\t// Is there already an update badge? Get existing update count\n\t\t\t\tif ( strpos( $item[0], '<span' ) !== false ) {\n\t\t\t\t\t$existing_count = preg_replace( '/.+?<span\\b[^>]*><span\\b[^>]*>(\\d+)<\\/span><\\/span>/', '$1', $item[0] );\n\t\t\t\t}\n\n\t\t\t\t$update_count += (int) $existing_count;\n\t\t\t\t$update_title = sprintf( _n( '%d Update', '%d Updates', $update_count, 'mute-screamer' ), $update_count );\n\t\t\t\t$item[0] = sprintf( __( 'Updates %s', 'mute-screamer' ), \"<span class='update-plugins count-$update_count' title='$update_title'><span class='update-count'>\" . number_format_i18n( $update_count ) . '</span></span>' );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "protected function establish_icon() {\n\t\t$this->icon = \"<i class='sw swp_{$this->key}_icon'></i>\";\n\t}", "function atom_site_icon()\n {\n }", "protected function collectTcaSpriteIcons() {}", "function addIcon($i){\n return $this->add('Icon',null,'Icon')->set($i)->addClass('atk-size-mega');\n }", "public static function getFactoryIconUseIt() {\n }", "public function getBadge()\n {\n }", "public function getIconReturnsReplacementIconWhenDeprecatedDataProvider() {}", "protected function registerTCAIcons() {}", "function install(){}", "public function registerPluginTriggersAddPluginWhichSetsPluginIconPathIfIconPathIsGiven() {}", "function rss2_site_icon()\n {\n }", "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 getAvailableIconNames() ;", "function install() {}", "public function registerFontBox(){\n\t\t$param = WPBMap::getParam( 'vc_icon', 'type' );\n\t\t\n\t\t$param['value'][$this->getIconHeader()] = $this->getIconLib();\n\t\tvc_update_shortcode_param( 'vc_icon', $param );\n\t}", "function install()\n {\n }", "function libravatar_install()\n{\n\tHook::register('load_config', 'addon/libravatar/libravatar.php', 'libravatar_load_config');\n\tHook::register('avatar_lookup', 'addon/libravatar/libravatar.php', 'libravatar_lookup');\n\tLogger::notice(\"registered libravatar in avatar_lookup hook\");\n}", "function wp_site_icon()\n {\n }", "function insta_f_install(){\n}", "protected function afterInstall()\n {\n }", "public function getIcon()\n {\n }", "public function getIcon() {}", "function TS_VCSC_Add_Icons_Element_Lean() {\r\n\t\t\t\tvc_lean_map('TS-VCSC-Font-Icons', \t\t\t\t\t\t\tarray($this, 'TS_VCSC_Add_Icons_Element'), null);\r\n\t\t\t}", "function screen_icon()\n {\n }", "function add_galleries_icon() {\n\n\t\t$plugin_css = plugin_dir_url( __FILE__ ) . '/css/admin-style.css';\n\n\t\twp_register_style( 'admin-style', $plugin_css );\n\n\t\twp_enqueue_style( 'admin-style' );\n\t}", "public function install() {\r\n \r\n }", "public function install() {\n\n\n }", "public function get_icon() {\n return 'fa fa-plug';\n }", "public function get_icon() {\n return 'fa fa-plug';\n }", "public function get_icon() {\n return 'fa fa-plug';\n }", "public function getAvailableIconNames() {}", "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 }", "public function install()\n {\n }", "public function install()\n {\n }", "protected function install(){ return true;}", "public function install()\n {\n Configuration::updateValue('MF_TITLE', 'Our Favourite Brands');\n Configuration::updateValue('MF_DESCRIPTION', 'Browse our favourite brands');\n Configuration::updateValue('MF_MAN_NUMBER', 0);\n Configuration::updateValue('MF_PER_ROW_DESKTOP', 4);\n Configuration::updateValue('MF_PER_ROW_TABLET', 3);\n Configuration::updateValue('MF_PER_ROW_MOBILE', 1);\n Configuration::updateValue('MF_MAN_ORDER', 'name_asc');\n Configuration::updateValue('MF_SHOW_MAN_NAME', 0);\n\n return parent::install() &&\n $this->registerHook('header') &&\n $this->registerHook('displayHome');\n }", "function install_theme_information()\n {\n }", "function _kalatheme_font_icon($name, $bundle = NULL, $attr = array(), $resolvePrefix = TRUE){\n if($bundle === NULL){\n $bundle = theme_get_setting('icon_font_library');\n }\n // Find the icon prefix\n if($resolvePrefix){\n switch($bundle){\n case('font_awesome'):\n $name = 'fa-' . $name;\n break;\n case('bootstrap_glyphicons'):\n $name = 'glyphicon-' . $name;\n break;\n }\n }\n\n $output = NULL;\n if (module_exists('icon')){\n $output = theme('icon', array(\n 'bundle' => $bundle,\n 'icon' => $name,\n 'attributes' => $attr\n ));\n }\n if($output === NULL){\n $attr = array();\n $attr += array('aria-hidden' => 'true' );\n $attr['class'] = array();\n\n if($bundle === 'font_awesome'){\n $attr['class'][] = 'fa';\n }\n elseif($bundle === 'bootstrap_glyphicons'){\n $attr['class'][] = 'glyphicon';\n }\n\n\n $attr['class'][] = $name;\n $output = '<span '. drupal_attributes($attr) . '></span>';\n }\n return $output;\n}", "public function icon ( )\n\t{\n\t\treturn Array( 'id' => $this->id,\t// shoud be consistent with what is passed to _uicmp_stuff_fold class\n\t\t\t\t\t 'title' => $this->messages['icon'] );\n\t}", "protected function markModuleAsInstalled()\n {\n Mongez::updateStorageFile();\n }", "public static function install(){\n\t}", "public function afterInstall()\n\t{}", "public function install(){\r\n\t\t\r\n\t}", "public function admin_enqueue_fontawesomeBlock(){\n\t\t}", "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 function registerPluginTriggersAddPluginWhichSetsPluginIconPathIfUsingUpperCameCasedExtensionNameAndIconPathNotGiven() {}", "public function preInstall()\n {\n }", "public function __construct() {\n\t\t\t$this->register_badges();\n\t\t}", "protected function get__badge()\n\t{\n\t\tif ( $this->deleteOrMoveQueued() === TRUE )\n\t\t{\n\t\t\treturn array(\n\t\t\t\t0\t=> 'ipsBadge ipsBadge_intermediary',\n\t\t\t\t1\t=> 'node_move_delete_queued',\n\t\t\t);\n\t\t}\n\t\t\n\t\treturn NULL;\n\t}", "function loadIcon16($name) {\n echo \"<img src=\\\"icos/16-$name.png\\\" alt=\\\"\\\" width=\\\"16\\\" height=\\\"16\\\">\";\n }", "public function onGetIcons($context)\n\t{\n\t\tif (!$this->shouldDisplayMessage())\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$supportStatus = $this->getPhpSupport();\n\n\t\tif ($supportStatus['status'] !== self::PHP_SUPPORTED)\n\t\t{\n\t\t\t// Enqueue the notification message; set a warning if receiving security support or \"error\" if unsupported\n\t\t\tswitch ($supportStatus['status'])\n\t\t\t{\n\t\t\t\tcase self::PHP_SECURITY_ONLY:\n\t\t\t\t\t$this->app->enqueueMessage($supportStatus['message'], 'warning');\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase self::PHP_UNSUPPORTED:\n\t\t\t\t\t$this->app->enqueueMessage($supportStatus['message'], 'error');\n\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "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}", "function getFlagIcon ($aFlags, $icon_theme_path) {\n /**\n * 0 = unseen\n * 1 = seen\n * 2 = deleted\n * 3 = deleted seen\n * 4 = answered\n * 5 = answered seen\n * 6 = answered deleted\n * 7 = answered deleted seen\n * 8 = flagged\n * 9 = flagged seen\n * 10 = flagged deleted\n * 11 = flagged deleted seen\n * 12 = flagged answered\n * 13 = flagged aswered seen\n * 14 = flagged answered deleted\n * 15 = flagged anserwed deleted seen\n * ...\n * 32 = forwarded\n * 33 = forwarded seen\n * 34 = forwarded deleted\n * 35 = forwarded deleted seen\n * ...\n * 41 = flagged forwarded seen\n * 42 = flagged forwarded deleted\n * 43 = flagged forwarded deleted seen\n */\n\n /**\n * Use static vars to avoid initialisation of the array on each displayed row\n */\n global $nbsp;\n static $flag_icons, $flag_values;\n if (!isset($flag_icons)) {\n // This is by no means complete...\n $flag_icons = array ( \n // Image icon name Text Icon Alt/Title Text\n // --------------- --------- --------------\n array ('msg_new.png', $nbsp, '('._(\"New\").')') ,\n array ('msg_read.png', $nbsp, '('._(\"Read\").')'),\n // i18n: \"D\" is short for \"Deleted\". Make sure that two icon strings aren't translated to the same character (only in 1.5).\n array ('msg_new_deleted.png', _(\"D\"), '('._(\"Deleted\").')'),\n array ('msg_read_deleted.png', _(\"D\"), '('._(\"Deleted\").')'),\n // i18n: \"A\" is short for \"Answered\". Make sure that two icon strings aren't translated to the same character (only in 1.5).\n array ('msg_new_reply.png', _(\"A\"), '('._(\"Answered\").')'),\n array ('msg_read_reply.png', _(\"A\"), '('._(\"Answered\").')'),\n array ('msg_new_deleted_reply.png', _(\"D\"), '('._(\"Answered\").')'),\n array ('msg_read_deleted_reply.png', _(\"D\"), '('._(\"Answered\").')'),\n // i18n: \"F\" is short for \"Flagged\". Make sure that two icon strings aren't translated to the same character (only in 1.5).\n array ('flagged.png', _(\"F\"), '('._(\"Flagged\").')'),\n array ('flagged.png', _(\"F\"), '('._(\"Flagged\").')'),\n array ('flagged.png', _(\"F\"), '('._(\"Flagged\").')'),\n array ('flagged.png', _(\"F\"), '('._(\"Flagged\").')'),\n array ('flagged.png', _(\"F\"), '('._(\"Flagged\").')'),\n array ('flagged.png', _(\"F\"), '('._(\"Flagged\").')'),\n array ('flagged.png', _(\"F\"), '('._(\"Flagged\").')'),\n array ('flagged.png', _(\"F\"), '('._(\"Flagged\").')'),\n FALSE,\n FALSE,\n FALSE,\n FALSE,\n FALSE,\n FALSE,\n FALSE,\n FALSE,\n FALSE,\n FALSE,\n FALSE,\n FALSE,\n FALSE,\n FALSE,\n FALSE,\n FALSE,\n // i18n: \"O\" is short for \"Forwarded\". Make sure that two icon strings aren't translated to the same character (only in 1.5).\n array ('msg_new_forwarded.png', _(\"O\"), '('._(\"Forwarded\").')'),\n array ('msg_read_forwarded.png', _(\"O\"), '('._(\"Forwarded\").')'),\n array ('msg_new_deleted_forwarded.png', _(\"D\"), '('._(\"Forwarded\").')'),\n array ('msg_read_deleted_forwarded.png', _(\"D\"), '('._(\"Forwarded\").')'),\n FALSE,\n FALSE,\n FALSE,\n FALSE,\n FALSE,\n array ('flagged.png', _(\"F\"), '('._(\"Flagged\").')'),\n array ('flagged.png', _(\"F\"), '('._(\"Flagged\").')'),\n array ('flagged.png', _(\"F\"), '('._(\"Flagged\").')'),\n );\n \n $flag_values = array('seen' => 1,\n 'deleted' => 2,\n 'answered' => 4,\n 'flagged' => 8,\n 'draft' => 16,\n 'forwarded' => 32);\n }\n\n /**\n * The flags entry contain all items displayed in the flag column.\n */\n $icon = '';\n\n $index = 0;\n foreach ($aFlags as $flag => $flagvalue) {\n switch ($flag) {\n case 'deleted':\n case 'answered':\n case 'forwarded':\n case 'seen':\n case 'flagged': if ($flagvalue) $index += $flag_values[$flag]; break;\n default: break;\n }\n }\n \n if (!empty($flag_icons[$index])) {\n $data = $flag_icons[$index];\n } else {\n//FIXME: previously this default was set to the last value of the $flag_icons array (when it was index 15 - flagged anserwed deleted seen) but I don't understand why... am changing it to flagged (index 15 just shows (only) the flag icon anyway)\n $data = $flag_icons[8]; // default to just flagged\n }\n\n $icon = getIcon($icon_theme_path, $data[0], $data[1], $data[2]);\n return $icon;\n}", "public function registerPluginTriggersAddPluginWhichSetsPluginIconPathIfUsingUnderscoredExtensionNameAndIconPathNotGiven() {}", "protected function setupAssetsInfo() {\n JQuery::registerJQuery();\n $this->addYiiGemsCommonCss();\n $this->addFontAwesomeCss();\n $this->addAssetInfo(\n \"ribbon.css\",\n dirname(__FILE__) . \"/assets\"\n );\n $this->addGradientAssets($this->barGradient);\n }", "function av_backend_icon($params)\n{\n\treturn avia_font_manager::backend_icon($params);\n}", "function TS_VCSC_IconFontsRequired() {\r\n\t\t\tif (($this->TS_VCSC_PluginFontSummary == \"true\") || ($this->TS_VCSC_VisualComposer_Loading == \"true\") || ($this->TS_VCSC_VCFrontEditMode == \"true\") || ($this->TS_VCSC_Icons_Compliant_Loading == \"true\") || ($this->TS_VCSC_IconicumMenuGenerator == \"true\")) {\r\n\t\t\t\t$this->TS_VCSC_IconFontsArrays(false);\r\n\t\t\t}\r\n\t\t}", "function notice_installation()\n\t{\n\t\tSession::notice(_t(\"You have addons ready for installation.\", __CLASS__) . \" <a href='\" . URL::get( 'admin', array(\"page\" => \"plugins\")) . \"#for_installation'>\" . _t(\"Go to list\", __CLASS__) . \"</a>\", 'addons_installnotice');\n\t}", "function cloudfw_wc_badge( $location = '' ) {\n\tglobal $post, $product;\n\n\t$badge = ''; \n\tif ( ! $product->is_in_stock() ) {\n\t\t$badge = '<span class=\"out-of-stock-badge\">'. cloudfw_translate( 'wc.loop.badge.out_of_stock' ) .'</span>';\n\t} elseif ( $product->price === '0' || $product->price === 0 ) {\n\t\t$badge = '<span class=\"free-badge\">'. cloudfw_translate( 'wc.loop.badge.free' ) .'</span>';\n\t} elseif ($product->is_on_sale()) {\n\t\t$badge = apply_filters('woocommerce_sale_flash', '<span class=\"onsale\">'. cloudfw_translate( 'wc.loop.badge.sale' ) .'</span>', $post, $product);\n\t}\n\n\tif ( !empty( $badge ) ) {\n\t\tif ( $location == 'loop' ) {\n\t\t\t$badge = '<span class=\"ui--wc-badge\">'. $badge .'</span>';\n\t\t}\n\t}\n\n\treturn $badge;\n\n}", "public function icon($icon);", "function update_nag()\n {\n }", "public function statusBadge() {\n return \"<label class='badge badge-{$this->status->css_class}'> &bullet; {$this->status->name}</label>\";\n }", "public function action_update_check()\n\t{\n\t\tUpdate::add('Ohloh Badge', '42aaa113-4285-42ef-a811-3eb4281cee7c', $this->info->version);\n\t}", "function register_block_core_site_icon_setting()\n {\n }", "public function install();", "public function install();", "public function get_git_icon( $file, $add_padding ) {\n\t\t$type = str_contains( current_filter(), 'plugin' ) ? 'plugin' : 'theme';\n\t\t$type_cap = ucfirst( $type );\n\t\t$filepath = 'plugin' === $type ? WP_PLUGIN_DIR . \"/$file\" : get_theme_root() . \"/$file/style.css\";\n\n\t\t$git['headers'] = [ \"GitHub{$type_cap}URI\" => \"GitHub {$type_cap} URI\" ];\n\t\t$git['icons'] = [ 'github' => basename( dirname( __DIR__, 2 ) ) . '/assets/github-logo.svg' ];\n\n\t\t$git = apply_filters( 'gu_get_git_icon_data', $git, $type_cap );\n\n\t\t// Skip on mu-plugins or drop-ins.\n\t\t$file_data = file_exists( $filepath ) ? get_file_data( $filepath, $git['headers'] ) : [];\n\n\t\t/**\n\t\t * Filter to add plugins not containing appropriate header line.\n\t\t * Insert repositories added via Git Updater Additions plugin.\n\t\t *\n\t\t * @since 10.0.0\n\t\t * @access public\n\t\t * @link https://github.com/afragen/git-updater-additions\n\t\t *\n\t\t * @param array Listing of plugins/themes to add.\n\t\t * Default null.\n\t\t * @param array Listing of all plugins/themes.\n\t\t * @param string $type Type being passed, plugin|theme'.\n\t\t */\n\t\t$additions = apply_filters( 'gu_additions', null, [], $type );\n\n\t\t/**\n\t\t * Filter to add plugins not containing appropriate header line.\n\t\t * Insert repositories added via Git Updater Additions plugin.\n\t\t *\n\t\t * @since 5.4.0\n\t\t * @access public\n\t\t * @link https://github.com/afragen/git-updater-additions\n\t\t *\n\t\t * @param array Listing of plugins/themes to add.\n\t\t * Default null.\n\t\t * @param array Listing of all plugins/themes.\n\t\t * @param string $type Type being passed, plugin|theme'.\n\t\t */\n\t\t$additions = null === $additions ? apply_filters_deprecated( 'github_updater_additions', [ null, [], $type ], '10.0.0', 'gu_additions' ) : $additions;\n\n\t\tforeach ( (array) $additions as $slug => $headers ) {\n\t\t\tif ( $slug === $file ) {\n\t\t\t\t$file_data = array_merge( $file_data, $headers );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tforeach ( $file_data as $key => $value ) {\n\t\t\tif ( ! empty( $value ) ) {\n\t\t\t\t$githost = str_replace( \"{$type_cap}URI\", '', $key );\n\t\t\t\t$padding = is_rtl() ? 'padding-left: 6px;' : 'padding-right: 6px;';\n\t\t\t\t$icon = sprintf(\n\t\t\t\t\t'<img src=\"%1$s\" style=\"vertical-align:text-bottom;%2$s\" height=\"16\" width=\"16\" alt=\"%3$s\" />',\n\t\t\t\t\tplugins_url( $git['icons'][ strtolower( $githost ) ] ),\n\t\t\t\t\t$add_padding ? $padding : '',\n\t\t\t\t\t$githost\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn $icon ?? null;\n\t}", "function showmybadgeimage($badge,$userrole){\n\tglobal $DB, $CFG;\n\t$content ='';\n\t$context = frmget_context();\n\t$imageurl = moodle_url::make_pluginfile_url($context->id, 'badges', 'badgeimage', $badge->badgeid, '/', 'f1', false);\n\t$content.= html_writer::start_tag('div', array('class'=>'badges width50'));\n\t$content.= html_writer::start_tag('div', array('class' => 'badge-image'));\n\t$content.= html_writer::empty_tag('img', array('src' => $imageurl));\n\t$content.= html_writer::end_tag('div');\n\t$content.= html_writer::start_tag('div', array('class' => 'badgedetail width66'));\n\t$content.= html_writer::tag('span', $badge->name, array('class' => 'badge-name'));\n\t$content.= '<br>'.$badge->description.'</br></br>';\n\t$content.= html_writer::end_tag('div');\n\t//Project Details\n\tif($userrole==\"student\"){\n\t\t$content.= html_writer::start_tag('div', array('class' => 'badgedetail width66'));\n\t\t$content.='<span class=\"badge-name\">Innovation: </span><span>'.$badge->fullname.'</span></br>';\n\t\t$content.='<span class=\"badge-name\">Awarded By: </span><span>'.$badge->issuername.'</span></br>';\n\t\t$content.='<span class=\"badge-name\">Award Date: </span><span>'.$badge->createddate.'</span>';\n\t\t$content.= html_writer::end_tag('div');\n\t}\n\t$content.= html_writer::end_tag('div');\n\t\n\treturn $content;\n}", "protected function setupAssetsInfo() {\n JQuery::registerJQuery();\n $this->addYiiGemsCommonCss();\n $this->addFontAwesomeCss();\n $this->addAssetInfo( \"buttonBar.css\", dirname(__FILE__) . \"/assets\" );\n $this->addGradientAssets(array(\n $this->gradient, $this->hoverGradient,\n $this->activeGradient, $this->selectedGradient,\n $this->separatorGradient, $this->selectedColor\n ));\n }", "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 install()\n {\n $this->initConfig();\n $this->loadConfig();\n $this->config['installed']=ASTAT_VERSION2;\n $this->config['newInstall']='y';\n $this->saveConfig();\n\n GPCCore::register($this->getPluginName(), ASTAT_VERSION, ASTAT_GPC_NEEDED);\n\n return(true);\n }", "public function install()\n {\n $this->installClasses();\n $this->command();\n $this->markInstalled();\n //or call parent::install(); \n }", "function plugin_geticon_nexmenu()\n{\n global $_CONF;\n\n return $_CONF['layout_url'] .'/nexmenu/images/admin/nexmenu.gif';\n}", "public function getIcon();", "public function getIcon();", "function iron_icon_shortcode( $atts ) {\n $a = shortcode_atts( array(\n\t\t'icon' => '',\n\t\t'color' => '',\n\t\t'size' => 24\n ), $atts );\n\t\n\t$icon = explode(':',$a['icon']);\n\tif(empty($icon[1])) {\n\t\t$icon[1] = $icon[0];\n\t\t$icon[0] = 'iron';\n\t} elseif($icon[0] === 'icons')\n\t\t$icon[0] = 'iron';\n\t\t\n\t$icon_svg = plugins_url(\"icons/{$icon[0]}.svg\",__FILE__);\t\n\t$color = empty($a['color']) ? 'currentColor' : $a['color'];\n\t$style = \" style=\\\"fill:{$color}\\\"\";\t\n\t\n\t$size = 0+$a['size'];\n\t$s = $size / 24;\n\t\n\t$uses = \"<use x='0' y='0' transform='scale($s)' xlink:href='{$icon_svg}#{$icon[1]}' $style/>\";\n return \"<svg width='$size' height='$size' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'>$uses</svg>\";\n}", "function install_themes_dashboard()\n {\n }", "function plugin_geticon_bad_behavior2 ()\n{\n global $_CONF;\n\n return $_CONF['site_url'] . '/' . BAD_BEHAVIOR_PLUGIN\n . '/images/bad_behavior2.png';\n}", "protected function get__icon()\n\t{\n\t\treturn 'coffee';\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 special_notifications_init() {\n \t\n // register extra css\n elgg_extend_view('elgg.css', 'special_notifications/special_notifications.css');\n\n // register hook for checking event which are available this plugin\n $sn = array('profile_location');\n foreach ($sn as $item) {\n elgg_register_plugin_hook_handler('special_notifications:config', 'notify', \"snotify_$item\");\n }\n \n // get available active checking event and register a hook, so they can be triggered\n $special_notifications = elgg_trigger_plugin_hook('special_notifications:config', 'notify', null, []);\n foreach ($special_notifications as $key => $sn) {\n if ($sn['active']) {\n elgg_register_plugin_hook_handler('special_notifications', 'user', \"special_notification_\".$sn['hook']);\n }\n }\n\n}", "public function beforeInstall()\n\t{}", "function install($parent) \n {\n self::generateSocialColorPalette();\n self::createImageDirectory(\"instagram\");\n self::createImageDirectory(\"facebook\");\n self::createImageDirectory(\"storify\");\n $parent->getParent()->setRedirectURL('index.php?option=com_activategrid');\n }", "function get_screen_icon()\n {\n }", "public function getIconForResourceWithPngFileReturnsIcon() {}", "function install()\r\n\t {\r\n\t $result = $this->_getPackageFromUpload();\r\n\t if(empty($result))\r\n\t {\r\n\t $this->setRedirect('index.php?option=com_qrcode&layout=style', $result);\r\n\t }\r\n\t else\r\n\t {\r\n\t $this->setRedirect('index.php?option=com_qrcode&layout=style', $result);\r\n\t }\r\n \t}", "function news_icon() { ?>\n <style type=\"text/css\" media=\"screen\">\n #adminmenu .menu-icon-news div.wp-menu-image:before {\n content: \"\\f464\";\n }\n </style>\n <?php }", "public function set_data($badge) {\n $default_values = array();\n parent::set_data($badge);\n\n if (!empty($badge->id)) {\n $default_values['currentimage'] = print_badge_image($badge, $badge->get_context(), 'large');\n }\n\n parent::set_data($default_values);\n }", "function PKG_addSpecialPackages($amount,$client,$distr)\n{\n\t$count=0;\n\t//run thru the special checkbuttons\n\tfor ($i=0; $i < $amount; $i++)\n\t\t{\n\t\t\t$var=\"CB_specialPkg\".$i;\n\t\t\tif (!empty($_POST[$var]))\n\t\t\t{//add the apecial package to db\n\t\t\t\tPKG_addWait4AccJob($client,$_POST[$var],PKG_getSpecialPackagePriority($_POST[$var],$distr),\"\");\n\t\t\t\t$count++;\n\t\t\t}\n\t\t}\n\treturn($counter);\n}", "function base_admin_bar_add_custom_logo_bloom() {\n\t?>\n\t<style>\n\t#wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon::before {\n\t\tbackground-image: url('<?php echo esc_url( THEME_IMAGES ); ?>/logo-admin-branding.svg');\n\t\tbackground-size: 100%;\t\t\n\t\tbackground-position: center;\n\t\tbackground-repeat: no-repeat;\n\t\tcolor: transparent;\n\t}\n\t</style>\n\t<?php\n}", "public function install () {\n\t\t$this->_log_version_number();\n\t}", "function statusIcon() {\n\t\t// published, draft\n\t\t// page_white_clock.png\n\t\t// page_white_edit.png\n\n\t\tswitch ($this->status) {\n\t\t\tcase 'published':\n\t\t\t\t// varit, eller ska bli, publicerad?\n\t\t\t\t// $datePublish $dateUnpublish\n\t\t\t\tif ($this->isPublished()) {\n\t\t\t\t\treturn POLARBEAR_WEBPATH . 'images/silkicons/page_white_text.png';\n\t\t\t\t} else {\n\t\t\t\t\treturn POLARBEAR_WEBPATH . 'images/silkicons/page_white_text_clock.png';\n\t\t\t\t}\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase 'draft':\n\t\t\t\treturn POLARBEAR_WEBPATH . 'images/silkicons/page_white_text_edit.png';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn POLARBEAR_WEBPATH . 'images/silkicons/page_white_text.png';\n\t\t}\n\t\t\n\t}", "protected function iconHelp()\n {\n return 'For more icons please see <a href=\"http://fontawesome.io/icons/\" target=\"_blank\">http://fontawesome.io/icons/</a>';\n }", "function add_icon($items, $args) {\n if( $args->theme_location == 'menu-main' || $args->theme_location == 'menu-flyout' || $args->theme_location == 'menu-main-login' || $args->theme_location == 'menu-flyout-login' ){\n $items .= '<li class=\"menu-item tpr-shop-cart\">';\n $count = WC()->cart->cart_contents_count;\n $items .= '<a class=\"cart-contents\" href=\"'. wc_get_cart_url() .'\" title=\"View your shopping cart\"><span class=\"cart-header-icon\"></span>';\n\n \n \n $items .= '<span class=\"cart-contents-count\">'.$count.'</span>';\n \n \n $items .= '</a>'; \n $items .= '</li>';\n}\nreturn $items;\n}", "function getAchievementIcon($id)\n{\n\tglobal $wowhead_url;\n\t\n\t$data = getXML($wowhead_url . '?achievement=' . $id . '&power');\n\t\n\tif (preg_match('#icon: \\'(.+?)\\'#', $data, $match))\n\t{\n\t\t// icon found\n\t\treturn 'http://static.wowhead.com/images/icons/small/' . strtolower($match[1]) . '.jpg';\t\n\t}\n\telse\n\t{\n\t\treturn false;\t\n\t}\n}" ]
[ "0.59537673", "0.5934781", "0.5850528", "0.5798251", "0.5620138", "0.55884886", "0.55464894", "0.55138355", "0.54676574", "0.5447577", "0.54452413", "0.54320395", "0.5414563", "0.53973204", "0.53926295", "0.5387264", "0.53872377", "0.53843254", "0.53718793", "0.536857", "0.535334", "0.5352997", "0.52847785", "0.5250886", "0.5244997", "0.52426666", "0.52140874", "0.5201773", "0.51779234", "0.5174132", "0.5163766", "0.515791", "0.5144076", "0.5144076", "0.5144076", "0.5133242", "0.5117838", "0.5116628", "0.5116628", "0.5105793", "0.5096915", "0.50924295", "0.508479", "0.5077906", "0.5071949", "0.50627995", "0.5059773", "0.5052139", "0.50495654", "0.50407153", "0.5037873", "0.50254697", "0.50149125", "0.5011821", "0.5007554", "0.50014365", "0.5001086", "0.49985942", "0.49951732", "0.4988368", "0.49867058", "0.49792862", "0.49783105", "0.4975959", "0.497206", "0.49704456", "0.4962931", "0.4961856", "0.4960921", "0.4958787", "0.4958787", "0.49557397", "0.49553657", "0.49527654", "0.49472553", "0.49440646", "0.4938729", "0.4937087", "0.49217886", "0.49217886", "0.49155286", "0.4911673", "0.49053186", "0.49052677", "0.49025944", "0.48976424", "0.48943475", "0.4888361", "0.48790172", "0.48785785", "0.48739055", "0.4868435", "0.48596814", "0.48585242", "0.48533633", "0.4843553", "0.483971", "0.48392007", "0.48389384", "0.4816044" ]
0.659823
0
Should validate and set the native value.
abstract public function __construct($value);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function setValue($value);", "public function postHydrate(): void\n {\n if ('invalid' === $this->value) {\n $this->value = 'valid';\n }\n }", "final function set($value){\n if(is_object($value) and get_class($value)===get_class($this)){\n $this->value = $value->get();\n $this->isset = TRUE;\n return $this->_ok();\n }\n\n // use accept for type-check\n $this->isset = FALSE;\n $typ = $this->get_type($value,FALSE,FALSE);\n if($this->accept($value,$typ)!==TRUE) \n return $this->_err(array(3,strval($value)),FALSE);\n\n // get method responisble for this type\n $mth = 'set_' . (method_exists($this,'set_' . $typ)?$typ:'default');\n $res = $this->$mth($value);\n $this->isset = $this->isok();\n return $res;\n }", "protected function populate_value()\n {\n }", "abstract protected function validateValue($value);", "public function setRawValue($value) {\n\n $this->rawValue = $value;\n }", "public function setInvalid();", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValidate($value) { $this->_validate = $value; }", "function init()\n\t{\n\t\t$this->defineAttribute('value', false, true, COMPONENT_TYPE_BOOLEAN);\n\t\t$this->defineAttribute('connect', false, 0, COMPONENT_TYPE_INTEGER);\n\n\t\t// call the superclass for validate the attributes\n\t\tparent::init();\n\t}", "public function testValueIsSet()\n {\n $init = 'test';\n $str = new \\Pv\\PString($init);\n $value = $str->getValue();\n\n $this->assertEquals($value, $init);\n }", "protected function initValue($value): void\n {\n }", "public function sanitize_value(){\n if(is_string($this->value)){\n $json_value = json_decode($this->value, true);\n if(json_last_error() == JSON_ERROR_NONE)\n $this->value = $json_value;\n }\n }", "public function sanitize_value(){\n if(is_string($this->value)){\n $json_value = json_decode($this->value, true);\n if(json_last_error() == JSON_ERROR_NONE)\n $this->value = $json_value;\n }\n }", "public function beforeSave()\n {\n $value = $this->getValue();\n try {\n $this->validate($value);\n } catch (\\Magento\\Framework\\Exception\\LocalizedException $e) {\n $msg = __('%1', $e->getMessage());\n $error = new \\Magento\\Framework\\Exception\\LocalizedException($msg, $e);\n throw $error;\n }\n }", "function setValue($val) {\n\t\tif(empty($val)) {\n\t\t\t$this->value = null;\n\t\t\t$this->valueObj = null;\n\t\t} else {\n\t\t\t// Quick fix for overzealous Zend validation, its case sensitive on month names (see #5990)\n\t\t\tif(is_string($val)) $val = ucwords(strtolower($val));\n\t\t\t\n\t\t\tif($this->getConfig('dmyfields')) {\n\t\t\t\t// Setting in correct locale\n\t\t\t\tif(is_array($val) && $this->validateArrayValue($val)) {\n\t\t\t\t\t// set() gets confused with custom date formats when using array notation\n\t\t\t\t\t$this->valueObj = new Zend_Date($val, null, $this->locale);\n\t\t\t\t\t$this->value = $this->valueObj->toArray();\n\t\t\t\t}\n\t\t\t\t// load ISO date from database (usually through Form->loadDataForm())\n\t\t\t\telse if(!empty($val) && Zend_Date::isDate($val, $this->getConfig('datavalueformat'), $this->locale)) {\n\t\t\t\t\t$this->valueObj = new Zend_Date($val, $this->getConfig('datavalueformat'), $this->locale);\n\t\t\t\t\t$this->value = $this->valueObj->toArray();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$this->value = $val;\n\t\t\t\t\t$this->valueObj = null;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Setting in corect locale.\n\t\t\t\t// Caution: Its important to have this check *before* the ISO date fallback,\n\t\t\t\t// as some dates are falsely detected as ISO by isDate(), e.g. '03/04/03'\n\t\t\t\t// (en_NZ for 3rd of April, definetly not yyyy-MM-dd)\n\t\t\t\tif(!empty($val) && Zend_Date::isDate($val, $this->getConfig('dateformat'), $this->locale)) {\n\t\t\t\t\t$this->valueObj = new Zend_Date($val, $this->getConfig('dateformat'), $this->locale);\n\t\t\t\t\t$this->value = $this->valueObj->get($this->getConfig('dateformat'), $this->locale);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t// load ISO date from database (usually through Form->loadDataForm())\n\t\t\t\telse if(!empty($val) && Zend_Date::isDate($val, $this->getConfig('datavalueformat'))) {\n\t\t\t\t\t$this->valueObj = new Zend_Date($val, $this->getConfig('datavalueformat'));\n\t\t\t\t\t$this->value = $this->valueObj->get($this->getConfig('dateformat'), $this->locale);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$this->value = $val;\n\t\t\t\t\t$this->valueObj = null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function setValue($value);", "public function setValue($value);", "public function setValue($value);", "public function setValue($value);", "public function setValue($value);", "public function setValue($value);", "public function setValue($value);", "public function setValue($value);", "public function setValue($value);", "public function setValue($value);", "public function testValue(): void\n {\n $this->formModel->setAttribute('string', '1');\n $this->assertSame(\n '<input type=\"range\" id=\"typeform-string\" name=\"TypeForm[string]\" value=\"1\">',\n Range::widget()->config($this->formModel, 'string')->render(),\n );\n }", "public function set()\n {\n if ( ! $this->value ) {\n $this->generate();\n }\n }", "public function validate() {\n if (!empty($this->value)) {\n parent::validate();\n }\n }", "public function validate() {\n if (!empty($this->value)) {\n parent::validate();\n }\n }", "function value( $value )\n\t{\n\t\t$this->value = $value;\n\t}", "function set_value($value)\n\t{\n\t\t$this->value = $value;\n\t}", "public function testSetRawAttributeSuccess()\n {\n $eavDocument = new EavDocument();\n\n $eavAttribute = new EavPromisedAttribute();\n $eavAttribute->setName('attribute_name');\n\n $eavValue = new EavValue();\n $eavValue->setAttribute($eavAttribute);\n\n $eavDocument->setRawEavValue($eavValue);\n\n $this->assertCount(1, $eavDocument->getValues());\n $this->assertSame($eavValue, $eavDocument->getValue('attribute_name'));\n }", "public function validate() {\n if (!empty($this->value)) {\n parent::validate();\n }\n }", "public function test_field_has_correct_value_attribute_when_changed()\n {\n $this->Field->attributes->value = $this->test_value;\n $dom = HtmlDomParser::str_get_html($this->Field->makeView()->render());\n $input = current($dom->find('input'));\n\n // A password field should never have a value even if one is set.\n $this->assertSame(true, $input->value);\n }", "function setValue($value){\r\n\t\t$this->value = $value;\r\n\t}", "public function beforeSave()\n {\n $value = $this->getValue();\n if (is_array($value)) {\n $value = $this->_helper->makeStorableArrayFieldValue($value);\n }\n \n $this->setValue($value);\n }", "public function testValueIsCorrect()\n {\n $init = true;\n $str = new \\Pv\\PObject($init);\n }", "public function validateValue($value)\n {\n }", "protected function doSet($value)\n {\n }", "public function beforeValidate()\r\n \t{\r\n \t\tif ($this->isNewRecord) {\r\n \t\t\t// UUID\r\n \t\t\t$this->code = ysUtil::generateUUID();\r\n \t\t} else {\r\n \t\t\t// UUID\r\n \t\t\tif (empty($this->code)) {\r\n \t\t\t\t$this->code = ysUtil::generateUUID();\r\n \t\t\t}\r\n \t\t}\r\n\r\n \t\t// todo: for all language filed that is required but data is empty, copy the value from default language so when params.backendLanguages do not include those params.languages, validation error wont throw out\r\n\r\n \t\treturn parent::beforeValidate();\r\n \t}", "public function testSetValueFromPlain()\n {\n $value = '';\n $this->uut->setValue($value);\n $this->assertEquals($value, $this->uut->setValue($value)->getPlain());\n\n $value = ['foo'];\n $this->uut->setValue($value);\n $this->assertEquals('foo', $this->uut->setValue($value)->getPlain());\n }", "public function beforeValidate()\n \t{\n \t\tif ($this->isNewRecord) {\n \t\t\t// UUID\n \t\t\t$this->code = ysUtil::generateUUID();\n \t\t} else {\n \t\t\t// UUID\n \t\t\tif (empty($this->code)) {\n \t\t\t\t$this->code = ysUtil::generateUUID();\n \t\t\t}\n \t\t}\n\n \t\t// todo: for all language filed that is required but data is empty, copy the value from default language so when params.backendLanguages do not include those params.languages, validation error wont throw out\n\n \t\treturn parent::beforeValidate();\n \t}", "public function testSetRawAttributeFailed()\n {\n $eavDocument = new EavDocument();\n $eavValue = new EavValue();\n\n $eavDocument->setRawEavValue($eavValue);\n }", "protected function value()\n {\n }", "protected function determineValue()\n {\n $this->value = trim(mb_substr($this->source, 1));\n }", "function test_invalid_post_value() {\n\t\t$default_value = 'foo_default';\n\t\t$setting = $this->manager->add_setting( 'foo', array(\n\t\t\t'validate_callback' => array( $this, 'filter_customize_validate_foo' ),\n\t\t\t'sanitize_callback' => array( $this, 'filter_customize_sanitize_foo' ),\n\t\t) );\n\t\t$this->assertEquals( $default_value, $this->manager->post_value( $setting, $default_value ) );\n\t\t$this->assertEquals( $default_value, $setting->post_value( $default_value ) );\n\n\t\t$post_value = 'bar';\n\t\t$this->manager->set_post_value( 'foo', $post_value );\n\t\t$this->assertEquals( strtoupper( $post_value ), $this->manager->post_value( $setting, $default_value ) );\n\t\t$this->assertEquals( strtoupper( $post_value ), $setting->post_value( $default_value ) );\n\n\t\t$this->manager->set_post_value( 'foo', 'return_wp_error_in_sanitize' );\n\t\t$this->assertEquals( $default_value, $this->manager->post_value( $setting, $default_value ) );\n\t\t$this->assertEquals( $default_value, $setting->post_value( $default_value ) );\n\n\t\t$this->manager->set_post_value( 'foo', 'return_null_in_sanitize' );\n\t\t$this->assertEquals( $default_value, $this->manager->post_value( $setting, $default_value ) );\n\t\t$this->assertEquals( $default_value, $setting->post_value( $default_value ) );\n\n\t\t$post_value = '<script>evil</script>';\n\t\t$this->manager->set_post_value( 'foo', $post_value );\n\t\t$this->assertEquals( $default_value, $this->manager->post_value( $setting, $default_value ) );\n\t\t$this->assertEquals( $default_value, $setting->post_value( $default_value ) );\n\t}", "public function testValueIsCorrect()\n {\n $init = 'test';\n $set = array('test');\n $str = new \\Pv\\PEnum($init, null, $set);\n }", "public function setValue( $value ) { \n $this->inputValue = $value; \n $this->value = $value;\n }", "abstract protected function isValidValue($value);", "public function setTypeValue()\n {\n if($this->getType() === null){\n $this->setType(self::TYPE_SIMPLE);\n }\n }", "public function __construct($value = '')\n {\n if (!is_string($value) && !is_numeric($value)) {\n throw new InvalidNativeArgumentException($value, $this->allowedTypes);\n }\n $this->value = $value;\n }", "public function testSetValue()\n {\n $this->todo('stub');\n }", "public function testSetGetValue()\n {\n $value = new ScalarValue('foo');\n $same = $this->uut->setValue($value);\n $this->assertSame($this->uut, $same);\n $this->assertEquals($value, $this->uut->getValue());\n }", "protected function _beforeSave()\n {\n $value = $this->getValue();\n $value = Mage::helper('mail/connectfields')->makeStorableArrayFieldValue($value);\n $this->setValue($value);\n }", "function test_post_value_validation_sanitization_order() {\n\t\t$default_value = '0';\n\t\t$setting = $this->manager->add_setting( 'numeric', array(\n\t\t\t'validate_callback' => array( $this, 'filter_customize_validate_numeric' ),\n\t\t\t'sanitize_callback' => array( $this, 'filter_customize_sanitize_numeric' ),\n\t\t) );\n\t\t$this->assertEquals( $default_value, $this->manager->post_value( $setting, $default_value ) );\n\t\t$this->assertEquals( $default_value, $setting->post_value( $default_value ) );\n\n\t\t$post_value = '42';\n\t\t$this->manager->set_post_value( 'numeric', $post_value );\n\t\t$this->assertEquals( $post_value, $this->manager->post_value( $setting, $default_value ) );\n\t\t$this->assertEquals( $post_value, $setting->post_value( $default_value ) );\n\t}", "public function setValueByPathSetsCorrectValueDataProvider() {}", "function setValue ($value) {\n\t\t$this->_value = $value;\n\t}", "public function getValidDefaultValue(): mixed;", "public function sanitizeValueOnSave(): bool\n {\n return true;\n }", "function setValue($value) {\n $this->value = $value;\n }", "abstract public function set();", "public function setValue($value, $encoding = 'UTF-8') {}", "public function setValue($value, $encoding = 'UTF-8') {}", "public function set(Jam_Validated $model, $value, $is_changed)\n\t{\n\t\tlist($value, $return) = $this->_default($model, $value);\n\n\t\tif ( ! $return)\n\t\t{\n\t\t\t$value = filter_var($value, FILTER_VALIDATE_BOOLEAN);\n\t\t}\n\n\t\treturn $value;\n\t}", "abstract protected function checkValue( &$value );", "public function setValue($value, $value_type = '') {\n\t\t$this->attributes['value'] = $value;\n\t\t$this->attributes['value_type'] = detect_extender_valuetype($value, $value_type);\n\t}", "protected function onParentSet() : void\n {\n $value = $this->oFG->getData()->getValue($this->strName);\n $this->iValue = $value ? intval($value) : $this->iMin;\n }", "public function testGettersAndSetters()\n {\n $this->phone->setType('phone');\n $this->assertEquals('phone', $this->phone->getType());\n\n $this->phone->setValue('059 70 22 85');\n $this->assertEquals('059 70 22 85', $this->phone->getValue());\n }", "function __get($value) {\n return false;\n }", "public function testSetCode() {\n\n $obj = new TestIntegerCodeTrait();\n\n $obj->setCode(1);\n $this->assertEquals(1, $obj->getCode());\n }", "public function setValue($value, $load = false);", "public function setValue(mixed $value): static;", "public function setValue($value){\n $this->_value = $value;\n }", "function init() {\n if (!$this->options['persistant']) $this->options['value'] = null;\n }", "public function setInputValue($value)\n {\n $this->input->setRawInput($value);\n }", "final public function newlySetValueIsReturnedWithGetValue(): void\n {\n $dataType = new DataTypeMock();\n $this->assertTrue($dataType->isEqual(null));\n\n $someObject = new stdClass();\n $dataType->setValue($someObject);\n $this->assertTrue($dataType->isEqual($someObject));\n }", "public function setValue($value) {\n\t\tparent::setValue(stripslashes($value));\n\t}", "abstract protected function handle_set($name,$value);", "public function beforeSave()\n {\n $value = $this->getValue();\n $value = $this->makeStorableArrayFieldValue($value);\n $this->setValue($value);\n }", "protected function value()\n {\n $this->value = $this->lexeme;\n }", "public function set($value = null);", "public function __set($_name,$_value) {\n\t\tif (array_key_exists($_name,$this->fields)) {\n\t\t\t$this->fields[$_name]=is_string($_value)?\n\t\t\t\tF3::resolve($_value):$_value;\n\t\t\tif (!is_null($_value))\n\t\t\t\t// Axon is now hydrated\n\t\t\t\t$this->empty=FALSE;\n\t\t\treturn;\n\t\t}\n\t\tif (array_key_exists($_name,$this->virtual)) {\n\t\t\ttrigger_error(self::TEXT_AxonReadOnly);\n\t\t\treturn;\n\t\t}\n\t\tF3::$global['CONTEXT']=$_name;\n\t\ttrigger_error(self::TEXT_AxonNotMapped);\n\t}", "public function testCanSetAndGetPostalCode()\n {\n $mockPostalCode = '00000';\n\n $this->dataCenter->setPostalCode($mockPostalCode);\n\n $this->assertEquals($mockPostalCode, $this->dataCenter->getPostalCode());\n }", "function setValue ($newValue) {\n\t\t$r = checkType ($newValue, $this->getType ());\n\t\tif (! isError ($r)) {\n\t\t\tif ($this->getInitialValue () === null) {\n\t\t\t\t$this->initialValue = $newValue;\n\t\t\t}\n\t\t\t$this->currentValue = $newValue;\n\t\t} else {\n\t\t\treturn $r;\n\t\t}\n\t}", "public function __construct($value)\n {\n if (false === \\is_string($value)) {\n throw new InvalidNativeArgumentException($value, array('string'));\n }\n\n $this->value = $value;\n }", "public function beforeSave()\n {\n $this->setParams([\n 'url' => $this->getValue(),\n 'apiKey' => $this->getFieldsetDataValue('api_key'),\n 'version' => $this->getFieldsetDataValue('api_version')\n ]);\n\n if (!$this->isUrl($this->getValue())) {\n throw new \\Magento\\Framework\\Exception\\ValidatorException(__('Invalid CRM url'));\n }\n\n if (!$this->isHttps($this->getValue())) {\n $this->schemeEdit($this->getValue());\n }\n\n if ($this->validateApiUrl($this->api)) {\n $this->setValue($this->getValue());\n }\n\n parent::beforeSave();\n }", "public function setValue($value)\n {\n $value = arr::get($value, 'value', NULL);\n\n if ($value !== NULL)\n {\n //pokud prisla prazdna hodnota, tak do modelu ukladam NULL\n if (empty($value))\n {\n $value = NULL;\n }\n\n parent::setValue($value);\n }\n }", "public function __construct($value) {\r\n $this->setValue($value);\r\n }" ]
[ "0.61316335", "0.60464203", "0.60060006", "0.59664774", "0.59657025", "0.5936885", "0.5926443", "0.5909467", "0.5909467", "0.5909467", "0.5909467", "0.5909467", "0.5909467", "0.5909467", "0.5909467", "0.5909467", "0.5909467", "0.5909467", "0.59090185", "0.59090185", "0.5876895", "0.5861145", "0.5827943", "0.5825616", "0.58251756", "0.58251756", "0.5816647", "0.5762533", "0.5729197", "0.5729197", "0.5729197", "0.5729197", "0.5729197", "0.5729197", "0.5729197", "0.5729197", "0.5729197", "0.5729197", "0.5721039", "0.5646412", "0.5645428", "0.5645428", "0.56306636", "0.56248105", "0.55972683", "0.5597165", "0.55788434", "0.55696857", "0.5567152", "0.5561129", "0.55587995", "0.5551453", "0.5550407", "0.55388343", "0.55164087", "0.550835", "0.5496259", "0.5492935", "0.5485747", "0.5482716", "0.54754037", "0.54719174", "0.54587626", "0.5452377", "0.5437368", "0.5436478", "0.5421888", "0.54217386", "0.542009", "0.54148906", "0.54138184", "0.5400548", "0.5393671", "0.5389395", "0.53879267", "0.5387398", "0.5385979", "0.5370609", "0.536716", "0.5366285", "0.5351833", "0.5341376", "0.5340296", "0.53388387", "0.5337955", "0.5337359", "0.53333527", "0.5329376", "0.53241825", "0.5324077", "0.5321131", "0.5319055", "0.53159094", "0.5314467", "0.5307623", "0.53014076", "0.5297948", "0.5287973", "0.528775", "0.528752", "0.52862513" ]
0.0
-1
Returns the native value.
public function get() { return $this->value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function toNative()\n {\n return $this->value;\n }", "public function toNative()\n {\n $value = parent::toNative();\n\n return \\intval($value);\n }", "public function getRawValue();", "public function valueOf() {\n return $this->_value;\n }", "public function toNative(): int\n {\n return \\intval(parent::toNative());\n }", "public function getRawValue()\n {\n $this->ensureLoaded();\n\n return $this->rawValue;\n }", "public function getValue() {\n \n return $this->toScalar();\n }", "private function value()\n {\n $this->white();\n switch ($this->currentByte) {\n case '{':\n return $this->obj();\n case '[':\n return $this->arr();\n case '\"':\n case \"'\":\n return $this->string();\n case '-':\n case '+':\n case '.':\n return $this->number();\n default:\n return \\is_numeric($this->currentByte) ? $this->number() : $this->word();\n }\n }", "public function getValue(): mixed;", "public function getValue(): mixed;", "public function getValue()\n {\n $value = $this->value;\n\n switch ($this->type) \n {\n case 'boolTrue':\n $value = true;\n break;\n\n case 'boolFalse':\n $value = false;\n break;\n\n case 'string':\n $value = str_replace(\"\\\\\", \"\", substr($value, 1, -1));\n break;\n\n case 'number':\n $value = $value + 0;\n break;\n\n case 'null':\n $value = null;\n break;\n }\n\n return $value;\n }", "public function GetValue() {\n\t\treturn $this->_value;\n\t}", "public function getValue()\n {\n return self::decodeValue($this->value);\n }", "public function value() { return $this->_m_value; }", "public function native();", "static public function valueOf()\n {\n $obj = Runtime::this();\n if (!($obj instanceof jsNumber)) {\n throw new jsException(new jsTypeError());\n }\n return $obj->toNumber()->value;\n }", "public function getRawValue() {\n\n return $this->rawValue;\n }", "public function getValue()\n {\n if ($this->value == null) {\n return '0';\n }\n\n return $this->value;\n }", "public function getValue()\n {\n if ($this->value == null) {\n return '0';\n }\n\n return $this->value;\n }", "public static function fromNative()\n {\n $value = func_get_arg(0);\n\n return new static($value);\n }", "public function value();", "public function value();", "public function value();", "public function getValue(): mixed\n {\n return $this->value;\n }", "public function get_value() {\n\t\treturn $this->_value;\n\t}", "public function get_value()\n {\n return $this->value;\n }", "public function get_value() {\n return $this->value;\n }", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function get_value()\n\t{\n\t\treturn $this->value;\n\t}", "public function getValue()\n\t{\n\t\treturn null;\n\t}", "public function get_value()\n {\n }", "public function get_value()\n {\n }", "final public function value()\n {\n return $this->value;\n }", "function getValue() {\n\t\treturn $this->sValue;\n\t}", "public function getValue()\n {\n return $this->get(self::_VALUE);\n }", "public function getValue()\n {\n return $this->get(self::_VALUE);\n }", "public function __invoke() {\n \n return $this->_value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function getValue()\n {\n\treturn $this->value;\n }", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}" ]
[ "0.86892104", "0.74695796", "0.7159563", "0.69486225", "0.6873021", "0.6754618", "0.6746944", "0.66919297", "0.6686641", "0.6686641", "0.66821915", "0.6675868", "0.66049504", "0.65902686", "0.6551914", "0.6545979", "0.65363455", "0.6526987", "0.6526987", "0.65065074", "0.64942706", "0.64942706", "0.64942706", "0.6472719", "0.6454123", "0.64177704", "0.64131856", "0.6402946", "0.6402946", "0.6402946", "0.6402946", "0.6402946", "0.6402946", "0.6402946", "0.6402946", "0.6402946", "0.6402946", "0.6402946", "0.6402946", "0.6402946", "0.6402946", "0.6402946", "0.6402946", "0.6402946", "0.6402946", "0.6402946", "0.6402946", "0.6402946", "0.6395524", "0.63748294", "0.635955", "0.635955", "0.6357828", "0.6343365", "0.63417387", "0.63417387", "0.6337859", "0.63237834", "0.63237834", "0.63237834", "0.63237834", "0.63237834", "0.63237834", "0.63237834", "0.63237834", "0.63237834", "0.63237834", "0.63237834", "0.63237834", "0.63237834", "0.63237834", "0.63237834", "0.63237834", "0.63237834", "0.63237834", "0.63237834", "0.63237834", "0.63237834", "0.63237834", "0.63237834", "0.63237834", "0.63237834", "0.63237834", "0.63237834", "0.63237834", "0.63237834", "0.63237834", "0.63176584", "0.6314839", "0.6314839", "0.6314839", "0.6314839", "0.6314839", "0.6314839", "0.6314839", "0.6314839", "0.6314839", "0.6314839", "0.6314839", "0.6314839", "0.6314839" ]
0.0
-1
Returns true if the value resolves to true.
public function isTrue() { return !!$this->value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isTrue()\n {\n return $this->value === true;\n }", "public function isTrue();", "function isTrue($value) {\r\n\treturn is_bool($value) ? $value : (bool)preg_match('/^(1|y|yes|true|on)$/i',(string)$value);\r\n}", "function bool ($value)\r\n{\r\n\tif ($value === true || $value === false)\r\n\t\treturn $value;\r\n\r\n\treturn $value === 'true' || ($value !== 'false' && !!$value);\r\n}", "protected function isTrue($value) {\n\t\t$value = strtolower(trim((string)$value));\n\t\treturn (in_array($value, array(\"yes\", \"true\", \"1\")));\n\t}", "public static function true(): self\n {\n return self::fromValue(Value::true());\n }", "public static function true(): bool\n {\n return true;\n }", "public function bool()\n {\n return filter_var($this->value, FILTER_VALIDATE_BOOLEAN);\n }", "public function isTrue() {\n return $this->is(new Identical(true));\n }", "public function check($value): bool;", "function is_true($val, $returnNull = false) : bool\n {\n $boolval = (is_string($val) ? filter_var($val, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE) : (bool) $val);\n return ($boolval === null && ! $returnNull ? false : $boolval);\n }", "public function toBool() : bool\n {\n return boolval($this->value);\n }", "public function hasBoolValue(){\n return $this->_has(4);\n }", "public function value(): bool\n {\n if (($val = $this->raw()) === null) {\n return false;\n }\n\n return (new Boolean)->decode($val);\n }", "public function hasBoolValue(){\n return $this->_has(3);\n }", "final public function is($value):bool\n {\n return $this->getAttr($value) === true;\n }", "public static function aBoolean($value)\n {\n return (is_bool($value))?:false;\n }", "function o_isBool($value) {\n\t\t\treturn Obj::singleton()->isBool($value);\n\t\t}", "public function getBooleanValue()\n {\n return $this->readOneof(4);\n }", "function to_boolean ($value) {\n\tif (\n\n\t\t// Falsy\n\t\t!$value or\n\n\t\t// Empty\n\t\tempty($value) or\n\n\t\t// Zero or less\n\t\t(is_numeric($value) and strval($value) <= 0) or\n\n\t\t// Keyword\n\t\t(is_string($value) and in_array(trim(strtolower($value)), array('null', 'nul', 'nil', 'false')))\n\n\t) {\n\t\treturn false;\n\t} else {\n\t\treturn true;\n\t}\n}", "public static function bool($value)\n\t{\n\t\treturn filter_var($value, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);\n\t}", "public function toBoolean(): bool\n {\n return !!$this->getValue();\n }", "protected function _toBoolean($value)\n\t{\n\t\tif (is_bool($value)) {\n\t\t\treturn $value;\n\t\t}\n\t\tif (is_int($value) || is_float($value)) {\n\t\t\treturn ($value !== 0);\n\t\t}\n\t\tif (is_string($value)) {\n\t\t\treturn ($value === 't' || $value === 'T' || $value === 'true');\n\t\t}\n\t\treturn (boolean)$value;\n\t}", "private function checkIsBoolean($value)\n {\n if ($this->strictMode) {\n return $this->checkStrict($value);\n } else {\n return $this->checkNotStrict($value);\n }\n }", "public static function ensureBoolean($value)\n\t{\n\t\tif (is_string($value))\n\t\t\treturn strcasecmp($value,'true')==0 || $value!=0;\n\t\telse\n\t\t\treturn (boolean)$value;\n\t}", "public function checkIsTrue($value)\n {\n return $this->checkIdenticalTo($value, true);\n }", "public static function convertToBoolean($value)\n {\n if (is_bool($value)) {\n return $value;\n }\n if (is_numeric($value)) {\n return $value > 0;\n }\n if (is_string($value)) {\n return (!empty($value) && strtolower($value) !== 'false');\n }\n if (is_array($value) || (is_object($value) && $value instanceof \\Countable)) {\n return count($value) > 0;\n }\n if (is_object($value)) {\n return true;\n }\n return false;\n }", "public function boolean_style($value){\n\t\t//if it is null, it fails, if it isn't null then it succeeds\n\t\t$this->set_message('boolean_style', 'The %s field does not evaluate to a boolean.');\n\t\t$bool = filter_var($value, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);\n\t\treturn !is_null($bool);\n\n\t}", "public function isSet(): bool\n {\n return !is_null($this->value);\n }", "public static function toBool($value) : bool\n\t{\n\t\tswitch(true) {\n\n\t\t\tcase is_bool($value) :\n\t\t\t\treturn $value;\n\n\t\t\tcase is_null($value) :\n\t\t\t\treturn false;\n\n\t\t\tcase is_scalar($value) :\n\t\t\t\treturn Str::toBool((string)$value);\n\n\t\t\tdefault :\n\t\t\t\treturn ! self::isEmpty($value);\n\t\t}\n\t}", "public function castToBool($value);", "final public static function is($value):bool\n {\n return is_bool($value);\n }", "private function bool($value)\n\t{\n\t\t// We do *not* follow the string 0 php casting rule.\n\t\t// {if field} should be true if the user entered\n\t\t// something. Doesn't matter what it is.\n\t\tif ($value === '0')\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\n\t\treturn (bool) $value;\n\t}", "private function xs_true($xs_bool) {\n return ($xs_bool == '1' || strtoupper($xs_bool) == 'TRUE');\n }", "static public function GetBooleanValue( $value )\r\n\t{\r\n\t\tif( gettype( $value ) == 'boolean')\r\n\t\t{\r\n\t\t\tif( $value == true )\r\n\t\t\t{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\telseif( is_numeric( $value ) )\r\n\t\t{\r\n\t\t\tif( $value > 0 )\r\n\t\t\t{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$cleaned = strtoupper( trim( $value ) );\r\n\r\n\t\t\tif( $cleaned == 'ON' )\r\n\t\t\t{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telseif( $cleaned == 'SELECTED' || $cleaned == 'CHECKED' )\r\n\t\t\t{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telseif( $cleaned == 'YES' || $cleaned == 'Y')\r\n\t\t\t{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telseif( $cleaned == 'TRUE' || $cleaned == 'T')\r\n\t\t\t{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function is_true(mixed $var): bool\n{\n return ($var === true);\n}", "public function stringToBoolean($val) {\n return ($val === \"true\");\n }", "public function hasValue()\n {\n return $this->Value !== null ? true : false;\n }", "public function checkBool($value)\n {\n return $this->checkHasType($value, 'boolean');\n }", "public static function toBool($val) {\n return ($val === true || in_array($val, array('true', 'yes', 'on', 'checked', '1', 1))) ? true : false;\n }", "public static function boolean() {}", "function boolean(bool|int|string|null $var): bool\n {\n if (is_bool($var)) {\n return ($var == true);\n }\n\n if (is_string($var)) {\n $var = strtolower($var);\n\n return match ($var) {\n 'true', 'on', 'yes', 'y', '1' => true,\n default => false,\n };\n }\n\n if (is_numeric($var)) {\n return ($var == 1);\n }\n\n return boolval($var);\n }", "public function isBoolean();", "private function _convert_boolean(mixed $value): bool {\n\t\treturn Types::toBool($value);\n\t}", "protected final function AssertTrue( $value, $strict = true )\n {\n $this->observer->OnAssert();\n\n if( $strict )\n {\n $result = ( $value === true );\n }\n else\n {\n $result = ( $value == true );\n }\n\n Core::Assert( $result, var_export( $value, true ) . ' is not true' );\n }", "public static function tryParseBoolean(mixed $value): mixed\n {\n if (! is_string($value)) {\n return $value;\n }\n\n if (ArrayUtils::inArrayI($value, ['true', 'false'])) {\n return stripos($value, 'true') === 0;\n }\n\n return $value;\n }", "public static function isValid($value): bool;", "protected static function validate_boolean( $value ){\n\t\t// FIXME: this doesn't do the strict comparison we intended. 'hello' would match the \"case true\" statement.\n\t\tswitch ($value) {\n\t\t\tcase 0:\n\t\t\tcase '0':\n\t\t\tcase false:\n\t\t\tcase 'false':\n\t\t\tcase 1:\n\t\t\tcase '1':\n\t\t\tcase true:\n\t\t\tcase 'true':\n\t\t\t\treturn true;\n\t\t\t\tbreak;\n\t\t}\n\t\treturn false;\n\t}", "public function getBooleanValue(): ?bool\n {\n if (count($this->booleanValue) == 0) {\n return null;\n }\n return $this->booleanValue['value'];\n }", "function to_boolean($val);", "public function getBool(): bool;", "final public function toBool()\n {\n return $this->hasSolution();\n }", "protected function conditionIsTrue() : bool\n {\n return (bool)$this->app->call($this->config->get('laraload.condition'), [], '__invoke');\n }", "function isBool ($value)\r\n{\r\n\treturn is_bool ($value);\r\n}", "function getBoolean($key, $defvalue = '') {\n\t\treturn strcasecmp('true', $this->get($key, $defvalue).'') === 0;\n\t}", "public static function trueOrNull($value)\n {\n return ($value == 1) ? 1 : null;\n }", "protected function getBooleanValue($path)\n {\n $normalizedPath = strtolower($path);\n\n if (in_array($normalizedPath, ['true', 'on', 'yes'])) {\n return true;\n }\n\n if (in_array($normalizedPath, ['false', 'off', 'no'])) {\n return false;\n }\n\n return null;\n }", "public function assert_true($value, $strict = true)\n\t{\n\t\tTests::$results['assertions']++;\n\n\t\tif ($value === true or ( ! $strict and $value))\n\t\t{\n\t\t\t$this->pass();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->fail('assert_true - Value is does not validate as true.');\n\t\t}\n\t}", "public function isSet() : bool;", "protected function checkValue() {\n if($this->required) {\n if($this->regularExpression) {\n if(preg_match($this->regularExpression, $this->value)) {\n $returnValue = TRUE;\n } else {\n $returnValue = FALSE;\n $this->error = TRUE;\n }\n } elseif($this->callBack) {\n if(call_user_func($this->callBack, $this->value)) {\n $returnValue = TRUE;\n } else {\n $returnValue = FALSE;\n $this->error = TRUE;\n }\n } elseif(!(bool)$this->value) {\n $returnValue = FALSE;\n } else {\n $returnValue = TRUE;\n }\n } else {\n $returnValue = TRUE;\n }\n\n return $returnValue;\n }", "public function isBoolean(): bool\n {\n return $this->boolean;\n }", "public function getBoolean($key)\n {\n \n if (!isset($this->data[$key])) {\n return false;\n }\n \n if (is_bool($this->data[$key])) {\n return $this->data[$key];\n }\n\n if (('f' !== $this->data[$key] && 'FALSE' !== $this->data[$key] && '0' != $this->data[$key]))\n return true;\n else\n return false;\n\n }", "public function hasValue($value)\n {\n return $this->_value == $value;\n }", "public static function prepareBool($value)\n {\n return (bool) $value;\n }", "public function isBoolean(): bool\n {\n return $this->phpType === self::BOOLEAN;\n }", "public function is_condition_true( $entry ) {\n\t\t$result = true;\n\n\t\tif ( $this->condition_enabled ) {\n\t\t\tif (isset($entry[$this->condition_field_id])) {\n\t\t\t\t$value = $entry[$this->condition_field_id];\n\t\t\t}\n\n\t\t\tif ( empty( $value ) ) {\n\t\t\t\t// unknown field\n\t\t\t\t$result = true;\n\t\t\t} else {\n\t\t\t\tswitch ( $this->condition_operator ) {\n\t\t\t\t\tcase SLP_GFL_OPERATOR_IS:\n\t\t\t\t\t\t$result = $value == $this->condition_value;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase SLP_GFL_OPERATOR_IS_NOT:\n\t\t\t\t\t\t$result = $value != $this->condition_value;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault: // unknown operator\n\t\t\t\t\t\t$result = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t// condition is disabled, result is true\n\t\t\t$result = true;\n\t\t}\n\n\t\treturn $result;\n\t}", "public function isPresent(): bool\n {\n return ! is_null($this->value);\n }", "public function toBool(): bool\n\t{\n\t\treturn false;\n\t}", "public static function isTrue()\n {\n return new Matcher\\IsTrue();\n }", "protected function toBool($value)\n\t{\n\t\tif ($value === true) {\n\t\t\treturn 'yes';\n\t\t}\n\t\treturn 'no';\n\t}", "function erp_validate_boolean( $value ) {\n return filter_var( $value, FILTER_VALIDATE_BOOLEAN );\n}", "public static function has($value, bool $strict = true): bool;", "public function isOk(): bool\n {\n static $valueProperty;\n $valueProperty ??= new \\ReflectionProperty(self::class, \"value\");\n $valueProperty->setAccessible(true);\n\n self::$toBeUsed[$this] = false;\n\n return $valueProperty->isInitialized($this);\n }", "function boolval( $val ) {\r\n\t\treturn (bool) $val;\r\n\t}", "public static function GetBool($key)\n {\n return (bool)self::Get($key);\n }", "protected function isYesValue($value)\n {\n return $value === true\n || $value === 'Y'\n || $value === 'y'\n || $value === 'yes';\n }", "public static function __return_true() {\n\t\treturn true;\n\t}", "private function strToBoolean($value) {\r\n\t\tif ($value && strtolower($value) === \"true\") {\r\n\t\t return true;\r\n\t\t} else {\r\n\t\t return false;\r\n\t\t}\r\n\t}", "public function convertToBoolean($value) {\r\n return $value !== 'false' && $value !== 0 && $value !== false && $value !== '' && $value !== '0';\r\n }", "public function hasBoolField()\n {\n return $this->get(self::BOOL_FIELD) !== null;\n }", "function validBool($value)\n {\n return filter_var($value, FILTER_VALIDATE_BOOLEAN);\n }", "public function has ($value);", "static function toBoolean ($v)\n {\n return is_string ($v) ? get (self::$BOOLEAN_VALUES, $v, false) : boolval ($v);\n }", "public function is_flag($name,$value=true) {\n\t\tif (!isset($this->flags[$name])) return false;\n\t\treturn $this->flags[$name] === $value;\n\t}", "public function containsValue($value): bool;", "public function toBoolean()\n {\n $key = $this->toLowerCase()->str;\n $map = array(\n 'true' => true,\n '1' => true,\n 'on' => true,\n 'yes' => true,\n 'false' => false,\n '0' => false,\n 'off' => false,\n 'no' => false,\n );\n\n if (array_key_exists($key, $map)) {\n return $map[$key];\n } elseif (is_numeric($this->str)) {\n return ((int) $this->str > 0);\n } else {\n return (bool) $this->regexReplace('[[:space:]]', '')->str;\n }\n }", "public function boolValue()\n {\n return $this->value;\n }", "public function getIsChecked()\n {\n return ($this->value == $this->checkedValue);\n }", "static function isTrue()\n {\n try {\n return call_user_func_array('PHPUnit_Framework_Assert::isTrue', func_get_args());\n } catch (\\Exception $e) {\n self::callSlack($e, debug_backtrace()[1]);\n }\n }", "public static function boolean()\n {\n return self::builtinType('bool');\n }", "function &bool(bool $value, string $namespace = 'default'): bool\n{\n $var = new Variable\\BoolVariable($value);\n Repository::add($var, $namespace);\n return $var->getValue();\n}", "public function containsValue(mixed $value): bool;", "function isValid() {\n return $this->validator ? $this->validator->isValid($this->value) : true;\n }", "public function getBool(string $field_name, string $true_value)\n {\n return $this->field_bool(INPUT_GET, $field_name, $true_value);\n }", "public function isTrue(&$params)\n {\n $hostObj = $this->host;\n $attribute = $hostObj->subcondition;\n\n $conditionValue = $hostObj->value;\n $conditionValue = trim(mb_strtolower($conditionValue));\n\n if ($attribute == 'locale') {\n return array_get($params, 'appLocale') == $conditionValue;\n } else if ($attribute === 'environment') {\n return $conditionValue === \\App::environment();\n }\n\n return false;\n }", "public function check(?string $value): bool\n {\n if ($value === null)\n {\n return false;\n }\n \n $response = $this->request($value);\n\n $this->onResponse($response);\n\n return $response->successful() && $response->json()['success'];\n }", "private function checkStrict($value)\n {\n if ($value === 'true' or $value === 'false') {\n return true;\n } else {\n return false;\n }\n }", "public function isFlag()\n {\n return is_null($this->value);\n }", "public function isResolved(): bool;", "function boolval($val){\n return $val === 'true' ? true : false;\n}" ]
[ "0.83746284", "0.7327865", "0.7255598", "0.7237692", "0.7135793", "0.7099107", "0.7009759", "0.69991183", "0.6963154", "0.69327813", "0.689397", "0.68891025", "0.6885377", "0.6842323", "0.68270355", "0.6826442", "0.68248254", "0.68046576", "0.67733765", "0.67328924", "0.670992", "0.66840667", "0.66749895", "0.6672308", "0.66623485", "0.6647594", "0.66457385", "0.6640481", "0.6632987", "0.66293323", "0.66084564", "0.6592034", "0.6586551", "0.6564933", "0.6551986", "0.6543105", "0.65078026", "0.64745384", "0.6466017", "0.638906", "0.63739985", "0.6351893", "0.6339712", "0.6330581", "0.63271374", "0.63150865", "0.6293393", "0.628167", "0.62788475", "0.6275492", "0.6265871", "0.62656724", "0.62516254", "0.62437", "0.6233313", "0.622814", "0.6225826", "0.6218677", "0.62134516", "0.62071264", "0.6171935", "0.6152375", "0.6151397", "0.61352646", "0.6119713", "0.61140716", "0.61139303", "0.6101102", "0.60971713", "0.60944146", "0.60765076", "0.6065713", "0.6044398", "0.6040054", "0.6039592", "0.60331595", "0.6025037", "0.6007488", "0.60045564", "0.5996518", "0.5986284", "0.5983671", "0.5970742", "0.5965259", "0.5963169", "0.59432065", "0.5940712", "0.5933873", "0.59318393", "0.5930045", "0.5923278", "0.5916627", "0.5912231", "0.5911246", "0.59109086", "0.5909285", "0.59053", "0.5902712", "0.59018433", "0.58815914" ]
0.76715714
1
Returns true if the value resolves to false.
public function isFalse() { return !$this->value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function is_false(mixed $value): bool\n\t{\n\t\treturn $value === false;\n\t}", "public function isFalse();", "public static function false(): self\n {\n return self::fromValue(Value::false());\n }", "public function isFalse() {\n return $this->is(new Identical(false));\n }", "protected function isFalse($value) {\n\t\treturn !$this->isTrue($value);\n\t}", "public static function false(): bool\n {\n return false;\n }", "public function toBoolean(): bool\n {\n return !!$this->getValue();\n }", "public function isTrue()\n {\n \n return !!$this->value;\n \n }", "public function checkIsFalse($value)\n {\n return $this->checkIdenticalTo($value, false);\n }", "function is_false(mixed $var): bool\n{\n return ($var === false);\n}", "public function isFalse($failMessage = null) {}", "public static function isFalse()\n {\n return new Matcher\\IsFalse();\n }", "static function isFalse()\n {\n try {\n return call_user_func_array('PHPUnit_Framework_Assert::isFalse', func_get_args());\n } catch (\\Exception $e) {\n self::callSlack($e, debug_backtrace()[1]);\n }\n }", "public function bool()\n {\n return filter_var($this->value, FILTER_VALIDATE_BOOLEAN);\n }", "protected function _isNegated()\n {\n return (bool) $this->negated;\n }", "function toBoolean() {\n return $this->content != false;\n }", "public function isAlwaysFalse() {\n return $this->alwaysFalse;\n }", "public function isNotOk()\n {\n return ! $this->isOk();\n }", "public function testCastToBooleanFalse($data) {\n\t\t$this->assertFalse(Convertor::cast($data), \"[{$data}] is not Boolean FALSE\");\n\t}", "public function value(): bool\n {\n if (($val = $this->raw()) === null) {\n return false;\n }\n\n return (new Boolean)->decode($val);\n }", "public static function aBoolean($value)\n {\n return (is_bool($value))?:false;\n }", "protected function isNoValue($value)\n {\n return $value === false\n || $value === 'N'\n || $value === 'n'\n || $value === 'no';\n }", "public function convertToBoolean($value) {\r\n return $value !== 'false' && $value !== 0 && $value !== false && $value !== '' && $value !== '0';\r\n }", "public function toBool() : bool\n {\n return boolval($this->value);\n }", "private function checkNotStrict($value)\n {\n if (filter_var($value, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE) !== null) {\n return true;\n } else {\n return false;\n }\n }", "function bool ($value)\r\n{\r\n\tif ($value === true || $value === false)\r\n\t\treturn $value;\r\n\r\n\treturn $value === 'true' || ($value !== 'false' && !!$value);\r\n}", "public function isSet(): bool\n {\n return !is_null($this->value);\n }", "public function isTrue()\n {\n return $this->value === true;\n }", "public function toBool(): bool\n\t{\n\t\treturn false;\n\t}", "function assertFalse($value, $message = '%s should be FALSE') {\n return $this->assert(\n new IdenticalExpectation(false),\n $value,\n $message\n );\n }", "protected final function AssertNotFalse( $value, $strict = true )\n {\n $this->observer->OnAssert();\n\n if( $strict )\n {\n $result = ( $value !== false );\n }\n else\n {\n $result = ( $value != false );\n }\n\n Core::Assert( $result, var_export( $value, true ) . ' is false' );\n }", "public function isFlag()\n {\n return is_null($this->value);\n }", "protected final function AssertFalse( $value, $strict = true )\n {\n $this->observer->OnAssert();\n\n if( $strict )\n {\n $result = ( $value === false );\n }\n else\n {\n $result = ( $value == false );\n }\n\n Core::Assert( $result, var_export( $value, true ) . ' is not false' );\n }", "public function checkIsFalsy($value)\n {\n return new AssertionResult(!$value, '{name} must be falsy');\n }", "public static function boolean() {}", "function erp_validate_boolean( $value ) {\n return filter_var( $value, FILTER_VALIDATE_BOOLEAN );\n}", "function o_isBool($value) {\n\t\t\treturn Obj::singleton()->isBool($value);\n\t\t}", "public function isUnverified()\n {\n return !$this->isVerified();\n }", "function bool($value)\n{\n return ! in_array(strtolower($value), ['no', 'false', '0', '', '-1']);\n}", "public function hasBoolValue(){\n return $this->_has(4);\n }", "function to_boolean($val);", "public function hasFalsePositiveReport(): bool\n {\n return RoadDamageReport::where('roaddamage_id', $this->id)\n ->where('verified', RoadDamageReport::FALSEPOSITIVE)->exists();\n }", "public function castToBool($value);", "public function isTrue();", "public function hasBoolValue(){\n return $this->_has(3);\n }", "function booleanValuefromString($s) {\r\n\t\treturn ((strcmp($s, '0') != 0) && (strcasecmp($s, 'false') != 0));\r\n\t}", "public function assertFalse($value, $message = null) {\n $this->assertions++;\n $message = $message ?? 'Assert if <' . gettype($value) . '> ' . $value . ' is false ';\n $passed = $value === (boolean)false;\n $this->_passed += $passed;\n $this->_log($message. ': '.$this->_colors->getColoredString($this->_textOutputs[$passed], $this->_colorsPalete[$passed]));\n $this->_progress($passed);\n $trueFalse = ['False','True'];\n !$passed && $this->_log('Expectig `false` but found <' . gettype($value) . '> ' . (is_bool($value) ? $trueFalse[$value] : $value)) && $this->_triggerError('Asserts False');\n }", "public function hasValue()\n {\n return $this->Value !== null ? true : false;\n }", "public function boolberry(): bool\n\t{\n\t\treturn false;\n\t}", "public function assert_false($value, $strict = true)\n\t{\n\t\tTests::$results['assertions']++;\n\n\t\tif ($value === false or ( ! $strict and ! $value))\n\t\t{\n\t\t\t$this->pass();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->fail('assert_false - Value is does not validate as false.');\n\t\t}\n\t}", "public function scrubBool(bool $data) : bool;", "public function isPresent(): bool\n {\n return ! is_null($this->value);\n }", "public function isBoolean();", "public function getBool(): bool;", "final public function toBool()\n {\n return $this->hasSolution();\n }", "public function isFalse(string|int|float $message): self\n {\n return $this->addMessage(new IsFalse($message));\n }", "function boolval( $val ) {\r\n\t\treturn (bool) $val;\r\n\t}", "public function isInvalid(): bool;", "public function check($value): bool;", "function isInfinite() { # :: Num -> Bool\n return new Bool(is_infinite($this->value));\n }", "function __return_false()\n {\n }", "function to_boolean ($value) {\n\tif (\n\n\t\t// Falsy\n\t\t!$value or\n\n\t\t// Empty\n\t\tempty($value) or\n\n\t\t// Zero or less\n\t\t(is_numeric($value) and strval($value) <= 0) or\n\n\t\t// Keyword\n\t\t(is_string($value) and in_array(trim(strtolower($value)), array('null', 'nul', 'nil', 'false')))\n\n\t) {\n\t\treturn false;\n\t} else {\n\t\treturn true;\n\t}\n}", "public function isOk(): bool\n {\n static $valueProperty;\n $valueProperty ??= new \\ReflectionProperty(self::class, \"value\");\n $valueProperty->setAccessible(true);\n\n self::$toBeUsed[$this] = false;\n\n return $valueProperty->isInitialized($this);\n }", "public function boolean_style($value){\n\t\t//if it is null, it fails, if it isn't null then it succeeds\n\t\t$this->set_message('boolean_style', 'The %s field does not evaluate to a boolean.');\n\t\t$bool = filter_var($value, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);\n\t\treturn !is_null($bool);\n\n\t}", "public function failNoisily() :bool{\n\t\treturn !$this->failSilently;\n\t}", "public static function isFalsy()\n {\n return new Matcher\\IsFalsy();\n }", "public function validBooleanFalseProvider() {\n\t\treturn [\n\t\t\t\"string TRUE\"\t=> [\"FALSE\"],\n\t\t\t\"string ON\"\t\t=> [\"OFF\"],\n\t\t\t\"string YES\"\t=> [\"NO\"],\n\t\t\t\"string 1\"\t\t=> [\"0\"],\n\t\t\t\"integer 1\"\t\t=> [0]\n\t\t];\n\t}", "public static function true(): self\n {\n return self::fromValue(Value::true());\n }", "private function bool($value)\n\t{\n\t\t// We do *not* follow the string 0 php casting rule.\n\t\t// {if field} should be true if the user entered\n\t\t// something. Doesn't matter what it is.\n\t\tif ($value === '0')\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\n\t\treturn (bool) $value;\n\t}", "public static function bool($value)\n\t{\n\t\treturn filter_var($value, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);\n\t}", "public function hasRawValue()\n {\n return (null !== $this->rawValue);\n }", "protected function _toBoolean($value)\n\t{\n\t\tif (is_bool($value)) {\n\t\t\treturn $value;\n\t\t}\n\t\tif (is_int($value) || is_float($value)) {\n\t\t\treturn ($value !== 0);\n\t\t}\n\t\tif (is_string($value)) {\n\t\t\treturn ($value === 't' || $value === 'T' || $value === 'true');\n\t\t}\n\t\treturn (boolean)$value;\n\t}", "public function testNullEqualsFalseWhenAllowNullIsFalse()\n {\n $arguments = [null];\n\n $return = $this->call(BooleanValidation::create()->setAllowNull(false), $arguments);\n\n $this->assertEquals(false, $return);\n }", "public function testValidateFalse(): void\n {\n $this->assertFalse($this->validate(false));\n }", "public function isNegative(): bool;", "public function isNegative(): bool\n {\n return $this->negative;\n }", "public function testToStringWithBooleanValueFalse()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean(false);\n\t\t// check that the two boolean are equal\n\t\t$this->assertEquals('false', $boolean->__toString());\n\t}", "function pseudoTypeFalse(false $var = false) {}", "public function isValid()\n {\n return ($this->obj != false);\n }", "public function hasValue()\n {\n return $this->property_value->isNotEmpty();\n }", "public function bit_to_bool( $value ) {\n\t\treturn ( ! empty( $value ) && '0' !== $value ) ? true : false;\n\t}", "public function isNullable()\n {\n\treturn $this->isNullable && true;\n }", "public function isInvalid(): bool\n {\n return $this->isInvalid;\n }", "public static function _notset($value)\n\t{\n\t\treturn self::_empty($value) && !isset($value);\n\t}", "function isBool ($value)\r\n{\r\n\treturn is_bool ($value);\r\n}", "public function boolValue()\n {\n return $this->value;\n }", "function toBoolean(){\n\t\tif(in_array($this->lower(),array('','false','off','no','n','f'))){\n\t\t\treturn false;\n\t\t}\n\t\treturn (bool)$this->toString();\n\t}", "function mFALSE(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$FALSE;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n // Tokenizer11.g:286:3: ( 'false' ) \n // Tokenizer11.g:287:3: 'false' \n {\n $this->matchString(\"false\"); \n\n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }", "function validBool($value)\n {\n return filter_var($value, FILTER_VALIDATE_BOOLEAN);\n }", "public static function ensureBoolean($value)\n\t{\n\t\tif (is_string($value))\n\t\t\treturn strcasecmp($value,'true')==0 || $value!=0;\n\t\telse\n\t\t\treturn (boolean)$value;\n\t}", "private function isValid( $prop )\n\t{\n\t\treturn ($prop !== 'false');\n\t}", "private function isValid( $prop )\n\t{\n\t\treturn ($prop !== 'false');\n\t}", "protected function isEnabled($value) {\n return ($value !== 'no');\n }", "public function checkBoolean(): bool\n {\n if (!is_bool($this->getValue())) {\n throw new TypeInvalidException('boolean', gettype($this->getValue()));\n }\n\n return $this->getValue();\n }", "public function hasFlag()\n {\n $flag = $this->state->getItem(self::SAFE_ATTRIBUTE_FLAG, null);\n $this->state->setItem(self::SAFE_ATTRIBUTE_FLAG, null);\n\n return $flag;\n }", "public function testToStringWithStringValueFalse()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean('false');\n\t\t// check that the two boolean are equal\n\t\t$this->assertEquals('false', $boolean->__toString());\n\t}", "public function testStringWithZeroCastedToBoolGivesFalse() {\n\t\t$this->assertFalse((bool)'0');\n\t}", "#[@test]\n public function boolCast() {\n $this->assertSourcecodeEquals(\n '$s= (bool)$num;',\n $this->emit('$s= (bool)$num;')\n );\n }", "public function isNegative()\n {\n return $this->amount->isNegative();\n }", "function disable_false() {\r\n return FALSE;\r\n}" ]
[ "0.7759415", "0.7726061", "0.74473184", "0.7393785", "0.73572373", "0.7334865", "0.7206088", "0.7168344", "0.67863894", "0.67777485", "0.67279816", "0.6600152", "0.64929044", "0.64041144", "0.6379429", "0.636509", "0.6354426", "0.6321541", "0.6304143", "0.6290906", "0.6277464", "0.6258131", "0.62443095", "0.6197707", "0.61926836", "0.6189902", "0.6136159", "0.6131839", "0.6121785", "0.60935414", "0.608087", "0.60667634", "0.6057455", "0.60481673", "0.60467064", "0.6033925", "0.6032322", "0.60234404", "0.60230094", "0.6018683", "0.6015275", "0.60127705", "0.5990734", "0.5976594", "0.59695965", "0.59466213", "0.59426224", "0.59417456", "0.59396213", "0.59386", "0.59259653", "0.59223574", "0.5918081", "0.5896763", "0.58932567", "0.5868224", "0.5864465", "0.5863542", "0.58558464", "0.58510643", "0.58350885", "0.5834373", "0.5831088", "0.5824905", "0.5807989", "0.58060014", "0.5804601", "0.5798712", "0.5797901", "0.57785416", "0.57763606", "0.5766852", "0.5765307", "0.5749934", "0.5729694", "0.57284516", "0.5725884", "0.57220453", "0.56965363", "0.5685927", "0.56825054", "0.56722856", "0.5651765", "0.5649855", "0.5647673", "0.5636321", "0.5635627", "0.5625582", "0.5624407", "0.56239426", "0.56228197", "0.56228197", "0.56111735", "0.5603851", "0.56021786", "0.5594793", "0.55898905", "0.5584047", "0.55824953", "0.55795527" ]
0.80876946
0
Use Successible to check for the result a hasSomething method.
public function has($methodName) { //Handle arguments. $args = func_get_args(); //Get the method name. $method = 'has'.ucfirst(array_shift($args)); //Call the method and use it to set the success state. $this->is(!!call_user_func_array([$this, $method], $args)); //Enable chaining. return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isSuccess();", "public function isSuccess();", "public function isSuccess();", "public function isSuccess();", "public function isSuccess(): bool;", "public function isSuccess(): bool;", "public function isSuccess(): bool;", "public function isSuccess():bool;", "public function hasResult();", "public function hasResult();", "public function hasResult();", "abstract public function isSuccessful();", "public function isSuccessful() {}", "function successful()\n\t{\n\t\treturn $this->isSuccess();\n\t}", "public function isSuccessful();", "public function isSuccess() {\n return parent::isSuccess() ? count($this->getResult()) > 0 : FALSE;\n }", "public function succeeded();", "public function getSuccess();", "public function hasResult(){\n return $this->_has(2);\n }", "public function success()\n {\n return ( \n ! empty($this->result) \n && $this->result->getStatus() == 'Success' \n && $this->result->getCode() == 200 );\n }", "public function isOk();", "function isSuccessful() ;", "public function isSuccessful() {\n\n return $this->result->success && 200 == $this->result->status_code;\n }", "public function success();", "public function isSuccess()\n {\n return $this->_success;\n }", "public function isSuccess() : bool {\n return $this->isSuccess;\n }", "public function isSuccessful()\n {\n return true;\n }", "public function isSuccessful()\n {\n return true;\n }", "public function isSuccessful()\n {\n return true;\n }", "public function succeeds(): bool\n {\n return $this->_succeeds;\n }", "public function isSuccess()\n {\n return $this->getStatus() === 'Success' && $this->getCode() === 200;\n }", "function isSuccess()\n\t{\n\t\treturn($this->getStatus() == 'SUCCESS');\n\t}", "public function runSuccess();", "public function isSuccess ()\n {\n return $this->info[ 'http_code' ] == '200';\n }", "public function isSuccessful() : bool\n {\n return ! empty($this->getSuccess());\n }", "public function isSuccess()\n {\n return $this->getResult() == self::RESULT_OK;\n }", "public function hasSuccessHTTPStatus() { return ($this->status == 200); }", "public function isSuccess(): bool\n {\n return $this->get('json', 'error') === false;\n }", "public function wasSuccessful(): bool\n {\n return (bool)$this->success;\n }", "public function isSuccessful()\n {\n return $this->isSuccessful;\n }", "public function isSuccessful()\n {\n return $this->isSuccessful;\n }", "public function wasSuccessful()\n {\n return $this->success;\n }", "public function isSuccessful()\n {\n return false;\n }", "public function isSuccessful()\n {\n return false;\n }", "public function isSuccessful()\n {\n return false;\n }", "public function successful()\n {\n return $this->status() >= 200 && $this->status() < 300;\n }", "protected function success()\n {\n if ( isset( $this->data['status'] ) && $this->data['status'] == 'SUCCESS' ) {\n return true;\n }\n return false;\n }", "public function isSuccessful()\n {\n return isset($this->data['status']) && $this->data['status'] === 'success';\n }", "public function success() {\n\t}", "public function success() {\n }", "abstract public function getIsOk(): bool;", "public function isSuccess() : \\bool\n {\n return $this->success;\n }", "public function wasSuccessful() : bool\n {\n return $this->status === self::STATUS_SUCCESS;\n }", "public function isOk() : bool;", "public function isSuccessful()\n\t{\n\t\t$data = $this->getData();\n\n\t\treturn isset($data['gettransactionResult']);\n\t}", "public function testSuccessIsTrue(): void\n {\n $this->get_accessible_reflection_property('success');\n $this->assertTrue($this->get_reflection_property_value('success'));\n }", "public function isSuccessful()\n {\n return $this->data['status'];\n }", "public function isSuccess()\n {\n return $this->status;\n }", "public function isSuccessful()\n {\n return $this->response->getStatusCode() >= 200 && $this->response->getStatusCode() < 300;\n }", "public abstract function onSuccess();", "public function hadSuccess(){\n\n\t\t\treturn $this->failedQuery;\n\t\t}", "public function IsOk(){\n\t\treturn $this->_isok;\n\t}", "public function isSuccessful()\n {\n return $this->getOperationStatus() === static::OPERATION_STATUS_OK;\n }", "public function youCanMakeSuccessResponses()\n {\n // Arrange...\n $fruit = $this->createTestModel();\n\n // Act...\n $response = $this->responder->success( $fruit );\n\n // Assert...\n $this->assertInstanceOf( JsonResponse::class, $response );\n $this->assertEquals( $response->getStatusCode(), 200 );\n $this->assertEquals( $response->getData( true ), [\n 'status' => 200,\n 'success' => true,\n 'data' => [\n 'name' => 'Mango',\n 'price' => 10,\n 'isRotten' => false\n ]\n ] );\n }", "public function youCanMakeSuccessResponses()\n {\n // Arrange...\n $fruit = $this->createTestModel();\n\n // Act...\n $response = $this->responder->success( $fruit );\n\n // Assert...\n $this->assertInstanceOf( JsonResponse::class, $response );\n $this->assertEquals( $response->getStatusCode(), 200 );\n $this->assertEquals( $response->getData( true ), [\n 'status' => 200,\n 'success' => true,\n 'data' => [\n 'name' => 'Mango',\n 'price' => 10,\n 'isRotten' => false\n ]\n ] );\n }", "public function isSuccess(): bool\n {\n return $this->code >= 200 && $this->code < 300;\n }", "public static function success(): self\n {\n return self::getInstance('SUCCESS');\n }", "public function success()\n {\n return $this->success;\n }", "abstract protected function checkExistingResponse();", "public function isSuccessful(): bool\n {\n return $this->getStatusCode() >= 200 && $this->getStatusCode() < 300;\n }", "public function testSuccess()\n {\n $this->_package->success(\"Successful test\");\n $this->assertTrue($this->_result->wasSuccessful());\n }", "public function success()\n {\n // Success Status Codes\n return (boolean) (substr($this->agent->code(),0,1)==2);\n }", "public function getSuccess() {\n\t\tp(\"Checking success status of all\");\n\t\t// set false if error has occurred, can return false immediately\n\t\tif ( $this->success === false ) {\n\t\t\treturn false;\n\t\t}\n\t\tforeach ($this->fields as $field) {\n\t\t\tif ( $field->getSuccess() === false) {\n\t\t\t\t$this->success = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $this->success;\n\t}", "public function check($callIfSuccess = null, $callIfFail = null)\r\n {\r\n return parent::check([$this, 'callbackSuccess'], [$this, 'callbackFail']);\r\n }", "function pms_success() {\r\n static $pms_success;\r\n\r\n return ( isset($pms_success) ? $pms_success : ( $pms_success = new PMS_Success( null, null ) ) );\r\n }", "public function testSuccessIsTrue(): void\n {\n $this->assertTrue($this->get_reflection_property_value('success'));\n }", "public function isOk() {\n\t\treturn $this->ok;\n\t}", "public function isSuccessful() {\n\t\treturn isset($this->data['status']) && $this->data['status'] >= 200 && $this->data['status'] < 300;\n\t}", "public function isSuccessful(): bool\n {\n return $this->status == 'a';\n }", "public function isSuccessful(): bool\n {\n return $this->json('statusCode') === '00'\n && $this->json('errorCode') === null;\n }", "public function checkSucces() {\n return is_array($this->succes);\n }", "private function _isSuccess($result)\n {\n if(isset($result['SUCCESS']) && in_array(strtolower($result[\"SUCCESS\"]), array('true', 'success'))) {\n return true;\n }\n return false;\n }", "public function isSuccessful()\n {\n return (0 == $this->code);\n }", "public function testAsSuccess(): void\n\t{\n\t\t$my_response_builder = DummyResponseBuilder::asSuccess();\n\t\t$this->assertEquals(DummyResponseBuilder::class, \\get_class($my_response_builder));\n\t}", "public function check($callIfSuccess = null, $callIfFail = null)\n {\n return parent::check([$this, 'callbackSuccess'], [$this, 'callbackFail']);\n }", "public function check($callIfSuccess = null, $callIfFail = null)\n {\n return parent::check([$this, 'callbackSuccess'], [$this, 'callbackFail']);\n }", "public function check($callIfSuccess = null, $callIfFail = null)\n {\n return parent::check([$this, 'callbackSuccess'], [$this, 'callbackFail']);\n }", "public function check($callIfSuccess = null, $callIfFail = null)\n {\n return parent::check([$this, 'callbackSuccess'], [$this, 'callbackFail']);\n }", "public function check($callIfSuccess = null, $callIfFail = null)\n {\n return parent::check([$this, 'callbackSuccess'], [$this, 'callbackFail']);\n }", "public function isSuccess(): bool\n {\n return $this->code >= CODE_OK && $this->code < CODE_BAD_REQUEST;\n }", "public static function success()\n {\n static::returnCode(static::CODE_SUCCESS);\n }", "public function isSuccessful()\r\n {\r\n return is_array($this->data);\r\n }", "public function getSuccess()\n {\n return $this->get('Success');\n }", "function isOK() {\r\n\t\t\r\n\t\treturn $this->ok;\r\n\t}", "abstract public function is_have();", "public function hasResult()\n\t{\n\t\treturn isset($this->result);\n\t}", "function IsOK()\n\t{\n\t\treturn ($this->status == 200);\n\t}", "public function isSuccessful()\n {\n return ($this->statusCode >= 200) && ($this->statusCode < 300);\n }", "public function isSuccessful()\n\t {\n\t\tif ($this->_result instanceof mysqli_result || $this->_result === true)\n\t\t {\n\t\t\treturn true;\n\t\t }\n\t\telse\n\t\t {\n\t\t\treturn false;\n\t\t }\n\t }", "public function isSuccessful()\r\n {\r\n // 訂單請求過銀聯后必須用origRespCode來判斷支付是否成功\r\n if (isset($this->data['origRespCode'])) {\r\n if ($this->data['origRespCode'] === '00') {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n // 訂單沒有請求過銀聯用respCode來判斷支付是否成功\r\n return isset($this->data['respCode']) && $this->data['respCode'] === '00';\r\n }", "public function isSuccessful()\n {\n return isset($this->data['customer_id']) && !empty($this->data['customer_id'])\n && isset($this->data['success']) && $this->data['success']\n && (!isset($this->data['ERROR']) || empty($this->data['ERROR']));\n }" ]
[ "0.7452194", "0.7452194", "0.7452194", "0.7452194", "0.72555435", "0.72555435", "0.72555435", "0.71391", "0.712163", "0.712163", "0.712163", "0.7115634", "0.7107377", "0.69647956", "0.6909933", "0.69063133", "0.68905985", "0.67396134", "0.67212903", "0.66634685", "0.65696776", "0.64893484", "0.6458948", "0.64395535", "0.6402625", "0.63844776", "0.63590276", "0.63590276", "0.63590276", "0.63531053", "0.6345273", "0.63270676", "0.6321129", "0.6316484", "0.6309944", "0.63003224", "0.6293243", "0.6292071", "0.6282162", "0.62693274", "0.62693274", "0.62242323", "0.61972433", "0.61972433", "0.61972433", "0.61759645", "0.61645097", "0.61462545", "0.6146235", "0.6138813", "0.61346644", "0.6125288", "0.6123589", "0.61192465", "0.6104895", "0.6097726", "0.6091994", "0.608458", "0.6081366", "0.60615563", "0.605803", "0.60201347", "0.6003304", "0.59972453", "0.59972453", "0.5985645", "0.59769243", "0.5963241", "0.5954593", "0.5946318", "0.5943639", "0.59362894", "0.59321743", "0.59263474", "0.5914888", "0.59119874", "0.5906562", "0.5899116", "0.58872604", "0.5880729", "0.58733344", "0.5862287", "0.58599555", "0.5852919", "0.58524275", "0.58524275", "0.58524275", "0.58524275", "0.58524275", "0.5845296", "0.5843554", "0.5834915", "0.58323914", "0.5807323", "0.58042115", "0.5803787", "0.5793488", "0.57754356", "0.5761308", "0.5760381", "0.5760007" ]
0.0
-1
Implements "greater than" to determine the success state of Successible.
public function gt($value) { //Extract the raw value. raw($value); //Return the result of is() with a great than check. return $this->is($this->value > $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function greaterThan($value);", "public function greaterThan( $value ) {\n return $this->gt( $value );\n }", "public function isGreaterThan($value)\n\t{\n $this->operator = \"is_greater\";\n $this->value = $value;\n\t}", "public function validateGreaterthan($attribute, $value, $parameters) {\n\n//pr($attribute);\n//pr($this->rules[$attribute], 1);\n//pr($this->getValue($parameters[0]), 1);\n\n\t\t$this->requireParameterCount(1, $parameters, 'greaterthan');\n\n return $value > $this->getValue($parameters[0]);\n }", "private function evalgreaterthanorequal($value, $data){\n\t\t\treturn (bool) $passed = ($data >= $value) ? true : false;\n\t\t}", "public function isGreaterThan(self $that): bool;", "public static function greaterThan($value, $value1)\n {\n return ($value > $value1)?:false;\n }", "public function isGreaterThan($comparison) {\n return $this->is(new NotPossible('cannot be greater than anything'));\n }", "static function greaterThan($value)\n {\n try {\n return call_user_func_array('PHPUnit_Framework_Assert::greaterThan', func_get_args());\n } catch (\\Exception $e) {\n self::callSlack($e, debug_backtrace()[1]);\n }\n }", "function greaterThan($value, $param){\n\n\tif($param['param1'] <= $param['param2'])\n\t\treturn TRUE;\n\treturn FALSE;\n}", "public function greaterThan($num)\n {\n $num = $this->format($num);\n\n return $this->value > $num;\n }", "function is_success ($sc) { \n return $sc >= 200 && $sc < 300; \n}", "public function greaterThan(Money $money): bool;", "public function greaterThanOrEqualTo($value);", "public function should_be_greater_than($expected = null)\n {\n return $this->compare('greater_than', $expected);\n }", "public function globalVarConditionMatchesOnGreaterThanExpression() {}", "public function globalVarConditionMatchesOnGreaterThanExpression() {}", "public function greaterThan($first, $second)\n\t{\n\t\treturn $this->condition($first, '>', $second);\n\t}", "function gt ($value) {\n return '> '.$value;\n }", "public function getStatus() {\n\t\t$status = $this->status;\n\t\tif(!empty($this->messages)) {\n\t\t\tforeach($this->messages as $idx => $message) {\n\t\t\t\tif($message->getStatus() > $status) {\n\t\t\t\t\t$status = $message->getStatus();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $status;\n\t}", "public function greaterThan($value)\n {\n $this->addCompoundConstraint('$gt', $value);\n return $this;\n }", "function mGREATER_EQUAL(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$GREATER_EQUAL;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n // Tokenizer11.g:708:3: ( '>=' ) \n // Tokenizer11.g:709:3: '>=' \n {\n $this->matchString(\">=\"); \n\n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }", "public static function greaterThanOrEqualTo($value, $value1)\n {\n return ($value >= $value1)?:false;\n }", "public function isSuccessful(){\r\n return $this->code>=200&& $this->code <300;\r\n }", "public function greaterThan(TypeInterface $type) : Boolean;", "function o_gt($a, $b) {\n\t\t\treturn Obj::singleton()->greaterThan($a, $b);\n\t\t}", "protected final function AssertGreater( $a, $b )\n {\n $this->observer->OnAssert();\n\n Core::Assert( $a > $b, var_export( $a, true ) . ' is not less than ' . var_export( $b, true ) );\n }", "function mGREATER(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$GREATER;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n // Tokenizer11.g:688:3: ( '>' ) \n // Tokenizer11.g:689:3: '>' \n {\n $this->matchChar(62); \n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }", "public function should_be_greater_than_or_equal_to($expected = null)\n {\n return $this->compare('greater_than_or_equal_to', $expected);\n }", "public function isCompleted()\r\n {\r\n return $this->status >= 100 || $this->status == 2;\r\n }", "function get_transactions_above_value($threshold){\n $str_query=\"select * from pos_transaction where value>='$threshold'\";\n if(!$this->query($str_query)){\n return false;\n }\n return $this->fetch();\n }", "public function passes($attribute, $value)\n {\n if (is_null($this->checkin)) {\n return false;\n } else if ($value > $this->checkin) {\n return true;\n } else\n return false;\n }", "public function isGreaterThanOrEqualTo(self $that): bool;", "public function validateGreaterthaneqip($attribute, $value, $parameters) {\n\n\t\t$this->requireParameterCount(1, $parameters, 'greaterthaneqip');\n\n\t\t$vLastOctet = $this->getLastOctet($value);\n\n\t\t$pLastOctet = $this->getLastOctet($this->getValue($parameters[0]));\n\n return $vLastOctet >= $pLastOctet;\n }", "public function successful()\n {\n return $this->status() >= 200 && $this->status() < 300;\n }", "public function greaterThan(string $field, $value): self\n {\n return $this->add($field, $value, self::GREATER_THAN);\n }", "public function __gt ( $sField, $mValue )\n {\n return \"$sField > $mValue\";\n }", "function cb_reached($current)\n{\n echo \"Current is greater than 5A: \" . $current / 1000.0 . \"\\n\";\n}", "public function gt($field, $value) {\n\t\tif ( ! $this->isNumeric($field))\n\t\t\treturn FALSE;\n\t\t\t\n\t\t$postData = floatval($_POST[$field['name']]);\n\t\tif ($postData <= floatval($value)) {\n\t\t\t$this->_errors[$field['name']]['param'] = $value;\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\treturn TRUE;\n\t}", "public static function gt(mixed $subject, mixed $value): bool\n {\n return $subject > $value;\n }", "public function isSuccessful()\n {\n return 400 > $this->statusCode;\n }", "public function lessThan($value);", "function ge ($value) {\n return '>= '.$value;\n }", "public function greater($b)\n {\n switch (gettype($b)) {\n case 'object':\n switch (true) {\n case $b instanceof Matrix:\n return $this->greaterMatrix($b);\n\n case $b instanceof ColumnVector:\n return $this->greaterColumnVector($b);\n\n case $b instanceof Vector:\n return $this->greaterVector($b);\n }\n\n break;\n\n case 'double':\n case 'integer':\n return $this->greaterScalar($b);\n }\n\n throw new InvalidArgumentException('Cannot compare'\n . ' matrix to the given input.');\n }", "public function isSuccessful() {\n\t\treturn isset($this->data['status']) && $this->data['status'] >= 200 && $this->data['status'] < 300;\n\t}", "public function greaterThan(...$comparisonValues): bool\n {\n $this->ensureCompatibleArgs($comparisonValues);\n return static::compare($this->value, $comparisonValues, [1], $this->internalMaxDecPl());\n }", "public function getSuccessLevel()\n {\n $permitsAwarded = $this->getPermitsAwarded();\n\n $successLevel = self::SUCCESS_LEVEL_PARTIAL;\n if ($permitsAwarded == 0) {\n $successLevel = self::SUCCESS_LEVEL_NONE;\n } elseif ($this->permitsRequired == $permitsAwarded) {\n $successLevel = self::SUCCESS_LEVEL_FULL;\n }\n\n return $successLevel;\n }", "private function evallessthan($value, $data){\n\t\t\treturn (bool) $passed = ($data < $value) ? true : false;\n\t\t}", "public function passed()\n {\n return $this->passed;\n }", "function on_backorder() {\n\t\treturn ($this->_item_availability->available_to_promise <= $this->backorder_quantity);\n\t}", "public function validate( $value )\n\t{\n\t\treturn $value < $this->max;\n\t}", "public function hasFinishState(){\n return $this->_has(5);\n }", "public function passes($attribute, $value)\n {\n return $this->kode != null and $value <= $this->kode->peminjaman;\n }", "public function passes($attribute, $value)\n {\n if ($this->min == null) {\n $this->kosong = true;\n } else {\n if ($value > $this->min) {\n return true;\n } else {\n return false;\n }\n }\n\n }", "protected function checkIfGreaterOrEqualToZero($name, $value)\n {\n }", "public static function whereGreaterThanValue($parameter, $value);", "public function passed(){\n return $this->_passed; //return boolean\n }", "public function passed() {\n return $this->_passed;\n }", "public function isSuccess(): bool\n {\n return $this->code >= 200 && $this->code < 300;\n }", "public function greaterThan($that)\n {\n $amount = $that instanceof Money ? $that->getAmount() : $that;\n\n return $this->amount->isGreaterThan($amount);\n }", "public static function greaterThan ($value, $comparison, $includeEqual=false) {\n if (is_array($value) && count($value)>0) {\n $value = $value[0];\n }\n //error_log(__FUNCTION__.\"(): Check $value is greater than $comparison\".($includeEqual?\" (or equal)\":\"\"));\n return $includeEqual ? ($value>=$comparison) : ($value>$comparison);\n }", "public function hasPassed() {\n \treturn $this < new \\DateTime();\n }", "public function isGreaterThan(IValueHolder $other)\n {\n $lefthand_value = $this->getValue();\n $righthand_value = $other->getValue();\n $lefthand_count = 0;\n $righthand_count = 0;\n\n if (is_array($lefthand_value)) {\n $lefthand_count = count($lefthand_value);\n }\n if (is_array($righthand_value)) {\n $righthand_count = count($righthand_value);\n }\n\n return $lefthand_count > $righthand_count;\n }", "function yy_r142(){$this->_retvalue = '>='; }", "function CheckNums($num1,$num2) { \n if($num2 > $num1) {\n return 'true';\n }\n elseif($num2 < $num1) {\n return 'false';\n }\n else {\n return -1;\n }\n // code goes here\n return $num1; \n \n}", "public function fails()\n {\n return ! $this->passed;\n }", "public function getTooLess(): int\n {\n if ($this->tooLess === null) {\n $this->processFeedbackItems();\n }\n return $this->tooLess;\n }", "public static function greaterThan($expected)\n {\n return new Matcher\\GreaterThan($expected);\n }", "public function check_threshold( $value ) {\n\t\t\tif ( (int) $value <= 0 || (int) $value > 100 ) {\n\t\t\t\t$this->add_admin_notice( __('Please revise your flagging threshold and enter a number between 1 and 100') );\n\t\t\t}\n\t\t\treturn (int) $value;\n\t\t}", "public function toBeGreaterThan($expected, string $message = ''): self\n {\n Assert::assertGreaterThan($expected, $this->actual, $message);\n return $this;\n }", "public static function gt(IInt32\\Type $x, IInt32\\Type $y) : IBool\\Type { // >\n\t\t\treturn IBool\\Type::box(IInt32\\Module::compare($x, $y)->unbox() > 0);\n\t\t}", "public function getSuccessful(): int\n {\n return $this->successful;\n }", "public function isHighestPriority(): bool;", "private function unbalancedSupply() {\n $rapporto = $_POST['quantitaCercata'] / $_POST['quantitaOfferta'];\n if ($rapporto >= 0.5 && $rapporto <= 2)\n return false;\n return true;\n }", "private function getStatus(){\n\t\t$this->valid=$this->checkDatesValidity();\n\t\tif($this->usage==\"once\" && $this->usageCount) $this->valid = false;\n\t\tif($this->usage==\"count\" && $this->usageCount>=$this->maxUsage) $this->valid = false;\n\t\tif($this->type==\"fixed\" && $this->value<=0) $this->valid = false;\n\t\tif($this->type==\"grid\" && !count($this->grid)) $this->valid = false;\n\t}", "public function validate($value)\n {\n return $value >= $this->smaller && $value <= $this->bigger;\n }", "public function assertGreaterThan($expected, $actual, $message = null) {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Action('assertGreaterThan', func_get_args()));\n }", "public function assertGreaterThan($expected, $actual, $message = null) {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Action('assertGreaterThan', func_get_args()));\n }", "public function isSuccessful()\n {\n $status = (int)$this->get('status');\n return $status >= 200 && $status <= 299;\n }", "public function has_goal() {\r\n\t\treturn 0 < $this->get( 'goal' );\r\n\t}", "static function greaterThanOrEqual($value)\n {\n try {\n return call_user_func_array('PHPUnit_Framework_Assert::greaterThanOrEqual', func_get_args());\n } catch (\\Exception $e) {\n self::callSlack($e, debug_backtrace()[1]);\n }\n }", "public function message()\n {\n return 'Date greater that allowed';\n }", "public function hasFinishScore(){\n return $this->_has(3);\n }", "public function isFailed()\r\n {\r\n return $this->status < 0;\r\n }", "private function evallessthanorequal($value, $data){\n\t\t\treturn (bool) $passed = ($data <= $value) ? true : false;\n\t\t}", "public function message()\n {\n return 'Check out date must be greater than Check in date!';\n }", "public function hasMaxAnger(){\r\n return $this->_has(6);\r\n }", "static function assertGreaterThan($expected, $actual, $message = '')\n {\n try {\n return call_user_func_array('PHPUnit_Framework_Assert::assertGreaterThan', func_get_args());\n } catch (\\Exception $e) {\n self::callSlack($e, debug_backtrace()[1]);\n }\n }", "public function bigger($key, $value)\n {\n // /TODO implement me\n return false;\n\n }", "public function isSuccessful()\n {\n return ($this->statusCode >= 200) && ($this->statusCode < 300);\n }", "public function isGreaterOrEqual($other)\n {\n return $this->level >= $other->level;\n }", "public function greaterThanOrEqual($num)\n {\n $num = $this->format($num);\n\n return $this->value >= $num;\n }", "public function globalVarConditionMatchesOnGreaterThanOrEqualExpression() {}", "public function globalVarConditionMatchesOnGreaterThanOrEqualExpression() {}", "public function statusBulu(){\r\n\t\t\treturn parent::lihatBulu();\r\n\t\t}", "public function getLastStatus() \n {\n $sOxid = $this->_oFcpoDb->GetOne(\"SELECT * FROM fcpotransactionstatus WHERE fcpo_txid = '{$this->oxorder__fcpotxid->value}' ORDER BY fcpo_sequencenumber DESC, oxtimestamp DESC\");\n if ($sOxid) {\n $oStatus = $this->_oFcpoHelper->getFactoryObject('fcpotransactionstatus');\n $oStatus->load($sOxid);\n }\n\n $mReturn = (isset($oStatus)) ? $oStatus : false;\n\n return $mReturn;\n }", "function test_if($a,$b){\n\t//code in the dark \n\tif($a>=$b){\n\t\t//echo $a.\" a is bigger than b \".$b;\n\t\techo \"$a a is bigger than b $b\";\n\t}else{\n\t\techo \"b=$b is bigger than a=$a\"; \n\t}\n}", "public function greaterThan($name, $number, $displayName = null)\n {\n if (trim($this->data[$name]) != ''\n && !($this->data[$name] > $number)\n ) {\n $this->errors->add(\n '<b>' .\n $this->displayName($name, $displayName) .\n '</b> must be greater than <b>' . $number . '</b>.'\n );\n return false;\n }\n return true;\n }", "function wp_pre_kses_less_than_callback( $matches ) {\n\tif ( false === strpos($matches[0], '>') )\n\t\treturn esc_html($matches[0]);\n\treturn $matches[0];\n}", "public function passes($attribute, $value)\n {\n $saldo = Cuenta::where('num_cuenta', $this->cuenta)->first()->saldo;\n $saldo_despues = $saldo - $value;\n return $saldo_despues > $this->monto_permitido;\n }" ]
[ "0.6687838", "0.6459306", "0.63129354", "0.6250508", "0.6078044", "0.59613293", "0.59459543", "0.5856086", "0.5786109", "0.57178134", "0.5656702", "0.5611306", "0.5605285", "0.55582494", "0.55421627", "0.55147177", "0.55147177", "0.5464509", "0.54484236", "0.53810406", "0.5334117", "0.5332173", "0.53261745", "0.53088427", "0.52840686", "0.5255462", "0.52359366", "0.5234766", "0.51945275", "0.51852876", "0.5179345", "0.5176163", "0.5167908", "0.5161388", "0.51473904", "0.5131971", "0.5128784", "0.5095572", "0.508693", "0.5086703", "0.50785005", "0.5076059", "0.5072184", "0.50295097", "0.5028332", "0.50027007", "0.49846205", "0.4983644", "0.49798754", "0.49775463", "0.4963651", "0.4961991", "0.49487028", "0.49478254", "0.4944777", "0.49339643", "0.49317628", "0.49271095", "0.4921885", "0.49081987", "0.4904546", "0.49035347", "0.48879594", "0.4883398", "0.4883112", "0.48767704", "0.4863964", "0.48478267", "0.4842863", "0.48238382", "0.48116505", "0.48115778", "0.48087403", "0.47958684", "0.479184", "0.47882366", "0.47866738", "0.47866738", "0.47799802", "0.47761315", "0.47753227", "0.4767571", "0.47557294", "0.47540516", "0.4753561", "0.47514838", "0.47418866", "0.47178468", "0.47114053", "0.47063035", "0.47062847", "0.46936858", "0.46873832", "0.46857575", "0.4681144", "0.46768394", "0.46629035", "0.46582386", "0.46558517", "0.4652992" ]
0.57969266
8
Implements "less than" to determine the success state of Successible.
public function lt($value) { //Extract the raw value. raw($value); //Return the result of is() with a less than check. return $this->is($this->value < $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function lessThan($value);", "public function lessThan( $value ) {\n return $this->lt( $value );\n }", "public static function lessThan($value, $value1)\n {\n return ($value < $value1)?:false;\n }", "function o_lt($a, $b) {\n\t\t\treturn Obj::singleton()->lessThan($a, $b);\n\t\t}", "function lt ($value) {\n return '< '.$value;\n }", "public function isLessThan(self $that): bool;", "public function isLessThan($comparison) {\n return $this->is(new NotPossible('cannot be less than anything'));\n }", "static function lessThan($value)\n {\n try {\n return call_user_func_array('PHPUnit_Framework_Assert::lessThan', func_get_args());\n } catch (\\Exception $e) {\n self::callSlack($e, debug_backtrace()[1]);\n }\n }", "public function lessThan($num)\n {\n $num = $this->format($num);\n\n return $this->value < $num;\n }", "public function should_be_less_than($expected = null)\n {\n return $this->compare('less_than', $expected);\n }", "public static function lt(mixed $subject, mixed $value): bool\n {\n return $subject > $value;\n }", "public static function lt(IInt32\\Type $x, IInt32\\Type $y) : IBool\\Type { // <\n\t\t\treturn IBool\\Type::box(IInt32\\Module::compare($x, $y)->unbox() < 0);\n\t\t}", "function is_success ($sc) { \n return $sc >= 200 && $sc < 300; \n}", "public function lessThan(Money $money): bool;", "public function lessThanOrEqualTo($value);", "public function lessThan($lessThan, $error) {\n if ($this->_exist) {\n array_push($this->_constraints, ['type' => self::LESSTHAN, 'value' => $lessThan, 'message' => $error]);\n }\n\n return $this;\n }", "function wp_pre_kses_less_than($content)\n {\n }", "public function lessThan($value)\n {\n $this->addCompoundConstraint('$lt', $value);\n return $this;\n }", "public function lt($field, $value) {\n\t\tif ( ! $this->isNumeric($field))\n\t\t\treturn FALSE;\n\t\t\t\n\t\t$postData = floatval($_POST[$field['name']]);\n\t\tif ($postData >= floatval($value)) {\n\t\t\t$this->_errors[$field['name']]['param'] = $value;\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\treturn TRUE;\n\t}", "function wp_pre_kses_less_than_callback( $matches ) {\n\tif ( false === strpos($matches[0], '>') )\n\t\treturn esc_html($matches[0]);\n\treturn $matches[0];\n}", "private function evallessthan($value, $data){\n\t\t\treturn (bool) $passed = ($data < $value) ? true : false;\n\t\t}", "public function getTooLess(): int\n {\n if ($this->tooLess === null) {\n $this->processFeedbackItems();\n }\n return $this->tooLess;\n }", "public function smallerThan($first, $second)\n\t{\n\t\treturn $this->condition($first, '<', $second);\n\t}", "protected final function AssertLess( $a, $b )\n {\n $this->observer->OnAssert();\n\n Core::Assert( $a < $b, var_export( $a, true ) . ' is not less than ' . var_export( $b, true ) );\n }", "public function lessThan(string $field, $value): self\n {\n return $this->add($field, $value, self::LESS_THAN);\n }", "public static function lessThan ($value, $comparison, $includeEqual=false) {\n if (is_array($value) && count($value)>0) {\n $value = $value[0];\n }\n //error_log(__FUNCTION__.\"(): Check $value is less than $comparison\".($includeEqual?\" (or equal)\":\"\"));\n return $includeEqual ? ($value<=$comparison) : ($value<$comparison);\n }", "public static function lessThanOrEqualTo($value, $value1)\n {\n return ($value <= $value1)?:false;\n }", "public function greaterThan($value);", "public function __lt ( $sField, $mValue )\n {\n return \"$sField < $mValue\";\n }", "protected abstract function _lt( N $other );", "public function lessThan(TypeInterface $type) : Boolean;", "function o_le($a, $b) {\n\t\t\treturn Obj::singleton()->lessThanOrEqual($a, $b);\n\t\t}", "private function evalgreaterthanorequal($value, $data){\n\t\t\treturn (bool) $passed = ($data >= $value) ? true : false;\n\t\t}", "public function lessThan(...$comparisonValues): bool\n {\n $this->ensureCompatibleArgs($comparisonValues);\n return static::compare($this->value, $comparisonValues, [-1], $this->internalMaxDecPl());\n }", "function wp_pre_kses_less_than_callback($matches)\n {\n }", "public function less( $rhs ) {\n return ( $this->sec < $rhs->sec ) ||\n (( $this->sec == $rhs->sec ) && ($this->nsec < $rhs->nsec)); }", "public function lessThan($that)\n {\n $amount = $that instanceof Money ? $that->getAmount() : $that;\n\n return $this->amount->isLessThan($amount);\n }", "function get_transactions_above_value($threshold){\n $str_query=\"select * from pos_transaction where value>='$threshold'\";\n if(!$this->query($str_query)){\n return false;\n }\n return $this->fetch();\n }", "public function should_be_less_than_or_equal_to($expected = null)\n {\n return $this->compare('less_than_or_equal_to', $expected);\n }", "public function lt(...$comparisonValues): bool\n {\n $this->ensureCompatibleArgs($comparisonValues);\n return static::compare($this->value, $comparisonValues, [-1], $this->internalMaxDecPl());\n }", "public function hasPassed() {\n \treturn $this < new \\DateTime();\n }", "public function smaller($key, $value)\n {\n // /TODO implement me\n return false;\n\n }", "public function testCompareReturnsIntIfXIsEqualToInclusiveLowerBound()\n {\n $x = 1;\n \n $interval = (new Interval())\n ->setIsLowerInclusive(true)\n ->setLower(1)\n ->setUpper(1 + 1);\n \n $this->assertEquals(0, $interval->compare($x));\n \n return;\n }", "public static function lte(mixed $subject, mixed $value): bool\n {\n return $subject >= $value;\n }", "public static function le(IInt32\\Type $x, IInt32\\Type $y) : IBool\\Type { // <=\n\t\t\treturn IBool\\Type::box(IInt32\\Module::compare($x, $y)->unbox() <= 0);\n\t\t}", "public function validateLessthan($attribute, $value, $parameters) {\n\n\t\t$this->requireParameterCount(1, $parameters, 'lessthan');\n\n return $value < $this->getValue($parameters[0]);\n }", "function greaterThan($value, $param){\n\n\tif($param['param1'] <= $param['param2'])\n\t\treturn TRUE;\n\treturn FALSE;\n}", "public function lessThanOrEquals( $value ) {\n return $this->lte( $value );\n }", "public function lessThanOrEqual($num)\n {\n $num = $this->format($num);\n\n return $this->value < $num;\n }", "public function isSuccessful(){\r\n return $this->code>=200&& $this->code <300;\r\n }", "function cmp_function($value1, $value2)\n{\n if($value1 == $value2) {\n return 0;\n }\n else if($value1 > $value2) {\n return 1;\n }\n else {\n return -1;\n }\n}", "public function passes($attribute, $value)\n {\n if ($this->min == null) {\n $this->kosong = true;\n } else {\n if ($value > $this->min) {\n return true;\n } else {\n return false;\n }\n }\n\n }", "function CheckNums($num1,$num2) { \n if($num2 > $num1) {\n return 'true';\n }\n elseif($num2 < $num1) {\n return 'false';\n }\n else {\n return -1;\n }\n // code goes here\n return $num1; \n \n}", "public function testGetIsLowerInclusive()\n {\n $interval = new Interval();\n \n $this->setProperty('isLowerInclusive', $interval, true);\n \n $this->assertTrue($interval->getIsLowerInclusive());\n \n return;\n }", "public function isLessThan(IValueHolder $other)\n {\n $lefthand_value = $this->getValue();\n $righthand_value = $other->getValue();\n $lefthand_count = 0;\n $righthand_count = 0;\n\n if (is_array($lefthand_value)) {\n $lefthand_count = count($lefthand_value);\n }\n if (is_array($righthand_value)) {\n $righthand_count = count($righthand_value);\n }\n\n return $lefthand_count > $righthand_count;\n }", "public function lt($field)\n {\n return $this->rule(\"lt:$field\");\n }", "public function getStatus() {\n\t\t$status = $this->status;\n\t\tif(!empty($this->messages)) {\n\t\t\tforeach($this->messages as $idx => $message) {\n\t\t\t\tif($message->getStatus() > $status) {\n\t\t\t\t\t$status = $message->getStatus();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $status;\n\t}", "public function passes($attribute, $value)\n {\n if (is_null($this->checkin)) {\n return false;\n } else if ($value > $this->checkin) {\n return true;\n } else\n return false;\n }", "public function isLessThanOrEqualTo(self $that): bool;", "public function testCompareReturnsIntIfXIsAboveInterval()\n {\n $x = 999;\n \n $interval = (new Interval())->setLower(-INF)->setUpper(0);\n \n $this->assertEquals(1, $interval->compare($x));\n \n return;\n }", "public function assertLessThan($expected, $actual, $message = null) {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Action('assertLessThan', func_get_args()));\n }", "public function assertLessThan($expected, $actual, $message = null) {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Action('assertLessThan', func_get_args()));\n }", "public static function lessThan($expected)\n {\n return new Matcher\\LessThan($expected);\n }", "public function passes($attribute, $value)\n {\n return $this->kode != null and $value <= $this->kode->peminjaman;\n }", "function ge ($value) {\n return '>= '.$value;\n }", "public function isSuccessful()\n {\n return 400 > $this->statusCode;\n }", "public static function whereLessThanValue($parameter, $value);", "public function validateGreaterthan($attribute, $value, $parameters) {\n\n//pr($attribute);\n//pr($this->rules[$attribute], 1);\n//pr($this->getValue($parameters[0]), 1);\n\n\t\t$this->requireParameterCount(1, $parameters, 'greaterthan');\n\n return $value > $this->getValue($parameters[0]);\n }", "function is_redirect ($sc) { \n return $sc >= 300 && $sc < 400; \n}", "private function evallessthanorequal($value, $data){\n\t\t\treturn (bool) $passed = ($data <= $value) ? true : false;\n\t\t}", "public function successful()\n {\n return $this->status() >= 200 && $this->status() < 300;\n }", "public function compare();", "function comparison($x, $y)\n{\n\tif ($x > $y) {\n\t\techo 'The first number is larger';\n\t} elseif ($x < $y) {\n\t\techo 'Second number is larger';\n\t} elseif ($x = $y) {\n\t\techo 'The two numbers are identical';\n\t}\n}", "public function toBeLessThan($expected, string $message = ''): self\n {\n Assert::assertLessThan($expected, $this->actual, $message);\n return $this;\n }", "public function isGreaterThan(self $that): bool;", "function compare(la_time $other) {\n if($this->counter == $other->counter) {\n if( $this->actor_id < $other->actor_id) {\n return -1;\n }\n else if( $this->actor_id > $other->actor_id) {\n return 1;\n }\n else {\n return 0;\n }\n }\n else if ($this->counter > $other->counter) {\n return 1;\n }\n else if ($this->counter < $other->counter) {\n return -1;\n }\n }", "static function lessThanOrEqual($value)\n {\n try {\n return call_user_func_array('PHPUnit_Framework_Assert::lessThanOrEqual', func_get_args());\n } catch (\\Exception $e) {\n self::callSlack($e, debug_backtrace()[1]);\n }\n }", "function wp_pre_kses_less_than( $text ) {\n\treturn preg_replace_callback('%<[^>]*?((?=<)|>|$)%', 'wp_pre_kses_less_than_callback', $text);\n}", "function above (float $value, float $min) : float\n{\n return $value < $min ? $min : $value;\n}", "static function assertLessThan($expected, $actual, $message = '')\n {\n try {\n return call_user_func_array('PHPUnit_Framework_Assert::assertLessThan', func_get_args());\n } catch (\\Exception $e) {\n self::callSlack($e, debug_backtrace()[1]);\n }\n }", "public function whereLessThan()\n {\n list($field, $value) = $this->extractQueryToFieldAndValue(func_get_args());\n $this->_conditions[self::WHERELT][$field] = [self::OPERATORS['lt'] => $value];\n return $this;\n }", "public static function greaterThan($value, $value1)\n {\n return ($value > $value1)?:false;\n }", "public function testIsLowerInclusiveReturnsTrueIfLowerIsInclusive()\n {\n $interval = new Interval();\n \n $this->setProperty('isLowerInclusive', $interval, true);\n \n $this->assertTrue($interval->isLowerInclusive());\n \n return;\n }", "public function lt(string $column, $value = null, $and = true)\n {\n return $and ? $this->and($column, '<', $value) : $this->or($column, '<', $value);\n }", "public function isSuccess(): bool\n {\n return $this->code >= 200 && $this->code < 300;\n }", "public function getWayTooLess(): int\n {\n if ($this->wayTooLess === null) {\n $this->processFeedbackItems();\n }\n return $this->wayTooLess;\n }", "function min() { return $this->min; }", "public function lessThan($name, $number, $displayName = null)\n {\n if (trim($this->data[$name]) != ''\n && !($this->data[$name] < $number)\n ) {\n $this->errors->add(\n '<b>' .\n $this->displayName($name, $displayName) .\n '</b> must be less than <b>' . $number . '</b>.'\n );\n return false;\n }\n return true;\n }", "public function passes($attribute, $value)\n {\n \n //\n $InventoryCode = InventoryCode::where('code', $this->inventory_code)->where('stock_id', $this->stockId)->first();\n if ( $InventoryCode->qty < $value) { \n\n $this->inventory_code_qty = $InventoryCode->qty;\n return false;\n\n } else { \n return true;\n }\n }", "public function greaterThan( $value ) {\n return $this->gt( $value );\n }", "function compare_coal_power($coal1,$coal2){\n\t// must return an integer\n\t$val = $coal1['power']-$coal2['power'];\n\n\tif($val>0){\n\t\treturn -1;\n\t} elseif ($val<0) {\n\t\treturn 1;\n\t} else {\n\t\treturn 0;\n\t}\n}", "public function lt($str, $field): bool\n\t{\n return is_numeric($str) ? (bool)($str < (int)$this->getValue($field)) : false;\n }", "function comp($a,$b)\r\n{\r\n\treturn ($a[0] < $b[0]);\r\n}", "public function getSuccessLevel()\n {\n $permitsAwarded = $this->getPermitsAwarded();\n\n $successLevel = self::SUCCESS_LEVEL_PARTIAL;\n if ($permitsAwarded == 0) {\n $successLevel = self::SUCCESS_LEVEL_NONE;\n } elseif ($this->permitsRequired == $permitsAwarded) {\n $successLevel = self::SUCCESS_LEVEL_FULL;\n }\n\n return $successLevel;\n }", "public function testSetIsLowerInclusive()\n { \n $interval = new Interval();\n \n $this->assertSame($interval, $interval->setIsLowerInclusive(true));\n $this->assertTrue($this->getProperty('isLowerInclusive', $interval));\n \n return;\n }", "public function testCompareReturnsIntIfXIsBelowInterval()\n {\n $x = -999;\n \n $interval = (new Interval())->setLower(0)->setUpper(INF);\n \n $this->assertEquals(-1, $interval->compare($x));\n \n return;\n }", "public function getPriority()\n {\n return 75;\n }", "function getMinValue() { return $this->readMinValue(); }", "public function durationLT() {\r\n throw new Exception(\"Not implemented\");\r\n }", "function gt ($value) {\n return '> '.$value;\n }" ]
[ "0.6960609", "0.6534999", "0.63193184", "0.625163", "0.6097814", "0.5979607", "0.5890857", "0.5876831", "0.58491683", "0.58404714", "0.5789346", "0.57031083", "0.56691885", "0.5661443", "0.56422555", "0.5603742", "0.55913955", "0.55644524", "0.5562083", "0.5557042", "0.554159", "0.5540974", "0.5501581", "0.5494089", "0.54859865", "0.5448216", "0.5445759", "0.5444374", "0.53872114", "0.5343767", "0.532317", "0.52761513", "0.52735615", "0.5270833", "0.52354", "0.52343154", "0.5199032", "0.5150717", "0.5139775", "0.51248854", "0.50869626", "0.5085598", "0.5079132", "0.50642407", "0.5032244", "0.5012001", "0.5010195", "0.50060135", "0.49774694", "0.497691", "0.49710557", "0.49665198", "0.4956532", "0.4949899", "0.49451727", "0.4942509", "0.49289456", "0.49267226", "0.49262244", "0.4919815", "0.49184272", "0.49184272", "0.4913324", "0.4911782", "0.4905362", "0.49010578", "0.488836", "0.4878616", "0.4860277", "0.48563325", "0.4844348", "0.48288575", "0.4821295", "0.48106283", "0.4800018", "0.47974104", "0.4784537", "0.477493", "0.4767707", "0.47603098", "0.47489235", "0.47438812", "0.47405788", "0.4728049", "0.4716131", "0.47109434", "0.47040704", "0.4697937", "0.46927303", "0.46856785", "0.4684698", "0.46842837", "0.4665947", "0.46646664", "0.4663272", "0.46630645", "0.46612766", "0.46525156", "0.4647754", "0.46448654" ]
0.6270885
3
Implements an equality check to determine the success state of Successible.
public function eq($value) { return $this->is($this->value == unwrap($value)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isSuccessful(): bool\n {\n return $this->status == 'a';\n }", "function isSuccess()\n\t{\n\t\treturn($this->getStatus() == 'SUCCESS');\n\t}", "public function wasSuccessful() : bool\n {\n return $this->status === self::STATUS_SUCCESS;\n }", "abstract public function isSuccessful();", "function successful()\n\t{\n\t\treturn $this->isSuccess();\n\t}", "public function isSuccess();", "public function isSuccess();", "public function isSuccess();", "public function isSuccess();", "public function isSuccess()\n {\n return $this->getResult() == self::RESULT_OK;\n }", "public function isSuccess(): bool;", "public function isSuccess(): bool;", "public function isSuccess(): bool;", "public function success()\n {\n return ( \n ! empty($this->result) \n && $this->result->getStatus() == 'Success' \n && $this->result->getCode() == 200 );\n }", "public function isSuccessful() {}", "public function isSuccessful() : bool\n {\n return ! empty($this->getSuccess());\n }", "public function isSuccess()\n {\n return $this->getStatus() === 'Success' && $this->getCode() === 200;\n }", "public function isSuccessful() {\n return (2 === $this->getStatusClass());\n }", "public function isSuccessful();", "public function isSuccessful() : bool\n {\n return in_array($this->getStatusCode(), [static::$STATUS_OK, static::$STATUS_NOT_CHANGED]);\n }", "public function isSuccessful() {\n\n return $this->result->success && 200 == $this->result->status_code;\n }", "public function isSuccess():bool;", "public function isSuccessful()\n {\n return $this->getOperationStatus() === static::OPERATION_STATUS_OK;\n }", "public function isSuccess()\n {\n return $this->_success;\n }", "public function wasSuccessful(): bool\n {\n return (bool)$this->success;\n }", "public function success()\n {\n // Success Status Codes\n return (boolean) (substr($this->agent->code(),0,1)==2);\n }", "public function isSuccess()\n {\n return $this->status;\n }", "public function isStatusSuccessful()\n\t{\n\t\treturn $this->status == self::STATUS_SUCCESSFUL;\n\t}", "public function isSuccess() : bool {\n return $this->isSuccess;\n }", "public function isSuccessful()\n {\n return true;\n }", "public function isSuccessful()\n {\n return true;\n }", "public function isSuccessful()\n {\n return true;\n }", "public function isSuccessful()\n {\n return (0 == $this->code);\n }", "public function isSuccessful()\n {\n return $this->isSuccessful;\n }", "public function isSuccessful()\n {\n return $this->isSuccessful;\n }", "public function isSuccessful()\n {\n return isset($this->data['status']) && $this->data['status'] === 'success';\n }", "public function succeeds(): bool\n {\n return $this->_succeeds;\n }", "public function isSuccessful()\n {\n if (!isset($this->data['error'])) {\n return $this->data['code'] === 'SUCCESS' && $this->data['transactionResponse']['state'] === 'APPROVED';\n }\n return false;\n }", "public function isSuccessful()\n {\n return false;\n }", "public function isSuccessful()\n {\n return false;\n }", "public function isSuccessful()\n {\n return false;\n }", "public function getSuccess() {\n\t\tswitch ($this->status) {\n\t\t\tcase self::STATUS_SUCCESS :\n\t\t\tcase self::STATUS_PENDING :\n\t\t\tcase self::STATUS_AWAITING_AUTOMATIC_FUNDS :\n\t\t\t\treturn TRUE;\n\t\t\tdefault :\n\t\t\t\treturn FALSE;\n\t\t}\n\t}", "protected function success()\n {\n if ( isset( $this->data['status'] ) && $this->data['status'] == 'SUCCESS' ) {\n return true;\n }\n return false;\n }", "public function isOk()\n {\n return $this->status == 'success' || $this->status == 'incomplete';\n }", "public function wasSuccessful()\n {\n return $this->success;\n }", "public function successful()\n {\n return $this->status() >= 200 && $this->status() < 300;\n }", "public function isSuccess() {\n return parent::isSuccess() ? count($this->getResult()) > 0 : FALSE;\n }", "public function isSuccess() : \\bool\n {\n return $this->success;\n }", "function isSuccessful() ;", "public function isSuccessful() {\n\t\t$status = $this->checkReturnHashPayment();\n\t\tif ($status !== true) {\n\t\t\t$this->message = $status;\n\t\t}\n\t\treturn $status === true;\n\t}", "public function isSuccess ()\n {\n return $this->info[ 'http_code' ] == '200';\n }", "public function getSuccess() {\n\t\tp(\"Checking success status of all\");\n\t\t// set false if error has occurred, can return false immediately\n\t\tif ( $this->success === false ) {\n\t\t\treturn false;\n\t\t}\n\t\tforeach ($this->fields as $field) {\n\t\t\tif ( $field->getSuccess() === false) {\n\t\t\t\t$this->success = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $this->success;\n\t}", "public function ok(): bool\n {\n return ($this->getState() === self::STATE_OK);\n }", "public function isSuccessful()\n {\n return $this->data['status'];\n }", "public function isSuccessful(): bool\n {\n return $this->json('statusCode') === '00'\n && $this->json('errorCode') === null;\n }", "public function isOk();", "public function isSuccessful() : bool\n {\n if ($this->getOrderStatus()) {\n return $this->isCompleted() && $this->isNotError();\n }\n\n return $this->isNotError();\n }", "public function testSuccessIsTrue(): void\n {\n $this->get_accessible_reflection_property('success');\n $this->assertTrue($this->get_reflection_property_value('success'));\n }", "public function isOK()\n {\n if($this -> status == \"OK\")\n return true;\n else\n return false;\n }", "public function isSuccessful()\n {\n return ($this->statusCode >= 200) && ($this->statusCode < 300);\n }", "public function hasSuccessHTTPStatus() { return ($this->status == 200); }", "public function isSuccessful()\n {\n return isset($this->data['customer_id']) && !empty($this->data['customer_id'])\n && isset($this->data['success']) && $this->data['success']\n && (!isset($this->data['ERROR']) || empty($this->data['ERROR']));\n }", "public function isSuccessful(): bool\n {\n return $this->getStatusCode() >= 200 && $this->getStatusCode() < 300;\n }", "public function isSuccessful()\n {\n $status = (int)$this->get('status');\n return $status >= 200 && $status <= 299;\n }", "public function isSuccess(): bool\n {\n return $this->code >= CODE_OK && $this->code < CODE_BAD_REQUEST;\n }", "public function isSuccessful()\n\t{\n\t\t$data = $this->getData();\n\n\t\treturn isset($data['gettransactionResult']);\n\t}", "public function isSuccessful()\n {\n return $this->response->getStatusCode() >= 200 && $this->response->getStatusCode() < 300;\n }", "public function succeeded();", "public function isSuccessful()\n {\n return 0 === $this->getExitCode();\n }", "function isOk(){\n\n\t\treturn $this->status == $this::COD_STATUS_OK;\n\t\n\t}", "public function isSuccess(): bool\n {\n return $this->code >= 200 && $this->code < 300;\n }", "public function isSuccessful(): bool\n {\n $statusCode = $this->getStatusCode();\n\n return ($statusCode >= 200 && $statusCode < 300) || $statusCode == 304;\n }", "public function isOk() {\n\t\treturn $this->ok;\n\t}", "public function testSuccessIsTrue(): void\n {\n $this->assertTrue($this->get_reflection_property_value('success'));\n }", "public function isSuccessful(): bool\n {\n return ($this->statusCode >= 200 && $this->statusCode <= 299);\n }", "public function isSuccessful()\r\n {\r\n // 訂單請求過銀聯后必須用origRespCode來判斷支付是否成功\r\n if (isset($this->data['origRespCode'])) {\r\n if ($this->data['origRespCode'] === '00') {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n // 訂單沒有請求過銀聯用respCode來判斷支付是否成功\r\n return isset($this->data['respCode']) && $this->data['respCode'] === '00';\r\n }", "public function isSuccessful() {\n\t\treturn isset($this->data['status']) && $this->data['status'] >= 200 && $this->data['status'] < 300;\n\t}", "public static function success()\n {\n static::returnCode(static::CODE_SUCCESS);\n }", "public function isSuccessful()\n {\n return count($this->errors) === 0;\n }", "function isOK() {\r\n\t\t\r\n\t\treturn $this->ok;\r\n\t}", "public function wasSuccess() {\n return $this->requestStatus;\n }", "public function assertSuccessResult($data) {\n $this->assertTrue(isset($data->success));\n $this->assertTrue($data->success);\n }", "public function isSuccessful(): bool\n {\n return \\in_array($this->getStatusCode(), [200, 201, 202, 204, 205]);\n }", "public function getSuccess();", "public function isSuccessful()\n\t {\n\t\tif ($this->_result instanceof mysqli_result || $this->_result === true)\n\t\t {\n\t\t\treturn true;\n\t\t }\n\t\telse\n\t\t {\n\t\t\treturn false;\n\t\t }\n\t }", "public function isRequestSuccessful()\n {\n return strtolower($this->transaction->getMessages()->getResultCode()) === 'ok';\n }", "public function isFailure() {\n\n return !$this->isSuccessful();\n }", "public function isSuccessful(){\r\n return $this->code>=200&& $this->code <300;\r\n }", "public static function success(): self\n {\n return self::getInstance('SUCCESS');\n }", "public function isSuccessful()\n {\n return $this->isSuccessfulQuery() && $this->isSuccessfulTransaction();\n }", "function IsOK()\n\t{\n\t\treturn ($this->status == 200);\n\t}", "public function isSuccess(): bool\n {\n return $this->get('json', 'error') === false;\n }", "public function isSuccessful()\n {\n return in_array($this->getCode(), ['300', '301', '302', '400']);\n }", "public function isSuccessful()\n {\n return !$this->isRedirect() && !isset($this->data['payment_details']['reason_for_failure']);\n }", "public function isAuditSuccess()\n {\n return $this->auditSuccess;\n }", "public function testSuccess()\n {\n $this->_package->success(\"Successful test\");\n $this->assertTrue($this->_result->wasSuccessful());\n }", "public function getSuccess()\r\n {\r\n return $this->success;\r\n }", "public function IsOk(){\n\t\treturn $this->_isok;\n\t}", "public function isSuccessful()\n {\n return 400 > $this->statusCode;\n }", "public function getSuccess()\n {\n return $this->success;\n }", "public function success()\n {\n return $this->success;\n }" ]
[ "0.66990393", "0.668153", "0.6635364", "0.6618722", "0.6610755", "0.65767026", "0.65767026", "0.65767026", "0.65767026", "0.65743464", "0.6562795", "0.6562795", "0.6562795", "0.6515839", "0.6492062", "0.6488299", "0.6474746", "0.6466807", "0.6434632", "0.64268464", "0.6424079", "0.6407448", "0.6387335", "0.63283515", "0.6315177", "0.63123864", "0.63106585", "0.6308591", "0.6268232", "0.6261421", "0.6261421", "0.6261421", "0.6226273", "0.62243325", "0.62243325", "0.6224324", "0.6200015", "0.6188534", "0.6148848", "0.6148848", "0.6148848", "0.61455804", "0.6124218", "0.61236066", "0.61168593", "0.60940176", "0.6093711", "0.6077693", "0.60716075", "0.60712093", "0.60701287", "0.60273683", "0.59854746", "0.59792787", "0.5972648", "0.5950957", "0.5938057", "0.5916123", "0.5903444", "0.58962286", "0.5893689", "0.58724695", "0.58638775", "0.58583355", "0.58552825", "0.5846445", "0.5845082", "0.5842685", "0.58239394", "0.5816936", "0.5811285", "0.58083785", "0.5802789", "0.5802128", "0.5795719", "0.5776075", "0.57682884", "0.57645226", "0.5760316", "0.5750494", "0.57492566", "0.5736245", "0.57343626", "0.57263434", "0.5694684", "0.5681156", "0.5679061", "0.5669754", "0.5656406", "0.5655717", "0.5622152", "0.5617405", "0.55978", "0.55939806", "0.55833185", "0.5582936", "0.5557257", "0.55560166", "0.55434", "0.55425286", "0.55382705" ]
0.0
-1
Posting a message to a room.
public function postMessage(SlackHttpPayloadServicePostMessage $message) { return $this->decodeRequest($this->slackHttpService->requestWithArguments($this->mainApi . '.' . 'postMessage', $message->getPayload())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sendMessage()\n {\n $userId = auth()->user()->id;\n\n // Save the message\n Message::create([\n 'room_id' => $this->roomId,\n 'user_id' => $userId,\n 'message' => $this->message,\n ]);\n\n // Remove the value of the message after saving\n $this->message = \"\";\n\n // Prompt the server that we sent a message\n $this->dispatchBrowserEvent('chat-send-message', [\n 'room_id' => $this->roomId,\n 'user_id' => $userId,\n ]);\n }", "public function postAction() {\n\t\t$this->sendMessage();\n\t}", "public function writeMessage ()\n {\n $authObject = new Authenticate();\n $authObject->validateWriteMessage($_GET[\"controller\"]);\n \n $body = $_POST[\"body\"];\n $subject = $_POST[\"subject\"];\n \n $sentto = $_POST[\"sentto\"];\n \n $this->createUser();\n \n if (($this->_objUser->messageSend($body, $subject, $sentto)) == false) {\n $this->setCustomMessage(\"ErrorMessage\", \"Problem in sending message\");\n } else {\n $this->setCustomMessage(\"SuccessMessage\", \"Message sent successfully\");\n }\n }", "public function postMessage($name, $message, $color) {\n\t\t// real_escape_string prevents hacking of the database\n\t\t$name = $this -> mysqli -> real_escape_string($name);\n\t\t$message = $this -> mysqli -> real_escape_string($message);\n\t\t$color = $this -> mysqli -> real_escape_string($color);\n\n\t\t// sends message to the database\n\t\t$query = 'INSERT INTO chat(posted_on, user_name, message, color) ' . 'VALUES (NOW(), \"' . $name . '\" , \"' . $message . '\",\"' . $color . '\")';\n\t\t$result = $this -> mysqli -> query($query);\n\t}", "function postNewMessage($user_id, $thread_id, $message)\n\t\t{\n\t\t\t$query=sqlite_exec($this->connection, \"INSERT INTO message(thread_id, user_id, message, date) VALUES($thread_id, $user_id, $message, NOW())\");\n\t\t}", "public function reply_post() {\n\t\t$data['uid'] = $this->input->get('uid');\n\t\t$data['_id'] = $this->input->get('_id');\n\t\t$data['text'] = $this->input->get('text');\n\t\t$data['ts'] = now();\n\t\t\n\t\t$this->Messages_model->reply($data);\n\t}", "public function post($msg) {\r\n\t\tif (isset ( $_GET ['oauth_token'] )) {\r\n\t\t\t/* exchange the request token for access token */\r\n\t\t\t$key = $_COOKIE ['key'];\r\n\t\t\t$secret = $_COOKIE ['secret'];\r\n\t\t\t$result = $this->client->getAccessToken ( $key, $secret );\r\n\t\t\t$key = $result [\"oauth_token\"];\r\n\t\t\t$secret = $result [\"oauth_token_secret\"];\r\n\t\t\tif ($key) {\r\n\t\t\t\t\r\n\t\t\t\t/* access success, let's say something. */\r\n\t\t\t\t$this->client->programmaticLogin ( $key, $secret );\r\n\t\t\t\t//echo 'logged in.';\r\n\t\t\t\t$entry = new Zend_Gdata_Douban_BroadcastingEntry();\r\n\t\t\t\t$content = new Zend_Gdata_App_Extension_Content($msg);\r\n\t\t\t\t$entry->setContent ( $content );\r\n\t\t\t\t$entry = $this->client->addBroadcasting ( \"saying\", $entry );\r\n\t\t\t\t//echo '<br/>you just posted: ' . $entry->getContent ()->getText ();\r\n\t\t\t} else {\r\n\t\t\t\techo 'Oops, get access token failed';\r\n\t\t\t}\r\n\t\t} \r\n\r\n\t}", "public function create_post() {\n\t\t$data['uid'] = $this->input->get('uid');\n\t\t$data['to'] = $this->input->get('to');\n\t\t$data['text'] = $this->input->get('text');\n\t\t$data['ts'] = now();\n\n\t\t$this->Messages_model->create($data);\n\t}", "function postMessage($message)\n {\n require('../config.php');\n $connection = mysqli_connect($bdd_host, $bdd_user, $bdd_password, $bdd_database, $bdd_port);\n if (!$connection) {\n return false;\n }\n $text = $message['text'];\n $username = $message['user'];\n $date = $message['date'];\n $userId = retrieveUserId($username, $connection);\n\n $query = \"INSERT INTO message (text, date, user_id)\n VALUES('$text', '$date', $userId)\";\n $result = mysqli_query($connection, $query);\n if (!$result) {\n mysqli_close($connection);\n return false;\n }\n userSentMessage($userId, $connection);\n mysqli_close($connection);\n return true;\n }", "public function sendMessage(BotMessage $message): void;", "public static function postMessage\n\t(\n\t\t$channelID\t\t// <int> The channel ID to post a message to.\n\t,\t$uniID\t\t\t// <int> The UniID posting a message.\n\t,\t$message\t\t// <str> The message being posted to the chat.\n\t)\t\t\t\t\t// RETURNS <bool> TRUE on success, FALSE on failure.\n\t\n\t// AppChat::postMessage($channelID, $uniID, $message);\n\t{\n\t\treturn Database::query(\"REPLACE INTO chat_messages (channel_id, date_posted, uni_id, message) VALUES (?, ?, ?, ?)\", array($channelID, microtime(true), $uniID, $message));\n\t}", "public static function postMessage() {\n $con = pg_connect(\"host=\".CON_HOST.\" dbname=\".CON_DBNAME.\" user=\".CON_USER.\" password=\".CON_PASSWORD.\"\")\n or die (\"Could not connect to server.\");\n\n $query = \"INSERT INTO message (message, employee, start_date, end_date, removed)\n VALUES ('\". $_REQUEST['message'] .\"','\". $_REQUEST['name'] .\"','\". $_REQUEST['dateFrom'] .\"','\". $_REQUEST['dateTill'] .\"', false)\";\n\n pg_query($con, $query) or die(\"Cannot execute the query.\");\n return true;\n }", "public function postMessage(Request $request)\n {\n info($request->all());\n if(!empty($request->post('event')) && !empty($request->post('event')['text']) && empty($request->post('event')['bot_id'])) {\n\t $event = $request->post('event');\t\n\t $channel = $event['channel'];\n\t $question = $event['text'];\n\t $user = $event['user'];\n dispatch(new PostMessageJob($this->botService, $question, $channel, $user));\n die(json_encode(array('status' => 200, 'message' => 'OK')));\n }\n\n return null;\n }", "function artmo_send_private_message($to, $from, $message){\n if ($from==$to) return;\n // Create conversation and add message\n $_POST['content'] = $message;\n $conversation_id = UM()->Messaging_API()->api()->create_conversation( $to, $from );;\n $_POST['content'] = \"\";\n do_action('um_after_new_message', $to, $from, $conversation_id );\n}", "public function handle(PostMessage $command)\n {\n $actor = $command->actor;\n $attributes = $command->data['attributes'];\n $ip_address = $command->ip_address;\n\n $content = $attributes['message'];\n $chat_id = $attributes['chat_id'];\n\n $chat = $this->chats->findOrFail($chat_id, $actor);\n\n $this->assertCan(\n $actor,\n 'pushedx-chat.permissions.chat'\n );\n\n $this->floodgate->assertNotFlooding($actor, $chat);\n\n $message = Message::build(\n $content,\n $actor->id,\n Carbon::now(),\n $chat->id,\n $ip_address\n );\n\n $this->validator->assertValid($message->getDirty());\n\n $message->save();\n $message->event = 'message.post';\n\n return $message;\n }", "private function sendMessage()\n {\n try\n {\n $request = $_POST;\n\n $uid = userid();\n\n if (!$uid)\n throw_error_msg( lang(\"you_not_logged_in\") ) ;\n\n if( !isset($request['username']) || $request['username']==\"\" )\n throw_error_msg(\"username not provided\");\n\n if( !isset($request['subject']) || $request['subject']==\"\" )\n throw_error_msg(\"subject not provided\");\n\n if( !isset($request['content']) || $request['content']==\"\" )\n throw_error_msg(\"content not provided\");\n\n $array['is_pm'] = true;\n $array['from'] = $uid;\n $array['to'] = $request['username'];\n $array['subj'] = mysql_clean($request['subject']);\n $array['content'] = mysql_clean($request['content']);\n\n global $cbpm;\n $rs = $cbpm->send_pm($array);\n\n if( error() )\n {\n throw_error_msg(error('single')); \n }\n\n if( msg() )\n {\n $data = array('code' => \"200\", 'status' => \"success\", \"msg\" => \"message sent successfully\", \"data\" => array());\n $this->response($this->json($data));\n } \n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage());\n } \n\n }", "public function sendMessage(){\n //Gets the recievers id\n $userId = $_POST[\"userIdForMessage\"];\n //gets the message text\n $messageText = $_POST[\"messageText\"];\n //Makes sure not of the above variables are empty\n if(empty($userId) == false && empty($messageText) == false){\n //Gets the other users name\n $usersName = $this->individualGroupModel->getTheUsersName($userId); \n //Checks if the users have already been connected\n $groupUserToUserConnection = $this->individualGroupModel->checkGroupMessageConnection($userId); \n\n //If the size of groupuser to user connection is 0 means the users have never messaged before\n if(sizeof($groupUserToUserConnection) == 0){\n $groupInfo = $this->individualGroupModel->getGroupInformation($_SESSION['current_group']); \n $this->individualGroupModel->createGroupMessageConnectionRecord($userId, $usersName, $groupInfo);\n }\n //Insert message\n $this->individualGroupModel->sendMessageFromGroup($userId, $messageText, $usersName); \n //redirect to the group page\n $path = '/IndividualGroupController/individualGroup?groupId=' . $_SESSION['current_group']; \n redirect($path);\n }else{\n //redirect\n $path = '/IndividualGroupController/individualGroup?groupId=' . $_SESSION['current_group']; \n redirect($path);\n }\n }", "public function send($message);", "public function send($message);", "public function send($message);", "public function send($message);", "public function addMessageAction(){\n if (!$this->_validateFormKey()) return $this->_redirect('inchoo/tickets');\n\n if ($this->getRequest()->isPost()) {\n $ticketId = $this->getRequest()->getPost('ticket_id');\n $message = Mage::getModel('inchoo_tickets/message');\n\n $message->setTicket_id($ticketId)\n ->setMessage($this->getRequest()->getPost('message'))\n ->setAuthor(true); // true=customer\n\n if ($message->validateMessage()) $message->save();\n }\n\n $this->_redirect(\"inchoo/tickets/view/ticket/$ticketId\");\n }", "public function create()\n {\n //\n $this->message->sendMessage();\n }", "public abstract function sendMessage();", "public function sendMessage($request, $response) {\n if (!isset($_SESSION['user'])) {\n // impossible due to the RestMiddleware\n return $response;\n }\n // Get Room\n $room = Room::find($request->getParam('roomId'));\n\n // Check message is not empty\n $messageText = $request->getParam('message');\n if (self::isNullOrWhitespace($messageText)) {\n return $response->withJson([\n 'reason' => 'Message cannot be empty.'\n ], 400);\n }\n\n // Create and send Message\n $message = new Message;\n $message->message = $messageText;\n $message->user_id = $_SESSION['user'];\n $room->messages()->save($message);\n\n return $response->withJson($message);\n }", "public function message(Jid $jid, $message, $type = 'chat')\n {\n $msg = new XmlBranch('message');\n $msg->addAttribute('from', $this->jid->__toString())\n ->addAttribute('to', $jid->__toString())\n ->addAttribute('type', $type);\n $msg->addChild(new XmlBranch('body'))->setContent($message);\n $this->write($msg->asXml());\n }", "protected function post() {\n // Get data form request body\n $request_data = $this->get_request_body();\n if ($request_data->room_name == \"\" || $request_data->username == \"\") {\n $this->write_error(\"Request Error!\");\n }\n $this->room_name = addslashes(htmlentities($request_data->room_name));\n $this->username = addslashes(htmlentities($request_data->username));\n $this->options = $request_data->options;\n\n if (!$this->db->check_row(\"rooms\", array(\"room_name\" => $this->room_name))) {\n $access = $this->options->access;\n $tags = $this->options->tags;\n $add_room_qr = \"INSERT INTO rooms (room_ID, session_ID, room_name, access, tags)\n VALUES ('$this->room_ID', '$this->session_ID', '$this->room_name', '$access', '$tags')\";\n $add_room = $this->db->query($add_room_qr);\n if ($add_room) {\n $user = new users(null);\n $result = $user->join_room($this->username, $this->room_ID);\n return $result;\n }else {\n $this->write_error(\"Error creating room!\");\n }\n }else {\n $this->write_error(\"Room already exist!\");\n }\n }", "public function sendMessage($user_id, $message)\n {\n $this->_Database->query(\"INSERT INTO chat (chat_id, user_id, message, time_posted) VALUES ('', :user_id, :message, CURRENT_TIMESTAMP)\", array(':user_id' => $user_id, ':message' => $message));\n }", "public function sendPost(){\n\t\t\t// record the post in the database\n\t\t\t\n\t\t}", "public function action_chat() {\n\t\t$recepient = $this->request->param('id');\n\t\t$sender = $this->_current_user;\n\t\t$avatar = ($sender->personnel_info->personnel_avatar) ? $sender->personnel_info->personnel_avatar : 'default.png';\n\t\t//STEP1: Save the chat message;\n\t\t$message = ORM::factory('Message');\n\t\t$message->values($this->request->post());\n\t\t$message->sender = $sender;\n\t\t$message->recepient = $recepient;\n\t\t$message->time = time();\n\t\ttry {\n\t\t\t$message->save();\n\t\t\t//STEP2: Send Chat Notification to Recepient\n\t\t\t$date = gmdate('m/d/Y H:i:s', $message->time) . \" UTC\";\n\t\t\t$payload = array(\n\t\t\t\t'msg_id' => $message->message_id,\n\t\t\t\t'msg' => $message->message,\n\t\t\t\t'time' => $date,\n\t\t\t\t'id' => $sender->id,\n\t\t\t\t'username' => $sender->username,\n\t\t\t\t'avatar' => 'assets/avatars/' . $avatar,\n\t\t\t\t\"local_time\" => Date::local_time(\"now\", \"m/d/Y H:i:s\", \"UTC\")\n\t\t\t);\n\t\t\t$this->_push('appchat', $payload, array(\n\t\t\t\t'id' => $recepient,\n\t\t\t\t'pushUid'=> Kohana::$config->load(\"pusher.pushUid\")\n\t\t\t));\n\t\t\t$this->_set_msg('Successful sent message', 'success', $payload);\n\t\t} catch(ORM_Validation_Exception $e) {\n\t\t\t$this->_set_msg('Someone slept on the job', 'error', TRUE);\n\t\t}\n\t}", "function send_message( $id_reciever, $title, $message, $reply_to = null ) {\n\t\tglobal $bbdb;\n\n\t\t$pm = array(\n\t\t\t'pm_title' => attribute_escape( $title ),\n\t\t\t'pm_from' => (int)bb_get_current_user_info( 'ID' ),\n\t\t\t'pm_to' => (int)$id_reciever,\n\t\t\t'pm_text' => apply_filters( 'pre_post', $message ),\n\t\t\t'sent_on' => time(),\n\t\t);\n\n\t\tif ( $reply_to && $this->can_read_message( $reply_to ) && $this->can_read_message( $reply_to, (int)$id_reciever ) ) {\n\t\t\t$pm['reply_to'] = (int)$reply_to;\n\t\t\t$reply_to = new bbPM_Message( $reply_to );\n\t\t\t$pm['thread_depth'] = $reply_to->thread_depth + 1;\n\t\t}\n\n\t\tif ( $this->count_pm( $pm['pm_from'], true ) > $this->max_inbox || $this->count_pm( $pm['pm_to'] ) > $this->max_inbox )\n\t\t\treturn false;\n\n\t\t$bbdb->insert( $bbdb->bbpm, $pm );\n\n\t\t$msg = new bbPM_Message( $bbdb->insert_id );\n\n\t\treturn $msg->read_link;\n\t}", "function sendMessage($from, $to, $title, $message)\n {\n $stmt = $this->con->prepare(\"INSERT INTO messages (from_users_id, to_users_id, title, message) VALUES (?, ?, ?, ?);\");\n $stmt->bind_param(\"iiss\", $from, $to, $title, $message);\n if ($stmt->execute())\n return true;\n return false;\n }", "function post_new_reply() {\n\tglobal $core, $document, $user, $boards, $threads, $posts, $db;\n\n\tif (!isset($_POST['thread_id']) || !isset($_POST['board_id']) || !isset($_POST['post_name']) || !isset($_POST['post_message'])) {\n\t\tfatal_error(\"Some or all of the information needed to post a new message are missing. Please try again\");\n\t}\n\n\t//Make fields safe\n\t$boardid = make_safe(\"int\",$_POST['board_id']);\n\t$threadid = make_safe(\"int\",$_POST['thread_id']);\n\t$postname = make_safe(\"text\",$_POST['post_name']);\n\t$postmessage = make_safe(\"text\",$_POST['post_message']);\n\n\t//Sanity check fields\n\tif (strlen($postname) < 2 || strlen($postmessage) < 10) { \n\t\tfatal_error(\"Your message title or message text is too short. Please try again\");\n\t}\n\tif (!$boards->get_board($boardid)) {\n\t\tfatal_error(\"Invalid board specified. Please try again\");\n\t} \n\tif (!$threads->get_thread($threadid)) {\n\t\tfatal_error(\"Invalid thread specified. Please try again\");\n\t}\n\n\t//Now post the message\n\t$posts->new_post($user->get(\"user_id\"),$boardid,$threadid,$postname,$postmessage);\n\n\t//Now go back to the forum\n\t$core->do_redirect(\"forumdisplay.php?f=$boardid\");\t\t\n}", "function sendMessage($rid,$status){\n\t\t$this->loadModel('Booking');\n\t\t$this->autoRender = false;\n\t\t$this->layout = \"ajax\";\n\t\t//If this is a message accepting or Declining a RESERVATION\n\t\tif(isset($rid) && !empty($rid)){\n\t\t\t\n\t\t\t$this->Booking->id = $rid;\n\t\t\t$this->Booking->contain(array('User'));\n\t\t\t$booking = $this->Booking->read();\n\t\t\t$this->set('bookinginformation', $booking);\n\t\t\t$this->set('status',$status);\n\t\t\t//In the view we'll decide what to do if they're accepting or declining\n\t\t\t$this->render('../Elements/Message/sendmessage');\n\t\t//Otherwise it's a regular contact message\n\t\t} \n\t}", "public function sendAction()\n {\n $_POST['email'] = Auth::getEmail();\n $chat = new Chat($_POST);\n $chat->send();;\n\n }", "public function push($message);", "function submit_post($post)\n {\n $query = \"INSERT INTO messages(message, users_id)\n VALUES('{$post['content']}', {$_SESSION['user_id']})\";\n run_mysql_query($query);\n header('Location:wall.php');\n exit();\n }", "public function handleSendMessage() {\n\t\t$json = file_get_contents(\"php://input\"); //vytánutí všech dat z POST požadavku - data ve formátu JSON\n\t\t$data = Json::decode($json); //prijata zprava dekodovana z JSONu\n\t\t$user = $this->getPresenter()->getUser();\n\t\t$addMessage = $this->addMessage($data, $user);\n\t\tif (!empty($addMessage)) {\n\t\t\t$this->sendRefreshResponse($data->lastid);\n\t\t}\n\t}", "function SendMessage($message, $object, $id, $from_public = false);", "public function postMessage(MessageRequest $form)\n {\n $response = ['done' => false];\n\n if (\\Auth::check()) {\n $mute = $this->mutes->getByUserActive(\\Auth::user()->id);\n\n if (!empty($mute)) {\n // The user is muted, return an error\n $response['error'] = -2;\n } else {\n $status = Chat::STATUS_VISIBLE;\n $contents = $form->contents;\n if (\\Auth::user()->isStaff()) {\n // The user is a staff member, enable commands\n if (\\String::startsWith('/pin ', $contents)) {\n $contents = \\String::replaceFirst('/pin ', $contents);\n $status = Chat::STATUS_PINNED;\n } elseif (\\String::startsWith('/hide ', $contents)) {\n $contents = \\String::replaceFirst('/hide ', $contents);\n $status = Chat::STATUS_INVISIBLE;\n } elseif (\\String::startsWith('/hid ', $contents)) {\n $contents = \\String::replaceFirst('/hid ', $contents);\n $status = Chat::STATUS_INVISIBLE;\n } elseif (\\String::startsWith('/pinhid ', $contents)) {\n $contents = \\String::replaceFirst('/pinhid ', $contents);\n $status = Chat::STATUS_PINNED_INVISIBLE;\n } elseif (\\String::startsWith('/hidpin ', $contents)) {\n $contents = \\String::replaceFirst('/hidpin ', $contents);\n $status = Chat::STATUS_PINNED_INVISIBLE;\n }\n }\n\n // Parse the contents into Markdown\n $contentsParsed = with(new \\Parsedown)->text($contents);\n\n // Filter out words that are censored\n $filters = $this->filters->getAll();\n foreach ($filters as $filter) {\n $asterisks = str_repeat('*', strlen($filter->text));\n $contentsParsed = str_ireplace($filter->text, $asterisks, $contentsParsed);\n }\n\n with(new Chat)->saveNew(\\Auth::user()->id, $form->contents, $contentsParsed, $status, $this->channels->getByNameTrim($form->channel)->id);\n $channel = $this->channels->getByNameTrim($form->channel);\n $channel->messages = $channel->messages + 1;\n $channel->save();\n\n $response['done'] = true;\n }\n } else {\n // The user is not logged in\n $response['error'] = -1;\n }\n\n return json_encode($response);\n }", "public abstract function send(Hermes_Message_Data $message);", "public function sendMessage(){\n\t\tuser_login_required();\n\n\t\t//First, check a conversation ID was specified\n\t\tif(!isset($_POST[\"conversationID\"]))\n\t\t\tRest_fatal_errror(400, \"Please specify a conversation ID !\");\n\n\t\t//Extract conversation ID\n\t\t$conversationID = toInt($_POST[\"conversationID\"]);\n\n\t\t//Check if the user belongs to the conversation\n\t\tif(!CS::get()->components->conversations->userBelongsTo(userID, $conversationID))\n\t\t\tRest_fatal_error(401, \"Specified user doesn't belongs to the conversation !\");\n\n\t\t//Check if information were specified about the new message or not\n\t\tif(!isset($_POST['message']))\n\t\t\tRest_fatal_error(401, \"New conversation messages must contain a message (can be empty if there is an image) !\");\n\t\t\n\t\t//Else extract informations\n\t\t$content = (string) (isset($_POST['message']) ? $_POST['message'] : \"\");\n\n\t\t//Check for image\n\t\t$image = \"\";\n\t\tif(check_post_file(\"image\")){\n\n\t\t\t//Save image and retrieve its URI\n\t\t\t$image = save_post_image(\"image\", userID, \"conversations\", 1200, 1200);\n\n\t\t}\n\n\t\t//Check message validity\n\t\tif(!check_string_before_insert($content) && $image == \"\")\n\t\t\tRest_fatal_error(401, \"Invalid message creation request !\");\n\n\t\t//Insert the new message\n\t\t$newMessage = new NewConversationMessage();\n\t\t$newMessage->set_userID(userID);\n\t\t$newMessage->set_conversationID($conversationID);\n\t\t$newMessage->set_message($content);\n\t\t$newMessage->set_image_path($image);\n\t\tif(!CS::get()->components->conversations->sendMessage($newMessage))\n\t\t\tRest_fatal_error(500, \"Couldn't send the message !\");\n\t\t\n\t\t//Success\n\t\treturn array(\"success\" => \"Conversation message with successfully added !\");\n\t}", "private function _messageFor()\n {\n // First, get the message\n //$message_for = preg_match('^!messagefor-[$1]', $this->_data->message)\n //preg_match('/^!messagefor-(.*):/', '!messagefor-Mike I missed you', $matches); var_dump($matches);\n try {\n // Connect\n $dbh = $this->_connectToDb();\n\n // Insert\n $stmt = $dbh->prepare(\"INSERT INTO message(`nick`, `message`, `when`, `from`) VALUES (:nick, :message, NOW(), :from)\");\n\n $stmt->bindParam(':nick', $message_for, PDO::PARAM_STR);\n $stmt->bindParam(':message', $message_payload, PDO::PARAM_STR);\n $stmt->bindParam(':from', $this->_data->nick, PDO::PARAM_STR);\n\n $stmt->execute();\n\n $dbh = null;\n\n }\n catch(PDOException $e)\n {\n echo $e->getMessage();\n }\n }", "function send($mobile, $message);", "public function messageByRooms($rooms, $message, $color, $notify);", "public function send($destination, Message $message);", "public function send($message)\n {\n }", "public function sendMessage($message)\n\t{\n\t\tglobal $log;\n\n\t\tif (!empty($this->channel)) {\n\t\t\t$log->print(date('H:i:s', time()));\n\t\t\t$log->println(' > ' . $message, COLOR_BOT_MESSAGE);\n\t\t\t$this->send('PRIVMSG #' . $this->channel . ' : ' . $message);\n\t\t} else\n\t\t\techo '[ERROR] No channel were joined' . PHP_EOL;\n\t}", "function send() {\n $this->title = 'Send New Message';\n css::add('styles/token-input.css');\n css::add('styles/token-input-facebook.css');\n javascript::add('jquery/jquery.tokeninput.js');\n javascript::add('scripts/messages.js');\n javascript::add(array('messages_users_url' => '/messages/users'), 'setting');\n\n $this->groups = ORM::factory('group')->find_all();\n if ($post = $this->input->post()) {\n $this->message = ORM::factory('message');\n if ($this->message->validate($post, TRUE)) {\n message::add(TRUE, 'Message sent succesfully.');\n url::redirect('messages/'. $this->message->id);\n }\n else {\n message::add(FALSE, 'Please fix the errors below.');\n $this->form = $post->as_array();\n $this->errors = $post->errors('form_message_send');\n }\n }\n }", "public function sendMessage($message) {\n\t\t$this->sendCommand(\"PRIVMSG \".$this->config['destinationChannel'].\" :\".$message);\n\t}", "public function send_chat_messageAction()\n\t{\n\t\t$user = $this->user;\n $user_id = $user['id'];\n\t\t$from = $user['id'];\n\t\t$data = json_decode($this->request->getPost(\"dataArray\"), true);\n\t\t$chat_id = $data['chat_id'];\n $application_id = $user['Application_ID'];\n\n // store the message\n\t\t$this->db->insert(\n\t\t 'data_messages',\n\t\t array($data['message'], time(), $application_id, 20195),\n\t\t array('content', 'created_at', 'application_id', 'module_id')\n\t\t);\n\t\t$messageid = $this->db->lastInsertId();\n\n\t\t// store the relation\n\t\t$this->db->insert(\n\t\t 'data_message_relations',\n\t\t array($messageid, 0, $from, $chat_id, $application_id, 20195),\n\t\t array('data_message_id', 'deleted', 'from_user_id', 'data_cms_id', 'application_id', 'module_id')\n\t\t);\n\n\n\t\t$response = [\n \t\"status\" => $this->apiFactory->getStatus(200, \"Success\"),\n \t\"data\" => []\n ];\n\n return $this->sendJson($response);\n\t}", "public function sendMessage(Request $request)\n {\n $mobile_number = $request->mobile_number;\n $mobile_number = \"+\".$mobile_number;\n\n $client = new Client($this->sid, $this->token);\n $message = $client->messages->create(\n $mobile_number,\n [\n 'from' => $this->phone_number,\n 'body' => $request->message\n ]\n );\n }", "public function run()\n {\n //\n $chat = new Message();\n $chat->room_id = 1;\n $chat->send_account_id = 1;\n $chat->receive_account_id = 2;\n $chat->text = \"こんにちは\";\n $chat->is_read = true;\n $chat->save();\n\n //\n $chat2 = new Message();\n $chat2->room_id = 1;\n $chat2->send_account_id = 2;\n $chat2->receive_account_id = 1;\n $chat2->text = \"よろしくお願いします。\";\n $chat2->is_read = true;\n $chat2->save();\n\n }", "function sendMessage($body,$reply_to=0)\n\t{\n\t\tif(trim($body) == \"\")return $this->message(FORUM_URES_MEZO);\n\t\tif(isNumber($reply_to) && $this->akt_user && isNumber($this->akt_user))//csak ha user be van jelentkezve akkor irhat\n\t\t\treturn mysql_query(\"INSERT INTO `\".$this->prefix.\"post`(`post_sender`,`post_body`,`post_time`,`post_topic`,`post_reply_to`) \".\n\t\t\t\t\t\t\"VALUES(\".$this->akt_user.\",'\".specChars($body,'forum::sendMessage').\"',\".time().\",\".$this->topic_id.\",\".$reply_to.\")\");\n\t\telse return $this->message(FORUM_MESSAGE_MUST_LOGIN);\n\t}", "public function sendMessage(){\n\n\n }", "public function writeMessage($message);", "public function post_message($access_token, SocialMessage $message, $access_token_secret = '');", "public function write() {\n\t\t$this->loadModel('Thread');\n\t\tif ($this->request->is('post')) {\n $this->Thread->set('user_id', $this->Auth->user('id'));\n $this->Thread->set('forums_id', $this->params['pass'][0]);\n if ($this->Thread->save($this->request->data)) {\n $this->Session->setFlash('Din tråd har sparats.');\n $this->redirect(array('action' => 'index'));\n } else {\n $this->Session->setFlash('Kunde inte spara tråden.');\n }\n }\n\t}", "function addRoom(\\pl\\dagguh\\buildings\\Room $room);", "public function sendAction()\n {\n $id = (int) $this->_request->getParam('id', 0);\n $userDto = $this->getDaoUser()->fetchOneWithAvatar('user.id',$id);\n \n if($this->_request->isPost())\n { \n $result = $this->getBusiness()->sendMessage($userDto, $this->_request->getPost('text'));\n \n $url = Qsoft_Helper_Url::generate($this->_request->getControllerName());\n $backLink = '<a href=\"' . $url . '\">' . $this->view->translate('Back to list') . '</a>';\n \n if($result['status'] === true) {\n $this->noticeMessage('Sent message successfully. %s', $backLink);\n } else {\n $this->noticeMessage('Cannot send message, check support user %s', $backLink); \n }\n } \n \n if ($id != 0 AND !$userDto) {\n $this->_redirect($this->_request->getControllerName());\n }\n \n $this->view->item = $userDto; \n }", "public static function send_message($message){\n\t\tglobal $DB;\n\t\tif(!is_object($message)){\n\t\t\t$message = $DB->get_record('certif_messages_log', ['id' => $message]);\n\t\t}\n\t\tif($message){\n\t\t\t$user = $DB->get_record('user', ['id' => $message->userid]);\n\t\t\t$contact = \\core_user::get_support_user();\n\t\t\tif(!$user){\n\t\t\t\t$user = clone $contact;\n\t\t\t\t$user->email = $message->email;\n\t\t\t\t$user->firstname = '';\n\t\t\t\t$user->lastname = '';\n\t\t\t}\n\n\t\t\t$message->body = nl2br($message->body);\n\t\t\temail_to_user($user, $contact, $message->subject, strip_tags($message->body), $message->body);\n\n\t\t\t$message->timesent = time();\n\t\t\t$DB->update_record('certif_messages_log', $message);\n\t\t}\n\t}", "public function write($message);", "public function action_Message()\n\t{\n\t\t// get initial request (as we load it via HMVC)\n\t\t$request = Request::initial();\n\n\t\t// setup view\n\t\t$this->view = View::factory('Ticket/Message/Fieldset')\n\t\t->set('admin', $this->auth->logged_in('admin'))\n\t\t->bind('form', $form)\n\t\t->bind('ticket', $ticket);\n\n\t\t// load ticket from database\n\t\t$ticket = ORM::factory('Ticket', $this->request->param('id'));\n\n\t\t// factory orm item\n\t\t$item = ORM::factory('Ticket_Message');\n\n\t\t// create form\n\t\t$form = Form::factory($item);\n\n\t\t// on form submit\n\t\tif ($request->method() === HTTP_Request::POST)\n\t\t{\n\t\t\t// set ticket and user to item\n\t\t\t$item->ticket_id = $ticket->id;\n\t\t\t$item->user_id = $this->user->id;\n\t\t\t$item->values($request->post(), ['message']);\n\n\t\t\t// process ticket status if admin\n\t\t\tif ($this->auth->logged_in('admin') AND $request->post('status') != '')\n\t\t\t{\n\t\t\t\t$ticket->status = $request->post('status');\n\t\t\t\t$ticket->save();\n\t\t\t}\n\n\t\t\ttry\n\t\t\t{\n\t\t\t\t// validate and save item\n\t\t\t\t$item->save();\n\n\t\t\t}\n\t\t\tcatch (ORM_Validation_Exception $e)\n\t\t\t{\n\t\t\t\t// attach errors to form\n\t\t\t\t$form->attach($e);\n\t\t\t}\n\t\t}\n\t}", "public function message($message);", "function edit_message() {\n\tglobal $core, $document, $user, $boards, $threads, $posts, $db;\n\n\tif (!isset($_POST['thread_id']) || !isset($_POST['board_id']) || !isset($_POST['post_id']) || !isset($_POST['post_name']) || !isset($_POST['post_message'])) {\n\t\tfatal_error(\"Some or all of the information needed to post a new message are missing. Please try again\");\n\t}\n\n\t//Make fields safe\n\t$postid = make_safe(\"int\",$_POST['post_id']);\n\t$boardid = make_safe(\"int\",$_POST['board_id']);\n\t$threadid = make_safe(\"int\",$_POST['thread_id']);\n\t$postname = make_safe(\"text\",$_POST['post_name']);\n\t$postmessage = make_safe(\"text\",$_POST['post_message']);\n\n\t//Sanity check fields\n\tif (strlen($postname) < 2 || strlen($postmessage) < 10) { \n\t\tfatal_error(\"Your message title or message text is too short. Please try again\");\n\t}\n\tif (!$posts->get_post($postid)) {\n\t\tfatal_error(\"Invalid post specified. Please try again\");\n\t}\n\tif (!$boards->get_board($boardid)) {\n\t\tfatal_error(\"Invalid board specified. Please try again\");\n\t} \n\tif (!$threads->get_thread($threadid)) {\n\t\tfatal_error(\"Invalid thread specified. Please try again\");\n\t}\n\n\t//Now post the message\n\t$posts->edit_post($postid,$postname,$postmessage);\n\n\t//Now go back to the forum\n\t$core->do_redirect(\"showthread.php?t=$threadid\");\t\t\n}", "public function message($type, $message) {}", "public function actionSendMessage() {\n\n // get data, sent by client\n $data = Yii::app()->request->getPost('chat', array());\n\n // try to store message\n $model = new Chat();\n $result = $model->storeMessage($data);\n\n // prepare return array, set status\n $response = array(\n 'status' => (bool)$result\n );\n\n // encode return array\n echo json_encode($response);\n\n // force app to end\n Yii::app()->end();\n\t}", "private function send(): void\n {\n $data = [\n 'code' => $this->status,\n 'message' => $this->message,\n 'datetime' => Carbon::now()\n ];\n\n $config = config(\"tebot.$this->channelConfig\");\n\n $data['title'] = $this->title . ' ' . $config['name'];\n\n if (!empty($this->detail)) $data['detail'] = json_encode($this->detail);\n\n Http::withHeaders(['x-api-key' => $config['key']])->post($config['url'] . '/api/message', $data);\n }", "public function sendMessageToAction()\n {\n $error = '';\n if ($_SERVER['REQUEST_METHOD'] === 'POST' && !empty($_SESSION['user_id']))\n {\n $manager = MessageManager::getInstance();\n if ($manager->checkSendMessageTo($_POST))\n {\n \n $manager->sendMessageTo($_POST);\n $messages=$manager->getAllMessagesUserId($_POST['id-receiver']);\n echo json_encode(['messages' => $messages ]);\n exit(0);\n }\n else {\n echo json_encode(['error' => \"empty\" ]);\n exit(0);\n }\n }\n }", "public function sendMessage($params)\n {\n if (empty($params['token'])) {\n $token = $this->token;\n } else {\n $token = $params['token'];\n }\n\n if (empty($token)) {\n throw CouldNotSendNotification::serviceRespondedWithAnError('You must provide your chatwork api token to make any API requests.');\n }\n if (!array_key_exists('room_id', $params)) {\n throw CouldNotSendNotification::serviceRespondedWithAnError('Chatwork RoomId is empty');\n }\n if (!is_numeric($params['room_id'])) {\n throw CouldNotSendNotification::serviceRespondedWithAnError('Chatwork RoomId must be a number.');\n }\n\n $roomId = $params['room_id'];\n $message = $params['text'];\n\n $url = $this->endpoint . '/rooms/' . $roomId . '/messages';\n\n try {\n $response = $this->http->post($url, [\n 'headers' => ['X-ChatWorkToken' => $token],\n 'form_params' => ['body' => $message],\n ]);\n } catch (ClientException $exception) {\n echo Psr7\\str($exception->getRequest());\n if ($exception->hasResponse()) {\n echo Psr7\\str($exception->getResponse());\n }\n } catch (\\Exception $exception) {\n echo $exception->getMessage();\n }\n\n return true;\n }", "function send_message_to_player( $socket, $data ) {\r\n\tif($socket->process == true) {\r\n\t\t$obj = json_decode( $data );\r\n\t\t$user_id = $obj->user_id;\r\n\t\t$message = $obj->message;\r\n\t\t\r\n\t\t$player = id_to_player( $user_id, false );\r\n\t\tif( isset($player) ) {\r\n\t\t\t$player->write( 'message`' . $message );\r\n\t\t}\r\n\t\t$socket->write('{\"status\":\"ok\"}');\r\n\t}\r\n}", "public function write(string $message);", "abstract public function sendMessage(User $sender, string $text, Keyboard $keyboard = null): OutgoingMessage;", "public function send(Message $message)\n {\n $client = $this->getHttpClient();\n\n $url = $this->api_endpoint . $this->token;\n\n $client->post($url, array('json' => $this->buildMessage($message)));\n }", "public function send($message, $to_phone);", "public function addRoomAction()\n\t{\n\t\t$data = $this -> facade -> getArray();\n\t\t$this -> view -> showRoomForm($data);\n\t\tif(isset($_POST['room']))\n\t\t{\n\t\t\t$this -> facade -> addRoom($_POST['room']);\n\t\t}\n\t\treturn true;\n\t}", "public function sendMessage(Request $request)\n {\n $message = $request->get('message');\n $thread_id = $request->get('threadid');\n $objmessage = new Message();\n $messageid = $objmessage->sendThreadMessage($thread_id, $message);\n $chattime = Carbon::now();\n $formattedtime = $chattime->format('d-m-Y h:i A');\n \\Event::fire(new App\\Events\\NewMessage($thread_id, $message, Auth()->user()->name, Auth()->id(), Auth()->user()->userrole,$formattedtime));\n return view(\"teacher.chat-messages-teacher\", compact('message', 'messageid'));\n }", "function add_message($post)\n {\n date_default_timezone_set(\"ASIA/Manila\");\n $date = date('Y/m/d H:i:s');\n $query = 'INSERT INTO messages (user_id, message, created_at) \n VALUES (?, ?, ?)';\n $values = array($post['message_sender_id'], $post['message'], $this->security->xss_clean($date));\n return $this->db->query($query, $values);\n }", "public function message(string $msg, array $params = []): void\r\n {\r\n $sendMessage = new AMQPMessage($msg, $params);\r\n $this->channel->basic_publish($sendMessage, '', $this->queue);\r\n }", "public function handle(PostChat $command)\n {\n // check if the user can upload images, otherwise return\n $this->assertCan(\n $command->actor,\n 'pushedx.chat.post'\n );\n\n $msg = [\n 'actorId' => $command->actor->id,\n 'message' => $command->msg\n ];\n\n $id = FetchChatController::UpdateMessages($msg);\n $msg['id'] = $id;\n\n $pusher = $this->getPusher();\n $pusher->trigger('public', 'newChat', $msg);\n\n return $command->msg;\n }", "public static function sendMessage($message) {\n $context = new \\ZMQContext();\n $socket = $context->getSocket(\\ZMQ::SOCKET_PUSH, 'my pusher');\n $socket->connect(\"tcp://localhost:5555\");\n $socket->send($message);\n }", "function onMessage(Ratchet\\ConnectionInterface $from, $msg)\r\n {\r\n \r\n \r\n\r\n $message = json_decode($msg);\r\n \r\n $message->resourceId = $from->resourceId;\r\n\r\n if ($message->type == 'yourId'){\r\n $from->send(json_encode($message));\r\n } else {\r\n foreach($this->clients as $client){\r\n if ($from !== $client){\r\n $client->send(json_encode($message));\r\n }\r\n }\r\n }\r\n }", "function message($to, $post)\n\t{\n\t\tglobal $user;\n\t\t$member = $this->db->getRow('SELECT * FROM bin WHERE `user_id`='.$user->id);\n\t\tif(is_numeric($to))\n\t\t{\n\t\t\t$recipient = array($this->data($to));\n\t\t}else{\n\t\t\t$q = \"SELECT * FROM bin WHERE username='{$to}'\";\n\t\t\t$recipient = $this->db->getAll($q);\n\t\t}\n\n\t\t$output = false;\n\t\tif(!empty($member['id']) && !empty($post['title']) && !empty($post['detail']))\n\t\t{\n\t\t\t$par_id = @intval($post['par_id']);\n\t\t\t$main_id = @intval($post['main_id']);\n\t\t\tforeach((array)$recipient AS $to)\n\t\t\t{\n\t\t\t\t$q = \"INSERT INTO bin_message\n\t\t\t\tSET par_id =\".$par_id.\"\n\t\t\t\t, main_id = \".$main_id.\"\n\t\t\t\t, from_id =\".$member['id'].\"\n\t\t\t\t, from_name ='\".addslashes($member['name']).\"'\n\t\t\t\t, to_id =\".$to['id'].\"\n\t\t\t\t, to_name ='\".addslashes($to['name']).\"'\n\t\t\t\t, title ='\".addslashes($post['title']).\"'\n\t\t\t\t, detail ='\".addslashes($post['detail']).\"'\n\t\t\t\t, child = 1\n\t\t\t\t, created = NOW()\n\t\t\t\t, updated = NOW()\n\t\t\t\t, readed = 0\";\n\t\t\t\t$output = $this->db->Execute($q);\n\t\t\t\tif(!$output)\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}else{\n\t\t\t\t\tif (empty($main_id) && empty($par_id))\n\t\t\t\t\t{\n\t\t\t\t\t\t$i = $this->db->Insert_ID();\n\t\t\t\t\t\t$this->db->Execute(\"UPDATE bin_message SET main_id={$i} WHERE id={$i}\");\n\t\t\t\t\t}\n\t\t\t\t\tif($par_id)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->message_update($par_id);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $output;\n\t}", "private function messageRequest($rid, array $data)\n {\n Yii::info('Message from: '.$rid, 'chat');\n $chat = $this->cm->getUserChat($rid);\n if (!$chat) {\n return;\n }\n\n $message = [\n 'message' => $data['message'],\n 'timestamp' => time(),\n 'to' => $data['to'],\n ];\n\n $user = $this->cm->getUserByRid($rid);\n\n $data['username'] = $user->username;\n\n $this->cm->storeMessage($user, $chat, $message);\n foreach ($chat->getUsers() as $user) {\n //need not to send message for self\n if ($user->getRid() == $rid) {\n continue;\n }\n\n echo \"MessageTo: {$message['to']} / UserID: {$user->id} / username: {$user->username}\" . PHP_EOL;\n\n if (!empty($message['to']) && (int)$user->id == (int)$message['to']) {\n $conn = $this->clients[$user->getRid()];\n $conn->send(Json::encode(['type' => 'message', 'data' => $data]));\n break;\n } elseif (empty($message['to'])) {\n $conn = $this->clients[$user->getRid()];\n $conn->send(Json::encode(['type' => 'message', 'data' => $data]));\n }\n }\n }", "public function onMessage(ConnectionInterface $from, $msg): void\n {\n $data = json_decode($msg, false);\n\n $comment = $this->service->createComment($data->comment, $data->taskId, $data->userId);\n if ($comment) {\n $this->sendMessage($comment);\n }\n }", "public function publish($channel, $message);", "private function save_message( $params ) {\n\n // Setup the author, slug, and title for the post\n $author_id = get_current_user_id();\n if ( $author_id == 0 || !current_user_can( 'edit_posts' ) ) {\n return false;\n } // Not logged in\n\n $title = $this->create_title( $params['operation_message'] );\n\n $args = array(\n 'comment_status' => 'closed',\n 'ping_status' => 'closed',\n 'post_author' => $author_id,\n 'post_name' => sanitize_title( $title ),\n 'post_title' => $title,\n 'post_status' => 'publish',\n 'post_type' => 'operation_message',\n );\n\n if ( !empty( $params['operation_message']['om_publish_at_date'] ) ) {\n\n $string_time = $params['operation_message']['om_publish_at_date'] . ' ' . $params['operation_message']['om_publish_at_hour'] . ':' . $params['operation_message']['om_publish_at_minute'];\n $publish_time = strtotime( $string_time );\n $publish_time = date_i18n( 'Y-m-d H:i:s', $publish_time );\n $publish_time_gmt = date_i18n( 'Y-m-d H:i:s', strtotime( $string_time . ' -1 hours' ) );\n\n $args['post_date'] = $publish_time;\n $args['post_date_gmt'] = $publish_time_gmt;\n\n }\n\n if ( empty( $params['operation_message']['om_archive_at_date'] ) ) {\n\n $tomorrow = date_i18n( 'Y-m-d', strtotime( '+1 days' ) );\n\n }\n\n if ( empty( $params['operation_message']['om_custom_municipality'] ) ) {\n\n if ( in_array( 'operation_message', SK_Municipality_Adaptation_Settings::valid_post_types() ) ) {\n\n $municipality = sanitize_title( $params['operation_message']['om_municipality'] );\n $municipality = strtolower( $municipality );\n\n }\n\n }\n\n // If the page doesn't already exist, then create it\n // Set the post ID so that we know the post was created successfully\n $post_id = wp_insert_post(\n $args,\n true// return error on failure\n );\n\n if ( !is_wp_error( $post_id ) ) {\n\n if ( count( $params ) > 0 && is_array( $params ) ) {\n\n foreach ( $params['operation_message'] as $key => $value ) {\n\n update_post_meta( $post_id, $key, $value );\n if ( isset( $tomorrow ) ) {\n\n update_post_meta( $post_id, 'om_archive_at_date', $tomorrow );\n update_post_meta( $post_id, 'om_archive_at_hour', '16' );\n update_post_meta( $post_id, 'om_archive_at_minute', '00' );\n\n }\n\n if ( isset( $municipality ) ) {\n\n update_post_meta( $post_id, 'municipality_adaptation', $municipality );\n\n }\n\n }\n\n return true;\n\n }\n\n }\n\n return false;\n\n }", "public function room($itemId)\n {\n $this->set('title', 'Chat room');\n $client = $this->request->getSession()->read('Auth.User');\n $item = $this->Item->findItemById($itemId);\n $shop = $this->Shop->get($item->shop);\n\n if ($item != null) {\n // Create new room id\n $roomId = $client['name'] . $client['id'] . $item->id;\n // Check this Room has exist or not. If not, create new Room\n if (!$this->Chat->getFirstChatInRoom($roomId)) {\n $data = [\n 'itemId' => $item->id ,\n 'shopId' => $item->shop, \n 'clientId' => $client['id'],\n 'roomId' => $roomId,\n 'message' => '',\n 'messageFrom' => '',\n 'readed' => 0\n ];\n $this->Chat->insert($data);\n }\n\n $listChat = $this->Chat->getAllChatInRoom($roomId);\n $this->set([\n 'item' => $item, \n 'shop' => $shop,\n 'client' => $client,\n 'chats' => $listChat, \n 'roomId' => $roomId\n ]);\n $this->render('room');\n } else {\n $this->redirect(['controller' => 'Pages', 'action' => 'home']);\n }\n }", "public function addMessage(array $post) {\n $chatModel = new ChatModel();\n $lastMessage = $chatModel->InsertMessage($post);\n }", "public function create() {\n\t\t$user = $this->current_user();\n\t\t$message = $this->discussion->create_message($this->message_data() + ['creator' => ['id' => $user->_id, 'name' => $user->name]]);\n\n\t\tif ($this->discussion->push_message($message)) {\n\t\t\treturn $this->redirect(['Discussions::show', 'id' => $this->discussion->_id, 'project_id' => $this->discussion->project_id]);\n\t\t}\n\n\t\treturn compact('message');\n\t}", "public function testPost()\n {\n $user = factory('App\\User')->create();\n $user->room_id = 1;\n $user->save();\n $message = 'helloworld';\n\n $response = $this->actingAs($user)\n ->call('POST', 'post', [\n 'message' => 'title 999',\n '_token' => csrf_token(), // 手動加入 _token\n ]);\n\n $response->assertStatus(201);\n\n //vendor/bin/phpunit\n }", "function insertMsg($postData)\n\t\t{\n\t\t\tif( !empty($postData['msg']) && !empty($postData['bid']) )\n\t\t\t{\n\t\t\t\t//generate chat id\n\t\t\t\t$chat_id = uniqid('CHAT');\n\t\t\t\t\n\t\t\t\t//get full bid info\n\t\t\t\t$bid = $this->manageContent->getValue_where(\"bid_info\",\"*\",\"bid_id\",$postData['bid']);\n\t\t\t\t\n\t\t\t\t//get project_id from the bid_info table\n\t\t\t\t$project = $this->manageContent->getValue_where(\"project_info\",\"*\",\"project_id\",$bid[0]['project_id']);\n\t\t\t\t\n\t\t\t\t//get the details\n\t\t\t\t$sender = $_SESSION['user_id'];\n\t\t\t\t$contractor = $bid[0]['user_id'];\n\t\t\t\t$employer = $project[0]['user_id'];\n\t\t\t\t$message = $postData['msg'];\n\t\t\t\t$bid_id = $postData['bid'];\n\t\t\t\t$project_id = $bid[0]['project_id'];\n\t\t\t\t$date = date(\"Y-m-d g:i:s\");\n\t\t\t\t$status = 1;\t\t//1 for unread message\n\t\t\t\t\n\t\t\t\t//insert the values\n\t\t\t\t$column_name = array(\"chat_id\", \"sender\", \"message\", \"emp_user_id\", \"con_user_id\", \"bid_id\", \"project_id\", \"date\", \"status\");\n\t\t\t\t$column_value = array($chat_id, $sender, $message, $employer, $contractor, $bid_id, $project_id, $date, $status);\n\t\t\t\t$insert = $this->manageContent->insertValue(\"chat_info\",$column_name,$column_value);\n\t\t\t\t\n\t\t\t\tif( $insert > 0 )\n\t\t\t\t{\n\t\t\t\t\techo \"Message send successfully.\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\techo \"Error!!. Please try again.\";\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo \"Please fill the form properly and try again.Thank you.\";\n\t\t\t}\n\t\t}", "public function actionSend()\n {\n $model = new ChatMessage();\n\n $user_id = Yii::$app->user->identity->id;\n\n $model->message_from = $user_id;\n $model->message_to = $_POST['receiver'];\n $model->message = $_POST['chat'];\n $model->status = \"Unread\";\n $model->created_at = date('Y-m-d H:i:s');\n $model->save();\n\n\n\n \n }", "public function send_message()\n { \n $response = array(\"status\" => \"error\");\n $required_fields = array( \"day_id\",\"message\");\n $status = $this->verifyRequiredParams($required_fields);\n if($status)\n {\n $day_id = trim($this->request->getVar('day_id'));\n $message = trim($this->request->getVar('message'));\n\n if (isset($day_id) && empty($day_id)) {\n\t\t\t\t$response['message'] = \"Please enter end day id\";\n\t\t\t\t$this->sendResponse($response);\n\t\t\t}\n\n if (isset($message) && empty($message)) {\n\t\t\t\t$response['message'] = \"Please enter end message\";\n\t\t\t\t$this->sendResponse($response);\n\t\t\t}\n\n $data=array(\n 'message' => $message,\n 'day_id' => $day_id\n );\n\n $res=$this->db->table('message')->insert($data);\n\n if($res)\n {\n $response['status']=\"success\";\n $response['message']=\"message sent successfully.\";\n $this->sendResponse($response);\n }\n else\n {\n $response['message']=\"Something went wrong.\";\n }\n }\n else\n {\n $response['message']=\"One or more fields required.\";\n }\n $this->sendResponse($response);\n }", "public function post() {\n header('Content-Type: application/json');\n $result = $this->facebook->request('post', '/me/feed', array('message' => $this->input->post('message')));\n echo json_encode($result);\n }", "function sendMessage($fromUser, $toUser, $subject, $message){\n\t\t// escape all entered terms\n\t\t$fromUser = escapeQuery($fromUser);\n\t\t$toUser = escapeQuery($toUser);\n\t\t$subject = escapeQuery($subject);\n\t\t$message = escapeQuery($message);\n\t\t\n\t\t$continue = false;\n\t\t\n\t\t// check that both specified users exist, else don't do anything\n\t\tif(userExists($fromUser) && userExists($toUser)){\n\t\t\t$continue = true;\n\t\t}\n\t\t\n\t\t// convert usernames to id numbers for storage\n\t\t$fromUser = getIdFromUsername($fromUser);\n\t\t$toUser = getIdFromUsername($toUser);\n\t\t\n\t\tif($continue){\n\t\t\n\t\t\t $query = \"INSERT INTO Messages(\n\t\t\t\t\tfromUserId, \n\t\t\t\t\ttoUserId, \n\t\t\t\t\tmessageTitle, \n\t\t\t\t\tmessageText) \n\t\t\t\tVALUES (\n\t\t\t\t\t$fromUser, \n\t\t\t\t\t$toUser, \n\t\t\t\t\t'$subject', \n\t\t\t\t\t'$message');\";\n\t\t\t\n\t\t\t$result = doQuery($query);\n\t\t\n\t\t}\n\t\t\n\t}", "public function insert_message($user_id, $writer_id, $message, $log_as_event, $thread_id=null)\n {\n require_once('Validator.php');\n return $this->call('gst_message_insert', $user_id, $writer_id, $message, $thread_id, $log_as_event);\n }", "private function send_msg() {\r\n }", "public function send_msg($message)\r\n\t{\r\n\t\t$this->server->send_msg($this->channel, $message);\r\n\t}", "public function sendMessage(Message $message)\n\t{\n\t\t$request = $this->getHttp()->post(static::URL.'note', null, $this->buildMessagePayload($message));\n\n\t\treturn $this->sendPlain($request);\n\t}", "protected function send($key, $value) {\n $options = [\n 'form_params' => [\n 'recipient' => [\n 'id' => $this->recipientId,\n ],\n $key => $value,\n ],\n ];\n\n if (!empty($this->tag)) {\n // Adding the tag to the body.\n $options['form_params']['tag'] = $this->tag;\n }\n\n return $this->guzzle()->post('https://graph.facebook.com/v6.0/me/messages?access_token=' . $this->accessToken, $options);\n }" ]
[ "0.6936743", "0.6229358", "0.6199686", "0.61672235", "0.6105381", "0.60206836", "0.59722507", "0.5917717", "0.5782412", "0.5777406", "0.57605094", "0.57292914", "0.570702", "0.5705577", "0.5698321", "0.56772256", "0.56526554", "0.5632762", "0.5632762", "0.5632762", "0.5632762", "0.5609443", "0.56045306", "0.5581894", "0.557215", "0.55673885", "0.5565014", "0.55643165", "0.5550295", "0.554369", "0.55281633", "0.55173135", "0.55110496", "0.5507737", "0.54943407", "0.54914653", "0.5477233", "0.5443541", "0.5438186", "0.5437251", "0.5431172", "0.5428172", "0.5426721", "0.5414287", "0.54094356", "0.5402029", "0.539621", "0.5367701", "0.53673255", "0.53655726", "0.53587145", "0.5353155", "0.5340482", "0.53294975", "0.5324327", "0.53182393", "0.5314295", "0.53133565", "0.5313132", "0.5299184", "0.52729285", "0.5272243", "0.5269654", "0.5254439", "0.5249661", "0.52460986", "0.5244879", "0.5211883", "0.5202864", "0.5199052", "0.5198386", "0.5190853", "0.5188002", "0.5187362", "0.5185749", "0.5180532", "0.51713157", "0.5164945", "0.51592207", "0.5155428", "0.5144293", "0.514078", "0.5137849", "0.5135233", "0.5133426", "0.5126919", "0.5114581", "0.51140493", "0.5112027", "0.51095396", "0.51057136", "0.5101751", "0.51003754", "0.5100075", "0.509567", "0.5093486", "0.5091122", "0.50876737", "0.5065749", "0.50651765", "0.506433" ]
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 $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->hasKey('post-users');\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 $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 $user = request()->user('api');\n return $user->isSenior();\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 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 authorized()\n {\n return $this->accepted && ! $this->test_mode;\n }", "public function authorize()\n {\n return $this->user() && $this->user()->role === Constants::USER_ROLE_ADMIN;\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 isAuthorized() {\n\t\t\n\t}", "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 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 return $this->auth->check();\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\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 # if it's false, it will rejected\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 $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() : bool\n {\n // TODO check request to xhr in middleware\n return true;\n }", "public function authorize()\n {\n // User system not implemented\n return true;\n }", "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 $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.83993316", "0.8375539", "0.8375539", "0.8342643", "0.8251967", "0.82460433", "0.82116765", "0.8145634", "0.81104577", "0.8082012", "0.7990385", "0.79879874", "0.7982323", "0.79598", "0.7950402", "0.7948058", "0.7924861", "0.791403", "0.7900065", "0.78929263", "0.7889438", "0.7889062", "0.7859772", "0.784025", "0.784025", "0.78367263", "0.78233373", "0.7810954", "0.78078544", "0.7791974", "0.7786213", "0.77809906", "0.7780403", "0.7762602", "0.7753415", "0.7719186", "0.7719186", "0.77148265", "0.7711958", "0.77026594", "0.76933587", "0.76917106", "0.7690769", "0.76892334", "0.7672409", "0.7666123", "0.76643336", "0.7655159", "0.7649966", "0.76416695", "0.764124", "0.76408875", "0.763354", "0.76290715", "0.76281524", "0.7627133", "0.76194537", "0.76194537", "0.7612324", "0.76029295", "0.76026785", "0.76020855", "0.76020855", "0.76009095", "0.7597837", "0.7595531", "0.7588395", "0.7584404", "0.75799745", "0.7561946", "0.75524676", "0.75515926", "0.7550506", "0.754214", "0.7541809", "0.75383157", "0.75372314", "0.7526828", "0.7516738", "0.75132555", "0.74992996", "0.7494672", "0.7494361", "0.7491311", "0.7486893", "0.7486658", "0.7478788", "0.7476352", "0.7471286", "0.74702626", "0.7464707", "0.7463825", "0.7463139", "0.7462192", "0.7461708", "0.7447478", "0.74388486", "0.7434587", "0.7432738", "0.7430987", "0.7423138" ]
0.0
-1
Get the validation rules that apply to the request.
public function rules() { return [ 'modelName' => 'required', 'fields' => 'required', 'commandType' => 'required' ]; }
{ "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
Get the proper failed validation response for the request.
public function response(array $errors) { $messages = implode(' ', array_flatten($errors)); return Response::json($messages, 400); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getValidationFailed();", "public function getInvalidRequestResponse()\n {\n $result['responseCode'] = self::RESPONSE_INVALID_REQUEST;\n return $result;\n }", "public function validationError($validator)\n {\n $messages = $validator->errors()->getMessages();\n $this->response = $this->laravelResponse->setContent(json_encode(['ErrorCode' => 'ValidationFail',\n 'ErrorDescription' => 'The input validation failed', 'errors' => $messages]))->setStatusCode(400);\n return $this->respond();\n }", "public function checkValidResponse()\n {\n // do nothing if validation is disabled or request method not set\n if ( ! $this->options['validate'] || empty( $this->method ) ) return;\n\n $this->expected = $this->expectByMethod( $this->method );\n\n if ( $this->check( $this->getStatusCode(), $this->expected ) ) return;\n\n $exception = new ResponseException( \"The request was not successful! Response message was: '{$this->response}'\", $this->getStatusCode() );\n\n $exception->setExpectedStatusCode( $this->expected );\n\n throw $exception;\n }", "protected function invalidResponse(){\n return response()->json([\n 'ResultCode' => 1,\n 'ResultDesc' => 'Failed to complete the transaction',\n 'ThirdPartyTransID' => 0\n ]);\n\n }", "public function validAndGetErrorMsg() {\r\n require_once 'Samus/Samus_CRUD/Samus_CRUD_RequestValidator.php';\r\n $req = new Samus_CRUD_RequestValidator($this->object);\r\n $req->init();\r\n return $req->result();\r\n }", "public function badRequestResponse(){\n $this->response->statusCode(400);\n return $this->response;\n }", "protected function notValid()\n {\n $this->response = $this->response->withStatus(422);\n $this->jsonBody([\n 'input' => $this->payload->getInput(),\n 'output' => $this->payload->getOutput(),\n 'messages' => $this->payload->getMessages(),\n ]);\n }", "public function getInvalidUserResponse()\n {\n $result['responseCode'] = self::RESPONSE_INVALID_USER;\n return $result;\n }", "private function _setResponse()\n {\n try\n {\n return $this->_hasErrors();\n }\n\n catch (ValidationException $exception)\n {\n return $exception->getResponse();\n }\n }", "protected function getFlattenedValidationErrorMessage()\n\t{\n\t\t$outputMessage = 'Validation failed while trying to call ' . get_class($this) . '->' . $this->actionMethodName . '().' . PHP_EOL;\n\t\t$errorObject = [\n\t\t\t'message' => $outputMessage,\n\t\t];\n\t\t$logMessage = $outputMessage;\n\n\t\tforeach ($this->arguments->getValidationResults()->getFlattenedErrors() as $propertyPath => $errors) {\n\t\t\t/* @var $error Error */\n\t\t\tforeach ($errors as $error) {\n\t\t\t\t$logMessage .= 'Error for ' . $propertyPath . ': ' . $error->render() . PHP_EOL;\n\t\t\t\t$errorObject['errors'][] = ['code' => $error->getCode(), 'field' => $propertyPath, 'message' => $error->render()];\n\t\t\t}\n\t\t}\n\t\t$this->logger->error($logMessage, $errorObject);\n\n\t\t$errorObject = $this->transformErrorObject($errorObject);\n\n\t\t$this->response->setStatusCode(422);\n\t\t$this->response->setContentType('application/json');\n\n\t\treturn json_encode($errorObject, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);\n\t}", "public function postErrorResponse()\n {\n $this->getResponse()->code(400)->redirect();\n return $this->form;\n }", "public function failedValidation(Validator $validator)\n {\n $data_error = [];\n $error = $validator->errors()->all(); #if validation fail print error messages\n foreach ($error as $key => $errors):\n $data_error['status'] = 400;\n $data_error['message'] = $errors;\n endforeach;\n //write your bussiness logic here otherwise it will give same old JSON response\n throw new HttpResponseException(response()->json($data_error, 400));\n }", "private function unprocessableResponse() {\r\n $response['status_code_header'] = HTTP_UNPROCESSABLE;\r\n $response['body'] = json_encode([\r\n 'error' => 'Invalid input'\r\n ]);\r\n\r\n return $response;\r\n }", "function setFailedValidationStatusCode();", "protected function buildFailedValidationResponse(Request $request, array $errors)\n {\n if (isset(static::$responseBuilder)) {\n return (static::$responseBuilder)($request, $errors);\n }\n\n $firstMessage = Arr::first($errors, null, '');\n\n return app(Response::class)->fail(\n is_array($firstMessage) ? Arr::first($firstMessage) : $firstMessage, Config::get('response.validation_error_code', 422),\n $errors\n );\n }", "protected function failedValidation(Validator $validator)\n {\n $this->validator = $validator;\n //return response()->json(['error' => true, 'errors' => $validator->errors()->all()]);\n }", "public function getErrorResponse()\n {\n $result['responseCode'] = self::RESPONSE_LOGIN_ERROR;\n return $result;\n }", "protected function getBadRequestResponse()\n {\n $response = new Response();\n $response->setStatusCode(400);\n $response->setContent('Bad request');\n\n return $response;\n }", "public function failedValidation(Validator $validator) {\n dump($validator->errors()->messages());\n throw new HttpResponseException($this->response($validator->errors()->messages()), 422);\n }", "public function validateFailedURL() {\r\n return $this->validateResultURL(self::FAILED_STATUS);\r\n }", "public static function failed()\n\t{\n\t\treturn Request::$failed;\n\t}", "public function getErrorResponse()\n {\n $errorResponse = array();\n\n foreach ($this->getErrors() as $error) {\n $errorResponse[] = $error->getPropertyPath().' '.$error->getMessage().\"\\n\";\n }\n\n return $errorResponse;\n }", "public function getEnrollmentErrorResponse()\n {\n $result['responseCode'] = self::RESPONSE_ENROLLMENT_ERROR;\n return $result;\n }", "public function getInvalidChallengeResponse()\n {\n $result['responseCode'] = self::RESPONSE_INVALID_CHALLENGE;\n return $result;\n }", "public function get_validation_error(array $response)\n {\n //FIXME: todo\n return null;\n\n }", "public function validationHasFailed() {}", "public function errorValidation(array $data): Response\n {\n $response = [];\n $response['id'] = Uuid::uuid1();\n $response['title'] = 'Validation error';\n $response['detail'] = 'Some fields are not correctly sent';\n $response['source']['pointer'] = $data;\n $response['status'] = 400;\n\n return $this->withJson(['error' => $response], 400);\n }", "protected static function apiResponseValidationError($errors){\n self::setStatusCode(Response::HTTP_UNPROCESSABLE_ENTITY);\n return self::apiResponse([\n 'status' => 'error',\n 'status_code' => self::getStatusCode(),\n 'error' => $errors\n ]);\n }", "protected function buildFailedValidationResponse(Request $request, array $errors)\n {\n return new JsonResponse($errors, 422);\n }", "protected function failedValidation(Validator $validator)\n {\n $messagesV = $validator->getMessageBag()->getMessages();\n $messages = [];\n $index = 0;\n foreach ($messagesV as $item => $value){\n $messages[$index]['title'] = $value[0];\n $messages[$index]['source']['parameter'] = $item;\n $index++;\n }\n throw new HttpResponseException(response()->json(['errors' => $messages], 400));\n }", "protected function failedValidation(Validator $validator)\n {\n throw new HttpResponseException(\n response([\n \"status\" => false, \n \"message\" => \"Error in data sent\", \n \"errors\" => $validator->errors()\n ], 422)); \n }", "protected function failure()\n {\n $this->response = $this->response->withStatus(400);\n $this->jsonBody($this->payload->getInput());\n }", "protected function passedValidation(){\n // List all fields is allow in rules\n $rules = $this->rules();\n $allowFields = [];\n foreach($this->rules() as $key => $rule){\n if(! in_array($key, $allowFields)){\n array_push($allowFields, $key);\n }\n }\n\n // List all fileds in request\n $deniedFields = [];\n foreach($this->validationData() as $key => $rule){\n if(! in_array($key, $allowFields)){\n array_push($deniedFields, ucfirst($key).\" is not allow in request!\");\n }\n }\n\n // Response to client\n if(count($deniedFields)){\n throw new HttpResponseException(\n response()->json(['errors' => $deniedFields], JsonResponse::HTTP_UNPROCESSABLE_ENTITY)\n );\n }\n }", "protected function failedValidation(Validator $validator)\n {\n\n /**\n * @var array $response Is our response data.\n */\n $response = [\n \"message\" => \"Имеются ошибки в данных\", // Here I used a custom message.\n \"errors\" => $validator->errors(), // And do not forget to add the common errors.\n ];\n\n // Finally throw the HttpResponseException.\n throw new HttpResponseException(response()->json($response, 422));\n\n }", "public function get_valid_response()\n {\n return $this->valid_response;\n }", "public function getErrorResponseJson()\n { \n $data = array();\n \n foreach ($this->_fields as $name => $info) {\n $errors = array();\n if (isset($this->_errors[$name]) && is_array($this->_errors[$name]) && count($this->_errors[$name]) > 0) { \n $errors = $this->_errors[$name];\n }\n $fieldData = ' \"' . $name . '\" : { \"value\" : \"' . $info['value'] . '\"';\n if (count($errors) > 0) {\n $fieldData .= ', \"errors\" : [ \"' . join('\", \"', $errors) . '\" ]';\n }\n $fieldData .= ' }';\n \n $data[] = $fieldData;\n }\n \n $response = '{ \"type\" : \"error\", \"data\" : { ' . join(', ', $data) . ' } }';\n return $response;\n }", "public function get_validation_error(array $response) {\n\n //if the string was gradeable, don't indicate an error\n if ($this->is_gradable_response($response)) {\n return '';\n }\n\n //otherwise, indicate an error depending on the type of reponse which was expected\n switch($this->response_mode) {\n case qtype_scripted_response_mode::MODE_NUMERIC:\n return get_string('invalid_numeric', 'qtype_scripted');\n case qtype_scripted_response_mode::MODE_BINARY:\n return get_string('invalid_binary', 'qtype_scripted');\n case qtype_scripted_response_mode::MODE_HEXADECIMAL:\n return get_string('invalid_hexadecimal', 'qtype_scripted');\n case qtype_scripted_response_mode::MODE_OCTAL:\n return get_string('invalid_octal', 'qtype_scripted');\n }\n\n //if we were unable to determine the correct message, fall back on the normal \"please enter an answer\" gracefully\n return get_string('pleaseenterananswer', 'qtype_shortanswer');\n }", "private function createBadRequestResponse(): Response\n {\n return new Response(\n $this->getStatusTextForResponseCode(Response::HTTP_BAD_REQUEST),\n Response::HTTP_BAD_REQUEST\n );\n }", "public function getValidationResult();", "protected function convertValidationExceptionToResponse(ValidationException $e, $request)\n {\n $errors = $e->validator->errors()->getMessages();\n\n return response()->json($errors, 422);\n }", "public function failedValidation(Validator $validator)\n {\n if($this->ajax()) {\n throw new HttpResponseException(response()->json([\n 'message' => implode(', ', $validator->errors()->all())\n ], 422));\n }\n\n throw new HttpResponseException(response(\n implode(', ', $validator->errors()->all()\n ), 422));\n }", "public function getValidationFailed()\n {\n if (is_null($this->ValidationFailed)) {\n /** @psalm-var ?float $data */\n $data = $this->raw(self::FIELD_VALIDATION_FAILED);\n if (is_null($data)) {\n return null;\n }\n $this->ValidationFailed = (float) $data;\n }\n\n return $this->ValidationFailed;\n }", "protected function sendFailedValidationResponse(array $validationErrors, $data = null,int $httpCode=JsonResponse::HTTP_UNPROCESSABLE_ENTITY)\n {\n $errorPayload = $this->getValidationErrorsPayload($validationErrors);\n $httpResponse = [\n 'status' => false,\n 'code' => $httpCode,\n 'message' => 'Enter valid inputs data',\n 'data' => $data,\n 'errors' => $errorPayload\n ];\n\n return response()->json($httpResponse, $httpCode);\n }", "public function get_validation_error(array $response) {\n return get_string('answerrequired', 'qtype_pycode');\n }", "protected function failedValidation(Validator $validator)\n {\n throw new HttpResponseException(response()->json(['errors' => $validator->errors()]));\n }", "protected function validationErrorToResponse(ValidationException $e, int $status = 400): JsonResponse\n {\n $response = [\n 'status' => $status,\n 'code' => ResponseStatus::VALIDATION_FAILED,\n 'title' => 'Some validation errors were encountered while processing your request',\n 'source' => validation_errors_to_messages($e)\n ];\n # convert the error\n return response()->json(['errors' => [$response]], $status);\n }", "protected function failedValidation(Validator $validator) {\n\n $errors = $validator->errors();\n throw new HttpResponseException(response()->json([\n 'errors' => $errors,\n 'status_code' => 400,\n 'status' => false\n ], 400));\n }", "private function assertErrorValidation($response)\n {\n $response->assertStatus(422)\n ->assertJson([\n 'status' => 'error'\n ]);\n }", "public function apiValidate($errors, $message = false)\n {\n Yii::$app->response->statusCode = 422;\n return [\n 'statusCode' => 422,\n 'name' => 'ValidateErrorException',\n 'message' => $message ? $message : 'Error validation',\n 'errors' => $errors\n ];\n }", "protected function failedValidation(Validator $validator)\n {\n // build the response json\n $response = new JsonResponse(\n [\n 'message' => 'Email already taken',\n 'errors' => $validator->errors()\n ], 400);\n\n throw new ValidationException($validator, $response);\n }", "protected function failedValidation(Validator $validator)\n {\n throw new HttpResponseException(response()->json([\n 'status' => -3,\n 'message' => implode(', ', $validator->errors()->all()),\n ], 200));\n }", "protected function convertValidationExceptionToResponse(ValidationException $e, $request)\n {\n if ($e->response) {\n return $e->response;\n }\n\n return $request->expectsJson()\n ? $this->validationJson($e)\n : $this->invalid($request, $e);\n }", "protected function createValidationErrorMessage() {}", "public function getErrorResponses();", "public function provideTestValidateResponse()\n {\n return array(\n // all pass\n array(true, true, true, true, null),\n // no success but acceptable, no AVS or CVV failures\n array(false, true, true, true, null),\n // AVS failure\n array(false, false, false, true, 'Radial_CreditCard_Exception'),\n // CVV failure\n array(false, false, true, false, 'Radial_CreditCard_Exception'),\n // no success, no failures but still unacceptable\n array(false, false, true, true, 'Radial_CreditCard_Exception'),\n );\n }", "public static function buildInvalidJsonResponse(): static\n {\n $dto = static::buildBadRequestErrorResponse();\n $dto->setMessage(self::MESSAGE_INVALID_JSON);\n return $dto;\n }", "public function failed()\n {\n $this->status = JSendResponse::STATUS_FAIL;\n\n return $this;\n }", "public function apiValidate($errors, $message = false)\n {\n Yii::$app->response->statusCode = 422;\n return [\n 'statusCode' => 422,\n 'name' => 'ValidateErrorException',\n 'message' => $message ? $message : 'Error validation',\n 'errors' => $errors\n ];\n }", "public function invalid(BaseResponse $response);", "protected function failedValidation(Validator $validator) {\n throw new HttpResponseException(response()->json($validator->errors(), 422));\n }", "protected function failedValidation(Validator $validator) {\n throw new HttpResponseException(response()->json($validator->errors(), 422));\n }", "public function getErrorMessage();", "public function getErrorMessage();", "public function get_response() {\n $view = View::factory('Errors/default');\n\n // Remembering that `$this` is an instance of HTTP_Exception_404\n $view->message = $this->getMessage();\n\n $view->error_code = 500;\n $view->error_rant = \"something's wrong with our server\";\n $view->error_message = \"probably another rat ate our server cable. Please wait patiently :)\";\n\n $response = Response::factory()\n ->status(500)\n ->body($view->render());\n\n return $response;\n }", "protected function failedValidation(Validator $validator)\n {\n $errors = (new ValidationException($validator))->errors();\n throw new HttpResponseException(\n response()->json(['errors' => $errors], 422)\n );\n }", "protected function failedValidation(Validator $validator)\n {\n $response = [\n 'success' => false,\n 'message' => 'Invalid parameters.',\n ];\n throw new HttpResponseException(response()->json($response, 400));\n }", "protected function validationError(Exception $exception)\n {\n $validationErrors = $exception->validator->errors()->getMessages();\n\n return $this->jsonResponse($exception->getMessage(), Response::HTTP_UNPROCESSABLE_ENTITY, $validationErrors);\n }", "protected function sendResetLinkFailedResponse( Request $request, $response )\n {\n return response( [ 'errors' => [trans( $response )] ], 422 );\n }", "public function getValidationFailures ()\n {\n return $this->validationFailures;\n }", "public function getValidationFailures ()\n {\n return $this->validationFailures;\n }", "public function getValidationFailures ()\n {\n return $this->validationFailures;\n }", "public function testGetErrorMessagesAfterValidationFailure()\n {\n $this->validator->isValid(-211);\n $this->assertCount(1, $this->validator->errors());\n }", "public function getValidationFailures()\n {\n return $this->validationFailures;\n }", "public function getValidationFailures()\n {\n return $this->validationFailures;\n }", "public function getValidationFailures()\n {\n return $this->validationFailures;\n }", "public function getValidationFailures()\n {\n return $this->validationFailures;\n }", "public function getValidationFailures()\n {\n return $this->validationFailures;\n }", "public function getValidationFailures()\n {\n return $this->validationFailures;\n }", "public function getValidationFailures()\n {\n return $this->validationFailures;\n }", "public function getValidationFailures()\n {\n return $this->validationFailures;\n }", "public function getValidationFailures()\n {\n return $this->validationFailures;\n }", "public function getValidationFailures()\n {\n return $this->validationFailures;\n }", "protected function sendFailedLoginResponse()\n {\n return response()->json([\n 'message' => $this->errorMessage,\n ], 401);\n }", "protected function failedValidation(Validator $validator)\n {\n $response = [\n \"errors\" => $validator->errors()\n ];\n\n throw new HttpResponseException(response()->json($response, 400));\n }", "public function failAction()\n {\n //====================================================================//\n // Return Dummy Response\n return new JsonResponse(array('result' => 'Ko'), 500);\n }", "private function error422(): JsonResponse\n {\n $mensaje = [\n 'code' => Response::HTTP_UNPROCESSABLE_ENTITY,\n 'message' => 'Unprocessable Entity'\n ];\n\n return new JsonResponse(\n $mensaje,\n Response::HTTP_UNPROCESSABLE_ENTITY\n );\n }", "public function validateResponseField() {\n // Active or default version set in configuration for a given\n // major version. Information is available in the call_asset/configuration.\n $active_version = (string) $this->call_asset['configuration']['active_version'];\n\n if (!isset($this->response_field[ $active_version ])) {\n // With the active version configuration, test against the call\n // response field versions if a response field for that version\n // has been defined (data can be mapped to a response field).\n\n // Call version not implemented.\n $response = [\n 'code' => 501, // Not Implemented.\n 'message' => 'Call : Call version not implemented.'\n ];\n TripalWebServiceResponse::errorResponse($response);\n }\n }", "public function failed($message = 'Request format error!', $code = FoundationResponse::HTTP_BAD_REQUEST)\n {\n return $this->setStatusCode($code)->respond(['message' => $message]);\n }", "private function verifyResponse()\n {\n $errorMessages = [];\n \n if (!isset($this->endpoint)) {\n $errorMessages[] = \"$endpoint must be set.\";\n }\n \n if (!isset($this->statusCode)) {\n $errorMessages[] = \"$statusCode must be set.\";\n }\n \n if (!is_array($this->data)) {\n $errorMessages[] = \"$data must be formatted as an array.\";\n }\n \n if (!is_array($this->errors)) {\n $errorMessages[] = \"$errors must be formatted as an array.\";\n }\n\n if (!empty($errorMessages)) {\n return $errorMessages;\n }\n \n return true;\n }", "private function createStatusErrorResponse(): stdClass\n {\n $response = new stdClass();\n $response->statusErrors = new stdClass();\n $response->statusErrors->error = new stdClass();\n $response->statusErrors->error->_ = 'Order could not be found with the given key.';\n $response->statusErrors->error->code = 'REQUEST_DATA_INCORRECT';\n\n return $response;\n }", "public static function failed(): self\n {\n return self::getInstance('FAILED');\n }", "public function getLastErrorResponse() {\n if (!empty($this->rawResponses)) {\n foreach (array_reverse($this->rawResponses) as $x) {\n if (isset($x['error'])) {\n return $x;\n }\n }\n }\n }", "public function _getValidationErrors(): array\n\t{\n\t\t$errs = parent::_getValidationErrors();\n\t\t$validationRules = $this->_getValidationRules();\n\t\tif (null !== ($v = $this->getUrl())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_URL] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif ([] !== ($vs = $this->getIdentifier())) {\n\t\t\tforeach ($vs as $i => $v) {\n\t\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t\t$errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getVersion())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_VERSION] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getName())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_NAME] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getDisplay())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_DISPLAY] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getStatus())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_STATUS] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getExperimental())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_EXPERIMENTAL] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getPublisher())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_PUBLISHER] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif ([] !== ($vs = $this->getContact())) {\n\t\t\tforeach ($vs as $i => $v) {\n\t\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t\t$errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getDate())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_DATE] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getDescription())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_DESCRIPTION] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif ([] !== ($vs = $this->getUseContext())) {\n\t\t\tforeach ($vs as $i => $v) {\n\t\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t\t$errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getRequirements())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_REQUIREMENTS] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getCopyright())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_COPYRIGHT] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif ([] !== ($vs = $this->getCode())) {\n\t\t\tforeach ($vs as $i => $v) {\n\t\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t\t$errs[sprintf('%s.%d', self::FIELD_CODE, $i)] = $fieldErrs;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getFhirVersion())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_FHIR_VERSION] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif ([] !== ($vs = $this->getMapping())) {\n\t\t\tforeach ($vs as $i => $v) {\n\t\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t\t$errs[sprintf('%s.%d', self::FIELD_MAPPING, $i)] = $fieldErrs;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getKind())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_KIND] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getConstrainedType())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_CONSTRAINED_TYPE] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getAbstract())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_ABSTRACT] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getContextType())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_CONTEXT_TYPE] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif ([] !== ($vs = $this->getContext())) {\n\t\t\tforeach ($vs as $i => $v) {\n\t\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t\t$errs[sprintf('%s.%d', self::FIELD_CONTEXT, $i)] = $fieldErrs;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getBase())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_BASE] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getSnapshot())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_SNAPSHOT] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getDifferential())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_DIFFERENTIAL] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_URL])) {\n\t\t\t$v = $this->getUrl();\n\t\t\tforeach ($validationRules[self::FIELD_URL] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_URL,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_URL])) {\n\t\t\t\t\t\t$errs[self::FIELD_URL] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_URL][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_IDENTIFIER])) {\n\t\t\t$v = $this->getIdentifier();\n\t\t\tforeach ($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_IDENTIFIER,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_IDENTIFIER])) {\n\t\t\t\t\t\t$errs[self::FIELD_IDENTIFIER] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_IDENTIFIER][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_VERSION])) {\n\t\t\t$v = $this->getVersion();\n\t\t\tforeach ($validationRules[self::FIELD_VERSION] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_VERSION,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_VERSION])) {\n\t\t\t\t\t\t$errs[self::FIELD_VERSION] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_VERSION][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_NAME])) {\n\t\t\t$v = $this->getName();\n\t\t\tforeach ($validationRules[self::FIELD_NAME] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_NAME,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_NAME])) {\n\t\t\t\t\t\t$errs[self::FIELD_NAME] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_NAME][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_DISPLAY])) {\n\t\t\t$v = $this->getDisplay();\n\t\t\tforeach ($validationRules[self::FIELD_DISPLAY] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_DISPLAY,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_DISPLAY])) {\n\t\t\t\t\t\t$errs[self::FIELD_DISPLAY] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_DISPLAY][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_STATUS])) {\n\t\t\t$v = $this->getStatus();\n\t\t\tforeach ($validationRules[self::FIELD_STATUS] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_STATUS,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_STATUS])) {\n\t\t\t\t\t\t$errs[self::FIELD_STATUS] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_STATUS][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_EXPERIMENTAL])) {\n\t\t\t$v = $this->getExperimental();\n\t\t\tforeach ($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_EXPERIMENTAL,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_EXPERIMENTAL])) {\n\t\t\t\t\t\t$errs[self::FIELD_EXPERIMENTAL] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_EXPERIMENTAL][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_PUBLISHER])) {\n\t\t\t$v = $this->getPublisher();\n\t\t\tforeach ($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_PUBLISHER,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_PUBLISHER])) {\n\t\t\t\t\t\t$errs[self::FIELD_PUBLISHER] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_PUBLISHER][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_CONTACT])) {\n\t\t\t$v = $this->getContact();\n\t\t\tforeach ($validationRules[self::FIELD_CONTACT] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_CONTACT,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_CONTACT])) {\n\t\t\t\t\t\t$errs[self::FIELD_CONTACT] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_CONTACT][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_DATE])) {\n\t\t\t$v = $this->getDate();\n\t\t\tforeach ($validationRules[self::FIELD_DATE] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_DATE,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_DATE])) {\n\t\t\t\t\t\t$errs[self::FIELD_DATE] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_DATE][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_DESCRIPTION])) {\n\t\t\t$v = $this->getDescription();\n\t\t\tforeach ($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_DESCRIPTION,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_DESCRIPTION])) {\n\t\t\t\t\t\t$errs[self::FIELD_DESCRIPTION] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_DESCRIPTION][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_USE_CONTEXT])) {\n\t\t\t$v = $this->getUseContext();\n\t\t\tforeach ($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_USE_CONTEXT,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_USE_CONTEXT])) {\n\t\t\t\t\t\t$errs[self::FIELD_USE_CONTEXT] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_USE_CONTEXT][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_REQUIREMENTS])) {\n\t\t\t$v = $this->getRequirements();\n\t\t\tforeach ($validationRules[self::FIELD_REQUIREMENTS] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_REQUIREMENTS,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_REQUIREMENTS])) {\n\t\t\t\t\t\t$errs[self::FIELD_REQUIREMENTS] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_REQUIREMENTS][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_COPYRIGHT])) {\n\t\t\t$v = $this->getCopyright();\n\t\t\tforeach ($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_COPYRIGHT,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_COPYRIGHT])) {\n\t\t\t\t\t\t$errs[self::FIELD_COPYRIGHT] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_COPYRIGHT][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_CODE])) {\n\t\t\t$v = $this->getCode();\n\t\t\tforeach ($validationRules[self::FIELD_CODE] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_CODE,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_CODE])) {\n\t\t\t\t\t\t$errs[self::FIELD_CODE] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_CODE][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_FHIR_VERSION])) {\n\t\t\t$v = $this->getFhirVersion();\n\t\t\tforeach ($validationRules[self::FIELD_FHIR_VERSION] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_FHIR_VERSION,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_FHIR_VERSION])) {\n\t\t\t\t\t\t$errs[self::FIELD_FHIR_VERSION] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_FHIR_VERSION][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_MAPPING])) {\n\t\t\t$v = $this->getMapping();\n\t\t\tforeach ($validationRules[self::FIELD_MAPPING] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_MAPPING,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_MAPPING])) {\n\t\t\t\t\t\t$errs[self::FIELD_MAPPING] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_MAPPING][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_KIND])) {\n\t\t\t$v = $this->getKind();\n\t\t\tforeach ($validationRules[self::FIELD_KIND] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_KIND,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_KIND])) {\n\t\t\t\t\t\t$errs[self::FIELD_KIND] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_KIND][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_CONSTRAINED_TYPE])) {\n\t\t\t$v = $this->getConstrainedType();\n\t\t\tforeach ($validationRules[self::FIELD_CONSTRAINED_TYPE] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_CONSTRAINED_TYPE,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_CONSTRAINED_TYPE])) {\n\t\t\t\t\t\t$errs[self::FIELD_CONSTRAINED_TYPE] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_CONSTRAINED_TYPE][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_ABSTRACT])) {\n\t\t\t$v = $this->getAbstract();\n\t\t\tforeach ($validationRules[self::FIELD_ABSTRACT] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_ABSTRACT,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_ABSTRACT])) {\n\t\t\t\t\t\t$errs[self::FIELD_ABSTRACT] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_ABSTRACT][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_CONTEXT_TYPE])) {\n\t\t\t$v = $this->getContextType();\n\t\t\tforeach ($validationRules[self::FIELD_CONTEXT_TYPE] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_CONTEXT_TYPE,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_CONTEXT_TYPE])) {\n\t\t\t\t\t\t$errs[self::FIELD_CONTEXT_TYPE] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_CONTEXT_TYPE][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_CONTEXT])) {\n\t\t\t$v = $this->getContext();\n\t\t\tforeach ($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_CONTEXT,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_CONTEXT])) {\n\t\t\t\t\t\t$errs[self::FIELD_CONTEXT] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_CONTEXT][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_BASE])) {\n\t\t\t$v = $this->getBase();\n\t\t\tforeach ($validationRules[self::FIELD_BASE] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_BASE,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_BASE])) {\n\t\t\t\t\t\t$errs[self::FIELD_BASE] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_BASE][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_SNAPSHOT])) {\n\t\t\t$v = $this->getSnapshot();\n\t\t\tforeach ($validationRules[self::FIELD_SNAPSHOT] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_SNAPSHOT,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_SNAPSHOT])) {\n\t\t\t\t\t\t$errs[self::FIELD_SNAPSHOT] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_SNAPSHOT][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_DIFFERENTIAL])) {\n\t\t\t$v = $this->getDifferential();\n\t\t\tforeach ($validationRules[self::FIELD_DIFFERENTIAL] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_DIFFERENTIAL,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_DIFFERENTIAL])) {\n\t\t\t\t\t\t$errs[self::FIELD_DIFFERENTIAL] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_DIFFERENTIAL][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_TEXT])) {\n\t\t\t$v = $this->getText();\n\t\t\tforeach ($validationRules[self::FIELD_TEXT] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE,\n\t\t\t\t\tself::FIELD_TEXT,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_TEXT])) {\n\t\t\t\t\t\t$errs[self::FIELD_TEXT] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_TEXT][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_CONTAINED])) {\n\t\t\t$v = $this->getContained();\n\t\t\tforeach ($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE,\n\t\t\t\t\tself::FIELD_CONTAINED,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_CONTAINED])) {\n\t\t\t\t\t\t$errs[self::FIELD_CONTAINED] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_CONTAINED][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_EXTENSION])) {\n\t\t\t$v = $this->getExtension();\n\t\t\tforeach ($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE,\n\t\t\t\t\tself::FIELD_EXTENSION,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_EXTENSION])) {\n\t\t\t\t\t\t$errs[self::FIELD_EXTENSION] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_EXTENSION][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) {\n\t\t\t$v = $this->getModifierExtension();\n\t\t\tforeach ($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE,\n\t\t\t\t\tself::FIELD_MODIFIER_EXTENSION,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) {\n\t\t\t\t\t\t$errs[self::FIELD_MODIFIER_EXTENSION] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_ID])) {\n\t\t\t$v = $this->getId();\n\t\t\tforeach ($validationRules[self::FIELD_ID] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_RESOURCE,\n\t\t\t\t\tself::FIELD_ID,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_ID])) {\n\t\t\t\t\t\t$errs[self::FIELD_ID] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_ID][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_META])) {\n\t\t\t$v = $this->getMeta();\n\t\t\tforeach ($validationRules[self::FIELD_META] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_RESOURCE,\n\t\t\t\t\tself::FIELD_META,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_META])) {\n\t\t\t\t\t\t$errs[self::FIELD_META] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_META][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_IMPLICIT_RULES])) {\n\t\t\t$v = $this->getImplicitRules();\n\t\t\tforeach ($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_RESOURCE,\n\t\t\t\t\tself::FIELD_IMPLICIT_RULES,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_IMPLICIT_RULES])) {\n\t\t\t\t\t\t$errs[self::FIELD_IMPLICIT_RULES] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_IMPLICIT_RULES][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_LANGUAGE])) {\n\t\t\t$v = $this->getLanguage();\n\t\t\tforeach ($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_RESOURCE,\n\t\t\t\t\tself::FIELD_LANGUAGE,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_LANGUAGE])) {\n\t\t\t\t\t\t$errs[self::FIELD_LANGUAGE] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_LANGUAGE][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $errs;\n\t}", "public function respondValidationError($message = 'Validation errors')\n {\n return $this->setStatusCode(422)->respondWithErrors($message);\n }", "public function getValidationResult()\n {\n return $this->validationResult;\n }", "public function failed(\\Exception $exception)\n {\n if ($exception instanceof BadRequestException) {\n $code = 400;\n $failure = $this->setErrorMessageFromException($exception, self::ERROR_BAD_REQUEST);\n } elseif ($exception instanceof NotImplementedException) {\n $code = 501;\n $failure = $this->setErrorMessageFromException($exception, self::ERROR_NOT_IMPLEMENTED);\n } elseif ($exception instanceof ForbiddenException) {\n $code = 403;\n $failure = $this->setErrorMessageFromException($exception, self::ERROR_FORBIDDEN);\n } elseif ($exception instanceof NotFoundException) {\n $code = 404;\n $failure = $this->setErrorMessageFromException($exception, self::ERROR_NOT_FOUND);\n } elseif ($exception instanceof ConflictException) {\n $code = 409;\n $failure = $this->setErrorMessageFromException($exception, self::ERROR_CONFLICT);\n } elseif ($exception instanceof ServiceUnavailableException) {\n $code = 503;\n $failure = $this->setErrorMessageFromException($exception, self::ERROR_SERVICE_UNAVAILABLE);\n } else {\n $code = 500;\n $failure = $this->setErrorMessageFromException($exception, self::ERROR_INTERNAL);\n }\n $format = $this->responseStructure;\n $response = [];\n\n // Check exception type\n $type = self::ERROR_TYPE_MANDATORY;\n if ($exception instanceof DuplicateExceptionInterface) {\n $type = self::ERROR_TYPE_DUPLICATE;\n } else if ($exception instanceof MandatoryExceptionInterface) {\n $type = self::ERROR_TYPE_MANDATORY;\n }\n\n // Add error response message\n if ($exception instanceof ResponseMessageInterface) {\n $response = $exception->getResponse();\n }\n\n return $this->silexApp->$format(\n $this->mapper->generateMap(\n false,\n $response,\n array('message' => $failure, 'type' => $type)\n ))->setStatusCode($code);\n }", "public function getError(): string\n {\n foreach ($this->getBulkResponses() as $bulkResponse) {\n if ($bulkResponse->hasError()) {\n return $bulkResponse->getError();\n }\n }\n\n return '';\n }", "public function testCreateListValidationFailed(): void\n {\n $this->post('/mailchimp/lists');\n\n $content = \\json_decode($this->response->getContent(), true);\n\n $this->assertResponseStatus(self::HTTP_STATUS_BAD_REQUEST);\n self::assertArrayHasKey('message', $content);\n self::assertArrayHasKey('errors', $content);\n self::assertEquals('Invalid data given', $content['message']);\n\n foreach (\\array_keys(static::$listData) as $key) {\n if (\\in_array($key, static::$notRequired, true)) {\n continue;\n }\n\n self::assertArrayHasKey($key, $content['errors']);\n }\n }", "public function testHandlesValidationError()\n {\n $client = new MockClient('https://api.xavierinstitute.edu', [\n new JsonResponse([\n 'error' => [\n 'code' => 422,\n 'message' => '',\n 'fields' => [\n 'teacher' => ['The provided teacher is not employed here.'],\n ],\n ],\n ], 422),\n ]);\n\n $this->expectException(ValidationException::class);\n $client->post('classes', ['teacher' => 'Erik Lehnsherr']);\n }", "protected function failedValidation(Validator $validator) : HttpResponseException\n {\n throw new HttpResponseException(\n response()->json([\n 'message' => __('validation.the_given_data_was_invalid'),\n 'errors' => $validator->errors(),\n ], 422)\n );\n }" ]
[ "0.7578804", "0.7509205", "0.69908965", "0.69491476", "0.69462425", "0.69071645", "0.689199", "0.67955565", "0.67213976", "0.6709172", "0.6681485", "0.6673777", "0.66606957", "0.665817", "0.6642562", "0.66077626", "0.6584377", "0.657845", "0.65736073", "0.65408933", "0.65242535", "0.6496647", "0.64870614", "0.6462368", "0.6456589", "0.64557594", "0.64276", "0.64124495", "0.63877916", "0.6383306", "0.6374957", "0.6363962", "0.6353539", "0.6348776", "0.63013285", "0.62953126", "0.62836987", "0.6283157", "0.62604", "0.6255934", "0.6252777", "0.6248668", "0.62475824", "0.6226252", "0.6216082", "0.6199711", "0.61985564", "0.619591", "0.61924356", "0.61885613", "0.6177015", "0.61635315", "0.612399", "0.61233664", "0.61181974", "0.6109948", "0.609704", "0.6091368", "0.6085788", "0.60784787", "0.6077061", "0.6077061", "0.60703546", "0.60703546", "0.60634255", "0.60491127", "0.6046297", "0.60220903", "0.6016537", "0.60127777", "0.60127777", "0.60127777", "0.60122144", "0.6011954", "0.6011954", "0.6011954", "0.6011954", "0.6011954", "0.6011954", "0.6011954", "0.6011954", "0.6011954", "0.6011954", "0.6008566", "0.6006906", "0.60023", "0.5998527", "0.5985423", "0.59827566", "0.5975879", "0.59660727", "0.5948252", "0.5942149", "0.59404147", "0.5932578", "0.5930819", "0.5925071", "0.59243464", "0.5923292", "0.5919332", "0.591455" ]
0.0
-1
Check if a game has started.
public function isStarted() { return $this->started_at > 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isStarted();", "public function isStarted();", "public function isStarted();", "protected function hasStarted()\r\n {\r\n return isset($this->_session[$this->_stepsKey]);\r\n }", "public function isStarted() {}", "public function isStarted()\n\t{\n\t\tif($this->test_status_id == Test::STARTED)\n\t\t\treturn true;\n\t\telse \n\t\t\treturn false;\n\t}", "function isStarted()\n {\n return (TRUE == $this->started);\n }", "public function isStarted()\n\t{\n\t\treturn true;\n\t}", "public function isStarted()\n {\n return $this->_manager->isStarted();\n }", "public function isStarted() {\n }", "public function hasStarted() {\n if($this->state != \"unavailable\" &&\n $this->state != \"available\") {\n \n return true;\n } else {\n return false;\n }\n }", "public function isStarted()\n {\n return true;\n }", "public function isStarted()\n {\n return true;\n }", "public function isStarted()\n {\n return true;\n }", "public function isStarted(){\n\t\t\treturn isset( $_SESSION );\n\t\t}", "public static function isStarted(): bool {\n\t\treturn self::$sessionInstance->isStarted ();\n\t}", "public function isInGame() {\n return $this->onlineState == 'in-game';\n }", "public function isStarted()\n {\n return (bool) $this->_start;\n }", "public function hasStarted()\n {\n return $this->started;\n }", "public function hasStarted() {\n return (bool) $this->startedAt;\n }", "public function hasRunning()\n {\n return $this->running !== null;\n }", "public function start(): bool;", "public function isStarted()\n {\n return $this->started;\n }", "public function IsStarted()\n {\n $started = $this->GetStarted();\n \n return $started;\n }", "public function gameWon()\n {\n return $this->countStones() === 1;\n }", "public function hasGameFinished()\n {\n return $this->hasWon;\n }", "private function isGameFinished()\n {\n $isGameFinished = false;\n\n $totalResult = $this->score + $this->savedScore;\n if ($totalResult >= self::POINTS_AT_WIN) {\n $isGameFinished = true;\n }\n\n return $isGameFinished;\n }", "public static function started()\n {\n return static::$isRegistered;\n }", "public function isRunning(): bool;", "public function started(): bool\n {\n return $this->session->started();\n }", "public static function isStarted() {\n return self::$isStarted;\n }", "public function playing(): bool\n {\n\n return $this->state !== SELF::STATE_GAMEOVER;\n }", "public function isPlayed() : bool {\n\t\tif (count($this->games) === 0) {\n\t\t\treturn false;\n\t\t}\n\t\treturn count(array_filter($this->getGames(), static function($a) {\n\t\t\t\treturn $a->isPlayed();\n\t\t\t})) !== 0;\n\t}", "public function hasStarted(){\n return (bool) Carbon::now()->greaterThanOrEqualTo(Carbon::parse($this->starts_on));\n }", "private static function isStarted()\r\n {\r\n // several functions has been added in php 5.4\r\n // disallow determining session stuff when running from command line\r\n if (php_sapi_name() !== 'cli')\r\n {\r\n // are we on PHP 5.4 or higher?\r\n if (version_compare(phpversion(), '5.4.0', '>='))\r\n return (session_status() === PHP_SESSION_ACTIVE);\r\n else\r\n return (session_id() !== '');\r\n }\r\n\r\n return false;\r\n }", "public function is_game_live()\n {\n return $this->status === 'live' ? true : false;\n }", "public function started($name)\n {\n return $this->extensions->has($name);\n }", "public function hasStart(){\n return $this->_has(2);\n }", "public function hasStart(){\n return $this->_has(2);\n }", "public function isStarted($id = self::DEFAULT_ID)\n {\n $id = (!$id) ? self::DEFAULT_ID : (string)$id;\n return isset($this->start[$id]);\n }", "public function startGame(){\n\n try {\n $this->openFile($this->filepath);\n $this->loopThroughContents();\n\n } catch(Exception $e) {\n echo \"Could not start game: \" .$e->getMessage();\n }\n\n return true;\n }", "public static function session_started(){\n\t\t\tif(isset($_SESSION) && session_id()){\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}", "public function isRunning() {\n\t\treturn (\"running\" == $this->status());\n\t}", "public function isExecutionRunning() {}", "public function hasStarttime(){\n return $this->_has(2);\n }", "public function isStartable()\n {\n $driver = $this->driver;\n if($driver){\n // Check if car is not disponible\n $hasActiveRide = $driver->ridesDrived()\n ->where('rides.id', '!=', $this->getKey())\n ->where('rides.status', self::STATUS_STARTED)\n ->exists();\n if($hasActiveRide){\n return false;\n }\n }\n \n return !in_array($this->status, [self::STATUS_COMPLETED, self::STATUS_CANCELED]);\n }", "public function startGameSession() {\n if(!isset($_SESSION['wrongGuesses'])) {\n $_SESSION['wrongGuesses'] = 0;\n }\n $_SESSION['activeGame'] = true;\n }", "public function requireStarted() {\n $status = $this->getStatus(TRUE);\n if ($this->isEnabled() && (is_null($status) || !$status->running)) {\n $this->run('start');\n $this->updateStatus();\n }\n }", "public function isStarted(){\n\n //Comparing the time to decide wither it's started or not ....\n $start = new Carbon($this->start_time);\n $now = Carbon::now();\n $end = $start->copy()->addMinutes($this->duration);\n\n $started = $now->gt($start) && $now->lt($end);\n\n //checking if it has expired announcement and remove it with resetting status to 0\n if($this->hasAnnouncement()){\n $now = Carbon::now();\n $end = new Carbon($this->start_time);\n $end->addMinutes($this->duration);\n\n //Checking if the announcement has expired and delete it ...\n if($now->gt($end))\n $this->deleteAnnouncement();\n\n }\n\n return $started;\n\n }", "private function get_is_running(): bool\n\t{\n\t\treturn $this->status === self::STATUS_RUNNING;\n\t}", "public function getIsRunning();", "public function hasStarttime(){\n return $this->_has(7);\n }", "public function isRunning()\n {\n return ($this->getStatus() == self::RUNNING);\n }", "public function isPaused();", "public function isRunning() {\r\n return $this->_ticker->isRuning();\r\n }", "function start($gameId){\n \n}", "public function isInProgress()\n {\n $currentTime = time();\n\n if (strtotime($this->eventdatetime->starttime) > $currentTime) {\n //It has not started yet.\n return false;\n }\n\n if (strtotime($this->eventdatetime->endtime) < $currentTime) {\n //It already finished.\n return false;\n }\n\n return false;\n }", "public function isRunning() {\n return $this->getPidFile()->isRunning();\n }", "public function getIsStarted()\n {\n return $this->_isStarted;\n }", "public static function isStarted($name = null) {\n\t\treturn is_object($adapter = static::adapter($name)) ? $adapter->isStarted() : false;\n\t}", "protected function start()\n {\n if ($this->command\n && !$this->exists()\n && $this->updateConversation()\n ) {\n return $this->load();\n }\n\n return false;\n }", "public function isRunning() {\n\t\treturn $this->workflowActivitySpecification->isRunning();\n\t}", "public function hasNumPaused()\n {\n return $this->num_paused !== null;\n }", "public function isOpen()\n {\n return ($this->hasStarted() and ! $this->hasEnded());\n }", "public function hasServerGameTime()\n {\n return $this->server_game_time !== null;\n }", "public function isPlaying()\n {\n return \\doing_action($this->tag);\n }", "protected function _canRun()\r\n\t{\r\n\t\t$start\t= strtotime($this->_scheduleStart);\r\n\t\t$stop\t= strtotime($this->_scheduleStop);\r\n\t\t$now\t= time();\r\n\t\t\r\n\t\tif($now > $start && $now < $stop) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "protected function sessionStarted() {\n\n return \\session_id() !== \"\" || \\session_status() === PHP_SESSION_ACTIVE;\n }", "public function start() {\r\n\t\tif (!self::hasSession()) {\r\n\t\t\tself::session();\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "protected function checkIfStarted()\n {\n if (!$this->started) {\n throw new SessionException('Session not started.');\n }\n }", "public function start(){\n\t\t$gameId = $this->input->post('gameId');\n $utoken = $this->input->post('utoken');\n\t\t$game = $this->setRedis_info($gameId);\n\t\tif($game['admin']==$utoken){\n\t\t\tif(count($game['players']) < 2){\n\t\t\t\t$this->setHeader(['success'=>0, 'msg'=>'Cannot start the game... min. 2 players needed!'], 202);\n\t\t\t}\n\t\t\t$game['status'] = \"inPlay\";\n\t\t\t$this->setRedis_set($gameId, $game);\n\t\t\t$this->setHeader(['success'=>1, 'msg'=>'Game has been started successfully!'], 200);\n\t\t}else{\n\t\t\t$this->setHeader(['success'=>0, 'msg'=>'You are not admin of this game!'], 202);\n\t\t}\n }", "public function event_has_run($name)\r\n\t{\r\n\t\treturn isset($this->observer_has_run[$name]);\r\n\t}", "public function isStarted($addonName) {\n return ($this->enabled[$addonName] ?? false) === true;\n }", "public static function isLoading()\n {\n $qualifiedName = static::getSingletonClass();\n\n return isset(static::$instances[ $qualifiedName ])\n && static::$instances[ $qualifiedName ] === true;\n }", "private function isStarted($timer = 'default')\r\n\t{\r\n\t\treturn !$this->isStopped($timer) && ! is_null(static::$startedAt[$timer]);\r\n\t}", "private function checkRunning()\n {\n $out = \"\\n Processos em andamento: \";\n foreach ($this->emAndamento as $key => $val) {\n $out .= '[' . $this->emAndamento[$key]['pid'] . '] ';\n if (!$this->isRunning($val['pid'])) {\n $this->done++;\n unset($this->emAndamento[$key]);\n }\n }\n return true;\n }", "public function startNewGame() {\n\t \t//Set all queued used to playing\n\t \t//Build new map scaled on number of playing users\n\t \t//place users on map\n\t \t//start game\n\t \t//send out alert that game has started\n\t }", "private function isAudioRunning() {\n\t\t$x = shell_exec(\"screen -ls\");\n\t\tif (strpos($x, 'audiorun') == false) return false;\n\t\telse return true;\n\t}", "public function isEnded() {}", "public function isEnded();", "public static function getRunning()\n\t{\n\t\treturn false;\n\t}", "public function has_finished()\n {\n return $this->days_left() == 0;\n }", "private static function startTimer(): bool\n {\n self::$TimerBegin = microtime(true);\n return true;\n }", "public function isOngoing() {\n return ($this->hasStarted() && !$this->isFinished());\n }", "public function isRunning(): bool\n {\n return $this->handle && $this->handle->status !== ProcessStatus::ENDED;\n }", "public function isStarted(bool $test_is_running = true): bool\n {\n // In case of previous run, let's us\n if (!$this->started && $test_is_running) {\n $this->started = $this->isProcessRunning();\n }\n\n return $this->started;\n }", "public function canStartSession();", "public function isAlive();", "public function isAlive();", "public function isStatusValidToStart()\n {\n if ($this->pubDirectory->isExist($this->getRelativeFilePath(self::IMPORT_STATUS_READY))) {\n return true;\n }\n return false;\n }", "public function start() {\n if ($this->isRunning()) {\n return false;\n }\n\n $this->execute('start');\n\n return true;\n }", "public function eventExists()\n {\n return $this->getTalk()->getSpeaker()->exists();\n }", "public function isStartedAndNotFinished()\r\n {\r\n $now = Zend_Date::now();\r\n \r\n $date = new Zend_Date($this->start_time);\r\n $afterStart = $now->compare($date) === 1;\r\n\r\n $date->addDay($this->duration);\r\n $beforeEnd = $now->compare($date) === -1;\r\n \r\n return $afterStart && $beforeEnd;\r\n }", "private function checkIfPlayerHasWon()\n {\n $totalResult = $this->score + $this->savedScore;\n if ($totalResult >= self::POINTS_AT_WIN) {\n $this->playerMessage = 'GRATTIS, du har VUNNIT. Du har ett hundra poäng eller mer!';\n $this->hasWon = true;\n }\n }", "public function isWin() {\n\t\tif ($_SESSION['game']->getState()==\"correct\") {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function is_ready();", "public function check()\n {\n return time()%2==1; // condition\n }", "public function hasSession()\n {\n if ($this->session) {\n return $this->session->isStarted();\n } else {\n return false;\n }\n }", "public function isRunning() {\n try {\n $response = $this->execute('status');\n if (strpos($response, 'Child in state ') !== 0) {\n return false;\n }\n\n $state = trim(substr($response, 15));\n\n return $state === 'running';\n } catch (VarnishException $exception) {\n return false;\n }\n }", "public function needs_run() {\n $today = time();\n $lastrun = $this->info[\"last_run\"];\n $interval = (int)$this->freq * 86400;\n\n return($today > ($lastrun + $interval));\n }" ]
[ "0.7144569", "0.7144569", "0.7144569", "0.70950603", "0.7045439", "0.6933159", "0.69188476", "0.69073355", "0.683146", "0.6782225", "0.6763463", "0.674255", "0.674255", "0.674255", "0.6715309", "0.6669208", "0.6658073", "0.66069454", "0.6603335", "0.6513421", "0.6458025", "0.64510745", "0.64468026", "0.64387375", "0.6407662", "0.6401339", "0.6383261", "0.63648057", "0.6357345", "0.6341321", "0.6314204", "0.6291435", "0.62812024", "0.6184665", "0.6178183", "0.6177549", "0.6166509", "0.6133867", "0.6133867", "0.61297494", "0.61268234", "0.6092909", "0.6084572", "0.60690814", "0.6047495", "0.60317785", "0.60004663", "0.5996311", "0.59836096", "0.59766555", "0.5974132", "0.5970015", "0.59622836", "0.5948361", "0.594445", "0.5941254", "0.591265", "0.5907986", "0.5903058", "0.5895868", "0.5892258", "0.58493716", "0.58305216", "0.5824534", "0.58226466", "0.58120185", "0.5798223", "0.57913244", "0.57767004", "0.5774977", "0.5772897", "0.5753699", "0.57389396", "0.57363623", "0.57352275", "0.5734745", "0.5734623", "0.57106316", "0.5698562", "0.5697114", "0.5663514", "0.5663087", "0.5658802", "0.5654164", "0.5640749", "0.5637356", "0.56333965", "0.56199414", "0.56199414", "0.5614739", "0.5613119", "0.56108457", "0.5606326", "0.55992305", "0.5591614", "0.55850834", "0.55818623", "0.5577993", "0.55477816", "0.5547033" ]
0.6844322
8
Check if a game has ended.
public function isEnded() { return $this->ended_at > 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function isGameFinished()\n {\n $isGameFinished = false;\n\n $totalResult = $this->score + $this->savedScore;\n if ($totalResult >= self::POINTS_AT_WIN) {\n $isGameFinished = true;\n }\n\n return $isGameFinished;\n }", "public function hasGameFinished()\n {\n return $this->hasWon;\n }", "public function isEnded();", "public function isEnded() {}", "function checkGameEnd(){\n\tglobal $roomid, $db;\n\t$q = $db -> prepare(\"SELECT * FROM game WHERE roomid = ? LIMIT 1\");\n\t$q->execute(array($roomid));\n\t$r = $q->fetch();\n\t// When one of the players played all cards\n\tif($r['cardnorth'] == null || $r['cardeast'] == null || $r['cardsouth'] == null || $r['cardwest'] == null){\n\t\treturn '1';\n\t}\n\treturn '0';\n}", "private function endGame()\n {\n $this->hasWon = true;\n $this->calculatePoints();\n $this->setMessageToPlayer();\n }", "public function has_ended() {\r\n\t\treturn 0 == $this->get_seconds_left();\r\n\t}", "public function hasEnded()\n {\n return $this->ended;\n }", "public function isFinished()\n {\n return $this->isWinner('X') || $this->isWinner('O') || $this->isDraw();\n }", "public function ends()\n {\n return $this->endRepeat !== \"never\";\n }", "public function testGetFinishedGame()\n {\n $game = new DiceGame(4, 1);\n $this->assertInstanceOf(\"\\Ida\\Dice\\DiceGame\", $game);\n $finished = $game->getFinishedGame();\n \n $exp = false;\n $this->assertEquals($exp, $finished);\n }", "public function has_finished()\n {\n return $this->days_left() == 0;\n }", "public function isFinished() {\n if($this->state == \"completed\" ||\n $this->state == \"rejected\" ||\n $this->state == \"failed\") {\n return true;\n } else {\n return false;\n }\n }", "public function isEnding()\n\t{\n\t\treturn $this->session->expiring();\n\t}", "public function ended();", "public function battleFinished()\n {\n return ($this->_army1->isDefeated() or $this->_army2->isDefeated());\n }", "public function checkTimeEnd(): bool;", "public function gameWon()\n {\n return $this->countStones() === 1;\n }", "public function isFinished(): bool;", "function finished() {\n\t\treturn $this->tries && ( ( $this->ready() && ! $this->hasSteps() ) || ! $this->needed() );\n\t}", "public function isFinished() {\n\t\treturn $this->workflowActivitySpecification->isFinished();\n\t}", "public function isInGame() {\n return $this->onlineState == 'in-game';\n }", "public function isFinished();", "function done() {\n return $this->currentState === self::DONE;\n }", "public function isGameOver(): bool\n {\n return $this->getGameState() === SELF::STATE_GAMEOVER;\n }", "abstract protected function isGameOver();", "public function hasFinishState(){\n return $this->_has(5);\n }", "public function finished()\n {\n return ! is_null($this->finishedAt);\n }", "public function testHasEnded()\n\t{\n\t\t$this->assertFalse($this->object->hasEnded());\n\n\t\t$ended = new PNEngineStateEnded($this->object);\n\t\tTestReflection::setValue($this->object, 'state', $ended);\n\n\t\t$this->assertTrue($this->object->hasEnded());\n\t}", "protected function is_question_finished(): bool {\n return $this->quba->get_question_state($this->slot)->is_finished();\n }", "public function gameOver() : bool\n {\n return $this->cpu->totalScore() >= 100 || $this->player->totalScore() >= 100;\n }", "public function isPlayed() : bool {\n\t\tif (count($this->games) === 0) {\n\t\t\treturn false;\n\t\t}\n\t\treturn count(array_filter($this->getGames(), static function($a) {\n\t\t\t\treturn $a->isPlayed();\n\t\t\t})) !== 0;\n\t}", "function game_is_broken($game) {\n\tif ($game->is_tie()) {\n\t\techo \"\\n\\n****ERROR: Broken Game. Tie! in game_is_broken()\";\n\t\tpause(\"\");\n\t\treturn true;\n\t}\n\treturn false;\n}", "public function playing(): bool\n {\n\n return $this->state !== SELF::STATE_GAMEOVER;\n }", "public function hasFinishScore(){\n return $this->_has(3);\n }", "private function searchMustEnd(): bool\n {\n return in_array($this->search->fresh()->status, [\n Search::STATUS_FINISHED,\n Search::STATUS_FAILED,\n Search::STATUS_PAUSED\n ]);\n }", "public function endAction()\n {\n // Play the game\n $session = $this->app->session;\n $title = \"Play the game\";\n $data = [\n \"winner\" => $session->get(\"winner\")\n ];\n\n $this->app->page->add(\"dice2/end\", $data);\n return $this->app->page->render([\n \"title\" => $title,\n ]);\n }", "public function hasEnd(){\n return $this->_has(3);\n }", "public function hasEnd(){\n return $this->_has(3);\n }", "public function hasEndtime(){\n return $this->_has(8);\n }", "public function isFinish()\n {\n\t $countSide = $this->getSideCount();\n\n for ($y = 1; $y <= $countSide; $y++) {\n $this->processPositions('Horizontal', $y);\n\t if ($this->winnerType) {\n\t\t return true;\n\t }\n\n $this->processPositions('Vertical', $y);\n\t if ($this->winnerType) {\n\t\t return true;\n\t }\n }\n\n $this->processPositions('LeftBisector');\n\t if ($this->winnerType) {\n\t\t return true;\n\t }\n\n $this->processPositions('RightBisector');\n\t if ($this->winnerType) {\n\t\t return true;\n\t }\n\n\t // All cells fill\n\t if (!in_array(null, $this->kitCells)) {\n\t\t return true;\n\t }\n\n return false;\n }", "public final function __end() : bool {\n\t\t\treturn false;\n\t\t}", "public function isOngoing() {\n return ($this->hasStarted() && !$this->isFinished());\n }", "public function isFinished(): bool\n {\n return $this -> charging_status == OrderStatusEnum :: FINISHED;\n }", "public function end_turn()\n\t{\n\t\t//\t\tpropre a la classe\n\t}", "static function endSended(Reservation $res) {\n\t\t$db = new Db();\n\t\t$db->saveQry(\"SELECT COUNT(*) as `set` FROM `#_reminder` \".\n\t\t\t\t\"WHERE `reservation` = ? AND `status` = 'end'\",\n\t\t\t\t$res->getId());\n\t\t$res = $db->fetch_assoc();\n\t \treturn (intval($res['set']) > 0);\n\t}", "protected function hasCompleted()\r\n {\r\n return !(bool)$this->getExpectedStep();\r\n }", "function checkWorldFinished()\n{\n\tglobal $db;\n\t$sql = \"SELECT COUNT(DISTINCT(id)) FROM wg_buildings WHERE type_id=37 AND level =100\";\n\t$db->setQuery($sql);\n\t$count = (int)$db->loadResult();\n\tif($count>0)\n\t{\n\t\t$sql=\"UPDATE wg_users SET anounment='world_finished'\";\n\t\t$db->setQuery($sql);\n\t\t$db->query();\n\t\tif($db->getAffectedRows()==0)\n\t\t{\t\n\t\t\tglobalError2('function checkWorldFinished:'.$sql);\n\t\t}\t\n\t}\n\treturn true;\n}", "public function isStopped()\n {\n $last = $this->getLast();\n if ($last) {\n return $last->value === Manager::STOP;\n }\n }", "public function isDone(): bool\n {\n return $this->index === count($this->objectListKeys);\n }", "public function adminEndMatch() : bool\n {\n return $this->_consoleCommand('AdminEndMatch', '', 'Match ended');\n }", "public function isDone()\n {\n return $this->result == self::RESULT_DONE;\n }", "public function isCakeFestDone()\n {\n $endDate = Configure::read('Site.cakefest.end_date');\n\n return (new Time($endDate)) < (new Time());\n }", "public function qualifyAsFinished(): bool;", "private function checkIfPlayerHasWon()\n {\n $totalResult = $this->score + $this->savedScore;\n if ($totalResult >= self::POINTS_AT_WIN) {\n $this->playerMessage = 'GRATTIS, du har VUNNIT. Du har ett hundra poäng eller mer!';\n $this->hasWon = true;\n }\n }", "public function hasFailures()\n {\n return $this->failedsportevents > 0;\n }", "private function exit_user_from_game() {\n //increments the user account_balance, since the amount was already deducted at game start\n $this->executeSQL(\"UPDATE {$this->users_table_name} SET account_balance = cast(account_balance as int) + {$this->amount} WHERE user_id = '{$this->userID}'\");\n\n /*This gets the user current game details*/\n $this->userCurrentGameDetail = $this->fetch_data_from_table($this->games_table_name, 'game_id', $this->user_details[\"game_id_about_to_play\"])[0];\n\n /* Gets the number of players in the game */\n $number_of_players = (int)$this->userCurrentGameDetail[\"number_of_players\"];\n\n /* the new number of players will now be the previous number of players - 1*/\n $new_number_of_players = $number_of_players - 1;\n /* if the new number of players is equal to 0; meaning that he is the only one about to play; the entire game details will be deleted from the database*/\n if($new_number_of_players == 0){ $this->delete_record($this->games_table_name , \"game_id\" , $this->user_details[\"game_id_about_to_play\"] ); return true;}\n /* else set the new number of players to the one above */\n $this->update_record($this->games_table_name , \"number_of_players\" , $new_number_of_players , 'game_id' , $this->userCurrentGameDetail[\"game_id\"]);\n /* delete the game id from the user detail to avoid deduction from the when the game starts */\n $this->update_record($this->users_table_name , \"game_id_about_to_play\" , \"0\" , 'user_id' , $this->userID);\n /* finally return true */\n return true;\n }", "public function wasHalted()\n\t{\n\t\treturn $this->halted === true;\n\t}", "public function isDone()\n\t{\n\t $today = Carbon::now()->setTimezone('America/Los_Angeles')->startOfDay();\n\t return $today->gte($this->event_date->endOfDay());\n\t}", "function getEnded() \n {\n return $this->instance->getEnded();\n }", "public function hasServerGameTime()\n {\n return $this->server_game_time !== null;\n }", "public function isCompleted(): bool\n {\n return ($this->progress_error + $this->progress_ok) >= \\count($this->state->getSourceStates());\n }", "public function is_endless() {\r\n\t\treturn 0 == $this->end_date;\r\n\t}", "function game_check() {\r\n $this->invalid_char = array_diff($this->position, $this->valid_char);\r\n if ($this->grid_size % 2 == 0 || $this->grid_size < 3 || $this->grid_size > 15) {\r\n $this->game_message('invalid-size');\r\n } else if (count($this->invalid_char, COUNT_RECURSIVE) > 0) {\r\n $this->game_message('invalid-character');\r\n } else if (strlen($this->board) <> pow($this->grid_size, 2)) {\r\n $this->game_message('invalid-board');\r\n } else if ($this->board == str_repeat('-', pow($this->grid_size, 2))) {\r\n $this->game_play(true);\r\n $this->game_message('new-game');\r\n } else if (substr_count($this->board, 'x') - substr_count($this->board, 'o') > 1) {\r\n $this->game_play(false);\r\n $this->game_message('too-many-x');\r\n } else if (substr_count($this->board, 'o') - substr_count($this->board, 'x') > 0) {\r\n $this->game_play(false);\r\n $this->game_message('too-many-o');\r\n } else if ($this->win_check('x')) {\r\n $this->game_play(false);\r\n $this->game_message('x-win');\r\n } else if ($this->win_check('o')) {\r\n \r\n $this->game_play(false);\r\n $this->game_message('o-win');\r\n } else if (stristr($this->board, '-') === FALSE) {\r\n \r\n $this->game_play(false);\r\n $this->game_message('tie-game');\r\n } else {\r\n $this->pick_move();\r\n if ($this->win_check('o')) {\r\n $this->game_play(false);\r\n $this->game_message('o-win');\r\n } else {\r\n $this->game_play(true);\r\n $this->game_message('ongoing-game');\r\n }\r\n }\r\n }", "public function isPaused();", "public function isComplete()\n {\n return !$this->isOpen();\n }", "public function runGame()\n {\n $currentGame = $this->find('all')->where([\n 'complete' => false\n ])->contain(['Users'])->first();\n\n //get all the plays counts\n $gamesUsersTable = TableRegistry::get('GamesUsers');\n $currentGameCheckedCount = $gamesUsersTable->find();\n $currentGameCheckedCount = $currentGameCheckedCount->select([\n 'count' => $currentGameCheckedCount->func()->count('*')\n ])->where([\n 'game_id' => $currentGame->id,\n 'checked_box' => true\n ])->first()->count;\n\n $currentGameUncheckedCount = $gamesUsersTable->find();\n $currentGameUncheckedCount = $currentGameUncheckedCount->select([\n 'count' => $currentGameUncheckedCount->func()->count('*')\n ])->where([\n 'game_id' => $currentGame->id,\n 'checked_box' => false\n ])->first()->count;\n\n $totalPlays = $currentGameCheckedCount + $currentGameUncheckedCount;\n\n //If not enough players, extend the end time and bail;\n if ($totalPlays < 2) {\n $currentGame->end_time = Time::now()->addHour(1);\n $this->save($currentGame);\n return false;\n }\n\n //update current game fields\n $currentGame->total_checked = $currentGameCheckedCount;\n $currentGame->total_plays = $totalPlays;\n $currentGame->ratio = round((float)$currentGameCheckedCount / (float)$totalPlays, 2);\n\n //save game as 'complete'\n $currentGame->complete = true;\n $this->save($currentGame);\n\n //get all the users that played this round\n $usersTable = TableRegistry::get('Users');\n $usersWhoCheckedThisGameIdArray = $gamesUsersTable->find('list', [\n 'valueField' => 'user_id'\n ])->where([\n 'game_id' => $currentGame->id,\n 'checked_box' => true\n ])->toArray();\n $currentGameCheckedUsers = $usersTable->find('all')->where([\n 'id IN' => (!empty($usersWhoCheckedThisGameIdArray) ? $usersWhoCheckedThisGameIdArray : [0])\n ]);\n\n $usersWhoDidntCheckThisGameIdArray = $gamesUsersTable->find('list', [\n 'valueField' => 'user_id'\n ])->where([\n 'game_id' => $currentGame->id,\n 'checked_box' => false\n ])->toArray();\n $currentGameUncheckedUsers = $usersTable->find('all')->where([\n 'id IN' => (!empty($usersWhoDidntCheckThisGameIdArray) ? $usersWhoDidntCheckThisGameIdArray : [0])\n ]);\n\n\n //update users scores\n foreach ($currentGameCheckedUsers as $user) {\n if ($currentGame->ratio > 0.5) {\n if ($user->score != 0) {\n $user->score = (int)$user->score - 10;\n }\n } else {\n $user->score = (int)$user->score + 10;\n }\n $usersTable->save($user);\n }\n\n //create next incomplete game & save\n $this->createNewGame();\n\n //send notification emails to everybody that gained/lost points\n $email = new Email('default');\n\n $email->setTemplate('end_game', 'default')\n ->setEmailFormat('html')\n ->setFrom(\"[email protected]\", \"Cruelty Game\")\n ->setSubject('Cruelty Game Results')\n ->setViewVars([\n 'ratio' => $currentGame->ratio,\n 'checked' => true,\n 'gameDomain' => Configure::read('GameDomain')\n ]);\n\n foreach ($currentGameCheckedUsers as $user) {\n if ($user->receive_emails && $user->enabled) {\n $email->addBcc($user->email);\n }\n }\n\n //don't bother emailing if there's nobody to email.\n if (empty($email->getTo()) && empty($email->getCc()) && empty($email->getBcc())) {\n return true;\n }\n try {\n $email->send();\n } catch (\\Cake\\Network\\Exception\\SocketException $e) {\n Log::write(\"error\", \"Couldn't send game result email!\");\n }\n\n //send email to everybody who played but didn't check\n $email = new Email('default');\n\n $email->setTemplate('end_game', 'default')\n ->setEmailFormat('html')\n ->setFrom(\"[email protected]\", \"Cruelty Game\")\n ->setSubject('Cruelty Game Results')\n ->setViewVars([\n 'ratio' => $currentGame->ratio,\n 'checked' => false,\n 'gameDomain' => Configure::read('GameDomain')\n ]);\n\n foreach ($currentGameUncheckedUsers as $user) {\n if ($user->receive_emails && $user->enabled) {\n $email->addBcc($user->email);\n }\n }\n\n //don't bother emailing if there's nobody to email.\n if (empty($email->getTo()) && empty($email->getCc()) && empty($email->getBcc())) {\n return true;\n }\n try {\n $email->send();\n } catch (\\Cake\\Network\\Exception\\SocketException $e) {\n Log::write(\"error\", \"Couldn't send game result email!\");\n }\n }", "public function isClosed() {\n return $this->status == 2;\n }", "public function isDone()\r\n {\r\n if ($this->index == $this->aggregate->size()) {\r\n return true;\r\n }\r\n return false;\r\n }", "public function isCompleted()\n\t{\n\t\tif($this->test_status_id == Test::COMPLETED)\n\t\t\treturn true;\n\t\telse \n\t\t\treturn false;\n\t}", "private function _checkEnd($position){\r\n return $position == $this->_endPoint ? true : false;\r\n /*\r\n * If it's possible that there is no solution for labyrinth\r\n * this function should check if algorithm didn't go back to start tile\r\n */\r\n }", "public function hasNumPaused()\n {\n return $this->num_paused !== null;\n }", "public function is_game_live()\n {\n return $this->status === 'live' ? true : false;\n }", "public function isOngoing()\n {\n if (empty($this->eventdatetime->endtime)) {\n return false;\n }\n\n $start = date('m-d-Y', strtotime($this->eventdatetime->starttime));\n $end = date('m-d-Y', strtotime($this->eventdatetime->endtime));\n\n //It is not an ongoing event if it starts and ends on the same day.\n if ($start == $end) {\n return false;\n }\n\n return true;\n }", "public function isDone() {\n\t\treturn $this->getDone();\n\t}", "public function exit(float $timeout = 0.0): bool {}", "public function isWin() {\n\t\tif ($_SESSION['game']->getState()==\"correct\") {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function isClosed();", "public function isClosed();", "public function hasStopped() {\n return (bool) $this->stoppedAt;\n }", "public function testGetEndedState()\n\t{\n\t\t$this->assertInstanceOf('PNEngineStateEnded', $this->object->getEndedState());\n\n\t\tTestReflection::setValue($this->object, 'endedState', true);\n\t\t$this->assertTrue($this->object->getEndedState());\n\t}", "public function doneRendering(): bool\n {\n return $this->renderCount == 0;\n }", "public function testCheckWinner()\n {\n $gamestate = $this->game->getGamestate();\n $this->game->holdHand();\n $this->assertNull($gamestate[\"hasWon\"]);\n\n $gamestate[\"active\"]->addPoints(100);\n $exp = $gamestate[\"active\"];\n $this->game->holdHand();\n\n $gamestate = $this->game->getGamestate();\n $this->assertEquals($exp, $gamestate[\"hasWon\"]);\n }", "public function checkWin() {\n\n $data = $this->getDeathRecord();\n $data = array_map(function($d) {\n return $d[key($d)];\n }, $data);\n\n if ($data) {\n if (in_array(\"FARMER\", $data)) {\n return FALSE;\n }\n if (in_array(\"COW_1\", $data) && in_array(\"COW_2\", $data)) {\n return FALSE;\n }\n if (in_array(\"BUNNY_1\", $data) && in_array(\"BUNNY_2\", $data) && in_array(\"BUNNY_4\", $data) && in_array(\"BUNNY_4\", $data)) {\n return FALSE;\n }\n }\n return true;\n }", "protected function ends()\n {\n static $re_all = '/^[\\h\\v]*$/';\n static $re_nnl = '/^[\\h]*$/';\n \n if ($this->data === null)\n return true;\n \n // if $tnl (track new lines) is true: use \\h, else: use \\h\\v\n return preg_match($this->tnl ? $re_nnl : $re_all, $this->data);\n }", "public function canStartFinals(Event $event)\n {\n // Check that there have been any number of heats\n $heats = $event->races->where('heat', true);\n if (!count($heats)) {\n return false;\n }\n // Check that all heats are complete\n $complete = $heats->where('complete', true);\n if ($heats->count() !== $complete->count()) {\n return false;\n }\n // Check that there are no other races\n return ($event->races->where('heat', false)->count() == 0);\n }", "abstract public function isComplete();", "public function isOpen()\n {\n return ($this->hasStarted() and ! $this->hasEnded());\n }", "public function onBoardingIsCompleted()\n {\n return !empty($this->getIdToken());\n // Commented out because psx form is no longer used\n // && $this->psxFormIsCompleted();\n }", "public function endView()\n {\n if ($this->pop() === false) {\n TIP::error(\"'endView()' requested without a previous 'startView()' or 'startDataView()' call\");\n return false;\n }\n\n return true;\n }", "public function isClosed()\n\t{\n\t\treturn ($this->get('state') == static::ANSWERS_STATE_CLOSED);\n\t}", "public function isFinalState(): bool {\n return $this->finalState;\n }", "public function joinGame()\n {\n $this->addEvent(\"join_game\");\n }", "public function endGame(Request $request)\n {\n $time = $request->time;\n $questions = $request->questionCounter;\n $clues = $request->clueCounter;\n $validations = $request->failedValidations;\n\n $quiz = Quiz::findOrFail($request->id);\n $difficulty = $quiz->difficulty;\n\n $baseScore = (100 * $questions) - ($clues * 3) - ($validations * 5) - floor($time / 60);\n $exponent = 33.3 * $difficulty + 66.5;\n $score = $baseScore / 100 * $exponent;\n $score = $score > 0 ? $score : 0;\n\n if (auth()->check()) {\n\n $oldScore = DB::table('scores')->where('quiz_id', '=', $request->id)->where('user_id', '=', $request->user()->id)->get();\n \n // Updates existing score on isset\n if (isset($oldScore[0])) {\n $newScore = Score::findOrFail($oldScore[0]->id);\n $newScore->score = $oldScore[0]->score > $score ? $oldScore[0]->score : $score;\n $newScore->save();\n } else { // Creates a new one if no score is found\n $newScore = new Score();\n $newScore->quiz_id = intval($request->id);\n $newScore->user_id = $request->user()->id;\n $newScore->score = $score;\n $newScore->save();\n }\n\n // Checking if the user gets new badges\n $newBadges = $this->checkingBadges($quiz, $score, $time);\n\n\n return view('game_completed')->with(compact('quiz', 'score', 'time', 'newBadges'));\n } else {\n return view('game_completed')->with(compact('quiz', 'score', 'time'));\n }\n }", "public function isClosed(): bool\n\t{\n\t\treturn !$this->isOpen();\n\t}", "public function endPeriod() {\n $this->checkStopLoss();\n //Handle Trailing Stop\n $this->checkTrailingStop();\n $this->checkMarketIfTouched();\n //Check to see if take profit was hit\n $this->checkTakeProfit();\n }", "public function isDoneRunning(): bool\n {\n assert($this->process !== null);\n\n return $this->process->isTerminated();\n }", "public function isClosed() {\n\t\t$closed_states = ideation_get_closed_states();\n\t\t\n\t\treturn in_array($this->status, $closed_states);\n\t}", "private function hasFinishedGame($userId, $days) {\n $success = true;\n $date = new DateTime;\n\n for ($i = 1; $i <= $days; $i++) {\n $date->sub(new DateInterval('P1D'));\n $count = GameUser::where(['user_id' => $userId, 'finished' => true])\n ->whereDate('created_at', '=', $date->format('Y-m-d'))\n ->get()\n ->count();\n if ($count === 0) {\n $success = false;\n break;\n }\n }\n\n return $success;\n }", "public function isComplete()\n {\n $interfaceCount = $this->device->interfaces()->count(); //get number of interfaces\n \n $testCount = \\App\\Test::count(); //get number of tests\n \n $expectedResultCount = $testCount * $interfaceCount;\n \n return ($expectedResultCount == $this->results()->count());\n }" ]
[ "0.81349516", "0.7418887", "0.7415461", "0.7415024", "0.73098147", "0.72700894", "0.711619", "0.7025608", "0.69832295", "0.6870875", "0.67612505", "0.6614386", "0.6593995", "0.65196514", "0.6497341", "0.6468668", "0.6468538", "0.6321781", "0.6313133", "0.62639", "0.6259871", "0.62588674", "0.6253292", "0.62226117", "0.6213064", "0.6192601", "0.61742836", "0.61717635", "0.6116161", "0.6094911", "0.6080632", "0.6075984", "0.60698926", "0.6040281", "0.6020001", "0.59391075", "0.59287137", "0.5927572", "0.5927572", "0.59263676", "0.5916893", "0.5897796", "0.58968014", "0.58841765", "0.5868195", "0.58658195", "0.57777303", "0.5747165", "0.5744739", "0.57145023", "0.5710082", "0.57064146", "0.56906897", "0.56698185", "0.5669416", "0.5654033", "0.56336594", "0.56155366", "0.5583772", "0.5580346", "0.5577682", "0.5554917", "0.55253154", "0.5521588", "0.55208206", "0.5505534", "0.549487", "0.5486071", "0.54814917", "0.54761183", "0.54702276", "0.5469058", "0.54614013", "0.54594743", "0.5449927", "0.544478", "0.54302377", "0.5422027", "0.5422027", "0.54199344", "0.5419365", "0.54181635", "0.5415534", "0.5405259", "0.5402279", "0.53970003", "0.5394048", "0.5393811", "0.53929794", "0.53860515", "0.5382303", "0.53786325", "0.5377579", "0.53720176", "0.53590345", "0.5353017", "0.53481376", "0.5345626", "0.5340656", "0.533822" ]
0.7304676
5
declare the specification error codes
static function error( $code, $version = '2.0', $id = null ) { $errors = array ( -32600 => 'Invalid Request', -32601 => 'Method not found', -32602 => 'Invalid params', -32603 => 'Internal error', -32700 => 'Parse error', ); return (object) array( 'id' => $id, 'jsonrpc' => $version, 'error' => (object) array( 'code' => $code, 'message' => $errors[$code], ), ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_error_codes()\n {\n }", "public function errorcode();", "public function get_error_code()\n {\n }", "public function getErrorList()\n {\n return [\n 13 => 1,\n 33 => 1,\n 83 => 1,\n 88 => 1,\n 92 => 1,\n ];\n\n }", "public function getErrorList()\n {\n return [\n 8 => 1,\n 13 => 1,\n ];\n }", "static function error( $code, $desc ) {\n\t\t$codes = array();\n\t\t$codes[400] = 'Bad Request';\n\t\t$codes[401] = 'Unauthorized';\n\t\t$codes[403] = 'Forbidden';\n\t\t$codes[404] = 'Not Found';\n\t\t$codes[405] = 'Method Not Allowed';\n\t\t$codes[406] = 'Not Acceptable';\n\t\t$codes[501] = 'Not Implemented';\n\t\t$codes[503] = 'Service unavailable';\n\t\t\n\t\theader('Content-Type: text/html');\n\t\theader( 'HTTP/1.1 '. $code . ' '. @$codes[$code] );\n\t\tdie( $desc );\n\t}", "function setFailedValidationStatusCode();", "function http_get_response_code_error($code)\n\t{\n\t\t$errors = array(\n\t\t200 => 'Success - The request was successful',\n\t\t201 => 'Created (Success) - The request was successful. The requested object/resource was created.',\n\t\t400 => 'Invalid Request - There are many possible causes for this error, but most commonly there is a problem with the structure or content of XML your application provided. Carefully review your XML. One simple test approach is to perform a GET on a URI and use the GET response as an input to a PUT for the same resource. With minor modifications, the input can be used for a POST as well.',\n\t\t401 => 'Unauthorized - This is an authentication problem. Primary reason is that the API call has either not provided a valid API Key, Account Owner Name and Associated Password or the API call attempted to access a resource (URI) which does not match the same as the Account Owner provided in the login credientials.',\n\t\t404 => 'URL Not Found - The URI which was provided was incorrect. Compare the URI you provided with the documented URIs. Start here.',\n\t\t409 => 'Conflict - There is a problem with the action you are trying to perform. Commonly, you are trying to \"Create\" (POST) a resource which already exists such as a Contact List or Email Address that already exists. In general, if a resource already exists, an application can \"Update\" the resource with a \"PUT\" request for that resource.',\n\t\t415 => 'Unsupported Media Type - The Media Type (Content Type) of the data you are sending does not match the expected Content Type for the specific action you are performing on the specific Resource you are acting on. Often this is due to an error in the content-type you define for your HTTP invocation (GET, PUT, POST). You will also get this error message if you are invoking a method (PUT, POST, DELETE) which is not supported for the Resource (URI) you are referencing.\n\t\tTo understand which methods are supported for each resource, and which content-type is expected, see the documentation for that Resource.',\n\t\t500 => 'Server Error',\n\t\t);\n\n\t\tif(array_key_exists($code, $errors)):\n\t\t\treturn $errors[$code];\n\t\tendif;\n\n\t\treturn '';\n\t}", "public function error400()\n {\n }", "abstract protected function _getErrorNumber();", "private function codes()\n {\n $a_http_status_codes = array(\n 100 => 'Continue', 102 => 'Processing',\n 200 => 'OK', 201 => 'Created', 202 => 'Accepted', 203 => 'Non-Authoritative Information', 204 => 'No Content',\n 205 => 'Reset Content', 206 => 'Partial Content', 207 => 'Multi-Status', 208 => 'Already Reported',\n 226 => 'IM Used', 300 => 'Multiple Choices', 301 => 'Moved Permanently', 302 => 'Found', 303 => 'See Other',\n 304 => 'Not Modified', 305 => 'Use Proxy', 307 => 'Temporary Redirect', 308 => 'Permanent Redirect',\n 400 => 'Bad Request', 401 => 'Unauthorized', 402 => 'Payment Required', 403 => 'Forbidden', 404 => 'Not Found',\n 405 => 'Method Not Allowed', 406 => 'Not Acceptable', 407 => 'Proxy Authentication Required', 408 => 'Request Timeout',\n 409 => 'Conflict', 410 => 'Gone', 411 => 'Length Required', 412 => 'Precondition Failed',\n 413 => 'Request Entity Too Large', 414 => 'Request-URI Too Long', 415 => 'Unsupported Media Type',\n 416 => 'Requested Range Not Satisfiable', 417 => 'Expectation Failed', 421 => 'Misdirected Request',\n 422 => 'Unprocessable Entity', 423 => 'Locked', 424 => 'Failed Dependency', 426 => 'Upgrade Required',\n 428 => 'Precondition Required', 429 => 'Too Many Requests', 431 => 'Request Header Fields Too Large',\n 451 => 'Unavailable For Legal Reasons', 500 => 'Internal Server Error', 501 => 'Not Implemented',\n 502 => 'Bad Gateway', 503 => 'Service Unavailable', 504 => 'Gateway Timeout', 505 => 'HTTP Version Not Supported',\n 506 => 'Variant Also Negotiates', 507 => 'Insufficient Storage', 508 => 'Loop Detected',\n 510 => 'Not Extended', 511 => 'Network Authentication Required'\n );\n return $a_http_status_codes;\n }", "function expectError($code = '*')\n {\n if (is_array($code)) {\n array_push($this->_expected_errors, $code);\n } else {\n array_push($this->_expected_errors, array($code));\n }\n return count($this->_expected_errors);\n }", "function errorCode()\n {\n }", "public function errorCode();", "public function errorCode();", "public static function getDefaultFailureCodes()\r\r\n {\r\r\n return static::$defaultErrorCodes;\r\r\n }", "public function errors();", "public function errors();", "function statusCode()\n {\n }", "public function getErrorList()\n {\n return [15 => 1, 29 => 2, 30 => 1, 42 => 1, 57 => 3, 59 => 3, 61 => 1, 63 => 5, 65 => 1, 71 => 1, 73 => 2, 76 => 1, 86 => 2, 103 => 1, 112 => 1, 122 => 1, 132 => 1, 157 => 1, 165 => 1, 170 => 1, 208 => 1, 219 => 3];\n }", "protected function set_valid_response_codes()\n {\n //@todo manage response codes\n $this->valid_response_codes = array(200);\n }", "public function setPIError($errorCode){\n $res = array();\n $res['error'] = '-1';\n $res['errorCode'] = $errorCode;\n $res['errorMessage'] = 'Something went wrong while adding Personal Information. We\\'ll fix it ASAP';\n return $res;\n }", "public function getCode(): int\n\t{\n\t\treturn $this->err->getCode();\n\t}", "public function errorCode() {}", "public function getErrorCode();", "private static function validateUserSuppliedExceptionCode($code){\r\n\r\n\t\t\t\t$code\t=\t(int)$code;\r\n\r\n\t\t\t\tif($code<0){\r\n\r\n\t\t\t\t\tthrow new \\InvalidArgumentException(\"Exception code must be greater than 0\");\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}", "public function errorCode()\n {\n }", "public function getAcceptableExitCodes(): array\n {\n return [0];\n }", "public function requirements_errors() {\n\t\t$errors = $this->errors;\n\t\trequire_once( ET_CORE_DIR . 'templates/admin/errors/requirements-error.php' );\n\t}", "public function getErrorList()\n {\n return [\n 9 => 1,\n 14 => 1,\n 20 => 1,\n 22 => 1,\n 32 => 1,\n 36 => 1,\n 44 => 1,\n 48 => 1,\n 56 => 1,\n 60 => 1,\n 68 => 1,\n 72 => 1,\n 84 => 1,\n 88 => 2,\n 100 => 1,\n 104 => 2,\n 122 => 2,\n 128 => 1,\n 132 => 3,\n 133 => 2,\n 147 => 1,\n 157 => 1,\n 165 => 1,\n ];\n\n }", "public function getErrorList()\n {\n return [\n 6 => 1,\n 8 => 1,\n 10 => 1,\n 14 => 1,\n 16 => 1,\n 18 => 1,\n 21 => 1,\n 23 => 1,\n 25 => 1,\n 38 => 1,\n 39 => 1,\n 40 => 1\n ];\n }", "function defineErrorCode(int $errorCode) : string {\n $errors = [\n 0 => 'There is no error, the file uploaded with success',\n 1 => 'The uploaded file exceeds the upload_max_filesize directive in php.ini',\n 2 => 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form',\n 3 => 'The uploaded file was only partially uploaded',\n 4 => 'No file was uploaded',\n 6 => 'Missing a temporary folder',\n 7 => 'Failed to write file to disk.',\n 8 => 'A PHP extension stopped the file upload.',\n ];\n\n return $errors[$errorCode];\n}", "public function getErrorList() {\n\t\treturn [\n\t\t\t12 => 1,\n\t\t\t13 => 1,\n\t\t\t14 => 1,\n\t\t\t16 => 1,\n\t\t\t17 => 1,\n\t\t\t21 => 1,\n\t\t\t22 => 1,\n\t\t];\n\t}", "static public function getCodes(){\n return array(\n 200 => 'OK',\n 201 => 'Created',\n 202 => 'Accepted',\n 300 => 'Multiple Choices',\n 301 => 'Moved Permanently',\n 302 => 'Moved Temporarily',\n 307 => 'Temporary Redirect',\n 310 => 'Too many Redirects',\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 402 => 'Payment Required',\n 403 => 'Forbidden',\n 404 => 'Not Found',\n 405 => 'Method Not',\n 406 => 'Not Acceptable',\n 407 => 'Proxy Authentication Required',\n 408 => 'Request Time-out',\n 409 => 'Conflict',\n 410 => 'Gone',\n 411 => 'Length Required',\n 412 => 'Precondition Failed',\n 413 => 'Request Entity Too Large',\n 414 => 'Request-URI Too Long',\n 415 => 'Unsupported Media Type',\n 416 => 'Requested range unsatisfiable',\n 417 => 'Expectation failed',\n 500 => 'Internal Server Error',\n 501 => 'Not Implemented',\n 502 => 'Bad Gateway',\n 503 => 'Service Unavailable',\n 504 => 'Gateway Time-out',\n 508 => 'Loop detected',\n );\n }", "public function testCreateUnsuccessfulReason()\n {\n }", "function error($code) {\n\tswitch ($code) {\n\t\tcase 'EntityExists':\n\t\t\t$str = 'Cannot complete that action because the entity already exists';\n\t\t\tbreak;\n\t\tcase 'EntityDoesNotExist':\n\t\t\t$str = 'Cannot complete that action because that entity does not exist';\n\t\t\tbreak;\n\t\tcase 'InvalidPassword':\n\t\t\t$str = 'The password supplied is not valid';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$str = $code;\n\t}\n\treturn $str;\n}", "public function getErrorList() {\n\t\treturn array(\n\t\t\t11 => 2,\n\t\t\t12 => 2,\n\t\t\t13 => 2,\n\t\t\t16 => 2,\n\t\t\t19 => 2,\n\t\t\t22 => 2,\n\t\t\t26 => 2,\n\t\t\t36 => 2,\n\t\t\t37 => 2,\n\t\t\t38 => 2,\n\t\t\t47 => 2,\n\t\t\t51 => 2,\n\t\t);\n\t}", "public function getErrorList()\n {\n return [\n 5 => 1,\n 7 => 1,\n 9 => 1,\n 11 => 1,\n 14 => 1,\n 16 => 1,\n 19 => 1,\n 21 => 1,\n 26 => 2,\n 27 => 2,\n 28 => 2,\n 29 => 2,\n 32 => 2,\n 33 => 2,\n 34 => 2,\n 35 => 2,\n 41 => 1,\n 47 => 1,\n 51 => 1,\n 53 => 1,\n 55 => 1,\n 57 => 1,\n 60 => 1,\n 62 => 1,\n 67 => 1,\n 69 => 1\n ];\n }", "public function getErrCode() {\n return \"noFormsFound\";\n }", "public function getErrorCode(): int;", "function error($code_or_codes, $callback = NULL)\n{\n\n}", "private function set_zruth_error_list() {\n return array('1' => 'unknown userId',\n '3' => 'amount is not the full amount',\n '1001' => 'already on loan by user',\n '1002' => 'already reserved by user',\n '1003' => 'no copies available for reservation',\n '1004' => 'ordering not allowed for this user',\n '1005' => 'loan not allowed for this user category',\n '1006' => 'loan not allowed, user too young',\n '1007' => 'unspecified error, order not possible',\n '1008' => 'system error',\n '1010' => 'system error',\n '1030' => 'rejected',\n '1020' => 'booking, not cancelled',\n '1030' => 'rejected',\n '1031' => 'reserved',\n '1032' => 'booked',\n '1033' => 'copy reserved',\n '1034' => 'user is blocked',\n '1035' => 'copy not on loan by user',\n '1036' => 'copy not on loan',\n '1037' => 'copy does not exist',\n '1038' => 'ILL, not renewable',\n '1050' => 'ILL, not found',\n '1051' => 'system error',\n '1052' => 'ILL, not cancelled',\n '1101' => 'no agencyId supplied',\n '1102' => 'unknown agencyId',\n '1103' => 'unknown userId',\n '1104' => 'wrong pin code',\n '1123' => 'no itemId, titlePartNo or bookingId supplied',\n '1110' => 'overbooking',\n '1111' => 'counter does not exist',\n '1112' => 'bookingStartDate must be before bookingEndDate',\n '1113' => 'bookingTotal Count must be 1 or more',\n '1114' => 'normal period of booking exceeded',\n '1115' => 'undefined error',\n '1116' => 'number of fetched copies exceeds number of ordered copies',\n '1120' => 'undefined error',\n '1135' => 'undefined error');\n }", "public function getErrorList()\n {\n return [\n 4 => 1,\n 13 => 1,\n 19 => 1,\n 24 => 1,\n 30 => 1,\n 40 => 1,\n 44 => 1,\n 50 => 1,\n 55 => 1,\n 67 => 1,\n 78 => 1,\n 85 => 1,\n 91 => 1,\n 98 => 1,\n 110 => 1,\n 115 => 1,\n 122 => 1,\n 128 => 1,\n 155 => 1,\n 158 => 1,\n 164 => 1,\n 168 => 1,\n 172 => 1,\n 176 => 1,\n 196 => 1,\n 201 => 1,\n 205 => 2,\n 210 => 2,\n 215 => 1,\n 220 => 1,\n 231 => 1,\n 236 => 1,\n 244 => 1,\n 252 => 1,\n 260 => 1,\n ];\n\n }", "public function testExceptionCodes(): void\n {\n $exception = new InvalidUriException();\n\n self::assertSame(BaseExceptionInterface::DEFAULT_ERROR_CODE_VALIDATION, $exception->getErrorCode());\n self::assertSame(0, $exception->getErrorSubCode());\n }", "function get_errors()\n {\n }", "function fillBaseErrors($typeDef,& $errors)\n {\n if( $typeDef[\"REQUIRED\"] )\n $errors[\"UNSET\"]=1;\n }", "public function getErrorList() : array {\n\t\t$file = func_get_arg( 0 );\n\t\tswitch ( $file ) {\n\t\t\tcase 'SlowMetaQueryUnitTest.success.inc':\n\t\t\t\treturn [];\n\n\t\t\tcase 'SlowMetaQueryUnitTest.fail.inc':\n\t\t\t\treturn [\n\t\t\t\t\t7 => 1,\n\t\t\t\t\t14 => 1,\n\t\t\t\t\t27 => 1,\n\t\t\t\t\t37 => 1,\n\t\t\t\t\t47 => 1,\n\t\t\t\t\t59 => 1,\n\t\t\t\t\t78 => 1,\n\t\t\t\t\t94 => 1,\n\t\t\t\t\t98 => 1,\n\t\t\t\t\t105 => 1,\n\t\t\t\t];\n\t\t}\n\t\treturn [];\n\t}", "public function getErrorList() {\n\n\t\treturn array(\n\t\t\t5 => 1,\n\t\t\t9 => 1,\n\t\t\t31 => 1,\n\t\t\t44 => 1,\n\t\t\t48 => 1,\n\t\t\t69 => 1,\n\t\t\t89 => 1,\n\t\t\t113 => 1,\n\t\t\t114 => 1,\n\t\t\t122 => 1,\n\t\t\t126 => 1,\n\t\t\t148 => 1,\n\t\t\t150 => 1,\n\t\t\t159 => 1,\n\t\t\t160 => 1,\n\t\t\t161 => 1,\n\t\t\t177 => 1,\n\t\t\t185 => 1,\n\t\t\t190 => 1,\n\t\t\t198 => 1,\n\t\t\t202 => 1,\n\t\t\t252 => 1,\n\t\t\t269 => 1,\n\t\t);\n\t}", "public function getErrorList()\n {\n return [\n 2 => 1,\n 3 => 2,\n 4 => 1,\n 5 => 2,\n 6 => 2,\n 9 => 3,\n 10 => 2,\n 11 => 3,\n 13 => 3,\n 14 => 2,\n 18 => 1,\n 20 => 1,\n 22 => 2,\n 23 => 2,\n 26 => 1,\n 37 => 4,\n 39 => 1,\n 40 => 1,\n 44 => 2,\n 47 => 2,\n ];\n }", "function upload_errors($err_code) {\r\n switch ($err_code) {\r\n case UPLOAD_ERR_INI_SIZE:\r\n return 'The uploaded file exceeds the upload_max_filesize directive in php.ini';\r\n case UPLOAD_ERR_FORM_SIZE:\r\n return 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form';\r\n case UPLOAD_ERR_PARTIAL:\r\n return 'The uploaded file was only partially uploaded';\r\n case UPLOAD_ERR_NO_FILE:\r\n return 'No file was uploaded';\r\n case UPLOAD_ERR_NO_TMP_DIR:\r\n return 'Missing a temporary folder';\r\n case UPLOAD_ERR_CANT_WRITE:\r\n return 'Failed to write file to disk';\r\n case UPLOAD_ERR_EXTENSION:\r\n return 'File upload stopped by extension';\r\n default:\r\n return 'Unknown upload error';\r\n }\r\n}", "function errorCode($inc_errstr)\n{\n\techo \"<p><b>ERROR! \".$inc_errstr.\"</b></p>\";\n}", "public function getErrorList() {\n\t\treturn array();\n\n\t}", "public function status_code()\n {\n }", "function set_errArr ($err, $err_code, $err_descr, &$errArr) {\n\t$errArr[ERR_CODE] = $err_code;\n\t$errArr[ERR_DESCR] = $err_descr; \n\tif ($err == NULL) {\n\t\t$errArr[ERR_LONG_DESCR] = ZERO_LENGTH_STRING;\n\t}\n\telse {\n\t\t$errArr[ERR_LONG_DESCR] = $err->getMessage();\n\t}\n}", "abstract public function error();", "public function getStatusError($code = false)\n {\n switch ($code) {\n case 204:\n return 204;\n break;\n case 400: //Bad Request\n return 400;\n break;\n case 401:\n return 401;\n break;\n case 403:\n return 403;\n break;\n case 404:\n return 404;\n break;\n case 502:\n return 502;\n break;\n case 504:\n return 504;\n break;\n default:\n return 500;\n break;\n }\n }", "abstract function bootErrorAction(array $errors = null);", "function getErrors();", "public function getErrorCode()\n {\n return $this->getInput('error_code');\n }", "public function errorType($code)\n {\n switch($code)\n {\n case E_ERROR: // 1 //\n return 'E_ERROR';\n case E_WARNING: // 2 //\n return 'E_WARNING';\n case E_PARSE: // 4 //\n return 'E_PARSE';\n case E_NOTICE: // 8 //\n return 'E_NOTICE';\n case E_CORE_ERROR: // 16 //\n return 'E_CORE_ERROR';\n case E_CORE_WARNING: // 32 //\n return 'E_CORE_WARNING';\n case E_COMPILE_ERROR: // 64 //\n return 'E_COMPILE_ERROR';\n case E_COMPILE_WARNING: // 128 //\n return 'E_COMPILE_WARNING';\n case E_USER_ERROR: // 256 //\n return 'E_USER_ERROR';\n case E_USER_WARNING: // 512 //\n return 'E_USER_WARNING';\n case E_USER_NOTICE: // 1024 //\n return 'E_USER_NOTICE';\n case E_STRICT: // 2048 //\n return 'E_STRICT';\n case E_RECOVERABLE_ERROR: // 4096 //\n return 'E_RECOVERABLE_ERROR';\n case E_DEPRECATED: // 8192 //\n return 'E_DEPRECATED';\n case E_USER_DEPRECATED: // 16384 //\n return 'E_USER_DEPRECATED';\n }\n return \"\";\n }", "function error_reporting() {\n\t\t$r='';\n\t\tif (mb_strlen(self::$error)>0) {\n\t\t\t$r.=self::$error;\n\t\t}\n\t\tif (count(self::$error_arr)>0) {\n\t\t\t$r.='<h2>Произошли следующие ошибки:</h2>'.\"\\n\".'<ul>';\n\t\t\tforeach(self::$error_arr as $key=>$value) {\n\t\t\t\t$r.='<li>'.$value.'</li>';\n\t\t\t}\n\t\t\t$r.='</ul>';\n\t\t}\n\t\treturn $r;\n\t}", "public function error498()\n {\n }", "public function getErrorList() {\n\t\treturn [\n\t\t\t19 => 1,\n\t\t\t27 => 1,\n\t\t\t28 => 1,\n\t\t\t29 => 1,\n\t\t\t30 => 1,\n\t\t\t31 => 1,\n\t\t\t32 => 1,\n\t\t\t33 => 1,\n\t\t\t34 => 1,\n\t\t\t37 => 1,\n\t\t\t40 => 1,\n\t\t\t43 => 1,\n\t\t\t46 => 1,\n\t\t\t50 => 1,\n\t\t\t53 => 1,\n\t\t\t56 => 1,\n\t\t\t59 => 1,\n\t\t\t62 => 1,\n\t\t\t75 => 1,\n\t\t\t76 => 1,\n\t\t\t82 => 1,\n\t\t\t83 => 1,\n\t\t\t84 => 1,\n\t\t\t85 => 1,\n\t\t\t88 => 1,\n\t\t\t91 => 1,\n\t\t\t94 => 1,\n\t\t\t97 => 1,\n\t\t\t98 => 1,\n\t\t\t99 => 1,\n\t\t\t100 => 1,\n\t\t\t101 => 1,\n\t\t\t104 => 1,\n\t\t\t107 => 1,\n\t\t\t141 => 1,\n\t\t\t142 => 1,\n\t\t\t143 => 1,\n\t\t\t144 => 1,\n\t\t\t145 => 1,\n\t\t\t146 => 1,\n\t\t\t147 => 1,\n\t\t\t148 => 1,\n\t\t\t149 => 1,\n\t\t\t150 => 1,\n\t\t\t151 => 1,\n\t\t\t152 => 1,\n\t\t\t153 => 1,\n\t\t\t154 => 1,\n\t\t\t155 => 1,\n\t\t\t156 => 1,\n\t\t\t157 => 1,\n\t\t\t158 => 1,\n\t\t\t159 => 1,\n\t\t\t160 => 1,\n\t\t\t161 => 1,\n\t\t\t162 => 1,\n\t\t\t163 => 1,\n\t\t\t164 => 1,\n\t\t\t165 => 1,\n\t\t\t166 => 1,\n\t\t\t168 => 1,\n\t\t\t174 => 1,\n\t\t\t175 => 1,\n\t\t\t177 => 1,\n\t\t\t182 => 1,\n\t\t\t183 => 1,\n\t\t\t184 => 1,\n\t\t\t185 => 1,\n\t\t\t186 => 1,\n\t\t\t187 => 1,\n\t\t\t188 => 1,\n\t\t\t189 => 1,\n\t\t\t190 => 1,\n\t\t\t191 => 1,\n\t\t\t192 => 1,\n\t\t\t193 => 1,\n\t\t\t194 => 1,\n\t\t\t195 => 1,\n\t\t\t196 => 1,\n\t\t\t197 => 1,\n\t\t\t198 => 1,\n\t\t\t199 => 1,\n\t\t\t200 => 1,\n\t\t\t218 => 1,\n\t\t\t220 => 1,\n\t\t\t222 => 1,\n\t\t];\n\t}", "public function get_error();", "public function get_error();", "function init_errArr ($function_name) {\n\treturn(array(ERR_CODE=>0, ERR_FUNCTION_NAME=>$function_name, ERR_DESCR=>\"\",\n\t\tERR_LONG_DESCR=>\"\", ERR_SQLSTATE=>\"\", ERR_SQLSTATE_MSG=>\"\", ERR_AFFECTED_ROWS=>0, ERR_INSERT_ID=>0));\n}", "private function validateParams(){\n\t\t$name\t = $this->param['name']; \n\t\t$ic\t\t = $this->param['ic']; \n\t\t$mobile\t= $this->param['mobile']; \n\t\t$email\t= $this->param['email']; \n\t\t$statusCode = array();\n\t\tif(!$name){\n\t\t\t$statusCode[] = 115;\n\t\t}\n\t\tif(!$ic){\n\t\t\t$statusCode[] = 116;\n\t\t}\n\t\tif(!$email){\n\t\t\t$statusCode []= 101;\n\t\t}elseif (!filter_var($email, FILTER_VALIDATE_EMAIL)) {\n\t\t $statusCode[] = 105;\n\t\t}\n\t\treturn $statusCode;\n\t}", "private function setErrors()\n {\n $this->errors = [\n 'error_no' => curl_errno($this->curl),\n 'error' => curl_error($this->curl),\n ];\n }", "public function getErrorList() {\n\t\treturn array(\n\t\t\t12 => 1,\n\t\t\t13 => 1,\n\t\t\t14 => 1,\n\t\t\t15 => 1,\n\t\t\t24 => 1,\n\t\t\t25 => 2,\n\t\t\t26 => 1,\n\t\t\t27 => 2,\n\t\t\t28 => 1,\n\t\t\t29 => 2,\n\t\t\t30 => 2,\n\t\t\t31 => 1,\n\t\t\t32 => 1,\n\t\t\t33 => 1,\n\t\t\t34 => 1,\n\t\t\t35 => 1,\n\t\t\t38 => 1,\n\t\t\t39 => 2,\n\t\t\t40 => 1,\n\t\t\t41 => 2,\n\t\t\t42 => 1,\n\t\t\t43 => 2,\n\t\t\t44 => 2,\n\t\t\t45 => 1,\n\t\t\t46 => 1,\n\t\t\t47 => 1,\n\t\t\t48 => 1,\n\t\t\t49 => 1,\n\t\t\t60 => 1,\n\t\t\t61 => 1,\n\t\t\t62 => 1,\n\t\t\t63 => 1,\n\t\t);\n\t}", "public function errorInfo();", "public function errorInfo();", "public function getErrorList()\n {\n return [\n 3 => 1,\n 7 => 1,\n 12 => 1,\n 15 => 1,\n 18 => 2,\n 20 => 1,\n 22 => 2,\n 28 => 2,\n 32 => 2,\n 38 => 2,\n 42 => 2,\n 48 => 2,\n 52 => 2,\n 62 => 2,\n 66 => 4,\n 76 => 4,\n 80 => 4,\n 82 => 1,\n 86 => 1,\n 90 => 1,\n 94 => 1,\n 95 => 1,\n 99 => 1,\n 108 => 2,\n 112 => 1,\n 115 => 1,\n 120 => 1,\n 122 => 2,\n 123 => 1,\n 130 => 2,\n 134 => 1,\n 150 => 1,\n 151 => 1,\n 153 => 1,\n 154 => 1,\n 158 => 2,\n 163 => 1,\n 165 => 1,\n 170 => 2,\n 186 => 2,\n 187 => 2,\n 225 => 1,\n 231 => 1,\n 240 => 1,\n 254 => 1,\n 260 => 2,\n 272 => 1,\n 278 => 1,\n 284 => 3,\n 290 => 2,\n 296 => 2,\n 302 => 2,\n 316 => 1,\n 326 => 1,\n 330 => 1,\n 335 => 1,\n 337 => 8,\n 339 => 2,\n 340 => 2,\n 343 => 6,\n 344 => 2,\n 346 => 1,\n 348 => 1,\n 350 => 1,\n 351 => 3,\n 352 => 2,\n 354 => 1,\n 357 => 2,\n 363 => 2\n ];\n }", "private function __requestStatus( $code )\n {\n $status = array( \n 200 => 'OK',\n 201 => 'Created',\n 202 => 'Accepted',\n 402 => 'Request Limit Reached',\n 404 => 'Not Found', \n 405 => 'Method Not Allowed',\n 500 => 'Internal Server Error',\n ); \n return ( $status[$code] ) ? $status[$code] : $status[500]; \n }", "protected static function getError(int $code): array {\r\n $message = '';\r\n switch ($code) {\r\n case self::PARSE_ERROR:\r\n $message = 'Parse error';\r\n break;\r\n case self::INVALID_REQUEST:\r\n $message = 'Invalid request';\r\n break;\r\n case self::METHOD_NOT_FOUND:\r\n $message = 'Method not found';\r\n break;\r\n case self::INVALID_PARAMS:\r\n $message = 'Invalid params';\r\n break;\r\n case self::INTERNAL_ERROR:\r\n $message = 'Internal error';\r\n break;\r\n }\r\n \r\n return ['code' => $code, 'message' => $message];\r\n }", "public function dataStatusCodeMessages()\n {\n return array(\n array(100, 'Continue'),\n array(101, 'Switching Protocols'),\n array(200, 'OK'),\n array(201, 'Created'),\n array(202, 'Accepted'),\n array(203, 'Non-Authoritative Information'),\n array(204, 'No Content'),\n array(205, 'Reset Content'),\n array(206, 'Partial Content'),\n array(300, 'Multiple Choices'),\n array(301, 'Moved Permanently'),\n array(302, 'Found'),\n array(303, 'See Other'),\n array(304, 'Not Modified'),\n array(305, 'Use Proxy'),\n array(307, 'Temporary Redirect'),\n array(400, 'Bad Request'),\n array(401, 'Unauthorized'),\n array(402, 'Payment Required'),\n array(403, 'Forbidden'),\n array(404, 'Not Found'),\n array(405, 'Method Not Allowed'),\n array(406, 'Not Acceptable'),\n array(407, 'Proxy Authentication Required'),\n array(408, 'Request Timeout'),\n array(409, 'Conflict'),\n array(410, 'Gone'),\n array(411, 'Length Required'),\n array(412, 'Precondition Failed'),\n array(413, 'Request Entity Too Large'),\n array(414, 'Request-URI Too Long'),\n array(415, 'Unsupported Media Type'),\n array(416, 'Requested Range Not Satisfiable'),\n array(417, 'Expectation Failed'),\n array(500, 'Internal Server Error'),\n array(501, 'Not Implemented'),\n array(502, 'Bad Gateway'),\n array(503, 'Service Unavailable'),\n\n // Edge cases...\n array('foo', null),\n array(null, null),\n array(1, null),\n array(600, null),\n array(460, null),\n array(10, null),\n );\n }", "function __set_error($error_code = null, $error_message = null,\n $error_details = null) {\n\n $this->error_code = $error_code;\n $this->error_message = $error_message;\n $this->error_details = $error_details;\n\n}", "function setErrorCode($error_code){\r\n\t\t$this->error_code = $error_code;\r\n\t}", "function get_status_header_desc($code) {\n\t$codes_to_desc = array(\n\t\t\t100 => 'Continue',\n\t\t\t101 => 'Switching Protocols',\n\t\t\t102 => 'Processing',\n\n\t\t\t200 => 'OK',\n\t\t\t201 => 'Created',\n\t\t\t202 => 'Accepted',\n\t\t\t203 => 'Non-Authoritative Information',\n\t\t\t204 => 'No Content',\n\t\t\t205 => 'Reset Content',\n\t\t\t206 => 'Partial Content',\n\t\t\t207 => 'Multi-Status',\n\t\t\t226 => 'IM Used',\n\n\t\t\t300 => 'Multiple Choices',\n\t\t\t301 => 'Moved Permanently',\n\t\t\t302 => 'Found',\n\t\t\t303 => 'See Other',\n\t\t\t304 => 'Not Modified',\n\t\t\t305 => 'Use Proxy',\n\t\t\t306 => 'Reserved',\n\t\t\t307 => 'Temporary Redirect',\n\n\t\t\t400 => 'Bad Request',\n\t\t\t401 => 'Unauthorized',\n\t\t\t402 => 'Payment Required',\n\t\t\t403 => 'Forbidden',\n\t\t\t404 => 'Not Found',\n\t\t\t405 => 'Method Not Allowed',\n\t\t\t406 => 'Not Acceptable',\n\t\t\t407 => 'Proxy Authentication Required',\n\t\t\t408 => 'Request Timeout',\n\t\t\t409 => 'Conflict',\n\t\t\t410 => 'Gone',\n\t\t\t411 => 'Length Required',\n\t\t\t412 => 'Precondition Failed',\n\t\t\t413 => 'Request Entity Too Large',\n\t\t\t414 => 'Request-URI Too Long',\n\t\t\t415 => 'Unsupported Media Type',\n\t\t\t416 => 'Requested Range Not Satisfiable',\n\t\t\t417 => 'Expectation Failed',\n\t\t\t422 => 'Unprocessable Entity',\n\t\t\t423 => 'Locked',\n\t\t\t424 => 'Failed Dependency',\n\t\t\t426 => 'Upgrade Required',\n\n\t\t\t500 => 'Internal Server Error',\n\t\t\t501 => 'Not Implemented',\n\t\t\t502 => 'Bad Gateway',\n\t\t\t503 => 'Service Unavailable',\n\t\t\t504 => 'Gateway Timeout',\n\t\t\t505 => 'HTTP Version Not Supported',\n\t\t\t506 => 'Variant Also Negotiates',\n\t\t\t507 => 'Insufficient Storage',\n\t\t\t510 => 'Not Extended'\n\t);\n\t\n\tif(check_value($codes_to_desc[$code])) {\n\t\treturn $codes_to_desc[$code];\t\n\t}\n\t\n}", "function get_error() {\n\n if ($this->error_code === null)\n return false;\n\n return array('code' => $this->error_code,\n 'message' => $this->error_message,\n 'details' => $this->error_details);\n\n}", "abstract public function getErrorType(): string;", "function result_array_error_static($re)\n{\n return return_status_err(get_return_errormsg($re));\n}", "protected function setErrorHeader() {\n\t\tif ($this->response_code >= 400 && $this->response_code < 500) {\n\t\t\theader('HTTP/1.1 ' . $this->response_code . \" \" . SVException::g($this->response_code));\n\t\t\texit(0);\n\t\t}\n\t}", "function error( $code = 100, $debug_message = null, $secret = null, $addtl_data = array() ) {\n\t\tswitch ($code) :\n\t\t\tcase '101' :\n\t\t\t\t$error = array( 'error' => __( 'Invalid License Key', 'jigoshop-software' ), 'code' => '101' );\n\t\t\tbreak;\n\t\t\tcase '102' :\n\t\t\t\t$error = array( 'error' => __( 'Software has been deactivated', 'jigoshop-software' ), 'code' => '102' );\n\t\t\tbreak;\n\t\t\tcase '103' :\n\t\t\t\t$error = array( 'error' => __( 'Exceeded maximum number of activations', 'jigoshop-software' ), 'code' => '103' );\n\t\t\tbreak;\n\t\t\tcase '104' :\n\t\t\t\t$error = array( 'error' => __( 'Invalid Instance ID', 'jigoshop-software' ), 'code' => '104' );\n\t\t\tbreak;\n\t\t\tcase '105' :\n\t\t\t\t$error = array( 'error' => __( 'Purchase has been upgraded', 'jigoshop-software' ), 'code' => '105' );\n\t\t\tbreak;\n\t\t\tcase '106' :\n\t\t\t\t$error = array( 'error' => __( 'License key for different product. Please check the product for this license key, then download and install the correct product.', 'jigoshop-software' ), 'code' => '106' );\n\t\t\tbreak;\n\t\t\tdefault :\n\t\t\t\t$error = array( 'error' => __( 'Invalid Request', 'jigoshop-software' ), 'code' => '100' );\n\t\t\tbreak;\n\t\tendswitch;\n\t\tif ( isset($this->debug) && $this->debug ) {\n\t\t\tif ( !isset( $debug_message ) || !$debug_message) $debug_message = __( 'No debug information available', 'jigoshop-software' );\n\t\t\t$error['additional info'] = $debug_message;\n\t\t}\n\t\tif ( isset( $addtl_data['secret'] ) ) {\n\t\t\t$secret = $addtl_data['secret'];\n\t\t\tunset( $addtl_data['secret'] );\n\t\t}\n\t\tforeach ( $addtl_data as $k => $v ) {\n\t\t\t$error[$k] = $v;\n\t\t}\n\t\t$secret = ( $secret ) ? $secret : 'null';\n\t\t$error['timestamp'] = time();\n\t\tforeach ( $error as $k => $v ) {\n\t\t\tif ( $v === false ) $v = 'false';\n\t\t\tif ( $v === true ) $v = 'true';\n\t\t\t$sigjoined[] = \"$k=$v\";\n\t\t}\n\t\t$sig = implode( '&', $sigjoined );\n\t\t$sig = 'secret=' . $secret . '&' . $sig;\n\t\tif ( !$this->debug ) $sig = md5( $sig );\n\t\t$error['sig'] = $sig;\n\t\t$json = $error;\n\t\theader( 'Cache-Control: no-store' );\n\t\tif ( function_exists( 'header_remove' ) ) {\n\t\t\theader_remove( 'Cache-Control' );\n\t\t\theader_remove( 'Pragma' );\n\t\t\theader_remove( 'Expires' );\n\t\t\theader_remove( 'Last-Modified' );\n\t\t\theader_remove( 'X-Pingback' );\n\t\t\theader_remove( 'X-Powered-By' );\n\t\t\theader_remove( 'Set-Cookie' );\n\t\t} else {\n\t\t\theader( 'Cache-Control: ' );\n\t\t\theader( 'Pragma: ' );\n\t\t\theader( 'Expires: ' );\n\t\t\theader( 'X-Pingback: ' );\n\t\t\theader( 'X-Powered-By: ' );\n\t\t\theader( 'Set-Cookie: ' );\n\t\t}\n\t\theader( 'Content-Type: application/json' );\n\t\tdie( json_encode( $json ) );\n\t\texit;\n\t}", "protected static function initializeBasicErrorReporting() {}", "function getStatusCode();", "function error(){}", "function setStatusCode($code,$message = null){\n\t\tif(preg_match('/^([0-9]{3}) (.+)/',$code,$matches)){\n\t\t\t$code = $matches[1];\n\t\t\t$message = $matches[2];\n\t\t}\n\n\t\tsettype($code,\"integer\");\n\t\t$this->_StatusCode_Redefined = true;\n\t\t$this->_StatusCode = $code;\n\t\t$this->_StatusMessage = $message;\n\t}", "public static function validateCode()\n\t{\n\t\treturn array(\n\t\t\tnew Main\\Entity\\Validator\\Length(null, 255),\n\t\t);\n\t}", "public function errorOccured();", "public function generateFailed();", "public function getErrorCount();", "function getResponseErrors( $response ) {\n\t\tif ( is_array( $response ) && array_key_exists( 'RESULT', $response ) ) {\n\t\t\t$resultCode = $response['RESULT'];\n\t\t} else {\n\t\t\treturn;\n\t\t}\n\n\t\t$errors = array( );\n\n\t\tswitch ( $resultCode ) {\n\t\t\tcase '0':\n\t\t\t\t$errors['1'] = WmfFramework::formatMessage( 'payflowpro_gateway-response-0' );\n\t\t\t\t$this->finalizeInternalStatus( 'complete' );\n\t\t\t\tbreak;\n\t\t\tcase '126':\n\t\t\t\t$errors['5'] = WmfFramework::formatMessage( 'payflowpro_gateway-response-126-2' );\n\t\t\t\t$this->finalizeInternalStatus( 'pending' );\n\t\t\t\tbreak;\n\t\t\tcase '12':\n\t\t\t\t$errors['2'] = WmfFramework::formatMessage( 'payflowpro_gateway-response-12' );\n\t\t\t\t$this->finalizeInternalStatus( 'failed' );\n\t\t\t\tbreak;\n\t\t\tcase '13':\n\t\t\t\t$errors['2'] = WmfFramework::formatMessage( 'payflowpro_gateway-response-13' );\n\t\t\t\t$this->finalizeInternalStatus( 'failed' );\n\t\t\t\tbreak;\n\t\t\tcase '114':\n\t\t\t\t$errors['2'] = WmfFramework::formatMessage( 'payflowpro_gateway-response-114' );\n\t\t\t\t$this->finalizeInternalStatus( 'failed' );\n\t\t\t\tbreak;\n\t\t\tcase '4':\n\t\t\t\t$errors['3'] = WmfFramework::formatMessage( 'payflowpro_gateway-response-4' );\n\t\t\t\t$this->finalizeInternalStatus( 'failed' );\n\t\t\t\tbreak;\n\t\t\tcase '23':\n\t\t\t\t$errors['3'] = WmfFramework::formatMessage( 'payflowpro_gateway-response-23' );\n\t\t\t\t$this->finalizeInternalStatus( 'failed' );\n\t\t\t\tbreak;\n\t\t\tcase '24':\n\t\t\t\t$errors['3'] = WmfFramework::formatMessage( 'payflowpro_gateway-response-24' );\n\t\t\t\t$this->finalizeInternalStatus( 'failed' );\n\t\t\t\tbreak;\n\t\t\tcase '112':\n\t\t\t\t$errors['3'] = WmfFramework::formatMessage( 'payflowpro_gateway-response-112' );\n\t\t\t\t$this->finalizeInternalStatus( 'failed' );\n\t\t\t\tbreak;\n\t\t\tcase '125':\n\t\t\t\t$errors['3'] = WmfFramework::formatMessage( 'payflowpro_gateway-response-125-2' );\n\t\t\t\t$this->finalizeInternalStatus( 'failed' );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$errors['4'] = WmfFramework::formatMessage( 'payflowpro_gateway-response-default' );\n\t\t\t\t$this->finalizeInternalStatus( 'failed' );\n\t\t}\n\n\t\treturn $errors;\n\t}", "public function error();", "public function getErr() {}", "public static function error($reset = false) {\n $errors = static::$errorCodeValidation;\n if ($reset === true) {\n static::$errorCodeValidation = array();\n }\n return $errors;\n }", "function status($code) {\n $reason=@constant('self::HTTP_'.$code);\n if (PHP_SAPI!='cli')\n header($_SERVER['SERVER_PROTOCOL'].' '.$code.' '.$reason);\n return $reason;\n }", "function status() { return $this->err->status;}", "public function errorMessage($errorCode){\n switch ($errorCode) {\n case \"001\":\n $arr = array('code_metier' => '001', 'message' => \"Une erreur interne s'est produite.\");\n break;\n case \"002\":\n $arr = array('code_metier' => '002', 'message' => \"Paramètre(s) manquant(s).\");\n break;\n case \"003\":\n $arr = array('code_metier' => '003', 'message' => \"Le login ou le mot de passe est incorrect.\");\n break;\n case \"004\":\n $arr = array('code_metier' => '004', 'message' => \"Accès refusé.\");\n break;\n case \"005\":\n $arr = array('code_metier' => '005', 'message' => \"Votre token est expiré.\");\n break;\n case \"006\":\n $arr = array('code_metier' => '006', 'message' => \"Cet utilisateur existe déjà.\");\n break;\n case \"007\":\n $arr = array('code_metier' => '007', 'message' => \"Vous n'êtes pas administrateur.\");\n break;\n case \"008\":\n $arr = array('code_metier' => '008', 'message' => \"Utilisateur inconnu.\");\n break;\n case \"009\":\n $arr = array('code_metier' => '009', 'message' => \"Cette communauté existe déjà.\");\n break;\n case \"010\":\n $arr = array('code_metier' => '010', 'message' => \"Cette communauté n'existe pas.\");\n break;\n case \"011\":\n $arr = array('code_metier' => '011', 'message' => \"Cette idée n'existe pas.\");\n break;\n case \"012\":\n $arr = array('code_metier' => '012', 'message' => \"Ce commentaire n'existe pas.\");\n break;\n case \"013\":\n $arr = array('code_metier' => '013', 'message' => \"Les champs doivent être remplis.\");\n break;\n case \"014\":\n $arr = array('code_metier' => '014', 'message' => \"Ce commentaire n'existe pas.\");\n break;\n default:\n $arr = array('code_metier' => '001', 'message' => \"Une erreur interne s'est produite.\");\n }\n\n $reponse = $arr = array('error' => $arr);\n $reponse = json_encode($reponse,JSON_UNESCAPED_UNICODE);\n\n return new JsonResponse($reponse, 500);\n }", "function errorName($p_with_code = \\false)\n {\n }", "public function getErrorCode(){\n return $this->_section->return_error_code;\n }", "abstract public function getReceptionCodes();" ]
[ "0.7468572", "0.693825", "0.67524445", "0.6376029", "0.63573444", "0.62393326", "0.6223929", "0.6114753", "0.60567147", "0.6052507", "0.6051333", "0.6029569", "0.6007014", "0.5999562", "0.5999562", "0.59896547", "0.5959568", "0.5959568", "0.5947666", "0.59441316", "0.590735", "0.5899442", "0.5899289", "0.5895786", "0.5879016", "0.5862109", "0.58580965", "0.5858001", "0.5843169", "0.5842406", "0.5834481", "0.5830493", "0.5829037", "0.58216536", "0.5792409", "0.57875675", "0.5767619", "0.57539535", "0.57498574", "0.5731973", "0.57181484", "0.56933606", "0.5669253", "0.5668266", "0.56605", "0.5660431", "0.5649792", "0.563747", "0.5620582", "0.5616648", "0.56017804", "0.5590032", "0.55804265", "0.5571819", "0.55255646", "0.55226433", "0.5520797", "0.5507448", "0.5502257", "0.5495184", "0.5487703", "0.548146", "0.5479646", "0.547333", "0.547333", "0.54684603", "0.5457602", "0.5447778", "0.5447712", "0.5444425", "0.5444425", "0.5441473", "0.5435896", "0.54322064", "0.54226655", "0.54211277", "0.54194397", "0.5417493", "0.54157937", "0.5415781", "0.5403933", "0.54028654", "0.5402829", "0.5391562", "0.5389117", "0.53857666", "0.53794986", "0.5375725", "0.5368043", "0.5367081", "0.5361454", "0.5358408", "0.5352195", "0.5336341", "0.533095", "0.5325219", "0.53242177", "0.5321286", "0.5317215", "0.5316587", "0.531642" ]
0.0
-1
create an instance of the jsonrpc2 class, and map in the allowed method strings
public function __construct( array $method_map ) { $this->method_map = $method_map; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function invoke() {\n global $user;\n $req =& $this->request;\n try {\n\n if ($req) {\n if (isset($req->uri) && preg_match(\"/^([^\\?]*)(\\?(.*))?$/\", $req->uri, $match)) {\n $this->q = $match[1];\n parse_str($match[3], $_GET);\n }\n }\n \n if (isset($req) && !is_object($req))\n throw new Exception(\"Invalid Request.\", -32600);\n \n \n if (!preg_match(\"/^(?:(\\D\\w*)[\\.\\/])?(\\D\\w*)\\/?(.*)$/\", $this->q, $match))\n throw new Exception(\"Invalid Request.\", -32600);\n \n list(, $c, $m, $a) = $match;\n \n\t\t\n\t\t//if (!$c)\n\t\t//\t$c = jsonrpc_load_class_by_method($m, TRUE);\n \n\n\t\t\n \n if (!($c && class_exists($c, FALSE))) {\n $c = jsonrpc_load_class($c, $m, TRUE);\n }\n \n if (isset($a) && is_string($a) && FALSE !== strpos($a, ','))\n $a = explode(',', $a);\n if (isset($_GET['id']))\n $req->id = $_GET['id'];\n $is_super = $user->uid == 1;\n if ($user->uid == 0 && $_SERVER['REMOTE_ADDR'] == '127.0.0.1' && !isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n $is_super = TRUE;\n $user->uid = 1;\n }\n \n //echo $c;\n \n if (!method_exists($c, $m))\n throw new Exception('Method does not exists.', -32601);\n if (variable_get('site_offline', 0) && !$is_super)\n throw new Exception('Site if offline');\n $refl = new ReflectionMethod($c, $m);\n \n\t//$args = array();\n \n if (!isset($req->params)) {\n if ($a)\n $args = $a;\n elseif (isset($_GET['params']))\n $args = explode(',', $_GET['params']);\n elseif (isset($_GET['param']))\n $args = explode(',', $_GET['param']);\n }\n else\n $args = $req->params;\n \n //if(!is_array($args))\n \t\n\n\t//var_dump(count($args) <= $refl->getNumberOfParameters());\n\n //if ($refl->getNumberOfRequiredParameters() <= 1 && is_array($args) && count($args) > $refl->getNumberOfParameters() )\n \n //if($refl->getNumberOfRequiredParameters\n \n $np = $refl->getNumberOfParameters();\n $nr = $refl->getNumberOfRequiredParameters();\n\n\t\t//if ($np == 1 && count($args)\n//var_dump($args);\n//die;\n \n \n \n if ($nr <= 1 && !(is_array($args) && count($args) == $np && $np > 1 ) && isset($req->params))\n $args = array($args);\n\n\n//var_dump($args);\n\n switch (TRUE) {\n case $refl->isStatic():\n $req->result = call_user_func_array(array($c, $m), $args);\n break;\n case $refl->isPublic():\n $inst = $this->instance($c);\n $req->result = call_user_func_array(array($inst, $m), $args);\n break;\n case $refl->isProtected() && $is_super:\n $refl->setAccessible(TRUE);\n $req->result = $refl->invokeArgs(new $c, $args);\n break;\n default:\n throw new Exception(\"Method not found or permission denied on launching $c::$m.\");\n }\n } catch (Exception $e) {\n if (!is_object($req))\n $req = $this->request = (object)NULL;\n $data = isset($e->data) ? $e->data : get_class($e);\n $req->error = array('code' => $e->getCode(), 'message' => $e->getMessage(), 'data' => $data);\n }\n }", "private function getMethodClassMap()\n {\n return [\n 'account_channels' => \\XRPHP\\Api\\Anon\\Account\\AccountChannelsMethod::class,\n 'account_currencies' => \\XRPHP\\Api\\Anon\\Account\\AccountCurrenciesMethod::class,\n 'account_info' => \\XRPHP\\Api\\Anon\\Account\\AccountInfoMethod::class,\n 'account_lines' => \\XRPHP\\Api\\Anon\\Account\\AccountLinesMethod::class,\n 'account_objects' => \\XRPHP\\Api\\Anon\\Account\\AccountObjectsMethod::class,\n 'account_offers' => \\XRPHP\\Api\\Anon\\Account\\AccountOffersMethod::class,\n 'account_tx' => \\XRPHP\\Api\\Anon\\Account\\AccountTxMethod::class,\n 'gateway_balances' => \\XRPHP\\Api\\Anon\\Account\\GatewayBalancesMethod::class,\n 'noripple_check' => \\XRPHP\\Api\\Anon\\Account\\NorippleCheckMethod::class,\n 'ledger' => \\XRPHP\\Api\\Anon\\Ledger\\LedgerMethod::class,\n 'ledger_closed' => \\XRPHP\\Api\\Anon\\Ledger\\LedgerClosedMethod::class,\n 'ledger_current' => \\XRPHP\\Api\\Anon\\Ledger\\LedgerCurrentMethod::class,\n 'ledger_data' => \\XRPHP\\Api\\Anon\\Ledger\\LedgerDataMethod::class,\n 'ledger_entry' => \\XRPHP\\Api\\Anon\\Ledger\\LedgerEntryMethod::class,\n 'sign' => \\XRPHP\\Api\\Anon\\Transaction\\SignMethod::class,\n 'sign_for' => \\XRPHP\\Api\\Anon\\Transaction\\SignForMethod::class,\n 'submit' => \\XRPHP\\Api\\Anon\\Transaction\\SubmitMethod::class,\n 'submit_multisigned' => \\XRPHP\\Api\\Anon\\Transaction\\SubmitMultisignedMethod::class,\n 'transaction_entry' => \\XRPHP\\Api\\Anon\\Transaction\\TransactionEntryMethod::class,\n 'tx' => \\XRPHP\\Api\\Anon\\Transaction\\TxMethod::class,\n 'book_offers' => \\XRPHP\\Api\\Anon\\PathOrderBook\\BookOffersMethod::class,\n 'ripple_path_find' => \\XRPHP\\Api\\Anon\\PathOrderBook\\RipplePathFindMethod::class,\n 'channel_authorize' => \\XRPHP\\Api\\Anon\\PaymentChannel\\ChannelAuthorizeMethod::class,\n 'channel_verify' => \\XRPHP\\Api\\Anon\\PaymentChannel\\ChannelVerifyMethod::class,\n 'fee' => \\XRPHP\\Api\\Anon\\ServerInfo\\FeeMethod::class,\n 'server_info' => \\XRPHP\\Api\\Anon\\ServerInfo\\ServerInfoMethod::class,\n 'server_state' => \\XRPHP\\Api\\Anon\\ServerInfo\\ServerStateMethod::class,\n 'ping' => \\XRPHP\\Api\\Anon\\Utility\\PingMethod::class,\n 'random' => \\XRPHP\\Api\\Anon\\Utility\\RandomMethod::class\n ];\n }", "public function createMethod()\n {\n return $this->addExcludesNameEntry($this->methods);\n }", "public function __construct(string $path,array|callable $params, string|array $methods=['GET']) {\n $this->path = ($path);\n $this->isFunction = is_callable($params);\n if($this->isFunction){\n //$param is an executable function\n $this->function = $params;\n }\n else if(is_array($params)){\n $this->controller = $params['Controller']??\"\";\n $this->action = $params['Action']??\"\"; \n }\n if(is_string($methods) && trim($methods) !== \"\"){ \n $this->methods = preg_split(\"/[,|]/\",$methods); \n }\n else if(is_array($methods)){\n $this->methods = /*sizeof($methods)==0?['GET']:*/$methods;//by default set to GET method\n }\n //convert every methods in uppercase\n $limit = sizeof($this->methods);\n for($i = 0; $i < $limit; $i++){ \n if(trim($this->methods[$i]) === \"\"){\n //discarding blank spaces\n continue;\n }\n $this->methods[$i] = strtoupper(trim($this->methods[$i]));\n }\n }", "public function __construct($methodName)\n {\n assert(is_string($methodName), 'Invalid argument type: $methodName. String expected.');\n assert($methodName === \"\" || \\Yana\\Http\\Requests\\MethodEnumeration::isValidItem($methodName));\n $this->_method = (string) $methodName;\n }", "public function __construct($data) {\n $this->data = $data;\n $this->methods = STATIC_MAPPING\n ? self::mapStatic()\n : self::mapDynamic();\n if (!CASE_SENSITIVE) {\n $this->methods = array_change_key_case($this->methods, CASE_LOWER);\n }\n }", "public function __construct() {\n\t /*\n\t $this->set_methods([])\n ->set_namespace('')\n ->set_args([])\n ->set_callback([])\n ->set_is_override(false)\n ->set_permissions_callback([])\n ->set_route('');\n\t */\n\t}", "#[Pure]\n public function __construct(int $method, array $options) {}", "protected function __construct($options) {\n $this->options = $options;\n \n foreach ($options as $key => $value) {\n $this->$key = $value;\n }\n \n $requestMethod = $this->router->get_request_method();\n \n foreach ($this->methodOrder as $methodType) {\n $methodName = $methodType;\n \n if (in_array($methodType, array('do_get', 'do_post', 'do_head', 'do_put', 'do_delete'))) {\n if (\"do_$requestMethod\" == $methodType) {\n $this->$methodName();\n \n if (in_array($requestMethod, array('get', 'post'))) {\n $methodName = 'do_'.$requestMethod.'_validate';\n \n if ($this->$methodName()) {\n $methodName = 'do_'.$requestMethod.'_success';\n $this->$methodName();\n } else {\n $methodName = 'do_'.$requestMethod.'_failure';\n $this->$methodName();\n }\n }\n } else {\n $methodName = str_replace('do_', 'do_all_except_', $methodName);\n $this->$methodName();\n }\n } else {\n $this->$methodName();\n }\n }\n }", "function xmlrpc_methods( $methods ) {\n\t\t$namespace = self::NSPACE;\n\t\t$methods[\"$namespace.push\"] = array( $this, 'push' );\n\t\t$methods[\"$namespace.pull\"] = array( $this, 'pull' );\n\t\treturn $methods;\n\t}", "public function __construct(){\n $this->__classname = get_class($this); \n $this->_methods['default'] = $this->__classname.\"Init\";\n $this->registerMethodAlias(\"createUrl\", array(\"Vimerito\", \"createUrl\"));\n $this->registerMethodAlias(\"loadJsLibrary\", array(\"VLayout\", \"registerUserJavaScriptLibraries\"));\n }", "function __registerMethods()\n\t{\n\t\t$this->server->wsdl->addComplexType('intArray',\n\t\t\t\t\t\t\t\t\t\t\t'complexType',\n\t\t\t\t\t\t\t\t\t\t\t'array',\n\t\t\t\t\t\t\t\t\t\t\t'',\n\t\t\t\t\t\t\t\t\t\t\t'SOAP-ENC:Array',\n\t\t\t\t\t\t\t\t\t\t\tarray(),\n\t\t\t\t\t\t\t\t\t\t\tarray(array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'xsd:int[]')),\n\t\t\t\t\t\t\t\t\t\t\t'xsd:int');\n\n\n\t\t$this->server->wsdl->addComplexType('stringArray',\n\t\t\t\t\t\t\t\t\t\t\t'complexType',\n\t\t\t\t\t\t\t\t\t\t\t'array',\n\t\t\t\t\t\t\t\t\t\t\t'',\n\t\t\t\t\t\t\t\t\t\t\t'SOAP-ENC:Array',\n\t\t\t\t\t\t\t\t\t\t\tarray(),\n\t\t\t\t\t\t\t\t\t\t\tarray(array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'xsd:string[]')),\n\t\t\t\t\t\t\t\t\t\t\t'xsd:string');\n\n\t\t// isValidSession()\n\t\t$this->server->register('isValidSession',\n\t\t\t\t\t\t\t\tarray('ext_uid' => 'xsd:string',\n\t\t\t\t\t\t\t\t\t 'soap_pw' => 'xsd:string',\n\t\t\t\t\t\t\t\t\t 'new_user' => 'xsd:boolean'),\n\t\t\t\t\t\t\t\tarray('valid' => 'xsd:boolean',\n\t\t\t\t\t\t\t\t\t'firstname' => 'xsd:string',\n\t\t\t\t\t\t\t\t\t'lastname' => 'xsd:string',\n\t\t\t\t\t\t\t\t\t'email' => 'xsd:string'),\n\t\t\t\t\t\t\t\tSERVICE_NAMESPACE,\n\t\t\t\t\t\t\t\tSERVICE_NAMESPACE.'#isValidSession',\n\t\t\t\t\t\t\t\tSERVICE_STYLE,\n\t\t\t\t\t\t\t\tSERVICE_USE,\n\t\t\t\t\t\t\t\t'Dummy Session Validation');\n\n\t\treturn true;\n\t}", "public function initialize() {\n\t\t$this->registerMethod(\"getSettings\");\n\t\t$this->registerMethod(\"setSettings\");\n\t\t$this->registerMethod(\"getShareList\");\n\t\t$this->registerMethod(\"getShare\");\n\t\t$this->registerMethod(\"setShare\");\n\t\t$this->registerMethod(\"deleteShare\");\n\t\t$this->registerMethod(\"getModBanRuleList\");\n\t\t$this->registerMethod(\"getModBanRule\");\n\t\t$this->registerMethod(\"setModBanRule\");\n\t\t$this->registerMethod(\"deleteModBanRule\");\n\t\t$this->registerMethod(\"getModTLSSettings\");\n\t\t$this->registerMethod(\"setModTLSSettings\");\n\t\t$this->registerMethod(\"getStats\");\n\t}", "public function initialize() {\n\t\t$this->registerMethod(\"get\");\n\t\t$this->registerMethod(\"set\");\n\t\t$this->registerMethod(\"getScheduleList\");\n\t\t$this->registerMethod(\"getScheduledJob\");\n\t\t$this->registerMethod(\"setScheduledJob\");\n\t\t$this->registerMethod(\"deleteScheduledJob\");\n\t\t$this->registerMethod(\"executeScheduledJob\");\n\t}", "public function __construct()\n {\n $this->services = $this->privates = [];\n $this->methodMapping = [\n \\Viserio\\Contract\\Validation\\Validator::class => 'get9c2345652e8ae3f87ba009d0f8fedee27bb751398014908e9ab2fb6d5bf1300f',\n ];\n $this->aliases = [\n \\Viserio\\Component\\Validation\\Validator::class => \\Viserio\\Contract\\Validation\\Validator::class,\n 'validator' => \\Viserio\\Contract\\Validation\\Validator::class,\n ];\n }", "static public function validMethodProvider()\n {\n return array(\n array('GET'),\n array('TRACE'),\n array('PROPFIND'),\n array('MKCOL'),\n array('X-MS-ENUMATTS'),\n );\n }", "private function getServiceMap()\n {\n $result = array(\n 'transport' => 'POST',\n 'envelope' => 'JSON-RPC-2.0',\n 'SMDVersion' => '2.0',\n 'contentType' => 'application/json',\n 'target' => !empty($_SERVER['REQUEST_URI']) ? substr($_SERVER['REQUEST_URI'], 0, strpos($_SERVER['REQUEST_URI'], '?')) : '',\n 'services' => array(),\n 'description' => '',\n );\n\n foreach ($this->instances as $namespace => $instance) {\n $rc = new ReflectionClass($instance);\n\n // Get Class Description\n if ($rcDocComment = $this->getDocDescription($rc->getDocComment())) {\n $result['description'] .= $rcDocComment . PHP_EOL;\n }\n\n foreach ($rc->getMethods() as $method) {\n /** @var ReflectionMethod $method */\n if (!$method->isPublic() || in_array(strtolower($method->getName()), $this->hiddenMethods)) {\n continue;\n }\n\n $methodName = ($namespace ? $namespace . '.' : '') . $method->getName();\n $docComment = $method->getDocComment();\n\n $result['services'][$methodName] = array('parameters' => array());\n\n // set description\n if ($rmDocComment = $this->getDocDescription($docComment)) {\n $result['services'][$methodName]['description'] = $rmDocComment;\n }\n\n // @param\\s+([^\\s]*)\\s+([^\\s]*)\\s*([^\\s\\*]*)\n $parsedParams = array();\n if (preg_match_all('/@param\\s+([^\\s]*)\\s+([^\\s]*)\\s*([^\\n\\*]*)/', $docComment, $matches)) {\n foreach ($matches[2] as $number => $name) {\n $type = $matches[1][$number];\n $desc = $matches[3][$number];\n $name = trim($name, '$');\n\n $param = array('type' => $type, 'description' => $desc);\n $parsedParams[$name] = array_filter($param);\n }\n };\n\n // process params\n foreach ($method->getParameters() as $parameter) {\n $name = $parameter->getName();\n $param = array('name' => $name, 'optional' => $parameter->isDefaultValueAvailable());\n if (array_key_exists($name, $parsedParams)) {\n $param += $parsedParams[$name];\n }\n\n if ($param['optional']) {\n $param['default'] = $parameter->getDefaultValue();\n }\n\n $result['services'][$methodName]['parameters'][] = $param;\n }\n\n // set return type\n if (preg_match('/@return\\s+([^\\s]+)\\s*([^\\n\\*]+)/', $docComment, $matches)) {\n $returns = array('type' => $matches[1], 'description' => trim($matches[2]));\n $result['services'][$methodName]['returns'] = array_filter($returns);\n }\n }\n }\n\n return $result;\n }", "public function __construct() {\n $this->autodetectActions([\n // Method => pattern...should be set by default.\n HTTP::GET => new RegEx(\"get_(.+)$\")\n ]);\n }", "function WS_Class() {\r\n\t\t$arr_authen = array('authen_user' => 'string', 'authen_pass' => 'string');\r\n\t\tfor($i=0; $i< func_num_args(); $i++) {\r\n\t\t\t$arg = func_get_arg($i);\r\n\t\t\t$function_name = $arg[0];\r\n\t\t\t\r\n\t\t\t$input = array_merge($arr_authen, $arg[1]);\r\n\t\t\t\r\n\t\t\t$output = $arg[2];\r\n\r\n\t\t\t$this->__dispatch_map[$function_name] =\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t'in' => $input,\r\n\t\t\t\t\t\t\t'out' => $output\r\n\t\t\t\t\t\t);\r\n\t\t}\r\n\t}", "function __construct ($ip = '127.0.0.1', $port, $protocol = 'http', $user = null, $password = null){\n $this->ip = $ip;\n $this->port = $port;\n // I need to implement a sort of validating http or https\n $this->url = $protocol.'://'.$ip.':'.$port.'/json_rpc';\n $this->user = $user;\n $this->password = $password;\n $this->client = new jsonRPCClient($this->url, $this->user, $this->password);\n }", "public function __construct() {\n $this->server = new nusoap_server();\n // Define the method as a PHP function\n }", "public function __construct($methods, $uri, $action)\n {\n $this->uri = $uri;\n $this->regexUri = $this->parseUri();\n $this->methods = (array) $methods;\n $this->action = $this->parseAction($action);\n $this->parameterNames = $this->parseParameterNames();\n $this->parameterPatterns = $this->parseParameterPatterns();\n }", "protected function buildAvailableByMethod()\n {\n \treturn $this->availableByMethod = collect((new ReflectionClass($this))->getMethods())\n\t \t->map->name\n\t \t->filter(function ($method) {\n\t \t\treturn Str::startsWith($method, 'create') && Str::endsWith($method, 'Driver');\n\t \t})\n\t \t->map(function ($method) {\n\t \t\treturn Str::replaceLast(\n\t \t\t\t'Driver',\n\t \t\t\t'',\n\t \t\t\tStr::after($method, 'create')\n\t \t\t);\n\t \t})\n\t \t->toArray();\n }", "function http_request_method_register($method) {}", "function initMethod(){\n\tglobal $db;\n\t\t\n\t$result='';\n\t$dbe=$db[\"default\"];\n\n\t$create=\"CREATE TABLE IF NOT EXISTS `methods` (\".\n\t\t \"`id` BIGINT(20) NOT NULL AUTO_INCREMENT PRIMARY KEY, \".\n\t\t \"`serviceid` BIGINT(20) NOT NULL, \".\n\t\t \"`methodname` VARCHAR(128) NOT NULL, \".\n\t\t \"`methodtype` VARCHAR(16) NOT NULL, \".\n\t\t \"`restricted` ENUM('off','on') NOT NULL, \".\n\t\t \"`sourcecode` LONGTEXT NOT NULL, \".\n\t\t \"`descript` LONGTEXT NULL, \".\n\t\t \"`registered` DATETIME NOT NULL, \".\n\t\t \"`updated` DATETIME NOT NULL, \".\n\t\t \"INDEX (`serviceid`), \".\n\t\t \"UNIQUE (`serviceid`,`methodname`), \".\n\t\t \"FOREIGN KEY (`serviceid`) REFERENCES `services`(`id`) ON DELETE CASCADE ON UPDATE CASCADE \".\n\t\t \") \".\n\t\t \"ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_unicode_ci; \";\n\t\n\t$rename=\"RENAME TABLE `methods` TO `tmpmethods`;\";\n\t\n\t$select=\"SELECT s.`id` AS `service_id`, t.* FROM `tmpmethods` t LEFT JOIN `services` s ON t.`serviceid`=s.`id`;\";\n\n\t$remove=\"DROP TABLE `tmpmethods`; \";\n\n\t$tbnames=getTableNames(\n\t\t$dbdriver=$dbe['dbdriver'],\n\t\t$hostname=$dbe['hostname'],\n\t\t$username=$dbe[\"username\"],\n\t\t$password=$dbe[\"password\"],\n\t\t$dbname=$dbe[\"database\"]\n\t);\n\n\t\n\tif(!in_array('methods',$tbnames)){\n\t\t$result=dbExecute(\n\t\t\t$dbdriver=$dbe['dbdriver'],\n\t\t\t$hostname=$dbe['hostname'],\n\t\t\t$username=$dbe['rootname'],\n\t\t\t$password=$dbe['rootpass'],\n\t\t\t$dbname=$dbe['database'],\n\t\t\t$sql=$create,\n\t\t\t$bindfield=false,\n\t\t\t$trx=true,\n\t\t\t$debug=$dbe['db_debug'],\n\t\t\t$errprefix='initMethod()->create'\n\t\t);\t\n\t}\n\telse{\n\t\t$clnames=getColumnNames(\n\t\t\t$dbdriver=$dbe['dbdriver'],\n\t\t\t$hostname=$dbe['hostname'],\n\t\t\t$username=$dbe[\"username\"],\n\t\t\t$password=$dbe[\"password\"],\n\t\t\t$dbname=$dbe[\"database\"],\n\t\t\t$tbname='methods'\n\t\t);\n\t\tif(isset($clnames[\"SERVICENAME\"])){\n\t\t\t$result=dbExecute(\n\t\t\t\t$dbdriver=$dbe['dbdriver'],\n\t\t\t\t$hostname=$dbe['hostname'],\n\t\t\t\t$username=$dbe['rootname'],\n\t\t\t\t$password=$dbe['rootpass'],\n\t\t\t\t$dbname=$dbe['database'],\n\t\t\t\t$sql=$rename,\n\t\t\t\t$bindfield=false,\n\t\t\t\t$trx=true,\n\t\t\t\t$debug=$dbe['db_debug'],\n\t\t\t\t$errprefix='initMethod()->rename'\n\t\t\t);\t\n\t\t\tif($result!='OK') exit($result);\n\n\t\t\t$result=dbExecute(\n\t\t\t\t$dbdriver=$dbe['dbdriver'],\n\t\t\t\t$hostname=$dbe['hostname'],\n\t\t\t\t$username=$dbe['rootname'],\n\t\t\t\t$password=$dbe['rootpass'],\n\t\t\t\t$dbname=$dbe['database'],\n\t\t\t\t$sql=$create,\n\t\t\t\t$bindfield=false,\n\t\t\t\t$trx=true,\n\t\t\t\t$debug=$dbe['db_debug'],\n\t\t\t\t$errprefix='initMethod()->create'\n\t\t\t);\t\n\t\t\tif($result!='OK') exit($result);\n\n\t\t\tif($result=='OK'){\n\t\t\t\t$adors=dbExecute(\n\t\t\t\t\t$dbdriver=$dbe['dbdriver'],\n\t\t\t\t\t$hostname=$dbe['hostname'],\n\t\t\t\t\t$username=$dbe['username'],\n\t\t\t\t\t$password=$dbe['password'],\n\t\t\t\t\t$dbname=$dbe['database'],\n\t\t\t\t\t$sql=$select,\n\t\t\t\t\t$bindfield=false,\n\t\t\t\t\t$trx=false,\n\t\t\t\t\t$debug=$dbe['db_debug'],\n\t\t\t\t\t$errprefix='initMethod()->select'\n\t\t\t\t);\n\t\t\t\tif(is_object($adors)){\n\t\t\t\t\t$insert=array();\n\t\t\t\t\tforeach($adors->getRows() as $row=>$col)\n\t\t\t\t\tif(isset($col['servicename'])){\n\t\t\t\t\t\t$restricted=$col['published']==1?'off':'on';\n\t\t\t\t\t\t$insert[]=\"INSERT INTO `methods` (`id`,`serviceid`,`methodname`,`methodtype`,`restricted`,`sourcecode`,`descript`,`registered`,`updated`) VALUES \".\n\t\t\t\t\t\t\"( \".$col['id'].\",'\".$col['service_id'].\"', '\".$col['methodname'].\"', '\".$col['methodtype'].\"', '\".$restricted.\"', '\".addslashes($col['sourcecode']).\"', '\".addslashes($col['desc']).\"', NOW(), NOW() ); \";\n\t\t\t\t\t}\n\t\t\t\t\tif(!empty($insert)){\n\t\t\t\t\t\t$result=dbExecute(\n\t\t\t\t\t\t\t$dbdriver=$dbe['dbdriver'],\n\t\t\t\t\t\t\t$hostname=$dbe['hostname'],\n\t\t\t\t\t\t\t$username=$dbe['username'],\n\t\t\t\t\t\t\t$password=$dbe['password'],\n\t\t\t\t\t\t\t$dbname=$dbe['database'],\n\t\t\t\t\t\t\t$sql=$insert,\n\t\t\t\t\t\t\t$bindfield=false,\n\t\t\t\t\t\t\t$trx=true,\n\t\t\t\t\t\t\t$debug=$dbe['db_debug'],\n\t\t\t\t\t\t\t$errprefix='initMethod()->insert'\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif($result!='OK') exit($result);\n\t\t\t\t\t}\t\t\t\n\t\t\t\t}\t\t\t\n\t\t\t\t\n\t\t\t\t$result=dbExecute(\n\t\t\t\t\t$dbdriver=$dbe['dbdriver'],\n\t\t\t\t\t$hostname=$dbe['hostname'],\n\t\t\t\t\t$username=$dbe['rootname'],\n\t\t\t\t\t$password=$dbe['rootpass'],\n\t\t\t\t\t$dbname=$dbe['database'],\n\t\t\t\t\t$sql=$remove,\n\t\t\t\t\t$bindfield=false,\n\t\t\t\t\t$trx=true,\n\t\t\t\t\t$debug=$dbe['db_debug'],\n\t\t\t\t\t$errprefix='initMethod()->remove'\n\t\t\t\t);\n\t\t\t\tif($result!='OK') exit($result);\n\t\t\t}\n\t\t}\t\n\t}\t\n}", "function wc_fabric_add_to_gateways( $methods ) {\n // Add\n $methods [] = __NAMESPACE__ . '\\\\WC_Fabric_Gateway';\n return $methods ;\n}", "function xmlrpcRequest($server, $method)\r\n\t\t{\r\n\t\t\t$this->client = new xmlrpc_client(\"\", $server['host'], $server['port']);\r\n\t\t\tif ($server['auth'] != \"\")\r\n\t\t\t{\r\n\t\t\t\t$this->setAuth($server['auth']);\r\n\t\t\t} \r\n\t\t\t//$this->client->no_multicall = true;\r\n\t\t\tif (is_array($method))\r\n\t\t\t{\r\n\t\t\t\t$this->isFault = array();\r\n\t\t\t\t$this->message = array();\r\n\t\t\t\tfor ($x = 0; $x < count($method); $x++)\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->message[] = new xmlrpcmsg($method[$x]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->message = new xmlrpcmsg($method);\r\n\t\t\t}\r\n\t\t}", "public function __construct() {\n $this->setRoutes(array(\n 'user' => 'getAllUsers',\n 'user/:userId' => 'getCertainUser',\n 'fixName/:variableName' => 'anotherMethod'\n ));\n }", "public function run(){\n\t\tif(!$this->parseRequest()){ return; }\n\n\t\t$r = $this->rpcRequest;\n\t\t$classname = $r->obj;\n\t\t$method = $r->method;\n\t\t$params = isset($r->params) ? $r->params : array();\n\t\tob_start();\n\n\t \t// FIXME: Allow for the PHP5 magic __call() method to handle arbitrary/non-\n\t\t// existent methods on the requested object? We'd probably need a\n\t\t// _toSmd() method on the object, then, since there'd be no way to\n\t\t// use reflection to figure out available methods. Either that, or\n\t\t// set it up so you manually register methods with the API.\n\n\t\t// try and instantiate the requested object and call the method\n\t\tif(class_exists($classname)){\n\t\t\t// TODO: perhaps attempt to pass, say, an object ID into the constructor?\n\t\t\t$fn = array(new $classname, $method);\n\t\t\tif(is_callable($fn)){\n\t\t\t\t// call the requested method\n\t\t\t\t$this->responseResult = call_user_func_array($fn, $params);\n\t\t\t}else{\n\t\t\t\t// method doesn't exist\n\t\t\t\t$this->error(\"ROUTING ERROR: Couldn't find {$classname}->{$method}().\");\n\t\t\t\t$this->rpcError(self::JSON_RPC_ERROR_METHOD_NOT_FOUND);\n\t\t\t}\n\t\t}else{\n\t\t\t// can't find the requested class\n\t\t\t$this->error(\"INSTANTIATION ERROR: Couldn't get the object [$classname]\");\n\t\t\t$this->rpcError(self::JSON_RPC_ERROR_INVALID_REQUEST);\n\t\t}\n\n\t\t// ignore any output from print or echo, and clear the buffer\n\t\tob_end_clean();\n\n\t\t$this->sendResponse();\n\t}", "public function construct_old($options) {\n\n $this->logger = new PsApiLogger;\n\n $this->url_mode = false;\n $this->url_mode_prefix = 'psapi_';\n\n foreach ($options as $option=>$value) {\n switch ($option) {\n case 'logging':\n\tif ($options['logging']) $this->logger->enable();\n\tbreak;\n case 'url-mode':\n\tif ($value) $this->url_mode = true;\n\tbreak;\n case 'url-mode-prefix':\n\tif (strlen($value) > 0) {\n\t $this->url_mode_prefix = $value;\n\t} else {\n\t $this->logger->error('Invalid url mode prefix. Must be at least one character.');\n\t}\n\tbreak;\n case 'account':\n\t$this->options['account'] = $value;\n\tbreak;\n case 'catalog':\n\t$this->options['catalog'] = $value;\n\tbreak;\n }\n }\n\n $this->called = false;\n\n $resources = array('merchants', 'products', 'deals', 'offers', 'categories', 'brands', 'deal_types', 'countries', 'merchant_types');\n foreach ($resources as $resource) {\n $this->{$resource} = array();\n }\n }", "function __construct()\n {\n parent::__construct();\n\n // Configure limits on our controller methods\n // Ensure you have created the 'limits' table and enabled 'limits' within application/config/rest.php\n // $this->methods['subir_pcd']['limit'] = 500; // 500 requests per hour per user/key\n // $this->methods['users_post']['limit'] = 100; // 100 requests per hour per user/key\n // $this->methods['users_delete']['limit'] = 50; // 50 requests per hour per user/key\n }", "public function createProtocol()\n {\n }", "private function _parseMethods()\n {\n $methods = $this->_reflectionClass->getMethods();\n if (!is_array($methods) || count($methods) < 1) {\n throw new RestException('Parser: The class \"' . $this->_class . '\" doesn\\'t have any methods defined.');\n }\n\n foreach ($methods as $m) {\n if ($m->isPublic()) {\n $methodParser = new MethodParser($this->_class, $m, $this->_normalize);\n $parsedMethod = $methodParser->parse();\n if ($parsedMethod) {\n $this->_parsedClass->addApiMethod($parsedMethod);\n }\n }\n }\n }", "public function __construct() {\r\n header(\"Access-Control-Allow-Orgin: *\");\r\n header(\"Access-Control-Allow-Methods: *\");\r\n header(\"Content-Type: application/json\");\r\n\r\n $this->args = [0,1];\r\n $this->endpoint = array_shift($this->args);\r\n if (array_key_exists(0, $this->args) && !is_numeric($this->args[0])) {\r\n $this->verb = array_shift($this->args);\r\n }\r\n }", "public function __construct($names) \n {\n parent::__construct($names);\n \n if (count($names) === 1) {\n $this->message = \"Method {$this->names[0]} could not be found\";\n } else {\n $this->message = \"The following methods could not be found: \"\n .implode(', ', $this->names);\n }\n \n return;\n }", "public static function FromString($method)\n {\n switch ($method)\n {\n case self::Get():\n return self::Get();\n \n case self::Post():\n return self::Post();\n \n case self::Head():\n return self::Head();\n \n case self::Put():\n return self::Put();\n \n default:\n throw new \\InvalidArgumentException('Cannot create request method from string ' . $method);\n }\n }", "function set_method($xmlrpcpath) {\n if (is_string($xmlrpcpath)) {\n $this->method = $xmlrpcpath;\n $this->params = array();\n return true;\n }\n $this->method = '';\n $this->params = array();\n return false;\n }", "public function __construct($configs = array())\n {\n $this->configs = array_merge(array('key' => '_METHOD'), $configs);\n }", "public function init(string $methodName);", "public function __construct($config)\r\n {\r\n if(!is_array($config)) {\r\n throw new \\Exception('Invalid config, expecting array', 1);\r\n } else if(empty($config)) {\r\n throw new \\Exception('Cannot pass empty configuration array', 2);\r\n }\r\n\r\n $prefix = 'LewNelson/Namecheap/MethodTypes';\r\n $method_types = Utilities::getClasses(__DIR__.'/MethodTypes', $prefix);\r\n foreach($method_types as $method_type) {\r\n $object = $this->create($method_type, $config);\r\n $method_type = str_replace($prefix, '', $method_type);\r\n $this->setMethodType($object, $method_type);\r\n }\r\n }", "public function methodProvider() {\n return array(\n array('GET', array( // standard GET support\n 'server' => array(\n 'REQUEST_METHOD' => 'GET',\n ),\n )),\n array('POST', array( // standard POST support\n 'server' => array(\n 'REQUEST_METHOD' => 'POST',\n ),\n )),\n array('PUT', array( // standard PUT support\n 'server' => array(\n 'REQUEST_METHOD' => 'PUT',\n ),\n )),\n array('PUT', array( //\n 'server' => array( // X-Http-Method-Override header support\n 'REQUEST_METHOD' => 'POST',\n 'HTTP_X_HTTP_METHOD_OVERRIDE' => 'PUT',\n ),\n )),\n array('PUT', array( //\n 'server' => array( // method_override querystring support\n 'REQUEST_METHOD' => 'POST',\n ),\n 'query' => array(\n 'method_override' => 'PUT'\n )\n )),\n );\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 }", "static function GetApi($uniqueRPC=null) {\n $api = new RPCAPI();\n\n if (is_null($uniqueRPC) || !isset(self::$functions[$uniqueRPC])) {\n foreach (self::$functions as $name => $file) {\n self::_RequireFile($file);\n $api->addFunction($name);\n }\n } else {\n self::_RequireFile(self::$functions[$uniqueRPC]);\n $api->addFunction($uniqueRPC);\n }\n\n return $api;\n }", "protected function init() {\n\t\t$routes = $this->routePluginManager;\n\t\tforeach ( array (\n\t\t\t\t'hostname' => __NAMESPACE__ . '\\Hostname',\n\t\t\t\t'literal' => __NAMESPACE__ . '\\Literal',\n\t\t\t\t'part' => __NAMESPACE__ . '\\Part',\n\t\t\t\t'regex' => __NAMESPACE__ . '\\Regex',\n\t\t\t\t'scheme' => __NAMESPACE__ . '\\Scheme',\n\t\t\t\t'segment' => __NAMESPACE__ . '\\Segment',\n\t\t\t\t'wildcard' => __NAMESPACE__ . '\\Wildcard',\n\t\t\t\t'query' => __NAMESPACE__ . '\\Query',\n\t\t\t\t'method' => __NAMESPACE__ . '\\Method' \n\t\t) as $name => $class ) {\n\t\t\t$routes->setInvokableClass ( $name, $class );\n\t\t}\n\t\t;\n\t}", "public function initialize()\n\t{\n\t\t$this->registerMethod(\"getSettings\");\n\t\t$this->registerMethod(\"setSettings\");\n $this->registerMethod(\"getLdapContent\");\n $this->registerMethod(\"getToolSettings\");\n $this->registerMethod(\"setToolSettings\");\n $this->registerMethod(\"getRestoreSettings\");\n $this->registerMethod(\"uploadBackupFile\");\n $this->registerMethod(\"restoreLdapServer\");\n $this->registerMethod(\"getClearSettings\");\n $this->registerMethod(\"clearLdapServer\");\n\t}", "public function __construct()\n {\n $this->services = $this->privates = [];\n $this->methodMapping = [\n \\Viserio\\Contract\\Routing\\Dispatcher::class => 'get584908ff464e7559233910f9ef37cbbc81593674d92ff5b6e814b73127f8e05c',\n \\Viserio\\Contract\\Routing\\Router::class => 'get410eb27931e780eeccc23e52a6c17e0e6e2e1827d28f90c4254c8f4111788d4e',\n \\Viserio\\Contract\\Routing\\UrlGenerator::class => 'getc9f84ddda9d00c1b7a3d422c26b92c3f7acb8604c9d7c3c5ca1e13e1367f8e4a',\n ];\n $this->uninitializedServices = [\n \\Psr\\Http\\Message\\ServerRequestInterface::class => true,\n ];\n $this->aliases = [\n \\Viserio\\Component\\Routing\\Generator\\UrlGenerator::class => \\Viserio\\Contract\\Routing\\UrlGenerator::class,\n \\Viserio\\Component\\Routing\\Router::class => \\Viserio\\Contract\\Routing\\Router::class,\n 'route' => \\Viserio\\Contract\\Routing\\Router::class,\n 'router' => \\Viserio\\Contract\\Routing\\Router::class,\n ];\n $this->syntheticIds = [\n \\Psr\\Http\\Message\\ServerRequestInterface::class => true,\n \\Psr\\Http\\Message\\UriFactoryInterface::class => true,\n ];\n }", "function xmlrpc_server($callbacks) {\n $xmlrpc_server = new stdClass();\n // Define built-in XML-RPC method names\n $defaults = array(\n 'system.multicall' => 'xmlrpc_server_multicall',\n array(\n 'system.methodSignature',\n 'xmlrpc_server_method_signature',\n array('array', 'string'),\n 'Returns an array describing the return type and required parameters of a method.'\n ),\n array(\n 'system.getCapabilities',\n 'xmlrpc_server_get_capabilities',\n array('struct'),\n 'Returns a struct describing the XML-RPC specifications supported by this server.'\n ),\n array(\n 'system.listMethods',\n 'xmlrpc_server_list_methods',\n array('array'),\n 'Returns an array of available methods on this server.'),\n array(\n 'system.methodHelp',\n 'xmlrpc_server_method_help',\n array('string', 'string'),\n 'Returns a documentation string for the specified method.')\n );\n // We build an array of all method names by combining the built-ins\n // with those defined by modules implementing the _xmlrpc hook.\n // Built-in methods are overridable.\n foreach (array_merge($defaults, (array)$callbacks) as $key => $callback) {\n // we could check for is_array($callback)\n if (is_int($key)) {\n $method = $callback[0];\n $xmlrpc_server->callbacks[$method] = $callback[1];\n $xmlrpc_server->signatures[$method] = $callback[2];\n $xmlrpc_server->help[$method] = $callback[3];\n }\n else {\n $xmlrpc_server->callbacks[$key] = $callback;\n $xmlrpc_server->signatures[$key] = '';\n $xmlrpc_server->help[$key] = '';\n }\n }\n\n $data = file_get_contents('php://input');\n if (!$data) {\n die('XML-RPC server accepts POST requests only.');\n }\n $xmlrpc_server->message = xmlrpc_message($data);\n if (!xmlrpc_message_parse($xmlrpc_server->message)) {\n xmlrpc_server_error(-32700, t('Parse error. Request not well formed.'));\n }\n if ($xmlrpc_server->message->messagetype != 'methodCall') {\n xmlrpc_server_error(-32600, t('Server error. Invalid XML-RPC. Request must be a methodCall.'));\n }\n if (!isset($xmlrpc_server->message->params)) {\n $xmlrpc_server->message->params = array();\n }\n xmlrpc_server_set($xmlrpc_server);\n $result = xmlrpc_server_call($xmlrpc_server, $xmlrpc_server->message->methodname, $xmlrpc_server->message->params);\n\n if (is_object($result) && !empty($result->is_error)) {\n xmlrpc_server_error($result);\n }\n // Encode the result\n $r = xmlrpc_value($result);\n // Create the XML\n $xml = '\n<methodResponse>\n <params>\n <param>\n <value>'.\n xmlrpc_value_get_xml($r)\n .'</value>\n </param>\n </params>\n</methodResponse>\n\n';\n // Send it\n xmlrpc_server_output($xml);\n}", "public function map(array $methods, string $pattern, $callable): MethodsInterface;", "function getApiMethod()\n {\n }", "public function __construct()\n \t {\n \t \t parent::__construct();\n \t \t $data = SkrillPsp_Json::getQIWIJson();\n \t \t $this->json = $this->decode($data, true);\n \t \t $this->json['id'] = $this->setId();\n \t \t $this->json['method'] = $this->method;\n \t }", "public function __construct($path, $autoMap = true) {\n $this->path = $path;\n $this->app = \\Slim\\Slim::getInstance();\n $this->response = $this->app->response();\n $this->request = $this->app->request();\n $this->routes = array();\n\n // automap these methods, can be overridden in constructor\n if (is_null($this->autoMapMethods)) {\n $this->autoMapMethods = array('get', 'post', 'delete', 'options', 'put');\n }\n\n if ($autoMap) {\n // map public methods to REST api\n $class = new \\ReflectionClass($this);\n // get all public methods\n $methods = $class->getMethods(\\ReflectionMethod::IS_PUBLIC);\n $sortFun = function($value1, $value2) {\n return strlen($value1->name) > strlen($value2->name) ? -1 : 1;\n };\n // this sorting allows to map paths which have similar beginning but different end correctly.\n // Use longer function name for longer paths with the same beginning (after _ is ignored in path).\n usort($methods, $sortFun);\n $regex = '$(^' . implode($this->autoMapMethods, '|^') . ')$';\n foreach ($methods as $method) {\n preg_match($regex, $method->name, $temp);\n if (count($temp) == 0) {\n continue;\n }\n $httpMethod = $temp[0];\n // first check if this has custom route (remember httpmethod needs to be the first word)\n $path = annotationReader::getRoute($method);\n if (is_null($path)) {\n $path = $this->getPathStr($method->name, $httpMethod) .\n $this->getParametersStr($method);\n }\n // remember in via method name is uppercase\n array_push($this->routes, $httpMethod . ':' . $path);\n if (strlen($this->path) == 1 && strlen($path) > 0) {\n $p = $path;\n } else {\n $p = $this->path . $path;\n }\n $mw = annotationReader::getMiddleware($method);\n if (!is_null($mw)) { \n $this->app->map($p, array($this, $mw), array($this, $method->name))->\n via(strtoupper($httpMethod))->\n name(uniqid());\n } elseif (method_exists($this, 'middleware')) {\n $this->app->map($p, array($this, 'middleware'), array($this, $method->name))->\n via(strtoupper($httpMethod))->\n name(uniqid());\n } else {\n $this->app->map($p, array($this, $method->name))->\n via(strtoupper($httpMethod))->\n name(uniqid());\n }\n }\n }\n }", "public function __construct($method)\n {\n $this->method = $method;\n $this->verb = $this->getVerb($method);\n }", "function __construct()\n {\n parent::__construct();\n\n // Configure limits on our controller methods\n // Ensure you have created the 'limits' table and enabled 'limits' within application/config/rest.php\n // $this->methods['index_get']['limit'] = 500; // 500 requests per hour per user/key\n // $this->methods['show_get']['limit'] = 100; // 100 requests per hour per user/key\n // $this->methods['create_post']['limit'] = 50; // 50 requests per hour per user/key\n }", "public function method($str=null)\n {\n if (!is_null($str)) {\n // Filter value before assigning to variable\n $filter = new PHPFrame_RegexpFilter(array(\n \"regexp\" => '/^(GET|POST|PUT|DELETE|HEAD|CLI)$/i',\n \"min_length\" => 3,\n \"max_length\" => 6\n ));\n\n $this->_array['method'] = $filter->process($str);\n }\n\n return $this->_array['method'];\n }", "static public function invalidMethodProvider()\n {\n return array(\n array('WITH SPACE'),\n array('FOO=BAR'),\n array(null),\n array('/foo')\n );\n }", "public function __construct($method, $params){\n\t\t$this->method = $method;\n\t\t$this->params = $params;\n\t\t$this->result = null;\n\t\t$this->joined = false;\n\t}", "public function __construct() {\n $this->setRoutes(array(\n 'user/:userId' => 'updateCertainUser',\n 'fixName/:variableName' => 'anotherMethod'\n ));\n }", "public function __construct ()\n\t{\n\t\tparent::__construct('UTF-8');\n\t\t$this->setProperty(self::PROPERTY_ENABLE_EXTRA_METHODS, TRUE);\n\t\t$this->setProperty(self::PROPERTY_UUID, '00000000-0000-0000-0000-0000000000');\n\t\t$this->setProperty(self::PROPERTY_ALLOW_ENUM, FALSE);\n\t}", "public function __construct(){\n\t\t\tif($_SERVER['REQUEST_METHOD'] != 'POST'){\n\t\t\t\techo json_encode(array('responseText' => 'Method Not Allowed', 'errorCode' => '405'));\n\t\t\t\texit();\n\t\t\t}\n\t\t}", "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 static function addDefault() {\n\t\tself::$_methods['null'] = array( self, 'validateNull' );\n\t\tself::$_methods['len'] = array( self, 'validateLen' );\n\t\tself::$_methods['int'] = array( self, 'validateInt' );\n\t\tself::$_methods['float'] = array( self, 'validateFloat' );\n\t\tself::$_methods['email'] = array( self, 'validateEmail' );\n\t\tself::$_methods['url'] = array( self, 'validateUrl' );\n\t\tself::$_methods['ip'] = array( self, 'validateIp' );\n\t\tself::$_methods['alnum'] = array( self, 'validateAlnum' );\n\t\tself::$_methods['alpha'] = array( self, 'validateAlpha' );\n\t\tself::$_methods['contains'] = array( self, 'validateContains' );\n\t\tself::$_methods['regex'] = array( self, 'validateRegex' );\n\t\tself::$_methods['chars'] = array( self, 'validateChars' );\n\t}", "public function testConfigWithMethodAndModel()\n\t{\n\t\t$method = 'login';\n\t\t$config = array(\n\t\t\t'methods' => array(\n\t\t\t\t'login' => array(\n\t\t\t\t\t'model' => 'JsonRpcTests\\Models\\Basic',\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\t\t$server = new Server($config, $this->serviceManager);\n\t\t$response = $server->handle($this->assembleRequest($method));\n\t\t$this->assertArrayHasKey('error', $response);\n\t\t$this->assertEquals($response['error'], 'model-method-not-defined');\n\t\t//with wrong method name in request\n\t\t$config = array(\n\t\t\t'methods' => array(\n\t\t\t\t'login' => array(\n\t\t\t\t\t'model' => 'JsonRpcTests\\Models\\Basic',\n\t\t\t\t\t'method' => 'asdf'\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\t\t$server = new Server($config, $this->serviceManager);\n\t\t$response = $server->handle($this->assembleRequest($method));\n\t\t$this->assertArrayHasKey('error', $response);\n\t\t$this->assertEquals($response['error'], 'model-method-not-found');\n\t\t//with correct method name in request\n\t\t$method = 'add';\n\t\t$config = array(\n\t\t\t'methods' => array(\n\t\t\t\t'add' => array(\n\t\t\t\t\t'model' => 'JsonRpcTests\\Models\\Basic',\n\t\t\t\t\t'method' => 'add'\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\t\t$server = new Server($config, $this->serviceManager);\n\t\t$response = $server->handle($this->assembleRequest($method, array(\n\t\t\t'a' => 1,\n\t\t\t'b' => 2\n\t\t)));\n\t\t$this->assertArrayHasKey('response', $response);\n\t\t$this->assertEquals($response['response'], 3);\n\t}", "public function methods();", "function __construct()\n {\n parent::__construct();\n\n // Configure limits on our controller methods\n // Ensure you have created the 'limits' table and enabled 'limits' within application/config/rest.php\n //$this->methods['users_get']['limit'] = 500; // 500 requests per hour per user/key\n //$this->methods['users_post']['limit'] = 100; // 100 requests per hour per user/key\n //$this->methods['users_delete']['limit'] = 50; // 50 requests per hour per user/key\n \n }", "public function supports($method = '');", "function __construct()\n {\n parent::__construct();\n\n // Configure limits on our controller methods\n // Ensure you have created the 'limits' table and enabled 'limits' within application/config/rest.php\n //$this->methods['users_get']['limit'] = 500; // 500 requests per hour per user/key\n //$this->methods['users_post']['limit'] = 100; // 100 requests per hour per user/key\n //$this->methods['users_delete']['limit'] = 50; // 50 requests per hour per user/key\n }", "function mdl_create_method(array $definition)\n{\n /**\n * @var ClassMethod\n */\n $method = PHPClassMethod(preg_replace(\"/\\s+/\", \"\", $definition['name']), [], isset($definition['returns']) ? str_replace(\"\\\\\\\\\", \"\\\\\", $definition['returns']) : null, $definition['modifier'] ?? 'public', $definition['comment'] ?? null);\n if (isset($definition['throws'])) {\n /**\n * @var ClassMethod\n */\n $method = $method->throws(array_map(function ($item) {\n return str_replace(\"\\\\\\\\\", \"\\\\\", $item);\n }, mdl_array_wrap($definition['throws'])));\n }\n\n if (isset($definition['parameters'])) {\n foreach (mdl_array_wrap($definition['parameters']) as $value) {\n /**\n * @var ClassMethod\n */\n $method = $method->addParameter(mdl_create_function_parameter($value));\n }\n }\n if (isset($definition['static']) && (true === boolval($definition['static']))) {\n /**\n * @var ClassMethod $method\n */\n $method = $method->asStatic(true);\n }\n if (isset($definition['lines']) && ($lines = mdl_array_wrap($definition['lines']))) {\n foreach ($lines as $line) {\n $method = $method->addLine($line);\n }\n }\n return $method;\n}", "function __construct()\n {\n parent::__construct();\n\n // Configure limits on our controller methods\n // Ensure you have created the 'limits' table and enabled 'limits' within application/config/rest.php\n // $this->methods['user_get']['limit'] = 500; // 500 requests per hour per user/key\n // $this->methods['user_post']['limit'] = 100; // 100 requests per hour per user/key\n // $this->methods['user_delete']['limit'] = 50; // 50 requests per hour per user/key\n }", "public static function addDefault()\r\n {\r\n static::$methods['null'] = function ($str) {\r\n return $str === null || $str === '';\r\n };\r\n static::$methods['len'] = function ($str, $min, $max = null) {\r\n $len = strlen($str);\r\n return null === $max ? $len === $min : $len >= $min && $len <= $max;\r\n };\r\n static::$methods['int'] = function ($str) {\r\n return (string)$str === ((string)(int)$str);\r\n };\r\n static::$methods['float'] = function ($str) {\r\n return (string)$str === ((string)(float)$str);\r\n };\r\n static::$methods['email'] = function ($str) {\r\n return filter_var($str, FILTER_VALIDATE_EMAIL) !== false;\r\n };\r\n static::$methods['url'] = function ($str) {\r\n return filter_var($str, FILTER_VALIDATE_URL) !== false;\r\n };\r\n static::$methods['ip'] = function ($str) {\r\n return filter_var($str, FILTER_VALIDATE_IP) !== false;\r\n };\r\n static::$methods['remoteip'] = function ($str) {\r\n return filter_var($str, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) !== false;\r\n };\r\n static::$methods['alnum'] = function ($str) {\r\n return ctype_alnum($str);\r\n };\r\n static::$methods['alpha'] = function ($str) {\r\n return ctype_alpha($str);\r\n };\r\n static::$methods['contains'] = function ($str, $needle) {\r\n return strpos($str, $needle) !== false;\r\n };\r\n static::$methods['regex'] = function ($str, $pattern) {\r\n return preg_match($pattern, $str);\r\n };\r\n static::$methods['chars'] = function ($str, $chars) {\r\n return preg_match(\"/^[$chars]++$/i\", $str);\r\n };\r\n\r\n static::$default_added = true;\r\n }", "public function __construct()\n {\n if (4 == func_num_args()) {\n $this->method = func_get_arg(0);\n $this->poNumber = func_get_arg(1);\n $this->additionalData = func_get_arg(2);\n $this->extensionAttributes = func_get_arg(3);\n }\n }", "public function __construct($classNameOrInstance, $methodName, $cache = [])\n {\n $this->reflection = new \\ReflectionMethod($classNameOrInstance, $methodName);\n $this->methodName = $methodName;\n $this->arguments = new DefaultsWithDescriptions();\n $this->options = new DefaultsWithDescriptions();\n\n // If the cache came from a newer version, ignore it and\n // regenerate the cached information.\n if (!empty($cache) && CommandInfoDeserializer::isValidSerializedData($cache) && !$this->cachedFileIsModified($cache)) {\n $deserializer = new CommandInfoDeserializer();\n $deserializer->constructFromCache($this, $cache);\n $this->docBlockIsParsed = true;\n } else {\n $this->constructFromClassAndMethod($classNameOrInstance, $methodName);\n }\n }", "protected function getMethodsMap()\n {\n return [\n 'add' => 'addItemTo',\n 'set' => 'setProperty',\n 'unset' => 'unsetProperty'\n ];\n }", "public function methodProvider()\n {\n return [\n ['GET'],\n ['POST'],\n ['PUT'],\n ['DELETE'],\n ['TRACE'],\n ['HEAD'],\n ['OPTIONS'],\n ];\n }", "public function __construct()\n {\n if (16 == func_num_args()) {\n $this->country = func_get_arg(0);\n $this->ipCity = func_get_arg(1);\n $this->ipMatchesBin = func_get_arg(2);\n $this->cardType = func_get_arg(3);\n $this->cardCategory = func_get_arg(4);\n $this->ipCountryCode = func_get_arg(5);\n $this->ipCountry = func_get_arg(6);\n $this->issuer = func_get_arg(7);\n $this->ipBlocklisted = func_get_arg(8);\n $this->valid = func_get_arg(9);\n $this->ipBlocklists = func_get_arg(10);\n $this->issuerWebsite = func_get_arg(11);\n $this->countryCode = func_get_arg(12);\n $this->ipRegion = func_get_arg(13);\n $this->cardBrand = func_get_arg(14);\n $this->issuerPhone = func_get_arg(15);\n }\n }", "public function testConstructorCallsInternalMethods()\n {\n $data = [\n 'access_token' => 'ABCDEFG',\n 'token_type' => 'bearer',\n 'account_id' => 'dbid:AAH4f99T0taONIb-OurWxbNQ6ywGRopQngc',\n 'uid' => '12345',\n 'bearer' => 'three',\n 'team_id' => 'six',\n ];\n\n $reflectedClass = new ReflectionClass(self::$testedClass);\n $instance = $reflectedClass->newInstanceWithoutConstructor();\n\n $constructor = $reflectedClass->getConstructor();\n $constructor->invoke($instance, $data);\n\n $getToken = $reflectedClass->getMethod('getToken');\n $getTokenType = $reflectedClass->getMethod('getTokenType');\n $getBearer = $reflectedClass->getMethod('getBearer');\n $getUid = $reflectedClass->getMethod('getUid');\n $getAccountId = $reflectedClass->getMethod('getAccountId');\n $getTeamId = $reflectedClass->getMethod('getTeamId');\n\n // testing output of methods\n $this->assertSame($getToken->invoke($instance), 'ABCDEFG');\n $this->assertSame($getTokenType->invoke($instance), 'bearer');\n $this->assertSame($getBearer->invoke($instance), 'three');\n $this->assertSame($getUid->invoke($instance), '12345');\n $this->assertSame($getAccountId->invoke($instance), 'dbid:AAH4f99T0taONIb-OurWxbNQ6ywGRopQngc');\n $this->assertSame($getTeamId->invoke($instance), 'six');\n }", "function woocommerce_add_paycoingateway_gateway($methods) {\n\t\t\t$methods[] = 'WC_Gateway_PaycoinGateway';\n\t\t\treturn $methods;\n\t\t}", "public function __construct() {\r\n\t\t$this->request_method = $_SERVER ['REQUEST_METHOD'];\r\n\t\t$this->url_elements = explode ( '/', $_SERVER ['PATH_INFO'] );\r\n\t\t$this->parseIncomingParams ();\r\n\t\t// Initialise json as default format\r\n\t\t$this->format = 'json';\r\n\t\tif (isset ( $this->parameters ['format'] )) {\r\n\t\t\t$this->format = $this->parameters ['format'];\r\n\t\t}\r\n\t}", "function runkit_method_add($classname, $methodname, $args, $code, $flags = RUNKIT_ACC_PUBLIC)\n{\n}", "public function getAllowedMethods(): array;", "function METHOD_default()\n {\n $this->sendTerminal(\"Available methods (use {$this->params[0]}/{method}):\");\n $this->sendTerminal(\" - {$this->params[0]}/hello\");\n }", "function __construct() {\n parent::__construct();\n // Configure limits on our controller methods\n // Ensure you have created the 'limits' table and enabled 'limits' within application/config/rest.php\n $this->methods['doctor_get']['limit'] = 500; // 500 requests per hour per user/key\n $this->methods['doctor_post']['limit'] = 100; // 100 requests per hour per user/key\n $this->methods['doctor_delete']['limit'] = 50; // 50 requests per hour per user/key\n }", "public function get_allowedMethods() {\n\t\treturn Response::make('', '200',\n\t\t\t\tarray('Allow' => 'GET,PUT,POST,DELETE'));\n\t}", "public function __construct()\n {\n parent::__construct();\n // Configure limits on our controller methods\n // Ensure you have created the 'limits' table and enabled 'limits' within application/config/rest.php\n // $this->methods['users_get']['limit'] = 500; // 500 requests per hour per user/key\n // $this->methods['users_post']['limit'] = 100; // 100 requests per hour per user/key\n // $this->methods['users_delete']['limit'] = 50; // 50 requests per hour per user/key\n\t}", "function __construct()\n {\n parent::__construct();\n $this->load->model('mdl_engine','',TRUE);\n\n $this->methods['user_get']['limit'] = 500; //500 requests per hour per user/key\n $this->methods['user_post']['limit'] = 100; //100 requests per hour per user/key\n $this->methods['user_delete']['limit'] = 50; //50 requests per hour per user/key\n }", "function register_shipping_method($methods)\n {\n $methods['legacy_pakkelabels_shipping_gls_business'] = 'Legacy_Pakkelabels_Shipping_GLS_Business';\n return $methods;\n }", "public function init(): array {\r\n return [\r\n 'wussy' => [\r\n 'methods' => ['GET'],\r\n 'get' => [],\r\n 'acl' => ['public']\r\n ],\r\n 'checkName' => [\r\n 'methods' => ['GET'],\r\n 'get' => ['lastName' => 'alpha'],\r\n 'acl' => ['public']\r\n ],\r\n 'checkEmail' => [\r\n 'methods' => ['POST'],\r\n 'post' => 'Email',\r\n 'acl' => ['public']\r\n ],\r\n 'checkIp' => [\r\n 'methods' => ['POST'],\r\n 'post' => 'Ip',\r\n 'acl' => ['public']\r\n ],\r\n 'checkPipl' => [\r\n 'methods' => ['POST'],\r\n 'post' => 'Pipl',\r\n 'acl' => ['public']\r\n ],\r\n 'checkPiplTest' => [\r\n 'methods' => ['GET'],\r\n 'get' => [],\r\n 'acl' => ['public']\r\n ]\r\n ];\r\n }", "public function __get(string $method);", "public function __construct()\n {\n if (10 == func_num_args()) {\n $this->uuid = func_get_arg(0);\n $this->updatedAt = func_get_arg(1);\n $this->title = func_get_arg(2);\n $this->titleTranslated = func_get_arg(3);\n $this->basePrice = func_get_arg(4);\n $this->typeName = func_get_arg(5);\n $this->typeUuid = func_get_arg(6);\n $this->links = func_get_arg(7);\n $this->validFrom = func_get_arg(8);\n $this->validThrough = func_get_arg(9);\n }\n }", "function __construct()\n {\n parent::__construct();\n // Configure limits on our controller methods\n // Ensure you have created the 'limits' table and enabled 'limits' within application/config/rest.php\n $this->methods['users_get']['limit'] = 500; // 500 requests per hour per user/key\n $this->methods['users_post']['limit'] = 100; // 100 requests per hour per user/key\n $this->methods['users_delete']['limit'] = 50; // 50 requests per hour per user/key\n\n\t}", "public function __construct()\n {\n $this->services = $this->privates = [];\n $this->parameters = [\n 'viserio' => [\n 'console' => [\n 'name' => 'test',\n 'version' => '1',\n ],\n ],\n 'console.command.ids' => [],\n ];\n $this->methodMapping = [\n \\Symfony\\Component\\Console\\CommandLoader\\CommandLoaderInterface::class => 'getce817e8bdc75399a693ba45b876c457a0f7fd422258f7d4eabc553987c2fbd31',\n \\Viserio\\Component\\Console\\Application::class => 'get206058a713a7172158e11c9d996f6a067c294ab0356ae6697060f162e057445a',\n \\Viserio\\Component\\Routing\\Command\\RouteListCommand::class => 'get5f34d750a5fcad2449cb7b81f89a57492dc2a795006c02d9b865276ad3291746',\n \\Viserio\\Contract\\Routing\\Dispatcher::class => 'get584908ff464e7559233910f9ef37cbbc81593674d92ff5b6e814b73127f8e05c',\n \\Viserio\\Contract\\Routing\\Router::class => 'get410eb27931e780eeccc23e52a6c17e0e6e2e1827d28f90c4254c8f4111788d4e',\n ];\n $this->aliases = [\n \\Symfony\\Component\\Console\\Application::class => \\Viserio\\Component\\Console\\Application::class,\n \\Viserio\\Component\\Routing\\Router::class => \\Viserio\\Contract\\Routing\\Router::class,\n 'cerebro' => \\Viserio\\Component\\Console\\Application::class,\n 'console' => \\Viserio\\Component\\Console\\Application::class,\n 'route' => \\Viserio\\Contract\\Routing\\Router::class,\n 'router' => \\Viserio\\Contract\\Routing\\Router::class,\n ];\n }", "private static function prepareMethods(string $methods): array\n {\n // Non-array calls without method that accept all (eg: [\"/book/:id\", \"Book.show\"]).\n $methods = (string) ($methods ?: '*');\n\n // Multiple methods can be given (eg: [\"/book/:id\", [\"GET,POST\" => \"Book.index\"]]).\n return array_map('strtoupper', split(',', $methods));\n }", "public function __construct ($method) {\r\n switch (strtoupper(trim($method))) {\r\n case 'GET': $this->method_var = $_GET ; break ;\r\n case 'POST': $this->method_var = $_POST ; break ;\r\n default: throw new DataPortalException (__CLASS__.'::'.__METHOD__, 'illegal method parameter') ;\r\n }\r\n }", "public function getMethod() {}", "public function getMethod() {}", "public function getMethod() {}", "public function getMethod() {}", "public function __construct()\n {\n $this->protocolList = array(\n 'imap' => __NAMESPACE__ . '\\IMAP',\n 'pop3' => __NAMESPACE__ . '\\POP',\n 'nntp' => __NAMESPACE__ . '\\NNTP',\n );\n }", "public function setMethod($request_method) {}", "public function filter() {\n\t\t$args = func_get_args();\n\t\t$methods = array();\n\t\t\n\t\tif( !empty($args) ) {\n\t\t\tif( is_string($args) && !empty(trim($args)) ) {\n\t\t\t\t$methods[] = $args;\n\t\t\t} elseif( is_array($args) ) {\n\t\t\t\t$methods = array_merge($this->methods, $args);\n\t\t\t\t$methods = array_unique(array_filter($methods));\n\t\t\t}\n\t\t\t\n\t\t\t$this->methods = $methods;\n\t\t}\n\t\t\n\t\treturn $this;\n\t}", "public function __construct(\\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler, ClassResolverInterface $class_resolver) {\n parent::__construct('Plugin/Payment/Method', $namespaces, $module_handler, PaymentMethodInterface::class, PaymentMethod::class);\n $this->alterInfo('payment_method');\n $this->setCacheBackend($cache_backend, 'payment_method', ['payment_method']);\n $this->classResolver = $class_resolver;\n }" ]
[ "0.5963103", "0.5894824", "0.58319944", "0.5815827", "0.57778555", "0.5747794", "0.57467216", "0.5701367", "0.5684628", "0.56707174", "0.5604915", "0.55884844", "0.5571685", "0.5566815", "0.5469356", "0.5467061", "0.54263383", "0.54123676", "0.53813124", "0.5373858", "0.5368597", "0.5366416", "0.53621846", "0.5352892", "0.5349514", "0.53313524", "0.53177285", "0.5306922", "0.52986693", "0.52957714", "0.5285954", "0.52771163", "0.52480483", "0.52457017", "0.522433", "0.52241033", "0.52206755", "0.52143276", "0.5211143", "0.5206554", "0.52021503", "0.5195762", "0.5193053", "0.5189637", "0.51795626", "0.51716083", "0.51694125", "0.51639545", "0.5144752", "0.5144375", "0.51299894", "0.5128179", "0.5119676", "0.5100779", "0.50615716", "0.5053907", "0.50524634", "0.5050556", "0.5050083", "0.50412244", "0.50379014", "0.50362176", "0.50357115", "0.503451", "0.50004554", "0.49794117", "0.4978522", "0.49777216", "0.49674797", "0.49562034", "0.49555203", "0.49496666", "0.49459243", "0.49413067", "0.49369556", "0.49352264", "0.49332848", "0.49268052", "0.4909385", "0.49090177", "0.49017727", "0.4899358", "0.4899012", "0.4898897", "0.4898614", "0.48965928", "0.48932055", "0.48882186", "0.4884346", "0.48835927", "0.48770058", "0.4876124", "0.4872877", "0.4872877", "0.4872877", "0.4872877", "0.48699492", "0.48665205", "0.48591375", "0.4857274" ]
0.5781412
4
per the 2.0 specification
public function isValidRequestObect( $request ) { // a request object must: // be an object if ( !is_object( $request ) ) return false; // contain a jsonrpc member that is a string if ( !isset( $request->jsonrpc ) || $request->jsonrpc !== '2.0' ) return false; // contain a method member that is a string if ( !isset( $request->method ) || !is_string( $request->method ) ) return false; // if it contains a params member // that member must be an array or an object if ( isset( $request->params ) && !is_array( $request->params ) && !is_object( $request->params ) ) return false; // if it contains an id member // that member must be a string, number, or null if ( isset( $request->id ) && !is_string( $request->id ) && !is_numeric( $request->id ) && !is_null( $request->id ) ) return false; // it passes the tests return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _i() {\n }", "private function __construct()\t{}", "function yy_r116(){ \n $this->_retvalue[implode(\" \", $this->yystack[$this->yyidx + -2]->minor)] = $this->yystack[$this->yyidx + 0]->minor->getMember(0); \n }", "function yy_r72(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.'::'.$this->yystack[$this->yyidx + 0]->minor; }", "protected function __init__() { }", "abstract protected function external();", "function yy_r68(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.'::'.$this->yystack[$this->yyidx + 0]->minor; }", "function yy_r154(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.'=>'.$this->yystack[$this->yyidx + 0]->minor; }", "function yy_r54(){ $this->_retvalue = array(); }", "public function helper()\n\t{\n\t\n\t}", "private function __() {\n }", "final private function __construct() {}", "final private function __construct() {}", "abstract public function get() ;", "function yy_r42(){ $this->_retvalue = 'UNIQUE'; }", "function yy_r104(){ $this->_retvalue = '->{'.$this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + 0]->minor.'}'; }", "function yy_r123(){\n $this->_retvalue = ['key', $this->yystack[$this->yyidx + -1]->minor, $this->yystack[$this->yyidx + 0]->minor];\n }", "function yy_r106(){ $this->_retvalue = '->'.$this->yystack[$this->yyidx + 0]->minor; }", "function yy_r66(){ $this->_retvalue = []; }", "private function __construct () {}", "function yy_r121(){\n $this->_retvalue = ['primary', $this->yystack[$this->yyidx + 0]->minor];\n }", "private function __construct() {}", "private final function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "function yy_r74(){ $this->_retvalue = $this->yystack[$this->yyidx + -5]->minor.'::$'.$this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; }", "function yy_r73(){ $this->_retvalue = $this->yystack[$this->yyidx + -4]->minor.'::$'.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; }", "function yy_r102(){ $this->_retvalue = '->'.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; }", "private function __construct( )\n {\n\t}", "function yy_r70(){ $this->_retvalue = $this->yystack[$this->yyidx + -3]->minor.'::'.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; }", "final private function __construct() { }", "final private function __construct() { }", "final private function __construct() { }", "public function getAlternate() {}", "abstract function get();", "function yy_r59(){ $this->_retvalue = [$this->yystack[$this->yyidx + 0]->minor]; }", "public function inOriginal();", "function __toString() ;", "abstract protected function data();", "function __toString() ;", "function yy_r109(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.\",\".$this->yystack[$this->yyidx + 0]->minor; }", "public function testProfilePrototypeFindByIdAccessTokens()\n {\n\n }", "function yy_r104(){ $this->_retvalue = [$this->yystack[$this->yyidx + 0]->minor, []]; }", "abstract protected function attributes();", "function yy_r81(){$this->_retvalue = array('var'=>$this->yystack[$this->yyidx + -1]->minor, 'index'=>$this->yystack[$this->yyidx + 0]->minor); }" ]
[ "0.5591915", "0.53262585", "0.53187877", "0.52529204", "0.5229157", "0.5183208", "0.51828605", "0.5152519", "0.51382923", "0.51088166", "0.51017666", "0.509871", "0.509871", "0.50943506", "0.50791055", "0.507734", "0.5069964", "0.5067583", "0.50578624", "0.50575554", "0.5056308", "0.50402176", "0.50397134", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.5038992", "0.50361246", "0.50361246", "0.50132275", "0.49971387", "0.49935532", "0.49871358", "0.4983461", "0.49809587", "0.49809587", "0.49809587", "0.4964301", "0.49531487", "0.49479607", "0.49415743", "0.49257725", "0.49239153", "0.49238858", "0.49221873", "0.49209204", "0.49190274", "0.49167052", "0.4913811" ]
0.0
-1
process a single request object
public function dispatch_single( $request ) { // check that the object passes some basic protocal shape tests if ( !$this->isValidRequestObect( $request ) ) return jsonrpc2::error( -32600 ); // if the request object does not specify a jsonrpc verison if ( !isset( $request->jsonrpc ) ) $request->jsonrpc = '1.0'; // if the request is 2.0 and and no params were sent // create an empty params entry, // as 2.0 requests do not need to send an empty array // later code can now assume that this field will exist if ( $request->jsonrpc == '2.0' && !isset( $request->params ) ) $request->params = array(); // invoke the request object, and store it in the reponse $response = $this->invoke( $request ); // if the request id is not set, or if it is null if ( !isset ( $request->id ) || is_null( $request->id ) ) return null; // copy the request id into the response object $response->id = $request->id; // if it is a 2.0 request if ( $request->jsonrpc === '2.0' ) { // set the response to 2.0 $response->jsonrpc = $request->jsonrpc; } else { // assume it is a 1.0 requrest // ensure there is a result member in the response if ( !isset( $response->result ) ) $response->result = null; // ensure there is an error member if ( !isset( $response->error ) ) $response->error = null; } // return the response object return $response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function processRequest();", "abstract public function processRequest();", "abstract protected function process(Request $request);", "public abstract function processRequest();", "public function process_request() {\n if(!empty($this->POST)) {\n return $this->handlePOST();\n } else {\n return $this->handleGET();\n }\n }", "abstract public function handle_request();", "public static function process_http_request()\n {\n }", "private function _processRequest()\n\t{\n\t\t// prevent unauthenticated access to API\n\t\t$this->_secureBackend();\n\n\t\t// get the request\n\t\tif (!empty($_REQUEST)) {\n\t\t\t// convert to object for consistency\n\t\t\t$this->request = json_decode(json_encode($_REQUEST));\n\t\t} else {\n\t\t\t// already object\n\t\t\t$this->request = json_decode(file_get_contents('php://input'));\n\t\t}\n\n\t\t//check if an action is sent through\n\t\tif(!isset($this->request->action)){\n\t\t\t//if no action is provided then reply with a 400 error with message\n\t\t\t$this->reply(\"No Action Provided\", 400);\n\t\t\t//kill script\n\t\t\texit();\n\t\t}\n\n\t\t//check if method for the action exists\n\t\tif(!method_exists($this, $this->request->action)){\n\t\t\t//if method doesn't exist, send 400 code and message with reply'\n\t\t\t$this->reply(\"Action method not found\",400);\n\t\t\t//kill script\n\t\t\texit();\n\t\t}\n \n\t\tswitch($this->request->action){\n\t\t\tcase \"hello\":\n\t\t\t\t$this->hello($this->request->data);\n\t\t\t\tbreak;\n\t\t\tcase \"submit_video\":\n\t\t\t\t//error_log(\"formSubmit has been sent through\");\n\t\t\t\t$this->submit_video($this->request, $_FILES);\n\t\t\t\tbreak;\n\t\t\tcase \"remove_video\":\n\t\t\t\t//error_log(\"formSubmit has been sent through\");\n\t\t\t\t$this->remove_video($this->request);\n\t\t\t\tbreak;\n\t\t\tcase \"isSubmitted\":\n\t\t\t\t$this->isSubmitted($this->request);\n\t\t\tdefault:\n\t\t\t\t$this->reply(\"action switch failed\",400);\n\t\t\tbreak;\n\t\t}\n\n\n\n\t}", "public static function process($request){\r\n\t\tcall_user_func($request -> action, $request -> params);\r\n\t}", "public function processRequest() {\r\n switch($this->requestMethod) {\r\n case 'GET':\r\n if($this->id) {\r\n $response = $this->get($this->id);\r\n }\r\n else {\r\n $response = $this->getAll();\r\n }\r\n break;\r\n case 'POST':\r\n $response = $this->create();\r\n break;\r\n case 'PUT':\r\n $response = $this->update($this->id);\r\n break;\r\n case 'DELETE':\r\n $response = $this->delete($this->id);\r\n break;\r\n case 'OPTIONS':\r\n break;\r\n default:\r\n $response = $this->notFoundResponse();\r\n break;\r\n }\r\n\r\n header($response['status_code_header']);\r\n\r\n // If there is a body then echo it\r\n if($response['body']) {\r\n echo $response['body'];\r\n }\r\n }", "protected abstract function handleRequest();", "public function processRequest()\n\t\t{\n\t\t\t$request_method = strtolower($_SERVER['REQUEST_METHOD']);\n\t\t\tswitch ($request_method)\n\t\t\t{\n\t\t\t\tcase 'get':\n\t\t\t\t\t$data = $_GET['url'];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'post':\n\t\t\t\t\t$data = $_GET['url'];\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$request_parts = explode('/', $data);\n\t\t\t$controller = $request_parts[0];\n\t\t\tswitch ($controller)\n\t\t\t{\n\t\t\t\tcase 'ad':\n\t\t\t\t\tprocessAdRequest(substr($data, strlen('ad')+1));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'category':\n\t\t\t\t\tprocessCategoryRequest(substr($data, strlen('category')+1));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'user':\n\t\t\t\t\tprocessUserRequest(substr($data, strlen('user')+1));\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\techo \"Invalid Request!\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}", "public function handleRequest();", "public function handleRequest();", "public function handleRequest();", "public function process()\n\t{\n\t\t$action = $this->getAction();\n\t\tswitch (strtolower($action))\n\t\t{\n\t\t\tcase 'get':\n\t\t\tcase 'put':\n\t\t\tcase 'post':\n\t\t\tcase 'delete':\n\t\t}\t\n\t}", "public function processRequest() {\n $this->server->service($GLOBALS['HTTP_RAW_POST_DATA']);\n }", "public function process($path, Request $request);", "function handleRequest() ;", "public function handleRequest() {}", "abstract public function handleRequest($request);", "protected function _request() {}", "abstract public function request();", "public function process(Request $request, Response $response, RequestHandlerInterface $handler);", "abstract public function processRequest(array $objects);", "function process($request) {\n\t//$logFusion =& LoggerManager::getLogger('fusion');\n//PBXFusion begin\n\t$request=$this->mapRequestVars($request);\n $mode = $request->get('callstatus');\n\t//$logFusion->debug(\"PBX CONTROLLER PROCESS mode=\".$mode);\n//PBXFusion end\n switch ($mode) {\n\t//PBXFusion begin\n \t case \"CallStart\" :\n $this->processCallStart($request);\n break;\n\t//PBXFusion end\n case \"StartApp\" :\n $this->processStartupCallFusion($request);\n break;\n case \"DialAnswer\" :\n $this->processDialCallFusion($request);\n break;\n case \"Record\" :\n $this->processRecording($request);\n break;\n case \"EndCall\" :\n $this->processEndCallFusion($request);\n break;\n case \"Hangup\" :\n $callCause = $request->get('causetxt');\n if ($callCause == \"null\") {\n break;\n }\n $this->processHangupCall($request);\n break;\n }\n }", "public function processRequest() {\n $action = \"\";\n //retrieve action from client.\n if (filter_has_var(INPUT_GET, 'action')) {\n $action = filter_input(INPUT_GET, 'action');\n }\n\n switch ($action) {\n case 'login':\n $this->login(); \n break;\n case 'register':\n $this->register(); //list all articles\n break;\n case 'search':\n $this->search(); //show a form for an article\n break;\n case 'searchList':\n $this->searchList();\n break;\n case 'remove':\n $this->removeArticle();\n break;\n case 'modify':\n $this->modifyArticle();\n break;\n case 'listCategoryForm':\n $this->listCategoryForm();\n break;\n case 'listCategory':\n $this->listCategory();\n break;\n default :\n break;\n }\n }", "function process_request()\n {\n // Note: some modules prefer 's' to indicate the instance number... may need to implement that as well.\n // Fetch the course module instance\n $id = required_param('id', PARAM_INT);\n if (!$this->cm = get_coursemodule_from_id('sloodle', $id)) error('Course module ID was incorrect.');\n // Fetch the course data\n if (!$this->course = sloodle_get_record('course', 'id', $this->cm->course)) error('Failed to retrieve course.');\n $this->sloodle_course = new SloodleCourse();\n if (!$this->sloodle_course->load($this->course)) error(get_string('failedcourseload', 'sloodle'));\n\n // Fetch the SLOODLE instance itself\n if (!$this->sloodle = sloodle_get_record('sloodle', 'id', $this->cm->instance)) error('Failed to find SLOODLE module instance');\n }", "public function preProcessRequest(RequestInterface &$request) {}", "final public function handle(\\HttpRequest $request)\n {\n $processed = $this->successor->processing($request);\n\n if ($processed === null) {\n if ($this->successor !== null) {\n $processed = $this->successor->handle($request);\n }\n }\n\n return $processed;\n }", "private function processRequest($request)\n {\n if (!is_array($request)) {\n return $this->requestError();\n }\n\n // The presence of the 'id' key indicates that a response is expected\n $isQuery = array_key_exists('id', $request);\n\n $id = &$request['id'];\n\n if (($id !== null) && !is_int($id) && !is_float($id) && !is_string($id)) {\n return $this->requestError();\n }\n\n $version = &$request['jsonrpc'];\n\n if ($version !== self::VERSION) {\n return $this->requestError($id);\n }\n\n $method = &$request['method'];\n\n if (!is_string($method)) {\n return $this->requestError($id);\n }\n\n // The 'params' key is optional, but must be non-null when provided\n if (array_key_exists('params', $request)) {\n $arguments = $request['params'];\n\n if (!is_array($arguments)) {\n return $this->requestError($id);\n }\n } else {\n $arguments = array();\n }\n\n if ($isQuery) {\n return $this->processQuery($id, $method, $arguments);\n }\n\n $this->processNotification($method, $arguments);\n return null;\n }", "private function processRequest()\n\t{\n\t\t\n\t\t$request = NEnvironment::getService('httpRequest');\n\t\t\n\t\tif ($request->isPost() && $request->isAjax() && $request->getHeader('x-callback-client')) { \n\t\t\t\n\t\t\t$data = json_decode(file_get_contents('php://input'), TRUE);\n\t\t\tif (count($data) > 0) {\n\t\t\t\tforeach ($data as $key => $value) {\n\t\t\t\t\tif (isset($this->items[$key]) && isset($this->items[$key]['callback']) && $value === TRUE) {\n\t\t\t\t\t\t$this->items[$key]['callback']->invokeArgs($this->items[$key]['args']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tdie(json_encode(array('status' => \"OK\")));\n\t\t}\n\t\t\n\t}", "function rest_do_request($request)\n {\n }", "public function DispatchRequest ();", "private function requestProcessor() {\n try {\n\n if (empty($this->uri))\n throw new \\Exception(\"Undefined url\");\n\n $ReqHandle = curl_init($this->uri);\n\n $body = json_encode([]);\n if( sizeof($this->data) > 0 )\n $body = json_encode($this->data);\n\n $returnTransfer = 0;\n if( $this->hasResponseToReturn )\n $returnTransfer = 1;\n\n $isPost = 0;\n if( $this->method != 'GET')\n $isPost = 1;\n\n\n if($isPost == 1){\n curl_setopt($ReqHandle,CURLOPT_POST, $isPost);\n curl_setopt($ReqHandle, CURLOPT_POSTFIELDS, $body);\n }\n \n curl_setopt_array($ReqHandle, [\n CURLOPT_RETURNTRANSFER => $returnTransfer,\n CURLOPT_HTTPHEADER => $this->headersToBeUsed\n ]);\n\n\n $result = curl_exec($ReqHandle);\n\n if(curl_errno($ReqHandle)){\n\n return curl_error($ReqHandle);\n }\n\n if($returnTransfer == 1)\n return json_decode($result);\n\n\n\n } catch (\\Throwable $t) {\n new ErrorTracer($t);\n }\n }", "abstract function _do_execute(request $request);", "function rest_do_request( $request ) {\n\tglobal $wp_rest_server;\n\t$request = rest_ensure_request( $request );\n\treturn $wp_rest_server->dispatch( $request );\n}", "abstract public function handleRequest(Request $request);", "abstract public function mapRequest($request);", "public function process(ServerRequestInterface $request)\n {\n }", "public function process ()\n {\n /**\n * Sets pricing for which offer is applicable.\n */\n $this->setOfferApplicablePricing();\n\n /**\n * Checks if offer is valid.\n */\n if ( $this->isOfferValid() ) {\n\n /**\n * Sets benefits gained from offer.\n */\n $this->setBenefit();\n }\n\n return $this->request;\n }", "public function & GetRequest ();", "public function postExecution($request){}", "public function runRequest() {\n }", "public function process(Aloi_Serphlet_Application_HttpRequest $request, Aloi_Serphlet_Application_HttpResponse $response) {\r\n\r\n\t\ttry {\r\n\t\t\t// Identify the path component we will use to select a mapping\r\n\t\t\t$path = $this->processPath($request, $response);\r\n\t\t\tif (is_null($path)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (self::$log->isDebugEnabled()) {\r\n\t\t\t\tself::$log->debug('Processing a \"' . $request->getMethod() . '\" for path \"' . $path . '\"');\r\n\t\t\t}\r\n\r\n\t\t\t// Select a Locale for the current user if requested\r\n\t\t\t$this->processLocale($request, $response);\r\n\r\n\t\t\t// Set the content type and no-caching headers if requested\r\n\t\t\t$this->processContent($request, $response);\r\n\t\t\t$this->processNoCache($request, $response);\r\n\r\n\t\t\t// General purpose preprocessing hook\r\n\t\t\tif (!$this->processPreprocess($request, $response)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t//Identify the mapping for this request\r\n\t\t\t$mapping = $this->processMapping($request, $response, $path);\r\n\t\t\tif (is_null($mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Check for any role required to perform this action\r\n\t\t\tif (!$this->processRoles($request, $response, $mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Process any ActionForm bean related to this request\r\n\t\t\t$form = $this->processActionForm($request, $response, $mapping);\r\n\t\t\t$this->processPopulate($request, $response, $form, $mapping);\r\n\t\t\tif (!$this->processValidate($request, $response, $form, $mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Process a forward or include specified by this mapping\r\n\t\t\tif (!$this->processForward($request, $response, $mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (!$this->processInclude($request, $response, $mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Create or acquire the Action instance to process this request\r\n\t\t\t$action = $this->processActionCreate($request, $response, $mapping);\r\n\t\t\tif (is_null($action)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Call the Action instance itself\r\n\t\t\t$forward = $this->processActionPerform($request, $response, $action, $form, $mapping);\r\n\r\n\t\t\t// Process the returned ActionForward instance\r\n\t\t\t$this->processForwardConfig($request, $response, $forward);\r\n\t\t} catch (ServletException $e) {\r\n\t\t\tthrow $e;\r\n\t\t}\r\n\t}", "function processRequest(){\n\tglobal $muse; // App settings & database\n\tglobal $HTTP_RAW_POST_DATA;\n\t\n\t// Get the user's posted action\n\t$muse['actionRequestRaw'] = $HTTP_RAW_POST_DATA;\n\t$muse['actionRequest'] = $muse['db']->real_escape_string(trim($HTTP_RAW_POST_DATA));\n\t// First word of action request will be the action keyword.\n\t$muse['actionKeyword'] = strtolower(substr( $muse['actionRequest'], 0, strpos( $muse['actionRequest'], \" \" ) ) );\n\t\n\t// If it's only one word, through it back in. Capatlization issues?\n\tif ($muse['actionKeyword']==false) {\n\t\t$muse['actionKeyword'] = $muse['actionRequest'];\n\t}\n}", "public function willProcessRequest(array $data) {\n }", "public function request();", "function process_request($config = array())\n\t{\n\t\t$this->_initialize($config);\n\n\t\t$type = ee()->input->get('action');\n\n\t\tswitch($type)\n\t\t{\n\t\t\tcase 'setup':\n\t\t\t\t$this->setup();\n\t\t\t\tbreak;\n\t\t\tcase 'setup_upload':\n\t\t\t\t$this->setup_upload();\n\t\t\t\tbreak;\n\t\t\tcase 'directory':\n\t\t\t\t$this->directory(ee()->input->get('directory'), TRUE);\n\t\t\t\tbreak;\n\t\t\tcase 'directories':\n\t\t\t\t$this->directories(TRUE);\n\t\t\t\tbreak;\n\t\t\tcase 'directory_contents':\n\t\t\t\t$this->directory_contents();\n\t\t\t\tbreak;\n\t\t\tcase 'directory_info':\n\t\t\t\t$this->directory_info();\n\t\t\t\tbreak;\n\t\t\tcase 'file_info':\n\t\t\t\t$this->file_info();\n\t\t\t\tbreak;\n\t\t\tcase 'upload':\n\t\t\t\t$this->upload_file(ee()->input->get_post('upload_dir'), FALSE, TRUE);\n\t\t\t\tbreak;\n\t\t\tcase 'edit_image':\n\t\t\t\t$this->edit_image();\n\t\t\t\tbreak;\n\t\t\tcase 'ajax_create_thumb':\n\t\t\t\t$this->ajax_create_thumb();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\texit('Invalid Request');\n\t\t}\n\t}", "public function handle($request);", "abstract public function processRequest(PriceWaiter_NYPWidget_Controller_Endpoint_Request $request);", "public function interpretRequest($request)\n {\n\n $this->updtv = $request->param('updtv',Validator::BOOLEAN);\n\n // startpunkt des pfades für die acls\n if ($aclRoot = $request->param('a_root', Validator::CKEY))\n $this->aclRoot = $aclRoot;\n\n // die id des Datensatzes von dem aus der Pfad gestartet wurde\n if ($aclRootId = $request->param('a_root_id', Validator::INT))\n $this->aclRootId = $aclRootId;\n\n // der key des knotens auf dem wir uns im pfad gerade befinden\n if ($aclKey = $request->param('a_key', Validator::CKEY))\n $this->aclKey = $aclKey;\n\n // der neue knoten\n if ($aclNode = $request->param('a_node', Validator::CKEY))\n $this->aclNode = $aclNode;\n\n // an welchem punkt des pfades befinden wir uns?\n if ($aclLevel = $request->param('a_level', Validator::INT))\n $this->aclLevel = $aclLevel;\n\n // request elemet type, bei back to top ist es relevant zu wissen woher der\n // aufruf kam (in diesem fall von einem input)\n // könnte bei referenzen auch interessant werden\n // values: inp | ref\n //if ($requestedBy = $request->param('rqtby', Validator::TEXT))\n // $this->requestedBy = $requestedBy;\n\n // sprungpunkt für back to top\n if ($maskRoot = $request->param('m_root', Validator::TEXT))\n $this->maskRoot = $maskRoot;\n\n // the publish type, like selectbox, tree, table..\n if ($publish = $request->param('publish', Validator::CNAME))\n $this->publish = $publish;\n\n // if of the target element, can be a table, a tree or whatever\n if ($targetId = $request->param('target_id', Validator::CKEY))\n $this->targetId = $targetId;\n\n // callback for a target function in thr browser\n if ($target = $request->param('target', Validator::CKEY))\n $this->target = $target;\n\n // target mask key\n if ($targetMask = $request->param('target_mask', Validator::CNAME))\n $this->targetMask = $targetMask;\n\n if ($parentMask = $request->param('pmsk', Validator::TEXT))\n $this->parentMask = $parentMask;\n\n\n\n // mask key\n if ($viewId = $request->param('view_id', Validator::CKEY))\n $this->viewId = $viewId;\n\n // mask key\n if ($viewType = $request->param('view', Validator::CNAME))\n $this->viewType = $viewType;\n\n // soll die maske neu geladen werden?\n //if ($reload = $request->param('reload', Validator::BOOLEAN))\n // $this->reload = $reload;\n\n // target mask key\n if ($refId = $request->param('refid', Validator::INT))\n $this->refId = $refId;\n\n // listing type\n if ($ltype = $request->param('ltype', Validator::CNAME))\n $this->ltype = $ltype;\n\n // context\n if ($context = $request->param('context', Validator::CNAME))\n $this->context = $context;\n\n // parameter zum fixieren des Contexts\n // wird verwendet um zwischen \"unterschiedliche\" Masken mit dem gleichen\n // viewnamen zu switchen\n if ($cntk = $request->param('cntk', Validator::CKEY))\n $this->contextKey = $cntk;\n\n // mask switcher key\n // wird nur in der view gesetzt wenn der mask switcher vorhanden ist\n if ($cntms = $request->param('cntms', Validator::CNAME))\n $this->contextMaskSwt = $cntms;\n\n\n // per default\n $this->categories = [];\n\n }", "public function processRequest()\n {\n $params = json_decode(file_get_contents('php://input'),true);\n\n if ( $_POST [ 'action' ] == 'setScreenVars' )\n {\n $this->setScreenVars();\n\n } \n elseif ( $_POST [ 'action' ] == 'loadHero' )\n\n {\n $this->loadHero();\n\n } \n elseif ( $_POST [ 'action' ] == 'loadThumb' )\n\n {\n $this->loadThumb();\n\n } \n elseif ( $_POST [ 'action' ] == 'setScreenVars' )\n\n {\n $this->setScreenVars();\n }\n //this one sent from angular, use $params\n elseif ( $params [ 'action' ] == 'getSiteData' )\n {\n $this->getSiteData();\n }\n elseif ( $_POST [ 'action' ] == 'contactFormSubmit' )\n {\n $this->contactFormSubmit();\n }\n else \n {\n\n if ( $_SESSION['user']['access'] == '2' ) {\n if ( $_POST [ 'action' ] == 'sortUpdate' )\n {\n $this->sortUpdate();\n }\n elseif ( $_POST [ 'action' ] == 'imgStatusUpdate' )\n {\n $this->imgStatusUpdate();\n }\n elseif ( $_POST [ 'action' ] == 'deleteImage' )\n {\n $this->deleteImage();\n }\n elseif ( $_POST [ 'action' ] == 'saveCaption' )\n {\n $this->saveCaption();\n }\n }\n else \n {\n //no action requested, just notifify this file being accessed\n echo ( 'ajax file' );\n } \n }\n\n }", "function process_request()\r\n {\r\n $id = required_param('id', PARAM_INT);\r\n if (!$this->course = sloodle_get_record('course', 'id', $id)) error('Could not find course.');\r\n $this->sloodle_course = new SloodleCourse();\r\n if (!$this->sloodle_course->load($this->course)) error(get_string('failedcourseload', 'sloodle'));\r\n\r\n }", "abstract function doExecute($request);", "final public function handle(Request $request)\n {\n $response = $this->process($request);\n if (($response === null) && ($this->successor !== null)) {\n $response = $this->successor->handle($request);\n }\n\n return $response;\n }", "public function process($request)\n\t\t{\n\t\t\treturn array('request' => $request, 'result' => 'demo');\n\t\t}", "function process_request() {\n\t\tglobal $publishthis;\n\n\t\ttry{\n\n\t\t\t$bodyContent = '';\n\n\t\t\tif ( function_exists( 'wpcom_vip_file_get_contents' ) ) {\n\t\t\t\t$bodyContent = wpcom_vip_file_get_contents( 'php://input', 10, 60 );\n\t\t\t} else {\n\t\t\t\t$bodyContent = file_get_contents( 'php://input' );\n\t\t\t}\n\n\t\t\t$publishthis->log->addWithLevel( array( 'message' => 'Endpoint Request', 'status' => 'info', 'details' => $bodyContent ), \"2\" );\n\n\t\t\t$arrEndPoint = json_decode( $bodyContent, true );\n\n\t\t\t$action = $arrEndPoint[\"action\"];\n\n\t\t\t$pt_settings = $publishthis->get_options();\n\n\t\t\tif( !in_array( $action, array('resetState', 'stopEndpoint', 'resumeEndpoint') ) ) {\n\t\t\t\t$manually_stopped = get_option( 'pt_import_manually_stopped' );\n\t\t\t\tif ( $manually_stopped == 1 ) {\n\t\t\t\t\t$this->sendFailure('Import manually stopped');\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tswitch( $action ) {\n\t\t\t\tcase \"verify\":\n\t\t\t\t\t$this->actionVerify();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"publish\":\n\t\t\t\t\tif( $publishthis->get_option( 'curated_publish' ) != 'import_from_manager' ) {\n\t\t\t\t\t\t$this->sendFailure( \"Publishing through CMS is disabled\" );\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t$feedId = intval( $arrEndPoint[\"feedId\"], 10 );\n\t\t\t\t\t$pageNum = intval( $arrEndPoint[\"pageNum\"], 10 );\n\t\t\t\t\t$importId = $arrEndPoint[\"importId\"];\n\n\t\t\t\t\t$this->actionPublish2( $feedId, $pageNum, $importId );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"getAuthors\":\n\t\t\t\t\t$this->actionGetAuthors();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"getCategories\":\n\t\t\t\t\t$this->actionGetCategories();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"resetState\":\n\t\t\t\t\t$this->resetState();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"stopEndpoint\":\n\t\t\t\t\t$this->stopEndpoint();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"resumeEndpoint\":\n\t\t\t\t\t$this->resumeEndpoint();\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\t$this->sendFailure( \"Empty or bad request made to endpoint\" );\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t} catch( Exception $ex ) {\n\t\t\t//we will log this to the pt logger, but we always need to send back a failure if this occurs\n\n\t\t\t$this->sendFailure( $ex->getMessage() );\n\t\t}\n\n\t\treturn;\n\t}", "public function parseCurrentRequest()\n {\n // If 'action' is post, data will only be read from 'post'\n if ($action = $this->request->post('action')) {\n die('\"post\" method action handling not implemented');\n }\n \n $action = $this->request->get('action') ?: 'home';\n \n if ($response = $this->actionHandler->trigger($action, $this)) {\n $this->getResponder()->send($response);\n } else {\n die('404 not implemented');\n }\n }", "abstract function do_api_request();", "protected function getRequest() {}", "public function process(Request $request)\n {\n \n // next if you want save one step progress to session use\n $this->saveProgress($request);\n }", "function execute(Request $request);", "public function process(\n ServerRequestInterface $request,\n RequestHandlerInterface $handler\n );", "public function captureIncomingRequest()\n {\n try {\n $this->request = new Request;\n } catch (\\Throwable $th) {\n exit(json_encode([\n 'error' => $th->getMessage(),\n 'SUCCESS' => false,\n ]));\n }\n\n $this->payload = $this->request->data();\n $this->endpoint = urldecode($this->payload['endpoint']);\n unset($this->payload['endpoint']);\n }", "private function processInput($input)\n {\n if (count($input) === 0) {\n return $this->requestError();\n }\n\n if (isset($input[0])) {\n return $this->processBatchRequests($input);\n }\n\n return $this->processRequest($input);\n }", "protected function _process() {}", "protected function _process() {}", "protected function _process() {}", "protected function _process() {}", "public function handleRequest ()\n\t{\n\t\t$this->version = '1.0';\n\t\t$this->id = NULL;\n\n\t\tif ($this->getProperty(self::PROPERTY_ENABLE_EXTRA_METHODS))\n\t\t\t$this->publishExtraMethods();\n\n\t\tif ($_SERVER['REQUEST_METHOD'] == 'POST')\n\t\t{\n\n\t\t\t$json = file_get_contents('php://input');\n\t\t\t$request = \\json_decode($json);\n\n\t\t\tif (is_array($request))\n\t\t\t{\n\t\t\t\t// Multicall\n\t\t\t\t$this->version = '2.0';\n\n\t\t\t\t$response = array();\n\t\t\t\tforeach ($request as $singleRequest)\n\t\t\t\t{\n\t\t\t\t\t$singleResponse = $this->handleSingleRequest($singleRequest, TRUE);\n\t\t\t\t\tif ($singleResponse !== FALSE)\n\t\t\t\t\t\t$response[] = $singleResponse;\n\t\t\t\t}\n\n\t\t\t\t// If all methods in a multicall are notifications, we must not return an empty array\n\t\t\t\tif (count($response) == 0)\n\t\t\t\t\t$response = FALSE;\n\t\t\t}\n\t\t\telse if (is_object($request))\n\t\t\t{\n\t\t\t\t$this->version = $this->getRpcVersion($request);\n\t\t\t\t$response = $this->handleSingleRequest($request);\n\t\t\t}\n\t\t\telse\n\t\t\t\t$response = $this->formatError(self::ERROR_INVALID_REQUEST);\n\t\t}\n\t\telse if ($_SERVER['PATH_INFO'] != '')\n\t\t{\n\t\t\t$this->version = '1.1';\n\t\t\t$this->id = NULL;\n\n\t\t\t$method = substr($_SERVER['PATH_INFO'], 1);\n\t\t\t$params = $this->convertFromRpcEncoding($_GET);\n\n\t\t\tif (!$this->hasMethod($method))\n\t\t\t\t$response = $this->formatError(self::ERROR_METHOD_NOT_FOUND);\n\t\t\telse\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tRpcResponse::setWriter(new JsonRpcResponseWriter($this->version, $this->id));\n\t\t\t\t\t$res = $this->invoke($method, $params);\n\t\t\t\t\tif ($res instanceof JsonRpcResponseWriter)\n\t\t\t\t\t{\n\t\t\t\t\t\t$res->finalize();\n\t\t\t\t\t\t$resposne = FALSE;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t$response = $this->formatResult($res);\n\t\t\t\t}\n\t\t\t\tcatch (\\Exception $exception)\n\t\t\t\t{\n\t\t\t\t\t$response = $this->formatException($exception);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$response = $this->formatError(self::ERROR_PARSE_ERROR);\n\t\t}\n\n\t\tif (!headers_sent())\n\t\t{\n\t\t\theader('Content-Type: application/json', TRUE);\n\t\t\theader('Cache-Control: nocache', TRUE);\n\t\t\theader('Pragma: no-cache', TRUE);\n\t\t}\n\n\t\tif ($response !== FALSE)\n\t\t{\n\t\t\t$result = \\json_encode($this->convertToRpcEncoding($response));\n\n\t\t\tif ($result === FALSE)\n\t\t\t\terror_log(var_export($response, TRUE));\n\t\t\telse\n\t\t\t\techo($result);\n\t\t}\n\t}", "public static function processURL($url = '')\n\t{\n\t\t$parsed_url = self::explodeURL($url);\n\t\tforeach($parsed_url as $key => $url) {\n\n\t\t\t/**\n\t\t\t * We don't want to process the input stream content.\n\t\t\t */\n\t\t\tif ($key === 'php_input_stream') {\n\t\t\t\tcontinue;\n\t\t\t} else {\n\n\t\t\t\t$custom_url_part = explode(':', $url);\n\t\t\t\tif (isset($custom_url_part[1])) {\n\t\t\t\t\t$parsed_url[$custom_url_part[0]] = $custom_url_part[1];\n\t\t\t\t}\n\n\t\t\t\t// Remove the default (empty) values from the parsed array\n\t\t\t\tif (is_int($key) || empty($parsed_url[$key])) {\n\t\t\t\t\tunset($parsed_url[$key]);\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Collect all \"fancy\" parameters\n\t\t\t\t * http://phetiche/controller/method/arg[0]/arg[1]/arg[2]/arg[3] ...\n\t\t\t\t */\n\t\t\t\tif (!in_array($url, $parsed_url) && !empty($url) && $key != 0) {\n\t\t\t\t\t$parsed_url['uri_args'][] = $url;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * If no request ID is found, then NULL it so we can still use (check) it\n\t\t */\n\t\t$parsed_url['controller'] = (isset($parsed_url['controller'])) ? $parsed_url['controller'] : null;\n\t\t$parsed_url['method'] = (isset($parsed_url['method'])) ? $parsed_url['method'] : null;\n\t\t$parsed_url['request_id'] = (isset($parsed_url['request_id'])) ? $parsed_url['request_id'] : null;\n\t\t$parsed_url['routed_to'] = null;\n\n\t\t/**\n\t\t * Now that we have a final array on (request) data, we can merge the other\n\t\t * request method's data, such as POST and PUT.\n\t\t */\n\t\treturn Phetiche_request::readInput($parsed_url);\n\t}", "public function processAction(Request $request)\n {\n // Get the request Vars\n $this->requestQuery = $request->query;\n\n // init the hybridAuth instance\n $provider = trim(strip_tags($this->requestQuery->get('hauth_start')));\n $cookieName = $this->get('azine_hybrid_auth_service')->getCookieName($provider);\n $this->hybridAuth = $this->get('azine_hybrid_auth_service')->getInstance($request->cookies->get($cookieName), $provider);\n\n // If openid_policy requested, we return our policy document\n if ($this->requestQuery->has('get') && 'openid_policy' == $this->requestQuery->get('get')) {\n return $this->processOpenidPolicy();\n }\n\n // If openid_xrds requested, we return our XRDS document\n if ($this->requestQuery->has('get') && 'openid_xrds' == $this->requestQuery->get('get')) {\n return $this->processOpenidXRDS();\n }\n\n // If we get a hauth.start\n if ($this->requestQuery->has('hauth_start') && $this->requestQuery->get('hauth_start')) {\n return $this->processAuthStart();\n }\n // Else if hauth.done\n elseif ($this->requestQuery->has('hauth_done') && $this->requestQuery->get('hauth_done')) {\n return $this->processAuthDone($request);\n }\n // Else we advertise our XRDS document, something supposed to be done from the Realm URL page\n\n return $this->processOpenidRealm();\n }", "function processCurrentRequest() {\r\n if(!isset($_REQUEST)) {\r\n return view();\r\n }\r\n if(isset($_REQUEST['add'])) {\r\n return add();\r\n }\r\n if(isset($_REQUEST['delete'])){\r\n return delete();\r\n }\r\n if(isset($_REQUEST['update'])){\r\n return update();\r\n }\r\n if(!isset($_REQUEST['section'])){\r\n return view();\r\n }\r\n if($_REQUEST['section'] = \"edit\") {\r\n return edit();\r\n }\r\n if($_REQUEST['section'] = \"view\") {\r\n return view();\r\n }\r\n\r\n return view();\r\n}", "protected function _request() {\n\t\treturn $this->_container->request;\n\t}", "public function process(ServerRequestInterface $request, RequestHandlerInterface $next): ResponseInterface\n {\n // identify object requests and set request attributes\n $request = static::matchRequest($request);\n\n // check only the request attributes relevant for object request\n $allowed = array_flip($this->attributes);\n $attribs = array_intersect_key($request->getAttributes(), $allowed);\n\n // pass the request along to the next handler and return its response\n if (empty($attribs['object'])) {\n $response = $next->handle($request);\n return $response;\n }\n\n // handle the object request here and return our response\n\n // @checkme keep track of the current base uri if filtered in router\n static::setBaseUri($request);\n // set current module to 'object' for Xaraya controller - used e.g. in xarMod::getName() in DD list\n static::prepareController('object', static::$baseUri);\n\n // add remaining query params to request attributes\n $params = array_merge($attribs, $request->getQueryParams());\n // add body params to query params (if any) - limited to POST requests here\n if ($request->getMethod() === 'POST') {\n $input = $request->getParsedBody();\n if (!empty($input) && is_array($input)) {\n $params = array_merge($params, $input);\n }\n }\n\n // @checkme pass along buildUri() as link function to DD\n $params['linktype'] = 'other';\n $params['linkfunc'] = [static::class, 'buildUri'];\n\n $response = $this->run($params);\n\n // clean up routes for object requests in response output\n //$response = static::cleanResponse($response, $this->getResponseFactory());\n\n return $response;\n }", "public function handlerNeedsRequest()\n {\n }", "abstract public function populateRequest(PHPFrame_Request $request);", "function run(&$x = NULL, $q = NULL) {\n $this->query = $q;\n if(is_string($x))\n\t $req = json_decode($x);\n\telseif(is_array($x))\n\t\t$req = (object)$x;\n\telseif(is_object($x))\n\t\t$req = $x;\n\telse\n\t\t$req = (object)NULL;\n $this->init($req);\n $this->invoke();\n //var_dump($this->request);\n \n unset($req->method, $req->params, $req->uri);\n \n \n return $req;\n }", "public function serve_request()\n {\n }", "public function processRequest(ServerRequestInterface $request): int;", "public function RouteRequest ();", "public function handleRequest($request)\n {\n list ($route, $params) = $request->resolve();\n $this->requestedRoute = $route;\n $result = $this->runAction($route, $params);\n\n if ($result instanceof Response) {\n return $result;\n } elseif ($result instanceof Looper){\n $result->loop();\n\n $response = $this->getResponse();\n $response->exitStatus = 0;\n\n return $response;\n } else {\n $response = $this->getResponse();\n $response->exitStatus = $result;\n\n return $response;\n }\n }", "protected function handle(Request $request) {}", "protected function handle_request() {\r\n global $wp;\r\n $film_query = $wp->query_vars['films'];\r\n \r\n if (!$film_query) { // send all films\r\n $raw_data = $this->get_all_films();\r\n }\r\n else if ($film_query == \"featured\") { // send featured films\r\n $raw_data = $this->get_featured_films();\r\n }\r\n else if (is_numeric($film_query)) { // send film of id\r\n $raw_data = $this->get_film_by_id($film_query);\r\n }\r\n else { // input error\r\n $this->send_response('Bad Input');\r\n }\r\n\r\n $all_data = $this->get_acf_data($raw_data);\r\n $this->send_response('200 OK', $all_data);\r\n }", "public function processRequest() {\n $serviceType = $this->getServiceType();\n if(!$serviceType){return \"Invalid Call ! \\n\";}\n $repoPath = $this->getRepoName();\n if(!defined(\"__APIURL__\" . $serviceType)){\n return \"API URL not found for $serviceType\\n\";\n }\n $apiUrl = sprintf(constant(\"__APIURL__\" . $serviceType), $repoPath);\n $response = $this->makeCurlRequest($apiUrl, 'get');\n switch ($serviceType) {\n case 'github.com':\n return $this->getCountForGit($response);\n break;\n case 'bitbucket.org':\n return $this->getCountForBit($response);\n break;\n default :\n return $response;\n break;\n }\n }", "abstract function handle(Request $request, $parameters);", "protected function runLogic()\n {\n Logic::run($this->request); /* The logic to attempt to parse the request */\n }", "public function handle(Request $request);", "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 processRequest(RequestInterface $request): ControllerResultInterface;", "public static function processPageRequest($pagename,$request){\r\n\r\n }", "protected function _handle()\n {\n return $this\n ->_addData('post', $_POST)\n ->_addData('get', $_GET)\n ->_addData('server', $_SERVER)\n ->_handleRequestRoute();\n }", "public function process(array $requestHeader, array $requestBody): Transcription;", "public static function process() {}", "protected function processRequestParams(): void\n {\n $this->processLimit();\n $this->processLocale();\n }", "public function process() {}", "public function process() {}", "public function process() {}", "public function process() {}" ]
[ "0.7912653", "0.78914464", "0.78445697", "0.77872914", "0.70835525", "0.6952924", "0.6910085", "0.6880072", "0.6873851", "0.6864242", "0.6843213", "0.67507696", "0.6673425", "0.6673425", "0.6673425", "0.6590542", "0.6587248", "0.6552768", "0.65375966", "0.65201706", "0.6465682", "0.6436636", "0.637996", "0.6372611", "0.6362387", "0.63022834", "0.62986267", "0.6291776", "0.62418586", "0.6224307", "0.6219019", "0.6215702", "0.61796004", "0.616403", "0.60901266", "0.6086856", "0.60576296", "0.6027158", "0.60122967", "0.60004956", "0.5993648", "0.5992924", "0.5992888", "0.5986918", "0.5985376", "0.5971636", "0.59383434", "0.5904498", "0.58976245", "0.5895523", "0.5886139", "0.5865529", "0.5848027", "0.58407044", "0.58357596", "0.58258796", "0.5810555", "0.5790806", "0.57353157", "0.57024884", "0.56976175", "0.56955284", "0.56950545", "0.56836796", "0.56703746", "0.56470317", "0.5615245", "0.5615245", "0.5615245", "0.5615245", "0.5589081", "0.55846727", "0.5565197", "0.5561383", "0.55563277", "0.55544364", "0.5554258", "0.5553007", "0.5547903", "0.55424505", "0.55382293", "0.5519201", "0.55158097", "0.5513215", "0.5509316", "0.5502304", "0.54998106", "0.54979914", "0.54950565", "0.54950124", "0.54949987", "0.5493547", "0.54781085", "0.54700994", "0.54665416", "0.54633814", "0.5460089", "0.5459524", "0.5459524", "0.5459524" ]
0.5871973
51
take a more complete request, after processing, and invoke it after checking the parameters align extend this function if you need to provide more automatic actions related to methods in classes/instanes
private function invoke( $request ) { // if the method requested is available if ( isset( $this->method_map[$request->method] ) ) { try { // reflect the global function or method $name = $this->method_map[$request->method]; if ( is_array( $name ) ) { $reflection = new ReflectionMethod ( $name[0], $name[1] ); $object = is_object( $name[0] ) ? $name[0] : null; } elseif ( strpos( $name, '::' ) ) { list( $class, $method ) = explode( '::', $name, 2 ); $reflection = new ReflectionMethod ( $class, $method ); $object = null; } else { $reflection = new ReflectionFunction ( $name ); $object = false; } // check the parameters in the reflection against what was sent in the request $params = $this->checkParams( $reflection->getParameters(), $request->params ); if ( $object === false ) $result = $reflection->invokeArgs( $params ); else $result = $reflection->invokeArgs( $object, $params ); // return the result as an invoked call return (object) array( 'result' => $result ); } catch ( Exception $e ) { // if anything abnormal happened, capture the error code thrown $error = $e->getMessage(); } } // by this point, all we have is errors return jsonrpc2::error( isset($error) ? $error : -32601 ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function processRequest() {\n $action = \"\";\n //retrieve action from client.\n if (filter_has_var(INPUT_GET, 'action')) {\n $action = filter_input(INPUT_GET, 'action');\n }\n\n switch ($action) {\n case 'login':\n $this->login(); \n break;\n case 'register':\n $this->register(); //list all articles\n break;\n case 'search':\n $this->search(); //show a form for an article\n break;\n case 'searchList':\n $this->searchList();\n break;\n case 'remove':\n $this->removeArticle();\n break;\n case 'modify':\n $this->modifyArticle();\n break;\n case 'listCategoryForm':\n $this->listCategoryForm();\n break;\n case 'listCategory':\n $this->listCategory();\n break;\n default :\n break;\n }\n }", "public function processRequest();", "private function _processRequest()\n\t{\n\t\t// prevent unauthenticated access to API\n\t\t$this->_secureBackend();\n\n\t\t// get the request\n\t\tif (!empty($_REQUEST)) {\n\t\t\t// convert to object for consistency\n\t\t\t$this->request = json_decode(json_encode($_REQUEST));\n\t\t} else {\n\t\t\t// already object\n\t\t\t$this->request = json_decode(file_get_contents('php://input'));\n\t\t}\n\n\t\t//check if an action is sent through\n\t\tif(!isset($this->request->action)){\n\t\t\t//if no action is provided then reply with a 400 error with message\n\t\t\t$this->reply(\"No Action Provided\", 400);\n\t\t\t//kill script\n\t\t\texit();\n\t\t}\n\n\t\t//check if method for the action exists\n\t\tif(!method_exists($this, $this->request->action)){\n\t\t\t//if method doesn't exist, send 400 code and message with reply'\n\t\t\t$this->reply(\"Action method not found\",400);\n\t\t\t//kill script\n\t\t\texit();\n\t\t}\n \n\t\tswitch($this->request->action){\n\t\t\tcase \"hello\":\n\t\t\t\t$this->hello($this->request->data);\n\t\t\t\tbreak;\n\t\t\tcase \"submit_video\":\n\t\t\t\t//error_log(\"formSubmit has been sent through\");\n\t\t\t\t$this->submit_video($this->request, $_FILES);\n\t\t\t\tbreak;\n\t\t\tcase \"remove_video\":\n\t\t\t\t//error_log(\"formSubmit has been sent through\");\n\t\t\t\t$this->remove_video($this->request);\n\t\t\t\tbreak;\n\t\t\tcase \"isSubmitted\":\n\t\t\t\t$this->isSubmitted($this->request);\n\t\t\tdefault:\n\t\t\t\t$this->reply(\"action switch failed\",400);\n\t\t\tbreak;\n\t\t}\n\n\n\n\t}", "abstract public function processRequest();", "public abstract function processRequest();", "public function runRequest() {\n }", "abstract public function request();", "public function executeRequest() {\n $this->splitURL();\n $this->validateRequest();\n\n // Create controller to dispatch our request, eg new BlogsController\n // Note format eg $dispatch = new BlogsController('Blog', 'blogs', 'index')\n $model = ucwords(rtrim($this->controller, 's'));\n $controller = ucwords($this->controller) . 'Controller';\n $dispatch = new $controller($model, $this->controller, $this->action);\n\n // Execute\n if (!isset($this->parameter1)) {\n call_user_func(array($dispatch, $this->action));\n } else if (!isset($this->parameter2)) {\n call_user_func(array($dispatch, $this->action), $this->parameter1);\n } else if (!isset($this->parameter3)) {\n call_user_func(array($dispatch, $this->action), $this->parameter1, $this->parameter2);\n } else {\n call_user_func(array($dispatch, $this->action), $this->parameter1, $this->parameter2, $this->parameter3);\n }\n }", "public function processApi() {\n\n $func = strtolower(trim(str_replace(\"/\", \"\", $_REQUEST['rquest'])));\n\n if ((int) method_exists($this, $func) > 0) {\n $this->$func();\n } else {\n $this->response('Method not Found', 404); // If the method not exist with in this class, response would be \"Page not found\".*/\n\t}\n\n }", "protected function _request() {}", "private function processRequest()\n\t{\n\t\t\n\t\t$request = NEnvironment::getService('httpRequest');\n\t\t\n\t\tif ($request->isPost() && $request->isAjax() && $request->getHeader('x-callback-client')) { \n\t\t\t\n\t\t\t$data = json_decode(file_get_contents('php://input'), TRUE);\n\t\t\tif (count($data) > 0) {\n\t\t\t\tforeach ($data as $key => $value) {\n\t\t\t\t\tif (isset($this->items[$key]) && isset($this->items[$key]['callback']) && $value === TRUE) {\n\t\t\t\t\t\t$this->items[$key]['callback']->invokeArgs($this->items[$key]['args']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tdie(json_encode(array('status' => \"OK\")));\n\t\t}\n\t\t\n\t}", "public function processApi() {\n $func = strtolower(trim(str_replace(\"/\", \"\", $_REQUEST['request'])));\n if ((int) method_exists($this, $func) > 0)\n $this->$func();\n else\n $this->response('', 404); // If the method not exist with in this class, response would be \"Page not found\".\n }", "abstract function do_api_request();", "public function DispatchRequest ();", "public function processApi(){\n\t\t$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['rquest'])));\n\t\tif((int)method_exists($this,$func) > 0)\n\t\t\t$this->$func();\n\t\telse\n\t\t\t$this->response('',404);\t// If the method not exist with in this class, response would be \"Page not found\".\n\t}", "public function processApi(){\n\t\t\t$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['rquest'])));\n\t\t\tif((int)method_exists($this,$func) > 0)\n\t\t\t\t$this->$func();\n\t\t\telse\n\t\t\t\t$this->response('',404);\t\t\t\t// If the method not exist with in this class, response would be \"Page not found\".\n\t\t}", "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}", "public function processApi() {\n\t\t$func = strtolower(trim(str_replace(\"/\", \"\", $_REQUEST['rquest'])));\n\t\tif ((int) method_exists($this, $func) > 0)\n\t\t\t$this -> $func();\n\t\telse\n\t\t\t$this -> response('', 404);\n\t\t// If the method not exist with in this class, response would be \"Page not found\".\n\t}", "public function processApi() {\n\t\t$func = strtolower(trim(str_replace(\"/\", \"\", $_REQUEST['rquest'])));\n\t\tif ((int) method_exists($this, $func) > 0)\n\t\t\t$this -> $func();\n\t\telse\n\t\t\t$this -> response('', 404);\n\t\t// If the method not exist with in this class, response would be \"Page not found\".\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 processApi(){\n\t\t\t$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['x'])));\n//echo $func;\t\n\t\t\tif((int)method_exists($this,$func) > 0)\n\t\t\t\t$this->$func();\n\t\t\telse\n\t\t\t\t$this->response('',404); // If the method not exist with in this class \"Page not found\".\n\t\t}", "public function processApi(){\n $func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['rquest'])));\n if((int)method_exists($this,$func) > 0)\n $this->$func();\n else\n $this->response('',404);\t\t\t\t// If the method not exist with in this class, response would be \"Page not found\".\n }", "abstract function _do_execute(request $request);", "public function processRequest()\n\t\t{\n\t\t\t$request_method = strtolower($_SERVER['REQUEST_METHOD']);\n\t\t\tswitch ($request_method)\n\t\t\t{\n\t\t\t\tcase 'get':\n\t\t\t\t\t$data = $_GET['url'];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'post':\n\t\t\t\t\t$data = $_GET['url'];\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$request_parts = explode('/', $data);\n\t\t\t$controller = $request_parts[0];\n\t\t\tswitch ($controller)\n\t\t\t{\n\t\t\t\tcase 'ad':\n\t\t\t\t\tprocessAdRequest(substr($data, strlen('ad')+1));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'category':\n\t\t\t\t\tprocessCategoryRequest(substr($data, strlen('category')+1));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'user':\n\t\t\t\t\tprocessUserRequest(substr($data, strlen('user')+1));\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\techo \"Invalid Request!\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}", "protected function runLogic()\n {\n Logic::run($this->request); /* The logic to attempt to parse the request */\n }", "public function requests()\n\t{\n\t\t$this->checkRequest();\n\t\t$this->getResponse();\n\t}", "public function processApi(){\n\t\t$words = explode(\"/\",$_REQUEST['rquest']);\n\t\t$func = strtolower(trim(str_replace(\"/\",\"\",$words[0])));\n\t\t\n \t\tif(strcmp(\"services\",$func) == 0)\n\t\t\t$this->$func($words[1],$words[2]);\t// you can set as many levels as you want\n\t\telse\n\t\t\t$this->response('',404);\t// response would be \"Page not found\"\n\t}", "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 function processApi(){\n\t\t\t$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['x'])));\n\t\t\tif((int)method_exists($this,$func) > 0) {\n $this->$func();\n }\n\t\t\telse {\n $this->response('',404); // If the method not exist with in this class \"Page not found\". \n }\n\t\t\t\t\n\t\t}", "public function process()\n\t{\n\t\t$action = $this->getAction();\n\t\tswitch (strtolower($action))\n\t\t{\n\t\t\tcase 'get':\n\t\t\tcase 'put':\n\t\t\tcase 'post':\n\t\t\tcase 'delete':\n\t\t}\t\n\t}", "public function processApi()\n {\n $func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['mode'])));\n if((int)method_exists($this,$func) > 0)\n {\n $this->$func();\n } \n else\n {\n $data = array('code' => \"404\", 'status' => \"failure\", \"msg\" => \"requested method not available\", \"data\" => array());\n $this->response($this->json($data)); \n }\n \n // If the method not exist with in this class, response would be \"Page not found\".\n }", "public function processApi(){\n\t\t\t$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['value'])));\n\t\t\tif((int)method_exists($this,$func) > 0)\n\t\t\t\t$this->$func();\n\t\t\telse\n\t\t\t\t$this->response('',404);\t\t\t\t// If the method not exist with in this class, response would be \"Page not found\".\n\t\t}", "public function processRequest() {\r\n switch($this->requestMethod) {\r\n case 'GET':\r\n if($this->id) {\r\n $response = $this->get($this->id);\r\n }\r\n else {\r\n $response = $this->getAll();\r\n }\r\n break;\r\n case 'POST':\r\n $response = $this->create();\r\n break;\r\n case 'PUT':\r\n $response = $this->update($this->id);\r\n break;\r\n case 'DELETE':\r\n $response = $this->delete($this->id);\r\n break;\r\n case 'OPTIONS':\r\n break;\r\n default:\r\n $response = $this->notFoundResponse();\r\n break;\r\n }\r\n\r\n header($response['status_code_header']);\r\n\r\n // If there is a body then echo it\r\n if($response['body']) {\r\n echo $response['body'];\r\n }\r\n }", "public function interpretRequest($request)\n {\n\n $this->updtv = $request->param('updtv',Validator::BOOLEAN);\n\n // startpunkt des pfades für die acls\n if ($aclRoot = $request->param('a_root', Validator::CKEY))\n $this->aclRoot = $aclRoot;\n\n // die id des Datensatzes von dem aus der Pfad gestartet wurde\n if ($aclRootId = $request->param('a_root_id', Validator::INT))\n $this->aclRootId = $aclRootId;\n\n // der key des knotens auf dem wir uns im pfad gerade befinden\n if ($aclKey = $request->param('a_key', Validator::CKEY))\n $this->aclKey = $aclKey;\n\n // der neue knoten\n if ($aclNode = $request->param('a_node', Validator::CKEY))\n $this->aclNode = $aclNode;\n\n // an welchem punkt des pfades befinden wir uns?\n if ($aclLevel = $request->param('a_level', Validator::INT))\n $this->aclLevel = $aclLevel;\n\n // request elemet type, bei back to top ist es relevant zu wissen woher der\n // aufruf kam (in diesem fall von einem input)\n // könnte bei referenzen auch interessant werden\n // values: inp | ref\n //if ($requestedBy = $request->param('rqtby', Validator::TEXT))\n // $this->requestedBy = $requestedBy;\n\n // sprungpunkt für back to top\n if ($maskRoot = $request->param('m_root', Validator::TEXT))\n $this->maskRoot = $maskRoot;\n\n // the publish type, like selectbox, tree, table..\n if ($publish = $request->param('publish', Validator::CNAME))\n $this->publish = $publish;\n\n // if of the target element, can be a table, a tree or whatever\n if ($targetId = $request->param('target_id', Validator::CKEY))\n $this->targetId = $targetId;\n\n // callback for a target function in thr browser\n if ($target = $request->param('target', Validator::CKEY))\n $this->target = $target;\n\n // target mask key\n if ($targetMask = $request->param('target_mask', Validator::CNAME))\n $this->targetMask = $targetMask;\n\n if ($parentMask = $request->param('pmsk', Validator::TEXT))\n $this->parentMask = $parentMask;\n\n\n\n // mask key\n if ($viewId = $request->param('view_id', Validator::CKEY))\n $this->viewId = $viewId;\n\n // mask key\n if ($viewType = $request->param('view', Validator::CNAME))\n $this->viewType = $viewType;\n\n // soll die maske neu geladen werden?\n //if ($reload = $request->param('reload', Validator::BOOLEAN))\n // $this->reload = $reload;\n\n // target mask key\n if ($refId = $request->param('refid', Validator::INT))\n $this->refId = $refId;\n\n // listing type\n if ($ltype = $request->param('ltype', Validator::CNAME))\n $this->ltype = $ltype;\n\n // context\n if ($context = $request->param('context', Validator::CNAME))\n $this->context = $context;\n\n // parameter zum fixieren des Contexts\n // wird verwendet um zwischen \"unterschiedliche\" Masken mit dem gleichen\n // viewnamen zu switchen\n if ($cntk = $request->param('cntk', Validator::CKEY))\n $this->contextKey = $cntk;\n\n // mask switcher key\n // wird nur in der view gesetzt wenn der mask switcher vorhanden ist\n if ($cntms = $request->param('cntms', Validator::CNAME))\n $this->contextMaskSwt = $cntms;\n\n\n // per default\n $this->categories = [];\n\n }", "public function processRequest()\n {\n $params = json_decode(file_get_contents('php://input'),true);\n\n if ( $_POST [ 'action' ] == 'setScreenVars' )\n {\n $this->setScreenVars();\n\n } \n elseif ( $_POST [ 'action' ] == 'loadHero' )\n\n {\n $this->loadHero();\n\n } \n elseif ( $_POST [ 'action' ] == 'loadThumb' )\n\n {\n $this->loadThumb();\n\n } \n elseif ( $_POST [ 'action' ] == 'setScreenVars' )\n\n {\n $this->setScreenVars();\n }\n //this one sent from angular, use $params\n elseif ( $params [ 'action' ] == 'getSiteData' )\n {\n $this->getSiteData();\n }\n elseif ( $_POST [ 'action' ] == 'contactFormSubmit' )\n {\n $this->contactFormSubmit();\n }\n else \n {\n\n if ( $_SESSION['user']['access'] == '2' ) {\n if ( $_POST [ 'action' ] == 'sortUpdate' )\n {\n $this->sortUpdate();\n }\n elseif ( $_POST [ 'action' ] == 'imgStatusUpdate' )\n {\n $this->imgStatusUpdate();\n }\n elseif ( $_POST [ 'action' ] == 'deleteImage' )\n {\n $this->deleteImage();\n }\n elseif ( $_POST [ 'action' ] == 'saveCaption' )\n {\n $this->saveCaption();\n }\n }\n else \n {\n //no action requested, just notifify this file being accessed\n echo ( 'ajax file' );\n } \n }\n\n }", "private function invoke() {\n global $user;\n $req =& $this->request;\n try {\n\n if ($req) {\n if (isset($req->uri) && preg_match(\"/^([^\\?]*)(\\?(.*))?$/\", $req->uri, $match)) {\n $this->q = $match[1];\n parse_str($match[3], $_GET);\n }\n }\n \n if (isset($req) && !is_object($req))\n throw new Exception(\"Invalid Request.\", -32600);\n \n \n if (!preg_match(\"/^(?:(\\D\\w*)[\\.\\/])?(\\D\\w*)\\/?(.*)$/\", $this->q, $match))\n throw new Exception(\"Invalid Request.\", -32600);\n \n list(, $c, $m, $a) = $match;\n \n\t\t\n\t\t//if (!$c)\n\t\t//\t$c = jsonrpc_load_class_by_method($m, TRUE);\n \n\n\t\t\n \n if (!($c && class_exists($c, FALSE))) {\n $c = jsonrpc_load_class($c, $m, TRUE);\n }\n \n if (isset($a) && is_string($a) && FALSE !== strpos($a, ','))\n $a = explode(',', $a);\n if (isset($_GET['id']))\n $req->id = $_GET['id'];\n $is_super = $user->uid == 1;\n if ($user->uid == 0 && $_SERVER['REMOTE_ADDR'] == '127.0.0.1' && !isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n $is_super = TRUE;\n $user->uid = 1;\n }\n \n //echo $c;\n \n if (!method_exists($c, $m))\n throw new Exception('Method does not exists.', -32601);\n if (variable_get('site_offline', 0) && !$is_super)\n throw new Exception('Site if offline');\n $refl = new ReflectionMethod($c, $m);\n \n\t//$args = array();\n \n if (!isset($req->params)) {\n if ($a)\n $args = $a;\n elseif (isset($_GET['params']))\n $args = explode(',', $_GET['params']);\n elseif (isset($_GET['param']))\n $args = explode(',', $_GET['param']);\n }\n else\n $args = $req->params;\n \n //if(!is_array($args))\n \t\n\n\t//var_dump(count($args) <= $refl->getNumberOfParameters());\n\n //if ($refl->getNumberOfRequiredParameters() <= 1 && is_array($args) && count($args) > $refl->getNumberOfParameters() )\n \n //if($refl->getNumberOfRequiredParameters\n \n $np = $refl->getNumberOfParameters();\n $nr = $refl->getNumberOfRequiredParameters();\n\n\t\t//if ($np == 1 && count($args)\n//var_dump($args);\n//die;\n \n \n \n if ($nr <= 1 && !(is_array($args) && count($args) == $np && $np > 1 ) && isset($req->params))\n $args = array($args);\n\n\n//var_dump($args);\n\n switch (TRUE) {\n case $refl->isStatic():\n $req->result = call_user_func_array(array($c, $m), $args);\n break;\n case $refl->isPublic():\n $inst = $this->instance($c);\n $req->result = call_user_func_array(array($inst, $m), $args);\n break;\n case $refl->isProtected() && $is_super:\n $refl->setAccessible(TRUE);\n $req->result = $refl->invokeArgs(new $c, $args);\n break;\n default:\n throw new Exception(\"Method not found or permission denied on launching $c::$m.\");\n }\n } catch (Exception $e) {\n if (!is_object($req))\n $req = $this->request = (object)NULL;\n $data = isset($e->data) ? $e->data : get_class($e);\n $req->error = array('code' => $e->getCode(), 'message' => $e->getMessage(), 'data' => $data);\n }\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 processApi()\n {\n $data = array('404'=>'requested method not available');\n $func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['mode'])));\n if((int)method_exists($this,$func) > 0)\n $this->$func();\n else\n $this->response($this->json($data),'404');\n // If the method not exist with in this class, response would be \"Page not found\".\n }", "function process_request($config = array())\n\t{\n\t\t$this->_initialize($config);\n\n\t\t$type = ee()->input->get('action');\n\n\t\tswitch($type)\n\t\t{\n\t\t\tcase 'setup':\n\t\t\t\t$this->setup();\n\t\t\t\tbreak;\n\t\t\tcase 'setup_upload':\n\t\t\t\t$this->setup_upload();\n\t\t\t\tbreak;\n\t\t\tcase 'directory':\n\t\t\t\t$this->directory(ee()->input->get('directory'), TRUE);\n\t\t\t\tbreak;\n\t\t\tcase 'directories':\n\t\t\t\t$this->directories(TRUE);\n\t\t\t\tbreak;\n\t\t\tcase 'directory_contents':\n\t\t\t\t$this->directory_contents();\n\t\t\t\tbreak;\n\t\t\tcase 'directory_info':\n\t\t\t\t$this->directory_info();\n\t\t\t\tbreak;\n\t\t\tcase 'file_info':\n\t\t\t\t$this->file_info();\n\t\t\t\tbreak;\n\t\t\tcase 'upload':\n\t\t\t\t$this->upload_file(ee()->input->get_post('upload_dir'), FALSE, TRUE);\n\t\t\t\tbreak;\n\t\t\tcase 'edit_image':\n\t\t\t\t$this->edit_image();\n\t\t\t\tbreak;\n\t\t\tcase 'ajax_create_thumb':\n\t\t\t\t$this->ajax_create_thumb();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\texit('Invalid Request');\n\t\t}\n\t}", "public function prepareRequest()\r\n {\r\n\r\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\n $this->parseRequestHeaders();\n\n $uri = $this->loadUrl(); // Loads the called URL\n String::arrayTrimNumericIndexed($uri); // Trim the URL array indexes\n\n /**\n * When server is running as a RESTful server\n */\n if (RESTFUL == '1') {\n RestServer::runRestMethod($uri);\n $this->terminate();\n }\n\n /**\n * When the request is not running over ajax,\n * then call the home for full page rendering\n * before calling the requested method\n */\n if (!$this->isAjax()) {\n\n $this->controller = $this->requireHome();\n $this->controller->itStarts($uri);\n $this->terminate();\n }\n\n /**\n * Normal Ajax Request, call the method only\n */\n $this->runMethod($uri);\n $this->terminate();\n }", "public function processApi(){\n\t$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['x'])));\n\tif((int)method_exists($this,$func) > 0)\n\t\t$this->$func();\n\telse\n\t\t$this->response('',404); // If the method not exist with in this class \"Page not found\".\n}", "public static function process_http_request()\n {\n }", "function processRequest(){\n\tglobal $muse; // App settings & database\n\tglobal $HTTP_RAW_POST_DATA;\n\t\n\t// Get the user's posted action\n\t$muse['actionRequestRaw'] = $HTTP_RAW_POST_DATA;\n\t$muse['actionRequest'] = $muse['db']->real_escape_string(trim($HTTP_RAW_POST_DATA));\n\t// First word of action request will be the action keyword.\n\t$muse['actionKeyword'] = strtolower(substr( $muse['actionRequest'], 0, strpos( $muse['actionRequest'], \" \" ) ) );\n\t\n\t// If it's only one word, through it back in. Capatlization issues?\n\tif ($muse['actionKeyword']==false) {\n\t\t$muse['actionKeyword'] = $muse['actionRequest'];\n\t}\n}", "function process_request() {\n\t\tglobal $publishthis;\n\n\t\ttry{\n\n\t\t\t$bodyContent = '';\n\n\t\t\tif ( function_exists( 'wpcom_vip_file_get_contents' ) ) {\n\t\t\t\t$bodyContent = wpcom_vip_file_get_contents( 'php://input', 10, 60 );\n\t\t\t} else {\n\t\t\t\t$bodyContent = file_get_contents( 'php://input' );\n\t\t\t}\n\n\t\t\t$publishthis->log->addWithLevel( array( 'message' => 'Endpoint Request', 'status' => 'info', 'details' => $bodyContent ), \"2\" );\n\n\t\t\t$arrEndPoint = json_decode( $bodyContent, true );\n\n\t\t\t$action = $arrEndPoint[\"action\"];\n\n\t\t\t$pt_settings = $publishthis->get_options();\n\n\t\t\tif( !in_array( $action, array('resetState', 'stopEndpoint', 'resumeEndpoint') ) ) {\n\t\t\t\t$manually_stopped = get_option( 'pt_import_manually_stopped' );\n\t\t\t\tif ( $manually_stopped == 1 ) {\n\t\t\t\t\t$this->sendFailure('Import manually stopped');\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tswitch( $action ) {\n\t\t\t\tcase \"verify\":\n\t\t\t\t\t$this->actionVerify();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"publish\":\n\t\t\t\t\tif( $publishthis->get_option( 'curated_publish' ) != 'import_from_manager' ) {\n\t\t\t\t\t\t$this->sendFailure( \"Publishing through CMS is disabled\" );\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t$feedId = intval( $arrEndPoint[\"feedId\"], 10 );\n\t\t\t\t\t$pageNum = intval( $arrEndPoint[\"pageNum\"], 10 );\n\t\t\t\t\t$importId = $arrEndPoint[\"importId\"];\n\n\t\t\t\t\t$this->actionPublish2( $feedId, $pageNum, $importId );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"getAuthors\":\n\t\t\t\t\t$this->actionGetAuthors();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"getCategories\":\n\t\t\t\t\t$this->actionGetCategories();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"resetState\":\n\t\t\t\t\t$this->resetState();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"stopEndpoint\":\n\t\t\t\t\t$this->stopEndpoint();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"resumeEndpoint\":\n\t\t\t\t\t$this->resumeEndpoint();\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\t$this->sendFailure( \"Empty or bad request made to endpoint\" );\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t} catch( Exception $ex ) {\n\t\t\t//we will log this to the pt logger, but we always need to send back a failure if this occurs\n\n\t\t\t$this->sendFailure( $ex->getMessage() );\n\t\t}\n\n\t\treturn;\n\t}", "function parse_request(){\n\t\tparent::parse_request();\n\n\t\tif (isset($_GET[\"posStart\"]) && isset($_GET[\"count\"]))\n\t\t\t$this->request->set_limit($_GET[\"posStart\"],$_GET[\"count\"]);\n\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}", "protected function processRequestParams(): void\n {\n $this->processLimit();\n $this->processLocale();\n }", "public static function process($request){\r\n\t\tcall_user_func($request -> action, $request -> params);\r\n\t}", "public function processApi(){\n\t\tif(isset($_REQUEST['x']) && $_REQUEST['x']!=\"\"){\n\t\t\t$func = strtolower(trim(str_replace(\"/\",\"\", $_REQUEST['x'])));\n\t\t\tif((int)method_exists($this,$func) > 0) {\n\t\t\t\t$this->$func();\n\t\t\t} else {\n\t\t\t\techo 'processApi - method not exist';\n\t\t\t\texit;\n\t\t\t}\n\t\t} else {\n\t\t\techo 'processApi - method not exist';\n\t\t\texit;\n\t\t}\n\t}", "private function requestProcessor() {\n try {\n\n if (empty($this->uri))\n throw new \\Exception(\"Undefined url\");\n\n $ReqHandle = curl_init($this->uri);\n\n $body = json_encode([]);\n if( sizeof($this->data) > 0 )\n $body = json_encode($this->data);\n\n $returnTransfer = 0;\n if( $this->hasResponseToReturn )\n $returnTransfer = 1;\n\n $isPost = 0;\n if( $this->method != 'GET')\n $isPost = 1;\n\n\n if($isPost == 1){\n curl_setopt($ReqHandle,CURLOPT_POST, $isPost);\n curl_setopt($ReqHandle, CURLOPT_POSTFIELDS, $body);\n }\n \n curl_setopt_array($ReqHandle, [\n CURLOPT_RETURNTRANSFER => $returnTransfer,\n CURLOPT_HTTPHEADER => $this->headersToBeUsed\n ]);\n\n\n $result = curl_exec($ReqHandle);\n\n if(curl_errno($ReqHandle)){\n\n return curl_error($ReqHandle);\n }\n\n if($returnTransfer == 1)\n return json_decode($result);\n\n\n\n } catch (\\Throwable $t) {\n new ErrorTracer($t);\n }\n }", "public function doRequests();", "public function request();", "function rest_do_request($request)\n {\n }", "public function processApi() {\r\n\tif($this->securedRest){\r\n\t if(!isset($this->requestSecure) || !isset($this->requestPublicKey)){\r\n\t\t$this->response('Utilisateur non authentifié', 401);\r\n\t }\r\n\t if(!$this->verifyKeys($this->requestPublicKey, $this->requestSecure)){\r\n\t\t$this->response('Utilisateur non authentifié', 401);\r\n\t }\r\n\t}\r\n\t\r\n\t$func = $this->_method;\r\n\tif ((int) method_exists($this, $func) > 0){\r\n\t $this->$func();\r\n\t}else{\r\n\t $this->response('', 404);\r\n\t}\r\n\t\r\n }", "protected abstract function handleRequest();", "abstract function doExecute($request);", "public function prepareRequest()\n {\n }", "abstract public function handle_request();", "public function _dispatch($request)\n\t{\n\t\t$this->_data = $_POST;\n\t\t$args = array();\n\t\t\n\t\ttry {\n\t\t\t$method = new ReflectionMethod($this, $request['action']);\n\t\t\tif (!$method->isPublic()) {\n\t\t\t\tAtomik::trigger404();\n\t\t\t}\n\t\t\t\n\t\t\t$docBlock = $method->getDocComment();\n\t\t\tif (preg_match_all('/@route (.+)$/m', $docBlock, $matches)) {\n\t\t\t\t/* default route parameters */\n\t\t\t\t$default = array(\n\t\t\t\t\t'controller' => $request['controller'], \n\t\t\t\t\t'action' => $request['action']\n\t\t\t\t);\n\t\t\t\t/* fetching optional parameters to the method to add them to\n\t\t\t\t * the default array */\n\t\t\t\tforeach ($method->getParameters() as $param) {\n\t\t\t\t\tif ($param->isOptional()) {\n\t\t\t\t\t\t$default[$param->getName()] = $param->getDefaultValue();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* route base */\n\t\t\t\t$base = $request['controller'] . '/' . $request['action'] . '/';\n\t\t\t\t\n\t\t\t\t/* building routes */\n\t\t\t\t$routes = array();\n\t\t\t\tfor ($i = 0, $c = count($matches[0]); $i < $c; $i++) {\n\t\t\t\t\t$routes[$base . $matches[1][$i]] = $default;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* re-routing request */\n\t\t\t\tif (($request = Atomik::route(Atomik::get('request_uri'), $_GET, $routes)) === false) {\n\t\t\t\t\tAtomik::trigger404();\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\t/* building method parameters using request params */\n\t\t\tforeach ($method->getParameters() as $param) {\n\t\t\t\tif (array_key_exists($param->getName(), $request)) {\n\t\t\t\t\t$args[] = $request[$param->getName()];\n\t\t\t\t} else if (!$param->isOptional()) {\n\t\t\t\t\tthrow new Exception('Missing parameter ' . $param->getName());\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception $e) {\n\t\t\t/* do not stop if __call() exist, so it allows us to trap method calls */\n\t\t\tif (!method_exists($this, '__call')) {\n\t\t\t\tAtomik::trigger404();\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->_params = $request;\n\t\t\n\t\t$this->_before();\n\t\tcall_user_func_array(array($this, $request['action']), $args);\n\t\t$this->_after();\n\t\t\n\t\t/* gets the instance properties and sets them in the global scope for the view */\n\t\t$vars = array();\n\t\tforeach (get_object_vars($this) as $name => $value) {\n\t\t\tif (substr($name, 0, 1) != '_') {\n\t\t\t\t$vars[$name] = $value;\n\t\t\t}\n\t\t}\n\t\treturn $vars;\n\t}", "protected function handleRequest() {\n\t\t$delegate = $this->extractDelegate();\n\t\t$command = $this->extractCommand();\n\t\t$params = $this->getRequest()->parameters;\n\t\tif( !$params || !is_array( $params ) )\n\t\t\t$params = array();\n\n\t\tif( $this->_verbose ) {\n\t\t\t$this->set( '_command', $command );\n\t\t\t$this->set( '_delegate', $delegate );\n\t\t\t$this->set( '_parameters', $params );\n\t\t}\n\n\t\t$params = array( $params );\n\t\ttry {\n\t\t\tif( $delegate ) {\n\t\t\t\t$Framework = $this->getFramework( $delegate, false );\n\t\t\t\tif( $Framework ) {\n\t\t\t\t\t$result = $Framework->callHooks( $command, $params );\n\t\t\t\t\tif( is_array( $result ) && count( $result ) == 1 )\n\t\t\t\t\t\treturn current( $result );\n\t\t\t\t\treturn $result;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse\n\t\t\t\treturn call_user_func_array( array($this, $this->getCommand()), $params );\n\t\t}\n\t\tcatch( NotAuthorizedException $Exception ) {\n\t\t\t$this->set( 'error', $Exception->getMessage() );\n\t\t\t$this->set( 'trace', $Exception->getTraceAsString() );\n\t\t\treturn false;\n\t\t}\n\t\tcatch( NotPrivilegedException $Exception ) {\n\t\t\t$this->set( 'error', $Exception->getMessage() );\n\t\t\t$this->set( 'trace', $Exception->getTraceAsString() );\n\t\t\treturn false;\n\t\t}\n\t}", "public function run()\n {\n $requested_url = explode('/', $this->requestUrl);\n\n if (!empty($this->definedRoutes[$this->requestMethod])) {\n foreach ($this->definedRoutes[$this->requestMethod] as $route => $action) {\n $route = explode('/', $route);\n $route_depth = count($route);\n\n // Check for defined route parameters\n for( $i = 0; $i < $route_depth; $i++) {\n if (preg_match('/\\{([\\w?]+?)\\}/',$route[$i])) {\n if (isset($requested_url[$i])) {\n array_push($this->requestParameters, $requested_url[$i]);\n // replace defined route parameters with peer request url parameter for final comparison\n $route[$i] = $requested_url[$i];\n }\n }\n }\n\n // Check for unreplaced route parameters and delete them if are optional parameters (for final comparison)\n for ($j = 0; $j < $route_depth; $j++) {\n if (preg_match('/\\{([\\w]+?)\\?}/', $route[$j])) {\n unset($route[$j]);\n }\n }\n\n $route = implode('/', $route);\n\n // Final comparision. Check requested url is equal to current checking route\n if ($route == $this->requestUrl) {\n $this->matched = true;\n\n if ($action instanceof Closure) {\n return call_user_func_array($action, $this->requestParameters);\n } else if($this->isController($action)) {\n return $this->loadController($action);\n } else {\n throw new Exception('Invalid action for route');\n }\n break; // Route found, stop the operations\n } else {\n $this->reset();\n }\n }\n }\n\n if ($this->matched === false) {\n return $this->exception->notFound();\n }\n }", "public function processRequest() {\n $this->server->service($GLOBALS['HTTP_RAW_POST_DATA']);\n }", "abstract protected function process(Request $request);", "public function request()\n {\n }", "public function request()\n {\n }", "public function exec () {\r\n\t\t$a = isset($_GET['action']) ? $_GET['action'] : 'capa';\r\n\t\tswitch ($a) {\r\n\t\t\tcase 'capa':\r\n\t\t\t\t$this->capa();\r\n\t\t\tbreak;\r\n\t\t\tcase 'adicionar':\r\n\t\t\t\t$this->adicionar();\r\n\t\t\tbreak;\r\n\t\t\tcase 'alterar':\r\n\t\t\t\t$this->alterar();\r\n\t\t\tbreak;\r\n\t\t\tcase 'detalhar':\r\n\t\t\t\t$this->detalhar();\r\n\t\t\tbreak;\r\n\t\t\tcase 'excluir':\r\n\t\t\t\t$this->excluir();\r\n\t\t\tbreak;\r\n\t\t\tcase 'sair':\r\n\t\t\t\t$this->sair();\r\n\t\t\tbreak;\r\n\t\t} \r\n\t}", "public function requestAction()\n {\n }", "function handleRequest() ;", "abstract public function populateRequest(PHPFrame_Request $request);", "function request()\n {\n }", "public function parseCurrentRequest()\n {\n // If 'action' is post, data will only be read from 'post'\n if ($action = $this->request->post('action')) {\n die('\"post\" method action handling not implemented');\n }\n \n $action = $this->request->get('action') ?: 'home';\n \n if ($response = $this->actionHandler->trigger($action, $this)) {\n $this->getResponder()->send($response);\n } else {\n die('404 not implemented');\n }\n }", "public function parse_call() {\r\n\t\t$this->spoof_check();\r\n\t\tif (count($this->request) == $this->max_requests\r\n\t\t\r\n\t\t)\r\n\t\t\texit();\r\n\t\tif (!$this->match_server($this->request['host'])) {\r\n\t\t\techo \"Fatal Error: Your address is unknown\";\r\n\t\t\texit();\r\n\t\t}\r\n\t\telse if (!$this->match_server($this->request['server'])) {\r\n\t\t\techo \"Fatal Error: Target address unknown\";\r\n\t\t\texit();\r\n\t\t}\r\n\t\t\r\n\t\t$host = $this->request['host'];\r\n\t\t$this->disassemble_IP($host);\r\n\t\t$this->get_user_queue();\r\n\t\t$this->users[] = $this->request['session'];\r\n\t\t$this->patch_connection();\r\n\t}", "public function process_request() {\n if(!empty($this->POST)) {\n return $this->handlePOST();\n } else {\n return $this->handleGET();\n }\n }", "public function postExecution($request){}", "public function invoke() {\r\n $this->action = Util::getAction($this->action);\r\n \r\n switch ($this->action) {\r\n case 'customer_login':\r\n $this->processCustomerLogin();\r\n break;\r\n case 'get_customer':\r\n $this->processGetCustomer();\r\n break;\r\n case 'show_registration':\r\n $this->processShowRegistration();\r\n break;\r\n case 'register_product':\r\n $this->processRegisterProduct();\r\n break;\r\n case 'logout':\r\n $this->processLogout();\r\n break;\r\n default:\r\n $this->processCustomerLogin();\r\n break;\r\n }\r\n }", "protected function forwardToReferringRequest() {}", "private function resolveRequest(){\n\t\t$controllers_dir = puppy::getAppDir().'controllers';\n\t\t$path_segments = explode('/', $this->getPathInfo());\n\t\t\n\t\t$controller_location = null;\n\t\t$controller_name = null;\n\t\t$action_name = null;\n\t\t\n\t\t//build path to controller\n\t\t$build_path = $controllers_dir;\n\t\tforeach($path_segments as $k => $dir){\n\t\t\t$build_path = $build_path.'/'.$dir;\n\t\t\tif(file_exists($build_path.\"/\")){\n\t\t\t\tif(is_dir($build_path)){\n\t\t\t\t\t$controller_location = $build_path;\n\t\t\t\t\tif(is_file($build_path.'/'.$dir.'.php')){\n\t\t\t\t\t\t$controller_name = $dir;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$action_name = $dir;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//call action\n\t\tif(file_exists($controller_location.'/'.$controller_name.'.php')){\n\t\t\t//wrap require in try catch to state file has error\n\t\t\trequire_once($controller_location.'/'.$controller_name.'.php');\n\t\t\t$controller = new $controller_name();\n\t\t\tif($action_name !== null)\n\t\t\t\t$controller->$action_name();\n\t\t}\n\t}", "function processRequests()\n\t{\n\n\t\t$requestMode = -1;\n\t\t$sFunctionName = \"\";\n\t\t$bFoundFunction = true;\n\t\t$bFunctionIsCatchAll = false;\n\t\t$sFunctionNameForSpecial = \"\";\n\t\t$aArgs = array();\n\t\t$sPreResponse = \"\";\n\t\t$bEndRequest = false;\n\t\t$sResponse = \"\";\n\n\t\t$requestMode = $this->getRequestMode();\n\t\tif ($requestMode == -1) return;\n\n\t\tif ($requestMode == XAJAX_POST)\n\t\t{\n\t\t\t$sFunctionName = $_POST[\"xajax\"];\n\n\t\t\tif (!empty($_POST[\"xajaxargs\"]))\n\t\t\t\t$aArgs = $_POST[\"xajaxargs\"];\n\t\t}\n\t\telse\n\t\t{\n\t\t\theader (\"Expires: Mon, 26 Jul 1997 05:00:00 GMT\");\n\t\t\theader (\"Last-Modified: \" . gmdate(\"D, d M Y H:i:s\") . \" GMT\");\n\t\t\theader (\"Cache-Control: no-cache, must-revalidate\");\n\t\t\theader (\"Pragma: no-cache\");\n\n\t\t\t$sFunctionName = $_GET[\"xajax\"];\n\n\t\t\tif (!empty($_GET[\"xajaxargs\"]))\n\t\t\t\t$aArgs = $_GET[\"xajaxargs\"];\n\t\t}\n\n\t\t// Use xajax error handler if necessary\n\t\tif ($this->bErrorHandler) {\n\t\t\t$GLOBALS['xajaxErrorHandlerText'] = \"\";\n\t\t\tset_error_handler(\"xajaxErrorHandler\");\n\t\t}\n\n\t\tif ($this->sPreFunction) {\n\t\t\tif (!$this->_isFunctionCallable($this->sPreFunction)) {\n\t\t\t\t$bFoundFunction = false;\n\t\t\t\t$objResponse = new xajaxResponse();\n\t\t\t\t$objResponse->addAlert(\"Unknown Pre-Function \". $this->sPreFunction);\n\t\t\t\t$sResponse = $objResponse->getXML();\n\t\t\t}\n\t\t}\n\t\t//include any external dependencies associated with this function name\n\t\tif (array_key_exists($sFunctionName,$this->aFunctionIncludeFiles))\n\t\t{\n\t\t\tob_start();\n\t\t\tinclude_once($this->aFunctionIncludeFiles[$sFunctionName]);\n\t\t\tob_end_clean();\n\t\t}\n\n\t\tif ($bFoundFunction) {\n\t\t\t$sFunctionNameForSpecial = $sFunctionName;\n\t\t\tif (!array_key_exists($sFunctionName, $this->aFunctions))\n\t\t\t{\n\t\t\t\tif ($this->sCatchAllFunction) {\n\t\t\t\t\t$sFunctionName = $this->sCatchAllFunction;\n\t\t\t\t\t$bFunctionIsCatchAll = true;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$bFoundFunction = false;\n\t\t\t\t\t$objResponse = new xajaxResponse();\n\t\t\t\t\t$objResponse->addAlert(\"Unknown Function $sFunctionName.\");\n\t\t\t\t\t$sResponse = $objResponse->getXML();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ($this->aFunctionRequestTypes[$sFunctionName] != $requestMode)\n\t\t\t{\n\t\t\t\t$bFoundFunction = false;\n\t\t\t\t$objResponse = new xajaxResponse();\n\t\t\t\t$objResponse->addAlert(\"Incorrect Request Type.\");\n\t\t\t\t$sResponse = $objResponse->getXML();\n\t\t\t}\n\t\t}\n\n\t\tif ($bFoundFunction)\n\t\t{\n\t\t\tfor ($i = 0; $i < sizeof($aArgs); $i++)\n\t\t\t{\n\t\t\t\t// If magic quotes is on, then we need to strip the slashes from the args\n\t\t\t\tif (get_magic_quotes_gpc() == 1 && is_string($aArgs[$i])) {\n\n\t\t\t\t\t$aArgs[$i] = stripslashes($aArgs[$i]);\n\t\t\t\t}\n\t\t\t\tif (stristr($aArgs[$i],\"<xjxobj>\") != false)\n\t\t\t\t{\n\t\t\t\t\t$aArgs[$i] = $this->_xmlToArray(\"xjxobj\",$aArgs[$i]);\n\t\t\t\t}\n\t\t\t\telse if (stristr($aArgs[$i],\"<xjxquery>\") != false)\n\t\t\t\t{\n\t\t\t\t\t$aArgs[$i] = $this->_xmlToArray(\"xjxquery\",$aArgs[$i]);\n\t\t\t\t}\n\t\t\t\telse if ($this->bDecodeUTF8Input)\n\t\t\t\t{\n\t\t\t\t\t$aArgs[$i] = $this->_decodeUTF8Data($aArgs[$i]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($this->sPreFunction) {\n\t\t\t\t$mPreResponse = $this->_callFunction($this->sPreFunction, array($sFunctionNameForSpecial, $aArgs));\n\t\t\t\tif (is_array($mPreResponse) && $mPreResponse[0] === false) {\n\t\t\t\t\t$bEndRequest = true;\n\t\t\t\t\t$sPreResponse = $mPreResponse[1];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$sPreResponse = $mPreResponse;\n\t\t\t\t}\n\t\t\t\tif (is_a($sPreResponse, \"xajaxResponse\")) {\n\t\t\t\t\t$sPreResponse = $sPreResponse->getXML();\n\t\t\t\t}\n\t\t\t\tif ($bEndRequest) $sResponse = $sPreResponse;\n\t\t\t}\n\n\t\t\tif (!$bEndRequest) {\n\t\t\t\tif (!$this->_isFunctionCallable($sFunctionName)) {\n\t\t\t\t\t$objResponse = new xajaxResponse();\n\t\t\t\t\t$objResponse->addAlert(\"The Registered Function $sFunctionName Could Not Be Found.\");\n\t\t\t\t\t$sResponse = $objResponse->getXML();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif ($bFunctionIsCatchAll) {\n\t\t\t\t\t\t$aArgs = array($sFunctionNameForSpecial, $aArgs);\n\t\t\t\t\t}\n\t\t\t\t\t$sResponse = $this->_callFunction($sFunctionName, $aArgs);\n\t\t\t\t}\n\t\t\t\tif (is_a($sResponse, \"xajaxResponse\")) {\n\t\t\t\t\t$sResponse = $sResponse->getXML();\n\t\t\t\t}\n\t\t\t\tif (!is_string($sResponse) || strpos($sResponse, \"<xjx>\") === FALSE) {\n\t\t\t\t\t$objResponse = new xajaxResponse();\n\t\t\t\t\t$objResponse->addAlert(\"No XML Response Was Returned By Function $sFunctionName.\");\n\t\t\t\t\t$sResponse = $objResponse->getXML();\n\t\t\t\t}\n\t\t\t\telse if ($sPreResponse != \"\") {\n\t\t\t\t\t$sNewResponse = new xajaxResponse($this->sEncoding, $this->bOutputEntities);\n\t\t\t\t\t$sNewResponse->loadXML($sPreResponse);\n\t\t\t\t\t$sNewResponse->loadXML($sResponse);\n\t\t\t\t\t$sResponse = $sNewResponse->getXML();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$sContentHeader = \"Content-type: text/xml;\";\n\t\tif ($this->sEncoding && strlen(trim($this->sEncoding)) > 0)\n\t\t\t$sContentHeader .= \" charset=\".$this->sEncoding;\n\t\theader($sContentHeader);\n\t\tif ($this->bErrorHandler && !empty( $GLOBALS['xajaxErrorHandlerText'] )) {\n\t\t\t$sErrorResponse = new xajaxResponse();\n\t\t\t$sErrorResponse->addAlert(\"** PHP Error Messages: **\" . $GLOBALS['xajaxErrorHandlerText']);\n\t\t\tif ($this->sLogFile) {\n\t\t\t\t$fH = @fopen($this->sLogFile, \"a\");\n\t\t\t\tif (!$fH) {\n\t\t\t\t\t$sErrorResponse->addAlert(\"** Logging Error **\\n\\nxajax was unable to write to the error log file:\\n\" . $this->sLogFile);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tfwrite($fH, \"** xajax Error Log - \" . strftime(\"%b %e %Y %I:%M:%S %p\") . \" **\" . $GLOBALS['xajaxErrorHandlerText'] . \"\\n\\n\\n\");\n\t\t\t\t\tfclose($fH);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$sErrorResponse->loadXML($sResponse);\n\t\t\t$sResponse = $sErrorResponse->getXML();\n\n\t\t}\n\t\tif ($this->bCleanBuffer) while (@ob_end_clean());\n\t\tprint $sResponse;\n\t\tif ($this->bErrorHandler) restore_error_handler();\n\n\t\tif ($this->bExitAllowed)\n\t\t\texit();\n\t}", "public function preDispatch();", "protected function processGetRequest()\n {\n $this->ajaxDie(json_encode([\n 'success' => true,\n 'operation' => 'get'\n ]));\n }", "protected function callActionMethod() {}", "function process_request()\n {\n // Note: some modules prefer 's' to indicate the instance number... may need to implement that as well.\n // Fetch the course module instance\n $id = required_param('id', PARAM_INT);\n if (!$this->cm = get_coursemodule_from_id('sloodle', $id)) error('Course module ID was incorrect.');\n // Fetch the course data\n if (!$this->course = sloodle_get_record('course', 'id', $this->cm->course)) error('Failed to retrieve course.');\n $this->sloodle_course = new SloodleCourse();\n if (!$this->sloodle_course->load($this->course)) error(get_string('failedcourseload', 'sloodle'));\n\n // Fetch the SLOODLE instance itself\n if (!$this->sloodle = sloodle_get_record('sloodle', 'id', $this->cm->instance)) error('Failed to find SLOODLE module instance');\n }", "public function run(){\n\t\tif(!$this->parseRequest()){ return; }\n\n\t\t$r = $this->rpcRequest;\n\t\t$classname = $r->obj;\n\t\t$method = $r->method;\n\t\t$params = isset($r->params) ? $r->params : array();\n\t\tob_start();\n\n\t \t// FIXME: Allow for the PHP5 magic __call() method to handle arbitrary/non-\n\t\t// existent methods on the requested object? We'd probably need a\n\t\t// _toSmd() method on the object, then, since there'd be no way to\n\t\t// use reflection to figure out available methods. Either that, or\n\t\t// set it up so you manually register methods with the API.\n\n\t\t// try and instantiate the requested object and call the method\n\t\tif(class_exists($classname)){\n\t\t\t// TODO: perhaps attempt to pass, say, an object ID into the constructor?\n\t\t\t$fn = array(new $classname, $method);\n\t\t\tif(is_callable($fn)){\n\t\t\t\t// call the requested method\n\t\t\t\t$this->responseResult = call_user_func_array($fn, $params);\n\t\t\t}else{\n\t\t\t\t// method doesn't exist\n\t\t\t\t$this->error(\"ROUTING ERROR: Couldn't find {$classname}->{$method}().\");\n\t\t\t\t$this->rpcError(self::JSON_RPC_ERROR_METHOD_NOT_FOUND);\n\t\t\t}\n\t\t}else{\n\t\t\t// can't find the requested class\n\t\t\t$this->error(\"INSTANTIATION ERROR: Couldn't get the object [$classname]\");\n\t\t\t$this->rpcError(self::JSON_RPC_ERROR_INVALID_REQUEST);\n\t\t}\n\n\t\t// ignore any output from print or echo, and clear the buffer\n\t\tob_end_clean();\n\n\t\t$this->sendResponse();\n\t}", "private function run() {\n\t\t\t$this->initRequestValidator();\n\t\t\t$this->printToolHead();\n\t\t\t\n\t\t\tif ($this->rq->allRequiredDefined() == true) {\n\t\t\t\t$this->formSubmitted();\n\t\t\t}\n\t\t}", "public function run() {\n $base = $this->request->getNextRoute();\n if ($base !== BASE) {\n $this->response->notFound();\n }\n $start = $this->request->getNextRoute();\n if ($rs = $this->getRs($start)) {\n if ($this->request->isOptions()) {\n $this->response->okEmpty();\n return;\n }\n try {\n $this->response->ok($rs->handleRequest());\n\n } catch (UnauthorizedException $e) {\n $this->response->unauthorized();\n\n } catch (MethodNotAllowedException $e) {\n $this->response->methodNotAllowed();\n\n } catch (BadRequestExceptionInterface $e) {\n $this->response->badRequest($e->getMessage());\n\n } catch (UnavailableExceptionInterface $e) {\n $this->response->unavailable($e->getMessage());\n\n } catch (Exception $e) {\n $this->response->unavailable($e->getMessage());\n }\n } else {\n $this->response->badRequest();\n }\n }", "public function proceed();", "public function service($request,$response,$utilities);", "final function execute($request) {\t\t\n\t\t// Forward the action to execute page-specific logic\n\t\t$this->doExecute($request);\n\t}", "public function requestRun()\n {\n }", "public function run(){\n // server response object \n $requestMethod = $this->requestBuilder->getRequestMethod();\n $this->response = new Response($requestMethod);\n\n try{\n $route = $this->router->validateRequestedRoute($this->requestBuilder);\n\n // serve request object\n $this->requestBuilder->setQuery();\n $this->requestBuilder->setBody();\n $requestParams = $this->requestBuilder->getParam();\n $requestQuery = $this->requestBuilder->getQuery();\n $requestBody = $this->requestBuilder->getBody(); \n $this->request = new Request($requestParams, $requestQuery, $requestBody);\n\n $callback = $route->getCallback();\n $callback($this->request, $this->response);\n }catch(RouteNotImplementedException $e){\n $this->response->statusCode(404)->json($e->getMessage()); \n }\n \n }", "protected function start(){\n \tLynx_Request::parse();\n }", "public function processRequest() {\n $serviceType = $this->getServiceType();\n if(!$serviceType){return \"Invalid Call ! \\n\";}\n $repoPath = $this->getRepoName();\n if(!defined(\"__APIURL__\" . $serviceType)){\n return \"API URL not found for $serviceType\\n\";\n }\n $apiUrl = sprintf(constant(\"__APIURL__\" . $serviceType), $repoPath);\n $response = $this->makeCurlRequest($apiUrl, 'get');\n switch ($serviceType) {\n case 'github.com':\n return $this->getCountForGit($response);\n break;\n case 'bitbucket.org':\n return $this->getCountForBit($response);\n break;\n default :\n return $response;\n break;\n }\n }", "function process_request()\r\n {\r\n $id = required_param('id', PARAM_INT);\r\n if (!$this->course = sloodle_get_record('course', 'id', $id)) error('Could not find course.');\r\n $this->sloodle_course = new SloodleCourse();\r\n if (!$this->sloodle_course->load($this->course)) error(get_string('failedcourseload', 'sloodle'));\r\n\r\n }", "public function willProcessRequest(array $data) {\n }", "abstract public function processRequest(PriceWaiter_NYPWidget_Controller_Endpoint_Request $request);", "public function & GetRequest ();", "public function process() {\n\n try {\n \n /*\n * !! IMPORTANT !!\n * Collections with a name starting with '$' character are not collection\n * but reserved actions \n */\n if ($this->request['collection'] && substr($this->request['collection'], 0 , 1) === '$') {\n \n /*\n * Action always returns JSON\n */\n $this->request['format'] = self::DEFAULT_RESPONSE_FORMAT;\n \n /*\n * QueryAnalyzer standalone service\n */\n if ($this->request['collection'] === '$analyzeQuery' && class_exists('QueryAnalyzer')) {\n \n /*\n * Change parameter keys to model parameter key\n * and remove unset parameters\n */\n $params = array();\n foreach ($this->request['params'] as $key => $value) {\n if ($value) {\n foreach(array_keys(RestoController::$searchFiltersDescription) as $filterKey) {\n if ($key === RestoController::$searchFiltersDescription[$filterKey]['osKey']) {\n $params[$filterKey] = $value;\n }\n }\n }\n }\n $qa = new QueryAnalyzer($this->dictionary, RestoController::$searchFiltersDescription, class_exists('Gazetteer') ? new Gazetteer($this) : null);\n $this->response = $qa->analyze($params);\n $this->responseStatus = 200;\n }\n else {\n throw new Exception('Not Found', 404);\n }\n }\n /*\n * Collection is requested\n */\n else if ($this->request['collection']) {\n \n /*\n * Collection does not exist\n */\n if (!$this->collections[$this->request['collection']]) {\n throw new Exception('Not Found', 404);\n }\n \n /*\n * Search collection Controller name within collections list\n */\n $controllerName = null;\n foreach (glob(realpath(dirname(__FILE__)) . '/../controllers/*.php', GLOB_NOSORT) as $controller) {\n if ($this->collections[$this->request['collection']]['controller'] === basename($controller, '.php')) {\n $controllerName = basename($controller, '.php');\n break;\n }\n }\n\n /*\n * Invalid controller \n */\n if (!$controllerName) {\n throw new Exception('Invalid collection', 500);\n }\n \n /*\n * HTTP method is PUT, POST or DELETE and no identifier is set\n * \n * HTTP DELETE - Delete new collection (if CollectionManager module is active)\n * HTTP PUT - Update new collection (if CollectionManager module is active)\n */\n if ($this->request['method'] === 'put' && !$this->request['identifier']) {\n if (class_exists('CollectionManager')) {\n $collectionManager = new CollectionManager($this);\n $this->response = $collectionManager->update();\n }\n else {\n throw new Exception('Forbidden', 403);\n }\n }\n else if ($this->request['method'] === 'delete' && !$this->request['identifier']) {\n if (class_exists('CollectionManager')) {\n $collectionManager = new CollectionManager($this);\n $this->response = $collectionManager->delete();\n }\n else {\n throw new Exception('Forbidden', 403);\n }\n }\n /*\n * HTTP GET method on /collection\n * HTTP POST, PUT DELETE on /collection/identifier\n */\n else {\n \n /*\n * Instantiate RestoController\n */\n $controller = new ReflectionClass($controllerName);\n if (!$controller->isInstantiable()) {\n throw new Exception('Bad Request', 400);\n }\n try {\n $method = $controller->getMethod($this->request['method']);\n } catch (ReflectionException $re) {\n throw new Exception('Forbidden', 403);\n }\n\n /*\n * Initialize a controller instance\n */\n if (!$method->isStatic()) {\n $controllerInstance = $controller->newInstance($this);\n $method->invoke($controllerInstance);\n $this->response = $controllerInstance->getResponse();\n $this->responseStatus = $controllerInstance->getResponseStatus();\n $this->responseDescription = $controllerInstance->getDescription();\n } else {\n throw new Exception('Static methods not supported in Controllers', 500);\n }\n if (is_null($this->response)) {\n throw new Exception('Method not allowed', 405);\n }\n }\n }\n /*\n * No collection requested \n * \n * HTTP GET - HTTP 200 (will redirect to home page - see htmlResponse)\n * HTTP POST - Create new collection (if CollectionManager module is active)\n * HTTP PUT - Not allowed\n * HTTP DELETE - Not allowed\n * \n */\n else {\n if ($this->request['method'] === 'get') {\n $this->responseStatus = 200;\n }\n else if ($this->request['method'] === 'post' && class_exists('CollectionManager')) {\n $collectionManager = new CollectionManager($this);\n $this->response = $collectionManager->create();\n }\n else {\n throw new Exception('Method Not Allowed', 405);\n }\n }\n } catch (Exception $re) {\n $this->responseStatus = $re->getCode();\n $this->response = array('ErrorCode' => $re->getCode(), 'ErrorMessage' => $re->getMessage());\n }\n\n /*\n * Special case for stream !\n */\n if ($controllerInstance && $this->responseDescription['forceStream']) {\n return;\n }\n\n /*\n * Output result\n */\n $this->response()->send();\n }", "public function processApi(){\n\t\t\t$func = explode('/', trim($_SERVER['PATH_INFO'],'/'))[0];\n\n\t\t\t$good = false;\n\t\t\tforeach ($this->AUTHORIZED_FUNCTION as $authorizedFunc){\n\t\t\t\tif($authorizedFunc == $func){\n\t\t\t\t\t$good = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(! $good) $this->response('', 404);\n\n\t\t\tif((int)method_exists($this,$func) > 0)\n\t\t\t\t$this->$func();\n\t\t\telse\n\t\t\t\t$this->sendMessage('', 404);\n\t\t}", "public function sendRequest( ) {\n\n }" ]
[ "0.6734121", "0.6678177", "0.6627215", "0.6611398", "0.6542564", "0.64404076", "0.63505274", "0.6330978", "0.6307041", "0.6306242", "0.62960786", "0.6293364", "0.6248936", "0.62322736", "0.6220849", "0.6216469", "0.6201871", "0.61932445", "0.61932445", "0.6188286", "0.61850053", "0.61841446", "0.6174953", "0.616474", "0.61174935", "0.609698", "0.6092618", "0.6085084", "0.6059398", "0.60576355", "0.6044013", "0.60418284", "0.60405767", "0.60321826", "0.6027257", "0.6025342", "0.6008995", "0.6005575", "0.6002933", "0.59883076", "0.596491", "0.59631395", "0.59619725", "0.5958084", "0.59366924", "0.5933868", "0.5932742", "0.5922798", "0.5919059", "0.59085196", "0.5903983", "0.5899135", "0.5896366", "0.58839256", "0.5863981", "0.58577687", "0.58536893", "0.58530724", "0.5850531", "0.58480775", "0.5847375", "0.5836188", "0.5836177", "0.5822561", "0.58216363", "0.5798478", "0.5798478", "0.5794243", "0.5786491", "0.5785808", "0.5763343", "0.5749745", "0.57414836", "0.574126", "0.5734885", "0.5729877", "0.57236046", "0.5722877", "0.5718375", "0.57098055", "0.57092875", "0.5705339", "0.5687969", "0.56874776", "0.5682427", "0.56797504", "0.56698495", "0.56697136", "0.56673837", "0.5661305", "0.5652658", "0.56092834", "0.56065", "0.56054866", "0.56022334", "0.5598757", "0.5598117", "0.5583543", "0.55772907", "0.5571501", "0.5568168" ]
0.0
-1
create the param list we are going to use to invoke the object
private function checkParams( $real, $sent ) { $new = array(); $is_obj = is_object( $sent ); $is_assoc = is_array( $sent ) && jsonrpc2::isAssoc( $sent ); // check every parameter foreach ( $real as $i => $param ) { $name = $param->getName(); if ( $is_obj && isset( $sent->{$name} ) ) { $new[$i] = $sent->{$name}; } elseif ( $is_assoc && $sent[$name] ) { $new[$i] = $sent[$name]; } elseif ( isset( $sent[$i] ) ) { $new[$i] = $sent[$i]; } elseif ( !$param->isOptional() ) { throw new Exception( -32602 ); } } // return the list of matching params return $new; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function setParams()\n\t\t{\n\t\t\t/**\n\t\t\t* Remove do $this->_separetor os dois primeiros valores\n\t\t\t* referentes ao controller e action, deixando os demais valores\n\t\t\t* que serão usados para formarem os parametros, indices e valores\n\t\t\t*/\n\t\t\tunset($this->_separetor[1], $this->_separetor[2]);\n\t\t\t\n\t\t\t/**\n\t\t\t* Caso o ultimo item do $this->_separetor seja vazio\n\t\t\t* o mesmo é removido\n\t\t\t*/\n\t\t\tif ( end($this->_separetor) == null ) {\n\t\t\t\tarray_pop($this->_separetor);\n\t\t\t}\n\n\t\t\t\n\t\t\t/**\n\t\t\t* Se a $this->_separetor estivar vazia,\n\t\t\t* então os parametros serão definidos como vazios\n\t\t\t*/\n\t\t\tif ( !empty($this->_separetor) ) {\n\t\t\t\t/**\n\t\t\t\t* Percorre o array $this->_separetor, verificando os indices\n\t\t\t\t* se for impar, então seu valor será o indice do parametro.\n\t\t\t\t* Se for par, seu valor será o valor do paremetro\n\t\t\t\t*/\n\t\t\t\tforeach ($this->_separetor as $key => $value) {\n\t\t\t\t\tif ($key % 2 == 0) {\n\t\t\t\t\t\t$param_value[] = $value;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$param_indice[] = $value;\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$param_value = array();\n\t\t\t\t$param_indice = array();\n\t\t\t}\n\n\n\t\t\t/**\n\t\t\t* Verifica se os indices e valores dos parametros\n\t\t\t* não são vazios e possuem a mesma quantidade\n\t\t\t* Então vaz um \"array_combine\" para juntar os dois arrays\n\t\t\t* formando um indice->valor para o parametro\n\t\t\t*/\n\t\t\tif ( !empty($param_indice) \n\t\t\t\t&& !empty($param_value)\n\t\t\t\t&& count($param_indice)\n\t\t\t\t== count($param_value)\n\t\t\t) {\n\t\t\t\t$this->_params = array_combine($param_indice, $param_value);\n\t\t\t} else {\n\t\t\t\t$this->_params = array();\n\t\t\t}\n\t\t}", "public function initList($params = array())\n {\n $result = array();\n $initAction = str_replace(' ', '', ucwords(str_replace('-', ' ', $params['action'])));\n //echo $initAction;\n $result = $this->$initAction($params);\n return $result;\n }", "private function _setParams ()\n {\n $endpoint = $this->_endpoint->getData();\n if (count($endpoint) > 0) {\n \n $method = $this->_endpoint->getUrl();\n $methodname = 'setParameter' . ucfirst($method['method']);\n \n $this->_httpclient->{$methodname}('access_token', \n $this->_accesstoken);\n $this->_httpclient->{$methodname}('api_secret', $this->_apisecret);\n \n foreach ($endpoint as $param => $value) {\n $this->_httpclient->{$methodname}($param, $value);\n }\n }\n }", "function params( $array ) {\n\t\t$this->params_list = $array;\n\t\t}", "private static function ParamList ()\n {\n return array (\n \"a\" => array (\n \"charset\", \"coords\", \"href\",\n \"hreflang\", \"name\", \"rel\",\n \"rev\", \"shape\", \"target\",\n \"style\",\n ),\n \"button\" => array (\n \"disabled\", \"name\", \"type\",\n \"value\", \"accesskey\", \"class\",\n \"dir\", \"id\", \"lang\", \"style\",\n \"tabindex\", \"title\", \"xml:lang\",\n ),\n );\n }", "public function initParams()\n {\n foreach ($this->cmds as $key => $parseValues) {\n $this->params[$key] = array();\n }\n }", "public function getParametersList(){\n return $this->_get(2);\n }", "private function createParam()\n\t{\n\t\t$this->param = Array('http' => Array(), 'url' => null);\n\t}", "private function loadParams() {\r\n foreach ($this->_param_names as $param_name)\r\n\t{\r\n\t\t$funcname = 'set'.$param_name;\r\n\t\tif (_PS_VERSION_ < '1.5')\r\n\t\t\t$this->$funcname(Configuration::get('KWIXO_'.strtoupper($param_name)));\r\n\t\telse\r\n\t\t\t$this->$funcname(Configuration::get('KWIXO_'.strtoupper($param_name), null, null, $this->getIdshop()));\r\n\t}\r\n }", "public function get_params()\n {\n }", "public function get_params()\n {\n }", "public function __construct() {\n if ( func_num_args() > 0 ) {\n $this->list = func_get_args();\n } else {\n $this->list = array();\n }\n }", "function getParameters()\r\n {\r\n }", "public function getParameters()\n\t{\n\n\t}", "public function getParameters()\n\t{\n\n\t}", "public function getParams() {}", "protected function populateParams()\n\t{\n\n\t\tparent::populateParams();\n\t\t//$acl = ZefaniabibleHelper::getAcl();\n\t\t$mdl_acl = new ZefaniabibleHelper;\n\t\t$acl = $mdl_acl->getAcl();\n\t\tif (!isset($this->_data))\n\t\t\treturn;\n\n\t\t// Convert the parameter fields into objects.\n\t\tforeach ($this->_data as &$item)\n\t\t{\n\n\t\t\tif ($acl->get('core.edit.state')\n\t\t\t\t|| (bool)$item->publish)\n\t\t\t\t$item->params->set('access-view', true);\n\n\t\t\tif ($acl->get('core.edit'))\n\t\t\t\t$item->params->set('access-edit', true);\n\n\t\t\tif ($acl->get('core.delete'))\n\t\t\t\t$item->params->set('access-delete', true);\n\n\n\t\t}\n\n\t}", "function getParams()\n {\n }", "public function getParameters() {}", "public function getParams();", "public function getParams();", "public function getParams();", "public function getParams();", "public function getParams();", "public function getParams();", "public function getParams();", "public function getParams();", "public function getParams();", "public function getParams();", "public function getParameters();", "public function getParameters();", "public function getParameters();", "public function getParameters();", "public function getParameters();", "public function getParameters();", "public function getParameters();", "public function getParameters();", "function set_allowed_uri_params_list()\r\n{\r\n //allowed params disabled. All allowed\r\n//\tif ($ar_params = func_get_args())\r\n//\t{\r\n//\t\tglobal $tpl_allowed_uri_params_list;\r\n//\r\n//\t\tif (is_array($tpl_allowed_uri_params_list))\r\n//\t\t{\r\n//\t\t\tforeach ($ar_params as $val)\r\n//\t\t\t{\r\n//\t\t\t\t$tpl_allowed_uri_params_list[] = $val;\r\n//\t\t\t}\r\n//\t\t}\r\n//\t\telse\r\n//\t\t{\r\n//\t\t\t$tpl_allowed_uri_params_list = $ar_params;\r\n//\t\t}\r\n//\t}\r\n}", "private function setParams()\n {\n $this->params['MERCHANTNUMBER'] = $this->merchantNumber;\n $this->params['OPERATION'] = 'CREATE_ORDER';\n $this->params['ORDERNUMBER'] = $this->operation->getOrderNumber();\n $this->params['AMOUNT'] = $this->operation->getAmount();\n $this->params['CURRENCY'] = $this->operation->getCurrency();\n $this->params['DEPOSITFLAG'] = $this->depositFlag;\n if($this->operation->getMerOrderNum())\n $this->params['MERORDERNUM'] = $this->operation->getMerOrderNum();\n $this->params['URL'] = $this->url;\n\n if($this->operation->getDescription())\n $this->params['DESCRIPTION'] = $this->operation->getDescription();\n if($this->operation->getMd())\n $this->params['MD'] = $this->operation->getMd();\n\n }", "abstract public function getParameters();", "function getParams()\n {\n }", "function new_parameters() {\r\n\r\n }", "protected function loadParams() {\n\t $this->cpParams = new api_crud_param($this->attribs);\n\t \n // These commands need an id and a method in the url\n\t $this->cpParams->setCommand(Array('read','update','delete'))->setMethod(api_crud_param::MATTRIBUTE)->setNeed(api_crud_param::RMANDATORY)\n\t ->setType(api_crud_param::TINT)->addParam('id')\n\t ->setType(api_crud_param::TSTRING)->addParam('method');\n\t \n\t // yes, for delete, the delete param needs to be repeated in the POST as well as the id\n\t $this->cpParams->setCommand('delete')->setMethod(api_crud_param::MPOST)->setNeed(api_crud_param::RMANDATORY)\n\t ->setType(api_crud_param::TINT)->addParam('id')\n ->setType(api_crud_param::TSTRING)->addParam('method');\n\t}", "protected function populateParams()\n\t{\n\t\tparent::populateParams();\n\t\t$acl = ZefaniabibleHelper::getAcl();\n\t\tif (!isset($this->_data))\n\t\t\treturn;\n\t\t// Convert the parameter fields into objects.\n\t\tforeach ($this->_data as &$item)\n\t\t{\n\t\t\tif ($acl->get('core.edit.state')\n\t\t\t\t|| (bool)$item->publish)\n\t\t\t\t$item->params->set('access-view', true);\n\t\t\tif ($acl->get('core.edit'))\n\t\t\t\t$item->params->set('access-edit', true);\n\t\t\tif ($acl->get('core.delete'))\n\t\t\t\t$item->params->set('access-delete', true);\n\t\t}\n\t}", "function get_list_params()\n\t{\n\t\treturn '';\n\t}", "public function getParameters()\n {\n return array();\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 }", "function getParameters();", "function getParameters();", "public function getDefinedParameters();", "public function params()\n\t{\n\t\t$r = array();\n\t\tforeach (func_get_args() as $name)\n\t\t\t$r[] = @$this->params[$name];\n\t\treturn $r;\n\t}", "function params(array $data);", "function setValues($list) {\n global $params;\n if ( count($list )) {\n foreach ($list as $k => $v ) {\n $params[$k] = $v;\n }\n }\n}", "public function loadParams()\r\n\t{\r\n\t\tforeach ($this->param_names as $param_name)\r\n\t\t{\r\n\t\t\t$funcname = 'set'.$param_name;\r\n\t\t\tif (_PS_VERSION_ < '1.5')\r\n\t\t\t\t$this->$funcname(Configuration::get('CERTISSIM_'.Tools::strtoupper($param_name)));\r\n\t\t\telse\r\n\t\t\t\t$this->$funcname(Configuration::get('CERTISSIM_'.Tools::strtoupper($param_name), null, null, $this->getIdshop()));\r\n\t\t}\r\n\t}", "protected function get_parameter_order()\n {\n }", "protected function initializeActionMethodArguments() {}", "function getParameters(): array;", "public function getParams()\n {\n // TODO: Implement getParams() method.\n }", "private function compileParameters()\n {\n $params = [\n 'queueName' => property_exists($this, 'queueName') ? $this->queueName : null,\n 'exchangeName' => property_exists($this, 'exchangeName') ? $this->exchangeName : null,\n 'exchangeType' => property_exists($this, 'exchangeType') ? $this->exchangeType : null,\n 'passive' => property_exists($this, 'passive') ? $this->passive : null,\n 'durable' => property_exists($this, 'durable') ? $this->durable : null,\n 'autoDelete' => property_exists($this, 'autoDelete') ? $this->autoDelete : null,\n 'deliveryMode' => property_exists($this, 'deliveryMode') ? $this->deliveryMode : null,\n ];\n\n return array_filter($params);\n }", "public function getParamsListToInject(): array\n {\n return [\n 'sectionTitle',\n 'sectionSubtitle',\n 'tiles'\n ];\n }", "private static function order_params($method_name, $params) {\n\t\t$ordered_params = array();\n\t\ttry {\n\t\t\t$method = new ReflectionMethod('remotecontrol_handle', $method_name);\t\t\t\t\n\t\t\t$method_parameters = $method->getParameters();\t\t\t\n\t\t\tforeach ($method_parameters as $param) {\n\t\t\t\t$key = $param->getName();\n\t\t\t\tif (array_key_exists($key, $params)) {\n\t\t\t\t\t$value = $params[$key];\n\t\t\t\t\tarray_push($ordered_params, $value);\t\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\tarray_push($ordered_params, $param->getDefaultValue());\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $ordered_params;\t\t\n\t\t} catch (Exception $e) {\n\t\t\t// e.g. : no method $method found in class remotecontrol_handle\n\t\t\treturn $params ;\n\t\t}\n\t}", "public function getParams()\n {\n return $this->_invokeParams;\n }", "function setValues($list) {\n global $params;\n if (count($list)) {\n\tforeach ($list as $k=>$v) {\n\t $params[$k] = $v;\n\t}\n }\n}", "private function build_params() {\n\n\t\t\t$this->per_page = $this->request->get_param( 'per_page' ) ? $this->request->get_param( 'per_page' ) : (int) get_option( 'posts_per_page' );\n\t\t\t$this->page = $this->request->get_param( 'page' ) ? $this->request->get_param( 'page' ) : 1;\n\t\t}", "public function getParameters()\n {\n // TODO: Implement getParameters() method.\n }", "function getParams($passAry,$base){\r\n\t\t$getName=$passAry['param_1'];\r\n\t\t$workAry=$base->utlObj->retrieveValue($getName,&$base);\r\n\t\tif ($workAry != null){\r\n\t\t\tforeach ($workAry as $paramName=>$paramValue){\r\n\t\t\t\t$base->paramsAry[$paramName]=$paramValue;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function params(): array;", "public function parameters();", "public function parameters();", "public function getParams() :array;", "public function __construct() {\n\t$this->paramsStr = array(\n\t\t\t 'id' => 1,\n\t\t\t 'iconcolor' => 1,\n\t\t\t 'iconurl' => 1,\n\t\t\t 'name' => 1,\n\t\t\t 'description' => 1,\n\t\t\t 'parent_id' => 1,\n\t\t\t 'listorder' => 1\n\t\t\t );\n\t}", "public function __construct($params){\n \n $i = 2; //Skip the controller/action stuff.\n while (isset($params[$i])){\n $this->_requestParams[$params[$i]] = $params[$i+1];\n $i = $i + 2;\n }\n\n if (count($_POST) > 0){\n $this->_requestParams = array_merge($this->_requestParams,$_POST);\n }\n }", "function __construct()\r\n {\r\n $this->field_names = func_get_args();\r\n }", "public function getParameters(): array;", "private function setParameters(){\n\t\tif(is_array($this->rawData) and count($this->rawData) > 2){\n\t\t\t$params = array();\n\t\t\tforeach($this->rawData as $paramid => $param){\n\t\t\t\tif($paramid > 1){ # Exclude page and method.\n\t\t\t\t\t$params[$paramid-1] = $param; \n\t\t\t\t}\n\t\t\t}\n\t\t\t/* Store value */\n\t\t\treturn $params;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public function __construct()\n {\n $this->arguments = func_get_args();\n }", "public function getParams(){\n\t\tthrow new Exception(\"Method \".__CLASS__.\"::\".__METHOD__.\" not implemented yet!\");\n\t}", "protected function getObjectParams($obj){\n\t\treturn array();\n\t}", "function getParams()\n {\n global $id;\n global $mode;\n global $data_source;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id = $id;\n }\n if (isset($mode)) {\n $this->mode = $mode;\n }\n if (isset($data_source)) {\n $this->data_source = $data_source;\n }\n if (isset($view_mode)) {\n $this->view_mode = $view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode = $edit_mode;\n }\n if (isset($tab)) {\n $this->tab = $tab;\n }\n }", "private function createParamArray()\n {\n $data = [];\n /** @var Property $property */\n foreach($this->properties as $name => $property)\n {\n if ($property->initialized() && !$property->isReadOnly())\n {\n $data[$property->name()] = $property->preparedForDb();\n }\n }\n return $data;\n }", "protected function initCommonListParamOptions()\n {\n \n $this->restRequest = $this->getController()->restRequest;\n $this->restRequest->setParam($this->limit, $this->restRequest->getParam($this->limit, 30));\n $this->restRequest->setParam($this->offset, $this->restRequest->getParam($this->offset, 0));\n $this->restRequest->setParam($this->order, $this->restRequest->getParam($this->order, null));\n \n \n\n }", "public function getParams(): array;", "public function getAssembledParams()\r\n {\r\n return array();\r\n }", "protected function defineParams() {\n return [\n 'state' => $this->state,\n 'rights' => $this->document->getRights(),\n 'config' => false,\n 'active' => false,\n ];\n }", "function getParameters() {\n $params = $this->docParser->getParamAnnotations();\n $extParams = array();\n if ( $this->reflectionSource instanceof ReflectionFunction ) {\n $apiParams = $this->reflectionSource->getParameters();\n } else {\n $apiParams = parent::getParameters();\n }\n foreach ($apiParams as $param) {\n $type = null;\n foreach ($params as $annotation) {\n if (\n $annotation instanceof ezcReflectionAnnotationParam\n and $annotation->getParamName() == $param->getName()\n ) {\n $type = $annotation->getTypeName();\n break;\n }\n }\n if ( $this->reflectionSource instanceof ReflectionFunction ) {\n $extParams[] = new ezcReflectionParameter(\n null,\n $param,\n $type\n );\n } else {\n // slightly increase performance and save some memory\n $extParams[] = new ezcReflectionParameter(\n $this->getName(),\n $param->getPosition(),\n $type\n );\n }\n }\n return $extParams;\n }", "function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $data_source;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($data_source)) {\n $this->data_source=$data_source;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}", "function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $data_source;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($data_source)) {\n $this->data_source=$data_source;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}", "function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $data_source;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($data_source)) {\n $this->data_source=$data_source;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}", "function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $data_source;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($data_source)) {\n $this->data_source=$data_source;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}", "public function getParameters(){\n\t\t$options = $this->_function_reflection->getParameters();\n\t}", "function url_get_parameters() {\n $this->init_full();\n return array('id' => $this->modulerecord->id, 'pageid' => $this->lessonpageid);;\n }", "function getParams() {\r\n global $id;\r\n global $mode;\r\n global $view_mode;\r\n global $edit_mode;\r\n global $data_source;\r\n global $tab;\r\n if (isset($id)) {\r\n $this->id=$id;\r\n }\r\n if (isset($mode)) {\r\n $this->mode=$mode;\r\n }\r\n if (isset($view_mode)) {\r\n $this->view_mode=$view_mode;\r\n }\r\n if (isset($edit_mode)) {\r\n $this->edit_mode=$edit_mode;\r\n }\r\n if (isset($data_source)) {\r\n $this->data_source=$data_source;\r\n }\r\n if (isset($tab)) {\r\n $this->tab=$tab;\r\n }\r\n}", "public function testOoCanSetGetParameters()\n {\n $mainCommand = 'ls';\n $parameters = [new Command\\Parameter('/usr/local/bin'), new Command\\Parameter('../')];\n $command = $this->createInstance($mainCommand);\n foreach ($parameters as $_parameter) {\n $command->addParameter($_parameter);\n }\n $this->assertEquals($parameters, $command->getParameters(), 'Must be able to get and set multiple parameter objects');\n }", "protected function _generateParams()\r\n { \r\n $this->_transactionalParams = array('EmailAddress' =>$this->_emailPostedData['emailInfos'], 'storeId'=>$this->_emailPostedData['storeId']);\r\n $this->_mapValuesWithAttributes(); \r\n }", "function getParameters(){ return $this->parameters; }", "function getParams()\n {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id = $id;\n }\n if (isset($mode)) {\n $this->mode = $mode;\n }\n if (isset($view_mode)) {\n $this->view_mode = $view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode = $edit_mode;\n }\n if (isset($tab)) {\n $this->tab = $tab;\n }\n }", "protected function actionParamsSets() {\n\t\treturn array();\n\t}", "public function saveParams()\r\n\t{\r\n\t\tforeach ($this->param_names as $param_name)\r\n\t\t{\r\n\t\t\t$funcname = 'get'.$param_name;\r\n\t\t\tif (_PS_VERSION_ < '1.5')\r\n\t\t\t\tConfiguration::updateValue('CERTISSIM_'.Tools::strtoupper($param_name), $this->$funcname());\r\n\t\t\telse\r\n\t\t\t\tConfiguration::updateValue('CERTISSIM_'.Tools::strtoupper($param_name), $this->$funcname(), false, null, $this->getIdshop());\r\n\t\t}\r\n\t}", "public function getArguments()\n {\n $args = $this->getArgs();\n $this->arguments = array();\n if (empty($this->arguments) && !empty($args) && count($args) > 0) {\n $this->arguments = array();\n $cls_name = $this->getClassName();\n $fct_name = $this->getFunctionName();\n\n if (\n empty($cls_name) &&\n !empty($fct_name) &&\n in_array($fct_name, self::$not_real_fcts)\n ) {\n return $this->arguments;\n }\n\n $methodReflect = $this->getFunction();\n if (!empty($methodReflect)) {\n $argumentsReflect = $methodReflect->getParameters();\n foreach ($this->getArgs() as $index => $value) {\n $ghost = false;\n if (isset($argumentsReflect[$index])) {\n $paramReflect = $argumentsReflect[$index];\n } else {\n $ghost = create_function('$param', 'return true;');\n $paramReflect = new \\ReflectionParameter($ghost, 'param');\n }\n if ($ghost!==false) {\n $this->arguments[$index] = new ReflectionParameterValue(\n $ghost, $paramReflect->getName(), $value\n );\n } elseif (!empty($cls_name)) {\n $this->arguments[$index] = new ReflectionParameterValue(\n array($cls_name, $fct_name), $paramReflect->getName(), $value\n );\n } else {\n $this->arguments[$index] = new ReflectionParameterValue(\n $fct_name, $paramReflect->getName(), $value\n );\n }\n }\n }\n }\n return $this->arguments;\n }", "public function prepareArguments() {}", "public function getParameters(/* ... */)\n {\n return $this->_params;\n }" ]
[ "0.6612234", "0.64751923", "0.6462426", "0.64622825", "0.64411336", "0.639625", "0.6370964", "0.6364432", "0.63498795", "0.6328017", "0.6328017", "0.6266476", "0.62619615", "0.6233893", "0.6233893", "0.621892", "0.62082124", "0.6174088", "0.61521715", "0.61432344", "0.61432344", "0.61432344", "0.61432344", "0.61432344", "0.61432344", "0.61432344", "0.61432344", "0.61432344", "0.61432344", "0.6110669", "0.6110669", "0.6110669", "0.6110669", "0.6110669", "0.6110669", "0.6110669", "0.6110669", "0.6100901", "0.6094163", "0.6091327", "0.6063842", "0.6052963", "0.6029221", "0.60266256", "0.6005111", "0.5976517", "0.5964502", "0.59473276", "0.59473276", "0.5932174", "0.59235555", "0.59129906", "0.59116906", "0.5880632", "0.58789194", "0.5878574", "0.58706087", "0.585384", "0.5852511", "0.5844282", "0.5842287", "0.583463", "0.5819468", "0.58182716", "0.58044285", "0.5798259", "0.5783206", "0.5782598", "0.5782598", "0.57771796", "0.57715446", "0.57715005", "0.57711184", "0.5768471", "0.5749872", "0.5744545", "0.5733237", "0.5732181", "0.5706786", "0.5692228", "0.56896687", "0.56627935", "0.5659862", "0.5653968", "0.56459963", "0.5638032", "0.5638032", "0.5638032", "0.5638032", "0.5617997", "0.56172174", "0.56120336", "0.5610402", "0.5601468", "0.56005526", "0.55945134", "0.5590875", "0.5586017", "0.55830646", "0.5578888", "0.55775243" ]
0.0
-1
add the route in validRoute
public static function set($route,$function) { self::$validRoute[] = $route; if ($_GET['url'] == $route) { $function->__invoke(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isValidRoute($route) {\n \n return $route == 'campus' ||\n $route == 'extended' ||\n $route == 'nathanBisk' ||\n $route == 'downtown';\n}", "public function addRoute()\n {\n if (!$this->route->isFulfilled()) {\n return $this->route->dispatch(func_get_args());\n }\n\n return true;\n }", "public function hasRoute(): bool;", "public static function isRouteValid()\n {\n global $Routes;\n $uri = $_SERVER['REQUEST_URI'];\n if (!in_array(explode('?', $uri)[0], $Routes, true)) {\n return 0;\n } else {\n return 1;\n }\n }", "public static function isRouteValid() {\r\n global $Routes;\r\n $uri = $_SERVER['REQUEST_URI'];\r\n\r\n if (!in_array(explode('?',$uri)[0], $Routes)) {\r\n return 0;\r\n } else {\r\n return 1;\r\n }\r\n }", "private function checkRoute()\n\t{\n\t $route = GlobalSystem::routeType();\n\t\tif(key_exists($route, RequestRoute::$routes)){\n\t\t\t$this->trigger = RequestRoute::$routes[$route][GlobalSystem::ExpRouteKeyTrigger];\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "private function buildRoutes($route) {\n\t\t$slash_toggle = false;\n\t\n\t\tif($route->getName() == \"route\") {\n\t\t\t\n\t\t\t//Route validation\n\t\t\tif(empty($route['id']))\n\t\t\t\treturn $this->failRoute(\"The ID attribute is missing\",$route);\n\t\t\n\t\t\tif(empty($route['pattern']) && empty($this->current_pattern))\n\t\t\t\treturn $this->failRoute(\"The PATTERN attribute is missing\",$route);\n\t\t\t\n\t\t\tif(empty($route['controller']) && empty($this->parent_class))\n\t\t\t\treturn $this->failRoute(\"The CONTROLLER attribute is missing\",$route);\n\t\t\t\t\n\t\t\tif(empty($route['method']) && empty($this->parent_method))\n\t\t\t\treturn $this->failRoute(\"The METHOD attribute is missing\",$route);\n\t\t\t\t\t\t\n\t\t\tif(!empty($route['pattern'])){\n\t\t\t\t\n\t\t\t\tif(preg_match('{^/.+}', $route['pattern']))\n\t\t\t\t\treturn $this->failRoute(\"The PATTERN attribute must not start with a / \", $route);\n\n\t\t\t\tif(!preg_match(\"%/$%\",$route['pattern'])) {\n\t\t\t\t\t$slash_toggle = true;\n\t\t\t\t\t$route['pattern'] = $route['pattern'] . '/';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->current_pattern[] = (string) $route['pattern'];\n\n\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t\tif(isset($route['method']))\n\t\t\t\t$this->parent_method = (string) $route['method'];\n\t\t\t\t\n\t\t\tif(isset($route['controller']))\n\t\t\t\t$this->parent_class = (string) $route['controller'];\n\t\n\t\t\t//Compile a route if validation passed\n\t\t\t$this->compiled_routes[(string)$route['id']] = array( \"pattern\" => implode(null,$this->current_pattern),\n\t\t\t\t\t\t\t\t\t\t\t \t\t\t \t\t \"controller\" => $this->parent_class,\n\t\t\t\t\t\t\t\t\t\t\t \t\t\t \t\t \"method\" => $this->parent_method,\n\t\t\t\t\t\t\t\t\t\t\t \t\t\t \t\t \"matches\" => $this->matches,\n\t\t\t\t\t\t\t\t\t\t\t \t\t\t \t\t \"regex\" => implode(null,$this->current_pattern));\n\t\t\t\n\t\t\t//Now remove the slash again if needs be\t\t\t\t\t\t\t\t \t\t\t \t\t \n\t\t\tif($slash_toggle == true) {\n\t\t\t\t$this->compiled_routes[(string)$route['id']]['pattern'] = rtrim($this->compiled_routes[(string)$route['id']]['pattern'],'/');\n\t\t\t}\n\t\t\t\n\t\t\t//Tag section - works out tags from the pattern to determine how many matches there should be\n\t\t\t$current_tags = $this->tags;\n\t\t\t$tag_count = count($current_tags);\n\t\t\t$temp_tags = array();\n\t\t\tpreg_match_all('%\\{{1}([^{}]+)\\}{1}%', (string) $route['pattern'], $tags);\n\t\t\tif(isset($tags[1])) {\n\t\t\t\tforeach($tags[1] as $key => &$value) {\n\t\t\t\t\t$temp_tags[$key+$tag_count] = $value;\n\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t$this->tags = array_merge($this->tags,array_flip($temp_tags));\n\t\t\t}\n\t\t\t\n\t\t\t//Recurse through the matches\n\t\t\tforeach($route->match as $match) {\n\t\t\t\tif($match->getName() == \"match\") {\n\t\t\t\t\tif(empty($match['name'])) {\n\t\t\t\t\t\t$this->failMatch(\"The NAME attribute must be set\",$match);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(empty($match[0])) {\n\t\t\t\t\t\t$this->failMatch(\"The TEXT value must be set\",$match);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(@preg_match(\"%\".$match[0].\"%\", \"\") === false) {\n\t\t\t\t\t\t$this->failMatch(\"The REGEX is invalid\",$match);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t//If the tag exists add it in to the matches\n\t\t\t\t\tif(isset($this->tags[(string)$match['name']])) {\n\t\t\t\t\t\t$position = $this->tags[(string) $match['name']];\n\t\t\t\t\t\t$this->compiled_routes[(string)$route['id']]['matches'][$position] = \n\t\t\t\t\t\t$this->matches[$position] = array( \"tag\" => (string)$match['name'], \"regex\" => (string)$match[0]);\n\t\t\t\t\t}\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//Re-order the keys to fill in any blanks in the matches so that they start at 0\n\t\t\t$this->compiled_routes[(string)$route['id']]['matches'] = array_values($this->compiled_routes[(string)$route['id']]['matches']);\n\t\t\t$this->matches = array_values($this->matches);\n\t\t\t\n\t\t\t\n\t\t\t//Save current patterns/matches here so after child recursion it has a copy before it was modified by the child\n\t\t\t$current_pattern = $this->current_pattern;\n\t\t\t$current_match = $this->matches;\t\t\t\n\t\t\t$this->compiled_routes[(string)$route['id']]['regex'] = $this->createRegularExpression($this->compiled_routes[(string)$route['id']]['pattern'],$this->matches);\n\t\n\t\t\t//Recurse children\n\t\t\tforeach($route->route as $childRoute) {\n\t\t\t\t\n\t\t\t\tif($childRoute->getName() == \"route\") {\n\t\t\t\t\t$this->buildRoutes($childRoute);\n\t\t\t\t}\n\n\t\t\t\t//Reset tags/patterns/matches back to saved values so that inheritance doesnt break peers on the same level\n\t\t\t\t$this->tags = $current_tags;\n\t\t\t\t$this->matches = $current_match; \n\t\t\t\t$this->current_pattern = $current_pattern;\n\t\t\t\t\t\n\t\t\t\tif(!empty($route['method']))\n\t\t\t\t\t$this->parent_method = (string) $route['method'];\n\t\t\t\n\t\t\t\tif(!empty($route['controller']))\n\t\t\t\t\t$this->parent_class = (string) $route['controller'];\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\t\n\t\t\n\t}", "private function _getRoute()\n {\n $route = str_replace($this->_registry->rootPath, '', $_SERVER['REQUEST_URI']);\n $routeParts = explode('/', $route);\n if ($routeParts[0]=='public') {\n $this->_registry->route = false;\n return true;\n }\n if (!empty($routeParts)) {\n $this->controller = $routeParts[0];\n if (!empty($routeParts[1])) {\n $this->action = strtolower($routeParts[1]);\n }\n }\n if (empty($this->controller)) {\n $this->controller = 'index';\n }\n if (empty($this->action)) {\n $this->action = 'index';\n }\n $this->_registry->route = $routeParts;\n // split to arguments;\n unset($routeParts[0], $routeParts[1]);\n if (empty($routeParts)) {\n $routeParts = array();\n }\n $arguments = array();\n foreach ($routeParts as $part) {\n $arguments[] = $part;\n }\n $this->_registry->args = $arguments;\n \n return true;\n }", "public static function validRoutes(){\n $routes = self::$urled;\n $urlroute = $_GET['url'];\n $response1 = 0;\n\n\n foreach ($routes as $route) {\n if($urlroute == $route){\n $response1 += 1;\n }\n }\n if($response1 == 0){\n $response = ['error'=>'404 - not valid url'];\n echo json_encode($response);\n\n }\n }", "function _validateRoute($route)\n {\n // Split on comma.\n $domains = explode(',', trim($route));\n\n foreach ($domains as $domain) {\n $domain = str_replace('@', '', trim($domain));\n if (!$this->_validateDomain($domain)) return false;\n }\n\n return $route;\n }", "public function checkingRoute()\n {\n\n global $route;\n $request = new Request;\n $requested_url = $request->server('QUERY_STRING');\n //!TEST\n // echo $requested_url;\n // echo '<br />';\n $requested_method = $request->server('REQUEST_METHOD');\n //! TEST\n // echo $requested_method;\n /* \n // $server_all = $request->serverAll();\n // echo '<pre>';\n // print_r($server_all);\n // echo '</pre>' ;\n // $route_object = new Route;\n */\n $all_routes = $route->getRoutingTable();\n\n // NOTE\n /*\n ! ezzay ana shayf Class Web and Route min 3'eer use key word \n ? routes/web.php & Core/Route.php\n */\n //!TEST\n // echo '<pre>';\n // print_r($all_routes);\n // echo '</pre>';\n\n foreach ($all_routes as $url => $info) {\n\n /* !//? to test $url returns\n echo '<pre>';\n print_r($url);\n echo '</pre>' ;\n */\n // // if ($requested_url == $url){\n if (preg_match($url,$requested_url , $matches )){\n if( $requested_method == strtolower($info['method'])) {\n $this->controller = $info['controller'];\n $this->action = $info['action'];\n $this->params = array_slice($matches , 1);\n return true ;\n }else{\n die(\"405 method does not exist\");\n }\n /* //!deprecated if statement (wrong else statement)\n // if ($requested_url != $single_route) {\n // die('404 url not found');\n // }\n // elseif ($requested_method != $info['method']) {\n // die('405 method not allowed');\n // }\n // else {\n // $this->controller = $info['controller'];\n // $this->method = $info['method'];\n // }\n */\n }\n // echo $this->controller;\n // echo '<br />';\n // echo $this->action ;\n // echo '<br />';\n }\n die(\"404 not found\");\n }", "protected function matchRoute($route) { \n \n $req = $this->getRequest();\n \n if($req['method'] != $route['method']) { return false; } \n $regex = $this->convertRoutePathToRegex($route['path']);\n \n $matches = false;\n \n preg_match_all($regex['regex'],$req['path'],$matches);\n //var_dump($matches);\n \n if(count($matches[0]) > 0) {\n foreach($regex['variables'] as $i=>$v) {\n $route['params'][$v] = $matches[($i+1)][0];\n }\n return $route;\n }\n \n return false;\n \n }", "public function matches(Route $route, Request $request);", "private function hasRouteParameters($route) {\n\n if (preg_match(\"/\\/:/\", $route)) {\n return true;\n }\n\n return false;\n }", "public function validate($data) {\n \tif (!isset($data->route) || empty($data->route)) {\n \t return parent::validate($data);\n \t}\n\n $route = rtrim(ltrim($data->route, Request::QUERY_SEPARATOR), Request::QUERY_SEPARATOR);\n\n $tokens = explode(Request::QUERY_SEPARATOR, $route);\n foreach ($tokens as $index => $token) {\n $token = String::safeString($token);\n\n if (empty($token)) {\n unset($tokens[$index]);\n } else {\n $tokens[$index] = $token;\n }\n }\n\n $data->route = implode(Request::QUERY_SEPARATOR, $tokens);\n\n try {\n parent::validate($data);\n $exception = new ValidationException();\n } catch (ValidationException $e) {\n \t$exception = $e;\n }\n\n $query = $this->createQuery(0, $data->dataLocale, false);\n $query->setFields('{id}');\n $query->addCondition('{parent} LIKE %1% AND {route} = %2% AND {id} <> %3%', $data->getRootNodeId() . self::PATH_SEPARATOR . '%', $data->route, $data->id);\n $node = $query->queryFirst();\n\n if ($node) {\n \t$error = new ValidationError(self::VALIDATION_ROUTE_ERROR_CODE, self::VALIDATION_ROUTE_ERROR_MESSAGE, array('route' => $data->route, 'node' => $node->id));\n $exception->addErrors('route', array($error));\n }\n\n if ($exception->hasErrors()) {\n \tthrow $exception;\n }\n }", "public function isRouteValid($route)\r\n {\r\n if (\"/\" === substr($route, 0, 1)) {\r\n return true;\r\n } else {\r\n $this->getRfMessages()->addError(\"The route should start with a '/'\");\r\n }\r\n\r\n return false;\r\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "private function getRoute(){\n\t}", "function _validateRouteAddr($route_addr)\n {\n // Check for colon.\n if (strpos($route_addr, ':') !== false) {\n $parts = explode(':', $route_addr);\n $route = $this->_splitCheck($parts, ':');\n } else {\n $route = $route_addr;\n }\n\n // If $route is same as $route_addr then the colon was in\n // quotes or brackets or, of course, non existent.\n if ($route === $route_addr){\n unset($route);\n $addr_spec = $route_addr;\n if (($addr_spec = $this->_validateAddrSpec($addr_spec)) === false) {\n return false;\n }\n } else {\n // Validate route part.\n if (($route = $this->_validateRoute($route)) === false) {\n return false;\n }\n\n $addr_spec = substr($route_addr, strlen($route . ':'));\n\n // Validate addr-spec part.\n if (($addr_spec = $this->_validateAddrSpec($addr_spec)) === false) {\n return false;\n }\n }\n\n if (isset($route)) {\n $return['adl'] = $route;\n } else {\n $return['adl'] = '';\n }\n\n $return = array_merge($return, $addr_spec);\n return $return;\n }", "abstract public function getRouteMatch();", "public static function route_exists($route){\n $route_parts = explode('/', trim($route, '/'));\n $total_size = count($route_parts);\n\n $possible_routes = array_filter(Router::$routes[$_SERVER['REQUEST_METHOD']], function ($route, $key) use ($total_size) {\n return $route['total_size'] === $total_size;\n }, ARRAY_FILTER_USE_BOTH);\n\n asort($possible_routes);\n\n foreach( $possible_routes as $key => $possible_route ){\n $new_key = explode('/', $key);\n $new_key = array_slice($new_key, 0 , $possible_route['total_size']-$possible_route['params_number']);\n\n $new_route = explode('/', $route);\n $new_route = array_slice($new_route, 0 , $possible_route['total_size']-$possible_route['params_number']);\n\n if( $new_key === $new_route ){\n if( $possible_route['params_number'] > 0 ){\n $possible_route['params'] = array_slice($route_parts, - $possible_route['params_number'] );\n } else {\n $possible_route['params'] = [];\n }\n return $possible_route;\n }\n }\n return false;\n }", "protected function defineRoute($method,$path,$fn,$paramsSequence) {\n \n $route = Array('method'=>$method,'path'=>$path,'fn'=>$fn,'paramsSequence'=>$paramsSequence);\n $this->_routes[] = $route;\n return true;\n \n }", "public function getRouteMatch();", "public function get_matched_route()\n {\n }", "abstract public function getRoute();", "private static function rerouteCheck()\n {\n if ( ! Session::isValid()) {\n if (Session::hasTrainer()) {\n // we have a trainer but not a student\n self::computeImpliedRoute();\n } else {\n (new LoginTemplate())->display();\n }\n }\n }", "function scanner(){\n if(strlen(trim(rtrim($_REQUEST[$this->routeParam])))>0){\n $this->resource = explode(\"/\", rtrim($_REQUEST[$this->routeParam]));\n $route = '/'.$this->resource[0];\n unset($this->resource[0]);\n $this->resource = implode('/',array_values($this->resource));\n if(in_array($route, $this->routeList)){\n $this->route = $route;\n }else{\n $this->route ='/404';\n }\n }else{\n $this->route='/';\n }\n }", "public function isActiveRoute();", "public function register_routes() {\n\n\t\t\\add_filter( 'do_parse_request', array( $this, 'handle_routing' ) );\n\n\t}", "private function checkURI()\n {\n // init vars\n $result = false;\n $uri = $this->getURI();\n $routesArray = $this->routes;\n\n // get existed rule for user requested uri\n foreach ($routesArray as $rulePattern => $path) {\n if (preg_match(\"~$rulePattern~i\", $uri)) {\n $result = [$rulePattern, $path];\n return $result;\n }\n }\n }", "public static function uriToRegex(Route $route)\n {\n if($route->uri{0} == \"/\" && !empty($route->uri{1}))\n $route->uri = substr($route->uri, 1);\n\n $regexUri = '/^' . preg_replace('/\\//', '\\/', $route->uri) . '\\/?$/';\n\n if(preg_match_all('/\\{([a-z]+):(.*?)\\}/', $route->uri, $preg)){\n for($i = 0; $i < count($preg[0]); $i++) {\n $regexUri = str_replace($preg[0][$i], '(' . $preg[2][$i] . ')', $regexUri);\n }\n }\n\n return $regexUri;\n }\n\n /**\n * Parse URI parameter names to array\n *\n * @param Route $route\n *\n * @return array\n */\n public static function parseParameterNames(Route $route)\n {\n $params = [];\n\n preg_match_all('/\\{([a-z]+):(.*?)\\}/', $route->uri, $preg);\n\n for($i = 0; $i < count($preg[0]); $i++){\n $params[] = $preg[1][$i];\n }\n\n return $params;\n }\n\n /**\n * Parse URI parameter patterns to array\n *\n * @param Route $route\n *\n * @return array\n */\n public static function parseParameterPatterns(Route $route)\n {\n $params = [];\n\n preg_match_all('/\\{([a-z]+):(.*?)\\}/', $route->uri, $preg);\n\n for($i = 0; $i < count($preg[0]); $i++){\n $params[] = $preg[2][$i];\n }\n\n return $params;\n }\n\n /**\n * Check the pattern to reflect the current address\n *\n * @param Route $route\n * @param Request $request\n *\n * @return bool\n */\n public static function parseUri(Route $route, Request $request)\n {\n if(preg_match($route->regexUri, $request->path(), $preg)) {\n\n $route->addParameters(static::parseParameters($route, $preg));\n\n return true;\n }\n\n return false;\n }\n\n /**\n * Retrieves all settings from the current address according to the pattern\n *\n * @param Route $route\n * @param array $preg\n *\n * @return array\n */\n public static function parseParameters(Route $route, array $preg)\n {\n $parameters = [];\n\n for($i = 1; $i < count($preg); $i++){\n $parameters[$route->parameterNames[$i - 1]] = $preg[$i];\n }\n\n return $parameters;\n }\n\n /**\n * Validate Route domain\n *\n * @param Route $route\n * @param Request $request\n * @return bool\n */\n public static function validateDomain(Route $route, Request $request)\n {\n if(!isset($route->action['domain']))\n return true;\n\n return self::parseDomain($route, $request);\n }\n\n /**\n * Check the pattern to reflect the current domain\n *\n * @param Route $route\n * @param Request $request\n * @return bool\n */\n public static function parseDomain(Route $route, Request $request)\n {\n $domain = $route->action['domain'];\n\n if($domain == $request->domain()) {\n return true;\n }\n\n $regex = '/' . preg_replace('/\\//', '\\/', $domain) . '/';\n $params = [];\n\n if(preg_match_all('/\\{([a-z]+):(.*?)\\}/', $domain, $preg)) {\n for($i = 0; $i < count($preg[0]); $i++){\n $params[] = $preg[1][$i];\n $regex = str_replace($preg[0][$i], '(' . $preg[2][$i] . ')', $regex);\n }\n\n if(!(preg_match($regex, $request->domain(), $preg))) {\n return false;\n }\n\n $parameters = [];\n\n for ($i = 0; $i < count($params); $i++) {\n $parameters[$params[$i]] = $preg[$i + 1];\n }\n\n $route->addParameters($parameters);\n\n return true;\n }\n\n return false;\n }\n\n /**\n * Verify CSRF token to route, if verification needs\n *\n * @param Route $route\n * @param Request $request\n *\n * @return bool\n */\n public static function csrfVerify(Route $route, CsrfToken $csrfToken)\n {\n if(!$route->csrf_verify)\n return true;\n\n return $csrfToken->check();\n }\n}", "function ci_use_route(){\n\t\t$c_uri=$this->uri->segments;\n\t\t$c_ruri=$this->uri->rsegments;\n\n\t\t//--- we re-introduice the directori in RURI\n\t\tif($this->router->directory!=''){\n\t\t\tarray_unshift($c_ruri , trim($this->router->directory,'/'));\n\t\t\t$i = 1;\n\t\t\tforeach ($c_ruri as $val) $c_ruri[$i++] = $val;\n\t\t\tunset($c_ruri[0]);\n\t\t}\n\n\t\tif(count($c_uri) > count($c_ruri))return true;\n\t\t//--- Now if URI == RURI => there is no used route.\n\t\tif(count($c_uri) == count($c_ruri)) return (implode('/',$c_uri)==implode('/',$c_ruri))? false:true;\n\n\t\tfor($i=1;$i <= count($c_uri);$i++) {\n\t\t\tif($c_uri[$i]!=$c_ruri[$i]) return true;\n\t\t}\n\t\treturn false;\n\t}", "private static function registerRoute($route){\r\n global $Routes;\r\n $Routes[] = BASEDIR.$route;\r\n }", "protected function parseRoute()\n { \n $matches = explode(\"/\", $this->route);\n\n $pattern = '/^([a-zA-Z0-9_-])+$/';\n \n if (preg_match($pattern, $matches[0])) {\n $this->controller = ucfirst(strtolower($matches[0]));\n }\n\n if (!empty($matches[1]) && preg_match($pattern, $matches[1])) {\n $this->action = $this->convert($matches[1]);\n }\n }", "public function checkRoute()\n\t{\n\t\tif(!self::$load):\n\t\t\thttp_response_code(404);\n\t\t\tdie('No route found');\n\t\tendif;\n\t}", "public function isOnRoute(): bool\n {\n $lang = $this->grav['language']->getActive();\n\n $path = $this->grav['uri']->rootUrl() ?: '/';\n $routes = $this->config->get('plugins.' . $this->name . '.routes');\n\n foreach ($routes as $route) {\n ['blog' => $blog, 'items' => $items] = $route;\n if ($path === $blog || str_starts_with($path, $items)) {\n if ($lang) {\n $route['blog'] = '/' . $lang . $route['blog'];\n $route['items'] = '/' . $lang . $route['items'];\n }\n $this->routes = $route;\n\n return true;\n }\n }\n\n return false;\n }", "abstract public function addRoute($url, $ctrl, $mth);", "protected function registerRouteBindings()\n {\n //\n }", "private function bindRoute(): void\n {\n if (isset($this->route)) {\n return;\n }\n $this->route = new SymfonyRoute('');\n }", "public function execute(Request $request, Route $route) : bool{\n\n $pattern = str_replace('{', '(?P<', str_replace('}', '>[a-zA-Z0-9-_.,:;()]+)', $route->getUrlPattern()));\n $matches = [];\n\n if(preg_match('#^'.$pattern.'$#', $request->getUrl()->getUri(), $matches)){\n foreach($matches as $key => $value){\n if(!is_int($key)){\n $request->getParameters()->add($key, $value);\n }\n }\n return true;\n }\n return false;\n }", "public function getRoute()\n {\n }", "protected function checkRoute()\n {\n if (Router::current() === null) {\n return $this->error(404);\n }\n }", "public static function checkRoute($_regex) {\n\t\tif (preg_match(\n\t\t\t'/('.self::HTTP_Methods.')\\s+(.*)/i',$_regex,$_route))\n\t\t\t\treturn array_slice($_route,1);\n\t\t// Invalid route\n\t\tself::$global['CONTEXT']=$_regex;\n\t\ttrigger_error(self::TEXT_Route);\n\t\treturn FALSE;\n\t}", "public function getRoute();", "public function isAdminRoute();", "function route_match() {\n global $route;\n global $html;\n global $config;\n global $matched_route;\n\n $url = explode('index.php', $_SERVER['REQUEST_URI']);\n $url = @str_replace('.', '', substr($url[1], 1));\n if(strpos($url, '?') !== false) {\n $url = explode('?', $url);\n $url = $url[0];\n }\n\n if(!$url) {\n $matched_route = 'ROOT';\n require_once __DIR__ . '/app/' . $route['ROOT'];\n return true;\n }\n\n if(substr($url, -1) == '/') {\n $url = substr($url, 0, -1);\n }\n\n // Check for simple route match\n if(array_key_exists($url, $route)) {\n $matched_route = $url;\n require_once __DIR__ . '/app/' . $route[$url];\n return true;\n }\n\n // Check for regex\n foreach($route as $r => $page) {\n $matches = array();\n\n if(preg_match('#' . $r . '$#', $url, $matches)) {\n array_shift($matches);\n\n $_GET['custom_arguments'] = $matches;\n\n $matched_route = $r;\n require_once __DIR__ . '/app/' . $page;\n return true;\n }\n }\n\n return false;\n}", "protected function _checkRoutes($segments)\n {\n $routes = $this->_routes;//Config::getInstance()->get('routes');\n $max = count($segments);\n if ($max === 1){\n foreach ($routes as $key=>$value) {\n if ($key == $segments[0]) {\n $segments[0] = $value;\n }\n } \n } else {\n $url = $this->_createUrl($segments);\n foreach ($routes as $key=>$value) {\n if ($key === $url) {\n $url = $value;\n }\n }\n $segments = $this->uri->explodeUrl($url);\n }\n \n $this->_segments = $segments;\n }", "protected function _process_field_route($value)\n {\n $this->_validation('route', $value, array($this, 'unique'), array('field'=>'route'));\n return $value;\n }", "public abstract function addRoute($nombrePuntoInicial_,$descripcionPuntoInicial_,$nombrePuntoFinal_,\n $descripcionPuntoFinal_,$coordenadas_,$estiloCoordenada_,$coordenadaInicial_,$coordenadaFinal_);", "public function get_route()\n {\n }", "public function handled($rt = '')\n {\n $uriSegmentsInThisRoute = explode('/', $this->urlToMatch);\n $uriSegmentsInRequestedRoute = explode('/', $rt);\n\n if (count($uriSegmentsInRequestedRoute) == count($uriSegmentsInThisRoute)) {\n $thisUrlUpToFirstDollarSign = explode('/$',$this->urlToMatch)[0];\n $numberOfSegmentsUpToFirstDollarSign = count( explode('/',$thisUrlUpToFirstDollarSign) );\n $theyMatch = true;\n for( $i=0; $i<$numberOfSegmentsUpToFirstDollarSign; $i++ ) {\n if ( strcmp($uriSegmentsInThisRoute[$i],$uriSegmentsInRequestedRoute[$i]) <> 0 ) {\n $theyMatch = false;\n break;\n }\n }\n\n if ( $theyMatch ) {\n if ($this->processMiddleWare()==true) {\n // have to explode these two again, in case middleware changed anything\n $uriSegmentsInThisRoute = explode('/',$this->urlToMatch);\n $uriSegmentsInRequestedRoute = explode('/', $rt);\n $NumberOfParams = count(explode('$',$this->urlToMatch)) - 1;\n $params = array();\n for ($i = count($uriSegmentsInThisRoute) - $NumberOfParams; $i < count($uriSegmentsInThisRoute); $i++) {\n $params[] = $uriSegmentsInRequestedRoute[$i];\n }\n \\ipinga\\log::ipinga('Route {'. $this->identifier .'} ('. $this->urlToMatch. ') fired!');\n self::launchController($this->controller, $this->method, $params);\n $this->fired = true;\n return true;\n } else {\n \\ipinga\\log::ipinga('Route {'. $this->identifier .'} middcleware refused');\n }\n }\n\n }\n\n return false;\n\n }", "private function matchRoute($route) {\n // Route match exactly with the url?\n if ($route === $this->url) {\n return true;\n }\n\n $regex = str_replace(['/', ')', ':word', ':num'], ['\\/', ')?', '[\\w_-]+', '[\\d-]+'], $route);\n if (preg_match('~^' . $regex . '$~', $this->url)) {\n return true;\n }\n return false;\n }", "public function addRoute($route, $callback){\n if (is_array($route)){\n foreach ($route as $actual){\n $this->addRoute($actual, $callback);\n }\n return;\n }\n\n //Turn the route into a valid regex\n $route = preg_replace(\n '#:('.self::TOKEN_PATTERN.')#', \n '('.self::TOKEN_PATTERN.')', \n $route\n );\n $this->routes[\"#^{$route}/?$#\"] = $callback;\n }", "public function route()\n\t{\n\t\t/* [http|https]/[Ajax|]/[Get|Post|Delete|Put]/uri */\n\t\t$this->route = $this->route_raw = ($this->c->Request->is_https ? 'https' : 'http').'/'.($this->c->Request->is_ajax ? 'Ajax' : '').'/'.$this->c->Request->request.'/'.$this->c->Request->uri;\n\n\t\t/* call dispatch event */\n\t\t$this->c->Event->preRouter();\n\n\t\t/* rewrite dispatch route */\n\t\tforeach ($this->c->router['routes'] as $regexpath => $switchto) {\n\t\t\tif (preg_match($regexpath, $this->route)) {\n\t\t\t\t/* we got a match */\n\t\t\t\t$this->route = preg_replace($regexpath, $switchto, $this->route);\n\t\t\t\t$this->route_matched = $regexpath;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t/* call dispatch event */\n\t\t$this->c->Event->postRouter();\n\n\t}", "public function test_match_fromInvalidPatternWithoutVars()\n {\n $route = new Route('GET', '/home', 'test');\n $this->assertFalse(\n $route->match('GET', '/test'),\n 'match() must return true if URI pattern provided is the same as the one specified in constructor.'\n );\n }", "function _route()\n\t{\n\t\t// if the user login redirect to base\n\t\tif(\\lib\\permission::access('enter:another:session'))\n\t\t{\n\t\t\t// the admin can login by another session\n\t\t\t// never redirect to main\n\t\t}\n\t\telse\n\t\t{\n\t\t\tparent::if_login_not_route();\n\t\t}\n\n\t\t// check remeber me is set\n\t\t// if remeber me is set: login!\n\t\tparent::check_remember_me();\n\n\t\t// save all param-* | param_* in $_GET | $_POST\n\t\t$this->save_param();\n\n\t\tif(self::get_request_method() === 'get')\n\t\t{\n\t\t\t$this->get(false, 'enter')->ALL();\n\t\t}\n\t\telseif(self::get_request_method() === 'post')\n\t\t{\n\t\t\t$this->post('enter')->ALL();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tself::error_method('home');\n\t\t}\n\t}", "function\taddRoute($routeData){\n\t\t//$this->routes[] = $route;\n\t\t$this->routes[] = $routeData;\n\t}", "function wp_oembed_register_route()\n {\n }", "public function allow($route)\n {\n if (!in_array($route, $this->step->allowed)) {\n $this->step->allowed[] = $route;\n LilyModule::instance()->session->data->userInitData->steps[$this->stepId]->allowed[] = $route;\n LilyModule::instance()->session->save();\n }\n }", "public function set_matched_route($route)\n {\n }", "private static function registerRoute($route)\n {\n global $Routes;\n $Routes[] = \"/\".$route;\n }", "function add_route($route, callable $closure)\n\n {\n// $route = self::APP_PREFIX.$route;\n// die($route);\n $this->routes[$route] = $closure;\n }", "public function match_route($http_verb, $uri) {\n return false;\n }", "public function get_route($request_route) {\n\n\n if (array_key_exists($request_route[\"_method\"], $this->_routes)) {\n\n if (array_key_exists($request_route[\"_rule\"], $this->_routes[$request_route[\"_method\"]])) {\n return $this->_routes[$request_route[\"_method\"]][$request_route[\"_rule\"]];\n } else { // search for match routes\n\n foreach ($this->_routes[$request_route[\"_method\"]] as $_route) {\n\n if ($_route->_match) {\n\n $request_rule = explode(\"/\", trim($request_route[\"_rule\"], \"/\"));\n $permit_rule = explode(\"/\", trim($_route->_rule, \"/\"));\n\n if (count($request_rule) == count($permit_rule)) {\n $match = true;\n foreach ($request_rule as $index => $value) {\n\n if (($request_rule[$index] != $permit_rule[$index]) and ($permit_rule[$index] != ApplicationRoute::dynamical_segment)) {\n $match = false;\n break;\n }\n }\n if ($match) {\n\n $permit_match_rule = explode(\"/\", trim($_route->_match_rule, \"/\"));\n preg_match_all('@:([\\w]+)@', $_route->_match_rule, $segments, PREG_PATTERN_ORDER);\n $segments = $segments[0];\n\n // get methodları için locals'a yükle : değişkenler\n foreach ($segments as $segment) {\n if ($index = array_search($segment, $permit_match_rule)) {\n $_route->_locals[substr($segment, 1)] = $request_rule[$index];\n }\n }\n\n return $_route;\n }\n }\n }\n }\n }\n return null;\n //throw new ConfigurationException(\"Böyle bir yönlendirme mevcut değil\", $request_route[\"_method\"] . \":\" . $request_route[\"_rule\"]);\n }\n throw new ConfigurationException(\"Uzay çağında bizim henüz desteklemediğimiz bir method\", $request_route[\"_method\"]);\n }", "protected function _parse_routes()\n {\n $uri = implode('/', $this->uri->segments);\n\n // Get HTTP verb\n $http_verb = isset($_SERVER['REQUEST_METHOD']) ? strtolower($_SERVER['REQUEST_METHOD']) : 'cli';\n\n // Is there a literal match? If so we're done\n if (isset($this->routes[$uri])) {\n // Check default routes format\n if (is_string($this->routes[$uri])) {\n $this->_set_request(explode('/', $this->routes[$uri]));\n return;\n }\n // Is there a matching http verb?\n elseif (is_array($this->routes[$uri]) && isset($this->routes[$uri][$http_verb])) {\n $this->_set_request(explode('/', $this->routes[$uri][$http_verb]));\n return;\n }\n }\n\n // decryption of module/controller/function name in admin\n if ($this->config->item('is_admin') == 1) {\n if ($this->config->item('ADMIN_URL_ENCRYPTION') == 'Y') {\n $uri_t = str_replace('admin/', '', $uri);\n if ($uri_t != \"\") {\n require_once(APPPATH . '/libraries/Ci_encrypt.php');\n $CI_Enc = new Ci_encrypt();\n $uri_t_decode = $CI_Enc->decrypt($uri_t, true);\n $CI_Enc->convertEncryptedVars();\n }\n $uri = 'admin/' . $uri_t_decode;\n }\n }\n // Loop through the route array looking for wildcards\n foreach ($this->routes as $key => $val) {\n // Check if route format is using http verb\n if (is_array($val)) {\n if (isset($val[$http_verb])) {\n $val = $val[$http_verb];\n } else {\n continue;\n }\n }\n\n // Convert wildcards to RegEx\n #$key = str_replace(array(':any', ':num'), array('[^/]+', '[0-9]+'), $key);\n $key = str_replace(':any', '.+', str_replace(':num', '[0-9]+', $key));\n\n // Does the RegEx match?\n if (preg_match('#^' . $key . '$#', $uri, $matches)) {\n // Are we using callbacks to process back-references?\n if (!is_string($val) && is_callable($val)) {\n // Remove the original string from the matches array.\n array_shift($matches);\n\n // Execute the callback using the values in matches as its parameters.\n $val = call_user_func_array($val, $matches);\n }\n // Are we using the default routing method for back-references?\n elseif (strpos($val, '$') !== FALSE && strpos($key, '(') !== FALSE) {\n $val = preg_replace('#^' . $key . '$#', $val, $uri);\n }\n\n $this->_set_request(explode('/', $val));\n return;\n }\n }\n\n // If we got this far it means we didn't encounter a\n // matching route so we'll set the site default route\n $this->_set_request(array_values($this->uri->segments));\n }", "public function match(ServerRequestInterface $request, Route $route): bool\n {\n $uri = $request->getUri()->getPath();\n $path = $this->generatePath($route);\n\n if (!preg_match(\"#^$path$#i\", $uri, $matches)) {\n return false;\n }\n\n array_shift($matches);\n $route->setParameters($matches);\n\n return true;\n }", "function _parse_routes()\n {\n // Do we even have any custom routing to deal with?\n // There is a default scaffolding trigger, so we'll look just for 1\n if (count($this->routes) == 1)\n {\n $this->_set_request($this->uri->segments);\n return;\n }\n\n // Turn the segment array into a URI string\n $uri = implode('/', $this->uri->segments);\n\n // Is there a literal match? If so we're done\n if (isset($this->routes[$uri]))\n {\n $this->_set_request(explode('/', $this->routes[$uri]));\n return;\n }\n\n //Art\n $i = $this->_search_by_key($this->routes, self::MAIN, $uri);\n if ($i !== FALSE)\n {\n $this->_set_request(explode('/', $this->routes[$i][self::ROUTE]));\n return;\n }\n\n // Loop through the route array looking for wild-cards\n foreach ($this->routes as $key => $val)\n {\n if(is_int($key))\n {\n $key = $val[self::MAIN];\n $val = $val[self::ROUTE];\n }\n // Convert wild-cards to RegEx\n $key = str_replace(':any', '.+', str_replace(':num', '[0-9]+', $key));\n\n // Does the RegEx match?\n if (preg_match('#^'.$key.'$#', $uri))\n {\n // Do we have a back-reference?\n if (strpos($val, '$') !== FALSE AND strpos($key, '(') !== FALSE)\n {\n $val = preg_replace('#^'.$key.'$#', $val, $uri);\n }\n $this->_set_request(explode('/', $val));\n return;\n }\n }\n\n // If we got this far it means we didn't encounter a\n // matching route so we'll set the site default route\n $this->_set_request($this->uri->segments);\n }", "public static function GenerateRoute () {\n // Failed or invalid attempts need to render a different view (and have the model be null);\n }", "public function hasRoute(string $name): bool;" ]
[ "0.65088886", "0.64860696", "0.6448493", "0.6342183", "0.63029563", "0.6230435", "0.61523527", "0.61438507", "0.60752565", "0.60367197", "0.60242635", "0.6014128", "0.6003677", "0.59969854", "0.59866077", "0.59743226", "0.5971961", "0.5971961", "0.5971961", "0.5971961", "0.5971961", "0.5971961", "0.5971961", "0.5971961", "0.5971961", "0.5971961", "0.5971961", "0.5971961", "0.5971961", "0.5971961", "0.5971961", "0.5971961", "0.5971961", "0.5971961", "0.5971961", "0.5971961", "0.5971961", "0.5971961", "0.5971961", "0.5971961", "0.5971961", "0.5971961", "0.5971961", "0.5971961", "0.5971961", "0.5971961", "0.5971961", "0.5971961", "0.59705865", "0.59606266", "0.59174275", "0.59069103", "0.58895856", "0.5888188", "0.58652776", "0.586092", "0.5849023", "0.583394", "0.58258146", "0.5806581", "0.58021724", "0.5788584", "0.57876617", "0.5783097", "0.578158", "0.5766439", "0.57624996", "0.5750845", "0.5745934", "0.5745208", "0.57310367", "0.57183135", "0.570597", "0.5685888", "0.567386", "0.5654096", "0.5652802", "0.56522256", "0.56504786", "0.56444466", "0.56403595", "0.5636346", "0.56006294", "0.55739766", "0.5570744", "0.5560667", "0.555773", "0.55551994", "0.5549606", "0.5549381", "0.5545762", "0.5541357", "0.55348533", "0.55301833", "0.552789", "0.5527413", "0.552675", "0.55264443", "0.55244595", "0.55239856", "0.5522347" ]
0.0
-1
Find all files having the given extension
public function findFilesWithExtension($directory, $extension) { $this->validateInput($directory, $extension); $this->finder->in($directory) ->name('*.'.$extension) ; $results = $this->getFinderResult(); return $results; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _get_files($ext=false)\n\t{\n\t\t\n\t\t$files = PerchUtil::get_dir_contents(PERCH_RESFILEPATH);\n\n\t\t$returnfiles = array();\n\t\tif(PerchUtil::count($files) > 0) {\n\t\t\tforeach($files as $file) {\n\t\t\t\t// if a file extension has been provided only add files with that extension\n\t\t\t\tif($ext) {\n\t\t\t\t\tif(strtolower(trim($ext)) == strtolower(PerchUtil::file_extension($file))) {\n\t\t\t\t\t\t$returnfiles[] = array('label'=>$file, 'value'=>$file);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// prepare all files for display\n\t\t\t\t\t$returnfiles[] = array('label'=>$file, 'value'=>$file);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(PerchUtil::count($returnfiles) > 0) {\n\t\t\treturn $returnfiles;\n\t\t} else {\t\n\t\t\treturn false;\n\t\t}\n\t}", "protected function _findFiles($extensions = '') {\n\t\t$this->_files = [];\n\t\tforeach ($this->_paths as $path) {\n\t\t\tif (!is_dir($path)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$Iterator = new RegexIterator(\n\t\t\t\tnew RecursiveIteratorIterator(new RecursiveDirectoryIterator($path)),\n\t\t\t\t'/^.+\\.(' . $extensions . ')$/i',\n\t\t\t\tRegexIterator::MATCH\n\t\t\t);\n\t\t\tforeach ($Iterator as $file) {\n\t\t\t\t$excludes = ['Config'];\n\t\t\t\t//Iterator processes plugins even if not asked to\n\t\t\t\tif (empty($this->params['plugin'])) {\n\t\t\t\t\t$excludes = array_merge($excludes, ['Plugin', 'plugins']);\n\t\t\t\t}\n\t\t\t\tif (empty($this->params['vendor'])) {\n\t\t\t\t\t$excludes = array_merge($excludes, ['Vendor', 'vendors']);\n\t\t\t\t}\n\t\t\t\tif (!empty($excludes)) {\n\t\t\t\t\t$isIllegalPluginPath = false;\n\t\t\t\t\tforeach ($excludes as $exclude) {\n\t\t\t\t\t\tif (strpos($file, $path . $exclude . DS) === 0) {\n\t\t\t\t\t\t\t$isIllegalPluginPath = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ($isIllegalPluginPath) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($file->isFile()) {\n\t\t\t\t\t$this->_files[] = $file->getPathname();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function test_search_by_extension()\n {\n $object = Directory::factory(ROOT);\n $res = $object->search_by_extension(array('php'));\n \n $this->assertArrayHasKey(ROOT.DS.'index.php', $res);\n }", "function get_files($images_dir,$exts = array('jpg')) {\n $files = array();\n if($handle = opendir($images_dir)) {\n while(false !== ($file = readdir($handle))) {\n $extension = strtolower(get_file_extension($file));\n if($extension && in_array($extension,$exts)) {\n $files[] = $file;\n }\n }\n closedir($handle);\n } else { echo \"Unable to read $images_dir directory!\"; }\n return $files;\n}", "public function findFiles();", "protected function findFilesWithExtension(string $dir, string $extension)\n {\n if(! Str::startsWith($extension, '.')) $extension = \".$extension\";\n\n return array_filter($this->findFiles($dir), function($file) use($extension){\n return Str::endsWith($file, $extension);\n });\n }", "public function getFiles($extensions = array())\n\t{\n\t\t$allFiles = array();\n\t\tforeach($this->words as $word){\n\t\t\tforeach($word->getOccurrences() as $file => $lines){\n\t\t\t\tif(!empty($extensions)){\n\t\t\t\t\tif(preg_match('/\\.([a-z0-9A-Z]*)$/', $file, $matches)\n\t\t\t\t\t\t&& in_array($matches[1], $extensions)){\n\n\t\t\t\t\t\t$allFiles[$file] = $file;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$allFiles[$file] = $file;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $allFiles;\n\t}", "public function fileExtensions($mimeType);", "function getAllFiles($dir, $ext)\n {\n $dirIterator = new RecursiveDirectoryIterator($dir);\n $fileIterator = new RecursiveIteratorIterator($dirIterator);\n $files = array();\n foreach ($fileIterator as $file) {\n if ($file->isFile() && strrpos($file->getPathname(), \".{$ext}\")) {\n $filename = str_replace('\\\\', '/', $file->getPathname());\n $files[] = str_replace(\"{$dir}/\", '', $filename);\n }\n }\n return $files;\n }", "function _findExtensionFiles() {\r\n\t\r\n\t\t\tif (empty($this->_extensionsPath)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\r\n\t\t\t//make sure we only get the package files in that directory\r\n\t\t\t$zipFiles = JFolder::files($this->_extensionsPath, '\\.zip$', false, false);\r\n\t\t\t$gzFiles = JFolder::files($this->_extensionsPath, '\\.gz$', false, false);\r\n\t\t\t$bz2Fies = JFolder::files($this->_extensionsPath, '\\.bz2$', false, false);\r\n\t\t\t$files = array_merge($zipFiles, $gzFiles, $bz2Fies);\r\n\t\r\n\t\t\tif (count($files) > 0) {\r\n\t\t\t\t$this->_packageFiles = $files;\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}", "public function findAllClassFiles($extension = NULL) {\n $classmap = [];\n $namespaces = $this->registerTestNamespaces();\n if (isset($extension)) {\n // Include tests in the \\Drupal\\Tests\\{$extension} namespace.\n $pattern = \"/Drupal\\\\\\(Tests\\\\\\)?$extension\\\\\\/\";\n $namespaces = array_intersect_key($namespaces, array_flip(preg_grep($pattern, array_keys($namespaces))));\n }\n foreach ($namespaces as $namespace => $paths) {\n foreach ($paths as $path) {\n if (!is_dir($path)) {\n continue;\n }\n $classmap += static::scanDirectory($namespace, $path);\n }\n }\n return $classmap;\n }", "public function getSupportedFileExtensions() {}", "function getFilesByMime($folder, $mime_types, $depth = 0, $extensions = NULL) {\n\t$found = array();\n\t\n\tif(!is_array($mime_types))\n\t\t$mime_types = array($mime_types);\n\t\n\tif($extensions) {\n\t\tif(is_array($extensions)) \n\t\t\t$extensions = implode(',', $extensions);\n\t\t\n\t\t$extensions = '.{' . $extensions . '}';\n\t}\n\t\n\tif($depth) foreach(range(1, $depth) as $i) {\n\t\t$parts[] = str_repeat('*/', $i);\n\t}\n\t\n\t$recursion = '{' . implode(',', $parts) . '}';\n\t\n\t$files = glob(\"{$folder}/{$recursion}*{$extensions}\", GLOB_BRACE);\n\t\n\t$finfo = finfo_open(FILEINFO_MIME_TYPE);\n\t\n\tforeach($files as $path) {\n\t\tif(!is_readable($path))\n\t\t\tcontinue;\n\t\t\n\t\t$mime = finfo_file($finfo, $path);\n\t\t\n\t\tforeach($mime_types as $allowed) {\n\t\t\tif(strpos($mime, $allowed) !== FALSE) {\n\t\t\t\t$found[] = $path;\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn $found;\n}", "public function extension($filePath);", "public static function mimeTypesOfExtension($extension)\n {\n $mimeTypesMatched = [];\n foreach (self::$MYMETYPE_EXTENSIONS as $mime => $extensions) {\n if (in_array($extension, $extensions)) {\n $mimeTypesMatched[] = $mime;\n }\n }\n return $mimeTypesMatched;\n }", "public function collectFile($dir, $ext)\n {\n if (false !== ($dir = opendir(plugins_path('/samubra/training/classes/'.$dir)))) {\n $files = array();\n while (false !== ($file = readdir($dir))) {\n if (preg_match(\"/\\\\.$ext\\$/i\", $file)) {\n $files[] = $file;\n }\n }\n return $files;\n }\n return false;\n }", "public function getFilesInDirDoesNotFindDotfiles() {}", "public function getFileExtension();", "function rex_com_mediaaccess_getExtensionsSendfile()\n{\n global $REX;\n\n $classes = array();\n\n foreach($REX['ADDON']['community']['plugin_mediaaccess']['extension_sendfile_dir'] as $path)\n {\n if($dir = opendir($path))\n {\n while($file = readdir($dir))\n {\n if(!is_dir($file))\n {\n $classname = explode(\".\", $file);\n $class = $classname[1];\n\n if(file_exists($path.$file))\n {\n include_once($path.$file);\n $classes[] = $class;\n }\n }\n }\n closedir($dir);\n }\n }\n\n return $classes;\n}", "public function checkExtensions()\n {\n $extensions = array(\n 'fileinfo',\n 'pdo',\n 'mbstring',\n 'tokenizer',\n 'openssl',\n 'json',\n 'curl',\n 'xml'\n );\n\n $results = array();\n\n foreach ($extensions as $extension) {\n $results[$extension] = extension_loaded($extension);\n }\n\n return $results;\n }", "public function findAllFiles($filename)\n {\n $pinfo = pathinfo($filename);\n $extension = $pinfo['extension'];\n $dir = $pinfo['dirname'] == '.' ? '' : $pinfo['dirname'] . '/';\n $file_relative_path_root = $dir . $pinfo['filename'];\n \n $foundFiles = [];\n \n $pattern = $file_relative_path_root . '.' . $extension . '*';\n \n foreach ($this->paths as $assetsRoot) {\n $foundFiles = array_merge($foundFiles, Rails\\Toolbox\\FileTools::searchFile($assetsRoot, $pattern));\n }\n \n return $foundFiles;\n }", "function scan_directory($dir, $ext = '*', $recurse = true) {\n $files = array ();\n if ($handle = opendir($dir)) {\n while (false !== ($file = readdir($handle))) {\n if ($file == '.' || $file == '..' ||\n $file == 'CVS' || preg_match('|^\\.|', $file)) {\n continue;\n }\n if (is_link($dir . '/' . $file)) {\n continue;\n }\n if (is_dir ($dir . '/' . $file)) {\n if ($recurse == true)\n $files = array_merge($files, scan_directory ($dir . '/' . $file, $ext));\n } else {\n if($ext == get_file_extension($file) || $ext == '*') {\n $files[] = $dir . '/' . $file;\n }\n }\n }\n closedir($handle);\n }\n return $files;\n}", "protected function getFiles( array $extensions = null ) {\n\t\treturn $this->projectReader->getFiles( $extensions );\n\t}", "public function getExtensionsFromSingleInstance($file) {\n\t\tif($file{strlen($file)-1} != DIRECTORY_SEPARATOR ) $file .= DIRECTORY_SEPARATOR;\n\t\treturn glob($file.'typo3conf'.DIRECTORY_SEPARATOR.'ext'.DIRECTORY_SEPARATOR.'*', GLOB_ONLYDIR);\n\t}\n\n}", "function find_all_files($dir) \n{ \n $files = array();\n foreach (glob($dir) as $file) {\n $files[] = $file;\n }\n return $files;\n}", "public static function mimes_by_ext($extension)\r\n {\r\n $mimes = Core::config('mimes');\r\n\r\n return isset($mimes[$extension])?((array)$mimes[$extension]):array();\r\n }", "function getPathArray($file_extension)\n{\n if ($file_extension == 0) {\n $path = glob(\"./videos/*.mp4\");\n } elseif ($file_extension == 1) {\n $path = glob(\"./videos/*.srt\");\n }\n return $path;\n}", "public function getFiles()\n {\n $dir = $this->getDir();\n\n return array_filter(array_map(function ($file) use ($dir) {\n if (is_file($dir.$file) && pathinfo($file, PATHINFO_EXTENSION) == 'php') {\n return $dir.$file;\n }\n }, scandir($dir)));\n }", "public function getFilesByTypeRecursively($folder, $extension)\n {\n return $this->getFilesByType($folder, $extension, true);\n }", "protected function files($filepath)\n {\n if ($filepath && $this->language) {\n return glob($filepath.$this->language.'/*.lang');\n }\n }", "public function loadFiles()\n\t{\n\t\t$files = array();\n\t\t\n\t\t$searchPath = $this->getLocalFolder().\"/*.*\";\n\t\t$filesArray = glob($searchPath);\n\t\t\n\t\tforeach($filesArray as $file)\n\t\t{\n\t\t\t$files[] = new File($file);\n\t\t}\n\t\t\n\t\treturn $files;\n\t}", "function getMyFiles($userID, $ext = 'bed')\n{\n\t$directory = DIR_UPLOADS . '/' . $userID . '/';\n\t//$files = array_diff(scandir($directory), array('..', '.'));\n\t$files = array_diff(glob($directory . '/*.' . $ext), array('..', '.'));\n\t$files2= array_diff(glob($directory . '/*.' . $ext . '.gz'), array('..', '.'));\n\t$files = array_merge($files, $files2);\n\n\t// file_put_contents('wtf', print_r($files, true));\n\n\t$result = array();\n\tforeach($files as $file)\n\t\tif(pathinfo($filename, PATHINFO_EXTENSION) != $ext)\n\t\t\t$result[] = basename($file);\n\treturn $result;\n}", "private function findFiles($directory, $extensions = array())\r\n {\r\n $directory = ROOT_DIR_NAME;\r\n\r\n if($this->check_search_directory($directory))\r\n {\r\n $search = $this->filter_search_str($this->search);\r\n $directories = array();//\"\";\r\n function glob_recursive($directory, &$directories = array(), $search)\r\n {\r\n foreach(glob($directory, GLOB_ONLYDIR | GLOB_NOSORT) as $folder)\r\n {\r\n $directories[] = $folder;\r\n glob_recursive(\"{$folder}/*\", $directories, $search);\r\n }\r\n }\r\n @glob_recursive($directory, $directories, $search);\r\n $files = array ();\r\n foreach($directories as $directory)\r\n {\r\n $slashes = \"../\";\r\n if(strpos($directory, \"..//\") !== FALSE)\r\n {\r\n $slashes = \"..//\";\r\n }\r\n if (in_array(str_replace($slashes, \"\", $directory), $this->ignored)) continue;\r\n $this->find_all_files($directory, $extensions, $search);\r\n /*foreach($extensions as $extension)\r\n {\r\n foreach(glob(\"{$directory}/{$search}.{$extension}\") as $file)\r\n {\r\n $files[$extension][] = $file;\r\n $filename = str_replace(\"..//\", \"\", $file);\r\n $this->root_files_folders[$filename] = filemtime($file);\r\n }\r\n }*/\r\n }\r\n @arsort($this->root_files_folders);\r\n if($this->sort != 'date')\r\n {\r\n @$this->root_files_folders = $this->sort_with_name($this->root_files_folders);\r\n }\r\n }\r\n @$this->root_files_folders = array_keys($this->root_files_folders);\r\n }", "static public function getAllowedExtensions()\n\t{\n\t\t$result = [];\n\t\t\n\t\tforeach(DB::table('dx_files_headers')->select('extention')->get() as $row)\n\t\t{\n\t\t\t$result[] = $row->extention;\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "function searchFiles($search, $path, $video){\n $searchFiles = scandir($path);\n foreach($searchFiles as $sFile){\n if(($sFile!=\".\")&&($sFile!=\"..\")){\n if(is_dir($path.$sFile)){\n $search = glob($path.$sFile.'/'.$video);\n if(!empty($search)){\n return $search;\n }\n }\n }\n }\n return array('did', 'not', 'work');\n}", "abstract protected function getFileExtension();", "function get_files($route) {\n\tif (is_dir($route)) {\n\t\t$array_files = array();\n\t\t$files = opendir($route);\n\t\twhile ($file = readdir($files)) {\n\t\t\tif ($file != '.' && $file != '..' && !is_dir($route . '/' . $file)) {\n\t\t\t\t$extention = substr($file, -4);\n\t\t\t\t$file = substr($file, 0, -4);\n\t\t\t\tif ($file != 'index' && $extention == '.php') {\n\t\t\t\t\t$array_files[] = $file;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tclosedir($files);\n\t\treturn $array_files;\n\t} else {\n\t\treturn false;\n\t}\n}", "public function findFilesWithExts($extensions, $dir = null)\n {\n $files = array();\n $rootDir = rtrim(str_replace('//', '/', $_SERVER['DOCUMENT_ROOT'] . Director::baseURL() . \"/\" . $dir), '/');\n\n if (is_array($extensions)) {\n foreach($extensions as &$ext) {\n $ext = ltrim($ext, '.');\n }\n $extensions = implode(\"|\", $extensions);\n }\n\n $extensions = ltrim($extensions, '.');\n $pattern = sprintf('/.(%s)$/i', $extensions);\n\n if (is_string($extensions)) {\n $files = $this->fileSearch($rootDir, $pattern);\n }\n\n $this->pushFile($files);\n\n return $this;\n }", "function get_all_files($some_folder,$type){\n $rs = [];\n if ($handle = opendir($some_folder)) {\n while (false !== ($entry = readdir($handle))) {\n if ($entry != \".\" && $entry != \"..\") {\n $pathinfo = pathinfo($entry);\n if(!empty($pathinfo['extension'])){\n if($pathinfo['extension']==$type){\n $rs[]=$some_folder.\"/\".$entry;\n }\n }\n }\n }\n \n closedir($handle);\n }\n \n return $rs;\n }", "function file_list($d,$x) {\n foreach(array_diff(scandir($d),array('.','..')) as $f)if(is_file($d.'/'.$f)&&(($x)?ereg($x.'$',$f):1))$l[]=$f;\n return $l;\n}", "public function getFilesByType($folder, $extension, $recursive = false)\n {\n $files = collect_files($this->getFiles($folder, $recursive));\n\n $extensions = Helper::ensureArray($extension);\n\n return $files->filterByExtension($extensions)->all();\n }", "abstract function list_files($path = '.');", "function list_php_files($path){\n\t\t\t// to remove any (.) and (..) from the directory list\n\t\t\t$files = array_diff(scandir($path), array('.', '..'));\n\t\t\treturn $files;\n\t\t}", "public static function getAllFiles($dir, $fileExtension) {\n $filesArray = array();\n // finding files in dir we want to\n $allFiles = glob($dir . \"*.\" . $fileExtension);\n // removing directory path from files we found\n foreach ($allFiles as $file) {\n //echo $image .\"<br />\";\n $file = explode(\"/\", $file);\n // adding file name (without path, just file name) to files array\n $filesArray[] = $file[count($file) - 1];\n }\n // if any files found ... return that array\n if (count($filesArray) > 0) {\n return $filesArray;\n }\n // if no files found ... return false\n return false;\n }", "function file_list($d,$x){\r\n foreach(array_diff(scandir($d),array('.','..')) as $f)if(is_file($d.'/'.$f)&&(($x)?ereg($x.'$',$f):1))$l[]=$f;\r\n return $l;\r\n}", "public function filterByExt($ext = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($ext)) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(EsFilesTableMap::COL_EXT, $ext, $comparison);\n }", "private function obtainFiles($dir,$type){\n $files = glob($dir.\"/{*.$type}\",GLOB_BRACE);\n $names =\"\";\n foreach ($files as $ima)\n $names[]=array_pop(explode(\"/\",$ima));\n if(!$names) return false;\n return $names;\n }", "public function getExtensions();", "protected function getFileExtensions() {\n\t\treturn $this->fileExtensions;\n\t}", "public static function getAllExtensions():array;", "function getFileAsArray($dir, $ext=array()) {\n\t\t$output = array();\n\t\tif ($handle = opendir($dir)) {\n\t\t\twhile (false !== ($file = readdir($handle))) {\n\t\t\t\tif (!is_dir($dir.\"/\".$file)) {\n\t\t\t\t\t$path_parts = pathinfo($dir.\"/\".$file);\n\t\t\t\t\tif (in_array($path_parts[\"extension\"],$ext) || count($ext) == 0) {\n\t\t\t\t\t\tarray_push($output, $file);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tclosedir($handle);\n\t\t}\n\t\treturn $output;\n\t}", "function getTargetFileExtension() ;", "function get_files($directory, $pattern = false) {\n\n\t\tif(!isset($directory) OR is_dir($directory) == false ) return false;\n\t\t$returnval = array();\n\n\t\tif(false != ($handle = opendir($directory))) {\n\t\twhile (false !== ($file = readdir($handle))) {\n\n\t if ($file != \".\" && $file != \"..\") {\n\n\t\tif($pattern != false) {\n\n\t\tif(preg_match(\"$pattern\", $file) > 0 ) {\n\t\t$returnval[] = $file;\n }\n\t\t\t}else{\n\t\t\t\t$returnval[] = $file;\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\t}\n\t\tclosedir($handle);\n\t\treturn $returnval;\n\t}", "public function checkExt($f) {\r\n $ext = pathinfo($f, PATHINFO_EXTENSION);\r\n return $ext;\r\n }", "function frame_load_files($folder, $include = false, $extension = true)\n{\n $path = locate_template($folder);\n $files = array();\n\n if (is_dir($path))\n {\n $path_items = new DirectoryIterator($path);\n\n foreach ($path_items as $item)\n {\n if (!$item->isDot() && $item->isFile())\n {\n if (substr($item->getFilename(), 0, 1) !== '.' &&\n substr($item->getFilename(), 0, 1) !== '_')\n {\n if ($include === true) include($item->getPathname());\n $files[] = ($extension === true) ? $item->getFilename() : $item->getBasename('.'.$item->getExtension());\n }\n }\n // Recursive\n else if (!$item->isDot() && $item->isDir())\n {\n if (substr($item->getBasename(), 0, 1) !== '.' &&\n substr($item->getBasename(), 0, 1) !== '_')\n {\n $files = frame_load_files($folder.'/'.$item->getBasename(), $include, $extension);\n }\n }\n }\n }\n\n return $files;\n}", "function _ft_search_find_files($dir, $q){\r\n\t$output = array();\r\n\tif (ft_check_dir($dir) && $dirlink = @opendir($dir)) {\r\n\t\twhile(($file = readdir($dirlink)) !== false){\r\n\t\t\tif($file != \".\" && $file != \"..\" && ((ft_check_file($file) && ft_check_filetype($file)) || (is_dir($dir.\"/\".$file) && ft_check_dir($file)))){\r\n\t\t\t\t$path = $dir.'/'.$file;\r\n\t\t\t\t// Check if filename/directory name is a match.\r\n\t\t\t\tif(stristr($file, $q)) {\r\n\t\t\t\t\t$new['name'] = $file;\r\n\t\t\t\t\t$new['shortname'] = ft_get_nice_filename($file, 20);\r\n\t\t\t\t\t$new['dir'] = substr($dir, strlen(ft_get_root()));\r\n\t\t\t\t\tif (is_dir($path)) {\r\n if (ft_check_dir($path)) {\r\n \t\t\t\t\t\t$new['type'] = \"dir\";\t\t\t\t\t \r\n \t\t\t\t\t$output[] = $new;\r\n }\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t $new['type'] = \"file\";\r\n \t\t\t\t\t$output[] = $new;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// Check subdirs for matches.\r\n\t\t\t\tif(is_dir($path)) {\r\n\t\t\t\t\t$dirres = _ft_search_find_files($path, $q);\r\n\t\t\t\t\tif (is_array($dirres) && count($dirres) > 0) {\r\n\t\t\t\t\t\t$output = array_merge($dirres, $output);\r\n\t\t\t\t\t\tunset($dirres);\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tsort($output);\r\n\t\tclosedir($dirlink);\r\n\t\treturn $output;\r\n\t} else {\r\n\t\treturn FALSE;\r\n\t}\r\n}", "protected function findExtension($ext)\n {\n $ext = strtolower(trim($ext, ' .'));\n if (isset($this->extensions[$ext])) {\n return '.' . $this->extensions[$ext];\n }\n\n return '.html';\n }", "public function findFiles($directory = [], $filetype = [], $ignore_files = [])\r\n {\r\n $found_files = false;\r\n $filetype = is_array($filetype) ? implode('|', $filetype) : $filetype;\r\n $ignore_files = is_array($ignore_files) ? $ignore_files : [];\r\n\r\n $fs = new Filesystem();\r\n if(!$fs->exists($directory))\r\n return $found_files;\r\n $finder = new Finder();\r\n $finder = $finder->files()->ignoreUnreadableDirs()->in($directory);\r\n\r\n foreach ($finder as $file) {\r\n if( preg_match('/^.*\\.('.$filetype.')$/i', $file)) {\r\n if(!in_array(basename($file), $ignore_files))\r\n $found_files[] = $file->getRealpath();\r\n }\r\n }\r\n\r\n return $found_files;\r\n }", "protected function getExtensions() {\n $listing = new ExtensionDiscovery($this->root);\n // Ensure that tests in all profiles are discovered.\n $listing->setProfileDirectories([]);\n $extensions = $listing->scan('module', TRUE);\n $extensions += $listing->scan('profile', TRUE);\n $extensions += $listing->scan('theme', TRUE);\n return $extensions;\n }", "public function getFiles();", "public function getFiles();", "public function getFiles();", "public function getFiles ();", "public function getFiles($filter = null)\n {\n if ($filter === null)\n return $this->files;\n\n $result = [];\n foreach ($this->files as $file) {\n if (fnmatch($filter, $file))\n $result[] = $file;\n }\n return $result;\n }", "protected function getAcceptFileTypes()\n {\n $extensions = $this->getValidator()->getAllowedExtensions();\n if (!$extensions) {\n return [];\n }\n $extentionString = \"\";\n $i = 0;\n foreach ($extensions as $extension) {\n if ($i == 0) {\n $extentionString .= \".{$extension}\";\n } else {\n $extentionString .= \", .{$extension}\";\n }\n $i++;\n }\n return $extentionString;\n }", "function ListFiles($folder,$mask)\r\n{\t// $extension is like '*.png'\r\n\t$images = glob(\"\" . $folder . $mask);\r\n\treturn $images;\r\n}", "public static function ext_by_mime($type)\r\n {\r\n return current(File::exts_by_mime($type));\r\n }", "public static function findFiles($dir,$options=array())\n\t{\n\t\t$fileTypes=array();\n\t\t$exclude=array();\n\t\t$level=-1;\n\t\t$absolutePaths=true;\n\t\textract($options);\n\t\t$list=self::findFilesRecursive($dir,'',$fileTypes,$exclude,$level,$absolutePaths);\n\t\tsort($list);\n\t\treturn $list;\n\t}", "public function getExtensions() {}", "public function getExtensions() {}", "public function all()\n\t{\n\t\t$extensions = array();\n\n\t\t// Loop through extensions directories\n\t\tforeach ($this->extensions_directories() as $directory)\n\t\t{\n\t\t\t// Get our extension slug - always\n\t\t\t// matches the folder name.\n\t\t\t$slug = basename($directory);\n\n\t\t\t// Read extension info. Always do this even\n\t\t\t// if no details are required as this will\n\t\t\t// validate the extension.\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$extensions[$slug] = $this->get($slug);\n\t\t\t}\n\t\t\tcatch (Exception $e)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\tksort($extensions);\n\t\treturn array_values($extensions);\n\t}", "public function extensions(): array;", "function getFileExtension($file, $withdot=false)\n{\n if($withdot)\n return strtolower(substr($file, strrpos($file,\".\")));\n else\n return strtolower(substr($file, strrpos($file,\".\")+1));\n}", "public function find_all() {\n $this->ensure_path_exists();\n $files = glob($this->glob_keys_pattern(), GLOB_MARK | GLOB_NOSORT);\n $return = array();\n if ($files === false) {\n return $return;\n }\n foreach ($files as $file) {\n $return[] = substr(basename($file), 0, -6);\n }\n return $return;\n }", "public function listApplicationFiles() {\r\n\t\t$preload = array(\r\n\t\t\t\"config/main.js\"\r\n\t\t);\r\n\t\t\r\n\t\t$return = array();\r\n\t\t$fullPath = $this->applicationPath;\r\n\t\r\n\t\tforeach($preload as $file) {\r\n\t\t\t$return[] = $fullPath.\"/\".$file;\r\n\t\t}\r\n\t\t\r\n\t\t$options = array(\r\n\t\t\t\"fileTypes\" => array(\"js\"),\r\n\t\t\t\"exclude\" => array_merge($preload, array(\r\n\t\t\t\t\"data\", \"messages\", \"compiled.js\"\r\n\t\t\t))\r\n\t\t);\r\n\t\t\r\n\t\t$return = array_merge($return, CFileHelper::findFiles($fullPath,$options));\r\n\t\t\r\n\t\t\r\n\t\treturn $return;\r\n\t}", "function llista_carpeta($ruta,$extensions)\n{\n\t$llistat=array();\n\t$extensions=var2array($extensions,',');\n\tif ($handle = opendir($ruta))\n\t{\n\t\twhile (false !== ($file = readdir($handle)))\n\t\t{\n\t\t\tforeach ($extensions as $extensio)\n\t\t\t{\n\t\t\t\t$tipus=filetype(\"$ruta/$file\");\n\t\t\t\tif ($extensio=='.' && $tipus==='dir' && $file != \".\" && $file != \"..\" || substr($file, strrpos($file, '.')+1) == $extensio && $tipus==='file')\n\t\t\t\t\t{$llistat[]=$file;break;}\n\t\t\t}\n\t\t}\n\t}\n\treturn $llistat;\n}", "function getFileType ( $ext ) {\n\t\t\tforeach ( self::$TYPES_TO_EXTENSIONS as $type => $extensions ) {\n\t\t\t\tif ( in_array( $ext, $extensions ) ) {\n\t\t\t\t\treturn $type;\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\treturn false;\n\t\t\t\n\t\t}", "public function getSupportedFileExtensions()\n {\n return array_keys($GLOBALS['TYPO3_CONF_VARS']['SYS']['fal']['onlineMediaHelpers']);\n }", "public function getAllowedExtensions()\n {\n return $this->allowedFiles;\n }", "function findexts ($filename) \n{ \n\t$filename = strtolower($filename) ; \n\t$exts = split(\"[/\\\\.]\", $filename) ; \n\t$n = count($exts)-1; \n\n\t// Write any scripts that check for unwanted extensions here!\n\tif ($n > 1) // Check for evil double-barreled extensions like \"yourfile.php.jpg\" or \"yourfile.exe.jpg\" and eliminate extensions you don't allow.\n\t{\n\t\techo \"Double-Barreled file extension(s) are not allowed.<br>\";\n\t\t$ok=0;\n\t}\n\t$exts = $exts[$n]; \n\treturn $exts; \n}", "function findexts ($filename){\n $filename = strtolower($filename) ;\n $exts = split(\"[/\\\\.]\", $filename) ;\n $n = count($exts)-1;\n $exts = $exts[$n];\n return $exts;\n }", "public function getValidExtensions();", "public function browse_files()\n {\n // Scan file directory, render the images.\n if (is_dir($this->file_path)) {\n $files = preg_grep('/^([^.])/', scandir($this->file_path));\n return $files;\n }\n \n }", "public function getMatchableExtensions();", "public static function find_file($dir, $file, $ext = NULL)\n\t{\n\t\tif (self::$profile === TRUE AND class_exists('Profiler', FALSE))\n\t\t{\n\t\t\t// Start a new benchmark\n\t\t\t$benchmark = Profiler::start(__CLASS__, __FUNCTION__);\n\t\t}\n\n\t\t// Use the defined extension by default\n\t\t$ext = ($ext === NULL) ? EXT : '.'.$ext;\n\n\t\t// Create a partial path of the filename\n\t\t$path = $dir.'/'.$file.$ext;\n\n\t\tif ($dir === 'config' OR $dir === 'i18n')\n\t\t{\n\t\t\t// Include paths must be searched in reverse\n\t\t\t$paths = array_reverse(self::$_paths);\n\n\t\t\t// Array of files that have been found\n\t\t\t$found = array();\n\n\t\t\tforeach ($paths as $dir)\n\t\t\t{\n\t\t\t\tif (is_file($dir.$path))\n\t\t\t\t{\n\t\t\t\t\t// This path has a file, add it to the list\n\t\t\t\t\t$found[] = $dir.$path;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// The file has not been found yet\n\t\t\t$found = FALSE;\n\n\t\t\tforeach (self::$_paths as $dir)\n\t\t\t{\n\t\t\t\tif (is_file($dir.$path))\n\t\t\t\t{\n\t\t\t\t\t// A path has been found\n\t\t\t\t\t$found = $dir.$path;\n\n\t\t\t\t\t// Stop searching\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (isset($benchmark))\n\t\t{\n\t\t\t// Stop the benchmark\n\t\t\tProfiler::stop($benchmark);\n\t\t}\n\n\t\treturn $found;\n\t}", "function file_extension($filename)\n\t\t{\n\t\t\t$fileparts = explode(\".\", $filename);\n\t\t\t$more_check = strpos(strtolower(end($fileparts)), '?');\n\t\t\tif ($more_check != false) {\n\t\t\t\t\n\t\t\t\treturn substr(strtolower(end($fileparts)),0, $more_check );\n\t\t}\n\t\telse {\n\t\t\t\n\t\t\treturn strtolower(end($fileparts));\n\t\t}\n\t\t}", "protected function matchFileExtension($fileName, $ext)\n {\n switch ($ext) {\n case 'less': //less files\n $completeFileName = $fileName . '.css';\n break;\n\n case 'scss': //scss files\n $completeFileName = $fileName . '.css';\n break;\n\n case 'css': //css files\n $completeFileName = $fileName . '.css';\n break;\n\n case 'js': //js files\n $completeFileName = $fileName . '.js';\n break;\n\n case 'png': //png files\n $completeFileName = $fileName . '.png';\n break;\n\n case 'jpg':\n case 'jpeg': //jpg files\n $completeFileName = $fileName . '.jpg';\n break;\n }\n return $completeFileName;\n }", "public function getFileExtension($format);", "protected function getLanguageFiles(): array {\n\t\t$extensions = ExtensionManagementUtility::getLoadedExtensionListArray();\n\t\t$extensions = array_filter($extensions, function(string $extensionName) {\n\t\t\treturn str_starts_with($extensionName, 'vierwd_');\n\t\t});\n\t\tsort($extensions);\n\n\t\t$files = [];\n\t\tforeach ($extensions as $extensionName) {\n\t\t\t$path = ExtensionManagementUtility::extPath($extensionName, 'Resources/Private/Language');\n\t\t\tif (!is_dir($path)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$languageFiles = glob($path . '/*.xlf') ?: [];\n\n\t\t\t// remove language files which are translations\n\t\t\t$languageFiles = array_filter($languageFiles, function(string $pathName) {\n\t\t\t\t$fileName = basename($pathName);\n\t\t\t\treturn substr_count($fileName, '.') === 1;\n\t\t\t});\n\n\t\t\tif (!$languageFiles) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// only use filename\n\t\t\t$languageFiles = array_map('basename', $languageFiles);\n\n\t\t\t$files[$extensionName] = [];\n\t\t\tforeach ($languageFiles as $fileName) {\n\t\t\t\t$files[$extensionName][$fileName] = $fileName;\n\t\t\t}\n\t\t}\n\n\t\treturn $files;\n\t}", "function findexts ($filename) \n { \n $filename = strtolower($filename) ; \n $exts = split(\"[/\\\\.]\", $filename) ; \n $n = count($exts)-1; \n $exts = $exts[$n]; \n return $exts; \n }", "public function hasExtension($name);", "public function find_extension_file($slug)\n\t{\n\t\t// We'll search the root dir first\n\t\t$files = glob(path('extensions').$slug.DS.'extension'.EXT);\n\n\t\tif (empty($files))\n\t\t{\n\t\t\t// We couldn't find the extension file in the first path, so we'll try the 2nd\n\t\t\t$files = glob(path('extensions').'*'.DS.$slug.DS.'extension'.EXT);\n\t\t}\n\n\t\treturn ( ! empty($files)) ? $files[0] : false;\n\t}", "private function _has_extension($filename) {\n\t\t$exploded = explode(\".\", $filename);\n\t\tif(sizeof($exploded) > 1)\n\t\t\treturn $exploded;\n\t\telse\n\t\t\treturn false;\n\t}", "public function getExtensions($extension = null, $version = null);", "static function find_files( $dir ) {\n\t\t$found_files = array();\n\t\t$files = scandir( $dir );\n\n\t\tforeach ( $files as $value ) {\n\t\t\t// skip special dot files\n\t\t\t// and any file that starts with a . - think hidden directories like .svn or .git\n\t\t\tif ( strpos( $value, '.' ) === 0 ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// is it a file?\n\t\t\tif ( is_file( \"$dir/$value\" ) ) {\n\t\t\t\t$found_files[] = \"$dir/$value\";\n\t\t\t\tcontinue;\n\t\t\t} else { // it's a directory\n\t\t\t\tforeach ( self::find_files( \"$dir/$value\" ) as $value ) {\n\t\t\t\t\t$found_files[] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $found_files;\n\t}", "public function getExtensionPathesFromExtensionList($pathesList) {\n\t\t$pathesList = explode(',', $pathesList);\n\t\t$files = array();\n\t\tforeach($pathesList as $file) {\n\t\t\t$files[] = realpath(trim($file));\n\t\t}\n\t\treturn $files;\t\n\t}", "function fromExt($ext) \n {\n $mtl = $GLOBALS['File_MimeType'];\n $ext = strtolower($ext);\n foreach($mtl as $mtd) {\n if (in_array($ext, $mtd[1])) {\n return $mtd[0];\n }\n }\n return 'application/octet-stream';\n }", "function getFiles($dir)\r\n{\r\n\tglobal $types, $debug, $globalGetFiles;\r\n\tif ( !isset($globalGetFiles[$dir]) )\r\n\t{\r\n\t\t$dir = cleanPath($dir);\r\n\t\t$files = array();\r\n\t\t$list = array();\r\n\t\t\r\n\t\t// Loop through each of the files in this directory\r\n\t\t$files = glob($dir.'/*');\r\n\t\tforeach ( $files as $file )\r\n\t\t{\r\n\t\t\tif ( !empty($debug) && empty($log) )\r\n\t\t\t{\r\n\t\t\t\t$log = \"getFiles(\".$dir.\")\\n----------\\n\";\r\n\t\t\t}\r\n\t\t\t// Check each file against the list of types in config.php\r\n\t\t\tforeach ( $types as $type )\r\n\t\t\t{\r\n\t\t\t\t// Lower case the file extension to be sure\r\n\t\t\t\tif ( substr(strtolower($file),-3) == $type )\r\n\t\t\t\t{\r\n\t\t\t\t\t$list[] = $file;\r\n\t\t\t\t\tif ( !empty($debug) )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$log .= \"list[] = \".$file.\"\\n\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tunset($files);\r\n\t\t// Alphabetize files in case insensitive order\r\n\t\tnatcasesort($list);\r\n\t\tif ( !empty($debug) )\r\n\t\t{\r\n\t\t\t$log .= \"\\n\";\r\n\t\t\tdebugLog($log);\r\n\t\t}\r\n\t\t$globalGetFiles[$dir] = $list;\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$list = $globalGetFiles[$dir];\r\n\t}\r\n\treturn $list;\r\n}", "public function getFiles($dir)\n {\n return Filesystem::getAll(path($dir), 'php');\n }", "function getllxmlFiles($extPath)\t{\n\n\t\t// Initialize:\n\t\t$files = array();\n\n\t\tif (!$extPath) {\n\t\t\t// Traverse extension locations:\n\t\t\tforeach($this->extPathList as $path)\t{\n\t\t\t\tif (is_dir(PATH_site . $path))\t{\n\t\t\t\t\t$files = t3lib_div::getAllFilesAndFoldersInPath($files, PATH_site . $path, 'xml');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$files = t3lib_div::getAllFilesAndFoldersInPath($files, $extPath . '/', 'xml');\n\t\t}\n\n\t\t// Remove prefixes\n\t\t$files = t3lib_div::removePrefixPathFromList($files, PATH_site);\n\n\t\t// Remove all non-locallang files (looking at the prefix)\n\t\tforeach($files as $key => $value)\t{\n\t\t\tif (substr(basename($value), 0, 9) != 'locallang')\t{\n\t\t\t\tunset($files[$key]);\n\t\t\t}\n\t\t}\n\n\t\treturn $files;\n\t}" ]
[ "0.7028653", "0.69744825", "0.687496", "0.6759792", "0.67374986", "0.6705261", "0.66419643", "0.66133094", "0.6580828", "0.65307045", "0.64832264", "0.64796317", "0.6468062", "0.64122045", "0.6377963", "0.6375414", "0.6326476", "0.6267518", "0.62437403", "0.624124", "0.62085944", "0.6201789", "0.6197528", "0.61737555", "0.61730796", "0.6170678", "0.60600215", "0.6053155", "0.6024561", "0.6003757", "0.6000575", "0.5989377", "0.5987568", "0.5982751", "0.59693325", "0.5957217", "0.59318066", "0.59282833", "0.5909717", "0.5902887", "0.5893142", "0.58772933", "0.58624905", "0.58364236", "0.58174396", "0.57939374", "0.5774265", "0.57714933", "0.57582533", "0.57496613", "0.5733681", "0.57259834", "0.57062757", "0.5697504", "0.56878245", "0.5677425", "0.5673148", "0.5670842", "0.5657277", "0.56427413", "0.56427413", "0.56427413", "0.564134", "0.5640951", "0.5636441", "0.5630127", "0.562594", "0.56251824", "0.5607693", "0.5607267", "0.5602562", "0.56020415", "0.5595465", "0.5595172", "0.5594172", "0.55914396", "0.5589207", "0.55861056", "0.55852884", "0.55673057", "0.55659074", "0.5556751", "0.555616", "0.5554858", "0.55498964", "0.5548491", "0.5544004", "0.5543773", "0.5539625", "0.5538509", "0.5535526", "0.5534669", "0.5532095", "0.55311906", "0.55134374", "0.5502536", "0.5480523", "0.5479741", "0.54785573", "0.54772496" ]
0.6480409
11
Extract filepaths from finder results
private function getFinderResult() { $results = array(); foreach ($this->finder as $result) { $results[] = $result->getRealPath(); } return $results; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findFiles();", "public function find () {\n\t\t$results = array();\n\n\t\t// Iterate all paths in target\n\t\tforeach ($this->target->get_resolved_paths() as $path) {\n\t\t\t\n\t\t\t// Iterate all files in paths\n\t\t\t$files = directory_contents($path);\n\t\t\tforeach ($files as $file) {\n\t\t\t\t$lines = file($file);\n\t\t\t\t\n\t\t\t\t// Iterate all lines in file\n\t\t\t\tfor ($i=0; $i < count($lines); $i++) { \n\t\t\t\t\tif (preg_match(self::BREAKPOINT, $lines[$i])) {\n\t\t\t\t\t\t$results[$file][] = $i + 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (count($results) == 0) $results = null;\n\t\t\n\t\treturn $results;\n\t}", "public function getPaths();", "protected function getSearchPaths() {}", "public function getFoundPath() {}", "public function getFiles()\n\t{\n\t\tif ($this->_files === null) {\n\t\t\t$command = 'show --pretty=\"format:\" --name-only '.$this->hash;\n\t\t\tforeach(explode(\"\\n\",$this->repository->run($command)) as $line) {\n\t\t\t\t$this->_files[] = trim($line);\n\t\t\t}\n\t\t}\n\t\treturn $this->_files;\n\t}", "public function getFileInfo();", "public function getFiles ();", "public function collectInfoFiles()\r\n {\r\n $files_found = $this->findFiles($this->destination_dir, array('md', '1st', 'txt'));\r\n\r\n if($files_found)\r\n $this->file_list = array_merge($this->file_list, $files_found);\r\n }", "function icedrive_get_files($path)\r\n {\r\n $files = array();\r\n $response = $this->icedrive->request('PROPFIND', $path);\r\n $response = $this->icedrive_response_to_array($response['body']);\r\n foreach ($response['dresponse'] as $file) {\r\n $files[] = $file['dhref'];\r\n }\r\n return $files;\r\n }", "public function getFiles() {\n\t\tif ($this->_files === null) {\n\t\t\t$command = 'show --pretty=\"format:\" --name-only '.$this->hash;\n\t\t\tforeach(explode(\"\\n\",$this->branch->repository->run($command)) as $line) {\n\t\t\t\t$this->_files[] = trim($line);\n\t\t\t}\n\t\t}\n\t\treturn $this->_files;\n\t}", "public function getFiles();", "public function getFiles();", "public function getFiles();", "public function browse_files()\n {\n // Scan file directory, render the images.\n if (is_dir($this->file_path)) {\n $files = preg_grep('/^([^.])/', scandir($this->file_path));\n return $files;\n }\n \n }", "public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/google_search.php',\n 'lang_custom/EN/google_search.ini',\n 'sources_custom/blocks/side_google_search.php',\n 'sources_custom/blocks/main_google_results.php',\n 'themes/default/templates_custom/BLOCK_SIDE_GOOGLE_SEARCH.tpl',\n 'themes/default/templates_custom/BLOCK_MAIN_GOOGLE_SEARCH_RESULTS.tpl',\n 'themes/default/css_custom/google_search.css',\n 'pages/comcode_custom/EN/_google_search.txt',\n );\n }", "public function getFinders()\n {\n if (isset($this->raw->finder)) {\n return $this->processFinders($this->raw->finder);\n }\n\n return array();\n }", "public function getFiles() {}", "public function find_all() {\n $this->ensure_path_exists();\n $files = glob($this->glob_keys_pattern(), GLOB_MARK | GLOB_NOSORT);\n $return = array();\n if ($files === false) {\n return $return;\n }\n foreach ($files as $file) {\n $return[] = substr(basename($file), 0, -6);\n }\n return $return;\n }", "private function findAnnotationFiles(SplFileInfo $fileinfo)\n {\n $aopath = $fileinfo->getPath() . '/' . trim(self::AOPATH, '/') . '/';\n\n $arr = array();\n foreach(glob($aopath . $fileinfo->getBasename('.rdf') . '_*.rdf') as $f) {\n $arr[] = new SplFileInfo($f); \n }\n return $arr;\n }", "public function getOtherFiles(): array;", "public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/trickstr.php',\n 'sources_custom/programe/.htaccess',\n 'sources_custom/programe/aiml/.htaccess',\n 'sources_custom/programe/aiml/index.html',\n 'sources_custom/programe/index.html',\n 'sources_custom/hooks/modules/chat_bots/knowledge.txt',\n 'sources_custom/hooks/modules/chat_bots/trickstr.php',\n 'sources_custom/programe/aiml/readme.txt',\n 'sources_custom/programe/aiml/startup.xml',\n 'sources_custom/programe/aiml/std-65percent.aiml',\n 'sources_custom/programe/aiml/std-pickup.aiml',\n 'sources_custom/programe/botloaderfuncs.php',\n 'sources_custom/programe/customtags.php',\n 'sources_custom/programe/db.sql',\n 'sources_custom/programe/graphnew.php',\n 'sources_custom/programe/respond.php',\n 'sources_custom/programe/util.php',\n );\n }", "private function attachmentPaths(): array\n {\n $sql = \"SELECT meta_value FROM {$this->wpdb->postmeta} WHERE meta_key = %s\";\n /** @var \\stdClass[] $metadata */\n $metadata = $this->wpdb->get_results($this->wpdb->prepare($sql, '_wp_attachment_metadata'));\n\n if (!$metadata) {\n return [];\n }\n\n $paths = [];\n foreach ($metadata as $metadataValue) {\n list($dir, $files) = $this->attachmentPathFiles($metadataValue);\n if ($dir && $files) {\n array_key_exists($dir, $paths)\n ? $paths[$dir] = array_merge($paths[$dir], $files)\n : $paths[$dir] = $files;\n }\n }\n\n return $paths;\n }", "protected static function getPathsInternal() {}", "public function provideFileInfos()\n {\n return array(\n array('someName', 'someContent')\n );\n }", "private function getFilenames() {\n $result = [];\n $files = scandir($this->tmpFolder);\n foreach ($files as $v) {\n if($v != '.' && $v != '..' && '__MACOSX') {\n $result[] = $v;\n }\n }\n\n return $result;\n }", "public function get_file_list() {\n\t\tset_time_limit( 0 );\n\n\t\t$this->image_dir = self::_add_trailing_slash( $this->image_dir );\n\n\t\tif ( is_dir( $this->image_dir ) ) {\n $result = array();\n\t\t\t$iterator = new \\RecursiveDirectoryIterator( $this->image_dir, \\FileSystemIterator::SKIP_DOTS );\n\t\t\t$iterator = new \\RecursiveIteratorIterator( $iterator );\n\t\t\t$iterator = new \\RegexIterator( $iterator, '/^.+\\.(jpe?g|png|gif|svg)$/i', \\RecursiveRegexIterator::MATCH );\n\n\t\t\tforeach ( $iterator as $info ) {\n\t\t\t if ( $info->isFile() ) {\n $result[] = $info->getPathname();\n }\n\t\t\t}\n\n\t\t\tunset( $iterator );\n\t\t} else {\n $result = false;\n }\n\n\t\treturn $result;\n\t}", "public function getResultsFiles() {\n if ($this->results_files === null) {\n $this->loadTestcases();\n }\n return $this->results_files;\n }", "function list_files () {\n\t\t$root = $this->get_root();\n\t\t\n\t\treturn $this->_list_files($root);\n\t}", "abstract protected function paths();", "private function getFilenames()\n\t{\n\t\t$filenames = array();\n\n\t\tforeach ($this->filesets as $fileset)\n\t\t{\n\t\t\t$ds = $fileset->getDirectoryScanner($this->project);\n\t\t\t$ds->scan();\n\n\t\t\t$files = $ds->getIncludedFiles();\n\n\t\t\tforeach ($files as $file)\n\t\t\t{\n\t\t\t\t$filenames[] = $ds->getBaseDir() . \"/\" . $file;\n\t\t\t}\n\t\t}\n\n\t\treturn $filenames;\n\t}", "public function listAll()\n {\n $files = \\Core\\File\\System::listFiles($this->_getPath(), \\Core\\File\\System::EXCLUDE_DIRS);\n $result = [];\n foreach (array_keys($files) as $file) {\n $result[] = pathinfo($file, PATHINFO_FILENAME);\n }\n return $result;\n }", "public function get_paths()\n\t{\n\t\tif ( ! ee()->session->cache(__CLASS__, 'paths'))\n\t\t{\n\t\t\t$paths = array();\n\t\t\t$upload_prefs = $this->get_file_upload_preferences(NULL, NULL, TRUE);\n\n\t\t\tif (count($upload_prefs) == 0)\n\t\t\t{\n\t\t\t\treturn $paths;\n\t\t\t}\n\n\t\t\tforeach ($upload_prefs as $row)\n\t\t\t{\n\t\t\t\t$paths[$row['id']] = $row['url'];\n\t\t\t}\n\n\t\t\tee()->session->set_cache(__CLASS__, 'paths', $paths);\n\t\t}\n\n\t\treturn ee()->session->cache(__CLASS__, 'paths');\n\t}", "private function searchFiles()\n {\n $query = File::whereNull('deleted_at');\n $data = $query->get();\n\n return $data;\n }", "protected function getModuleFileNames()\n {\n $results = db_query('SELECT name, filename FROM {system} WHERE status = 1 ORDER BY weight ASC, name ASC')->fetchAllAssoc('name');\n\n return array_map(function ($value) {\n return DRUPAL_ROOT.DIRECTORY_SEPARATOR.$value->filename;\n }, $results);\n }", "function getPaths()\n {\n $paths = array();\n foreach ($this->names as $name) {\n $paths[] = $this->dir.$name.$this->ext;\n }\n return $paths;\n }", "public function processSelect(Finder $finder, $result)\n {\n if ($result === null) {\n return null;\n }\n\n $fileName = array_get($result, 'fileName');\n\n return [$fileName => $this->parseTemplateContent($result, $fileName)];\n }", "public function testMultipleFilesRecursiveShouldReturnArrayWithCorrectPaths($previousResult): array\n {\n self::$fileSystem->get('/')->add('test2.php.skel', new File());\n\n $iterator = new FileIterator('vfs://', ['dist', 'skel']);\n $result = iterator_to_array($iterator->iterate());\n\n self::assertCount(2, $result);\n self::assertArrayHasKey('vfs://test2.php.skel', $result);\n\n return [\n $previousResult,\n 'vfs://test2.php.skel'\n ];\n }", "public function files();", "public function files();", "public function files();", "public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/jestr.php',\n 'sources_custom/forum/cns.php',\n 'lang_custom/EN/jestr.ini',\n 'themes/default/templates_custom/EMOTICON_IMG_CODE_THEMED.tpl',\n 'forum/pages/modules_custom/topicview.php',\n 'sources_custom/hooks/systems/config/jestr_avatar_switch_shown_for.php',\n 'sources_custom/hooks/systems/config/jestr_emoticon_magnet_shown_for.php',\n 'sources_custom/hooks/systems/config/jestr_leet_shown_for.php',\n 'sources_custom/hooks/systems/config/jestr_name_changes.php',\n 'sources_custom/hooks/systems/config/jestr_name_changes_shown_for.php',\n 'sources_custom/hooks/systems/config/jestr_piglatin_shown_for.php',\n 'sources_custom/hooks/systems/config/jestr_string_changes.php',\n 'sources_custom/hooks/systems/config/jestr_string_changes_shown_for.php',\n );\n }", "public function getHandledPaths();", "public function getFileNames();", "public function loadFiles()\n\t{\n\t\t$files = array();\n\t\t\n\t\t$searchPath = $this->getLocalFolder().\"/*.*\";\n\t\t$filesArray = glob($searchPath);\n\t\t\n\t\tforeach($filesArray as $file)\n\t\t{\n\t\t\t$files[] = new File($file);\n\t\t}\n\t\t\n\t\treturn $files;\n\t}", "public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/wiki_sync.php',\n '_tests/tests/unit_tests/wiki_sync.php',\n 'lang_custom/EN/wiki_sync.ini',\n 'sources_custom/wiki_sync.php',\n 'sources_custom/hooks/systems/config/wiki_alt_changes_link_stub.php',\n 'sources_custom/hooks/systems/config/wiki_enable_git_sync.php',\n 'sources_custom/hooks/systems/config/wiki_enable_wysiwyg.php',\n 'sources_custom/hooks/systems/config/wiki_sync_media_directory.php',\n 'sources_custom/hooks/systems/config/wiki_sync_page_directory.php',\n 'sources_custom/hooks/systems/cron/wiki_sync_git.php',\n 'sources_custom/hooks/systems/notifications/wiki_failed_git_pull.php',\n 'sources_custom/wiki.php',\n 'site/pages/modules_custom/wiki.php',\n 'cms/pages/modules_custom/cms_wiki.php',\n );\n }", "public function searchPaths() {\n\n $searchQuery = Input::get('searchQuery');\n\n\t\t$keywords = explode(\" \", $searchQuery);\n\n\t\t// Create empty array of paths\n\t\t$paths = array();\n\n\t\t// Iterate through each keyword\n foreach ($keywords as $keyword) {\n \t// Get tag by keyword\n $tags = Tag::where('name', '=', $keyword)->get();\n\n // For each tag (should be only one)\n foreach ($tags as $tag) {\n \t// Get all paths corresponding to this tag\n \t$tmpPaths = $tag->paths->all();\n \t// Add all paths from this tag to paths array\n \t$paths = array_merge($paths, $tmpPaths);\n }\n\n // Find all paths that have keyword in the title\n $titlePaths = Path::where('title', 'LIKE', '%' . $keyword . '%')->get()->all();\n // and merge with other paths\n $paths = array_merge($paths, $titlePaths);\n }\n\n // Remove duplicates\n $paths = array_unique($paths);\n return View::make(\"search.results\", array(\"paths\" => $paths));\n\t}", "public function crawl() {\n\t\t$sDirectories = BsConfig::get( 'MW::ExtendedSearch::ExternalRepo' );\n\t\tif ( $sDirectories === '' ) return $sDirectories;\n\n\t\t$aDirectories = explode( ',', $sDirectories );\n\t\tforeach ( $aDirectories as $sDirectory ) {\n\t\t\t$sDir = trim ( $sDirectory );\n\t\t\tif( !is_dir( $sDir ) ) continue;\n\t\t\t$this->readInFiles( $sDir );\n\t\t}\n\t\treturn $this->aFiles;\n\t}", "public function findFiles(string $phrase, array $optionalParameters = [], int $page = 1): array;", "public function getResultsPublicFiles() {\n if ($this->results_public_files === null) {\n $this->loadTestcases();\n }\n return $this->results_public_files;\n }", "public function getBinaryFinders()\n {\n if (isset($this->raw->{'finder-bin'})) {\n return $this->processFinders($this->raw->{'finder-bin'});\n }\n\n return array();\n }", "public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/idolisr.php',\n 'sources_custom/hooks/modules/members/idolisr.php',\n 'sources_custom/miniblocks/main_stars.php',\n 'sources_custom/miniblocks/side_recent_points.php',\n 'themes/default/templates_custom/POINTS_GIVE.tpl',\n 'themes/default/templates_custom/BLOCK_MAIN_STARS.tpl',\n 'themes/default/templates_custom/BLOCK_SIDE_RECENT_POINTS.tpl',\n );\n }", "function _get_filenames($path) {\n $finderFiles = Finder::create()->files()->in($path)->name('*.php');\n $filenames = array();\n foreach ($finderFiles as $finderFile) {\n $filenames[] = \"App\\\\Discount\\\\\".$this->_get_classname($finderFile->getRealpath());\n }\n\n return $filenames;\n }", "public function search($type, $filename = '', $return = 'relative')\n {\n $matches = array();\n foreach ($this->elements as $location) {\n if (!($location instanceof PathFinder_Location)) {\n continue;\n }\n\n $path = $location->locate($type, $filename, $return);\n\n if (is_string($path)) {\n // file found!\n $matches[] = $path;\n }\n }\n\n return $matches;\n }", "public function getFiles(): array;", "private function getTestFileList() {\n\t\treturn [\n\t\t\tself::makeFileInfo('a.txt', 4, 2.3 * \\pow(10, 9)),\n\t\t\tself::makeFileInfo('q.txt', 5, 150),\n\t\t\tself::makeFileInfo('subdir2', 87, 128, true),\n\t\t\tself::makeFileInfo('b.txt', 2.2 * \\pow(10, 9), 800),\n\t\t\tself::makeFileInfo('o.txt', 12, 100),\n\t\t\tself::makeFileInfo('subdir', 88, 125, true),\n\t\t];\n\t}", "public function paths(){\n\t\treturn array_map(function($item){ return $item[0];}, $this->added);\n\t}", "protected function convert_file_results($responsedoc) {\n if (!$docs = $responsedoc->response->docs) {\n return array();\n }\n\n $out = array();\n\n foreach ($docs as $doc) {\n // Copy the bare minimim needed info.\n $result = new \\stdClass();\n $result->id = $doc->id;\n $result->modified = document::import_time_from_engine($doc->modified);\n $result->title = $doc->title;\n $result->solr_fileid = $doc->solr_fileid;\n $result->solr_filecontenthash = $doc->solr_filecontenthash;\n $result->solr_fileindexstatus = $doc->solr_fileindexstatus;\n $out[] = $result;\n }\n\n return $out;\n }", "public function Get(){\n\n // TODO: this is horrible - try to use glob or RecursiveIteratorIterator - no time\n $fileList = [];\n\n if (!is_dir($this->currentPath)) {\n return $fileList;\n }\n\n $files = $this->scanFolder($this->currentPath);\n\n // up one level link\n if ($this->currentPath != $this->rootPath) {\n $fileList[] = array(\n 'file_name' => \"&uarr;\",\n 'directory' => true,\n 'extension' => '',\n 'size' => \"\",\n 'link' => $this->oneLevelUp(),\n );\n }\n\n foreach ($files as $file) {\n if($file == \".\" || $file == \"..\"){\n continue;\n }\n\n if ($this->isDir($file)) {\n $fileList[] = array(\n 'file_name' => $file,\n 'directory' => true,\n 'extension' => 'folder',\n 'size' => \"\",\n 'link' => $this->currentPath . $file,\n );\n } else {\n // filter on the fly\n $ext = $this->fileExtension($file);\n if(!empty($this->extensionFilter)){\n if(!in_array($ext, $this->extensionFilter)){\n continue;\n }\n }\n $fileList[] = [\n 'file_name' => $file,\n 'directory' => false,\n 'extension' => $ext,\n 'size' => $this->fileSize($file),\n 'link' => \"\",\n ];\n\n }\n }\n\n return $fileList;\n }", "abstract protected function yieldSearchPaths(): Generator;", "public function finder()\n {\n $finder = new Finder();\n\n $base_path = get_input('path');\n $example = \"http://127.0.0.1:8011/finder?path=_html/my&ext=html&dirOnly=true&depth=1\";\n header('Content-type: application/json');\n\n if ($base_path == \"\" || $base_path == \"/\") {\n return json_encode([\n 'path' => $base_path,\n 'list' => '',\n 'data' => [],\n 'project_dir' => project_dir(),\n 'example' => $example,\n ]);\n }\n\n if (!is_dir(base_path($base_path))) {\n return json_encode([\n 'path' => $base_path,\n 'list' => '',\n 'data' => [],\n 'project_dir' => project_dir(),\n 'example' => $example,\n ]);\n }\n\n // start\n $data = [];\n\n $finder->ignoreUnreadableDirs()->in(base_path($base_path));\n\n if ((int)get_input(\"depth\", 0) == 0) {\n $finder->depth('== 0');\n } else if ($depth = (int)get_input(\"depth\", 0) > 0) {\n $finder->depth(\"<= {$depth}\");\n }\n\n //\n $list = 'files';\n if (get_input('dirOnly')) {\n // look for directories only; ignore files\n $finder->directories();\n $list = 'directories';\n } else {\n // look for files only; ignore directories\n $finder->files();\n if ($name = get_input('name')) {\n if (\\str_contains($name, \".\")) {\n $finder->name($name);\n } else {\n $finder->name(\"*.{$name}\");\n }\n }\n }\n\n // check if there are any search results\n if ($finder->hasResults()) {\n foreach ($finder as $file) {\n $data[] = \"{$base_path}/\" . $file->getRelativePathname();\n }\n }\n\n return json_encode([\n 'path' => $base_path,\n 'list' => $list,\n 'data' => $data,\n 'project_dir' => project_dir(),\n 'example' => $example,\n ]);\n }", "public function getFilenames(): array\n {\n $filenames = $this->getEntityManager()->getConnection()->createQueryBuilder()\n ->from('image')\n ->select('DISTINCT CONCAT(\"data/images/\", filename)')\n ->where('filename != \"\"')\n ->orderBy('filename')->execute()->fetchAll(\\PDO::FETCH_COLUMN);\n\n return $filenames;\n }", "public function extractFileNamesFromHtml(string $html): array\n\t{\n\t\t$matches = [];\n\t\tpreg_match_all('/href=\"([0-9]+)\\.jpg\"/', $html, $matches);\n\n\t\treturn $matches[1];\n\t}", "public function ShowFiles() {\n $i = 0;\n if ($handle = opendir($this->filePath)) {\n while (false !== ($file = readdir($handle))) {\n if (($file != '..') && ($file != '.') && ($file != 'Thumbs.db')) {\n $files[$i] = $file;\n $i++;\n }\n }\n closedir($handle);\n }\n return($files);\n }", "public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/purrrr.php',\n 'data_custom/images/lolcats/index.html',\n 'data_custom/images/lolcats/thumbs/index.html',\n 'data_custom/images/lolcats/funny-pictures-basement-cat-has-pink-sheets.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-ai-calld-jenny-craig.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-asks-you-for-a-favor.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-asks-you-to-pay-fine.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-can-poop-rainbows.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-comes-to-save-day.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-decides-what-to-do.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-does-math.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-does-not-see-your-point.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-eyes-steak.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-has-a-beatle.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-has-a-close-encounter.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-has-had-fun.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-has-trophy-wife.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-hates-your-tablecloth.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-is-a-doctor.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-is-a-hoarder.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-is-a-people-lady.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-is-on-steroids.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-is-stuck-in-drawer.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-is-very-comfortable.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-kermit-was-about.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-looks-like-a-vase.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-looks-like-boots.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-ok-captain-obvious.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-pounces-on-deer.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-sits-in-box.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-sits-on-your-laptop.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-special-delivery.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-winks-at-you.jpg',\n 'data_custom/images/lolcats/funny-pictures-cats-are-in-a-musical.jpg',\n 'data_custom/images/lolcats/funny-pictures-cats-have-war.jpg',\n 'data_custom/images/lolcats/funny-pictures-fish-and-cat-judge-your-outfit.jpg',\n 'data_custom/images/lolcats/funny-pictures-kitten-drops-a-nickel-under-couch.jpg',\n 'data_custom/images/lolcats/funny-pictures-kitten-ends-meeting2.jpg',\n 'data_custom/images/lolcats/funny-pictures-kitten-fixes-puppy.jpg',\n 'data_custom/images/lolcats/funny-pictures-kitten-tries-to-stay-neutral.jpg',\n 'data_custom/images/lolcats/funny-pictures-kittens-dispose-of-boyfriend.jpg',\n 'data_custom/images/lolcats/funny-pictures-kittens-yell-at-eachother.jpg',\n 'data_custom/images/lolcats/ridiculous_poses_moddles.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-basement-cat-has-pink-sheets.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-ai-calld-jenny-craig.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-asks-you-for-a-favor.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-asks-you-to-pay-fine.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-can-poop-rainbows.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-comes-to-save-day.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-decides-what-to-do.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-does-math.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-does-not-see-your-point.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-eyes-steak.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-has-a-beatle.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-has-a-close-encounter.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-has-had-fun.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-has-trophy-wife.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-hates-your-tablecloth.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-is-a-doctor.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-is-a-hoarder.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-is-a-people-lady.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-is-on-steroids.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-is-stuck-in-drawer.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-is-very-comfortable.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-kermit-was-about.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-looks-like-a-vase.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-looks-like-boots.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-ok-captain-obvious.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-pounces-on-deer.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-sits-in-box.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-sits-on-your-laptop.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-special-delivery.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-winks-at-you.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cats-are-in-a-musical.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cats-have-war.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-fish-and-cat-judge-your-outfit.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-kitten-drops-a-nickel-under-couch.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-kitten-ends-meeting2.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-kitten-fixes-puppy.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-kitten-tries-to-stay-neutral.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-kittens-dispose-of-boyfriend.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-kittens-yell-at-eachother.jpg',\n 'data_custom/images/lolcats/thumbs/ridiculous_poses_moddles.jpg',\n );\n }", "protected function getExecutablesSearchPathList()\n {\n $searchPaths = CommandUtility::getPaths(true);\n $result = [];\n\n foreach ($searchPaths as $path => $isValid) {\n $searchPathData = $this->getServicePathStatus($isValid);\n $result[] = [\n 'class' => $searchPathData['statusCSSClass'],\n 'accessible' => 'LLL:EXT:lang/Resources/Private/Language/locallang_common.xlf:' . $searchPathData['accessible'],\n 'path' => GeneralUtility::fixWindowsFilePath($path),\n ];\n }\n\n return $result;\n }", "public function list_shared_files_with() {\n $stmt = $this->pdo->prepare('select filename, name from share s, user u, file f where s.user_id = :id and s.owner_id = u.id and s.file_id = f.id');\n $stmt->bindValue(':id', $this->id);\n $stmt->execute();\n $res = $stmt->fetchAll();\n $result = array();\n foreach ($res as $f) {\n array_push($result, array('filename' => $f['filename'],\n 'username' => $f['name']));\n }\n return $result;\n }", "public function getFiles($fullPath = true)\n {\n // What information do we have to get?\n if ($fullPath === true) {\n $method = 'realpath';\n\n } else {\n $method = 'dirname';\n }\n\n // Collect the data.\n $result = array();\n foreach ($this->map as $file) {\n $result[] = $method($file['path']);\n }\n\n return $result;\n }", "public function fileList()\n {\n return array_values(array_diff(scandir($this->location), ['.', '..']));\n }", "public function PathAndUri(){\n\n $evald_path = $this->getPath();\n\n if( $evald_path ){\n\n $import_dirs = array();\n\n if( Less_Environment::isPathRelative($evald_path) ){\n //if the path is relative, the file should be in the current directory\n $import_dirs[ $this->currentFileInfo['currentDirectory'] ] = $this->currentFileInfo['uri_root'];\n\n }else{\n //otherwise, the file should be relative to the server root\n $import_dirs[ $this->currentFileInfo['entryPath'] ] = $this->currentFileInfo['entryUri'];\n\n //if the user supplied entryPath isn't the actual root\n $import_dirs[ $_SERVER['DOCUMENT_ROOT'] ] = '';\n\n }\n\n // always look in user supplied import directories\n $import_dirs = array_merge( $import_dirs, Less_Parser::$options['import_dirs'] );\n\n\n foreach( $import_dirs as $rootpath => $rooturi){\n if( is_callable($rooturi) ){\n list($path, $uri) = call_user_func($rooturi, $evald_path);\n if( is_string($path) ){\n $full_path = $path;\n return array( $full_path, $uri );\n }\n }else{\n $path = rtrim($rootpath,'/\\\\').'/'.ltrim($evald_path,'/\\\\');\n\n if( file_exists($path) ){\n $full_path = Less_Environment::normalizePath($path);\n $uri = Less_Environment::normalizePath(dirname($rooturi.$evald_path));\n return array( $full_path, $uri );\n }\n }\n }\n }\n }", "function MyMod_Data_Groups_Files_Paths($singular)\n {\n $paths=$this->ItemDataGroupPaths;\n\n if (!$this->IsMain())\n {\n array_push($paths,$this->MyMod_Setup_Path());\n }\n\n return $paths;\n }", "static function getList()\n {\n $out = array();\n\n if ($dh = opendir(__DIR__ . '/../img/')) {\n while (($file = readdir($dh)) !== false) {\n if (substr($file, -4) === '.jpg') {\n $filename = substr($file, 0, -4);\n $out[$filename] = realpath(__DIR__ . '/../img/' . $file);\n }\n }\n\n closedir($dh);\n }\n\n return $out;\n }", "private function getFiles()\n {\n $process = new Process('git diff --cached --name-status --diff-filter=ACMR');\n $process->run();\n\n if ($process->isSuccessful()) {\n return \\array_filter(\\explode(\"\\n\", $process->getOutput()));\n }\n\n return [];\n }", "public function getFiles()\n {\n if (isset($this->raw->files)) {\n $base = $this->getBasePath();\n $files = array();\n\n foreach ((array) $this->raw->files as $file) {\n $file = new SplFileInfo(\n $path = $base . DIRECTORY_SEPARATOR . Path::canonical($file)\n );\n\n if (false === $file->isFile()) {\n throw new RuntimeException(\n sprintf(\n 'The file \"%s\" does not exist or is not a file.',\n $path\n )\n );\n }\n\n $files[] = $file;\n }\n\n return $files;\n }\n\n return array();\n }", "function getPathPhpFiles($absRoot,$urlRoot,$fullPath) {\n\t$directory = $absRoot.$urlRoot.$fullPath;\n\t//bold ($directory);\n\t$pages = glob($directory . \"*.php\");\n\n\tforeach ($pages as $page){\n\t\t$fixed = str_replace($absRoot.$urlRoot,'',$page);\n\t\t$row[$fixed] = $fixed;\n\t}\n\treturn $row;\n}", "public static function GetConvertedFiles()\n\t{\n\t\t$results = array();\n\t\t$jsons = self::StatusConvert();\n\t\tforeach($jsons as $json)\n\t\t\tarray_push($results, array(\n\t\t\t\t\"name\"\t\t=> $json->outputName\n\t\t\t\t,\"size\"\t\t=> $json->outputSize\n\t\t\t\t,\"original\"\t=> $json->name\n\t\t\t\t,\"source\"\t=> self::GetFile($json->outputName)\n\t\t\t));\n\t\treturn $results;\n\t}", "private function getFileList()\n {\n\n $count = $this->getFileCount();\n $size = $this->getSize() + 4;\n\n $this->seek(\n $this->offset\n + 18\n + $this->getAliasSize()\n + 4\n + $this->getMetadataSize()\n );\n\n return $this->readFileList($count, $size);\n }", "private function getAllFileNames(): Collection\n {\n return collect(File::allFiles(config('deepl.lang_directory') . '/' . app()->getLocale()))\n ->map(function (SplFileInfo $file) {\n return $file->getFilenameWithoutExtension();\n });\n }", "final public function get_paths() {\n return array();\n }", "public function getTestFilePaths() {\n return $this->testFilePaths;\n }", "public function getFilesInfo($path, $showKeywords=false, $showVersion=false, $showHistory=false, $custom=\"\", $showFiles=true, $showFolders=false)\n\t{\n\t\t\n\t\t$files = array();\n\t\t\n\t\t// check if the $path is specified\n\t\tif (empty($path)) return \"Error: the \\$path argument is missing\";\n\t\telse {\n\t\t\t\n\t\t\t$path = rawurlencode(urldecode($path));\n\t\t\t$kwds = $showKeywords ? \"&showkywds=true\" : \"\";\n\t\t\t$version = $showVersion ? \"&showversions=true\" : \"\";\n\t\t\t$history = $showHistory ? \"&showhistory=true\" : \"\";\n\n\t\t\tif (!empty($custom))\n\t\t\t{\n\t\t\t\tif (substr($custom,0,1) != \"&\") $custom = \"&\".$custom;\n\t\t\t}\n\n\t\t\t$url = \"http://{$this->wnServer}/webnative/portalDI?showfiles=true&path=\".$path.$kwds.$version.$history.$custom;\n\t\t\t$result = json_decode($this->curlObj->fetch_url($url),true);\n\n\t\t\t// If the path does not exist, an error will be returned\n\t\t\tif (isset($result[\"ERROR_MSG\"])) return $result[\"ERROR_MSG\"];\n\t\t\telse \n\t\t\t{\n\t\t\t\t// Loop through the results and remove directory from the listing\n\t\t\t\tforeach($result[\"FILES_INFO\"] AS $k => $value)\n\t\t\t\t{\n\t\t\t\t\tif ($showFiles && ($value[\"FILE_ISADIR\"] == 0)) array_push($files,$value);\t\n\t\t\t\t\tif ($showFolders && ($value[\"FILE_ISADIR\"] == 1)) array_push($files,$value);\t\n\t\t\t\t}\n\t\t\t\treturn $files;\n\t\t\t}\n\t\t}\n\t}", "public function getFileList()\n {\n return array_map(\n function (FileEntry $file) {\n return $file->getFilename();\n },\n $this->pharchive->getFiles()\n );\n }", "protected function getFileList()\n\t\t{\n\t\t\t$dirname=opendir($this->ruta);\n\t\t\t$files=scandir($this->ruta);\n\t\t\tclosedir ($dirname);\t\n\t\t\t\n\t\t\treturn $files;\t\t\n\t\t}", "private function _htmlFile() {\n\t\tif ($this->is_search) { //on search mode\n\t\t\n\t\t\tif (empty($this->founds)) {\n\t\t\t\treturn '<div class=\"cfind-div cfind-message\">No content found</div>';\n\t\t\t}\n\t\t\t\n\t\t\t$html = '';\n\t\t\t\n\t\t\t//first : folder items\n\t\t\tforeach ((array) $this->founds AS $key => $val) {\n\t\t\t\tif (g($val, 'type') != 'folder') continue;\n\t\t\t\t$html .= $this->_listFolder($val);\n\t\t\t}\n\t\t\t\n\t\t\t//second : file items\n\t\t\tforeach ((array) $this->founds AS $key => $val) {\n\t\t\t\tif (g($val, 'type') != 'file') continue;\n\t\t\t\t$html .= $this->_listFile($val);\n\t\t\t}\n\t\t\t\n\t\t\treturn $html;\n\t\t}\n\t\n\t\t$path = g($this->conf, 'path');\n\t\t\n\t\t$rpath = $this->_path($path);\n\t\tif (!file_exists($rpath) || !is_dir($rpath)) return '';\n\t\t\n\t\t$dir = $files = array();\n\t\t$hnd = opendir($rpath);\n\t\twhile ($read = readdir($hnd)) {\n\t\t\tif ($read == '.' || $read == '..') continue;\n\t\t\t\n\t\t\t$mypath = $this->_sanitize($path.'/'.$read);\n\t\t\tif (is_dir($this->_path($mypath)))\n\t\t\t\tarray_push($dir, ['name' => $read, 'time' => filemtime($rpath.'/'.$read)]);\n\t\t\telse {\n\t\t\t\tif (g($_GET, 'ext')) {\n\t\t\t\t\t$ext = explode(',',str_replace(' ', '', g($_GET, 'ext')));\n\t\t\t\t\n\t\t\t\t\tif (!in_array(strtolower(pathinfo($read, PATHINFO_EXTENSION)), $ext))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tarray_push($files, ['name' => $read, 'time' => filemtime($rpath.'/'.$read)]);\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t\n\t\tusort($files,function($a,$b) { return $b['time'] - $a['time']; });\n\t\t$files = array_column($files,'name');\n\t\t\n\t\tusort($dir,function($a,$b) { return $b['time'] - $a['time']; });\n\t\t$dir = array_column($dir,'name');\n\t\t\n\t\tclosedir($hnd);\n\t\t\n\t\t$html = '';\n\t\t\n\t\t//first : folder items\n\t\tforeach ((array) $dir AS $key => $val) {\n\t\t\t$html .= $this->_listFolder(['path' => $path, 'name' => $val]);\n\t\t}\n\t\t\n\t\t//second : file items\n\t\tforeach ((array) $files AS $key => $val) {\n\t\t\t$html .= $this->_listFile(['path' => $path, 'name' => $val]);\n\t\t}\n\t\t\n\t\tif (empty($html)) return '<div class=\"cfind-div cfind-message\">Folder is empty</div>';\n\t\t\t\n\t\treturn $html;\n\t}", "protected function pathExtract(): array\n {\n $regExp = [];\n $path = $this->path;\n\n if (\\is_array($this->path)) {\n $regExp = \\array_pop($this->path);\n $path = \\array_pop($this->path);\n }\n\n return [$path, $regExp];\n }", "public function getFiles()\n {\n return FileInfo::findBy( Condition::EQ(FileInfo::TABLE, 'module_id', $this->getId()),\n new ArrayObject(array('sort'=>$this->getSortBy(), 'ord'=>'asc')) );\n }", "public function getPrintFiles()\n {\n $key = $this->specification->key;\n\n $files = glob(storage_path('prints' . DIRECTORY_SEPARATOR . $key . DIRECTORY_SEPARATOR . '*.docx'));\n $file_names = array_map('basename', $files);\n\n return $file_names;\n }", "public function lookForFiles()\n\t{\n\t\t$this->_jobOptions = [];\n\n\t\tforeach ($this->getProject()->jobs as $job) {\n\t\t\tif ($job->paramountProjectJob instanceof ParamountProjectJob){\n\n\t\t\t\t$this->setProjectJob($job);\n\n\t\t\t\t$this->buildJobOptionsForService();\n\t\t\t}\n\t\t}\n\n\t}", "function _generateFilesList() {\n return array();\n }", "public function getFiles() {\r\n\r\n $files = array();\r\n\r\n $userId= $this->userId;\r\n $trackingId = $this->trackingFormId;\r\n $dir = FILEPATH . $userId. '/' . $trackingId;\r\n\r\n if (is_dir($dir)) {\r\n if ($dh = opendir($dir)) {\r\n while (($file = readdir($dh)) !== false) {\r\n if($file != '.' && $file != '..') {\r\n $size = $this->Size($dir . '/' . $file);\r\n array_push($files, array('name'=>$file,\r\n 'urlfilename'=>urlencode($file),\r\n 'size'=>$size));\r\n }\r\n }\r\n closedir($dh);\r\n }\r\n }\r\n\r\n return $files;\r\n }", "public function directoryWithFilesDataProvider(): array\n {\n $multiMap = ['OtherFile' => 'other_file.json', 'JSONFile' => 'j_s_o_n_file.json'];\n $multiDirMap = ['FileFirst' => 'first/file_first.exe', 'FileSecond' => 'first/file_second.exe'];\n $multiDirMap['FileThird'] = 'second/file_third.exe';\n $multiDirMap['SomeExt'] = 'some_ext.exe';\n $singleLoadData = ['OneFile' => ['param1' => 'some_value']];\n $multiLoadData = ['OtherFile' => ['param2' => 'other_value'], 'JSONFile' => ['param3' => 'last_value']];\n $multiDirLoadData = ['FileFirst' => ['param4' => 'no_value'], 'FileSecond' => ['param5' => 'ext_value']];\n $multiDirLoadData['FileThird'] = ['param6' => 'this_value'];\n $multiDirLoadData['SomeExt'] = ['param7' => 'that_value'];\n\n return [\n 'single file' => ['single', '/^.*\\..*$/', ['OneFile' => 'one_file.json'], $singleLoadData],\n 'multiple files with mask' => ['multi', '/^.*\\.json$/', $multiMap, $multiLoadData],\n 'multiple directories' => ['container', '/^.*\\.exe$/', $multiDirMap, $multiDirLoadData],\n ];\n }", "public function find($file);", "function get_file_objs() {\n return $this->file_objs;\n }", "protected function getFilesToProcess()\n {\n return array(\n 'custom/modules/Quotes/metadata/detailviewdefs.php',\n );\n }", "function get_files($instructor=False, $sources=array('class', 'lab', 'project', 'exam', 'review', 'capstone', 'continued-lab'), $file_path = '.', $access=array(), $virtual=array(), $categories=array(), $secret='really') {\n $results = array();\n $basedir = scandir($file_path);\n foreach ($sources as $i => $l0) {\n if (in_array($l0, $basedir) && is_dir($file_path . '/' . $l0)) {\n $level1 = scandir($file_path . '/' . $l0);\n sort($level1);\n foreach ($level1 as $i => $l1) {\n if (substr($l1, 0, 1) != '.' && is_dir($file_path . '/' . $l0 . '/' . $l1)) {\n // The following code allows the system recursively look through the Directory\n // structure within a class, and the system can now process RELATIVE links\n // that go into those subordinate directories\n $level2 = array();\n try {\n $Iterator = new RecursiveIteratorIterator(\n new RecursiveDirectoryIterator($file_path . '/' . $l0 . '/' . $l1),\n RecursiveIteratorIterator::LEAVES_ONLY,\n RecursiveIteratorIterator::CATCH_GET_CHILD);\n foreach($Iterator as $name => $object) {\n $name = explode(\"/\", $name);\n unset($name[2]);\n unset($name[1]);\n unset($name[0]);\n $name = implode(\"/\", $name);\n $level2[] = $name;\n }\n } catch (Exception $e) {\n // Unable to recurse, so don't bother...\n }\n //$level2 = scandir($file_path . '/' . $l0 . '/' . $l1);\n $results[$l0][$l1] = array();\n sort($level2);\n foreach ($level2 as $i => $l2) {\n $key = sha1($secret.$l0.$l1.$l2);\n if (substr($l2, 0, 1) != '.' && validate_file($instructor, $l2, $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2, $access)[0]) {\n if (is_link($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2)) {\n if (validate_file($instructor, readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), $access)[0]) {\n $vf = validate_file($instructor, readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), $access);\n $category = categorize_file($instructor, $l2, readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), $vf[5], $categories);\n $results[$l0][$l1][$l2] = array('actual' => $file_path . '/' . $l0 . '/' . $l1 . '/' . readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2),\n 'visible' => $vf[1],\n 'year' => $vf[2],\n 'month' => $vf[3],\n 'day' => $vf[4],\n 'type' => $category[0],\n 'category' => $category[1],\n 'key' => $key);\n }\n } else {\n $vf = validate_file($instructor, $l2, $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2, $access);\n $category = categorize_file($instructor, $l2, $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2, $vf[5], $categories);\n $results[$l0][$l1][$l2] = array('actual' => $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2,\n 'visible' => $vf[1],\n 'year' => $vf[2],\n 'month' => $vf[3],\n 'day' => $vf[4],\n 'type' => $category[0],\n 'category' => $category[1],\n 'key' => $key);\n }\n }\n }\n }\n }\n }\n }\n # Add Virtual files, format like array('class'=>array(1 => array(array('answers.html', 'homework/answers05.html'))))\n foreach ($virtual as $l0 => $l1array) {\n if (isset($results[$l0])) {\n $classes = array_keys($results[$l0]);\n foreach ($l1array as $day => $l2array) {\n if (isset($classes[$day-1])) {\n foreach ($l2array as $i => $values) {\n $virt_file = $values[0];\n $real_file = $values[1];\n if (validate_file($instructor, $real_file, $real_file, $access)[0]) {\n $key = sha1($secret.$real_file.$virt_file);\n $vf = validate_file($instructor, $real_file, $real_file, $access);\n $category = categorize_file($instructor, $virt_file, $real_file, $vf[5], $categories);\n $results[$l0][$classes[$day-1]][$virt_file] = array('actual' => $real_file,\n 'visible' => $vf[1],\n 'year' => $vf[2],\n 'month' => $vf[3],\n 'day' => $vf[4],\n 'type' => $category[0],\n 'category' => $category[1],\n 'key' => $key);\n }\n }\n }\n }\n }\n }\n #####################################################\n # Verify that the class is not blocked by security...\n $today = getdate();\n foreach ($results as $l0 => $classes) {\n $counter = 1;\n foreach ($classes as $l1 => $data) {\n foreach ($data as $filename => $fdata) {\n if ($fdata['year'] == 1 && $fdata['month'] == 1 && $fdata['day'] == 1) {\n $cate = $fdata['category'];\n if (isset($access[$l0.\"_\".$counter]) && $cate == 'title') {\n $sspec = $l0.\"_\".$counter;\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n } elseif (isset($access[$l0.\"_\".$counter.\"/\".$cate])) {\n $sspec = $l0.\"_\".$counter.\"/\".$cate;\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n } elseif (isset($access[$l0.\"_\".$counter.\"/\".$filename])) {\n $sspec = $l0.\"_\".$counter.\"/\".$filename;\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n } elseif (isset($access[$l0.\"_\".$counter.\"/all\"])) {\n $sspec = $l0.\"_\".$counter.\"/all\";\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n }\n }\n }\n $counter++;\n }\n }\n return $results;\n }", "protected function getFilesInDirCreateTestDirectory() {}", "public function files()\n {\n if($this->collection->empty())\n {\n foreach($this->fileList() as $file)\n {\n if(!is_dir($file))\n {\n $this->files->push($file);\n $this->collection->push(new Reader($this->path . $file));\n }\n else\n {\n $this->directories->push($file);\n }\n }\n }\n\n return $this->collection->get();\n }", "public function getPaths()\n {\n return $this->paths;\n }", "public function get_files()\n {\n }", "public function getFiles(): array\n {\n return [$this->file];\n }" ]
[ "0.6785689", "0.6522868", "0.63721865", "0.61564285", "0.61357844", "0.6121081", "0.6059127", "0.5994545", "0.5969169", "0.5963418", "0.595956", "0.59460074", "0.59460074", "0.59460074", "0.5936259", "0.5908881", "0.5865822", "0.5853286", "0.5838035", "0.5817389", "0.581305", "0.58006704", "0.57471853", "0.57349765", "0.57333344", "0.57226706", "0.5721233", "0.5709513", "0.5696428", "0.56922907", "0.5638239", "0.5636844", "0.5636037", "0.5625771", "0.5620554", "0.56081825", "0.5607507", "0.55974436", "0.5587114", "0.5587114", "0.5587114", "0.55768204", "0.55587775", "0.5548453", "0.553821", "0.55299014", "0.5514394", "0.55135345", "0.54866755", "0.5483783", "0.54612786", "0.5456338", "0.54531753", "0.54522353", "0.54418916", "0.5432246", "0.5428789", "0.5421801", "0.5412179", "0.53935236", "0.53717715", "0.5366524", "0.53661764", "0.5361406", "0.5356895", "0.535682", "0.534528", "0.5338184", "0.5338076", "0.53378826", "0.53320456", "0.5322813", "0.53195727", "0.5314592", "0.531458", "0.5311172", "0.5309649", "0.5297839", "0.529687", "0.52899736", "0.52848524", "0.5284421", "0.52839166", "0.52817744", "0.5277611", "0.52762586", "0.5275622", "0.5273895", "0.5271405", "0.52707046", "0.526993", "0.5266565", "0.52618134", "0.52609485", "0.5236372", "0.52309513", "0.52303284", "0.5223744", "0.5222678", "0.5213917" ]
0.7564424
0
Filter temporary data based on the given prefix
private function _extractFromTempData(string $prefix, array $tempData): array { $result = []; foreach ($tempData as $key => $value) { if ((new StringOperation)->str_starts_with($key, $prefix)) { $result[str_replace($prefix. "_", "", $key)] = $value; } } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function _getFilter() {}", "public function testPrefixedExtraction()\n {\n $queryData = ['prefix_a' => 1, 'b' => 2];\n $requestData = ['a' => 2, 'prefix_b' => 4, 'c' => 8];\n $contentData = ['b' => 3, 'prefix_c' => 6, 'prefix_d' => 9];\n $request = $this->createRequest($queryData, $requestData, $contentData);\n\n $this->assertEquals(\n ['a' => 1, 'b' => 4, 'c' => 6, 'd' => 9],\n $this->extractParameters($request, 'prefix_')\n );\n }", "public function collectExtraData($prefix = '') {\n // logit('REST: ' . print_r($this->getRequest()->getPost(), true));\n $vars = $this->getRequest()->getPost();\n $lprefix = strlen($prefix);\n $out = array();\n foreach($vars as $n => $v) {\n if (substr($n, 0, $lprefix) == $prefix) {\n // logit(\"MATCH: {$n} => {$v}\");\n $out[$n] = $v;\n }\n }\n $this->extra = $out;\n }", "public function setPrefix($prefix);", "public function listAll($prefix = '');", "protected abstract function filter();", "public function startsWith($prefix);", "protected function getAll($prefix = '') {\n return $this->getIterator('/^' . preg_quote($this->getApcuKey($prefix), '/') . '/');\n }", "public function filter($data);", "protected function makeModelFilter($prefix)\n {\n new MakeModelFilter($this, $this->files, $prefix);\n }", "private function _event_field_filter($prefix = '')\n\t{\n\t\t// Apply prefix to field if given\n\t\t$field_name = ($prefix ? $prefix.'.' : '') . 'field_id';\n\n\t\t// Check parameter\n\t\tif ($event_field = $this->EE->TMPL->fetch_param('events_field'))\n\t\t{\n\t\t\t// Get fields from parameter\n\t\t\tlist($fields, $in) = low_explode_param($event_field);\n\n\t\t\t// Get id for each field\n\t\t\tforeach ($fields AS &$field)\n\t\t\t{\n\t\t\t\t$field = $this->_get_field_id($field);\n\t\t\t}\n\n\t\t\t$this->EE->db->{($in ? 'where_in' : 'where_not_in')}($field_name, $fields);\n\t\t}\n\t}", "public function filtering();", "function getRecords($obj){\n\t\t$prefixArr= array('tt','tx');\n\t\t$temp = explode(',',$obj['records']);\n\t\t$clean = array();\n\t\tif(is_array($temp)){\n\t\t\t\n\t\t\tforeach($temp as $k=>$rec){\n\t\t\t\tif($this->checkPrefix($rec,$prefixArr)){\n\t\t\t\t\t$clean[] = $rec;\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\n\t\tif(count($clean)==0){\n\t\t\t//no clean recs to return \n\t\t\treturn false;\n\t\t}else{\n\t\t\t$clean = implode(',',$clean);\n\t\t\t$recs = $this->getRecs($clean,$obj['orderBy']);\n\t\t\treturn $recs;\n\t\t}\n\t}", "public function find_by_prefix($prefix) {\n $this->ensure_path_exists();\n $prefix = preg_replace('#(\\*|\\?|\\[)#', '[$1]', $prefix);\n $files = glob($this->glob_keys_pattern($prefix), GLOB_MARK | GLOB_NOSORT);\n $return = array();\n if ($files === false) {\n return $return;\n }\n foreach ($files as $file) {\n // Trim off \".cache\" from the end.\n $return[] = substr(basename($file), 0, -6);\n }\n return $return;\n }", "public function setPrefix( $prefix );", "function readFilteredFolder($dir, $fileprefix)\n{\n $filtered = array ();\n $folder = readFolder($dir);\n\n if (!$folder) {\n return false;\n }\n\n foreach ($folder as $file) {\n if (endsWith($file, $fileprefix)) {\n $filtered[] = $file;\n }\n }\n\n return $filtered;\n}", "public function prefixKey($prefix);", "function startsWith($prefix) {\n $node = $this->find($prefix);\n return $node != null; // 前缀存在即可\n }", "static function detachPrefixKeys($arr_inputs, $prefix = 'openid.')\n\t{\n\t\t$arr_outputs = array();\n\t\t$len = strlen($prefix);\n\t\tforeach ($arr_inputs as $k => $v) {\n\t\t\t$key = ($prefix === substr($k, 0, $len)) ? substr($k, $len) : $k;\n\t\t\t$arr_outputs[$key] = $v;\n\t\t}\n\t\treturn $arr_outputs;\n\t}", "public function clearByPrefix(string $prefix): bool;", "public function filter();", "public function getByPathPrefix($pathPrefix);", "function acf_remove_array_key_prefix($array, $prefix)\n{\n}", "protected function glob_keys_pattern($prefix = '') {\n if ($this->singledirectory) {\n return $this->path . '/'.$prefix.'*.cache';\n } else {\n return $this->path . '/*/'.$prefix.'*.cache';\n }\n }", "public function getWildcardPrefixes() {}", "private function _filterFields($aFields, $sPrefix)\n {\n $aAllowed = array();\n foreach ($aFields as $sKey => $sValue) {\n if (strpos($sValue, $sPrefix) === 0) {\n $aAllowed[] = $aFields[$sKey];\n }\n }\n\n return $aAllowed;\n }", "public function flushPrefix($prefix)\n\t{\n\t\t$prefix = $this->id_prefix . $prefix;\n\t\t$prefix_like = \"$prefix%\";\n\n\t\ttry {\n\t\t\t$this->db->fetchAll(\"\n\t\t\t\tDELETE FROM cache\n\t\t\t\tWHERE id LIKE ?\n\t\t\t\", array($prefix_like));\n\t\t} catch (\\Exception $e) {\n\t\t\tif (!$this->silence_exceptions) {\n\t\t\t\tthrow $e;\n\t\t\t}\n\t\t}\n\n\t\tforeach (array_keys($this->loaded) as $key) {\n\t\t\tif (strpos($key, $prefix) === 0) {\n\t\t\t\tunset($this->loaded[$key]);\n\t\t\t}\n\t\t}\n\t}", "public function suggestProperty($prefix = null){\n $error = [\n \"status\" => \"error\",\n \"message\" => \"invalid query\",\n \"details\" => \"prefix\"\n ];\n $result = [];\n\n if (!isset($prefix))\n return $error;\n\n $result[\"result\"] = $this->mapper->filterPropertiesPrefix($this->input[\"prefix\"]);\n return $result;\n }", "public function deleteAll($prefix = '');", "public function Get_All_Prefix()\n {\n $this->DB->Change_DB($this->PERSON_DB);\n $sql = \"SELECT `code`,`name` FROM `prefix` ORDER BY `name_full`\";\n $result = $this->DB->Query($sql);\n $this->DB->Change_DB($this->DEFAULT_DB);\n if($result)\n {\n $prefix = array();\n for($i=0;$i<count($result);$i++)\n {\n $temp['id'] = $result[$i]['code'];\n $temp['prefix'] = $result[$i]['name'];\n array_push($prefix,$temp);\n }\n return $prefix;\n }\n else\n {\n return false;\n }\n\n }", "function fn_filter_uploaded_data($name, $filter_by_ext = array())\n{\n $udata_local = fn_rebuild_files('file_' . $name);\n $udata_other = !empty($_REQUEST['file_' . $name]) ? $_REQUEST['file_' . $name] : array();\n $utype = !empty($_REQUEST['type_' . $name]) ? $_REQUEST['type_' . $name] : array();\n\n if (empty($utype)) {\n return array();\n }\n\n $filtered = array();\n\n foreach ($utype as $id => $type) {\n if ($type == 'local' && !fn_is_empty(@$udata_local[$id])) {\n $filtered[$id] = fn_get_local_data(Bootstrap::stripSlashes($udata_local[$id]));\n\n } elseif ($type == 'server' && !fn_is_empty(@$udata_other[$id]) && (Registry::get('runtime.skip_area_checking') || AREA == 'A')) {\n fn_get_last_key($udata_other[$id], 'fn_get_server_data', true);\n $filtered[$id] = $udata_other[$id];\n\n } elseif ($type == 'url' && !fn_is_empty(@$udata_other[$id])) {\n fn_get_last_key($udata_other[$id], 'fn_get_url_data', true);\n $filtered[$id] = $udata_other[$id];\n } elseif ($type == 'uploaded' && !fn_is_empty(@$udata_other[$id])) {\n fn_get_last_key($udata_other[$id], function ($file_path) {\n return fn_get_server_data($file_path, array(Storage::instance('custom_files')->getAbsolutePath('')));\n }, true);\n\n $filtered[$id] = $udata_other[$id];\n }\n\n if (isset($filtered[$id]) && $filtered[$id] === false) {\n unset($filtered[$id]);\n fn_set_notification('E', __('error'), __('cant_upload_file', ['[product]' => PRODUCT_NAME]));\n continue;\n }\n\n if (!empty($filtered[$id]['name'])) {\n $filtered[$id]['name'] = \\Tygh\\Tools\\SecurityHelper::sanitizeFileName(urldecode($filtered[$id]['name']));\n \n if (!fn_check_uploaded_data($filtered[$id], $filter_by_ext)) {\n unset($filtered[$id]);\n }\n }\n }\n\n static $shutdown_inited;\n\n if (!$shutdown_inited) {\n $shutdown_inited = true;\n register_shutdown_function('fn_remove_temp_data');\n }\n\n /**\n * Executed after filtering uploaded files.\n * It allows to change or extend the filtered files.\n *\n * @param string $name name of uploaded data\n * @param array $filter_by_ext allow file extensions\n * @param array $filtered filtered file data\n * @param array $udata_local List of uploaded files\n * @param array $udata_other List of files object types\n * @param array $utype List of files sources\n */\n fn_set_hook('filter_uploaded_data_post', $name, $filter_by_ext, $filtered, $udata_local, $udata_other, $utype);\n\n return $filtered;\n}", "public function providerPrefixRoundTrip() {\n return [\n [\n ['' => 'test_'],\n 'test_',\n ],\n [\n [\n 'fooTable' => 'foo_',\n 'barTable' => 'bar_',\n ],\n [\n 'fooTable' => 'foo_',\n 'barTable' => 'bar_',\n ],\n ],\n ];\n }", "function _prefix($prefix = 'admin') {\n\t\tif (isset($this->params['prefix']) && $this->params['prefix'] == $prefix) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "protected function dataForPrefix($namespace, $prefix)\n {\n if (!isset($this->cachedData[$namespace][$prefix])) {\n $this->loadDataForPrefix($namespace, $prefix);\n\n }\n\n // If no custom data was setted using offsetSet() just return that\n if (!isset($this->customData[$namespace][$prefix])) {\n return $this->cachedData[$namespace][$prefix];\n }\n\n $data = $this->cachedData[$namespace][$prefix];\n\n array_unshift($data, $this->customData[$namespace][$prefix]);\n\n return $data;\n\n }", "public function clearCacheDataWithPrefix($dataCacheKeyPrefix = ''){\n $cacheKey = $this->getCacheKey($dataCacheKeyPrefix);\n $this->clearCache($cacheKey);\n }", "function mPREFIX(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$PREFIX;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n // Tokenizer11.g:101:3: ( 'prefix' ) \n // Tokenizer11.g:102:3: 'prefix' \n {\n $this->matchString(\"prefix\"); \n\n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }", "static function findOnlyUsersFromUserListingTable($external_table, $field_prefix, $filter, $min_state = STATE_ARCHIVED) {\n $users_table = TABLE_PREFIX . 'users';\n $user_id_field = \"{$field_prefix}_id\";\n\n $where_part = DB::prepare(\"($users_table.id = $external_table.$user_id_field AND $users_table.state >= ?)\", $min_state);\n\n if($filter) {\n $where_part .= \" AND ($filter)\";\n } // if\n\n return Users::findBySQL(\"SELECT DISTINCT $users_table.* FROM $users_table, $external_table WHERE $where_part ORDER BY CONCAT($users_table.first_name, $users_table.last_name, $users_table.email)\");\n }", "function get_attribute_names_with_prefix($prefix)\n {\n }", "public static function keys($prefix)\n {\n return parent::keys($prefix);\n }", "function getFieldName_Filter($id_field, $field_prefix = FALSE) {\n\t\tif( $field_prefix === FALSE )\n\t\t \treturn 'field_filter['.$id_field.']';\n\t\telse\n\t\t\treturn $field_prefix.'[field_filter]['.$id_field.']';\n\t }", "public function setPrefix($prefix)\n {\n $this->__set(self::FIELD_PREFIX,$prefix);\n return $this;\n }", "function strip_prefix(string $string, string $prefix, Encoding $encoding = Encoding::UTF_8): string\n{\n if ($prefix === $string) {\n return '';\n }\n\n if ('' === $prefix || '' === $string || !starts_with($string, $prefix, $encoding)) {\n return $string;\n }\n\n return slice($string, length($prefix, $encoding), null, $encoding);\n}", "public function setCustomerPrefix($customerPrefix);", "public function queryKeys($prefix = null)\n\t{\n\t\treturn [];\n\t}", "private function filters() {\n\n\n\t}", "function getFieldId_Filter($id_field, $field_prefix = FALSE) {\n\t\tif( $field_prefix === FALSE )\n\t\t \treturn 'field_filter_'.$id_field;\n\t\telse\n\t\t\treturn $field_prefix.'field_filter_'.$id_field;\n\t }", "function apply_url_prefix($data, $prefix) {\n foreach (array_keys($data['tar']) as $key) {\n $data['tar'][$key] = $prefix . $data['tar'][$key];\n }\n return $data;\n}", "public function filterPrefix($prefix)\n {\n $names = [];\n\n foreach ($this->getMethods() as $method) {\n if ($method->isPublic() && substr_count($method->getName(), $prefix, null, strlen($prefix))) {\n $names[] = $method->getName();\n }\n }\n\n return $names;\n }", "public function getPrefix() {}", "public function filterByName($filter) {\n if (strlen($filter) > 0) {\n $this->calcData = array_filter($this->calcData, function($item) use ($filter) {\n if (strpos($item['name'], $filter) !== false) {\n return $item;\n }\n });\n }\n }", "abstract public function filters();", "function strip_prefix(string $string, string $prefix): string\n{\n if ('' === $prefix || !starts_with($string, $prefix)) {\n return $string;\n }\n\n /** @psalm-suppress MissingThrowsDocblock - $offset is within-bounds. */\n return slice($string, length($prefix));\n}", "function _prepareFilter(&$controller){\n \t\n\t\t$filter = array();\n if(isset($controller->data)){\n foreach($controller->data as $model=>$fields){\n foreach($fields as $key=>$field){\n if($field == ''){\n unset($controller->data[$model][$key]);\n }\n }\n }\n \n App::import('Sanitize');\n $sanit = new Sanitize();\n $controller->data = $sanit->clean($controller->data);\n $filter = $controller->data;\n }\n \n if (empty($filter)){\n \t\t$filter = $this->_checkParams($controller); \t\n }\n $controller->data = $filter;\n }", "public function setPrefix($prefix){\n\t\t$this->prefix = $prefix;\n\t}", "public function setPrefix($prefix)\n {\n $this->prefix = $prefix;\n return $this;\n }", "public function getPrefix();", "public function getPrefix();", "function startsWith($prefix)\n {\n $node = $this->root;\n for ($i = 0; $i < strlen($prefix); $i++) {\n $index = ord($prefix[$i]) - ord('a');\n if (isset($node->children[$index])) {\n $node = $node->children[$index];\n } else {\n return false;\n }\n }\n return true;\n }", "public function startsWithIgnoreCase($prefix) {\n return mb_stripos($this->rawString, $prefix, 0, $this->charset) === 0;\n }", "public static function filter($var)\n {\n //TODO\n }", "function startsWith($prefix)\n {\n if (empty($prefix)) {\n return false;\n }\n $endNode = $this->searchEndNode($prefix);\n return $endNode != null;\n }", "public static function stripStart($str, $prefix) {\n\t\t$prefixLen = strlen($prefix);\n\t\tif (substr($str, 0, $prefixLen) === $prefix) {\n\t\t\treturn substr($str, $prefixLen);\n\t\t}\n\t\treturn $str;\n\t}", "function _prepare_filter_data () {\n\t\t// Filter session array name\n\t\t$this->_filter_name\t= $_GET[\"object\"].\"_filter\";\n\t\t// Connect common used arrays\n\t\tif (file_exists(INCLUDE_PATH.\"common_code.php\")) {\n\t\t\tinclude (INCLUDE_PATH.\"common_code.php\");\n\t\t}\n\t\t// Fields in the filter\n\t\t$this->_fields_in_filter = array(\n\t\t\t\"engine\",\n\t\t\t\"text\",\n\t\t);\n\t}", "public function getKeys(string $prefix = ''): array\n {\n return $this->getFilteredKeys(\n $this->getAdapter()->keys('*'),\n $prefix\n );\n }", "abstract public function filterFields();", "function _dotgo_filter_prepare() {\n\n}", "function startsWith($prefix)\n {\n $node = $this;\n for ($i = 0; $i < strlen($prefix); $i++) {\n $index = ord($prefix[$i]) - ord('a');\n if (isset($node->children[$index])) {\n $node = $node->children[$index];\n } else {\n return false;\n }\n }\n return true;\n }", "public function getCacheByPrefix($prefix)\n {\n //Define output\n $outputs = [];\n $keys = $this->cache->queryKeys($prefix);\n foreach ($keys as $key) {\n $outputs[$key] = $this->getCache($key);\n }\n return $outputs;\n }", "public static function deletePrefix($prefix)\n {\n return self::pipeline(function ($pipe) use ($prefix) {\n $keys = self::keys($prefix);\n foreach ($keys as $key) {\n $pipe->del($key);\n }\n });\n }", "public function setObjectDataPrefix($dataPrefix = false)\n\t{\n\t\t$this->_setObjectDataPrefix($dataPrefix);\n\t}", "protected function loadDataForPrefix($namespace, $prefix)\n {\n $this->failOnMissingNamespace($namespace);\n\n if (!isset($this->cachedData[$namespace])) {\n $this->cachedData[$namespace] = [];\n }\n\n if (!isset($this->cachedData[$namespace][$prefix])) {\n $this->cachedData[$namespace][$prefix] = [];\n }\n\n foreach ($this->addedData[$namespace] as $data) {\n\n if (isset($data[$prefix])) {\n $this->cachedData[$namespace][$prefix][] = $data[$prefix];\n }\n }\n\n return $this->cachedData[$namespace][$prefix];\n }", "public function prefix($prefix)\n {\n return $this->addAction(ClassUtils::verifyInstance($prefix, Prefix::class));\n }", "public function startsWith($prefix) {\n return mb_strpos($this->rawString, $prefix, 0, $this->charset) === 0;\n }", "public function setPrefix($prefix)\n\t{\n\t\t$this->prefix = $prefix;\n\t\t\n\t\treturn $this;\n\t}", "public function setPrefix(string $prefix): self\n {\n $this->prefix = $prefix;\n return $this;\n }", "public function clean($group = null)\n\t{\n\t\t$prefix = $this->options['hash'] . '-cache-' . $group . '-';\n\n\t\tforeach ($this->data as $key => $value)\n\t\t{\n\t\t\tif (substr($key, 0, strlen($prefix)) == $prefix)\n\t\t\t{\n\t\t\t\tunset($this->data[$key]);\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "public function setPrefix($prefix = \"\") {\n $this->_prefix = !empty($prefix) ? $prefix : '';\n }", "public function prefix($prefix = null)\n {\n if ($prefix === null) {\n return $this->_prefix;\n }\n return $this->_prefix = $prefix;\n }", "public function setPrefix($prefix)\n\t{\n\t\t$this->prefix = $prefix;\n\t}", "public function setPrefix($prefix)\n {\n $this->prefix = $prefix;\n }", "public function setPrefix($prefix)\n {\n $this->prefix = $prefix;\n }", "function simplenews_build_subscription_filter_query(SelectQueryInterface $query) {\n if (isset($_SESSION['simplenews_subscriptions_filter'])) {\n foreach ($_SESSION['simplenews_subscriptions_filter'] as $key => $value) {\n switch ($key) {\n case 'list':\n if ($value != 'all') {\n list($key, $value) = explode('-', $value, 2);\n $query->condition('su.' . $key, $value);\n }\n break;\n case 'email':\n if (!empty($value)) {\n $query->condition('sn.mail', '%' . $value . '%', 'LIKE');\n }\n break;\n }\n }\n }\n}", "private function _setupFiltering()\n\t{\n\t\tglobal $txt;\n\n\t\t// We'll escape some strings...\n\t\t$db = database();\n\n\t\t// You can filter by any of the following columns:\n\t\t$filters = array(\n\t\t\t'id_member' => $txt['username'],\n\t\t\t'ip' => $txt['ip_address'],\n\t\t\t'session' => $txt['session'],\n\t\t\t'url' => $txt['error_url'],\n\t\t\t'message' => $txt['error_message'],\n\t\t\t'error_type' => $txt['error_type'],\n\t\t\t'file' => $txt['file'],\n\t\t\t'line' => $txt['line'],\n\t\t);\n\n\t\t$filter = $this->_req->getQuery('filter', 'trim', null);\n\t\t$value = $this->_req->getQuery('value', 'trim', null);\n\n\t\t// Set up the filtering...\n\t\tif (isset($value, $filters[$filter]))\n\t\t{\n\t\t\t$filter = array(\n\t\t\t\t'variable' => $filter,\n\t\t\t\t'value' => array(\n\t\t\t\t\t'sql' => in_array($filter, array('message', 'url', 'file'))\n\t\t\t\t\t\t? base64_decode(strtr($value, array(' ' => '+')))\n\t\t\t\t\t\t: $db->escape_wildcard_string($value),\n\t\t\t\t),\n\t\t\t\t'href' => ['filter' => $filter, 'value' => $value],\n\t\t\t\t'entity' => $filters[$filter]\n\t\t\t);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (isset($filter, $value))\n\t\t\t{\n\t\t\t\tunset($this->_req->query->filter, $this->_req->query->value);\n\t\t\t}\n\n\t\t\t$filter = [];\n\t\t}\n\n\t\treturn $filter;\n\t}", "public static function mergePrefixData( $data, $prefixData ) {\n\t\t$prefixGroups = $prefixData['prefix-groups'];\n\n\t\tforeach ( $data[\"partitions\"] as $index => $partition ) {\n\t\t\tforeach ( $prefixGroups as $current => $old ) {\n\t\t\t\t$serviceData = Env::search( \"services.{$current}\", $partition );\n\t\t\t\tif ( ! empty( $serviceData ) ) {\n\t\t\t\t\tforeach ( $old as $prefix ) {\n\t\t\t\t\t\tif ( empty( Env::search( \"services.{$prefix}\", $partition ) ) ) {\n\t\t\t\t\t\t\t$data[\"partitions\"][ $index ][\"services\"][ $prefix ] = $serviceData;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $data;\n\t}", "private function getFilterMethods($prefix)\n {\n $listMethods = get_class_methods($this);\n $return = [];\n $strlenPrefix = strlen($prefix);\n foreach ($listMethods as $method) {\n if (substr($method, 0, $strlenPrefix) === $prefix) {\n $return[substr($method, $strlenPrefix)] =\n strtolower(substr($method, $strlenPrefix, 1)) . substr($method, ($strlenPrefix + 1));\n }\n }\n return $return;\n }", "public function getFileAndFolderNameFilters() {}", "public function filtering(): string;", "public static function startsWith($str, $prefix) {\n\t\treturn $prefix === '' || strpos($str, $prefix) === 0;\n\t}", "public function setPrefix($prefix) {\n $this->prefix = $prefix;\n }", "public function setPrefix($prefix) {\n $this->prefix = $prefix;\n }", "static public function filterKeyStartsWith(&$arr, $startwith)\n {\n $results = array();\n foreach ($arr as $key => $value) {\n if (Str::startsWith($key, $startwith) === true) {\n $results[$key] = $value;\n }\n }\n\n return $results;\n }", "public static function getSettings($prefix)\n {\n return static::retrieveSettings($prefix);\n }", "public function setPrefix( $prefix ) {\n $this->_prefix = $prefix;\n return $this;\n }", "public function setPrefix(string $prefix = null)\n {\n $this->prefix = $prefix;\n return $this;\n }", "public function beginsWithReturnsFalseForNotMatchingFirstPartDataProvider() {}", "public static function startsWith($input, $prefix)\n {\n self::initialize();\n\n return substr($input, 0, strlen($prefix)) === $prefix;\n }", "public function getCustomerPrefix();", "public function setPrefix($prefix): self\n {\n $this->prefix = $prefix;\n\n return $this;\n }", "public function setPrefix(string $prefix): self\n {\n $this->prefix = $prefix;\n\n return $this;\n }", "public function filter( )\n {\n global $UNDERQL;\n $l_args_num = func_num_args( );\n if ( $l_args_num < 3 )\n return false;\n $filter_name = func_get_arg( 0 );\n\n $l_filter_callback = $UNDERQL['filter']['prefix'] . $filter_name;\n\n if ( !function_exists( $l_filter_callback ))\n return false;\n\n switch(func_get_arg(1))\n {\n case UQL_FILTER_IN:\n\n for ( $i = 2; $i < $l_args_num; $i++ )\n {\n if(!isset($this->in_filters[$this->table_name][func_get_arg( $i )]))\n $this->in_filters[$this->table_name][func_get_arg( $i )] = array($filter_name);\n else\n {\n $_temp = $this->in_filters[$this->table_name][func_get_arg( $i )];\n $_temp[@count($_temp)] = $filter_name;\n\n $this->in_filters[$this->table_name][func_get_arg( $i )] = $_temp;\n }\n }\n return true;\n\n case UQL_FILTER_OUT:\n for ( $i = 2; $i < $l_args_num; $i++ )\n {\n if(!isset($this->out_filters[$this->table_name][func_get_arg( $i )]))\n {\n $this->out_filters[$this->table_name][func_get_arg( $i )] = array($filter_name);\n }\n else\n {\n $_temp = $this->out_filters[$this->table_name][func_get_arg( $i )];\n $_temp[@count($_temp)] = $filter_name;\n\n $this->out_filters[$this->table_name][func_get_arg( $i )] = $_temp;\n\n }\n }\n return true;\n default : return false;\n }\n }" ]
[ "0.562868", "0.55831087", "0.55544144", "0.54626733", "0.54585207", "0.5452465", "0.5451222", "0.5437347", "0.54345614", "0.5415852", "0.541133", "0.53958464", "0.53715426", "0.53271586", "0.53140235", "0.5302295", "0.5270148", "0.52336365", "0.52330345", "0.52197593", "0.5217612", "0.5210042", "0.5183377", "0.51591945", "0.51579547", "0.514823", "0.5145863", "0.51391613", "0.5130949", "0.5104593", "0.50901556", "0.5081856", "0.5074377", "0.50511134", "0.50442034", "0.5043523", "0.5018621", "0.5007625", "0.49860832", "0.49851865", "0.49804902", "0.4972519", "0.4966276", "0.49590907", "0.4949705", "0.4944684", "0.4922094", "0.4921686", "0.49173796", "0.49074954", "0.4906451", "0.4889613", "0.48788226", "0.4862838", "0.48627537", "0.4861777", "0.4861777", "0.48574635", "0.4857039", "0.48461193", "0.48442894", "0.4836697", "0.48295584", "0.482679", "0.4815463", "0.48128703", "0.48086733", "0.48035648", "0.47992805", "0.47958806", "0.479059", "0.47901934", "0.47882128", "0.47867975", "0.47853094", "0.47846523", "0.478145", "0.47723404", "0.47679776", "0.47657907", "0.47657907", "0.47639242", "0.4763095", "0.47585252", "0.4756188", "0.4755427", "0.4753373", "0.47525597", "0.47493687", "0.47493687", "0.47459757", "0.4743165", "0.47359264", "0.47349072", "0.47333804", "0.4731838", "0.47293058", "0.47278008", "0.47211727", "0.47162583" ]
0.60562235
0
Return a post with associated comments
public function findOneByWithComment(array $where = [], array $orderBy = [], int $limit = null, int $offset = null) { $sql = "SELECT ". $this->_computeField([ 'id' => "post_id", 'created_at' => "post_created_at", 'updated_at' => "post_updated_at", 'slug' => "post_slug", 'title' => "post_title", 'content' => "post_content", 'url_coverage_image' => "post_url_coverage_image", 'alt_coverage_image' => "post_alt_coverage_image", ], "p"). ", ". $this->_computeField([ 'id' => "comment_id", 'post_id' => "comment_post_id", 'created_at' => "comment_created_at", 'updated_at' => "comment_updated_at", 'content' => "comment_content", ], "c"). ", ". $this->_computeField([ 'id' => "admin_id", 'first_name' => "admin_first_name", 'last_name' => "admin_last_name", ], "ua"). ", ". $this->_computeField([ 'id' => "user_id", 'first_name' => "user_first_name", 'last_name' => "user_last_name", ], "u"). " FROM post AS p LEFT JOIN comment AS c ON p.id = c.post_id AND c.status = true JOIN admin AS a ON a.id = p.admin_id JOIN user AS ua ON ua.id = a.user_id LEFT JOIN user AS u on u.id = c.user_id"; $result = $this->_appendIfCorrect($sql, $where, $orderBy, $limit, $offset); $request = $this->pdo->prepare($result[0]); $request->execute($result[1]); $results = $request->fetchAll(); if (!empty($results)) { $post = new Post($this->_extractFromTempData("post", $results[0])); $post->setAdmin(new Admin($this->_extractFromTempData("admin", $results[0]))); foreach ($results as $result) { if (!is_null($result['comment_id'])) { $comment = new Comment($this->_extractFromTempData("comment", $result)); $comment->setUser(new User($this->_extractFromTempData("user", $result))); $post->addComment($comment); } } return $post; } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getComments() {\n return $this->hasMany(Comment::class, ['post_id' => 'id']);\n }", "public function getAllPostsWithComments(){\n $entityManager = $this->getEntityManager();\n $queryBuilder = $entityManager->createQueryBuilder();\n $queryBuilder\n ->select('bp','c')\n ->from('App:BlogPost', 'bp')\n ->join('bp.comments','c','WITH', 'bp.id=c.blogPost');\n\n return $queryBuilder->getQuery()->getResult();\n }", "public function post_comments()\n {\n return $this->hasMany('arts\\Post_comment', 'post_id', 'post_id');\n }", "public function comments() {\n return $this->hasMany('App\\Models\\Comment', 'post_id');\n }", "public function getComments() \n {\n return $this->hasMany(Comment::className(), [\n 'post_id' => 'id',\n ]);\n }", "public function comments()\n {\n return $this->hasMany(Comment::class, 'post_id');\n }", "public function comments(): HasMany\n {\n return $this->posts()\n ->where('is_private', false)\n ->whereNull('hidden_at')\n ->where('type', 'comment');\n }", "public function comments(){\n return $this->hasMany('App\\TextPostComment', 'post_id');\n }", "public function post()\n\t{\n\t\treturn $this->belongsTo('App\\Models\\Post', 'post_id', 'comment_id');\n\t}", "public function comments()\n {\n return $this->hasMany('Model\\PostComment');\n }", "public function getCommentsOfPost($id)\n {\n $comments = Comment::getParentComments($id);\n return metaResponse($comments);\n }", "public function comments(){\n\t\t// Comment, 'foreign_key', 'local_key'\n\t\treturn $this->hasMany(Comment::class, 'post_id', 'id');\n\t}", "public function getPostComments($pid = null) { \r\n // if the query is made using findOne(), the method will return just the element being queried \r\n $comments = $this->_comment_collection->find(array('post_id' => new MongoId($pid) ) ); \r\n return $comments; \r\n }", "function get($postid)\n\t{\n\t\t$this->db->where('id',$postid);\n\t\t$res = $this->db->get($this->posts_table);\n\t\tif ($res->num_rows() == 0) {\n\t\t\treturn false;\n\t\t}\n\t\t$post = $res->row();\n\t\t$res->free_result();\n\n\t\t// now get the comments if there are any\n\t\tif ($post->comments > 0) {\n\t\t\t$this->db->where('postid',$postid);\n\t\t\t$res = $this->db->get($this->comments_table);\n\t\t\t$comments = array();\n\t\t\tforeach ($res->result_array() as $row) {\n\t\t\t\t// put comments into array using their id as index\n\t\t\t\t$comments[$row['id']] = $row;\n\t\t\t}\n\t\t\t$threads = $this->threadComments($comments);\n\t\t}\n\t\telse {\n\t\t\t$comments = false;\n\t\t\t$threads = false;\n\t\t}\n\n\t\t$post->commentData = array('comments' => $comments,'threads' => $threads);\n\n\t\treturn $post;\n\t}", "function getPostingComment($id = 0) {\n return getAll(\"SELECT r.content FROM posting_reply pr \n INNER JOIN posting p on pr.posting_id = p.id \n INNER JOIN reply r on pr.reply_id = r.id WHERE p.id = $id\");\n}", "public function allCommentsPost($post_id) {\r\n $table = $this->config->db_prefix . 'comments';\r\n return $this->database->selectAllFromTableWhereFieldValue($table, \"article_id\", $post_id);\r\n }", "public function comments()\n {\n // check if user is already loaded, if not, we fetch it from database\n if ($this->_comments) {\n return $this->_comments;\n } else {\n $comments = new Application_Model_DbTable_Comments();\n\n foreach ($comments->findAllBy('post_id', $this->_id) as $comment) {\n $this->_comments[] = $comment ;\n }\n return $this->_comments;\n }\n }", "public function comments(Request $request, Post $post)\n {\n $result = $post->comments()\n ->latest()\n ->with('user', 'targetUser', 'targetComment')\n ->paginate(5);\n return response()->json($result);\n }", "public function getComments($idPost)\n\t{\n\t\t$req=$this->_bdd->query('SELECT Comments.id, content_com AS content, DATE_FORMAT(date_com, \"%d/%m/%Y %Hh%imin%ss\") AS date, id_users AS idUser, id_post AS idPost, moderate, login FROM Comments INNER JOIN Users ON id_users=Users.id WHERE id_post='.$idPost);\n\n\t\t$comments=[];\n\t\n\t\twhile($datas=$req->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\t\n\t\t\t\t\t$comments[]=new Comments($datas);\t\t\n\t\t\t}\n\t\treturn $comments;\n\t\t\t\t\n\t}", "public function getComments0()\n {\n return $this->hasMany(Comments::className(), ['parentPost' => 'id']);\n }", "public function getPostComment($id)\n {\n $post = Post::find($id);\n $comments = $post->comments()->orderBy('created_at', 'desc')->get();\n $user = User::find($post->user_id);\n $name = $user->first_name . \" \" . $user->last_name;\n $post->user = $name;\n $count = count($comments);\n $post->count = $count;\n\n return View::make('page.post_comment')->withPost($post)->withComments($comments);\n }", "public function getComments ($postId) {\n\n\t\t$sql = \"SELECT comment_author, comment_text, users.user_name\n\t\t\t\t FROM comments INNER JOIN users ON comments.comment_author = users.user_id WHERE post_id = ?\";\n\t\t$data = [$postId];\n\t\t//create stdStatemment object | call to Model method from core/Database.php\n\t\treturn $this->setStatement($sql,$data);\t\t\n\t}", "public function returnComments(Request $request, $post_id)\n {\n $request = $request->all();\n\n $comments = Comments::select(\n 'comments.id',\n 'comments.author_id',\n 'comments.post_id',\n 'comments.comment_body',\n 'comments.created_at',\n 'comments.updated_at',\n 'posts.id',\n 'posts.user_id',\n 'posts.post_text',\n 'posts.image_link',\n 'user.first_name',\n 'user.last_name'\n )\n ->where('posts.id', '=', $post_id)\n ->from('comments')\n ->join('posts', function ($query) {\n $query->on('comments.post_id', '=', 'posts.id');\n })\n ->join('user', function ($query) {\n $query->on('user.id', '=', 'comments.author_id');\n })\n ->orderBy('created_at', 'desc')\n ->get();\n\n return $comments;\n }", "public function getComments($post_id){\n\t\t$sql = 'SELECT user_name, date_creation, content, state, id FROM comment WHERE post_id=' . $post_id . \" AND state >= 2 ORDER BY id DESC\";\n\t\t$data = $this->db->query($sql);\n\t\treturn $data->fetchAll();\n\t}", "function get_post($id) {\n $ci = & get_instance();\n $ci->db->from('post');\n $ci->db->where('post_id', $id);\n $post = $ci->db->get()->result();\n\n if (!(is_array($post) && count($post) == 1)) {\n return NULL;\n }\n\n $ci->db->from('comment');\n $ci->db->where('post_id', $post[0]->post_id);\n\n $comments = build_comments($ci->db->get()->result());\n\n $ci->db->from('text_post');\n $ci->db->where('post_id', $post[0]->post_id);\n $text_posts = $ci->db->get()->result();\n\n if (is_array($text_posts) && count($text_posts) == 1) {\n $text_post = build_text_post($post[0], $text_posts[0]->post_text);\n $text_post->comments = $comments;\n return $text_post;\n } else {\n $ci->db->from('link_post');\n $ci->db->where('post_id', $post[0]->post_id);\n $link_posts = $ci->db->get()->result();\n\n if (is_array($link_posts) && count($link_posts) == 1) {\n $link_post = build_link_post($post[0], $link_posts[0]->post_link);\n $link_post->comments = $comments;\n return $link_post;\n } else {\n return NULL;\n }\n }\n }", "public function comments2(){\n\t\treturn $this->hasManyThrough('Comment', 'BlogPost', 'posted_by_id', 'blog_post_id');\n\t}", "public function postById($id)\n {\n $sql = '\n SELECT p.id, p.title, p.chapo, p.content, p.date_creation, p.date_modification, p.category_id, u.pseudo, ca.name As category, COUNT(co.id) AS numberComments\n FROM posts AS p\n LEFT JOIN users AS u ON u.id = p.user_id\n LEFT JOIN categories AS ca ON ca.id = p.category_id\n LEFT JOIN comments AS co ON co.post_id = p.id\n WHERE p.id=:id';\n return $this->db->request($sql, ['id' => $id], 'posts', false);\n }", "public function getUserPostComment($user_id)\n {\n return Comment::find()->with('user')->with('post')->where(['user_id' => $user_id,'status' => '1','parent_comment_id'=>'0'])->orderBy(['created_date'=>SORT_DESC])->all();\n \n }", "public function index(Post $post)\n {\n $comments = $post->comments()->with(['user', 'user.profile'])->get();\n\n return response()->json($comments);\n }", "function get_post_comments($post_id)\n{\n $select_query = 'SELECT c.*, u.username\n FROM '.TBL_COMMENTS.' c\n JOIN '.TBL_USERS.' u\n ON u.`user_id` = c.`user_id`\n WHERE c.`post_id`='.(int)$post_id.'\n ORDER BY c.`created_ts` ASC';\n\n $comments = array();\n $results = mysql_query($select_query);\n while($row = mysql_fetch_assoc($results))\n {\n $comments[] = $row;\n }\n\n return $comments;\n}", "public static function getComments($post)\n {\n\n // check param type\n // we do this here to support manual template data overrides, such as providing an array of values\n if (!is_object($post) || 'Timber\\Post' !== get_class($post)) {\n return false;\n }\n\n // comments turned off\n if (!self::$commentsOn) {\n return false;\n }\n\n // get comments from WordPress function and return hierarchical Timber\\Comment array\n $comments = self::buildCommentList(get_comments(\n array(\n 'post_id' => $post->ID,\n 'number' => self::$pageComments ? self::$commentsPerPage : null,\n 'offset' => self::$pageComments ? (get_query_var('cpage', 1) * self::$commentsPerPage) - self::$commentsPerPage : 0,\n 'status' => 'approve',\n 'type' => 'comment',\n 'order' => (self::$defaultCommentsPage == 'newest') ? 'DESC' : 'ASC',\n 'hierarchical' => self::$threadComments\n )\n ));\n\n // reorder comments by date\n if (self::$commentOrder == 'asc') {\n usort($comments, array('MGPressComments', 'sortByAsc'));\n } else {\n usort($comments, array('MGPressComments', 'sortByDesc'));\n }\n\n return $comments;\n }", "public function comments()\n {\n return $this->hasMany(CitationComment::class);\n }", "public function post(Post $post){\n //$value = Post::findOrFail($post);\n //dump($value);\n //dump($post->toArray()); //see leiab ise vastava numbriga postituse\n\n //$comment = Comment::find(15);\n //dd($comment->post->toArray());\n\n //$comment = Comment::where('id', 15)->with('post')->first();\n\n //dd($post->comments->toArray());\n\n return view('post', compact('post'));\n }", "private function get_comments_list($post_id)\n\t{\n\t\t$owner_id = ($this->owner->logged_in())\n\t\t\t? $this->owner->get_user()->id\n\t\t\t: FALSE;\n\n\t\t$comments = ORM::Factory('forum_cat_post_comment')\n\t\t\t->select(\"\n\t\t\t\tforum_cat_post_comments.*,\n\t\t\t\t(SELECT owner_id \n\t\t\t\t\tFROM forum_comment_votes\n\t\t\t\t\tWHERE forum_cat_post_comment_id = forum_cat_post_comments.id\n\t\t\t\t\tAND owner_id = '$owner_id'\n\t\t\t\t) AS has_voted\n\t\t\t\")\n\t\t\t->where(array(\n\t\t\t\t'forum_cat_post_comments.forum_cat_post_id' => $post_id,\n\t\t\t\t'forum_cat_post_comments.is_post !=' => '1',\n\t\t\t))\n\t\t\t->orderby(\"forum_cat_post_comments.$this->sort_by\", \"$this->order\")\n\t\t\t->find_all();\n\t\tif(0 == $comments->count())\n\t\t\treturn 'No comments yet';\n\n\t\t$view = new View('public_forum/comments_list');\n\t\t$view->is_logged_in\t= $this->owner->logged_in();\t\n\t\t$view->owner\t= $owner_id;\t\t\t\n\t\t$view->comments\t\t= $comments;\n\t\treturn $view;\n\t}", "public function getComments()\n {\n return $this->hasMany(Comment::class, ['created_by' => 'id']);\n }", "public function comments()\n {\n return $this->hasMany('App\\Comment', 'author_id', 'id');\n }", "public function comments()\n {\n $sort = Sorter::getCommentSortId();\n $orderField = $sort == 1 ? 'rate' : 'id';\n $orderDir = $sort == 1 ? 'desc' : 'asc';\n return $this->morphMany(Comment::class, 'commentable')->orderBy($orderField, $orderDir);\n }", "public function getComments($post_id) \n {\n return $this->callRestMethod('stream.getComments', \n array('post_id' => $post_id));\n }", "public function getComments($postId)\n {\n $db = $this->dbConnect();\n $comments = $db->prepare('SELECT id, author, comment, DATE_FORMAT(comment_date, \\'%d/%m/%Y à %Hh%imin%ss\\') AS comment_date_fr FROM comments WHERE post_id = ? ORDER BY comment_date DESC');\n $comments->execute(array($postId));\n\n return $comments;\n }", "public function getPost($id) {\n $title = 'Blog | Post';\n //dd($id);\n $post = DB::table('post as p')\n ->join('users as u', 'p.users_id', '=', 'u.users_id')\n ->where('p.post_id', $id)\n ->first();\n\n $comments = DB::table('comments as c')\n ->join('users as u','u.users_id','=','c.users_id')\n ->where('c.post_id','=', $id)\n ->orderBy('c.updated_at','desc')\n ->get();\n\n return view('frontend.post', compact('post','comments'));\n }", "public function getCommentsByPostID($post_id)\n {\n $comments = Comment::where('post_id', '=', $post_id)->with('user')->with('post')->get();\n return response()->json([\n 'comments' => $comments,\n ], 200);\n }", "function getComments($post_id){\n GLOBAL $CONNECTION; \n $sql = \"SELECT * FROM comment WHERE post_id=$post_id ORDER BY commented_at DESC\";\n $comments = mysqli_query($CONNECTION, $sql);\n return $comments;\n }", "public function comments()\n {\n return $this->morphedByMany('App\\Comment', 'likeable');\n }", "public function comments() {\n\n\t\treturn $this->hasMany(Comment::class);\n\t}", "public function comment()\n {\n return $this->hasMany(Comment::class);\n }", "public function getPost()\n {\n return $this->hasOne(Post::className(), ['id' => 'post_id']);\n }", "public function comments()\n {\n return new Comments($this->getClient());\n }", "public function comments()\n\t{\n\t\treturn $this->hasMany('Comment');\n\t}", "public function comments()\n\t{\n\t\treturn $this->hasMany('Comment');\n\t}", "public function comments()\n\t{\n\t\treturn $this->hasMany('Comment');\n\t}", "private function getCommentPost(&$array)\n {\n if (!$this->relationLoaded('post')) {\n return;\n }\n\n $post = $this->post;\n if (empty($post)) {\n return;\n }\n\n $array['post'] = [\n 'title' => $post->title,\n 'slug' => $post->slug,\n 'author' => $post->author_id,\n 'category' => $post->category_id\n ];\n }", "public function comments()\n {\n return $this->hasMany('VideoBlog\\Comment');\n }", "public function comments()\n {\n return $this->hasMany(Comment::class);\n }", "public function comments()\n {\n return $this->hasMany(Comment::class);\n }", "public function comments()\n {\n return $this->hasMany(Comment::class);\n }", "public function comments()\n {\n return $this->hasMany(Comment::class);\n }", "public function comments()\n {\n return $this->hasMany(Comment::class);\n }", "public function comments()\n {\n return $this->hasMany(Comment::class);\n }", "public function comments()\n {\n return $this->hasMany(Comment::class);\n }", "public function comments()\n {\n return $this->hasMany(Comment::class);\n }", "public function getComments($post_id) \n\t{\t\n\t\ttry {\n\t\t\t$access_token=$this->facebookappid.\"|\".$this->facebookscret;\t\t\t\n\t\t\tFacebookSession::setDefaultApplication($this->facebookappid, $this->facebookscret);\n\t\t\t$session = new FacebookSession($access_token);\n\t\t\t$comments_query=\"/\".$post_id.\"/comments\";\n\t\t\t$comments_result=$this->FBrequest($session,$comments_query);\t\t\t\t\t\t\n\t\t\treturn $comments_result;\n\t\t\t} catch (Exception $e) {\n\t\t\techo $e->getMessage();\n\t\t\t}\t\t\t\n\t}", "public function getComments($post_id)\n {\n $statement = $this->pdo->prepare(\"SELECT * FROM comments WHERE post_id = :post_id ORDER BY comments_id DESC\");\n\n $statement->execute(\n [\n \":post_id\" => $post_id,\n ]\n );\n\n $all_comments = $statement->fetchAll(PDO::FETCH_ASSOC);\n\n $this->all_comments = $all_comments;\n }", "public function getComments()\n {\n $id = $this->getId();\n\n $stmt = \" SELECT c.*, c.id as id, u.username, u.profile_picture FROM _xyz_article_comment_pivot acp \" .\n \" LEFT JOIN _xyz_comment c ON c.id = acp.comment_id \" .\n \" LEFT JOIN _xyz_user u ON u.id = c.user_id \" .\n \" WHERE acp.article_id = $id \"\n ;\n\n $sql = DB::instance()->query( $stmt );\n\n $rows = $sql->fetchAll(\\PDO::FETCH_UNIQUE|\\PDO::FETCH_ASSOC );\n\n $result = CommentCollection::toTree( $rows );\n\n return $result;\n }", "public function getComments()\n {\n return $this->hasMany(Comments::className(), ['tickets_id' => 'id']);\n }", "public function comments() {\n\t\treturn $this->hasMany('NGiraud\\News\\Models\\Comment')->where('parent_id', 0)->orderBy('updated_at', 'desc');\n\t}", "public function comments()\n\t{\n\t\treturn $this->has_many('comment');\n\t}", "function get_comments($post_id){\n include('../../common/database/config.php');\n\n $sql = 'SELECT c.id,c.content,c.created_time,u.name FROM comments as c \n LEFT JOIN users as u on c.user_id = u.id\n where c.post_id = \"'.$post_id.'\"';\n $res = mysqli_query($conn,$sql);\n\n $res_array = mysqli_fetch_all($res, MYSQLI_ASSOC);\n\n return $res_array;\n}", "public function comments()\n {\n return $this->hasMany('App\\Comment', 'id_comment', 'id');\n }", "public static function findCommentsOn($id=0){\n\t\t//So custom find function() is needed\n\t\tglobal $connection;\n\t\t$sql = \"SELECT * FROM \".static::$table_name.\" WHERE post_id = \";\n\t\t$sql .= $connection->real_escape_string($id) . \" ORDER BY created ASC \";\n\t\t//echo $sql;\n\t\treturn static::findBySql($sql);\n\t}", "public function showPostComments($postId)\n {\n $this->db->query('SELECT comments.id as commentId,\n\t\t\t\t\t\t\t\tusers.first_name as fname,\n\t\t\t\t\t\t\t\tusers.last_name as lname,\n\t\t\t\t\t\t\t\tcomments.postId as postId,\n\t\t\t\t\t\t\t\tcomments.content as content,\n\t\t\t\t\t\t\t\tcomments.note as note,\n\t\t\t\t\t\t\t\tcomments.dateComment as dateComment\n\t\t\t\t\t\t\t\tFROM comments, users\n\t\t\t\t\t\t\t\tWHERE postId = :postId\n\t\t\t\t\t\t\t\tAND comments.userId = users.id\n\t\t\t\t\t\t\t\tORDER BY comments.dateComment DESC');\n\n $this->db->bind(':postId', $postId);\n $results = $this->db->resultSet();\n return $results;\n }", "public function getComments($postId, $parentCommentId = 0){\n\t\t$commentQuery = $this->mysqli->query(\"SELECT \n\t\t\t\t\t\tcomments.comment_id,\n\t\t\t\t\t\tUNIX_TIMESTAMP(comments.date) as date,\n\t\t\t\t\t\tcomments.content, \n\t\t\t\t\t\tusers.username\n\t\t\t\t\t\tFROM comments LEFT JOIN users ON comments.user_id = users.user_id\n\t\t\t\t\t\tWHERE post_id=\".$postId.\"\n\t\t\t\t\t\tAND replied_comment_id=\".$parentCommentId);\n\t\t\n\t\t$commentArr = array();\n\t\t\n\t\twhile($comment = $commentQuery->fetch_object()){\n\t\t\t$commentObj = new Comment($comment->comment_id, $comment->date, $comment->content);\n\t\t\t$commentObj->setUsername($comment->username);\n\t\t\t\n\t\t\t//Get the comment's votes\n\t\t\t$votes = $this->mysqli->query(\"SELECT\n\t\t\t\t\tvalue, COUNT(user_id) AS count FROM votes\n\t\t\t\t\tWHERE content_id=\".$comment->comment_id.\" AND is_post_vote=0\n\t\t\t\t\tGROUP BY value\n\t\t\t\t\t\");\n\t\t\tif($votesDown = $votes->fetch_object()){\n\t\t\t\t$votesDown = $votesDown->count;\n\t\t\t}else{\n\t\t\t\t$votesDown = 0;\n\t\t\t}\n\t\t\t$commentObj->setVoteDown($votesDown);\n\t\t\t\n\t\t\tif($votesUp = $votes->fetch_object()){\n\t\t\t\t$votesUp = $votesUp->count;\n\t\t\t}else{\n\t\t\t\t$votesUp = 0;\n\t\t\t}\n\t\t\t$commentObj->setVoteUp($votesUp);\n\t\t\t\n\t\t\t$commentObj->addCommentArr($this->getComments($postId, $commentObj->getId()));\n\t\t\t$commentArr[] = $commentObj;\n\t\t}\n\t\t\n\t\treturn $commentArr;\n\t\t\n\t}", "public function getAllPostLike($post_id)\n {\n $comments = Comment::find()->with('user')->with('post')->where(['post_id' => \"$post_id\",'status' => '1','parent_comment_id'=>'0'])->orderBy(['created_date'=>SORT_DESC])->all();\n return $comments;\n \n }", "public function post()\n {\n return $this->hasMany('App\\Models\\Blog\\PostModel', 'category_id', 'category_id');\n }", "public function getAllComments() {\n\n\t\t$sql = \"SELECT comment_id, comment_text, entries.post_title, users.user_name FROM comments\n\t\t\t\tINNER JOIN entries ON comments.post_id = entries.post_id \n\t\t\t\tINNER JOIN users ON users.user_id = comments.comment_author\";\n\t\t//create stdStatemment object | call to Model method from core/Database.php\n\t\treturn $this->setStatement($sql);\n\t}", "public function comments()\n {\n return $this->morphMany('App\\Comment', 'commentable')->orderBy('created_at', 'DESC');\n }", "public function comments()\n {\n return $this->morphMany(Comments::getCommentsRepository()->getModel(), 'entity');\n }", "public function postPage(){\n require_once \"controller/Post.php\";\n $post = new Post();\n require_once \"controller/Comment.php\";\n $comment = new Comment();\n //gets the post id in URL\n $idPost = $this->_url[1];\n //adds post info\n $html_post = $post->getPost($idPost);\n $html = View::makeHtml($html_post, \"post_template\");\n $html .= \"<br/><div id=\\\"comments\\\"><h2>Commentaires</h2><ul>\";\n //count nb of comments for the post\n $nb_comments = $comment->countComments($idPost);\n //according to nb of comments\n switch ($nb_comments[\"nb_comments\"]){\n case 0:\n $html .= \"<p>Pas encore de commentaire</p>\";\n break;\n case 1:\n //adds comments infos\n $html_comments = $comment->getComments($idPost);\n $html .= View::makeHtml($html_comments, \"comments_template\");\n break;\n default:\n $html_comments = $comment->getComments($idPost);\n $html .= View::makeLoopHtml($html_comments, \"comments_template\");\n break;\n }\n //adds the \"leave a comment\" form\n $html .= \"</ul>\";\n $html .= View::makeHtml([\n \"{{ path }}\" => $GLOBALS[\"path\"],\n \"{{ idPost }}\" => $idPost\n ],\"add_comment_template\");\n $html .= \"</div>\";\n return [\n \"{{ pageTitle }}\" => $html_post[\"{{ post_title }}\"],\n \"{{ content }}\" => $html,\n \"{{ path }}\" => $GLOBALS[\"path\"]\n ];\n }", "public function commentsAction()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\t$user = Application_Model_User::getAuth();\r\n\r\n\t\t\t$id = $this->_request->getPost('id');\r\n\r\n\t\t\tif (!v::intVal()->validate($id))\r\n\t\t\t{\r\n\t\t\t\tthrow new RuntimeException('Incorrect post value: ' .\r\n\t\t\t\t\tvar_export($id, true));\r\n\t\t\t}\r\n\r\n\t\t\tif (!Application_Model_News::checkId($id, $post, ['join'=>false]))\r\n\t\t\t{\r\n\t\t\t\tthrow new RuntimeException('Incorrect post ID');\r\n\t\t\t}\r\n\r\n\t\t\t$start = $this->_request->getPost('start', 0);\r\n\r\n\t\t\tif (!v::intVal()->validate($start))\r\n\t\t\t{\r\n\t\t\t\tthrow new RuntimeException('Incorrect start value: ' .\r\n\t\t\t\t\tvar_export($start, true));\r\n\t\t\t}\r\n\r\n\t\t\t$limit = 30;\r\n\t\t\t$model = new Application_Model_Comments;\r\n\t\t\t$comments = $model->findAllByNewsId($id, [\r\n\t\t\t\t'limit' => $limit,\r\n\t\t\t\t'start' => $start,\r\n\t\t\t\t'owner_thumbs' => [[55,55]]\r\n\t\t\t]);\r\n\r\n\t\t\t$response = ['status' => 1];\r\n\r\n\t\t\tif (count($comments))\r\n\t\t\t{\r\n\t\t\t\tforeach ($comments as $comment)\r\n\t\t\t\t{\r\n\t\t\t\t\t$response['data'][] = My_ViewHelper::render('post/_comment', [\r\n\t\t\t\t\t\t'user' => $user,\r\n\t\t\t\t\t\t'comment' => $comment,\r\n\t\t\t\t\t\t'post' => $post,\r\n\t\t\t\t\t\t'limit' => 250\r\n\t\t\t\t\t]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$count = max($post->comment - ($start + $limit), 0);\r\n\r\n\t\t\t\tif ($count > 0)\r\n\t\t\t\t{\r\n\t\t\t\t\t$response['label'] = $model->viewMoreLabel($count);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception $e)\r\n\t\t{\r\n\t\t\tMy_Log::exception($e);\r\n\t\t\t$response = [\r\n\t\t\t\t'status' => 0,\r\n\t\t\t\t'message' => $e instanceof RuntimeException ? $e->getMessage() :\r\n\t\t\t\t\t'Internal Server Error'\r\n\t\t\t];\r\n\t\t}\r\n\r\n\t\t$this->_helper->json($response);\r\n\t}", "public function getCommentBlogs()\n {\n return $this->hasMany(CommentBlog::className(), ['parentId' => 'id']);\n }", "public function comments()\n {\n \treturn $this->hasMany(Comment::class);\n }", "public function getFirstThreePostComments($post_id)\n {\n return $init_comments = Comment::find()->with('user')->with('post')->where(['post_id' => \"$post_id\",'status' => '1','parent_comment_id'=>'0'])->orderBy(['created_date'=>SORT_DESC])->limit(3)->all();\n \n }", "public function comments() {\n return $this->hasMany(Comment::class);\n }", "public function getPost()\n {\n return $this->hasOne(Posts::className(), ['id' => 'post_id']);\n }", "public function comments()\n {\n return $this->hasMany(Comment::class)->latest();\n }", "public function create($post)\n {\n return view('comments.create_comment')->with('post',Post::findOrfail($post));\n }", "public function GetPostCommentByid($id)\n\t{\n\t\t$this->db->where('PostId', $id);\n\t\t$this->db->select('CommentDate,CommentText,FirstName,LastName');\n\t\t$this->db->from('tbl_postcomment');\n\t\t$this->db->join('tbl_userdetails', 'tbl_userdetails.Id = tbl_postcomment.UserId', 'inner');\n\t\t$query=$this->db->get();\n\t\treturn array(\n\t\t\t\t'main_view' => 'home/postdetails_view',\n\t\t\t\t'navcategory' => $this->home_model->navcaregory(),\n\t\t\t\t'postdetails' => $this->home_model->GetAuthorPostByid($id),\n\t\t\t\t'postcomment' => $query->result(),\n\t\t\t\t'numberComments' => $query->num_rows()\n\t\t\t\t);\n\t}", "public function comments()\n {\n return $this->hasMany(Comment::class, 'subject_id', 'id')->where('comments.subject_type', Wiki::class)->with(['user', 'likes']);\n }", "public function comments(){\n // Note that Comment::class == string 'App\\Comment'\n\n #? When this is called as a property, not a method, Laravel will know to 'eager-load' the relationship\n return $this->hasMany(Comment::class);\n\n }", "public function comments()\n {\n return $this->hasMany(Comment::class)->dernier();\n }", "public function get_comment($id)\r\n\t{\r\n\t\t// get the comments and join on the post so we\r\n\t\t// can get it's name\r\n\t\t$comment = $this->db\r\n\t\t\t\t\t\t->select('comments.*, posts.title as post_title')\r\n\t\t\t\t\t\t->where('comments.id', $id)\r\n\t\t\t\t\t\t->join($this->_table['posts'], \"posts.id = comments.post_id\")\r\n\t\t\t\t\t\t->limit(1)\r\n\t\t\t\t\t\t->get($this->_table['comments'])\r\n\t\t\t\t\t\t->row_array();\r\n\r\n\t\t// there's two ways the comments come\r\n\t\t// out of the database.\r\n\t\t\r\n\t\t// an unregistered user\r\n\t\tif ($comment['name'])\r\n\t\t{\r\n\t\t\t// concat author and email and assign to display_name\r\n\t\t\t$comment['display_name'] = $comment['name'] . ' [' . $comment['email'] . ']';\r\n\t\t}\r\n\t\t// or a registered user\r\n\t\telse\r\n\t\t{\r\n\t\t\t// concat user_id and [Registered User](from the language files)\r\n\t\t\t// assign to display_name\r\n\t\t\t$comment['display_name'] = $this->ion_auth->get_db_display_name($comment['user_id']) . ' [' . lang('comments_reg_user') . ']';\r\n\t\t}\r\n\r\n\t\t// return it\r\n\t\treturn $comment;\r\n\t}", "private function comments_wrapper()\n\t{\t\t\n\t\tif($_POST)\n\t\t\t$this->add_comment();\n\n\t\t$post_id = valid::id_key($this->filter);\n\t\t$owner_id = ($this->owner->logged_in())\n\t\t\t? $this->owner->get_user()->id\n\t\t\t: FALSE;\n\t\t\t\n\t\t# get the post with child comment.\n\t\t$post = ORM::Factory('forum_cat_post', $post_id)\n\t\t\t->select(\"\n\t\t\t\tforum_cat_posts.*, forum_cats.name, forum_cats.url,\n\t\t\t\t(SELECT owner_id \n\t\t\t\t\tFROM forum_comment_votes\n\t\t\t\t\tWHERE forum_cat_post_comment_id = forum_cat_posts.forum_cat_post_comment_id\n\t\t\t\t\tAND owner_id = '$owner_id'\n\t\t\t\t) AS has_voted\n\t\t\t\")\n\t\t\t->join('forum_cats', 'forum_cats.id', 'forum_cat_posts.forum_cat_id')\n\t\t\t->where('forum_cat_posts.id', $post_id)\n\t\t\t->find();\n\t\tif(!$post->loaded)\n\t\t\tEvent::run('system.404');\n\n\t\t$view = new View('public_forum/posts_comments_wrapper');\n\t\t$view->post\t\t\t= $post;\n\t\t$view->is_logged_in\t= $this->owner->logged_in();\t\n\t\t$view->owner\t= $owner_id;\n\t\t$view->comments_list = $this->get_comments_list($post_id);\n\t\t$view->selected\t\t= self::tab_selected('votes');\t\t\n\t\treturn $view;\n\t}", "public function comments()\n {\n return $this->hasMany('App\\Comment');\n }", "public function comments()\n {\n return $this->hasMany('App\\Comment');\n }", "public function comments()\n {\n return $this->hasMany('App\\Comment');\n }", "public function comments()\n {\n return $this->hasMany('App\\Comment');\n }", "public function comments()\n {\n return $this->hasMany('App\\Comment');\n }", "public function comments()\n {\n return $this->hasMany('App\\Comment');\n }", "public function comments()\n {\n return $this->hasMany('App\\Comment');\n }", "public function comments()\n {\n return $this->hasMany('App\\Comment');\n }", "public function comments()\n {\n return $this->hasMany('App\\Comment');\n }", "public function comments()\n {\n return $this->hasMany('App\\Comment');\n }" ]
[ "0.745956", "0.7362304", "0.72692907", "0.72678757", "0.7241831", "0.7172758", "0.71622163", "0.7148526", "0.7146526", "0.7121626", "0.69933486", "0.6927377", "0.69219166", "0.6855185", "0.67541426", "0.675171", "0.6730031", "0.66797036", "0.6634394", "0.6613966", "0.65694565", "0.65599126", "0.6545174", "0.6543218", "0.6534595", "0.6531658", "0.6455969", "0.6454728", "0.64473844", "0.64243656", "0.641389", "0.6405621", "0.6398584", "0.638061", "0.63499326", "0.63304186", "0.63279754", "0.6297926", "0.62969846", "0.6295595", "0.62848103", "0.6280146", "0.6252353", "0.623879", "0.62369204", "0.6235702", "0.6231129", "0.6228326", "0.6228326", "0.6228326", "0.622675", "0.62210804", "0.6218183", "0.6218183", "0.6218183", "0.6218183", "0.6218183", "0.6218183", "0.6218183", "0.6218183", "0.6213485", "0.6208276", "0.620711", "0.6204879", "0.61980075", "0.61965156", "0.6182201", "0.61806494", "0.6178336", "0.61770606", "0.61747134", "0.617379", "0.6171768", "0.61685777", "0.616412", "0.61542904", "0.6147886", "0.6141636", "0.6141426", "0.61388063", "0.61375004", "0.61354005", "0.61326474", "0.6129676", "0.6118193", "0.6116674", "0.61106926", "0.6107097", "0.60988396", "0.6089141", "0.60789716", "0.60736114", "0.60736114", "0.60736114", "0.60736114", "0.60736114", "0.60736114", "0.60736114", "0.60736114", "0.60736114", "0.60736114" ]
0.0
-1
Delete a post and associated comments
public function delete(Entity $post): void { $sql = "DELETE p, c FROM post p LEFT JOIN comment c ON p.id = c.post_id WHERE p.slug = :slug"; $request = $this->pdo->prepare($sql); $request->execute([ 'slug' => $post->getSlug(), ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleting(Post $post)\n {\n //-------we delete picture and comments before deletd post -----------\n\n $post->picture()->delete();\n $post->comments()->delete();\n // delete picture physicly and comments before delete physic post and after post is deleted logic =>(picture,comments was deleted)\n if($post->deleted_at)\n {\n $post->comments()->forceDelete();\n $post->picture()->forceDelete();\n }\n }", "public function delete() {\n\t\t$db = self::getDB();\n\t\t$sql = \"DELETE FROM posts \n\t\t\t\tWHERE\n\t\t\t\t\tidPost = :idPost \";\n\t\t$query = $db->prepare($sql);\n\t\t$query->execute([\n\t\t\t':idPost' => $this->getIdPost()\n\t\t]);\n\t}", "public function destroy(Post $post){\n $post->delete();\n }", "public function deleting(Post $post)\n {\n $post->posts->each(function ($p) {\n $p->update(['post_id' => null]);\n });\n\n $post->post_type_item_restrictions->each(function ($p) {\n $p->delete();\n });\n\n $post->post_items->each(function ($p) {\n $p->delete();\n });\n\n $post->trans->each(function ($p) {\n $p->delete();\n });\n }", "public function delete($idPost);", "public function destroy(Post $post)\n {\n $this->authorize('delete', $post);\n\n foreach ($post->comments()->get() as $comment) {\n $comment->delete();\n }\n\n $post->delete();\n\n return redirect(route('posts.index'))->with('flash_message', $post->id . '번 포스트가 삭제되었습니다');\n }", "public function delete()\n {\n $post['id'] = $this->request->getParameter('id'); // récupérer le paramètre de l'ID\n $this->post->deletePost($post['id']);\n $this->redirect(\"admin\", \"chapters\"); // une fois le post supprimé, je redirige vers la vue chapters\n }", "public function destroy(Post $post)\n {\n // delete comments\n //Comment::where('post_id',$post->id)->delete();\n $post->comments()->delete();\n\n // delete post_tag\n $post->tags()->detach();\n //$post->tags()->sync([]); // this delete all inclusive the tags table\n // delete post\n $post->delete();\n return redirect('/posts')->with('success','Post deleted!!');\n }", "public function destroy(post $post)\n {\n //\n }", "function delete_post($id){\n $sql=\"delete from comment where Post_ID = ?\";\n DB::delete($sql, array($id));\n $sql=\"delete from post where id = ?\";\n DB::delete($sql, array($id));\n}", "public function delete(){\n global $db;\n $delete = $db->prepare('DELETE FROM posts WHERE id = :id');\n $delete->bindValue(':id', $this->_id, PDO::PARAM_INT);\n $delete->execute();\n }", "function deletePost($id)\n {\n $userLogged = Auth::check(['administrateur']);\n\n $errors = [];\n \n // we delete the comments linked to the post (if there are any) \n $commentManager = new CommentManager();\n $listCommentsDelete = $commentManager->getListCommentsForPost($id);\n \n if ($listCommentsDelete !== []) {\n foreach($listCommentsDelete as $comment){\n try{\n $commentManager->deleteComment($comment->getId()); //deletion from the database \n } catch (Exception $e) {\n $errors[] = $e->getMessage();\n }\n }\n }\n \n // we delete the media linked to the post (if there is any) \n $mediaManager = new MediaManager();\n $listMediasDelete = $mediaManager->getListMediasForPost($id);// we get the media list for this $ post \n \n if ($listMediasDelete !== []) {\n foreach($listMediasDelete as $media){\n try{\n unlink($media->getPath()); //delete media on the server in the media folder \n $mediaManager->deleteMedia($media->getId()); //deletion from the database \n } catch (Exception $e) {\n $errors[] = $e->getMessage();\n } \n }\n }\n \n // we delete the post \n $postManager = new PostManager();\n try{\n $post = $postManager->deletePost($id);\n } catch (Exception $e) {\n $errors[] = $e->getMessage();\n } \n\n setFlashErrors($errors);\n\n require'../app/Views/backViews/post/backDeletePostView.php';\n }", "public function destroy(Post $post) {\n //\n }", "public function destroy(Post $post)\n {\n // $posts = Post::find($id);\n // $post->delete();\n // return view('posts.index', compact('posts','comments'));\n }", "public function deleteAction() {\n\t\t// if($post->delete()) {\n\t\t// \tSession::message([\"Post <strong>$post->name</strong> deleted!\" , \"success\"]);\n\t\t// \tredirect_to('/posts/index');\n\t\t// } else {\n\t\t// \tSession::message([\"Error saving! \" . $error->get_errors() , \"success\"]);\n\t\t// }\n\t}", "public function destroy(Post $post)\n {\n //\n }", "public function destroy(Post $post)\n {\n //\n }", "public function destroy(Post $post)\n {\n //\n }", "public function destroy(Post $post)\n {\n //\n }", "public function destroy(Post $post)\n {\n //\n }", "public function destroy(Post $post)\n {\n //\n }", "public function destroy(Post $post)\n {\n //\n }", "public function destroy(Post $post)\n {\n //\n }", "public function destroy(Post $post)\n {\n //\n }", "public function destroy(Post $post)\n {\n //\n }", "public function destroy(Post $post)\n {\n //\n }", "public function destroy(Post $post)\n {\n //\n }", "public function destroy(Post $post)\n {\n //\n }", "public function destroy(Post $post)\n {\n //\n }", "public function destroy(Post $post)\n {\n //\n }", "public function destroy(Post $post)\n {\n //\n }", "public function destroy($id)\n {\n $post = Post::find($id);\n $comments = $post->comments()->get();\n foreach($comments as $comment)\n $comment->delete();\n\n $post->delete();\n return Redirect::to('post');\n }", "public function deletePost() {\n if(isset($_POST[\"single_post_id_delete\"])){\n $post_id = $_POST[\"single_post_id_delete\"];\n // Delete from two tables at the same time\n $delete_post_statement = $this->pdo->prepare(\n \"DELETE FROM posts WHERE id = :id;\n DELETE FROM comments WHERE post_id = :id;\");\n\n $delete_post_statement->execute(\n [\n \":id\" => $post_id\n ]\n );\n\n $delete_post = $delete_post_statement;\n return $delete_post;\n }\n }", "public function delete(User $user, Post $post);", "public function destroy(Post $post)\n {\n /*\n Constraint: ON DELETE=RESTRICTED\n Before deleting any post is necessary to remove any constraint between tags and posts\n Using sync() removes all previous tags and adds the new ones but if the array is empty it adds nothing\n */\n // Removing all the tags connected to the post to be deleted\n $post->tags()->sync([]);\n // Deleting the post\n $post->delete();\n return redirect()->route('admin.posts.index');\n }", "public function destroy(Post $post)\n {\n/* \n $user = Auth::user();\n if (Gate::forUser($user)->denies('delete-post', $post)) {\n return redirect()->back();\n } */\n\n /* if (Auth::user()->cant('delete', $post)) {\n return redirect()->route('posts.my')->with('message','No tienes permisos para eliminar este post');\n } */\n\n $this->authorize('delete', $post);\n $post->delete();\n \n return redirect()->route('posts.index')->with('message','Post Eliminado');\n \n }", "private function deletePost() {\n\t\tif( !isset($_SESSION['id']) ) {\n\t\t\treturn;\n\t\t}\n\t\t// Make sure the user owns this post\n\t\t$postID = $this->dbc->real_escape_string($_GET['postid']);\n\t\t$userID = $_SESSION['id'];\n\t\t$privilege = $_SESSION['privilege'];\n\t\t\n\t\t// If the user is not an admin\n\t\tif( $privilege != 'admin' ) {\n\t\t\t$sql .= \" AND user_id = $userID\";\n\t\t}\n\t\t// Run this query\n\t\t$result = $this->dbc->query($sql);\n\t\t// If the query failed\n\t\t// Either post doesn't exist, or you don't own the post\n\t\tif( !$result || $result->num_rows == 0 ) {\n\t\t\treturn;\n\t\t}\n\t\t$result = $result->fetch_assoc();\n\t\t\n\t\t// Prepare the SQL\n\t\t$sql = \"DELETE FROM posts\n\t\t\t\tWHERE id = $postID\";\n\t\t// Run the query\n\t\t$this->dbc->query($sql);\n\t\t// Redirect the user back to blog\n\t\t// This post is dead :(\n\t\theader('Location: index.php?page=blog');\n\t\tdie();\n\t}", "public function destroy(Post $post)\n {\n if (File::exists(public_path('upload/posts/' . $post->feature_image))) {\n File::delete(public_path('upload/posts/' . $post->feature_image));\n }\n $post->comment()->delete();\n $post->delete();\n\n return redirect()->route('admin.posts.index')->with('message', 'Xoá bài viết thành công');\n }", "public function deleteAction()\n {\n $postId = (int)$this->params()->fromRoute('id', -1);\n \n // Validate input parameter\n if ($postId<0) {\n $this->getResponse()->setStatusCode(404);\n return;\n }\n \n $post = $this->entityManager->getRepository(Post::class)\n ->findOneById($postId); \n if ($post == null) {\n $this->getResponse()->setStatusCode(404);\n return; \n }\n \n if (!$this->access('post.own.delete', ['post'=>$post])) {\n return $this->redirect()->toRoute('not-authorized');\n }\n \n $this->postManager->removePost($post);\n $this->imageManager->removePost($postId);\n $this->videoManager->removePost($postId);\n $this->audioManager->removePost($postId);\n \n // Redirect the user to \"admin\" page.\n return $this->redirect()->toRoute('posts', ['action'=>'admin']); \n \n }", "public function destroy(Post $post)\n {\n\n $post->delete();\n\n redirect('/posts');\n }", "public function delete()\n {\n $data = Comment::where(\"reply\", $this->id)->get();\n foreach ($data as $comment) {\n $comment->delete();\n }\n\n /**\n * Delete self\n */\n parent::delete();\n }", "public function deletePostComment($id) {\n\n\t\t$manager = $this->manager->getManager();\n\n\t\t$destroy = $manager->prepare('DELETE FROM comments WHERE post_id = ?') or die(print_r($manager->errorMessage()));\n\n\t\t$destroy->execute(array($id)); \n\t}", "public function destroy(Post $post)\n {\n $post->delete();\n return ['message'=>'Deleted successfully'];\n }", "public function deletePost(\\post\\model\\Post $post) {\n\t\t//Remove the post.\n\t\t$this->postDAL->deletePost($post);\n\t}", "public function destroy(Post $post)\n {\n //se hace referencia al Policy asociado al User\n $this->authorize('author', $post);\n\n $post->delete();\n return redirect()->route('admin.posts.index')->with('info', 'El Post se elimino con exito'); \n }", "public static function delete($id)\n\t{\n\t\t$post = Post::where('id',$id)->delete();\n $comment = Comment::where('post_id',$id)->delete();\n\t}", "public function DeleteComment(){\r\n $this->idPost();\r\n $this->comment(); \r\n $this->_commentManager->DeleteComment($this->_idPostSecure);\r\n header('location: Gestioncommentaire'); \r\n }", "public function destroy(post $post)\n {\n $post->delete();\n return redirect()->route('post.index');\n\n }", "public function destroy(post $post)\n {\n $post->delete();\n \n return redirect()->route('posts.index'); \n }", "public function destroy($post)\n {\n $post->delete();\n return redirect()->route('dashboard.posts.index');\n }", "public function destroy(Post $post)\n {\n $post->delete();\n return redirect('/post');\n }", "public function destroy(Post $post)\n {\n //$post = Post::find($id); commentata perche usiamo la versione short (Post $post)à\n\n $title = $post->title; //assegnamo il titolo ad una variabile $title\n $image = $post->path_img; //assegnamo ad img ad una variabile $image\n\n $post->tags()->detach(); //cancellare la relazine tra posts e tags\n $deleted = $post->delete(); //metodo per cancellare il titolo\n\n if ($deleted) { //verifica se c'è un post associato\n if (!empty($image)) {\n Storage::disk('public')->delete($image);\n }\n return redirect()->route('posts.index')->with('post-deleted', $title);\n } else {\n return redirect()->route('home');\n }\n }", "public function delete_post( $post ) \n\t{\n\t\t$term = new Zend_Search_Lucene_Index_Term( $post->id, 'postid' );\n\t\t$docIds = $this->_index->termDocs( $term );\n\t\tforeach ( $docIds as $id ) {\n\t\t\t$this->_index->delete( $id );\n\t\t}\n\t}", "public function destroy(Post $post)\n {\n// unlink($category->image);\n $post->delete();\n return redirect(route('post.index'));\n }", "public function deleted(Post $post)\n {\n Category::where('id', $post->category)\n ->where('num', '>', 0)->decrement('num');\n Tag::whereIn('id', explode(',', $post->tags))\n ->where('num', '>', 0)->decrement('num');\n Archive::where('month', $post->archive)->where('num', '>', 0)->decrement('num');\n Archive::where('num', 0)->forceDelete();\n }", "public function delete()\n\t{\n\t\t// Delete the comments\n\t\t$this->comments()->delete();\n\n\t\t// Delete the blog post\n\t\treturn parent::delete();\n\t}", "public function delete()\n\t{\n\t\t// Delete the comments\n\t\t$this->comments()->delete();\n\n\t\t// Delete the blog post\n\t\treturn parent::delete();\n\t}", "public function destroy(Post $post)\n {\n $post->delete();\n return redirect()->route('ownposts');\n }", "public function destroy($post_id)\n {\n\n }", "public function delete() {\n\t\tif(isset($this->args[1]) && $this->user()) {\n\t\t\ttry {\n\t\t\t\t$this->commentsModel->delete($this->args[1], $this->user->model->userID);\n\t\t\t\t$this->view->setVar('message', 'Deleted comment');\n\t\t\t} catch(exception $excpt) {\n\t\t\t\t$this->view->setError($excpt);\n\t\t\t}\n\t\t}\n\t}", "public function destroy(post $post)\n {\n $post->delete();\n return redirect()->route('posts.index')->with('message', 'Deleted successful!');\n }", "public function destroy( Post $post ){\n\n $post ->delete();\n return redirect()->route('posts.index')->with(['success' => 'supprimer avec succès']);\n }", "public function destroy(Posts $post)\n {\n $this->authorize('delete',$post);\n $post->delete();\n return redirect()->route('posts.index');\n }", "public function destroy(Post $post)\n {\n //return $post;\n if($post->user_id != Auth::id())\n {\n Toastr::error('Unauthorized access denied!','Error');\n return redirect()->back();\n }\n \n if($post)\n {\n try\n {\n if(File::exists(public_path('/upload/post/'.$post->image)))\n {\n File::delete(public_path('/upload/post/'.$post->image));\n \n }\n $post->categories()->detach(); \n $post->tags()->detach(); \n $post->delete();\n Toastr::success('The Post Successfully Deleted.', 'Success');\n return redirect()->route('author.post.index');\n }\n catch(\\Exception $e)\n {\n Toastr::error($e->getMessage());\n return redirect()->back();\n }\n }\n else\n {\n return redirect()->back();\n\n }\n }", "public function deleteAction() {\n\n //GET POST SUBJECT\n $post = Engine_Api::_()->core()->getSubject('sitereview_post');\n\n //GET LISTING SUBJECT\n $sitereview = $post->getParent('sitereview_listing');\n\n //GET VIEWER\n $viewer = Engine_Api::_()->user()->getViewer();\n\n if (!$sitereview->isOwner($viewer) && !$post->isOwner($viewer)) {\n return $this->_helper->requireAuth->forward();\n }\n\n //AUTHORIZATION CHECK\n if (!$this->_helper->requireAuth()->setAuthParams($sitereview, null, \"view_listtype_$sitereview->listingtype_id\")->isValid())\n return;\n\n //MAKE FORM\n $this->view->form = $form = new Sitereview_Form_Post_Delete();\n\n //CHECK METHOD\n if (!$this->getRequest()->isPost()) {\n return;\n }\n\n //FORM VALIDATION\n if (!$form->isValid($this->getRequest()->getPost())) {\n return;\n }\n\n //PROCESS\n $table = Engine_Api::_()->getDbTable('posts', 'sitereview');\n $db = $table->getAdapter();\n $db->beginTransaction();\n $topic_id = $post->topic_id;\n try {\n $post->delete();\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n\n //GET TOPIC\n $topic = Engine_Api::_()->getItem('sitereview_topic', $topic_id);\n\n $href = ( null == $topic ? $sitereview->getHref() : $topic->getHref() );\n return $this->_forwardCustom('success', 'utility', 'core', array(\n 'closeSmoothbox' => true,\n 'parentRedirect' => $href,\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('Post deleted.')),\n ));\n }", "public function deleteComments(int $idPost):void\n {\n $req=$this->pdo->prepare('DELETE FROM comments WHERE post_id=?');\n $req->execute([$idPost]);\n }", "public function deleted(Post $post)\n {\n //\n $this->postElasticSearch->deleteDoc($post->id);\n }", "public function deleteAction()\n {\n $isPosted = $this->request->getPost('doDelete');\n if (!$isPosted) {\n $this->response->redirect($this->request->getPost('redirect'));\n }\n $comment = [\n 'id' => $this->request->getPost('id'),\n 'pageKey' => $this->request->getPost('pageKey')\n ];\n $comments = new \\Anax\\Comment\\CommentsInSession();\n $comments->setDI($this->di);\n $comments->delete($comment);\n $this->response->redirect($this->request->getPost('redirect'));\n }", "public function destroy(Post $post)\n {\n $post->delete();\n\n return \"ok\";\n }", "public function destroy(Post $post)\n {\n $post->delete();\n return redirect()->route('admin.posts.index');\n }", "public function destroy($id)\n {\n \n //sub comment delete\n \n $getSubCom = PostSubComment::commentIdWiseSubComment($id);\n if(count($getSubCom)>0){\n $numSubCom = count($getSubCom);\n for ($i=0; $i < $numSubCom; $i++) { \n $subComment = PostSubComment::findOrFail($getSubCom[$i]->_id);\n $subComment->delete(); \n }\n }\n\n //comment like delete\n $getCommentLike = PostCommentLike::getCommentLike($id);\n if(count($getCommentLike)>0){\n $numLikeCom = count($getCommentLike);\n for ($i=0; $i < $numLikeCom; $i++) { \n $commentLike = PostCommentLike::findOrFail($getCommentLike[$i]->_id);\n $commentLike->delete(); \n }\n }\n\n //comment delete\n $getComment = PostComment::findOrFail($id);\n $getComment->delete();\n \n $getPost =Posts::findOrFail($getComment->fk_post_id);\n $count = $getPost->hits_count;\n\n $data['hits_count'] = $count-1;\n $getPost->update($data); \n return $id;\n }", "public function delete($post_id) {\n\t\t$where_condition = 'WHERE post_id = '.$post_id;\n\t\tDB::instance(DB_NAME)->delete('posts', $where_condition);\n\t\t\n\t\t# Send them back\n\t\tRouter::redirect(\"/posts/edit\");\n\n\n\t}", "function delete_post($postid) {\n $postid = intval($postid);\n if(!is_int($postid) && $postid <= 0) return false;\n $q1 = \"DELETE FROM \".T_COMMENTS.\" WHERE postid='$postid'\";\n $this->_db->Execute($q1);\n $q2 = \"DELETE FROM \".T_POSTS.\" WHERE postid='$postid'\";\n $this->_db->Execute($q2);\n }", "public function delete(Post $post)\n {\n $this->authorize('delete', $post);\n Helper::deleteFile($post->featured, 'posts/featured/');\n $post->delete();\n return response(null, 204);\n }", "public function destroy() {\n $this->post->destroy();\n redirect('/backend/posts', ['notice' => 'Successfully destroyed']);\n }", "public function destroy(Post $post) {\n $this -> authorize('delete', $post); // this will throw an exception and render out status code 403\n $post -> delete();\n\n return back();\n }", "public function destroy(Post $post ,Request $request){\n\n // $this->authorize('delete', $notice);\n\n\n $post->delete();\n\n $request->session()->flash('message', 'Post was deleted');\n\n return back();\n }", "public function deleting(Post $post)\n {\n if ($post->image) {\n Storage::delete([$post->image->url]);\n }\n }", "public function destroy(Post $post)\n {\n $post->delete();\n\n return redirect()->route('post.index')->with('success','post deleted successfully');\n }", "public function destroy(Post $post)\n {\n $category = $post->category;\n\n $profile = $post->profile;\n $profile->score = $profile->score - 10;\n $profile->save();\n\n $post->delete();\n\n return redirect()->route('categories.show',['category' => $category])->with('message','Post Deleted!');\n }", "public function destroy(Post $post)\n {\n $post->delete();\n\n return redirect(route('post.index'));\n }", "public function destroy($id)\n {\n $comments = Comment::find($id);\n $post_id = $comments->post->id;\n $comments->delete();\n Session::flash('success','Deleted Successfully');\n return redirect()->route('posts.show',$post_id);\n\n\n }", "public function delete($id)\n {\n $sql = 'DELETE FROM posts WHERE id = ' . $id;\n $this->db->query($sql);\n $sql = 'DELETE FROM comments WHERE post_id = ' . $id;\n $this->db->query($sql);\n }", "public function deleted(Post $post)\n {\n $post->recordActivity('deleted');\n }", "public function delete() {\n\t\t$query = new WP_Query( array(\n\t\t\t'name' => $this->params['post_name'],\n\t\t\t'post_type' => $this->params['post_type']\n\t\t) );\n\n\t\t$post = array_shift( $query->posts );\n\n\t\t// die('<pre>'.var_export($post,true).'</pre>');\n\n\t\tif ( $post ) {\n\t\t\t$current_action = $this->get_current_action();\n\t\t\t$this->action_results[ 'status' ] = 'success';\n\t\t\t$this->action_results[ 'messages' ][ $post->post_type ][ $post->ID ][ 'note' ] = __( 'The information has been deleted', 'kickpress' );\n\t\t\t$this->action_results[ 'data' ][ 'post_id' ] = $post->ID;\n\n\t\t\twp_trash_post( $post->ID );\n\t\t}\n\t}", "public function destroy($post)\n {\n $post = Post::find($post);\n $post -> delete();\n return redirect()->back();\n }", "public function destroy(Post $post)\n {\n // gestisco la cancellazione dell'immagine, se presente. POtrei lasciare solo post->delete, ma in questo modo cancello anche il file da public, così non appesantisco il sito di file inutili\n if($post->cover) {\n Storage::delete($post->cover);\n }\n\n\n $post->delete();\n //non mi serve la cancellazione della riga nella tabella ponte, perchè è gestito da onDelete Cascade. In alternativa uso:\n // $post->tags()->detach();\n \n // faccio un redirect all'index, with ci serve per aggiungere dati alla sessione (flash). passo una chiave 'deleted' e come valore il dato che voglio fare viaggiare, nel caso voglia fare un alert con il titolo dell'articolo che voglio eliminare\n return redirect()\n ->route('admin.posts.index')\n ->with('deleted', $post->title);\n }", "public function deleted_post($post_id)\n {\n }", "public function destroy(Request $request, Post $post)\n {\n $client = $request->user();\n\n if ($client->cannot('delete_article')) {\n return response()->json([\n 'error' => 'Forbidden',\n ], 403);\n }\n\n $post->delete();\n\n return response()->json(null, 204);\n }", "public function destroy(Post $post)\n {\n $this->detachLink($post);\n $post->delete();\n\n return redirect()->route('post.index')->with('success', 'Post Deleted Successfully');\n }", "public function delete($post_id)\n {\n $post = Post::findOrFail($post_id);\n $post->delete();\n\n return redirect()->route('posts.index',['thread_id' => $post->thread->id , 'thread_title' => $post->thread->topic->title]);\n }", "public function destroy(Post $post)\n {\n if (!auth()->user()->ability('admin', 'delete_posts')) {\n return abort(403);\n }\n if ($post->media->count() > 0) {\n foreach ($post->media as $media) {\n if (File::exists('assets/posts/' . $media->file_name)) {\n unlink('assets/posts/' . $media->file_name);\n }\n }\n }\n $post->media()->delete();\n $post->delete();\n\n return redirect()->route('admin.posts.index')->with([\n 'message' => 'Post deleted successfully',\n 'alert-type' => 'success',\n ]);\n }", "public function delete(User $user, Post $post)\n {\n //\n }", "public function delete()\n\n {\n Customers::find($this->deleteId)->delete();\n session()->flash('message', 'Post Deleted Successfully.');\n\n }", "public function deletePost($postId){\r\n $stmt = self::$con->prepare(\"DELETE FROM posts WHERE id = :delId\");\r\n $stmt->bindParam(\":delId\" , $postId);\r\n $stmt->execute();\r\n }", "public function destroy(Post $post)\n {\n\n\n Storage::delete($post->profile);\n $post->delete();\n return redirect(route('posts.index'))->with('status', 'Delete Post Successfully!');\n }", "public function destroy(Post $post)\n {\n if ($post->user_id != auth()->user()->id && auth()->user()->is_admin == false) {\n flash()->overlay(\"You can't delete other peoples post.\");\n return redirect('/admin/posts');\n }\n\n $post->delete();\n flash()->overlay('Post deleted successfully.');\n\n return redirect('/admin/posts');\n }", "public function destroy(Post $post)\n {\n\n $this->authorize('delete',$post);\n $post=Post::find($post->id);\n $this->delImage($post->img_url);\n $post->delete();\n $post->untag();\n $post->keywords()->detach();\n $file_path = public_path(\"storage/qrcodes/posts/$post->qr_img_url\");\n\n if(File::exists($file_path)) File::delete($file_path);\n return response()->json('Post deleted');\n }", "public function destroy(Post $post)\n {\n if($post->user_id != auth()->user()->id && auth()->user()->is_admin == false) {\n flash()->overlay(\"You can't delete other peoples post.\");\n return redirect('/admin/posts');\n }\n\n $post->delete();\n flash()->overlay('Post deleted successfully.');\n\n return redirect('/admin/posts');\n }", "public function destroy($id)\n {\n $post = Post::with('repost')->where('id', $id)->first();\n\n $this->authorize('delete', $post);\n\n if($post->repost_id)\n {\n Repost::where('id', $post->repost_id)->delete();\n } \n\n $post->delete();\n }" ]
[ "0.7724705", "0.754655", "0.74320024", "0.74094635", "0.7362096", "0.72846484", "0.72541213", "0.72241455", "0.7219005", "0.7196771", "0.7193406", "0.7174325", "0.71740746", "0.7158529", "0.7137445", "0.71260583", "0.71260583", "0.71260583", "0.71260583", "0.71260583", "0.71260583", "0.71260583", "0.71260583", "0.71260583", "0.71260583", "0.71260583", "0.71260583", "0.71260583", "0.71260583", "0.71260583", "0.71260583", "0.7119523", "0.7118338", "0.7106768", "0.70810103", "0.70413107", "0.70251703", "0.7023939", "0.7004205", "0.6991522", "0.69828683", "0.6980208", "0.6978216", "0.6933219", "0.6930323", "0.69281495", "0.6924634", "0.6919766", "0.69166714", "0.69119376", "0.69025743", "0.68935907", "0.68857175", "0.68676996", "0.68669057", "0.6853053", "0.6853053", "0.6852135", "0.6841988", "0.68309534", "0.6826456", "0.6823744", "0.6823291", "0.6823274", "0.68228227", "0.681837", "0.6814452", "0.68120986", "0.6811182", "0.68006426", "0.67842406", "0.67716277", "0.67693126", "0.676355", "0.67605245", "0.675826", "0.674906", "0.6737405", "0.67229736", "0.67182404", "0.67173266", "0.671633", "0.6711831", "0.6709871", "0.6708746", "0.6705116", "0.6688928", "0.66886514", "0.66838557", "0.6679023", "0.66779083", "0.66769606", "0.66762143", "0.6674558", "0.6670643", "0.66549754", "0.6648594", "0.66442966", "0.66436195", "0.66409415" ]
0.7503189
2
at this stage only yx of the current figure is updated
public function handleCollision () : bool|string { $y = $this->board->players[$this->board->currentPlayer]->currentFigure->y; $x = $this->board->players[$this->board->currentPlayer]->currentFigure->x; $destination = $this->board->field[$y][$x]; if ($destination[0] == ".." || $destination[0] == "FF") { //just a free tile return false; // false for no collision } else { // consider non-free tile scenarios $enemies = $this->figureService->findEnemies($destination, $this->board->players[$this->board->currentPlayer]->team); //make a list of enemies if (!$enemies) { //non-empty array evaluates to true, otherwise findEnemies will return false //if there were N figures there but all were friendly or fortified return false; // we wont have collision } else { // find enemies returned array of count at least 1 if (count($enemies) === 1) { //if it is just one enemy, no point of triggering choices $this->figureService->removeFigure($this->board, $enemies[0]); //remove it from the enemy players list of figs return $enemies[0]; // return the name of the fig for fieldUpdate() } else { // otherwise there is more than 1 attackable enemy $choice = $this->view->getFigureChoice($enemies); $this->figureService->removeFigure($this->board, $choice); return $choice; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _set_new_y($size)\r\n {\r\n $this->new_y = $size;\r\n }", "public function setY($y) {}", "public function restorePosition()\n {\n if ($this->value['y']==$this->_pdf->getY()) $this->_pdf->setY($this->value['yc'], false);\n }", "public function setY($y);", "function SetXY($x,$y)\n\t\t{\n\t\t\t$this->SetY($y);\n\t\t\t$this->SetX($x);\n\t\t}", "public function updateEditotPosition()\n {\n $this->format->shiftCurrentXposition($this->shape->getWidth() + ($this->shape->getBorderWidth() / 2));\n }", "protected function _fixY($y) {}", "function SetY($y)\n\t\t{\n\t\t\t$this->x=$this->lMargin;\n\t\t\tif($y>=0)\n\t\t\t\t$this->y=$y;\n\t\t\telse\n\t\t\t\t$this->y=$this->h+$y;\n\t\t}", "private function drawAxis() : void\n\t{\n\t\timageline($this->im, 0 , $this->shiftY , $this->sizeX , $this->shiftY, $this->colorAxisX);\n\t\timageline($this->im, $this->shiftX , 0 , $this->shiftX, $this->sizeY , $this->colorAxisX);\n\t}", "private function setY( $y )\n\t{\n\t\t$this->y = Args::int($y)->required()->min(0)->value();\n\t}", "abstract public function setCurrentPoint(int $x, int $y);", "private function draw_svg_ave_lines($y){\n\t\t$yvalue = $this->axisheight - ($this->yscale * $this->ave_this_year[$y]['volume']);\n\t\t\n\t\tif(11 < $this->startingmonth - $this->ave_this_year[$y]['month']){\n\t\t\tif(0 != $this->ave_this_year[$y]['month']){\n\t\t\t\t$this->x_year_start = ($this->startingmonth - $this->ave_this_year[$y]['month'] - 12 + 1.5 )*$this->monthwidth;\n\t\t\t}else{\n\t\t\t\t$this->x_year_start = ($this->startingmonth - date(\"n\") + 1.5 ) * $this->monthwidth;\n\t\t\t}\n\t\t}else{\n\t\t\t$this->x_year_start = $this->monthwidth / 2;\n\t\t}\n\t\t$this->x_year_end = ($this->startingmonth-$this->ave_this_year[$y]['month'] + 1.5)*$this->monthwidth;\n\t\t\n\t\t$ytext = $yvalue -20;\n\t\t$this->x_year_text = $this->x_year_start + 10;\n\t\t\n\t\t$this->main_graph_ave_lines .= \"\\t<text x=\\\"$this->x_year_text\\\" y=\\\"$ytext\\\" font-family=\\\"sans-serif\\\" font-size=\\\"16px\\\" fill=\\\"$this->average_graphline_color\\\">{$this->ave_this_year[$y]['volume']}</text>\\n\";\n\t\t$this->main_graph_ave_lines .= \"\\t<path stroke=\\\"$this->average_graphline_color\\\" stroke-dasharray=\\\"5, 5\\\" d=\\\"M$this->x_year_start $yvalue H$this->x_year_end\\\"/>\\n\";\n\t\treturn;\n\t}", "public function restoreGraphicState() {}", "public function restoreGraphicState() {}", "protected function forcePen()\r\n {\r\n if ($this->_pen->isModified())\r\n {\r\n echo \"$this->_canvas.setStroke(\" . $this->_pen->Width . \");\\n\";\r\n echo \"$this->_canvas.setColor(\\\"\" . $this->_pen->Color . \"\\\");\\n\";\r\n $this->_pen->resetModified();\r\n $this->_brush->modified();\r\n }\r\n }", "function _set_img_y($size)\r\n {\r\n $this->img_y = $size;\r\n }", "function update() {\n\n\t\t\t}", "public function setYMin($yMin) {}", "protected function CalcAxes()\n {\n if($this->axes_calc_done)\n return;\n\n $ends = $this->GetAxisEnds();\n if(!$this->label_adjust_done)\n $this->LabelAdjustment();\n if(is_null($this->g_height) || is_null($this->g_width))\n $this->SetGridDimensions();\n\n list($x_axes, $y_axes) = $this->GetAxes($ends, $this->g_width,\n $this->g_height);\n\n $main_axes = $this->flip_axes ? $y_axes : $x_axes;\n if($this->label_centre)\n foreach($main_axes as $axis)\n if(!is_null($axis))\n $axis->Bar();\n\n $this->x_axes = $x_axes;\n $this->y_axes = $y_axes;\n\n $this->axes_calc_done = true;\n }", "public function setPosition()\n {\n // get the current position\n $currentX = $this->_pdf->getX();\n $currentY = $this->_pdf->getY();\n\n // save it\n $this->value['xc'] = $currentX;\n $this->value['yc'] = $currentY;\n\n if ($this->value['position']=='relative' || $this->value['position']=='absolute') {\n if ($this->value['right']!==null) {\n $x = $this->getLastWidth(true) - $this->value['right'] - $this->value['width'];\n if ($this->value['margin']['r']) $x-= $this->value['margin']['r'];\n } else {\n $x = $this->value['left'];\n if ($this->value['margin']['l']) $x+= $this->value['margin']['l'];\n }\n\n if ($this->value['bottom']!==null) {\n $y = $this->getLastHeight(true) - $this->value['bottom'] - $this->value['height'];\n if ($this->value['margin']['b']) $y-= $this->value['margin']['b'];\n } else {\n $y = $this->value['top'];\n if ($this->value['margin']['t']) $y+= $this->value['margin']['t'];\n }\n\n if ($this->value['position']=='relative') {\n $this->value['x'] = $currentX + $x;\n $this->value['y'] = $currentY + $y;\n } else {\n $this->value['x'] = $this->_getLastAbsoluteX()+$x;\n $this->value['y'] = $this->_getLastAbsoluteY()+$y;\n }\n } else {\n $this->value['x'] = $currentX;\n $this->value['y'] = $currentY;\n if ($this->value['margin']['l']) $this->value['x']+= $this->value['margin']['l'];\n if ($this->value['margin']['t']) $this->value['y']+= $this->value['margin']['t'];\n }\n\n // save the new position\n $this->_pdf->setXY($this->value['x'], $this->value['y']);\n }", "public function update()\r\n {\r\n $this->x += $this->dx;\r\n $this->y += $this->dy;\r\n $this->z += $this->dz;\r\n }", "public function Rule(){\n $prevousXY=$this->GetXY();\n $inicialX= $this->GetTMargin();\n $y= $this->CalculateYOffSet(10);\n $sumY=10;\n while($y<$this->h){\n $y= $this->CalculateYOffSet($sumY);\n $this->Line(0,$y,10,$y);\n $this->SetYOffSet($sumY);\n $this->Cell(4,10,$sumY);\n $sumY+=10;\n }\n\n $this->SetCoord($prevousXY);\n \n }", "public function undo() {\r\n $this->chart->restoreAxisScales();\r\n $this->setZoomed(false);\r\n }", "private function plotData() : void\n\t{\n\t\t$n = $this->getSize();\n\t\tif($n === -1) {\n\t\t\texit();\n\t\t}\n\n\t\tfor ($i=0; $i < $n; $i++) { \n\t\t\timagefilledellipse($this->im, $this->xValues[$i]*$this->scaleX+$this->shiftX, $this->yValues[$i]*$this->scaleY*(-1)+$this->shiftY, 10, 10, $this->colorPoints);\n\t\t}\n\n\t}", "public function getY() {}", "public function getY() {}", "public function setYAxis($y);", "public function y($value) {\n return $this->setProperty('y', $value);\n }", "function _setExtrema(& $plot)\n {\n }", "public function getY();", "function setYAxisMinimum($min = false)\n {\n if ($min !== false) {\n $min = 1.0 * $min;\n }\n $this->yaxis_min = $min;\n }", "public function setY($y)\n {\n $this->y = $y;\n return $this;\n }", "public function graphicState() {}", "function after_update() {}", "public function saveGraphicState() {}", "public function saveGraphicState() {}", "private function adjust_graph_dimensions(){\n\t\t$this->axiswidth = ($this->startingmonth + 1.5) * $this->monthwidth;\n\t\tif($this->max_graph_height < $this->max_month_value){\n\t\t\t$this->yscale = $this->max_graph_height / $this->max_month_value;\n\t\t}\n\t\t$this->axisheight = $this->yscale * ($this->max_month_value + 20);\n\t\tif($this->max_graph_height < $this->axisheight){\n\t\t\t$this->yscale = $this->yscale * ($this->max_graph_height / $this->axisheight);\n\t\t\t$this->axisheight = $this->max_graph_height;\n\t\t}\n\t\t$this->graphheight = $this->axisheight + $this->graphmargintop + $this->graphmarginbottom;\n\t\t$this->graphwidth = $this->axiswidth + $this->graphmarginleft + $this->graphmarginright;\n\t\t\n\t\treturn;\n\t}", "private function Reload(){\t\t\t\t\r\n\t $this->valueLatestPeriod();\t \r\n\t $this->prepareGridData(); //ADDING TO OUTPUT\t\t\r\n\t}", "public function setYMax($yMax) {}", "public function getYAxis();", "function clearAxes()\n {\n $this->axis_data = array\n (\n array('a' => '',\n 'd' => 1,\n 't' => ''),\n array('a' => '',\n 'd' => 1,\n 't' => ''),\n array('a' => '',\n 'd' => 1,\n 't' => ''),\n array('a' => '',\n 'd' => 1,\n 't' => '')\n );\n }", "function is_y(){\n\t\tif( $this->axis == 2 ){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "function _set_new_x($size)\r\n {\r\n $this->new_x = $size;\r\n }", "private function draw_axes(){\n\t\t$this->display_graph_axis = \"\\t<path stroke=\\\"$this->axes_color\\\" stroke-dasharray=\\\"5, 5\\\" d=\\\"M$this->graphmarginleft $this->axisheight h $this->axiswidth\\\"/>\\n\";\n\t\t$this->display_graph_axis .= \"\\t<path stroke=\\\"$this->axes_color\\\" stroke-dasharray=\\\"5, 5\\\" d=\\\"M$this->graphmargintop 0 v $this->axisheight\\\"/>\\n\";\n\t\treturn;\n\t}", "function get_y_min()\n\t{\n\t\treturn 0;\n\t}", "protected function forceBrush()\r\n {\r\n if ($this->_brush->isModified())\r\n {\r\n echo \"$this->_canvas.setColor(\\\"\" . $this->_brush->Color . \"\\\");\\n\";\r\n $this->_brush->resetModified();\r\n $this->_pen->modified();\r\n }\r\n }", "function endUpdate()\r\n {\r\n $this->_updatecounter--;\r\n // let's just make sure that if the endUpdate() is called too many times\r\n // that the $this->_updatecounter is valid and the font is updated\r\n if ($this->_updatecounter < 0)\r\n {\r\n $this->_updatecounter = 0;\r\n }\r\n // when finished updating call the modified() function to notify the control.\r\n if ($this->_updatecounter == 0)\r\n {\r\n $this->modified();\r\n }\r\n }", "public function setPoint(int $x, int $y ) : void\n\t{\n\t\tif($x > $this->rangeXHigh)\n\t\t\t$this->rangeXHigh = $x;\n\t\telseif ($x < $this->rangeXLow) \n\t\t\t$this->rangeXLow = $x;\n\n\t\tif($y > $this->rangeYHigh)\n\t\t\t$this->rangeYHigh = $y;\n\t\telseif ($y < $this->rangeYLow) \n\t\t\t$this->rangeYLow = $y;\n\n\t\t$this->xValues[] = $x;\n\t\t$this->yValues[] = $y;\n\n\t}", "public function _update()\n\t {\n\t \t$this->notifyObservers(__FUNCTION__);\n\t }", "public function setY(float $y): self\n\t{\n\t\t$this->y = $y;\n\t\treturn $this;\n\t}", "public function draw()\n {\n //Skip calculations; dummy result after calculating points\n $points = [\n [\"x\" => '0', \"y\" => '0'],\n [\"x\" => '10', \"y\" => '0'],\n [\"x\" => '0', \"y\" => '10'],\n [\"x\" => '10', \"y\" => '10']\n ];\n\n if ($this->format instanceof \\GraphicEditor\\Formats\\Points) {\n $this->format->addPoints($points);\n }\n }", "public function onTick() {\r\n\r\n }", "function update_end()\n {\n }", "public function updateRootline() {}", "public function update() {\n parent::update();\n }", "public function Reset(){\r\n\t\t$this->points = 0;\r\n\t }", "public function set()\n {\n // to reflect the current bar.\n\n // Why?\n\n // Otherwise the bar count gets repeated. And that people notice.\n\n $this->variables->setVariable(\"count\", $this->bar_count);\n $this->variables->setVariable(\"max_bar_count\", $this->max_bar_count);\n\n $this->variables->setVariable(\"refreshed_at\", $this->current_time);\n }", "public function getSubscriptYSize() {}", "private function draw_year_lines($y){\n\t\tif(0 != $this->ave_this_year[$y]['month']){\n\t\t\t$this->main_graph_ave_lines .= \"\\t<path stroke=\\\"$this->axes_color\\\" stroke-dasharray=\\\"5, 5\\\" d=\\\"M$this->x_year_end 0 v $this->axisheight\\\"/>\\n\";\n\t\t}\n\t\t$this->main_graph_ave_lines .= \"\\t<text x=\\\"$this->x_year_text\\\" y=\\\"20\\\" font-family=\\\"sans-serif\\\" font-size=\\\"16px\\\" fill=\\\"$this->axes_color\\\">{$this->ave_this_year[$y]['year']}</text>\\n\";\n\t\treturn;\n\t}", "function _pointY($point)\n {\n return $this->_parent->_pointY($point);\n }", "protected function drawImage():void{\n\t\tfor($y = 0; $y < $this->moduleCount; $y++){\n\t\t\tfor($x = 0; $x < $this->moduleCount; $x++){\n\t\t\t\t$this->setPixel($x, $y);\n\t\t\t}\n\t\t}\n\t}", "public function presetEditorPosition()\n {\n $editor = $this->format;\n\n $editor->shiftCurrentXposition($this->shape->getBorderWidth() / 2);\n\n // if there is no space left on the right of the convas to shift to,\n // we update the y axis to shift down to the next line\n if ($editor->getWidth() - $editor->getCurrentXposition() < $this->shape->getWidth(true)\n && $editor->getHeight() - $editor->getCurrentYposition() >= $this->shape->getHeight(true)) {\n\n $editor->shiftCurrentYposition($editor->biggestYpostion());\n $editor->resetCurrentXposition($this->shape->getBorderWidth() / 2);\n\n }\n }", "public function y($y)\n {\n $this->y = $y;\n\n return $this;\n }", "function _getPointY($x)\n {\n $function = $this->_dataFunction;\n return $function ($x);\n }", "public function after_update() {}", "private function update_positions(){\n // update the point positions\n $start_point = 0;\n $end_point = 0;\n $nr_points = count ($this->points);\n do{\n $continue = false;\n\n // find a stop point with specified position\n for ($i = $start_point; $i < $nr_points; $i++)\n {\n $end_point = $i ;\n if (! $this->points[$i]['auto_position'])\n {\n break;\n }\n }\n\n // update the positions for all the points between start point end endpoint\n //TODO:\n }while($continue);\n\n }", "public function testUpdatePayslip()\n {\n }", "private function scaleY() : void \n\t{\n\t\t$this->range = abs($this->rangeYLow) + abs($this->rangeYHigh);\n\n\t\t$this->scaleY = ((float)$this->sizeY / $this->range);\n\t\t$this->originY = $this->sizeY >> 1;\n\t}", "public function getSubscriptYOffset() {}", "protected function afterUpdate() {\n\t}", "private function makeTickMarks() : void \n\t{\n\t\t$tickX = 0;\n\n\t\t$tickY = 0;\n\n\t\tif($this->ticks) {\n\n\t\t\t$tickSizeX = $this->scaleY/6;\n\t\t\t$tickSizeY = $this->scaleX/6;\n\n\t\t\twhile($tickX <= $this->sizeX) {\n\t\t\t\timageline($this->im, $tickX, 0-$tickSizeX+$this->shiftY, $tickX, 0+$tickSizeX+$this->shiftY, $this->colorTickX);\n\t\t\t\t$tickX += $this->scaleX;\n\t\t\t}\n\n\t\t\twhile($tickY <= $this->sizeY) {\n\t\t\t\timageline($this->im, 0-$tickSizeY+$this->shiftX, $tickY, 0+$tickSizeY+$this->shiftX, $tickY, $this->colorTickY);\n\t\t\t\t$tickY += $this->scaleY;\n\t\t\t}\n\t\t}\n\t}", "protected function afterUpdate()\n {\n }", "protected function afterUpdate()\n {\n }", "private function switchDimensions()\r\n {\r\n if (($this->ControlState & csLoading) != csLoading)\r\n {\r\n $temp=$this->_width;\r\n $this->_width=$this->_height;\r\n $this->_height=$temp;\r\n }\r\n }", "protected function setPixel(int $x, int $y):void{\n\n\t\tif(!$this->options->drawLightModules && !$this->matrix->check($x, $y)){\n\t\t\treturn;\n\t\t}\n\n\t\t$this->imagickDraw->setFillColor($this->getModuleValueAt($x, $y));\n\n\t\t$this->options->drawCircularModules && !$this->matrix->checkTypeIn($x, $y, $this->options->keepAsSquare)\n\t\t\t? $this->imagickDraw->circle(\n\t\t\t\t(($x + 0.5) * $this->scale),\n\t\t\t\t(($y + 0.5) * $this->scale),\n\t\t\t\t(($x + 0.5 + $this->options->circleRadius) * $this->scale),\n\t\t\t\t(($y + 0.5) * $this->scale)\n\t\t\t)\n\t\t\t: $this->imagickDraw->rectangle(\n\t\t\t\t($x * $this->scale),\n\t\t\t\t($y * $this->scale),\n\t\t\t\t(($x + 1) * $this->scale),\n\t\t\t\t(($y + 1) * $this->scale)\n\t\t\t);\n\t}", "public function setYAxisPaceReverse($axis) {\n\t\t$this->Options['yaxes'][$axis-1]['transform'] = 'function(v){return 1/(v);}';\n\t\t$this->Options['yaxes'][$axis-1]['inverseTransform'] = 'function(v){return 1/v;}';\n\t}", "public function tick()\n {\n //\n }", "private function calcShifts() : void\n\t{\n\t\t$this->shiftY = $this->scaleY*abs($this->rangeYHigh);\n\n\t\t$this->shiftX = $this->scaleX*abs($this->rangeXLow);\n\t}", "public function getY(){\r\r\n\t\treturn $this->y_Atual;\r\r\n\t}", "public function draw(\\SetaPDF_Core_Canvas $canvas, $x, $y) {}", "abstract function update();", "public function onTick($currentTick){ \n }", "public function preUpdate()\n {\n }", "public function setXAxis($x);", "public function getValY() {\n return $this->valY;\n }", "protected function drawImage():void{\n\t\t$this->imagickDraw = new ImagickDraw;\n\t\t$this->imagickDraw->setStrokeWidth(0);\n\n\t\tfor($y = 0; $y < $this->moduleCount; $y++){\n\t\t\tfor($x = 0; $x < $this->moduleCount; $x++){\n\t\t\t\t$this->setPixel($x, $y);\n\t\t\t}\n\t\t}\n\n\t\t$this->imagick->drawImage($this->imagickDraw);\n\t}", "private function getYposition()\n {\n return $this->getPositionInstance()->getYposition();\n }", "function _pointY($value)\n {\n $country = $value['X'];\n return $this->_plotTop+$this->_mapPoints[$country]['Y']*$this->_scale;\n }", "protected function AdjustAxes(&$x_len, &$y_len)\n {\n return array(0, 0);\n }", "public function getY()\n {\n return $this->y;\n }", "private function getYLabel() {\n\t\treturn $this->yLabel;\n\t}", "function moveTo($newx, $newy) {\n $this->setX($newx);\n $this->setY($newy);\n }", "function dc_YDown($a=0){\n\tglobal $pdf;\n\t$pdf->SetY($pdf->GetY()+$a); // Line break 2mm\n\treturn $pdf->GetY();\n}", "private function calculatePoints()\n {\n $this->points += 100;\n $this->points = $this->points < 0 ? 0 : $this->points;\n }", "public function getY()\n\t{\n\t\treturn $this->y;\n\t}", "public function getY()\n\t{\n\t\treturn $this->y;\n\t}", "abstract protected function update ();", "function setData()\n {\n list($this->x, $this->y, $this->radius, $this->radius2) = $this->getInput();\n }", "public function setX($x){\n $this->x = $x;\n }", "public function toY($y)\n\t{\n\t\t$this->setMethod('to_Y');\n\t\t$this->setY($y);\n\t\treturn $this;\n\t}", "public function GetCurrenPercentageY(){\n return $this->CalculatePercentageY($this->GetY());\n }" ]
[ "0.6266833", "0.6213247", "0.6173688", "0.6032653", "0.58453983", "0.57554585", "0.56693137", "0.56053364", "0.54752254", "0.53620136", "0.5292381", "0.525152", "0.5237822", "0.5237822", "0.5216326", "0.5214634", "0.5187367", "0.5181818", "0.5177927", "0.512274", "0.5112567", "0.50980777", "0.50801057", "0.4996654", "0.49955812", "0.49955812", "0.49739155", "0.49647278", "0.49574187", "0.49524537", "0.49506482", "0.4918713", "0.48949334", "0.4876218", "0.48723873", "0.48716643", "0.48238403", "0.4823493", "0.4817062", "0.4816405", "0.48090196", "0.48048902", "0.48020196", "0.47918674", "0.47877944", "0.47786343", "0.47711182", "0.47669247", "0.4759968", "0.47584403", "0.47390154", "0.4739003", "0.4733537", "0.47320312", "0.47314706", "0.4710829", "0.4709797", "0.47019097", "0.4698336", "0.4680596", "0.46762317", "0.46761525", "0.4676141", "0.4659773", "0.46580303", "0.46499178", "0.46464872", "0.46402353", "0.46389985", "0.46368423", "0.46215975", "0.46210772", "0.46210772", "0.46188638", "0.4616471", "0.46154252", "0.46096736", "0.4609197", "0.46017438", "0.4590226", "0.45835754", "0.45802236", "0.45793316", "0.45599684", "0.4559899", "0.45588768", "0.45531175", "0.4549561", "0.4544896", "0.45353174", "0.45316848", "0.45313028", "0.45199507", "0.4519013", "0.45022616", "0.45022616", "0.44996205", "0.44991532", "0.44980627", "0.44976228", "0.44955733" ]
0.0
-1
__construct ini buat apa?
public function __construct(){ parent::__construct(); // parent ini buat apa? $this->load->model('menu_model'); $this->load->model('user_model'); $this->load->model('order_model'); $this->load->model('bayar_model'); $this->load->helper('text'); // ini buat apa? $this->load->helper('url_helper'); // meload helper gunanya untuk apa? if($this->session->has_userdata('username')){ //has_userdata ini apa? buat sendiri kah? if ($_SESSION['status']=='user') { // session itu untuk menampung sementara ketita dia login/yg memerlukan username }else if ($_SESSION['status']='admin'){ redirect('admin'); // 'admin' apa namanya? kapan dibuatnya? }else { echo "<script>alert('maaf status anda tidak jelas')</script>"; redirect('login'); //'login' juga kapan dibuat kok tiba2 uda di direct aja? } }else{ redirect('login'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "protected abstract function __construct();", "function __construct(){\n\t\t// nowt much...\n\t}", "private function __construct () {}", "function _construct(){ }", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t// ben duoi nay se la cac logic cua __construct lop con ma chung ta can dinh nghia - xu ly\n\t}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "public function __init(){}", "function __construct() ;", "public function __construct() {\n // Aqui todo lo que se define para este constructor\n }", "function __construct() {\n\n\t\t}", "function __construct (){\n\t\t}", "function __construct(){}", "function __construct(){}", "function __construct(){}", "public function __construct(){\n\t\t//asi poder tener dispoble la vista que le pertenece a esta clase\n\t\tparent::__construct();\n\t}", "private function __construct(){ }", "private function __construct(){ }", "function _construct() {\n \t\n\t\t\n\t}", "function __construct() {}", "function __construct() {}", "function __construct() {}", "function __construct() {}", "function __construct() {}", "function __construct() {}", "private final function __construct() {}", "private function __construct(){\n\t\n\t}" ]
[ "0.83479255", "0.83479255", "0.83479255", "0.83479255", "0.83479255", "0.83479255", "0.83479255", "0.83479255", "0.83479255", "0.83479255", "0.83479255", "0.83479255", "0.83479255", "0.83479255", "0.83479255", "0.83479255", "0.83479255", "0.8243098", "0.82011575", "0.81697345", "0.8169361", "0.81625676", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.8132786", "0.81323236", "0.81323236", "0.81321466", "0.8124675", "0.8124066", "0.8084471", "0.8066706", "0.805659", "0.80258095", "0.80258095", "0.80258095", "0.80196255", "0.80181706", "0.80181706", "0.80157995", "0.8009409", "0.8009409", "0.8009409", "0.8009409", "0.8009409", "0.8009409", "0.8003605", "0.7992529" ]
0.0
-1
Save person to database
public function save();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function save() {\n\t\t// Error-checking should already be complete\n\t\tif(person::exists($this->id)) {\n\t\t\t// UPDATE an existing database entry\n\t\t\t$query = \"UPDATE people set \"\n\t\t\t\t\t.\"firstname = \".$this->firstname.\", \"\n\t\t\t\t\t.\"lastname = \".$this->lastname.\", \"\n\t\t\t\t\t.\"address_home_street_1 = \".$this->address_home_street_1.\", \"\n\t\t\t\t\t.\"address_home_street_2 = \".$this->address_home_street_2.\", \"\n\t\t\t\t\t.\"address_home_city = \".$this->address_home_city.\", \"\n\t\t\t\t\t.\"address_home_state = \".$this->address_home_state.\", \"\n\t\t\t\t\t.\"address_home_zip = \".$this->address_home_zip.\", \"\n\t\t\t\t\t.\"address_work_street_1 = \".$this->address_work_street_1.\", \"\n\t\t\t\t\t.\"address_work_street_2 = \".$this->address_work_street_2.\", \"\n\t\t\t\t\t.\"address_work_city = \".$this->address_work_city.\", \"\n\t\t\t\t\t.\"address_work_state = \".$this->address_work_state.\", \"\n\t\t\t\t\t.\"address_work_zip = \".$this->address_work_zip.\", \"\n\t\t\t\t\t.\"email = \".$this->email.\", \"\n\t\t\t\t\t.\"phone_personal_cell = \".$this->phone_personal_cell.\", \"\n\t\t\t\t\t.\"phone_work = \".$this->phone_work.\", \"\n\t\t\t\t\t.\"phone_work_cell = \".$this->phone_work_cell.\", \"\n\t\t\t\t\t.\"phone_home = \".$this->phone_home.\", \"\n\t\t\t\t\t.\"fax = \".$this->fax.\", \"\n\t\t\t\t\t.\"gender = \".$this->gender.\", \"\n\t\t\t\t\t.\"birthdate = \".$this->birthdate.\", \"\n\t\t\t\t\t.\"facebook_username = \".$this->facebook_username.\", \"\n\t\t\t\t\t.\"username = \".$this->username.\", \"\n\t\t\t\t\t.\"headshot_filename = \".$this->headshot_filename\n\t\t\t\t\t.\" WHERE id = \".$this->id;\n\t\t\t\t\t\n\t\t\t$result = mydb::cxn()->query($query);\n\t\t\tif(mydb::cxn()->error != '') throw new Exception('There was a problem updating '.$this->firstname.' '.$this->lastname.'\\'s database entry.');\n\t\t}\n\t\telse {\n\t\t\t// INSERT a new database entry\n\t\t\t$query = \"INSERT INTO people (\"\n\t\t\t\t\t.\"firstname, \"\n\t\t\t\t\t.\"lastname, \"\n\t\t\t\t\t.\"address_home_street_1, \"\n\t\t\t\t\t.\"address_home_street_2, \"\n\t\t\t\t\t.\"address_home_city, \"\n\t\t\t\t\t.\"address_home_state, \"\n\t\t\t\t\t.\"address_home_zip, \"\n\t\t\t\t\t.\"address_work_street_1, \"\n\t\t\t\t\t.\"address_work_street_2, \"\n\t\t\t\t\t.\"address_work_city, \"\n\t\t\t\t\t.\"address_work_state, \"\n\t\t\t\t\t.\"address_work_zip, \"\n\t\t\t\t\t.\"email, \"\n\t\t\t\t\t.\"phone_personal_cell, \"\n\t\t\t\t\t.\"phone_home, \"\n\t\t\t\t\t.\"phone_work, \"\n\t\t\t\t\t.\"phone_work_cell, \"\n\t\t\t\t\t.\"fax, \"\n\t\t\t\t\t.\"gender, \"\n\t\t\t\t\t.\"birthdate, \"\n\t\t\t\t\t.\"facebook_username, \"\n\t\t\t\t\t.\"username, \"\n\t\t\t\t\t.\"headshot_filename) \"\n\t\t\t\t\t.\"VALUES (\"\n\t\t\t\t\t.\"'\".$this->firstname.\"', \"\n\t\t\t\t\t.\"'\".$this->lastname.\"', \"\n\t\t\t\t\t.\"'\".$this->address_home_.\"', \"\n\t\t\t\t\t.\"'\".$this->address_home_.\"', \"\n\t\t\t\t\t.\"'\".$this->address_home_.\"', \"\n\t\t\t\t\t.\"'\".$this->address_home_.\"', \"\n\t\t\t\t\t.\"'\".$this->address_home_.\"', \"\n\t\t\t\t\t.\"'\".$this->address_work_.\"', \"\n\t\t\t\t\t.\"'\".$this->address_work_.\"', \"\n\t\t\t\t\t.\"'\".$this->address_work_.\"', \"\n\t\t\t\t\t.\"'\".$this->address_work_.\"', \"\n\t\t\t\t\t.\"'\".$this->address_work_.\"', \"\n\t\t\t\t\t.\"'\".$this->email.\"', \"\n\t\t\t\t\t.\"'\".$this->phone_personal_cell.\"', \"\n\t\t\t\t\t.\"'\".$this->phone_home.\"', \"\n\t\t\t\t\t.\"'\".$this->phone_work.\"', \"\n\t\t\t\t\t.\"'\".$this->phone_work_cell.\"', \"\n\t\t\t\t\t.\"'\".$this->fax.\"', \"\n\t\t\t\t\t.\"'\".$this->gender.\"', \"\n\t\t\t\t\t.\"'\".$this->birthdate->format('Y-m-d').\"', \"\n\t\t\t\t\t.\"'\".$this->facebook_username.\"', \"\n\t\t\t\t\t.\"'\".$this->username.\"', \"\n\t\t\t\t\t.\"'\".$this->headshot_filename.\"')\";\n\t\t\t$result = mydb::cxn()->query($query);\n\t\t\tif(mydb::cxn()->error != '') throw new Exception('There was a problem inserting '.$this->firstname.' '.$this->lastname.'\\'s database entry.');\n\t\t}\n\t\t\n\t}", "public function save() {}", "public function save() {}", "public function save() {}", "public function savePerson($person)\n {\n // Deal with new ayso record\n // One type at a time for now since getRPs will not work for new records\n // Need to deal with the case of adding a new person with an existing ayso record\n $personRegs = array($person->getRegAYSOV(),$person->getRegUSSF());\n foreach($personRegs as $personReg)\n {\n if ($personReg->getRegKey()) \n {\n // See if one already exists\n // Move to a validator?\n $personRegx = $this->loadPersonRegForKey($personReg->getRegKey());\n \n // Nothng existing means to just go ahead and create\n if (!$personRegx) $this->persist($personReg);\n else\n {\n // No change is okay\n if ($personReg->getId() == $personRegx->getId()) {}\n else\n {\n // Punt for now\n die('Trying to change to existing reg key');\n }\n }\n }\n else\n {\n if ($personReg->getId())\n {\n $this->remove($personReg);\n }\n }\n }\n // If no project then remove from flush\n $currentProjectPerson = $person->getCurrentProjectPerson();\n if (!$currentProjectPerson->getProject())\n {\n // This allows removeing a person from a project\n $this->remove($currentProjectPerson);// die('detached');\n \n // Need this otherwise an entity always gets added even with remove/detach\n // The cascade=persist was causing this when addProjectPerson was called by the form\n // $person->clearProjectPersons();\n }\n else $this->persist($currentProjectPerson); // Only persist if have a project\n \n // Deal with new persons\n if (!$person->getId()) $this->persist($person);\n \n $this->flush();\n }", "public function save()\n {\n try {\n $name = $this->getName();\n $age = $this->getAge();\n if (!$this->getDriverId()) {\n $this->_pdo->query(\"INSERT INTO driver (name, age) VALUES ('$name', '$age')\");\n } else {\n $this->_pdo->query(\n \"UPDATE drive SET name = '$name', age = '$age'\" .\n \" WHERE driver_id = \" . $this->getDriverId()\n );\n }\n } catch (PDOException $e) {\n echo \"Error: \" . $e;\n }\n }", "public function save(){\r\n $db = new Database();\r\n $sql = \"\";\r\n if (empty($this->id)){\r\n $sql = \"insert into persons(\r\n first_name,\r\n last_name,\r\n age,\r\n email,\r\n admission_date,\r\n is_active\r\n )\r\n values(\r\n :first_name,\r\n :last_name,\r\n :age,\r\n :email,\r\n :admission_date,\r\n :is_active\r\n )\";\r\n $stm = $db->pdo->prepare($sql);\r\n }\r\n else{\r\n $sql = \"update persons set\r\n first_name=:first_name,\r\n last_name=:last_name,\r\n age=:age,\r\n email=:email,\r\n admission_date=:admission_date,\r\n is_active=:is_active\r\n where id=:id\r\n \";\r\n $stm = $db->pdo->prepare($sql);\r\n $stm->bindParam(':id', $this->id);\r\n\r\n }\r\n $date = $this->admission_date->format(\"Y-m-d H:i:s\");\r\n $stm->bindParam(':first_name', $this->first_name);\r\n $stm->bindParam(':last_name', $this->last_name);\r\n $stm->bindParam(':age', $this->age);\r\n $stm->bindParam(':email', $this->email);\r\n $stm->bindParam(':admission_date', $date);\r\n //$stm->bindParam(':admission_time', $this->admission_time->format(\"H:i:s\"));\r\n $stm->bindParam(':is_active', $this->is_active);\r\n $stm->execute();\r\n $this->id = $db->pdo->lastInsertId();\r\n $this->save_interests();\r\n }", "public function save(){\r\n $db = new Database();\r\n $sql = \"\";\r\n $stm = null;\r\n if (empty($this->id)){\r\n $sql = \"insert into interests (name) values (:name)\";\r\n $stm = $db->pdo->prepare($sql);\r\n }\r\n else{\r\n $sql = \"update interests set name=:name where id=:id\";\r\n $stm = $db->pdo->prepare($sql);\r\n $stm->bindParam(':id', $this->id);\r\n }\r\n $stm->bindParam(':name', $this->name);\r\n $stm->execute();\r\n }", "abstract public function save();", "abstract public function save();", "abstract public function save();", "abstract public function save();", "abstract public function save();", "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 }", "public abstract function save();", "public function save() {\n $db = Db::instance();\n // omit id and any timestamps\n $db_properties = array(\n 'username' => $this->username,\n 'password_hash' => $this->password_hash,\n 'email' => $this->email,\n 'first_name' => $this->first_name,\n 'last_name' => $this->last_name,\n 'user_type' => $this->user_type,\n 'bio' => $this->bio,\n 'creation_date' => $this->creation_date,\n 'gender' => $this->gender,\n 'color' => $this->color\n );\n $db->store($this, __CLASS__, self::DB_TABLE, $db_properties);\n }", "public function save() {\n $db = Db::instance();\n // omit id \n $db_properties = array(\n 'firstName' => $this->firstName,\n 'lastName' => $this->lastName,\n 'description' => $this->description,\n 'user' => $this->user,\n 'password' => $this->password,\n 'image' => $this->image,\n 'gender' => $this->gender,\n 'topic_id' => $this->topic_id,\n 'topic_id1' => $this->topic_id1,\n 'role_id' => $this->role_id,\n );\n $db->store($this, __CLASS__, self::DB_TABLE, $db_properties);\n }", "public function saveToDB()\n {\n }", "public function action_personSave() {\r\n if ($this->validateSave()) {\r\n // 2. Zapis danych w bazie\r\n try {\r\n\r\n //2.1 Nowy rekord\r\n if ($this->form->id == '') {\r\n //sprawdź liczebność rekordów - nie pozwalaj przekroczyć 20\r\n $count = App::getDB()->count(\"person\");\r\n \r\n App::getDB()->insert(\"person\", [\r\n \"name\" => $this->form->name,\r\n \"surname\" => $this->form->surname,\r\n \"birthdate\" => $this->form->birthdate,\r\n \"job_title\" => $this->form->jobTitle,\r\n \"job_place\" => $this->form->jobPlace,\r\n \"user_name\" => $this->form->userName,\r\n \"role\" => $this->form->role,\r\n \"password\" => md5($this->form->password)\r\n ]);\r\n } else {\r\n $user = App::getDB()->get(\"person\", \"*\", [\r\n \"id\" => $this->form->id\r\n ]);\r\n \r\n if (empty(trim($this->form->password))) {\r\n $password = $user['password'];\r\n } else {\r\n $password = md5($this->form->password);\r\n }\r\n \r\n //2.2 Edycja rekordu o danym ID\r\n App::getDB()->update(\"person\", [\r\n \"name\" => $this->form->name,\r\n \"surname\" => $this->form->surname,\r\n \"birthdate\" => $this->form->birthdate,\r\n \"job_title\" => $this->form->jobTitle,\r\n \"job_place\" => $this->form->jobPlace,\r\n \"user_name\" => $this->form->userName,\r\n \"role\" => $this->form->role,\r\n \"password\" => $password\r\n ], [\r\n \"id\" => $this->form->id\r\n ]);\r\n }\r\n Utils::addInfoMessage('Pomyślnie zapisano rekord');\r\n } catch (\\PDOException $e) {\r\n Utils::addErrorMessage('Wystąpił nieoczekiwany błąd podczas zapisu rekordu');\r\n if (App::getConf()->debug)\r\n Utils::addErrorMessage($e->getMessage());\r\n }\r\n\r\n // 3b. Po zapisie przejdź na stronę listy osób (w ramach tego samego żądania http)\r\n App::getRouter()->forwardTo('personList');\r\n } else {\r\n // 3c. Gdy błąd walidacji to pozostań na stronie\r\n $this->generateView();\r\n }\r\n }", "public function saveData(): void\n {\n studentLoader::saveStudent(new student($_POST['lastName'], $_POST['firstName'], $_POST['email'], new group($_POST['className']), $_POST['id']), $this->pdo);\n }", "public function persist();", "public function save()\n {\n if ($this->id) {\n $this->update();\n } else {\n $this->id = $this->insert();\n }\n }", "public function save() {\n $db = Db::instance();\n $db_properties = array(\n 'action' => $this->action,\n 'url_mod' => $this->url_mod,\n 'description' => $this->description,\n 'target_id' => $this->target_id,\n 'target_name' => $this->target_name,\n 'creator_id' => $this->creator_id,\n 'creator_username' => $this->creator_username\n );\n $db->store($this, __CLASS__, self::DB_TABLE, $db_properties);\n }", "public function save() {\n\t\t\t\n\t\t}", "public function save($params);", "public\tfunction\tsave()\n\t\t{\n\t\t}", "public function save()\n\t{\n\t\t$this->copyAttributesToValues() ;\n\t\tif( $this->factory )\n\t\t{\n\t\t\tswitch( $this->todo )\n\t\t\t{\n\t\t\t\tcase 1: // Insert\n\t\t\t\t\tif( $this->factory->insertObjectIntoDB( $this ) ) $this->state = \"inserted\" ;\n\t\t\t\t\telse $this->state = \"dberror\" ;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 2: // update\n\t\t\t\t\tif( $this->factory->updateObjectIntoDB( $this ) ) $this->state = \"updated\" ;\n\t\t\t\t\telse $this->state = \"dberror\" ;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 3: // delete\n\t\t\t\t\tif( $this->factory->deleteObjectIntoDB( $this ) ) $this->state = \"deleted\" ;\n\t\t\t\t\telse $this->state = \"dberror\" ;\n\t\t\t\t\tbreak ;\n\t\t\t}\n\t\t}\n\t}", "function save() {\n $conn = \\DB\\getConnection();\n\n $query = sprintf(\"INSERT INTO Payments (uid, typeid, token, amount)\n VALUES (%u, %u, '%s', %f)\",\n $this->uid, $this->typeid, $conn->escape_string($this->token), $this->amount);\n\n \n\n $result = $conn->query($query);\n\n // If this is a newly created user, then update the id with the\n // newly created one\n if (!isset($this->id)) {\n $this->id = $result->insert_id;\n }\n }", "public function save()\r\n {\r\n \r\n }", "public function save()\n {\n // If deposit is new, will get assigned database ID.\n $this->dbID = $this->db->saveDeposit($this);\n }", "public function save()\n {\n if ($this->id === null) {\n $this->insert();\n } else {\n $this->update();\n }\n }", "public function save()\n \t{\n \t $this->getMapper()->save($this);\n \t}", "public function save()\n {\n }", "public function save()\n {\n $this->checkForNecessaryProperties();\n\n $this->update($this->getCurrentId(), $this->data);\n }", "public function save()\n {\n\n // generate all column's sql query\n $column_names = '';\n $column_values = '';\n foreach ($this->columns as $field_name => $column_obj)\n {\n if ($column_obj->columnName === null) {\n $column_names .= $field_name.', ';\n } else {\n $column_names .= $column_obj->columnName.', ';\n }\n $column_values .= $column_obj->generateValueForSQL().', ';\n }\n $column_names = substr($column_names, 0, -1);\n $column_values = substr($column_values, 0, -1);\n $this_table_name = $this->table_name;\n $this_id = $this->id;\n\n if ($this->id === 0) {\n // This object is not saved yet.\n $query = 'INSERT INTO $this_table_name ($column_names) VALUES ($column_values);';\n // Execute query\n } else {\n // This object is on the DB.\n $query = 'INSERT INTO $this_table_name ($column_names) VALUES ($column_values) WHERE id=$this_id;';\n // Execute query\n }\n\n mysql_run_query($query);\n\n }", "public function store(PersonRequest $request)\n {\n $this->validate($request, [\n 'codigo' => 'required|unique:persona|max:30',\n ]);\n\n Person::create([\n 'codigo' => $request->codigo,\n 'nombre' => $request->nombre,\n 'apaterno' => $request->apaterno,\n 'amaterno' => $request->amaterno,\n 'fec_nac' => $request->fec_nac,\n 'tipo' => $request->tipo,\n 'sexo' => $request->sexo,\n ]);\n\n PersonalData::create([\n 'persona_codigo' => $request->codigo,\n 'estado_civil' => $request->estado_civil,\n 'religion' => $request->religion,\n 'email' => $request->email,\n 'telefono' => $request->telefono,\n 'escolaridad' => $request->escolaridad,\n 'carrera_id' => $request->carrera_id,\n 'domicilio' => $request->domicilio,\n 'actividad_economica' => $request->actividad_economica,\n 'lug_nac' => $request->lug_nac,\n 'lug_res' => $request->lug_res,\n ]);\n\n toast('Alumno registrado correctamente.', 'success', 'top');\n return redirect()->route('student.show', $request['codigo']);\n }", "public final function save() {\n }", "public final function save()\n {\n }", "public function save()\n {\n $this->checkModel();\n if (!is_null($this->profile)) $this->saved = $this->profile->save();\n }", "public function save():void;", "public function save()\n\t{\n\n\t}", "public function save()\r\n {\r\n //\r\n }", "public function saveToORM($params);", "public function save() {\n }", "public function save() {\n }", "public function store(PersonRequest $request)\n {\n $person = new Person();\n $person -> first_name = $request->first_name;\n $person -> middle_name = $request->middle_name;\n $person -> last_name = $request->last_name;\n $person -> gender = $request->gender;\n $person -> cadre = $request->cadre;\n $person -> email = $request->email;\n $person -> phone = $request->phone;\n $person -> facility = $request->facility;\n $person -> save(); \n $personId = $person->person_id;\n $pRole = $request->role;\n \n if ($pRole == 1) {\n $mentor = new Mentor();\n $mentor->person_id = $personId;\n $mentor->save();\n } else {\n $mentee = new Mentee();\n $mentee->person_id = $personId;\n $mentee->save();\n }\n return redirect('person-home');\n \n }", "function save() {\n\n\t\t// calls generic ORM save (insert or update)\n\t\tparent::save();\n\n\t}", "public function save(){\n $tableName = $this->tableName();\n $attributes = $this->attributes();\n $params = array_map(fn($attr) => \":$attr\", $attributes);\n $statement = self::prepare(\"INSERT INTO $tableName (\".implode(',', $attributes).\") \n VALUES (\".implode(',', $params).\")\");\n \n foreach($attributes as $attribute){\n $statement->bindValue(\":$attribute\", $this->{$attribute});\n }\n \n $statement->execute();\n return true;\n }", "public function save($obj)\n {\n DB::table('position_responsibilities')->insert($obj);\n }", "function save();", "function save();", "public function saveToDb() {\n parent::saveToDb();\n\n require_once 'models/Location.php';\n Location::saveToDb($this->preferredLocation);\n Location::saveToDb($this->currentLocation);\n\n require_once 'libs/DB.php';\n $conn = DB::connect();\n\n $seekerId = $this->id();\n\n // Update the seeker table\n $conn->exec(\"UPDATE seeker SET experience='$this->experience', pref_location_name='$this->preferredLocation', curr_location_name='$this->currentLocation' WHERE id='$seekerId'\");\n\n require_once 'models/Skill.php';\n foreach($this->skills as $skill) {\n Skill::saveToDb($skill);\n }\n\n // Delete old skills\n $conn->exec(\"DELETE FROM seeker_skill WHERE seeker_id='$seekerId'\");\n\n // Add new skills\n foreach($this->skills as $skill) {\n $conn->exec(\"INSERT INTO seeker_skill(seeker_id, skill_name) VALUES('$seekerId', '$skill')\");\n }\n }", "public function writePersonToDB($db)\n\t{\n\t\t// if the person is already in the DB, then just exist\n\t\tif ($this->checkInDB($db))\n\t\t\treturn;\n\n\t\t$sql = \"INSERT INTO defendant (firstName, lastName, PP, SID, SSN, DOB, street, city, state, zip, alias) VALUES ('\" . $this->getFirst() . \"', '\" . $this->getLast() . \"', 0, '', '\" . \"000-00-0000\" . \"', '\" . dateConvert($this->getDOB()) . \"', '\" . $this->getStreet() . \"', '\" . $this->getCity() . \"', '\" . $this->getState() . \"', '\" . $this->getZip() . \"', '\" . $this->getAliasCommaList() . \"')\";\n\t\tif (!$db->query($sql))\n\t\t{\n\t\t\tif ($GLOBALS['debug'])\n\t\t\t\tdie('Could not add the Defendant to the DB:' . $db->error);\n\t\t\telse\n\t\t\t\tdie('Could not add the Defendant to the DB');\n\t\t}\n\t\t$this->setPersonID($db->insert_id);\n\t\treturn;\n\t}", "public function persist() {}", "protected function save()\n\t{\n\t\t$this->saveItems();\n\t\t//$this->saveAssignments();\n\t\t//$this->saveRules();\n\t}", "public function save() {\n }", "public function save()\n {\n $entities = $this->entities;\n Database::getInstance()->doTransaction(\n function() use ($entities)\n {\n foreach ($entities as $entity)\n {\n if ($entity->getMarkedAsDeleted())\n {\n $entity->delete();\n } \n else if ($entity->getMarkedAsUpdated())\n {\n $entity->saveWithDetails();\n }\n }\n }\n );\n }", "public function save(){\n $tableName = $this->tableName();\n $attributes = $this->attributes();\n $params = array_map(fn($attr)=> \":$attr\", $attributes);\n\n $st = self::prepare(\n \"INSERT INTO $tableName (\".implode(',', $attributes).\")\n VALUES(\".implode(',', $params).\")\"\n );\n\n foreach($attributes as $attribute){\n $st->bindValue(\":$attribute\", $this->{$attribute});\n }\n\n $st->execute();\n return true;\n }", "function save(){\r\n\t\tglobal $wpdb;\r\n\t\t$table = $wpdb->prefix.EM_BOOKINGS_TABLE;\r\n\t\t//First the person\r\n\t\t//Does this person exist?\r\n\t\t$person_result = $this->person->save();\r\n\t\tif( $person_result === false ){\r\n\t\t\t$this->errors = array_merge($this->errors, $this->person->errors);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t$this->person_id = $this->person->id;\r\n\t\t\r\n\t\t//Now we save the booking\r\n\t\t$data = $this->to_array();\r\n\t\tif($this->id != ''){\r\n\t\t\t$where = array( 'booking_id' => $this->id ); \r\n\t\t\t$result = $wpdb->update($table, $data, $where, $this->get_types($data));\r\n\t\t}else{\r\n\t\t\t$result = $wpdb->insert($table, $data, $this->get_types($data));\r\n\t\t $this->id = $wpdb->insert_id; \r\n\t\t}\r\n\t\tif( $result === false ){\r\n\t\t\t$this->errors[] = __('There was a problem saving the booking.', 'dbem'); \r\n\t\t}\r\n\t\t\r\n\t\tglobal $current_booking_id ; \r\n\t\t$current_booking_id = $this->id ;\r\n\t\t\r\n\t\t//Give feedback on result\r\n\t\tif( count($this->errors) == 0 ){\r\n\t\t\t//Success\r\n\t\t\t$this->feedback_message = __('Your booking has been recorded','dbem');\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\t\t\r\n\t\treturn true;\r\n\t}", "public function save($attributes = []);", "public function save()\n {\n $this->persist($this->state);\n }", "public function save()\n {\n }", "public function save()\n {\n }", "public function save() {\n\t\t$data = array(\n\t\t\t\t\"user\" => array(\n\t\t\t\t\t\t\"email\" => $this->_data[\"email\"],\n\t\t\t\t)\n\t\t);\n\t\t\n\t\t// kontrola zmeny hesla\n\t\tif (in_array(\"password\", $this->_changed)) $data[\"user\"][\"password\"] = $this->_data[\"password\"];\n\t\t\n\t\t// odeslani dat\n\t\t$response = $this->_connection->sendRequest(self::OBJECT, \"put\", $this->_data[$this->_identifier], $data, \"post\");\n\t}", "public function save($entity);", "public function save($entity);", "public function save($entity);", "public function save()\n {\n $project = $this->valores();\n unset($project['idProject']);\n\n $project['idUser'] = $this->userO->idUser;\n unset($project['userO']);\n\n if (empty($this->idProject)) {\n $this->insert($project);\n $this->idProject = self::$conn->lastInsertId();\n } else {\n $this->update($this->idProject, $project);\n }\n }", "function persist() ;", "public function save()\n {\n $ins = $this->valores();\n unset($ins[\"idInscription\"]);\n\n $ins['idUser'] = $this->userO->idUser;\n unset($ins[\"userO\"]);\n\n $ins['idProject'] = $this->project->idProject;\n unset($ins[\"project\"]);\n\n if (empty($this->idInscription)) {\n $this->insert($ins);\n $this->idInscription = self::$conn->lastInsertId();\n } else {\n $this->update($this->idInscription, $ins);\n }\n }", "public function save()\n {\n\n // Doesn't exist yet -- Insert it\n if( $this->id == -1 )\n {\n $sql = 'INSERT INTO messages (recipient, sender, annotation)\n VALUES (?, ?, ?);';\n $params = array( $this->recipient, $this->sender, $this->annotation );\n $query = $this->db->query( $sql, $params );\n }\n\n // Already exists -- Update it\n else \n {\n $sql = 'UPDATE messages\n SET recipient = ?, sender = ?, annotation = ?\n WHERE id = ?';\n $params = array( $this->id, $this->recipient->id, $this->sender->id, $this->annotation->id );\n $query = $this->db->query( $sql, $params );\n }\n }", "public function saveUser()\n {\n $connection = \\Yii::$app->db;\n $command = $connection->createCommand()\n ->update('users', [\n 'name' => $this->name,\n 'email' => $this->email,\n ], 'id='.$this->id);\n $command->execute();\n }", "public function persist() {\n $bd = BD::getConexion();\n $sqlInsertUsuario = \"insert into usuarios (nomUsuario, clave) values (:nomUsuario, :clave)\";\n $sthSqlInsertUsuario = $bd->prepare($sqlInsertUsuario);\n $result = $sthSqlInsertUsuario->execute([\":nomUsuario\" => $this->nomUsuario, \":clave\" => $this->clave]);\n $this->id = (int) $bd->lastInsertId();\n }", "public function save($data);", "public function save($data);", "public function save($data);", "public function save()\n {\n $data = $this->read_file();\n\n if (( ! $data))\n {\n $data = array();\n }\n\n $data[$this->id] = array(\n 'id' => $this->id,\n 'email' => $this->email,\n 'firstname' => $this->firstname,\n 'lastname' => $this->lastname,\n 'password' => $this->password,\n 'token' => $this->token,\n 'logins' => $this->logins,\n );\n\n $this->write_file($data);\n }", "public function save() {\r\n $conn = GFSalsaConnector::instance();\r\n if ($conn) {\r\n $conn->saveObject($this->object, $this);\r\n }\r\n }", "public function save(){\n\t\t$db = static::getDatabaseConnection();\n\t\t//Find the columns from the model\n\t\t$columns = static::$columns;\n\n\t\t//because ID is AI we dont want to put a value in it\n\t\tunset($columns[array_search('id', $columns)]);\n\t\t//Same with timestamp\n\t\tunset($columns[array_search('timestamp', $columns)]);\n\n\t\t//Create an insert query which gets linked to the database\n\t\t$query = \"INSERT INTO \" . static::$tableName . \" (\". implode(\",\", $columns) . \") VALUES (\";\n\n\t\t//create a variable called insesrtcols. This is where we put the values\n\t\t$insertcols = [];\n\t\t//For each of the columns in the columns array, add that column into the insert cols array, and seperate it with a :\n\t\tforeach ($columns as $column) {\n\t\t\tarray_push($insertcols, \":\" . $column);\n\t\t}\n\t\t//turn the insertcols array into 1 string and put a , between each entry\n\t\t$query .= implode(\",\", $insertcols);\n\t\t//close the query\n\t\t$query .= \")\";\n\n\t\t//Prepare the query\n\t\t$statement = $db->prepare($query);\n\n\t\t//Foreach of the columns run this function\n\t\tforeach ($columns as $column) {\n\t\t\t//Attach the value to each of the columns\n\t\t\t//Hash the password\n\t\t\tif($column === 'password'){\n\t\t\t\t$this->$column = password_hash($this->$column, PASSWORD_DEFAULT);\n\t\t\t}\n\t\t\t$statement->bindValue(\":\" . $column , $this->$column);\n\t\t}\n\n\t\t//Run the query\n\t\t$statement->execute();\n\n\t\t//Get the id of the query which was just added\n\t\t$this->id = $db->lastInsertID();\n\t}", "public function save()\n {\n // For V2.0\n }", "public function save(){\n }", "public function store(PersonalRequest $request)\n {\n $person = $this->person->create($request->all());\n $this->handleUploads($person);\n app('API')->tags->sync($person);\n\n $this->redirect();\n }", "public function insert(Persona $persona);" ]
[ "0.70909876", "0.6967318", "0.6967318", "0.6965577", "0.69654566", "0.69243187", "0.6915628", "0.6883446", "0.6870973", "0.6870973", "0.6870973", "0.6870973", "0.6870973", "0.6864391", "0.68398476", "0.6835868", "0.6804525", "0.67879343", "0.67794484", "0.6696268", "0.66440177", "0.662941", "0.6584324", "0.6571591", "0.6568307", "0.65628135", "0.65536946", "0.65288365", "0.6520161", "0.6518432", "0.6509026", "0.65016633", "0.6501138", "0.64919305", "0.6481164", "0.64769334", "0.64647496", "0.64350075", "0.64123213", "0.63988733", "0.63811177", "0.6369422", "0.63681316", "0.63372016", "0.63372016", "0.6324915", "0.63106716", "0.63064545", "0.63018847", "0.6297675", "0.6297675", "0.6292461", "0.6288643", "0.625743", "0.62518847", "0.6248077", "0.6243074", "0.62373924", "0.6235263", "0.619801", "0.61974806", "0.61957407", "0.61957407", "0.6195614", "0.61903286", "0.61903286", "0.61903286", "0.61864376", "0.61850023", "0.6181763", "0.618124", "0.618124", "0.6177979", "0.61776114", "0.61776114", "0.61776114", "0.6176115", "0.6175974", "0.61759615", "0.61668456", "0.6163713", "0.61461645", "0.614592" ]
0.7128582
16
Run the database seeds.
public function run() { factory(Pregunta::class)->create([ 'contenido' => '¿Tengo algún malestar fisico?', 'id_tipo' => '1', 'id_area' => '1', ]); factory(Pregunta::class)->create([ 'contenido' => '¿Tengo algún dolor?', 'id_tipo' => '1', 'id_area' => '1', ]); factory(Pregunta::class)->create([ 'contenido' => '¿Tengo algún sintoma?', 'id_tipo' => '1', 'id_area' => '1', ]); factory(Pregunta::class)->create([ 'contenido' => '¿Representa ese sintoma alguna enfermedad?', 'id_tipo' => '1', 'id_area' => '1', ]); factory(Pregunta::class)->create([ 'contenido' => '¿Me encuentro usando algún medicamento autorecetado?', 'id_tipo' => '1', 'id_area' => '2', ]); factory(Pregunta::class)->create([ 'contenido' => '¿Me encuentro usando algún medicamento recomendado por un amigo?', 'id_tipo' => '1', 'id_area' => '2', ]); factory(Pregunta::class)->create([ 'contenido' => '¿He vuelto a tomar algún medicamento si consultar a un especialista?', 'id_tipo' => '1', 'id_area' => '2', ]); factory(Pregunta::class)->create([ 'contenido' => '¿Me siento bajo presión psicologica?', 'id_tipo' => '1', 'id_area' => '3', ]); factory(Pregunta::class)->create([ 'contenido' => '¿Siento que tengo problemas en mi ambiente laboral?', 'id_tipo' => '1', 'id_area' => '3', ]); factory(Pregunta::class)->create([ 'contenido' => '¿Siento que tengo problemas personales?', 'id_tipo' => '1', 'id_area' => '3', ]); factory(Pregunta::class)->create([ 'contenido' => '¿Estoy cansado?', 'id_tipo' => '1', 'id_area' => '4', ]); factory(Pregunta::class)->create([ 'contenido' => '¿Tengo sueño constantemente?', 'id_tipo' => '1', 'id_area' => '4', ]); factory(Pregunta::class)->create([ 'contenido' => '¿Tengo necesidad constantemente de acostarme o recostarme?', 'id_tipo' => '1', 'id_area' => '4', ]); factory(Pregunta::class)->create([ 'contenido' => '¿Siento que todo me cuesta el doble?', 'id_tipo' => '1', 'id_area' => '4', ]); factory(Pregunta::class)->create([ 'contenido' => '¿He comido en los horarios correspondientes hoy?', 'id_tipo' => '1', 'id_area' => '5', ]); factory(Pregunta::class)->create([ 'contenido' => '¿2 + 2?', 'id_tipo' => '2', 'id_area' => '6', ]); factory(Pregunta::class)->create([ 'contenido' => '¿2 = 5?', 'id_tipo' => '1', 'id_area' => '6', ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }", "public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }", "public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }", "public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }", "public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }", "public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }", "public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }", "public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }", "public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }", "public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }", "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }", "public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }", "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }", "public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }", "public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }", "public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }", "public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}", "public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}", "public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }", "public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }", "public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }", "public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }", "public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }", "public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }", "public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }", "public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }", "public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }", "public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }", "public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }", "public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }", "public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }", "public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }", "public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }", "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }", "public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }", "public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }", "public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }", "public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}", "public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }", "public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }", "public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }", "public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }", "public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }", "public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }", "public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }" ]
[ "0.80140394", "0.7980541", "0.79775697", "0.79547316", "0.79514134", "0.79500794", "0.79444957", "0.794259", "0.79382807", "0.7937482", "0.7934376", "0.7892533", "0.7881253", "0.78794724", "0.7879101", "0.7875628", "0.787215", "0.7870168", "0.78515327", "0.7850979", "0.7841958", "0.7834691", "0.78279406", "0.78198457", "0.78093415", "0.78030044", "0.7802443", "0.7801398", "0.7798975", "0.77957946", "0.77905124", "0.7789201", "0.77866685", "0.77786297", "0.7777914", "0.7764813", "0.7762958", "0.7762118", "0.77620417", "0.77614594", "0.7760672", "0.77599436", "0.77577287", "0.7753593", "0.7749794", "0.7749715", "0.77473587", "0.77301705", "0.77296484", "0.77280766", "0.77165425", "0.77143145", "0.7714117", "0.77136046", "0.7712814", "0.7712705", "0.7711485", "0.7711305", "0.77110684", "0.77102643", "0.7705902", "0.77048075", "0.77041686", "0.77038115", "0.7703085", "0.7702133", "0.77009964", "0.7698874", "0.769864", "0.76973957", "0.7696364", "0.7694127", "0.7692633", "0.76910555", "0.7690765", "0.7688756", "0.76879585", "0.76873547", "0.76871854", "0.7685407", "0.7683626", "0.76794547", "0.7678361", "0.7678022", "0.7676884", "0.7672536", "0.76717764", "0.7669418", "0.76692647", "0.76690245", "0.76667875", "0.76628584", "0.76624", "0.76618767", "0.7660002", "0.76567614", "0.76542175", "0.76541024", "0.7652618", "0.76524657", "0.7651689" ]
0.0
-1
Do not enable this until we need to store all the executed queries this may slow down the site.
public function add_query_filter_wptc(){ // add_filter('query', array($this->hooks_handler_obj, 'wtc_record_query'), 10); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function queries_run(){\n\t\tglobal $database_sql_queries;\n\t\treturn($database_sql_queries);\n\t}", "public function init_save_queries()\n {\n }", "public static function enableQueryLog()\n {\n }", "function dq_dump_queries() {\n\tglobal $wpdb;\n\t$hide = true;\n\n\tif ($hide) echo \"<!--\\n\";\n\t\tif ( SAVEQUERIES === true ) {\n\t\techo \"<p>\\n\";\n\t\techo \"<strong>Total Number of Queries:</strong> {$wpdb->num_queries}<br/>\\n\";\n\t\techo \"<strong>Number of seconds:</strong> \"; timer_stop(1); echo \"<br/>\\n\\n\";\n\t\techo \"<strong>Memory Usage:</strong> \" . memory_get_usage() . \"<br/>\\n\\n\";\n\t\techo \"</p>\";\n\n\t\tforeach ($wpdb->queries as $query) {\n\t\t\techo \"<p>\\n\";\n\t\t\techo \"<strong>Query:</strong> {$query[0]}<br/>\\n\";\n\t\t\techo \"<strong>Time:</strong> {$query[1]}<br />\\n\";\n\t\t\tif ( isset($query[2]) )\n\t\t\t\techo \"<strong>Caller:</strong> {$query[2]}\\n\";\n\t\t\techo \"</p>\\n\";\n\t\t}\n\t} else {\n\t\techo \"<p>Add the following to wp-config.php to enable query dumps.</p>\\n\";\n\t\techo \"<p><code>define('SAVEQUERIES', true);</code></p>\\n\";\t\n\t}\n\n\tglobal $wp_object_cache;\n\tif ( isset($wp_object_cache) )\n\t\t$wp_object_cache->stats();\n\n\tif ($hide) echo \"\\n-->\\n\";\n}", "public function enableQueryLog()\n {\n $this->loggingQueries = true;\n }", "public function check_queries() {\r\n\t\tQueryManager::check_queries();\r\n\t}", "function mysqlnd_qc_set_user_handlers($get_hash, $find_query_in_cache, $return_to_cache, $add_query_to_cache_if_not_exists, $query_is_select, $update_query_run_time_stats, $get_stats, $clear_cache)\n{\n}", "public function run()\n {\n DB::disableQueryLog();\n parent::run();\n }", "public function logQueries()\n {\n // DbLoJack Helper\n $helper = app('db_lojack');\n\n // Log database queries for the request\n foreach ($helper->connections() as $connection) {\n $queries = DB::connection($connection)->getQueryLog();\n $helper->logQueries($queries, $connection );\n }\n }", "public function dbAnalysisStoreExec() {}", "public function enableQueryLog()\n\t{\n\t\t$this->neoeloquent->enableQueryLog();\n\t}", "public function clearQueries(): void\n {\n $this->queries = [];\n }", "function log_queries() {\n $CI =& get_instance();\n \n $log = NULL;\n \n //get a list of all the queries executed so far\n $queries = $CI->db->queries;\n \n //if some queries were actually executed, iterate through them\n if( count($queries) != 0 ):\n foreach($queries as $key => $query):\n //skip logging of queries for ci_sessions and last_activity of user table\n if( strpos( $query, \"ci_sessions\") !== FALSE OR strpos( $query, \"last_activity\") !== FALSE ):\n continue;\n endif;\n \n //add to log array only if the query for INSERT, UPDATE or DELETE\n if( strpos( $query, \"INSERT\") !== FALSE OR strpos( $query, \"UPDATE\") !== FALSE OR strpos( $query, \"DELETE\") !== FALSE ):\n $log[] = $query;\n endif;\n endforeach;\n endif;\n \n //if some INSERT, UPDATE or DELETE queries were found, log them\n if( is_array($log) ):\n //change array to json string\n $log = json_encode( $log );\n \n $user_id = $CI->session->userdata('user_id');\n \n //save log to the user_activity_log table\n $CI->load->model('user_model');\n $CI->user_model->log_activity( $CI->session->userdata('user_id'), $log );\n endif;\n }", "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 function getQueries(){\n \treturn $this->_execedQueries;\n }", "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 }", "abstract protected function query_and_clear_cache($sql);", "function optimizeDatabase() {}", "public static function flushQueryLog()\n {\n }", "public function flushQueryLog()\n {\n $this->queryLog = array();\n }", "function devlyQueries() {\n\t\n\techo 'ran ' . get_num_queries() . ' queries in ' . timer_stop(1) . ' seconds';\n\t\n}", "public function query()\n\t{\n\t\treturn false;\n\t}", "public function clearQueries();", "private function collectGarbage() {\n\t\t$query = 'DELETE FROM ' .//'DELETE LOW_PRIORITY FROM ' .\n\t\t\tShelveIt::$query_cache[ 'table' ] .\n\t\t\t' WHERE time < NOW() - ' . ShelveIt::$query_cache[ 'expire' ];\n \n\t\tif( !mysql_unbuffered_query( $query, $this->mysql ) ) {\n die( \"Garbage collect query: $query<br />\" .\n 'Invalid query: ' . mysql_error( $this->mysql ) );\n };\n\t}", "public static function disableQueryLog()\n {\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}", "protected function registerManagedQueries() {\n $table = Model_Charge::TABLE_NAME;\n $query = \"SELECT * FROM $table WHERE user_id = :user_id AND charge_date >= :start_date AND \" .\n \"charge_date <= :end_date ORDER BY charge_date ASC\";\n $this->registerManagedQuery(\"findByUserIdAndChargeDates\", $query, null, self::RETURN_MANY);\n\n $query = \"DELETE FROM $table WHERE charge_id = :charge_id\";\n $this->registerManagedQuery(\"delete\", $query, null, self::RETURN_NONE);\n\n $query = \"SELECT user_id, sum(amount) as total_charges FROM $table WHERE \" .\n \"charge_date >= :start_date AND charge_date <= :end_date GROUP BY user_id\";\n $this->registerManagedQuery(\"findTotalChargesByUserIdForChargeDates\", $query, null, self::RETURN_ARRAY);\n\n $query = \"SELECT * FROM $table ORDER BY create_date DESC LIMIT 10\";\n $this->registerManagedQuery(\"findRecentlyAddedCharges\", $query);\n }", "public function set()\n {\n\tforeach( $this->queue as $operation => $actions)\n\t{\n\t foreach($actions as $key => $action)\n\t {\n\t\tif ( is_array($action->sql))\n\t\t{\n\t\t array_walk($action->sql, array($this, 'query'));\n\t\t}\n\t\telse\n\t\t{\n\t\t $this->query($action->sql);\n\t\t}\n\t }\n\t}\n }", "public function actionDatabaseQueries() {\n echo \"Database Debug Log:\";\n $this->showLog('dbDebug.log');\n }", "public function __construct(){\n DB::enableQueryLog();\n }", "public static function resetQueryCount() {\n \tself::$queryCount = 0;\n }", "function get_num_queries()\n {\n }", "public function get_query_log()\n {\n }", "function sql_query($query) {\n\t\t// Added to log select queries\n\t\tforeach($this->preProcessHookObjects as $preProcessHookObject) { /* @var $preProcessHookObject Tx_SandstormmediaPlumber_Hooks_DbPreProcessHookInterface */\n\t\t\t$preProcessHookObject->sql_query_preProcessAction($query);\n\t\t}\n\n\t\t$pointer = parent::sql_query($query);\n\n\t\t// Added to log select queries\n\t\tforeach($this->postProcessHookObjects as $postProcessHookObject) { /* @var $postProcessHookObject Tx_SandstormmediaPlumber_Hooks_DbPostProcessHookInterface */\n\t\t\t$postProcessHookObject->sql_query_postProcessAction($query);\n\t\t}\n\n\t\treturn $pointer;\n\t}", "function sql_query($query) {\n\t\t// Added to log select queries\n\t\tforeach($this->preProcessHookObjects as $preProcessHookObject) { /* @var $preProcessHookObject Tx_SandstormmediaPlumber_Hooks_DbPreProcessHookInterface */\n\t\t\t$preProcessHookObject->sql_query_preProcessAction($query);\n\t\t}\n\n\t\t$pointer = parent::sql_query($query);\n\n\t\t// Added to log select queries\n\t\tforeach($this->postProcessHookObjects as $postProcessHookObject) { /* @var $postProcessHookObject Tx_SandstormmediaPlumber_Hooks_DbPostProcessHookInterface */\n\t\t\t$postProcessHookObject->sql_query_postProcessAction($query);\n\t\t}\n\n\t\treturn $pointer;\n\t}", "public function executeAll();", "function anva_debug_queries() {\n\tif ( true == WP_DEBUG && current_user_can( 'administrator' ) ) :\n\t?>\n\t\t<div class=\"alert alert-warning text-center\">Page generated in <?php timer_stop(1); ?> seconds with <?php echo get_num_queries(); ?> database queries.</div>\n\t<?php\n\tendif;\n}", "public function getAllQueriesCount(){\n return Db::getQueriesCount();\n }", "private function before_execute()\n {\n }", "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 }", "protected function executeQuery() {\n return array();\n }", "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 static function clear_memory_heavy_variables() {\n\t\tglobal $wpdb, $wp_object_cache;\n\n\t\t$wpdb->queries = [];\n\n\t\tif ( is_object( $wp_object_cache ) ) {\n\t\t\t$wp_object_cache->cache = [];\n\t\t\t$wp_object_cache->group_ops = [];\n\t\t\t$wp_object_cache->memcache_debug = [];\n\t\t}\n\t}", "public function executeAllStrict();", "protected function dbReset() {\r\n $this->query_result = '';\r\n }", "public function __construct()\n {\n DB::enableQueryLog();\n }", "function _clearDBCache() {\n $db =& ConnectionManager::getDataSource($this->useDbConfig);\n $db->_queryCache = array();\n }", "public function flushQuery()\n\t{\n\t\t$this->cur_query = \"\";\n\t}", "public function queries() {\n return $this->queries;\n }", "public function getQueries() {\r\n\t\treturn $this->queries;\r\n\t}", "private function sqlstatements() {\n $this->select = array( );\n $this->insert = array( 'INSERT INTO :entity (xxx) VALUES (yyy)' );\n $this->update = array( );\n $this->delete = array( );\n }", "function addQuery() {}", "public function getQueries()\r\n {\r\n return $this->queries;\r\n }", "function LoadQueries () {\n\t\t\n\t\t$defFile = SQLDIR . 'queries.inc';\n\t\t\n\t\tif (!file_exists($defFile)) {\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\trequire ($defFile);\n\t\treturn 1;\n\t}", "protected function prepareStatements()\n {\n if (!empty($this->statements)) {\n return;\n }\n $this->statements['load'] = $this->db->prepare(\n 'SELECT * FROM `' . $this->options['table'] . '` WHERE `userId` = :userId '\n . 'AND `scope` = :scope AND `name` = :name AND `args` = :args'\n );\n\n $this->statements['save'] = $this->db->prepare(\n 'INSERT INTO `' . $this->options['table'] . '` (`userId`, `scope`, `name`, `args`, `xml`) VALUES '\n . '(:userId, :scope, :name, :args, :xml)'\n );\n\n $this->statements['delete'] = $this->db->prepare(\n 'DELETE FROM`' . $this->options['table'] . '` WHERE `userId` = :userId '\n . 'AND `scope` = :scope AND `name` = :name AND `args` = :args'\n );\n }", "function start_cache()\r\n\t{\r\n\t\t$this->db->start_cache();\r\n\t}", "public function execute()\n {\n if (!$this->sessionSet && $this->platform instanceof MySqlPlatform) {\n $this->connection->exec(\"SET @@SESSION.sql_mode = '';\");\n $this->sessionSet = true;\n }\n\n // Take a local copy so that we don't modify the original query and cause issues later\n $query = $this->replacePrefix((string) $this->sql);\n\n if (!($this->sql instanceof \\JDatabaseQuery) && ($this->limit > 0 || $this->offset > 0)) {\n // @TODO\n if ($this->offset > 0) {\n $query .= ' LIMIT ' . $this->offset . ', ' . $this->limit;\n } else {\n $query .= ' LIMIT ' . $this->limit;\n }\n }\n\n $this->prepared = $this->connection->prepare($query);\n\n // Increment the query counter.\n $this->count++;\n\n // Reset the error values.\n $this->errorNum = 0;\n $this->errorMsg = '';\n $memoryBefore = null;\n\n // If debugging is enabled then let's log the query.\n if ($this->debug) {\n // Add the query to the object queue.\n $this->log[] = $query;\n\n \\JLog::add($query, \\JLog::DEBUG, 'databasequery');\n\n $this->timings[] = microtime(true);\n }\n\n // Execute the query.\n $this->executed = false;\n $previous = null;\n\n if ($this->prepared instanceof Statement) {\n // Bind the variables:\n if ($this->sql instanceof JDatabaseQueryPreparable) {\n $bounded = $this->sql->getBounded();\n\n foreach ($bounded as $key => $obj) {\n $this->prepared->bindParam($key, $obj->value, $obj->dataType, $obj->length, $obj->driverOptions);\n }\n }\n\n try {\n $this->executed = $this->prepared->execute();\n } catch (\\Exception $previous) {\n }\n }\n\n if ($this->debug) {\n $this->timings[] = microtime(true);\n\n if (defined('DEBUG_BACKTRACE_IGNORE_ARGS')) {\n $this->callStacks[] = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);\n } else {\n $this->callStacks[] = debug_backtrace();\n }\n }\n\n // If an error occurred handle it.\n if (!$this->executed) {\n // Get the error number and message before we execute any more queries.\n $errorNum = (int) $this->connection->errorCode();\n $errorMsg = (string) 'SQL: ' . implode(\", \", $this->connection->errorInfo());\n\n // Get the error number and message from before we tried to reconnect.\n $this->errorNum = $errorNum;\n $this->errorMsg = $errorMsg;\n\n // Throw the normal query exception.\n \\JLog::add(\n \\JText::sprintf('JLIB_DATABASE_QUERY_FAILED', $this->errorNum, $this->errorMsg),\n \\JLog::ERROR,\n 'databasequery'\n );\n throw new RuntimeException($this->errorMsg, $this->errorNum, $previous);\n }\n\n return $this->prepared;\n }", "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}", "public function all()\n {\n $sql = $this->get();\n $this->query = $sql;\n }", "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 }", "public function executeOnShutdown()\n {\n \tif ( ! $this->obj['use_shutdown'] )\n \t{\n \t\t$this->is_shutdown \t\t= true;\n \t\treturn $this->execute();\n \t}\n \telse\n \t{\n \t\t$this->obj['shutdown_queries'][] = $this->cur_query;\n \t\t$this->cur_query = \"\";\n \t}\n }", "public function flushQueryLog()\n\t{\n\t\t$this->neoeloquent->flushQueryLog();\n\t}", "function query() {\n $this->add_additional_fields();\n }", "private function loadQueries() {\n $queries = $query_ids = array();\n $tmp_qs = $this->em->getRepository(Query::class)->findAll();\n /**\n * @var Query $q\n */\n foreach ($tmp_qs as $q) {\n array_push($queries, $q->getQuery());\n array_push($query_ids, $q->getQuery_Id());\n }\n unset($tmp_qs);\n return array('queries' => $queries, 'query_ids' => $query_ids);\n }", "private function initCurrentlyBeingDone() {\n global $wpdb;\n $tableUrls = Factory::databaseService()->getDbTableUrlsName();\n\n // URLs currently being crawled\n $resultsBeingCrawled = $wpdb->get_results(\"SELECT * FROM {$tableUrls}\n WHERE is_locked = TRUE\n AND saved_at IS NULL\n AND saved_post_id IS NULL\n AND recrawled_at IS NULL\n ORDER BY created_at ASC\n \");\n\n $this->urlsCurrentlyBeingCrawled = $this->addSiteDataToUrlTuples($resultsBeingCrawled);\n\n // Posts currently being recrawled\n $resultsBeingRecrawled = $wpdb->get_results(\"SELECT * FROM {$tableUrls}\n WHERE is_locked = TRUE\n AND saved_at IS NOT NULL\n AND saved_post_id IS NOT NULL\n ORDER BY updated_at ASC\n \");\n\n $this->postsCurrentlyBeingSaved = $this->getPostsFromUrlTuples($resultsBeingRecrawled);\n }", "public function getQueries()\n {\n return $this->queries;\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 static function getQueryLog()\n {\n }", "private function initQuery()\n {\n // reset\n $this->result = false;\n \n $this->errorCode = 0;\n $this->errorMessage = '';\n }", "public function query()\n\t{\n\t\t\n\t}", "function execute($sql) {\n\t\t$result = parent::execute($sql);\n\t\t$this->_queryStats = array();\n\t\treturn $result;\n\t}", "private function reset_internal() {\n\t\t$this->started = false;\n\t\t$this->failed = false;\n\t\t$this->querys = array();\n\t\t$this->querys_info = array();\n\t\t$this->querys_info['exec_times'] = array();\n\t\t$this->querys_info['explain_results'] = array();\n\t}", "protected function loadSubQueries()\n {\n foreach ($this->subQueries as $subQuery) {\n $subQuery($this->tableQuery);\n }\n }", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM cst_hit';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "function flush()\n\t\t{\n\t\t\t// Get rid of these\n\t\t\t$this->last_result = null;\n\t\t\t$this->col_info = null;\n\t\t\t$this->last_query = null;\n\t\t\t$this->from_disk_cache = false;\n $this->setParamaters();\n\t\t}", "private function installQueries() {\n $statement = array(\n 'create_pull_table' =>\n sprintf(\n 'CREATE TABLE %s (\n `pull_id` INT NOT NULL,\n `user` TEXT NOT NULL,\n `title` TEXT NOT NULL,\n `body` TEXT NOT NULL,\n `url` TEXT NOT NULL,\n `comments` INT DEFAULT 0,\n `created_at` DATETIME NOT NULL,\n PRIMARY KEY (`pull_id`)\n ) ENGINE=MyISAM;',\n Config::getTableName('requests')),\n\n 'create_user_table' =>\n sprintf('\n CREATE TABLE %s (\n `user_login` TEXT NOT NULL,\n `user_real_name` TEXT,\n `gravatar_id` TEXT,\n `blog` TEXT,\n PRIMARY KEY (`user_login`(64))\n ) ENGINE=MyISAM;',\n Config::getTableName('users'))\n );\n\n $prepared_statements = array();\n foreach ($statement as $key=>$value) {\n $prepared_statements[$key] = $this->db->prepare($value);\n }\n\n return $prepared_statements;\n }", "function flush(){\n\t\t$this->last_result = array();\n\t\t$this->col_info = null;\n\t\t$this->last_query = null;\n\t}", "public function run_offline()\r\n\t{\r\n\t\t$ids = wpl_request::getVar('rets_query_ids');\r\n\r\n\t\t$query = \"SELECT * FROM `#__wpl_addon_mls_queries` WHERE `enabled`>='1'\";\r\n\t\tif(is_numeric(str_replace(',', '', $ids))) $query .= \" AND `id` IN ({$ids})\";\r\n\r\n\t\t$mls_queries = wpl_db::select($query);\r\n\t\t$rets_objects = array();\r\n\t\t$connection = 0;\r\n \r\n\t\tforeach($mls_queries as $mls_query)\r\n\t\t{\r\n\t\t\t$ids = wpl_db::select(\"SELECT `unique_value` FROM `#__wpl_addon_mls_data` WHERE `mls_query_id` = '{$mls_query->id}'\", 'loadColumn');\r\n\r\n\t\t\t/** load rets object **/\r\n\t\t\tif($rets_objects[$mls_query->mls_server_id]) $wplrets = $rets_objects[$mls_query->mls_server_id];\r\n\t\t\telse $wplrets = new wpl_addon_mls($mls_query->mls_server_id);\r\n\t\t\t\r\n\t\t\tif(trim($wplrets->mls_server_data->mls_unique_field) == '') continue;\r\n\t\t\t\r\n\t\t\t/** set to rets objects **/\r\n\t\t\t$rets_objects[$mls_query->mls_server_id] = $wplrets;\r\n\t\t\t\r\n\t\t\t/** connect **/\r\n\t\t\tif(!$connection) $connection = $wplrets->connect();\r\n\t\t\t\r\n if(!empty($mls_query->selects)) $options = array('Count'=>1, 'Offset'=>$mls_query->offset, 'Select'=>$mls_query->selects);\r\n else $options = array('Count'=>1, 'Offset'=>$mls_query->offset);\r\n \r\n\t\t\t$today = date('Y-m-d H:i:s');\r\n\t\t\t\r\n\t\t\t/** set query **/\r\n\t\t\t$mls_query_string = $mls_query->query;\r\n\t\t\t$date = ($mls_query->last_sync_date == '0000-00-00' ? date('1950-01-01') : $mls_query->last_sync_date);\r\n $date2 = date('Y-m-d', strtotime('+'.$mls_query->sync_period.' day', strtotime($date)));\r\n\t\t\t\r\n if(stristr($mls_query_string, 'date+s'))\r\n {\r\n if($date2 > $today) continue;\r\n \r\n $mls_query_string = str_replace('date+s', $date.'-'.$date2, $mls_query_string);\r\n $today = date('Y-m-d H:i:s', strtotime($date2));\r\n }\r\n else $mls_query_string = str_replace('date+', $date.'+', $mls_query_string);\r\n\r\n\t\t\t$search = $wplrets->rets->SearchQuery($wplrets->mls_server_data->resource, $mls_query->mls_class_id, $mls_query_string, $options);\r\n\t\t\t$count = $wplrets->rets->TotalRecordsFound();\r\n\t\t\t\r\n\t\t\tif($wplrets->rets->Error() and false === stristr($mls_query->query, 'date+s')) print_r($wplrets->rets->Error());\r\n\t\t\tif(!$count and false === stristr($mls_query->query, 'date+s'))\r\n\t\t\t{\r\n\t\t\t\tself::mls_query_is_done($mls_query->id, $today);\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\t$num = 0;\r\n\t\t\twhile($row = $wplrets->rets->FetchRow($search)) \r\n\t\t\t{\r\n\t\t\t\t$unique_value = $row[$wplrets->mls_server_data->mls_unique_field];\r\n\t\t\t\t$data = base64_encode(json_encode($row));\r\n\t\t\t\t\r\n\t\t\t\tif(in_array($unique_value, $ids))\r\n\t\t\t\t\twpl_db::q(\"UPDATE `#__wpl_addon_mls_data` SET `content` = '{$data}', `date` = '{$today}', `imported` = 0 WHERE `unique_value` = '{$unique_value}' AND `mls_query_id` = '{$mls_query->id}'\");\r\n\t\t\t\telse\r\n\t\t\t\t\twpl_db::q(\"INSERT INTO `#__wpl_addon_mls_data` (`mls_query_id`, `unique_value`, `content`, `date`) VALUES ('{$mls_query->id}', '{$unique_value}', '{$data}', '{$today}')\");\r\n\r\n\t\t\t\t$ids[] = $unique_value;\r\n\t\t\t\t$num++;\r\n\t\t\t}\r\n\t\t\t$wplrets->rets->FreeResult($search);\r\n\t\t\t\r\n\t\t\t/** update **/\r\n\t\t\tif($count <= $num) self::mls_query_is_done($mls_query->id, $today);\r\n\t\t\telse self::update_query($mls_query->id, ($mls_query->offset+$num));\r\n\t\t\t\r\n\t\t\t// Remove Expired Listings\r\n\t\t\t$offset_checked = 0;\r\n \r\n\t\t\tif(stristr($mls_query->query, 'date+s')) $mls_query_fetch_listings = str_replace('date+s', '1950-01-01+', $mls_query->query);\r\n\t\t\telse $mls_query_fetch_listings = str_replace('date+', '1950-01-01+', $mls_query->query);\r\n \r\n\t\t\t$result = self::fetch_class_listings($wplrets, $mls_query->mls_class_id, $mls_query_fetch_listings, $offset_checked);\r\n\t\t\t$wpl_unique_field = wpl_addon_mls::get_wpl_unique_field($mls_query->id,$mls_query->mls_server_id);\r\n\r\n\t\t\tif(count($result) < $count)\r\n\t\t\t{\r\n\t\t\t\t$offset = 0;\r\n\t\t\t\twhile(count($result) > $offset and count($result) < $count)\r\n\t\t\t\t{\r\n\t\t\t\t\t$offset = count($result);\r\n\t\t\t\t\t$second_array = self::fetch_class_listings($wplrets, $mls_query->mls_class_id, $mls_query_fetch_listings, 1, $offset);\r\n\t\t\t\t\t$result = array_merge($result, $second_array);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(count($result) > 0)\r\n\t\t\t{\r\n\t\t\t\t$result = implode(\"','\", $result);\r\n\r\n\t\t\t\t$where = \"WHERE `mls_query_id`='\".$mls_query->id.\"' AND `\".$wpl_unique_field['table_column'].\"` NOT IN('{$result}');\";\r\n\t\t\t\t$query_delete = \"SELECT `id` from `#__wpl_properties` \".$where;\r\n\t\t\t\t$expired_properties = wpl_db::select($query_delete);\r\n\t\t\t\t\r\n\t\t\t\tforeach($expired_properties as $expired_property) wpl_property::purge($expired_property->id);\r\n\t\t\t\twpl_db::delete('wpl_addon_mls_data', '', \"AND `mls_query_id` = '{$mls_query->id}' AND `unique_value` NOT IN('{$result}')\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t/** Disconnect **/\r\n\t\tif(isset($wplrets)) $wplrets->rets->Disconnect();\r\n \r\n /** Delete expired temporary directories **/\r\n wpl_global::delete_expired_tmp();\r\n \r\n /** cPanel cronjob **/\r\n if(wpl_request::getVar('rets_cron_job') == 1) exit;\r\n\t}", "public function flushQuery();", "public static function query()\n {\n }", "public function DBCleaner()\n\t{\n\t\tif (!(rush_hour()))\n\t\t{\n\t\t\t$result=query('SELECT * FROM server');\n\t\t\t$row=mysql_fetch_assoc($result);\n\t\t\tif ((!$row['swapping_map'])&&(!$row['swapping_user']))\n\t\t\t\t$this->clean_db();\n\t\t}\n\t}", "function query() {\n }", "public function getQueries()\n {\n if ($this->debug === FALSE) {\n throw new Exception(\"Debug mode is turned off\");\n }\n \n return $this->queries;\n }", "public function _query()\n {\n }", "function optimize_database()\n\n\t{//12022007 - method added\n\n\t\t$qry = \"show table status from \" . $GLOBALS['db_con_obj']->dbname;\n\n\t\t$res = $this->execute_sql($qry);\n\n\n\n\t\twhile($data = mysql_fetch_array($res[0]))\n\n\t\t{\n\n\t\t\t$q = \"optimize table \" . $data[0];\n\n\t\t\t$this->execute_sql($q);\n\n\t\t}\n\n\t}", "protected function execute_single_query(){\n\t\t$this -> open_connection();\n\t\t$this -> conn -> query($this -> query);\n\t\t$this -> close_connection();\n\t}", "public function setup() {\n\t\tparent::setup();\n\t\tincrease_time_limit_to();\n\n\t\t$restart = $this->currentStep == 0;\n\n\t\tif ($restart) {\n\t\t\t$this->pagesToProcess = DB::query('SELECT \"ID\" FROM SiteTree_Live WHERE ShowInSearch=1')->column();\n\t\t}\n\t}", "public function refresh(): void\n {\n $this->query('SELECT 1')->execute();\n }", "public function __invoke()\n {\n $this->execute();\n }", "function flush()\n\t\t{\n\t\t\t// Get rid of these\n\t\t\t$this->last_result = null;\n\t\t\t$this->col_info = null;\n\t\t\t$this->last_query = null;\n\t\t\t$this->from_disk_cache = false;\n\t\t}", "public static function getQueriesExecute() {\n\t\t$ip_allow = json_decode(file_get_contents(BASE_PATH . '/ip_allow.json'), true);\n\n\t\tif(in_array($_SERVER['REMOTE_ADDR'], $ip_allow)) {\n\t\t\t// Get query and sort query by time desc\n\t\t\t$queries = DB::getQueryLog();\n\t\t\tusort($queries, function($a, $b) {\n\t\t\t\treturn $a['time'] > $b['time'] ? -1 : 1;\n\t\t\t});\n\n\t\t\t// Generate HTML table\n\t\t\t$htmlTableBody = '';\n\t\t\t$htmlTimeLoadPage = '';\n\t\t\t$no = 0;\n\t\t\tforeach($queries as $key => $query) {\n\t\t\t\tif(!isset($query['file'])) $query['file'] = null;\n\t\t\t\tif(!isset($query['line'])) $query['line'] = null;\n\t\t\t\t$htmlTableBody .= '\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>'. ($no+1) .'</td>\n\t\t\t\t\t\t<td>'. $query['query'] .'</td>\n\t\t\t\t\t\t<td>'. $query['time'] .'</td>\n\t\t\t\t\t\t<td>'. $query['file'] .'</td>\n\t\t\t\t\t\t<td>'. $query['line'] .'</td>\n\t\t\t\t\t</tr>\n\t\t\t\t';\n\t\t\t\t$no ++;\n\t\t\t}\n\n\t\t\treturn '\n\t\t\t<table class=\"table table-hover table-stripped table-bordered\">\n\t\t\t\t<thead>\n\t\t\t\t\t<th>STT</th>\n\t\t\t\t\t<th>Query</th>\n\t\t\t\t\t<th>Time</th>\n\t\t\t\t\t<th>File</th>\n\t\t\t\t\t<th>Line</th>\n\t\t\t\t</thead>\n\t\t\t\t<tbody>'. $htmlTableBody .'</tbody>\n\t\t\t</table>';\n\t\t}\n\t}", "function query() {}", "public function executeFull()\n {\n $this->execute([]);\n }", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();" ]
[ "0.6956049", "0.6832898", "0.66475844", "0.6428341", "0.64094657", "0.6400613", "0.6352814", "0.6351529", "0.6307424", "0.6256685", "0.6188031", "0.6184426", "0.61808294", "0.6164062", "0.60676956", "0.6030711", "0.6027162", "0.6025277", "0.600921", "0.60076326", "0.600492", "0.594175", "0.59348524", "0.592328", "0.59222007", "0.59134835", "0.5902686", "0.5886584", "0.58831954", "0.58572173", "0.5852176", "0.58362705", "0.5823779", "0.5808316", "0.5808316", "0.5804931", "0.5799758", "0.5784602", "0.57711476", "0.5765658", "0.57648414", "0.5737746", "0.57191974", "0.57174665", "0.5714755", "0.5711844", "0.57064044", "0.5696544", "0.56850684", "0.56814533", "0.56775486", "0.56748277", "0.56537306", "0.56486696", "0.5641596", "0.5638309", "0.5637979", "0.56193185", "0.55941653", "0.55874425", "0.55827546", "0.557685", "0.5572322", "0.5571896", "0.55687344", "0.5565329", "0.555185", "0.5548355", "0.5542097", "0.55401516", "0.55330384", "0.55221015", "0.55160105", "0.5501005", "0.5500801", "0.5497044", "0.5494716", "0.5489302", "0.5488348", "0.5484542", "0.54654497", "0.54601514", "0.5451895", "0.5449005", "0.54430586", "0.544265", "0.54296273", "0.5424484", "0.5419661", "0.5419475", "0.5419238", "0.54150206", "0.54067194", "0.5404605", "0.5404605", "0.5404605", "0.5404605", "0.5404605", "0.5404605", "0.5404605", "0.5404605" ]
0.0
-1
/ Methods used for getting the properties of this class.
public function getController() { return $this->controller; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getProperties() {}", "public function getProperties() {}", "public function getProperties() {}", "public function getProperties() {}", "public function getProperties();", "public function getProperties();", "public function getProperties();", "public function getProperties();", "function get_properties()\r\n {\r\n return $this->properties;\r\n }", "abstract public function getProperties();", "abstract protected function getProperties();", "public function properties()\n\t{\n\t\treturn $this->properties;\n\t}", "public function getProperties()\r\n\t{\r\n\t\treturn $this->_properties;\r\n\t}", "public function get_properties()\r\n\t{\r\n\t\treturn get_object_vars($this);\r\n\t}", "abstract protected function get_properties();", "public function getProperties()\n\t{\n\t\treturn $this->_properties;\n\t}", "public static function getProperties()\n\t\t{\n\t\t\treturn self::$properties;\n\t\t}", "public function _getProperties() {}", "public function getProperties()\n {\n return $this->properties;\n }", "public function getProperties()\n {\n return $this->properties;\n }", "public function getProperties()\n {\n return $this->properties;\n }", "public function getProperties()\n {\n return $this->properties;\n }", "public function getProperties()\n {\n return $this->properties;\n }", "public function getProperties()\n {\n return $this->properties;\n }", "public function getProperties()\n {\n return $this->properties;\n }", "public function getProperties()\n {\n return $this->properties;\n }", "public function getProperties()\n {\n return $this->properties;\n }", "public function getProperties()\n {\n return $this->properties;\n }", "public function getProperties()\n {\n return $this->properties;\n }", "public function getProperties()\n {\n return $this->properties;\n }", "public function getProperties() {\n\t\treturn $this->_properties;\n\t}", "public function getProperties()\n {\n return $this->getProperty();\n }", "public function getProperties()\n {\n return $this->_propDict;\n }", "public function getProperties()\n {\n return $this->_propDict;\n }", "public static function getProperties()\n {\n return static::$properties;\n }", "function _getProperties() ;", "public function getProperties()\n {\n return get_object_vars($this);\n }", "function properties()\n {\n }", "public function properties() { }", "abstract protected function properties();", "public function getProperties() {\n return array_keys($this->_properties);\n }", "public function getProperties() : array;", "public static function getProperties() : array {\r\n return self::$properties;\r\n }", "public function properties()\r\n {\r\n $props = $this->class->getProperties();\r\n \r\n sort( $props );\r\n \r\n foreach ( $props as $key => $property )\r\n {\r\n // Only show public properties, because Reflection can't get the private ones\n if ( $property->isPublic() )\r\n {\r\n $props[$key] = new Docs_Property( $this->class->name, $property->name );\r\n }\r\n else\r\n {\r\n unset( $props[$key] );\r\n }\r\n }\r\n \r\n return $props;\r\n }", "public function getProperties(): array;", "public function getProperties(): array;", "public function getProperties(): array\n {\n return $this->properties;\n }", "protected function properties(){\n //return get_object_vars($this);\n $properties = array();\n //foreach(self::$db_table_fields as $db_field){\n foreach(static::$db_table_fields as $db_field){\n if(property_exists($this, $db_field)){\n \n $properties[$db_field] = $this->$db_field;\n }\n }\n return $properties;\n\n }", "abstract public function getJsProperties();", "public function getProperties()\n {\n return array_keys($this->toArray());\n }", "public function getProperties() {\n if (is_array($this->_props)) {\n return $this->_props;\n } else {\n return array();\n }\n }", "public function getProperties(): array {\n\t\treturn array_keys($this->properties);\n\t}", "public function props()\n\t{\n\t\treturn $this->props;\n\t}", "public function properties() : array\n {\n return array_keys($this->_properties);\n }", "public function properties()\n {\n // Fetch all properties existing in the database\n $properties = Property::all();\n\n // return list of properties;\n return $properties;\n\n }", "public function getProperties(): array\n {\n return array_keys(get_object_vars($this));\n }", "protected function properties()\n {\n // return get_object_vars($this);\n\n $properties = array();\n foreach (self::$db_table_fields as $db_field) {\n if (property_exists($this, $db_field)) {\n $properties[$db_field] = $this->$db_field;\n }\n }\n\n return $properties;\n }", "protected function properties()\n {\n // return get_object_vars($this);\n\n $properties = array();\n foreach (self::$db_table_fields as $db_field) {\n if (property_exists($this, $db_field)) {\n $properties[$db_field] = $this->$db_field;\n }\n }\n\n return $properties;\n }", "public function properties() {\n return array_keys($this->propertyDefs());\n }", "public function getAllProperties(): array\n {\n return get_object_vars($this);\n }", "protected function properties(){\n\t\t$properties = array();\n\t\tforeach(static::$db_table_fields as $db_field){\n\t\t\tif(property_exists($this,$db_field)){\n\t\t\t$properties[$db_field]= $this->$db_field;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $properties;\t\n\t}", "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 }", "function getProperties($properties);", "public function propertyInfo() {\n return entity_get_property_info($this->entityType);\n }", "public static function getProperties()\n {\n return [\n 'Type' => [false, self::PROPERTY_TYPE_ENUM, null, false, false],\n 'Name' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'ABN' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'BSB' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'AccountNumber' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'AccountName' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'ElectronicServiceAddress' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'SuperFundID' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'EmployerNumber' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'SPIN' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\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 getProperties()\n {\n $class = get_called_class();\n $reflection = new \\ReflectionClass($class);\n $members = array_keys($reflection->getdefaultProperties());\n return $members;\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 function getProperties(): PropertyCollection;", "protected function properties(){\n\n // Here we are making an array, we are looping through the table to see if the fields in the table exist, if so. It is being stored into array \n $properties = array();\n foreach (static::$table_users_field as $users_field) {\n if(property_exists($this,$users_field)){\n $properties[$users_field] = $this->$users_field;\n }\n }\n\n return $properties;\n }", "public function getProperties() {\n if ($this->properties === null) {\n // try to get from cache\n $cacheKey = \"document_properties_\" . $this->getId();\n $properties = Cache::load($cacheKey);\n if (!is_array($properties)) {\n $properties = $this->getResource()->getProperties();\n $elementCacheTag = $this->getCacheTag();\n $cacheTags = array(\"document_properties\" => \"document_properties\", $elementCacheTag => $elementCacheTag);\n Cache::save($properties, $cacheKey, $cacheTags);\n }\n\n $this->setProperties($properties);\n }\n return $this->properties;\n }", "public function getAProperties()\n {\n return isset($this->aProperties) ? $this->aProperties : null;\n }", "public function getProperty();", "public function getPropertiesList() : array;", "public function getRequiredProperties();", "protected function getPublicProperties() {\n\t\t$getPublicProperties = function($obj) { return get_object_vars($obj); };\n\t\treturn $getPublicProperties($this);\n\t}", "private function getProperties(){\n\n\n\t\t$props = get_post_meta(\n\t\t\t$this->post_id,\n\t\t\t'_column_props_'.$this->fullId,\n\t\t\ttrue\n\t\t);\n\n\n\n\t\t$defaults = $this->getDefaultColumnArgs();\n\t\t$props = wp_parse_args( $props, $defaults );\n\n\t\t$this->properties = $props;\n\n\t}", "public static function getProperties()\n {\n return [\n 'NumberOfUnits' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'PayPeriodEndDate' => [false, self::PROPERTY_TYPE_DATE, '\\\\DateTimeInterface', false, false],\n 'PayPeriodStartDate' => [false, self::PROPERTY_TYPE_DATE, '\\\\DateTimeInterface', false, false],\n 'LeavePeriodStatus' => [false, self::PROPERTY_TYPE_ENUM, null, false, false],\n ];\n }", "public function visibleProperties()\n {\n return array_keys($this->_properties);\n }", "public function getProperties(): array\n {\n return $this->getParam('properties');\n }", "public static function getters();", "public function getMyProperties(){\n return new PersonProperties($this->getContext(),$this->getResourcePath(),\"getmyproperties\");\n }", "public function get_properties(): array {\n\t\t$properties = array();\n\n\t\tforeach ( $this->properties as $key => $property ) {\n\t\t\tif ( self::REF__KEY === $key ) {\n\t\t\t\t$properties = array_merge( $properties, $property->get_properties() );\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$properties[ $key ] = $property;\n\t\t}\n\n\t\treturn $properties;\n\t}", "public function getState()\n {\n return $this->properties;\n }", "public function getData(){\n return $this->props;\n }", "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 getProperties()\n {\n $unitMultiple = 1024 * 1024;\n\n $info = [\n 'version' => null,\n 'engine' => null,\n 'dbsize' => 0,\n 'rows' => 0,\n 'datafree' => 0,\n 'indexsize' => 0\n ];\n /*\n * Get Version\n */\n if ($res = $this->query(\"SELECT VERSION() AS mysql_version\")) {\n $row = $res->fetch();\n $info['version'] = $row['mysql_version'];\n if ($dbResult = $this->query(\"SHOW TABLE STATUS FROM `\" . $this->dsn['database'] . \"`\")) {\n while ($data = $dbResult->fetch()) {\n $info['dbsize'] += $data['Data_length'] + $data['Index_length'];\n $info['indexsize'] += $data['Index_length'];\n $info['rows'] += $data['Rows'];\n $info['datafree'] += $data['Data_free'];\n }\n $dbResult->closeCursor();\n }\n foreach ($info as $key => $value) {\n if ($key != \"rows\" && $key != \"version\" && $key != \"engine\") {\n $info[$key] = round($value / $unitMultiple, 2);\n }\n if ($key == \"version\") {\n $tab = explode('-', $value);\n $info[\"version\"] = $tab[0];\n $info[\"engine\"] = $tab[1];\n }\n }\n }\n return $info;\n }", "function displayProperties ()\n {\n foreach ($this as $key => $property)\n {\n echo $key . ':' . $property . '<br>';\n }\n }", "public function getReferenceProperties() {}", "public function viewProperties()\n\t{\n\t\tif (!empty($this->_userdata)) {\n\t\t\treturn array_keys($this->_userdata);\n\t\t}\n\t}", "abstract protected function getToStringProperties();", "protected function retrievableProperties()\n {\n $properties = array(\n// 'Addresses', //\tSubscriberAddress[]\tIndicates addresses belonging to a subscriber.\n// 'Attributes', //\tAttribute[]\tSpecifies attributes associated with an object.\n// 'Client', //\tClientID\tSpecifies the account ownership and context of an object.\n// 'CorrelationID', //\txsd:string\tIdentifies correlation of objects across several requests.\n 'CreatedDate', //\txsd:dateTime\tRead-only date and time of the object's creation.\n// 'CustomerKey', //\txsd:string\tUser-supplied unique identifier for an object within an object type.\n 'EmailAddress', //\txsd:string\tContains the email address for a subscriber. Indicates the data extension field contains email address data.\n 'EmailTypePreference', //\tEmailType\tThe format in which email should be sent\n// 'GlobalUnsubscribeCategory', //\tGlobalUnsubscribeCategory\tIndicates how the application handles a globally unsubscribed subscriber.\n 'ID', //\txsd:int\tRead-only legacy identifier for an object. Not supported on all objects.\n// 'Lists', //\tSubscriberList[]\tDefines lists a subscriber resides on.\n// 'Locale', //\tLocale\tContains the locale information for an Account.\n// 'ModifiedDate', //\tNullable`1\tLast time object information was modified.\n// 'ObjectID', //\txsd:string\tSystem-controlled, read-only text string identifier for object.\n// 'ObjectState', //\txsd:string\tReserved for future use.\n// 'Owner', //\tOwner\tDescribes account ownership of subscriber in an on-your-behalf account.\n 'PartnerKey', //\txsd:string\tUnique identifier provided by partner for an object, accessible only via API.\n// 'PartnerProperties', //\tAPIProperty[]\tA collection of metadata supplied by client and stored by system - only accessible via API.\n// 'PartnerType', //\txsd:string\tDefines partner associated with a subscriber.\n// 'PrimaryEmailAddress', //\tEmailAddress\tIndicates primary email address for a subscriber.\n// 'PrimarySMSAddress', //\tSMSAddress\tIndicates primary SMS address for a subscriber.\n// 'PrimarySMSPublicationStatus', //\tSubscriberAddressStatus\tIndicates the subscriber's modality status.\n 'Status', //\tSubscriberStatus\tDefines status of object. Status of an address.\n 'SubscriberKey', //\txsd:string\tIdentification of a specific subscriber.\n// 'SubscriberTypeDefinition', //\tSubscriberTypeDefinition\tSpecifies if a subscriber resides in an integration, such as Salesforce or Microsoft Dynamics CRM\n 'UnsubscribedDate'\n );\n\n return $properties;\n }", "public function getPropertiesDescription(): static\n {\n foreach ($this->attributes as $class => $methods) {\n $reflectionMethod = new ReflectionClass($class);\n foreach ($reflectionMethod->getProperties() as $property) {\n $attributes = $this->getAttributesDescription($property);\n if (count($attributes) > 0) {\n $this->attributes[$class]['properties'][$property->getName()] = $attributes;\n }\n }\n }\n\n return $this;\n }", "public function getPropertyDetails(){\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance ();\n return $objectManager->get ( 'Apptha\\Airhotels\\Model\\Attributes' );\n }", "public function getProperty() {\n return $this->property;\n }", "public function Properties($visible=true){\r\n $reflection=new ReflectionClass($this);\r\n $properties=$reflection->getProperties();\r\n $result=array();\r\n if($visible){\r\n foreach ($properties as $property) {\r\n $result[$property->getName()]=$property->getValue($this);\r\n }\r\n }\r\n else{\r\n foreach ($properties as $property) {\r\n $result[]=$property->getName();\r\n }\r\n }\r\n return $result;\r\n }", "public function getSourceProperties()\n {\n return $this->source_properties;\n }", "protected function property_map() { return array(); }", "private function getProperties($className)\n {\n $classInfos = $this->getClassInfos($className);\n\n return $classInfos->{'hydra:supportedProperty'} ?? [];\n }", "public function attributes(){\r\n /*\r\n $attributes = array();\r\n foreach(self::$db_fields as $field){\r\n if(property_exists($this, $field)){\r\n\t $attributes[$field] = $this->$field;\r\n\t }\r\n }\r\n return $attributes;\r\n */\r\n \r\n //return get_object_vars($this);\r\n return $this->variables;\r\n }", "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}" ]
[ "0.87147427", "0.87145287", "0.87145287", "0.87145287", "0.86497045", "0.86497045", "0.86497045", "0.86497045", "0.8599027", "0.8508741", "0.8414333", "0.8352769", "0.83006334", "0.828508", "0.82735753", "0.82617146", "0.8240456", "0.8232146", "0.8224533", "0.8224533", "0.8224533", "0.8224533", "0.8224533", "0.8224533", "0.8224533", "0.8224533", "0.8224533", "0.8224533", "0.8224533", "0.8224533", "0.82212555", "0.82144165", "0.81155735", "0.81155735", "0.8114077", "0.8108406", "0.8095967", "0.79563516", "0.7918995", "0.78904366", "0.78200674", "0.7788358", "0.77365315", "0.76368934", "0.76012665", "0.76012665", "0.755975", "0.7514537", "0.75026685", "0.7491936", "0.7481853", "0.74729186", "0.74676156", "0.74395", "0.74219346", "0.74207115", "0.7391117", "0.7391117", "0.7384663", "0.7216982", "0.72069067", "0.7194681", "0.7165163", "0.71532255", "0.71076983", "0.7085696", "0.7082139", "0.7046842", "0.7029626", "0.70043606", "0.70031476", "0.69756114", "0.69440556", "0.69348925", "0.6921666", "0.6921", "0.69067085", "0.6898375", "0.68837076", "0.6871468", "0.6864927", "0.68210596", "0.67622876", "0.67552924", "0.6742954", "0.67378557", "0.67353576", "0.671215", "0.6710373", "0.6696846", "0.6692886", "0.6692767", "0.6686935", "0.6672748", "0.6669466", "0.6664186", "0.66446376", "0.6632185", "0.6603623", "0.65846163", "0.65839386" ]
0.0
-1
It handles the request from chain class
abstract public function handleRequest($request);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _request() {}", "protected abstract function handleRequest();", "abstract public function handle_request();", "public function handleRequest() {}", "protected function forwardToReferringRequest() {}", "private function requestProcessor() {\n try {\n\n if (empty($this->uri))\n throw new \\Exception(\"Undefined url\");\n\n $ReqHandle = curl_init($this->uri);\n\n $body = json_encode([]);\n if( sizeof($this->data) > 0 )\n $body = json_encode($this->data);\n\n $returnTransfer = 0;\n if( $this->hasResponseToReturn )\n $returnTransfer = 1;\n\n $isPost = 0;\n if( $this->method != 'GET')\n $isPost = 1;\n\n\n if($isPost == 1){\n curl_setopt($ReqHandle,CURLOPT_POST, $isPost);\n curl_setopt($ReqHandle, CURLOPT_POSTFIELDS, $body);\n }\n \n curl_setopt_array($ReqHandle, [\n CURLOPT_RETURNTRANSFER => $returnTransfer,\n CURLOPT_HTTPHEADER => $this->headersToBeUsed\n ]);\n\n\n $result = curl_exec($ReqHandle);\n\n if(curl_errno($ReqHandle)){\n\n return curl_error($ReqHandle);\n }\n\n if($returnTransfer == 1)\n return json_decode($result);\n\n\n\n } catch (\\Throwable $t) {\n new ErrorTracer($t);\n }\n }", "abstract public function request();", "public function handleRequest();", "public function handleRequest();", "public function handleRequest();", "abstract public function processRequest();", "public function processRequest();", "public abstract function processRequest();", "function handleRequest() ;", "public function chain()\n {\n $response = SubstrateBase::APIHandler('system_'.__FUNCTION__);\n $this->_chain = $response['result'];\n return response()->json($this->_chain);\n }", "public function request()\n {\n }", "public function request()\n {\n }", "public static function process_http_request()\n {\n }", "public function request();", "public function DispatchRequest ();", "abstract protected function process(Request $request);", "public function process_request() {\n if(!empty($this->POST)) {\n return $this->handlePOST();\n } else {\n return $this->handleGET();\n }\n }", "public function runRequest() {\n }", "public function HTTPRequest(){\n\t}", "public function doRequests();", "public function & GetRequest ();", "private function invoke() {\n global $user;\n $req =& $this->request;\n try {\n\n if ($req) {\n if (isset($req->uri) && preg_match(\"/^([^\\?]*)(\\?(.*))?$/\", $req->uri, $match)) {\n $this->q = $match[1];\n parse_str($match[3], $_GET);\n }\n }\n \n if (isset($req) && !is_object($req))\n throw new Exception(\"Invalid Request.\", -32600);\n \n \n if (!preg_match(\"/^(?:(\\D\\w*)[\\.\\/])?(\\D\\w*)\\/?(.*)$/\", $this->q, $match))\n throw new Exception(\"Invalid Request.\", -32600);\n \n list(, $c, $m, $a) = $match;\n \n\t\t\n\t\t//if (!$c)\n\t\t//\t$c = jsonrpc_load_class_by_method($m, TRUE);\n \n\n\t\t\n \n if (!($c && class_exists($c, FALSE))) {\n $c = jsonrpc_load_class($c, $m, TRUE);\n }\n \n if (isset($a) && is_string($a) && FALSE !== strpos($a, ','))\n $a = explode(',', $a);\n if (isset($_GET['id']))\n $req->id = $_GET['id'];\n $is_super = $user->uid == 1;\n if ($user->uid == 0 && $_SERVER['REMOTE_ADDR'] == '127.0.0.1' && !isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n $is_super = TRUE;\n $user->uid = 1;\n }\n \n //echo $c;\n \n if (!method_exists($c, $m))\n throw new Exception('Method does not exists.', -32601);\n if (variable_get('site_offline', 0) && !$is_super)\n throw new Exception('Site if offline');\n $refl = new ReflectionMethod($c, $m);\n \n\t//$args = array();\n \n if (!isset($req->params)) {\n if ($a)\n $args = $a;\n elseif (isset($_GET['params']))\n $args = explode(',', $_GET['params']);\n elseif (isset($_GET['param']))\n $args = explode(',', $_GET['param']);\n }\n else\n $args = $req->params;\n \n //if(!is_array($args))\n \t\n\n\t//var_dump(count($args) <= $refl->getNumberOfParameters());\n\n //if ($refl->getNumberOfRequiredParameters() <= 1 && is_array($args) && count($args) > $refl->getNumberOfParameters() )\n \n //if($refl->getNumberOfRequiredParameters\n \n $np = $refl->getNumberOfParameters();\n $nr = $refl->getNumberOfRequiredParameters();\n\n\t\t//if ($np == 1 && count($args)\n//var_dump($args);\n//die;\n \n \n \n if ($nr <= 1 && !(is_array($args) && count($args) == $np && $np > 1 ) && isset($req->params))\n $args = array($args);\n\n\n//var_dump($args);\n\n switch (TRUE) {\n case $refl->isStatic():\n $req->result = call_user_func_array(array($c, $m), $args);\n break;\n case $refl->isPublic():\n $inst = $this->instance($c);\n $req->result = call_user_func_array(array($inst, $m), $args);\n break;\n case $refl->isProtected() && $is_super:\n $refl->setAccessible(TRUE);\n $req->result = $refl->invokeArgs(new $c, $args);\n break;\n default:\n throw new Exception(\"Method not found or permission denied on launching $c::$m.\");\n }\n } catch (Exception $e) {\n if (!is_object($req))\n $req = $this->request = (object)NULL;\n $data = isset($e->data) ? $e->data : get_class($e);\n $req->error = array('code' => $e->getCode(), 'message' => $e->getMessage(), 'data' => $data);\n }\n }", "public function handlerNeedsRequest()\n {\n }", "public function processRequest() {\r\n switch($this->requestMethod) {\r\n case 'GET':\r\n if($this->id) {\r\n $response = $this->get($this->id);\r\n }\r\n else {\r\n $response = $this->getAll();\r\n }\r\n break;\r\n case 'POST':\r\n $response = $this->create();\r\n break;\r\n case 'PUT':\r\n $response = $this->update($this->id);\r\n break;\r\n case 'DELETE':\r\n $response = $this->delete($this->id);\r\n break;\r\n case 'OPTIONS':\r\n break;\r\n default:\r\n $response = $this->notFoundResponse();\r\n break;\r\n }\r\n\r\n header($response['status_code_header']);\r\n\r\n // If there is a body then echo it\r\n if($response['body']) {\r\n echo $response['body'];\r\n }\r\n }", "protected function getRequest() {}", "protected function dispatch() {\n if (!$this->request) {\n return;\n }\n\n $dispatcher = $this->getDispatcher();\n\n // request chaining\n while ($this->request) {\n $this->eventManager->triggerEvent(self::EVENT_PRE_DISPATCH, array('web' => $this));\n\n if (!$this->request) {\n continue;\n }\n\n $chainedRequest = $dispatcher->dispatch($this->request, $this->response);\n\n if ($chainedRequest && !$chainedRequest instanceof Request) {\n throw new Exception('Action returned a invalid value, return nothing or a new ride\\\\library\\\\mvc\\\\Request object for request chaining.');\n }\n\n $this->setRequest($chainedRequest);\n\n $this->eventManager->triggerEvent(self::EVENT_POST_DISPATCH, array('web' => $this));\n }\n }", "public function run(){\n // server response object \n $requestMethod = $this->requestBuilder->getRequestMethod();\n $this->response = new Response($requestMethod);\n\n try{\n $route = $this->router->validateRequestedRoute($this->requestBuilder);\n\n // serve request object\n $this->requestBuilder->setQuery();\n $this->requestBuilder->setBody();\n $requestParams = $this->requestBuilder->getParam();\n $requestQuery = $this->requestBuilder->getQuery();\n $requestBody = $this->requestBuilder->getBody(); \n $this->request = new Request($requestParams, $requestQuery, $requestBody);\n\n $callback = $route->getCallback();\n $callback($this->request, $this->response);\n }catch(RouteNotImplementedException $e){\n $this->response->statusCode(404)->json($e->getMessage()); \n }\n \n }", "private function _processRequest()\n\t{\n\t\t// prevent unauthenticated access to API\n\t\t$this->_secureBackend();\n\n\t\t// get the request\n\t\tif (!empty($_REQUEST)) {\n\t\t\t// convert to object for consistency\n\t\t\t$this->request = json_decode(json_encode($_REQUEST));\n\t\t} else {\n\t\t\t// already object\n\t\t\t$this->request = json_decode(file_get_contents('php://input'));\n\t\t}\n\n\t\t//check if an action is sent through\n\t\tif(!isset($this->request->action)){\n\t\t\t//if no action is provided then reply with a 400 error with message\n\t\t\t$this->reply(\"No Action Provided\", 400);\n\t\t\t//kill script\n\t\t\texit();\n\t\t}\n\n\t\t//check if method for the action exists\n\t\tif(!method_exists($this, $this->request->action)){\n\t\t\t//if method doesn't exist, send 400 code and message with reply'\n\t\t\t$this->reply(\"Action method not found\",400);\n\t\t\t//kill script\n\t\t\texit();\n\t\t}\n \n\t\tswitch($this->request->action){\n\t\t\tcase \"hello\":\n\t\t\t\t$this->hello($this->request->data);\n\t\t\t\tbreak;\n\t\t\tcase \"submit_video\":\n\t\t\t\t//error_log(\"formSubmit has been sent through\");\n\t\t\t\t$this->submit_video($this->request, $_FILES);\n\t\t\t\tbreak;\n\t\t\tcase \"remove_video\":\n\t\t\t\t//error_log(\"formSubmit has been sent through\");\n\t\t\t\t$this->remove_video($this->request);\n\t\t\t\tbreak;\n\t\t\tcase \"isSubmitted\":\n\t\t\t\t$this->isSubmitted($this->request);\n\t\t\tdefault:\n\t\t\t\t$this->reply(\"action switch failed\",400);\n\t\t\tbreak;\n\t\t}\n\n\n\n\t}", "public function processRequest() {\n $action = \"\";\n //retrieve action from client.\n if (filter_has_var(INPUT_GET, 'action')) {\n $action = filter_input(INPUT_GET, 'action');\n }\n\n switch ($action) {\n case 'login':\n $this->login(); \n break;\n case 'register':\n $this->register(); //list all articles\n break;\n case 'search':\n $this->search(); //show a form for an article\n break;\n case 'searchList':\n $this->searchList();\n break;\n case 'remove':\n $this->removeArticle();\n break;\n case 'modify':\n $this->modifyArticle();\n break;\n case 'listCategoryForm':\n $this->listCategoryForm();\n break;\n case 'listCategory':\n $this->listCategory();\n break;\n default :\n break;\n }\n }", "public function processRequest()\n\t\t{\n\t\t\t$request_method = strtolower($_SERVER['REQUEST_METHOD']);\n\t\t\tswitch ($request_method)\n\t\t\t{\n\t\t\t\tcase 'get':\n\t\t\t\t\t$data = $_GET['url'];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'post':\n\t\t\t\t\t$data = $_GET['url'];\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$request_parts = explode('/', $data);\n\t\t\t$controller = $request_parts[0];\n\t\t\tswitch ($controller)\n\t\t\t{\n\t\t\t\tcase 'ad':\n\t\t\t\t\tprocessAdRequest(substr($data, strlen('ad')+1));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'category':\n\t\t\t\t\tprocessCategoryRequest(substr($data, strlen('category')+1));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'user':\n\t\t\t\t\tprocessUserRequest(substr($data, strlen('user')+1));\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\techo \"Invalid Request!\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}", "public function handleRequests() {\r\n $response = null;\r\n try {\r\n $urlArray = $this->uri->uri_to_assoc(3);\r\n if (array_key_exists('login', $urlArray)) {\r\n $response = self::postLogin();\r\n } else {\r\n $login = self::clientLogin();\r\n $response = self::instantiateRequestedClass($urlArray, $login);\r\n }\r\n } catch (Exception $ex) {\r\n $response = $this->apiv1_core->errorResponse($ex->getCode(), $ex->getMessage());\r\n }\r\n\r\n $httpcode = substr($response['code'], 0, 3);\r\n\r\n $name = '';\r\n foreach ($urlArray as $key => $value) {\r\n $this->$key = $value;\r\n $name = ucfirst($key);\r\n }\r\n $method = strtolower($this->input->server('REQUEST_METHOD')) . $name;\r\n $reqParam = $this->input->get() ? $this->input->get() : file_get_contents(\"php://input\");\r\n\r\n $msg = array(\r\n 'resourceURL' => $this->uri->assoc_to_uri($urlArray),\r\n 'className' => $response['className'],\r\n 'methodName' => $method,\r\n 'requestJSON' => json_encode($reqParam),\r\n 'responseHTTP' => $httpcode,\r\n 'responseJSON' => ($response['message']) ? json_encode($response) : json_encode($response['res']),\r\n );\r\n\r\n $logCid = isset($urlArray['account']) ? $urlArray['account'] : NULL;\r\n dblog_message(LOG_LEVEL_INFO, LOG_TYPE_API, \"API: \" . \r\n $this->input->server('REQUEST_METHOD') . \" \" .\r\n $this->uri->assoc_to_uri($urlArray) . \"\\n\" . print_r($msg, TRUE), $logCid);\r\n\r\n header(\"Content-Type: application/json\");\r\n header(\"HTTP/1.1 $httpcode\", true, $httpcode);\r\n\r\n if ($response['message']) {\r\n echo json_encode($response);\r\n } else {\r\n echo json_encode($response['res']);\r\n }\r\n return;\r\n }", "public function call()\n {\n $this->dispatchRequest($this['request'], $this['response']);\n }", "public function prepareRequest()\r\n {\r\n\r\n }", "public function requests()\n\t{\n\t\t$this->checkRequest();\n\t\t$this->getResponse();\n\t}", "public function serve_request()\n {\n }", "public function lookup() { return $this->doRequest(); }", "public function RouteRequest ();", "public function handleRequest($request)\r\n {\r\n $logClass= new LogClass('jobtracker', 'DeleteAssetChain');\r\n \r\n $params = $request['params'];\r\n \r\n $this->db->where('assetid', $params['assetid']);\r\n $this->db->delete('asset'); \r\n \r\n $logClass->log('Delete Asset Query : '. $this->db->last_query());\r\n \r\n \r\n if ($this->successor != NULL)\r\n {\r\n $this->successor->handleRequest($request);\r\n }\r\n\r\n //it should be at the last part of chain\r\n $this -> returnValue = $request;\r\n }", "protected function _handle()\n {\n return $this\n ->_addData('post', $_POST)\n ->_addData('get', $_GET)\n ->_addData('server', $_SERVER)\n ->_handleRequestRoute();\n }", "public function run() {\n $base = $this->request->getNextRoute();\n if ($base !== BASE) {\n $this->response->notFound();\n }\n $start = $this->request->getNextRoute();\n if ($rs = $this->getRs($start)) {\n if ($this->request->isOptions()) {\n $this->response->okEmpty();\n return;\n }\n try {\n $this->response->ok($rs->handleRequest());\n\n } catch (UnauthorizedException $e) {\n $this->response->unauthorized();\n\n } catch (MethodNotAllowedException $e) {\n $this->response->methodNotAllowed();\n\n } catch (BadRequestExceptionInterface $e) {\n $this->response->badRequest($e->getMessage());\n\n } catch (UnavailableExceptionInterface $e) {\n $this->response->unavailable($e->getMessage());\n\n } catch (Exception $e) {\n $this->response->unavailable($e->getMessage());\n }\n } else {\n $this->response->badRequest();\n }\n }", "protected function _response() {}", "public function requestAction()\n {\n }", "abstract function do_api_request();", "public function RequestLifeCycle(){\n }", "protected function initiateSubRequest() {}", "public function prepareRequest()\n {\n }", "public function handleRequest(Zend_Controller_Request_Http $request)\n {\n \n }", "abstract function __invoke(RequestInterface $request, ResponseInterface $response, callable $next);", "public function handle()\n {\n\t //PROCESS FOR QUESTION 4:\n //Single request with error handling:\n \n //Create handler with curl\n $curl = new CurlMultiHandler;\n\t\t$handler = HandlerStack::create($curl);\n\t\t\n\t\t//create client and set custom handler\n\t\t$client = new Client(['handler' => $handler]);\n\t\t\n\t\t$promise = $client->requestAsync('POST', 'https://atomic.incfile.com/fakepost');\n\t\t$promise->then(\n\t\t function (ResponseInterface $result) {\n\t\t\t //Handle success here\n\t\t\t \n\t\t Log::info(\"Correct request\");\n\t\t },\n\t\t function (RequestException $exception) {\n\t\t //Handle error here\n\t\t \n\t\t $error_status_code = \"There was an error with status code: \" . $exception->getResponse()->getStatusCode();\n\t\t\t\t$error_description = \", the error was: \\n\\n\" . $exception->getMessage();\n\t\t\t\t\n\t\t\t\t$error_complete_msg = $error_status_code . $error_description;\n\t\t \n\t\t Log::error($error_complete_msg);\n\t\t }\n\t\t);\n\t\t\n\t\t//this will ensure the reliable delivery of the request\n\t\twhile ($promise->getState() === 'pending') {\n\t\t $curl->tick();\n\t\t \n\t\t //do stuff\n\t\t}\n\t\t\n\t\t//This next line loses kind of a little bit the point of \"asynchrousness\" for only one request: $promise->wait();\n\t\t\n\t\t\n\t\t\n\t\t//------------------------------//\n\t\t\n\t\t\n\t\t//PROCESS FOR QUESTION 5:\n\t\t//Multiple requests with error handling:\n\t\t\n\t\t//This is the number of requests, here you would put the 100k requests\n\t\t$total = 50;\n\t\t$client = new Client();\t\n\t\t\n\t\t//Segment the number of requests in order to not overload the server\n\t\t$concurrency = 10;\n\t\t\n\t\t$pool = new Pool($client, $this->requestGenerator($total), [\n\t\t 'concurrency' => $concurrency,\n\t\t 'fulfilled' => function (Response $response, $index) {\n\t\t\t //Handle success here\n\t\t\t \n\t\t Log::info(\"Correct request\");\n\t\t },\n\t\t 'rejected' => function (RequestException $exception, $index) {\n\t\t\t //Handle error here\n\t\t\t \n\t\t\t\t$error_index = \"There was an error in the request number: \" . ($index + 1) . \", \";\n\t\t\t\t$error_status_code = \"with status code: \" . $exception->getResponse()->getStatusCode();\n\t\t\t\t$error_description = \", the error was: \\n\\n\" . $exception->getMessage();\n\t\t\t\t$error_separator = \"\\n ------------- \\n\";\n\t\t\t\t\n\t\t\t\t$error_complete_msg = $error_index . $error_status_code . $error_description . $error_separator;\n\t\t\t \n\t\t\t\tLog::error($error_complete_msg);\n\t\t\t\t\n\t\t },\n\t\t]);\n\t\t\n\t\t// Start transfers and create promise\n\t\t$promise = $pool->promise();\n\t\t\n\t\t// Force ALL requests to complete.\n\t\t$promise->wait();\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t/*\n\t\t\tYou could also dispatch a queued job for this question 5, \n\t\t\tbut I think that for this case that involves sending HTTP requests (sending email would be a better use, for example), \n\t\t\tqueuing this process loses a bit of sense because the requests are being sent in the\n\t\t\tabove code asynchronously already, so I'll be running an asynchronous process ( the promise ) in an asynchronous way ( queue ):\n\t\t*/\n\t\t\n\t\t\n\t\t//Job sent to a queue called \"requests\", in this case, I'll be using database driver:\n\t\tSendRequests::dispatch()->onQueue('requests');\n\t\t\n\t\t\n }", "public function sendRequest( ) {\n\n }", "protected function runLogic()\n {\n Logic::run($this->request); /* The logic to attempt to parse the request */\n }", "public function request() { if($this->allowed(USER_WORKER)) {\n switch($this->action) {\n case 'pendingAmount':\n $this->getPending();\n break;\n case 'pendingList':\n $this->getRequests();\n break;\n case 'rejectedList':\n $this->getRequests('rejected');\n break;\n case 'acceptedList':\n $this->getRequests('accepted');\n break;\n case 'reject':\n $this->reject();\n break;\n case 'accept':\n $this->accept();\n break;\n default:\n $this->updateValue();\n break;\n }\n // direct update\n // TODO\n } else if ( ! $this->action ) {\n if($this->institution && testInstitution($this->institution)) {\n $this->appendToQueue();\n } else {\n $this->denied();\n }\n }\n }", "public function execute()\n {\n if (!$this->external) {\n $processed = Request::process($this, $this->routes);\n\n if ($processed) {\n // Store the matching route\n $this->route = $processed['route'];\n $params = $processed['params'];\n\n // Is this route external?\n $this->external = $this->route->isExternal();\n\n if (isset($params['namespace'])) {\n $this->namespace = $params['namespace'];\n }\n\n // Store the controller\n if (strpos($params['controller'], '\\\\') !== false) {\n $controller_parts = explode('\\\\', $params['controller']);\n $this->controller = array_pop($controller_parts);\n $this->namespace = implode('\\\\', $controller_parts);\n } else {\n $this->controller = $params['controller'];\n }\n\n // Store the action\n $this->action = (isset($params['action'])) ? $params['action'] : Repository::$default_action;\n\n // These are accessible as public vars and can be overloaded\n unset($params['controller'], $params['action'], $params['namespace']);\n\n // Params cannot be changed once matched\n $this->params = $params;\n }\n }\n\n if (!$this->route instanceof Route) {\n return HTTPException::factory(404, 'Unable to find a route to match the URI: {uri}', [\n 'uri' => $this->uri,\n ])->request($this)\n ->getResponse();\n }\n\n if (!$this->client instanceof RequestClient) {\n throw new RequestException('Unable to execute {uri} without a \\KORD\\Request\\Client', [\n 'uri' => $this->uri,\n ]);\n }\n\n return $this->client->execute($this);\n }", "public function call()\n {\n $env = $this->application->environment();\n if (isset($env['HTTP_X_HTTP_METHOD_OVERRIDE'])) {\n // Header commonly used by Backbone.js and others\n $env['light.method_override.original_method'] = $env['REQUEST_METHOD'];\n $env['REQUEST_METHOD'] = strtoupper($env['HTTP_X_HTTP_METHOD_OVERRIDE']);\n } elseif (isset($env['REQUEST_METHOD']) && $env['REQUEST_METHOD'] === 'POST') {\n // HTML Form Override\n $req = new \\Light\\Http\\Request($env);\n $method = $req->post($this->configs['key']);\n if ($method) {\n $env['light.method_override.original_method'] = $env['REQUEST_METHOD'];\n $env['REQUEST_METHOD'] = strtoupper($method);\n }\n }\n $this->next->call();\n }", "public function __invoke(Request $request)\n {\n \n }", "public function process() {\n // on va lui passer le contexte en premier paramètre\n // puis on va lui passer les paramètres du path comme\n // paramètres supplémentaires\n $args = array_merge(\n array($this->_context),\n $this->_context->route->params\n );\n\n $this->_context->require_part('controller', $this->controller);\n $controller = new $this->controller;\n\n // CALL STAGES BEFORE ACTION\n\n $stages = array(\n '_before_action'\n );\n\n $_response = null;\n $responses_stack = array();\n\n foreach($stages as $stage) {\n $_response = $this->call_stage($controller,$stage,$this->action, $responses_stack);\n\n // Si on obtient un objet de type Response, on stoppe\n\n if($_response instanceof Response) {\n return $this->output($_response); // ! RETURN\n }\n else {\n $responses_stack[$stage] = $_response;\n }\n }\n\n\n // CALL ACTION\n if(! method_exists($controller, $this->action)) {\n throw new \\InvalidArgumentException('Action '.$this->action.' does not exists in controller '. get_class($controller));\n }\n $action_response = call_user_func_array(array($controller, $this->action), $args);\n\n if($action_response instanceof Response) {\n return $this->output($action_response); // ! RETURN\n }\n\n\n if(is_null($action_response)) {\n // si la réponse est nulle, on ne fait rien tout simplement\n //@todo : faire autre chose, envoyer un 204 ?\n $class = get_class($controller);\n r(\"@todo : empty $class return\");\n return; // ! RETURN\n }\n elseif(is_string($action_response)) {\n $response = new Response($action_response, $headers=array());\n return self::output($response); // ! RETURN\n }\n\n\n }", "abstract public function processRequest(PriceWaiter_NYPWidget_Controller_Endpoint_Request $request);", "public function handleRequest ()\n\t{\n\t\t$this->version = '1.0';\n\t\t$this->id = NULL;\n\n\t\tif ($this->getProperty(self::PROPERTY_ENABLE_EXTRA_METHODS))\n\t\t\t$this->publishExtraMethods();\n\n\t\tif ($_SERVER['REQUEST_METHOD'] == 'POST')\n\t\t{\n\n\t\t\t$json = file_get_contents('php://input');\n\t\t\t$request = \\json_decode($json);\n\n\t\t\tif (is_array($request))\n\t\t\t{\n\t\t\t\t// Multicall\n\t\t\t\t$this->version = '2.0';\n\n\t\t\t\t$response = array();\n\t\t\t\tforeach ($request as $singleRequest)\n\t\t\t\t{\n\t\t\t\t\t$singleResponse = $this->handleSingleRequest($singleRequest, TRUE);\n\t\t\t\t\tif ($singleResponse !== FALSE)\n\t\t\t\t\t\t$response[] = $singleResponse;\n\t\t\t\t}\n\n\t\t\t\t// If all methods in a multicall are notifications, we must not return an empty array\n\t\t\t\tif (count($response) == 0)\n\t\t\t\t\t$response = FALSE;\n\t\t\t}\n\t\t\telse if (is_object($request))\n\t\t\t{\n\t\t\t\t$this->version = $this->getRpcVersion($request);\n\t\t\t\t$response = $this->handleSingleRequest($request);\n\t\t\t}\n\t\t\telse\n\t\t\t\t$response = $this->formatError(self::ERROR_INVALID_REQUEST);\n\t\t}\n\t\telse if ($_SERVER['PATH_INFO'] != '')\n\t\t{\n\t\t\t$this->version = '1.1';\n\t\t\t$this->id = NULL;\n\n\t\t\t$method = substr($_SERVER['PATH_INFO'], 1);\n\t\t\t$params = $this->convertFromRpcEncoding($_GET);\n\n\t\t\tif (!$this->hasMethod($method))\n\t\t\t\t$response = $this->formatError(self::ERROR_METHOD_NOT_FOUND);\n\t\t\telse\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tRpcResponse::setWriter(new JsonRpcResponseWriter($this->version, $this->id));\n\t\t\t\t\t$res = $this->invoke($method, $params);\n\t\t\t\t\tif ($res instanceof JsonRpcResponseWriter)\n\t\t\t\t\t{\n\t\t\t\t\t\t$res->finalize();\n\t\t\t\t\t\t$resposne = FALSE;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t$response = $this->formatResult($res);\n\t\t\t\t}\n\t\t\t\tcatch (\\Exception $exception)\n\t\t\t\t{\n\t\t\t\t\t$response = $this->formatException($exception);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$response = $this->formatError(self::ERROR_PARSE_ERROR);\n\t\t}\n\n\t\tif (!headers_sent())\n\t\t{\n\t\t\theader('Content-Type: application/json', TRUE);\n\t\t\theader('Cache-Control: nocache', TRUE);\n\t\t\theader('Pragma: no-cache', TRUE);\n\t\t}\n\n\t\tif ($response !== FALSE)\n\t\t{\n\t\t\t$result = \\json_encode($this->convertToRpcEncoding($response));\n\n\t\t\tif ($result === FALSE)\n\t\t\t\terror_log(var_export($response, TRUE));\n\t\t\telse\n\t\t\t\techo($result);\n\t\t}\n\t}", "abstract function _do_execute(request $request);", "function rest_do_request($request)\n {\n }", "public function process()\n\t{\n\t\t$action = $this->getAction();\n\t\tswitch (strtolower($action))\n\t\t{\n\t\t\tcase 'get':\n\t\t\tcase 'put':\n\t\t\tcase 'post':\n\t\t\tcase 'delete':\n\t\t}\t\n\t}", "public function getRequest() {}", "public function getRequest() {}", "public function resolveRequestHandler() {}", "abstract protected function _setRequestServiceBuilder();", "public function handleRequest() {\n // Make sure the action parameter exists\n $this->requireParam('action');\n\n // Call the correct handler based on the action\n switch($this->requestBody['action']) {\n\n case 'checkoutLocker':\n $this->handleCheckoutLocker();\n\t\t\t\tbreak;\n\n\t\t\tcase 'remindLocker':\n $this->handleRemindLocker();\n\t\t\t\tbreak;\n\n\t\t\tcase 'returnLocker':\n $this->handleReturnLocker();\n\t\t\t\tbreak;\n\n default:\n $this->respond(new Response(Response::BAD_REQUEST, 'Invalid action on Locker resource'));\n }\n }", "abstract public function handleRequest(Request $request);", "function run(&$x = NULL, $q = NULL) {\n $this->query = $q;\n if(is_string($x))\n\t $req = json_decode($x);\n\telseif(is_array($x))\n\t\t$req = (object)$x;\n\telseif(is_object($x))\n\t\t$req = $x;\n\telse\n\t\t$req = (object)NULL;\n $this->init($req);\n $this->invoke();\n //var_dump($this->request);\n \n unset($req->method, $req->params, $req->uri);\n \n \n return $req;\n }", "function __construct() {\n $this->init();\n \\base\\RequestRegistry::setRequest($this);\n }", "function request()\n {\n }", "public final function set_request($request = array()) {\n\t \t\n\t \t/* set vars from the server request */\n\t\t$this->request = $request;\n\t\t\n\t\t/* extracts the method, but this is not really importand to do at this point, as it will be set later too */\n\t\t/* $this method is also set when the corresponding action ($this-read, create, ...) is called */\n\t\tif( isset($request['method']))\n\t\t\t$this->request_method = $request['method'];\n\t\t\n\t\t/* extract query vars */\n\t\tif( isset($request['queryvars']))\n\t\t\t$this->request_query_vars = (array) $request['queryvars']; // array is expected\n\n\t\t/* looking for model ids in the request */\n\t\t$this->id = $this->_find_in_request($this->properties->id_attribute);\n\t\t$this->parent_id = $this->_find_in_request($this->properties->parent_id_attribute);\t\n\t\t\n\n\t\t/* USER HANDLING */\n\n\t \t/* is the user allowed to make this request */\n\t \tif ( ( $this->properties->access == \"loggedin\" ) && ( ! is_user_logged_in() ) ) {\n\t\t\t$this->set_error( 56, 'user must be logged in for this request' );\t\t\t\t \t\n\t \t}\n\t\t\n\t \t/* some extra authentication */\n\t \t/* is the uer allowed to make this request */\n \t\t$allowed = $this->is_authenticated($request, $this->request_method);\n \t\tif(! $allowed)\n\t\t\t$this->set_error( 56, 'user is not authenticated' );\t\t\t\t \t\n\t \t\t\n\t\t\n\t}", "public function onInheritanceFromRequest($req) {\n\t}", "public function sendRequest()\n {\n }", "public function handleRequest()\n {\n $router = new Router();\n $controllerClass = $router->resolve()->getController();\n $controllerAction = $router->getAction();\n\n \n\n if(!class_exists($controllerClass)\n || !method_exists($controllerClass,$controllerAction)\n ){\n header('Not found', true, 404);\n exit;\n }\n\n $controller = new $controllerClass();\n call_user_func([$controller, $controllerAction]);\n\n }", "public function interpretRequest($request)\n {\n\n $this->updtv = $request->param('updtv',Validator::BOOLEAN);\n\n // startpunkt des pfades für die acls\n if ($aclRoot = $request->param('a_root', Validator::CKEY))\n $this->aclRoot = $aclRoot;\n\n // die id des Datensatzes von dem aus der Pfad gestartet wurde\n if ($aclRootId = $request->param('a_root_id', Validator::INT))\n $this->aclRootId = $aclRootId;\n\n // der key des knotens auf dem wir uns im pfad gerade befinden\n if ($aclKey = $request->param('a_key', Validator::CKEY))\n $this->aclKey = $aclKey;\n\n // der neue knoten\n if ($aclNode = $request->param('a_node', Validator::CKEY))\n $this->aclNode = $aclNode;\n\n // an welchem punkt des pfades befinden wir uns?\n if ($aclLevel = $request->param('a_level', Validator::INT))\n $this->aclLevel = $aclLevel;\n\n // request elemet type, bei back to top ist es relevant zu wissen woher der\n // aufruf kam (in diesem fall von einem input)\n // könnte bei referenzen auch interessant werden\n // values: inp | ref\n //if ($requestedBy = $request->param('rqtby', Validator::TEXT))\n // $this->requestedBy = $requestedBy;\n\n // sprungpunkt für back to top\n if ($maskRoot = $request->param('m_root', Validator::TEXT))\n $this->maskRoot = $maskRoot;\n\n // the publish type, like selectbox, tree, table..\n if ($publish = $request->param('publish', Validator::CNAME))\n $this->publish = $publish;\n\n // if of the target element, can be a table, a tree or whatever\n if ($targetId = $request->param('target_id', Validator::CKEY))\n $this->targetId = $targetId;\n\n // callback for a target function in thr browser\n if ($target = $request->param('target', Validator::CKEY))\n $this->target = $target;\n\n // target mask key\n if ($targetMask = $request->param('target_mask', Validator::CNAME))\n $this->targetMask = $targetMask;\n\n if ($parentMask = $request->param('pmsk', Validator::TEXT))\n $this->parentMask = $parentMask;\n\n\n\n // mask key\n if ($viewId = $request->param('view_id', Validator::CKEY))\n $this->viewId = $viewId;\n\n // mask key\n if ($viewType = $request->param('view', Validator::CNAME))\n $this->viewType = $viewType;\n\n // soll die maske neu geladen werden?\n //if ($reload = $request->param('reload', Validator::BOOLEAN))\n // $this->reload = $reload;\n\n // target mask key\n if ($refId = $request->param('refid', Validator::INT))\n $this->refId = $refId;\n\n // listing type\n if ($ltype = $request->param('ltype', Validator::CNAME))\n $this->ltype = $ltype;\n\n // context\n if ($context = $request->param('context', Validator::CNAME))\n $this->context = $context;\n\n // parameter zum fixieren des Contexts\n // wird verwendet um zwischen \"unterschiedliche\" Masken mit dem gleichen\n // viewnamen zu switchen\n if ($cntk = $request->param('cntk', Validator::CKEY))\n $this->contextKey = $cntk;\n\n // mask switcher key\n // wird nur in der view gesetzt wenn der mask switcher vorhanden ist\n if ($cntms = $request->param('cntms', Validator::CNAME))\n $this->contextMaskSwt = $cntms;\n\n\n // per default\n $this->categories = [];\n\n }", "public function work() {\n if(isset($_GET['r'])) {\n $this->route = $_GET['r'];\n }\n\n $this->transform();\n }", "public function startChain(){\n\t\treturn $this;\n\t}", "public function startChain(){\n\t\treturn $this;\n\t}", "function processRequest() {\n\n\t\t// Cleanup any previous response\n\t\t$this->m_response = null;\n\n\t\t// Optional argument is the request\n\t\tif (func_num_args() === 1) {\n\t\t\t$this->m_request = func_get_arg(0);\n\t\t}\n\n\t\tif ($this->m_request === null) {\n\t\t\ttrigger_error(\"CardEaseXMLRequest: No request to process\", E_USER_ERROR);\n\t\t}\n\n\t\t// Validate that the request data is good\n\t\t$this->m_request->validate();\n\n\t\tif ($this->m_serverURLs === null || count($this->m_serverURLs) === 0) {\n\t\t\ttrigger_error(\"CardEaseXMLCommunication: No servers to contact\", E_USER_ERROR);\n\t\t}\n\n\t\t$lastCommunicationException = null;\n\n\t\t// Try each of the server URLs\n\t\tforeach ($this->m_serverURLs as $url) {\n\n\t\t\tif ($url === null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$xmlWriter = new XMLWriterCreditCall($this->m_xmlEncoding);\n\t\t\t$requestXML = $this->m_request->generateRequestXML($xmlWriter);\n\n\t\t\t// Set the HTTP settings\n\t\t\t$curl = curl_init();\n\t\t\tcurl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 10000);\n\t\t\tcurl_setopt($curl, CURLOPT_HTTPHEADER, array(\"Content-Type: text/xml\"));\n\t\t\tcurl_setopt($curl, CURLOPT_POST, TRUE);\n\t\t\tcurl_setopt($curl, CURLOPT_POSTFIELDS, $requestXML);\n\t\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);\n\t\t\t@curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, TRUE); // FIXME This should really be TRUE\n\t\t\tcurl_setopt($curl, CURLOPT_SSL_VERIFYPEER, TRUE); // FIXME This should really be TRUE\n\t\t\tcurl_setopt($curl, CURLOPT_CAINFO, dirname(__FILE__).'/../../cacert.pem');\n\t\t\tcurl_setopt($curl, CURLOPT_TIMEOUT, $url->getTimeout());\n\t\t\tcurl_setopt($curl, CURLOPT_URL, $url->getURL());\n\n\t\t\t// Setup the proxy information\n\t\t\tif ($this->m_proxyHost !== null) {\n\t\t\t\tcurl_setopt($curl, CURLOPT_PROXY, $this->m_proxyHost.\":\".$this->m_proxyPort);\n\n\t\t\t\tif ($this->m_proxyUserName !== null && $this->m_proxyPassword !== null) {\n\t\t\t\t\tcurl_setopt($curl, CURLOPT_PROXYUSERPWD, $this->m_proxyUserName.\":\".$this->m_proxyPassword);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Create a connection to the server and send the XML\n\t\t\t$responseXML = curl_exec($curl);\n\n\t\t\t$curlError = curl_error($curl);\n\t\t\t$curlInfo = curl_getinfo($curl);\n\n\t\t\tcurl_close($curl);\n\n\t\t\tif (!empty($curlError)) {\n\t\t\t\t$lastCommunicationException = \"CardEaseXMLCommunication: $curlError\";\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Read the response code from the server and check it\n\t\t\t$responseCode = $curlInfo['http_code'];\n\n\t\t\t// Check the response code\n\t\t\tif ($responseCode !== 200) {\n\t\t\t\t$lastCommunicationException = \"CardEaseXMLCommunication: Unexpected HTTP response: \" . $responseCode;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (strlen($responseXML) === 0) {\n\t\t\t\t$lastCommunicationException = \"CardEaseXMLCommunication: Unable to retrieve server response\";\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Convert the XML string to a response\n\t\t\t$this->m_response = new Response();\n\t\t\t$this->m_response->parseResponseXML($responseXML);\n\n\t\t\t// If we have got this far the connection has been successful\n\t\t\treturn $this->m_response;\n\t\t}\n\n\t\t// Communication hasn't been successful and an exception exists\n\t\tif ($lastCommunicationException !== null) {\n\t\t\ttrigger_error($lastCommunicationException, E_USER_ERROR);\n\t\t}\n\n\t\treturn $this->m_response;\n\t}", "public function run()\n {\n $requested_url = explode('/', $this->requestUrl);\n\n if (!empty($this->definedRoutes[$this->requestMethod])) {\n foreach ($this->definedRoutes[$this->requestMethod] as $route => $action) {\n $route = explode('/', $route);\n $route_depth = count($route);\n\n // Check for defined route parameters\n for( $i = 0; $i < $route_depth; $i++) {\n if (preg_match('/\\{([\\w?]+?)\\}/',$route[$i])) {\n if (isset($requested_url[$i])) {\n array_push($this->requestParameters, $requested_url[$i]);\n // replace defined route parameters with peer request url parameter for final comparison\n $route[$i] = $requested_url[$i];\n }\n }\n }\n\n // Check for unreplaced route parameters and delete them if are optional parameters (for final comparison)\n for ($j = 0; $j < $route_depth; $j++) {\n if (preg_match('/\\{([\\w]+?)\\?}/', $route[$j])) {\n unset($route[$j]);\n }\n }\n\n $route = implode('/', $route);\n\n // Final comparision. Check requested url is equal to current checking route\n if ($route == $this->requestUrl) {\n $this->matched = true;\n\n if ($action instanceof Closure) {\n return call_user_func_array($action, $this->requestParameters);\n } else if($this->isController($action)) {\n return $this->loadController($action);\n } else {\n throw new Exception('Invalid action for route');\n }\n break; // Route found, stop the operations\n } else {\n $this->reset();\n }\n }\n }\n\n if ($this->matched === false) {\n return $this->exception->notFound();\n }\n }", "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 }", "protected function start(){\n \tLynx_Request::parse();\n }", "private function setRequest() {\n // Create request object\n $this->request = Request::createFromGlobals();\n // Check caching and exit if so\n // - create a dummy response for possible 304\n $response = new Response();\n $seconds = Config::get()->pagecachetime;\n $response->setLastModified(new DateTime('-' . $seconds . ' seconds'));\n if ($response->isNotModified($this->getRequest())) {\n $response\n ->setSharedMaxAge($seconds)\n ->send();\n exit();\n }\n // Add better json request support\n // check request Content-Type\n $ctCheck = 0 === strpos(\n $this->request->headers->get('CONTENT_TYPE')\n , 'application/json'\n );\n // check request Method\n $methodCheck = in_array(\n strtoupper($this->request->server->get('REQUEST_METHOD', 'GET'))\n , array('PUT', 'DELETE', 'POST')\n );\n if ($ctCheck && $methodCheck) {\n $params = (array) json_decode($this->request->getContent());\n $this->request->request = new ParameterBag($params);\n }\n }", "private function handleCall() { //$this->request\n $err = FALSE;\n // route call to method\n $this->logToFile($this->request['action']);\n switch($this->request['action']) {\n // Edit form submitted\n case \"edit\":\n // TODO: improve error handling\n try {\n $this->logToFile(\"case: edit\");\n $this->edit($this->request['filename']);\n //$this->save();\n } catch (Exception $e) {\n $err = \"Something went wrong: \";\n $err .= $e.getMessage();\n }\n break;\n }\n // TODO: set error var in response in case of exception / error\n // send JSON response\n if($err !== FALSE) {\n $this->request['error_msg'] = $err;\n }\n $this->giveJSONResponse($this->request);\n }", "public function execute_http()\n {\n }", "public function getReferringRequest() {}", "public function request1(): void\n {\n $this->state->handle1();\n }", "public function next()\n {\n if (($middleware = next($this->middlewares))) {\n call_user_func($middleware, $this->request, $this->response, $this);\n } elseif ($this->parent !== null) {\n $this->parent->next();\n }\n }", "public function request1(): void\n {\n $this->etat->handle1();\n }", "public function __invoke(Request $request)\n {\n //\n }", "public function __invoke(Request $request)\n {\n //\n }", "public function __invoke(Request $request)\n {\n //\n }", "public function __invoke(Request $request)\n {\n //\n }", "public function __invoke(Request $request)\n {\n //\n }", "public function __invoke(Request $request)\n {\n //\n }" ]
[ "0.68424773", "0.66104585", "0.6554545", "0.65527254", "0.6520031", "0.65182334", "0.6514471", "0.64878523", "0.64878523", "0.64878523", "0.6459114", "0.6397065", "0.6350654", "0.6324475", "0.61416435", "0.6090599", "0.6090599", "0.602621", "0.5998086", "0.5995677", "0.5991887", "0.59619474", "0.5954937", "0.5928637", "0.590598", "0.58890903", "0.5845667", "0.5844034", "0.5842743", "0.5829487", "0.5821668", "0.5821416", "0.5814107", "0.57957137", "0.57953286", "0.5790877", "0.57553923", "0.5746834", "0.5741426", "0.5713331", "0.57115734", "0.56785786", "0.56777924", "0.56695575", "0.5668816", "0.5641166", "0.56400305", "0.56130636", "0.56113887", "0.5581726", "0.55805254", "0.55636996", "0.5537358", "0.5529562", "0.5520751", "0.5519035", "0.550894", "0.5507992", "0.55076873", "0.54923236", "0.54845715", "0.54745543", "0.54648787", "0.5458381", "0.54544896", "0.5452877", "0.54508317", "0.54508317", "0.5438221", "0.543123", "0.54295516", "0.54069954", "0.5402898", "0.54026216", "0.5395814", "0.5392751", "0.53704184", "0.5367807", "0.5366338", "0.5366096", "0.5345506", "0.5345324", "0.5345324", "0.5344441", "0.53406066", "0.533899", "0.5335203", "0.5332984", "0.5326964", "0.53249097", "0.53229916", "0.53223854", "0.53201497", "0.53093165", "0.53066033", "0.53066033", "0.53066033", "0.53066033", "0.53066033", "0.53066033" ]
0.58937067
25
It sets the next part of chain
abstract public function setSuccessor($nextService);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setNext($next) {}", "function setFirstNext($next){\r\n\t\t$this->first->next=$next;\r\n\t}", "public function set_next_stage() {\n\t\t$this->debug = [];\n\t\t$stage = $this->get_current_stage();\n\n\t\tif ( $stage ) {\n\t\t\t$stage = $this->get_next_stage( $stage );\n\n\t\t\t// Save next position\n\t\t\tif ( $stage ) {\n\t\t\t\t$this->set_stage( $stage );\n\t\t\t} else {\n\t\t\t\t$this->finish();\n\t\t\t}\n\t\t}\n\t}", "public function next()\n {\n $current = $this->current();\n\n if ($current) {\n $this->current = $current->getAfter();\n }\n }", "function next()\n\t{\n\t\t$this->done = true;\n\t}", "public function next(): void\n {\n next($this->data);\n }", "private function next()\n {\n $this->m++;\n $this->init();\n }", "public function next(): void {\n next($this->items);\n }", "public function next()\n\t{\n\t\t$this->current = $this->runFetch();\n\n\t\tif ($this->current) {\n\t\t\t$this->index++;\n\t\t}\n\t}", "public function next()\n {\n echo __METHOD__,PHP_EOL;\n next($this->a);\n }", "public function next()\n {\n next($this->revs);\n }", "public function next()\n {\n next($this->properties);\n }", "public function setNextBlock($nextBlock);", "public function next()\n {\n do {\n $this->iterated->attach($this->current());\n parent::next();\n } while ($this->valid() && (!$this->passes($this->current()) || $this->iterated->contains($this->current())));\n }", "public function next() {\n next($this->data);\n }", "public function next() {\n next($this->data);\n }", "public function next(): void\n {\n next($this->array);\n }", "public function setNext($next)\n {\n $this->next = $next;\n\n return $this;\n }", "public function setNext($next)\n {\n $this->next = $next;\n\n return $this;\n }", "public function next(): void\n {\n next($this->payload);\n }", "public function next()\n {\n next($this->data);\n }", "public function next()\n {\n next($this->data);\n }", "public function next()\n {\n next($this->data);\n }", "public function next()\r\n {\r\n next($this->children);\r\n }", "public function fastForward()\n {\n $this->current = $this->top();\n }", "public function next()\n {\n next($this->_object);\n }", "public function addNext($next) {}", "public function startChain(){\n\t\treturn $this;\n\t}", "public function startChain(){\n\t\treturn $this;\n\t}", "protected abstract function perform_next();", "public function next()\n {\n $this->currentElement = $this->readNextElement();\n $this->atStart = FALSE;\n }", "public function next()\n\t\t{\n\t\t\tnext($this->source);\n\t\t}", "public function setChain($chain) {\n $this->chain = $chain;\n return $this;\n }", "public function next(){\n $this->index ++;\n }", "public function next(): void;", "public function next(): void;", "function next() {\n $this->position++;\n }", "public function next() {\n\t\tnext($this->_data);\n\t}", "public function next(): void\n {\n $this->_index++;\n }", "public function next()\n {\n $this->current = ($result = ldap_next_entry($this->handle, $this->current())) ? $result : null;\n }", "public function next(): void\n {\n ++$this->key;\n\n if ($this->next) {\n $this->current = $this->current->next();\n } else {\n $this->current = $this->current->previous();\n }\n }", "public function next()\n {\n # Pegando a posição atual do array e com ternario, verificando se é reverso e aplicando a operação.\n $this->posicao = $this->posicao + ($this->reverso ? -1 : 1);\n }", "public function next()\n {\n\t\tnext($this->_data);\n $this->_index++;\n\t}", "public function setNext($key, \\RKW\\RkwSearch\\TreeTagger\\TreeTaggerRecord $item) {\n\n if ($this->checkData($item, 'next', $key)) {\n $this->next[$key] = $item;\n $this->bases[] = $item->getBase();\n }\n }", "public function next()\n {\n $this->key++;\n }", "public function next()\n {\n $this->key++;\n }", "public function next_step() {\r\n\t\t$this->step ++;\r\n\t}", "protected function findNextStep()\n {\n $this->moveToStep($this->current);\n $this->next=$this->findNext();\n return $this;\n }", "public function next() {\n next($this->elements);\n $this->pointer++;\n }", "public function next()\n {\n next($this->entities);\n }", "function MoveNext() {}", "public function next()\r\n\t{\r\n\t}", "public function next() {\n\t\t$this->position ++;\n\t}", "public function next()\n {\n $this->pointer++;\n }", "public function next() {\n $this->_key++;\n }", "public function next(): void\n {\n if ($this->index < count($this->objectListKeys)) {\n $this->index++;\n }\n }", "public function next(ChainNode $current, $method, array $arguments = array());", "public function next()\n {\n next($this->requests);\n }", "public function next() {\n next($this->rules);\n }", "public function next()\n {\n next($this->_items);\n }", "public function next()\n {\n $this->curIndex++;\n if($this->curIndex >= count($this->res)){\n $this->MakeNextReq();\n }\n }", "public function next()\n {\n next($this->array);\n }", "private function advance(): void\n {\n if ($this->rotors[1]->isNotchOpen()) {\n $this->rotors[2]->advance();\n $this->rotors[1]->advance();\n }\n if ($this->rotors[0]->isNotchOpen()) {\n $this->rotors[1]->advance();\n }\n $this->rotors[0]->advance();\n }", "public function next () {\n next($this->__fields);\n }", "function next()\n {\n ++$this->_position;\n }", "public function next()\n {\n next($this->values);\n }", "public function next()\n {\n next($this->iterator_data);\n }", "public function next()\n\t{\n\t\t$this->_idx++;\n\t}", "public function next()\n {\n next($this->rules);\n }", "public function next(): void\n {\n ++$this->pointer;\n }", "public function next() {\n next($this->components);\n }", "public function next()\n {\n $method = $this->getMethodForNext();\n call_user_func([$this->result, $method]);\n }", "public function next() {}", "public function next() {}", "public function next() {}", "public function next() {}", "public function next() {}", "public function next() {}", "public function next() {}", "public function next() {}", "final public function next(): void\n {\n $this->sort();\n\n next($this->index);\n }", "public function next()\n {\n $this->index++;\n }", "public function next(): void\n {\n ++$this->position;\n }", "public function next(): void\n {\n ++$this->position;\n }", "public function next(): void\n {\n ++$this->position;\n }", "public function moveToNextGeneration ()\n {\n $this->liveStatus = $this->nextLiveStatus;\n }", "public function advance();", "public function next()\n {\n $this->k++;\n }", "public function next()\n {\n $newPrevious = $this->_current;\n $this->_current += $this->_previous;\n $this->_previous = $newPrevious;\n $this->_key++;\n }", "public final function onNextRecord()\n {\n $this->lots = false;\n $this->setRecord($this->getCurrentRecord(), true);\n if ($this->isLoaded()) {\n $this->transactionId = $this->getId() . date('YmdHis');\n $this->addresses = false;\n }\n }", "function next_in_line(){\r\n\t\t\tif(count($this->queue) > 0){\r\n\t\t\t\t/**\r\n\t\t\t\t * @var Promise $next\r\n\t\t\t\t */\r\n\t\t\t\t$next = array_shift($this->queue);\r\n\t\t\t\tLoop::defer(function() use ($next){\r\n\t\t\t\t\t$next->resolve();\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}", "public function next()\n {\n $this->currentKey++;\n }", "abstract public function nextProxy( );", "public function next() {\n $this->pos++;\n }", "public function next() {\n\t\t++$this->position;\n\t}", "public function next()\n {\n next($this->zipModel->getEntries());\n }", "public function next() {\n return next($this->_path);\n }", "public /*void*/ function next(){}", "public function startChain() {\n\t\treturn $this;\n\t}", "public function nextProxy( ) {\n\t\t$this->proxyStrategy->nextProxy();\n\t}", "public function next()\n {\n $this->storage->next();\n }" ]
[ "0.67513233", "0.6632744", "0.6046491", "0.6011356", "0.58915275", "0.58906", "0.58715916", "0.58591807", "0.5848773", "0.5781889", "0.57494503", "0.5738493", "0.5729846", "0.57184297", "0.57123613", "0.57123613", "0.5677963", "0.5654253", "0.5654253", "0.5630385", "0.5629181", "0.5629181", "0.5629181", "0.5628512", "0.56275725", "0.5621652", "0.562057", "0.5606442", "0.5606442", "0.5605729", "0.5604448", "0.5594352", "0.5591252", "0.5589927", "0.55623966", "0.55623966", "0.555896", "0.55425394", "0.5525092", "0.55137867", "0.55074143", "0.54833007", "0.5480802", "0.5476649", "0.5473701", "0.5473701", "0.54699826", "0.5466696", "0.5462756", "0.5456728", "0.54524153", "0.54418117", "0.54401815", "0.5439957", "0.5430045", "0.54285634", "0.5427966", "0.54243433", "0.5423546", "0.54199106", "0.5417669", "0.5412518", "0.5410005", "0.54095596", "0.5403282", "0.5402495", "0.5396388", "0.5389012", "0.53887534", "0.5385201", "0.53713536", "0.5370207", "0.5363877", "0.5363877", "0.5363877", "0.5363877", "0.5363877", "0.5363877", "0.5363877", "0.5363877", "0.5357095", "0.5351375", "0.5337612", "0.5337612", "0.5337612", "0.5337061", "0.533424", "0.53335494", "0.53298753", "0.5323606", "0.53089213", "0.5305234", "0.5302923", "0.52981865", "0.52829003", "0.5275255", "0.5271688", "0.52713764", "0.52468765", "0.5234536", "0.52337" ]
0.0
-1
Show the form for creating a new resource.
public function __construct(){ $this->middleware('auth', ['only'=>['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
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
Set basic widget options and call parent class construct
public function __construct() { parent::__construct( 'eltd_weather_widget', // Base ID esc_html__('Elated Weather Widget','newsroom') // Name ); $this->setParams(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __construct() {\n\n\t\t// Widget Handle\n\t\t$this->ID = 'example-widget';\n\n\t\t// Widget Config\n\t\t$this->options = array(\n\t\t\t'name' => 'Example Widget', // Widget name\n\t\t\t'description' => 'Widget description.', // Widget description\n\t\t\t'classname' => 'projects-cycle-widget' // CSS class\n\t\t);\n\n\t\t// Default values for widget fields\n\t\t$this->defaults = array(\n\t\t\t'widget_title' => 'My Example Widget',\n\t\t\t'sample_field' => 'Some value'\n\t\t);\n\n\t\tparent::__construct();\n\n\t}", "public function __construct() {\n\t\t// widget actual processes\n\t\t\n\t\tparent::__construct(\n\t\t\t'xtreme_example_widget', // Base ID\n\t\t\t__( 'Xtreme Example Widget Title', XF_TEXTDOMAIN ), // Name\n\t\t\tarray( 'description' => __( 'A Foo Widget', XF_TEXTDOMAIN ), ) // Args\n\t\t);\n\t}", "public function _init() {\n parent::_init();\n if(empty($this->options))\n \t $this->options = [];\n \tif (empty($this->options['class']))\n \t $this->options['class'] = '';\n \t$this->add_option($this->options['class'], 'btn');\n }", "function __construct() {\n\t\tparent::__construct(\n\t\t\t'broker_widget', // Base ID\n\t\t\t__( 'Broker Options', 'text_domain' ), // Name\n\t\t\tarray( 'description' => __( 'Display Broker Widget', 'text_domain' ), ) // Args\n\t\t);\n\t}", "public function __construct() {\n\t\tparent::__construct(\n\t\t\t'edgtf_raw_html_widget',\n\t\t\tesc_html__( 'Edge Raw HTML Widget', 'fluid' ),\n\t\t\tarray( 'description' => esc_html__( 'Add raw HTML holder to widget areas', 'fluid' ) )\n\t\t);\n\t\t\n\t\t$this->setParams();\n\t}", "public function __construct()\n {\n $widget_ops = array(\n 'classname' => 'cs_widget',\n 'description' => 'CSWidget is awesome',\n );\n parent::__construct('cs_widget', 'CS Widget', $widget_ops);\n }", "public function __construct()\n {\n parent::__construct(\"ahana_about_event_or_classes_widget\", __(\"About event or classes\", \"ahana\"), [\n \"classname\" => \"about_event_or_classes-widget\",\n\t\t\t\"description\" => __(\"Display informations on an event or a classes.\", \"ahana\"),\n\t\t\t\"customize_selective_refresh\" => true,\n ]);\n\n $this->fields = [\n \"title\" => __(\"Title\", \"ahana\"),\n \"post_type\" => __(\"Post type\", \"ahana\")\n ];\n\t}", "function __construct()\n\t{\n\t\tparent::__construct(\n\t\t\t'jetty_widget_button_text',\n\t\t\t__('Jetty Widget - Andeavor Button Text Box', 'jetty'),\n\t\t\tarray( 'description' => __( 'This widget for display text and button', 'jetty' ), )\n\t\t);\n\t}", "function __construct() {\n\t\tparent::__construct(\n\t\t\t'getresponse-widget',\n\t\t\t__( 'GetResponse Web Form', 'Gr_Integration' ),\n\t\t\tarray( 'description' => __( 'Dispaly a GetResponse Web Form on your site.', 'Gr_Integration' ), )\n\t\t);\n\t}", "function __construct() {\n $widget_options = array(\n 'classname' => 'hc_widget_class',\n 'description' => 'Widget that displays an author\\'s bio.'\n );\n parent::__construct( 'hc_widget', 'Bio Widget', $widget_options );\n }", "public function __construct() {\n\t\t$option = array(\n\t\t\t'classname' => 'RPG_UpcomingWebinars',\n\t\t\t'description' => 'RPG - Upcoming Webinars'\n\t\t);\n\n\t\t$this->WP_Widget('RPG_UpcomingWebinars', 'RPG - Upcoming Webinars', $option);\n\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->setAdapter(new TJuiControlAdapter($this));\n\t}", "public function __construct() {\n\t\t$fields = [ 'title', 'link', 'classes' ];\n\n\t\t$this->setFields( $fields );\n\n\t\t$widget_ops = [\n\t\t\t'classname' => 'CLW_Widget',\n\t\t\t'description' => 'Custom link widget',\n\t\t];\n\t\tparent::__construct( 'clw_widget', 'CLW Widget', $widget_ops );\n\t}", "function __construct(){\n\t\t$this->options();\n\t}", "public function __construct() {\n\t\t$option = array(\n\t\t\t'classname' => 'RPG_Twitter',\n\t\t\t'description' => 'RPG - Twitter Widget'\n\t\t);\n\n\t\t$this->WP_Widget('RPG_Twitter', 'RPG - Twitter', $option);\n\n\t}", "function __construct() {\n\t\tparent::__construct(\n\t\t\t'Compound_Calculator_Widget', // Base ID\n\t\t\t__( 'compound Calculator Widget', 'cc_domain' ), // Name\n\t\t\tarray( 'description' => __( 'Widget lets users Calculate Compound Interest', 'text_domain' ), ) // Args\n\t\t);\n\t}", "function __construct() {\n\t\tparent::__construct( false, 'Faceting: Options' );\n\t}", "function __construct() {\n\t\tparent::__construct( false, 'Faceting: Options' );\n\t}", "public function __construct() {\n\n\t\tparent::__construct( 'Mlp_Widget', __( 'Language Switcher', 'multilingual-press' ), array(\n\t\t\t'classname' => 'mlp_widget',\n\t\t\t'description' => __( 'MultilingualPress Translations', 'multilingual-press' ),\n\t\t\t'customize_selective_refresh' => true,\n\t\t) );\n\n\t\t// Enqueue style if widget is active (appears in a sidebar) or if in Customizer preview.\n\t\tif ( is_active_widget( false, false, $this->id_base ) || is_customize_preview() ) {\n\t\t\t// Do NOT use wp_enqueue_scripts here as require_style() implicitly hooks into this.\n\t\t\tadd_action( 'template_redirect', array( $this, 'require_style' ) );\n\t\t}\n\t}", "public function __construct() {\n\t\t$widget_ops = array( \n\t\t\t'classname' => 'my_widget',\n\t\t\t'description' => 'My Widget is awesome',\n\t\t);\n\t\tparent::__construct( 'social_media_widget', 'Social Media', $widget_ops );\n\t}", "public function __construct() {\n parent::__construct( 'Test_Widget', 'Widget Test', [\n 'classname' => 'Test_Widget',\n 'description' => 'Test Widget is awesome'\n ] );\n }", "public function MyWidget() {\n\t\t// Instantiate the parent object\n\t\t\n\t\tparent::__construct(\n\t\t\t'show_base_value', // Base ID\n\t\t\t__( 'Visualizza info base', 'Widget che visualizza informazioni base dell\\'azienda' ), // Name\n\t\t\tarray( 'description' => __( 'Visualizza info base', 'Una bella descrizione del mio piccolo widget' ), ) // Args\n\t\t);\n\t\n\t}", "function __construct() {\n\t\tparent::__construct(\n\t\t\t'askthelawyer_widget', // Base ID\n\t\t\t__('Ask the lawyer', 'piananotizie'), // Name\n\t\t\tarray( 'description' => __( 'Show widget ask the lawyer', 'piananotizie' ), ) // Args\n\t\t);\n\t}", "public function __construct()\r\n {\r\n $widget_ops = array(\r\n 'classname' => 'sunset-profile-widget',\r\n 'description' => 'Custom Widget for Profile'\r\n );\r\n\r\n parent::__construct('sunset_widget', 'Sunset Widget', $widget_ops);\r\n }", "function __construct() {\n $options = array('classname' => 'jwSubmitMessage', 'description' => \"Theme-based Submit message\");\n $controls = array('width' => 250, 'height' => 200);\n parent::__construct('jwSubmitMessage', 'J&W - Submit Message Widget', $options, $controls);\n }", "public function __construct() {\n\t\t\t//\n\t\t\tparent::__construct(\n\t\t\t\t'zthemename_social_media',\n\t\t\t\tesc_html__( 'Social Media', 'zthemename' ),\n\t\t\t\tarray(\n\t\t\t\t\t'description' => esc_html__( \"Displays your business' social media links\", 'zthemename' ),\n\t\t\t\t\t'customize_selective_refresh' => true,\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t//write_log( get_option( $this->option_name ) );\n\n\t\t\t\n\t\t\t//if ( is_active_widget( false, false, $this->id_base ) ) {\n\t\t\t\t//write_log( $this );\n\t\t\t\t//write_log( get_option( $this->option_name ) );\n\t\t\t//}\n\t\t\t\n\t\t}", "function __construct() {\n\t\t$widget_ops = array( 'classname' => 's2_form_widget', 'description' => esc_html__( 'Sidebar Widget for Subscribe2', 'subscribe2' ) );\n\t\t$control_ops = array( 'width' => 250, 'height' => 300 );\n\t\tparent::__construct( 's2_form_widget', esc_html__( 'Subscribe2 Widget', 'subscribe2' ), $widget_ops, $control_ops );\n\t}", "function __construct($options = array()){\n\t\tparent::__construct($options);\n\t}", "public function init()\n {\n parent::init();\n $this->clientOptions = false;\n Html::addCssClass($this->options, ['widget' => 'btn']);\n }", "public function init()\n {\n // Initialize widget.\n }", "public function init(){\n /*you can set initial default values and other stuff here.\n * it's also a good place to register any CSS or Javascript your\n * widget may need. */ \n }", "public function __construct() {\n\t\tparent::__construct(\n\t \t\t'property_map_widget', // Base ID\n\t\t\t'Porperty Map', // Name\n\t\t\tarray( 'description' => __( 'Property Map Widget', DOMAIN ), ) // Args\n\t\t);\n\t}", "public function __construct() {\r\n\t\t// configure and instantiate the widget options\r\n\t\t$widget_options = array(\r\n\t\t\t\"classname\" => \"ns_widget_postselect\",\r\n\t\t\t\"description\" => __(\"Add a list of posts.\", \"notsalmon\")\r\n\t\t);\r\n\t\tparent::__construct(\"ns_widget_postselect\", __(\"NS Post Selections\", \"notsamon\"), $widget_options);\r\n\r\n\t\t// We need to do this to match how Thrive does it. This is to ensure that the Thrive Clever \r\n\t\t// Widgets functionality works properly. Any time a post is added/removed/edited, we need the \r\n\t\t// Thrive Widget Display Options to update accordingly.\r\n\t\tadd_action(\"save_post\", array(&$this, \"flush_widget_cache\"));\r\n\t\tadd_action(\"deleted_post\", array(&$this, \"flush_widget_cache\"));\r\n\t\tadd_action(\"switch_theme\", array(&$this, \"flush_widget_cache\"));\r\n\t}", "function __construct() {\n\n\t\t//Call the parent constructor with the required arguments.\n\t\tparent::__construct(\n\t\t\t// The unique id for your widget.\n\t\t\t'apt_blueprint',\n\n\t\t\t// The name of the widget for display purposes.\n\t\t\t__('APT Blueprint', 'textdomain'),\n\n\t\t\t// The $widget_options array, which is passed through to WP_Widget.\n\t\t\t// It has a couple of extras like the optional help URL, which should link to your sites help or support page.\n\t\t\tarray(\n\t\t\t\t'description' => __('This widget is intended to be overrided', 'textdomain'),\n\t\t\t\t'help' => 'http://example.com/hello-world-widget-docs',\n\t\t\t\t'panels_groups' => array('apt_widgets'),\n\t\t\t),\n\n\t\t\t//The $control_options array, which is passed through to WP_Widget\n\t\t\tarray(\n\t\t\t),\n\n\t\t\t//The $form_options array, which describes the form fields used to configure SiteOrigin widgets. We'll explain these in more detail later.\n\t\t\tarray(\n\t\t\t\t'text' => array(\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => __('text.', 'textdomain'),\n\t\t\t\t\t'default' => 'default text'\n\t\t\t\t),\n\t\t\t\t'background_color' => array(\n\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t'label' => __('background color.', 'textdomain'),\n\t\t\t\t\t'default' => '#f1f1f1'\n\t\t\t\t),\n\t\t\t\t$this->get_float_id() => $this->get_float_options(),\n\t\t\t\t$this->get_media_query_id() => $this->get_media_query_options(),\n\t\t\t),\n\n\t\t\t//The $base_folder path string.\n\t\t\tplugin_dir_path(__FILE__)\n\t\t);\n\t}", "public function __construct() {\r\n $widget_options = array( \r\n 'classname' => 'a_resorucespace_widget',\r\n 'description' => 'Resourcespace Widget',\r\n );\r\n parent::__construct( 'example_widget', 'Resourcespace Widget', $widget_options );\r\n }", "function __construct() {\n // Instantiate the parent object.\n parent::__construct( false, __( 'NY Times Articles Widget', 'textdomain' ) );\n }", "public function __construct() {\n\t\tparent::__construct(\n\t \t\t'star_review_widget', // Base ID\n\t\t\t'Star Review Widget', // Name\n\t\t\tarray( 'description' => __( 'Star Review Widget description', 'wrb' ), ) // Args\n\t\t);\n\t}", "public function __construct()\n {\n $sPluginClass = preg_replace(\"/Widget$/\", 'Plugin', get_class($this));\n $this->oPlugin = new $sPluginClass;\n\t\tparent::__construct\n (\n\t\t\t$this->oPlugin->pluginId() . '_widget',\n\t\t\t__($this->oPlugin->pluginName() . ' Widget', $this->oPlugin->textDomain()),\n\t\t\t['description' => __($this->oPlugin->pluginDescription(), $this->oPlugin->textDomain())]\n\t\t);\n\t}", "public function __construct() {\n parent::__construct(\n 'eltdf_social_icon_widget',\n esc_html__('Elated Social Icon Widget', 'superfood'),\n array( 'description' => esc_html__( 'Add social network icons to widget areas', 'superfood'))\n );\n\n $this->setParams();\n }", "public function __construct()\n\t{\n\t\t$widget_ops = array( \n\t\t\t'classname' => 'Widget_Testimonial',\n\t\t\t'description' => 'Testimonial widget',\n\t\t\t);\n\t\tparent::__construct( 'Widget_Testimonial', 'Widget Testimonial', $widget_ops );\n\t}", "function __construct() {\n\t\t$this->defaults = array(\n\t\t\t'title'\t\t\t=> 'RS Category Feeds',\n\t\t\t'categories'\t=> ''\n\t\t);\n\n\t\t$widget_ops = array(\n\t\t\t'classname' => 'rs-category-widget',\n\t\t\t'description' => __( 'RSS Feeds by selected categories.', THEME_DOMAIN )\n\t\t);\n\n\t\t$control_ops = array(\n\t\t\t'id_base' => 'rs-category-widget',\n\t\t\t'width' => 240,\n\t\t\t'height' => 300\n\t\t);\n\n\t\t$this->WP_Widget( 'rs-category-widget', __( 'Category Feed Links', THEME_DOMAIN ), $widget_ops, $control_ops );\n\t}", "function __construct() {\r\n\t\tparent::__construct(\r\n\t\t\t'btc_live_rate_widget', // Base ID\r\n\t\t\tesc_html__( 'BTC Live Rate', 'text_domain' ), // Name\r\n\t\t\tarray( 'description' => esc_html__( 'BTC live rate widget', 'text_domain' ), ) // Args\r\n\t\t);\r\n\t}", "function __construct() \n {\n\t\t/* Widget settings. */\n\t\t$widget_ops = array( 'classname' => 'newsletter-signup', 'description' => 'EK newsletter subscription box.' );\n\n\t\t/* Widget control settings. */\n\t\t$control_ops = array('newsletter-signup');\n\n\t\t/* Create the widget. */\n\t\tparent::WP_Widget( 'newsletter-signup', 'EK Newsletter Signup', $widget_ops, $control_ops );\n }", "function __construct() {\n\t\tparent::__construct(\n\t\t\t'ib_act_widget', // Base ID\n\t\t\tesc_html__( 'IB Activity Widget', 'text_domain' ), // Name\n\t\t\tarray( 'description' => esc_html__( 'A Foo Widget', 'text_domain' ), ) // Args\n\t\t);\n\t}", "function __construct() {\n parent::__construct( false, 'GE Custom Slider Widget' );\n }", "function __construct(){\r\r\n\t\t\t$widget_ops = array( 'description' => esc_html__('Our short description .','ftagementor'),'customize_selective_refresh' => true, );\r\r\n\t\t\tparent:: __construct('ftagementor_description_Widget', esc_html__('Ftage: Short Description','ftagementor'),$widget_ops );\r\r\n\t\t}", "function __construct() {\n\t\tparent::__construct(\n\t\t\t'BannerFull_Widget', // Base ID\n\t\t\tesc_html__( 'BannerFull Widget', 'text_domain' ), // Name\n\t\t\tarray( 'description' => esc_html__( 'A BannerFull Widget', 'text_domain' ), ) // Args\n\t\t);\n\t}", "function __construct() {\n\n //Call the parent constructor with the required arguments.\n parent::__construct(\n // The unique id for your widget.\n 'sayidan_Application_widget',\n\n // The name of the widget for display purposes.\n esc_html__('Sayidan Application', 'sayidan'),\n\n // The $widget_options array, which is passed through to WP_Widget.\n // It has a couple of extras like the optional help URL, which should link to your sites help or support page.\n array(\n 'description' => esc_html__('Create Application Section', 'sayidan'),\n 'panels_groups' => array('sayidan'),\n 'help' => 'http://sayidan_docs.kenzap.com',\n ),\n\n //The $control_options array, which is passed through to WP_Widget\n array(\n ),\n\n //The $form_options array, which describes the form fields used to configure SiteOrigin widgets. We'll explain these in more detail later.\n array(\n 'title' => array(\n 'type' => 'text',\n 'label' => esc_html__('Application title', 'sayidan'),\n 'default' => ''\n ),\n 'form_id' => array(\n 'type' => 'text',\n 'label' => esc_html__('Form ID', 'sayidan'),\n 'description' => esc_html__('Go to Contact > Contact Forms to find your form id. Add custom fields there. Follow contact form 7 documentation.', 'sayidan'),\n 'default' => ''\n ),\n \n\n\n ),\n\n //The $base_folder path string.\n plugin_dir_path(__FILE__)\n );\n }", "public function __construct() {\n $widget_ops = array('classname' => 'widget_agents', 'description' => __('Arbitrary text or HTML.', 'cozy'));\n parent::__construct('wt_cozy_agents', __('Cozy Sidebar Agents', 'cozy'), $widget_ops);\n }", "function __construct() {\n\t\tadd_action( 'widgets_init', array( $this, 'register_ecp_widget' ) );\n\t\tparent::__construct(\n\t\t\t'ecp_widget', // Base ID\n\t\t\tesc_html__( 'Event Calendar Pro', 'event-calendar-pro' ),\n\t\t\tarray( 'description' => esc_html__( 'Show and Filters Events', 'event-calendar-pro' ) )\n\t\t);\n\t}", "function __construct() {\n\n\t\t$widget_ops = array( 'classname' => $this->css_class );\n\t\t$this->WP_Widget( $this->css_class, __( 'PROPER TEMPLATE', 'proper-widgets' ) , $widget_ops );\n\n\t\t// Widget options\n\t\t$this->widget_fields = array(\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Title', 'proper-widgets' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'id' => 'title',\n\t\t\t\t'description' => __( 'Title for this widget or leave blank for none', 'proper-widgets' ),\n\t\t\t\t'default' => '',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Body text', 'proper-widgets' ),\n\t\t\t\t'type' => 'textarea',\n\t\t\t\t'id' => 'body_text',\n\t\t\t\t'default' => '',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'label' => __( 'A number', 'proper-widgets' ),\n\t\t\t\t'type' => 'number',\n\t\t\t\t'id' => 'number',\n\t\t\t\t'default' => 5\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Some select options', 'proper-widgets' ),\n\t\t\t\t'type' => 'select_assoc',\n\t\t\t\t'id' => 'select_option',\n\t\t\t\t'default' => '1',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'1' => __( 'One', 'proper-widgets' ),\n\t\t\t\t\t'2' => __( 'Two', 'proper-widgets' ),\n\t\t\t\t\t'3' => __( 'Three', 'proper-widgets' ),\n\t\t\t\t\t'4' => __( 'Four', 'proper-widgets' ),\n\t\t\t\t)\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Yes or no?', 'proper-widgets' ),\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'id' => 'yesno',\n\t\t\t\t'default' => 1\n\t\t\t),\n\n\t\t);\n\n\t}", "public function __construct() {\n\t\tparent::__construct(\n\t\t\tfalse,\n\t\t\t'Testimonials',\n\t\t\tarray( 'description' => 'My Testimonials Widget' )\n\t\t);\n\t}", "function __construct() {\n\t\tparent::__construct(\n\t\t\t'widget_rada', // Base ID\n\t\t\t__( 'Book Rada repair service for Home appliances', 'text_domain' ), // Name\n\t\t\tarray( 'description' => __( 'A Rada Widget', 'text_domain' ), ) // Args\n\t\t);\n\t}", "public function __construct() {\n\t\t$widget_ops = array( \n\t\t\t'classname' => 'birdmash_widget',\n\t\t\t'description' => 'Multiuser Twitter Mashup',\n\t\t);\n\t\tparent::__construct( 'birdmash_widget', 'Birdmash Widget', $widget_ops );\n\t}", "public function __construct() {\n parent::__construct(\n 'gymfitness_widget', // Base ID\n 'Gym Fitness Clases Widget', // Name\n array( 'description' => __( 'Texto ejemplo', 'text_domain' ), ) // Args\n );\n }", "protected function _construct()\n {\n parent::_construct();\n $this->setTemplate(self::TEMPLATE);\n }", "function __construct() {\n\t\tparent::__construct(\n\t\t\t/** Widget ID */\n\t\t\t'bootstrap_side_nav_widget',\n\t\t\t/** Widget name for widget UI */\n\t\t\t__( 'Bootstrap Navigation', 'idaho-webmaster' ),\n\t\t\t/** Description of the widget. */\n\t\t\tarray( 'description' => __( 'Navigation for the sidebar and Footer. Can be primary or submenu.', 'idaho-webmaster' ) )\n\t\t);\n\t}", "function __construct() {\n\t\tparent::__construct(\n\t\t\t'services_widget', // Base ID\n\t\t\t__('Services Widget', 'graff'), // Name\n\t\t\tarray( 'description' => __( 'All Services', 'graff' ), ) // Args\n\t\t);\n\t}", "function __construct($options = null) \r\n\t{ \r\n\t\tparent::__construct($options); \r\n\t}", "function __construct() {\n\t\tparent::__construct(\n\t \t\t'dgroups_api_widget', // Base ID\n\t\t\t'Dgroups Api Widget', // Name\n\t\t\tarray( 'description' => __( 'Widget with current network status'), ) // Args\n\t\t);\n \n// add_action('admin_enqueue_scripts', array($this, 'upload_scripts'));\n// add_action('admin_enqueue_styles', array($this, 'upload_styles'));\n\t}", "function __construct() {\n\t\n\t\t/* Widget settings. */\n\t\t$widget_ops = array( 'classname' => 'hb_google_widget', 'description' => __('A widget that displays Google+ like box.', 'hbthemes') );\n\t\t$control_ops = array ();\n\t\t/* Create the widget. */\n\t\tparent::__construct( 'hb_google_widget', __('[HB-Themes] Google+ Box','hbthemes'), $widget_ops, $control_ops );\n\t}", "public function __construct() {\n\t\t$widget_opts = array(\n\t\t\t'classname' => 'widget-mh-facebook',\n\t\t\t'description' => esc_html__( 'Display facebook page', 'myhome-core' ),\n\t\t);\n\t\tparent::__construct( 'myhome-facebook-widget', esc_html__( 'MH Facebook', 'myhome-core' ), $widget_opts );\n\t}", "public function __construct() {\n $widget_ops = array(\n 'classname' => 'service_box',\n 'description' => 'Service Box wedget',\n );\n parent::__construct( 'service_box', 'Service Box', $widget_ops );\n }", "public function __construct() {\r\n parent::__construct(\r\n 'gallery_widget', //base ID\r\n __('Gallery', 'text_domain'), //name\r\n array( 'description' => __( 'A gallery widget', 'text_domain' ), ) //argumanets to pass\r\n );\r\n}", "function __construct() {\n parent::__construct(\n 'cwts_widget', // Base ID\n __('CWTS Widget', CWTS_TEXT_DOMAIN), // Name OF widget\n array('description' => __('CWTS Widget', CWTS_TEXT_DOMAIN)) // Args For Widget\n );\n }", "function __construct() \n\t{\t\t\n\t\tparent::__construct(\n\t\t\t'widget-image-box', \n\t\t\t__('Image box'), \n\t\t\tarray( \n\t\t\t\t'description' => __('Add a promo image box to sidebar.'), \n\t\t\t\t'classname' => 'b-box-info_image'\n\t\t\t)\n\t\t);\n\t}", "function __construct()\n\t{\n\t\tparent::__construct(\n\t\t\t'jetty_widget_promo',\n\t\t\t__('Jetty Promo', 'jetty'),\n\t\t\tarray( 'description' => __( 'This widget for display promo section on certain page', 'jetty' ), )\n\t\t);\n\t}", "public function __construct() {\n parent::__construct(\n 'an_catlinks_widget', // ID of the widget\n esc_html__('Categories Links Widget', 'an_catlinks_wiget'), // Widget title\n array(\n 'description' => esc_html__('The widget allow to insert a block of the iconic links for 3 categories', 'an_catlinks_wiget'),\n )\n );\n\n // enqueue scripts for media library\n add_action( 'admin_enqueue_scripts', array( $this, 'allow_media_upload' ) );\n // enqueue enqueue styles\n add_action('wp_enqueue_scripts', array($this, 'enqueue_styles'));\n // customize styles\n if (!is_admin()) {\n add_action('wp_head',array($this, 'customize_css'));\n }\n }", "public function __construct() {\n\t\t// widget actual processes\n\t\tparent::__construct(\n\t\t\t'odm_list_related_content_widget',\n\t\t\t__('ODM Related Content Widget', 'odm'),\n\t\t\tarray('description' => __('Displays content related to the current post with different templates', 'odm'))\n\t\t);\n\n\t\t$this->types = $this->generate_types();\n\t}", "function ShopNowWidget() {\n\t\tparent::__construct( false, 'Shop Now Widget' );\n\t}", "function __construct(){\n\t\tadd_filter('lasso_custom_options',\t\tarray($this,'options'));\n\n\t\t// if you arent using aesop story engine then this filter isnt needed\n\t\tadd_filter('aesop_avail_components',\tarray($this, 'options') );\n\t}", "public function __construct() {\n\n\t\t// Load plugin text domain\n\t\tadd_action( 'init', array( $this, 'load_plugin_textdomain' ) );\n\n\t\t// Activate plugin when new blog is added\n\t\tadd_action( 'wpmu_new_blog', array( $this, 'activate_new_site' ) );\n\n\t\tadd_shortcode('grams', array( &$this, 'shortcode') );\n\t\tadd_action('wp_enqueue_scripts', array( &$this, 'enqueue_scripts') );\n\n\t\t// widget\n\t\t$this->widget = new Simple_Grams_Widget();\n\t\tadd_action( 'widgets_init', array( &$this, 'simple_grams' ) );\n\n\t}", "public function __construct() {\n\t\tparent::__construct(\n\t\t\t'property_map_widget', // Base ID\n\t\t\t__( 'Property Map Widget', 'agentpress' ), // Name\n\t\t\tarray( 'description' => __( 'Displays a Google Map with markers for each property listing on the site.', 'agentpress' ), ) // Args\n\t\t);\n\t}", "public function __construct()\n {\n Kirki::add_config(\n self::$config,\n array(\n 'capability' => 'edit_theme_options',\n 'option_type' => 'theme_mod',\n 'disable_output' => false,\n )\n );\n\n /**\n * Set up the panel\n */\n new Panel(\n self::$panel,\n array(\n 'priority' => 30,\n 'title' => esc_attr__('Footer', 'stage'),\n 'description' => esc_attr__('Customize the footer.', 'stage'),\n )\n );\n\n /**\n * Init sections with fields\n */\n $this->colors();\n $this->settings();\n }", "function __construct() {\n\t\tparent::__construct(\n\t\t\t'truman_sign_clock_widget',\n\t\t\t__( 'Clock Widget', 'truman-digital-sign-theme' ),\n\t\t\tarray( 'description' => __( 'Shows a clock with time and date', 'truman-digital-sign-theme' ), )\n\t\t);\n\t}", "protected function __construct()\n {\n parent::__construct();\n $this->initCommands = array();\n $this->additionalCode = array();\n $this->plugins = array();\n\n $this->fns['name'] = $this->fns['prototype'] = $this->fns['body'] = array();\n\n $this->fTheme = fTheme::getInstance();\n $this->fTheme->onBuild('Singleton', 'fjQuery', 'build', 99);\n }", "public function __construct($options)\n {\n parent::__construct($options);\n }", "public function __construct() {\r\n\t\tparent::__construct(\r\n\t \t\t'amzrp_widget', // Base ID\r\n\t\t\t'Amazon Related Products', // Name\r\n\t\t\tarray( 'description' => __( 'Amazon Related Products Widget based on your keywords') ) // Args\r\n\t\t);\r\n\t}", "public function __construct($options = array()){ \r\n $this->setOptions($options);\r\n }", "public function __construct() {\n $widget_ops = array( \n 'class_name' => 'msdlab-contributor',\n 'description' => 'Display a random Contributor (Expert)',\n );\n parent::__construct( 'msdlab-contributor', 'Contributor Widget', $widget_ops );\n }", "function __construct() {\n $widget_ops = array( 'classname' => 'wplms_student_activity', 'description' => __('Student Customize activity', 'wplms-dashboard') );\n $control_ops = array( 'width' => 300, 'height' => 350, 'id_base' => 'wplms_student_activity' );\n parent::__construct( 'wplms_student_activity', __(' DASHBOARD : Student Customize Activity', 'wplms-dashboard'), $widget_ops, $control_ops );\n }", "function __construct() {\r\n\t\r\n\t\t/* Widget settings. */\r\n\t\t$widget_ops = array( 'classname' => 'tz_homepage_products', 'description' => __('A widget that displays products on homepage.', 'framework') );\r\n\r\n\t\t/* Widget control settings. */\r\n\t\t$control_ops = array( 'width' => 250, 'height' => 350, 'id_base' => 'tz_homepage_products' );\r\n\r\n\t\t/* Create the widget. */\r\n\t\tparent::__construct( 'tz_homepage_products', __('COMPARE: Homepage Products Widget', 'framework'), $widget_ops, $control_ops );\r\n\t}", "public function __construct()\r\n {\r\n $this->view = new stdClass;\r\n $this->view->placeHolder = $this->placeHolder;\r\n $this->view->settingOptionName = $this->settingOptionName;\r\n }", "function __construct() {\n\t\tif(is_customize_preview()){$widgetname = __( 'Advance Posts Widget', 'advance' ); }else{ $widgetname = __( 'Advance Posts Widget', 'advance' ); }\n\t\tparent::__construct( 'advance_front_posts', $widgetname, array(\n\t\t\t'classname' => 'advance_front_posts postsblck',\n\t\t\t'description' => __( 'This Widget lets you display WordPress Posts', 'advance' ),\n\t\t\t'customize_selective_refresh' => true,\n\t\t) );\n\t\t\n\t}", "function __construct() {\n\n\t\t//Call the parent constructor with the required arguments.\n\t\tparent::__construct(\n\t\t\t// The unique id for your widget.\n\t\t\t'akvo-button-widget',\n\n\t\t\t// The name of the widget for display purposes.\n\t\t\t__('Akvo Button', 'siteorigin-widgets'),\n\n\t\t\t// The $widget_options array, which is passed through to WP_Widget.\n\t\t\t// It has a couple of extras like the optional help URL, which should link to your sites help or support page.\n\t\t\tarray(\n\t\t\t\t'description' => __('Button that opens a modal box', 'siteorigin-widgets'),\n\t\t\t\t'help' => '',\n\t\t\t),\n\n\t\t\t//The $control_options array, which is passed through to WP_Widget\n\t\t\tarray(),\n\n\t\t\t//The $form_options array, which describes the form fields used to configure SiteOrigin widgets. We'll explain these in more detail later.\n\t\t\tarray(\n\t\t\t\t'text' => array(\n\t\t\t\t\t'type' \t=> 'text',\n\t\t\t\t\t'label' => __( 'Text for Button', 'siteorigin-widgets' ),\n\t\t\t\t),\n\t\t\t\t'is_modal' => array(\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'label' => __( 'Open Modal Box', 'siteorigin-widgets' ),\n\t\t\t\t\t'default' => false,\n\t\t\t\t\t'state_emitter' => array(\n\t\t\t\t\t\t'callback' \t=> 'conditional',\n\t\t\t\t\t\t'args' \t\t=> array( \n\t\t\t\t\t\t\t'is_modal[active]: val',\n\t\t\t\t\t\t\t'is_modal[inactive]: !val' \n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'modal_builder' => array(\n\t\t\t\t\t'type' \t=> 'builder',\n\t\t\t\t\t'label' => __( 'Modal Content', 'siteorigin-widgets'),\n\t\t\t\t\t'state_handler' => array(\n\t\t\t\t\t\t'is_modal[active]' \t=> array('show'),\n\t\t\t\t\t\t'_else[is_modal]' \t=> array('hide'),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'link' => array(\n\t\t\t\t\t'type' => 'link',\n\t\t\t\t\t'label' => __('Button URL', 'widget-form-fields-text-domain'),\n\t\t\t\t\t'default' => 'http://www.example.com',\n\t\t\t\t\t'state_handler' => array(\n\t\t\t\t\t\t'is_modal[active]' \t=> array('hide'),\n\t\t\t\t\t\t'_else[is_modal]' \t=> array('show'),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'type' => array(\n\t\t\t\t\t'type' \t\t=> 'select',\n\t\t\t\t\t'label' \t=> __( 'Button Type', 'siteorigin-widgets' ),\n\t\t\t\t\t'default' \t=> 'noclass',\n\t\t\t\t\t'options' \t=> $this->get_button_types() \n\t\t\t\t),\n\t\t\t\t'align' => array(\n\t\t\t\t\t'type' \t\t=> 'select',\n\t\t\t\t\t'label' \t=> __( 'Alignment', 'siteorigin-widgets' ),\n\t\t\t\t\t'default' \t=> 'text-left',\n\t\t\t\t\t'options' \t=> array(\n\t\t\t\t\t\t'text-left'\t\t=> 'Align to left',\n\t\t\t\t\t\t'text-center'\t=> 'Align to center',\n\t\t\t\t\t\t'text-right'\t=> 'Align to right'\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t),\n\n\t\t\t//The $base_folder path string.\n\t\t\tplugin_dir_path(__FILE__)\n\t\t);\n\t}", "public function __construct() {\n // 表示部分で使うオブジェクトを作成\n $this->initDisplayObj();\n }", "public function __construct() {\r\n\r\n $this->defaults = array(\r\n 'title' => __(\"Advert Categories\", \"adverts\"),\r\n 'show_count' => 1,\r\n 'hide_empty' => 1,\r\n 'top_only' => 0,\r\n 'multi_level' => 0,\r\n );\r\n \r\n \r\n parent::__construct(\r\n 'wpadverts-widget-categories', \r\n __(\"Advert Categories\", \"adverts\"),\r\n array(\r\n \"description\"=> __(\"Displays list of available categories.\", \"adverts\"),\r\n \"classname\" => 'wpadverts-widget-categories'\r\n )\r\n );\r\n \r\n }", "function __construct() {\n\n\t\t$this->defaults = array(\n\t\t\t'title'\t\t\t\t => '',\n\t\t\t'openResultInTarget' => '_blank',\n\t\t\t'affiliateId' => '',\n\t\t\t'description' => '',\n\t\t\t'showPlaceholderText' => 'false',\n\t\t\t'placeholderText' => '',\n\t\t\t'disableEnterKey' => 'false',\n\t\t\t'hideSearchButton' => 'false',\n\t\t\t'searchButtonLabel' => __( 'Search', 'domainers-delight-search' ),\n\t\t\t'targetSite'\t\t\t=> 'sedo',\n\t\t\t'sedoWebsiteLanguage' => '',\n\t\t\t'sedoWebsiteSearchTLDs' => '',\n\t\t\t'sedoWebsiteSafeSearch' => 'false',\n\t\t\t'sedoWebsiteSearchVariations' => 'true'\n\t\t);\n\t\t\n\t\t$widget_ops = array(\n\t\t\t'classname' => 'user-profile',\n\t\t\t'description' => __( 'Domainers Delight: Search Sedo, Uniregistry or GoDaddy to find your domain name.', 'domainers-delight-search' ),\n\t\t);\n\n\t\t$control_ops = array(\n\t\t\t'id_base' => 'user-profile',\n\t\t\t'width' => 200,\n\t\t\t'height' => 250,\n\t\t);\n\n\t\tparent::__construct( 'user-profile', __( 'Domainers Delight - Search Widget', 'domainers-delight-search' ), $widget_ops, $control_ops );\n\n\t}", "public function __construct(){\n // 表示部分で使うオブジェクトを作成\n $this->initDisplayObj();\n }", "public function __construct() {\n\n\t\t// Register widget scripts\n\t\tadd_action( 'elementor/frontend/before_enqueue_scripts', [ $this, 'widget_scripts' ] );\n\n\n\t\tadd_action( 'elementor/frontend/after_register_styles', [ $this, 'widget_styles' ] );\n\n\t\t// Register widgets\n\t\tadd_action( 'elementor/widgets/widgets_registered', [ $this, 'register_widgets' ] );\n\t}", "function __construct() {\n parent::__construct(\n // The unique id for your widget.\n 'jlb-event-widget',\n // The name of the widget for display purposes.\n __('JLB Event Widget', 'jlb-event-widget-text-domain'),\n // The widget_options array, which is passed through to WP_Widget.\n // It has a couple of extras like the optional help URL, which should link to your sites help or support page.\n array(\n 'description' => __('JLB Event Widget', 'jlb-event-widget-text-domain'),\n ),\n //The base_folder path string.\n plugin_dir_path(__FILE__)\n );\n }", "public function widget( $args, $instance ){}", "public function __construct() {\n\n $widget_ops = array(\n 'classname' => 'ads-top-article',\n 'description' => 'Custom Widget For Ads in Top Article',\n );\n\n parent::__construct( 'ads-top-article', 'Ads Top Article 728 X 90', $widget_ops );\n\n }", "public function __construct( $options = array() ) {\n\n // Call parent constructor\n parent::__construct( $options );\n\n // Initialize the Renderer\n $this->initialize();\n }", "function __construct() {\n\n\t\t// haven't title in any location\n\t\t$this->with_title = true;\n\n\t\tparent::__construct(\n\t\t\t'bs-social-share',\n\t\t\tsprintf( __( '%s - Social Share', 'publisher' ), publisher_white_label_get_option( 'publisher' ) ),\n\t\t\tarray( 'description' => __( 'Social Share Widget', 'publisher' ) )\n\t\t);\n\t}", "protected function _construct()\r\n {\r\n parent::_construct();\r\n $this->setTemplate('placetopay/form.phtml');\r\n }", "function __construct() {\n $this->add_meta_box();\n }", "function __construct() {\n $widget_ops = array( 'classname' => 'wplms_dash_mymodules', 'description' => __('My Courses, Units, Quizzes, Assignments, Finished Courses widget for Dashboard', 'wplms-dashboard') );\n $control_ops = array( 'width' => 300, 'height' => 350, 'id_base' => 'wplms_dash_mymodules' );\n parent::__construct( 'wplms_dash_mymodules', __(' DASHBOARD : My Modules Widget', 'wplms-dashboard'), $widget_ops, $control_ops );\n }", "public function __construct() {\n\t\tparent::__construct();\n\n\t\t$this->disableRendering();\n\t}", "function __construct() {\n\t\tparent::__construct(\n\t\t\t'port_gallery', // Base ID\n\t\t\t__( 'Port Gallery', 'text_domain' ), // Name\n\t\t\tarray( 'description' => __( 'The portfolio gallery widget', 'text_domain' ), ) // Args\n\t\t);\n\t}" ]
[ "0.7353356", "0.73253137", "0.72680193", "0.72453433", "0.72325444", "0.71455973", "0.7096777", "0.7073983", "0.7057116", "0.703536", "0.7024676", "0.6992184", "0.6986105", "0.69786686", "0.697371", "0.6948472", "0.69445705", "0.69445705", "0.693425", "0.69292414", "0.6927676", "0.6912463", "0.69062334", "0.68950415", "0.6893135", "0.68743086", "0.6844949", "0.68432194", "0.6835522", "0.6819393", "0.6818195", "0.68087316", "0.680031", "0.6800259", "0.67917144", "0.67888314", "0.67787075", "0.67645997", "0.6760446", "0.67561024", "0.6741715", "0.67352504", "0.6733468", "0.67257434", "0.67249465", "0.6722773", "0.6722383", "0.6710851", "0.6708175", "0.6704278", "0.67023015", "0.6696841", "0.6693982", "0.6685199", "0.66837054", "0.66826755", "0.66746485", "0.66729707", "0.6665527", "0.6656893", "0.6645016", "0.6639105", "0.66362005", "0.6634987", "0.66346", "0.66340333", "0.66235816", "0.6619232", "0.6616866", "0.66037667", "0.660367", "0.65940964", "0.65898883", "0.6585866", "0.65792716", "0.6578528", "0.65783656", "0.6575721", "0.6570832", "0.65700555", "0.6563954", "0.6562058", "0.6559757", "0.65537465", "0.6550792", "0.6548566", "0.65455973", "0.6542005", "0.65305805", "0.652798", "0.6523988", "0.6523653", "0.6518533", "0.6517948", "0.6517636", "0.6515916", "0.6515899", "0.651504", "0.6509745", "0.65067863" ]
0.67757815
37
Prevent Magento from generating classes that we use to detect the Smile ES module
public function generateClass($className) { if ($className === 'Smile\ElasticsuiteCore\Search\Request\Query\QueryFactory') { return parent::GENERATION_SKIP; } return parent::generateClass($className); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function beforeToHtml()\n {\n if (!\\class_exists('Mage')) {\n class_alias('\\LCB\\Mage\\Framework\\Mage', 'Mage');\n }\n }", "function provide_import() {\n return false;\n }", "function power_seo_disabled() {\n\n\treturn defined( 'POWER_SEO_DISABLED' ) && POWER_SEO_DISABLED;\n\n}", "function shDisableJFModuleCaching()\n{\n\tShlSystem_Log::debug('sh404sef', 'Using deprecated shDisableJFModuleCaching, removed as not applicable anymore');\n\treturn;\n}", "function isUpgrade() {\n\t\tdie ('ABSTRACT CLASS');\n\t}", "public function getIgnoreModule() {\n\t\treturn array('cms', 'modulemanager', 'srbac', 'gii', 'thememanager');\n\t}", "function removeWhiteList($package, $editionCode)\n{\n $pathOfWhiteLists = __DIR__\n . '/../../../../tests/static/testsuite/Magento/Test/Integrity/_files/composer_require';\n\n $whiteList = include $pathOfWhiteLists . '/whitelist.php';\n $whiteListEE = include $pathOfWhiteLists . '/whitelist_ee.php';\n if ($editionCode === 'ee') {\n $whiteList = array_merge($whiteList, $whiteListEE);\n }\n $requiredPackages = (array) $package->get('require');\n foreach (array_keys($requiredPackages) as $requiredPackage) {\n if (!in_array($requiredPackage, $whiteList)) {\n $package->unsetProperty('require->' . $requiredPackage);\n }\n }\n return $package;\n}", "function power_seo_compatibility_check() {\n\n\tif ( power_detect_seo_plugins() ) {\n\t\tpower_disable_seo();\n\t}\n\n\tif ( ! power_is_wpseo_outputting_jsonld() && ! apply_filters( 'power_disable_microdata', false ) ) {\n\t\tinclude_once dirname( __FILE__ ) . '/schema.php';\n\t}\n\n\t// Disable Power <title> generation if SEO Title Tag is active.\n\tif ( function_exists( 'seo_title_tag' ) ) {\n\t\tremove_filter( 'wp_title', 'power_default_title', 10 );\n\t\tremove_action( 'power_title', 'wp_title' );\n\t\tadd_action( 'power_title', 'seo_title_tag' );\n\t}\n\n}", "function DS_Custom_Modules(){\n if(class_exists(\"ET_Builder_Module\")){\n \t// This adds options for more contact types and, with some clever css, a more flexible usage.\n\tinclude(\"ehanhanced_divi_modules/extended_person_module.php\");\n\n\t// This creates a hybrid blurb/cta. CTA's should have the option for images and more than one button. Sheesh!\n\tinclude(\"ehanhanced_divi_modules/extended_cta.php\");\n }\n}", "function disable_extension()\n\t{\n\t\tglobal $DB;\n\t\t$DB->query(\"DELETE FROM exp_extensions WHERE class = '\".$DB->escape_str(get_class($this)).\"'\");\n\t}", "function disable_extension()\n {\n ee()->db->where('class', __CLASS__);\n ee()->db->delete('extensions');\n }", "public function loadClass()\n {\n $this->indexSeoRules = array_map('trim',\n explode(',', $this->modx->getOption('mse2_seo_index_rules', [], null, true))\n );\n $this->indexSeoEmpty = (bool)$this->modx->getOption('mse2_seo_index_empty', [], 0);\n $this->seoFilterPro = (bool)$this->modx->getOption('seofilter_pro_mode', null, 0, true);\n $this->modx->addPackage('seofilter', $this->modx->getOption('seofilter_core_path', [],\n $this->modx->getOption('core_path').'components/seofilter/').'model/');\n\n if (!class_exists('mSearch2Seo')) {\n require_once MODX_CORE_PATH.'components/msearch2/model/msearch2/msearch2seo.class.php';\n }\n if (!$this->mSearch2) {\n $this->mSearch2 = new mSearch2Seo($this->modx, []);\n }\n\n $this->modx->sanitizePatterns['fenom'] = '#\\{.*\\}#si';\n\n $this->prepareClassesFields();\n\n return $this->mSearch2 instanceof mSearch2Seo;\n }", "function deactivate_custom_modules()\n{\n $db = Db::getInstance();\n $modulesDirOnDisk = [];\n $modules = scandir(_PS_MODULE_DIR_, SCANDIR_SORT_NONE);\n foreach ($modules as $name) {\n if (!in_array($name, ['.', '..', 'index.php', '.htaccess']) && @is_dir(_PS_MODULE_DIR_ . $name . DIRECTORY_SEPARATOR) && @file_exists(_PS_MODULE_DIR_ . $name . DIRECTORY_SEPARATOR . $name . '.php')) {\n if (!preg_match('/^[a-zA-Z0-9_-]+$/', $name)) {\n exit(Tools::displayError() . ' (Module ' . $name . ')');\n }\n $modulesDirOnDisk[] = $name;\n }\n }\n\n $module_list_xml = _PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'xml' . DIRECTORY_SEPARATOR . 'modules_list.xml';\n\n if (!file_exists($module_list_xml)) {\n $module_list_xml = _PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'modules_list.xml';\n if (!file_exists($module_list_xml)) {\n return false;\n }\n }\n\n $nativeModules = @simplexml_load_file($module_list_xml);\n if ($nativeModules) {\n $nativeModules = $nativeModules->modules;\n }\n $arrNativeModules = [];\n if (!empty($nativeModules)) {\n foreach ($nativeModules as $nativeModulesType) {\n if (in_array($nativeModulesType['type'], ['native', 'partner'])) {\n $arrNativeModules[] = '\"\"';\n foreach ($nativeModulesType->module as $module) {\n $arrNativeModules[] = '\"' . pSQL($module['name']) . '\"';\n }\n }\n }\n }\n $arrNonNative = [];\n if ($arrNativeModules) {\n $arrNonNative = $db->executeS('\n \t\tSELECT *\n \t\tFROM `' . _DB_PREFIX_ . 'module` m\n \t\tWHERE name NOT IN (' . implode(',', $arrNativeModules) . ') ');\n }\n\n $uninstallMe = ['undefined-modules'];\n if (is_array($arrNonNative)) {\n foreach ($arrNonNative as $k => $aModule) {\n $uninstallMe[(int) $aModule['id_module']] = $aModule['name'];\n }\n }\n\n if (!is_array($uninstallMe)) {\n $uninstallMe = [$uninstallMe];\n }\n\n foreach ($uninstallMe as $k => $v) {\n $uninstallMe[$k] = '\"' . pSQL($v) . '\"';\n }\n\n $return = Db::getInstance()->execute('\n\tUPDATE `' . _DB_PREFIX_ . 'module` SET `active` = 0 WHERE `name` IN (' . implode(',', $uninstallMe) . ')');\n\n if (count(Db::getInstance()->executeS('SHOW TABLES LIKE \\'' . _DB_PREFIX_ . 'module_shop\\'')) > 0) {\n foreach ($uninstallMe as $k => $uninstall) {\n $return &= Db::getInstance()->execute('DELETE FROM `' . _DB_PREFIX_ . 'module_shop` WHERE `id_module` = ' . (int) $k);\n }\n }\n\n return $return;\n}", "public function testIsVendorClassReturnsFalseIfNameOfInternalClassIsPassed()\n {\n $this->assertFalse(VendorResources::isVendorClass('\\stdClass'));\n }", "function disable_extension()\n\t{\n\t\tglobal $DB;\n\t\t$DB->query(\"DELETE FROM exp_extensions WHERE class = '\" . get_class($this) . \"'\");\n\t}", "public function testIsVendorClassReturnsFalseIfClassIsNotLocatedInVendorDirectory()\n {\n $this->assertFalse(VendorResources::isVendorClass('\\Webfactory\\Util\\VendorResources'));\n }", "function disable_extension()\n\t{\n\t\t$this->EE->db->where('class', __CLASS__)\n\t\t ->delete('extensions');\n\t\t// Drop the custom column from exp_assets\n\t\tif ($this->EE->db->table_exists('assets') && $this->EE->db->field_exists('members_only', 'assets'))\n\t\t{\n\t\t\t$this->EE->load->dbforge();\n\t\t\t$this->EE->dbforge->drop_column('assets', 'members_only');\n\t\t}\n\t}", "public function __construct()\n {\n if (self::isDev()) {\n Mage::setIsDeveloperMode(true);\n ini_set('display_errors', 1);\n }\n }", "public function removeUseStatements() {\n\t\t$this->processedClassCode = preg_replace(self::PATTERN_USE_STATEMENTS, '', $this->processedClassCode);\n\t}", "function upgrade_500()\n {\n }", "public function testIsVendorClassReturnsFalseIfClassOfObjectIsNotLocatedInVendorDirectory()\n {\n $this->assertFalse(VendorResources::isVendorClass(new ContactType()));\n }", "public function testNonHelper() {\n\t\t$prose = new Prose();\n\t\t$oldClass = get_class($prose);\n\t\tMemoize::catchHelper($prose);\n\t\t$this->assertEqual($oldClass, get_class($prose));\n\t}", "function disable_extension()\n\t{\n\t\tee()->db->where('class', __CLASS__);\n\t\tee()->db->delete('extensions');\n\t}", "function rocket_lazyload_exclude_class( $attributes ) {\n\t$attributes[] = 'class=\"custom-logo\"';\n // custom-logo\n\n\treturn $attributes;\n}", "public function __construct() {\n\t\tif (!is_admin()) {\n\t\t\t// stop Jetpack tags\n\t\t\tif (class_exists ( 'JetPack' )) {\n\t\t\t\tadd_filter ( 'jetpack_enable_opengraph', '__return_false', 99 );\n\t\t\t\tadd_filter ( 'jetpack_enable_open_graph', '__return_false', 99 );\n\t\t\t}\n\t\t\t\n\t\t\t// try to stop Yoast SEO from generating double tags\n\t\t\tif (defined('WPSEO_VERSION')) {\n\t\t\t\tglobal $wpseo_og;\n\t\t\t\tif (isset($wpseo_og)) {\n\t\t\t\t\tremove_action( 'wpseo_head', array( $wpseo_og, 'opengraph' ), 30 );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static function ignoreApdex(): void\n {\n if (!static::hasNewRelic()) {\n return;\n }\n\n newrelic_ignore_apdex();\n }", "protected function checkRequiredModules()\n\t{\n\t\tif (!Loader::includeModule('sale'))\n\t\t\tthrow new Exception(Localization\\Loc::getMessage(\"SPOL_SALE_MODULE_NOT_INSTALL\"), self::E_SALE_MODULE_NOT_INSTALLED);\n\t\tif (!Loader::includeModule('catalog'))\n\t\t\t$this->useCatalog = false;\n\t}", "function __autoload($className)\n{\n require_once \"webcore.reflection.php\";\n \n ClassLoader::loadClass($className);\n}", "public function disable_extension(){}", "function _drush_pm_disable($args) {\n drush_include_engine('drupal', 'environment');\n // To be consistent call the environment.inc function which will show the user\n // an error.\n drush_module_disable($args);\n}", "function disableNativeExtension()\n\t{\n\t\t$GLOBALS['amfphp']['native'] = false;\n\t}", "function provide_import() {\n return true;\n }", "protected function _construct()\n\t{\n\t\t$this->setUsedModuleName('Gri_CatalogCustom');\n\t}", "public static function phpunit_disable() {\n parent::disable();\n }", "public function disable_extension() {\n ee()->db->where('class', __CLASS__);\n ee()->db->delete('extensions');\n }", "function wp_apply_generated_classname_support($block_type)\n {\n }", "function beManaged()\n {\n }", "private function allowedOptimizers()\n {\n yield new Pngquant();\n }", "function power_disable_seo() {\n\n\tremove_filter( 'wp_title', 'power_default_title', 10 );\n\tremove_action( 'get_header', 'power_doc_head_control' );\n\tremove_action( 'power_meta', 'power_seo_meta_description' );\n\tremove_action( 'power_meta', 'power_seo_meta_keywords' );\n\tremove_action( 'power_meta', 'power_robots_meta' );\n\tremove_action( 'wp_head', 'power_canonical', 5 );\n\tremove_action( 'wp_head', 'power_meta_name' );\n\tremove_action( 'wp_head', 'power_meta_url' );\n\tremove_action( 'wp_head', 'power_paged_rel' );\n\tremove_filter( 'power_attr_head', 'power_attributes_head' );\n\tadd_filter( 'power_attr_head', 'power_attributes_empty_class' );\n\n\tremove_action( 'admin_menu', 'power_add_inpost_seo_box' );\n\tremove_action( 'save_post', 'power_inpost_seo_save', 1 );\n\n\tremove_action( 'admin_init', 'power_add_taxonomy_seo_options' );\n\n\tremove_action( 'show_user_profile', 'power_user_seo_fields' );\n\tremove_action( 'edit_user_profile', 'power_user_seo_fields' );\n\n\tremove_theme_support( 'power-seo-settings-menu' );\n\tadd_filter( 'pre_option_' . POWER_SEO_SETTINGS_FIELD, '__return_empty_array' );\n\n\tdefine( 'POWER_SEO_DISABLED', true );\n\n}", "public function getNoExport() {}", "public function getNoExport() {}", "function disable_extension()\n\t{\n\t\t$this->EE->db->where('class', __CLASS__);\n\t\t$this->EE->db->delete('extensions');\n\t}", "function disable_extension()\n\t{\n\t\t$this->EE->db->where('class', __CLASS__);\n\t\t$this->EE->db->delete('extensions');\n\t}", "function disable_extension()\n\t{\n\t\t$this->EE->db->where('class', __CLASS__);\n\t\t$this->EE->db->delete('extensions');\n\t}", "function disable_extension()\n\t{\n\t\t$this->EE->db->where('class', __CLASS__);\n\t\t$this->EE->db->delete('extensions');\n\t}", "function disable_extension()\n\t{\n\t\t$this->EE->db->where('class', __CLASS__);\n\t\t$this->EE->db->delete('extensions');\n\t}", "public function willGenerateStrict(): bool;", "public function __construct()\r\n\t{\r\n\t\tparent::__construct();\r\n\t\t$this->setModuleName('Mage_Catalog');\r\n\t}", "public function testClassLoadingNotInstalledModules() {\n // Enable the module_test module.\n \\Drupal::service('module_installer')->install(['module_test'], FALSE);\n $this->resetAll();\n // Check twice to test an unprimed and primed system_list() cache.\n for ($i = 0; $i < 2; $i++) {\n $this->drupalGet('module-test/class-loading');\n $this->assertSession()->statusCodeEquals(200);\n $this->assertSession()->pageTextNotContains($this->expected);\n }\n }", "protected function getExtensionsToExclude() {}", "protected function includeLegacyBackendItems() {}", "function shIsMultilingual()\n{\n\tShlSystem_Log::debug('sh404sef', 'Using deprecated ' . __FUNCTION__ . ', removed as not applicable anymore');\n}", "abstract function is_developer();", "function upgrade_module_1_1_0($module)\n{\n /*\n * Do everything you want right there,\n * You could add a column in one of your module's tables\n */\n\n return true;\n}", "public function loadPublicSideClasses()\n\t{\n\t\tinclude dirname(__FILE__).'/class-cit-boilerplate-shortcodes.php';\n\t\t\n\t\t//add all public-side class files above this line\n\t}", "public function testClassLoadingDisabledModules() {\n // Enable the module_test and module_autoload_test modules.\n \\Drupal::service('module_installer')->install(['module_test', 'module_autoload_test'], FALSE);\n $this->resetAll();\n // Ensure that module_autoload_test is disabled.\n $this->container->get('module_installer')->uninstall(['module_autoload_test'], FALSE);\n $this->resetAll();\n // Check twice to test an unprimed and primed system_list() cache.\n for ($i = 0; $i < 2; $i++) {\n $this->drupalGet('module-test/class-loading');\n $this->assertSession()->statusCodeEquals(200);\n $this->assertSession()->pageTextNotContains($this->expected);\n }\n }", "function app_products() {\r\n $this->name=\"app_products\";\r\n $this->title=\"<#LANG_APP_PRODUCTS#>\";\r\n $this->module_category=\"<#LANG_SECTION_APPLICATIONS#>\";\r\n $this->checkInstalled();\r\n}", "public function isProduction() {}", "function wpcom_disable_mobile_app_promotion() {\n _deprecated_function( __FUNCTION__, '2.0.0' );\n}", "function wpcom_vip_disable_devicepx_js() {\n _deprecated_function( __FUNCTION__, '2.0.0' );\n}", "function ignore($excl){\n $excl[] = 'themes/myown/node_modules';\n return $excl;\n}", "function bug516_2(): void\n {\n $module_handler = \\Drupal::moduleHandler();\n $enabled_modules = $module_handler->getModuleList();\n\n foreach (array_keys($enabled_modules) as $module) {\n $module_handler->loadInclude($module, 'install');\n }\n }", "protected function _isMageEnterprise()\n {\n return Mage::getConfig()->getModuleConfig('Enterprise_Enterprise')\n && Mage::getConfig()->getModuleConfig('Enterprise_Cms');\n }", "function before_enable() { }", "protected function getMissingPhpModulesOfExtensions() {}", "public function disableShopServices()\n {\n return true;\n }", "public function disableExtension()\n {\n $this->resourceConfig->saveConfig(self::XML_PATH_MODULE_ACTIVE, 0, 'default', 0);\n }", "function runkit_class_emancipate($classname)\n{\n}", "public function alterMe()\n {\n return \"splendiferous\";\n }", "public function getNoExport();", "private function __construct()\n {\n // disabled method\n }", "function wpcom_vip_disable_zemanta_for_all_users() {\n _deprecated_function( __FUNCTION__, '2.0.0' );\n}", "function __construct() { \r\n $this->helper = Mage::helper('lycenok_datafeed');\r\n}", "function joe_uah_plugins_check() {\n\n\t// Set constants for active third party plugins\n\tdefine( 'JOE_UAH_MINIORANGE_2_FACTOR', class_exists( 'Miniorange_Authentication' ) );\n\n}", "public function isNotUsing();", "function is_detalhe_core_actived(){\n return class_exists( 'Detalhe_Core' ) ? true : false;\n}", "private function load_classes() {\n\n\t\t\trequire_once ASCRIPTA_ENGINE_ADMIN_PATH . 'class-ae-settings.php';\n\n\t\t}", "public function GetToolClass ();", "function customs()\n\t{\n\t\t$custom = $this->ipsclass->load_class( ROOT_PATH.'mod_install/'.$this->xml_array['customs_group']['custom'][0]['script_name']['VALUE'].'.php', $this->xml_array['customs_group']['custom'][0]['script_name']['VALUE'] );\n\t\t$custom->xml_array =& $this->xml_array;\n\t\t\n\t\tif ( $this->ipsclass->input['un'] )\n\t\t{\n\t\t\t$custom->uninstall();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$custom->install();\n\t\t}\n\t}", "public function configureClassesToCompile()\n {\n $this->addClassesToCompile(array(\n 'Sonata\\\\BlockBundle\\\\Block\\\\BaseBlockService',\n 'Sonata\\\\BlockBundle\\\\Block\\\\BlockLoaderChain',\n 'Sonata\\\\BlockBundle\\\\Block\\\\BlockLoaderInterface',\n 'Sonata\\\\BlockBundle\\\\Block\\\\BlockRenderer',\n 'Sonata\\\\BlockBundle\\\\Block\\\\BlockRendererInterface',\n 'Sonata\\\\BlockBundle\\\\Block\\\\BlockServiceInterface',\n 'Sonata\\\\BlockBundle\\\\Block\\\\BlockServiceManager',\n 'Sonata\\\\BlockBundle\\\\Block\\\\BlockServiceManagerInterface',\n 'Sonata\\\\BlockBundle\\\\Block\\\\Loader\\\\ServiceLoader',\n 'Sonata\\\\BlockBundle\\\\Block\\\\Service\\\\EmptyBlockService',\n 'Sonata\\\\BlockBundle\\\\Block\\\\Service\\\\RssBlockService',\n 'Sonata\\\\BlockBundle\\\\Block\\\\Service\\\\MenuBlockService',\n 'Sonata\\\\BlockBundle\\\\Block\\\\Service\\\\TextBlockService',\n 'Sonata\\\\BlockBundle\\\\Exception\\\\BlockExceptionInterface',\n 'Sonata\\\\BlockBundle\\\\Exception\\\\BlockNotFoundException',\n 'Sonata\\\\BlockBundle\\\\Exception\\\\Filter\\\\DebugOnlyFilter',\n 'Sonata\\\\BlockBundle\\\\Exception\\\\Filter\\\\FilterInterface',\n 'Sonata\\\\BlockBundle\\\\Exception\\\\Filter\\\\IgnoreClassFilter',\n 'Sonata\\\\BlockBundle\\\\Exception\\\\Filter\\\\KeepAllFilter',\n 'Sonata\\\\BlockBundle\\\\Exception\\\\Filter\\\\KeepNoneFilter',\n 'Sonata\\\\BlockBundle\\\\Exception\\\\Renderer\\\\InlineDebugRenderer',\n 'Sonata\\\\BlockBundle\\\\Exception\\\\Renderer\\\\InlineRenderer',\n 'Sonata\\\\BlockBundle\\\\Exception\\\\Renderer\\\\MonkeyThrowRenderer',\n 'Sonata\\\\BlockBundle\\\\Exception\\\\Renderer\\\\RendererInterface',\n 'Sonata\\\\BlockBundle\\\\Exception\\\\Strategy\\\\StrategyManager',\n 'Sonata\\\\BlockBundle\\\\Exception\\\\Strategy\\\\StrategyManagerInterface',\n 'Sonata\\\\BlockBundle\\\\Form\\\\Type\\\\ServiceListType',\n 'Sonata\\\\BlockBundle\\\\Model\\\\BaseBlock',\n 'Sonata\\\\BlockBundle\\\\Model\\\\Block',\n 'Sonata\\\\BlockBundle\\\\Model\\\\BlockInterface',\n 'Sonata\\\\BlockBundle\\\\Model\\\\BlockManagerInterface',\n 'Sonata\\\\BlockBundle\\\\Model\\\\EmptyBlock',\n 'Sonata\\\\BlockBundle\\\\Twig\\\\Extension\\\\BlockExtension',\n 'Sonata\\\\BlockBundle\\\\Twig\\\\GlobalVariables',\n ));\n }", "function __autoload( $className )\n\t{\n\t\tezcBase::autoload( $className );\n\t}", "public function getSecutiryLoadFilter() {\n throw new slModelException('You need to override getSecurityLoadFilter() into you '.get_class($this).' model!');\n }", "function spr_section_exclude_install() {\n// note: TINYINT(1) DEFAULT 0 = BOOLEAN DEFAULT FALSE\nglobal $spr_exclude_db_debug;\n\n\tif (spr_section_exclude_installed())\n\t\treturn TRUE;\n\telse {\n\t\tcreate_article_position();\n\t\treturn safe_query(\"ALTER TABLE \".safe_pfx(\"txp_section\").\" ADD spr_exclude TINYINT(1) DEFAULT 0 NOT NULL;\",$spr_exclude_db_debug);\n\t}\n}", "function upgrade_130()\n {\n }", "public function init_classes() {\n\t\tnew ProductFlow_Admin();\n\t}", "protected function getOldXclassUsageStatus() {}", "public function flagDeprecated() {\n\t\t$oldFilters = [\n\t\t\t'aioseop_title_format',\n\t\t\t'aioseop_canonical_url',\n\t\t\t'aioseop_description',\n\t\t\t'aioseop_keywords',\n\t\t\t'aioseop_title',\n\t\t\t'aioseop_home_page_title',\n\t\t\t'aioseop_title_page',\n\t\t\t'aioseop_attachment_title',\n\t\t\t'aioseop_title_single',\n\t\t\t'aioseop_archive_title',\n\t\t\t'aiosp_generate_descriptions_from_content',\n\t\t\t'aioseop_canonical_url_pagination',\n\t\t\t'aioseop_pre_tax_types_setting',\n\t\t\t'aiosp_disable',\n\t\t\t'aioseop_wp_head_priority',\n\t\t\t'aioseop_amp_schema',\n\t\t\t'aioseop_amp_description',\n\t\t\t'aioseop_amp_description_full',\n\t\t\t'aioseop_amp_description_attributes',\n\t\t\t'aioseop_description_full',\n\t\t\t'aioseop_description_attributes',\n\t\t\t'aioseop_keywords_attributes',\n\t\t\t'aioseop_prev_link',\n\t\t\t'aioseop_next_link',\n\t\t\t'aioseop_disable_schema',\n\t\t\t'aioseop_description_override',\n\t\t\t'aioseop_canonical_protocol',\n\t\t\t'aioseo_custom_menu_order',\n\t\t\t'manage_aiosp',\n\t\t\t'aioseop_add_post_metabox',\n\t\t\t'aiosp_bad_robots_botlist',\n\t\t\t'aiosp_bad_robots_badbotlist',\n\t\t\t'aiosp_bad_robots_badreferlist',\n\t\t\t'aiosp_bad_robots_allow_bot',\n\t\t\t'aioseop_export_settings_exporter_post_types',\n\t\t\t'aioseop_export_settings_exporter_choices',\n\t\t\t'aioseop_thumbnail_size',\n\t\t\t'aioseop_attachment_size',\n\t\t\t'aioseop_post_metabox_context',\n\t\t\t'aioseop_post_metabox_piority',\n\t\t\t'aioseop_helper_set_help_text',\n\t\t\t'aioseop_module_list',\n\t\t\t'aioseop_get_options',\n\t\t\t'aioseop_localize_script_data',\n\t\t\t'aioseop_home_url',\n\t\t\t'aioseo_include_images_in_sitemap',\n\t\t\t'aioseop_format_date',\n\t\t\t'aioseop_update_check_time',\n\t\t\t'aioseop_admin_flyout_menu',\n\t\t\t'aioseop_disable_twitter_plugin_card',\n\t\t\t'aioseop_robots_meta',\n\t\t\t'aioseop_register_schema_objects',\n\t\t\t'aioseop_schema_layout',\n\t\t\t'aioseop_module_info',\n\t\t\t'aioseop_export_settings',\n\t\t\t'aioseop_opengraph_display',\n\t\t\t'aioseop_opengraph_placeholder',\n\t\t\t'aiosp_opengraph_default_image_type',\n\t\t\t'aiosp_opengraph_default_image',\n\t\t\t'aiosp_opengraph_meta',\n\t\t\t'aioseop_enable_amp_social_meta',\n\t\t\t'aioseop_sitemap_admin_enqueue_selectize',\n\t\t\t'aioseop_gtm_container_id',\n\t\t\t'aioseop_disable_google_tag_manager',\n\t\t\t'aioseop_image_attribute_columns',\n\t\t\t'aioseop_image_seo_title',\n\t\t\t'aioseop_image_seo_alt_tag',\n\t\t\t'aiosp_sitemap_extra',\n\t\t\t'aioseo_news_sitemap_post_types',\n\t\t\t'aisop_woocommerce_hide_hidden_products',\n\t\t\t'aioseop_pro_options',\n\t\t\t'aioseo_video_sitemap_default_thumbnail',\n\t\t\t'aiosp_sitemap_extra_sitemaps',\n\t\t\t'aioseop_robotstxt_sitemap_url',\n\t\t\t'aioseop_sitemap_add_post_types_taxonomy_terms_args',\n\t\t\t'aiosp_sitemap_filename',\n\t\t\t'aiosp_sitemap_custom_*',\n\t\t\t'aiosp_sitemap_data',\n\t\t\t'aioseo_sitemap_ping_urls',\n\t\t\t'aioseop_sitemap_index_filenames',\n\t\t\t'aioseop_sitemap_xsl_url',\n\t\t\t'aiosp_sitemap_rss_latest_limit',\n\t\t\t'aiosp_sitemap_xml_namespace',\n\t\t\t'aiosp_sitemap_addl_pages_only',\n\t\t\t'aiosp_addl_pages',\n\t\t\t'aiosp_sitemap_include_post_types_archives',\n\t\t\t'aioseo_sitemap_author',\n\t\t\t'aiosp_sitemap_prio_item_filter',\n\t\t\t'aioseo_include_images_in_wp_gallery',\n\t\t\t'aioseop_gallery_shortcodes',\n\t\t\t'aioseop_clean_url',\n\t\t\t'aioseop_allowed_image_extensions',\n\t\t\t'aioseop_images_allowed_from_hosts',\n\t\t\t'aioseop_sitemap_exclude_tax_terms',\n\t\t\t'aiosp_sitemap_show_taxonomy',\n\t\t\t'aiosp_sitemap_term_counts',\n\t\t\t'aiosp_sitemap_post_counts',\n\t\t\t'aiosp_sitemap_modify_post_params',\n\t\t\t'aioseop_sitemap_include_password_posts',\n\t\t\t'aiosp_sitemap_post_filter',\n\t\t\t'aiosp_sitemap_post_query',\n\t\t\t'aioseo_news_sitemap_enabled',\n\t\t\t'aiosp_video_sitemap_remove_taxonomy',\n\t\t\t'aioseop_video_sitemap_scan_posts_limit',\n\t\t\t'aiosp_video_sitemap_count_videos_only',\n\t\t\t'aioseop_pro_supported_video_links',\n\t\t\t'aioseop_video_shortcodes',\n\t\t\t'aiosp_video_sitemap_thumbnail',\n\t\t\t'aiosp_video_sitemap_add_videos',\n\t\t\t'aioseop_noindex_rss',\n\t\t\t'aioseop_ga_enable_autotrack',\n\t\t\t'aiosp_google_autotrack',\n\t\t\t'aiosp_google_analytics',\n\t\t\t'aioseop_ga_extra_options',\n\t\t\t'aioseop_pro_gtm_enabled',\n\t\t\t'aioseop_ga_attributes',\n\t\t\t'aioseo_social_meta_tags'\n\t\t];\n\n\t\t$inUse = [];\n\t\tforeach ( $oldFilters as $filter ) {\n\t\t\tif ( has_filter( $filter ) ) {\n\t\t\t\t$inUse[] = $filter;\n\t\t\t}\n\t\t}\n\n\t\tif ( empty( $inUse ) ) {\n\t\t\t// We've updated our notification so let's remove the old one if it exists.\n\t\t\t$notification = Models\\Notification::getNotificationByName( 'deprecated-filters' );\n\t\t\tif ( $notification->exists() ) {\n\t\t\t\tModels\\Notification::deleteNotificationByName( 'deprecated-filters' );\n\t\t\t}\n\n\t\t\t$notification = Models\\Notification::getNotificationByName( 'deprecated-filters-v2' );\n\t\t\tif ( ! $notification->exists() ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tModels\\Notification::deleteNotificationByName( 'deprecated-filters-v2' );\n\t\t\treturn;\n\t\t}\n\n\t\taioseo()->notices->deprecatedFilters( $inUse );\n\t}", "function get_module_classes() {\r\n $buffy = 'td_module_wrap ' . get_class($this);\r\n\r\n //show no thumb only if image placeholders are disabled\r\n if ($this->post_has_thumb === false and td_util::get_option('tds_hide_featured_image_placeholder') == 'hide_placeholder') {\r\n $buffy .= ' td_module_no_thumb';\r\n }\r\n\r\n return $buffy;\r\n }", "public function test_addLegacyLowstockContactTag() {\n\n }", "function __construct() {\n\t\t$this->magentoVersion = Mage::getVersion();\n\t}", "private function __construct()\r\n {\r\n // Prevent direct instantiation\r\n }", "protected function unsetModuleServiceProvider()\n {\n $config = File::get($mongezPath = base_path('config/app.php'));\n\n $serviceProviderClassName = Str::singular($this->moduleName) . 'ServiceProvider';\n\n $replacementLine = \"App\\\\Modules\\\\$this->moduleName\\\\Providers\\\\{$serviceProviderClassName}::class,\";\n\n if (!Str::contains($config, $replacementLine)) return;\n $replacedString = \"\";\n $updatedConfig = str_replace($replacementLine, $replacedString, $config);\n\n File::put($mongezPath, $updatedConfig);\n }", "function wpcom_vip_disable_smilies( $smilies_to_disable ) {\n _deprecated_function( __FUNCTION__, '2.0.0' );\n}", "public function checkExtObj()\n {\n if (is_array($this->extClassConf) && $this->extClassConf['name']) {\n $this->extObj = GeneralUtility::makeInstance($this->extClassConf['name']);\n $this->extObj->init($this, $this->extClassConf);\n // Re-write:\n $this->MOD_SETTINGS = BackendUtility::getModuleData($this->MOD_MENU, GeneralUtility::_GP('SET'), $this->MCONF['name'], $this->modMenu_type, $this->modMenu_dontValidateList, $this->modMenu_setDefaultList);\n }\n }", "public function __construct()\n {\n if (!class_exists('XMLSecurityDSig')) {\n include __DIR__ . self::XMLSECLIBS_PATH;\n }\n }", "public function isUsed()\n {\n }", "public function getModulenotMagento()\n {\n\n $allModules = $this->fullModuleList->getNames();\n $num = 0;\n foreach ($allModules as $name)\n {\n if(strpos($name, 'Magento') === false)\n $num++;\n }\n\n return $num;\n }", "function shipping($module = '') {\n global $language, $PHP_SELF;\n\n $installed_modules_array = array();\n //Get the vendors_id for each vendor in the database\n $modules_array = array();\n $vendors_data_query = tep_db_query(\"select vendors_id from \" . TABLE_VENDORS);\n while ($vendors_data = tep_db_fetch_array($vendors_data_query)) {;\n $vendors_id = $vendors_data['vendors_id'];\n $installed_modules = @constant ('MODULE_VENDOR_SHIPPING_INSTALLED_' . $vendors_id);\n\n if (isset ($installed_modules) && tep_not_null ($installed_modules)) {\n $modules_array = explode(';', $installed_modules);\n $this->modules[$vendors_id] = $modules_array;\n\n foreach ($modules_array as $module_name) {\n //if the module is not already in the array, add it in\n if (!in_array ($module_name, $installed_modules_array)) { \n $installed_modules_array[] = $module_name;\n }//if !in_array\n }//foreach\n }//if isset\n }//while\n\n \n $include_modules = array();\n if ( (tep_not_null($module)) && (in_array(substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($PHP_SELF, (strrpos($PHP_SELF, '.')+1)), $modules_array)) ) {\n $include_modules[] = array('class' => substr($module['id'], 0, strpos($module['id'], '_')), \n 'file' => substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($PHP_SELF, (strrpos($PHP_SELF, '.')+1)));\n } else {\n reset($modules_array);\n foreach ($installed_modules_array as $value) {\n $class = substr($value, 0, strrpos($value, '.'));\n $include_modules[] = array('class' => $class, \n 'file' => $value);\n }//foreach\n }//if tep_not_null\n\n for ($i=0, $n=sizeof($include_modules); $i<$n; $i++) {\n include(DIR_WS_LANGUAGES . $language . '/modules/vendors_shipping/' . $include_modules[$i]['file']);\n include(DIR_WS_MODULES . 'vendors_shipping/' . $include_modules[$i]['file']);\n\n $GLOBALS[$include_modules[$i]['class']] = new $include_modules[$i]['class'];\n }//for\n }", "public function optimize()\n {\n $this->deoptimize();\n $modules = $this->getAllModules();\n $id_header = Hook::getIdByName('displayHeader');\n foreach ($modules as $module) {\n $module_obj = Module::getInstanceById($module['id_module']);\n if (!$this->checkModuleInFrontHooks($module_obj)) {\n $pages = $this->checkModuleInLayouts($module_obj);\n if (count($pages) > 0) {\n $this->editExceptions($module_obj, $id_header, $this->id_shop, $pages);\n }\n }\n }\n }", "function import_STE()\n{\n}" ]
[ "0.56932163", "0.5546809", "0.54357666", "0.54304254", "0.5380196", "0.5353186", "0.52862483", "0.52564824", "0.5234706", "0.5171732", "0.51434493", "0.51324105", "0.51186174", "0.51173276", "0.5112634", "0.5069098", "0.5053909", "0.5031208", "0.5027362", "0.5026918", "0.50231737", "0.50163686", "0.50091374", "0.49929732", "0.49831936", "0.4961429", "0.49519697", "0.49497232", "0.49443915", "0.4941046", "0.49221003", "0.4915404", "0.4903899", "0.49029693", "0.49014866", "0.49005643", "0.48976335", "0.48938635", "0.48929903", "0.48868617", "0.48862004", "0.48710802", "0.48710802", "0.48710802", "0.48710802", "0.48710802", "0.48695862", "0.48378286", "0.4830152", "0.4822927", "0.48157975", "0.48056212", "0.47995365", "0.4796322", "0.4791823", "0.47754616", "0.47706679", "0.47691545", "0.47667998", "0.47610834", "0.476101", "0.47435358", "0.47365108", "0.47341865", "0.4730687", "0.47171575", "0.4716168", "0.47110394", "0.4708826", "0.47083384", "0.47035402", "0.46994758", "0.469403", "0.4687929", "0.46846527", "0.46737683", "0.4671011", "0.46611542", "0.4659756", "0.46553245", "0.4652769", "0.4651001", "0.46479046", "0.46446416", "0.46425876", "0.46416327", "0.46381018", "0.46375856", "0.46373108", "0.46325433", "0.46316016", "0.46278685", "0.46163648", "0.46128213", "0.46077958", "0.46066248", "0.46065527", "0.46052262", "0.45993766", "0.4592184" ]
0.4993496
23
create condition value dropdown values
function createRoomDropDown($dbSelected) { $tSQLselect = "SELECT "; $tSQLselect .= "loc_room "; $tSQLselect .= "FROM "; $tSQLselect .= "nhi_locations "; $tSQLselect .= "order by loc_room "; $tSQLselect_Query = mysqli_query($dbSelected, $tSQLselect); $DropDown = ""; $DropDown .= " <option value=\"\">\n"; while ($row = mysqli_fetch_assoc($tSQLselect_Query)) { foreach ($row as $idx => $r) { $DropDown .= " <option value=\"$r\">\n"; } } mysqli_free_result($tSQLselect_Query); return $DropDown; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNewChildSelectOptions()\n {\n $conditions = [\n ['value' => $this->getType(), 'label' => __('Conditions Combination')],\n $this->_attributeFactory->create()->getNewChildSelectOptions(),\n ];\n\n $conditions = array_merge_recursive(parent::getNewChildSelectOptions(), $conditions);\n return $conditions;\n }", "public function getNewChildSelectOptions()\n {\n $productCondition = Mage::getModel('smile_virtualcategories/rule_condition_product');\n $productAttributes = $productCondition->loadAttributeOptions()->getAttributeOption();\n $attributes = array();\n\n foreach ($productAttributes as $code=>$label) {\n $attributes[] = array('value' => 'smile_virtualcategories/rule_condition_product|'.$code, 'label' => $label);\n }\n\n $conditions = array(\n array(\n 'value' => '',\n 'label' => Mage::helper('rule')->__('Please choose a condition to add...')\n ),\n array(\n 'value' => 'smile_virtualcategories/rule_condition_combine',\n 'label' => Mage::helper('catalogrule')->__('Conditions Combination')\n ),\n array(\n 'value' => $attributes,\n 'label' => Mage::helper('catalogrule')->__('Product Attribute')\n )\n );\n\n return $conditions;\n }", "public function dropdown_level()\n {\n //Menyusun value pada dropdown\n $value[''] = '--CHOOSE--';\n $value['Admin'] = 'Admin';\n $value['Technician'] = 'Technician';\n $value['User'] = 'User';\n\n return $value;\n }", "public function getNewChildSelectOptions()\n {\n /** @var CustomGento_ProductBadges_Model_Rule_Condition_Product_BaseCondition $productCondition */\n $productCondition = Mage::getModel('customgento_productbadges/rule_condition_product_baseCondition');\n $productAttributes = $productCondition->loadAttributeOptions()->getAttributeOption();\n\n $attributes = array();\n foreach ($productAttributes as $code => $label) {\n $class = 'customgento_productbadges/rule_condition_product_baseCondition';\n\n $attributes[] = array(\n 'value' => $class . '|' . $code,\n 'label' => $label\n );\n }\n\n // Adding day interval attributes\n /** @var CustomGento_ProductBadges_Model_Rule_Condition_Product_DayInterval $dayIntervalCondition */\n $dayIntervalCondition = Mage::getModel('customgento_productbadges/rule_condition_product_dayInterval');\n $dayIntervalAttribute = $dayIntervalCondition->loadAttributeOptions()->getAttributeOption();\n foreach ($dayIntervalAttribute as $code => $label) {\n $class = 'customgento_productbadges/rule_condition_product_dayInterval';\n\n $attributes[] = array(\n 'value' => $class . '|' . $code,\n 'label' => $label\n );\n }\n\n /** @var CustomGento_ProductBadges_Helper_Config $configHelper */\n $configHelper = Mage::helper('customgento_productbadges/config');\n\n $rulesConfigs = $configHelper->getRulesConfigurations();\n\n /** @var CustomGento_ProductBadges_Model_Rule_Config $configModel */\n foreach ($rulesConfigs as $configModel) {\n $attributes[] = array(\n 'value' => $configModel->getConditionClass() . '|' . $configModel->getInternalCode(),\n 'label' => $configModel->getLabel()\n );\n }\n\n // Sort again alphabetically\n usort($attributes, function ($a, $b) {\n return strcmp($a['label'], $b['label']);\n });\n\n $conditions = array(\n array(\n 'value' => '',\n 'label' => Mage::helper('rule')->__('Please choose a condition to add...')\n ),\n array(\n 'value' => 'catalogrule/rule_condition_combine',\n 'label' => Mage::helper('catalogrule')->__('Conditions Combination')\n ),\n array(\n 'label' => Mage::helper('catalogrule')->__('Product Attribute'),\n 'value' => $attributes\n ),\n );\n\n return $conditions;\n }", "public function getNewChildSelectOptions()\n {\n $hlr = Mage::helper('amsegments');\n \n $conditions = array(\n array(\n 'label' => $hlr->__(Amasty_Segments_Model_Segment_Condition_Customer_Subscriber::getDefaultLabel()),\n 'value' => 'amsegments/segment_condition_customer_subscriber',\n ),\n array(\n 'label' => $hlr->__(Amasty_Segments_Model_Segment_Condition_Customer_Days_Visit::getDefaultLabel()),\n 'value' => 'amsegments/segment_condition_customer_days_visit',\n ),\n array(\n 'label' => $hlr->__(Amasty_Segments_Model_Segment_Condition_Customer_Days_Registration::getDefaultLabel()),\n 'value' => 'amsegments/segment_condition_customer_days_registration',\n ),\n array(\n 'label' => $hlr->__(Amasty_Segments_Model_Segment_Condition_Customer_Days_Birthday::getDefaultLabel()),\n 'value' => 'amsegments/segment_condition_customer_days_birthday',\n )\n );\n \n \n $prefix = 'amsegments/segment_condition_customer_';\n $conditions = array_merge_recursive($conditions, Mage::getModel($prefix.'attributes')->getNewChildSelectOptions());\n\n return array(\n 'value' => $conditions,\n 'label'=>Mage::helper('amsegments')->__('Registered Customers')\n );\n }", "public function getNewChildSelectOptions()\n {\n $addressAttributes = $this->_conditionAddress->loadAttributeOptions()->getAttributeOption();\n $attributes = [];\n foreach ($addressAttributes as $code => $label) {\n $attributes[] = [\n 'value' => 'MageWorx\\ShippingRules\\Model\\Rule\\Condition\\Address|' . $code,\n 'label' => $label,\n ];\n }\n\n $conditions = [\n [\n 'value' => '',\n 'label' => __('Please choose a condition to add.'),\n ],\n [\n 'value' => 'MageWorx\\ShippingRules\\Model\\Rule\\Condition\\Product\\Found',\n 'label' => __('Product attribute combination'),\n ],\n [\n 'value' => 'MageWorx\\ShippingRules\\Model\\Rule\\Condition\\Product\\Subselect',\n 'label' => __('Products subselection'),\n ],\n [\n 'value' => 'MageWorx\\ShippingRules\\Model\\Rule\\Condition\\Combine',\n 'label' => __('Conditions combination'),\n ],\n [\n 'value' => $attributes,\n 'label' => __('Cart Attribute'),\n ],\n ];\n\n $additional = new \\Magento\\Framework\\DataObject();\n\n $this->_eventManager->dispatch(\n 'shipping_rule_condition_combine',\n ['additional' => $additional]\n );\n\n $additionalConditions = $additional->getConditions();\n if ($additionalConditions) {\n $conditions = array_merge_recursive(\n $conditions,\n $additionalConditions\n );\n }\n\n return $conditions;\n }", "public function select_values_for_form( EntryValueSelect $entry_value_select );", "function selectList($name,$table,$option_name,$value_name,$curr_id,$script=\"\",$cond=\"\",$empty_option=0,$empty_value=\"\",$empty_str=\"\") {\n\n\t\tglobal $db, $db;\n\n\t\t$output\t\t = \"<select name=\\\"$name\\\" id=\\\"$name\\\" $script>\\n\";\n\t\tif ($empty_option) $output\t\t.= \"<option value=\\\"$empty_value\\\">$empty_str</option>\\n\";\n\n\t\tif(eregi(\"\\|\",$curr_id)){\n\t\t\t$curr_id_array=split(\"\\|\",$curr_id);\n\t\t}\n\n\t\tif(eregi(\"\\|\",$value_name)){\n\t\t\t$value_array=split(\"\\|\",$value_name);\n\t\t\t$value_query=preg_replace(\"#\\|#\",\",\",$value_name);\n\t\t}else{\n\t\t\t$value_query=$value_name;\n\t\t\t#echo\"<h1>value: $value_query | $value_name</h1>\";\n\t\t}\n\t\t$value_query=preg_replace(\"#,$#\",\"\",$value_query);\n\n\t\t$sql=\"select $option_name,$value_query from \".$table.\" $cond\";\n \n\t\t$result = $db->Execute(\"$sql\");\n\t\tif (!$result){\n\t\t\techo\"$sql\";\n\t\t\tprint $conn->ErrorMsg();\n\n\t\t}\n\t\twhile ( $row = $result->FetchRow() ) {\n\t\t\t//echo $curr_id.\"|\".$row[$this->fmtCase($option_name)].\"<br>\\n\";\n\t\t\tif(eregi(\"\\|\",$curr_id)){\n\t\t\t\t$selected= ((in_array($row[$this->fmtCase($option_name)],$curr_id_array))?\"selected \":\"\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$selected= (($curr_id==$row[$this->fmtCase($option_name)])?\"selected \":\"\");\n\t\t\t}\n\t\t\tif(eregi(\"\\|\",$value_name)){\n\n\t\t\t\tfor($i=0;$i<count($value_array);$i++){\n\t\t\t\t\t$each_value=strtolower($value_array[$i]);\n\t\t\t\t\t$_value .= $row[$each_value].\" -\";\n\t\t\t\t}\n\t\t\t\t$_value=preg_replace(\"#-$#\",\"\",$_value);\n\t\t\t}else{\n\t\t\t\t$value_name=strtolower($value_name);\n\t\t\t\t$_value=$row[$value_name];\n\t\t\t}\n\n\n\t\t\t$output .= \"<option value=\\\"\".$row[$this->fmtCase($option_name)].\"\\\" $selected>$_value</option>\\n\";\n\t\t\tunset($selected);\n\t\t\tunset($_value);\n\t\t}\n\t\t$result->Close();\n\n\t\t$output .= \"</SELECT>\\n\";\n\n\t\treturn $output;\n\t}", "public function getNewChildSelectOptions()\n {\n $addressCondition = Mage::getModel(\n 'giftpromo/promo_rule_condition_address'\n );\n $addressAttributes = $addressCondition->loadAttributeOptions()\n ->getAttributeOption();\n $attributes = array();\n $attributes[]\n = array('value' => 'giftpromo/promo_rule_condition_subtotal',\n 'label' => Mage::helper('giftpromo')->__('Sub Total'));\n $attributes[]\n = array('value' => 'giftpromo/promo_rule_condition_grandtotal',\n 'label' => Mage::helper('giftpromo')->__('Grand Total'));\n $attributes[]\n = array('value' => 'giftpromo/promo_rule_condition_discounttotal',\n 'label' => Mage::helper('giftpromo')->__(\n 'Sub Total After Discounts'\n ));\n\n foreach ($addressAttributes as $code => $label) {\n $attributes[] = array('value' =>\n 'giftpromo/promo_rule_condition_address|'\n . $code, 'label' => $label);\n }\n\n\n $checkoutCondition = Mage::getModel(\n 'giftpromo/promo_rule_condition_checkout'\n );\n $checkoutAttributes = $checkoutCondition->loadAttributeOptions()\n ->getAttributeOption();\n $chAttributes = array();\n\n foreach ($checkoutAttributes as $code => $label) {\n $chAttributes[] = array('value' =>\n 'giftpromo/promo_rule_condition_checkout|'\n . $code, 'label' => $label);\n }\n\n $customerRules = array(\n array(\n 'value' => 'giftpromo/promo_rule_condition_customer_conditions',\n 'label' => Mage::helper('giftpromo')->__(\n 'Customer conditions combination'\n ))\n );\n $productRules = array(\n array(\n 'value' => 'giftpromo/promo_rule_condition_product_found',\n 'label' => Mage::helper('giftpromo')->__(\n 'Product attribute combination'\n )\n ),\n array(\n 'value' => 'giftpromo/promo_rule_condition_product_subselect',\n 'label' => Mage::helper('giftpromo')->__(\n 'Products Sub Selection'\n )\n ),\n array(\n 'value' => 'giftpromo/promo_rule_condition_product_subselect_free',\n 'label' => Mage::helper('giftpromo')->__('Cheapest Free')\n ),\n array(\n 'value' => 'giftpromo/promo_rule_condition_product_upgrade',\n 'label' => Mage::helper('giftpromo')->__('Product Upgrades')\n )\n );\n\n $conditions = parent::getNewChildSelectOptions();\n $conditions = array_merge_recursive(\n $conditions,\n array(\n array('label' => Mage::helper('giftpromo')->__(\n 'Cart Attributes'\n ), 'value' => $attributes),\n array('label' => Mage::helper('giftpromo')->__(\n 'Checkout Attributes'\n ), 'value' => $chAttributes),\n array('label' => Mage::helper('giftpromo')->__(\n 'Customer Related Rules'\n ), 'value' => $customerRules),\n array('label' => Mage::helper('giftpromo')->__(\n 'Product Related Rules'\n ), 'value' => $productRules),\n // array('value' => 'giftpromo/promo_rule_condition_twitter_conditions', 'label' => Mage::helper('giftpromo')->__('Twitter conditions combination')),\n )\n );\n\n return $conditions;\n }", "protected function buildSelect($row) {\n\t\t//echo $row['values'].'<br>';\n\t\t$elem = \"<select name='\".$row['Field'].\"'\".$row['Attributes'].\">\\n\";\n\t\t$vals = explode (',',$row['values']);\n\t\tif (!$this->filled) $$row['Default'] = \" selected='selected'\";\n\t\t\n\t\tforeach ($vals as $value) {\n\t\t\tif ($this->filled) {\n\t\t\t\tif ($pos = strpos($value,\"=ON\")) {\n\t\t\t\t\t$value = substr ($value,0,$pos);\n\t\t\t\t\t$$value = \" selected='selected'\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!isset($$value)) $$value = '';\n\t\t\t$elem .= sprintf(\"<option value='%s'%s>%s</option>\\n\",$value,$$value,$value);\n\t\t}\n\t\t$elem .= \"</select>\\n\";\n\t\treturn $elem;\n\t}", "function getSelectionOptions($filter) {\r\n global $parentCategory;\r\n if ($filter->isConditional()) {\r\n //displays the filter if the parent category is in the children category list\r\n if (!in_array($parentCategory, $filter->getCategory())) {\r\n //if its not found the function is returned\r\n return;\r\n }\r\n }\r\n //subvalues is a list of the items to add to the selection drop down of the filter\r\n $subvalues = array();\r\n if ($filter->isEnum()) {\r\n $subvalues = explode(\"','\", getEnumValues($filter->getTable(), $filter->getColumn()));\r\n } else {\r\n $subvalues = getColumList($filter->getTable(), $filter->getColumn(), $filter->getJoinTable(), $filter->getJoinColumn(), $filter->getComparator());\r\n }\r\n //if the dropdown is not empty, it'll create a select drop down box and add the values as options\r\n if (!empty($subvalues)) {\r\n $filterName = $filter->getName();\r\n echo $filterName . \": \";\r\n echo '<select name=\"' . $filterName . '\">' . $filterName;\r\n echo '<option></option>';\r\n foreach($subvalues as $sub) {\r\n $option = clean($sub);\r\n echo '<option value=\"' . $option . '\"' . (($_GET[\"$filterName\"] == $option) ? \" selected\" : \"\") . '>' . $option . \"</option>\";\r\n }\r\n echo \"</select> \";\r\n }\r\n }", "private function generate_filter_dropdowns() {\n $html = '';//no html\n \n //instance filter dropdown\n $instance_config = $this->get_settings_config_data();//get instance config\n if(isset($instance_config) && isset($instance_config->data)//if config exists, and data has been saved\n && count($instance_config->data) > 0) {//there is actually a filter saved\n \n $text = get_string('instance_filters', 'block_dd_content');//get label text\n $html .= $this->generate_filter_dropdown($text, $instance_config->data);//generate dropdown\n }\n\n //global filter dropdown\n $global_config_data = dd_content_get_admin_config();//grab global block config DATA (not the config itself)\n if(count($global_config_data) > 0) {//if a filter exists\n \n $text = get_string('global_filters', 'block_dd_content');//get global filter label\n $html .= $this->generate_filter_dropdown($text, $global_config_data);//create dropdown\n }\n \n \n return $html;\n }", "function get_form_filter() {\n\n $val_ = new OrSysvalue();\n if (!is_null($var_)) {\n foreach ($val_->filter AS $id => $value) {\n //echo '$id [ ' . $id . ' ] = [ ' . $value . ' ] <br>' ;\n if ($id != 'filter_by') {\n if (!$this->filter_use[$id]) {\n $my_filter = new OrFieldHidden($id, 'val_filter[' . $id . ']');\n $my_filter->OP_[auto_post]->set(true);\n $my_filter_tag .= $my_filter->get_tag();\n\n if ($val_->compare[$id] == 'BETWEEN' OR $val_->message[$id . '_II'] != '') {\n $my_filter = new OrFieldHidden($id . '_II', 'val_msg[' . $id . '_II]');\n $my_filter->OP_[auto_post]->set(true);\n $my_filter_tag .= $my_filter->get_tag();\n }\n }\n $my_compare = new OrFieldHidden('val_compare_' . $id . '_', 'val_compare[' . $id . ']');\n $my_compare->OP_[auto_post]->set(true);\n $my_filter_tag .= $my_compare->get_tag();\n }\n }\n }\n\n\n /* $my_table = new OrTable('table_query');\n $my_table->OP_[align_table]->set('center');\n $my_table->OP_[class_name]->set('tbl_body');\n $my_table->set_col(' ค้นหา ' . $this->get_control_filter() . ' เรียง ' . $this->get_control_order() . ' ' . $this->get_button_filter() . $my_filter_tag );\n $my_table->set_row(); */\n $my_table = (' ค้นหา ' . $this->get_control_filter() . ' เรียง ' . $this->get_control_order() . ' ' . $this->get_button_filter() . $my_filter_tag );\n return $my_table;\n }", "public function getNewChildSelectOptions()\n {\n $prefix = 'enterprise_customersegment/segment_condition_customer_address_';\n $result = array_merge_recursive(parent::getNewChildSelectOptions(), array(\n array(\n 'value' => $this->getType(),\n 'label' => Mage::helper('enterprise_customersegment')->__('Conditions Combination')\n ),\n Mage::getModel($prefix.'default')->getNewChildSelectOptions(),\n Mage::getModel($prefix.'attributes')->getNewChildSelectOptions(),\n ));\n return $result;\n }", "function mk_DDconditional($title, $name, $arr, $val, $str='' ){\n\t#user privilege ID\n\t$pID = $_SESSION['Privilege'];\n\n\n\t$str .= '\n\t<div class=\"row hoverHighlight\">\n\t\t<div class=\"col-sm-3 text-right text-muted\">\n\t\t\t<p class=\"text-right\"><strong>' . ucwords($title) . ': </strong></p>\n\t\t</div>\n\t\t<div class=\"col-sm-7\">\n\t\t\t<div class=\"form-group\">\n\t\t\t\t<select class=\"form-control\" name=\"' . $name . '\">';\n\t\t\t\t#create dropdown list - with option of select= 'selected' if matches db value!\n\t\t\t\t$count = 0;\n\t\t\t\tforeach($arr as $item)\n\t\t\t\t{ #sometimes you feel like a select\n\t\t\t\t\tif($count===0){\n\t\t\t\t\t\t$str .= '<option value=\"'. $count .'\">'. $item .'</option>';\n\n\t\t\t\t\t}else if ($count==$val){\n\t\t\t\t\t\t $str .= '<option value=\"'. $count .'\" selected=\"selected\">'. $item .'</option>';\n\n\t\t\t\t\t}else if ( ($pID < 4) && (($count >=4) && ($count <=5)) ){\n\t\t\t\t\t\t $str .= '<option value=\"'. $count .'\">'. $item .'</option>';\n\n\t\t\t\t\t}else if ($pID >= 4){\n\t\t\t\t\t\t //show all options to mods and admins\n\t\t\t\t\t\t $str .= '<option value=\"'. $count .'\">'. $item .'</option>';\n\n\n\t\t\t\t\t}else if ($pID >= 200){\n\t\t\t\t\t\t //handers can drop, work on and submit only\n\t\t\t\t\t\t if($count < 5 || $count > 8){\n\t\t\t\t\t\t //handers can drop, work on and submit only\n\t\t\t\t\t\t $str .= '<option value=\"'. $count .'\">'. $item .'</option>';\n\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$count++;\n\t\t\t\t}\n\t\treturn $str . '</select> </div></div></div><!-- END Container -->';\n\t}", "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 }", "function get_value_options() {\r\n\t\t$sql_string = \"\";\r\n\t\tglobal $user;\r\n\t\t\r\n\t\tif( user_is_logged_in() ) {\r\n\t\t\t\r\n\t\t\tif( in_array('super user', $user->roles) ) {\r\n\t\t\t\t$sql_string = \" \";\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$user_obj = user_load($user->uid);\r\n\t\t\t\t$franchise_nid = $user_obj->field_user_franchise['und'][0]['nid']; \r\n\t\t\t\t$user_obj = user_load($user->uid); \r\n\t\t\t\t$user_franchise_nid = $user_obj->field_user_franchise['und'][0]['nid'];\r\n\t\t\t\t$sql_string = \" AND fr.field_user_franchise_nid = '\" .$user_franchise_nid. \"'\";\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\t$query = \"SELECT DISTINCT fr.entity_id, usr.name \r\n\t\tFROM {field_data_field_user_franchise} fr, {users_roles} ur, {node} n, {users} usr \r\n\t\tWHERE (fr.entity_id = ur.uid AND ur.rid != '7') \r\n\t\tAND fr.entity_id = n.uid AND fr.entity_id = usr.uid AND n.type = 'shipment' \" .$sql_string. \"\";\r\n\t\t\r\n\t\t$res = db_query($query); \r\n\r\n\t\tforeach ( $res as $user_value ) {\r\n\t\t\t$users[$user_value->entity_id] = $user_value->name;\r\n\t\t}\r\n // We don't need Guest user here, so remove it.\r\n unset($users[0]);\r\n\t\t// Sort by username.\r\n natsort($users);\r\n\r\n $this->value_options = $users;\r\n\r\n return $users;\r\n }", "function FillDynamicCombo($query,$datafield,$textfield,$selectvalue) {\n\n\t $model=new Model;\n\t\t$rs =$model->find_query_all($query);\n\t\t$i=1;\n\t\t$selectvalue1=\"\";\n if(count($rs)>0){\n\t\tforeach($rs as $row){\n\t\t if($i==1)\n\t\t $selectvalue1=$row->$datafield;\n\t\t \n\t\t if($selectvalue==$row->$datafield){\n\t\t\t echo\"<option value='\".$row->$datafield.\"' selected>\".$row->$textfield.\"</option>\";\n\t\t\t $selectvalue1=$selectvalue;\n\t\t\t}\n\t\t else {\n\t\t\techo\"<option value='\".$row->$datafield.\"'>\".$row->$textfield.\"</option>\";\n\t\t }\n\t\t $i++;\n\t\t }\n\t\t}\n\t\t return $selectvalue1;\n\t}", "public function getNewChildSelectOptions()\n {\n $productAttributes = $this->_ruleConditionProd->loadAttributeOptions()->getAttributeOption();\n $pAttributes = [];\n $iAttributes = [];\n foreach ($productAttributes as $code => $label) {\n if (strpos($code, 'quote_item_') === 0) {\n $iAttributes[] = [\n 'value' => \\Magento\\SalesRule\\Model\\Rule\\Condition\\Product::class . '|' . $code,\n 'label' => $label,\n ];\n } else {\n $pAttributes[] = [\n 'value' => \\Magento\\SalesRule\\Model\\Rule\\Condition\\Product::class . '|' . $code,\n 'label' => $label,\n ];\n }\n }\n\n $conditions = parent::getNewChildSelectOptions();\n $conditions = array_merge_recursive(\n $conditions,\n [\n [\n 'value' => \\Magento\\SalesRule\\Model\\Rule\\Condition\\Product\\Combine::class,\n 'label' => __('Conditions Combination'),\n ],\n ['label' => __('Cart Item Attribute'), 'value' => $iAttributes],\n ['label' => __('Product Attribute'), 'value' => $pAttributes]\n ]\n );\n return $conditions;\n }", "public function getValuesHtml()\n {\n $product = $this->getProduct();\n\n\n $selectHtml = '<div class=\"options-list nested\" id=\"options-shipment-' . $product->getId() . '-list\">';\n\n $options = explode(',', $product->getMdlShipments());\n $i = 0;\n foreach ($options as $option) {\n $optionInfo = $optionLabel = $this->shipmentRepository\n ->getByCode($option, $this->_storeManager->getStore()->getId());\n $optionLabel = $optionInfo->getName();\n $selectHtml .= '<div class=\"field choice admin__field admin__field-option required\">' .\n '<input type=\"radio\" id=\"shipment_' .\n $product->getId() . '_' . $i .\n '\" class=\"'\n\n . 'radio admin__control-radio required product-custom-option\" name=\"shipment_' .\n $product->getId()\n .\n '\" data-selector=\"shipment_' . $product->getId() . '\"' .\n ' value=\"' \n . $optionLabel \n . '--'\n . $option \n . '--'\n . $optionInfo->getBillingAddressTopLabel()\n . '--'\n . $optionInfo->getShippingAddressTopLabel()\n . '--'\n . $optionInfo->getIsSameAsBilling()\n . '\" /><label class=\"label admin__field-label\" for=\"shipment_' .\n $product->getId() . '_' . $i .\n '\">\n '\n . $optionLabel . '</span></label></div>';\n\n $i++;\n }\n $selectHtml .= '</div>';\n return $selectHtml;\n\n }", "function condition_values() {\n return array();\n }", "public function flexformConditionStringDataProvider() {}", "function statusSelect2($jbStatus, $name=\"jbStatus\", $allowBlank=0, $limit=1)\n{\n\tglobal $statusArray;\n\t// check limit array\n\t$limitArray = $statusArray[$jbStatus][3];\n\t$ret = \"<select style='border:1px solid #9b9b9b; background-color:#ffffff; height:25px' name='$name' id='$name'>\";\n\tif ($allowBlank) $ret .= \"<option></option>\";\n\tforeach($statusArray as $key => $val)\n\t{\n\t\tif(!$limit || ($limit && ( !is_array($limitArray) || ( is_array($limitArray) && ($jbStatus == $key || in_array($key, $limitArray))))))\n\t\t{\n\t\t\t$ret .= \"<option value='$key'\";\n\t\t\tif ($jbStatus == $key) $ret .= \"selected\";\n\t\t\t$ret .= \">$val[0]</option>\";\n\t\t}\n\t}\n\t$ret .= \"</select>\";\n\techo $ret;\n}", "function caldol_add_options_members_filter(){\n\techo '<option value=\"TomChoice\">doggie</option>';\n\t\t\n}", "function db_drop_down($tbl_name,$condition,$varg=array())\n{\t\n\t$CI = CI();\t\n\t$var=\"\";\n\t\n\t$varg['default_text']=!array_key_exists('default_text',$varg) ? \"Select\" : $varg['default_text'];\n\t$varg['id']=!array_key_exists('id',$varg) ? $varg['name'] : $varg['id'];\n\t$opt_val_fld = $varg['opt_val_fld'];\n\t$opt_txt_fld = $varg['opt_txt_fld']; \n\t//trace($varg['current_selected_val']);\n\t$var.='<select name=\"'.$varg['name'].'\" id=\"'.$varg['id'].'\" '.$varg['format'].'>';\n\tif($varg['default_text']!=\"\")\n\t{\n\t\t$var.='<option value=\"\" selected=\"selected\">'.$varg['default_text'].'</option>';\n\t}\t\n\t\n\t$CI->db->select(\"$opt_val_fld,$opt_txt_fld\");\n\t$CI->db->from(\"$tbl_name\");\n\tif(!empty($condition))\n\t$CI->db->where($condition);\n\t\n\t$contry_res=$CI->db->get()->result_array();\n\t\n\tforeach($contry_res as $key=>$val)\n\t{\t\t\n\t\n\t\n\t\tif(is_array($varg['current_selected_val']))\n\t\t{\n\t\t\t$select_element=in_array($val[$opt_val_fld],$varg['current_selected_val']) ? \"selected\" : \"\";\n\t\t}else\n\t\t{\n\t\t\t$select_element=( $varg['current_selected_val']==$val[$opt_val_fld] ) ? \"selected\" : \"\";\n\t\t}\t\t\n\t\t$var.='<option value=\"'.$val[$opt_val_fld].'\" '.$select_element.'>'.ucfirst($val[$opt_txt_fld]).'</option>';\n\t}\n\t$var.='</select>';\n\treturn $var;\n}", "function value_form(&$form, &$form_state) {\n $form['value']['column'] = array(\n '#type' => 'textfield',\n '#title' => t('Property column'),\n '#default_value' => $this->value['column'],\n '#description' => t('Name of the database column to use in the comparison.'),\n );\n\n // We know which properties are available, so we can show a select box.\n if (isset($this->definition['available_properties'])) {\n $form['value']['column']['#type'] = 'select';\n $form['value']['column']['#options'] = array_combine($this->definition['available_properties'], $this->definition['available_properties']);\n }\n\n $form['value']['value'] = array(\n '#type' => 'textfield',\n '#title' => t('Value'),\n '#size' => 30,\n '#default_value' => $this->value['value'],\n '#process' => array('ctools_dependent_process'),\n '#dependency' => array('radio:options[operator]' => array_map('htmlentities', $this->operator_values(1))),\n );\n $form['value']['min'] = array(\n '#type' => 'textfield',\n '#title' => t('Min'),\n '#size' => 30,\n '#default_value' => $this->value['min'],\n '#process' => array('ctools_dependent_process'),\n '#dependency' => array('radio:options[operator]' => array_map('htmlentities', $this->operator_values(2))),\n );\n $form['value']['max'] = array(\n '#type' => 'textfield',\n '#title' => t('And max'),\n '#size' => 30,\n '#default_value' => $this->value['max'],\n '#process' => array('ctools_dependent_process'),\n '#dependency' => array('radio:options[operator]' => array_map('htmlentities', $this->operator_values(2))),\n );\n }", "function nf_makeDropDownWithSelected($idCol, $displayCol, $table, $matchvalue,$where='',$suppressSelectTag=0){\n $retval = '';\n $matched = 0;\n $result = DB_query( \"SELECT $idCol,$displayCol FROM $table $where\" );\n $nrows = DB_numRows( $result );\n\n for( $i = 0; $i < $nrows; $i++ ){\n $A = DB_fetchArray($result);\n $retval .='<option value=\"' . $A[0] . '\"';\n if($matchvalue == $A[0]){\n $retval .=\" selected=\\\"selected\\\" \";\n $matched=1;\n }\n $retval .='>' . $A[1] . '</option>';\n }\n if(!$suppressSelectTag){\n $retval .= '</select>';\n }\n if($matched){\n if(!$suppressSelectTag){\n $retval = '<select name=\"' . str_replace(\".\",\"\",$idCol . $displayCol) . '\"><option value=\"' . $value . '\" >' . $label . '</option>' . $retval;\n } else {\n $retval = '<option value=\"' . $value . '\" >' . $label . '</option>' . $retval;\n }\n } else{\n if(!$suppressSelectTag){\n $retval = '<select name=\"' . str_replace(\".\",\"\",$idCol . $displayCol) . '\"><option value=\"' . $value . '\" >' . $label . '</option>' . $retval;\n } else {\n $retval = '<option value=\"' . $value . '\" >' . $label . '</option>' . $retval;\n }\n }\n return $retval;\n}", "function my_epl_add_single_bedrooms_search_dropdown_field($fields) {\n\tforeach($fields as $field_key => &$field) {\n\t if( in_array($field['meta_key'], array('property_bedrooms_min','property_bedrooms_max') ) ) {\n\t\t\tunset($fields[$field_key]);\n\t }\n\t}\n\t$fields[] =array(\n\t\t'key'\t\t\t=>\t'search_bed',\n\t\t//'multiple'\t\t=>\ttrue,\n\t\t'meta_key'\t\t=>\t'property_bedrooms',\n\t\t'label'\t\t\t=>\t__('Bedrooms','epl'),\n\t\t'type'\t\t\t=>\t'select',\n\t\t'option_filter'\t\t=>\t'property_bedrooms',\n\t\t'options'\t\t=>\tarray(\n\t\t\t\t\t\t\t'studio'\t=> 'Studio',\n\t\t\t\t\t\t\t'1'\t\t=> '1',\n\t\t\t\t\t\t\t'2'\t\t=> '2',\n\t\t\t\t\t\t\t'3'\t\t=> '3',\n\t\t\t\t\t\t\t'4'\t\t=> '4',\n\t\t\t\t\t\t\t'5'\t\t=> '5',\n\t\t),\n\t\t'option_type' => 'range', // provide range of option instead of option array\n\t\t'query'\t\t\t=>\tarray(\n\t\t\t\t\t\t\t'query'\t\t=>\t'meta',\n\t\t\t\t\t\t\t'compare'\t=>\t'EQUALS',\n\t\t\t\t\t\t\t'type'\t\t=>\t'numeric'\n\t\t),\n\t\t'class'\t\t\t=>\t'epl-search-row-full',\n\t\t'order'\t\t\t=> 160\n\t);\n\treturn $fields;\n}", "function data_term_condition() {\n return $this->db->get('t_page_term_condition');\n }", "public function render()\n {\n $fromList = array();\n $this->getFromList($fromList);\n $value = $this->getValue()!==null?$this->getValue():$this->getDefaultValue();\n $valueArray = explode(',', $value);\n \n $disabledStr = ($this->getEnabled() == \"N\") ? \"DISABLED=\\\"true\\\"\" : \"\";\n $style = $this->getStyle();\n $func = $this->getFunction();\n\n //$sHTML = \"<SELECT NAME=\\\"\" . $this->objectName . \"[]\\\" ID=\\\"\" . $this->objectName .\"\\\" $disabledStr $this->htmlAttr $style $func>\";\n $sHTML = \"<SELECT NAME=\\\"\" . $this->objectName . \"\\\" ID=\\\"\" . $this->objectName .\"\\\" $disabledStr $this->htmlAttr $style $func>\";\n\n if ($this->blankOption) // ADD a blank option\n {\n $entry = explode(\",\",$this->blankOption);\n $text = $entry[0];\n $value = ($entry[1]!= \"\") ? $entry[1] : null;\n $entryList = array(array(\"val\" => $value, \"txt\" => $text ));\n $fromList = array_merge($entryList, $fromList);\n }\n\n $defaultValue = null;\n foreach ($fromList as $option)\n {\n $test = array_search($option['val'], $valueArray);\n if ($test === false)\n {\n $selectedStr = '';\n }\n else\n {\n $selectedStr = \"SELECTED\";\n $defaultValue = $option['val']; \n }\n $sHTML .= \"<OPTION VALUE=\\\"\" . $option['val'] . \"\\\" $selectedStr>\" . $option['txt'] . \"</OPTION>\";\n }\n if($defaultValue == null){\n \t$defaultOpt = array_shift($fromList);\n \t$defaultValue = $defaultOpt['val'];\n \tarray_unshift($fromList,$defaultOpt);\n }\n \n \n $this->setValue($defaultValue);\n $sHTML .= \"</SELECT>\";\n return $sHTML;\n }", "function dynamic($tag, $name, $value, $attribute){\r\n \t\t$attribute = $this->convertStringAtt($attribute);\r\n \t\t$tmp = '';\r\n\t\t$optionArray = array();\r\n\r\n\t\tif(\r\n\t\t\t$tag != \"select\" &&\r\n\t\t\t$tag != \"multySelect\" &&\r\n\t\t\t$tag != \"radioBox\" &&\r\n\t\t\t$tag != \"multyBox\" &&\r\n\t\t\t$tag != \"moveSelect\" &&\r\n\t\t\t$tag != \"changeSelect\"\r\n\t\t) return '';\r\n\t\t\r\n\t\tif($tag == \"multySelect\"){\r\n\t\t\t$tag = 'select';\r\n\t\t\t$attribute['multiple'] = 'multiple';\r\n\t\t}\r\n\r\n \t\tif(isset($attribute['data'])){\r\n\r\n\t\t\tif(is_array($attribute['data'])){\r\n\t\t\t\tforeach($attribute['data'] as $k => $v){\r\n\t\t\t\t\t$optionArray[$k] = (is_array($v) ? $v[0] : $v);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t$tmp_arr = explode(\"%\",$attribute['data']);\r\n\t\t\t\t\r\n\t\t\t\tif($tmp_arr[0] == 'base'){\r\n\t\t\t\t\t\r\n\t\t\t\t\t$infoArray = explode(\";\", $tmp_arr[1]);\r\n\t\t\t\t\t$optionArray = array();\r\n\t\t\t\t\tif(isset($infoArray[4]) && ($tag == 'select' || $tag == 'radioBox')){\r\n\t\t\t\t\t\tfor($i=4;isset($infoArray[$i]);$i++){\r\n\t\t\t\t\t\t\t$ex_def = split(\"[,:]\", $infoArray[$i]); // save old functionality\r\n\t\t\t\t\t\t\tif(isset($ex_def[1])){\r\n\t\t\t\t\t\t\t\t$optionArray[$ex_def[0]] = $ex_def[1];\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t$optionArray[] = $infoArray[$i];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$preg_ex = \"/^((.+) as )?[^a-zA-Z_]*([a-zA-Z_]+)[^a-zA-Z_]*$/i\";\r\n\t\t\t\t\t$var_1 = $infoArray[1];\r\n\t\t\t\t\tpreg_match($preg_ex,$infoArray[1],$ex);\r\n\t\t\t\t\tif($ex[1]){\r\n\t\t\t\t\t\t$var_1 = $ex[3];\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t$infoArray[1] = \"`\".$infoArray[1].\"`\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$var_2 = $infoArray[2];\r\n\t\t\t\t\tpreg_match($preg_ex, $infoArray[2], $ex);\r\n\t\t\t\t\tif($ex[1]){\r\n\t\t\t\t\t\t$var_2 = $ex[3];\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t$infoArray[2] = \"`\".$infoArray[2].\"`\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$criteria = '';//(isset($infoArray[3]) ? $infoArray[3] : ' order by `'.$var_2.'` ');\r\n\t\t\t\t\t$rdr = BASIC_SQL::init()->read_exec(\"select * from `\".$infoArray[0].\"` where 1=1 \".$criteria.\" \");\r\n\r\n\t\t\t\t\tfor($i=0;$rdr->read();$i++){\r\n\t\t\t\t\t if(!$rdr->test($var_2)){\r\n\t\t\t\t\t if(isset($GLOBALS['BASIC_LANG']) && is_object($GLOBALS['BASIC_LANG']) && $rdr->test($var_2.'_'.$GLOBALS['BASIC_LANG']->current())){\r\n\t\t\t\t\t $optionArray[$rdr->field($var_1)] = $rdr->field($var_2.'_'.BASIC_LANGUAGE::init()->current());\r\n\t\t\t\t\t }else{\r\n\t\t\t\t\t throw new Exception('Column '.$infoArray[0].'.'.$var_2.' no exist.');\r\n\t\t\t\t\t }\r\n\t\t\t\t\t }else{\r\n\t\t\t\t\t\t $optionArray[$rdr->field($var_1)] = $rdr->field($var_2);\r\n\t\t\t\t\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}else if($tmp_arr[0] == 'query'){ // NEW\r\n\t\t\t\t \r\n\t\t\t\t\t$infoArray = explode(\";\", $tmp_arr[1]);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(!isset($infoArray[1])){\r\n\t\t\t\t\t $query = $infoArray[0];\r\n $query = preg_replace(\"[\\n\\t\\r]\",\"\",$query);\r\n \r\n preg_match('/select[ ]+(.+)[ ]+from/i',$query,$ex);\r\n if(isset($ex[1])){\r\n $ex[1] = preg_replace(\"/[` ]+/\",\"\",$ex[1]);\r\n \r\n $tmp = explode(',',$ex[1]);\r\n if(isset($tmp[1])){\r\n $infoArray[2] = $tmp[1];\r\n }else{\r\n $infoArray[2] = $tmp[0];\r\n }\r\n $infoArray[1] = $tmp[0];\r\n \r\n $infoArray[1] = preg_replace(\"/^[^\\.]+\\./\", \"\", $infoArray[1]);\r\n $infoArray[2] = preg_replace(\"/^[^\\.]+\\./\", \"\", $infoArray[2]);\r\n \r\n $infoArray[0] = preg_replace('/select[ ]+(.+)[ ]+from/i','select * from',$query);\r\n }else{\r\n throw new Exception('In query ['.$query.'] no declare id and text columns.');\r\n }\t\t\t\t \r\n\t\t\t\t\t}\r\n\t\t\t\t\tBASIC_SQL::init()->read_exec($infoArray[0]);\r\n\t\t\t\t\twhile($rdr->read()){\r\n\t\t\t\t if(!$rdr->test($infoArray[2])){\r\n\t\t\t\t\t if(isset($GLOBALS['BASIC_LANG']) && is_object($GLOBALS['BASIC_LANG']) && $rdr->test($infoArray[2].'_'.$GLOBALS['BASIC_LANG']->current())){\r\n\t\t\t\t\t $optionArray[$rdr->field($infoArray[1])] = $rdr->field($infoArray[2].'_'.BASIC_LANGUAGE::init()->current());\r\n\t\t\t\t\t }else{\r\n\t\t\t\t\t throw new Exception(500,'Column '.$infoArray[0].'.'.$infoArray[2].' no exist.');\r\n\t\t\t\t\t }\r\n\t\t\t\t\t }else{\r\n\t\t\t\t\t\t $optionArray[$rdr->field($infoArray[1])] = $rdr->field($infoArray[2]);\r\n\t\t\t\t\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$ex = explode(\";\", $tmp_arr[1]);\r\n\t\t\t\t\tforeach($ex as $V){\r\n\t\t\t\t\t\t$spl = explode(\":\", $V);\r\n\t\t\t\t\t\tif(isset($spl[1])){\r\n\t\t\t\t\t\t\t$optionArray[$spl[0]] = $spl[1];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$attribute['data'] = $optionArray;\r\n\t\t}\r\n \t\treturn $this->controle($tag, $name, $value, $attribute);\r\n \t}", "function drawDropDownCustom($options)\n\t{\n\t\t$controlName=$options['controlName'];\n\t\t$orgValue=$options['orgValue'];\n\t\t$items=$options['items']; \n\t\t$valueColumnName=$options['valueColumnName'];\n\t\t$titleColumnName=$options['titleColumnName'];\n\t\t$levelColumnName=$options['levelColumnName'];\n\t\t$hasChildColumnName=$options['hasChildColumnName'];\n\t\t$groupNameColumnName=$options['groupNameColumnName'];\n\t\t$groupIdColumnName=$options['groupIdColumnName'];\n\t\t$defaultValue=$options['defaultValue'];\n\t\t$defaultTitle=$options['defaultTitle'];\n\t\t$moreAttributes=$options['attributes'];\n\t\t$useKeyAsKeyAndValueAsValue=$options['useKeyAsKeyAndValueAsValue'];\n\t\t\n\t\tif (is_string($items))\n\t\t\t$items=cmfcMySql::getRowsCustom($items);\n\n\t\t\t\n\t\tif ($options['selectType']=='multiSelect') {\n\t\t\t$moreAttributes['multiple']='multiple';\n\t\t\t$controlName.='[]';\n\t\t}\n\t\t\n\t\t/*\n\t\techo '<pre style=\"direction:ltr\">';\n\t\tprint_r($items);\n\t\techo \"</pre>\";\n\t\t*/\n\t\t$moreAttributesStr=cmfcHtml::attributesToHtml($moreAttributes);\n\t\t\n\t\t$lastGroupName='';\n\t\t$firstRow=true;\n\n\t\t$html=sprintf('<select name=\"%s\" %s >'.\"\\n\", $controlName, $moreAttributesStr);\n\t\tif (!is_null($defaultValue)) {\n\t\t\tif ($options['disabledDefaultValue']==true) {\n\t\t\t\t$disabledHtml='disabled=\"disabled\"';\n\t\t\t} else {\n\t\t\t\t$disabledHtml='';\n\t\t\t}\n\t\t\t$html.=sprintf('<option value=\"%s\" %s>%s</option>'.\"\\n\",$defaultValue,$disabledHtml, $defaultTitle);\n\t\t}\n\t\t//$i = 0; //count the number of selected orgValues\n\t\t\n\t\tif (!is_array($orgValue))\n\t\t\t$orgValues[] = $orgValue;\n\t\telse\n\t\t\t$orgValues = $orgValue;\n\t\t\t\n\t\tif(is_array($items)) // added by babak\n\t\tforeach ($items as $key=>$item) {\n\t\t\tif (is_array($item)) {\n\t\t\t\t$title=$item[$titleColumnName];\n\t\t\t\t$value=$item[$valueColumnName];\n\t\t\t} elseif (is_integer($key) and !$useKeyAsKeyAndValueAsValue) {\n\t\t\t\t$title=$item;\n\t\t\t\t$value=$item;\n\t\t\t} else {\n\t\t\t\t$title=$item;\n\t\t\t\t$value=$key;\n\t\t\t}\n\n\t\t\tif (!empty($groupNameColumnName) && ($options['interface']['group'] or !isset($options['interface']['group']))) {\n\t\t\t\t$groupName=$item[$groupNameColumnName];\n\t\t\t\t$groupId=$item[$groupIdColumnName];\n\t\t\t\t\n\t\t\t\tif ($lastGroupName==$groupName) {$groupChanged=false;} else {$groupChanged=true;}\n\t\t\t\t//echo \"[$lastGroupName:$groupName]\";\n\t\t\t\tif ($groupChanged==true) {\n\t\t\t\t\tif (!$firstRow) { $html.=\"</optgroup>\\n\"; }\n\t\t\t\t\t$html.=sprintf('<optgroup label=\"%s\" title=\"%s\">'.\"\\n\",$groupName, $groupId);\n\t\t\t\t\t$lastGroupName=$groupName;\n\t\t\t\t}\n\t\t\t\t$groupChanged=false;\n\t\t\t}\n\t\t\t$selected='';\n\t\t\tif (in_array($value,$orgValues)) {\n\t\t\t\t$selected='selected=\"selected\"';\n\t\t\t\t//$i++;\n\t\t\t} else {\n\t\t\t\t$selected = '';\n\t\t\t}\n\t\t\t\n\t\t\t$itemAttributes=array();\n\t\t\t#--(Begin)-->indent items to show them as a tree (hierarchical items)\n\t\t\tif (!empty($levelColumnName)) {\n\t\t\t\tif (empty($firstLevelNumber))\n\t\t\t\t\t$firstLevelNumber=$item[$levelColumnName];\n\t\t\t\t\t\n\t\t\t\t$depth=$item[$levelColumnName]-$firstLevelNumber;\n\t\t\t\tif (!isset($options['interface']['itemIndent'])) $options['interface']['itemIndent']=20;\n\t\t\t\t$itemIndent=intval($options['interface']['itemIndent']);\n\t\t\t\tif (!$options['interface']['isIe'])\t {\n\t\t\t\t\t$itemIndent=intval($options['interface']['itemIndent']);\n\t\t\t\t\tif ($options['interface']['direction']=='rightToLeft')\n\t\t\t\t\t\t$itemAttributes['style'].=';padding-right:'.($itemIndent*$depth).'px;';\n\t\t\t\t\telse\n\t\t\t\t\t\t$itemAttributes['style'].=';padding-left:'.($itemIndent*$depth).'px;';\n\t\t\t\t} else {\n\t\t\t\t\t$itemIndent=round($itemIndent/2)*$depth;\n\t\t\t\t\t$title=str_repeat('&nbsp;',$itemIndent).$title;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (isset($options['isParentsSelectable'])) {\n\t\t\t\t\t$item['isParentsSelectable'] = $options['isParentsSelectable'];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ($item[$hasChildColumnName]) {\n\t\t\t\t\t$itemAttributes['style'].=';font-weight:bold';\n\t\t\t\t\tif ($options['isParentsSelectable']!=true)\n\t\t\t\t\t\t$itemAttributes['disabled']=true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t#--(End)-->indent items to show them as a tree (hierarchical items)\n\t\t\t$itemAttributes=cmfcHtml::attributesToHtml($itemAttributes);\n\t\t\t\n\t\t\t$html.=sprintf('<option value=\"%s\" %s %s>%s</option>'.\"\\n\",\n\t\t\t\t\t\t\t$value, $selected, $itemAttributes,$title);\n\t\t\t$firstRow=false;\n\t\t}\n\t\tif (isset($groupName)) $html.=\"</optgroup>\\n\";\n\t\t$html.=\"</select>\\n\";\n\t\treturn $html;\n\t}", "public function buildConditionQuery()\n\t\t\t{\n\t\t\t\t$this->sql_condition = ' user_id='.$this->CFG['user']['user_id'];\n\t\t\t}", "function _field_select($fval) \n {\n\n // if need be, copy the current vals for safety + reset()\n $postedvals = (is_array($fval))? $fval : array();\n\n $res = sprintf(\"<select size=\\\"1\\\" name=\\\"%s\\\" id=\\\"%s\\\" class=\\\"%s\\\" %s>\",\n $this->fname, \n $this->fname, \n (isset($this->attribs['class']))? $this->attribs['class'] : $this->element_class,\n $this->extra_attribs);\n\n if (empty($fval) and isset($this->attribs['top_value'])) {\n $res .= \"<option value=\\\"\\\">\". $this->attribs['top_value'] .\"</option>\"; \n } \n\n $opts = $this->opts; # $this->_array_stringify($this->opts);\n foreach ($opts as $optkey => $optval) { \n $res .= sprintf(\"<option value=\\\"%s\\\"%s>%s</option>\",\n $this->_htmlentities($optkey),\n ((in_array($optkey, $postedvals) || $optkey == $fval) and !empty($fval))? \" selected\" : \"\",\n $this->_htmlentities($optval));\n }\n $res .= \"</select>\";\n return $res;\n }", "function _generateSelection()\n {\n $i = 0;\n foreach ($_POST as $key=>$value) {\n echo \"<input type='hidden' name=$key value=$value required>\";\n echo \"<div class='form-group'>\";\n if (isset($value) && $this->\n _childexists($value, $this->_getRubriekFromDb())) {\n echo $this->_generateRubriekVerkoopList($value, $this->_getRubriekFromDb(), \"subrubriek\" . $i);\n echo \"<script type='text/javascript'>\n document.getElementById('$key').disabled = true;\n </script>\";\n }\n echo \"</div>\";\n echo \"<script type='text/javascript'>\n document.getElementById('$key').value= $value \n </script>\";\n $i++;\n }\n }", "function build_html_filter($clase, $filtro, $nombre, $valor = SIN_FILTRO){\n $f = '';\n $f .= \"<label for='filters[$filtro]'>\n $nombre</label>&nbsp;\n <select name='filters[$filtro]' onchange='this.parentNode.submit()'>\";\n\n $f.= \"<option value='\".SIN_FILTRO.\"'>--</option>\\n\";\n// <option value='0'>-- Sin $nombre --</option>\\n\";\n\n $instancias = $clase::find('all'); // TODO sustituir por index($filtros)\n // usort TODO\n usort($instancias, function($a, $b){\n return $a->_name > $b->_name;\n });\n foreach ($instancias as $i){\n $selected = '';\n\n if ($valor == $i->id){\n $selected = ' selected=\"selected\"';\n }\n\n $f.= \"<option value='\".$i->id.\"' $selected>\". $i->_name.'</option>';\n }\n $f.= \"</select>\\n\";\n return $f;\n}", "function getDropDown() ;", "function edd_incentives_render_conditions() {\n global $post;\n\n $post_id = $post->ID;\n $meta = get_post_meta( $post_id, '_edd_incentive_meta', true );\n $downloads = get_posts( array( 'post_type' => 'download', 'numberposts' => 999999, 'post_status' => 'publish' ) );\n $product_css = ( ! isset( $meta['condition_type'] ) || $meta['condition_type'] == 'products' ? '' : ' style=\"display: none;\"' );\n $value_css = ( isset( $meta['condition_type'] ) && $meta['condition_type'] == 'value' ? '' : ' style=\"display: none;\"' );\n $count_css = ( isset( $meta['condition_type'] ) && $meta['condition_type'] == 'count' ? '' : ' style=\"display: none;\"' );\n\n // Condition type\n echo '<p>';\n echo '<strong><label for=\"_edd_incentive_condition_type\">' . __( 'Type', 'edd-incentives' ) . '</label></strong><br />';\n echo '<select class=\"edd-incentives-select2\" name=\"_edd_incentive_meta[condition_type]\" id=\"_edd_incentive_condition_type\">';\n echo '<option value=\"products\"' . ( ! isset( $meta['condition_type'] ) || $meta['condition_type'] == 'products' ? ' selected' : '' ) . '>' . __( 'Products in cart', 'edd-incentives' ) . '</option>';\n echo '<option value=\"value\"' . ( $meta['condition_type'] == 'value' ? ' selected' : '' ) . '>' . __( 'Combined value', 'edd-incentives' ) . '</option>';\n echo '<option value=\"count\"' . ( $meta['condition_type'] == 'count' ? ' selected' : '' ) . '>' . __( 'Number of products', 'edd-incentives' ) . '</option>';\n echo '</select>';\n echo '</p>';\n\n echo '<div class=\"edd-incentive-condition-product\"' . $product_css . '>';\n\n // Condition... condition?\n echo '<p>';\n echo '<strong><label for=\"_edd_incentive_product_condition\">' . __( 'Condition', 'edd-incentives' ) . '</label></strong><br />';\n echo '<select class=\"edd-incentives-select2\" name=\"_edd_incentive_meta[product_condition]\" id=\"_edd_incentive_product_condition\">';\n echo '<option value=\"any\"' . ( ! isset( $meta['product_condition'] ) || $meta['product_condition'] == 'any' ? ' selected' : '' ) . '>' . __( 'Any of the products', 'edd-incentives' ) . '</option>';\n echo '<option value=\"all\"' . ( $meta['product_condition'] == 'all' ? ' selected' : '' ) . '>' . __( 'All of the products', 'edd-incentives' ) . '</option>';\n echo '</select>';\n echo '</p>';\n\n // Downloads\n echo '<p>';\n echo '<strong><label for=\"_edd_incentive_downloads\">' . __( 'Downloads', 'edd-incentives' ) . '</label></strong><br />';\n echo '<select class=\"edd-incentives-select2\" name=\"_edd_incentive_meta[downloads][]\" id=\"_edd_incentive_downloads\" multiple>';\n foreach( $downloads as $key => $download ) {\n echo '<option value=\"' . $download->ID . '\"' . ( array_key_exists( $download->ID, $meta['downloads'] ) ? ' selected' : '' ) . '>' . $download->post_title . '</option>';\n }\n echo '</select>';\n echo '</p>';\n\n echo '</div>';\n\n echo '<div class=\"edd-incentive-condition-value\"' . $value_css . '>';\n\n // Minimum value\n echo '<p>';\n echo '<strong><label for=\"_edd_incentive_minimum_value\">' . __( 'Minimum Value', 'edd-incentives' ) . '</label></strong><br />';\n echo '<input type=\"text\" name=\"_edd_incentive_meta[minimum_value]\" id=\"_edd_incentive_minimum_value\" value=\"' . ( isset( $meta['minimum_value'] ) ? $meta['minimum_value'] : '' ) . '\" placeholder=\"' . edd_incentives_get_currency() . '\" />';\n echo '</p>';\n\n // Maximum value\n echo '<p>';\n echo '<strong><label for=\"_edd_incentive_maximum_value\">' . __( 'Maximum Value', 'edd-incentives' ) . '</label></strong><br />';\n echo '<input type=\"text\" name=\"_edd_incentive_meta[maximum_value]\" id=\"_edd_incentive_maximum_value\" value=\"' . ( isset( $meta['maximum_value'] ) ? $meta['maximum_value'] : '' ) . '\" placeholder=\"' . edd_incentives_get_currency() . '\" />';\n echo '</p>';\n\n echo '</div>';\n\n echo '<div class=\"edd-incentive-condition-count\"' . $count_css . '>';\n\n // Minimum count\n echo '<p>';\n echo '<strong><label for=\"_edd_incentive_minimum_count\">' . __( 'Minimum Number', 'edd-incentives' ) . '</label></strong><br />';\n echo '<input type=\"number\" min=\"0\" name=\"_edd_incentive_meta[minimum_count]\" id=\"_edd_incentive_minimum_count\" value=\"' . ( isset( $meta['minimum_count'] ) && $meta['minimum_count'] != '' ? $meta['minimum_count'] : '0' ) . '\" />';\n echo '</p>';\n\n // Maximum count\n echo '<p>';\n echo '<strong><label for=\"_edd_incentive_maximum_count\">' . __( 'Maximum Number', 'edd-incentives' ) . '</label></strong><br />';\n echo '<input type=\"number\" min=\"0\" name=\"_edd_incentive_meta[maximum_count]\" id=\"_edd_incentive_maximum_count\" value=\"' . ( isset( $meta['maximum_count'] ) && $meta['maximum_count'] != '' ? $meta['maximum_count'] : '0' ) . '\" />';\n echo '</p>';\n\n echo '</div>';\n}", "private function build_select_field($_meta, $_ptype = \"wccpf\", $_class = \"\", $_index, $_show_as_value = \"no\", $_readonly = \"\", $_cloneable = \"\", $_wrapper = true, $_has_pricing_rules = \"no\") {\r\n $html = ''; \r\n $has_field_rules = isset( $_meta[\"field_rules\"] ) && is_array( $_meta[\"field_rules\"] ) && count( $_meta[\"field_rules\"] ) != 0 ? \"yes\" : \"no\";\r\n if ($_show_as_value == \"no\") {\r\n $html = '<select data-has_field_rules=\"'.$has_field_rules.'\" data-has_pricing_rules=\"'.$_has_pricing_rules.'\" data-fkey=\"'. $_meta[\"key\"] .'\" class=\"' . $_ptype . '-field ' . $_class . '\" name=\"' . esc_attr($_meta[\"key\"] . $_index) . '\" data-field-type=\"'. $_meta[\"type\"] .'\" ' . $_ptype . '-pattern=\"mandatory\" ' . $_ptype . '-mandatory=\"' . $_meta[\"required\"] . '\" ' . $_cloneable . ' ' . $_readonly . ' >';\r\n \r\n $choices = explode(\";\", ((isset($_meta[\"choices\"]) && ! empty($_meta[\"choices\"])) ? $_meta[\"choices\"] : \"\"));\r\n $_meta[\"default_value\"] = (isset($_meta[\"default_value\"]) && ! empty($_meta[\"default_value\"])) ? trim($_meta[\"default_value\"]) : \"\";\r\n \r\n /* Placeholder option */\r\n if (isset($_meta[\"placeholder\"]) && !empty($_meta[\"placeholder\"])) {\r\n $html .= '<option value=\"wccpf_none\">' . esc_html($_meta[\"placeholder\"]) . '</option>';\r\n }\r\n $choices = apply_filters( \"wcff_select_option_before_rendering\", $choices, $_meta[\"key\"] );\r\n foreach ($choices as $choice) {\r\n $attr = '';\r\n $key_val = explode(\"|\", $choice);\r\n /* It has to be two items ( Value => Label ), otherwise don't proceed */\r\n if (count($key_val) == 2) {\r\n if ($_ptype != \"wccaf\") {\r\n /* Since version 2.0.0 - Default value will be absolute value, not as key|val pair */\r\n if (strpos($_meta[\"default_value\"], \"|\") !== false) {\r\n /* Compatibility for <= V 1.4.0 */\r\n if ($choice == $_meta[\"default_value\"]) {\r\n $attr = 'selected';\r\n }\r\n } else {\r\n /*\r\n * For product fields from V 2.0.0\r\n * For admin fields, which will be displyed as Product Fields\r\n */\r\n if (trim($key_val[0]) == $_meta[\"default_value\"]) {\r\n $attr = 'selected';\r\n }\r\n }\r\n } else {\r\n if ($key_val[0] == $_meta[\"value\"]) {\r\n $attr = 'selected';\r\n }\r\n }\r\n $html .= '<option value=\"' . esc_attr(trim($key_val[0])) . '\" ' . $attr . '>' . esc_html(trim($key_val[1])) . '</option>';\r\n }\r\n }\r\n $html .= '</select>';\r\n } else {\r\n /*\r\n * Show the raw value instead of as a field\r\n * Used for the Admin Field showing on product page\r\n */\r\n $html = '<p class=\"wcff-wccaf-value-para-tag\">' . $_meta[\"default_value\"] . '</p>';\r\n }\r\n /* Add wrapper around the field, based on the user options */\r\n if ($_wrapper) {\r\n $html = $this->built_field_wrapper($html, $_meta, $_ptype, $_index);\r\n }\r\n return $html;\r\n }", "function open_condition($val){\n\t\t$var_cond=$val;\n\t\t$this->condition_passed=false;\n\t\tglobal $in;\n\t\tglobal $inputval;\n\t\t$val_cond=$this->attributes['CONDITION_VALUE'];\n\t\tif ($this->attributes['HIDE']=='yes') {\n\t\t\tif (preg_match(\"/,/\", $val_cond)){\n\n\t\t\t\t$this->check_js.=\"\n\t valore=document.forms[0].\".$this->id.\".value;\n\t\t\t\t\tdocument.forms[0].\".$this->id.\".value='';\n\t\t\t\t if (document.getElementById('tr_\".$this->id.\"'))\n\t\t\t\t\t document.getElementById('tr_\".$this->id.\"').style.display='none';\n\t\t\t\t\t\";\n\t\t\t\t$vals=explode(\",\",$val_cond);\n\t\t\t\t//$this->condition_passed=false;\n\t\t\t\tforeach ($vals as $key => $value){\n\t\t\t\t\tif (isset($in['INVIOCO'])) $value_to_control=$in[$var_cond];\n\t\t\t\t\telse $value_to_control=$inputval[$var_cond];\n\t\t\t\t\tif ($value_to_control==$value) $this->condition_passed=true;\n\t\t\t\t\t$this->check_js.=\" \\n\n\t\t\t\t\t\tvalue=value_of('$var_cond', '0');\n\t\t\t\t\t\tif (value=='$value')\n\t\t\t\t\t\t{\n\t\t\t\t \tif (document.getElementById('tr_\".$this->id.\"'))\n\t\t\t\t\t\t\t\tdocument.getElementById('tr_\".$this->id.\"').style.display='';\n\t\t\t\t\t\t document.forms[0].\".$this->id.\".value=valore;\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\";\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\n\t\t\t\t$op ='!=';\n\t\t\t\tif (preg_match(\"/\\!/\", $val_cond)) {\n\t\t\t\t\t$val_cond=str_replace(\"!\", \"\",$val_cond);\n\t\t\t\t\t$op='==';\n\t\t\t\t}\n\t\t\t\tif (isset($in['INVIOCO'])) $value_to_control=$in[$var_cond];\n\t\t\t\telse $value_to_control=$inputval[$var_cond];\n\t\t\t\tif ($op=='==') $this->condition_passed=($value_to_control!=$val_cond);\n\t\t\t\telse $this->condition_passed=($value_to_control==$val_cond);\n\t\t\t\t//echo \"<hr>$op - $var_cond - $val_cond - {$this->attributes['VAR']}<hr>\";\n\n\t\t\t\t$this->check_js=\" \\n\n\t\t\t\t\tvalue=value_of('$var_cond', '0');\n\t\t\t\t\tif (value $op '$val_cond')\n\t\t\t\t\t{\n\t\t\t\t\t\t\";\n\t\t\t\tforeach($this->values as $key=> $val){\n\t\t\t\t\t$this->check_js.=\"\n\t\t\t\t document.forms[0].\".$key.\".checked=false;\n\t\t\t\t if (document.getElementById('tr_\".$this->id.\"')) document.getElementById('tr_\".$this->id.\"').style.display='none';\n\t\t\t\t\";\n\t\t\t\t}\n\t\t\t\t$this->check_js.=\"\n\t\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t if (document.getElementById('tr_\".$this->id.\"'))\n\t\t\t\t\t document.getElementById('tr_\".$this->id.\"').style.display='';\n\t\t\t\t\t\";\n\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif ($this->attributes['HIDE_THIS']=='yes') {\n\t\t\t\tif (preg_match(\"/,/\", $val_cond)){\n\t\t\t\t\t$this->check_js.=\"\n\t valore=document.forms[0].\".$this->id.\".value;\n\t\t\t\t\tdocument.forms[0].\".$this->id.\".value='';\n\t\t\t\t \tif (document.getElementById('cell_\".$this->id.\"'))\n\t\t\t\t\t \tdocument.getElementById('cell_\".$this->id.\"').style.display='none';\n\t\t\t\t\tif (document.getElementById('cell_input\".$this->id.\"'))\n\t\t\t\t\t \tdocument.getElementById('cell_input\".$this->id.\"').style.display='none';\n\t\t\t\t\t\";\n\t\t\t\t\t$vals=explode(\",\",$val_cond);\n\t\t\t\t\t//$this->condition_passed=false;\n\t\t\t\t\tforeach ($vals as $key => $value){\n\t\t\t\t\t\tif ($in[$var_cond]==$value) $this->condition_passed=true;\n\t\t\t\t\t\t$this->check_js.=\" \\n\n\t\t\t\t\t\tvalue=value_of('$var_cond', '0');\n\t\t\t\t\t\tif (value=='$value')\n\t\t\t\t\t\t{\n\t\t\t\t \t\t\tif (document.getElementById('cell_\".$this->id.\"'))\n\t\t\t\t\t\t\t\tdocument.getElementById('cell_\".$this->id.\"').style.display='';\n\t\t\t\t\t\t\tif (document.getElementById('cell_input\".$this->id.\"'))\n\t\t\t\t\t\t\t\tdocument.getElementById('cell_input\".$this->id.\"').style.display='';\n\t\t\t\t\t\t document.forms[0].\".$this->id.\".value=valore;\n\n\t\t\t\t\t\t}\n\t\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$op ='!=';\n\t\t\t\t\tif (preg_match(\"/\\!/\", $val_cond)) {\n\t\t\t\t\t\t$val_cond=str_replace(\"!\", \"\",$val_cond);\n\t\t\t\t\t\t$op='==';\n\t\t\t\t\t}\n\t\t\t\t\tif ($op=='==') $this->condition_passed=($in[$var_cond]!=$val_cond);\n\t\t\t\t\telse $this->condition_passed=($in[$var_cond]==$val_cond);\n\t\t\t\t\t//echo \"<hr>$op - $var_cond - $val_cond - {$this->attributes['VAR']}<hr>\";\n\t\t\t\t\t$this->check_js=\" \\n\n\t\t\t\t\tvalue=value_of('$var_cond', '0');\n\t\t\t\t\tif (value $op '$val_cond')\n\t\t\t\t\t{\n\t\t\t\t\t\t\";\n\t\t\t\t\t$this->check_js.=\"\n\t\t\t\t\tif (document.forms[0].\".$this->id.\")\n\t\t\t\t\t\tdocument.forms[0].\".$this->id.\".value='';\n\t\t\t\t \tif (document.getElementById('cell_\".$this->id.\"'))\n\t\t\t\t\t document.getElementById('cell_\".$this->id.\"').style.display='none';\n\t\t\t\t\tif (document.getElementById('cell_input\".$this->id.\"'))\n\t\t\t\t\t document.getElementById('cell_input\".$this->id.\"').style.display='none';\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t if (document.getElementById('cell_\".$this->id.\"'))\n\t\t\t\t\t\t document.getElementById('cell_\".$this->id.\"').style.display='';\n\t\t\t\t\t if (document.getElementById('cell_input\".$this->id.\"'))\n\t\t\t\t\t \tdocument.getElementById('cell_input\".$this->id.\"').style.display='';\n\t\t\t\t\t}\n\t\t\t\t\t\";\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif ($in[$var_cond]==$value) $this->condition_passed=true;\n\t\t\t\t$this->check_js.=\"\n\t\t\tvalue=value_of('$var_cond', '0');\n\t\t\t\t\t\tif (value!='$val_cond')\n\t\t\t\t\t\t{ \";\n\t\t\t\tforeach($this->values as $key => $val) $this->check_js.=\"\n\n\t\t\t\t\t\tdocument.forms[0].\".$key.\".checked=false;\n\t\t\t\t\t\t//document.getElementById('\".$this->id.\"').style.display='none';\n\n\t\t\t\t\t\t\";\n\t\t\t\t$this->check_js.=\"}\";\n\t\t\t}\n\t\t}\n\n\t\t$this->html=\"<tr id='\".$this->id.\"' style=\\\"display:\\\">\".$this->html.\"</tr>\";\n\t}", "protected function filterDropdownFields(): array\n {\n return [];\n }", "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}", "public function conditionStringDataProvider() {}", "function print_select($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\t\t\n\t\techo '<select class=\"option-select'.((isset($value['conditional']) && $value['conditional'])?' option-conditional':'').'\" name=\"'.$value['id'].'\" id=\"'.$value['id'].'\">';\n\t\t\n\t\tforeach ($value['options'] as $option) {\n\t\t\t$attr='';\t\n\t\t\t if ( get_option( $value['id'] ) == $option['id']) {\n\t\t\t\t$attr = ' selected=\"selected\"';\n\t\t\t }\n\t\t \t if ( $option['id'] == 'disabled') {\n\t\t\t\t$attr.= ' disabled=\"disabled\"';\n\t\t\t }\n\t\t\t if($option['class']){\n\t\t\t\t$attr.=' class=\"'.$option['class'].'\"';\t\t\t \t\n\t\t\t }\n\t\t\techo '<option '.$attr.' value=\"'.$option['id'].'\">'.$option['name'].'</option>'; \n\t\t} \n\t\n\t\techo '</select>';\n\t\t$this->close_option($value);\n\t}", "public function status_filter() {\n\n\t\tglobal $typenow;\n\n\t\tif ( ('ticket' != $typenow ) || isset( $_GET['post_status'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$this_sort = isset( $_GET['dev_status'] ) ? filter_input( INPUT_GET, 'dev_status', FILTER_SANITIZE_STRING ) : '';\n\t\t$all_selected = ( '' === $this_sort ) ? 'selected=\"selected\"' : '';\n\t\t$open_selected = ( ! isset( $_GET['dev_status'] ) && true === (bool) dev_get_option( 'hide_closed' ) || 'open' === $this_sort ) ? 'selected=\"selected\"' : '';\n\t\t$closed_selected = ( 'closed' === $this_sort ) ? 'selected=\"selected\"' : '';\n\t\t$dropdown = '<select id=\"dev_status\" name=\"dev_status\">';\n\t\t$dropdown .= \"<option value='' $all_selected>\" . __( 'Any Status', TEXTDOMAIN ) . \"</option>\";\n\t\t$dropdown .= \"<option value='open' $open_selected>\" . __( 'Open', TEXTDOMAIN ) . \"</option>\";\n\t\t$dropdown .= \"<option value='closed' $closed_selected>\" . __( 'Closed', TEXTDOMAIN ) . \"</option>\";\n\t\t$dropdown .= '</select>';\n\n\t\techo $dropdown;\n\n\t}", "public function onRsformBackendCreateConditionOptionFieldItem(array $options): void\n\t{\n\t\tswitch ($options['field']->ComponentTypeId)\n\t\t{\n\t\t\tcase ROPAYMENTS_FIELD_PAYMENT_MULTIPLE_PRODUCTS:\n\t\t\t\t$options['item']->value = $options['item']->label;\n\t\t\t\tbreak;\n\t\t}\n\t}", "function dropDown($cols){\n $form = \"<option value=''> --Select--</option>\" . PHP_EOL;\n foreach($cols as $col)\n {\n $form .= \"<option value='\" . $col . \"'>\" . $col . \"</option>\";\n }// End of Foreach\n return $form;\n}", "function LUPE_option_combo_vet($Vet, $NomeCombo, $PreSelect, $LinhaFixa = ' ', $JS = '', $Style = '')\r\n{\r\n\r\n $numrows = count($Vet);\r\n\r\n $html = \"<select id='$NomeCombo' name='$NomeCombo' $JS style='$Style'>\\n\";\r\n\r\n\tif ($LinhaFixa != '')\r\n\t\t$html .= \"<option value=''>$LinhaFixa</option>\\n\";\r\n\r\n if ($numrows == 0) {\r\n\t\t$html .= \"<option value=''>Não há informação no sistema</option>\\n\";\r\n } else {\r\n\t ForEach($Vet as $Chave => $Valor ){\r\n \t\t $html .= \"<option value='$Chave'\";\r\n\r\n\t\t if ($PreSelect == $Chave)\r\n\t\t\t$html .= 'selected >';\r\n \t\t else\r\n\t\t\t$html .= '>';\r\n\r\n\t \t $html .= \"$Valor</option>\\n\";\r\n }\r\n }\r\n\r\n $html .= '</select>';\r\n\r\n return $html;\r\n}", "protected function createUserAndGroupListForSelectOptions() {}", "function option_helper($post, $value, $label) {\n $selected = $post->post_status == $value ? 'selected' : '';\n return \"<option value='{$value}' {$selected}>{$label}</option>\";\n }", "public function getminquali(){\n\t\t\t$prgid = $this->input->post('stu_prgname');\n\t\t\t//print_r($prgid);die;\n\t\t\t//$selectfield=array('admop_min_qual');\n\t\t\t//$whdata = array('admop_prgname_branch' => $prgid);\n\t\t\t//$eligible = $this->commodel->get_distinctrecord('admissionopen',$selectfield,$whdata);\n\t\t\t$eligible = $this->commodel->get_listspfic2('admissionopen','','admop_min_qual','admop_prgname_branch',$prgid,'admop_min_qual');\n\t\tforeach($eligible as $datas):\n\t\t\t\t$eligible = $datas->admop_min_qual; \n\t\t\t\t//echo \"<option id='stu_eligble' value='$eligible'>\".\"$eligible\".\"</option>\";\n\t\t\t\techo \"<span id='stu_eligble'>$eligible</span>\";\n \t\tendforeach;\n\t }", "private function filterOptions(){\n $request = new Request();\n\n $key = $request->query->get('key') ? $this->global_helper_service->cleanDataInput($request->query->get('key')) : '';\n $date_range = $request->query->get('date_range') ? $request->query->get('date_range') : '';\n\n $array_filters = array();\n\n $array_filters['key'] = array(\n 'type' => 'input',\n 'title' => 'Search',\n 'default_value' => $key\n );\n\n $array_filters['date_range'] = array(\n 'type' => 'date_picker',\n 'title' => 'Date Range',\n 'options' => '',\n 'default_value' => $date_range\n );\n\n return $this->admincp_service->handleElementFormFilter($array_filters);\n }", "function giorno($min,$max)\n{\n$giorno='';\nif(!$min) $min='1';\nif(!$max) $max='31';\n$giorni=array();\nfor($x=$min;$x<=$max;$x++) $giorni[]=$x;\n#$giorni= array('01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31');\nforeach($giorni as $gi)\n\t$giorno .= \"<option value=$gi>$gi</option>\";\n$giorno .= \"</select>\";\necho \"$giorno\";\n}", "public function get_selected_floorNo()\n {\n $floorNo = $this->Seatmodel->get_result_data('hostel_floor');\n $data = '<select name=\"floor_id_edit\" id=\"floor_id_edit_'.$_POST['bedId'].'\" class=\"form-control\" style=\"width: 60px;\">';\n \n if(!empty($floorNo)){\n foreach ($floorNo as $value) {\n if($value->floor_name==$_POST['floor_name']){\n $selected = \"selected\";\n }else{\n $selected = \"\";\n }\n $data .= '<option value=\"'.$value->id.'\" '.$selected.'>'.$value->floor_name.'</option>';\n }\n }\n $data .= '</select>'; \n echo $data; exit();\n }", "function getNameOptions(){\n $db = JFactory::getDBO();\n $query = $db->getQuery(true);\n \n // Select some fields\n //$query->select('DISTINCT name');\n $query->select('name');\n // From the hello table\n $query->from('#__helloworld_message');\n\t\t\t\t\n\t\t\t\t$db->setQuery($query);\n\t\t\t\t$result = $db->loadObjectList();\n\t\t\t\n\t\t\tforeach($result as $item){\n\t\t\t\t$name = $item->name;\n\t\t\t\t$filter_name_options[] = JHTML::_('select.option', $name , $name);\n\t\t\t\t}\n\t\t\treturn $filter_name_options;\n\t\t\t\n\t\t\t}", "function products_settings_field($settings, $value) { \n $attr = array(\"post_type\"=>\"product\", \"orderby\"=>\"name\", \"order\"=>\"asc\", 'posts_per_page' => -1);\n $categories = get_posts($attr); \n $data = '<input type=\"text\" value=\"'.$value.'\" name=\"'.$settings['param_name'].'\" class=\"wpb_vc_param_value wpb-input wpb-select vc_custom_select_custom_val '.$settings['param_name'].' '.$settings['type'].'\" id=\"vc_custom_select_custom_prod\">';\n $data .= '<div class=\"vc_custom_select_custom_wrapper\"><ul class=\"vc_custom_select_custom_vals\">';\n $insterted_vals = explode(',', $value);\n foreach($categories as $val) {\n if( in_array($val->ID, $insterted_vals) ) {\n $data .= '<li data-val=\"'.$val->ID.'\">'.$val->post_title.'<button>×</button></li>';\n }\n }\n $data .= '</ul>'; \n $data .= '<ul class=\"vc_custom_select_custom\">';\n foreach($categories as $val) {\n $selected = '';\n if( in_array($val->ID, $insterted_vals) ) {\n $selected = ' class=\"selected\"';\n }\n $data .= '<li' . $selected . ' data-val=\"'.$val->ID.'\">'.$val->post_title.'</li>';\n }\n $data .= '</ul></div>';\n return $data;\n}", "public function ajax_conditional_fields_options() {\n\t\tglobal $wpdb;\n\n\t\t$field_id = absint( $_REQUEST['field_id'] );\n\n\t\t$field_options = $wpdb->get_var( $wpdb->prepare( \"SELECT field_options FROM $this->field_table_name WHERE field_id = %d ORDER BY field_sequence ASC\", $field_id ) );\n\n\t\t$first_options = '';\n\t\tif ( !empty( $field_options ) ) {\n\t\t\t$options = maybe_unserialize( $field_options );\n\n\t\t\tforeach ( $options as $option ) {\n\t\t\t\t$first_options .= sprintf( '<option value=\"%1$s\">%2$s</option>', esc_attr( stripslashes( $option ) ), esc_html( stripslashes( $option ) ) );\n\t\t\t}\n\t\t}\n\n\t\techo $first_options;\n\n\t\tdie(1);\n\t}", "function FillStaticCombo($arrStr,$selectvalue) {\n\t$selectvalue1=\"\";\n\tforeach($arrStr as $k=>$v){\n\t if($selectvalue===$k){\n\t\t echo\"<option value=\".$k.\" selected>\".$v.\"</option>\";\n\t\t $selectvalue1=$selectvalue;\n\t }\n\t else\n\t\t echo\"<option value=\".$k.\" >\".$v.\"</option>\";\n\t}\n return $selectvalue1;\n}", "function dropdown_teknisi()\n { \n //Query untuk mengambil data user yang memiliki level 'Technician'\n $query = $this->db->query(\"SELECT A.username, B.nama FROM user A LEFT JOIN karyawan B ON B.nik = A.username WHERE A.level = 'Technician'\");\n\n //Value default pada dropdown\n $value[''] = '-- CHOOSE --';\n //Menaruh data user teknisi ke dalam dropdown, value yang akan diambil adalah value id_user yang memiliki level 'Technician'\n foreach ($query->result() as $row) {\n $value[$row->username] = $row->nama;\n }\n return $value;\n }", "private function createWhereByValue($value){\n $filterDbOfValue = $value->getFilterDB();\n if(is_null($filterDbOfValue)){\n $filterDbOfValue = $this->id .\"='\".$value->getId().\"'\";\n }\n return $filterDbOfValue;\n }", "private function getSelectFormValues()\n {\n $program_id = User::getLoggedInUser()->getCurrentProgram()->id;\n $selection_by = $this->_getParam('selection_by');\n $all_students = true;\n\n if ($selection_by == \"by-requirements\") {\n $default_filters = array('graduationStatus' => array(1), 'show_instructors' => 1);\n\n // format sub-filters for the students\n $filters = [];\n\n if ($this->_getParam('graduationMonth')) {\n $filters['graduationMonth'] = $this->_getParam('graduationMonth');\n }\n if ($this->_getParam('graduationYear')) {\n $filters['graduationYear'] = $this->_getParam('graduationYear');\n }\n if ($this->_getParam('certs')) {\n $filters['certificationLevels'] = $this->_getParam('certs');\n }\n if ($this->_getParam('status')) {\n $filters['graduationStatus'] = $this->_getParam('status');\n }\n if ($this->_getParam('groups')) {\n $filters['section'] = $this->_getParam('groups');\n }\n $filters['show_instructors'] = $this->_getParam('show_instructors');\n\n // if the filters are different than our standard set\n if ($filters != $default_filters) {\n $all_students = false;\n } else {\n $all_students = true;\n }\n\n if ($this->_getParam('all_students')) {\n $all_students = true;\n $filters = $default_filters;\n }\n $userContextIds = $this->getRoleDataIds($filters, $this->getParam('show_instructors'));\n $requirement_ids = array_unique($this->_getParam('requirement_ids'));\n } else {\n $userContextIds = $this->getParam('userContextIds');\n $requirement_ids = $this->requirementRepository->getRequirements($program_id, true, true, true, true);\n }\n\n $selectFormValues = [\n \"selection-by\" => $selection_by,\n \"userContextIds\" => $userContextIds,\n \"requirementIds\" => $requirement_ids,\n \"people_sub_filters\" => $filters,\n \"all_students\" => $all_students\n ];\n\n return $selectFormValues;\n }", "private function returnOptions($value)\n {\n if ($value == '2') {\n return '<option value=\"1\">' . RUNNING . '</option>\n <option value=\"2\" selected=\"selected\">' . WINTER . '</option>\n <option value=\"3\">' . FINISHED . '</option>';\n } elseif ($value == '3') {\n return '<option value=\"1\">' . RUNNING . '</option>\n <option value=\"2\">' . WINTER . '</option>\n <option value=\"3\" selected=\"selected\">' . FINISHED . '</option>';\n } else {\n return '<option value=\"1\" selected=\"selected\">' . RUNNING . '</option>\n <option value=\"2\">' . WINTER . '</option>\n <option value=\"3\">' . FINISHED . '</option>';\n }\n }", "function hundope_select_field_render() { \n\t\n}", "public function dropDownPostStatus($selected = \"\")\n{\n \n $name = 'post_status';\n \n $posts_status = array('publish' => 'Publish', 'draft' => 'Draft');\n \t\n if ($selected != '') {\n \n $selected = $selected;\n\n }\n \t\n return dropdown($name, $posts_status, $selected);\n \t\n}", "public function get_field_conditions_modal( $args ) {\n\n $name_id = $args['name_id'];\n $elment_id = str_replace( '.', '--', $name_id );\n $elment_id = str_replace( '[', '_', $elment_id );\n $elment_id = str_replace( ']', '', $elment_id );\n if ($args['parent']) {\n $value = $this->get_option( $args['parent']['id'], $args['section'], $args['std'], $args['global'] );\n $value = isset($value[$args['id']]) ? $value[$args['id']] : $args['std'];\n $args['disable'] = (isset( $args['parent']['disable'])) ? $args['parent']['disable'] : false;\n }else {\n $value = $this->get_option( $args['id'], $args['section'], $args['std'], $args['global'] );\n }\n\n $value = (isset($value['options']) && is_array($value['options'])) ? $value['options'] : array();\n $disable = (isset( $args['disable'] ) && $args['disable'] === true) ? 'disabled' : '';\n\n\n $options = $this->get_conditions();\n\n $multiselect_html = sprintf( '<select multiple=\"multiple\" class=\"%1$s-multi-select-field\" name=\"%2$s[]\" id=\"%3$s_conditions\" %4$s>', $this->settings_prefix, $name_id, $elment_id, $disable );\n\n foreach ( $options as $key => $label ) {\n $selected = (is_array($value) && in_array( $key, $value )) ? $key : '0';\n $multiselect_html .= sprintf( '<option value=\"%s\" %s>%s</option>', $key, selected( $selected, $key, false ), $label );\n }\n\n $multiselect_html .= sprintf( '</select>' );\n\n add_thickbox();\n\n $html = sprintf( '<a href=\"#TB_inline?&height=370&width=470&inlineId=%1$s_modal_%2$s\" title=\"%3$s\" class=\"button button thickbox\">%4$s</a>', $this->settings_prefix, $elment_id, __('Select your conditions', 'wp-ng'), __('Conditions', 'wp-ng') );\n $html .= sprintf( '<div id=\"%1$s_modal_%2$s\" style=\"display:none;\"><p>%3$s</p></div>', $this->settings_prefix, $elment_id, $multiselect_html );\n\n return $html;\n }", "function get_executives_and_fc()\r\n\t\t{\r\n\t\t\t$trr_id=$this->input->post('territory_id');\r\n\t\t\t$executives_list=$this->erpm->get_executives_by_territroy($trr_id);\r\n\t\t\t\r\n\t\t\techo '<select name=\"excutives_list\">';\r\n\t\t\t\techo '<option value=\"Choose\">Choose</option>';\r\n\t\t\t\tif($executives_list)\r\n\t\t\t\t{\r\n\t\t\t\t\tforeach($executives_list as $executive)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\techo '<option value=\"'.$executive['employee_id'].'\">'.$executive['name'].'-'.$executive['role_name'].'</option>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\techo '</select>';\r\n\t\t}", "function cmdCustType($name, $caption) {\n $optcust_type = array\n (\n array(\"\", \"\"),\n array(\"End User\", \"1\"),\n array(\"Dealer / Reseller\", \"2\"),\n array(\"Goverment / BUMN\", \"3\"),\n );\n ?>\n <tr>\n <td><?php getCaption($caption); ?> :</td>\n <td>\n <select class=\"easyui-combobox\"\n id=\"<?php echo $name; ?>\"\n name=\"<?php echo $name; ?>\"\n style=\"width:120px;\"\n data-options=\"panelHeight:100,editable:false,width:200\"\n disabled=true\n >\n <?php\n foreach ($optcust_type as $val) {\n echo '<option value=\"' . $val[1] . '\">' . $val[0] . '</option>';\n }\n ?>\n </select>\n </td>\n </tr>\n <?php\n}", "function build_selection_dropdown() {\n\t$output = array();\n\t$output[] = array('id' => '', 'text' => TEXT_SELECT);\n\t$output[] = array('id' => 'wo_journal_main.id', 'text' => 'Record ID');\n\t$output[] = array('id' => 'wo_journal_main.wo_id', 'text' => 'Work Order Num');\n\t$output[] = array('id' => 'wo_journal_main.wo_title', 'text' => 'Work Order Title');\n\t$output[] = array('id' => 'wo_journal_main.priority', 'text' => 'Priority');\n\t$output[] = array('id' => 'wo_journal_main.sku', 'text' => 'SKU');\n\t$output[] = array('id' => 'wo_journal_main.qty', 'text' => 'Quantity');\n\t$output[] = array('id' => 'wo_journal_main.post_date', 'text' => 'Post Date');\n\t$output[] = array('id' => 'wo_journal_main.closed', 'text' => 'Closed');\n\t$output[] = array('id' => 'wo_journal_main.closed_date', 'text' => 'Closed Date');\n\t$output[] = array('id' => 'wo_journal_main.notes', 'text' => 'Notes');\n\t$output[] = array('id' => 'wo_journal_main.bom_list', 'text' => 'BOM List');\n\t$output[] = array('id' => 'wo_journal_main.ref_specs', 'text' => 'Reference Specs');\n\t$output[] = array('id' => 'wo_journal_main.ref_docs', 'text' => 'Reference Docs');\n\t$output[] = array('id' => 'bar_code', 'text' => 'SKU Bar Code');\n\t$output[] = array('id' => 'image_with_path', 'text' => 'SKU Image');\n\treturn $output;\n }", "public function appendFilterSql($_select, $_backend)\r\n {\r\n \tif($this->_value){\r\n \t $db = Tinebase_Core::getDb();\r\n \t foreach($this->_value as $value){\r\n\t \t $correlationName = Tinebase_Record_Abstract::generateUID() . $value['cfId'] . 'cf';\r\n\t\r\n\t \t $_select->joinLeft(\r\n\t /* what */ array($correlationName => SQL_TABLE_PREFIX . 'customfield'), \r\n\t /* on */ $db->quoteIdentifier(\"{$correlationName}.record_id\") . \" = co.id AND \" \r\n\t . $db->quoteIdentifier(\"{$correlationName}.customfield_id\") . \" = \" . $db->quote($value['cfId']),\r\n\t /* select */ array());\r\n\t $_select->where($db->quoteInto($db->quoteIdentifier(\"{$correlationName}.value\") . $this->_opSqlMap[$this->_operator]['sqlop'], $value['value']));\r\n \t }\r\n \t\r\n // \techo $_select->assemble();\r\n// \t$filter = new Membership_Model_SoMemberFilter(array(), 'AND');\r\n//\t \t\r\n//\t \t$contactFilter = new Addressbook_Model_ContactFilter(array(\r\n//\t array('field' => 'customfield', 'operator' => 'equals', 'value' => $this->_value),\r\n//\t ));\r\n//\t $contactIds = Addressbook_Controller_Contact::getInstance()->search($contactFilter, NULL, FALSE, TRUE);\r\n//\t \r\n//\t $filter->addFilter(new Tinebase_Model_Filter_Id('contact_id', 'in', $contactIds));\r\n//\t \tTinebase_Backend_Sql_Filter_FilterGroup::appendFilters($_select, $filter, $_backend);\r\n \t}\r\n }", "function 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 get_select_options($select_data_array, $value_field, $display_field, $selected, $show_instr='Y', $instr_txt='Select')\n{\t\n\t$drop_HTML = \"\";\n\t#Determine whether to show the instruction option\n\tif($show_instr == 'Y'){\n\t\t$drop_HTML = \"<option value='' \";\n\t\t# Select by default if there is no selected option\n\t\tif($selected == '')\n\t\t{\n\t\t\t$drop_HTML .= \" selected\";\n\t\t}\n\t\n\t\t$drop_HTML .= \">- \".$instr_txt.\" -</option>\";\n\t}\n\t\n\tforeach($select_data_array AS $data_row)\n\t{\n\t\t$drop_HTML .= \" <option value='\".addslashes($data_row[$value_field]).\"' \";\n\t\t\n\t\t# Show as selected if value matches the passed value\n\t\t#check if passed value is an array\t\t\n if(is_array($selected)){\n \tif(in_array($data_row[$value_field], $selected)) $drop_HTML .= \" selected\";\n \n\t\t}elseif(!is_array($selected)){\n \tif($selected == $data_row[$value_field]) $drop_HTML .= \" selected\";\n }\t\t\n\t\t\t\t\n\t\t$display_array = array();\n\t\t# Display all data given based on whether what is passed is an array\n\t\tif(is_array($display_field))\n\t\t{\n\t\t\t$drop_HTML .= \">\";\n\t\t\t\n\t\t\tforeach($display_field AS $display)\n\t\t\t{\n\t\t\t\tarray_push($display_array, $data_row[$display]);\n\t\t\t}\n\t\t\t\n\t\t\t$drop_HTML .= implode(' - ', $display_array).\"</option>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$drop_HTML .= \">\".$data_row[$display_field].\"</option>\";\n\t\t}\n\t}\n\t\n\treturn $drop_HTML;\n}", "function input_dropdown_ui($array = array()){\n\t\t$input = self::input_label($array['label']);\n\t\tif(isset($array['class'])){\n\t\t\t$class_addon = ' '.$array['class'];\n\t\t}\n\t\telse{\n\t\t\t$class_addon = '';\n\t\t}\t\t\n\t\t$input .= '<select class=\"form-control'.$class_addon.'\"';\n\t\tforeach ($array as $key => $value) {\n\t\t\tif($key != \"option\" && $key != \"label\" && $key != \"value\" && $key != \"readonly\"){\n\t\t\t\t$input .= ' '.$key.'=\"'.$value.'\"';\t\t\t\t\n\t\t\t}\n\t\t\tif($key == \"readonly\" && $value == true){\n\t\t\t\t$input .= ' '.$key.'';\n\t\t\t}\t\t\t\n\t\t}\n\t\t$input .= '>';\n\t\tforeach ($array['option'] as $key => $value) {\n\t\t\tif(isset($array['value']) && $array['value'] == $key){\n\t\t\t\t$selected = 'selected';\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$selected ='';\n\t\t\t}\n\t\t\t$input .= '<option value=\"'.$key.'\" '.$selected.'>'.$value.'</option>';\n\t\t}\n\t\t$input .= '</select>';\n\t\treturn $input;\n\t}", "function cmdSinceS($name, $caption) {\n $optsinceS = array\n (\n array(\"\", \"\"),\n array(\"Delivery Order\", \"1\"),\n array(\"Sales Invoice\", \"2\"),\n );\n ?>\n <tr>\n <td>Hari</td>\n <td>\n <select class=\"easyui-combobox\"\n id=\"<?php echo $name; ?>\"\n name=\"<?php echo $name; ?>\"\n style=\"width:120px;\"\n data-options=\"panelHeight:100,editable:false,width:120\"\n disabled=true\n >\n <?php\n foreach ($optsinceS as $val) {\n echo '<option value=\"' . $val[1] . '\">' . $val[0] . '</option>';\n }\n ?>\n </select>\n </td>\n </tr>\n <?php\n}", "private function creaOptionTipoGrafico(){\n $sql = \"SELECT id_tipo_grafico, nombre, codigo, activo\n FROM dashboard.tipo_grafico\n WHERE activo = 1\n ORDER BY nombre;\";\n $respuesta = $this->ejecutarSelect($sql);\n $option = '';\n foreach ($respuesta as $temp) {\n $option .= '<option data-id=\"'.$temp['id_tipo_grafico'].'\" value=\"'.$temp['codigo'].'\">'.$temp['nombre'].'</option>';\n }\n return $option;\n\n }", "protected function _buildCondition(){\n \t$aryCondition = array();\n \t\n \tif(!empty($this->postData)){\n \t\t //search\n\t\t\t \t\t\t\n\t\t\tif($this->postData['title']!=''){\n \t\t \t$aryCondition['like'][] = array(\"mt.title\"=>$this->postData['title']);\n \t\t }\t\t\t\n\t\t\tif($this->postData['page']!=''){\n \t\t \t$aryCondition['and'][] = array(\"mt.page\"=>$this->postData['page']);\n \t\t }\t\t\t\n\t\t\tif($this->postData['code']!=''){\n \t\t \t$aryCondition['like'][] = array(\"mt.code\"=>$this->postData['code']);\n \t\t }\t\t\t\n\t\t\tif($this->postData['status']!=''){\n \t\t \t$aryCondition['and'][] = array(\"mt.status\"=>$this->postData['status']);\n \t\t }\t\t\t\n\n \t}\n \treturn $aryCondition;\n }", "function Val1()\n {\n\t \t\n global $DataBase;\n\t\t\n\t\t$strQuery = \"SELECT CityID,city FROM cities WHERE 1 LIMIT 0, 1000 \"; \n $DataBase->query($strQuery);\n\t\t$nResult = $DataBase->fetch_all();\n $Record_Type = $DataBase->fetch_row();\n\t\t$Count = $Record_Type[0];\n\t\t\n\t\tforeach($nResult as $val)\n\t\t{\n\t\t\t$CID\t= $val[0];\n\t\t\t$Name\t\t= $val[1];\n\t\t\t$options = $options . \"<option value=$CID>$Name</option>\";\n \n }// End OF Foreach Loop\n\t\treturn $options;\n\t\t\n }", "function select($name = \"txt\", $alttext = \"\", $selecttype = \"array\", $lookup = \"\", $value = \"\", $event = \"\", $cssid = \"\", $readonly = false, $nochoose = true) {\n\n if (isset($_REQUEST[$name])) {\n if ($value == \"\") {\n $value = $_REQUEST[$name];\n }\n }\n $lookuplist = [];\n if ($selecttype == \"array\" || $selecttype == \"multiarray\") {\n\n if (is_array($lookup)) {\n $lookuplist = $lookup;\n } else {\n $lookuplist = explode(\"|\", $lookup);\n }\n } else if ($selecttype == \"sql\" || $selecttype == \"multisql\") {\n $lookuprow = $this->DEB->getRows($lookup, DEB_ARRAY); //format [0] = NAME\n\n\n foreach ($lookuprow as $irow => $row) {\n $lookuplist[$irow] = $row[0] . \",\" . $row[1]; //make it in the form of array\n }\n }\n //make options for the type of select etc .....\n if ($selecttype == \"multiarray\" || $selecttype == \"multisql\") {\n $options = \"multiple=\\\"multiple\\\"\";\n } else {\n $options = \"\";\n }\n if ($readonly == true) {\n $disabled = \"disabled=\\\"disabled\\\"\";\n } else {\n $disabled = \"\";\n }\n //default text\n if ($alttext == \"\") {\n $alttext = \"Choose\";\n }\n if ($cssid != \"\") {\n $cssid = \"id=\\\"{$cssid}\\\"\";\n } else {\n $cssid = \"\";\n }\n $html = \"<select class=\\\"form-control\\\" $cssid name=\\\"{$name}\\\" $options {$event} $disabled >\";\n\n if (!$nochoose) {\n $html .= \"<option value=\\\"\\\">{$alttext}</option>\";\n }\n\n foreach ($lookuplist as $lid => $option) {\n\n $toption = explode(\",\", $option);\n if (count($toption) != 2) {\n $toption[0] = $lid;\n $toption[1] = $option;\n }\n\n $option = $toption;\n\n if (trim($value) == trim($option[0])) {\n $html .= \"<option selected=\\\"selected\\\" value=\\\"{$option[0]}\\\">{$option[1]}</option>\";\n } else {\n $html .= \"<option value=\\\"{$option[0]}\\\">{$option[1]}</option>\";\n }\n }\n $html .= \"</select>\";\n return $html;\n }", "function buildClassificationList($classifications)\n{\n $classificationList = '<select name=\"classificationId\" id=\"classificationList\">';\n $classificationList .= \"<option>Choose a Classification</option>\";\n foreach ($classifications as $classification) {\n $classificationList .= \"<option value='$classification[classificationId]'>$classification[classificationName]</option>\";\n }\n $classificationList .= '</select>';\n return $classificationList;\n}", "function classic_dropdown($table, $option, $key, $value, $where){\n //Lets Put Little Checks On Required Parameters\n if(!isset($table) || empty($table)){\n return false;\n }\n if(!isset($option) || empty($option)){\n return false;\n }\n if(!isset($key) || empty($key)){\n return false;\n }\n if(!isset($value) || empty($value)){\n return false;\n }\n\n $this->db->select('*');\n $this->db->from($table);\n if($where !== ''){\n $this->db->where($where);\n }\n $query = $this->db->get();\n if($query->num_rows() > 0)\n {\n $data[''] = $option;\n foreach($query->result() as $row)\n {\n $data[$row->$key] = $row->$value;\n }\n return $data;\n }\n }", "protected function _prepareForm()\n {\n /** @var \\Magento\\Framework\\Data\\Form $form */\n $form = $this->_formFactory->create();\n $form->setHtmlIdPrefix('finder_dropdown_');\n $values = [];\n foreach($this->_model->getDropdowns() as $dropdown) {\n $prefix = 'dropdown_'.$dropdown->getId();\n\n $fieldset = $form->addFieldset($prefix, ['legend' => __('Dropdown #%1',$dropdown->getPos()+1)]);\n $fieldset->addField(\n $prefix . '_name',\n 'text',\n ['name'=>$prefix . '_name', 'label' => __('Name'), 'title' => __('Name'), 'required' => true]\n );\n $values[$prefix . '_name'] = $dropdown->getName();\n $fieldset->addField(\n $prefix . '_sort',\n 'select',\n [\n 'name'=>$prefix . '_sort', 'label' => __('Sort'), 'title' => __('Sort'), 'required' => true,\n 'values' => [\n ['value' => \\Amasty\\Finder\\Helper\\Data::SORT_STRING_ASC, 'label' => __('alphabetically, asc')],\n ['value' => \\Amasty\\Finder\\Helper\\Data::SORT_STRING_DESC, 'label' => __('alphabetically, desc')],\n ['value' => \\Amasty\\Finder\\Helper\\Data::SORT_NUM_ASC, 'label' => __('numerically, asc')],\n ['value' => \\Amasty\\Finder\\Helper\\Data::SORT_NUM_DESC, 'label' => __('numerically, desc')],\n ]\n ]\n );\n $values[$prefix . '_sort'] = $dropdown->getSort();\n\n $fieldset->addField(\n $prefix . '_range',\n 'select',\n [\n 'name'=>$prefix . '_range', 'label' => __('Range'), 'title' => __('Range'), 'required' => true,\n 'values' => [\n ['value' => 0, 'label' => __('No')],\n ['value' => 1, 'label' => __('Yes')],\n ]\n ]\n );\n $values[$prefix . '_range'] = $dropdown->getRange();\n }\n $form->setValues($values);\n $this->setForm($form);\n return parent::_prepareForm();\n }", "public function fieldSelect($sId=\"\",$sNome=\"\",$aValue=\"\",$sLunghezza=0,$sTag=\"\", $jolly=\"\"){\r\n\t\t\r\n\t\tif($sTag==\"\"){\r\n\t\t\techo \"<select name=\\\"\" . $sNome . \"\\\">\";\r\n\t\t}else{\r\n\t\t\techo \"<select name=\\\"\" . $sNome . \"\\\"\" . $sTag . \">\";\r\n\t\t}\r\n\r\n\t\tforeach($aValue as $key=>$value){\r\n\t\t\tif(substr($value,0,1)==$jolly){\r\n\t\t\t\techo \"<option style=\\\"font-weight:bold;\\\" value=\\\"\" . $key . \"\\\">Gruppo: \" . substr($value,1) . \"</option>\";\r\n\t\t\t}else{\r\n\t\t\t\techo \"<option value=\\\"\" . $key . \"\\\">\" . $value . \"</option>\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\techo \"</select>\";\r\n\t\t\r\n\t}", "function makeOptionList($arrValue, $arrText, $selectedVal)\n{\t\t\n\t$rtnOption\t=\t\"\";\n\tfor($cnt = 0; COUNT($arrValue) > $cnt; $cnt++)\n\t{\n\t\tif($arrValue[$cnt] == $selectedVal)\n\t\t{\n\t\t\t$rtnOption\t=\t$rtnOption.\"<option value=\\\"\".$arrValue[$cnt].\"\\\" selected=\\\"selected\\\">\".$arrText[$cnt].\"</option>\\n\";\n\t\t}else{\n\t\t\t$rtnOption\t=\t$rtnOption.\"<option value=\\\"\".$arrValue[$cnt].\"\\\">\".$arrText[$cnt].\"</option>\\n\";\n\t\t}//\tend if\n\t}//\tend for\n\t\n\treturn $rtnOption;\n}", "function buildClassificationList($classifications){ \r\n $classificationList = '<select name=\"classificationId\" id=\"classificationList\">'; \r\n $classificationList .= \"<option>Choose a Classification</option>\"; \r\n foreach ($classifications as $classification) { \r\n $classificationList .= \"<option value='$classification[classificationId]'>$classification[classificationName]</option>\"; \r\n } \r\n $classificationList .= '</select>'; \r\n return $classificationList; \r\n }", "function fill_parent_combo( $form_name, $category_id )\n\t{\n\t\t$q = \"SELECT * FROM title_dev_categories where status = 1\";\n\t\t$r = $this -> db -> getMultipleRecords( $q );\n\t\t$combo = '<select class=\"validate[required] txarea2\" name=\"category_id\" id=\"category_id\" onchange=\"document.uploadAdvert.submit()\" >\n\t\t\t\t\t<option value=\"\">---Please Select Category---</option>';\n\t\tif( $r != false )\n\t\t{\n\t\t\tfor( $i = 0; $i < count( $r ); $i++ )\n\t\t\t{\n\t\t\t\t$selected = $category_id== $r[$i]['category_id'] ? \"selected\" : \"\";\n\t\t\t\t$combo .= '<option '.$selected.' value=\"'.$r[$i]['category_id'].'\">'.$r[$i]['category_title'].'</option>';\n\t\t\t}\t//\tEnd of for Looooooop\n\t\t}\t//\tEnd of if( $r != false )\n\t\t$combo .= '</select>';\n\t\t\n\t\treturn $combo;\n\t}", "function Field() {\n\t\t$size = '';\n\t\t$multiple = '';\n\t\t\n\t\tif($this->size) $size = \"size=\\\"$this->size\\\"\";\n\t\t\n\t\tif($this->multiple) {\n\t\t\t$multiple = \"multiple=\\\"multiple\\\"\";\n\t\t\t$this->name .= '[]';\n\t\t}\n\t\t\n\t\t$options = \"\";\n\t\t\n\t\t// We have an array of values\n\t\tif(is_array($this->value)){\n\t\t\t// Loop through and figure out which values were selected.\n\t\t\t\t\t\n\t\t\tforeach($this->getSource() as $value => $title) {\n\t\t\t\t// Loop through the array of values to find out if this value is selected.\n\t\t\t\t$selected = \"\";\n\t\t\t\tforeach($this->value as $v){\n\t\t\t\t\tif($value == $v) {\n\t\t\t\t\t\t$selected = \" selected=\\\"selected\\\"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$options .= \"<option$selected value=\\\"$value\\\">$title</option>\\n\";\n\t\t\t}\n\t\t}else{\n\t\t\t// Listbox was based a singlular value, so treat it like a dropdown.\n\t\t\tforeach($this->getSource() as $value => $title) {\n\t\t\t\t$selected = $value == $this->value ? \" selected=\\\"selected\\\"\" : \"\"; \n\t\t\t\t$options .= \"<option$selected value=\\\"$value\\\">$title</option>\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t$id = $this->id();\n\t\treturn \"<select $size $multiple name=\\\"$this->name\\\" id=\\\"$id\\\">$options</select>\";\n\t}", "function GetExtendedFilterValues() {\n\t\tglobal $dealers_reports;\n\n\t\t// Field StartDate\n\t\t$sSelect = \"SELECT DISTINCT agree.StartDate FROM \" . $dealers_reports->SqlFrom();\n\t\t$sOrderBy = \"agree.StartDate ASC\";\n\t\t$wrkSql = ewrpt_BuildReportSql($sSelect, $dealers_reports->SqlWhere(), \"\", \"\", $sOrderBy, $this->UserIDFilter, \"\");\n\t\t$dealers_reports->StartDate->DropDownList = ewrpt_GetDistinctValues($dealers_reports->StartDate->DateFilter, $wrkSql);\n\t}", "function get_multiselect_from_table ($tpl,$table,\n $nom_select,\n $classe_select,\n $extra_attrs,\n $value_option,$texte_option,\n $option_tous,$texte_tous,\n $values_selected,\n $size=10) {\n global $CFG;\n\n $modele=<<<EOT\n<!-- START BLOCK : select -->\n<select\n name=\"{nom_select}[]\" id=\"{nom_select}\" multiple=\"multiple\" size=\"$size\"\n class=\"{classe_select}\"\n {extra_attrs}>\n <!-- START BLOCK : option_neutre -->\n <option value=\"{value_neutre}\">{texte_neutre}</option>\n <!-- END BLOCK : option_neutre -->\n <!-- START BLOCK : option -->\n <option value=\"{value_option}\" {selected}>{texte_option}</option>\n <!-- END BLOCK : option -->\n</select>\n<!-- END BLOCK : select -->\n\nEOT;\n $tmptpl= new SubTemplatePower($modele,T_BYVAR); //cr�er une instance\n // a le meme chemin que le template porteur si existe\n if (!$tpl) $tmptpl->prepare($CFG->chemin);\n else $tmptpl->prepare($tpl->chemin);\n $tmptpl->newBlock(\"select\");\n $tmptpl->assign(\"nom_select\",$nom_select);\n $tmptpl->assign(\"classe_select\",$classe_select?$classe_select:'saisie');\n $tmptpl->assign(\"extra_attrs\",$extra_attrs?$extra_attrs:'');\n if ($option_tous) { // item sans valeur au d�but ?\n $tmptpl->newBlock(\"option_neutre\");\n $tmptpl->assign(\"value_neutre\",$option_tous);\n $tmptpl->assign(\"texte_neutre\",$texte_tous);\n }\n if ($table)\n foreach($table as $option) {\n $tmptpl->newBlock(\"option\");\n $tmptpl->assign(\"value_option\",$option->$value_option);\n $tmptpl->assign(\"texte_option\",$option->$texte_option);\n // print ($values_selected[$option->$value_option]);\n $tmptpl->setSelected (!empty($values_selected[$option->$value_option]));\n }\n return $tmptpl->getOutputContent();\n}", "public function getSelectDataFields();", "public function &draw_select_box($in_tag, $in_array, $in_value = false)\n {\n $text = \"\";\n $text .= '<select class=\"' . $this->query->getBootstrapStyle('design_dropdown') . 'reportico-prepare-drop-select\" name=\"execute_mode\">';\n $text .= '<OPTION selected label=\"MAINTAIN\" value=\"MAINTAIN\">Maintain</OPTION>';\n $text .= '<OPTION label=\"PREPARE\" value=\"PREPARE\">Prepare</OPTION>';\n $text .= '</SELECT>';\n return $text;\n }", "public function dd_selreqcategory() {\n $reqtypeid = $this->input->post('sRequestID');\n $ddSelReqcategory = $this->Requestproc_mdl->selreqcategory($reqtypeid);\n //KONDISI JIKA REQUEST TYPENYA SAMA DENGAN 2/PROJECT MAKA ONCHANGE Tidak BELAKU-------------------/\n if ($reqtypeid == 2 || $reqtypeid == 5) {\n echo \"<select class='form-control' name='ReqCategoryID' id='ReqCategoryID' onchange='loadGridItemList()'>\";\n } else {\n echo \"<select class='form-control' name='ReqCategoryID' id='ReqCategoryID' onchange='loadGridItemList()'>\";\n }\n echo \"<option value='' disabled='' selected=''>--Select--</option>\";\n foreach ($ddSelReqcategory as $row) {\n if ($row->BudgetUsed != 0) {\n $RestofBudget = $row->BudgetValue - $row->BudgetUsed;\n } else {\n $RestofBudget = $row->BudgetValue - $row->BudgetUsed;\n }\n echo \"<option value='$RestofBudget>$row->BudgetCOA--$row->ReqCategoryID'>$row->BudgetCOA - $row->ReqCategoryName</option>\";\n// $options .= \"<option value='\" . $k->DivisionID . \"'>\" . $k->DivisionName . \"</option>\";\n }\n echo \"</select>\";\n// $this->load->view('procurement/popupitem_list.js.php');\n }", "public function onRsformBackendCreateConditionOptionFields(array $args): void\n\t{\n\t\t$args['types'][] = ROPAYMENTS_FIELD_PAYMENT_SINGLE_PRODUCT;\n\t\t$args['types'][] = ROPAYMENTS_FIELD_PAYMENT_MULTIPLE_PRODUCTS;\n\t\t$args['types'][] = ROPAYMENTS_FIELD_PAYMENT_INPUT;\n\t}", "function getNationalityDropdownList($name, $initVal=\"\", $js=\"\") {\n $dList = \"<SELECT id=\\\"$name\\\" name=\\\"$name\\\" $js class=\\\"select\\\"><option value=\\\"\\\">Select from List</option>\";\n $dList.=\"<option value=\\\"British\\\">British</option>\";\n $nationalities = $this->getDBRecords(\"select label as name,value as id from nationality order by label\");\n for ($i = 0; $i < count($nationalities); $i++) {\n\n if (rtrim($initVal) == rtrim($nationalities[$i][\"id\"])) {\n $sel = \"selected\";\n }\n else\n $sel=null;\n $dList.= \"<option $sel value=\\\"\" . rtrim($nationalities[$i][\"id\"]) . \"\\\">\" . $nationalities[$i][\"name\"] . \"</option>\";\n }\n $dList.= \"</SELECT>\";\n\n return $dList;\n }", "protected function buildValuesFromSelect(): string\n {\n $sql = '';\n\n // Check for a SELECT statement and append if available\n if ( isset($this->select) )\n {\n $sql .= $this->indentStatement($this->select, 1);\n\n $this->mergeBindings($this->select);\n }\n\n return $sql;\n }", "protected function prepareAttributeValue($conditions)\n {\n $condition = $this->conditionFactory->create($conditions['type']);\n $attributes = $condition->loadAttributeOptions()->getAttributeOption();\n\n if (isset($attributes[$conditions['attribute']])) {\n $condition->setAttribute($conditions['attribute']);\n if (in_array($condition->getInputType(), ['select', 'multiselect'])) {\n // reload options flag\n $condition->unsetData('value_select_options');\n $condition->unsetData('value_option');\n\n $options = $condition->getValueOption();\n if (is_array($conditions['value'])) {\n foreach ($conditions['value'] as $key => $value) {\n $conditions['value'][$key] = $options[$value];\n }\n } else {\n $conditions['value'] = $options[$conditions['value']];\n }\n }\n }\n return $conditions['value'];\n }", "protected function prepareAttributeValue($conditions)\n {\n $condition = $this->conditionFactory->create($conditions['type']);\n $attributes = $condition->loadAttributeOptions()->getAttributeOption();\n\n if (isset($attributes[$conditions['attribute']])) {\n $condition->setAttribute($conditions['attribute']);\n if (in_array($condition->getInputType(), ['select', 'multiselect'])) {\n // reload options flag\n $condition->unsetData('value_select_options');\n $condition->unsetData('value_option');\n\n $options = $condition->getValueOption();\n if (is_array($conditions['value'])) {\n foreach ($conditions['value'] as $key => $value) {\n $conditions['value'][$key] = $options[$value];\n }\n } else {\n $conditions['value'] = $options[$conditions['value']];\n }\n }\n }\n return $conditions['value'];\n }", "function SelectValuesUnidadesPerteneceMedico($db_conx, $cod_med) {\r\n $sql = \"SELECT uni_codigo, uni_descrip FROM vunidadmedico WHERE med_codigo = $cod_med ORDER BY uni_descrip ASC\";\r\n\r\n $query = mysqli_query($db_conx, $sql);\r\n\r\n $n_filas = $query->num_rows;\r\n $data = '<select style=\"width: 400px;\" onchange=\"getLocalizacionData();\"';\r\n if ($n_filas == 1) {\r\n $data .= 'id=\"cmbunidad\" disabled=\"true\">';\r\n $row = mysqli_fetch_array($query);\r\n $data .= '<option value=\"' . $row[0] . '\">' . $row[1] . '</option>';\r\n } else {\r\n $data .= 'id=\"cmbunidad\">';\r\n $c = 0;\r\n while ($c < $n_filas) {\r\n $row = mysqli_fetch_array($query);\r\n $data .= '<option value=\"' . $row[0] . '\">' . $row[1] . '</option>';\r\n $c++;\r\n }\r\n }\r\n $data .= '</select\">';\r\n echo $data;\r\n}", "function SelectValuesUnidadFiltro($db_conx) {\r\n $sql = \"SELECT uni_codigo, uni_descrip FROM tunidad ORDER BY uni_descrip ASC\";\r\n $query = mysqli_query($db_conx, $sql);\r\n\r\n $n_filas = $query->num_rows;\r\n $data = '<select style=\"width:207px;\" id=\"cmbuni\">';\r\n $data .= '<option value=\"0\">Todos</option>';\r\n $c = 0;\r\n while ($c < $n_filas) {\r\n $row = mysqli_fetch_array($query);\r\n $data .= '<option value=\"' . $row[0] . '\">' . $row[1] . '</option>';\r\n $c++;\r\n }\r\n $data .= '</select>';\r\n echo $data;\r\n}", "function selectHtml($idPlato, $name, $condicion, $parametros, $valorSeleccionado = \"\", $blanco = true, $orderby = \"1\") {\r\n $select = \"<select name='$name' id='$idPlato'>\";\r\n if ($blanco) {\r\n $select.= \"<option value='' />&nbsp $ </option>\";\r\n }\r\n $lista = $this->getList($condicion, $parametros, $orderby);\r\n foreach ($lista as $objeto) {\r\n $selected = \"\";\r\n if ($objeto->getIdPlato() == $valorSeleccionado) {\r\n $selected = \"selected\";\r\n }\r\n\r\n $select = \"<option $selected value='\" . $objeto->getIdPlato() . \"' >\" . $objeto->getNombre() . \",\" . $objeto->getDescripcion() .\r\n $objeto->getPrecio() . \"</option>\";\r\n }\r\n\r\n $select.=\"</select>\";\r\n return $select;\r\n }", "public function getDropDown() {}", "public function getDropDown() {}", "public function getFilterElement(){\r\n\t\t$return = \"\";\r\n\t\t$post = $this->input->post(null, true);\r\n\t\tif( !isset($post['type']) ) return $return;\r\n\r\n\t\t//could be datetime, ddlist, assignedUsers, check teal_global_vars.php\r\n\t\t$filter_type = $post['type'];\r\n\r\n\t\t//the value of the filter the user selected, could be lead_source_id, event_type, start_date ... etc\r\n\t\t$filter_value = $post['val'];\r\n\r\n\t\t//exception of fields that have diffferent name from the table/module where it belongs to and sc_drop_down_options under related field name\r\n\t\t//fix database table sc_drop_down_options\r\n\t\tif($filter_value == \"lead_source_id\") $filter_value = \"lead_source\";\r\n\t\tif($filter_value == \"sales_stage_id\") $filter_value = \"sales_stage\";\r\n\t\tif($filter_value == \"lead_status_id\") $filter_value = \"lead_status\";\r\n\r\n\t\t$user_id = $this->flexi_auth->get_user_id();\r\n\t\t//uacc_uid\r\n\t\t$user = $this->flexi_auth->get_user_by_id_query($user_id,'uacc_uid')->row();\r\n\r\n\r\n\t\t//if datetime then return two fields for start and end date\r\n\t\tif( $filter_type == \"datetime\" ){\r\n\t\t\t$return = '\r\n\t\t\t\t<div class=\"form-group col-sm-6\">\r\n\t\t\t\t\t<input type=\"text\" name=\"date_start_dynamic\" id=\"filtervalue1\" class=\"form-control datetime filter_data_value\" placeholder=\"Enter start date\">\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"form-group col-sm-6\">\r\n\t\t\t\t\t<input type=\"text\" name=\"date_end_dynamic\" id=\"filtervalue2\" class=\"form-control datetime filter_data_value\" placeholder=\"Enter end date\">\r\n\t\t\t\t</div>';\r\n\t\t}\r\n\r\n\t\t//if drop down list, fetch the values from the session drop_down_options\r\n\t\tif( $filter_type == \"ddlist\" ){\r\n\t\t\t//var_dump($_SESSION['drop_down_options']);\r\n\t\t\t$return = '<select id=\"filtervalue1\" name=\"drop_down_options\" class=\"form-control filter_data_value\" size=\"1\">';\r\n\t\t\tforeach($_SESSION['drop_down_options'] as $row){\r\n\r\n\t\t\t\t//show list of options of the related name passed from javascript in $filter_value\r\n\t\t\t\tif( $row['related_field_name'] == $filter_value ){\r\n\t\t\t\t\t$return .= \"<option value='\" . $row['drop_down_id'] . \"'>\" . $row['name'] . \"</option>\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$return .= \"</select>\";\r\n\t\t}\r\n\r\n\t\t// drop down list for assigned users has to be accessed from a different table\r\n\t\tif( $filter_type == \"assignedUsers\" ){\r\n\r\n\t\t\t// THIS SHOULD BE ADDED AS A SESSION INSTEAD OF DOING A DB CALL\r\n\t\t\t$where_arr = array('uacc_id <>' => $user_id);\r\n\t\t\t$users = $this->flexi_auth->get_users_query(array(\"uacc_uid,CONCAT(upro_first_name, ' ', upro_last_name) AS name\", FALSE), $where_arr)->result_array();\r\n\r\n\t\t\t$return = '<select id=\"filtervalue1\" name=\"assigned_user_id\" class=\"form-control filter_data_value\" size=\"1\">';\r\n\t\t\tforeach($users as $user){\r\n\t\t\t\t$return .= '<option value=\"' . $user['uacc_uid'] . '\">' . $user['name'] . '</option>';\r\n\t\t\t}\r\n\t\t\t$return .= \"</select>\";\r\n\t\t}\r\n\r\n\r\n\t\t//if datetime then return two fields for start and end date\r\n\t\tif( $filter_type == \"autocomplete\" ){\r\n\t\t\t$return = '\r\n\t\t\t\t<div class=\"form-group col-sm-12\">\r\n\t\t\t\t\t<input type=\"text\" name=\"company_viewer\" id=\"company_viewer\" value=\"\" class=\"form-control ui-autocomplete-input valid\" autocomplete=\"off\" aria-invalid=\"false\">\r\n\t\t\t\t\t<input type=\"hidden\" name=\"company\" id=\"filtervalue1\" value=\"\">\r\n\t\t\t\t</div>';\r\n\t\t}\r\n\r\n\t\techo $return;\r\n\r\n\r\n\t}" ]
[ "0.59829366", "0.59741426", "0.5927966", "0.5903364", "0.58982414", "0.58633244", "0.5825789", "0.57977307", "0.5778796", "0.5760906", "0.5747261", "0.57240325", "0.57076496", "0.56745607", "0.56613135", "0.5658931", "0.56042165", "0.55952954", "0.55860245", "0.55698043", "0.5541304", "0.55384403", "0.55073506", "0.5481937", "0.54655", "0.54595035", "0.5457682", "0.5451652", "0.54491144", "0.54474837", "0.5447404", "0.544206", "0.54328394", "0.5428646", "0.54222757", "0.54183525", "0.54074246", "0.54019624", "0.53973794", "0.5396251", "0.5389311", "0.538642", "0.53755885", "0.5372753", "0.53620654", "0.5361725", "0.5359661", "0.53535116", "0.5352405", "0.5347628", "0.5346436", "0.5344631", "0.53443414", "0.533769", "0.5328065", "0.5319662", "0.53095275", "0.5305913", "0.5301232", "0.5293371", "0.5286124", "0.52850384", "0.52799255", "0.527746", "0.5269243", "0.5269044", "0.5259279", "0.52521884", "0.52332795", "0.52248216", "0.5221398", "0.52117425", "0.5208674", "0.52059716", "0.5205787", "0.5203499", "0.5203212", "0.52018225", "0.5201", "0.5199591", "0.51993644", "0.51990813", "0.5197873", "0.51955813", "0.5195258", "0.519359", "0.51930624", "0.51927984", "0.5187634", "0.5180847", "0.51761395", "0.51678205", "0.5167777", "0.5167071", "0.5167071", "0.51657414", "0.51644635", "0.5158771", "0.5154358", "0.5154358", "0.5150888" ]
0.0
-1
Leer fichero y generar saltos de linea en parrafo ...
function texto($fichero="") { echo '<div class="row"> <blockquote class="blockquote ml-3 text-justify">'; if ("$fichero" == "") { echo '<br>'; } else { // Leer fichero $texto=file_get_contents($fichero); $texto='<p>' . str_replace("·", "<br>",$texto) . '</p>'; echo $texto; } echo '</blockquote> </div>'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function lerArquivoLog(){\n $ponteiro = fopen(\"C:\\\\temp\\\\teste2.txt\", \"r\");\n\n //Abre o aruqivo .txt\n while(!feof($ponteiro)) {\n $linha = fgets($ponteiro, 4096);\n //Imprime na tela o resultado\n $this->pulaLinha();\n }\n //Fecha o arquivo\n fclose($ponteiro);\n }", "function salvaArquivo($texto, $nomeArquivo){\n\t$handle = fopen(\"resultado.txt\", \"a+\");\n\n\tfwrite($handle, $texto);\n\t\n\tfclose($handle);\n}", "private function adicionarLinhaArquivo($aLinha)\n {\n fputs($this->oArquivo, implode('|', (array) $aLinha).\"\\n\");\n }", "function leer_fichero_completo($nombre_fichero){\n $fichero_texto = fopen ($nombre_fichero, \"r\");\n //obtenemos de una sola vez todo el contenido del fichero\n //OJO! Debido a filesize(), sólo funcionará con archivos de texto\n $contenido_fichero = fread($fichero_texto, filesize($nombre_fichero));\n return $contenido_fichero;\n }", "function salvarDatos($cadena, $fichero){\n $fp = fopen(FILE_PATH.$fichero, \"a\");\n fputs($fp, $cadena);\n fputs($fp, \"\\n\");\n fclose($fp);\n}", "public function importarAdministrativos($archivo=$this->archivo){\n $lineas = file($archivo); \n $i=0; \n foreach ($lineas as $linea_num => $linea)\n { \n if($i != 0) \n { \n $administrativos = explode(\";\",$linea);\n $dni=trim($administrativos[0]);\n $apellidos=trim($administrativos[1]);\n $nombre = trim($administrativos[2]);\n $dependencia =trim($administrativos[3]);\n $telefono = trim($administrativos[4]);\n $correo = trim($administrativos[5]);\n $categoria = trim($administrativos[6]);\n $cargo= trim($administrativos[7]); \n mysql_query(\"INSERT INTO administrativos(nombre,edad,profesion) \n VALUES('$dni,'$apellidos','$nombre','$dependencia','$telefono','$correo','$categoria','$cargo')\");\n } \n $i++;\n }\n}", "public static function generateTxt(){\n $archivo = fopen('documents/proveedores.txt','a');\n //------- Creamos el Encabepado --------\n fputs($archivo,\"codigo_del_proveedor\");\n fputs($archivo,\" ; \");\n fputs($archivo,\"descripcion_del_proveedor\");\n fputs($archivo,\" ; \");\n fputs($archivo,\"tipo_de_proveedor\");\n fputs($archivo,\" ; \");\n fputs($archivo,\"rif\");\n fputs($archivo,\" ; \");\n fputs($archivo,\"otra_descripcion\");\n fputs($archivo,\" ; \");\n fputs($archivo,\"direccion\");\n fputs($archivo,\" ; \");\n fputs($archivo,\"telefono\");\n\n fputs($archivo,\"\\n\");\n\n //--------------------------------\n\n //----------- --------------------------\n $rows=Proveedores::find()->all();\n foreach($rows as $row)\n {\n fputs($archivo,$row->codigo);\n fputs($archivo,\";\");\n fputs($archivo,Proveedores::getSubString($row->razon,100));\n fputs($archivo,\";\");\n fputs($archivo,$row->tipo);\n fputs($archivo,\";\");\n fputs($archivo,$row->cedrif);\n fputs($archivo,\";\");\n fputs($archivo,'XXX');\n fputs($archivo,\";\");\n if (is_null($row->direccion)) fputs($archivo,'XXX'); else fputs($archivo,$row->direccion);\n fputs($archivo,\";\");\n if (($row->telefono==\"\")) fputs($archivo,'XXX'); else fputs($archivo,$row->telefono);\n fputs($archivo,\"\\n\");\n\n\n\n }\n fclose($archivo);\n\n\n }", "public function salvarArquivo()\n {\n $caminho = dirname($this->arquivo);\n if (!is_dir($caminho)) {\n mkdir($caminho, '0775', true);\n }\n // grava o arquivo\n file_put_contents($this->arquivo, $this->conteudo);\n }", "public function recorrerArchivoTXT(){\n $array = [];\n\n for ($row = $this->filaDesde; $row <= $this->filaHasta; ++ $row) {\n $item = new ExtractoBancarioItemVO();\n $registro = $this->FILE[$row];\n if($this->idTipoBanco['valor'] == 5){\n //pongo como separador la coma.\n $registro = preg_replace('/ +/', \",\", $registro);\n }\n\n $registro = explode (\",\" , $registro);\n\n if($this->idTipoBanco['valor'] == 5){\n //la posición 4 del vector es un error al hacer el parseo, no hay que considerarlo.\n //arreglo los valores del array para sacar un caracter inválido que viene del archivo.\n $invalido = $registro[1][0].$registro[1][1]; //en esta posición encuentro el caracter inválido.\n foreach ($registro as &$valor){\n $valor = str_replace($invalido, \"\", $valor);\n $valor = trim ($valor);\n }\n }\n\n for ($col = $this->columnaDesde; $col < $this->columnaHasta; ++ $col) {\n //si la columna leída nos interesa continúo.\n if(in_array($col, $this->columnas)){\n $val = $registro[$col];\n array_push($array, trim($val));\n }\n }\n\n $item->asignarValores($array, $this->idTipoBanco['valor']); //asigno los valores al objeto.\n $this->mensaje['valor'] .= $item->idTipoBancoConcepto['referencia']->result->getMessage();\n //si el status no es OK, incremento el contador de erróneos.\n if($item->idTipoBancoConcepto['referencia']->result->getStatus() != STATUS_OK)\n $this->cantidadRegistrosError['valor']++;\n $this->extractoBancarioItemArray[] = $item; //agrego el registro al array.\n\n $array = [];\n $this->cantidadRegistros['valor']++;\n }\n }", "function ficheroamatriz2(){\n chdir($this->directorio);\n //Abrimos el fichero en modo sólo lectura\n $idfich = @fopen($this->fichero, \"r\") or die(\"No existe el fichero $this->fichero\");\n $this->contador = 0;\n while($linea= fgets($idfich,1024)){\n $temp = explode(\"~\",$linea);\n #$this->diccionario[$this->contador] = Array(\"Traduccion\"=>$temp[1],\"Palabra\"=>$temp[2]);\n $this->diccionario[] = Array(\"Palabra\"=>$temp[2],\"Traduccion\"=>$temp[1]);\n $this->contador++;\n }\n fclose($idfich);\n }", "public function importarDocentes($archivo=$this->archivo){\n //cargamos el archivo\n $lineas = file($archivo); \n //inicializamos variable a 0, esto nos ayudará a indicarle que no lea la primera línea\n $i=0; \n //Recorremos el bucle para leer línea por línea\n foreach ($lineas as $linea_num => $linea)\n { \n //abrimos bucle\n /*si es diferente a 0 significa que no se encuentra en la primera línea \n (con los títulos de las columnas) y por lo tanto puede leerla*/\n if($i != 0) \n { \n //abrimos condición, solo entrará en la condición a partir de la segunda pasada del bucle.\n /* La funcion explode nos ayuda a delimitar los campos, por lo tanto irá \n leyendo hasta que encuentre un ; */\n $docente = explode(\";\",$linea);\n //Almacenamos los docente que vamos leyendo en una variable\n $dni=trim($docente[0]);\n $apellidos=trim($docente[1]);\n $nombre = trim($docente[2]);\n $facultad =trim($docente[3]);\n $telefono = trim($docente[4]);\n $correo = trim($docente[5]);\n $categoria = trim($docente[6]);\n $regimen = trim($docente[7]);\n $cargo= trim($docente[8]); \n //guardamos en base de docente la línea leida\n mysql_query(\"INSERT INTO docente(nombre,edad,profesion) \n VALUES('$dni,'$apellidos','$nombre','$facultad','$telefono','$correo','$categoria','$regimen','$cargo')\"); \n //cerramos condición\n } \n /*Cuando pase la primera pasada se incrementará nuestro valor y a la siguiente pasada ya \n entraremos en la condición, de esta manera conseguimos que no lea la primera línea.*/\n $i++;\n //cerramos bucle\n }\n}", "public function subir_archivo_aprobado($archivotmp){ \n $i=0;\n $nro=0;\n $lineas = file($archivotmp);\n \n foreach ($lineas as $linea_num => $linea){ \n if($i != 0){ \n $datos = explode(\";\",$linea);\n if(count($datos)==7){\n $da=$datos[0]; /// Da\n $ue=$datos[1]; /// Ue\n $prog=$datos[2]; /// Aper Programa\n $proy=trim($datos[3]);\n if(strlen($proy)==2){\n $proy='00'.$proy; /// Aper Proyecto\n }\n $act=trim($datos[4]); /// Aper Actividad\n if(strlen($act)==2){\n $act='0'.$act;\n }\n\n //$act='0'.trim($datos[4]); /// Aper Actividad\n $cod_part=trim($datos[5]); /// Partida\n if(strlen($cod_part)==3){\n $cod_part=$cod_part.'00';\n }\n\n $importe=(float)$datos[6]; /// Monto\n\n\n /* $prog=$datos[0]; /// Aper Programa\n $proy=$datos[1]; /// Aper Proyecto\n $act=$datos[2]; /// Aper Actividad\n $cod_part=$datos[3]; /// Partida\n $importe=(float)$datos[4]; /// Monto*/\n if(strlen($prog)==2 & strlen($proy)==4 & strlen($act)==3 & $importe!=0 & is_numeric($cod_part)){\n $aper=$this->model_ptto_sigep->get_apertura($prog,$proy,$act);\n if(count($aper)!=0){\n $partida = $this->minsumos->get_partida_codigo($cod_part); //// DATOS DE LA PARTIDA\n $par_id=0;\n if(count($partida)!=0){\n $par_id=$partida[0]['par_id'];\n }\n\n $ptto=$this->model_ptto_sigep->get_ptto_sigep_aprobado($prog,$proy,$act,$cod_part);\n if(count($ptto)!=0){\n /*------------------- Update Datos ----------------------*/\n $query=$this->db->query('set datestyle to DMY');\n $update_ptto = array(\n 'aper_id' => $aper[0]['aper_id'],\n 'importe' => $importe,\n 'fun_id' => $this->fun_id\n );\n\n $this->db->where('sp_id', $ptto[0]['sp_id']);\n $this->db->update('ptto_partidas_sigep_aprobado', $update_ptto);\n /*-------------------------------------------------------*/\n $nro++;\n }\n else{\n /*-------------------- Guardando Datos ------------------*/\n $query=$this->db->query('set datestyle to DMY');\n $data_to_store = array( \n 'aper_id' => $aper[0]['aper_id'],\n 'aper_programa' => $prog,\n 'aper_proyecto' => $proy,\n 'aper_actividad' => $act,\n 'par_id' => $par_id,\n 'partida' => $cod_part,\n 'importe' => $importe,\n 'g_id' => $this->gestion,\n 'fun_id' => $this->fun_id,\n );\n $this->db->insert('ptto_partidas_sigep_aprobado', $data_to_store);\n $sp_id=$this->db->insert_id();\n /*-------------------------------------------------------*/\n }\n $nro++;\n }\n else{\n $partida = $this->minsumos->get_partida_codigo($cod_part); //// DATOS DE LA PARTIDA\n $par_id=0;\n if(count($partida)!=0){\n $par_id=$partida[0]['par_id'];\n }\n /*-------------------- Guardando Datos ------------------*/\n $query=$this->db->query('set datestyle to DMY');\n $data_to_store = array( \n 'aper_id' => 0,\n 'aper_programa' => $prog,\n 'aper_proyecto' => $proy,\n 'aper_actividad' => $act,\n 'par_id' => $par_id,\n 'partida' => $cod_part,\n 'importe' => $importe,\n 'g_id' => $this->gestion,\n 'fun_id' => $this->fun_id,\n );\n $this->db->insert('ptto_partidas_sigep_aprobado', $data_to_store);\n $sp_id=$this->db->insert_id();\n /*-------------------------------------------------------*/ \n $nro++;\n }\n }\n elseif(strlen($prog)==2 & strlen($proy)==4 & strlen($act)==3 & $importe==0){\n $ptto=$this->model_ptto_sigep->get_ptto_sigep($prog,$proy,$act,$cod_part);\n if(count($ptto)!=0){\n //echo \"UPDATES 0->VALOR : \".$prog.'-'.$proy.'-'.$act.' cod '.$cod_part.'-- PAR ID : '.$par_id.' ->'.$importe.\"<br>\";\n /*------------------- Update Datos ----------------------*/\n $query=$this->db->query('set datestyle to DMY');\n $update_ptto = array(\n 'aper_id' => $aper[0]['aper_id'],\n 'importe' => $importe,\n 'fun_id' => $this->fun_id\n );\n\n $this->db->where('sp_id', $ptto[0]['sp_id']);\n $this->db->update('ptto_partidas_sigep_aprobado', $update_ptto);\n /*-------------------------------------------------------*/\n $nro++;\n }\n }\n }\n }\n $i++;\n }\n return $nro;\n }", "function gravarArquivo($texto, $nome, $pasta) {\r\n //Variável arquivo armazena o nome e extensão do arquivo.\r\n $arquivo = $nome;\r\n\r\n //Variável $fp armazena a conexão com o arquivo e o tipo de ação.\r\n $fp = fopen($pasta . $arquivo, \"a+\");\r\n\r\n //Escreve no arquivo aberto.\r\n fwrite($fp, $texto);\r\n\r\n //Fecha o arquivo.\r\n fclose($fp);\r\n }", "function escreveArquivo($aux_nome, $aux_tel, $aux_cpf, $aux_rg){\n\n $pessoa = new Individuo();\n\n /**\n * Para evitar que o usuario fique recarregando a pagina\n */\n \n $pessoa->setNome($aux_nome);\n if($pessoa->getNome() == '' || $pessoa->getNome() == null){\n session_destroy();\n die(\"Falha\");\n }\n /**\n * Gravando os dados\n */\n $pessoa->setTelefone($aux_tel);\n $pessoa->setCPF($aux_cpf);\n $pessoa->setRg($aux_rg);\n\n $dados = fopen(\"/home/mateus/Arquivos/dados_individual.csv\", \"a+\") or die(\"Failed\"); \n $conteudo = '';\n $conteudo = fread($dados, 1);\n\n if($conteudo == ''){\n escreveCabecalho($dados);\n }\n \n fwrite($dados, $pessoa->getNome());\n fwrite($dados, \",\");\n fwrite($dados, $pessoa->getTelefone());\n fwrite($dados, \",\");\n fwrite($dados, $pessoa->getCPF());\n fwrite($dados, \",\");\n fwrite($dados, $pessoa->getRg());\n fwrite($dados, \"\\n\");\n\n\n fclose($dados);\n }", "public function subir_archivo($archivotmp){ \n $i=0;\n $nro=0;\n $lineas = file($archivotmp);\n \n foreach ($lineas as $linea_num => $linea){ \n if($i != 0){ \n $datos = explode(\";\",$linea);\n if(count($datos)==7){\n $da=$datos[0]; /// Da\n $ue=$datos[1]; /// Ue\n $prog=$datos[2]; /// Aper Programa\n $proy=trim($datos[3]);\n if(strlen($proy)==2){\n $proy='00'.$proy; /// Aper Proyecto\n }\n $act=trim($datos[4]); /// Aper Actividad\n if(strlen($act)==2){\n $act='0'.$act;\n }\n\n //$act='0'.trim($datos[4]); /// Aper Actividad\n $cod_part=trim($datos[5]); /// Partida\n if(strlen($cod_part)==3){\n $cod_part=$cod_part.'00';\n }\n\n $importe=(float)$datos[6]; /// Monto\n if(strlen($prog)==2 & strlen($proy)==4 & strlen($act)==3 & $importe!=0 & is_numeric($cod_part)){\n $aper=$this->model_ptto_sigep->get_apertura($prog,$proy,$act);\n //$aper=$this->model_ptto_sigep->get_apertura($prog,$proy,$act);\n if(count($aper)!=0){\n $partida = $this->minsumos->get_partida_codigo($cod_part); //// DATOS DE LA PARTIDA\n $par_id=0;\n if(count($partida)!=0){\n $par_id=$partida[0]['par_id'];\n }\n\n //$ptto=$this->model_ptto_sigep->get_ptto_sigep($prog,$proy,$act,$cod_part);\n $ptto=$this->model_ptto_sigep->get_ptto_sigep($prog,$proy,$act,$cod_part);\n if(count($ptto)!=0){\n /*------------------- Update Datos ----------------------*/\n $query=$this->db->query('set datestyle to DMY');\n $update_ptto = array(\n 'aper_id' => $aper[0]['aper_id'],\n 'importe' => $importe,\n 'fun_id' => $this->session->userdata(\"fun_id\")\n );\n\n $this->db->where('sp_id', $ptto[0]['sp_id']);\n $this->db->update('ptto_partidas_sigep', $update_ptto);\n /*-------------------------------------------------------*/\n }\n else{\n /*-------------------- Guardando Datos ------------------*/\n $query=$this->db->query('set datestyle to DMY');\n $data_to_store = array( \n 'aper_id' => $aper[0]['aper_id'],\n 'da' => $da,\n 'ue' => $ue,\n 'aper_programa' => $prog,\n 'aper_proyecto' => $proy,\n 'aper_actividad' => $act,\n 'par_id' => $par_id,\n 'partida' => $cod_part,\n 'importe' => $importe,\n 'g_id' => $this->gestion,\n 'fun_id' => $this->session->userdata(\"fun_id\"),\n );\n $this->db->insert('ptto_partidas_sigep', $data_to_store);\n $sp_id=$this->db->insert_id();\n /*-------------------------------------------------------*/ \n }\n $nro++;\n }\n else{\n $partida = $this->minsumos->get_partida_codigo($cod_part); //// DATOS DE LA PARTIDA\n $par_id=0;\n if(count($partida)!=0){\n $par_id=$partida[0]['par_id'];\n }\n /*-------------------- Guardando Datos ------------------*/\n $query=$this->db->query('set datestyle to DMY');\n $data_to_store = array( \n 'aper_id' => 0,\n 'da' => $da,\n 'ue' => $ue,\n 'aper_programa' => $prog,\n 'aper_proyecto' => $proy,\n 'aper_actividad' => $act,\n 'par_id' => $par_id,\n 'partida' => $cod_part,\n 'importe' => $importe,\n 'g_id' => $this->gestion,\n 'fun_id' => $this->session->userdata(\"fun_id\"),\n );\n $this->db->insert('ptto_partidas_sigep', $data_to_store);\n $sp_id=$this->db->insert_id();\n /*-------------------------------------------------------*/ \n }\n }\n elseif(strlen($prog)==2 & strlen($proy)==4 & strlen($act)==3 & $importe==0){\n $ptto=$this->model_ptto_sigep->get_ptto_sigep($prog,$proy,$act,$cod_part);\n if(count($ptto)!=0){\n //echo \"UPDATES 0->VALOR : \".$prog.'-'.$proy.'-'.$act.' cod '.$cod_part.'-- PAR ID : '.$par_id.' ->'.$importe.\"<br>\";\n /*------------------- Update Datos ----------------------*/\n $query=$this->db->query('set datestyle to DMY');\n $update_ptto = array(\n 'aper_id' => $aper[0]['aper_id'],\n 'importe' => $importe,\n 'fun_id' => $this->session->userdata(\"fun_id\")\n );\n\n $this->db->where('sp_id', $ptto[0]['sp_id']);\n $this->db->update('ptto_partidas_sigep', $update_ptto);\n /*-------------------------------------------------------*/\n }\n }\n }\n }\n\n $i++;\n }\n return $nro;\n }", "public static function ModificarHelado($sabor,$precio,$foto){\r\n\r\n if(Helado::VerificarHelado($sabor)==\"El sabor esta\"){\r\n \r\n $direc=fopen(\"./helados/sabores.txt\",\"r\");\r\n $listadoHelados=\"\";\r\n \r\n while(!feof($direc)){\r\n\r\n $helado=fgets($direc);\r\n\r\n if($helado==\"\"){\r\n continue;\r\n }\r\n\r\n $heladoSeparado=explode(\"-\",$helado);\r\n\r\n if($heladoSeparado[0]==$sabor){\r\n echo \"s\";\r\n $heladoSeparado[1]=$precio;\r\n $destino=\"./heladosImagen/\".$sabor.\".\".date(\"His\").\".jpg\";\r\n move_uploaded_file($foto,$destino);\r\n\r\n unlink(\"C:/xampp/htdocs/PracticaParcialPRO/Programacion3/PracticaPP2/heladosImagen/\".trim($heladoSeparado[2]));\r\n echo $heladoSeparado[2];\r\n $heladoSeparado[2]=pathinfo($destino,PATHINFO_FILENAME).\".jpg\";\r\n echo $heladoSeparado[2];\r\n $helado=$heladoSeparado[0].\"-\".$heladoSeparado[1].\"-\".$heladoSeparado[2].\"\\r\\n\";\r\n \r\n }\r\n\r\n $listadoHelados.=$helado;\r\n \r\n }\r\n //echo $listadoHelados;\r\n fclose($direc);\r\n\r\n $direc=fopen(\"./helados/sabores.txt\",\"w\");\r\n\r\n if(0<fwrite($direc,$listadoHelados)){\r\n\r\n return \"Se modifico correctamente..\";\r\n }\r\n\r\n fclose($direc);\r\n\r\n }\r\n\r\n }", "public function salvaVetrineSuFile()\n\t\t{\n\t\t\tif( is_file(VETRINACONF) !== false )\n\t\t\t\tunlink(VETRINACONF);\n\n\t\t\tif( $fp = fopen(VETRINACONF, \"w+\") )\n\t\t\t{\n\t\t\t\tif( ($listaVetrine = array_keys($this->vetrine)) )\n\t\t\t\t{\n\t\t\t\t\tforeach ($listaVetrine as $nomeVetrina)\n\t\t\t\t\t{\n\t\t\t\t\t\tif( isset($this->vetrine[$nomeVetrina]['listaElem']) )\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t$files = $nomeVetrina.\"|\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$file = strtok($this->vetrine[$nomeVetrina]['listaElem'], \":\");\n\t\t\t\t\t\t\twhile( $file !== false )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$files .= \":\".$file;\n\t\t\t\t\t\t\t\t$file = strtok(\":\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$files .= \":\\r\\n\";\n\t\t\t\t\t\t\tfwrite($fp, $files);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tfclose($fp);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function executeGenerarfile(sfWebRequest $request)\n {\n\n // Variables\n $sqlUpdate='';\n\n // Redirige al inicio si no tiene acceso\n if (!$this->getUser()->getGuardUser()->getIsSuperAdmin())\n $this->redirect('ingreso');\n\n $archivo = Doctrine_Core::getTable('Actualizacionestrat')->find(array($request['id']));\n // $archivo = Doctrine_Core::getTable('Actualizaciones')->find(array(2));\n\n $arr = explode(\".\", $archivo->getImagefile(), 2);\n $first = $arr[0];\n\n $nombre_archivo_upd = sfConfig::get('app_pathfiles_folder').\"/../actualizacionestrat\".'/upd_'.$first.\".sql\";\n\n // DATOS conexion\n /*$dbhost = 'localhost';$dbname = 'circulo'; $dbuser = 'root'; $dbpass = 'root911';\n\n $pdo = new \\PDO('mysql:host=' . $dbhost . ';dbname=' . $dbname, $dbuser, $dbpass, array(\n \\PDO::MYSQL_ATTR_LOCAL_INFILE => true\n ));*/\n\n\n // PRIMER PASO : ACTUALIZACION DE REGISTROS\n\n // SI existe el archivo previamente, lo borro\n if (file_exists($nombre_archivo_upd)) unlink($nombre_archivo_upd);\n\n // CONSULTA por registros a ACTUALIZAR (ya existe el email en la tabla de Pacientes)\n //$datoss = $archivo = Doctrine_Core::getTable('Actualizaciones')->obtenerRegistrosAActualizar();\n\n $fp=fopen($nombre_archivo_upd,\"w+\");\n\n $sqlUpdate = $archivo = Doctrine_Core::getTable('Actualizacionestrat')->obtenerRegistrosAActualizar('nombre','nombre','T');\n fwrite($fp,$sqlUpdate);\n\n $sqlUpdate = $archivo = Doctrine_Core::getTable('Actualizacionestrat')->obtenerRegistrosAActualizar('abreviacion','abreviacion','T');\n fwrite($fp,$sqlUpdate);\n\n $sqlUpdate = $archivo = Doctrine_Core::getTable('Actualizacionestrat')->obtenerRegistrosAActualizar('idgrupotratamiento','idgrupotratamiento','N');\n fwrite($fp,$sqlUpdate);\n\n $sqlUpdate = $archivo = Doctrine_Core::getTable('Actualizacionestrat')->obtenerRegistrosAActualizar('idobrasocial','idobrasocial','N');\n fwrite($fp,$sqlUpdate);\n\n $sqlUpdate = $archivo = Doctrine_Core::getTable('Actualizacionestrat')->obtenerRegistrosAActualizar('idplan','idplan','N');\n fwrite($fp,$sqlUpdate);\n\n $sqlUpdate = $archivo = Doctrine_Core::getTable('Actualizacionestrat')->obtenerRegistrosAActualizar('idontologia','idontologia','N');\n fwrite($fp,$sqlUpdate);\n\n $sqlUpdate = $archivo = Doctrine_Core::getTable('Actualizacionestrat')->obtenerRegistrosAActualizar('garantia','garantia','N');\n fwrite($fp,$sqlUpdate);\n\n $sqlUpdate = $archivo = Doctrine_Core::getTable('Actualizacionestrat')->obtenerRegistrosAActualizar('importe','importe','N');\n fwrite($fp,$sqlUpdate);\n\n $sqlUpdate = $archivo = Doctrine_Core::getTable('Actualizacionestrat')->obtenerRegistrosAActualizar('coseguro','coseguro','N');\n fwrite($fp,$sqlUpdate);\n\n $sqlUpdate = $archivo = Doctrine_Core::getTable('Actualizacionestrat')->obtenerRegistrosAActualizar('importeos','importeos','N');\n fwrite($fp,$sqlUpdate);\n\n\n\n fclose ($fp);\n\n return true;\n\n }", "public static function LeerArchivo( )\n {\n $ListaLeida = array();\n\n //Abro el listado.\n $archivo = fopen(\"Helados.txt\", \"r\");\n \n //Leo el archivo.\n while(!feof($archivo))\n {\n $renglon = fgets($archivo);\n\n $helado = explode(\" - \", $renglon);\n\n $helado[0] = trim($helado[0]);\n if($helado[0] != \"\")\n {\n $ListaLeida[] = $helado;\n }\n }\n \n //Cierro el archivo.\n fclose($archivo);\n\n return $ListaLeida;\n }", "function grava()\n {\n $conteudo = '';\n \n foreach ($this->_registros as $reg)\n {\n $conteudo .= $reg->geraLinha();\n }\n \n $arquivo = $this->_diretorio . DIRECTORY_SEPARATOR . $this->_arquivo;\n \n file_put_contents($arquivo, $conteudo);\n \n return true;\n }", "public function loadFile ($arquivo) {\n\t\t#################################################################################\n\t\t## Variáveis globais\n\t\t#################################################################################\n\t\tglobal $log;\n\t\t\n\t\t#################################################################################\n\t\t## Verifica se o arquivo existe\n\t\t#################################################################################\n\t\tif (!file_exists($arquivo)) \t{\n\t\t\t$this->adicionaErro(0, 0, null, 'Arquivo não encontrado ('.$arquivo.') ');\n\t\t\tthrow new \\Exception('Arquivo não encontrado ('.$arquivo.') ');\n\t\t}\n\n\t\t#################################################################################\n\t\t## Verifica se o arquivo pode ser lido\n\t\t#################################################################################\n\t\tif (!is_readable($arquivo)) \t{\n\t\t\t$this->adicionaErro(0, 0, null, 'Arquivo não pode ser lido ('.$arquivo.') ');\n\t\t\tthrow new \\Exception('Arquivo não pode ser lido ('.$arquivo.') ');\n\t\t}\n\n\t\t#################################################################################\n\t\t## Lê o arquivo\n\t\t#################################################################################\n\t\t$lines\t= file($arquivo);\n\t\t\n\t\t#################################################################################\n\t\t## Verifica se o arquivo tem informação\n\t\t#################################################################################\n\t\tif (sizeof($lines) < 2) {\n\t\t\t$this->adicionaErro(0, 0, null, 'Arquivo sem informações ('.$arquivo.') ');\n\t\t\tthrow new \\Exception('Arquivo sem informações ('.$arquivo.') ');\n\t\t}\n\t\t \n\t\t#################################################################################\n\t\t## Percorre as linhas do arquivo\n\t\t#################################################################################\n\t\tfor ($i = 0; $i < sizeof($lines); $i++) {\n\t\t\t$codTipoReg\t\t= substr($lines[$i],7 ,1);\n\t\t\t//$log->info(\"Tipo de registro encontrado: $codTipoReg\");\n\t\t\tif ($codTipoReg == 3) {\n\t\t\t\t$codSegmento\t= substr($lines[$i],13 ,1);\n\t\t\t}else{\n\t\t\t\t$codSegmento\t= \"\";\n\t\t\t}\n\t\t\t$tipoReg\t\t= \"R\".$codTipoReg.$codSegmento;\n\t\t\t$linha\t\t\t= str_replace(array(\"\\n\", \"\\r\"), '', $lines[$i]); \n\t\t\t$reg\t\t\t= $this->adicionaRegistro($tipoReg);\n\t\t\tif ($reg === null) {\n\t\t\t\tcontinue;\n\t\t//\t\t$this->adicionaErro(0, $i+1, null, \"Linha fora do padrão definido\");\n\t\t//\t\treturn;\n\t\t\t}else{\n\t\t\t\t$ok\t\t\t= $this->registros[$reg]->carregaLinha($linha);\n\t\t\t}\n\t\t\t\n\t\t\tif ($ok !== true) \t{\n\t\t\t\t$log->err(\"Erro no tipo de registro: $codTipoReg, CodSegmento: $codSegmento, mensagem: $ok\");\n\t\t\t\t$this->adicionaErro(0, $this->registros[$reg]->getLinha(), $this->registros[$reg]->getTipoRegistro(), $ok);\n\t\t\t}\n\t\t}\n\n\t}", "public function crear(){\n\t\t$this->archivo = fopen($this->nombre , \"w+\");\n\t}", "public function processarArquivo() {\n\n /**\n * Cria uma instancia de DBLayoutReader referente ao arquivo a ser processado e o layout cadastrado\n */\n $this->oLayoutReader = new DBLayoutReader($this->iCodigoArquivo, $this->sNomeArquivo, true, false);\n\n $_SESSION[\"DB_usaAccount\"] = \"1\";\n\n /**\n * Remove da base todos os registros referentes a situação a ser processada. No caso, situacao 2 - BPC\n */\n $this->removerSituacao();\n $rsArquivo = fopen($this->sNomeArquivo, 'r');\n $iLinha = 0;\n\n /**\n * Percorre o arquivo para tratamento das linhas\n */\n while (!feof($rsArquivo)) {\n\n $iLinha++;\n $sLinha = fgets($rsArquivo);\n $oLinha = $this->oLayoutReader->processarLinha($sLinha, 0, true, false, false);\n\n if (!$oLinha) {\n continue;\n }\n\n /**\n * Salva a primeira linha do arquivo por se o cabeçalho do mesmo, adicionando no arquivo de não processados\n * Ou se o nome da pessoa ou data de nascimento estiverem vazias\n */\n if ($iLinha == 1 || empty($oLinha->nome_pessoa) || empty($oLinha->data_nascimento)) {\n\n $this->escreveArquivoRegistrosNaoProcessados($sLinha);\n continue;\n }\n\n $oDataNascimento = new DBDate($oLinha->data_nascimento);\n $dtNascimento = $oDataNascimento->convertTo(DBDate::DATA_EN);\n\n /**\n * Chama o método validar, responsavel por verificar se existe algum registro com os dados passados\n * Passamos o nome da pessoa da linha atual do arquivo, e a data de nascimento, já tratada, no formato do banco\n */\n $iCadastroUnico = $this->validar($oLinha->nome_pessoa, $dtNascimento);\n\n /**\n * Caso tenha sido retornado o sequencial do cidadao na validacao, chama o metodo insereSituacao para inserir o\n * registro para o cidadao com tipo de situacao 2\n */\n if ($iCadastroUnico != null) {\n $this->insereSituacao($iCadastroUnico);\n } else {\n\n $this->escreveArquivoRegistrosNaoProcessados($sLinha);\n $this->lTemNaoProcessado = true;\n }\n\n unset($oLinha);\n unset($oDataNascimento);\n }\n\n fclose($this->fArquivoLog);\n }", "public function Trasmetti($file);", "function abrir_fichero($_fichero) {\n\t\t$fichero = false;\n\t\tif ( $this->comprimir )\n\t\t $fichero = @gzopen($_fichero, \"w9\");\n\t\telse\n\t\t $fichero = @fopen($_fichero, \"w\");\n\t\treturn $fichero;\n\t}", "function cargarDatostxt(){\n // Si no existe lo creo\n $tabla=[]; \n if (!is_readable(FILEUSER) ){\n // El directorio donde se crea tiene que tener permisos adecuados\n $fich = @fopen(FILEUSER,\"w\") or die (\"Error al crear el fichero.\");\n fclose($fich);\n }\n $fich = @fopen(FILEUSER, 'r') or die(\"ERROR al abrir fichero de usuarios\"); // abrimos el fichero para lectura\n \n while ($linea = fgets($fich)) {\n $partes = explode('|', trim($linea));\n // Escribimos la correspondiente fila en tabla\n $tabla[]= [ $partes[0],$partes[1],$partes[2],$partes[3]];\n }\n fclose($fich);\n return $tabla;\n}", "function dbobject_importConvertDataFile($inputfile,$outputfile) {\n\t## first we open the file\n\t\n\t$content = file_get_contents($inputfile);\n\t$content = str_replace(\"\\r\",\"\\n\",$content);\n\t## write the file\n\t## open the file\n\t## we need to split the file into sections-\n\t## we will cut it up in slices of 1000 entries\t\t\n\t$fp = fopen($outputfile,'w');\n\tif($fp) {\n\t\t## write the data\n\t\tfwrite($fp,$content);\n\t\tfclose($fp);\n\t}\n\n }", "public function genera_txt($param_final){\n\n\t\t$allrows = $param_final;\n\t\t\n\t\t$id_us = $this->session->userdata('session_id'); \n\n\t\t$archivo = fopen($_SERVER['DOCUMENT_ROOT'].'/reportes_villatours_v/referencias/archivos/archivos_egencia_lay_data_import_sp/udids_'.$id_us.'.txt', \"w+\");\n\t\t\n\t\t$header = ['Link_Key','BookingID','UdidNumber','UdidValue','UdidDefinitions'];\n\n\t\t$str_body = '';\n\t\tforeach ($header as $key => $value) {\n\t\t\t\n\t\t\t\t\t$str_body = $str_body . $value.\"\t\";\n\n\t\t\t\t}\n\n\n\t\tfwrite($archivo, $str_body);\n\t\t\t\n\n\t $nueva_plantilla = [];\n\n\t\tforeach ($allrows['rep'] as $key => $value) {\n\t\n\n\t\t\tarray_push($nueva_plantilla, $value);\n\t\t\t\n\n\t\t}\n\n\t\t\n\t foreach($nueva_plantilla as $key => $value) {\n\n\t \tfwrite($archivo,\"\\r\\n\");\n\t \t\n\t \t$str_body = '';\n\t \tforeach($value as $value2) {\n\n\t \t\t$str_body = $str_body . $value2.\"\t\";\n\n\t \t}\n\n\t \tfwrite($archivo, $str_body);\n\n\t\t}\n\n\t\t\n\n\t\tfclose($archivo);\n\n }", "function importar_archivo_sigepp(){\n if ($this->input->post()) {\n $post = $this->input->post();\n \n $tipo = $_FILES['archivo']['type'];\n $tamanio = $_FILES['archivo']['size'];\n $archivotmp = $_FILES['archivo']['tmp_name'];\n\n $filename = $_FILES[\"archivo\"][\"name\"];\n $file_basename = substr($filename, 0, strripos($filename, '.'));\n $file_ext = substr($filename, strripos($filename, '.'));\n $allowed_file_types = array('.csv');\n\n if (in_array($file_ext, $allowed_file_types) && ($tamanio < 90000000)) {\n \n /*--------------------------------------------------------------*/\n $i=0;\n $nro=0;$nroo=0;\n $lineas = file($archivotmp);\n foreach ($lineas as $linea_num => $linea){ \n if($i != 0){ \n\n $datos = explode(\";\",$linea);\n //echo count($datos).\"<br>\";\n if(count($datos)==7){\n\n $da=$datos[0]; /// Da\n $ue=$datos[1]; /// Ue\n $prog=$datos[2]; /// Aper Programa\n $proy=trim($datos[3]);\n if(strlen($proy)==2){\n $proy='00'.$proy; /// Aper Proyecto\n }\n $act=trim($datos[4]); /// Aper Actividad\n if(strlen($act)==2){\n $act='0'.$act;\n }\n $cod_part=trim($datos[5]); /// Partida\n if(strlen($cod_part)==3){\n $cod_part=$cod_part.'00';\n }\n\n $importe=(float)$datos[6]; /// Monto\n\n // echo $this->gestion.\"<br>\";\n echo $prog.'- ('.strlen($prog).') -> '.$proy.' ('.strlen($proy).') -> '.$act.' ('.strlen(trim($act)).') ----'.$importe.'-- CODIGO PARTIDA '.is_numeric($cod_part).'<br>';\n if(strlen($prog)==2 & strlen($proy)==4 & strlen(trim($act))==3 & $importe!=0 & is_numeric($cod_part)){\n // echo \"INGRESA : \".$prog.'-'.$proy.'-'.$act.'..'.$importe.\"<br>\";\n $nroo++;\n // echo \"string<br>\";\n $aper=$this->model_ptto_sigep->get_apertura($prog,$proy,$act);\n if(count($aper)!=0){\n $partida = $this->minsumos->get_partida_codigo($cod_part); //// DATOS DE LA PARTIDA\n $par_id=0;\n if(count($partida)!=0){\n $par_id=$partida[0]['par_id'];\n }\n\n $ptto=$this->model_ptto_sigep->get_ptto_sigep($prog,$proy,$act,$cod_part);\n if(count($ptto)!=0){\n echo \"UPDATES : \".$prog.'-'.$proy.'-'.$act.' cod '.$cod_part.'-- PAR ID : '.$par_id.' ->'.$importe.\"<br>\";\n /*------------------- Update Datos ----------------------*/\n /*$query=$this->db->query('set datestyle to DMY');\n $update_ptto = array(\n 'aper_id' => $aper[0]['aper_id'],\n 'importe' => $importe,\n 'fun_id' => $this->session->userdata(\"fun_id\")\n );\n\n $this->db->where('sp_id', $ptto[0]['sp_id']);\n $this->db->update('ptto_partidas_sigep', $update_ptto);*/\n /*-------------------------------------------------------*/\n }\n else{\n echo \"INSERTS : \".$nroo.\" -\".$prog.'-'.$proy.'-'.$act.' cod '.$cod_part.'-- PAR ID : '.$par_id.' ->'.$importe.\"<br>\";\n /*-------------------- Guardando Datos ------------------*/\n /*$query=$this->db->query('set datestyle to DMY');\n $data_to_store = array( \n 'aper_id' => $aper[0]['aper_id'],\n 'da' => $da,\n 'ue' => $ue,\n 'aper_programa' => $prog,\n 'aper_proyecto' => $proy,\n 'aper_actividad' => $act,\n 'par_id' => $par_id,\n 'partida' => $cod_part,\n 'importe' => $importe,\n 'g_id' => $this->gestion,\n 'fun_id' => $this->session->userdata(\"fun_id\"),\n );\n $this->db->insert('ptto_partidas_sigep', $data_to_store);\n $sp_id=$this->db->insert_id();*/\n /*-------------------------------------------------------*/ \n }\n $nro++;\n }\n else{\n echo \"NO INGRESA : \".$prog.'-'.$proy.'-'.$act.'..'.$importe.\"<br>\";\n /* $partida = $this->minsumos->get_partida_codigo($cod_part); //// DATOS DE LA PARTIDA\n $par_id=0;\n if(count($partida)!=0){\n $par_id=$partida[0]['par_id'];\n }*/\n /*-------------------- Guardando Datos ------------------*/\n /* $query=$this->db->query('set datestyle to DMY');\n $data_to_store = array( \n 'aper_id' => 0,\n 'da' => $da,\n 'ue' => $ue,\n 'aper_programa' => $prog,\n 'aper_proyecto' => $proy,\n 'aper_actividad' => $act,\n 'par_id' => $par_id,\n 'partida' => $cod_part,\n 'importe' => $importe,\n 'g_id' => $this->gestion,\n 'fun_id' => $this->session->userdata(\"fun_id\"),\n );\n $this->db->insert('ptto_partidas_sigep', $data_to_store);\n $sp_id=$this->db->insert_id();*/\n /*-------------------------------------------------------*/ \n }\n }\n elseif(strlen($prog)==2 & strlen($proy)==4 & strlen($act)==3 & $importe==0){\n $ptto=$this->model_ptto_sigep->get_ptto_sigep($prog,$proy,$act,$cod_part);\n if(count($ptto)!=0){\n echo \"UPDATES 0->VALOR : \".$prog.'-'.$proy.'-'.$act.' cod '.$cod_part.'-- PAR ID : '.$par_id.' ->'.$importe.\"<br>\";\n /*------------------- Update Datos ----------------------*/\n /*$query=$this->db->query('set datestyle to DMY');\n $update_ptto = array(\n 'aper_id' => $aper[0]['aper_id'],\n 'importe' => $importe,\n 'fun_id' => $this->session->userdata(\"fun_id\")\n );\n\n $this->db->where('sp_id', $ptto[0]['sp_id']);\n $this->db->update('ptto_partidas_sigep', $update_ptto);*/\n /*-------------------------------------------------------*/\n }\n }\n }\n }\n\n $i++;\n }\n\n /*--------------------------------------------------------------*/\n } \n elseif (empty($file_basename)) {\n echo \"<script>alert('SELECCIONE ARCHIVO .CSV')</script>\";\n } \n elseif ($filesize > 100000000) {\n //redirect('');\n } \n else {\n $mensaje = \"Sólo estos tipos de archivo se permiten para la carga: \" . implode(', ', $allowed_file_types);\n echo '<script>alert(\"' . $mensaje . '\")</script>';\n }\n\n } else {\n show_404();\n }\n }", "function generarArchivoTextoPS(&$data_content)\n {\n $bEsAscii = TRUE;\n foreach (str_split($data_content) as $c) if (ord($c) >= 127) {\n $bEsAscii = FALSE; break;\n }\n if ($bEsAscii) {\n $ruta_archivo = tempnam('/tmp', 'data_');\n file_put_contents($ruta_archivo, $data_content);\n return $ruta_archivo;\n }\n \n /* El contenido a escribir no es ASCII. Ya que la página web emite \n * UTF-8, se asumirá que el contenido está también codificado en UTF-8\n * (verificado en Firefox 16 e Internet Explorer 6). \n * \n * El código de abajo es necesario debido a que\n * 1) /usr/bin/sendfax no reconoce como texto un archivo en codificación\n * distinta de ASCII\n * 2) /usr/sbin/textfmt sólo puede convertir desde una fuente ISO-8859-15\n */\n $ruta_temp = tempnam('/tmp', 'data_');\n file_put_contents($ruta_temp, iconv('UTF-8', 'ISO-8859-15//TRANSLIT', $data_content));\n $ruta_archivo = tempnam('/tmp', 'data_');\n $output = $retval = NULL;\n exec('/usr/sbin/textfmt -B -f Courier-Bold -Ml=0.4in -p11 < '.\n escapeshellarg($ruta_temp).' > '.escapeshellarg($ruta_archivo),\n $output, $retval);\n unlink($ruta_temp);\n\n return ($retval == 0) ? $ruta_archivo : NULL;\n }", "function editar_pelicula($peliActual){\n // leemos todas las pelis, y las volcamos al fichero menos la pasada como argumento\n\n $lesPelis=readPelis();\n\n // obrim el fitxer de pelis per a escriptura. \n $f = fopen(filePeliculas, \"w\");\n\n foreach($lesPelis as $peli){\n\n // guardem la peli llegida o l'actual, si és el cas\n if ($peli[\"id\"]==$peliActual[\"id\"]){\n $p=$peliActual;\n }\n else{\n $p=$peli;\n }\n\n //convertim $peli (array asociatiu) en array\n\n $valors_peli=array();\n foreach($p as $k=>$v){\n array_push($valors_peli,$v);\n }\n\n //escrivim al fitxer\n fputcsv($f,$valors_peli,\",\");\n\n }\n\n fclose($f);\n \n \n\n}", "function salvarArquivo($imagem, $modo){\n $arquivosPermitidos = array(\".jpg\", \".jpeg\", \".png\", \".JPG\", \".JPEG\", \".PNG\");\n\n // DIRETORIO ONDE SERÃO ENVIADOS OS ARQUIVOS\n $diretorio = \"../arquivos/\";\n\n // PARA PEGAR O OBJETO QUE FOI SELCIONA, UTILIZAMOS O '$_FILES' ao invés de post\n // ATRIBUINDO O NOME DO ARQUIVO UPADO À UMA VARIÁVEL\n $arquivo = $imagem['name'];\n\n // ATRIBUINDO O TAMANHO DO ARQUIVO UPADO À UMA VARIÁVEL\n $tamanhoArquivo = $imagem['size'];\n\n // CONVERTO O TAMANHO DO ARQUIVO, QUE VEM EM BYTES EM KILOBYTES DIVIDINDO-O POR 1024\n $tamanhoArquivo /= 1024;\n\n // round() = ARRENDONDA O NUMERO\n $tamanhoArquivo = round($tamanhoArquivo);\n\n // RETORNA A EXTENSAO DO ARQUIVO(busca na string de trás pra frente)\n $extensaoArquivo = strrchr($arquivo, \".\");\n\n // RETORNA SOMENTE O NOME DO ARQUIVO\n // ---file 'PATHINFO' - pode retornar a extensão\n $nomeArquivo = pathinfo($arquivo, PATHINFO_FILENAME);\n\n //USAMOS O md5 PARA CRIPTOGRAFAR O NOME DO ARQUIVO ALEM DE GERAR UM ID UNICO QUE NUNCA IRÁ SE REPETIR\n $nomeArquivoCrypt = md5(uniqid(time()).$nomeArquivo);\n\n /*\n FUNÇÕES DO PHP PARA REALIZAR CRIPTOGRAFIA DE DADOS\n md5('elemento');\n sha1('elemento');\n base64('elemento');\n hash(\"sha512\" ou \"sha256\", 'elemento')\n */\n\n // VALIDAÇÃO DE EXTENSOES PERMITIDAS\n if(in_array($extensaoArquivo, $arquivosPermitidos)){\n if($tamanhoArquivo <= 10000){\n //LOCAL QUE A IMAGEM FOI GUARDADA PELO POST DO FORM\n $arquivoTmp = $imagem['tmp_name'];\n\n //CRIAMOS UM NOVO NOME DO ARQUIVO COM A SUA EXTENSAO\n $foto = $nomeArquivoCrypt.$extensaoArquivo;\n\n move_uploaded_file($arquivoTmp, $diretorio.$foto);\n if($modo == 'atualizar'){// SE O MODO FOR ATUALIZAR, APAGA A IMAGEM, ANTIGA DO REGISTRO\n unlink('../arquivos/'.$_SESSION['img']);\n }\n\n return $foto;//RETORNA O NOME DA FOTO PARA QUE SEJA COLOCADSO NO BANCO\n \n }else{\n // Erro Tamanho do arquivo inválido\n return \"sizeError\";\n }\n }else{\n // Erro Extensão Inválida\n return \"extensionError\";\n }\n }", "public function mostrarRutasArchivosGenerados($pedido_id){\n $pedido = Pedido::where('id', $pedido_id)->first();\n $sales = sales::select()->where('pedido_id', '=', $pedido_id)->first();\n set_time_limit(0);\n $dt_empres = Empresaa::select()->first();\n\n $rutai = public_path();\n $ruta = str_replace(\"\\\\\", \"//\", $rutai);\n $rout = $this->makeDir('firmados');\n $rout = $this->makeDir('noautorizados');\n $rout = $this->makeDir('autorizados');\n $rout = $this->makeDir('temp');\n $rout = $this->makeDir('pdf');\n \n $rutafiles['autorizados'] = $ruta . '//archivos//' . 'autorizados' . '//';\n $rutafiles['enviados'] = $ruta . '//' . 'enviados' . '//';\n $rutafiles['firmados'] = $ruta . '//archivos//firmados//';\n $rutafiles['generados'] = $ruta . '/archivos//generados' . '/';\n $rutafiles['noautorizados'] = $ruta . '//archivos//' . 'noautorizados' . '//';\n $rutafiles['certificado'] = $ruta . '//archivos//certificado//';\n\n $rutafirma = $dt_empres->pathcertificate;\n $passcertificate = $dt_empres->passcertificate;\n $pass = '\"' . $passcertificate . '\"';\n $rutafiles['pathfirma'] = '\"' . $rutafiles['certificado'] . $rutafirma . '\"';\n $rutafiles['xml'] = $sales['claveacceso'] . '.xml';\n $rutafiles['pathsalida'] = $rutafiles['firmados'];\n $rutafiles['pathgenerado'] = $rutafiles['generados'] . $sales['claveacceso'] . '.xml';\n dd( $rutafiles );\n }", "function fix_rede_grupo_ftp($filename) {\n $grupos = file_get_contents($filename);\n $dados_corrigidos = \"\";\n\n $array_linhas = explode(\"\\n\", $grupos);\n foreach ($array_linhas as $linha) {\n $coluna = explode(\";\", $linha);\n if(count($coluna) == 1) {\n continue;\n }\n // Converte o formato de horario da coluna nu_hora_inicio\n $nu_hora_inicio = substr($coluna[3], 1, -1);\n $nu_hora_inicio = '\"'.date(\"Y-m-d H:i:s\",$nu_hora_inicio).'\"';\n\n $dados_corrigidos .= $coluna[0].\";\".$coluna[1].\";\".$coluna[2].\";\".$nu_hora_inicio.\";\\N\\n\";\n }\n // Sobrepoe o arquivo de rede_grupo_ftp com a versão corrigida\n file_put_contents($filename, $dados_corrigidos);\n}", "function leer_archivo($archivo)\n{\n $fp = fopen($archivo,\"r\"); \n $contador = fgets($fp, 26); \n fclose($fp);\n return ($contador) ;\n\n}", "public function executeProcesarfile(sfWebRequest $request)\n {\n // Redirige al inicio si no tiene acceso\n if (!$this->getUser()->getGuardUser()->getIsSuperAdmin())\n $this->redirect('ingreso');\n\n $archivo = Doctrine_Core::getTable('Actualizacionestrat')->find(array($request['id']));\n // $archivo = Doctrine_Core::getTable('Actualizaciones')->find(array(5));\n\n $nombre_archivo = sfConfig::get('app_pathfiles_folder').\"/../actualizacionestrat\".'/'.$archivo->getImagefile();\n\n // DATOS conexion\n $dbhost = 'localhost';$dbname = 'circulo'; $dbuser = 'root'; $dbpass = 'root911';\n\n $sqlTruncate = \"TRUNCATE TABLE tmp_tratamiento;\";\n\n $sqlLoadInput = \"LOAD DATA LOCAL INFILE '\".$nombre_archivo.\"'\n INTO TABLE tmp_tratamiento\n CHARACTER SET UTF8\n FIELDS TERMINATED BY ';'\n OPTIONALLY ENCLOSED BY '\\\"'\n LINES TERMINATED BY '\\n'\n IGNORE 1 LINES;\";\n\n\n $pdo = new \\PDO('mysql:host=' . $dbhost . ';dbname=' . $dbname, $dbuser, $dbpass, array(\n \\PDO::MYSQL_ATTR_LOCAL_INFILE => true\n ));\n\n //TRUNCAR TABLA TEMPORAL\n $query = $pdo->prepare($sqlTruncate);\n $query->execute();\n\n //PROCESAR INFORMACON DEL ARCHIVO\n $query = $pdo->prepare($sqlLoadInput);\n $query->execute();\n\n // POR DEFECTO ESTAN TODOS PARA INSERTAR, prepararRegistros marca los que son para actualizar\n Doctrine_Core::getTable('Actualizacionestrat')->prepararRegistros();\n\n return true;\n\n }", "function do_po_byfile()\r\n\t{\r\n\t\t\r\n\t\t$user = $this->erpm->auth(PURCHASE_ORDER_ROLE);\r\n\t\tif(!$_FILES['po_file']['name'])\r\n\t\t\tshow_error('Please choose file');\r\n\t\t\t\r\n\t\t// check if the file is valid csv \r\n\t\tif($_FILES['po_file']['type'] != 'application/vnd.ms-excel') \r\n\t\t\tshow_error('Invalid File format');\r\n\r\n\t\t// process the file for creating PO.\r\n\t\t\r\n\t\t$po_list = array();\t\r\n\t\t$tmpfname = $_FILES['po_file']['tmp_name'];\r\n\t\t$fp = fopen($tmpfname,'r');\r\n\t\t$i = 0;\r\n\t\twhile(!feof($fp))\r\n\t\t{\r\n\t\t\t$csv_data = fgetcsv($fp);\r\n\t\t\tif(!$i++)\r\n\t\t\t\tcontinue;\r\n\t\t\tif(!$csv_data[0])\r\n\t\t\t\tcontinue ;\r\n\t\t\t\t\r\n\t\t\tif(!isset($po_list[$csv_data[0]]))\r\n\t\t\t\t$po_list[$csv_data[0]] = array();\r\n\t\t\t\t\r\n\t\t\tif(!isset($po_list[$csv_data[0]][$csv_data[1]]))\r\n\t\t\t\t$po_list[$csv_data[0]][$csv_data[1]] = 0;\t\r\n\r\n\t\t\t$po_list[$csv_data[0]][$csv_data[1]] += $csv_data[3];\r\n\t\t\t\r\n\t\t}\r\n\t\tfclose($fp);\r\n\t\t\r\n\t\t\r\n\t\tif($po_list)\r\n\t\t{\r\n\t\t\t$total_po = 0;\r\n\t\t\tforeach ($po_list as $vid=>$po_prod)\r\n\t\t\t{\r\n\t\t\t\t// create po entry\r\n\t\t\t\t$inp = array($vid,$user['userid']);\r\n\t\t\t\t$this->db->query(\"insert into t_po_info (vendor_id,remarks,po_status,created_by,created_on) values (?,'Created from file',1,?,now()) \",$inp);\r\n\t\t\t\t$po_id = $this->db->insert_id();\r\n\t\t\t\t$total=0; \r\n\t\t\t\tforeach ($po_prod as $pid=>$qty)\r\n\t\t\t\t{\r\n\t\t\t\t\t$prod_det = $this->db->query(\"select a.product_id,a.mrp,b.brand_margin as margin,round(a.mrp-(a.mrp*b.brand_margin/100),2) as price from m_product_info a join m_vendor_brand_link b on a.brand_id = b.brand_id where vendor_id = ? and product_id = ? \",array($vid,$pid))->row_array();\r\n\t\t\t\t\tif($prod_det)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// create po prod request entry\r\n\t\t\t\t\t\t$inp=array($po_id,$pid,$qty,$prod_det['mrp'],$prod_det['margin'],0,1,$prod_det['price'],0,0,'');\r\n\t\t\t\t\t\t$this->db->query(\"insert into t_po_product_link(po_id,product_id,order_qty,mrp,margin,scheme_discount_value,scheme_discount_type,purchase_price,is_foc,has_offer,special_note,created_on) values(?,?,?,?,?,?,?,?,?,?,?,now())\",$inp);\r\n\t\t\t\t\t\t$total+=$prod_det['price']*$qty;\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$this->db->query(\"update t_po_info set total_value=? where po_id=? limit 1\",array($total,$po_id));\r\n\t\t\t\t\r\n\t\t\t\t$total_po++; \r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$this->session->set_flashdata(\"erp_pop_info\",$total_po.\" PO's created\");\r\n\t\t\tredirect(\"admin/bulk_createpo_byfile\",'refresh');\r\n\t\t\t\r\n\t\t}else\r\n\t\t{\r\n\t\t\tshow_error(\"Uploaded file is Blank or not in format\");\r\n\t\t}\r\n\t\t\t\r\n\t\texit;\r\n\t}", "function generateTextFile($filesize = 1024) {\r\n if ($tmp_file = drupal_tempnam('temporary://', 'filefield_')) {\r\n $destination = $tmp_file . '.txt';\r\n file_unmanaged_move($tmp_file, $destination);\r\n\r\n $fp = fopen($destination, 'w');\r\n fwrite($fp, str_repeat('01', $filesize/2));\r\n fclose($fp);\r\n\r\n return $destination;\r\n }\r\n }", "function crcl_file($out,$file) {\n if ( !$file ) return \"не задано имя файла\";\n if (!$fp = fopen($file, 'a')) return \"не могу открыть\"; \n if (flock($fp, LOCK_EX)) { // выполнить эксклюзивное запирание \n ftruncate ($fp,0); //УДАЛЯЕМ СОДЕРЖИМОЕ ФАЙЛА\n if (fputs($fp, $out) === false) return \"проблемы при записи\"; \n fflush ($fp); //очищение файлового буфера и запись в файл \n flock ($fp,LOCK_UN); //снятие блокировки\n }\n else return \"не могу запереть\"; \n\n if (fclose($fp)) return false; \n else return \"не могу закрыть\"; \n }", "function crearArchivoErrores() {\n\t\t// Crea un archivo HTML donde se documentaran los registros que no se insertaron en la tabla de migraciones\n\t\t\t$fp = fopen(\"Errores/ReporteFacturacion.html\", \"w+\");\n\t\t\t$encabezado = \"<html> <head> <title> Reporte errores Esquema Contabilidad(Farmacia) </title> \n\t\t\t<link rel='stylesheet' type='text/css' href='../../General/estilos/estilos.css'> </head>\";\n\t\t\tfputs($fp, $encabezado);\n\t\t\tfclose($fp);\n\t\t}", "function generTribeFile()\n{\n global $pathdata, $tabtribes;\n \n $fileu16 = formFileName($pathdata.\"\\\\Npcs\\\\npc_tribe_relation.xml\");\n $fileout = \"../outputs/parse_output/tribe/tribe_relations.xml\";\n \n $fileext = convFileToUtf8($fileu16);\n logHead(\"Generierung der Datei\");\n logLine(\"Eingabedatei UTF16\",$fileu16);\n logLine(\"Eingabedatei UTF8\",$fileext);\n logLine(\"Ausgabedatei\",$fileout);\n \n $cntles = 0;\n $cntout = 0;\n \n $hdlout = openOutputFile($fileout);\n \n // Vorspann ausgeben\n fwrite($hdlout,'<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>'.\"\\n\");\n fwrite($hdlout,\"<tribe_relations>\\n\");\n $cntout += 2;\n \n $lines = file($fileext);\n $domax = count($lines);\n $crel = 0;\n \n for ($l=0;$l<$domax;$l++)\n {\n $line = rtrim($lines[$l]);\n $cntles++;\n \n if (stripos($line,\"<?xml\") === false\n && stripos($line,\"npc_tribe_relations\") === false)\n { \n // Start Tribe\n if (stripos($line,\" Tribe=\") !== false)\n {\n $val = strtoupper(getKeyValue(\"Tribe\",$line));\n $base = \"\";\n $crel = 0;\n \n // Tribe merken!\n if (!isset($tabtribes[$val]))\n { \n // zusätzlich als Basisklasse merken ?!? \n if (substr($val,0,5) == \"GAB1_\" || substr($val,0,3) == \"PC_\")\n $tabtribes[$val] = true; \n else\n $tabtribes[$val] = false;\n } \n // BASE-Angabe vorhanden?\n for ($b=$l+1;$b<$domax;$b++)\n {\n $xline = $lines[$b];\n \n if (stripos($xline,\"base_tribe\") !== false)\n {\n $base = strtoupper(getXmlValue(\"base_tribe\",$xline));\n \n // als Basisklasse merken\n $tabtribes[$base] = true;\n }\n else\n if (stripos($xline,\"</tribe>\") !== false)\n $b = $domax;\n else\n $crel++;\n }\n \n if ($base != \"\")\n $base = ' base=\"'.$base.'\"';\n \n if ($crel > 0) \n fwrite($hdlout,' <tribe name=\"'.$val.'\"'.$base.'>'.\"\\n\");\n else\n fwrite($hdlout,' <tribe name=\"'.$val.'\"'.$base.' />'.\"\\n\");\n \n $cntout++;\n }\n else\n {\n // End Tribe\n if (stripos($line,\"</tribe>\") !== false)\n {\n if ($crel > 0)\n {\n fwrite($hdlout,' </tribe>'.\"\\n\");\n $cntout++;\n }\n }\n else\n {\n // Relation\n if (stripos($line,\"base_tribe\") === false)\n {\n fwrite($hdlout,getFormattedLine($line).\"\\n\");\n $cntout++;\n }\n }\n }\n }\n }\n // Nachspann ausgeben\n fwrite($hdlout,\"</tribe_relations>\");\n $cntout++;\n \n fclose($hdlout);\n \n logLine(\"Zeilen Eingabedatei\",$domax);\n logLine(\"Zeilen verarbeitet \",$cntles);\n logLine(\"Zeilen ausgegeben \",$cntout);\n}", "function importar_archivo_sigep(){\n if ($this->input->post()) {\n $post = $this->input->post();\n $tp = $this->security->xss_clean($post['tp']);\n\n $tipo = $_FILES['archivo']['type'];\n $tamanio = $_FILES['archivo']['size'];\n $archivotmp = $_FILES['archivo']['tmp_name'];\n\n $filename = $_FILES[\"archivo\"][\"name\"];\n $file_basename = substr($filename, 0, strripos($filename, '.'));\n $file_ext = substr($filename, strripos($filename, '.'));\n $allowed_file_types = array('.csv');\n if (in_array($file_ext, $allowed_file_types) && ($tamanio < 90000000)) {\n \n /*--------------------------------------------------------------*/\n if($tp==0){\n $lineas=$this->subir_archivo($archivotmp); /// Techo Inicial\n }\n else{\n $lineas=$this->subir_archivo_aprobado($archivotmp); /// Techo Aprobado\n }\n $this->session->set_flashdata('success','SE SUBIO CORRECTAMENTE EL ARCHIVO ('.$lineas.')');\n redirect(site_url(\"\").'/ptto_asig_poa');\n /*--------------------------------------------------------------*/\n } \n elseif (empty($file_basename)) {\n echo \"<script>alert('SELECCIONE ARCHIVO .CSV')</script>\";\n } \n elseif ($filesize > 100000000) {\n //redirect('');\n } \n else {\n $mensaje = \"Sólo estos tipos de archivo se permiten para la carga: \" . implode(', ', $allowed_file_types);\n echo '<script>alert(\"' . $mensaje . '\")</script>';\n }\n\n } else {\n show_404();\n }\n }", "function importar_requerimientos_operaciones(){\n if ($this->input->post()) {\n $post = $this->input->post();\n $proy_id = $post['proy_id']; /// proy id\n $pfec_id = $post['pfec_id']; /// pfec id\n $com_id = $post['com_id']; /// com id\n \n $proyecto = $this->model_proyecto->get_id_proyecto($proy_id); /// DATOS DEL PROYECTO\n $fase = $this->model_faseetapa->get_id_fase($proy_id); //// DATOS DE LA FASE ACTIVA\n\n $monto_asig=$this->model_ptto_sigep->suma_ptto_accion($proyecto[0]['aper_id'],1);\n $monto_prog=$this->model_ptto_sigep->suma_ptto_accion($proyecto[0]['aper_id'],2);\n $saldo=round(($monto_asig[0]['monto']-$monto_prog[0]['monto']),2);\n\n $tipo = $_FILES['archivo']['type'];\n $tamanio = $_FILES['archivo']['size'];\n $archivotmp = $_FILES['archivo']['tmp_name'];\n\n $filename = $_FILES[\"archivo\"][\"name\"];\n $file_basename = substr($filename, 0, strripos($filename, '.'));\n $file_ext = substr($filename, strripos($filename, '.'));\n $allowed_file_types = array('.csv');\n if (in_array($file_ext, $allowed_file_types) && ($tamanio < 90000000)) {\n\n $lineas = file($archivotmp);\n if($this->suma_monto_total($lineas)<=$saldo){\n /*------------------- Migrando ---------------*/\n $lineas = file($archivotmp);\n $i=0;\n $nro=0;\n //Recorremos el bucle para leer línea por línea\n foreach ($lineas as $linea_num => $linea){ \n if($i != 0){\n $datos = explode(\";\",$linea);\n \n if(count($datos)==21){\n $cod_ope = (int)$datos[0]; //// Codigo Operacion\n $cod_partida = (int)$datos[1]; //// Codigo partida\n $verif_com_ope=$this->model_producto->verif_componente_operacion($com_id,$cod_ope);\n $par_id = $this->minsumos->get_partida_codigo($cod_partida); //// DATOS DE LA FASE ACTIVA\n\n $detalle = utf8_encode(trim($datos[3])); //// descripcion\n $unidad = utf8_encode(trim($datos[4])); //// Unidad\n $cantidad = (int)$datos[5]; //// Cantidad\n $unitario = (float)$datos[6]; //// Costo Unitario\n $total = (float)$datos[7]; //// Costo Total\n if(!is_numeric($unitario)){\n if($cantidad!=0){\n $unitario=round(($total/$cantidad),2); \n }\n }\n\n $var=8;\n for ($i=1; $i <=12 ; $i++) {\n $m[$i]=(float)$datos[$var]; //// Mes i\n if($m[$i]==''){\n $m[$i]=0;\n }\n $var++;\n }\n\n $observacion = utf8_encode(trim($datos[20])); //// Observacion\n\n if(count($verif_com_ope)==1 & count($par_id)!=0 & $cod_partida!=0){\n $nro++;\n $query=$this->db->query('set datestyle to DMY');\n $data_to_store = array( \n 'ins_codigo' => $this->session->userdata(\"name\").'/REQ/'.$this->gestion, /// Codigo Insumo\n 'ins_fecha_requerimiento' => date('d/m/Y'), /// Fecha de Requerimiento\n 'ins_detalle' => strtoupper($detalle), /// Insumo Detalle\n 'ins_cant_requerida' => round($cantidad,0), /// Cantidad Requerida\n 'ins_costo_unitario' => $unitario, /// Costo Unitario\n 'ins_costo_total' => $total, /// Costo Total\n 'ins_tipo' => 1, /// Ins Tipo\n 'ins_unidad_medida' => strtoupper($unidad), /// Insumo Unidad de Medida\n 'par_id' => $par_id[0]['par_id'], /// Partidas\n 'ins_observacion' => strtoupper($observacion), /// Observacion\n 'fecha_creacion' => date(\"d/m/Y H:i:s\"),\n 'fun_id' => $this->session->userdata(\"fun_id\"), /// Funcionario\n 'aper_id' => $proyecto[0]['aper_id'], /// aper id\n 'num_ip' => $this->input->ip_address(), \n 'nom_ip' => gethostbyaddr($_SERVER['REMOTE_ADDR']),\n );\n $this->db->insert('insumos', $data_to_store); ///// Guardar en Tabla Insumos \n $ins_id=$this->db->insert_id();\n\n /*----------------------------------------------------------*/\n $data_to_store2 = array( ///// Tabla InsumoProducto\n 'prod_id' => $verif_com_ope[0]['prod_id'], /// act_id\n 'ins_id' => $ins_id, /// ins_id\n );\n $this->db->insert('_insumoproducto', $data_to_store2);\n /*----------------------------------------------------------*/\n $gestion_fase=$fase[0]['pfec_fecha_inicio'];\n\n /*---------------- Recorriendo Gestiones de la Fase -----------------------*/\n for ($g=$fase[0]['pfec_fecha_inicio']; $g <=$fase[0]['pfec_fecha_fin'] ; $g++){\n $data_to_store = array( \n 'ins_id' => $ins_id, /// Id Insumo\n 'g_id' => $g, /// Gestion\n 'insg_monto_prog' => $total, /// Monto programado\n );\n $this->db->insert('insumo_gestion', $data_to_store); ///// Guardar en Tabla Insumo Gestion\n $insg_id=$this->db->insert_id();\n\n $ptto_fase_gestion = $this->model_faseetapa->fase_gestion($fase[0]['id'],$g); //// DATOS DE LA FASE GESTION\n $fuentes=$this->model_faseetapa->fase_presupuesto_id($ptto_fase_gestion[0]['ptofecg_id']);\n\n if(count($fuentes)==1){\n /*------------------- Guardando Fuente Financiamiento ------*/\n $query=$this->db->query('set datestyle to DMY');\n $data_to_store3 = array( \n 'insg_id' => $insg_id, /// Id Insumo gestion\n 'ifin_monto' => $total, /// Monto programado\n 'ifin_gestion' => $g, /// Gestion\n 'ffofet_id' => $fuentes[0]['ffofet_id'], /// ffotet id\n 'ff_id' => $fuentes[0]['ff_id'], /// ff id\n 'of_id' => $fuentes[0]['of_id'], /// ff id\n 'nro_if' => 1, /// Nro if\n );\n $this->db->insert('insumo_financiamiento', $data_to_store3); ///// Guardar en Tabla Insumo Financiamiento\n $ifin_id=$this->db->insert_id();\n\n for ($p=1; $p <=12 ; $p++) { \n if($m[$p]!=0 & is_numeric($unitario)){\n $data_to_store4 = array( \n 'ifin_id' => $ifin_id, /// Id Insumo Financiamiento\n 'mes_id' => $p, /// Mes \n 'ipm_fis' => $m[$p], /// Valor mes\n );\n $this->db->insert('ifin_prog_mes', $data_to_store4); ///// Guardar en Tabla Insumo Financiamiento Programado Mes\n }\n }\n /*-----------------------------------------------------------*/ \n }\n }\n\n }\n\n }\n\n }\n $i++;\n }\n\n redirect('admin/prog/list_prod/1/'.$pfec_id.'/'.$proy_id.'/'.$com_id.'');\n /*--------------------------------------------*/\n }\n else{\n $this->session->set_flashdata('danger','COSTO PROGRAMADO A SUBIR ES MAYOR AL SALDO POR PROGRAMAR. VERIFIQUE PLANTILLA A MIGRAR');\n redirect('admin/prog/list_prod/1/'.$pfec_id.'/'.$proy_id.'/'.$com_id.'/false');\n }\n } \n elseif (empty($file_basename)) {\n $this->session->set_flashdata('danger','POR FAVOR SELECCIONE ARCHIVO CSV');\n redirect('admin/prog/list_prod/1/'.$pfec_id.'/'.$proy_id.'/'.$com_id.'/false');\n } \n elseif ($filesize > 100000000) {\n $this->session->set_flashdata('danger','TAMAÑO DEL ARCHIVO');\n redirect('admin/prog/list_prod/1/'.$pfec_id.'/'.$proy_id.'/'.$com_id.'/false');\n } \n else {\n $mensaje = \"SOLO SE PERMITEN ESTOS ARCHIVOS : \" . implode(', ', $allowed_file_types);\n $this->session->set_flashdata('danger',$mensaje);\n redirect('admin/prog/list_prod/1/'.$pfec_id.'/'.$proy_id.'/'.$com_id.'/false');\n }\n\n } else {\n show_404();\n }\n }", "function produire_fichier_langue($langue, $module, $items, $producteur='')\n{\n\tksort($items);\n\t$initiale = '';\n\t$contenu = array();\n\tforeach($items as $k => $v) {\n\t\tif ($initiale != strtoupper($k[0])) {\n\t\t\t$initiale = strtoupper($k[0]);\n\t\t\t$contenu[]= \"\\n// $initiale\";\n\t\t}\n\t\tif (!is_string($v)) {\n\t\t\t$t = str_replace(\"'\", '\\\\\\'', $v[1]);\n\t\t\tif ($v[2] == 'inutile')\n\t\t\t\t$contenu[]= \"/*\\t\" . $v[0] .\"\\n\\t'$k' => '$t',*/\"; \n\t\t\telse {\n\t\t\t\t$com = !$v[0] ? '' : (\"/*\\t\". $v[0] .\" */\\n\");\n\t\t\t\t$contenu[]= \"$com\\t'$k' => '$t',\"; \n\t\t\t}\n\t\t} else {\n\t\t\t$t = str_replace(\"'\", '\\\\\\'', $v);\n\t\t\t$t = str_replace('\\\\\\\\n', \"' . \\\"\\\\n\\\" .'\", $t);\n\t\t\t$contenu[]= \"\\t'$k' => '$t',\";\n\t\t}\n\t}\n\tif (!strpos($producteur, _LANGONET_SIGNATURE)) \n\t\t$producteur = \"\\n\" . _LANGONET_SIGNATURE . \"\\n\" . preg_replace(\",\\\\n[/#]*,\", \"\\n/// \", $producteur);\n\n\treturn '<'. \"?php\\n\" . $producteur . '\n// Module: ' . $module . '\n// Langue: ' . $langue . '\n// Date: ' . date('d-m-Y H:i:s') . '\n// Items: ' . count($items) . '\n\nif (!defined(\\'_ECRIRE_INC_VERSION\\')) return;\n\n$GLOBALS[$GLOBALS[\\'idx_lang\\']] = array(\n' .\n\t join(\"\\n\", $contenu) .\n\t \"\\n);\\n?\".'>';\n}", "function saveCompressToFile($is_evenRodeh = true){\n\t\t$text \t\t= \"\";\t\t//menginisialisasi text\n\t\t$extention \t= $is_evenRodeh ? \".ER\" : \".FLE\";\t//megecek is_evenRodeh untuk menentukan ekstensi file\n\n\n \tfor($i = 0; $i < strlen($this->finalBit)/8; $i++)\t\t// melakukan perulangan sebanyak bit akhir / 8\n \t$text.=chr(bindec(substr($this->finalBit,$i*8,8)));\t\t// menambahkan char dari 8 digit bit akhir ke dalam text\n\t\n\t\t$newfile = fopen(\"../hasil/\".$this->filename.$extention,\"w\");\n \tfwrite($newfile,$text); // menyimpan text ke dalam file\n \tfclose($newfile);\t\t// menutup file\n }", "function generarRecibo15_txt() {\n $ids = $_REQUEST['ids'];\n $id_pdeclaracion = $_REQUEST['id_pdeclaracion'];\n $id_etapa_pago = $_REQUEST['id_etapa_pago'];\n//---------------------------------------------------\n// Variables secundarios para generar Reporte en txt\n $master_est = null; //2;\n $master_cc = null; //2;\n\n if ($_REQUEST['todo'] == \"todo\") { // UTIL PARA EL BOTON Recibo Total\n $cubo_est = \"todo\";\n $cubo_cc = \"todo\";\n }\n\n $id_est = $_REQUEST['id_establecimientos'];\n $id_cc = $_REQUEST['cboCentroCosto'];\n\n if ($id_est) {\n $master_est = $id_est;\n } else if($id_est=='0') {\n $cubo_est = \"todo\";\n }\n\n if ($id_cc) {\n $master_cc = $id_cc;\n } else if($id_cc == '0'){\n $cubo_cc = \"todo\";\n }\n //\n $dao = new PlameDeclaracionDao();\n $data_pd = $dao->buscar_ID($id_pdeclaracion);\n $fecha = $data_pd['periodo'];\n\n //---\n $dao_ep = new EtapaPagoDao();\n $data_ep = $dao_ep->buscar_ID($id_etapa_pago);\n ;\n\n $_name_15 = \"error\";\n if ($data_ep['tipo'] == 1):\n $_name_15 = \"1RA QUINCENA\";\n elseif ($data_ep['tipo'] == 2):\n $_name_15 = \"2DA QUINCENA\";\n endif;\n\n\n $nombre_mes = getNameMonth(getFechaPatron($fecha, \"m\"));\n $anio = getFechaPatron($fecha, \"Y\");\n\n\n $file_name = '01.txt';//NAME_COMERCIAL . '-' . $_name_15 . '.txt';\n $file_name2 = '02.txt';//NAME_COMERCIAL . '-BOLETA QUINCENA.txt';\n $fpx = fopen($file_name2, 'w');\n $fp = fopen($file_name, 'w');\n \n //..........................................................................\n $FORMATO_0 = chr(27).'@'.chr(27).'C!';\n $FORMATO = chr(18).chr(27).\"P\";\n $BREAK = chr(13) . chr(10);\n //$BREAK = chr(14) . chr(10);\n //chr(27). chr(100). chr(0)\n $LINEA = str_repeat('-', 80);\n//..............................................................................\n// Inicio Exel\n//.............................................................................. \n fwrite($fp,$FORMATO); \n \n\n\n // paso 01 Listar ESTABLECIMIENTOS del Emplearo 'Empresa'\n $dao_est = new EstablecimientoDao();\n $est = array();\n $est = $dao_est->listar_Ids_Establecimientos(ID_EMPLEADOR);\n $pagina = 1;\n\n // paso 02 listar CENTROS DE COSTO del establecimento. \n if (is_array($est) && count($est) > 0) {\n //DAO\n $dao_cc = new EmpresaCentroCostoDao();\n $dao_pago = new PagoDao();\n $dao_estd = new EstablecimientoDireccionDao();\n\n // -------- Variables globales --------// \n $TOTAL = 0;\n $SUM_TOTAL_CC = array();\n $SUM_TOTAL_EST = array();\n\n\n\n for ($i = 0; $i < count($est); $i++) { // ESTABLECIMIENTO\n //echo \" i = $i establecimiento ID=\".$est[$i]['id_establecimiento'];\n //echo \"<br>\";\n //$SUM_TOTAL_EST[$i]['establecimiento'] = strtoupper(\"Establecimiento X ==\" . $est[$i]['id_establecimiento']);\n $bandera_1 = false;\n if ($est[$i]['id_establecimiento'] == $master_est) {\n $bandera_1 = true;\n } else if ($cubo_est == \"todo\") {\n $bandera_1 = true;\n }\n\n if ($bandera_1) {\n \n // if($bander_ecc){\n \n $SUM_TOTAL_EST[$i]['monto'] = 0;\n //Establecimiento direccion Reniec\n $data_est_direc = $dao_estd->buscarEstablecimientoDireccionReniec($est[$i]['id_establecimiento']/* $id_establecimiento */);\n\n $SUM_TOTAL_EST[$i]['establecimiento'] = $data_est_direc['ubigeo_distrito'];\n\n $ecc = array();\n $ecc = $dao_cc->listar_Ids_EmpresaCentroCosto($est[$i]['id_establecimiento']);\n // paso 03 listamos los trabajadores por Centro de costo \n\n for ($j = 0; $j < count($ecc); $j++) {\n\n $bandera_2 = false;\n if ($ecc[$j]['id_empresa_centro_costo'] == $master_cc) {\n $bandera_2 = true;\n } else if ($cubo_est == 'todo' || $cubo_cc == \"todo\") { // $cubo_est\n $bandera_2 = true;\n }\n \n if ($bandera_2) {\n //$contador_break = $contador_break + 1;\n // LISTA DE TRABAJADORES\n $data_tra = array();\n $data_tra = $dao_pago->listar_2($id_etapa_pago, $est[$i]['id_establecimiento'], $ecc[$j]['id_empresa_centro_costo']);\n\n if (count($data_tra)>0) {\n \n $SUM_TOTAL_CC[$i][$j]['establecimiento'] = $data_est_direc['ubigeo_distrito'];\n $SUM_TOTAL_CC[$i][$j]['centro_costo'] = strtoupper($ecc[$j]['descripcion']);\n $SUM_TOTAL_CC[$i][$j]['monto'] = 0;\n\n //fwrite($fp, $LINEA); \n fwrite($fp, NAME_EMPRESA); \n //$worksheet->write(($row + 1), ($col + 1), NAME_EMPRESA);\n //$data_pd['periodo'] $data_pd['fecha_modificacion']\n $descripcion1 = date(\"d/m/Y\");\n \n fwrite($fp, str_pad(\"FECHA : \", 56, \" \", STR_PAD_LEFT));\n fwrite($fp, str_pad($descripcion1, 11, \" \", STR_PAD_LEFT));\n fwrite($fp, $BREAK);\n\n fwrite($fp, str_pad(\"PAGINA :\", 69, \" \", STR_PAD_LEFT)); \n fwrite($fp, str_pad($pagina, 11, \" \", STR_PAD_LEFT));\n fwrite($fp, $BREAK);\n\n fwrite($fp, str_pad($_name_15/*\"1RA QUINCENA\"*/, 80, \" \", STR_PAD_BOTH));\n fwrite($fp, $BREAK);\n\n fwrite($fp, str_pad(\"PLANILLA DEL MES DE \" . strtoupper($nombre_mes) . \" DEL \" . $anio, 80, \" \", STR_PAD_BOTH));\n fwrite($fp, $BREAK);\n fwrite($fp, $BREAK);\n\n fwrite($fp, \"LOCALIDAD : \" . $data_est_direc['ubigeo_distrito']);\n fwrite($fp, $BREAK);\n fwrite($fp, $BREAK);\n\n fwrite($fp, \"CENTRO DE COSTO : \" . strtoupper($ecc[$j]['descripcion']));\n fwrite($fp, $BREAK);\n fwrite($fp, $BREAK);\n //$worksheet->write($row, $col, \"##################################################\");\n \n fwrite($fp, $LINEA);\n fwrite($fp, $BREAK);\n fwrite($fp, str_pad(\"N \", 4, \" \", STR_PAD_LEFT));\n fwrite($fp, str_pad(\"DNI\", 12, \" \", STR_PAD_RIGHT));\n fwrite($fp, str_pad(\"APELLIDOS Y NOMBRES\", 40, \" \", STR_PAD_RIGHT));\n fwrite($fp, str_pad(\"IMPORTE\", 9, \" \", STR_PAD_RIGHT));\n fwrite($fp, str_pad(\"FIRMA\", 15, \" \", STR_PAD_RIGHT));\n fwrite($fp, $BREAK);\n fwrite($fp, $LINEA);\n fwrite($fp, $BREAK);\n \n $pag = 0;\n $num_trabajador = 0;\n for ($k = 0; $k < count($data_tra); $k++) {\n $num_trabajador = $num_trabajador +1; \n if($num_trabajador>24):\n fwrite($fp,chr(12));\n $num_trabajador=0;\n endif;\n \n $data = array();\n $data = $data_tra[$k]; \n //$DIRECCION = $SUM_TOTAL_EST[$i]['establecimiento'];\n // Inicio de Boleta \n \n generarRecibo15_txt2($fpx, $data, $nombre_mes, $anio,$pag);\n $pag = $pag +1;\n\n \n // Final de Boleta\n $texto_3 = $data_tra[$k]['apellido_paterno'] . \" \" . $data_tra[$k]['apellido_materno'] . \" \" . $data_tra[$k]['nombres']; \n fwrite($fp, $BREAK);\n fwrite($fp, str_pad(($k + 1) . \" \", 4, \" \", STR_PAD_LEFT));\n fwrite($fp, str_pad($data_tra[$k]['num_documento'], 12, \" \", STR_PAD_RIGHT));\n fwrite($fp, str_pad(limpiar_caracteres_especiales_plame($texto_3), 40, \" \", STR_PAD_RIGHT));\n fwrite($fp, str_pad($data_tra[$k]['sueldo'], 9, \" \", STR_PAD_RIGHT));\n fwrite($fp, str_pad(\"_______________\", 15, \" \", STR_PAD_RIGHT));\n fwrite($fp, $BREAK);\n \n // por persona\n $SUM_TOTAL_CC[$i][$j]['monto'] = $SUM_TOTAL_CC[$i][$j]['monto'] + $data_tra[$k]['sueldo'];\n }\n\n\n $SUM_TOTAL_EST[$i]['monto'] = $SUM_TOTAL_EST[$i]['monto'] + $SUM_TOTAL_CC[$i][$j]['monto'];\n \n //--- LINE\n fwrite($fp, $BREAK);\n //fwrite($fp, $LINEA);\n fwrite($fp, $LINEA);\n fwrite($fp, $BREAK);\n fwrite($fp, str_pad(\"TOTAL \" . $SUM_TOTAL_CC[$i][$j]['centro_costo'] . \" \" . $SUM_TOTAL_EST[$i]['establecimiento'], 56, \" \", STR_PAD_RIGHT));\n fwrite($fp, number_format($SUM_TOTAL_CC[$i][$j]['monto'], 2));\n fwrite($fp, $BREAK);\n fwrite($fp, $LINEA);\n fwrite($fp, $BREAK);\n\n fwrite($fp,chr(12));\n $pagina = $pagina + 1;\n //fwrite($fp, $BREAK . $BREAK . $BREAK . $BREAK);\n $TOTAL = $TOTAL + $SUM_TOTAL_CC[$i][$j]['monto'];\n //$row_a = $row_a + 5;\n }//End Trabajadores\n }//End Bandera.\n }//END FOR CCosto\n\n\n // CALCULO POR ESTABLECIMIENTOS\n /* $SUM = 0.00;\n for ($z = 0; $z < count($SUM_TOTAL_CC[$i]); $z++) {\n\n fwrite($fp, str_pad($SUM_TOTAL_CC[$i][$z]['centro_costo'], 59, \" \", STR_PAD_RIGHT));\n fwrite($fp, number_format($SUM_TOTAL_CC[$i][$z]['monto'], 2));\n fwrite($fp, $BREAK);\n\n\n $SUM = $SUM + $SUM_TOTAL_CC[$i][$z]['monto'];\n }\n fwrite($fp, str_pad(\"T O T A L G E N E R A L --->>>\", 59, \" \", STR_PAD_RIGHT));\n fwrite($fp, number_format($SUM, 2));\n */\n\n //fwrite($fp, $BREAK . $BREAK);\n \n }\n }//END FOR Est\n\n /*\n fwrite($fp, str_repeat('*', 85));\n fwrite($fp, $BREAK);\n fwrite($fp, \"CALCULO FINAL ESTABLECIMIENTOS \");\n fwrite($fp, $BREAK);\n\n //$worksheet->write(($row+4), ($col + 1), \".::RESUMEN DE PAGOS::.\");\n $SUM = 0;\n for ($z = 0; $z < count($SUM_TOTAL_EST); $z++) {\n\n fwrite($fp, str_pad($SUM_TOTAL_EST[$z]['establecimiento'], 59, \" \", STR_PAD_RIGHT));\n fwrite($fp, number_format($SUM_TOTAL_EST[$z]['monto'], 2));\n fwrite($fp, $BREAK);\n $SUM = $SUM + $SUM_TOTAL_EST[$z]['monto'];\n }\n */\n \n fwrite($fp, $BREAK);\n fwrite($fp, $BREAK);\n fwrite($fp, str_pad(\"T O T A L G E N E R A L --->>>\", 56, \" \", STR_PAD_RIGHT));\n fwrite($fp, str_pad(number_format_var($TOTAL), 15, ' ',STR_PAD_RIGHT));\n fwrite($fp, $BREAK);\n fwrite($fp, $BREAK);\n \n \n }//END IF\n//..............................................................................\n// Inicio Exel\n//..............................................................................\n //|---------------------------------------------------------------------------\n //| Calculos Finales\n //|\n //|---------------------------------------------------------------------------\n //\n //fwrite($fp, $BREAK . $BREAK . $BREAK . $BREAK . $BREAK . $BREAK . $BREAK . $BREAK . $BREAK);\n //fwrite($fp, $BREAK . $BREAK . $BREAK . $BREAK . $BREAK . $BREAK . $BREAK . $BREAK . $BREAK);\n\n\n fclose($fp);\n fclose($fpx);\n // $workbook->close();\n // .........................................................................\n // SEGUNDO ARCHIVO\n //..........................................................................\n\n\n\n\n\n\n\n\n\n\n $file = array();\n $file[] = $file_name;\n $file[] = ($file_name2);\n ////generarRecibo15_txt2($id_pdeclaracion, $id_etapa_pago);\n\n\n $zipfile = new zipfile();\n $carpeta = \"file-\" . date(\"d-m-Y\") . \"/\";\n $zipfile->add_dir($carpeta);\n\n for ($i = 0; $i < count($file); $i++) {\n $zipfile->add_file(implode(\"\", file($file[$i])), $carpeta . $file[$i]);\n //$zipfile->add_file( file_get_contents($file[$i]),$carpeta.$file[$i]);\n }\n\n header(\"Content-type: application/octet-stream\");\n header(\"Content-disposition: attachment; filename=zipfile.zip\");\n\n echo $zipfile->file();\n}", "private function writeFile($type) {\n if (!is_dir($GLOBALS['currentUser'] -> user['directory'].\"/temp\")) {\n mkdir($GLOBALS['currentUser'] -> user['directory'].\"/temp\", 0755);\n }\n file_put_contents($GLOBALS['currentUser'] -> user['directory'].\"/temp/efront_\".$type.\".csv\", implode(\"\\n\", $this -> lines));\n $file = new EfrontFile($GLOBALS['currentUser'] -> user['directory'].\"/temp/efront_\".$type.\".csv\");\n return $file;\n }", "function juntarArquivos($file, $arquivos, $separacao = '', $function = NULL) {\n\t// Verifica se o arquivo existe\n\tif(file_exists($file))\n\t\treturn true;\n\t\n\tif(!is_dir(dirname($file)))\n\t\tmkdir(dirname($file), 0777, true);\n\t\n\t// Carregar todos os conteudos dos arquivos\n\t$f = fopen($file, 'w+');\n\t\n\t$file = '';\n\tforeach($arquivos as $name => $value) {\n\t\t$return = '';\n\t\tif(substr($value, 0, 2) == '//')\n\t\t\t$value = 'http:'. $value;\n\t\t\n\t\t// Carregar o conteudo\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $value);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\t\t$content = curl_exec($ch);\n\t\t$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n\t\tcurl_close($ch);\n\t\t\n\t\tif($http_code == 200) {\n\t\t\t$file .= $content . $separacao;\n\t\t}\n\t}\n\t\n\t// Verificar se tem alguma função de compactação\n\tif(function_exists($function)) {\n\t\t$file = call_user_func($function, $file);\n\t}\n\t\n\tfwrite($f, $file);\n\tfclose($f);\n}", "private function _agregarArchivosEntregaPractica($file, $id_entrega_lp, $id_practica, $titulo, $id_seg_arch = NULL) {\n $_objUsuarioPractica = new DAO_UsuariosPracticas();\n $_objUsuarioPractica->set_id_practica($id_practica);\n $_objUsuarioPractica->consultar();\n $estadoPractica = $_objUsuarioPractica->get_estado_practica();\n if ($estadoPractica != 3) {\n throw new ControllerException(\"La practica debe estar en estado 'Entrega'\");\n }\n $_objArchivoSe = new DAO_RelArchivosSeguimiento();\n $id_archivo = NULL;\n if (!empty($id_seg_arch)) {// modificar el archivo subido\n $_objArchivoSe->set_id_seg_arc($id_seg_arch);\n $_objArchivoSe->consultar();\n $id_archivo = $_objArchivoSe->get_id_archivos();\n }\n $_objArchivoSe->set_id_entre_lp($id_entrega_lp);\n try {\n $this->_validarArchivo($file);\n $_objArchivo = $this->_guardarArchivo($file, $id_archivo);\n } catch (ControladorArchivosException $e) {\n throw new ControllerException($e->getMessage());\n }\n $arrSeguimiento = $this->_agregarSeguimiento($id_practica, $titulo);\n $_objArchivoSe->set_id_archivos($_objArchivo->get_id_archivo());\n $_objArchivoSe->set_id_segui($arrSeguimiento['id_segui']);\n $_objArchivoSe->set_estado_archivo(1);\n if (!$_objArchivoSe->guardar()) {\n $this->_mensaje = $_objArchivoSe->getMysqlError();\n throw new ControllerException(\"No se pudo actualizar vinculacion de archivo a practica\");\n }\n $this->_guardarLog($_SESSION['id_usu_cent'], ['accion' => 'insertar', 'metodo' => get_class() . ':_agregarArchivosEntregaPractica', 'parametros' => ['file' => $file['name'], 'id_arch_lp' => $id_arch_lp, 'id_practica' => $id_practica, 'titulo' => $titulo, 'id_seg_arch' => $id_seg_arch]]);\n return $_objArchivoSe->getArray();\n }", "function incremento_contador($archivo)\n{\n\t$contador = 0;\n\n\t//Abrimos el archivo y leemos su contenido\n\t$fp = fopen($archivo,\"r\");\n\t$contador = fgets($fp, 26);\n\tfclose($fp);\n\n\t//Incrementamos el contador\n\t++$contador;\n\n\t//Actualizamos el archivo con el nuevo valor\n\t$fp = fopen($archivo,\"w+\");\n\tfwrite($fp, $contador, 26);\n\tfclose($fp);\n\n\techo \"Este script ha sido ejecutado $contador veces\";\n}", "function reemplazar($fichero, $nuevofichero, $oldPalabra, $newPalabra){\r\n\t\tcopy($fichero, $nuevofichero);\r\n\t\t$fw = fopen($nuevofichero, \"r\");\r\n\t\t\r\n\t\twhile (($contenido = fgets($fw)) !== false) {\r\n\t\t\t$str = str_replace($oldPalabra, $newPalabra, $contenido);\r\n\t\t\techo $str . \"\\n\";\r\n\t\t}\r\n\t\t//fwrite($fw, $str);\r\n\t\tfclose($fw);\r\n\t}", "function listarTodos2(){\n\tglobal $ruta_archivo;\n\t$array_result=array();\n\t$contenido_verificacion = file_get_contents($ruta_archivo);\n\t$lineas = explode(\"\\n\", $contenido_verificacion);\n return $lineas;\n\n\n//------USO---------\n /*\n\t$lineas_count = count($lineas);\n\n//---recorremos desde la segunda linea\n\tfor($i = 1; $i < $lineas_count; $i++) {\n\n\t\tif(empty($lineas[$i]) || $lineas[$i]==\"\"){\n\t\t\tcontinue;\n\t\t//echo $i.\"-\".$lineas[$i].\"-\";\n\t\t}\n\n\t\t$array_fila = explode('|', $lineas[$i]);\n\n\t\techo $array_fila[1].\"<br>\";\n\t\t\n\t}\n\t\n*/\n}", "function cargar($sender, $param)\n {\n if($sender->HasFile) \t \n $carpeta=$this->t1->text;\n $ruta=\"attach/archivo/\".$carpeta.\"/\";//ruta donde se guardan los adjuntos que se han subido \n $this->t2->text=$this->t2->text.\"$ruta$sender->FileName\".\"\\n\";\n $sender->saveAs($ruta.$sender->FileName);\n }", "function importGenres($lines, $language) {\n\t\tif(empty($lines)) {\n\t\t\tlogError(\"importGenres: file is empty\");\n\t\t\treturn;\n\t\t}\n\t\treset($lines);\n\t\twhile(list(,$line) = each($lines)) {\n\t\t\tif(preg_match('/^\\s*$/', $line) || preg_match('/^#/', $line))\n\t\t\t\tcontinue;\n\t\t\tif(!preg_match('/^\\s*(\\d+)\\s+(.*)/', $line, $items)) {\n\t\t\t\tlogError(\"bad line syntax: $line\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdebug(\"genre item\", $items);\n\t\t\t$id = $items[1];\n\t\t\t$name = trim($items[2]);\n\n\t\t\t$o1 = new sotf_NodeObject(\"sotf_genres\");\n\t\t\t$o1->setID($o1->makeId(0, $o1->tablename, $id . $language));\n\t\t\t$o1->set('genre_id', $id);\n\t\t\t$o1->set('language', $language);\n\t\t\t$o1->set('name', $name);\n\t\t\t$o1->create();\n\t\t}\n\t}", "function extraerConversacion(){\n $fp = fopen(\"../conversacion/conversacion.txt\",\"rb\");\n $conversacion = new Conversacion(); \n $numeroLinea = 0;\n $listaConversaciones = array();\n while (!feof($fp)){\n $linea = fgets($fp);\n $linea = trim($linea);\n if($numeroLinea == 0){\n $conversacion->setId($linea);\n }\n else{\n if($linea != \"\"){\n $conversacion->agregarMensaje($linea);\n }\n }\n $numeroLinea++;\n //. strlen(trim($linea)), strlen logitud de la cadena, trim borra las cadenas vacias al principio y al final\n\n if($linea == \"\"){\n // echo \" aqui empieza una nueva conversacion <br>\"; \n //$listaConversaciones debo agregarle la $conversacion\n array_push($listaConversaciones,$conversacion);\n $conversacion = new Conversacion(); \n $numeroLinea = 0;\n }\n }\n array_push($listaConversaciones,$conversacion);\n return $listaConversaciones;\n\n fclose($fp);\n \n }", "public function recorrerArchivoCSV(){\n $array = [];\n for ($row = $this->filaDesde; $row <= $this->filaHasta; ++ $row) {\n $item = new ExtractoBancarioItemVO();\n $registro = $this->FILE[$row];\n $registro = explode (\",\", $registro);\n\n //este IF es por si tiene \",\" en algún lugar del nro, pasa en MACRO.\n if ($this->idTipoBanco['valor'] == 3){\n $aux = [];\n //arreglamos el formato de la fecha.\n $date = new DateTime($registro[0]);\n $aux[0] = $date->format(\"Y-m-d\");\n\n //asigno los valores que están bien en $aux.\n $aux[1] = $registro[1];\n $aux[2] = $registro[2];\n $aux[3] = $registro[3];\n\n //arreglamos el registro para que los nros queden en la posición del array que les corresponden.\n //analizo el campo Débito.\n $i=4;\n if(strlen($registro[$i]) > 0 && $registro[$i][strlen($registro[$i])-1]!='\"' ){\n $aux[4] = $registro[$i].$registro[$i+1];\n $i++;\n }else{\n $aux[4] = $registro[$i];\n }\n //sacamos las \" de los nros.\n $aux[4] = str_replace('\"', \"\", $aux[4]);\n\n //incremento el valor de $i.\n $i++;\n //analizo el campo Crédito.\n if(strlen($registro[$i]) > 0 && $registro[$i][strlen($registro[$i])-1]!='\"' ){\n $aux[5] = $registro[$i].$registro[$i+1];\n $i++;\n }else{\n $aux[5] = $registro[$i];\n }\n //sacamos las \" de los nros.\n $aux[5] = str_replace('\"', \"\", $aux[5]);\n\n //incremento el valor de $i.\n $i++;\n //analizo el campo Saldo.\n if(strlen($registro[$i]) > 0 && $registro[$i][strlen($registro[$i])-1]!='\"' ){\n $aux[6] = $registro[$i].$registro[$i+1];\n $i++;\n }else{\n $aux[6] = $registro[$i];\n }\n //sacamos las \" de los nros.\n $aux[6] = str_replace('\"', \"\", $aux[6]);\n\n $registro = $aux;\n }\n\n for ($col = $this->columnaDesde; $col < $this->columnaHasta; ++ $col) {\n //si la columna leída nos interesa continúo.\n if(in_array($col, $this->columnas)){\n $val = $registro[$col];\n array_push($array, trim($val));\n }\n }\n\n $item->asignarValores($array, $this->idTipoBanco['valor']); //asigno los valores al objeto.\n $this->mensaje['valor'] .= $item->idTipoBancoConcepto['referencia']->result->getMessage();\n //si el status no es OK, incremento el contador de erróneos.\n if($item->idTipoBancoConcepto['referencia']->result->getStatus() != STATUS_OK)\n $this->cantidadRegistrosError['valor']++;\n $this->extractoBancarioItemArray[] = $item; //agrego el registro al array.\n\n $array = [];\n $this->cantidadRegistros['valor']++;\n }\n }", "function _guardarFichero($fichero, $datos) {\n\t\tif ( $this->comprimir )\n\t\t @gzwrite($fichero, $datos);\n\t\telse\n\t\t @fwrite($fichero, $datos);\n\t\t$this->escrito = true;\n\t}", "function writefiles($post){\n\n\t$personal_name=$post[\"title\"];\n\t$contents=$post[\"contents\"];\n\n $contents = nl2br($contents);\n\n $data = \"<hr>\";\n $data = $data.\"<p>投稿者:\".$personal_name.\"</p>\";\n $data = $data.\"<p>内容:</p>\";\n $data = $data.\"<p>\".$contents.\"</p>\";\n\n $keijban_file = 'test.txt';\n\n $fp = fopen($keijban_file, 'ab');\n\n if ($fp){\n if (flock($fp, LOCK_EX)){\n if (fwrite($fp, $data) === FALSE){\n print('ファイル書き込みに失敗しました');\n }\n\n flock($fp, LOCK_UN);\n }else{\n print('ファイルロックに失敗しました');\n }\n }\n\n fclose($fp);\n}", "function abrirFichero($f=\"\",$modo='rwb') {\n \tif (!empty($f) || $f!=$this->fichero) $this->fichero = $f;\n \t\n \tif (!file_exists(ZF_DIR_ERROR_LOG.$this->fichero)){\n \t\t//TODO: cambiar die por excepción + return false\n \t\tdie(printf(_(\"El fichero %s no existe\"),ZF_DIR_ERROR_LOG.$this->fichero));\n \t \t//return false;\n \t}\n\t\t\t\n\t\tif ( ! $fp = @fopen($this->ruta.DIRECTORY_SEPARATOR.$f,\"a\"))\n\t\t{\n\t\t\t//TODO: cambiar die por excepción + return false\n \t\tdie(printf(_(\"El fichero %s no se puede escribir\"),ZF_DIR_ERROR_LOG.$this->fichero));\n\t\t\t//return FALSE;\n\t\t}\n\t\treturn $fp; //Devolvemos el manejador del fichero\n }", "static public function ingresarinformacion($cadena)\r\n\t{\r\n\t\t$archivo=fopen(\"archivo.txt\",\"a\");\r\n\t\t// se anade al final del texto, la informacion proporcionada separada por comas\r\n\t\tfwrite($archivo,$cadena[0].\",\".$cadena[1].\",\".$cadena[2].\",\".$cadena[3].\",\".PHP_EOL);\r\n\t\t// se cierra el archivo\r\n\t\tfclose($archivo);\r\n\t}", "function inc_langonet_generer_fichier($module, $langue_source, $ou_langue, $langue_cible='en', $mode='index', $encodage='utf8', $oublis_inutiles=array()) {\n\tinclude_spip('inc/traduire');\n\t$bandeau = '';\n\t$var_source = \"i18n_\".$module.\"_\".$langue_source;\n\t$source = _DIR_RACINE.$ou_langue.$module.'_'.$langue_source.'.php';\n\t// Trouver dans quel cas ce fichier n'a pas deja ete inclus a ce stade\n\tif (empty($GLOBALS[$var_source])) {\n\t\tif (!file_exists($source = _DIR_RACINE.$ou_langue.$module.'_'.$langue_source.'.php'))\n\t\t\treturn array('message_erreur' => _T('langonet:message_nok_fichier_langue', array('langue' => $langue_source, 'module' => $module, 'dossier' => $ou_langue)));\n\n\t\t$GLOBALS['idx_lang'] = $var_source;\t\n\t\tinclude($source);\n\t}\n\t// Recuperer le bandeau d'origine si present.\n\tif ($file = file($source)) {\n\t\tarray_shift($file); // saute < ? php\n\t\tforeach($file as $line) {\n\t\t\t$bandeau .= $line;\n\t\t\tif (strpos($line, _LANGONET_SIGNATURE) !== false)\n\t\t\t {$file = ''; break;}\n\t\t}\n\t\tif ($file) $bandeau = '';\n\t}\n\n\t$var_cible = \"i18n_\".$module.\"_\".$langue_cible;\n\tif (empty($GLOBALS[$var_cible])) {\n\t\tif (file_exists($cible = _DIR_RACINE.$ou_langue.$module.'_'.$langue_cible.'.php')) {\n\t\t\t$GLOBALS['idx_lang'] = $var_cible;\n\t\t\tinclude($cible);\n\t\t}\n\t}\n $resultats = array('source' =>$source);\n\t$source = langonet_generer_couples($module, $var_source, $var_cible, $mode, $encodage, $oublis_inutiles);\n\n\t$dir = sous_repertoire(_DIR_TMP,\"langonet\");\n\t$dir = sous_repertoire($dir,\"generation\");\n\t$bandeau .= \"// Produit automatiquement par le plugin LangOnet a partir de la langue source $langue_source\";\n\t$ok = ecrire_fichier_langue_php($dir, $langue_cible, $module, $source, $bandeau);\n\n\tif (!$ok) {\n\t\t$resultats['message_erreur'] = _T('langonet:message_nok_ecriture_fichier', array('langue' => $langue_cible, 'module' => $module));\n\t}\n\telse {\n\t\t$resultats['fichier'] = $ok;\n\t\t$resultats['message_ok'] = _T('langonet:message_ok_fichier_genere', array('langue' => $langue_cible, 'module' => $module, 'fichier' => $ok));\n\t}\n\treturn $resultats;\n}", "function getSeoFiles($mission=array())\n\t{\n\t\t$exploded_file_paths = array_filter(explode(\"|\",$mission['documents_path']));\n\t\t$exploded_file_names = explode(\"|\",$mission['documents_name']);\n\t\t$zip = \"\";\n\t\t\n\t\t\n\t\t\n\t\t$files = '<table class=\"table\">'.$zip;\n\t\t$k=0;\n\t\tif($mission['delete']):\n\t\tforeach($exploded_file_paths as $row)\n\t\t{\n\t\t\t$file_path=$this->mission_documents_path.$row;\n\t\t\tif(file_exists($file_path) && !is_dir($file_path))\n\t\t\t{\n\t\t\t\t\t$zip = true;\n\t\t\t\t\t$fname = $exploded_file_names[$k];\n\t\t\t\t\tif($fname==\"\")\n\t\t\t\t\t\t$fname = basename($row);\n\t\t\t\t\t$ofilename = pathinfo($file_path);\n\t\t\t\t\t$files .= '<tr><td width=\"30%\">'.$fname.'</td><td width=\"35%\">'.substr($ofilename['filename'],0,-3).\".\".$ofilename['extension'].'</td><td width=\"20%\">'.formatSizeUnits(filesize($file_path)).'</td><td>SEO</td><td align=\"center\" width=\"15%\"><a href=\"/quote/download-document?type=seo_mission&mission_id='.$mission['id'].'&index='.$k.'\"><i style=\"margin-right:5px\" class=\"splashy-download\"></i></a><span class=\"delete\" rel=\"'.$k.'_'.$mission['id'].'\"> <i class=\"icon-adt_trash\"></i></span></td></tr>';\t\n\t\t\t\t\t\n\t\t\t}\n\t\t\t$k++;\n\t\t} \n\t\t\n\t\telse:\n\t\tforeach($exploded_file_paths as $row)\n\t\t{\n\t\t\t$file_path=$this->mission_documents_path.$row;\n\t\t\tif(file_exists($file_path) && !is_dir($file_path))\n\t\t\t{\n\t\t\t\t\t$zip = true;\n\t\t\t\t\t$fname = $exploded_file_names[$k];\n\t\t\t\t\tif($fname==\"\")\n\t\t\t\t\t\t$fname = basename($row);\n\t\t\t\t\t$ofilename = pathinfo($file_path);\n\t\t\t\t\t$files .= '<tr><td width=\"30%\">'.$fname.'</td><td width=\"35%\">'.substr($ofilename['filename'],0,-3).\".\".$ofilename['extension'].'</td><td width=\"20%\">'.formatSizeUnits(filesize($file_path)).'</td><td>SEO</td><td align=\"center\" width=\"15%\"><a href=\"/quote/download-document?type=seo_mission&mission_id='.$mission['id'].'&index='.$k.'\"><i style=\"margin-right:5px\" class=\"splashy-download\"></i></a></td></tr>';\t\n\t\t\t\t\t\n\t\t\t}\n\t\t\t$k++;\n\t\t} \n\t\t\n\t\tendif;\n\t\tif($zip)\n\t\t\t$zip = '<thead><tr><td colspan=\"5\"><a href=\"/quote/download-document?type=seo_mission&index=-1&mission_id='.$mission['id'].'\" class=\"btn btn-small pull-right\">Download Zip</a></td></tr></thead>';\n\t\t$files .= $zip.'</table>';\n\t\treturn $files;\n\t}", "function geraLogErro($msg)\n {\n $caminho_atual = getcwd();\n\n//muda o contexto de execução para a pasta logs\n\n $data = date(\"d-m-y\");\n $hora = date(\"H:i:s\");\n $ip = $_SERVER['REMOTE_ADDR'];\n\n//Nome do arquivo:\n $arquivo = \"LoggerErro_$data.txt\";\n\n//Texto a ser impresso no log:\n $texto = \"[$hora][$ip]> $msg \\n\";\n\n $manipular = fopen(\"$arquivo\", \"a+b\");\n fwrite($manipular, $texto);\n fclose($manipular);\n\n\n }", "function Exportar($Pft, $fullpath){\r\n global $Wxis,$xWxis,$db_path,$arrHttp,$msgstr,$separador,$wxisUrl;\r\n $query = \"&base=\" . $arrHttp[\"base\"] . \"&cipar=$db_path\".\"par/\".$arrHttp[\"cipar\"].\"&Formato=\".urlencode($Pft);\r\n if (isset($arrHttp[\"Mfn\"]) and trim($arrHttp[\"Mfn\"])!=\"\") {\r\n \t$query.=\"&Opcion=rango&Mfn=\" . $arrHttp[\"Mfn\"].\"&to=\".$arrHttp[\"to\"];\r\n }else{\r\n\t\tif (isset($arrHttp[\"Expresion\"]) and trim($arrHttp[\"Expresion\"])!=\"\"){\r\n\t\t\t$query.=\"&Opcion=buscar&Expresion=\";\r\n\t\t \t$query.= urlencode($arrHttp[\"Expresion\"]);\r\n\t\t}else if (isset($arrHttp[\"seleccionados\"])){\r\n\t\t\t$query.=\"&Opcion=seleccionados&Seleccionados=\";\r\n\t\t\t$query.=\"&Mfn=\".str_replace(\",\",\"&Mfn=\",$arrHttp[\"seleccionados\"]);\r\n }\r\n }\r\n // Write iso files always direct to disc\r\n if ($arrHttp[\"tipo\"]==\"iso\" and !isset($arrHttp[\"seleccionados\"])) $query.=\"&archivo=\".urlencode($fullpath);\r\n \t$contenido=\"\";\r\n \t$IsisScript=$xWxis.\"export_txt.xis\";\r\n \tinclude(\"../common/wxis_llamar.php\");\r\n if ($err_wxis!=\"\") die; // do no continue if there are severe errors\r\n \tif ($arrHttp[\"Accion\"]==\"P\"){ // Preview\r\n \t\t$salida=\"\";\r\n \t\t$nl=\"<br>\";\r\n \t\tforeach ($contenido as $value) $salida.=$value.$nl;\r\n \t\tif (trim($value)==$separador) $salida.=$nl.$nl;\r\n echo \"$salida\";\r\n \t\tdie;\r\n \t}\r\n \tif ($arrHttp[\"Accion\"]==\"S\" ){ // this for data not directly written to disc\r\n if ($arrHttp[\"tipo\"]==\"iso\") {// iso is only converted from array to string\r\n $salida=\"\";\r\n foreach ($contenido as $value) {\r\n $salida.=$value;\r\n }\r\n return $salida;\r\n } else {//txt requires some formatting (why?)\r\n $salida=\"\";\r\n $nl=PHP_EOL;\r\n foreach ($contenido as $value) {\r\n $salida.=$value.PHP_EOL;\r\n }\r\n if (trim($value)==$separador) $salida.=$nl.$nl;\r\n return $salida;\r\n }\r\n \t}\r\n}", "function importar_operaciones_requerimientos(){\n if ($this->input->post()) {\n $post = $this->input->post();\n $com_id = $this->security->xss_clean($post['com_id']); /// com id\n $componente = $this->model_componente->get_componente_pi($com_id);\n $fase=$this->model_faseetapa->get_fase($componente[0]['pfec_id']);\n $proyecto = $this->model_proyecto->get_id_proyecto($fase[0]['proy_id']);\n $list_oregional=$this->model_objetivoregion->list_proyecto_oregional($fase[0]['proy_id']); /// Lista de Objetivos Regionales\n $tp = $this->security->xss_clean($post['tp']); /// tipo de migracion\n\n $tipo = $_FILES['archivo']['type'];\n $tamanio = $_FILES['archivo']['size'];\n $archivotmp = $_FILES['archivo']['tmp_name'];\n\n $filename = $_FILES[\"archivo\"][\"name\"];\n $file_basename = substr($filename, 0, strripos($filename, '.'));\n $file_ext = substr($filename, strripos($filename, '.'));\n $allowed_file_types = array('.csv');\n\n if (in_array($file_ext, $allowed_file_types) && ($tamanio < 90000000)) {\n /*------------------- Migrando ---------------*/\n $lineas = file($archivotmp);\n $i=0;\n $nro=0;\n $guardado=0;\n $no_guardado=0;\n $nro_prod=count($this->model_producto->list_prod($com_id));\n if($nro_prod!=0){\n $ope_ult=$this->model_producto->ult_operacion($com_id);\n $nro_prod=$ope_ult[0]['prod_cod']+1;\n }\n else{\n $nro_prod=1;;\n }\n\n if($tp==1){ /// Actividades\n foreach ($lineas as $linea_num => $linea){ \n if($i != 0){\n $datos = explode(\";\",$linea);\n if(count($datos)==21){\n\n $cod_or = trim($datos[0]); // Codigo Objetivo Regional\n $cod_ope = $nro_prod; // Codigo Operacion\n $descripcion = utf8_encode(trim($datos[2])); //// descripcion Operacion\n $resultado = utf8_encode(trim($datos[3])); //// descripcion Resultado\n $unidad = utf8_encode(trim($datos[4])); //// Unidad\n $indicador = utf8_encode(trim($datos[5])); //// descripcion Indicador\n $lbase = utf8_encode(trim($datos[6])); //// Linea Base\n if(trim($datos[6])==''){\n $lbase = 0; //// Linea Base\n }\n\n $meta = utf8_encode(trim($datos[7])); //// Meta\n if(trim($datos[7])==''){\n $meta = 0; //// Meta\n }\n\n $var=8;\n for ($i=1; $i <=12 ; $i++) {\n $m[$i]=(float)$datos[$var]; //// Mes i\n if($m[$i]==''){\n $m[$i]=0;\n }\n $var++;\n }\n\n $mverificacion = utf8_encode(trim($datos[20])); //// Medio de verificacion\n\n $ae=0;\n $or_id=0;\n if(count($list_oregional)!=0){\n $get_acc=$this->model_objetivoregion->get_alineacion_proyecto_oregional($fase[0]['proy_id'],$cod_or);\n if(count($get_acc)!=0){\n $ae=$get_acc[0]['ae'];\n $or_id=$get_acc[0]['or_id'];\n }\n }\n\n /*--- INSERTAR DATOS OPERACIONES (ACTIVIDADES 2020) ---*/\n $query=$this->db->query('set datestyle to DMY');\n $data_to_store = array(\n 'com_id' => $com_id,\n 'prod_producto' => strtoupper($descripcion),\n 'prod_resultado' => strtoupper($resultado),\n 'indi_id' => 1,\n 'prod_indicador' => strtoupper($indicador),\n 'prod_fuente_verificacion' => strtoupper($mverificacion), \n 'prod_linea_base' => $lbase,\n 'prod_meta' => $meta,\n 'prod_unidades' => $unidad,\n 'acc_id' => $ae,\n 'prod_ppto' => 1,\n 'fecha' => date(\"d/m/Y H:i:s\"),\n 'prod_cod'=>$cod_ope,\n 'or_id'=>$or_id,\n 'fun_id' => $this->fun_id,\n 'num_ip' => $this->input->ip_address(), \n 'nom_ip' => gethostbyaddr($_SERVER['REMOTE_ADDR']),\n );\n $this->db->insert('_productos', $data_to_store);\n $prod_id=$this->db->insert_id(); \n\n for ($p=1; $p <=12 ; $p++) { \n if($m[$p]!=0){\n $this->model_producto->add_prod_gest($prod_id,$this->gestion,$p,$m[$p]);\n }\n }\n\n $producto=$this->model_producto->get_producto_id($prod_id);\n if(count($producto)!=0){\n $guardado++;\n }\n else{\n $no_guardado++;\n }\n\n $nro_prod++;\n }\n }\n $i++;\n }\n \n }\n else{ /// Requerimientos\n\n foreach ($lineas as $linea_num => $linea){\n if($i != 0){\n $datos = explode(\";\",$linea);\n //echo count($datos).'<br>';\n if(count($datos)==20){\n \n $prod_cod = (int)$datos[0]; //// Codigo Actividad\n $cod_partida = (int)$datos[1]; //// Codigo partida\n $par_id = $this->minsumos->get_partida_codigo($cod_partida); //// DATOS DE LA FASE ACTIVA\n\n $detalle = utf8_encode(trim($datos[2])); //// descripcion\n $unidad = utf8_encode(trim($datos[3])); //// Unidad\n $cantidad = (int)$datos[4]; //// Cantidad\n $unitario = $datos[5]; //// Costo Unitario\n \n $p_total=($cantidad*$unitario);\n $total = $datos[6]; //// Costo Total\n\n $var=7; $sum_temp=0;\n for ($i=1; $i <=12 ; $i++) {\n $m[$i]=$datos[$var]; //// Mes i\n if($m[$i]==''){\n $m[$i]=0;\n }\n $var++;\n $sum_temp=$sum_temp+$m[$i];\n }\n\n $observacion = utf8_encode(trim($datos[19])); //// Observacion\n $verif_cod=$this->model_producto->verif_componente_operacion($com_id,$prod_cod);\n \n //echo count($verif_cod).'--'.count($par_id).'--'.$cod_partida.'--'.round($sum_temp,2).'=='.round($total,2);\n\n if(count($verif_cod)!=0 & count($par_id)!=0 & $cod_partida!=0 & round($sum_temp,2)==round($total,2)){ /// Verificando si existe Codigo de Actividad, par id, Codigo producto\n // if($verif_cod[0]['prod_ppto']==1){ /// guardando si tiene programado presupuesto en la operacion\n $guardado++;\n /*-------- INSERTAR DATOS REQUERIMIENTO ---------*/\n $query=$this->db->query('set datestyle to DMY');\n $data_to_store = array( \n 'ins_codigo' => $this->session->userdata(\"name\").'/REQ/'.$this->gestion, /// Codigo Insumo\n 'ins_fecha_requerimiento' => date('d/m/Y'), /// Fecha de Requerimiento\n 'ins_detalle' => strtoupper($detalle), /// Insumo Detalle\n 'ins_cant_requerida' => round($cantidad,0), /// Cantidad Requerida\n 'ins_costo_unitario' => $unitario, /// Costo Unitario\n 'ins_costo_total' => $total, /// Costo Total\n 'ins_unidad_medida' => $unidad, /// Unidad de Medida\n 'ins_gestion' => $this->gestion, /// Insumo gestion\n 'par_id' => $par_id[0]['par_id'], /// Partidas\n 'ins_tipo' => 1, /// Ins Tipo\n 'ins_observacion' => strtoupper($observacion), /// Observacion\n 'fun_id' => $this->fun_id, /// Funcionario\n 'aper_id' => $proyecto[0]['aper_id'], /// aper id\n 'num_ip' => $this->input->ip_address(), \n 'nom_ip' => gethostbyaddr($_SERVER['REMOTE_ADDR']),\n );\n $this->db->insert('insumos', $data_to_store); ///// Guardar en Tabla Insumos \n $ins_id=$this->db->insert_id();\n\n /*--------------------------------------------------------*/\n $data_to_store2 = array( ///// Tabla InsumoProducto\n 'prod_id' => $verif_cod[0]['prod_id'], /// prod id\n 'ins_id' => $ins_id, /// ins_id\n );\n $this->db->insert('_insumoproducto', $data_to_store2);\n /*----------------------------------------------------------*/\n\n for ($p=1; $p <=12 ; $p++) { \n if($m[$p]!=0 & is_numeric($unitario)){\n $data_to_store4 = array(\n 'ins_id' => $ins_id, /// Id Insumo\n 'mes_id' => $p, /// Mes \n 'ipm_fis' => $m[$p], /// Valor mes\n );\n $this->db->insert('temporalidad_prog_insumo', $data_to_store4);\n }\n }\n // }\n\n }\n \n\n } /// end dimension (22)\n } /// i!=0\n\n $i++;\n\n }\n\n /// --- ACTUALIZANDO MONEDA PARA CARGAR PRESUPUESTO\n $this->update_ptto_operaciones($com_id);\n } /// end else\n\n $this->session->set_flashdata('success','SE REGISTRARON '.$guardado.' REQUERIMIENTOS');\n redirect('admin/prog/list_prod/'.$com_id.'');\n }\n else{\n $this->session->set_flashdata('danger','SELECCIONE ARCHIVO ');\n redirect('admin/prog/list_prod/'.$com_id.'');\n }\n }\n else{\n echo \"Error !!\";\n }\n }", "function filets_sep_installe_dist() {\n//cs_log('filets_sep_installe_dist()');\n\tinclude_spip('inc/texte');\n\t// Tester si on echappe en span ou en div\n\t$mode = preg_match(',<('._BALISES_BLOCS.'|p)(\\W|$),iS', _FILETS_SEP_BALISE_DEBUT)?'div':'span';\n\t$bt = defined('_DIR_PLUGIN_PORTE_PLUME');\n\t$filets = array();\n\t// filets numeriques\n\tfor($i=0; $i<=_FILETS_SEP_MAX_CSS; $i++) {\n\t\t$filets[6][] = $i;\n\t\t$filets[1][\"$i\"] = cs_code_echappement(_FILETS_SEP_BALISE_DEBUT.\" class='filet_sep filet_sep_$i'\"._FILETS_SEP_BALISE_FIN, '', $mode);\n\t}\n\t// filets image\t\n\t$path = find_in_path('img/filets');\n\t$dossier = opendir($path);\n\tif($path) while ($image = readdir($dossier)) {\n\t\tif (preg_match(',^(([a-z0-9_-]+)'._FILETS_REG_EXT.'),', $image, $reg)) {\n\t\t\t$filets[0][] = '__'.$reg[1].'__';\n\t\t\t$filets[6][] = preg_quote($reg[1]);\n\t\t\t$filets[2][] = $reg[2];\n\t\t\tlist(,$haut) = @getimagesize($path.'/'.$reg[1]);\n\t\t\tif ($haut) $haut=\"height:{$haut}px;\";\n\t\t\t$f = url_absolue($path).'/'.$reg[1];\n\t\t\t$filets[1][$reg[1]] = cs_code_echappement(_FILETS_SEP_BALISE_DEBUT.\" class=\\\"filet_sep filet_sep_image\\\" style=\\\"$haut background-image: url($f);\\\"\"._FILETS_SEP_BALISE_FIN, '', $mode);\n\t\t\tif($bt)\n\t\t\t\t$filets[4]['filet_'.str_replace('.','_',$reg[1])] = $reg[1];\n\t\t}\n\t}\n\t// RegExpr finale\n\t$filets[6] = _FILETS_REG_DEBUT . join('|', $filets[6]) . _FILETS_REG_FIN;\n\tif($bt) for($i=0; $i<=_FILETS_SEP_MAX_CSS; $i++)\n\t\t$filets[5]['filet_'.$i] = $i;\n\treturn array($filets);\n}", "public function Escribir($filePath, $personaRecibida)\n {\n\n // -> primero lo tenemos que leer\n\n try {\n if (!(isset($filePath))) {\n throw new Exception('No se recibió path al archivo');\n echo \"entro\";\n } else if (!(file_exists($filePath))) {\n throw new Exception('El directorio no existe');\n } else {\n $this->filePath = $filePath;\n }\n\n // Leo el archivo\n $this->filePointer = fopen($this->filePath, 'r');\n\n if (filesize($this->filePath) < 1){\n $this->fileSize = 5;\n }\n else{\n $this->fileSize = filesize($this->filePath);\n }\n $this->fileJson = fread($this->filePointer, $this->fileSize);\n $this->fileArrayPersonas = json_decode($this->fileJson) ?? array();\n fclose($this->filePointer);\n\n //Modifico el array\n array_push($this->fileArrayPersonas,$personaRecibida);\n\n // //Escribo el archivo\n $this->filePointer = fopen($this->filePath, 'w');\n $this->fileCaracteresEscritos = fwrite($this->filePointer, json_encode($this->fileArrayPersonas));\n fclose($this->filePointer);\n\n return $this->fileCaracteresEscritos;\n } catch (Exception $e) {\n return $e->getMessage() . \"<br>\";\n }\n\n\n\n /* \n * -> segundo decodificar ese .json para convertirlo \n * a un array de objetos\n * \n * -> tercero cerramos el archivo\n * \n * -> cuarto hacemos llamamos a la funcion \n * array_push($array que leimos, $personas que nos mandaron lo pisamos)\n */\n }", "public function writeFile()\n {\n $files = App::get('database')->selectAll('files');\n //if we already have records, don't proceed\n if (count($files) > 0) {\n return $files;\n }\n\n // read txt file\n $file = fopen($this->getFilePath(), \"r\") or die(\"Unable to open file!\");\n\n // Output one line until end-of-file\n while (!feof($file)) {\n $line = fgets($file);\n //delete any spaces\n $line = trim($line);\n //delete some characters\n $line = str_replace(\"C:\\\\\", \"\", $line);\n //change backslash to slash\n $line = str_replace(\"\\\\\", \"/\", $line);\n //get path parts from the string\n $pathParts = pathinfo(\"$line\");\n //split line by comma\n $dirsAndFiles = explode(\"/\", $pathParts['dirname']);\n $lastID = null;\n $count = 0;\n while (count($dirsAndFiles) > 0) {\n $dirOrFile = array_shift($dirsAndFiles);\n //store the dir or file in the database and return the id of the last inserted row\n //this ID is the parent_id of the next row\n\n $lastID = $this->storeDirOrFileInDB($dirOrFile, Constants::FOLDER, $lastID, $count);\n $count++;\n }\n if (isset($pathParts['extension'])) {\n // this is a file, cos it has an extension\n $this->storeDirOrFileInDB($pathParts['basename'], Constants::FILE, $lastID, $count);\n }\n }\n fclose($file);\n }", "public function Tutores(){\n if (isset($_FILES['file'])) {\n if (($gestor = fopen($_FILES['file']['tmp_name'], \"r\")) !== FALSE) {\n $coun = 0 ;\n\n while (($datos = fgetcsv($gestor, 1000, \";\")) !== FALSE) {\n if ($coun!=0) { \n $dato = explode('-',$datos['9']);\n $rut = $dato['0'];\n $dv = $dato['1'];\n $tutor=$datos['10'];\n $asignatura=$datos['11']; \n }\n $coun= $coun + 1;\n fclose($gestor);\n\n }\n $user = $this->session->userdata('logged_in');\n if(count($user['permisos']) > 0){\n if (in_array(1, $user['permisos'])) {\n redirect('Asesor_Controller/importar','refresh');\n }elseif (in_array(2, $user['permisos'])) {\n redirect('Asistente_Controller/importar','refresh');\n }\n }\n }\n }\n }", "public function guardarMatriz($nombreArchivo,$idUsuario,$contenidoArchivo){\n $path=\"../../reportesUsuario/\".$nombreArchivo.\".html\"; \n if(is_dir($path)){\n echo \"procedimiento para guardar\";\n $gestor=fopen($path,\"r+\");\n }else{\n echo \"El directorio especificado no es un Directorio Valido\";\n }\n }", "function ferme_fichier($id_fichier) {\n\t\t fclose($id_fichier);\n}", "private function _agregarArchivosPostulacionPractica($file, $id_arch_lp, $id_practica, $titulo, $id_seg_arch = NULL) {\n $_objArchivoSe = new DAO_RelArchivosSeguimiento();\n $id_archivo = NULL;\n if (!empty($id_seg_arch)) {// modificar el archivo subido\n $_objArchivoSe->set_id_seg_arc($id_seg_arch);\n $_objArchivoSe->consultar();\n $id_archivo = $_objArchivoSe->get_id_archivos();\n }\n $_objArchivoSe->set_id_arch_lp($id_arch_lp);\n try {\n $this->_validarArchivo($file);\n $_objArchivo = $this->_guardarArchivo($file, $id_archivo);\n } catch (ControladorArchivosException $e) {\n throw new ControllerException($e->getMessage());\n }\n $arrSeguimiento = $this->_agregarSeguimiento($id_practica, $titulo);\n $_objArchivoSe->set_id_archivos($_objArchivo->get_id_archivo());\n $_objArchivoSe->set_id_segui($arrSeguimiento['id_segui']);\n $_objArchivoSe->set_estado_archivo(1);\n if (!$_objArchivoSe->guardar()) {\n $this->_mensaje = $_objArchivoSe->getMysqlError();\n throw new ControllerException(\"No se pudo actualizar vinculacion de archivo a practica\");\n }\n $this->_guardarLog($_SESSION['id_usu_cent'], ['accion' => 'insertar', 'metodo' => get_class() . ':_agregarArchivosPostulacionPractica', 'parametros' => ['file' => $file['name'], 'id_arch_lp' => $id_arch_lp, 'id_practica' => $id_practica, 'titulo' => $titulo, 'id_seg_arch' => $id_seg_arch]]);\n return $_objArchivoSe->getArray();\n }", "function saveTxT($chatId, $from, $message){\r\r\n $myfile = \"fichero.txt\";\r\r\n //$fichero = file_get_contents($myfile);\r\r\n $txt = $chatId.\"-\".$message.\"-\".$from. \" \\n\";\r\r\n //$fichero.= $txt;\r\r\n\r\r\n file_put_contents($myfile, $txt, FILE_APPEND | LOCK_EX); \r\r\n \r\r\n}", "function csv($fichier, $meteocode, $date, $code)\n{\n $lines2 = file($fichier);\n\n $id = $meteocode;\n // Affiche toutes les lignes du tableau comme code HTML, avec les numéros de ligne\n foreach($lines2 as $line_num2 => $line2)\n {\n $chaine2 = htmlspecialchars($line2);\n\n if(strpos($chaine2, $date['aa'] . '-' . $date['mm'] . '-' . $date['jj']))\n {\n /* * *************************************************\n * À regler le probleme de .0 dans la ligne suivante *\n * ************************************************** */\n\n if(strstr($chaine2, $id . '.0_' . $code . '_'))\n {\n $text = strpbrk($chaine2, '2');\n $x = strpos($text, 'v', 32);\n $lien = substr($text, 0, $x + 1);\n $parametre = substr($lien, -6, -4);\n switch($parametre)\n {\n case 'CC':$lien_cc = $lien;\n break;\n case 'PA':$lien_pa = $lien;\n break;\n case 'OP':$lien_pop = $lien;\n break;\n case 'TA':$lien_ta = $lien;\n break;\n case 'TD':$lien_td = $lien;\n break;\n case 'WS':$lien_ws = $lien;\n break;\n }\n }\n }\n }\n $lien_csv = array(\n 'lien_cc' => $lien_cc,\n 'lien_pa' => $lien_pa,\n 'lien_pop' => $lien_pop,\n 'lien_ta' => $lien_ta,\n 'lien_td' => $lien_td,\n 'lien_ws' => $lien_ws,\n );\n return($lien_csv);\n}", "public function AddFile($asFile = null)\n\t{\n $config = Config::GetInstance();\n\t\t$this->_File = $asFile;\n\t\tif($this->_File != null){\n\t\t\t$CarpetaFicheros = $config->get(\"Ruta\").'app/contenidos/proyectos/';\n\t\t\tcheckCarpeta($CarpetaFicheros);\n\t\t\tcheckCarpeta($CarpetaFicheros.$this->IdProyecto);\n\t\t\t$Nombrefichero = $this->IdProyecto.'/'.getToken(4).\"_\".normaliza($this->_File['name']);\n\t\t\t$ficheroFinal = $CarpetaFicheros.$Nombrefichero;\n\n\t\t\tif (move_uploaded_file($this->_File['tmp_name'], $ficheroFinal)) {\n\t\t\t\t// Guardarlo en la BD\n\t\t\t\t$this->Ruta = $Nombrefichero;\n\t\t\t}else{\n\t\t\t\t$this->Ruta = null;\n\t\t\t}\n\t\t}\n\t}", "public function bajarArchivos()\n {\n $anio = date('Y');\n ////$mes = (int)date('m')-1;\n\n $mes = (int) date('m')-(int)\\Config::get('constants.constantes.mes_proceso');\n if($mes == 0){\n $anio = $anio - 1;\n $mes = 1;\n } \n\n ini_set('max_execution_time', 0);\n ini_set('memory_limit', '-1');\n ini_set('default_socket_timeout', 600);\n ini_set('upload_max_filesize ', '40M');\n ini_set('post_max_size ', '40M');\n \n $empresas = Empresa::all()->sortBy(\"codigo\");\n\n //Ver con tavo como seria la query para no traer TODOS\n\n $i=0;\n $msg=\"\";\n foreach ($empresas as $empresa) {\n //Veo si existe un procesamiento para el anio, mes, codigo\n //$existeProcesamientoArchivoFinalizado = ProcesamientoArchivo::where('anio','=',$anio)->where('mes','=',$mes)->where('codigo','=', $empresa->codigo)->where('estado','=', 'Finalizado')->count();\n $existeProcesamientoArchivoFinalizado = $this->procesamientoArchivoRepository->existeProcesamientoArchivoPorEstado($anio, $mes, $empresa->codigo, \"Fin bajada de archivo\");\n if($existeProcesamientoArchivoFinalizado == 0){\n //if($i<4 && $empresa->codigo!=\"YPF\"){\n if($i<6){\n $i++;\n $this->procesamientoArchivoRepository->crearProcesamientoArchivoEstado($anio, $mes, $empresa->codigo, \"Inicio bajada de archivo\", \"\", $empresa->id);\n\n $PozoService = new PozoService($anio, $empresa->codigo, $mes);\n \\Log::info('init descarga');\n $nombreArchivo = $anio.\"-\".$mes.\"-\".$empresa->codigo.\"-ddjj.xlsx\";\n\n $msg.=\"Codigo empresa bajado ==> \".$empresa->codigo;\n\n $excel = $PozoService->processPozos($nombreArchivo);\n \\Log::info('fin descarga');\n \n $this->procesamientoArchivoRepository->crearProcesamientoArchivoEstado($anio, $mes, $empresa->codigo, \"Fin bajada de archivo\", \"Pendiente\", $empresa->id);\n if($excel == \"\"){\n $msg.=\" ==> No existe excel para esta empresa en este mes.\";\n $this->procesamientoArchivoRepository->crearProcesamientoArchivoEstado($anio, $mes, $empresa->codigo, \"No hay DDJJ (sin Excel)\", \"\", $empresa->id); \n } \n $msg.=\"<br>\";\n }\n }\n } \n\n if($i==0)\n echo \"No quedan archivos por bajar este mes\";\n else\n echo \"Se bajaron \".$i.\" archivos. \".$msg.\" Aun quedan archivos por bajar\";\n }", "public function salvarArquivo($nomeArquivo, $valor) {\n\t\t$fh = fopen($nomeArquivo, 'w') or die(\"can't open file\");\n\t\tfwrite($fh, $valor);\n\t\tfclose($fh);\n\t}", "function writeIngredientsToFile(){\n global $IngredientList; \n $file = 'datafile.txt';\n $current = file_get_contents($file);\n\n foreach($IngredientList as $ingredient) {\n $current .= $ingredient->amount . \" \" . $ingredient->measure . \" \" . $ingredient->item . \" \" . $ingredient->cost . \"\\n\";\n }\n \n file_put_contents($file, $current);\n}", "public function TutoresPermanentes(){\n if (isset($_FILES['file'])) {\n if (($gestor = fopen($_FILES['file']['tmp_name'], \"r\")) !== FALSE) {\n $coun = 0 ;\n \n\n while (($datos = fgetcsv($gestor, 1000, \";\")) !== FALSE) {\n \n if ($coun!=0) {\n $dato = explode('-',$datos['1']);\n $nombre=$datos['0'];\n $rut = $dato['0'];\n $dv = $dato['1'];\n $email=$datos['2'];\n $area=$datos['3']; \n }\n $coun= $coun + 1;\n fclose($gestor);\n }\n $user = $this->session->userdata('logged_in');\n if(count($user['permisos']) > 0){\n if (in_array(1, $user['permisos'])) {\n redirect('Asesor_Controller/importar','refresh');\n }elseif (in_array(2, $user['permisos'])) {\n redirect('Asistente_Controller/importar','refresh');\n }\n }\n }\n }\n\n }", "function cargar_archivo($data) {\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"init\">\r\n $ruta = $data[\"archivo\"];\r\n $tipo_archivo = $data[\"tipo_archivo\"];\r\n $lectura = false;\r\n $buffer = array();\r\n $canalTemp = \"\";\r\n $indicadorTemp = \"\";\r\n $fechaTemp = \"\";\r\n $horaInicioTemp = \"\";\r\n $horaFinTemp = \"\";\r\n $descripcionTemp = \"\";\r\n // </editor-fold>\r\n\r\n try {\r\n $archivo = new SplFileObject($ruta, \"r\");\r\n } catch (Exception $exc) {\r\n throw new Exception(\"No se pudo cargar el archivo.\");\r\n echo $exc->getTraceAsString();\r\n }\r\n\r\n switch ($tipo_archivo) {\r\n case self::tipo_archivo_emisiones:\r\n if (isset($archivo)) {\r\n foreach ($archivo as $linea) {\r\n $valores = explode(\"|\", $linea);\r\n if ($this->limpiar_valores($valores[0]) == \"Channel\") {\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"comprobar estructura de archivo\">\r\n if (\r\n $this->limpiar_valores($valores[0]) != \"Channel\" ||\r\n $this->limpiar_valores($valores[1]) != \"Date\" ||\r\n $this->limpiar_valores($valores[2]) != \"Description\" ||\r\n $this->limpiar_valores($valores[4]) != \"Start time\" ||\r\n $this->limpiar_valores($valores[5]) != \"End time\" ||\r\n $this->limpiar_valores($valores[8]) != \"Target\\Variable\" ||\r\n $this->limpiar_valores($valores[9]) != \"SHR %\" ||\r\n $this->limpiar_valores($valores[10]) != \"AMR\" ||\r\n $this->limpiar_valores($valores[11]) != \"AMR %\" ||\r\n $this->limpiar_valores($valores[12]) != \"RCH [Not cons. - TH: 0min.]\" ||\r\n $this->limpiar_valores($valores[13]) != \"ATS\"\r\n ) {\r\n throw new Exception(\"Estructura de archivo Inválida\");\r\n }\r\n // </editor-fold>\r\n $lectura = true;\r\n }\r\n if ($lectura) {\r\n if (isset($valores[1])) {\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"Canal\">\r\n if ($this->limpiar_canal($valores[0]) != \"\") {\r\n $valores[0] = $this->limpiar_canal($valores[0]);\r\n $canalTemp = $valores[0];\r\n } else {\r\n $valores[0] = $canalTemp;\r\n }\r\n // </editor-fold>\r\n // // <editor-fold defaultstate=\"collapsed\" desc=\"Fecha\">\r\n if (isset($valores[1]) && $valores[1] != \"\") {\r\n $valores[1] = $this->formatea_fecha($valores[1]);\r\n $fechaTemp = $valores[1];\r\n } else {\r\n $valores[1] = $fechaTemp;\r\n }\r\n // </editor-fold>\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"descripcion programa\">\r\n if ($this->limpiar_canal($valores[2]) != \"\") {\r\n $valores[2] = $this->limpiar_canal($valores[2]);\r\n $descripcionTemp = $valores[2];\r\n } else {\r\n $valores[2] = $descripcionTemp;\r\n }// </editor-fold>\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"hora inicio\">\r\n if ($this->limpiar_canal($valores[4]) != \"\") {\r\n $valores[4] = $this->limpiar_canal($valores[4]);\r\n $horaInicioTemp = $valores[4];\r\n } else {\r\n $valores[4] = $horaInicioTemp;\r\n }\r\n // </editor-fold>\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"hora fin\">\r\n if ($this->limpiar_canal($valores[5]) != \"\") {\r\n $valores[5] = $this->limpiar_canal($valores[5]);\r\n $horaFinTemp = $valores[5];\r\n } else {\r\n $valores[5] = $horaFinTemp;\r\n }\r\n // </editor-fold>\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"valores indicadores\">\r\n $valores[8] = $this->limpiar_canal($valores[8]); // indicador\r\n $valores[9] = $this->limpiar_valores($valores[9]); //shr %\r\n $valores[10] = $this->limpiar_valores($valores[10]); //amr\r\n $valores[11] = $this->limpiar_valores($valores[11]); //amr %\r\n $valores[12] = $this->limpiar_valores($valores[12]); //rch\r\n $valores[13] = $this->limpiar_valores($valores[13]); //ats\r\n // </editor-fold>\r\n array_push($buffer, $valores);\r\n }\r\n }\r\n }\r\n } else {\r\n throw new Exception(\"No se pudo cargar el archivo\");\r\n }\r\n break;\r\n case self::tipo_archivo_totales:\r\n if (isset($archivo)) {\r\n foreach ($archivo as $linea) {\r\n $valores = explode(\"|\", $linea);\r\n if ($this->limpiar_valores($valores[0]) == \"Channel\") {\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"comprobar estructura de archivo\">\r\n if (\r\n $this->limpiar_valores($valores[0]) != 'Channel' ||\r\n $this->limpiar_valores($valores[1]) != 'Target' ||\r\n $this->limpiar_valores($valores[3]) != 'Date\\Variable' ||\r\n $this->limpiar_valores($valores[4]) != 'SHR %' ||\r\n $this->limpiar_valores($valores[5]) != 'AMR' ||\r\n $this->limpiar_valores($valores[6]) != 'AMR %' ||\r\n $this->limpiar_valores($valores[7]) != 'RCH [Not cons. - TH: 0min.]' ||\r\n $this->limpiar_valores($valores[8]) != 'ATS'\r\n ) {\r\n throw new Exception(\"Estructura de archivo Inválida\");\r\n }\r\n // </editor-fold>\r\n\r\n $lectura = true;\r\n }\r\n if ($lectura) {\r\n /* Verificando que la linea está completa */\r\n if (isset($valores[1])) {\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"Canal\">\r\n if ($this->limpiar_canal($valores[0]) != \"\") {\r\n $valores[0] = $this->limpiar_canal($valores[0]);\r\n $canalTemp = $valores[0];\r\n } else {\r\n $valores[0] = $canalTemp;\r\n }\r\n // </editor-fold>\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"Indicador\">\r\n if ($this->limpiar_canal($valores[1]) != \"\") {\r\n $valores[1] = $this->limpiar_canal($valores[1]);\r\n $indicadorTemp = $valores[1];\r\n } else {\r\n $valores[1] = $indicadorTemp;\r\n }\r\n // </editor-fold>\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"Fecha\">\r\n if (isset($valores[3])) {\r\n $valores[3] = $this->formatea_fecha($valores[3]);\r\n $fechaTemp = $valores[3];\r\n } else {\r\n $valores[3] = $fechaTemp;\r\n }\r\n // </editor-fold>\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"Valores indicador\">\r\n $valores[4] = $this->limpiar_valores($valores[4]);\r\n $valores[5] = $this->limpiar_valores($valores[5]);\r\n $valores[6] = $this->limpiar_valores($valores[6]);\r\n $valores[7] = $this->limpiar_valores($valores[7]);\r\n $valores[8] = $this->limpiar_valores($valores[8]);\r\n // </editor-fold>\r\n array_push($buffer, $valores);\r\n }\r\n }\r\n }\r\n /* Elimino la fila de encabezado */\r\n } else {\r\n throw new Exception(\"No se pudo cargar el archivo\");\r\n }\r\n break;\r\n case self::tipo_archivo_medias_horas:\r\n if (isset($archivo)) {\r\n foreach ($archivo as $linea) {\r\n $valores = explode(\"|\", $linea);\r\n if ($this->limpiar_valores($valores[0]) == \"Month\") {\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"comprobar estructura de archivo\">\r\n if (\r\n $this->limpiar_valores($valores[1]) != 'Date' ||\r\n $this->limpiar_valores($valores[2]) != 'Channel' ||\r\n $this->limpiar_valores($valores[3]) != 'Target' ||\r\n $this->limpiar_valores($valores[4]) != 'Day Part\\Variable' ||\r\n $this->limpiar_valores($valores[5]) != 'SHR %' ||\r\n $this->limpiar_valores($valores[6]) != 'AMR' ||\r\n $this->limpiar_valores($valores[7]) != 'AMR %' ||\r\n $this->limpiar_valores($valores[8]) != 'RCH [Not cons. - TH: 0min.]' ||\r\n $this->limpiar_valores($valores[9]) != 'ATS'\r\n ) {\r\n throw new Exception(\"Estructura de archivo Inválida\");\r\n }\r\n // </editor-fold>\r\n\r\n $lectura = true;\r\n }\r\n if ($lectura) {\r\n /* Verificando que la linea está completa */\r\n if (isset($valores[1])) {\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"Fecha\">\r\n if (isset($valores[1]) && $valores[1] != \"\") {\r\n $valores[1] = $this->formatea_fecha($valores[1]);\r\n $fechaTemp = $valores[1];\r\n } else {\r\n $valores[1] = $fechaTemp;\r\n }\r\n // </editor-fold>\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"Canal\">\r\n if ($this->limpiar_canal($valores[2]) != \"\") {\r\n $valores[2] = $this->limpiar_canal($valores[2]);\r\n $canalTemp = $valores[2];\r\n } else {\r\n $valores[2] = $canalTemp;\r\n }\r\n // </editor-fold>\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"Indicador\">\r\n if ($this->limpiar_canal($valores[3]) != \"\") {\r\n $valores[3] = $this->limpiar_canal($valores[3]);\r\n $indicadorTemp = $valores[3];\r\n } else {\r\n $valores[3] = $indicadorTemp;\r\n }\r\n // </editor-fold>\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"Valores indicador\">\r\n $valores[4] = $this->limpiar_valores($valores[4]);\r\n $valores[5] = $this->limpiar_valores($valores[5]);\r\n $valores[6] = $this->limpiar_valores($valores[6]);\r\n $valores[7] = $this->limpiar_valores($valores[7]);\r\n $valores[8] = $this->limpiar_valores($valores[8]);\r\n $valores[9] = $this->limpiar_valores($valores[9]);\r\n // </editor-fold>\r\n array_push($buffer, $valores);\r\n }\r\n }\r\n }\r\n /* Elimino la fila de encabezado */\r\n } else {\r\n throw new Exception(\"No se pudo cargar el archivo\");\r\n }\r\n break;\r\n default :\r\n throw new Exception(\"Operacion invalida\");\r\n break;\r\n }\r\n /* Elimino encabezado de tabla */\r\n unset($buffer[0]);\r\n return $buffer;\r\n }", "private static function archiveFile($file)\n {\n if (empty(self::$maxLines) || !file_exists($file)) {\n return;\n }\n\n $contents = file_get_contents($file);\n $lines = explode(\"\\n\", $contents);\n\n if (count($lines) <= self::$maxLines) {\n return;\n }\n\n if (!empty(self::$archive)) {\n $archivedFile = dirname($file).'/'.basename($file).'.'.date('Y-m-d_H-i-s').'.gz';\n\n if ($fp = gzopen($archivedFile, 'wb')) {\n if (gzwrite($fp, $contents)) {\n gzclose($fp);\n file_put_contents($file, '');\n } else {\n gzclose($fp);\n }\n }\n\n if (!empty(self::$maxArchives)) {\n $archives = glob(dirname($file).'/'.basename($file).'.*.gz');\n if (!empty($archives) && count($archives) > self::$maxArchives) {\n $removeCount = count($archives) - self::$maxArchives;\n if ($removeCount) {\n for ($i = 0; $i < $removeCount; $i++) {\n if (file_exists($archives[$i])) {\n unlink($archives[$i]);\n }\n }\n }\n }\n }\n } else {\n $newContent = implode(\"\\n\", array_slice($lines, -(self::$maxLines)));\n file_put_contents($file, $newContent);\n }\n }", "function saveMan(array &$csvman, string $address): void {\n if (file_exists($address)) { //ensure file exists\n $file = fopen($address, 'w'); //open file\n $i = 0; //initialize incrementer\n for (; $i < count($csvman); $i++) { //loop through\n fputcsv($file, $csvman[$i], '|'); //rewrite each line\n }\n fclose($file); //close file\n } else {\n echo \"File \\\"\" . $address . \"\\\" not found.\"; //if file doesn't exist...\n die(); //die\n }\n}", "public function createTextFile($filename, $content = \"\")\r\n {\r\n $fs = new Filesystem();\r\n $folder = $this->destination_dir;\r\n\r\n try {\r\n $fs->exists($folder) ? false : $fs->mkdir($folder, 0775 );\r\n $fs->exists($folder.'/'.$filename) ? false : $fs->dumpFile($folder.'/'.$filename, $content);\r\n\r\n } catch (IOExceptionInterface $e) {\r\n echo \"An error occurred while creating your directory at \".$e->getPath();\r\n }\r\n }", "public function addFileToBasket()\n {\n\n /*$header = $this->file->getHeader();\n if($header !== array('type','title','isbn','price','authors')){\n throw new Exception('File header is not correct');\n }*/\n\n $data = $this->getFileData();\n\n foreach ($data as $key => $value) {\n $bookFactory = new BookFactory();\n $book = $bookFactory->makeBook($value['title'], $value['authors'], $value['isbn'], $value['price'], $value['type']);\n\n $this->basket->addBook($book);\n }\n }", "public function crearPlano($archivo, $titulo, $datos, $separador) {\r\n /**\r\n * crea el texto a escribir\r\n */\r\n $alto = sizeof($datos);\r\n $largo = sizeof($datos[0]);\r\n $largotitulo = sizeof($titulo);\r\n $texto = '';\r\n\r\n /**\r\n * crea los titulos del archivo si no existe\r\n */\r\n if (!file_exists($archivo)) {\r\n for ($j = 0; $j < $largotitulo; $j++)\r\n $texto .= trim($titulo[$j]) . $separador;\r\n $texto .= \"\\n\";\r\n }\r\n /**\r\n * crea el texto a escribir\r\n */\r\n for ($i = 0; $i < $alto; $i++) {\r\n for ($j = 0; $j < $largo; $j++)\r\n $texto .= trim($datos[$i][$j]) . $separador;\r\n $texto .= \"\\n\";\r\n }\r\n\r\n /**\r\n * abre la conexion con el archivo\r\n */\r\n $link = fopen($archivo, \"a\");\r\n\r\n /**\r\n * escribre en el archivo\r\n */\r\n fwrite($link, $texto);\r\n\r\n /**\r\n * cierra el archivo\r\n */\r\n fclose($link);\r\n }", "public function salva($nome,$cartella,$dimensione=16000,$estensioni='',$sovrascrivere=''){\n\t\tif(substr($cartella, -1)!='/'){\n\t\t\t$cartella=$cartella.'/';\n\t\t}\n\t\t\n\t\tif($cartella[0]!='/'){\n\t\t\t$cartella='/'.$cartella;\n\t\t}\n\n\t\tif($dimensione=='') $dimensione=16000;\n\t\t\n\t\t//Se il file è stato passato\n\t\tif($_FILES[$nome]['name']!==''){\n\t\t\t$estensioniarray=explode(',,',strtolower($estensioni));\n\t\t\t$estensione = pathinfo($_FILES[$nome]['name']);\n\t\t\t$estensione=strtolower($estensione['extension']);\n\t\t\t\n\t\t\tif($estensioni=='' || in_array($estensione,$estensioniarray))\n\t\t\t{\n\t\t\t\tif(($_FILES[$nome][\"size\"] < ($dimensione*1000)))\n\t\t\t\t{\n\t\t\t\t\tif($_FILES[$nome][\"error\"] > 0){\n\t\t\t\t\t\n\t\t\t\t\t\techo \"Errore file: \".$_FILES[$nome][\"error\"].\"<br />\";\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\n\t\t\t\t\t\t$nomefileOG=str_replace(' ','-',str_replace(\"'\",\"_\",$_FILES[$nome][\"name\"]));\n\t\t\t\t\t\t$nomefile=$nomefileOG;\n\t\t\t\t\t\t$tipofile=$_FILES[$nome][\"type\"];\n\t\t\t\t\t\t$dimensionefile=($_FILES[$nome][\"size\"] / 1024);\n\t\t\t\t\t\t$nometemporaneofile=$_FILES[$nome][\"tmp_name\"];\n\t\t\t\t\t\t$cartella=$_SERVER['DOCUMENT_ROOT'].$cartella;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(!is_dir($cartella)){\n\t\t\t\t\t\t\t\tmkdir($cartella,0777);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//Creo un duplicato se il file non è da riscrivere\t\t\t\t\t\t\t\n\t\t\t\t\t\tif($sovrascrivere!=='' || $sovrascrivere!=='si' || $sovrascrivere=='no'){\n\t\t\t\t\t\t\t$n=0;\n\t\t\t\t\t\t\tfor($i=0;$n<1;$i++){\n\t\t\t\t\t\t\t\tif(file_exists($cartella.$nomefile)){\n\t\t\t\t\t\t\t\t\t$nomeseparato=explode('.',$nomefileOG);\n\t\t\t\t\t\t\t\t\t$nomefile=$nomeseparato[0].'_'.$i.'.'.$nomeseparato[1];\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t$n=1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//}else{\n\t\t\t\t\t\t\n\t\n\t\t\t\t\t\t\tmove_uploaded_file($_FILES[$nome][\"tmp_name\"],$cartella.$nomefile);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\treturn $nomefile;\n\t\t\t\t\t\t//}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\techo 'File troppo grande! Dimensione massima: '.$dimensione.'kb';\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\n\t\t\t}else{\n\t\t\t\tsort($estensioniarray);\n\t\t\t\techo 'Tipo file non valido. Estensioni consentite: '.($estensioni!=''?'.'.implode(' .',$estensioniarray):NULL);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "private function createFile($salariesArray)\n {\n $fileName =self::FILE_NAME.$this->_currentDate;\n $x = FormatterFactory::createFormatter(\"csv\",$fileName);\n $x->format($salariesArray);\n }", "function charge_fichier($path, $file) {\n\t$id_t = ouvrir_fichier($file, $path, \"r\");\n\n\t$car = \"\";\t\n\twhile (!feof($id_t)) {\n\t\t$car .= fgetc($id_t);\n\t}\t\n\n\tferme_fichier($id_t);\n\treturn ($car);\n}", "function opcion__compilar_perfiles()\n {\n $param = $this->get_parametros();\n $id = isset($param[\"-p\"]) ? $param[\"-p\"] : $this->get_id_proyecto_actual(true);\n\n try {\n $proyecto = $this->get_proyecto($id);\n $path = $proyecto->get_dir_generales_compilados();\n if (!\\file_exists($path) || !\\is_writable($path)) {\n $this->consola->error('ATENCION!!: Considere ejecutar el comando compilar para abarcar todos los metadatos'. PHP_EOL);\n throw new toba_error('No existe o no es accesible la carpeta de metadatos compilados!!'. PHP_EOL);\n }\n toba_manejador_archivos::crear_arbol_directorios($path);\n $proyecto->compilar_metadatos_generales_grupos_acceso(true);\n } catch ( toba_error $e ) {\n\t\t$this->consola->error( \"PROYECTO $id: Ha ocurrido un error durante la compilacion:\\n\".$e->getMessage());\n exit(-1);\n }\n }", "function salva()\n\t{\n\t\trestauraConObj($this->mapa,$this->postgis_mapa);\n\t\t$this->mapa->save($this->arquivo);\n\t}", "function echo_fileFiltered(\n\t$folder='issnltables', // name of the folder produced by unzip issnltables.zip\n\t$MAX = 200, // 0 (for ALL) or number of items for sample.\n\t$table='issn.intcode', // name of the table that will be the recipient of \"echoated data\"\n\t$frag=90000 // number of records per fragment, important to avoid some \"psql overflow\"\n\t//$biggertham = 1715000 // check if bigger tham last\n) {\n\techo \"\\n---debug $folder\\n\";\n\t$fnames = \"$folder/*.ISSN-to-ISSN-L.txt\";\n\t$fs = glob($fnames);\n\tif (count($fs)!=1) die(\"\\nERROR: check $fnames.\\n\");\n\tif (preg_match('|/((\\d\\d\\d\\d)(\\d\\d)(\\d\\d).+\\.txt)$|',$fs[0],$m)) {\n\t\t$filename = $m[1];\n\t\t$dbdate = \"$m[2]-$m[3]-$m[4]\";\n\t} else\n\t\tdie(\"\\nISSN filename format changed, please correct software to the new format.\\n\");\n\t$biggertham = exec(\"wc -l \".realpath($fs[0])); // check BUG at https://stackoverflow.com/a/3819422/287948\n\t$biggertham = ((int) preg_replace('/\\s.+/s','',$biggertham)) -1;\n\t$handle = fopen($fs[0], \"r\");\n\t$sep = '';\n\tif ($handle) {\n\t echo \"\\nDELETE FROM $table;\";\n\t echo \"\\nINSERT INTO $table (issn, issn_l) VALUES \";\n\t for($n=0; (!$MAX || $n<$MAX) && ($line = fgets($handle, 4096)) !== false; $n++) {\n\t \tpreg_match('/^\\s*(\\d+)\\-(\\d{3,3})[X\\d]\\s(\\d+)\\-(\\d{3,3})[X\\d]$/i',$line,$m);\n\t if (isset($m[1])) {\n\t \techo \"$sep\\n($m[1]$m[2],$m[3]$m[4])\";\n\t \t$sep = ',';\n\t }\n\t if ($n>10 && ($n%$frag)==0) {\n\t \techo \";\\n\\nINSERT INTO $table (issn, issn_l) VALUES \";\n\t \t$sep='';\n\t }\n\t } // for\n\t if ((!$MAX || $n!=$MAX) && !feof($handle)) {\n\t echo \"\\n##Error: unexpected fgets() fail\\n\";\n\t } else\n\t \techo \";\";\n\t fclose($handle);\n\t\t echo \"\\nSELECT issn.info_refresh('$dbdate','$filename');\"; // CONFERIR nome tabela info\n\t\t echo \"\\nSELECT api.assert_eq(\n\t\t\t \t(select COUNT(*) from issn.intcode),\n\t\t\t\t$biggertham::bigint,\n\t\t\t\t'count must be the same as wc -l $filename'\n\t\t\t) AS check_count;\\n\";\n\t\t echo \"\\n--- END OF INSERTS ---\\n\";\n\t} // if\n}", "public function processingFenomenaUploadProv($file, $timestamp){\n $counter = 0; \n foreach($file as $data){\n if($counter != 0){\n $modelnew = new FenomProv;\n $hasil = explode(\",\",$data);\n \n $modelnew->id_prov = $hasil[0];\n $modelnew->id_pdrb = $hasil[1];\n $modelnew->tahun = $hasil[2];\n $modelnew->triwulan = $hasil[3];\n $modelnew->putaran = $hasil[4];\n $modelnew->revisi = $hasil[5];\n $modelnew->isi_fenom = $hasil[6]; \n $modelnew->isi_tipe = $hasil[7];\n $modelnew->isi_sumber = $hasil[8];\n $modelnew->isi_indikasi = $hasil[9];\n \n if ($timestamp){\n $modelnew->timestamp= $timestamp;\n }\n $modelnew->save(false);\n }\n $counter++;\n } \n }", "public function create_from_file($file);", "function spip2odt_ajouter_styles_perso($fichier_perso, $fichier_oasis){\n\n\tlire_fichier($fichier_oasis, $styles);\n\t\n\t$f = find_in_path($fichier_perso);\n\tlire_fichier($f, $styles_defaut);\n\t$ajout_styles = \"\";\n\tif (preg_match_all(\",<((style:style|text:list-style|text:outline-style)\\s[^/>]*)(/>|>.*</(\\\\2)>),Uims\",$styles_defaut,$matches,PREG_SET_ORDER)){\n\t\tforeach($matches as $match){\n\t\t\tif (preg_match(\",style:name=([\\\"'])([^\\\\1]*)\\\\1,Ums\",$match[1],$regs)){\n\t\t\t\t$nom_style = $regs[2];\n\t\t\t\tif (!preg_match(\",style:name=(['\\\"])$nom_style\\\\1,\",$styles))\n\t\t\t\t\t$ajout_styles .= $match[0];\n\t\t\t}\n\t\t}\n\t}\n\t$styles = str_replace('</office:styles>',$ajout_styles.'</office:styles>',$styles);\t\n\tecrire_fichier($fichier_oasis, $styles);\n\n}", "public function crearArchivoSql($data)\n {\n // el Email y el username a enviar\n $user = $this->getUser();\n $nivelUser = $user->getNivel();\n\n $nombreArchivo = __DIR__.'/../Resources/doc/ArchivoSql.txt';\n if (file_exists($nombreArchivo)) {\n unlink($nombreArchivo);\n } \n $file = fopen($nombreArchivo,\"w\");\n foreach($data as $clave => $generar) {\n if($clave !== 'submit'){\n fputs($file, $clave);\n fputs($file,\"\\n\");\n fputs($file, $generar);\n fputs($file,\"\\n\");\n }\n }\n if($file){\n fclose($file);\n } \n \n return ;\n }", "function ouvrir_fichier($file, $path, $mode) {\n\t\t if (!$id_fichier=fopen($path . $file, $mode)) echo(\"Erreur d'ouverture du fichier\");\n\t\t else return ($id_fichier);\n}", "function add_line_return($file_path)\n {\n file_put_contents($file_path, \"\\n\", FILE_APPEND);\n }", "function striplinesfromcsv($numberoflines,$filename) {\r\n\t\t\r\n\t\t$fileName = 'nightlies/'.$filename;\r\n\t\t$a = preg_replace(\"/^(.*?\\n){0,$numberoflines}/\",'', file_get_contents($fileName));\r\n\t\t$b = fopen($fileName, 'w');\r\n\t\tfwrite($b, $a);\r\n\t\tfclose($b);\r\n\t\t\r\n\t\t//$filename = 'nightlies/'.$filename;\t\t\r\n\t\t//$file = file($filename);\r\n\t\t//file_put_contents($filename, implode(\"\\n\", array_slice($file, $numberoflines)));\r\n\t\t\r\n\t\techo \" > > > Stripping \".$numberoflines.\" lines from '\".$filename.\"' <br>\";\r\n\t}", "public function addToTxtFile($auth_code);", "function cc_elabora_file_xml($offerte){\n\t\n\tglobal $wpdb; // oggetto interazione DB di WordPress\n\t\n\t// path dove si trova file xml sorgente, config.xml e file di log\n\t$path = ABSPATH . \"import/\";\n\t\n\t$results = $deleted = array(); \n\t\n\t// apro file config (xml) da cui prendere data ultima elaborazione ed in cui memorizzare i risultati di elaborazione\n\t$config = @simplexml_load_file($path.\"configs.xml\");\n\tif(!$config){\n\t\t// file config non trovato notifico e esco \n\t\tcc_import_error(\"File config non trovato!\");\t\t\t\n\t}\n\t\t\n\t// recupero tutti gli id cometa già presenti in tabella postmeta. _id_cometa è un postmeta mio\n\t$record_presenti = cc_get_unique_post_meta_values(\"_id_cometa\"); // restituisce array con chiave post_id\n\t\n\t// recupero da file config data ultimo aggiornamento - NON PIU' UTILIZZATO, uso data all'interno del file xml\n\t//$last_update = new DateTime( (string) $config->lastUpdate );\n\t\n\t// contatore record\n\t$line = 0;\n\t\n\t// loop offerte da xml sorgente\n\tforeach($offerte as $offerta){\n\t\t\n\t\t$line++;\n\t\tcc_import_immobili_error_log($line); // aggiorno log elaborazione con numero progressivo record \n\t\t\n\t\t$idunique = (int) $offerta->Idimmobile; // campo univoco Cometa\n\t\t$rif = (string) $offerta->Riferimento; // Rif / codice immoible\n\t\t$contratto = (string) $offerta->Contratto; // il tipo di contratto (Vendita o Affitto)\n\t\t$hasfoto = (empty((string) $offerta->FOTO1)) ? false : true;\n\t\t\n\t\tcc_import_immobili_error_log($rif); // aggiorno log elaborazione con il rif immobile\n\t\t\n\t\t// non importo gli immobili in affitto e quelli senza foto\n\t\tif($contratto == \"Affitto\" or !$hasfoto){\n\t\t\t\n\t\t\t// aggiorno contatori in file config.xml. L'ultimo param in cc_update_configs indica di incrementare il valore già presente\n\t\t\tif($contratto == \"Affitto\") cc_update_configs(\"affitto\", 1, true); // aggiorno contatore affitti\n\t\t\tif(!$hasfoto) cc_update_configs(\"nofoto\", 1, true); // aggiorno contatore affitti\n\t\t\t\n\t\t\t// registro motivo perché salto importazione in file di log\n\t\t\t$whyskipped = \"Saltato perche contratto \".$contratto;\n\t\t\tif(!$hasfoto) $whyskipped .= \" e non ha foto\";\n\t\t\tcc_import_immobili_error_log($whyskipped);\n\t\t\tcontinue; // passo al prossimo record immobile\n\t\t} \n\t\t\n\t\t// Recupero ultima data modifica dell'immobile su Cometa\n\t\t$DataAggiornamento = (string) $offerta->DataAggiornamento;\n\t\t$DataAggiornamento = substr($DataAggiornamento, 0, -6); // elimino +1:00 da valore data se no non è allineato con tempo server\t\t\n\t\t$data_ultima_modifica_record = new DateTime( $DataAggiornamento );\t// creo oggetto DateTime\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t// controllo se l'id del record è già presente in DB e decido dunque se richiamare funzione di insert o update\n\t\tif(in_array($idunique, $record_presenti)){\n\t\t\t\t\t\t\n\t\t\t// è già presente in db - richiamo funzione che aggiorna record passando id tabella posts e oggetto xml dell'offerta\n\t\t\t$post = array_search($idunique, $record_presenti); // recupero chiave array che è post_id\n\t\t\t\n\t\t\t// recupero data ultimo aggiornamento record in tabella posts\n\t\t\t$md = get_the_modified_time( \"Y-m-d H:i:s\", $post );\n\t\t\t$post_last_modified = new DateTime( $md );\n\t\t\t\n\t\t\t// se la data dell'ultimo aggiornamento record in posts è maggiore della data di modifica in Cometa \n\t\t\t// aumento contatore skipped, tolgo id da elenco record da cancellare e passo al record successivo\n\t\t\tif($post_last_modified >= $data_ultima_modifica_record){\n\t\t\t\t\n\t\t\t\t// rimuovo immobile da elenco già presenti - a fine lavoro quelli rimasti verranno eliminati da DB\n\t\t\t\tunset($record_presenti[$post]); \n\t\t\t\t\n\t\t\t\t// aggiorno log e contatore in config.xml\n\t\t\t\t$msg_skipped = \"Record \".$post.\" DATA RECORD XML: \".$data_ultima_modifica_record->format(\"Y-m-d H:i:s\");\n\t\t\t\t$msg_skipped .= \" DATA RECORD IN POSTS: \".$post_last_modified->format(\"Y-m-d H:i:s\");\n\t\t\t\tcc_import_immobili_error_log(\"skipped\");\n\t\t\t\tcc_update_configs(\"skipped\", 1, true);// incremento valore di skipped di uno\n\t\t\t\tcontinue; // il record non è stato modificato, passo al prossimo record\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t/**\n\t\t\t * Richiamo funzione cc_update_record che aggiorna record in DB\n\t\t\t * \n\t\t\t * @param $post: post_id in tabella postmeta\n\t\t\t * @param $offerta: oggetto xml del singolo immobile\n\t\t\t * @return string con valore \"updated\" o errore rilevato\n\t\t\t */\n\t\t\t$results[$rif] = cc_update_record($post, $offerta); \n\t\t\t\n\t\t\t// elimino da record_presenti questo record. quelli che alla fine rimangono verranno cancellati\n\t\t\tunset($record_presenti[$post]); \n\t\t\t\n\t\t}else{\n\t\t\t/**\n\t\t\t * Record nuovo. Richiamo funzione cc_insert_record che inserisce un nuovo record in DB\n\t\t\t * \n\t\t\t * @param $offerta: oggetto xml del singolo immobile\n\t\t\t * @return string con valore \"inserted\" o errore rilevato\n\t\t\t */\n\t\t\t$results[$rif] = cc_insert_record($offerta);\n\t\t\t// aggiungo dicitura inserted in file log per indicare che il record è stato inserito con successo\n\t\t\tcc_import_immobili_error_log(\"inserted\"); \n\n\t\t}\n\t\t\n\t} // end foreach $offerte - finito elabroazione di tutti i record presenti nel file xml\n\t\n\t/* Procedura di cancellazione immobili non più presenti\n\t * Se l'array record_presenti non è vuoto vuol dire che uno o più immobili attualmente in db non sono più\n\t * presenti su Cometa esportazione ergo sono da cancellare da db\n\t *\n\t * @param $id2delete: id record in wp_posts\n\t * @param $id_cometa: id univoco Cometa, non utilizzato in questo frangente\n\t */\t\n\tif(!empty($record_presenti)){\n\t\t// loop record\n\t\tforeach($record_presenti as $id2delete => $id_cometa){\n\t\t\t// uso funzione di WP per cancellare record da posts\n\t\t\t$deleted = wp_delete_post( $id2delete, false ); // 2° param indica se il record dev'essere spostato in cestino (false) o se dev'essere cancellato (true)\n\t\t\tcc_update_configs(\"deleted\", 1, true); // incremento contatore deleted di 1 in config.xml\n\t\t}\n\t\t// aggiorno log con elenco degli immobili cencellati\n\t\t$msg = implode(\", \", $record_presenti);\n\t\tcc_import_immobili_error_log(\"Deleted: \".$msg);\n\t}\n\t\n\t/* Restituisci a cc_import_xml_file() array con chiave Rif e come valore \"inserted\", \"updated\" \n\t * o errore rilevato (risultato di cc_insert_record() o cc_update_record() )\n\t*/\n\treturn $results; \n\t\n}", "protected function createFile() {}" ]
[ "0.68096864", "0.60303247", "0.589639", "0.5840538", "0.5830748", "0.57983434", "0.57871723", "0.5782272", "0.5780235", "0.57479316", "0.57354856", "0.5696811", "0.56890535", "0.56374145", "0.56162596", "0.55824184", "0.5523743", "0.5516619", "0.55031353", "0.54789263", "0.5474148", "0.54702467", "0.5446076", "0.539295", "0.53509057", "0.53180856", "0.5269364", "0.5247194", "0.5242718", "0.52294827", "0.52244735", "0.51859105", "0.5162947", "0.5127944", "0.5120406", "0.5106728", "0.5083793", "0.50666845", "0.50592005", "0.5057224", "0.5056609", "0.50515056", "0.5032033", "0.5030936", "0.49838585", "0.4976969", "0.49663982", "0.49661142", "0.49652869", "0.49612755", "0.49528447", "0.49242577", "0.49205858", "0.49079496", "0.49048516", "0.4898703", "0.48953468", "0.48887545", "0.48798168", "0.48783755", "0.4849459", "0.48393753", "0.48357075", "0.48326355", "0.48284796", "0.48167238", "0.48003227", "0.47995037", "0.47900012", "0.47877002", "0.4786245", "0.47800025", "0.47743946", "0.47706842", "0.47649", "0.47630596", "0.47484213", "0.47425348", "0.47331625", "0.47259524", "0.4723616", "0.4715946", "0.47088543", "0.46986386", "0.46967104", "0.46928844", "0.46842942", "0.46835914", "0.46800256", "0.46752238", "0.46739036", "0.4673014", "0.46707255", "0.46699113", "0.4665286", "0.46646044", "0.4662039", "0.46570367", "0.46447256", "0.46410894", "0.4639174" ]
0.0
-1
Plugin Name: OMDB Plugin URI: localhost/omdb Description: Searches OMDB by title Version: 1.0 Author: Adam Singh Author URI: localhost Function that retrieve search results from the API [movie title="Good Will Hunting"]
function omdb_search($atts) { //Setting attributes from the short code $a = shortcode_atts(array('title' => "Good Will Hunting"), $atts); $your_key = "a61b2946"; //Key from OMDB $url = "http://www.omdbapi.com/?apikey=".$your_key."&t=".$a['title']; $response = wp_remote_get($url); //Calling OMDB for data //Catching an error if it occurs if(is_wp_error($response)) { die("Error occred when retrieving data."); } //Decoding the json $data = json_decode($response['body'], true); //Creating the begining of the table $table = "<table style=\"width:100%\">"; //for loop that traverses through the data foreach($data as $key => $value) { if($key == "Ratings") //Rating found { //for loop for traversing through the ratings foreach($value as $rating) { $table .= "<tr>"; $table .= "<td>Source</td>"; $table .= "<td>".$rating['Source']."</td>"; $table .= "</tr>"; }//End of foreach($value as $rating) }//End of if($key == "Ratings") else //Ratings not found { $table .= "<tr>"; $table .= "<td>".$key."</td>"; $table .= "<td>".$value."</td>"; $table .= "</tr>"; }//End of else }//End of foreach($data as $key => $value) //End of the table $table .= "</table>"; echo $table; //Printing table }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMovieInformation($movie)\n{\n if($movie != \"\") {\n $OMDB_API_KEY = '99842c57';\n $omdbUrl = \"http://www.omdbapi.com?s=$movie&apikey=$OMDB_API_KEY&type=movie\";\n $movie = file_get_contents($omdbUrl);\n\n $movieDetails =json_decode($movie, true);\n\n \n if(count($movieDetails['Search'])) {\n $movieList = $movieDetails['Search'];\n // Pick the first movie\n $movie = $movieList[0];\n $movieTitle = $movie[\"Title\"];\n $movieYear = $movie[\"Year\"];\n $moviePoster = $movie[\"Poster\"];\n\n sendFulfillmentResponse($movieTitle, $movieYear, $moviePoster, true);\n } else {\n sendFulfillmentResponse(null, null, null, false);\n }\n } else {\n sendFulfillmentResponse(null, null, null, false);\n }\n \n}", "function getXML($title, $year) {\n\t$title = str_replace(\" \", \"%20\", $title);\n\t$url = \"http://www.omdbapi.com/?s=\".$title.\"&y=\".$year.\"&r=XML\";\n\t$searchTitle = parseResults(curl($url), $title);\n\t$searchTitle = str_replace(\" \", \"%20\", $searchTitle);\n\t$url = \"http://www.omdbapi.com/?t=\".$searchTitle.\"&y=\".$year.\"&r=XML\";\n\t//echo $url;\n\treturn curl($url);\n}", "function dvdinsideSearch($title)\n{\n global $dvdinsideServer, $cache;\n global $CLIENTERROR;\n\n $post = 'action=new&suchen=Suchen&title='.urlencode($title);\n\n $resp = httpClient($dvdinsideServer.'/db/search.php', $cache, array('post' => $post));\n\n if (!$resp['success']) $CLIENTERROR .= $resp['error'].\"\\n\";\n\n if (preg_match_all('/<a href=\\\"details.php\\?id\\=(.+?)\\\">(.+?)<\\/a>.+?<a href=\\\"studio_list.php.+?\\\">(.+?)<\\/a>.+?<td align=\\\"center\\\">(.+?)<\\/td>/is', $resp['data'], $data, PREG_SET_ORDER)) \n {\n foreach ($data as $row) \n {\n if (ereg('<img', $row[2])) continue;\n $info['id'] = \"DI\".trim($row[1]);\n $info['title'] = trim($row[2]);\n $info['studio'] = trim($row[3]);\n $info['datum'] = trim($row[4]);\n $ary[] = $info;\n }\n }\n\n return $ary;\t\n}", "function getTitle()\n\t{\n\t\t\n\t\t$query = new Bin_Query();\t\n\t\t$title=$_GET['word'];\n\t\tif($title!='')\n\t\t{\n\t\t\t$sql= \"SELECT title FROM products_table WHERE title like '\".$title.\"%'\"; \n\t\t\t$query->executeQuery($sql);\n\t\t\t$arr=$query->records;\n\t\t\treturn Display_DManageProducts::getTitle($query->records);\t\t\t\t\t\n\t\t}\t\n\n\t}", "function searchByTitle($title){\n $name = $title['search'];\n return db()->QUERY(\"SELECT * FROM posts WHERE title LIKE '%$name%' ORDER BY title\");\n }", "public function searchItem($title) {\n \n //Create Database conexion\n }", "function MediaAttach_searchapi_search($args)\n{\n $dom = ZLanguage::getModuleDomain('MediaAttach');\n if (!SecurityUtil::checkPermission('MediaAttach::', '::', ACCESS_READ)) {\n return true;\n }\n\n pnModDBInfoLoad('Search');\n $pntable = pnDBGetTables();\n $filestable = $pntable['ma_files'];\n $filescolumn = $pntable['ma_files_column'];\n $searchTable = $pntable['search_result'];\n $searchColumn = $pntable['search_result_column'];\n\n $where = search_construct_where($args,\n array($filescolumn['title'],\n $filescolumn['desc']));\n\n // exclude admin files\n $where .= ' AND ' . $filescolumn['modname'] . \" != 'MediaAttach'\"\n . ' AND ' . $filescolumn['objectid'] . \" < 99999999\";\n\n $sql = 'SELECT ' . $filescolumn['fileid'] . ' AS fileid, '\n . $filescolumn['modname'] . ' AS modname, '\n . $filescolumn['objectid'] . ' AS objectid,'\n . $filescolumn['date'] . ' AS filedate,'\n . $filescolumn['title'] . ' AS title, '\n . $filescolumn['desc'] . ' AS text, '\n . $filescolumn['url'] . ' AS url'\n . ' FROM ' . $filestable . ' WHERE ' . $where;\n\n $result = DBUtil::executeSQL($sql);\n if (!$result) {\n return LogUtil::registerError (__('Error! Could not load items.', $dom));\n }\n\n $sessionId = session_id();\n\n $insertSql = 'INSERT INTO ' . $searchTable . '('\n . $searchColumn['title'] . ','\n . $searchColumn['text'] . ','\n . $searchColumn['extra'] . ','\n . $searchColumn['module'] . ','\n . $searchColumn['created'] . ','\n . $searchColumn['session']\n . ') VALUES ';\n\n // Process the result set and insert into search result table\n for (; !$result->EOF; $result->MoveNext()) {\n $file = $result->GetRowAssoc(2);\n\n if (SecurityUtil::checkPermission('MediaAttach::', \"$file[modname]:$file[objectid]:$file[fileid]\", ACCESS_OVERVIEW)) {\n $sql = $insertSql . '('\n . '\\'' . DataUtil::formatForStore($file['title']) . '\\', '\n . '\\'' . DataUtil::formatForStore($file['text']) . '\\', '\n . '\\'' . DataUtil::formatForStore($file['url']) . '\\', '\n . '\\'' . 'MediaAttach' . '\\', '\n . '\\'' . DataUtil::formatForStore($file['filedate']) . '\\', '\n . '\\'' . DataUtil::formatForStore($sessionId) . '\\')';\n\n $insertResult = DBUtil::executeSQL($sql);\n if (!$insertResult) {\n return LogUtil::registerError (__('Error! Could not load items.', $dom));\n }\n }\n }\n\n return true;\n}", "function get_movies(){\n\t$db= $GLOBALS['db'];\n\t$results= $db->query(\"SELECT * FROM movies ORDER BY title \" );\n\treturn $db->resToArray($results);\n}", "function mediaPage()\n{\n\n $search = isset($_GET['title']) ? $_GET['title'] : null;\n $medias = Media::showMedias(null, \"SELECT title,trailer_url,release_date,type,season_series FROM media GROUP BY title ORDER BY release_date DESC\");\n $AllType = Media::getTypeOfShow();\n require('view/mediaListView.php');\n}", "function info_module_mod_search_simple(){\n\n //\n // Описание модуля\n //\n\n //Заголовок (на сайте)\n $_module['title'] = 'Простой модуль поиска';\n\n //Название (в админке)\n $_module['name'] = 'Простой модуль поиска';\n\n //описание\n $_module['description'] = 'Модуль Простой поиск';\n\n //ссылка (идентификатор)\n $_module['link'] = 'mod_search_simple';\n\n //позиция\n $_module['position'] = 'sidebar';\n\n //автор\n $_module['author'] = 'soft-solution.ru';\n\n //текущая версия\n $_module['version'] = '1.0';\n\n //\n // Настройки по-умолчанию\n //\n //$_module['config'] = array();\n\n return $_module;\n\n }", "public function doMovieSearch()\n {\n if ( !preg_match( \"/^(.*)(19|20)[0-9]{2}/\", $this->Release, $matches ) )\n {\n $variables = array( 'status' => 'ko', 'message' => 'unable to extract the movie name' );\n }\n else\n {\n $movieTitle = $matches[1];\n\n $scraper = new MkvManagerScraperSubsynchro();\n $movies = array_map(\n function( $movie ) {\n $movie['id'] = str_replace( array( '/', '.' ), array( '|', '~' ), $movie['id'] );\n return $movie;\n },\n $scraper->searchMovies( $movieTitle )\n );\n\n $variables = array( 'status' => 'ok', 'movies' => $movies );\n }\n\n $result = new ezcMvcResult();\n $result->variables += $variables;\n\n return $result;\n }", "function register_block_core_query_title()\n {\n }", "function opdsSearchDescriptor()\n{\n global $app;\n\n $gen = mkOpdsGenerator($app);\n $cat = $gen->searchDescriptor(null, '/opds/searchlist/0/');\n mkOpdsResponse($app, $cat, OpdsGenerator::OPENSEARCH_MIME);\n}", "private function _indexItemTitleField()\n {\n $this->db->query(<<<SQL\n ALTER TABLE {$this->db->prefix}neatline_records\n ADD FULLTEXT (item_title, title, body, slug);\nSQL\n);\n }", "function dump_IMDb($arg_1)\n{\n\n\n $url_film = \"https://www.omdbapi.com/?i=tt3896198&apikey=ec6c939f&t=\".str_replace( \" \", \"+\", clean($arg_1)).\"&plot=full\";\n echo \"url_film_API:\".$url_film.\"<br>\";\n $dtls = file_get_contents($url_film);\n //echo $dtls;\n $obj = json_decode($dtls);\n //$obj->Title, $obj->Poster, $obj->Year, $obj->Released, $obj->Runtime, $obj->Genre, $obj->Writer, $obj->Director, $obj->Actors, $obj->Plot;\n // * , * , * , * , * , T , T , * , T , * , * ;\n //----------------------------------\n //----------cleaning\n $obj->Title = str_replace( \"'\", \"\\\\'\", $obj->Title);\n $obj->Actor = str_replace( \"'\", \"\", $obj->Actor);\n $obj->Director = str_replace( \"'\", \"\\\\'\", $obj->Director);\n $obj->Production = str_replace( \"'\", \"\\\\'\", $obj->Production);\n $obj->Plot = str_replace( \"'\", \"\\\\'\", $obj->Plot);\n $obj->Plot = str_replace( \";\", \"\\\\;\", $obj->Plot);\n $obj->Poster = str_replace( \"300.jpg\", \"3000.jpg\", $obj->Poster);\n $obj->Year = (int) preg_replace('/[^0-9]/', '', $obj->Year);\n\n if (strpos($obj->Title, 'Behind the Scene') ) {\n return;\n }\n\n $cnnx = mysqli_connect(\"localhost\", \"yellowtree\", \"yellow\") or die(\"sql user error\");\n mysqli_select_db($cnnx,\"yellowtree\") or die(\"db non trouver\");\n\n if (exist_film($obj->Title, $obj->Year, $cnnx)) { echo \"FILMEXIST\"; return; }\n\n\n\n $rqt = \"INSERT INTO MOVIE(title, releaseyear, posterurl , synopsis, runtime , genre, director, production) VALUES ( '$obj->Title', $obj->Year, '$obj->Poster', '$obj->Plot', '$obj->Runtime', '$obj->Genre', '$obj->Director','$obj->Production');\";\n echo $rqt.\"<br>\";\n $qry = mysqli_query($cnnx,$rqt) or die(\"[ERROR] [0x0000] execution requette\");\n\n $rqt = \"SELECT idmovie FROM MOVIE order by idmovie DESC limit 1 \";\n $qry = mysqli_query($cnnx,$rqt) or die(\"[ERROR] [0x0001]execution requette\");\n $last_film = mysqli_fetch_object($qry);\n\n $idmovie = $last_film->idmovie;\n check_all_actors($obj->Actors,$cnnx,$idmovie);\n\n}", "function bgs_Movies_init() {\n\t\n}", "function getQuery() ;", "public function getByTitle()\n {\n }", "function isTriggered() {\n\t\tif(!isset($this->data['text'])) {\n\t\t\t$this->printUsage();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$HTTP = new HTTP('api.themoviedb.org');\n\t\t\n\t\t$html = $HTTP->GET('/2.1/Movie.search/'.$this->getConfig('language').'/xml/'.$this->api_key.'/'.urlencode($this->data['text']));\n\t\t$XML = simplexml_load_string($html);\n\t\tif(!$XML) {\n\t\t\t$this->reply('Error on contacting themoviedb.org');\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$tmp = $XML->xpath('opensearch:totalResults');\n\t\t$results = (int)$tmp[0];\n\t\tif(!$results) {\n\t\t\tif($this->getConfig('language') != 'en') {\n\t\t\t\t$html = $HTTP->GET('/2.1/Movie.search/en/xml/'.$this->api_key.'/'.urlencode($this->data['text']));\n\t\t\t\t$XML = new SimpleXMLElement($html);\n\t\t\t\tif(!$XML) {\n\t\t\t\t\t$this->reply('Error on contacting themoviedb.org');\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t$tmp = $XML->xpath('opensearch:totalResults');\n\t\t\t\t$results = (int)$tmp[0];\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!$results) {\n\t\t\t$this->reply('There is no information available about this movie.');\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$tmp = $XML->children()->children();\n\t\t$Movie = $tmp[0];\n\t\t\n\t\t$text = \"\\x02\".$Movie->name.\"\\x02\";\n\t\tif((string)$Movie->original_name != (string)$Movie->name) $text.= ' ('.$Movie->original_name.')';\n\t\tif(!empty($Movie->released)) $text.= \" | \\x02Released:\\x02 \".$Movie->released;\n\t\tif($Movie->rating != '0.0') $text.= \" | \\x02Press Rating:\\x02 \".$Movie->rating.'/10';\n\t\tif(!empty($Movie->certification)) $text.= \" | \\x02Rated:\\x02 \".$Movie->certification;\n\t\t$text.= ' ('.$Movie->url.')';\n\t\t\n\t\t$this->reply($text);\n\t\t$this->reply($Movie->overview);\n\t}", "public function searchTitleActionGet()\n {\n $title = \"Search for a movie by title\";\n $searchTitle = $this->app->request->getGet(\"searchTitle\");\n\n $this->app->db->connect();\n\n if ($searchTitle) {\n $sql = \"SELECT * FROM movie WHERE title LIKE ?;\";\n $res = $this->app->db->executeFetchAll($sql, [$searchTitle]);\n }\n\n $this->app->page->add(\"movie/search-title\", [\n \"searchTitle\" => $searchTitle,\n ]);\n if (isset($res)) {\n $this->app->page->add(\"movie/show-all\", [\n \"res\" => $res,\n ]);\n }\n\n return $this->app->page->render([\n \"title\" => $title,\n ]);\n }", "function getMetaTags($mid = NULL)\n{\n global $mdb2;\n\n $meta = array();\n\n //fooldal\n if ($mid == NULL) {\n $meta['description'] = $_SESSION['site_sys_meta_description'];\n $meta['keywords'] = $_SESSION['site_sys_meta_keywords'];\n }\n\n //ha a menu_id nem NULL es engedelyezve van a modul\n if ($mid != NULL && isModule('searchwords', 'admin')) {\n $query = \"\n\t\t\tSELECT description, keywords \n\t\t\tFROM iShark_Searchwords \n\t\t\tWHERE menu_id = $mid\n\t\t\";\n $result =& $mdb2->query($query);\n if ($result->numRows() > 0) {\n $row = $result->fetchRow();\n\n $meta['description'] = $row['description'];\n $meta['keywords'] = $row['keywords'];\n }\n //ha nincs egyetlen talalat sem, akkor eloszor megprobaljuk a fooldali beallitasokat\n else {\n $query = \"\n\t\t\t\tSELECT description, keywords \n\t\t\t\tFROM iShark_Searchwords \n\t\t\t\tWHERE menu_id = 0\n\t\t\t\";\n $result =& $mdb2->query($query);\n if ($result->numRows() > 0) {\n $row = $result->fetchRow();\n\n if (!empty($row['description'])) {\n $meta['description'] = $row['description'];\n } else {\n $meta['description'] = $_SESSION['site_sys_meta_description'];\n }\n\n if (!empty($row['keywords'])) {\n $meta['keywords'] = $row['keywords'];\n } else {\n $meta['keywords'] = $_SESSION['site_sys_meta_keywords'];\n }\n } else {\n $meta['description'] = $_SESSION['site_sys_meta_description'];\n $meta['keywords'] = $_SESSION['site_sys_meta_keywords'];\n }\n }\n }\n\n return $meta;\n}", "public function search($params)\n\t{\n\t\t//echo solr_get_version();\n\t\t$options = array\n\t\t(\n\t\t\t\t'hostname' => SOLR_SERVER_HOSTNAME,\n\t\t\t\t'login' => SOLR_SERVER_USERNAME,\n\t\t\t\t'password' => SOLR_SERVER_PASSWORD,\n\t\t\t\t'port' => SOLR_SERVER_PORT,\n\t\t\t\t'path' => SOLR_SERVER_PATH,\n\t\t\t\t'wt' => 'json',\n\t\t\n\t\t);\n\t\t\n\t\t$client = new SolrClient($options);\n\t\t\n// \t\tif(!$this->_isOnline)\n// \t\t{\n// \t\t\ttry {\n// \t\t\t\t$pingresponse = $client->ping();\n// \t\t\t\tif($pingresponse)\n// \t\t\t\t{\n// \t\t\t\t\t$this->_isOnline=true;\n// \t\t\t\t}\n// \t\t\t} catch (Exception $e) {\n// \t\t\t\tthrow new NotAcceptableHttpException($e->getMessage());\n// \t\t\t}\n\t\t\t\n// \t\t}\n\t\t\n\t\t$query = new SolrQuery();\n\t\t\n\t\t$this->load($params);\n\t\t\t\n\t\tif (!$this->validate()) {\n\t\t\t// uncomment the following line if you do not want to any records when validation fails\n\t\t\t// $query->where('0=1');\n\t\t\treturn $dataProvider;\n\t\t}\n\t\t\t\n\t\t\n\t\tif($this->keyWords)\n\t\t{\n\t\t\t$query->setQuery('title:'.$this->keyWords);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$query->setQuery('title:*');\n\t\t}\n\t\t\n\t\t$responseFields=self::getSolrResponseFields();\n\t\t\n\t\t$query->addFields($responseFields);\n\t\t\n \t\t$query->setHighlight(1);\n\t\t\n \t\t$query->addHighlightField('title');\n \t\t\n \t\t$query->setHighlightSimplePre('<mark class=\"text-danger\">');\n \t\t\n \t\t$query->setHighlightSimplePost('</mark>');\n\t\t\n// \t\t$query->addField('id');\n\t\t\n// \t\t$query->addField('tstamp');\n\t\t\n// \t\t$query->addField('title');\n\t\t\n// \t\t//$query->addField('content');\n\t\t\n// \t\t$query->addField('url');\n\t\t\n\t\t// \t\t$query->addField('id')->addField('title');\n\t\t\n\t\t// \t\t$query->setStart(0);\n\t\t\n\t\t// \t\t$query->setRows(10);\n\t\t\n \t\t\n\t\t\n\t\t$dataProvider=new SolrDataProvider([\n\t\t\t\t'solr' => $client,\n\t\t\t\t'query' => $query,\n\t\t\t\t'pagination' => [\n\t\t\t\t\t\t'pagesize' => '30',\n\t\t\t\t],\n// \t\t\t\t'sort' => [\n// \t\t\t\t\t\t'defaultOrder' => [\n// \t\t\t\t\t\t\t\t//'boost' => SolrQuery::ORDER_DESC,\n// \t\t\t\t\t\t\t\t'title' => SolrQuery::ORDER_ASC,\n// \t\t\t\t\t\t\t\t'id' => SolrQuery::ORDER_ASC,\n// \t\t\t\t\t\t\t\t//'tstamp' => SolrQuery::ORDER_DESC,\n// \t\t\t\t\t\t]\n// \t\t\t\t],\n\t\t]);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// \t\t$dataProvider->solr=$client;\n\t\t\n\t\t// \t\t$dataProvider->query=$query;\n\t\t\n\t\t//$dataProvider->pagination->pagesize=5;\n\t\t\n\t\t//var_dump($dataProvider);\n\t\t\n\t\t// \t\techo $query;\n\t\t\n\t\t// \t\tdie();\n\t\t\n\t\treturn $dataProvider;\n\t\t\n\t\t/* $models=$dataProvider->models;\n\t\t\n\t\techo $dataProvider->getTotalCount();\n\t\t\n\t\tforeach ($models as $doc)\n\t\t{\n\t\techo \"id:\".$doc->id.\"</br>\";\n\t\techo \"titles:\".\"</br>\";\n\t\tforeach ($doc->title as $title)\n\t\t{\n\t\techo \"&nbsp&nbsp\".$title.\"</br>\";\n\t\t}\n\t\t} */\n\t\t\n\t\t\n\t\t\n\t\t/* \t\t$query_response = $client->query($query);\n\t\t\n\t\t$response = $query_response->getResponse();\n\t\t\n\t\tprint_r($response);\n\t\t\n\t\techo \"////////////////////////////////////\";\n\t\t\n\t\tvar_dump($response['responseHeader']);\n\t\t\n\t\tforeach ($response->response->docs as $doc)\n\t\t{\n\t\techo \"id:\".$doc->id.\"</br>\";\n\t\techo \"titles:\".\"</br>\";\n\t\tforeach ($doc->title as $title)\n\t\t{\n\t\techo \"&nbsp&nbsp\".$title.\"</br>\";\n\t\t}\n\t\t\n\t\t}\n\t\t*/\n\t}", "function opensky_islandora_solr_query($islandora_solr_query) {\n // dpm ('opensky_islandora_solr_query');\n // dpm ($islandora_solr_query);\n\n $islandora_solr_query->solrParams['fl'] = 'PID,mods*,fgs*,dc.*,dsmd_DC*,keyDate*,RELS_EXT*,*Display*,fedora_datastreams_ms';\n\n}", "public function actionMSearch($q=null) {\n \n $tracks = json_decode(file_get_contents('http://3d-connect.com/api/vk?q='.$q));\n // var_dump($tracks);\n $dataProvider = new CArrayDataProvider($tracks, array(\n 'sort' => array(\n 'attributes' => array(\n 'title', 'duration', 'link',\n ),\n ),\n 'pagination' => array(\n 'pageSize' => 50,\n ),\n ));\n \n \n $this->render(\"//music/list\", array('dataProvider' => $dataProvider));\n }", "function testSearch2(): void\n {\n // Das Streben nach Glück | The Pursuit of Happyness\n // https://www.imdb.com/find?s=all&q=Das+Streben+nach+Gl%FCck\n\n Global $config;\n $config['http_header_accept_language'] = 'de-DE,en;q=0.6';\n\n $data = engineSearch('Das Streben nach Glück', 'imdb', false);\n $this->assertNotEmpty($data);\n\n $data = $data[0];\n // $this->printData($data);\n\n $this->assertEquals('imdb:0454921', $data['id']);\n $this->assertMatchesRegularExpression('/Das Streben nach Glück/', $data['title']);\n }", "public function getElementTitle(array $args){\r\n\t $args = Utility_Functions::argsToArray($args);\r\n\t $args = Utility_Functions::cleanArgsValue($args);\r\n\t \r\n\t $searchFor = $args[\"text\"];\r\n\t $typeArr = explode(\"-\", $args[\"type\"]);\r\n\t\r\n\t $type = trim($typeArr[0]);\r\n\t \r\n\t if($type == 1){\r\n\t $model = new Table_BlogArticles();\r\n\t }else{\r\n\t $model = new Table_Receipts();\r\n\t } \r\n\t\r\n\t $foundData = $model->selectAutocomplete(array(\"title\" => array(\" like \" => \"%$searchFor%\")), null);\r\n\t\r\n\t echo $this->_toJson($foundData->toArray());\r\n\t}", "public function getByString($movie){\n $url = \"http://www.omdbapi.com/?t=\".urlencode($movie).\"&y=&plot=short&r=json\";\n\n if($json = file_get_contents($url)){\n $info = json_decode($json);\n if(isset($info->Title) && $info->Title !=''){\n return $info->Title.\"(\".$info->Year.\") - Rating \".$info->imdbRating.\" - http://www.imdb.com/title/\".$info->imdbID.\"/\";\n }else{\n return 'Couldn\\'t find this movie';\n }\n }else{\n return 'Could not connect.';\n }\n }", "function getTitle() ;", "function mars_video_meta() {}", "function searchByTitle($DocTitle)\n { \n $query = \"SELECT DocID, DocTitle, `Path`, `Blob`, Url, Description, CreatedDate, LastEditDate, SortOrder FROM Docs WHERE DocTitle like '%\".$DocTitle.\"%' ;\"; \n $stmt = $this->conn->prepare( $query );\n\n // execute query\n $stmt->execute();\n return $stmt;\n }", "function find_all_product_info_by_title($title){\n global $db;\n $sql = \"SELECT * FROM products \";\n $sql .= \" WHERE name ='{$title}'\";\n $sql .=\" LIMIT 1\";\n return find_by_sql($sql);\n }", "public function printSearch($module, $object, $keywords)\n{\n echo \"<li> {$this->lang->search->common} </li>\" . \"<li>{$keywords}</li>\";\n}", "function unity_query_gesticon() {\r\n $name = func_arg(0);\r\n $lilo_mongo = new LiloMongo();\r\n $lilo_mongo->selectDB('Game');\r\n $lilo_mongo->selectCollection('Gesticon');\r\n $data = $lilo_mongo->find();\r\n if ($data) {\r\n $output = array();\r\n foreach ($data as $val) {\r\n $output[] = array(\r\n 'command' => $val['command'],\r\n 'animation' => $val['animation'],\r\n );\r\n }\r\n return json_encode($output);\r\n }\r\n}", "function opdsByTitle($index = 0)\n{\n global $app, $globalSettings;\n\n // parameter checking\n if (!is_numeric($index)) {\n $app->getLog()->warn('opdsByTitle: invalid page id ' . $index);\n $app->halt(400, \"Bad parameter\");\n }\n\n $filter = getFilter();\n $search = $app->request()->get('search');\n if (isset($search)) {\n $tl = $app->calibre->titlesSlice($globalSettings['lang'], $index, $globalSettings[PAGE_SIZE], $filter, $search);\n } else {\n $tl = $app->calibre->titlesSlice($globalSettings['lang'], $index, $globalSettings[PAGE_SIZE], $filter);\n }\n $books1 = $app->calibre->titleDetailsFilteredOpds($tl['entries']);\n $books = array_map('checkThumbnailOpds', $books1);\n $gen = mkOpdsGenerator($app);\n $cat = $gen->titlesCatalog(\n null,\n $books,\n false,\n $tl['page'],\n getNextSearchPage($tl),\n getLastSearchPage($tl)\n );\n mkOpdsResponse($app, $cat, OpdsGenerator::OPDS_MIME_ACQ);\n}", "function edan_search_object_shortcode($atts)\n {\n $edanURL = NULL;\n $nosearch = False;\n\n if($atts)\n {\n if(array_key_exists('url', $atts))\n {\n $edanURL = $atts['url'];\n $nosearch = True;\n }\n }\n\n $call = new edan_object_call();\n $object = new edan_object_view($call->get($edanURL), $nosearch);\n\n return $object->get_content();\n }", "function myplugin_get_movie_metavalues($value) {\r\n if( isset($value) && ! empty($value) ) {\r\n return $value;\r\n }else {\r\n return '';\r\n }\r\n}", "function plugin_peoplebook($database, $phrase, $partial_match = true)\r\n{\r\n global $mainframe;\r\n\r\n $result = null;\r\n\r\n if (file_exists(\"components/com_peoplebook/peoplebook.php\"))\r\n {\r\n \t$where_clause = ($partial_match) ? \"LIKE '%$phrase%'\" : \"= '$phrase'\";\r\n\r\n\t$database->setQuery(\"SELECT * FROM #__peoplebook WHERE published=1 AND name \". $where_clause);\r\n $my = null;\r\n\t$my = $database->loadObject();\r\n if ($my) // found something?\r\n\t{\r\n $result[] = \"index.php?option=com_peoplebook&func=fullview&staffid=\".$my->id;\r\n $result[] = $my->name;\r\n\r\n $database->setQuery(\"SELECT id FROM #__menu WHERE published=1 AND link LIKE '%com_peoplebook'\");\r\n $my = null;\r\n $my = $database->loadObject();\r\n if ($my) // found something?\r\n {\r\n\t $result[0] .= \"&Itemid=\".$my->id;\r\n\t }\r\n\t}\r\n }\r\n\r\n return $result;\r\n}", "public function search_plugins() {\n\n\t\trequire_once( ABSPATH . \"wp-admin\" . '/includes/plugin-install.php' );\n\n $request = array(\n 'per_page' => 24,\n 'search' => $_POST['search'],\n 'fields' => $this->get_api_fields()\n );\n\n $results = plugins_api( 'query_plugins', $request );\n\t\t$data = array();\n\t\t$plugins = array();\n\n foreach( $results->plugins as $plugin ) {\n\t\t\t$plugins[] = $this->prepare_data( $plugin );\n\t\t}\n\t\t\n\t\t$data['info'] = $results->info;\n\t\t$data['plugins'] = $plugins;\n\n echo json_encode($data);\n\n die();\n }", "function amap_ma_get_search_by_name($pluginname = null) {\n $searchbyname = trim(elgg_get_plugin_setting('searchbyname', $pluginname));\n if ($searchbyname === AMAP_MA_GENERAL_YES) {\n return true;\n }\n\n return false;\n}", "function set_ac_search_args_title( $ep_formatted_args, $args ) {\n\t\n\tif( isset( $args['autocomplete'] ) && $args['autocomplete'] ) {\n\t\t$titleSearchTerm = '';\n\t\t\n\t\t\t$titleSearchTerm = strtolower($args['s']); \n\t\t\n\t\t\t$ep_formatted_args['query'] = array(\n\t\t\t\t\"match_phrase_prefix\" => array(\n\t\t\t\t\t\"post_title.suggest\" => array(\n\t\t\t\t\t\t\"query\" => $titleSearchTerm,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t);\n\t\t\t\n\t\t\t\n\t}\t\n\treturn $ep_formatted_args;\n}", "function xmlrpc_getposttitle($content)\n {\n }", "function get_results($args)\n {\n }", "function get_results($args)\n {\n }", "public function get_title();", "function getTitle();", "function getTitle();", "public function __construct() {\n\t$this->parseQuery = new ParseQuery('Video');\n }", "public function search();", "public function search();", "protected function search()\n\t{\n\t\treturn Phpfox::getLib('search');\t\n\t}", "function postingSearchHandler() {\n global $inputs;\n\n $keyword = $inputs['keyword'];\n $res = getAll(\"SELECT a.*,c.name \n FROM posting a \n INNER JOIN member_posting b \n ON a.id = b.posting_id\n INNER JOIN member c \n ON c.id = b.member_id \n WHERE a.title LIKE '%$keyword%' OR a.content LIKE '%$keyword%'\");\n \n formatOutput(true, 'success',$res);\n}", "public function search() {\r\n\t\t$mintURL = $this->Configuration->findByName('Mint URL');\r\n\t\t$queryURL = $mintURL['Configuration']['value'];\r\n\t\t$query = '';\r\n\t\tif (isset($this->params['url']['query'])) {\r\n\t\t\t$query = $this->params['url']['query'];\r\n\t\t}\r\n\r\n\t\t$queryURL = $queryURL.\"/Parties_People/opensearch/lookup?searchTerms=\".$query;\r\n\t\t$queryResponse = \"error\";\r\n\n\t\t$ch = curl_init();\r\n\t\t$timeout = 5;\r\n\t\tcurl_setopt($ch,CURLOPT_URL,$queryURL);\r\n\t\tcurl_setopt($ch,CURLOPT_RETURNTRANSFER,1);\r\n\t\tcurl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);\r\n\t\t$queryResponse = curl_exec($ch);\r\n\t\tcurl_close($ch);\r\n\r\n\t\t$this->autoRender = false;\r\n\t\t$this->response->type('json');\r\n\r\n\t\t$this->response->body($queryResponse);\r\n\t}", "function query() {}", "function driver_get($keyword, $option = array());", "public function GetDbObject() {\n // Init object\n $plugin = new stdClass();\n // Set values\n $plugin->Name = $this->Name;\n $plugin->Version = $this->Version;\n $plugin->Author = $this->Author;\n $plugin->About = $this->About;\n $plugin->Root = $this->Root;\n $plugin->Identifier = $this->Identifier;\n \n // Return result\n return $plugin;\n }", "public function Index(){\r\n\t\tif (isset($_POST['q'])) {\r\n\t\t\t$q = trim($_POST['q']);\r\n\t\t\t$q = strtolower($q);\r\n\t\t$this->query(\"SELECT * FROM images WHERE img_title LIKE '%\".$q.\"%'\");\r\n\t\t$rows = $this->resultSet();\r\n\t\treturn $rows;\r\n\t\t}\r\n\t}", "function edan_search_set_doc_title( $title )\n {\n $options = new esw_options_handler();\n $cache = new esw_cache_handler();\n\n if(edan_search_name_from_url() == $options->get_path() && $options->get_title() != '')\n {\n if(get_query_var('edanUrl'))\n {\n $object = $cache->get()['object'];\n\n if($object)\n {\n if(property_exists($object, 'content') && property_exists($object->{'content'}, 'descriptiveNonRepeating'))\n {\n if(property_exists($object->{'content'}->{'descriptiveNonRepeating'}, 'title'))\n {\n $title = $object->{'content'}->{'descriptiveNonRepeating'}->{'title'}->{'content'};\n }\n }\n elseif(property_exists($object, 'title'))\n {\n if(property_exists($object->{'title'}, 'content'))\n {\n $title = $this->object->{'title'}->{'content'};\n }\n else\n {\n $title = $this->object->{'title'};\n }\n }\n }\n }\n else\n {\n $title = $options->get_title();\n }\n }\n\n $sitename = get_bloginfo('name');\n return $title . \" - $sitename\";\n }", "public function search_id($id){\n $imdb_id = urlencode($id);\n $url = 'http://mymovieapi.com/?ids='.$imdb_id.'&type=json&plot=simple&episode=1&lang=en-US&aka=simple&release=simple&business=0&tech=0';\n search_url($url);\n }", "function get_tracks_by_module(){\n\n\t}", "function searchReview(&$result,$parameters,$sqlConnection)\r\n{\r\n $sqlSuccess = get_sql_results($result, $sqlConnection,\r\n \"select R.* from Reviews R, Albums A, Artists B \".\r\n \"where B.artistName = '{$parameters[0]}' \".\r\n \"AND A.albumName = '{$parameters[1]}' \".\r\n \"AND A.artistID = B.artistID \".\r\n \"AND R.albumID = A.albumID\");\r\n\treturn $sqlSuccess;\r\n}", "function dvdinsideSearchUrl($title)\n{\n global $dvdinsideServer;\n return $dvdinsideServer;\n}", "public function title();", "public function title();", "public function wpcd_app_meta_or_title_search( $query ) {\n\n\t\tglobal $typenow;\n\n\t\t$post_type = 'wpcd_app';\n\t\t$title = $query->get( '_meta_or_title' );\n\t\tif ( is_admin() && $typenow === $post_type && $query->is_search() && $title ) {\n\t\t\tadd_filter(\n\t\t\t\t'get_meta_sql',\n\t\t\t\tfunction( $sql ) use ( $title ) {\n\t\t\t\t\tglobal $wpdb;\n\n\t\t\t\t\t// Only run once.\n\t\t\t\t\tstatic $nr = 0;\n\t\t\t\t\tif ( 0 !== $nr++ ) {\n\t\t\t\t\t\treturn $sql;\n\t\t\t\t\t}\n\n\t\t\t\t\t$server_meta_search = \"{$wpdb->postmeta}.meta_key = 'parent_post_id' AND {$wpdb->postmeta}.meta_value IN ( SELECT P.ID FROM {$wpdb->posts} AS P LEFT JOIN {$wpdb->postmeta} AS PM on PM.post_id = P.ID WHERE P.post_type = 'wpcd_app_server' and P.post_status = 'private' and ( ( PM.meta_key = 'wpcd_server_provider' AND PM.meta_value LIKE '\" . esc_sql( '%' . $wpdb->esc_like( $title ) . '%' ) . \"' ) OR ( PM.meta_key = 'wpcd_server_ipv4' AND PM.meta_value LIKE '\" . esc_sql( '%' . $wpdb->esc_like( $title ) . '%' ) . \"' ) OR ( PM.meta_key = 'wpcd_server_region' AND PM.meta_value LIKE '\" . esc_sql( '%' . $wpdb->esc_like( $title ) . '%' ) . \"' ) OR ( PM.meta_key = 'wpcd_server_name' AND PM.meta_value LIKE '\" . esc_sql( '%' . $wpdb->esc_like( $title ) . '%' ) . \"' ) ) )\";\n\n\t\t\t\t\t// Modified WHERE.\n\t\t\t\t\t$sql['where'] = sprintf(\n\t\t\t\t\t\t' AND ( (%s) OR (%s) OR (%s) ) ',\n\t\t\t\t\t\t$wpdb->prepare( \"{$wpdb->posts}.post_title LIKE '%%%s%%'\", $title ),\n\t\t\t\t\t\tmb_substr( $sql['where'], 5, mb_strlen( $sql['where'] ) ),\n\t\t\t\t\t\t$server_meta_search\n\t\t\t\t\t);\n\n\t\t\t\t\treturn $sql;\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t}", "public function testFetchLyricsByTitle()\n {\n $songlist = new Songlist($this->con, 0, $this->m);\n $cont = $songlist->FetchLyricsById(0,True, \"Be all end all\");\n }", "function main_url(){\n return \"http://\".$this->imdbsite.\"/name/nm\".$this->imdbid().\"/\";\n }", "public function meta() {\t\t\t\t\t\t\n\t\t\t$this->output->layout = \"empty\";\n\t\t\t$this->output->set(\"actions\", results_array(\"SELECT * FROM actions ORDER BY title\"));\n\t\t\t$this->output->view(\"api/xml/meta.php\");\n\t\t\t$this->output->header(\"Content-Type: text/xml\");\n\t\t\t$this->output->cache($this->default_cache_timeout);\n\t\t}", "public function getQueryDataProvider() {}", "function add_param_oembed_fetch_url( $vmprovider, $vmurl, $vmargs) {\n // unset args that WP is already taking care\n $vmnewargs = $vmargs;\n unset( $vmnewargs['discover'] );\n unset( $vmnewargs['width'] );\n unset( $vmnewargs['height'] );\n\n // build the query url\n $vmparameters = urlencode( http_build_query( $vmnewargs ) );\n\n return $vmprovider . '&'. $vmparameters;\n}", "function groupSearchHandler() {\n global $inputs;\n\n $keyword = $inputs['keyword'];\n $res = getAll(\"SELECT * \n FROM `group` \n WHERE group_name LIKE '%$keyword%' OR description LIKE '%$keyword%'\");\n \n formatOutput(true, 'success',$res);\n}", "function wp_idolondemand_find_similar($args) {\n\textract($args);\n\techo $before_widget;\n\techo $before_title;?>Find Similar<?php echo $after_title;\n\tdisplay_wp_idolondemand_find_similar();\n\techo $after_widget;\n}", "function query() {\n }", "function getAllNews()\n{ \n\t $pubdate_params = array ( \n \"arg0\" => APPTIVO_BUSINESS_API_KEY,\n \"arg1\" => APPTIVO_BUSINESS_ACCESS_KEY\n\t );\n\t $plugin_params = array ( \n \"arg0\" => APPTIVO_BUSINESS_API_KEY,\n\t \"arg1\" => APPTIVO_BUSINESS_ACCESS_KEY\n );\n \n $response = get_data(APPTIVO_BUSINESS_SERVICES,'-news-publisheddate','-news-data','getLastPublishDate','getAllNews',$pubdate_params,$plugin_params);\n return $response;\n}", "function plgSearchNinjaboard( $text, $phrase = '', $ordering = '', $areas = null )\n{\n\tif (is_array( $areas )) \n\t{\n\t\tif (!array_intersect( $areas, array_keys( plgSearchNinjaboardAreas() ) )) {\n\t\t\treturn array();\n\t\t}\n\t}\n\n\t// load plugin params info\n \t$pluginParams = new JParameter( JPluginHelper::getPlugin('search', 'ninjaboard')->params );\n\t$limit = $pluginParams->def( 'search_limit', 50 );\n\n\tif(($text = trim($text)) == '') {\n\t\treturn array();\n\t}\n\n\t$order = 'created_time';\n\t$direction = 'desc';\n\tswitch ( $ordering ) \n\t{\n\t\tcase 'alpha':\n\t\t\t$order = 'subject';\n\t\t\t$direction = 'asc';\n\t\t\tbreak;\n\n\t\tcase 'category':\n\t\t\t$order = array('forum', 'topic');\n\t\t\t$direction = 'desc';\n\t\t\tbreak;\n\n\t\tcase 'popular':\n\t\t\t$order = array('hits', 'created_time');\n\t\t\t$direction = 'asc';\n\t\t\tbreak;\n\t\tcase 'newest':\n\t\t\t$order = 'created_time';\n\t\t\t$direction = 'desc';\n\t\t\tbreak;\n\t\tcase 'oldest':\n\t\t\t$order = 'created_time';\n\t\t\t$direction = 'asc';\n\t}\n\n\n\t$posts = KService::get('com://admin/ninjaboard.model.posts')\n\t\t->search($text)\n\t\t->limit($limit)\n\t\t->sort($order)\n\t\t->direction($direction)\n\t\t->getList();\n\n\t// Bit hackish. Don't blame me, com_search is a piece of M**bo crap\n\t$results = array();\n\tforeach($posts as $post)\n\t{\n\t\t$results[] = (object) array(\n\t\t\t//'href'\t\t\t=> 'index.php?option=com_ninjaboard&view=post&id='.$post->id,\n\t\t\t'href'\t\t\t=> 'index.php?option=com_ninjaboard&view=topic&id='.$post->topic.'&post='.$post->id.'#p'.$post->id.'',\n\t\t\t'title'\t\t\t=> $post->subject,\n\t\t\t'created'\t\t=> $post->created_on,\n\t\t\t'section'\t\t=> $post->forum,\n\t\t\t'text'\t\t\t=> KService::get('ninja:helper.bbcode')->parse(array('text' => $post->text)),\n\t\t\t'browsernav'\t=> 0\n\t\t);\n\t}\n\treturn $results;\n}", "function _admin_search_query()\n {\n }", "public function search_url($url){\n\n\n //Fetch the movie info\n $json = file_get_contents($url);\n\n //Convert json to array\n $array = json_decode($json);\n\n //Get rid of episode list before var_dumping\n //unset($array[0]->episodes);\n\n //Debug\n /*\n echo '<pre>';\n var_dump($array);\n echo '</pre>';\n */\n\n //Setup the video abstraction layer\n $test = new abstract_media;\n\n //Setup output buffering\n ob_start();\n\n //Echo the results\n if(isset($array[0])){\n if(isset($array[0]->poster->cover)){\n echo '<img src=\"'.$array[0]->poster->cover.'\" /><br />';\n $test->cover = $array[0]->poster->cover;\n }\n\n if(isset($array[0]->title)){\n echo 'Title: '.$array[0]->title.\"<br /> \\r\\n\";\n $test->title = $array[0]->title;\n }\n\n if(isset($array[0]->plot_simple)){\n echo 'Plot: '.$array[0]->plot_simple.\"<br /> \\r\\n\";\n $test->plot_simple = $array[0]->plot_simple;\n }\n\n if(isset($array[0]->year)){\n echo 'Year: '.$array[0]->year.\"<br /> \\r\\n\";\n $test->year = $array[0]->year;\n }\n\n if(isset($array[0]->rated)){\n echo 'Rated: '.$array[0]->rated.\"<br /> \\r\\n\";\n $test->rated = $array[0]->rated;\n }\n\n if(isset($array[0]->rating)){\n echo 'Rating: '.$array[0]->rating.\"<br /> \\r\\n\";\n $test->rating = $array[0]->rating;\n }\n\n if(isset($array[0]->runtime)){\n echo 'Runtime(s): '.implode(', ', $array[0]->runtime).\"<br /> \\r\\n\";\n $test->runtime = $array[0]->runtime;\n }\n\n if(isset($array[0]->genres)){\n echo 'Genre(s): '.implode(', ', $array[0]->genres).\"<br /> \\r\\n\";\n $test->genres = $array[0]->genres;\n }\n\n if(isset($array[0]->language)){\n echo 'Language(s): '.implode(', ', $array[0]->language).\"<br /> \\r\\n\";\n $test->language = $array[0]->language;\n }\n\n if(isset($array[0]->country)){\n echo 'Country(s): '.implode(', ', $array[0]->country).\"<br /> \\r\\n\";\n $test->country = $array[0]->country;\n }\n\n if(isset($array[0]->actors)){\n echo 'Actors: '.implode(', ', $array[0]->actors).\"<br /> \\r\\n\";\n $test->actors = $array[0]->actors;\n }\n\n if(isset($array[0]->directors)){\n echo 'Director(s): '.implode(', ', $array[0]->directors).\"<br /> \\r\\n\";\n $test->directors = $array[0]->directors;\n }\n\n if(isset($array[0]->writers)){\n echo 'Writer(s): '.implode(', ', $array[0]->writers).\"<br /> \\r\\n\";\n $test->writers = $array[0]->writers;\n }\n\n if(isset($array[0]->filming_locations)){\n echo 'Filming Location(s): '.$array[0]->filming_locations.\"<br /> \\r\\n\"; //This is output as a string for some reason\n $test->filming_locations = $array[0]->filming_locations;\n }\n\n if(isset($array[0]->imdb_id)){\n echo 'IMDb id: '.$array[0]->imdb_id.\"<br /> \\r\\n\";\n $test->ibdb_id = $array[0]->imdb_id;\n }\n }\n\n //Save the output buffer contents in the output variable\n $test->output = ob_get_contents();\n ob_end_clean();\n\n //Return the abstract video object\n return $test;\n }", "function admin() {\n $value=clean_input($_GET['value']);\n $tag=clean_input($_GET['tag']);\n $table=clean_input($_GET['table']);\n $sql=\"show fields from $table\";\n $res=dbHelp::mysql_query2($sql) or die ($sql);\n // mysql_data_seek($res,0);\n $field1=dbHelp::mysql_fetch_row2($res);\n // mysql_data_seek($res,1);\n $field2=dbHelp::mysql_fetch_row2($res);\n \n $sql=\"select \" . $field2[0] . \",\". $field1[0] . \" from $table where lower(\" . $field2[0] . \") like lower('\" . $value . \"%')\";\n $res=dbHelp::mysql_query2($sql) or die ($sql);\n $arr=dbHelp::mysql_fetch_row2($res);\n echo $arr[0];\n echo \"|\" . $arr[1];\n}", "function sql_search_relative_titles($mastertitle,$field2check) {\n $db = GetGlobal('db');\t\n\t $lan = $lang?$lang:getlocal();\n\t $itmname = $lan?'itmname':'itmfname';\n\t $itmdescr = $lan?'itmdescr':'itmfdescr';\n\t\t$remarks = 'itmremark';\t\n\t\t$sqlout = null;\t\t\n\t\n\t $mt = explode(' ',trim($mastertitle));\n //print_r($mt);\n $sSQL = \"select \".$this->getmapf('code').\" from products where \"; //whole words...\n\t\t \t\t\n\t foreach ($mt as $i=>$lex) {\n\t\t\n\t\t if (($la = trim($lex)) && (strlen($la)>4)) {//words max than 4 chars\n\t\t\n\t\t $ulex = strtoupper($lex);\n\t\t $dlex = strtolower($lex);\n \n\t\t $sqlout[$lex] = \"$itmname like '%$lex%' \";// or $itmdescr like '%$lex%' or $remarks like '%$lex%'\";// or \"; //as is\n\t\t //$sSQL .= \"$itmname like '% $ulex %' or $itmdescr like '% $ulex %' or $remarks like '% $ulex %' or \"; //upper case\t\t\n\t\t //$sSQL .= \"$itmname like '% $dlex %' or $itmdescr like '% $dlex %' or $remarks like '% $dlex %'\"; //lower case\t\t\n\t\t \n\t\t }//if lex\n\t\t} \n\t\t\n //print_r($sqlout); \n\t\tif ($sqlout) {\n\t\t $sSQL .= implode(' or ',$sqlout);\t\t \n\t\t return ($sSQL);\n\t\t}\n\t\telse\n\t\t return null;\n\t}", "public function searchAction() {\n $search = $this->getParam('search');\n\n\n $queryBuilder = new Application_Util_QueryBuilder($this->getLogger());\n\n $queryBuilderInput = array(\n 'searchtype' => 'simple',\n 'start' => '0',\n 'rows' => '10',\n 'sortOrder' => 'desc',\n 'sortField'=> 'score',\n 'docId' => null,\n 'query' => $search,\n 'author' => '',\n 'modifier' => 'contains_all',\n 'title' => '',\n 'titlemodifier' => 'contains_all',\n 'persons' => '',\n 'personsmodifier' => 'contains_all',\n 'referee' => '',\n 'refereemodifier' => 'contains_all',\n 'abstract' => '',\n 'abstractmodifier' => 'contains_all',\n 'fulltext' => '',\n 'fulltextmodifier' => 'contains_all',\n 'year' => '',\n 'yearmodifier' => 'contains_all',\n 'author_facetfq' => '',\n 'languagefq' => '',\n 'yearfq' => '',\n 'doctypefq' => '',\n 'has_fulltextfq' => '',\n 'belongs_to_bibliographyfq' => '',\n 'subjectfq' => '',\n 'institutefq' => ''\n );\n\n\n $query = $queryBuilder->createSearchQuery($queryBuilderInput, $this->getLogger());\n\n $result = array();\n\n $searcher = new Opus_SolrSearch_Searcher();\n try {\n $result = $searcher->search($query);\n }\n catch (Opus_SolrSearch_Exception $ex) {\n var_dump($ex);\n }\n\n $matches = $result->getReturnedMatches();\n\n $this->view->total = $result->getAllMatchesCount();\n $this->view->matches = $matches;\n }", "function wp_filter_oembed_iframe_title_attribute($result, $data, $url)\n {\n }", "public function search(){\r\n\t\t$parishID = Convert::raw2sql($this->request->getVar('ParishID'));\t\t\r\n\t\tif(!$this->canAccess($parishID)){\r\n\t\t\treturn $this->renderWith(array('Unathorised_access', 'App'));\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t$this->title = 'Search Media';\r\n\t\t$this->list = $this->Results();\r\n\t\treturn $this->renderWith(array('Media_results','App'));\r\n\t}", "public function setTitle(string $title): ISearchOption;", "public function getSearch();", "public function addQuery($user,$url,$title){\n if(!$this->redis->keys(md5($user))){$this->firstTimer($user);}\n $data['error']=true;\n //save search\n if(strpos($url,\"?\")){\n $url = substr($url, strpos($url,\"?\"));\n }\n $save_search = $this->redis->hSet(md5($user).\":saved_search\",$title,$url);\n if($save_search){\n $getval = $this->redis->hGetAll(md5($user).\":saved_search\");\n $data['error']=false;\n $data['content']=$getval;\n }\n return $data;\n }", "function dvdinsideMeta()\n{\n return array('name' => 'DVD Inside');\n}", "function getTable($fb, $access_token){\r\n $query = \"/search?\";\r\n if(strcmp($_GET['type'], \"user\") == 0)\r\n $query .= \"q='\" . $_GET['keyword'] . \"'&type=user&fields=id,name,picture.width(700).height(700)&access_token=\" . $access_token;\r\n else if(strcmp($_GET['type'], \"event\") == 0)\r\n\t$query .= \"q='\" . $_GET['keyword'] . \"'&type=event&fields=id,name,picture.width(700).height(700),place&access_token=\" . $access_token;\r\n else if(strcmp($_GET['type'], \"page\") == 0)\r\n\t$query .= \"q='\" . $_GET['keyword'] . \"'&type=page&fields=id,name,picture.width(700).height(700)&access_token=\" . $access_token;\r\n else if(strcmp($_GET['type'], \"group\") == 0)\r\n\t$query .= \"q='\" . $_GET['keyword'] . \"'&type=group&fields=id,name,picture.width(700).height(700)&access_token=\" . $access_token;\r\n else if(strcmp($_GET['type'], \"place\") == 0){\r\n\r\n \r\n\tif(isset($_GET['lat']) && isset($_GET['lng'])){\r\n\t $query .= \"q='\" . $_GET['keyword'] . \"'&type=place&center=\" . $_GET['lat'] . \",\" . $_GET['lng'] . \"&fields=id,name,picture.width(700).height(700)&access_token=\" . $access_token;\r\n\t}\r\n\telse\r\n\t $query = \"me\";\r\n\r\n }\r\n\r\n$response = fbQuery($fb, $query)->getBody();\r\n echo \"{\\\"type\\\":\\\"\".$_GET['type'].\"\\\",\\\"data\\\":[\".$response.\"]}\";\r\n\r\n}", "public static function search() {\r\n $result = lC_Default::find($_GET['q']);\r\n\r\n echo $result;\r\n }", "public static function query();", "public function search( $area, $version, array $op )\n {\n $whrr = $this->genWhere( $op );\n\n if( $whrr != '' )\n $whrr = \"AND ( {$whrr} )\";\n\n\n $list = Yii::$app->db->createCommand( \"\n\n SELECT\n *\n FROM\n scarlet_data\n LEFT JOIN scarlet_history ON scarlet_data.id = scarlet_history.data_id\n LEFT JOIN scarlet_version ON scarlet_history.version_id = scarlet_version.id\n LEFT JOIN scarlet_field ON scarlet_field.version_id = scarlet_version.id\n LEFT JOIN scarlet_data_integer ON scarlet_data_integer.history_id = scarlet_history.id AND scarlet_field.`type` = 2\n LEFT JOIN scarlet_data_date ON scarlet_data_date.history_id = scarlet_history.id AND scarlet_field.`type` = 10\n LEFT JOIN scarlet_data_decimal ON scarlet_data_decimal.history_id = scarlet_history.id AND scarlet_field.`type` = 3\n LEFT JOIN scarlet_data_boolean ON scarlet_data_boolean.history_id = scarlet_history.id AND scarlet_field.`type` = 11\n LEFT JOIN scarlet_data_textarea ON scarlet_data_textarea.history_id = scarlet_history.id AND scarlet_field.`type` = 4\n LEFT JOIN scarlet_data_varchar ON scarlet_data_varchar.history_id = scarlet_history.id AND scarlet_field.`type` in (1,5,6,7,8,9)\n WHERE\n deleted=0\n AND scarlet_data.area_id={$area}\n AND scarlet_history.current=1\n {$whrr}\n GROUP BY\n scarlet_data.id\n\n \" )->queryAll();\n\n return $list;\n\n }", "function lc_oembed_result($ythtml, $yturl, $ytargs) {\n \n\t$ytnewargs = $ytargs;\n\t// get rid of discover=true argument\n\tarray_pop( $ytnewargs );\n \n\t$ytparameters = http_build_query( $ytnewargs );\n \n\t// Modify video parameters\n\t$ythtml = str_replace( '?feature=oembed', '?feature=oembed'.'&amp;'.$ytparameters, $ythtml );\n \n return $ythtml;\n}", "function wp_filter_oembed_result($result, $data, $url)\n {\n }", "public function getName()\n {\n return 'oo_content_search';\n }", "public function indexAction()\n {\n $query = !empty(trim($_GET['s'])) ? trim($_GET['s']) : null;\n if($query)\n {\n $products = \\R::find('product', \"title LIKE ? AND status = '1'\", [\"%{$query}%\"]);\n }\n $this->setMeta('Поиск по: ' . h($query));\n $this->set(compact('products', 'query'));\n }", "function wp_filter_pre_oembed_result($result, $url, $args)\n {\n }", "function get_title()\n {\n }", "public function search()\n\t{\n\t\t\n\t}", "public function query();", "public function query();", "public function query();", "public function gettitle($title){\n $xpath = new DOMXpath(self::$xmldoc);\n $search = $xpath->query(\"channel/item[text()[contains('$title', g:title)] ]/g:title\");\n $DOMsearchnode = $search->item(0);\n echo $DOMsearchnode->nodeValue;\n }" ]
[ "0.55437243", "0.55127805", "0.53031915", "0.52433", "0.5176246", "0.5174078", "0.51416534", "0.5122727", "0.5116539", "0.51081324", "0.5076951", "0.5042895", "0.500784", "0.50071234", "0.50063574", "0.49717832", "0.49602446", "0.49433488", "0.49287233", "0.49139565", "0.4913121", "0.4909856", "0.48986563", "0.48893324", "0.48887506", "0.48879138", "0.48868638", "0.4883941", "0.48778722", "0.48552418", "0.48542297", "0.48403335", "0.48356274", "0.48323023", "0.48185858", "0.48054272", "0.4791309", "0.47912112", "0.47888777", "0.47870335", "0.47652647", "0.4761999", "0.4761999", "0.47573745", "0.47501203", "0.47501203", "0.47489822", "0.47471076", "0.47471076", "0.47440273", "0.47437662", "0.47378513", "0.47261214", "0.47156626", "0.4712684", "0.471117", "0.47100523", "0.47090143", "0.47081944", "0.4708155", "0.46942094", "0.46940354", "0.46940354", "0.4692066", "0.46849567", "0.46814662", "0.46784872", "0.46722576", "0.46713173", "0.4670104", "0.46686327", "0.46675426", "0.46668303", "0.46665046", "0.46658778", "0.4665706", "0.46654528", "0.46643403", "0.46602416", "0.46555382", "0.46511844", "0.4646652", "0.46450996", "0.46448267", "0.4641685", "0.4623022", "0.46198246", "0.46145725", "0.46092528", "0.46084154", "0.46083087", "0.46077925", "0.46013945", "0.4594449", "0.4589684", "0.4589212", "0.4588719", "0.4588719", "0.4588719", "0.4577285" ]
0.5869707
0
Return whether we're testing Varien_Object, where bug in unsetOldData() is fixed
protected static function _isFixedBugWithOldDataNullKey() { if (!defined('TESTS_MAGENTO_PATH')) { return true; // php_mage extension has non-buggy functionality } $reflectionMethod = new ReflectionMethod('Varien_Object', 'unsetOldData'); $sourceClass = file($reflectionMethod->getFileName()); $sourceMethod = array_slice($sourceClass, $reflectionMethod->getStartLine(), $reflectionMethod->getEndLine() - $reflectionMethod->getStartLine()); $source = implode("\n", $sourceMethod); return strpos($source, '$this->_oldFieldsMap') !== false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function changelog_validate_object () {\n\t\t# set valid objects\n\t\t$objects = array(\n\t\t\t\t\t\t\"ip_addr\",\n\t\t\t\t\t\t\"subnet\",\n\t\t\t\t\t\t\"section\"\n\t\t\t\t\t\t);\n\t\t# check\n\t\treturn in_array($this->object_type, $objects) ? true : false;\n\t}", "protected function isUnchanged() {}", "public function checkExtObj() {}", "public function checkExtObj() {}", "public function isObject(): bool\n {\n return $this->phpType === self::OBJECT;\n }", "public function isNew(Varien_Object $object)\n {\n $isNew = null === $object->getOrigData();\n\n return $isNew;\n }", "public function getIsObject() {\n $primitives = array(\"boolean\", \"integer\", \"int\", \"string\", \"float\");\n return !is_numeric(array_search($this->getType(), $primitives));\n }", "public function is_user_object_data() {\n return false;\n }", "public function testDirtyUnset()\n {\n $data = new ArrayObject(\n array(\n 'foo' => 'bar'\n )\n );\n\n $this->assertArrayHasKey('foo', $data);\n $this->assertFalse($data->isDirty());\n unset($data['foo']);\n $this->assertTrue($data->isDirty());\n }", "public function testIsObject() {\n\t\t$array = array('one' => 1, 'two' => 2);\n\t\t$object = (object)$array;\n\t\t$result = _::isObject($object);\n\t\t$this->assertTrue($result);\n\n\t\t// test that an object is an object\n\t\t$result = _::isObject($array);\n\t\t$this->assertFalse($result);\n\t}", "public function checkSubExtObj() {}", "function testFieldsDontRerequestChanges() {\r\n\t\t$db = DB::getConn();\r\n\t\tDB::quiet();\r\n\t\t\r\n\r\n\t\t// Table will have been initially created by the $extraDataObjects setting\r\n\t\t\r\n\t\t\r\n\t\t// Verify that it doesn't need to be recreated\r\n\t\t$db->beginSchemaUpdate();\r\n\t\t$obj = new DataObjectSchemaGenerationTest_DO();\r\n\t\t$obj->requireTable();\r\n\t\t$needsUpdating = $db->doesSchemaNeedUpdating();\r\n\t\t$db->cancelSchemaUpdate();\r\n\t\t\r\n\t\t$this->assertFalse($needsUpdating);\r\n\t}", "public function hasObject();", "public function hasDirtyData(): bool\n {\n return ($this->state == self::STATE_MANAGED\n && ($data = $this->itemReflection->dehydrate($this->item))\n && (! $this->isDataEqual($data, $this->originalData))\n );\n }", "function _are_attrs_modified($old_slice, $new_slice) {\n return $old_slice['index'] != $new_slice['index'];\n }", "public function hasDataChanged($object)\n {\n if (!$object->getOrigData()) {\n return true;\n }\n\n $fields = $this->_getWriteAdapter()->describeTable($this->_getTableByValue($object));\n foreach (array_keys($fields) as $field) {\n if ($object->getOrigData($field) != $object->getData($field)) {\n return true;\n }\n }\n\n return false;\n }", "public function isObject()\n {\n return \\is_object($this->value);\n }", "public function isSetItemData()\n {\n return !is_null($this->_fields['ItemData']['FieldValue']);\n }", "public function valid()\n {\n $key = key($this->_object);\n return ($key !== null && $key !== false);\n }", "public function testDirtySet()\n {\n $data = new ArrayObject;\n $this->assertFalse($data->isDirty());\n $data['foo'] = 'bar';\n $this->assertArrayHasKey('foo', $data);\n $this->assertTrue($data->isDirty());\n }", "function dry() {\n\t\treturn is_null($this->object);\n\t}", "public function testIsValidSuccessWithoutHasDataChanges()\n {\n $this->_object->expects($this->once())->method('hasDataChanges')->will($this->returnValue(false));\n $validator = new \\Magento\\Framework\\Validator\\Entity\\Properties();\n $validator->setReadOnlyProperties(['attr1']);\n $this->assertTrue($validator->isValid($this->_object));\n }", "public function testIsThereAnySyntaxError(){\n $var = new Serversidebim\\IFCReader\\IFCStepReader(null);\n $this->assertTrue(is_object($var));\n unset($var);\n }", "public function valid()\n {\n return (current($this->objects) !== false);\n }", "protected function testObject() {\n }", "public function isObsolete() {\n\n if($this->options['overwrite'] === true) return false;\n\n // try to use the original if resizing is not necessary\n if($this->options['width'] >= $this->source->width() &&\n $this->options['height'] >= $this->source->height() &&\n $this->options['crop'] == false &&\n $this->options['blur'] == false &&\n $this->options['upscale'] == false) return true;\n\n return false;\n\n }", "private function supportData()\n {\n $dataClass = $this->type->getDataClass();\n\n return $this->data instanceof $dataClass || $dataClass === get_class($this->data);\n }", "#[\\ReturnTypeWillChange]\n public function valid()\n {\n return key($this->_data) !== null;\n }", "public static function version_exist(DataObject $object) {\n\t\tif (Object::has_extension($object->ClassName, 'Versioned')) {\n\t\t\t$ID = (int)$object->ID;\n\t\t\tforeach (self::version_stages($object) as $stage) {\n\t\t\t\tif (Versioned::get_versionnumber_by_stage($object->ClassName, $stage, $ID))\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private function check_object($value) : bool\n {\n if (!is_object($value) && !is_array($value))\n return false;\n\n return true;\n }", "public function valid () {\n return (FALSE !== current ($this->varContainer));\n }", "public static function old_version() {\n\n\t\tif ( class_exists( 'TM_Custom_Prices' ) ) {\n\t\t\treturn TRUE;\n\t\t}\n\n\t\treturn FALSE;\n\n\t}", "private function isValidForVersioning()\n {\n $dontVersionFields = isset( $this->dontVersionFields ) ? $this->dontVersionFields : [];\n $removeableKeys = array_merge($dontVersionFields, [$this->getUpdatedAtColumn()]);\n\n if (method_exists($this, 'getDeletedAtColumn')) {\n $removeableKeys[] = $this->getDeletedAtColumn();\n }\n\n return ( count(array_diff_key($this->versionableDirtyData, array_flip($removeableKeys))) > 0 );\n }", "public function isValid()\n {\n return ($this->obj != false);\n }", "public function checkSubExtObj()\n {\n if (is_object($this->extObj)) {\n $this->extObj->checkExtObj();\n }\n }", "public function test()\n\t{\t\t\n\t\treturn (!PHPFOX_SAFE_MODE ? true : false);\n\t}", "static function isArrayObject($var){\n\t\tif(self::isInstanceOf($var, 'Webiny\\Component\\StdLib\\StdObject\\ArrayObject\\ArrayObject')){\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "abstract protected function isValid(\\stdClass $data): bool;", "public function isOriginal(){\n return count($this->results) == 0;\n }", "public function checkImported($object) {\n if (!empty($this->source->data)) {\n if (in_array($object['Key'], $this->source->data)) {\n return true;\n }\n }\n return false;\n }", "protected function testObjects() {\n }", "public function isNotChanged()\n {\n return empty(array_diff_assoc($this->items, $this->clone));\n }", "public function testIsThereAnySyntaxError() {\n\t\t$var = new Convertor;\n\t\t$this->assertTrue(is_object($var));\n\t\tunset($var);\n\t}", "public function testFreedIsFalse(): void\n {\n $this->assertFalse($this->get_reflection_property_value('freed'));\n }", "public function wasDeleted(){\n\t\t//if data pk and no orig pk i was probably deleted at some unknow nesting depth\n\t\t$ret = false;\n\t\tif(isset($this->data[$this->primaryKey])){\n\t\t\tif($this->data[$this->primaryKey]){\n\t\t\t\tif(!isset($this->orig[$this->primaryKey])){\n\t\t\t\t\t$ret = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public function has_changes() {\n\t\t\t$properties = array_keys(get_object_vars($this));\n\t\t\t$order = SalesOrderEdit::load($this->sessionid, $this->orderno);\n\n\t\t\tforeach ($properties as $property) {\n\t\t\t\tif ($this->$property != $order->$property) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "public function isModified(): bool;", "function VariationOrProductIsInCart() {\r\n\t\treturn ($this->owner->IsInCart() || $this->VariationIsInCart());\r\n\t}", "public function isNoValidationTypeDetermined($object): bool;", "public function testSetAndRetrieveObject(): void\n {\n $obj = new \\stdClass;\n $obj->animal = \"Frog\";\n $obj->mineral = \"Quartz\";\n $obj->vegetable = \"Spinach\";\n $testObj = new \\stdClass;\n $testObj->testInt = 5;\n $testObj->testFloat = 3.278;\n $testObj->testString = \"WooHoo\";\n $testObj->testBoolean = true;\n $testObj->testNull = null;\n $testObj->testArray = array(1,2,3,4,5);\n $testObj->testObject = $obj;\n $key = \"TestObject\";\n $this->testNotStrict->set($key, $testObj);\n $a = $this->testNotStrict->get($key);\n $bool = is_object($a);\n $this->assertTrue($bool);\n $this->assertEquals($testObj->testInt, $a->testInt);\n $this->assertEquals($testObj->testFloat, $a->testFloat);\n $this->assertEquals($testObj->testString, $a->testString);\n $this->assertEquals($testObj->testBoolean, $a->testBoolean);\n $this->assertNull($a->testNull);\n $this->assertEquals($testObj->testArray, $a->testArray);\n $this->assertEquals($testObj->testObject, $a->testObject);\n }", "public function canUnsetOffsetsWithAValue()\n {\n $object0 = $this->getMock('ATM_Config_Abstract', array('getName'));\n $object1 = $this->getMock('ATM_Config_Abstract', array('getName'));\n $this->object->append($object0);\n $this->object->append($object1);\n $this->object->append($object0);\n $expect = array($object0, $object1, $object0);\n $this->assertAttributeEquals($expect, 'content', $this->object);\n $this->object->searchAndUnset($object0);\n $this->assertAttributeEquals(array($object1), 'content', $this->object);\n $this->assertAttributeEquals(\n array(get_class($object1)), 'classes', $this->object\n );\n $this->assertAttributeEquals(\n array($object1->getName()), 'names', $this->object\n );\n }", "public function is_objectcache_old_add_in() {\n\t\tif ( !$this->objectcache_installed() )\n\t\t\treturn false;\n\n\t\treturn ( ( $script_data = @file_get_contents( W3TC_ADDIN_FILE_OBJECT_CACHE ) )\n\t\t\t&& ( ( strstr( $script_data, 'W3 Total Cache Object Cache' ) !== false ) ||\n\t\t\t\tstrstr( $script_data, 'w3_instance' ) !== false ) );\n\t}", "function __isset($name) {\n\t\treturn array_key_exists($name,$this->object);\n\t}", "public function testIsValidFailed()\n {\n $this->_object->expects($this->once())->method('hasDataChanges')->will($this->returnValue(true));\n $this->_object->expects($this->once())->method('getData')->with('attr1')->will($this->returnValue(1));\n $this->_object->expects($this->once())->method('getOrigData')->with('attr1')->will($this->returnValue(2));\n\n $validator = new \\Magento\\Framework\\Validator\\Entity\\Properties();\n $validator->setReadOnlyProperties(['attr1']);\n $this->assertFalse($validator->isValid($this->_object));\n }", "public function retainObjectOrder()\n {\n return false;\n }", "public function hasObject()\n {\n return (bool)!empty($this->object);\n }", "public function isHydrated() {\n\t\treturn !empty($this->originalData);\t\t\n\t}", "public function changed() {\n\t\t\tif (!$this->original_data) {\n\t\t\t\tthrow new Exception('call exists() before calling changed()');\n\t\t\t}\n\t\t\t\n\t\t\tif ($this->last_change != $this->original_last_change ||\n\t\t\t $this->last_change_reason != $this->original_last_change_reason ||\n\t\t\t $this->lanes_affected != $this->original_lanes_affected ||\n\t\t\t $this->traffic_impact != $this->original_traffic_impact ||\n\t\t\t $this->reason != $this->original_reason) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\treturn false;\n\t\t}", "public function hasOriginalValues()\n {\n return $this->OriginalValues !== null;\n }", "function _isObjectCallback($sFunction)\n\t{\n\t\tif (array_key_exists($sFunction, $this->aObjects)) return true;\n\t\treturn false;\n\t}", "public function testFreedIsTrue(): void\n {\n $this->get_accessible_reflection_property('freed');\n $this->assertTrue($this->get_reflection_property_value('freed'));\n }", "public function overrule_transients() {\n\t\t\treturn ( defined( 'STOREFRONT_BETA_TESTER_FORCE_UPDATE' ) && STOREFRONT_BETA_TESTER_FORCE_UPDATE );\n\t\t}", "public function testReset()\n {\n $object = new \\Webaholicson\\Minimvc\\Core\\Object(['test' => true]);\n $class = new \\ReflectionClass('\\Webaholicson\\Minimvc\\Core\\Object');\n $data = $class->getProperty('_data');\n $data->setAccessible(true);\n \n $this->assertNotEquals($this->data, $data->getValue($object));\n $this->assertSame($object, $object->reset());\n $this->assertEquals($this->data, $data->getValue($object));\n }", "public function testIsThereAnySyntaxError() {\n $var = new ircsasw\\timeline\\Timeline;\n $this->assertTrue(is_object($var));\n unset($var);\n }", "public function isVersionless(): bool\n {\n return ! $this->isVersioning();\n }", "public function testIsThereAnySyntaxError()\n {\n $this->assertTrue(is_object($this->transaction));\n }", "function isVariation() : bool;", "public function is_null() { return is_null($this->obj); }", "function newDataObject() {\n\t\tassert(false); // Should be implemented by subclasses\n\t}", "public function isOutdated() {}", "private function check_sanity()\n {\n if (!is_object($this->qb))\n {\n return false;\n }\n \n if (empty($this->pager_id))\n {\n\n return false;\n }\n return true;\n }", "public function _isClone() {}", "public function isVirtual(): bool;", "function valid() {\r\n return isset($this->_data[$this->_position]);\r\n }", "public function isObjectDataValid()\n\t{\n\t\tforeach ($this->objectRequiredDataFields AS $requiredField => $_tmp) {\n\t\t\t$checkValue = $this->getObjectData($requiredField);\n\t\t\t$validationReturn = $this->validate($requiredField, $checkValue);\n\n\t\t\tif ($validationReturn != true) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "public function isModified();", "public function equals($other) { return $this->obj==Sandbox::unwrap($other); }", "public function testIsValidSuccessWithoutInvokedSetter()\n {\n $validator = new \\Magento\\Framework\\Validator\\Entity\\Properties();\n $this->assertTrue($validator->isValid($this->_object));\n }", "public function __invoke($data): bool\n {\n return !(is_object($data))\n || count(get_object_vars($data)) >= $this->minimum;\n }", "function isReferenceTo ( &$anObject ) {\n \t\t// Store the value of $anObject\n \t\t$temp = $anObject;\n \t\t\n \t\t// Set the value of $anObject to something unique and see if $this\n \t\t// has changed as well.\n\t\t$anObject = uniqid(\"test_ref\");\n\t\t$is_ref = ($anObject === $this);\n\t\t\n\t\t// Put back the original value.\n\t\t$anObject = $temp;\n \t\treturn $is_ref;\n \t}", "private function checkForNewRecord(): bool\n {\n return null === $this->getOldName();\n }", "function offsetExists(/*. mixed .*/ $object_){}", "private function isOldVersion() {\r\n\t\treturn $this->getRequest ()->getParam ( \"oldversion\", null ) == 1;\r\n\t}", "public function access()\n {\n return $this->hasInstanceOldPlugins();\n }", "protected function _checkRecordInstance()\n {\n if (!$this->_entity)\n {\n $this->_entity = new $this->entityName();\n return false;\n }\n else\n return true; \n }", "function _isNew() ;", "protected function needsToBeCleaned()\n {\n return boolval($this->cleanData);\n }", "protected function _isPersistent(){\n\t\treturn (bool) false;\n\t}", "public function hasOldPrice(){\n return $this->_has(17);\n }", "public function isRisky(): bool;", "private function make_extended_data_persistent() {\n\t\t\tif ( ! $this->dataChanged ) return false;\n\t\t\tif ( empty( $this->exdata ) ) return false;\n\t\t\tif ( ! $this->slplus->database->is_Extended() ) return false;\n\n\t\t\t$changed_record_count = $this->slplus->database->extension->update_data( $this->id, $this->exdata );\n\n\t\t\t$this->slplus->database->reset_extended_data_flag();\n\n\t\t\treturn ( $changed_record_count > 0 );\n\t\t}", "public function valid(){\n\t\treturn (is_array($this->data) ? key($this->data) !== null : false);\n\t}", "public function getHasWrongEdition(): bool\n {\n /** @var WebApplication|ConsoleApplication $this */\n $licensedEdition = $this->getLicensedEdition();\n\n return ($licensedEdition !== null && $licensedEdition !== $this->getEdition() && !$this->getCanTestEditions());\n }", "public function isChanged()\n {\n return ! empty(array_diff_assoc($this->items, $this->clone));\n }", "public function testNothingModified()\n {\n $check = $this->_cs->checkEntitiesChanged(rand(0, 9999), array(self::ENTITY_NAME));\n $this->assertTrue($check);\n }", "private function changed() {\n return !empty($this->tags['new']) || \n !empty($this->tags['del']);\n }", "public function testIsVendorClassReturnsFalseIfNameOfInternalClassIsPassed()\n {\n $this->assertFalse(VendorResources::isVendorClass('\\stdClass'));\n }", "public function hasRepeatedObjField()\n {\n return count($this->get(self::REPEATED_OBJ_FIELD)) !== 0;\n }", "function isModified() {\n\t\t$modified = $this->_Modified;\n\t\tif ( !$modified && $this->getCount() > 0 ) {\n\t\t\tforeach ( $this as $oObject ) {\n\t\t\t\t$modified = $modified || $oObject->isModified();\n\t\t\t}\n\t\t}\n\t\treturn $modified;\n\t}", "function isModified() {\n\t\t$modified = $this->_Modified;\n\t\tif ( !$modified && $this->getCount() > 0 ) {\n\t\t\tforeach ( $this as $oObject ) {\n\t\t\t\t$modified = $modified || $oObject->isModified();\n\t\t\t}\n\t\t}\n\t\treturn $modified;\n\t}" ]
[ "0.6035578", "0.595178", "0.59030485", "0.5902927", "0.5800507", "0.5791812", "0.57532674", "0.57275575", "0.5698497", "0.5694829", "0.56756383", "0.56614673", "0.5654564", "0.56535953", "0.5642814", "0.5601161", "0.55899113", "0.55794257", "0.55789065", "0.55774814", "0.5559911", "0.55342436", "0.5527149", "0.5511489", "0.5495088", "0.5479017", "0.546253", "0.5440532", "0.5439862", "0.54388636", "0.5437817", "0.5428876", "0.54278207", "0.5411938", "0.5404323", "0.5382311", "0.5382276", "0.5382231", "0.5374232", "0.53713596", "0.5369741", "0.5362776", "0.5354114", "0.53496206", "0.5343706", "0.5339812", "0.53353024", "0.53294915", "0.53284687", "0.53244567", "0.5320107", "0.5318894", "0.5314903", "0.53056324", "0.5304621", "0.52968717", "0.528617", "0.5284627", "0.52822596", "0.5278577", "0.52763075", "0.52681696", "0.52642614", "0.5263108", "0.5259116", "0.52591085", "0.5241227", "0.5227629", "0.5227162", "0.5226802", "0.52236557", "0.5221625", "0.52178127", "0.5215011", "0.5208259", "0.5208097", "0.5203071", "0.5201874", "0.51990515", "0.51987046", "0.5191902", "0.51874673", "0.51784825", "0.51736397", "0.5171965", "0.51602274", "0.5153572", "0.5152331", "0.5148131", "0.5145254", "0.5143026", "0.5139713", "0.51274943", "0.5127297", "0.5106735", "0.51063526", "0.51060236", "0.5100224", "0.50963163", "0.50963163" ]
0.72413844
0
Test for a case, when there are numbered old fields. This use case is never used in Magento (moreover it has bugs there), so the test just ensures, that no exceptions or segfaults occur because of such call
public function testUnsetOldDataWithNumbers($initialData, $key) { $object = new Zerkella_PhpMage_Varien_Object_Descendant_OldFieldsMap_DynamicWithNumbers($initialData); $result = $object->unsetOldData($key); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function testFieldsDontRerequestChanges() {\r\n\t\t$db = DB::getConn();\r\n\t\tDB::quiet();\r\n\t\t\r\n\r\n\t\t// Table will have been initially created by the $extraDataObjects setting\r\n\t\t\r\n\t\t\r\n\t\t// Verify that it doesn't need to be recreated\r\n\t\t$db->beginSchemaUpdate();\r\n\t\t$obj = new DataObjectSchemaGenerationTest_DO();\r\n\t\t$obj->requireTable();\r\n\t\t$needsUpdating = $db->doesSchemaNeedUpdating();\r\n\t\t$db->cancelSchemaUpdate();\r\n\t\t\r\n\t\t$this->assertFalse($needsUpdating);\r\n\t}", "public function testUpdateFieldsWrongType(): void { }", "public function testUpdateValuesContainNumbers(): void { }", "public function testNumberFields()\n {\n $field = $this->table->getField('numberone');\n $this->assertInstanceOf('Metrol\\DBTable\\Field\\PostgreSQL\\Integer',\n $field);\n $this->assertEquals('numberone', $field->getName());\n $this->assertTrue($field->isNullOk());\n $this->assertNull($field->getDefaultValue());\n $this->assertEquals(-2147483648, $field->getMin());\n $this->assertEquals(2147483647, $field->getMax());\n\n $field = $this->table->getField('numbertwo');\n $this->assertInstanceOf('Metrol\\DBTable\\Field\\PostgreSQL\\Numeric',\n $field);\n $this->assertEquals('numbertwo', $field->getName());\n $this->assertTrue($field->isNullOk());\n $this->assertNull($field->getDefaultValue());\n $this->assertEquals(-9999.9999, $field->getMin());\n $this->assertEquals(9999.9999, $field->getMax());\n\n $field = $this->table->getField('numberthree');\n $this->assertInstanceOf('Metrol\\DBTable\\Field\\PostgreSQL\\Integer',\n $field);\n $this->assertEquals('numberthree', $field->getName());\n $this->assertTrue($field->isNullOk());\n $this->assertNull($field->getDefaultValue());\n $this->assertEquals(-9223372036854775808, $field->getMin());\n $this->assertEquals(9223372036854775807, $field->getMax());\n\n $field = $this->table->getField('numberfour');\n $this->assertInstanceOf('Metrol\\DBTable\\Field\\PostgreSQL\\Integer',\n $field);\n $this->assertEquals('numberfour', $field->getName());\n $this->assertTrue($field->isNullOk());\n $this->assertNull($field->getDefaultValue());\n $this->assertEquals(-32768, $field->getMin());\n $this->assertEquals(32767, $field->getMax());\n\n $field = $this->table->getField('numberfive'); // Double precision field\n $this->assertInstanceOf('Metrol\\DBTable\\Field\\PostgreSQL\\Numeric',\n $field);\n $this->assertEquals('numberfive', $field->getName());\n $this->assertTrue($field->isNullOk());\n $this->assertNull($field->getDefaultValue());\n\n $field = $this->table->getField('numbersix'); // Money field\n $this->assertInstanceOf('Metrol\\DBTable\\Field\\PostgreSQL\\Numeric',\n $field);\n $this->assertEquals('numbersix', $field->getName());\n $this->assertTrue($field->isNullOk());\n $this->assertNull($field->getDefaultValue());\n\n $field = $this->table->getField('numberseven'); // real field\n $this->assertInstanceOf('Metrol\\DBTable\\Field\\PostgreSQL\\Numeric',\n $field);\n $this->assertEquals('numberseven', $field->getName());\n $this->assertTrue($field->isNullOk());\n $this->assertNull($field->getDefaultValue());\n }", "protected static function _isFixedBugWithOldDataNullKey()\n {\n if (!defined('TESTS_MAGENTO_PATH')) {\n return true; // php_mage extension has non-buggy functionality\n }\n\n $reflectionMethod = new ReflectionMethod('Varien_Object', 'unsetOldData');\n $sourceClass = file($reflectionMethod->getFileName());\n $sourceMethod = array_slice($sourceClass, $reflectionMethod->getStartLine(),\n $reflectionMethod->getEndLine() - $reflectionMethod->getStartLine());\n $source = implode(\"\\n\", $sourceMethod);\n\n return strpos($source, '$this->_oldFieldsMap') !== false;\n }", "public function testUpdateValuesTooShort(): void { }", "protected function _updatefields() {}", "abstract public function getFieldCount(): int;", "public function testDoesNotAllowIsDeprecatedWithoutDeprecationReasonOnField()\n {\n /** @noinspection PhpUnhandledExceptionInspection */\n $oldObject = newObjectType([\n 'name' => 'OldObject',\n 'fields' => [\n 'field' => [\n 'type' => stringType(),\n 'isDeprecated' => true,\n ],\n ],\n ]);\n\n $this->expectException(InvariantException::class);\n $this->expectExceptionMessage('OldObject.field should provide \"deprecationReason\" instead of \"isDeprecated\".');\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $this->schemaWithField($oldObject);\n\n $this->addToAssertionCount(1);\n }", "function ae_check_db_fields( ) {\n\n $count = 0;\n $cols = ae_get_db_fields();\n $foo = ae_db_queries();\n if( $cols ){\n foreach($cols as $col) {\n\n if( isset($foo[$col->COLUMN_NAME]) ) {\n\n if(\n $col->DATA_TYPE != $foo[$col->COLUMN_NAME]['type'] ||\n $col->CHARACTER_MAXIMUM_LENGTH < $foo[$col->COLUMN_NAME]['numb']\n ) {\n $count++;\n }\n }\n }\n }\n\n return $count;\n}", "abstract public function getNumFields();", "function testVerifyAndSaveExpectsSuccess() {\n\t\t// arrange\n\t\t$factory = $this->getMockBuilder('TestNumberField')\n\t\t\t\t\t\t->setMethods( array( 'validate', 'delete_old_data' ) )\n\t\t\t\t\t\t->getMock();\n\t\t$factory->fields['field_one']['old_key'] = $factory->fields['field_one']['key'];\n\t\t$factory->expects($this->once())\n\t\t\t\t->method('validate')\n\t\t\t\t->will($this->returnValue(null));\n\t\t// act\n\t\t$factory->validate_and_save( 1 );\n\t}", "function testInvalidNumericFieldExpectsDataRemoved() {\n\n\t\t// arrange\n\t\t$TestNumberField = new TestNumberField();\n\t\t$_POST = array(\n\t\t\t'post_ID' => 1,\n\t\t\t'field_one' => 'Two',\n\t\t);\n\t\t$validated = array();\n\n\t\t// act\n\t\t$TestNumberField->validate($_POST['post_ID'], $TestNumberField->fields['field_one'], $validated['field_one'], array());\n\t\t// assert\n\t\t$expected = null;\n\t\t$this->assertEquals(\n\t\t\t$expected,\n\t\t\t$validated['field_one'],\n\t\t\t'Non-numeric strings should not be accepted for a number input type.'\n\t\t);\n\t}", "public function testUpdateValuesTooLong(): void { }", "public function pageIdCanBeDeterminedWhileCopyingARecordAfterAnExistingRecord() {}", "public function pageIdCanBeDeterminedWhileEditingARegularRecord() {}", "protected function check_if_field_id_is_created_correctly( $newest_field_id ) {\n\t\t$this->assertTrue( is_numeric( $newest_field_id ) );\n\t\t$this->assertNotEmpty( $newest_field_id );\n\t}", "private function restoreFieldsForCount()\n {\n $this->orders = $this->orders_backup;\n $this->orders_backup = null;\n }", "public function needsIncrementOffset();", "function testInvalidFields () {\n \t$field1 = new SolrSimpleField('dummy1', 'foobar');\n \t$field2 = new Dummy();\n \t$doc = new SolrSimpleDocument(array($field1, $field2));\n }", "function acf_upgrade_500_fields($ofg, $nfg)\n{\n}", "public abstract function field_count();", "public function testGetChangeField()\n {\n }", "public function test_getDuplicateLegacyLowstockContactById() {\n\n }", "public function getFieldCount() {}", "private function validateModificationCount()\n {\n if (count($this) >= self::ITEM_LIMIT) {\n throw new \\OverflowException(\n sprintf('You must not do more than %d modifications per request', self::ITEM_LIMIT)\n );\n }\n }", "public abstract function GetFieldCount();", "protected function areFieldChangeFunctionsValid() {}", "public function testUpdateExtraFields(): void { }", "private function backupFieldsForCount()\n {\n $this->orders_backup = $this->orders;\n $this->orders = null;\n }", "public function invalidVersionNumberDataProvider() {}", "function verify()\n{\n $mdb2 =& GetMDB2();\n $mdb2->loadModule('Manager');\n $mdb2->loadModule('Reverse', null, true);\n\n //$indexes is an array where the key is the index name, the value is true if the index is unique\n $indexes = Index::getTableIndexList($this->module->ModuleID);\n if(isset($indexes[$this->name])){\n\n if($this->unique != $indexes[$this->name]){\n return 'update';\n }\n\n //verify index fields\n if($this->unique){\n $db_info = $mdb2->reverse->getTableConstraintDefinition($this->module->ModuleID, $this->name);\n } else {\n $db_info = $mdb2->reverse->getTableIndexDefinition($this->module->ModuleID, $this->name);\n }\n mdb2ErrorCheck($db_info);\n\n $match = true;\n reset($this->fields);\n foreach($db_info['fields'] as $db_fieldname => $db_field_props){\n $def_fieldname = key($this->fields);\n if($db_fieldname != $def_fieldname){\n $match = false;\n }\n next($this->fields);\n }\n\n if($match){\n return 'ok';\n } else {\n return 'update';\n }\n\n } else {\n return 'add';\n }\n\n}", "public function testFields()\r\n\t{\r\n\t\t$dbh = $this->dbh;\r\n\t\t\r\n\t\t$obj = new CAntObject($dbh, \"customer\", null, $this->user);\r\n\t\t$fdef = array(\r\n\t\t\t'title'=>'unittest_custom', \r\n\t\t\t'type'=>'text', \r\n\t\t\t'subtype'=>'32', \r\n\t\t\t'system'=>false, \r\n\t\t\t'use_when'=>\"owner_id:\".$this->user->id\r\n\t\t);\r\n\t\t$newName = $obj->addField(\"unittest_custom\", $fdef);\r\n\t\tunset($obj);\r\n\r\n\t\t$obj = new CAntObject($dbh, \"customer\", null, $this->user);\r\n\t\t$field = $obj->def->getField('unittest_custom_owner_id_minus1');\r\n\t\t$this->assertNotEquals($field, false);\r\n\t\t$this->assertEquals($field->getUseWhen(), \"owner_id:\".$this->user->id);\r\n\t\t$obj->removeField(\"unittest_custom_owner_id_minus1\");\r\n\t\t$field = $obj->def->getField('unittest_custom_owner_id_minus1');\r\n\t\t$this->assertTrue(empty($field));\r\n\t}", "public function bumpField($key,$count = 1){\n \n $val = $this->getField($key,0);\n $val += $count;\n $this->setField($key,$val);\n return $val;\n \n }", "protected function _checkIndex(&$index)\r\n {\r\n if(is_int($index)) {\r\n $index--;\r\n }\r\n\t}", "public function pageIdCanBeDeterminedWhileCreatingARecordAfterAnExistingRecord() {}", "function validateFieldsNumeric($fields)\n {\n foreach($fields as $tempField) {\n if(!is_numeric($tempField)) {\n throw new \\Exception(\"An exception thrown. The variable: <strong>\" . array_search($tempField, $fields) . \"</strong> must be declared in number.\" . \" Found: <strong>\" . $tempField . \"</strong>\");\n }\n }\n }", "function field_no($result, $fieldName) {\n\n\tfor ($i = 0; $i < $result->field_count ; $i++) {\n\t\t$result->field_seek($i);\n\t\t$finfo = $result->fetch_field();\n\t\tif (strToUpper($fieldName) == strToUpper($finfo->name)) \n\t\t\treturn($i);\n\t}\n\tdie(\"Error - field $fieldName not in result set\");\n}", "public function pageIdCanBeDeterminedWhileEditingAPageRecord() {}", "public function pageIdCanBeDeterminedWhileMovingARecordToAnotherPage() {}", "private function checkForNewRecord(): bool\n {\n return null === $this->getOldName();\n }", "function phpgwapi_upgrade0_9_14_503()\n\t{\n\t\tif ($GLOBALS['phpgw_setup']->oProc->sType == 'pgsql')\n\t\t{\n\t\t\t$GLOBALS['phpgw_setup']->oProc->AddColumn('phpgw_addressbook','last_mod',array(\n\t\t\t\t'type' => 'int',\n\t\t\t\t'precision' => '4',\n\t\t\t));\n\t\t\t$GLOBALS['phpgw_setup']->oProc->query(\"UPDATE phpgw_addressbook SET last_mod=0\",__LINE__,__FILE__);\n\t\t\t$GLOBALS['phpgw_setup']->oProc->query(\"ALTER TABLE phpgw_addressbook ALTER COLUMN last_mod SET NOT NULL\",__LINE__,__FILE__);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$GLOBALS['phpgw_setup']->oProc->AddColumn('phpgw_addressbook','last_mod',array(\n\t\t\t\t'type' => 'int',\n\t\t\t\t'precision' => '4',\n\t\t\t\t'nullable' => false,\n\t\t\t));\n\t\t}\n\t\t$GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.14.504';\n\t\treturn $GLOBALS['setup_info']['phpgwapi']['currentver'];\n\t}", "public function testIncrementing()\n {\n $category = new Category(); \n $this->assertFalse($category->incrementing);\n }", "public function testCompareOnlySelectedIndexesFromDupeCheck()\n {\n //create a bean, values, populate and save\n $focus = loadBean('Contacts');\n $focus->first_name = 'first '.date(\"YmdHis\");\n $focus->last_name = 'last '.date(\"YmdHis\");\n $focus->assigned_user_id = '1';\n $focus->save();\n\n\n //create the importDuplicateCheck object and get the list of duplicateCheckIndexes\n $idc = new ImportDuplicateCheck($focus);\n\n //we are going to test agains the first name, last name, full name, and assigned to indexes\n //to prove that only selected indexes are being used.\n\n //lets do a straight dupe check with the same bean on first name, should return true\n $this->assertTrue($idc->isADuplicateRecord(array('idx_cont_last_first::first_name')),'simulated check against first name index (idx_cont_last_first::first_name) failed (returned false instead of true).');\n\n //now lets test on full name index should also return true\n $this->assertTrue($idc->isADuplicateRecord(array('full_name::full_name')),'first simulated check against full name index (full_name::full_name) failed (returned false instead of true). This check means BOTH first AND last name must match.');\n\n //now lets remove the first name and redo the check, should return false\n $focus->first_name = '';\n $idc = new ImportDuplicateCheck($focus);\n $this->assertFalse($idc->isADuplicateRecord(array('idx_cont_last_first::first_name')),'simulated check against first name index (idx_cont_last_first::first_name) failed (returned true instead of false). This is wrong because we removed the first name so there should be no match.');\n\n //lets retest on full name index should return false now as first AND last do not match the original\n $this->assertFalse($idc->isADuplicateRecord(array('full_name::full_name')),'second simulated check against full name index (full_name::full_name) failed (returned true instead of false). This check means BOTH first AND last name must match and is wrong because we removed the first name so there should be no match.');\n\n //now lets rename the contact and test on assigned user, should return true\n $focus->first_name = 'first '.date(\"YmdHis\");\n $focus->last_name = 'last '.date(\"YmdHis\");\n $idc = new ImportDuplicateCheck($focus);\n $this->assertTrue($idc->isADuplicateRecord(array('idx_del_id_user::assigned_user_id')),'simulated check against assigned user index (idx_del_id_user::assigned_user_id) failed (returned false instead of true). This is wrong because we have not changed this field and it should remain a duplicate');\n\n //we're done, lets delete the focus bean now\n $focus->mark_deleted($focus->id);\n\n }", "public function testIntegerFieldValidation()\n {\n $field = $this->table->getField('numberfour');\n\n $testVal = 1;\n $expected = 1;\n $this->assertEquals($expected, $field->getPHPValue($testVal));\n\n $testVal = 1.123;\n $this->assertEquals($expected, $field->getPHPValue($testVal));\n\n $testVal = 0;\n $expected = 0;\n $this->assertEquals($expected, $field->getPHPValue($testVal));\n }", "public function assertListCorrect() {\n\t\t$activeRecordModel = $this->getTestActiveRecordFinder();\n\t\t$positionAttributeName = $activeRecordModel->getPositionAttributeName();\n\t\t$records = $activeRecordModel->findAll(array('order' => \"{$positionAttributeName} ASC\"));\n\t\tforeach ($records as $recordNumber => $record) {\n\t\t\t$this->assertEquals($record->$positionAttributeName, $recordNumber+1, 'List positions have been broken!');\n\t\t}\n\t}", "public function pageIdCanBeDeterminedWhileCreatingARecord() {}", "public function testUpdateOrderCustomFields()\n {\n }", "public function testUpdatingData()\n {\n $store = new Storage(TESTING_STORE);\n\n // get id from our first item\n $id = $store->read()[0]['_id'];\n\n // new dummy data\n $new_dummy = array(\n 'label' => 'test update',\n 'message' => 'let me update this old data',\n );\n\n // do update our data\n $store->update($id, $new_dummy);\n\n // fetch single item from data by id\n $item = $store->read($id);\n\n // testing data\n $test = array($item['label'], $item['message']);\n\n // here we make a test that count diff values from data between 2 array_values\n $diff_count = count(array_diff(array_values($new_dummy), $test));\n $this->assertEquals(0, $diff_count);\n }", "function check_exits_field($code,$field, $table, &$db, $id = 0)\n{\n\tif($id<>0) $cond = \" AND id <> '\".$id.\"'\";\n\telse $cond = \"\";\n\n\t$sql_check = \"SELECT count(*) FROM \".$table.\" WHERE `\".$field.\"` = '\".$code.\"'\".$cond;\n\t$sql_check = $db->sql_query($sql_check) or die(mysql_error());\n\t$exits \t = $db->sql_fetchfield(0);\n\tif($exits)return true;\n\telse return false;\n}", "public function test_if_failed_update()\n {\n }", "public function getRepeatedObjFieldCount()\n {\n return $this->count(self::REPEATED_OBJ_FIELD);\n }", "public function assertListCorrect()\n {\n $records = Item::find()\n ->orderBy(['position' => SORT_ASC])\n ->all();\n\n foreach ($records as $recordNumber => $record) {\n $this->assertEquals($record->position, $recordNumber + 1, 'List positions have been broken!');\n }\n }", "function _check_if_child_fields_duplicate( $old_child_forms, $new_child_forms ) {\n\t\t$old_child_form = reset( $old_child_forms );\n\t\t$new_child_form = reset( $new_child_forms );\n\n\t\t// Get all fields in each form\n\t\t$old_child_form_fields = FrmField::get_all_for_form( $old_child_form->id );\n\t\t$new_child_form_fields = FrmField::get_all_for_form( $new_child_form->id );\n\n\t\t// Check if there are the same number of child form fields in the duplicated child form\n\t\t$this->assertEquals( count( $old_child_form_fields ), count( $new_child_form_fields ), 'When a form is duplicated, the fields in the repeating section are not duplicated correctly.' );\n\t}", "function assertModelCountDiffer($class, int $count) {\n $database = App::make('db');\n $database = $database->connection($database->getDefaultConnection());\n\n $table = test()->getTable($class);\n\n test()->assertNotEquals(\n $count, $database->table($table)->count()\n );\n}", "private function _checkIndex($i) {\n if(!isset($this->_values[$i])) {\n $this->_values[$i] = 0;\n }\n }", "public function testGetFields()\n\t{\n\t\t// Remove the following lines when you implement this test.\n\t\t$this->markTestIncomplete(\n\t\t\t'This test has not been implemented yet.'\n\t\t);\n\t}", "public function testFailUpdateEntriesNotEqualAmountOfTranslations()\n {\n $this->expectExceptionMessage('Cannot update entry translation');\n $this->parser->read(TEST_DATA_PATH . '/general.po');\n\n $this->parser->updateEntries('cookie', ['Keks']);\n }", "public function getChangedFields() {}", "function uwwtd_field_num($field) {\n// $field[0]['#markup'] = 'Not provided';\n return uwwtd_format_number($field[0]['#markup'], 1);\n}", "public function iCheckRecordUnchanged()\n {\n preg_match('/UQ:(\\d+)/', $this->getSession()->getCurrentUrl(), $pid);\n $data = new Fez_Record_Searchkey($pid[0]);\n $keys = $data->getSekData();\n $errors = '';\n foreach ($keys as $title => $value) {\n if ( $keys[$title]['value'] !== $this->_tempRecordStore[$title]['value']) {\n if ($title != 'Updated Date' && $title != 'Collection Year') {\n $errors .= $title.', ';\n }\n }\n }\n if ($errors) {\n throw new Exception(\"Miss match on sek titles - \". $errors. \" - post update when there shouldn't be on pid: \".$pid[0]);\n }\n }", "public function testDataTypeWithLengthNotSpecified()\n {\n $tableName = 'ramp_tabletest1';\n $table = new Application_Model_DbTable_Table($tableName);\n $metaInfo = $table->info(Zend_Db_Table_Abstract::METADATA);\n $whichField = 'id';\n\n $field = new Application_Model_Field($whichField, array(),\n $metaInfo[$whichField]);\n\n $this->assertTrue($field->isInTable());\n $this->assertTrue($field->isInDB());\n $this->assertFalse($field->isEnum());\n $this->assertSame(\"int\", $field->getDataType());\n $this->assertNull($field->getLength());\n $this->_assertWholelyLocal($field);\n $this->_assertMetaInfoValues($tableName, $whichField, $field);\n }", "public function checkModelNum(){\n\n\n $corrupt = [];\n $names = DB::table('components')->get();\n for($i=0;$i<count($names);$i++){\n\n $model = 'App\\IC\\\\'.$names[$i]->name;\n $instance = new $model();\n\n $row = DB::table($instance->getTable())->get();\n try{\n\n\n }catch (\\Exception $exception){\n\n\n continue;\n }\n\n $row2 = DB::table('commons')->where('component_id',$names[$i]->id)->get();\n if(count($row) != count($row2)){\n if(count($row) > 0) {\n $diff = abs(count($row2)-count($row));\n $corrupt[$i] = $names[$i]->name.' ==> '.$diff;\n }\n }\n }\n dd($corrupt);\n\n\n }", "private function fixAutoIncrement() {\n $database = \\Env::get('db');\n $result = $database->Execute(\"SELECT MAX(CONVERT(`object_id`, UNSIGNED)) AS `oldAutoIncrement`\n FROM `\" . DBPREFIX . \"log_entry`\n WHERE `object_class` = 'Cx\\\\\\\\Core\\\\\\\\ContentManager\\\\\\\\Model\\\\\\\\Entity\\\\\\\\Page'\");\n if ($result === false) return;\n $oldAutoIncrement = $result->fields['oldAutoIncrement'] + 1;\n $result = $database->Execute(\"SHOW TABLE STATUS LIKE '\" . DBPREFIX . \"content_page'\");\n if ($result !== false && $result->fields['Auto_increment'] < $oldAutoIncrement) {\n $result = $database->Execute(\"ALTER TABLE `\" . DBPREFIX . \"content_page` AUTO_INCREMENT = \" . contrexx_raw2db($oldAutoIncrement));\n }\n }", "public function numFields();", "public function testInvalidVersionNumber(): void\n\t{\n\t\t$this->expectException(LycheeInvalidArgumentException::class);\n\t\tVersion::createFromInt(1000000);\n\t}", "public function testBadValidateChangeNumber()\n {\n $tests = array (\n array(\n 'label' => __LINE__ .': null',\n 'value' => null,\n ),\n array(\n 'label' => __LINE__ .': empty',\n 'value' => '',\n ),\n array(\n 'label' => __LINE__ .': negative',\n 'value' => -1,\n ),\n array(\n 'label' => __LINE__ .': float',\n 'value' => 10.10,\n ),\n );\n\n foreach ($tests as $test) {\n $label = $test['label'];\n\n $validator = new \\P4\\Validate\\ChangeNumber();\n\n $this->assertSame(\n false,\n $validator->isValid($test['value']),\n \"$label - Expected Invalid\"\n );\n }\n }", "public function testLengthCanBeChanged()\n {\n $this->assertEquals(15, (new StringField('some_string'))->length(15)->getLength());\n }", "public function testRegistrationValuesContainNumbers(): void { }", "public function hasRepeatedObjField()\n {\n return count($this->get(self::REPEATED_OBJ_FIELD)) !== 0;\n }", "private function isValidForVersioning()\n {\n $dontVersionFields = isset( $this->dontVersionFields ) ? $this->dontVersionFields : [];\n $removeableKeys = array_merge($dontVersionFields, [$this->getUpdatedAtColumn()]);\n\n if (method_exists($this, 'getDeletedAtColumn')) {\n $removeableKeys[] = $this->getDeletedAtColumn();\n }\n\n return ( count(array_diff_key($this->versionableDirtyData, array_flip($removeableKeys))) > 0 );\n }", "public function functionCanBeInterpretedAsIntegerInvalidDataProvider() {}", "protected function resetOldBeingIndexedEntries()\n {\n $timeLimit = $this->getMinutesToKeepBeingIndexedEntries();\n $resetCount = $this->resetItemsBeingIndexed($timeLimit);\n if ($resetCount > 0) {\n tx_rnbase_util_Logger::warn(\n 'Items in queue are resetted because they are in state \"being_indexed\" '.\n 'longer than the configured amount of time. Check that, if it occurs multiple times.',\n 'mksearch',\n [\n 'itemResetCount' => $resetCount,\n 'configuredTimeLimitInMin' => $timeLimit,\n ]\n );\n }\n\n return $resetCount;\n }", "public function testEdit() {\r\n\t\t$result = $this->ShopProductAttribute->edit('shopproductattribute-1', null);\r\n\r\n\t\t$expected = $this->ShopProductAttribute->read(null, 'shopproductattribute-1');\r\n\t\t$this->assertEqual($result['ShopProductAttribute'], $expected['ShopProductAttribute']);\r\n\r\n\t\t// put invalidated data here\r\n\t\t$data = $this->record;\r\n\t\t//$data['ShopProductAttribute']['title'] = null;\r\n\r\n\t\t$result = $this->ShopProductAttribute->edit('shopproductattribute-1', $data);\r\n\t\t$this->assertEqual($result, $data);\r\n\r\n\t\t$data = $this->record;\r\n\r\n\t\t$result = $this->ShopProductAttribute->edit('shopproductattribute-1', $data);\r\n\t\t$this->assertTrue($result);\r\n\r\n\t\t$result = $this->ShopProductAttribute->read(null, 'shopproductattribute-1');\r\n\r\n\t\t// put record specific asserts here for example\r\n\t\t// $this->assertEqual($result['ShopProductAttribute']['title'], $data['ShopProductAttribute']['title']);\r\n\r\n\t\ttry {\r\n\t\t\t$this->ShopProductAttribute->edit('wrong_id', $data);\r\n\t\t\t$this->fail('No exception');\r\n\t\t} catch (OutOfBoundsException $e) {\r\n\t\t\t$this->pass('Correct exception thrown');\r\n\t\t}\r\n\t}", "public function testResultNumFields()\n {\n \t$this->assertEquals(4, $this->conn->query('SELECT * FROM test')->numFields());\n \t$this->assertEquals(2, $this->conn->query('SELECT id, title FROM test')->numFields(), 'SELECT id, title FROM test');\n }", "public function testUpdatePayloadInvalidFieldFeature()\n {\n $user = factory(User::class)->create();\n $webhook = factory(Webhook::class)->create(['user_id' => $user->id]);\n $payload = factory(Payload::class)->create(['webhook_id' => $webhook->id]);\n $this->actingAs($user);\n $response = $this->put(route('webhooks.payloads.update', ['webhook' => $webhook, 'payload' => $payload]), [\n 'params' => '{\"name\": \"rasmus\", \"age\": \"30\"}',\n 'fields' => ['name', 'asd'],\n ]);\n $errors = session('errors')->toArray();\n\n $response->assertStatus(302);\n $this->assertEquals($errors['fields'][0], ['field1' => 'This field is not match with params']);\n }", "public function testIteratorDoesNotChangeNumberOfEntries()\n {\n $iterator = $this->createIterator(array(1, 2, 3));\n\n $this->assertCount(3, $iterator);\n }", "function update(){\n\n // Check the required fields to see if each required field exists.\n forEach($requiredFields as $field){\n if(!$this->bean->contains($field)){\n throw new Exception(\"Required field $field does not exists.\");\n }\n }\n\n // Check to see if there are any fields that are not specified as a possible field.\n forEach($this->bean as $key => $value){\n if(!$possibleFields->contains($key)){\n throw new Exception(\"Invalid field $key passed to model.\");\n }\n }\n \n // Validate bean. \n if(!validate($this->bean)){\n throw new Exception(\"Bean is not valid. For a more detailed message throw a custom exception in validation function.\");\n }\n }", "function testRejectsAnObjectTypeWithIncorrectlyTypedFields()\n {\n /** @noinspection PhpUnhandledExceptionInspection */\n $objType = newObjectType([\n 'name' => 'SomeObject',\n 'fields' => [['f' => null]],\n ]);\n\n $this->expectException(InvariantException::class);\n $this->expectExceptionMessage(\n 'SomeObject fields must be an associative array with field names as keys or a ' .\n 'callable which returns such an array.'\n );\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $objType->getFields();\n\n $this->addToAssertionCount(1);\n }", "public function testUpdateDocumentValueFailed()\n {\n $eavDocument = $this->getEavDocumentRepo()->findOneBy(['path' => 'some/path/to/bucket/document1.pdf']);\n\n $this->assertInstanceOf(EavDocument::class, $eavDocument);\n $this->assertTrue($eavDocument->hasValue('customerId'));\n\n $eavDocument->setValue('customerId', '6789');\n $this->em->persist($eavDocument);\n\n try {\n $this->em->flush();\n } catch (\\Exception $e) {\n $this->assertInstanceOf(EavDocumentValidationException::class, $e);\n }\n\n $violations = $eavDocument->getLastViolations();\n\n $this->assertCount(1, $violations);\n $this->assertContains('customerId', (string) $violations);\n }", "public function testFailUpdateEntryNotExistingTranslationPosition()\n {\n $this->expectExceptionMessage('Cannot update entry translation');\n $this->parser->read(TEST_DATA_PATH . '/general.po');\n\n $this->parser->updateEntry('cookie', 'Keks', 5);\n }", "protected function check_field_prior_to_duplication( $field ) {\n\t\t$this->assertTrue( isset( $field->field_options['in_section'] ), 'The in_section variable is not set correctly on import.' );\n\t}", "public function order($fields)\n {\n $fields = collect($fields);\n\n if ($fields->count() !== $this->customFields()->count()) {\n throw new WrongNumberOfFieldsForOrderingException($fields->count(), $this->customFields()->count());\n }\n\n $fields->each(function ($id, $index) {\n $customField = $this->customFields()->find($id);\n\n if (! $customField) {\n throw new FieldDoesNotBelongToModelException($id, $this);\n }\n\n $customField->update(['order' => $index + 1]);\n });\n }", "public function testGetInvalidFieldName()\r\n\t\t{\r\n\t\t\tORM::init('mysql:host=localhost;dbname=rocket_orm', 'orm_username', 'orm_password');\r\n\t\t\t\r\n\t\t\t$user = User::load(1);\r\n\t\t\t\r\n\t\t\t$user->get('doesnotexistfieldname');\r\n\t\t}", "public function order($fields)\n {\n $fields = collect($fields);\n\n if ($fields->count() !== $this->customFields()->count()) {\n throw new WrongNumberOfFieldsForOrderingException(\n $fields->count(),\n $this->customFields()->count()\n );\n }\n\n $fields->each(function ($id, $index) {\n $customField = $this->customFields()->find($id);\n\n if (! $customField) {\n throw new FieldDoesNotBelongToModelException($id, $this);\n }\n\n $customField->update(['order' => $index + 1]);\n });\n }", "public function testCountersDontPersist2()\n {\n $next = $this->nextCounter();\n $this->assertSame('invoked at sequence index 0', $next->toString());\n }", "public function validVersionNumberDataProvider() {}", "function wppb_check_serial_number_fix($newvalue, $oldvalue){\r\n\r\n\tif ( $newvalue == $oldvalue )\r\n\t\twppb_check_serial_number( $oldvalue, $newvalue );\r\n\r\n\treturn $newvalue;\r\n}", "function checkFields( $args )\r\n {\r\n\t\treturn true;\r\n }", "public function testRegistrationValuesTooShort(): void { }", "public function testRegistrationValuesTooLong(): void { }", "public function hasIncrementing()\n {\n return $this->getKeyName() == 'id';\n }", "public function testRejectsAnInputObjectTypeWithIncorrectFields()\n {\n /** @noinspection PhpUnhandledExceptionInspection */\n $inputObjectType = newInputObjectType([\n 'name' => 'SomeInputObject',\n 'fields' => '',\n ]);\n\n $this->expectException(InvariantException::class);\n $this->expectExceptionMessage(\n 'SomeInputObject fields must be an associative array with field names as keys or a ' .\n 'function which returns such an array.'\n );\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $inputObjectType->getField('f');\n }", "function _are_attrs_modified($old_slice, $new_slice) {\n return $old_slice['index'] != $new_slice['index'];\n }", "public function needsIncrementOffset() {\n\t\treturn true;\n\t}", "function acf_upgrade_500_field($field)\n{\n}", "public function haveInvalidAdditionalFields(array $additionalFields);", "public function test_updateLegacyLowstockContact() {\n\n }", "public function numberOfFields();", "public function testUpdateHookN() {\n $connection = Database::getConnection();\n\n // Increment the schema version.\n \\Drupal::state()->set('update_test_schema_version', 8001);\n $this->runUpdates();\n\n // Ensure that after running the updates the update functions have been\n // loaded. If they have not then the tests carried out in\n // \\Drupal\\Tests\\UpdatePathTestTrait::runUpdates() can result in false\n // positives.\n $this->assertTrue(function_exists('update_test_semver_update_n_update_8001'), 'The update_test_semver_update_n_update_8001() has been loaded');\n\n $select = $connection->select('watchdog');\n $select->orderBy('wid', 'DESC');\n $select->range(0, 5);\n $select->fields('watchdog', ['message']);\n\n $container_cannot_be_saved_messages = array_filter(iterator_to_array($select->execute()), function ($row) {\n return strpos($row->message, 'Container cannot be saved to cache.') !== FALSE;\n });\n $this->assertEquals([], $container_cannot_be_saved_messages);\n\n // Ensure schema has changed.\n /** @var \\Drupal\\Core\\Update\\UpdateHookRegistry $update_registry */\n $update_registry = \\Drupal::service('update.update_hook_registry');\n $this->assertEquals(8001, $update_registry->getInstalledVersion('update_test_schema'));\n $this->assertEquals(8001, $update_registry->getInstalledVersion('update_test_semver_update_n'));\n // Ensure the index was added for column a.\n $this->assertTrue($connection->schema()->indexExists('update_test_schema_table', 'test'), 'Version 8001 of the update_test_schema module is installed.');\n // Ensure update_test_semver_update_n_update_8001 was run.\n $this->assertEquals('Yes, I was run. Thanks for testing!', \\Drupal::state()->get('update_test_semver_update_n_update_8001'));\n }" ]
[ "0.59022564", "0.5888162", "0.58190006", "0.5766772", "0.56933594", "0.5556578", "0.5548521", "0.54868937", "0.5458287", "0.54496735", "0.5410165", "0.53695315", "0.5367168", "0.5319271", "0.5313533", "0.5306452", "0.53057164", "0.5287275", "0.5259805", "0.5255965", "0.5250849", "0.5232942", "0.51904213", "0.51701546", "0.5169749", "0.51557964", "0.5142793", "0.5134754", "0.51210725", "0.5120889", "0.5114055", "0.5110091", "0.51098794", "0.50999784", "0.509945", "0.50930595", "0.50754744", "0.50714517", "0.5055191", "0.50518644", "0.5046436", "0.50457263", "0.50388044", "0.50285256", "0.502753", "0.5019385", "0.500747", "0.49813223", "0.49718294", "0.4958024", "0.4946141", "0.49446586", "0.49388504", "0.49320206", "0.4922142", "0.4917665", "0.49140602", "0.49056822", "0.49048615", "0.49035883", "0.48956972", "0.48946035", "0.4893123", "0.48858592", "0.4884635", "0.48821044", "0.48772356", "0.48766142", "0.484989", "0.48416188", "0.48368707", "0.4835755", "0.48351663", "0.482908", "0.48243082", "0.48233646", "0.48106694", "0.48100764", "0.48096082", "0.478639", "0.47837505", "0.47722894", "0.47702226", "0.47662044", "0.47629067", "0.4757262", "0.47559208", "0.47557575", "0.47557095", "0.47492695", "0.47486514", "0.47478828", "0.47442913", "0.47370413", "0.47338602", "0.47236362", "0.47229722", "0.4713434", "0.47097856", "0.47049308" ]
0.5327833
13
Display a listing of the resource.
public function index() { // return view('layouts.registrasi'); // dd(Auth::user()); $pelanggan = Pelanggan::where('id_user', Auth::user()->pelanggan()->first()->id)->first(); return view('index', compact('pelanggan')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { return view('layouts.registrasi'); }
{ "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) { // dd($request); $request->validate([ 'nama' => 'required|String|max:255', 'alamat' => 'required|string|max:255', 'nohp' => 'required|string|max:255', 'email' => 'required|string|email|max:255|unique:users', 'password' => 'required|string|min:6|confirmed', ]); // dd('masuk'); $user=User::create([ 'email' => $request->email, 'password' => Hash::make($request->password), 'role' => 'pembeli', ]); Pelanggan::create([ 'id_user'=> $user->id, 'nama' => $request->nama, 'alamat' => $request->alamat, 'nohp' => $request->nohp, ]); return view('welcome'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.7286258", "0.71454436", "0.7132821", "0.6640289", "0.6621105", "0.6566493", "0.65255576", "0.65087926", "0.6448317", "0.63752604", "0.63736314", "0.6365631", "0.6365631", "0.6365631", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229" ]
0.0
-1
Display the specified resource.
public function show(pelanggan $pelanggan) { // }
{ "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(pelanggan $pelanggan) { // }
{ "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, pelanggan $pelanggan) { // }
{ "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(pelanggan $pelanggan) { // }
{ "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
DOES NOT SANITIZE: esc_html for tests without loading WordPress
function esc_html($value) { return $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function esc_html( $text ) {\n\t$safe_text = wp_check_invalid_utf8( $text );\n\t$safe_text = _wp_specialchars( $safe_text, ENT_QUOTES );\n\t/**\n\t * Filter a string cleaned and escaped for output in HTML.\n\t *\n\t * Text passed to esc_html() is stripped of invalid or special characters\n\t * before output.\n\t *\n\t * @since 2.8.0\n\t *\n\t * @param string $safe_text The text after it has been escaped.\n \t * @param string $text The text prior to being escaped.\n\t */\n\treturn apply_filters( 'esc_html', $safe_text, $text );\n}", "function _xss_sanitization_esc_html( $text ) {\n $safe_text = wp_check_invalid_utf8( $text );\n $safe_text = _wp_specialchars( $safe_text, ENT_QUOTES );\n return $safe_text;\n}", "function esc_html($text)\n {\n }", "function esc_html($text) {\n return htmlspecialchars($text);\n }", "function _xss_sanitization_esc_attr( $text ) {\n $safe_text = wp_check_invalid_utf8( $text );\n $safe_text = _wp_specialchars( $safe_text, ENT_QUOTES );\n return $safe_text;\n}", "function wpstart_sanitize_html($input)\n {\n return wp_kses_post(force_balance_tags($input));\n }", "function acf_esc_html($string = '')\n{\n}", "function esc_attr( $text ) {\r\n\t$safe_text = wp_check_invalid_utf8( $text );\r\n\t$safe_text = _wp_specialchars( $safe_text, ENT_QUOTES );\r\n\t/**\r\n\t * Filters a string cleaned and escaped for output in an HTML attribute.\r\n\t *\r\n\t * Text passed to esc_attr() is stripped of invalid or special characters\r\n\t * before output.\r\n\t *\r\n\t * @since 2.0.6\r\n\t *\r\n\t * @param string $safe_text The text after it has been escaped.\r\n\t * @param string $text The text prior to being escaped.\r\n\t */\r\n\treturn apply_filters( 'attribute_escape', $safe_text, $text );\r\n}", "function esc_html__($text, $domain = 'default')\n {\n }", "function esc_html_e($text, $domain = 'default')\n {\n }", "function esc_attr($text)\n {\n }", "function html_escape($value)\n{\n return apply_filters('html_escape', $value);\n}", "function esc_attr($value) {\n return htmlspecialchars($value, ENT_QUOTES);\n }", "protected function allow_html() {\n\t\tremove_filter( 'pre_term_description', 'wp_filter_kses' );\n\t\tremove_filter( 'term_description', 'wp_kses_data' );\n\n\t\tadd_filter( 'pre_term_description', 'wp_filter_post_kses' );\n\t}", "function esc_html_x($text, $context, $domain = 'default')\n {\n }", "function esc_attr($value) {\n return $value;\n}", "function _xss_sanitization_esc_js( $text ) {\n $safe_text = wp_check_invalid_utf8( $text );\n $safe_text = _wp_specialchars( $safe_text, ENT_COMPAT );\n $safe_text = preg_replace( '/&#(x)?0*(?(1)27|39);?/i', \"'\", stripslashes( $safe_text ) );\n $safe_text = str_replace( \"\\r\", '', $safe_text );\n $safe_text = str_replace( \"\\n\", '\\\\n', addslashes( $safe_text ) );\n return $safe_text;\n}", "function wp_filter_nohtml_kses($data)\n {\n }", "function yourls_esc_html__( $text, $domain = 'default' ) {\n\treturn yourls_esc_html( yourls_translate( $text, $domain ) );\n}", "function esc_attr( $text ) {\n\t$safe_text = wp_check_invalid_utf8( $text );\n\t$safe_text = _wp_specialchars( $safe_text, ENT_QUOTES );\n\t/**\n\t * Filter a string cleaned and escaped for output in an HTML attribute.\n\t *\n\t * Text passed to esc_attr() is stripped of invalid or special characters\n\t * before output.\n\t *\n\t * @since 2.0.6\n\t *\n\t * @param string $safe_text The text after it has been escaped.\n \t * @param string $text The text prior to being escaped.\n\t */\n\treturn apply_filters( 'attribute_escape', $safe_text, $text );\n}", "function wp_kses_allowed_html($context = '')\n {\n }", "function wp_magic_quotes()\n {\n }", "public function testHtml() {\n $this->assertEquals('String with b &amp; i tags.', Sanitize::html('String <b>with</b> b & i <i>tags</i>.'));\n $this->assertEquals('String &lt;b&gt;with&lt;/b&gt; b &amp; i &lt;i&gt;tags&lt;/i&gt;.', Sanitize::html('String <b>with</b> b & i <i>tags</i>.', array('strip' => false)));\n $this->assertEquals('String &lt;b&gt;with&lt;/b&gt; b &amp; i tags.', Sanitize::html('String <b>with</b> b & i <i>tags</i>.', array('whitelist' => '<b>')));\n $this->assertEquals('String with b &amp;amp; i tags.', Sanitize::html('String <b>with</b> b &amp; i <i>tags</i>.', array('double' => true)));\n }", "function escape($html) { return htmlspecialchars($html, ENT_QUOTES | ENT_SUBSTITUTE, \"UTF-8\"); }", "function esc_xml($text)\n {\n }", "function _xss_sanitization_esc_url( $url, $_context = 'display' ) {\n\n // URL protocols\n $protocols = array('http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'svn');\n \n // Init\n $original_url = $url;\n \n // If blank, then no harm\n if ( '' == $url ) {\n return $url;\n }\n\n //Start cleaning\n $url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@$\\|*\\'()\\\\x80-\\\\xff]|i', '', $url);\n \n $strip = array('%0d', '%0a', '%0D', '%0A');\n $url = wp_deep_replace($strip, $url);\n\n // Make sure its not a ;//\n $url = str_replace(';//', '://', $url);\n \n /* If the URL doesn't appear to contain a scheme, we\n * presume it needs http:// appended (unless a relative\n * link starting with /, # or ? or a php file).\n */\n if ( strpos($url, ':') === false && \n ! in_array( $url[0], array( '/', '#', '?' ) ) &&\n ! preg_match('/^[a-z0-9-]+?\\.php/i', $url) \n ){\n $url = 'http://' . $url;\n }\n\n // Replace ampersands and single quotes only when displaying.\n if ( 'display' == $_context ) {\n $url = kses_normalize_entities( $url );\n $url = str_replace( '&amp;', '&#038;', $url );\n $url = str_replace( \"'\", '&#039;', $url );\n }\n\n if ( kses_bad_protocol( $url, $protocols ) != $url ){\n return '';\n }\n\n return $url;\n}", "function esc($value)\n{\n return htmlentities($value);\n}", "public static function get_allowed_wp_kses_html()\n {\n }", "function erp_sanitize_tooltip( $var ) {\n return htmlspecialchars( wp_kses( html_entity_decode( $var ), array(\n 'br' => array(),\n 'em' => array(),\n 'strong' => array(),\n 'small' => array(),\n 'span' => array(),\n 'ul' => array(),\n 'li' => array(),\n 'ol' => array(),\n 'p' => array(),\n ) ) );\n}", "function somehtml($nohtml) {\n\t\t$nohtml = str_replace(\"&#124;\", \"|\", $nohtml);\n\t\treturn stripslashes(strip_tags($nohtml, '<p><a><font><ul><li><h1><h2><h3><h4><h5><h6><hr><b><u><i><strong><em><table><tr><td><tbody><tfoot><span><div><br><br /><blockquote><img><embed><object><form><input>'));\n\t}", "function wp_specialchars($text, $quote_style = \\ENT_NOQUOTES, $charset = \\false, $double_encode = \\false)\n {\n }", "function yourls_esc_html_e( $text, $domain = 'default' ) {\n\techo yourls_esc_html( yourls_translate( $text, $domain ) );\n}", "function _wp_specialchars( $string, $quote_style = ENT_NOQUOTES, $charset = false, $double_encode = false ) {\n if ( $double_encode ) {\n $string = @htmlspecialchars( $string, $quote_style, $charset );\n } else {\n // Decode &amp; into &\n $string = wp_specialchars_decode( $string, $quote_style );\n\n // Guarantee every &entity; is valid or re-encode the &\n $string = kses_normalize_entities( $string );\n\n // Now re-encode everything except &entity;\n $string = preg_split( '/(&#?x?[0-9a-z]+;)/i', $string, -1, PREG_SPLIT_DELIM_CAPTURE );\n\n for ( $i = 0; $i < count( $string ); $i += 2 )\n $string[$i ] = @htmlspecialchars( $string[$i], $quote_style, 'UTF-8' );\n\n $string = implode( '', $string );\n }\n\n return $string;\n\n}", "function wt_html_sanitize_title( $title ) {\n\treturn wp_kses( $title, wt_html_allowed() );\n}", "function yourls_esc_attr__( $text, $domain = 'default' ) {\n\treturn yourls_esc_attr( yourls_translate( $text, $domain ) );\n}", "function mc_admin_strip_tags() {\n\n\treturn '<strong><em><i><b><span><a><code><pre>';\n}", "function h($value){\n return htmlspecialchars($value, ENT_QUOTES);\n }", "function safehtml($in) {\n return htmlentities($in,ENT_COMPAT,'UTF-8');\n}", "function tc_sanitize_textarea( $value) {\r\n $value = esc_html( $value);\r\n return $value;\r\n }", "function string_html_specialchars( $p_string ) {\r\n\t# achumakov: @ added to avoid warning output in unsupported codepages\r\n\t# e.g. 8859-2, windows-1257, Korean, which are treated as 8859-1.\r\n\t# This is VERY important for Eastern European, Baltic and Korean languages\r\n\treturn preg_replace(\"/&amp;(#[0-9]+|[a-z]+);/i\", \"&$1;\", @htmlspecialchars( $p_string, ENT_COMPAT, config_get('charset') ) );\r\n}", "function yourls_esc_attr_e( $text, $domain = 'default' ) {\n\techo yourls_esc_attr( yourls_translate( $text, $domain ) );\n}", "function _wp_specialchars($text, $quote_style = \\ENT_NOQUOTES, $charset = \\false, $double_encode = \\false)\n {\n }", "function unescape_invalid_shortcodes($content)\n {\n }", "function theme_options_validate( $input ) {\n\n\t// Say our text option must be safe text with no HTML tags\n\t$input['sometext'] = wp_filter_nohtml_kses( $input['sometext'] );\n\n\n\n\treturn $input;\n}", "function wp_kses($content, $allowed_html, $allowed_protocols = array())\n {\n }", "function esc_specialchars($value)\n{\n // Numbers and boolean values get turned into strings which can cause problems\n // with type comparisons (e.g. === or is_int() etc).\n return is_string($value) ? htmlspecialchars($value, ENT_QUOTES, sfConfig::get('sf_charset')) : $value;\n}", "function h($text) {\r\n echo(htmlspecialchars($text, ENT_QUOTES));\r\n }", "function wp_specialchars_decode($text, $quote_style = \\ENT_NOQUOTES)\n {\n }", "function escape_html($string) {\n $text = htmlspecialchars($string);\n // $text = strip_tags($string);\n\n return $text;\n}", "function _xss_sanitization_sanitize_stored_html( $html ) {\n \n // URL protocols\n $protocols = array('http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'svn');\n\n return kses($html, _xss_sanitization_allowed_tags(), $protocols);\n}", "function wp_kses_stripslashes($content)\n {\n }", "function esc_html__emp($text, $domain='events-manager'){\n return esc_html( translate($text, $domain) );\n}", "function esc($str) {\n return htmlEnt($str);\n}", "function clean_output($string) \n{\n if (!($string)) return;\n echo htmlspecialchars($string, ENT_QUOTES);\n}", "function convertHTML($strInput) //Convert to html special code\n{\n\t//$strInput = htmlspecialchars($strInput, ENT_QUOTES);\n\t$strInput = str_replace('\"', '&quot;', $strInput);\n\t$strInput = str_replace(\"'\", \"&#039;\", $strInput);\n\treturn $strInput;\n}", "function escape($html) {\n return htmlspecialchars($html, ENT_QUOTES | ENT_SUBSTITUTE, \"UTF-8\");\n}", "function html($data) {\n $data = htmlspecialchars($data, ENT_QUOTES); // <>\n return $data;\n }", "function ywig_sanitize_url( $url ) {\n\t$output = esc_url_raw( $url );\n\treturn $output;\n}", "function yourls_esc_attr_x( $single, $context, $domain = 'default' ) {\n\treturn yourls_esc_attr( yourls_translate_with_context( $single, $context, $domain ) );\n}", "function s2_htmlencode($str)\n{\n return htmlspecialchars($str, ENT_QUOTES, 'UTF-8');\n}", "function cleantohtml( $s )\r\n\t\t{\r\n\t\t\r\n\t\t\treturn strip_tags(htmlentities(trim(stripslashes($s))), ENT_NOQUOTES, \"UTF-8\");\r\n\t\t}", "function h( $s ) {\n return htmlspecialchars($s, ENT_QUOTES, 'utf-8');\n}", "function gtext($text) {\n global $native_presave,$presave_plugins;\n if ($native_presave) {\n $replace = array(\"'\" => '&#39;', '\"' => '&#34;', '<' => '&lt;', '>' => '&gt;');\n $text = str_replace(array_keys($replace), array_values($replace), $text);\n $text = preg_replace (\"/\\<quote\\>(.*?)\\<\\/quote\\>/is\", '<div class=\"quote\">$1</div>', nl2br($text));\n }\n if (@count($presave_plugins)>0) {\n foreach($presave_plugins as $plugin) {\n include('plugins/'.$plugin['name'].'/actions.php');\n }\n }\n return($text);\n}", "function h($text_to_escape){\n\treturn htmlspecialchars($text_to_escape, ENT_NOQUOTES | ENT_IGNORE, 'UTF-8');\n}", "function redart_wp_kses($content) {\r\n\t$dt_allowed_html_tags = array(\r\n\t\t'a' => array('class' => array(), 'data-product_id' => array(), 'href' => array(), 'title' => array(), 'target' => array(), 'id' => array(), 'data-post-id' => array(), 'data-gal' => array(), 'data-image' => array(), 'rel' => array()),\r\n\t\t'abbr' => array('title' => array()),\r\n\t\t'address' => array(),\r\n\t\t'area' => array('shape' => array(), 'coords' => array(), 'href' => array(), 'alt' => array()),\r\n\t\t'article' => array('id' => array(), 'class' => array()),\r\n\t\t'aside' => array('id' => array(), 'class' => array()),\r\n\t\t'audio' => array('autoplay' => array(), 'controls' => array(), 'loop' => array(), 'muted' => array(), 'preload' => array(), 'src' => array()),\r\n\t\t'b' => array(),\r\n\t\t'base' => array('href' => array(), 'target' => array()),\r\n\t\t'bdi' => array(),\r\n\t\t'bdo' => array('dir' => array()), \r\n\t\t'blockquote' => array('cite' => array()), \r\n\t\t'br' => array(),\r\n\t\t'button' => array('autofocus' => array(), 'disabled' => array(), 'form' => array(), 'formaction' => array(), 'formenctype' => array(), 'formmethod' => array(), 'formnovalidate' => array(), 'formtarget' => array(), 'name' => array(), 'type' => array(), 'value' => array()),\r\n\t\t'canvas' => array('height' => array(), 'width' => array()),\r\n\t\t'caption' => array('align' => array()),\r\n\t\t'cite' => array(),\r\n\t\t'code' => array(),\r\n\t\t'col' => array(),\r\n\t\t'colgroup' => array(),\r\n\t\t'datalist' => array('id' => array()),\r\n\t\t'dd' => array(),\r\n\t\t'del' => array('cite' => array(), 'datetime' => array()),\r\n\t\t'details' => array('open' => array()),\r\n\t\t'dfn' => array(),\r\n\t\t'dialog' => array('open' => array()),\r\n\t\t'div' => array('class' => array(), 'id' => array(), 'style' => array(), 'align' => array(), 'data-for' => array()),\r\n\t\t'dl' => array(),\r\n\t\t'dt' => array(),\r\n\t\t'em' => array(),\r\n\t\t'embed' => array('height' => array(), 'src' => array(), 'type' => array(), 'width' => array()),\r\n\t\t'fieldset' => array('disabled' => array(), 'form' => array(), 'name' => array()),\r\n\t\t'figcaption' => array(),\r\n\t\t'figure' => array(),\r\n\t\t'form' => array('accept' => array(), 'accept-charset' => array(), 'action' => array(), 'autocomplete' => array(), 'enctype' => array(), 'method' => array(), 'name' => array(), 'novalidate' => array(), 'target' => array(), 'id' => array(), 'class' => array()),\r\n\t\t'h1' => array('class' => array()), 'h2' => array('class' => array()), 'h3' => array('class' => array()), 'h4' => array('class' => array()), 'h5' => array('class' => array()), 'h6' => array('class' => array()),\r\n\t\t'hr' => array(), \r\n\t\t'i' => array('class' => array(), 'id' => array()), \r\n\t\t'iframe' => array('name' => array(), 'seamless' => array(), 'src' => array(), 'srcdoc' => array(), 'width' => array(), 'height' => array(), 'frameborder' => array(), 'allowfullscreen' => array(), 'mozallowfullscreen' => array(), 'webkitallowfullscreen' => array(), 'title' => array()),\r\n\t\t'img' => array('alt' => array(), 'crossorigin' => array(), 'height' => array(), 'ismap' => array(), 'src' => array(), 'usemap' => array(), 'width' => array(), 'title' => array(), 'data-default' => array()),\r\n\t\t'input' => array('align' => array(), 'alt' => array(), 'autocomplete' => array(), 'autofocus' => array(), 'checked' => array(), 'disabled' => array(), 'form' => array(), 'formaction' => array(), 'formenctype' => array(), 'formmethod' => array(), 'formnovalidate' => array(), 'formtarget' => array(), 'height' => array(), 'list' => array(), 'max' => array(), 'maxlength' => array(), 'min' => array(), 'multiple' => array(), 'name' => array(), 'pattern' => array(), 'placeholder' => array(), 'readonly' => array(), 'required' => array(), 'size' => array(), 'src' => array(), 'step' => array(), 'type' => array(), 'value' => array(), 'width' => array(), 'id' => array(), 'class' => array()),\r\n\t\t'ins' => array('cite' => array(), 'datetime' => array()),\r\n\t\t'label' => array('for' => array(), 'form' => array(), 'class' => array()),\r\n\t\t'legend' => array('align' => array()), \r\n\t\t'li' => array('type' => array(), 'value' => array(), 'class' => array(), 'id' => array()),\r\n\t\t'link' => array('crossorigin' => array(), 'href' => array(), 'hreflang' => array(), 'media' => array(), 'rel' => array(), 'sizes' => array(), 'type' => array()),\r\n\t\t'main' => array(), \r\n\t\t'map' => array('name' => array()), \r\n\t\t'mark' => array(), \r\n\t\t'menu' => array('label' => array(), 'type' => array()),\r\n\t\t'menuitem' => array('checked' => array(), 'command' => array(), 'default' => array(), 'disabled' => array(), 'icon' => array(), 'label' => array(), 'radiogroup' => array(), 'type' => array()),\r\n\t\t'meta' => array('charset' => array(), 'content' => array(), 'http-equiv' => array(), 'name' => array()),\r\n\t\t'object' => array('form' => array(), 'height' => array(), 'name' => array(), 'type' => array(), 'usemap' => array(), 'width' => array()),\r\n\t\t'ol' => array('class' => array(), 'reversed' => array(), 'start' => array(), 'type' => array()),\r\n\t\t'option' => array('value' => array(), 'selected' => array()),\r\n\t\t'p' => array('class' => array()), \r\n\t\t'q' => array('cite' => array()), \r\n\t\t'section' => array(), \r\n\t\t'select' => array('autofocus' => array(), 'disabled' => array(), 'form' => array(), 'multiple' => array(), 'name' => array(), 'required' => array(), 'size' => array(), 'class' => array()),\r\n\t\t'small' => array(), \r\n\t\t'source' => array('media' => array(), 'src' => array(), 'type' => array()),\r\n\t\t'span' => array('class' => array()), \r\n\t\t'strong' => array(),\r\n\t\t'style' => array('media' => array(), 'scoped' => array(), 'type' => array()),\r\n\t\t'sub' => array(),\r\n\t\t'sup' => array(),\r\n\t\t'table' => array('sortable' => array()), \r\n\t\t'tbody' => array(), \r\n\t\t'td' => array('colspan' => array(), 'headers' => array()),\r\n\t\t'textarea' => array('autofocus' => array(), 'cols' => array(), 'disabled' => array(), 'form' => array(), 'maxlength' => array(), 'name' => array(), 'placeholder' => array(), 'readonly' => array(), 'required' => array(), 'rows' => array(), 'wrap' => array()),\r\n\t\t'tfoot' => array(),\r\n\t\t'th' => array('abbr' => array(), 'colspan' => array(), 'headers' => array(), 'rowspan' => array(), 'scope' => array(), 'sorted' => array()),\r\n\t\t'thead' => array(), \r\n\t\t'time' => array('datetime' => array()), \r\n\t\t'title' => array(), \r\n\t\t'tr' => array(), \r\n\t\t'track' => array('default' => array(), 'kind' => array(), 'label' => array(), 'src' => array(), 'srclang' => array()), \r\n\t\t'u' => array(), \r\n\t\t'ul' => array('class' => array(), 'id' => array()), \r\n\t\t'var' => array(), \r\n\t\t'video' => array('autoplay' => array(), 'controls' => array(), 'height' => array(), 'loop' => array(), 'muted' => array(), 'muted' => array(), 'poster' => array(), 'preload' => array(), 'src' => array(), 'width' => array()),\r\n\t\t'wbr' => array(),\r\n\t);\r\n\r\n\t$data = wp_kses($content, $dt_allowed_html_tags);\r\n\treturn $data;\r\n}", "function sanitxt($sanitxt) {\r\n\t$sanitxt = str_replace('><','> <',$sanitxt);\r\n\r\n\t// remove HTML tags\r\n\t$sanitxt = strip_tags($sanitxt);\r\n\r\n\t// remove multiple spaces\r\n\t$sanitxt = preg_replace('/\\s+/', ' ', $sanitxt);\r\n\r\n\t// convert smart quotes into normal\r\n\tconvert_smart_quotes($sanitxt);\r\n\r\n\t// replace quotes and ampersands with HTML chars (recommended)\r\n\t// and encode string to UTF-8. UTF-8 is default from PHP 5.4.0 only\r\n\r\n\t$sanitxt = htmlspecialchars($sanitxt,ENT_QUOTES,\"UTF-8\",FALSE);\r\n\r\nreturn($sanitxt);\r\n}", "function stripcleantohtml( $s )\r\n\t\t{\r\n\t\t\treturn htmlentities(trim(strip_tags(stripslashes($s))), ENT_NOQUOTES, \"UTF-8\");\r\n\t\t}", "public function escape()\n\t{\n\t\treturn ! $this->escaped ? esc_html($this->content) : $this->content;\n\t}", "function escape($content = null) {\n return Sanitize::stripAll($content);\n }", "function h($str)\n{\n return htmlspecialchars($str, ENT_QUOTES, 'UTF-8');\n}", "function esc_attr_e($text, $domain = 'default')\n {\n }", "function acf_allow_unfiltered_html()\n{\n}", "private function htmlspecialcarfy(&$value) {\r\n $value = htmlspecialchars($value);\r\n }", "function capital_P_dangit( $text ) {\n\t$current_filter = current_filter();\n\tif ( 'the_title' === $current_filter || 'wp_title' === $current_filter )\n\t\treturn str_replace( 'Wordpress', 'WordPress', $text );\n\t// Still here? Use the more judicious replacement\n\tstatic $dblq = false;\n\tif ( false === $dblq ) {\n\t\t$dblq = _x( '&#8220;', 'opening curly double quote' );\n\t}\n\treturn str_replace(\n\t\tarray( ' Wordpress', '&#8216;Wordpress', $dblq . 'Wordpress', '>Wordpress', '(Wordpress' ),\n\t\tarray( ' WordPress', '&#8216;WordPress', $dblq . 'WordPress', '>WordPress', '(WordPress' ),\n\t$text );\n}", "static public function esc($txt) {\n return htmlspecialchars($txt);\n }", "function h($s) {\n return htmlspecialchars($s, ENT_QUOTES, 'UTF-8');\n}", "function html($text)\n{\n\treturn htmlspecialchars($text, ENT_QUOTES, 'UTF-8');\n}", "function true_sanitize_copyright( $value ) {\n\treturn strip_tags( stripslashes( $value ) ); // remove slashes and html\n}", "function e($value)\n {\n return htmlspecialchars($value, ENT_QUOTES, 'UTF-8', false);\n }", "function h($text)\n{\n return htmlspecialchars($text,ENT_QUOTES,Yii::app()->charset);\n}", "function ha($text_to_escape){\n\treturn htmlspecialchars($text_to_escape, ENT_QUOTES | ENT_IGNORE, 'UTF-8');\n}", "function sanitize_html_string($string)\n{\n $pattern[0] = '/\\&/';\n $pattern[1] = '/</';\n $pattern[2] = \"/>/\";\n $pattern[3] = '/\\n/';\n $pattern[4] = '/\"/';\n $pattern[5] = \"/'/\";\n $pattern[6] = \"/%/\";\n $pattern[7] = '/\\(/';\n $pattern[8] = '/\\)/';\n $pattern[9] = '/\\+/';\n $pattern[10] = '/-/';\n $replacement[0] = '&amp;';\n $replacement[1] = '&lt;';\n $replacement[2] = '&gt;';\n $replacement[3] = '<br>';\n $replacement[4] = '&quot;';\n $replacement[5] = '&#39;';\n $replacement[6] = '&#37;';\n $replacement[7] = '&#40;';\n $replacement[8] = '&#41;';\n $replacement[9] = '&#43;';\n $replacement[10] = '&#45;';\n return preg_replace($pattern, $replacement, $string);\n}", "function esc_like($text)\n{\n return addcslashes($text, '_%\\\\');\n}", "function wpex_clean_shortcodes($content){ \n$array = array (\n '<p>[' => '[', \n ']</p>' => ']', \n ']<br />' => ']'\n);\n$content = strtr($content, $array);\nreturn $content;\n}", "function h($text)\n{\n return htmlspecialchars($text,ENT_QUOTES,Yii::app()->charset);\n}", "function h($text)\n{\n return htmlspecialchars($text,ENT_QUOTES,Yii::app()->charset);\n}", "function esc_html_e_emp($text, $domain='events-manager'){\n echo esc_html__emp($text, $domain);\n}", "function _text($str) {\n $md5 = md5($str);\n $option_name = get_text_translation_option_name( $md5 );\n $org = esc_html($str);\n\n if ( !isset($_COOKIE['site-edit']) || $_COOKIE['site-edit'] != 'Y' || ! user()->admin() ) {\n $str = _getText($str, true);\n echo $str;\n }\n else {\n $str = _getText($str);\n echo \"\n<div class='translate-text' md5='$md5' original-text='$org' code='$option_name'><span class='dashicons dashicons-welcome-write-blog'></span>\n<div class='html-content'>$str</div>\n</div>\n\";\n }\n\n}", "function filterSpecials($data){\n\n if(!$this->isUTF8($data))\n $data = utf8_encode($data);\n $data = htmlspecialchars($data, ENT_QUOTES);\n\n return $data;\n }", "function correctHTMLValidationErrors($txt) {\r\n\tif (Settings::get ( \"disable_html_validation\" )) {\r\n\t\treturn $txt;\r\n\t}\r\n\t\r\n\t// Ersetze & durch &amp;\r\n\t$txt = preg_replace ( '/[&](?![A-Za-z]+[;])/', \"&amp;\", $txt );\r\n\t\r\n\t// replaced deprecated HTML-Tags\r\n\t$txt = str_ireplace ( \"<center>\", \"<div style=\\\"text-align:center\\\">\", $txt );\r\n\t$txt = str_ireplace ( \"</center>\", \"</div>\", $txt );\r\n\t$txt = str_ireplace ( \"<strike>\", \"<del>\", $txt );\r\n\t$txt = str_ireplace ( \"</strike>\", \"</del>\", $txt );\r\n\t$txt = str_ireplace ( \"<s>\", \"<del>\", $txt );\r\n\t$txt = str_ireplace ( \"</s>\", \"</del>\", $txt );\r\n\t$txt = str_ireplace ( \"<tt>\", \"<code>\", $txt );\r\n\t$txt = str_ireplace ( \"</tt>\", \"</code>\", $txt );\r\n\t$txt = str_ireplace ( \"<dir>\", \"<ul>\", $txt );\r\n\t$txt = str_ireplace ( \"</dir>\", \"</ul>\", $txt );\r\n\t$txt = str_ireplace ( \"<acronym>\", \"<abbr>\", $txt );\r\n\t$txt = str_ireplace ( \"</acronym>\", \"</abbr>\", $txt );\r\n\t\r\n\treturn $txt;\r\n}", "function e($str) {\n echo htmlspecialchars($str, ENT_QUOTES);\n}", "function yourls_esc_html_x( $single, $context, $domain = 'default' ) {\n\treturn yourls_esc_html( yourls_translate_with_context( $single, $context, $domain ) );\n}", "public function escapeHtml($html) {\n\t\t//[roman] da es die schöne double_encode Sache bei htmlentities erst ab der PHP 5.2.3 gibt hier ein fieser Mist...\n\t\tif (version_compare(PHP_VERSION, '5.2.3', '>=')) {\n\t\t\t$html= htmlentities($html, ENT_QUOTES, 'UTF-8', FALSE);\n\t\t} else {\n\t\t\t$html= html_entity_decode($html, ENT_QUOTES, 'UTF-8');\n\t\t\t$html= htmlentities($html, ENT_QUOTES, 'UTF-8');\n\t\t}\n\t\treturn $html;\n\t}", "function h($text){\n\treturn htmlspecialchars($text, ENT_QUOTES, Yii::app()->charset);\n}", "function html_xss_clean($text) {\n return htmlspecialchars($text);\n}", "function sterilize($input){\r\n return htmlspecialchars($input);\r\n }", "function esc_html_x_emp($text, $context, $domain='events-manager'){\n return esc_html( translate_with_gettext_context( $text, $context, $domain ) );\n}", "function sacar_html($str) {\r\n$allowed = \"<br>,<b>,<i>,<u>\";\r\nreturn strip_tags($str,$allowed);\r\n}", "function esc_attr_x($text, $context, $domain = 'default')\n {\n }", "function tep_html_quotes($string) {\n return str_replace(\"'\", \"&#39;\", $string);\n }" ]
[ "0.7820635", "0.7720442", "0.76926124", "0.7673675", "0.72213537", "0.70321184", "0.70268965", "0.6888477", "0.6887617", "0.68384695", "0.6829406", "0.68002635", "0.6780979", "0.67260444", "0.6672598", "0.66534454", "0.66375023", "0.66373247", "0.66035885", "0.65975744", "0.65467745", "0.65155065", "0.6457408", "0.6456229", "0.64539284", "0.6435895", "0.6402319", "0.63955194", "0.63919777", "0.63850635", "0.6381758", "0.63570124", "0.6340194", "0.63393104", "0.6333087", "0.6283791", "0.62816405", "0.6248198", "0.62471926", "0.6244324", "0.62342817", "0.62332594", "0.62328756", "0.6229542", "0.6226435", "0.6226263", "0.62250483", "0.62164766", "0.62036806", "0.6197337", "0.6197166", "0.61807656", "0.6160941", "0.6157115", "0.6153978", "0.6146805", "0.6140872", "0.61316955", "0.6124364", "0.6124076", "0.6121343", "0.6117859", "0.61167926", "0.61115754", "0.61055833", "0.6091056", "0.60849357", "0.6076303", "0.6072096", "0.606563", "0.6058239", "0.6042214", "0.6039088", "0.6038652", "0.6036423", "0.60305816", "0.6023561", "0.6018425", "0.6016745", "0.60166144", "0.60137135", "0.6011038", "0.6010481", "0.5992048", "0.59846705", "0.59846705", "0.59712505", "0.59704345", "0.596499", "0.59648466", "0.59572583", "0.595349", "0.5952856", "0.5946595", "0.592994", "0.5928514", "0.59259814", "0.5925516", "0.5923545", "0.5919575" ]
0.7517689
4
DOES NOT SANITIZE: esc_attr for tests without loading WordPress
function esc_attr($value) { return $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function esc_attr( $text ) {\r\n\t$safe_text = wp_check_invalid_utf8( $text );\r\n\t$safe_text = _wp_specialchars( $safe_text, ENT_QUOTES );\r\n\t/**\r\n\t * Filters a string cleaned and escaped for output in an HTML attribute.\r\n\t *\r\n\t * Text passed to esc_attr() is stripped of invalid or special characters\r\n\t * before output.\r\n\t *\r\n\t * @since 2.0.6\r\n\t *\r\n\t * @param string $safe_text The text after it has been escaped.\r\n\t * @param string $text The text prior to being escaped.\r\n\t */\r\n\treturn apply_filters( 'attribute_escape', $safe_text, $text );\r\n}", "function esc_attr($text)\n {\n }", "function esc_attr( $text ) {\n\t$safe_text = wp_check_invalid_utf8( $text );\n\t$safe_text = _wp_specialchars( $safe_text, ENT_QUOTES );\n\t/**\n\t * Filter a string cleaned and escaped for output in an HTML attribute.\n\t *\n\t * Text passed to esc_attr() is stripped of invalid or special characters\n\t * before output.\n\t *\n\t * @since 2.0.6\n\t *\n\t * @param string $safe_text The text after it has been escaped.\n \t * @param string $text The text prior to being escaped.\n\t */\n\treturn apply_filters( 'attribute_escape', $safe_text, $text );\n}", "function esc_attr($value) {\n return htmlspecialchars($value, ENT_QUOTES);\n }", "function _xss_sanitization_esc_attr( $text ) {\n $safe_text = wp_check_invalid_utf8( $text );\n $safe_text = _wp_specialchars( $safe_text, ENT_QUOTES );\n return $safe_text;\n}", "function vcex_esc_attr( $val = null, $fallback = null ) {\n\tif ( ! $val ) {\n\t\t$val = $fallback;\n\t}\n\treturn esc_attr( $val );\n}", "function acf_esc_attrs($attrs)\n{\n}", "function esc_attr__($text, $domain = 'default')\n {\n }", "function wp_magic_quotes()\n {\n }", "function yourls_esc_attr__( $text, $domain = 'default' ) {\n\treturn yourls_esc_attr( yourls_translate( $text, $domain ) );\n}", "function _xss_sanitization_esc_html( $text ) {\n $safe_text = wp_check_invalid_utf8( $text );\n $safe_text = _wp_specialchars( $safe_text, ENT_QUOTES );\n return $safe_text;\n}", "function esc_attr_e($text, $domain = 'default')\n {\n }", "function yourls_esc_attr_e( $text, $domain = 'default' ) {\n\techo yourls_esc_attr( yourls_translate( $text, $domain ) );\n}", "function esc_attr__emp($text, $domain='events-manager'){\n return esc_attr( translate( $text, $domain ) );\n}", "function esc_attr_x($text, $context, $domain = 'default')\n {\n }", "function yourls_esc_attr_x( $single, $context, $domain = 'default' ) {\n\treturn yourls_esc_attr( yourls_translate_with_context( $single, $context, $domain ) );\n}", "function esc_html($value) {\n return $value;\n}", "function string_attribute( $p_string ) \r\n{\r\n\t$p_string = string_html_specialchars( $p_string );\r\n\r\n\treturn $p_string;\r\n}", "function esc_html( $text ) {\n\t$safe_text = wp_check_invalid_utf8( $text );\n\t$safe_text = _wp_specialchars( $safe_text, ENT_QUOTES );\n\t/**\n\t * Filter a string cleaned and escaped for output in HTML.\n\t *\n\t * Text passed to esc_html() is stripped of invalid or special characters\n\t * before output.\n\t *\n\t * @since 2.8.0\n\t *\n\t * @param string $safe_text The text after it has been escaped.\n \t * @param string $text The text prior to being escaped.\n\t */\n\treturn apply_filters( 'esc_html', $safe_text, $text );\n}", "function esc($value)\n{\n return htmlentities($value);\n}", "function e_attr($string)\n{\n return htmlentities($string, ENT_QUOTES, 'UTF-8');\n}", "function esc_attr_e_emp($text, $domain='events-manager'){\n echo esc_attr__emp($text, $domain);\n}", "function html_escape($value)\n{\n return apply_filters('html_escape', $value);\n}", "function attribute_escape($text)\n {\n }", "function esc_html($text)\n {\n }", "function _get_esc_attr( $option_key ) {\n\t\treturn esc_attr( bf_get_option( $option_key, $this->option_panel_id ) );\n\t}", "function esc_html($text) {\n return htmlspecialchars($text);\n }", "function esc_specialchars($value)\n{\n // Numbers and boolean values get turned into strings which can cause problems\n // with type comparisons (e.g. === or is_int() etc).\n return is_string($value) ? htmlspecialchars($value, ENT_QUOTES, sfConfig::get('sf_charset')) : $value;\n}", "function acf_esc_html($string = '')\n{\n}", "function esc_xml($text)\n {\n }", "function esc_html__($text, $domain = 'default')\n {\n }", "function plugin_customfields_make_system_name($str) {\n\n $str = plugin_customfields_remove_accents(trim($str));\n return strtr($str,\n ' ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()+={}[]<>,.?/~`|:;\"\\'\\\\',\n '_abcdefghijklmnopqrstuvwxyz______________________________');\n}", "function esc_like($text)\n{\n return addcslashes($text, '_%\\\\');\n}", "function wp_specialchars($text, $quote_style = \\ENT_NOQUOTES, $charset = \\false, $double_encode = \\false)\n {\n }", "function _wp_specialchars($text, $quote_style = \\ENT_NOQUOTES, $charset = \\false, $double_encode = \\false)\n {\n }", "function plugin_customfields_remove_accents($str) {\n\n $str = htmlentities($str, ENT_COMPAT, 'UTF-8');\n $str = preg_replace('/&([a-zA-Z])(uml|acute|grave|circ|tilde|cedil|ring);/','$1',$str);\n $from = explode(' ', '&#192; &#193; &#194; &#195; &#196; &#197; &#199; &#200; &#201; &#202; &#203; &#204; &#205; &#206; &#207; &#208; &#209; &#210; &#211; &#212; &#213; &#214; &#217; &#218; &#219; &#220; &#221; &#224; &#225; &#226; &#227; &#228; &#229; &#230; &#231; &#232; &#233; &#234; &#235; &#236; &#237; &#238; &#239; &#240; &#241; &#242; &#243; &#244; &#245; &#246; &#249; &#250; &#251; &#252; &#253; &#255; &#256; &#257; &#258; &#259; &#260; &#261; &#262; &#263; &#264; &#265; &#266; &#267; &#268; &#269; &#270; &#271; &#272; &#273; &#274; &#275; &#276; &#277; &#278; &#279; &#280; &#281; &#282; &#283; &#284; &#285; &#286; &#287; &#288; &#289; &#290; &#291; &#292; &#293; &#294; &#295; &#296; &#297; &#298; &#299; &#300; &#301; &#302; &#303; &#304; &#305; &#308; &#309; &#310; &#311; &#312; &#313; &#314; &#315; &#316; &#317; &#318; &#319; &#320; &#321; &#322; &#323; &#324; &#325; &#326; &#327; &#328; &#329; &#330; &#331; &#332; &#333; &#334; &#335; &#336; &#337; &#340; &#341; &#342; &#343; &#344; &#345; &#346; &#347; &#348; &#349; &#350; &#351; &#352; &#353; &#354; &#355; &#356; &#357; &#360; &#361; &#362; &#363; &#364; &#365; &#366; &#367; &#368; &#369; &#370; &#371; &#372; &#373; &#374; &#375; &#376; &#377; &#378; &#379; &#380; &#381; &#382;');\n $to = explode(' ', 'A A A A A A C E E E E I I I I D N O O O O O U U U U Y a a a a a a a c e e e e i i i i o n o o o o o u u u u y y A a A a A a C c C c C c C c D d D d E e E e E e E e E e G g G g G g G g G H H h I i I i I i I i I i J j K k k L l L l L l L l L l N n N n N n n N n O o O o O o R r R r R r S s S s S s S s T t T t U u U u U u U u U u U u W w Y y Y Z z Z z Z z');\n return str_replace($from, $to, html_entity_decode($str));\n}", "function _wp_specialchars( $string, $quote_style = ENT_NOQUOTES, $charset = false, $double_encode = false ) {\n if ( $double_encode ) {\n $string = @htmlspecialchars( $string, $quote_style, $charset );\n } else {\n // Decode &amp; into &\n $string = wp_specialchars_decode( $string, $quote_style );\n\n // Guarantee every &entity; is valid or re-encode the &\n $string = kses_normalize_entities( $string );\n\n // Now re-encode everything except &entity;\n $string = preg_split( '/(&#?x?[0-9a-z]+;)/i', $string, -1, PREG_SPLIT_DELIM_CAPTURE );\n\n for ( $i = 0; $i < count( $string ); $i += 2 )\n $string[$i ] = @htmlspecialchars( $string[$i], $quote_style, 'UTF-8' );\n\n $string = implode( '', $string );\n }\n\n return $string;\n\n}", "function _echo_esc_attr( $option_key ) {\n\t\techo esc_attr( bf_get_option( $option_key, $this->option_panel_id ) );\n\t}", "function esc_html_e($text, $domain = 'default')\n {\n }", "function privDisableMagicQuotes()\n {\n }", "function _xss_sanitization_esc_url( $url, $_context = 'display' ) {\n\n // URL protocols\n $protocols = array('http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'svn');\n \n // Init\n $original_url = $url;\n \n // If blank, then no harm\n if ( '' == $url ) {\n return $url;\n }\n\n //Start cleaning\n $url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@$\\|*\\'()\\\\x80-\\\\xff]|i', '', $url);\n \n $strip = array('%0d', '%0a', '%0D', '%0A');\n $url = wp_deep_replace($strip, $url);\n\n // Make sure its not a ;//\n $url = str_replace(';//', '://', $url);\n \n /* If the URL doesn't appear to contain a scheme, we\n * presume it needs http:// appended (unless a relative\n * link starting with /, # or ? or a php file).\n */\n if ( strpos($url, ':') === false && \n ! in_array( $url[0], array( '/', '#', '?' ) ) &&\n ! preg_match('/^[a-z0-9-]+?\\.php/i', $url) \n ){\n $url = 'http://' . $url;\n }\n\n // Replace ampersands and single quotes only when displaying.\n if ( 'display' == $_context ) {\n $url = kses_normalize_entities( $url );\n $url = str_replace( '&amp;', '&#038;', $url );\n $url = str_replace( \"'\", '&#039;', $url );\n }\n\n if ( kses_bad_protocol( $url, $protocols ) != $url ){\n return '';\n }\n\n return $url;\n}", "function wp_specialchars_decode($text, $quote_style = \\ENT_NOQUOTES)\n {\n }", "function _xss_sanitization_esc_js( $text ) {\n $safe_text = wp_check_invalid_utf8( $text );\n $safe_text = _wp_specialchars( $safe_text, ENT_COMPAT );\n $safe_text = preg_replace( '/&#(x)?0*(?(1)27|39);?/i', \"'\", stripslashes( $safe_text ) );\n $safe_text = str_replace( \"\\r\", '', $safe_text );\n $safe_text = str_replace( \"\\n\", '\\\\n', addslashes( $safe_text ) );\n return $safe_text;\n}", "function tc_sanitize_url( $value) {\r\n $value = esc_url( $value);\r\n return $value;\r\n }", "function wt_html_sanitize_title( $title ) {\n\treturn wp_kses( $title, wt_html_allowed() );\n}", "function esc_html__emp($text, $domain='events-manager'){\n return esc_html( translate($text, $domain) );\n}", "function theme_options_validate( $input ) {\n\n\t// Say our text option must be safe text with no HTML tags\n\t$input['sometext'] = wp_filter_nohtml_kses( $input['sometext'] );\n\n\n\n\treturn $input;\n}", "function ywig_sanitize_url( $url ) {\n\t$output = esc_url_raw( $url );\n\treturn $output;\n}", "function yourls_esc_html__( $text, $domain = 'default' ) {\n\treturn yourls_esc_html( yourls_translate( $text, $domain ) );\n}", "function esc($str) {\n return htmlEnt($str);\n}", "function esc_url($url) {\n\n if ('' == $url) {\n return $url;\n }\n\n $url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@$\\|*\\'()\\\\x80-\\\\xff]|i', '', $url);\n\n $strip = array('%0d', '%0a', '%0D', '%0A');\n $url = (string) $url;\n\n $count = 1;\n while ($count) {\n $url = str_replace($strip, '', $url, $count);\n }\n\n $url = str_replace(';//', '://', $url);\n\n $url = htmlentities($url);\n\n $url = str_replace('&amp;', '&#038;', $url);\n $url = str_replace(\"'\", '&#039;', $url);\n\n if ($url[0] !== '/') {\n // We're only interested in relative links from $_SERVER['PHP_SELF']\n return '';\n } else {\n return $url;\n }\n }", "function esc_html_e_emp($text, $domain='events-manager'){\n echo esc_html__emp($text, $domain);\n}", "function bureau_profile_first_name() {\n $firstname = esc_attr(get_option('first_name'));\n echo '<input type=\"text\" name=\"first_name\" size=\"50\" value=\"'.$firstname.'\" />';\n}", "function the_champ_sanitize_user($username, $rawUsername, $strict){\r\n\t$username = wp_strip_all_tags($rawUsername);\r\n\t$username = remove_accents($username);\r\n\t$username = preg_replace('|%([a-fA-F0-9][a-fA-F0-9])|', '', $username);\r\n\t$username = preg_replace('/&.+?;/', '', $username);\r\n\t// If strict, reduce to ASCII and Cyrillic characters for max portability.\r\n\tif($strict){\r\n\t\t$settings = get_option('wscu_settings');\r\n\t\t$username = preg_replace('|[^a-z\\p{Arabic}\\p{Cyrillic}0-9 _.\\-@]|iu', '', $username);\r\n\t}\r\n\t$username = trim($username);\r\n\t// Consolidate contiguous whitespace\r\n\t$username = preg_replace('|\\s+|', ' ', $username);\r\n\r\n\treturn $username;\r\n}", "function esc_html_x($text, $context, $domain = 'default')\n {\n }", "function pnq_prepare_attrs( $attrs ) {\t\n\t$prepared_attrs = '';\n\tif( isset( $attrs ) ) {\t\t\n\t\tforeach( $attrs as $attr_name => $attr_val ) {\n\t\t\t$prepared_attrs = $prepared_attrs . $attr_name . '=\"' . esc_attr( $attr_val ) . '\"';\n\t\t}\n\t}\t\n\treturn $prepared_attrs;\n}", "function addslashes_strings_only($value)\n {\n }", "function erp_sanitize_tooltip( $var ) {\n return htmlspecialchars( wp_kses( html_entity_decode( $var ), array(\n 'br' => array(),\n 'em' => array(),\n 'strong' => array(),\n 'small' => array(),\n 'span' => array(),\n 'ul' => array(),\n 'li' => array(),\n 'ol' => array(),\n 'p' => array(),\n ) ) );\n}", "protected function allow_html() {\n\t\tremove_filter( 'pre_term_description', 'wp_filter_kses' );\n\t\tremove_filter( 'term_description', 'wp_kses_data' );\n\n\t\tadd_filter( 'pre_term_description', 'wp_filter_post_kses' );\n\t}", "function vcex_esc_title( $post = '' ) {\n\treturn the_title_attribute( array(\n\t\t'echo' => false,\n\t\t'post' => $post,\n\t) );\n}", "function slug($value){\n//the pre_quote function is just used to quote regular expressions so that it doesn't get mixed up and result in an error\n //remove all characters not in the list(that what this means when we include \"empty string\")\n $value = preg_replace('![^'.preg_quote('_').'\\pL\\pN\\s]+!u','',mb_strtolower($value));\n\n //replace underscore with a dash\n $value = preg_replace('!['.preg_quote('_').'\\s]+!u','-',$value);\n\n //remove whitespace with the trim function\n //'-' was added as an argument so that the trim function does not remove it too\n\n return trim($value, '-');\n\n}", "function wpstart_sanitize_html($input)\n {\n return wp_kses_post(force_balance_tags($input));\n }", "function esc_sql($data)\n {\n }", "function true_sanitize_copyright( $value ) {\n\treturn strip_tags( stripslashes( $value ) ); // remove slashes and html\n}", "function yz_esc_url( $url ) {\n $url = esc_url( $url );\n $disallowed = array( 'http://', 'https://' );\n foreach( $disallowed as $protocole ) {\n if ( strpos( $url, $protocole ) === 0 ) {\n return str_replace( $protocole, '', $url );\n }\n }\n return $url;\n}", "function h($value){\n return htmlspecialchars($value, ENT_QUOTES);\n }", "function acf_slugify($str = '', $glue = '-')\n{\n}", "function capital_P_dangit( $text ) {\n\t$current_filter = current_filter();\n\tif ( 'the_title' === $current_filter || 'wp_title' === $current_filter )\n\t\treturn str_replace( 'Wordpress', 'WordPress', $text );\n\t// Still here? Use the more judicious replacement\n\tstatic $dblq = false;\n\tif ( false === $dblq ) {\n\t\t$dblq = _x( '&#8220;', 'opening curly double quote' );\n\t}\n\treturn str_replace(\n\t\tarray( ' Wordpress', '&#8216;Wordpress', $dblq . 'Wordpress', '>Wordpress', '(Wordpress' ),\n\t\tarray( ' WordPress', '&#8216;WordPress', $dblq . 'WordPress', '>WordPress', '(WordPress' ),\n\t$text );\n}", "function html_widget_title( $var) {\n\t$var = (str_replace( '[', '<', $var ));\n\t$var = (str_replace( ']', '>', $var ));\n\t$var = (str_replace( '__', '\"', $var ));\n\treturn $var ;\n}", "function wp_kses_attr($element, $attr, $allowed_html, $allowed_protocols)\n {\n }", "private function _wp_magic_quotes() {\n // If already slashed, strip.\n if (function_exists('get_magic_quotes_gpc')) {\n $reflection = new \\ReflectionFunction('get_magic_quotes_gpc');\n if ( ! $reflection->isDeprecated()) {\n if ( get_magic_quotes_gpc() ) {\n $_GET = RevSliderFunctions::stripslashes_deep( $_GET );\n $_POST = RevSliderFunctions::stripslashes_deep( $_POST );\n $_COOKIE = RevSliderFunctions::stripslashes_deep( $_COOKIE );\n }\n }\n }\n\n // Escape with wpdb.\n $_GET = $this->_add_magic_quotes( $_GET );\n $_POST = $this->_add_magic_quotes( $_POST );\n $_COOKIE = $this->_add_magic_quotes( $_COOKIE );\n $_SERVER = $this->_add_magic_quotes( $_SERVER );\n\n // Force REQUEST to be GET + POST.\n $_REQUEST = array_merge( $_GET, $_POST );\n }", "function protectAttr($str,$name=false)\n\t{\n\t\tif ($name && !preg_match('/^[A-Za-z][A-Za-z0-9_:.-]*$/',$str)) {\n\t\t\treturn '';\n\t\t}\n\t\t\n\t\treturn str_replace(array(\"'\",'\"'),array('&#039;','&quot;'),$str);\n\t}", "function tc_sanitize_textarea( $value) {\r\n $value = esc_html( $value);\r\n return $value;\r\n }", "function sanitxt($sanitxt) {\r\n\t$sanitxt = str_replace('><','> <',$sanitxt);\r\n\r\n\t// remove HTML tags\r\n\t$sanitxt = strip_tags($sanitxt);\r\n\r\n\t// remove multiple spaces\r\n\t$sanitxt = preg_replace('/\\s+/', ' ', $sanitxt);\r\n\r\n\t// convert smart quotes into normal\r\n\tconvert_smart_quotes($sanitxt);\r\n\r\n\t// replace quotes and ampersands with HTML chars (recommended)\r\n\t// and encode string to UTF-8. UTF-8 is default from PHP 5.4.0 only\r\n\r\n\t$sanitxt = htmlspecialchars($sanitxt,ENT_QUOTES,\"UTF-8\",FALSE);\r\n\r\nreturn($sanitxt);\r\n}", "function sanitise_str ($x, $flags = 0) {\n global $EscapeSequencesA, $EscapeSequencesB;\n $x = (string)$x;\n if ( $flags & STR_GPC and\n PHP_MAJOR_VERSION < 6 and\n get_magic_quotes_gpc()\n ) {\n $x = stripslashes($x);\n }\n if ( $flags & STR_ENSURE_ASCII ) { $x = ensure_valid_ascii($x); }\n else { $x = ensure_valid_utf8($x); }\n if ( $flags & STR_TO_UPPERCASE ) { $x = strtoupper($x); }\n if ( $flags & STR_TO_LOWERCASE ) { $x = strtolower($x); }\n if ( ~$flags & STR_NO_TRIM ) { $x = trim($x); }\n if ( ~$flags & STR_NO_STRIP_CR ) { $x = str_replace(\"\\r\", '', $x); }\n if ( $flags &\n ( STR_ESCAPE_HTML |\n STR_PERMIT_FORMATTING |\n STR_HANDLE_IMAGES |\n STR_PERMIT_ADMIN_HTML |\n STR_DISREGARD_GAME_STATUS |\n STR_EMAIL_FORMATTING\n )\n ) {\n $x = htmlspecialchars($x, ENT_COMPAT, 'UTF-8');\n }\n if ( $flags & STR_CONVERT_ESCAPE_SEQUENCES ) {\n $x = str_replace($EscapeSequencesA, $EscapeSequencesB, $x);\n }\n if ( $flags & STR_STRIP_TAB_AND_NEWLINE ) {\n $x = str_replace(array(\"\\n\",\"\\t\"), '', $x);\n }\n return $x;\n}", "function quake_sanitize_twitter_handler( $input ){\n $output = sanitize_text_field( $input ); // for html charcters\n $output = str_replace('@', '', $output); // for @ chracter\n return $output;\n}", "function e($value)\n {\n return htmlspecialchars($value, ENT_QUOTES, 'UTF-8', false);\n }", "function wp_slash_strings_only($value)\n {\n }", "function conure_filter_wp_title( $title ){\n\treturn $title . esc_attr( get_bloginfo( 'name' ) );\n}", "function wp_kses_stripslashes($content)\n {\n }", "protected function quote_escaped()\n {\n }", "function string_html_specialchars( $p_string ) {\r\n\t# achumakov: @ added to avoid warning output in unsupported codepages\r\n\t# e.g. 8859-2, windows-1257, Korean, which are treated as 8859-1.\r\n\t# This is VERY important for Eastern European, Baltic and Korean languages\r\n\treturn preg_replace(\"/&amp;(#[0-9]+|[a-z]+);/i\", \"&$1;\", @htmlspecialchars( $p_string, ENT_COMPAT, config_get('charset') ) );\r\n}", "function sanitizeString($str_input) {\r\n $str_input = strip_tags($str_input);\r\n $str_input = htmlentities($str_input);\r\n $str_input = stripslashes($str_input);\r\n return $str_input;\r\n}", "function cp_make_custom_name($cname) {\r\n\r\n\t$cname = preg_replace('/[^a-zA-Z0-9\\s]/', '', $cname);\r\n\t$cname = 'cp_' . str_replace(' ', '_', strtolower(substr(appthemes_clean($cname), 0, 30)));\r\n\r\n\treturn $cname;\r\n}", "function option($name)\n{\n $name = apply_filters(\"display_option_$name\", get_option($name));\n $name = html_escape($name);\n return $name;\n}", "function test_Providerinput($data)\n{\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "static public function esc($txt) {\n return htmlspecialchars($txt);\n }", "function _wp_specialchars( $string, $quote_style = ENT_NOQUOTES, $charset = false, $double_encode = false ) {\n\t$string = (string) $string;\n\n\tif ( 0 === strlen( $string ) )\n\t\treturn '';\n\n\t// Don't bother if there are no specialchars - saves some processing\n\tif ( ! preg_match( '/[&<>\"\\']/', $string ) )\n\t\treturn $string;\n\n\t// Account for the previous behaviour of the function when the $quote_style is not an accepted value\n\tif ( empty( $quote_style ) )\n\t\t$quote_style = ENT_NOQUOTES;\n\telseif ( ! in_array( $quote_style, array( 0, 2, 3, 'single', 'double' ), true ) )\n\t\t$quote_style = ENT_QUOTES;\n\n\t// Store the site charset as a static to avoid multiple calls to wp_load_alloptions()\n\tif ( ! $charset ) {\n\t\tstatic $_charset;\n\t\tif ( ! isset( $_charset ) ) {\n\t\t\t$alloptions = wp_load_alloptions();\n\t\t\t$_charset = isset( $alloptions['blog_charset'] ) ? $alloptions['blog_charset'] : '';\n\t\t}\n\t\t$charset = $_charset;\n\t}\n\n\tif ( in_array( $charset, array( 'utf8', 'utf-8', 'UTF8' ) ) )\n\t\t$charset = 'UTF-8';\n\n\t$_quote_style = $quote_style;\n\n\tif ( $quote_style === 'double' ) {\n\t\t$quote_style = ENT_COMPAT;\n\t\t$_quote_style = ENT_COMPAT;\n\t} elseif ( $quote_style === 'single' ) {\n\t\t$quote_style = ENT_NOQUOTES;\n\t}\n\n\t// Handle double encoding ourselves\n\tif ( $double_encode ) {\n\t\t$string = @htmlspecialchars( $string, $quote_style, $charset );\n\t} else {\n\t\t// Decode &amp; into &\n\t\t$string = wp_specialchars_decode( $string, $_quote_style );\n\n\t\t// Guarantee every &entity; is valid or re-encode the &\n\t\t$string = wp_kses_normalize_entities( $string );\n\n\t\t// Now re-encode everything except &entity;\n\t\t$string = preg_split( '/(&#?x?[0-9a-z]+;)/i', $string, -1, PREG_SPLIT_DELIM_CAPTURE );\n\n\t\tfor ( $i = 0; $i < count( $string ); $i += 2 )\n\t\t\t$string[$i] = @htmlspecialchars( $string[$i], $quote_style, $charset );\n\n\t\t$string = implode( '', $string );\n\t}\n\n\t// Backwards compatibility\n\tif ( 'single' === $_quote_style )\n\t\t$string = str_replace( \"'\", '&#039;', $string );\n\n\treturn $string;\n}", "function esc(String $value)\n{\n\t// bring the global db connect object into function\n\tglobal $conn;\n\n\t$val = trim($value); // remove empty space sorrounding string\n\t$data = stripslashes($val);\n\t$data = htmlspecialchars($data);\n\t$val = mysqli_real_escape_string($conn, $value);\n\n\treturn $data;\n}", "public function test_slugify() {\n $this->assertEquals('normal_string', DynamicMenu_Menu::slugify('normal string'));\n // converts hyphen to underscore\n $this->assertEquals('hyphened_string', DynamicMenu_Menu::slugify('hyphened-string'));\n // converts caps to lowercase\n $this->assertEquals('normal_title', DynamicMenu_Menu::slugify('Normal Title'));\n // any other special character to no space\n $this->assertEquals('havingsymbol', DynamicMenu_Menu::slugify('having@symbol'));\n $this->assertEquals('quotedstring', DynamicMenu_Menu::slugify('quoted\\'string')); \n }", "function harden($inpt) {\n $inpt = trim($inpt);\n $inpt = stripslashes($inpt);\n $inpt = htmlspecialchars($inpt);\n return $inpt;\n}", "function escape($value){//XSS attacks protection\n return htmlspecialchars($value , ENT_QUOTES,'UTF-8');\n }", "function rehtmlspecialchars($arg){\n\t//$arg = str_replace(\"\", \"<\", $arg);\n\t//$arg = str_replace(\" \", \"_\", $arg);\n\t$arg = str_replace(\"/\", \"\", $arg);\n\t$arg = str_replace(\"&\", \"\", $arg);\n\t$arg = str_replace(\"'\", \"\", $arg);\n\t$arg = str_replace(\"#\", \"\", $arg);\n\t$arg = str_replace(\"(\", \"\", $arg);\n\t$arg = str_replace(\")\", \"-\", $arg);\n\t$arg = str_replace(\".\", \"\", $arg);\n\t\n\treturn $arg;\n\t}", "function ATsanitize($input)\n{\n $user_input = trim($input);\n \n if (get_magic_quotesgpc())\n {\n $input = stripslashes($input);\n }\n}", "function tag_escape($tag_name)\n {\n }", "function acf_punctify($str = '')\n{\n}", "function ha($text_to_escape){\n\treturn htmlspecialchars($text_to_escape, ENT_QUOTES | ENT_IGNORE, 'UTF-8');\n}", "public function testAllowedValues()\n {\n $string = $this->basicSanitizer->sanitize('<a href=\"#\" title=\"four\">hey</a>');\n $this->assertEquals('<a href=\"#\">hey</a>', $string);\n }", "function esc(String $value){\n global $conn;\n $val = trim($value); // remove empty space sorrounding string\n $val = mysqli_real_escape_string($conn, $value);\n return $val;\n }", "function escape($content = null) {\n return Sanitize::stripAll($content);\n }" ]
[ "0.7714346", "0.7655529", "0.7497903", "0.7321529", "0.7312101", "0.69006974", "0.6862679", "0.6846908", "0.6838206", "0.67843723", "0.67037374", "0.66565704", "0.6595387", "0.6562398", "0.6528609", "0.6511456", "0.6489237", "0.64501077", "0.64376867", "0.6415322", "0.64057434", "0.6330977", "0.63153404", "0.63059413", "0.62836784", "0.6269212", "0.624382", "0.62414217", "0.62154394", "0.61766917", "0.6167668", "0.6144331", "0.61023474", "0.609858", "0.60390246", "0.5945354", "0.5944069", "0.5943074", "0.5931809", "0.58990186", "0.5897649", "0.58697796", "0.5868071", "0.58641404", "0.58266616", "0.5824737", "0.58175343", "0.58051306", "0.5800952", "0.57934767", "0.5770067", "0.5731852", "0.5718819", "0.57162184", "0.57074237", "0.57031375", "0.5686306", "0.56796163", "0.5677166", "0.5662813", "0.5661347", "0.5638639", "0.5637088", "0.5635437", "0.56342393", "0.56337565", "0.5609966", "0.56094825", "0.5608913", "0.56044436", "0.5599853", "0.5591203", "0.5587965", "0.5582754", "0.55768746", "0.5567453", "0.5564433", "0.55514634", "0.55490905", "0.55394435", "0.5537277", "0.55357957", "0.55310893", "0.55279595", "0.5525772", "0.5523844", "0.55140895", "0.55134594", "0.5512492", "0.55097204", "0.55051565", "0.5499737", "0.5499669", "0.5491323", "0.5489929", "0.54895365", "0.54891217", "0.5474761", "0.5469762", "0.54670835" ]
0.77115417
1
Updates statistics with a games result
public static function update(Game $game) { $stats = self::get(); if (isset($stats[$game->getState()->getId()])) { $stats[$game->getState()->getId()]++; } else { $stats[$game->getState()->getId()] = 1; } if (isset($stats[self::STATISTIC_COMPUTER_DRAW_PREFIX][$game->getComputerDecision()->getId()])) { $stats[self::STATISTIC_COMPUTER_DRAW_PREFIX][$game->getComputerDecision()->getId()]++; } else { $stats[self::STATISTIC_COMPUTER_DRAW_PREFIX][$game->getComputerDecision()->getId()] = 1; } if (isset($stats[self::STATISTIC_OPPONENT_DRAW_PREFIX][$game->getOpponentDecision()->getId()])) { $stats[self::STATISTIC_OPPONENT_DRAW_PREFIX][$game->getOpponentDecision()->getId()]++; } else { $stats[self::STATISTIC_OPPONENT_DRAW_PREFIX][$game->getOpponentDecision()->getId()] = 1; } $cache = new FilesystemCache(); $cache->set(self::STATISTIC_PREFIX, $stats); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function updateTeamStats()\n {\n $conditions = array('stats.needs_update' => true);\n $fields = array('league_id');\n $teams_needing_update = Teams::all(compact('conditions', 'fields'));\n\n $team_id_list = array();\n $team_stats = array();\n foreach ($teams_needing_update as $team) {\n $team_id_list[] = $team->_id;\n $team_stats[(string)$team->_id] = array(\n 'wins' => 0,\n 'losses' => 0,\n 'point_differential' => 0\n );\n }\n\n // Grab all of the games that apply to these teams, standings should be re-calced from the ground up.\n $conditions = array('teams' => array('$in' => $team_id_list), 'scores' => array('$exists' => true), 'winner' => array('$ne' => null));\n $fields = array('scores', 'winner', 'teams', 'league_id');\n $relevant_games_list = Games::all(compact('conditions', 'fields'));\n\n $league_list = array();\n foreach ($relevant_games_list as $game) {\n // Calculate stats for each team\n foreach ($game->getTeams() as $t) {\n $team_id = (string)$t->_id;\n if (!isset($team_stats[$team_id])) {\n // If we didn't pull all of this team's games, do not update their stats. \n continue;\n }\n\n if ($t->_id == $game->winner) {\n $team_stats[$team_id]['wins']++;\n $team_stats[$team_id]['point_differential'] += $game->getScoreDiff();\n } else {\n $team_stats[$team_id]['losses']++;\n $team_stats[$team_id]['point_differential'] -= $game->getScoreDiff();\n }\n }\n\n // Make sure we have a list of all of the leagues being updated\n $league_list[] = $game->league_id;\n }\n\n // Do the team stats updates:\n foreach ($team_stats as $team_id => $stats) {\n $conditions = array('_id' => new \\MongoId($team_id));\n $query = array('$set' => array('stats' => $stats));\n Teams::update($query, $conditions);\n }\n\n // Mark leagues as needing an update\n $league_list = array_unique($league_list);\n $conditions = array('_id' => array('$in' => $league_list));\n $query = array('$set' => array('needs_standings_update' => true));\n Leagues::update($query, $conditions); \n }", "public function updateScoresAndShots()\n {\n $this->player1score = 0;\n $this->player1shots = 0;\n $this->player2score = 0;\n $this->player2shots = 0;\n\n foreach ($this->getTurns() as $turn) {\n if ($turn->isVoid()) {\n continue;\n }\n\n if ($turn->getPlayer() == $this->getGame()->getPlayer1()) {\n $this->player1score += $turn->getTotalScore();\n $this->player1shots += 3;\n } else {\n $this->player2score += $turn->getTotalScore();\n $this->player2shots += 3;\n }\n }\n }", "public static function update_player_stats($appearance, $tries, $assist, $team_stats, $conv, $dgoal, $pgoal, $firstname, $lastname, $team, $player_id=null)\r\n {\r\n /* initialise extra values */\r\n $win = ($team_stats[0] == 'HOME' && $team_stats[1] == 'W') ? 1 : 0;\r\n $draw = (($team_stats[0] == 'HOME' || $team_stats[0] == 'AWAY') && ($team_stats[1] == 'D')) ? 1: 0;\r\n $away_win = ($team_stats[0] == 'AWAY' && $team_stats[1] == 'W') ? 1 : 0;\r\n\r\n /* check names for single or double quote */\r\n $firstname = (strpos($firstname, \"'\") !== false) ? str_replace(\"'\", \"\\'\", $firstname) : $firstname;\r\n $lastname = (strpos($lastname, \"'\") !== false) ? str_replace(\"'\", \"\\'\", $lastname) : $lastname;\r\n\r\n if ($player_id){\r\n return db::sql(\"UPDATE `superrugby_2016_scores_18` SET full_appearance = '\".$appearance['full'].\"', part_appearance = '\". $appearance['part'].\"' , try = $tries, assist = $assist,\r\n win = $win, draw = $draw, away_win = $away_win, conversion = $conv, drop_goal = $dgoal, penalty = $pgoal\r\n WHERE player_id = '$player_id';\", DB_NAME);\r\n } else {\r\n return db::sql(\"UPDATE `superrugby_2016_scores_18` SET full_appearance = '\".$appearance['full'].\"', part_appearance = '\". $appearance['part'].\"' , try = $tries, assist = $assist,\r\n win = $win, draw = $draw, away_win = $away_win, conversion = $conv, drop_goal = $dgoal, penalty = $pgoal\r\n WHERE first_name LIKE '$firstname%' AND last_name LIKE '$lastname%' AND Team LIKE '%$team';\", DB_NAME);\r\n }\r\n\r\n }", "protected function processResultsByGame($ws,$level,&$poolCount,&$newPool,$games, $header='Match Results',$headerLabels)\n {\n }", "function updatePlayerStats($pid = 0)\n{\n\tif(!$pid)\n\t{\n\t\t// We cannot update player data for someone who is not logged in.\n\t\tif(!LOGGED)\n\t\t\treturn;\n\n\t\t$pid = $GLOBALS['PLAYER']['player_id'];\n\t}\n\n\tglobal $db;\n\n\t$pres = $db->query('select * from player where player_id=' . $pid);\n\n\tif(!count($pres))\n\t\treturn;\n\n\t$stats = array('hp'=>$pres[0]['player_nomod_hp'], 'mp'=>$pres[0]['player_nomod_mp'], 'str'=>$pres[0]['player_nomod_str'], 'mag'=>$pres[0]['player_nomod_mag'], 'def'=>$pres[0]['player_nomod_def'], 'mgd'=>$pres[0]['player_nomod_mgd'], 'agl'=>$pres[0]['player_nomod_agl'], 'acc'=>$pres[0]['player_nomod_acc']);\n\n\t// equipment\n\n\t$res = $db->query('select sum(equipment_stat_hp) as hp, sum(equipment_stat_mp) as mp, sum(equipment_stat_str) as str, sum(equipment_stat_mag) as mag, sum(equipment_stat_def) as def, sum(equipment_stat_mgd) as mgd, sum(equipment_stat_agl) as agl, sum(equipment_stat_acc) as acc from equipment, player_equipment where equipment_id=player_equipment_equipment and player_equipment_equipped=1 and player_equipment_player=' . $pid . ' group by player_equipment_player');\n\n\tif(count($res))\n\t\tforeach($stats as $key => $val)\n\t\t\t$stats[$key] = $val + $res[0][$key];\n\n\t// jobs\n\n\t$res = $db->query('select job_stat_hp as hp, job_stat_mp as mp, job_stat_str as str, job_stat_mag as mag, job_stat_def as def, job_stat_mgd as mgd, job_stat_agl as agl, job_stat_acc as acc from job where job_id=' . $pres[0]['player_job']);\n\n\tif(count($res))\n\t\tforeach($stats as $key => $val)\n\t\t\t$stats[$key] = $val + $res[0][$key] * $pres[0]['player_nomod_' . $key] / 100.0;\n\n\t// houses\n\n\t$res = $db->query('select house_hp as hp, house_mp as mp, house_str as str, house_mag as mag, house_def as def, house_mgd as mgd, house_agl as agl, house_acc as acc from house where house_id=' . $pres[0]['player_house']);\n\n\tif(count($res))\n\t\tforeach($stats as $key => $val)\n\t\t\t$stats[$key] = $val + $res[0][$key] * $pres[0]['player_nomod_' . $key] / 100.0;\n\n\t// commit data\n\n\t$db->query('update player set\n\t\tplayer_mod_hp=' . $stats['hp'] . ',\n\t\tplayer_mod_mp=' . $stats['mp'] . ',\n\t\tplayer_mod_str=' . $stats['str'] . ',\n\t\tplayer_mod_mag=' . $stats['mag'] . ',\n\t\tplayer_mod_def=' . $stats['def'] . ',\n\t\tplayer_mod_mgd=' . $stats['mgd'] . ',\n\t\tplayer_mod_agl=' . $stats['agl'] . ',\n\t\tplayer_mod_acc=' . $stats['acc'] . '\n\t\twhere player_id=' . $pid);\n}", "public function get_stats()\n\t{\n\t\tglobal $_game;\n\t\t\n\t\t$expire = time() - 604800; // tell kun spillere som har vært pålogget siste uken\n\t\t$result = \\Kofradia\\DB::get()->query(\"SELECT up_b_id, COUNT(up_id) AS ant, SUM(up_cash) AS money FROM users_players WHERE up_access_level != 0 AND up_access_level < {$_game['access_noplay']} AND up_last_online > $expire GROUP BY up_b_id\");\n\t\twhile ($row = $result->fetch())\n\t\t{\n\t\t\tif (!isset($this->bydeler[$row['up_b_id']])) continue;\n\t\t\t\n\t\t\t$this->bydeler[$row['up_b_id']]['num_players'] = $row['ant'];\n\t\t\t$this->bydeler[$row['up_b_id']]['sum_money'] = $row['money'];\n\t\t}\n\t}", "public function updateStats() { StatisticsUpdater::update();\n return back()->with('status', 'Statistics updated');\n }", "function svp_actualiser_stats() {\n\t\n\t// Initialisation du retour\n\t$retour = true;\n\n\t// Récupération des statistiques globales (toute version SPIP) et mise en base dans la table spip_plugins\n\tinclude_spip('inc/distant');\n\t$page = recuperer_page(_SVP_SOURCE_STATS);\n\t$infos = json_decode($page);\n\tif (!$stats = $infos->plugins) {\n\t\t// On ne fait que loger l'erreur car celle-ci n'a pas d'incidence sur le comportement\n\t\t// de SVP\n\t\tspip_log('MODULE STATS - Réponse du serveur incorrecte ou mal formée. Les statistiques ne seront pas mises à jour', 'svp_actions.' . _LOG_ERREUR);\n\t\t$retour = false;\n\t} else {\n\t\tforeach ($stats as $_stat) {\n\t\t\t$prefixe = strtoupper($_stat->nom);\n\t\t\tif ($id_plugin = sql_getfetsel('id_plugin', 'spip_plugins', array('prefixe='. sql_quote($prefixe)))) {\n\t\t\t\t// Si le plugin est bien dans la base on peut lui mettre a jour ses statistiques\n\t\t\t\tsql_updateq('spip_plugins', \n\t\t\t\t\t\t\tarray('nbr_sites'=> $_stat->sites, 'popularite'=> floatval(trim($_stat->pourcentage, '%'))),\n\t\t\t\t\t\t\t'id_plugin=' . intval($id_plugin));\n\t\t\t}\n\t\t}\n\t}\n\n\t// Détermination de la date (mois année) pour l'historique.\n\t$date = date('m-y');\n\n\t// Récupération des statistiques par branche SPIP et mise en base dans la table spip_plugins_stats.\n\t// La liste des branches en cours est fournie par SVP dans un tableau global.\n\tinclude_spip('inc/svp_outiller');\n\tforeach (array_keys($GLOBALS['infos_branches_spip']) as $_branche) {\n\t\t// On charge le JSON des stats pour chaque branche SPIP\n\t\t$page = recuperer_page(_SVP_SOURCE_STATS . \"&v=${_branche}\");\n\t\t$infos = json_decode($page);\n\t\tif (!$stats = $infos->plugins) {\n\t\t\t// On ne fait que loger l'erreur car celle-ci n'a pas d'incidence sur le comportement\n\t\t\t// de SVP\n\t\t\tspip_log(\"MODULE STATS - Réponse du serveur incorrecte ou mal formée. Les statistiques de la branche ${_branche} ne seront pas mises à jour\", 'svp_actions.' . _LOG_ERREUR);\n\t\t\t$retour = false;\n\t\t} else {\n\t\t\tforeach ($stats as $_stat) {\n\t\t\t\t$prefixe = strtoupper($_stat->nom);\n\t\t\t\t$where = array('prefixe='. sql_quote($prefixe), 'branche_spip=' . sql_quote($_branche));\n\t\t\t\t// Suivant que l'enregistrement du plugin pour la branche donnée existe ou pas, on met à jour\n\t\t\t\t// ou on insère les statistiques.\n\t\t\t\t$historique = array();\n\t\t\t\tif ($historique_existant = sql_getfetsel('historique', 'spip_plugins_stats', $where)) {\n\t\t\t\t\t// Les stats existent déjà, on les met à jour avec l'historique mensuel.\n\t\t\t\t\t$historique = unserialize($historique_existant);\n\t\t\t\t\t$historique[$date] = $_stat->sites;\n\t\t\t\t\tsql_updateq(\n\t\t\t\t\t\t'spip_plugins_stats', \n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'nbr_sites' => $_stat->sites,\n\t\t\t\t\t\t\t'popularite' => floatval(trim($_stat->pourcentage, '%')),\n\t\t\t\t\t\t\t'historique' => serialize($historique)\n\t\t\t\t\t\t),\n\t\t\t\t\t\t$where\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\t// Les stats n'existent pas on les insèrent pour la première fois.\n\t\t\t\t\t$historique[$date] = $_stat->sites;\n\t\t\t\t\tsql_insertq(\n\t\t\t\t\t\t'spip_plugins_stats', \n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'prefixe' => $prefixe,\n\t\t\t\t\t\t\t'branche_spip' => $_branche,\n\t\t\t\t\t\t\t'nbr_sites' => $_stat->sites,\n\t\t\t\t\t\t\t'popularite' => floatval(trim($_stat->pourcentage, '%')),\n\t\t\t\t\t\t\t'historique' => serialize($historique)\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}\n\t\n\treturn $retour;\n}", "protected function UpdateStats() {\n\n $Path= $this->StorageDir.'/Stats.txt';\n // load and parse file\n $Lines= explode(\"\\n\", file_get_contents($Path));\n $Parsed= [];\n foreach($Lines as $Line) {\n $Parts= explode(':', $Line, 2);\n if (count($Parts) > 1) {\n $Parsed[$Parts[0]]= trim(end($Parts));\n }\n }\n // update values\n $Period= $Parsed['Period'] ?: date('r').' - 0';\n $Stats= $Parsed;\n foreach($this->Stats as $k => $v) {\t// transfer values from buffer\n $Stats[$k]= isset($Parsed[$k]) ? intval($Parsed[$k]) + $v : $v;\n }\n // prepare report\n array_walk($Stats, function(&$v, $k){$v= \"$k: $v\";});\n natcasesort($Stats);\n unset($Stats['Period']);\n array_unshift($Stats, 'Period: '.trim(explode(' - ', $Period)[0]).' - '.date('r'), '');\n // save\n file_put_contents($Path, implode(\"\\n\", $Stats));\n }", "public function getScores()\n {\n \t$url = 'http://www.nfl.com/liveupdate/scorestrip/ss.json';\n \t$content = file_get_contents($url);\n \t$ss_json = json_decode($content, true);\n \t\n $url = 'http://www.nfl.com/liveupdate/scores/scores.json';\n $content = file_get_contents($url);\n $scores_json = json_decode($content, true);\n\n foreach ($ss_json['gms'] as $game) {\n // Map game data to game\n $eid = $game[\"eid\"];\n $game['data'] = $scores_json[$eid];\n \n // Get team IDs\n $home_team = DB::table('team')->where('abbr', $game['data']['home']['abbr'])->value('id');\n $away_team = DB::table('team')->where('abbr', $game['data']['away']['abbr'])->value('id');\n \n // Save teams\n if (! $home_team > 0) {\n \tprint \"Inserting home team into DB<br/>\";\n $home_team = DB::table('team')->insertGetId([\n 'name' => $game['hnn'],\n 'abbr' => $game['data']['home']['abbr']\n ]);\n } else {\n print \"Updating home team in DB<br/>\";\n DB::table('team')->where('id',$home_team)->update(['name' => $game['hnn']]);\n }\n if (! $away_team > 0) {\n print \"Inserting away team into DB<br/>\";\n $away_team = DB::table('team')->insertGetId([\n 'name' => $game['vnn'],\n 'abbr' => $game['data']['away']['abbr']\n ]);\n } else {\n print \"Updating away team in DB<br/>\";\n DB::table('team')->where('id',$away_team)->update(['name' => $game['vnn']]);\n }\n \n // Determine start time\n $year = substr($eid,0,4);\n $month = substr($eid,4,2);\n $day = substr($eid,6,2);\n $time = explode(':',$game['t']);\n $hours = $time[0] + 12;\n $minutes = $time[1];\n $seconds = 0;\n $start = date(\"Y-m-d H:i:s\", mktime($hours, $minutes, $seconds, $month, $day, $year));\n \n // Pull game ID\n $gid = DB::table('game')\n ->where('home_team_id', $home_team)\n ->where('away_team_id', $away_team)\n ->value('id');\n \n // Save game\n if (! $gid > 0) {\n print \"Inserting game for \". $home_team .\" \". $away_team .\" \". $start .\"<br/>\";\n $gid = DB::table('game')->insertGetId([\n \t'eid' => $eid,\n 'home_team_id' => $home_team,\n \t 'away_team_id' => $away_team,\n 'start' => $start\n ]);\n }\n \n // Save scores\n print \"Inserting scores \". $game['data']['home']['score']['T'] .\" \". $game['data']['away']['score']['T'] .\"<br/>\";\n if ($game['data']['home']['score']['T'] != Null && $game['data']['home']['score']['T'] != Null) {\n DB::table('score')->insert([\n 'game_id' => $gid,\n 'home_q1' => $game['data']['home']['score']['1'],\n 'home_q2' => $game['data']['home']['score']['2'],\n 'home_q3' => $game['data']['home']['score']['3'],\n 'home_q4' => $game['data']['home']['score']['4'],\n 'home_q5' => $game['data']['home']['score']['5'],\n 'away_q1' => $game['data']['away']['score']['1'],\n 'away_q2' => $game['data']['away']['score']['2'],\n 'away_q3' => $game['data']['away']['score']['3'],\n 'away_q4' => $game['data']['away']['score']['4'],\n 'away_q5' => $game['data']['away']['score']['5']\n ]);\n }\n print \"<p>----------------------------------------</p>\";\n }\n\n $response = array('exit_code' => 'success');\n //return $response;\n }", "function display_player_stats($res) {\n\n echo '<br><div class=\"stat-sheet\"><h3>Regular Season Stats</h3><br>';\n\n // Table header:\n echo '<table class=\"player-tbl\" cellspacing=\"5\" cellpadding=\"5\"\n width=\"75%\">\n\t<tr class=\"player-stat-heading\">\n\t\t<td align=\"left\"><b>Year</b></td>\n\t\t<td align=\"left\"><b>Team</b></td>\n\t\t<td align=\"left\"><b>Lg</b></td>\n\t\t<td align=\"left\"><b>G</b></td>\n\t\t<td align=\"left\"><b>Min</b></td>\n\t\t<td align=\"left\"><b>Pts</b></td>\n\t\t<td align=\"left\"><b>PPG</b></td>\n\t\t<td align=\"left\"><b>FGM</b></td>\n\t\t<td align=\"left\"><b>FGA</b></td>\n\t\t<td align=\"left\"><b>FGP</b></td>\n\t\t<td align=\"left\"><b>FTM</b></td>\n\t\t<td align=\"left\"><b>FTA</b></td>\n\t\t<td align=\"left\"><b>FTP</b></td>\n\t\t<td align=\"left\"><b>3PM</b></td>\n\t\t<td align=\"left\"><b>3PA</b></td>\n\t\t<td align=\"left\"><b>3PP</b></td>\n\t\t<td align=\"left\"><b>ORB</b></td>\n\t\t<td align=\"left\"><b>DRB</b></td>\n\t\t<td align=\"left\"><b>TRB</b></td>\n\t\t<td align=\"left\"><b>RPG</b></td>\n\t\t<td align=\"left\"><b>AST</b></td>\n\t\t<td align=\"left\"><b>APG</b></td>\n\t\t<td align=\"left\"><b>STL</b></td>\n\t\t<td align=\"left\"><b>BLK</b></td>\n\t\t<td align=\"left\"><b>TO</b></td>\n\t\t<td align=\"left\"><b>PF</b></td>\n\t</tr>\n';\n\n // Fetch and print all the records:\n while ($row = mysqli_fetch_array($res, MYSQLI_ASSOC)) {\n echo '<tr class=\"player-stat\">\n\t\t\t<td align=\"left\">' . $row['year'] . '</td>\n\t\t\t<td align=\"left\">' . $row['team'] . '</td>\n\t\t\t<td align=\"left\">' . $row['lg'] . '</td>\n\t\t\t<td align=\"left\">' . $row['g'] . '</td>\n\t\t\t<td align=\"left\">' . $row['min'] . '</td>\n\t\t\t<td align=\"left\">' . $row['pts'] . '</td>\n\t\t\t<td align=\"left\">' . $row['ppg'] . '</td>\n\t\t\t<td align=\"left\">' . $row['fgm'] . '</td>\n\t\t\t<td align=\"left\">' . $row['fga'] . '</td>\n\t\t\t<td align=\"left\">' . $row['fgp'] . '</td>\n\t\t\t<td align=\"left\">' . $row['ftm'] . '</td>\n\t\t\t<td align=\"left\">' . $row['fta'] . '</td>\n\t\t\t<td align=\"left\">' . $row['ftp'] . '</td>\n\t\t\t<td align=\"left\">' . $row['tpm'] . '</td>\n\t\t\t<td align=\"left\">' . $row['tpa'] . '</td>\n\t\t\t<td align=\"left\">' . $row['tpp'] . '</td>\n\t\t\t<td align=\"left\">' . $row['orb'] . '</td>\n\t\t\t<td align=\"left\">' . $row['drb'] . '</td>\n\t\t\t<td align=\"left\">' . $row['trb'] . '</td>\n\t\t\t<td align=\"left\">' . $row['rpg'] . '</td>\n\t\t\t<td align=\"left\">' . $row['ast'] . '</td>\n\t\t\t<td align=\"left\">' . $row['apg'] . '</td>\n\t\t\t<td align=\"left\">' . $row['stl'] . '</td>\n\t\t\t<td align=\"left\">' . $row['blk'] . '</td>\n\t\t\t<td align=\"left\">' . $row['turnover'] . '</td>\n\t\t\t<td align=\"left\">' . $row['pf'] . '</td>\n\t\t</tr>\n\t\t';\n }\n\n echo '</table></div>';\n\n}", "function update_match_stats_entered($team_id1, $team_id2, $team1_points, $team2_points, $site, $connection)\n\t{\n\t\t$query = 'UPDATE `teams_profile` SET `num_matches_total`=`num_matches_total`+1';\n\t\t$query .= ' WHERE (`teamid`=' . sqlSafeStringQuotes($team_id1) . ' OR `teamid`=' . sqlSafeStringQuotes($team_id2) . ')';\n\t\tif (!($result = $site->execute_query('teams_overview', $query, $connection)))\n\t\t{\n\t\t\tunlock_tables($site, $connection);\n\t\t\t$site->dieAndEndPage('The match count for the teams with id'\n\t\t\t\t\t\t\t\t . sqlSafeString($team_id1) . ' and ' . sqlSafeString($team_id2) . ' could not be updated due to a sql problem!');\n\t\t}\n\t\t\n\t\t// mark both participating teams as active\n\t\t$query = ('UPDATE `teams_overview` SET `deleted`=' . sqlSafeStringQuotes('1')\n\t\t\t\t . ' WHERE `teamid`=' . sqlSafeStringQuotes($team_id1) . ' OR `teamid`=' . sqlSafeStringQuotes($team_id2)\n\t\t\t\t . ' LIMIT 2');\n\t\tif (!($result = @$site->execute_query('teams_overview', $query, $connection)))\n\t\t{\n\t\t\t$site->dieAndEndPage('Could not mark team with id ' . sqlSafeString($teamid) . ' as active!');\n\t\t}\n\t\t\n\t\t\n\t\t// increase match win count for teams that participated\n\t\tif ($team1_points > $team2_points)\n\t\t{\n\t\t\t// team 1 won\n\t\t\t$query = 'UPDATE `teams_profile` SET `num_matches_won`=`num_matches_won`+1';\n\t\t\t$query .= ' WHERE `teamid`=' . sqlSafeStringQuotes($team_id1);\n\t\t\tif (!($result = $site->execute_query('teams_profile', $query, $connection)))\n\t\t\t{\n\t\t\t\tunlock_tables($site, $connection);\n\t\t\t\t$site->dieAndEndPage('The match win count for team ' . sqlSafeString($team_id1) . ' could not be updated due to a sql problem!');\n\t\t\t}\n\t\t\t\n\t\t\t// team 2 lost\n\t\t\t$query = 'UPDATE `teams_profile` SET `num_matches_lost`=`num_matches_lost`+1';\n\t\t\t$query .= ' WHERE `teamid`=' . sqlSafeStringQuotes($team_id2);\n\t\t\tif (!($result = $site->execute_query('teams_profile', $query, $connection)))\n\t\t\t{\n\t\t\t\tunlock_tables($site, $connection);\n\t\t\t\t$site->dieAndEndPage('The match lose count for team ' . sqlSafeString($team_id2) . ' could not be updated due to a sql problem!');\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($team1_points < $team2_points)\n\t\t{\n\t\t\t// team 2 won\n\t\t\t$query = 'UPDATE `teams_profile` SET `num_matches_won`=`num_matches_won`+1';\n\t\t\t$query .= ' WHERE `teamid`=' . sqlSafeStringQuotes($team_id2);\n\t\t\tif (!($result = $site->execute_query('teams_profile', $query, $connection)))\n\t\t\t{\n\t\t\t\tunlock_tables($site, $connection);\n\t\t\t\t$site->dieAndEndPage('The match win count for team ' . sqlSafeString($team_id2) . ' could not be updated due to a sql problem!');\n\t\t\t}\n\t\t\t\n\t\t\t// team 1 lost\n\t\t\t$query = 'UPDATE `teams_profile` SET `num_matches_lost`=`num_matches_lost`+1';\n\t\t\t$query .= ' WHERE `teamid`=' . sqlSafeStringQuotes($team_id1);\n\t\t\tif (!($result = $site->execute_query('teams_profile', $query, $connection)))\n\t\t\t{\n\t\t\t\tunlock_tables($site, $connection);\n\t\t\t\t$site->dieAndEndPage('The match lose count for team ' . sqlSafeString($team_id1) . ' could not be updated due to a sql problem!');\n\t\t\t}\n\t\t}\n\t\t\n\t\t// match entered ended in a draw\n\t\tif (((int) $team1_points) === ((int) $team2_points))\n\t\t{\n\t\t\t$query = 'UPDATE `teams_profile` SET `num_matches_draw`=`num_matches_draw`+1';\n\t\t\t$query .= ' WHERE (`teamid`=' . sqlSafeStringQuotes($team_id1) . ' OR `teamid`=' . sqlSafeStringQuotes($team_id2) . ')';\n\t\t\tif (!($result = $site->execute_query('teams_profile', $query, $connection)))\n\t\t\t{\n\t\t\t\tunlock_tables($site, $connection);\n\t\t\t\t$site->dieAndEndPage('The match draw count for the teams with id'\n\t\t\t\t\t\t\t\t\t . sqlSafeString($team_id1) . ' and ' . sqlSafeString($team_id2) . ' could not be updated due to a sql problem!');\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "function AddResults($rid){\n\t\n\tglobal $db_league_leagues,$db_league_seasons_rounds,$db_league_seasons,$db_clan_games,$db_league_seasons_round_allowed_players;\n\tglobal $db_admin,$db_admin_contact,$db_country,$db_league_seasons_rounds_results_players,$db_league_teams;\n\tglobal $url_flags;\n\t\n \t// CHECK PRIVILEGIES\n\tif ($_GET['action'] == \"results_add\" || $_GET['action'] == \"results_show\"){\n\t\tif (CheckPriv(\"groups_league_season_add\") <> 1) { echo _NOTENOUGHPRIV;exit;}\n\t} else {\n\t\techo _NOTENOUGHPRIV;exit;\n\t}\n\t\n\t$res_rounds = mysql_query(\"SELECT a.admin_nick, lt.league_team_name, lsrrp.league_season_round_result_player_points, lsrap.league_season_round_allowed_player_guid, lsrrp.league_season_round_result_player_player_id, c.country_shortname,c.country_name \n\tFROM $db_league_seasons_rounds_results_players AS lsrrp \n\tJOIN $db_league_seasons_round_allowed_players AS lsrap ON lsrap.league_season_round_allowed_player_player_id=lsrrp.league_season_round_result_player_player_id AND lsrap.league_season_round_allowed_player_season_round_id=\".(float)$rid.\" \n\tJOIN $db_admin AS a ON a.admin_id=lsrap.league_season_round_allowed_player_admin_id \n\tJOIN $db_league_teams AS lt ON lt.league_team_id=lsrap.league_season_round_allowed_player_team_id \n\tLEFT JOIN $db_admin_contact AS ac ON ac.aid=a.admin_id \n\tLEFT JOIN $db_country AS c ON c.country_id=ac.admin_contact_country \n\tWHERE lsrrp.league_season_round_result_player_round_id=\".(float)$rid.\" \n\tORDER BY lsrrp.league_season_round_result_player_place ASC\") or die (\"<strong>File:</strong> \".__FILE__.\"<br /><strong>Line:</strong>\".__LINE__.\"<br />\".mysql_error());\n\t\n\tswitch ($_GET['action']){\n\t\tcase \"results_add\":\n\t\t\t$res_round = mysql_query(\"SELECT lsr.league_season_round_id, lsr.league_season_round_classified, lsr.league_season_round_season_id, lsr.league_season_round_date, lsr.league_season_round_num, l.league_league_id, l.league_league_name, ls.league_season_name \n\t\t\tFROM $db_league_seasons_rounds AS lsr \n\t\t\tJOIN $db_league_seasons AS ls ON ls.league_season_id=lsr.league_season_round_season_id \n\t\t\tJOIN $db_league_leagues AS l ON l.league_league_id=ls.league_season_league_id \n\t\t\tWHERE lsr.league_season_round_id=\".(float)$rid) or die (\"<strong>File:</strong> \".__FILE__.\"<br /><strong>Line:</strong>\".__LINE__.\"<br />\".mysql_error());\n\t\t\t$nick = \"\";\n\t\t\t$team = \"\";\n\t\t\t$table_width = \"857\";\n\t\t\t\n\t\t\techo Menu();\n\t\t\t\n\t\tbreak;\n\t\tcase \"results_show\":\n\t\t\t$res_round = mysql_query(\"SELECT lsr.league_season_round_id, lsr.league_season_round_classified, lsr.league_season_round_season_id, lsr.league_season_round_date, lsr.league_season_round_num, l.league_league_id, l.league_league_name, ls.league_season_name \n\t\t\tFROM $db_league_seasons_rounds AS lsr \n\t\t\tJOIN $db_league_seasons AS ls ON ls.league_season_id=lsr.league_season_round_season_id \n\t\t\tJOIN $db_league_leagues AS l ON l.league_league_id=ls.league_season_league_id \n\t\t\tWHERE lsr.league_season_round_id=\".(float)$rid) or die (\"<strong>File:</strong> \".__FILE__.\"<br /><strong>Line:</strong>\".__LINE__.\"<br />\".mysql_error());\n\t\t\t$flag = \"\t\t<td width=\\\"20\\\" align=\\\"left\\\" class=\\\"eden_title\\\">\"._CMN_COUNTRY.\"</td>\\n\";\n\t\t\t$nick = \"\t\t<td width=\\\"200\\\" align=\\\"left\\\" class=\\\"eden_title\\\">\"._LEAGUE_PLAYER_NICK.\"</td>\\n\";\n\t\t\t$team = \"\t\t<td width=\\\"200\\\" align=\\\"left\\\" class=\\\"eden_title\\\">\"._LEAGUE_TEAM.\"</td>\\n\";\n\t\t\t$table_width = \"600\";\n\t\tbreak;\n\t\tdefault:\n\t\t\techo \"\";\n\t}\n\t$ar_round = mysql_fetch_array($res_round);\n\t$league_name = stripslashes($ar_round['league_league_name']);\n\t$season_id = $ar_round['league_season_round_season_id'];\n\t$season_name = stripslashes($ar_round['league_season_name']);\n\t$round_num = $ar_round['league_season_round_num'];\n\t\n\techo \"<table width=\\\"\".$table_width.\"\\\" cellspacing=\\\"2\\\" cellpadding=\\\"1\\\" class=\\\"eden_main_table\\\">\\n\";\n\techo \"\t<tr>\\n\";\n\techo \"\t\t<td colspan=\\\"3\\\" align=\\\"left\\\">\";\n\t\t\t\t\tif ($_GET['action'] == \"results_add\"){echo \"<h5 style=\\\"margin:20px 0px 0px 0px;\\\">\".$league_name.\" > <a href=\\\"modul_league.php?action=rounds&sid=\".$season_id.\"&project=\".$_SESSION['project'].\"\\\" target=\\\"_self\\\">\".$season_name.\"</a> > \"._LEAGUE_SEASON_ROUND.\" \".$round_num.\"</h5>\";}\n\t\t\t\t\tif ($_GET['action'] == \"results_add\"){echo \"<form action=\\\"sys_save.php?action=results_add&rid=\".$rid.\"sid=\".$season_id.\"\\\" method=\\\"post\\\" enctype=\\\"multipart/form-data\\\">\";}\n\techo \"\t\t</td>\\n\";\n\techo \"\t</tr>\\n\";\n\techo \"\t<tr style=\\\"background-color:#dce3f1;\\\">\\n\";\n\techo \"\t\t<td width=\\\"50\\\" align=\\\"left\\\" class=\\\"eden_title\\\">\"._LEAGUE_SEASON_ROUND_POSITION.\"</td>\\n\";\n\techo \"\t\t<td align=\\\"left\\\" class=\\\"eden_title\\\">\"._LEAGUE_SEASON_ROUND_POINTS.\"</td>\\n\";\n\techo $flag;\n\techo $nick;\n\techo \"\t\t<td width=\\\"200\\\" align=\\\"left\\\" class=\\\"eden_title\\\">\"._LEAGUE_SEASON_ROUND_GUID.\"</td>\\n\";\n\techo $team;\n\techo \"\t</tr>\\n\";\n\tswitch ($_GET['action']){\n\t\tcase \"results_add\":\n\t\t\t$i=1;\n\t\t\twhile ($ar_round['league_season_round_classified'] >= $i){\n\t\t\t\t$ar_rounds = mysql_fetch_array($res_rounds);\n\t\t\t\tif ($ar_rounds['league_season_round_result_player_player_id']){ $guid = $ar_rounds['league_season_round_allowed_player_guid'].\" (PID \".$ar_rounds['league_season_round_result_player_player_id'].\")\";} else {$guid =\"\";}\n\t\t\t\techo \"<tr align=\\\"left\\\" valign=\\\"top\\\" onmouseover=\\\"this.style.backgroundColor='FFDEDF'\\\" onmouseout=\\\"this.style.backgroundColor='FFFFFF'\\\" style=\\\"background-color: #FFFFFF;\\\">\\n\";\n\t\t\t\techo \"\t<td width=\\\"50\\\" align=\\\"right\\\" valign=\\\"middle\\\">\";\n\t\t\t\techo \"\t\t<input type=\\\"hidden\\\" name=\\\"round_player_num\\\" value=\\\"\".$i.\"\\\">\";\n\t\t\t\techo \"\t\t<input type=\\\"hidden\\\" name=\\\"round_player_data[\".$i.\"_place]\\\" value=\\\"\".$i.\"\\\">\";\n\t\t\t\techo \"\t\t\".$i.\"\";\n\t\t\t\techo \"\t</td>\\n\";\n\t\t\t\techo \"\t<td align=\\\"left\\\">\";\n\t\t\t\techo \"\t\t<input name=\\\"round_player_data[\".$i.\"_points]\\\" size=\\\"5\\\" value=\\\"\".$ar_rounds['league_season_round_result_player_points'].\"\\\">\";\n\t\t\t\techo \"\t</td>\\n\";\n\t\t\t\techo \"\t<td width=\\\"200\\\" align=\\\"left\\\">\";\n\t\t\t\techo \"\t\t<input type=\\\"text\\\" name=\\\"round_player_data[\".$i.\"_player_guid]\\\" size=\\\"25\\\" value=\\\"\".$guid.\"\\\" autocomplete=\\\"off\\\" onkeyup=\\\"ajax_showOptions(this,'getAllowedPlayerGuidByLetters=1&rid=\".$rid.\"&project=\".$_SESSION['project'].\"',event)\\\">\";\n\t\t\t\techo \"\t</td>\\n\";\n\t\t\t\techo \"</tr>\\n\";\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\techo \"\t<tr align=\\\"left\\\" valign=\\\"top\\\">\\n\";\n\t\t\techo \"\t\t<td align=\\\"left\\\" colspan=\\\"3\\\"><br />\\n\";\n\t\t\techo \"\t\t\t<input type=\\\"hidden\\\" name=\\\"round\\\" value=\\\"\".$round_num.\"\\\">\\n\";\n\t\t\techo \"\t\t\t<input type=\\\"hidden\\\" name=\\\"rid\\\" value=\\\"\".$rid.\"\\\">\\n\";\n\t\t\techo \"\t\t\t<input type=\\\"hidden\\\" name=\\\"sid\\\" value=\\\"\".$season_id.\"\\\">\\n\";\n\t\t\techo \"\t\t\t<input type=\\\"submit\\\" value=\\\"\"._LEAGUE_SEASON_ROUND_RESULTS_SAVE.\"\\\" class=\\\"eden_button\\\">\\n\";\n\t\t\techo \"\t\t\t<input type=\\\"hidden\\\" name=\\\"confirm\\\" value=\\\"true\\\">\\n\";\n\t\t\techo \"\t\t\t<input type=\\\"hidden\\\" name=\\\"project\\\" value=\\\"\".$_SESSION['project'].\"\\\">\\n\";\n\t\t \tif ($ar_rounds){echo \"\t\t\t<input type=\\\"hidden\\\" name=\\\"results_mode\\\" value=\\\"edit\\\">\\n\";}\n\t\t\techo \"\t\t\t</form>\\n\";\n\t\t\techo \"\t\t</td>\\n\";\n\t\t\techo \"\t</tr>\\n\";\n\t\tbreak;\n\t\tcase \"results_show\":\n\t\t\t$i=1;\n\t\t\twhile ($ar_rounds = mysql_fetch_array($res_rounds)){\n\t\t\t\techo \"\t<tr \"; if ($i % 2 == 0){echo \"class=\\\"suda\\\"\";} else {echo \"class=\\\"licha\\\"\";} echo \">\\n\";\n\t\t\t\techo \"\t<td width=\\\"50\\\" align=\\\"right\\\" valign=\\\"middle\\\">\".$i.\"</td>\\n\";\n\t\t\t\techo \"\t<td align=\\\"left\\\">\".$ar_rounds['league_season_round_result_player_points'].\"</td>\\n\";\n\t \t\t\techo \"\t<td valign=\\\"top\\\"><img src=\\\"\".$url_flags.$ar_rounds['country_shortname'].\".gif\\\" alt=\\\"\".stripslashes($ar_rounds['country_name']).\"\\\" title=\\\"\".stripslashes($ar_rounds['country_name']).\"\\\" /></td>\";\n\t \t\t\techo \"\t<td align=\\\"left\\\">\".$ar_rounds['admin_nick'].\"</td>\\n\";\n\t\t\t\techo \"\t<td width=\\\"200\\\" align=\\\"left\\\">\".$ar_rounds['league_season_round_allowed_player_guid'].\"</td>\\n\";\n\t\t\t\techo \"\t<td align=\\\"left\\\">\".$ar_rounds['league_team_name'].\"</td>\\n\";\n\t\t\t\techo \"</tr>\\n\";\n\t\t\t\t$i++;\n\t\t\t}\n\t\tbreak;\n\t\tdefault;\n\t\t\techo \"\";\n\t}\n\techo \"</table>\\n\";\n}", "public function statsUpdate(Request $request): RedirectResponse\n {\n $match = Match::find($request->itemid);\n\n $scotlandData = [\n 'match_id' => $request->itemid,\n 'team_id' => 0,\n 'colour' => $request->scotland_colour ?? '',\n 'possession' => $request->scotland_possession ?? '',\n 'shots' => $request->scotland_shots ?? '',\n 'on_target' => $request->scotland_on_target ?? '',\n 'fouls' => $request->scotland_fouls ?? '',\n 'offside' => $request->scotland_offside ?? '',\n 'corners' => $request->scotland_corners ?? '',\n 'saves' => $request->scotland_saves ?? '',\n 'ta' => $request->scotland_ta ?? '',\n 'yellow_cards' => $request->scotland_yellow_cards ?? '',\n 'red_cards' => $request->scotland_red_cards ?? '',\n 'source' => $request->source ?? ''\n ];\n\n $opponentData = [\n 'match_id' => $request->itemid,\n 'team_id' => $match->opponent_id,\n 'colour' => $request->opponent_colour ?? '',\n 'possession' => $request->opponent_possession ?? '',\n 'shots' => $request->opponent_shots ?? '',\n 'on_target' => $request->opponent_on_target ?? '',\n 'fouls' => $request->opponent_fouls ?? '',\n 'offside' => $request->opponent_offside ?? '',\n 'corners' => $request->opponent_corners ?? '',\n 'saves' => $request->opponent_saves ?? '',\n 'ta' => $request->opponent_ta ?? '',\n 'yellow_cards' => $request->opponent_yellow_cards ?? '',\n 'red_cards' => $request->opponent_red_cards ?? '',\n 'source' => $request->source ?? ''\n ];\n\n\n\n if (MatchStatistic::where('match_id','=',$request->itemid)->count() == 0) {\n $extraStat = MatchStatistic::create($scotlandData);\n $extraStat = MatchStatistic::create($opponentData);\n }\n else {\n $extraStat = MatchStatistic::where('match_id', '=', $request->itemid)->where('team_id','=','0')->update($scotlandData);\n $extraStat = MatchStatistic::where('match_id', '=', $request->itemid)->where('team_id','<>','0')->update($opponentData);\n }\n\n return redirect('/admin/match/' . $request->itemid);\n }", "public function displayScores() {\n SJTTournamentTools::getInstance()->getServer()->broadcastMessage('Scores for recent game of Parkour are...');\n\n foreach ($this->scores as $playerName => $playerScores) {\n\t\t\t$score = 0;\n\t\t\tforeach ($playerScores as $location => $value) {\n\t\t\t\t$score += $value;\n\t\t\t}\n\n SJTTournamentTools::getInstance()->getServer()->broadcastMessage($playerName . ' scored ' . $score);\n\t\t}\n }", "private function calculateResultsForEachTeam($teams, $games)\n {\n foreach ($teams as $key => $team)\n {\n $team_name = $team->getName();\n $played = 0;\n $wins = 0;\n $draws = 0;\n $losses = 0;\n $points = 0;\n\n foreach ($games as $game)\n {\n if ($game['homeTeam'] == $team_name || $game['awayTeam'] == $team_name)\n {\n $played++;\n $score = explode(' ', $game['score']);\n $homeScore = $score[0];\n $awayScore = $score[2];\n\n // case home game\n if ($team_name == $game['homeTeam'])\n {\n if ($homeScore > $awayScore)\n {\n $wins++;\n $points += 3;\n }\n else if ($awayScore == $awayScore)\n {\n $draws++;\n $points += 1;\n }\n else\n {\n $losses++;\n }\n }\n // case away game\n else\n {\n if ($homeScore < $awayScore)\n {\n $wins++;\n $points += 3;\n }\n else if ($homeScore == $awayScore)\n {\n $draws++;\n $points += 1;\n }\n else\n {\n $losses++;\n }\n }\n }\n }\n\n $standing = array\n (\n 'place' => 0,\n 'team' => $team_name,\n 'played' => $played,\n 'wins' => $wins,\n 'draws' => $draws,\n 'losses' => $losses,\n 'points' => $points\n );\n\n $this->standings[$key] = $standing;\n }\n\n return $this;\n }", "protected function _gameScoreVsAchievementTotal()\n\t{\n\t\t$dataArray = array();\n\t\tforeach($this->getGamer()->getGames() as $game)\n\t\t{\n\t\t\t$data = new BaseObject();\n\t\t\t$data->setGameScore($game->getScore());\n\t\t\t$data->setAchievementSum($game->getAchievementCollection()->sumColumn('score'));\n\t\t\t$data->setAchievementCount($game->getAchievementCollection()->count());\n\t\t\t$data->setGameAchievement($game->getAchievements());\n\t\t\t\n\t\t\t$data->setName($game->getName());\n\t\t\t\n\t\t\t$dataArray[$game->getSlug()] = $data;\n\t\t}\n\t\t\n\t\t$this->setGameVsAchievement($dataArray);\n\t\treturn $this;\n\t}", "public function populateMatchStandings(){\n\t\t $team = new Application_Model_Mapper_Team();\n\t\t //cath all teams\n\t\t $teamList=$team->fetchAll();\n\t\t $prosGoal= null;\n\t\t $agaistGoal=null;\n\t\t if(count($teamList)>0){\n\t\t \t foreach($teamList as $row){\n\t\t \t \t //begin team statistics by 0\n\t\t \t \t $row->setWins(0);\n\t\t \t \t $row->setLosses(0);\n\t\t \t \t $row->setPoints(0);\n\t\t \t \t $row->setDraws(0);\n\t\t \t \t //catch all matches by team\n\t\t $championship = $this->seachMatchByTeam($row->getId());\n\t\t foreach ($championship as $match) {\n\t\t //if a team is a visitor team goals of visitor team it is\n\t\t \t $prosGoal=$match['goalVisitorTeam'];\n\t\t \t $agaistGoal=$match['goalHomeTeam'];\n\t\t \t //if a team is a home team goals of home team it is\n\t\t \t if($match['idHomeTeam']==$row->getId()){\n\t\t \t \t $prosGoal=$match['goalHomeTeam'];\n\t\t \t \t $agaistGoal=$match['goalVisitorTeam'];\n\t\t \t }\n\t\t \t //if team win\n\t\t \t if($agaistGoal<$prosGoal){\n\t\t \t \t$row->setWins($row->getWins()+1);\n\t\t \t \t$row->setPoints($row->getPoints()+3);\n\t\t \t }//if team lost\n\t\t \t elseif($agaistGoal>$prosGoal){\n\t\t \t \t$row->setLosses($row->getLosses()+1);\n\t\t \t }//if team draw\n\t\t \t else{\n\t\t \t \t$row->setDraws($row->getDraws()+1);\n\t\t \t \t$row->setPoints($row->getPoints()+1);\n\t\t \t }\n\t\t }\n\t\t //update table team\n\t\t $team->updateTeam($row);\n\t\t \t }\n\t\t }\n\t}", "public function getStats() {}", "public function updateResult(Request $request): JsonResponse\n {\n try {\n $mission = Mission::where('uuid', '=', $request->get('mid'))->first();\n $results = $request->get('results');\n\n if($mission) {\n $mission->update(['status' => 'completed']);\n\n // Season pass level points\n $SPController = new SeasonPassController();\n\n foreach ($results as $item => $result) {\n if($mission->game === 'fortnite') {\n $missionToUser = MissionToUser::join('missions', 'missions.id', '=', 'mission_to_users.mission_id')\n ->join('users', 'users.id', '=', 'mission_to_users.user_id')\n ->where([\n ['missions.uuid', '=', $request->get('mid')],\n ['users.epic_id', '=', $item]\n ])\n ->select('mission_to_users.*')\n ->first();\n } elseif ($mission->game === 'dota2' || $mission->game === 'csgo') {\n $missionToUser = MissionToUser::join('missions', 'missions.id', '=', 'mission_to_users.mission_id')\n ->join('users', 'users.id', '=', 'mission_to_users.user_id')\n ->where([\n ['missions.uuid', '=', $request->get('mid')],\n ['users.steam_id_32', '=', $item]\n ])\n ->select('mission_to_users.*')\n ->first();\n }\n\n if($result[0] === null) {\n $missionToUser->delete();\n } else {\n $missionToUser->update([\n 'completed' => $result[0],\n 'result' => $result[1],\n 'finished_at' => Carbon::now()\n ]);\n\n // Find user\n $user = null;\n if($mission->game === 'fortnite') {\n $user = User::where('epic_id', '=', $item)->first();\n } elseif ($mission->game === 'dota2' || $mission->game === 'csgo') {\n $user = User::where('steam_id_32', '=', $item)->first();\n }\n\n $points = [\n 'free' => [\n 'win' => 10,\n 'lose' => 20\n ],\n 'private' => [\n 'win' => 20,\n 'lose' => 10\n ],\n 'legendary' => [\n 'win' => 25,\n 'lose' => 5\n ],\n 'season_pass' => [\n 'win' => 30,\n 'lose' => 0\n ],\n ];\n\n $stats = $user->seasonStats()\n ->firstOrCreate(\n [\n 'season_id' => (new RatingController())->getCurrentSeason()->id,\n 'section' => 'missions',\n 'game' => $mission->game\n ],\n [\n 'wins' => 0,\n 'loses' => 0,\n 'total' => 0,\n 'rating' => 1000,\n 'missions' => [\n 'legendary' => 0,\n 'private' => 0,\n 'free' => 0,\n 'season_pass' => 0,\n ]\n ]);\n\n if($result[0]) {\n\n $multiplier = 1;\n\n // If user has valid multiplier for mission reward\n if(isset($user->bonuses->prizes['missions_boost']) && Carbon::parse($user->bonuses->prizes['missions_boost']['date_end']) >= Carbon::now()) {\n $multiplier = $user->bonuses->prizes['missions_boost']['multiplier'];\n }\n\n $user->update([\n 'balance_points' => ((int)$user->balance_points + ((int)$mission->reward * $multiplier)),\n 'account_points' => ((int)$user->account_points + (25 * $multiplier))\n ]);\n\n // Win\n $stats->update([\n 'wins' => DB::raw('wins + 1'),\n 'total' => DB::raw('total + 1'),\n 'rating' => $stats->rating + $points[$mission->category]['win'],\n 'missions->legendary' => $mission->category === 'legendary' ? ($stats->missions['legendary'] + 1) : $stats->missions['legendary'],\n 'missions->private' => $mission->category === 'private' ? ($stats->missions['private'] + 1) : $stats->missions['private'],\n 'missions->free' => $mission->category === 'free' ? ($stats->missions['free'] + 1) : $stats->missions['free'],\n 'missions->season_pass' => $mission->category === 'season_pass' ? ($stats->missions['season_pass'] + 1) : $stats->missions['season_pass'],\n ]);\n\n $SPController->updateUserPoints($user->id, 20);\n } else {\n $newRating = $stats->rating - $points[$mission->category]['lose'];\n // Lose\n $stats->update([\n 'loses' => DB::raw('loses + 1'),\n 'total' => DB::raw('total + 1'),\n 'rating' => $newRating >= 0 ? $newRating : 0,\n ]);\n\n $SPController->updateUserPoints($user->id, 10);\n }\n\n // Create notification to user\n UserNotification::create([\n 'user_id' => $user->id,\n 'category' => 'missions',\n 'title' => [\n 'ru' => 'Миссия завершилась',\n 'en' => \"Mission has been ended\"\n ],\n 'text' => [\n 'ru' => $result[0] ? 'Поздравляем! Миссия успешно выполнена, очки начислены на Ваш аккаунт!' : 'К сожалению Вы не выполнили миссию, попробуйте пройти еще!',\n 'en' => $result[0] ? 'Congrats! Mission has been successfully completed, points has been added to your account!' : \"Unfortunately you've failed a mission, try again with another one!\"\n ],\n ]);\n }\n }\n\n return response()->json('');\n }\n } catch (\\Exception $e) {\n Log::info('Ошибка с получением инфы с миссий');\n Log::info($e->getTraceAsString());\n\n return response()->json('');\n }\n }", "public function update(Request $request)\n {\n $match = Match::where('id', $request->match_id)->first();\n $match->host_team_result = $request->host_goals;\n $match->guest_team_result = $request->guest_goals;\n\n\n// //update host team standings\n $host_team_standings = Standing::where('team_id', $match->host_team_id)->first();\n $host_team_standings->gp += 1;\n//\n// //update guest team standings\n $guest_team_standings = Standing::where('team_id', $match->guest_team_id)->first();\n $guest_team_standings->gp += 1;\n\n// //update win results\n if ($request->host_goals > $request->guest_goals) {\n $host_team_standings->w += 1;\n $host_team_standings->pts += 3;\n $guest_team_standings->l += 1;\n $guest_team_standings->pts += 1;\n } else if ($request->host_goals < $request->guest_goals)\n {\n\n $host_team_standings->l += 1;\n $host_team_standings->pts += 1;\n $guest_team_standings->w += 1;\n $guest_team_standings->pts += 3;\n } else if ($request->host_goals == $request->guest_goals)\n {\n $host_team_standings->d += 1;\n $guest_team_standings->d += 1;\n }\n $host_team_standings->save();\n $guest_team_standings->save();\n $match->save();\n\n return response()->json(['success'=> \"Results updated\"]);\n }", "public function getStats();", "public function calculateAllTeamsPlayerValues(){\n $view= $this->view;\n $view->setNoRender();\n $peopleService = parent::getService('people','people');\n $teamService = parent::getService('team','team');\n $leagueService = parent::getService('league','league');\n Service::loadModels('rally', 'rally');\n $season = $leagueService->getCurrentSeason();\n $peopleService->calculateNewValuesForAllPlayers($season);\n echo \"good\";\n }", "function cleanupGameStats()\n\t{\n mysqli_query( Registry::$mysqliLink, 'DELETE FROM glestserver WHERE status = 3 AND gameUUID in (SELECT gameUUID from glestgamestats where framesToCalculatePlaytime / 40 / 60 < ' . MAX_MINS_OLD_COMPLETED_GAMES . ');');\n\n // Cleanup game stats for games that are purged\n mysqli_query( Registry::$mysqliLink, 'DELETE FROM glestgamestats WHERE gameUUID NOT IN (SELECT gameUUID from glestserver);');\n mysqli_query( Registry::$mysqliLink, 'DELETE FROM glestgameplayerstats WHERE gameUUID NOT IN (SELECT gameUUID from glestgamestats);');\n }", "public function updateDB()\n {\n // Save the most important variables in order to display them later on\n $_SESSION['questions_answered'] = $this->line;\n $_SESSION['right_answered'] = $this->rightAnswersCounter;\n $_SESSION['achievements_got'] = $this->achievementCounter;\n $_SESSION['achievearray'] = $this->achieve_array;\n $this->endTime = getdate()[0];\n $_SESSION['$duration_seconds'] = $this->endTime - $this->startTime;\n\n $con = createDatabaseconnection();\n $sql = \"UPDATE statistics SET `Gruppennummer` = '{$_SESSION['group']}', `Fragen_beantwortet` = '{$this->line}', `Richtige_Antworten` = '{$this->getAnswersRight()}', `Laengste_richtig_Serie` ='{$this->longestrightstreak}', `Falsche_Antworten` = '{$this->getAnswersWrong()}', `Spieldauer_Sekunden` = '{$_SESSION['$duration_seconds']}',`Gesammelte_Achievements` = '{$this->achievementCounter}', `Laengste_Antwort_Sekunden` = '{$this->longestquestion_seconds}', `Kuerzeste_Antwort_Sekunden` = '{$this->shortestquestion_seconds}', `Letztes_Achievement` = '{$this->last_achievement}',`Zeitpunkt_Quiz_beendet` = '{$this->endTime}' WHERE Session_ID = '{$_SESSION['session_id']}' AND Quiz_beendet != 1\";\n mysqli_query($con, $sql);\n mysqli_close($con);\n }", "public function calculateStats()\n {\n $this->totalFitness = 0;\n\n $currentMax = 0;\n $currentMin = PHP_INT_MAX;\n\n foreach ($this->population as $index => $genome) {\n //update fittest if necessary\n if ($genome->getFitness() > $currentMax) {\n $currentMax = $genome->getFitness();\n $this->fittestGenome = $index;\n $this->bestFitness = $currentMax;\n }\n\n //update worst if necessary\n if ($genome->getFitness() < $currentMin) {\n $currentMin = $genome->getFitness();\n $this->worstFitness = $currentMin;\n }\n\n $this->totalFitness += $genome->getFitness();\n }\n\n $this->averageFitness = $this->totalFitness / $this->populationSize;\n }", "public function testGetPlayerGameStatsWithQuery()\n\t{\n\t\t$client = static::createClient();\n\t\t$client->request(Request::METHOD_GET, '/player/game/stats?player=bjergsen');\n\t\t$response = $client->getResponse();\n\n\t\t$this->assertEquals(Response::HTTP_OK, $response->getStatusCode());\n\t\t$this->assertContains('count', $response->getContent());\n\t\t$this->assertContains('results', $response->getContent());\n\t\t$this->assertContains('\"success\":true', $response->getContent());\n\t\t$this->assertContains('TSM', $response->getContent());\n\t\t$this->assertTrue(\n\t\t\t$response->headers->contains(\n\t\t\t\t'Content-Type',\n\t\t\t\t'application/json'\n\t\t\t)\n\t\t);\n\t}", "private function fetchGames() {\n $this->games = array();\n $this->playtimes = array();\n\n $url = $this->getBaseUrl() . '/games?xml=1';\n $gamesData = new SimpleXMLElement(file_get_contents($url));\n\n foreach($gamesData->games->game as $gameData) {\n $game = SteamGame::create($gameData);\n $this->games[$game->getAppId()] = $game;\n $recent = (float) $gameData->hoursLast2Weeks;\n $total = (float) $gameData->hoursOnRecord;\n $playtimes = array((int) ($recent * 60), (int) ($total * 60));\n $this->playtimes[$game->getAppId()] = $playtimes;\n }\n }", "protected function renderStats() {\n\t\t$stats = WCF::getCache()->get('stat');\n\t\tWCF::getTPL()->assign('stats', $stats);\n\t}", "function xstats_displayAllFights( $gameId ) {\n include ('../../inc.conf.php');\n echo '<br><h4>Liste aller Raumk&auml;mpfe nach Runden</h4>';\n $query = \"SELECT * FROM skrupel_xstats_ships ships,skrupel_xstats_shipvsship shipvsship WHERE shipvsship.shipid=ships.shipid AND (shipvsship.fightresult=2 OR shipvsship.fightresult=3) AND shipvsship.gameid=\".$gameId.\" AND ships.gameid=\".$gameId.\" ORDER BY turn,shipvsship.id\";\n $result = @mysql_query( $query ) or die(mysql_error());\n echo '<table class=\"shiptable\" border=\"0\">';\n echo '<tr><th>Runde</th><th colspan=\"3\">Kampf</th><th>H&uuml;llenschaden</tr>';\n while ($row = mysql_fetch_array($result)) {\n echo \"<tr>\";\n //turn\n echo '<td class=\"highlight\">'.$row['turn'].'</td>';\n echo '<td>';\n //get victorous ship\n $query = \"SELECT * FROM skrupel_xstats_ships WHERE gameid=\".$gameId.\" AND shipid=\".$row['enemyshipid'];\n $victoryResult = @mysql_query( $query ) or die(mysql_error());\n $victoryRow = mysql_fetch_array($victoryResult);\n echo xstats_getShipFullDescription( $gameId, $victoryRow['shipid'], $victoryRow['shiprace'], $victoryRow['picturesmall'], $victoryRow['experience'], $row['turn'],$victoryRow['shipclass'],$victoryRow['shipname']);\n echo '</td><td>';\n if( $row['fightresult'] == 2) {\n $turnToUse = $row['turn'];\n echo ' zerst&ouml;rt ';\n }else {\n echo ' erobert ';\n //display the formerly owner of this ship\n $turnToUse = $row['turn']-1;\n }\n echo '</td><td>';\n echo xstats_getShipFullDescription( $gameId, $row['shipid'], $row['shiprace'], $row['picturesmall'], $row['experience'], $turnToUse,$row['shipclass'],$row['shipname']);\n echo '</td>';\n //get hull damage of winning ship\n $query = \"SELECT * FROM skrupel_xstats_shipvsship WHERE shipid=\".$row['enemyshipid'].\" AND enemyshipid=\".$row['shipid'].\" AND gameid=\".$gameId;\n $winnerResult = @mysql_query( $query ) or die(mysql_error());\n $winnerResult = mysql_fetch_array($winnerResult);\n $hullDamage = $winnerResult['hulldamage'];\n echo '<td>'.$hullDamage.'%';\n //hull damage bar\n echo '<div class=\"hulldamage\">';\n echo '<div style=\"width: '.(100-$hullDamage).'%\"></div>';\n echo '</div>';\n echo '</td>';\n echo \"</tr>\";\n }\n echo '</table>';\n}", "protected function _scoreVsGametotal()\n\t{\n\t\t//check games against gamertag\n\t\t$data = new BaseObject();\n\t\t\n\t\t$data->setGamesSum($this->getGamer()->getGames()->sumColumn('score'));\n\t\t$data->setAchievementSum($this->getGamer()->getAchievements()->sumColumn('score'));\n\t\t$data->setGamerScore($this->getGamer()->getScore());\n\t\t$data->setGameCount($this->getGamer()->getGames()->count());\n\t\t\n\t\t$this->setGamerVsGame($data);\n\t\treturn $this;\n\t}", "public function getUserStatsForGame($steamid, $app_id) { \r\n $this->createRequest('get', \"/ISteamUserStats/GetUserStatsForGame/v0002\", array(\r\n 'steamid' => $steamid,\r\n 'appid' => $app_id,\r\n 'format' => 'json'\r\n ));\r\n }", "function insertTeamStats() {\n $conn = getConnection();\n $sql = \"SELECT id FROM teams\";\n $result = $conn -> query($sql);\n $insertSql = \"INSERT INTO Stats VALUES \";\n while($row = $result -> fetch_assoc()) {\n $team_id = $row[\"id\"];\n $url = \"https://statsapi.web.nhl.com/api/v1/teams/\".$team_id.\"/stats\";\n $jsonString = file_get_contents($url);\n $jsonObject = json_decode($jsonString);\n\n // get all stats from API\n $jsonObject = $jsonObject -> stats[0] -> splits[0] -> stat;\n $insertSql .= \"(\".$team_id.\", \".$jsonObject->goalsPerGame.\", \".$jsonObject->goalsAgainstPerGame.\", \".$jsonObject->powerPlayPercentage.\", \".$jsonObject->penaltyKillPercentage.\", \".$jsonObject->shootingPctg.\", \".$jsonObject->savePctg.\"),\";\n\n\n }\n // replace last comma with a semicolon\n $insertSql = substr($insertSql, 0, -1).\";\";\n\n $conn -> query($insertSql);\n }", "function update_stats($type)\n{\n\tglobal $database;\n\n\t// INCREASE REQUESTED STAT VALUE\n\t$database->database_query(\"\n INSERT INTO se_stats\n (`stat_date`, `stat_{$type}`)\n VALUES\n (UNIX_TIMESTAMP(CURDATE()), 1) \n ON DUPLICATE KEY UPDATE\n `stat_{$type}`=`stat_{$type}`+1\n \");\n}", "function update_user_stats($action)\n\t{\n\t\t// Get the models from the database into an array \n \t$link=load_mysqli(CM_HOST,CM_USER,CM_PSW); // get conection to mysql env\n\t\tselect_db($link, DB_NAME); // use the classicmodels database\t\n\t\t\t\t\n\t\t$username=$_SESSION[\"username\"];\n\t\t\n\t\t// Build the query\n\t\t$query=\"SELECT user_name, last_op, user_id, use_count, last_op FROM users WHERE user_name='{$username}'\";\n\t\t// Hit the database\n\t\t$result=query_db($link,$query);\t\n\t\tif (!$result=mysqli_query($link,$query))\n\t\t\terror_handler(\"ERROR: Something happened trying to read user from database\" . mysqli_error($link));\n\n\t\t// Exactly one row? if not, something nasty happened. There should only be one row for a given username\n\t\tif (mysqli_num_rows($result)!=1)\n\t\t\terror_handler(\"ERROR: Seems to be two accounts with username \" . $username . mysqli_error($link));\t\t\t\n\t\telse {\n\t\t\t$row=mysqli_fetch_array($result);\n\t\t\t$user=$row;\n\t\t\t// set the id for the upcoming db update\n\t\t\t$user_id=$user[\"user_id\"];\n\t\t\t// grab the courrent count so as to increment it.\n\t\t\t$count=$user[\"use_count\"]+1; // do i need to do a string to int conversion\n\n\t\t\t// save $count and last action to the database;\n\t\t\t$query=\"UPDATE users SET use_count=$count, last_op='{$action}' WHERE user_id=$user_id\";\n\t\t\t\n\t\t\t\n\t\t\t$result=query_db($link,$query);\t\n\t\t\tif (!$result){\n\t\t\t\terror_handler(\"ERROR: Something happened trying to write user stats to database\" . mysqli_error($link));\n\t\t\t}\t\t\t\t\t\t\n\t\t}\t\n\t}", "public function updateStatistics(GenerationInterface $generation): void;", "public function update_team_score(){\n\t\tif($this->authenticate_api()){\n\t\t\t\n\t\t\t$response = array( \"status\" => \"error\" );\n\t\t\t$response['message'] = \"Somthing Wrong\";\n $required_fields = array(\"match_id\");\n $status = $this->verifyRequiredParams($required_fields);\n\t\t\t$match_id= $this->request->getVar(\"match_id\");\n\t\t\t\n\t\t\tif($this->ifempty($match_id, \"match id\")!== true){\n $response['message'] = $this->ifempty($match_id, \"match id\");\n $this->sendResponse($response);\n }\n if($this->ifexists('tbl_tournament_match', $match_id, 'id') != true){\n $response['message'] = \"Please enter valid match id\";\n $this->sendResponse($response);\n }\t\t\t\n\t\t\tif($match_id){\t\t\t\t\n\t\t\t\t$match_tournament_team = $this->db->table('tbl_tournament_match')->where('id', $match_id)->get()->getRowArray();\n\t\t\t\tif($match_tournament_team){\n\t\t\t\t\t$team_id = $match_tournament_team['team_id'];\n\t\t\t\t\t$opponent_team_id = $match_tournament_team['opponent_team_id'];\n\t\t\t\t\t$match_end_status = $match_tournament_team['match_end_status'];\n\t\t\t\t\t$match_end_status_for_opponent_team = $match_tournament_team['match_end_status_for_opponent_team'];\n\t\t\t\t\tif($match_end_status == 1 && $match_end_status_for_opponent_team == 1){\n\t\t\t\t\t\t$where_match_team['match_id'] = $team_id;\n\t\t\t\t\t\t$where_match_opponent_team['match_id'] = $opponent_team_id;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$match_team = $this->db->table('tbl_match_team')->where($where_match_team);\n\t\t\t\t\t\t$match_opponent_team = $this->db->table('tbl_match_team')->where($where_match_opponent_team);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$match_team_goal = $this->db->query(\"SELECT SUM(g) as Total_g FROM tbl_match_team where match_id = \".$team_id)->getRowArray();\n\t\t\t\t\t\t$match_opponent_team_goal = $this->db->query(\"SELECT SUM(g) as Total_g FROM tbl_match_team where match_id = \".$opponent_team_id)->getRowArray();\n\t\t\t\t\t\t\n\t\t\t\t\t\t$match_team_goal['Total_g'] = $match_team_goal['Total_g'] ? $match_team_goal['Total_g'] : 0;\n\t\t\t\t\t\t$match_team_goal['Total_g'] = $match_opponent_team_goal['Total_g'] ? $match_opponent_team_goal['Total_g'] : 0;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($match_team_goal['Total_g'] > $match_opponent_team_goal['Total_g']){\n\t\t\t\t\t\t\t$winner_team_id = $team_id;\n\t\t\t\t\t\t}else if($match_team_goal['Total_g'] < $match_opponent_team_goal['Total_g']){\n\t\t\t\t\t\t\t$winner_team_id = $opponent_team_id;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$winner_team_id = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$tbl_tournament_match_result_data['match_id'] = $match_id; \n\t\t\t\t\t\t$tbl_tournament_match_result_data['team_id_score'] = $match_team_goal['Total_g']; \n\t\t\t\t\t\t$tbl_tournament_match_result_data['opponent_team_id_score'] = $match_opponent_team_goal['Total_g']; \n\t\t\t\t\t\t$tbl_tournament_match_result_data['winner_team_id'] = $winner_team_id;\n\t\t\t\t\t\t$response['status'] = \"success\";\n\t\t\t\t\t\t$table_name = 'tbl_tournament_match_result';\n\t\t\t\t\t\t$id = $match_id;\n\t\t\t\t\t\t$fild_to_check = 'match_id';\n\t\t\t\t\t\tif($this->ifexists($table_name,$id,$fild_to_check)){\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$response['message'] = \"Team score already Added\";\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$tbl_tournament_match_result = $this->db->table($table_name)->insert($tbl_tournament_match_result_data);\n\t\t\t\t\t\t\tif($tbl_tournament_match_result)\n\t\t\t\t\t\t\t\t$response['message'] = \"Team score Added Successfully\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\t$this->sendResponse($response);\t\t\t\n\t\t\t\n\t\t}\n\t}", "protected function execute(InputInterface $input, OutputInterface $output)\n {\n $stats = new Stats();\n\n /** @var \\AppBundle\\Repository\\GameRepository $repo */\n $repo = $this->getContainer()\n ->get('doctrine')\n ->getRepository('AppBundle:Game');\n\n $limit = 50;\n $total = $repo->count([]);\n $interval = $input->getArgument('days');\n\n for ($offset = 0; $offset < $total; $offset += $limit) {\n\n /** @var \\AppBundle\\Entity\\Game[] $entities */\n $entities = $repo->findBy([], [ 'id' => 'desc' ], $limit, $offset);\n\n /** @var Game[] $games */\n $games = [];\n foreach ($entities as $entity) {\n $games[] = $entity->toDomainEntity();\n }\n\n $stats->addGames($games, $interval);\n }\n\n $output->write('Test games stats for the last ' . $interval . ' days');\n if ($interval > 0 && null != $stats->minDate()) {\n $output->write(' (since ' . $stats->minDate()->format('Y-m-d') . ')');\n }\n $output->writeln('.');\n $output->writeln('');\n\n $output->writeln('- Num test games: ' . $stats->numTestGames());\n $output->writeln('');\n\n $output->writeln('- Num different APIs: ' . count($stats->apis()));\n foreach ($stats->apis() as $api => $count) {\n $output->writeln(\"\\t\" . '- ' . $api . ' (' . $count . ' games)');\n }\n $output->writeln('');\n\n $output->writeln('- Num different Emails: ' . count($stats->emails()));\n foreach ($stats->emails() as $email => $count) {\n $output->writeln(\"\\t\" . '- ' . $email . ' (' . $count . ' games)');\n }\n $output->writeln('');\n\n $output->writeln('- Games distribution per hours:');\n foreach ($stats->hours() as $hour => $count) {\n $output->writeln(\"\\t\" . '- ' . $hour . ' (' . $count . ' games)');\n }\n $output->writeln('');\n\n $output->writeln('- Games distribution per days:');\n foreach ($stats->days() as $day => $count) {\n $output->writeln(\"\\t\" . '- ' . $day . ' (' . $count . ' games)');\n }\n $output->writeln('');\n\n return 0;\n }", "public function groupScores()\n\t{\n\t $groups = array(\n\t 'northeast',\n 'central',\n 'southeast',\n 'ohio-valley',\n 'southwest',\n 'team-1',\n 'team-2',\n 'canada',\n 'northwest',\n 'team-3'\n\t );\n\t $scores = array();\n\t $averages = array();\n\t \n\t foreach ($groups as $group) \n\t {\n\t if (!isset($scores[$group])) \n\t {\n\t $scores[$group] = 0;\n\t }\n\t \n\t if (!isset($averages[$group]))\n\t {\n\t $averages[$group] = array(\n\t 'group' => ucwords( str_replace('-', ' ', $group) ),\n\t 'count' => 0,\n\t 'average' => 0,\n\t 'total' => 0\t \n\t );\n\t }\t \n\t \n\t // get all the users in this group\n\t $users = \\Users\\Models\\Users::collection()->find(array(\n\t 'triviagroup' => $group\n\t ));\n\t \n\t if (!empty($users)) \n\t {\n\t // for each user, get their score for this game, and add it to the running total\t \n\t foreach ($users as $doc) \n\t {\n\t if (!empty($doc['game']['trivia'][(string)$this->id]['score'])) \n\t {\n\t $scores[$group] = $scores[$group] + $doc['game']['trivia'][(string)$this->id]['score'];\n\t }\n\t }\n\t \n\t $count = count($users);\n\t $averages[$group]['count'] = $count;\n\t $averages[$group]['total'] = $scores[$group];\n\t if (!empty($scores[$group])) \n\t {\n\t $averages[$group]['average'] = number_format( $scores[$group] / $count, 2 );\n\t }\t \n\t }\n\t }\n\t \n\t $results = \\Dsc\\ArrayHelper::sortArrays($averages, 'average', -1);\n\t \n\t return $results;\n\t}", "public static function saveStats()\r\n {\r\n }", "public function testGetPlayerGameStats()\n\t{\n\t\t$client = static::createClient();\n\t\t$client->request(Request::METHOD_GET, '/player/game/stats?player=bjergsen');\n\t\t$response = $client->getResponse();\n\n\t\t$this->assertEquals(Response::HTTP_OK, $response->getStatusCode());\n\t\t$this->assertContains('count', $response->getContent());\n\t\t$this->assertContains('results', $response->getContent());\n\t\t$this->assertTrue(\n\t\t\t$response->headers->contains(\n\t\t\t\t'Content-Type',\n\t\t\t\t'application/json'\n\t\t\t)\n\t\t);\n\t}", "public function run()\n {\n $statDump = DB::connection('mysql.new')\n ->table('game_stat_dumps')\n ->select('site_id', 'game_id', 'json')\n ->get() ;\n\n foreach ($statDump as $dump) {\n $json = json_decode($dump->json);\n\n foreach($json->advantage_conversion as $key => $advantage) {\n $new = new \\StdClass();\n\n $new->site_id = $dump->site_id;\n $new->game_id = $dump->game_id;\n $new->team = $key == 0 ? 'US' : 'THEM';\n $new->drawn = $advantage->drawn;\n $new->converted = $advantage->converted;\n\n DB::connection('mysql.new')\n ->table('advantages')\n ->insert(get_object_vars($new));\n }\n }\n }", "public function CalculateFromResults(Tournament $tournament)\r\n\t{\r\n\t\tforeach($this->teams as $k => $v)\r\n\t\t{\r\n\t\t\t$v->ResetScore();\r\n\t\t}\r\n\r\n\t\tif(!$this->Full)\r\n\t\t{\r\n\t\t\tforeach($this->teams as $k => $v)\r\n\t\t\t{\r\n\t\t\t\t$v->place = 1;\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tforeach($tournament->Games as $k => $v)\r\n\t\t{\r\n\t\t\tif(!$v->played)\r\n\t\t\t\tcontinue;\r\n\t\t\t\t\r\n\t\t\tif(($t1 = $this->HasTeam($v->Team1)) !== false && ($t2 = $this->HasTeam($v->Team2)) !== false)\r\n\t\t\t{\r\n\t\t\t\t$winner = $v->Result();\r\n\t\t\t\tif($winner != null)\r\n\t\t\t\t{\r\n\t\t\t\t\t$t1->won += $winner == $t1->team ? 1 : 0;\r\n\t\t\t\t\t$t2->won += $winner == $t2->team ? 1 : 0;\r\n\t\t\t\t\t$t1->lost += $winner != $t1->team ? 1 : 0;\r\n\t\t\t\t\t$t2->lost += $winner != $t2->team ? 1 : 0;\r\n\r\n\t\t\t\t\t$t1->points += $winner == $t1->team ? $tournament->stageConfig->WinPoints : 0;\r\n\t\t\t\t\t$t2->points += $winner == $t2->team ? $tournament->stageConfig->WinPoints : 0;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t// Tie give all points\r\n\t\t\t\t\t$t1->tied++;\r\n\t\t\t\t\t$t2->tied++;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t$t1->points += $tournament->stageConfig->TiePoints;\r\n\t\t\t\t\t$t2->points += $tournament->stageConfig->TiePoints;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$t1->vv += $v->Score1 - $v->Score2;\r\n\t\t\t\t$t2->vv += $v->Score2 - $v->Score1;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\t$this->CalculatePlaces();\r\n\t\treturn true;\r\n\t}", "function overallStats($steamID){\n\t\t\t\t\trequire_once(\"database\\database_connection.php\");\n\t\t\t\t\t$conn=database();\n\t\t\t\t\t//Query the database\n\t\t\t\t\t$resultSet = $conn->query(\"SELECT * FROM money_well_spent_view WHERE steamID =\".$steamID.\"\");\n\n\t\t\t\t\tif($resultSet->num_rows != 0){\n\t\t\t\t\t\twhile($rows = $resultSet->fetch_assoc()){\n\t\t\t\t\t\t\t$money_well_spent = $rows['money_well_spent'];\n\n\t\t\t\t\t\t\techo \"<tr>\n\t\t\t\t\t\t\t<td>Money well spent</td>\n\t\t\t\t\t\t\t<td>$money_well_spent</td>\n\t\t\t\t\t\t\t</tr>\";\n\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\techo\"ERROR\";\n\t\t\t\t\t}\n\n\t\t\t\t\t$resultSet = $conn->query(\"SELECT * FROM kd_ratio_view WHERE steamID =\".$steamID.\"\");\n\n\t\t\t\t\tif($resultSet->num_rows != 0){\n\t\t\t\t\t\twhile($rows = $resultSet->fetch_assoc()){\n\t\t\t\t\t\t\t$kd_ratio = $rows['kd_ratio'];\n\n\t\t\t\t\t\t\techo \"<tr>\n\t\t\t\t\t\t\t<td>KD ratio</td>\n\t\t\t\t\t\t\t<td>$kd_ratio</td>\n\t\t\t\t\t\t\t</tr>\";\n\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\techo\"ERROR\";\n\t\t\t\t\t}\n\t\t \t\t$conn->close();\n}", "public function updateTotal() {\n //get the scans for this user\n $scans = $this->scans();\n //create running total\n $newTotal = 0; \n //for each scan, add the total pups and virus to the total\n foreach ($scans as $scan) {\n $newTotal += $scan->pups + $scan->troj_mal;\n }\n //sets and saves the new total for this user\n $this->total = $newTotal;\n $this->save();\n }", "public function run()\n {\n WebsiteStats::updateOrCreate([\n 'amount_of_foodbanks' => 26,\n 'amount_of_users' => 50,\n 'amount_of_kg_donated' => 230,\n 'amount_of_treasures_created' => 312,\n ]);\n }", "public function run()\n {\n //\n StatsPlayer::truncate();\n\n $arrRand= array('ATT', 'BU', 'DEF', 'MDC', 'MOC', 'MG', 'MD');\n $skillRand= array('VITESSE', 'BUTEUR', 'PASSEUR', 'DRIBBLEUR', 'TECHNIQUE', 'COSTAUD', 'AGRESSIF');\n\n for($i = 1; $i < 13; ++$i){\n\n StatsPlayer::create([\n 'id' => $i,\n 'rating_before_update' => 5,\n 'overall_average' => 5,\n 'goals' => 0,\n 'assists' => 0,\n 'created_at' => now(),\n 'user_id' => $i,\n 'player_id' => $i,\n 'stats_player_id' => $i,\n 'current_rating' => rand(80, 97),\n 'position' => $arrRand[rand(0,6)],\n 'pace' => rand(75, 97),\n 'shoot' => rand(85, 97),\n 'passe' => rand(85, 97),\n 'dribble' => rand(75, 90),\n 'defense' => rand(75, 90),\n 'physique' => rand(75, 90),\n 'skill' => $skillRand[rand(0,6)],\n ]);\n }\n\n\n StatsPlayer::create([\n 'id' => $i,\n 'rating_before_update' => 5,\n 'overall_average' => 5,\n 'goals' => 0,\n 'assists' => 0,\n 'created_at' => now(),\n 'user_id' => $i,\n 'player_id' => $i,\n 'stats_player_id' => $i,\n 'current_rating' => rand(80, 97),\n 'position' => $arrRand[rand(0,6)],\n 'pace' => rand(75, 97),\n 'shoot' => rand(85, 97),\n 'passe' => rand(85, 97),\n 'legend' => '1',\n 'dribble' => rand(75, 90),\n 'defense' => rand(75, 90),\n 'physique' => rand(75, 90),\n 'skill' => $skillRand[rand(0,6)],\n 'user_id' => $i,\n 'player_id' => $i,\n 'stats_player_id' => $i\n ]);\n\n\n\n }", "function xstats_displayMaxValueShipVSShip($gameId) {\n echo( \"<H3>Spitzenwerte im Spiel</H3>\");\n $statsAvailablePlayerIndicies = xstats_getAvailablePlayerIndicies($gameId);\n $statsMaxTurn = xstats_getMaxTurn($gameId);\n echo( xstats_displayMaxSum( $gameId, 'battlecount', $statsMaxTurn, $statsAvailablePlayerIndicies ) );\n echo( xstats_displayMaxSum( $gameId, 'battlewoncount', $statsMaxTurn, $statsAvailablePlayerIndicies ) );\n echo( xstats_displayMaxSum( $gameId, 'battlecount-battlewoncount', $statsMaxTurn, $statsAvailablePlayerIndicies ) );\n}", "public function missionStats()\n {\n // On récupère l'identifiant de la mission\n $mission = $this->get('mission_id');\n\n // On récupère tous les items à visiter dans la rue\n $sql = 'SELECT *\n FROM `items`\n WHERE `mission_id` = :mission';\n $query = $this->_link->prepare($sql);\n $query->bindParam(':mission', $mission);\n $query->execute();\n\n if ($query->rowCount()) {\n $items = $query->fetchAll(PDO::FETCH_ASSOC);\n $stats = array(\n 'attente' => 0,\n 'absent' => 0,\n 'ouvert' => 0,\n 'procuration' => 0,\n 'contact' => 0,\n 'npai' => 0\n );\n\n foreach ($items as $item) {\n // On regarde si ce n'est pas encore fait\n if ($item['item_statut'] == 0) {\n $stats['attente']++;\n } else {\n if ($item['item_statut'] == 1) {\n $stats['absent']++;\n }\n if ($item['item_statut'] == 2) {\n $stats['ouvert']++;\n }\n if ($item['item_statut'] == 3) {\n $stats['procuration']++;\n }\n if ($item['item_statut'] == 4) {\n $stats['contact']++;\n }\n if ($item['item_statut'] == -1) {\n $stats['npai']++;\n }\n }\n }\n\n // On calcule la réalisation\n $stats['total'] = array_sum($stats);\n $stats['fait'] = $stats['total'] - $stats['attente'];\n $stats['proportion'] = ceil($stats['fait'] * 100 / $stats['total']);\n\n return $stats;\n } else {\n return false;\n }\n }", "public function addStatisticsUpdatesTheCurrentStatisticsRow(): void\n {\n $user = UserHelper::newUser();\n $expectedUserStatistics = new UserStatistics();\n $expectedUserStatistics->created_at = Carbon::today();\n $expectedUserStatistics->user_id = $user->id;\n $expectedUserStatistics->memorized_questions = 3;\n $expectedUserStatistics->save();\n $this->assertFalse($expectedUserStatistics->created_at < Carbon::today());\n\n UserStatistics::incrementForUser($user->id, 13);\n $expectedUserStatistics = UserStatistics::find($expectedUserStatistics->id);\n $this->assertEquals(1, $user->statistics()->count());\n $this->assertEquals(13, $expectedUserStatistics->memorized_questions);\n }", "public function fetchStats()\n\t{\n\t\t$statsData = array();\n\t\t\n\t\t// Get all cache action\n\t\t$select = $this->_statsTable->select()\n\t\t\t\t\t\t\t\t\t->where('session_id = ?', $this->_sessionId);\n\t\t$rowSet = $this->_statsTable->fetchall($select);\n\t\t$statsData['AllActionCount'] = 0;\n\t\tforeach ($rowSet as $row)\n\t\t{\n\t\t\t$statsData['AllAction'][] = $row->toArray();\n\t\t\t$statsData['AllActionCount'] += 1;\n\t\t}\n\t\t\n\t\t// Calculate current cache use for every scope;\n\t\t//SELECT * FROM stats_ivc_cache WHERE session_id = 12 AND (action = \"insert\" OR action = \"cache_hit\") GROUP BY full_key;\n\t\t$select = $this->_statsTable->select()\n\t\t\t\t\t\t\t\t\t->where('session_id = ?', $this->_sessionId)\n\t\t\t\t\t\t\t\t\t->where('action = \"insert\" OR action = \"cache_hit\" OR action = \"replace\"')\n\t\t\t\t\t\t\t\t\t->group('full_key');\n\t\t$rowSet = $this->_statsTable->fetchall($select);\n\t\t$statsData['totalUse'] = 0;\n\t\t$statsData['ivcUse'] = 0;\n\t\t$statsData['clubUse'] = 0;\n\t\t$statsData['userUse'] = 0;\n\t\tforeach ($rowSet as $row)\n\t\t{\n\t\t\t$statsData['keyUseList'][$row['full_key']] = $row->toArray();\n\t\t\t$statsData['totalUse'] += $row['size'];\n\t\t\t$statsData[$row['scope'] . 'Use'] += $row['size'];\n\t\t}\n\t\t\n\t\t// Calculate average use of user session ... need user session for that\n\t\t\n\t\treturn ($statsData);\n\t}", "public function updateScores(OnScoresStructure $scores) {\n\t\t$round = $this->matchScore->round;\n\n\t\t$this->matchScore->mapPointsBlueTeam[$round] = $scores->getTeamScores()[self::BLUE_TEAM]->getMapPoints();\n\t\t$this->matchScore->mapPointsRedTeam[$round] = $scores->getTeamScores()[self::RED_TEAM]->getMapPoints();\n\n\t\tif (!array_key_exists($round, $this->matchScore->blueTeamPlayerPointsSum)) {\n\t\t\t$this->matchScore->blueTeamPlayerPointsSum[$round] = 0;\n\t\t\t$this->matchScore->redTeamPlayerPointsSum[$round] = 0;\n\n\t\t\tforeach ($scores->getPlayerScores() as $playerScore) {\n\t\t\t\tif ($playerScore->getPlayer()->teamId == self::BLUE_TEAM) {\n\t\t\t\t\t$this->matchScore->blueTeamPlayerPointsSum[$round] += $playerScore->getRoundPoints();\n\t\t\t\t} else if ($playerScore->getPlayer()->teamId == self::RED_TEAM) {\n\t\t\t\t\t$this->matchScore->redTeamPlayerPointsSum[$round] += $playerScore->getRoundPoints();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\tforeach ($scores->getPlayerScores() as $playerScore) {\n\n\t\t\tif ($playerScore->getPlayer()->teamId == self::BLUE_TEAM) {\n\t\t\t\t$this->matchScore->blueTeamPlayers[trim($playerScore->getPlayer()->login)] = new TrackmaniaPlayer(trim($playerScore->getPlayer()->login), $playerScore->getPlayer()->nickname, $playerScore->getBestRaceTime(), $playerScore->getRoundPoints(), $playerScore->getMapPoints(), $playerScore->getMatchPoints(), $playerScore->getPlayer()->teamId, false);\n\n\t\t\t} else if ($playerScore->getPlayer()->teamId == self::RED_TEAM) {\n\t\t\t\t$this->matchScore->redTeamPlayers[trim($playerScore->getPlayer()->login)] = new TrackmaniaPlayer(trim($playerScore->getPlayer()->login), $playerScore->getPlayer()->nickname, $playerScore->getBestRaceTime(), $playerScore->getRoundPoints(), $playerScore->getMapPoints(), $playerScore->getMatchPoints(), $playerScore->getPlayer()->teamId, false);\n\n\t\t\t}\n\n\t\t}\n\t\t$this->displayTeamScoreWidget(false);\n\t}", "public function getGameStats($id) {\n $game = $this->findGame($id);\n\n if(!$game->hasStats()) {\n throw new SteamCondenserException(\"\\\"{$game->getName()}\\\" does not have stats.\");\n }\n\n if(empty($this->customUrl)) {\n return GameStats::createGameStats($this->steamId64, $game->getShortName());\n } else {\n return GameStats::createGameStats($this->customUrl, $game->getShortName());\n }\n }", "function learndash_update_quiz_statistics( $quiz_id, $question_id, $updated_quiz_data, $essay, $users_quiz_data ) {\n\tglobal $wpdb;\n\n\tif ( ( isset( $users_quiz_data['statistic_ref_id'] ) ) && ( ! empty( $users_quiz_data['statistic_ref_id'] ) ) ) {\n\t\t$refId = absint( $users_quiz_data['statistic_ref_id'] );\n\t} else {\n\t\t$refId = $wpdb->get_var(\n\t\t\t$wpdb->prepare(\"\n\t\t\t\t\t\tSELECT statistic_ref_id\n\t\t\t\t\t\tFROM \". LDLMS_DB::get_table_name( 'quiz_statistic_ref' ) .\" WHERE quiz_id = %d AND user_id = %d\n\t\t\t\t\t\", $quiz_id, $essay->post_author)\n\t\t);\n\n\t\t$refId = absint( $refId );\n\t}\n\n\t$row = $wpdb->get_results(\n\t\t$wpdb->prepare(\"\n\t\t\t\t\tSELECT *\n\t\t\t\t\tFROM \". LDLMS_DB::get_table_name( 'quiz_statistic' ) .\" WHERE statistic_ref_id = %d AND question_id = %d\n\t\t\t\t\", $refId, $question_id)\n\t);\n\n\tif ( empty( $row ) ) {\n\t\treturn;\n\t}\n\n\tif ( $updated_quiz_data['updated_question_score'] > 0 ) {\n\t\t$correct_count = 1;\n\t\t$incorrect_count = 0;\n\t} else {\n\t\t$correct_count = 0;\n\t\t$incorrect_count = 1;\n\t}\n\n\t$update = $wpdb->update(\n\t\tLDLMS_DB::get_table_name( 'quiz_statistic' ),\n\t\tarray(\n\t\t\t'correct_count' => $correct_count,\n\t\t\t'incorrect_count' => $incorrect_count,\n\t\t\t'points' => $updated_quiz_data['updated_question_score'],\n\t\t),\n\t\tarray(\n\t\t\t'statistic_ref_id' => $refId,\n\t\t\t'question_id' => $question_id,\n\t\t),\n\t\tarray( '%d', '%d', '%d'\t),\n\t\tarray( '%d', '%d' )\n\t);\n\n\tdo_action( 'learndash_essay_question_stats_updated' );\n}", "function SeasonResults($sid = 0,$mode = \"p\"){\n\t\n\tglobal $db_league_leagues,$db_league_seasons_rounds,$db_league_seasons,$db_clan_games,$db_league_seasons_round_allowed_players;\n\tglobal $db_admin,$db_league_seasons_rounds_results_players,$db_league_teams;\n\t\n\t$res_rounds = mysql_query(\"SELECT a.admin_nick, lt.league_team_name, lsrrp.league_season_round_result_player_points, lsrap.league_season_round_allowed_player_guid, lsrrp.league_season_round_result_player_player_id \n\tFROM $db_league_seasons_rounds_results_players AS lsrrp \n\tJOIN $db_league_seasons_round_allowed_players AS lsrap ON lsrap.league_season_round_allowed_player_player_id=lsrrp.league_season_round_result_player_player_id AND lsrap.league_season_round_allowed_player_season_round_id=\".(float)$rid.\" \n\tJOIN $db_admin AS a ON a.admin_id=lsrap.league_season_round_allowed_player_admin_id \n\tJOIN $db_league_teams AS lt ON lt.league_team_id=lsrap.league_season_round_allowed_player_team_id \n\tWHERE lsrrp.league_season_round_result_player_round_id=\".(float)$rid.\" \n\tORDER BY lsrrp.league_season_round_result_player_place ASC\") or die (\"<strong>File:</strong> \".__FILE__.\"<br /><strong>Line:</strong>\".__LINE__.\"<br />\".mysql_error());\n\t\n\tswitch ($mode){\n\t\tcase \"p\":\n\t\t\t$res_round = mysql_query(\"SELECT lsr.league_season_round_id, lsr.league_season_round_classified, lsr.league_season_round_season_id, lsr.league_season_round_date, lsr.league_season_round_num, l.league_league_id, l.league_league_name, ls.league_season_name \n\t\t\tFROM $db_league_seasons_rounds AS lsr \n\t\t\tJOIN $db_league_seasons AS ls ON ls.league_season_id=lsr.league_season_round_season_id \n\t\t\tJOIN $db_league_leagues AS l ON l.league_league_id=ls.league_season_league_id \n\t\t\tWHERE lsr.league_season_round_id=\".(float)$rid) or die (\"<strong>File:</strong> \".__FILE__.\"<br /><strong>Line:</strong>\".__LINE__.\"<br />\".mysql_error());\n\t\t\t$nick = \"\t\t<td width=\\\"200\\\" align=\\\"left\\\" class=\\\"eden_title\\\">\"._LEAGUE_PLAYER_NICK.\"</td>\\n\";\n\t\t\t$guid = \"\t\t<td width=\\\"200\\\" align=\\\"left\\\" class=\\\"eden_title\\\">\"._LEAGUE_SEASON_ROUND_GUID.\"</td>\\n\";\n\t\t\t$table_width = \"600\";\n\t\t\t\n\t\t\techo Menu();\n\t\t\t\n\t\tbreak;\n\t\tcase \"t\":\n\t\t\t$res_round = mysql_query(\"SELECT lsr.league_season_round_id, lsr.league_season_round_classified, lsr.league_season_round_season_id, lsr.league_season_round_date, lsr.league_season_round_num, l.league_league_id, l.league_league_name, ls.league_season_name \n\t\t\tFROM $db_league_seasons_rounds AS lsr \n\t\t\tJOIN $db_league_seasons AS ls ON ls.league_season_id=lsr.league_season_round_season_id \n\t\t\tJOIN $db_league_leagues AS l ON l.league_league_id=ls.league_season_league_id \n\t\t\tWHERE lsr.league_season_round_id=\".(float)$rid) or die (\"<strong>File:</strong> \".__FILE__.\"<br /><strong>Line:</strong>\".__LINE__.\"<br />\".mysql_error());\n\t\t\t$nick = \"\";\n\t\t\t$guid = \"\";\n\t\t\t$table_width = \"400\";\n\t\tbreak;\n\t\tdefault:\n\t\t\techo \"\";\n\t}\n\t$ar_round = mysql_fetch_array($res_round);\n\t$league_name = stripslashes($ar_round['league_league_name']);\n\t$season_id = $ar_round['league_season_round_season_id'];\n\t$season_name = stripslashes($ar_round['league_season_name']);\n\t$round_num = $ar_round['league_season_round_num'];\n\t\n\techo \"<table width=\\\"\".$table_wifth.\"\\\" cellspacing=\\\"2\\\" cellpadding=\\\"1\\\" class=\\\"eden_main_table\\\">\\n\";\n\techo \"\t<tr>\\n\";\n\techo \"\t\t<td colspan=\\\"3\\\" align=\\\"left\\\">\";\n\t\t\t\t\tif ($_GET['action'] == \"results_add\"){echo \"<h5 style=\\\"margin:20px 0px 0px 0px;\\\">\".$league_name.\" > <a href=\\\"modul_league.php?action=rounds&sid=\".$season_id.\"&project=\".$_SESSION['project'].\"\\\" target=\\\"_self\\\">\".$season_name.\"</a> > \"._LEAGUE_SEASON_ROUND.\" \".$round_num.\"</h5>\";}\n\t\t\t\t\tif ($_GET['action'] == \"results_add\"){echo \"<form action=\\\"sys_save.php?action=results_add&rid=\".$rid.\"sid=\".$season_id.\"\\\" method=\\\"post\\\" enctype=\\\"multipart/form-data\\\">\";}\n\techo \"\t\t</td>\\n\";\n\techo \"\t</tr>\\n\";\n\techo \"\t<tr style=\\\"background-color:#dce3f1;\\\">\\n\";\n\techo \"\t\t<td width=\\\"50\\\" align=\\\"left\\\" class=\\\"eden_title\\\">\"._LEAGUE_SEASON_POSITION.\"</td>\\n\";\n\techo \"\t\t<td align=\\\"left\\\" class=\\\"eden_title\\\">\"._LEAGUE_SEASON_POINTS.\"</td>\\n\";\n\techo $nick;\n\techo $guid;\n\techo \"\t\t<td width=\\\"200\\\" align=\\\"left\\\" class=\\\"eden_title\\\">\"._LEAGUE_TEAM.\"</td>\\n\";\n\techo \"\t</tr>\\n\";\n\tswitch ($mode){\n\t\tcase \"p\":\n\t\t\t$i=1;\n\t\t\twhile ($ar_rounds = mysql_fetch_array($res_rounds)){\n\t\t\t\tif ($i % 2 == 0){ $cat_class = \"cat_level1_even\";} else { $cat_class = \"cat_level1_odd\";}\n\t\t\t\techo \"<tr class=\\\"\".$cat_class.\"\\\" onmouseover=\\\"this.className='cat_over'\\\" onmouseout=\\\"this.className='\".$cat_class.\"'\\\">\\n\";\n\t\t\t\techo \"\t<td width=\\\"50\\\" align=\\\"right\\\" valign=\\\"middle\\\">\".$i.\"</td>\\n\";\n\t\t\t\techo \"\t<td align=\\\"left\\\">\".$ar_rounds['league_season_round_result_player_points'].\"</td>\\n\";\n\t\t\t\techo \"\t<td align=\\\"left\\\">\".$ar_rounds['league_team_name'].\"</td>\\n\";\n\t\t\t\techo \"</tr>\\n\";\n\t\t\t\t$i++;\n\t\t\t}\n\t\tbreak;\n\t\tcase \"t\":\n\t\t\t$i=1;\n\t\t\twhile ($ar_rounds = mysql_fetch_array($res_rounds)){\n\t\t\t\tif ($i % 2 == 0){ $cat_class = \"cat_level1_even\";} else { $cat_class = \"cat_level1_odd\";}\n\t \t\t\techo \"<tr class=\\\"\".$cat_class.\"\\\" onmouseover=\\\"this.className='cat_over'\\\" onmouseout=\\\"this.className='\".$cat_class.\"'\\\">\\n\";\n\t\t\t\techo \"\t<td width=\\\"50\\\" align=\\\"right\\\" valign=\\\"middle\\\">\".$i.\"</td>\\n\";\n\t\t\t\techo \"\t<td align=\\\"left\\\">\".$ar_rounds['league_season_round_result_player_points'].\"</td>\\n\";\n\t\t\t\techo \"\t<td align=\\\"left\\\">\".$ar_rounds['admin_nick'].\"</td>\\n\";\n\t\t\t\techo \"\t<td width=\\\"200\\\" align=\\\"left\\\">\".$ar_rounds['league_season_round_allowed_player_guid'].\"</td>\\n\";\n\t\t\t\techo \"\t<td align=\\\"left\\\">\".$ar_rounds['league_team_name'].\"</td>\\n\";\n\t\t\t\techo \"</tr>\\n\";\n\t\t\t\t$i++;\n\t\t\t}\n\t\tbreak;\n\t\tdefault;\n\t\t\techo \"\";\n\t}\n\techo \"</table>\\n\";\n}", "public static function updateBotInformation(Bot $bot)\n {\n // Setting OAuth parameters\n self::setOAuth($bot);\n\n if ($user = self::runRequest($bot, 'getUsers', ['screen_name' => $bot->screen_name])) {\n $bot = Bot::find($user['id']);\n foreach ($bot->getFillable() as $p) {\n $bot->$p = $user[$p];\n }\n\n $bot->save();\n\n // Also fill the stats\n $stat = new Stat;\n $stat->bot_id = $user['id'];\n $stat->date = date('Y-m-d');\n foreach ($stat->getFillable() as $p) {\n $stat->$p = $user[$p];\n }\n\n \\Log::info('[' . $bot->screen_name . '] Getting daily stats');\n $stat->save();\n }\n }", "function result_summary() {\n global $db;\n\n $scoring_expr = sql_scoring_expression('finishtime', 'finishplace');\n $raw_expr = read_raceinfo_boolean('use-points') ? 'finishplace' : 'finishtime';\n if (read_raceinfo_boolean('use-points')) {\n if (read_raceinfo_boolean('drop-slowest')) {\n $avg_expr = (1 + get_lane_count()).' * (COUNT(*) - 1) - (SUM(finishplace) - MAX(finishplace))';\n } else {\n $avg_expr = (1 + get_lane_count()).' * COUNT(*) - SUM(finishplace)';\n }\n } else {\n $avg_expr = $scoring_expr;\n }\n\n // GROUP BY makes each returned row a summary of the outcome for one racer in\n // one round.\n //\n // ORDER BY means rows are ordered from best showing to worst, which means\n // they're also ordered best to worst within any given group.\n $stmt = $db->query('SELECT Rounds.roundid,'\n .' Rounds.classid as round_classid, '\n .' RegistrationInfo.racerid, firstname, lastname, carnumber, carname,'\n // classid is the racer's 'native' class, not the round's class (e.g. Grand Finals)\n .' RegistrationInfo.classid, class, RegistrationInfo.rankid, rank,'\n // base is the number of heats in the round\n .' COUNT(*) AS base, '\n .$scoring_expr.' AS score, '.$avg_expr.' AS avg,'\n .' MIN('.$raw_expr.') AS best, MAX('.$raw_expr.') AS worst'\n .' FROM '.inner_join('RegistrationInfo', 'RaceChart',\n 'RaceChart.racerid = RegistrationInfo.racerid',\n 'Rounds',\n 'RaceChart.roundid = Rounds.roundid',\n 'Classes',\n 'RegistrationInfo.classid = Classes.classid',\n 'Ranks',\n 'RegistrationInfo.rankid = Ranks.rankid')\n .' WHERE passedinspection = 1 AND exclude = 0'\n .' AND (finishtime IS NOT NULL OR finishplace IS NOT NULL)'\n // Of these, only the roundid and racerid are meaningful grouping keys; each of the other\n // values is uniquely determined by the racerid.\n .' GROUP BY Rounds.roundid, RegistrationInfo.racerid, RegistrationInfo.classid, '\n .' Rounds.classid, class, RegistrationInfo.rankid, rank, firstname, lastname, carnumber'\n // lastname, firstname for reproducible ordering in the event of a tie\n .' ORDER BY '.$scoring_expr.', lastname, firstname');\n $stmt->setFetchMode(PDO::FETCH_ASSOC);\n $result = array();\n foreach ($stmt as $row) {\n $result[] = $row;\n }\n\n return $result;\n}", "public function updateCurrentBestTimes() {\n\t\tforeach ($this->playerBestTimes as $key => $curBest) {\n\t\t\tif (array_key_exists($key, $this->matchScore->blueTeamPlayers)) {\n\t\t\t\t$this->matchScore->blueTeamPlayers[$key]->currentBestTime = $curBest;\n\t\t\t} else if (array_key_exists($key, $this->matchScore->redTeamPlayers)) {\n\t\t\t\t$this->matchScore->redTeamPlayers[$key]->currentBestTime = $curBest;\n\t\t\t}\n\t\t}\n\t}", "private function displayIndividualStats($player)\n {\n $changes = $player->statChanges();\n if (count($changes) > 0) {\n $this->ui->display(\"| $player->name:\");\n foreach ($changes as $change) {\n $this->ui->display(\"| \" . $change->type . \": \" . $change->value);\n }\n }\n $player->saveStats();\n }", "function ois_statistics() {\n ois_include_d3_scripts();\n \n\tois_section_title('Compare Skin Performance', 'Which which skins convert the best', '');\n\t\n\tglobal $wpdb;\n\t$table_name = $wpdb->prefix . 'optinskin';\n\t$sql = \"SELECT * FROM $table_name \" .\n\t// The data must come only from the last 30 days\n \"WHERE (ts > DATE_SUB(now(), INTERVAL 30 DAY));\";\n\t$rows = $wpdb->get_results($sql);\n\t$all_stats = array();\n\tif (!empty($rows)) {\n \tforeach ($rows as $row) {\n \t\t$new_stat = array(\n \t\t\t's' => $row->skin,\n \t\t\t'm' => $row->submission,\n \t\t);\n \t\tarray_push($all_stats, $new_stat);\n \t} // foreach\n\t} // if\n\t$skins = get_option('ois_skins');\n\t$stats_range = 10;\n\t$uri = explode('?', $_SERVER['REQUEST_URI']);\n\t$page_url = $uri[0] . '?page=ois-';\n\t\n\t$title_and_rate = array();\n?>\n\t<table class=\"widefat\">\n\t\t<thead>\n\t\t\t<th>Skin Name</th>\n\t\t\t<th>Impressions</th>\n\t\t\t<th>Submits</th>\n\t\t\t<th>Conversion Rate</th>\n\t\t</thead>\n\t<?php\n\tif (!empty($all_stats)) {\n\t\tforeach ($skins as $skin) {\n\t\t $skin_title = $skin['title'];\n\t\t\t\techo '<tr>';\n\t\t\t\techo '<th><a href=\"' . $page_url . $skin['id'] . '\" >' . $skin_title . '</a></th>';\n\t\t\t\t$impressions = array();\n\t\t\t\t$submits = array();\n\t\t\t\t\n\t\t\t\tforeach ($all_stats as $stats) {\n\t\t\t\t\tif (!empty($stats['s'])) {\n\t\t\t\t\t\tif ($stats['s'] == $skin['id']) {\n\t\t\t\t\t\t\tif (!empty($stats['m'])) {\n\t\t\t\t\t\t\t\tarray_push($submits, $stats);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tarray_push($impressions, $stats);\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$num_imp = count($impressions);\n\t\t\t\t$num_sub = count($submits);\n\t\t\t\techo '<td>' . $num_imp . '</td>';\n\t\t\t\techo '<td>' . $num_sub . '</td>';\n\t\t\t\tif (count($impressions) != 0) {\n\t\t\t\t $rate = round(100 * $num_sub/$num_imp, 2);\n\t\t\t\t\techo '<td>' . $rate . '%</td>';\n\t\t\t\t} else {\n\t\t\t\t $rate = 0;\n\t\t\t\t\techo '<td>Unknown</td>';\n\t\t\t\t} // else\n\t\t\t\tif ($rate > 0) {\n \t\t\t\tarray_push($title_and_rate, array ( 'title' => $skin_title, 'rate' => $rate ));\n\t\t\t\t} // if\n\t\t\t\techo '</tr>';\n\t\t} // foreach\n\t} // if\n?>\n\t</table>\n\t\n\t<h3>Top Performing Skins by Conversion Rate</h3>\n\t<div id=\"skinsPie\"></div>\n\t\n\t<script type=\"text/javascript\">\n var w = 360, //width\n h = 380, //height\n r = 160, //radius\n //colors = d3.scale.category20c();\n color = d3.scale.category20c();\n\n honorsData = <?php echo json_encode($title_and_rate) ?>;\n var vis = d3.select(\"#skinsPie\")\n .append(\"svg:svg\")\n .data([honorsData])\n .attr(\"width\", w)\n .attr(\"height\", h)\n .append(\"svg:g\")\n .attr(\"transform\", \"translate(\" + r + \",\" + (r + 10) + \")\")\n var arc = d3.svg.arc()\n .outerRadius(r);\n var pie = d3.layout.pie()\n .value(function(d) {\n return d.rate;\n });\n var arcs = vis.selectAll(\"g.slice\")\n .data(pie)\n .enter()\n .append(\"svg:g\")\n .attr(\"class\", \"slice\");\n arcs.append(\"svg:path\")\n .attr(\"fill\", function(d, i) {\n return color(i);\n })\n .attr(\"d\", arc);\n arcs.append(\"svg:text\")\n .attr(\"transform\", function(d) {\n d.innerRadius = 0;\n d.outerRadius = r;\n return \"translate(\" + arc.centroid(d) + \")\";\n })\n .attr(\"text-anchor\", \"middle\")\n .attr(\"fill\", \"#fff\")\n .text(function(d, i) {\n return honorsData[i].title;\n });\n </script>\n\t<?php\n\tois_section_end();\n}", "public function updateEntryStats()\n\t{\n\t\t$entries = $this->getModelFacade()->get('ChannelEntry')\n\t\t\t->fields('entry_id', 'entry_date')\n\t\t\t->filter('channel_id', $this->getId());\n\n\t\t// Total records is unfiltered\n\t\t$this->setProperty('total_records', $entries->count());\n\n\t\t// Total entries should only account for open, non-expired entries\n\t\t$entries = $entries->filter('entry_date', '<=', ee()->localize->now)\n\t\t\t->filter('status', '!=', 'closed')\n\t\t\t->filterGroup()\n\t\t\t\t->filter('expiration_date', 0)\n\t\t\t\t->orFilter('expiration_date', '>', ee()->localize->now)\n\t\t\t->endFilterGroup()\n\t\t\t->order('entry_date', 'desc');\n\n\t\t$last_entry = $entries->first();\n\n\t\t$this->setProperty('total_entries', $entries->count());\n\t\t$last_entry_date = ($last_entry) ? $last_entry->entry_date : 0;\n\t\t$this->setProperty('last_entry_date', $last_entry_date);\n\t\t$this->save();\n\t}", "public function update_variables(){\n\n // Calculate this battle's count variables\n $perside_max = 0;\n if (!empty($this->values['players'])){\n foreach ($this->values['players'] AS $id => $player){\n $max = $player['counters']['robots_total'];\n if ($max > $perside_max){ $perside_max = $max; }\n }\n }\n $this->counters['robots_perside_max'] = $perside_max;\n\n // Define whether we're allowed to use experience or not\n $this->flags['allow_experience_points'] = true;\n if (!empty($this->flags['player_battle'])\n || !empty($this->flags['challenge_battle'])){\n $this->flags['allow_experience_points'] = false;\n }\n\n // Return true on success\n return true;\n\n }", "public function endGame($game){\n\n $winner_ids = array(\n '0' => $this->getWinners($game)['winner_1'],\n '1' => $this->getWinners($game)['winner_2'],\n '2' => $this->getWinners($game)['winner_3'],\n '3' => $this->getWinners($game)['winner_4']\n );\n\n //get Usernames based on their IDs\n $winners = array(\n '0' => User::find($winner_ids[0])->username,\n '1' => User::find($winner_ids[1])->username,\n '2' => User::find($winner_ids[2])->username,\n '3' => User::find($winner_ids[3])->username\n );\n\n $earnings = array(\n '0' => $this->getEarnings($game->id)['win_1'],\n '1' => $this->getEarnings($game->id)['win_2'],\n '2' => $this->getEarnings($game->id)['win_3'],\n '3' => $this->getEarnings($game->id)['win_4']\n );\n\n // add user statistics and IGW to the users\n for ($i=0; $i < count($winners); $i++) {\n $userstat = new Userstatistics;\n $userstat->game_id = $game->id;\n $userstat->user_id = $winner_ids[$i];\n $userstat->username = $winners[$i];\n $userstat->value = $earnings[$i];\n $userstat->isBid = false;\n $userstat->save();\n\n $UserClass = new User;\n $newBalance = json_decode($UserClass->changeBalance($earnings[$i], $winner_ids[$i]));\n }\n\n $data = array(\n 'game_id' => $game->id,\n 'winners' => $winners,\n 'earnings' => $earnings\n );\n\n $game->makePusherEvent($data, 'game_end');\n\n DB::table('players')->where(['game_id' => $game->id])->delete();\n DB::table('games')->where('id', $game->id)->update(['game_status' => \"pending\"]);\n }", "public function testGetPlayerGameStatsWithQueryNoResults()\n\t{\n\t\t$client = static::createClient();\n\t\t$client->request(Request::METHOD_GET, '/player/game/stats?player=asdflkjafdasf');\n\t\t$response = $client->getResponse();\n\n\t\t$this->assertEquals(Response::HTTP_OK, $response->getStatusCode());\n\t\t$this->assertContains('\"count\":0', $response->getContent());\n\t\t$this->assertContains('results', $response->getContent());\n\t\t$this->assertContains('\"success\":true', $response->getContent());\n\t\t$this->assertTrue(\n\t\t\t$response->headers->contains(\n\t\t\t\t'Content-Type',\n\t\t\t\t'application/json'\n\t\t\t)\n\t\t);\n\t}", "public function hit()\n {\n if($this->exists){\n $stats = $this->popularityStats()->first();\n if( empty( $stats ) ){\n //associates a new Stats instance for this instance\n $stats = new Stats();\n $this->popularityStats()->save($stats);\n }\n return $stats->updateStats();\n }\n return false; \n }", "function getScore($gameName, $orderFlag){\n require 'dbman/config.php';\n \n $dbc = new DbConn();\n $query_gid = \"select gid from \".$dbc->tbl_games.\" where name=?\";\n \n try {\n $stmt_gid = $dbc->conn->prepare($query_gid);\n $stmt_gid->bind_param(\"s\", $gameName);\n $stmt_gid->execute();\n $stmt_gid->bind_result($gid);\n if(!$stmt_gid->fetch()){\n echo \"<h4>no such game found, check the gamename</h4>\";\n return;\n }\n } catch(mysqli_sql_exception $e){\n echo $e->getMessage();\n }\n \n\n $dbc = new DbConn();\n\n if(!isset($orderFlag)){\n \t$query = \"select uid, timestamp, role, score from \" . $dbc->tbl_scores . \" where gid=? order by timestamp desc limit 10\";\n } else{\n if($orderFlag == 0){\n\t echo 'Smaller score is better<br>'; \n\t $query = \"select uid, timestamp, role, CONVERT(score, SIGNED INTEGER) as score_int from \" . $dbc->tbl_scores . \" where gid=? order by score_int limit 10\";\n\t} else{\n\t echo 'Higher score is better<br>'; \n\t $query = \"select uid, timestamp, role, CONVERT(score, SIGNED INTEGER) as score_int from \" . $dbc->tbl_scores . \" where gid=? order by score_int desc limit 10\";\n\t}\n }\n\n try {\n $stmt = $dbc->conn->prepare($query);\n $stmt->bind_param(\"i\", $gid);\n $stmt->execute();\n $stmt->bind_result($usrid, $ts, $player, $score);\n echo '<table border=\"1\" id=\"theScores\" cellpadding=\"2\">';\n echo '<tr><td><b>Game</b></td><td><b>Time</b></td><td><b>Username</b></td><td><b>Player</b></td><td><b>Score</b></td>';\n while($stmt->fetch()){\n $dbc_new = new DbConn();\n $query_usr = \"select username from \" .$dbc_new->tbl_members. \" where id=?\";\n $stmt_usr = $dbc_new->conn->prepare($query_usr);\n $stmt_usr->bind_param(\"s\", $usrid);\n $stmt_usr->execute();\n $stmt_usr->bind_result($usr);\n if(!$stmt_usr->fetch()){\n echo \"<h4>No user found</h4>\";\n echo \"</table>\";\n return;\n }\n echo '<tr><td>';\n echo $gameName;\n echo '</td><td>';\n echo $ts;\n echo '</td><td>';\n echo $usr;\n echo '</td><td>';\n echo $player;\n echo '</td><td>';\n echo $score;\n echo '</td></tr>';\n }\n \techo \"</table>\";\n } catch (mysqli_sql_exception $e){\n echo $e->getMessage();\n }\n}", "public static function updateLeaderBoard(){\n\t\t$records = array();\n\t\t$db_conn = new Database();\n\t\t$database = new Database();\n\t\t$total_ranks = null;\n\t\t//$query_num = \"SELECT count(DISTINCT cur_amt) FROM \".self::$table;\n\t\t$query = \"SELECT id,cur_amt,s_companies FROM \".self::$table;\n\t\t\n\t\t//$rank_num = $db_conn->query($query_num);\n\t\t$data = $db_conn->query($query);\n\n\t\tif($data\n\t\t// && $rank_num\n\t\t ){\n\t\t\t//$total_ranks = array_shift($database->fetch_array($rank_num));\n\t\t\twhile($holder = $database->fetch_array($data)){\n\t\t\t\t$total_amount = 0;\n\t\t\t\tif($holder['s_companies']>0){\n\n\t\t\t\t\t$holder_stk = new HolderStocks($holder['id']);\n\t\t\t\t\tif($holder_stk->isFound()){\n\t\t\t\t\t\tforeach($holder_stk->holder_stocks as $hs){\n\t\t\t\t\t\t\t$total_amount += $hs['s_qty']*$hs['cur_price'];\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\n\t\t\t\t\t$total_amount += $holder['cur_amt'];\n\t\t\t\t\t$records[] = array('sh_id'=>$holder['id'],'total_amount' => $total_amount);\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Sorting Algorithm\n\t\t\t$rank_record = array();\n\t\t\t$column = array_column($records,'total_amount');\n\t\t arsort($column);\n\t\t\tforeach($column as $key=> $value){\n\t\t\t$rank_record[] = $records[$key];\n\t\t\t}\n\t\t\t//after sorting everything out\n\n\t\t\t//Storing and updating the leaderboard in db\n\t\t\t$rank = 1;\n\t\t\tforeach($rank_record as $record){\n\t\t\t\t$query_update = \"UPDATE \".self::$table;\n\t\t\t\t$query_update .= \" SET leader_pos =\".$rank++;\n\t\t\t\t$query_update .= \" WHERE id=\".$record['sh_id'];\n\t\t\t\t$result = $database->query($query_update);\n\t\t\t}\n\t\t\tunset($db_conn);\n\t\t\tunset($rank);\n\n\t\t}else{\n\t\t\tunset($db_conn);\n\t\t\treturn false;\n\t\t}\n\t}", "public function hit()\n {\n if($this->exists){\n $stats = $this->popularityStats()->first();\n if( empty( $stats ) ){\n //associates a new Stats instance for this instance\n $stats = new Stats();\n $this->popularityStats()->save($stats);\n }\n return $stats->updateStats();\n }\n return false;\n }", "function add_stats_to_roster($node_id, $roster) {\n // TODO - verify stat_columns data format\n $stat_columns = player_stat_columns(0);\n //drupal_set_message(t('stat_columns <pre>@data</pre>', array('@data' => print_r($stat_columns, TRUE))));\n \n // TODO - Group on TPID and SUM spp_award\n $result = db_query('SELECT st.tpid AS tpid, ps.ps_scid AS ps_scid, SUM(stat_award) AS stat_count \n FROM bbl_user_players AS st \n INNER JOIN bbl_user_player_stats AS ps ON st.tpid = ps.ps_tpid \n INNER JOIN bbl_user_roster AS tt ON tt.team_id = st.teamid \n WHERE (tt.team_node_id = :team_node_id) AND (st.playerstate IN (0, 2)) \n GROUP BY tpid, ps_scid \n ORDER BY tpid, ps_scid', array(':team_node_id' => $node_id));\n \n // First key the stats data by both the tpid and scid values so they \n // can be identified\n $pivot = array();\n foreach ($result as $stat) {\n\t $pivot[$stat->tpid . ',' . $stat->ps_scid] = $stat->stat_count;\n }\n \n // Next loop thru each stat column for each player. Check if a $pivot result exists else record 0.\n $new_roster = array();\n foreach ($roster as $player) {\n $row = (array) $player;\n \n foreach ($stat_columns as $stat) {\n $key = $row['tpid'] . ',' . $stat->scid;\n // add values to the player arrays within $roster\n $row['ps' . $stat->scid] = isset($pivot[$key]) ? $pivot[$key] : 0;\n }\n\t \n $new_roster[] = $row;\n }\n \n return $new_roster;\n}", "protected function processResultsByTeam($ws,$level,&$teamCount,&$newPool,$teams,$header='Team Standings',$headerLabels)\n { \n }", "function updateGames($change) {\n\t$new = array_merge(getGames(), $change);\n\twriteGames($new);\n}", "function updateCardAnswerStats($cardid, $correctinc, $wronginc) {\n\t\tglobal $dbconn;\n\n\t\t// ensure we have a valid card id\n\t\tif ($cardid === \"\") {\n\t\t\treturn message(-1, \"Cannot update card answer stats without a valid cardid.\");\n\t\t}\n\t\t\n\t\t// ensure we have a valid correct increment\n\t\tif ($correctinc === \"\") {\n\t\t\t$correctinc = 0;\n\t\t}\n\t\t\n\t\t// ensure we have a valid wrong increment\n\t\tif ($wronginc === \"\") {\n\t\t\t$wronginc = 0;\n\t\t}\n\t\t\n\t\t// update card record with answer stats\n\t\t$query = \"UPDATE card SET anscorrect = anscorrect + $2, answrong = answrong + $3 WHERE cardid = $1\";\n\t\t$stmnt = pg_prepare($dbconn, \"updateCardAnswerStats\", $query);\n\t\t$result = pg_execute($dbconn, \"updateCardAnswerStats\", array($cardid, $correctinc, $wronginc));\n\t\t\n\t\t// ensure there were no query errors\n\t\tif ($result === false) {\n\t\t\treturn message(-1, \"Error executing query against the database.\");\n\t\t}\n\t\t\n\t\t// ensure a record was updated\n\t\tif (pg_affected_rows($result) == 0) {\n\t\t\treturn message(-1, \"Card record not updated with answer stats\");\n\t\t}\n\t\t\t\t\n\t\t// return success\n\t\treturn message(1, \"Card answer stats updated successfully\");\n\t\t\n\t}", "function feuserloginsystem_updateUserStatisticEntry() {\r\n\r\n # Get existing statistic information for the current user and session.\r\n $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\r\n\t\t\t'uid,feuserid,sessionstart,lastpageview,pagecounter,pagetracking',\r\n\t\t\t'tx_feuserloginsystem_userstatistics',\r\n\t\t\tsprintf('feuserid=\\'%s\\'',addslashes(intval($this->fe_user->user[\"uid\"]))),\r\n\t\t\t'',\r\n\t\t\t'sessionstart DESC',\r\n\t\t\t'1'\r\n \t);\r\n \t$row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);\r\n\r\n \t# Existing statistic information could be found.\r\n \tif(is_array($row)) {\r\n\r\n $timeStamp = time();\r\n\r\n # Unserialize page tracking information.\r\n $pagetrackingArray = unserialize($row['pagetracking']);\r\n # Add new page tracking information to the already existing page tracking information.\r\n $pagetrackingArray[] = array('time' => $timeStamp, 'pageID' => intval($this->id));\r\n\r\n\t\t\t#Update commom information for statistics.\r\n\t\t $insertDataArray = array();\r\n\t\t $insertDataArray['lastpageview'] = $timeStamp;\r\n\t\t $insertDataArray['pagecounter'] = intval($row['pagecounter'] + 1);\r\n\t\t $insertDataArray['pagetracking'] = serialize($pagetrackingArray);\r\n\r\n\t\t # Update statistic information in the database.\r\n $GLOBALS['TYPO3_DB']->exec_UPDATEquery(\r\n 'tx_feuserloginsystem_userstatistics',\r\n sprintf('uid=\\'%s\\'',addslashes(intval($row['uid']))),\r\n $insertDataArray\r\n );\r\n\r\n }\r\n\r\n }", "function testUpdate()\r\n\t{\r\n\t\t$olap = new Olap($this->dbh);\r\n\t\t$cube = $olap->getCube(\"tests/testcube\");\r\n\r\n\t\t// Now record that '/index.php' has received 100 hits in the us\r\n\t\t$data = array(\r\n\t\t\t'page' => \"/index.php\",\r\n\t\t\t'country' => \"us\",\r\n\t\t);\r\n\t\t$measures = array(\"hits\" => 100);\r\n\t\t$cube->writeData($measures, $data);\r\n\t\t$data = array(\r\n\t\t\t'page' => \"/about.php\",\r\n\t\t\t'country' => \"us\",\r\n\t\t);\r\n\t\t$measures = array(\"hits\" => 50);\r\n\t\t$cube->writeData($measures, $data);\r\n\r\n\t\t// Extract the data in a single dimension\r\n\t\t$query = new Olap_Cube_Query();\r\n\t\t$query->addMeasure(\"hits\", \"sum\");\r\n\t\t$query->addDimension(\"page\");\r\n\t\t$query->addFilter(\"and\", \"country\", \"is_equal\", \"us\");\r\n\t\t$data = $cube->getData($query);\r\n\t\t$this->assertEquals($data['/index.php']['hits'], 100);\r\n\t\t$this->assertEquals($data['/about.php']['hits'], 50);\r\n\r\n\t\t// Extract the data in two dimensions\r\n\t\t$query = new Olap_Cube_Query();\r\n\t\t$query->addMeasure(\"hits\", \"sum\");\r\n\t\t$query->addDimension(\"page\");\r\n\t\t$query->addDimension(\"country\");\r\n\t\t$query->addFilter(\"and\", \"country\", \"is_equal\", \"us\");\r\n\t\t$data = $cube->getData($query);\r\n\t\t$this->assertEquals($data['/index.php']['us']['hits'], 100);\r\n\t\t$this->assertEquals($data['/about.php']['us']['hits'], 50);\r\n\r\n\t\t// Cleanup\r\n\t\t$cube->remove();\r\n\t}", "function insertGamesToDate() {\n $conn = getConnection();\n $yesterdayDate = date('Y-m-d',strtotime(\"-1 days\"));\n\n $url = \"https://statsapi.web.nhl.com/api\";\n $all_games = \"/v1/schedule?startDate=2018-10-03&endDate=\".$yesterdayDate;\n\n $jsonString = file_get_contents($url.$all_games);\n $jsonObject = json_decode($jsonString);\n $sql = \"INSERT INTO Games_ToDate VALUES \";\n $jsonObject = $jsonObject -> dates;\n\n // populate associative array of win streaks for teams\n $streakArray = array();\n $dayBeforeGames = array();\n $dayOfGames = array();\n $teams_from_db = $conn -> query(\"SELECT id FROM teams\");\n while($row = $teams_from_db -> fetch_assoc()) {\n $streakArray = array_push_assoc($streakArray, $row['id'], 0);\n $dayBeforeGames = array_push_assoc($dayBeforeGames, $row['id'], 0);\n $dayOfGames = array_push_assoc($dayOfGames, $row['id'], 0);\n }\n\n // loop through json object of all games from last year\n foreach($jsonObject as $key => $item) {\n $date = $item->date;\n\n // move values from dayOfGames to dayBeforeGames\n // the make all day of games 0\n foreach($dayOfGames as $key => $value) {\n $dayBeforeGames[$key] = $value;\n $dayOfGames[$key] = 0;\n }\n\n for($i = 0; $i < sizeof($item->games); $i++) {\n // store home and away teams\n $home_id = $item->games[$i]->teams->home->team->id;\n $away_id = $item->games[$i]->teams->away->team->id;\n\n // loop through day of games and update values to 1 of teams playing\n foreach($dayOfGames as $key => $value) {\n if($value == $home_id) {\n $dayOfGames[$key] = 1;\n }elseif($key == $away_id) {\n $dayOfGames[$key] = 1;\n }\n }\n\n // ignore games from all star weekend\n if($home_id == 90 || $home_id == 89|| $home_id == 88 || $home_id == 87) {\n continue;\n }\n\n //ignore non NHL team that played this year\n if($home_id == 7202) {\n continue;\n }\n\n // score of the game to determine winner\n $homeScore = $item->games[$i]->teams->home->score;\n $awayScore = $item->games[$i]->teams->away->score;\n\n // store current streaks for teams\n $homeStreak = $streakArray[$home_id];\n $awayStreak = $streakArray[$away_id];\n\n // determine winner and store winner (winner is 1 for home team and 0 for away)\n // store wins for home and away teams\n // winning team is wins -1 because api store wins based on outcome of current game\n if($homeScore > $awayScore) {\n $winner = 1;\n $winner_id = $home_id;\n\n // update streaks for both teams\n $streakArray[$winner_id]++;\n $streakArray[$away_id] = 0;\n $home_wins = $item->games[$i]->teams->home->leagueRecord->wins - 1;\n $away_wins = $item->games[$i]->teams->away->leagueRecord->wins;\n } else {\n $winner = 0;\n $winner_id = $away_id;\n\n // update streaks for both teams\n $streakArray[$winner_id]++;\n $streakArray[$home_id] = 0;\n $away_wins = $item->games[$i]->teams->away->leagueRecord->wins - 1;\n $home_wins = $item->games[$i]->teams->home->leagueRecord->wins;\n }\n // add game states to sql for insert\n $sql .= \"(\".$home_id.\", \".$away_id.\", \".$home_wins.\", \".$away_wins.\", \".$homeStreak.\", \".$awayStreak.\", \".$dayBeforeGames[$home_id].\", \".$dayBeforeGames[$away_id].\", \".$winner.\", '\".$date.\"'),\";\n }\n }\n // replace last comma with a semicolon\n $sql = substr($sql, 0, -1).\";\";\n\n // insert to db\n $conn -> query($sql);\n }", "function\toverall_stats($dbconn,$page) {\n $sqlcom=\"select count(distinct spec_id),sum(num_seq) as seqs,sum(num_clus) as clus,sum(num_lib) as libs,max(last_update),max(anno_update) as anno from stats;\";\n\t$dbres = pg_exec($dbconn, $sqlcom );\n\tif ( ! $dbres ) {echo \"Error : \" + pg_errormessage( $dbconn );exit();}\n\t$do = pg_Fetch_Object($dbres, $row);\n\t$count=$do->count;\n\t$seqs=$do->seqs;$seqs=number_format($seqs);\n\t$clus=$do->clus;$clus=number_format($clus);\n\t$libs=$do->libs;$libs=number_format($libs);\n\t$update=$do->max;preg_match(\"/^(\\d\\d\\d\\d)-(\\d\\d)-\\d\\d/\",\"$update\", $date);\n\t$anno_update=$do->anno;preg_match(\"/^(\\d\\d\\d\\d)-(\\d\\d)-\\d\\d/\",\"$anno_update\", $anno_date);\n\tif ($page==\"index\") {\n\t\tprint \"<tr><td>Last annotation update</td><td>$anno_date[2] / $anno_date[1]</td></tr>\\n\"; \n\t\tprint \"<tr><td>Last sequence update</td><td>$date[2] / $date[1]</td></tr>\\n\"; \n\t\tprint \"<tr><td>Number of Species</td><td align=\\\"right\\\">$count</td></tr>\\n\"; \n\t\tprint \"<tr><td>Number of Libraries &nbsp&nbsp</td><td align=\\\"right\\\">$libs</td></tr>\\n\"; \n\t\tprint \"<tr><td>Number of Clusters</td><td align=\\\"right\\\">$clus</td></tr>\\n\"; \n\t\tprint \"<tr><td>Number of ESTs</td><td align=\\\"right\\\">$seqs</td></tr>\\n\"; \n\t}\n\telse {\n\t\tprint \"<tr><td class=\\\"mainBig\\\" colspan=8><br>Last data update $date[2] / $date[1]\";\n\t\tprint \": NEMBASE4 contains data for $count Species, from $libs libraries, $clus clusters and $seqs ESTs<br><br></td></tr><tr>\\n\"; \n\t}\n}", "function xstats_displayMaxValueListMisc($gameId) {\n echo( \"<H3>Spitzenwerte im Spiel</H3>\");\n $statsAvailablePlayerIndicies = xstats_getAvailablePlayerIndicies($gameId);\n $statsMaxTurn = xstats_getMaxTurn($gameId);\n echo( xstats_displayMaxSum( $gameId, 'coloniestakencount', $statsMaxTurn, $statsAvailablePlayerIndicies ) );\n echo( xstats_displayMaxValue( $gameId, 'planetcount') );\n echo( xstats_displayMaxValue( $gameId, 'colonistcount') );\n echo( xstats_displayMaxValue( $gameId, 'cantoxcount') );\n echo( xstats_displayMaxValue( $gameId, 'lemincount') );\n echo( xstats_displayMaxValue( $gameId, 'factorycount') );\n echo( xstats_displayMaxValue( $gameId, 'minescount') );\n xstats_displayMaxWaitTime( $gameId );\n}", "protected function updateLeagueStandings()\n {\n $conditions = array('needs_standings_update' => true);\n $fields = array('_id');\n $leagues_needing_update = Leagues::all(compact('conditions', 'fields'));\n }", "public function run()\n {\n DB::table('stats_pitching')->insert([\n [\n 'player_id' => 11,\n 'game_id' => 1,\n 'w' => 1,\n 'l' => 0,\n 'gs' => 1,\n 'gf' => 1,\n 'sho' => 0,\n 'sv' => 0,\n 'ip' => 8.0,\n 'h' => 7,\n 'r' => 1,\n 'er' => 1,\n 'hr' => 0,\n 'bb' => 0,\n 'ibb' => 0,\n 'so' => 9,\n 'hbp' => 0,\n 'bk' => 0,\n 'wp' => 0,\n 'bf' => 31\n ],\n [\n 'player_id' => 21,\n 'game_id' => 1,\n 'w' => 0,\n 'l' => 0,\n 'gs' => 1,\n 'gf' => 0,\n 'sho' => 0,\n 'sv' => 0,\n 'ip' => 4.0,\n 'h' => 2,\n 'r' => 1,\n 'er' => 1,\n 'hr' => 0,\n 'bb' => 1,\n 'ibb' => 0,\n 'so' => 3,\n 'hbp' => 0,\n 'bk' => 0,\n 'wp' => 0,\n 'bf' => 15\n ],\n [\n 'player_id' => 22,\n 'game_id' => 1,\n 'w' => 0,\n 'l' => 0,\n 'gs' => 0,\n 'gf' => 0,\n 'sho' => 0,\n 'sv' => 0,\n 'ip' => 3.0,\n 'h' => 1,\n 'r' => 0,\n 'er' => 0,\n 'hr' => 0,\n 'bb' => 2,\n 'ibb' => 0,\n 'so' => 0,\n 'hbp' => 0,\n 'bk' => 0,\n 'wp' => 0,\n 'bf' => 12\n ],\n [\n 'player_id' => 23,\n 'game_id' => 1,\n 'w' => 0,\n 'l' => 1,\n 'gs' => 0,\n 'gf' => 1,\n 'sho' => 0,\n 'sv' => 0,\n 'ip' => 0.1,\n 'h' => 2,\n 'r' => 3,\n 'er' => 3,\n 'hr' => 1,\n 'bb' => 0,\n 'ibb' => 0,\n 'so' => 1,\n 'hbp' => 1,\n 'bk' => 0,\n 'wp' => 0,\n 'bf' => 4\n ]\n ]);\n }", "function showResults($filename, $searchterm){\n\tif(file_exists($filename)){\n\t\t$contents = file_get_contents($filename);\n\t\t$results = json_decode($contents);\n\n\t\t# check if error in decode and give error msg\n\t\tif(json_last_error() !== JSON_ERROR_NONE){\n\t\t\techo \"<p style=\\\"font-weight:bold; color:red;\\\">\";\n echo \"ERROR: <br> Error with JSON data <br></p>\";\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$winCount = 0;\n\t\t$totalGames = 0; # counters\n\t\t\n\t\t# create header\t\n\t\techo \"<h4>\";\n\t\tforeach($results->comments as $elem){\n\t\t\techo \"$elem<br>\";\t\n\t\t}\n echo '</h4>'; \n\n\t\t# iterate through each element in games\n\t\tforeach($results->games as $element){\n\t\t\t\n\t\t\t# then iterate through each key value pair\n\t\t\tforeach($element as $key => $value){\n $newValue = str_replace(\"_\", \" \", $value); # clean up team names\n\n if($key === $searchterm){ # check if search term, then bold if so\n echo \"<p style=\\\"font-weight:bold; color:blue;\\\">\";\n echo \"$key : $newValue </p>\";\n }\n else{ # otherwise print normally\n echo \"<p> $key : $newValue </p>\"; \n }\n\n\t\t\t\t# check if win and update count if necessary\n\t\t\t\tif($key === \"WinorLose\" && $value === \"W\")\n\t\t\t\t\t++$winCount;\n\t\t\t}\n\t\t\t++$totalGames;\t# increment game count regardless\n\t\t echo \"<br>\";\n \n }\n\n\t\t$winPercentage = ($winCount / $totalGames) * 100;\n\t\techo \"<br><p style=\\\"color:blue;\\\">\";\n echo \"Win percentage: $winPercentage % </p><br></body></html>\";\t\t\n\t\n\t}\n\telse{\t\t# give error if file not found\n\t\techo \"<p style=\\\"font-weight:bold; color:red;\\\">\";\n echo \"No results found for the specified input.</p></body></html>\";\n\t\t\n return;\n\t}\n}", "public function runGame()\n {\n $currentGame = $this->find('all')->where([\n 'complete' => false\n ])->contain(['Users'])->first();\n\n //get all the plays counts\n $gamesUsersTable = TableRegistry::get('GamesUsers');\n $currentGameCheckedCount = $gamesUsersTable->find();\n $currentGameCheckedCount = $currentGameCheckedCount->select([\n 'count' => $currentGameCheckedCount->func()->count('*')\n ])->where([\n 'game_id' => $currentGame->id,\n 'checked_box' => true\n ])->first()->count;\n\n $currentGameUncheckedCount = $gamesUsersTable->find();\n $currentGameUncheckedCount = $currentGameUncheckedCount->select([\n 'count' => $currentGameUncheckedCount->func()->count('*')\n ])->where([\n 'game_id' => $currentGame->id,\n 'checked_box' => false\n ])->first()->count;\n\n $totalPlays = $currentGameCheckedCount + $currentGameUncheckedCount;\n\n //If not enough players, extend the end time and bail;\n if ($totalPlays < 2) {\n $currentGame->end_time = Time::now()->addHour(1);\n $this->save($currentGame);\n return false;\n }\n\n //update current game fields\n $currentGame->total_checked = $currentGameCheckedCount;\n $currentGame->total_plays = $totalPlays;\n $currentGame->ratio = round((float)$currentGameCheckedCount / (float)$totalPlays, 2);\n\n //save game as 'complete'\n $currentGame->complete = true;\n $this->save($currentGame);\n\n //get all the users that played this round\n $usersTable = TableRegistry::get('Users');\n $usersWhoCheckedThisGameIdArray = $gamesUsersTable->find('list', [\n 'valueField' => 'user_id'\n ])->where([\n 'game_id' => $currentGame->id,\n 'checked_box' => true\n ])->toArray();\n $currentGameCheckedUsers = $usersTable->find('all')->where([\n 'id IN' => (!empty($usersWhoCheckedThisGameIdArray) ? $usersWhoCheckedThisGameIdArray : [0])\n ]);\n\n $usersWhoDidntCheckThisGameIdArray = $gamesUsersTable->find('list', [\n 'valueField' => 'user_id'\n ])->where([\n 'game_id' => $currentGame->id,\n 'checked_box' => false\n ])->toArray();\n $currentGameUncheckedUsers = $usersTable->find('all')->where([\n 'id IN' => (!empty($usersWhoDidntCheckThisGameIdArray) ? $usersWhoDidntCheckThisGameIdArray : [0])\n ]);\n\n\n //update users scores\n foreach ($currentGameCheckedUsers as $user) {\n if ($currentGame->ratio > 0.5) {\n if ($user->score != 0) {\n $user->score = (int)$user->score - 10;\n }\n } else {\n $user->score = (int)$user->score + 10;\n }\n $usersTable->save($user);\n }\n\n //create next incomplete game & save\n $this->createNewGame();\n\n //send notification emails to everybody that gained/lost points\n $email = new Email('default');\n\n $email->setTemplate('end_game', 'default')\n ->setEmailFormat('html')\n ->setFrom(\"[email protected]\", \"Cruelty Game\")\n ->setSubject('Cruelty Game Results')\n ->setViewVars([\n 'ratio' => $currentGame->ratio,\n 'checked' => true,\n 'gameDomain' => Configure::read('GameDomain')\n ]);\n\n foreach ($currentGameCheckedUsers as $user) {\n if ($user->receive_emails && $user->enabled) {\n $email->addBcc($user->email);\n }\n }\n\n //don't bother emailing if there's nobody to email.\n if (empty($email->getTo()) && empty($email->getCc()) && empty($email->getBcc())) {\n return true;\n }\n try {\n $email->send();\n } catch (\\Cake\\Network\\Exception\\SocketException $e) {\n Log::write(\"error\", \"Couldn't send game result email!\");\n }\n\n //send email to everybody who played but didn't check\n $email = new Email('default');\n\n $email->setTemplate('end_game', 'default')\n ->setEmailFormat('html')\n ->setFrom(\"[email protected]\", \"Cruelty Game\")\n ->setSubject('Cruelty Game Results')\n ->setViewVars([\n 'ratio' => $currentGame->ratio,\n 'checked' => false,\n 'gameDomain' => Configure::read('GameDomain')\n ]);\n\n foreach ($currentGameUncheckedUsers as $user) {\n if ($user->receive_emails && $user->enabled) {\n $email->addBcc($user->email);\n }\n }\n\n //don't bother emailing if there's nobody to email.\n if (empty($email->getTo()) && empty($email->getCc()) && empty($email->getBcc())) {\n return true;\n }\n try {\n $email->send();\n } catch (\\Cake\\Network\\Exception\\SocketException $e) {\n Log::write(\"error\", \"Couldn't send game result email!\");\n }\n }", "public function stats() {\n\t\techo \"<p>\";\n\t\techo \"<strong>Cache Hits:</strong> {$this->cache_hits}<br />\";\n\t\techo \"<strong>Cache Misses:</strong> {$this->cache_misses}<br />\";\n\t\techo \"</p>\";\n\t\techo '<ul>';\n\t\tforeach ( $this->cache as $group => $cache ) {\n\t\t\techo \"<li><strong>Group:</strong> $group - ( \" . number_format( strlen( serialize( $cache ) ) / 1024, 2 ) . 'k )</li>';\n\t\t}\n\t\techo '</ul>';\n\t}", "function LeagueSeasonPlayersResults(){\n\t\n\tglobal $db_admin,$db_admin_contact,$db_admin_guids,$db_league_teams,$db_league_teams_sub,$db_league_seasons,$db_league_seasons_results_players;\n\tglobal $db_country,$db_league_seasons_rounds,$db_league_players,$db_league_awards;\n\tglobal $eden_cfg;\n\tglobal $url_flags,$url_league_awards;\n\t\n\t$result = \"\";\n\t$result .= \"<table style=\\\"width:500px;\\\" cellspacing=\\\"2\\\" cellpadding=\\\"1\\\" class=\\\"eden_main_table\\\">\\n\";\n\t$result .= \"\t<tr>\";\n\t$result .= \"\t\t<td class=\\\"eden_title\\\" style=\\\"width:40px;\\\">\"._LEAGUE_SEASON_ROUND_POSITION.\"</td>\";\n\t$result .= \"\t\t<td class=\\\"eden_title\\\" style=\\\"width:60px;\\\">\"._LEAGUE_SEASON_ROUND_POINTS.\"</td>\";\n\t$result .= \"\t\t<td class=\\\"eden_title\\\">\"._CMN_COUNTRY.\"</td>\";\n\t$result .= \"\t\t<td class=\\\"eden_title\\\">\"._LEAGUE_PLAYER_NICK.\"</td>\";\n\t$result .= \"\t\t<td class=\\\"eden_title\\\">\"._LEAGUE_GUID.\"</td>\";\n\t$result .= \"\t\t<td class=\\\"eden_title\\\">\"._LEAGUE_TEAM.\"</td>\";\n\t$result .= \"\t</tr>\";\n \t$res_results_players = mysql_query(\"\n\tSELECT lsrp.league_season_result_player_player_id, a.admin_id, a.admin_nick, lt.league_team_id, lt.league_team_name, \n\tlsrp.league_season_result_player_points, c.country_shortname, c.country_name, agid.admin_guid_guid \n\tFROM $db_league_seasons_results_players AS lsrp \n\tJOIN $db_league_players AS lp ON lp.league_player_id = lsrp.league_season_result_player_player_id \n\tJOIN $db_admin AS a ON a.admin_id = lp.league_player_admin_id \n\tJOIN $db_admin_contact AS ac ON ac.aid = a.admin_id \n\tJOIN $db_admin_guids AS agid ON agid.aid = a.admin_id AND agid.admin_guid_game_id = lp.league_player_game_id \n\tJOIN $db_league_teams AS lt ON lt.league_team_id = lp.league_player_team_id \n\tJOIN $db_country AS c ON c.country_id = ac.admin_contact_country \n\tWHERE lsrp.league_season_result_player_season_id = \".(integer)$_GET['sid'].\" \n\tORDER BY lsrp.league_season_result_player_points DESC LIMIT 10\") or die (\"<strong>File:</strong> \".__FILE__.\"<br /><strong>Line:</strong>\".__LINE__.\"<br />\".mysql_error());\n\t$i = 1;\n\twhile ($ar_results_players = mysql_fetch_array($res_results_players)){\n\t\t// Call function\n\t\t$ar_award = LeagueCheckAwards(1,(integer)$_GET['sid'],(integer)$ar_results_players['league_season_result_player_player_id'],0);\n\t\t\n\t\tif ($i % 2 == 0){ $cat_class = \"cat_level1_even\";} else { $cat_class = \"cat_level1_odd\";}\n\t\t$result .= \"<tr class=\\\"\".$cat_class.\"\\\" onmouseover=\\\"this.className='cat_over'\\\" onmouseout=\\\"this.className='\".$cat_class.\"'\\\">\\n\";\n\t\t$result .= \"\t<td align=\\\"right\\\" valign=\\\"top\\\">\"; if($ar_award['league_award_place']){$result .= \"<img src=\\\"\".$url_league_awards.$ar_award['league_award_img'].\"\\\" alt=\\\"\".stripslashes($ar_award['league_award_name']).\"\\\" title=\\\"\".stripslashes($ar_award['league_award_name']).\"\\\" />\";} else {$result .= \"<strong>\".$i.\"</strong>\";} $result .= \"</td>\";\n\t\t$result .= \"\t<td align=\\\"left\\\" valign=\\\"top\\\">\".$ar_results_players['league_season_result_player_points'].\"</td>\";\n\t\t$result .= \"\t<td valign=\\\"top\\\"><img src=\\\"\".$url_flags.$ar_results_players['country_shortname'].\".gif\\\" alt=\\\"\".stripslashes($ar_results_players['country_name']).\"\\\" title=\\\"\".stripslashes($ar_results_players['country_name']).\"\\\" /></td>\";\n\t \t$result .= \"\t<td valign=\\\"top\\\"><a href=\\\"\".$eden_cfg['url'].\"index.php?action=player&amp;mode=player_acc&amp;id=\".$ar_results_players['admin_id'].\"&amp;lang=\".$_GET['lang'].\"&amp;filter=\".$_GET['filter'].\"\\\" target=\\\"_self\\\">\".stripslashes($ar_results_players['admin_nick']).\"</a></td>\";\n\t\t$result .= \"\t<td valign=\\\"top\\\">\".$ar_results_players['admin_guid_guid'].\"</td>\";\n\t\t$result .= \"\t<td valign=\\\"top\\\"><a href=\\\"\".$eden_cfg['url'].\"index.php?action=league_team&amp;mode=team_home&amp;ltid=\".$ar_results_players['league_team_id'].\"&amp;lang=\".$_GET['lang'].\"&amp;filter=\".$_GET['filter'].\"\\\" target=\\\"_self\\\">\".stripslashes($ar_results_players['league_team_name']).\"</a></td>\";\n\t\t$result .= \"</tr>\";\n\t\t$i++;\n\t}\n\t$result .= \"\t<tr>\\n\";\n\t$result .= \"\t\t<td colspan=\\\"5\\\"><br /><form action=\\\"sys_save.php?action=league_awards_give_to_players&sid=\".$_GET['sid'].\"\\\" method=\\\"post\\\" name=\\\"form1\\\" enctype=\\\"multipart/form-data\\\">\\n\";\n\t$result .= \"\t\t\t<input type=\\\"hidden\\\" name=\\\"sid\\\" value=\\\"\".$_GET['sid'].\"\\\">\\n\";\n\t$result .= \"\t\t\t<input type=\\\"hidden\\\" name=\\\"confirm\\\" value=\\\"true\\\">\\n\";\n\t$result .= \"\t\t\t<input type=\\\"hidden\\\" name=\\\"project\\\" value=\\\"\".$_SESSION['project'].\"\\\">\\n\";\n\t$result .= \"\t\t\t<input type=\\\"submit\\\" value=\\\"\"._LEAGUE_AWARD_SUBMIT_PLAYER.\"\\\" class=\\\"eden_button\\\">\\n\";\n\t$result .= \"\t\t</form>\\n\";\n\t$result .= \"\t\t</td>\\n\";\n\t$result .= \"\t</tr>\\n\";\n\t$result .= \"</table>\\n\";\n\t\n\treturn $result;\n}", "function insertLastYearGames() {\n\n $conn = getConnection();\n\n $url = \"https://statsapi.web.nhl.com/api\";\n $all_games = \"/v1/schedule?startDate=2017-10-04&endDate=2018-04-10\";\n\n $jsonString = file_get_contents($url.$all_games);\n $jsonObject = json_decode($jsonString);\n $sql = \"INSERT INTO LastYear_Games VALUES \";\n $jsonObject = $jsonObject -> dates;\n\n // populate associative array of win streaks for teams\n $streakArray = array();\n $dayBeforeGames = array();\n $dayOfGames = array();\n $teams_from_db = $conn -> query(\"SELECT id FROM teams\");\n while($row = $teams_from_db -> fetch_assoc()) {\n $streakArray = array_push_assoc($streakArray, $row['id'], 0);\n $dayBeforeGames = array_push_assoc($dayBeforeGames, $row['id'], 0);\n $dayOfGames = array_push_assoc($dayOfGames, $row['id'], 0);\n }\n\n // loop through json object of all games from last year\n foreach($jsonObject as $key => $item) {\n $date = $item->date;\n\n // move values from dayOfGames to dayBeforeGames\n // the make all day of games 0\n foreach($dayOfGames as $key => $value) {\n $dayBeforeGames[$key] = $value;\n $dayOfGames[$key] = 0;\n }\n\n for($i = 0; $i < sizeof($item->games); $i++) {\n // store home and away teams\n $home_id = $item->games[$i]->teams->home->team->id;\n $away_id = $item->games[$i]->teams->away->team->id;\n\n // loop through day of games and update values to 1 of teams playing\n foreach($dayOfGames as $key => $value) {\n if($value == $home_id) {\n $dayOfGames[$key] = 1;\n }elseif($key == $away_id) {\n $dayOfGames[$key] = 1;\n }\n }\n\n // ignore games from all star weekend\n if($home_id == 90 || $home_id == 89|| $home_id == 88 || $home_id == 87) {\n continue;\n }\n\n // score of the game to determine winner\n $homeScore = $item->games[$i]->teams->home->score;\n $awayScore = $item->games[$i]->teams->away->score;\n\n // store current streaks for teams\n $homeStreak = $streakArray[$home_id];\n $awayStreak = $streakArray[$away_id];\n\n // determine winner and store winner (winner is 1 for home team and 0 for away)\n // store wins for home and away teams\n // winning team is wins -1 because api store wins based on outcome of current game\n if($homeScore > $awayScore) {\n $winner = 1;\n $winner_id = $home_id;\n\n // update streaks for both teams\n $streakArray[$winner_id]++;\n $streakArray[$away_id] = 0;\n $home_wins = $item->games[$i]->teams->home->leagueRecord->wins - 1;\n $away_wins = $item->games[$i]->teams->away->leagueRecord->wins;\n } else {\n $winner = 0;\n $winner_id = $away_id;\n\n // update streaks for both teams\n $streakArray[$winner_id]++;\n $streakArray[$home_id] = 0;\n $away_wins = $item->games[$i]->teams->away->leagueRecord->wins - 1;\n $home_wins = $item->games[$i]->teams->home->leagueRecord->wins;\n }\n // add game states to sql for insert\n $sql .= \"(\".$home_id.\", \".$away_id.\", \".$home_wins.\", \".$away_wins.\", \".$homeStreak.\", \".$awayStreak.\", \".$dayBeforeGames[$home_id].\", \".$dayBeforeGames[$away_id].\", \".$winner.\", '\".$date.\"'),\";\n }\n }\n // replace last comma with a semicolon\n $sql = substr($sql, 0, -1).\";\";\n\n // insert to db\n $conn -> query($sql);\n }", "public function updateRound() {\n $this->authorize('admin-itd');\n\n $round_detail = Round::find(1);\n $damage_dealt_to_boss = 0;\n $attack_amount_list = array();\n\n // [RICKY] Sistem serang boss\n if ($round_detail->round > 0 && $round_detail->round <= 20) {\n // [RICKY] Masuk if jika round itu adalah special\n if ($round_detail->round % 4 == 0 || $round_detail->round == 13) {\n $boss_attack_list = array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25);\n $boss_damage = 300;\n } else {\n $random_attack_list = DB::table('random_boss_attacks')->where('id', $round_detail->round)->get();\n $boss_attack_list[] = $random_attack_list[0]->first_team;\n $boss_attack_list[] = $random_attack_list[0]->second_team;\n $boss_attack_list[] = $random_attack_list[0]->third_team;\n $boss_attack_list[] = $random_attack_list[0]->fourth_team;\n $boss_damage = 100;\n }\n\n // [RICKY] Team melancarkan serangan ke boss\n $team_list = Team::all();\n foreach ($team_list as $team) {\n if ($team->attack_status && $team->weapon_level > 0) {\n $damage_weapon = $team->weapon_level * 50 + 50;\n } else {\n $damage_weapon = 0;\n }\n\n // [RICKY] Cek buff_regeneration (RETURNER)\n if ($team->buff_regeneration > 0) {\n $update_hp_team = DB::table('teams')->where('id', $team->id)->increment('hp_amount', 30);\n broadcast(new UpdateHitpoint($team->id, $team->hp_amount + 30, null, null))->toOthers();\n }\n\n // [RICKY] Cek Status buff_increased (SCARLET PHANTOM)\n if ($team->buff_increased > 0) {\n $damage_weapon += intval(0.25 * $damage_weapon);\n }\n\n // [RICKY] Cek Status debuff_overtime yang stackable (PARADOX SPHERE)\n if ($team->debuff_overtime) {\n $damage_weapon += 10;\n }\n\n $damage_dealt_to_boss += $damage_weapon;\n $attack_amount_list[] = $damage_weapon;\n }\n\n // [RICKY] Kurangi hp boss berdasarkan damage_dealt_to_boss\n $attack_boss = DB::table('enemy_bosses')->where('id', 1)->decrement('hp_amount', $damage_dealt_to_boss);\n\n // [RICKY] Boss melancarkan serangan tim yang sudah ditentukan\n foreach ($boss_attack_list as $value) {\n $team_detail = Team::find($value);\n $damage_dealt_to_team = $boss_damage;\n\n // [RICKY] Memastikan apakah tim masih bisa bermain dengan mengecek hp yang dimiliki\n if ($team_detail->hp_amount > 0) {\n // [RICKY] Pengecekan apakah monster boss dapat menyerang tim ini (WINDTALKER & IMMORTAL ARMOR)\n if ( \n (($round_detail->round % 4 == 0 || $round_detail->round == 13) && $team_detail->buff_immortal) || // jika itu ultimate dan dia punya immortal\n (($round_detail->round % 4 != 0 && $round_detail->round != 13) && $team_detail->debuff_disable) // Jika itu round biasa dan punya disable\n ) {\n // ya gak ngapain\n } else {\n // [RICKY] Damage yang diterima dari serangan boss berkurang 25% (ANTIQUE CUIRASS)\n if ($team_detail->debuff_decreased > 0) {\n $damage_dealt_to_team = 0.75 * $damage_dealt_to_team;\n }\n\n // [RICKY] Damage yang diterima dari serangan boss berkurang 50% [SHIELD]\n if ($team_detail->shield) {\n $damage_dealt_to_team = (int)(0.5 * $damage_dealt_to_team);\n }\n\n // History kena damage\n $msg_receive_damage = 'Terkena damage boss sebesar '.$damage_dealt_to_team;\n\n $insert_history = DB::table('histories')->insert([\n 'teams_id' => $value,\n 'name' => $msg_receive_damage,\n 'type' => 'ATTACKED',\n 'time' => Carbon::now(),\n 'round' => $round_detail->round\n ]);\n\n $msg_receive_damage = \"<tr><td><p><b>[ATTACKED]</b><small> \".date('H:i:s').\"</small><br><span>\".$msg_receive_damage.\"</span></p></td></tr>\";\n\n // [RICKY] Kurangi HP Team\n if ($team_detail->hp_amount > $damage_dealt_to_team) {\n $attack_team = DB::table('teams')->where('id', $team_detail->id)->decrement('hp_amount', $damage_dealt_to_team);\n broadcast(new UpdateHitpoint($team_detail->id, $team_detail->hp_amount - $damage_dealt_to_team, $msg_receive_damage, null))->toOthers();\n } else {\n $attack_team = DB::table('teams')->where('id', $team_detail->id)->update(['hp_amount'=> 0]);\n $death_message = \"<tr><td><p><b>[STATUS]</b><small> \".date('H:i:s').\"</small><br><span>Tidak dapat bermain lagi</span></p></td></tr>\";\n broadcast(new UpdateHitpoint($team_detail->id, 0, $msg_receive_damage, $death_message))->toOthers();\n\n $insert_history = DB::table('histories')->insert([\n 'teams_id' => $value,\n 'name' => 'Tidak dapat bermain lagi',\n 'type' => 'STATUS',\n 'time' => Carbon::now(),\n 'round' => $round_detail->round\n ]);\n }\n }\n }\n }\n\n // [RICKY] Hapus status buff/debuff dll\n $team_list = Team::all();\n foreach ($team_list as $team) {\n // [RICKY] Reset jika tim masih diperbolehkan bermain\n if ($team->hp_amount > 0) {\n $set_debuff_decreased = ($team->debuff_decreased > 0)? $team->debuff_decreased - 1 : 0;\n $set_buff_increased = ($team->buff_increased > 0)? $team->buff_increased - 1 : 0;\n $set_buff_regeneration = ($team->buff_regeneration > 0)? $team->buff_regeneration - 1 : 0;\n\n $reset_ye = DB::table('teams')->where('id', $team->id)->update([\n 'debuff_decreased' => $set_debuff_decreased,\n 'buff_increased' => $set_buff_increased,\n 'buff_regeneration' => $set_buff_regeneration,\n ]);\n }\n }\n\n $reset = DB::table('teams')->update([\n 'material_shopping' => true,\n 'quest_status' => false,\n 'debuff_disable' => false,\n 'debuff_overtime' => false,\n 'buff_immortal' => false,\n 'shield' => false,\n 'attack_status' => false,\n 'heal_status' => false,\n 'buff_debuff_status' => false\n ]);\n }\n\n // [RICKY] Update round\n $minute = 8;\n\n $end_time = Carbon::now()->addMinutes($minute);\n $update_round = DB::table('rounds')->where('id', 1)->update(['round'=> $round_detail->round + 1, 'action'=> false, 'time_end'=> $end_time]);\n\n if ($round_detail->round + 1 >= 14)\n DB::table('rounds')->where('id', 1)->update(['game_finished' => true]);\n\n // [RICKY] Pusher broadcast\n $boss_detail = EnemyBoss::find(1);\n event(new UpdateRound($round_detail->round + 1, false, $minute, $boss_detail->hp_amount));\n\n // Update Status\n $team_list = Team::all();\n foreach ($team_list as $key => $tl) {\n if ($attack_amount_list[$key] > 0) {\n $insert_history = DB::table('histories')->insert([\n 'teams_id' => $tl->id,\n 'name' => 'Berhasil melancarkan serangan sebesar '.$attack_amount_list[$key],\n 'type' => 'ATTACK',\n 'time' => Carbon::now(),\n 'round' => $round_detail->round\n ]);\n }\n broadcast(new UpdateStatus($tl, $attack_amount_list[$key]))->toOthers();\n }\n\n return [\"success\" => true];\n }", "function ShowInfoGames($idGame)\n{\n $dbh = ConnectDB();\n $req = $dbh->query(\"SELECT idGame, LakeFishesGame, LakeReproductionGame, PondReproductionGame, EatFishesGame, FirstPlayerGame, TourGame, SeasonTourGame, MaxPlayersGame, MaxReleaseGame, DescriptionType, (SELECT COUNT(idPlace) FROM fishermenland.place WHERE fkGamePlace = idGame) AS OccupedPlaces, (SELECT SUM(PondFishesPlace) FROM fishermenland.place WHERE fkGamePlace = idGame) AS SumPondFishes\n FROM fishermenland.game\n INNER JOIN fishermenland.type ON game.fkTypeGame = type.idType WHERE idGame = '$idGame'\");\n\n return $req;\n}", "function count_votes($i_intAlliance)\n{\n $strSQL = \"SELECT COUNT(id) AS playercount \" .\n \" FROM stats \" .\n \" WHERE kingdom = '$i_intAlliance' \" .\n \" AND vote != 0\";\n\n $result = mysql_query ($strSQL) or die(\"include_vote_text3:\" . mysql_error());\n\n $intPlayerCount = 100; // fail-safe number, if we don't get the no. of the tribes\n\n if (mysql_num_rows($result) == 1)\n {\n $intPlayerCount = mysql_result ($result, 0, \"playercount\");\n }\n\n // this is a such a cool query. in 1 query I find the person with the max\n // votes in an alliance\n $strSQL = \"SELECT vote, COUNT(vote) AS votecount \" .\n \" FROM stats \" .\n \" WHERE kingdom = $i_intAlliance \" .\n \" AND vote > 0 \" .\n \" GROUP BY vote\" .\n \" ORDER BY votecount DESC, id ASC \" .\n \" LIMIT 1\";\n\n $result = mysql_query ($strSQL) or die(\"include_vote_text4:\" . mysql_error());\n\n if (mysql_num_rows($result) == 1)\n {\n $intNewElder = mysql_result ($result, 0, \"vote\");\n $intVoteCount = mysql_result ($result, 0, \"votecount\");\n\n // set the current elder to a player\n $strSQL = \"UPDATE stats \" .\n \" SET type = 'player' \" .\n \" WHERE kingdom = '$i_intAlliance' \" .\n \" AND type = 'elder'\";\n $result = mysql_query ($strSQL) or die(\"include_vote_text5:\" . mysql_error());\n $strSQL = \"UPDATE rankings_personal \" .\n \" SET player_type = 'player' \" .\n \" WHERE alli_id = '$i_intAlliance' \" .\n \" AND player_type = 'elder'\";\n $result = mysql_query ($strSQL) or die(\"include_vote_text_rank:\" . mysql_error());\n\n // set the new elder\n if ($intVoteCount > floor((double) $intPlayerCount * 0.6))\n {\n $strSQL = \"UPDATE stats \" .\n \" SET type = 'elder' \" .\n \" WHERE id = '$intNewElder' \";\n $result = mysql_query ($strSQL) or die(\"include_vote_text6:\" . mysql_error());\n $strSQL = \"UPDATE rankings_personal \" .\n \" SET player_type = 'elder' \" .\n \" WHERE id = '$intNewElder' \";\n $result = mysql_query ($strSQL) or die(\"include_vote_text_ranking:\" . mysql_error());\n }\n }\n else\n {\n // set the current elder to a player\n $strSQL = \"UPDATE stats \" .\n \" SET type = 'player' \" .\n \" WHERE kingdom = '$i_intAlliance' \" .\n \" AND type = 'elder'\";\n $result = mysql_query ($strSQL) or die(\"include_vote_text:\" . mysql_error());\n $strSQL = \"UPDATE rankings_personal \" .\n \" SET player_type = 'player' \" .\n \" WHERE alli_id = '$i_intAlliance' \" .\n \" AND player_type = 'elder'\";\n $result = mysql_query ($strSQL) or die(\"include_vote_text_rank:\" . mysql_error());\n\n // set the current co-elders to players\n unset_coelders($i_intAlliance);\n }\n}", "public function PrintStats(){\n\n ##Check for bad jumps\n for($i = 0; $i < count($this->jumps); $i++){\n if(!in_array( $this->jumps[$i], $this->labels)){\n $this->COUNTERS[BADJUMPS] += 1;\n $this->COUNTERS[FWJUMPS] -= 1;\n }\n }\n\n for($i = 0; $i < count($this->statfiles); $i++){\n\n $filename = $this->statfiles[$i];\n $filehandler = fopen($filename, \"w\");\n if(false){\n $this->Error(ERROR_OUTPUT_FILES, \"Unable to open file {$filename}\");\n }\n \n $statFlag = $this->statFlags[$i];\n\n for($j = 0; $j < count($statFlag); $j++){\n fwrite($filehandler,$this->COUNTERS[$this->FLAGS[$statFlag[$j]]].\"\\n\");\n #fwrite($filehandler,\"\\n\"); \n }\n fclose($filehandler);\n }\n }", "function updateTeams($players, $json) {\n\n\tunset($teams);\n\t$teams = array( 'won' => array(), 'lost' => array() );\n\tforeach ($players as $player) {\n\t\tif ($player['state'] == 'Won') {\n\t\t\tarray_push($teams['won'], $player['id']);\n\t\t} else {\n\t\t\tarray_push($teams['lost'], $player['id']);\n\t\t}\n\t}\n\t\n\t//updateWinnerTeam($teams['won']);\n\tunset($jsonteam);\n\tforeach ($json['teams'] as &$jsonteam) {\n\t\t$foundteam = 0;\n\t\t\n\t\tforeach ($jsonteam['players'] as $jsonplayer) {\n\t\t\tforeach ($teams['won'] as $thisplayer) {\n\t\t\t\tif ($jsonplayer['token'] == $thisplayer) $foundteam++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($foundteam == 3) {\n\t\t\techo 'updating team with win<br>';\n\t\t\t$jsonteam['wins']++;\n\t\t\t$jsonteam['rating']++;\n\t\t\t//$jsonteam['pendinggames']--;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t//updateLosingTeam($teams['lost']);\n\tunset($jsonteam);\n\tforeach ($json['teams'] as &$jsonteam) {\n\t\t$foundteam = 0;\n\t\t\n\t\tforeach ($jsonteam['players'] as $jsonplayer) {\n\t\t\tforeach ($teams['lost'] as $thisplayer) {\n\t\t\t\tif ($jsonplayer['token'] == $thisplayer) $foundteam++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($foundteam == 3) {\n\t\t\techo 'updating team with win<br>';\n\t\t\t$jsonteam['losses']++;\n\t\t\t$jsonteam['rating']--;\n\t\t\t//$jsonteam['pendinggames']--;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn true;\n}", "public function refreshRankedStats($accountId) {\n $summoner = Summoner::where('accountId', $accountId)->firstOrFail();\n $summoner->assignLeagues(true);\n\n return response()->json($summoner->league);\n }", "private function updateGameSession()\n {\n $this->getSession()->set('gameData', $this->getGame()->getGameData());\n }", "public function winloss()\n {\n $sql = '\n SELECT \n t.name,\n ( \n ( SELECT COUNT(*)\n FROM matches m\n WHERE m.match_date_time < CURDATE()\n AND m.team1_id=t.id\n AND m.team1_goalcount > m.team2_goalcount ) +\n ( SELECT COUNT(*)\n FROM matches m\n WHERE m.match_date_time < CURDATE()\n AND m.team2_id=t.id\n AND m.team1_goalcount < m.team2_goalcount ) \n ) wins,\n ( \n ( SELECT COUNT(*)\n FROM matches m\n WHERE m.match_date_time < CURDATE()\n AND m.team1_id=t.id\n AND m.team1_goalcount < m.team2_goalcount ) +\n ( SELECT COUNT(*)\n FROM matches m\n WHERE m.match_date_time < CURDATE()\n AND m.team2_id=t.id\n AND m.team1_goalcount > m.team2_goalcount )\n ) losses\n FROM teams t';\n\n return view( 'winloss', ['matches' => \\DB::select( $sql ) ] );\n }", "public function stats_rom()\n {\n\n //$roms=array('Țigan','Țigan Ungurean', 'Căldărar','Ciurar','Fierar','Inar','Lăieș/Lăieț','Netot','Rudar','Ursar','Vătraş','Zavragiu','Zlătar');\n $roms = $this->roms;\n $data=[];\n //Update stats\n $villages = DB::table('households')\n ->join('villages','households.village_id','=','villages.id')\n ->join('stats','households.id','=','stats.household_id')\n ->select(DB::raw('sum(stats.household_count) as sum, villages.id'))\n ->whereIn('households.nationality',$roms)\n ->groupBy('villages.id')\n ->get();\n\n $village_rom=new SampleChart;\n $api=url('/stats_data_rom');\n //$villages = Village::all()->sortBy(\"village_name\");\n $villages = DB::table('households')\n ->join('villages','households.village_id','=','villages.id')\n ->join('stats','households.id','=','stats.household_id')\n ->select(DB::raw('sum(stats.household_count) as sum, villages.village_name'))\n ->whereIn('households.nationality',$roms)\n ->groupBy('villages.village_name')\n ->get();\n\n //return $villages;\n foreach ($villages as $village) {\n $label[]=$village->village_name;\n }\n $village_rom->labels($label)->load($api);\n\n //General data\n $data['household_records']=Household::count();\n $data['roms']=DB::table('households')\n ->whereIn('households.nationality',$roms)\n ->count();\n //$data['romstotal']=DB::table('village_stats')->sum('village_stats.roms_count');\n $data['romstotal']=DB::table('nations')->sum('total');\n $data['village_records']=Village::count();\n //\n return view('charts/third_open',['village_rom'=>$village_rom], $data);\n\n }", "public function run()\n {\n \\DB::table('stats')->delete();\n\n \\DB::table('stats')->insert(\n [\n 0 => [\n 'id' => 1,\n 'name' => 'Health',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'bonus_health',\n 'created_at' => '2017-02-24 12:00:00',\n 'updated_at' => '2017-03-08 09:33:19',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 1 => [\n 'id' => 2,\n 'name' => 'Health regeneration',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'bonus_health_regen',\n 'created_at' => '2017-02-24 12:00:00',\n 'updated_at' => '2017-02-24 12:00:00',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 2 => [\n 'id' => 3,\n 'name' => 'Damage block (Melee)',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'block_damage_melee',\n 'created_at' => '2017-02-24 12:00:00',\n 'updated_at' => '2017-02-24 12:00:00',\n 'stat_group' => 'block',\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 3 => [\n 'id' => 4,\n 'name' => 'Block chance',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'block_chance',\n 'created_at' => '2017-02-24 12:00:00',\n 'updated_at' => '2017-02-24 12:00:00',\n 'stat_group' => 'block',\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 4 => [\n 'id' => 5,\n 'name' => 'Damage block (Ranged)',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'block_damage_ranged',\n 'created_at' => '2017-02-24 12:00:00',\n 'updated_at' => '2017-02-24 12:00:00',\n 'stat_group' => 'block',\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 5 => [\n 'id' => 6,\n 'name' => 'Bash chance (Melee)',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'bash_chance_melee',\n 'created_at' => '2017-02-24 12:00:00',\n 'updated_at' => '2017-02-24 12:00:00',\n 'stat_group' => 'bash',\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 6 => [\n 'id' => 7,\n 'name' => 'Bash chance (Ranged)',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'bash_chance_ranged',\n 'created_at' => '2017-02-24 12:00:00',\n 'updated_at' => '2017-02-24 12:00:00',\n 'stat_group' => 'bash',\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 7 => [\n 'id' => 8,\n 'name' => 'Bash duration',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'bash_duration',\n 'created_at' => '2017-02-24 12:00:00',\n 'updated_at' => '2017-02-24 12:00:00',\n 'stat_group' => 'bash',\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 8 => [\n 'id' => 9,\n 'name' => 'Bash damage',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'bonus_chance_damage',\n 'created_at' => '2017-02-24 12:00:00',\n 'updated_at' => '2017-02-24 12:00:00',\n 'stat_group' => 'bash',\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 9 => [\n 'id' => 10,\n 'name' => 'Bash cooldown',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'bash_cooldown',\n 'created_at' => '2017-02-24 12:00:00',\n 'updated_at' => '2017-02-24 12:00:00',\n 'stat_group' => 'bash',\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 10 => [\n 'id' => 11,\n 'name' => 'Stun duration',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'stun_duration',\n 'created_at' => '2017-02-24 12:00:00',\n 'updated_at' => '2017-02-24 12:00:00',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 11 => [\n 'id' => 12,\n 'name' => 'Strength',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'bonus_str',\n 'created_at' => '2017-02-24 13:32:17',\n 'updated_at' => '2017-03-03 13:24:23',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 12 => [\n 'id' => 13,\n 'name' => 'Damage',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'bonus_damage',\n 'created_at' => '2017-02-24 13:33:36',\n 'updated_at' => '2017-02-24 13:33:36',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 13 => [\n 'id' => 14,\n 'name' => 'Attack speed',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'bonus_attack_speed',\n 'created_at' => '2017-02-24 15:15:16',\n 'updated_at' => '2017-02-24 15:15:16',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 14 => [\n 'id' => 15,\n 'name' => 'Armor',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'bonus_armor',\n 'created_at' => '2017-02-24 15:15:33',\n 'updated_at' => '2017-02-24 15:15:33',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 15 => [\n 'id' => 16,\n 'name' => 'Unholy damage',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'unholy_bonus_damage',\n 'created_at' => '2017-02-24 15:16:54',\n 'updated_at' => '2017-02-24 15:16:54',\n 'stat_group' => 'unholy',\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 16 => [\n 'id' => 17,\n 'name' => 'Unholy attack speed',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'unholy_bonus_attack_speed',\n 'created_at' => '2017-02-24 15:17:14',\n 'updated_at' => '2017-02-24 15:17:14',\n 'stat_group' => 'unholy',\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 17 => [\n 'id' => 18,\n 'name' => 'unholy strength',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'unholy_bonus_strength',\n 'created_at' => '2017-02-24 15:17:25',\n 'updated_at' => '2017-02-24 15:17:25',\n 'stat_group' => 'unholy',\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 18 => [\n 'id' => 19,\n 'name' => 'Unholy armor',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'unholy_bonus_armor',\n 'created_at' => '2017-02-24 15:17:37',\n 'updated_at' => '2017-02-24 15:17:37',\n 'stat_group' => 'unholy',\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 19 => [\n 'id' => 20,\n 'name' => 'Unholy health drain (tick)',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'unholy_health_drain_per_tick',\n 'created_at' => '2017-02-24 15:18:07',\n 'updated_at' => '2017-02-24 15:18:07',\n 'stat_group' => 'unholy',\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 20 => [\n 'id' => 21,\n 'name' => 'Unholy health drain (second)',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'unholy_health_drain_per_second_tooltip',\n 'created_at' => '2017-02-24 15:18:27',\n 'updated_at' => '2017-02-24 15:18:27',\n 'stat_group' => 'unholy',\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 21 => [\n 'id' => 22,\n 'name' => 'Toggle cooldown',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'toggle_cooldown',\n 'created_at' => '2017-02-24 15:18:46',\n 'updated_at' => '2017-02-24 15:18:46',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 22 => [\n 'id' => 23,\n 'name' => 'Mana',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'bonus_mana',\n 'created_at' => '2017-02-27 17:32:03',\n 'updated_at' => '2017-02-27 17:32:03',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 23 => [\n 'id' => 24,\n 'name' => 'Aoe increase (%)',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'cast_aoe_bonus_percent',\n 'created_at' => '2017-02-27 17:32:42',\n 'updated_at' => '2017-02-27 17:32:42',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 24 => [\n 'id' => 25,\n 'name' => 'Spell amp (%)',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'spell_amp',\n 'created_at' => '2017-02-27 17:33:24',\n 'updated_at' => '2017-02-27 17:33:24',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 25 => [\n 'id' => 26,\n 'name' => 'Cast range',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'cast_range_bonus',\n 'created_at' => '2017-02-27 17:34:51',\n 'updated_at' => '2017-02-27 17:34:51',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 26 => [\n 'id' => 27,\n 'name' => 'Agility',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'bonus_agi',\n 'created_at' => '2017-02-28 16:58:03',\n 'updated_at' => '2017-03-03 13:23:55',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 27 => [\n 'id' => 28,\n 'name' => 'Evasion',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'bonus_evasion',\n 'created_at' => '2017-02-28 16:58:14',\n 'updated_at' => '2017-03-30 07:13:17',\n 'stat_group' => null,\n 'is_percent' => 1,\n 'var_name' => null,\n ],\n 28 => [\n 'id' => 29,\n 'name' => 'Move speed (%)',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'bonus_move_speed',\n 'created_at' => '2017-02-28 16:58:30',\n 'updated_at' => '2017-03-30 07:12:44',\n 'stat_group' => null,\n 'is_percent' => 1,\n 'var_name' => null,\n ],\n 29 => [\n 'id' => 30,\n 'name' => 'Duration',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'duration',\n 'created_at' => '2017-02-28 16:58:41',\n 'updated_at' => '2017-02-28 16:58:41',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 30 => [\n 'id' => 31,\n 'name' => 'Intelligence',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'bonus_int',\n 'created_at' => '2017-03-02 10:39:03',\n 'updated_at' => '2017-03-03 13:24:45',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 31 => [\n 'id' => 32,\n 'name' => 'Movement speed (flat)',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'bonus_movement_speed',\n 'created_at' => '2017-03-02 10:42:05',\n 'updated_at' => '2017-03-02 10:42:05',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 32 => [\n 'id' => 33,\n 'name' => 'Bonus selected attribute',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'bonus_stat',\n 'created_at' => '2017-03-02 10:45:33',\n 'updated_at' => '2017-03-02 10:45:33',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 33 => [\n 'id' => 34,\n 'name' => 'Cleave radius',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'cleave_radius',\n 'created_at' => '2017-03-02 10:53:37',\n 'updated_at' => '2017-03-02 10:53:37',\n 'stat_group' => 'cleave',\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 34 => [\n 'id' => 35,\n 'name' => 'Cleave damage (%)',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'cleave_damage_percent',\n 'created_at' => '2017-03-02 10:53:57',\n 'updated_at' => '2017-03-02 10:53:57',\n 'stat_group' => 'cleave',\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 35 => [\n 'id' => 36,\n 'name' => 'Cleave width (start)',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'cleave_starting_width',\n 'created_at' => '2017-03-02 10:56:45',\n 'updated_at' => '2017-03-02 10:56:45',\n 'stat_group' => 'cleave',\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 36 => [\n 'id' => 37,\n 'name' => 'Cleave width (end)',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'cleave_ending_width',\n 'created_at' => '2017-03-02 10:57:02',\n 'updated_at' => '2017-03-02 10:57:02',\n 'stat_group' => 'cleave',\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 37 => [\n 'id' => 38,\n 'name' => 'Cleave distance',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'cleave_distance',\n 'created_at' => '2017-03-02 10:57:18',\n 'updated_at' => '2017-03-02 10:57:18',\n 'stat_group' => 'cleave',\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 38 => [\n 'id' => 39,\n 'name' => 'Mana regen',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'bonus_mana_regen',\n 'created_at' => '2017-03-02 16:14:26',\n 'updated_at' => '2017-03-02 16:14:26',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 39 => [\n 'id' => 40,\n 'name' => 'Max Charges',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'max_charges',\n 'created_at' => '2017-03-08 09:01:05',\n 'updated_at' => '2017-03-08 09:35:05',\n 'stat_group' => 'stick',\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 40 => [\n 'id' => 41,\n 'name' => 'Charge radius',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'charge_radius',\n 'created_at' => '2017-03-08 09:01:23',\n 'updated_at' => '2017-03-08 09:35:10',\n 'stat_group' => 'stick',\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 41 => [\n 'id' => 42,\n 'name' => 'Restore Hp/Mp per charge',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'restore_per_charge',\n 'created_at' => '2017-03-08 09:01:51',\n 'updated_at' => '2017-03-08 09:35:13',\n 'stat_group' => 'stick',\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 42 => [\n 'id' => 43,\n 'name' => 'Charge decay',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'charge_decay_time',\n 'created_at' => '2017-03-08 09:04:35',\n 'updated_at' => '2017-03-08 09:35:26',\n 'stat_group' => 'charge_bkb',\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 43 => [\n 'id' => 44,\n 'name' => 'Immunity per charge',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'immunity_time_per_charge',\n 'created_at' => '2017-03-08 09:04:54',\n 'updated_at' => '2017-03-08 09:35:30',\n 'stat_group' => 'charge_bkb',\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 44 => [\n 'id' => 45,\n 'name' => 'Aura health regen',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'aura_health_regen',\n 'created_at' => '2017-03-13 07:36:15',\n 'updated_at' => '2017-03-13 07:36:15',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 45 => [\n 'id' => 46,\n 'name' => 'Aura health regen (bonus)',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'aura_health_regen_bonus',\n 'created_at' => '2017-03-13 07:36:40',\n 'updated_at' => '2017-03-13 07:36:40',\n 'stat_group' => 'gg',\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 46 => [\n 'id' => 47,\n 'name' => 'Aura bonus threshold',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'aura_bonus_threshold',\n 'created_at' => '2017-03-13 07:37:04',\n 'updated_at' => '2017-03-13 07:37:04',\n 'stat_group' => 'gg',\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 47 => [\n 'id' => 48,\n 'name' => 'Aura radius',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'aura_radius',\n 'created_at' => '2017-03-13 07:37:16',\n 'updated_at' => '2017-03-13 07:37:16',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 48 => [\n 'id' => 49,\n 'name' => 'Replenish health',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'replenish_health',\n 'created_at' => '2017-03-13 07:37:35',\n 'updated_at' => '2017-03-13 07:37:35',\n 'stat_group' => 'gg',\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 49 => [\n 'id' => 50,\n 'name' => 'Replenish mana',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'replenish_mana',\n 'created_at' => '2017-03-13 07:37:46',\n 'updated_at' => '2017-03-13 07:37:46',\n 'stat_group' => 'gg',\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 50 => [\n 'id' => 51,\n 'name' => 'Mana restored per creep',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'mana_restore_per_creep',\n 'created_at' => '2017-03-13 07:39:07',\n 'updated_at' => '2017-03-13 07:39:07',\n 'stat_group' => 'gg',\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 51 => [\n 'id' => 52,\n 'name' => 'Aura armor',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'aura_armor',\n 'created_at' => '2017-03-13 07:40:28',\n 'updated_at' => '2017-03-13 07:40:28',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 52 => [\n 'id' => 53,\n 'name' => 'Aura armor (bonus)',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'aura_armor_bonus',\n 'created_at' => '2017-03-13 07:40:41',\n 'updated_at' => '2017-03-13 07:40:41',\n 'stat_group' => 'gg',\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 53 => [\n 'id' => 54,\n 'name' => 'Spell damage (flat)',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'spell_damage',\n 'created_at' => '2017-03-13 07:59:18',\n 'updated_at' => '2017-03-13 07:59:18',\n 'stat_group' => 'gg',\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 54 => [\n 'id' => 55,\n 'name' => 'Block chance (Hero)',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'block_chance_hero',\n 'created_at' => '2017-03-17 15:37:10',\n 'updated_at' => '2017-03-17 15:37:10',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 55 => [\n 'id' => 56,\n 'name' => 'BonusIntellect',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'bonus_intellect',\n 'created_at' => '2018-01-24 15:26:31',\n 'updated_at' => '2018-01-24 15:26:31',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 56 => [\n 'id' => 57,\n 'name' => 'AlliedCycloneDuration',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'allied_cyclone_duration',\n 'created_at' => '2018-01-24 15:26:31',\n 'updated_at' => '2018-01-24 15:26:31',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 57 => [\n 'id' => 58,\n 'name' => 'CastRangeTooltip',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'cast_range_tooltip',\n 'created_at' => '2018-01-24 15:26:31',\n 'updated_at' => '2018-01-24 15:26:31',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 58 => [\n 'id' => 59,\n 'name' => 'Radius',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'radius',\n 'created_at' => '2018-01-24 15:26:31',\n 'updated_at' => '2018-01-24 15:26:31',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 59 => [\n 'id' => 60,\n 'name' => 'AuraStickiness',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'aura_stickiness',\n 'created_at' => '2018-01-24 15:26:31',\n 'updated_at' => '2018-01-24 15:26:31',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 60 => [\n 'id' => 61,\n 'name' => 'SangromancySpellAmp',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'sangromancy_spell_amp',\n 'created_at' => '2018-01-24 15:26:31',\n 'updated_at' => '2018-01-24 15:26:31',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 61 => [\n 'id' => 62,\n 'name' => 'SangromancySelfDamage',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'sangromancy_self_damage',\n 'created_at' => '2018-01-24 15:26:31',\n 'updated_at' => '2018-01-24 15:26:31',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 62 => [\n 'id' => 63,\n 'name' => 'TickInterval',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'tick_interval',\n 'created_at' => '2018-01-24 15:26:31',\n 'updated_at' => '2018-01-24 15:26:31',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 63 => [\n 'id' => 64,\n 'name' => 'BonusStrength',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'bonus_strength',\n 'created_at' => '2018-01-24 15:26:32',\n 'updated_at' => '2018-01-24 15:26:32',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 64 => [\n 'id' => 65,\n 'name' => 'RevealRadius',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'reveal_radius',\n 'created_at' => '2018-01-24 15:26:32',\n 'updated_at' => '2018-01-24 15:26:32',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 65 => [\n 'id' => 66,\n 'name' => 'RevealDuration',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'reveal_duration',\n 'created_at' => '2018-01-24 15:26:32',\n 'updated_at' => '2018-01-24 15:26:32',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 66 => [\n 'id' => 67,\n 'name' => 'BonusAgility',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'bonus_agility',\n 'created_at' => '2018-01-24 15:26:32',\n 'updated_at' => '2018-01-24 15:26:32',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 67 => [\n 'id' => 68,\n 'name' => 'BaseAttackRange',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'base_attack_range',\n 'created_at' => '2018-01-24 15:26:32',\n 'updated_at' => '2018-01-24 15:26:32',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 68 => [\n 'id' => 69,\n 'name' => 'GiantAttackRange',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'giant_attack_range',\n 'created_at' => '2018-01-24 15:26:32',\n 'updated_at' => '2018-01-24 15:26:32',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 69 => [\n 'id' => 70,\n 'name' => 'GiantDamageBonus',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'giant_damage_bonus',\n 'created_at' => '2018-01-24 15:26:32',\n 'updated_at' => '2018-01-24 15:26:32',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 70 => [\n 'id' => 71,\n 'name' => 'GiantAttackRate',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'giant_attack_rate',\n 'created_at' => '2018-01-24 15:26:32',\n 'updated_at' => '2018-01-24 15:26:32',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 71 => [\n 'id' => 72,\n 'name' => 'GiantCastRange',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'giant_cast_range',\n 'created_at' => '2018-01-24 15:26:32',\n 'updated_at' => '2018-01-24 15:26:32',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 72 => [\n 'id' => 73,\n 'name' => 'GiantAoe',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'giant_aoe',\n 'created_at' => '2018-01-24 15:26:32',\n 'updated_at' => '2018-01-24 15:26:32',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 73 => [\n 'id' => 74,\n 'name' => 'GiantSplash',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'giant_splash',\n 'created_at' => '2018-01-24 15:26:32',\n 'updated_at' => '2018-01-24 15:26:32',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 74 => [\n 'id' => 75,\n 'name' => 'MeleeMoveSpeed',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'melee_move_speed',\n 'created_at' => '2018-01-24 15:26:32',\n 'updated_at' => '2018-01-24 15:26:32',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 75 => [\n 'id' => 76,\n 'name' => 'GiantScale',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'giant_scale',\n 'created_at' => '2018-01-24 15:26:32',\n 'updated_at' => '2018-01-24 15:26:32',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 76 => [\n 'id' => 77,\n 'name' => 'TransplantCooldown',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'transplant_cooldown',\n 'created_at' => '2018-01-24 15:26:32',\n 'updated_at' => '2018-01-24 15:26:32',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 77 => [\n 'id' => 78,\n 'name' => 'TransplantRangeTooltip',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'transplant_range_tooltip',\n 'created_at' => '2018-01-24 15:26:32',\n 'updated_at' => '2018-01-24 15:26:32',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 78 => [\n 'id' => 79,\n 'name' => 'HealthRegenRate',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'health_regen_rate',\n 'created_at' => '2018-01-24 15:26:32',\n 'updated_at' => '2018-01-24 15:26:32',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 79 => [\n 'id' => 80,\n 'name' => 'CooldownMelee',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'cooldown_melee',\n 'created_at' => '2018-01-24 15:26:32',\n 'updated_at' => '2018-01-24 15:26:32',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 80 => [\n 'id' => 81,\n 'name' => 'CooldownRangedTooltip',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'cooldown_ranged_tooltip',\n 'created_at' => '2018-01-24 15:26:32',\n 'updated_at' => '2018-01-24 15:26:32',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 81 => [\n 'id' => 82,\n 'name' => 'HealthRestore',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'health_restore',\n 'created_at' => '2018-01-24 15:26:32',\n 'updated_at' => '2018-01-24 15:26:32',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 82 => [\n 'id' => 83,\n 'name' => 'ManaRestore',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'mana_restore',\n 'created_at' => '2018-01-24 15:26:32',\n 'updated_at' => '2018-01-24 15:26:32',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 83 => [\n 'id' => 84,\n 'name' => 'RestoreTime',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'restore_time',\n 'created_at' => '2018-01-24 15:26:32',\n 'updated_at' => '2018-01-24 15:26:32',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 84 => [\n 'id' => 85,\n 'name' => 'RegenBonus',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'regen_bonus',\n 'created_at' => '2018-01-24 15:26:32',\n 'updated_at' => '2018-01-24 15:26:32',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 85 => [\n 'id' => 86,\n 'name' => 'SpeedBonus',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'speed_bonus',\n 'created_at' => '2018-01-24 15:26:32',\n 'updated_at' => '2018-01-24 15:26:32',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 86 => [\n 'id' => 87,\n 'name' => 'HealsPerSec',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'heals_per_sec',\n 'created_at' => '2018-01-24 15:26:32',\n 'updated_at' => '2018-01-24 15:26:32',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 87 => [\n 'id' => 88,\n 'name' => 'MartyrDuration',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'martyr_duration',\n 'created_at' => '2018-01-24 15:26:32',\n 'updated_at' => '2018-01-24 15:26:32',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 88 => [\n 'id' => 89,\n 'name' => 'MartyrHealAoe',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'martyr_heal_aoe',\n 'created_at' => '2018-01-24 15:26:32',\n 'updated_at' => '2018-01-24 15:26:32',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 89 => [\n 'id' => 90,\n 'name' => 'MartyrHealPercent',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'martyr_heal_percent',\n 'created_at' => '2018-01-24 15:26:32',\n 'updated_at' => '2018-01-24 15:26:32',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 90 => [\n 'id' => 91,\n 'name' => 'Speed',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'speed',\n 'created_at' => '2018-01-24 15:30:24',\n 'updated_at' => '2018-01-24 15:30:24',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 91 => [\n 'id' => 92,\n 'name' => 'TooltipRange',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'tooltip_range',\n 'created_at' => '2018-01-24 15:30:24',\n 'updated_at' => '2018-01-24 15:30:24',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 92 => [\n 'id' => 93,\n 'name' => 'BonusAllStats',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'bonus_all_stats',\n 'created_at' => '2018-01-24 15:36:10',\n 'updated_at' => '2018-01-24 15:36:10',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 93 => [\n 'id' => 94,\n 'name' => 'DamageReduction',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'damage_reduction',\n 'created_at' => '2018-01-24 15:36:10',\n 'updated_at' => '2018-01-24 15:36:10',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 94 => [\n 'id' => 95,\n 'name' => 'DamageAsHealing',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'damage_as_healing',\n 'created_at' => '2018-01-24 15:36:10',\n 'updated_at' => '2018-01-24 15:36:10',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 95 => [\n 'id' => 96,\n 'name' => 'BonusIntelligence',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'bonus_intelligence',\n 'created_at' => '2018-01-24 15:36:10',\n 'updated_at' => '2018-01-24 15:36:10',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 96 => [\n 'id' => 97,\n 'name' => 'BonusCooldown',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'bonus_cooldown',\n 'created_at' => '2018-01-24 15:36:10',\n 'updated_at' => '2018-01-24 15:36:10',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 97 => [\n 'id' => 98,\n 'name' => 'HeroLifesteal',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'hero_lifesteal',\n 'created_at' => '2018-01-24 15:36:10',\n 'updated_at' => '2018-01-24 15:36:10',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 98 => [\n 'id' => 99,\n 'name' => 'CreepLifesteal',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'creep_lifesteal',\n 'created_at' => '2018-01-24 15:36:10',\n 'updated_at' => '2018-01-24 15:36:10',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 99 => [\n 'id' => 100,\n 'name' => 'ActiveHealthRegen',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'active_health_regen',\n 'created_at' => '2018-01-24 15:36:11',\n 'updated_at' => '2018-01-24 15:36:11',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 100 => [\n 'id' => 101,\n 'name' => 'LifestealPercent',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'lifesteal_percent',\n 'created_at' => '2018-01-24 15:36:11',\n 'updated_at' => '2018-01-24 15:36:11',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 101 => [\n 'id' => 102,\n 'name' => 'UnholyLifestealPercent',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'unholy_lifesteal_percent',\n 'created_at' => '2018-01-24 15:36:11',\n 'updated_at' => '2018-01-24 15:36:11',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 102 => [\n 'id' => 103,\n 'name' => 'UnholyLifestealTotalTooltip',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'unholy_lifesteal_total_tooltip',\n 'created_at' => '2018-01-24 15:36:11',\n 'updated_at' => '2018-01-24 15:36:11',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 103 => [\n 'id' => 104,\n 'name' => 'UnholyDuration',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'unholy_duration',\n 'created_at' => '2018-01-24 15:36:11',\n 'updated_at' => '2018-01-24 15:36:11',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 104 => [\n 'id' => 105,\n 'name' => 'HeroSpellstealUnholy',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'hero_spellsteal_unholy',\n 'created_at' => '2018-01-24 15:36:11',\n 'updated_at' => '2018-01-24 15:36:11',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 105 => [\n 'id' => 106,\n 'name' => 'CreepSpellstealUnholy',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'creep_spellsteal_unholy',\n 'created_at' => '2018-01-24 15:36:11',\n 'updated_at' => '2018-01-24 15:36:11',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 106 => [\n 'id' => 107,\n 'name' => 'BonusMagicalArmor',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'bonus_magical_armor',\n 'created_at' => '2018-01-24 15:36:11',\n 'updated_at' => '2018-01-24 15:36:11',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 107 => [\n 'id' => 108,\n 'name' => 'ExtraSpellDamagePercent',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'extra_spell_damage_percent',\n 'created_at' => '2018-01-24 15:36:11',\n 'updated_at' => '2018-01-24 15:36:11',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 108 => [\n 'id' => 109,\n 'name' => 'FadeDelay',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'fade_delay',\n 'created_at' => '2018-01-24 15:36:11',\n 'updated_at' => '2018-01-24 15:36:11',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 109 => [\n 'id' => 110,\n 'name' => 'ActiveMagicalArmor',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'active_magical_armor',\n 'created_at' => '2018-01-24 15:36:11',\n 'updated_at' => '2018-01-24 15:36:11',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 110 => [\n 'id' => 111,\n 'name' => 'StoneMoveSpeed',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'stone_move_speed',\n 'created_at' => '2018-01-24 15:36:11',\n 'updated_at' => '2018-01-24 15:36:11',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 111 => [\n 'id' => 112,\n 'name' => 'StoneArmor',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'stone_armor',\n 'created_at' => '2018-01-24 15:36:11',\n 'updated_at' => '2018-01-24 15:36:11',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 112 => [\n 'id' => 113,\n 'name' => 'StoneResist',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'stone_resist',\n 'created_at' => '2018-01-24 15:36:11',\n 'updated_at' => '2018-01-24 15:36:11',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 113 => [\n 'id' => 114,\n 'name' => 'HealPreventPercent',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'heal_prevent_percent',\n 'created_at' => '2018-01-24 15:37:50',\n 'updated_at' => '2018-01-24 15:37:50',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 114 => [\n 'id' => 115,\n 'name' => 'HealPreventDuration',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'heal_prevent_duration',\n 'created_at' => '2018-01-24 15:37:50',\n 'updated_at' => '2018-01-24 15:37:50',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 115 => [\n 'id' => 116,\n 'name' => 'ManaRegen',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'mana_regen',\n 'created_at' => '2018-01-24 15:37:50',\n 'updated_at' => '2018-01-24 15:37:50',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 116 => [\n 'id' => 117,\n 'name' => 'SoulDamageInterval',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'soul_damage_interval',\n 'created_at' => '2018-01-24 15:37:50',\n 'updated_at' => '2018-01-24 15:37:50',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 117 => [\n 'id' => 118,\n 'name' => 'SoulHealAmount',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'soul_heal_amount',\n 'created_at' => '2018-01-24 15:37:50',\n 'updated_at' => '2018-01-24 15:37:50',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 118 => [\n 'id' => 119,\n 'name' => 'SoulDamageAmount',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'soul_damage_amount',\n 'created_at' => '2018-01-24 15:37:50',\n 'updated_at' => '2018-01-24 15:37:50',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 119 => [\n 'id' => 120,\n 'name' => 'SoulHealDuration',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'soul_heal_duration',\n 'created_at' => '2018-01-24 15:37:50',\n 'updated_at' => '2018-01-24 15:37:50',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 120 => [\n 'id' => 121,\n 'name' => 'SoulDamageDuration',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'soul_damage_duration',\n 'created_at' => '2018-01-24 15:37:50',\n 'updated_at' => '2018-01-24 15:37:50',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 121 => [\n 'id' => 122,\n 'name' => 'SoulReleaseRadius',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'soul_release_radius',\n 'created_at' => '2018-01-24 15:37:50',\n 'updated_at' => '2018-01-24 15:37:50',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 122 => [\n 'id' => 123,\n 'name' => 'ActiveLifestealPercent',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'active_lifesteal_percent',\n 'created_at' => '2018-01-24 15:37:50',\n 'updated_at' => '2018-01-24 15:37:50',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 123 => [\n 'id' => 124,\n 'name' => 'DamagePerSecondPct',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'damage_per_second_pct',\n 'created_at' => '2018-01-24 15:37:50',\n 'updated_at' => '2018-01-24 15:37:50',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 124 => [\n 'id' => 125,\n 'name' => 'TicksPerSecond',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'ticks_per_second',\n 'created_at' => '2018-01-24 15:37:50',\n 'updated_at' => '2018-01-24 15:37:50',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 125 => [\n 'id' => 126,\n 'name' => 'BonusAuraMovementSpeed',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'bonus_aura_movement_speed',\n 'created_at' => '2018-01-24 15:38:11',\n 'updated_at' => '2018-01-24 15:38:11',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 126 => [\n 'id' => 127,\n 'name' => 'BonusAttackSpeedPct',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'bonus_attack_speed_pct',\n 'created_at' => '2018-01-24 15:38:11',\n 'updated_at' => '2018-01-24 15:38:11',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 127 => [\n 'id' => 128,\n 'name' => 'BonusMovementSpeedPct',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'bonus_movement_speed_pct',\n 'created_at' => '2018-01-24 15:38:11',\n 'updated_at' => '2018-01-24 15:38:11',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 128 => [\n 'id' => 129,\n 'name' => 'AuraAttackSpeed',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'aura_attack_speed',\n 'created_at' => '2018-01-24 15:38:11',\n 'updated_at' => '2018-01-24 15:38:11',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 129 => [\n 'id' => 130,\n 'name' => 'AuraPositiveArmor',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'aura_positive_armor',\n 'created_at' => '2018-01-24 15:38:11',\n 'updated_at' => '2018-01-24 15:38:11',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 130 => [\n 'id' => 131,\n 'name' => 'AuraNegativeArmor',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'aura_negative_armor',\n 'created_at' => '2018-01-24 15:38:11',\n 'updated_at' => '2018-01-24 15:38:11',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 131 => [\n 'id' => 132,\n 'name' => 'QuellingBonus',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'quelling_bonus',\n 'created_at' => '2018-01-24 15:38:11',\n 'updated_at' => '2018-01-24 15:38:11',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 132 => [\n 'id' => 133,\n 'name' => 'QuellingBonusRanged',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'quelling_bonus_ranged',\n 'created_at' => '2018-01-24 15:38:11',\n 'updated_at' => '2018-01-24 15:38:11',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 133 => [\n 'id' => 134,\n 'name' => 'CastRangeWard',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'cast_range_ward',\n 'created_at' => '2018-01-24 15:38:12',\n 'updated_at' => '2018-01-24 15:38:12',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 134 => [\n 'id' => 135,\n 'name' => 'TooltipQuellingBonus',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'tooltip_quelling_bonus',\n 'created_at' => '2018-01-24 15:38:12',\n 'updated_at' => '2018-01-24 15:38:12',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 135 => [\n 'id' => 136,\n 'name' => 'TooltipQuellingBonusRanged',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'tooltip_quelling_bonus_ranged',\n 'created_at' => '2018-01-24 15:38:12',\n 'updated_at' => '2018-01-24 15:38:12',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 136 => [\n 'id' => 137,\n 'name' => 'BlinkRange',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'blink_range',\n 'created_at' => '2018-01-24 15:38:12',\n 'updated_at' => '2018-01-24 15:38:12',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 137 => [\n 'id' => 138,\n 'name' => 'BlinkDamageCooldown',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'blink_damage_cooldown',\n 'created_at' => '2018-01-24 15:38:12',\n 'updated_at' => '2018-01-24 15:38:12',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 138 => [\n 'id' => 139,\n 'name' => 'BlinkRangeClamp',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'blink_range_clamp',\n 'created_at' => '2018-01-24 15:38:12',\n 'updated_at' => '2018-01-24 15:38:12',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 139 => [\n 'id' => 140,\n 'name' => 'CritChance',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'crit_chance',\n 'created_at' => '2018-01-24 15:38:12',\n 'updated_at' => '2018-01-24 15:38:12',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 140 => [\n 'id' => 141,\n 'name' => 'CritMultiplier',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'crit_multiplier',\n 'created_at' => '2018-01-24 15:38:12',\n 'updated_at' => '2018-01-24 15:38:12',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 141 => [\n 'id' => 142,\n 'name' => 'SilenceDamagePercent',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'silence_damage_percent',\n 'created_at' => '2018-01-24 15:38:12',\n 'updated_at' => '2018-01-24 15:38:12',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 142 => [\n 'id' => 143,\n 'name' => 'SilenceDuration',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'silence_duration',\n 'created_at' => '2018-01-24 15:38:12',\n 'updated_at' => '2018-01-24 15:38:12',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 143 => [\n 'id' => 144,\n 'name' => 'TargetCritMultiplier',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'target_crit_multiplier',\n 'created_at' => '2018-01-24 15:38:12',\n 'updated_at' => '2018-01-24 15:38:12',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 144 => [\n 'id' => 145,\n 'name' => 'TooltipCritChance',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'tooltip_crit_chance',\n 'created_at' => '2018-01-24 15:38:12',\n 'updated_at' => '2018-01-24 15:38:12',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 145 => [\n 'id' => 146,\n 'name' => 'BuffDuration',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'buff_duration',\n 'created_at' => '2018-01-24 15:38:12',\n 'updated_at' => '2018-01-24 15:38:12',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 146 => [\n 'id' => 147,\n 'name' => 'RangeTooltip',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'range_tooltip',\n 'created_at' => '2018-01-24 15:38:12',\n 'updated_at' => '2018-01-24 15:38:12',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 147 => [\n 'id' => 148,\n 'name' => 'TooltipResist',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'tooltip_resist',\n 'created_at' => '2018-01-24 15:38:12',\n 'updated_at' => '2018-01-24 15:38:12',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 148 => [\n 'id' => 149,\n 'name' => 'BonusAoeArmor',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'bonus_aoe_armor',\n 'created_at' => '2018-01-24 15:38:12',\n 'updated_at' => '2018-01-24 15:38:12',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 149 => [\n 'id' => 150,\n 'name' => 'BonusAoeRadius',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'bonus_aoe_radius',\n 'created_at' => '2018-01-24 15:38:12',\n 'updated_at' => '2018-01-24 15:38:12',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 150 => [\n 'id' => 151,\n 'name' => 'BlockDamageMeleeActive',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'block_damage_melee_active',\n 'created_at' => '2018-01-24 15:38:12',\n 'updated_at' => '2018-01-24 15:38:12',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 151 => [\n 'id' => 152,\n 'name' => 'BlockDamageRangedActive',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'block_damage_ranged_active',\n 'created_at' => '2018-01-24 15:38:12',\n 'updated_at' => '2018-01-24 15:38:12',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 152 => [\n 'id' => 153,\n 'name' => 'BlockChanceActive',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'block_chance_active',\n 'created_at' => '2018-01-24 15:38:12',\n 'updated_at' => '2018-01-24 15:38:12',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 153 => [\n 'id' => 154,\n 'name' => 'TooltipReapplyTime',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'tooltip_reapply_time',\n 'created_at' => '2018-01-24 15:38:12',\n 'updated_at' => '2018-01-24 15:38:12',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 154 => [\n 'id' => 155,\n 'name' => 'CycloneDuration',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'cyclone_duration',\n 'created_at' => '2018-01-24 15:38:12',\n 'updated_at' => '2018-01-24 15:38:12',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 155 => [\n 'id' => 156,\n 'name' => 'TooltipDropDamage',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'tooltip_drop_damage',\n 'created_at' => '2018-01-24 15:38:12',\n 'updated_at' => '2018-01-24 15:38:12',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 156 => [\n 'id' => 157,\n 'name' => 'Damage',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'damage',\n 'created_at' => '2018-01-24 15:38:12',\n 'updated_at' => '2018-01-24 15:38:12',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 157 => [\n 'id' => 158,\n 'name' => 'DamageDelay',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'damage_delay',\n 'created_at' => '2018-01-24 15:38:12',\n 'updated_at' => '2018-01-24 15:38:12',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 158 => [\n 'id' => 159,\n 'name' => 'ManaCostTooltip',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'mana_cost_tooltip',\n 'created_at' => '2018-01-24 15:38:12',\n 'updated_at' => '2018-01-24 15:38:12',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 159 => [\n 'id' => 160,\n 'name' => 'CorruptionArmor',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'corruption_armor',\n 'created_at' => '2018-01-24 15:38:12',\n 'updated_at' => '2018-01-24 15:38:12',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 160 => [\n 'id' => 161,\n 'name' => 'CorruptionDuration',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'corruption_duration',\n 'created_at' => '2018-01-24 15:38:12',\n 'updated_at' => '2018-01-24 15:38:12',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 161 => [\n 'id' => 162,\n 'name' => 'HealthThresholdPct',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'health_threshold_pct',\n 'created_at' => '2018-01-24 15:41:13',\n 'updated_at' => '2018-01-24 15:41:13',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 162 => [\n 'id' => 163,\n 'name' => 'StatusResistance',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'status_resistance',\n 'created_at' => '2018-01-24 15:41:13',\n 'updated_at' => '2018-01-24 15:41:13',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 163 => [\n 'id' => 164,\n 'name' => 'DamageRadius',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'damage_radius',\n 'created_at' => '2018-01-24 15:41:13',\n 'updated_at' => '2018-01-24 15:41:13',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 164 => [\n 'id' => 165,\n 'name' => 'DamageAmount',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'damage_amount',\n 'created_at' => '2018-01-24 15:41:13',\n 'updated_at' => '2018-01-24 15:41:13',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 165 => [\n 'id' => 166,\n 'name' => 'MagicResistance',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'magic_resistance',\n 'created_at' => '2018-01-24 15:41:14',\n 'updated_at' => '2018-01-24 15:41:14',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 166 => [\n 'id' => 167,\n 'name' => 'MagicDamageBlockAura',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'magic_damage_block_aura',\n 'created_at' => '2018-01-24 15:41:14',\n 'updated_at' => '2018-01-24 15:41:14',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 167 => [\n 'id' => 168,\n 'name' => 'MagicDamageThreshold',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'magic_damage_threshold',\n 'created_at' => '2018-01-24 15:41:14',\n 'updated_at' => '2018-01-24 15:41:14',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 168 => [\n 'id' => 169,\n 'name' => 'BlockDamageMeleeAura',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'block_damage_melee_aura',\n 'created_at' => '2018-01-24 15:41:14',\n 'updated_at' => '2018-01-24 15:41:14',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 169 => [\n 'id' => 170,\n 'name' => 'BlockDamageRangedAura',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'block_damage_ranged_aura',\n 'created_at' => '2018-01-24 15:41:14',\n 'updated_at' => '2018-01-24 15:41:14',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 170 => [\n 'id' => 171,\n 'name' => 'BlockChanceAura',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'block_chance_aura',\n 'created_at' => '2018-01-24 15:41:14',\n 'updated_at' => '2018-01-24 15:41:14',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 171 => [\n 'id' => 172,\n 'name' => 'ThresholdCooldown',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'threshold_cooldown',\n 'created_at' => '2018-01-24 15:41:14',\n 'updated_at' => '2018-01-24 15:41:14',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 172 => [\n 'id' => 173,\n 'name' => 'MagicResistanceAura',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'magic_resistance_aura',\n 'created_at' => '2018-01-24 15:41:14',\n 'updated_at' => '2018-01-24 15:41:14',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 173 => [\n 'id' => 174,\n 'name' => 'PushLength',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'push_length',\n 'created_at' => '2018-01-24 15:41:15',\n 'updated_at' => '2018-01-24 15:41:15',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 174 => [\n 'id' => 175,\n 'name' => 'InvincibilityWindow',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'invincibility_window',\n 'created_at' => '2018-01-24 15:41:15',\n 'updated_at' => '2018-01-24 15:41:15',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 175 => [\n 'id' => 176,\n 'name' => 'InvincibilityDelay',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'invincibility_delay',\n 'created_at' => '2018-01-24 15:41:15',\n 'updated_at' => '2018-01-24 15:41:15',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 176 => [\n 'id' => 177,\n 'name' => 'ManacostReduction',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'manacost_reduction',\n 'created_at' => '2018-01-24 15:41:17',\n 'updated_at' => '2018-01-24 15:41:17',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 177 => [\n 'id' => 178,\n 'name' => 'BurnDpsBoss',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'burn_dps_boss',\n 'created_at' => '2018-01-24 15:41:17',\n 'updated_at' => '2018-01-24 15:41:17',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 178 => [\n 'id' => 179,\n 'name' => 'BurnDps',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'burn_dps',\n 'created_at' => '2018-01-24 15:41:17',\n 'updated_at' => '2018-01-24 15:41:17',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 179 => [\n 'id' => 180,\n 'name' => 'BurnDuration',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'burn_duration',\n 'created_at' => '2018-01-24 15:41:17',\n 'updated_at' => '2018-01-24 15:41:17',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 180 => [\n 'id' => 181,\n 'name' => 'BurnInterval',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'burn_interval',\n 'created_at' => '2018-01-24 15:41:17',\n 'updated_at' => '2018-01-24 15:41:17',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 181 => [\n 'id' => 182,\n 'name' => 'LandTime',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'land_time',\n 'created_at' => '2018-01-24 15:41:17',\n 'updated_at' => '2018-01-24 15:41:17',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 182 => [\n 'id' => 183,\n 'name' => 'ImpactRadius',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'impact_radius',\n 'created_at' => '2018-01-24 15:41:17',\n 'updated_at' => '2018-01-24 15:41:17',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 183 => [\n 'id' => 184,\n 'name' => 'MaxDuration',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'max_duration',\n 'created_at' => '2018-01-24 15:41:17',\n 'updated_at' => '2018-01-24 15:41:17',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 184 => [\n 'id' => 185,\n 'name' => 'ImpactDamageBoss',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'impact_damage_boss',\n 'created_at' => '2018-01-24 15:41:17',\n 'updated_at' => '2018-01-24 15:41:17',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 185 => [\n 'id' => 186,\n 'name' => 'ImpactDamage',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'impact_damage',\n 'created_at' => '2018-01-24 15:41:18',\n 'updated_at' => '2018-01-24 15:41:18',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 186 => [\n 'id' => 187,\n 'name' => 'BonusRegen',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'bonus_regen',\n 'created_at' => '2018-01-24 15:41:18',\n 'updated_at' => '2018-01-24 15:41:18',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 187 => [\n 'id' => 188,\n 'name' => 'MuteDuration',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'mute_duration',\n 'created_at' => '2018-01-24 15:41:18',\n 'updated_at' => '2018-01-24 15:41:18',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 188 => [\n 'id' => 189,\n 'name' => 'ProjectileSpeed',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'projectile_speed',\n 'created_at' => '2018-01-24 15:41:18',\n 'updated_at' => '2018-01-24 15:41:18',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 189 => [\n 'id' => 190,\n 'name' => 'SlowPct',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'slow_pct',\n 'created_at' => '2018-01-24 15:41:18',\n 'updated_at' => '2018-01-24 15:41:18',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 190 => [\n 'id' => 191,\n 'name' => 'SlowIntervalDuration',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'slow_interval_duration',\n 'created_at' => '2018-01-24 15:41:18',\n 'updated_at' => '2018-01-24 15:41:18',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 191 => [\n 'id' => 192,\n 'name' => 'SoulRadius',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'soul_radius',\n 'created_at' => '2018-01-24 15:41:20',\n 'updated_at' => '2018-01-24 15:41:20',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 192 => [\n 'id' => 193,\n 'name' => 'SoulInitialCharge',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'soul_initial_charge',\n 'created_at' => '2018-01-24 15:41:20',\n 'updated_at' => '2018-01-24 15:41:20',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 193 => [\n 'id' => 194,\n 'name' => 'SoulAdditionalCharges',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'soul_additional_charges',\n 'created_at' => '2018-01-24 15:41:20',\n 'updated_at' => '2018-01-24 15:41:20',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 194 => [\n 'id' => 195,\n 'name' => 'SoulReleaseRangeTooltip',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'soul_release_range_tooltip',\n 'created_at' => '2018-01-24 15:41:20',\n 'updated_at' => '2018-01-24 15:41:20',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 195 => [\n 'id' => 196,\n 'name' => 'HpRegenReductionEnemy',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'hp_regen_reduction_enemy',\n 'created_at' => '2018-01-24 15:41:20',\n 'updated_at' => '2018-01-24 15:41:20',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 196 => [\n 'id' => 197,\n 'name' => 'HpRegenIncreaseAllies',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'hp_regen_increase_allies',\n 'created_at' => '2018-01-24 15:41:20',\n 'updated_at' => '2018-01-24 15:41:20',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 197 => [\n 'id' => 198,\n 'name' => 'EnemyHpDrain',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'enemy_hp_drain',\n 'created_at' => '2018-01-24 15:41:20',\n 'updated_at' => '2018-01-24 15:41:20',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 198 => [\n 'id' => 199,\n 'name' => 'AllyHpGain',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'ally_hp_gain',\n 'created_at' => '2018-01-24 15:41:20',\n 'updated_at' => '2018-01-24 15:41:20',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 199 => [\n 'id' => 200,\n 'name' => 'PullLength',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'pull_length',\n 'created_at' => '2018-01-24 15:41:20',\n 'updated_at' => '2018-01-24 15:41:20',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 200 => [\n 'id' => 201,\n 'name' => 'EnemyLength',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'enemy_length',\n 'created_at' => '2018-01-24 15:41:20',\n 'updated_at' => '2018-01-24 15:41:20',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 201 => [\n 'id' => 202,\n 'name' => 'RangeDuration',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'range_duration',\n 'created_at' => '2018-01-24 15:41:20',\n 'updated_at' => '2018-01-24 15:41:20',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 202 => [\n 'id' => 203,\n 'name' => 'CastRangeEnemy',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'cast_range_enemy',\n 'created_at' => '2018-01-24 15:41:20',\n 'updated_at' => '2018-01-24 15:41:20',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 203 => [\n 'id' => 204,\n 'name' => 'MaxAttacks',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'max_attacks',\n 'created_at' => '2018-01-24 15:41:20',\n 'updated_at' => '2018-01-24 15:41:20',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 204 => [\n 'id' => 205,\n 'name' => 'TurretDamagePct',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'turret_damage_pct',\n 'created_at' => '2018-01-24 15:41:20',\n 'updated_at' => '2018-01-24 15:41:20',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 205 => [\n 'id' => 206,\n 'name' => 'TurretRangePct',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'turret_range_pct',\n 'created_at' => '2018-01-24 15:41:20',\n 'updated_at' => '2018-01-24 15:41:20',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 206 => [\n 'id' => 207,\n 'name' => 'TurretAtkSpdPct',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'turret_atk_spd_pct',\n 'created_at' => '2018-01-24 15:41:20',\n 'updated_at' => '2018-01-24 15:41:20',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 207 => [\n 'id' => 208,\n 'name' => 'CooldownTimePerCharge',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'cooldown_time_per_charge',\n 'created_at' => '2018-01-25 08:37:33',\n 'updated_at' => '2018-01-25 08:37:33',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 208 => [\n 'id' => 209,\n 'name' => 'ModelScale',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'model_scale',\n 'created_at' => '2018-01-25 08:37:33',\n 'updated_at' => '2018-01-25 08:37:33',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 209 => [\n 'id' => 210,\n 'name' => 'BonusMovement',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'bonus_movement',\n 'created_at' => '2018-01-25 08:37:44',\n 'updated_at' => '2018-01-25 08:37:44',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 210 => [\n 'id' => 211,\n 'name' => 'ReplenishAmount',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'replenish_amount',\n 'created_at' => '2018-01-25 08:37:44',\n 'updated_at' => '2018-01-25 08:37:44',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 211 => [\n 'id' => 212,\n 'name' => 'ReplenishRadius',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'replenish_radius',\n 'created_at' => '2018-01-25 08:37:44',\n 'updated_at' => '2018-01-25 08:37:44',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 212 => [\n 'id' => 213,\n 'name' => 'BonusGoldPerMinute',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'bonus_gold_per_minute',\n 'created_at' => '2018-01-25 08:37:44',\n 'updated_at' => '2018-01-25 08:37:44',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 213 => [\n 'id' => 214,\n 'name' => 'CreepBountyPercent',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'creep_bounty_percent',\n 'created_at' => '2018-01-25 08:37:44',\n 'updated_at' => '2018-01-25 08:37:44',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 214 => [\n 'id' => 215,\n 'name' => 'BonusChance',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'bonus_chance',\n 'created_at' => '2018-01-30 12:07:14',\n 'updated_at' => '2018-01-30 12:07:14',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 215 => [\n 'id' => 216,\n 'name' => 'BonusSpeed',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'bonus_speed',\n 'created_at' => '2018-01-30 12:07:14',\n 'updated_at' => '2018-01-30 12:07:14',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 216 => [\n 'id' => 217,\n 'name' => 'DamageBonus',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'damage_bonus',\n 'created_at' => '2018-01-30 12:07:14',\n 'updated_at' => '2018-01-30 12:07:14',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 217 => [\n 'id' => 218,\n 'name' => 'DamageBonusRanged',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'damage_bonus_ranged',\n 'created_at' => '2018-01-30 12:07:14',\n 'updated_at' => '2018-01-30 12:07:14',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 218 => [\n 'id' => 219,\n 'name' => 'QuellingRangeTooltip',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'quelling_range_tooltip',\n 'created_at' => '2018-01-30 12:07:14',\n 'updated_at' => '2018-01-30 12:07:14',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 219 => [\n 'id' => 220,\n 'name' => 'HpRestore',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'hp_restore',\n 'created_at' => '2018-01-30 12:07:14',\n 'updated_at' => '2018-01-30 12:07:14',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 220 => [\n 'id' => 221,\n 'name' => 'MagicDamageBlock',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'magic_damage_block',\n 'created_at' => '2018-01-30 12:07:14',\n 'updated_at' => '2018-01-30 12:07:14',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 221 => [\n 'id' => 222,\n 'name' => 'MinDamage',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'min_damage',\n 'created_at' => '2018-01-30 12:07:14',\n 'updated_at' => '2018-01-30 12:07:14',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 222 => [\n 'id' => 223,\n 'name' => 'InitialCharges',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'initial_charges',\n 'created_at' => '2018-01-30 12:07:14',\n 'updated_at' => '2018-01-30 12:07:14',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 223 => [\n 'id' => 224,\n 'name' => 'MovementSpeed',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'movement_speed',\n 'created_at' => '2018-01-30 12:07:14',\n 'updated_at' => '2018-01-30 12:07:14',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 224 => [\n 'id' => 225,\n 'name' => 'DamageBlockMelee',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'damage_block_melee',\n 'created_at' => '2018-01-30 12:07:14',\n 'updated_at' => '2018-01-30 12:07:14',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 225 => [\n 'id' => 226,\n 'name' => 'DamageBlockRanged',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'damage_block_ranged',\n 'created_at' => '2018-01-30 12:07:14',\n 'updated_at' => '2018-01-30 12:07:14',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 226 => [\n 'id' => 227,\n 'name' => 'BonusNightVision',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'bonus_night_vision',\n 'created_at' => '2018-01-30 12:07:14',\n 'updated_at' => '2018-01-30 12:07:14',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 227 => [\n 'id' => 228,\n 'name' => 'ConsumedBonus',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'consumed_bonus',\n 'created_at' => '2018-01-30 12:07:14',\n 'updated_at' => '2018-01-30 12:07:14',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 228 => [\n 'id' => 229,\n 'name' => 'ConsumedBonusNightVision',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'consumed_bonus_night_vision',\n 'created_at' => '2018-01-30 12:07:14',\n 'updated_at' => '2018-01-30 12:07:14',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 229 => [\n 'id' => 230,\n 'name' => 'TreeDuration',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'tree_duration',\n 'created_at' => '2018-01-30 12:07:14',\n 'updated_at' => '2018-01-30 12:07:14',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 230 => [\n 'id' => 231,\n 'name' => 'HpRegen',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'hp_regen',\n 'created_at' => '2018-01-30 12:07:14',\n 'updated_at' => '2018-01-30 12:07:14',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 231 => [\n 'id' => 232,\n 'name' => 'HealthRegen',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'health_regen',\n 'created_at' => '2018-01-30 12:07:14',\n 'updated_at' => '2018-01-30 12:07:14',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 232 => [\n 'id' => 233,\n 'name' => 'Movespeed',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'movespeed',\n 'created_at' => '2018-01-30 12:07:14',\n 'updated_at' => '2018-01-30 12:07:14',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 233 => [\n 'id' => 234,\n 'name' => 'Lifetime',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'lifetime',\n 'created_at' => '2018-01-30 12:07:14',\n 'updated_at' => '2018-01-30 12:07:14',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 234 => [\n 'id' => 235,\n 'name' => 'VisionRange',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'vision_range',\n 'created_at' => '2018-01-30 12:07:14',\n 'updated_at' => '2018-01-30 12:07:14',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 235 => [\n 'id' => 236,\n 'name' => 'Health',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'health',\n 'created_at' => '2018-01-30 12:07:14',\n 'updated_at' => '2018-01-30 12:07:14',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 236 => [\n 'id' => 237,\n 'name' => 'DurationMinutesTooltip',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'duration_minutes_tooltip',\n 'created_at' => '2018-01-30 12:07:14',\n 'updated_at' => '2018-01-30 12:07:14',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 237 => [\n 'id' => 238,\n 'name' => 'TrueSightRange',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'true_sight_range',\n 'created_at' => '2018-01-30 12:07:14',\n 'updated_at' => '2018-01-30 12:07:14',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 238 => [\n 'id' => 239,\n 'name' => 'ObserverCost',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'observer_cost',\n 'created_at' => '2018-01-30 12:07:14',\n 'updated_at' => '2018-01-30 12:07:14',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 239 => [\n 'id' => 240,\n 'name' => 'SentryCost',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'sentry_cost',\n 'created_at' => '2018-01-30 12:07:14',\n 'updated_at' => '2018-01-30 12:07:14',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 240 => [\n 'id' => 241,\n 'name' => 'LifetimeObserver',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'lifetime_observer',\n 'created_at' => '2018-01-30 12:07:14',\n 'updated_at' => '2018-01-30 12:07:14',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 241 => [\n 'id' => 242,\n 'name' => 'LifetimeSentry',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'lifetime_sentry',\n 'created_at' => '2018-01-30 12:07:14',\n 'updated_at' => '2018-01-30 12:07:14',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 242 => [\n 'id' => 243,\n 'name' => 'CreationDelay',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'creation_delay',\n 'created_at' => '2018-01-30 12:07:14',\n 'updated_at' => '2018-01-30 12:07:14',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 243 => [\n 'id' => 244,\n 'name' => 'ObserverVisionRangeTooltip',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'observer_vision_range_tooltip',\n 'created_at' => '2018-01-30 12:07:14',\n 'updated_at' => '2018-01-30 12:07:14',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 244 => [\n 'id' => 245,\n 'name' => 'ObserverDurationMinutesTooltip',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'observer_duration_minutes_tooltip',\n 'created_at' => '2018-01-30 12:07:14',\n 'updated_at' => '2018-01-30 12:07:14',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 245 => [\n 'id' => 246,\n 'name' => 'SentryDurationMinutesTooltip',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'sentry_duration_minutes_tooltip',\n 'created_at' => '2018-01-30 12:07:14',\n 'updated_at' => '2018-01-30 12:07:14',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 246 => [\n 'id' => 247,\n 'name' => 'TooltipCharges',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'tooltip_charges',\n 'created_at' => '2018-01-30 12:07:15',\n 'updated_at' => '2018-01-30 12:07:15',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 247 => [\n 'id' => 248,\n 'name' => 'MinimunDistance',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'minimun_distance',\n 'created_at' => '2018-01-30 12:07:15',\n 'updated_at' => '2018-01-30 12:07:15',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 248 => [\n 'id' => 249,\n 'name' => 'MaximumDistance',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'maximum_distance',\n 'created_at' => '2018-01-30 12:07:15',\n 'updated_at' => '2018-01-30 12:07:15',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 249 => [\n 'id' => 250,\n 'name' => 'VisionRadius',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'vision_radius',\n 'created_at' => '2018-01-30 12:07:15',\n 'updated_at' => '2018-01-30 12:07:15',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 250 => [\n 'id' => 251,\n 'name' => 'TooltipChannelTime',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'tooltip_channel_time',\n 'created_at' => '2018-01-30 12:07:15',\n 'updated_at' => '2018-01-30 12:07:15',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 251 => [\n 'id' => 252,\n 'name' => 'PhaseMovementSpeed',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'phase_movement_speed',\n 'created_at' => '2018-01-30 12:07:15',\n 'updated_at' => '2018-01-30 12:07:15',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 252 => [\n 'id' => 253,\n 'name' => 'PhaseMovementSpeedRange',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'phase_movement_speed_range',\n 'created_at' => '2018-01-30 12:07:15',\n 'updated_at' => '2018-01-30 12:07:15',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 253 => [\n 'id' => 254,\n 'name' => 'PhaseDuration',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'phase_duration',\n 'created_at' => '2018-01-30 12:07:15',\n 'updated_at' => '2018-01-30 12:07:15',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 254 => [\n 'id' => 255,\n 'name' => 'XpMultiplier',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'xp_multiplier',\n 'created_at' => '2018-01-30 12:07:15',\n 'updated_at' => '2018-01-30 12:07:15',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 255 => [\n 'id' => 256,\n 'name' => 'BonusGold',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'bonus_gold',\n 'created_at' => '2018-01-30 12:07:15',\n 'updated_at' => '2018-01-30 12:07:15',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 256 => [\n 'id' => 257,\n 'name' => 'TransmuteCastRangeTooltip',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'transmute_cast_range_tooltip',\n 'created_at' => '2018-01-30 12:07:15',\n 'updated_at' => '2018-01-30 12:07:15',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 257 => [\n 'id' => 258,\n 'name' => 'BonusBlockMelee',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'bonus_block_melee',\n 'created_at' => '2018-01-30 12:07:15',\n 'updated_at' => '2018-01-30 12:07:15',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 258 => [\n 'id' => 259,\n 'name' => 'BonusBlockRange',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'bonus_block_range',\n 'created_at' => '2018-01-30 12:07:15',\n 'updated_at' => '2018-01-30 12:07:15',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 259 => [\n 'id' => 260,\n 'name' => 'BonusBlockDuration',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'bonus_block_duration',\n 'created_at' => '2018-01-30 12:07:15',\n 'updated_at' => '2018-01-30 12:07:15',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 260 => [\n 'id' => 261,\n 'name' => 'HealAmount',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'heal_amount',\n 'created_at' => '2018-01-30 12:07:15',\n 'updated_at' => '2018-01-30 12:07:15',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 261 => [\n 'id' => 262,\n 'name' => 'HealBonusArmor',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'heal_bonus_armor',\n 'created_at' => '2018-01-30 12:07:15',\n 'updated_at' => '2018-01-30 12:07:15',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 262 => [\n 'id' => 263,\n 'name' => 'HealArmorDuration',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'heal_armor_duration',\n 'created_at' => '2018-01-30 12:07:15',\n 'updated_at' => '2018-01-30 12:07:15',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 263 => [\n 'id' => 264,\n 'name' => 'HealRadius',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'heal_radius',\n 'created_at' => '2018-01-30 12:07:15',\n 'updated_at' => '2018-01-30 12:07:15',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 264 => [\n 'id' => 265,\n 'name' => 'ManaRegenAura',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'mana_regen_aura',\n 'created_at' => '2018-01-30 12:07:15',\n 'updated_at' => '2018-01-30 12:07:15',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 265 => [\n 'id' => 266,\n 'name' => 'ArmorAura',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'armor_aura',\n 'created_at' => '2018-01-30 12:07:15',\n 'updated_at' => '2018-01-30 12:07:15',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 266 => [\n 'id' => 267,\n 'name' => 'DamageAura',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'damage_aura',\n 'created_at' => '2018-01-30 12:07:15',\n 'updated_at' => '2018-01-30 12:07:15',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 267 => [\n 'id' => 268,\n 'name' => 'VampiricAura',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'vampiric_aura',\n 'created_at' => '2018-01-30 12:07:15',\n 'updated_at' => '2018-01-30 12:07:15',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 268 => [\n 'id' => 269,\n 'name' => 'VampiricAuraRanged',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'vampiric_aura_ranged',\n 'created_at' => '2018-01-30 12:07:15',\n 'updated_at' => '2018-01-30 12:07:15',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 269 => [\n 'id' => 270,\n 'name' => 'BonusAoeDuration',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'bonus_aoe_duration',\n 'created_at' => '2018-01-30 12:07:15',\n 'updated_at' => '2018-01-30 12:07:15',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 270 => [\n 'id' => 271,\n 'name' => 'BonusAoeDurationHero',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'bonus_aoe_duration_hero',\n 'created_at' => '2018-01-30 12:07:15',\n 'updated_at' => '2018-01-30 12:07:15',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 271 => [\n 'id' => 272,\n 'name' => 'AuraManaRegen',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'aura_mana_regen',\n 'created_at' => '2018-01-30 12:07:15',\n 'updated_at' => '2018-01-30 12:07:15',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 272 => [\n 'id' => 273,\n 'name' => 'AuraBonusArmor',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'aura_bonus_armor',\n 'created_at' => '2018-01-30 12:07:15',\n 'updated_at' => '2018-01-30 12:07:15',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 273 => [\n 'id' => 274,\n 'name' => 'BarrierDebuffDuration',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'barrier_debuff_duration',\n 'created_at' => '2018-01-30 12:07:15',\n 'updated_at' => '2018-01-30 12:07:15',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 274 => [\n 'id' => 275,\n 'name' => 'BarrierBlock',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'barrier_block',\n 'created_at' => '2018-01-30 12:07:15',\n 'updated_at' => '2018-01-30 12:07:15',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 275 => [\n 'id' => 276,\n 'name' => 'BarrierDuration',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'barrier_duration',\n 'created_at' => '2018-01-30 12:07:15',\n 'updated_at' => '2018-01-30 12:07:15',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 276 => [\n 'id' => 277,\n 'name' => 'BarrierRadius',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'barrier_radius',\n 'created_at' => '2018-01-30 12:07:15',\n 'updated_at' => '2018-01-30 12:07:15',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 277 => [\n 'id' => 278,\n 'name' => 'BarrierBlockCreep',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'barrier_block_creep',\n 'created_at' => '2018-01-30 12:07:15',\n 'updated_at' => '2018-01-30 12:07:15',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 278 => [\n 'id' => 279,\n 'name' => 'SheepDuration',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'sheep_duration',\n 'created_at' => '2018-01-30 12:07:15',\n 'updated_at' => '2018-01-30 12:07:15',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 279 => [\n 'id' => 280,\n 'name' => 'SheepMovementSpeed',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'sheep_movement_speed',\n 'created_at' => '2018-01-30 12:07:15',\n 'updated_at' => '2018-01-30 12:07:15',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 280 => [\n 'id' => 281,\n 'name' => 'ProcDamage',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'proc_damage',\n 'created_at' => '2018-01-30 12:07:16',\n 'updated_at' => '2018-01-30 12:07:16',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 281 => [\n 'id' => 282,\n 'name' => 'MovementSlow',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'movement_slow',\n 'created_at' => '2018-01-30 12:07:16',\n 'updated_at' => '2018-01-30 12:07:16',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 282 => [\n 'id' => 283,\n 'name' => 'AttackSpeedSlow',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'attack_speed_slow',\n 'created_at' => '2018-01-30 12:07:16',\n 'updated_at' => '2018-01-30 12:07:16',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 283 => [\n 'id' => 284,\n 'name' => 'SlowDuration',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'slow_duration',\n 'created_at' => '2018-01-30 12:07:16',\n 'updated_at' => '2018-01-30 12:07:16',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 284 => [\n 'id' => 285,\n 'name' => 'SummonDuration',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'summon_duration',\n 'created_at' => '2018-01-30 12:07:16',\n 'updated_at' => '2018-01-30 12:07:16',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 285 => [\n 'id' => 286,\n 'name' => 'WarriorHealthTooltip',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'warrior_health_tooltip',\n 'created_at' => '2018-01-30 12:07:16',\n 'updated_at' => '2018-01-30 12:07:16',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 286 => [\n 'id' => 287,\n 'name' => 'WarriorDamageTooltip',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'warrior_damage_tooltip',\n 'created_at' => '2018-01-30 12:07:16',\n 'updated_at' => '2018-01-30 12:07:16',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 287 => [\n 'id' => 288,\n 'name' => 'WarriorManaFeedback',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'warrior_mana_feedback',\n 'created_at' => '2018-01-30 12:07:16',\n 'updated_at' => '2018-01-30 12:07:16',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 288 => [\n 'id' => 289,\n 'name' => 'WarriorManaBreakTooltip',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'warrior_mana_break_tooltip',\n 'created_at' => '2018-01-30 12:07:16',\n 'updated_at' => '2018-01-30 12:07:16',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 289 => [\n 'id' => 290,\n 'name' => 'Explosion',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'explosion',\n 'created_at' => '2018-01-30 12:07:16',\n 'updated_at' => '2018-01-30 12:07:16',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 290 => [\n 'id' => 291,\n 'name' => 'WarriorTruesight',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'warrior_truesight',\n 'created_at' => '2018-01-30 12:07:16',\n 'updated_at' => '2018-01-30 12:07:16',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 291 => [\n 'id' => 292,\n 'name' => 'ArcherHealthTooltip',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'archer_health_tooltip',\n 'created_at' => '2018-01-30 12:07:16',\n 'updated_at' => '2018-01-30 12:07:16',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 292 => [\n 'id' => 293,\n 'name' => 'ArcherDamageTooltip',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'archer_damage_tooltip',\n 'created_at' => '2018-01-30 12:07:16',\n 'updated_at' => '2018-01-30 12:07:16',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 293 => [\n 'id' => 294,\n 'name' => 'ArcherManaBurn',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'archer_mana_burn',\n 'created_at' => '2018-01-30 12:07:16',\n 'updated_at' => '2018-01-30 12:07:16',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 294 => [\n 'id' => 295,\n 'name' => 'ArcherAuraRadiusTooltip',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'archer_aura_radius_tooltip',\n 'created_at' => '2018-01-30 12:07:16',\n 'updated_at' => '2018-01-30 12:07:16',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 295 => [\n 'id' => 296,\n 'name' => 'ArcherMoveSpeed',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'archer_move_speed',\n 'created_at' => '2018-01-30 12:07:16',\n 'updated_at' => '2018-01-30 12:07:16',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 296 => [\n 'id' => 297,\n 'name' => 'ArcherAttackSpeed',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'archer_attack_speed',\n 'created_at' => '2018-01-30 12:07:16',\n 'updated_at' => '2018-01-30 12:07:16',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 297 => [\n 'id' => 298,\n 'name' => 'MaxLevel',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'max_level',\n 'created_at' => '2018-01-30 12:07:16',\n 'updated_at' => '2018-01-30 12:07:16',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 298 => [\n 'id' => 299,\n 'name' => 'ReincarnateTime',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'reincarnate_time',\n 'created_at' => '2018-01-30 12:07:16',\n 'updated_at' => '2018-01-30 12:07:16',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 299 => [\n 'id' => 300,\n 'name' => 'DisappearTime',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'disappear_time',\n 'created_at' => '2018-01-30 12:07:16',\n 'updated_at' => '2018-01-30 12:07:16',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 300 => [\n 'id' => 301,\n 'name' => 'DisappearTimeMinutesTooltip',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'disappear_time_minutes_tooltip',\n 'created_at' => '2018-01-30 12:07:16',\n 'updated_at' => '2018-01-30 12:07:16',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 301 => [\n 'id' => 302,\n 'name' => 'BlastDamage',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'blast_damage',\n 'created_at' => '2018-01-30 12:07:16',\n 'updated_at' => '2018-01-30 12:07:16',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 302 => [\n 'id' => 303,\n 'name' => 'BlastMovementSpeed',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'blast_movement_speed',\n 'created_at' => '2018-01-30 12:07:16',\n 'updated_at' => '2018-01-30 12:07:16',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 303 => [\n 'id' => 304,\n 'name' => 'BlastDebuffDuration',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'blast_debuff_duration',\n 'created_at' => '2018-01-30 12:07:16',\n 'updated_at' => '2018-01-30 12:07:16',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 304 => [\n 'id' => 305,\n 'name' => 'BlastRadius',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'blast_radius',\n 'created_at' => '2018-01-30 12:07:16',\n 'updated_at' => '2018-01-30 12:07:16',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 305 => [\n 'id' => 306,\n 'name' => 'BlastSpeed',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'blast_speed',\n 'created_at' => '2018-01-30 12:07:16',\n 'updated_at' => '2018-01-30 12:07:16',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 306 => [\n 'id' => 307,\n 'name' => 'ChargeRange',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'charge_range',\n 'created_at' => '2018-01-30 12:07:16',\n 'updated_at' => '2018-01-30 12:07:16',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 307 => [\n 'id' => 308,\n 'name' => 'RespawnTimeReduction',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'respawn_time_reduction',\n 'created_at' => '2018-01-30 12:07:16',\n 'updated_at' => '2018-01-30 12:07:16',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 308 => [\n 'id' => 309,\n 'name' => 'OnDeathRemoval',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'on_death_removal',\n 'created_at' => '2018-01-30 12:07:17',\n 'updated_at' => '2018-01-30 12:07:17',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 309 => [\n 'id' => 310,\n 'name' => 'BlockCooldown',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'block_cooldown',\n 'created_at' => '2018-01-30 12:18:00',\n 'updated_at' => '2018-01-30 12:18:00',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 310 => [\n 'id' => 311,\n 'name' => 'ActiveDuration',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'active_duration',\n 'created_at' => '2018-01-30 12:18:00',\n 'updated_at' => '2018-01-30 12:18:00',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 311 => [\n 'id' => 312,\n 'name' => 'BonusSpellResist',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'bonus_spell_resist',\n 'created_at' => '2018-01-30 12:18:00',\n 'updated_at' => '2018-01-30 12:18:00',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 312 => [\n 'id' => 313,\n 'name' => 'AuraDamage',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'aura_damage',\n 'created_at' => '2018-01-30 12:18:00',\n 'updated_at' => '2018-01-30 12:18:00',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 313 => [\n 'id' => 314,\n 'name' => 'AuraDamageIllusions',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'aura_damage_illusions',\n 'created_at' => '2018-01-30 12:18:00',\n 'updated_at' => '2018-01-30 12:18:00',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 314 => [\n 'id' => 315,\n 'name' => 'BlindPct',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'blind_pct',\n 'created_at' => '2018-01-30 12:18:00',\n 'updated_at' => '2018-01-30 12:18:00',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 315 => [\n 'id' => 316,\n 'name' => 'TooltipCritDamage',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'tooltip_crit_damage',\n 'created_at' => '2018-01-30 12:18:01',\n 'updated_at' => '2018-01-30 12:18:01',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 316 => [\n 'id' => 317,\n 'name' => 'ImagesCount',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'images_count',\n 'created_at' => '2018-01-30 12:18:01',\n 'updated_at' => '2018-01-30 12:18:01',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 317 => [\n 'id' => 318,\n 'name' => 'TooltipIllusionDuration',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'tooltip_illusion_duration',\n 'created_at' => '2018-01-30 12:18:01',\n 'updated_at' => '2018-01-30 12:18:01',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 318 => [\n 'id' => 319,\n 'name' => 'ImagesDoDamagePercentMelee',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'images_do_damage_percent_melee',\n 'created_at' => '2018-01-30 12:18:01',\n 'updated_at' => '2018-01-30 12:18:01',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 319 => [\n 'id' => 320,\n 'name' => 'TooltipDamageOutgoingMelee',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'tooltip_damage_outgoing_melee',\n 'created_at' => '2018-01-30 12:18:01',\n 'updated_at' => '2018-01-30 12:18:01',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 320 => [\n 'id' => 321,\n 'name' => 'ImagesTakeDamagePercentMelee',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'images_take_damage_percent_melee',\n 'created_at' => '2018-01-30 12:18:01',\n 'updated_at' => '2018-01-30 12:18:01',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 321 => [\n 'id' => 322,\n 'name' => 'TooltipDamageIncomingMeleeTotalPct',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'tooltip_damage_incoming_melee_total_pct',\n 'created_at' => '2018-01-30 12:18:01',\n 'updated_at' => '2018-01-30 12:18:01',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 322 => [\n 'id' => 323,\n 'name' => 'ImagesDoDamagePercentRanged',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'images_do_damage_percent_ranged',\n 'created_at' => '2018-01-30 12:18:01',\n 'updated_at' => '2018-01-30 12:18:01',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 323 => [\n 'id' => 324,\n 'name' => 'TooltipDamageOutgoingRanged',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'tooltip_damage_outgoing_ranged',\n 'created_at' => '2018-01-30 12:18:01',\n 'updated_at' => '2018-01-30 12:18:01',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 324 => [\n 'id' => 325,\n 'name' => 'ImagesTakeDamagePercentRanged',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'images_take_damage_percent_ranged',\n 'created_at' => '2018-01-30 12:18:01',\n 'updated_at' => '2018-01-30 12:18:01',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 325 => [\n 'id' => 326,\n 'name' => 'TooltipDamageIncomingRangedTotalPct',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'tooltip_damage_incoming_ranged_total_pct',\n 'created_at' => '2018-01-30 12:18:01',\n 'updated_at' => '2018-01-30 12:18:01',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 326 => [\n 'id' => 327,\n 'name' => 'InvulnDuration',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'invuln_duration',\n 'created_at' => '2018-01-30 12:18:01',\n 'updated_at' => '2018-01-30 12:18:01',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 327 => [\n 'id' => 328,\n 'name' => 'TooltipRangedCooldownIncrease',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'tooltip_ranged_cooldown_increase',\n 'created_at' => '2018-01-30 12:18:01',\n 'updated_at' => '2018-01-30 12:18:01',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 328 => [\n 'id' => 329,\n 'name' => 'WindwalkDuration',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'windwalk_duration',\n 'created_at' => '2018-01-30 12:18:01',\n 'updated_at' => '2018-01-30 12:18:01',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 329 => [\n 'id' => 330,\n 'name' => 'WindwalkMovementSpeed',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'windwalk_movement_speed',\n 'created_at' => '2018-01-30 12:18:01',\n 'updated_at' => '2018-01-30 12:18:01',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 330 => [\n 'id' => 331,\n 'name' => 'WindwalkFadeTime',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'windwalk_fade_time',\n 'created_at' => '2018-01-30 12:18:01',\n 'updated_at' => '2018-01-30 12:18:01',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 331 => [\n 'id' => 332,\n 'name' => 'WindwalkBonusDamage',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'windwalk_bonus_damage',\n 'created_at' => '2018-01-30 12:18:01',\n 'updated_at' => '2018-01-30 12:18:01',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 332 => [\n 'id' => 333,\n 'name' => 'BackstabReduction',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'backstab_reduction',\n 'created_at' => '2018-01-30 12:18:01',\n 'updated_at' => '2018-01-30 12:18:01',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 333 => [\n 'id' => 334,\n 'name' => 'BackstabDuration',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'backstab_duration',\n 'created_at' => '2018-01-30 12:18:01',\n 'updated_at' => '2018-01-30 12:18:01',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 334 => [\n 'id' => 335,\n 'name' => 'MovementSpeedPercentBonus',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'movement_speed_percent_bonus',\n 'created_at' => '2018-01-30 12:18:01',\n 'updated_at' => '2018-01-30 12:18:01',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 335 => [\n 'id' => 336,\n 'name' => 'MaimChance',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'maim_chance',\n 'created_at' => '2018-01-30 12:18:01',\n 'updated_at' => '2018-01-30 12:18:01',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 336 => [\n 'id' => 337,\n 'name' => 'MaimSlowMovement',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'maim_slow_movement',\n 'created_at' => '2018-01-30 12:18:01',\n 'updated_at' => '2018-01-30 12:18:01',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 337 => [\n 'id' => 338,\n 'name' => 'MaimSlowAttack',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'maim_slow_attack',\n 'created_at' => '2018-01-30 12:18:01',\n 'updated_at' => '2018-01-30 12:18:01',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 338 => [\n 'id' => 339,\n 'name' => 'MaimSlowMovementRange',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'maim_slow_movement_range',\n 'created_at' => '2018-01-30 12:18:01',\n 'updated_at' => '2018-01-30 12:18:01',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 339 => [\n 'id' => 340,\n 'name' => 'MaimSlowAttackRange',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'maim_slow_attack_range',\n 'created_at' => '2018-01-30 12:18:01',\n 'updated_at' => '2018-01-30 12:18:01',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 340 => [\n 'id' => 341,\n 'name' => 'MaimDuration',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'maim_duration',\n 'created_at' => '2018-01-30 12:18:01',\n 'updated_at' => '2018-01-30 12:18:01',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 341 => [\n 'id' => 342,\n 'name' => 'StaticDuration',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'static_duration',\n 'created_at' => '2018-01-30 12:18:01',\n 'updated_at' => '2018-01-30 12:18:01',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 342 => [\n 'id' => 343,\n 'name' => 'StaticChance',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'static_chance',\n 'created_at' => '2018-01-30 12:18:01',\n 'updated_at' => '2018-01-30 12:18:01',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 343 => [\n 'id' => 344,\n 'name' => 'StaticStrikes',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'static_strikes',\n 'created_at' => '2018-01-30 12:18:01',\n 'updated_at' => '2018-01-30 12:18:01',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 344 => [\n 'id' => 345,\n 'name' => 'StaticDamage',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'static_damage',\n 'created_at' => '2018-01-30 12:18:01',\n 'updated_at' => '2018-01-30 12:18:01',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 345 => [\n 'id' => 346,\n 'name' => 'StaticPrimaryRadius',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'static_primary_radius',\n 'created_at' => '2018-01-30 12:18:01',\n 'updated_at' => '2018-01-30 12:18:01',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 346 => [\n 'id' => 347,\n 'name' => 'StaticSeconaryRadius',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'static_seconary_radius',\n 'created_at' => '2018-01-30 12:18:01',\n 'updated_at' => '2018-01-30 12:18:01',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 347 => [\n 'id' => 348,\n 'name' => 'StaticRadius',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'static_radius',\n 'created_at' => '2018-01-30 12:18:01',\n 'updated_at' => '2018-01-30 12:18:01',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 348 => [\n 'id' => 349,\n 'name' => 'StaticCooldown',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'static_cooldown',\n 'created_at' => '2018-01-30 12:18:01',\n 'updated_at' => '2018-01-30 12:18:01',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 349 => [\n 'id' => 350,\n 'name' => 'ChainChance',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'chain_chance',\n 'created_at' => '2018-01-30 12:18:01',\n 'updated_at' => '2018-01-30 12:18:01',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 350 => [\n 'id' => 351,\n 'name' => 'ChainDamage',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'chain_damage',\n 'created_at' => '2018-01-30 12:18:02',\n 'updated_at' => '2018-01-30 12:18:02',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 351 => [\n 'id' => 352,\n 'name' => 'ChainStrikes',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'chain_strikes',\n 'created_at' => '2018-01-30 12:18:02',\n 'updated_at' => '2018-01-30 12:18:02',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 352 => [\n 'id' => 353,\n 'name' => 'ChainRadius',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'chain_radius',\n 'created_at' => '2018-01-30 12:18:02',\n 'updated_at' => '2018-01-30 12:18:02',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 353 => [\n 'id' => 354,\n 'name' => 'ChainDelay',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'chain_delay',\n 'created_at' => '2018-01-30 12:18:02',\n 'updated_at' => '2018-01-30 12:18:02',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 354 => [\n 'id' => 355,\n 'name' => 'ChainCooldown',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'chain_cooldown',\n 'created_at' => '2018-01-30 12:18:02',\n 'updated_at' => '2018-01-30 12:18:02',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 355 => [\n 'id' => 356,\n 'name' => 'ColdMovementSpeed',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'cold_movement_speed',\n 'created_at' => '2018-01-30 12:18:02',\n 'updated_at' => '2018-01-30 12:18:02',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 356 => [\n 'id' => 357,\n 'name' => 'ColdAttackSpeed',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'cold_attack_speed',\n 'created_at' => '2018-01-30 12:18:02',\n 'updated_at' => '2018-01-30 12:18:02',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 357 => [\n 'id' => 358,\n 'name' => 'ColdDurationMelee',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'cold_duration_melee',\n 'created_at' => '2018-01-30 12:18:02',\n 'updated_at' => '2018-01-30 12:18:02',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 358 => [\n 'id' => 359,\n 'name' => 'ColdDurationRanged',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'cold_duration_ranged',\n 'created_at' => '2018-01-30 12:18:02',\n 'updated_at' => '2018-01-30 12:18:02',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 359 => [\n 'id' => 360,\n 'name' => 'BonusStats',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'bonus_stats',\n 'created_at' => '2018-01-30 12:18:02',\n 'updated_at' => '2018-01-30 12:18:02',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 360 => [\n 'id' => 361,\n 'name' => 'AttackSpeed',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'attack_speed',\n 'created_at' => '2018-01-30 12:18:02',\n 'updated_at' => '2018-01-30 12:18:02',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 361 => [\n 'id' => 362,\n 'name' => 'AttackSpeedAura',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'attack_speed_aura',\n 'created_at' => '2018-01-30 12:18:02',\n 'updated_at' => '2018-01-30 12:18:02',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 362 => [\n 'id' => 363,\n 'name' => 'HpRegenAura',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'hp_regen_aura',\n 'created_at' => '2018-01-30 12:18:02',\n 'updated_at' => '2018-01-30 12:18:02',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 363 => [\n 'id' => 364,\n 'name' => 'HealthMin',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'health_min',\n 'created_at' => '2018-01-30 12:18:02',\n 'updated_at' => '2018-01-30 12:18:02',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 364 => [\n 'id' => 365,\n 'name' => 'SpeedBase',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'speed_base',\n 'created_at' => '2018-01-30 12:18:02',\n 'updated_at' => '2018-01-30 12:18:02',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 365 => [\n 'id' => 366,\n 'name' => 'TooltipBounty',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'tooltip_bounty',\n 'created_at' => '2018-01-30 12:18:02',\n 'updated_at' => '2018-01-30 12:18:02',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 366 => [\n 'id' => 367,\n 'name' => 'BerserkBonusAttackSpeed',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'berserk_bonus_attack_speed',\n 'created_at' => '2018-01-30 12:18:02',\n 'updated_at' => '2018-01-30 12:18:02',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 367 => [\n 'id' => 368,\n 'name' => 'BerserkBonusMovementSpeed',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'berserk_bonus_movement_speed',\n 'created_at' => '2018-01-30 12:18:02',\n 'updated_at' => '2018-01-30 12:18:02',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 368 => [\n 'id' => 369,\n 'name' => 'BerserkArmorReduction',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'berserk_armor_reduction',\n 'created_at' => '2018-01-30 12:18:02',\n 'updated_at' => '2018-01-30 12:18:02',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 369 => [\n 'id' => 370,\n 'name' => 'BerserkDuration',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'berserk_duration',\n 'created_at' => '2018-01-30 12:18:02',\n 'updated_at' => '2018-01-30 12:18:02',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 370 => [\n 'id' => 371,\n 'name' => 'FeedbackManaBurn',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'feedback_mana_burn',\n 'created_at' => '2018-01-30 12:18:02',\n 'updated_at' => '2018-01-30 12:18:02',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 371 => [\n 'id' => 372,\n 'name' => 'FeedbackManaBurnIllusionMelee',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'feedback_mana_burn_illusion_melee',\n 'created_at' => '2018-01-30 12:18:02',\n 'updated_at' => '2018-01-30 12:18:02',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 372 => [\n 'id' => 373,\n 'name' => 'FeedbackManaBurnIllusionRanged',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'feedback_mana_burn_illusion_ranged',\n 'created_at' => '2018-01-30 12:18:02',\n 'updated_at' => '2018-01-30 12:18:02',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 373 => [\n 'id' => 374,\n 'name' => 'PurgeRate',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'purge_rate',\n 'created_at' => '2018-01-30 12:18:02',\n 'updated_at' => '2018-01-30 12:18:02',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 374 => [\n 'id' => 375,\n 'name' => 'PurgeRootDuration',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'purge_root_duration',\n 'created_at' => '2018-01-30 12:18:02',\n 'updated_at' => '2018-01-30 12:18:02',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 375 => [\n 'id' => 376,\n 'name' => 'PurgeSlowDuration',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'purge_slow_duration',\n 'created_at' => '2018-01-30 12:18:02',\n 'updated_at' => '2018-01-30 12:18:02',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 376 => [\n 'id' => 377,\n 'name' => 'DamagePerBurn',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'damage_per_burn',\n 'created_at' => '2018-01-30 12:18:02',\n 'updated_at' => '2018-01-30 12:18:02',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 377 => [\n 'id' => 378,\n 'name' => 'BlastMovementSlow',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'blast_movement_slow',\n 'created_at' => '2018-01-30 12:18:02',\n 'updated_at' => '2018-01-30 12:18:02',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 378 => [\n 'id' => 379,\n 'name' => 'BlastAgilityMultiplier',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'blast_agility_multiplier',\n 'created_at' => '2018-01-30 12:18:02',\n 'updated_at' => '2018-01-30 12:18:02',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 379 => [\n 'id' => 380,\n 'name' => 'BlastDamageBase',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'blast_damage_base',\n 'created_at' => '2018-01-30 12:18:02',\n 'updated_at' => '2018-01-30 12:18:02',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 380 => [\n 'id' => 381,\n 'name' => 'DurationAlly',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'duration_ally',\n 'created_at' => '2018-01-30 12:18:02',\n 'updated_at' => '2018-01-30 12:18:02',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 381 => [\n 'id' => 382,\n 'name' => 'EtherealDamageBonus',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'ethereal_damage_bonus',\n 'created_at' => '2018-01-30 12:18:02',\n 'updated_at' => '2018-01-30 12:18:02',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 382 => [\n 'id' => 383,\n 'name' => 'HealthSacrifice',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'health_sacrifice',\n 'created_at' => '2018-01-30 12:18:02',\n 'updated_at' => '2018-01-30 12:18:02',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 383 => [\n 'id' => 384,\n 'name' => 'ManaGain',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'mana_gain',\n 'created_at' => '2018-01-30 12:18:02',\n 'updated_at' => '2018-01-30 12:18:02',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 384 => [\n 'id' => 385,\n 'name' => 'PoisonDamage',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'poison_damage',\n 'created_at' => '2018-01-30 12:18:02',\n 'updated_at' => '2018-01-30 12:18:02',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 385 => [\n 'id' => 386,\n 'name' => 'PoisonMovementSpeedMelee',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'poison_movement_speed_melee',\n 'created_at' => '2018-01-30 12:18:02',\n 'updated_at' => '2018-01-30 12:18:02',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 386 => [\n 'id' => 387,\n 'name' => 'PoisonMovementSpeedRange',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'poison_movement_speed_range',\n 'created_at' => '2018-01-30 12:18:02',\n 'updated_at' => '2018-01-30 12:18:02',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 387 => [\n 'id' => 388,\n 'name' => 'PoisonDuration',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'poison_duration',\n 'created_at' => '2018-01-30 12:18:02',\n 'updated_at' => '2018-01-30 12:18:02',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 388 => [\n 'id' => 389,\n 'name' => 'BonusManaRegenPct',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'bonus_mana_regen_pct',\n 'created_at' => '2018-01-30 12:18:02',\n 'updated_at' => '2018-01-30 12:18:02',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 389 => [\n 'id' => 390,\n 'name' => 'ArmorReduction',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'armor_reduction',\n 'created_at' => '2018-01-30 12:18:02',\n 'updated_at' => '2018-01-30 12:18:02',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 390 => [\n 'id' => 391,\n 'name' => 'ValorCastRangeTooltip',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'valor_cast_range_tooltip',\n 'created_at' => '2018-01-30 12:18:03',\n 'updated_at' => '2018-01-30 12:18:03',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 391 => [\n 'id' => 392,\n 'name' => 'TruestrikeChance',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'truestrike_chance',\n 'created_at' => '2018-01-30 12:18:03',\n 'updated_at' => '2018-01-30 12:18:03',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 392 => [\n 'id' => 393,\n 'name' => 'ApplicationRadius',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'application_radius',\n 'created_at' => '2018-01-30 12:18:03',\n 'updated_at' => '2018-01-30 12:18:03',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 393 => [\n 'id' => 394,\n 'name' => 'VisibilityRadius',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'visibility_radius',\n 'created_at' => '2018-01-30 12:18:03',\n 'updated_at' => '2018-01-30 12:18:03',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 394 => [\n 'id' => 395,\n 'name' => 'XpBonus',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'xp_bonus',\n 'created_at' => '2018-01-30 12:18:03',\n 'updated_at' => '2018-01-30 12:18:03',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 395 => [\n 'id' => 396,\n 'name' => 'XpPerUse',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'xp_per_use',\n 'created_at' => '2018-01-30 12:18:03',\n 'updated_at' => '2018-01-30 12:18:03',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 396 => [\n 'id' => 397,\n 'name' => 'ResistDebuff',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'resist_debuff',\n 'created_at' => '2018-01-30 12:18:03',\n 'updated_at' => '2018-01-30 12:18:03',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 397 => [\n 'id' => 398,\n 'name' => 'DebuffRadius',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'debuff_radius',\n 'created_at' => '2018-01-30 12:18:03',\n 'updated_at' => '2018-01-30 12:18:03',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 398 => [\n 'id' => 399,\n 'name' => 'ResistDebuffDuration',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'resist_debuff_duration',\n 'created_at' => '2018-01-30 12:18:03',\n 'updated_at' => '2018-01-30 12:18:03',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 399 => [\n 'id' => 400,\n 'name' => 'CreepDamagePct',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'creep_damage_pct',\n 'created_at' => '2018-01-30 12:18:03',\n 'updated_at' => '2018-01-30 12:18:03',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 400 => [\n 'id' => 401,\n 'name' => 'AlternativeCooldown',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'alternative_cooldown',\n 'created_at' => '2018-01-30 12:18:03',\n 'updated_at' => '2018-01-30 12:18:03',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 401 => [\n 'id' => 402,\n 'name' => 'DisarmRange',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'disarm_range',\n 'created_at' => '2018-01-30 12:18:03',\n 'updated_at' => '2018-01-30 12:18:03',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 402 => [\n 'id' => 403,\n 'name' => 'DisarmMelee',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'disarm_melee',\n 'created_at' => '2018-01-30 12:18:03',\n 'updated_at' => '2018-01-30 12:18:03',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 403 => [\n 'id' => 404,\n 'name' => 'DisarmCastRangeTooltip',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'disarm_cast_range_tooltip',\n 'created_at' => '2018-01-30 12:18:03',\n 'updated_at' => '2018-01-30 12:18:03',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 404 => [\n 'id' => 405,\n 'name' => 'HealDuration',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'heal_duration',\n 'created_at' => '2018-01-30 12:18:03',\n 'updated_at' => '2018-01-30 12:18:03',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 405 => [\n 'id' => 406,\n 'name' => 'HealInterval',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'heal_interval',\n 'created_at' => '2018-01-30 12:18:03',\n 'updated_at' => '2018-01-30 12:18:03',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 406 => [\n 'id' => 407,\n 'name' => 'BreakTime',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'break_time',\n 'created_at' => '2018-01-30 12:18:03',\n 'updated_at' => '2018-01-30 12:18:03',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 407 => [\n 'id' => 408,\n 'name' => 'BreakCount',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'break_count',\n 'created_at' => '2018-01-30 12:18:03',\n 'updated_at' => '2018-01-30 12:18:03',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 408 => [\n 'id' => 409,\n 'name' => 'BreakThreshold',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'break_threshold',\n 'created_at' => '2018-01-30 12:18:03',\n 'updated_at' => '2018-01-30 12:18:03',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 409 => [\n 'id' => 410,\n 'name' => 'BrokenMovementSpeed',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'broken_movement_speed',\n 'created_at' => '2018-01-30 12:18:03',\n 'updated_at' => '2018-01-30 12:18:03',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 410 => [\n 'id' => 411,\n 'name' => 'FadeTime',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'fade_time',\n 'created_at' => '2018-01-30 12:18:03',\n 'updated_at' => '2018-01-30 12:18:03',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 411 => [\n 'id' => 412,\n 'name' => 'BuildingDurationLimit',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'building_duration_limit',\n 'created_at' => '2018-01-30 12:18:03',\n 'updated_at' => '2018-01-30 12:18:03',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 412 => [\n 'id' => 413,\n 'name' => 'PaintDuration',\n 'var_type' => 'FIELD_INTEGER',\n 'dota_name' => 'paint_duration',\n 'created_at' => '2018-01-30 12:18:03',\n 'updated_at' => '2018-01-30 12:18:03',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n 413 => [\n 'id' => 414,\n 'name' => 'ManaPerCharge',\n 'var_type' => 'FIELD_FLOAT',\n 'dota_name' => 'mana_per_charge',\n 'created_at' => '2018-01-30 12:18:53',\n 'updated_at' => '2018-01-30 12:18:53',\n 'stat_group' => null,\n 'is_percent' => 0,\n 'var_name' => null,\n ],\n ]\n );\n }", "function showGames()\n{\n $email = trim($_SESSION['login']);\n $dbEmail = R::getAll(\"SELECT * FROM users WHERE email = '$email'\");\n if (!empty($dbEmail)) {\n $user_id = $dbEmail[0]['id'];\n $games = R::getAll(\"SELECT * FROM games WHERE `user_id` = '$user_id'\");\n if (!empty($games)) {\n echo \"<table class='games'>\";\n echo \"<thead><tr>\n <td>#</td>\n <td>Cas hry</td>\n <td>Data hry</td>\n </tr></thead>\";\n $count = 1;\n foreach ($games as $game) {\n echo \"<tr>\n <td>\" . $count . \"</td>\";\n echo \"<td>\" . $game['time'] . \"</td>\";\n echo \"<td>\" . $game['data'] . \"</td>\";\n echo \"</tr>\";\n $count++;\n }\n echo \"</table>\";\n } else {\n echo \"No games yet!\";\n }\n }\n}", "public function getRawStats()\n\t{\n\t\t$this->team = factory(Team::class)->create();\n\t\t$this->event = factory(Event::class)->create(['owner_id' => $this->team->id]);\n\t\tfactory(TeamMember::class, 2)->create(['team_id' => $this->team->id, 'user_id' => 0]);\n\n\t\t$this->data = [\n\t\t\t'event'\t=> $this->event,\n\t\t\t'meta'\t=> ['test' => 123],\n\t\t\t'stats'\t=> [\n\t\t\t\t['id' => 0, 'member_id' => 1, 'gs' => true, 'pts' => 12, 'ast' => 6, 'reb' => 8],\n\t\t\t\t['id' => 0, 'member_id' => 2, 'gs' => false, 'pts' => 42, 'ast' => 2, 'reb' => 3],\n\t\t\t],\n\t\t];\n\t}", "public function update_stats($data, $global_type=FALSE)\n\t{\n\t\t// Global Stats\n\t\t$total = array('rating_last_date'=>0, 'rating_total'=>0, 'rating_avg'=> 0, 'rating_sum'=>0, 'num_fields' => 0);\n\n\t\t// Grab all fields\n\t\t$fields = $this->get_rating_fields($data['collection_id']);\n\n\t\t// Comment Reviews are a bit different!\n\t\tif ($data['rating_type_name'] == 'comment_review')\n\t\t{\n\t\t\t$data['item_id'] = 0;\n\t\t}\n\n\t\t// Loop over all fields\n\t\tforeach ($fields as $field)\n\t\t{\n\t\t\t/** ----------------------------------------\n\t\t\t/** Grab Stats for this Field\n\t\t\t/** ----------------------------------------*/\n\t\t\t$this->EE->db->select('COUNT(*) as rating_total, AVG(rating) as rating_avg, SUM(rating) as rating_sum, MAX(rating_date) as rating_last_date', FALSE);\n\t\t\t$this->EE->db->from('exp_channel_ratings');\n\t\t\t$this->EE->db->where('rating_status', 1);\n\t\t\t$this->EE->db->where('site_id', $this->site_id);\n\t\t\t$this->EE->db->where('field_id', $field->field_id);\n\t\t\t$this->EE->db->where('entry_id', $data['entry_id']);\n\t\t\tif ($data['rating_type_name'] != 'comment_review' && $data['rating_type_name'] != 'entry') $this->EE->db->where('item_id', $data['item_id']);\n\t\t\t$this->EE->db->where('collection_id', $data['collection_id']);\n\t\t\tif ($global_type == FALSE)\n\t\t\t{\n\t\t\t\t$this->EE->db->where('rating_type', $data['rating_type']);\n\t\t\t\t$this->EE->db->group_by(array('entry_id', 'collection_id'));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->EE->db->group_by(array('entry_id', 'collection_id'));\n\t\t\t}\n\n\t\t\t$query = $this->EE->db->get();\n\n\n\n\t\t\t// Nothing? We still need to populate\n\t\t\tif ($query->num_rows() == 0)\n\t\t\t{\n\t\t\t\t$stats = array(\t'rating_last_date' => 0,\n\t\t\t\t\t\t\t\t'rating_total' => 0,\n\t\t\t\t\t\t\t\t'rating_avg' => 0,\n\t\t\t\t\t\t\t\t'rating_sum' => 0,\n\t\t\t\t\t);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$row = $query->row();\n\n\t\t\t\t$stats = array(\t'rating_last_date' => $row->rating_last_date,\n\t\t\t\t\t\t\t'rating_total' => $row->rating_total,\n\t\t\t\t\t\t\t'rating_avg' => $row->rating_avg,\n\t\t\t\t\t\t\t'rating_sum' => $row->rating_sum,\n\t\t\t\t\t);\n\t\t\t}\n\n\t\t\t//----------------------------------------\n\t\t\t// Calculate Bayesian\n\t\t\t//----------------------------------------\n\n\t\t\t// Does our stats entry exist for this entry?\n\t\t\t$this->EE->db->select('rstat_id');\n\t\t\t$this->EE->db->from('exp_channel_ratings_stats');\n\t\t\t$this->EE->db->where('entry_id', $data['entry_id']);\n\t\t\t$this->EE->db->where('item_id', $data['item_id']);\n\t\t\t$this->EE->db->where('field_id', $field->field_id);\n\t\t\t$this->EE->db->where('collection_id', $data['collection_id']);\n\t\t\tif ($global_type == FALSE) $this->EE->db->where('rating_type', $data['rating_type']);\n\t\t\telse $this->EE->db->where('rating_type', 0);\n\t\t\t$this->EE->db->limit(1);\n\t\t\t$query = $this->EE->db->get();\n\n\t\t\t//----------------------------------------\n\t\t\t// Update Or Insert?\n\t\t\t//----------------------------------------\n\t\t\tif ($query->num_rows() == 0)\n\t\t\t{\n\t\t\t\t// new one Insert!\n\t\t\t\t$stats['site_id']\t= $this->site_id;\n\t\t\t\t$stats['entry_id']\t= $data['entry_id'];\n\t\t\t\t$stats['item_id']\t= $data['item_id'];\n\t\t\t\t$stats['channel_id']\t= $data['channel_id'];\n\t\t\t\t$stats['collection_id']\t= $data['collection_id'];\n\t\t\t\t$stats['field_id']\t= $field->field_id;\n\t\t\t\tif ($global_type == FALSE) $stats['rating_type'] = $data['rating_type'];\n\t\t\t\telse $stats['rating_type'] = 0;\n\t\t\t\t$this->EE->db->insert( 'exp_channel_ratings_stats', $stats);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Update it!\n\t\t\t\t$this->EE->db->update( 'exp_channel_ratings_stats', $stats, array('rstat_id' => $query->row('rstat_id') ) );\n\t\t\t}\n\n\t\t\t//----------------------------------------\n\t\t\t// Lets count for global stats!\n\t\t\t//----------------------------------------\n\t\t\t$total['num_fields']++;\n\t\t\t$total['rating_last_date'] = ($stats['rating_last_date'] > $total['rating_last_date']) ? $stats['rating_last_date'] : $total['rating_last_date'];\n\t\t\t$total['rating_total'] += $stats['rating_total'];\n\t\t\t$total['rating_avg'] += $stats['rating_avg'];\n\t\t\t$total['rating_sum'] += $stats['rating_sum'];\n\n\t\t\t$query->free_result();\n\t\t}\n\n\t\t/** ----------------------------------------\n\t\t/** Global Stats\n\t\t/** ----------------------------------------*/\n\t\t//$total['rating_total'] = $total['rating_total'] / $total['num_fields'];\n\t\t$total['rating_total'] = $total['rating_total'];\n\t\t$total['rating_avg'] = $total['rating_avg'] / $total['num_fields'];\n\t\t//$total['rating_sum'] = $total['rating_sum'] / $total['num_fields'];\n\t\t$total['rating_sum'] = $total['rating_sum'];\n\n\t\t// Does our GLOBAL stats entry exist for this entry?\n\t\t$this->EE->db->select('rstat_id');\n\t\t$this->EE->db->from('exp_channel_ratings_stats');\n\t\t$this->EE->db->where('entry_id', $data['entry_id']);\n\t\t$this->EE->db->where('item_id', $data['item_id']);\n\t\t$this->EE->db->where('field_id', 0);\n\t\t$this->EE->db->where('collection_id', $data['collection_id']);\n\t\tif ($global_type == FALSE) $this->EE->db->where('rating_type', $data['rating_type']);\n\t\telse $this->EE->db->where('rating_type', 0);\n\t\t$this->EE->db->limit(1);\n\t\t$query = $this->EE->db->get();\n\n\t\tunset($total['num_fields']); // We don't want this one ;)\n\n\t\t//----------------------------------------\n\t\t// Update Or Insert?\n\t\t//----------------------------------------\n\t\tif ($query->num_rows() == 0)\n\t\t{\n\t\t\t// new one Insert!\n\t\t\t$total['site_id']\t= $this->site_id;\n\t\t\t$total['entry_id'] = $data['entry_id'];\n\t\t\t$total['item_id'] = $data['item_id'];\n\t\t\t$total['channel_id'] = $data['channel_id'];\n\t\t\t$total['collection_id'] = $data['collection_id'];\n\t\t\tif ($global_type == FALSE) $total['rating_type'] = $data['rating_type'];\n\t\t\telse $total['rating_type'] = 0;\n\t\t\t$total['field_id'] = 0;\n\n\t\t\t$this->EE->db->insert( 'exp_channel_ratings_stats', $total);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Update it!\n\t\t\t$this->EE->db->update( 'exp_channel_ratings_stats', $total, array('rstat_id' => $query->row('rstat_id') ) );\n\t\t}\n\n\t\t$query->free_result();\n\n\t\t// Delete all ZERO rating stats :)\n\t\t//$this->EE->db->query(\"DELETE FROM exp_channel_ratings_stats WHERE rating_total = 0\");\n\t\t$this->EE->db->query(\"DELETE FROM exp_channel_ratings_stats WHERE rating_sum = 0\");\n\n\t\treturn;\n\t}", "public function getStats()\n\t{\n\t $this->load->model('tasks');\n\t $this->tasks->truncate('stats');\n\t $this->load->model('configuration');\n\t $dbList = $this->configuration->getDBList();\n\t foreach($dbList->result() as $db)\n\t $this->tasks->pullStats($db->dbGroup,$db->friendlyName);\n\n\t $this->_updateCronStats();\n\t}", "public function generateStats()\n {\n $this->cache = json_decode (file_get_contents ($this->cfg_cache_file), true);\n if (!is_array ($this->cache)) $this->cache = array();\n if (!isset ($this->cache['index'])) $this->cache['index'] = array();\n if (!isset ($this->cache['total'])) $this->cache['total'] = 0;\n if (!isset ($this->cache['size'])) $this->cache['size'] = 0;\n $edited = false;\n if (!isset ($this->cache['timecache']))\n {\n //print \"No cache\";\n $this->generateTimeInterval();\n $this->cache['timecache'] = array (\n \"generated\" => date (\"d-m-Y\"),\n \"day\" => $this->stats->screenshots_per_day,\n \"month\" => $this->stats->screenshots_per_month\n );\n }\n else\n {\n $today = date (\"d-m-Y\");\n $gen_month = false; $gen_day = false;\n if (substr ($today, 3) != substr ($this->cache['timecache']['generated'], 3))\n $gen_month = true;\n if ($today != $this->cache['timecache']['generated'])\n $gen_day = true;\n if ($gen_day || $gen_month)\n {\n $this->generateTimeInterval ($gen_month, $gen_day);\n //print \"Generating timecache: [{$gen_month} / {$gen_day}]\";\n $this->cache['timecache']['generated'] = $today;\n if ($gen_day)\n $this->cache['timecache']['day'] = $this->stats->screenshots_per_day;\n else\n $this->stats->screenshots_per_day = $this->cache['timecache']['day'];\n if ($gen_month)\n $this->cache['timecache']['month'] = $this->stats->screenshots_per_month;\n else\n $this->stats->screenshots_per_month = $this->cache['timecache']['month'];\n $edited = true;\n }\n else\n {\n $this->stats->screenshots_per_day = $this->cache['timecache']['day'];\n $this->stats->screenshots_per_month = $this->cache['timecache']['month'];\n }\n }\n // $this->cache = array ( 'total' => n, 'size' => n, 'index' => array ('name' => date)) )\n $flist = glob (\"{$this->cfg_img_path}/*.{{$this->cfg_extensions}}\", GLOB_BRACE);\n foreach ($flist as $file)\n {\n if (!isset ($this->cache['index'][$file]))\n {\n $edited = true;\n $_stat = stat ($file);\n $this->cache['index'][$file] = date ('d-m-Y', $_stat['mtime']) . '/' . $_stat['size'];\n $this->cache['size'] += $_stat['size'];\n $this->cache['total'] += 1;\n }\n $_date = substr ($this->cache['index'][$file], 0, strpos ($this->cache['index'][$file], '/'));\n $month = substr ($_date, 3);\n if (isset ($this->stats->screenshots_per_day[$_date]))\n $this->stats->screenshots_per_day[$_date]++;\n if (isset ($this->stats->screenshots_per_month[$month]))\n $this->stats->screenshots_per_month[$month]++;\n }\n if ($this->cfg_check_deleted)\n {\n foreach (array_diff (array_keys ($this->cache['index']), $flist) as $deleted)\n {\n $edited = true;\n $this->cache['size'] -= intval (substr ($this->cache['index'][$deleted], strpos ($this->cache['index'][$deleted], '/') + 1));\n $this->cache['total'] -= 1;\n unset ($this->cache['index'][$deleted]);\n }\n }\n $this->stats->total_files = $this->cache['total'];\n $this->stats->used_space = $this->cache['size'];\n //print_r ($this->stats->screenshots_per_day);\n //print($edited);\n if ($edited)\n file_put_contents ($this->cfg_cache_file, json_encode ($this->cache));\n return $this;\n }", "protected function update(){\n\t\t$this->aggregations = array();\n\t\t\n\t\t// also update any groups\n\t\tforeach($this->getGroups() as $group){\n\t\t\t$group->update();\n\t\t}\n\t}" ]
[ "0.67188734", "0.6527138", "0.634093", "0.6315318", "0.62692946", "0.5935375", "0.5893242", "0.5779762", "0.5761269", "0.5736024", "0.5734782", "0.5700259", "0.5681702", "0.56689024", "0.5665348", "0.56505257", "0.5645573", "0.5644526", "0.56223375", "0.5593789", "0.5589734", "0.55744654", "0.5568548", "0.55502045", "0.5545653", "0.55416566", "0.5537424", "0.55044913", "0.54997677", "0.54718083", "0.54579926", "0.54554516", "0.5452223", "0.54383826", "0.54123473", "0.5411399", "0.5407466", "0.5375883", "0.5352716", "0.5347507", "0.5347046", "0.53363585", "0.53340405", "0.5330319", "0.53289264", "0.5324446", "0.5311456", "0.53021955", "0.5296849", "0.52879757", "0.5286467", "0.5277652", "0.5276381", "0.52694136", "0.5252861", "0.52430314", "0.52412486", "0.5238539", "0.52290285", "0.52285576", "0.5223606", "0.52209693", "0.5211985", "0.5206641", "0.51994187", "0.5182084", "0.5179398", "0.51769716", "0.5172061", "0.51681", "0.51643467", "0.51556873", "0.5146723", "0.51447797", "0.5143007", "0.5124534", "0.51230085", "0.512114", "0.5115405", "0.51136786", "0.5112434", "0.51069796", "0.5094228", "0.50941205", "0.50933784", "0.50892276", "0.50881046", "0.50863063", "0.50807285", "0.50776017", "0.50722307", "0.50702345", "0.5064084", "0.506407", "0.5062214", "0.50606847", "0.5060619", "0.5060248", "0.5058673", "0.50539875" ]
0.6394207
2
Gets the total number of wins
public static function getWins($includeOpponents = true, $includeComputer = true) { $number = 0; $stats = self::get(); if ($includeOpponents && isset($stats[GameState::OPPONENT_WON])) { $number+= $stats[GameState::OPPONENT_WON]; } if ($includeComputer && isset($stats[GameState::COMPUTER_WON])) { $number+= $stats[GameState::COMPUTER_WON]; } return $number; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function totalPlayerWins()\n {\n $qb = $this->createQueryBuilder('r')\n ->select('COUNT(r)')\n ->where('r.win = true')\n ;\n\n return $qb->getQuery()->getSingleScalarResult();\n }", "public function totalComputerWins()\n {\n $qb = $this->createQueryBuilder('r')\n ->select('COUNT(r)')\n ->where('r.win = false AND r.tie = false')\n ;\n\n return $qb->getQuery()->getSingleScalarResult();\n }", "public function getWinPercent()\n {\n $total = array_sum($this->performance);\n\n if ($total == 0) {\n return 0;\n }\n\n return ($this->wins / $total) * 100;\n }", "public function getWinPercent()\n {\n $total = array_sum($this->performance);\n\n if ($total == 0) {\n return 0;\n }\n\n return ($this->wins / $total) * 100;\n }", "public function getWins()\n {\n return $this->wins;\n }", "public function countGame() {\r\n\t\t$sql = new Sql();\r\n\t\t$result = $sql->Select(\"SELECT COUNT(*) as count FROM jogo\");\r\n\t\tif(count($result) > 0) {\r\n\t\t\t\r\n\t\t\t$count = ($result[0]['count']) / 16;\r\n\t\t\treturn ceil($count);\r\n\t\t}\r\n\t}", "function countWin($userID)\n {\n $MC = $this->countMCWin($userID);\n $YN = $this->countYNWin($userID);\n return ($MC + $YN);\n }", "public function countTotalPlayers()\n {\n $sql = \"SELECT count(*) FROM `users`\";\n $result = $this->pdo->prepare($sql);\n $result->execute();\n // store the number of rows in a variable\n $number_of_rows = $result->fetchColumn(); \n return $number_of_rows;\n }", "public function getAverageWins()\n {\n return round($this->getWinsAttribute() / $this->teams->count());\n }", "public function getRoundsCount()\n {\n return $this->rounds()->count();\n }", "public function getWinPoints() : int {\n\t\treturn $this->winPoints;\n\t}", "public function getNumberPlayedMatches()\n {\n return $this->played;\n }", "function whoWins(){\n $winners = array();\n $n = 100;\n for($i=0;$i<=$n;$i++){\n $winner = playTournament();\n if(!isset($winners[$winner])){\n $winners[$winner] = 1;\n } else {\n $winners[$winner] += 1;\n }\n }\n arsort($winners);\n foreach($winners as $key=>$value){\n echo $key.' '.$value.\"\\n\";\n }\n}", "public function getRounds() : int\n {\n return $this->rounds;\n }", "public function totalTrophyCount(): int\n {\n $count = $this->bronze() + $this->silver() + $this->gold();\n\n return $this->hasPlatinum() ? ++$count : $count;\n }", "public static function myWonCount()\n {\n $query = new Query;\n return $query->select(['id'])->from('contest_proposal')->where(['user_won'=>'1', 'user_id' => \\Yii::$app->user->getId()])->count();\n }", "public function getTotalScore()\n {\n $score = 0;\n for ($i = 1; $i <= 3; $i++) {\n $score += $this->getBaseScoreForShot($i) * $this->getMultiplierForShot($i);\n }\n\n return $score;\n }", "function getWinRatio($player, $matches) {\n\t$matchesPlayed = 0;\n\t$matchesWon = 0;\n\tforeach ($matches as $key => $value) {\n\t\tif ($value['ChallengerID'] == $player || $value['DefenderID'] == $player) {\n\t\t\t$matchesPlayed++;\n\t\t\tif ($value['ChallengerID'] == $player && $value['ChallengerScore'] > $value['DefenderScore'] || $value['DefenderID'] == $player && $value['ChallengerScore'] < $value['DefenderScore']) {\n\t\t\t\t$matchesWon++;\n\t\t\t}\n\t\t}\n\t}\n\treturn $matchesWon / $matchesPlayed;\n}", "public function getCountPlayers(): int;", "public static function get_count_win()\n {\n $unique = self::$unique_user_obj->get_unique_user();\n $user_id = self::$storage_obj->get_id_user($unique);\n $count_pc = self::$storage_obj->get_count_win($user_id, 'pc');\n $count_user = self::$storage_obj->get_count_win($user_id, 'user');\n\n return response()->json(['count_pc' => $count_pc, 'count_user' => $count_user]);\n }", "static public function getPlayerCount() {\n\t\treturn (int)self::$playercount;\n\t}", "public function getWinsAttribute()\n {\n $wins = $this->allMatches()->filter(function ($match) {\n // Don't include playoff wins\n if ($match->isPlayoff()) {\n return false;\n }\n\n $home = ($this->id == $match->team1_id);\n if ($home && $match->team1_score > $match->team2_score) {\n return $match;\n }\n if (!$home && $match->team2_score > $match->team1_score) {\n return $match;\n }\n })->count();\n\n return $wins;\n }", "public function calcRating(){\n //opponents winning percentage\n $owp = 0.0;\n //oppponents opponents winning percentage\n $oowp = 0.0;\n //total number of opponents opponents\n $numOfOppOpps = 0;\n \n for($i=0; $i<$this->numOfOpponents; $i++){\n $opp = $this->teamsPlayed[$i];\n $owp += $opp->getWP();\n for($j=0; $j<$opp->numOfOpponents; $j++){\n \t$oppOpp = $opp->getOpponentByIndex($j);\n \t$oowp += $oppOpp->getWP();\n \t$numOfOppOpps++;\n } \n }\n if($owp == 0 || $this->numOfOpponents == 0){\n $owp = 0;\n } else {\n $owp = $owp/$this->numOfOpponents;\n }\n if($oowp == 0 || $numOfOppOpps == 0){\n $oowp == 0;\n } else {\n $oowp = $oowp/$numOfOppOpps;\n }\n $this->rating = ($this->getWP() *0.25) +\n \t\t ($owp * 0.50) +\n \t\t ($oowp *0.25);\n }", "public function roll()\n {\n $res = $this->dice->roll();\n if ($res == 1) {\n $this->dice->reset();\n $this->gamerounds[] = 0;\n }\n $this->roundsum = array_sum($this->dice->rolls());\n\n if (array_sum($this->gamerounds) + $this->roundsum >= 100) {\n $this->gamerounds[] = $this->roundsum;\n echo \"<script>alert('$this->name won')</script>\";\n $res = 100;\n }\n\n return $res;\n }", "public function getLostPoints() : int {\n\t\treturn $this->lostPoints;\n\t}", "public function silverTrophyCount(): int\n {\n return $this->pluck('definedTrophies.silver');\n }", "public function count()\n {\n return $this->timesRepeat * count($this->test);\n }", "public function amountPlayersRecords(){\n $sql = \"SELECT COUNT(*) as contagem FROM jogador\";\n $result = $this->connection->dataBase->Execute($sql);\n $record = $result->FetchNextObject();\n return $record->CONTAGEM;\n\t}", "public function totalTimesPlayerPlayed(int $choice)\n {\n $qb = $this->createQueryBuilder('r')\n ->select('COUNT(r)')\n ->where('r.playerChoice = :choice')\n ->setParameter('choice', $choice)\n ;\n\n return $qb->getQuery()->getSingleScalarResult();\n }", "public function getNumberOfRuns() {\n return (float) $this->profile->userTotals->totalRuns;\n }", "function countYNWin($userID)\n\t{\n\t\t$this->db->where('IS_WINNER', true);\n $this->db->where('USER_ID', $userID);\n $this->db->from('YN_GAME_LOGS');\n return $this->db->count_all_results();\n\t}", "public function getTeamCount()\n {\n return $this->count(self::_TEAM);\n }", "public function earnedTrophiesBronzeCount(): int\n {\n return $this->pluck('earnedTrophies.bronze');\n }", "public function count()\r\n {\r\n\t\tif ( null === $this->totalResults )\r\n\t\t{\r\n\t\t\t$this->warmUp();\r\n\t\t}\r\n\r\n\t\treturn $this->totalResults;\r\n\t}", "public function bronzeTrophyCount(): int\n {\n return $this->pluck('definedTrophies.bronze');\n }", "function calcAmountOfRewards()\n {\n $payoutPercentage = getPayoutPercentage();\n $totalBetCount = getAmountOfBets();\n\n return floor($payoutPercentage * $totalBetCount);\n }", "public function getTotal(): int\n {\n return\n $this->getAttack() +\n $this->getDefense() +\n $this->getStamina();\n }", "function getwonum() {\n return $this->wonum;\n }", "public function trophyCount(): int\n {\n $count = ($this->bronzeTrophyCount() + $this->silverTrophyCount() + $this->goldTrophyCount());\n\n if ($this->hasPlatinum()) {\n $count++;\n }\n\n return $count;\n }", "public function totalTimesComputerPlayed(int $choice)\n {\n $qb = $this->createQueryBuilder('r')\n ->select('COUNT(r)')\n ->where('r.computerChoice = :choice')\n ->setParameter('choice', $choice)\n ;\n\n return $qb->getQuery()->getSingleScalarResult();\n }", "public function winRound() {\n\n\t\t$this->points++;\n\n\t\t$this->output($this->name.' has won this round');\n\t}", "public function countGame()\n {\n }", "public function getWinCnt()\n {\n return $this->get(self::_WIN_CNT);\n }", "public function totalAmountOfShopsCodeOnlineThisWeek()\n {\n return Shop::getTotalAmountOfShopsCodeOnlineThisWeek();\n\n }", "public function goldTrophyCount(): int\n {\n return $this->pluck('definedTrophies.gold');\n }", "public function totalLevel()\n {\n if ($this->noTotalLevelFound) {\n $sum = 0;\n foreach($this instanceof OSRSPlayer ? OSRSHiscores::SKILL_MAP : RS3Hiscores::SKILL_MAP as $skill) {\n if ($skill === 'Overall') {\n // 'Overall' is a cumulative so we skip it for the sum.\n continue;\n }\n $sum += $this->get($skill)->level ?: 1;\n }\n return $sum;\n }\n return $this->get('overall')->level;\n }", "public function calculateTotalLunch()\n\t{\n\t\t$result = 0;\n\n\t\t$passengers = $this->getPassengers();\n\n\t\tif( count($passengers) )\n\t\t{\n\t\t\tforeach ($passengers as $passenger)\n\t\t\t{\n\t\t\t\tif( (int)$passenger->status < 3 )\n\t\t\t\t{\n\t\t\t\t\tif($passenger->lunch)\n\t\t\t\t\t{\n\t\t\t\t\t\t$result++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\treturn $result;\n\t}", "public function getHpCount()\n {\n return $this->count(self::_HP);\n }", "public function getTiesAttribute()\n {\n $wins = $this->allMatches()->filter(function ($match) {\n if ($match->team1_score == $match->team2_score) {\n return $match;\n }\n })->count();\n\n return $wins;\n }", "public function averageWatchedPerWeek()\n {\n// $totals = array_pluck(\\DB::table('films')\n// ->where('watched', true)\n// ->select(\\DB::raw('count(title) AS count, WEEK(watched_on, 2) AS `week`'))\n// ->groupBy('week')\n// ->get(), 'count');\n\n $total = $this->model->watched()->count();\n\n return number_format($total / floor(\\Carbon\\Carbon::now()->dayOfYear / 7 + 1), 1);\n }", "public function get_total_webboard( $id = '' )\n {\n $this->db->where( 'account_id', $id );\n $this->db->where( 'sub_id', 0 );\n $this->db->where( 'status', 1 );\n $query = $this->db->get( 'webboard' );\n $num_row = $query->num_rows();\n\n return $num_row;\n\n\n\n }", "public function earnedTrophiesGoldCount(): int\n {\n return $this->pluck('earnedTrophies.gold');\n }", "protected function getNumberOfWeeks()\n {\n $first = date(\"w\", strtotime($this->date));\n $last = date(\"t\", strtotime($this->date));\n return (1 + ceil(($last - 7 + $first) / 7));\n }", "public function totalScore($scorePulls);", "public static function storiesLength() {\n $conexion = StorianDB::connectDB();\n $query = $conexion->query(\"SELECT * FROM `cuento`\");\n return $query->rowCount();\n }", "public function winloss()\n {\n $sql = '\n SELECT \n t.name,\n ( \n ( SELECT COUNT(*)\n FROM matches m\n WHERE m.match_date_time < CURDATE()\n AND m.team1_id=t.id\n AND m.team1_goalcount > m.team2_goalcount ) +\n ( SELECT COUNT(*)\n FROM matches m\n WHERE m.match_date_time < CURDATE()\n AND m.team2_id=t.id\n AND m.team1_goalcount < m.team2_goalcount ) \n ) wins,\n ( \n ( SELECT COUNT(*)\n FROM matches m\n WHERE m.match_date_time < CURDATE()\n AND m.team1_id=t.id\n AND m.team1_goalcount < m.team2_goalcount ) +\n ( SELECT COUNT(*)\n FROM matches m\n WHERE m.match_date_time < CURDATE()\n AND m.team2_id=t.id\n AND m.team1_goalcount > m.team2_goalcount )\n ) losses\n FROM teams t';\n\n return view( 'winloss', ['matches' => \\DB::select( $sql ) ] );\n }", "public function getTestsSum(): int\n {\n return count($this->tests);\n }", "public function totalAmountOfShopsCodeOnlineLastWeek()\n {\n return Shop::getTotalAmountOfShopsCodeOnlineLastWeek();\n\n }", "function countMCWin($userID)\n {\n $this->db->where('IS_WINNER', true);\n $this->db->where('USER_ID', $userID);\n $this->db->from('MULTI_CHOICE_GAME_LOGS');\n return $this->db->count_all_results();\n }", "public function totalResults()\n {\n\t\treturn (int) $this->totalResultsReturned;\n }", "function numberOfFriendships() {\n $numOfFriends = 0;\n\n $db = new Database();\n\n $sql = 'SELECT COUNT(*) as count FROM Friends';\n\n $result = $db->select($sql);\n\n $numOfFriends = $result['count'] / 2;\n\n return $numOfFriends;\n }", "protected function cost()\n {\n return $this->rounds;\n }", "public function earnedTrophiesSilverCount(): int\n {\n return $this->pluck('earnedTrophies.silver');\n }", "public function getNumberTrophies()\r\n {\r\n return count($this->trophies);\r\n }", "public function calculateTotalBreakfast()\n\t{\n\t\t$result = 0;\n\t\t$passengers = $this->getPassengers();\n\n\t\tif( count($passengers) )\n\t\t{\n\t\t\tforeach ($passengers as $passenger)\n\t\t\t{\n\t\t\t\tif( (int)$passenger->status < 3 )\n\t\t\t\t{\n\t\t\t\t\tif($passenger->breakfast)\n\t\t\t\t\t{\n\t\t\t\t\t\t$result++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function getTeamsCount()\n {\n return $this->count(self::_TEAMS);\n }", "public function getOppoHeroesCount()\n {\n return $this->count(self::_OPPO_HEROES);\n }", "public function getSeatCount()\r\n {\r\n return $this->getPassengerCount();\r\n }", "public function count()\n {\n return $this->onlineUsers->count();\n }", "public static function calculateNumRounds($numTeams) {\n return intval(log($numTeams, 2));\n }", "public function getLossesAttribute()\n {\n $wins = $this->allMatches()->filter(function ($match) {\n // Don't include playoff wins\n if ($match->isPlayoff()) {\n return false;\n }\n\n $home = $this->id == $match->team1_id;\n if ($home && $match->team1_score < $match->team2_score) {\n return $match;\n }\n if (!$home && $match->team2_score < $match->team1_score) {\n return $match;\n }\n })->count();\n\n return $wins;\n }", "public function totalAmountOfShopsCodeOnline()\n {\n return Shop::getTotalAmountOfShopsCodeOnline();\n\n }", "public function getAllInBetSize(): float\n\t{\n\t\t//No more betting\n\t\tif(!$this->streetsLeft)\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\n\t\t//Get the minimum SPR\n\t\t$minSPR = min(\n\t\t\t$this->getSPRForPlayer(0),\n\t\t\t$this->getSPRForPlayer(1)\n\t\t);\n\n\t\t//Get the number of players\n\t\t$numPlayers = count($this->players);\n\n\t\treturn (pow(($numPlayers * $minSPR + 1), 0.33) - 1) / $numPlayers;\n\t}", "public function getTotalFromRule() {\n\t\treturn $this->getScoreFromRuleInternal($this->registration->competition->rule, true);\n\t}", "public function getTotalSumNbReminderSent()\n {\n $nbSent = Mage::getModel('abandonment/stats')->getResource()\n ->getSumReminderSent();\n return $nbSent;\n }", "public function totalAmountOfShops()\n {\n return Shop::getTotalAmountOfShops();\n\n }", "public function getTotalNumberOfResults();", "public function getAverageLosses()\n {\n return round($this->getLossesAttribute() / $this->teams->count());\n }", "public function getWon()\n {\n return $this->won;\n }", "function getTotalGrantsApplied() {\n\t\treturn $this->getMovieCount();\n\t}", "public function getTalksCount()\n {\n return $this->count(self::TALKS);\n }", "public function getTotalResults() : int\n {\n return $this->totalResults;\n }", "public function total_results()\n\t{\n\t\t$results = $this->get_results();\n\t\t$total = 0;\n\n\t\tforeach\t( $results as $set ) {\n\t\t\t$total = $total + count( $set );\n\t\t}\n\n\t\treturn $total;\n\t}", "public function getTotalResults(): int\n {\n return $this->totalResults;\n }", "public function getTotalWork() {\n $hours_worked = 0;\n \n foreach($this->Work() as $work) {\n if($work->Hours)\n $hours_worked += $work->Hours;\n }\n \n return $hours_worked;\n }", "public function getAttackCount()\n {\n return $this->count(self::ATTACK);\n }", "public function getPlayerNumber($game){\n return DB::table('players')->where(['game_id' => $game->id])->count();\n }", "public function getCombatCount()\n {\n return $this->count(self::COMBAT);\n }", "public function getAverageTies()\n {\n return round($this->getTiesAttribute() / $this->teams->count());\n }", "public function getPlayersNbr ()\r\n {\r\n return $this->playersNbr;\r\n }", "public function getNumber_hits()\n {\n return $this->number_hits;\n }", "public function GetNumberOfResults()\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n $ret = 0;\n \n if (!$this->_my_root && $this->_search_results instanceof c_comdef_meetings) {\n $ret = $this->_search_results->GetNumMeetings();\n } elseif ($this->_my_root instanceof c_comdef_meeting_search_manager) {\n $ret = $this->_my_root->GetNumberOfResults();\n }\n \n return $ret;\n }", "public function getRewardsCount()\n {\n return $this->count(self::_REWARDS);\n }", "public function getRewardsCount()\n {\n return $this->count(self::_REWARDS);\n }", "public function getRewardsCount()\n {\n return $this->count(self::_REWARDS);\n }", "public function getRewardsCount()\n {\n return $this->count(self::_REWARDS);\n }", "public function getRewardsCount()\n {\n return $this->count(self::_REWARDS);\n }", "public function getRewardsCount()\n {\n return $this->count(self::_REWARDS);\n }", "public function getRewardsCount()\n {\n return $this->count(self::_REWARDS);\n }", "public function getRewardsCount()\n {\n return $this->count(self::_REWARDS);\n }" ]
[ "0.83989877", "0.816922", "0.7718205", "0.7718205", "0.7449752", "0.71423286", "0.7052044", "0.69959015", "0.6981016", "0.68820983", "0.6860618", "0.67876786", "0.6651585", "0.66450506", "0.66443545", "0.6626646", "0.65992785", "0.655434", "0.65114754", "0.6489861", "0.6465471", "0.6436143", "0.6397399", "0.6374773", "0.63596994", "0.63590705", "0.63572705", "0.63505363", "0.63292545", "0.63111675", "0.6268096", "0.62579477", "0.62486005", "0.62230545", "0.6214495", "0.6213682", "0.62075293", "0.6196378", "0.61936665", "0.61766803", "0.6170836", "0.6163536", "0.6157907", "0.61468613", "0.61460954", "0.61297685", "0.61169946", "0.6108828", "0.6107511", "0.61006457", "0.6093551", "0.60892093", "0.6088044", "0.6079098", "0.6074126", "0.60730106", "0.6071909", "0.60650575", "0.6052224", "0.60438824", "0.60374814", "0.603405", "0.6030619", "0.60184675", "0.60103196", "0.59636694", "0.5959691", "0.5944641", "0.59272027", "0.59241164", "0.5923801", "0.59187746", "0.5914966", "0.58903503", "0.58801174", "0.5866467", "0.5865303", "0.58643067", "0.58592576", "0.5849569", "0.5840666", "0.58394897", "0.5835815", "0.58285147", "0.5825604", "0.58116907", "0.58087623", "0.58076525", "0.57903665", "0.57902026", "0.57897586", "0.5786512", "0.57836145", "0.57836145", "0.57836145", "0.57835704", "0.57835704", "0.57835704", "0.57835704", "0.57835704" ]
0.7413976
5
Gets the total number of throws by types
public static function getDecisions(int $decisionTypeId, $includeOpponents = true, $includeComputer = true) { $number = 0; $stats = self::get(); if ($includeOpponents && isset($stats[self::STATISTIC_OPPONENT_DRAW_PREFIX][$decisionTypeId])) { $number+= $stats[self::STATISTIC_OPPONENT_DRAW_PREFIX][$decisionTypeId]; } if ($includeComputer && isset($stats[self::STATISTIC_COMPUTER_DRAW_PREFIX][$decisionTypeId])) { $number+= $stats[self::STATISTIC_COMPUTER_DRAW_PREFIX][$decisionTypeId]; } return $number; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getErrorCount();", "public function getNumberOfTypes(): int;", "private function get_count( array $stats, $type = 'getCorrectCount' ) {\n\t\t\t$count = 0;\n\n\t\t\tforeach ( $stats as $stat ) {\n\t\t\t\t$count = $count + $stat->$type();\n\t\t\t}\n\n\t\t\treturn $count;\n\t\t}", "public function getCounts()\n {\n if (!$this->counts) {\n throw new Exception ('Counts are available after calling optimizeCss()');\n }\n\n return $this->counts;\n }", "public function count() {\n return count($this->_errors);\n }", "public function count()\r\n {\r\n return count($this->errors);\r\n }", "public function count()\r\n {\r\n return count($this->errors);\r\n }", "public function count()\n {\n return count($this->errors);\n }", "public function count(): int\n {\n return count($this->violations);\n }", "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 }", "public function getExcavateCount()\n {\n return $this->count(self::_EXCAVATE);\n }", "public function getResultAllCount() {\n if (is_null($this->response)) {\n throw new Exception('Response is NULL');\n }\n return count($this->response);\n }", "public function getErrorcount() : int\n {\n return count($this->errors);\n }", "public function getImportCount();", "public function getErrorsCount()\n {\n return $this->count(self::ERRORS);\n }", "protected function getCount($sType) {\n switch ($sType) {\n case 'final' : {\n $sCount = 'plugin';\n $aCount = array('', 'mkdir', 'cp');\n break;\n }\n case 'total_plugin' : {\n $sCount = 'plugin';\n $aCount = array('', 'mkdir', 'cp', 'rm', 'rmdir');\n break;\n }\n case 'action_plugin' : {\n $sCount = 'plugin';\n $aCount = array('mkdir', 'cp', 'rm', 'rmdir');\n break;\n }\n case 'total_staging' : {\n $sCount = 'staging';\n $aCount = array('', 'mkdir', 'cp', 'rm', 'rmdir');\n break;\n }\n case 'action_staging' : {\n $sCount = 'staging';\n $aCount = array('mkdir', 'cp', 'rm', 'rmdir');\n break;\n }\n case 'remote_plugin' : {\n return isset($this->aMeta['remoteActions']['plugin']) ? count($this->aMeta['remoteActions']['plugin']) : 0;\n }\n case 'remote_staging' : {\n return isset($this->aMeta['remoteActions']['staging']) ? count($this->aMeta['remoteActions']['staging']) : 0;\n }\n default : {\n return 0;\n }\n }\n $iCount = 0;\n foreach (array_keys($this->aSequences[$sCount]) as $sAction) {\n if (in_array($sAction, $aCount)) {\n $iCount += count($this->aSequences[$sCount][$sAction]);\n }\n }\n return $iCount;\n }", "public function getReturnedErrorCount()\n {\n $errors = 0;\n foreach ($this->data['calls'] as $call) {\n $errors += ($call['statusCode'] != 200) ? 1 : 0;\n }\n\n return $errors;\n }", "public function countErrors()\n {\n return isset($this->data['error_count']) ? $this->data['error_count'] : 0;\n }", "public function errorCount()\n\t{\n\t\treturn count($this->errors);\n\t}", "public function getErrorCount() {\n return $this->getValidation()->getErrorCount($this->getName());\n }", "public function getEventTypeCount(): int\n {\n return count($this->getSplitEventType());\n }", "public function getTotalCount();", "public function getTotalCount();", "public function getTotalCount();", "public function errorCount() {\n $query = $this->connection->select($this->mapTable);\n $query->addExpression('COUNT(*)', 'count');\n $query->condition('needs_update', MigrateMap::STATUS_FAILED);\n $count = $query->execute()->fetchField();\n return $count;\n }", "public function get_item_counts_by_type($type) {\n $counts = array();\n\n foreach ($type as $key) {\n $counts[$key] = 0;\n }\n\n foreach ($this->get_items_by_type($type) as $key => $content) {\n $counts[$key] = count($content);\n }\n\n return $counts;\n }", "public function rowTotalCount() {\n if (is_null($this->response)) {\n throw new Exception('Response in NULL');\n }\n return $this->response->found;\n }", "public function count()\r\n {\r\n return count($this->decorators);\r\n }", "public function count($type = 'row')\n {\n if ($type == 'row') {\n return sasql_num_rows($this->result);\n }\n\n return sasql_num_fields($this->connection);\n }", "public function countViolations()\n {\n return count($this->violations);\n }", "public function count(): int;", "public function count(): int;", "public function count(): int;", "public function count(): int;", "public function count(): int;", "public function count(): int;", "public function count(): int;", "public function count(): int;", "public function count(): int;", "public function count(): int;", "public function count(): int\n {\n return count($this->testCases);\n }", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function getSPITFPErrorCount()\n {\n $ret = array();\n\n $payload = '';\n\n $data = $this->sendRequest(self::FUNCTION_GET_SPITFP_ERROR_COUNT, $payload);\n\n $payload = unpack('V1error_count_ack_checksum/V1error_count_message_checksum/V1error_count_frame/V1error_count_overflow', $data);\n\n $ret['error_count_ack_checksum'] = IPConnection::fixUnpackedUInt32($payload, 'error_count_ack_checksum');\n $ret['error_count_message_checksum'] = IPConnection::fixUnpackedUInt32($payload, 'error_count_message_checksum');\n $ret['error_count_frame'] = IPConnection::fixUnpackedUInt32($payload, 'error_count_frame');\n $ret['error_count_overflow'] = IPConnection::fixUnpackedUInt32($payload, 'error_count_overflow');\n\n return $ret;\n }", "public function count()\n {\n return $this->client->count($this->compile())['count'];\n }", "function yith_ywraq_notice_count( $notice_type = '' ) {\n\t\t$session = YITH_Request_Quote()->session_class;\n\t\t$notice_count = 0;\n\t\t$all_notices = $session->get( 'yith_ywraq_notices', array() );\n\n\t\tif ( isset( $all_notices[ $notice_type ] ) ) {\n\t\t\t$notice_count = absint( sizeof( $all_notices[ $notice_type ] ) );\n\t\t} elseif ( empty( $notice_type ) ) {\n\t\t\t$notice_count += absint( sizeof( $all_notices ) );\n\t\t}\n\n\t\treturn $notice_count;\n\t}", "public function count() {\n return count($this->cast);\n }", "public function countAll(): int;", "public function getErrorCount()\r\n {\r\n return sizeof($this->errors);\r\n }", "public function typeCount(int $type) : int\n {\n $counts = $this->typeCounts();\n\n return $counts[$type] ?? 0;\n }", "public function assertionCount(/* ... */)\n {\n return $this->_assertionCount;\n }", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function incrementErrorCount();", "protected function getSecurityCount()\n\t{\n\t\t$count = App\\Log::getLogs('access_for_admin', 'oneDay', true);\n\t\t$count += App\\Log::getLogs('access_to_record', 'oneDay', true);\n\t\t$count += App\\Log::getLogs('access_for_api', 'oneDay', true);\n\t\treturn $count + App\\Log::getLogs('access_for_user', 'oneDay', true);\n\t}", "public function getTypesCount(bool $published = true) : int {\n $count = 0;\n if( !$this->dry() ){\n /**\n * @var $group GroupModel\n */\n foreach($groups = $this->getGroups($published) as $group){\n $count += $group->getTypesCount($published);\n }\n }\n return $count;\n }", "function GetSwarmTypeTotal($type)\n \t{\n \t global $swarmtype_count;\n \t $static_type = array();\n \t $move_type = array();\n \t if(is_array($swarmtype_count)) {\n \t foreach($swarmtype_count as $i) {\n\t\t if($i == 'static') {\n \t \tarray_push($static_type,$i);\n \t } else if($i =='move') {\n \t array_push($move_type,$i);\n \t }\n \t }\n \t }\n \t switch($type)\n \t {\n \t \tcase 'static' : return sizeof($static_type); break;\n \t \tcase 'move' : return sizeof($move_type); break;\n \t }\n\t}", "public function testAggregateCount() {\n $this->setupTestEntities();\n\n $view = Views::getView('test_aggregate_count');\n $this->executeView($view);\n\n $this->assertCount(2, $view->result, 'Make sure the count of items is right.');\n\n $types = [];\n foreach ($view->result as $item) {\n // num_records is an alias for id.\n $types[$item->entity_test_name] = $item->num_records;\n }\n\n $this->assertEquals(4, $types['name1']);\n $this->assertEquals(3, $types['name2']);\n }", "public static function count();", "public function getFailureCount(): int\n {\n return (int) $this->_getEntity()->getFailureCount();\n }", "public function totalCount();", "public function totalCount();", "public function count(): int\n {\n return count(\n /** @scrutinizer ignore-type */\n $this->getArchive()\n );\n }", "public function getResultCount()\n {\n return $this->count(self::_RESULT);\n }", "public function getResultCount()\n {\n return $this->count(self::_RESULT);\n }", "public function countErrors()\n {\n return count($this->errors);\n }", "public function dollTypeCount($type)\n\t{\n\t\t$count = $this->doll->whereHas('dolltypes', function($q) use ($type) {\n\t\t\t$q->where('slug', $type);\n\t\t})->count();\n\n\t\treturn $count;\n\t}", "public function testCountReturnsInt(): void\n {\n self::assertSame(0, $this->sut->count());\n \n $this->sut->addParameterDeclaration(\n ConceptDoubleBuilder::createParameterDeclaration($this)->getDouble()\n );\n self::assertSame(1, $this->sut->count());\n \n $this->sut->addParameterDeclaration(\n ConceptDoubleBuilder::createParameterDeclaration($this)->getDouble()\n );\n self::assertSame(2, $this->sut->count());\n \n $this->sut->addParameterDeclaration(\n ConceptDoubleBuilder::createParameterDeclaration($this)->getDouble()\n );\n self::assertSame(3, $this->sut->count());\n }", "public function getReportedObjectCount($type)\r\n {\r\n global $db;\r\n \r\n $query = $db->prepare(\"SELECT count(objectID) FROM \" . TABLE_REPORTS . \" WHERE reportStatus=1 AND objectType=%s\", $type);\r\n $count = $db->getVar($query);\r\n \r\n return $count;\r\n }", "public function getCant() {\n\t\treturn $this->db->count_all ( self::TABLE_NAME );\n\t}" ]
[ "0.6594597", "0.6349561", "0.6251993", "0.61659163", "0.5998645", "0.59944147", "0.59944147", "0.59918886", "0.5971147", "0.5806768", "0.57627934", "0.57592833", "0.5733434", "0.57288146", "0.56933475", "0.5677652", "0.5663938", "0.5610491", "0.561032", "0.5596796", "0.55906796", "0.5571081", "0.5571081", "0.5571081", "0.5563547", "0.5547291", "0.55314237", "0.5524475", "0.55232996", "0.5483454", "0.54801255", "0.54801255", "0.54801255", "0.54801255", "0.54801255", "0.54801255", "0.54801255", "0.54801255", "0.54801255", "0.54801255", "0.5472211", "0.54669845", "0.54669845", "0.54668003", "0.54668003", "0.54668003", "0.54668003", "0.54668003", "0.54668003", "0.54668003", "0.54668003", "0.54668003", "0.54668003", "0.54668003", "0.546363", "0.54562443", "0.54534954", "0.54493916", "0.5449055", "0.54309064", "0.54270023", "0.54264843", "0.5426433", "0.5426433", "0.5426433", "0.5426433", "0.5426433", "0.5426433", "0.5426433", "0.5426433", "0.5426433", "0.5426433", "0.5426433", "0.5426433", "0.5426433", "0.5426433", "0.5426433", "0.5426433", "0.5426433", "0.5426433", "0.5426433", "0.5426433", "0.5426433", "0.5426433", "0.5424449", "0.54220283", "0.5420164", "0.5419799", "0.5412553", "0.5411491", "0.5405089", "0.53989786", "0.53989786", "0.5398618", "0.5397739", "0.53972054", "0.5394634", "0.53806853", "0.5378178", "0.53695285", "0.5358835" ]
0.0
-1
Provides data for testTemplatePreprocessUpdateReport().
public function providerTemplatePreprocessUpdateReport() { return [ '$variables with data not set' => [ [], ], '$variables with data as an interger' => [ ['data' => 4], ], '$variables with data as a string' => [ ['data' => 'I am a string'], ], ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function templateData()\n {\n return $this->templateData;\n }", "public function templateData() {\n return array();\n }", "protected function getTemplateData() {\r\n return $this->templateData;\r\n }", "protected function preprocessData() {}", "function prepareTemplateVars() {\n\t\t$calcModel = KenedoModel::getModel('ConfigboxModelAdmincalculations');\n\t\t$this->calculations = $calcModel->getRecords(array('admincalculations.product_id'=>$this->productId));\n\n\t\t$this->addViewCssClasses();\n\n\t}", "public function get_tpl_data() {\r\n $tpl_data = parent::get_tpl_data();\r\n $tpl_data['significance'] = $this->significance;\r\n return $tpl_data;\r\n }", "private function _init()\n\t{\n\t\t$data = array();\n\t\t$data['CONTROLLER_NAME'] = $this->controllerTemplate->get_name();\n\t\t$data['VIEW_NAME'] = $this->viewTemplate->get_name();\n\t\t$data['VIEW_NAME_LINK'] = $this->viewTemplate->get_link();\n\t\t$data['MODEL_NAME'] = $this->modelTemplate->get_name();\n\t\t$data['TABLE_VIEW'] = $this->tableTemplate->get_name();\n\t\t$data['TABLE_VIEW_LINK'] = $this->tableTemplate->get_link();\n\t\t$data['DB_TABLE_NAME'] = $this->model->get_table_name();\n\t\t$data['MODEL_INSTANCE_VARIABLES'] = $this->modelTemplate->get_vars();\n\t\t$data['MODEL_SELECT_COLUMNS'] = $this->modelTemplate->get_columns();\n\n\t\treturn $data;\n\t}", "public function ReportesData(){\n\t\t$this->status=\"1\";\n\t\t$this->created_at = \"NOW()\";\n\t}", "public function getTemplateData()\n {\n return $this->data;\n }", "protected function getTemplateData()\n {\n return (new MigrationData($this->argument('migrationName'), $this->option('fields')))->fetch();\n }", "protected function parsedTemplateData(){\n if( $this->_parsedTemplateData === null ){\n $this->_parsedTemplateData = $this->getHelper('json')->decode( $this->templateData );\n }\n return $this->_parsedTemplateData;\n }", "protected function postProcessCopyFromTemplate()\n {\n }", "private function getAfterUpdateOrderTestData()\n {\n $testOrderData = [\n 'order.id' => 1,\n 'order.status' => 'processing',\n 'order.paymentMethod' => 'checkmo'\n ];\n\n return $testOrderData;\n }", "protected function getDataTemplate()\n {\n $mainProduct = Mage::registry('current_product');\n if (!$mainProduct) {\n return array();\n }\n\n $idFieldName = Mage::helper('factfinder_tracking')->getIdFieldName();\n\n $dataTemplate = array(\n 'mainId' => $mainProduct->getData($idFieldName),\n 'event' => self::EVENT_NAME\n );\n\n return $dataTemplate;\n }", "protected function processUpdates()\n {\n $this->importStaticData();\n }", "public function extractData()\n {\n $this->client->run($this->getCreateSurvey());\n $this->client->run($this->getRemoveDuplicatedQuestions());\n $this->updateQuestionFieldIdSchema();\n $this->client->run($this->getCreateListOfQuestions());\n $this->client->run($this->getCreateSurveyLinkedList());\n $this->client->run($this->getCreateCountries());\n $this->client->run($this->getCreateStates());\n $this->client->run($this->getCreateWorksInCountry());\n $this->client->run($this->getCreateLivesInCountry());\n $this->client->run($this->getCreateWorksInState());\n $this->client->run($this->getCreateLivesInState());\n $this->client->run($this->getCreateWorksAs());\n $this->client->run($this->getCreateStates());\n $this->client->run($this->getCreateWorksAs());\n $this->client->run($this->getCreateCurrentDiagnosis());\n $this->client->run($this->getCreateSelfDiagnosis());\n $this->client->run($this->getCreateProfessionalDiagnosis());\n $this->client->run($this->getSetQuestionAndAnswerResponseCounts());\n }", "private function initReport()\n {\n $this->report = new \\stdClass();\n\n $this->searchDiffs();\n }", "protected function setTemplateVariables() {}", "abstract public function extractReportDatas();", "protected function getTypo3TempStatistics() {}", "private function _prepareTemplate()\r\n {\r\n $this->_template = array();\r\n $this->_prepareTemplateDirectory($this->_templateXml->children(), $this->_template);\r\n }", "public function prepareDataTemplate(iTemplate $template) {\n\t\t\t$hierarchy = umiHierarchy::getInstance();\n\n\t\t\t$data = array();\n\t\t\t$info = array();\n\t\t\t$info['attribute:id'] = $template->getId();\n\t\t\t$info['attribute:name'] = $template->getName();\n\t\t\t$info['attribute:title'] = $template->getTitle();\n\t\t\t$info['attribute:filename'] = $template->getFileName();\n\t\t\t$info['attribute:type'] = $template->getType();\n\t\t\t$info['attribute:lang-id'] = $template->getLangId();\n\t\t\t$info['attribute:domain-id'] = $template->getDomainId();\n\n\t\t\t$used_pages = $template->getUsedPages();\n\n\t\t\t$pages = array();\n\t\t\t$hierarchyTypes = array();\n\t\t\tforeach($used_pages as $element_info) {\n\t\t\t\t$element = $hierarchy->getElement($element_info[0]);\n\t\t\t\tif($element instanceof umiHierarchyElement) {\n\t\t\t\t\t$element_id = $element->getId();\n\t\t\t\t\t$page_arr['attribute:id'] = $element_id;\n\t\t\t\t\t$page_arr['xlink:href'] = \"upage://\" . $element_id;\n\t\t\t\t\t$elementTypeId = $element->getTypeId();\n\t\t\t\t\tif ( !isset($hierarchyTypes[$elementTypeId]) ) {\n\t\t\t\t\t\t$hierarchyTypes[$elementTypeId] = selector::get('hierarchy-type')->id($elementTypeId);\n\t\t\t\t\t}\n\t\t\t\t\t$page_arr['basetype'] = $hierarchyTypes[$elementTypeId];\n\t\t\t\t\t$page_arr['name'] = str_replace(\"\\\"\", \"\\\\\\\"\", $element->getName());\n\t\t\t\t\t$pages[] = $page_arr;\n\t\t\t\t}\n\t\t\t\t$hierarchy->unloadElement($element_info[0]);\n\t\t\t}\n\t\t\t$info['used-pages']['nodes:page'] = $pages;\n\t\t\t$data['template'] = $info;\n\t\t\treturn $data;\n\t\t}", "public static function loadTemplateData()\n {\n $templateId = 0;\n $app = Factory::getApplication();\n\n if ($app->isClient('site'))\n {\n $currentTemplate = $app->getTemplate(true);\n $templateId = $currentTemplate->id ?? 0;\n\n\t\t\t/**\n\t\t\t * If a page/menu is assigned to a specific template\n\t\t\t * then get the template ID.\n\t\t\t */\n\t\t\t$activeMenu = $app->getMenu()->getActive();\n\n\t\t\tif (!empty($activeMenu) && !empty($activeMenu->template_style_id))\n\t\t\t{\n\t\t\t\t$templateId = $activeMenu->template_style_id;\n\t\t\t}\n }\n else\n {\n if ($app->input->get('option') === 'com_ajax' && $app->input->get('helix') === 'ultimate')\n {\n $templateId = $app->input->get('id', 0, 'INT');\n }\n }\n\n\t\tif (empty($templateId))\n\t\t{\n\t\t\t$templateId = $app->input->get('helix_id', 0, 'INT');\n\t\t}\n\n if($templateId)\n {\n $template = [];\n\n $draftKeyOptions = [\n 'option' => 'com_ajax',\n 'helix' => 'ultimate',\n 'status' => 'draft',\n 'id' => $templateId\n ];\n\n $draftKey = self::generateKey($draftKeyOptions);\n $cache = new HelixCache($draftKey);\n\n /**\n * Check the fetch destination. If it is iframe then load the settings\n * from draft, otherwise if it is document that means this request\n * comes from the original site visit. So load from saved cache.\n */\n $requestFromIframe = $app->input->get('helixMode', '') === 'edit';\n \n if ($cache->contains() && $requestFromIframe)\n {\n $template = $cache->loadData();\n }\n else\n {\n $keyOptions = [\n 'option' => 'com_ajax',\n 'helix' => 'ultimate',\n 'status' => 'init',\n 'id' => $templateId\n ];\n \n $key = self::generateKey($keyOptions);\n $cache->setCacheKey($key);\n \n if ($cache->contains())\n {\n $template = $cache->loadData();\n }\n else\n {\n $template = self::getTemplateStyle($templateId); \n }\n }\n\n\t\t\tif (isset($template->template) && !empty($template->template))\n\t\t\t{\n\t\t\t\tif (!empty($template->params) && \\is_string($template->params))\n\t\t\t\t{\n\t\t\t\t\t$template->params = new Registry($template->params);\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * If params field is found empty in the database or cache then\n\t\t\t\t * read the default options.json file from the template and assign\n\t\t\t\t * the options as template params.\n\t\t\t\t */\n\t\t\t\telseif (empty($template->params))\n\t\t\t\t{\n\t\t\t\t\t$filePath = JPATH_ROOT . '/templates/' . $template->template . '/' . 'options.json';\n\n\t\t\t\t\tif (\\file_exists($filePath))\n\t\t\t\t\t{\n\t\t\t\t\t\t$defaultParams = \\file_get_contents($filePath);\n\t\t\t\t\t\t$template->params = new Registry($defaultParams);\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$template->params = new Registry;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn $template;\n\t\t\t}\n }\n\n $template = new \\stdClass;\n $template->template = 'system';\n $template->params = new Registry;\n\n return $template;\n }", "function wp_get_update_data()\n {\n }", "public function processData() {\n\t\t$GLOBALS['TCA'] = \\BusyNoggin\\BnBackend\\BackendLibrary::removeExcludeFields($GLOBALS['TCA']);\n\t}", "protected function prepareData()\n {\n parent::prepareData();\n $this->prepareConfigurableProductOptions();\n $this->prepareAttributeSet();\n }", "protected function prepareUpdateData(){\n\t\tthrow new Exception('Unknown Error!', REST_ER_PAGE_NOTFOUND);\n\t}", "public function run()\n {\n $data = [\n\n [ \n 'report_template_type_id' => 1,\n 'name' =>'Course Name',\n 'identifier' => 'course_name',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 1,\n 'name' =>'Grade',\n 'identifier' => 'grade',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 1,\n 'name' =>'Academic Year',\n 'identifier' => 'academic_year',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 1,\n 'name' =>'Absences',\n 'identifier' => 'absences',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 1,\n 'name' =>'Tardies',\n 'identifier' => 'tardies',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 1,\n 'name' =>'First Name',\n 'identifier' => 'first_name',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 1,\n 'name' =>'Last Name',\n 'identifier' => 'last_name',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 1,\n 'name' =>'Student Image',\n 'identifier' => 'student_image',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 1,\n 'name' =>'Student Id',\n 'identifier' => 'student_id',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 1,\n 'name' =>'Date of Birth',\n 'identifier' => 'dob',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 1,\n 'name' =>'Home Teacher',\n 'identifier' => 'home_teacher',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 1,\n 'name' =>'Student Reflection',\n 'identifier' => 'student_reflection',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 1,\n 'name' =>'Teacher Reflection',\n 'identifier' => 'teacher_reflection',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 1,\n 'name' =>'Services',\n 'identifier' => 'services',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 1,\n 'name' =>'Strand Template',\n 'identifier' => 'strand_template = 1',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 1,\n 'name' =>'Standard Template',\n 'identifier' => 'standard_template = 2',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 1,\n 'name' =>'Impact Template',\n 'identifier' => 'impact_template = 3',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 1,\n 'name' =>'Teacher Name',\n 'identifier' => 'teacher_name',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 1,\n 'name' =>'Teacher Image',\n 'identifier' => 'teacher_image',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 1,\n 'name' =>'Course Comment',\n 'identifier' => 'course_comment',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 1,\n 'name' =>'Course Scale Name',\n 'identifier' => 'course_scale_name',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 1,\n 'name' =>'Course Scale Value Image',\n 'identifier' => 'course_scale_value_image',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 2,\n 'name' =>'Strand Name',\n 'identifier' => 'strand_name',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 2,\n 'name' =>'Strand Scale Name',\n 'identifier' => 'strand_scale_name',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 2,\n 'name' =>'Strand Scale Value Image',\n 'identifier' => 'strand_scale_value_image',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 2,\n 'name' =>'Strand Comment',\n 'identifier' => 'strand_comment',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 3,\n 'name' =>'Standards Name',\n 'identifier' => 'standard_name',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 3,\n 'name' =>'Standard Scale Name',\n 'identifier' => 'standard_scale_name',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 3,\n 'name' =>'Standard Scale Value Image',\n 'identifier' => 'standard_scale_value_image',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 3,\n 'name' =>'Standard Comment',\n 'identifier' => 'standard_comment',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 4,\n 'name' =>'Impact Name',\n 'identifier' => 'impact_name',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 4,\n 'name' =>'Impact Scale Name',\n 'identifier' => 'impact_scale_name',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 4,\n 'name' =>'Impact Scale Value Image',\n 'identifier' => 'impact_scale_value_image',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n [ \n 'report_template_type_id' => 4,\n 'name' =>'Impact Comment',\n 'identifier' => 'impact_comment',\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s')\n ],\n ];\n\n $table = $this->table('report_template_variables');\n $table->insert($data)->save();\n }", "public function updateTemplateData(&$templateData) {\n\t\t$this->addTickerItems($templateData);\n\t\t$this->updateNavigationStructure($templateData);\n\t\t$this->addLogos($templateData);\n\t}", "public function prepare(){\n\t\treturn array(\n\t\t\t'creationData' => $this->creationData->prepare(),\n\t\t\t'modificationHistory' => $this->modificationHistory->prepare() );\t\t\n\t}", "protected function _preupdate() {\n }", "protected function _prepareRenderData()\n {\n return [\n 'links' => $this->_config['links'],\n 'active' => $this->_activeLink,\n 'trans' => $this->_translations,\n ];\n }", "public function getTestData()\n {\n return [\n 'user_id' => 1,\n 'status' => 1,\n 'created_at' => '2016-01-21 15:00:00',\n 'updated_at' => '2016-01-21 18:00:00'\n ];\n }", "private function generate() {\r\n\t\t$frontend = $this->getFrontend();\r\n\t\t// Clone the Template rendering object since we don't want to influence the processing:\r\n\t\t/** @var $template \\TYPO3\\CMS\\Core\\TypoScript\\TemplateService */\r\n\t\t$template = clone $frontend->tmpl;\r\n\t\t$template->start ( $frontend->sys_page->getRootLine($this->getTemplatePageId($frontend)));\r\n\r\n\t\t$keysToBeCached = array('config.', 'includeLibs.', 'lib.', 'plugin.', 'tt_content', 'tt_content.');\r\n\t\t/** @var $event Tx_Extracache_System_Event_Events_Event */\r\n\t\t$event = GeneralUtility::makeInstance('Tx_Extracache_System_Event_Events_Event', self::EVENT_Generate, $this, $keysToBeCached);\r\n\t\t$this->getEventDispatcher()->triggerEvent($event);\r\n\r\n\t\t$cache = array();\r\n\t\tforeach ($event->getInfos() as $keyToBeCached) {\r\n\t\t\t$cache[$keyToBeCached] = $template->setup[$keyToBeCached];\r\n\t\t}\r\n\r\n\t\t$this->persistCache($cache);\r\n\r\n\t\treturn $cache;\r\n\t}", "public function generatePage_preProcessing() {}", "private function initVars()\n {\n // template array variables\n $this->tplVar['art_pubdate'] = array();\n $this->tplVar['art_modifydate'] = array();\n }", "private static function createSampleData()\n\t{\n\t\tself::createSampleObject(1, \"Issue 1\", 1);\n\t\tself::createSampleObject(2, \"Issue 2\", 1);\n\t}", "public function getProcessData()\n {\n }", "public function test_loadVars_called_returnArrayWithProperData()\n {\n $expected = $this->getArrayContentTemplate();\n $emailTemplate = new EmailTemplate();\n $this->lotteryService->getNextJackpot('EuroMillions')->willReturn(new Money(10000,new Currency('EUR')));\n $this->lotteryService->getNextDateDrawByLottery('EuroMillions')->willReturn(new \\DateTime());\n\n\n $next_draw_day = new \\DateTime();\n $emailTemplateDataStrategy_double = $this->getInterfaceWebDouble('IEmailTemplateDataStrategy');\n $emailTemplateDataStrategy_double->getData(Argument::type('EuroMillions\\web\\interfaces\\IEmailTemplateDataStrategy'))->willReturn([]);\n $data = [\n 'jackpot_amount' => 100,\n 'draw_day_format_one' => $next_draw_day->format('l'),\n 'draw_day_format_two' => $next_draw_day->format('j F Y')\n ];\n $emailTemplateDataStrategy_double->getData($emailTemplateDataStrategy_double->reveal())->willReturn($data);\n $sut = new LowBalanceEmailTemplate($emailTemplate, $emailTemplateDataStrategy_double->reveal());\n $actual = $sut->loadVars($emailTemplateDataStrategy_double->reveal());\n $this->assertEquals($expected,$actual);\n\n }", "public function __prepare()\n {\n $config = $this->objectManager->get(\\Magento\\Mtf\\Config\\DataInterface::class);\n // Prepare config data\n $configData['dbHost'] = $config->get('install/0/host/0');\n $configData['dbUser'] = $config->get('install/0/user/0');\n $configData['dbPassword'] = $config->get('install/0/password/0');\n $configData['dbName'] = $config->get('install/0/dbName/0');\n $configData['baseUrl'] = $config->get('install/0/baseUrl/0');\n $configData['admin'] = $config->get('install/0/backendName/0');\n\n return ['configData' => $configData];\n }", "public function getLogData(){\n\t\treturn $this->getNewsletterTemplateId();\n\t}", "public static function setTemplateData()\n\t{\n\n\t\tself::$templateData = array();\n\n\t\t// Request values\n\t\tself::$templateData['get'] = $_GET;\n\t\tself::$templateData['post'] = $_POST;\n\n\t\t// Config values\n self::$templateData['config'] = array();\n foreach( get_class_vars( 'Kiki\\Config' ) as $configKey => $configValue )\n {\n\t\t\t// Lame security check, but better safe than sorry until a proper\n\t\t\t// audit has been done that in no way unauthorised user content get\n\t\t\t// parsed as template itself, through parsing recursion or otherwise. \n\t\t\t// Should mostly be careful about direct assignment of any of it to\n\t\t\t// 'content'.\n if ( !preg_match( '~(^db|pass|secret)~i', $configKey ) )\n self::$templateData['config'][$configKey] = $configValue;\n }\n\n if ( Config::$customCss )\n self::$templateData['stylesheets'] = array( Config::$customCss );\n\n\t\t// Is that all we want?\n self::$templateData['server'] = array(\n 'host' => $_SERVER['HTTP_HOST'] ?? null,\n 'name' => $_SERVER['SERVER_NAME'] ?? null,\n 'requestUri' => $_SERVER['REQUEST_URI'] ?? null,\n );\n\n self::$templateData['user'] = self::$user ? self::$user->templateData() : null;\n\n\t\t// Account service(s). Although multiple routing entries are technically\n\t\t// possible, templateData currently only populates one: the first found or else\n\t\t// the internal fallback in the Kiki controller.\n\t\t// FIXME: disabled for now, this shouldn't be db-populated anyway\n\t\t// $accountServices = array_values( Router::getBaseUris('account') );\n\t\t$baseUri = isset($accountServices[0]) ? $accountServices[0]->base_uri : Config::$kikiPrefix. \"/account\";\n\t\t$title = isset($accountServices[0]) ? $accountServices[0]->title : _(\"Account\");\n\t\tself::$templateData['accountService'] = array( 'url' => $baseUri, 'title' => $title );\n\t\t\n\t\t// Active connections. Only typing laziness explains why this isn't simply in {$user.connections}.\n self::$templateData['activeConnections'] = array();\n\n $connectedServices = array();\n if ( self::$user )\n {\n foreach( self::$user->connections() as $connection )\n {\n self::$templateData['activeConnections'][] = array(\n 'serviceName' => $connection->serviceName(),\n 'screenName' => $connection->screenName(),\n 'userName' => $connection->name(),\n 'pictureUrl' => $connection->picture()\n );\n\n $connectedServices[] = $connection->serviceName();\n }\n }\n\n // Log::debug( \"user cons: \". print_r(self::$user->connections(),true) );\n\n // Inactive connections. Might as well be in {$user) as well,\n // potentially in {$user.connections} with an {active} switch, although\n // the separation at this level is not the worst.\n\n // Log::debug( \"config: \". print_r(Config::$connectionServices, true) );\n // Log::debug( \"connected: \". print_r($connectedServices,true) );\n\n foreach( Config::$connectionServices as $name )\n {\n if ( !in_array( $name, $connectedServices ) )\n {\n $connection = ConnectionService\\Factory::getInstance($name);\n self::$templateData['inactiveConnections'][] = array( 'serviceName' => $connection->name(), 'loginUrl' => $connection->loginUrl() );\n }\n }\n\n // @todo Allow starttime and execution time from Log(::init) to be\n // queried and assign them. Just in case someone wants to output it in\n // a template.\n\n self::$templateData['now'] = time();\n }", "function getTrackingInformation ($orderRow, $templateCode, $trackingCode, $updateCode, &$orderRecord, $admin) {\n\t\t$bUseXHTML = $GLOBALS['TSFE']->config['config']['xhtmlDoctype'] != '';\n\n\t\t$tablesObj = GeneralUtility::makeInstance('tx_ttproducts_tables');\n\t\t$orderObj = $tablesObj->get('sys_products_orders');\n\t\t$markerObj = GeneralUtility::makeInstance('tx_ttproducts_marker');\n\t\t$pibaseObj = GeneralUtility::makeInstance('tx_ttproducts_pi1_base');\n\t\t$languageObj = GeneralUtility::makeInstance(\\JambageCom\\TtProducts\\Api\\Localization::class);\n\t\t$basketView = GeneralUtility::makeInstance('tx_ttproducts_basket_view');\n\t\t$infoViewObj = GeneralUtility::makeInstance('tx_ttproducts_info_view');\n\t\t$paymentshippingObj = GeneralUtility::makeInstance('tx_ttproducts_paymentshipping');\n\t\t$theTable = 'sys_products_orders';\n\n\t\t$statusCodeArray = array();\n\n\t\t$allowUpdateFields = array('email', 'email_notify', 'status', 'status_log');\n\t\t$newData = $pibaseObj->piVars['data'];\n\t\t$bStatusValid = false;\n\n\t\tif (isset($orderRow) && is_array($orderRow) && $orderRow['uid']) {\n\t\t\t$statusCodeArray = $this->getStatusCodeArray();\n\t\t\t$pageTitle = $orderRow['uid'].' ('.$orderRow['bill_no'].'): '.$orderRow['name'].'-'.$orderRow['zip'].'-'.$orderRow['city'].'-'.$orderRow['country'];\n\n// \t\t\t$GLOBALS['TSFE']->content = preg_replace('/<title>.+<\\/title>/', '<title>' . $titleStr . '</title>', $GLOBALS['TSFE']->content);\n\n\t\t\t$GLOBALS['TSFE']->page['title'] = $pageTitle;\n\t\t\t$GLOBALS['TSFE']->indexedDocTitle = $pageTitle;\n\n\t\t\t\t// Initialize update of status...\n\t\t\t$fieldsArray = array();\n\t\t\tif (isset($orderRecord['email_notify'])) {\n\t\t\t\t$fieldsArray['email_notify'] = $orderRecord['email_notify'];\n\t\t\t\t$orderRow['email_notify'] = $orderRecord['email_notify'];\n\t\t\t}\n\t\t\tif (isset($orderRecord['email'])) {\n\t\t\t\t$fieldsArray['email'] = $orderRecord['email'];\n\t\t\t\t$orderRow['email'] = $orderRecord['email'];\n\t\t\t}\n\n\t\t\tif (is_array($orderRecord['status']) && isset($statusCodeArray) && is_array($statusCodeArray)) {\n\t\t\t\t$bStatusValid = true;\n\t\t\t\t$status_log = unserialize($orderRow['status_log']);\n\t\t\t\t$update=0;\n\t\t\t\t$count=0;\n\t\t\t\tforeach($orderRecord['status'] as $val) {\n\n\t\t\t\t\tif (!isset($statusCodeArray[$val])) {\n\n\t\t\t\t\t\t$bStatusValid = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\t$status_log_element = array(\n\t\t\t\t\t\t'time' => time(),\n\t\t\t\t\t\t'info' => $statusCodeArray[$val],\n\t\t\t\t\t\t'status' => $val,\n\t\t\t\t\t\t'comment' => ($count == 0 ? $orderRecord['status_comment'].($newData != '' ? '|'.$newData : '') : ''), // comment is inserted only to the fist status\n\t\t\t\t\t);\n\n\t\t\t\t\tif ($admin) {\n\n\t\t\t\t\t\tif ($newData) {\n\t\t\t\t\t\t\tif ($val >= 31 && $val <= 32) {// Numbers 31,32 are for storing of bill no. of external software\n\t\t\t\t\t\t\t\t$fieldsArray['bill_no'] = $newData;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ($val == 13) {// Number 13 is that order has been paid. The date muss be entered in format dd-mm-yyyy\n\t\t\t\t\t\t\t$date = $this->getDate($newData);\n\t\t\t\t\t\t\t$payMode = '1';\n\n\t\t\t\t\t\t\tif (isset($orderRow) && is_array($orderRow) && $orderRow['uid']) {\n\t\t\t\t\t\t\t\t$basketRec = $paymentshippingObj->getBasketRec($orderRow);\n $basketExtra =\n tx_ttproducts_control_basket::getBasketExtras(\n $tablesObj,\n $basketRec,\n $this->conf\n );\n\t\t\t\t\t\t\t\tif (isset($basketExtra) && is_array($basketExtra) && isset($basketExtra['payment.']) && isset($basketExtra['payment.']['mode'])) {\n\t\t\t\t\t\t\t\t\t$modeText = $basketExtra['payment.']['mode'];\n\t\t\t\t\t\t\t\t\t$colName = 'pay_mode';\n\t\t\t\t\t\t\t\t\t$textSchema = $theTable . '.' . $colName . '.I.';\n\t\t\t\t\t\t\t\t\t$i = 0;\n\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\t$text = $languageObj->getLabel(\n\t\t\t\t\t\t\t\t\t\t\t$textSchema . $i,\n\t\t\t\t\t\t\t\t\t\t\t$usedLang = 'default'\n\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t$text = str_replace(' ', '_', $text);\n\t\t\t\t\t\t\t\t\t\tif ($text == $modeText) {\n\t\t\t\t\t\t\t\t\t\t\t$payMode = $i;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t\t\t\t} while ($text != '' && $i < 99);\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$fieldsArray['date_of_payment'] = $date;\n\t\t\t\t\t\t\t$fieldsArray['pay_mode'] = $payMode;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ($val == 20) {// Number 20 is that items have been shipped. The date muss be entered in format dd-mm-yyyy\n\t\t\t\t\t\t\t$date = $this->getDate($newData);\n\t\t\t\t\t\t\t$fieldsArray['date_of_delivery'] = $date;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\n\t\t\t\t\tif ($admin || ($val>=50 && $val<59)) {// Numbers 50-59 are usermessages.\n\t\t\t\t\t\t$recipient = $this->conf['orderEmail_to'];\n\t\t\t\t\t\tif ($orderRow['email'] && ($orderRow['email_notify'])) {\n\t\t\t\t\t\t\t$recipient .= ','.$orderRow['email'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$templateMarker = 'TRACKING_EMAILNOTIFY_TEMPLATE';\n\t\t\t\t\t\t$feusersObj = $tablesObj->get('fe_users', true);\n\t\t\t\t\t\ttx_ttproducts_email_div::sendNotifyEmail(\n\t\t\t\t\t\t\t$this->cObj,\n\t\t\t\t\t\t\t$this->conf,\n\t\t\t\t\t\t\t$this->config,\n\t\t\t\t\t\t\t$feusersObj,\n\t\t\t\t\t\t\t$orderObj->getNumber($orderRow['uid']),\n\t\t\t\t\t\t\t$recipient,\n\t\t\t\t\t\t\t$status_log_element,\n\t\t\t\t\t\t\t$statusCodeArray,\n\t\t\t\t\t\t\tGeneralUtility::_GP('tracking'),\n\t\t\t\t\t\t\t$orderRow,\n\t\t\t\t\t\t\t$templateCode,\n\t\t\t\t\t\t\t$templateMarker\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$status_log[] = $status_log_element;\n\t\t\t\t\t\t$update=1;\n\t\t\t\t\t} else if ($val>=60 && $val<69) { // 60 -69 are special messages\n\t\t\t\t\t\t$templateMarker = 'TRACKING_EMAIL_GIFTNOTIFY_TEMPLATE';\n\t\t\t\t\t\t$query = 'ordernumber=\\''.intval($orderRow['uid']).'\\'';\n\t\t\t\t\t\t$giftRes = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'tt_products_gifts', $query);\n\t\t\t\t\t\twhile ($giftRow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($giftRes)) {\n\t\t\t\t\t\t\t$recipient = $giftRow['deliveryemail'].','.$giftRow['personemail'];\n\t\t\t\t\t\t\ttx_ttproducts_email_div::sendGiftEmail(\n\t\t\t\t\t\t\t\t$this->cObj,\n\t\t\t\t\t\t\t\t$this->conf,\n\t\t\t\t\t\t\t\t$recipient,\n\t\t\t\t\t\t\t\t$orderRecord['status_comment'],\n\t\t\t\t\t\t\t\t$giftRow,\n\t\t\t\t\t\t\t\t$templateCode,\n\t\t\t\t\t\t\t\t$templateMarker,\n\t\t\t\t\t\t\t\t$this->conf['orderEmail_htmlmail']\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$status_log[] = $status_log_element;\n\t\t\t\t\t\t$update=1;\n\t\t\t\t\t\t$GLOBALS['TYPO3_DB']->sql_free_result($giftRes);\n\t\t\t\t\t}\n\t\t\t\t\t$count++;\n\t\t\t\t}\n\t\t\t\tif ($update)\t{\n\t\t\t\t\t$fieldsArray['status_log'] = serialize($status_log);\n\t\t\t\t\t$fieldsArray['status'] = intval($status_log_element['status']);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!empty($fieldsArray)) {\t\t// If any items in the field array, save them\n\t\t\t\tif (!$admin) {\t// only these fields may be updated in an already stored order\n\t\t\t\t\t$fieldsArray = array_intersect_key($fieldsArray, array_flip($allowUpdateFields));\n\t\t\t\t}\n\n\t\t\t\tif (!empty($fieldsArray)) {\n\t\t\t\t\t$fieldsArray['tstamp'] = time();\n\t\t\t\t\t$GLOBALS['TYPO3_DB']->exec_UPDATEquery('sys_products_orders', 'uid='.intval($orderRow['uid']), $fieldsArray);\n\t\t\t\t\t$orderRow = $orderObj->getRecord($orderRow['uid']);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$status_log = unserialize($orderRow['status_log']);\n\t\t\t$orderData = unserialize($orderRow['orderData']);\n\n\t\t\tif ($orderData === false) {\n\t\t\t\t$orderData = tx_div2007_alpha5::unserialize_fh002($orderRow['orderData'],false);\n\t\t\t}\n\t\t}\n\n\t\t\t// Getting the template stuff and initialize order data.\n\t\t$template = tx_div2007_core::getSubpart($templateCode, '###TRACKING_DISPLAY_INFO###');\n\t\t$this->searchOrderStatus($status_log, $orderPaid, $orderClosed);\n\t\t$globalMarkerArray = &$markerObj->getGlobalMarkerArray();\n\n\t\t// making status code 60 disappear if the order has not been payed yet\n\t\tif (!$orderPaid || $orderClosed) {\n\t\t\t\t// Fill marker arrays\n\t\t\t$markerArray = $globalMarkerArray;\n\t\t\t$subpartArray=Array();\n\t\t\t$subpartArray['###STATUS_CODE_60###'] = '';\n\n\t\t\t$template = tx_div2007_core::substituteMarkerArrayCached($template,$markerArray,$subpartArray);\n\t\t}\n\n\t\t\t// Status:\n\t\t$STATUS_ITEM = tx_div2007_core::getSubpart($template, '###STATUS_ITEM###');\n\t\t$STATUS_ITEM_c='';\n\t\tif (is_array($status_log)) {\n\t\t\tforeach($status_log as $k => $v) {\n\t\t\t\t$markerArray=Array();\n\t\t\t\t$markerArray['###ORDER_STATUS_TIME###'] = $this->cObj->stdWrap($v['time'],$this->conf['statusDate_stdWrap.']);\n\t\t\t\t$markerArray['###ORDER_STATUS###'] = $v['status'];\n\t\t\t\t$info = $statusCodeArray[$v['status']];\n\t\t\t\t$markerArray['###ORDER_STATUS_INFO###'] = ($info ? $info : $v['info']);\n\t\t\t\t$markerArray['###ORDER_STATUS_COMMENT###'] = nl2br($v['comment']);\n\n\t\t\t\t$STATUS_ITEM_c .= tx_div2007_core::substituteMarkerArrayCached($STATUS_ITEM, $markerArray);\n\t\t\t}\n\t\t}\n\n\t\t$markerArray=$globalMarkerArray;\n\t\t$subpartArray=array();\n\t\t$wrappedSubpartArray=array();\n\t\t$markerArray['###OTHER_ORDERS_OPTIONS###'] = '';\n\t\t$markerArray['###STATUS_OPTIONS###'] = '';\n\t\t$subpartArray['###STATUS_ITEM###']=$STATUS_ITEM_c;\n\n\t\t\t// Display admin-interface if access.\n\t\tif (!$GLOBALS['TSFE']->beUserLogin) {\n\t\t\t$subpartArray['###ADMIN_CONTROL###']='';\n\t\t} elseif ($admin) {\n\t\t\t$subpartArray['###ADMIN_CONTROL_DENY###']='';\n\t\t\t$wrappedSubpartArray['###ADMIN_CONTROL_OK###']='';\n\t\t\t$wrappedSubpartArray['###ADMIN_CONTROL###']='';\n\t\t} else {\n\t\t\t$subpartArray['###ADMIN_CONTROL_OK###']='';\n\t\t\t$wrappedSubpartArray['###ADMIN_CONTROL_DENY###']='';\n\t\t\t$wrappedSubpartArray['###ADMIN_CONTROL###']='';\n\t\t}\n\t\t$markerFieldArray = array();\n\t\t$orderView = $tablesObj->get('sys_products_orders', true);\n\t\t$orderObj = $orderView->getModelObj();\n\t\t$orderMarkerArray = $globalMarkerArray;\n\t\t$viewTagArray = array();\n\t\t$parentArray = array();\n\t\t$t = array();\n\t\t$t['orderFrameWork'] = tx_div2007_core::getSubpart($template, '###ORDER_ITEM###');\n\n\t\t$fieldsArray = $markerObj->getMarkerFields(\n\t\t\t$t['orderFrameWork'],\n\t\t\t$orderObj->getTableObj()->tableFieldArray,\n\t\t\t$orderObj->getTableObj()->requiredFieldArray,\n\t\t\t$markerFieldArray,\n\t\t\t$orderObj->marker,\n\t\t\t$viewTagArray,\n\t\t\t$parentArray\n\t\t);\n\n\t\tif ($orderRow) {\n\t\t\t$orderView->getRowMarkerArray (\n\t\t\t\t$orderRow,\n\t\t\t\t'',\n\t\t\t\t$orderMarkerArray,\n\t\t\t\t$tmp=array(),\n\t\t\t\t$tmp=array(),\n\t\t\t\t$viewTagArray,\n\t\t\t\t'TRACKING',\n\t\t\t\t$tmp=array()\n\t\t\t);\n\n\t\t\t$subpartArray['###ORDER_ITEM###'] = tx_div2007_core::substituteMarkerArrayCached($t['orderFrameWork'], $orderMarkerArray);\n\t\t} else {\n\t\t\t$subpartArray['###ORDER_ITEM###'] = '';\n\t\t}\n\n\t\t//\n\t\tif ($admin) {\n\t\t\t\t// Status admin:\n\t\t\tif (isset($statusCodeArray) && is_array($statusCodeArray)) {\n\t\t\t\tforeach($statusCodeArray as $k => $v) {\n\t\t\t\t\tif ($k!=1) {\n\t\t\t\t\t\t$markerArray['###STATUS_OPTIONS###'] .= '<option value=\"' . $k . '\">' . htmlspecialchars($k . ': ' . $v) . '</option>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$priceViewObj = GeneralUtility::makeInstance('tx_ttproducts_field_price_view');\n\n\t\t\tif (isset($this->conf['tracking.']) && isset($this->conf['tracking.']['fields']))\t{\n\t\t\t\t$fields = $this->conf['tracking.']['fields'];\n\t\t\t} else {\n\t\t\t\t$fields = 'uid';\n\t\t\t}\n\t\t\t$fields .= ',' . 'crdate,tracking_code,status,status_log,bill_no,name,amount,feusers_uid';\n\t\t\t$fields = GeneralUtility::uniqueList($fields);\n\t\t\t$history = array();\n\t\t\t$fieldMarkerArray = array();\n\t\t\t$oldMode = preg_match('/###OTHER_ORDERS_OPTIONS###\\s*<\\/select>/i', $templateCode);\n\t\t\t$where = 'status!=0 AND status<100';\n\t\t\t$orderBy = 'crdate';\n\n\t\t\tif (isset($this->conf['tracking.']) && isset($this->conf['tracking.']['sql.'])) {\n\t\t\t\tif (isset($this->conf['tracking.']['sql.']['where']))\t{\n\t\t\t\t\t$where = $this->conf['tracking.']['sql.']['where'];\n\t\t\t\t}\n\t\t\t\tif (isset($this->conf['tracking.']['sql.']['orderBy']))\t{\n\t\t\t\t\t$orderBy = $this->conf['tracking.']['sql.']['orderBy'];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$bUseHistoryMarkers = (strpos($orderBy, 'crdate') !== false);\n\t\t\t$bInverseHistory = (strpos($orderBy, 'crdate desc') !== false);\n\n\t\t\tif ($bInverseHistory)\t{\n\t\t\t\t$orderBy = 'crdate'; // Todo: all order by fields must be reversed to keep the history program logic\n\t\t\t}\n\n\t\t\t\t// Get unprocessed orders.\n\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($fields, 'sys_products_orders', $where . $this->cObj->enableFields('sys_products_orders'), '', $orderBy);\n\n\t\t\t$valueArray = array();\n\t\t\t$keyMarkerArray = array();\n\t\t\twhile(($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))) {\n\t\t\t\t$tmpStatuslog = unserialize($row['status_log']);\n\t\t\t\t$classPrefix = str_replace('_','-',$pibaseObj->prefixId);\n\t\t\t\t$this->searchOrderStatus($tmpStatuslog, $tmpPaid, $tmpClosed);\n\t\t\t\t$class = ($tmpPaid ? $classPrefix.'-paid' : '');\n\t\t\t\t$class = ($class ? $class.' ' : '' ) . ($tmpClosed ? $classPrefix.'-closed' : '');\n\t\t\t\t$class = ($class ? ' class=\"'.$class.'\"' : '');\n\n\t\t\t\t$fieldMarkerArray['###OPTION_CLASS###'] = $class;\n\n\t\t\t\tif ($oldMode) {\n\t\t\t\t\t$markerArray['###OTHER_ORDERS_OPTIONS###'] .=\n\t\t\t\t\t\t'<option ' . $class . ' value=\"' . $row['tracking_code'] . '\"' . ($row['uid'] == $orderRow['uid'] ? 'selected=\"selected\"' : '') . '>'.\n\t\t\t\t\t\t\thtmlspecialchars($row['uid'].' ('.$row['bill_no'].'): '.\n\t\t\t\t\t\t\t\t$row['name'] . ' (' . $priceViewObj->priceFormat($row['amount']) . ' ' . htmlentities($this->conf['currencySymbol'], ENT_QUOTES) . ') /' . $row['status']\n\t\t\t\t\t\t\t) .\n\t\t\t\t\t\t'</option>';\n\t\t\t\t} else {\n\t\t\t\t\tif (isset($row['feusers_uid']) && $bUseHistoryMarkers) {\n\t\t\t\t\t\tif(!$row['feusers_uid'] || !isset($history[$row['feusers_uid']])) {\n\t\t\t\t\t\t\t$history[$row['feusers_uid']] = array(\n\t\t\t\t\t\t\t\t'out' => '',\n\t\t\t\t\t\t\t\t'count' => 0,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$history[$row['feusers_uid']]['count'] += 1;\n\t\t\t\t\t\t$last_order = $history[$row['feusers_uid']];\n\n\t\t\t\t\t\tif($last_order['count'] == 1) {\n\t\t\t\t\t\t\t$fieldMarkerArray['###LAST_ORDER_TYPE###'] = $languageObj->getLabel('first_order');\n\t\t\t\t\t\t\t$fieldMarkerArray['###LAST_ORDER_COUNT###'] = '-';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$fieldMarkerArray['###LAST_ORDER_TYPE###'] = $last_order['out'];\n\t\t\t\t\t\t\t$fieldMarkerArray['###LAST_ORDER_COUNT###'] = $last_order['count'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif($row['feusers_uid'] == 0) {\n\t\t\t\t\t\t\t$fieldMarkerArray['###LAST_ORDER_TYPE###'] = $languageObj->getLabel('unregistered');\n\t\t\t\t\t\t\t$fieldMarkerArray['###LAST_ORDER_COUNT###'] = '-';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif($row['company'] == '') {\n\t\t\t\t\t\t\t$row['company'] = $languageObj->getLabel( 'undeclared');\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$history[$row['feusers_uid']]['out'] = date('d.m.Y - H:i', $row['crdate']);\n\t\t\t\t\t}\n\n\t\t\t\t\t$fieldMarkerArray['###OPTION_SELECTED###'] = ($row['uid'] == $orderRow['uid'] ? 'selected=\"selected\"' : '');\n\t\t\t\t\tforeach ($row as $field => $value) {\n\t\t\t\t\t\tswitch ($field) {\n\t\t\t\t\t\t\tcase 'amount':\n\t\t\t\t\t\t\t\t$value = $priceViewObj->priceFormat($value);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'crdate':\n\t\t\t\t\t\t\t\t$value = date('d.m.Y - H:i', $value);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t$value = htmlspecialchars($value);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$fieldMarkerArray['###ORDER_' . strtoupper($field) . '###'] = $value;\n\t\t\t\t\t}\n\t\t\t\t\t$fieldMarkerArray['###CUR_SYM###'] = htmlentities($this->conf['currencySymbol'], ENT_QUOTES);\n\t\t\t\t\t$valueArray[$row['tracking_code']] = $row['uid'];\n\t\t\t\t\t$keyMarkerArray[$row['tracking_code']] = $fieldMarkerArray;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$GLOBALS['TYPO3_DB']->sql_free_result($res);\n\n\t\t\tif (!$oldMode) {\n// checks if t3jquery is loaded\n\t\t\t\tif (ExtensionManagementUtility::isLoaded('t3jquery')) {\n\t\t\t\t\trequire_once(ExtensionManagementUtility::extPath('t3jquery') . 'class.tx_t3jquery.php');\n\t\t\t\t}\n\t\t\t\t// if t3jquery is loaded and the custom Library had been created\n\t\t\t\tif (T3JQUERY === true) {\n\t\t\t\t\ttx_t3jquery::addJqJS();\n\t\t\t\t} else if ($this->conf['pathToJquery'] != '')\t{\n\t\t\t\t// if none of the previous is true, you need to include your own library\n\t\t\t\t// just as an example in this way\n\t\t\t\t\t$GLOBALS['TSFE']->additionalHeaderData[$ext_key] = '<script src=\"' . GeneralUtility::getFileAbsFileName($this->conf['pathToJquery']) . '\" type=\"text/javascript\"></script>';\n\t\t\t\t}\n\n\t\t\t\tif ($bInverseHistory)\t{\n\t\t\t\t\t$valueArray = array_reverse($valueArray);\n\t\t\t\t}\n\t\t\t\tif (isset($this->conf['tracking.'])) {\n\t\t\t\t\t$type = $this->conf['tracking.']['recordType'];\n\t\t\t\t\t$recordLine = $this->conf['tracking.']['recordLine'];\n\t\t\t\t}\n\t\t\t\tif ($type == '') {\n\t\t\t\t\t$type = 'select';\n\t\t\t\t}\n\t\t\t\tif ($recordLine == '') {\n\t\t\t\t\t$recordLine = '<!-- ###INPUT### begin -->###ORDER_UID### (###ORDER_BILL_NO###): ###ORDER_NAME### (###ORDER_AMOUNT### ###CUR_SYM###) / ###ORDER_STATUS###) ###ORDER_CRDATE### ###LAST_ORDER_TYPE### ###LAST_ORDER_COUNT###<!-- ###INPUT### end -->';\n\t\t\t\t}\n\n\t\t\t\t$out = tx_ttproducts_form_div::createSelect(\n\t\t\t\t\t$langObj,\n\t\t\t\t\t$valueArray,\n\t\t\t\t\t'tracking',\n\t\t\t\t\t$orderRow['tracking_code'],\n\t\t\t\t\tfalse,\n\t\t\t\t\tfalse,\n\t\t\t\t\tarray(),\n\t\t\t\t\t$type,\n\t\t\t\t\tarray(),\n\t\t\t\t\t$recordLine,\n\t\t\t\t\t'',\n\t\t\t\t\t$keyMarkerArray\n\t\t\t\t);\n\n\t\t\t\tif (isset($this->conf['tracking.']) && isset($this->conf['tracking.']['recordBox.'])) {\n\t\t\t\t\t$out = $this->cObj->stdWrap($out, $this->conf['tracking.']['recordBox.']);\n\t\t\t\t}\n\t\t\t\t$markerArray['###OTHER_ORDERS_OPTIONS###'] .= $out;\n\t\t\t}\n\t\t}\n\t\t$bHasTrackingTemplate = preg_match('/###TRACKING_TEMPLATE###/i', $templateCode);\n\n\t\t\t// Final things\n\t\tif (!$bHasTrackingTemplate) {\n\t\t\t$markerArray['###ORDER_HTML_OUTPUT###'] = $orderData['html_output'];\t// The save order-information in HTML-format\n\t\t} else if (isset($orderRow) && is_array($orderRow) && $orderRow['uid']) {\n\t\t\t$itemArray = $orderObj->getItemArray($orderRow, $calculatedArray, $infoArray);\n\t\t\t$infoViewObj->init2($infoArray);\n\t\t\t$basketRec = $paymentshippingObj->getBasketRec($orderRow);\n $basketExtra =\n tx_ttproducts_control_basket::getBasketExtras(\n $tablesObj,\n $basketRec,\n $this->conf\n );\n\n\t\t\t$orderArray = array();\n\t\t\t$orderArray['orderTrackingNo'] = $trackingCode;\n\t\t\t$orderArray['orderUid'] = $orderRow['uid'];\n\t\t\t$orderArray['orderDate'] = $orderRow['crdate'];\n\n\t\t\tif ($orderRow['ac_uid']) {\n\t\t\t\t// get bank account info\n\t\t\t\t$accountViewObj = $tablesObj->get('sys_products_accounts', true, false);\n\t\t\t\t$accountObj = $tablesObj->get('sys_products_accounts', false, false);\n\t\t\t\t$accountRow = $accountObj->getRow($orderRow['ac_uid']);\n\t\t\t\t$accountViewObj->getMarkerArray($accountRow, $globalMarkerArray, true);\n\t\t\t}\n\n\t\t\tif ($orderRow['cc_uid']) {\n\t\t\t\t$cardViewObj = $tablesObj->get('sys_products_cards', true, false);\n\t\t\t\t$cardObj = $tablesObj->get('sys_products_cards', false, false);\n\t\t\t\t$cardRow = $cardObj->getRow($orderRow['cc_uid']);\n\t\t\t\t$cardViewObj->setCObj($this->cObj);\n\t\t\t\t$cardViewObj->setConf($this->conf);\n\t\t\t\t$cardViewObj->getMarkerArray($cardRow, $globalMarkerArray, array());\n\t\t\t}\n\t\t\t$customerEmail = $orderRow['email']; // $infoViewObj->getCustomerEmail();\n\t\t\t$globalMarkerArray['###CUSTOMER_RECIPIENTS_EMAIL###'] = $customerEmail;\n\n\t\t\t$markerArray['###ORDER_HTML_OUTPUT###'] =\n\t\t\t\t$basketView->getView(\n\t\t\t\t\t$templateCode,\n\t\t\t\t\t'TRACKING',\n\t\t\t\t\t$infoViewObj,\n\t\t\t\t\tfalse,\n\t\t\t\t\tfalse,\n\t\t\t\t\t$calculatedArray,\n\t\t\t\t\ttrue,\n\t\t\t\t\t'TRACKING_TEMPLATE',\n\t\t\t\t\t$globalMarkerArray,\n\t\t\t\t\t'',\n\t\t\t\t\t$itemArray,\n\t\t\t\t\t$orderArray,\n\t\t\t\t\t$basketExtra\n\t\t\t\t);\n\t\t} else {\n\t\t\t$markerArray['###ORDER_HTML_OUTPUT###'] = '';\n\t\t}\n\n\t\tif (isset($orderData) && is_array($orderData)) {\n\t\t\t$markerArray['###ORDERCONFIRMATION_HTML_OUTPUT###'] = $orderData['html_output'];\t// The save order-information in HTML-format\n\t\t} else {\n\t\t\t$markerArray['###ORDERCONFIRMATION_HTML_OUTPUT###'] = '';\n\t\t}\n\n\t\t$checkedHTML = ($bUseXHTML ? 'checked=\"checked\"' : 'checked');\n\t\t$markerArray['###FIELD_EMAIL_NOTIFY###'] = $orderRow['email_notify'] ? ' ' . $checkedHTML : '';\n\n\t\t$markerArray['###FIELD_EMAIL###'] = $orderRow['email'];\n\t\t$markerArray['###ORDER_UID###'] = $orderObj->getNumber($orderRow['uid']);\n\t\t$markerArray['###ORDER_DATE###'] = $this->cObj->stdWrap($orderRow['crdate'],$this->conf['orderDate_stdWrap.']);\n\t\t$markerArray['###TRACKING_NUMBER###'] = $trackingCode;\n\t\t$markerArray['###UPDATE_CODE###'] = $updateCode;\n\t\t$markerArray['###TRACKING_DATA_NAME###'] = $pibaseObj->prefixId . '[data]';\n\t\t$markerArray['###TRACKING_DATA_VALUE###'] = ($bStatusValid ? '' : $newData);\n\t\t$markerArray['###TRACKING_STATUS_COMMENT_NAME###'] = 'orderRecord[status_comment]';\n\t\t$markerArray['###TRACKING_STATUS_COMMENT_VALUE###'] = ($bStatusValid ? '' : $orderRecord['status_comment']);\n\n\t\tif (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][TT_PRODUCTS_EXT]['tracking'])) {\n\t\t\tforeach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][TT_PRODUCTS_EXT]['tracking'] as $classRef) {\n\t\t\t\t$hookObj= GeneralUtility::makeInstance($classRef);\n\t\t\t\tif (method_exists($hookObj, 'getTrackingInformation')) {\n\t\t\t\t\t$hookObj->getTrackingInformation($this, $orderRow, $templateCode, $trackingCode, $updateCode, $orderRecord, $admin, $template, $markerArray, $subpartArray);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$content = tx_div2007_core::substituteMarkerArrayCached($template, $markerArray, $subpartArray, $wrappedSubpartArray);\n\t\treturn $content;\n\t}", "protected function prepareForValidation() {\n parent::prepareForValidation();\n $this->merge(['feedback_contents_template' => json_decode($this->get('feedback_contents_template'), true)]);\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 }", "protected function _prepareUpdateData($data) {\n $dataPrepared = array(\n 'name' => $data->getName(),\n 'module_id' => $data->getModule_id(),\n 'system' => $data->getSystem(),\n 'person_id' => $data->getPerson_id(),\n 'color' => $data->getColor(),\n );\n\n return $dataPrepared;\n }", "public function doProcessData() {}", "private function reload_data()\n\t{\n\t\tforeach ($this->checked as $k=>$v) {\n\t\t\t$this->content->template['leadtracker']['0'][$k]=$v;\n\t\t}\n\t}", "private function getTemplateData(Enlight_Event_EventArgs $arguments)\n {\n $template = Shopware()->Template();\n /**@var $view Enlight_View_Default */\n $view = $arguments->getSubject()->View();\n $viewTemplate = $view->Template();\n\n $data = array(\n 'Loaded templates' => explode('|', $viewTemplate->template_resource),\n 'Cache directory' => $template->getCacheDir(),\n 'Compile directory' => $template->getCompileDir(),\n 'Config directory' => $template->getConfigDir(),\n 'Config variables' => $template->getConfigVars(),\n 'Debug template' => $template->getDebugTemplate(),\n 'Plugin directories' => $template->getPluginsDir(),\n 'Template directories' => $template->getTemplateDir(),\n 'Assignments' => $view->getAssign(),\n );\n\n return $data;\n }", "public function prepare(){\n\t\treturn array(\n\t\t\t'modified_at' => $modified_at,\n\t\t\t'modified_by' => $modified_by );\t\t\n\t}", "function processData() \n {\n \n // store values in table manager object.\n $moduleID = $this->dataManager->getModuleID();\n $moduleCreator = new ModuleCreator( $moduleID, $this->pathModuleRoot);\n $moduleCreator->createModule();\n \n }", "public function preUpdate()\n {\n $this->dateUpdated = new \\DateTime();\n }", "public function supportData()\n {\n $processReaction = $this->reportEngine->prepareSupportData();\n\n return __processResponse($processReaction, [], [], true);\n }", "protected function prepareForValidation() {\n\t\t$this->importStatus = [\n\t\t\tContentUserReportViewHelper::COPY_CONTENT_JOB_NOT_STARTED,\n\t\t\tContentUserReportViewHelper::COPY_CONTENT_JOB_RUNNING,\n\t\t\tContentUserReportViewHelper::COPY_CONTENT_JOB_COMPLETED,\n\t\t\tContentUserReportViewHelper::COPY_CONTENT_JOB_FAILED,\n\t\t];\n\t}", "protected function viewsData() {\n $data = parent::viewsData();\n $data['views_test_data']['uid'] = [\n 'title' => 'UID',\n 'help' => 'The test data UID',\n 'relationship' => [\n 'id' => 'standard',\n 'base' => 'users_field_data',\n 'base field' => 'uid',\n ],\n ];\n\n // Create a dummy field with no help text.\n $data['views_test_data']['no_help'] = $data['views_test_data']['name'];\n $data['views_test_data']['no_help']['field']['title'] = 'No help';\n $data['views_test_data']['no_help']['field']['real field'] = 'name';\n unset($data['views_test_data']['no_help']['help']);\n\n return $data;\n }", "function processPageData() {\n\n $this->dataLayer=new ClsDataLayer();\n\n $this->cookieOk = $this->checkAuthCookie();\n\n if ($this->cookieOk == 1) {\n\n $this->weeks = $this->getWeeks();\n $this->years = $this->getYears();\n\n $this->processPostData();\n\n $this->payrollDataCalculated = $this->generatePayrollDataCalculated();\n\n }\n else {\n $this->cookieNotOkText = $this->getCookieNotOkText();\n }\n\n }", "public function templateInfo() \n {\n $info = array(); \n \n $info['name'] = $this->name; \n # $info[\"docblock\"] = $this->docblock->desc;\n # $info['position'] = $this->getPosition();\n # $info['is_array'] = $this->isArray();\n # $info['is_optional'] = $this->isOptional();\n # $info['is_passed_by_reference'] = $this->isPassedByReference();\n # $info['is_default_value_available'] = $this->isDefaultvalueAvailable();\n # $info['allows_null'] = $this->allowsNull();\n # $info['class_name'] = $this->getDeclaringClass() ? \n # $this->getDeclaringClass()->name : null;\n # $info['function_name'] = $this->getDeclaringFunction()->name;\n # $info['class_type'] = $this->getClass() ? $this->getClass()->getName() : null;\n\n # if ($this->isOptional() && $this->getDeclaringClass()->isUserDefined()) {\n # $info['default_value'] = $this->getDefaultValue();\n # }\n\n return $info; \n }", "private function getStatusTemplates() {\n $jsonStatusTemplates = file_get_contents (self::STATUS_TEMPLATES_FILE);\n $this->statusTemplates = json_decode($jsonStatusTemplates, true);\n }", "private function collectAllData()\n {\n $this->getParsedHeader();\n $this->getServerConfig();\n $this->getPageTitle();\n $this->getLanguage();\n $this->getCharset();\n $this->getHeadingsCount();\n $this->getCanonicalLINKS();\n $this->getAllLinksData();\n }", "function preprocess(){\n\t\t$this->title = \"Fannie : Product Movement\";\n\t\t$this->header = \"Product Movement Report\";\n\t\t$this->report_cache = 'none';\n\n\t\tif (isset($_REQUEST['date1'])){\n\t\t\t/**\n\t\t\t Form submission occurred\n\n\t\t\t Change content function, turn off the menus,\n\t\t\t set up headers\n\t\t\t*/\n\t\t\t$this->content_function = \"report_content\";\n\t\t\t$this->has_menus(False);\n\t\t\t$this->report_headers = array('Date','UPC','Description','Qty','$');\n\t\t\n\t\t\t/**\n\t\t\t Check if a non-html format has been requested\n\t\t\t*/\n\t\t\tif (isset($_REQUEST['excel']) && $_REQUEST['excel'] == 'xls')\n\t\t\t\t$this->report_format = 'xls';\n\t\t\telseif (isset($_REQUEST['excel']) && $_REQUEST['excel'] == 'csv')\n\t\t\t\t$this->report_format = 'csv';\n\t\t}\n\t\telse \n\t\t\t$this->add_script(\"../../src/CalendarControl.js\");\n\n\t\treturn True;\n\t}", "public function data_preprocessing(&$default_values) {\r\n global $DB;\r\n $context = $this->assignment->get_context();\r\n $course = $this->assignment->get_course();\r\n\r\n $drafttestinputid = file_get_submitted_draft_itemid('assignsubmission_codehandin_testinput');\r\n $drafttestoutputid = file_get_submitted_draft_itemid('assignsubmission_codehandin_testoutput');\r\n $draftteststderr = file_get_submitted_draft_itemid('assignsubmission_codehandin_teststderr');\r\n\r\n if ($context) {\r\n // existing submission\r\n\r\n $assignmentid = $this->assignment->get_instance()->id;\r\n\r\n file_prepare_draft_area($drafttestinputid, $context->id, 'assignsubmission_codehandin', ASSIGNSUBMISSION_CODEHANDIN_FILEAREA, (ASSIGNSUBMISSION_CODEHANDIN_INPUTFILES_START + $assignmentid), array(\r\n 'subdirs' => 0,\r\n 'maxbytes' => $course->maxbytes,\r\n 'maxfiles' => 1,\r\n 'accepted_types' => '*'\r\n ));\r\n file_prepare_draft_area($drafttestoutputid, $context->id, 'assignsubmission_codehandin', ASSIGNSUBMISSION_CODEHANDIN_FILEAREA, (ASSIGNSUBMISSION_CODEHANDIN_OUTPUTFILES_START + $assignmentid), array(\r\n 'subdirs' => 0,\r\n 'maxbytes' => $course->maxbytes,\r\n 'maxfiles' => 1\r\n ));\r\n file_prepare_draft_area($draftteststderr, $context->id, 'assignsubmission_codehandin', ASSIGNSUBMISSION_CODEHANDIN_FILEAREA, (ASSIGNSUBMISSION_CODEHANDIN_OUTPUTERRFILES_START + $assignmentid), array(\r\n 'subdirs' => 0,\r\n 'maxbytes' => $course->maxbytes,\r\n 'maxfiles' => 1\r\n ));\r\n\r\n\r\n //$assignment = $DB->get_records('codehandin', array('id' => $assignmentid));\r\n $checkpoints = $DB->get_records('codehandin_checkpoint', array('assignmentid' => $assignmentid), $sort = 'ordering ASC');\r\n\r\n echo '<pre>';\r\n print_r($checkpoints);\r\n echo '</pre>';\r\n\r\n// echo '<pre>';\r\n// echo $assignmentid;\r\n// echo '</pre>';\r\n//\r\n// echo '<pre>';\r\n// print_r($checkpoints);\r\n// echo '</pre>';\r\n// $assignment = (array) $assignment;\r\n// //$assignment->checkpoints = $checkpoints;\r\n// $assignment['checkpoints'] = $checkpoints;\r\n// $assignment = (object) $assignment;\r\n\r\n foreach ($checkpoints as $cp) {\r\n\r\n $tests = $DB->get_records('codehandin_test', array('checkpointid' => $cp->id));\r\n// $cp = (array) $cp;\r\n// $cp['tests'] = $tests;\r\n// $cp = (object) $cp;\r\n// \r\n// echo '<pre>';\r\n// print_r($tests);\r\n// echo '</pre>';\r\n }\r\n\r\n// echo '<pre>';\r\n// print_r($checkpoints);\r\n// echo '</pre>';\r\n// echo '<pre>';\r\n// print_r($cpids);\r\n// echo '</pre>';\r\n// echo '<pre>';\r\n// print_r($tests);\r\n// echo '</pre>';\r\n // assignment is now fancy packed\r\n\r\n\r\n\r\n foreach ($checkpoints as $cp) {\r\n $default_values['assignsubmission_codehandin_cpname'] = $cp->name;\r\n $default_values['assignsubmission_codehandin_cpdescription'] = $cp->description;\r\n $default_values['assignsubmission_codehandin_cpruntimeargs'] = $cp->runtimeargs;\r\n $default_values['assignsubmission_codehandin_cpordering'] = $cp->ordering;\r\n foreach ($tests as $test) {\r\n $default_values['assignsubmission_codehandin_testassessment'] = $test->assessment;\r\n $default_values['assignsubmission_codehandin_testdescription'] = $test->description;\r\n $default_values['assignsubmission_codehandin_testretval'] = $test->retval;\r\n }\r\n }\r\n } else {\r\n file_prepare_draft_area($drafttestinputid, null, 'assignsubmission_codehandin', ASSIGNSUBMISSION_CODEHANDIN_FILEAREA, 0, array(\r\n 'subdirs' => 0,\r\n 'maxbytes' => $course->maxbytes,\r\n 'maxfiles' => 1,\r\n 'accepted_types' => '*'\r\n ));\r\n }\r\n\r\n // $DB->update_record($table, $dataobject, $bulk=false)\r\n\r\n $default_values['assignsubmission_codehandin_testinput'] = $drafttestinputid;\r\n $default_values['assignsubmission_codehandin_testoutput'] = $drafttestoutputid;\r\n $default_values['assignsubmission_codehandin_teststderr'] = $draftteststderr;\r\n }", "public function processReports();", "public function getTemplateVars(){\n\n return $this->template_vars;\n\n }", "protected function beforeGetData()\n {\n\n }", "function prepare_vars_for_template_usage()\n {\n }", "public function getTemplateVariables()\n\t{\n\t\treturn array_merge($this->template_variables, [\n\t\t\t'options' => $this->getOptions(),\n\t\t\t'column' => $this->getColumn(),\n\t\t\t'key' => $this->getKey(),\n\t\t\t'status' => $this\n\t\t]);\n\t}", "public function prepareData() {\r\n $sections = GearSection::getAll($this->id_shop);\r\n $this->smarty->assign('sections', $sections);\r\n $data = array();\r\n foreach($sections as $section) {\r\n $opts = GearOption::getBySection($section->id, $this->id_shop);\r\n $std = new stdClass();\r\n $std->id = $section->id;\r\n $std->name = $section->name;\r\n $std->label = $section->label;\r\n $std->options = $opts;\r\n array_push($data, $std);\r\n }\r\n \r\n if ($this->imported) { // generate css after import\r\n require_once 'classes/FrontStyle.php';\r\n FrontStyle::generateGearCss($data);\r\n }\r\n \r\n return $data;\r\n }", "private function createTableData() {\n $variables = [];\n\n /** @var WooCommerceData $wooData */\n $wooData = $this->getDetailData();\n $this->wooData = $wooData;\n\n // Main\n $variables[_wpcc('Main')] = [\n _wpcc('Product URL') => $wooData->getProductUrl(),\n _wpcc('Button Text') => $wooData->getButtonText(),\n _wpcc('Sale Price') => $wooData->getSalePrice(),\n _wpcc('Regular Price') => $wooData->getRegularPrice(),\n _wpcc('Product Type') => $this->getProductTypeName(),\n _wpcc('Virtual?') => (bool)$wooData->isVirtual(),\n _wpcc('Downloadable?') => (bool)$wooData->isDownloadable(),\n ];\n\n // Downloads\n if ($wooData->isDownloadable()) {\n $variables[_wpcc('Downloads')] = [\n _wpcc('Downloadable File URLs') => $this->getDownloadableFileUrls(),\n _wpcc('Download Limit') => $wooData->getDownloadLimit(),\n _wpcc('Download Expiry') => $wooData->getDownloadExpiry(),\n ];\n }\n\n // Inventory.\n $variables[_wpcc('Inventory')] = [\n _wpcc('SKU') => $wooData->getSku(),\n _wpcc('Manage stock?') => (bool)$wooData->isManageStock(),\n _wpcc('Stock Quantity') => $wooData->getStockQuantity(),\n _wpcc('Backorders') => $this->getBackorders(),\n _wpcc('Low Stock Amount') => $wooData->getLowStockAmount(),\n _wpcc('Stock Status') => $this->getStockStatus(),\n _wpcc('Sold individually?') => (bool)$wooData->isSoldIndividually(),\n ];\n\n // Shipping. It is only available for non-virtual products.\n if (!$wooData->isVirtual()) {\n $variables[_wpcc('Shipping')] = [\n _wpcc('Weight') => $wooData->getWeight(),\n _wpcc('Length') => $wooData->getLength(),\n _wpcc('Width') => $wooData->getWidth(),\n _wpcc('Height') => $wooData->getHeight(),\n _wpcc('Shipping Class') => $this->getShippingClass(),\n ];\n }\n\n // Attributes\n $variables[_wpcc('Attributes')] = $this->getAttributes();\n\n // Advanced\n $variables[_wpcc('Advanced')] = [\n _wpcc('Purchase Note') => $wooData->getPurchaseNote(),\n _wpcc('Enable reviews?') => (bool)$wooData->isEnableReviews(),\n _wpcc('Menu Order') => $wooData->getMenuOrder(),\n ];\n\n return $variables;\n }", "protected function getPreparedTemplate() {}", "public function getStatusData()\r\n\t{\r\n\t\t$data = array(\r\n\t\t\t'source' => array(\r\n\t\t\t\t'a' => array(\r\n\t\t\t\t\t'selected' => false,\r\n\t\t\t\t\t'preferred' => false,\r\n\t\t\t\t\t'voltage' => false,\r\n\t\t\t\t\t'frequency' => false,\r\n\t\t\t\t\t'status' => false,\r\n\t\t\t\t),\r\n\t\t\t\t'b' => array(\r\n\t\t\t\t\t'selected' => false,\r\n\t\t\t\t\t'preferred' => false,\r\n\t\t\t\t\t'voltage' => false,\r\n\t\t\t\t\t'frequency' => false,\r\n\t\t\t\t\t'status' => false,\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t\t'phaseSynchronization' => false,\r\n\t\t\t'totalLoad' => false,\r\n\t\t\t'totalPower' => false,\r\n\t\t\t'peakLoad' => false,\r\n\t\t\t'energy' => false,\r\n\t\t\t'powerSupplyStatus' => false,\r\n\t\t\t'communicationStatus' => false,\r\n\t\t);\r\n\r\n\t\t$this->hr->get('/status_update.html');\r\n\r\n\t\tif ($this->hr->result) {\r\n\t\t\t// selected source\r\n\t\t\tif (preg_match('/selected source<\\/span>\\s*<span class=\"txt\">source\\s+([a-z])/i', $this->hr->result, $matches)) {\r\n\t\t\t\t$source = strtolower($matches[1]);\r\n\t\t\t\t$data['source'][$source]['selected'] = true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// preferred source\r\n\t\t\tif (preg_match('/preferred source<\\/span>\\s*<span class=\"txt\">source\\s+([a-z])/i', $this->hr->result, $matches)) {\r\n\t\t\t\t$source = strtolower($matches[1]);\r\n\t\t\t\t$data['source'][$source]['preferred'] = true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// source voltage\r\n\t\t\tif (preg_match('/source voltage \\(a\\/b\\)<\\/span>\\s*<span class=\"txt\">([0-9\\.]+)\\s*\\/?\\s*([0-9\\.]*)/i', $this->hr->result, $matches)) {\r\n\t\t\t\t$data['source']['a']['voltage'] = $matches[1];\r\n\t\t\t\t$data['source']['b']['voltage'] = $matches[2];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// frequency\r\n\t\t\tif (preg_match('/source frequency \\(a\\/b\\)<\\/span>\\s*<span class=\"txt\">([0-9\\.]+)\\s*\\/?\\s*([0-9\\.]*)/i', $this->hr->result, $matches)) {\r\n\t\t\t\t$data['source']['a']['frequency'] = $matches[1];\r\n\t\t\t\t$data['source']['b']['frequency'] = $matches[2];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// status\r\n\t\t\tif (preg_match('/source status \\(a\\/b\\)<\\/span>\\s*<span class=\"txt\">([a-z]+)\\s*\\/?\\s*([a-z]*)/i', $this->hr->result, $matches)) {\r\n\t\t\t\t$data['source']['a']['status'] = ($matches[1] == 'OK') ? true : false;\r\n\t\t\t\t$data['source']['b']['status'] = ($matches[2] == 'OK') ? true : false;\r\n\t\t\t}\r\n\r\n\t\t\t// phase sync\r\n\t\t\tif (preg_match('/phase synchronization<\\/span>\\s*<span class=\"txt\">([a-z]+)/i', $this->hr->result, $matches)) {\r\n\t\t\t\t$data['phaseSynchronization'] = ($matches[1] == 'No') ? false : true;\r\n\t\t\t}\r\n\r\n\t\t\t// total load\r\n\t\t\tif (preg_match('/total\\s+load<\\/span>\\s*<span class=\"txt\">([0-9\\.]+)/i', $this->hr->result, $matches)) {\r\n\t\t\t\t$data['totalLoad'] = floatval($matches[1]);\r\n\t\t\t}\r\n\r\n\t\t\t// total power\r\n\t\t\tif (preg_match('/total\\s+power<\\/span>\\s*<span class=\"txt\">([0-9\\.]+)/i', $this->hr->result, $matches)) {\r\n\t\t\t\t$data['totalPower'] = floatval($matches[1]);\r\n\t\t\t}\r\n\r\n\t\t\t// peak load\r\n\t\t\tif (preg_match('/peak\\s+load<\\/span>\\s*<span class=\"l2b txt\">([0-9\\.]+)/i', $this->hr->result, $matches)) {\r\n\t\t\t\t$data['peakLoad'] = floatval($matches[1]);\r\n\t\t\t}\r\n\r\n\t\t\t// energy\r\n\t\t\tif (preg_match('/energy<\\/span>\\s*<span class=\"l2b txt\">([0-9\\.]+)/i', $this->hr->result, $matches)) {\r\n\t\t\t\t$data['energy'] = floatval($matches[1]);\r\n\t\t\t}\r\n\r\n\t\t\t// PS status\r\n\t\t\tif (preg_match('/power supply status<\\/span>\\s*<span class=\"txt\">([a-z]+)/i', $this->hr->result, $matches)) {\r\n\t\t\t\t$data['powerSupplyStatus'] = ($matches[1] == 'OK') ? true : false;\r\n\t\t\t}\r\n\r\n\t\t\t// comm status\r\n\t\t\tif (preg_match('/communication status<\\/span>\\s*<span class=\"txt\">([a-z]+)/i', $this->hr->result, $matches)) {\r\n\t\t\t\t$data['communicationStatus'] = ($matches[1] == 'OK') ? true : false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $data;\r\n\t}", "private function initializeTemplateMessages()\n {\n if (is_null($this->templateErrors)) {\n $this->templateErrors = array();\n }\n\n if (is_null($this->templateWarnings)) {\n $this->templateWarnings = array();\n }\n\n if (is_null($this->templateConfirms)) {\n $this->templateConfirms = array();\n }\n\n if (is_null($this->templateErrors)) {\n $this->templateInfos = array();\n }\n }", "protected function getModulesData() {}", "public function get_pre_configuration_template() {\n\n\t\t$classes = $this->get_css_classes(false);\n\t\t\n\t\t?>\n\t\t<tr class=\"<?php echo $classes . ' ' . $this->method . '_pre_config_container';?>\">\n\t\t\t<td colspan=\"2\">\n\t\t\t\t<h3><?php echo $this->desc; ?></h3>\n\t\t\t</td>\n\t\t</tr>\n\n\t\t<?php\n\t}", "public function preUpdate()\n {\n $this->dateModification = new \\DateTime();\n }", "private function set_template() {\n\t\t$table_open = $this->check_template(@$this->template->table_open, '<table border=\"1\">');\n\t\t$table_close = $this->check_template(@$this->template->table_close, '</table>');\n\t\t$thead_open = $this->check_template(@$this->template->thead_open, '<thead>');\n\t\t$thead_close = $this->check_template(@$this->template->thead_close, '</thead>');\n\t\t$tbody_open = $this->check_template(@$this->template->tbody_open, '<tbody>');\n\t\t$tbody_close = $this->check_template(@$this->template->tbody_close, '</tbody>');\n\t\t$tfoot_open = $this->check_template(@$this->template->tfoot_open, '<tfoot>');\n\t\t$tfoot_close = $this->check_template(@$this->template->tfoot_close, '</tfoot>');\n\t\t$tr_open = $this->check_template(@$this->template->tr_open, '<tr>');\n\t\t$tr_close = $this->check_template(@$this->template->tr_close, '</tr>');\n\n\t\t$table_structure = array(\n\t\t\t'table_open'=>$table_open,\n\t\t\t'table_close'=>$table_close,\n\t\t\t'thead_open'=>$thead_open,\n\t\t\t'thead_close'=>$thead_close,\n\t\t\t'tbody_open'=>$tbody_open,\n\t\t\t'tbody_close'=>$tbody_close,\n\t\t\t'tfoot_open'=>$tfoot_open,\n\t\t\t'tfoot_close'=>$tfoot_close,\n\t\t\t'tr_open'=>$tr_open,\n\t\t\t'tr_close'=>$tr_close\n\t\t);\n\t\t$table_structure = json_encode($table_structure);\n\t\t$table_structure = json_decode($table_structure);\n\n\t\treturn $table_structure;\n\t}", "private function _fillAdditionalTemplateData()\n {\n $departments = ['' => trans('labels.please_select')];\n foreach (Department::with('translations')->get() as $department) {\n $departments[$department->id] = $department->name;\n }\n $this->data('departments', $departments);\n }", "public function preUpdate()\n {\n $this->updated = new \\DateTime();\n }", "public function prepare()\n {\n parent::prepare();\n\n if ($this->getOptions() instanceof \\MageWorx\\SeoReports\\Model\\Source\\DynamicProblems) {\n\n $reportConfig = $this->reportConfig->getConfigProblemSections();\n\n if (!empty($reportConfig[$this->getName()])) {\n\n $config = $this->getData('config');\n $options = [];\n\n foreach ($reportConfig[$this->getName()] as $problemType => $problemConfig) {\n\n if ($problemType == 'duplicate') {\n $options[] = [\n 'value' => 'duplicate',\n 'label' => __('Duplicated')\n ];\n } elseif ($problemType == 'missing') {\n $options[] = [\n 'value' => 'missing',\n 'label' => __('Missing')\n ];\n } elseif ($problemType == 'length') {\n $options[] = [\n 'value' => 'length',\n 'label' => __('Length')\n ];\n }\n }\n\n $config['options'] = $options;\n $this->setData('config', $config);\n }\n }\n }", "protected function LoadData()\n\t{\n\t\t$head = $this->GetProject()->GetHeadCommit();\n\t\t$this->tpl->assign(\"head\",$head);\n\n\t\t$this->tpl->assign('page', $this->params['page']);\n\t\t$skip = $this->params['page'] * 100;\n\n\t\t$headlist = $this->GetProject()->GetHeadList()->GetOrderedHeads('-committerdate', 101, $skip);\n\t\tif (isset($headlist) && (count($headlist) > 0)) {\n\t\t\tif (count($headlist) > 100) {\n\t\t\t\t$headlist = array_slice($headlist, 0, 100);\n\t\t\t\t$this->tpl->assign('hasmoreheads', true);\n\t\t\t}\n\t\t\t$this->tpl->assign(\"headlist\", $headlist);\n\t\t}\n\t}", "public function getDatas()\n\t{\n\t\t$this->skeleton = $this->data[\"skeleton\"];\n\t\t$this->javascript = $this->data[\"javascript\"];\n\t\t$this->css = $this->data[\"css\"];\n\t\t$this->module = $this->data[\"module\"];\n\t\t$this->site = $this->data[\"site\"];\n\t}", "public function __construct()\n {\n $this->templateData = array(\n // Any data that belongs to every template.\n );\n $this->before();\n }", "public function getData()\n {\n return array(\n 'status' => self::statusOkay,\n 'resource' => $this->getResourceName(),\n 'description' => 'Server Swap File Usage',\n 'data' => $this->getSwapData()\n );\n }", "public function views_data() {\n $data = parent::views_data();\n //dsm($data);\n $data['tincan_statement']['stored'] = array(\n 'title' => t('Stored'),\n 'help' => t('Stored date value, the date the statement was stored'),\n 'field' => array(\n 'handler' => 'tincan_lrs_handler_field_datetime',\n 'click sortable' => TRUE,\n ),\n 'sort' => array(\n 'handler' => 'tincan_lrs_handler_sort_date',\n ),\n 'filter' => array(\n 'handler' => 'tincan_lrs_handler_filter_datetime',\n ),\n 'argument' => array(\n 'handler' => 'views_handler_argument_tincanlrs_fulldate',\n ),\n );\n $data['tincan_statement']['timestamp'] = array(\n 'title' => t('Timestamp'),\n 'help' => t('Timestamp of the statement'),\n 'field' => array(\n 'handler' => 'tincan_lrs_handler_field_datetime',\n 'click sortable' => TRUE,\n ),\n 'sort' => array(\n 'handler' => 'tincan_lrs_handler_sort_date',\n ),\n 'filter' => array(\n 'handler' => 'tincan_lrs_handler_filter_datetime',\n ),\n 'argument' => array(\n 'handler' => 'views_handler_argument_tincanlrs_fulldate',\n ),\n );\n return $data;\n }", "public function getDataUpdate()\n {\n return $this->data_update;\n }", "private function prepareDatasForNewsPanel(Template $t) {\r\n\t\t$newsService = new NewsService();\r\n\t\t$t->newsPreviewList = $newsService->search(true, false, 0, $this->newsPreviewCount);\r\n\t\t//$date = new DateTimeFrench(\"now\",new DateTimeZone('UTC'));\r\n\t\t$date = new DateTimeCustom(DateTimeCustom::NOW);\r\n\t\t$t->newsPreviewDate = $date->format(\"d F\");\r\n\t\t$t->newsFileLocation = News::fileDefaultLocation;\r\n\t\treturn $t;\r\n\t}", "protected function setUpConfigurationData() {}", "protected function initResultFields()\r\n {\r\n }", "protected function preProcess() {}", "public function preUpdate()\n {\n \t$this->dateFound = new \\DateTime(\"now\");\n }", "public function getData()\n {\n return array(\n 'status' => self::statusOkay,\n 'resource' => $this->getResourceName(),\n 'description' => 'PHP Version Information',\n 'data' => $this->getVersionData()\n );\n }", "public function initTemplate() {}", "public static function updateTpl()\n {\n extract(FeedPage::$var);\n?>\n<?php include(\"tpl/update.tpl.php\"); ?>\n<?php\n }", "public function getTemplateData(array $customData = []);", "protected function setupTemplate() {\r\n \r\n }", "public function providerDataOfCounterToUpdating()\r\n\t{\r\n\t\treturn array(\r\n\t\t\tarray(Counter::TYPE_IP, self::TEST_IP_ADDRESS, 4),\r\n\t\t\tarray(Counter::TYPE_IP_RANGE, self::TEST_IP_RANGE, 4),\r\n\t\t\tarray(Counter::TYPE_IP_COUNTRY, self::TEST_IP_COUNTRY, 4),\r\n\t\t\tarray(Counter::TYPE_USERNAME, self::TEST_USERNAME, 4),\r\n\t\t);\r\n\t}", "public function correctDataProvider(): array\n {\n return [\n 'default values' => $this->prepareDefaultValuesTestData(),\n 'overridden_values' => $this->prepareOverriddenValuesTestData(),\n 'multi_results' => $this->prepareMultiResultTestData(),\n ];\n }", "public function getPageData()\n {\n $pageData = parent::getPageData();\n $pageData['menu'] = 'sample';\n $pageData['title'] = 'bs4-components-twig';\n $pageData['icon'] = 'fa-magic';\n\n return $pageData;\n }", "function templateData($file) {\n\t\treturn src\\Libre::__templateData($file);\n\t}", "public function getTemplateVars(){\n\t\t\treturn $this->template_vars;\n\t\t}", "public static function hookData() {\r\n return array_merge_recursive( array (\r\n 'contentComment' => \r\n array (\r\n 0 => \r\n array (\r\n 'selector' => 'li.ipsDataItem > div.ipsDataItem_main > div.ipsType_break.ipsContained > h4.ipsType_sectionHead.ipsContained > a.ipsType_blendLinks > span.cSearchResultHighlight',\r\n 'type' => 'add_before',\r\n 'content' => '{{if $comment->item()->prefix()}}\r\n\t{{$prefix = \\IPS\\Application::load(\"advancedtagsprefixes\")->getPrefixByTitle( $comment->item()->prefix() );}}\r\n\t{{if $prefix instanceof \\IPS\\advancedtagsprefixes\\Prefix and $prefix->id}}\r\n\t\t{$prefix->pre|raw}\r\n\t\t{{if $prefix->showtitle}}\r\n\t\t\t{$comment->item()->prefix()}\r\n\t\t{{endif}}\r\n\t\t{$prefix->post|raw}\r\n\t{{endif}}\r\n{{endif}}',\r\n ),\r\n ),\r\n), parent::hookData() );\r\n}" ]
[ "0.5940317", "0.5926782", "0.5818001", "0.57136965", "0.56867206", "0.5643051", "0.56323236", "0.56283516", "0.55528146", "0.55338997", "0.54815525", "0.5401672", "0.54012936", "0.5378693", "0.537162", "0.53187644", "0.53041244", "0.5270606", "0.52558017", "0.52430856", "0.52359724", "0.52325237", "0.5229748", "0.52209866", "0.5210606", "0.52009684", "0.5182428", "0.51719487", "0.51664174", "0.5162866", "0.51610434", "0.5153973", "0.5137517", "0.51297754", "0.51223356", "0.51134557", "0.5102445", "0.5093754", "0.5092782", "0.5084209", "0.5071145", "0.506565", "0.50552714", "0.5052359", "0.5050608", "0.5049562", "0.50453347", "0.504439", "0.5039725", "0.50374633", "0.50327545", "0.5032326", "0.5016629", "0.5009188", "0.49655586", "0.49619812", "0.49599984", "0.49583435", "0.49561936", "0.49487472", "0.49439782", "0.49382475", "0.49329782", "0.4932904", "0.4929227", "0.492245", "0.49202064", "0.49124584", "0.49073747", "0.48926383", "0.48926228", "0.48890975", "0.48859307", "0.4884697", "0.48843068", "0.48682892", "0.4865216", "0.48629245", "0.48584458", "0.4850697", "0.48493916", "0.48435494", "0.4839785", "0.48309588", "0.4830649", "0.4830242", "0.48244402", "0.48234904", "0.482342", "0.48232633", "0.48188758", "0.4813143", "0.48084363", "0.48060706", "0.48057413", "0.47990397", "0.4797939", "0.4795758", "0.47898066", "0.47862935" ]
0.77148503
0
Add a custom attribute
public function addCustomAttribute($key, $value = null) { $this->CUSTOMATTRIBUTES[$key] = $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addAttribute($name, $value);", "function addAttribute($name, $value) {\n $this->_attributes[$name] = $value;\n }", "public function addAttribute(string $name, $value): self;", "public function createAttribute()\n\t{\n\n\t\t$this->createCustomAttribute($this->attributeName, $this->arguments);\n\n\t}", "function AddAttribute() {\n $db = Core::GetDB();\n\n $id = Core::GetFromPOST('id');\n $attrs = Core::GetFromPOST('attrs');\n\n $attrs = fix_attrs($attrs);\n\n foreach ($attrs AS $attr) {\n $attr = explode(':', $attr);\n\n if (count($attr) == 3) {\n if (empty($attr) === false) {\n $db->Query(\"DELETE FROM data_xml_attributes WHERE data_xml_item_id = $id AND attr_name='{$attr[0]}' LIMIT 1\");\n $db->Query(\"INSERT INTO data_xml_attributes (data_xml_item_id, attr_name, attr_value, attr_type) VALUES ($id, '{$attr[0]}', '{$attr[1]}', '{$attr[2]}')\");\n }\n }\n }\n}", "public function add_attribute(HTMLAttribute $attribute){\n array_push($this -> attributes, $attribute);\n }", "function addAttribute($k, $v = null, $ns = null):void {parent::addAttribute($this->k($k), $v, $ns);}", "public function AddAttribute($key, $value){\r\r\n\t\t$this->attributes[$key] = $value;\r\r\n\t}", "function add_attribute($dom, $element, $name, $value) {\n\t$attr = $element->appendChild($dom->createAttribute($name));\n\t$attr->appendChild($dom->createTextNode($value));\n\treturn $attr;\n}", "function AddAttr() {\n $db = Core::GetDB();\n\n $title = urldecode(Core::GetFromPOST('title'));\n\n $res = $db->Query(\"SELECT data_xml_item_id FROM data_xml_items WHERE title = ? LIMIT 1\", array(\n array(1, $title, IDBController::PARAM_STR)\n ));\n $id = $res->FetchRow();\n $id = $id[0];\n\n $attrs = array(urldecode(Core::GetFromPOST('attr')));\n\n $attrs = fix_attrs($attrs);\n\n foreach ($attrs AS $attr) {\n $attr = explode(':', $attr);\n\n if (count($attr) == 3) {\n if (empty($attr) === false) {\n $db->Query(\"DELETE FROM data_xml_attributes WHERE data_xml_item_id = $id AND attr_name='{$attr[0]}' LIMIT 1\");\n $db->Query(\"INSERT INTO data_xml_attributes (data_xml_item_id, attr_name, attr_value, attr_type) VALUES ($id, '{$attr[0]}', '{$attr[1]}', '{$attr[2]}')\");\n }\n }\n }\n}", "public function addAdditionalAttribute(ExtensibleTypeAttribute $attribute)\n {\n $this->additionalAttributes[$attribute->getAttributeId()] = $attribute;\n }", "public function addAttribute($name, $value)\n {\n return $this->add('attributes', array(\n 'name' => $name,\n 'value' => $value\n ));\n }", "protected function addAtributosMetadata(ReeverAttributeMetadata $attr){\n\t\t$this->_atributosMetadata[$attr->attrName] = $attr;\n\t}", "public function initAttribute();", "public function setAttribute($attribute, $value)\n {\n }", "function set_attr($attr=array()) {\n $this->other_attr = $attr;\n }", "public function add(Attribute $attribute)\n {\n $this->items[$attribute->getName()] = $attribute;\n }", "public function setAttribute(string $attribute, string $value);", "public function addAttribute($name, $type)\n {\n $this->attributeTypes[$name] = $type;\n $this->attributeValues[$name] = NULL; // Inicializacion de campo simple, garantiza que siempre hay un valor para la key $name\n }", "function _wp_add_global_attributes($value)\n {\n }", "function useattrib($attribute) { atkuse(\"attribute\", $attribute); }", "abstract public function attr(string $component_name, string $attr_data = null);", "function custom_add_artwork_attr( $attributes ){\n\t\t\t$attributes['class'] .= ' equalize col-xs-12 col-sm-6 col-md-4';\n\t\t\t$attributes['itemtype'] = 'http://schema.org/ArtworkArticle';\n\t\t\t// return the attributes\n\t\t\treturn $attributes;\n\t\t}", "public function setAttribute($attribute, $value)\r\n\t{\r\n\t\t\r\n\t}", "public function withAttribute($name, $value)\n {\n }", "public function withAttribute($name, $value)\n {\n }", "public function writeAttribute($attribute, $value) {}", "public function attributes($attr){\n $this->httpRequest->attributes($attr);\n }", "function addAttributeClass($accessModifier, $attributeType, $dataType, $name) {\n\t\tarray_push($this->attributesArray, array(\"modifier\" => $accessModifier, \"attributeType\" => $attributeType, \"type\" => $dataType, \"name\" => $name, \"priority\" => true, \"parentClass\" => $this->name, \"conflicts\" => false, \"show\" => true));\n\t}", "public function add($attribute, $validator);", "function userAttrAdd (\n $email,\n $attr,\n $value\n ) {\n global $db;\n\n $response = $db->client->updateItem(array(\n \"TableName\" => $db->prefixTable . 'Users', \n \"Key\" => array(\n \"email\" => array( Type::STRING => $email ) // Primary Key\n ),\n \"AttributeUpdates\" => array(\n $attr => array(\n \"Action\" => AttributeAction::ADD,\n \"Value\" => array( Type::NUMBER => $value )\n )\n )\n ));\n\n #return $response;\n }", "public function setAttr($attribute, $value) {\n $this->attributes[$attribute] = $value;\n }", "public function toAttribute()\n {\n }", "public function setAttribute($name, $value);", "public function setAttributes();", "function insert_attr($key, $value) {\n $this->other_attr[$key] = $value;\n }", "public function addAttributes($post_id)\n\t{\n\t\t$attr = 'custom';\n\t\t\n\t\twp_set_object_terms($post_id, '0', $attr);\n\n $thedata[sanitize_title($attr)] = array(\n \t'name' => wc_clean($attr),\n 'value' => '0',\n 'postion' => '0',\n 'is_visible' => '0',\n 'is_variation' => '1',\n 'is_taxonomy' => '1'\n );\n \n\t\tupdate_post_meta($post_id, '_product_attributes', $thedata);\n\t\t\t\t\t\t\n\t}", "public function addAttributes(\\obiba\\mica\\AttributeDto $value) {\n return $this->_add(15, $value);\n }", "public function addAttributes(\\obiba\\mica\\AttributeDto $value) {\n return $this->_add(15, $value);\n }", "public function addAttribute($attributeName, $attributeValue){\n $this->{$attributeName} = $attributeValue;\n }", "abstract public function writeAttribute($name, $value);", "public function addAttr($key, $value): void\n {\n $this->attrs[$key] = $value;\n }", "public function getCustomAttributesAttribute()\n {\n return $this->custom_attributes()->get();\n }", "public function define_attribute($attribute,$value)\n\t\t{\n\t\t\tif(!isset($this->matchcode[$attribute]))\n\t\t\t{\n\t\t\t\terror_log(__FILE__.' name '.$attribute.' not defined in matchcode array');die();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif($this->matchcode[$attribute][1] == 'A' || $this->matchcode[$attribute][1] == 'W')\n\t\t\t\t{\n\t\t\t\t\t$var = $this->matchcode[$attribute][0];\n\t\t\t\t\t$this->$var = $value;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\terror_log(__FILE__.' name '.$attribute.' no write access');die();\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function addAttributes(\\obiba\\mica\\AttributeDto $value) {\n return $this->_add(2, $value);\n }", "public function addAttributes($attr, $event)\n\t{\n\t\t$attributes = $event->eventType->eventAttributes;\n\t\t$allowed = array();\n\t\tforeach ($attributes as $attribute){\n\t\t\t$allowed[] = $attribute->idEventAttribute;\n\t\t}\n\t\tforeach (array_keys($attr) as $id){\n\t\t\tif (in_array($id, $allowed)){\n\t\t\t\t// later also get the value type from the event attribute and validate input data to that defined type\n\t\t\t\t// also needs error checking and handling\n\t\t\t\t$eav = new EventAttributeValue();\n\t\t\t\t$eav->eventId = $event->idEvent;\n\t\t\t\t$eav->eventAttributeId = $id;\n\t\t\t\t$eav->value = $attr[$id];\n\t\t\t\t$eav->save();\n\t\t\t} else {\n\t\t\t\t//Possible hacking attempt\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public function addAttributes(\\obiba\\mica\\AttributeDto $value) {\n return $this->_add(3, $value);\n }", "public function addAttributes(\\obiba\\mica\\AttributeDto $value) {\n return $this->_add(9, $value);\n }", "public function getAttribute($attribute)\n {\n }", "private function addAtrributesToCRUD() {\r\n if (!empty($this->__attributes)) {\r\n $this->myCRUD()->setAtributes($this->__attributes);\r\n }\r\n }", "public function addAttribute($name, $value)\n {\n if (is_scalar($value)) {\n $value = explode(' ', (string) $value);\n }\n $name = htmlspecialchars($name, ENT_QUOTES);\n if (false==$this->hasAttribute($name)) {\n $this->attributes[$name] = array();\n }\n foreach ($value as $v) {\n if (!in_array($v, $this->attributes[$name])) {\n $this->attributes[$name][] = $v;\n }\n }\n }", "abstract public function setAttribute($key, $value);", "function addAttribute($element, $name, $attrDefinition) {\n $config = &$this->htmlPurifier()->config;\n $def =& $config->getHTMLDefinition(TRUE);\n $def->addAttribute($element, $name, $attrDefinition);\n }", "public function attribute($name, $value){\n $this->_attributes[$name] = $value;\n return $this;\n }", "public function testAddingAnAttributeToAContext()\n {\n $newContext = $this->contextService->createContext('new_context');\n $newContext->addAttribute(new StringAttribute('new_context.test', 'value'));\n\n // Retrieve the context and retrieve the attribute.\n $newContextA = $this->contextService->getContext('new_context');\n $attribute = $newContextA->getAttribute('new_context.test');\n\n $this->assertTrue($attribute->getId() == 'new_context.test');\n $this->assertTrue($attribute->getValue() == 'value');\n }", "function getAdditionalAttributes() ;", "public function getAdditionalAttributes() {}", "public function getAdditionalAttributes() {}", "public function addAttributes(\\obiba\\mica\\AttributeDto $value) {\n return $this->_add(7, $value);\n }", "public function getAdditionalAttributes() {}", "public function getAdditionalAttributes() {}", "public function getAdditionalAttributes() {}", "public function getAdditionalAttributes() {}", "public function getAdditionalAttributes() {}", "public function getAdditionalAttributes() {}", "protected function addAttribute(Tag $tag, $attrName)\n\t{\n\t\t$isUrl = false;\n\t\t$exprs = [];\n\t\tforeach ($this->captures as $key => $capture)\n\t\t{\n\t\t\tif ($capture['name'] !== $attrName)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$exprs[] = $capture['expr'];\n\t\t\tif (isset($this->references['asUrl'][$key]))\n\t\t\t{\n\t\t\t\t$isUrl = true;\n\t\t\t}\n\t\t}\n\t\t$exprs = array_unique($exprs);\n\n\t\t$regexp = $this->delimiter . '^';\n\t\t$regexp .= (count($exprs) === 1) ? $exprs[0] : '(?:' . implode('|', $exprs) . ')';\n\t\t$regexp .= '$' . $this->delimiter . 'D' . $this->modifiers;\n\n\t\t$attribute = $tag->attributes->add($attrName);\n\n\t\t$filter = $this->configurator->attributeFilters['#regexp'];\n\t\t$filter->setRegexp($regexp);\n\t\t$attribute->filterChain[] = $filter;\n\n\t\tif ($isUrl)\n\t\t{\n\t\t\t$filter = $this->configurator->attributeFilters['#url'];\n\t\t\t$attribute->filterChain[] = $filter;\n\t\t}\n\t}", "public function addAttribute(AttributeInterface $attribute) {\n if(isset($this->attributes[$attribute->getName()]))\n trigger_error(\"Attribute \" . $attribute->getName() . \" already exists\", E_USER_NOTICE);\n\n $this->attributes[ $attribute->getName() ] = $attribute;\n }", "protected function _generateAttributeOnToken()\n\t{\n\t\tif (!isset($this->_tempToken[\"args\"][\"attributes\"])) {\n\t\t\t$this->_tempToken[\"args\"][\"attributes\"] = array();\n\t\t}\n\t\tif (isset($this->_tempToken[\"args\"][\"attributes\"][$this->_attribute])) {\n\t\t\t$this->_attribute = null;\n\t\t} else {\n\t\t\t$this->_tempToken[\"args\"][\"attributes\"][$this->_attribute] = array(\n\t\t\t\t\"value\" => \"\"\n\t\t\t);\n\t\t}\n\t}", "public function getAttribute($attribute)\r\n\t{\r\n\t\t\r\n\t}", "private function addAttribs($attr_ar)\n {\n $str = '';\n foreach ($attr_ar as $key => $val) {\n $str .= \" $key=\\\"$val\\\"\";\n }\n return $str;\n }", "public function addAttributes(\\obiba\\mica\\AttributeDto $value) {\n return $this->_add(24, $value);\n }", "public function add_attrib($key, $val)\n {\n $this->_attribs = array_merge(array($key => $val), $this->_attribs);\n }", "public function setAttribute($key, $value);", "public function setAttribute($key, $value);", "public function getCustomAttributes() {}", "public function addMeta(string $name, array $attributes, bool $checkNameAttribute = true);", "public function set_attribute($name, $value)\n {\n }", "public function addAttributes($arrAttributes) {\n foreach ($arrAttributes as $key => $val) {\n $this->attributes[$key] = $val;\n }\n }", "public function att($attribute, $value = '', $concat = false)\r\n {\r\n if (is_array($attribute)) {\r\n foreach ($attribute as $key => $value) {\r\n $this->attributes[$key] = $value;\r\n } \r\n } elseif ($concat && !empty($this->attributes[$attribute])) { \r\n $this->attributes[$attribute] .= ($concat === true ? ' ' : $concat) . $value;\r\n } else {\r\n $this->attributes[$attribute] = $value;\r\n }\r\n return $this;\r\n }", "public function add_attr($type,$content){\n\t\tif(!isset($this->attr[$type])){\n\t\t\t$this->attr=array_merge($this->attr,array((string)$type=>(string)$content));\n\t\t}\n\t\treturn $this;\n\t}", "public function testAddAttributesToNodeForAttributeWithValue()\n {\n $dom = Document::fromHtml('<p>Hello World</p>');\n $element = $dom->createElement('div');\n $attributes = [\n 'class' => 'myClass',\n 'id' => 'myId',\n ];\n $element->setAttributes($attributes);\n\n $this->assertTrue($element->hasAttributes());\n $this->assertElementHasAttributes($element, $attributes);\n }", "public function customAttribute(?CustomAttribute $value): self\n {\n $this->instance->setCustomAttribute($value);\n return $this;\n }", "public function setAttribute($attribute, $value) {\n\t\tif (!$this->attributes) {\n\t\t\t$this->attributes = tx_newspaper::selectOneRow(\n\t\t\t\t\t'*', tx_newspaper::getTable($this), $this->condition\n\t\t\t);\n\t\t}\n\t\t\n\t\t$this->attributes[$attribute] = $value;\n\t}", "function std_attr($at){\n switch($at){\n case 'wrap': $attr = array('id'=>strval($this->obj->id));break;\n default:\n $attr = array();\n\n }\n return new opc_attrs(NULL,$attr);\n }", "public function setAttribute($attr_name, $attr_value)\n {\n $this->attributes[$attr_name] = $attr_value;\n return $this;\n }", "public function createContextAttribute($contextName, $attributeName);", "public function attr() {\n\t\treturn utils::attr($this->attr, func_get_args());\n\t}", "public function getAttribute($name, $inherited = true) {}", "public function add_attribute($post_id, $key, $value) \n\t { \n\t global $wpdb;\n\t global $woocommerce;\n\t\t\t \n\t // get attribute name, label\n\t if ( isset($this->amz_settings['attr_title_normalize']) && $this->amz_settings['attr_title_normalize'] == 'yes' )\n\t \t$attribute_label = $this->attrclean_splitTitle( $key );\n\t\t\telse\n\t\t\t\t$attribute_label = $key;\n\t $attribute_name = $this->the_plugin->cleanTaxonomyName($key, false);\n\n\t // set attribute type\n\t $attribute_type = 'select';\n\t \n\t // check for duplicates\n\t $attribute_taxonomies = $wpdb->get_var(\"SELECT * FROM {$wpdb->prefix}woocommerce_attribute_taxonomies WHERE attribute_name = '\".esc_sql($attribute_name).\"'\");\n\t \n\t if ($attribute_taxonomies) {\n\t // update existing attribute\n\t $wpdb->update(\n $wpdb->prefix . 'woocommerce_attribute_taxonomies', array(\n\t\t 'attribute_label' => $attribute_label,\n\t\t 'attribute_name' => $attribute_name,\n\t\t 'attribute_type' => $attribute_type,\n\t\t 'attribute_orderby' => 'name'\n ), array('attribute_name' => $attribute_name)\n\t );\n\t } else {\n\t // add new attribute\n\t $wpdb->insert(\n\t $wpdb->prefix . 'woocommerce_attribute_taxonomies', array(\n\t \t'attribute_label' => $attribute_label,\n\t \t'attribute_name' => $attribute_name,\n\t \t'attribute_type' => $attribute_type,\n\t \t'attribute_orderby' => 'name'\n\t )\n\t );\n\t }\n\n\t // avoid object to be inserted in terms\n\t if (is_object($value))\n\t return;\n\t\n\t // add attribute values if not exist\n\t $taxonomy = $this->the_plugin->cleanTaxonomyName($attribute_name);\n\t\t\t\n\t if( is_array( $value ) )\n\t {\n\t $values = $value;\n\t }\n\t else\n\t {\n\t $values = array($value);\n\t }\n \n\t // check taxonomy\n\t if( !taxonomy_exists( $taxonomy ) ) \n\t {\n\t // add attribute value\n\t foreach ($values as $attribute_value) {\n\t \t$attribute_value = (string) $attribute_value;\n\n\t if (is_string($attribute_value)) {\n\t // add term\n\t //$name = stripslashes($attribute_value);\n\t\t\t\t\t\t$name = $this->the_plugin->cleanValue( $attribute_value ); // 2015, october 28 - attributes bug update!\n\t $slug = sanitize_title($name);\n\t\t\t\t\t\t\n\t if( !term_exists($name) ) {\n\t if( trim($slug) != '' && trim($name) != '' ) {\n\t \t$this->the_plugin->db_custom_insert(\n\t \t\t$wpdb->terms,\n\t \t\tarray(\n\t \t\t\t'values' => array(\n\t\t \t'name' => $name,\n\t\t \t'slug' => $slug\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t'format' => array(\n\t\t\t\t\t\t\t\t\t\t\t'%s', '%s'\n\t\t\t\t\t\t\t\t\t\t)\n\t \t\t),\n\t \t\ttrue\n\t \t);\n\t /*$wpdb->insert(\n $wpdb->terms, array(\n\t\t 'name' => $name,\n\t\t 'slug' => $slug\n )\n\t );*/\n\t\n\t // add term taxonomy\n\t $term_id = $wpdb->insert_id;\n\t \t$this->the_plugin->db_custom_insert(\n\t \t\t$wpdb->term_taxonomy,\n\t \t\tarray(\n\t \t\t\t'values' => array(\n\t\t \t'term_id' => $term_id,\n\t\t \t'taxonomy' => $taxonomy\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t'format' => array(\n\t\t\t\t\t\t\t\t\t\t\t'%d', '%s'\n\t\t\t\t\t\t\t\t\t\t)\n\t \t\t),\n\t \t\ttrue\n\t \t);\n\t /*$wpdb->insert(\n $wpdb->term_taxonomy, array(\n\t\t 'term_id' => $term_id,\n\t\t 'taxonomy' => $taxonomy\n )\n\t );*/\n\t\t\t\t\t\t\t\t$term_taxonomy_id = $wpdb->insert_id;\n\t\t\t\t\t\t\t\t$__dbg = compact('taxonomy', 'attribute_value', 'term_id', 'term_taxonomy_id');\n\t\t\t\t\t\t\t\t//var_dump('<pre>1: ',$__dbg,'</pre>');\n\t }\n\t } else {\n\t // add term taxonomy\n\t $term_id = $wpdb->get_var(\"SELECT term_id FROM {$wpdb->terms} WHERE name = '\".esc_sql($name).\"'\");\n\t $this->the_plugin->db_custom_insert(\n\t \t$wpdb->term_taxonomy,\n\t \tarray(\n\t \t\t'values' => array(\n\t\t \t\t'term_id' => $term_id,\n\t\t \t\t'taxonomy' => $taxonomy\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t'format' => array(\n\t\t\t\t\t\t\t\t\t\t'%d', '%s'\n\t\t\t\t\t\t\t\t\t)\n\t \t),\n\t \ttrue\n\t );\n\t /*$wpdb->insert(\n \t\t$wpdb->term_taxonomy, array(\n\t\t 'term_id' => $term_id,\n\t\t 'taxonomy' => $taxonomy\n )\n\t );*/\n\t\t\t\t\t\t\t$term_taxonomy_id = $wpdb->insert_id;\n\t\t\t\t\t\t\t$__dbg = compact('taxonomy', 'attribute_value', 'term_id', 'term_taxonomy_id');\n\t\t\t\t\t\t\t//var_dump('<pre>1c: ',$__dbg,'</pre>');\n\t }\n\t }\n\t }\n\t }\n\t else \n\t {\n\t // get already existing attribute values\n\t $attribute_values = array();\n\t /*$terms = get_terms($taxonomy, array('hide_empty' => true));\n\t\t\t\tif( !is_wp_error( $terms ) ) {\n\t \tforeach ($terms as $term) {\n\t \t$attribute_values[] = $term->name;\n\t \t}\n\t\t\t\t} else {\n\t\t\t\t\t$error_string = $terms->get_error_message();\n\t\t\t\t\tvar_dump('<pre>',$error_string,'</pre>'); \n\t\t\t\t}*/\n\t\t\t\t$terms = $this->the_plugin->load_terms($taxonomy);\n\t foreach ($terms as $term) {\n\t \t$attribute_values[] = $term->name;\n\t }\n\t \n\t // Check if $attribute_value is not empty\n\t if( !empty( $attribute_values ) )\n\t {\n\t foreach( $values as $attribute_value ) \n\t {\n\t \t$attribute_value = (string) $attribute_value;\n\t\t\t\t\t\t$attribute_value = $this->the_plugin->cleanValue( $attribute_value ); // 2015, october 28 - attributes bug update!\n\t if( !in_array( $attribute_value, $attribute_values ) ) \n\t {\n\t // add new attribute value\n\t $__term_and_tax = wp_insert_term($attribute_value, $taxonomy);\n\t\t\t\t\t\t\t$__dbg = compact('taxonomy', 'attribute_value', '__term_and_tax');\n\t\t\t\t\t\t\t//var_dump('<pre>1b: ',$__dbg,'</pre>');\n\t }\n\t }\n\t }\n\t }\n\t\n\t // Add terms\n\t if( is_array( $value ) )\n\t {\n\t foreach( $value as $dm_v )\n\t {\n\t \t$dm_v = (string) $dm_v;\n\t if( !is_array($dm_v) && is_string($dm_v)) {\n\t \t$dm_v = $this->the_plugin->cleanValue( $dm_v ); // 2015, october 28 - attributes bug update!\n\t $__term_and_tax = wp_insert_term( $dm_v, $taxonomy );\n\t\t\t\t\t\t$__dbg = compact('taxonomy', 'dm_v', '__term_and_tax');\n\t\t\t\t\t\t//var_dump('<pre>2: ',$__dbg,'</pre>');\n\t }\n\t }\n\t }\n\t else\n\t {\n\t \t$value = (string) $value;\n\t if( !is_array($value) && is_string($value) ) {\n\t \t$value = $this->the_plugin->cleanValue( $value ); // 2015, october 28 - attributes bug update!\n\t $__term_and_tax = wp_insert_term( $value, $taxonomy );\n\t\t\t\t\t$__dbg = compact('taxonomy', 'value', '__term_and_tax');\n\t\t\t\t\t//var_dump('<pre>2b: ',$__dbg,'</pre>');\n\t }\n\t }\n\t\t\t\n\t // link to woocommerce attribute values\n\t if( !empty( $values ) )\n\t {\n\t foreach( $values as $term )\n\t {\n\t \t\n\t if( !is_array($term) && !is_object( $term ) )\n\t { \n\t $term = sanitize_title($term);\n\t \n\t $term_taxonomy_id = $wpdb->get_var( \"SELECT tt.term_taxonomy_id FROM {$wpdb->terms} AS t INNER JOIN {$wpdb->term_taxonomy} as tt ON tt.term_id = t.term_id WHERE t.slug = '\".esc_sql($term).\"' AND tt.taxonomy = '\".esc_sql($taxonomy).\"'\" );\n \n\t if( $term_taxonomy_id ) \n\t {\n\t $checkSql = \"SELECT * FROM {$wpdb->term_relationships} WHERE object_id = {$post_id} AND term_taxonomy_id = {$term_taxonomy_id}\";\n\t if( !$wpdb->get_var($checkSql) ) {\n\t $wpdb->insert(\n\t $wpdb->term_relationships, array(\n\t\t\t 'object_id' => $post_id,\n\t\t\t 'term_taxonomy_id' => $term_taxonomy_id\n\t )\n\t );\n\t }\n\t }\n\t }\n\t }\n\t }\n\t }", "public function createAttribute(array $params)\n {\n }", "function doCustomAttributes(&$element) \n {\n \n foreach ($element->ucAttributes as $key=>$value) {\n \n list($namespace,$attribute) = (strpos($key, \":\") > -1) ? explode(':',$key) : array(\"\", $key);\n $method = strtolower($attribute) . 'Attribute';\n if (strtolower($namespace) != 'flexy') {\n continue;\n }\n if ((strlen($attribute)) && (method_exists($this,$method))) {\n $this->{$method}($element, $element->getAttribute($key));\n }\n } \n }", "protected function registerAttributes()\n {\n $this->app->singleton('attributes', function ($app) {\n return new AttributeCollection();\n });\n }", "function attribute($text) {\n\t\treturn $this->text($text);\n\t}", "public function setAttribute($attribute, $value)\n {\n $this->attributes[$attribute] = $value;\n\n return $this;\n\n }", "function nav_menu_link_attributes( $attr ) {\n\n\t$attr['class'] = 'menu__link';\n\n\treturn $attr;\n}", "private function appendAttribute(string $attrName, string $attrValue): void\n {\n $xml1 = defined('ENT_XML1') ? ENT_XML1 : 16;\n\n $attrName = htmlspecialchars($attrName, $xml1 | ENT_COMPAT);\n $attrValue = htmlspecialchars($attrValue, $xml1 | ENT_COMPAT);\n\n $this->outString .= ' ' . $attrName . '=\"' . $attrValue . '\"';\n }", "public function addOption($attribute, $data)\r\n {\r\n Mage::helper('api')->toArray($data);\r\n return parent::addOption($attribute, $data);\r\n }", "public function supportsAttribute($attribute);", "abstract protected function mustApplyRuleOnAttribute(): bool;", "public function addAttributes(string $property, array $attributes)\n {\n $this->attributes[$property] = $attributes;\n }" ]
[ "0.79308", "0.7323362", "0.73170894", "0.716069", "0.7054427", "0.7004061", "0.68869555", "0.6751144", "0.662246", "0.6610369", "0.65632683", "0.65312934", "0.6523838", "0.642234", "0.63994384", "0.6396421", "0.63917685", "0.63744026", "0.6360682", "0.6356719", "0.63457364", "0.63453645", "0.62885004", "0.62783444", "0.625849", "0.625849", "0.6225287", "0.6186706", "0.6179334", "0.6176218", "0.61745536", "0.6152176", "0.612427", "0.6110377", "0.61054456", "0.60963833", "0.60937554", "0.6085048", "0.6085048", "0.6074483", "0.6067425", "0.6058198", "0.60147005", "0.5996694", "0.59841895", "0.59784025", "0.59740555", "0.59649944", "0.5963572", "0.59497917", "0.594859", "0.59343725", "0.5928691", "0.59121734", "0.5904602", "0.58949757", "0.5886448", "0.5886448", "0.5886368", "0.5886265", "0.5885999", "0.5885999", "0.5885999", "0.5885999", "0.58856803", "0.58805674", "0.585434", "0.58469784", "0.5846888", "0.58421546", "0.5840092", "0.58340806", "0.5833532", "0.5833532", "0.5824805", "0.5821933", "0.5815711", "0.5801139", "0.57941407", "0.57795507", "0.5778291", "0.5742877", "0.5733173", "0.5729111", "0.5726255", "0.5713996", "0.57035774", "0.5701821", "0.56992364", "0.5680656", "0.56706905", "0.5664961", "0.5661754", "0.5659983", "0.56481016", "0.56468755", "0.56408185", "0.563517", "0.5627199", "0.562092" ]
0.66961396
8
Display a listing of the resource.
public function index() { // $activities = Activity::orderBy('id', 'asc')->get()->all(); $activities = Activity::withCount('activityImages')->orderBy('id', 'desc')->paginate(10); return view('pages.activities.index', ['activities' => $activities]); }
{ "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 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 actionRestList() {\n\t $this->doRestList();\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 CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function 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 index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n {\n $this->booklist();\n }", "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 $items = Item::all();\n return view('items::list_items',compact('items'));\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 // 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 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 showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\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 actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\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 listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7447426", "0.73628515", "0.73007894", "0.7249563", "0.7164474", "0.7148467", "0.71320325", "0.7104678", "0.7103152", "0.7100512", "0.7048493", "0.6994995", "0.69899315", "0.6935843", "0.6899995", "0.68999326", "0.6892163", "0.6887924", "0.6867505", "0.6851258", "0.6831236", "0.68033123", "0.6797587", "0.6795274", "0.67868614", "0.67610204", "0.67426085", "0.67303514", "0.6727031", "0.67257243", "0.67257243", "0.67257243", "0.67195046", "0.67067856", "0.67063624", "0.67045796", "0.66655326", "0.666383", "0.66611767", "0.66604036", "0.66582054", "0.6654805", "0.6649084", "0.6620993", "0.66197145", "0.6616024", "0.66077465", "0.6602853", "0.6601494", "0.6593894", "0.65878326", "0.6586189", "0.6584675", "0.65813804", "0.65766823", "0.65754175", "0.657203", "0.657202", "0.65713936", "0.65642136", "0.6563951", "0.6553249", "0.6552584", "0.6546312", "0.6536654", "0.6534106", "0.6532539", "0.6527516", "0.6526785", "0.6526042", "0.65191233", "0.6518727", "0.6517732", "0.6517689", "0.65155584", "0.6507816", "0.65048593", "0.6503226", "0.6495243", "0.6492096", "0.6486592", "0.64862204", "0.6485348", "0.6483991", "0.64789015", "0.6478804", "0.64708763", "0.6470304", "0.64699143", "0.6467142", "0.646402", "0.6463102", "0.6460929", "0.6458856", "0.6454334", "0.6453653", "0.645357", "0.6450551", "0.64498454", "0.64480853", "0.64453584" ]
0.0
-1
Show the form for creating a new resource.
public function create() { $activityImages = ActivityImage::all(); return view('pages.activities.create', ['activityImages' => $activityImages]); }
{ "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, [ 'title' => 'required', 'description' => 'required', ]); /* CREATING THE activity */ $activity = new Activity(); $activity->title = $request->title; $activity->description = $request->description; $activity->save(); /* CREATING THE image(s) */ if($request->image_url) { $counter = 1; $activityImagesFolderPath = 'app\\tmp\\activityImages\\' . '\\'; foreach ($request->image_url as $image_url) { $activityImage = new activityImage(); $activityImage->activity_id = $activity->id; $activityImage->title = $request->title . '_' . $counter; $activityImage->image_url = $image_url; $activityImage->save(); $counter++; //Deleting the temporary files File::delete(storage_path($activityImagesFolderPath . $image_url)); } } return redirect('/admin/activities')->with('status', 'Book created 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(Activity $activity) { $nextActivityId = ($activity->id)+1; $nextActivity = Activity::where('id', $nextActivityId)->get()->first(); if($nextActivity != null) $next = $nextActivityId; else $next = 0; $previousActivityId = ($activity->id)-1; $previousActivity = Activity::where('id', $previousActivityId)->get()->first(); if($previousActivity != null) $previous = $previousActivityId; else $previous = 0; return view('pages.activities.show', ['activity' => $activity, 'next'=>$next, 'previous'=> $previous]); }
{ "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(Activity $activity) { return view('pages.activities.edit', ['activity' => $activity]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit(form $form)\n {\n //\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function 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 return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "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) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "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 $data = Restful::find($id);\n return view('restful.edit', compact('data'));\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 return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\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\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.7854417", "0.7692986", "0.72741747", "0.72416574", "0.7173436", "0.706246", "0.70551765", "0.698488", "0.6948513", "0.694731", "0.69425464", "0.6929177", "0.6902573", "0.6899662", "0.6899662", "0.6878983", "0.6865711", "0.6861037", "0.6858774", "0.6847512", "0.6836162", "0.68129057", "0.68083996", "0.68082106", "0.6803853", "0.67966306", "0.6794222", "0.6794222", "0.6789979", "0.67861426", "0.678112", "0.677748", "0.67702436", "0.67625374", "0.6748088", "0.67475355", "0.67475355", "0.67446774", "0.6742005", "0.67374676", "0.6727497", "0.6714345", "0.6696231", "0.6693851", "0.6689907", "0.6689746", "0.6687102", "0.66870165", "0.6684574", "0.6670877", "0.66705006", "0.6667089", "0.6667089", "0.6663205", "0.66626745", "0.66603845", "0.66593564", "0.66560745", "0.66545844", "0.66447026", "0.6633528", "0.66319114", "0.66298395", "0.66298395", "0.6622365", "0.6621021", "0.66170275", "0.661664", "0.6612467", "0.66107714", "0.6608453", "0.65979743", "0.659645", "0.6596389", "0.6592672", "0.6591205", "0.6588125", "0.6582166", "0.6581656", "0.65811247", "0.65785724", "0.65782833", "0.6576397", "0.6570971", "0.6569483", "0.6568432", "0.656811", "0.6563493", "0.6563493", "0.65622604", "0.65602434", "0.65585065", "0.6557997", "0.65574414", "0.6556701", "0.65565753", "0.6556226", "0.6556107", "0.6549118", "0.65485924", "0.65463555" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, Activity $activity) { /* UPDATING THE activity */ $activity->title = $request->title; $activity->description = $request->description; $activity->save(); /* UPDATING THE image(s) */ if($request->image_url[0] != null) { //Delete all the images. $oldImages = ActivityImage::where('activity_id', $activity->id)->get()->all(); foreach($oldImages as $oldImage) { $oldImage->delete(); } //Create the new images and delete the temporary files. $counter = 1; $activityImagesFolderPath = 'app\\tmp\\activityImages\\' . '\\'; foreach ($request->image_url as $image_url) { $activityImage = new activityImage(); $activityImage->activity_id = $activity->id; $activityImage->title = $request->title . '_img' . $counter; $activityImage->image_url = $image_url; $activityImage->save(); $counter++; //Deleting the temporary files File::delete(storage_path($activityImagesFolderPath . $image_url)); } } return redirect('/admin/activities')->with('status', 'Book edited 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 destroy(Activity $activity) { $activity->delete(); return redirect('/admin/activities')->with('status','Item 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
Helper function to quickly output the results of $books from our various tests For demo purposes we're echoing data out in the controller, but you should not do this in projects or "real world" examples.
private function printBooks($books) { foreach($books as $book) { echo 'id:'.$book->id.' title: '.$book->title.'<br>'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function testFindBooksResults() {\n\n /* test title */\n echo '<h2 style=\"color: black;\">testFindBookResults...</h2>';\n\n /* can't page layout because of the indeterminate nature of\n * results (i.e. we can't guarantee there's a book in the \n * production database, and the page layout depends on whether\n * or not there's a result)*/\n\n /* a fix for this could be to possibly display the\n * container (div or whatever) for results, then just\n * not populate it with anything if no results */\n\n $this->assertTrue(1);\n\n }", "public function testBookControllerShow()\n {\n $this->visit('books/'.$this->saveBookId)\n ->see('I play drums')\n ->see('Ringo Star');\n $this->seeInDatabase('books', ['title' => 'I play drums']);\n }", "public function testGetAllBooks()\n {\n //Given we have books in the database\n $book = factory('App\\Book')->create();\n $bookTwo = factory('App\\Book')->create();\n // When the user visits the index page\n $response = $this->get('/api/books');\n //They should see the books Titles and authors\n $response\n ->assertStatus(200) \n ->assertSee($book->title)\n ->assertSee($book->author)\n ->assertSee($bookTwo->title)\n ->assertSee($bookTwo->author);\n \n }", "public function testBookView()\n {\n $response = $this->get('api/book/getBooks');\n\n $response->assertStatus(200);\n }", "public function test_get_all_books()\n {\n $randomBook = Book::factory()->create();\n $response = $this->getJson('/api/v1/books');\n $response\n ->assertStatus(200)\n ->assertJson([\n \"status_code\" => 200,\n \"status\" => \"success\",\n \"data\" => [\n [\n \"id\" => $randomBook->id,\n \"name\" => $randomBook->name,\n \"isbn\" => $randomBook->isbn,\n \"authors\" => $randomBook->authors,\n \"number_of_pages\" => $randomBook->number_of_pages,\n \"publisher\" => $randomBook->publisher,\n \"country\" => $randomBook->country,\n \"release_date\" => $randomBook->release_date,\n ],\n ]\n ]);\n }", "function outputBooks() {\n $db = connectDB();\n $books = new BooksGateway($db);\n $sql = $books->getSelectStatement();\n // Subcategory filter\n if (!empty($_GET['subcategory']) && empty($_GET['imprint'])) {\n $sql .= 'where SubcategoryName = \"'. $_GET['subcategory'] .'\"';\n }\n // Imprint filter\n elseif(empty($_GET['subcategory']) && !empty($_GET['imprint'])) {\n $sql .= 'where Imprint =\"' . $_GET['imprint']. '\"';\n }\n // Both filter\n elseif(!empty($_GET['subcategory']) && !empty($_GET['imprint'])) {\n $sql .= 'where SubcategoryName = \"'. $_GET['subcategory'] .'\"' . 'AND'.'Imprint =\"' . $_GET['imprint']. '\"';\n }\n // No filter\n else {\n // Print all books.\n }\n $sql .= ' group by Title order by Title ASC limit 0,20';\n $result = $books->getStatement($sql);\n //var_dump($result);\n foreach($result as $key => $value) {\n $img= '<img src=\"book-images/thumb/'.$result[$key]['ISBN10']. '.jpg\" alt=\"book\">';\n echo constructBookLink($result[$key]['ISBN10'], $img) .'<br/>';\n echo '<a href=\"single-book.php?ISBN10=' . $result[$key]['ISBN10'] . '\" class=\"';\n if (isset($_GET['ISBN10']) && $_GET['ISBN10'] == $result[$key]['ISBN10']) echo 'active';\n echo 'item\">';\n echo $result[$key]['Title'] . '</a><br/>'; \n echo '<p>';\n echo \"<span>Year: </span>\". $result[$key]['CopyrightYear'] . \"<br/>\";\n echo \"<span>Subcategory Name: </span>\". $result[$key]['SubcategoryName'] . \"<br/>\";\n echo \"<span>Imprint Name: </span>\". $result[$key]['Imprint']. \"<br/>\";\n echo '</P><br/>';\n }\n }", "public function index()\n {\n return $this->successResponse($this->client->getBooks());\n }", "public function print_result(){\n $parsed_result = (array) $this->get_result()->parse_result();\n foreach($parsed_result['items'] as $repository_detail){\n $out .= $repository_detail->full_name.': '.$repository_detail->description.'<br />';\n }\n echo $out;\n }", "public static function index()\r\n\t{\r\n\t\t$title = 'Book List';\r\n\t\t$model = new Books();\r\n\t\t$books = $model->all();\r\n\t\t/*\r\n\t\t// compact do this (down):\r\n\t\t$data['title'] = 'Book List';\r\n\t\t$data['books'] = [];\r\n\t\t*/\r\n\t\tView::show('/books/index', compact('title','books'));\r\n\t}", "function print_results() {\r\n if ($list = $this->print_list()) {\r\n echo '<p>' . $this->print_count() . '</p>';\r\n echo $list;\r\n echo '<p class=\"more\">' . $this->print_more() . '</p>';\r\n }\r\n else {\r\n echo $this->zero_results;\r\n }\r\n }", "public function testFindBooks()\n {\n User::factory()->create();\n $response = $this->get('api/book/lists');\n\n $response\n ->assertStatus(200);\n // TODO\n // ->assertExactJson([\n // 'books' => [\n // ['id' => '1', 'title' => 'aaa'],\n // // ['id' => '2', 'title' => 'bbb'],\n // // ['id' => '3', 'title' => 'ccc'],\n // ]\n // ]);\n }", "public function indexAction() {\n\n\t\t// Connect to AmazonWebservice \n\t\t$query = new Zend_Service_Amazon(\n\t\t\t\t\t\t\t'AKIAI3S5LPYDW7CCEXFQ',\n\t\t\t\t\t\t\t'DE',\n\t\t\t\t\t\t\t'+vabmr8+C4eyYe5DbmISmHsBZc9NOHVX/QbK6WM9'\n \t\t); \n\t\t$results = $query->itemSearch(array(\n\t\t\t\t\t\t\t\t'SearchIndex' => 'Books',\n\t\t\t\t\t\t\t\t'Keywords'\t => 'tiere',\n\t\t\t\t\t\t\t\t'ResponseGroup' => 'Medium'\n\t\t\t\t\t\t));\n \n\t\t$books = array();\n \tforeach ($results as $result) {\n\t\t\t$books[] = array(\n\t\t\t\t'title' => $result->Title,\n\t\t\t\t'link'\t => $result->DetailPageURL,\n\t\t\t\t'image' => $result->MediumImage\n\t\t\t\t\t\t\t? $result->MediumImage->Url->getUri() : ''\n\t\t\t);\n \t}\n\t\t$this->view->books = $books;\n }", "public function allBooks ()\n {\n $books = $this->book->findAll();\n $this->show('admin/allbooks', ['books' => $books]);\n }", "public function getEx1() {\n # Use the QueryBuilder to get all the books\n $books = \\DB::table('books')->get();\n $this->printBooks($books);\n }", "public function getEx11() {\n $books = \\App\\Book::orderBy('title','asc')->get();\n $this->printBooks($books);\n # Underlying SQL: select * from `books` order by `title` asc\n }", "public function testSpecificBookView()\n {\n $category = factory(\\App\\Category::class)->create(\n [\n 'id' => '1'\n ]\n );\n $publisher = factory(\\App\\Publisher::class)->create(\n [\n 'id' => '1'\n ]\n );\n $book = factory(\\App\\Book::class)->create(\n [\n 'id' => '1',\n 'category_id' => '1',\n 'publisher_id' => '1'\n ]\n );\n\n $response = $this->get('api/book/1');\n\n $response->assertStatus(200);\n }", "public function showTestResults() {\n echo \"Tests: {$this->tests}\\n\";\n echo \"Pass: {$this->pass}\\n\";\n echo \"Fail: {$this->fail}\\n\";\n }", "public function showmybooks()\n {\n $user = Auth::user();\n return response()->json(BookResource::collection($user->books), 200);\n }", "public function actionIndex()\n {\n $query = Books::find()->with(['authors', 'genres']);\n\t\t$pages = new Pagination(['defaultPageSize'=> 10, 'totalCount' => $query->count()]);\n\t\t$books = $query->offset($pages->offset)\n\t\t->limit($pages->limit)\n\t\t->all();\n return $this->render('index', compact('books', 'pages'));\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function index()\n {\n // Create Summary for library.\n $results = Book::with('section', 'authors')->paginate(10);\n return view('summary', compact('results', $results));\n }", "public function outputResults()\r\n {\r\n // loop all products and display results per product\r\n foreach ($this->Products->getAllProducts() as $productId => $productName) {\r\n echo \"Product ID: \" . $productId . \"\\n\";\r\n echo \"Product Name: \" . $productName . \"\\n\";\r\n echo \"Total Units Sold: \" . $this->ProductsSold->getSoldTotal($productId) . \"\\n\";\r\n echo \"Total Units Purchased and Pending: \" . $this->ProductsPurchased->getPurchasedPendingTotal($productId) . \"\\n\";\r\n echo \"Total Units Purchased and Received: \" . $this->ProductsPurchased->getPurchasedReceivedTotal($productId) . \"\\n\";\r\n echo \"Current Stock Level: \" . $this->Inventory->getStockLevel($productId) . \"\\n\\n\";\r\n }\r\n }", "public function testGetAllBooksFromAuthor()\n {\n $author_actions = new AuthorsActions();\n\n $response = $author_actions->handleGetBooksFromAuthorAction(['name' => 'terry_pratchett'], []);\n\n self::assertEquals(RestResponse::STATUS_OK, $response->getCode());\n self::assertEquals(3, count($response->getData()));\n }", "public function showAllBooks()\n {\n return response()->json(Book::all());\n }", "public function Get_Bookings_Test()\n {\n $this->get('/bookings')->seeJson(['Test' => 'Test Data']);\n }", "public function index()\n {\n $books = Book::all();\n return $this->setStatusCode(200)->respond([\n 'data' => $this->booksTransformer->transformCollection($books->all())\n ]);\n }", "public function practice17()\n {\n $books = Book::all();\n\n foreach ($books as $book) {\n dump($book->title);\n }\n }", "public function showResults(){\n $this->extractQuestions();\n }", "public function index()\n\t{\n\t\t$books = BookRepository::all();\n\t\t$tags = Tag::all();\n\t\treturn View::make('books.index', array('books'=>$books, 'tags'=>$tags));\n\t}", "public function run()\n {\n $book = [\n [\n 'book_name' => 'Wikipedia',\n 'description' => 'Sint commodo veniam ad cillum occaecat aute consectetur Lorem. Occaecat adipisicing est ad do tempor ipsum. Eu eiusmod proident sit amet consectetur irure sunt consequat. Dolor anim nisi consequat nulla veniam magna duis ex aliquip veniam.',\n 'img' => '.\\public\\wiki.jpg',\n 'author_id' => '2',\n ],\n [\n 'book_name' => 'Qui commodo',\n 'description' => 'Et occaecat in ut pariatur elit qui. Enim do consectetur velit sunt minim velit eu est. Laboris cillum eiusmod ex aliquip. Voluptate in reprehenderit est ea duis duis magna.',\n 'img' => '.\\public\\wiki.jpg',\n 'author_id' => '1',\n ],\n [\n 'book_name' => 'Et occaecat in',\n 'description' => 'Excepteur dolore labore reprehenderit ex quis reprehenderit nulla deserunt ullamco ea exercitation aliqua aute. Fugiat esse pariatur fugiat exercitation incididunt adipisicing ex excepteur id aute labore ad fugiat nulla. Incididunt nulla nostrud in labore in pariatur irure ipsum ipsum exercitation.',\n 'img' => '.\\public\\wiki.jpg',\n 'author_id' => '3',\n ],\n [\n 'book_name' => 'Excepteur dolore',\n 'description' => 'Adipisicing officia reprehenderit consequat labore excepteur culpa laborum occaecat. Adipisicing anim deserunt reprehenderit exercitation in deserunt. Lorem ad aliquip exercitation aliquip esse adipisicing ullamco in ullamco deserunt ipsum anim. Cillum esse fugiat proident elit aliquip. Magna reprehenderit aliquip laborum cillum in veniam in nostrud dolore irure proident veniam nulla est.',\n 'img' => '.\\public\\wiki.jpg',\n 'author_id' => '4',\n ],\n [\n 'book_name' => 'Adipisicing officia',\n 'description' => 'Anim occaecat ad est nulla laboris laborum esse irure id ullamco adipisicing fugiat laborum nisi. Amet minim sit commodo proident adipisicing exercitation in elit laboris. Ex elit aliquip magna adipisicing veniam officia sit proident duis non. Eiusmod minim aute do ea sit veniam excepteur adipisicing quis exercitation commodo in laborum nulla. Commodo anim commodo et aliquip reprehenderit laboris aute ut cupidatat magna. Culpa veniam aliqua tempor adipisicing anim aliqua magna ipsum qui magna dolore elit dolor. Id exercitation quis esse laborum anim dolore ipsum reprehenderit do.',\n 'img' => '.\\public\\wiki.jpg',\n 'author_id' => '5',\n ],\n ];\n\n foreach ($book as $data) {\n \\App\\Models\\Book::create($data);\n }\n }", "public function index()\n {\n $this->booklist();\n }", "function sayHi(){\n $bookList = $this->BookModel->getBooks();\n\n // Call Views\n $this->requireView(\"Master1\", [\n \"page\" => \"book\"\n ]);\n }", "public function index()\n {\n $books = \\App\\book::all();\n\t\treturn view('book.index')->with('books',$books);\n }", "public function show(Book $book)\n {\n echo \"show\";\n }", "public function showallbooks()\n{\n $all_books = $this->mainscreen_model->get_all_books();\n //create an empty array called data\n $data = array();\n //add the results from the model which are stored in $all_students to data and give it key \"students\"\n //we'll use this key to access the data in the view\n $data['books'] = $all_books;\n //load view show_students.php and pass to it the array data\n $this->load->view('mainpahe-view',$data);\n}", "public function findbooks()\n\t{\n\n\t\t// baca key dari form cari data\n\t\t$key = $_POST['key'];\n\n\t\t// ambil session fullname untuk ditampilkan ke header\n\t\t$data['fullname'] = $_SESSION['fullname'];\n\n\t\t// panggil method findBook() dari model book_model untuk menjalankan query cari data\n\t\t$data['book'] = $this->book_model->findBook($key);\n\n\t\t// tampilkan hasil pencarian di view 'dashboard/books'\n\t\t$this->load->view('dashboard/header', $data);\n\t\t$this->load->view('dashboard/sidebar');\n\t\t$this->load->view('dashboard/books', $data);\n\t\t$this->load->view('dashboard/footer');\n\t}", "public function index()\n {\n $students = Student::all()->take(5);\n \n $result = [];\n foreach ($students as $student) {\n $result [] = $this->ResultFormatter($student);\n }\n return $result;\n }", "public function getEx15() {\n $books = Book::all();\n $this->printBooks($books);\n\t}", "function displaySearch($bookObjects, $suggestedBooks){\n\t\t$noOfResult = count($bookObjects);\n\t\t$noOfSuggest = count($suggestedBooks);\n\t\techo \"<div class = 'RSContainer12'>\";\n\t\tif ($noOfResult <= 1){\n\t\t\t$a=$noOfResult.\" result found\";\n\t\t}\n\t\telse{\n\t\t\t$a=$noOfResult.\" results found\";\n\t\t}\n\t\techo \"</div>\";\n\t\t//the result of the book search\n\t\t$BookResult=$this->display($bookObjects);\n\n\t\t\techo \"<div class = 'RSContainer12'>\";\n\t\t\t\tif ($noOfSuggest == 0){\n\t\t\t\t\t$a=\"No Suggestions\";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$a=\"Suggestions\";\n\t\t\t\t}\n\t\t\techo \"</div>\";\n\t\t\n\t\t$verified_suggestions=array();\n\t\t//to check if the book is contained is he result\n\t\t$verified=false;\n\t\t$no_of_books=count($suggestedBooks);\n\t\tif ($noOfResult>0){\n\t\tforeach ($suggestedBooks as $suggestion){\n\t\t\tforeach ($bookObjects as $bkItem){\n\t\t\t\t\n\t\t\t\tif (($suggestion->getBookID())==($bkItem->getBookID())){\n\t\t\t\t\t\t$verified=false;\n\t\t\t\t\t\tbreak ;\n\t\t\t\t}else{\n\t\t\t\t\t$verified=true;\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t\tif ($verified){\n\t\t\t\t\n\t\t\t\t$verified_suggestions[]=$suggestion;\n\t\t\t\t\t;\n\t\t\t}\n\t\t}\n\t\t//get the display of suggested books\n\t\t$suggestions=$this->display($verified_suggestions);\n\t}else{\n\t\t$suggestions=$this->display($suggestedBooks);\n\t}\n\t\t\n\t\t\n\t\t\n\t\t$result=array($BookResult,$suggestions,$noOfResult);\n\t\t\n\t\treturn $result;\n\t}", "public function index()\n {\n $booket=Booket::all();\n\n return $this->showAll($booket);\n\n }", "public function testing()\n {\n //creating the item array with all the values of book object and fruit object\n $items = [new Book(20, \"1234\"), new Book(100, \"5678\"), new Fruit(10, 2, \"Banana\"), new Fruit(5, 5, \"Apple\")];\n\n //calling calculatePrice function to get the total cost\n $total = $this->calculatePrice($items);\n\n // printing the total cost of all items\n echo (\"Total Cost = \" . $total . \"\\n\");\n }", "public function index()\n {\n $this->statusText = 'success';\n $this->statusCode = 200;\n\n return response()->json([\n 'status_code' => $this->statusCode,\n 'status' => $this->statusText,\n 'data' => Book::all()\n ])->setStatusCode($this->statusCode, $this->statusText);\n }", "public function testBookSearchMustOK()\n {\n $dataSearch = [];\n $dataSearch['search'] = 'TestBook';\n $dataSearch['limit'] = 100;\n $buildParams = http_build_query($dataSearch, PHP_QUERY_RFC1738);\n $url = route('book.index');\n $fullUrl = \"$url?$buildParams\";\n $response = $this->getJson($fullUrl);\n\n $response\n ->assertStatus(200)\n ->assertJsonPath('page_info.total', 1);\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "public function index()\n\t{\n\n\t\t$book_list = Books::select('book_id', 'title', 'author', 'description', 'book_categories.category')\n\t\t\t->join('book_categories', 'book_categories.id', '=', 'books.category_id')\n\t\t\t->orderBy('book_id')->get();\n\t\t// dd($book_list);\n\t\t// $this->filterQuery($book_list);\n\n\t\t// $book_list = $book_list->get();\n\n\t\tfor ($i = 0; $i < count($book_list); $i++) {\n\n\t\t\t$id = $book_list[$i]['book_id'];\n\t\t\t$conditions = array(\n\t\t\t\t'book_id'\t\t\t=> $id,\n\t\t\t\t'available_status'\t=> 1\n\t\t\t);\n\n\t\t\t$book_list[$i]['total_books'] = Issue::select()\n\t\t\t\t->where('book_id', '=', $id)\n\t\t\t\t->count();\n\n\t\t\t$book_list[$i]['avaliable'] = Issue::select()\n\t\t\t\t->where($conditions)\n\t\t\t\t->count();\n\t\t}\n\n\t\treturn $book_list;\n\t}", "public function index()\n {\n $books = Book::with('category')->where(['deleted' => 0])->orderBy('name')->paginate(5);\n return $this->successResponse($books);\n }", "public function index()\n {\n try {\n $o=array();\n $books = $this->model->with(['book_clubs','genres','product_prices','users'])->where('status',1)->orderBy('title','ASC')->paginate(100);\n foreach($books as $book){\n $user=User::findOrFail($book->user_id);\n if($user->status==1){\n array_push($o,$book);\n }\n }\n if(count($o) != 0) {\n return (new BookCollection($o));\n }\n else {\n return ApiHelper::apiResult(true,HttpResponse::HTTP_OK,\"No Books Found\");\n }\n }\n catch(\\Exception $e) {\n return ApiHelper::apiResult(false,HttpResponse::HTTP_UNAUTHORIZED,$e->getMessage());\n }\n }", "public function getAllBooks(){\n $query = \"SELECT * FROM Book;\";\n return $this->getBookDetail($query);\n }", "public function run()\n {\n $time = date(\"Y-m-d H:i:s\");\n\n $books = [\n ['title' => 'Finnegans Wake', 'author' => 'Janes Joyce', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'Don Quixote', 'author' => 'Miguel De Cervantes', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'The Making of Americans', 'author' => 'Gertrude Stein', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'The Stranger', 'author' => 'Albert Camus', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'Pilgrims Progress', 'author' => 'John Bunyan', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'In Search of Lost Time', 'author' => 'Marcel Proust', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'Pale Fire', 'author' => 'Valdimir Nabokov', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'The Trial', 'author' => 'Franz Kafka', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'Ulysses', 'author' => 'James Joyce', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'The Name of the Rose', 'author' => 'Umberto Eco', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'The Gulag Archipelago', 'author' => 'Aleksandr Solzhenitsyn', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'The Diary of a Young Girl', 'author' => 'Anne Frank', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'Gravity\\'s Rainbow', 'author' => 'Thomas Pynchon', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'One Hundred Years of Solitude', 'author' => 'Gabriel García Márquez', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'The Sound and the Fury', 'author' => 'William Faulkner', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'Confusion of Feelings', 'author' => 'Stefan Zweig', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'The Public Burning', 'author' => 'Robert Coover', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'The Joke', 'author' => 'Milan Kundera', 'created_at' => $time, 'updated_at' => $time],\n ];\n\n DB::table('books')->insert($books);\n }", "public function index()\n {\n $books = Book::all();\n\n $categories = Category::all();\n\n $faculties = Faculty::all();\n\n return view('books.index', ['books' => $books, 'categories' => $categories, 'faculties' => $faculties]);\n }", "public function index()\n {\n $book_details = array(\n array('key'=> 0, 'value'=> 'Kochi'),\n array('key'=> 1, 'value'=> 'Female Books'),\n array('key'=> 2, 'value'=> 'Male Books')\n );\n\n $books = Book::orderBy('id','desc')->paginate(4);\n $provinces = Province::select(['id', 'name_' . App::getLocale() . ' as name'])->get();\n $districts = District::select(['id', 'name_' . App::getLocale() . ' as name'])->get();\n $book_types = BookType::select(['id', 'name_' . App::getLocale() . ' as name'])->get();\n\n $assignees = User::select(['id', 'name'])->get();\n return view('book.book_list', compact('books', 'provinces', 'districts', 'book_types', 'book_details', 'assignees'));\n }", "public function getBooks()\n {\n $sql = 'SELECT bookshop_books.id,\n bookshop_books.description,\n bookshop_books.booksName,\n bookshop_books.pubyear,\n bookshop_discounts.id AS discountsId,\n bookshop_discounts.discountsName,\n bookshop_discounts.percent,\n bookshop_books.price,\n bookshop_authors.id AS idAuthors,\n bookshop_authors.authorsName,\n bookshop_genres.id AS idGenres,\n bookshop_genres.genresName\n FROM bookshop_books_to_authors\n INNER JOIN bookshop_books\n ON bookshop_books_to_authors.id_book = bookshop_books.id\n INNER JOIN bookshop_books_to_genres\n ON bookshop_books_to_genres.id_book = bookshop_books.id\n INNER JOIN bookshop_authors\n ON bookshop_books_to_authors.id_author = bookshop_authors.id\n INNER JOIN bookshop_genres\n ON bookshop_books_to_genres.id_genre = bookshop_genres.id\n INNER JOIN bookshop_discounts\n ON bookshop_books.id_discount = bookshop_discounts.id';\n \n $result = $this->db->execute($sql);\n\n if (!$result)\n return $this->error();\n\n return $this->formingBooks($result);\n }", "public function results() {\n // $books = Book::whereRaw('name like ', Input::get('search'), array(25))->get();\n\n $search = Input::get('search');\n $query = '%'.$search.'%';\n\n // $books = Book::where('name', 'like', $query)\n // ->orWhere('author', 'like', $query)\n // ->orWhere('isbn', 'like', $query)\n // ->orWhere('faculty', 'like', $query)->get();\n\n // return View::make('results')->with('books', $books);\n\n $information = DB::table('students')\n ->select('students.*', 'books.*', 'contracts.*')\n ->join('books', 'students.student_id', '=', 'books.student_id')\n ->join('contracts', function($join) use($query) {\n $join->on('books.book_id', '=', 'contracts.book_id')\n ->where('books.name', 'like', $query)\n ->orWhere('books.author', 'like', $query)\n ->orWhere('books.isbn', 'like', $query)\n ->orWhere('books.faculty', 'like', $query);\n })\n ->get();\n return View::make('results')->with('information', $information);\n }", "public function run()\n {\n\n $books = [\n [\n \"title\" => \"フロントエンド開発入門 プロフェッショナルな開発ツールと設計・実装\",\n \"author\" => \"安達 稜/武田 諭\",\n \"caption\" => \"支援ツールを使いこなし効率的に実装をする基礎知識。複数の支援ツールから「なぜそれを使うのか」選択する基準を理解する。\",\n \"publisher\" => \"秀和システム\",\n \"isbn\" => \"9784798061771\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/1771/9784798061771.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/1771/9784798061771.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/1771/9784798061771.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/16461535/\",\n \"sales_date\" => \"2020年10月09日頃\",\n \"price\" => \"3080\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-02-28T09:49:12\",\n \"updated_at\" => \"2021-02-28T09:49:12\",\n ],\n [\n \"title\" => \"Bootstrap4フロントエンド開発の教科書\",\n \"author\" => \"宮本麻矢/朝平文彦\",\n \"caption\" => \"ウェブ開発の知識とコツをしっかりマスター。CSSフレームワークやグリッドデザインの基本から、独自テーマによるカスタマイズ方法まで。Bootstrap4の全機能がこの1冊でわかる!一歩先を目指すWebデザイナー&Webエンジニアにおすすめ!\",\n \"publisher\" => \"技術評論社\",\n \"isbn\" => \"9784297100209\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0209/9784297100209.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0209/9784297100209.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0209/9784297100209.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/15583448/\",\n \"sales_date\" => \"2018年09月\",\n \"price\" => \"3608\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T01:38:10\",\n \"updated_at\" => \"2021-03-01T01:38:10\"\n ],\n [\n \"title\" => \"上 薬剤師業務の基本[知識・態度]第3版\",\n \"author\" => \"上村 直樹\",\n \"caption\" => \"\",\n \"publisher\" => \"羊土社\",\n \"isbn\" => \"9784758109376\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/9376/9784758109376.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/9376/9784758109376.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/9376/9784758109376.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/15183743/\",\n \"sales_date\" => \"2017年11月16日頃\",\n \"price\" => \"4180\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T01:40:48\",\n \"updated_at\" => \"2021-03-01T01:40:48\"\n ],\n [\n \"title\" => \"【POD】迷わない!困らない!レガシーフロントエンド安全改善ガイド\",\n \"author\" => \"麦島 一\",\n \"caption\" => \"自信をもって最後までやりとげる!安全確実にコードをモダンに刷新!\",\n \"publisher\" => \"インプレスR&D\",\n \"isbn\" => \"9784844378075\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8075/9784844378075.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8075/9784844378075.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8075/9784844378075.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/16128358/\",\n \"sales_date\" => \"2019年11月13日頃\",\n \"price\" => \"2420\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T01:41:03\",\n \"updated_at\" => \"2021-03-01T01:41:03\"\n ],\n [\n \"title\" => \"ダイアグラム別UML徹底活用第2版\",\n \"author\" => \"井上樹\",\n \"caption\" => \"UML 2.xに全面対応リニューアル!一層簡潔に、さらに判りやすく。ダイアグラムのマスターに最適な「使いどころ」やノウハウを満載。ユースケース図やクラス図、コンポーネント図はもちろんタイミング図/相互作用概要図、コンポジット構造図、パッケージ図やバージョンの混在による問題点などまで幅広く実用的にフォーカス。\",\n \"publisher\" => \"翔泳社\",\n \"isbn\" => \"9784798118444\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8444/9784798118444.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8444/9784798118444.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8444/9784798118444.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/6975594/\",\n \"sales_date\" => \"2011年02月\",\n \"price\" => \"2838\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T01:41:15\",\n \"updated_at\" => \"2021-03-01T01:41:15\"\n ],\n [\n \"title\" => \"Web APIの設計\",\n \"author\" => \"Arnaud Lauret/株式会社クイープ\",\n \"caption\" => \"\",\n \"publisher\" => \"翔泳社\",\n \"isbn\" => \"9784798167015\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7015/9784798167015.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7015/9784798167015.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7015/9784798167015.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/16380454/\",\n \"sales_date\" => \"2020年08月26日頃\",\n \"price\" => \"4180\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T01:41:37\",\n \"updated_at\" => \"2021-03-01T01:41:37\"\n ],\n [\n \"title\" => \"Atomic Design\",\n \"author\" => \"五藤佑典\",\n \"caption\" => \"UIを、化学の原子に見立てて設計する、Atomic Designの考え方・具体的な手順からReactを使った実装まで、UI設計の本質とともに1冊で解説。インターネットテレビ「AbemaTV」のUI設計を担当した著者が、現場実践をふまえて伝授する。\",\n \"publisher\" => \"技術評論社\",\n \"isbn\" => \"9784774197050\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7050/9784774197050.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7050/9784774197050.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7050/9784774197050.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/15398788/\",\n \"sales_date\" => \"2018年05月\",\n \"price\" => \"3278\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T01:41:48\",\n \"updated_at\" => \"2021-03-01T01:41:48\"\n ],\n [\n \"title\" => \"JavaScript Primer 迷わないための入門書\",\n \"author\" => \"azu/Suguru Inatomi\",\n \"caption\" => \"\",\n \"publisher\" => \"ドワンゴ\",\n \"isbn\" => \"9784048930734\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0734/9784048930734.gif?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0734/9784048930734.gif?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0734/9784048930734.gif?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/16277358/\",\n \"sales_date\" => \"2020年04月27日頃\",\n \"price\" => \"4180\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T01:41:59\",\n \"updated_at\" => \"2021-03-01T01:41:59\"\n ],\n [\n \"title\" => \"Webサイト高速化のための 静的サイトジェネレーター活用入門\",\n \"author\" => \"エビスコム\",\n \"caption\" => \"GatsbyJS×GitHub×Netlify×Contentfulによるサイト構築をステップバイステップで解説。「高速化&最適化」「メタデータ対応」「SPAやPWAへの対応」など、これからのWebサイトに求められる要素に対応するために。\",\n \"publisher\" => \"マイナビ出版\",\n \"isbn\" => \"9784839973001\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/3001/9784839973001.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/3001/9784839973001.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/3001/9784839973001.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/16301755/\",\n \"sales_date\" => \"2020年06月01日頃\",\n \"price\" => \"3498\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T01:42:12\",\n \"updated_at\" => \"2021-03-01T01:42:12\"\n ],\n [\n \"title\" => \"ポートとソケットがわかればインターネットがわかる\",\n \"author\" => \"小川晃通\",\n \"caption\" => \"UNIXの「ポート」と「ソケット」を切り口に、インターネットの仕組みをわかりやすく解説。コンピュータどうしがデータをやりとりする様子をポップなイラストで表現しつつ、今話題のクラウドコンピューティングまで紹介。\",\n \"publisher\" => \"技術評論社\",\n \"isbn\" => \"9784774185705\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5705/9784774185705.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5705/9784774185705.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5705/9784774185705.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/14531920/\",\n \"sales_date\" => \"2016年12月\",\n \"price\" => \"2508\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T01:43:02\",\n \"updated_at\" => \"2021-03-01T01:43:02\"\n ],\n [\n \"title\" => \"Clean Agile 基本に立ち戻れ\",\n \"author\" => \"Robert C.Martin/角 征典\",\n \"caption\" => \"\",\n \"publisher\" => \"ドワンゴ\",\n \"isbn\" => \"9784048930741\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0741/9784048930741.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0741/9784048930741.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0741/9784048930741.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/16440074/\",\n \"sales_date\" => \"2020年10月01日頃\",\n \"price\" => \"2640\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:22:03\",\n \"updated_at\" => \"2021-03-01T05:22:03\"\n ],\n [\n \"title\" => \"Reactビギナーズガイド\",\n \"author\" => \"Stoyan Stefanov/牧野 聡\",\n \"caption\" => \"ReactによるコンポーネントベースのWebフロントエンド開発の入門書。Reactでは小さくて管理が容易なコンポーネントを組み合わせて、大きくて強力なアプリケーションを作成できます。本書の前半は入門編で、簡単なサンプルを使いながらReactの基本やJSXについて学びます。後半は、実際のアプリケーション開発に必要なものや開発を助けてくれるツールについての解説です。具体的には、JavaScriptのパッケージングツール(Browserify)、ユニットテスト(Jest)、構文チェック(ESLint)、型チェック(Flow)、データフローの最適化(Flux)、イミュータブルなデータ(immutableライブラリ)などを取り上げます。対象読者は、ES2015(ES6)の基本をマスターしているフロントエンド開発者。\",\n \"publisher\" => \"オライリー・ジャパン\",\n \"isbn\" => \"9784873117881\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7881/9784873117881.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7881/9784873117881.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7881/9784873117881.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/14746126/\",\n \"sales_date\" => \"2017年03月11日頃\",\n \"price\" => \"2750\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T01:43:13\",\n \"updated_at\" => \"2021-03-01T01:43:13\"\n ],\n [\n \"title\" => \"図解即戦力 ネットワーク構築&運用がこれ1冊でしっかりわかる教科書\",\n \"author\" => \"のびきよ、朝岳健二\",\n \"caption\" => \"小規模ネットワークの設計と構築が自分でできる!新米IT担当者から社内のネットワーク管理者まで、やさしく理解!!\",\n \"publisher\" => \"技術評論社\",\n \"isbn\" => \"9784297115401\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5401/9784297115401.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5401/9784297115401.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5401/9784297115401.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/16410165/\",\n \"sales_date\" => \"2020年09月02日頃\",\n \"price\" => \"1958\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T01:49:37\",\n \"updated_at\" => \"2021-03-01T01:49:37\"\n ],\n [\n \"title\" => \"個人開発のための Webサービス公開マニュアル\",\n \"author\" => \"難波 聖一\",\n \"caption\" => \"デプロイリリーズ運用の手順を全て解説。\",\n \"publisher\" => \"秀和システム\",\n \"isbn\" => \"9784798059310\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/9310/9784798059310.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/9310/9784798059310.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/9310/9784798059310.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/16158182/\",\n \"sales_date\" => \"2019年12月25日頃\",\n \"price\" => \"3300\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T01:50:02\",\n \"updated_at\" => \"2021-03-01T01:50:02\"\n ],\n [\n \"title\" => \"失敗から学ぶRDBの正しい歩き方\",\n \"author\" => \"曽根壮大\",\n \"caption\" => \"MySQL・PostgreSQLの設計と運用を見直す。\",\n \"publisher\" => \"技術評論社\",\n \"isbn\" => \"9784297104085\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/4085/9784297104085.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/4085/9784297104085.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/4085/9784297104085.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/15780611/\",\n \"sales_date\" => \"2019年03月\",\n \"price\" => \"3014\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T01:57:45\",\n \"updated_at\" => \"2021-03-01T01:57:45\"\n ],\n [\n \"title\" => \"達人に学ぶDB設計徹底指南書\",\n \"author\" => \"ミック\",\n \"caption\" => \"データベース設計の正しい考え方と実践ノウハウが身につく67の勘どころ、21問の演習問題。アプリケーション開発者・DBエンジニア必携。\",\n \"publisher\" => \"翔泳社\",\n \"isbn\" => \"9784798124704\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/4704/9784798124704.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/4704/9784798124704.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/4704/9784798124704.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/11582464/\",\n \"sales_date\" => \"2012年03月\",\n \"price\" => \"2860\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T01:57:56\",\n \"updated_at\" => \"2021-03-01T01:57:56\"\n ],\n [\n \"title\" => \"誰も教えてくれなかった実践薬歴\",\n \"author\" => \"山本 雄一郎\",\n \"caption\" => \"薬歴を見れば、その薬剤師の「仕事の質」がわかる!“ソクラテス”こと山本雄一郎が贈る薬局薬学のエディター作品。薬歴を通して薬学管理の実践的な考え方を身につけよう!\",\n \"publisher\" => \"じほう\",\n \"isbn\" => \"9784840751155\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/1155/9784840751155.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/1155/9784840751155.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/1155/9784840751155.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/15602469/\",\n \"sales_date\" => \"2018年09月03日頃\",\n \"price\" => \"3300\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T01:58:06\",\n \"updated_at\" => \"2021-03-01T01:58:06\"\n ],\n [\n \"title\" => \"Effective Java\",\n \"author\" => \"Joshua Bloch/柴田 芳樹\",\n \"caption\" => \"この第3版では、Java8で新たに導入されたラムダとストリームに関する章が新規に追加されたほか、オプショナル、インタフェースでのデフォルトメソッド、try-with-resources文、@SafeVarargsアノテーション、モジュールなどの機能を扱った項目を含み、第2版の78項目から90項目に増えています。本書は多くのデザインパターンとイデオムを示すコード例を含んでおり、プログラミング言語Javaの正しい理解と、簡潔で明瞭で正確なソフトウェアの設計に役立つでしょう。\",\n \"publisher\" => \"丸善出版\",\n \"isbn\" => \"9784621303252\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/3252/9784621303252.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/3252/9784621303252.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/3252/9784621303252.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/15652954/\",\n \"sales_date\" => \"2018年10月26日頃\",\n \"price\" => \"4400\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T01:58:20\",\n \"updated_at\" => \"2021-03-01T01:58:20\"\n ],\n [\n \"title\" => \"ハッカーと画家\",\n \"author\" => \"ポール・グレアム/川合史朗\",\n \"caption\" => \"普通のやつらの上を行け。天才LISPハッカーにして、ソフトウェアベンチャーを成功させた筆者が、ものつくりのセンス、成功するビジネスの秘密、発想を刺激するアイディアを語る。\",\n \"publisher\" => \"オーム社\",\n \"isbn\" => \"9784274065972\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/2740/27406597.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/2740/27406597.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/2740/27406597.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/1757447/\",\n \"sales_date\" => \"2005年01月\",\n \"price\" => \"2640\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T02:02:11\",\n \"updated_at\" => \"2021-03-01T02:02:11\"\n ],\n [\n \"title\" => \"24時間365日サーバ/インフラを支える技術\",\n \"author\" => \"伊藤直也/勝見祐己\",\n \"caption\" => \"止められないサービスのために今、何ができるのか。\",\n \"publisher\" => \"技術評論社\",\n \"isbn\" => \"9784774135663\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5663/9784774135663.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5663/9784774135663.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5663/9784774135663.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/5818793/\",\n \"sales_date\" => \"2008年09月\",\n \"price\" => \"3058\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T02:13:34\",\n \"updated_at\" => \"2021-03-01T02:13:34\"\n ],\n [\n \"title\" => \"エクストリームプログラミング\",\n \"author\" => \"ケント・ベック/シンシア・アンドレス\",\n \"caption\" => \"\",\n \"publisher\" => \"オーム社\",\n \"isbn\" => \"9784274217623\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7623/9784274217623.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7623/9784274217623.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7623/9784274217623.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/13292388/\",\n \"sales_date\" => \"2015年06月\",\n \"price\" => \"2420\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:25:18\",\n \"updated_at\" => \"2021-03-01T05:25:18\"\n ],\n [\n \"title\" => \"リーダブルコード\",\n \"author\" => \"ダスティン・ボズウェル/トレバー・フォシェ\",\n \"caption\" => \"コードは理解しやすくなければならない。本書はこの原則を日々のコーディングの様々な場面に当てはめる方法を紹介する。名前の付け方、コメントの書き方など表面上の改善について。コードを動かすための制御フロー、論理式、変数などループとロジックについて。またコードを再構成するための方法。さらにテストの書き方などについて、楽しいイラストと共に説明する。日本語版ではRubyやgroongaのコミッタとしても著名な須藤功平氏による解説を収録。\",\n \"publisher\" => \"オライリー・ジャパン\",\n \"isbn\" => \"9784873115658\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5658/9784873115658.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5658/9784873115658.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5658/9784873115658.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/11753651/\",\n \"sales_date\" => \"2012年06月\",\n \"price\" => \"2640\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T02:14:23\",\n \"updated_at\" => \"2021-03-01T02:14:23\"\n ],\n [\n \"title\" => \"詳説正規表現第3版\",\n \"author\" => \"ジェフリー・E.F.フリードル/ロングテール\",\n \"caption\" => \"本書は正規表現の概念を詳細に解説し、言語やツールの実例を豊富に示しながら、正規表現への理解を深める解説書である。第3版では、前版のJavaと.NETに加え、新たにPHPの章が追加された。正規表現の本質を読み解く決定版。\",\n \"publisher\" => \"オライリー・ジャパン\",\n \"isbn\" => \"9784873113593\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/3593/9784873113593.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/3593/9784873113593.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/3593/9784873113593.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/5611106/\",\n \"sales_date\" => \"2008年04月\",\n \"price\" => \"5280\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T02:14:36\",\n \"updated_at\" => \"2021-03-01T02:14:36\"\n ],\n [\n \"title\" => \"CentOS 8で作るネットワークサーバ構築ガイド\",\n \"author\" => \"サーバ構築研究会\",\n \"caption\" => \"Cockpit、nginx、Redis、podman、389 Directory Server、暗号化ポリシー、モジュールなど、強化・変更ポイントを徹底解説。認証サービスやKerberosも新章を設けて解説。CentOS Linux8 8.1(1911)×86_64対応。\",\n \"publisher\" => \"秀和システム\",\n \"isbn\" => \"9784798061641\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/1641/9784798061641.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/1641/9784798061641.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/1641/9784798061641.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/16356081/\",\n \"sales_date\" => \"2020年08月01日頃\",\n \"price\" => \"4950\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T02:14:46\",\n \"updated_at\" => \"2021-03-01T02:14:46\"\n ],\n [\n \"title\" => \"基礎からのプログラミングリテラシー\",\n \"author\" => \"増井敏克\",\n \"caption\" => \"技術書を読み切るための基礎づくり。改めて学び直せる用語集。開発をはじめる前にこの1冊。\",\n \"publisher\" => \"技術評論社\",\n \"isbn\" => \"9784297105143\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5143/9784297105143.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5143/9784297105143.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5143/9784297105143.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/15842669/\",\n \"sales_date\" => \"2019年05月\",\n \"price\" => \"2068\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:13:43\",\n \"updated_at\" => \"2021-03-01T05:13:43\"\n ],\n [\n \"title\" => \"HTML&CSSの基礎知識\",\n \"author\" => \"中田亨/羽田野太巳\",\n \"caption\" => \"これからWebサイトを制作したい人や、HTMLやCSSを学びたい人、学び直したい人を対象に、HTMLとCSSの基礎知識を解説。初心者が挫折しないように、文章よりも豊富な図やイラストを使用。\",\n \"publisher\" => \"技術評論社\",\n \"isbn\" => \"9784774195537\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5537/9784774195537.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5537/9784774195537.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5537/9784774195537.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/15295984/\",\n \"sales_date\" => \"2018年02月\",\n \"price\" => \"2178\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:13:57\",\n \"updated_at\" => \"2021-03-01T05:13:57\"\n ],\n [\n \"title\" => \"イラスト図解式 この一冊で全部わかるWeb技術の基本\",\n \"author\" => \"小林 恭平/坂本 陽\",\n \"caption\" => \"HTTP、データ形式からシステム開発まで。知識ゼロから全体像をつかめる。よく使われる用語の意味がわかる。技術のしくみがスムーズに学べる。\",\n \"publisher\" => \"SBクリエイティブ\",\n \"isbn\" => \"9784797388817\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8817/9784797388817.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8817/9784797388817.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8817/9784797388817.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/14674807/\",\n \"sales_date\" => \"2017年03月17日頃\",\n \"price\" => \"1848\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:14:13\",\n \"updated_at\" => \"2021-03-01T05:14:13\"\n ],\n [\n \"title\" => \"Webを支える技術\",\n \"author\" => \"山本陽平\",\n \"caption\" => \"本書のテーマはWebサービスの実践的な設計。まず良いWebサービス設計の第一歩として、HTTPやURI、HTMLなどの仕様を歴史や設計思想を織り交ぜて解説。そしてWebサービスにおける設計課題、たとえば望ましいURI、HTTPメソッドの使い分け、クライアントとサーバの役割分担、設計プロセスなどについて、現時点でのベストプラクティスを紹介。\",\n \"publisher\" => \"技術評論社\",\n \"isbn\" => \"9784774142043\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/2043/9784774142043.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/2043/9784774142043.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/2043/9784774142043.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/6385779/\",\n \"sales_date\" => \"2010年05月\",\n \"price\" => \"2827\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:14:27\",\n \"updated_at\" => \"2021-03-01T05:14:27\"\n ],\n [\n \"title\" => \"セキュリティのためのログ分析入門\",\n \"author\" => \"折原慎吾/鐘本楊\",\n \"caption\" => \"本書は、企業のシステム担当者や、情報セキュリティの専門家をめざしている若手エンジニア・学生向けに、ログ分析の手法や実例(とくにサイバー攻撃を検知するためのノウハウ)を解説する書籍です。本書の内容を実践できれば、多くの攻撃を未然に防げるでしょう。また、すべてを実践できなくとも、サイバー攻撃の兆候はどんなふうに現れるのか、専門家の力を借りるときにはどんな情報が必要かということが、わかるようになるでしょう。\",\n \"publisher\" => \"技術評論社\",\n \"isbn\" => \"9784297100414\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0414/9784297100414.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0414/9784297100414.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0414/9784297100414.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/15583451/\",\n \"sales_date\" => \"2018年09月\",\n \"price\" => \"3058\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:14:37\",\n \"updated_at\" => \"2021-03-01T05:14:37\"\n ],\n [\n \"title\" => \"プログラミング言語Go\",\n \"author\" => \"アラン・A.A.ドノバン/ブライアン・W.カーニハン\",\n \"caption\" => \"\",\n \"publisher\" => \"丸善出版\",\n \"isbn\" => \"9784621300251\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0251/9784621300251.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0251/9784621300251.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0251/9784621300251.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/14286944/\",\n \"sales_date\" => \"2016年06月\",\n \"price\" => \"4180\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:36:55\",\n \"updated_at\" => \"2021-03-01T05:36:55\"\n ],\n [\n \"title\" => \"エンジニアのためのGitの教科書 実践で使える!バージョン管理とチーム開発手法\",\n \"author\" => \"株式会社リクルートテクノロジーズ/株式会社リクルートマーケティングパートナーズ\",\n \"caption\" => \"これだけは知っておきたい、開発現場の本格スキル。分散型バージョン管理の仕組み、コマンドの基本、効率的なチーム開発を行うためのブランチの設計・運用、コミットのルール化、コードビュー、継続的デリバリまで。Gitコマンド早見表付き。\",\n \"publisher\" => \"翔泳社\",\n \"isbn\" => \"9784798143668\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/3668/9784798143668.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/3668/9784798143668.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/3668/9784798143668.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/13516193/\",\n \"sales_date\" => \"2016年01月19日頃\",\n \"price\" => \"2420\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:14:45\",\n \"updated_at\" => \"2021-03-01T05:14:45\"\n ],\n [\n \"title\" => \"おうちで学べるデータベースのきほん\",\n \"author\" => \"ミック/木村明治\",\n \"caption\" => \"新しいデータベースの入門書。初学者でも無理なく読み進められるよう、本書は「実習」「講義」の形を取ることで、データベースの仕組みを誰でも理解できるように解説。データベースの基本はもちろん、データベースにまつわるコストの話、パフォーマンスを向上させる仕組みなど、技術者・非技術者を問わず役立つ内容となっています。\",\n \"publisher\" => \"翔泳社\",\n \"isbn\" => \"9784798135168\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5168/9784798135168.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5168/9784798135168.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5168/9784798135168.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/13057234/\",\n \"sales_date\" => \"2015年02月12日頃\",\n \"price\" => \"2420\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:16:16\",\n \"updated_at\" => \"2021-03-01T05:16:16\"\n ],\n [\n \"title\" => \"体系的に学ぶ 安全なWebアプリケーションの作り方 第2版\",\n \"author\" => \"徳丸 浩\",\n \"caption\" => \"Webアプリ開発者が知っておくべき、攻撃と防御の知識を徹底解説!PHPサンプルへの攻撃を通して、脆弱性が生まれる原理と具体的な対処法が学べる!日本中の現場で支持されたベストセラー待望の改訂版!最新環境にあわせて全面刷新+大増ページ。OWASP Top 10-2017対応。\",\n \"publisher\" => \"SBクリエイティブ\",\n \"isbn\" => \"9784797393163\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/3163/9784797393163.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/3163/9784797393163.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/3163/9784797393163.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/15472730/\",\n \"sales_date\" => \"2018年06月22日頃\",\n \"price\" => \"3520\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:16:25\",\n \"updated_at\" => \"2021-03-01T05:16:25\"\n ],\n [\n \"title\" => \"Amazon Web Services実践入門\",\n \"author\" => \"舘岡守/今井智明\",\n \"caption\" => \"柔軟な開発を可能にするインフラ構築・運用の勘所。ブラウザでの設定もコマンド操作も丁寧に解説。\",\n \"publisher\" => \"技術評論社\",\n \"isbn\" => \"9784774176734\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/6734/9784774176734.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/6734/9784774176734.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/6734/9784774176734.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/13398892/\",\n \"sales_date\" => \"2015年11月10日頃\",\n \"price\" => \"2838\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:17:01\",\n \"updated_at\" => \"2021-03-01T05:17:01\"\n ],\n [\n\n \"title\" => \"UNIXという考え方\",\n \"author\" => \"マイク・ギャンカーズ/芳尾桂\",\n \"caption\" => \"UNIXは『OS』ではない。それは『考え方』である。誕生から30年を経て今もなお第一線で使われる古くて新しいOS、UNIXの秘密を解き明かす。\",\n \"publisher\" => \"オーム社\",\n \"isbn\" => \"9784274064067\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/2740/27406406.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/2740/27406406.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/2740/27406406.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/1319019/\",\n \"sales_date\" => \"2001年02月23日頃\",\n \"price\" => \"1760\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:17:09\",\n \"updated_at\" => \"2021-03-01T05:17:09\"\n ],\n [\n\n \"title\" => \"UMLモデリングレッスン\",\n \"author\" => \"平澤章\",\n \"caption\" => \"UML(Unified Modeling Language:統一モデリング言語)は、ソフトウエアの要求仕様や内部構造の記述を目的とした国際標準の表記法です。従来は内部構造を表現する設計図として幅広く使われてきましたが、ユーザーの要求を「見える化」する要求モデリングの表記法としても大きな威力を発揮します。本書では,これまで体系だってまとめられてこなかった要求モデリングのノウハウを21のパターンとして提示しました。また実際の説明では、最初にやさしい練習問題を示し、その解説を通じて実践的なノウハウを一つひとつ説いていきます。上流工程でますます重要となるモデリングの技術をぜひ本書で身につけてください。\",\n \"publisher\" => \"日経BP\",\n \"isbn\" => \"9784822283490\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/3490/9784822283490.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/3490/9784822283490.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/3490/9784822283490.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/5371731/\",\n \"sales_date\" => \"2008年01月\",\n \"price\" => \"2640\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:17:18\",\n \"updated_at\" => \"2021-03-01T05:17:18\"\n ],\n [\n\n \"title\" => \"マイクロサービスアーキテクチャ\",\n \"author\" => \"SamNewman/佐藤直生\",\n \"caption\" => \"柔軟かつシンプルな新時代のソフトウェアアーキテクチャ、マイクロサービスの本質に迫る!モノリシック(一枚岩)からの脱却。複数の小さいマイクロサービスに分割してそれらを連携させることで、迅速なデプロイ、優れた回復性やスケーラビリティを実現する。\",\n \"publisher\" => \"オライリー・ジャパン\",\n \"isbn\" => \"9784873117607\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7607/9784873117607.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7607/9784873117607.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7607/9784873117607.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/13770161/\",\n \"sales_date\" => \"2016年02月26日頃\",\n \"price\" => \"3740\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:17:29\",\n \"updated_at\" => \"2021-03-01T05:17:29\"\n ],\n [\n\n \"title\" => \"UMLモデリングのエッセンス第3版\",\n \"author\" => \"マーチン・ファウラー/羽生田栄一\",\n \"caption\" => \"UMLについて簡潔に解説したマーチン・ファウラー氏のベストセラー。第3版では、UML2.0に対応し新たなダイアグラムを多数追加。過去5年間の経験を踏まえ、全編にわたってリファインを施した最新版。オブジェクト指向ソフトウェア開発者必携の書。\",\n \"publisher\" => \"翔泳社\",\n \"isbn\" => \"9784798107950\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7981/79810795.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7981/79810795.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7981/79810795.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/3583035/\",\n \"sales_date\" => \"2005年06月\",\n \"price\" => \"2640\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:17:40\",\n \"updated_at\" => \"2021-03-01T05:17:40\"\n ],\n [\n\n \"title\" => \"CentOS8実践ガイド システム管理編\",\n \"author\" => \"古賀政純\",\n \"caption\" => \"IT現場で役立つシステム管理手法の基礎から障害対応に至るまで、企業のサーバ運用を支える幅広いテーマを網羅。\",\n \"publisher\" => \"インプレス\",\n \"isbn\" => \"9784295008453\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8453/9784295008453.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8453/9784295008453.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8453/9784295008453.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/16203180/\",\n \"sales_date\" => \"2020年03月\",\n \"price\" => \"3960\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:39:19\",\n \"updated_at\" => \"2021-03-01T05:39:19\"\n ],\n [\n\n \"title\" => \"ユースケース駆動開発実践ガイド\",\n \"author\" => \"ダグ・ローゼンバーグ/マット・ステファン\",\n \"caption\" => \"なぜ、オブジェクト指向“らしく”ならないのか?設計を強くするための教科書。オブジェクト指向開発の保守本流。必要最小限のステップでユースケースから保守性が高く動作するコードを得るための手法がここに。分析麻痺に陥らないための思考プロセスを、理論、実践、練習の3ステップを通して完全理解。\",\n \"publisher\" => \"翔泳社\",\n \"isbn\" => \"9784798114453\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7981/79811445.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7981/79811445.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7981/79811445.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/4982105/\",\n \"sales_date\" => \"2007年10月\",\n \"price\" => \"4378\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:17:51\",\n \"updated_at\" => \"2021-03-01T05:17:51\"\n ],\n [\n\n \"title\" => \"コードコンプリート(上)第2版\",\n \"author\" => \"スティーヴ・マコネル/クイープ\",\n \"caption\" => \"米ソフトウェア界の第一人者Steve McConnellが執筆した名著「Code Complete」(1993年発行)の第2版。Jolt賞を受賞した初版の内容を受け継ぎ、さらに新しいトピックを盛り込んで、プログラミングのベストプラクティスを集大成した待望の書です。上巻は「ソフトウェアコンストラクション」から始まり、変数名、データ型、ループ、条件判定、ルーチン、クラスなど、高品質なプログラムを作成するための基本的なテクニックを解説します。初心者はもちろん、経験豊富なプログラマにも開眼のテクニックを実践的に紹介。著者Steve McConnellのプログラミングに対する見識と経験のすべてが詰め込まれた、価値ある1冊です。\",\n \"publisher\" => \"日経BPマーケティング\",\n \"isbn\" => \"9784891004552\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8910/89100455.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8910/89100455.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8910/89100455.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/1777480/\",\n \"sales_date\" => \"2005年03月\",\n \"price\" => \"6710\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:19:58\",\n \"updated_at\" => \"2021-03-01T05:19:58\"\n ],\n [\n\n \"title\" => \"実践テスト駆動開発\",\n \"author\" => \"スティーブ・フリーマン/ナット・プライス\",\n \"caption\" => \"\",\n \"publisher\" => \"翔泳社\",\n \"isbn\" => \"9784798124582\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/4582/9784798124582.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/4582/9784798124582.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/4582/9784798124582.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/11891807/\",\n \"sales_date\" => \"2012年09月\",\n \"price\" => \"4620\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:20:42\",\n \"updated_at\" => \"2021-03-01T05:20:42\"\n ],\n [\n\n \"title\" => \"テスト駆動開発\",\n \"author\" => \"Kent Beck/和田 卓人\",\n \"caption\" => \"TDDはテスト技法ではない…TDDは分析技法であり、設計技法であり、実際には開発のすべてのアクティビティを構造化する技法なのだ。テスト駆動開発(TDD)を原点から学ぶ。\",\n \"publisher\" => \"株式会社オーム社\",\n \"isbn\" => \"9784274217883\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7883/9784274217883.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7883/9784274217883.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7883/9784274217883.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/14869144/\",\n \"sales_date\" => \"2017年10月14日頃\",\n \"price\" => \"3080\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:20:52\",\n \"updated_at\" => \"2021-03-01T05:20:52\"\n ],\n [\n\n \"title\" => \"アジャイルソフトウェア開発の奥義第2版\",\n \"author\" => \"ロバート・C.マーティン/ジェームス・ニューカーク\",\n \"caption\" => \"ソフトウェア開発の原則・デザインパターン・プラクティス完全統合。すべての悩めるプログラマのための処方箋。Software Development誌Jolt Award受賞作。\",\n \"publisher\" => \"SBクリエイティブ\",\n \"isbn\" => \"9784797347784\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7784/9784797347784.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7784/9784797347784.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7784/9784797347784.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/5781344/\",\n \"sales_date\" => \"2008年07月\",\n \"price\" => \"6380\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:21:02\",\n \"updated_at\" => \"2021-03-01T05:21:02\"\n ],\n [\n\n \"title\" => \"Head firstデザインパターン\",\n \"author\" => \"エリック・フリーマン/佐藤直生\",\n \"caption\" => \"初めて学ぶ方、過去に挫折した経験のある方、知識を確固たるものにしたい方を対象に、イラストや写真を使ってやさしく楽しく解説する人気のHead Firstシリーズのデザインパターン編。刺激的なレイアウト、思わず膝を叩く見事なたとえ、引き込まれる小話、楽しいクイズやパズルで飽きることなく読み進むことができます。複雑難解なデザインパターンの概念が面白いほどよくわかる、目からウロコの画期的な書籍です。\",\n \"publisher\" => \"オーム社\",\n \"isbn\" => \"9784873112497\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8731/87311249.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8731/87311249.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8731/87311249.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/3695643/\",\n \"sales_date\" => \"2005年11月\",\n \"price\" => \"5060\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:21:14\",\n \"updated_at\" => \"2021-03-01T05:21:14\"\n ],\n [\n\n \"title\" => \"Docker/Kubernetes実践コンテナ開発入門\",\n \"author\" => \"山田明憲\",\n \"caption\" => \"コンテナ開発、運用がゼロからわかる。本番で使えるコンテナアプリケーションをつくる。Docker/Kubernetesの基礎から、コンテナを中心とした実践開発スタイルまで。\",\n \"publisher\" => \"技術評論社\",\n \"isbn\" => \"9784297100339\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0339/9784297100339.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0339/9784297100339.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0339/9784297100339.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/15570632/\",\n \"sales_date\" => \"2018年09月\",\n \"price\" => \"3718\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:21:26\",\n \"updated_at\" => \"2021-03-01T05:21:26\"\n ],\n [\n\n \"title\" => \"モダン・ソフトウェアエンジニアリング\",\n \"author\" => \"Ivar Jacobson/Harold “Bud” Lawson\",\n \"caption\" => \"人々や機会を含めた、DX時代に必要なソフトウェア開発の“ことば”と基盤。ソフトウェア開発の抽象化の上でたどり着いた普遍的に本当に必要な原理原則と、ユースケーススライスやマイクロサービスといった先進・現代的な考え方や技術とを、無理なく自然に、それも実践可能な形でまとめあげた奇跡的な書籍。\",\n \"publisher\" => \"翔泳社\",\n \"isbn\" => \"9784798165226\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5226/9784798165226.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5226/9784798165226.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5226/9784798165226.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/16275160/\",\n \"sales_date\" => \"2020年05月29日頃\",\n \"price\" => \"3960\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:21:44\",\n \"updated_at\" => \"2021-03-01T05:21:44\"\n ],\n [\n\n \"title\" => \"エッセンシャルスクラム\",\n \"author\" => \"ケネス・S.ラビン/岡澤裕二\",\n \"caption\" => \"基礎から本質まで。スクラムフレームワークのすべてをマスターするための原則と価値、議論と語彙を体系化した入門書にして大全でもある必携の一冊。\",\n \"publisher\" => \"翔泳社\",\n \"isbn\" => \"9784798130507\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0507/9784798130507.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0507/9784798130507.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0507/9784798130507.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/12842933/\",\n \"sales_date\" => \"2014年07月\",\n \"price\" => \"4180\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:21:53\",\n \"updated_at\" => \"2021-03-01T05:21:53\"\n ],\n [\n\n \"title\" => \"チーム・ジャーニー 逆境を越える、変化に強いチームをつくりあげるまで\",\n \"author\" => \"市谷 聡啓\",\n \"caption\" => \"現場のストーリーから、考え方とプラクティスを一緒に学べる。単一チーム、複数チームなど、様々なチーム・マネジメントの問題を扱う。日本の現場を前提にしているので、実践しやすい。アジャイルをこれから始める人だけでなく、もっとうまく実践したい人にも最適。\",\n \"publisher\" => \"翔泳社\",\n \"isbn\" => \"9784798163635\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/3635/9784798163635.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/3635/9784798163635.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/3635/9784798163635.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/16181676/\",\n \"sales_date\" => \"2020年02月17日頃\",\n \"price\" => \"2640\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:25:30\",\n \"updated_at\" => \"2021-03-01T05:25:30\"\n ],\n [\n\n \"title\" => \"カイゼン・ジャーニー たった1人からはじめて、「越境」するチームをつくるまで\",\n \"author\" => \"市谷 聡啓/新井 剛\",\n \"caption\" => \"ITエンジニアとしてSIer企業に勤務する江島は、問題だらけのプロジェクト、やる気のない社員たちに嫌気が差していた。そんな中、ある開発者向けイベントに参加したことがきっかけで、まずは自分の仕事から見直していこうと考える。タスクボードや「ふりかえり」などを1人が地道に続けていると、同僚が興味を示したため、今度は2人でカイゼンに取り組んでいく。ここから、チームやクライアントを巻き込んだ、現場の改革がはじまる。チーム内の軋轢、クライアントの無理難題、迫りくるローンチ…。さまざまな困難を乗り越え、江島がたどり着いた「越境する開発」とは。\",\n \"publisher\" => \"翔泳社\",\n \"isbn\" => \"9784798153346\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/3346/9784798153346.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/3346/9784798153346.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/3346/9784798153346.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/15288815/\",\n \"sales_date\" => \"2018年02月07日頃\",\n \"price\" => \"2530\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:25:41\",\n \"updated_at\" => \"2021-03-01T05:25:41\"\n ],\n [\n\n \"title\" => \"アジャイルコーチング\",\n \"author\" => \"Rachel Davies/Liz Sedley\",\n \"caption\" => \"\",\n \"publisher\" => \"株式会社オーム社\",\n \"isbn\" => \"9784274219375\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/9375/9784274219375.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/9375/9784274219375.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/9375/9784274219375.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/14640285/\",\n \"sales_date\" => \"2017年01月21日頃\",\n \"price\" => \"3080\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:25:53\",\n \"updated_at\" => \"2021-03-01T05:25:53\"\n ],\n [\n\n \"title\" => \"トヨタ生産方式\",\n \"author\" => \"大野耐一\",\n \"caption\" => \"\",\n \"publisher\" => \"ダイヤモンド社\",\n \"isbn\" => \"9784478460016\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0016/9784478460016.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0016/9784478460016.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0016/9784478460016.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/65673/\",\n \"sales_date\" => \"1978年05月\",\n \"price\" => \"1540\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:26:31\",\n \"updated_at\" => \"2021-03-01T05:26:31\"\n ],\n [\n\n \"title\" => \"リーン・スタートアップ\",\n \"author\" => \"エリック・リース/井口耕二\",\n \"caption\" => \"思い込みは捨てて、顧客から学ぼう!「構築ー計測ー学習」というフィードバックループを通して、顧客も製品・サービスも生みだし育てるシリコンバレー発、注目のマネジメント手法。\",\n \"publisher\" => \"日経BP\",\n \"isbn\" => \"9784822248970\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8970/9784822248970.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8970/9784822248970.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8970/9784822248970.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/11613723/\",\n \"sales_date\" => \"2012年04月\",\n \"price\" => \"1980\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:26:42\",\n \"updated_at\" => \"2021-03-01T05:26:42\"\n ],\n [\n\n \"title\" => \"担当になったら知っておきたい「プロジェクトマネジメント」実践講座\",\n \"author\" => \"伊藤大輔\",\n \"caption\" => \"企業や組織は、目標を自ら設定し、計画し、コスト、リソース、スケジュールなどを自らコントロールして仕事を進められる人物、つまり、「プロジェクトマネジメント」を理解、実践できる人物を求めている!「目標設定」「計画」「実行」の3つの視点と豊富な図で、どこよりもやさしく解説!!\",\n \"publisher\" => \"日本実業出版社\",\n \"isbn\" => \"9784534054692\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/4692/9784534054692.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/4692/9784534054692.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/4692/9784534054692.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/14605280/\",\n \"sales_date\" => \"2017年01月28日頃\",\n \"price\" => \"2420\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:26:57\",\n \"updated_at\" => \"2021-03-01T05:26:57\"\n ],\n [\n\n \"title\" => \"エンジニアのためのマネジメントキャリアパス\",\n \"author\" => \"Camille Fournier/武舎 るみ\",\n \"caption\" => \"本書は、技術系マネージャーとそれを目指すエンジニアに向けて、IT業界の管理職に求められるスキルを解説する書籍です。テックリードからCTOになった経験を持つ著者が、管理職についたエンジニアが歩むキャリアパスについて段階をおって紹介します。インターンのメンターから始まり、テックリード、チームをまとめるエンジニアリングリード、複数のチームを管理する技術部長、経営にかかわるCTOやVPと立場が変わることによって求められる役割について、それぞれの職務を定義しながらくわしく説明します。さらに管理職の採用や評価、機能不全に陥ったチームの立て直し、管理職についてからの技術力の維持など、様々なハードルを乗り越えるための考え方やテクニックを多数紹介。技術系管理職の全体を視野に入れ、各段階で必要なスキルを学ぶ本書は、マネジメントのキャリアを志すエンジニア必携の一冊です。\",\n \"publisher\" => \"オライリー・ジャパン\",\n \"isbn\" => \"9784873118482\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8482/9784873118482.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8482/9784873118482.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8482/9784873118482.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/15599356/\",\n \"sales_date\" => \"2018年09月26日頃\",\n \"price\" => \"2860\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:27:04\",\n \"updated_at\" => \"2021-03-01T05:27:04\"\n ],\n [\n\n \"title\" => \"人月の神話\",\n \"author\" => \"フレデリック・フィリップス・ブルックス/滝沢徹\",\n \"caption\" => \"\",\n \"publisher\" => \"丸善出版\",\n \"isbn\" => \"9784621066089\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/6089/9784621066089.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/6089/9784621066089.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/6089/9784621066089.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/12749900/\",\n \"sales_date\" => \"2014年04月\",\n \"price\" => \"3520\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:27:14\",\n \"updated_at\" => \"2021-03-01T05:27:14\"\n ],\n [\n \"title\" => \"ドメイン駆動設計入門 ボトムアップでわかる!ドメイン駆動設計の基本\",\n \"author\" => \"成瀬 允宣\",\n \"caption\" => \"初心者にとって、理解しやすい、そして実践しやすいパターンからスタート。具体的なサンプルを交えながら、ドメイン駆動設計に頻出するパターンの目的と記述方法を1つ1つボトムアップで解説します。\",\n \"publisher\" => \"翔泳社\",\n \"isbn\" => \"9784798150727\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0727/9784798150727.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0727/9784798150727.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0727/9784798150727.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/16167672/\",\n \"sales_date\" => \"2020年02月13日頃\",\n \"price\" => \"3520\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T10:38:12\",\n \"updated_at\" => \"2021-03-01T10:38:12\"\n ],\n [\n\n \"title\" => \"Team Geek\",\n \"author\" => \"ブライアン・W.フィッツパトリック/ベン・コリンズ・サスマン\",\n \"caption\" => \"複数のプログラマが関わる場合、優れたコードを書くだけではプロジェクトは成功しない。全員が最終目標に向かって協力することが重要であり、チームの協力はプロジェクト成功のカギとなる。本書は、Subversionをはじめ、たくさんのフリーソフトウェア開発に関わり、その後Googleでプログラマを経てリーダーを務めるようになった著者が、「エンジニアが他人とうまくやる」コツを紹介するものである。「チームを作る三本柱」や「チーム文化のつくり方」から「有害な人への対処法」までエンジニアの社会性について、楽しい逸話とともに解説する。\",\n \"publisher\" => \"オライリー・ジャパン\",\n \"isbn\" => \"9784873116303\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/6303/9784873116303.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/6303/9784873116303.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/6303/9784873116303.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/12403745/\",\n \"sales_date\" => \"2013年07月\",\n \"price\" => \"2420\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:27:24\",\n \"updated_at\" => \"2021-03-01T05:27:24\"\n ],\n [\n\n \"title\" => \"プリンシプルオブプログラミング\",\n \"author\" => \"上田勲\",\n \"caption\" => \"めざせ、脱・初心者。古今東西の達人たちの知恵を、一冊に凝縮してやさしく解説した、プログラマ必携の書!\",\n \"publisher\" => \"秀和システム\",\n \"isbn\" => \"9784798046143\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/6143/9784798046143.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/6143/9784798046143.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/6143/9784798046143.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/13785106/\",\n \"sales_date\" => \"2016年03月\",\n \"price\" => \"2420\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:27:38\",\n \"updated_at\" => \"2021-03-01T05:27:38\"\n ],\n [\n\n \"title\" => \"リーン開発の現場\",\n \"author\" => \"ヘンリック・クニバーグ/角谷信太郎\",\n \"caption\" => \"官公庁の大規模システム開発における、カンバンシステムを軸にしたプロジェクト進行の様子を、著者の経験に基づいて描写。「リーンソフトウェア開発」を現場でどのように適用するかを直裁的に解説しています。\",\n \"publisher\" => \"オーム社\",\n \"isbn\" => \"9784274069321\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/9321/9784274069321.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/9321/9784274069321.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/9321/9784274069321.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/12543313/\",\n \"sales_date\" => \"2013年10月\",\n \"price\" => \"2640\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:28:38\",\n \"updated_at\" => \"2021-03-01T05:28:38\"\n ],\n [\n\n \"title\" => \"正しいものを正しくつくる\",\n \"author\" => \"市谷聡啓\",\n \"caption\" => \"プロダクトづくりにともなう不確実性をいかに乗り越えるか?アジャイルな探索的プロセスを精緻に言語化。問いを立て、仮説を立て、チームとともに越境しながら前進していくための実践の手引き。エンジニア、デザイナー、プロダクトオーナーなど、共創によるものづくりに挑むすべての人へ贈る、勇気と希望の書。\",\n \"publisher\" => \"ビー・エヌ・エヌ新社\",\n \"isbn\" => \"9784802511193\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/1193/9784802511193.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/1193/9784802511193.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/1193/9784802511193.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/15895994/\",\n \"sales_date\" => \"2019年06月14日頃\",\n \"price\" => \"2860\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:28:44\",\n \"updated_at\" => \"2021-03-01T05:28:44\"\n ],\n [\n\n \"title\" => \"アジャイルな見積りと計画づくり\",\n \"author\" => \"マイク・コーン/安井力\",\n \"caption\" => \"\",\n \"publisher\" => \"マイナビ出版\",\n \"isbn\" => \"9784839924027\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/4027/9784839924027.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/4027/9784839924027.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/4027/9784839924027.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/5966016/\",\n \"sales_date\" => \"2009年01月\",\n \"price\" => \"3520\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:29:11\",\n \"updated_at\" => \"2021-03-01T05:29:11\"\n ],\n [\n\n \"title\" => \"ピープルウエア第3版\",\n \"author\" => \"トム・デマルコ/ティモシ・リスター\",\n \"caption\" => \"\",\n \"publisher\" => \"日経BP\",\n \"isbn\" => \"9784822285241\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5241/9784822285241.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5241/9784822285241.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5241/9784822285241.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/12561258/\",\n \"sales_date\" => \"2013年12月\",\n \"price\" => \"2420\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:29:23\",\n \"updated_at\" => \"2021-03-01T05:29:23\"\n ],\n [\n\n \"title\" => \"訪問看護ステーション開設・運営・評価マニュアル新版(第3版)\",\n \"author\" => \"日本訪問看護財団\",\n \"caption\" => \"\",\n \"publisher\" => \"日本看護協会出版会\",\n \"isbn\" => \"9784818019379\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/9379/9784818019379.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/9379/9784818019379.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/9379/9784818019379.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/14109046/\",\n \"sales_date\" => \"2016年04月\",\n \"price\" => \"4290\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:29:58\",\n \"updated_at\" => \"2021-03-01T05:29:58\"\n ],\n [\n\n \"title\" => \"改訂新版 小さな会社の人を育てる人事評価制度のつくり方\",\n \"author\" => \"山元浩二\",\n \"caption\" => \"リーダーが育つ人事評価制度は3ステップでできる!\",\n \"publisher\" => \"あさ出版\",\n \"isbn\" => \"9784866671819\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/1819/9784866671819.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/1819/9784866671819.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/1819/9784866671819.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/16181029/\",\n \"sales_date\" => \"2020年02月14日頃\",\n \"price\" => \"1760\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:30:34\",\n \"updated_at\" => \"2021-03-01T05:30:34\"\n ],\n [\n\n \"title\" => \"小さな会社の〈人を育てる〉賃金制度のつくり方\",\n \"author\" => \"山元浩二\",\n \"caption\" => \"30代前後の社員のやる気が上がる。「えんぴつなめなめ社長が決める」を解消!働き方改革、生産性向上、同一労働同一賃金を実現!人事評価制度の超プロが実際に使っている導入ノウハウを公開!このとおりにやれば移行できる!\",\n \"publisher\" => \"日本実業出版社\",\n \"isbn\" => \"9784534056658\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/6658/9784534056658.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/6658/9784534056658.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/6658/9784534056658.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/15742594/\",\n \"sales_date\" => \"2019年02月15日頃\",\n \"price\" => \"1815\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:30:44\",\n \"updated_at\" => \"2021-03-01T05:30:44\"\n ],\n [\n\n \"title\" => \"小さな会社は経営計画で人を育てなさい!\",\n \"author\" => \"山元浩二\",\n \"caption\" => \"「つくって終わり」になっていませんか?作成法だけでなく、運用の仕組み、30分でできる戦略構築法、人材育成の仕組みが載っているから、経営計画を推進できる!成果があがる!社員が成長する!\",\n \"publisher\" => \"あさ出版\",\n \"isbn\" => \"9784860639983\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/9983/9784860639983.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/9983/9784860639983.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/9983/9784860639983.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/15127394/\",\n \"sales_date\" => \"2017年10月\",\n \"price\" => \"1760\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:30:55\",\n \"updated_at\" => \"2021-03-01T05:30:55\"\n ],\n [\n\n \"title\" => \"もし高校野球の女子マネージャーがドラッカーの『マネジメント』を読んだら\",\n \"author\" => \"岩崎夏海\",\n \"caption\" => \"公立高校野球部のマネージャーみなみは、ふとしたことでドラッカーの経営書『マネジメント』に出会います。はじめは難しさにとまどうのですが、野球部を強くするのにドラッカーが役立つことに気付きます。みなみと親友の夕紀、そして野球部の仲間たちが、ドラッカーの教えをもとに力を合わせて甲子園を目指す青春物語。家庭、学校、会社、NPO…ひとがあつまっているすべての組織で役立つ本。\",\n \"publisher\" => \"ダイヤモンド社\",\n \"isbn\" => \"9784478012031\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/2031/9784478012031.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/2031/9784478012031.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/2031/9784478012031.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/6251307/\",\n \"sales_date\" => \"2009年12月\",\n \"price\" => \"1760\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:31:05\",\n \"updated_at\" => \"2021-03-01T05:31:05\"\n ],\n [\n\n \"title\" => \"マネジメント\",\n \"author\" => \"ピーター・ファーディナンド・ドラッカー/上田惇生\",\n \"caption\" => \"「変化」のときこそ、「基本」を確認しなければならない!ドラッカー経営学の集大成を一冊に凝縮。自らの指針とすべき役割・責任・行動を示し、新しい目的意識と使命感を与える書。\",\n \"publisher\" => \"ダイヤモンド社\",\n \"isbn\" => \"9784478410233\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0233/9784478410233.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0233/9784478410233.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0233/9784478410233.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/1401537/\",\n \"sales_date\" => \"2001年12月\",\n \"price\" => \"2200\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:31:14\",\n \"updated_at\" => \"2021-03-01T05:31:14\"\n ],\n [\n\n \"title\" => \"THE MODEL(MarkeZine BOOKS) マーケティング・インサイドセールス・営業・カスタマーサクセスの共業プロセス\",\n \"author\" => \"福田 康隆\",\n \"caption\" => \"「顧客の購買プロセスの半分以上は営業に会う前に終わっている」この事実の前に、企業のマーケティング、営業活動は変革を迫られている。クラウド、SaaSの黎明期に日米のオラクル、セールスフォース・ドットコムで成長の現場に立ち会いマルケト日本法人を立ち上げた著者がそのビジネスの核心を明かす。\",\n \"publisher\" => \"翔泳社\",\n \"isbn\" => \"9784798158167\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8167/9784798158167.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8167/9784798158167.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8167/9784798158167.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/15763607/\",\n \"sales_date\" => \"2019年01月30日頃\",\n \"price\" => \"1980\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:31:41\",\n \"updated_at\" => \"2021-03-01T05:31:41\"\n ],\n [\n\n \"title\" => \"PHPフレームワークLaravel実践開発\",\n \"author\" => \"掌田津耶乃\",\n \"caption\" => \"「MVC以外」の使いこなしもできる!『PHPフレームワーク Laravel入門』を読み終わった方にお勧め!「もっと知りたかったこと」を本書で詳細に解説!Laravel5.8.9準拠。本書で取り上げる主なテーマ:コア機能(ルーティング〜ファイルアクセス)の詳細から「サービス」、DBクラスとEloquent、ジョブ管理、フロントエンド(Vue.js、React、Angular)との連携、ユニットテスト、Artisanコマンドまで…。\",\n \"publisher\" => \"秀和システム\",\n \"isbn\" => \"9784798059075\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/9075/9784798059075.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/9075/9784798059075.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/9075/9784798059075.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/15956681/\",\n \"sales_date\" => \"2019年07月26日頃\",\n \"price\" => \"3300\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:32:26\",\n \"updated_at\" => \"2021-03-01T05:32:26\"\n ],\n [\n\n \"title\" => \"Android/iOSクロス開発フレームワークFlutter入門\",\n \"author\" => \"掌田津耶乃\",\n \"caption\" => \"たった一度のコーディングで、二大プラットフォームに出力。\",\n \"publisher\" => \"秀和システム\",\n \"isbn\" => \"9784798055831\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5831/9784798055831.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5831/9784798055831.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5831/9784798055831.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/15583728/\",\n \"sales_date\" => \"2018年09月14日頃\",\n \"price\" => \"3300\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:32:46\",\n \"updated_at\" => \"2021-03-01T05:32:46\"\n ],\n [\n\n \"title\" => \"開眼!JavaScript\",\n \"author\" => \"コディ・リンドレー/和田祐一郎\",\n \"caption\" => \"JavaScriptの言語的特性で知っておくべきポイントをまとめた書籍。「オブジェクト」の理解を中心に据えて、ひと通り経験した後に陥りがちな落とし穴であるthis、プロトタイプチェーン(継承)、スコープチェーンなどをサンプルを使って解説した。\",\n \"publisher\" => \"オライリー・ジャパン\",\n \"isbn\" => \"9784873116211\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/6211/9784873116211.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/6211/9784873116211.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/6211/9784873116211.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/12366730/\",\n \"sales_date\" => \"2013年06月\",\n \"price\" => \"2420\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:33:35\",\n \"updated_at\" => \"2021-03-01T05:33:35\"\n ],\n [\n\n \"title\" => \"Backbone.jsアプリケーション開発ガイド\",\n \"author\" => \"アディ・オスマーニ/牧野聡\",\n \"caption\" => \"本書の解説は、MVCによって構造化されたJavaScript SPAアプリケーションを作成する方法など、Backbone.jsについての基礎的な事柄にとどまりません。モジュール形式の開発やさまざまなプラグインの紹介、開発者がよく遭遇する問題への解決策、アプリケーションの骨組みの自動生成やユニットテストに至るまで、Backbone.jsアプリケーション開発のさまざまな局面を多角的にとらえた一冊です。\",\n \"publisher\" => \"オライリー・ジャパン\",\n \"isbn\" => \"9784873116587\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/6587/9784873116587.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/6587/9784873116587.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/6587/9784873116587.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/12663989/\",\n \"sales_date\" => \"2014年02月\",\n \"price\" => \"3740\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:34:17\",\n \"updated_at\" => \"2021-03-01T05:34:17\"\n ],\n [\n\n \"title\" => \"SQLアンチパターン\",\n \"author\" => \"ビル・カーウィン/和田卓人\",\n \"caption\" => \"データベース論理設計、データベース物理設計、クエリの記述、アプリケーション開発という4つのカテゴリに分け、それぞれの分野におけるアンチパターンを紹介し、失敗を避けるためのより良い方法を紹介。複数の値を持つ属性や再帰的なツリー構造の格納から、小数値の丸めやNULLの扱いに起因する問題、全文検索やSQLインジェクション、MVCアーキテクチャなど、実践的かつ幅広いトピックを網羅。\",\n \"publisher\" => \"オライリー・ジャパン\",\n \"isbn\" => \"9784873115894\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5894/9784873115894.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5894/9784873115894.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5894/9784873115894.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/12185610/\",\n \"sales_date\" => \"2013年01月\",\n \"price\" => \"3520\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:39:26\",\n \"updated_at\" => \"2021-03-01T05:39:26\"\n ],\n [\n\n \"title\" => \"Node.js デザインパターン 第2版\",\n \"author\" => \"Mario Casciaro/Luciano Mammino\",\n \"caption\" => \"Node/JavaScriptアプリの設計技法を、実際に手を動かしながら学ぶハンズオン形式の解説書。本書では最初に、JavaScriptの大きな特徴でありながら多くの開発者にとって馴染みの薄い非同期処理(コールバックを用いた処理)についてその仕組みを詳しく説明するとともに主なデザインパターンを説明し、Node.jsの基礎を押さえます。次に、ストリームや一般的なデザインパターンのNode.jsでの実装、Node.js専用のデザインパターンといった事柄を解説します。最後に、ユニバーサルJavaScript、スケーラビリティ、Node.jsを使ったエンタープライズアプリの開発といったより高度なトピックを扱います。中級以上のウェブ開発者を対象としています。バージョン11対応。\",\n \"publisher\" => \"オライリージャパン\",\n \"isbn\" => \"9784873118734\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8734/9784873118734.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8734/9784873118734.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8734/9784873118734.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/15874212/\",\n \"sales_date\" => \"2019年05月18日頃\",\n \"price\" => \"4620\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:34:33\",\n \"updated_at\" => \"2021-03-01T05:34:33\"\n ],\n [\n\n \"title\" => \"入門Node.jsプログラミング\",\n \"author\" => \"Jonathan Wexler/吉川 邦夫\",\n \"caption\" => \"8つのプロジェクトを通してNode.jsによるWebアプリ制作を自分のものに。ES6(ECMAScript2015)以降の言語機能を活用し構築したアプリの配置・運用まで一貫して学べる。\",\n \"publisher\" => \"翔泳社\",\n \"isbn\" => \"9784798158624\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8624/9784798158624.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8624/9784798158624.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8624/9784798158624.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/15999069/\",\n \"sales_date\" => \"2019年09月25日頃\",\n \"price\" => \"3740\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:34:48\",\n \"updated_at\" => \"2021-03-01T05:34:48\"\n ],\n [\n\n \"title\" => \"Go言語でつくるインタプリタ\",\n \"author\" => \"Thorsten Ball/設樂洋爾\",\n \"caption\" => \"本書は、Go言語でプログラミング言語のインタプリタを作りながら、プログラミング言語とそのインタプリタについて学ぶ書籍です。順を追ってコードを示し、C言語風の構文を持つ言語「Monkeyプログラミング言語」のインタプリタを組み立てていきます。字句解析器、構文解析器、評価器を作りながら、ソースコードをトークン列に、トークン列を抽象構文木に変換し、その抽象構文木を評価し実行する方法を学びます。さらに、インタプリタに新しいデータ型を導入し、組み込み関数を追加して、言語を拡張していきます。付録では構文マクロシステムについても扱います。本書では、Go言語標準のツールキット以外のサードパーティライブラリやフレームワークは使用せず、0行のコードからはじめて、完動するインタプリタができあがるところまでを体験します。その過程を通じて、プログラミング言語とインタプリタの仕組みを実践的に学ぶことができます。\",\n \"publisher\" => \"オライリー・ジャパン\",\n \"isbn\" => \"9784873118222\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8222/9784873118222.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8222/9784873118222.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8222/9784873118222.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/15496966/\",\n \"sales_date\" => \"2018年06月16日頃\",\n \"price\" => \"3740\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:35:27\",\n \"updated_at\" => \"2021-03-01T05:35:27\"\n ],\n [\n\n \"title\" => \"Go言語による並行処理\",\n \"author\" => \"Katherine Cox-Buday/山口 能迪\",\n \"caption\" => \"シンプルな言語仕様と手厚い並行処理機能で多くのプログラマの心を捉えるGo言語。いまではサーバーサイドでのプログラミングやコンテナツールの実装言語など、さまざまな分野で活用されています。本書は、Goの並行処理の設計哲学、言語の機能、また実際のプログラミングテクニックや並行処理の使い方、システムに導入する際のベストプラクティスとパターン、その内部構造までを簡潔にまとめた書籍です。普段からGoでプログラミングをしているプログラマや、並行処理について学習したいプログラマが、新たな知識を身につけるのに良い一冊となるでしょう。\",\n \"publisher\" => \"オライリー・ジャパン\",\n \"isbn\" => \"9784873118468\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8468/9784873118468.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8468/9784873118468.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8468/9784873118468.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/15643924/\",\n \"sales_date\" => \"2018年10月26日頃\",\n \"price\" => \"3080\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:35:41\",\n \"updated_at\" => \"2021-03-01T05:35:41\"\n ],\n [\n\n \"title\" => \"Pythonクローリング&スクレイピング[増補改訂版] -データ収集・解析のための実践開発ガイドー\",\n \"author\" => \"加藤 耕太\",\n \"caption\" => \"Pythonによるクローラー・スクレイパー開発が基礎からわかる。複雑なデータへの対処や運用、分析など実践ノウハウを紹介。強力なライブラリ・フレームワークによる高効率開発。Webデータ収集・解析の技法を基礎から実用まで徹底解説。\",\n \"publisher\" => \"技術評論社\",\n \"isbn\" => \"9784297107383\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7383/9784297107383.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7383/9784297107383.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7383/9784297107383.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/15960670/\",\n \"sales_date\" => \"2019年08月10日頃\",\n \"price\" => \"3608\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:35:52\",\n \"updated_at\" => \"2021-03-01T05:35:52\"\n ],\n [\n\n \"title\" => \"Flutter モバイルアプリ開発バイブル\",\n \"author\" => \"南里勇気/太田佳敬\",\n \"caption\" => \"最先端モバイルアプリケーションフレームワークを徹底解説。iOS/Androidクロスプラットフォームでの開発のために。\",\n \"publisher\" => \"マイナビ出版\",\n \"isbn\" => \"9784839970871\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0871/9784839970871.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0871/9784839970871.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0871/9784839970871.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/16045384/\",\n \"sales_date\" => \"2019年10月31日頃\",\n \"price\" => \"3509\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:36:02\",\n \"updated_at\" => \"2021-03-01T05:36:02\"\n ],\n [\n\n \"title\" => \"Androidアプリ開発の極意\",\n \"author\" => \"木田学/おかじゅん\",\n \"caption\" => \"良いAndroidアプリを作るために気をつけるべきこととは?130のポイントを徹底解説。\",\n \"publisher\" => \"技術評論社\",\n \"isbn\" => \"9784774188171\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8171/9784774188171.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8171/9784774188171.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8171/9784774188171.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/14698356/\",\n \"sales_date\" => \"2017年03月\",\n \"price\" => \"3608\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:36:44\",\n \"updated_at\" => \"2021-03-01T05:36:44\"\n ],\n [\n\n \"title\" => \"実践Rust入門[言語仕様から開発手法まで]\",\n \"author\" => \"κeen、河野 達也、小松礼人\",\n \"caption\" => \"Rustはモダンな機能で開発者の生産性を高めつつ、安全で、ハードウェアの性能を最大限に発揮できる数少ないプログラミング言語の1つです。いままでC/C++を使ってきた人はもちろん、それらの言語を敬遠してきた人にとっても身近な道具となりえます。Python、Ruby、Node.jsなどの実行環境からFFI(他言語関数インターフェイス)というしくみを使ってRustの関数を呼び出せますので、性能上のボトルネックとなっている機能を少しずつRustで置き換えていくことも可能です。特に大量のデータを扱ったり、重い計算をしたりする処理では効果が高く、Rustで書き換えることで処理速度が数十倍になることも珍しくないでしょう。\",\n \"publisher\" => \"技術評論社\",\n \"isbn\" => \"9784297105594\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5594/9784297105594.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5594/9784297105594.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5594/9784297105594.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/15856840/\",\n \"sales_date\" => \"2019年05月08日頃\",\n \"price\" => \"4378\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:37:08\",\n \"updated_at\" => \"2021-03-01T05:37:08\"\n ],\n [\n\n \"title\" => \"Goプログラミング実践入門\",\n \"author\" => \"Sau Sheong Chang/武舎広幸\",\n \"caption\" => \"HTTPの仕組み、小さなサンプルから説明。リクエストやレスポンスまわりのコーディング、テンプレート/DBの活用、テスト/デプロイも解説!\",\n \"publisher\" => \"インプレス\",\n \"isbn\" => \"9784295000969\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0969/9784295000969.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0969/9784295000969.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0969/9784295000969.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/14732328/\",\n \"sales_date\" => \"2017年03月\",\n \"price\" => \"3740\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:37:20\",\n \"updated_at\" => \"2021-03-01T05:37:20\"\n ],\n [\n \"title\" => \"シス管系女子\",\n \"author\" => \"Piro/日経Linux編集部\",\n \"caption\" => \"\",\n \"publisher\" => \"日経BP\",\n \"isbn\" => \"9784822224967\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/4967/9784822224967.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/4967/9784822224967.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/4967/9784822224967.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/13060449/\",\n \"sales_date\" => \"2015年02月18日頃\",\n \"price\" => \"1760\",\n \"size\" => \"ムックその他\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:37:55\",\n \"updated_at\" => \"2021-03-01T05:37:55\"\n ],\n [\n\n \"title\" => \"シス管系女子(2)\",\n \"author\" => \"Piro/日経Linux編集部\",\n \"caption\" => \"\",\n \"publisher\" => \"日経BP\",\n \"isbn\" => \"9784822236076\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/6076/9784822236076.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/6076/9784822236076.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/6076/9784822236076.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/13480213/\",\n \"sales_date\" => \"2015年12月09日頃\",\n \"price\" => \"1760\",\n \"size\" => \"ムックその他\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:38:05\",\n \"updated_at\" => \"2021-03-01T05:38:05\"\n ],\n [\n\n \"title\" => \"まんがでわかるLinux シス管系女子3\",\n \"author\" => \"Piro(結城 洋志)/日経Linux\",\n \"caption\" => \"\",\n \"publisher\" => \"日経BP\",\n \"isbn\" => \"9784822256784\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/6784/9784822256784.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/6784/9784822256784.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/6784/9784822256784.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/15416666/\",\n \"sales_date\" => \"2018年04月19日\",\n \"price\" => \"1760\",\n \"size\" => \"ムックその他\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:38:15\",\n \"updated_at\" => \"2021-03-01T05:38:15\"\n ],\n [\n\n \"title\" => \"[試して理解]Linuxのしくみ〜実験と図解で学ぶOSとハードウェアの基礎知識\",\n \"author\" => \"武内覚\",\n \"caption\" => \"スマートフォンからクラウドまで、幅広く利用されているLinux。この、社会を支えているOSは、どのように動いているのか。プロセススケジューラ、メモリ管理、ファイルシステムなどを分かりやすく解説。\",\n \"publisher\" => \"技術評論社\",\n \"isbn\" => \"9784774196077\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/6077/9784774196077.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/6077/9784774196077.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/6077/9784774196077.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/15344590/\",\n \"sales_date\" => \"2018年03月\",\n \"price\" => \"3278\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:38:25\",\n \"updated_at\" => \"2021-03-01T05:38:25\"\n ],\n [\n\n \"title\" => \"作って理解するOS  x86系コンピュータを動かす理論と実装\",\n \"author\" => \"林高勲=著/川合秀実=監修\",\n \"caption\" => \"マルチタスクのしくみまで実装。重厚かつ濃密なOS入門。自分のパソコンで試せる。\",\n \"publisher\" => \"技術評論社\",\n \"isbn\" => \"9784297108472\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8472/9784297108472.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8472/9784297108472.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8472/9784297108472.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/16016806/\",\n \"sales_date\" => \"2019年09月26日頃\",\n \"price\" => \"4048\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:38:36\",\n \"updated_at\" => \"2021-03-01T05:38:36\"\n ],\n [\n\n \"title\" => \"たった1日で基本が身に付く! Docker/Kubernetes超入門\",\n \"author\" => \"伊藤 裕一\",\n \"caption\" => \"この一冊でわかる!コンテナ&マイクロサービスの開発方法を丁寧に解説!1単元=1時間。基本の知識をこの1冊で!\",\n \"publisher\" => \"技術評論社\",\n \"isbn\" => \"9784297114282\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/4282/9784297114282.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/4282/9784297114282.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/4282/9784297114282.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/16351257/\",\n \"sales_date\" => \"2020年07月11日頃\",\n \"price\" => \"2838\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:38:46\",\n \"updated_at\" => \"2021-03-01T05:38:46\"\n ],\n [\n\n \"title\" => \"Ansible実践ガイド第3版\",\n \"author\" => \"北山晋吾/佐藤学(コンピュータ)\",\n \"caption\" => \"プレイブックとインベントリの基礎と実例/Infrastructure as Code/DevOps/Windowsの設定管理/Docker、Azureにおけるクラウド管理/大規模環境の自動化管理/AWX Projectの導入/ネットワーク機器設定の自動化。Ansibleの基礎から応用事例に至るまで、実践的な活用手法を網羅。\",\n \"publisher\" => \"インプレス\",\n \"isbn\" => \"9784295007647\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7647/9784295007647.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7647/9784295007647.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7647/9784295007647.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/16041074/\",\n \"sales_date\" => \"2019年10月\",\n \"price\" => \"3740\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:38:59\",\n \"updated_at\" => \"2021-03-01T05:38:59\"\n ],\n [\n\n \"title\" => \"Docker実践ガイド第2版\",\n \"author\" => \"古賀政純\",\n \"caption\" => \"Dockerの基本概念からKubernetesの導入まで、企業におけるコンテナ環境の活用方法を網羅。\",\n \"publisher\" => \"インプレス\",\n \"isbn\" => \"9784295005520\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5520/9784295005520.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5520/9784295005520.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5520/9784295005520.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/15785274/\",\n \"sales_date\" => \"2019年02月\",\n \"price\" => \"4180\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:39:06\",\n \"updated_at\" => \"2021-03-01T05:39:06\"\n ],\n [\n\n \"title\" => \"MySQL徹底入門 第4版 MySQL 8.0対応\",\n \"author\" => \"yoku0825/坂井 恵\",\n \"caption\" => \"MySQLは代表的なオープンソースのリレーショナルデータベース管理システム(RDBMS)です。20年以上の歴史があり、世界中のビジネスの現場で多数の実績があります。本書は、MySQLについて日本MySQLユーザ会の主要メンバーが解説する入門書です。MySQLの主な機能を網羅し、インストールから基本的な操作、運用やプログラミングまでを詳しく解説します。第4版となる本書は大きく変わったMySQL 8.0に対応し、全面的な改訂を行いました。新しくなったレプリケーションや文字コードの扱い、PythonやGO言語を含むプログラミングの方法、空間情報や全文検索機能の活用など、有効な情報が満載されています。初心者からDBシステム管理者まで、MySQLのすべてのユーザーの方に役立てていただける一冊です。\",\n \"publisher\" => \"翔泳社\",\n \"isbn\" => \"9784798161488\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/1488/9784798161488.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/1488/9784798161488.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/1488/9784798161488.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/16325100/\",\n \"sales_date\" => \"2020年07月06日頃\",\n \"price\" => \"4180\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:39:52\",\n \"updated_at\" => \"2021-03-01T05:39:52\"\n ],\n [\n\n \"title\" => \"データ分析によるネットワークセキュリティ\",\n \"author\" => \"MichaelCollins/中田秀基\",\n \"caption\" => \"新しい視点とアプローチによる新しいセキュリティ手法を紹介!正しく「状況認識」した上で、対策を強化することにより、効率的かつ効果的、継続的なセキュリティを実現するための知識とテクニックを解説。\",\n \"publisher\" => \"オライリー・ジャパン\",\n \"isbn\" => \"9784873117003\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7003/9784873117003.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7003/9784873117003.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7003/9784873117003.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/14282242/\",\n \"sales_date\" => \"2016年06月11日頃\",\n \"price\" => \"3960\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:40:02\",\n \"updated_at\" => \"2021-03-01T05:40:02\"\n ],\n [\n\n \"title\" => \"ゼロトラストネットワーク\",\n \"author\" => \"Evan Gilman/Doug Barth\",\n \"caption\" => \"ゼロトラストネットワークとは、ファイアウォールやVPNに代表される従来型のセキュリティ(境界防御モデル)が通用しなくなった現状を踏まえ、すべてのトラフィックを信頼しないことを前提とし、検証することで脅威を防ぐというアプローチです。近年、クラウドサービスやモバイルの普及により、セキュリティで守るべき内外の境界があいまいになってきたことにより、強く注目を集めています。本書は、ゼロトラストネットワークの概念と実装するために必要な知識が学べる解説書です。基本的な概念の説明に始まり、デバイス、ユーザー、アプリケーション、トラフィックの信頼を実際にどのように確立していくかについて、詳しく紐解いていきます。また、Googleのゼロトラストモデル「BeyondCorp」を含む2つの詳細なケーススタディも収録しており、実装に役立つ知識を深めることができます。\",\n \"publisher\" => \"オライリー・ジャパン\",\n \"isbn\" => \"9784873118888\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8888/9784873118888.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8888/9784873118888.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8888/9784873118888.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/16063956/\",\n \"sales_date\" => \"2019年10月27日頃\",\n \"price\" => \"3520\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:40:11\",\n \"updated_at\" => \"2021-03-01T05:40:11\"\n ],\n [\n\n \"title\" => \"SQL実践入門──高速でわかりやすいクエリの書き方\",\n \"author\" => \"ミック\",\n \"caption\" => \"\",\n \"publisher\" => \"技術評論社\",\n \"isbn\" => \"9784774173016\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/3016/9784774173016.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/3016/9784774173016.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/3016/9784774173016.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/13190627/\",\n \"sales_date\" => \"2015年04月\",\n \"price\" => \"2838\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:40:23\",\n \"updated_at\" => \"2021-03-01T05:40:23\"\n ],\n [\n\n \"title\" => \"達人に学ぶSQL徹底指南書 第2版 初級者で終わりたくないあなたへ\",\n \"author\" => \"ミック\",\n \"caption\" => \"第2版では、初版構成を生かしつつ、サンプルコード・解説の見直しと最新化を行ない、CASE式、ウィンドウ関数、外部結合、HAVING句、EXISTS述語など、SQLを扱うエンジニアに必要な「正しい書き方・考え方」「ビッグデータ時代に対応したモダンなSQL機能を駆使した書き方」を徹底解説します。標準SQL準拠のため、Oracle/SQL Server/DB2/PostgreSQL/MySQL等々の幅広いデータベースに対応しているほか、実際の開発現場でも活かしやすい実践的なコーディング事例も多数紹介しています。チューニングテクニックやリレーショナルデータベースの歴史なども網羅。SQLの原理となっている仕組みや、この言語を作った人々が何を考えて現在のような形にしたのか、というバックグラウンドも掘り起こして伝えます。\",\n \"publisher\" => \"翔泳社\",\n \"isbn\" => \"9784798157825\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7825/9784798157825.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7825/9784798157825.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7825/9784798157825.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/15596931/\",\n \"sales_date\" => \"2018年10月11日頃\",\n \"price\" => \"2750\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:40:35\",\n \"updated_at\" => \"2021-03-01T05:40:35\"\n ],\n [\n\n \"title\" => \"コンピュータシステムの理論と実装\",\n \"author\" => \"ノーム・ニッサン/サイモン・ショッケン\",\n \"caption\" => \"コンピュータを理解するための最善の方法はゼロからコンピュータを作ることで、その構成要素は、ハードウェア、ソフトウェア、コンパイラ、OSに大別できる。本書では、これらの構成要素をひとつずつ組み立てる。具体的には、NANDという電子素子からスタートし、論理ゲート、加算器、CPUを設計。オペレーティングシステム、コンパイラ、バーチャルマシンなどを実装しコンピュータを完成させて、最後にその上でアプリケーション(テトリスなど)を動作させる。実行環境はJava(Mac、Windows、Linuxで動作)。\",\n \"publisher\" => \"オライリー・ジャパン\",\n \"isbn\" => \"9784873117126\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7126/9784873117126.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7126/9784873117126.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7126/9784873117126.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/13184443/\",\n \"sales_date\" => \"2015年03月\",\n \"price\" => \"3960\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:40:44\",\n \"updated_at\" => \"2021-03-01T05:40:44\"\n ],\n [\n\n \"title\" => \"関数プログラミング珠玉のアルゴリズムデザイン\",\n \"author\" => \"リチャード・バード/山下伸夫\",\n \"caption\" => \"\",\n \"publisher\" => \"オーム社\",\n \"isbn\" => \"9784274050640\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0640/9784274050640.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0640/9784274050640.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0640/9784274050640.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/13007391/\",\n \"sales_date\" => \"2014年11月\",\n \"price\" => \"4620\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:45:26\",\n \"updated_at\" => \"2021-03-01T05:45:26\"\n ],\n [\n\n \"title\" => \"虚数の情緒\",\n \"author\" => \"吉田武(数理工学)\",\n \"caption\" => \"本書は人類文化の全体的把握を目指した科目分類に拘らない「独習書」である。歴史、文化、科学など多くの分野が、虚数を軸に悠然たる筆致で書かれている。また人生の「参考書」ともなるよう、様々な分野の天才達を縦横に配した。漢字、電卓の積極活用なども他に例の無い独特のものである。\",\n \"publisher\" => \"東海大学出版部\",\n \"isbn\" => \"9784486014850\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/4860/48601485.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/4860/48601485.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/4860/48601485.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/1136853/\",\n \"sales_date\" => \"2000年03月\",\n \"price\" => \"4730\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:41:30\",\n \"updated_at\" => \"2021-03-01T05:41:30\"\n ],\n [\n\n \"title\" => \"データ構造とアルゴリズム\",\n \"author\" => \"杉原厚吉\",\n \"caption\" => \"本書は、データ構造とアルゴリズムについて初めて学ぼうとする人のためのやさしい入門書である。\",\n \"publisher\" => \"共立出版\",\n \"isbn\" => \"9784320120341\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/3201/32012034.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/3201/32012034.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/3201/32012034.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/1400241/\",\n \"sales_date\" => \"2001年12月\",\n \"price\" => \"2640\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:41:45\",\n \"updated_at\" => \"2021-03-01T05:41:45\"\n ],\n [\n\n \"title\" => \"世界でもっとも強力な9のアルゴリズム\",\n \"author\" => \"ジョン・マコーミック/長尾高弘\",\n \"caption\" => \"\",\n \"publisher\" => \"日経BP\",\n \"isbn\" => \"9784822284930\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/4930/9784822284930.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/4930/9784822284930.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/4930/9784822284930.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/11756649/\",\n \"sales_date\" => \"2012年07月\",\n \"price\" => \"2200\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:41:54\",\n \"updated_at\" => \"2021-03-01T05:41:54\"\n ],\n [\n\n \"title\" => \"エンジニアが学ぶ物流システムの「知識」と「技術」\",\n \"author\" => \"石川 和幸\",\n \"caption\" => \"本書では最新システム動向と物流システムの種類、IoT、物流の処理業務(伝票スキャンや指示書等、間接業務)のロボット化にまで言及し、物流の現在と直面するビジネスの変化を解説するとともに、物流システムを手掛けるエンジニアがどのように対応していけば良いのかなど、物流全般について解説します。\",\n \"publisher\" => \"翔泳社\",\n \"isbn\" => \"9784798155449\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5449/9784798155449.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5449/9784798155449.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5449/9784798155449.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/15462304/\",\n \"sales_date\" => \"2018年06月20日頃\",\n \"price\" => \"3080\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:42:04\",\n \"updated_at\" => \"2021-03-01T05:42:04\"\n ],\n [\n\n \"title\" => \"SOFT SKILLS\",\n \"author\" => \"ジョン・Z.ソンメズ/長尾高弘\",\n \"caption\" => \"プログラマーがより良い人生を送るには、技術習得法やキャリア構築法といったノウハウに加え、対人的な交渉・指導・意思疎通などをうまく行える能力や知恵、すなわちソフトスキルが不可欠だ!本書では、キャリアの築き方、自分の売り込み方、技術習得法、生産性の高め方といった仕事で成功する方法だけでなく、財産の築き方、心身の鍛え方など、人生全般をより良く生きる方法を具体的に説明する。\",\n \"publisher\" => \"日経BP\",\n \"isbn\" => \"9784822251550\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/1550/9784822251550.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/1550/9784822251550.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/1550/9784822251550.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/14141677/\",\n \"sales_date\" => \"2016年05月21日頃\",\n \"price\" => \"3080\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:42:16\",\n \"updated_at\" => \"2021-03-01T05:42:16\"\n ],\n [\n\n \"title\" => \"はじめて学ぶソフトウェアのテスト技法\",\n \"author\" => \"リー・コープランド/宗雅彦\",\n \"caption\" => \"最小・最善のテストケースを設計するためのツールが詰まった小さいけれどすごい本。\",\n \"publisher\" => \"日経BP\",\n \"isbn\" => \"9784822282516\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8222/82228251.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8222/82228251.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8222/82228251.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/3675647/\",\n \"sales_date\" => \"2005年11月\",\n \"price\" => \"2640\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:42:22\",\n \"updated_at\" => \"2021-03-01T05:42:22\"\n ],\n [\n\n \"title\" => \"システムテスト自動化 標準ガイド\",\n \"author\" => \"MarkFewster/DorothyGraham\",\n \"caption\" => \"退屈なテストにさようなら。システムテストを自動化するプログラムを技術・組織の両面から実践的に解説。Seleniumなどの各種ツールを使ったシステムテスト自動化の事例も収録。\",\n \"publisher\" => \"翔泳社\",\n \"isbn\" => \"9784798139210\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/9210/9784798139210.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/9210/9784798139210.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/9210/9784798139210.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/12999084/\",\n \"sales_date\" => \"2014年12月15日頃\",\n \"price\" => \"4180\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:42:30\",\n \"updated_at\" => \"2021-03-01T05:42:30\"\n ],\n [\n\n \"title\" => \"ソフトウェアテスト教科書 JSTQB Foundation 第4版 シラバス2018対応\",\n \"author\" => \"大西 建児/佐々木 方規\",\n \"caption\" => \"テスト技術者の必須資格!安全で高品質のソフトウェアのために。新シラバスVersion2018に対応した信頼の公認テキスト。豊富な練習問題と模擬試験、重要用語の定義を収録。\",\n \"publisher\" => \"翔泳社\",\n \"isbn\" => \"9784798160665\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0665/9784798160665.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0665/9784798160665.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0665/9784798160665.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/15985688/\",\n \"sales_date\" => \"2019年09月17日頃\",\n \"price\" => \"4620\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:42:38\",\n \"updated_at\" => \"2021-03-01T05:42:38\"\n ],\n [\n\n \"title\" => \"プロになるためのWeb技術入門\",\n \"author\" => \"小森裕介\",\n \"caption\" => \"Webアプリケーション開発の「基礎の基礎」をしっかり学べる入門書。通信技術とソフトウェア開発技術の両面から、Webシステムのしくみをひとつひとつ確実に解説。\",\n \"publisher\" => \"技術評論社\",\n \"isbn\" => \"9784774142357\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/2357/9784774142357.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/2357/9784774142357.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/2357/9784774142357.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/6416565/\",\n \"sales_date\" => \"2010年05月\",\n \"price\" => \"2508\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:42:48\",\n \"updated_at\" => \"2021-03-01T05:42:48\"\n ],\n [\n\n \"title\" => \"駄目パターンに学ぶ 失敗しないソフトウエアテスト実践ノウハウ\",\n \"author\" => \"SHIFT 品質・技術統轄部 技術推進部/品質プラットフォーム推進部\",\n \"caption\" => \"プロが教える現場の技!品質と生産性が見違えるテスト計画、テスト設計、テスト実行、テスト管理。不具合を一掃するプロのノウハウ。\",\n \"publisher\" => \"日経BP\",\n \"isbn\" => \"9784296103577\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/3577/9784296103577.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/3577/9784296103577.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/3577/9784296103577.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/16054840/\",\n \"sales_date\" => \"2019年09月26日頃\",\n \"price\" => \"2750\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:42:59\",\n \"updated_at\" => \"2021-03-01T05:42:59\"\n ],\n [\n\n \"title\" => \"プログラミングコンテストチャレンジブック第2版\",\n \"author\" => \"秋葉拓哉/岩田陽一\",\n \"caption\" => \"プログラミングコンテストの問題を通してアルゴリズムのしくみや考え方を楽しく習得。世界トップレベルの著者たちがコンテストで得た知識やノウハウを難易度別にまとめました。現役プログラマだけでなくプログラマを目指している方にもぜひ読んでいたただきたい1冊。\",\n \"publisher\" => \"マイナビ出版\",\n \"isbn\" => \"9784839941062\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/1062/9784839941062.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/1062/9784839941062.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/1062/9784839941062.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/11531089/\",\n \"sales_date\" => \"2012年01月\",\n \"price\" => \"3608\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:43:14\",\n \"updated_at\" => \"2021-03-01T05:43:14\"\n ],\n [\n\n \"title\" => \"アルゴリズム図鑑 絵で見てわかる26のアルゴリズム\",\n \"author\" => \"石田 保輝/宮崎 修一\",\n \"caption\" => \"アルゴリズムはどんな言語でプログラムを書くにしても不可欠ですが、現場で教わることはめったになく、かといって自分で学ぶには難しいものです。本書は、アルゴリズムを独学する人のために作りました。はじめて学ぶときにはイメージしやすく、復習するときには思い出しやすくなるよう、基本的な26のアルゴリズム+7つのデータ構造をすべてイラストにしています。ソートやグラフ探索などの「動き」を図で追うことで、考え方や仕組みを理解する手助けをします。よいプログラムを書くために知っておかなきゃいけないアルゴリズムの世界を、楽しく学びましょう。\",\n \"publisher\" => \"翔泳社\",\n \"isbn\" => \"9784798149776\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/9776/9784798149776.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/9776/9784798149776.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/9776/9784798149776.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/14896775/\",\n \"sales_date\" => \"2017年06月05日頃\",\n \"price\" => \"2618\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:43:23\",\n \"updated_at\" => \"2021-03-01T05:43:23\"\n ],\n [\n\n \"title\" => \"プログラミングコンテスト攻略のためのアルゴリズムとデータ構造\",\n \"author\" => \"渡部有隆\",\n \"caption\" => \"プロコンで勝つための必須テクニック「アルゴリズム」と「データ構造」の基礎をマスター!\",\n \"publisher\" => \"マイナビ出版\",\n \"isbn\" => \"9784839952952\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/2952/9784839952952.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/2952/9784839952952.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/2952/9784839952952.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/13098459/\",\n \"sales_date\" => \"2015年01月\",\n \"price\" => \"3938\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:43:32\",\n \"updated_at\" => \"2021-03-01T05:43:32\"\n ],\n [\n\n \"title\" => \"実践ドメイン駆動設計\",\n \"author\" => \"ヴォーン・ヴァーノン/高木 正弘\",\n \"caption\" => \"経験則が常に正しいとは限らない。DDDのパターンに関する具体的な指針を示すだけではなく、その選択と判断の背後にある問題解決に向う哲学をも伝授。\",\n \"publisher\" => \"翔泳社\",\n \"isbn\" => \"9784798131610\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/1610/9784798131610.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/1610/9784798131610.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/1610/9784798131610.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/13138730/\",\n \"sales_date\" => \"2015年03月16日頃\",\n \"price\" => \"5720\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:44:00\",\n \"updated_at\" => \"2021-03-01T05:44:00\"\n ],\n [\n\n \"title\" => \"エリック・エヴァンスのドメイン駆動設計\",\n \"author\" => \"エリック・エヴァンス/今関剛\",\n \"caption\" => \"\",\n \"publisher\" => \"翔泳社\",\n \"isbn\" => \"9784798121963\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/1963/9784798121963.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/1963/9784798121963.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/1963/9784798121963.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/11146351/\",\n \"sales_date\" => \"2011年04月\",\n \"price\" => \"5720\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:44:06\",\n \"updated_at\" => \"2021-03-01T05:44:06\"\n ],\n [\n\n \"title\" => \"関数プログラミング実践入門増補改訂\",\n \"author\" => \"大川徳之\",\n \"caption\" => \"プログラミングの考え方が見えてくる!言語の壁を越えて活かせるスタイル。Haskellプロダクトの開発者が見極めたシンプルで、使える基本。言語/開発環境最新スペック対応。\",\n \"publisher\" => \"技術評論社\",\n \"isbn\" => \"9784774183909\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/3909/9784774183909.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/3909/9784774183909.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/3909/9784774183909.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/14396000/\",\n \"sales_date\" => \"2016年10月\",\n \"price\" => \"3278\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:44:16\",\n \"updated_at\" => \"2021-03-01T05:44:16\"\n ],\n [\n\n \"title\" => \"すごいHaskellたのしく学ぼう!\",\n \"author\" => \"ミラン・リポヴァチャ/田中英行\",\n \"caption\" => \"\",\n \"publisher\" => \"オーム社\",\n \"isbn\" => \"9784274068850\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8850/9784274068850.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8850/9784274068850.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8850/9784274068850.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/11709735/\",\n \"sales_date\" => \"2012年05月\",\n \"price\" => \"3080\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:44:27\",\n \"updated_at\" => \"2021-03-01T05:44:27\"\n ],\n [\n\n \"title\" => \"プログラミングHaskell第2版\",\n \"author\" => \"グラハム・ハットン/山本和彦\",\n \"caption\" => \"\",\n \"publisher\" => \"ラムダノート\",\n \"isbn\" => \"9784908686078\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/6078/9784908686078.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/6078/9784908686078.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/6078/9784908686078.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/16102706/\",\n \"sales_date\" => \"2019年08月\",\n \"price\" => \"3520\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:44:32\",\n \"updated_at\" => \"2021-03-01T05:44:32\"\n ],\n [\n\n \"title\" => \"関数型リアクティブプログラミング\",\n \"author\" => \"Stephen Blackheath/Anthony Jones\",\n \"caption\" => \"関数型プログラミングをリアクティブプログラミングに活かす考え方と実装方法をそれぞれの基礎から正しく理解する道標。\",\n \"publisher\" => \"翔泳社\",\n \"isbn\" => \"9784798145563\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5563/9784798145563.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5563/9784798145563.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5563/9784798145563.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/15033445/\",\n \"sales_date\" => \"2017年08月10日頃\",\n \"price\" => \"4730\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:44:41\",\n \"updated_at\" => \"2021-03-01T05:44:41\"\n ],\n [\n\n \"title\" => \"入門Haskellプログラミング\",\n \"author\" => \"Will Kurt/株式会社クイープ\",\n \"caption\" => \"関数型プログラミングを正しく理解し、Haskellで思う存分遊べるようになる本。\",\n \"publisher\" => \"翔泳社\",\n \"isbn\" => \"9784798158662\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8662/9784798158662.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8662/9784798158662.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8662/9784798158662.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/15929360/\",\n \"sales_date\" => \"2019年07月31日頃\",\n \"price\" => \"4180\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:44:50\",\n \"updated_at\" => \"2021-03-01T05:44:50\"\n ],\n [\n\n \"title\" => \"関数プログラミングの楽しみ\",\n \"author\" => \"ジェレミー・ギボンズ/オッジ・デ・ムーア\",\n \"caption\" => \"\",\n \"publisher\" => \"オーム社\",\n \"isbn\" => \"9784274068058\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8058/9784274068058.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8058/9784274068058.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8058/9784274068058.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/6522663/\",\n \"sales_date\" => \"2010年06月\",\n \"price\" => \"4620\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T05:45:19\",\n \"updated_at\" => \"2021-03-01T05:45:19\"\n ],\n [\n\n \"title\" => \"考える技術・書く技術新版\",\n \"author\" => \"バーバラ・ミント/山崎康司\",\n \"caption\" => \"マッキンゼーをはじめ、世界の主要コンサルティング会社、さらにペプシコ、オリベッティ、AT&Tシステム、ユニリーバなどでライティングのコースを教えているバーバラ・ミントが、コミュニケーション力を高める文章の書き方を紹介。\",\n \"publisher\" => \"ダイヤモンド社\",\n \"isbn\" => \"9784478490273\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0273/9784478490273.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0273/9784478490273.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0273/9784478490273.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/1044067/\",\n \"sales_date\" => \"1999年03月\",\n \"price\" => \"3080\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T10:38:43\",\n \"updated_at\" => \"2021-03-01T10:38:43\"\n ],\n [\n\n \"title\" => \"Docker\",\n \"author\" => \"Adrian Mouat/Sky株式会社 玉川 竜司\",\n \"caption\" => \"本書はオープンソースのコンテナ管理ソフトウェア、Dockerの基礎から応用までを網羅した総合的な解説書です。はじめに開発環境をセットアップし、シンプルなWebアプリケーションのビルドについて解説した上で、コンテナの開発、テスト、結合に加えて、デプロイの方法、実動システムの効率的なモニタリングとロギングを紹介します。そして複数のホストからなるDockerコンテナのクラスタを、安全かつ高い信頼性の下で実行するために必要な高度なテクニックやツールについて紹介します。さらにネットワークやセキュリティについても詳述。Dockerとそのエコシステムを本格的に活用したい開発者、運用エンジニア、システム開発者必携の一冊です。\",\n \"publisher\" => \"オライリー・ジャパン\",\n \"isbn\" => \"9784873117768\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7768/9784873117768.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7768/9784873117768.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7768/9784873117768.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/14380377/\",\n \"sales_date\" => \"2016年08月13日頃\",\n \"price\" => \"3960\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T10:38:53\",\n \"updated_at\" => \"2021-03-01T10:38:53\"\n ],\n [\n\n \"title\" => \"詳細!PHP7+MySQL入門ノート\",\n \"author\" => \"大重美幸\",\n \"caption\" => \"こんにちはPHP7。Web新世代、セブンの誕生!初心者にやさしく、経験者にも納得の1冊ができました。基本シンタックスからMySQLデータベース連携まで、注釈付きのコードと手順を追った図で詳しく丁寧に解説しました。豊富なサンプルを積み重ねて確実にスキルアップしましょう。約10年ぶりのメジャーアップデート!PHPをはじめるなら今が最高のタイミングです。一押し!PHP7定番本!\",\n \"publisher\" => \"ソーテック社\",\n \"isbn\" => \"9784800711304\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/1304/9784800711304.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/1304/9784800711304.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/1304/9784800711304.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/14293014/\",\n \"sales_date\" => \"2016年07月01日頃\",\n \"price\" => \"3278\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T10:40:41\",\n \"updated_at\" => \"2021-03-01T10:40:41\"\n ],\n [\n\n \"title\" => \"入門監視\",\n \"author\" => \"Mike Julian/松浦隼人\",\n \"caption\" => \"本書は、システムのどの部分をどのように監視すべきか、また監視をどのように改善していくべきかについて解説する書籍です。前半で監視のベストプラクティス、デザインパターン/アンチパターンを示して、監視の基本原則を詳しく説明し、後半でフロントエンド、アプリケーション、サーバ、ネットワーク、セキュリティの各テーマで強力な監視の基盤を設計して実装するための方法を示します。日本語版では、松木雅幸(@songmu)氏による監視SaaSの導入や活用方法を付録として収録しています。\",\n \"publisher\" => \"オライリー・ジャパン\",\n \"isbn\" => \"9784873118642\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8642/9784873118642.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8642/9784873118642.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8642/9784873118642.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/15738048/\",\n \"sales_date\" => \"2019年01月17日頃\",\n \"price\" => \"3080\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T10:43:48\",\n \"updated_at\" => \"2021-03-01T10:43:48\"\n ],\n [\n\n \"title\" => \"インフラエンジニアの教科書(2)\",\n \"author\" => \"佐野裕\",\n \"caption\" => \"現場で役立つ本当の「力」をつける!数年、実務経験を積んだ人が次のステップに進むために知っておきたい技術や知識をわかりやすく解説します。日々のルーティンワークからは学びにくい原理原則・ノウハウが満載!視野を広げ成長を目指す人に贈る渾身の続編。前作と併せて読みたいインフラエンジニアのバイブル!\",\n \"publisher\" => \"シーアンドアール研究所\",\n \"isbn\" => \"9784863541863\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/1863/9784863541863.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/1863/9784863541863.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/1863/9784863541863.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/14396099/\",\n \"sales_date\" => \"2016年08月\",\n \"price\" => \"2343\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T10:44:02\",\n \"updated_at\" => \"2021-03-01T10:44:02\"\n ],\n [\n\n \"title\" => \"IT用語図鑑 ビジネスで使える厳選キーワード256\",\n \"author\" => \"増井 敏克\",\n \"caption\" => \"本書では、1つの用語に対して、イメージが湧くイラストや、用語に関連する話、用語の使用例などを掲載し、さまざまな角度から説明しています。そのため、暗記とは違って楽しく覚えられ、芋づる式に知識を思い出せるようになります。まぎらわしい用語の使い分けや、関連する用語の知識を身につけて、ITの全体像を把握しましょう!\",\n \"publisher\" => \"翔泳社\",\n \"isbn\" => \"9784798160016\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0016/9784798160016.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0016/9784798160016.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0016/9784798160016.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/15843293/\",\n \"sales_date\" => \"2019年05月13日頃\",\n \"price\" => \"1980\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T10:44:13\",\n \"updated_at\" => \"2021-03-01T10:44:13\"\n ],\n [\n\n \"title\" => \"プログラミングがわかる本\",\n \"author\" => \"日向俊二\",\n \"caption\" => \"\",\n \"publisher\" => \"カットシステム\",\n \"isbn\" => \"9784877834470\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/4470/9784877834470.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/4470/9784877834470.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/4470/9784877834470.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/15646261/\",\n \"sales_date\" => \"2018年10月\",\n \"price\" => \"1980\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T10:44:24\",\n \"updated_at\" => \"2021-03-01T10:44:24\"\n ],\n [\n\n \"title\" => \"左遷社員池田リーダーになる\",\n \"author\" => \"鈴木孝博\",\n \"caption\" => \"「自分」は変えない。「評価」を変える。トップリーダーが描く愛と感動の仕事ドラマ!結果を求め過ぎる人がハマる「罠」とは?\",\n \"publisher\" => \"リーブル出版\",\n \"isbn\" => \"9784863381520\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/1520/9784863381520.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/1520/9784863381520.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/1520/9784863381520.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/14361093/\",\n \"sales_date\" => \"2016年07月\",\n \"price\" => \"1430\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T10:57:59\",\n \"updated_at\" => \"2021-03-01T10:57:59\"\n ],\n [\n\n \"title\" => \"絵で見てわかるITインフラの仕組み 新装版\",\n \"author\" => \"山崎 泰史/三縄 慶子\",\n \"caption\" => \"ロングセラー『絵で見てわかるITインフラの仕組み』の新装版です。本書では、執筆者自身が学んだ経験を生かし、アーキテクチャ、ネットワーク、サーバー、プロセス、要素技術といった基盤技術をどのようにとらえれば理解しやすいのかを意識して解説しています。マクロの視点からミクロの視点へと解説を進めており、システムの各部分に共通する原理(仕組み)を無理なく、本質的に理解することができます。図を豊富に掲載し、実務経験が浅い方にもイメージを作りやすいように配慮しました。インフラ担当者はもちろん、アプリ開発者、DB管理者にもおすすめの内容です。\",\n \"publisher\" => \"翔泳社\",\n \"isbn\" => \"9784798158464\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8464/9784798158464.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8464/9784798158464.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8464/9784798158464.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/15895319/\",\n \"sales_date\" => \"2019年06月19日頃\",\n \"price\" => \"2618\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T10:44:39\",\n \"updated_at\" => \"2021-03-01T10:44:39\"\n ],\n [\n\n \"title\" => \"ネットワークはなぜつながるのか第2版\",\n \"author\" => \"戸根勤/日経network編集部\",\n \"caption\" => \"ブラウザにURLを入力してからWebページが表示されるまでの道筋を探検。ネットワーク技術に関する説明内容を全面的に見直し、基礎的な解説を大幅に加筆した改訂版。\",\n \"publisher\" => \"日経BP\",\n \"isbn\" => \"9784822283117\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8222/82228311.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8222/82228311.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8222/82228311.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/4312716/\",\n \"sales_date\" => \"2007年04月\",\n \"price\" => \"2640\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T10:45:20\",\n \"updated_at\" => \"2021-03-01T10:45:20\"\n ],\n [\n\n \"title\" => \"コンピュータはなぜ動くのか\",\n \"author\" => \"矢沢久雄/日経ソフトウエア編集部\",\n \"caption\" => \"コンピューター技術の、知識の範囲、絶対的な基礎、ゴールなど、10年後も通用する“基本”を身につけるためのシリーズ第4弾。\",\n \"publisher\" => \"日経BP\",\n \"isbn\" => \"9784822281656\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8222/82228165.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8222/82228165.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8222/82228165.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/1562180/\",\n \"sales_date\" => \"2003年06月\",\n \"price\" => \"2640\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T10:45:29\",\n \"updated_at\" => \"2021-03-01T10:45:29\"\n ],\n [\n\n \"title\" => \"プログラムはなぜ動くのか第2版\",\n \"author\" => \"矢沢久雄/日経ソフトウエア編集部\",\n \"caption\" => \"プログラムがメモリーにロードされ、CPUによって解釈・実行される仕組みをわかりやすく解説。\",\n \"publisher\" => \"日経BP\",\n \"isbn\" => \"9784822283155\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8222/82228315.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8222/82228315.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8222/82228315.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/4312717/\",\n \"sales_date\" => \"2007年04月\",\n \"price\" => \"2640\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T10:45:41\",\n \"updated_at\" => \"2021-03-01T10:45:41\"\n ],\n [\n\n \"title\" => \"オブジェクト指向でなぜつくるのか第2版\",\n \"author\" => \"平澤章\",\n \"caption\" => \"オブジェクト指向と関数型言語の本質をズバリ解説。10年後も通用する“基本”を身につけよう。\",\n \"publisher\" => \"日経BP\",\n \"isbn\" => \"9784822284657\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/4657/9784822284657.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/4657/9784822284657.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/4657/9784822284657.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/6998790/\",\n \"sales_date\" => \"2011年04月\",\n \"price\" => \"2640\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T10:45:53\",\n \"updated_at\" => \"2021-03-01T10:45:53\"\n ],\n [\n\n \"title\" => \"現場で役立つシステム設計の原則\",\n \"author\" => \"増田亨\",\n \"caption\" => \"日本最大級となる60万件以上の求人情報サイト「イーキャリアJobSearch」の主任設計者ほか数多くの経験を持つ著者が「現場でこんなことに困っていた」「解決策としてこうやった」「その結果こうなった」というリアルな経験と「なぜ、そうするのか」をふまえて解説!\",\n \"publisher\" => \"技術評論社\",\n \"isbn\" => \"9784774190877\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0877/9784774190877.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0877/9784774190877.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0877/9784774190877.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/15017530/\",\n \"sales_date\" => \"2017年07月\",\n \"price\" => \"3234\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T10:46:04\",\n \"updated_at\" => \"2021-03-01T10:46:04\"\n ],\n [\n\n \"title\" => \"令和02年 イメージ&クレバー方式でよくわかる 栢木先生の基本情報技術者教室\",\n \"author\" => \"栢木厚\",\n \"caption\" => \"内容に関連した、なごみイラストで頭をほぐしてからスタート。各節を短めに構成し、細切れ時間を有効活用できる。本文は広い範囲から試験に出るところだけを解説。例え話でイメージしやすい。役立つ囲み記事もたくさん。「AとくればB」方式で重要ポイントをひとまとめ。頭の整理がしやすい。1テーマごとの確認問題で覚えた知識をすぐ使うから、記憶が定着しやすく実力がつく。最新の試験問題も多数収録。\",\n \"publisher\" => \"技術評論社\",\n \"isbn\" => \"9784297110116\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0116/9784297110116.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0116/9784297110116.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0116/9784297110116.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/16107709/\",\n \"sales_date\" => \"2019年12月02日頃\",\n \"price\" => \"1848\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T10:46:13\",\n \"updated_at\" => \"2021-03-01T10:46:13\"\n ],\n [\n\n \"title\" => \"情報処理教科書 出るとこだけ!基本情報技術者[午後]第2版\",\n \"author\" => \"橋本 祐史\",\n \"caption\" => \"「出る順」に「出るとこだけ」を掲載。効率よく学習できる。午後問題に合格するためのテーマを16に厳選して収録。前提知識+解き方+過去問題をていねいに解説。新シラバスに完全対応!\",\n \"publisher\" => \"翔泳社\",\n \"isbn\" => \"9784798162171\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/2171/9784798162171.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/2171/9784798162171.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/2171/9784798162171.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/16093637/\",\n \"sales_date\" => \"2019年12月04日頃\",\n \"price\" => \"1980\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T10:46:37\",\n \"updated_at\" => \"2021-03-01T10:46:37\"\n ],\n [\n\n \"title\" => \"インフラ/ネットワークエンジニアのためのネットワーク技術&設計入門 第2版\",\n \"author\" => \"みやた ひろし\",\n \"caption\" => \"TCP/IPのその先へ。現場のネットワークを知りたい人に読んでほしい、実務直結の知識を一冊に凝縮。ネットワーク技術の基本から現場の設計ノウハウまで、400超の図解を用いて徹底解説。高速化、仮想化に対応した改訂版!\",\n \"publisher\" => \"SBクリエイティブ\",\n \"isbn\" => \"9784797396805\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/6805/9784797396805.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/6805/9784797396805.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/6805/9784797396805.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/15898730/\",\n \"sales_date\" => \"2019年06月21日頃\",\n \"price\" => \"3300\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T10:59:21\",\n \"updated_at\" => \"2021-03-01T10:59:21\"\n ],\n [\n\n \"title\" => \"サイトリライアビリティワークブック\",\n \"author\" => \"Betsy Beyer/Niall Richard Murphy\",\n \"caption\" => \"本書は、SREを組織やプロジェクトで導入するにあたり、必要となる具体的な方法や手順を解説します。またこれまでGoogle内部で得た技術的ノウハウを解説し、さらにEvernote、The Home Depot、New York Timesなどさまざまな企業での事例を紹介します。クラウドなどの完全に制御できない環境で信頼性の高いサービスを実行する方法、サービスレベル目標に基づくサービスの作成・実行・監視、運用の過負荷を取り除き既存の運用チームをSREに変換する方法、新規開発またはすでに開発が終わったサービスでSREを始める方法などを解説します。Google内部だけでなく多様な企業で培われたSREプラクティスを解説する本書は、SREを導入し実践したい開発者、運用管理者、マネージャー必携の一冊です。\",\n \"publisher\" => \"オライリー・ジャパン\",\n \"isbn\" => \"9784873119137\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/9137/9784873119137.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/9137/9784873119137.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/9137/9784873119137.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/16314315/\",\n \"sales_date\" => \"2020年06月16日頃\",\n \"price\" => \"5060\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T10:47:39\",\n \"updated_at\" => \"2021-03-01T10:47:39\"\n ],\n [\n\n \"title\" => \"HACKING:美しき策謀第2版\",\n \"author\" => \"ジョン・エリクソン/村上雅章\",\n \"caption\" => \"ハッカーの視点に立ち、攻撃手法を詳しく分析。防御方法の本質が理解できる究極のセキュリティガイド。ベストセラー待望の改訂版。\",\n \"publisher\" => \"オライリー・ジャパン\",\n \"isbn\" => \"9784873115146\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5146/9784873115146.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5146/9784873115146.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5146/9784873115146.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/11418036/\",\n \"sales_date\" => \"2011年10月\",\n \"price\" => \"4620\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T10:48:18\",\n \"updated_at\" => \"2021-03-01T10:48:18\"\n ],\n [\n\n \"title\" => \"みずほ銀行システム統合、苦闘の19年史\",\n \"author\" => \"日経コンピュータ/山端 宏実\",\n \"caption\" => \"「2025年の崖」からの転落を防ぐ秘訣がここにある。\",\n \"publisher\" => \"日経BP\",\n \"isbn\" => \"9784296105359\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5359/9784296105359.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5359/9784296105359.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5359/9784296105359.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/16213851/\",\n \"sales_date\" => \"2020年02月15日頃\",\n \"price\" => \"1980\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T10:48:33\",\n \"updated_at\" => \"2021-03-01T10:48:33\"\n ],\n [\n\n \"title\" => \"大学4年間のデータサイエンスが10時間でざっと学べる\",\n \"author\" => \"久野 遼平/木脇 太一\",\n \"caption\" => \"新時代の花形職業、データサイエンティストは何を学んでいるのか。プログラミングの基礎からアルゴリズム、ディープラーニングまで。最新データ分析の手法が基礎から身につく!\",\n \"publisher\" => \"KADOKAWA\",\n \"isbn\" => \"9784046022110\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/2110/9784046022110.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/2110/9784046022110.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/2110/9784046022110.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/15397899/\",\n \"sales_date\" => \"2018年03月29日頃\",\n \"price\" => \"1650\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T10:48:48\",\n \"updated_at\" => \"2021-03-01T10:48:48\"\n ],\n [\n\n \"title\" => \"武器としての決断思考\",\n \"author\" => \"瀧本 哲史\",\n \"caption\" => \"本書は、著者がいま、京都大学で二十歳前後の学生に教えている「意志決定の授業」を一冊に凝縮したものです。今後、カオスの時代を生きていく若い世代にいちばん必要なのは、意思決定の方法を学ぶことであり、決断力を身につけることです。もう過去のやり方は通用しないし、人生のレールみたいなものもなくなってしまいました。「答え」は誰も教えてはくれません。となれば、自分の人生は、自分で考えて、自分で決めていくしかないのです。仕事をどうするか、家庭をどうするか、人生をどうするか?この本で私と一緒に「自分で答えを出すための思考法」を学んでいきましょう。きっと、あなたの人生を変える授業になるはずです。\",\n \"publisher\" => \"星海社\",\n \"isbn\" => \"9784061385016\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5016/9784061385016.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5016/9784061385016.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5016/9784061385016.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/11374635/\",\n \"sales_date\" => \"2011年09月22日頃\",\n \"price\" => \"902\",\n \"size\" => \"新書\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T10:49:03\",\n \"updated_at\" => \"2021-03-01T10:49:03\"\n ],\n [\n\n \"title\" => \"入門考える技術・書く技術\",\n \"author\" => \"山崎康司\",\n \"caption\" => \"\",\n \"publisher\" => \"ダイヤモンド社\",\n \"isbn\" => \"9784478014585\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/4585/9784478014585.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/4585/9784478014585.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/4585/9784478014585.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/11124242/\",\n \"sales_date\" => \"2011年04月\",\n \"price\" => \"1650\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T10:49:32\",\n \"updated_at\" => \"2021-03-01T10:49:32\"\n ],\n [\n\n \"title\" => \"IT業界の病理学\",\n \"author\" => \"司馬紅太郎、秋山浩一/森龍二、鈴木昭吾\",\n \"caption\" => \"ソフトウェア業界にはびこる“病気”の原因と背景、そして治療法と予防法を現場の一線で活躍するエンジニアたちが体系化。\",\n \"publisher\" => \"技術評論社\",\n \"isbn\" => \"9784297108571\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8571/9784297108571.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8571/9784297108571.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8571/9784297108571.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/16050546/\",\n \"sales_date\" => \"2019年11月09日頃\",\n \"price\" => \"1848\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T10:49:46\",\n \"updated_at\" => \"2021-03-01T10:49:46\"\n ],\n [\n\n \"title\" => \"人生ドラクエ化マニュアル\",\n \"author\" => \"JUNZO\",\n \"caption\" => \"\",\n \"publisher\" => \"ワニブックス\",\n \"isbn\" => \"9784847093395\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/3395/9784847093395.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/3395/9784847093395.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/3395/9784847093395.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/13204517/\",\n \"sales_date\" => \"2015年04月\",\n \"price\" => \"1320\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T10:49:58\",\n \"updated_at\" => \"2021-03-01T10:49:58\"\n ],\n [\n\n \"title\" => \"なるほどデザイン\",\n \"author\" => \"筒井美希\",\n \"caption\" => \"「デザイン=楽しい」を実感できる!デザイナーのあたまの中を豊富なビジュアルでひも解く。\",\n \"publisher\" => \"エムディエヌコーポレーション\",\n \"isbn\" => \"9784844365174\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5174/9784844365174.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5174/9784844365174.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5174/9784844365174.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/13318064/\",\n \"sales_date\" => \"2015年08月\",\n \"price\" => \"2200\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T10:50:56\",\n \"updated_at\" => \"2021-03-01T10:50:56\"\n ],\n [\n\n \"title\" => \"エンジニアの知的生産術\",\n \"author\" => \"西尾泰和\",\n \"caption\" => \"仕事をするうえで、どのように学び、整理し、アウトプットするのか、エンジニアの知的生産の方法を解説した書籍です。知的生産の方法を解説した書籍のほとんどは執筆者の方法の紹介にとどまっており、各自の環境に合うようにどのようにカスタマイズするかまでは書かれていません。本書では、数々の知的生産術の共通点や特徴を知ることで、どこが重要な部分なのかを解説します。これにより、みなさんが自分の環境に合わせて手法を変化させ、取り入れられるようになることを目的とします。筆者が日ごろ行っている具体的な手法や試行錯誤も紹介します。\",\n \"publisher\" => \"技術評論社\",\n \"isbn\" => \"9784774198767\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8767/9784774198767.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8767/9784774198767.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8767/9784774198767.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/15576617/\",\n \"sales_date\" => \"2018年08月\",\n \"price\" => \"2728\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T10:51:08\",\n \"updated_at\" => \"2021-03-01T10:51:08\"\n ],\n [\n\n \"title\" => \"オブジェクト指向UIデザイン──使いやすいソフトウェアの原理\",\n \"author\" => \"ソシオメディア株式会社/上野 学\",\n \"caption\" => \"銀の弾丸、OOUI。タスクからオブジェクトへの転回による、操作性と開発効率の劇的な向上。手を動かして身につける18の実践演習付き。\",\n \"publisher\" => \"技術評論社\",\n \"isbn\" => \"9784297113513\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/3513/9784297113513.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/3513/9784297113513.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/3513/9784297113513.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/16333636/\",\n \"sales_date\" => \"2020年06月05日頃\",\n \"price\" => \"3278\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T10:51:21\",\n \"updated_at\" => \"2021-03-01T10:51:21\"\n ],\n [\n\n \"title\" => \"情熱プログラマー\",\n \"author\" => \"チャド・ファウラー/でびあんぐる\",\n \"caption\" => \"\",\n \"publisher\" => \"オーム社\",\n \"isbn\" => \"9784274067938\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7938/9784274067938.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7938/9784274067938.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7938/9784274067938.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/6395458/\",\n \"sales_date\" => \"2010年02月\",\n \"price\" => \"2640\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T10:51:37\",\n \"updated_at\" => \"2021-03-01T10:51:37\"\n ],\n [\n\n \"title\" => \"jQuery最高の教科書\",\n \"author\" => \"シフトブレイン\",\n \"caption\" => \"とことん丁寧×ステップアップ解説。だから、知識ゼロからでも本当によくわかる!jQueryをこよなく愛するトップクリエイターが基本的な仕組みから、実務で活かせる珠玉のテクニックまでを徹底詳解!経験に裏付けられた「わかりにくいポイント」を押さえた解説だから確かな基礎力と、実務で活かせる実践力を身につけられる!\",\n \"publisher\" => \"SBクリエイティブ\",\n \"isbn\" => \"9784797372212\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/2212/9784797372212.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/2212/9784797372212.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/2212/9784797372212.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/12557168/\",\n \"sales_date\" => \"2013年11月27日頃\",\n \"price\" => \"2838\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T10:51:52\",\n \"updated_at\" => \"2021-03-01T10:51:52\"\n ],\n [\n\n \"title\" => \"できるホームページHTML&CSS入門\",\n \"author\" => \"佐藤和人/できるシリーズ編集部\",\n \"caption\" => \"タグの理解が深まる!入力例と結果、機能がひと目でわかるからHTMLコードがすぐ身に付く。CD-ROMに収録の画像編集ソフトでホームページを彩るロゴも作成できる!\",\n \"publisher\" => \"インプレス\",\n \"isbn\" => \"9784295000747\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0747/9784295000747.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0747/9784295000747.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/0747/9784295000747.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/14660256/\",\n \"sales_date\" => \"2017年02月\",\n \"price\" => \"1738\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T10:52:03\",\n \"updated_at\" => \"2021-03-01T10:52:03\"\n ],\n [\n\n \"title\" => \"ノンデザイナーズ・デザインブック [第4版]\",\n \"author\" => \"RobinWilliams/吉川典秀\",\n \"caption\" => \"4つの基本原則。これを知るだけで、あなたのデザインはずっとぐっと、良くなります。プロで無くても、読みやすいデザイン、伝わるプレゼン資料、わかりやすいレイアウトを作りたい。そんなあなたのための、デザインの基本書。日本語版補足。日本語によるデザインサンプル、和文タイポグラフィ。18年ずっと売れ続けているロングセラー、待望の第4版。\",\n \"publisher\" => \"マイナビ出版\",\n \"isbn\" => \"9784839955557\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5557/9784839955557.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5557/9784839955557.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/5557/9784839955557.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/14291225/\",\n \"sales_date\" => \"2016年06月30日頃\",\n \"price\" => \"2398\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T10:56:04\",\n \"updated_at\" => \"2021-03-01T10:56:04\"\n ],\n [\n\n \"title\" => \"「和魂英才」のすゝめ\",\n \"author\" => \"都築仁子\",\n \"caption\" => \"将来の日本を支える子どもたちを育てるのに、英語教育は避けて通れない問題。日本がいま永年の課題である英語の問題をクリアするためには、先人たちの知恵に倣い、英語はあくまでツール、手段、方法として、最も大切な和魂、大和心は失わない、という「和魂英才」の考えがふさわしいのではないかー。グローバル時代において、日本人はどう生きるべきかー都築学園グループ総長が語る!\",\n \"publisher\" => \"PHP研究所\",\n \"isbn\" => \"9784569829050\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/9050/9784569829050.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/9050/9784569829050.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/9050/9784569829050.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/14507618/\",\n \"sales_date\" => \"2016年10月21日頃\",\n \"price\" => \"1650\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T10:57:17\",\n \"updated_at\" => \"2021-03-01T10:57:17\"\n ],\n [\n\n \"title\" => \"由佳の成長、それは奇跡の出会いからはじまった\",\n \"author\" => \"鈴木孝博\",\n \"caption\" => \"ユニークなコンセプトで成長してきた書店チェーン「開明堂」。市場構造の変化の影響も大きく、閉塞感に包まれ気味の状態だった。創業者・石山大一郎の息子である石山司朗がその後を継いだものの、ほどなくして大一郎は急逝する。そこに、世界的な金融ショックで破綻した外資系証券をクビになった北川由佳が転職してきた。将来は独立し、家族を楽にしたいという思いの由佳。ある時、「孫・将大の嫁に…」と大一郎が由佳に憑いてしまうことに。そして、由佳の応援を始める。大一郎が絡んでの、由佳の失敗と活躍と成長。登場人物それぞれにとっての「自分の生き方を見つけていこう」とする姿を描くお仕事ドラマ。\",\n \"publisher\" => \"リーブル出版\",\n \"isbn\" => \"9784863382404\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/2404/9784863382404.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/2404/9784863382404.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/2404/9784863382404.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/15737525/\",\n \"sales_date\" => \"2018年12月\",\n \"price\" => \"1650\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T10:57:30\",\n \"updated_at\" => \"2021-03-01T10:57:30\"\n ],\n [\n\n \"title\" => \"超例解Linuxカーネルプログラミング\",\n \"author\" => \"平田豊(テクニカルライター)\",\n \"caption\" => \"Linuxカーネルで日々行われている修正を題材に業務開発におけるソフトウェアの修正を考える!Linuxの最先端でどんなことが行われているか丁寧に解説!ハッシュタグ「#カーネルパッチ勉強会」から生まれた1冊!\",\n \"publisher\" => \"シーアンドアール研究所\",\n \"isbn\" => \"9784863542846\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/2846/9784863542846.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/2846/9784863542846.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/2846/9784863542846.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/15957169/\",\n \"sales_date\" => \"2019年07月\",\n \"price\" => \"3113\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T10:59:30\",\n \"updated_at\" => \"2021-03-01T10:59:30\"\n ],\n [\n\n \"title\" => \"はじめてのOSコードリーディング\",\n \"author\" => \"青柳隆宏\",\n \"caption\" => \"近年のOSにも通じる基本アイディアを約1万行で実現したUNIX 6th Editionのソースコードを徹底解説。コンピュータシステムの全体像を理解する。\",\n \"publisher\" => \"技術評論社\",\n \"isbn\" => \"9784774154640\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/4640/9784774154640.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/4640/9784774154640.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/4640/9784774154640.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/12122924/\",\n \"sales_date\" => \"2013年01月\",\n \"price\" => \"3520\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T10:59:39\",\n \"updated_at\" => \"2021-03-01T10:59:39\"\n ],\n [\n\n \"title\" => \"例解UNIX/Linuxプログラミング教室\",\n \"author\" => \"冨永 和人/権藤 克彦\",\n \"caption\" => \"\",\n \"publisher\" => \"株式会社オーム社\",\n \"isbn\" => \"9784274222108\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/2108/9784274222108.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/2108/9784274222108.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/2108/9784274222108.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/15398329/\",\n \"sales_date\" => \"2018年04月26日頃\",\n \"price\" => \"4070\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T10:59:47\",\n \"updated_at\" => \"2021-03-01T10:59:47\"\n ],\n [\n\n \"title\" => \"SRE サイトリライアビリティエンジニアリング\",\n \"author\" => \"Betsy Beyer/Chris Jones\",\n \"caption\" => \"サイトリライアビリティエンジニアリング(SRE)とは、Googleで培われたシステム管理とサービス運用の方法論です。GoogleのSREチームの主要メンバーによって書かれた本書は、ソフトウェアのライフサイクル全体にコミットすることで世界最大規模のソフトウェアシステムがどのように構築、導入、監視、維持されているのかを解説します。はじめにリスク管理やサービスレベル目標、リリースエンジニアリングなどSREの行動の基礎となる原則について解説し、次にインシデント管理や障害の根本原因分析、SRE内でのソフトウェア開発など大規模分散コンピューティングシステムを構築し運用するSREの実践について詳述します。さらにSREのトレーニングやコミュニケーションなどの管理について紹介します。急速にスケールするサービスを高い信頼性で運用する方法を解説する本書はエンジニア必携の一冊です。\",\n \"publisher\" => \"オライリー・ジャパン\",\n \"isbn\" => \"9784873117911\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7911/9784873117911.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7911/9784873117911.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7911/9784873117911.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/15078428/\",\n \"sales_date\" => \"2017年08月11日頃\",\n \"price\" => \"5280\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T10:59:55\",\n \"updated_at\" => \"2021-03-01T10:59:55\"\n ],\n [\n\n \"title\" => \"詳解Linuxカーネル第3版\",\n \"author\" => \"ダニエル・P.ボベット/マルコ・セサティ\",\n \"caption\" => \"本書はLinuxのソースコードの恩恵を最大限に活かすための羅針盤です。複雑で難解なLinuxカーネルの仕組みを、基礎からていねいに説明。Linuxカーネルの基本機能を網羅し、ハードウェア依存部分についても踏み込んだ解説がなされています。第3版では、Linux2.6を対象として改訂を行い、特にメモリとプロセススケジューリングについて大幅な変更と加筆がなされています。Linuxのソースコードを理解するためのガイドブックとして、オペレーティングシステムの本格的な解説書として最適の1冊です。\",\n \"publisher\" => \"オーム社\",\n \"isbn\" => \"9784873113135\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8731/87311313.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8731/87311313.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/8731/87311313.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/4306208/\",\n \"sales_date\" => \"2007年02月\",\n \"price\" => \"7260\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T11:00:09\",\n \"updated_at\" => \"2021-03-01T11:00:09\"\n ],\n [\n\n \"title\" => \"詳解UNIXプログラミング第3版\",\n \"author\" => \"W.リチャード・スティーブンス/スティーヴン・A.ラーゴ\",\n \"caption\" => \"\",\n \"publisher\" => \"翔泳社\",\n \"isbn\" => \"9784798134888\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/4888/9784798134888.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/4888/9784798134888.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/4888/9784798134888.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/12749947/\",\n \"sales_date\" => \"2014年04月\",\n \"price\" => \"9130\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T11:00:19\",\n \"updated_at\" => \"2021-03-01T11:00:19\"\n ],\n [\n\n \"title\" => \"詳解システム・パフォーマンス\",\n \"author\" => \"Brendan Gregg/西脇靖紘\",\n \"caption\" => \"パフォーマンス障害を解決に導く基礎知識と実践のための方法論を徹底解説!!\",\n \"publisher\" => \"オライリー・ジャパン\",\n \"isbn\" => \"9784873117904\",\n \"large_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7904/9784873117904.jpg?_ex=200x200\",\n \"medium_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7904/9784873117904.jpg?_ex=120x120\",\n \"small_image_url\" => \"https://thumbnail.image.rakuten.co.jp/@0_mall/book/cabinet/7904/9784873117904.jpg?_ex=64x64\",\n \"item_url\" => \"https://books.rakuten.co.jp/rb/14709773/\",\n \"sales_date\" => \"2017年02月\",\n \"price\" => \"5940\",\n \"size\" => \"単行本\",\n \"created_user_id\" => 1,\n \"created_at\" => \"2021-03-01T11:00:40\",\n \"updated_at\" => \"2021-03-01T11:00:40\"\n ]\n ];\n\n foreach ($books as $book) {\n Book::insert($book);\n }\n // $user = new Book();\n // $user->role = UserRoleType::ADMIN;\n // $user->login_id = \"aoki_s\";\n // $user->password = Hash::make('q4N7ZtvS');\n\n // $user->save();\n }", "public function ViewResults() {\n echo \"<pre>\" . print_r($this->rs, TRUE) . \"</pre>\";\n }", "public function testNewBookView()\n {\n $response = $this->get('api/book/getNewBooks');\n\n $response->assertStatus(200);\n }", "function booksList($offset, $total_records_per_page, $order, $ascdesc)\n{\n $booksManager = new ListManager();\n\n\n\n if (isset($_GET['search']) && $_GET['search']!='') {\n $search = input(addcslashes($_GET['search'], '_'));\n $search=\"%\".$search.\"%\";\n $books = $booksManager->get_search($offset, $total_records_per_page, $order, $ascdesc, $search);\n } elseif (isset($_GET['cat']) && $_GET['cat']!='') {\n $cat = input($_GET['cat']);\n $books = $booksManager-> get_cat($offset, $total_records_per_page, $order, $ascdesc, $cat);\n } else {\n $books = $booksManager->selectAll($offset, $total_records_per_page, $order, $ascdesc); // Appel la fonction qui renvoie toutes les données sur les livres en bdd\n }\n // require('view/listView.php');\n return $books;\n echo selectAll();\n}", "public function get_books()\n {\n $this->load->database();\n // print_r($this->db->get(\"books\"));\n $query = $this->db->query(\"select * from books\");\n return $query->result();\n }", "public function index()\n {\n $books = Book::all();\n $categories = Category::all();\n return view('dashboard.pages.books.index', ['books' => $books, 'categories' => $categories]);\n }", "public function index()\n {\n $books = Book::all();\n\n return view('book.index')->with(['books' => $books]);\n\n }", "public function index()\n\t{\n\t\treturn View::make('frontend.books.index')\n\t\t\t\t\t->with('books', Book::all());\n\t}", "public function index()\n {\n $books = DB::table('books')\n ->join('categories', 'books.category_id', '=', 'categories.id')\n ->leftjoin('users', 'books.user_id', '=', 'users.id')\n ->select(DB::raw('books.id, books.name, books.author, books.category_id, categories.name category, books.published, case books.available when 1 then \"yes\" else \"no\" end as available, books.user_id, users.name user'))\n ->get();\n return response()->json(['status'=>'ok','data'=>$books], 200);\n }", "public function index()\n {\n $books = DB::select('SELECT tblbooks.id,tblbooks.name,author_id,\n year_of_publish,\n amount,\n isbn,\n medium,\n image,\n users.name as userName,\n tblcatagories.name as catName\n FROM tblbooks,users,tblcatagories\n WHERE tblbooks.author_id=users.id \n AND cat_id=tblcatagories.id');\n\n //var_dump($books);\n\n return view('book.index')->with('books',$books);\n }", "public function index(Books $books)\n {\n return view('home',['books'=>$books->first()->get()]);\n }", "public function index()\n {\n $books = Book::orderByDesc('id')->get();\n \n return view('books.index')->with('books',$books);\n }", "public function getEx5() {\n $books = \\App\\Book::all();\n $this->printBooks($books);\n }", "public function getEx3() {\n # Use the QueryBuilder to get all the books where author is like \"%Scott%\"\n $books = \\DB::table('books')->where('author', 'LIKE', '%Scott%')->get();\n # Output the results\n $this->printBooks($books);\n }", "public function action_index()\n {\n $this->model->show_test_data();\n //$this->view->generate('test_view.php', $this->template, $page, $this->data);\n }", "public function index()\n {\n $books = Book::orderBy('name')->paginate('10');\n\n return view('books.index', compact('books'));\n }", "public function index()\n {\n $books = Book::whereNotNull('is_approved')\n ->with('authors')\n ->with('genres')\n ->withAvg('reviews', 'rating')\n ->when(request('user_books') && Auth::check(), function ($query) {\n $query->where('user_id', auth()->user()->id)\n ->whereNotNull('is_approved')\n ->orWhere(function($query){\n $query->whereNull('is_approved')\n ->where('user_id', auth()->user()->id);\n });\n })\n ->when(request('search'), function ($query) {\n $search = request('search');\n $query->whereNotNull('is_approved')\n ->where('title', 'LIKE', '%' . $search . '%')\n ->orWhere(function($query) use ($search){\n $query->whereNotNull('is_approved')\n ->where('description', 'LIKE', '%' . $search . '%');\n })\n ->orWhereHas('genres', function ($query) use ($search) {\n $query->whereNotNull('is_approved')\n ->where('name', 'LIKE', '%' . $search . '%');\n })\n ->orWhereHas('authors', function ($query) use ($search) {\n $query->whereNotNull('is_approved')\n ->where('name', 'LIKE', '%' . $search . '%');\n });\n })\n ->latest()\n ->paginate(25);\n\n\n\n return view('book.index', compact('books'));\n }", "public function getEx12() {\n $books = \\App\\Book::orderBy('published','desc')->get();\n $this->printBooks($books);\n # Underlying SQL: select * from `books` order by `published` desc\n\t}", "public function index()\n {\n $books = book::all();\n return view('backend.book.book_list',compact('books'));\n }", "public function show($book)\n {\n return $this->successResponse($this->bookService->obtainBook($book));\n }", "public function show($book)\n {\n //dd($book);\n }", "public function index()\n {\n $data['languages'] = Language::getLanguages();\n $data['books'] = Book::getAll(3);\n return view('admin.books.index', $data);\n\n }", "public function index()\n {\n $books = Book::paginate(10);\n\n return view('books.index', compact('books'));\n }", "public function index()\n {\n return view('book.index',[\n 'books' => Book::where('user_id', Auth::user()->id)->get()\n ]);\n }", "public function index()\n {\n $books = Book::all();\n \n return view('library/book/index', compact('books'));\n }", "public function index()\n {\n $books = Book::all();\n\n if(!$books){\n return $this->sendError('', 'Not Found', 404);\n }\n\n return $this->sendResponse($books, '');\n }", "public function books()\n {\n return $this->get('/books');\n }", "public function index()\n {\n return view('books::index');\n }", "public function index(Request $request, Book $book)\n {\n $queryParameters = $this->composeQueryParameters($request);\n\n $result = $this->service->parametrizedResult(\n $queryParameters['search'],\n $queryParameters['order'],\n $queryParameters['start'],\n $queryParameters['length']);\n\n return response()->json([\n 'success' => true,\n 'data' => json_encode(BooksResource::make($result)),\n 'items_filtered' => count($result),\n 'items_total' => $this->service->getCount(),\n 'parameters' => json_encode($queryParameters),\n 'message' => 'result books',\n 'code' => Response::HTTP_OK,\n ], Response::HTTP_OK);\n\n }", "public function print_test()\n {\n $clientname = $this->configsys->get_config_value('clientname');\n $clientaddress = $this->configsys->get_config_value('clientaddress');\n $clientcity = $this->configsys->get_config_value('clientcity');\n $clientstate = $this->configsys->get_config_value('clientstate');\n $clientzip = $this->configsys->get_config_value('clientzip');\n $clientphone = $this->configsys->get_config_value('clientphone');\n $clientwebsite = $this->configsys->get_config_value('clientwebsite');\n\n $client_data = array(\n 'clientname' => $clientname,\n 'clientaddress' => $clientaddress,\n 'clientcity' => $clientcity,\n 'clientstate' => $clientstate,\n 'clientzip' => $clientzip,\n 'clientphone' => $clientphone,\n 'clientwebsite' => $clientwebsite\n );\n\n $data['client_data'] = $client_data;\n\n $view_vars = array(\n 'title' => $this->config->item('Company_Title'),\n 'heading' => $this->config->item('Company_Title'),\n 'description' => $this->config->item('Company_Description'),\n 'company' => $this->config->item('Company_Name'),\n 'logo' => $this->config->item('Company_Logo'),\n 'author' => $this->config->item('Company_Author')\n );\n $data['page_data'] = $view_vars;\n\n $post_payment_data = array(\n 'OrderNumber' => '77777',\n 'IsApproved' => 1,\n 'ReturnCode' => 'ReturnCode',\n 'ResponseHTML' => 'This is the response HTML',\n 'UpdateDate' => date('Y-n-j H:i:s')\n );\n $result_data = $post_payment_data;\n $data['result_data'] = $result_data;\n\n\n $submitted_data['transaction_id'] = '12345676';\n $submitted_data['creditcard'] = '1111';\n $submitted_data['expirationmonth'] = '08';\n $submitted_data['expirationyear'] = 2012;\n $submitted_data['cvv2'] = '123';\n $submitted_data['PaymentSource'] = 'VT';\n $submitted_data['amount'] = '125.34';\n $submitted_data['cclast4'] = '4444';\n $submitted_data['name'] = 'John Doe';\n\n $data['submitted_data'] = $submitted_data;\n\n $this->load->view('virtualterminalformresult', $data);\n\n }", "public function getPrint()\n\t{\n\t\t$books = BookRepository::printRanking();\n\t\treturn Response::json($books, 200);\n\t}", "public function index()\n {\n $books = Book::all();\n return view('Admins.books.books',compact('books'));\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "function printResult($result) {\n\t\t\t\techo \"<div class='Pokeguide'>\n\t\t\t\techo \"<table>\";\n\n\t\t\t\twhile ($row = OCI_Fetch_Array($result, OCI_BOTH)) {\n\t\t\t\t\tfor ($i = 0; $i < 15; $i++){\n\t\t\t\t\t\techo \"<tr><td>\" . $row[$i] . \"</td></tr>\"; //or just use \"echo $row[0]\" \n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\techo \"</table>\";\n\t\t\t\techo \"</div>\";\n\t\t\t}", "public function indexAction() {\n $books = Book::getAllBooks();\n require_once('views/bookList.php');\n }", "public function index()\n {\n return view('admin.book.index',[\n 'books'=>Book::all()\n ] );\n }", "public function index()\n {\n $books = Book::orderby('created_at','desc')->get();\n return view('book.index');\n }" ]
[ "0.6895703", "0.6831107", "0.68240917", "0.66861844", "0.6685816", "0.66041535", "0.638851", "0.6316246", "0.6250085", "0.6182789", "0.61757237", "0.61446655", "0.61263126", "0.6109041", "0.6099881", "0.6093157", "0.60264635", "0.600652", "0.5992481", "0.5955284", "0.59318084", "0.5895976", "0.58891714", "0.5876709", "0.586087", "0.58475417", "0.5834409", "0.58271205", "0.58171636", "0.5814002", "0.5805732", "0.58028924", "0.57997113", "0.57824546", "0.57734215", "0.576975", "0.5766386", "0.57565206", "0.57554513", "0.5753811", "0.57498467", "0.5744028", "0.5732616", "0.5731339", "0.57250994", "0.57239574", "0.57235676", "0.5719908", "0.571566", "0.5707506", "0.5700376", "0.57000124", "0.56908125", "0.5690532", "0.5686329", "0.5674416", "0.56690055", "0.5665605", "0.5662885", "0.5661819", "0.56601113", "0.5657982", "0.56521523", "0.56514704", "0.56509", "0.5643021", "0.5642012", "0.5641537", "0.563125", "0.56292725", "0.5621644", "0.56184834", "0.5615952", "0.56124353", "0.5602463", "0.5602081", "0.56016916", "0.5599161", "0.5580853", "0.5580696", "0.5569814", "0.55661863", "0.55653167", "0.55627", "0.55616105", "0.5556315", "0.5556315", "0.5556315", "0.5556315", "0.5556315", "0.5556315", "0.5556315", "0.5556315", "0.5556315", "0.5556315", "0.5556315", "0.55472314", "0.5546031", "0.5543578", "0.55421937" ]
0.676513
3
Demonstrate using the Book model without prefixing with \App\Book This works because of the use `App\Book;` statement at the top of this file
public function getEx15() { $books = Book::all(); $this->printBooks($books); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function model()\n {\n return 'App\\QuickBooks';\n }", "public function __construct(Book $book)\n {\n $this->BookModel = $book;\n }", "public function __construct(){\n // make sure you do something like that in your index.php\n require_once('models/book.php');\n $this->book = new Book();\n }", "public function book()\n {\n return $this->belongsTo('App\\Book');\n }", "public function model(){\n return 'App\\ObjLibrary';\n }", "public function model()\n {\n return Booking::class;\n }", "public function book()\n {\n return $this->belongsTo(Book::class);\n }", "public function model()\n {\n return BookCategory::class;\n }", "function model()\n {\n return \"App\\\\Daira\";\n }", "public function __construct(){\n parent::__construct();\n $this->authorHasBookModel = $this->model('AuthorHasBook'); \n }", "public function book(){\n return $this.belongsTo(Book::class);\n }", "public function practice20()\n {\n # Get the first book as an example\n $book = Book::first();\n\n# Get the author from this book using the \"author\" dynamic property\n# \"author\" corresponds to the the relationship method defined in the Book model\n $author = $book->author;\n\n# Output\n dump($book->title.' was written by '.$author->first_name.' '.$author->last_name);\n dump($book->toArray());\n }", "public function __construct($dbName = 'nf_test', $modelName = '\\\\Test\\\\Models\\\\Book', $modelAlias = null)\n {\n parent::__construct($dbName, $modelName, $modelAlias);\n }", "private function fullModelName($modelName){\n return \"App\\\\\".$modelName;\n }", "public function run()\n {\n $book = new \\App\\Book([\n 'name' => 'Neural Networks',\n 'author' => 'Thomas Muller',\n 'publication' => 'Pearson Publication',\n 'description' => 'Lorem Ipsum random text',\n ]);\n $book->save();\n\n $book = new \\App\\Book([\n 'name' => 'Neural Networks',\n 'author' => 'Thomas Muller',\n 'publication' => 'Pearson Publication',\n 'description' => 'Lorem Ipsum random text',\n ]);\n $book->save();\n\n $book = new \\App\\Book([\n 'name' => 'Neural Networks',\n 'author' => 'Thomas Muller',\n 'publication' => 'Pearson Publication',\n 'description' => 'Lorem Ipsum random text',\n ]);\n $book->save();\n\n $book = new \\App\\Book([\n 'name' => 'Operating System',\n 'author' => 'Hector B',\n 'publication' => 'Nepal Publication',\n 'description' => 'Lorem Ipsum random text',\n ]);\n $book->save();\n\n $book = new \\App\\Book([\n 'name' => 'Operating System',\n 'author' => 'Hector B',\n 'publication' => 'Nepal Publication',\n 'description' => 'Lorem Ipsum random text',\n ]);\n $book->save();\n\n $book = new \\App\\Book([\n 'name' => 'Operating System',\n 'author' => 'Hector B',\n 'publication' => 'Nepal Publication',\n 'description' => 'Lorem Ipsum random text',\n ]);\n $book->save();\n\n $book = new \\App\\Book([\n 'name' => 'Operating System',\n 'author' => 'Hector B',\n 'publication' => 'Nepal Publication',\n 'description' => 'Lorem Ipsum random text',\n ]);\n $book->save();\n\n $book = new \\App\\Book([\n 'name' => 'Object Oriented Analysis And Design',\n 'author' => 'Hector B',\n 'publication' => 'Nepal Publication',\n 'description' => 'Lorem Ipsum random text',\n ]);\n $book->save();\n\n $book = new \\App\\Book([\n 'name' => 'Object Oriented Analysis And Design',\n 'author' => 'Hector B',\n 'publication' => 'Nepal Publication',\n 'description' => 'Lorem Ipsum random text',\n ]);\n $book->save();\n\n $book = new \\App\\Book([\n 'name' => 'Object Oriented Analysis And Design',\n 'author' => 'Hector B',\n 'publication' => 'Nepal Publication',\n 'description' => 'Lorem Ipsum random text',\n ]);\n $book->save();\n\n $book = new \\App\\Book([\n 'name' => 'Object Oriented Analysis And Design',\n 'author' => 'Hector B',\n 'publication' => 'Nepal Publication',\n 'description' => 'Lorem Ipsum random text',\n ]);\n $book->save();\n }", "public function getName()\n {\n return 'book';\n }", "public function model()\n {\n return Chapter::class;\n }", "public function model()\r\n {\r\n return 'App\\Printer';\r\n }", "function model() {\n return 'App\\OrderBid';\n }", "public function user()\n {\n return $this->belongsTo('App\\Book');\n }", "public function run()\n {\n $book = new Book();\n $book->name = 'Tactical Thinking: 50 Brain-Training Puzzles to Change the Way You Think';\n $book->author = 'Charles Phillips';\n $book->price = 80000;\n $book->category_id = 1;\n $book->avatar = 'abc.jpg';\n $book->status = 'have book';\n $book->save();\n\n $book = new Book();\n $book->name = 'Tactical Thinking: 50 Brain-Training Puzzles to Change the Way You Think';\n $book->author = 'Charles Phillips';\n $book->price = 80.000;\n $book->category_id = 1;\n $book->avatar = 'abc.jpg';\n $book->status = 'out of book';\n $book->save();\n }", "public function practice2()\n {\n //dump(Str::plural('mouse'));\n\n dump(Book::find(3));\n dump(Book::all()->toArray());\n }", "public function __construct() {\n\n $this->model_name = 'App\\\\' . ucfirst($this->category);\n\n }", "public function __construct($dbName = 'my_books_library', $modelName = '\\\\PropelModels\\\\BooksByUser', $modelAlias = null)\n {\n parent::__construct($dbName, $modelName, $modelAlias);\n }", "public function model()\n\t {\n\t\t//set model name in here, this is necessary!\n\t\treturn 'App\\\\Models\\\\Comment';\n\t }", "public function books()\n {\n return $this->hasMany('App\\Book');\n }", "function model()\n {\n return 'App\\Models\\Components\\Hotel';\n }", "private function _findModelName(){\n\t\tif($this->_source==''){\n $this->_source = Utils::uncamelize(get_class($this));\n }\n if($this->_source==''){\n\t\t\t$this->_source = get_class($this);\n\t\t}\n\t}", "function model()\n {\n return 'App\\Convenzione';\n }", "public function model()\n {\n return Bookmark::class;\n }", "public function model()\n {\n return 'App\\Models\\Term';\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public static function model(): string\n {\n return static::$model;\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 function practice17()\n {\n $books = Book::all();\n\n foreach ($books as $book) {\n dump($book->title);\n }\n }", "public static function model($className=__CLASS__) { return parent::model($className); }", "function modelClass(): string\n {\n return Category::class;\n }", "abstract protected function getModelName(): string;", "public function textbook()\n {\n return $this->belongsTo('App\\Models/\\Textbook', 'isbn', 'isbn');\n }", "public function practice4()\n {\n $book = new Book();\n\n # Set the properties\n # Note how each property corresponds to a field in the table\n $book->title = 'Harry Potter and the Sorcerer\\'s Stone';\n $book->author = 'J.K. Rowling';\n $book->published_year = 1997;\n $book->cover_url = 'http://prodimage.images-bn.com/pimages/9780590353427_p0_v1_s484x700.jpg';\n $book->purchase_url = 'http://www.barnesandnoble.com/w/harry-potter-and-the-sorcerers-stone-j-k-rowling/1100036321?ean=9780590353427';\n\n # Invoke the Eloquent `save` method to generate a new row in the\n # `books` table, with the above data\n $book->save();\n\n dump('Added: ' . $book->title);\n }", "function model()\n {\n return 'App\\Entities\\Study';\n }", "public function __construct($model)\n {\n /** @var Model model */\n $this->model = \"App\\\\Models\\\\{$model}\";\n }", "public function model($nome){\r\n\r\n\t\t\t#procura arquivo do model\r\n\t\t\tif(file_exists(\"model/{$nome}.php\")){\r\n\t\t\t\tinclude_once \"model/{$nome}.php\";\r\n\t\t\t} else {\r\n\t\t\t\tdie(\"Model {$nome} não encontrado na pasta modelos\");\r\n\t\t\t}\r\n\r\n\t\t\t#instancia o arquivo caso encontrado\r\n\t\t\t$this->$nome = new $nome();\r\n\t\t}", "public function __construct($dbName = 'default', $modelName = '\\\\Food', $modelAlias = null)\n {\n parent::__construct($dbName, $modelName, $modelAlias);\n }", "public function model()\n {\n return Person::class;\n }", "public function model()\n {\n return \"App\\\\Models\\\\Truemoveh\\\\ProductDeviceInventories\";\n }", "public static function getTableName()\n {\n return 'Books';\n }", "public function model($model = '')\n\t{\n\t\t// mengarah pada folder apps/models/ namamodels.php\n\t\t\n\t\ttry {\n\t\t\tif (!file_exists(_ROOT_MODEL . $model . '.php')) {\n\t\t\t\tthrow new Exception(\"Models \". $model .\" Not Found. Check Controllernya Bro di bagian load modelnya \");\n\t\t\t}\n\n\t\t\trequire_once _ROOT_MODEL . $model . '.php';\n\t\t\treturn new $model;\n\t\t\texit;\n\t\t} catch (Exception $exception) {\n\t\t\t$my_error = new Error_Handling;\n\t\t\t$my_error->showerror_message($exception->getMessage() , $exception->getFile() , $exception->getLine() , $exception->getTraceAsString());\n\t\t\texit;\n\t\t}\n\t}", "public function model() {\n return 'App\\Models\\Customer';\n }", "public static function model($className=__CLASS__) {\n return parent::model($className);\n }", "public function books()\n {\n\t \t return $this->belongsToMany(Book::class);\n }", "public function model();", "public function model();", "function model()\n {\n return 'App\\Models\\FaqCategory';\n }", "abstract public function model();", "abstract public function model();", "abstract public function model();", "abstract public function model();", "public function getModel()\n {\n return \\App\\Student::class;\n }", "public function book(): BelongsTo\n {\n return $this->belongsTo(Book::class)->withTrashed();\n }", "public function __construct($book)\n {\n $this->book = $book;\n }", "public function __construct($book)\n {\n $this->book = $book;\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public function show($book)\n {\n //dd($book);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public function model()\n {\n return Like::class;\n }", "function __autoload($class) {\n $arrPart = explode('\\\\', $class);\n $strClassName = strtolower(end($arrPart));\n require 'model/'. $strClassName. '.php';\n}", "public static function model($className=__CLASS__) {\r\n return parent::model($className);\r\n }", "public function model()\n {\n return Speaker::class;\n }", "public function model()\n {\n //use model\n }", "private static function model()\n {\n $files = ['ORM_', 'CRUD', 'ORM', 'Collection', 'ModelArray'];\n $folder = static::$root.'MVC/Model'.'/';\n\n self::call($files, $folder);\n\n $files = ['ForeingKeyMethodException', 'ColumnNotEmptyException', 'ManyPrimaryKeysException', 'TableNotFoundException', 'ModelNotFoundException', 'PrimaryKeyNotFoundException'];\n $folder = static::$root.'MVC/Model/Exceptions'.'/';\n\n self::call($files, $folder);\n }", "abstract protected function model();", "abstract protected function model();", "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 function model(){\n\t\treturn 'App\\SampleCriteria';\n\t}", "public static function model($className=__CLASS__) \n { \n return parent::model($className); \n }", "public static function model($className=__CLASS__) \n { \n return parent::model($className); \n }", "public function model()\n {\n return 'App\\User';\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public function __construct($dbName = 'aviaco', $modelName = '\\\\Document', $modelAlias = null)\n {\n parent::__construct($dbName, $modelName, $modelAlias);\n }", "public static function model($className=__CLASS__)\r\n {\r\n return parent::model($className);\r\n }", "protected function get_model_name()\n {\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public function createCorrespondingBookModelForSearch() {\n\t\t$searchModel = new Book('search');\n\t\t$searchModel->unsetAttributes();\n\t\t\n\t\t$searchInput = $this->searchInput;\n\t\t\n\t\tif ($searchInput==\"Suggestions\") {\n\t\t\t$searchModel->title = null;\n\t\t} else {\n\t\t\t$searchModel->title = $searchInput;\n\t\t}\n\t\treturn $searchModel;\n\t}", "public function book() {\n return $this->hasOne(Book::class);\n }", "public function model($name){\n\t\treturn new $name();\n\t}", "public function modelName(): string\n {\n return class_basename($this->model);\n }", "abstract function model();", "abstract function model();" ]
[ "0.6795844", "0.65076", "0.6342043", "0.62859106", "0.6202635", "0.61866075", "0.61579686", "0.6147237", "0.6145102", "0.6080602", "0.6078917", "0.5997397", "0.5997323", "0.591618", "0.58688605", "0.5795247", "0.56935096", "0.56911737", "0.5606732", "0.5595873", "0.5573688", "0.5557134", "0.5554411", "0.55457824", "0.55179524", "0.5517462", "0.5500228", "0.54731977", "0.54647106", "0.54632676", "0.5455479", "0.54494005", "0.54494005", "0.54494005", "0.54494005", "0.54494005", "0.54494005", "0.54494005", "0.54494005", "0.54494005", "0.54494005", "0.54494005", "0.5442942", "0.54326516", "0.54326516", "0.5432006", "0.54175204", "0.5406108", "0.5405131", "0.5373763", "0.5372155", "0.53649807", "0.53642523", "0.53641", "0.5360337", "0.53572685", "0.5356108", "0.53526384", "0.5347688", "0.53342736", "0.5330629", "0.53296924", "0.5324008", "0.5324008", "0.53234184", "0.53227055", "0.53227055", "0.53227055", "0.53227055", "0.5322395", "0.5316841", "0.53096825", "0.53096825", "0.5306866", "0.5301528", "0.5293331", "0.52909255", "0.52860993", "0.52831906", "0.52776825", "0.5277556", "0.527588", "0.5274903", "0.5274903", "0.5269475", "0.5269475", "0.5237523", "0.52373266", "0.52373266", "0.52367455", "0.5231203", "0.5229814", "0.5228169", "0.5217608", "0.5217149", "0.52104133", "0.5210084", "0.52097297", "0.5208889", "0.52070737", "0.52070737" ]
0.0
-1
Practice from notes on Models: Find any books by the author Bell Hooks and update the author name to be bell hooks (lowercase).
public function getEx13() { # Approach # 1 # Get all the books that match the criteria $books = \App\Book::where('author','=','Bell Hooks')->get(); # Loop through each book and update them foreach($books as $book) { $book->author = 'bell hooks'; $book->save(); } # Resulting SQL: # Always: # 1) select * from `books` where `author` = 'Bell Hooks' # Only if there's something to update: # 2) update `books` set `updated_at` = '2016-04-12 18:46:04', `author` = 'bell hooks' where `id` = '8' # Approach #2 \App\Book::where('author', '=', 'Bell Hooks')->update(['author' => 'bell hooks']); # Resulting SQL: # Always: # 1) update `books` set `author` = 'bell hooks', `updated_at` = '2016-04-12 18:44:46' where `author` = 'Bell Hooks' return '"Bell Hooks" => "bell hooks"'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEx6() {\n # First get a book to update\n $book = \\App\\Book::where('author', 'LIKE', '%Scott%')->first();\n # If we found the book, update it\n if($book) {\n # Give it a different title\n $book->title = 'The Really Great Gatsby';\n # Save the changes\n $book->save();\n echo \"Update complete; check the database to see if your update worked...\";\n }\n else {\n echo \"Book not found, can't update.\";\n }\n }", "public function getAuthorname() {}", "public function updateBookTag()\n {\n\t\tif (intval($this->type_flag) === ENTRY_TYPE_BOOK)\n\t\t{\n\t\t\t// non-book may have been changed to book\n\t\t\t$this->addBookTag();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// in case book was changed to non-book\n\t\t\t$this->removeBookTag();\n\t\t}\n\t}", "public function afterFind(){\n if (Yii::$app->request->getIsPut())\n return;\n\n // else return friendly format to frontend\n $authors = explode(',', $this->authors);\n $this->authors = $authors;\n }", "private function getBooksByAuthor(array $args = []): BookCollection\n {\n// if (empty($args['author'])) {\n return new BookCollection();\n/* }\n\n $firstName = (empty($args['author']['firstName']) ? '' : $args['author']['firstName']);\n $lastName = (empty($args['author']['lastName']) ? '' : $args['author']['lastName']);\n\n try {\n $bookModel = new BookModel($this->container);\n } catch (\\Exception $e) {\n return new BookCollection();\n }\n\n return $bookModel->findBooksByAuthor($lastName, $firstName); */\n }", "function getAllBooksFromAuthor()\n\t{\n\t\tglobal $conn;\n\t\tglobal $myObj;\n\t\tglobal $params_arr;\n\n\t\t$authorName = $params_arr[0];\n\n\t\t$sql = \"SET @AUTHOR_NAME = '$authorName';\";\n\n\t\tif ($conn->query($sql) === TRUE) \n\t\t{\n\t\t\t//echo \"New record created successfully\";\n\t\t} \n\t\telse \n\t\t{\n\t\t\techo \"Error: \" . $sql . \"<br>\" . $conn->error;\n\t\t}\n\n\t\t$sql = \"SELECT books.COVER, books.TITLE, books.GENRE, books.PUBLISHER, books.PUB_DATE, books.DESCRIPTION,\n\t\t\t\t\t authors.FIRST_NAME, authors.LAST_NAME, authors.BIO, books.ISBN\n\t\t\t\tFROM books\n\t\t\t\tJOIN authors ON books.AUTHOR = authors.ID\n\t\t\t\tWHERE concat(AUTHORS.FIRST_NAME, ' ', AUTHORS.LAST_NAME) = @AUTHOR_NAME;\";\n\n\n\n\t\t//Executes query string\n\t\t$result = $conn->query($sql);\n\t\tif ($result->num_rows > 0) \n\t\t{\n\t\t\t$json = array();\n\t \t// convert the data into json object\n\t \twhile($row = $result->fetch_assoc()) \n\t \t{\n\t\t\t\t$bus = array(\n\t\t\t\t\t\"cover\" => $row[\"COVER\"],\n\t\t\t\t\t\"title\" => $row[\"TITLE\"],\n\t\t\t\t\t\"author\" => $row[\"FIRST_NAME\"]. \" \" .$row[\"LAST_NAME\"],\n\t\t\t\t\t\"genre\" => $row[\"GENRE\"],\n\t\t\t\t\t\"publisher\" => $row[\"PUBLISHER\"],\n\t\t\t\t\t\"pub_date\" => $row[\"PUB_DATE\"],\n\t\t\t\t\t\"description\" => $row[\"DESCRIPTION\"],\n\t\t\t\t\t\"bio\" => $row[\"BIO\"],\n\t\t\t\t\t\"isbn\" => $row[\"ISBN\"]\n\t\t\t\t);\n\n\t\t\t\tarray_push($json, $bus);\n\t\t\t\t\n\t\t\t}\n\n\t\t\t$jsonstring = json_encode($json);\n\t\t\techo $jsonstring;\n\t\t}\n\t\telse\n\t\t{\n\t\t echo \"0 results\";\n\t\t}\n\n\n\t\t$conn->close();\n\t}", "protected function _syncAuthor() {}", "public function modifyBook($book) {\n\n if ($this-> validInput($book) == true) {\n\n $stmt = $this->db-> prepare(\"UPDATE book set title = :title, \n author = :author, \n description = :description \n WHERE id = :id\");\n\n $stmt-> bindValue(':id', $book->id);\n $stmt-> bindValue(':title', $book->title);\n $stmt-> bindValue(':author', $book->author);\n $stmt-> bindValue(':description', $book->description);\n\n $stmt-> execute();\n\n }\n else {\n\n $this-> gracefulErrorPage();\n return false;\n }\n }", "abstract public function getAuthor();", "function GetAuthor()\n {\n return 'calguy1000';\n }", "function the_author_aim()\n {\n }", "function get_the_author_aim()\n {\n }", "public function getAuthor() {}", "public function titleDetailsOpds($book);", "public function getAuthor();", "public function getAuthor();", "public function getAuthor();", "public function testUpdateAuthor() {\n $this->put('/api/author/3',\n ['first_name' => 'Karim'] )\n ->seeJson(['first_name' => 'Karim']);\n }", "public function getBookAuthor()\n {\n return $this->author;\n }", "public function titleDetailsFilteredOpds($books);", "public function author();", "public function updateBook()\n\t{\n\t\tif (cookie('staffAccount') != '') {\n\t\t\t$ISBN = $_POST['ISBN'];\n\t\t\t$title = $_POST['title'];\n\t\t\t$author = $_POST['author'];\n\t\t\t$press = $_POST['press'];\n\t\t\t$category = $_POST['category'];\n\t\t\t$pub_date = $_POST['pub_date'];\n\t\t\t$price = $_POST['price'];\n\t\t\t$floor = $_POST['floor'];\n\t\t\t$bookshelf = $_POST['bookshelf'];\n\t\t\t$area_code = $_POST['area_code'];\n\n\t\t\t$book = D('Book_species');\n\t\t\t$sql = \"update lib_book_species set title = '{$title}',author='{$author}',press='{$press}',\n\t\t\t\t \tcategory='{$category}',pub_date='{$pub_date}',price='{$price}',\n\t\t\t\t \tfloor='{$floor}',bookshelf='{$bookshelf}',area_code='{$area_code}'\n\t\t\t\t \twhere isbn = '{$ISBN}'\";\n\t\t\t$return = $book->execute($sql);\n\n\t\t\tif ($return) {\n\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t'code' => 'success',\n\t\t\t\t\t'msg' => 'Modify successfully!'\n\t\t\t\t));\n\t\t\t\techo $json;\n\t\t\t} else {\n\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t'code' => 'fail',\n\t\t\t\t\t'msg' => 'SQL Error!'\n\t\t\t\t));\n\t\t\t\techo $json;\n\t\t\t}\n\t\t} else {\n\t\t\t$json = json_encode(array(\n\t\t\t\t'code' => 'fail',\n\t\t\t\t'msg' => 'Please Login!'\n\t\t\t));\n\t\t\techo $json;\n\t\t}\n\t}", "function the_modified_author()\n {\n }", "public function getEx3() {\n # Use the QueryBuilder to get all the books where author is like \"%Scott%\"\n $books = \\DB::table('books')->where('author', 'LIKE', '%Scott%')->get();\n # Output the results\n $this->printBooks($books);\n }", "public function indexalpha_author()\n {\n\t$books = Book::where('id','>','0')->orderBy('name', 'asc')->get();\n\t$books=$books->sortBy(function ($book) {\n\t return ($author = $book->first_author()) ? $author->surname : null;\n\t });\n\n\t$booksalpha=array();\n\tforeach ($books as $book) {\n\t\t$author=$book->first_author();\n\t\t$firstletter=\"\";\n\t\tif ($author!=null) $firstletter=mb_substr(trim($author->surname),0,1);\n\t\t$firstletter.=\"...\";\n\t\tif (!isset($booksalpha[$firstletter])) $booksalpha[$firstletter]=array();\n\t\t$booksalpha[$firstletter][]=$book;\n\t}\n\treturn view('library.books.booksalpha')->with('booksalpha', $booksalpha);\n }", "public function getBookName()\n {\n return $this->book_name;\n }", "public function authors_book()\n {\n return $this->morphTo();\n }", "public function authorsInitials();", "public function get_book();", "public function addBookAndAuthor()\n {\n if (($params = $this->checkVarForAdding()) && $this->saveImage()) {\n if (USE_ONE_TABLE) {\n $sql = 'INSERT INTO `books_authors` (`book_name`, `author`, `year`, `num_pages`, `about_book`, `image`)\n VALUES (?, ?, ?, \"253\", ?, ?)';\n $this->findBySql($sql, $params);\n } else {\n $this->addAuthor($params['authors']);\n $this->addBook($params['book']);\n $this->addRelations($params['book'][0], $params['authors']);\n }\n }\n }", "public function processBooks()\n\t{\n\t\tif ($this->site->lookupbooks !== '0') {\n\t\t\t$books = new Books($this->echooutput);\n\t\t\t$books->processBookReleases();\n\t\t}\n\t}", "public static function get_all_books() {\n\t\t$books = BooksQModel::get_all_books();\n\n\t\tforeach ($books as $book) {\n\t\t\t//shorted description\n\t\t\tif (strlen($book->description) >= 122)\n\t\t\t\t$book->description = mb_substr($book->description, 0, 120).'...';\n\t\t\t//get uploader\n\t\t\t$uploader = UsersQModel::get_user_by_id($book->id_uploader);\n\t\t\tif ($uploader != null)\n\t\t\t\t$book->uploader = $uploader->name;\n\t\t\telse\n\t\t\t\t$book->uploader = 'Đang cập nhật';\n\t\t}\n\n\t\treturn $books;\n\t}", "public function get_authors();", "function test_updateName()\n {\n //Arrange\n $title = \"Whimsical Fairytales...and other stories\";\n $genre = \"Fantasy\";\n $test_book = new Book($title, $genre);\n $test_book->save();\n\n $column_to_update = \"title\";\n $new_info = \"Generic Fantasy Novel\";\n\n //Act\n $test_book->update($column_to_update, $new_info);\n\n //Assert\n $result = Book::getAll();\n $this->assertEquals(\"Generic Fantasy Novel\", $result[0]->getTitle());\n }", "function the_author_firstname()\n {\n }", "public function getBook()\n\t{\n\t\treturn $this->getKeyValue('book'); \n\n\t}", "public function getBookAuthors() {\n return $this->hasMany(BookAuthor::className(), ['book_id' => 'id']);\n }", "public function get_author()\n {\n return 'Kamen Blaginov';\n }", "public function get_author()\n {\n return 'Kamen Blaginov';\n }", "public static function update_book($book) {\n\t\t$id = $book->id;\n\t\t$data_book = [\n\t\t\t'other_name'\t=> $book->other_name,\n\t\t\t'release_at'\t=> $book->release_at,\n\t\t\t'description'\t=> $book->description,\n\t\t\t'status'\t\t=> $book->status,\n\t\t\t'id_author'\t\t=> $book->id_author,\n\t\t\t'id_artist'\t\t=> $book->id_artist,\n\t\t\t'id_uploader'\t=> $book->id_uploader\n\t\t];\n\t\t//update book\n\t\tBooksCModel::update_book($id, $data_book);\n\n\t\t//update book category\n\t\tBooksCategoryCModel::delete_book_category_by_book_id($id);\n\t\t$categories = [];\n\t\tforeach ($book->categories as $key => $category) {\n\t\t\t$categories[$key] = [\n\t\t\t\t'id_book'\t\t=> $id,\n\t\t\t\t'id_category'\t=> $category\n\t\t\t];\n\t\t\tBooksCategoryCModel::insert_book_category($categories[$key]);\n\t\t}\n\n\t\t//update book character\n\t\tBooksCharacterCModel::delete_book_character_by_book_id($id);\n\t\t$characters = [];\n\t\tforeach ($book->characters as $key => $character) {\n\t\t\t$characters[$key] = [\n\t\t\t\t'id_book'\t\t=> $id,\n\t\t\t\t'id_character'\t=> $character\n\t\t\t];\n\t\t\tBooksCharacterCModel::insert_book_character($characters[$key]);\n\t\t}\n\t}", "function chgBook($id,$name, $langt, $author, $langa, $type)\n{\n $conn = mysqli_connect(constant(\"DBSERVER\"),constant(\"DBUSER\"),constant(\"DBPASSWORD\"));\n $db_selected = mysqli_select_db($conn,MYDB);\n if (!$db_selected)\n {\n exit('Error open '.MYDB.' : ' .mysqli_error($conn));\t\t\n }\n $names = array($author,$name);\n $langs = array($langa,$langt);\n $str = '';\n for ($i=0; $i < count($GLOBALS['MYFIELDS']); $i++)\n {\n $str .= $GLOBALS['MYFIELDS'][$i].\"='\".$names[$i].\"',\";\n }\n for ($i=0; $i < count($GLOBALS['MYLANGFIELDS']); $i++)\n {\n $str .= $GLOBALS['MYLANGFIELDS'][$i].\"='\".$langs[$i].\"',\";\n }\n $str .= $GLOBALS['MYNOLANGFIELDS'][0].\"='\".$type.\"'\";\n if (!mysqli_query($conn,\"UPDATE \".MYTABLE.\" SET \".$str.\" WHERE id=$id;\"))\n exit(\"Error \".$str.\"<br>\");\n \n echo $id;\n}", "function get_the_modified_author()\n {\n }", "public function getBookauthors()\n {\n return $this->hasMany(Bookauthor::className(), ['bookId' => 'bookId']);\n }", "private function getAmazonTitleAuthor($isbn){\n\t\t$searchIndex = 'Books';\n\t\t$responseGroup = 'ItemAttributes';\n\n\t\t$params = array(\n\t\t\t'IdType'\t=>\t'ISBN',\n\t\t\t'ItemId' \t=>\t(string)$isbn, \n\t\t);\n\n\t\t$lookupObject = new AmazonSearch($searchIndex, $params, $responseGroup, SearchType::ITEM_LOOKUP); // Create a new AmazonSearch\n\t\t$attempt = $lookupObject->execute(); // Execute the object to make the api call and pull results\n\n\t\tif ($attempt == false){\n\t\t return false; // If the search could not be performed, the object returns false.\n\t\t}\n\t\t$firstMatchedItem = $lookupObject->get_item_data(1); // Returns an associative array of information about the first results amazon returned\n\t\t$itemAttributes = $firstMatchedItem['attributes'];\n\t\tif (!array_key_exists('Title', $itemAttributes) || !array_key_exists('Author', $itemAttributes)){\n\t \t\tthrow new Exception(sprintf(\"BookHandler.class.php: %d => No Title/Author found from Amazon for ISBN: %s\\nAmazon API Call:\\t%s\",\n __LINE__, \n $isbn, \n $lookupObject->get_api_url()\n )); \n\t\t}\n\t\t$title = $itemAttributes['Title']; \t// Get the Title\n\t\t$author = $itemAttributes['Author'];\t\t// \tGet the Author\n\n\t\t$toReturn = array(\n\t\t\t'title' \t=> \t$title,\n\t\t\t'author' \t=> \t$author\n\t\t);\n\n\t\treturn $toReturn;\n\t}", "function getAuthorsName(int $articleAuthorId, array $authors) : string { \n foreach ($authors as $author) {\n if ($author['id'] === $articleAuthorId) {\n $name = $author['full_name'];\n }\n }\nreturn $name;\n}", "public function edit()\n {\n $user_id = Auth::user()->id;\n $data = INPUT::all();\n $rules = $this->rules();\n $messages = $this->messages();\n $validator = Validator::make($data, $rules, $messages);\n if (!$validator->fails()) {\n $book = Book::find($data['id']);\n $book->title = $data['title'];\n $book->subtitle = $data['subtitle'];\n $book->publishedDate = $data['publishedDate'];\n $book->description = $data['description'];\n $book->pages = $data['pages'];\n $book->isbn10 = $data['isbn10'];\n $book->isbn13 = $data['isbn13'];\n $book->price_day = $data['price_day'];\n $book->price_bail = $data['price_bail'];\n $book->price_sale = $data['price_sale'];\n $book->language = $data['language'];\n\n if ($data['publisher'] != $book->id_publisher) {\n if ($data['publisher'] != '0') {\n $book->id_publisher = $data['publisher'];\n } else {\n $publisher = new Publisher;\n $publisher->publisher = $data['newpublisher'];\n $publisher->save();\n $book->id_publisher = $publisher->id;\n }\n }\n\n if (isset($data['cover'])) {\n $book->cover = file_get_contents($data['cover']);\n }\n\n $book_id = $book->id;\n Book_Collection::where('book_id', $book_id)->delete();\n Author_Book::where('book_id', $book_id)->delete();\n\n $book_collection = new Book_Collection;\n $book_collection->book_id = $book_id;\n $book_collection->collection_id = $data['collection'];\n\n $authors = explode(',', $data['authors']);\n foreach ($authors as $author) {\n $tmp = Author::where('name', 'like', $author)->limit(1)->get();\n if (count($tmp) > 0) {\n $author_book = new Author_Book;\n $author_book->book_id = $book_id;\n $author_book->author_id = $tmp[0]->id;\n $author_book->save();\n } else {\n $newAuthor = new Author;\n $newAuthor->name = $author;\n $newAuthor->save();\n $author_id = $newAuthor->id;\n $author_book = new Author_Book;\n $author_book->book_id = $book_id;\n $author_book->author_id = $author_id;\n $author_book->save();\n }\n }\n $book->save();\n return redirect('book/edit/' . $book_id . '');\n }\n return back()->withInput($data)->withErrors($validator);\n }", "public function practice6()\n {\n $book = Book::where('author', '=', 'F. Scott Fitzgerald')->first();\n\n if (!$book) {\n dump(\"Book not found, can't update.\");\n } else {\n # Change some properties\n $book->title = 'The Really Great Gatsby';\n $book->published_year = '2025';\n\n # Save the changes\n $book->save();\n\n dump('Update complete; check the database to confirm the update worked.');\n }\n }", "public function getAuthorcompany() {}", "function getAuthorBooks($conn,$first_name, $last_name) {\n $author_books = \"SELECT title FROM audio_book INNER JOIN writes ON audio_book.ISBN = writes.ISBN AND writes.author_id IN (\n SELECT author_id FROM author WHERE first_name = '$first_name' AND last_name = '$last_name')\";\n $result = mysqli_query($conn, $author_books);\n if(mysqli_num_rows($result) > 0) {\n return $result;\n } else {\n echo 'Nothing author books<br>';\n exit;\n }\n }", "public function getBook($author, $book){\n if(empty($author) && empty($book))\n return $this->getAllBooks();\n else{\n $query =\"SELECT * FROM Book\n WHERE MATCH (authorName, bookName)\n AGAINST ('+{$author}' '+{$book}' WITH QUERY EXPANSION);\";\n return $this->getBookDetail($query);\n }\n }", "public function get_author()\n {\n return 'Chris Graham';\n }", "public function get_author()\n {\n return 'Chris Graham';\n }", "public function get_author()\n {\n return 'Chris Graham';\n }", "public function get_author()\n {\n return 'Chris Graham';\n }", "public function get_author()\n {\n return 'Chris Graham';\n }", "public function get_author()\n {\n return 'Chris Graham';\n }", "public function practice19()\n {\n $author = Author::where('first_name', '=', 'J.K.')->first();\n\n $book = new Book;\n $book->title = \"Fantastic Beasts and Where to Find Them\";\n $book->published_year = 2017;\n $book->cover_url = 'http://prodimage.images-bn.com/pimages/9781338132311_p0_v2_s192x300.jpg';\n $book->purchase_url = 'http://www.barnesandnoble.com/w/fantastic-beasts-and-where-to-find-them-j-k-rowling/1004478855';\n $book->author()->associate($author); # <--- Associate the author with this book\n #This is the same:\n #$book->author_id = $author->id;\n $book->save();\n dump($book->toArray());\n }", "public function testGetAllBooksFromAuthor()\n {\n $author_actions = new AuthorsActions();\n\n $response = $author_actions->handleGetBooksFromAuthorAction(['name' => 'terry_pratchett'], []);\n\n self::assertEquals(RestResponse::STATUS_OK, $response->getCode());\n self::assertEquals(3, count($response->getData()));\n }", "public function searchBook(string $bookName)\n {\n }", "public function update_author($old_author, $author, $tab) {\n global $pdo;\n $query = $pdo->prepare(\"UPDATE $tab SET author = ? WHERE author = ?\");\n $query->bindValue(1, $author);\n $query->bindValue(2, $old_author);\n $query->execute();\n }", "function getSimilarAuthors($author) {\r\n $userlogin = getUserLogin();\r\n if ($userlogin->getPreference('similar_author_test')=='il') \r\n {\r\n //appendMessage('il');\r\n return $this->getSimilarAuthors2($author); //on initial lastname \"il\" \r\n }\r\n else\r\n {\r\n //appendMessage('c');\r\n return $this->getSimilarAuthors1($author); //on cleanname \"c\"\r\n }\r\n \r\n }", "public function searchAuthor($author) {\n try {\n // escape quotes\n $checkAuthor = str_replace(\"'\", \"''\", $author);\n // search the database, using wildcards\n $sql = \"SELECT * FROM books WHERE author LIKE '%$checkAuthor%' ORDER BY title\";\n $stmt = $this->conn->query($sql);\n \n // fetch as numeric array\n $result = $stmt->setFetchMode(PDO::FETCH_NUM);\n \n // show results in a list of update forms\n echo \"<br /><div id='searchResult'><h3>Author: $author</h3><ul>\";\n while ($row = $stmt->fetch()) {\n // call result form function\n $this->echoResultForm($row);\n }\n echo \"</ul></div>\";\n }\n catch(PDOException $e) {\n echo $e->getMessage();\n }\n }", "public function run()\n {\n DB::table('books')->insert(\n [\n // Suzanne Collins\n [\n 'author_id' => 1,\n 'title' => \"Gregor the Overlander\",\n 'isbn' => \"9780439678131\",\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 [\n 'author_id' => 1,\n 'title' => \"Gregor and the Prophecy of Bane\",\n 'isbn' => \"9780439650762\",\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 [\n 'author_id' => 1,\n 'title' => \"Gregor and the Curse of the Warmbloods\",\n 'isbn' => \"9780439656245\",\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 [\n 'author_id' => 1,\n 'title' => \"Gregor and the Marks of Secret\",\n 'isbn' => \"9780439791465\",\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 [\n 'author_id' => 1,\n 'title' => \"Gregor and the Code of Claw\",\n 'isbn' => \"9780439791441\",\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 [\n 'author_id' => 1,\n 'title' => \"The Hunger Games\",\n 'isbn' => \"9780439023528\",\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 [\n 'author_id' => 1,\n 'title' => \"Catching Fire\",\n 'isbn' => \"9780545227247\",\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 [\n 'author_id' => 1,\n 'title' => \"Mockingjay\",\n 'isbn' => \"9780439023511\",\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\n // Anne McCaffrey\n [\n 'author_id' => 2,\n 'title' => \"Dragonflight\",\n 'isbn' => \"9780345335463\",\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 [\n 'author_id' => 2,\n 'title' => \"Dragonquest\",\n 'isbn' => \"9780345022455\",\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 [\n 'author_id' => 2,\n 'title' => \"The White Dragon\",\n 'isbn' => \"9780345275677\",\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 [\n 'author_id' => 2,\n 'title' => \"Dragonsong\",\n 'isbn' => \"9780689305078\",\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 [\n 'author_id' => 2,\n 'title' => \"Dragonsinger\",\n 'isbn' => \"9780689305702\",\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 [\n 'author_id' => 2,\n 'title' => \"Dragondrums\",\n 'isbn' => \"9780689306853\",\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\n // Peter F. Hamilton\n [\n 'author_id' => 3,\n 'title' => \"Mindstar Rising\",\n 'isbn' => \"9780330537742\",\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 [\n 'author_id' => 3,\n 'title' => \"A Quantum Murder\",\n 'isbn' => \"9780330537759\",\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 [\n 'author_id' => 3,\n 'title' => \"The Nano Flower\",\n 'isbn' => \"9780330537810\",\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 [\n 'author_id' => 3,\n 'title' => \"The Reality Dysfunction\",\n 'isbn' => \"9781447208570\",\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 [\n 'author_id' => 3,\n 'title' => \"The Neutronium Alchemist\",\n 'isbn' => \"9781447208587\",\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 [\n 'author_id' => 3,\n 'title' => \"The Naked God\",\n 'isbn' => \"9781447208594\",\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 [\n 'author_id' => 3,\n 'title' => \"Misspent Youth\",\n 'isbn' => \"9781447224082\",\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 [\n 'author_id' => 3,\n 'title' => \"Pandora's Star\",\n 'isbn' => \"9781447279662\",\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 [\n 'author_id' => 3,\n 'title' => \"Judas Unchained\",\n 'isbn' => \"9781447279679\",\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 [\n 'author_id' => 3,\n 'title' => \"The Dreaming Void\",\n 'isbn' => \"9781447208563\",\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 [\n 'author_id' => 3,\n 'title' => \"The Temporal Void\",\n 'isbn' => \"9780330507882\",\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 [\n 'author_id' => 3,\n 'title' => \"The Evolutionary Void\",\n 'isbn' => \"9780330443173\",\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 [\n 'author_id' => 3,\n 'title' => \"The Abyss Beyond Dreams\",\n 'isbn' => \"9780230769465\",\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\n // J. K. Rowling\n [\n 'author_id' => 4,\n 'title' => \"Harry Potter and the Philosopher's Stone\",\n 'isbn' => \"0747532699\",\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 [\n 'author_id' => 4,\n 'title' => \"Harry Potter and the Chamber of Secrets\",\n 'isbn' => \"0747538492\",\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 [\n 'author_id' => 4,\n 'title' => \"Harry Potter and the Prisoner of Azkaban\",\n 'isbn' => \"0747542155\",\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 [\n 'author_id' => 4,\n 'title' => \"Harry Potter and the Goblet of Fire\",\n 'isbn' => \"074754624X\",\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 [\n 'author_id' => 4,\n 'title' => \"Harry Potter and the Order of the Phoenix\",\n 'isbn' => \"0747551006\",\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 [\n 'author_id' => 4,\n 'title' => \"Harry Potter and the Half-Blood Prince\",\n 'isbn' => \"0747581088\",\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 [\n 'author_id' => 4,\n 'title' => \"Harry Potter and the Deathly Hallows\",\n 'isbn' => \"0545010225\",\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\n // Ursula Le Guin\n [\n 'author_id' => 5,\n 'title' => \"A Wizard of Earthsea\",\n 'isbn' => \"0395276535\",\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 [\n 'author_id' => 5,\n 'title' => \"The Tombs of Atuan\",\n 'isbn' => \"187470323X\",\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 [\n 'author_id' => 5,\n 'title' => \"The Farthest Shore\",\n 'isbn' => \"0689300549\",\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 [\n 'author_id' => 5,\n 'title' => \"Tehanu\",\n 'isbn' => \"0689315953\",\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 [\n 'author_id' => 5,\n 'title' => \"Tales from Earthsea\",\n 'isbn' => \"0151005613\",\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 [\n 'author_id' => 5,\n 'title' => \"The Other Wind\",\n 'isbn' => \"0151006849\",\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 [\n 'author_id' => 5,\n 'title' => \"The Dispossessed\",\n 'isbn' => \"0060125632\",\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 [\n 'author_id' => 5,\n 'title' => \"The Word for World Is Forest\",\n 'isbn' => \"0399117164\",\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 [\n 'author_id' => 5,\n 'title' => \"Rocannon's World\",\n 'isbn' => \"0824014243\",\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 [\n 'author_id' => 5,\n 'title' => \"Planet of Exile\",\n 'isbn' => \"0575025956\",\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 [\n 'author_id' => 5,\n 'title' => \"City of Illusions\",\n 'isbn' => \"0575007583\",\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 [\n 'author_id' => 5,\n 'title' => \"The Left Hand of Darkness\",\n 'isbn' => \"0441478123\",\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 [\n 'author_id' => 5,\n 'title' => \"The Telling\",\n 'isbn' => \"0151005672\",\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 [\n 'author_id' => 5,\n 'title' => \"The Lathe of Heaven\",\n 'isbn' => \"0684125293\",\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 [\n 'author_id' => 5,\n 'title' => \"The Wind's Twelve Quarters\",\n 'isbn' => \"0060125624\",\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 [\n 'author_id' => 5,\n 'title' => \"Orsinian Tales\",\n 'isbn' => \"0060125616\",\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\n // Terry Pratchett\n [\n 'author_id' => 6,\n 'title' => \"The Colour of Magic\",\n 'isbn' => \"086140324X\",\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 [\n 'author_id' => 6,\n 'title' => \"The Light Fantastic\",\n 'isbn' => \"0861402030\",\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 [\n 'author_id' => 6,\n 'title' => \"Equal Rites\",\n 'isbn' => \"0575039507\",\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 [\n 'author_id' => 6,\n 'title' => \"Mort\",\n 'isbn' => \"0575041714\",\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 [\n 'author_id' => 6,\n 'title' => \"Sourcery\",\n 'isbn' => \"0575042176\",\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 [\n 'author_id' => 6,\n 'title' => \"Wyrd Sisters\",\n 'isbn' => \"0575043636\",\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 [\n 'author_id' => 6,\n 'title' => \"Pyramids\",\n 'isbn' => \"0575044632\",\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 [\n 'author_id' => 6,\n 'title' => \"Guards! Guards!\",\n 'isbn' => \"0575046066\",\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 [\n 'author_id' => 6,\n 'title' => \"Eric\",\n 'isbn' => \"0575051914\",\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 [\n 'author_id' => 6,\n 'title' => \"Moving Pictures\",\n 'isbn' => \"0575047631\",\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 [\n 'author_id' => 6,\n 'title' => \"Reaper Man\",\n 'isbn' => \"0575049790\",\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 [\n 'author_id' => 6,\n 'title' => \"Witches Abroad\",\n 'isbn' => \"0575049804\",\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 [\n 'author_id' => 6,\n 'title' => \"Small Gods\",\n 'isbn' => \"0060177500\",\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 [\n 'author_id' => 6,\n 'title' => \"Lords and Ladies\",\n 'isbn' => \"0575052236\",\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 [\n 'author_id' => 6,\n 'title' => \"Men At Arms\",\n 'isbn' => \"0575055030\",\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 [\n 'author_id' => 6,\n 'title' => \"Soul Music\",\n 'isbn' => \"0575055049\",\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 [\n 'author_id' => 6,\n 'title' => \"Interesting Times\",\n 'isbn' => \"0575058005\",\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 [\n 'author_id' => 6,\n 'title' => \"Maskerade\",\n 'isbn' => \"0575058080\",\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 [\n 'author_id' => 6,\n 'title' => \"Feet of Clay\",\n 'isbn' => \"0575059001\",\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 [\n 'author_id' => 6,\n 'title' => \"Hogfather\",\n 'isbn' => \"057506403X\",\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 [\n 'author_id' => 6,\n 'title' => \"Jingo\",\n 'isbn' => \"0575065400\",\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 [\n 'author_id' => 6,\n 'title' => \"The Last Continent\",\n 'isbn' => \"0385409893\",\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 [\n 'author_id' => 6,\n 'title' => \"Carpe Jugulum\",\n 'isbn' => \"0385409923\",\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 [\n 'author_id' => 6,\n 'title' => \"The Fifth Elephant\",\n 'isbn' => \"0385409958\",\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 [\n 'author_id' => 6,\n 'title' => \"The Truth\",\n 'isbn' => \"0385601026\",\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 [\n 'author_id' => 6,\n 'title' => \"Thief of Time\",\n 'isbn' => \"0060199563\",\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 [\n 'author_id' => 6,\n 'title' => \"The Last Hero\",\n 'isbn' => \"057506885X\",\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 [\n 'author_id' => 6,\n 'title' => \"The Amazing Murice and his Educated Rodents\",\n 'isbn' => \"0385601239\",\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 [\n 'author_id' => 6,\n 'title' => \"Night Watch\",\n 'isbn' => \"0385602642\",\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 [\n 'author_id' => 6,\n 'title' => \"The Wee Free Men\",\n 'isbn' => \"0385605331\",\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 [\n 'author_id' => 6,\n 'title' => \"Monstrous Regiment\",\n 'isbn' => \"0385603401\",\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 [\n 'author_id' => 6,\n 'title' => \"A Hat Full of Sky\",\n 'isbn' => \"0385607369\",\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 [\n 'author_id' => 6,\n 'title' => \"Going Postal\",\n 'isbn' => \"0385603428\",\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 [\n 'author_id' => 6,\n 'title' => \"Thud!\",\n 'isbn' => \"0385608675\",\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 [\n 'author_id' => 6,\n 'title' => \"Wintersmith\",\n 'isbn' => \"0385609841\",\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 [\n 'author_id' => 6,\n 'title' => \"Making Money\",\n 'isbn' => \"0385611013\",\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 [\n 'author_id' => 6,\n 'title' => \"Unseen Academicals\",\n 'isbn' => \"0385609345\",\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 [\n 'author_id' => 6,\n 'title' => \"I Shall Wear Midnight\",\n 'isbn' => \"0385611072\",\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 [\n 'author_id' => 6,\n 'title' => \"Snuff\",\n 'isbn' => \"9780385619264\",\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 [\n 'author_id' => 6,\n 'title' => \"Raising Steam\",\n 'isbn' => \"9780857522276\",\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 [\n 'author_id' => 6,\n 'title' => \"The Shepherd's Crown\",\n 'isbn' => \"9780857534811\",\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 ]\n );\n }", "public function getBookTitle()\n {\n return $this->book->book_title;\n }", "public function change_author($user_id,$song_id,$new_author){\r\n //0-\r\n //1-\r\n //2-\r\n //3-\r\n\r\n $ans=mysql_query(\"SELECT song_change_author(\".$user_id.\",\".$song_id.\",\".$new_author.\");\",$this->get_connection());\r\n $ans=mysql_fetch_row($ans);\r\n\r\n if($ans[0]==0){\r\n return TRUE;\r\n }elseif($ans[0]==1){\r\n $this->set_status('SONG_EXIST');\r\n return FALSE;\r\n }\r\n }", "function GetAuthor()\n {\n return 'texus';\n }", "public function practice17()\n {\n $books = Book::all();\n\n foreach ($books as $book) {\n dump($book->title);\n }\n }", "function the_author_lastname()\n {\n }", "public function customAuthors() {\n $query = \"SELECT a.*\n FROM authors a, books b, author_book ab\n WHERE b.id = ab.book_id\n AND a.id = ab.author_id\n AND b.id = :id;\";\n $query = DB::select(DB::raw($query), ['id' => $this->id]);\n return Author::hydrate($query);\n }", "public function run()\n {\n $book = [\n [\n 'book_name' => 'Wikipedia',\n 'description' => 'Sint commodo veniam ad cillum occaecat aute consectetur Lorem. Occaecat adipisicing est ad do tempor ipsum. Eu eiusmod proident sit amet consectetur irure sunt consequat. Dolor anim nisi consequat nulla veniam magna duis ex aliquip veniam.',\n 'img' => '.\\public\\wiki.jpg',\n 'author_id' => '2',\n ],\n [\n 'book_name' => 'Qui commodo',\n 'description' => 'Et occaecat in ut pariatur elit qui. Enim do consectetur velit sunt minim velit eu est. Laboris cillum eiusmod ex aliquip. Voluptate in reprehenderit est ea duis duis magna.',\n 'img' => '.\\public\\wiki.jpg',\n 'author_id' => '1',\n ],\n [\n 'book_name' => 'Et occaecat in',\n 'description' => 'Excepteur dolore labore reprehenderit ex quis reprehenderit nulla deserunt ullamco ea exercitation aliqua aute. Fugiat esse pariatur fugiat exercitation incididunt adipisicing ex excepteur id aute labore ad fugiat nulla. Incididunt nulla nostrud in labore in pariatur irure ipsum ipsum exercitation.',\n 'img' => '.\\public\\wiki.jpg',\n 'author_id' => '3',\n ],\n [\n 'book_name' => 'Excepteur dolore',\n 'description' => 'Adipisicing officia reprehenderit consequat labore excepteur culpa laborum occaecat. Adipisicing anim deserunt reprehenderit exercitation in deserunt. Lorem ad aliquip exercitation aliquip esse adipisicing ullamco in ullamco deserunt ipsum anim. Cillum esse fugiat proident elit aliquip. Magna reprehenderit aliquip laborum cillum in veniam in nostrud dolore irure proident veniam nulla est.',\n 'img' => '.\\public\\wiki.jpg',\n 'author_id' => '4',\n ],\n [\n 'book_name' => 'Adipisicing officia',\n 'description' => 'Anim occaecat ad est nulla laboris laborum esse irure id ullamco adipisicing fugiat laborum nisi. Amet minim sit commodo proident adipisicing exercitation in elit laboris. Ex elit aliquip magna adipisicing veniam officia sit proident duis non. Eiusmod minim aute do ea sit veniam excepteur adipisicing quis exercitation commodo in laborum nulla. Commodo anim commodo et aliquip reprehenderit laboris aute ut cupidatat magna. Culpa veniam aliqua tempor adipisicing anim aliqua magna ipsum qui magna dolore elit dolor. Id exercitation quis esse laborum anim dolore ipsum reprehenderit do.',\n 'img' => '.\\public\\wiki.jpg',\n 'author_id' => '5',\n ],\n ];\n\n foreach ($book as $data) {\n \\App\\Models\\Book::create($data);\n }\n }", "function get_the_author_firstname()\n {\n }", "public function getAuthor($encoding = 'UTF-8') {}", "public function index() {\n $books = Book::orderBy('created_at', 'desc')->get()->toArray();\n\n $books = array_map(function ($book) {\n $review_author = Book::find($book['id'])->user()->first()->name;\n $book['review_author'] = $review_author;\n return $book;\n }, $books);\n\n return $books;\n }", "public function authorsNamesForInitial($initial);", "public static function author(){ //Here author can not be override bcz its a final method\n return \"My name is \".self::$name.\" Sen\";\n }", "public function getName()\n {\n return 'book';\n }", "public function actionUpdate($id)\n {\n $modelBook = $this->findModel($id);\n $modelBookForm = new BookForm($modelBook);\n $authorsId = $modelBook->getAuthors()->select('id')->asArray()->all();\n $modelsAuthor = Author::findAll($authorsId); //$modelBook->getAuthors()->asArray()->all();\n\n if ($modelBook->load(Yii::$app->request->post())) {\n $modelsAuthorNew = Model::createMultiple(Author::className());\n Model::loadMultiple($modelsAuthorNew, Yii::$app->request->post());\n //process, separate book keyWords\n $modelsKeyWordsNew = [new KeyWord];\n if ($wordsArray = $modelBookForm->prepareKeyWords(Yii::$app->request->post('KeyWord')['words'])) {\n $modelsKeyWordsNew = Model::createMultiple(KeyWord::className(), [], $wordsArray);\n // KeyWord[0]['word' =>'php']\n Model::loadMultiple($modelsKeyWordsNew, $wordsArray, '');\n }\n $valid = $modelBook->validate();\n $valid = Model::validateMultiple($modelsAuthorNew) && $valid;\n $valid = $wordsArray === false ? $valid : Model::validateMultiple($modelsKeyWordsNew) && $valid;\n\n if ($valid && $modelBookForm->updateBook($modelsAuthor, $modelsAuthorNew, $modelsKeyWordsNew)) {\n Yii::$app->session->setFlash('success', Yii::t('app', Yii::t('app', 'Book was updated successfully.')));\n Yii::info($id . '_update', 'book');\n\n return $this->redirect(['view', 'id' => $modelBook->id]);\n } else {\n //get all errors from multiple models\n if (($msg = BookForm::getErrorsMessages($modelsAuthorNew)) !== false) {\n Yii::$app->session->addFlash('danger', $msg);\n }\n if (($msg = BookForm::getErrorsMessages($modelsKeyWordsNew)) !== false) {\n Yii::$app->session->addFlash('danger', $msg);\n }\n }\n Yii::$app->session->addFlash('danger', Yii::t('app', 'Book was not updated.'));\n }\n\n return $this->render('update', [\n 'modelBook' => $modelBook,\n 'modelsAuthor' => (empty($modelsAuthor)) ? [new Author] : $modelsAuthor,\n 'keyWords' => $modelBookForm->getKeyWords(),\n ]);\n }", "public function authorSeries($id, $books);", "public function getAuthor($index = 0);", "function opdsByAuthor($initial, $id, $page)\n{\n global $app, $globalSettings;\n\n // parameter checking\n if (!is_numeric($id) || !is_numeric($page)) {\n $app->getLog()->warn('opdsByAuthor: invalid author id ' . $id . ' or page id ' . $page);\n $app->halt(400, \"Bad parameter\");\n }\n\n $filter = getFilter();\n $tl = $app->calibre->authorDetailsSlice($globalSettings['lang'], $id, $page, $globalSettings[PAGE_SIZE], $filter);\n $app->getLog()->debug('opdsByAuthor 1 ' . var_export($tl, true));\n $books1 = $app->calibre->titleDetailsFilteredOpds($tl['entries']);\n $books = array_map('checkThumbnailOpds', $books1);\n $app->getLog()->debug('opdsByAuthor 2 ' . var_export($books, true));\n $gen = mkOpdsGenerator($app);\n $cat = $gen->booksForAuthorCatalog(\n null,\n $books,\n $initial,\n $tl['author'],\n false,\n $tl['page'],\n getNextSearchPage($tl),\n getLastSearchPage($tl)\n );\n mkOpdsResponse($app, $cat, OpdsGenerator::OPDS_MIME_ACQ);\n}", "private function getBooksByTitle(array $args = []): BookCollection\n {\n// if (empty($args['title'])) {\n return new BookCollection();\n/* }\n\n try {\n $bookModel = new BookModel($this->container);\n } catch (\\Exception $e) {\n return new BookCollection();\n }\n\n return $bookModel->findBooksByTitle($args['title']); */\n }", "function nb_get_author_name( $object, $field_name, $request ) {\n return get_the_author_meta( 'display_name', $object['author'] );\n}", "protected function _doKronolith()\n {\n global $prefs;\n\n $books = @unserialize($prefs->getValue('search_abook'));\n if (!empty($books)) {\n $new_books = array();\n foreach ($books as $book) {\n $new_books[] = $this->_updateShareName($book);\n }\n $prefs->setValue('search_abook', serialize($new_books));\n }\n }", "private function updateAuthorSortNameAndLink($bookId, $authorName)\n {\n $sortName = $this->app['model.calibre']->getAuthorSortName($authorName);\n\n // Get author id if author name already exists\n $authorId = $this->getQueryBuilder()\n ->select('id')\n ->from('authors', 'main')\n ->where('main.name = :author_name')\n ->setParameter('author_name', $authorName, PDO::PARAM_STR)\n ->execute()\n ->fetchColumn();\n\n // Save author data (update existing or insert new one)\n $author = $this->app['model.author'];\n $author\n ->setName($authorName)\n ->setSort($sortName);\n if ($authorId) {\n $author->setId($authorId);\n }\n $authorId = $author->save();\n\n // Create new book <=> author link\n $this->getConnection()->insert(\n 'books_authors_link',\n array(\n 'book' => $bookId,\n 'author' => $authorId\n ),\n array(\n PDO::PARAM_INT,\n PDO::PARAM_INT\n )\n );\n return $sortName;\n }", "public function find_authors(){\n //return $query;\n $this->db->select('name_chn');\n $query=$this->db->get('users');\n return $query;\n }", "private function filter_by_author( $args, $nicename ){\n\n\t\t$author_args = array( 'author_name' => esc_attr( $nicename ) );\n\n\t\t$updated_args = array_merge( $author_args, $args );\n\n\t\treturn $updated_args;\n\n\t}", "function review($authors)\r\n {\r\n $CI = &get_instance();\r\n $CI->load->helper('utf8_to_ascii');\r\n if (!is_array($authors))\r\n return null;\r\n \r\n $result_message = \"\";\r\n $all_similar_authors = array();\r\n \r\n //get database author array\r\n $CI->db->select('author_id, cleanname');\r\n $CI->db->orderby('cleanname');\r\n $Q = $CI->db->get('author');\r\n \r\n $db_cleanauthors = array();\r\n //retrieve results or fail \r\n foreach ($Q->result() as $R)\r\n {\r\n $db_cleanauthors[$R->author_id] = strtolower($R->cleanname); //why strtolower? because we want to check case insensitive.\r\n }\r\n \r\n \r\n //check availability of the authors in the database\r\n foreach ($authors as $author)\r\n {\r\n $similar_authors = array();\r\n if ($this->getByExactName($author->firstname, $author->von, $author->surname, $author->jr) == null)\r\n {\r\n //no exact match, or more than one authors exist in the database\r\n \r\n //check on cleanname\r\n //create cleanname\r\n $author->cleanname = strtolower(authorCleanName($author));\r\n $db_distances = array();\r\n foreach ($db_cleanauthors as $author_id => $db_author)\r\n {\r\n $distance = levenshtein($db_author, $author->cleanname);\r\n if (($distance < 3) && ($author_id != $author->author_id))\r\n $db_distances[$author_id] = $distance;\r\n }\r\n \r\n //sort while keeping key relationship\r\n asort($db_distances, SORT_NUMERIC);\r\n //are there similar authors?\r\n if (count($db_distances) > 0)\r\n {\r\n $authorname = $author->getName('lvf');\r\n if ($author->institute!='')\r\n {\r\n $authorname .= ', '.addslashes ($author->institute);\r\n }\r\n if ($author->email!='')\r\n {\r\n $authorname .= ', '.addslashes ($author->institute);\r\n }\r\n\r\n $result_message .= __(\"Found similar authors for\").\" <b>&quot;\".$authorname.\"&quot;</b>:<br/>\\n\";\r\n $result_message .= \"<ul>\\n\";\r\n foreach($db_distances as $key => $value)\r\n {\r\n $otherauthor = $this->getByID($key);\r\n $otherauthorname = $otherauthor->getName('lvf');\r\n if ($otherauthor->institute!='')\r\n {\r\n $otherauthorname .= ', '.addslashes ($otherauthor->institute);\r\n }\r\n if ($otherauthor->email!='')\r\n {\r\n $otherauthorname .= ', '.addslashes ($otherauthor->institute);\r\n }\r\n $result_message .= \"<li>\".$otherauthorname.\"</li>\\n\";\r\n $similar_authors[] = $otherauthor->author_id;\r\n }\r\n $result_message .= \"</ul>\\n\";\r\n }\r\n } else {\r\n //exact match! this author exists!\r\n }\r\n $all_similar_authors[] = $similar_authors;\r\n }\r\n if ($result_message != \"\")\r\n {\r\n $result_message .= __(\"Please review the entered authors\").\".<br/>\\n\";\r\n return array($result_message,$all_similar_authors);\r\n }\r\n else\r\n return null;\r\n }", "function opdsByAuthorNamesForInitial($initial)\n{\n global $app;\n\n // parameter checking\n if (!(ctype_upper($initial))) {\n $app->getLog()->warn('opdsByAuthorNamesForInitial: invalid initial ' . $initial);\n $app->halt(400, \"Bad parameter\");\n }\n\n $authors = $app->calibre->authorsNamesForInitial($initial);\n $gen = mkOpdsGenerator($app);\n $cat = $gen->authorsNamesForInitialCatalog(null, $authors, $initial);\n mkOpdsResponse($app, $cat, OpdsGenerator::OPDS_MIME_NAV);\n}", "function the_author_yim()\n {\n }", "public function set_to_lower_case()\n {\n if (empty($this->params['named']['field']))\n {\n echo 'You must enter a field to work with. recipe-manager/ingredients/set_to_lower_case/field:ingredient';\n exit();\n }\n\n if (strpos($this->params['named']['field'], '.'))\n {\n $fields = explode('.', $this->params['named']['field']);\n }\n else\n {\n $fields[] = $this->params['named']['field'];\n }\n\n var_dump($fields);\n\n $params = array(\n //'conditions' => array('Model.field' => $thisValue), //array of conditions\n //'recursive' => 1, //int\n //'fields' => array($this->modelClass . '.' . $field), //array of field names\n //'order' => array('Model.created', 'Model.field3 DESC'), //string or array defining order\n //'group' => array('Model.field'), //fields to GROUP BY\n //'limit' => n, //int\n //'page' => n, //int\n //'offset' => n, //int\n //'callbacks' => true //other possible values are false, 'before', 'after'\n );\n\n $result = $this->{$this->modelClass}->find('all', $params);\n\n foreach ($result as &$item)\n {\n var_dump(count($fields));\n if (count($fields) == 1)\n {\n var_dump('Single Item');\n var_dump($item[$this->modelClass][$fields[0]]);\n $item[$this->modelClass][$fields[0]] = strtolower($item[$this->modelClass][$fields[0]]);\n var_dump($item[$this->modelClass][$fields[0]]);\n }\n else if (count($fields) == 2)\n {\n var_dump('Nested Item');\n foreach ($item[$this->modelClass][$fields[0]] as &$array)\n {\n var_dump($array[$fields[1]]);\n $array[$fields[1]] = strtolower($array[$fields[1]]);\n var_dump($array[$fields[1]]);\n }\n }\n var_dump($item);\n\n if (!$this->{$this->modelClass}->save($item))\n {\n exit('Error');\n }\n }\n exit('Done');\n }", "public function get_author_permastruct()\n {\n }", "public function getAuthors();", "public function get_author($key = 0)\n {\n }", "function getAuthor() \n\t{\n\t\t$author = array();\n\t\tinclude_once \"./Services/MetaData/classes/class.ilMD.php\";\n\t\t$md =& new ilMD($this->getId(), 0, $this->getType());\n\t\t$md_life =& $md->getLifecycle();\n\t\tif ($md_life)\n\t\t{\n\t\t\t$ids =& $md_life->getContributeIds();\n\t\t\tforeach ($ids as $id)\n\t\t\t{\n\t\t\t\t$md_cont =& $md_life->getContribute($id);\n\t\t\t\tif (strcmp($md_cont->getRole(), \"Author\") == 0)\n\t\t\t\t{\n\t\t\t\t\t$entids =& $md_cont->getEntityIds();\n\t\t\t\t\tforeach ($entids as $entid)\n\t\t\t\t\t{\n\t\t\t\t\t\t$md_ent =& $md_cont->getEntity($entid);\n\t\t\t\t\t\tarray_push($author, $md_ent->getEntity());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn join($author, \",\");\n }", "public function get_author($key = 0)\n {\n }", "public function authors(){\n $this->data['authors'] = $this->books_model->getAllAuthors();\n $this->render('books/authors');\n }", "public function getAuthorName()\n {\n return 'Fightmaster.publication.author.name';\n }", "function decorateWithAuthor($article) {\n global $authorArticleTable;\n\n createAuthorArticleTable();\n\n $article->authors = $authorArticleTable[$article->id];\n\n return $article;\n}", "public function practice2()\n {\n //dump(Str::plural('mouse'));\n\n dump(Book::find(3));\n dump(Book::all()->toArray());\n }", "public function getAuthor() {\n\t\treturn UserManager::getFromBlid($this->blid);\n\t}" ]
[ "0.6002671", "0.587632", "0.5845784", "0.57047755", "0.56890315", "0.561786", "0.56017345", "0.55889004", "0.55870485", "0.5581467", "0.5558776", "0.55468273", "0.5543281", "0.5519324", "0.55115426", "0.55115426", "0.55115426", "0.5510896", "0.5483642", "0.5472748", "0.544256", "0.54232526", "0.5419626", "0.54161716", "0.54137594", "0.53742844", "0.53592265", "0.53589934", "0.535046", "0.5340619", "0.530921", "0.5306606", "0.5300556", "0.52970606", "0.5271194", "0.5242289", "0.52419156", "0.52398", "0.52398", "0.52337044", "0.5232722", "0.5230619", "0.520607", "0.52054137", "0.520313", "0.51956505", "0.51911366", "0.51681495", "0.51597834", "0.5156006", "0.5155659", "0.5155659", "0.5155659", "0.5155659", "0.5155659", "0.5155659", "0.51548266", "0.5150627", "0.5148579", "0.514296", "0.5136416", "0.51322883", "0.5131649", "0.51315147", "0.51174587", "0.5117319", "0.51114696", "0.51086384", "0.51034087", "0.50955737", "0.5095535", "0.5091198", "0.5087701", "0.5081452", "0.5076971", "0.5073374", "0.5071093", "0.5064195", "0.50540143", "0.505249", "0.5037711", "0.50302315", "0.5024541", "0.50216705", "0.5005585", "0.50009954", "0.49996358", "0.49910563", "0.49805406", "0.49782175", "0.49724245", "0.4969895", "0.4964441", "0.4964043", "0.49616945", "0.49591118", "0.49554133", "0.49490917", "0.4941367", "0.4937115" ]
0.6625447
0
Practice from notes on Models: Retrieve all the books in descending order according to published date
public function getEx12() { $books = \App\Book::orderBy('published','desc')->get(); $this->printBooks($books); # Underlying SQL: select * from `books` order by `published` desc }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function latest_books()\n {\n //thiet lap rieng\n $this->paginate = array(\n 'fields' => array('id', 'title', 'slug', 'image', 'sale_price'),\n 'order' => array('created' => 'desc'),\n 'limit' => 8,\n 'contain'=> array(\n 'Writer' => array('name', 'slug')\n ),\n 'conditions' => array('published'=>1),\n 'paramType'=> 'querystring', //thay đổi đường dẫn xuất hiện\n );\n $books = $this->paginate(); //mac dinh la 20 quyen sach va k co thiet lap dieu kien muon thiet lap dieu kien thi dung bien public paginate\n \n $this->set('books', $books);\n $this->set('title_for_layout', 'Sach moi Chiken');\n }", "public function getEx10() {\n $books = \\App\\Book::where('published','>',1950)->get();\n $this->printBooks($books);\n # Underlying SQL: select * from `books` where `published` > '1950'\n }", "public function index()\n {\n return books::orderBy('created_at')->get();\n }", "public function getEx11() {\n $books = \\App\\Book::orderBy('title','asc')->get();\n $this->printBooks($books);\n # Underlying SQL: select * from `books` order by `title` asc\n }", "public function orderByPublishDate(): self;", "public function books(): Collection;", "public function findAllDesc(){\n $qb = $this->createQueryBuilder('a')\n ->orderBy('a.date', 'desc');\n \n return $qb->getQuery()->getResult();\n }", "public function getEx9() {\n # Ref: https://laravel.com/docs/5.2/queries#ordering-grouping-limit-and-offset\n $books = \\App\\Book::orderBy('id', 'desc')->get()->take(5);\n $this->printBooks($books);\n # Underlying SQL: select * from `books` order by `id` desc\n }", "public function top(): Collection\n {\n return $this->authorModel\n ->select('name')\n ->withCount('books')\n ->orderBy('books_count', 'desc')\n ->get();\n }", "public function getAllBooks(){\n $query = \"SELECT * FROM Book;\";\n return $this->getBookDetail($query);\n }", "public function index()\n {\n return BookResource::collection(Book::orderByDesc(\"id\")->get());\n }", "public function get_book();", "public function list_invoice_desc(){\n\n$this->db->order_by(\"year\", \"desc\");\n\t\n$result\t= $this->db->get('invoice');\n\n\t\treturn $result->result();\t\n}", "public function getBooks()\n {\n $page = isset($_GET['page']) ? $_GET['page'] : 1;\n $this->limit = isset($_GET['limit']) ? $_GET['limit'] : $this->limit;\n $offset = $this->limit * ($page - 1);\n\n\n if (USE_ONE_TABLE) {\n $this->table = 'books_authors';\n $sql = \"SELECT * FROM $this->table WHERE `deleted` is NULL LIMIT :limit OFFSET :offset\";\n } else {\n $this->table = 'relations';\n $sql = \"SELECT books.id, book_name, GROUP_CONCAT(name_author SEPARATOR ', ') as 'author' , year, num_pages, about_book, deleted, views, clicks, image\n FROM books \n JOIN relations ON book_id = books.id\n JOIN authors ON authors.id = author_id\n WHERE deleted is NULL \n GROUP BY id\n LIMIT :limit OFFSET :offset\";\n }\n\n $params = [\n [\":limit\", $this->limit, \\PDO::PARAM_INT],\n [\":offset\", $offset, \\PDO::PARAM_INT]\n ];\n return $this->bindAndQuery($sql, $params);\n }", "public function allRecordsByDate(){\n\t\t\t$news = collect(DB::table('news')->get());\n\t\t\treturn $news->sortBy('createdat');\n\t\t}", "function findAllOrdersDescPaginated();", "public function getBooks()\n {\n $sql = 'SELECT bookshop_books.id,\n bookshop_books.description,\n bookshop_books.booksName,\n bookshop_books.pubyear,\n bookshop_discounts.id AS discountsId,\n bookshop_discounts.discountsName,\n bookshop_discounts.percent,\n bookshop_books.price,\n bookshop_authors.id AS idAuthors,\n bookshop_authors.authorsName,\n bookshop_genres.id AS idGenres,\n bookshop_genres.genresName\n FROM bookshop_books_to_authors\n INNER JOIN bookshop_books\n ON bookshop_books_to_authors.id_book = bookshop_books.id\n INNER JOIN bookshop_books_to_genres\n ON bookshop_books_to_genres.id_book = bookshop_books.id\n INNER JOIN bookshop_authors\n ON bookshop_books_to_authors.id_author = bookshop_authors.id\n INNER JOIN bookshop_genres\n ON bookshop_books_to_genres.id_genre = bookshop_genres.id\n INNER JOIN bookshop_discounts\n ON bookshop_books.id_discount = bookshop_discounts.id';\n \n $result = $this->db->execute($sql);\n\n if (!$result)\n return $this->error();\n\n return $this->formingBooks($result);\n }", "public function getBooks()\n {\n return $this->hasMany(Book::className(), ['author_id' => 'id']);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function allRecordsByTitle(){\n\t $news = collect(DB::table('news')->get());\n\t return $news->sortBy('title');\n }", "public function index()\n {\n //\n return BookResource::collection(Book::with('ratings')->paginate(25));\n }", "public function index()\n {\n $books = Book::where('isApproved', true)->paginate(25);\n return BookResource::collection($books);\n }", "function bm_get_books($all=false) {\n\n $now = time();\n $books = array();\n $data = @getXML(BMBOOKCACHE);\n \n \n foreach ($data->item as $item) {\n if ($all || $item->private != 'Y' && strtotime($item->date) < $now)\n $books[] = $item;\n }\n return $books;\n}", "function findDocuments( $orderby='name DESC' )\n\t{\n\t\t//return MyActiveRecord::FindAll( 'Documents', 'item_id = '.$this->id, $orderby );\n\t\treturn MyActiveRecord::FindBySql('Documents', \"SELECT * FROM documents WHERE item_id = \".$this->id.\" ORDER BY \".$orderby.\"\");\n\t}", "function hentAlleAktiviteter()\n{\n return Aktivitet::All()->sortByDesc(\"Dato\");\n}", "public function allBooksOderedByType()\n {\n $qb = $this->createQueryBuilder('b')\n ->select('b.title, b.type, b.isbn, b.author')\n ->orderBy('b.type');\n\n $query = $qb->getquery();\n \n return $query->execute();\n }", "function getPublished()\n {\n return $this->published()->orderBy('sort')->get();\n }", "public function getBookList() \n {\n return array( \n \"Balagurusamy\" => new Book(\"Balagurusamy\", \"Balagurusamy\", \"C programming\"), \n \"CMM in Practice\" => new Book(\"CMM in Practice\", \"Pankaj Jalote\", \"\"), \n \"PHP for Dummies\" => new Book(\"PHP for Dummies\", \"Some Smart Guy\", \"\") \n ); \n }", "public function practice17()\n {\n $books = Book::all();\n\n foreach ($books as $book) {\n dump($book->title);\n }\n }", "public function index()\n {\n $bookings = Booking::all()->sortByDesc('created_at')->forPage(0, 20);\n return $bookings;\n }", "public function index()\n {\n $books = Book::orderby('created_at','desc')->get();\n return view('book.index');\n }", "function get_recent_items($num = 10)\n{\n return get_db()->getTable('Item')->findBy(array('sort_field' => 'added', 'sort_dir' => 'd'), $num);\n}", "public function booklist()\n {\n $book = Post::where('key', 'book')->get();\n return view('backends.booklist')->with('book', $book);\n }", "public function actionIndex()\n {\n $searchModel = new BookSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n \n $dataProvider->query->joinWith(['topic','language','user',]);\n \n \n $dataProvider->sort->attributes['topic.name'] = [\n 'asc' => ['topic.name' => SORT_ASC],\n 'desc' => ['topic.name' => SORT_DESC],\n ];\n \n \n $dataProvider->sort->attributes['language.name'] = [\n 'asc' => ['language.name' => SORT_ASC],\n 'desc' => ['language.name' => SORT_DESC],\n ];\n \n \n $dataProvider->sort->attributes['user.name'] = [\n 'asc' => ['user.name' => SORT_ASC],\n 'desc' => ['user.name' => SORT_DESC],\n ];\n \n \n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function getallBooks()\r\n {\r\n $sql = \"SELECT id, name, publisher, year,description FROM book\";\r\n $query = $this->db->prepare($sql);\r\n $query->execute();\r\n\r\n return $query->fetchAll();\r\n }", "public function index()\n {\n return Review::with(['author', 'lottery'])->latest()->get();\n }", "public function index()\n {\n $b = newbook::\n orderBy('id', 'desc')\n //take(10)\n ->get();\n\n return $b->toJson();\n \n }", "public function index()\n {\n $title = 'Cadastrar Novo Livro';\n\n $lended_books = Book::whereHas('lendings', function ($query) {\n $query->where('date_finish', '=', null);\n })->pluck('id')->all();\n \n\n\n $books = Book::whereNotIn('id', $lended_books)->paginate($this->totalPage);\n \n \n\n return view('books.index', compact('books', 'title'));\n }", "function openskydora_get_most_viewed_items($count, $weeks_ago=7, $exclude=NULL) {\n\n $records = openskydora_get_most_viewed($count+20, $weeks_ago, $exclude);\n $item_records = array(); // No collections\n \n // filter out collection citation model\n foreach ($records as $pid=>$data) {\n $data->obj = islandora_object_load($pid);\n if (in_array('islandora:collectionCModel',$data->obj->models)) {\n // dsm ('collection! '. $pid);\n } else {\n $item_records[$pid] = $data;\n }\n }\n return array_slice($item_records, 0, $count, TRUE);\n}", "public function queryPopularPages() {\n $result = $this->query(\"SELECT P.id, P.title, P.created_date \"\n\t\t . \"FROM Pages P ORDER BY (SELECT COUNT(*) \"\n\t\t . \"FROM Changes C WHERE C.page_id=P.id) DESC\");\n\n return $result->fetch_all();\n }", "public function index()\n {\n return PostShort::collection(\n BlogPost::orderByRaw('(CASE WHEN publication = 0 THEN id END) DESC')\n ->orderBy('publication_date', 'desc')\n ->paginate(20)\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 }", "static public function getAll()\r\n {\r\n\r\n //connect with DB\r\n $db = Database::getConnect();\r\n $sql = \"SELECT `book_id`,`name`, `author`, `published_date` FROM `books` WHERE `deleted_at` IS NULL ORDER BY `book_id`\";\r\n $result = $db->query($sql);\r\n $result->execute();\r\n return $result->fetchAll();\r\n }", "public static function firstPageBooks() {\n //but later on (when we have more books in the database), this method wants some\n //subset of books (like every books that start with \"s\", or most favourite books or books selected by admin or...)\n\n $books = Book::all();\n// self::sort_books($books);\n View::make('general/firstpage.html', array('books' => $books));\n }", "function get_all_textbooks($db)\n{\n\t$sql = 'SELECT * FROM textbooks ORDER BY date_time DESC';\n\t$st = $db->prepare($sql);\n\t$st->execute();\n\t$us = $st->fetchAll();\n\treturn $us;\n}", "public function getBooks($id) {\n }", "public function findAllDesc()\n {\n $builder = $this->_em->createQueryBuilder();\n \n return $builder->select(['a'])\n ->from('Articles\\Entity\\Article', 'a')\n ->addOrderBy('a.published', 'DESC')\n ->addOrderBy('a.status', 'DESC')\n ->addOrderBy('a.id', 'DESC')\n ->getQuery()\n ->getResult();\n }", "public function getEx8() {\n # Get all the books\n $books = \\App\\Book::all();\n $this->printBooks($books);\n # get() without any query constraints is the equivalent of all()\n $books = \\App\\Book::get();\n $this->printBooks($books);\n\t}", "public function getBooks()\n\t{\n\t\treturn $this->books;\n\t}", "public function index() {\n $books = Book::orderBy('created_at', 'desc')->get()->toArray();\n\n $books = array_map(function ($book) {\n $review_author = Book::find($book['id'])->user()->first()->name;\n $book['review_author'] = $review_author;\n return $book;\n }, $books);\n\n return $books;\n }", "public function index()\n {\n return BookResources::collection(Book::with(['user','categories','authors'])->get());\n }", "public function getBookList()\n {\n return $this->bookDao->getBookList();\n }", "public function getBooks(\n\t\t$from = 0, $limit = 12, $orderBy = 'id',\n\t\t$cena_od = 0,\t$cena_do = NULL, $hladaj = NULL, $autor = NULL\n\t\t) {\n\t\t$whereSql = ' price >= :cena_od AND price <= :cena_do ';\t\t\n\t\t$whereHodnoty = [\t\t\t\t\n\t\t\t\t'cena_od' => $cena_od,\n\t\t\t\t'cena_do' => ($cena_do === NULL) ? '99999' : $cena_do, \n\t\t\t];\n\t\t\t// 99999 get max price\n\n\t\t\tif($hladaj != NULL) {\n\t\t\t\t$whereSql .= ' AND MATCH (title, description, excerpt) AGAINST (:hladaj) ';\n\t\t\t\t$whereHodnoty['hladaj'] = $hladaj;\n\t\t\t}\n\n\t\t\tif($autor != NULL) {\n\t\t\t\t$whereSql .= ' AND author = :autor ';\n\t\t\t\t$whereHodnoty['autor'] = $autor;\n\t\t\t}\n/*\n \t\t\tif($hladaj != NULL) {\n \t\t\t\t$whereSql .= ' OR authors.name LIKE :hladaj_autora ' ;\t\n \t\t\t\t$whereHodnoty['hladaj_autora'] = '%'.$hladaj.'%';\n \t\t\t\t\t\t\t\n \t\t\t}\n*/\n\n\n\t\t$this->db;\t\t\n\t\t$sth = $this->db->prepare(' SELECT * FROM ' . self::TABLE_NAME . ' \n \n\t\tWHERE '.$whereSql.'\n\n\t\tORDER BY ' . $orderBy . '\n\n\t\tLIMIT ' . $from . ', '. $limit . ' ' \n\n\t\t);\n\n\n\t\t$sth->execute( $whereHodnoty );\n\t\t\n\n\n $books = [];\n\t\twhile($book = $sth->fetchObject(__CLASS__)) {\n\n\t\t $books[] = $book;\t\n\t\t\n\t }\n\n\t\t$this->count = $this->getCount($whereSql , $whereHodnoty);\n\n\t\treturn $books;\n\n\t\t//var_dump($books);\n\t\t\n }", "public function findAllByOrder()\n {\n return $this->findBy(array(), array('updatedAt'=>'desc', 'createdAt'=>'desc'));\n }", "public function books()\n {\n return $this->morphedByMany('App\\Book', 'source_genre');\n }", "public function books()\n {\n return $this->morphedByMany('App\\Book', 'taggable');\n }", "public function getAllBooks() {\n \n $allBooks = Libro::all();\n\n return $allBooks;\n }", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "function get_all_booksinn($params = array())\n {\n $this->db->select(\"booksinn.*, books.name as bookname\");\n $this->db->join('books','books.id=booksinn.books_id','inner');\n $this->db->order_by('id', 'desc');\n if(isset($params) && !empty($params))\n {\n $this->db->limit($params['limit'], $params['offset']);\n }\n return $this->db->get('booksinn')->result_array();\n }", "public function getDateViseBookings($gym_id,$date){\n\n\n $bookings = PassOrderItems::where('gym_id',$gym_id)->where('book_date',$date)\n ->orderby('book_date','DESC')\n ->with('gym','pass','byer')\n ->get();\n //return $bookings;\n return view('gym_owners.payouts-details', compact('bookings'));\n\n}", "public function index()\n {\n $bookRecord = BookRecord::with(['borrower','book']);\n return BookRecordResource::collection($bookRecord->paginate(20))->response();\n }", "public static function get_all_books() {\n\t\t$books = BooksQModel::get_all_books();\n\n\t\tforeach ($books as $book) {\n\t\t\t//shorted description\n\t\t\tif (strlen($book->description) >= 122)\n\t\t\t\t$book->description = mb_substr($book->description, 0, 120).'...';\n\t\t\t//get uploader\n\t\t\t$uploader = UsersQModel::get_user_by_id($book->id_uploader);\n\t\t\tif ($uploader != null)\n\t\t\t\t$book->uploader = $uploader->name;\n\t\t\telse\n\t\t\t\t$book->uploader = 'Đang cập nhật';\n\t\t}\n\n\t\treturn $books;\n\t}", "public function practice2()\n {\n //dump(Str::plural('mouse'));\n\n dump(Book::find(3));\n dump(Book::all()->toArray());\n }", "public function practice14 (){\n $results = Book::find(1);\n\n $results = Book::orderBy('title')->first();\n dump($results);\n\n # Yields a collection of multiple books\n $results = Book::all();\n\n $results = Book::orderBy('title')->get();\n dump($results->first());\n\n # Should match 1 book; yields a Collection of 1 Book\n $results = Book::where('author', 'F. Scott Fitzgerald')->get();\n\n # Should match 0 books; yields an empty Collection\n $results = Book::where('author', 'Virginia Wolf')->get();\n\n # Even though we limit it to 1 book, we're using the `get` fetch method so we get a Collection (of 1 Book)\n $results = Book::limit(1)->get();\n }", "public function run()\n {\n $time = date(\"Y-m-d H:i:s\");\n\n $books = [\n ['title' => 'Finnegans Wake', 'author' => 'Janes Joyce', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'Don Quixote', 'author' => 'Miguel De Cervantes', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'The Making of Americans', 'author' => 'Gertrude Stein', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'The Stranger', 'author' => 'Albert Camus', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'Pilgrims Progress', 'author' => 'John Bunyan', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'In Search of Lost Time', 'author' => 'Marcel Proust', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'Pale Fire', 'author' => 'Valdimir Nabokov', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'The Trial', 'author' => 'Franz Kafka', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'Ulysses', 'author' => 'James Joyce', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'The Name of the Rose', 'author' => 'Umberto Eco', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'The Gulag Archipelago', 'author' => 'Aleksandr Solzhenitsyn', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'The Diary of a Young Girl', 'author' => 'Anne Frank', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'Gravity\\'s Rainbow', 'author' => 'Thomas Pynchon', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'One Hundred Years of Solitude', 'author' => 'Gabriel García Márquez', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'The Sound and the Fury', 'author' => 'William Faulkner', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'Confusion of Feelings', 'author' => 'Stefan Zweig', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'The Public Burning', 'author' => 'Robert Coover', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'The Joke', 'author' => 'Milan Kundera', 'created_at' => $time, 'updated_at' => $time],\n ];\n\n DB::table('books')->insert($books);\n }", "public function books()\n {\n return $this->get('/books');\n }", "public function getallbooks(){\n\t\t\t$this->db->select('id, name, price, author, category, language, ISBN, publish_date')\n\t\t\t\t\t ->from('tbl_books');\n\t\t\t$this->db->order_by('id', 'desc');\n\n\t\t\t$query = $this->db->get();\n\n\t\t\tif($query->num_rows() > 0){\n\t\t\t\treturn $query->result_array();\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t}", "public function index() {\n\n $this->validate(request(), [\n 'q' => 'string|required'\n ]);\n\n switch (request('sort')){\n default:\n case 'title':\n $sort['field'] = \"title\";\n break;\n case 'author':\n $sort['field'] = \"author\";\n break;\n case 'date':\n $sort['field'] = \"publication_date\";\n break;\n }\n\n switch (request('order')){\n default:\n case 'asc':\n $sort['order'] = \"asc\";\n break;\n case 'desc':\n $sort['order'] = \"desc\";\n break;\n }\n\n $books = Book::where(function ($query) {\n $query->where('public', true)->orWhere('contributed_by', Auth::id());\n })->where(function ($query) {\n $query->where('title', 'like', '%'.request('q').'%')\n ->orWhere('author', 'like', '%'.request('q').'%');\n })->orderBy($sort['field'], $sort['order'])->get();\n\n return view('search', compact('books', 'sort'));\n\n }", "function get_news()\n {\n $query = \"SELECT * FROM `news` ORDER BY `date` DESC\";\n $result = $this->db->query($query);\n\n return $result->fetchAll();\n }", "public function index()\n\t{\n\n\t\t$book_list = Books::select('book_id', 'title', 'author', 'description', 'book_categories.category')\n\t\t\t->join('book_categories', 'book_categories.id', '=', 'books.category_id')\n\t\t\t->orderBy('book_id')->get();\n\t\t// dd($book_list);\n\t\t// $this->filterQuery($book_list);\n\n\t\t// $book_list = $book_list->get();\n\n\t\tfor ($i = 0; $i < count($book_list); $i++) {\n\n\t\t\t$id = $book_list[$i]['book_id'];\n\t\t\t$conditions = array(\n\t\t\t\t'book_id'\t\t\t=> $id,\n\t\t\t\t'available_status'\t=> 1\n\t\t\t);\n\n\t\t\t$book_list[$i]['total_books'] = Issue::select()\n\t\t\t\t->where('book_id', '=', $id)\n\t\t\t\t->count();\n\n\t\t\t$book_list[$i]['avaliable'] = Issue::select()\n\t\t\t\t->where($conditions)\n\t\t\t\t->count();\n\t\t}\n\n\t\treturn $book_list;\n\t}", "public function getByMostRecent()\n\t{\n\t\t$sql = \"SELECT * FROM \".TABLE_PREFIX.\"courses \n\t\t WHERE access='public'\n\t\t ORDER BY modified_date DESC, created_date DESC\";\n\t\treturn $this->execute($sql);\n\t}", "function get_recent_collections($num = 10)\n{\n return get_records('Collection', array('sort_field' => 'added', 'sort_dir' => 'd'), $num);\n}", "public function orderby(){\n\n $rows = $this\n ->db\n ->order_by(\"title\", \"asc\")\n ->order_by(\"id\", \"random\")\n ->get(\"personel\")\n ->result();\n\n print_r($rows);\n\n }", "public function getEx15() {\n $books = Book::all();\n $this->printBooks($books);\n\t}", "public function createPublishedSortedQueryBuilder()\n {\n return $this->createPublishedQueryBuilder()\n ->sort('publishedAt', 'desc');\n }", "public function index()\n {\n\n\n $books = Books::latest()->paginate(3);\n return view(\"web_admin.books.index\", compact('books', ))->with('i',(request()->input('page',1)-1)*3);\n }", "public function index()\n {\n $data = $this->repository->getAllOrderedByDate();\n return $data;\n }", "public function index()\n {\n return AuthorResource::collection(Author::get()->take(3));\n }", "public function index()\n {\n // $new = json_encode(Book::orderBy('created_at')->limit(5)->get());\n // $random =json_encode(Book::inRandomOrder()->limit(5)->get());\n\n\n return 'Legújabbak:'.'<br>'.\n json_encode(Book::orderBy('created_at')->limit(5)->get()).'<br>'.\n 'Random:'.\n '<br>'.json_encode(Book::inRandomOrder()->limit(5)->get());\n }", "public function index()\n {\n $books = Book::whereNotNull('is_approved')\n ->with('authors')\n ->with('genres')\n ->withAvg('reviews', 'rating')\n ->when(request('user_books') && Auth::check(), function ($query) {\n $query->where('user_id', auth()->user()->id)\n ->whereNotNull('is_approved')\n ->orWhere(function($query){\n $query->whereNull('is_approved')\n ->where('user_id', auth()->user()->id);\n });\n })\n ->when(request('search'), function ($query) {\n $search = request('search');\n $query->whereNotNull('is_approved')\n ->where('title', 'LIKE', '%' . $search . '%')\n ->orWhere(function($query) use ($search){\n $query->whereNotNull('is_approved')\n ->where('description', 'LIKE', '%' . $search . '%');\n })\n ->orWhereHas('genres', function ($query) use ($search) {\n $query->whereNotNull('is_approved')\n ->where('name', 'LIKE', '%' . $search . '%');\n })\n ->orWhereHas('authors', function ($query) use ($search) {\n $query->whereNotNull('is_approved')\n ->where('name', 'LIKE', '%' . $search . '%');\n });\n })\n ->latest()\n ->paginate(25);\n\n\n\n return view('book.index', compact('books'));\n }", "function findAll() {\n return Documents::find(array(\n 'order' => 'created_on DESC',\n ));\n }", "public function get_books()\n {\n $this->load->database();\n // print_r($this->db->get(\"books\"));\n $query = $this->db->query(\"select * from books\");\n return $query->result();\n }", "public function list_client_desc(){\n\n$this->db->order_by(\"year\", \"desc\");\n\t\n$result\t= $this->db->get('client');\n\n\t\treturn $result->result();\t\n}", "public function books()\n {\n\t \t return $this->belongsToMany(Book::class);\n }", "public function getAllBooks(){\n return $this->libros;\n }", "public function getAll()\n\t{\n\t\treturn Post::find('all', array('order' => 'date desc'));\n\t}", "public function allBooks ()\n {\n $books = $this->book->findAll();\n $this->show('admin/allbooks', ['books' => $books]);\n }", "public function get_book()\n {\n $sql = DB::select('select * from books');\n return $sql;\n }", "public function index()\n {\n return BookReviewResource::collection($this->bookReviewRepo->get());\n }", "public function sort(Request $request)\n {\n if ($request->orderby == 'comment') {\n $books = $this->book->getSortByComment();\n } elseif ($request->orderby == 'rating') {\n $books = $this->book->getSortByRate();\n } else {\n $books = $this->book->getBookPaginate();\n }\n\n return $books;\n }", "public function index()\n {\n return QuestionResource::collection(Question::latest()->get()); //This line gets all the latest questions\n }", "protected function queryActiveOrderByDate()\n {\n return $this->model\n ->select('id', 'title', 'slug', 'excerpt', 'image')\n ->whereActive(true)\n ->latest();\n }", "public function books()\n {\n return $this->hasMany('App\\Book');\n }", "public function practice20()\n {\n # Get the first book as an example\n $book = Book::first();\n\n# Get the author from this book using the \"author\" dynamic property\n# \"author\" corresponds to the the relationship method defined in the Book model\n $author = $book->author;\n\n# Output\n dump($book->title.' was written by '.$author->first_name.' '.$author->last_name);\n dump($book->toArray());\n }", "public function getLast2Opinions($book){\n $sql = \"SELECT o.title, o.txt, o.note, o.pubDate, a.username, o.author FROM opinion o\n INNER JOIN account a ON o.author=a.id\n INNER JOIN book b ON o.book=b.id\n ORDER BY o.pubDate LIMIT 2;\";\n $res = mysqli_query($this->link, $sql);\n $opinions = mysqli_fetch_all($res);\n return $opinions;\n }", "function getNotesForPublication($pub_id) {\r\n $CI = &get_instance();\r\n $result = array();\r\n $Q = $CI->db->get_where('notes', array('pub_id' => $pub_id));\r\n foreach ($Q->result() as $row) {\r\n $next = $this->getFromRow($row);\r\n if ($next != null) {\r\n $result[] = $next;\r\n }\r\n }\r\n return $result;\r\n }", "public function getBookList() {\n\n $booklist = array();\n\n foreach ($this->db-> query(\"SELECT * FROM book\") as $row) {\n \n array_push($booklist, new Book($row['title'], $row['author'], $row['description'], $row['id']));\n }\n\n return $booklist;\n }", "public function index()\n {\n //get all blogs\n //$blog = Blog::paginate(15);\n $blog = Blog::with(['blog_content' => function($query) {\n $query->where('type', '=', 'img_main')->orWhere('type', '=','intro');\n }])->where('blog_id', '!=', 'a41f5295-8535-4eaa-97a3-ddcdf4a86a47')->orderBy('published_date', 'DESC')->get();\n // $blog = DB::table('blogContent')\n // ->join('blog', 'blog.id', '=','blogContent.blog_id')\n // ->where('blogContent.type', '=', 'intro')\n // ->get();\n return BlogResource::collection($blog);\n }", "function fn_soneritics_kiyoh_get_reviews(int $page, int $reviewCountPerPage = 25): array\n{\n $start = ($page * $reviewCountPerPage) - $reviewCountPerPage;\n\n return db_get_array(\n \"SELECT * FROM `?:soneritics_kiyoh_reviews` ORDER BY `date` DESC LIMIT ?i,?i\",\n $start,\n $reviewCountPerPage\n );\n}", "public function index()\n {\n return response()->json(Book::orderBy(request('column') ? request('column') : 'updated_at', request('direction') ? request('direction') : 'desc')\n ->search(request('search'))\n ->with('category', 'author')\n ->paginate());\n }" ]
[ "0.664487", "0.66268075", "0.63996667", "0.6333038", "0.63007253", "0.62964976", "0.6257233", "0.6132179", "0.6080486", "0.5959239", "0.5945087", "0.5939681", "0.59193873", "0.58530307", "0.5847881", "0.5840894", "0.57964605", "0.5785783", "0.5782388", "0.57759106", "0.57720816", "0.5771702", "0.57703763", "0.57703453", "0.57454973", "0.5725762", "0.57199246", "0.5702336", "0.56915146", "0.56891245", "0.5688233", "0.56768465", "0.56490064", "0.56372696", "0.56184876", "0.55967337", "0.55939996", "0.5590582", "0.5583358", "0.5580452", "0.5575592", "0.5566912", "0.55546874", "0.55523527", "0.5548316", "0.5547566", "0.5547002", "0.55325514", "0.55294335", "0.5526242", "0.55246323", "0.5522716", "0.5517246", "0.5514149", "0.5512709", "0.5498408", "0.54967856", "0.5487041", "0.54834604", "0.54823786", "0.54788375", "0.5477895", "0.54620224", "0.5455902", "0.5454718", "0.54496586", "0.5439666", "0.54337966", "0.54337174", "0.54240966", "0.5416723", "0.539658", "0.53954816", "0.5391596", "0.5380216", "0.537997", "0.53707373", "0.5370209", "0.5369248", "0.5361197", "0.5358288", "0.5354998", "0.53486955", "0.5347182", "0.5346877", "0.53402555", "0.5334801", "0.53319424", "0.5320923", "0.5311356", "0.5306814", "0.5306069", "0.5304194", "0.5301603", "0.52993405", "0.5296963", "0.5290334", "0.5286353", "0.52800566", "0.52763414" ]
0.72998583
0
Practice from notes on Models: Retrieve all the books in alphabetical order by title
public function getEx11() { $books = \App\Book::orderBy('title','asc')->get(); $this->printBooks($books); # Underlying SQL: select * from `books` order by `title` asc }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function allRecordsByTitle(){\n\t $news = collect(DB::table('news')->get());\n\t return $news->sortBy('title');\n }", "public function getAllBooks(){\n $query = \"SELECT * FROM Book;\";\n return $this->getBookDetail($query);\n }", "public static function get_all_books() {\n\t\t$books = BooksQModel::get_all_books();\n\n\t\tforeach ($books as $book) {\n\t\t\t//shorted description\n\t\t\tif (strlen($book->description) >= 122)\n\t\t\t\t$book->description = mb_substr($book->description, 0, 120).'...';\n\t\t\t//get uploader\n\t\t\t$uploader = UsersQModel::get_user_by_id($book->id_uploader);\n\t\t\tif ($uploader != null)\n\t\t\t\t$book->uploader = $uploader->name;\n\t\t\telse\n\t\t\t\t$book->uploader = 'Đang cập nhật';\n\t\t}\n\n\t\treturn $books;\n\t}", "public function getBookList() \n {\n return array( \n \"Balagurusamy\" => new Book(\"Balagurusamy\", \"Balagurusamy\", \"C programming\"), \n \"CMM in Practice\" => new Book(\"CMM in Practice\", \"Pankaj Jalote\", \"\"), \n \"PHP for Dummies\" => new Book(\"PHP for Dummies\", \"Some Smart Guy\", \"\") \n ); \n }", "public function practice17()\n {\n $books = Book::all();\n\n foreach ($books as $book) {\n dump($book->title);\n }\n }", "private function getBooksByTitle(array $args = []): BookCollection\n {\n// if (empty($args['title'])) {\n return new BookCollection();\n/* }\n\n try {\n $bookModel = new BookModel($this->container);\n } catch (\\Exception $e) {\n return new BookCollection();\n }\n\n return $bookModel->findBooksByTitle($args['title']); */\n }", "public function getBook($title) \n {\n // in a real life scenario this will be done through a db select command \n $allBooks = $this->getBookList(); \n return $allBooks[$title]; \n }", "public function titleDetailsFilteredOpds($books);", "public function get_book();", "public static function firstPageBooks() {\n //but later on (when we have more books in the database), this method wants some\n //subset of books (like every books that start with \"s\", or most favourite books or books selected by admin or...)\n\n $books = Book::all();\n// self::sort_books($books);\n View::make('general/firstpage.html', array('books' => $books));\n }", "public function getAllBooks() {\n \n $allBooks = Libro::all();\n\n return $allBooks;\n }", "public function getallBooks()\r\n {\r\n $sql = \"SELECT id, name, publisher, year,description FROM book\";\r\n $query = $this->db->prepare($sql);\r\n $query->execute();\r\n\r\n return $query->fetchAll();\r\n }", "public function books()\n {\n return $this->morphedByMany('App\\Book', 'source_genre');\n }", "public function titleDetailsOpds($book);", "public function books(): Collection;", "public function getEx12() {\n $books = \\App\\Book::orderBy('published','desc')->get();\n $this->printBooks($books);\n # Underlying SQL: select * from `books` order by `published` desc\n\t}", "public function getBookList() {\n\n $booklist = array();\n\n foreach ($this->db-> query(\"SELECT * FROM book\") as $row) {\n \n array_push($booklist, new Book($row['title'], $row['author'], $row['description'], $row['id']));\n }\n\n return $booklist;\n }", "public function getBooks()\n {\n $sql = 'SELECT bookshop_books.id,\n bookshop_books.description,\n bookshop_books.booksName,\n bookshop_books.pubyear,\n bookshop_discounts.id AS discountsId,\n bookshop_discounts.discountsName,\n bookshop_discounts.percent,\n bookshop_books.price,\n bookshop_authors.id AS idAuthors,\n bookshop_authors.authorsName,\n bookshop_genres.id AS idGenres,\n bookshop_genres.genresName\n FROM bookshop_books_to_authors\n INNER JOIN bookshop_books\n ON bookshop_books_to_authors.id_book = bookshop_books.id\n INNER JOIN bookshop_books_to_genres\n ON bookshop_books_to_genres.id_book = bookshop_books.id\n INNER JOIN bookshop_authors\n ON bookshop_books_to_authors.id_author = bookshop_authors.id\n INNER JOIN bookshop_genres\n ON bookshop_books_to_genres.id_genre = bookshop_genres.id\n INNER JOIN bookshop_discounts\n ON bookshop_books.id_discount = bookshop_discounts.id';\n \n $result = $this->db->execute($sql);\n\n if (!$result)\n return $this->error();\n\n return $this->formingBooks($result);\n }", "public function getBooks()\n {\n $page = isset($_GET['page']) ? $_GET['page'] : 1;\n $this->limit = isset($_GET['limit']) ? $_GET['limit'] : $this->limit;\n $offset = $this->limit * ($page - 1);\n\n\n if (USE_ONE_TABLE) {\n $this->table = 'books_authors';\n $sql = \"SELECT * FROM $this->table WHERE `deleted` is NULL LIMIT :limit OFFSET :offset\";\n } else {\n $this->table = 'relations';\n $sql = \"SELECT books.id, book_name, GROUP_CONCAT(name_author SEPARATOR ', ') as 'author' , year, num_pages, about_book, deleted, views, clicks, image\n FROM books \n JOIN relations ON book_id = books.id\n JOIN authors ON authors.id = author_id\n WHERE deleted is NULL \n GROUP BY id\n LIMIT :limit OFFSET :offset\";\n }\n\n $params = [\n [\":limit\", $this->limit, \\PDO::PARAM_INT],\n [\":offset\", $offset, \\PDO::PARAM_INT]\n ];\n return $this->bindAndQuery($sql, $params);\n }", "public function index()\n {\n return books::orderBy('created_at')->get();\n }", "public function index() {\n $books = Book::orderBy('created_at', 'desc')->get()->toArray();\n\n $books = array_map(function ($book) {\n $review_author = Book::find($book['id'])->user()->first()->name;\n $book['review_author'] = $review_author;\n return $book;\n }, $books);\n\n return $books;\n }", "public function getBookList()\n {\n return $this->bookDao->getBookList();\n }", "public function orderby(){\n\n $rows = $this\n ->db\n ->order_by(\"title\", \"asc\")\n ->order_by(\"id\", \"random\")\n ->get(\"personel\")\n ->result();\n\n print_r($rows);\n\n }", "public function getAllBooks(){\n return $this->libros;\n }", "public function getBooks()\n {\n return $this->hasMany(Book::className(), ['author_id' => 'id']);\n }", "public function getBook($title)\n\t{\n\t\t// in a real life scenario this will be done through a db select command\n\t\t$allBooks = $this->getBookList();\n\t\treturn $allBooks[$title];\n\t}", "public function practice2()\n {\n //dump(Str::plural('mouse'));\n\n dump(Book::find(3));\n dump(Book::all()->toArray());\n }", "public function get_books()\n {\n $this->load->database();\n // print_r($this->db->get(\"books\"));\n $query = $this->db->query(\"select * from books\");\n return $query->result();\n }", "public function allBooks ()\n {\n $books = $this->book->findAll();\n $this->show('admin/allbooks', ['books' => $books]);\n }", "public function getBookList()\n\t{\n\t\treturn array(\n\t\t\t\"1\" => new Book(\"Être et Temps\", \"9782070707393\", 1, 1, 1),\n\t\t\t\"2\" => new Book(\"Finnegans Wake\", \"9782070402250\", 2, 2, 2),\n\t\t\t\"3\" => new Book(\"Critique de la raison pure\", \"9782070325757\", 3, 3, 3)\n\t\t);\n\t}", "public function getBooks()\n\t{\n\t\treturn $this->books;\n\t}", "function findDocuments( $orderby='name DESC' )\n\t{\n\t\t//return MyActiveRecord::FindAll( 'Documents', 'item_id = '.$this->id, $orderby );\n\t\treturn MyActiveRecord::FindBySql('Documents', \"SELECT * FROM documents WHERE item_id = \".$this->id.\" ORDER BY \".$orderby.\"\");\n\t}", "public function getBookByName(Request $request) {\n\n $request->validate([\n 'title' => 'required'\n ]);\n \n $title = $request->title;\n\n $book = Libro::where('title', $title)\n ->orWhere('title', 'like', '%' . $title . '%')->get();\n\n return $book;\n \n }", "public static function getTitles(){\n //localhost:8001/api/books\n $response = Http::get(env(\"API_URL\") . \"titles\");\n //Devolver el resultado como un arreglo de PHP\n return $response->json();\n }", "public function getAll () {\n $order = new stdClass();\n $order->column = 'name';\n $order->type = 'asc';\n $authors = $this->Author_model->getAll($order);\n\n print(json_encode($authors));\n }", "public function actionIndex()\n {\n $searchModel = new BookSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n \n $dataProvider->query->joinWith(['topic','language','user',]);\n \n \n $dataProvider->sort->attributes['topic.name'] = [\n 'asc' => ['topic.name' => SORT_ASC],\n 'desc' => ['topic.name' => SORT_DESC],\n ];\n \n \n $dataProvider->sort->attributes['language.name'] = [\n 'asc' => ['language.name' => SORT_ASC],\n 'desc' => ['language.name' => SORT_DESC],\n ];\n \n \n $dataProvider->sort->attributes['user.name'] = [\n 'asc' => ['user.name' => SORT_ASC],\n 'desc' => ['user.name' => SORT_DESC],\n ];\n \n \n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function get_book()\n {\n $sql = DB::select('select * from books');\n return $sql;\n }", "public function getBooks(){\n $sql = \"SELECT * FROM book;\";\n $res = mysqli_query($this->link, $sql);\n $books = mysqli_fetch_all($res);\n return $books;\n }", "public function booklist()\n {\n $book = Post::where('key', 'book')->get();\n return view('backends.booklist')->with('book', $book);\n }", "public function practice14 (){\n $results = Book::find(1);\n\n $results = Book::orderBy('title')->first();\n dump($results);\n\n # Yields a collection of multiple books\n $results = Book::all();\n\n $results = Book::orderBy('title')->get();\n dump($results->first());\n\n # Should match 1 book; yields a Collection of 1 Book\n $results = Book::where('author', 'F. Scott Fitzgerald')->get();\n\n # Should match 0 books; yields an empty Collection\n $results = Book::where('author', 'Virginia Wolf')->get();\n\n # Even though we limit it to 1 book, we're using the `get` fetch method so we get a Collection (of 1 Book)\n $results = Book::limit(1)->get();\n }", "public function books()\n {\n return $this->morphedByMany('App\\Book', 'taggable');\n }", "public function kerko($title)\n {\n // return DB::select(\"Select * from books where title like '%\".$title.\"%'\");\n return Book::where('title','like','%'.$title.'%')->get();\n }", "public function listBooks()\n {\n //list all books in database\n $sql2 = \"SELECT * from book\";\n $userBooks = mysql_fetch_array(mysql_query($sql2));\n return $userBooks; \n }", "public function getBooks($id) {\n }", "public function getEx3() {\n # Use the QueryBuilder to get all the books where author is like \"%Scott%\"\n $books = \\DB::table('books')->where('author', 'LIKE', '%Scott%')->get();\n # Output the results\n $this->printBooks($books);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function run()\n {\n $book = [\n [\n 'book_name' => 'Wikipedia',\n 'description' => 'Sint commodo veniam ad cillum occaecat aute consectetur Lorem. Occaecat adipisicing est ad do tempor ipsum. Eu eiusmod proident sit amet consectetur irure sunt consequat. Dolor anim nisi consequat nulla veniam magna duis ex aliquip veniam.',\n 'img' => '.\\public\\wiki.jpg',\n 'author_id' => '2',\n ],\n [\n 'book_name' => 'Qui commodo',\n 'description' => 'Et occaecat in ut pariatur elit qui. Enim do consectetur velit sunt minim velit eu est. Laboris cillum eiusmod ex aliquip. Voluptate in reprehenderit est ea duis duis magna.',\n 'img' => '.\\public\\wiki.jpg',\n 'author_id' => '1',\n ],\n [\n 'book_name' => 'Et occaecat in',\n 'description' => 'Excepteur dolore labore reprehenderit ex quis reprehenderit nulla deserunt ullamco ea exercitation aliqua aute. Fugiat esse pariatur fugiat exercitation incididunt adipisicing ex excepteur id aute labore ad fugiat nulla. Incididunt nulla nostrud in labore in pariatur irure ipsum ipsum exercitation.',\n 'img' => '.\\public\\wiki.jpg',\n 'author_id' => '3',\n ],\n [\n 'book_name' => 'Excepteur dolore',\n 'description' => 'Adipisicing officia reprehenderit consequat labore excepteur culpa laborum occaecat. Adipisicing anim deserunt reprehenderit exercitation in deserunt. Lorem ad aliquip exercitation aliquip esse adipisicing ullamco in ullamco deserunt ipsum anim. Cillum esse fugiat proident elit aliquip. Magna reprehenderit aliquip laborum cillum in veniam in nostrud dolore irure proident veniam nulla est.',\n 'img' => '.\\public\\wiki.jpg',\n 'author_id' => '4',\n ],\n [\n 'book_name' => 'Adipisicing officia',\n 'description' => 'Anim occaecat ad est nulla laboris laborum esse irure id ullamco adipisicing fugiat laborum nisi. Amet minim sit commodo proident adipisicing exercitation in elit laboris. Ex elit aliquip magna adipisicing veniam officia sit proident duis non. Eiusmod minim aute do ea sit veniam excepteur adipisicing quis exercitation commodo in laborum nulla. Commodo anim commodo et aliquip reprehenderit laboris aute ut cupidatat magna. Culpa veniam aliqua tempor adipisicing anim aliqua magna ipsum qui magna dolore elit dolor. Id exercitation quis esse laborum anim dolore ipsum reprehenderit do.',\n 'img' => '.\\public\\wiki.jpg',\n 'author_id' => '5',\n ],\n ];\n\n foreach ($book as $data) {\n \\App\\Models\\Book::create($data);\n }\n }", "public function top(): Collection\n {\n return $this->authorModel\n ->select('name')\n ->withCount('books')\n ->orderBy('books_count', 'desc')\n ->get();\n }", "public function multiLoadTitles() {\n\t\t$table = self::table;\n\t\t\n\t\t$query = <<<SQL\nSELECT `id`, `course`, `number`, `title` FROM `%s{$table}` ORDER BY `title` ASC\nSQL;\n\n\t\treturn $this->clean($this->getUsingQuery($query));\n\t}", "public function latest_books()\n {\n //thiet lap rieng\n $this->paginate = array(\n 'fields' => array('id', 'title', 'slug', 'image', 'sale_price'),\n 'order' => array('created' => 'desc'),\n 'limit' => 8,\n 'contain'=> array(\n 'Writer' => array('name', 'slug')\n ),\n 'conditions' => array('published'=>1),\n 'paramType'=> 'querystring', //thay đổi đường dẫn xuất hiện\n );\n $books = $this->paginate(); //mac dinh la 20 quyen sach va k co thiet lap dieu kien muon thiet lap dieu kien thi dung bien public paginate\n \n $this->set('books', $books);\n $this->set('title_for_layout', 'Sach moi Chiken');\n }", "public static function get_all_books_delete() {\n\t\t$books = BooksQModel::get_books_delete();\n\n\t\tforeach ($books as $book) {\n\t\t\t//shorted description\n\t\t\tif (strlen($book->description) >= 122)\n\t\t\t\t$book->description = mb_substr($book->description, 0, 120).'...';\n\t\t\t//get uploader\n\t\t\t$uploader = UsersQModel::get_user_by_id($book->id_uploader);\n\t\t\tif ($uploader != null)\n\t\t\t\t$book->uploader = $uploader->name;\n\t\t\telse\n\t\t\t\t$book->uploader = 'Đang cập nhật';\n\t\t}\n\n\t\treturn $books;\n\t}", "static public function getAll()\r\n {\r\n\r\n //connect with DB\r\n $db = Database::getConnect();\r\n $sql = \"SELECT `book_id`,`name`, `author`, `published_date` FROM `books` WHERE `deleted_at` IS NULL ORDER BY `book_id`\";\r\n $result = $db->query($sql);\r\n $result->execute();\r\n return $result->fetchAll();\r\n }", "public function listall()\r\n {\r\n $this->db->select('*');\r\n $this->db->from('books');\r\n $this->db->join('author', 'books.author_ID=author.Author_ID');\r\n\r\n $q = $this->db->get();\r\n return $q->result();\r\n \r\n\r\n }", "function get_all_booksinn($params = array())\n {\n $this->db->select(\"booksinn.*, books.name as bookname\");\n $this->db->join('books','books.id=booksinn.books_id','inner');\n $this->db->order_by('id', 'desc');\n if(isset($params) && !empty($params))\n {\n $this->db->limit($params['limit'], $params['offset']);\n }\n return $this->db->get('booksinn')->result_array();\n }", "public function getBookTitle()\n {\n return $this->book->book_title;\n }", "public function index()\n {\n return BookResources::collection(Book::with(['user','categories','authors'])->get());\n }", "public function books()\n {\n return $this->get('/books');\n }", "public function getBook()\n\t{\n\t\treturn $this->getKeyValue('book'); \n\n\t}", "public function practice20()\n {\n # Get the first book as an example\n $book = Book::first();\n\n# Get the author from this book using the \"author\" dynamic property\n# \"author\" corresponds to the the relationship method defined in the Book model\n $author = $book->author;\n\n# Output\n dump($book->title.' was written by '.$author->first_name.' '.$author->last_name);\n dump($book->toArray());\n }", "public function getByTitle()\n {\n }", "public function getEx1() {\n # Use the QueryBuilder to get all the books\n $books = \\DB::table('books')->get();\n $this->printBooks($books);\n }", "function get_all_textbooks($db)\n{\n\t$sql = 'SELECT * FROM textbooks ORDER BY date_time DESC';\n\t$st = $db->prepare($sql);\n\t$st->execute();\n\t$us = $st->fetchAll();\n\treturn $us;\n}", "public function getallbooks(){\n\t\t\t$this->db->select('id, name, price, author, category, language, ISBN, publish_date')\n\t\t\t\t\t ->from('tbl_books');\n\t\t\t$this->db->order_by('id', 'desc');\n\n\t\t\t$query = $this->db->get();\n\n\t\t\tif($query->num_rows() > 0){\n\t\t\t\treturn $query->result_array();\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t}", "public function allBooksOderedByType()\n {\n $qb = $this->createQueryBuilder('b')\n ->select('b.title, b.type, b.isbn, b.author')\n ->orderBy('b.type');\n\n $query = $qb->getquery();\n \n return $query->execute();\n }", "public function indexalpha_author()\n {\n\t$books = Book::where('id','>','0')->orderBy('name', 'asc')->get();\n\t$books=$books->sortBy(function ($book) {\n\t return ($author = $book->first_author()) ? $author->surname : null;\n\t });\n\n\t$booksalpha=array();\n\tforeach ($books as $book) {\n\t\t$author=$book->first_author();\n\t\t$firstletter=\"\";\n\t\tif ($author!=null) $firstletter=mb_substr(trim($author->surname),0,1);\n\t\t$firstletter.=\"...\";\n\t\tif (!isset($booksalpha[$firstletter])) $booksalpha[$firstletter]=array();\n\t\t$booksalpha[$firstletter][]=$book;\n\t}\n\treturn view('library.books.booksalpha')->with('booksalpha', $booksalpha);\n }", "public function findAll() {\n $sql = \"select * from book order by book_id desc\";\n $result = $this->getDb()->fetchAll($sql);\n\n // Convert query result to an array of domain objects\n $livres = array();\n foreach ($result as $row) {\n $livreId = $row['book_id'];\n $livres[$livreId] = $this->buildDomainObject($row);\n }\n return $livres;\n }", "function getAllBooks( ) {\n global $db;\n $stmt = mysqli_prepare(\n $db,\n 'SELECT\n books.bid,\n books.title,\n books.description,\n bookauthors.name,\n genres.name,\n books.coverimage\n FROM\n books CROSS\n JOIN bookgenres ON bookgenres.bid = books.bid CROSS\n JOIN genres ON genres.id = bookgenres.genreid CROSS\n JOIN bookauthors ON bookauthors.bid = books.bid CROSS\n JOIN bcopies ON bcopies.bid = books.bid\n WHERE\n bcopies.deleted = 0 AND\n bcopies.given = 0\n ORDER BY\n books.title ASC\n ');\n mysqli_stmt_execute( $stmt );\n mysqli_stmt_store_result( $stmt );\n mysqli_stmt_bind_result( $stmt,$id, $title, $description, $author, $genre, $image );\n while ( mysqli_stmt_fetch( $stmt ) ) {\n $book[ 'title' ] = $title;\n $book[ 'img' ] = $image;\n $book[ 'description' ] = $description;\n $book[ 'authors' ][ $author ] = true;\n $book[ 'genres' ][ $genre ] = true;\n $book[ 'bid' ] = $id;\n $books[ $id ] = $book;\n }\n return $books;\n }", "public function getBookTitle()\n {\n return $this->title;\n }", "public function getBook($isbn);", "public function getBooks(\n\t\t$from = 0, $limit = 12, $orderBy = 'id',\n\t\t$cena_od = 0,\t$cena_do = NULL, $hladaj = NULL, $autor = NULL\n\t\t) {\n\t\t$whereSql = ' price >= :cena_od AND price <= :cena_do ';\t\t\n\t\t$whereHodnoty = [\t\t\t\t\n\t\t\t\t'cena_od' => $cena_od,\n\t\t\t\t'cena_do' => ($cena_do === NULL) ? '99999' : $cena_do, \n\t\t\t];\n\t\t\t// 99999 get max price\n\n\t\t\tif($hladaj != NULL) {\n\t\t\t\t$whereSql .= ' AND MATCH (title, description, excerpt) AGAINST (:hladaj) ';\n\t\t\t\t$whereHodnoty['hladaj'] = $hladaj;\n\t\t\t}\n\n\t\t\tif($autor != NULL) {\n\t\t\t\t$whereSql .= ' AND author = :autor ';\n\t\t\t\t$whereHodnoty['autor'] = $autor;\n\t\t\t}\n/*\n \t\t\tif($hladaj != NULL) {\n \t\t\t\t$whereSql .= ' OR authors.name LIKE :hladaj_autora ' ;\t\n \t\t\t\t$whereHodnoty['hladaj_autora'] = '%'.$hladaj.'%';\n \t\t\t\t\t\t\t\n \t\t\t}\n*/\n\n\n\t\t$this->db;\t\t\n\t\t$sth = $this->db->prepare(' SELECT * FROM ' . self::TABLE_NAME . ' \n \n\t\tWHERE '.$whereSql.'\n\n\t\tORDER BY ' . $orderBy . '\n\n\t\tLIMIT ' . $from . ', '. $limit . ' ' \n\n\t\t);\n\n\n\t\t$sth->execute( $whereHodnoty );\n\t\t\n\n\n $books = [];\n\t\twhile($book = $sth->fetchObject(__CLASS__)) {\n\n\t\t $books[] = $book;\t\n\t\t\n\t }\n\n\t\t$this->count = $this->getCount($whereSql , $whereHodnoty);\n\n\t\treturn $books;\n\n\t\t//var_dump($books);\n\t\t\n }", "public function getBookAuthors() {\n return $this->hasMany(BookAuthor::className(), ['book_id' => 'id']);\n }", "public function index() {\n\n $this->validate(request(), [\n 'q' => 'string|required'\n ]);\n\n switch (request('sort')){\n default:\n case 'title':\n $sort['field'] = \"title\";\n break;\n case 'author':\n $sort['field'] = \"author\";\n break;\n case 'date':\n $sort['field'] = \"publication_date\";\n break;\n }\n\n switch (request('order')){\n default:\n case 'asc':\n $sort['order'] = \"asc\";\n break;\n case 'desc':\n $sort['order'] = \"desc\";\n break;\n }\n\n $books = Book::where(function ($query) {\n $query->where('public', true)->orWhere('contributed_by', Auth::id());\n })->where(function ($query) {\n $query->where('title', 'like', '%'.request('q').'%')\n ->orWhere('author', 'like', '%'.request('q').'%');\n })->orderBy($sort['field'], $sort['order'])->get();\n\n return view('search', compact('books', 'sort'));\n\n }", "public function index()\n {\n return BookResource::collection(Book::orderByDesc(\"id\")->get());\n }", "public function findLatestTitle()\n\t{\n\t\treturn $this->dibi->fetchAll(\"\n\t\t\tSELECT \t\n\t\t\t\ttitle, volume, year\n\t\t\tFROM\n\t\t\t\tjournal\n\t\t\tORDER BY\n\t\t\t\tyear DESC, volume DESC\n\t\t\tLIMIT 1\t\n\t\t\t\");\n\t}", "public function getEx10() {\n $books = \\App\\Book::where('published','>',1950)->get();\n $this->printBooks($books);\n # Underlying SQL: select * from `books` where `published` > '1950'\n }", "public function index()\n { //select all books\n return Book::all();\n }", "public function findAll() {\n return $this->findBy(array(), array('title' => 'ASC'));\n }", "public function getAllOrderedByName()\n {\n return $this->model->orderBy('name', 'asc')->get();\n }", "public function index()\n {\n $b = newbook::\n orderBy('id', 'desc')\n //take(10)\n ->get();\n\n return $b->toJson();\n \n }", "private function getBooksByAuthor(array $args = []): BookCollection\n {\n// if (empty($args['author'])) {\n return new BookCollection();\n/* }\n\n $firstName = (empty($args['author']['firstName']) ? '' : $args['author']['firstName']);\n $lastName = (empty($args['author']['lastName']) ? '' : $args['author']['lastName']);\n\n try {\n $bookModel = new BookModel($this->container);\n } catch (\\Exception $e) {\n return new BookCollection();\n }\n\n return $bookModel->findBooksByAuthor($lastName, $firstName); */\n }", "public function getBookauthors()\n {\n return $this->hasMany(Bookauthor::className(), ['bookId' => 'bookId']);\n }", "public function getAllTitles() {\n $stmt = $this->conn->prepare(\"SELECT title FROM titles\");\n $stmt->execute(); //prepared statements\n $arrayOfTitles = $stmt->fetchAll(PDO::FETCH_ASSOC);\n return $arrayOfTitles;\n }", "public function findAll()\n {\n return $this->getRepository()->findBy(array(), array('title' => 'ASC'));\n }", "public function getTitle(){\n\t\treturn $this->ol[\"ISBN:\".$this->isbn][\"title\"];\t\n\t}", "public function get_authors();", "protected function _getBookTitle()\n {\n return $this->mBook['title'];\n }", "public function bookIndex(): array\n {\n return $this->bookRepository->findAllUserBooks(\\Auth::user()->getUid());\n }", "public function getTitle(){\n $this->db->from('accessory_title');\n $this->db->order_by(\"id\", \"desc\");\n $query = $this->db->get(); \n return $query->result();\n }", "public function books()\n {\n\t \t return $this->belongsToMany(Book::class);\n }", "public function run()\n {\n $time = date(\"Y-m-d H:i:s\");\n\n $books = [\n ['title' => 'Finnegans Wake', 'author' => 'Janes Joyce', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'Don Quixote', 'author' => 'Miguel De Cervantes', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'The Making of Americans', 'author' => 'Gertrude Stein', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'The Stranger', 'author' => 'Albert Camus', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'Pilgrims Progress', 'author' => 'John Bunyan', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'In Search of Lost Time', 'author' => 'Marcel Proust', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'Pale Fire', 'author' => 'Valdimir Nabokov', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'The Trial', 'author' => 'Franz Kafka', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'Ulysses', 'author' => 'James Joyce', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'The Name of the Rose', 'author' => 'Umberto Eco', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'The Gulag Archipelago', 'author' => 'Aleksandr Solzhenitsyn', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'The Diary of a Young Girl', 'author' => 'Anne Frank', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'Gravity\\'s Rainbow', 'author' => 'Thomas Pynchon', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'One Hundred Years of Solitude', 'author' => 'Gabriel García Márquez', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'The Sound and the Fury', 'author' => 'William Faulkner', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'Confusion of Feelings', 'author' => 'Stefan Zweig', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'The Public Burning', 'author' => 'Robert Coover', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'The Joke', 'author' => 'Milan Kundera', 'created_at' => $time, 'updated_at' => $time],\n ];\n\n DB::table('books')->insert($books);\n }", "public function getBookAuthors()\n {\n return $this->hasMany(BookAuthor::className(), ['book_id' => 'id']);\n }", "public function index()\n\t{\n\n\t\t$book_list = Books::select('book_id', 'title', 'author', 'description', 'book_categories.category')\n\t\t\t->join('book_categories', 'book_categories.id', '=', 'books.category_id')\n\t\t\t->orderBy('book_id')->get();\n\t\t// dd($book_list);\n\t\t// $this->filterQuery($book_list);\n\n\t\t// $book_list = $book_list->get();\n\n\t\tfor ($i = 0; $i < count($book_list); $i++) {\n\n\t\t\t$id = $book_list[$i]['book_id'];\n\t\t\t$conditions = array(\n\t\t\t\t'book_id'\t\t\t=> $id,\n\t\t\t\t'available_status'\t=> 1\n\t\t\t);\n\n\t\t\t$book_list[$i]['total_books'] = Issue::select()\n\t\t\t\t->where('book_id', '=', $id)\n\t\t\t\t->count();\n\n\t\t\t$book_list[$i]['avaliable'] = Issue::select()\n\t\t\t\t->where($conditions)\n\t\t\t\t->count();\n\t\t}\n\n\t\treturn $book_list;\n\t}", "public static function getTitles( )\n {\n // get array with data. Through DAO this will be a bit of quicker.\n $query = 'SELECT id, title FROM ' . static::tableName();\n $records = Yii::app()\n ->db\n ->createCommand( $query )\n ->queryAll();\n\n // prepare result array\n $data = array();\n foreach( $records as $record ) {\n $data[ $record[ 'id' ] ] = $record[ 'title' ];\n }\n\n return $data;\n }", "function booksList($offset, $total_records_per_page, $order, $ascdesc)\n{\n $booksManager = new ListManager();\n\n\n\n if (isset($_GET['search']) && $_GET['search']!='') {\n $search = input(addcslashes($_GET['search'], '_'));\n $search=\"%\".$search.\"%\";\n $books = $booksManager->get_search($offset, $total_records_per_page, $order, $ascdesc, $search);\n } elseif (isset($_GET['cat']) && $_GET['cat']!='') {\n $cat = input($_GET['cat']);\n $books = $booksManager-> get_cat($offset, $total_records_per_page, $order, $ascdesc, $cat);\n } else {\n $books = $booksManager->selectAll($offset, $total_records_per_page, $order, $ascdesc); // Appel la fonction qui renvoie toutes les données sur les livres en bdd\n }\n // require('view/listView.php');\n return $books;\n echo selectAll();\n}", "function get_movies(){\n\t$db= $GLOBALS['db'];\n\t$results= $db->query(\"SELECT * FROM movies ORDER BY title \" );\n\treturn $db->resToArray($results);\n}", "public function getBooks()\r\n {\r\n $bookNodes = $this->dom->getElementsByTagName('book');\r\n $books = [];\r\n\r\n foreach($bookNodes as $domNode) {\r\n $book = [];\r\n\r\n foreach($domNode->childNodes as $dn) {\r\n if ($dn->nodeName === 'author') {\r\n $book['author'] = $dn->nodeValue;\r\n }\r\n\r\n if ($dn->nodeName === 'pages') {\r\n $book['pages'] = $dn->nodeValue;\r\n }\r\n\r\n if ($dn->nodeName === 'title') {\r\n $book['title'] = $dn->nodeValue;\r\n }\r\n\r\n if ($dn->nodeName === 'code') {\r\n $book['code'] = $dn->nodeValue;\r\n }\r\n }\r\n\r\n $books[] = $book;\r\n }\r\n\r\n return $books;\r\n }", "public function testFetchLyricsByTitle()\n {\n $songlist = new Songlist($this->con, 0, $this->m);\n $cont = $songlist->FetchLyricsById(0,True, \"Be all end all\");\n }", "private function printBooks($books) {\n foreach($books as $book) {\n echo 'id:'.$book->id.' title: '.$book->title.'<br>';\n }\n }", "public function index()\n {\n $books = Book::whereNotNull('is_approved')\n ->with('authors')\n ->with('genres')\n ->withAvg('reviews', 'rating')\n ->when(request('user_books') && Auth::check(), function ($query) {\n $query->where('user_id', auth()->user()->id)\n ->whereNotNull('is_approved')\n ->orWhere(function($query){\n $query->whereNull('is_approved')\n ->where('user_id', auth()->user()->id);\n });\n })\n ->when(request('search'), function ($query) {\n $search = request('search');\n $query->whereNotNull('is_approved')\n ->where('title', 'LIKE', '%' . $search . '%')\n ->orWhere(function($query) use ($search){\n $query->whereNotNull('is_approved')\n ->where('description', 'LIKE', '%' . $search . '%');\n })\n ->orWhereHas('genres', function ($query) use ($search) {\n $query->whereNotNull('is_approved')\n ->where('name', 'LIKE', '%' . $search . '%');\n })\n ->orWhereHas('authors', function ($query) use ($search) {\n $query->whereNotNull('is_approved')\n ->where('name', 'LIKE', '%' . $search . '%');\n });\n })\n ->latest()\n ->paginate(25);\n\n\n\n return view('book.index', compact('books'));\n }", "public function getBook()\n {\n return $this->_book;\n }" ]
[ "0.69672763", "0.67620957", "0.66572577", "0.6633597", "0.66289234", "0.65558666", "0.6538621", "0.65146446", "0.65015584", "0.6445272", "0.64435744", "0.6397994", "0.6377456", "0.6371801", "0.6368506", "0.63493663", "0.6328112", "0.6325117", "0.63138676", "0.6281114", "0.62452453", "0.6216357", "0.6216028", "0.6192658", "0.61877286", "0.6155264", "0.61551714", "0.61481786", "0.614567", "0.61191756", "0.60920197", "0.60876197", "0.6064637", "0.60617226", "0.60181195", "0.6009531", "0.59658563", "0.59600943", "0.5958389", "0.59501666", "0.5946254", "0.5945751", "0.5942264", "0.5935143", "0.5926094", "0.5920408", "0.59184587", "0.5918211", "0.5913308", "0.5884918", "0.5884404", "0.5867725", "0.5862512", "0.5844764", "0.58421403", "0.583871", "0.58356076", "0.58345217", "0.58251023", "0.5821611", "0.5805907", "0.57806134", "0.5765081", "0.5752262", "0.5749934", "0.5744987", "0.5744175", "0.57343686", "0.57308704", "0.5728398", "0.5727792", "0.5705305", "0.57050693", "0.569749", "0.56916475", "0.5691512", "0.56859046", "0.5679918", "0.5667221", "0.56655955", "0.5664574", "0.5661896", "0.5655197", "0.565268", "0.56502986", "0.5647859", "0.56357557", "0.5624193", "0.56183064", "0.5614118", "0.55945027", "0.55942416", "0.5591268", "0.5590601", "0.558829", "0.55849767", "0.5578084", "0.5570931", "0.5569428", "0.55579835" ]
0.6956423
1
Practice from notes on Models: Retrieve all the books published after 1950
public function getEx10() { $books = \App\Book::where('published','>',1950)->get(); $this->printBooks($books); # Underlying SQL: select * from `books` where `published` > '1950' }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEx12() {\n $books = \\App\\Book::orderBy('published','desc')->get();\n $this->printBooks($books);\n # Underlying SQL: select * from `books` order by `published` desc\n\t}", "function bm_get_books($all=false) {\n\n $now = time();\n $books = array();\n $data = @getXML(BMBOOKCACHE);\n \n \n foreach ($data->item as $item) {\n if ($all || $item->private != 'Y' && strtotime($item->date) < $now)\n $books[] = $item;\n }\n return $books;\n}", "public function getEx11() {\n $books = \\App\\Book::orderBy('title','asc')->get();\n $this->printBooks($books);\n # Underlying SQL: select * from `books` order by `title` asc\n }", "public function get_book();", "public function getAllBooks(){\n $query = \"SELECT * FROM Book;\";\n return $this->getBookDetail($query);\n }", "public function latest_books()\n {\n //thiet lap rieng\n $this->paginate = array(\n 'fields' => array('id', 'title', 'slug', 'image', 'sale_price'),\n 'order' => array('created' => 'desc'),\n 'limit' => 8,\n 'contain'=> array(\n 'Writer' => array('name', 'slug')\n ),\n 'conditions' => array('published'=>1),\n 'paramType'=> 'querystring', //thay đổi đường dẫn xuất hiện\n );\n $books = $this->paginate(); //mac dinh la 20 quyen sach va k co thiet lap dieu kien muon thiet lap dieu kien thi dung bien public paginate\n \n $this->set('books', $books);\n $this->set('title_for_layout', 'Sach moi Chiken');\n }", "public function getEx15() {\n $books = Book::all();\n $this->printBooks($books);\n\t}", "public function getEx9() {\n # Ref: https://laravel.com/docs/5.2/queries#ordering-grouping-limit-and-offset\n $books = \\App\\Book::orderBy('id', 'desc')->get()->take(5);\n $this->printBooks($books);\n # Underlying SQL: select * from `books` order by `id` desc\n }", "public function books(): Collection;", "public function getallBooks()\r\n {\r\n $sql = \"SELECT id, name, publisher, year,description FROM book\";\r\n $query = $this->db->prepare($sql);\r\n $query->execute();\r\n\r\n return $query->fetchAll();\r\n }", "public function loadAllWithBookCount();", "public function practice17()\n {\n $books = Book::all();\n\n foreach ($books as $book) {\n dump($book->title);\n }\n }", "public function getBooks()\n\t{\n\t\treturn $this->books;\n\t}", "public function titleDetailsFilteredOpds($books);", "public function getAllBooks(){\n return $this->libros;\n }", "public function getBooks()\n {\n $page = isset($_GET['page']) ? $_GET['page'] : 1;\n $this->limit = isset($_GET['limit']) ? $_GET['limit'] : $this->limit;\n $offset = $this->limit * ($page - 1);\n\n\n if (USE_ONE_TABLE) {\n $this->table = 'books_authors';\n $sql = \"SELECT * FROM $this->table WHERE `deleted` is NULL LIMIT :limit OFFSET :offset\";\n } else {\n $this->table = 'relations';\n $sql = \"SELECT books.id, book_name, GROUP_CONCAT(name_author SEPARATOR ', ') as 'author' , year, num_pages, about_book, deleted, views, clicks, image\n FROM books \n JOIN relations ON book_id = books.id\n JOIN authors ON authors.id = author_id\n WHERE deleted is NULL \n GROUP BY id\n LIMIT :limit OFFSET :offset\";\n }\n\n $params = [\n [\":limit\", $this->limit, \\PDO::PARAM_INT],\n [\":offset\", $offset, \\PDO::PARAM_INT]\n ];\n return $this->bindAndQuery($sql, $params);\n }", "public function getAllBooks() {\n \n $allBooks = Libro::all();\n\n return $allBooks;\n }", "public function getBooks()\n {\n $sql = 'SELECT bookshop_books.id,\n bookshop_books.description,\n bookshop_books.booksName,\n bookshop_books.pubyear,\n bookshop_discounts.id AS discountsId,\n bookshop_discounts.discountsName,\n bookshop_discounts.percent,\n bookshop_books.price,\n bookshop_authors.id AS idAuthors,\n bookshop_authors.authorsName,\n bookshop_genres.id AS idGenres,\n bookshop_genres.genresName\n FROM bookshop_books_to_authors\n INNER JOIN bookshop_books\n ON bookshop_books_to_authors.id_book = bookshop_books.id\n INNER JOIN bookshop_books_to_genres\n ON bookshop_books_to_genres.id_book = bookshop_books.id\n INNER JOIN bookshop_authors\n ON bookshop_books_to_authors.id_author = bookshop_authors.id\n INNER JOIN bookshop_genres\n ON bookshop_books_to_genres.id_genre = bookshop_genres.id\n INNER JOIN bookshop_discounts\n ON bookshop_books.id_discount = bookshop_discounts.id';\n \n $result = $this->db->execute($sql);\n\n if (!$result)\n return $this->error();\n\n return $this->formingBooks($result);\n }", "public function last30Books($lang, $nrOfTitles = 30, $filter = null);", "public function getEx8() {\n # Get all the books\n $books = \\App\\Book::all();\n $this->printBooks($books);\n # get() without any query constraints is the equivalent of all()\n $books = \\App\\Book::get();\n $this->printBooks($books);\n\t}", "public static function get_all_books() {\n\t\t$books = BooksQModel::get_all_books();\n\n\t\tforeach ($books as $book) {\n\t\t\t//shorted description\n\t\t\tif (strlen($book->description) >= 122)\n\t\t\t\t$book->description = mb_substr($book->description, 0, 120).'...';\n\t\t\t//get uploader\n\t\t\t$uploader = UsersQModel::get_user_by_id($book->id_uploader);\n\t\t\tif ($uploader != null)\n\t\t\t\t$book->uploader = $uploader->name;\n\t\t\telse\n\t\t\t\t$book->uploader = 'Đang cập nhật';\n\t\t}\n\n\t\treturn $books;\n\t}", "public function getBookList() \n {\n return array( \n \"Balagurusamy\" => new Book(\"Balagurusamy\", \"Balagurusamy\", \"C programming\"), \n \"CMM in Practice\" => new Book(\"CMM in Practice\", \"Pankaj Jalote\", \"\"), \n \"PHP for Dummies\" => new Book(\"PHP for Dummies\", \"Some Smart Guy\", \"\") \n ); \n }", "public function getBooks(\n\t\t$from = 0, $limit = 12, $orderBy = 'id',\n\t\t$cena_od = 0,\t$cena_do = NULL, $hladaj = NULL, $autor = NULL\n\t\t) {\n\t\t$whereSql = ' price >= :cena_od AND price <= :cena_do ';\t\t\n\t\t$whereHodnoty = [\t\t\t\t\n\t\t\t\t'cena_od' => $cena_od,\n\t\t\t\t'cena_do' => ($cena_do === NULL) ? '99999' : $cena_do, \n\t\t\t];\n\t\t\t// 99999 get max price\n\n\t\t\tif($hladaj != NULL) {\n\t\t\t\t$whereSql .= ' AND MATCH (title, description, excerpt) AGAINST (:hladaj) ';\n\t\t\t\t$whereHodnoty['hladaj'] = $hladaj;\n\t\t\t}\n\n\t\t\tif($autor != NULL) {\n\t\t\t\t$whereSql .= ' AND author = :autor ';\n\t\t\t\t$whereHodnoty['autor'] = $autor;\n\t\t\t}\n/*\n \t\t\tif($hladaj != NULL) {\n \t\t\t\t$whereSql .= ' OR authors.name LIKE :hladaj_autora ' ;\t\n \t\t\t\t$whereHodnoty['hladaj_autora'] = '%'.$hladaj.'%';\n \t\t\t\t\t\t\t\n \t\t\t}\n*/\n\n\n\t\t$this->db;\t\t\n\t\t$sth = $this->db->prepare(' SELECT * FROM ' . self::TABLE_NAME . ' \n \n\t\tWHERE '.$whereSql.'\n\n\t\tORDER BY ' . $orderBy . '\n\n\t\tLIMIT ' . $from . ', '. $limit . ' ' \n\n\t\t);\n\n\n\t\t$sth->execute( $whereHodnoty );\n\t\t\n\n\n $books = [];\n\t\twhile($book = $sth->fetchObject(__CLASS__)) {\n\n\t\t $books[] = $book;\t\n\t\t\n\t }\n\n\t\t$this->count = $this->getCount($whereSql , $whereHodnoty);\n\n\t\treturn $books;\n\n\t\t//var_dump($books);\n\t\t\n }", "public function index()\n {\n return books::orderBy('created_at')->get();\n }", "public function getBooks($id) {\n }", "public function get_books()\n {\n $this->load->database();\n // print_r($this->db->get(\"books\"));\n $query = $this->db->query(\"select * from books\");\n return $query->result();\n }", "public function index()\n {\n $books = Book::where('isApproved', true)->paginate(25);\n return BookResource::collection($books);\n }", "public function getEx3() {\n # Use the QueryBuilder to get all the books where author is like \"%Scott%\"\n $books = \\DB::table('books')->where('author', 'LIKE', '%Scott%')->get();\n # Output the results\n $this->printBooks($books);\n }", "public function getallbooks(){\n\t\t\t$this->db->select('id, name, price, author, category, language, ISBN, publish_date')\n\t\t\t\t\t ->from('tbl_books');\n\t\t\t$this->db->order_by('id', 'desc');\n\n\t\t\t$query = $this->db->get();\n\n\t\t\tif($query->num_rows() > 0){\n\t\t\t\treturn $query->result_array();\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t}", "public function index()\n {\n $title = 'Cadastrar Novo Livro';\n\n $lended_books = Book::whereHas('lendings', function ($query) {\n $query->where('date_finish', '=', null);\n })->pluck('id')->all();\n \n\n\n $books = Book::whereNotIn('id', $lended_books)->paginate($this->totalPage);\n \n \n\n return view('books.index', compact('books', 'title'));\n }", "public function books()\n {\n return $this->morphedByMany('App\\Book', 'source_genre');\n }", "public function getBookList()\n {\n return $this->bookDao->getBookList();\n }", "public static function firstPageBooks() {\n //but later on (when we have more books in the database), this method wants some\n //subset of books (like every books that start with \"s\", or most favourite books or books selected by admin or...)\n\n $books = Book::all();\n// self::sort_books($books);\n View::make('general/firstpage.html', array('books' => $books));\n }", "public function getBook($isbn);", "public function index()\n {\n $books= DB::table('books') \n ->where('available',true)\n ->get();\n return $books; \n }", "public function index()\n\t{\n\n\t\t$book_list = Books::select('book_id', 'title', 'author', 'description', 'book_categories.category')\n\t\t\t->join('book_categories', 'book_categories.id', '=', 'books.category_id')\n\t\t\t->orderBy('book_id')->get();\n\t\t// dd($book_list);\n\t\t// $this->filterQuery($book_list);\n\n\t\t// $book_list = $book_list->get();\n\n\t\tfor ($i = 0; $i < count($book_list); $i++) {\n\n\t\t\t$id = $book_list[$i]['book_id'];\n\t\t\t$conditions = array(\n\t\t\t\t'book_id'\t\t\t=> $id,\n\t\t\t\t'available_status'\t=> 1\n\t\t\t);\n\n\t\t\t$book_list[$i]['total_books'] = Issue::select()\n\t\t\t\t->where('book_id', '=', $id)\n\t\t\t\t->count();\n\n\t\t\t$book_list[$i]['avaliable'] = Issue::select()\n\t\t\t\t->where($conditions)\n\t\t\t\t->count();\n\t\t}\n\n\t\treturn $book_list;\n\t}", "public function getBooks()\n {\n return $this->hasMany(Book::className(), ['author_id' => 'id']);\n }", "function openskydora_get_most_viewed_items($count, $weeks_ago=7, $exclude=NULL) {\n\n $records = openskydora_get_most_viewed($count+20, $weeks_ago, $exclude);\n $item_records = array(); // No collections\n \n // filter out collection citation model\n foreach ($records as $pid=>$data) {\n $data->obj = islandora_object_load($pid);\n if (in_array('islandora:collectionCModel',$data->obj->models)) {\n // dsm ('collection! '. $pid);\n } else {\n $item_records[$pid] = $data;\n }\n }\n return array_slice($item_records, 0, $count, TRUE);\n}", "public function index()\n {\n $books = Book::whereNotNull('is_approved')\n ->with('authors')\n ->with('genres')\n ->withAvg('reviews', 'rating')\n ->when(request('user_books') && Auth::check(), function ($query) {\n $query->where('user_id', auth()->user()->id)\n ->whereNotNull('is_approved')\n ->orWhere(function($query){\n $query->whereNull('is_approved')\n ->where('user_id', auth()->user()->id);\n });\n })\n ->when(request('search'), function ($query) {\n $search = request('search');\n $query->whereNotNull('is_approved')\n ->where('title', 'LIKE', '%' . $search . '%')\n ->orWhere(function($query) use ($search){\n $query->whereNotNull('is_approved')\n ->where('description', 'LIKE', '%' . $search . '%');\n })\n ->orWhereHas('genres', function ($query) use ($search) {\n $query->whereNotNull('is_approved')\n ->where('name', 'LIKE', '%' . $search . '%');\n })\n ->orWhereHas('authors', function ($query) use ($search) {\n $query->whereNotNull('is_approved')\n ->where('name', 'LIKE', '%' . $search . '%');\n });\n })\n ->latest()\n ->paginate(25);\n\n\n\n return view('book.index', compact('books'));\n }", "public function allBooks ()\n {\n $books = $this->book->findAll();\n $this->show('admin/allbooks', ['books' => $books]);\n }", "public function books()\n {\n return $this->get('/books');\n }", "function get_all_booksinn($params = array())\n {\n $this->db->select(\"booksinn.*, books.name as bookname\");\n $this->db->join('books','books.id=booksinn.books_id','inner');\n $this->db->order_by('id', 'desc');\n if(isset($params) && !empty($params))\n {\n $this->db->limit($params['limit'], $params['offset']);\n }\n return $this->db->get('booksinn')->result_array();\n }", "public function getBorrowedbooks()\n {\n return $this->hasMany(Borrowedbooks::className(), ['bookId' => 'bookId']);\n }", "public function practice14 (){\n $results = Book::find(1);\n\n $results = Book::orderBy('title')->first();\n dump($results);\n\n # Yields a collection of multiple books\n $results = Book::all();\n\n $results = Book::orderBy('title')->get();\n dump($results->first());\n\n # Should match 1 book; yields a Collection of 1 Book\n $results = Book::where('author', 'F. Scott Fitzgerald')->get();\n\n # Should match 0 books; yields an empty Collection\n $results = Book::where('author', 'Virginia Wolf')->get();\n\n # Even though we limit it to 1 book, we're using the `get` fetch method so we get a Collection (of 1 Book)\n $results = Book::limit(1)->get();\n }", "public function findAll() {\n $sql = \"select * from book order by book_id desc\";\n $result = $this->getDb()->fetchAll($sql);\n\n // Convert query result to an array of domain objects\n $livres = array();\n foreach ($result as $row) {\n $livreId = $row['book_id'];\n $livres[$livreId] = $this->buildDomainObject($row);\n }\n return $livres;\n }", "public function index()\n {\n //\n return BookResource::collection(Book::with('ratings')->paginate(25));\n }", "public function listBooks()\n {\n //list all books in database\n $sql2 = \"SELECT * from book\";\n $userBooks = mysql_fetch_array(mysql_query($sql2));\n return $userBooks; \n }", "public function findAllBooks()\n {\n MyLogger::info(\"Entering OwnedBookBusinessService.findAllBooks\");\n //creates a connection\n $db = new Connection();\n $conn = $db->open();\n \n //creates an array of education\n $books = Array();\n \n //calls the data service\n $service = new OwnedBookDataService($conn);\n \n //calls the find all method in the data service\n $books = $service->findAllBooks();\n \n //closes the connection\n $conn = null;\n \n //return the array\n return $books;\n \n MyLogger::info(\"Exiting OwnedBookBusinessService.findAllBooks\");\n }", "public function getBook()\n\t{\n\t\treturn $this->getKeyValue('book'); \n\n\t}", "function get_all_textbooks($db)\n{\n\t$sql = 'SELECT * FROM textbooks ORDER BY date_time DESC';\n\t$st = $db->prepare($sql);\n\t$st->execute();\n\t$us = $st->fetchAll();\n\treturn $us;\n}", "public function get_book()\n {\n $sql = DB::select('select * from books');\n return $sql;\n }", "public function getBooks(){\n $sql = \"SELECT * FROM book;\";\n $res = mysqli_query($this->link, $sql);\n $books = mysqli_fetch_all($res);\n return $books;\n }", "public function getEx5() {\n $books = \\App\\Book::all();\n $this->printBooks($books);\n }", "public function getBookList()\n\t{\n\t\treturn array(\n\t\t\t\"1\" => new Book(\"Être et Temps\", \"9782070707393\", 1, 1, 1),\n\t\t\t\"2\" => new Book(\"Finnegans Wake\", \"9782070402250\", 2, 2, 2),\n\t\t\t\"3\" => new Book(\"Critique de la raison pure\", \"9782070325757\", 3, 3, 3)\n\t\t);\n\t}", "public function listLentBooks()\n {\n if (!$this->isLogged()) {\n header('Location: index.php');\n }\n\n $idUser = $this->user['id_user'];\n\n if (isset($_GET['page']) AND !empty($_GET['page'])) {\n $currentPage = (int) $this->cleanParam($_GET['page']);\n }\n else {\n $currentPage = 1;\n }\n\n $lentBookCount = $this->bookManager->lentBookCount($idUser);\n\n $perPage = 12;\n\n $pages = ceil($lentBookCount / $perPage);\n\n $first = ($currentPage * $perPage) - $perPage;\n\n if (isset($_GET['f']) AND !empty($_GET['f'])) {\n $filter = $this->cleanParam($_GET['f']);\n if($filter === \"title\") {\n $sortKey = \"title_book\";\n } else if ($filter === \"author\") {\n $sortKey = \"author_book\";\n } else if ($filter === \"all\") {\n $sortKey = \"date_add_book\";\n } else {\n $sortKey = \"date_add_book\";\n }\n }\n else {\n $sortKey = \"date_add_book\";\n }\n\n if(isset($_POST['button_search_engine'])) {\n if(isset($_POST['content_search']) && !empty($_POST['content_search'])) {\n $wishBook = 0;\n $lendBook = 1;\n $content = $this->cleanParam($_POST['content_search']);\n\n $searchBooks = $this->bookManager->listSearchBooks($idUser, $wishBook, $lendBook, $content);\n $countedBooksSearch = count($searchBooks);\n } \n } \n\n $listLentBooks = $this->bookManager->listLentBooks($idUser, $sortKey, $first, $perPage);\n\n if ($listLentBooks === false) {\n header('Location: index.php?action=error404');\n }\n\n require('App/View/listLentBooks.php');\n }", "public function index()\n {\n $bookRecord = BookRecord::with(['borrower','book']);\n return BookRecordResource::collection($bookRecord->paginate(20))->response();\n }", "public function index()\n {\n $b = newbook::\n orderBy('id', 'desc')\n //take(10)\n ->get();\n\n return $b->toJson();\n \n }", "public function getBookList() {\n\n $booklist = array();\n\n foreach ($this->db-> query(\"SELECT * FROM book\") as $row) {\n \n array_push($booklist, new Book($row['title'], $row['author'], $row['description'], $row['id']));\n }\n\n return $booklist;\n }", "public function index()\n {\n return BookResources::collection(Book::with(['user','categories','authors'])->get());\n }", "public function processBooks()\n\t{\n\t\tif ($this->site->lookupbooks !== '0') {\n\t\t\t$books = new Books($this->echooutput);\n\t\t\t$books->processBookReleases();\n\t\t}\n\t}", "public function books()\n {\n return $this->morphedByMany('App\\Book', 'taggable');\n }", "public function findByBookId($bookId);", "public static function filter_books_by_year($books, $year) {\n\t\t$result = [];\n\t\tforeach ($books as $book) {\n\t\t\t$first_date = date_create($year.'-01-01');\n\t\t\t$last_date = date_create($year.'-12-31');\n\t\t\t$book_date = date_create($book->release_at);\n\t\t\tif ($book_date >= $first_date && $book_date <= $last_date)\n\t\t\t\tarray_push($result, $book);\n\t\t}\n\t\treturn $result;\n\t}", "public function getLostBooks()\n {\n return $this->hasMany(LostBooks::className(), ['book_id' => 'id']);\n }", "public function Top150BooksForParticularDate($month, $year, $date, $optParams = array()) {\n $params = array('month' => $month, 'year' => $year, 'date' => $date);\n $params = array_merge($params, $optParams);\n $data = $this->__call('Top150BooksForParticularDate', array($params));\n if ($this->useObjects()) {\n return new BooksListResponse($data);\n } else {\n return $data;\n }\n }", "public function bookIndex(): array\n {\n return $this->bookRepository->findAllUserBooks(\\Auth::user()->getUid());\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function getBooksAttribute()\n {\n return $this->getBible()->getArrayOfBooks();\n }", "public function getEx1() {\n # Use the QueryBuilder to get all the books\n $books = \\DB::table('books')->get();\n $this->printBooks($books);\n }", "static public function getAll()\r\n {\r\n\r\n //connect with DB\r\n $db = Database::getConnect();\r\n $sql = \"SELECT `book_id`,`name`, `author`, `published_date` FROM `books` WHERE `deleted_at` IS NULL ORDER BY `book_id`\";\r\n $result = $db->query($sql);\r\n $result->execute();\r\n return $result->fetchAll();\r\n }", "private function getRecommendedBooks($book, $book_id)\n {\n $genre_id = $book->getGenre()->getId();\n $author_id = $book->getAuthor()->getId(); \n $entityManager = $this->getDoctrine()->getManager();\n $conn = $entityManager->getConnection();\n $sql = 'SELECT id FROM book \n WHERE id != :id AND genre_id = :genre_id\n ORDER BY RAND() LIMIT ' . $this->recommended_books_count;\n $stmt = $conn->prepare($sql);\n $stmt->execute([\n 'id' => $book_id, \n 'genre_id' => $genre_id, \n ]); \n $ids_genre = $stmt->fetchAll(\\PDO::FETCH_COLUMN); \n $ids_genre_count = count($ids_genre);\n \n if ($ids_genre_count < $this->recommended_books_count) {\n //get other books of this author\n $ids_genre_str = implode(',', $ids_genre); \n if ($ids_genre_count > 0) {\n $not_in_genre = ' AND id NOT IN ('.$ids_genre_str.') ';\n } else {\n $not_in_genre = '';\n }\n $limit = $this->recommended_books_count - $ids_genre_count;\n $sql = 'SELECT id FROM book\n WHERE id !=:id '.$not_in_genre.' \n AND author_id = :author_id\n ORDER BY RAND() LIMIT ' . $limit; \n $stmt = $conn->prepare($sql);\n $stmt->execute([\n 'id' => $book_id, \n 'author_id' => $author_id, \n ]); \n $ids_author = $stmt->fetchAll(\\PDO::FETCH_COLUMN); \n $ids_author_count = count($ids_author); \n $ids_genre_author_count = $ids_genre_count + $ids_author_count;\n \n if ($ids_genre_author_count < $this->recommended_books_count) {\n //get other books\n $ids_genre_author = array_merge($ids_genre, $ids_author);\n $ids_genre_author_str = implode(',', $ids_genre_author);\n if ($ids_genre_author_count > 0) {\n $not_in_genre_author = ' AND id NOT IN ('.$ids_genre_author_str.') ';\n } else {\n $not_in_genre_author = '';\n } \n $limit = $this->recommended_books_count - $ids_genre_author_count;\n $sql = 'SELECT id FROM book\n WHERE id !=:id '.$not_in_genre_author.' \n ORDER BY RAND() LIMIT ' . $limit; \n $stmt = $conn->prepare($sql);\n $stmt->execute(['id' => $book_id]); \n $ids_others = $stmt->fetchAll(\\PDO::FETCH_COLUMN);\n }\n } \n \n //get books\n $rep = $this->getDoctrine()->getRepository(Book::class);\n $books_genre = !empty($ids_genre) ? $rep->findById($ids_genre) : [];\n $books_author = !empty($ids_author) ? $rep->findById($ids_author) : [];\n $books_others = !empty($ids_others) ? $rep->findById($ids_others) : [];\n \n return [\n 'books_genre' => $books_genre,\n 'books_author' => $books_author,\n 'books_others' => $books_others,\n ];\n }", "function get_recent_items($num = 10)\n{\n return get_db()->getTable('Item')->findBy(array('sort_field' => 'added', 'sort_dir' => 'd'), $num);\n}", "public function index()\n {\n return BookResource::collection(Book::orderByDesc(\"id\")->get());\n }", "public function getAddressBooks();", "public function titleDetailsOpds($book);", "public function getOfficialDocuments() {}", "public function practice2()\n {\n //dump(Str::plural('mouse'));\n\n dump(Book::find(3));\n dump(Book::all()->toArray());\n }", "public function index()\n {\n $bookings = Booking::all()->sortByDesc('created_at')->forPage(0, 20);\n return $bookings;\n }", "public static function search_books_general($books, $search) {\n\t\t$books_filter = $books;\n\t\t// dd($result);\n\t\tif ($search->year != '0') {\n\t\t\t$books_filter = BooksBModel::filter_books_by_year($books_filter, $search->year);\n\t\t\t// dd($books_filter);\n\t\t} \n\t\tif ($search->status != '0') {\n\t\t\t$search->status = (int)$search->status;\n\t\t\t$search->status = $search->status - 1;\n\t\t\t$books_filter = BooksBModel::filter_books_by_status($books_filter, $search->status);\n\t\t\t// dd($books_filter);\n\t\t}\n\t\tif ($search->chap != '0') {\n\t\t\t$search->chap = (int)$search->chap;\n\t\t\t$books_filter = BooksBModel::filter_books_by_chap($books_filter, $search->chap);\n\t\t\t// dd($books_filter);\n\t\t}\n\t\tif ($search->author != '') {\n\t\t\t$books_filter = BooksBModel::filter_books_by_author($books_filter, $search->author);\n\t\t\t// dd($books_filter);\n\t\t}\n\t\tif ($search->character != '') {\n\t\t\t$books_filter = BooksBModel::filter_books_by_character($books_filter, $search->character);\n\t\t\t// dd($books_filter);\n\t\t}\n\t\tif ($search->trans != '') {\n\t\t\t$books_filter = BooksBModel::filter_books_by_trans($books_filter, $search->trans);\n\t\t\t// dd($books_filter);\n\t\t}\n\t\tif ($search->sort == '0'){\n\t\t\tif ($search->order == '0')\n\t\t\t\t$books_filter = collect($books_filter)->sortBy('update_at')->toArray();\n\t\t\telseif ($search->order == '1')\n\t\t\t\t$books_filter = collect($books_filter)->sortBy('update_at')->reverse()->toArray();\n\t\t}\n\t\telseif ($search->sort == '1'){\n\t\t\tif ($search->order == '0')\n\t\t\t\t$books_filter = collect($books_filter)->sortBy('name')->toArray();\n\t\t\telseif ($search->order == '1')\n\t\t\t\t$books_filter = collect($books_filter)->sortBy('name')->reverse()->toArray();\n\t\t}\n\t\telseif ($search->sort == '2') {\n\t\t\tif ($search->order == '0')\n\t\t\t\t$books_filter = collect($books_filter)->sortBy('view')->toArray();\n\t\t\telseif ($search->order == '1')\n\t\t\t\t$books_filter = collect($books_filter)->sortBy('view')->reverse()->toArray();\n\t\t}\n\t\t$result = [];\n\t\tif (count($books_filter)>12) {\n\t\t\tfor ($i=0; $i < 12; $i++) { \n\t\t\t\t$result[$i] = $books_filter[$i];\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $books_filter;\n\t}", "public function index()\n {\n try {\n $o=array();\n $books = $this->model->with(['book_clubs','genres','product_prices','users'])->where('status',1)->orderBy('title','ASC')->paginate(100);\n foreach($books as $book){\n $user=User::findOrFail($book->user_id);\n if($user->status==1){\n array_push($o,$book);\n }\n }\n if(count($o) != 0) {\n return (new BookCollection($o));\n }\n else {\n return ApiHelper::apiResult(true,HttpResponse::HTTP_OK,\"No Books Found\");\n }\n }\n catch(\\Exception $e) {\n return ApiHelper::apiResult(false,HttpResponse::HTTP_UNAUTHORIZED,$e->getMessage());\n }\n }", "public function booklist()\n {\n $book = Post::where('key', 'book')->get();\n return view('backends.booklist')->with('book', $book);\n }", "function outputBooks() {\n $db = connectDB();\n $books = new BooksGateway($db);\n $sql = $books->getSelectStatement();\n // Subcategory filter\n if (!empty($_GET['subcategory']) && empty($_GET['imprint'])) {\n $sql .= 'where SubcategoryName = \"'. $_GET['subcategory'] .'\"';\n }\n // Imprint filter\n elseif(empty($_GET['subcategory']) && !empty($_GET['imprint'])) {\n $sql .= 'where Imprint =\"' . $_GET['imprint']. '\"';\n }\n // Both filter\n elseif(!empty($_GET['subcategory']) && !empty($_GET['imprint'])) {\n $sql .= 'where SubcategoryName = \"'. $_GET['subcategory'] .'\"' . 'AND'.'Imprint =\"' . $_GET['imprint']. '\"';\n }\n // No filter\n else {\n // Print all books.\n }\n $sql .= ' group by Title order by Title ASC limit 0,20';\n $result = $books->getStatement($sql);\n //var_dump($result);\n foreach($result as $key => $value) {\n $img= '<img src=\"book-images/thumb/'.$result[$key]['ISBN10']. '.jpg\" alt=\"book\">';\n echo constructBookLink($result[$key]['ISBN10'], $img) .'<br/>';\n echo '<a href=\"single-book.php?ISBN10=' . $result[$key]['ISBN10'] . '\" class=\"';\n if (isset($_GET['ISBN10']) && $_GET['ISBN10'] == $result[$key]['ISBN10']) echo 'active';\n echo 'item\">';\n echo $result[$key]['Title'] . '</a><br/>'; \n echo '<p>';\n echo \"<span>Year: </span>\". $result[$key]['CopyrightYear'] . \"<br/>\";\n echo \"<span>Subcategory Name: </span>\". $result[$key]['SubcategoryName'] . \"<br/>\";\n echo \"<span>Imprint Name: </span>\". $result[$key]['Imprint']. \"<br/>\";\n echo '</P><br/>';\n }\n }", "public function getBooks()\r\n {\r\n $bookNodes = $this->dom->getElementsByTagName('book');\r\n $books = [];\r\n\r\n foreach($bookNodes as $domNode) {\r\n $book = [];\r\n\r\n foreach($domNode->childNodes as $dn) {\r\n if ($dn->nodeName === 'author') {\r\n $book['author'] = $dn->nodeValue;\r\n }\r\n\r\n if ($dn->nodeName === 'pages') {\r\n $book['pages'] = $dn->nodeValue;\r\n }\r\n\r\n if ($dn->nodeName === 'title') {\r\n $book['title'] = $dn->nodeValue;\r\n }\r\n\r\n if ($dn->nodeName === 'code') {\r\n $book['code'] = $dn->nodeValue;\r\n }\r\n }\r\n\r\n $books[] = $book;\r\n }\r\n\r\n return $books;\r\n }", "public function index()\n { //select all books\n return Book::all();\n }", "public function getBorrowings();", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "function findBooksWithParams($condition, $param){\n\t$sql = \"SELECT * FROM book WHERE $condition LIKE '%$param%'\";\n\t\t\n\t\t$stmt = $this -> db->prepare($sql);\n\t\t\n\t\t$stmt -> execute();\n\t\t\n\t\t$books = array();\n\t\t\n\t\twhile($row = $stmt->fetchObject()){\n\t\t\t$book=new Book();\n\t\t\t$book->setId($row->id);\n\t\t\t$book->setAuthor($row->author);\n\t\t\t$book->setTitle($row->title);\n\t\t\t$book->setGenre($row->genre);\n\t\t\t$book->setContactEmail($row->contactemail);\n\t\t\t$book->setPublicationDate($row->publicationdate);\n\t\t\t$book->setSynopsis($row->synopsis);\n\t\t\t\n\t\t\t$books[] = $book;\n\t\t}\n\t\t$this->counter = $stmt->rowCount();\n\t\treturn $books;\n\t\t\n\t}", "public function test_get_all_books()\n {\n $randomBook = Book::factory()->create();\n $response = $this->getJson('/api/v1/books');\n $response\n ->assertStatus(200)\n ->assertJson([\n \"status_code\" => 200,\n \"status\" => \"success\",\n \"data\" => [\n [\n \"id\" => $randomBook->id,\n \"name\" => $randomBook->name,\n \"isbn\" => $randomBook->isbn,\n \"authors\" => $randomBook->authors,\n \"number_of_pages\" => $randomBook->number_of_pages,\n \"publisher\" => $randomBook->publisher,\n \"country\" => $randomBook->country,\n \"release_date\" => $randomBook->release_date,\n ],\n ]\n ]);\n }", "public function getOpinions($book){\n $sql = \"SELECT o.title, o.txt, o.note, o.pubDate, a.username, o.id, o.author FROM opinion o\n INNER JOIN account a ON o.author=a.id\n INNER JOIN book b ON o.book=b.id\n WHERE b.id=\".intval($book).\"\n ORDER BY o.pubDate DESC;\";\n $res = mysqli_query($this->link, $sql);\n $opinions = mysqli_fetch_all($res);\n return $opinions;\n }", "public function filter_books20($data){\n $query=$this->db->query('SELECT * FROM `user_books` INNER JOIN `users` ON `users`.`username` = `user_books`.`user_username` WHERE `availability`=\"1\" AND `cond` = \"'.$data['cond'].'\" AND `book_genre` = \"'.$data['book_genre'].'\" AND `users`.`user_region` = \"'.$data['region'].'\" AND NOT `user_username`= \"'.$data['username'].'\" ORDER BY `date_added` DESC LIMIT 150;');\n return $query->result();\n }", "public function index()\n {\n\n\n $books = Books::latest()->paginate(3);\n return view(\"web_admin.books.index\", compact('books', ))->with('i',(request()->input('page',1)-1)*3);\n }", "public function showAllBooks()\n {\n return response()->json(Book::all());\n }", "public function run()\n {\n $time = date(\"Y-m-d H:i:s\");\n\n $books = [\n ['title' => 'Finnegans Wake', 'author' => 'Janes Joyce', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'Don Quixote', 'author' => 'Miguel De Cervantes', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'The Making of Americans', 'author' => 'Gertrude Stein', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'The Stranger', 'author' => 'Albert Camus', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'Pilgrims Progress', 'author' => 'John Bunyan', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'In Search of Lost Time', 'author' => 'Marcel Proust', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'Pale Fire', 'author' => 'Valdimir Nabokov', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'The Trial', 'author' => 'Franz Kafka', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'Ulysses', 'author' => 'James Joyce', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'The Name of the Rose', 'author' => 'Umberto Eco', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'The Gulag Archipelago', 'author' => 'Aleksandr Solzhenitsyn', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'The Diary of a Young Girl', 'author' => 'Anne Frank', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'Gravity\\'s Rainbow', 'author' => 'Thomas Pynchon', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'One Hundred Years of Solitude', 'author' => 'Gabriel García Márquez', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'The Sound and the Fury', 'author' => 'William Faulkner', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'Confusion of Feelings', 'author' => 'Stefan Zweig', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'The Public Burning', 'author' => 'Robert Coover', 'created_at' => $time, 'updated_at' => $time],\n ['title' => 'The Joke', 'author' => 'Milan Kundera', 'created_at' => $time, 'updated_at' => $time],\n ];\n\n DB::table('books')->insert($books);\n }", "function opdsNewest()\n{\n global $app, $globalSettings;\n\n $filter = getFilter();\n $just_books = $app->calibre->last30Books($globalSettings['lang'], $globalSettings[PAGE_SIZE], $filter);\n $books1 = [];\n foreach ($just_books as $book) {\n $record = $app->calibre->titleDetailsOpds($book);\n if (!empty($record['formats'])) {\n array_push($books1, $record);\n }\n }\n $books = array_map('checkThumbnailOpds', $books1);\n $gen = mkOpdsGenerator($app);\n $cat = $gen->newestCatalog(null, $books, false);\n mkOpdsResponse($app, $cat, OpdsGenerator::OPDS_MIME_ACQ);\n}", "public function getListingBooks()\n {\n return $this->listingBooks;\n }", "public function index()\n {\n $books = Book::with('category')->where(['deleted' => 0])->orderBy('name')->paginate(5);\n return $this->successResponse($books);\n }", "public function getBook()\n\t{\n\t\tif (cookie('staffAccount') != '') {\n\t\t\t\n\t\t\t$book = D('Book_species');\n\t\t\t$sql = \"SELECT * FROM lib_book_species as a, \n\t\t\t (SELECT COUNT(*) as number, isbn as isbn2 FROM lib_book_unique \n\t\t\t\t\twhere book_id not in(select book_id from lib_remove) GROUP BY isbn) AS b \n\t\t\t where a.isbn = b.isbn2 and number!=0 ORDER BY species_id DESC LIMIT 0,20;\";\n\t\t\t$return = $book->query($sql);\n\t\t\tif ($return) {\n\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t'code' => 'success',\n\t\t\t\t\t'data' => json_encode($return)\n\t\t\t\t));\n\t\t\t\techo $json;\n\t\t\t} else {\n\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t'code' => 'fail',\n\t\t\t\t\t'msg' => 'Nothing, please add book!'\n\t\t\t\t));\n\t\t\t}\n\t\t} else {\n\t\t\t$json = json_encode(array(\n\t\t\t\t'code' => 'fail',\n\t\t\t\t'msg' => 'Please Login!'\n\t\t\t));\n\t\t\techo $json;\n\t\t}\n\t}", "public function testGetAllBooks()\n {\n //Given we have books in the database\n $book = factory('App\\Book')->create();\n $bookTwo = factory('App\\Book')->create();\n // When the user visits the index page\n $response = $this->get('/api/books');\n //They should see the books Titles and authors\n $response\n ->assertStatus(200) \n ->assertSee($book->title)\n ->assertSee($book->author)\n ->assertSee($bookTwo->title)\n ->assertSee($bookTwo->author);\n \n }", "public function filter_books30($data){\n $query=$this->db->query('SELECT * FROM `user_books` INNER JOIN `users` ON `users`.`username` = `user_books`.`user_username` WHERE `availability`=\"1\" AND `lang` = \"'.$data['lang'].'\" AND `book_genre` = \"'.$data['book_genre'].'\" AND `users`.`user_region` = \"'.$data['region'].'\" AND NOT `user_username`= \"'.$data['username'].'\" ORDER BY `date_added` DESC LIMIT 150;');\n return $query->result();\n }", "public function list_invoice_desc(){\n\n$this->db->order_by(\"year\", \"desc\");\n\t\n$result\t= $this->db->get('invoice');\n\n\t\treturn $result->result();\t\n}" ]
[ "0.72562957", "0.69154596", "0.65214384", "0.6507692", "0.6353704", "0.63432425", "0.6179446", "0.61784595", "0.61729115", "0.6163359", "0.61611396", "0.6026118", "0.5979315", "0.5978755", "0.5978443", "0.59604555", "0.5953469", "0.5950752", "0.5942591", "0.59336406", "0.59201336", "0.5889277", "0.58485246", "0.5842243", "0.58384925", "0.5820029", "0.5818319", "0.5807463", "0.5796325", "0.5745916", "0.57326263", "0.5709981", "0.5685705", "0.56832683", "0.56823903", "0.5676783", "0.56675947", "0.5658928", "0.5658702", "0.56329757", "0.5629473", "0.5595729", "0.559083", "0.5585323", "0.5584817", "0.55776495", "0.55632174", "0.55533826", "0.55337346", "0.55251235", "0.55249745", "0.5521035", "0.5518314", "0.55069304", "0.5494639", "0.54919946", "0.5490051", "0.5454496", "0.54523224", "0.5441317", "0.54379433", "0.54368967", "0.54311687", "0.542225", "0.54200166", "0.5407632", "0.53956825", "0.53900117", "0.5382374", "0.5376987", "0.5376497", "0.5374477", "0.5370992", "0.53411585", "0.53359485", "0.53324336", "0.53299725", "0.532647", "0.5325558", "0.5324836", "0.53243047", "0.5323562", "0.5320848", "0.5320288", "0.53107995", "0.5303844", "0.53036314", "0.52968854", "0.52886117", "0.5287588", "0.5286782", "0.52823067", "0.528187", "0.52748567", "0.5273125", "0.52731174", "0.52726555", "0.5269574", "0.5268573", "0.526728" ]
0.79408365
0
Practice from notes on Models: Show the last 5 books that were added to the books table
public function getEx9() { # Ref: https://laravel.com/docs/5.2/queries#ordering-grouping-limit-and-offset $books = \App\Book::orderBy('id', 'desc')->get()->take(5); $this->printBooks($books); # Underlying SQL: select * from `books` order by `id` desc }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get5book(){\n $db =new DbConnect();\n $con =$db->connect();\n $books5 = array();\n $result_book = mysqli_query($con,\"SELECT * from book order by book_id DESC LIMIT 5\");\n while($book5 = mysqli_fetch_array($result_book,MYSQLI_ASSOC)){\n array_push($books5,$book5);\n }\n return $books5;\n }", "public function latest_books()\n {\n //thiet lap rieng\n $this->paginate = array(\n 'fields' => array('id', 'title', 'slug', 'image', 'sale_price'),\n 'order' => array('created' => 'desc'),\n 'limit' => 8,\n 'contain'=> array(\n 'Writer' => array('name', 'slug')\n ),\n 'conditions' => array('published'=>1),\n 'paramType'=> 'querystring', //thay đổi đường dẫn xuất hiện\n );\n $books = $this->paginate(); //mac dinh la 20 quyen sach va k co thiet lap dieu kien muon thiet lap dieu kien thi dung bien public paginate\n \n $this->set('books', $books);\n $this->set('title_for_layout', 'Sach moi Chiken');\n }", "public function getEx10() {\n $books = \\App\\Book::where('published','>',1950)->get();\n $this->printBooks($books);\n # Underlying SQL: select * from `books` where `published` > '1950'\n }", "function get_recent_items($num = 10)\n{\n return get_db()->getTable('Item')->findBy(array('sort_field' => 'added', 'sort_dir' => 'd'), $num);\n}", "public function getEx12() {\n $books = \\App\\Book::orderBy('published','desc')->get();\n $this->printBooks($books);\n # Underlying SQL: select * from `books` order by `published` desc\n\t}", "public function top(): Collection\n {\n return $this->authorModel\n ->select('name')\n ->withCount('books')\n ->orderBy('books_count', 'desc')\n ->get();\n }", "public function getEx5() {\n $books = \\App\\Book::all();\n $this->printBooks($books);\n }", "public function recentAlbums(){\n return DB::select('select * from albums order by albums.album_created_at DESC limit 5');\n }", "public function getLast2Opinions($book){\n $sql = \"SELECT o.title, o.txt, o.note, o.pubDate, a.username, o.author FROM opinion o\n INNER JOIN account a ON o.author=a.id\n INNER JOIN book b ON o.book=b.id\n ORDER BY o.pubDate LIMIT 2;\";\n $res = mysqli_query($this->link, $sql);\n $opinions = mysqli_fetch_all($res);\n return $opinions;\n }", "public function last30Books($lang, $nrOfTitles = 30, $filter = null);", "private function LastPosts(){\n $this->lastrecord = ORM::factory('Posts')->find_all()->count();\n }", "public function get6book(){\n $db =new DbConnect();\n $con =$db->connect();\n $books6 = array();\n $result_book = mysqli_query($con,\"SELECT * from book order by book_id DESC LIMIT 6\");\n while($book6 = mysqli_fetch_array($result_book,MYSQLI_ASSOC)){\n array_push($books6,$book6);\n }\n return $books6;\n }", "public function getLostBooks()\n {\n return $this->hasMany(LostBooks::className(), ['book_id' => 'id']);\n }", "public function index()\n {\n // $new = json_encode(Book::orderBy('created_at')->limit(5)->get());\n // $random =json_encode(Book::inRandomOrder()->limit(5)->get());\n\n\n return 'Legújabbak:'.'<br>'.\n json_encode(Book::orderBy('created_at')->limit(5)->get()).'<br>'.\n 'Random:'.\n '<br>'.json_encode(Book::inRandomOrder()->limit(5)->get());\n }", "public function action_recent_chat_history() {\n\t\t$sender = $this->request->param('id');\n\t\t$messages = ORM::factory('Message')->get_latest_chat_messages($this->_current_user->id, $sender);\n\t\t$this->_set_msg(\"Retrieved last 5 messages\", \"success\", $messages);\n\t}", "public function get9book(){\n $db =new DbConnect();\n $con =$db->connect();\n $books9 = array();\n $result_book = mysqli_query($con,\"SELECT * from book order by book_id DESC LIMIT 9\");\n while($book9 = mysqli_fetch_array($result_book,MYSQLI_ASSOC)){\n array_push($books9,$book9);\n }\n return $books9;\n }", "public function getHistory()\n {\n \treturn QuizResult::where('user_id', '=', Auth::user()->id)->orderBy('id', 'DESC')->limit(5)->get();\n }", "public function getEx4() {\n # Instantiate a new Book Model object\n $book = new \\Book();\n # Set the parameters\n # Note how each parameter corresponds to a field in the table\n $book->title = 'Harry Potter';\n $book->author = 'J.K. Rowling';\n $book->published = 1997;\n $book->cover = 'http://prodimage.images-bn.com/pimages/9780590353427_p0_v1_s484x700.jpg';\n $book->purchase_link = 'http://www.barnesandnoble.com/w/harry-potter-and-the-sorcerers-stone-j-k-rowling/1100036321?ean=9780590353427';\n # Invoke the Eloquent save() method\n # This will generate a new row in the `books` table, with the above data\n $book->save();\n return 'Added: '.$book->title;\n }", "function get_last_ten_entries(){\n\t\n $query = $this->db->get('users', 100 );\n return $query->result(); \n\n}", "public function loadAllWithBookCount();", "public function get_lastThree() {\n\n $query = $this->db->query('SELECT * FROM recipes WHERE recipes.published ORDER BY recipes.lastModDate DESC LIMIT 3');\n\n return $result = $query->result();\n }", "function get_recent_collections($num = 10)\n{\n return get_records('Collection', array('sort_field' => 'added', 'sort_dir' => 'd'), $num);\n}", "public function getEx15() {\n $books = Book::all();\n $this->printBooks($books);\n\t}", "public function index()\n {\n\n\n $books = Books::latest()->paginate(3);\n return view(\"web_admin.books.index\", compact('books', ))->with('i',(request()->input('page',1)-1)*3);\n }", "public function getBillets(){\n $db = $this -> init();\n if(isset($_GET['page'])){\n $display = $db->query('Select * from posts order by id asc limit '.(($_GET['page']-1)*5).',5') or die(print_r($db->errorInfo()));\n }\n else{\n $display = $db->query('Select * from posts order by id asc limit 0,5');\n }\n return $display;\n }", "public function findLasts($nb = 5)\n {\n return $this\n ->findLastsQueryBuilder($nb)\n ->getQuery()\n ->getResult()\n ;\n }", "public function Top5FeedbackAuthors()\n {\n// $sth = $this->pdo->query('SELECT count(`author`) as feedback_count,`author`, `user_id` FROM feedback GROUP BY `author` ORDER by `author` DESC LIMIT 0,5');\n $sth = $this->pdo->query('SELECT count(`author`) as feedback_count,`author`, `user_id` FROM feedback GROUP BY `author` ORDER by `feedback_count` DESC LIMIT 0,5');\n $collection=[];\n\n while ($res = $sth->fetch(\\PDO::FETCH_ASSOC) ) {\n $feedback = (new Feedback())\n ->setUserId($res['user_id'])\n ->setUserName($res['author'])\n ->setFeedbackCount($res['feedback_count']);\n $collection[] = $feedback;\n }\n\n return $collection;\n }", "public function get_last_ten_entries()\r\n\t{\r\n\t\t$query = $this->db->get(\"email_workflow\", 10);\r\n\r\n\t\treturn $query->result();\r\n\t}", "public function latest($limit);", "public function getBorrowedbooks()\n {\n return $this->hasMany(Borrowedbooks::className(), ['bookId' => 'bookId']);\n }", "function FindThisMany( $num = 5, $orderby = \"date_revised DESC\" ) {\n\t\treturn MyActiveRecord::FindBySQL( 'Items', \"SELECT id, name, display_name, content, template, display_order, sku, price, taxonomy, public, public2, date_created, date_revised FROM items ORDER BY $orderby LIMIT $num\" ); \n\t}", "public static function getLastDiscussions(){\n $sql = \"select * from discussions ORDER BY `id` DESC LIMIT 5\";\n return App::$db->query($sql);\n }", "function getLastViewed();", "public function getLatestRecord();", "public function getEx11() {\n $books = \\App\\Book::orderBy('title','asc')->get();\n $this->printBooks($books);\n # Underlying SQL: select * from `books` order by `title` asc\n }", "function getLastRecords($iLimit = 3) {\n $sRecords = '';\n $aRecords = $GLOBALS['MySQL']->getAll(\"SELECT * FROM `s178_guestbook` ORDER BY `id` DESC LIMIT {$iLimit}\");\n foreach ($aRecords as $i => $aInfo) {\n $sWhen = date('F j, Y H:i', $aInfo['when']);\n $sRecords .= <<<EOF\n<div class=\"record\" id=\"{$aInfo['id']}\">\n <p>Record from {$aInfo['name']} <span>({$sWhen})</span>:</p>\n <p>{$aInfo['description']}</p>\n</div>\nEOF;\n }\n return $sRecords;\n}", "public function GetLastRecord(){$this->LastPosts();return $this->lastrecord;}", "public function index()\n {\n return Review::with(['author', 'lottery'])->latest()->get();\n }", "function getMostRecentCourses(){\n\n\t\tglobal $conn;\n\n\t\t$query = \"SELECT id, name, author, image FROM Course ORDER BY creationDate LIMIT 3\";\n\n\t\t$result = $conn->query($query);\n\n\t\treturn fetch_all($result);\n\t}", "public function index()\n {\n return books::orderBy('created_at')->get();\n }", "public function getEx8() {\n # Get all the books\n $books = \\App\\Book::all();\n $this->printBooks($books);\n # get() without any query constraints is the equivalent of all()\n $books = \\App\\Book::get();\n $this->printBooks($books);\n\t}", "public function get_recent($limit = 3){\n\t\t$limit = (int) $limit;\n\t\t//$this->set_published();\n\t\t$this->db->limit($limit);\n\t\treturn parent::get();\n\t}", "public function getBooks()\n {\n $page = isset($_GET['page']) ? $_GET['page'] : 1;\n $this->limit = isset($_GET['limit']) ? $_GET['limit'] : $this->limit;\n $offset = $this->limit * ($page - 1);\n\n\n if (USE_ONE_TABLE) {\n $this->table = 'books_authors';\n $sql = \"SELECT * FROM $this->table WHERE `deleted` is NULL LIMIT :limit OFFSET :offset\";\n } else {\n $this->table = 'relations';\n $sql = \"SELECT books.id, book_name, GROUP_CONCAT(name_author SEPARATOR ', ') as 'author' , year, num_pages, about_book, deleted, views, clicks, image\n FROM books \n JOIN relations ON book_id = books.id\n JOIN authors ON authors.id = author_id\n WHERE deleted is NULL \n GROUP BY id\n LIMIT :limit OFFSET :offset\";\n }\n\n $params = [\n [\":limit\", $this->limit, \\PDO::PARAM_INT],\n [\":offset\", $offset, \\PDO::PARAM_INT]\n ];\n return $this->bindAndQuery($sql, $params);\n }", "public function takeLast($howMany);", "public function get_book();", "public function getLastPosts() {\n $repository = $this->entityManager->getRepository(\"DUT\\\\Models\\\\Post\");\n return $repository->findBy([], [\"idPost\" => \"DESC\"], 10);\n }", "public static function recent($max=10) \n {\n $sql = <<<END_SQL\n select users.user_id, users.first_name, users.last_name, posts.created, posts.text\n from posts\n inner join users on posts.user_id = users.user_id\n order by posts.created desc\n limit $max\nEND_SQL;\n $posts = DB::instance(DB_NAME)->select_rows($sql, \"object\");\n return $posts;\n }", "public function get_popular_list()\n\t{\n\t\t$result = $this->db->from(\"blog\")\n\t\t\t\t\t\t->join(\"category\",\"category.category_id\",\"blog.category_id\")\n\t\t\t\t\t\t->where(array(\"blog.publish_status\"=> 1, \"blog.blog_status\" => 1))\n\t\t\t\t\t\t->orderby(\"blog.blog_views\", \"DESC\")\n\t\t\t\t\t\t->limit(5)\n\t\t\t\t\t\t->get();\t\n\t\treturn $result;\n\t}", "public function getBooks()\n {\n return $this->hasMany(Book::className(), ['author_id' => 'id']);\n }", "function getFriendLastedPosting() {\n $sql = \"SELECT b.*,\n c.name \n FROM member_posting a\n INNER JOIN posting b \n ON b.id = a.posting_id\n INNER JOIN member c \n ON c.id = a.member_id\n WHERE a.member_id IN (\n SELECT friend_id FROM member_friend WHERE member_id = ?)\n ORDER BY b.last_update_time DESC LIMIT 10\";\n return getAll($sql, [getLogin()['mid']]);\n}", "public function index()\n {\n $b = newbook::\n orderBy('id', 'desc')\n //take(10)\n ->get();\n\n return $b->toJson();\n \n }", "public function book_borrowed()\n {\n $data['books'] = \\App\\Books_out::whereNull('date_in_actual')\n ->with(['book', 'member'])\n ->get();\n return view('book.borrowed', $data);\n }", "public function books(): Collection;", "function newItems(){\n\t\t\t\t$sql = 'SELECT *\n\t\t\t\tFROM product\n\t\t\t\tORDER BY product.product_id DESC\n\t\t\t\tLIMIT 5' \n\t\t\t\t;\n\t\t\t\t$Q = $this-> db-> query($sql);\n\t\t\t\tforeach ($Q-> result_array() as $row){\n\t\t\t\t}\n\t\t\t\treturn $Q;\n\t\t\t\t}", "public function get_last_posts(){\n\t\t$this->db->order_by('posts.created_at', 'DESC');\n\t\t$this->db->where('validated', 1);\n\t\t$this->db->join('categories', 'categories.id = posts.category_id');\n\t\t$this->db->limit(3);\n\t\t$query = $this->db->get('posts');\n\t\treturn $query->result_array();\n\t}", "public function getAllBooks(){\n $query = \"SELECT * FROM Book;\";\n return $this->getBookDetail($query);\n }", "public function get_books()\n {\n $this->load->database();\n // print_r($this->db->get(\"books\"));\n $query = $this->db->query(\"select * from books\");\n return $query->result();\n }", "public function books()\n {\n\t \t return $this->belongsToMany(Book::class);\n }", "public function getLastItem() {}", "public function getLastItem() {}", "function last_records($rcount)\n{\n \n}", "public function index() {\n $books = Book::orderBy('created_at', 'desc')->get()->toArray();\n\n $books = array_map(function ($book) {\n $review_author = Book::find($book['id'])->user()->first()->name;\n $book['review_author'] = $review_author;\n return $book;\n }, $books);\n\n return $books;\n }", "public function books()\n {\n return $this->hasMany('App\\Book');\n }", "public function findLatest(): Booking\n {\n return $this->bookingRepository->getLatest();\n }", "public function last()\n {\n $last_posts = $this->posts_manager->listLasts(10);\n $this->render('last-posts', ['head'=>['title'=>'Les derniers articles', 'meta_description'=>''], 'page'=>'derniers-articles', 'last_posts'=>$last_posts]);\n }", "public function lastMessage()\n\t{\n\t\t$data = $this->getDoctrine()->getRepository(Posting::class)->findBy(array(), ['id' => 'DESC'], 3);\n\t\t//$data = $posting->addOrderBy('id', 'desc')->take(3)->get();\n\t\treturn $this->render('page/main.html.twig', ['data' => $data]);\n\t}", "public function get_book()\n {\n $sql = DB::select('select * from books');\n return $sql;\n }", "public function findLimit($nb=5)\t{\n\t\t//var_dump($requete->result('Produit'));\n\t\t//$requete2 = $this->db->query('SELECT * FROM produit');\n\t\t//var_dump($requete2->result('Produit'));\n\t\t$sql = 'SELECT * FROM produit LIMIT ?';\n\t\t$query = $this->db->query($sql,[$nb]);\n\t\treturn $query->result('Produit_model');\n\t}", "public function getRecentRecord($count)\n\t{\n\t\treturn $this->model->orderBy('created_at', 'DESC')\n\t\t ->take($count)\n\t\t ->get();\n\t}", "public static function firstPageBooks() {\n //but later on (when we have more books in the database), this method wants some\n //subset of books (like every books that start with \"s\", or most favourite books or books selected by admin or...)\n\n $books = Book::all();\n// self::sort_books($books);\n View::make('general/firstpage.html', array('books' => $books));\n }", "public function getLastCountsList(){\n return $this->_get(8);\n }", "public function index()\n {\n return BookResource::collection(Book::orderByDesc(\"id\")->get());\n }", "public function run()\n {\n $book_1 = new Books();\n $book_1->name = 'Harry Potter e a Camara Secreta';\n $book_1->page_count = 500;\n $book_1->image_src = 'uploads/images/books/capa1.jpg';\n $book_1->publishing_company_id = 1;\n $book_1->save();\n $book_1->authors()->attach(Authors::where(\"author_name\", \"JK Rowling\")->first());\n\n $book_2 = new Books();\n $book_2->name = 'Harry Potter e o Prisioneiro de Azkaban';\n $book_2->page_count = 500;\n $book_2->image_src = 'uploads/images/books/capa2.jpg';\n $book_2->publishing_company_id = 1;\n $book_2->save();\n $book_2->authors()->attach(Authors::where(\"author_name\", \"JK Rowling\")->first());\n\n $book_3 = new Books();\n $book_3->name = 'A fabula do livro azul';\n $book_3->page_count = 500;\n $book_3->image_src = 'uploads/images/books/capa3.jpg';\n $book_3->publishing_company_id = 2;\n $book_3->save();\n $book_3->authors()->attach(Authors::where(\"author_name\", \"Machado de Assis\")->first());\n \n\n }", "public function allBooks ()\n {\n $books = $this->book->findAll();\n $this->show('admin/allbooks', ['books' => $books]);\n }", "function getRecentEntries($number = 5)\r\n{\r\n global $context, $smcFunc;\r\n \r\n if (!is_numeric($number) || empty($number))\r\n $number = 5;\r\n \r\n \r\n}", "public function booklist()\n {\n $book = Post::where('key', 'book')->get();\n return view('backends.booklist')->with('book', $book);\n }", "public static function latestCourses($limit = 8)\n {\n return static::find()\n ->active()\n// ->select([\n// '{{kurs}}.*',\n// 'AVG({{rating}}.rate) AS averageRating'\n// ])\n// ->joinWith('validRatings', false)\n// ->groupBy('{{kurs}}.id')\n// ->orderBy(['kurs.enrolls_count' => SORT_DESC])\n ->recently($limit)\n ->with([\n 'user' => function ($query) {\n return $query->select(['id', 'firstname', 'lastname'])->asArray();\n },\n ])\n ->all();\n\n }", "function LatestPosts() {\n\t\treturn Post::get()\n\t\t\t->filter('AuthorID', (int)$this->urlParams['ID'])\n \t\t\t->limit(0,5)\n\t\t\t->sort(\"Created\", \"DESC\")\n\t\t\t->filterByCallback(function($post){\n\t\t\t\treturn $post->canView();\n\t\t\t});\n\t}", "public function model() {\n\t\treturn TABLE_BACKOFFICE_AFTER_SALES_VISIT;\n\t}", "public function actionTop() {\n $limit = 5;\n $model = new $this->modelClass;\n $results = $model::find()->limit($limit)->orderBy(['Data' => SORT_DESC, 'Nome' => SORT_ASC])->all();\n return['limite' => $limit, 'results' => $results];\n }", "public function index()\n {\n $title = 'Cadastrar Novo Livro';\n\n $lended_books = Book::whereHas('lendings', function ($query) {\n $query->where('date_finish', '=', null);\n })->pluck('id')->all();\n \n\n\n $books = Book::whereNotIn('id', $lended_books)->paginate($this->totalPage);\n \n \n\n return view('books.index', compact('books', 'title'));\n }", "public static function recentRecoveries(){\n // // this way we will select recoveries of only current month\n // from recovery access bill and from bill access connection detail\n\n // grab the current bill ids\n $current_bill_ids = connection::where('isBlocked',false)->pluck('current_bill_id');\n // grab all the recoveries whose bill id is equal to current bill id latest first\n\n// $recentRecoveries = Recovery::whereIn('bill_id',$current_bill_ids)->latest()->get();\n $recentRecoveries = Recovery::whereIn('bill_id',$current_bill_ids)->latest()\n ->with('user')\n// ->with('bill')\n ->with('connection')\n ->get();\n\n return $recentRecoveries;\n\n }", "public function run()\n {\n DB::table('books')->insert([\n 'book_number' => 'TE0000',\n 'title' => 'College Physics 9th Edition',\n 'publisher' => 'CENGAGE Learning',\n 'authors' => 'Raymond A. Serway, Chris Vuille',\n 'category' => 'Textbook',\n 'isbn' => '0123456777',\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime()\n ]);\n DB::table('books')->insert([\n 'book_number' => 'TE0001',\n 'title' => 'Physics I',\n 'publisher' => 'HUST',\n 'authors' => 'Le Tuan',\n 'category' => 'Textbook',\n 'isbn' => '0123456776',\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime()\n ]);\n DB::table('books')->insert([\n 'book_number' => 'TE0002',\n 'title' => 'Data structure and algorithm',\n 'publisher' => 'HUST',\n 'authors' => 'Pham Quang Dung',\n 'category' => 'Textbook',\n 'isbn' => '0123456775',\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime()\n ]);\n DB::table('books')->insert([\n 'book_number' => 'TE0003',\n 'title' => 'Software development',\n 'publisher' => 'HUST',\n 'authors' => 'Nguyen Thi Thu Trang',\n 'category' => 'Textbook',\n 'isbn' => '0123456774',\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime()\n ]);\n DB::table('books')->insert([\n 'book_number' => 'HI0000',\n 'title' => 'Guns, Germs, and Steel: The Fates of Human Societies',\n 'publisher' => 'W.W. Norton & Company',\n 'authors' => 'Jared Diamond',\n 'category' => 'History',\n 'isbn' => '0123456767',\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime()\n ]);\n DB::table('books')->insert([\n 'book_number' => 'HI0001',\n 'title' => 'A Short History of Nearly Everything',\n 'publisher' => 'Broadway Books',\n 'authors' => 'Bill Bryson',\n 'category' => 'History',\n 'isbn' => '0123456766',\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime()\n ]);\n DB::table('books')->insert([\n 'book_number' => 'HI0002',\n 'title' => 'The Guns of August',\n 'publisher' => 'Ballantine Books',\n 'authors' => 'Barbara W. Tuchman, Robert K. Massie (Foreword)',\n 'category' => 'History',\n 'isbn' => '0123456765',\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime()\n ]);\n DB::table('books')->insert([\n 'book_number' => 'HI0003',\n 'title' => 'Spiderman: Homecoming',\n 'publisher' => 'Anchor',\n 'authors' => 'Tom Holland',\n 'category' => 'History',\n 'isbn' => '0123456764',\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime()\n ]);\n DB::table('books')->insert([\n 'book_number' => 'DI0000',\n 'title' => 'The Compact Edition of the Oxford English Dictionary',\n 'publisher' => 'Clarendon/Oxford University Press',\n 'authors' => 'Herbert Coleridge (editor), Frederick J. Furnivall (editor), James Murray (editor), Charles Talbut Onions (editor)',\n 'category' => 'Dictionary',\n 'isbn' => '0123456757',\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime()\n ]);\n DB::table('books')->insert([\n 'book_number' => 'DI0001',\n 'title' => 'Merriam-Webster\\'s Collegiate Dictionary',\n 'publisher' => 'Merriam-Webster, Inc',\n 'authors' => 'Anonymous',\n 'category' => 'Dictionary',\n 'isbn' => '0123456756',\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime()\n ]);\n DB::table('books')->insert([\n 'book_number' => 'DI0002',\n 'title' => 'Cambridge Advanced Learner\\'s Dictionary',\n 'publisher' => 'Cambridge University Press',\n 'authors' => 'Elizabeth Walter',\n 'category' => 'Dictionary',\n 'isbn' => '0123456755',\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime()\n ]);\n DB::table('books')->insert([\n 'book_number' => 'DI0003',\n 'title' => 'The Official Scrabble Players Dictionary',\n 'publisher' => 'Merriam-Webster',\n 'authors' => 'Anonymous',\n 'category' => 'Dictionary',\n 'isbn' => '0123456754',\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime()\n ]);\n DB::table('books')->insert([\n 'book_number' => 'PO0000',\n 'title' => 'Leaves of Grass',\n 'publisher' => 'Simon & Schuster',\n 'authors' => 'Walt Whitman',\n 'category' => 'Poetry',\n 'isbn' => '0123456747',\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime()\n ]);\n DB::table('books')->insert([\n 'book_number' => 'PO0001',\n 'title' => 'Shakespeare\\'s Sonnets',\n 'publisher' => 'Bloomsbury Academic',\n 'authors' => 'William Shakespeare, Katherine Duncan-Jones (Editor)',\n 'category' => 'Poetry',\n 'isbn' => '0123456746',\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime()\n ]);\n DB::table('books')->insert([\n 'book_number' => 'PO0002',\n 'title' => 'The Waste Land and Other Poems',\n 'publisher' => 'Harcourt Brace Jovanovich',\n 'authors' => 'T.S. Eliot',\n 'category' => 'Poetry',\n 'isbn' => '0123456745',\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime()\n ]);\n DB::table('books')->insert([\n 'book_number' => 'PO0003',\n 'title' => 'Songs of Innocence and of Experience',\n 'publisher' => 'Digireads.com',\n 'authors' => 'William Blake',\n 'category' => 'Poetry',\n 'isbn' => '0123456744',\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime()\n ]);\n DB::table('books')->insert([\n 'book_number' => 'BI0000',\n 'title' => 'Steve Jobs',\n 'publisher' => 'Simon Schuster',\n 'authors' => 'Walter Isaacson',\n 'category' => 'Biography',\n 'isbn' => '0123456737',\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime()\n ]);\n DB::table('books')->insert([\n 'book_number' => 'BI0001',\n 'title' => 'Einstein: His Life and Universe',\n 'publisher' => 'Simon Schuster',\n 'authors' => 'Walter Isaacson',\n 'category' => 'Biography',\n 'isbn' => '0123456736',\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime()\n ]);\n DB::table('books')->insert([\n 'book_number' => 'BI0002',\n 'title' => 'Into the Wild',\n 'publisher' => 'Anchor Books',\n 'authors' => 'Jon Krakauer',\n 'category' => 'Biography',\n 'isbn' => '0123456735',\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime()\n ]);\n DB::table('books')->insert([\n 'book_number' => 'BI0003',\n 'title' => 'Team of Rivals: The Political Genius of Abraham Lincoln',\n 'publisher' => 'Simon Schuster',\n 'authors' => 'Doris Kearns Goodwin',\n 'category' => 'Biography',\n 'isbn' => '0123456734',\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime()\n ]);\n }", "function openskydora_get_most_viewed_items($count, $weeks_ago=7, $exclude=NULL) {\n\n $records = openskydora_get_most_viewed($count+20, $weeks_ago, $exclude);\n $item_records = array(); // No collections\n \n // filter out collection citation model\n foreach ($records as $pid=>$data) {\n $data->obj = islandora_object_load($pid);\n if (in_array('islandora:collectionCModel',$data->obj->models)) {\n // dsm ('collection! '. $pid);\n } else {\n $item_records[$pid] = $data;\n }\n }\n return array_slice($item_records, 0, $count, TRUE);\n}", "public function uploadedBooks()\n {\n return $this->hasMany(Book::class, 'user_id');\n }", "function getLastRecord()\n\t{\n\t\t$this->db->select(\"que_Id,answer\");\n\t\t$this->db->limit(3);\n\t\t$this->db->order_by(\"answer_Id\", \"desc\");\n\t\t$query = $this->db->get(\"quiz\");\n\t\treturn $query;\n\t}", "function bookcrossing_view_history($history) {\n $build = node_view($history['node'], 'history');\n global $user;\n $build = bookcrossing_prepare_book_view($build, $history, FALSE);\n\n drupal_set_title(t('Book history') . ' - ' . $history['node']->title);\n /**\n * Adding comment of the logged user to the output.\n */\n $isset = FALSE;\n $my_comment = '<div id=\"my-comment-text\">';\n if (isset($history['comments'][$user->uid])) {\n $my_comment .= $history['comments'][$user->uid];\n $isset = TRUE;\n }\n\n if (!$isset) {\n $query = db_select('bookcrossing_history', 'h');\n //$query->innerJoin('bookcrossing_books', 'b');\n $exist = $query\n ->fields('h', array('bid'))\n ->condition('h.uid', $user->uid, '=')\n ->condition('h.bid', $history['bid'], '=')\n ->execute()\n ->fetchField();\n\n if ($exist) {\n $my_comment .= t('Review wasnt added. You can add it by pressing \"change\" link.');\n }\n else {\n $my_comment .= t('You cant write reviews for book u didnt find.');\n }\n }\n \n $my_comment .= '</div>';\n\n $is_read_book = db_select('bookcrossing_history', 'h')\n ->fields('h', array('bid'))\n ->condition('uid', $user->uid, '=')\n ->condition('bid', $history['bid'], '=')\n ->execute()\n ->fetchField();\n\n $change_link = '';\n if ($is_read_book) {\n $change_link = l(t('(change)'), 'change-comment/' . $history['bid'], array('attributes' => array('class' => array('use-ajax'))));\n }\n $build['book_comment'] = array(\n '#markup' => '<div class=\"back-to-book\">' . l(t('<<back to book'), 'book/' . $history['bid']) . '</div><div class=\"my-comment\"><div class=\"my-comment-title\">' . t('My review') . $change_link . '</div>' . $my_comment . '</div>',\n );\n \n $build['author_and_year'] = array(\n '#markup' => bookcrossing_author_and_year($history),\n );\n\n /**\n * Generate output for history of the book.\n */\n $output = '<div class=\"history-wrapper\">';\n foreach ($history['places'] as $place) {\n $comment = isset($history['comments'][$place['user']->uid]) ? $history['comments'][$place['user']->uid] : '';\n $my_comment_class = $place['user']->uid == $user->uid ? ' m-c' : '';\n $user_link = '';\n $fbid = bookcrossing_load_fbid($place['user']->uid);\n if ($fbid) {\n $vars = array();\n $filepath = (isset($place['user']->picture->uri)) ? $place['user']->picture->uri : '';\n $name = !empty($place['user']->name) ? $place['user']->name : variable_get('anonymous', t('Anonymous'));\n $alt = t(\"@user's picture\", array('@user' => $name));\n $vars = array('path' => $filepath, 'alt' => $alt, 'title' => $alt);\n $vars['style_name'] = 'user-in-history';\n $image = theme('image_style', $vars);\n $user_link = l($image, 'http://www.facebook.com/profile.php?id=' . $fbid . '&sk=app_bookcrossing_by', array('html' => TRUE));\n }\n $output .= '<div class=\"place-wrapper clearfix\">\n <div class=\"history-comment' . $my_comment_class . '\">' . $comment . '</div>\n <div class=\"history-user-foto\">' . $user_link . '</div>\n <div class=\"history-user-info\">'\n . l($place['user']->name, $fbid ? 'http://www.facebook.com/profile.php?id=' . $fbid . '&sk=app_bookcrossing_by' : 'user/' . $place['user']->uid)\n . '<div class=\"history-places\">';\n\n if ($place['place']) {\n $output .= '<div class=\"place-found\">' . t('Found') . ':<div class=\"place-date-found\">' . format_date($place['found']) . ',' . $place['place']->name . '</div></div>';\n }\n\n if ($place['place_left']) {\n $output .= '<div class=\"place-left\">' . t('Released') . ':<div class=\"place-date-left\">' . format_date($place['time_left']) . ', ' . $place['place_left']->name . '</div></div>';\n }\n\n $output .= '</div></div></div>';\n }\n $output .= '</div>';\n\n $build['book_history'] = array(\n '#markup' => $output,\n );\n\n /**\n * Generate item list with status of the book.\n */\n $build['book_status'] = array(\n '#markup' => bookcrossing_book_status($history),\n );\n\n $build['history_pager'] = array(\n '#theme' => 'pager',\n );\n\n return $build;\n}", "public function practice4()\n {\n $book = new Book();\n\n # Set the properties\n # Note how each property corresponds to a field in the table\n $book->title = 'Harry Potter and the Sorcerer\\'s Stone';\n $book->author = 'J.K. Rowling';\n $book->published_year = 1997;\n $book->cover_url = 'http://prodimage.images-bn.com/pimages/9780590353427_p0_v1_s484x700.jpg';\n $book->purchase_url = 'http://www.barnesandnoble.com/w/harry-potter-and-the-sorcerers-stone-j-k-rowling/1100036321?ean=9780590353427';\n\n # Invoke the Eloquent `save` method to generate a new row in the\n # `books` table, with the above data\n $book->save();\n\n dump('Added: ' . $book->title);\n }", "function listar_recentes() {\n\t\t$this->db->select ( '*' );\n\t\t$this->db->order_by ( \"inicio_evento\", \"asc\" );\n\t\t// $this->db->from('evento');\n\t\t$query = $this->db->get ( 'evento', 4 );\n\t\treturn $query->result ();\n\t}", "public function getByMostRecent()\n\t{\n\t\t$sql = \"SELECT * FROM \".TABLE_PREFIX.\"courses \n\t\t WHERE access='public'\n\t\t ORDER BY modified_date DESC, created_date DESC\";\n\t\treturn $this->execute($sql);\n\t}", "public function add_book()\n\t{\n\t\t$data = array();\n\t\t$authors = $this->add_book_model->getAuthors();\n\t\t$genres = $this->add_book_model->getGenres();\n\t\t$types = $this->add_book_model->getTypes();\n\t\t$data['authorsList'] = $authors;\n\t\t$data['genresList'] = $genres;\n\t\t$data['typesList'] = $types;\n\t\t$this->load->view('add_book', $data);\n\t}", "public function run()\n {\n DB::table('books')->insert(\n [\n // Suzanne Collins\n [\n 'author_id' => 1,\n 'title' => \"Gregor the Overlander\",\n 'isbn' => \"9780439678131\",\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 [\n 'author_id' => 1,\n 'title' => \"Gregor and the Prophecy of Bane\",\n 'isbn' => \"9780439650762\",\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 [\n 'author_id' => 1,\n 'title' => \"Gregor and the Curse of the Warmbloods\",\n 'isbn' => \"9780439656245\",\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 [\n 'author_id' => 1,\n 'title' => \"Gregor and the Marks of Secret\",\n 'isbn' => \"9780439791465\",\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 [\n 'author_id' => 1,\n 'title' => \"Gregor and the Code of Claw\",\n 'isbn' => \"9780439791441\",\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 [\n 'author_id' => 1,\n 'title' => \"The Hunger Games\",\n 'isbn' => \"9780439023528\",\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 [\n 'author_id' => 1,\n 'title' => \"Catching Fire\",\n 'isbn' => \"9780545227247\",\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 [\n 'author_id' => 1,\n 'title' => \"Mockingjay\",\n 'isbn' => \"9780439023511\",\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\n // Anne McCaffrey\n [\n 'author_id' => 2,\n 'title' => \"Dragonflight\",\n 'isbn' => \"9780345335463\",\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 [\n 'author_id' => 2,\n 'title' => \"Dragonquest\",\n 'isbn' => \"9780345022455\",\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 [\n 'author_id' => 2,\n 'title' => \"The White Dragon\",\n 'isbn' => \"9780345275677\",\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 [\n 'author_id' => 2,\n 'title' => \"Dragonsong\",\n 'isbn' => \"9780689305078\",\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 [\n 'author_id' => 2,\n 'title' => \"Dragonsinger\",\n 'isbn' => \"9780689305702\",\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 [\n 'author_id' => 2,\n 'title' => \"Dragondrums\",\n 'isbn' => \"9780689306853\",\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\n // Peter F. Hamilton\n [\n 'author_id' => 3,\n 'title' => \"Mindstar Rising\",\n 'isbn' => \"9780330537742\",\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 [\n 'author_id' => 3,\n 'title' => \"A Quantum Murder\",\n 'isbn' => \"9780330537759\",\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 [\n 'author_id' => 3,\n 'title' => \"The Nano Flower\",\n 'isbn' => \"9780330537810\",\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 [\n 'author_id' => 3,\n 'title' => \"The Reality Dysfunction\",\n 'isbn' => \"9781447208570\",\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 [\n 'author_id' => 3,\n 'title' => \"The Neutronium Alchemist\",\n 'isbn' => \"9781447208587\",\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 [\n 'author_id' => 3,\n 'title' => \"The Naked God\",\n 'isbn' => \"9781447208594\",\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 [\n 'author_id' => 3,\n 'title' => \"Misspent Youth\",\n 'isbn' => \"9781447224082\",\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 [\n 'author_id' => 3,\n 'title' => \"Pandora's Star\",\n 'isbn' => \"9781447279662\",\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 [\n 'author_id' => 3,\n 'title' => \"Judas Unchained\",\n 'isbn' => \"9781447279679\",\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 [\n 'author_id' => 3,\n 'title' => \"The Dreaming Void\",\n 'isbn' => \"9781447208563\",\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 [\n 'author_id' => 3,\n 'title' => \"The Temporal Void\",\n 'isbn' => \"9780330507882\",\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 [\n 'author_id' => 3,\n 'title' => \"The Evolutionary Void\",\n 'isbn' => \"9780330443173\",\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 [\n 'author_id' => 3,\n 'title' => \"The Abyss Beyond Dreams\",\n 'isbn' => \"9780230769465\",\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\n // J. K. Rowling\n [\n 'author_id' => 4,\n 'title' => \"Harry Potter and the Philosopher's Stone\",\n 'isbn' => \"0747532699\",\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 [\n 'author_id' => 4,\n 'title' => \"Harry Potter and the Chamber of Secrets\",\n 'isbn' => \"0747538492\",\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 [\n 'author_id' => 4,\n 'title' => \"Harry Potter and the Prisoner of Azkaban\",\n 'isbn' => \"0747542155\",\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 [\n 'author_id' => 4,\n 'title' => \"Harry Potter and the Goblet of Fire\",\n 'isbn' => \"074754624X\",\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 [\n 'author_id' => 4,\n 'title' => \"Harry Potter and the Order of the Phoenix\",\n 'isbn' => \"0747551006\",\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 [\n 'author_id' => 4,\n 'title' => \"Harry Potter and the Half-Blood Prince\",\n 'isbn' => \"0747581088\",\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 [\n 'author_id' => 4,\n 'title' => \"Harry Potter and the Deathly Hallows\",\n 'isbn' => \"0545010225\",\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\n // Ursula Le Guin\n [\n 'author_id' => 5,\n 'title' => \"A Wizard of Earthsea\",\n 'isbn' => \"0395276535\",\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 [\n 'author_id' => 5,\n 'title' => \"The Tombs of Atuan\",\n 'isbn' => \"187470323X\",\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 [\n 'author_id' => 5,\n 'title' => \"The Farthest Shore\",\n 'isbn' => \"0689300549\",\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 [\n 'author_id' => 5,\n 'title' => \"Tehanu\",\n 'isbn' => \"0689315953\",\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 [\n 'author_id' => 5,\n 'title' => \"Tales from Earthsea\",\n 'isbn' => \"0151005613\",\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 [\n 'author_id' => 5,\n 'title' => \"The Other Wind\",\n 'isbn' => \"0151006849\",\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 [\n 'author_id' => 5,\n 'title' => \"The Dispossessed\",\n 'isbn' => \"0060125632\",\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 [\n 'author_id' => 5,\n 'title' => \"The Word for World Is Forest\",\n 'isbn' => \"0399117164\",\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 [\n 'author_id' => 5,\n 'title' => \"Rocannon's World\",\n 'isbn' => \"0824014243\",\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 [\n 'author_id' => 5,\n 'title' => \"Planet of Exile\",\n 'isbn' => \"0575025956\",\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 [\n 'author_id' => 5,\n 'title' => \"City of Illusions\",\n 'isbn' => \"0575007583\",\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 [\n 'author_id' => 5,\n 'title' => \"The Left Hand of Darkness\",\n 'isbn' => \"0441478123\",\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 [\n 'author_id' => 5,\n 'title' => \"The Telling\",\n 'isbn' => \"0151005672\",\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 [\n 'author_id' => 5,\n 'title' => \"The Lathe of Heaven\",\n 'isbn' => \"0684125293\",\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 [\n 'author_id' => 5,\n 'title' => \"The Wind's Twelve Quarters\",\n 'isbn' => \"0060125624\",\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 [\n 'author_id' => 5,\n 'title' => \"Orsinian Tales\",\n 'isbn' => \"0060125616\",\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\n // Terry Pratchett\n [\n 'author_id' => 6,\n 'title' => \"The Colour of Magic\",\n 'isbn' => \"086140324X\",\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 [\n 'author_id' => 6,\n 'title' => \"The Light Fantastic\",\n 'isbn' => \"0861402030\",\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 [\n 'author_id' => 6,\n 'title' => \"Equal Rites\",\n 'isbn' => \"0575039507\",\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 [\n 'author_id' => 6,\n 'title' => \"Mort\",\n 'isbn' => \"0575041714\",\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 [\n 'author_id' => 6,\n 'title' => \"Sourcery\",\n 'isbn' => \"0575042176\",\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 [\n 'author_id' => 6,\n 'title' => \"Wyrd Sisters\",\n 'isbn' => \"0575043636\",\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 [\n 'author_id' => 6,\n 'title' => \"Pyramids\",\n 'isbn' => \"0575044632\",\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 [\n 'author_id' => 6,\n 'title' => \"Guards! Guards!\",\n 'isbn' => \"0575046066\",\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 [\n 'author_id' => 6,\n 'title' => \"Eric\",\n 'isbn' => \"0575051914\",\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 [\n 'author_id' => 6,\n 'title' => \"Moving Pictures\",\n 'isbn' => \"0575047631\",\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 [\n 'author_id' => 6,\n 'title' => \"Reaper Man\",\n 'isbn' => \"0575049790\",\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 [\n 'author_id' => 6,\n 'title' => \"Witches Abroad\",\n 'isbn' => \"0575049804\",\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 [\n 'author_id' => 6,\n 'title' => \"Small Gods\",\n 'isbn' => \"0060177500\",\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 [\n 'author_id' => 6,\n 'title' => \"Lords and Ladies\",\n 'isbn' => \"0575052236\",\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 [\n 'author_id' => 6,\n 'title' => \"Men At Arms\",\n 'isbn' => \"0575055030\",\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 [\n 'author_id' => 6,\n 'title' => \"Soul Music\",\n 'isbn' => \"0575055049\",\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 [\n 'author_id' => 6,\n 'title' => \"Interesting Times\",\n 'isbn' => \"0575058005\",\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 [\n 'author_id' => 6,\n 'title' => \"Maskerade\",\n 'isbn' => \"0575058080\",\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 [\n 'author_id' => 6,\n 'title' => \"Feet of Clay\",\n 'isbn' => \"0575059001\",\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 [\n 'author_id' => 6,\n 'title' => \"Hogfather\",\n 'isbn' => \"057506403X\",\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 [\n 'author_id' => 6,\n 'title' => \"Jingo\",\n 'isbn' => \"0575065400\",\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 [\n 'author_id' => 6,\n 'title' => \"The Last Continent\",\n 'isbn' => \"0385409893\",\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 [\n 'author_id' => 6,\n 'title' => \"Carpe Jugulum\",\n 'isbn' => \"0385409923\",\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 [\n 'author_id' => 6,\n 'title' => \"The Fifth Elephant\",\n 'isbn' => \"0385409958\",\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 [\n 'author_id' => 6,\n 'title' => \"The Truth\",\n 'isbn' => \"0385601026\",\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 [\n 'author_id' => 6,\n 'title' => \"Thief of Time\",\n 'isbn' => \"0060199563\",\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 [\n 'author_id' => 6,\n 'title' => \"The Last Hero\",\n 'isbn' => \"057506885X\",\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 [\n 'author_id' => 6,\n 'title' => \"The Amazing Murice and his Educated Rodents\",\n 'isbn' => \"0385601239\",\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 [\n 'author_id' => 6,\n 'title' => \"Night Watch\",\n 'isbn' => \"0385602642\",\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 [\n 'author_id' => 6,\n 'title' => \"The Wee Free Men\",\n 'isbn' => \"0385605331\",\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 [\n 'author_id' => 6,\n 'title' => \"Monstrous Regiment\",\n 'isbn' => \"0385603401\",\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 [\n 'author_id' => 6,\n 'title' => \"A Hat Full of Sky\",\n 'isbn' => \"0385607369\",\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 [\n 'author_id' => 6,\n 'title' => \"Going Postal\",\n 'isbn' => \"0385603428\",\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 [\n 'author_id' => 6,\n 'title' => \"Thud!\",\n 'isbn' => \"0385608675\",\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 [\n 'author_id' => 6,\n 'title' => \"Wintersmith\",\n 'isbn' => \"0385609841\",\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 [\n 'author_id' => 6,\n 'title' => \"Making Money\",\n 'isbn' => \"0385611013\",\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 [\n 'author_id' => 6,\n 'title' => \"Unseen Academicals\",\n 'isbn' => \"0385609345\",\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 [\n 'author_id' => 6,\n 'title' => \"I Shall Wear Midnight\",\n 'isbn' => \"0385611072\",\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 [\n 'author_id' => 6,\n 'title' => \"Snuff\",\n 'isbn' => \"9780385619264\",\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 [\n 'author_id' => 6,\n 'title' => \"Raising Steam\",\n 'isbn' => \"9780857522276\",\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 [\n 'author_id' => 6,\n 'title' => \"The Shepherd's Crown\",\n 'isbn' => \"9780857534811\",\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 ]\n );\n }", "public function getTenLatestPhotos();", "function find_recent_sale_added($limit){\n global $db;\n $sql = \"SELECT s.id,s.qty,s.price,s.date,p.name\";\n $sql .= \" FROM sales s\";\n $sql .= \" LEFT JOIN products p ON s.product_id = p.id\";\n $sql .= \" ORDER BY s.date DESC LIMIT \".$db->escape((int)$limit);\n return find_by_sql($sql);\n}", "function get_all_booksinn($params = array())\n {\n $this->db->select(\"booksinn.*, books.name as bookname\");\n $this->db->join('books','books.id=booksinn.books_id','inner');\n $this->db->order_by('id', 'desc');\n if(isset($params) && !empty($params))\n {\n $this->db->limit($params['limit'], $params['offset']);\n }\n return $this->db->get('booksinn')->result_array();\n }", "public function getMaxBesaveList(){\n return $this->_get(17);\n }", "private function getLastUsers() {\n $last_five_users = array();\n $result = db_select('users_field_data', 'u')\n ->fields('u', array('uid', 'name', 'mail', 'created'))\n ->condition('u.created', REQUEST_TIME - 3600, '>')\n ->orderBy('created', 'DESC')\n ->range(0, 15)\n ->execute();\n\n $count = 0;\n foreach ($result as $record) {\n $last_five_users[$count]['uid'] = $record->uid;\n $last_five_users[$count]['name'] = $record->name;\n $last_five_users[$count]['email'] = $record->mail;\n $last_five_users[$count]['created'] = $record->created;\n $count++;\n }\n\n return $last_five_users;\n }", "public function reviews()\n {\n return $this->hasMany(Review::class)->latest();\n }", "public function index()\n {\n $books = Book::orderby('created_at','desc')->get();\n return view('book.index');\n }", "public function latest($limit = 10)\n {\n return $this->orderBy('created_at', 'DESC')->limit($limit)->get();\n }" ]
[ "0.66409665", "0.66152143", "0.6365157", "0.62084067", "0.6182886", "0.61390436", "0.6080838", "0.5995565", "0.5781299", "0.5759295", "0.5732717", "0.57060367", "0.57048255", "0.5679602", "0.5646191", "0.56201226", "0.561438", "0.5591857", "0.5582936", "0.5569142", "0.55572355", "0.55480593", "0.5540269", "0.55202645", "0.5519613", "0.5509731", "0.54996014", "0.54992074", "0.54908824", "0.54864085", "0.5471972", "0.54462814", "0.54448843", "0.5432879", "0.5428563", "0.54144114", "0.54116327", "0.5405137", "0.5398075", "0.53898466", "0.53767276", "0.5374681", "0.53684443", "0.5355674", "0.5355083", "0.5354944", "0.5354489", "0.5346307", "0.533569", "0.5318041", "0.5315449", "0.52826977", "0.5280175", "0.5277872", "0.5274178", "0.5264658", "0.5242704", "0.5239899", "0.52332205", "0.52332205", "0.5232622", "0.52319574", "0.52300286", "0.5229916", "0.5220426", "0.52008796", "0.51975626", "0.51914316", "0.51797575", "0.5175412", "0.5173019", "0.51657623", "0.5165728", "0.5160486", "0.5158626", "0.5156198", "0.5155102", "0.5153959", "0.5151077", "0.51417345", "0.5139214", "0.5133718", "0.51319355", "0.5123079", "0.51229924", "0.51115173", "0.51022327", "0.51020783", "0.50945103", "0.5092026", "0.50915104", "0.50908375", "0.50907886", "0.50860554", "0.50744927", "0.50737005", "0.50697976", "0.5066083", "0.50634634", "0.50517553" ]
0.6980189
0
Comparing get() and all()
public function getEx8() { # Get all the books $books = \App\Book::all(); $this->printBooks($books); # get() without any query constraints is the equivalent of all() $books = \App\Book::get(); $this->printBooks($books); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasAllOf() {\n return isset($this->field['allOf']);\n }", "public function hasValues(){\n return $this->_has(1);\n }", "public function hasValues() {\n return $this->_has(2);\n }", "abstract public function all();", "public static function all();", "public static function all();", "public static function all();", "public function all();", "public function all();", "public function all();", "public function all();", "public function all();", "public function all();", "public function all();", "public function all();", "public function all();", "public function all();", "public function all();", "public function all();", "public function all();", "public function all();", "public function all();", "public function all();", "public function all();", "public function all();", "public function all();", "public function all();", "public function all();", "public function all();", "public function all();", "public function all();", "public function all();", "public function all();", "public function all();", "public function all();", "public function all();", "public function all();", "public function all();", "public function hasValues() {\n return $this->_has(3);\n }", "public function isGet();", "public function all(): \\Iterator;", "public function getList(){\n foreach ($this as $property => $value) {\n if(is_object($this->{$property})){\n return true;\n }\n }\n }", "public function isComplete()\n {\n $result = TRUE;\n foreach(['Id','Address','FullName'] as $what):\n $getter = 'get'.$what;\n $value = $this->{$getter}();\n $result = $result && !empty($value);\n endforeach;\n return $result;\n }", "public function getIsAll()\n {\n return $this->isAll;\n }", "static function all($collection, $function)\n {\n foreach($collection as $item) {\n if(!$function($item)) {\n return FALSE;\n }\n }\n return TRUE;\n }", "function refresh_all()\r\n\t{\r\n\t\tif ( ! empty($this->all))\r\n\t\t{\r\n\t\t\t$all = array();\r\n\r\n\t\t\tforeach ($this->all as $item)\r\n\t\t\t{\r\n\t\t\t\tif ( ! empty($item->id))\r\n\t\t\t\t{\r\n\t\t\t\t\t$all[] = $item;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t$this->all = $all;\r\n\r\n\t\t\treturn TRUE;\r\n\t\t}\r\n\r\n\t\treturn FALSE;\r\n\t}", "public function hasRet(){\n return $this->_has(5);\n }", "public function getIsMultiple();", "public function hasValue(){\n return $this->_has(2);\n }", "public function hasValue(){\n return $this->_has(2);\n }", "public function hasValue(){\n return $this->_has(2);\n }", "public function hasValue(){\n return $this->_has(2);\n }", "public function hasValue(){\n return $this->_has(2);\n }", "public function hasValue(){\n return $this->_has(2);\n }", "public function hasValue(){\n return $this->_has(2);\n }", "public function hasValue(){\n return $this->_has(2);\n }", "public function hasValue(){\n return $this->_has(2);\n }", "public function hasValue(){\n return $this->_has(2);\n }", "public function is_get() {\n return $this->method == 'get';\n }", "public function all() : Collection;", "public function all(): Collection;", "public function all(): Collection;", "public function all(): Collection;", "public function all(): Collection;", "private function allDescendants()\n {\n return isset($this->query['from'][0]['allDescendants']) && $this->query['from'][0]['allDescendants'];\n }", "public function testGetAll() {\n\t\t$class = get_class($this->entity);\n\t\t$array = $this->entity->toArray(true);\n\t\t$filled = $this->fillArray($array);\n\t\t$entity = new $class($filled);\n\t\t\n\t\t$result = array();\n\t\tforeach ($filled as $attr => $val){\n\t\t\t$entity->{'set' . $attr}($val);\n\t\t\t$result[$attr] = $entity->{'get' . $attr}();\n\t\t}\n\t\t\n\t\t$this->assertEquals($filled, $result);\n\t}", "public function all($with = []);", "public function fALL()\n {\n $fetch_all_data = $this->query->fetchAll(PDO::FETCH_OBJ);\n if($fetch_all_data)\n {\n return $fetch_all_data;\n }else{\n return false;\n }\n \n }", "public function hasPredicateMatched(){\n return $this->_has(1);\n }", "public function testGetAllReturnsAllValuesForSpecifiedKey()\n {\n $values = $this->store->getAll(self::KEY);\n\n $this->assertCount(2, $values);\n $this->assertEquals(self::$FIRST_VALUE, $values[0]);\n $this->assertEquals(self::$SECOND_VALUE, $values[1]);\n }", "public function multiple(): bool\n {\n return count($this->queries) > 1;\n }", "public function all(callable $callback): bool {\n\t\tforeach ($this as $value) {\n\t\t\tif (!$callback($value)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "public function hasBy() {\n return $this->_has(4);\n }", "public function isGet(): bool {}", "public function hasOtherCriteria() {\n return $this->_has(9);\n }", "public function hasResult(){\n return $this->_has(2);\n }", "public function hasX(){\n return $this->_has(1);\n }", "public function hasAny()\n {\n return $this->model->first() ? true : false;\n }", "public function hasValue() {\n return $this->_has(2);\n }", "public function hasValue() {\n return $this->_has(2);\n }", "public function hasValue() {\n return $this->_has(2);\n }", "function all(callable $callback, iterable $items) : bool\n{\n return !any(complement($callback), $items);\n}", "public function testGetAll() {\n return $this->assertIdentical($this->dao->getAll(), 'The Result');\n }", "private function some($a) {\n return $this->any($a) && !$this->all($a);\n }", "public function testAllMatchesRequest()\n {\n $expectedValue = [\n '/1.0/profiles/default',\n '/1.0/profiles/docker',\n ];\n\n $returnedValue = [\n 'default',\n 'docker',\n ];\n\n $endpoint = $this->getEndpointMock($this->getEndpointClass());\n\n $endpoint->expects($this->once())\n ->method('get')\n ->with('/profiles/')\n ->will($this->returnValue($expectedValue));\n\n $this->assertEquals($returnedValue, $endpoint->all());\n }", "public function all(): array;", "public function all(): array;", "public function all(): array;", "public function all(): array;", "public function all(): array;", "public function all(): array;", "public function all(): array;", "public function all(): array;", "public function all(): array;", "public function all(): array;", "public function all(): array;", "public function all(): array;", "public function all(): array;", "public function all(): array;", "public function all(): array;", "public function all(): array;" ]
[ "0.60929894", "0.58653915", "0.57444715", "0.5743021", "0.56015617", "0.56015617", "0.56015617", "0.55878437", "0.55878437", "0.55878437", "0.55878437", "0.55878437", "0.55878437", "0.55878437", "0.55878437", "0.55878437", "0.55878437", "0.55878437", "0.55878437", "0.55878437", "0.55878437", "0.55878437", "0.55878437", "0.55878437", "0.55878437", "0.55878437", "0.55878437", "0.55878437", "0.55878437", "0.55878437", "0.55878437", "0.55878437", "0.55878437", "0.55878437", "0.55878437", "0.55878437", "0.55878437", "0.55878437", "0.5530322", "0.5475384", "0.5473697", "0.54410917", "0.54009813", "0.5349569", "0.5314027", "0.530599", "0.5268927", "0.5268062", "0.52652705", "0.52652705", "0.52652705", "0.52652705", "0.52652705", "0.52652705", "0.52652705", "0.52652705", "0.52652705", "0.52652705", "0.52449316", "0.52407265", "0.52371985", "0.52371985", "0.52371985", "0.52371985", "0.5230136", "0.52209795", "0.52070546", "0.5198139", "0.5192832", "0.51864487", "0.5136905", "0.51368695", "0.5129525", "0.5116162", "0.51106983", "0.51051354", "0.50956374", "0.50915635", "0.5083947", "0.5083947", "0.5083947", "0.50630945", "0.50392574", "0.50381255", "0.5034766", "0.49975774", "0.49975774", "0.49975774", "0.49975774", "0.49975774", "0.49975774", "0.49975774", "0.49975774", "0.49975774", "0.49975774", "0.49975774", "0.49975774", "0.49975774", "0.49975774", "0.49975774", "0.49975774" ]
0.0
-1
Demonstrate deletion with the Book Model
public function getEx7() { # First get a book to delete $book = \App\Book::where('author', 'LIKE', '%Scott%')->first(); # If we found the book, delete it if($book) { # Goodbye! $book->delete(); return "Deletion complete; check the database to see if it worked..."; } else { return "Can't delete - Book not found."; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteFromBook(Book $book);", "public function deleteBook()\n {\n $id = $_POST['id'];\n $time = DELETE_AFTER;\n if (USE_ONE_TABLE) {\n $sql = \"UPDATE `books_authors` SET `deleted` = DATE_ADD(NOW(), interval $time HOUR) WHERE `id` = ?\";\n } else {\n $sql = \"UPDATE `books` SET `deleted` = DATE_ADD(NOW(), interval $time HOUR) WHERE `id` = ?\";\n }\n $this->findBySql($sql, [$id]);\n\n }", "public function destroy(Book $book)\n {\n $book->delete();\n<<<<<<< 4f95b62a3e11769b3815c3c24aa6c4661f507165\n\n=======\n>>>>>>> add update data of admin\n return Redirect::to('books');\n }", "public function practice7()\n {\n $book = Book::where('author', '=', 'J.K. Rowling')->first();\n\n if (!$book) {\n dump('Did not delete- Book not found.');\n } else {\n $book->delete();\n dump('Deletion complete; check the database to see if it worked...');\n }\n }", "public function destroy(book $book)\n {\n //\n }", "public function practice7()\n {\n $book = Book::where('author', '=', 'F. Scott Fitzgerald')->first();\n\n if (!$book) {\n dump('Did not delete- Book not found.');\n } else {\n $book->delete();\n dump('Deletion complete; check the database to see if it worked...');\n }\n }", "public function destroy(Book $book)\n {\n //\n }", "public function destroy(Book $book)\n {\n //\n }", "public function destroy(Book $book)\n {\n //\n }", "public function destroy(Book $book)\n {\n //\n }", "public function destroy(Book $book)\n {\n //\n }", "public function destroy(Book $book)\n {\n //\n }", "public function destroy(Book $book)\n {\n //\n }", "public function destroy(Book $book)\n {\n //\n }", "public function destroy(Book $book)\n {\n //\n }", "public function destroy(Book $book)\n {\n //\n }", "public function destroy(Book $book)\n {\n echo \"haha\";\n }", "public function destroy($id)\n {\n //\n \n $book = Library::find($id);\n //print_r($book);\n $book->delete();\n return Redirect::to('library');\n }", "public function bookDelete(Request $request){\n try{\n $id = Crypt::decryptString($request->book_id);\n } catch (DecryptException $e) {\n return 'DD-E0002';\n }\n\n $logs = New LogsBookUpdate;\n $logs->action = 1;\n $logs->user_id = auth()->user()->id;\n $logs->book_id = $id;\n $logs->save();\n\n $book = Book::find($id);\n $book->status = Carbon::now();\n $book->update();\n\n return redirect()->route('welcome');\n }", "public function delete(Request $request) {\n\n # Get the book to be deleted\n $book = Book::find($request->id);\n\n if(!$book) {\n Session::flash('message', 'Deletion failed; book not found.');\n return redirect('/books');\n }\n\n $book->tags()->detach();\n\n $book->delete();\n\n # Finish\n Session::flash('message', $book->title.' was deleted.');\n return redirect('/books');\n }", "public function getDoDelete($id) {\n $book = \\P4\\Book::find($id);\n\n if(is_null($book)) {\n \\Session::flash('message','Book not found.');\n return redirect('\\books');\n }\n\n # First remove any tags associated with this book\n if($book->tags()) {\n $book->tags()->detach();\n }\n\n # Then delete the book\n $book->delete();\n\n # Done\n \\Session::flash('message',$book->title.' was deleted.');\n return redirect('/books');\n\n }", "public function deleting()\n {\n # code...\n }", "public function delete()\n {\n \n }", "public function practice15()\n {\n //$books = Book::where('title', 'LIKE', '%Harry Potter%')->orWhere\n //('published_year', '>=', 1998)->get();\n\n $books = Book::where('author', 'LIKE', '%Weir%')->get();\n\n if ($books->isEmpty()) {\n dump('No matches found');\n } else {\n dump($books->toArray());\n\n foreach ($books as $book) {\n $book->delete();\n dump('Deletion complete; check the database to see if it worked...');\n }\n \n }\n }", "public function delete()\n {\n \n }", "public function destroy(Book $book)\n {\n $book->delete();\n }", "public function delete(User $user, Book $book)\n {\n //\n }", "public function destroy(Book $book)\n {\n $book->delete();\n\n return redirect()->route('books.index')->with('success','Livro excluído com sucesso!');\n }", "public function delete($id){\n\t\t$this->book_model->delBook($id);\n\t\t// arahkan ke method 'books' di kontroller 'dashboard'\n\t\tredirect('dashboard/books');\n\t}", "public function destroy(Book $book)\n {\n $book->find('id');\n $book->delete();\n //\n\n return redirect()->route(\"books.index\")\n ->with('delete',$book->book_name.' delete Successfully');\n }", "public function delete_book($id_book) {\n\t\t$data = ['deleted' => 1];\n\t\tBooksCModel::update_book($id_book, $data);\n\t\treturn redirect()->back()->with('success','Xóa truyện thành công');\n\t}", "public function delete() {\r\n }", "public function destroy(Book $book)\n {\n \n $findBook = Book::find( $book->id);\n\t\tif($findBook->delete()){\n \n return redirect()->route('books.index')\n ->with('success' , 'Book deleted successfully');\n }\n\n return back()->withInput()->with('error' , 'Book could not be deleted');\n }", "public function delete(Request $request){\n $ISBN = $request->input('ISBN');\n $currentBook = new Book();\n $currentBook = Book::where('ISBN', $ISBN)->first();\n $books = Book::where('position', '>', $currentBook->position)->get();\n\n //update position of other books\n foreach($books as $resultingBook){\n $book = new Book();\n $book = Book::where('ISBN', '=', $resultingBook->ISBN)->first();\n $book->position --;\n $book->update([\"position\" => $book->position]);\n }\n Book::where('ISBN', $ISBN)->delete();\n return redirect('');\n }", "function delete_booksinn($id)\n {\n return $this->db->delete('booksinn',array('id'=>$id));\n }", "public function actionDelete() {}", "public function actionDelete() {}", "public function destroy(Book $book)\n {\n $this->service->setInstance($book); //setting already fetched instance into repository, so Laravel didn`t do it without purpose\n\n $result = $this->service->destroy();\n\n if ($result === false || blank($result)) {\n return response()->json([\n 'success' => false,\n 'message' => 'not deleted'\n ], Response::HTTP_BAD_REQUEST);\n }\n\n return response()->json([\n 'success' => true,\n 'message' => 'deleted',\n 'code' => Response::HTTP_ACCEPTED,\n ], Response::HTTP_ACCEPTED);\n }", "public function delete ()\n {\n $query = \"DELETE FROM \" . $this->table_name . \" WHERE book_id = ?\";\n\n $stmt = $this->conn->prepare($query);\n $stmt->bindParam(1, $this->book_id);\n\n if($result = $stmt->execute()){\n return true;\n }\n else\n {\n return false;\n }\n }", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {\n\n }", "public function deleting($model)\n\t{\n\t}", "public function destroy(Book $book)\n {\n $book->delete();\n return redirect()->route('books.index')->with('success', 'Book Has Been Deleted Successfully');\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function testExample()\n {\n $car = \\App\\Car::find(32);\n $delete= $car->delete();\n $this->assertTrue($delete);\n\n }", "public function getDelete($id)\n {\n $book =\\foobooks\\Book::find($id);\n\t\t$book->tags()->sync([]);\n\t\t\n\t\t$book->delete();\n\t\t\\Session::flash('flash_message','The book has been deleted');\n\t\treturn redirect('/books');\n }", "public function delete()\n {\n\n }", "public function deletebook($id)\n {\n Book::where('Id',$id)->delete();\n return response(array(\n 'success' => true,\n 'message' => 'Delete book successfully',\n\n ),200);\n }", "public function destroy(BookController $bookController)\n {\n //\n }", "public function delete()\n {\n //\n }", "public function delete()\r\n\t{\r\n\t}", "function delete()\n {\n }", "public function testDelete()\n {\n $model = $this->makeFactory();\n $model->save();\n\n $this->json('DELETE', static::ROUTE . '/' . $model->id, [], [\n 'Authorization' => 'Token ' . self::getToken()\n ])\n ->seeStatusCode(JsonResponse::HTTP_NO_CONTENT);\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 delete(): void\n {\n }", "public function destroy(Book $book)\n {\n $book->delete();\n return redirect('/books');\n }", "public function destroy(Book $book)\n {\n $book->delete();\n return redirect()->route('books.index');\n }", "public function delete($id){\n $library = Library::find(Auth::user()->library->id);\n $library->books()->detach($id);\n return redirect('/');\n }", "public function destroy(Book $book)\n {\n $book->delete();\n return redirect('/shops');\n }", "function delete() {\n $this->that->delete($this->id, $this->name);\n $this->put_id();\n }", "public function deleteAction() {\n \n }", "public function delete(Request $request, $id)\n {\n //Delete records in a staging table\n Book::find($id)->authors()->detach();\n //Delete author\n Book::find($id)->remove();\n\n return redirect()->back()->with('status', 'Book deleted!');\n }", "public function getDoDelete($id) {\n $list = \\App\\Lists::find($id);\n $entries = \\App\\Entry::where('list_id',$id)->get();\n\n if(is_null($list)) {\n \\Session::flash('message','Not found.');\n return redirect('/profile');\n }\n\n # First remove any entries associated with this book\n if(isset($entries)) {\n foreach($entries as $entry){\n $entry->delete();\n }\n }\n\n # Then delete the book\n $list->delete();\n\n # Done\n \\Session::flash('message',$list->subject.' was deleted.');\n return redirect('/profile');\n\n }", "public function delete(){\n }", "public function delete($id)\n\t{\n\t\t$this->book_model->delBook($id);\n\t\t// arahkan ke method 'books' di kontroller 'dashboard'\n\t\tredirect('dashboard/books');\n\t}", "public function delete()\n\t{\n\t}", "public function destroy(booksCategory $booksCategory)\n {\n //\n }", "public function destroy(booksCategory $booksCategory)\n {\n //\n }", "protected function delete() {\n\t}", "public function destroy(Request $request)\n {\n $req =$request['0'];\n // print_r($req);exit();\n\n // $data =Rent::find($req['id'])->where('book_id',$req['book_id'])->delete();\n $data =DB::table('rents')->where('book_id', $req['id'])->delete();\n\n $booked = DB::table('books')\n ->where('id', $req['id'])\n ->update(['booked_status' => '0']);\n \n }", "public function destroy(Book $book)\n {\n $this->repository->delete($book->id);\n \\Session::flash('message', 'Livro excluída com sucesso.');\n return redirect()->route('books.index');\n }", "public function destroy($id)\n {\n // delete\n $model = Book::find($id); \n $model->delete();\n Rating::where('object_id', $id)->where('object_type', 1)->delete();\n // redirect\n Session::flash('message', 'Xóa thành công');\n \n return redirect(URL::previous());\n \n }", "public function delete($model);", "public function destroy(Book $book)\n {\n Book::destroy($book->id);\n return redirect('/books')->with('status', 'Data Buku Berhasil Dihapus!');\n }", "public function DELETE() {\n #\n }" ]
[ "0.8164867", "0.7616667", "0.75166726", "0.7470828", "0.7334113", "0.732572", "0.72823066", "0.72823066", "0.72823066", "0.72823066", "0.72823066", "0.72823066", "0.72823066", "0.72823066", "0.72823066", "0.72823066", "0.72795165", "0.69932836", "0.69479114", "0.6926514", "0.6923865", "0.6911782", "0.6898318", "0.6888298", "0.68699896", "0.6857915", "0.6830656", "0.6807959", "0.6805544", "0.67922723", "0.6780149", "0.6758425", "0.67424655", "0.6737913", "0.6731095", "0.67107797", "0.67107797", "0.67054796", "0.6688737", "0.668471", "0.668471", "0.6683982", "0.6683158", "0.668125", "0.66738576", "0.6673408", "0.6672824", "0.6672824", "0.6672824", "0.6672824", "0.6672824", "0.6672824", "0.6672824", "0.6672824", "0.6672824", "0.6672824", "0.6667896", "0.66619265", "0.66565806", "0.66544294", "0.66369087", "0.6630878", "0.66213477", "0.661796", "0.661007", "0.66077507", "0.66077507", "0.66077507", "0.66077507", "0.66077507", "0.66077507", "0.66077507", "0.66077507", "0.66077507", "0.66077507", "0.66077507", "0.66077507", "0.66077507", "0.66077507", "0.66077507", "0.66020167", "0.6599414", "0.65989125", "0.65876853", "0.65874684", "0.6587162", "0.65766054", "0.6571194", "0.6570433", "0.6567417", "0.65655214", "0.6563867", "0.65522695", "0.65522695", "0.65511584", "0.65455353", "0.6545075", "0.65384233", "0.6529521", "0.6524909", "0.65209764" ]
0.0
-1
Demonstrate updating with the Book Model
public function getEx6() { # First get a book to update $book = \App\Book::where('author', 'LIKE', '%Scott%')->first(); # If we found the book, update it if($book) { # Give it a different title $book->title = 'The Really Great Gatsby'; # Save the changes $book->save(); echo "Update complete; check the database to see if your update worked..."; } else { echo "Book not found, can't update."; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update(Request $request, book $book)\n {\n \n }", "public function update(Request $request, Book $book)\n {\n //\n }", "public function update(Request $request, Book $book)\n {\n //\n }", "public function update(Request $request, Book $book)\n {\n //\n }", "public function update(Request $request, Book $book)\n {\n //\n }", "public function update(Request $request, Book $book)\n {\n //\n }", "public function update(Request $request, Book $book)\n {\n //\n }", "public function update(Request $request, Book $book)\n {\n //\n }", "public function update(Request $request, Book $book)\n {\n //\n }", "public function update(Request $request, book $book)\n {\n //\n }", "public function practice6()\n {\n $book = Book::where('author', '=', 'F. Scott Fitzgerald')->first();\n\n if (!$book) {\n dump(\"Book not found, can't update.\");\n } else {\n # Change some properties\n $book->title = 'The Really Great Gatsby';\n $book->published_year = '2025';\n\n # Save the changes\n $book->save();\n\n dump('Update complete; check the database to confirm the update worked.');\n }\n }", "public function edit(Book $book)\n {\n //\n }", "public function edit(Book $book)\n {\n //\n }", "public function edit(Book $book)\n {\n //\n }", "public function edit(Book $book)\n {\n //\n }", "public function edit(Book $book)\n {\n //\n }", "public function edit(Book $book)\n {\n //\n }", "public function edit(Book $book)\n {\n //\n }", "public function edit(Book $book)\n {\n //\n }", "public function edit(Book $book)\n {\n //\n }", "public function edit(book $book)\n {\n //\n }", "public function edit(Book $book)\n {\n //\n //\n }", "public function modifyBook($book) {\n\n if ($this-> validInput($book) == true) {\n\n $stmt = $this->db-> prepare(\"UPDATE book set title = :title, \n author = :author, \n description = :description \n WHERE id = :id\");\n\n $stmt-> bindValue(':id', $book->id);\n $stmt-> bindValue(':title', $book->title);\n $stmt-> bindValue(':author', $book->author);\n $stmt-> bindValue(':description', $book->description);\n\n $stmt-> execute();\n\n }\n else {\n\n $this-> gracefulErrorPage();\n return false;\n }\n }", "public function update(Request $request, Book $book)\n {\n $request->validate([\n 'title' => 'required',\n 'description' => 'required',\n 'author' => 'required',\n 'pages' => 'required',\n ]);\n \n $book->update($request->all());\n \n return redirect()->route('books.index')->with('success','Livro atualizado com sucesso.');\n }", "public function update(Request $request, Book $book)\n {\n // Book::where('id', $book)->update($request->all());\n\n $input = $request->all();\n $book->find('id');\n $book->update($input);\n\n return redirect()->route(\"books.index\")\n ->with('success',$book->book_name.' Update Successfully');\n }", "public function update(Request $request, Book $book)\n {\n \n $this->validate(request(),[\n 'kode_buku' => 'required',\n 'judul_buku' => 'required',\n 'tahun_terbit' => 'required',\n 'penulis' => 'required',\n 'stok' => 'required',\n ]);\n\n\n $book->kode_buku = $request->kode_buku;\n $book->judul_buku = $request->judul_buku;\n $book->tahun_terbit = $request->tahun_terbit;\n $book->penulis = $request->penulis;\n $book->stok = $request->stok;\n\n $book->save();\n\n return redirect()->route('books.index');\n }", "public function update(Request $request, BookRecord $bookRecord)\n {\n //\n }", "public static function update_book($book) {\n\t\t$id = $book->id;\n\t\t$data_book = [\n\t\t\t'other_name'\t=> $book->other_name,\n\t\t\t'release_at'\t=> $book->release_at,\n\t\t\t'description'\t=> $book->description,\n\t\t\t'status'\t\t=> $book->status,\n\t\t\t'id_author'\t\t=> $book->id_author,\n\t\t\t'id_artist'\t\t=> $book->id_artist,\n\t\t\t'id_uploader'\t=> $book->id_uploader\n\t\t];\n\t\t//update book\n\t\tBooksCModel::update_book($id, $data_book);\n\n\t\t//update book category\n\t\tBooksCategoryCModel::delete_book_category_by_book_id($id);\n\t\t$categories = [];\n\t\tforeach ($book->categories as $key => $category) {\n\t\t\t$categories[$key] = [\n\t\t\t\t'id_book'\t\t=> $id,\n\t\t\t\t'id_category'\t=> $category\n\t\t\t];\n\t\t\tBooksCategoryCModel::insert_book_category($categories[$key]);\n\t\t}\n\n\t\t//update book character\n\t\tBooksCharacterCModel::delete_book_character_by_book_id($id);\n\t\t$characters = [];\n\t\tforeach ($book->characters as $key => $character) {\n\t\t\t$characters[$key] = [\n\t\t\t\t'id_book'\t\t=> $id,\n\t\t\t\t'id_character'\t=> $character\n\t\t\t];\n\t\t\tBooksCharacterCModel::insert_book_character($characters[$key]);\n\t\t}\n\t}", "public function update(Request $request, $book)\n {\n $rules = [\n 'partid' => 'required',\n 'title' => 'required',\n 'description' => 'required',\n 'author' => 'required',\n 'year' => 'required',\n ];\n\n $valideted = $this->validate($request, $rules);\n\n $partid = $valideted['partid'];\n $title = $valideted['title'];\n $description = $valideted['description'];\n $author = $valideted['author'];\n $year = $valideted['year'];\n\n DB::update(\"update books\n set title='$title', cat_id='$partid', description='$description', author='$author', year='$year'\n where slug='$book'\");\n\n return redirect('/admin/parts');\n }", "public function update(Request $request, BookController $bookController)\n {\n //\n }", "public function update(Request $request, Book $book)\n {\n $request->validate([\n 'author' => 'string'\n ]);\n\n $book->update($request->all());\n }", "public function update(Request $request, newbook $newbook)\n {\n //\n }", "public function update(BookRec $request, Book $book)\n {\n $request->validated();\n\n $book->barCode = $request->barCode;\n $book->title = $request->title;\n $book->author = $request->author;\n $book->price = $request->price;\n $book->quantity = $request->quantity;\n $book->available = $request->available;\n $book->description = $request->description;\n $book->save();\n\n return redirect()->route('books.index')->with('success', 'Book Has Been Created Successfully');\n }", "public function update(Request $request, Book $book)\n {\n $input = $request->validate([\n 'isbn' => 'required|unique:books,isbn,' . $book->isbn,\n 'title' => 'required',\n 'date_of_publication' => 'required',\n 'category_id' => 'required|exists:categories,id',\n 'author_id' => 'required|exists:authors,id',\n ]);\n $book->isbn = $input['isbn'];\n $book->title = $input['title'];\n $book->date_of_publication = $input['date_of_publication'];\n $book->category_id = $input['category_id'];\n $book->author_id = $input['author_id'];\n $book->save();\n\n return response()->json($book);\n }", "public function update(Request $request, Book $book)\n {\n\n\n Book::where('id', $book->id)\n ->update([\n \n 'judul' => $request->judul,\n 'penulis' => $request->penulis,\n 'penerbit' => $request->penerbit,\n 'tahun' => $request->tahun,\n 'sinopsis' => $request->sinopsis,\n\n ]);\n return redirect('/books')->with('status', 'Data Buku Berhasil Diubah!');\n }", "public function update(StoreBookRequest $request, Book $book)\n {\n $book->title = $request->input('title');\n $book->description = $request->input('description');\n $book->price = $request->input('price');\n $book->discount = $request->input('discount');\n $book->genres()->sync($request['genres']);\n $book->is_approved = null;\n $authors = explode(',', $request['authors']);\n\n foreach($authors as $authorName){\n $author = Author::updateOrCreate(['name' => $authorName]);\n $book->authors()->sync($author->id);\n }\n\n if($request->hasFile('image')){\n $book->image = ImageService::storeImage($request);\n }\n\n $book->save();\n\n return redirect(route('admin.books.index'))->with('success','Book saved, but will only be visible when approved by admin');\n }", "public function update(Request $request, Book $book)\n {\n $this->validate($request, [\n 'title' => 'required|unique:books,title,' . $book->id . ',id|max:50',\n 'pages' => 'required|gt:0',\n 'isbn' => 'required|gt:0',\n 'description' => 'required|max:200',\n 'author_id' => 'required'\n\n ]);\n\n $book->fill($request->all());\n\n return ($book->save() !== 1) ?\n redirect()->route('books.index')->with('status_success', \"Knyga: {$request->title} redaguota!\") :\n redirect()->route('books.index')->with('status_error', \"Klaida!\");\n }", "public function update(BookUpdateRequest $request, Book $book)\n {\n $data = $request->except(['user_id']);\n $data['published'] = $request->get('published', false); \n $this->repository->update($data, $book->id);\n $url = $request->get('redirect_to', route('books.index'));\n $request->session()->flash('message', 'Livro alterado com sucesso.');\n return redirect()->to($url);\n }", "public function edit()\n {\n $user_id = Auth::user()->id;\n $data = INPUT::all();\n $rules = $this->rules();\n $messages = $this->messages();\n $validator = Validator::make($data, $rules, $messages);\n if (!$validator->fails()) {\n $book = Book::find($data['id']);\n $book->title = $data['title'];\n $book->subtitle = $data['subtitle'];\n $book->publishedDate = $data['publishedDate'];\n $book->description = $data['description'];\n $book->pages = $data['pages'];\n $book->isbn10 = $data['isbn10'];\n $book->isbn13 = $data['isbn13'];\n $book->price_day = $data['price_day'];\n $book->price_bail = $data['price_bail'];\n $book->price_sale = $data['price_sale'];\n $book->language = $data['language'];\n\n if ($data['publisher'] != $book->id_publisher) {\n if ($data['publisher'] != '0') {\n $book->id_publisher = $data['publisher'];\n } else {\n $publisher = new Publisher;\n $publisher->publisher = $data['newpublisher'];\n $publisher->save();\n $book->id_publisher = $publisher->id;\n }\n }\n\n if (isset($data['cover'])) {\n $book->cover = file_get_contents($data['cover']);\n }\n\n $book_id = $book->id;\n Book_Collection::where('book_id', $book_id)->delete();\n Author_Book::where('book_id', $book_id)->delete();\n\n $book_collection = new Book_Collection;\n $book_collection->book_id = $book_id;\n $book_collection->collection_id = $data['collection'];\n\n $authors = explode(',', $data['authors']);\n foreach ($authors as $author) {\n $tmp = Author::where('name', 'like', $author)->limit(1)->get();\n if (count($tmp) > 0) {\n $author_book = new Author_Book;\n $author_book->book_id = $book_id;\n $author_book->author_id = $tmp[0]->id;\n $author_book->save();\n } else {\n $newAuthor = new Author;\n $newAuthor->name = $author;\n $newAuthor->save();\n $author_id = $newAuthor->id;\n $author_book = new Author_Book;\n $author_book->book_id = $book_id;\n $author_book->author_id = $author_id;\n $author_book->save();\n }\n }\n $book->save();\n return redirect('book/edit/' . $book_id . '');\n }\n return back()->withInput($data)->withErrors($validator);\n }", "public function edit(BookRecord $bookRecord)\n {\n //\n }", "public function postEdit(Request $request)\n {\n $book = \\foobooks\\Book::find($request->id);\n\t\t\n\t\t$book->title = $request->title;\n\t\t$book->author_id = $request->author_id;\n\t\t$book->published = $request->published;\n\t\t$book->cover = $request->cover;\n\t\t$book->purchase_link = $request->purchase_link;\n\t\t\n\t\t# If there were tags selected...\n\t\tif($request->tags) {\n\t\t\t$tags = $request->tags;\n\t\t}\n\t\t# If there were no tags selected (i.e. no tags in the request)\n\t\t# default to an empty array of tags\n\t\telse {\n\t\t\t$tags = [];\n\t\t}\t\t\n\t\t$book->tags()->sync($tags);\n\t\t\n\t\t$book->save();\n\t\t\n\t\t\\Session::flash('message', 'Your book has been updated');\n\t\treturn redirect('/books/show/'.$request->id);\n }", "public function update(Update $request, Book $book)\n {\n $this->service->setInstance($book); //setting already fetched instance into repository, so Laravel didn`t do it without purpose\n\n $result = $this->service->update($request->only(['category_id'])); //if system should update only category of book, not clear from task, otherwise - just do $request->all()\n\n if ($result === false || blank($result)) {\n return response()->json([\n 'success' => false,\n 'message' => 'not updated'\n ], Response::HTTP_BAD_REQUEST);\n }\n\n return response()->json([\n 'success' => true,\n 'message' => 'updated',\n 'code' => Response::HTTP_OK,\n ], Response::HTTP_OK);\n }", "public function actionUpdate($id)\n {\n $modelBook = $this->findModel($id);\n $modelBookForm = new BookForm($modelBook);\n $authorsId = $modelBook->getAuthors()->select('id')->asArray()->all();\n $modelsAuthor = Author::findAll($authorsId); //$modelBook->getAuthors()->asArray()->all();\n\n if ($modelBook->load(Yii::$app->request->post())) {\n $modelsAuthorNew = Model::createMultiple(Author::className());\n Model::loadMultiple($modelsAuthorNew, Yii::$app->request->post());\n //process, separate book keyWords\n $modelsKeyWordsNew = [new KeyWord];\n if ($wordsArray = $modelBookForm->prepareKeyWords(Yii::$app->request->post('KeyWord')['words'])) {\n $modelsKeyWordsNew = Model::createMultiple(KeyWord::className(), [], $wordsArray);\n // KeyWord[0]['word' =>'php']\n Model::loadMultiple($modelsKeyWordsNew, $wordsArray, '');\n }\n $valid = $modelBook->validate();\n $valid = Model::validateMultiple($modelsAuthorNew) && $valid;\n $valid = $wordsArray === false ? $valid : Model::validateMultiple($modelsKeyWordsNew) && $valid;\n\n if ($valid && $modelBookForm->updateBook($modelsAuthor, $modelsAuthorNew, $modelsKeyWordsNew)) {\n Yii::$app->session->setFlash('success', Yii::t('app', Yii::t('app', 'Book was updated successfully.')));\n Yii::info($id . '_update', 'book');\n\n return $this->redirect(['view', 'id' => $modelBook->id]);\n } else {\n //get all errors from multiple models\n if (($msg = BookForm::getErrorsMessages($modelsAuthorNew)) !== false) {\n Yii::$app->session->addFlash('danger', $msg);\n }\n if (($msg = BookForm::getErrorsMessages($modelsKeyWordsNew)) !== false) {\n Yii::$app->session->addFlash('danger', $msg);\n }\n }\n Yii::$app->session->addFlash('danger', Yii::t('app', 'Book was not updated.'));\n }\n\n return $this->render('update', [\n 'modelBook' => $modelBook,\n 'modelsAuthor' => (empty($modelsAuthor)) ? [new Author] : $modelsAuthor,\n 'keyWords' => $modelBookForm->getKeyWords(),\n ]);\n }", "public function update(Request $request)\n {\n $validator = Validator::make($request->all(), [\n 'id' => 'required',\n 'item_name' => 'required|min:3|max:255',\n 'item_number' => 'required|min:1|max:3',\n 'item_amount' => 'required|min:1|max:6',\n 'published' => 'required',\n ]);\n\n if ($validator->fails()) {\n return redirect('/')->withInput()->withErrors($validator);\n }\n\n $book = Book::where('user_id', Auth::user()->id)->find($request->id);\n $book->item_name = $request->item_name;\n $book->item_number = $request->item_number;\n $book->item_amount = $request->item_amount;\n $book->published = $request->published;\n $book->save();\n\n return redirect('/');\n }", "public function updateBook()\n\t{\n\t\tif (cookie('staffAccount') != '') {\n\t\t\t$ISBN = $_POST['ISBN'];\n\t\t\t$title = $_POST['title'];\n\t\t\t$author = $_POST['author'];\n\t\t\t$press = $_POST['press'];\n\t\t\t$category = $_POST['category'];\n\t\t\t$pub_date = $_POST['pub_date'];\n\t\t\t$price = $_POST['price'];\n\t\t\t$floor = $_POST['floor'];\n\t\t\t$bookshelf = $_POST['bookshelf'];\n\t\t\t$area_code = $_POST['area_code'];\n\n\t\t\t$book = D('Book_species');\n\t\t\t$sql = \"update lib_book_species set title = '{$title}',author='{$author}',press='{$press}',\n\t\t\t\t \tcategory='{$category}',pub_date='{$pub_date}',price='{$price}',\n\t\t\t\t \tfloor='{$floor}',bookshelf='{$bookshelf}',area_code='{$area_code}'\n\t\t\t\t \twhere isbn = '{$ISBN}'\";\n\t\t\t$return = $book->execute($sql);\n\n\t\t\tif ($return) {\n\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t'code' => 'success',\n\t\t\t\t\t'msg' => 'Modify successfully!'\n\t\t\t\t));\n\t\t\t\techo $json;\n\t\t\t} else {\n\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t'code' => 'fail',\n\t\t\t\t\t'msg' => 'SQL Error!'\n\t\t\t\t));\n\t\t\t\techo $json;\n\t\t\t}\n\t\t} else {\n\t\t\t$json = json_encode(array(\n\t\t\t\t'code' => 'fail',\n\t\t\t\t'msg' => 'Please Login!'\n\t\t\t));\n\t\t\techo $json;\n\t\t}\n\t}", "public function update(Request $request, $id)\n {\n $book = Book::findOrFail($id);\n $name = $book->name;\n // dd($id);\n\n\n $book->id = $id;\n $book->name = $request->input('name');\n $book->isbn = $request->input('isbn');\n $book->authors = $request->input('authors');\n $book->numberOfPages = $request->input('number_of_pages');\n $book->publisher = $request->input('publisher');\n $book->country = $request->input('country');\n $book->released = $request->input('release_date');\n\n // dd($book);\n\n if ($book->save()) {\n return redirect('/');\n // dd($book);\n\n return (new BookResource($book))->additional([\n 'status_code' => 204,\n 'status' => 'success',\n 'message' => 'The book ' . $name . ' was updated successfully',\n ]);\n }\n // \"The book My First Book was updated successfully\",\n }", "public function update ()\n {\n\n\n $query = \"UPDATE\n \" . $this->table_name . \"\n SET\n type_id=:type_id, name=:name, isbn=:isbn, publisher=:publisher,author=:author,price=:price\n WHERE\n book_id =:book_id\";\n\n\n\n $stmt = $this->conn->prepare($query);\n\n\n\n $this->type_id=htmlspecialchars(strip_tags($this->type_id));\n $this->name=htmlspecialchars(strip_tags($this->name));\n $this->isbn=htmlspecialchars(strip_tags($this->isbn));\n $this->publisher=htmlspecialchars(strip_tags($this->publisher));\n $this->author=htmlspecialchars(strip_tags($this->author));\n $this->price=htmlspecialchars(strip_tags($this->price));\n $this->book_id=htmlspecialchars(strip_tags($this->book_id));\n\n\n\n $stmt->bindParam(\":type_id\", $this->type_id);\n $stmt->bindParam(\":name\", $this->name);\n $stmt->bindParam(\":isbn\", $this->isbn);\n $stmt->bindParam(\":publisher\", $this->publisher);\n $stmt->bindParam(\":author\", $this->author);\n $stmt->bindParam(\":price\",$this->price);\n $stmt->bindParam(\":book_id\", $this->book_id);\n\n if($stmt->execute()){\n return true;\n }\n\n return false;\n\n }", "public function update_book($title,$author,$publisher,$id){\n $sql = \"UPDATE book SET title=:title, author=:author, publisher=:publisher WHERE id=:id\";\n $stmt = $this->con->prepare($sql); \n $stmt->bindParam(':title', $title, PDO::PARAM_STR); \n $stmt->bindParam(':author', $author, PDO::PARAM_STR); \n $stmt->bindParam(':publisher', $publisher, PDO::PARAM_STR); \n $stmt->bindParam(':id', $id, PDO::PARAM_INT); \n $stmt->execute();\n\n \n if($stmt){\n $location=\"../welcome.php\";\n $message=\"Book has been successfully updated\";\n header(\"Location: $location?message=$message\");\n }\n else{\n $location=\"../welcome.php\";\n $message=\"something went wrong!\";\n header(\"Location: $location?error_msg=$message\");\n\n }\n \n\n }", "function test_updateName()\n {\n //Arrange\n $title = \"Whimsical Fairytales...and other stories\";\n $genre = \"Fantasy\";\n $test_book = new Book($title, $genre);\n $test_book->save();\n\n $column_to_update = \"title\";\n $new_info = \"Generic Fantasy Novel\";\n\n //Act\n $test_book->update($column_to_update, $new_info);\n\n //Assert\n $result = Book::getAll();\n $this->assertEquals(\"Generic Fantasy Novel\", $result[0]->getTitle());\n }", "function test_updateGenre()\n {\n //Arrange\n $title = \"Whimsical Fairytales...and other stories\";\n $genre = \"Fantasy\";\n $test_book = new Book($title, $genre);\n $test_book->save();\n\n $column_to_update = \"genre\";\n $new_info = \"Historical Fiction\";\n\n //Act\n $test_book->update($column_to_update, $new_info);\n\n //Assert\n $result = Book::getAll();\n $this->assertEquals(\"Historical Fiction\", $result[0]->getGenre());\n }", "public function update(Request $request, Book $book)\n {\n Book::where('id', $book->id)\n ->update([\n 'judul' => $request->judul,\n 'isbn' => $request->isbn,\n 'nidn' => $request->nidn,\n 'url' => $request->url\n\n ]);\n return redirect('/books');\n }", "public function update(Request $request, $id)\n {\n $book = Book::find($id);\n $book->update($request->all());\n //DB::statement(\"Update books set title='\".$request->title.\"' where id=\".$id); \n return $book;\n }", "public function update(Book $book)\n {\n $user = auth()->user()->id;\n $book->available = $book->available - 1;\n $book->save();\n \n $date = strtotime(date('Y/m/d'));\n $date = strtotime(\"+7 day\", $date);\n $return_date = date('Y/m/d', $date);\n \n\n Rent::create([\n 'name' => $book->name,\n 'student_id' => $user,\n 'rent_date' => date('Y-m-d'),\n 'return_date' => $return_date\n ]);\n \n return redirect('/user/rented');\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n AuthorBook::deleteAll(['author_id'=> $model->id]);\n\n $books = Yii::$app->request->post('authorBooks');\n if($books){\n foreach ($books as $book_id){\n $authorBook = new AuthorBook();\n $authorBook->author_id = $model->id;\n $authorBook->book_id = $book_id;\n $authorBook->created_at = time();\n $authorBook->updated_at = time();\n $authorBook->save();\n }\n }\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n $books = Book::find()->select(['id', 'name'])->all();\n\n //Create array for Selectize\n foreach ($books as $book){\n $arr_books[$book->id] = $book->name;\n }\n\n foreach($model->authorBooks as $book){\n $selected_books[$book->book_id] = $book->book_id;\n }\n\n\n\n return $this->render('update', [\n 'model' => $model,\n 'books' => $arr_books,\n 'selected_books' => $selected_books,\n ]);\n }", "abstract protected function updateModel();", "public function updateAvailable(Request $request, Book $book)\n {\n $updated_book = Book::find($book) ->first();\n/* $updated_book->available = $request->available ; */\n $updated_book->update(['available'=>$request->available]);\n return response()->json([\n 'status_code' => 200,\n 'message' => $updated_book,\n ]);\n }", "public function testUpdate(): void { }", "public function updateBook ($session) {\n\n // let's just assume we have a book and get it\n $aBook = $session->get('book');\n // make a variable for books\n $books = $session->get('books');\n // remove book from books\n unset($books[$aBook['Id']]);\n // add updated book\n $books[$aBook['Id']] = $aBook;\n // not necessarily sure why I need to do this\n $session->put('books', $books);\n\n }", "public function actionUpdate() {}", "public function actionUpdate() {}", "public function update(Request $request, booksCategory $booksCategory)\n {\n //\n }", "public function update(Request $request, booksCategory $booksCategory)\n {\n //\n }", "public function db_update() {}", "public function updatebook(Request $request, $id)\n { Book::where('Id',$id)->update($request->all());\n return response(array(\n 'success' => true,\n 'message' =>'Product updated successfully', ),200);\n\n }", "public function update(Request $request, $book)\n {\n if(isset($request->author_id))\n {\n $this->authorService->obtainAuthor($request->author_id);\n }\n return $this->successResponse($this->bookService->editBook($request->all(),$book));\n }", "function update(){\n\t\t$this->model->update();\n\t}", "public static function update()\r\n\t{\r\n\t\t\r\n\t\t/*\r\n\t\t// Make sure user provided an image\r\n\t\tif(!empty($_FILES['image'])) {\r\n\t\t\t$_POST['image'] = $_FILES['image'];\r\n\t\t}\r\n\t\tvar_dump($_POST);\r\n\t\tdie;\r\n\t\t*/\r\n\t\t\r\n\t\t//$v = new Validator($_POST);\r\n\t\t$v = new Validator(filter_input_array(INPUT_POST));\r\n\t\t$v->rule('required', ['title','num_pages', 'year_published', 'price', 'description']);\r\n\t\t$v->validate();\r\n\t\tif(empty($v->errors())) {\r\n\t\t\t$model = new Books();\r\n\t\t\t$data = array(\r\n\t\t\t\t'book_id' => $_POST['book_id'],\r\n\t\t\t\t'title' => $_POST['title'],\r\n\t\t\t\t'price' => $_POST['price'],\r\n\t\t\t\t'image' => $_FILES['image']['name'] ?? null,\r\n\t\t\t\t'num_pages' => $_POST['num_pages'],\r\n\t\t\t\t'year_published' => $_POST['year_published'],\r\n\t\t\t\t'description' => $_POST['description']\r\n\t\t\t);\r\n\t\t\t$model->update($data);\r\n\t\t\theader('Location:/books/'.$data['book_id'].'/show');\r\n\t\t\tdie;\r\n\t\t}\r\n\t\tvar_dump($v->errors());\r\n\t\tdie;\r\n\r\n\t}", "public function testUpdatePerson()\n {\n }", "public function update(Request $request, Book $book)\n {\n\n $request->validate([\n 'title' => 'required',\n 'author' => 'required',\n 'category' => 'required',\n 'price' => 'required',\n 'quantity' => 'required',\n 'image' => 'image|mimes:jpeg,png,jpg,svg',\n ]);\n\n $book->title = $request->title;\n $book->author = $request->author;\n $book->category_id = $request->category;\n $book->price = $request->price;\n $book->quantity = $request->quantity;\n $book->available = $request->available;\n\n\n if (request()->image != null) {\n $imageName = time() . '.' . request()->image->getClientOriginalExtension();\n request()->image->move(public_path('images'), $imageName);\n $book->image = $imageName;\n }\n $book->save();\n return back()->with('message', 'Book updated successfully');\n }", "public function updateList($book)\n {\n MyLogger::info(\"Entering OwnedBookBusinessService.updateList\");\n //creates a connection\n $db = new Connection();\n $conn = $db->open();\n \n //calls the data service\n $service = new OwnedBookDataService($conn);\n \n //sends the model to the edit function in the data service\n $success = $service->editList($book);\n \n //closes the connection\n $conn = null;\n \n //if it is successful return true\n if ($success == 1) { return true; }\n \n //else return false\n else { return false; }\n MyLogger::info(\"Exiting OwnedBookBusinessService.updateList\");\n }", "public function update(Request $request, BookTour $bookTour)\n {\n //\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->update()) {\n $this->redirect(Url::previous('before_update_book'));\n } else {\n \tUrl::remember(Yii::$app->request->referrer, 'before_update_book');\n \t$authorsArray = Author::getAuthorsArray();\n return $this->render('update', [\n 'model' => $model,\n 'authorsArray' => $authorsArray\n ]);\n }\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 update(Request $request, $bookid,$userid)\n {\n $book = Book::find($bookid);\n $book->book_user_id = $userid;\n $book->save();\n }", "public function Do_update_Example1(){\n\n\t}", "public function updating($model)\n\t{\n\t}", "public function update(Request $request, Book $book)\n {\n $validatedData = request($this->validateBook());\n if ($request->hasfile(\"picture\")) {\n $book->picture = request('picture')->store('books');\n } else {\n $book->picture = Input::old('picture');\n }\n $book->picture = request('picture')->store('books');\n $book->title = request('title');\n $book->author = request('author');\n $book->publishing_house = request('publishing_house');\n $book->isbn = request('isbn');\n $book->presentation = request('presentation');\n $book->public_price = request('public_price');\n $book->proposed_price = request('proposed_price');\n $book->stock = request('stock');\n // TODO: check the file\n $book->update($validatedData);\n return redirect($book->path());\n\n }", "public function update(BooksRequest $request, $id)\n {\n $book = Book::find($id);\n $old_authors = $book->authors;\n $old_id = $book->id;\n $book_data = Book::setAttributes($request);\n $book_data['category_id'] = $request->input('category_id');\n $book_data['rating'] = $request->input('rating');\n if($request->file) {\n ImageController::imageDelete($book->image);\n $image = ImageController::imageUpload($request->file);\n $book_data['image'] = $image;\n }\n\n if($book){\n if($book->update($book_data)){\n foreach ($old_authors as $old_author){\n $old_author->books()->detach($old_id);\n }\n\n foreach ($request->authors as $id){\n $author = Author::find($id);\n $author->books()->attach($old_id);\n }\n $meesages = 'Book updated !!';\n return redirect('/admin/books')->with('success', $meesages);\n }\n return redirect()->back()->with('error', 'Some mistake went !!');\n }\n\n return redirect()->back()->with('error', 'Some mistake went !!');\n\n }", "public function update(BookPostRequest $request, $id)\n {\n try {\n $book = Book::find($id);\n\n $book->update(\n $request->only([\n 'name','isbn','authors','country','number_of_pages','publisher','release_date'\n ])\n );\n $this->statusCode = 200;\n $this->statusText = 'success';\n $this->message = 'The book My First Book was updated successfully';\n } catch (Exception $exception) {\n Log::alert(\"Something went wrong. \" . $exception->getMessage());\n } catch (Error $error) {\n Log::alert(\"An error occured. \" . $error->getMessage());\n }\n\n return response()->json([\n 'status_code' => $this->statusCode,\n 'status' => $this->statusText,\n 'message' => $this->message,\n 'data' => $book == null ?[]:$book // If book is null return empty array\n ])->setStatusCode($this->statusCode, $this->statusText);\n }", "public function testUpdateModelSet()\n {\n }", "public function update(Request $request, $bookid)\n {\n $token = $request->bearerToken();\n\n\n $user = DB::table('users')\n ->join('role_user', 'users.id', '=', 'role_user.userid')\n ->join('roles', 'roles.id', '=', 'role_user.roleid')\n ->select('users.api_token', 'roles.id')->where([['users.api_token','=', $token], ['roles.id', '1']])->get();\n \n\n //update a book\n if ((Book::where('Bookid', $bookid)->exists()) && $user->isNotEmpty()) {\n $book = Book::findOrfail($request->bookid);\n\n $book->bookid = $bookid;\n $book->isbn = $request->input('isbn');\n $book->author= $request->input('author');\n $book->title = $request->input('title');\n $book->status = $request->input('status');\n\n // $book = Book::find($bookid);\n $book->save();\n\n return response()->json([$book, \"message\" => \"Book was successfully updated\"], 200);\n\n }\n else {\n // return response()->json([\n // \"message\" => \"Book not found\"\n // ], 404);\n return response()->json([\"message\" => \"Unavailable token\"], 401);\n\n }\n }", "public function updateBooking(Request $request, $id)\n{\n $booking = Booking::find($id);\n $booking->update($request->all());\n\n $response = [\n 'message'=>'Update Succesfully',\n 'booking' => $booking,\n \n \n ];\n\n return response($response); \n}", "public function update(BookRequest $request, Book $book)\n {\n $data = $request->all();\n if (isset($data['isbn'])) {\n unset($data['isbn']);\n }\n\n $book->update(array_except($data, [ 'avatar' ]));\n $book->authors()->sync($request->author_id);\n $book->categories()->sync($request->category_id);\n\n return redirect()->route('books.show', $book);\n }", "public function update(Request $request, $id)\n {\n $type_book = type_books::find($id); // :)\n $name = $request->name;\n $anhien = $request->status;\n $url = Str::slug($name,\"-\");\n\n $type_book->name = $name; \n $type_book->AnHien = $anhien;\n $type_book->url_name = $url;\n $type_book ->save(); \n return redirect('/type-book');\n }", "public function update(Request $request, $id)\n {\n $book = Book::find($id);\n if(!$book)\n return redirect()->back();\n \n $update = $book->update($request->all());\n\n if ($update){\n $book->authors()->sync($request->input('authors'));\n return redirect()\n ->route('books.index')\n ->with('success', 'Atualizado com sucesso!');\n }\n else{\n return redirect()\n ->back()\n ->with('error', 'Falha ao atualizar!');\n }\n }", "public function doUpdateBook($book_uid, Request $request)\n {\n try {\n // Parse out non param data from incoming request\n $params = $request->except('_url');\n\n $book = $this->book->update($params, $book_uid);\n\n return Redirect::to('admin/books/update/' . $book_uid)->with('flash_message', [\n 'status' => 'success',\n 'message' => 'Book updated successfully'\n ]);\n } catch (\\Exception $e) {\n $error = helpers::errorMessage($e->getMessage());\n return Redirect::to('admin/books/update/' . $book_uid)->withInput()->with('flash_message', [\n 'status' => 'fail',\n 'code' => $e->getCode(),\n 'message' => $error['message'],\n 'error_fields' => $error['error']\n ]);\n }\n }", "public function update(Book $book)\n {\n $book->update($this->validateRequest());\n\n return redirect($book->path());\n }", "public function edit(newbook $newbook)\n {\n //\n }", "public function updating()\n {\n # code...\n }", "public function testUpdateCar()\n {\n $id = 1;\n $car = Cars::find($id);\n $year = $car->year;\n $yearUpdate = 2000;\n //Test for user before update\n $this->assertNotEquals($yearUpdate, $year,\"Before update\");\n $statement = \"The year before updating is \" .$year. \" . \";\n ExampleTest::validate($this,$statement);\n DB::table('cars')\n ->where('id', $id)\n ->update(['year'=>$yearUpdate]);\n $newCar = Cars::find($id);\n $newYear = $newCar->year;\n $this->assertEquals($yearUpdate, $newYear,\"After Update\");\n $statement = \"The car year after updating is \".$newYear.\". \";\n ExampleTest::validate($this,$statement);\n }", "public function update(Request $request)\n {\n $dataArr = $request->all();\n \n $this->validate($request,[ \n 'folder_id' => 'required',\n 'author_id' => 'required', \n 'name' => 'required'\n ],\n [ \n 'folder_id.required' => 'Please choose folder',\n 'author_id.required' => 'Please choose author', \n 'name.required' => 'Please input name',\n ]);\n $dataArr['slug'] = str_slug($dataArr['name']); \n $dataArr['updated_user'] = Auth::user()->id; \n \n $model = Book::find($dataArr['id']);\n\n $model->update($dataArr);\n\n Session::flash('message', trans('text.success'));\n\n return redirect()->route('book.index', ['folder_id' => $dataArr['folder_id'], 'author_id' => $dataArr['author_id']]);\n \n }", "public function update(Request $request, $id)\n {\n try {\n $book = Book::find($id);\n if($book == null){\n return $this->errorResponse(\"Record does not exist.\", 500);\n }\n $rules = [\n 'name' => 'string',\n 'category_id' => 'integer',\n 'author' => 'string',\n 'publication_date' => 'date',\n 'available' => 'integer'\n ];\n \n $validatedData = $request->validate($rules);\n $data = $request->all();\n \n $book->fill($data);\n $res = $book->save();\n return $this->successResponse($book,200);\n }\n catch (\\Illuminate\\Database\\QueryException $exception) {\n $errorInfo = $exception->errorInfo;\n return $this->errorResponse($errorInfo, 500);\n }\n catch (\\Exception $exception) {\n $errorInfo = $exception->errorInfo;\n return $this->errorResponse($errorInfo, 500);\n }\n }", "public function practice19()\n {\n $author = Author::where('first_name', '=', 'J.K.')->first();\n\n $book = new Book;\n $book->title = \"Fantastic Beasts and Where to Find Them\";\n $book->published_year = 2017;\n $book->cover_url = 'http://prodimage.images-bn.com/pimages/9781338132311_p0_v2_s192x300.jpg';\n $book->purchase_url = 'http://www.barnesandnoble.com/w/fantastic-beasts-and-where-to-find-them-j-k-rowling/1004478855';\n $book->author()->associate($author); # <--- Associate the author with this book\n #This is the same:\n #$book->author_id = $author->id;\n $book->save();\n dump($book->toArray());\n }", "public function update(Request $request, $id)\n {\n $this->validate($request,[\n 'title' => ['required'],\n 'author' => ['required'],\n 'classroom' => ['required'],\n ]);\n\n $book = Book::findorfail($id);\n $book->title = $request->title;\n $book->author = $request->author;\n $book->classroom_id = $request->classroom;\n $book->save();\n\n return redirect()->route('book.show',[$book->id])->with('success',$book->title.' updated');\n }", "public function update(BookRequest $request, int $id)\n {\n $book = Book::find($id);//DB::table('books')->find($id);\n $book->title = $request->title;\n $book->description = $request->description;\n $book->author = $request->author;\n $book->genre = $request->genre;\n $book->year = $request->year;\n $book->country = $request->country;\n $book->book = $request->book;\n $book->pages = $request->pages;\n if($request->file('image')){\n $path = Storage::putFile('public', $request->file('image'));\n $url = Storage::url($path);\n $book->image = $url;\n }\n $book->update();\n return redirect()->route('book', $book)->with('success', 'updated');\n }", "public function update_book($id_book, Request $request) {\n\t\t$user_id = 14;\n\t\t$validate = [\n\t\t\t'image' \t\t=> 'image',\n\t\t\t'category'\t\t=> 'required',\n\t\t];\n\t\t// dd($request->all());\n\t\t$this->validate($request, $validate);\n\t\t\n\t\t$book = new \\stdClass;\n\t\t$book->id\t\t\t= $id_book;\n\t\t$book->other_name\t= $request->input('other_name');\n\t\t$book->image\t\t= $request->input('image');\n\t\t$book->categories\t= json_decode($request->input('category'));\n\t\t$book->characters\t= json_decode($request->input('character'));\n\t\t$book->release_at\t= $request->input('release_at');\n\t\t$book->description\t= $request->input('description');\n\t\t$book->status\t\t= $request->input('status');\n\t\t$book->id_author\t= $request->input('author');\n\t\t$book->id_artist\t= $request->input('artist');\n\t\t$book->id_uploader\t= $user_id;\n\t\t// dd($book);\n\n\t\t// data image upload\n\t\t$data['image'] = $request->file('image');\n\t\t$data['name'] = $request->input('name');\n\t\t$data['path'] = '/image/books';\n\t\tImages::upload_image($data);\n\n\t\tBooksBModel::update_book($book);\n\n\t\treturn redirect()->back()->with('success','Cập nhật truyện thành công');\n\t}", "public function update(Request $request, $id)\n {\n // $book = Book::find($id); \n // // $book->title = $request->input('title');\n // // $book->authors = $request->input('author');\n // // $book->image = $request->input('image');\n // $book->genre_id = $request->input('genre_id');\n // // $book->genre = $request->input('genre');\n // // $book->publisher_id = $request->input('publisher_id');\n // $book->save();\n\n // //return redirect('/books/show/'.$id); // this is so that the url will change, and the form wont be resubmitted if the user refereshes\n // return redirect()->action('BookExampleController@show', $id);\n\n $book = Book::findOrFail($id);\n $genre = $request->input('genre_name');\n if($book->genres()->find($genre) === null) {\n $book->genres()->attach($genre); \n }\n return redirect()->action('BookExampleController@show', $id);\n\n }", "public function update(Request $request, $id)\n {\n $booktoupdate = books::find($id);\n if ($booktoupdate) {\n $booktoupdate->book_title = $request->input('book_title');\n $booktoupdate->book_author = $request->input('book_author');\n $booktoupdate->book_availability = $request->input('book_availability')?true:false;\n $booktoupdate->save();\n return $booktoupdate;\n }\n return 'Not found';\n }", "function update_booksinn($id,$params)\n {\n $this->db->where('id',$id);\n return $this->db->update('booksinn',$params);\n }", "public function testUpdateAuthor() {\n $this->put('/api/author/3',\n ['first_name' => 'Karim'] )\n ->seeJson(['first_name' => 'Karim']);\n }" ]
[ "0.7667645", "0.7538131", "0.7538131", "0.7538131", "0.7538131", "0.7538131", "0.7538131", "0.7538131", "0.7538131", "0.7489761", "0.74205524", "0.72381616", "0.72381616", "0.72381616", "0.72381616", "0.72381616", "0.72381616", "0.72381616", "0.72381616", "0.72381616", "0.71949834", "0.7164813", "0.7150471", "0.7052937", "0.7017025", "0.70042545", "0.6988342", "0.6965773", "0.6958699", "0.6929674", "0.69225943", "0.69113445", "0.68988645", "0.6804872", "0.67755544", "0.67704135", "0.6752842", "0.67232144", "0.671144", "0.66943765", "0.66685736", "0.6667438", "0.66665745", "0.66522205", "0.66306376", "0.66297656", "0.66028655", "0.65831757", "0.65783143", "0.6575209", "0.65721506", "0.65694815", "0.6551604", "0.6549289", "0.6543663", "0.6517222", "0.650372", "0.64766777", "0.6464159", "0.6464159", "0.64432496", "0.64432496", "0.6439153", "0.6434705", "0.6430465", "0.64150035", "0.64143896", "0.64052427", "0.6389382", "0.63828003", "0.63716835", "0.6369975", "0.6369622", "0.6361844", "0.63558656", "0.6354667", "0.63422346", "0.63389283", "0.6319041", "0.6317902", "0.63119876", "0.63036615", "0.6293215", "0.62856317", "0.6285156", "0.6283789", "0.62719387", "0.6271582", "0.6265102", "0.62524974", "0.624887", "0.623626", "0.62358886", "0.6225603", "0.6221938", "0.6221015", "0.62190837", "0.6213142", "0.62105685", "0.6204339" ]
0.70226324
24
Demonstrate reading with the Book Model
public function getEx5() { $books = \App\Book::all(); $this->printBooks($books); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_book();", "public function testRead() {\n $this->loadFixtures('Books');\n\n // Single\n $this->assertEquals(new Book([\n 'series_id' => 1,\n 'name' => 'A Game of Thrones',\n 'isbn' => '0-553-10354-7',\n 'released' => '1996-08-02'\n ]), Book::select('series_id', 'name', 'isbn', 'released')->orderBy('_id', 'asc')->first());\n\n // Multiple\n $this->assertEquals(new ModelCollection([\n new Book([\n 'series_id' => 3,\n 'name' => 'The Fellowship of the Ring',\n 'isbn' => '',\n 'released' => '1954-07-24'\n ]),\n new Book([\n 'series_id' => 3,\n 'name' => 'The Two Towers',\n 'isbn' => '',\n 'released' => '1954-11-11'\n ]),\n new Book([\n 'series_id' => 3,\n 'name' => 'The Return of the King',\n 'isbn' => '',\n 'released' => '1955-10-25'\n ]),\n ]), Book::select('series_id', 'name', 'isbn', 'released')->where('series_id', 3)->orderBy('_id', 'asc')->all());\n }", "public function readOne ()\n {\n $query = \"SELECT\n book_id,type_id,name,isbn,publisher,author,price\n FROM\n \" . $this->table_name . \"\n WHERE\n book_id = $this->book_id\";\n\n $stmt = $this->conn->prepare( $query );\n\n $stmt->execute();\n\n\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n $this->book_id = $row['book_id'];\n $this->type_id = $row['type_id'];\n $this->name = $row['name'];\n $this->isbn = $row['isbn'];\n $this->publisher=$row['publisher'];\n $this->author=$row['author'];\n $this->price=$row['price'];\n\n\n }", "public function getBook()\n {\n return $this->_book;\n }", "public function getBook()\n\t{\n\t\treturn $this->getKeyValue('book'); \n\n\t}", "public function practice20()\n {\n # Get the first book as an example\n $book = Book::first();\n\n# Get the author from this book using the \"author\" dynamic property\n# \"author\" corresponds to the the relationship method defined in the Book model\n $author = $book->author;\n\n# Output\n dump($book->title.' was written by '.$author->first_name.' '.$author->last_name);\n dump($book->toArray());\n }", "public function getBook($isbn);", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function practice5()\n {\n $book = Book::where('slug', '=', 'the-martian')->first();\n\n dump($book);\n dump($book->toArray());\n }", "public function practice17()\n {\n $books = Book::all();\n\n foreach ($books as $book) {\n dump($book->title);\n }\n }", "public function getBookList() \n {\n return array( \n \"Balagurusamy\" => new Book(\"Balagurusamy\", \"Balagurusamy\", \"C programming\"), \n \"CMM in Practice\" => new Book(\"CMM in Practice\", \"Pankaj Jalote\", \"\"), \n \"PHP for Dummies\" => new Book(\"PHP for Dummies\", \"Some Smart Guy\", \"\") \n ); \n }", "public function practice2()\n {\n //dump(Str::plural('mouse'));\n\n dump(Book::find(3));\n dump(Book::all()->toArray());\n }", "public function getEx11() {\n $books = \\App\\Book::orderBy('title','asc')->get();\n $this->printBooks($books);\n # Underlying SQL: select * from `books` order by `title` asc\n }", "function read()\n\t{\n\t\tglobal $ilias, $ilDB;\n\n\t\t$q = \"SELECT * FROM bookmark_data WHERE obj_id = \".\n\t\t\t$ilDB->quote($this->getId(), \"integer\");\n\t\t$bm_set = $ilDB->query($q);\n\t\tif ($ilDB->numRows($bm_set) == 0)\n\t\t{\n\t\t\t$message = \"ilBookmark::read(): Bookmark with id \".$this->id.\" not found!\";\n\t\t\t$ilias->raiseError($message,$ilias->error_obj->WARNING);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$bm = $ilDB->fetchAssoc($bm_set);\n\t\t\t$this->setTitle($bm[\"title\"]);\n\t\t\t$this->setDescription($bm[\"description\"]);\n\t\t\t$this->setTarget($bm[\"target\"]);\n\t\t\t$this->setParent($this->tree->getParentId($this->id));\n\t\t}\n\t}", "public function __construct(){\n // make sure you do something like that in your index.php\n require_once('models/book.php');\n $this->book = new Book();\n }", "public function getEx1() {\n # Use the QueryBuilder to get all the books\n $books = \\DB::table('books')->get();\n $this->printBooks($books);\n }", "public function read(){ \n $data = Booking::all();\n return $this-> responseHasil(200,true,$data);\n }", "public function getBooks($id) {\n }", "public function get_books()\n {\n $this->load->database();\n // print_r($this->db->get(\"books\"));\n $query = $this->db->query(\"select * from books\");\n return $query->result();\n }", "public function testRead()\n {\n $model = $this->makeFactory();\n $model->save();\n\n $this->json('GET', static::ROUTE . '/' . $model->id)\n ->seeStatusCode(JsonResponse::HTTP_OK) \n ->seeJson($model->toArray());\n }", "public function getBook($title) \n {\n // in a real life scenario this will be done through a db select command \n $allBooks = $this->getBookList(); \n return $allBooks[$title]; \n }", "public function practice4()\n {\n $book = new Book();\n\n # Set the properties\n # Note how each property corresponds to a field in the table\n $book->title = 'Harry Potter and the Sorcerer\\'s Stone';\n $book->author = 'J.K. Rowling';\n $book->published_year = 1997;\n $book->cover_url = 'http://prodimage.images-bn.com/pimages/9780590353427_p0_v1_s484x700.jpg';\n $book->purchase_url = 'http://www.barnesandnoble.com/w/harry-potter-and-the-sorcerers-stone-j-k-rowling/1100036321?ean=9780590353427';\n\n # Invoke the Eloquent `save` method to generate a new row in the\n # `books` table, with the above data\n $book->save();\n\n dump('Added: ' . $book->title);\n }", "public function getAllBooks(){\n $query = \"SELECT * FROM Book;\";\n return $this->getBookDetail($query);\n }", "public function getEx4() {\n # Instantiate a new Book Model object\n $book = new \\Book();\n # Set the parameters\n # Note how each parameter corresponds to a field in the table\n $book->title = 'Harry Potter';\n $book->author = 'J.K. Rowling';\n $book->published = 1997;\n $book->cover = 'http://prodimage.images-bn.com/pimages/9780590353427_p0_v1_s484x700.jpg';\n $book->purchase_link = 'http://www.barnesandnoble.com/w/harry-potter-and-the-sorcerers-stone-j-k-rowling/1100036321?ean=9780590353427';\n # Invoke the Eloquent save() method\n # This will generate a new row in the `books` table, with the above data\n $book->save();\n return 'Added: '.$book->title;\n }", "public function __construct(Book $book)\n {\n $this->BookModel = $book;\n }", "public function index()\n {\n return BookResources::collection(Book::with(['user','categories','authors'])->get());\n }", "public function show(Book $book) {\n return \\App\\Http\\Resources\\Book::make($book->load('author'));\n }", "public function show($book)\n {\n //dd($book);\n }", "public function show($input)\n {\n $client = new Client();\n $res = $client->get('https://www.googleapis.com/books/v1/volumes',\n [\n 'query' => [\n 'key' => config('services.googleBooks.key'),\n 'q' => 'isbn: ' . $input,\n ],\n ]\n );\n $res->getStatusCode(); // 200\n $response = json_decode($res->getBody());\n if (!$response || !isset($response->items)) {\n return response()->json('No book found', 404);\n }\n $result = $this->transformToJustBookrFormat($response->items[0], request('save', true));\n if (!isset($result->isbn)) {\n return response()->json(['errors' => 'There was an error'], 422);\n }\n if (request('format', 'JustBookr') == 'google') {\n return response()->json($response);\n }\n\n return response()->json($result);\n }", "public function books(): Collection;", "public function loadFromBooks(BookCollection $books);", "public function show($id)\n {\n //\n return book::where('id', '=', $id)->get();\n }", "public function __construct($book)\n {\n $this->book = $book;\n }", "public function __construct($book)\n {\n $this->book = $book;\n }", "public function book () \n { \n $book = Book::all();\n return view('books.show',compact('book'));\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function getEx8() {\n # Get all the books\n $books = \\App\\Book::all();\n $this->printBooks($books);\n # get() without any query constraints is the equivalent of all()\n $books = \\App\\Book::get();\n $this->printBooks($books);\n\t}", "function get_book( $id ) {\r\n\t$options = get_option('nowReadingOptions');\r\n\t\r\n\t$id = intval($id);\r\n\t\r\n\t$books = get_books('include=' . $id);\r\n\t\r\n\treturn $books[0];\r\n}", "public function getBookById($id) {\n\n $book = Libro::findOrFail($id);\n\n return $book;\n }", "public function run()\n {\n $book = new Book();\n $book->title = 'To kill a mockingbird';\n $book->synopsis = 'To Kill a Mockingbird is Harper Lee’s 1961 Pulitzer Prize-winning novel about a child’s view of race and justice in the Depression-era South. The book sells one million copies per year, and Scout remains one of the most beloved characters in American fiction.';\n $book->author = 'Harper Lee';\n $book->genre = 'Southern Gothic';\n $book->logo_path = '../assets/img/theme/mockingbird.jpg';\n $book->no_of_issues = 8;\n\n $book->save();\n\n $book = new Book();\n $book->title = 'Robinson Crusoe';\n $book->synopsis = 'Robinson Crusoe was published in 1719 during the Enlightenment period of the 18th century. In the novel Crusoe sheds light on different aspects of Christianity and his beliefs. The book can be considered a spiritual autobiography as Crusoe\\'s views on religion drastically change from the start of his story and then the end.';\n $book->author = 'Daniel Defoe';\n $book->genre = 'Robinsonadec';\n $book->logo_path = '../assets/img/theme/crusoe.jpg';\n $book->no_of_issues = 5;\n\n $book->save();\n\n $book = new Book();\n $book->title = 'Crime and punishment';\n $book->synopsis = 'Crime and Punishment was first published in the literary journal The Russian Messenger in twelve monthly installments during 1866. It was later published in a single volume. It is the second of Dostoevsky\\'s full-length novels following his return from ten years of exile in Siberia. Crime and Punishment is considered the first great novel of his \"mature\" period of writing. The novel is often cited as one of the supreme achievements in literature';\n $book->author = 'Fyodor Dostoevsky';\n $book->genre = 'Philosophical';\n $book->logo_path = '../assets/img/theme/punishment.jpg';\n $book->no_of_issues = 12;\n\n $book->save();\n\n $book = new Book();\n $book->title = 'The Trial';\n $book->synopsis = 'The Trial tells the story of Josef K., a man arrested and prosecuted by a remote, inaccessible authority, with the nature of his crime revealed neither to him nor to the reader.';\n $book->author = 'Franz Kafka';\n $book->genre = 'Philosophical';\n $book->logo_path = '../assets/img/theme/trial.jpg';\n $book->no_of_issues = 4;\n\n $book->save();\n\n $book = new Book();\n $book->title = 'Anna Karenina';\n $book->synopsis = 'A complex novel in eight parts, with more than a dozen major characters, it is spread over more than 800 pages (depending on the translation and publisher), typically contained in two volumes. It deals with themes of betrayal, faith, family, marriage, Imperial Russian society, desire, and rural vs. city life. The plot centers on an extramarital affair between Anna and dashing cavalry officer Count Alexei Kirillovich Vronsky that scandalizes the social circles of Saint Petersburg and forces the young lovers to flee to Italy in a search for happiness. After they return to Russia, their lives further unravel.';\n $book->author = 'Leo Tolstoy';\n $book->genre = 'Realist novel';\n $book->logo_path = '../assets/img/theme/karenina.jpg';\n $book->no_of_issues = 15;\n\n $book->save();\n }", "function getBook($name, $locale = null);", "function read_address_book()\n {\n return $this->read();\n }", "public function run()\n {\n $book = [\n [\n 'book_name' => 'Wikipedia',\n 'description' => 'Sint commodo veniam ad cillum occaecat aute consectetur Lorem. Occaecat adipisicing est ad do tempor ipsum. Eu eiusmod proident sit amet consectetur irure sunt consequat. Dolor anim nisi consequat nulla veniam magna duis ex aliquip veniam.',\n 'img' => '.\\public\\wiki.jpg',\n 'author_id' => '2',\n ],\n [\n 'book_name' => 'Qui commodo',\n 'description' => 'Et occaecat in ut pariatur elit qui. Enim do consectetur velit sunt minim velit eu est. Laboris cillum eiusmod ex aliquip. Voluptate in reprehenderit est ea duis duis magna.',\n 'img' => '.\\public\\wiki.jpg',\n 'author_id' => '1',\n ],\n [\n 'book_name' => 'Et occaecat in',\n 'description' => 'Excepteur dolore labore reprehenderit ex quis reprehenderit nulla deserunt ullamco ea exercitation aliqua aute. Fugiat esse pariatur fugiat exercitation incididunt adipisicing ex excepteur id aute labore ad fugiat nulla. Incididunt nulla nostrud in labore in pariatur irure ipsum ipsum exercitation.',\n 'img' => '.\\public\\wiki.jpg',\n 'author_id' => '3',\n ],\n [\n 'book_name' => 'Excepteur dolore',\n 'description' => 'Adipisicing officia reprehenderit consequat labore excepteur culpa laborum occaecat. Adipisicing anim deserunt reprehenderit exercitation in deserunt. Lorem ad aliquip exercitation aliquip esse adipisicing ullamco in ullamco deserunt ipsum anim. Cillum esse fugiat proident elit aliquip. Magna reprehenderit aliquip laborum cillum in veniam in nostrud dolore irure proident veniam nulla est.',\n 'img' => '.\\public\\wiki.jpg',\n 'author_id' => '4',\n ],\n [\n 'book_name' => 'Adipisicing officia',\n 'description' => 'Anim occaecat ad est nulla laboris laborum esse irure id ullamco adipisicing fugiat laborum nisi. Amet minim sit commodo proident adipisicing exercitation in elit laboris. Ex elit aliquip magna adipisicing veniam officia sit proident duis non. Eiusmod minim aute do ea sit veniam excepteur adipisicing quis exercitation commodo in laborum nulla. Commodo anim commodo et aliquip reprehenderit laboris aute ut cupidatat magna. Culpa veniam aliqua tempor adipisicing anim aliqua magna ipsum qui magna dolore elit dolor. Id exercitation quis esse laborum anim dolore ipsum reprehenderit do.',\n 'img' => '.\\public\\wiki.jpg',\n 'author_id' => '5',\n ],\n ];\n\n foreach ($book as $data) {\n \\App\\Models\\Book::create($data);\n }\n }", "public function edit(book $book)\n {\n //\n }", "public function getEx15() {\n $books = Book::all();\n $this->printBooks($books);\n\t}", "public function index()\n {\n return BookResource::collection(Book::orderByDesc(\"id\")->get());\n }", "public function getBook()\n {\n return $this->hasOne(Book::className(), ['id' => 'book_id']);\n }", "public function show($id)\n {\n return Book::find($id);\n }", "public function getBookById($id) {\n\t\t$book = null;\n\n foreach ($this->db-> query(\"SELECT * FROM book WHERE id=$id\") as $row){\n \n $book = new Book($row['title'], $row['author'], $row['description'], $row['id']);\n }\n\n return $book;\n }", "public function getAllBooks(){\n return $this->libros;\n }", "public function run()\n {\n $book = new Book();\n $book->name = 'Tactical Thinking: 50 Brain-Training Puzzles to Change the Way You Think';\n $book->author = 'Charles Phillips';\n $book->price = 80000;\n $book->category_id = 1;\n $book->avatar = 'abc.jpg';\n $book->status = 'have book';\n $book->save();\n\n $book = new Book();\n $book->name = 'Tactical Thinking: 50 Brain-Training Puzzles to Change the Way You Think';\n $book->author = 'Charles Phillips';\n $book->price = 80.000;\n $book->category_id = 1;\n $book->avatar = 'abc.jpg';\n $book->status = 'out of book';\n $book->save();\n }", "public function edit(Book $book)\n {\n //\n }", "public function edit(Book $book)\n {\n //\n }", "public function edit(Book $book)\n {\n //\n }", "public function edit(Book $book)\n {\n //\n }", "public function edit(Book $book)\n {\n //\n }", "public function edit(Book $book)\n {\n //\n }", "public function edit(Book $book)\n {\n //\n }", "public function edit(Book $book)\n {\n //\n }", "public function edit(Book $book)\n {\n //\n }", "public function getBookInfo()\n\t{\n\t\t$isbn = $_POST['ISBN'];\n\t\t$url = \"https://api.douban.com/v2/book/isbn/\" . $isbn;\n\t\t$curl = curl_init();\n\t\tcurl_setopt($curl, CURLOPT_URL, $url);\n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n\t\tcurl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);\n\t\t$result = curl_exec($curl);\n\t\tcurl_close($curl);\n\t\t$result = json_decode($result, true);\n\n\n\t\tif ($result[\"code\"] != 6000) {\n\t\t\t$json = json_encode(array(\n\t\t\t\t'code' => 'success',\n\t\t\t\t'data' => $result\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\t'msg' => 'Can not get its information!'\n\t\t\t));\n\t\t\techo $json;\n\t\t}\n\t}", "public function show(Book $book)\n {\n return new BookResource($book);\n }", "public function show(BookRecord $bookRecord)\n {\n //\n }", "public function readObject();", "public function practice19()\n {\n $author = Author::where('first_name', '=', 'J.K.')->first();\n\n $book = new Book;\n $book->title = \"Fantastic Beasts and Where to Find Them\";\n $book->published_year = 2017;\n $book->cover_url = 'http://prodimage.images-bn.com/pimages/9781338132311_p0_v2_s192x300.jpg';\n $book->purchase_url = 'http://www.barnesandnoble.com/w/fantastic-beasts-and-where-to-find-them-j-k-rowling/1004478855';\n $book->author()->associate($author); # <--- Associate the author with this book\n #This is the same:\n #$book->author_id = $author->id;\n $book->save();\n dump($book->toArray());\n }", "public function getEx3() {\n # Use the QueryBuilder to get all the books where author is like \"%Scott%\"\n $books = \\DB::table('books')->where('author', 'LIKE', '%Scott%')->get();\n # Output the results\n $this->printBooks($books);\n }", "public function edit(Book $book)\n {\n //\n //\n }", "public function testBookControllerShow()\n {\n $this->visit('books/'.$this->saveBookId)\n ->see('I play drums')\n ->see('Ringo Star');\n $this->seeInDatabase('books', ['title' => 'I play drums']);\n }", "public function show($id)\n {\n return $this->book->find($id);\n }", "public function getbookById($id)\n {\n return $this->bookDao->getbookById($id);\n }", "public function book() {\n return $this->hasOne(Book::class);\n }", "public function getEx12() {\n $books = \\App\\Book::orderBy('published','desc')->get();\n $this->printBooks($books);\n # Underlying SQL: select * from `books` order by `published` desc\n\t}", "public function show(Book $book)\n {\n echo \"show\";\n }", "public function getBookByISBN(Request $request) {\n\n $request->validate([\n 'isbn' => 'required'\n ]);\n\n $isbn = $request->isbn;\n\n $book = Libro::where('isbn', $isbn)->get();\n return $book;\n }", "public function show(book $book)\n {\n return $this->showOne($book);\n }", "public function read(){\n\t\t\t$recordPerPage = 25;\n\t\t\t//tinh so trang\n\t\t\t$numPage = ceil($this->modelTotal()/$recordPerPage);\n\t\t\t//goi ham de lay du lieu\n\t\t\t$listRecord = $this->modelRead($recordPerPage);\n\t\t\t//load view\n\t\t\tinclude \"Views/BlogsView.php\";\n\t\t}", "public function read()\n {\n print_r($this->StudentsDetails->read());\n }", "public abstract function readObjects();", "public function get_book()\n {\n $sql = DB::select('select * from books');\n return $sql;\n }", "public function books()\n {\n return $this->get('/books');\n }", "public function read():array{\n\t\t\t return $this->con->query('select * from book');\n\n\t\t}", "public function index()\n { //select all books\n return Book::all();\n }", "public function getBooks()\n {\n $sql = 'SELECT bookshop_books.id,\n bookshop_books.description,\n bookshop_books.booksName,\n bookshop_books.pubyear,\n bookshop_discounts.id AS discountsId,\n bookshop_discounts.discountsName,\n bookshop_discounts.percent,\n bookshop_books.price,\n bookshop_authors.id AS idAuthors,\n bookshop_authors.authorsName,\n bookshop_genres.id AS idGenres,\n bookshop_genres.genresName\n FROM bookshop_books_to_authors\n INNER JOIN bookshop_books\n ON bookshop_books_to_authors.id_book = bookshop_books.id\n INNER JOIN bookshop_books_to_genres\n ON bookshop_books_to_genres.id_book = bookshop_books.id\n INNER JOIN bookshop_authors\n ON bookshop_books_to_authors.id_author = bookshop_authors.id\n INNER JOIN bookshop_genres\n ON bookshop_books_to_genres.id_genre = bookshop_genres.id\n INNER JOIN bookshop_discounts\n ON bookshop_books.id_discount = bookshop_discounts.id';\n \n $result = $this->db->execute($sql);\n\n if (!$result)\n return $this->error();\n\n return $this->formingBooks($result);\n }", "public function getBook($title)\n\t{\n\t\t// in a real life scenario this will be done through a db select command\n\t\t$allBooks = $this->getBookList();\n\t\treturn $allBooks[$title];\n\t}", "public function testCreateBook()\n {\n $this->post('/book', [\n 'title' => 'Aspernatur eum voluptas distinctio pariatur',\n 'author' => 'Vickie Muller'\n ]);\n\n $this->assertDatabaseHas('books', [\n 'title' => 'Aspernatur eum voluptas distinctio pariatur',\n 'author' => 'Vickie Muller'\n ]);\n\n // $resp->assertStatus(200);\n }", "public function index()\n {\n $b = newbook::\n orderBy('id', 'desc')\n //take(10)\n ->get();\n\n return $b->toJson();\n \n }", "public function textbook()\n {\n return $this->belongsTo('App\\Models/\\Textbook', 'isbn', 'isbn');\n }", "public function show(int $id)\n {\n return new BookResources(Book::with(['user','categories','authors'])->findOrFail($id));\n }", "public function testBookView()\n {\n $response = $this->get('api/book/getBooks');\n\n $response->assertStatus(200);\n }", "public function listBooks()\n {\n //list all books in database\n $sql2 = \"SELECT * from book\";\n $userBooks = mysql_fetch_array(mysql_query($sql2));\n return $userBooks; \n }", "public function read() {\n\t\t\n\t}" ]
[ "0.7531225", "0.6902521", "0.65265435", "0.6510694", "0.65106493", "0.643193", "0.6363639", "0.6341965", "0.6341965", "0.6341965", "0.6341965", "0.6341965", "0.6341965", "0.6341965", "0.6341965", "0.6341965", "0.6341965", "0.6341965", "0.6192898", "0.6128266", "0.61268085", "0.60835254", "0.6079979", "0.6068175", "0.60675824", "0.60520476", "0.6050338", "0.6038363", "0.603103", "0.6001473", "0.5997564", "0.59811574", "0.59766865", "0.5948769", "0.59425056", "0.5903335", "0.5901732", "0.586886", "0.5865864", "0.5854009", "0.58404505", "0.5839632", "0.58382", "0.58382", "0.58274657", "0.58151907", "0.58002794", "0.57999814", "0.57949424", "0.579045", "0.57838947", "0.57572037", "0.5750036", "0.5748593", "0.5746876", "0.5737635", "0.57326454", "0.5730472", "0.57290566", "0.5716017", "0.5705845", "0.5695817", "0.5695817", "0.5695817", "0.5695817", "0.5695817", "0.5695817", "0.5695817", "0.5695817", "0.5695817", "0.5689537", "0.5687582", "0.5669286", "0.5668997", "0.5656782", "0.5653064", "0.56455106", "0.56396353", "0.56378895", "0.5634273", "0.5633426", "0.5632677", "0.5632616", "0.5629923", "0.56286895", "0.5625455", "0.5621206", "0.56164503", "0.56096816", "0.56034464", "0.5603229", "0.5594503", "0.5590923", "0.5590359", "0.55810887", "0.55733675", "0.5563789", "0.55575806", "0.555483", "0.5547178", "0.55441934" ]
0.0
-1
Demonstrate creation with the Book Model
public function getEx4() { # Instantiate a new Book Model object $book = new \Book(); # Set the parameters # Note how each parameter corresponds to a field in the table $book->title = 'Harry Potter'; $book->author = 'J.K. Rowling'; $book->published = 1997; $book->cover = 'http://prodimage.images-bn.com/pimages/9780590353427_p0_v1_s484x700.jpg'; $book->purchase_link = 'http://www.barnesandnoble.com/w/harry-potter-and-the-sorcerers-stone-j-k-rowling/1100036321?ean=9780590353427'; # Invoke the Eloquent save() method # This will generate a new row in the `books` table, with the above data $book->save(); return 'Added: '.$book->title; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct(Book $book)\n {\n $this->BookModel = $book;\n }", "public function testCreateBook()\n {\n $this->post('/book', [\n 'title' => 'Aspernatur eum voluptas distinctio pariatur',\n 'author' => 'Vickie Muller'\n ]);\n\n $this->assertDatabaseHas('books', [\n 'title' => 'Aspernatur eum voluptas distinctio pariatur',\n 'author' => 'Vickie Muller'\n ]);\n\n // $resp->assertStatus(200);\n }", "public function actionCreate()\n {\n $modelBook = new Book;\n $modelBookForm = new BookForm($modelBook);\n $modelsAuthor = [new Author];\n $modelsKeyWords = [new KeyWord];\n\n if ($modelBook->load(Yii::$app->request->post())) {\n $modelsAuthor = Model::createMultiple(Author::className());\n Model::loadMultiple($modelsAuthor, Yii::$app->request->post());\n //process, separate book keyWords\n if ($wordsArray = $modelBookForm->prepareKeyWords(Yii::$app->request->post('KeyWord')['words'])) {\n $modelsKeyWords = Model::createMultiple(KeyWord::className(), [], $wordsArray);\n // KeyWord[0]['word' =>'php']\n Model::loadMultiple($modelsKeyWords, $wordsArray, '');\n }\n\n //before validation we need insert fake internal_id\n $modelBook->internal_id = '00000000000';\n // validate all models\n $valid = $modelBook->validate();\n $valid = Model::validateMultiple($modelsAuthor) && $valid;\n $valid = $wordsArray === false ? $valid : Model::validateMultiple($modelsKeyWords) && $valid;\n\n if ($valid && $modelBookForm->createBook($modelsAuthor, $modelsKeyWords)) {\n Yii::info($modelBook->id . '_create', 'book');\n $this->redirect(['view', 'id' => $modelBook->id]);\n }\n }\n\n return $this->render('create', [\n 'modelBook' => $modelBook,\n 'modelsAuthor' => (empty($modelsAuthor)) ? [new Author] : $modelsAuthor,\n ]);\n }", "public function __construct(){\n // make sure you do something like that in your index.php\n require_once('models/book.php');\n $this->book = new Book();\n }", "public function run()\n {\n $book = new Book();\n $book->name = 'Tactical Thinking: 50 Brain-Training Puzzles to Change the Way You Think';\n $book->author = 'Charles Phillips';\n $book->price = 80000;\n $book->category_id = 1;\n $book->avatar = 'abc.jpg';\n $book->status = 'have book';\n $book->save();\n\n $book = new Book();\n $book->name = 'Tactical Thinking: 50 Brain-Training Puzzles to Change the Way You Think';\n $book->author = 'Charles Phillips';\n $book->price = 80.000;\n $book->category_id = 1;\n $book->avatar = 'abc.jpg';\n $book->status = 'out of book';\n $book->save();\n }", "public function practice4()\n {\n $book = new Book();\n\n # Set the properties\n # Note how each property corresponds to a field in the table\n $book->title = 'Harry Potter and the Sorcerer\\'s Stone';\n $book->author = 'J.K. Rowling';\n $book->published_year = 1997;\n $book->cover_url = 'http://prodimage.images-bn.com/pimages/9780590353427_p0_v1_s484x700.jpg';\n $book->purchase_url = 'http://www.barnesandnoble.com/w/harry-potter-and-the-sorcerers-stone-j-k-rowling/1100036321?ean=9780590353427';\n\n # Invoke the Eloquent `save` method to generate a new row in the\n # `books` table, with the above data\n $book->save();\n\n dump('Added: ' . $book->title);\n }", "public function actionCreate()\n {\n $publishers = self::getPublishers();\n $categories = self::getCategories();\n $authors = self::getAuthors();\n\t\t$pubarray = $catarray = $autharray = array(); \n\t\t$errorMsg = '';\n if (empty($publishers) || empty($categories) || empty($authors))\n \t$errorMsg = \"Couldn't add a Book now! Please add atleast one Author, Publisher, and Category first!!\"; \n \t\n\t\t$model = new Book();\n\n if ($model->load(Yii::$app->request->post()) && $model->save())\n {\n return $this->redirect(['index']);\n }\n else\n {\n return $this->render('create', [\n 'model' => $model, 'categoryModels' => $categories, 'authorModels' => $authors,\n 'publisherModels' => $publishers, 'errorMsg' => $errorMsg\n ]);\n }\n\n }", "public function run()\n {\n $book = new Book();\n $book->title = 'To kill a mockingbird';\n $book->synopsis = 'To Kill a Mockingbird is Harper Lee’s 1961 Pulitzer Prize-winning novel about a child’s view of race and justice in the Depression-era South. The book sells one million copies per year, and Scout remains one of the most beloved characters in American fiction.';\n $book->author = 'Harper Lee';\n $book->genre = 'Southern Gothic';\n $book->logo_path = '../assets/img/theme/mockingbird.jpg';\n $book->no_of_issues = 8;\n\n $book->save();\n\n $book = new Book();\n $book->title = 'Robinson Crusoe';\n $book->synopsis = 'Robinson Crusoe was published in 1719 during the Enlightenment period of the 18th century. In the novel Crusoe sheds light on different aspects of Christianity and his beliefs. The book can be considered a spiritual autobiography as Crusoe\\'s views on religion drastically change from the start of his story and then the end.';\n $book->author = 'Daniel Defoe';\n $book->genre = 'Robinsonadec';\n $book->logo_path = '../assets/img/theme/crusoe.jpg';\n $book->no_of_issues = 5;\n\n $book->save();\n\n $book = new Book();\n $book->title = 'Crime and punishment';\n $book->synopsis = 'Crime and Punishment was first published in the literary journal The Russian Messenger in twelve monthly installments during 1866. It was later published in a single volume. It is the second of Dostoevsky\\'s full-length novels following his return from ten years of exile in Siberia. Crime and Punishment is considered the first great novel of his \"mature\" period of writing. The novel is often cited as one of the supreme achievements in literature';\n $book->author = 'Fyodor Dostoevsky';\n $book->genre = 'Philosophical';\n $book->logo_path = '../assets/img/theme/punishment.jpg';\n $book->no_of_issues = 12;\n\n $book->save();\n\n $book = new Book();\n $book->title = 'The Trial';\n $book->synopsis = 'The Trial tells the story of Josef K., a man arrested and prosecuted by a remote, inaccessible authority, with the nature of his crime revealed neither to him nor to the reader.';\n $book->author = 'Franz Kafka';\n $book->genre = 'Philosophical';\n $book->logo_path = '../assets/img/theme/trial.jpg';\n $book->no_of_issues = 4;\n\n $book->save();\n\n $book = new Book();\n $book->title = 'Anna Karenina';\n $book->synopsis = 'A complex novel in eight parts, with more than a dozen major characters, it is spread over more than 800 pages (depending on the translation and publisher), typically contained in two volumes. It deals with themes of betrayal, faith, family, marriage, Imperial Russian society, desire, and rural vs. city life. The plot centers on an extramarital affair between Anna and dashing cavalry officer Count Alexei Kirillovich Vronsky that scandalizes the social circles of Saint Petersburg and forces the young lovers to flee to Italy in a search for happiness. After they return to Russia, their lives further unravel.';\n $book->author = 'Leo Tolstoy';\n $book->genre = 'Realist novel';\n $book->logo_path = '../assets/img/theme/karenina.jpg';\n $book->no_of_issues = 15;\n\n $book->save();\n }", "public function __construct($book)\n {\n $this->book = $book;\n }", "public function __construct($book)\n {\n $this->book = $book;\n }", "function testAddBook()\n {\n //Arrange\n $first_name = \"John\";\n $last_name = \"Steinbeck\";\n $test_author = new Author($first_name, $last_name);\n $test_author->save();\n\n $title = \"Grapes of Wrath\";\n $test_book = new Book($title);\n $test_book->save();\n\n //Act\n $test_author->addBook($test_book);\n\n //Assert\n $this->assertEquals($test_author->getBook(), [$test_book]);\n\n }", "public function create()\n {\n $user_id = Auth::user()->id;\n $data = INPUT::all();\n $rules = $this->rules();\n $messages = $this->messages();\n $validator = Validator::make($data, $rules, $messages);\n if (!$validator->fails()) {\n $book = new Book;\n $book->id_user = $user_id;\n $book->title = $data['title'];\n $book->subtitle = $data['subtitle'];\n $book->publishedDate = $data['publishedDate'];\n $book->description = $data['description'];\n $book->pages = $data['pages'];\n $book->isbn10 = $data['isbn10'];\n $book->isbn13 = $data['isbn13'];\n $book->price_day = $data['price_day'];\n $book->price_bail = $data['price_bail'];\n $book->price_sale = $data['price_sale'];\n $book->language = $data['language'];\n if ($data['publisher'] != '0') {\n $book->id_publisher = $data['publisher'];\n } else {\n $publisher = new Publisher;\n $publisher->publisher = $data['newpublisher'];\n $publisher->save();\n $book->id_publisher = $publisher->id;\n }\n $book->cover = file_get_contents($data['cover']);\n $book->save();\n $book_id = $book->id;\n\n $book_collection = new Book_Collection;\n $book_collection->book_id = $book_id;\n $book_collection->collection_id = $data['collection'];\n\n $authors = explode(',', $data['authors']);\n foreach ($authors as $author) {\n $tmp = Author::where('name', 'like', $author)->limit(1)->get();\n if (count($tmp) > 0) {\n $author_book = new Author_Book;\n $author_book->book_id = $book_id;\n $author_book->author_id = $tmp[0]->id;\n $author_book->save();\n } else {\n $newAuthor = new Author;\n $newAuthor->name = $author;\n $newAuthor->save();\n $author_id = $newAuthor->id;\n $author_book = new Author_Book;\n $author_book->book_id = $book_id;\n $author_book->author_id = $author_id;\n $author_book->save();\n }\n }\n return redirect('book/show/' . $book_id . '');\n } else {\n return back()->withInput($data)->withErrors($validator);\n }\n\n }", "public function create()\n {\n return view(\"books.create\");\n }", "public function actionCreate()\n {\n $model = new Book();\n $modelPicture = new PictureForm();\n\n if(!empty(Yii::$app->session['bookPicture'])) {\n $model->picture = Yii::$app->session['bookPicture'];\n }\n\n if(!empty(Yii::$app->session['bookPicture'])) {\n $model->picture = Yii::$app->session['bookPicture'];\n unset(Yii::$app->session['bookPicture']);\n }\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n 'modelPicture' => $modelPicture,\n ]);\n }", "public function run()\n {\n\n book::create([\n 'name' => 'libro de prueba',\n 'cant' => 100,\n 'fk_idAutor' => 1,\n 'price' => 150,\n\n ]);\n }", "public function create()\n {\n return view(\"web_admin.books.create\");\n }", "public function testCreateBook()\n {\n $this->browse(function (Browser $browser) {\n //Make a book to add \n $book = factory('App\\Book')->make();\n //Navigate to the create page and send the data\n $browser->visit('/api/books/create')\n ->type('title', $book->title)\n ->type('author', $book->author)\n ->press('Add');\n //Check we are redirected to home page with no errors.\n $browser->pause(500);\n $browser->assertPathIs('/api/books')->assertSee('Book was successfully saved');\n //Check the new book is displayed\n $browser \n ->assertSee($book->title)\n ->assertSee($book->author);\n\n });\n\n }", "public function run()\n {\n Book::create([\n 'isbn13' => '9786059127400',\n 'title' => 'Av Mevsimi',\n 'authors' => '[1]',\n 'categories' => '[1]',\n 'genre' => 1,\n 'number_of_pages' => 445,\n 'publisher_id' => 1,\n 'release_date' => '2021-08-10',\n 'languages' => '[1]'\n ]);\n }", "public function actionCreate()\n {\n $model = new Book();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n \tif (Yii::$app->request->getIsAjax()) {\n \t\treturn $this->renderPartial('create', [\n \t\t\t'model' => $model,\n \t\t]);\n \t}\n \telse {\n\t return $this->render('create', [\n\t 'model' => $model,\n\t ]);\n \t}\n }\n }", "public function actionCreate()\n {\n $model = new Author();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n /*\n * Link new Author with books\n * Solution found on https://www.yiiframework.com/forum/index.php/topic/56041-many-to-many-relation-in-a-form/\n * TODO - find solutions for mass assign by ID\n * $model->link('authorBooks', Yii::$app->request->post('Author')['authorBooks']);\n */\n $books = Yii::$app->request->post('authorBooks');\n if($books){\n foreach ($books as $book_id){\n //$book = Book::findOne($book_id);\n //$model->link('authorBooks', $book);\n $authorBook = new AuthorBook();\n $authorBook->author_id = $model->id;\n $authorBook->book_id = $book_id;\n // TODO - clarify if framework can write timestamp by himself\n $authorBook->created_at = time();\n $authorBook->updated_at = time();\n $authorBook->save();\n }\n }\n\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n //Create array for Selectize\n $arrBooks = ArrayHelper::map(Book::find()->select(['id', 'name'])->all(), 'id', 'name');\n\n\n return $this->render('create', [\n 'model' => $model,\n 'books' => $arrBooks,\n ]);\n }", "public function create()\n {\n $book = new Book;\n $authors = Author::orderBy('name')->get();\n $categories = Category::orderBy('name')->get();\n\n return view('books.create', compact('book', 'authors', 'categories'));\n }", "public function run()\n {\n $book = new Book();\n $book->id = 1;\n $book->name = 'Tôi quyết định sống cho chính tôi';\n $book->image = 'image/sach1.jpg';\n $book->writerName = 'KimSuHyun';\n $book->category_id = 1;\n $book->price = 50000;\n $book->description = 'sách tâm lí học hay';\n $book->save();\n }", "public function create()\n\t{\n\t\treturn view('books.create');\n\t}", "public function testBookCreatedSuccessfully()\n {\n $book = factory(Book::class)->make();\n \n $payload = [\n 'title' => $book->title,\n 'isbn' => $book->isbn,\n 'published_at' => $book->published_at,\n ];\n\n $this->json('post', '/api/books/create', $payload, $this->getHeaders())\n ->assertStatus(200)\n ->assertJsonStructure([\n 'message'\n ]);\n }", "public function create($isbn, Request $request)\n {\n\n\n\n $url = 'https://openlibrary.org/api/books?bibkeys=ISBN:' . $isbn . '&amp;jscmd=data&amp;format=json&#39';\n $data = json_decode(file_get_contents($url), true);\n\n if (!$data) {\n return $this->errorResponse(\"ISBN no fue encontrado\", 400);\n }\n $param = \"ISBN:\" . $isbn;\n $request['id'] = $isbn;\n $request['title'] = $data[$param]['title'];\n $request['cover'] = isset($data[$param]['cover']) ? $data[$param]['cover']['large'] : 'Na';\n\n\n $book = Book::create($request->all());\n $book = Book::find($isbn);\n \n\n\n $authors = isset($data[$param]['authors']) ? $data[$param]['authors'] : [];\n foreach ($authors as $key => $value) {\n $author = Author::create(['name' => $value['name'], 'book_id' => $book->id]);\n\n }\n\n\n\n\n\n\n return (['message' =>'Libro guardado exitosamente', 'code'=> 201]);\n }", "function testAddBook()\n {\n\n //Arrange\n $title = \"Harry Houdinis Magic\";\n $id = null;\n $test_book = new Book($title, $id);\n $test_book->save();\n\n $title2 = \"Harry and Maggies Adventures\";\n $test_book2 = new Book($title2, $id);\n $test_book2->save();\n\n $name = \"Harry Houdini\";\n $id = null;\n $test_author = new Author($name, $id);\n $test_author->save();\n\n $name2 = \"Maggie Pie\";\n $test_author2 = new Author($name2, $id);\n $test_author2->save();\n\n //Act\n $test_author->addBook($test_book);\n $test_author->addBook($test_book2);\n $test_author2->addBook($test_book2);\n\n //Assert\n $this->assertEquals($test_author->getBooks(), [$test_book, $test_book2]);\n $this->assertEquals($test_author2->getBooks(), [$test_book2]);\n }", "public function criar()\n {\n\n $data = array(\n 'titulo' => $this->input->post('book_titulo'),\n 'autor' => $this->input->post('book_autor')\n );\n\n // $this->db->query($sql, $data);\n\n $this->db->insert('books', $data);\n }", "public function createAction(){\n $action = \"new\";\n $actionText = \"Create Book\";\n // create empty book...\n $book = new Book();\n require_once('views/bookForm.php');\n }", "public function create()\n {\n //\n return view('books.create');\n }", "public function create()\n {\n // return view('addBook');\n }", "public function create()\n { //dd(\"fuvl\");\n return view('admin.book.create');\n }", "public function run()\n {\n factory(BookGenre::class, 5)->create();\n }", "function __construct($bookTitle, $bookPrice) {\n\n $this->bookTitle = $bookTitle;\n $this->bookPrice = $bookPrice;\n}", "public function create()\n {\n return view('book.create');\n }", "public function create()\n {\n return view('book.create');\n }", "public function create()\n {\n return view('book.create');\n }", "public function create()\n {\n return view('library/book/create');\n }", "public function create()\n {\n return view('Admins.books.create_book');\n }", "public function storeNewBook(Request $request) {\n\n # Custom error message\n $messages = [\n 'author_id.not_in' => 'Author not selected.',\n ];\n\n $this->validate($request, [\n 'title' => 'required|min:3',\n 'published' => 'required|numeric',\n 'cover' => 'required|url',\n 'purchase_link' => 'required|url',\n 'author_id' => 'not_in:0',\n ], $messages);\n\n # Add new book to database\n $book = new Book();\n $book->title = $request->title;\n $book->published = $request->published;\n $book->cover = $request->cover;\n $book->purchase_link = $request->purchase_link;\n $book->author_id = $request->author_id;\n $book->user_id = $request->user()->id;\n $book->save();\n\n # Now handle tags.\n # Note how the book has to be created (save) first *before* tags can\n # be added; this is because the tags need a book_id to associate with\n # and we don't have a book_id until the book is created.\n $tags = ($request->tags) ?: [];\n $book->tags()->sync($tags);\n $book->save();\n\n Session::flash('message', 'The book '.$request->title.' was added.');\n\n # Redirect the user to book index\n return redirect('/books');\n }", "public function createModel()\n {\n }", "public function create()\n {\n return view('books.create');\n\n }", "public function actionCreate()\n {\n $model = new UtilitiesBook();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->utilities_book_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function store(Request $request)\n { \n $request->validate([\n 'title'=>'required',\n 'author'=>'required',\n 'price'=>'required',\n ]);\n\n //create a book\n return Book::create($request->all());\n }", "public function run()\n {\n $book = new \\App\\Book([\n 'name' => 'Neural Networks',\n 'author' => 'Thomas Muller',\n 'publication' => 'Pearson Publication',\n 'description' => 'Lorem Ipsum random text',\n ]);\n $book->save();\n\n $book = new \\App\\Book([\n 'name' => 'Neural Networks',\n 'author' => 'Thomas Muller',\n 'publication' => 'Pearson Publication',\n 'description' => 'Lorem Ipsum random text',\n ]);\n $book->save();\n\n $book = new \\App\\Book([\n 'name' => 'Neural Networks',\n 'author' => 'Thomas Muller',\n 'publication' => 'Pearson Publication',\n 'description' => 'Lorem Ipsum random text',\n ]);\n $book->save();\n\n $book = new \\App\\Book([\n 'name' => 'Operating System',\n 'author' => 'Hector B',\n 'publication' => 'Nepal Publication',\n 'description' => 'Lorem Ipsum random text',\n ]);\n $book->save();\n\n $book = new \\App\\Book([\n 'name' => 'Operating System',\n 'author' => 'Hector B',\n 'publication' => 'Nepal Publication',\n 'description' => 'Lorem Ipsum random text',\n ]);\n $book->save();\n\n $book = new \\App\\Book([\n 'name' => 'Operating System',\n 'author' => 'Hector B',\n 'publication' => 'Nepal Publication',\n 'description' => 'Lorem Ipsum random text',\n ]);\n $book->save();\n\n $book = new \\App\\Book([\n 'name' => 'Operating System',\n 'author' => 'Hector B',\n 'publication' => 'Nepal Publication',\n 'description' => 'Lorem Ipsum random text',\n ]);\n $book->save();\n\n $book = new \\App\\Book([\n 'name' => 'Object Oriented Analysis And Design',\n 'author' => 'Hector B',\n 'publication' => 'Nepal Publication',\n 'description' => 'Lorem Ipsum random text',\n ]);\n $book->save();\n\n $book = new \\App\\Book([\n 'name' => 'Object Oriented Analysis And Design',\n 'author' => 'Hector B',\n 'publication' => 'Nepal Publication',\n 'description' => 'Lorem Ipsum random text',\n ]);\n $book->save();\n\n $book = new \\App\\Book([\n 'name' => 'Object Oriented Analysis And Design',\n 'author' => 'Hector B',\n 'publication' => 'Nepal Publication',\n 'description' => 'Lorem Ipsum random text',\n ]);\n $book->save();\n\n $book = new \\App\\Book([\n 'name' => 'Object Oriented Analysis And Design',\n 'author' => 'Hector B',\n 'publication' => 'Nepal Publication',\n 'description' => 'Lorem Ipsum random text',\n ]);\n $book->save();\n }", "public function create_book(Request $request) {\n\t\t$user_id = 14;\n\t\t$validate = [\n\t\t\t'image' \t\t=> 'required|image',\n\t\t\t'name'\t\t\t=> 'required',\n\t\t\t'category'\t\t=> 'required',\n\t\t];\n\t\tdd($request->all());\n\t\t$this->validate($request, $validate);\n\n\t\t$new_book = new \\stdClass;\n\t\t$new_book->image\t\t= $request->input('image');\n\t\t$new_book->name\t\t\t= $request->input('name');\n\t\t$new_book->other_name\t= $request->input('other_name');\n\t\t$new_book->categories\t= json_decode($request->input('category'));\n\t\t$new_book->characters\t= json_decode($request->input('character'));\n\t\t$new_book->release_at\t= $request->input('release_at');\n\t\t$new_book->description\t= $request->input('description');\n\t\t$new_book->keyword\t\t= $request->input('keyword');\n\t\t$new_book->status\t\t= $request->input('status');\n\t\t$new_book->id_author\t= $request->input('author');\n\t\t$new_book->id_artist\t= $request->input('artist');\n\t\t$new_book->id_uploader\t= $user_id;\n\n\t\t// dd($new_book);\n\t\t// data image upload\n\t\t$data['image'] = $request->file('image');\n\t\t$data['name'] = $request->input('name');\n\t\t$data['path'] = '/image/books';\n\t\tImages::upload_image($data);\n\n\t\tBooksBModel::create_book($new_book);\n\n\t\treturn redirect()->back()->with('success','Thêm truyện thành công');\n\t}", "public function add_book()\n\t{\n\t\t$data = array();\n\t\t$authors = $this->add_book_model->getAuthors();\n\t\t$genres = $this->add_book_model->getGenres();\n\t\t$types = $this->add_book_model->getTypes();\n\t\t$data['authorsList'] = $authors;\n\t\t$data['genresList'] = $genres;\n\t\t$data['typesList'] = $types;\n\t\t$this->load->view('add_book', $data);\n\t}", "public function create()\n {\n return view('page.book.create');\n }", "public function create()\n {\n return view('books.create');\n }", "public function create()\n {\n return view('books.create');\n }", "public function create()\n {\n return view('books.create');\n }", "public function create()\n {\n return view('books.create');\n }", "public function store(Request $request) {\n\t\t$rules = [\n\t\t\t'title' => 'required|max:255',\n\t\t\t'description' => 'required|max:255',\n\t\t\t'price' => 'required|min:1',\n\t\t\t//'author_id' => 'required|min:1|unique:authors,id',\n\t\t];\n\n\t\t$author = Author::find($request->author_id);\n\n\t\tif(!$author){\n\t\t\treturn $this->errorMessage('No se encontro un instancia para el autor solicitado', Response::HTTP_NOT_FOUND);\n\t\t}\n\n\t\t$this->validate($request, $rules);\n\n\t\t$book = Book::create($request->all());\n\n\t\treturn $this->successResponse($book, Response::HTTP_CREATED);\n\t}", "public function run()\n {\n $records = [\n ['name' => 'Название книги 1', 'description' => 'Описание книги 1'],\n ['name' => 'Книга с описанием null', 'description' => null],\n ['name' => 'Название книги 2', 'description' => 'Описание книги 2'],\n ['name' => 'Книга с пустым описанием', 'description' => ''],\n ['name' => 'Название книги 3', 'description' => 'Описание книги 3'],\n// ['name' => '', 'description' => ''],\n// ['name' => '', 'description' => ''],\n// ['name' => '', 'description' => ''],\n ];\n $rCount = count($records);\n for($i = $rCount - 1; $i < $rCount + 10; $i++)\n $records[] = ['name' => 'Название книги '.$i, 'description' => 'Описание книги '.$i];\n\n foreach ($records as $record)\n Book::create([\n 'name' => $record['name'],\n 'description' => $record['description']\n ]);\n }", "public function run()\n {\n $book = new \\App\\Book;\n $book->title = \"Herr der Ringe\";\n $book->isbn = \"123456789\";\n $book->subtitle = \"Die Rückkehr des Königs\";\n $book->rating = 10;\n $book->description = \"Letzter Teil der Trilogie\";\n $book->published = new DateTime();\n\n //get the first user\n $user = App\\User::all()->first();\n $book->user()->associate($user);\n $book->save();\n // test authors - load them and write them to the db using eloquent ORM\n $authors = App\\Author::all()->pluck(\"id\");\n $book->authors()->sync($authors);\n $book->save();\n\n // add images to book\n $image1 = new \\App\\Image;\n $image1->title = \"Cover 1\";\n $image1->url = \"https://images-na.ssl-images-amazon.com/images/I/61h%2BnIJyVFL._SX333_BO1,204,203,200_.jpg\";\n $image1->book()->associate($book);\n $image1->save();\n\n $image2 = new App\\Image;\n $image2->title = \"Cover 2\";\n $image2->url = \"https://images-eu.ssl-images-amazon.com/images/I/516KV5tjulL._AC_US327_FMwebp_QL65_.jpg\";\n $image2->book()->associate($book);\n $image2->save();\n }", "public function create()\n {\n return view('books::create');\n }", "public function practice19()\n {\n $author = Author::where('first_name', '=', 'J.K.')->first();\n\n $book = new Book;\n $book->title = \"Fantastic Beasts and Where to Find Them\";\n $book->published_year = 2017;\n $book->cover_url = 'http://prodimage.images-bn.com/pimages/9781338132311_p0_v2_s192x300.jpg';\n $book->purchase_url = 'http://www.barnesandnoble.com/w/fantastic-beasts-and-where-to-find-them-j-k-rowling/1004478855';\n $book->author()->associate($author); # <--- Associate the author with this book\n #This is the same:\n #$book->author_id = $author->id;\n $book->save();\n dump($book->toArray());\n }", "public function create()\n {\n return view('new-book');\n }", "public function create()\n {\n return view('pages.book.create');\n }", "public function create()\n {\n return view('pages.book.create');\n }", "public function create()\n {\n return view('admin.book.create');\n }", "public function create()\n {\n return view('admin.book.create');\n }", "public function create()\n {\n return view('admin.book.create');\n }", "public static function create_book($new_book) {\n\t\t$book = [\n\t\t\t'name'\t\t\t=> $new_book->name,\n\t\t\t'image'\t\t\t=> str_slug($new_book->name,'-'),\n\t\t\t'slug'\t\t\t=> str_slug($new_book->name,'_'),\n\t\t\t'other_name'\t=> $new_book->other_name,\n\t\t\t'release_at'\t=> $new_book->release_at,\n\t\t\t'id_author'\t\t=> $new_book->id_author,\n\t\t\t'id_artist'\t\t=> $new_book->id_artist,\n\t\t\t'id_uploader'\t=> $new_book->id_uploader,\n\t\t\t'description'\t=> $new_book->description,\n\t\t\t'keyword'\t\t=> $new_book->keyword,\n\t\t\t'status'\t\t=> $new_book->status\n\t\t];\n\t\t$id_book = BooksCModel::insert_book($book);\n\n\t\t//create book category\n\t\t$categories = [];\n\t\tforeach ($new_book->categories as $key => $category) {\n\t\t\t$categories[$key] = [\n\t\t\t\t'id_book'\t\t=> $id_book,\n\t\t\t\t'id_category'\t=> $category\n\t\t\t];\n\t\t\tBooksCategoryCModel::insert_book_category($categories[$key]);\n\t\t}\n\n\t\t//create book character\n\t\t$characters = [];\n\t\tforeach ($new_book->characters as $key => $character) {\n\t\t\t$characters[$key] = [\n\t\t\t\t'id_book'\t\t=> $id_book,\n\t\t\t\t'id_character'\t=> $character\n\t\t\t];\n\t\t\tBooksCharacterCModel::insert_book_character($characters[$key]);\n\t\t}\n\t}", "public function get_book();", "public function create()\n {\n $publishers = Publisher::all(); \n $genres = Genre::all();\n return view('books.create', compact('publishers', 'genres'));\n }", "public function run()\n {\n \n $faker = \\Faker\\Factory::create();\n $genero = ['horror', 'drama', 'ficcion', 'investigacion','aventura'];\n \n for ($i = 0; $i < 5; $i++) {\n Book::create([\n 'title' => $faker->name,\n 'sinopsis' => $faker->email,\n 'genre' => $genero[$i],\n 'author' => $faker->name,\n \n ]);\n }\n\n\n }", "public function storebook(Request $request)\n {\n Book::create($request->all());\n return response(array(\n 'success' => true,\n 'message' =>'Product created successfully', //return response()->json($about);\n ),200);\n }", "public function create()\n {\n $data['languages'] = Language::getLanguages();\n $data['authors'] = Author::getAll();\n $data['categories'] = Category::getAll();\n return view('admin.books.create', $data);\n }", "public function create ()\n {\n $query = \"INSERT INTO \" . $this->table_name .\" \". \" SET\n book_id=:book_id, type_id=:type_id, name=:name, isbn=:isbn, publisher=:publisher,author=:author,price=:price\";\n $stmt = $this->conn->prepare($query);\n\n\n $this->book_id=htmlspecialchars(strip_tags($this->book_id));\n $this->type_id=htmlspecialchars(strip_tags($this->type_id));\n $this->name=htmlspecialchars(strip_tags($this->name));\n $this->isbn=htmlspecialchars(strip_tags($this->isbn));\n $this->publisher=htmlspecialchars(strip_tags($this->publisher));\n $this->author=htmlspecialchars(strip_tags($this->author));\n $this->price=htmlspecialchars(strip_tags($this->price));\n\n\n\n $stmt->bindParam(\":book_id\", $this->book_id);\n $stmt->bindParam(\":type_id\", $this->type_id);\n $stmt->bindParam(\":name\", $this->name);\n $stmt->bindParam(\":isbn\", $this->isbn);\n $stmt->bindParam(\":publisher\", $this->publisher);\n $stmt->bindParam(\":author\", $this->author);\n $stmt->bindParam(\":price\",$this->price);\n\n if($stmt->execute()){\n return true;\n }else{\n return false;\n }\n }", "public function create()\n {\n return view('admin.Book.add');\n }", "public function create()\n {\n $authors = Author::orderBy('name')->get();\n return view('books.create', ['authors' => $authors]);\n }", "public function run()\n {\n //Buch anlegen\n $book = new \\App\\Book;\n $book -> isbn = \"123456789\" ;\n $book -> title = \"Harry Potter\" ;\n $book -> subtitle = \"Und der Stein der Weisen\" ;\n $book -> rating = 7 ;\n $book -> description = \"Bis zu seinem elften Geburtstag glaubt Harry, er sei ein ganz normaler Junge.\n Doch dann erfährt er, dass er sich an der Schule für Hexerei und Zauberei \n einfinden soll – denn er ist ein Zauberer! In Hogwarts stürzt Harry von \n einem Abenteuer ins nächste und muss gegen Bestien, Mitschüler und \n Fabelwesen kämpfen. Da ist es gut, dass er schon Freunde gefunden hat, \n die ihm im Kampf gegen die dunklen Mächte zur Seite stehen.\n Dies ist der erste Band der international erfolgreichen Harry-Potter-Serie,\n die Generationen geprägt hat.\" ;\n $book -> published = new DateTime();\n $book -> netAmount = 8.99;\n $book -> user_id = 1;\n $book->save(); //nötig! Obwohl später nochmal gespeichert wird, sonst hat er später keine ID\n\n //Autoren zuweisen\n $authors = App\\Author::where('lastName', 'Rowling')->pluck(\"id\");\n $book->authors()->sync($authors);\n $book->save();\n\n //Bestellung zuweisen\n $orders = App\\Order::all()->pluck(\"id\");\n $book->orders()->sync($orders);\n $book->save();\n\n\n //Buch2\n $book2 = new \\App\\Book;\n $book2 -> title = \"Harry Potter\" ;\n $book2 -> isbn = \"1234567810\" ;\n $book2 -> subtitle = \"Und die Kammer des Schreckens\" ;\n $book2-> rating = 7 ;\n $book2 -> description = \"Endlich wieder Schule! Einen solchen Seufzer kann nur der ausstoßen, dessen\n Ferien scheußlich waren: Harry Potter. Doch wie im vergangenen Schuljahr \n stehen nicht nur Zaubertrankunterricht und Verwandlung auf dem Programm. \n Ein grauenhaftes Etwas treibt sein Unwesen in der Schule. Wird Harry mit \n Hilfe seiner Freunde Ron und Hermine das Rätsel lösen und Hogwarts von den \n dunklen Mächten befreien können?\n Dies ist der zweite Band der international erfolgreichen Harry-Potter-Serie, \n die Generationen geprägt hat.\" ;\n $book2 -> published = new DateTime();\n $book2 -> netAmount = 8.99;\n $book2 -> user_id = 1;\n $book2->save();\n\n //Autoren zuweisen\n $authors = App\\Author::where('lastName', 'Rowling')->pluck(\"id\");\n $book2->authors()->sync($authors);\n $book2->save();\n\n\n //Buch3\n $book3 = new \\App\\Book;\n $book3 -> title = \"Harry Potter\" ;\n $book3 -> isbn = \"1234567811\" ;\n $book3 -> subtitle = \"Und der Gefangene von Askaban\" ;\n $book3 -> rating = 10 ;\n $book3 -> description = \"Natürlich weiß Harry, dass das Zaubern in den Ferien strengstens verboten \n ist, und trotzdem befördert er seine schreckliche Tante mit einem \n Schwebezauber an die Decke. Die Konsequenz ist normalerweise: Schulverweis!\n Doch Harry wird behandelt wie ein rohes Ei. Hat es etwa damit zu tun, \n dass ein gefürchteter Verbrecher es auf Harry abgesehen hat? Mit Ron und \n Hermine versucht Harry ein Geflecht aus Verrat und Rache aufzudröseln und \n stößt dabei auf Dinge, die ihn fast an seinem Verstand zweifeln lassen.\n Dies ist der dritte Band der Harry-Potter-Serie, \n die Generationen geprägt hat.\" ;\n $book3 -> published = new DateTime();\n $book3 -> netAmount = 18.99;\n $book3 -> user_id = 1;\n $book3->save();\n\n //Autoren zuweisen\n $authors = App\\Author::where('lastName', 'Rowling')->pluck(\"id\");\n $book3->authors()->sync($authors);\n $book3->save();\n\n\n //Buch4\n $book4 = new \\App\\Book;\n $book4 -> isbn = \"1234567812\" ;\n $book4 -> title = \"Harry Potter\" ;\n $book4 -> subtitle = \"Und der Feuerkelch\" ;\n $book4 -> rating = 8 ;\n $book4 -> description = \"Harrys viertes Schuljahr in Hogwarts beginnt und ein Wettkampf hält die \n Schüler in Atem: das Trimagische Turnier, in dem Harry eine Rolle übernimmt, \n die er sich im Traum nicht vorgestellt hätte. Natürlich steckt dahinter das \n Böse, das zurück an die Macht drängt: Lord Voldemort. Es wird eng für Harry. \n Doch auf seine Freunde und ihre Unterstützung kann er sich auch in \n verzweifelten Situationen verlassen.\n Dies ist der vierte Band der international erfolgreichen Harry-Potter-Serie,\n die Generationen geprägt hat.\" ;\n $book4 -> published = new DateTime();\n $book4 -> netAmount = 24.99;\n $book4 -> user_id = 1;\n $book4->save(); //nötig! Obwohl später nochmal gespeichert wird, sonst hat er später keine ID\n\n //Autoren zuweisen\n $authors = App\\Author::where('lastName', 'Rowling')->pluck(\"id\");\n $book4->authors()->sync($authors);\n $book4->save();\n\n\n //Buch5\n $book5 = new \\App\\Book;\n $book5 -> isbn = \"1234567813\" ;\n $book5 -> title = \"Harry Potter\" ;\n $book5 -> subtitle = \"Und der Orden des Phönix\" ;\n $book5 -> rating = 10 ;\n $book5 -> description = \"Es sind Sommerferien und wieder einmal sitzt Harry bei den unsäglichen \n Dursleys fest. Doch diesmal treibt ihn größere Unruhe denn je – warum \n erfährt er nichts über die dunklen Mächte, die inzwischen neu erstanden \n sind? Noch ahnt er nicht, was der geheimnisvolle Orden des Phönix gegen \n Voldemort ausrichten kann ... Doch dann schlägt der Dunkle Lord wieder zu. \n Harry muss seine Freunde um sich scharen, sonst gibt es kein Entrinnen.\n Dies ist der fünfte Band der international erfolgreichen Harry-Potter-Serie, \n die Generationen geprägt hat.\" ;\n $book5 -> published = new DateTime();\n $book5 -> netAmount = 29.99;\n $book5 -> user_id = 1;\n $book5->save();\n\n //Autoren zuweisen\n $authors = App\\Author::where('lastName', 'Rowling')->pluck(\"id\");\n $book5->authors()->sync($authors);\n $book5->save();\n\n //Buch6\n $book6 = new \\App\\Book;\n $book6 -> isbn = \"1234567814\" ;\n $book6 -> title = \"Harry Potter\" ;\n $book6 -> subtitle = \"Und der Halbblutprinz\" ;\n $book6 -> rating = 8 ;\n $book6 -> description = \"Seit Voldemort, der gefährlichste schwarze Magier aller Zeiten, \n zurückgekehrt ist, herrschen Aufruhr und Gewalt in der magischen Welt. \n Als Harry und seine Freunde Ron und Hermine zu ihrem sechsten Schuljahr \n nach Hogwarts kommen, gelten strengste Sicherheitsmaßnahmen in der\n Zauberschule. Um Harry gegen das Böse zu wappnen, erforscht Dumbledore mit \n ihm die Geschichte des Dunklen Lords. Ob auch Harrys Zaubertrankbuch, das \n früher einem »Halbblutprinzen« gehörte, ihm helfen kann?\n Dies ist der sechste Band der international erfolgreichen Harry-Potter-Serie,\n die Generationen geprägt hat.\" ;\n $book6 -> published = new DateTime();\n $book6 -> netAmount = 23.99;\n $book6 -> user_id = 1;\n $book6->save();\n\n //Autoren zuweisen\n $authors = App\\Author::where('lastName', 'Rowling')->pluck(\"id\");\n $book6->authors()->sync($authors);\n $book6->save();\n\n\n //Buch7\n $book7 = new \\App\\Book;\n $book7 -> isbn = \"1234567815\" ;\n $book7 -> title = \"Harry Potter\" ;\n $book7 -> subtitle = \"Und die Heiligtümer des Todes\" ;\n $book7 -> rating = 10 ;\n $book7 -> description = \"An eine Rückkehr nach Hogwarts ist für Harry nicht zu denken. Er muss alles \n daransetzen, die übrigen Horkruxe zu finden. Erst wenn sie zerstört sind, \n kann Voldemorts Schreckensherrschaft vergehen. Mit Ron und Hermine an \n seiner Seite begibt sich Harry auf eine gefährliche Reise durch das ganze \n Land. Als die drei auf die rätselhaften Heiligtümer des Todes stoßen, muss \n Harry sich entscheiden. Soll er dieser Spur folgen? Doch welche Wahl er auch \n trifft – am Ende des Weges wird der Dunkle Lord auf ihn warten …\n Dies ist der siebte und letzte Band der international erfolgreichen \n Harry-Potter-Serie, die Generationen geprägt hat.\" ;\n $book7 -> published = new DateTime();\n $book7 -> netAmount = 26.99;\n $book7 -> user_id = 1;\n $book7->save();\n\n //Autoren zuweisen\n $authors = App\\Author::where('lastName', 'Rowling')->pluck(\"id\");\n $book7->authors()->sync($authors);\n $book7->save();\n\n\n //Buch8\n $book8 = new \\App\\Book;\n $book8 -> isbn = \"1234567816\" ;\n $book8 -> title = \"Das Lied von Eis und Feuer\" ;\n $book8 -> subtitle = \"Die Herren von Winterfell\" ;\n $book8 -> rating = 8 ;\n $book8 -> description = \"Eddard Stark, der Herr von Winterfell, wird an den Hof seines Königs gerufen, \n um diesem als Berater und Vertrauter zur Seite zu stehen. Doch Intriganten, Meuchler \n und skrupellose Adlige scharen sich um den Thron, deren Einflüsterungen der schwache \n König nichts entgegenzusetzen hat. Während Eddard sich von mächtigen Feinden umringt \n sieht, steht sein Sohn, der zukünftige Herrscher des Nordens, einer uralten finsteren \n Macht gegenüber. Die Zukunft des Reiches hängt von den Herren von Winterfell ab!\" ;\n $book8 -> published = new DateTime();\n $book8 -> netAmount = 17.00;\n $book8 -> user_id = 1;\n $book8->save();\n\n //Autoren zuweisen\n $authors = App\\Author::where('lastName', 'Martin')->pluck(\"id\");\n $book8->authors()->sync($authors);\n $book8->save();\n\n\n //Buch9\n $book9 = new \\App\\Book;\n $book9 -> isbn = \"1234567817\" ;\n $book9 -> title = \"Das Lied von Eis und Feuer\" ;\n $book9 -> subtitle = \"Das Erbe von Winterfell\" ;\n $book9 -> rating = 9 ;\n $book9 -> description = \"Eddard Stark, der Lord von Winterfell, ist dem Ruf seines Königs und alten Freundes \n Robert Baratheon gefolgt und hat seine kalte Heimat im hohen Norden verlassen, \n um als Hand – als Roberts Berater und Stellvertreter – zu dienen. Eddard ist ein \n geradliniger, tapferer und aufrechter Mann, der sich jeder Gefahr mit dem Schwert \n entgegenstellen würde – doch die Ränke der Mächtigen bei Hof sind nichts, was man mit \n einem Schwert bekämpfen kann. Auch dann nicht, wenn man die Hand des Königs ist ...\" ;\n $book9 -> published = new DateTime();\n $book9 -> netAmount = 16.00;\n $book9 -> user_id = 1;\n $book9->save();\n\n //Autoren zuweisen\n $authors = App\\Author::where('lastName', 'Martin')->pluck(\"id\");\n $book9->authors()->sync($authors);\n $book9->save();\n\n //Buch10\n $book10 = new \\App\\Book;\n $book10 -> isbn = \"1234567818\" ;\n $book10 -> title = \"Das Lied von Eis und Feuer\" ;\n $book10 -> subtitle = \"Der Thron der Sieben Königreiche\" ;\n $book10 -> rating = 7 ;\n $book10 -> description = \"Nach dem Tod seines Vaters ist es an dem erst fünfzehnjährigen Robb Stark, die \n Herrschaft über Winterfell und damit über den ganzen Norden von Westeros anzutreten. \n Robb kämpft noch um die Anerkennung und den Respekt seiner Untertanen, da bricht im \n Reich ein Bürgerkrieg aus. Für Robb stellt sich allerdings kaum die Frage, auf welcher \n Seite er kämpfen wird, denn der junge König Joffrey Baratheon hält seine Schwestern als \n Geisel. Und während das Reich zerbricht, wächst im eisigen Norden eine viel größere \n Gefahr heran …\" ;\n $book10 -> published = new DateTime();\n $book10 -> netAmount = 16.00;\n $book10 -> user_id = 1;\n $book10 ->save();\n\n //Autoren zuweisen\n $authors = App\\Author::where('lastName', 'Martin')->pluck(\"id\");\n $book10->authors()->sync($authors);\n $book10->save();\n\n\n //Buch11\n $book11 = new \\App\\Book;\n $book11 -> isbn = \"1234567819\" ;\n $book11 -> title = \"Das Lied von Eis und Feuer\" ;\n $book11 -> subtitle = \"Die Saat des goldenen Löwen\" ;\n $book11 -> rating = 7 ;\n $book11 -> description = \"Bürgerkrieg zerreißt das Reich Westeros, und der junge grausame König Joffrey \n Baratheon hält die Schwestern Sansa und Arya Stark als Geiseln, um ihren Bruder zur \n Treue zu zwingen. Während die ältere Sansa versuchen will, das beste aus der Situation \n zu machen, entscheidet sich Arya zur Flucht. Doch der Weg zu ihrer sicheren Heimat in \n Winterfell ist lang, und die verschiedenen Parteien, die im Bürgerkrieg \n aufeinanderprallen, sind nicht die einzige Gefahr für das junge Mädchen …\" ;\n $book11 -> published = new DateTime();\n $book11 -> netAmount = 18.00;\n $book11 -> user_id = 1;\n $book11 ->save();\n\n //Autoren zuweisen\n $authors = App\\Author::where('lastName', 'Martin')->pluck(\"id\");\n $book11->authors()->sync($authors);\n $book11->save();\n\n }", "public function store(Request $request)\n {\n $request->validate([\n 'title' => 'required',\n 'description' => 'required',\n 'author' => 'required',\n 'pages' => 'required',\n ]);\n \n Book::create($request->all());\n \n return redirect()->route('books.index')->with('success','Livro criado com sucesso.');\n }", "public function run()\n {\n Book::insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'title' => 'The Great Gatsby',\n 'author' => 'F. Scott Fitzgerald',\n 'published' => 1925,\n 'cover' => 'http://img2.imagesbn.com/p/9780743273565_p0_v4_s114x166.JPG',\n 'purchase_link' => 'http://www.barnesandnoble.com/w/the-great-gatsby-francis-scott-fitzgerald/1116668135?ean=9780743273565',\n ]);\n\n Book::insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'title' => 'The Bell Jar',\n 'author' => 'Sylvia Plath',\n 'published' => 1963,\n 'cover' => 'http://img1.imagesbn.com/p/9780061148514_p0_v2_s114x166.JPG',\n 'purchase_link' => 'http://www.barnesandnoble.com/w/bell-jar-sylvia-plath/1100550703?ean=9780061148514',\n ]);\n\n Book::insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'title' => 'I Know Why the Caged Bird Sings',\n 'author' => 'Maya Angelou',\n 'published' => 1969,\n 'cover' => 'http://img1.imagesbn.com/p/9780345514400_p0_v1_s114x166.JPG',\n 'purchase_link' => 'http://www.barnesandnoble.com/w/i-know-why-the-caged-bird-sings-maya-angelou/1100392955?ean=9780345514400',\n ]);\n\n Book::insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'title' => 'Harry Potter and the Sorcerer\\'s Stone',\n 'author' => 'J.K. Rowling',\n 'published' => 1997,\n 'cover' => 'http://prodimage.images-bn.com/pimages/9780590353427_p0_v1_s484x700.jpg',\n 'purchase_link' => 'http://www.barnesandnoble.com/w/harry-potter-and-the-sorcerers-stone-j-k-rowling/1100036321?ean=9780590353427',\n ]);\n\n Book::insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'title' => 'Harry Potter and the Chamber of Secrets',\n 'author' => 'J.K. Rowling',\n 'published' => 1998,\n 'cover' => 'http://prodimage.images-bn.com/pimages/9780439064873_p0_v1_s192x300.jpg',\n 'purchase_link' => 'http://www.barnesandnoble.com/w/harry-potter-and-the-chamber-of-secrets-j-k-rowling/1004338523?ean=9780439064873',\n ]);\n\n Book::insert([\n 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n 'title' => 'Harry Potter and the The Prisoner of Azkaban',\n 'author' => 'J.K. Rowling',\n 'published' => 1999,\n 'cover' => 'http://prodimage.images-bn.com/pimages/9780439136365_p0_v1_s192x300.jpg',\n 'purchase_link' => 'http://www.barnesandnoble.com/w/harry-potter-and-the-prisoner-of-azkaban-j-k-rowling/1100178339?ean=9780439136365',\n ]);\n }", "public function create()\n {\n $books = Book::all();\n $users = User::all();\n\n return view('books.create', ['books' => $books, 'users' => $users]);\n }", "public function addBook(){\n $this->withoutExceptionHandling();\n\n $response = $this->post('/books', $this->data());\n\n $book = Book::first();\n \n // $response->assertOk();\n $this->assertCount(1,Book::all());\n $response->assertRedirect($book->path());\n\n }", "public function run()\n {\n Book::create([\n 'title' => 'HTML & CSS : design and build websites',\n 'author' => 'Duckett, Jon',\n 'publication_year' => 2011,\n 'publisher'=> 'Wiley,',\n 'edition' => 'N/A',\n 'isbn' => '9781118008188',\n 'call_no' => 'QA76.76 H94 D835H 2011',\n 'book_category_id' => 1,\n 'library_location' => 'Central Library, Gombak',\n 'book_level' => '4',\n 'book_shelf' => '52',\n ]);\n\n Book::create([\n 'title' => 'Systems Analysis and Design',\n 'author' => 'Kendall, Kenneth E.',\n 'publication_year' => 2014,\n 'publisher'=> 'Pearson Education Limited',\n 'edition' => '9',\n 'isbn' => '9780273787105',\n 'call_no' => 'QA76.9 S88 K33S 2014',\n 'book_category_id' => 2,\n 'library_location' => 'Central Library, Gombak',\n 'book_level' => '4',\n 'book_shelf' => '49',\n ]);\n\n Book::create([\n 'title' => 'The Capacitor',\n 'author' => 'Paeg, H.',\n 'publication_year' => 1990,\n 'publisher'=> 'Siemens Aktienges, Munich',\n 'edition' => 'N/A',\n 'isbn' => '3800915715',\n 'call_no' => 'TK 7872 C65 P126K4 1990',\n 'book_category_id' => 1,\n 'library_location' => 'Central Library, Gombak',\n 'book_level' => '4',\n 'book_shelf' => '26',\n ]);\n\n Book::create([\n // 'cover_page_url' => asset('9780521695244.jpg'),\n \n 'title' => 'Quantum Groups A Path to Current Algebra',\n 'author' => 'Street, R.',\n 'publication_year' => 2007,\n 'publisher'=> 'Cambridge Uniersity Press',\n 'edition' => 'N/A',\n 'isbn' => '9780521695244',\n 'call_no' => 'QC 20.7 G76 S915Q 2007',\n 'book_category_id' => 1,\n 'library_location' => 'Central Library, Gombak',\n 'book_level' => '4',\n 'book_shelf' => '49',\n ]);\n }", "public function insertBook(Request $request) {\n\n $request->validate([\n 'title' => 'required',\n 'description' => 'required',\n 'genre' => 'required',\n 'isbn' => 'required'\n ]);\n\n $insertBook = new Libro;\n\n $insertBook->title = $request->title;\n $insertBook->description = $request->description;\n $insertBook->genre = $request->genre;\n $insertBook->isbn = $request->isbn;\n $insertBook->pdf = \"aa\";\n \n $insertBook->save();\n\n return(\"Libro guardado con exito\");\n }", "public function run()\n {\n Book::create([\n 'category_id' => 3,\n 'title' => 'O Rei Leão',\n 'quantity' => 5,\n ]);\n Book::create([\n 'category_id' => 4,\n 'title' => 'Steve Jobs',\n 'quantity' => 1,\n ]);\n }", "public function actionCreate() {\n $model = new TimeBooks();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function run()\n {\n Book::truncate();\n\n Book::create([\n 'title' => \"Gato Tiene Sueño\",\n 'author' => \"Satoshi Kitamura\",\n 'category_id' => 1,\n 'editorial' => \"Fondo de Cultura Economica\",\n 'price' => 54.10,\n 'lenguage' => \"Español\",\n 'description' => \"Esta es una simpática y familiar historia donde el protagonista, un gato, lo único que quiere hacer es dormir. Recorre toda la casa, hasta que al final encuentra el lugar ideal..., y por fin, se echa a dormir\",\n 'picture' => \"picture-books/gato-tiene-sueno.jpg\",\n 'sold' => 12,\n ]);\n\n Book::create([\n 'title' => \"Perro Tiene Sed\",\n 'author' => \"Satoshi Kitamura\",\n 'category_id' => 1,\n 'editorial' => \"Fondo de Cultura Economica\",\n 'price' => 44.50,\n 'lenguage' => \"Español\",\n 'description' => \"Un perro que tenía sed, y cada vez tenía más, empezó a ver con verdadero pesimismo el poder tomar un poco de agua. Pero como suele suceder cuando uno se siente perdido, el agua cayó del cielo.\",\n 'picture' => \"picture-books/perro-tiene-sed.jpg\",\n 'sold' => 25,\n ]);\n\n Book::create([\n 'title' => \"El niño que tocó las estrellas\",\n 'author' => \"J. Hernández\",\n 'category_id' => 1,\n 'editorial' => \"Grupo Editorial Patria\",\n 'price' => 80.40,\n 'lenguage' => \"Español\",\n 'description' => \"\",\n 'picture' => \"picture-books/nino-que-toco-las-estrellas.jpg\",\n 'sold' => 76,\n ]);\n\n Book::create([\n 'title' => \"The Gruffalo's Wean\",\n 'author' => \"Julia Donaldson\",\n 'category_id' => 1,\n 'editorial' => \"Itchy Coo\",\n 'price' => 140.10,\n 'lenguage' => \"Ingles\",\n 'description' => \"\",\n 'picture' => \"picture-books/gruffalo-wean.jpg\",\n 'sold' => 54,\n ]);\n\n Book::create([\n 'title' => \"El Cerdito De Navidad\",\n 'author' => \"J.K. Rowling\",\n 'category_id' => 1,\n 'editorial' => \"‎Penguin Random House Grupo Editorial\",\n 'price' => 98.99,\n 'lenguage' => \"Español\",\n 'description' => \"Un niño y su juguete están a punto de cambiarlo todo.Jack tiene un juguete preferido, Dito, que siempre ha estado a su lado, en las buenas y las malas. Hasta que una Nochebuena sucede algo terrible\",\n 'picture' => \"picture-books/cerdito-navidad.jpg\",\n 'sold' => 5,\n ]);\n\n Book::create([\n 'title' => \"Harry Potter y El Cáliz de Fuego\",\n 'author' => \"J.K. Rowling\",\n 'category_id' => 2,\n 'editorial' => \"‎Penguin Random House Grupo Editorial\",\n 'price' => 250.50,\n 'lenguage' => \"Español\",\n 'description' => \"Harry Potter y el cáliz de fuego es la cuarta entrega de la serie fantástica de la autora británica J.K. Rowling.\",\n 'picture' => \"picture-books/harry-potter-caliz.jpg\",\n 'sold' => 250,\n ]);\n\n Book::create([\n 'title' => \"Jurassic Park: A Novel\",\n 'author' => \"Michael Crichton\",\n 'category_id' => 2,\n 'editorial' => \"‎Ballantine Books\",\n 'price' => 150.00,\n 'lenguage' => \"Ingles\",\n 'description' => \"\",\n 'picture' => \"picture-books/jurassic-park-novel-1.jpg\",\n 'sold' => 134,\n ]);\n\n Book::create([\n 'title' => \"El mundo de hielo y fuego: La historia no contada de Poniente y el Juego de Tronos\",\n 'author' => \"George R. R. Martin\",\n 'category_id' => 2,\n 'editorial' => \"Penguin Random House Grupo Editorial\",\n 'price' => 109.60,\n 'lenguage' => \"Español\",\n 'description' => \"Una enciclopedia bellamente ilustrada que cautivará a los fans de la saga Canción de hielo y fuego. Un libro complementario al vasto universo creado por Martin, enriquecido con árboles genealógicos, mapas y una recopilación de datos y acontecimientos detallados en torno a la trama abordada en su trabajo más ambicioso.\",\n 'picture' => \"picture-books/mundo-hielo-fuego.jpg\",\n 'sold' => 98,\n ]);\n\n Book::create([\n 'title' => \"Los Cuentos de Willy\",\n 'author' => \"Anthony Browne\",\n 'category_id' => 2,\n 'editorial' => \"‎Fondo de Cultura Económica\",\n 'price' => 75.10,\n 'lenguage' => \"Español\",\n 'description' => \"Todos los días Willy atraviesa una misteriosa puerta que lo lleva a vivir las aventuras más increíbles: un día aparece dentro de un barril de manzanas escuchando la conversación de unos temibles piratas; otro, lucha frente a frente con el capitán Garfio\",\n 'picture' => \"picture-books/cuentos-willy.jpg\",\n 'sold' => 102,\n ]);\n\n Book::create([\n 'title' => \"La Maleta de Fortu: Cuentos, metáforas y juegos ¡para no olvidar cómo ser felices!\",\n 'author' => \"Alegria Fernández\",\n 'category_id' => 2,\n 'editorial' => \"‎Independently Published\",\n 'price' => 154.90,\n 'lenguage' => \"Español\",\n 'description' => \"\",\n 'picture' => \"picture-books/maleta-de-fortu.jpg\",\n 'sold' => 48,\n ]);\n\n Book::create([\n 'title' => \"Álgebra (4a Edición)\",\n 'author' => \"Aurelio Baldor\",\n 'category_id' => 3,\n 'editorial' => \"‎‎Patria\",\n 'price' => 404.20,\n 'lenguage' => \"Español\",\n 'description' => \"\",\n 'picture' => \"picture-books/algebra-baldor.jpg\",\n 'sold' => 73,\n ]);\n\n Book::create([\n 'title' => \"MATEMÁTICAS SIMPLIFICADAS\",\n 'author' => \"CONAMAT\",\n 'category_id' => 3,\n 'editorial' => \"‎‎PEARSON\",\n 'price' => 376.70,\n 'lenguage' => \"Español\",\n 'description' => \"\",\n 'picture' => \"picture-books/matematicas-simplificadas.jpg\",\n 'sold' => 34,\n ]);\n\n Book::create([\n 'title' => \"Fisica Conceptos y Aplicaciones\",\n 'author' => \"Tippens Paul \",\n 'category_id' => 3,\n 'editorial' => \"‎‎McGraw-Hill\",\n 'price' => 630.20,\n 'lenguage' => \"Español\",\n 'description' => \"Todo un clásico en la enseñanza de la física en el bachillerato y ahora, por primera vez, impreso en todo color, en su octavaedición este libro presenta dos cambios sustanciales: por un lado, se reorganizó el contenido para adecuarse a planes de estudio actuales del bachillerato general en América Latina\",\n 'picture' => \"picture-books/fisica-conceptos-aplicaciones.jpg\",\n 'sold' => 187,\n ]);\n\n Book::create([\n 'title' => \"Química\",\n 'author' => \"Raymond Chang\",\n 'category_id' => 3,\n 'editorial' => \"‎‎Editorial McGraw-Hill\",\n 'price' => 489.99,\n 'lenguage' => \"Español\",\n 'description' => \"Texto para uno o dos semestres de Química general en varias licenciaturas: ingeniería química, ciencias químicas, ingeniería industrial, ingeniería eléctrica, ingeniería ambiental, entre otras.\",\n 'picture' => \"picture-books/quimica.jpg\",\n 'sold' => 35,\n ]);\n\n Book::create([\n 'title' => \"Métodos numéricos para ingenieros\",\n 'author' => \"Steven Chapra\",\n 'category_id' => 3,\n 'editorial' => \"‎‎Editorial McGraw-Hill\",\n 'price' => 423.50,\n 'lenguage' => \"Español\",\n 'description' => \"La séptima edición de Métodos numéricos para ingenieros continúa ofreciendo una presentación innovadora y accesible sobre una amplia gama de métodos numéricos. Dado que regularmente se emplea software para el análisis numérico, esta revisión mantiene un fuerte enfoque en el uso apropiado de las herramientas de cómputo, así como de las discusiones de los fundamentos matemáticos subyacentes.\",\n 'picture' => \"picture-books/metodos-numericos.jpg\",\n 'sold' => 116,\n ]);\n }", "public function create()\n {\n //\n return view('addbook');\n }", "public function create()\n {\n //\n return view('addbook');\n }", "public function create()\n {\n //\n $author = new Author();\n $author->lastname = \"Straub\";\n $author->firstname = \"Peter\";\n $author->birthday = \"1943-03-02\";\n $author->genres = \"horrory, thrillery\";\n $author->save();\n\n $authorSecond = new Author();\n $authorSecond->lastname = \"King\";\n $authorSecond->firstname = \"Stephen\";\n $authorSecond->birthday = \"1947-09-21\";\n $authorSecond->genres = \"horrory, thrilerry\";\n $authorSecond->save();\n\n $czarnyDom = Book::where('name', \"Czarny Dom\")->first();\n $czarnyDom->authors()->attach($author);\n $czarnyDom->authors()->attach($authorSecond);\n\n return redirect('books');\n\n }", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create(): Model;", "public function create()\n {\n $users = User::all();\n $categories = Category::all();\n $branches = Branch::all();\n return view('books.create', compact('users', 'categories', 'branches'));\n }", "public function create()\n {\n $genres = Genre::all();\n\n return view('book.create', compact('genres'));\n }", "public function create()\n {\n $authors = Author::get()->pluck('name', 'id');\n $genres = Genre::get()->pluck('name', 'id');\n return view('admin.books.create', compact('authors', 'genres'));\n }", "public function store(Request $request)\n {\n $request->validate([\n 'title' => 'required|string',\n 'author' => 'required|string'\n ]);\n\n $book = new Book;\n $book->title = $request->title;\n $book->author = $request->author;\n $book->save();\n }", "public function actionCreate()\n {\n $model = new Book();\n\n \n $model->imageFileName_Fl = UploadedFile::getInstance($model, 'imageFileName_Fl');\n if ($model->imageFileName_Fl && $model->validate()) { \n $s2=$model->id . '_' . $model->imageFileName_Fl->baseName . '.' . $model->imageFileName_Fl->extension; \n $model->imageFileName_Fl->saveAs(Yii::getAlias('@frontend').'/web/uploads/' . $s2);\n $model->imageFileName=$s2;\n }\n \n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }" ]
[ "0.7429246", "0.7419818", "0.73218113", "0.7242412", "0.7049051", "0.70392555", "0.7027714", "0.702668", "0.697427", "0.697427", "0.6943151", "0.6935824", "0.6855438", "0.680366", "0.68006366", "0.6792888", "0.672066", "0.66828793", "0.66710037", "0.66307193", "0.65985596", "0.65908074", "0.6586509", "0.65826005", "0.65642726", "0.65556437", "0.6520486", "0.65128875", "0.65090317", "0.6489454", "0.6475125", "0.64687735", "0.6454739", "0.642162", "0.642162", "0.642162", "0.64187527", "0.641381", "0.6411028", "0.63982016", "0.63950086", "0.63934374", "0.63777107", "0.6376916", "0.63762033", "0.63623124", "0.63617396", "0.6317812", "0.6317812", "0.6317812", "0.6317812", "0.6316604", "0.6309059", "0.6307334", "0.6284819", "0.6281693", "0.6276382", "0.6274546", "0.6274546", "0.62636495", "0.62636495", "0.62636495", "0.62557197", "0.62525403", "0.62455964", "0.6243056", "0.62325263", "0.62307715", "0.62259305", "0.6221697", "0.6218251", "0.6208555", "0.6198266", "0.6196376", "0.6191723", "0.6183587", "0.618085", "0.61783195", "0.6170647", "0.6168167", "0.6166765", "0.61580795", "0.61580795", "0.61486125", "0.61469877", "0.61469877", "0.61469877", "0.61469877", "0.61469877", "0.61469877", "0.61469877", "0.61469877", "0.61469877", "0.61469877", "0.61469877", "0.61402714", "0.61344427", "0.61329025", "0.6126548", "0.6119848", "0.61118925" ]
0.0
-1
Demonstrate reading with a constraint with the QueryBuilder
public function getEx3() { # Use the QueryBuilder to get all the books where author is like "%Scott%" $books = \DB::table('books')->where('author', 'LIKE', '%Scott%')->get(); # Output the results $this->printBooks($books); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getConstraint($param);", "public function getConstraint() {}", "public function getConstraint() {}", "public function getConstraint();", "public function testLoad_Contraint()\n {\n \t$this->setExpectedException('Q\\DB_Constraint_Exception');\n\t\t$this->conn->lookupValue(\"test\", \"title\", array('status'=>'ACTIVE'));\n }", "public function queryBuilder();", "public function queryBuilder();", "public function testLoookValue_Contraint()\n {\n $this->setExpectedException('Q\\DB_Constraint_Exception');\n $this->conn->lookupValue(\"test\", \"title\", array('status'=>'ACTIVE'));\n }", "function getConstraint() ;", "function getConstraint() ;", "public function readConstraints($tableName, $resource);", "public function getConstraint1() {}", "public function getConstraint1() {}", "public function findByOffsetAndLimitAndConstraint($offset = 0, $limit = -1, $constraint = '')\n {\n $query = $this->createQuery();\n\n if ($offset > 0) {\n $query->setOffset($offset);\n }\n\n if ($limit > -1) {\n $query->setLimit($limit);\n }\n\n return $query->execute();\n }", "public function query(): QueryBuilder;", "protected function getConstraintFromBeUserData() {}", "protected function getConstraintFromBeUserData() {}", "public function testQueryRules()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "protected function constrain()\n {\n $this->table->where($this->foreign_key(), '=', $this->base->get_key());\n }", "public function getViaTableCondition();", "public function testQueryBuilder()\n {\n $table = new \\Phinx\\Db\\Table('table1', [], $this->adapter);\n $table->addColumn('string_col', 'string')\n ->addColumn('int_col', 'integer')\n ->save();\n\n $builder = $this->adapter->getQueryBuilder();\n $stm = $builder\n ->insert(['string_col', 'int_col'])\n ->into('table1')\n ->values(['string_col' => 'value1', 'int_col' => 1])\n ->values(['string_col' => 'value2', 'int_col' => 2])\n ->execute();\n\n $this->assertEquals(2, $stm->rowCount());\n\n $builder = $this->adapter->getQueryBuilder();\n $stm = $builder\n ->select('*')\n ->from('table1')\n ->where(['int_col >=' => 2])\n ->execute();\n\n $this->assertEquals(1, $stm->rowCount());\n $this->assertEquals(\n ['id' => 2, 'string_col' => 'value2', 'int_col' => '2'],\n $stm->fetch('assoc')\n );\n\n $builder = $this->adapter->getQueryBuilder();\n $stm = $builder\n ->delete('table1')\n ->where(['int_col <' => 2])\n ->execute();\n\n $this->assertEquals(1, $stm->rowCount());\n }", "function getConstraint1() ;", "function getConstraint1() ;", "abstract public function query();", "public function getConstraint2() {}", "public function getConstraint2() {}", "public function testClause()\n {\n $index = new Index();\n $query = new Query($index);\n\n $query->page(10);\n $this->assertSame(25, $query->clause('limit'));\n $this->assertSame(225, $query->clause('offset'));\n\n $query->limit(12);\n $this->assertSame(12, $query->clause('limit'));\n\n $query->offset(100);\n $this->assertSame(100, $query->clause('offset'));\n\n $query->order('price');\n $this->assertSame([ 0 => [\n 'price' => [\n 'order' => 'desc',\n ],\n ]], $query->clause('order'));\n }", "public function byCriterion()\n {\n $mockCriterion = $this->getMock('stubCriterion');\n $mockCriterion->expects($this->any())->method('toSQL')->will($this->returnValue('example'));\n $mockResult = $this->getMock('stubDatabaseResult');\n $this->mockConnection->expects($this->any())->method('query')->will($this->returnValue($mockResult));\n $mockResult->expects($this->exactly(2))\n ->method('fetchAll')\n ->will($this->onConsecutiveCalls(false, array(array('bar' => 'Here is bar.', 'default' => 'And this is default.'))));\n $finderResult = $this->dbFinder->findByCriterion($this->mockConnection, $mockCriterion, new stubReflectionClass('MockSinglePrimaryKeyEntity'));\n $this->assertEquals(0, $finderResult->count());\n $finderResult = $this->dbFinder->findByCriterion($this->mockConnection, $mockCriterion, new stubReflectionClass('MockSinglePrimaryKeyEntity'));\n $this->assertEquals(1, $finderResult->count());\n $data = $finderResult->current();\n $this->assertEquals('Here is bar.', $data->withAnnotation());\n $this->assertEquals('And this is default.', $data->withDefaultValue());\n $select = $this->mockQueryBuilder->getSelect();\n $this->assertEquals('foo', $select->getBaseTableName());\n $this->assertEquals('bar ASC', $select->getOrderedBy());\n $this->assertTrue($select->hasCriterion());\n }", "function campo($tabla,$campo,$criterio,$pos,$and=''){\n\t$array=CON::getRow(\"SELECT $pos FROM $tabla WHERE $campo='$criterio' $and\");\n\treturn $array[$pos];\n}", "public function findByFilter($filter) {\n $query = $this->createQuery();\n //$query->getQuerySettings()->setRespectEnableFields(false);\n $query->getQuerySettings()->setEnableFieldsToBeIgnored(array());\n $query->getQuerySettings()->setIncludeDeleted(false);\n $query->getQuerySettings()->setRespectStoragePage(false);\n \n\n $constraints = array();\n if($filter->keyword) {\n $keywordConstraints = array();\n $keywordConstraints[] = $query->like('title', '%'.$filter->keyword.'%');\n $keywordConstraints[] = $query->like('abstract', '%'.$filter->keyword.'%');\n $keywordConstraints[] = $query->like('bodytext', '%'.$filter->keyword.'%');\n $constraints[] = $query->logicalOr($keywordConstraints);\n }\n if($filter->area) {\n $constraints[] = $query->contains('areas', $filter->area);\n }\n if($filter->industry) {\n $constraints[] = $query->contains('industries', $filter->industry);\n }\n if($filter->technology) {\n $constraints[] = $query->contains('technologies', $filter->technology);\n }\n if($filter->theme) {\n $constraints[] = $query->contains('themes', $filter->theme);\n }\n if($filter->year) {\n $minDate = mktime(0, 0, 0, 1, 1, $filter->year);\n $maxDate = mktime(23, 59, 59, 12, 31, $filter->year);\n $constraints[] = $query->greaterThanOrEqual('article_date', $minDate);\n $constraints[] = $query->lessThanOrEqual('article_date', $maxDate);\n }\n\n if(count($constraints)) {\n \n $query->matching(\n $query->logicalAnd($constraints)\n );\n \n \n \n//$queryParser = $this->objectManager->get(\\TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Storage\\Typo3DbQueryParser::class);\n//\\TYPO3\\CMS\\Extbase\\Utility\\DebuggerUtility::var_dump($queryParser->convertQueryToDoctrineQueryBuilder($query)->getSQL());\n//\n//\\TYPO3\\CMS\\Extbase\\Utility\\DebuggerUtility::var_dump($queryParser->convertQueryToDoctrineQueryBuilder($query)->getParameters());\n\n\n\n return $query->matching(\n $query->logicalAnd($constraints)\n )\n ->execute();\n \n }\n else {\n return $this->findAll();\n }\n }", "public function byCriterionOverruleLimitClause()\n {\n $mockCriterion = $this->getMock('stubCriterion');\n $mockCriterion->expects($this->any())->method('toSQL')->will($this->returnValue('example'));\n $mockResult = $this->getMock('stubDatabaseResult');\n $this->mockConnection->expects($this->any())->method('query')->will($this->returnValue($mockResult));\n $mockResult->expects($this->once())\n ->method('fetchAll')\n ->will($this->returnValue(array(array('bar' => 'Here is bar.', 'default' => 'And this is default.'))));\n $finderResult = $this->dbFinder->findByCriterion($this->mockConnection, $mockCriterion, new stubReflectionClass('MockSinglePrimaryKeyEntity'), null, 50, 10);\n $this->assertEquals(1, $finderResult->count());\n $data = $finderResult->current();\n $this->assertEquals('Here is bar.', $data->withAnnotation());\n $this->assertEquals('And this is default.', $data->withDefaultValue());\n $select = $this->mockQueryBuilder->getSelect();\n $this->assertEquals('foo', $select->getBaseTableName());\n $this->assertEquals('bar ASC', $select->getOrderedBy());\n $this->assertTrue($select->hasLimit());\n $this->assertEquals(50, $select->getOffset());\n $this->assertEquals(10, $select->getAmount());\n $this->assertTrue($select->hasCriterion());\n }", "public function createQuery(SourceInterface $source,\n ConstraintInterface $constraint = null,\n array $orderings = [],\n array $columns = []);", "protected function user_where_clause() {}", "public function getFindPublicQueryBuilder(): QueryBuilder;", "function getConstraint2() ;", "function getConstraint2() ;", "public function planFindByField($field,$condition,$value,$orderBy= 'asc');", "public function constrain()\n\t{\n\t\treturn $this->related\n\t\t ->whereEquals($this->relatedKey, $this->model->{$this->localKey})\n\t\t ->whereEquals($this->shifter, strtolower($this->model->getModelName()));\n\t}", "public function foreignConstraint();", "public function getClause($name);", "public function createQuery() {}", "public function createQuery() {}", "public function createQuery() {}", "public function createQuery() {}", "public function testQueryMust()\n {\n $index = new Index();\n $query = new Query($index);\n $query->queryMust([\n 'name.first' => 'jose',\n 'age >' => 29,\n 'or' => [\n 'tags in' => ['cake', 'php'],\n 'interests not in' => ['c#', 'java'],\n ],\n ]);\n\n $compiled = $query->compileQuery()->toArray();\n\n $must = $compiled['query']['bool']['must'];\n\n $expected = ['term' => ['name.first' => 'jose']];\n $this->assertEquals($expected, $must[0]);\n\n $expected = ['range' => ['age' => ['gt' => 29]]];\n $this->assertEquals($expected, $must[1]);\n\n $expected = ['terms' => ['tags' => ['cake', 'php']]];\n $this->assertEquals($expected, $must[2]['bool']['should'][0]);\n\n $expected = [\n 'bool' => [\n 'must_not' => [\n ['terms' => ['interests' => ['c#', 'java']]],\n ],\n ],\n ];\n $this->assertEquals($expected, $must[2]['bool']['should'][1]);\n\n $query->queryMust(function (QueryBuilder $builder) {\n return $builder->and(\n $builder->term('another.thing', 'value'),\n $builder->exists('stuff')\n );\n });\n\n $compiled = $query->compileQuery()->toArray();\n $must = $compiled['query']['bool']['must'];\n $must = $must[3]['bool']['must'];\n $expected = [\n ['term' => ['another.thing' => 'value']],\n ['exists' => ['field' => 'stuff']],\n ];\n $this->assertEquals($expected, $must);\n\n $query->queryMust(['name.first' => 'jose'], true);\n $compiled = $query->compileQuery()->toArray();\n $must = $compiled['query']['bool']['must'];\n $expected = ['term' => ['name.first' => 'jose']];\n $this->assertEquals([$expected], $must);\n }", "public function getQueryBuilder();", "public function getQueryBuilder();", "public static function query(\\Phalcon\\Di\\DiInterface $container = null): CriteriaInterface;", "public function testImplicitJoinInWhereOnCollectionValuedPathExpression(): void\n {\n $this->assertInvalidDQL('SELECT u FROM Doctrine\\Tests\\Models\\CMS\\CmsUser u JOIN u.articles a WHERE a.title = ?');\n }", "public function setDefaultQueryContraints() {\r\n\t\t$this->addQueryConstraint($this->query->equals('nceShowasnew', TRUE));\r\n\t}", "function getIntervalLimitsExprs($table, $field, $idx, $isLowerBound)\n{\n\n\n}", "protected function getWhereClause() {}", "public function testWhere()\n {\n $index = new Index();\n $query = new Query($index);\n $query->where([\n 'name.first' => 'jose',\n 'age >' => 29,\n 'or' => [\n 'tags in' => ['cake', 'php'],\n 'interests not in' => ['c#', 'java'],\n ],\n ]);\n\n $compiled = $query->compileQuery()->toArray();\n\n $filter = $compiled['query']['bool']['filter'][0]['bool']['must'];\n\n $expected = ['term' => ['name.first' => 'jose']];\n $this->assertEquals($expected, $filter[0]);\n\n $expected = ['range' => ['age' => ['gt' => 29]]];\n $this->assertEquals($expected, $filter[1]);\n\n $expected = ['terms' => ['tags' => ['cake', 'php']]];\n $this->assertEquals($expected, $filter[2]['bool']['should'][0]);\n\n $expected = [\n 'bool' => [\n 'must_not' => [\n ['terms' => ['interests' => ['c#', 'java']]],\n ],\n ],\n ];\n $this->assertEquals($expected, $filter[2]['bool']['should'][1]);\n\n $query->where(function (QueryBuilder $builder) {\n return $builder->and(\n $builder->term('another.thing', 'value'),\n $builder->exists('stuff')\n );\n });\n\n $compiled = $query->compileQuery()->toArray();\n $filter = $compiled['query']['bool']['filter'][0]['bool']['must'];\n $filter = $filter[3]['bool']['must'];\n $expected = [\n ['term' => ['another.thing' => 'value']],\n ['exists' => ['field' => 'stuff']],\n ];\n $this->assertEquals($expected, $filter);\n\n $query->where(['name.first' => 'jose'], [], true);\n $compiled = $query->compileQuery()->toArray();\n $filter = $compiled['query']['bool']['filter'][0]['bool']['must'];\n $expected = ['term' => ['name.first' => 'jose']];\n $this->assertEquals([$expected], $filter);\n }", "function campo($tabla,$campo,$criterio,$pos,$and=''){\n\t$array=$GLOBALS['cn']->queryRow('SELECT '.$pos.' FROM '.$tabla.' WHERE '.$campo.'=\"'.$criterio.'\" '.$and);\n\treturn $array[$pos];\n}", "private function __where_restraint($rest, $clause){\r\n $objKey = (sizeof($rest) === 3?2:1);\r\n $value = $rest[$objKey];\r\n\r\n $valueType = \"%s\";\r\n\r\n if($value instanceof \\DateTime){\r\n $value = $value->format(\"Y-m-d H:i:s\");\r\n }else if(is_integer($value)){\r\n $valueType = \"%i\";\r\n }else if(is_double($value)){\r\n $valueType=\"%d\";\r\n }\r\n\r\n $what = $rest[0].(sizeof($rest) === 3?$rest[1]:\"=\").$valueType;\r\n $clause->add($what, $value);\r\n\r\n unset($objKey);\r\n unset($operation);\r\n unset($what);\r\n unset($value);\r\n unset($valueType);\r\n\r\n return $this;\r\n }", "public function constraint(){\n try {\n // Sparql11query.g:227:3: ( brackettedExpression | builtInCall | functionCall ) \n $alt28=3;\n $LA28 = $this->input->LA(1);\n if($this->getToken('OPEN_BRACE')== $LA28)\n {\n $alt28=1;\n }\n else if($this->getToken('COALESCE')== $LA28||$this->getToken('IF')== $LA28||$this->getToken('STR')== $LA28||$this->getToken('LANG')== $LA28||$this->getToken('LANGMATCHES')== $LA28||$this->getToken('DATATYPE')== $LA28||$this->getToken('BOUND')== $LA28||$this->getToken('SAMETERM')== $LA28||$this->getToken('ISIRI')== $LA28||$this->getToken('ISURI')== $LA28||$this->getToken('ISBLANK')== $LA28||$this->getToken('ISLITERAL')== $LA28||$this->getToken('REGEX')== $LA28)\n {\n $alt28=2;\n }\n else if($this->getToken('IRI_REF')== $LA28||$this->getToken('PNAME_NS')== $LA28||$this->getToken('PNAME_LN')== $LA28)\n {\n $alt28=3;\n }\n else{\n $nvae =\n new NoViableAltException(\"\", 28, 0, $this->input);\n\n throw $nvae;\n }\n\n switch ($alt28) {\n case 1 :\n // Sparql11query.g:228:3: brackettedExpression \n {\n $this->pushFollow(self::$FOLLOW_brackettedExpression_in_constraint780);\n $this->brackettedExpression();\n\n $this->state->_fsp--;\n\n\n }\n break;\n case 2 :\n // Sparql11query.g:229:5: builtInCall \n {\n $this->pushFollow(self::$FOLLOW_builtInCall_in_constraint786);\n $this->builtInCall();\n\n $this->state->_fsp--;\n\n\n }\n break;\n case 3 :\n // Sparql11query.g:230:5: functionCall \n {\n $this->pushFollow(self::$FOLLOW_functionCall_in_constraint792);\n $this->functionCall();\n\n $this->state->_fsp--;\n\n\n }\n break;\n\n }\n }\n catch (RecognitionException $re) {\n $this->reportError($re);\n $this->recover($this->input,$re);\n }\n catch(Exception $e) {\n throw $e;\n }\n \n return ;\n }", "public abstract function get_query();", "function getInstance(Constraint $constraint);", "protected function getGeneralWhereClause() {}", "public function getQueryBuilder(): SQLQueryBuilder;", "protected function compileRowConstraint($query)\n\t{\n\t\t$start = $query->offset + 1;\n\n\t\tif ($query->limit > 0)\n\t\t{\n\t\t\t$finish = $query->offset + $query->limit;\n\n\t\t\treturn \"between {$start} and {$finish}\";\n\t\t}\n\t\n\t\treturn \">= {$start}\";\n\t}", "public static function getRestriction(): Restriction;", "function query() {\n \n $this->ensure_my_table();\n \n if ($this->options['operator'] == 'in') {\n $keys = array_keys($this->value);\n\n $this->query->add_where(0, $this->table_alias.'.id IN ('. implode(',', $keys).')' );\n }\n\n }", "public function getResourcePlanifiedQB()\n {\n $qb = $this->createQueryBuilder('pr');\n $qb->where('pr.resource = r.id');\n return $qb;\n }", "public function query(): QueryInterface;", "abstract protected function loadTablePrimaryKey(string $tableName): ?Constraint;", "public function read(phpDataMapper_Query $query);", "public function get() {\r\n $this->checkGateway();\r\n\r\n $id = func_get_args();\r\n\r\n // Create the SQL Query\r\n $sql = \"SELECT * FROM {$this->name} WHERE \";\r\n foreach ((array) $this->primary as $key => $primary) {\r\n\r\n // More primary keys than parameters\r\n if (! isset($id[$key])) {\r\n throw new DatabaseGatewayException(\"The 'get' method requires every primary keys as parameters to be given in the same order\");\r\n }\r\n\r\n // Query parameter\r\n $sql .= $primary . \" = :$primary AND \";\r\n\r\n // Safe query\r\n $this->db->bind($primary, $id[$key]);\r\n }\r\n $sql = trim($sql, \" AND \");\r\n\r\n // Result\r\n return $this->db->row($sql);\r\n }", "public function testSelect()\n {\n $index = new Index();\n $query = new Query($index);\n $this->assertSame($query, $query->select(['a', 'b']));\n $elasticQuery = $query->compileQuery()->toArray();\n $this->assertEquals(['a', 'b'], $elasticQuery['_source']);\n\n $query->select(['c', 'd']);\n $elasticQuery = $query->compileQuery()->toArray();\n $this->assertEquals(['a', 'b', 'c', 'd'], $elasticQuery['_source']);\n\n $query->select(['e', 'f'], true);\n $elasticQuery = $query->compileQuery()->toArray();\n $this->assertEquals(['e', 'f'], $elasticQuery['_source']);\n }", "public static function query();", "public function select($query, $bindings = []);", "public function select($query, $bindings = []);", "public function select($query, $bindings = []);", "public function testFindByQWithOffsetAndLimit()\n {\n $dataLoader = $this->getDataLoader();\n $all = $dataLoader->getAll();\n $filters = ['q' => $all[0]['name'], 'offset' => 0, 'limit' => 1];\n $this->filterTest($filters, [$all[0]]);\n $filters = ['q' => 'desc', 'offset' => 1, 'limit' => 1];\n $this->filterTest($filters, [$all[1]]);\n }", "public function getQuery()\n {\n throw new \\Exception('No database query in HasOneOrManyBy');\n }", "public function GetConstraints ();", "public function where($field, $predicate): self;", "abstract public function getRow($query);", "public function loadCollectionQuery(Collection $collection): Query;", "public function addConstraints()\n {\n $this->setJoin ()->setWhere ();\n }", "public function getWhereClauseForEnabledFieldsIncludesDeletedCheckInBackend() {}", "abstract public function handleConstraint(string $rule): Constraint;", "public function testFindByQWithLimit()\n {\n $dataLoader = $this->getDataLoader();\n $all = $dataLoader->getAll();\n $filters = ['q' => $all[0]['name'], 'limit' => 1];\n $this->filterTest($filters, [$all[0]]);\n $filters = ['q' => 'desc', 'limit' => 2];\n $this->filterTest($filters, [$all[0], $all[1]]);\n }", "public function testImplicitJoinWithCartesianProductAndConditionInWhere(): void\n {\n $this->assertValidDQL('SELECT u, a FROM Doctrine\\Tests\\Models\\CMS\\CmsUser u, Doctrine\\Tests\\Models\\CMS\\CmsArticle a WHERE u.name = a.topic');\n }", "public function query();", "public function query();", "public function query();", "public function createQuery(): QueryInterface;", "public function toQuery();", "public function testQueryPolicyRules()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testFindByQWithOffset()\n {\n $dataLoader = $this->getDataLoader();\n $all = $dataLoader->getAll();\n $filters = ['q' => $all[0]['name'], 'offset' => 0];\n $this->filterTest($filters, [$all[0]]);\n }", "abstract function find($query);", "public function testGetWithKey()\n {\n $result = $this->getQueryBuilderConnection()\n ->select()\n ->from('querybuilder_tests')\n ->where('id', '<', 2)\n ->getWithKey('field');\n\n $expected = [\n 'aaaa' => (object)[\n 'id' => '0',\n 'languageId' => '1',\n 'field' => 'aaaa',\n ],\n 'bbbb' => (object)[\n 'id' => '1',\n 'languageId' => '1',\n 'field' => 'bbbb',\n ],\n ];\n\n $this->assertEquals($expected, $result);\n\n $this->expectException(FieldNotFoundException::class);\n\n $this->getQueryBuilderConnection()\n ->select()\n ->from('querybuilder_tests')\n ->where('id', '<', 2)\n ->getWithKey('asdf');\n }", "public function getConstraints();", "public function getQueryConstraint($constraint_type, $constraint_value) {\n\t\t\n\t\t$body = \"\";\n\t\tswitch($constraint_type) {\n\t\t\tcase \"dissolved_oxygen\":\n\t\t\tcase \"absolute_depth_beta\":\n\t\t\tcase \"specific_conductance\":\n\t\t\tcase \"depth_start\":\n\t\t\tcase \"depth_end\":\n\t\t\tcase \"fecal_coliform\":\n\t\t\tcase \"temperature\":\n\t\t\tcase \"conductivity\":\n\t\t\tcase \"dissolved_oxygen_2\":\n\t\t\tcase \"volume_filtered\":\n\t\t\tcase \"precipitation\":\n\t\t\tcase \"salinity\":\n\t\t\tcase \"id\":\n\t\t\t\t$bounds = explode(\"~\", $constraint_value);\n\t\t\t\t$lower_bound = trim($bounds[0]);\n\t\t\t\t$upper_bound = trim($bounds[1]);\n\t\t\t\t$body .= \"{ ?$constraint_type rdfs:label \\\"\" . $this->variable_to_label($constraint_type) . \"\\\"@en . ?dataset ?$constraint_type ?value_$constraint_type . } \";\n\t\t\t\tif(!empty($lower_bound))\n\t\t\t\t\t$body .= \"FILTER (?value_$constraint_type >= $lower_bound) . \";\n\t\t\t\tif(!empty($upper_bound))\n\t\t\t\t\t$body .= \"FILTER (?value_$constraint_type <= $upper_bound) . \";\n\t\t\t\tbreak;\n\t\t\tcase \"notes\":\n\t\t\tcase \"habitat\":\n\t\t\tcase \"redox_state\":\n\t\t\tcase \"sample type\":\n\t\t\tcase \"environmental_zone\":\n\t\t\tcase \"longhurst_long_name\":\n\t\t\t\t$body .= \"{ ?$constraint_type rdfs:label \\\"\" . $this->variable_to_label($constraint_type) . \"\\\"@en . ?dataset ?$constraint_type ?value_$constraint_type . \";\n\t\t\t\t$body .= \"FILTER (contains(lcase(?value_$constraint_type), \\\"\" . strtolower($constraint_value) . \"\\\")) . } \";\n\t\t\t\tbreak;\n\t\t\tcase \"longhurst_zone\":\n\t\t\tcase \"in_project\":\n\t\t\tcase \"IHO_area\":\n\t\t\t\t$body .= \"{ ?$constraint_type rdfs:label \\\"\" . $this->variable_to_label($constraint_type) . \"\\\"@en . ?dataset ?$constraint_type [rdfs:label ?value_$constraint_type] .\";\t\n\t\t\t\t$body .= \"FILTER (contains(lcase(?value_$constraint_type), \\\"\" . strtolower($constraint_value) . \"\\\")) . } \";\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t\treturn $body;\n\t}", "private function getUpdateableClause () {\n\t\t$where = new Where;\n\t\tforeach ($this->primaryKeys as $key) {\n\t\t\t$value = $this->retreive($key);\n\t\t\tif ($value){\n\t\t\t\t$where->equals($key, $this->retreive($key));\n\t\t\t} else {\n\t\t\t\tthrow new \\Exception(\"Primary key (\". $key .\") has no value!\");\n\t\t\t}\n\t\t}\n\n\t\treturn $where;\n\t}", "protected function constrain()\n {\n $other = $this->other_key();\n $foreign = $this->foreign_key();\n\n $this->set_select($foreign, $other)->set_join($other)->set_where($foreign);\n }", "function query() {}", "public function testSelectWithConditions(): void\n {\n $this->_insert();\n $result = $this->connection->selectQuery('id', 'ordered_uuid_items')\n ->where(['id' => '48298a29-81c0-4c26-a7fb-413140cf8569'], ['id' => 'ordered_uuid'])\n ->execute()\n ->fetchAll('assoc');\n\n $this->assertCount(1, $result);\n $this->assertSame('4c2681c048298a29a7fb413140cf8569', $result[0]['id']);\n }", "public function checkSubquerySupport();", "public function testConstrain()\n\t{\n\t\tR::nuke();\n\t\t\n\t\t$sql = 'CREATE TABLE book ( id INTEGER PRIMARY KEY AUTOINCREMENT ) ';\n\t\t\n\t\tR::exec( $sql );\n\t\t\n\t\t$sql = 'CREATE TABLE page ( id INTEGER PRIMARY KEY AUTOINCREMENT ) ';\n\t\t\n\t\tR::exec( $sql );\n\t\t\n\t\t$sql = 'CREATE TABLE book_page ( \n\t\t\tid INTEGER PRIMARY KEY AUTOINCREMENT,\n\t\t\tbook_id INTEGER,\n\t\t\tpage_id INTEGER\n\t\t) ';\n\t\t\n\t\tR::exec( $sql );\n\t\t\n\t\t$sql = 'PRAGMA foreign_key_list(\"book_page\")';\n\t\t\n\t\t$fkList = R::getAll( $sql );\n\t\t\n\t\tasrt( count( $fkList), 0 );\n\t\t\n\t\t$writer = R::getWriter();\n\t\t\n\t\t$writer->addConstraintForTypes( 'page', 'book' );\n\t\t\n\t\t$sql = 'PRAGMA foreign_key_list(\"book_page\")';\n\t\t\n\t\t$fkList = R::getAll( $sql );\n\t\t\n\t\tasrt( count( $fkList), 2 );\n\t\t\n\t\t$writer->addConstraintForTypes( 'page', 'book' );\n\t\t\n\t\t$sql = 'PRAGMA foreign_key_list(\"book_page\")';\n\t\t\n\t\t$fkList = R::getAll( $sql );\n\t\t\n\t\tasrt( count( $fkList), 2 );\n\t}" ]
[ "0.59067166", "0.5764477", "0.5764477", "0.57415676", "0.56804496", "0.55978674", "0.55978674", "0.54742604", "0.5468753", "0.5468753", "0.5449575", "0.53639686", "0.53639686", "0.5314218", "0.5289841", "0.5257484", "0.5255467", "0.52079266", "0.51794994", "0.51776475", "0.5145228", "0.5139671", "0.5139671", "0.5120114", "0.51062554", "0.51062554", "0.50732976", "0.5057704", "0.5050539", "0.503734", "0.5031599", "0.5017977", "0.5017849", "0.5009829", "0.4990958", "0.4990958", "0.49872127", "0.49781847", "0.4974405", "0.49648058", "0.49565873", "0.49565873", "0.49565873", "0.4955957", "0.4937989", "0.4937353", "0.4937353", "0.4935835", "0.49323848", "0.4915239", "0.48907512", "0.48873806", "0.48853764", "0.48510852", "0.4848834", "0.48470742", "0.48449206", "0.48444578", "0.48406875", "0.48384815", "0.48337755", "0.48171717", "0.48149943", "0.48149788", "0.48144716", "0.48136818", "0.48121306", "0.4805724", "0.48036608", "0.48035786", "0.47938907", "0.47938907", "0.47938907", "0.4783893", "0.47817153", "0.4772535", "0.47559986", "0.4750129", "0.47320265", "0.4725664", "0.4725034", "0.47187516", "0.47101545", "0.47099176", "0.47069114", "0.47069114", "0.47069114", "0.47041157", "0.470276", "0.46885574", "0.4686389", "0.4679575", "0.4672971", "0.46630982", "0.46592495", "0.46428874", "0.463412", "0.46282536", "0.46281397", "0.46232218", "0.4619458" ]
0.0
-1
Demonstrate insertion with the QueryBuilder
public function getEx2() { // Use the QueryBuilder to insert a new row into the books table // i.e. create a new book \DB::table('books')->insert([ 'created_at' => \Carbon\Carbon::now()->toDateTimeString(), 'updated_at' => \Carbon\Carbon::now()->toDateTimeString(), 'title' => 'The Great Gatsby', 'author' => 'F. Scott Fitzgerald', 'published' => 1925, 'cover' => 'http://img2.imagesbn.com/p/9780743273565_p0_v4_s114x166.JPG', 'purchase_link' => 'http://www.barnesandnoble.com/w/the-great-gatsby-francis-scott-fitzgerald/1116668135?ean=9780743273565', ]); return 'Added book.'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "#[@test]\n public function insertViaQuery() {\n $this->createTable();\n $this->assertTrue($this->db()->query('insert into unittest values (1, \"kiesel\")'));\n }", "public function testInsert()\n {\n $statement = $this->getQueryBuilderConnection()\n ->insert()\n ->into('querybuilder_tests')\n ->values(\n [\n 'id' => 10,\n 'languageId' => 1,\n 'field' => 'zzzz',\n ]\n )->execute();\n\n $this->assertInstanceOf(\\PDOStatement::class, $statement);\n $this->assertEquals(1, $statement->rowCount());\n\n $result = $this->getQueryBuilderConnection()\n ->select('count(1) as counter')\n ->from('querybuilder_tests')\n ->getOneField('counter');\n\n $this->assertEquals(11, $result);\n\n $statement = $this->getQueryBuilderConnection()\n ->insert(\n [\n 'id' => 11,\n 'languageId' => 1,\n 'field' => 'yyyy',\n ]\n )\n ->into('querybuilder_tests')\n ->execute();\n\n $this->assertInstanceOf(\\PDOStatement::class, $statement);\n $this->assertEquals(1, $statement->rowCount());\n\n $result = $this->getQueryBuilderConnection()\n ->select('count(1) as counter')\n ->from('querybuilder_tests')\n ->getOneField('counter');\n\n $this->assertEquals(12, $result);\n }", "public function insert($query, $bindings = []);", "public function insert($query, $bindings = []);", "public function testQueryBuilder()\n {\n $table = new \\Phinx\\Db\\Table('table1', [], $this->adapter);\n $table->addColumn('string_col', 'string')\n ->addColumn('int_col', 'integer')\n ->save();\n\n $builder = $this->adapter->getQueryBuilder();\n $stm = $builder\n ->insert(['string_col', 'int_col'])\n ->into('table1')\n ->values(['string_col' => 'value1', 'int_col' => 1])\n ->values(['string_col' => 'value2', 'int_col' => 2])\n ->execute();\n\n $this->assertEquals(2, $stm->rowCount());\n\n $builder = $this->adapter->getQueryBuilder();\n $stm = $builder\n ->select('*')\n ->from('table1')\n ->where(['int_col >=' => 2])\n ->execute();\n\n $this->assertEquals(1, $stm->rowCount());\n $this->assertEquals(\n ['id' => 2, 'string_col' => 'value2', 'int_col' => '2'],\n $stm->fetch('assoc')\n );\n\n $builder = $this->adapter->getQueryBuilder();\n $stm = $builder\n ->delete('table1')\n ->where(['int_col <' => 2])\n ->execute();\n\n $this->assertEquals(1, $stm->rowCount());\n }", "public function insert()\n {\n return new QueryProxy('insert', $this);\n }", "public function insert() {\n \n }", "public function testMultipleInserts()\n {\n $statement = $this->getQueryBuilderConnection()\n ->insert()\n ->into('querybuilder_tests')\n ->values(\n [\n [\n 'id' => 10,\n 'languageId' => 1,\n 'field' => 'mult1',\n ],\n [\n 'id' => 11,\n 'languageId' => 1,\n 'field' => 'mult2',\n ],\n ]\n )\n ->execute();\n\n $this->assertInstanceOf(\\PDOStatement::class, $statement);\n $this->assertEquals(2, $statement->rowCount());\n\n $result = $this->getQueryBuilderConnection()\n ->select('count(1) as counter')\n ->from('querybuilder_tests')\n ->getOneField('counter');\n\n $this->assertEquals(12, $result);\n }", "public function insert()\n {\n \n }", "public function createQuery() {}", "public function createQuery() {}", "public function createQuery() {}", "public function createQuery() {}", "public function insert()\n {\n # code...\n }", "public function insert()\n {\n }", "public function insert()\n {\n }", "public static function insert()\n {\n }", "public function testInsertWithSelectStatement()\n {\n $this->db->insert(\"test\", \"SELECT id FROM settings\");\n $this->assertEquals(\"INSERT INTO test SELECT id FROM settings\", (string) $this->db);\n }", "private function insert()\n {\n $this->query = $this->pdo->prepare(\n 'INSERT INTO ' . $this->table . ' (' .\n implode(', ', array_keys($this->data)) .\n ' ) VALUES (:' .\n implode(', :', array_keys($this->data)) .\n ')'\n );\n }", "public function insert(){\n\n }", "public function testInsert()\n {\n // todo create this in other database or maybe create mockup\n \n /*\n $arr = array (\n 'head' => 'Hello World!!',\n 'body' => 'Hello this is my world..',\n 'created' => date('Y-m-d H:i:s')\n );\n\n $this->noteTable->insert($arr);\n */\n }", "public function addNewInsertQuery(){\r\n $query = new SQLInsertQuery();\r\n $this->add($query);\r\n return $query;\r\n }", "public function insert($query) {\n $query = \"\n insert into `user`(`name`,`age`) values('a',20),('b',18),('c',19);\n \";\n $this->db->query($query);\n }", "function test_insert($urabe, $body)\n{\n $insert_params = $body->insert_params;\n if ($body->driver == \"PG\")\n $table_name = $body->schema . \".\" . $body->table_name;\n else\n $table_name = $body->table_name;\n return $urabe->insert($table_name, $insert_params);\n}", "public static function Insert(){\r\n }", "function create($insert)\n{\n connect()->query($insert);\n}", "public function insert($data);", "public function Do_insert_Example1(){\n\n\t}", "public function testInsert(): void\n {\n $this->_insert();\n $query = $this->connection->selectQuery('id', 'ordered_uuid_items')\n ->orderBy('id')\n ->setDefaultTypes(['id' => 'ordered_uuid']);\n\n $query->setSelectTypeMap($query->getTypeMap());\n $results = $query->execute()->fetchAll('assoc');\n\n $this->assertEquals(new UuidValue('419a8da0482b7756b21f27da40cf8569'), $results[0]['id']);\n $this->assertEquals(new UuidValue('43e0b920481fc6d0a40d6d1740cf8569'), $results[1]['id']);\n $this->assertEquals(new UuidValue('4c2681c048298a29a7fb413140cf8569'), $results[2]['id']);\n }", "public function insert() {\r\n\t\t$this->getMapper()->insert($this);\r\n\t}", "public function testInsert()\n {\n $this->assertDatabaseCount(\"animals\", 100000);\n }", "public function testInsertStmt()\n {\n $insert = $this->getConnection()\n ->insert()\n ('dummy_posts')\n (['blog_id', 'blog_title'])\n ([':id', ':title']);\n return $this->assertEquals($insert, \"INSERT INTO dummy_posts(blog_id, blog_title) VALUES (:id, :title)\");\n }", "public function insert(...$field_values);", "public function create() {\n\t\t$columns = implode(', ', array_keys($this->params));\n\t\t$bindings = substr(str_repeat(', ?', count($this->params)), 2);\n\t\t$sql = 'INSERT INTO ' . static::$table . ' (' . $columns . ') VALUES (' . $bindings . ');';\n\t\t$query = DBH()->prepare($sql);\n\t\t$query->execute(array_values($this->params));\n\t}", "public abstract function insert();", "public function testInserting() {\n $this->getConnection()->getConnection()->exec(\"INSERT INTO `owners` (`name`, `email`) VALUES ('Donald Trump', '[email protected]');\");\n }", "public function createInsertSql(): \\Hx\\Db\\Sql\\InsertInterface;", "protected function _insert()\n {\n \t$metadata = $this->_table->info(Zend_Db_Table_Abstract::METADATA);\n \t\n \tif(isset($metadata['created_at']))\n\t\t\t$this->_data['created_at'] = new Zend_Date ();\n \tif(isset($metadata['updated_at']))\n\t\t\t$this->_data['updated_at'] = new Zend_Date ();\n }", "function insert($query, $param_type, $param_value_array) {\n $sql = $this->connection->prepare($query);\n $this->bindQueryParams($sql, $param_type, $param_value_array);\n $sql->execute();\n $insertId = $sql->insert_id;\n return $insertId;\n }", "function createQuery() ;", "protected function _insert()\n {\n \n }", "protected function _insert()\n {\n \n }", "public function testEInsert()\n {\n $this->db->extendedInsert(\"test\", [\n 'id',\n 'name'\n ], [\n [\n 1,\n 'Ed'\n ],\n [\n 2,\n 'Frank'\n ]\n ]);\n $this->assertEquals(\"INSERT INTO test (`id`,`name`) VALUES ('1','Ed'),('2','Frank')\", (string) $this->db);\n }", "function insertTest()\n {\n $this->cD->insertElement(new Product(1, \"Trang\"));\n $this->cD->insertElement(new Product(1, \"Trang\"));\n $this->cD->insertElement(new Product(1, \"Trang\"));\n }", "function insert($sql){\n\n\t\tglobal $way;\n\t\t$way -> query($sql);\n\n\t}", "public function insert(array $params);", "public function testSelectStatementAddTable()\n {\n\n $query = new Query(\"SELECT id, description FROM `test` WHERE xy > 10\", 'mysql');\n $query->from(\"abc\", Query::APPEND);\n $this->assertEquals(\"SELECT id, description FROM `test` , `abc` WHERE xy > 10\", (string)$query);\n }", "public static function INSERT()\n {\n return new Streamwide_PHPUnit_Extensions_Database_Operation_Insert();\n }", "abstract public function insert();", "public function testInsertWithOneElementArrayParameter()\n {\n $this->db->insert(\"test\", [\n 'id' => 1\n ]);\n $this->assertEquals(\"INSERT INTO test (`id`) VALUES ('1')\", (string) $this->db);\n }", "public function insert()\n {\n $db = new Database();\n $db->insert(\n \"INSERT INTO position (poste) VALUES ( ? )\",\n [$this->poste]\n );\n }", "public function addToInsertSQLArray();", "public function insert()\n {\n if(empty($this->attributes)){\n return;\n }\n if ($this->isAutoInc) {\n $columlList = \" (\";\n $valuelList = \" (\";\n foreach ($this->attributes as $column => $value) {\n $columlList .= $column . \", \";\n $valuelList .= \":\".$column . \", \";\n }\n $columlList = str_last_replace(\", \", \")\", $columlList);\n $valuelList = str_last_replace(\", \", \")\", $valuelList);\n $sqlQuery = \"INSERT INTO \" . $this->table . $columlList . \" VALUES\" . $valuelList;\n\n Db::instance()->execute($sqlQuery,$this->attributes);\n #println($sqlQuery, \"blue\");\n }\n }", "public abstract function Insert();", "public function newQuery();", "public function insert()\n\t{\n\t\treturn $this->getModel()->insert($this);\n\t}", "public function insert() {\n\t\t\t\n\t\t\t$insert_array = $this->buildInsertFields();\n\t\t\t$query = \"INSERT INTO \" . $this->table_name . \" (\" . $insert_array['insert_statement'] . \") VALUES (\" . \n\t\t\t\t\t\t\t\t\t$insert_array['values_statement'] . \")\";\n\t\t\treturn $this->query($query, $insert_array['bind_params']);\n\n\t\t}", "public function addInsert() {\n if(count($this->cols) != 0) {\n // Only use the parameters that match with columns\n $params = array_slice($this->params, 0, count($this->cols));\n $this->sql .= \" (\" . implode(\", \", $this->cols) . \")\";\n $this->sql .= \" VALUES (\" . implode(\", \", $this->params) . \")\";\n }\n }", "public function createQuery($data);", "public static function insert($query, $bindings = [])\n {\n }", "public function queryInsert($table, $data) : bool;", "function addQuery() {}", "public function insert(){\n\t\t// $post->title = 'A post from the insert method';\n\t\t// $post->body = 'Some random ghibberrish';\n\t\t// $post->save();\n\n\t\t$data = array(\n\t\t\t'title' => 'A post from the insert method, using the data array',\n\t\t\t'body' => 'Some random ghibberrish, using the data array',\n\t\t\t'user_id' => 1\n\t\t);\n\n\t\tPost::create($data);\n\n\t\tdd('post inserted');\n\t}", "public function insertSql()\n {\n $sql = \"INSERT INTO \" . $this->dbName . '.' . $this->table\n . \" (\" . implode($this->fields, \", \") . \")\n VALUES (:\" . implode($this->fields, \", :\") . \");\";\n\n $this->query = $sql;\n }", "public function insertDatabase();", "public function inserir()\n {\n }", "public function create_query($data){\n\n return $this->db->insert('consulta', $data);\n\n }", "public function insert(array $options);", "public function testInsertWithTwoElementArrayParameter()\n {\n $this->db->insert(\"test\", [\n 'id' => 1,\n 'name' => 'Ed'\n ], true);\n $this->assertEquals(\"INSERT IGNORE INTO test (`id`,`name`) VALUES ('1','Ed')\", (string) $this->db);\n }", "abstract public function newQuery();", "abstract public function insert(string $table, array $row, array $options = []);", "public function insert($connection, $table, $rows);", "public function query(): QueryBuilder;", "public function queryBuilder();", "public function queryBuilder();", "protected function insert()\n\t{\n\t\t$this->autofill();\n\n\t\tparent::insert();\n\n\t}", "function test_insert_bulk($urabe, $body)\n{\n $bulk = $body->insert_bulk;\n if ($body->driver == \"PG\")\n $table_name = $body->schema . \".\" . $body->table_name;\n else\n $table_name = $body->table_name;\n return $urabe->insert_bulk($table_name, $bulk->columns, $bulk->values);\n}", "public function testOnDatabaseWithoutWhere()\n {\n $q = new ezcQueryInsert( ezcDbInstance::get() );\n // insert some data we can update\n $q->insertInto( 'query_test' )\n ->set( 'id', 1 )\n ->set( 'company', $q->bindValue( 'eZ systems' ) )\n ->set( 'section', $q->bindValue( 'Norway' ) )\n ->set( 'employees', 20 );\n $stmt = $q->prepare();\n $stmt->execute();\n\n $this->q->update( 'query_test' )\n ->set( 'employees', 50 );\n $stmt = $this->q->prepare();\n $stmt->execute();\n\n // check that it was actually correctly updated\n $db = ezcDbInstance::get();\n $q = $db->createSelectQuery(); // get select query\n $q->select( '*' )->from( 'query_test' )\n ->where( $q->expr->eq( 'id', 1 ) );\n $stmt = $q->prepare();\n $stmt->execute();\n $result = $stmt->fetchAll();\n $this->assertEquals( 50, (int)$result[0][3] );\n }", "public function add(){\n $tab = DB::table('student');\n $res = $tab -> insert(['name' => '小黑', 'age' => '18']);\n }", "protected function _insert()\n\t{\n\t}", "protected function insert() {\n $dbh = $this->getDbh();\n $table = $this->tableName;\n $data = [];\n\n foreach ($this->fillable as $key => $value) {\n $data[$key] = $this->$key;\n }\n\n $query = 'INSERT INTO `' . $table . '` VALUES (NULL,';\n $first = true;\n foreach ($data AS $k => $value) {\n if (!$first)\n $query .= ', ';\n else\n $first = false;\n $query .= ':'.$k;\n }\n $query .= ')';\n\n $msc = microtime(true);\n\n $sth = $dbh->prepare($query);\n $sth->execute($data);\n\n $msc = microtime(true) - $msc;\n $line = \"insert() => \" . $query . \" with \" . implode(\"', '\", $data);\n $this->writeRequestLog($line, $msc);\n\n return true;\n }", "public function insert()\n {\n $sql = 'INSERT INTO '.$this->_data['from'].' ';\n switch (func_num_args()) {\n case 0:\n break;\n case 1:\n break;\n case 2:\n $sql .= '('.func_get_arg(0).') VALUES('.func_get_arg(1).')';\n break;\n }\n $this->_data['query'] = $sql;\n return $this;\n }", "public function testInsertSaftRegressionTest2()\n {\n $res = $this->fixture->query('INSERT INTO <http://localhost/Saft/TestGraph/> {<http://foo/1> <http://foo/2> <http://foo/3> . }');\n\n $res1 = $this->fixture->query('SELECT * FROM <http://localhost/Saft/TestGraph/> WHERE {?s ?p ?o.}');\n $this->assertEquals(1, count($res1['result']['rows']));\n\n $res2 = $this->fixture->query('SELECT * WHERE {?s ?p ?o.}');\n $this->assertEquals(1, count($res2['result']['rows']));\n\n $res2 = $this->fixture->query('SELECT ?s ?p ?o WHERE {?s ?p ?o.}');\n $this->assertEquals(1, count($res2['result']['rows']));\n }", "public function insertTest()\n {\n $this->assertEquals(true, $this->object->insert('Ali','Khan',22,'A'));\n }", "public function insert(){\n $sql = \"INSERT INTO author(\n name,\n job,\n created_at\n )\n VALUES(\n 'tgedf', 'sdvsdv', NOW())\";\n return $this->pdo->exec($sql);\n\n }", "public function insert($table);", "public function createQuery(): string\n {\n return 'INSERT INTO products(name,quantity,price,msrp) \n VALUES(:name,:quantity,:price,:msrp)';\n }", "public function testInsertSqlIsProperlyPrepared()\n {\n $batch_insert = $this->connection->batchInsert('writers', ['name', 'birthday']);\n\n $property = (new \\ReflectionClass(BatchInsert::class))->getProperty('sql_foundation');\n $property->setAccessible(true);\n\n $sql_foundation = $property->getValue($batch_insert);\n\n $this->assertEquals('INSERT INTO `writers` (`name`, `birthday`) VALUES ', $sql_foundation);\n }", "function create(){\n //\n //create the insert \n $insert = new insert($this);\n //\n //Execute the the insert\n $insert->query($this->entity->get_parent());\n }", "public function insert(array $data);", "public function insert(array $data);", "public function insert(){\n $bd = Database::getInstance();\n $bd->query(\"INSERT INTO canciones(artista, ncancion, idGen, album) VALUES (:art, :nca, :gen, :alb);\",\n [\":art\"=>$this->artista,\n \":gen\"=>$this->idGen,\n \":alb\"=>$this->album,\n \":nca\"=>$this->ncancion]);\n }", "public function run()\n {\n DB::table('users_entities')->insert([\n \t[\n 'id' => 1,\n \t\t'entity' => 'Teacher',\n \t\t'shortcut' => 'TCHR'\n \t],\n \t[\n 'id' => 2,\n \t\t'entity' => 'Student',\n \t\t'shortcut' => 'STDNT'\n \t]\n ]);\n }", "public function testInsertSaftRegressionTest3()\n {\n $this->fixture->query(\n 'INSERT INTO <http://localhost/Saft/TestGraph/> {<http://localhost/Saft/TestGraph/> <http://localhost/Saft/TestGraph/> <http://localhost/Saft/TestGraph/> . }'\n );\n $this->fixture->query(\n 'INSERT INTO <http://second-graph/> {<http://second-graph/0> <http://second-graph/1> <http://second-graph/2> . }'\n );\n $this->fixture->query(\n 'DELETE FROM <http://localhost/Saft/TestGraph/>'\n );\n\n $res = $this->fixture->query('SELECT * FROM <http://second-graph/> WHERE {?s ?p ?o.}');\n $this->assertEquals(1, count($res['result']['rows']));\n }", "public function run() {\n\t\t\\DB::statement(\" INSERT INTO efectores.tipo_efector(id_tipo_efector,sigla,descripcion)\n(\n\tSELECT *\n\tFROM dblink('dbname=sirge host=192.6.0.118 user=postgres password=PN2012\\$',\n\t 'SELECT id_tipo_efector,sigla,descripcion\n\t\t FROM efectores.tipo_efector')\n\t AS migracion(id_tipo_efector integer,\n sigla character varying(4),\n descripcion character varying(50))\n);\");\n\t}", "public function createNewPost()\r\n{\r\n $query_string = \"INSERT INTO posts \";\r\n $query_string .= \"SET \";\r\n $query_string .= \"postsubject = :postsubject, \";\r\n $query_string .= \"postcategory = :postcategory, \";\r\n $query_string .= \"postauthor = :postauthor\";\r\n\r\n return $query_string;\r\n}", "public function testInsertExisting()\r\n\t{\r\n\t\t$index = Index::model()->findByAttributes(array(\r\n\t\t\t'INDEX_NAME' => 'index',\r\n\t\t\t'TABLE_NAME' => 'table2',\r\n\t\t\t'TABLE_SCHEMA' => 'indextest',\r\n\t\t));\r\n\t\t$index->insert();\r\n\t}", "public function createRecord()\n {\n $sql = sprintf(\n \"INSERT INTO %s (%s) values (%s)\", \"Cubans\",\n implode(\", \", array_keys($this->arrayKeysValues())),\n \":\" . implode(\", :\", array_keys($this->arrayKeysValues()))\n );\n $statement = $this->connect->prepare($sql);\n\t\t$statement->execute($this->arrayKeysValues());\n }", "public function insert($table, array $data);", "public function insert($data)\r\n {\r\n \r\n }", "function insert()\n\t{\n\t\t$this->edit(true);\n\t}" ]
[ "0.7350047", "0.70593166", "0.66983706", "0.66983706", "0.6692008", "0.66109985", "0.64114356", "0.6372773", "0.63391656", "0.633321", "0.633321", "0.633321", "0.6332099", "0.63264275", "0.6308819", "0.6308819", "0.6260642", "0.6215942", "0.6197891", "0.6171348", "0.6168854", "0.6139558", "0.61175877", "0.6115817", "0.6115628", "0.6100122", "0.6099133", "0.6097534", "0.60963887", "0.6070826", "0.6061147", "0.6055525", "0.60423374", "0.60231286", "0.6013051", "0.60033464", "0.59911674", "0.59831476", "0.59812677", "0.5975681", "0.5965234", "0.5965234", "0.59616584", "0.5955157", "0.5949758", "0.5946282", "0.5945778", "0.5934795", "0.59285265", "0.59101766", "0.5869484", "0.5863673", "0.5862032", "0.5846881", "0.5846566", "0.584515", "0.5836972", "0.5835908", "0.58320785", "0.5830512", "0.58072126", "0.5803052", "0.5796429", "0.5794053", "0.5792361", "0.5790735", "0.57658446", "0.57364464", "0.5727569", "0.5725972", "0.5725871", "0.5701739", "0.56944174", "0.56939733", "0.56939733", "0.5691224", "0.56880724", "0.5683913", "0.5679134", "0.56754756", "0.5658057", "0.5656926", "0.56509423", "0.5648004", "0.5626361", "0.562583", "0.5622108", "0.56220275", "0.56166923", "0.5616288", "0.5616288", "0.5613848", "0.5608347", "0.5606735", "0.5604698", "0.55939317", "0.5587961", "0.55872595", "0.55837905", "0.5582816", "0.55823463" ]
0.0
-1
Demonstrate reading with the QueryBuilder
public function getEx1() { # Use the QueryBuilder to get all the books $books = \DB::table('books')->get(); $this->printBooks($books); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function queryBuilder();", "public function queryBuilder();", "public function read()\n {\n $query = $this->queryBuilder->new($this->entityName)\n ->select()\n ->get();\n\n return $this->executeQueryForMultipleResults($query);\n }", "public function read(phpDataMapper_Query $query);", "public function query(): QueryBuilder;", "public static function query();", "public function query() {\n\t\treturn Documents::instance()->query();\n\t}", "public function getQueryBuilder();", "public function getQueryBuilder();", "public function query();", "public function query();", "public function query();", "abstract public function query();", "public static function query()\n {\n }", "function query() {}", "function readQuery($query) {\n if (gettype($query) === \"string\") {\n return parent::query($query);\n }\n }", "function readQuery() {\n\t\t$this->FiscaalGroepID = $this->queryHelper(\"FiscaalGroepID\", 0);\n\t\t$this->FiscaalGroupType = $this->queryHelper(\"FiscaalGroupType\", 0);\n\t\t$this->GewijzigdDoor = $this->queryHelper(\"GewijzigdDoor\", 0);\n\t\t$this->GewijzigdOp = $this->queryHelper(\"GewijzigdOp\", \"\");\n\t}", "public abstract function get_query();", "public function readAllQuery(): string\n {\n return 'SELECT * FROM products';\n }", "public function Read($query, $assoc = true);", "public function toQuery();", "public function read($query, array $options = [])\n {\n }", "public function _query()\n {\n }", "public function createQuery() {}", "public function createQuery() {}", "public function createQuery() {}", "function query() {\n }", "public function createQuery() {}", "public function Query() {\n \n }", "public static function query()\n {\n QueryBuilder::$dataSource = true;\n\n return new QueryBuilder();\n }", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function query()\n {\n }", "public function query()\n {\n }", "public function read(){\n $query = \"SELECT ordine.id_ordine, ordine.id_fornitore, fornitore.nome as fornitore, ordine.articolo, articolo.taglia, ordine.stato \n FROM \" . $this->table_name . \" LEFT JOIN fornitore ON ordine.id_fornitore = fornitore.id_fornitore INNER JOIN articolo ON ordine.id_ordine = articolo.id_ordine\";\n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n return $stmt;\n }", "public function query() {\n // Leave empty to avoid a query on this field.\n }", "public function query() {\n\n }", "public function getQueryBuilder(): SQLQueryBuilder;", "public function getFromDB() {}", "public function query()\n {\n $query = Fieldagent::query()->select($this->getColumns());\n\n return $this->applyScopes($query);\n }", "public function read($query = array(), $options = array()) {\n\t\treturn $this->get();\n\t}", "public function testQueryBuilder()\n {\n $table = new \\Phinx\\Db\\Table('table1', [], $this->adapter);\n $table->addColumn('string_col', 'string')\n ->addColumn('int_col', 'integer')\n ->save();\n\n $builder = $this->adapter->getQueryBuilder();\n $stm = $builder\n ->insert(['string_col', 'int_col'])\n ->into('table1')\n ->values(['string_col' => 'value1', 'int_col' => 1])\n ->values(['string_col' => 'value2', 'int_col' => 2])\n ->execute();\n\n $this->assertEquals(2, $stm->rowCount());\n\n $builder = $this->adapter->getQueryBuilder();\n $stm = $builder\n ->select('*')\n ->from('table1')\n ->where(['int_col >=' => 2])\n ->execute();\n\n $this->assertEquals(1, $stm->rowCount());\n $this->assertEquals(\n ['id' => 2, 'string_col' => 'value2', 'int_col' => '2'],\n $stm->fetch('assoc')\n );\n\n $builder = $this->adapter->getQueryBuilder();\n $stm = $builder\n ->delete('table1')\n ->where(['int_col <' => 2])\n ->execute();\n\n $this->assertEquals(1, $stm->rowCount());\n }", "function createQuery() ;", "public function query()\n\t{\n\t\t\n\t}", "public function query()\n {\n return (new Query($this))->entity($this->getEntityName());\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function readByKeyQuery(): string\n {\n return 'SELECT * FROM products WHERE id = :id';\n }", "public function query(): QueryInterface;", "public function read($query, array $options = [])\n\t{\n\t\t$defaults = [\n\t\t\t'return' => is_string($query) ? 'array' : 'item',\n\t\t\t'schema' => null,\n\t\t\t'quotes' => $this->_quotes\n\t\t];\n\t\t$options += $defaults;\n\n\t\treturn $this->_filter(__METHOD__,\n\t\t\t\t\t\t\t compact('query', 'options'),\n\t\t\tfunction ($self, $params) {\n\t\t\t\t$query = $params['query'];\n\t\t\t\t$args = $params['options'];\n\t\t\t\t$return = $args['return'];\n\t\t\t\tunset($args['return']);\n\n\t\t\t\t$model = is_object($query) ? $query->model() : null;\n\n\t\t\t\tif (is_string($query)) {\n\t\t\t\t\t$sql = String::insert($query, $self->value($args));\n\t\t\t\t} else {\n\t\t\t\t\tif (!$data = $self->invokeMethod('_queryExport', [$query])) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\t$sql = $self->renderCommand($data['type'], $data);\n\t\t\t\t}\n\t\t\t\t$result = $self->invokeMethod('_execute', [$sql]);\n\n\t\t\t\tswitch ($return) {\n\t\t\t\t\tcase 'resource':\n\t\t\t\t\t\treturn $result;\n\t\t\t\t\tcase 'array':\n\t\t\t\t\t\t$columns = $args['schema'] ? : $self->schema($query, $result);\n\n\t\t\t\t\t\tif (!is_array(reset($columns))) {\n\t\t\t\t\t\t\t$columns = ['' => $columns];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$i = 0;\n\t\t\t\t\t\t$records = [];\n\t\t\t\t\t\tforeach ($result as $data) {\n\t\t\t\t\t\t\t$offset = 0;\n\t\t\t\t\t\t\t$records[$i] = [];\n\t\t\t\t\t\t\tforeach ($columns as $path => $cols) {\n\t\t\t\t\t\t\t\t$len = count($cols);\n\t\t\t\t\t\t\t\t$values = array_combine($cols, array_slice($data, $offset, $len));\n\t\t\t\t\t\t\t\tif ($path) {\n\t\t\t\t\t\t\t\t\t$records[$i][$path] = $values;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$records[$i] += $values;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$offset += $len;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn Set::expand($records);\n\t\t\t\t\tcase 'item':\n\t\t\t\t\t\treturn $model::create([],\n\t\t\t\t\t\t\t\t\t\t\t compact('query', 'result') + [\n\t\t\t\t\t\t\t\t\t\t\t\t 'class' => 'set', 'defaults' => false\n\t\t\t\t\t\t\t\t\t\t\t ]);\n\t\t\t\t}\n\t\t\t});\n\t}", "public function read(string $query)\n {\n $res = $this->query($query);\n return (!$res) ? $res : $res->fetch_all(MYSQLI_ASSOC);\n }", "public function getQueryDataProvider() {}", "function query() {\n // Do nothing: fake field.\n }", "public function testQueryFetchDefault() {\n $records = [];\n $result = $this->connection->query('SELECT [name] FROM {test} WHERE [age] = :age', [':age' => 25]);\n $this->assertInstanceOf(StatementInterface::class, $result);\n foreach ($result as $record) {\n $records[] = $record;\n $this->assertIsObject($record);\n $this->assertSame('John', $record->name);\n }\n\n $this->assertCount(1, $records, 'There is only one record.');\n }", "public function get(){\n\n if(is_null($this->columns)) $this->columns = ['*'];\n $select_statement = $this->grammer->compileSelect($this);\n \n \n $result = $this->connection->get($select_statement); \n \n if(!empty($this->model)){\n \n return $this->return_results_objects($result);\n\n }else{\n \n return $this->return_result_as_array($result);\n }\n \n }", "public function getQuery(Builder $query);", "public function getListQuery();", "function get_data()\n\t{\n\t\t$query = $this->db->get(\"Testing\");\n\n\t\treturn $query;\n\t}", "public function From(IQueryable $Query);", "abstract public function getRow($query);", "public abstract function getQuery();", "private function query() {\n return ApplicationSql::query($this->_select, $this->_table, $this->_join, $this->_where, $this->_order, $this->_group, $this->_limit, $this->_offset);\n }", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getQuery();" ]
[ "0.6806512", "0.6806512", "0.6693228", "0.66869026", "0.6617617", "0.6509708", "0.6457566", "0.6446555", "0.6446555", "0.6419076", "0.6419076", "0.6419076", "0.6375953", "0.6352171", "0.63242614", "0.62856424", "0.628453", "0.6251405", "0.6234616", "0.6190713", "0.6138316", "0.61176795", "0.6106057", "0.6084179", "0.6084179", "0.6084179", "0.6083082", "0.608221", "0.6036513", "0.6016404", "0.59433", "0.59433", "0.59433", "0.59433", "0.59433", "0.59433", "0.59433", "0.59433", "0.59433", "0.59433", "0.59433", "0.59433", "0.59433", "0.59433", "0.59433", "0.59433", "0.59433", "0.59433", "0.59433", "0.59433", "0.59433", "0.59433", "0.59433", "0.59433", "0.59433", "0.592834", "0.592834", "0.5910839", "0.59058714", "0.58990586", "0.58968973", "0.5888715", "0.58669233", "0.58450776", "0.5840399", "0.5838892", "0.58322436", "0.5801032", "0.5795316", "0.5795316", "0.5795316", "0.5795316", "0.5795316", "0.5795316", "0.5795316", "0.5795316", "0.5795316", "0.5764273", "0.5763747", "0.5762789", "0.5741364", "0.57259184", "0.5714854", "0.5710817", "0.5696825", "0.5691948", "0.56847", "0.56606317", "0.56570065", "0.56569606", "0.56488496", "0.5647361", "0.5646323", "0.5646323", "0.5646323", "0.5646323", "0.5646323", "0.5646323", "0.5646323", "0.5646323", "0.5646323" ]
0.0
-1
Makes sure that before the user can access the functions below, they'll need to be authorised
public function __construct() { $this->middleware('auth'); $this->middleware('role:admin'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function checkAccess()\n {\n // need to be modified for security\n }", "function require_permission($required)\n{\n require_login();\n\n // owners have full access\n if ($_SESSION['permission'] == OWN) {\n return;\n }\n\n if ($required != $_SESSION['permission']) {\n redirect_to(url_for(\"/index.php\"));\n }\n}", "abstract public function require_access();", "abstract public function authorize();", "abstract public function authorize();", "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 checkAccess() {}", "public function checkAccess() {}", "public function checkAccess() {}", "public function checkAccess() {}", "public function checkAccess() {}", "public function checkAccess() {}", "public function checkAccess() {}", "public function checkAccess() {}", "function checkAccess() ;", "function doAuthorizationChecks() \n\t{\n\t\tif (API_Operation::$docs_mode)\n\t\t\treturn API_Operation::$docs_mode->addOperationNote(\"This operation does not require the user to be authenticated.\");\n\t}", "function doAuthorizationChecks() \n\t{\n\t\tif (API_Operation::$docs_mode)\n\t\t\treturn API_Operation::$docs_mode->addOperationNote(\"This operation does not require the user to be authenticated.\");\n\t}", "public function authorize()\n\t{\n\t\treturn true; //no user checking\n\t}", "public function authorize()\n {\n // User system not implemented\n return true;\n }", "public function authorize() {\n\t\treturn false;\n }", "protected function _isAllowed()\n {\n \treturn true;\n }", "public function authorize();", "public function authorize();", "public function authorize()\t{\n\t\treturn true;\n\t}", "function checkPermissions() {\r\n if (!is_super_admin()) {\r\n if ( function_exists('current_user_can') && !current_user_can('manage_wpsct_support_tickets') ) {\r\n wp_die(__('Unable to Authenticate', 'wpsc-support-tickets'));\r\n } \r\n }\r\n }", "public function authorize()\n {\n //return false;\n\t\treturn true;\n }", "public function authorize()\n {\n //return false;\n\t\treturn true;\n }", "public function authorize()\n {\n //return false;\n\t\treturn true;\n }", "protected abstract function onAuthorizeMissingOwner(): Effect|Response;", "private function metodo_privado() {\n }", "public function authorize ()\n\t{\n\t\treturn true;\n\t}", "public function authorize ()\n\t{\n\t\treturn true;\n\t}", "public function authorize()\n {\n return true; //admin guard\n }", "public function authorize()\n {\n //return false; //return False will stop everything\n\t\treturn true;\n }", "public function authorize() {\n\t\t$this->workplace = $this->route('workplace');\n\t\treturn $this->user()->can('create', WorkFunction::class) && $this->user()->can('update', $this->workplace);\n\t}", "public function authorize()\n {\n return true; // TODO : edit it with roles\n }", "function allow_user_privileges() {\n\tif(!$_SESSION['role']):\n\t\theader('Location: ?q=start');\n\tendif;\n}", "public function authorize()\n {\n return is_client_or_staff();\n }", "public function authorize()\n\t{\n\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}", "public function authorize()\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}", "public function authorize()\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}", "public function authorize()\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}", "public function authorize()\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}", "public function authorize()\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}", "public function authorize()\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}", "public function authorize()\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}", "public function authorize()\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}", "public function authorize()\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}", "public function authorize()\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}", "public function authorize()\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}", "public function authorize()\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}", "public function authorize()\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}", "public function authorize()\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}", "public function authorize()\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}", "public function authorize()\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}", "public function authorize()\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}", "public function authorize()\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}", "public function authorize()\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}", "public function authorize()\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}" ]
[ "0.73193437", "0.7211918", "0.7152192", "0.7127176", "0.7127176", "0.7026352", "0.70066243", "0.70066243", "0.70066243", "0.700627", "0.700627", "0.70049953", "0.70049953", "0.70049953", "0.6995187", "0.6983926", "0.6983926", "0.69509435", "0.68916076", "0.6881515", "0.68340504", "0.6813019", "0.6813019", "0.6807914", "0.6801298", "0.6786447", "0.6786447", "0.6786447", "0.6769807", "0.6769403", "0.67438036", "0.67438036", "0.673878", "0.6724354", "0.66820025", "0.6678869", "0.66697323", "0.6665672", "0.6664102", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313", "0.66628313" ]
0.0
-1
Display a listing of the resource.
public function index() { $countries = Country::orderBy('name', 'asc')->paginate(15); return view('admin.countries.index')->with([ 'countries' => $countries ]); }
{ "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 editing the specified resource.
public function edit($id) { $country = Country::findOrFail($id); return view('admin.countries.edit')->with([ 'country' => $country ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit(form $form)\n {\n //\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function 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 return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "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) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "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 $data = Restful::find($id);\n return view('restful.edit', compact('data'));\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 return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\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\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.7854417", "0.7692986", "0.72741747", "0.72416574", "0.7173436", "0.706246", "0.70551765", "0.698488", "0.6948513", "0.694731", "0.69425464", "0.6929177", "0.6902573", "0.6899662", "0.6899662", "0.6878983", "0.6865711", "0.6861037", "0.6858774", "0.6847512", "0.6836162", "0.68129057", "0.68083996", "0.68082106", "0.6803853", "0.67966306", "0.6794222", "0.6794222", "0.6789979", "0.67861426", "0.678112", "0.677748", "0.67702436", "0.67625374", "0.6748088", "0.67475355", "0.67475355", "0.67446774", "0.6742005", "0.67374676", "0.6727497", "0.6714345", "0.6696231", "0.6693851", "0.6689907", "0.6689746", "0.6687102", "0.66870165", "0.6684574", "0.6670877", "0.66705006", "0.6667089", "0.6667089", "0.6663205", "0.66626745", "0.66603845", "0.66593564", "0.66560745", "0.66545844", "0.66447026", "0.6633528", "0.66319114", "0.66298395", "0.66298395", "0.6622365", "0.6621021", "0.66170275", "0.661664", "0.6612467", "0.66107714", "0.6608453", "0.65979743", "0.659645", "0.6596389", "0.6592672", "0.6591205", "0.6588125", "0.6582166", "0.6581656", "0.65811247", "0.65785724", "0.65782833", "0.6576397", "0.6570971", "0.6569483", "0.6568432", "0.656811", "0.6563493", "0.6563493", "0.65622604", "0.65602434", "0.65585065", "0.6557997", "0.65574414", "0.6556701", "0.65565753", "0.6556226", "0.6556107", "0.6549118", "0.65485924", "0.65463555" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { $request->validate([ 'name' => 'required|string|max:255', 'continent' => 'required|string|max:20', ]); $country = Country::findOrFail($id); $country->name = $request->input('name'); $country->continent = $request->input('continent'); // update this country in the countries table $country->save(); $request->session()->flash('info', 'Country updated successfully.'); return redirect()->route('admin.countries.index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1