query_id
stringlengths
32
32
query
stringlengths
7
5.32k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
332f9aaf6605803bbc4f067daeef7522
Returns the contents of the file.
[ { "docid": "0a86512a44329b52af3b577d96346d3f", "score": "0.6920189", "text": "private function getContents(\\SplFileInfo $file)\n {\n $level = error_reporting(0);\n $content = file_get_contents($file->getPathname());\n error_reporting($level);\n if (false === $content) {\n $error = error_get_last();\n throw new IOException($error['message']);\n }\n return $content;\n }", "title": "" } ]
[ { "docid": "596ef75e28eb3f479c2d5713daf2c0f1", "score": "0.80325645", "text": "protected function fileGetContents($file)\n {\n return file_get_contents($file);\n }", "title": "" }, { "docid": "88fdebd6a9f0d23c8a04ccbab7754f90", "score": "0.77628297", "text": "public function getContents()\n {\n if (file_exists($this->name) == true) {\n return file_get_contents($this->name);\n }\n \n return '';\n }", "title": "" }, { "docid": "6ab8f263f2bef3d9d2f1e3ea2b007e5c", "score": "0.77249324", "text": "public static function getContents($file)\n {\n return (static::exists($file) ? file_get_contents($file) : false);\n }", "title": "" }, { "docid": "ad064d4761372eed59459926e1652204", "score": "0.770041", "text": "public function getContent() {\n\t\treturn file_get_contents($this->filename);\n\t}", "title": "" }, { "docid": "77914ecbb9b153fa32e84fe467bc2c11", "score": "0.7681835", "text": "public function read() {\n\t\t\treturn file_get_contents($this->path);\n\t\t}", "title": "" }, { "docid": "a41ce99f0e7e96636ced157fabd9b485", "score": "0.76701677", "text": "public function read()\n {\n return file_get_contents($this->_path);\n }", "title": "" }, { "docid": "5bf00ddb69f1b8d299e0c9a78ab2d174", "score": "0.7566364", "text": "function getFile($file){\n return file_get_contents($this->getPath($file));\n }", "title": "" }, { "docid": "00f4526ff2b0fcabeb85745726111205", "score": "0.7532101", "text": "public function get_contents($file)\n {\n $this->assertStorageInterface();\n\n return $this->getAdapter()->get_contents($file);\n }", "title": "" }, { "docid": "8e3eeeecb8e6b462718feb4999872e61", "score": "0.7510109", "text": "public function readFileContent()\n {\n if (!$this->file) {\n return null;\n }\n $pathFull = Yii::getAlias('@frontend/web' . $this->file);\n if (!file_exists($pathFull) || !is_readable($pathFull)) {\n return null;\n }\n \n $pathFullHtml = \"$pathFull.html\";\n if (file_exists($pathFullHtml)) {\n return file_get_contents($pathFullHtml);\n }\n \n $content = $this->readZippedXML($pathFull);\n return $content;\n }", "title": "" }, { "docid": "a2f4adf97051d0c5ca1ae2edddced572", "score": "0.7507711", "text": "private function getFileContents($file) {\n if (file_exists($file) === FALSE) {\n return NULL;\n }\n\n $contents = file_get_contents($file);\n if ($contents === FALSE) {\n return NULL;\n }\n\n return $contents;\n }", "title": "" }, { "docid": "67dae57aea741ea3a82c03642277431b", "score": "0.7504909", "text": "public function getContent() {\n return file_get_contents($this->path);\n }", "title": "" }, { "docid": "5ece41ddc0dab1175a4842d5046375a9", "score": "0.7490281", "text": "protected function fileGetContents($file_name) {\n return file_get_contents($this->cleanFileName($file_name));\n }", "title": "" }, { "docid": "5ece41ddc0dab1175a4842d5046375a9", "score": "0.7490281", "text": "protected function fileGetContents($file_name) {\n return file_get_contents($this->cleanFileName($file_name));\n }", "title": "" }, { "docid": "3e6da36e2290e7b33c48e922c0b41cb5", "score": "0.7431557", "text": "function get_file_content($file = null)\n\t{\t\n\t\t\t$text = NULL;\n\t\t\t\n\t\t\tif(!$file = fopen($file, \"r\"))\n\t\t\treturn 0;\n\n\t\t\t while(!feof($file))\n\t\t\t\t{\n\t\t \t $text .= fgets($file);\n\t\t\t\t}\n\n\t\t\tfclose($file);\n\t\t\treturn $text;\n\t}", "title": "" }, { "docid": "44cca3c927503f5c34cd6fb4fc71c6a1", "score": "0.7418882", "text": "public function read() {\n\n\t\t\t// read file\n\t\t\t$data = file(__DIR__ . '/' . $this->path, FILE_IGNORE_NEW_LINES);\n\n\t\t\treturn $data;\n\n\t\t}", "title": "" }, { "docid": "de45bb3b9df32f6a1d640c513267ec90", "score": "0.7412618", "text": "public function get ()\n\t{\n\t\treturn file_get_contents($this->filename);\n\t}", "title": "" }, { "docid": "e92df01a6b69d722eeccda3620276372", "score": "0.7386775", "text": "public function file_get_contents($file)\n {\n return file_get_contents($file);\n }", "title": "" }, { "docid": "08cfd66da57cd03f35fda84a2b5aa314", "score": "0.734898", "text": "public function getContent()\r\n {\r\n if ($this->exists && $this->content === null) {\r\n $this->content = file_get_contents($this->fullName);\r\n }\r\n\r\n return $this->content;\r\n }", "title": "" }, { "docid": "ea08acf1c807b9883d9caff9e7d78199", "score": "0.72600156", "text": "public function getContents($file)\n {\n return normalize_line_endings(file_get_contents($this->getPath($file)));\n }", "title": "" }, { "docid": "5931019b6703662ccf2ccaa223625b17", "score": "0.7248812", "text": "public function get()\n {\n return $this->storedFile->get_content();\n }", "title": "" }, { "docid": "365044f64ca763ce8b5977434e242d6c", "score": "0.72096044", "text": "public function getContent()\n {\n return $this->_fileContent; \n }", "title": "" }, { "docid": "a4e55fdbf7b828ffc954b560b1d70dfc", "score": "0.7199953", "text": "public function getContents($file)\n {\n $file = $this->basePath . '/' . ltrim($file, '/\\\\');\n\n if (!file_exists($file))\n throw new \\Exedra\\Exception\\NotFoundException(\"File [$file] not found\");\n\n return file_get_contents($file);\n }", "title": "" }, { "docid": "6476ff2b09f0bea70b04b00d586fb914", "score": "0.71972084", "text": "public function getFileContents(): string\n {\n return Storage::disk($this->disk)->get($this->filename);\n }", "title": "" }, { "docid": "dddc100ee739237e5d8b73390e7f4d92", "score": "0.71592873", "text": "public function contents(): string\n\t{\n\t\tif (!$this->exists()) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn file_get_contents($this->path());\n\t}", "title": "" }, { "docid": "19a655149be86f714e26560280a4363d", "score": "0.7139195", "text": "protected function get_contents( $file ) {\n\t\tif ( is_admin() ) {\n\t\t\t// WP_filesystem is only available at the back-end.\n\t\t\tif ( ! $this->init_filesystem() ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tglobal $wp_filesystem;\n\t\t\treturn $wp_filesystem->get_contents( $file );\n\t\t} else {\n\t\t\t// fallback method for use at the front-end.\n\t\t\tif ( ! file_exists( $file ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tob_start();\n\t\t\trequire $file;\n\t\t\treturn ob_get_clean();\n\t\t}\n\t}", "title": "" }, { "docid": "336a3eef6e566aef1e956c371907ef7e", "score": "0.7124255", "text": "private function getFileContents($source_file) {\n\t\treturn $this->drive->getFile($source_file);\n\t}", "title": "" }, { "docid": "0794fd8559a1e4af24318477fc326dc7", "score": "0.71120137", "text": "abstract public function getContent($file);", "title": "" }, { "docid": "8829e75283c3b6ee41b178c485b092e5", "score": "0.7103942", "text": "function readFile()\r\n\t{\r\n\t\t$this->fileData = fread($this->fileHandler, filesize($this->fileName));\r\n\t\treturn $this->fileData;\r\n\t}", "title": "" }, { "docid": "e6a3742bab0026d74c6a8ae746a927cf", "score": "0.709873", "text": "public function getContents(): string\n\t{\n\t\t$this->seek(0);\n\n\t\treturn stream_get_contents($this->handle);\n\t}", "title": "" }, { "docid": "986581364464aadefd7ac1605ec5c973", "score": "0.708931", "text": "abstract protected function getFileContent($file);", "title": "" }, { "docid": "7a137f24c834fb4c995824fb66db8baf", "score": "0.70839596", "text": "public static function get($file)\n {\n if (!self::exists($file)) {\n return \"\";\n }\n if (!self::is($file)) {\n return \"\";\n }\n return file_get_contents($file);\n\n }", "title": "" }, { "docid": "bc43d7924a7fe31dbbceff0d79bb15c2", "score": "0.7050186", "text": "function getFileContents($filename)\n{\n // http://php.net/manual/en/function.fopen.php\n // 'r' means for reading\n // - more modes in the next lesson\n // like a cursor or pointer\n $handle = fopen($filename, 'r');\n\n // our handle is at the start of the file, read until the end of the file\n // i.e. the size of the file\n $fileContents = fread($handle, filesize($filename));\n\n // make sure to cleanup\n fclose($handle);\n\n return $fileContents;\n}", "title": "" }, { "docid": "d79694b9efdfa0c79df629100d4379b8", "score": "0.7042117", "text": "public static function getFileContents($file) {\n try {\n if (!is_object($file)) {\n throw new RealisticDummyContentException('Please use a file object');\n }\n return trim(self::get()->fileGetContents($file->uri));\n }\n catch (\\Throwable $e) {\n return NULL;\n }\n }", "title": "" }, { "docid": "5246a8fbfd7541b2af594319a4f32f4a", "score": "0.7037464", "text": "public function getContent()\n {\n return $this->filesystem->get($this->path);\n }", "title": "" }, { "docid": "95eacd5e97802b84ddfb9d1518fd781f", "score": "0.7029191", "text": "public function getFileContents($fileIdentifier)\n {\n $this->writeLog('getFileContents(' . $fileIdentifier . ')');\n $fileInfo = $this->getFileInfoByIdentifier($fileIdentifier);\n $fullPath = $this->getFullPath(intval($fileInfo['id']));\n return file_get_contents($fullPath);\n }", "title": "" }, { "docid": "f9638f06bf526ce434316037ee6d3cb8", "score": "0.69894433", "text": "public function getFileContent ()\r\n {\r\n \t// placeholder for now\r\n \r\n }", "title": "" }, { "docid": "c4bdfeb99c418a4266c4c3101233988b", "score": "0.69719267", "text": "public static function fileGetContent($file)\n {\n $content = file_get_contents($file);\n $dom = \\phpQuery::newDocumentHTML($content, $charset = 'utf-8');\n if($dom->find('body')->html() == null) $content = false;\n return $content;\n }", "title": "" }, { "docid": "e54928da8c4b88d6e4840416c3fdc0dc", "score": "0.69468594", "text": "function getContentsArray() {\n\t\t$fileContentsArray = file($this->filename);\n\t\treturn $fileContentsArray;\n\t}", "title": "" }, { "docid": "ca9c2cd43393f5d241457a18c57c307b", "score": "0.6945144", "text": "public function getContents()\n {\n return stream_get_contents($this->stream, $this->maxLength, $this->offset);\n }", "title": "" }, { "docid": "a4393a737a0b9a0079a31dd9df1dbd62", "score": "0.69377923", "text": "protected function getContents()\n {\n return $this->engine->get($this->path, $this->gatherData());\n }", "title": "" }, { "docid": "c0ce9cd069110f6923a078a2ec5686ab", "score": "0.689306", "text": "public function get($file)\n {\n if ( ! $this->exists($file))\n {\n throw new FileNotFound($file);\n }\n\n return file_get_contents($file);\n }", "title": "" }, { "docid": "a31da0c7b53b23cb8347d0d33585d521", "score": "0.68772197", "text": "public function read()\n\t{\n\t\t$this->zip->close();\n\n\t\treturn file_get_contents($this->tmpfile);\n\t}", "title": "" }, { "docid": "d3eed31b1b9682f3524a1295f902e093", "score": "0.6868919", "text": "public function readFile();", "title": "" }, { "docid": "a10b0f15d777000f52bb970eb6c1bcd5", "score": "0.68441635", "text": "protected function getContent(string $nameFile) : string\n {\n return file_get_contents($nameFile);\n }", "title": "" }, { "docid": "269467ae43d5c0b18408bafd84a27884", "score": "0.6830225", "text": "public function read()\n {\n \treturn Util_File::Read($this->_storage);\n }", "title": "" }, { "docid": "968997f6f73dc0b689f20c446085404f", "score": "0.682467", "text": "protected function readData($file)\n {\n return file_get_contents($file);\n }", "title": "" }, { "docid": "d1df70b68e821c60320f2040579f8a54", "score": "0.6810031", "text": "public static function getContentFile($path){\n if(!file_exists($path)){\n self::writeFile($path,'');\n }\n $handle = fopen($path, \"rb\");\n if (FALSE === $handle) {\n $handle = fopen($path, \"rb\");\n }\n $contents = '';\n while (!feof($handle)) {\n $contents .= fread($handle, 8192);\n }\n fclose($handle);\n return $contents;\n }", "title": "" }, { "docid": "56193651dbad4448b4e8bd5a4c044f3c", "score": "0.68065774", "text": "public function get_contents()\r\n {\r\n return $this->_contents;\r\n }", "title": "" }, { "docid": "7914c64108953f482a419fe6d1359262", "score": "0.6789172", "text": "public function fetch ($file = null)\n {\n if (! $file) {\n $file = $this->tplfile;\n }\n ob_start();\n require $file;\n $contents = ob_get_clean();\n return $contents;\n }", "title": "" }, { "docid": "95a66447db733c7fa85fdbf199196bac", "score": "0.67823654", "text": "function ReadFromFile($filename) {\n $content = @file_get_contents($filename);\n return $content;\n}", "title": "" }, { "docid": "64e795a757032d8be4f015a62d60a153", "score": "0.67754227", "text": "function get_file_contents($file_name) {\n ob_start();\n include( $file_name );\n $content = ob_get_contents();\n ob_end_clean();\n return $content;\n}", "title": "" }, { "docid": "ccaeed7ae0ebe6523a3957825f5e9976", "score": "0.6741933", "text": "public function read_file() {\n\t $handle = fopen($this->filename, \"r\");\n\t $contents = fread($handle, filesize($this->filename));\n\t fclose($handle);\n\t return explode(\"\\n\", $contents);\n\t}", "title": "" }, { "docid": "2e100c897ada2a383322659e884da059", "score": "0.66843665", "text": "public function getSource()\n {\n return file_get_contents($this->fileName);\n }", "title": "" }, { "docid": "8f24b1e5a55d2a9cfe03e9e5b12afe23", "score": "0.66739196", "text": "public function getContent(): ?string {\r\n\r\n if(false !== $this -> exists()) {\r\n\r\n if(false === $this -> isReadable()) {\r\n throw new RuntimeException(sprintf('File \"%s\" is not readable', $this -> file));\r\n }\r\n\r\n return file_get_contents($this -> file);\r\n }\r\n\r\n return null;\r\n }", "title": "" }, { "docid": "27477862ee01450a99581833a4d85910", "score": "0.66688967", "text": "function read($file)\n{\n return file_get_contents($file);\n}", "title": "" }, { "docid": "8d3d7ed8b14e4a8453b0306bfe905865", "score": "0.6646551", "text": "protected function getContent()\n {\n return file_get_contents($this->reflection->getFileName());\n }", "title": "" }, { "docid": "eb51b76efb5d957f8c43a526537a8704", "score": "0.6642618", "text": "public function getContent() {\n\t\tif ( $this->getID() == 0 ) {\n\t\t // AtEase::quietCall( 'file_get_contents',\n\t\t\t$this->mContent = file_get_contents($this->s5file );\n\t\t} else {\n\t\t\t$this->loadContent();\n\t\t}\n\t\treturn $this->mContent;\n\t}", "title": "" }, { "docid": "f6a310f4bae3653748e6ec47d854dee3", "score": "0.6636563", "text": "function pl_file_get_contents( $filename ) {\n\n\tif ( is_file( $filename ) ) {\n\n\t\t$file = file( $filename, FILE_SKIP_EMPTY_LINES );\n\t\t$out = '';\n\t\tif( is_array( $file ) )\n\t\t\tforeach( $file as $contents )\n\t\t\t\t$out .= $contents;\n\n\t\tif( $out )\n\t\t\treturn $out;\n\t\telse\n\t\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "7a2d583ee55898a3e12707f2850aef8f", "score": "0.66305065", "text": "public function get()\n {\n $fileContents = explode(PHP_EOL, $this->directory->readFile($this->logFile));\n return $fileContents;\n }", "title": "" }, { "docid": "d03592f6db6f3a09cdca45e2055fc10d", "score": "0.66249746", "text": "public function file($path)\r\n {\r\n $path = $this->kernel->locateResource($path, null, true);\r\n\r\n return file_get_contents($path);\r\n }", "title": "" }, { "docid": "71439421bc38e6f678987192155561f0", "score": "0.6621536", "text": "public function read_file() {\n $handle = fopen($this->filename, \"r\");\n $contents = fread($handle, filesize($this->filename));\n fclose($handle);\n return explode(\"\\n\", $contents);\n }", "title": "" }, { "docid": "414b693da76c73f7c27dc0817b6e3bc1", "score": "0.66213983", "text": "public function getFile($filePath)\n {\n return file_get_contents($filePath);\n }", "title": "" }, { "docid": "f8dc3a849f9b5398592d08ea8cd5b9b8", "score": "0.661361", "text": "abstract public function implementFileGetContents($filename) : string;", "title": "" }, { "docid": "cec172fadfed1e6778292086ae0cf97b", "score": "0.66106063", "text": "public function content($file_name = NULL)\n {\n return $this->getStatic($file_name);\n }", "title": "" }, { "docid": "82ed9e76a878bb31b17746db5cf90cac", "score": "0.6604043", "text": "public function getFile()\n {\n return $this->hookFile($this->file);\n }", "title": "" }, { "docid": "a25a5e0c5f199896815339ee0cca919a", "score": "0.65868145", "text": "function openFile($file) \n{\n\tglobal $txt;\n\n\t$file_open = fopen($file, 'r') or fatal_lang_error('fm_file_couldnotopen_read',0);\n\t$file_content = filesize($file) != 0 ? fread($file_open, filesize($file)) : '';\n\tfclose($file_open);\n\n\treturn $file_content;\n\n}", "title": "" }, { "docid": "edb154848a763bf8b277e0551eeaf07b", "score": "0.6586742", "text": "function read($file=NULL) {\n\t\t$file = fra_var[\"files_path\"].\"\".$file;\n\t\tif(file_exists($file)) {\n\t\t\t$return = file_get_contents($file);\n\t\t\treturn $return;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "50150eb2b08cde0454666e0ad0d166f2", "score": "0.6585433", "text": "private function getFileContent($filePath) {\n return trim(file_get_contents($filePath));\n }", "title": "" }, { "docid": "35067b49d351db834657b2596f21f608", "score": "0.65845174", "text": "function readContent($contentFile) {\n\t// Der Content des Textfiles wird mit \"file()\" in ein Array eingelesen\n\t$arr = file($contentFile);\n\t$content = \"\";\n\tforeach ($arr as $out) {\n\t\t$content .= $out;\n\t}\n\treturn $content;\n}", "title": "" }, { "docid": "8d616d5f25aaaee1e157a935db0707cb", "score": "0.6567156", "text": "public static function getFileContents($filePath)\n {\n if (self::isUsefulFile($filePath)) {\n return file_get_contents($filePath);\n } else return false;\n }", "title": "" }, { "docid": "ed4df1d7336cd5c4b288c386aacf287a", "score": "0.6562858", "text": "function my_file_get_contents($filename, $use_include_path = 0) {\n\n $data = \"\";\n $file = @fopen($filename, \"rb\", $use_include_path);\n if ($file) {\n while (!feof($file)) {\n $data .= fread($file, 1024);\n }\n fclose($file);\n }\n return $data;\n}", "title": "" }, { "docid": "f590ba9b03665be530ef7b85af9dfa24", "score": "0.6554148", "text": "public function get_filecontent($path) {\n $fullpath = $this->tempdir . '/' . $path;\n if (is_file($fullpath) && is_readable($fullpath)) {\n return file_get_contents($fullpath);\n }\n return false;\n }", "title": "" }, { "docid": "38e8517b151cc7959433f0e9c29c700d", "score": "0.6547803", "text": "public function getFile () \r\n {\r\n return $this->file;\r\n }", "title": "" }, { "docid": "b5de986356f812e4701e50dc4d081ba2", "score": "0.65462875", "text": "public function getFile() {\n\n return $this->file;\n }", "title": "" }, { "docid": "b5de986356f812e4701e50dc4d081ba2", "score": "0.65462875", "text": "public function getFile() {\n\n return $this->file;\n }", "title": "" }, { "docid": "c053beecd9ce7fcfa302e896e8f17c0b", "score": "0.654059", "text": "public function getFile()\n {\n return $this->sFile;\n }", "title": "" }, { "docid": "c9c8733e321b2768fd7bd4b25d1f7239", "score": "0.65329456", "text": "public function fileGetContent($path)\n {\n $return = @file_get_contents($path);\n if ($return === false) {\n throw new \\RuntimeException(sprintf(\"Could't load content %s\", $path));\n }\n return $return;\n }", "title": "" }, { "docid": "0d2ef2dbd676f35bc96735720b775faf", "score": "0.65157", "text": "public function getFile() {\n return $this->_file;\n }", "title": "" }, { "docid": "055b429af2819b2bf4dc94c409647ef6", "score": "0.65148693", "text": "public function getContents()\n {\n return (string) $this->contents;\n }", "title": "" }, { "docid": "5c0a3c4d7a874b6a7e0a4472b481a3a8", "score": "0.6507224", "text": "public function getFile() {\n return $this->fedora->getDatastreamREST($this->pid, \"FILE\");\n }", "title": "" }, { "docid": "1a9262ad1e6b972a51abfa08c7ade1fb", "score": "0.6503901", "text": "final public function getFile()\n {\n return $this->file;\n }", "title": "" }, { "docid": "df7158a8749459fff7074974f35e40e8", "score": "0.6498273", "text": "public function fileGetContents($filename) : string {\n if (!$filename) {\n throw new RealisticDummyContentException('Please use valid filename');\n }\n if (strpos($filename, '/') === FALSE) {\n throw new RealisticDummyContentException('Please use an absolute filename including its path, which must always contain at least one slash. You are using ' . $filename);\n }\n $return = $this->implementFileGetContents($filename);\n return $return;\n }", "title": "" }, { "docid": "72e1d95d95fe827e5b6d30b1f886bf1b", "score": "0.64979845", "text": "public function getFile()\n {\n return $this->file;\n }", "title": "" }, { "docid": "72e1d95d95fe827e5b6d30b1f886bf1b", "score": "0.64979845", "text": "public function getFile()\n {\n return $this->file;\n }", "title": "" }, { "docid": "72e1d95d95fe827e5b6d30b1f886bf1b", "score": "0.64979845", "text": "public function getFile()\n {\n return $this->file;\n }", "title": "" }, { "docid": "72e1d95d95fe827e5b6d30b1f886bf1b", "score": "0.64979845", "text": "public function getFile()\n {\n return $this->file;\n }", "title": "" }, { "docid": "72e1d95d95fe827e5b6d30b1f886bf1b", "score": "0.64979845", "text": "public function getFile()\n {\n return $this->file;\n }", "title": "" }, { "docid": "72e1d95d95fe827e5b6d30b1f886bf1b", "score": "0.64979845", "text": "public function getFile()\n {\n return $this->file;\n }", "title": "" }, { "docid": "72e1d95d95fe827e5b6d30b1f886bf1b", "score": "0.64979845", "text": "public function getFile()\n {\n return $this->file;\n }", "title": "" }, { "docid": "72e1d95d95fe827e5b6d30b1f886bf1b", "score": "0.64979845", "text": "public function getFile()\n {\n return $this->file;\n }", "title": "" }, { "docid": "a989c4f6f9b06aa8283c58f54e9bedae", "score": "0.64974934", "text": "public function FetchFile()\n {\n if (self::IsFile()) {\n return file_get_contents($this->file);\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "c9ca65c438eef2420e6c167fa8c8de80", "score": "0.6495564", "text": "public function getFile()\n\t{\n\t\treturn $this->file;\n\t}", "title": "" }, { "docid": "4d64b701d84553eb955d8be845615915", "score": "0.6492556", "text": "public function read(): string\n {\n return $this->_fs->read($this->_path);\n }", "title": "" }, { "docid": "2e6f8aa267b7220cd9eaf8fc0d77c641", "score": "0.64913", "text": "public function getContents()\n {\n return $this->contents;\n }", "title": "" }, { "docid": "2e6f8aa267b7220cd9eaf8fc0d77c641", "score": "0.64913", "text": "public function getContents()\n {\n return $this->contents;\n }", "title": "" }, { "docid": "2e6f8aa267b7220cd9eaf8fc0d77c641", "score": "0.64913", "text": "public function getContents()\n {\n return $this->contents;\n }", "title": "" }, { "docid": "2e6f8aa267b7220cd9eaf8fc0d77c641", "score": "0.64913", "text": "public function getContents()\n {\n return $this->contents;\n }", "title": "" }, { "docid": "2e6f8aa267b7220cd9eaf8fc0d77c641", "score": "0.64913", "text": "public function getContents()\n {\n return $this->contents;\n }", "title": "" }, { "docid": "51e6ae4aedf53d4637ea99655e0a29ac", "score": "0.64849424", "text": "function readFile ($filename)\n {\n if (!strlen($filename))\n v4b_exit (\"FileUtil::readFile: filename is empty\");\n\n return file_get_contents($filename);\n }", "title": "" }, { "docid": "d2c2d676aa34e82404d4ffde2e224607", "score": "0.6479556", "text": "final public function getFile()\n\t{\n\t\treturn $this->file;\n\t}", "title": "" } ]
a341a7b26b6bb96b7384baa055c0cf3b
get all quizzes returns array of hash arrays
[ { "docid": "5c89a6d223181b072efa9160914ce781", "score": "0.76403075", "text": "public function getQuizzesAll ()\n {\n \t// haven't included \"order by priority desc\" as we sort in the Quizzes class\n \treturn ($this->db_object->getRowsAll (\"Select * from \".$this->table_prefix.$this->quiz_tables['quizzes'] ));\n }", "title": "" } ]
[ { "docid": "0c77e7e3b2b62d4d0c36eca74eb35fef", "score": "0.7165484", "text": "public static function getAllQuizz(){\n\n $pdo = Database::getInstance();\n\n try{\n $sql = 'SELECT * \n FROM `quizz`, `quizztheme`\n WHERE `quizz`.`id_quizzTheme` = `quizztheme`.`id_quizzTheme`\n ;';\n $stmt = $pdo->query($sql);\n return $stmt->fetchAll();\n }\n catch(PDOException $e){\n return false;\n }\n\n }", "title": "" }, { "docid": "5cc35d50ad9410df40042dff9be824c4", "score": "0.70251846", "text": "function getUserQuizzes() \n\t{\n\t\t$user =& JFactory::getUser();\n\t\t\n\t\t$config =& JFactory::getConfig();\n\t\t$jnow\t\t=& JFactory::getDate();\n\t\t$jnow->setOffset( $config->getValue('config.offset' ));\n\t\t$now\t\t= $jnow->toMySQL(true);\n\n\t\t$query = 'SELECT qui.*' .\n\t\t' FROM #__jquarks_quizzes AS qui' .\n\t\t' LEFT JOIN #__jquarks_users_quizzes as users_quizzes ON qui.id = users_quizzes.quiz_id' .\n\t\t' WHERE qui.published = 1' .\n\t\t' AND qui.access_id = 1' .\n\t\t' AND users_quizzes.user_id = ' . $user->id . \n\t\t' AND users_quizzes.archived <> 1' .\n\t\t' AND qui.publish_up < \\'' . $now . '\\'' .\n\t\t' AND ( qui.publish_down > \\'' . $now . '\\' OR qui.publish_down = \\'0000-00-00 00:00:00\\' )' ;\n\t\t\n\t\t$this->_userQuizzes = $this->_getList($query);\n\t\tif($this->_db->getErrorNum()) {\n\t\t\treturn false ;\n\t\t}\n\t\t\n\t\treturn $this->_userQuizzes ;\n\t}", "title": "" }, { "docid": "bcd9cf64b03f35f02d5456d60e9d3ec2", "score": "0.69156003", "text": "function get_all_quizes(){\n $str_query=\"select * from mwc_quizzine_quiz\";\n if(!$this->query($str_query)){\n return false;\n }\n return $this->fetch();\n }", "title": "" }, { "docid": "399e55b4e695008d19c55acd7566cbe8", "score": "0.6818314", "text": "function getMyQuizzes($link){\r\n\t$sql = \"SELECT * FROM quizzes WHERE owner_id = \".$_SESSION[\"id\"];\r\n\t$results = mysqli_query($link, $sql);\r\n\t$total = array();\r\n\twhile($row = mysqli_fetch_assoc($results)){\r\n\t\t$total[] = $row;\r\n\t}\r\n\treturn $total;\r\n}", "title": "" }, { "docid": "1a72790169a2d25892df4dec231f54e6", "score": "0.6685185", "text": "public function getAllQuiz(){\n\t\treturn $this->db->getAllQuiz();\n\t}", "title": "" }, { "docid": "c563177653da0c4e824bb744227c2bfd", "score": "0.6587059", "text": "function getAllQuizzes($link){\r\n\t$sql = \"SELECT * FROM quizzes\";\r\n\t$results = mysqli_query($link, $sql);\r\n\t$total = array();\r\n\twhile($row = mysqli_fetch_assoc($results)){\r\n\t\t$total[] = $row;\r\n\t}\r\n\treturn $total;\r\n}", "title": "" }, { "docid": "426133ed721136efe422cafc069595bc", "score": "0.6533805", "text": "public static function findAll() {\n\n // on récupère la connexion à la bDD\n $connexion = \\Oquiz\\Utils\\Database::getDB();\n // requête de récupération de données\n $sql = 'SELECT *, quizzes.id AS id, CONCAT(users.first_name, \" \" , users.last_name) AS author\n FROM quizzes INNER JOIN users ON users.id = quizzes.id_author';\n // on exécute la requête dans la BDD\n $statement = $connexion->query($sql);\n\n // on retourne tous les résultats\n return $statement->fetchAll(\\PDO::FETCH_CLASS, static::class);\n }", "title": "" }, { "docid": "77c7858b8f62e2ef3222217b60279bcb", "score": "0.6402485", "text": "function getPublicQuizzes() \n\t{\n\t\t$config =& JFactory::getConfig();\n\t\t$jnow\t\t=& JFactory::getDate();\n\t\t$jnow->setOffset( $config->getValue('config.offset' ));\n\t\t$now\t\t= $jnow->toMySQL(true);\n\t\t\n\t\t$query = 'SELECT qui.*' .\n\t\t' FROM #__jquarks_quizzes AS qui' .\n\t\t' WHERE qui.published = 1' .\n\t\t' AND qui.access_id = 0' .\n\t\t' AND qui.publish_up < \\'' . $now . '\\'' .\n\t\t' AND ( qui.publish_down = \"0000-00-00 00:00:00\" OR qui.publish_down > \"' . $now . '\" )' ;\n\t\t\n\t\t$this->_publicQuizzes = $this->_getList($query);\n\t\tif($this->_db->getErrorNum()) {\n\t\t\treturn false ;\n\t\t}\n\t\t\n\t\treturn $this->_publicQuizzes ;\n\t}", "title": "" }, { "docid": "88b74699e36dbc0dbda2730eef4e72bf", "score": "0.6358927", "text": "public function getQuestions()\n {\n return DB::table('questionbank_quizzes')\n ->where('quize_id','=',$this->id)\n ->orderBy('subject_id')\n ->get();\n }", "title": "" }, { "docid": "30ea089593a9396f41d9a7321d27aa88", "score": "0.63130444", "text": "public function get_quizzes( int $limit = 0, int $offset = 0 ): array {\n\t\t/**\n\t\t * Filters lesson quizzes.\n\t\t *\n\t\t * @since 4.6.0\n\t\t *\n\t\t * @param Quiz[] $quizzes Quizzes.\n\t\t * @param Lesson $lesson Lesson model.\n\t\t *\n\t\t * @ignore\n\t\t */\n\t\treturn apply_filters(\n\t\t\t'learndash_model_lesson_quizzes',\n\t\t\t$this->get_quizzes_from_trait( $limit, $offset ),\n\t\t\t$this\n\t\t);\n\t}", "title": "" }, { "docid": "047c05abccb94353af75eb180823af47", "score": "0.6260688", "text": "function wooflash_get_questions_quiz($quiz, $export = true) {\n global $DB;\n\n // Fetch the quiz slots.\n $quiz_slots = $DB->get_records('quiz_slots', ['quizid' => $quiz]);\n // Create an array with all the question ids.\n $question_ids = array_map(\n function ($elem) {\n return $elem->questionid;\n },\n $quiz_slots\n );\n // Get the list of questions for the quiz.\n $questions = $DB->get_records_list('question', 'id', $question_ids);\n\n // Iterate through questions, getting stuff we need.\n $qresults = array();\n\n foreach ($questions as $key => $question) {\n $question->export_process = $export;\n $qtype = question_bank::get_qtype($question->qtype, false);\n if ($export && $qtype->name() == 'missingtype') {\n // Unrecognised question type. Skip this question when exporting.\n continue;\n }\n $qtype->get_question_options($question);\n $qresults[] = $question;\n }\n\n return $qresults;\n}", "title": "" }, { "docid": "886abaf7ed959a8d68b1f39f767a21f3", "score": "0.6247399", "text": "public function GetAllQAs()\n {\n return $this->allQAs;\n }", "title": "" }, { "docid": "a54d22dd51cf10dc0b4d196d981e986c", "score": "0.62071055", "text": "public function quizzes()\n {\n return $this->hasMany(Quiz::class);\n }", "title": "" }, { "docid": "a54d22dd51cf10dc0b4d196d981e986c", "score": "0.62071055", "text": "public function quizzes()\n {\n return $this->hasMany(Quiz::class);\n }", "title": "" }, { "docid": "11bafc756120678b0ac4198a2a60649a", "score": "0.6193061", "text": "public function run()\n {\n \tDB::statement('SET FOREIGN_KEY_CHECKS=0;');\n $allquizzes = [\n\t\t\t$quiz1 = [\n\t\t\t\t'id' => 1,\n\t\t\t\t'title' => '「一期一笑」のコピーで広告を打っているのはどこの会社?',\n\t\t\t\t'correct' => 'アリシアクリニック',\n\t\t\t\t'uncorrect1' => '微笑整形外科',\n\t\t\t\t'uncorrect2' => '湘南美容外科クリニック',\n\t\t\t\t'explain_sentence' => 'アリシアクリニックは他にも、「一転百起」などの四字熟語をもじった広告を打っています。',\n\t\t\t\t'category_id' => '3',\n\t\t\t],\n\t\t\t$quiz2 = [\n\t\t\t\t'id' => 2,\n\t\t\t\t'title' => '電子書籍が登場したことによって「紙の本」という言葉が生まれた。このように、新しく登場したモノ・コトに対応して生み出された呼び名を何という?',\n\t\t\t\t'correct' => 'レトロニム',\n\t\t\t\t'uncorrect1' => 'レトリック',\n\t\t\t\t'uncorrect2' => 'レトリカ',\n\t\t\t\t'explain_sentence' => '白黒テレビ、回らない寿司、などもレトロニムの一種ですね',\n\t\t\t\t'category_id' => '3',\n\t\t\t],\n\t\t\t$quiz3 = [\n\t\t\t\t'id' => 3,\n\t\t\t\t'title' => '人生の時期を表す言葉として、陰陽思想では若い順番に青春、朱夏、白秋がある。白秋に続く時期は何という??',\n\t\t\t\t'correct' => '玄冬',\n\t\t\t\t'uncorrect1' => '黒冬',\n\t\t\t\t'uncorrect2' => '緑冬',\n\t\t\t\t'explain_sentence' => '青春という言葉も、陰陽思想から作られていたって何か意外ですよね',\n\t\t\t\t'category_id' => '3',\n\t\t\t],\n\t\t\t$quiz4 = [\n\t\t\t\t'id' => 4,\n\t\t\t\t'title' => 'ONE PIECEのクロコダイルが結成した組織の名前は?',\n\t\t\t\t'correct' => 'バロックワークス',\n\t\t\t\t'uncorrect1' => 'ラコステ',\n\t\t\t\t'uncorrect2' => 'アラバスタ',\n\t\t\t\t'explain_sentence' => 'アラバスタ編は、スリラーバーグ、空島に続いて好きです',\n\t\t\t\t'category_id' => '3',\n\t\t\t],\n\t\t\t\n\t\t];\n\n\t\tforeach ($allquizzes as $quiz) {\n\t\t\tDB::table('quizzes')->insert($quiz);\n\t\t}\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "title": "" }, { "docid": "09996f249eb826fb9c7050fe9a0b0189", "score": "0.6168836", "text": "protected function quatreDernierQuizz($repQuizz){\n \n $query = $repQuizz->createQueryBuilder('q')\n ->orderBy('q.createdAt', 'DESC') \n ->getQuery()\n ->setMaxResults(4); /* limit 4 */\n\n $quizzs = $query->getResult(); /* on recupere les resultats */\n \n return $quizzs ;\n \n }", "title": "" }, { "docid": "46b67058cb98e17ccb1779fee3a494df", "score": "0.60834515", "text": "public function get_all_quiz()\n\t{\n\t\t$this->db->select(\"question,quiz.que_Id,answer,quiz.created_on\");\n\t\t$this->db->JOIN('question','quiz.que_Id = question.que_Id','left');\n\t\t$this->db->order_by('quiz.created_on','DESC');\n\t\t$this->db->from(\"quiz\");\n\t\t\n\t\t$query = $this->db->get();\n\t\t\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "c9e8250ae4ccfccf436bf5ed12384db3", "score": "0.607543", "text": "function getOtherQuizzes($link){\r\n\t$sql = \"SELECT * FROM quizzes WHERE owner_id != \".$_SESSION[\"id\"];\r\n\t$results = mysqli_query($link, $sql);\r\n\t$total = array();\r\n\twhile($row = mysqli_fetch_assoc($results)){\r\n\t\tif(empty($row[\"description\"])) $row[\"description\"] = \"No Description\";\r\n\t\t$total[] = $row;\r\n\t}\r\n\treturn $total;\r\n}", "title": "" }, { "docid": "6561779b63b40e7d4fdc1804717133fa", "score": "0.6074793", "text": "public function getQaArr(){\n $titlecontent1 = str_replace(\"\\r\\n\",\"\\n\",$this->questiontitles);\n $titlecontent = str_replace(\"\\r\",\"\\n\",$titlecontent1);\n $qs = explode(\"\\n\",$titlecontent);\n $qas = array();\n\n foreach( $qs as $q ){\n $qas[] = array(\n 'q' => $q,\n 'a' => ''\n );\n }\n\n return $qas;\n }", "title": "" }, { "docid": "28c130b6614810c8439dbcbbb3333f5b", "score": "0.6058495", "text": "public static function get_all($instantquiz) {\n global $DB;\n $questions = array();\n if ($records = $DB->get_records(static::get_table_name(), array('instantquizid' => $instantquiz->id), 'sortorder, id')) {\n foreach ($records as $record) {\n $questions[$record->id] = new static($instantquiz, $record);\n }\n }\n return $questions;\n }", "title": "" }, { "docid": "8998f3e2a01c8ed970d4e52dae3cb681", "score": "0.6041084", "text": "function ipal_get_questions(){ \r\n \r\n\tglobal $ipal;\r\n\tglobal $DB;\r\n\tglobal $CFG;\r\n\t$q='';\t\r\n\t$pagearray2=array();\r\n\t // is there an quiz associated with an ipal?\r\n//\t$ipal_quiz=$DB->get_record('ipal_quiz',array('ipal_id'=>$ipal->id));\r\n\t\r\n\t// get quiz and put it into an array\r\n\t$quiz=$DB->get_record('ipal',array('id'=>$ipal->id));\r\n\t\r\n\t//Get the question ids\r\n\t$questions=explode(\",\",$quiz->questions);\r\n\t\r\n\t//get the questions and stuff them into an array\r\n\t\tforeach($questions as $q){\t\r\n\t\t\t\r\n\t\t $aquestions=$DB->get_record('question',array('id'=>$q));\r\n\t\t if(isset($aquestions->questiontext)){\r\n\t\t $pagearray2[]=array('id'=>$q, 'question'=>strip_tags($aquestions->questiontext), 'answers'=>ipal_get_answers($q));\r\n\t\t\t\t \r\n\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t}\r\n \r\n\treturn($pagearray2);\r\n\t}", "title": "" }, { "docid": "512901c0507e5fa936a350d129755a8d", "score": "0.6014155", "text": "public function getQuestionIds ($quiz=\"\") \n {\n \tglobal $debug;\n \t\n \t// if $quiz not specified get all questions in db (even those with no quiz)\n \t// Initial sql without where - add where part later if required\n \t$sql = \"SELECT \".$this->table_prefix.$this->quiz_tables['questions'].\".questionid, quizname FROM \". $this->table_prefix.$this->quiz_tables['questions']. \" LEFT OUTER JOIN \".$this->table_prefix.$this->quiz_tables['rel'].\" on \".$this->table_prefix.$this->quiz_tables['questions'].\".questionid=\".$this->table_prefix.$this->quiz_tables['rel'].\".questionid\";\n \tif (isset ($debug) && $debug) {print \"SQL: \\n\".$sql.\"\\n\\n\";}\n \t\n \t// if we limit to a quiz then handle here\n \tif ($quiz!=\"\")\n \t{\n \t\t// add a where clause - no security checking here - it needs to be done at a higher level\n \t\t$sql .= \" WHERE \".$this->table_prefix.$this->quiz_tables['rel'].\".quizname=\\\"$quiz\\\"\";\n \t}\n \t\n \t// Get all the rows into a temp array - we then reformat appropriately (eg. move quizname into array instead of individual rows\n \t\n \t$temp_array = $this->db_object->getRowsAll ($sql);\n \t// check for errors\n \tif (isset ($temp_array['ERRORS'])) \n \t{\n \t\t//-here userfriendly handling?\n \t\tif ($debug) {print \"Error in getQuestionIds \\n\";}\n \t\t$err = Errors::getInstance();\n \t\t$err->errorEvent(ERROR_DATABASE, \"Error reading database\"+$temp_array['ERRORS']);\n\n \t}\n \t\n \t// New array that we return from the function - std 1 dimension\n \t$return_array = array();\n\n \t//print \"DEBUG\\n\";\n \t//print_r ($temp_array);\n \t\n \t// iterate over all arrays - set so we only have one question\n \tforeach ($temp_array as $this_array)\n \t{\n \t\t// pull this out of array as we will use a few times and makes easier to read\n \t\t$this_question_id = $this_array['questionid'];\n \t\t// does this question already exist - if so ignore\n \t\tif (!in_array ($this_question_id, $return_array))\n \t\t{\n \t\t\t$return_array[] = $this_question_id;\n \t\t}\n \t}\n \treturn $return_array;\n }", "title": "" }, { "docid": "3b947916232de0f7206c050812d248b9", "score": "0.59756845", "text": "public function atualizarQuizzes( ) {\n\t\tglobal $DB;\n\t\t$configuracao = $this->_cursolv->getConfiguracao();\n\t\t\n\t\tif (isset($configuracao) && !empty($configuracao) ) {\t\t\n\t\t\t$curso_id = $configuracao->id_curso;\n\t\t\t\n\t\t\t$sql = 'SELECT grades.id as grade_id, quiz_importado.id as id, quiz_importado.id_curso, quiz_importado.id_quiz, \n\t\t\t\t\t\tquiz_importado.id_atividade, quiz_importado.distancia, grades.userid as estudante\n\t\t\t\t\tFROM {quiz} AS quiz\n\t\t\t\t\t\tINNER JOIN {quizlv} AS quiz_importado\n\t\t\t\t\t \t\tON quiz.id = quiz_importado.id_quiz\n\t\t\t\t\t \tINNER JOIN {quiz_grades} AS grades\n\t\t\t\t\t \t\tON quiz.id = grades.quiz \n\t\t\t\t\tWHERE quiz.course = ? AND grades.timemodified > quiz_importado.ultima_importacao\n\t\t\t\t\tORDER BY quiz.id asc';\n\t\t\t$params = array($curso_id);\n\t\t\t\n\t\t\t$quizzes = $DB->get_records_sql($sql, $params);\n\t\t\t\n\t\t\tforeach ($quizzes as $quiz) \n\t\t\t{\n\t\t\t\tif ($quiz->distancia == Quizzes::$PRESENCIAL) \n\t\t\t\t{\n\t\t\t\t\t$quiz->presencial = $DB->get_record('lvs_atv_presencial', array('id'=>$quiz->id_atividade));\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\tif (!empty($quizzes)) \n\t\t\t{\n\t\t\t\t$estudantes = array();\n\t\t\t\tforeach ($quizzes as $quiz) {\n\t\t\t\t\t$estudantes[] = $quiz->estudante;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->importarQuizzes($quizzes, array_unique($estudantes));\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "3a6a9254f72e9ac824b3c83ce8cd03d4", "score": "0.5970646", "text": "public function Index(){\n $this->query('SELECT quizzes.*, users.name FROM quizzes JOIN users ON quizzes.user_id = users.id ORDER BY created_at DESC');\n $rows = $this->resultSet();\n // print_r($rows);\n return $rows;\n }", "title": "" }, { "docid": "d6761e1509073ddb351a30e4380a3ffa", "score": "0.5939823", "text": "public function itemsList()\n {\n return DB::table('examseries_data')\n ->join('quizzes', 'quizzes.id', '=', 'quiz_id')\n ->select('quizzes.*' )\n ->where('examseries_id', '=', $this->id)->get();\n }", "title": "" }, { "docid": "5cc2ee8fba055f3f8253b0d17b162216", "score": "0.5939505", "text": "function recycle_quizzes()\n\t{\n\t\tif ($this->course->has_resources(RESOURCE_QUIZ))\n\t\t{\n\t\t\t//$table_qui_que = Database :: get_course_table(TABLE_QUIZ_QUESTION);\n\t\t\t//$table_qui_ans = Database :: get_course_table(TABLE_QUIZ_ANSWER);\n\t\t\t$table_qui = Database :: get_course_table(TABLE_QUIZ_TEST);\n\t\t\t$table_rel = Database :: get_course_table(TABLE_QUIZ_TEST_QUESTION);\n\t\t\t$ids = implode(',', (array_keys($this->course->resources[RESOURCE_QUIZ])));\n\t\t\t$sql = \"DELETE FROM \".$table_qui.\" WHERE id IN(\".$ids.\")\";\n\t\t\tapi_sql_query($sql,__FILE__,__LINE__);\n\t\t\t$sql = \"DELETE FROM \".$table_rel.\" WHERE exercice_id IN(\".$ids.\")\";\n\t\t\tapi_sql_query($sql,__FILE__,__LINE__);\n\t\t}\n\t}", "title": "" }, { "docid": "b5b315c7302b20b33efcda5d349e9dce", "score": "0.5926975", "text": "public function loadQa_Data() {\n $_return = array();\n \n $limit = sprintf('%s,%s', ($this->page - 1) * self::pageLite, self::pageLite);\n \n $sql = sprintf(\"SELECT ql.uid,ql.readi,ql.title,ql.datetime,ql.ansi AS commi,cl.username AS usn FROM `qa_question_list` ql LEFT JOIN client cl ON cl.uid = ql.uid ORDER BY `datetime` DESC,`vote` DESC LIMIT %s;\", $limit);\n \n $re = $this->mysql->query($sql);\n while ($_resultSet = mysql_fetch_array($re)) {\n $_resultSet['ush'] = G::getHeadimg($_resultSet['uid'], 45);\n $_return[] = $_resultSet;\n }\n \n return $_return;\n }", "title": "" }, { "docid": "ccb847ba18c60dc0ebeab3158804a173", "score": "0.5867235", "text": "public function questionSetsArray() {\n return json_decode($this->question_sets, true);\n }", "title": "" }, { "docid": "dba5aad53c5995c24bd3be4f4181748c", "score": "0.581348", "text": "public static function getQuestionsByQuizId($quiz_id) {\n\t\tif($quiz_id > 0){\n\t\t\treturn self::find_all_by_quiz_id($quiz_id);\n\t\t}\n }", "title": "" }, { "docid": "cb9fbcfa04a6bfce022222aa43874bdc", "score": "0.5800885", "text": "function quiz_report_load_questions($quiz){\n global $CFG, $DB;\n $questionlist = quiz_questions_in_quiz($quiz->questions);\n //In fact in most cases the id IN $questionlist below is redundant\n //since we are also doing a JOIN on the qqi table. But will leave it in\n //since this double check will probably do no harm.\n list($usql, $params) = $DB->get_in_or_equal(explode(',', $questionlist));\n $params[] = $quiz->id;\n if (!$questions = $DB->get_records_sql(\"SELECT q.*, qqi.grade AS maxgrade\n FROM {question} q,\n {quiz_question_instances} qqi\n WHERE q.id $usql AND\n qqi.question = q.id AND\n qqi.quiz = ?\", $params)) {\n print_error('noquestionsfound', 'quiz');\n }\n //Now we have an array of questions from a quiz we work out there question nos and remove\n //questions with zero length ie. description questions etc.\n //also put questions in order.\n $number = 1;\n $realquestions = array();\n $questionids = explode(',', $questionlist);\n foreach ($questionids as $id) {\n if ($questions[$id]->length) {\n // Ignore questions of zero length\n $realquestions[$id] = $questions[$id];\n $realquestions[$id]->number = $number;\n $number += $questions[$id]->length;\n }\n }\n return $realquestions;\n}", "title": "" }, { "docid": "112dad375eaa4fbc0a9bdb4c0f73d7b4", "score": "0.57960504", "text": "function getQuestionsRelatedByQuizId(Query $q = null) {\n\t\tif (null === $this->getid()) {\n\t\t\treturn array();\n\t\t}\n\n\t\tif (\n\t\t\tnull === $q\n\t\t\t&& $this->getCacheResults()\n\t\t\t&& !empty($this->QuestionsRelatedByQuizId_c)\n\t\t\t&& !$this->isColumnModified('id')\n\t\t) {\n\t\t\treturn $this->QuestionsRelatedByQuizId_c;\n\t\t}\n\n\t\t$result = Question::doSelect($this->getQuestionsRelatedByQuizIdQuery($q));\n\n\t\tif ($q !== null) {\n\t\t\treturn $result;\n\t\t}\n\n\t\tif ($this->getCacheResults()) {\n\t\t\t$this->QuestionsRelatedByQuizId_c = $result;\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "e3d9ad9f78dd7256b4b236816f083cd6", "score": "0.57231426", "text": "function getQuestions() { \n\ttry {\n\t\t$questions = ORM::for_table('questions')->find_many();\n\t\tif (!count($questions)) { \n\t\t\treturn 0;\n\t\t}\n\t\t$theQuestions = array();\n\t\tforeach ($questions as $question) { \n\t\t\t$theQuestion = array();\n\t\t\t$theQuestion['id'] = $question->id;\n\t\t\t$theQuestion['text'] = $question->text;\n\t\t\t$theQuestion['answer1'] = $question->answer1;\n\t\t\t$theQuestion['answer2'] = $question->answer2;\n\t\t\t$theQuestions[] = $theQuestion;\n\t\t}\n\t\treturn $theQuestions;\n\t} catch (Exception $e) { \n\t\treturn 0;\n\t}\n}", "title": "" }, { "docid": "fd3ac29c58d53eb0ca351c8ea7240f6a", "score": "0.571095", "text": "public function index(Quiz $quiz)\n {\n return $quiz->questions;\n }", "title": "" }, { "docid": "3ab848d42e89d471621a255fc22c6848", "score": "0.5707963", "text": "public function getFaqs() {\r\n $result = $this -> db -> query (\r\n \"SELECT\r\n *\r\n FROM\r\n faqs\r\n \"\r\n );\r\n\r\n $return = array();\r\n \r\n if ($result ) {\r\n /* fetch associative array */\r\n while ($row = $result->fetch_assoc()) {\r\n $return['faq'][]['nodes'] = array (\"question\" => $row['question'],\r\n \"answer\" => $row['answer']\r\n );\r\n }\r\n\r\n /* free result set */\r\n $result->free();\r\n }\r\n \r\n return $return;\r\n }", "title": "" }, { "docid": "20ee40091f92cae5efee74563795a8d3", "score": "0.5667245", "text": "public function getallquetes()\n\t\t\t{\n\t\t\t\t$data = $this->id_quetes;\n\t\t\t\t$data = $data.$this->nom_quetes;\n\t\t\t\t$data = $data.$this->description_quetes;\n $data = $data.$this->date_fin_quetes;\n $data = $data.$this->difficulte_quetes;\n\t\t\t\t$data = $data.$this->periode_quetes;\n\t\t\t\t$data = $data.$this->niv;\n $data = $data.$this->amount_quetes;\n $data = $data.$this->etat_que;\n\t\t\t\t$data = $data.$this->typequetes;\n\n\t\t\t\treturn $data;\n\t\t\t}", "title": "" }, { "docid": "6ef5d28e2226e7b7bd0e00320c203ea2", "score": "0.5640038", "text": "function &getExistingQuestions() \n\t{\n\t\tglobal $ilDB;\n\t\t$existing_questions = array();\n\t\t$result = $ilDB->queryF(\"SELECT svy_question.original_id FROM svy_question, svy_svy_qst WHERE \" .\n\t\t\t\"svy_svy_qst.survey_fi = %s AND svy_svy_qst.question_fi = svy_question.question_id\",\n\t\t\tarray('integer'),\n\t\t\tarray($this->getSurveyId())\n\t\t);\n\t\twhile ($data = $ilDB->fetchAssoc($result)) \n\t\t{\n\t\t\tif($data[\"original_id\"])\n\t\t\t{\n\t\t\t\tarray_push($existing_questions, $data[\"original_id\"]);\n\t\t\t}\n\t\t}\n\t\treturn $existing_questions;\n\t}", "title": "" }, { "docid": "644ed3cc530683d3412a6c7bf455a74a", "score": "0.5636027", "text": "function get_quizzes_by_teacher($teacher){\n $str_query=\"select * from mwc_quizzine_quiz where teacher_id='$teacher'\";\n if(!$this->query($str_query)){\n return false;\n }\n return $this->fetch();\n }", "title": "" }, { "docid": "770bfaf8e9f42b6abaef12f8b6ab5456", "score": "0.5616663", "text": "public function getQuestions()\n {\n if (!empty($this->questionsMetadata)) {\n foreach ($this->questions as $question) {\n /** @var Question $question */\n $data = $question->get_data();\n $metadata = $data->get_metadata();\n\n if (!isset($metadata)) {\n $qtype = $data->get_type();\n // HACK: longtextV2 doesn't have a corresponding entity, so force it to use the similar longtext one\n if ($qtype === 'longtextV2') {\n $qtype = 'longtext';\n }\n $metadataClass = '\\\\LearnosityQti\\\\Entities\\\\QuestionTypes\\\\'.$qtype.'_metadata';\n $metadata = new $metadataClass();\n $data->set_metadata($metadata);\n }\n\n $this->populateQuestionMetadata($metadata, $this->questionsMetadata);\n }\n }\n return array_merge(array_values($this->questions), $this->getRubricQuestions());\n }", "title": "" }, { "docid": "17d24c91a63cfe28683a57ad4a6b7ca5", "score": "0.56052405", "text": "function getQuizQuestions($link, $quiz_id){\r\n\t$sql = \"SELECT * FROM questions WHERE quiz_id = \".$quiz_id;\r\n\t$results = mysqli_query($link, $sql);\r\n\t$total = array();\r\n\twhile($row = mysqli_fetch_assoc($results)){\r\n\t\t$total[] = $row;\r\n\t}\r\n\treturn $total;\r\n}", "title": "" }, { "docid": "8ac9c01917048953669823545ea99299", "score": "0.55962163", "text": "public function getQuestionQuiz ($quiz=\"\") \n {\n \tglobal $debug;\n \t\n \t// if $quiz not specified get all questions in db (even those with no quiz)\n \t// Initial sql without where - add where part later if required\n \t$sql = \"SELECT \".$this->table_prefix.$this->quiz_tables['questions'].\".questionid, section, intro, input, type, answer, reason, reference, hint, image, comments, qfrom, email, created, reviewed, quizname FROM \". $this->table_prefix.$this->quiz_tables['questions']. \" LEFT OUTER JOIN \".$this->table_prefix.$this->quiz_tables['rel'].\" on \".$this->table_prefix.$this->quiz_tables['questions'].\".questionid=\".$this->table_prefix.$this->quiz_tables['rel'].\".questionid\";\n \t \t \t\n \t// if we limit to a quiz then handle here\n \tif ($quiz!=\"\")\n \t{\n \t\t// add a where clause - no security checking here - it needs to be done at a higher level\n \t\t$sql .= \" WHERE \".$this->table_prefix.$this->quiz_tables['rel'].\".quizname=\\\"$quiz\\\"\";\n \t}\n \t\n \t// Add order by after where clause if we have one\n \t$sql .= \" ORDER BY \".$this->table_prefix.$this->quiz_tables['questions'].\".questionid\";\n \t\n \t\n \tif (isset ($debug) && $debug) {print \"SQL: \\n\".$sql.\"\\n\\n\";}\n \t\n \t// Get all the rows into a temp array - we then reformat appropriately (eg. move quizname into array instead of individual rows\n \t\n \t$temp_array = $this->db_object->getRowsAll ($sql);\n \t// check for errors\n \tif (isset ($temp_array['ERRORS'])) \n \t{\n \t\tif ($debug) {print \"Error in getQuestionQuiz \\n\";}\n \t\t//-here userfriendly handling?\n \t\t//print \"An error has occurred\";\n \t\t$err = Errors::getInstance();\n \t\t$err->errorEvent(ERROR_DATABASE, \"Error reading database\"+$temp_array['ERRORS']);\n\n \t}\n \t\n \t// New array that we return from the function\n \t$return_array = array();\n\n \t//print \"DEBUG\\n\";\n \t//print_r ($temp_array);\n \t\n \t// iterate over all arrays - set so we only have one question\n \tforeach ($temp_array as $this_array)\n \t{\n \t\t// pull this out of array as we will use a few times and makes easier to read\n \t\t$this_question_id = $this_array['questionid'];\n \t\t// does this question already exist - if so just add this quiz to it's quiz array\n \t\tif (isset($return_array[$this_question_id]))\n \t\t{\n \t\t\t$return_array[$this_question_id]['quizzes'][] = $this_array['quizname'];\n \t\t}\n \t\t// This is new so create a new array entry\n \t\telse\n \t\t{\n \t\t\tforeach ($this_array as $key => $value)\n \t\t\t{\n \t\t\t\t// handle quizname seperately (create array with this value as an entry\n \t\t\t\tif ($key == \"quizname\") {$return_array[$this_question_id]['quizzes']= array($value);}\n \t\t\t\telse {$return_array[$this_question_id][$key]=$value;}\n \t\t\t}\n \t\t}\n \t}\n \treturn $return_array;\n }", "title": "" }, { "docid": "488c20cbd0e86ab6cec600bad6a6ba61", "score": "0.55895436", "text": "public function getHistory()\n {\n \treturn QuizResult::where('user_id', '=', Auth::user()->id)->orderBy('id', 'DESC')->limit(5)->get();\n }", "title": "" }, { "docid": "ad11a769f149df9a1bbc32136f43073f", "score": "0.5575324", "text": "public static function getAllQuestionsAndAnswers(){\n $returnArray = array(\n 'Result' => 1,\n 'Reason' => \"\",\n 'QuestionResponses' => array()\n );\n\n $questionObjects = question::getAllQuestions();\n\n if(count($questionObjects) > 0){\n $responsesArray = self::buildQuestionsAndAnswersArray_Admin($questionObjects);\n $returnArray['QuestionResponses'] = $responsesArray;\n }\n else{\n $returnArray['Result'] = 0;\n $returnArray['Reason'] = \"No questions were found\";\n }\n\n return $returnArray;\n }", "title": "" }, { "docid": "5a17fa2d7df166a9f56d3b573bf82e8e", "score": "0.5574731", "text": "private function get_user_quiz_details() {\n\t\t\tif ( isset( $this->user_quiz_data[ $this->current()->getUserId() ] ) ) {\n\n\t\t\t\treturn $this->user_quiz_data[ $this->current()->getUserId() ];\n\t\t\t}\n\n\t\t\t$user_quizzes = (array) get_user_meta( $this->current()->getUserId(), '_sfwd-quizzes', true );\n\t\t\t$user_quizzes_stats = array();\n\t\t\t/**\n\t\t\t * We want to rebuild/reindex the quizzes listing to be by\n\t\t\t * the statatistics ref ID.\n\t\t\t */\n\t\t\tif ( ! empty( $user_quizzes ) ) {\n\t\t\t\tforeach ( $user_quizzes as $user_quiz ) {\n\t\t\t\t\tif ( ( ! isset( $user_quiz['statistic_ref_id'] ) ) || ( empty( $user_quiz['statistic_ref_id'] ) ) ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t$statistic_ref_id = absint( $user_quiz['statistic_ref_id'] );\n\t\t\t\t\t$user_quizzes_stats[ $statistic_ref_id ] = $user_quiz;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->user_quiz_data[ $this->current()->getUserId() ] = $user_quizzes_stats;\n\n\t\t\treturn $this->user_quiz_data[ $this->current()->getUserId() ];\n\t\t}", "title": "" }, { "docid": "dc678e3b5779a2e1610bf924861c6647", "score": "0.5572206", "text": "public static function getAllFAQFromDB(){\r\n include_once './db_functions.php';\r\n $db = new DB_Functions();\r\n $query = \"SELECT *\r\n FROM \t FAQ;\";\r\n $resQuery = $db->executeQuery($query);\r\n\r\n $i=0;\r\n $allFAQ= array();\r\n foreach($resQuery[\"response\"] as $row ){\r\n $FAQ = FAQ($row[0],$row[1],$row[2],$row[3],$row[4]);\r\n $allFAQ[$i] = $FAQ;\r\n $i++;\r\n }\r\n return $allFAQ;\r\n }", "title": "" }, { "docid": "a2b62ef7282e42fa9a2c4c69465a733e", "score": "0.55517834", "text": "function get_qoptions($qid){\n\n\tglobal $dbc;\n\t$sql = $dbc->query(\"select * from questionoptions where qid = '$qid' \");\n\t// $rows[]=\"\";\n\twhile($row = $sql->fetch_array()){\n\t\t$rows[] = $row;\n\t}\n\treturn $rows;\n}", "title": "" }, { "docid": "cc59686836ff5b7a7df2429c30a0c0c0", "score": "0.55344915", "text": "public function qw() {\n $prep = $this->db->prepare('\n SELECT question,reponse\n FROM faq ');\n\n $prep->execute();\n\n return $prep->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "56aacc705037e5d9a55bf9c06a73856c", "score": "0.5531332", "text": "function getQuizSessionsRelatedByQuizId(Query $q = null) {\n\t\tif (null === $this->getid()) {\n\t\t\treturn array();\n\t\t}\n\n\t\tif (\n\t\t\tnull === $q\n\t\t\t&& $this->getCacheResults()\n\t\t\t&& !empty($this->QuizSessionsRelatedByQuizId_c)\n\t\t\t&& !$this->isColumnModified('id')\n\t\t) {\n\t\t\treturn $this->QuizSessionsRelatedByQuizId_c;\n\t\t}\n\n\t\t$result = QuizSession::doSelect($this->getQuizSessionsRelatedByQuizIdQuery($q));\n\n\t\tif ($q !== null) {\n\t\t\treturn $result;\n\t\t}\n\n\t\tif ($this->getCacheResults()) {\n\t\t\t$this->QuizSessionsRelatedByQuizId_c = $result;\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "43aad3a890558fa19d087036c0ec2ea4", "score": "0.55299985", "text": "function quiz_report_list($context) {\n global $DB;\n static $reportlist = null;\n if (!is_null($reportlist)){\n return $reportlist;\n }\n $reports = $DB->get_records('quiz_report', null, 'displayorder DESC', 'name, capability');\n $reportdirs = get_plugin_list('quiz');\n\n // Order the reports tab in descending order of displayorder\n $reportcaps = array();\n foreach ($reports as $key => $obj) {\n if (array_key_exists($obj->name, $reportdirs)) {\n $reportcaps[$obj->name] = $obj->capability;\n }\n }\n\n // Add any other reports on the end\n foreach ($reportdirs as $reportname => $notused) {\n if (!isset($reportcaps[$reportname])) {\n $reportcaps[$reportname] = null;\n }\n }\n $reportlist = array();\n foreach ($reportcaps as $name => $capability){\n if (empty($capability)){\n $capability = 'mod/ipal/quiz:viewreports';\n }\n if (has_capability($capability, $context)){\n $reportlist[] = $name;\n }\n }\n return $reportlist;\n}", "title": "" }, { "docid": "97eb8f2bdaca17ab83b1aef63708054d", "score": "0.5526172", "text": "function answers()\r\n {\r\n $returnArray = array();\r\n $db =& eZDB::globalDatabase();\r\n $db->array_query( $questionArray, \"SELECT ID FROM eZQuiz_Answer WHERE AlternativeID='$this->ID'\" );\r\n\r\n for ( $i = 0; $i < count( $questionArray ); $i++ )\r\n {\r\n $returnArray[$i] = new eZQuizAnswer( $questionArray[$i][$db->fieldName( \"ID\" )], true );\r\n }\r\n return $returnArray;\r\n }", "title": "" }, { "docid": "044a8288c903a52070265f492b8a992b", "score": "0.55186063", "text": "public function index() {\n $quizz_list = Quizz::all();\n foreach($quizz_list as $quizz) {\n $cat = QuizzCategory::where('quizz_id', $quizz->id)->get('category_id');\n $questions = Question::where('quizz', $quizz->id)->get();\n foreach($cat as $c){\n $quizz->categories = Category::where('id', $c->category_id)->get('name');\n }\n // foreach($questions as $q) {\n // $reponses = Response::where('question', $q->id)->get();\n // $quizz->questions = Word::where('id', $q->word)->get();\n // $quizz->responses = $reponses;\n // }\n }\n json($quizz_list, 200);\n }", "title": "" }, { "docid": "740e002beabdfba75a9da78f35b77b13", "score": "0.5517318", "text": "function getQuestionsQuery(Query $q = null) {\n\t\treturn $this->getForeignObjectsQuery('question', 'quiz_id','id', $q);\n\t}", "title": "" }, { "docid": "0b28728242d54ec346965add2570c689", "score": "0.5498703", "text": "public function getToppersList($quiz_id='')\n {\n \t$list = array();\n \tif($quiz_id=='')\n \t\treturn $list;\n \n \treturn QuizResult::\n where('quiz_id', '=', $quiz_id)\n \t\t\t\t\t->where('exam_status', '=', 'pass')\n \t\t\t\t\t->orderBy('percentage', 'DESC')->limit(5)\n \t\t\t\t\t->groupBy('user_id')\n \t\t\t\t\t->get();\n }", "title": "" }, { "docid": "633595bc60a14b4e9a664cc90abe4780", "score": "0.5486835", "text": "public function get_quiz_questions_with_id($quiz_id) {\n\t\t\t$sql = \"SELECT *\n\t\t\t\t\tFROM quiz_questions\n\t\t\t\t\tWHERE quiz_id = :quiz_id \n\t\t\t\t\tAND status = 'enabled'\";\n\t\t\t$check_query = PDO::prepare($sql);\n\t\t\t$check_query->execute(['quiz_id'=>$quiz_id]);\n\t\t\t// echo print_r($check_query->errorInfo());\n\t\t\treturn $record_array = $check_query->fetchAll(PDO::FETCH_ASSOC);\n\n\t\t}", "title": "" }, { "docid": "b62f9e8ed7bc915b216349eeb8616bce", "score": "0.54744685", "text": "public function getQuestions(): array\n {\n $questions = [];\n foreach ($this->block->getQuestions() as $question) {\n $cleanedAnswer = implode('', $this->fixIsiteMarkupHelper->getParagraphs($question['answer']));\n $questions[] = [\n 'question' => $question['question'],\n 'answer' => $cleanedAnswer,\n ];\n }\n return $questions;\n }", "title": "" }, { "docid": "82c912acea7131246bd52b1500d9e205", "score": "0.54682773", "text": "protected function getAllItems()\n {\n $sectionModel = new SectionModel();\n\n $categories = $sectionModel->where('is_deleted', 0)->select('id, name, question_type_id')->findAll();\n\n $questions = array();\n\n foreach($categories as $category) {\n // Get type of question\n $qType_id = $category['question_type_id'];\n // get choices and store in a list with the\n // category name as the key\n $choices[$category['name']] = $this->getChoices($qType_id);\n\n $result = $sectionModel->getQuestions($category['id']);\n $questions[$category['name']] = $result;\n }\n\n return [$questions, $choices];\n }", "title": "" }, { "docid": "f957572ac07b3c9a8d1ba5dfaf818607", "score": "0.5466914", "text": "public function get_all_question_answer_list()\n\t{\n\t\t\n\t\t$sql=\"select * from question_answer\";\n\t\t$query=$this->db->query($sql);\n\t\t//print_r($query->result_object());die();\n\t\treturn $query->result_object();\n\t}", "title": "" }, { "docid": "3219ee570d074dac1d3ed7f8a4df60cb", "score": "0.5457955", "text": "public function getQuizzes()\r\n{\r\n $query_string = \"SELECT quizid, quizname, quizdescription \";\r\n $query_string .= \"FROM quizzes\";\r\n\r\n return $query_string;\r\n}", "title": "" }, { "docid": "6172b1782bde440c7ca8304ec89b8930", "score": "0.5455349", "text": "public function completedQuestionSetsArray() {\n return array_map('intval', array_keys(json_decode($this->question_sets_completed, true)));\n }", "title": "" }, { "docid": "7dab8899fc551281ca3046592ca66daa", "score": "0.54537433", "text": "public function getQuestions() {\r\n\t\t\treturn $this->_arrQuestions;\r\n\t\t}", "title": "" }, { "docid": "3cdd1d0156493277e1a5f9f5a9dd9ff5", "score": "0.5435829", "text": "public function question()\n {\n return $this->hasMany('App\\Models\\Question', 'quizzes_id');\n }", "title": "" }, { "docid": "9f44c24107da3c30633cb493bbeb861f", "score": "0.5419346", "text": "function getQuizResults($link, $quiz_id){\r\n\t$sql = \"SELECT * FROM quiz_results WHERE quiz_id = \".$quiz_id;\r\n\t$results = mysqli_query($link, $sql);\r\n\t$total = array();\r\n\twhile($row = mysqli_fetch_assoc($results)){\r\n\t\t$total[] = $row;\r\n\t}\r\n\treturn $total;\r\n}", "title": "" }, { "docid": "b69bb94950a5ecad6ea733143f8e6bc6", "score": "0.54132855", "text": "function get_Questions()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$db = DB::getConnection();\n\t\t\t$st = $db->prepare( 'SELECT * FROM questions' );\n\t\t\t$st->execute( array( ) );\n\t\t}\n\t\tcatch( PDOException $e ) { exit( 'PDO error ' . $e->getMessage() ); }\n\n\t\t$arr = array();\n\t\twhile( $row = $st->fetch() )\n\t\t{\n\t\t\t$arr[] = new Question( $row['id'], $row['question']);\n\t\t}\n\n\t\treturn $arr;\n\t}", "title": "" }, { "docid": "3b5e0a2891a86a884dc10a619aa70d66", "score": "0.5412734", "text": "public function get($id)\n\t{\n\t\t$this->db->select('quizzes.*, COUNT(questions.id) AS questions');\n\t\t$this->db->join('questions', 'questions.id = quizzes.id', 'LEFT');\n\t\t$this->db->where('quizzes.id', $id);\n\n\t\t$query = $this->db->get('quizzes', 1);\n\n\t\tif($query->num_rows() > 0)\n\t\t{\n\t\t\treturn $query->row_array();\n\t\t}\n\n\t\telse\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "2013754123df9e515acf5f8412329be7", "score": "0.54077643", "text": "public function getPreDefinedQuestions()\n {\n return [\n \"1\" => \"Select a Security Question\",\n \"2\" => \"What was your childhood nickname?\",\n \"3\" => \"What is the name of your favorite childhood friend?\",\n \"4\" => \"What was the name of your first stuffed animal?\",\n \"5\" => \"Where were you when you had your first kiss?\",\n \"6\" => \"What is the name of the company of your first job?\",\n \"7\" => \"What was your favorite place to visit as a child?\",\n \"8\" => \"What was your dream job as a child?\",\n \"9\" => \"What is your preferred musical genre?\",\n \"10\" => \"What is your favorite team?\",\n \"11\" => \"What is your father\\\"s middle name?\"\n ];\n }", "title": "" }, { "docid": "5d0b3562c3532fdeb70cd1505365b950", "score": "0.54056436", "text": "public function getAllAnswers($section_id, $q_id)\n {\n $this->db->select('answer, COUNT(*) as num_answers');\n $this->db->from('answer');\n $this->db->join('submission', 'answer.sub_id = submission.sub_id');\n $this->db->where('q_id', $q_id);\n $this->db->where('section_id', $section_id);\n $this->db->where('submitted', self::SUBMITTED);\n $this->db->group_by('answer');\n\n return $this->db->get()->result_array();\n }", "title": "" }, { "docid": "0791b074ef2d9b6610df50060d21bbd9", "score": "0.540408", "text": "public function all()\n\t{\n\t\t$r = Array();\n\t\tif($db = $this->module->db())\n\t\t{\n\t\t\tif($result = $db->query(\"SELECT\n\t\t\t\tid\n\t\t\t\tFROM\n\t\t\t\t\".$db->getPrefix().\"faq;\"))\n\t\t\t{\n\t\t\t\twhile( $line = mysql_fetch_array( $result ) )\n\t\t\t\t{\n\t\t\t\t\t$r[] = new FAQ($this->module, $line[0]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $r;\n\t}", "title": "" }, { "docid": "694532f94a84fc041f5716eb37a806ab", "score": "0.5399852", "text": "function get_quizzes_by_category($category){\n $str_query=\"select * from mwc_quizzine_quiz where category_id='$category'\";\n if(!$this->query($str_query)){\n return false;\n }\n return $this->fetch();\n }", "title": "" }, { "docid": "2f4a182377fc293f4e098e71df4c5f57", "score": "0.5368992", "text": "private function _Questions ( ) {\n\t\t$Config = $this->Get ( 'Config' );\n\t\t$quests = $Config['questions'];\n\t\t$groups = $Config['question_groups'];\n\t\tforeach ( $groups as $g => $group ) {\n\t\t\t$Groups[$group] = new stdClass();\n\t\t\t$Groups[$group]->Label = $Config['question_group_labels'][$g];\n\t\t\tforeach ( $quests as $q => $quest ) {\n\t\t\t\tif ( $Config['question_group'][$q] != $g ) continue;\n\t\t\t\t$Groups[$group]->Questions[$quest] = new stdClass();\n\t\t\t\t$Groups[$group]->Questions[$quest]->Label = $Config['question_labels'][$q];\n\t\t\t\t$Groups[$group]->Questions[$quest]->Type = $Config['question_types'][$q];\n\t\t\t\t$Groups[$group]->Questions[$quest]->Field = $Config['question_fields'][$q];\n\t\t\t\t$Groups[$group]->Questions[$quest]->Social = $Config['question_social'][$q];\n\t\t\t\t$Groups[$group]->Questions[$quest]->Display = $Config['question_display'][$q];\n\t\t\t\tif ( $Config['question_options'][$q] )\n\t\t\t\t\t$Groups[$group]->Questions[$quest]->Options = explode ( '|', $Config['question_options'][$q] );\n\t\t\t}\n\t\t\tksort ( $Groups[$group]->Questions );\n\t\t}\n\t\tksort ( $Groups );\n\t\treturn ( $Groups );\n\t}", "title": "" }, { "docid": "5c2aebc9cce5c978a855c341e6f483c1", "score": "0.53668183", "text": "private function _recuperarQuizzesRespondidos($quizlv) {\n\t\tglobal $DB;\n\t\n\t\t$sql = 'SELECT grades.id, quiz.id as quiz, grades.userid as estudante, grades.grade as nota \n\t\t\t\tFROM {quiz} as quiz \n\t\t\t\tINNER JOIN {quiz_grades} AS grades ON quiz.id = grades.quiz \n\t\t\t\tWHERE quiz.course = ? AND quiz.id = ?';\n\t\t$params = array( $quizlv->id_curso, $quizlv->id_quiz );\n\t\n\t\treturn $DB->get_records_sql($sql, $params);\n\t}", "title": "" }, { "docid": "1b2d981f075c02cf46f00e9141db6528", "score": "0.5351203", "text": "function theme_quiz_marking_show_available_quizes($results) {\r\n $output = '';\r\n $rows = array();\r\n while (list($key, $result) = each($results)) {\r\n $rows[] = array(\r\n check_plain($result['title']),\r\n l(\"View\",\"admin/quiz/{$result['nid']}/view_marks/0\").\" | \".l(\"Update\",\"admin/quiz/{$result['nid']}/view_marks/1\")\r\n );\r\n }\r\n\r\n $header = array(\r\n t('Quiz Title'),\r\n t('Action')\r\n );\r\n\r\n if (!empty($rows)) {\r\n $output .= theme('table', $header, $rows);\r\n }\r\n else {\r\n $output .= t('No Quizes Found');\r\n }\r\n return $output;\r\n}", "title": "" }, { "docid": "10639381b0b08bf318c39b011dd40792", "score": "0.5344612", "text": "function getAll() {\r\n\t\treturn SurveyAnswerQuery::create()->find();\r\n\t}", "title": "" }, { "docid": "3145672f2c5ffdb6b7613d0f37d93701", "score": "0.5337894", "text": "function getQuestionsRelatedByQuizIdQuery(Query $q = null) {\n\t\treturn $this->getForeignObjectsQuery('question', 'quiz_id', 'id', $q);\n\t}", "title": "" }, { "docid": "b8c91e341578beca6e0453473443f6cb", "score": "0.53263146", "text": "function getQuestions($extra = null) {\n\t\treturn $this->getQuestionsRelatedByQuizId($extra);\n\t}", "title": "" }, { "docid": "8575f54f4021c37786650ee3147306d4", "score": "0.52922136", "text": "function getAll( $offset = 0, $limit = 20 )\r\n {\r\n $db =& eZDB::globalDatabase();\r\n\r\n $returnArray = array();\r\n $questionArray = array();\r\n\r\n $db->array_query( $questionArray, \"SELECT ID FROM eZQuiz_Question\r\n ORDER BY StartDate DESC\",\r\n array( \"Offset\" => $offset, \"Limit\" => $limit ) );\r\n\r\n for ( $i = 0; $i < count( $questionArray ); $i++ )\r\n {\r\n $returnArray[$i] = new eZQuizQuestion( $questionArray[$i][$db->fieldName( \"ID\" )] );\r\n }\r\n\r\n return $returnArray;\r\n }", "title": "" }, { "docid": "e3f7f43e1fbe5d3585daf72d8cbc82ec", "score": "0.52884334", "text": "public function queryAll(){\n\t\t$sql = 'SELECT * FROM answer';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "title": "" }, { "docid": "b29b661a7ed5e45fdf55924d25258d3f", "score": "0.5275358", "text": "public function run()\n {\n $Faqs = [\n array(\n 'id' => '1',\n 'question' => 'What do cleaning services include?',\n 'answer' => 'Residential cleaning services include the following basic duties:\n Dusting.\n Mopping floors.\n Vacuuming.\n Fixtures.\n Washing surfaces.\n Polishing mirrors etc.',\n 'active' => '1',\n 'category_id' => '3',\n 'licensor_id' => '1',\n 'store_id' => '1',\n 'created_at' => '2020-02-25 00:00:00',\n 'updated_at' => '2020-02-25 00:00:00',\n ),\n array(\n 'id' => '2',\n 'question' => 'What does a hotel cleaner do?',\n 'answer' => 'Housekeeping cleaners do light cleaning tasks in homes and commercial establishments, such as hotels, restaurants, hospitals, and nursing homes. Those who work in hotels, hospitals, and other commercial establishments are responsible for cleaning and maintaining the premises. They may also share other duties.',\n 'active' => '1',\n 'category_id' => '3',\n 'licensor_id' => '1',\n 'store_id' => '1',\n 'created_at' => '2020-02-25 00:00:00',\n 'updated_at' => '2020-02-25 00:00:00',\n ),\n array(\n 'id' => '3',\n 'question' => 'What can a Nomi cleaner do in 2 hours?',\n 'answer' => 'What can be accomplished in 2 hours?\n Vacuuming the entire house.\n Cleaning the bathrooms, including toilets.\n Cleaning the kitchen, including quickly mopping the floor.\n A few assorted small tasks like wiping surfaces down.',\n 'active' => '1',\n 'category_id' => '3',\n 'licensor_id' => '1',\n 'store_id' => '1',\n 'created_at' => '2020-02-25 00:00:00',\n 'updated_at' => '2020-02-25 00:00:00',\n ),\n\n\n\n ];\n foreach ($Faqs as $faq) {\n Faqs::create($faq);\n }\n\n }", "title": "" }, { "docid": "9fd300217852d7ff329dc6eb4ec06faa", "score": "0.5273697", "text": "function getallprefect(){\n $q = $this->db->query('SELECT * FROM prefectures');\n return $q;\n }", "title": "" }, { "docid": "cde7be55e0a03d239fb079b398d61972", "score": "0.5267971", "text": "public function getQueryHistory(): array;", "title": "" }, { "docid": "e560ed85a42af7f3b01e9d203e9bf513", "score": "0.5267699", "text": "public function findAllCheques()\n {\n $qb = $this->createQueryBuilder('c')\n ->select('c.numCheque')\n ->getQuery()\n ->getResult(ORM\\Query::HYDRATE_ARRAY);\n\n return $qb;\n }", "title": "" }, { "docid": "87977abcf877c04da6d1cd36fdc4bf9c", "score": "0.5266075", "text": "private function questionList()\n {\n \t$requiredQuestions = [];\n\n \tfor ($x = 1; $x <= count($this->questions); $x++) {\n \t\t$requiredQuestions[ config('constants.questionInputPrefix') . $x] = 'required';\n \t}\n\n \treturn $requiredQuestions;\n }", "title": "" }, { "docid": "5c6c3606bd3f5cdd37317d410d19ad67", "score": "0.5263399", "text": "public function faqs() {\n return $this->morphedByMany(Faq::class, 'taggable');\n }", "title": "" }, { "docid": "5439067594055efb07a7ec40896e3431", "score": "0.52516127", "text": "public static function getAll() {\n \treturn Question::whereNull('deleted_at')->get();\n }", "title": "" }, { "docid": "eac64485717e80e9b067646871f1b5aa", "score": "0.5249489", "text": "public function getQuestionsAndAnswers()\n {\n $categoryId = $this->getRequest()->getParam('id', $this->getData('id'));\n if (!$categoryId) {\n $categoryId = Mage::getModel('faq/category')->getCollection()->getFirstItem()->getId();\n }\n $category = Mage::getModel('faq/category')->load($categoryId);\n $collection = $category->getFaqCollection();\n $collection->getSelect()->order('position ASC');\n return $collection;\n }", "title": "" }, { "docid": "42e9629eccde4fbd376676ca4282a33b", "score": "0.5205179", "text": "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 }", "title": "" }, { "docid": "13e52b495a60d19b54554459c195a9fe", "score": "0.5188276", "text": "public function getAll()\n {\n return $this->_answers;\n }", "title": "" }, { "docid": "8fe7ed323c5142e32dcc5f4ccfe2a1cf", "score": "0.51871616", "text": "function get_all_preferences() {\n $sql = \"SELECT * FROM com_preferences\n WHERE pref_id > 10\n ORDER BY pref_group ASC, pref_nm ASC\";\n $query = $this->db->query($sql);\n if ($query->num_rows() > 0) {\n $result = $query->result_array();\n $query->free_result();\n return $result;\n } else {\n return array();\n }\n }", "title": "" }, { "docid": "abd77c0c91d4c3184648280586c00d14", "score": "0.5186815", "text": "function ipal_get_questions_student($qid){\r\n\r\n global $ipal;\r\n global $DB;\r\n global $CFG;\r\n\t\t$q='';\r\n\t\t$pagearray2=array();\r\n\t\t\r\n $aquestions=$DB->get_record('question',array('id'=>$qid));\r\n\t\t\tif($aquestions->questiontext != \"\"){ \r\n\r\n\t$pagearray2[]=array('id'=>$qid, 'question'=>$aquestions->questiontext, 'answers'=>ipal_get_answers_student($qid));\r\n\t\t\t\t\t\t\t}\r\n return($pagearray2);\r\n}", "title": "" }, { "docid": "f2b099d4215c3fdbfc953de39c5bf553", "score": "0.51648146", "text": "public function index()\n {\n return response(QuizResource::collection(Auth::user()->quizes), 200);\n }", "title": "" }, { "docid": "3bda51226fca0af03eea2c5b3722fda7", "score": "0.5156142", "text": "function buildQuiz() {\n for ($i = 0; $i <= 9; $i++) {\n $randomNumbers = getRandomNumbers();\n $correctAnswer = getCorrectAnswer($randomNumbers);\n $answers = getRandomAnswers($correctAnswer);\n $quiz[] = [\n \"leftAdder\" => $randomNumbers[0],\n \"rightAdder\" => $randomNumbers[1],\n \"correctAnswer\" => $correctAnswer,\n \"firstIncorrectAnswer\" => $answers[0],\n \"secondIncorrectAnswer\" => $answers[1],\n ];\n }\n return $quiz;\n}", "title": "" }, { "docid": "9f728ad2a8026ef1103e2d645f54ca92", "score": "0.5143323", "text": "public function index()\n {\n return new QuizCollection(Quiz::all());\n }", "title": "" }, { "docid": "7f0df35322f511e2a63ffd04dc5a7382", "score": "0.51319003", "text": "public function iN_ListQuestionAnswerFromLanding() {\n\t\t$query = mysqli_query($this->db, \"SELECT * FROM i_landing_qa WHERE qa_status = '1'\") or die(mysqli_error($this->db));\n\t\twhile ($row = mysqli_fetch_array($query, MYSQLI_ASSOC)) {\n\t\t\t// Store the result into array\n\t\t\t$data[] = $row;\n\t\t}\n\t\tif (!empty($data)) {\n\t\t\treturn $data;\n\t\t}\n\t}", "title": "" }, { "docid": "16db46110e98194ae186ed53c6f4756b", "score": "0.5124392", "text": "public function getFAQs()\n {\n $faqsList = Faq::selectRaw('id,question,title,answer')->where('isActive',1)->get();\n \n if($faqsList->isNotEmpty())\n {\n return $this->toJson(['faqsList' => $faqsList], trans('api.faq.faq_found'), 1);\n }\n\n return $this->toJson([], trans('api.faq.faq_not_found'), 0);\n }", "title": "" }, { "docid": "7b74e5d1cd4c1440d99c7b6b1bb59667", "score": "0.5119383", "text": "public function getSettingsAll ()\n {\n \tglobal $debug;\n \t\n \t$settings = array();\n \t$select_string = \"select settings_key,settings_value from \".$this->table_prefix.$this->quiz_tables['settings'];\n \t$settings = $this->db_object->getKeyValue ($select_string, \"settings_key\", \"settings_value\");\n \treturn $settings;\n }", "title": "" }, { "docid": "1c7753be0bea8257fb3354a75e11221f", "score": "0.5104879", "text": "public function getQuestions()\n {\n return $this->questions;\n }", "title": "" }, { "docid": "1c7753be0bea8257fb3354a75e11221f", "score": "0.5104879", "text": "public function getQuestions()\n {\n return $this->questions;\n }", "title": "" }, { "docid": "31464bdc3c779e5e0b95be0c03990037", "score": "0.51029223", "text": "public function all() {\n $stmt = $this->pdo->query('SELECT id, symbol, company '\n . 'FROM stocks '\n . 'ORDER BY symbol');\n $stocks = [];\n while ($row = $stmt->fetch(\\PDO::FETCH_ASSOC)) {\n $stocks[] = [\n 'id' => $row['id'],\n 'symbol' => $row['symbol'],\n 'company' => $row['company']\n ];\n }\n return $stocks;\n }", "title": "" }, { "docid": "934c81ad2f7b90688ba7cfece91a5f83", "score": "0.5097795", "text": "public function getAllOptions() {\n\t\t$music = Mage::helper('clipgenerator')->getMusic();\n\t\t$musicArr = array();\n\t\tforeach ($music['songs'] as $k => $v) {\n\t\t\t$musicArr[] = array(\n\t\t\t\t'value' => $v['id'],\n\t\t\t\t'label' => $v['title']\n\t\t\t);\n\t\t}\n\n\t\treturn $musicArr;\n\t}", "title": "" }, { "docid": "37104296222370297e0a1eec074b53c6", "score": "0.5090978", "text": "public function getquestion()\r\n {\r\n \r\n $con = new Connection();\r\n $conn = $con->getConnection();\r\n $ques = array();\r\n $i = 0;\r\n \r\n $query = \"SELECT `id`,`question_id`, `exam_id`,`subject_id`, `node_id`,`question`,`created_date` FROM `question`\";\r\n $result = mysqli_query($conn, $query);\r\n if (mysqli_num_rows($result) > 0) {\r\n while ($row = mysqli_fetch_assoc($result)) {\r\n $q = new question();\r\n //$ea->setId( $row ['id']);\r\n $q->setQuestion_id( $row ['question_id']);\r\n $q->setExam_id( $row ['exam_id']);\r\n $q->setSubject_id( $row ['subject_id']);\r\n $q->setNode_id( $row ['node_id']);\r\n $q->setQuestion( $row ['question']);\r\n \r\n }\r\n \r\n \r\n $ques[$i ++] = array(\r\n \"id\" => $row[\"question_id\"],\r\n \"ques\" => $q\r\n );\r\n \r\n }\r\n return $ques;\r\n \r\n }", "title": "" }, { "docid": "edde01cc4c39c8a1f4cfcd76072abbdb", "score": "0.5087323", "text": "function getQuizResourceIDs ($Quiz_lesson_id, $tp_id) {\n\t\t$Quiz_sql = \"SELECT * FROM `tme_question` WHERE `LessonID` = '$Quiz_lesson_id' AND `tpname` = '$tp_id' ORDER BY `order` ASC \";\n\t\t$Q_res_rows = mysql_query($Quiz_sql);\n\t\treturn $Q_res_rows;\n\t}", "title": "" }, { "docid": "b3fb21ff83c4ccce3642154c10f3be0d", "score": "0.508644", "text": "static public function getQueries() {\n\t\t$db = MijnSqli::instance();\n\t\t$selectQuery = \"\n\t\t\tSELECT\n\t\t\t\tID, beschrijving, permissie, categorie\n\t\t\tFROM\n\t\t\t\tsavedquery\n\t\t\tORDER BY categorie, beschrijving;\";\n\t\t$result = $db->query($selectQuery);\n\t\t$return = array();\n\t\twhile ($data = $db->next($result)) {\n\t\t\tif (self::magWeergeven($data['permissie'])) {\n\t\t\t\t$return[] = $data;\n\t\t\t}\n\t\t}\n\t\treturn $return;\n\t}", "title": "" } ]
ac3ddec41fa1dc1da6f13e7b67a65b42
Run before creating a record.
[ { "docid": "a4bda33e883dd8bd13b3b03cc5e5faa4", "score": "0.0", "text": "public function creating(EloquentModel $model)\n {\n }", "title": "" } ]
[ { "docid": "bb75d5c1a80d88972c1a68881c42084b", "score": "0.7435251", "text": "protected function beforeCreate()\n {}", "title": "" }, { "docid": "5b82a319125f49661569cac055fa531c", "score": "0.7028067", "text": "public function beforeCreate() {\n\t\t$this->createdAt = date('Y-m-d H:i:s');\n\t\t// set the mofification date\n\t\t$this->modifiedAt = date('Y-m-d H:i:s');\n\t}", "title": "" }, { "docid": "d40507d86f5067c92d8a04273ab27ab5", "score": "0.6997428", "text": "public function beforeCreate() {\n\t}", "title": "" }, { "docid": "a8f8b60ec4d3ecb9afb65b11375bf7f1", "score": "0.69057286", "text": "protected function _preInsert()\n {\n // create logic that precedes insert of data into the database\n return true;\n }", "title": "" }, { "docid": "77280b5eafdb8612171597286629df4d", "score": "0.6866576", "text": "protected function preInsert()\n {\n }", "title": "" }, { "docid": "60bc9d0807a385dafe5f51bde282ec2b", "score": "0.68213433", "text": "protected function beforePersist()\n {}", "title": "" }, { "docid": "ee9ae0705e029e94da87f7c74e4e479b", "score": "0.67475325", "text": "public function beforeCreate()\n {\n if (empty($this->birthdate) || $this->birthdate == '0000-00-00') {\n $this->birthdate = null;\n }\n\n $this->karma += Karma::INITIAL_KARMA;\n $this->votePoint += Karma::INITIAL_KARMA;\n $this->vote = 0;\n $this->timezone = 'Europe/London';\n $this->theme = 'D';\n $this->modifiedAt = time();\n $this->createdAt = time();\n $this->avatar = null;\n }", "title": "" }, { "docid": "4bc8b1cf9717a9d4e645ad2aa0b61a7a", "score": "0.66729313", "text": "protected function prepareCreate()\n {\n }", "title": "" }, { "docid": "99fe723fb5f014f4a3842ea4d4a90505", "score": "0.6665622", "text": "public function beforeCreate() {\n\n $this->created_by = BackendAuth::getUser()->id;\n }", "title": "" }, { "docid": "20dce6f758d57dde25f1e79a1e2f256d", "score": "0.65895474", "text": "public function prePersist()\n {\n $this->setCombinedName($this->generateCombinedName($this->name, $this->code));\n $this->createdAt = new \\DateTime('now', new \\DateTimeZone('UTC'));\n $this->updatedAt = clone $this->createdAt;\n }", "title": "" }, { "docid": "6cb8f3293b9d07cfa48200da5d2ee7b9", "score": "0.6555469", "text": "public static function preInsert()\r\n {\r\n }", "title": "" }, { "docid": "92d72482337cd04e7e04af3fddfe75aa", "score": "0.6508804", "text": "protected function beforeSave()\n {}", "title": "" }, { "docid": "59099253eb6c8a532b4fa8a6a57216a4", "score": "0.6491892", "text": "public function beforeCreate()\n {\n $this->create_time = date('Y-m-d H:i:s');\n }", "title": "" }, { "docid": "6e3709b15e52afec6f7db0ffd82f5725", "score": "0.646652", "text": "protected function saveBefore()\n {\n }", "title": "" }, { "docid": "41cfbd9c3eb343f3828eaf2a25e5fc6e", "score": "0.64660597", "text": "function beforeSave() {\n // Empty\n }", "title": "" }, { "docid": "53538e261557f05bab802fc2a2e0572a", "score": "0.6451636", "text": "public function onPrePersist()\n {\n $this->created = new \\DateTime;\n $this->updated = new \\DateTime;\n $this->objectId = (new GenerateToken)();\n }", "title": "" }, { "docid": "6aba13bbae855c075ffc5d0f910558bc", "score": "0.6422054", "text": "protected function beforeSave() {\r\n }", "title": "" }, { "docid": "b02925f56c6a790898c1a67ef5832372", "score": "0.64073527", "text": "public function beforeSave() {\n $this->initCreatedDate();\n\n return parent::beforeSave();\n }", "title": "" }, { "docid": "546dc90373077f17a740b20b87b09724", "score": "0.63928974", "text": "public function onPrePersist()\n {\n $this->created_at = new \\DateTime(\"now\");\n $this->status = 1;\n }", "title": "" }, { "docid": "546dc90373077f17a740b20b87b09724", "score": "0.63928974", "text": "public function onPrePersist()\n {\n $this->created_at = new \\DateTime(\"now\");\n $this->status = 1;\n }", "title": "" }, { "docid": "10197de4fb307b1e7d09cf01e70dc083", "score": "0.6383395", "text": "public function prePersist()\n {\n $this->created = new \\DateTime('now', new \\DateTimeZone('UTC'));\n }", "title": "" }, { "docid": "4f3bc964ba7de64ee07c3fb5cf6c1a08", "score": "0.63598883", "text": "public function __pre_save()\n {\n }", "title": "" }, { "docid": "465da2a13536659a18ebe4a4754a9540", "score": "0.6358232", "text": "protected function _beforeSave() {\n\t\tif (strlen ( $this->getNotificationId () ) <= 0) {\n\t\t\t$this->generateNotificationId ();\n\t\t}\n\t\t\n\t\tif (! $this->getCreatedAt ()) {\n\t\t\t$this->setCreatedAt ( time () );\n\t\t}\n\t\t\n\t\treturn parent::_beforeSave ();\n\t}", "title": "" }, { "docid": "6bd5c27c0445688b9e54479f26f31bae", "score": "0.6356105", "text": "public function prePersist()\n {\n $this->createdAt = new \\DateTime('now', new \\DateTimeZone('UTC'));\n $this->preUpdate();\n }", "title": "" }, { "docid": "5236eead4a845ed930d17dd5f23358c2", "score": "0.63419443", "text": "public function beforeCreate()\n {\n $this->date_added = date('Y-m-d H:i:s');\n }", "title": "" }, { "docid": "7cccd347335d2099755cb27e9701ae90", "score": "0.6338368", "text": "public function prePersist()\n {\n $this->createdAt = new \\DateTime;\n }", "title": "" }, { "docid": "1df7b65c856ff3fd5b263b552fbd4eb6", "score": "0.6332085", "text": "public function prePersist()\n {\n }", "title": "" }, { "docid": "0de879a137bccab22bf82444fc1df78b", "score": "0.6322262", "text": "protected function _preSave()\n {\n return true;\n }", "title": "" }, { "docid": "6af0cfc044fe183bb80a88ae1d1c1b4c", "score": "0.6314669", "text": "public function onPrePersist()\n {\n $this->setCreatedAt();\n }", "title": "" }, { "docid": "e8c55c6b9f0b7c4f4a2918efbb4bae8f", "score": "0.6312229", "text": "public function preCreateCallback()\n {\n }", "title": "" }, { "docid": "b570ab75e201c1ef1678c09c3629f2e8", "score": "0.6307587", "text": "protected function _pre() {}", "title": "" }, { "docid": "8f43cb6157b5b76200ad48c50f950a5b", "score": "0.6298899", "text": "protected function beforeSave()\n { }", "title": "" }, { "docid": "d1492180e1be14aff9107c5a93737a12", "score": "0.6278625", "text": "public function before()\n\t{\n\t\t// Run anything that need to run before this.\n\t\tparent::before();\n\t}", "title": "" }, { "docid": "05a9506bc087a083262335a35df4fda6", "score": "0.62567997", "text": "public function beforeCreate()\n {\n do {\n $this->token = str_random(40);\n } while (self::where('token', $this->token)->exists());\n }", "title": "" }, { "docid": "b6f0ef3ad088de5234a32cfe34e9d150", "score": "0.6254955", "text": "protected function _beforeSave()\n {\n //set the log dates - for shits and giggled\n $_now = Mage::getSingleton('core/date')->gmtDate();\n $this->setData('updated_at', $_now);\n if (!$this->getId()) {\n $this->setData('created_at', $_now);\n }\n \n if (!$this->getApiKey()) {\n $_key = $this->generateNewApiKey();\n $this->setApiKey($_key);\n }\n \n return parent::_beforeSave();\n }", "title": "" }, { "docid": "295dacfc6c98e4e634486ace517d50cf", "score": "0.6244057", "text": "public function prePersist()\n {\n $this->createdAt = new \\DateTime();\n $this->updatedAt = new \\DateTime();\n }", "title": "" }, { "docid": "295dacfc6c98e4e634486ace517d50cf", "score": "0.6244057", "text": "public function prePersist()\n {\n $this->createdAt = new \\DateTime();\n $this->updatedAt = new \\DateTime();\n }", "title": "" }, { "docid": "dd8efd35d5825b1d3ab114d0681ef629", "score": "0.62367827", "text": "public function before()\n {\n $this->id = $this->_record->id;\n $this->title = $this->_record->getLocaled('title');\n }", "title": "" }, { "docid": "b4353e1c5bfa0cf73721d7c65ba821ea", "score": "0.62342036", "text": "public function onPrePersist()\n {\n $this->setCreated(new \\DateTime(\"now\"));\n $this->setUpdated(new \\DateTime(\"now\"));\n }", "title": "" }, { "docid": "ee9f08063bff4bea5922d5ed8ba19cdb", "score": "0.623338", "text": "public function beforeCreate(ICoreModel &$model);", "title": "" }, { "docid": "bf03619d68bc32a7dbe670b07fa14302", "score": "0.6228628", "text": "public function preExecute()\n\t{\n\t\t$this->fObj=new FieldOrder;\n\t}", "title": "" }, { "docid": "1b0e859ed8982e701f9995d5a4b56d04", "score": "0.62269545", "text": "public function before()\n {\n // set unique user id from provider response\n $this->_provider_id = $this->_identity->identifier;\n\n // grab some data from identity provider\n if ($this->email === null) {\n $this->email = $this->_identity->email;\n }\n $this->profileLink = $this->_identity->profileURL;\n\n // get record info from db for this identifier if exists\n $this->_record = UserProvider::where('provider_name', '=', $this->_provider_name)\n ->where('provider_id', '=', $this->_provider_id)\n ->first();\n }", "title": "" }, { "docid": "09e340fee950a9a4b00aeb1ddd2caf75", "score": "0.62264955", "text": "protected function before_validate() {\n $this->beforeupdate = null;\n\n // During update.\n if ($this->get('id')) {\n $this->beforeupdate = new self($this->get('id'));\n }\n }", "title": "" }, { "docid": "ac04ea07505160aeff8abc108535e364", "score": "0.62196547", "text": "public function beforeSave()\n {}", "title": "" }, { "docid": "789468a0d2c1d3a9c2ff9122f1df867e", "score": "0.618708", "text": "public function beforeValidationOnCreate()\n {\n $this->create_by = $this->_user['uid'];\n $this->create_time = date('Y-m-d H:i:s');\n $this->modify_by = $this->_user['uid'];\n $this->modify_time = date('Y-m-d H:i:s');\n }", "title": "" }, { "docid": "4244105954f784382e5a66027795dba8", "score": "0.6178906", "text": "public function onPrePersist()\n {\n $this->dateCreated = $this->dateUpdated = new DateTime('now');\n }", "title": "" }, { "docid": "81d3d51ec1e798aedce5faa19e0d50a8", "score": "0.61761487", "text": "public function beforeSave()\n {\n $this->createdAt = new \\DateTime('now', new \\DateTimeZone('UTC'));\n $this->updatedAt = new \\DateTime('now', new \\DateTimeZone('UTC'));\n $this->loginCount = 0;\n\n $this->serviceGrade = $this->getBusinessUnit()->getInitServiceGrade();\n $this->healthValue = $this->getBusinessUnit()->getInitServiceGrade()->getInitialValue();\n }", "title": "" }, { "docid": "eec738fd3f61faad86c4a66e388bf650", "score": "0.61684954", "text": "protected function entityPrePersist($entity, Request $request, $creation = false)\n {\n }", "title": "" }, { "docid": "e7a44de8d49dfd578d660e31ddfdae3f", "score": "0.6152784", "text": "public function beforeSave()\n {\n $this->created = new \\DateTime('now', new \\DateTimeZone('UTC'));\n $this->updated = new \\DateTime('now', new \\DateTimeZone('UTC'));\n }", "title": "" }, { "docid": "b7de29ed182eefb242bf53e78fcd666e", "score": "0.6141815", "text": "public function before_save() {}", "title": "" }, { "docid": "91dce21095f1bcf9cd4e7940331ee1b9", "score": "0.6126538", "text": "public function onPrePersist()\n {\n $this->created_at = new \\DateTime(\"now\");\n $this->modified_at = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "5517af4fe2018dc553725b77b9f3d442", "score": "0.6117618", "text": "public function onPrePersist()\n {\n $now = new \\DateTime(\"now\");\n $now->setTimezone(new \\DateTimeZone('UTC'));\n $this->setCreatedAt($now);\n $this->setUpdatedAt($now);\n }", "title": "" }, { "docid": "80276c0d67f7c66a404234a236f7477a", "score": "0.6113211", "text": "protected function before(){}", "title": "" }, { "docid": "01705060694d547c4606a268970f43e6", "score": "0.6110769", "text": "abstract public function runBefore();", "title": "" }, { "docid": "7f63302eac8710caef4013a5919e88e1", "score": "0.6109767", "text": "public function prePersist() {\n\t\t$this->createdAt = $this->updatedAt = new \\DateTime('now', new \\DateTimeZone('UTC'));\n\t}", "title": "" }, { "docid": "6b87dd244f1473d41f74dc8091abcc6d", "score": "0.61021125", "text": "public function setCreatedOnBeforePersist()\n {\n parent::setCreatedOnBeforePersist();\n\n if ($this->getIssuedDate() === null) {\n $this->setIssuedDate(new \\DateTime());\n }\n }", "title": "" }, { "docid": "b05fd4319d7adb870d5186fb773c676d", "score": "0.61014414", "text": "public function _pre() {}", "title": "" }, { "docid": "530483aa2feed389d8cd2377e10277a3", "score": "0.60924983", "text": "public function onPrePersist()\n {\n $this->created = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "530483aa2feed389d8cd2377e10277a3", "score": "0.60924983", "text": "public function onPrePersist()\n {\n $this->created = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "530483aa2feed389d8cd2377e10277a3", "score": "0.60924983", "text": "public function onPrePersist()\n {\n $this->created = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "530483aa2feed389d8cd2377e10277a3", "score": "0.60924983", "text": "public function onPrePersist()\n {\n $this->created = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "ca16437cb8485c7cf8296e5ce282e426", "score": "0.60895014", "text": "public function onBeforeWrite()\n\t{\n\t\tparent::onBeforeWrite();\n\t\tif (!$this->singleFieldValue()) {\n\t\t\t$this->singleFieldValue($this->generate());\n\t\t}\n\t}", "title": "" }, { "docid": "b2a00e3333b4a74d1c7530f60072214d", "score": "0.6081432", "text": "public function onPrePersist()\n {\n $this->created_at = new \\DateTime('now');\n }", "title": "" }, { "docid": "c5d90f2e1238c8a74008f3cb589ba977", "score": "0.60806245", "text": "public function prePersist()\n {\n $this->createdAt = $this->updatedAt = new \\DateTime('now', new \\DateTimeZone('UTC'));\n }", "title": "" }, { "docid": "15cd1fc92aa77ba34da4f0d9650536a2", "score": "0.6073866", "text": "public function onPrePersist()\n {\n $this->setModificationDate(new \\DateTime('now'));\n\n if($this->getCreationDate() == null)\n {\n $this->setCreationDate(new \\DateTime('now'));\n }\n }", "title": "" }, { "docid": "1775ff3c82756214ce74807796f792e4", "score": "0.60656863", "text": "protected function beforeSave() {\n if ($this->isNewRecord) {\n $this->created_by = Yii::app()->user->id;\n \n // Handle created date\n $this->created_date = CommonProcess::getCurrentDateTime();\n }\n \n return parent::beforeSave();\n }", "title": "" }, { "docid": "ef54b84344244278f647ac655ee13913", "score": "0.60635877", "text": "public function onPrePersist()\n\t{\n\t\t$this->createdAt = new \\DateTime(\"now\");\n\t\t$this->updatedAt = new \\DateTime(\"now\");\n\t}", "title": "" }, { "docid": "91dbdfb1b30d85784f7d7c9d72143611", "score": "0.6043849", "text": "protected function before()\r\n\t{\r\n\r\n\t}", "title": "" }, { "docid": "3e90f472329aa56a460c959a945632c9", "score": "0.6035672", "text": "public function testBeforeSave()\n {\n // since this is not in use, this dummy test goes here\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "66db221291bfe413436659d6f2b7fcd5", "score": "0.6031205", "text": "public function prePersistTasks()\n {\n $this->setCreated(new \\DateTime());\n $this->setUpdated(new \\DateTime('0000-00-00 00:00:00'));\n $this->setStatus(1);\n }", "title": "" }, { "docid": "53bd1b932758ab4f8e70167763d4e8b0", "score": "0.6029552", "text": "public function _prePersist()\n {\n // Set date to now when none is set\n if ($this->date == null) {\n $this->setDate(new \\DateTime());\n }\n }", "title": "" }, { "docid": "53bd1b932758ab4f8e70167763d4e8b0", "score": "0.6029552", "text": "public function _prePersist()\n {\n // Set date to now when none is set\n if ($this->date == null) {\n $this->setDate(new \\DateTime());\n }\n }", "title": "" }, { "docid": "227a87da36e4f0051ff2c0c2d37830ed", "score": "0.6027993", "text": "public function onPrePersist()\n {\n $this->created_at = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "30b4025b655b42d03e734d66ed2ccd05", "score": "0.6021715", "text": "function beforeAdd() {\n // Empty\n }", "title": "" }, { "docid": "f464ea5958d689e2fec84ce83ac2f208", "score": "0.60203296", "text": "public function beforeSave()\n {\n $this->created = EmailUtil::currentUTCDateTime();\n }", "title": "" }, { "docid": "170d23c559fc47c2a12b6b0ed90f12d0", "score": "0.6015823", "text": "public function preInsert($event)\n\t{\n\t\t$this->created = time();\n\t}", "title": "" }, { "docid": "8e8203a47610b6b2c7a8d32560386b2f", "score": "0.60151315", "text": "public function onPrePersist(): void {\n $this->created_at = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "1e298489199284afd6f753eabc3c31e8", "score": "0.6013037", "text": "public function beforeSave()\n {\n $this->createdAt = new \\DateTime('now', new \\DateTimeZone('UTC'));\n $this->updatedAt = new \\DateTime('now', new \\DateTimeZone('UTC'));\n }", "title": "" }, { "docid": "1e298489199284afd6f753eabc3c31e8", "score": "0.6013037", "text": "public function beforeSave()\n {\n $this->createdAt = new \\DateTime('now', new \\DateTimeZone('UTC'));\n $this->updatedAt = new \\DateTime('now', new \\DateTimeZone('UTC'));\n }", "title": "" }, { "docid": "1e298489199284afd6f753eabc3c31e8", "score": "0.6013037", "text": "public function beforeSave()\n {\n $this->createdAt = new \\DateTime('now', new \\DateTimeZone('UTC'));\n $this->updatedAt = new \\DateTime('now', new \\DateTimeZone('UTC'));\n }", "title": "" }, { "docid": "1e298489199284afd6f753eabc3c31e8", "score": "0.6013037", "text": "public function beforeSave()\n {\n $this->createdAt = new \\DateTime('now', new \\DateTimeZone('UTC'));\n $this->updatedAt = new \\DateTime('now', new \\DateTimeZone('UTC'));\n }", "title": "" }, { "docid": "e47061d39cd47babdaa94a2446f46555", "score": "0.6011966", "text": "public function beforeCreate(ActiveRecordInterface $obj);", "title": "" }, { "docid": "2e4f4eff3b4a2220aeb5cb4270e9e0c2", "score": "0.60031617", "text": "public function before()\n\t{\n\t\t// Inialize the current user\n\t\tparent::before();\n\n\t\t$this->_entry \t= new Model_Photo_Contest_Entry($this->request->param('entry_id'));\n\t\t$this->_contest = new Model_Photo_Contest($this->_entry->photo_contest_id);\n\t}", "title": "" }, { "docid": "fb7f03e7ad285fe33131438deccf25fa", "score": "0.60006535", "text": "public function before()\n\t{\n\t\t// ...\n\t}", "title": "" }, { "docid": "51c1a0cee1d07a149ad00bb818e17f96", "score": "0.59912664", "text": "public function before(){}", "title": "" }, { "docid": "c8ca957e5d048f95a122565047c3ce46", "score": "0.5988517", "text": "protected function preInsert() {\n $this->info_key = $this->generateUniqueKey($this->title_info);\n return true;\n }", "title": "" }, { "docid": "6f98fd6c7777528ff8acebf0120585e7", "score": "0.5985149", "text": "public function onPrePersist()\n {\n $this->createdAt = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "6f98fd6c7777528ff8acebf0120585e7", "score": "0.5985149", "text": "public function onPrePersist()\n {\n $this->createdAt = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "a2c68e0ab5921ff10f9d293190d4bb5a", "score": "0.5977799", "text": "protected function preExecute()\n {\n // do nothing, let subclasses override if needed.\n }", "title": "" }, { "docid": "34001dbb6d3b87200eef5da2cedf8e32", "score": "0.59696406", "text": "public function onPrePersist()\n {\n $this->createdAt = new \\DateTime();\n }", "title": "" }, { "docid": "34001dbb6d3b87200eef5da2cedf8e32", "score": "0.59696406", "text": "public function onPrePersist()\n {\n $this->createdAt = new \\DateTime();\n }", "title": "" }, { "docid": "9b64eea46b5aaf5f16a8ebbb056926d9", "score": "0.5959126", "text": "public function beforeRun();", "title": "" }, { "docid": "c3face7a57317ed10c056d233bc37642", "score": "0.5957298", "text": "public function beforeValidationOnCreate()\r\n {\r\n // Data de cadastro\r\n $this->envioDt = date('Y-m-d H:i:s');\r\n\r\n // Seta status da ajuda para ativa\r\n $this->ativo = 'Y';\r\n }", "title": "" }, { "docid": "5bc353a15efe0e140a7c44e138c071b0", "score": "0.5918435", "text": "public function pre()\n {}", "title": "" }, { "docid": "5aa13e39167f1253f73e8ce2decd5194", "score": "0.59137285", "text": "public function beforeSave() {\n\t\t//debug($this->data);\n\t\t//exit;\n\t\treturn true;\n\t}", "title": "" }, { "docid": "9d23b793c460954ad744bba6a9ed0333", "score": "0.59075266", "text": "protected function before() {}", "title": "" }, { "docid": "e549f9d9e2a749b931352e106f8267f3", "score": "0.59023535", "text": "protected function before()\n {}", "title": "" }, { "docid": "6b9ebe9489f2690282e38e950bf22c44", "score": "0.59022427", "text": "protected function beforeValidate()\n\t{\n\t\tif($this->isNewRecord)\n\t\t{\n\t\t\t$this->ctime=time();\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "b6dfd66bb3beefad96718bb2a7b434fc", "score": "0.590086", "text": "public function onPrePersist()\n {\n $this->createdAt = new \\DateTime(\"now\");\n $this->updatedAt = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "b6dfd66bb3beefad96718bb2a7b434fc", "score": "0.590086", "text": "public function onPrePersist()\n {\n $this->createdAt = new \\DateTime(\"now\");\n $this->updatedAt = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "b6dfd66bb3beefad96718bb2a7b434fc", "score": "0.590086", "text": "public function onPrePersist()\n {\n $this->createdAt = new \\DateTime(\"now\");\n $this->updatedAt = new \\DateTime(\"now\");\n }", "title": "" } ]
df0c1420c66cc27b00e97314c44746f1
Show the form for creating a new etudiant.
[ { "docid": "6009fdc6a76756a6ec5b02438c80ad89", "score": "0.77372146", "text": "public function create()\n {\n \n \n return view('etudiants.create');\n }", "title": "" } ]
[ { "docid": "882c1e5cb767ad302e010b8f574e925e", "score": "0.77024984", "text": "public function create()\n {\n $etudiant = new Etudiant();\n return view('create',compact('etudiants',$etudiant));\n \n }", "title": "" }, { "docid": "9930f1d1e7ae0ea99c06b704a87d13e7", "score": "0.75473785", "text": "public function create()\n {\n\n return view('pedagogique.addencadrant');\n }", "title": "" }, { "docid": "a9e9599bcf10a3cd7441671dece5c845", "score": "0.7498635", "text": "public function create()\n {\n return view('estudiante.create');\n }", "title": "" }, { "docid": "a9e9599bcf10a3cd7441671dece5c845", "score": "0.7498635", "text": "public function create()\n {\n return view('estudiante.create');\n }", "title": "" }, { "docid": "c46d90a0513f71b025f95b960baacd50", "score": "0.7373645", "text": "public function create()\n {\n $type = 'create';\n return view('assistants.edit-add', compact('type'));\n }", "title": "" }, { "docid": "ca505a8d0e0dddb83385f6955aaaecad", "score": "0.733465", "text": "public function newAction()\n {\n $entity = new fabricante();\n $form = $this->createCreateForm($entity);\n\n return $this->render('FabricanteBundle:fabricante:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "4dd85a7dd2279e41326acf30c85b837f", "score": "0.7329268", "text": "public function create()\n {\n return view('QuanTriVien.form');\n }", "title": "" }, { "docid": "b02f187b18d57a59d040d78094241c78", "score": "0.72763234", "text": "public function create_new()\n\t{\n\t\treturn View::make('admin.suppliers.create_supplier_form'); \n\t}", "title": "" }, { "docid": "646efbb88f76c0278f1a2206f0771e9e", "score": "0.72721666", "text": "public function create()\n {\n return view('estudiantes.create');\n \n }", "title": "" }, { "docid": "c0281c76ccd4b21a4083ba96495a3fc0", "score": "0.72459024", "text": "public function create() {\n return view('matricula.datos_basicos.situacionestudiante.create')\n ->with('location', 'matricula');\n }", "title": "" }, { "docid": "02bd42c2c21e00ffca3aa5bba0ecbc80", "score": "0.72452027", "text": "public function create()\n {\n return view(\"admin.kartu_keluarga.add\");\n }", "title": "" }, { "docid": "53d013f46afef2a72260a723badd83b2", "score": "0.7238743", "text": "public function ShowForm() {\n return view('create');\n }", "title": "" }, { "docid": "d479bfb366bb697f1a5357e2c16f91f4", "score": "0.7236554", "text": "public function create()\n\t{\n\t \t \n\t return view('admin.salat.create');\n\t}", "title": "" }, { "docid": "a17008b5b376e513fd6b27ac8aa4bd27", "score": "0.7234949", "text": "public function create()\n {\n //menampilkan halaman form create\n\n return view('artikel.create');\n }", "title": "" }, { "docid": "f6e48ae1d724d5e7c24bedb9e36c10b7", "score": "0.72321403", "text": "public function newAction()\n {\n $entity = new Ausencia();\n $form = $this->createCreateForm($entity);\n\n return $this->render('IntranetBundle:Ausencia:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "051826c00461891f0b2d791394861fb2", "score": "0.7231806", "text": "public function create()\n {\n $armelle=Tuteur::all();\n\n return view('formapprenant',['tuteur'=>$armelle]);\n }", "title": "" }, { "docid": "6375fea9ab0a4903417427f7e1dcf848", "score": "0.7228247", "text": "public function create()\n {\n return view('entregador.create')->with('entregador', null);\n }", "title": "" }, { "docid": "c15e225feca6bbb9ac333ac1906854da", "score": "0.7227926", "text": "public function create()\n {\n $fabricantes = Fabricante::all();\n\n $action = route('admin.fabricantes.store');\n return view('admin.fabricantes.form', compact('action', 'fabricantes'));\n }", "title": "" }, { "docid": "9dcc76daa4540b48df51e0c54a0f942e", "score": "0.72261804", "text": "public function create()\n {\n return view('escola.form');\n }", "title": "" }, { "docid": "6d8ac76b2319312ec6d7c116d3c07dd5", "score": "0.7211694", "text": "public function create()\n {\n return view(\"admin.dokter.form\");\n }", "title": "" }, { "docid": "bbd8bda95ec7ea755918706177d5f2f6", "score": "0.720426", "text": "public function newAction()\n {\n $entity = new Paquete();\n $form = $this->createForm(new PaqueteType(), $entity);\n\n return $this->render('DistribucionBundle:Paquete:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "e725b38445b30180afc14634bbf21793", "score": "0.720074", "text": "public function create()\n {\n return view('admin.formateurs.create');\n }", "title": "" }, { "docid": "612b4596b91b8a5269254bda990ecb82", "score": "0.7196109", "text": "public function create()\n {\n return view('enseignants.create');\n }", "title": "" }, { "docid": "877cb25e0bc8efe193f2311b35130286", "score": "0.7188669", "text": "public function newAction()\n {\n $entity = new Especialidad();\n $form = $this->createForm(new EspecialidadType(), $entity);\n\n return $this->render('GEPedagEntidadesBundle:Especialidad:new_edit.html.twig', array(\n 'titulo' => 'crear',\n 'action' => $this->generateUrl('especialidad_create'),\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "title": "" }, { "docid": "cec8e2d1d832e3bcacd8994f63cc528c", "score": "0.71685207", "text": "public function create()\n {\n $title = 'Thêm Mới Đối Tác';\n return view('backend.partner.form', compact('title'));\n }", "title": "" }, { "docid": "f0df442854712f9c3ad7e77a1f7f3a88", "score": "0.7164427", "text": "public function create()\n {\n return view(\"cartera.create\");\n }", "title": "" }, { "docid": "829e290d001b0972a1e6499c8d47de3b", "score": "0.7161527", "text": "public function create()\n {\n $villes= Ville::select('id', 'name')->get();\n\n return view('etudiants.create', ['villes' => $villes]);\n }", "title": "" }, { "docid": "46754df1d9b9c41e705bbe1e10873821", "score": "0.7158524", "text": "public function create()\n {\n $generos=Genero::get();\n $student=new Student;\n $title= __(\"Añadir Estudiante\");\n $textButton=__(\"Crear\");\n $route=route(\"students.store\");\n return view(\"students.create\", compact(\"title\",\n \"textButton\", \"route\", \"student\",\"generos\"\n ));\n }", "title": "" }, { "docid": "0224b799194fa807284fdd74a5365a99", "score": "0.7152845", "text": "public function create()\n {\n return view('anggota.form');\n }", "title": "" }, { "docid": "1bac3dd0b345c51ee033f901917a3dcb", "score": "0.7144351", "text": "public function create() {\n \treturn View::make('pertanyaan.create');\n }", "title": "" }, { "docid": "6e54ebe7445f04b4e2540c09999df2ed", "score": "0.7139759", "text": "public function create()\n\t{\n\t\treturn view(\"retur-pembelian.form\");\n\t}", "title": "" }, { "docid": "6a8ce51036fba6f2bfbb44185cf5087a", "score": "0.7133814", "text": "public function create()\n {\n return view(\"consulta.create\");\n }", "title": "" }, { "docid": "ad0573d30fc4a867bd2344be6ec8c073", "score": "0.71319735", "text": "public function newAction()\r\n {\r\n \tif(AccueilController::verifUserAdmin($this->getRequest()->getSession(), 'questionnaireeleve')) return $this->redirect($this->generateUrl('EDiffAdminBundle_accueil', array()));\r\n \t\r\n $entity = new QuestionnaireEleve();\r\n $form = $this->createForm(new QuestionnaireEleveType(), $entity);\r\n\r\n return $this->render('EDiffAdminBundle:QuestionnaireEleve:new.html.twig', array(\r\n 'entity' => $entity,\r\n 'form' => $form->createView()\r\n ));\r\n }", "title": "" }, { "docid": "15ba46136d8015267c72f493447d645a", "score": "0.7127031", "text": "public function create()\n {\n return view('materiku::create');\n }", "title": "" }, { "docid": "372e7ca6ee703ef1413ce9e85f2ef6c8", "score": "0.71250725", "text": "public function create()\n {\n return View::make('admin.ingredient.create');\n }", "title": "" }, { "docid": "1dc8d18b1d82f69109ebaee908148a35", "score": "0.7117797", "text": "public function create()\n {\n return view('tamu.create');\n }", "title": "" }, { "docid": "c064473eb86d48e72f7ffb601c196ae9", "score": "0.7117789", "text": "public function create()\n {\n //\n return view('Partners/Admin/form');\n }", "title": "" }, { "docid": "66b746538eaf7a550c7b3a12968b96a6", "score": "0.71128815", "text": "public function create()\n {\n return view('supplier.form');\n }", "title": "" }, { "docid": "66b746538eaf7a550c7b3a12968b96a6", "score": "0.71128815", "text": "public function create()\n {\n return view('supplier.form');\n }", "title": "" }, { "docid": "636d3454299af1b01e44dd61ae6986fa", "score": "0.7109598", "text": "public function create()\n {\n \treturn view('admin.lateFine.create');\n }", "title": "" }, { "docid": "98e3febf7487fb1ea919549648b78a36", "score": "0.7109386", "text": "public function create()\n {\n return view('member::fiangonana-misionera.create');\n }", "title": "" }, { "docid": "2564f7e29b410c07eef4654312bbe9bc", "score": "0.71014714", "text": "public function create()\n {\n $data['action'] = 'penjualan.store';\n return view('penjualan.form', $data);\n }", "title": "" }, { "docid": "36ac296d482a03f47ba5762bd4d7bdb1", "score": "0.7100715", "text": "public function create()\n {\n // Crear un nuevo registro\n $transportistas = new Transportistas();\n //return view('transportistas.create', compact('transportistas'));\n return view('transportistas.form', compact('transportistas'));\n\n }", "title": "" }, { "docid": "6839a79b61064ed2d6b3c87e3aff015a", "score": "0.7099301", "text": "public function create()\n\t\t{\n\t\t\t\t// redirect to the form for creating a new entry inside the db\n\t\t\t\treturn view('create');\n\t\t}", "title": "" }, { "docid": "fc9f10f4ed2e3caa51bb7459f2772bb1", "score": "0.70978445", "text": "public function newAction()\n {\n $entity = new administracion();\n $form = $this->createCreateForm($entity);\n\n return $this->render('escuelaBundle:administracion:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "fb4bdf2b339268ee883123b8e28aba02", "score": "0.7096581", "text": "public function newAction()\n {\n $entity = new Aktualnosci();\n $form = $this->createForm(new AktualnosciType(), $entity);\n\n return $this->render('KlientBundle:Aktualnosci:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "title": "" }, { "docid": "e74c0cf17545974131c4a9e2d2c4daed", "score": "0.70959884", "text": "public function newAction()\n {\n $entity = new Tipopersonal();\n $form = $this->createCreateForm($entity);\n\n return $this->render('AsiClinicaBundle:Tipopersonal:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "7a31657340922d1128fded2ff2bd034b", "score": "0.70949996", "text": "public function create()\n {\n return view('familia.create');\n }", "title": "" }, { "docid": "887e1ea33c0c524ed6b1e8609ecd7736", "score": "0.70859236", "text": "public function create()\n {\n $Vacante = new Vacante;\n return view('vacante.form', compact('Vacante'));\n }", "title": "" }, { "docid": "aaf039b41e70ea5c5580f174d0a32a5e", "score": "0.70832455", "text": "public function create()\n {\n return view('admin.addnew');\n }", "title": "" }, { "docid": "3d505059f21ae12b1630dfcab9ae57af", "score": "0.70802385", "text": "public function create()\n {\n\n return view(\"ventas.create\");\n\n }", "title": "" }, { "docid": "69f5a299fd92acb1e86ee5de4b716ba4", "score": "0.7077909", "text": "public function create()\n {\n $data = new Pelanggan;\n return view('admin.master.pelanggan.form', compact('data'));\n }", "title": "" }, { "docid": "5d7c97ca528f8b9f29c7ce07a3de776a", "score": "0.707382", "text": "public function create()\n\t{\n\t\treturn view('anneeUs.create');\n\t}", "title": "" }, { "docid": "2a113ccb1bc187d2ab6a5b9b7f32db35", "score": "0.70726514", "text": "public function newAction()\n {\n $this->view->newOrdenForm = new NewOrdenForm(null,array('required'=>''));\n $this->view->clienteForm = new ClienteNewForm(null,array('required'=>''));\n }", "title": "" }, { "docid": "c6a378a7da4f070c2093ee3262b3d67a", "score": "0.70726377", "text": "public function create()\n {\n return view('potensiekonomi.create');\n }", "title": "" }, { "docid": "365d87a92e9ab7351e4c67b4e7598efc", "score": "0.7067681", "text": "public function create() {\n return view('academico.recursos_academicos.estructura_curricular.informacion_basica.facultad.create')\n ->with('location', 'academico');\n }", "title": "" }, { "docid": "2fd1186fd7bd302d58aa0928d5a63735", "score": "0.70674914", "text": "public function create() {\n\t\treturn view('agente.create');\n\t}", "title": "" }, { "docid": "af821c18c1f5d8e1d826708034180532", "score": "0.706632", "text": "public function create()\n {\n $ingredients = Ingredient::all(); //pour gérer l'autocomplétion plus tard\n $unites = Unite::all(); //toutes les unités\n return view('backpages.formrecette', ['ingredients' => $ingredients, 'unites' => $unites]);\n }", "title": "" }, { "docid": "d99a8bb88da9ced08f2e522970f1a5e9", "score": "0.7061435", "text": "public function create()\n {\n \n return view('estadossemanal.create'\n );\n }", "title": "" }, { "docid": "3063f94d4e2c481be12d369b75719677", "score": "0.7060635", "text": "public function create()\n {\n return view('articulos::admin.articulos.create');\n }", "title": "" }, { "docid": "9ac58e2b8cde8400d7d61822d02a7d7d", "score": "0.706026", "text": "public function create()\n {\n return view('admin.ingredient.create');\n }", "title": "" }, { "docid": "7da2b34b58b68dc89facd96cf0b34c76", "score": "0.7056557", "text": "public function create()\n {\n return view('tentang.create');\n }", "title": "" }, { "docid": "91cae3ef8fac8cbaf75c5bcaed69ef7a", "score": "0.7052101", "text": "public function create()\n {\n return view('perjadin.create');\n }", "title": "" }, { "docid": "c94317a2e20da7c27a70671decff8991", "score": "0.7049137", "text": "public function actionCreate()\n {\n $model = new InfoPelanggan();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id_pelanggan]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "e6e8a11ece4e3800b4146eae6a73cab0", "score": "0.70458937", "text": "public function create()\n {\n return view('admin.fabricantes.create');\n }", "title": "" }, { "docid": "fbccdd1013f6d26fc2be2c76a6eaffb9", "score": "0.70445776", "text": "public function create() {\n $fornecedor = null;\n return view('admin.fornecedores.create')->with(compact('fornecedor'));\n }", "title": "" }, { "docid": "6818226dbad17ec2ab3cfc6e8c81265e", "score": "0.70411617", "text": "public function create()\n {\n $this->setTitleDescription(\"Kariéra\", \"vytvořit pracovní pozici\");\n $career = new Career();\n return view('module-careerplugin::admin.create', compact('career'));\n }", "title": "" }, { "docid": "68eac3e9797e63312bcbb06b4b9195ef", "score": "0.7039895", "text": "public function create()\n {\n return view('mineral.create');\n }", "title": "" }, { "docid": "27a7c14aeb846360243d319534920908", "score": "0.70392936", "text": "public function create()\n {\n $anggota = new Anggota;\n return View::make('panel.pages.pelatihan.anggota.form')->with(array('method' => 'create'));\n }", "title": "" }, { "docid": "12dd0f64b5bca62b72dc3a438787d49f", "score": "0.7039018", "text": "public function create()\n {\n return view('about_aretists.create');\n }", "title": "" }, { "docid": "fc670a64810f90bdd0e31b65a052a185", "score": "0.7036428", "text": "public function create()\n {\n #1. Obtengo los datos de registro\n $incentivo = Postulante::getDataSda();\n $area = Area::getData();\n $oficina = Oficina::getData();\n $personal = Usuario::getArea(8);\n $situacion = TablaValor::getDetalleTabla('EstadoSituacional');\n $tipo_entidad = TablaValor::getDetalleTabla('TipoEntidad');\n $tipo_incentivo = TablaValor::getDetalleTabla('TipoIncentivo');\n \n #2. Retorno al formulario\n return view($this->path.'.form-create', compact('incentivo', 'area', 'oficina', 'personal', 'situacion', 'tipo_entidad', 'tipo_incentivo'));\n }", "title": "" }, { "docid": "2c7409e37629c92aaaf84646ab0ca8c5", "score": "0.70333916", "text": "public function newAction()\n {\n $entity = new Departamentos();\n $form = $this->createCreateForm($entity);\n\n return $this->render('SisafBundle:Departamentos:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "7624dcc2adc04b6f56e70a5f8143d16a", "score": "0.7032765", "text": "public function create()\n {\n return view('detalle_ventas.create');\n }", "title": "" }, { "docid": "6e09ea0495ecf33b6615199f96a87dd9", "score": "0.70318264", "text": "public function create()\n {\n return view('inventaris.create');\n }", "title": "" }, { "docid": "a5536ee5674af7587e5c2dd8fa70cbb2", "score": "0.7027189", "text": "public function create()\n\t{\n\t\t$info = $this->info;\n\t\t$data = DataForm::source(new TahunAkademik);\n\n\t\treturn View::make('jurusan::tahun_akademik.create', compact('info', 'data'));\n\t}", "title": "" }, { "docid": "ce18fe01ece89c0fe48f4e7ced28d5d8", "score": "0.702718", "text": "public function actionCreate()\n {\n $model = new AlEntradasDetalle();\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 }", "title": "" }, { "docid": "5cfa3f291d9bf35d3106c594765fc874", "score": "0.70249814", "text": "public function create()\n\t{\n\t\treturn view('especialistas.create');\n\t}", "title": "" }, { "docid": "a2b4f48997315d69d4a978b07c86041b", "score": "0.7023305", "text": "public function create()\n {\n return view('jamkerja.add');\n }", "title": "" }, { "docid": "862bc40da984894b74df33cb4c0d4659", "score": "0.7023166", "text": "public function create()\n {\n return view ('anggota-new');\n }", "title": "" }, { "docid": "694d8dbb9088f26e3830c73aa51dc94e", "score": "0.7021931", "text": "public function create()\n {\n return view('dashboard.manage.othertype.create');\n }", "title": "" }, { "docid": "2e447be6e6041eed9c8fec554769aef6", "score": "0.7020638", "text": "public function create()\n {\n return view('backend.admin.loaner.create');\n }", "title": "" }, { "docid": "466dc3ae53b921fb73961c6381b10fc5", "score": "0.7019881", "text": "public function create()\n {\n return view('admin.asisten.create');\n }", "title": "" }, { "docid": "859d904bf2fae2a02d32aa1454dee080", "score": "0.7018706", "text": "public function create()\n {\n return view('trainee.create');\n }", "title": "" }, { "docid": "a2f96939a6045bf57391287a391a811b", "score": "0.70172435", "text": "public function create()\n {\n return view('crudgerente.create');\n }", "title": "" }, { "docid": "bd427e606e0e4cca97953644741c2977", "score": "0.70164025", "text": "public function create()\n {\n $data = [\n 'mensalista' => '',\n 'url' => 'mensalistas',\n 'method' => 'POST',\n ];\n return view('mensalistas.form', compact('data'));\n }", "title": "" }, { "docid": "9f282acedbaedad56429b6dc8f659913", "score": "0.7015482", "text": "public function create()\n {\n return view('dashboard.insertforms.addTeacher');\n }", "title": "" }, { "docid": "eb055b216dd15a31500a3344764be6ca", "score": "0.7015173", "text": "public function create()\n {\n $jenis = \"create\";\n return view('modul.form',compact('jenis'));\n }", "title": "" }, { "docid": "360552b9123da220d8d0deae45c0d33f", "score": "0.70141953", "text": "public function create()\n\t{\n\t\treturn view('recruit.apprentice.create');\n\t}", "title": "" }, { "docid": "a097895685f56669e51313d103d810e7", "score": "0.70088434", "text": "public function create()\n {\n return view('sale-cow.form');\n }", "title": "" }, { "docid": "b81aef2d23baf32425c3e6e9df028dbf", "score": "0.7008593", "text": "public function create()\n {\n return view('terceros.create');\n }", "title": "" }, { "docid": "b7d52ad2f3fb368461475bf2c1e235da", "score": "0.70080507", "text": "public function create()\n {\n return view('pertanyaan.create');\n }", "title": "" }, { "docid": "a8cffd8700d61cc433378d7fbe942b0a", "score": "0.7006482", "text": "public function create()\n {\n return view('hr.leavetype.create');\n }", "title": "" }, { "docid": "9717425eca17294c8e62573e369ed20f", "score": "0.70043814", "text": "public function newAction()\n {\n $entity = new Entidad();\n $form = $this->createForm(new EntidadType(), $entity);\n\n return $this->render('RutaMicroBundle:Entidad:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "66fb444e16d94363417b9785152dd361", "score": "0.7004052", "text": "public function create()\n {\n return view('termeks.create');\n }", "title": "" }, { "docid": "06f50871c56f20b192cb754638610671", "score": "0.6997803", "text": "public function create()\n {\n return view('siam/tahunAjaran/create');\n }", "title": "" }, { "docid": "2fd863895914b2759e965f6dffef508b", "score": "0.6992975", "text": "public function create()\n {\n return view('falta.create');\n }", "title": "" }, { "docid": "728450b2616d256158cecfad0972cd1e", "score": "0.6992313", "text": "public function create()\n {\n $meta = 'IndexCreate';\n $id = null;\n return view('car-usage.form', compact('meta', 'id'));\n }", "title": "" }, { "docid": "76a6775a9d43f0296889d647f1007b8b", "score": "0.69922924", "text": "public function create()\n {\n return view('/BloodTransfusionForm');\n }", "title": "" }, { "docid": "aed32d18cbf3d5fa1f12fc5211e2d220", "score": "0.69921803", "text": "public function create()\n {\n return view('fakultas.create');\n }", "title": "" }, { "docid": "aed32d18cbf3d5fa1f12fc5211e2d220", "score": "0.69921803", "text": "public function create()\n {\n return view('fakultas.create');\n }", "title": "" } ]
f29a2f717a26bf18d382a536663bd167
$sql="SElECT From employe e inner join formationphp.employe a on e.cin= a.cin";
[ { "docid": "d2f654e96377831c8fa92238717f9f96", "score": "0.0", "text": "function afficherproduits(){\n\t\t$sql=\"SElECT * From produit\";\n\t\t$db = config::getConnexion();\n\t\ttry{\n\t\t$liste=$db->query($sql);\n\t\treturn $liste;\n\t\t}\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\t\n\t}", "title": "" } ]
[ { "docid": "fa4bf7e7fe777d65a5b24ba65cfde12d", "score": "0.5831691", "text": "function READ_instructor_course_exams($course_num)\r\n{\r\n global $db;\r\n\r\n $query = 'SELECT *\r\n FROM exam\r\n INNER JOIN course_exam\r\n ON course_exam.exam_id = exam.exam_id\r\n AND course_exam.course_num = :course_num';\r\n \r\n $statement = $db->prepare($query);\r\n $statement->bindValue(':course_num', $course_num);\r\n $statement->execute();\r\n $exams = $statement->fetchAll();\r\n $statement->closeCursor();\r\n return $exams; \r\n}", "title": "" }, { "docid": "5f205f785ac1e99518b5a7e14a1ba76e", "score": "0.5711574", "text": "public function queryJoin();", "title": "" }, { "docid": "be398e7a2af0bd75f59efaaba8ec5dfa", "score": "0.5683895", "text": "function buscaAssist($conexao, $id){\n\t// inner JOIN assist a ON {$id} = a.noticia_id\";\n\n\t$sqlBusca = \"SELECT * FROM assist WHERE noticia_id = {$id}\";\n\t$sql_query = \"SELECT c.id, c.nome FROM assist a INNER JOIN categorias c on c.id = a.categoria_id WHERE a.noticia_id = {$id}\";\n\t$resultado = mysqli_query($conexao, $sql_query);\n\t\n\n\tif($resultado){\n\treturn mysqli_fetch_assoc($resultado);\n\t}\n}", "title": "" }, { "docid": "7d0515603478040135cd70632acb8a1a", "score": "0.56784624", "text": "function show_employees(){\n\tglobal $db;\n\t$query = \"SELECT * FROM users JOIN names ON users.userID = names.userID JOIN employees ON names.nameID = employees.nameID WHERE users.userLevel = 'E' ORDER BY lName\";\n\t$employees = $db->query($query);\n\treturn $employees;\n}", "title": "" }, { "docid": "aa6db7874fbc9c388ffc23173b1a4c16", "score": "0.5645618", "text": "function get_employee($userID){\n\tglobal $db;\n\t$query = \"SELECT * FROM users JOIN names ON users.userID = names.userID JOIN employees ON names.nameID = employees.nameID WHERE users.userID = '$userID'\";\n\t$employees = $db->query($query);\n\treturn $employees;\n}", "title": "" }, { "docid": "07b4347175b009b9c2e22cdea0dc4638", "score": "0.5627102", "text": "public function all_LoadEmp(){\n $UserIn=getUser()->id;\n $UserCoCode=getUser()->CoCode;\n //---------------\n $Employee=DB::table('employees')\n ->leftJoin('users','users.id','=','employees.id')\n ->select('users.id',\n 'employees.Employee',\n 'employees.CoCode',\n 'users.permCode',\n 'employees.Position',\n )\n ->where('employees.CoCode', $UserCoCode)\n ->get();\n \n return $Employee;\n}", "title": "" }, { "docid": "a62dc3801dd464656cdc43393efd6d4e", "score": "0.56253016", "text": "public function join_spk(){\n return $this->db->select('\n a.no_spk,a.kode_spk,a.id_po,a.status,a.barcode,b.jenis,b.kode_po,b.diameter,b.jumlah\n ')->from('spk a')->join('po b','a.id_po=b.id_po')->get()->result();\n}", "title": "" }, { "docid": "161a4b9cd538ea384e21a52769574099", "score": "0.55955154", "text": "function get_employees() {\n $q = ' \n SELECT t1.id, t1.name, t1.lastname, t1.address, t1.birth_date, t1.dni, t1.photo,\n t2.start_date, t2.finish_date, \n t3.name as \"location\", \n t4.name as \"charge\", t4.job_hours, t4.entrance_time, t4.exit_time\n FROM employees t1, contracts t2 , workplaces t3, roles t4\n WHERE t1.contract_id = t2.id AND t2.workplace_id = t3.id AND t2.role_id = t4.id;\n ';\n $result = do_query( $q );\n $employees = [];\n while ( $row = $result->fetch_object() ){\n $employees[] = $row;\n }\n return $employees;\n }", "title": "" }, { "docid": "940278253bbcb8868b2628f14ad7d781", "score": "0.55572367", "text": "public function WorkByOfficer($input)\r {\r // $this->db->where('relate_classroom_officer.OFFICERID', $input);\r //\r // //Join inner\r // //Table2 , Table1.FK = Table2.PK\r // $this->db->join('classroom', 'relate_classroom_officer.RMU_CLASSID = classroom.RMU_CLASSID');\r // $this->db->join('officer', 'relate_classroom_officer.OFFICERID = officer.OFFICERID');\r\r //Join Another Table\r //Table3 , Table2.FK = Table3.PK\r // $this->db->join('course', 'classroom.COURSEID = course.COURSEID');\r\r // Select Table1\r $query = $this->db->get('relate_classroom_officer');\r return $query->result_array();\r }", "title": "" }, { "docid": "72d25256ece973c1a10808f7376e9ae1", "score": "0.55413246", "text": "public function get_proveedor_por_cedula_compras($cedula_proveedor){\n\n\n $conectar=parent::conexion();\n parent::set_names();\n\n\n $sql=\"select p.cedula,c.cedula_proveedor\n\n from proveedor p\n\n INNER JOIN compras c ON p.cedula=c.cedula_proveedor\n\n\n where p.cedula=?\n\n \";\n\n $sql=$conectar->prepare($sql);\n $sql->bindValue(1,$cedula_proveedor);\n $sql->execute();\n\n return $resultado=$sql->fetchAll(PDO::FETCH_ASSOC);\n\n }", "title": "" }, { "docid": "b868de490340ff996aa41a331f3c06d7", "score": "0.5503397", "text": "protected function _getSqlBase() {\n $sql = $this->getModel()->getTableName().' '.$this->getModel()->getAlias() .\" \n JOIN \".$this->_getPessoa()->getModel()->getTableName().\" empresa ON ( cv_parcela.id_empresa = empresa.id ) \"; \n return $sql;\n }", "title": "" }, { "docid": "ca925dadea5de2d72251277bb25601c7", "score": "0.5499419", "text": "function getPharmacistById($emp_id) {\n // return $query->name;\n\t\n $this->db->where('emp_id', $emp_id);\n $query = $this->db->get('nurse')->row();\n return $query->ename;\n }", "title": "" }, { "docid": "aecc1fb980298e7ff2f5ab5fe4971466", "score": "0.5497934", "text": "public function registered_employers()\n{\n\t$this->db->select('a.*,b.*');\n\t$this->db->join('recruitment_employers b','b.employer_id=a.employer_id');\n\t$query = $this->db->get('recruitment_employers_setting a');\n\treturn $query->result();\n}", "title": "" }, { "docid": "1bf06c842ddabd543527c23338599734", "score": "0.5450395", "text": "function getEmpInfo($emp_id)\n{\n return \"SELECT t1.employee_full_name, t2.location\n\n FROM employees as t1\n \tLEFT JOIN locations as t2 ON t1.Location_ID = t2.Location_ID\n \t\n WHERE t1.Employee_ID = \".$emp_id.\"\";\n}", "title": "" }, { "docid": "027d474e112e6d060de3562d626469c9", "score": "0.5421008", "text": "function getEquipForAll ($dbconn) {\n $sqlGetEquip = \"SELECT divisions.divisionName,\n CONCAT(contacts.firstName , ' ' , contacts.lastName) AS fullName,\n equipRecord.userId,\n equipment.equipName,\n equipment.equipType,\n equipRecord.serialNumber,\n equipRecord.issueDate,\n equipRecord.expDate\n FROM contacts\n LEFT JOIN equipRecord ON contacts.userId = equipRecord.userId\n LEFT JOIN equipment ON equipRecord.equipmentId = equipment.equipmentId\n LEFT JOIN divisions ON contacts.divisionId = divisions.divisionId\n WHERE divisionHeadId is not null\n ORDER BY divisionName,contacts.userId\n \";\n $result = $dbconn->query($sqlGetEquip);\n return $result;\n}", "title": "" }, { "docid": "c629b38800cfe2a3789f894aa6f0a773", "score": "0.541244", "text": "function _join_()\n {\n // Neu khong ton tai join_sql\n if (!count($this->join_sql)) {\n return FALSE;\n }\n //pr($this->db->qb_select,false);\n foreach ($this->join_sql as $tbl => $join) {\n $this->db->join($tbl, $join);\n }\n //echo $this->db->last_query();\n\n\n }", "title": "" }, { "docid": "94d7e6b0effc5be1ce9297abd320b554", "score": "0.5403011", "text": "public function prezzo_rack($hotel_id) {\n\n$sql =\"\nSELECT *\nFROM listino_nome_obmp\nINNER JOIN listino_obmp ON (listino_nome_obmp.listino_nome_id = listino_obmp.listino_nome_id)\nWHERE (listino_nome_obmp.listino_nome = 'rack') AND\n(listino_nome_obmp.hotel_id = '$hotel_id') \n\"; \n\n$query = $this->db->query($sql);\n$return = $query->result();\nreturn $return;\n}", "title": "" }, { "docid": "c67320ac84326167b33b6042d8c51859", "score": "0.5396801", "text": "function consultar(){\r\r\n\t\t$con= new dbConexion();\r\r\n\r\r\n\t\tif($con->conectar()==true){\t\t\r\r\n\t\t\t$query_empresas = \"SELECT * FROM empresas INNER JOIN usuarios on empresas.id_usuario= usuarios.id_usuario WHERE empresas.estatus='ACTIVA' ORDER BY id_empresa ASC\";\r\r\n\t\t\t$empresas = mysql_query($query_empresas); \t \r\r\n\t\t\r\r\n\t\t\tif (!$empresas)\r\r\n\t\t\t\treturn false; \t\t\t\t\t\t\t\t\r\r\n\t\t\telse\t\t\t\t\t\t\t\t\r\r\n\t\t\t\treturn $empresas;\t\t\t\t\t\r\r\n\t\t\t\t\r\r\n\t\t\t}\r\r\n\t\t}", "title": "" }, { "docid": "47c659b7eeef9c477e7b1550b2c75a93", "score": "0.5373861", "text": "public function getEmplois($idclasse){\r\n $query = \"SELECT e.*, m.*, p.*, h.* \"\r\n . \"FROM emplois e \"\r\n . \"INNER JOIN enseignements ee ON ee.CLASSE = :idclasse AND ee.IDENSEIGNEMENT = e.ENSEIGNEMENT \"\r\n . \"INNER JOIN matieres m ON m.IDMATIERE = ee.MATIERE \"\r\n . \"INNER JOIN personnels p ON p.IDPERSONNEL = ee.PROFESSEUR \"\r\n . \"INNER JOIN horaires h ON h.IDHORAIRE = e.HORAIRE \"\r\n . \"ORDER BY e.ENSEIGNEMENT, h.ORDRE ASC\";\r\n return $this->query($query, [\"idclasse\" => $idclasse]);\r\n }", "title": "" }, { "docid": "1be581351bb418bf38d6cd02a2659923", "score": "0.53707194", "text": "function getAscEquip ($dbconn, $userId) {\n $sqlGAE = \"SELECT * FROM equipRecord LEFT JOIN equipment ON equipment.equipmentId = equipRecord.equipmentId WHERE equipRecord.userId = '$userId' \";\n $result = $dbconn->query($sqlGAE);\n return $result;\n}", "title": "" }, { "docid": "c9801e881b36ab726c079e53d58c3011", "score": "0.53411347", "text": "function getCompteInfo($mlle){\r\n\t$sql = \"SELECT * FROM `compte` INNER JOIN personnel ON (compte.NUM_MLLE LIKE personnel.NUM_MLLE) WHERE compte.NUM_MLLE LIKE '$mlle'; \";\r\n\r\n\ttry {\r\n\t\t$cnx = new PDO(DBD, DBUSER, DBPWD, array(PDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES utf8\")); //Connexion to database\r\n\t}\r\n\tcatch (PDOException $error) { //Treat error\r\n\t\t//(\"Erreur de connexion : \" . $error->getMessage() );\r\n\t\tdie($error->getMessage().' '.__LINE__);\r\n\t}\r\n\t$query = $cnx->prepare($sql); //Prepare the SQL\r\n\t$query->execute(); //Execute prepared SQL => $query\r\n\r\n\tif($query->rowCount()) {\r\n\t\t$row = $query->fetch(PDO::FETCH_ASSOC);\r\n\t\treturn $row;\r\n\t}\r\n}", "title": "" }, { "docid": "d0a33bd63bbcc0f5356c9853b8a49b8b", "score": "0.53385717", "text": "public function getEmpresa(){\n \t$consulta = \"SELECT GRAL_EMP_NOMBRE,GRAL_EMP_CENTRAL \n \t\t FROM gral_empresa\";\n return $this->mysql->query($consulta);\n }", "title": "" }, { "docid": "1c5550464579f5a23e08e0ebb2a940d1", "score": "0.5313183", "text": "function listEmployee()\n{\n return \"SELECT t1.Employee_Full_Name AS Emp_Name, t2.Role_Description AS Role, t3.Location AS Location, t1.Extension AS Extension, t1.Nextel_Number AS Nextel_Num, t1.Office AS Office, t1.Nextel_Speed AS Nextel_Speed, t1.Nextel_ID AS Nextel_ID, t1.Employee_ID as Emp_ID\n\n FROM employees as t1\n \tLEFT JOIN roles as t2 ON t1.Role_ID = t2.Role_ID\n \tLEFT JOIN locations as t3 ON t1.Location_ID = t3.Location_ID\n\t \n WHERE t1.is_deleted = 0\n \n ORDER BY\n \tEmp_Name ASC;\";\n}", "title": "" }, { "docid": "bebc53df95bcf693a3600d8819b9064f", "score": "0.5310785", "text": "function ProyectosPorCliente($idCliente, PDO $cnn){\n try {\n $query = $cnn->prepare(\"SELECT idProyecto, nombreProyecto FROM proyectos \njoin usuarioPorProyecto on proyectoAsignado = idProyecto and usuarioAsignado=?\");\n $query->bindParam(1, $idCliente);\n $query->execute();\n return $query->fetchAll();\n } catch (Exception $ex) {\n echo 'Error' . $ex->getMessage();\n }\n }", "title": "" }, { "docid": "207c3d875bb3a8799cbfcdc27a950c18", "score": "0.5290967", "text": "public function llenarcombosemdo(){\n $queryString='select e from Minsal\\SipernesBundle\\Entity\\EnfInventario e'; \n $query = $this->modelManager->getEntityManager($EnfDosisEsquemaVac)->createQuery($queryString)->getArrayResult();\n }", "title": "" }, { "docid": "b897c73f51e95ce1223f0350555d57c7", "score": "0.528895", "text": "function get_all_produto_estoque()\n { \n $this->db->select('c.id, f.nome as fornecedor ,pe.quantidade, pe.quantidade_baixa,\n c.value_product, pe.data_criacao, c.value_product,p.nome as produto');\n $this->db->join('produto p','p.id = pe.produto_id');\n $this->db->join('compra c','p.id = c.produto_id');\n $this->db->join('fornecedor f','c.fornecedor_id = f.id');\n\n return $this->db->get('produto_estoque pe')->result_array();\n }", "title": "" }, { "docid": "95c31280df6acc7eb06248341cd04fd6", "score": "0.52758664", "text": "public function findalle()\n {\n \n //writing a query which is used to display all the details regarding to the table \n $data = $this->db->query('SELECT * from employee')->result();\n foreach ($data as $row) {\n echo $row->Ename . \"\\n\";\n echo $row->Eid . \"\\n\";\n echo $row->Esal . \"\\n\";\n echo $row->Edepart . \"\\n\";\n echo \"\\n\";\n }\n }", "title": "" }, { "docid": "df12e6a30a7d7290893d52ed07a370fa", "score": "0.5265866", "text": "public function todosEquiAsig(){\n $obj= new conectar();\n $conexion=$obj->conexion();\n $sqlTodos=\"\n SELECT 0 Id_CelUserHis,\n max(celUser.Id_empleado) as Id_empleado,\tmax(celUser.Id_celular) as Id_equipoCel, max(user.Num_empleado) as NominaEmpleado, max(user.Usuario_r) as NombreEmpleado, \n max(user.Gerencia) as Gerencia, max(user.Puesto) as Puesto, max(user.Zona) as Zona, max(user.Ubicacion) as Ubicacion, \n max(celUser.Estatus) as EstatusAsig, max(modCel.NombreModelo) as NombreModelo,\t max(modCel.Color) as Color,\t\t max(eqCel.Imei) as Imei, \n max(eqCel.Serie) as Serie,\t\t\t\t\tGROUP_CONCAT(accCel.Accesorio) as Accesorios, max(infLin.Telefono) as NumTel,\t\t max(Comp.Compania) as Compania,\n max(sim.Sim) as Sim,\t\t\t\t\t\tmax(eqCel.Estado) as EstatusCel,\t\t\t max(infLin.Estado) as EstatusLinea, \t\tmax(infLin.Fecha_recepcion) as FechaRecepLin,\n infLin.Fin_plazo_forzoso as FinPlanForzoLin, max(celUser.registro) as FechaAsig, 'Activo actualmente' as FechaBaja\n from celular_usuarios as celUser\n inner join usuario \t as user \t\t\t on celUser.Id_empleado=user.Id_usuario\t\n inner join equipo_celular as eqCel \t\t on celUser.Id_celular=eqCel.Id_celular\n inner join modelo_ec as modCel\t\t on modCel.Id_modelo=eqCel.Id_modelo\n left join asignaaccesorio as asigAccCel\t on asigAccCel.Id_celular=eqCel.Id_celular\n left join accesorios as accCel\t\t on asigAccCel.Id_Accesorios=accCel.Id_Accesorios\n inner join inf_linea\t as infLin\t\t on\tinfLin.Id_linea=eqCel.Id_linea\n inner join sim\t\t\t as sim\t\t\t on sim.Id_Sim=infLin.Id_Sim\n inner join compania\t\t as Comp\t\t\t on Comp.Id_Compania=infLin.Id_Compania\n group by celUser.Id_empleado\n\t\tunion\n select * from cel_usuario_historico; \n \";\n $result=mysqli_query($conexion,$sqlTodos);\n $conta=0;\n if(isset($result)){\n $lista=array();\n $result=mysqli_query($conexion,$sqlTodos);\n while($ver=mysqli_fetch_array($result)){\n $datos=array(\n 'Id_celular' => $ver['Id_equipoCel'], \n 'Id_empleado' => $ver['Id_empleado'],\n 'NominaEmpleado' => $ver['NominaEmpleado'],\n 'NombreEmpleado' => $ver['NombreEmpleado'],\n 'Gerencia' => $ver['Gerencia'],\n 'Puesto' => $ver['Puesto'],\n 'Zona' => $ver['Zona'],\n 'Ubicacion' => $ver['Ubicacion'],\n 'EstatusAsig' => $ver['EstatusAsig'],\n 'NombreModelo' => $ver['NombreModelo'],\n 'Color' => $ver['Color'],\n 'Imei' => $ver['Imei'],\n 'Serie' => $ver['Serie'],\n 'Accesorios' => $ver['Accesorios'],\n 'NumTel' => $ver['NumTel'],\n 'Compania' => $ver['Compania'],\n 'Sim' => $ver['Sim'],\n 'EstatusCel' => $ver['EstatusCel'],\n 'EstatusLinea' => $ver['EstatusLinea'],\n 'FechaRecepLin' => $ver['FechaRecepLin'],\n 'FinPlanForzoLin' => $ver['FinPlanForzoLin'],\n 'FechaAsig' => $ver['FechaAsig'],\n 'FechaBaja' => $ver['FechaBaja'] \n );\n $lista[$conta]=$datos;\n $conta++;\n }\n return $lista;\n }\n}", "title": "" }, { "docid": "6f7379b3da18df1e17a0428e20fe22ba", "score": "0.5261092", "text": "public function buscarPaquete($dato){\n $consulta = \"SELECT * FROM paquetes_usuarios\"; \n $consulta .=\" INNER JOIN paquetes \";\n $consulta.= \"ON paquetes_usuarios.paquete = paquetes.id\";\n $consulta.= \" WHERE paquetes_usuarios.usuario =\".$dato;\n return $consulta;\n }", "title": "" }, { "docid": "84765305edfadcc8d4a76327f9f9e4a0", "score": "0.52362853", "text": "function employeeTable(){\n\t\t\t$sql = \"SELECT * FROM Employee\";\n\t\t\texecute($sql);\n\t\t}", "title": "" }, { "docid": "60b1d776afca81a7eaf5c32fa0f6e916", "score": "0.5232868", "text": "public function queryJoin($tableAll, $tableJoin, $fore, $cols, $cuscol=null)\n {\n $cols = implode(\",tb2.\", $cols);\n if($cuscol==null) $cuscol=\"\";\n else $cuscol=','.$cuscol;\n $sql = \"SELECT tb1.*,tb2.\".$cols.$cuscol.\" \n FROM {$tableAll} as tb1 \n JOIN {$tableJoin} as tb2 \n ON tb1.id = tb2.{$fore} \";\n // var_dump($sql);\n // die();\n return $sql;\n }", "title": "" }, { "docid": "aa33fe23bd230c7c7e616d2cc7f4396f", "score": "0.52217877", "text": "function joinProker2($data){\n\t\t$this->db->select('kegiatan,keterangan');\n\t\t$this->db->from('proker');\n\t\t$this->db->where('id_struktur' ,$data);\n\t\t$query = $this->db->get();\n\t\t return $query->row();\n\t\t}", "title": "" }, { "docid": "c011666b2e2806ab6ea8585091da9cb3", "score": "0.52212566", "text": "function get_employee_all($userID){\n\tglobal $db;\n\t$query = \"SELECT * FROM users JOIN names ON users.userID = names.userID JOIN employees ON names.nameID = employees.nameID WHERE users.userID = '$userID'\";\n\t$results = $db->query($query);\n\t$results = $results->fetch();\n\treturn $results;\t\n}", "title": "" }, { "docid": "be763a6f1a6d6e430d4faf097a833353", "score": "0.52123195", "text": "function obtener_campos_extras($id, $id_tipo_campo) {\r\n\tglobal $link;\r\n $q = \"SELECT ce.* \"\r\n . \"FROM item_campos AS ce \"\r\n// . \"LEFT JOIN cliente c ON c.id=i.id_inmobiliaria \"\r\n . \"WHERE 1 \" \r\n\t . \"AND ce.id_tipo_campo='\".$id_tipo_campo.\"' \" \r\n\t . \"AND ce.id_item='\".$id.\"' \"\r\n\t . \"\";\r\n //print $q;\r\n\treturn @mysql_query($q, $link);\r\n}", "title": "" }, { "docid": "732b993c3e3a0d441d1a0f1ab851071f", "score": "0.52065146", "text": "public function nineTemEmployeenames()\r\n\t{\r\n\t\t\r\n try\r\n\t\t{\r\n \r\n\t\t\tglobal $conn;\r\n\t\t\t$d = new DateTime(\"now\", new DateTimeZone(\"Africa/Johannesburg\"));\r\n\t\t $Fulldate=$d->format('Y-m-d');\r\n\t\t\t\r\n\t\t\t$sql=\"SELECT employee.surname, employee.name, employee.EmpID FROM employee INNER JOIN checkin ON checkin.EmpID=employee.EmpID where checkin.timein>='09:00' and checkin.timeout<='10:00' and date='$Fulldate'\";\r\n\t\t\t$stmt = $conn->prepare($sql);\r\n $stmt->execute();\r\n\t\t\t\r\n $rows=$stmt->rowCount();\r\n if($rows>0)\r\n\t\t\t{\r\n\t\t\t\treturn $stmt;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\treturn false;\r\n\t\t\t}\t\r\n\t\t}\r\n\t\tcatch(PDOException $e){\r\n\t\t\techo \"Database Error: \". $e->getMessage();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "92fcb0e5182620846237db02c7b21d61", "score": "0.5202489", "text": "public function getEmployee($conditions1='',$conditions2='') {\n \n $query = \"SELECT\n e.employeeId,e.employeeName \n FROM \n employee e \n $conditions1\n UNION\n SELECT\n e.employeeId,e.employeeName \n FROM \n employee e ,employee_can_teach_in ect\n WHERE\n e.employeeId=ect.employeeId\n $conditions2\n \";\n return SystemDatabaseManager::getInstance()->executeQuery($query,\"Query: $query\");\n }", "title": "" }, { "docid": "d7279cd88fad78b99b779bbcbae49828", "score": "0.5200831", "text": "function ObtenerPersonas(){\n $stmt = $this->Conectar()->prepare(\"SELECT * FROM persona INNER JOIN especialidad WHERE persona.idEspecialidadPersona=especialidad.idEspecialidad\");\n $stmt->execute();\n \n $respuesta = [\"estado\"=>false, \"respuesta\"=>\"nep\"];\n if($stmt->rowCount()>0){\n $respuesta[\"estado\"] = true;\n $respuesta[\"respuesta\"] = \"ep\";\n $respuesta[\"stmt\"] = $stmt;\n }\n\n return $respuesta;\n }", "title": "" }, { "docid": "d19a53d321f294b6dca7fb29e3770117", "score": "0.51932836", "text": "function consultarExamenEspecializado($idAtencion){\n $sql=\"select tipoExamen.descripcion as nombreTipoExamen,observaciones,examenEspecial.descripcion from tbl_tipoexamenespecializado as tipoExamen inner join tbl_examenespecializado as examenEspecial\n on tipoExamen.idTipoexamenespecializado = examenEspecial.idTipoexamenespecializado\n where idHistoriaClinica = idHistoriaClinica\";\n $conn=$this->_CONEXION;\n $query=$conn->prepare($sql);\n $query->bindParam(\":idAtencion\",$idAtencion,PDO::PARAM_STR);\n if($query->execute()){\n return $query->fetch();\n }else{\n return null;\n }\n}", "title": "" }, { "docid": "6a4819870fae35ae84d76fdeb8b6659c", "score": "0.5183033", "text": "function consulta_empenhos($iExercicioBase) {\n return \"select distinct e60_numemp as codempenho, \n e60_codemp as codigo, \n e60_anousu as exercicio, \n e60_instit as codinstit, \n e60_emiss as dataemissao, \n e60_coddot as coddotacao, \n e60_vlremp as valor, \n e60_vlrpag as valor_pago, \n e60_vlrliq as valor_liquidado, \n e60_vlranu as valor_anulado, \n e60_resumo as resumo, \n z01_numcgm as numcgm, \n coalesce(nullif(trim(z01_cgccpf),''),'0') as cgccpf, \n case \n when c60_codcon is not null then c60_codcon \n else o58_codele \n end as codcon, \n z01_nome as nome, \n e61_autori as codautoriza, \n e60_numerol as numero_licitacao, \n pc50_descr as descrtipocompra \n from empempenho \n inner join cgm on cgm.z01_numcgm = empempenho.e60_numcgm \n inner join orcdotacao on orcdotacao.o58_coddot = empempenho.e60_coddot \n inner join pctipocompra on pctipocompra.pc50_codcom = empempenho.e60_codcom \n and orcdotacao.o58_anousu = empempenho.e60_anousu \n left join ( select distinct on (e.e64_numemp) e.e64_numemp, e.e64_codele \n from empelemento e \n order by e.e64_numemp, e.e64_codele ) as x \n on x.e64_numemp = empempenho.e60_numemp \n left join conplano on conplano.c60_codcon = x.e64_codele \n and conplano.c60_anousu = empempenho.e60_anousu \n left join empempaut on empempaut.e61_numemp = empempenho.e60_numemp \n where exists ( select 1 \n from conlancamemp \n inner join conlancam on conlancam.c70_codlan = conlancamemp.c75_codlan \n where c75_numemp = e60_numemp \n and c70_data >= '{$iExercicioBase}-01-01'::date ) \n and exists ( select 1 \n from empempitem \n where empempitem.e62_numemp = empempenho.e60_numemp ) \"; \n }", "title": "" }, { "docid": "a9d89a70971481c026edfbb851e0158f", "score": "0.51828325", "text": "function join_setting(){\n\t\t//$this->db->join('area_city ac' , 'ac.ac_id = member_address.ac_id' , 'left');\n\t}", "title": "" }, { "docid": "583884e3b1b04b6d9ff87e344b9e3524", "score": "0.51810384", "text": "public function employess()\n {\n return $this->hasMany('app\\employess');\n }", "title": "" }, { "docid": "1a838b3264ced464254e2843bbe1caa7", "score": "0.5165434", "text": "public function getpersonnelbyenginID($id,$interventionid){\n\n $sql='SELECT P.* FROM engins_personnel as EP , engins as E,personnel as P \n where E.idEngins = EP.Engins_idEngins and EP.Personnel_idPersonnel =P.idPersonnel \n and E.idEngins=:id and EP.Intervention_Numero_intervention =:interventionid ';\n try {\n $db = DB::connect();\n $stmt=$db->prepare($sql);\n $stmt->bindParam(\":id\",$id);\n $stmt->bindParam(\":interventionid\",$interventionid);\n $res=($stmt->execute())?$stmt->fetchAll(PDO::FETCH_OBJ): null;\n $db = null;\n return $res;\n } catch (PDOException $e) {\n print \"Erreur !: \" . $e->getMessage() . \"<br/>\";\n die();\n }\n }", "title": "" }, { "docid": "bc2d3273d9417cad0c9e08a815ca0ef9", "score": "0.51516026", "text": "public function InnerJoin()\n\t\t{\n\t\t\treturn $this->Base()->InnerJoin();\n\t\t}", "title": "" }, { "docid": "0394e5c6c5cd1ca410fb04b1df037757", "score": "0.5145131", "text": "public function getAllResolutionEmp(){\r\n \r\n $sql=\"T.id,\r\n T.emp_id AS EMP_ID,\r\n (CASE WHEN E.emp_title=1 THEN 'Sh.' WHEN E.emp_title=2 THEN 'Smt.' WHEN E.emp_title=3 THEN 'Ms.' END) AS EMP_TTL, \r\n CONCAT(E.emp_first_name,' ', E.emp_middle_name,' ', E.emp_last_name) AS EMP_NAME,\r\n T.present_place,PP.name AS EMP_PRE_PLACE,\r\n T.present_unit,PU.name AS EMP_PRE_UNIT,\r\n T.present_section,IFNULL(PS.name,'NA') AS EMP_PRE_SECTION,\r\n T.present_school,IFNULL(PK.name,'NA') AS EMP_PRE_SCHOOL,\r\n T.present_designation,IFNULL(PD.name,'NA') AS EMP_PRE_DESIG,\r\n T.present_subject,IFNULL(PC.name,'NA') AS EMP_PRE_SUB,\r\n T.present_kvcode AS PRE_KCODE,\r\n (CASE WHEN T.present_place=5 THEN PKA.name ELSE PA.name END) AS EMP_PRE_AUTH,\r\n T.transfer_place,TP.name AS EMP_TRA_PLACE,\r\n T.transfer_unit,TU.name AS EMP_TRA_UNIT,\r\n T.transfer_section,IFNULL(TS.name,'NA') AS EMP_TRA_SECTION,\r\n T.transfer_school,IFNULL(TK.name,'NA') AS EMP_TRA_SCHOOL,\r\n T.transfer_designation,IFNULL(TD.name,'NA') AS EMP_TRA_DESIG,\r\n T.transfer_subject,IFNULL(TC.name,'NA') AS EMP_TRA_SUB,\r\n T.transfer_kvcode AS TRA_KCODE,\r\n (CASE WHEN T.present_place=5 THEN TKA.name ELSE TA.name END) AS EMP_TRA_AUTH,\r\n T.transfer_orderno AS 'TRA_OR_NO',\r\n DATE_FORMAT(T.transfer_date,'%d-%m-%Y') AS 'TRA_OR_DT',\r\n T.relieving_orderno AS 'REL_OR_NO',\r\n DATE_FORMAT(T.relieving_date,'%d-%m-%Y')AS 'REL_OR_DT',\r\n T.transfer_status,\r\n (CASE \r\n WHEN T.transfer_status=1 THEN 'PENDING' \r\n WHEN T.transfer_status=2 THEN 'ACCEPTED' \r\n WHEN T.transfer_status=3 THEN 'TRANSFFERED TO HQ'\r\n WHEN T.transfer_status=0 THEN 'REJECTED'\r\n ELSE 'NA' \r\n END) AS EMP_TRA_STS,\r\n T.transfer_remarks,\r\n T.created_by,\r\n T.created_at,\r\n T.updated_by,\r\n T.updated_at,\r\n T.in_process\";\r\n $this->db->select($sql);\r\n $this->db->from('emp_transfer_details T');\r\n $this->db->join('employee_details E','T.emp_id=E.emp_code','Left');\r\n $this->db->join('roles PP','T.present_place=PP.id','Left');\r\n $this->db->join('roles TP','T.transfer_place=TP.id','Left');\r\n $this->db->join('regions PU','T.present_unit=PU.id','Left');\r\n $this->db->join('regions TU','T.transfer_unit=TU.id','Left');\r\n $this->db->join('role_category PS','T.present_section=PS.id','Left');\r\n $this->db->join('role_category TS','T.transfer_section=TS.id','Left');\r\n $this->db->join('schools PK','T.present_school=PK.id','Left');\r\n $this->db->join('schools TK','T.transfer_school=TK.id','Left');\r\n $this->db->join('designations PD','T.present_designation=PD.id','Left');\r\n $this->db->join('designations TD','T.transfer_designation=TD.id','Left');\r\n $this->db->join('subjects PC','T.present_subject=PC.id','Left');\r\n $this->db->join('subjects TC','T.transfer_subject=TC.id','Left');\r\n $this->db->join('regions PA','T.present_kvcode=PA.code','Left');\r\n $this->db->join('schools PKA','T.present_kvcode=PKA.code','Left');\r\n $this->db->join('regions TA','T.transfer_kvcode=TA.code','Left');\r\n $this->db->join('schools TKA','T.transfer_kvcode=TKA.code','Left');\r\n \r\n //========================= PICK DATA AGAINST ROLEID =============================//\r\n $LogAcs=$this->session->userdata['role_id'];\r\n $LogAcs=$this->session->userdata['role_category'];\r\n if($this->session->userdata['role_id']=='2' && $this->session->userdata['role_category']=='2'){ \r\n $this->db->where('T.transfer_status=', 3);\r\n\r\n }else{\r\n // for Web Admin\r\n }\r\n $this->db->where('T.in_process=', 1);\r\n $qry=$this->db->get();\r\n //show($this->db->last_query());\r\n if($qry->num_rows())\r\n {\r\n $data=$qry->result();\r\n }else{\r\n $data=array();\r\n }\r\n return $data;\r\n }", "title": "" }, { "docid": "a5d5ddb48ff3e7cdb4c1803546be8eb6", "score": "0.5142778", "text": "function getEmployee($emp_id)\n{\n return \"SELECT employee_full_name, role_id, location_id, dept_id, extension, nextel_number, office, nextel_speed, nextel_id, notes FROM employees WHERE Employee_ID = \".$emp_id.\";\"; \n}", "title": "" }, { "docid": "95ffe42b7dc49aac2e0cb66a3e9a347b", "score": "0.5138352", "text": "function get_registered_subjects($student_id,$conn){\n\n\t$query = \"SELECT m.subject_code,m.mark,s.subject_name,s.credit_hours \";\n\t$query .= \"FROM mark m INNER JOIN subject s \";\n\t$query .= \"ON m.subject_code=s.subject_code and student_id=$student_id \";\n\t$result = mysqli_query($conn,$query);\n\tconfirm_query($result);\n\treturn $result;\n}", "title": "" }, { "docid": "99014e6275d9944bfde07bac4888d635", "score": "0.51341355", "text": "function buscarUsuario($id_professor){\n $pdo=conexao();\n $stmt = $pdo->prepare(\"SELECT u.id_usuario,u.nome_usuario,u.email_usuario FROM usuario AS u JOIN professor_usuario AS pu ON u.id_usuario = pu.id_usuario WHERE id_professor=:id_professor;\");\n $stmt->bindValue(\":id_professor\",$id_professor);\n $stmt->execute();\n\n $users = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n if($users!= NULL){\n return $users;\n }\n}", "title": "" }, { "docid": "8b52c43341093e875abf1b639bf2e6f5", "score": "0.51326823", "text": "function select_all_clients(){\n $sql_select_client=\"SELECT * FROM usuario INNER JOIN cliente ON usuario.Id_usuario=cliente.Id_cliente;\";\n $result=$GLOBALS['conne']->query($sql_select_client);\n if($result->num_rows>0){\n return $result;\n }else{\n return null;\n }\n }", "title": "" }, { "docid": "432504a2261370bb12205de55620eaef", "score": "0.5132381", "text": "function ambil_data_penumpang() {\n\t\t$this->db->distinct();\n \t\t$this->db->select('pe.id_penumpang, pb.id_penerbangan, pe.nama_penumpang, pe.alamat_penumpang, pe.no_hp_penumpang, pe.username');\n \t\t$this->db->from('penumpang pe');\n \t\t$this->db->join('penerbangan pb', 'pe.id_penerbangan = pb.id_penerbangan');\n \t\t$this->db->join('login l', 'pe.username = l.username');\n \t\treturn $this->db->get($this->nama_table)->result();\n\t}", "title": "" }, { "docid": "87d1cffda4825efd485551ede2307155", "score": "0.5124554", "text": "public function user_book_table($where = array())\n{\n\n $this->db->select(\"*\");\n $this->db->where($where);\n $this->db->from(\"user_to_book\");\n $this->db->join(\"$this->table_name\",\"$this->table_name.id = user_to_book.book_id\");\n return $this->db->get()->result();\n\n}", "title": "" }, { "docid": "2d9b776de922e497aaf2373da729ec0e", "score": "0.5115367", "text": "function consultar_empresas_x_usuario($id_usuario){\r\r\n\t\t$con= new dbConexion();\r\r\n\r\r\n\t\tif($con->conectar()==true){\t\t\r\r\n\t\t\t$query_empresas = \"SELECT * FROM empresas INNER JOIN usuarios on empresas.id_usuario= usuarios.id_usuario \r\r\n\t\t\tWHERE empresas.id_empresa IN (SELECT id_empresa FROM usuarios_empresas where id_usuario= $id_usuario)\r\r\n\t\t\t AND empresas.estatus='ACTIVA' ORDER BY id_empresa ASC\" ;\r\r\n\t\t\t\r\r\n\t\t\t\r\r\n\t\t\t$empresas = mysql_query($query_empresas); \t \r\r\n\t\t\r\r\n\t\t\tif (!$empresas)\r\r\n\t\t\t\treturn false; \t\t\t\t\t\t\t\t\r\r\n\t\t\telse\t\t\t\t\t\t\t\t\r\r\n\t\t\t\treturn $empresas;\t\t\t\t\t\r\r\n\t\t\t\t\r\r\n\t\t\t}\r\r\n\t\t}", "title": "" }, { "docid": "ef824ae343e0e03478db76e9c2e1e042", "score": "0.5114757", "text": "public function get_proveedor_por_cedula_detalle_compras($cedula_proveedor){\n\n $conectar=parent::conexion();\n parent::set_names();\n\n\n $sql=\"select p.cedula,d.cedula_proveedor\n from producto p\n\n INNER JOIN detalle_compras c ON p.cedula=d.cedula_proveedor\n\n\n where p.cedula=?\n\n \";\n\n $sql=$conectar->prepare($sql);\n $sql->bindValue(1,$cedula_proveedor);\n $sql->execute();\n\n return $resultado=$sql->fetchAll(PDO::FETCH_ASSOC);\n\n\n }", "title": "" }, { "docid": "9772eb1c345c50de6c2a9b9e54cf76b4", "score": "0.5113214", "text": "public function estrai($tabella,$campi='',$valori='',$col='*',$more='',$cerca_campi='',$cerca_valori='',$assoc_by_id=0,$distinct=''){\n\t\t$conn = new PDO('mysql:host='.$this->nomehost.';dbname='.$this->nomedb,$this->nomeuser,$this->password);\n\t\t\n\t\tif(!is_array($campi)){\n\t\t\t$r[0]=$campi;\n\t\t}else{\n\t\t\t$r=$campi;\n\t\t}\n\t\tif(!is_array($valori)){\n\t\t\t$v[0]=$valori;\n\t\t}else{\n\t\t\t$v=$valori;\n\t\t}\n\t\t\n\t\tif(count($r) != count($v))\n\t\t\tdie('Devi dare lo stesso numero di campi e valori!');\n\t\t\n\t\tif(!is_array($cerca_campi)){\n\t\t\t$c_r[0]=$cerca_campi;\n\t\t}else{\n\t\t\t$c_r=$cerca_campi;\n\t\t}\n\t\t\n\t\t$c_v=str_replace(' ','%',$cerca_valori);\n\t\t\n\t\tif(is_array($col))\n\t\t\t$col=implode(',',$col);\t\n\t\t\n\t\t$sql=\"SELECT $col FROM $tabella\";\n\t\t\n\t\t\n\t\t$and=0;\n\t\t\n\t\tif(($r[0] != '' && $v[0] != '') || ($c_r[0] != '' && $c_v[0] != '')){\n\t\t\t$sql.=' WHERE';\n\t\t\t$assoc=array();\n\t\t\t\n\t\t\tif($r[0] != '' && $v[0] != '')\n\t\t\t\tforeach($r as $key => $val){\n\t\t\t\t\tif($and)\n\t\t\t\t\t\t$sql.=' AND';\n\t\t\t\t\telse\n\t\t\t\t\t\t$and=1;\n\t\t\t\t\t\t\n\t\t\t\t\t$sql.=' '.$val.' = :'.$val;\n\t\t\t\t\t$assoc[':'.$val]=$v[$key];\n\t\t\t\t}\n\t\t\t\t\n\t\t\tif($c_r[0] != ''){\n\t\t\t\tif($and)\n\t\t\t\t\t$sql.=' AND';\n\t\t\t\t$sql.=' LOWER(CONCAT('.implode(',',$c_r).')) LIKE LOWER(:'.$c_r[0].')';\n\t\t\t\t$assoc[':'.$c_r[0]]='%'.$c_v.'%';\n\t\t\t\t$and=1;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t$sql.=' '.$more;\n\t\t\n\t\t\n\t\t\n\t\t$q=$conn->prepare($sql);\n\t\tif($and)\n\t\t\t$q->execute($assoc);\n\t\telse\n\t\t\t$q->execute();\n\t\t\n\t\twhile($row = $q->fetch(PDO::FETCH_ASSOC)){\n\t\t\tif($assoc_by_id)\n\t\t\t\t\t$result[$row['id']]=$row;\n\t\t\t$result[]=$row;\n\t\t}\n\t\t\n\t\t\n\t\tif(isset($result))\n\t\t\treturn $result;\n\t\telse\n\t\t\treturn false;\n\t\t\n\t}", "title": "" }, { "docid": "6f57705f91891f8e13870c3233d50c9a", "score": "0.51105344", "text": "public function read(){\n // select all query\n $query = \"SELECT builders_info.builder_id, builders_info.builder_name, builders_info.contact,builders_info.status, builders_info.email,areas_info.area_name,builders_info.builder_status FROM builders_info LEFT JOIN areas_info ON builders_info.builder_id = areas_info.builder_id\";\n // prepare query statement\n $resultSet = mysqli_query($this->connection, $query);\n return $resultSet;\n}", "title": "" }, { "docid": "9d4b52ded783486cee17f267f3e2e5bb", "score": "0.509939", "text": "public function opcionn($dato){\n $this->db->query(\"SELECT * FROM opcion op INNER JOIN acceso acc ON acc.id_opcion=op.id INNER JOIN grupo gr ON op.id_grupo=gr.id and op.id_grupo=:id_grupo \");\n $this->db->bind(':id_grupo',$dato);\n\n return $this->db->registros();\n \n}", "title": "" }, { "docid": "8a781a526f6821009fe9f3beb400b14c", "score": "0.5097083", "text": "protected function _getMultiJoin(){ }", "title": "" }, { "docid": "890fdd3aaf02c52600c3e58ac6889eac", "score": "0.5093265", "text": "protected function _getSingleJoin(){ }", "title": "" }, { "docid": "d4bf30705e614377e7114a158b6f9d78", "score": "0.5077277", "text": "public function get_items_by_OC($invoice){\n\n\n\n$query ='SELECT * \nFROM PurOrdr_Header_Exp\nINNER JOIN PurOrdr_Detail_Exp ON PurOrdr_Header_Exp.TransactionID = PurOrdr_Detail_Exp.TransactionID\nWHERE PurOrdr_Header_Exp.ID_compania=\"'.$this->id_compania.'\"\nAND PurOrdr_Header_Exp.PurchaseOrderNumber =\"'.$invoice.'\"';\n\n$res = $this->Query($query);\n\n\nreturn $res;\n}", "title": "" }, { "docid": "16e2c7baee354288c330334dae0fa1d8", "score": "0.5059147", "text": "public function actproyecto(){\n $resultado = $this->mysqli->query(\"SELECT\n actividad_proyecto.cod_act_proyecto,\n actividad_proyecto.nom_act_proyecto,\n fases.nom_fase\n FROM actividad_proyecto\n INNER JOIN fases ON actividad_proyecto.cod_fase = fases.cod_fase\n\n \n \");\n\n while( $fila = $resultado->fetch_assoc() ){\n $data[] = $fila;\n }\n\n if (isset($data)) {\n return $data; \n } \n \n }", "title": "" }, { "docid": "546efc51bdb6a3f3a6532f62f3ce2932", "score": "0.50585806", "text": "public function getSingleinvoiceData2(){\n\t \t$obj=\" SELECT invoices_id,degree.degreename,section.sectionname,invoices.phone,invoices.rollno,invoices.amount,invoices.date,student.studentname ,paid FROM section INNER JOIN invoices ON section.section_id=invoices.section INNER JOIN degree ON\ndegree.degree_id=invoices.class INNER JOIN student ON student.student_id=invoices.student\";\n\t \n\t $query=$this->db->prepare($obj);\n\t $query->execute();\n\t $result=$query->fetch(PDO::FETCH_ASSOC);\n\t return $result;\n\t}", "title": "" }, { "docid": "b5045d474362b49d4f48fdc55db8155f", "score": "0.50576085", "text": "function cekPIC($id){\n\t$sql = \"SELECT a.user_auth,b.fname FROM auth a INNER JOIN users b ON a.user_auth=b.id_user WHERE a.level_auth = 'PIC' AND b.cust_group='$id'\";\n\t$res = mysqli_query($GLOBALS['link'], $sql);\n\treturn $res;\n}", "title": "" }, { "docid": "8e69b520b6db21c331fec388af8edba7", "score": "0.5054809", "text": "public function empresa()\n\t{\n\t\t$sql =\"SELECT * FROM empresas\";\t\n\t\t$query = $this->db->query($sql);\n\t\treturn $query->result();\n\t}", "title": "" }, { "docid": "78b46a3ec3262f22513e213a9717b49f", "score": "0.50532115", "text": "function READ_instructor_course_students($course_num)\r\n{\r\n global $db;\r\n $query = 'SELECT student.user_name, registered_course_student.course_num\r\n FROM student\r\n INNER JOIN registered_course_student\r\n ON registered_course_student.student_id = student.student_id\r\n AND registered_course_student.course_num = :course_num';\r\n \r\n $statement = $db->prepare($query);\r\n $statement->bindValue(':course_num', $course_num);\r\n $statement->execute();\r\n $students = $statement->fetchAll();\r\n $statement->closeCursor();\r\n return $students; \r\n}", "title": "" }, { "docid": "a1e83943727277684b99d0a396805f12", "score": "0.50497097", "text": "public function get_employe()\n\t{\n\t\t$this->db->distinct();\n\t\t$this->db->select(\"id, nik, name\");\n\t\t$this->db->from('employes');\n\t\t$this->db->like('name', $_GET['term'], 'both');\n\t\t$this->db->or_like('nik', $_GET['term'], 'both');\n\t\t$sql = $this->db->get();\n\t\t$data = [];\n\n\t\tforeach ($sql->result() as $row) {\n\t\t\t$data[] = [\n\t\t\t\t'id_kary' => $row->id,\n\t\t\t\t'nik' => $row->nik,\n\t\t\t\t'value' => $row->nik . ' - ' . $row->name\n\t\t\t];\n\t\t}\n\t\techo json_encode($data);\n\t}", "title": "" }, { "docid": "63f160c38be4cfe26e6754abfd33dd5f", "score": "0.5046826", "text": "function afficherEvenement(){\n\t\t$sql=\"SElECT * From evenementn\";\n\t\t$db = config::getConnexion();\n\t\ttry{\n\t\t$liste=$db->query($sql);\n\t\treturn $liste;\n\t\t}\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\t\n\t}", "title": "" }, { "docid": "06fcfd6f3f812de21f2a5420880a62cd", "score": "0.5044584", "text": "function queryExect( $sql ){\r\n global $conect;\r\n $query = $conect->query($sql);\r\n return $query;\r\n }", "title": "" }, { "docid": "9a514328ce7d1f2bdb18680bee25f66f", "score": "0.5043963", "text": "protected function _join()\n {\n if (!count($this->join_sql)) {\n return FALSE;\n }\n\n // Lay danh sach column tu sql hien tai\n $sql = $this->_join_get_sql_cur();\n //pr($sql,false);\n $list_col = array();\n $this->php_sql_parser_library->get_list_col($this->php_sql_parser_library->parse($sql), $list_col);\n //echo '<br>========';\n //\techo '<br>-$list_col:';pr($list_col,false);\n // Lay danh sach table tu $list_col\n $list_table = array();\n foreach ($list_col as $col) {\n // Neu field khong phai tu table khac\n $col = explode('.', $col, 2);\n if (count($col) != 2) continue;\n\n // Neu la table hien tai\n //\t$table = trim($col[0], $this->db->_escape_char);\n //echo '<br>-$table bef:'.$col[0];\n $table = trim($col[0], \"`\");\n //echo '<br>-$table af:'.$table;\n if ($table == $this->table) continue;\n\n // Neu table da co trong danh sach\n if (in_array($table, $list_table)) continue;\n\n // Them vao danh sach\n $list_table[] = $table;\n }\n\n //echo '<br>-$list_table:';pr($list_table,false);\n //echo '<br>-$join_sql:';pr($this->join_sql,false);\n // Lay danh sach table da duoc gan lenh join\n $list_table_join = array();\n foreach ($this->db->qb_join as $v) {\n $match = array();\n if (preg_match('#JOIN ([^\\s]+) ON #i', $v, $match)) {\n //$list_table_join[] = trim($match[1], $this->db->_escape_char);\n $list_table_join[] = trim($match[1], \"`\");\n\n\n }\n }\n $list_table_join = array_unique($list_table_join);\n\n // Thuc hien join table\n $join = array();\n\n foreach ($list_table as $table) {\n if (\n !isset($this->join_sql[$table]) || // Neu khong ton tai join_sql cua table\n in_array($table, $list_table_join) // Table da duoc gan lenh join\n ) {\n continue;\n }\n\n $join[$table] = TRUE;\n $this->db->join($table, $this->join_sql[$table], 'left');\n\n }\n\n return (count($join)) ? TRUE : FALSE;\n }", "title": "" }, { "docid": "b43412d84034c7003d09e57c34da6fb6", "score": "0.50409204", "text": "public function prueba($id_empleado){\n $params= ':id_emp';\n $sql = Yii::$app->db->createCommand('select * from empleado_prueba(' . $params . ')')\n ->bindValue(':id_emp', $id_empleado)\n ->queryAll();\n // print_r($sql);\n echo JSON::encode($sql);\n \n }", "title": "" }, { "docid": "8078a49786fd95fce7425ef03f6ecd0d", "score": "0.503361", "text": "public function get_all_employeeID_DB(){\n\n\t\t$query = $this -> db\n ->select('employee_id')\n ->where('isEmployee', 1)\n ->get('employee_info');\n\t\treturn $query->result();\n\n\t}", "title": "" }, { "docid": "335a7cd0e78273c473c25dc3fb227680", "score": "0.50300896", "text": "function joinProker($data){\n\t\t$this->db->select('kode_proker, status, keterangan, kegiatan,date_format(jadwal_mulai,\"%d-%m-%Y\") as jadwal_mulai,date_format(jadwal_mulai,\"%d-%m-%Y\") as jadwal_selesai, struktur_divisi.nama_struktur')\n\t\t->join('struktur_divisi','struktur_divisi.id_struktur = proker.id_struktur');\n\t\t$this->db->from('proker');\n\t\t$this->db->where('kode_proker' ,$data);\n\t\t$query = $this->db->get();\n\t\t return $query->row();\n\t\t}", "title": "" }, { "docid": "363b52a07d4928a7b01137eff04f1c29", "score": "0.50231594", "text": "public function getEmpleadosAbaco(){\n \n $result = $this->getEntityManager()->getConnection()->executeQuery(\"SELECT * FROM dbo.EMPL_EMPLEADOS\");\n $trabajadores = $result->fetchAll(); \n\n return $trabajadores; \n \n }", "title": "" }, { "docid": "4203683ee6d2055750a4e103cd9900ee", "score": "0.50149685", "text": "function listaAsistenciaEmpleado($inicio, $fin, $id){\t\n\t\t$con = conn();\t\n\t\t$query = \"select a.fecha, a.h_ent, a.h_sal,(time_to_sec(timediff(h_sal,h_ent )) / 3600) as hrs_trabj from personal as p, asistencia as a where p.id = $id and p.id = a.id_pers \".\n\t\t\"and a.fecha between '$inicio' and '$fin' and p.activo = TRUE union (select j.fecha, 'JUSTIFICADA','JUSTIFICADA','J' from personal as p,justificaciones as j \".\n\t\t\"where p.id = $id and p.id= j.id_pers and (j.fecha between '$inicio' and '$fin') and p.activo = true) order by fecha ASC\";\n\t\t$r = $con->query($query);\n\t\treturn $r;\n\t}", "title": "" }, { "docid": "a00eeb21203b9bdeab0a3eee2167cf40", "score": "0.5008269", "text": "public function get_empresas() {\n $sql = \"SELECT N1.* FROM (\n SELECT\n es.skEmpresaSocio AS id, CONCAT(e.sNombre,' (',e.sRFC,') - ',et.sNombre) AS nombre, es.skEmpresaTipo\n FROM rel_empresasSocios es\n INNER JOIN cat_empresas e ON e.skEmpresa = es.skEmpresa\n INNER JOIN cat_empresasTipos et ON et.skEmpresaTipo = es.skEmpresaTipo\n WHERE es.skEstatus = 'AC' AND e.skEstatus = 'AC' AND es.skEmpresaSocioPropietario = \" . escape($_SESSION['usuario']['skEmpresaSocioPropietario']);\n\n if (isset($this->vent['skEmpresaTipo']) && !empty($this->vent['skEmpresaTipo'])) {\n if (is_array($this->vent['skEmpresaTipo'])) {\n $sql .= \" AND es.skEmpresaTipo IN (\" . mssql_where_in($this->vent['skEmpresaTipo']) . \") \";\n } else {\n $sql .= \" AND es.skEmpresaTipo = \" . escape($this->vent['skEmpresaTipo']);\n }\n }\n\n $sql .= \" ) AS N1 \";\n\n if (isset($this->vent['sNombre']) && !empty(trim($this->vent['sNombre']))) {\n $sql .= \" WHERE N1.nombre LIKE '%\" . trim($this->vent['sNombre']) . \"%' \";\n }\n\n if (isset($this->vent['skEmpresaSocio']) && !empty($this->vent['skEmpresaSocio'])) {\n $sql .= \" WHERE N1.id = \" . escape($this->vent['skEmpresaSocio']);\n }\n\n $sql .= \" ORDER BY N1.nombre ASC \";\n \n $result = Conn::query($sql);\n if (!$result) {\n return FALSE;\n }\n $records = Conn::fetch_assoc_all($result);\n utf8($records);\n return $records;\n }", "title": "" }, { "docid": "84d2d48d5baf9ebb7d992f44ed84bff7", "score": "0.5003423", "text": "function semua_ftc_murid() {\n $db = new PDO(BASIS_DATA,USER_BASIS_DATA,PASSWORD_BASIS_DATA);\n $statement = $db->prepare('SELECT * FROM ftc_murid m\n LEFT JOIN ftc_penghasilan p on m.id_penghasilan = p.id_penghasilan\n LEFT JOIN ftc_kelas k on m.id_kelas = k.id_kelas\n ORDER BY id_murid asc');\n $statement->execute();\n return $statement->fetchAll(PDO::FETCH_ASSOC);\n}", "title": "" }, { "docid": "db84103344af0da4c2da877e35aa695c", "score": "0.5000081", "text": "public function employee(){\n\n \treturn $this->belongsTo('App\\Prototype_Employee', 'employee_id' , 'employee_id');\n }", "title": "" }, { "docid": "3dff2f5dbfc006b7f41e3e5b03fd531d", "score": "0.49983418", "text": "function get_empresa($id_emp)\n {\n return $this->db->get_where('empresa',array('id_emp'=>$id_emp))->row_array();\n }", "title": "" }, { "docid": "0607aedaffa7535306754f40d417f823", "score": "0.49983105", "text": "function consultarid($IdEmpleado, $lugar) {\r\n $con = new ConexionBD;\r\n if ($con->conectar() == true) {\r\n $query = \"SELECT t01.idempleado,\r\n t01.idarea,\r\n t01.nombre,\r\n t01.apellido,\r\n t03.nombrearea,\r\n t01.nombreempleado,\r\n t02.id AS idcargoempleado,\r\n t02.cargo,\r\n t04.username AS login,\r\n COALESCE(t04.id_modalidad_estab, 0) AS idmodalidad,\r\n t07.nombre AS nombremodalidad,\r\n t04.id_area_mod_estab,\r\n t11.nombre as areamod\r\n FROM mnt_empleado t01\r\n INNER JOIN mnt_cargoempleados t02 ON (t02.id = t01.id_cargo_empleado)\r\n INNER JOIN ctl_area_servicio_diagnostico t03 ON (t03.id = t01.idarea)\r\n INNER JOIN fos_user_user t04 ON (t01.id = t04.id_empleado AND t01.id_establecimiento = t04.id_establecimiento)\r\n INNER JOIN ctl_atencion t05 ON (t05.id = t03.id_atencion AND t05.codigo_busqueda = 'DCOLAB')\r\n LEFT OUTER JOIN mnt_modalidad_establecimiento t06 ON (t06.id = t04.id_modalidad_estab)\r\n LEFT OUTER JOIN ctl_modalidad t07 ON (t07.id = t06.id_modalidad)\r\n LEFT OUTER JOIN mnt_area_mod_estab t08 ON t08.id =t04.id_area_mod_estab\r\n LEFT JOIN mnt_modalidad_establecimiento t10 ON (t10.id =t08.id_modalidad_estab)\r\n LEFT JOIN ctl_modalidad t11 ON (t11.id=t10.id_modalidad)\r\n WHERE t01.idempleado = '$IdEmpleado' AND t01.id_establecimiento = $lugar\";\r\n $query;\r\n $result = pg_query($query);\r\n if (!$result)\r\n return false;\r\n else\r\n return $result;\r\n }\r\n }", "title": "" }, { "docid": "f8d27199b45f08959db880be2406678a", "score": "0.49948496", "text": "public function geticslist()\n\t{\n\t\t$sql2 = $this->db->query(\"SELECT equipments_ics.icsid,icsdate,icsno,CONCAT(fname,' ',lname) AS ename FROM equipments_ics LEFT JOIN employee ON equipments_ics.eid = employee.eid\");\n\t\treturn $sql2->result_array();\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "96c8621df29d4862fa3efd8a29a00ae6", "score": "0.49878088", "text": "function getData_difTable() {\n //$this->db->select('*');\n $this->db->select('*,user_id.id eid'); // for multiple data edit id set\n $this->db->from('user_id');\n $this->db->join('user_profile', 'user_id.id = user_profile.id'); //join with user_id and user_profile table\n $this->db->join('contact', 'user_id.id = contact.id'); //join with user_id and contact table\n $this->db->join('department', 'department.id = user_profile.dept_id'); //join with department and user_profile dept_id table\n $this->db->join('university', 'university.id = user_profile.unv_id'); //join with university and user_profile's unv_id table\n $this->db->join('gender', 'gender.id = user_profile.gender_id'); //join with gender and user_profile's gender_id table\n $this->db->join('married_status', 'married_status.id = user_profile.status_id'); //join with married_status and user_profile's status_id table\n $query = $this->db->get();\n return $query->result();\n }", "title": "" }, { "docid": "50a2aa79cd5d3d5ed777041c0c709dff", "score": "0.49829847", "text": "function paseHistorico($Id_empleado,$MotivoBaja){\n $obj= new conectar();\n $conexion=$obj->conexion();\n\n // inserta a historico\n $sqlHistAsigCel=\"\n insert into cel_usuario_historico\n SELECT 0 Id_CelUserHis,\n max(celUser.Id_empleado) as Id_empleado,\tmax(celUser.Id_celular) as Id_equipoCel, max(user.Num_empleado) as NominaEmpleado, max(user.Usuario_r) as NombreEmpleado, \n max(user.Gerencia) as Gerencia, max(user.Puesto) as Puesto, max(user.Zona) as Zona, max(user.Ubicacion) as Ubicacion, \n max(celUser.Estatus) as EstatusAsig, max(modCel.NombreModelo) as NombreModelo,\t max(modCel.Color) as Color,\t\t max(eqCel.Imei) as Imei, \n max(eqCel.Serie) as Serie,\t\t\t\t\tGROUP_CONCAT(accCel.Accesorio) as Accesorios, max(infLin.Telefono) as NumTel,\t\t max(Comp.Compania) as Compania,\n max(sim.Sim) as Sim,\t\t\t\t\t\t'\".$MotivoBaja.\"' as EstatusCel,\t\t\t max(infLin.Estado) as EstatusLinea, \t\tmax(infLin.Fecha_recepcion) as FechaRecepLin,\n infLin.Fin_plazo_forzoso as FinPlanForzoLin, max(celUser.registro) as FechaAsig, now() as FechaBaja\n from\n celular_usuarios as celUser\n inner join usuario \t as user \t\t\t on celUser.Id_empleado=user.Id_usuario\t\n inner join equipo_celular as eqCel \t\t on celUser.Id_celular=eqCel.Id_celular\n inner join modelo_ec as modCel\t\t on modCel.Id_modelo=eqCel.Id_modelo\n left join asignaaccesorio as asigAccCel\t on asigAccCel.Id_celular=eqCel.Id_celular\n left join accesorios as accCel\t\t on asigAccCel.Id_Accesorios=accCel.Id_Accesorios\n inner join inf_linea\t as infLin\t\t on\tinfLin.Id_linea=eqCel.Id_linea\n inner join sim\t\t\t as sim\t\t\t on sim.Id_Sim=infLin.Id_Sim\n inner join compania\t\t as Comp\t\t\t on Comp.Id_Compania=infLin.Id_Compania\n where celUser.Id_empleado=\".$Id_empleado.\"\n group by celUser.Id_empleado;\n \";\n $resAgreHis= mysqli_query($conexion,$sqlHistAsigCel);\n if($resAgreHis){\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "8575fb735adefb238b2547e943fd43fd", "score": "0.49751446", "text": "function get_details($custid){\n $q=\"SELECT * FROM customers JOIN customer_orders\n ON customers.customer_id=customer_orders.customer_id WHERE customers.customer_id ='$custid'\";\n //$q = \"SELECT * FROM customers JOIN customer_orders ON customers.order_id\n // = customer_orders.order_id WHERE customers.customer_id ='$custid'\";\n $result = $this->conn->query($q);\n //$t=$result->num_row; no need cos it wont return empty data regardless.\n $data = $result->fetch_assoc();\n return $data;\n \n }", "title": "" }, { "docid": "ba3b74f79972548544e705958d7e4264", "score": "0.49749336", "text": "function getTableList_Emp() {\n//\t\t$this->conn->debug=1;\n\t\t// Process the query string and exclude querystring named \"p\"\n\t\tif (!empty($_SERVER['QUERY_STRING'])) {\n\t\t\t$qrystr = explode(\"&\",$_SERVER['QUERY_STRING']);\n\t\t\tforeach ($qrystr as $value) {\n\t\t\t\t$qstr = explode(\"=\",$value);\n\t\t\t\tif ($qstr[0]!=\"p\") {\n\t\t\t\t\t$arrQryStr[] = implode(\"=\",$qstr);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$aQryStr = $arrQryStr;\n\t\t\t$aQryStr[] = \"p=@@\";\n\t\t\t$queryStr = implode(\"&\",$aQryStr);\n\t\t}\n\t\t//bby: search module\n\t\t$qry = array();\n\t\tif (isset($_REQUEST['search_field'])) {\n\t\t\t// lets check if the search field has a value\n\t\t\tif (strlen($_REQUEST['search_field'])>0) {\n\t\t\t\t// lets assign the request value in a variable\n\t\t\t\t$search_field = $_REQUEST['search_field'];\n\t\t\t\t// create a custom criteria in an array\n\t\t\t\t$qry[] = \"(pi_lname like '%$search_field%' || pi_fname like '%$search_field%' || post_name like '%$search_field%')\";\n\t\t\t}\n\t\t}\n\t\t//@note query filters for Quick Search->Suppliers\n\t\tif (count($_POST) > 0) {\n\t\t\t//@note for department\n\t\t\tif (($_POST['ud_name'] != '') && ($_POST['ud_name'] != '*')) {\n\t\t\t\t$qry[] = \"dept.ud_name like '\" . $_POST['ud_name'] . \"%' \";\n\t\t\t}\n\t\t\t//@note for product line category\n\t\t\tif (($_POST['emp_idnum'] != '') && ($_POST['emp_idnum'] != '*')) {\n\t\t\t\t//$qry[] = \"MATCH(am.si_prodlinecat) AGAINST('\" . $_POST['si_prodlinecat'] . \"') \";\n\t\t\t\t$qry[] = \"(empinfo.emp_idnum LIKE '%\".$_POST['emp_idnum'].\"%' || empinfo.pi_fname LIKE '%\".$_POST['emp_idnum'].\"%' || empinfo.pi_lname LIKE '%\".$_POST['emp_idnum'].\"%') \";\n\t\t\t}\n\t\t}\n\t\tif ($_GET['statpos']=='process_payroll') {\n\t\t\t$qrysql = \"JOIN salary_info sal on (sal.emp_id=empinfo.emp_id)\";\n\t\t\t$qrysql_= \"JOIN payroll_pps_user pps on (pps.emp_id=empinfo.emp_id)\";\n\t\t\t$qrysql2= \"JOIN payroll_comp pc on (pc.emp_id=sal.emp_id)\";\n\t\t\t$sqlsal = \"SELECT payperiod_type,DATE_FORMAT(payperiod_start_date,'%Y-%m-%d') as payperiod_start_date, DATE_FORMAT(payperiod_end_date,'%Y-%m-%d') as payperiod_end_date, payperiod_id FROM payroll_pay_period WHERE payperiod_id='\".$_GET['ppsched_view'].\"'\";\n\t\t\t$result = $this->conn->Execute($sqlsal);\n\t\t\t$var = $result->fields['payperiod_id'];\n\t\t\t$qry[]=\"empinfo.emp_id not in (SELECT a.emp_id FROM payroll_pps_user a JOIN payroll_paystub_report re on (a.emp_id=re.emp_id) WHERE payperiod_id = '\".$_GET['ppsched_view'].\"')\";\n\t\t\t$qry[]=\"sal.salaryinfo_effectdate <= '\".$result->fields['payperiod_end_date'].\"'\";\n\t\t\t$qry[]=\"pps.pps_id = '\".$_GET['ppsched'].\"'\";\n\t\t\tIF($result->fields['payperiod_type']==3){\n\t\t\t\t$otadd = \"N/A\";\n\t\t\t} ELSE {\n\t\t\t\t$otadd = \"<a href=\\\"?statpos=process_payroll&otcomp=',pps.pps_id,'&emp=',empinfo.emp_id,'&edit=',$var,'\\\"><img src=\\\"\".SYSCONFIG_DEFAULT_IMAGES_INCTEMP.\"icons/edited/leaveicon.png\\\" title=\\\"TA\\\" hspace=\\\"2px\\\" border=0 width=\\\"16\\\" height=\\\"16\\\"></a>\";\n\t\t\t}\n\t\t\t$leaveadd = \"<a href=\\\"?statpos=process_payroll&edit=',pps.pps_id,'\\\"><img src=\\\"\".SYSCONFIG_DEFAULT_IMAGES_INCTEMP.\"icons/edited/leaveicon.png\\\" title=\\\"Leave\\\" hspace=\\\"2px\\\" border=0 width=\\\"16\\\" height=\\\"16\\\"></a>\";\n\t\t\t\n\t\t\t$qry[]=\"sal.salaryinfo_isactive = '1'\";\n\t\t\t$qry[] = \"pc.fr_id not in (0)\";\n\t\t\t$listcomp = $_SESSION[admin_session_obj][user_comp_list2];\n\t\t\t$listloc = $_SESSION[admin_session_obj][user_branch_list2];\n\t\t\t$listpgroup = $_SESSION[admin_session_obj][user_paygroup_list2];\n\t\t\tIF(count($listcomp)>0){\n\t\t\t\t$qry[] = \"empinfo.comp_id in (\".$listcomp.\")\";//company that can access\n\t\t\t}\n\t\t\tIF(count($listloc)>0){\n\t\t\t\t$qry[] = \"empinfo.branchinfo_id in (\".$listloc.\")\";//location that can access\n\t\t\t}\n\t\t\tIF(count($listpgroup)>0){\n\t\t\t\t$qry[] = \"pps.pps_id in (\".$listpgroup.\")\";//pay group that can access\n\t\t\t}\n\t\t} else {\n\t\t\t$qry[]=\"empinfo.emp_id not in (SELECT a.emp_id FROM payroll_pps_user a)\";\n\t\t}\n $qry[] = \"empinfo.emp_stat in ('1','7','10','8')\";\n $qry[] = \"((empinfo.emp_resigndate IS NULL OR empinfo.emp_resigndate='0000-00-00') OR (empinfo.emp_resigndate >= '\".$result->fields['payperiod_start_date'].\"' AND empinfo.emp_resigndate <= '\".$result->fields['payperiod_end_date'].\"'))\";\n\t\t// put all query array into one criteria string\n\t\t$criteria = (count($qry)>0)?\" where \".implode(\" AND \",$qry):\"\";\n\t\t// Sort field mapping\n\t\t$arrSortBy = array(\n\t\t \"chkbox\" => \"chkbox\"\n\t\t,\"empLink\" => \"empLink\"\n\t\t,\"emp_idnum\" => \"emp_idnum\"\n\t\t,\"pi_lname\" => \"pi_lname\"\n\t\t,\"pi_fname\" => \"pi_fname\"\n\t\t,\"post_name\" => \"post_name\"\n\t\t,\"comp_name\" => \"comp_name\"\n\t\t,\"branchinfo_name\" => \"branchinfo_name\"\n\t\t,\"ud_name\" => \"ud_name\"\n\t\t);\n\n\t\tif (isset($_GET['sortby'])) {\n\t\t\t$strOrderBy = \" ORDER BY \".$arrSortBy[$_GET['sortby']].\" \".$_GET['sortof'];\n\t\t} else {\n\t\t\t$strOrderBy = \" ORDER BY pinfo.pi_lname\";\n\t\t}\n\n\t\t//@note: this is used to count and check all the checkbox.\n\t\t//@note set t1 = 0\n\t\t$sql = \"set @t1:=0\";\n\t\t$this->conn->Execute($sql);\n\t\t//get total number of records and pass it to the javascript function CheckAll\n\t\t$sql_ = \"SELECT COUNT(*) AS mycount_\n\t\t\t\t\tFROM emp_masterfile empinfo\n\t\t\t\t\tJOIN emp_personal_info pinfo ON (pinfo.pi_id=empinfo.pi_id)\n\t\t\t\t\tLEFT JOIN app_userdept dept ON (dept.ud_id=empinfo.ud_id)\n\t\t\t\t\tLEFT JOIN emp_position post ON (post.post_id=empinfo.post_id)\n\t\t\t\t\tLEFT JOIN company_info comp ON (comp.comp_id=empinfo.comp_id)\n\t\t\t\t\tLEFT JOIN branch_info bran ON (bran.branchinfo_id=empinfo.branchinfo_id)\n\t\t\t\t$qrysql\n\t\t\t\t$qrysql_\n\t\t\t\t$qrysql2\n\t\t\t\t$criteria\n\t\t\t\t$strOrderBy\";\n\t\t$rsResult = $this->conn->Execute($sql_);\n\t\tif (!$rsResult->EOF) {\n\t\t\t$mycount = $rsResult->fields['mycount_'];\n\t\t}\n\t\t// Add Option for Image Links or Inline Form eg: Checkbox, Textbox, etc...\n\t\t$ctr=0;\n\t\t$chkAttend = \"<input type=\\\"checkbox\\\" name=\\\"chkAttend[]\\\" id=\\\"chkAttend[',@t1:=@t1+1,']\\\" value=\\\"',empinfo.emp_id,'\\\" onclick=\\\"javascript:UncheckAll({$mycount});\\\">\";\n\t\t\n\t\t// SqlAll Query\n\t\t$sql = \"SELECT pinfo.pi_lname,pinfo.pi_fname, dept.ud_name, post.post_name, bran.branchinfo_name, comp.comp_name,\n\t\t\t\tCONCAT('$chkAttend') as chkbox, empinfo.emp_idnum, CONCAT('$otadd') as empLink\n\t\t\t\t\t\tFROM emp_masterfile empinfo\n\t\t\t\t\t\tJOIN emp_personal_info pinfo on (pinfo.pi_id=empinfo.pi_id)\n\t\t\t\t\t\tLEFT JOIN app_userdept dept on (dept.ud_id=empinfo.ud_id)\n\t\t\t\t\t\tLEFT JOIN emp_position post on (post.post_id=empinfo.post_id)\n\t\t\t\t\t\tLEFT JOIN company_info comp on (comp.comp_id=empinfo.comp_id)\n\t\t\t\t\t\tLEFT JOIN branch_info bran on (bran.branchinfo_id=empinfo.branchinfo_id)\n\t\t\t\t\t\t$qrysql\n\t\t\t\t\t\t$qrysql_\n\t\t\t\t\t\t$qrysql2\n\t\t\t\t\t\t$criteria\n\t\t\t\t\t\t$strOrderBy\";\n\t\t// Field and Table Header Mapping\n\t\t$arrFields = array(\n\t\t \"chkbox\" => \"<input type=\\\"checkbox\\\" name=\\\"chkAttendAll\\\" id=\\\"chkAttendAll\\\" onclick=\\\"javascript:CheckAll({$mycount});\\\">\"\n\t\t,\"empLink\" => \"Action\"\n\t\t,\"emp_idnum\" => \"Emp No.\"\n\t\t,\"pi_lname\" => \"Last Name\"\n\t\t,\"pi_fname\" => \"First Name\"\n\t\t,\"post_name\" => \"Position\"\n\t\t,\"comp_name\" => \"Company\"\n\t\t,\"branchinfo_name\" => \"Branch\"\n\t\t,\"ud_name\" => \"Department\"\n\t\t);\n\t\t// Column (table data) User Defined Attributes\n\t\t$arrAttribs = array(\n\t\t \"viewdata\"=>\"width='30' align='center'\"\n\t\t,\"empLink\"=>\"width='30' align='center'\"\n\t\t,\"chkbox\"=>\"width='10' align='center'\"\n\t\t);\n\t\t// Process the Table List\n\t\t$tblDisplayList = new clsTableList($this->conn);\n//\t\t$tblDisplayList->tblBlock->templateFile = \"table2.tpl.php\";\n\t\t$tblDisplayList->arrFields = $arrFields;\n\t\t$tblDisplayList->paginator->linkPage = \"?$queryStr\";\n\t\t$tblDisplayList->sqlAll = $sql;\n\t\t$tblDisplayList->sqlCount = $sqlcount;\n//\t\t$tblDisplayList->tblBlock->templateFile = \"table_nosort.tpl.php\";\n\t\t$tblDisplayList->tblBlock->assign(\"noSearchStart\",\"<!--\");\n\t\t$tblDisplayList->tblBlock->assign(\"noSearchEnd\",\"-->\");\n\t\treturn $tblDisplayList->getTableList($arrAttribs);\n\t}", "title": "" }, { "docid": "f66faddf8c5621b8f6b857a06ec0d79f", "score": "0.4974372", "text": "function select_sales_admin(){\n $sql_sel=\"SELECT * FROM usuario INNER JOIN administrador ON usuario.Id_usuario=administrador.Id_admin WHERE administrador.rol='ventas'\";\n $r=$GLOBALS['conne']->query($sql_sel);\n if($r->num_rows>0){\n return $r->fetch_assoc();\n }else{\n return null;\n }\n }", "title": "" }, { "docid": "b0a79d68a0f8249353a7301e4649993c", "score": "0.4972829", "text": "function getSEQualifications ($dbconn, $subContactsId) {\n $sqlSEQ = \"SELECT * FROM qualRecord LEFT JOIN qualifications ON qualifications.qualificationId=qualRecord.qualificationId\n WHERE qualRecord.subContactsId = '$subContactsId'\";\n $result = $dbconn->query($sqlSEQ);\n return $result;\n}", "title": "" }, { "docid": "9098882625e944d069887a7d77d2a1c9", "score": "0.49726444", "text": "function getSearchData()\n{\n $search = $_POST['str'];\n // $searchQuery = \"SELECT hospitals.id, hospitals.hospital_name,hospitals.hospital_address,hospitals.contact,bed_availablity.available_beds FROM hospitals,bed_availablity WHERE hospitals.pincode LIKE '%$search%'\";\n $searchQuery = \"SELECT id,pincode, hospital_name, hospital_address,contact ,available_beds FROM hospitals INNER JOIN bed_availablity ON hospitals.id = bed_availablity.hospital_id WHERE pincode='$search'\";\n $result = mysqli_query($GLOBALS['con'], $searchQuery);\n if (mysqli_num_rows($result) > 0) {\n return $result;\n }\n}", "title": "" }, { "docid": "9d65142f63b78f3425e596c0c60d8a36", "score": "0.4969411", "text": "protected function set_sql()\n {\n\n $params = array();\n\n\n $sql = \"SELECT CONCAT(firstname,\\\";\\\", lastname) AS Nombre,mdl_quiz_grades.grade AS Nota \nFROM ((mdl_user RIGHT JOIN mdl_quiz_grades ON mdl_user.id=mdl_quiz_grades.userid) \nLEFT JOIN mdl_quiz ON mdl_quiz.id=mdl_quiz_grades.quiz) \nLEFT JOIN mdl_course ON mdl_course.id=mdl_quiz.course\";\n\n\n $this->sql = $sql;\n $this->params = $params;\n }", "title": "" }, { "docid": "67891af6db5422824f75abbe1d09fe11", "score": "0.49655205", "text": "function query($edicion, $indice) { \n\t\t\t\t \n\t\t\t\techo ' <table border=\"0\" cellspacing=\"1\" cellpadding=\"4\" >\n\t\t\t\t <tr>'; \n\t\t\t\t\t // para edicion, aprobacion\n\t\t\t\t\t $this->_etiqueta('','','cabecera_grid'); \n\t\t\t\t\t \n\t\t\t\t\t// mostramos los nombres de los campos \n\t\t\t\t\tfor ($i = 0; $i < $this->numcampos(); $i++){ \n\t\t\t\t\t $this->_etiqueta($this->nombrecampo($i),'','cabecera_grid');\n\t\t\t\t\t} \n\t\t\t\t\techo \"</tr>\"; \n\t\t\t\t// mostrarmos los registros \n\t\t\t echo '<tr>';\n\t\t\t\t while ($row = oci_fetch_array($this->Consulta_ID, OCI_ASSOC + OCI_RETURN_NULLS)) {\n\t\t\t\t\t $imagen_editar = '<a href=\"'.$edicion.$indice.'='. $row[$indice].\n\t\t\t\t\t \t\t\t\t '\" target=\"_self\"><img src=\"images/View.png\" alt=\"editar\" width=\"16\" height=\"16\" border=\"0\" \t\t\t \n\t\t\t\t\t\t\t\t\t align=\"absmiddle\" /></a>';\n\t\t\t\t\t\t \n\t\t\t\t\t\t echo ' <td class=\"detalle_grid\">' .$imagen_editar . '</td>';\n\t\t\t\t\t\t// echo $row['IDMARCA'] . \"<br>\\n\";\n\t \n\t\t\t\t\t foreach ($row as $item) {\n\t\t\t\t\t\t\t \t $item = str_replace(\",\",\".\",$item);\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\tif (is_numeric($item))\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t $ali = right;\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t else\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t $ali = left;\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t echo ' <td class=\"detalle_grid\" align=\"'.$ali.'\">' . ($item !== null ? htmlentities($item, ENT_QUOTES) : \"&nbsp;\") . '</td>';\n\t\t\t\t }\n\t\t\t\t print \"</tr>\";\n\t\t\t }\n \t\t\t\t\n\t\t\t\n }", "title": "" }, { "docid": "ac6d1856e9f1d2d3905f7f47d8c806c3", "score": "0.4960577", "text": "function getElectricalEquip ($dbconn) {\n $sqlGetEE = \"SELECT divisions.divisionName,\n CONCAT(contacts.firstName , ' ' , contacts.lastName) AS fullName,\n equipRecord.userId,\n equipment.equipName,\n equipment.equipType,\n equipRecord.serialNumber,\n equipRecord.issueDate,\n equipRecord.expDate\n FROM contacts\n LEFT JOIN equipRecord ON contacts.userId = equipRecord.userId\n LEFT JOIN equipment ON equipRecord.equipmentId = equipment.equipmentId\n LEFT JOIN divisions ON contacts.divisionId = divisions.divisionId\n WHERE equipType = 'electrical' AND DATEDIFF(expDate,NOW())<31\n ORDER BY divisionName\n \";\n $result = $dbconn->query($sqlGetEE);\n return $result;\n}", "title": "" }, { "docid": "c1bf41c89cf2243209b08b4915597142", "score": "0.49525455", "text": "public function query()\n\t{\n\t\t$rows = $this->db->where(\"id >\",\"1\")->like(\"title\",\"an\")->order_by(\"id\",\"desc\")->limit(1)->get(\"personel\")->result();\n\t\tprint_r($rows);\n\n\t\t//echo $this->db->last_query();\n\t}", "title": "" }, { "docid": "6556ae599380aa7f602816e8a46ce6b5", "score": "0.49494433", "text": "function afficherEvenements(){\n\t\t$sql=\"SELECT * From evenement\";\n\t\t$db = config::getConnexion();\n\t\ttry{\n\t\t$liste=$db->query($sql);\n\t\treturn $liste;\n\t\t}\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\t\n\t}", "title": "" }, { "docid": "582a4ebcad39d9ddf7a8db0ce6efb660", "score": "0.49461433", "text": "function queryExectSimpleData( $sql ){\r\n global $conect;\r\n $query = $conect->query($sql);\r\n $row = $query->fetch_assoc();\r\n return $query;\r\n }", "title": "" }, { "docid": "e551b83e4415c43f5ea4301d8aaecd8c", "score": "0.49446785", "text": "protected function _getSqlBase() {\n $sql = $this->getModel()->getTableName().' '.$this->getModel()->getAlias() .\" \n JOIN \".$this->_getConta()->getModel()->getTableName().\" usuario ON ( profile_object_view.id_usuario = usuario.id ) \"; \n return $sql;\n }", "title": "" }, { "docid": "2be4f94f0aa86e43a2122cfe975ce36a", "score": "0.49438626", "text": "protected function getJoins()\n { \n }", "title": "" }, { "docid": "000eb45736cb99a88eff922ffd38f242", "score": "0.49429667", "text": "function getJoin($filter=false){\n\t\t$strQuery=\"select * from pooljoin\";\n\t\tif($filter!=false){\n\t\t\t$strQuery=$strQuery . \" where $filter\";\n\t\t}\n\t\treturn $this->query($strQuery);\n\t}", "title": "" }, { "docid": "ef4f7878620bed252d9bb721bcaf995a", "score": "0.4942099", "text": "function filter_Email(){\n $query = $this->db->select('*')\n ->from('master_pegawai')\n ->join('user_pegawai','user_pegawai.kode_pegawai = master_pegawai.kode_pegawai')\n ->where_in('user_pegawai.id_level_akun', 1)\n ->where_in('user_pegawai.id_status_akun', 2)\n ->get();\n return $query;\n }", "title": "" }, { "docid": "1cdf2be99538f64348280aae89b4b606", "score": "0.4938574", "text": "public function companyjobpostAction(){\n \tglobal $mySessionFront;\n\t \t$db=new Db();\n\t\tif(!isLogged()) { \n\t\t\t$mySessionFront->errorMsg =\"Login to see ...\"; \n\t\t\t$this->_redirect('index/login');\n\t\t}\n\t\t\t$Employee_Qry= \"SELECT\n\ttbl_countries.country_name,\n\ttbl_career_levels.career_level_title,\n\ttbl_nationalities.nation_title,\n\ttbl_job_categories.category_title,\n\ttbl_users.user_id,\n\ttbl_users.user_fname,\n\ttbl_users.user_lname,\n\ttbl_users.user_email,\n\ttbl_users.user_phone_country_code,\n\ttbl_users.user_phone,\n\ttbl_users.user_phone_extn_code,\n\ttbl_users.user_image,\n\ttbl_users.user_address_line_1,\n\ttbl_users.user_address_line_2,\n\ttbl_users.user_city,\n\ttbl_users.user_company,\n\ttbl_users.user_company_address_line_1,\n\ttbl_users.user_company_address_line_2,\n\ttbl_users.user_company_web_url,\n\ttbl_users.user_company_phone_number,\n\ttbl_users.user_company_fax_country_code,\n\ttbl_users.user_company_phone_ext,\n\ttbl_users.user_company_personal_designation,\n\ttbl_users.user_company_phone_country_code,\n\ttbl_users.user_company_detail,\n\ttbl_users.user_annual_revenue,\n\ttbl_users.user_profile_summary,\n\ttbl_users.map_code,\n\ttbl_users.user_number_of_employees,\n\ttbl_users.user_jobs_available,\n\ttbl_users.user_jobs_expire_on,\n\ttbl_users.user_featured_jobs_available,\n\ttbl_users.user_resume_membership_expires_on\n\tFROM\n\ttbl_users\n\tLEFT JOIN tbl_career_levels ON tbl_users.user_career_level = tbl_career_levels.career_level_id\n\tLEFT JOIN tbl_countries ON tbl_users.user_country = tbl_countries.country_id\n\tLEFT JOIN tbl_nationalities ON tbl_users.user_nationality = tbl_nationalities.id\n\tLEFT JOIN tbl_job_categories ON tbl_users.user_industry = tbl_job_categories.cat_id ,\n\ttbl_job_sub_categories\n\tWHERE user_id ='\".$mySessionFront->user['FrontUserId'].\"' GROUP BY user_id\";\n\t\t\t$Employee_GetData = $db->runQuery($Employee_Qry);\n\t\t\t//prd($GetData); exit;\n\t\t\t$this->view->Employee_Data = $Employee_GetData[0];\n//================================== Side Bar ======================================//\n//================================== Side Bar ======================================//\n\t\t\n\t\t\t//------- Saved Jobs ------//\n\t\t\t$save_qry=\"SELECT COUNT(user_id) as TotalSave FROM tbl_jobs WHERE user_id='\".$mySessionFront->user['FrontUserId'].\"' and job_status='0'\";\n\t\t\t//prd($qry);\n\t\t\t$Job_Save = $db->runQuery(\"$save_qry\");\n\t\t\t//prd($Job_Save);\n\t\t\t$this->view->Emp_SaveJobs=$Job_Save[0];\n\t\t\t\n\t\t\t//------- Jobs Posted ------//\n$Posted_Job_Qry=\"SELECT COUNT(user_id) as TotalApply FROM tbl_jobs WHERE user_id ='\".$mySessionFront->user['FrontUserId'].\"' and job_status='1'\";\n\t\t\t//prd($qry);\n\t\t\t$Posted_Job = $db->runQuery(\"$Posted_Job_Qry\");\n\t\t\t//prd($Apply_Job);\n\t\t\t$this->view->Emp_Posted_Job=$Posted_Job[0];\n\t\t\t\n\t\t\t//------- Notifications ------//\n\t\t\t$Noti_qry=\"SELECT COUNT(`to`) as TotalNoti FROM tbl_notifications WHERE `to` ='\".$mySessionFront->user['FrontUserId'].\"'\";\n\t\t\t//prd($Noti_qry);\n\t\t\t$Job_Noti = $db->runQuery(\"$Noti_qry\");\n\t\t\t//prd($Job_Noti);\n\t\t\t$this->view->Emp_Job_Noti=$Job_Noti[0];\n//========================================= Resumes ==========================//\n\t\t$Resumes_Qry=\"SELECT COUNT(`employer_id`) as Total_Resumes FROM tbl_saved_resumes WHERE `employer_id` ='\".$mySessionFront->user['FrontUserId'].\"'\";\n\t\t\t//prd($Resumes_Qry);\n\t\t$Resumes_Data = $db->runQuery(\"$Resumes_Qry\");\n\t\t\t\t//prd($Resumes_Data);\n\t\t$this->view->Resumes_Data_Total=$Resumes_Data[0];\n\t\t\n\t\t\t/*$Noti_qry=\"SELECT COUNT(`to`) as TotalNoti FROM tbl_notifications WHERE `to` ='\".$mySessionFront->user['FrontUserId'].\"'\";\n\t\t\t//prd($Noti_qry);\n\t\t\t$Job_Noti = $db->runQuery(\"$Noti_qry\");\n\t\t\t//prd($Job_Noti);\n\t\t\t$this->view->Emp_Job_Noti=$Job_Noti[0];*/\n\t\t\n\t\t\n\t\t\t$Company_Job_Post_Qry= \"SELECT\ntbl_jobs.id,\ntbl_jobs.user_id,\ntbl_jobs.job_title,\ntbl_jobs.job_description,\ntbl_jobs.job_posted_on,\ntbl_users.user_type,\ntbl_users.user_fname,\ntbl_users.user_lname,\ntbl_job_sub_categories.sub_category_title,\ntbl_job_categories.category_title,\ntbl_job_roles.job_role_title,\ntbl_career_levels.career_level_title\nFROM\ntbl_jobs\nLEFT JOIN tbl_users ON tbl_jobs.user_id = tbl_users.user_id\nINNER JOIN tbl_job_categories ON tbl_jobs.job_category = tbl_job_categories.cat_id\nINNER JOIN tbl_job_sub_categories ON tbl_jobs.job_sub_category = tbl_job_sub_categories.sub_cat_id\nINNER JOIN tbl_job_roles ON tbl_jobs.job_role = tbl_job_roles.job_role_id\nINNER JOIN tbl_career_levels ON tbl_jobs.job_career_level = tbl_career_levels.career_level_id\nWHERE tbl_jobs.user_id ='\".$mySessionFront->user['FrontUserId'].\"'\";\n\t\t\t$Company_Job_Post_GetData = $db->runQuery($Company_Job_Post_Qry);\n\t\t\t\t//prd($Company_Job_Post_GetData); \n\t\t\t$this->view->Company_Job_Post_List = $Company_Job_Post_GetData;\n\t}", "title": "" }, { "docid": "0f7419f292b96a585c5c3115f9caf26c", "score": "0.49287826", "text": "public function employee(){\n \treturn $this->belongsTo('App\\Employee' ,'nik_employee');\n }", "title": "" }, { "docid": "755e580516a08a40db29227d30467bd1", "score": "0.49258748", "text": "function findAlunosJoin(){\n \n $database = open_database();\n \n try{\n $sql = \"SELECT C.id, C.nome, C.letra, C.tipo, C.estado, A.nome_completo FROM cursos C LEFT JOIN alunos A ON C.id_monitor = A.id ORDER BY C.data_inicio\";\n $result = $database -> query($sql);\n $found = $result->fetch_all(MYSQLI_ASSOC);\n }\n catch(Exception $e){\n $_SESSION['message'] = $e->GetMessage();\n $_SESSION['type'] = 'danger';\n }\n\t\n\tclose_database($database);\n\treturn $found;\n}", "title": "" }, { "docid": "0305ef299873838ce3d2df6e1ae690b5", "score": "0.4912723", "text": "private function joinProdutoCategoria() {\n $this->db->select( 'p.*, (select nome from lj_categorias where id = p.categoria_id limit 1) as nomeCateg, p.quantidade, p.dt_cadastro' );\n return $this->db->from( 'lj_produtos as p' );\n }", "title": "" }, { "docid": "f44aebe617a3b254bbda74425c402324", "score": "0.4912447", "text": "function get_select_join($table_a, $table_b, $id_a, $id_b, $columns, $where='', $order=''){\r\n\t$table =\"$table_a a, $table_b b\";\r\n\t$w=\"a.$id_a=b.$id_b \";\r\n\tif($where!='')\t$w.=\"AND ($where)\";\r\n\treturn get_select($table, $columns, $w, $order);\r\n}", "title": "" }, { "docid": "46fd3f1c5d2bb3877562bfe643c44f3b", "score": "0.4912199", "text": "function query_s() {\n\t\t\n\t\t\t\techo ' <table border=\"0\" cellspacing=\"1\" cellpadding=\"4\" align=\"center\">\n\t\t\t\t <tr>'; \n\t\t\t\t\t // para edicion, aprobacion\n\t\t\t\t\t $this->_etiqueta('','','cabecera_grid'); \n\t\t\t\t\t \n\t\t\t\t\t// mostramos los nombres de los campos \n\t\t\t\t\tfor ($i = 0; $i < $this->numcampos(); $i++){ \n\t\t\t\t\t $this->_etiqueta($this->nombrecampo($i),'','cabecera_grid');\n\t\t\t\t\t} \n\t\t\t\t\techo \"</tr>\"; \n\t\t\t\t// mostrarmos los registros \n\t\t\t echo '<tr>';\n\t\t\t\t while ($row = oci_fetch_array($this->Consulta_ID, OCI_ASSOC + OCI_RETURN_NULLS)) {\n\t\t\t\t\t $imagen_editar = '<a> <img src=\"images/vineta1.png\" width=\"16\" height=\"16\" border=\"0\" \t\t\t \n\t\t\t\t\t\t\t\t\t align=\"absmiddle\" /></a>';\n\t\t\t\t\t\t \n\t\t\t\t\t\t echo ' <td class=\"detalle_grid\">' .$imagen_editar . '</td>';\n\t\t\t\t\t\t// echo $row['IDMARCA'] . \"<br>\\n\";\n\t \n\t\t\t\t\t foreach ($row as $item) {\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t \t $item = str_replace(\",\",\".\",$item);\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\tif (is_numeric($item))\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t $ali = 'right';\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t else\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t $ali = 'left';\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t echo ' <td class=\"detalle_grid\" align=\"'.$ali.'\">' . ($item !== null ? htmlentities($item, ENT_QUOTES) : \"&nbsp;\") . '</td>';\n\t\t\t\t }\n\t\t\t\t print \"</tr>\";\n\t\t\t }\n \t\t\t\t\n\t\t\t\n }", "title": "" } ]
5da2759c553167202aa8996e01441007
get_url get_next_object This returns the next object in the tmp_playlist most of the time this will just be the top entry, but if there is a base_playlist and no items in the playlist then it returns a random entry from the base_playlist
[ { "docid": "2fef73cbafdd0aee5d935a7d067342cb", "score": "0.671043", "text": "public function get_next_object($offset='') {\n\n\t\t$offset = $offset ? intval($offset) : '0';\n\n\t\t// We have to get all because of the pysco sorting\n\t\t$items = self::get_items();\n\n\t\tif (count($items)) {\n\t\t\t$array = array_slice($items,$offset,1);\n\t\t\t$item = array_shift($array);\n\t\t\t$results['object_id'] = $item['0'];\n\t\t}\n\n /* If nothing was found and this is a voting playlist then get from base_playlist */\n if (!$results['object_id']) {\n\n /* Check for a playlist */\n if ($this->base_playlist) {\n /* We need to pull a random one from the base_playlist */\n $base_playlist = new Playlist($this->base_playlist);\n\t\t\t\t$data = $base_playlist->get_random_items(1);\n $results['object_id'] = $data['0']['object_id'];\n }\n else {\n $sql = \"SELECT `id` as `object_id` FROM `song` WHERE `enabled`='1' ORDER BY RAND() LIMIT 1\";\n $db_results = Dba::query($sql);\n $results = Dba::fetch_assoc($db_results);\n }\n }\n\n return $results['object_id'];\n\n }", "title": "" } ]
[ { "docid": "ba7025a77ac59ce253d938b3570e648e", "score": "0.6975279", "text": "public function get_next_object($offset='') {\n \n\t\t$offset = $offset ? intval($offset) : '0'; \n\n\t\t// We have to get all because of the pysco sorting\n\t\t$items = self::get_items(); \n\n\t\tif (count($items) > $offset) { \n\t\t\t$array = array_slice($items,$offset,1); \n\t\t\t$item = array_shift($array); \n\t\t\t$results['object_id'] = $item['object_id'];\n\t\t} \n\n /* If nothing was found and this is a voting playlist then get from base_playlist */\n if (!$results['object_id']) {\n\n /* Check for a playlist */\n if ($this->base_playlist) {\n /* We need to pull a random one from the base_playlist */\n $base_playlist = new Playlist($this->base_playlist);\n\t\t\t\t$data = $base_playlist->get_random_items(1);\n $results['object_id'] = $data['0']['object_id']; \n }\n else {\n $sql = \"SELECT `id` as `object_id` FROM `song` WHERE `enabled`='1' ORDER BY RAND() LIMIT 1\";\n $db_results = Dba::query($sql);\n $results = Dba::fetch_assoc($db_results);\n }\n }\n\n return $results['object_id'];\n\n }", "title": "" }, { "docid": "6d77bcfdf391b266ef1ae9471e3babe3", "score": "0.5797333", "text": "abstract public function getNext();", "title": "" }, { "docid": "2c4efab0ae9b4d9184e217b590674dd2", "score": "0.56881213", "text": "public function getNext();", "title": "" }, { "docid": "82b6a7d3cff57af0329512f66a818828", "score": "0.56024337", "text": "private function nextItem()\n\t{\n\t\t$currItem = NULL;\n//\t\tonly if album exist and not empty\n\t\tif ($obCurrItem = $this->resSections->GetNextElement(true, false))\n\t\t{\n\t\t\t$currItem = $obCurrItem->GetFields();\n\t\t\tif ($currItem[\"ELEMENT_CNT\"] > 0)\n//\t\t\t\tput album alias from map. Better do it here and not getting map (only for it value) in converter\n\t\t\t\t$currItem[\"TO_ALBUM_ALIAS\"] = isset($this->sectionsAliases[$currItem[\"ID\"]]) ?\n\t\t\t\t\t$this->sectionsAliases[$currItem[\"ID\"]] : false;\n\t\t}\n\n\t\treturn $currItem;\n\t}", "title": "" }, { "docid": "1b7f5995c54c168c2d84868b51cd0507", "score": "0.555592", "text": "function shr_get_playlist( $page = 'hot' ) {\n\n // Accept either 'hot' or 'new'\n $page = ( $page == 'hot' ? 'hot' : 'new' );\n\n $cachefile = CACHE_FILE . $page . '.php';\n\n // Serve from the cache if it is younger than allowed cache time\n if ( file_exists( $cachefile ) && filesize( $cachefile ) > 10 && ( time() - CACHE_TIME < filemtime( $cachefile ) ) ) {\n include( $cachefile );\n return $playlist;\n }\n\n // Serve fresh otherwise\n ob_start(); // start the output buffer\n\n switch( $page ) {\n case 'new':\n $url = REDDIT . 'new/';\n break;\n case 'hot':\n default:\n $url = REDDIT;\n }\n\n $playlist = array();\n\n // Parse front page, page 2 and page 3\n for ( $i = 1; $i <= 3; $i++ ) {\n $page = shr_get_youtube_items( $url );\n $playlist = array_merge( $playlist, $page['items'] );\n $url = $page['next'];\n usleep( 500000 );\n }\n \n echo '<' . \"?php\\n\";\n echo '$playlist = ';\n var_export( $playlist );\n echo \";\\n?>\\n\";\n \n // open the cache file for writing\n $fp = fopen( $cachefile, 'w' ); \n\n // save the contents of output buffer to the file\n $data = ob_get_contents();\n fwrite( $fp, $data );\n fclose( $fp ); \n ob_end_clean();\n\n return $playlist;\n}", "title": "" }, { "docid": "968cbbe5f4cd7731c1c25cff7c14b075", "score": "0.5437333", "text": "function get_next_thumb() { return $this->next_thumb; }", "title": "" }, { "docid": "d4cb7fbced69eec4b2a6ab4f86bed9e3", "score": "0.54018015", "text": "function next()\n {\n list(,$tmp) = each($this->objects);\n return $tmp;\n }", "title": "" }, { "docid": "3c379afe2640625d1b52d3e5c928d704", "score": "0.53908837", "text": "function getNext();", "title": "" }, { "docid": "d5e1c8ca0aa85452308b4f75ea10362f", "score": "0.5356712", "text": "public function doNextItem();", "title": "" }, { "docid": "c98bf5ec3bc5d224f12a71a4ccd9a139", "score": "0.5290337", "text": "public function getNextList($list)\n {\n # can't do anything without a feed\n if (! $list) {\n return null; # TODO : should raise error\n }\n \n # see if there's a next link in the feed -> if so, take its url\n $url = null;\n foreach($list->feed->link as $link) {\n if ($link->rel == \"next\") {\n $url = $link->href;\n }\n }\n # No next link available -> EOF\n if (! $url) {\n return null;\n }\n \n return $this->json_client->do_request($url, \"GET\");\n }", "title": "" }, { "docid": "353a05e1a8948015d9296dc7b485f542", "score": "0.52758235", "text": "public function getNextPageUrl();", "title": "" }, { "docid": "43715671afdf7c96f99decf3333b8051", "score": "0.52746135", "text": "public function getNextEntity(): ?object;", "title": "" }, { "docid": "9730af725a848652438920044eaaefc0", "score": "0.52623105", "text": "function _get_playlist_data($list_id, $max_results, $offset){\n $feed_url = \"http://gdata.youtube.com/feeds/api/playlists/\".$list_id.\n \"?v=2&alt=json&max-results=\".$max_results.\"&start-index=\".$offset;\n $table = json_decode(file_get_contents($feed_url), true);\n return $table['feed']['entry'];\n }", "title": "" }, { "docid": "0c73b7f7a49d47f5504d601a4b8ecf4d", "score": "0.52052444", "text": "function fetchNextObject($result = NULL)\n {\n if ($result == NULL)\n $result = $this->lastResult;\n\n if ($result == NULL || mysqli_num_rows($result) < 1)\n return NULL;\n else\n return mysqli_fetch_object($result);\n }", "title": "" }, { "docid": "ba5707f18aa771cb1945fc1e7463cd5e", "score": "0.5204621", "text": "function getCurPlaylist(){\n\t\tglobal $jbArr;\n\t\t\n\t\t// Let's get the full playing list - we'll create a session variable for this since it can be HUGE and take FOREVER\n\t\tif (!isset($_SESSION['jb_at_playlist'])){\n\t\t\t$_SESSION['jb_at_playlist'] = file_get_contents(\"http://\". $jbArr[$_SESSION['jb_id']]['server']. \"/apigetinfo.asp?type=playq\");\n\t\t}\n\t\t$list = $_SESSION['jb_at_playlist'];\n\t\t\n\t\t// Now let's break that into an array so we can process it\n\t\t$valArray = explode(\"[Song\",$list);\n\t\tfor ($i=0; $i < count($valArray); $i++){\n\t\t\tif (!stristr($valArray[$i], \"[Play Queue]\")){\n\t\t\t\t// Now let's get just the path out of this\n\t\t\t\t$item = substr($valArray[$i],strpos($valArray[$i],\"ID=\")+strlen(\"ID=\"));\n\t\t\t\t$item = substr($item,0,strpos($item,\"\\n\"));\n\t\t\t\t$item = str_replace(\"\\\\\\\\\". $jbArr[$_SESSION['jb_id']]['mediaserver']. \"\\\\\". $jbArr[$_SESSION['jb_id']]['mediashare']. \"\\\\\",\"\",$item);\n\t\t\t\t$item = str_replace(\"\\\\\",\"/\",$item);\n\t\t\t\t$retArray[] = $item;\n\t\t\t}\n\t\t}\n\t\treturn $retArray;\n\t}", "title": "" }, { "docid": "bdc1d8b30cb90d9b1182ab95107ec6a2", "score": "0.51838076", "text": "function next() {\n\t\t\t$runTimeStart = time();\n\t\t\tif (($this->trafficLimit > 0 && $this->bytesReceived >= $this->trafficLimit)\n\t\t\t || ($this->pageLimit > 0 && $this->filesReceived >= $this->pageLimit)){\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t\t$this->docInfo['source'] = '';\n\t\t\tforeach ($this->links as $key => $link) {\n\t\t\t\tif ($link['status'] == 'new') {\n\t\t\t\t\t$this->docInfo['url'] = $link['url'];\n\t\t\t\t\tif (self::urlExists($link['url'])) {\n\t\t\t\t\t\t$this->seDriver->get($link['url']);\n\t\t\t\t\t\t$this->docInfo['source'] = $this->seDriver->getPageSource();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$this->docInfo['source'] = FALSE;\n\t\t\t\t\t}\n\t\t\t\t\tif ($this->docInfo['source']) {\n\t\t\t\t\t\tself::addSourceLinks();\n\t\t\t\t\t\t$this->links[$key]['status'] = 'retrieved';\n\t\t\t\t\t\t$this->bytesReceived += strlen($this->docInfo['source']);\n\t\t\t\t\t\t++$this->filesReceived;\n\t\t\t\t\t\t++$this->linksFollowed;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$this->links[$key]['status'] = 'failed';\n\t\t\t\t\t\t++$this->linksFollowed;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->runTime += time() - $runTimeStart;\n\t\t\treturn $this->docInfo;\n\t\t}", "title": "" }, { "docid": "88747b7a373f1dc8d53b6f41a66d3bcd", "score": "0.5168166", "text": "public function testNextItem(){\n\t\t\n\t\t$res=$this->_cart->nextItem();\n\t\t\n\t// \tvar_dump($res);\n\t// \t$this->assertTrue(!is_null($res));\n\t// \t$count=count($this->_entries);\n\t\t$entries=$this->_cart->getAll2();\n\t\t$count=count($entries);\n\t\tforeach ($entries as $key=>$v){\n\t\t\tif($key==$count){\n\t// \t\t\t$this->assertTrue();\n\t\t\t}\n\t\t}\n\tif(!empty($res)){\n\t\t\techo 'next item:====='.$res->name.\"============\\n\\n\\n\";\n\t\t}else{\n\t\t\tvar_dump($res);\n\t\t\techo \"\\n\\n\";\n// \t\t\techo 'next item:= false'.\"\\n\";\n\t\t}\n\t\n\t\t\n\t}", "title": "" }, { "docid": "3a02b36eb8dd113a45929509b1df4c99", "score": "0.51410097", "text": "public function getNextPageUrl(): string;", "title": "" }, { "docid": "45479e8b8e51bce2016b32401ddfe10c", "score": "0.5137761", "text": "public function getDynamicPlaylist()\n {\n //parse inputs\n $resourcePath = \"device/\" . $this->_api_key . \"/data/playlist\";\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n $method = \"GET\";\n $queryParams = array();\n $headerParams = array();\n\n //make the API Call\n if (!isset($body)) {\n $body = null;\n }\n\n $response = $this->apiClient->callAPI($resourcePath, $method, $queryParams, $body, $headerParams);\n\n if (!$response) {\n return null;\n }\n\n $responseObject = $response;\n\n return $responseObject;\n }", "title": "" }, { "docid": "7df68c692038ed6c717bc16582d039eb", "score": "0.510183", "text": "public function getNextItem($plugin){\n $db = JFactory::getDbo();\n $query = $db->getQuery(true);\n $query->select('*');\n $query->from('#__com_socialpromoter_queue');\n $query->where('posted='.$db->q('0000-00-00 00:00:00'));\n if(isset($plugin)){\n $query->where('plugin='.$db->q($plugin));\n }\n $query->order('created ASC');\n $db->setQuery($query);\n $items = $db->loadObject();\n return $items;\n }", "title": "" }, { "docid": "a2e8ca4169b9c252483c6ac90ac42606", "score": "0.50615096", "text": "public function getNextRRAssetDomain() {\n self::$_assetUrlsRRIndex = (self::$_assetUrlsRRIndex + 1) % count($this->_staticAssetUrls);\n return $this->_staticAssetUrls[self::$_assetUrlsRRIndex].$this->_baseUri;\n }", "title": "" }, { "docid": "d1ea58344c88c59ab7f6f7fdc4637d9e", "score": "0.5055254", "text": "function getPlaylist($playlistID=NULL, $max_results=10, $start_index=1, $orderby='relevance') {\n $method = \"playlists/$playlistID\";\n $params = array(\n );\n return $this->getVideosFeed($method, $params, $max_results, $start_index);\n }", "title": "" }, { "docid": "4fe83d09d58f9f6c40d4062de94862a0", "score": "0.5050714", "text": "function getRandomPublicItem(){\n $pdo = connectDB(); \n $query = \"SELECT id FROM `g10_listitems` WHERE private = ?\";\n $statement = $pdo->prepare($query);\n $statement->execute([\"0\"]);\n $results = $statement->fetchAll(PDO::FETCH_COLUMN);\n\n $max = sizeof($results) - 1;\n\n if(isset($results))\n return $results[rand(0,$max)];\n else\n return NULL;\n }", "title": "" }, { "docid": "5169428bbee68764898e2476b957cce4", "score": "0.50464785", "text": "public function GetNextItem()\n {\n /** @var TdbPkgImageHotspotItem|null $oNextItem */\n $oNextItem = $this->GetFromInternalCache('oNextItem');\n if (is_null($oNextItem)) {\n $oItemList = TdbPkgImageHotspotItemList::GetListForPkgImageHotspotId($this->fieldPkgImageHotspotId);\n $oItemList->bAllowItemCache = true;\n if ($oItemList->Length() > 1) {\n $oNextItem = null;\n\n /** @var TdbPkgImageHotspotItem $oFirst */\n $oFirst = $oItemList->Current();\n while (is_null($oNextItem) && ($oTmpItem = $oItemList->Next())) {\n if ($oTmpItem->IsSameAs($this)) {\n $oNextItem = $oItemList->Next();\n }\n }\n if (false === $oNextItem) {\n $oNextItem = $oFirst;\n if ($oNextItem->IsSameAs($this)) {\n $oNextItem = false;\n }\n }\n }\n $this->SetInternalCache('oNextItem', $oNextItem);\n }\n\n return $oNextItem;\n }", "title": "" }, { "docid": "304c466de3ce1fe22459569e2bce2d59", "score": "0.50415576", "text": "function playlist_youtube_normal($title, $feed_url, $items)\n{ \t$items = $GLOBALS['limititems'];\n\tcategory_title($title.' (youtube favorite)<span class=\"url\">'.$feed_url.'</span>');\n\techo '<ul>';\n\t$feed = new SimplePie(); $feed->set_feed_url($feed_url);\n\t$feed->set_item_class(); $feed->enable_cache(true); $feed->set_cache_duration(3600);\n\t$feed->set_cache_location('lib/simplepie/cache'); $feed->init(); $feed->handle_content_type(); \n\t$i = 1;\n\tif ($hd = 1) { $hdurl =\"\"; } else { $hdurl = \"&fmt=18\"; }\n\tforeach($feed->get_items(0, $items) as $item) \n\t{ \n\t\t$streamLink=$item->get_link(); \n\t\t$date=$item->get_date('Y.m.d'); \n\t\t$itemLink = $streamLink.$hdurl; \n\t\t$itemdescription = shorten($item->get_description(),100);\n\t\t$feed->strip_htmltags($strip_htmltags);\n\t\t$itemtitle = $item->get_title(); \n\t\t\n\t\t echo '\n\t\t\t\t\n\t\t\t\t\t<li><a class=\"youtube\" href=\"'.$GLOBALS['reff'].$itemLink.'\">'.$itemtitle.'<span class=\"time\"> '.$date.' / '.$title.'</span></a></li>\t\n\n';\n\t\t$i++; \n\t}\n\tplaylist_space();\techo '</ul>';\n}", "title": "" }, { "docid": "c57dd501ba38b5b52c43f5e50a0bd7a7", "score": "0.5039648", "text": "public function fetchNextObject($result = NULL)\n\t{\n\t\tif ($result == NULL)\n\t\t{\n\t\t\t$result = $this->_last_result;\n\t\t}\n\t\t// Use mysql_num_rows() to find out how many rows were returned for a SELECT statement\n\t\tif ($result == NULL || mysql_num_rows($result) < 1)\n\t\t{\n\t\t\treturn NULL;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn mysql_fetch_object($result);\n\t\t}\n\t\n\t}", "title": "" }, { "docid": "561fc52b835d4182c9cdbdeebc946974", "score": "0.5032582", "text": "function shr_get_youtube_items( $url ) {\n $items = array();\n include_once( __DIR__ . '/simplehtmldom/simple_html_dom.php' );\n $html = str_get_html( shr_get_page( $url ) );\n \n // Parse page for Youtube URLs and get their IDs\n foreach( $html->find( 'div.entry' ) as $item ) {\n \n $href = $item->find( 'p.title a.title' );\n $href = $href[0]->attr['href'];\n\n if( shr_is_youtube( $href ) && $id = shr_get_youtube_id( $href ) ) {\n $title = $item->find( 'p.title a.title', 0 )->innertext;\n $style = shr_get_style( $title );\n \n $comments = $item->find( 'ul.flat-list a.comments' );\n $comment_url = $comments[0]->attr['href'];\n $comment_num = $comments[0]->innertext;\n \n $flair = $item->find( 'span.linkflairlabel' );\n if( $flair ) {\n $flair = $flair[0]->innertext;\n $style = array_merge( $style, shr_get_style( $flair ) );\n }\n \n $items[ $id ] = array(\n 'id' => $id,\n 'title' => $title,\n 'comments' => $comment_url,\n 'comment_num' => $comment_num,\n 'style' => $style,\n );\n \n }\n \n }\n \n // Parse page for \"Next page\" link and get its href\n $next = $html->find('span.nextprev a[rel*=\"next\"]');\n $next = $next[0]->attr['href'];\n\n return array(\n 'items' => $items,\n 'next' => $next,\n );\n}", "title": "" }, { "docid": "129be27cf8e5a714c145ed2b20db977d", "score": "0.50237954", "text": "function nextObject($result) {\n\t\t\t\treturn @mysql_fetch_object($result);\n\t\t\t}", "title": "" }, { "docid": "fea060ce000aaa392e738884babdb1ab", "score": "0.4962519", "text": "public function next()\n {\n return next($this->slugs);\n }", "title": "" }, { "docid": "80bb206f9659fca12a759939a08c893b", "score": "0.49030703", "text": "public static function get_current_playlist() { \n\n\t\t$democratic_id = Config::get('democratic_id'); \n\n\t\tif (!$democratic_id) { \n\t\t\t$level = Dba::escape($GLOBALS['user']->access); \n\t\t\t$sql = \"SELECT `id` FROM `democratic` WHERE `level` <= '$level' \" . \n\t\t\t\t\" ORDER BY `level` DESC,`primary` DESC\"; \n\t\t\t$db_results = Dba::query($sql); \n\t\t\t$row = Dba::fetch_assoc($db_results); \n\t\t\t$democratic_id = $row['id'];\n\t\t} \n\n\t\t$object = new Democratic($democratic_id); \n\n\t\treturn $object; \n\n\t}", "title": "" }, { "docid": "48e62367f307abd710d4d60ba7b8a496", "score": "0.48906735", "text": "protected function getNextID() {\n\t return $this->itemList[$this->currentIndex + 1];\n\t}", "title": "" }, { "docid": "de0acc96294372175ddc2937d4f42830", "score": "0.48721078", "text": "public function record_playlist()\n {\n // This is bad because we can't leverage pre-loading of data (eager load)\n // so we have n+1 queries here.\n // @todo store highest CSR in a different table to allow eager loading\n\n $record = new PlaylistData();\n $record->fill($this->highest_playlist());\n\n if ($record->stock instanceof Playlist)\n {\n return $record;\n }\n\n return null;\n }", "title": "" }, { "docid": "8731f1ff72c97b1622cb36d0194e95a8", "score": "0.48708725", "text": "public function getShowNextLink();", "title": "" }, { "docid": "6c3685605f715d4e6d8646b3a0f5bf23", "score": "0.4862793", "text": "public function getRandomPrioritised()\n\t{\n\t\t$countSongs = $this->getSize(true);\n\t\tif (!$countSongs) return null;\n\n $lastPlayedAt = $this->getLastPlayedAt();\n $lastPlayedAt = $lastPlayedAt['playedAt'];\n //die(var_dump($lastPlayedAt));\n $diff = time() - $lastPlayedAt->getTimestamp();\n $timeIncrement = max(1, $diff / $countSongs);\n //$timeIncrement = min(60 * 60 * 24 * 30 / $countSongs, $timeIncrement);\n\n $priorityCutoff = 1;\n\t\t$priorityDecrement = $priorityCutoff / $countSongs;\n\n\t\tdo {\n\t\t\t$priorityCutoff -= $priorityDecrement;\n $lastPlayedAt->modify('+' . round($timeIncrement) . ' seconds');\n\n\t\t\t$qb = $this->getEntityManager()->createQueryBuilder();\n\t\t\t$song = $qb->select('s')->from('MyPadBundle:Song', 's')\n\t\t\t\t->setFirstResult(rand(0, ($countSongs - 1)))\n\t\t\t\t->setMaxResults(1)\n\t\t\t\t->getQuery()\n\t\t\t\t->getSingleResult();\n\t\t} while ($song->getPriority() < $priorityCutoff ||\n $song->getPlayedAt() > $lastPlayedAt);\n\n// die(var_dump($lastPlayedAt));\n\t\treturn $song;\n\t}", "title": "" }, { "docid": "c10a08e5ef0b627d00a78ecab9b5f655", "score": "0.48593208", "text": "function getRandomDisplayItem() {\n\t$itemlist = getDisplayItemList();\n\t$count = getDisplayItemCount();\n\t$idx = rand(0, $count - 1);\n\t$pk = $itemlist[$idx]['pk'];\n\treturn getDisplayItem($pk);\n}", "title": "" }, { "docid": "22c0cf69276851ee29ee32db0a2c21b8", "score": "0.48478475", "text": "protected function getNextLinkUri(&$lastObject, $absoluteUri)\n {\n $currentExpandedProjectionNode = $this->getCurrentExpandedProjectionNode();\n $internalOrderByInfo = $currentExpandedProjectionNode->getInternalOrderByInfo();\n assert(null != $internalOrderByInfo);\n assert(is_object($internalOrderByInfo));\n assert($internalOrderByInfo instanceof InternalOrderByInfo, get_class($internalOrderByInfo));\n $numSegments = count($internalOrderByInfo->getOrderByPathSegments());\n $queryParameterString = $this->getNextPageLinkQueryParametersForRootResourceSet();\n\n $skipToken = $internalOrderByInfo->buildSkipTokenValue($lastObject);\n assert(!is_null($skipToken), '!is_null($skipToken)');\n $token = (1 < $numSegments) ? '$skiptoken=' : '$skip=';\n $skipToken = '?'.$queryParameterString.$token.$skipToken;\n\n return $skipToken;\n }", "title": "" }, { "docid": "72d06db65162cf5dc0802fbbb3dfc40c", "score": "0.48419458", "text": "public function next() {\n\t\treturn $this->storage->next();\t\t\n\t}", "title": "" }, { "docid": "3ebed1f52e2c67e33fb9f053180d4e48", "score": "0.48214725", "text": "public function getPlaylist(){\n\t\t// init Playlist class\n\t\t$playlist = new Playlist($this->db);\n\t\t// if a playlist id is specified\n\t\tif(isset($this->get_params['id'])){\n\t\t\t// give the playlist_id to the Playlist instance\n\t\t\t$playlist->playlist_id = $this->get_params['id'];\n\t\t}\n\t\t$stmt = $playlist->getAll();\n\t\t$this->return_data($stmt);\n\t}", "title": "" }, { "docid": "4f8ac8308dd07f058817b39221e28e08", "score": "0.47918218", "text": "public function getNextLink($list)\n {\n # can't do anything without a feed\n if (! $list) {\n return null; # TODO : should raise error\n }\n \n # see if there's a next link in the feed -> if so, take its url\n $url = null;\n foreach($list->feed->link as $link) {\n if ($link->rel == \"next\") {\n $url = $link->href;\n break;\n }\n }\n \n return $url;\n }", "title": "" }, { "docid": "b19e34825c2dbb26fa72e0ee4b610469", "score": "0.47916374", "text": "public function getNext()\n {\n return $this->_next;\n }", "title": "" }, { "docid": "cba906fbf0cf03f8e14e50b91d24abe2", "score": "0.47781557", "text": "function getNext($initial,$mode='db')\n\t{\n\t\tif($mode == 'db')\n\t\t{\n\t\t\t$result = $this->ourDB->db_Fetch();\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$result = current($this->arrayData);\n\t\t\tnext($this->arrayData);\n\t\t}\n\t\t\n\t\t\n\t\tif (!$result) return FALSE;\n\t\tswitch($this->currentTask)\n\t\t{\n\t \t\tcase 'users' :\n\t\t\t\treturn $this->copyUserData($initial, $result);\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'news' :\n\t\t\t\treturn $this->copyNewsData($initial, $result);\n\t \t\tbreak;\n\t\t\t\n\t\t\tcase 'page' :\n\t\t\t\treturn $this->copyPageData($initial, $result);\n\t \t\tbreak;\n\n\t\t\tcase 'links' :\n\t\t\t\treturn $this->copyLinksData($initial, $result);\n\t \t\tbreak;\n\n\t\t\tcase 'media' :\n\t\t\t\treturn $this->copyMediaData($initial, $result);\n\t \t\tbreak;\n\t\t\t\t\t\t\n\t \t\tcase 'forumdefs' :\n\t \t\tbreak; \n\t\t\t\t\n\t \t\tcase 'forumposts' :\n\t \t\tbreak;\n\t\t \n\t \t\tcase 'polls' :\n\t \t\tbreak;\n\t\t \n\t \t\t\n\t\t}\n\n \treturn FALSE;\n\t}", "title": "" }, { "docid": "5a6dc4099b9867c6822f4d7cecad4723", "score": "0.47737062", "text": "function hw_getsrcbydestobj($link, $destid) {}", "title": "" }, { "docid": "10c2a9023de80e6eb69582aa99202283", "score": "0.47716397", "text": "function get_songs() { \n\n\t\t/* Get the Current Playlist */\n\t\t$list = $this->_httpq->get_tracks();\n\n\t\t$songs = explode(\"::\",$list); \n\t\t\n\t\tforeach ($songs as $key=>$entry) { \n\t\t\t$data = array();\n\t\t\t\n\t\t\t/* Required Elements */\n\t\t\t$data['id'] \t= $key;\n\t\t\t$data['raw']\t= $entry;\t\t\n\n\t\t\t/* Parse out the song ID and then create the song object */\n\t\t\tpreg_match(\"/song=(\\d+)\\&/\",$entry,$matches);\n\n\t\t\t/* Attempt to build the new song */\n\t\t\t$song = new Song($matches['1']);\n\t\t\t\n\t\t\t/* If we don't know it, look up by filename */\n\t\t\tif (!$song->title) { \n\t\t\t\t$filename = sql_escape($entry);\n\t\t\t\t$sql = \"SELECT id FROM song WHERE file LIKE '%$filename'\";\n\t\t\t\t$db_results = mysql_query($sql, dbh());\n\t\t\t\tif ($r = mysql_fetch_assoc($db_results)) { \n\t\t\t\t\t$song = new Song($r['id']);\n\t\t\t\t}\t\n\t\t\t\telse { \n\t\t\t\t\t$song->title = _('Unknown');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/* Make the name pretty */\n\t\t\t$song->format_song();\n\t\t\t$data['name']\t= $song->f_title . ' - ' . $song->f_album . ' - ' . $song->f_artist;\n\n\t\t\t/* Optional Elements */\n\t\t\t$data['link'] = '';\n\t\t\t$data['track']\t= $key+1;\n\n\t\t\t$results[] = $data;\n\n\t\t} // foreach playlist items\n\t\t\n\t\treturn $results;\n\n\t}", "title": "" }, { "docid": "61d70772a966de2647a95ca59e10d65b", "score": "0.47572294", "text": "public function getLinknext()\n {\n // dump($this->linknext);\n return $this->linknext;\n }", "title": "" }, { "docid": "b402ec2f28712124aa6c9878145d6e19", "score": "0.47559094", "text": "public function skipToNextFile() {\n\n $index = 0;\n /** @var URLRequest $file */\n $file = $this->getPlayingFile(); //Get the file that is currently getPlaying.\n\n //Get all the requests from the table.\n $records = URLRequest::all()->toArray();\n\n foreach ($records as $record) {\n $index ++; //Increment $index as this will indicate where we are in the array.\n if ($record['fileName'] == $file->fileName) { //Check to see if the fileName matches the one in the array.\n $index += 1; //Minus one to get the next request in the array.\n $nextFile = $records[$index - 1]['fileName']; //Get the next file from the array -1 again to fix the 0, 1 issue.\n }\n }\n\n //Play the next file in the queue.\n $this->playFile($nextFile);\n\n }", "title": "" }, { "docid": "8c6883af0b59d75875e574d351df8a6f", "score": "0.47487983", "text": "public function next(): mixed\n {\n $data = $this->getEntityList()->current();\n if (false === $data) {\n return $data;\n }\n $itemKey = $this->getEntityList()->key();\n $itemPosition = $this->getEntityList()->getCurrentPosition();\n\n $this->getEntityList()->next();\n\n return $this->getItem($itemKey, $data);\n }", "title": "" }, { "docid": "8d7edfd5c6417a86522b265d7293fd87", "score": "0.47269908", "text": "function nextItem()\r\n {\r\n return $this->_data[$this->_cursor + 1];\r\n }", "title": "" }, { "docid": "ef8155badcf7bd21fd396319bf97aac4", "score": "0.47187856", "text": "public function getNext() {\n\t\t\tif($this->hasNext()) {\n\t\t\t\t$modelObject = $this->collection[$this->getCounter()];\n\t\t\t\t$this->counter++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$modelObject = FALSE;\n\t\t\t}\n\t\t\n\t\t\treturn $modelObject;\n\t\t}", "title": "" }, { "docid": "7b951714dcdeaba31c3e6069bd2d1723", "score": "0.46968475", "text": "public function getNext() {\n\t\twhile(!empty($this->pagesList)) {\n\t\t\t$pageInfo = array_shift($this->pagesList);\n\t\t\t// apply all subpages to the stack of indexable pages\n\t\t\t$this->pagesList += $GLOBALS['TSFE']->sys_page->getMenu(\n\t\t\t\t$pageInfo['uid'],\n\t\t\t\t$this->fieldList,\n\t\t\t\t'',\n\t\t\t\t'',\n\t\t\t\tfalse\n\t\t\t);\n\t\t\t\n\t\t\tif (!$this->shouldPageBeIndexed($pageInfo)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\treturn $pageInfo;\n\t\t\t\n\t\t}\n\t\t// if pagesList is empty return nothing\n\t\treturn null;\n\t}", "title": "" }, { "docid": "49fd6afce39d8657f548a27738c6c8fb", "score": "0.46904913", "text": "public function getNext ( )\n\t{\n\t\tif ( is_null( $this->iter ) )\n\t\t\treturn false;\n\n\t\t/*\n\t\t * If there is a layout, use it for traversing the pool.\n\t\t */\n\t\tif ( is_array( $this->layouts ) && array_key_exists( $this->iter, $this->layouts ) )\n\t\t{\n\t\t\t$id = next( $this->layouts[$this->iter] );\n\t\t\t\n\t\t\tif ( ( $id !== FALSE ) && array_key_exists( $id, $this->pools[$this->iter] ) )\n\t\t\t\treturn $this->pools[$this->iter][$id];\n\n\t\t\t$this->iter = NULL;\n\t\t\treturn NULL;\n\t\t}\n\n\t\treturn next( $this->pools[$this->iter] );\n\t}", "title": "" }, { "docid": "60c6abed8a20aeb0f229501bfb59244d", "score": "0.46790093", "text": "function get_next_previous_items()\n {\n if ($this->selected_object != null && $this->complex_selection_id != null)\n {\n $rdm = RepositoryDataManager::get_instance();\n $complex_content_item = $rdm->retrieve_complex_content_object_item($this->complex_selection_id);\n $display_order = $complex_content_item->get_display_order();\n\n $next = $display_order + 1;\n $previous = $display_order - 1;\n }\n }", "title": "" }, { "docid": "e2118ac7c14ac3822ecc53dd1ce0920a", "score": "0.4666728", "text": "public function getNext()\n {\n return $this->next;\n }", "title": "" }, { "docid": "189602c07e8b200314a7ea2d0da70f5a", "score": "0.46612176", "text": "public static function get_current_playlist() {\n\n\t\t$democratic_id = Config::get('democratic_id');\n\n\t\tif (!$democratic_id) {\n\t\t\t$level = Dba::escape($GLOBALS['user']->access);\n\t\t\t$sql = \"SELECT `id` FROM `democratic` WHERE `level` <= '$level' \" .\n\t\t\t\t\" ORDER BY `level` DESC,`primary` DESC\";\n\t\t\t$db_results = Dba::query($sql);\n\t\t\t$row = Dba::fetch_assoc($db_results);\n\t\t\t$democratic_id = $row['id'];\n\t\t}\n\n\t\t$object = new Democratic($democratic_id);\n\n\t\treturn $object;\n\n\t}", "title": "" }, { "docid": "7d8ac88d4f47f4bfd3869f8d1e5d86e6", "score": "0.46550453", "text": "public function next();", "title": "" }, { "docid": "7d8ac88d4f47f4bfd3869f8d1e5d86e6", "score": "0.46550453", "text": "public function next();", "title": "" }, { "docid": "7d8ac88d4f47f4bfd3869f8d1e5d86e6", "score": "0.46550453", "text": "public function next();", "title": "" }, { "docid": "7d8ac88d4f47f4bfd3869f8d1e5d86e6", "score": "0.46550453", "text": "public function next();", "title": "" }, { "docid": "7d8ac88d4f47f4bfd3869f8d1e5d86e6", "score": "0.46550453", "text": "public function next();", "title": "" }, { "docid": "7d8ac88d4f47f4bfd3869f8d1e5d86e6", "score": "0.46550453", "text": "public function next();", "title": "" }, { "docid": "7d8ac88d4f47f4bfd3869f8d1e5d86e6", "score": "0.46550453", "text": "public function next();", "title": "" }, { "docid": "7d8ac88d4f47f4bfd3869f8d1e5d86e6", "score": "0.46550453", "text": "public function next();", "title": "" }, { "docid": "7d8ac88d4f47f4bfd3869f8d1e5d86e6", "score": "0.46550453", "text": "public function next();", "title": "" }, { "docid": "51e8d59c855771da4da374c092221d9f", "score": "0.46400374", "text": "public function set_parent() { \n\n\t\t$demo_id = Dba::escape($this->id); \n\n\t\t$sql = \"SELECT * FROM `tmp_playlist` WHERE `session`='$demo_id'\"; \n\t\t$db_results = Dba::query($sql); \n\n\t\t$row = Dba::fetch_assoc($db_results); \n\n\t\t$this->tmp_playlist = $row['id']; \n\n\n\t}", "title": "" }, { "docid": "3838f8d69e3ba483a0bce291d0f509d1", "score": "0.4639644", "text": "public function getNextTemplate();", "title": "" }, { "docid": "98f60f6e908b329cae71694e3417b61c", "score": "0.46344212", "text": "public function Random()\n {\n $currentItemPointer = $this->getEntityList()->getCurrentPosition();\n $itemIndex = ($this->iNumberOfRecordsToShow > 0) ? $this->iNumberOfRecordsToShow : $this->Length();\n $this->getEntityList()->seek(rand(0, $itemIndex - 1));\n $item = $this->getItem($this->getEntityList()->key(), $this->getEntityList()->current());\n $this->getEntityList()->seek($currentItemPointer);\n\n return $item;\n }", "title": "" }, { "docid": "49fc7a036ff0e7efd9f605b31088b7ef", "score": "0.46318838", "text": "private function getNextPendingUnit_fetch()\n {\n if (!$this->canUserAccessCourse()) {\n return false;\n }\n\n // Get list of units to choose from. Abort if no units in course.\n $this->loadFullUnitList();\n if (!$this->unitList) {\n return false;\n }\n\n // If no progress, then choose first item in list of course units.\n $this->loadUserUnitProgress();\n if (!$this->unitListProgress) {\n LMS_Log::print_r($this->unitList,__FUNCTION__);\n return current($this->unitList);\n }\n\n\n // Go through list of all items, and see what's not been done yet.\n foreach ($this->unitList as $unitID => $unitMeta)\n {\n if (!isset($this->unitListProgress[$unitID])) {\n //$unitMeta->data = get_post($unitID);\n return $unitMeta;\n }\n }\n\n // Done them already, so return nothing.\n return false;\n }", "title": "" }, { "docid": "365e0dc27436e24b1cbd36a5e5b73d62", "score": "0.46266177", "text": "public function getNextIndexUrls();", "title": "" }, { "docid": "45c4f8b6f7b77b5c028aefcaea897f8c", "score": "0.46217996", "text": "public function next($data){\n $dboNumber = new Queue_Number();\n $next = $dboNumber->get(array(\n 'select' => 'numberid, number',\n 'queueid' => $data['queueid'],\n 'where' => 'numberid > ' . $data['numberid'] . ' and isfinish <> 1 and iscancel = 0',\n 'order' => 'number asc',\n 'limit' => 1,\n ));\n\n if(count($next) <= 0)\n throw new Alt_Exception('Nomor antrian sudah habis!');\n\n $data['number'] = $next[0];\n\n return $this->call($data);\n }", "title": "" }, { "docid": "0a65a9206b61f49b0136ba5d8c1a7c98", "score": "0.46166188", "text": "function getCurPlaylist(){\n\t\tglobal $include_path, $jbArr, $media_dirs;\n\t\t\n\t\t$list = explode(\"\\n\",@file_get_contents($include_path. \"temp/dummy-pl.txt\"));\n\t\t$mArray = explode(\"|\",$media_dirs);\n\t\tfor ($i=0; $i < count($mArray); $i++){\n\t\t\t$list = str_replace($mArray[$i]. \"/\",\"\",$list);\n\t\t}\n\t\treturn $list;\n\t}", "title": "" }, { "docid": "bedd70e2efd63f4aded3d3a8fe624949", "score": "0.46148467", "text": "public function getNextPage();", "title": "" }, { "docid": "bedd70e2efd63f4aded3d3a8fe624949", "score": "0.46148467", "text": "public function getNextPage();", "title": "" }, { "docid": "428b6eaee1057598e94ef14d04d37989", "score": "0.45858634", "text": "function playlist($playlist){\n\t\tglobal $include_path, $jbArr,$jzSERVICES;\n\t\t\n\t\t$playlist = $jzSERVICES->createPlaylist($playlist,\"jukebox\");\n\t\t// First we need to get the current playlist so we can figure out where to add\n\t\t$curList = getCurPlaylist();\n\t\t\n\t\t// Let's get where we are in the current list\n\t\t$curTrack = getCurPlayingTrack();\n\t\t\n\t\t// Ok, now we need to figure out where to add the stuff\n\t\tif ($_SESSION['jb-addtype'] == \"current\"){\n\t\t\t// Ok, let's split our first playlist in 2 so we can add in the middle\n\t\t\t$begArr = array_slice($curList,0,$curTrack+1);\n\t\t\t$endArr = array_slice($curList,$curTrack+1);\n\t\t} else if ($_SESSION['jb-addtype'] == \"begin\"){\n\t\t\t$begArr = \"\";\n\t\t\t$endArr = array();\n\t\t} else if ($_SESSION['jb-addtype'] == \"end\"){\n\t\t\t$begArr = $curList;\n\t\t\t$endArr = array();\n\t\t} else if ($_SESSION['jb-addtype'] == \"replace\") {\n\t\t $begArr = array();\n\t\t $endArr = array();\n\t\t}\n\t\t\n\t\t// Now let's send the new playlist to the player\n\t\t$f=false;$data=\"\";\n\t\tfor ($i=0; $i < count($begArr); $i++){\n\t\t\t// Now let's add this\n\t\t\tif ($begArr[$i] <> \"\"){\n\t\t\t\t$val = \"\\\\\\\\\". $jbArr[$_SESSION['jb_id']]['mediaserver']. \"\\\\\". $jbArr[$_SESSION['jb_id']]['mediashare']. \"\\\\\". str_replace($jbArr[$_SESSION['jb_id']]['localpath'],\"\",str_replace(\"/\",\"\\\\\",$begArr[$i]));\n\t\t\t\t//echo $val. \"<br>\";\n\t\t\t\tif ($f){$val = \"\\r\\n\". trim($val);}\n\t\t\t\t$f=true;\n\t\t\t\t$data .= $val;\n\t\t\t}\n\t\t}\t\t\n\t\t// Ok, Now let's add the new stuff\n\t\t$pArray = explode(\"\\n\",$playlist);\n\t\tfor ($i=0; $i < count($pArray); $i++){\n\t\t\tif ($pArray[$i] <> \"\"){\n\t\t\t\t// Now let's add this\n\t\t\t\t$val = \"\\\\\\\\\". $jbArr[$_SESSION['jb_id']]['mediaserver']. \"\\\\\". $jbArr[$_SESSION['jb_id']]['mediashare']. str_replace($jbArr[$_SESSION['jb_id']]['localpath'],\"\",str_replace(\"/\",\"\\\\\",$pArray[$i]));\n\t\t\t\t//echo $val. \"<br>\";\n\t\t\t\tif ($f){$val = \"\\r\\n\". trim($val);}\n\t\t\t\t$f=true;\n\t\t\t\t$data .= $val;\n\t\t\t}\n\t\t}\n\t\t// Now let's finish this out\n\t\tfor ($i=0; $i < count($endArr); $i++){\n\t\t\tif ($endArr[$i] <> \"\"){\n\t\t\t\t// Now let's add this\n\t\t\t\t$val = \"\\\\\\\\\". $jbArr[$_SESSION['jb_id']]['mediaserver']. \"\\\\\". $jbArr[$_SESSION['jb_id']]['mediashare']. \"\\\\\". str_replace($jbArr[$_SESSION['jb_id']]['localpath'],\"\",str_replace(\"/\",\"\\\\\",$endArr[$i]));\n\t\t\t\t//echo $val. \"<br>\";\n\t\t\t\tif ($f){$val = \"\\r\\n\". trim($val);}\n\t\t\t\t$f=true;\n\t\t\t\t$data .= $val;\n\t\t\t}\n\t\t}\n\n\t\t// Now let's clear the current list\n\t\tcontrol(\"clear\", false);\n\t\tusleep(500);\n\t\t\n\t\t$fileName = $jbArr[$_SESSION['jb_id']]['localpath']. \"/\". $jbArr[$_SESSION['jb_id']]['playlistname'];\n\t\t$handle = fopen($fileName, \"w\");\n\t\tfwrite($handle,$data);\t\n\t\tfclose ($handle);\n\t\t\n\t\t// Ok, now we need to tell the audiotron to play the M3U file\n\t\t$plName = \"\\\\\\\\\". $jbArr[0]['mediaserver']. \"\\\\\". $jbArr[0]['mediashare']. \"\\\\\". $jbArr[0]['playlistname'];\n\t\t\n\t\t// Now let's play then load\n\t\tfile_get_contents(\"http://\". $jbArr[$_SESSION['jb_id']]['server']. \"/apicmd.asp?cmd=stop\");\n\t\tfile_get_contents(\"http://\". $jbArr[$_SESSION['jb_id']]['server']. \"/apicmd.asp?cmd=clear\");\n\t\tunset($_SESSION['jb_at_playlist']);\n\t\tfile_get_contents(\"http://\". $jbArr[$_SESSION['jb_id']]['server']. \"/apiqfile.asp?type=file&file=\". $plName);\n\t\tusleep(500);\n\t\tfile_get_contents(\"http://\". $jbArr[$_SESSION['jb_id']]['server']. \"/apicmd.asp?cmd=play\");\n\t\tusleep(500);\n\t\t// Ok, first we need to know what track number we are on\n\t\t$c=0;\n\t\twhile ($c<$curTrack+1){\n\t\t\tfile_get_contents(\"http://\". $jbArr[$_SESSION['jb_id']]['server']. \"/apicmd.asp?cmd=next\");\n\t\t\tusleep(500);\n\t\t\t$c++;\n\t\t}\t\n\t\t?>\n\t\t<script>\n\t\t\thistory.back();\n\t\t</script>\n\t\t<?php\n\t\treturn;\n\t}", "title": "" }, { "docid": "6cc999bae2943951ff56a0a016a06dd4", "score": "0.45809084", "text": "function getNextPost() {\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(\n\t\t\t'uid, title, datetime',\n\t\t\t'tt_news',\n\t\t\t'pid IN ('.$this->pObj->conf['pid_list'].') AND datetime > '.$this->conf['data']['datetime'].$this->cObj->enableFields('tt_news'),\n\t\t\t'',\n\t\t\t'datetime ASC'\n\t\t);\n\t\t\n\t\treturn $res[0];\n\t}", "title": "" }, { "docid": "9a34e522641909105834885a8c35edb2", "score": "0.45723456", "text": "public function next()\n {\n $this->listCurrent = $this->listCurrent->listNext;\n return $this->listCurrent->value;\n }", "title": "" }, { "docid": "d47c5afba99e2f5209205b32e61009bf", "score": "0.45712253", "text": "protected function realURL()\n {\n return (object) $this->real_url;\n }", "title": "" }, { "docid": "2d658bc5e114c069b59a6e47b57be44c", "score": "0.4569008", "text": "public function get_uid_from_object_id($object_id,$object_type='') { \n\n\t\t$object_id\t= Dba::escape($object_id); \n\t\t$object_type\t= $object_type ? Dba::escape($object_type) : 'song'; \n\t\t$tmp_id\t\t= Dba::escape($this->tmp_playlist);\n\n\t\t$sql = \"SELECT `tmp_playlist_data`.`id` FROM `tmp_playlist_data` WHERE `object_type`='$object_type' AND \" . \n\t\t\t\"`tmp_playlist`='$tmp_id' AND `object_id`='$object_id'\"; \n\t\t$db_results = Dba::query($sql); \n\n\t\t$row = Dba::fetch_assoc($db_results); \n\n\t\treturn $row['id']; \n\n\t}", "title": "" }, { "docid": "af314fd813f7daf8dcadce1e8b0423ea", "score": "0.45626637", "text": "public function nextCached($ofShow = false) {\n if (empty($this->nextEpisodeCache[$ofShow])) {\n $this->nextEpisodeCache[$ofShow] = $this->next($ofShow);\n }\n return $this->nextEpisodeCache[$ofShow];\n }", "title": "" }, { "docid": "958d090d5ccf1722a1ee4b171a9de247", "score": "0.45593143", "text": "function get_next_link($link_template, $no_link=''){\r\n \r\n // create back page\r\n $id = $this->get_next_page(); \r\n \r\n if ($this->current_page < $this->pages){\r\n $link_template = str_replace('%pg', $id, $link_template);\r\n }\r\n else { $link_template = $no_link; }\r\n \r\n return $link_template; \r\n }", "title": "" }, { "docid": "eb305ce805b4490de90793521795f1d7", "score": "0.45575774", "text": "private function get_list_items() {\n $type = $this->get_transient('url_type');\n $id = $this->get_transient('flickr_id');\n $pageToken = $this->get_transient('pageToken');\n\n switch ($type) {\n\n case 'album':\n $api_url = $this->endPoint .\n $this->method . 'photosets.getPhotos' .\n $this->apiKey . $this->apiKeyValue . '&photoset_id=' . $id .\n '&extras=license,date_upload,date_taken,owner_name,icon_server,original_format,last_update,geo,tags,machine_tags,o_dims,views,media,path_alias,url_o' .\n $this->perPage . '&page=' . $pageToken . $this->format;\n\n $this->add_log('url ' . $api_url);\n\n $json = json_decode(file_get_contents($api_url));\n if( $json && isset($json->photoset) ){\n return $json;\n }\n break;\n\n case 'user':\n $api_url = $this->endPoint .\n $this->method . 'photos.search' .\n $this->apiKey . $this->apiKeyValue . '&user_id=' . $id .\n '&sort=date-posted-asc&content_type=1&extras=license,date_upload,date_taken,owner_name,icon_server,original_format,last_update,geo,tags,machine_tags,o_dims,views,media,path_alias,url_o' .\n $this->perPage . '&page=' . $pageToken . $this->format;\n\n $this->add_log('url ' . $api_url);\n\n $json = json_decode(file_get_contents($api_url));\n if( $json && isset($json->photos) ){\n return $json;\n\n }\n break;\n\n case 'singlephoto':\n $api_url = $this->endPoint .\n $this->method . 'photos.getInfo' .\n $this->apiKey . $this->apiKeyValue . '&extras=license,date_upload,date_taken,owner_name,icon_server,original_format,last_update,geo,tags,machine_tags,o_dims,views,media,path_alias,url_o&photo_id='\n . $id . $this->format;\n\n $this->add_log('url ' . $api_url);\n\n $json = json_decode(file_get_contents($api_url));\n if( $json && isset($json->photo) ){\n return $json;\n\n }\n break;\n\n default:\n return [];\n break;\n }\n\n return [];\n }", "title": "" }, { "docid": "7f1d9bb29f433ae90f3034f20ed59678", "score": "0.45476162", "text": "function get_now_playing() {\n\n\t$sql = \"SELECT song_id,user FROM now_playing ORDER BY start_time DESC\";\n\t$db_results = mysql_query($sql, dbh());\n\twhile ($r = mysql_fetch_assoc($db_results)) {\n\t\t$song = new Song($r['song_id']);\n\t\t$song->format_song();\n\t\t$np_user = new User($r['user']);\n\t\t$results[] = array('song'=>$song,'user'=>$np_user);\n\t} // end while\n\n\t$myMpd = init_mpd();\n\n\tif (is_object($myMpd) AND conf('mpd_method') == 'file') {\n\t\t$sql = \"SELECT song.id FROM song WHERE file = \\\"\". conf('mpd_dir') . \"/\" .\n\t\t\t$myMpd->playlist[$myMpd->current_track_id]['file']. \"\\\"\";\n\n\t $db_results = @mysql_query($sql,dbh());\n\n\t while ($r = mysql_fetch_assoc($db_results)) {\n\n\t $song = new Song($r['id']);\n\t\t\t$song->format_song();\n\t\t\t$np_user = new User(0);\n\t\t\t$np_user->fullname = 'MPD User';\n\t\t\t$np_user->username = 'mpd_user';\n\t\t\t$results[] = array('song'=>$song,'user'=>$np_user);\n\n\t\t} // end while\n\n\t} // end if we have a MPD object\n\n\n\treturn $results;\n\n}", "title": "" }, { "docid": "eb76f6c75a70643ca1c71aba451d09ff", "score": "0.4546573", "text": "public function getNextModule(){\n \t\t$order = $this->display_order;\n \t\t$order = $order + 1;\n \t\t$nextModule = Module::where('display_order', $order)->where('course_key',$this->course_key)->first();\n \t\treturn $nextModule;\n }", "title": "" }, { "docid": "74714029d25087f6ee3032163eaadf26", "score": "0.45456758", "text": "public function grab(&$param_pool=NULL){\n $result = new XMLElement('next_prev_article');\n // Get the entry_id and date (table 26) of the current article.\n $entry_id = (int)$param_pool['ds-unleash-stories.system-id'][0];\n $sql = \"SELECT `local` FROM `sym_entries_data_26`\n WHERE `entry_id` = $entry_id LIMIT 1\";\n $entry_date = $this->_Parent->Database->fetchVar('local', 0, $sql);\n // Get the entry_id of the next published (table 30) article.\n $sql = \"SELECT t1.`entry_id`\n FROM `sym_entries_data_26` AS t1\n LEFT JOIN `sym_entries_data_30` AS t2 ON t1.entry_id = t2.entry_id\n WHERE t1.`local` > $entry_date\n AND t2.value = 'yes'\n ORDER BY t1.`local` ASC LIMIT 1\";\n $next_article_id = $this->_Parent->Database->fetchVar('entry_id', 0, $sql);\n // Get the title and handle (table 23) of the next article and add them to the XML.\n if ($next_article_id) {\n $sql = \"SELECT handle,value FROM sym_entries_data_23\n WHERE entry_id = $next_article_id LIMIT 1\";\n $row = $this->_Parent->Database->fetchRow(0, $sql);\n $next = new XMLElement('next', $row['value']);\n $next->setAttributeArray(array('entry_id' => $next_article_id,\n 'handle' => $row['handle']));\n $result->appendChild($next);\n }\n // Get the entry_id of the previous published (table 30) article.\n $sql = \"SELECT t1.`entry_id`\n FROM `sym_entries_data_26` AS t1\n LEFT JOIN `sym_entries_data_30` AS t2 ON t1.entry_id = t2.entry_id\n WHERE t1.`local` < $entry_date\n AND t2.value = 'yes'\n ORDER BY t1.`local` DESC LIMIT 1\";\n $prev_article_id = $this->_Parent->Database->fetchVar('entry_id', 0, $sql);\n // Get the title and handle (table 23) of the previous article and add them to the XML.\n if ($prev_article_id) {\n $sql = \"SELECT handle,value FROM sym_entries_data_23\n WHERE entry_id = $prev_article_id LIMIT 1\";\n $row = $this->_Parent->Database->fetchRow(0, $sql);\n $prev = new XMLElement('previous', $row['value']);\n $prev->setAttributeArray(array('entry_id' => $prev_article_id,\n 'handle' => $row['handle']));\n $result->appendChild($prev);\n }\n return $result;\n }", "title": "" }, { "docid": "1a7076ed053b0270b3b9bb7cf9939229", "score": "0.45412308", "text": "public function getPlaylistListFeedUrl()\n {\n return $this->getFeedLinkHref(Zend_Gdata_YouTube::USER_PLAYLISTS_REL);\n }", "title": "" }, { "docid": "2bf7dfce9245d3931171c942b6aee994", "score": "0.45340282", "text": "function firstEpisodeFromSeason($seasonId, $seasonNumber)\n{\n $params = new UserItemsParams();\n $params->Fields = 'Path';\n $params->Limit = 1;\n $params->ParentID = $seasonId;\n $params->ParentIndexNumber = $seasonNumber;\n\n $all_episodes = getUsersItems($params);\n\n //return first\n return $all_episodes->Items[0];\n}", "title": "" }, { "docid": "081556af9d8080faf8ab3d8a9b1e77f0", "score": "0.45335323", "text": "static function getObjectFromUrl() {\n\t\t$pks = static::getPrimaryKeysFromUrl();\n\t\tif ($pks !== null) {\n\n\t\t\t$class = $_GET['class'];\n\t\t\t$query = $class . \"Query\";\n\t\t\tif (count($pks) === 1) {\n\t\t\t\t$object = call_user_func_array([$query::create(), \"findPk\"], $pks);\n\t\t\t} else {\n\t\t\t\t$object = call_user_func([$query::create(), \"findPk\"], array_values($pks));\n\t\t\t}\n\n\t\t\treturn $object;\n\t\t}\n\t\treturn null;\n\t}", "title": "" }, { "docid": "e86228ddf2e7ecb2f5e9e4ec853663e9", "score": "0.45312896", "text": "public function get_top_url(){\n\t\t\t\t\t $this->db->order_by('id','DESC');\n\t\t\t$result = $this->db->get('urls', 0, 100)->result_array();\n\t\t\treturn $result;\n\t\t}", "title": "" }, { "docid": "0fb73d64664d729621e0f72698d57e6e", "score": "0.45290005", "text": "public function getNext()\n {\n return (new static)->where('id', '>', $this->id)\n ->orderBy('id', 'asc')\n ->limit(1)\n ->first();\n }", "title": "" }, { "docid": "d0840f76ba11dd2137ca8f681f9a5120", "score": "0.4528805", "text": "public function getPlaylistByID($playlistID, $pageToken = '', $prevPageToken = '', &$item)\n {\n if(($pageToken != $prevPageToken) || ($pageToken == '' && $prevPageToken == '')) {\n $json = file_get_contents(\"https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&playlistId={$playlistID}&key=\".YOUTUBE_API_KEY.\"&maxResults=10&pageToken={$pageToken}\");\n $response = json_decode($json,true);\n if($response['items'] && !empty($response['items'])) {\n $item[] = $response['items'];\n if(isset($response['nextPageToken'])) {\n $this->getPlaylistByID($playlistID, $response['nextPageToken'], $pageToken, $item)[0];\n }\n }\n }\n return $item;\n }", "title": "" }, { "docid": "5faf99bbf167c0e6de126a9b2a1f5374", "score": "0.45198575", "text": "private function pg_get_url() {\n // TODO: get video url per id\n }", "title": "" }, { "docid": "bcfc2cda3ec710334efd922af8828999", "score": "0.45176026", "text": "function get_next_group() { return $this->next_group; }", "title": "" }, { "docid": "accc40c92194516b9cc3788cc192443c", "score": "0.45110905", "text": "public function play_url() {\n\n $link = Stream::get_base_url() . 'uid=' . scrub_out($GLOBALS['user']->id) . '&demo_id=' . scrub_out($this->id); \n\n return $link;\n\n }", "title": "" }, { "docid": "9118da8c181972273dc83f0155b5cdac", "score": "0.4502924", "text": "public function get_items() {\n\n $order = \"ORDER BY `user_vote`.`date` ASC, `tmp_playlist_data`.`track` ASC\";\n $vote_join \t= \"INNER JOIN `user_vote` ON `user_vote`.`object_id`=`tmp_playlist_data`.`id`\";\n\n /* Select all objects from this playlist */\n $sql = \"SELECT `user_vote`.`object_id` AS `vote_id`,`user_vote`.`user`,`tmp_playlist_data`.`id`,`tmp_playlist_data`.`object_type`, `user_vote`.`date`, `tmp_playlist_data`.`object_id` \" .\n \"FROM `tmp_playlist_data` $vote_join \" .\n \"WHERE `tmp_playlist_data`.`tmp_playlist`='\" . Dba::escape($this->tmp_playlist) . \"' $order\";\n $db_results = Dba::query($sql);\n\n /* Define the array */\n $items = array();\n\t\t$votes = array(); \n\t\t$object_ids = array(); \n\n\t\t// Itterate and build the sortable array\n while ($results = Dba::fetch_assoc($db_results)) {\n\t\t\t\n\t\t\t// Extra set of data for caching!\n\t\t\t$this->object_ids[] = $results['object_id']; \n\t\t\t$this->vote_ids[] = $results['vote_id']; \n\n\t\t\t// First build a variable that holds the number of votes for an object\n\t\t\t$name\t\t= 'vc_' . $results['object_id'];\n\n\t\t\t// Check if the vote is older then our current vote for this object\n\t\t\tif ($votes[$results['object_id']] < $results['date'] OR !isset($votes[$results['object_id']])) { \n\t\t\t\t$votes[$results['object_id']] = $results['date']; \n\t\t\t} \n\n\n\t\t\t// Append one to the vote\n\t\t\t${$name}++; \n\t\t\t$primary_key \t= ${$name}; \n\t\t\t$secondary_key\t= $votes[$results['object_id']]; \n\t\t\t$items[$primary_key][$secondary_key][$results['id']] = array('object_id'=>$results['object_id'],'object_type'=>$results['object_type'],'id'=>$results['id']);\n } // gather data\n\n\t\t// Sort highest voted stuff to the top\n\t\tkrsort($items); \n\n\t\t$sorted_items = array(); \n\n\t\t// re-collapse the array\n\t\tforeach ($items as $vote_count=>$date_array) { \n\t\t\tksort($date_array); \n\t\t\tforeach ($date_array as $object_array) { \n\t\t\t\tforeach ($object_array as $key=>$sorted_array) { \n\t\t\t\t\t$sorted_items[$key] = $sorted_array;\n\t\t\t\t} \n\t\t\t} \n\t\t} \n\n return $sorted_items;\n\n }", "title": "" }, { "docid": "d703fc40b6c23ab4005333b6ce92422f", "score": "0.44867146", "text": "public function next()\n {\n if ($this->position === 1) {\n $this->current = $this->get('rdf:rest');\n } elseif ($this->current) {\n $this->current = $this->current->get('rdf:rest');\n }\n $this->position++;\n }", "title": "" }, { "docid": "b09af8c7a35ad031d60e275e3345afce", "score": "0.448591", "text": "function getApiItem()\n{\n $sequence = 1;\n $url = \"https://www.navanurak.in.th/museum_api/item_museums.php\";\n $data_url = getApi($url);\n foreach ($data_url as $data_url) {\n if ($data_url->ownermuseum_code == $_SESSION[\"museum_code\"]) {\n $data[] = array(\n 'sequence' => $sequence,\n 'ownermuseum_code' => $data_url->ownermuseum_code,\n 'obj_title' => $data_url->obj_title,\n 'pic_path' => $data_url->pic_path\n );\n $sequence++;\n }\n }\n $result = $data;\n return $result;\n}", "title": "" }, { "docid": "8f0082ca172859e506c0586d506da251", "score": "0.44833636", "text": "function getApiItem()\n{\n $sequence = 1;\n $url = \"https://www.navanurak.in.th/museum_api/item_museums.php\";\n $data_url = getApi($url);\n foreach ($data_url as $data_url) {\n if ($data_url->ownermuseum_code == $_SESSION[\"museum_code\"]) {\n $data[] = array(\n 'sequence' => $sequence,\n 'ownermuseum_code' => $data_url->ownermuseum_code,\n 'obj_title' => $data_url->obj_title,\n 'pic_path' => $data_url->pic_path,\n );\n $sequence++;\n }\n }\n $result = $data;\n return $result;\n}", "title": "" }, { "docid": "ada63f3abb42e92b5296bc9779be5df0", "score": "0.44811916", "text": "public function getId(){\n return $this->__get('playlist_id');\n }", "title": "" }, { "docid": "655b7a4c51821564e00f4fc75a3efd2c", "score": "0.44735482", "text": "public function fillPlaylist($playlist, $history)\n\t{\n\t\t// first play unplayed songs\n\t\t$qb = $this->getEntityManager()->createQueryBuilder();\n\t\t$unplayed = $qb->select('s')->from('\\My\\PadBundle\\Entity\\Song', 's')\n\t\t\t->where('s.playcount = 0')\n\t\t\t->orWhere('s.title IS NULL')\n\t\t\t->orWhere('s.artist IS NULL')\n\t\t\t->setMaxResults(999)\n\t\t\t->getQuery()\n\t\t\t->getResult();\n\t\tif ($unplayed) {\n\t\t\t$song = $unplayed[rand(0, count($unplayed)-1)];\n\t\t\treturn array($song->getId() => $song->getPriority());\n\t\t}\n\n\t\t// add songs randomly to playlist till it's a reasonable size\n\t\t// must not already be in history or in playlist\n\t\t// save with highest priority\n\t\t$librarySize = $this->getSize(true);\n\t\tif ($librarySize < 1) die('No songs');\n\t\t$playlistSize = $librarySize * 0.33;\n\n\t\t$playlistQuicken = $playlistSize * 0.25;\n\t\tfor ($i=0; $i<$playlistQuicken; $i++) {\n\t\t\tif (!count($playlist)) break;\n\t\t\tarray_pop($playlist);\n\t\t}\n\n\t\twhile (count($playlist) < $playlistSize) {\n\t\t\t$qb = $this->getEntityManager()->createQueryBuilder();\n\t\t\t$song = $qb->select('s')->from('\\My\\PadBundle\\Entity\\Song', 's')\n\t\t\t\t->setFirstResult(rand(0, ($librarySize - 1)))\n\t\t\t\t->setMaxResults(1)\n\t\t\t\t->getQuery()\n\t\t\t\t->getSingleResult();\n\t\t\tif (!in_array($song->getId(), $history) && !array_key_exists($song->getId(), $playlist)) $playlist[$song->getId()] = $song->getPriority();\n\t\t}\n\n\t\t// just return first one (highest priority)\n\t\tarsort($playlist);\n\t\treturn $playlist;\n\t}", "title": "" }, { "docid": "84f1a7a67f414d9db904c325373248d3", "score": "0.44723812", "text": "function get_first_thumbnail_url( $markup ) {\r\n\t\t$thumbnail = null;\r\n\t\t$videos = $this->find_videos( $markup );\r\n\t\tforeach ( $videos as $video ) {\r\n\t\t\t$thumbnail = $this->providers[$video['provider']]->get_thumbnail_url( $video['id'] );\r\n\t\t\tif ( $thumbnail != null ) break;\r\n\t\t}\r\n\t\treturn $thumbnail;\r\n\t}", "title": "" }, { "docid": "795376e85373ae421af2626779cb4354", "score": "0.44708148", "text": "private function nextLink(LinkType $link, ResourceObject $ro, $nextResource)\n {\n $nextBody = $nextResource instanceof ResourceObject ? $nextResource->body : $nextResource;\n\n if ($link->type === LinkType::SELF_LINK) {\n $ro->body = $nextBody;\n\n return $ro;\n }\n\n if ($link->type === LinkType::NEW_LINK) {\n $ro->body[$link->key] = $nextBody;\n\n return $ro;\n }\n\n // crawl\n return $ro;\n }", "title": "" }, { "docid": "4d938f5b6b4a81c7ff0b589b31abd568", "score": "0.44671348", "text": "function nextplayer($pid)\n{\n global $players;\n $found=false;\n foreach($players as $p)\n {\n if($found==true) return $p['id'];\n if($p['id']==$pid)$found=true;\n }\n return l(reset($players),'id');\n}", "title": "" } ]
564a9114a649df142008cfb8c89220fd
The serialize method is called during xml writing. It should use the $writer argument to encode this object into XML. Important note: it is not needed to create the parent element. The parent element is already created, and we only have to worry about attributes, child elements and text (if any). Important note 2: If you are writing any new elements, you are also responsible for closing them.
[ { "docid": "7e7a1cbb1afc2eaecc63ec7b5d498e88", "score": "0.61599046", "text": "function xmlSerialize(Xml\\Writer $writer) {\n\n $writer->startElement('{http://sabredav.org/ns}elem1');\n $writer->write('hiiii!');\n $writer->endElement();\n\n }", "title": "" } ]
[ { "docid": "6f505e59aa9ebf55b88c5c79b0ef997d", "score": "0.64599407", "text": "function xmlSerialize(Xml\\Writer $writer) {\n\n $writer->write($this->value);\n\n }", "title": "" }, { "docid": "0777b3215b837a98174bd34c9c4e467e", "score": "0.6399436", "text": "function xmlSerialize(Writer $writer) { \n $writer->write([\n Schema::CBC.'ID' => $this->id, \n ]);\n \n if($this->documentType !== null) {\n $writer->write([\n [\n 'name' => Schema::CBC . 'DocumentType',\n 'value' => $this->documentType\n ]\n ]);\n } \n \n if($this->attachment !== null) {\n $writer->write([\n [\n 'name' => Schema::CAC . 'Attachment',\n 'value' => $this->attachment\n ]\n ]);\n } \n }", "title": "" }, { "docid": "6ca11dd97f9edd7e10efc06e5aa53766", "score": "0.63831705", "text": "function xmlSerialize(Writer $writer) {\n $this->validate();\n $attrArray= [];\n if(isset($this->idAttr['schemeID'])){\n\n $attrArray['schemeID']= $this->idAttr['schemeID'];\n }\n if(isset($this->idAttr['schemeAgencyID'])){ \n $attrArray['schemeAgencyID']= $this->idAttr['schemeAgencyID'];\n }\n $writer->write([\n //Schema::CBC.'ID' => $this->id,\n [\n 'name' => Schema::CBC . 'ID',\n 'value' => $this->id,\n 'attributes' => $attrArray,\n\n ],\n \n \n ]);\n\n if($this->name != null){\n $writer->write([ Schema::CBC.'Name' => $this->name]);\n }\n if($this->percent != null){\n $formatted_percent = number_format($this->percent, 2); \n $writer->write([ Schema::CBC.'Percent' => $formatted_percent,]);\n }\n\n if($this->taxScheme != null){\n $writer->write([Schema::CAC.'TaxScheme' => $this->taxScheme]);\n }\n }", "title": "" }, { "docid": "affb95dd191a9ff652553917b1c35b3e", "score": "0.6269666", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n }", "title": "" }, { "docid": "affb95dd191a9ff652553917b1c35b3e", "score": "0.6269666", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n }", "title": "" }, { "docid": "0e8d76b3407b6d404bd0e371701ae6fa", "score": "0.6151655", "text": "public function writeXmlContents($writer)\r\n {\r\n parent::writeXmlContents($writer);\r\n if ($this->authors) {\r\n foreach ($this->authors as $i => $x) {\r\n $writer->startElementNs('atom', 'author', null);\r\n $x->writeXmlContents($writer);\r\n $writer->endElement();\r\n }\r\n }\r\n if ($this->categories) {\r\n foreach ($this->categories as $i => $x) {\r\n $writer->startElementNs('atom', 'category', null);\r\n $x->writeXmlContents($writer);\r\n $writer->endElement();\r\n }\r\n }\r\n if ($this->confidence) {\r\n $writer->startElementNs('gx', 'confidence', null);\r\n $writer->text($this->confidence);\r\n $writer->endElement();\r\n }\r\n if ($this->content) {\r\n $writer->startElementNs('atom', 'content', null);\r\n $this->content->writeXmlContents($writer);\r\n $writer->endElement();\r\n }\r\n if ($this->contributors) {\r\n foreach ($this->contributors as $i => $x) {\r\n $writer->startElementNs('atom', 'contributor', null);\r\n $x->writeXmlContents($writer);\r\n $writer->endElement();\r\n }\r\n }\r\n if ($this->id) {\r\n $writer->startElementNs('atom', 'id', null);\r\n $writer->text($this->id);\r\n $writer->endElement();\r\n }\r\n if ($this->links) {\r\n foreach ($this->links as $i => $x) {\r\n $writer->startElementNs('atom', 'link', null);\r\n $x->writeXmlContents($writer);\r\n $writer->endElement();\r\n }\r\n }\r\n if ($this->published) {\r\n $writer->startElementNs('atom', 'published', null);\r\n $writer->text($this->published);\r\n $writer->endElement();\r\n }\r\n if ($this->rights) {\r\n $writer->startElementNs('atom', 'rights', null);\r\n $writer->text($this->rights);\r\n $writer->endElement();\r\n }\r\n if ($this->score) {\r\n $writer->startElementNs('gx', 'score', null);\r\n $writer->text($this->score);\r\n $writer->endElement();\r\n }\r\n if ($this->title) {\r\n $writer->startElementNs('atom', 'title', null);\r\n $writer->text($this->title);\r\n $writer->endElement();\r\n }\r\n if ($this->updated) {\r\n $writer->startElementNs('atom', 'updated', null);\r\n $writer->text($this->updated);\r\n $writer->endElement();\r\n }\r\n }", "title": "" }, { "docid": "251b38ed29411b18597fdf2b506faf2a", "score": "0.61279565", "text": "protected function write($parent, $writeself=TRUE)\n\t{\n\t\tif ($writeself) {\n\t\t\t$elem = $parent->addChild($this->tag, $this->body);\n\t\t\tforeach ($this->attr as $key => $value)\n\t\t\t\t$elem->addAttribute($key, $value);\n\t\t\tforeach ($this->children as $child)\n\t\t\t\t$child->write($elem);\n\t\t} else {\n\t\t\tforeach ($this->children as $child)\n\t\t\t\t$child->write($parent);\n\t\t}\n\n\t}", "title": "" }, { "docid": "6d07b48b5210e4e47fcb5035b94380a5", "score": "0.6073983", "text": "function toXML(&$writer)\n\t{\n\t\t$writer->xmlStartTag('General',array('Structure' => $this->getStructure()));\n\n\t\t// Identifier\n\t\tforeach($this->getIdentifierIds() as $id)\n\t\t{\n\t\t\t$ide =& $this->getIdentifier($id);\n\t\t\t$ide->toXML($writer);\n\t\t}\n\t\t\n\t\t// TItle\n\t\t$writer->xmlElement('Title',array('Language' => $this->getTitleLanguageCode()),$this->getTitle());\n\n\t\t// Language\n\t\tforeach($this->getLanguageIds() as $id)\n\t\t{\n\t\t\t$lan =& $this->getLanguage($id);\n\t\t\t$lan->toXML($writer);\n\t\t}\n\n\t\t// Description\n\t\tforeach($this->getDescriptionIds() as $id)\n\t\t{\n\t\t\t$des =& $this->getDescription($id);\n\t\t\t$des->toXML($writer);\n\t\t}\n\n\t\t// Keyword\n\t\tforeach($this->getKeywordIds() as $id)\n\t\t{\n\t\t\t$key =& $this->getKeyword($id);\n\t\t\t$key->toXML($writer);\n\t\t}\n\t\t\n\t\t// Copverage\n\t\tif(strlen($this->getCoverage()))\n\t\t{\n\t\t\t$writer->xmlElement('Coverage',array('Language' => $this->getCoverageLanguageCode()),$this->getCoverage());\n\t\t}\n\t\t$writer->xmlEndTag('General');\n\t}", "title": "" }, { "docid": "b74275f737a98813b88410f51ba80ff8", "score": "0.60441256", "text": "function xmlSerialize(Writer $writer)\n\t{\n\t\t$writer->write([\n Schema::CBC . 'RegistrationName' => $this->getRegistrationName(),\n\n ]);\n\n $writer->write([\n 'name' => Schema::CBC . 'CompanyID',\n 'value' => $this->getCompanyId()\n\n ]);\n\n\n if ($this->getRegistrationAddress()){\n $writer->write([\n \t\t\tSchema::CBC . 'RegistrationAddress' => $this->getRegistrationAddress()\n \t\t]);\n }\n\t}", "title": "" }, { "docid": "13f5df6b8ffb76fa7a283f0b35e490d9", "score": "0.60223246", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeObjectValue('namespace', $this->getEscapedNamespace());\n $writer->writeObjectValue('labels', $this->getLabels());\n $writer->writeStringValue('name', $this->getName());\n $writer->writeStringValue('type', $this->getType());\n }", "title": "" }, { "docid": "5b206a7cd90550fe9bca64802b8a3322", "score": "0.5982998", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeStringValue('category', $this->getCategory());\n $writer->writeStringValue('description', $this->getDescription());\n $writer->writeStringValue('deviceId', $this->getDeviceId());\n $writer->writeFloatValue('impactValue', $this->getImpactValue());\n $writer->writeStringValue('processName', $this->getProcessName());\n $writer->writeStringValue('publisher', $this->getPublisher());\n }", "title": "" }, { "docid": "0971276e50b660b31841dea19669b0dd", "score": "0.59796745", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeStringValue('logicAppWorkflowName', $this->getLogicAppWorkflowName());\n $writer->writeStringValue('resourceGroupName', $this->getResourceGroupName());\n $writer->writeStringValue('subscriptionId', $this->getSubscriptionId());\n $writer->writeStringValue('url', $this->getUrl());\n }", "title": "" }, { "docid": "4e97340c832c8821058c3dd0129ebd90", "score": "0.59724087", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeObjectValue('namespace', $this->getEscapedNamespace());\n $writer->writeStringValue('name', $this->getName());\n }", "title": "" }, { "docid": "84f3974084a26b15bd90f950bce1441f", "score": "0.5965285", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeStringValue('displayName', $this->getDisplayName());\n $writer->writeStringValue('externalId', $this->getExternalId());\n $writer->writeObjectValue('parent', $this->getParent());\n $writer->writeDateTimeValue('registeredDateTime', $this->getRegisteredDateTime());\n $writer->writeStringValue('registeredRoot', $this->getRegisteredRoot());\n $writer->writeCollectionOfObjectValues('roleAssignmentRequests', $this->getRoleAssignmentRequests());\n $writer->writeCollectionOfObjectValues('roleAssignments', $this->getRoleAssignments());\n $writer->writeCollectionOfObjectValues('roleDefinitions', $this->getRoleDefinitions());\n $writer->writeCollectionOfObjectValues('roleSettings', $this->getRoleSettings());\n $writer->writeStringValue('status', $this->getStatus());\n $writer->writeStringValue('type', $this->getType());\n }", "title": "" }, { "docid": "969d6024f61b298daf4de356110ef7a1", "score": "0.5962496", "text": "function xmlSerialize(Writer $writer) {\n // TODO: Implement xmlSerialize() method.\n if($this->telephone !== null) {\n $writer->write([\n Schema::CBC . 'Telephone' => $this->telephone\n ]);\n }\n\n if($this->telefax !== null) {\n $writer->write([\n Schema::CBC . 'Telefax' => $this->telefax\n ]);\n }\n\n if($this->electronicMail !== null) {\n $writer->write([\n Schema::CBC . 'ElectronicMail' => $this->electronicMail\n ]);\n }\n }", "title": "" }, { "docid": "1b324bcdb0d2174d9dd66c8ae57de7cf", "score": "0.5957674", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeObjectValue('group', $this->getGroup());\n }", "title": "" }, { "docid": "485af490c54fd45922392988dd8b004a", "score": "0.59359795", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeCollectionOfObjectValues('applications', $this->getApplications());\n $writer->writeEnumValue('connectorGroupType', $this->getConnectorGroupType());\n $writer->writeBooleanValue('isDefault', $this->getIsDefault());\n $writer->writeCollectionOfObjectValues('members', $this->getMembers());\n $writer->writeStringValue('name', $this->getName());\n $writer->writeEnumValue('region', $this->getRegion());\n }", "title": "" }, { "docid": "0e64f8910cbc5127de679999d16dca56", "score": "0.5902084", "text": "public function writeXmlContents(\\XMLWriter $writer)\n {\n if ($this->about) {\n $writer->writeAttribute('about', $this->about);\n }\n if ($this->mediaType) {\n $writer->writeAttribute('mediaType', $this->mediaType);\n }\n if ($this->resourceType) {\n $writer->writeAttribute('resourceType', $this->resourceType);\n }\n parent::writeXmlContents($writer);\n if ($this->citations) {\n foreach ($this->citations as $i => $x) {\n $writer->startElementNs('gx', 'citation', null);\n $x->writeXmlContents($writer);\n $writer->endElement();\n }\n }\n if ($this->mediator) {\n $writer->startElementNs('gx', 'mediator', null);\n $this->mediator->writeXmlContents($writer);\n $writer->endElement();\n }\n if ($this->sources) {\n foreach ($this->sources as $i => $x) {\n $writer->startElementNs('gx', 'source', null);\n $x->writeXmlContents($writer);\n $writer->endElement();\n }\n }\n if ($this->analysis) {\n $writer->startElementNs('gx', 'analysis', null);\n $this->analysis->writeXmlContents($writer);\n $writer->endElement();\n }\n if ($this->componentOf) {\n $writer->startElementNs('gx', 'componentOf', null);\n $this->componentOf->writeXmlContents($writer);\n $writer->endElement();\n }\n if ($this->titles) {\n foreach ($this->titles as $i => $x) {\n $writer->startElementNs('gx', 'title', null);\n $x->writeXmlContents($writer);\n $writer->endElement();\n }\n }\n if ($this->titleLabel) {\n $writer->startElementNs('gx', 'titleLabel', null);\n $this->titleLabel->writeXmlContents($writer);\n $writer->endElement();\n }\n if ($this->notes) {\n foreach ($this->notes as $i => $x) {\n $writer->startElementNs('gx', 'note', null);\n $x->writeXmlContents($writer);\n $writer->endElement();\n }\n }\n if ($this->attribution) {\n $writer->startElementNs('gx', 'attribution', null);\n $this->attribution->writeXmlContents($writer);\n $writer->endElement();\n }\n if ($this->sortKey) {\n $writer->startElementNs('gx', 'sortKey', null);\n $writer->text($this->sortKey);\n $writer->endElement();\n }\n if ($this->descriptions) {\n foreach ($this->descriptions as $i => $x) {\n $writer->startElementNs('gx', 'description', null);\n $x->writeXmlContents($writer);\n $writer->endElement();\n }\n }\n if ($this->identifiers) {\n foreach ($this->identifiers as $i => $x) {\n $writer->startElementNs('gx', 'identifier', null);\n $x->writeXmlContents($writer);\n $writer->endElement();\n }\n }\n if ($this->created) {\n $writer->startElementNs('gx', 'created', null);\n $writer->text($this->created);\n $writer->endElement();\n }\n if ($this->modified) {\n $writer->startElementNs('gx', 'modified', null);\n $writer->text($this->modified);\n $writer->endElement();\n }\n if ($this->coverage) {\n foreach ($this->coverage as $i => $x) {\n $writer->startElementNs('gx', 'coverage', null);\n $x->writeXmlContents($writer);\n $writer->endElement();\n }\n }\n if ($this->rights) {\n foreach ($this->rights as $i => $x) {\n $writer->startElementNs('gx', 'rights', null);\n $writer->text($x);\n $writer->endElement();\n }\n }\n if ($this->fields) {\n foreach ($this->fields as $i => $x) {\n $writer->startElementNs('gx', 'field', null);\n $x->writeXmlContents($writer);\n $writer->endElement();\n }\n }\n if ($this->repository) {\n $writer->startElementNs('gx', 'repository', null);\n $this->repository->writeXmlContents($writer);\n $writer->endElement();\n }\n if ($this->descriptorRef) {\n $writer->startElementNs('gx', 'descriptor', null);\n $this->descriptorRef->writeXmlContents($writer);\n $writer->endElement();\n }\n }", "title": "" }, { "docid": "0dcb7851fe41e8c67287ff9411d76973", "score": "0.58894277", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeStringValue('fontColor', $this->getFontColor());\n $writer->writeStringValue('fontName', $this->getFontName());\n $writer->writeIntegerValue('fontSize', $this->getFontSize());\n $writer->writeEnumValue('layout', $this->getLayout());\n $writer->writeStringValue('text', $this->getText());\n $writer->writeStringValue('uiElementName', $this->getUiElementName());\n }", "title": "" }, { "docid": "e04cdb25a85438a10b42ab6cd3d3179e", "score": "0.58058685", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeCollectionOfObjectValues('constraints', $this->getConstraints());\n $writer->writeCollectionOfObjectValues('dependencies', $this->getDependencies());\n $writer->writeStringValue('description', $this->getDescription());\n $writer->writeStringValue('displayName', $this->getDisplayName());\n $writer->writeStringValue('documentationUrl', $this->getDocumentationUrl());\n $writer->writeStringValue('headerSubtitle', $this->getHeaderSubtitle());\n $writer->writeStringValue('headerTitle', $this->getHeaderTitle());\n $writer->writeBooleanValue('isTopLevel', $this->getIsTopLevel());\n $writer->writeCollectionOfPrimitiveValues('keywords', $this->getKeywords());\n $writer->writeStringValue('placeholderText', $this->getPlaceholderText());\n $writer->writeEnumValue('valueType', $this->getValueType());\n }", "title": "" }, { "docid": "75e369ddb621cc7e84fa3fbd06ace971", "score": "0.577621", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeObjectValue('content', $this->getContent());\n $writer->writeCollectionOfObjectValues('deployments', $this->getDeployments());\n $writer->writeObjectValue('deploymentSettings', $this->getDeploymentSettings());\n }", "title": "" }, { "docid": "aed5f137f3d6d946c82d27fdd3767ba3", "score": "0.57536256", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeObjectValue('defaultItem', $this->getDefaultItem());\n $writer->writeCollectionOfObjectValues('items', $this->getItems());\n $writer->writeBooleanValue('required', $this->getRequired());\n }", "title": "" }, { "docid": "92b05f1402cfd3b01d85c022963eddca", "score": "0.57382405", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeObjectValue('blobContainer', $this->getBlobContainer());\n $writer->writeStringValue('etag', $this->getEtag());\n $writer->writeCollectionOfObjectValues('fileHashes', $this->getFileHashes());\n $writer->writeStringValue('name', $this->getName());\n $writer->writeStringValue('url', $this->getUrl());\n }", "title": "" }, { "docid": "25758629c1a507cf28291e7a8e0484dd", "score": "0.5728659", "text": "public function serialize()\n {\n return serialize($this->xml->ownerDocument->saveXML($this->xml));\n }", "title": "" }, { "docid": "2e5279e1441f9ba89b3b9acbb132ebd9", "score": "0.57228607", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeStringValue('targetGroupId', $this->getTargetGroupId());\n $writer->writeObjectValue('termsAndConditions', $this->getTermsAndConditions());\n }", "title": "" }, { "docid": "4eb3fda9699ec5f68cd78752668a7741", "score": "0.5721426", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeObjectValue('category', $this->getCategory());\n $writer->writeStringValue('categoryPath', $this->getCategoryPath());\n $writer->writeEnumValue('classType', $this->getClassType());\n $writer->writeObjectValue('definitionFile', $this->getDefinitionFile());\n $writer->writeStringValue('displayName', $this->getDisplayName());\n $writer->writeStringValue('explainText', $this->getExplainText());\n $writer->writeStringValue('groupPolicyCategoryId', $this->getGroupPolicyCategoryId());\n $writer->writeBooleanValue('hasRelatedDefinitions', $this->getHasRelatedDefinitions());\n $writer->writeDateTimeValue('lastModifiedDateTime', $this->getLastModifiedDateTime());\n $writer->writeStringValue('minDeviceCspVersion', $this->getMinDeviceCspVersion());\n $writer->writeStringValue('minUserCspVersion', $this->getMinUserCspVersion());\n $writer->writeObjectValue('nextVersionDefinition', $this->getNextVersionDefinition());\n $writer->writeEnumValue('policyType', $this->getPolicyType());\n $writer->writeCollectionOfObjectValues('presentations', $this->getPresentations());\n $writer->writeObjectValue('previousVersionDefinition', $this->getPreviousVersionDefinition());\n $writer->writeStringValue('supportedOn', $this->getSupportedOn());\n $writer->writeStringValue('version', $this->getVersion());\n }", "title": "" }, { "docid": "a5df925caa90f0c5f6616dcb49f33ff5", "score": "0.5697249", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeStringValue('displayName', $this->getDisplayName());\n $writer->writeStringValue('productId', $this->getProductId());\n $writer->writeStringValue('vendorId', $this->getVendorId());\n }", "title": "" }, { "docid": "d5780a321e435df304d26135a6ac2fff", "score": "0.5678623", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeObjectValue('createdBy', $this->getCreatedBy());\n $writer->writeDateTimeValue('createdDateTime', $this->getCreatedDateTime());\n $writer->writeStringValue('description', $this->getDescription());\n $writer->writeCollectionOfObjectValues('details', $this->getDetails());\n $writer->writeStringValue('displayName', $this->getDisplayName());\n $writer->writeObjectValue('lastModifiedBy', $this->getLastModifiedBy());\n $writer->writeDateTimeValue('lastModifiedDateTime', $this->getLastModifiedDateTime());\n $writer->writeStringValue('locale', $this->getLocale());\n $writer->writeEnumValue('source', $this->getSource());\n $writer->writeEnumValue('status', $this->getStatus());\n $writer->writeCollectionOfPrimitiveValues('supportedLocales', $this->getSupportedLocales());\n }", "title": "" }, { "docid": "acae2afd9db4b9ca75b324256be4cbd0", "score": "0.56673086", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeStringValue('applicationType', $this->getApplicationType());\n $writer->writeBooleanValue('hidden', $this->getHidden());\n }", "title": "" }, { "docid": "17efb3675357bf48ac47efd364ce2d77", "score": "0.56639403", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeBinaryContent('encodedSettingXml', $this->getEncodedSettingXml());\n $writer->writeCollectionOfObjectValues('settings', $this->getSettings());\n }", "title": "" }, { "docid": "1d6862159680d57ab1a2a2a406201f22", "score": "0.56541157", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeCollectionOfObjectValues('assignments', $this->getAssignments());\n $writer->writeBinaryContent('content', $this->getContent());\n $writer->writeStringValue('contentFileName', $this->getContentFileName());\n $writer->writeDateTimeValue('creationDateTime', $this->getCreationDateTime());\n $writer->writeObjectValue('deploySummary', $this->getDeploySummary());\n $writer->writeStringValue('description', $this->getDescription());\n $writer->writeCollectionOfObjectValues('deviceStatuses', $this->getDeviceStatuses());\n $writer->writeStringValue('displayName', $this->getDisplayName());\n $writer->writeDateTimeValue('lastModifiedDateTime', $this->getLastModifiedDateTime());\n $writer->writeCollectionOfPrimitiveValues('roleScopeTagIds', $this->getRoleScopeTagIds());\n $writer->writeStringValue('version', $this->getVersion());\n }", "title": "" }, { "docid": "7de3131a97d9984e5b2309b099183f05", "score": "0.56412566", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeStringValue('fileName', $this->getFileName());\n }", "title": "" }, { "docid": "68d7e8479b624b27851f655c56278d6f", "score": "0.5639847", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeEnumValue('addedStudentAction', $this->getAddedStudentAction());\n $writer->writeEnumValue('addToCalendarAction', $this->getAddToCalendarAction());\n $writer->writeBooleanValue('allowLateSubmissions', $this->getAllowLateSubmissions());\n $writer->writeBooleanValue('allowStudentsToAddResourcesToSubmission', $this->getAllowStudentsToAddResourcesToSubmission());\n $writer->writeObjectValue('assignTo', $this->getAssignTo());\n $writer->writeCollectionOfObjectValues('categories', $this->getCategories());\n $writer->writeStringValue('classId', $this->getClassId());\n $writer->writeDateTimeValue('closeDateTime', $this->getCloseDateTime());\n $writer->writeStringValue('displayName', $this->getDisplayName());\n $writer->writeDateTimeValue('dueDateTime', $this->getDueDateTime());\n $writer->writeObjectValue('grading', $this->getGrading());\n $writer->writeObjectValue('gradingCategory', $this->getGradingCategory());\n $writer->writeObjectValue('instructions', $this->getInstructions());\n $writer->writeStringValue('moduleUrl', $this->getModuleUrl());\n $writer->writeStringValue('notificationChannelUrl', $this->getNotificationChannelUrl());\n $writer->writeCollectionOfObjectValues('resources', $this->getResources());\n $writer->writeObjectValue('rubric', $this->getRubric());\n $writer->writeCollectionOfObjectValues('submissions', $this->getSubmissions());\n }", "title": "" }, { "docid": "3430dd46e1eea2006669a2484dd01b5f", "score": "0.5629044", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeStringValue('audioDeviceName', $this->getAudioDeviceName());\n $writer->writeEnumValue('bookingType', $this->getBookingType());\n $writer->writeStringValue('building', $this->getBuilding());\n $writer->writeIntegerValue('capacity', $this->getCapacity());\n $writer->writeStringValue('displayDeviceName', $this->getDisplayDeviceName());\n $writer->writeStringValue('emailAddress', $this->getEmailAddress());\n $writer->writeStringValue('floorLabel', $this->getFloorLabel());\n $writer->writeIntegerValue('floorNumber', $this->getFloorNumber());\n $writer->writeBooleanValue('isWheelChairAccessible', $this->getIsWheelChairAccessible());\n $writer->writeStringValue('label', $this->getLabel());\n $writer->writeStringValue('nickname', $this->getNickname());\n $writer->writeCollectionOfPrimitiveValues('tags', $this->getTags());\n $writer->writeStringValue('videoDeviceName', $this->getVideoDeviceName());\n }", "title": "" }, { "docid": "551b187aeab8df02b110332d661fc81b", "score": "0.562729", "text": "public function xmlSerialize(Writer $writer)\n {\n $xml = [];\n if (!$this->currentService || !in_array($this->currentService, array_keys(static::$defaultProperties))) {\n $writer->write($xml);\n\n return;\n }\n\n foreach (static::$defaultProperties[$this->currentService] as $propertyName => $namespace) {\n if (!is_null($this->{$propertyName})) {\n $xml[$namespace ? \"{{$namespace}}{$propertyName}\" : $propertyName] = $this->{$propertyName};\n }\n }\n\n $writer->write($xml);\n }", "title": "" }, { "docid": "e53fce9e9da163a8b3c084c99199dcea", "score": "0.56181353", "text": "public function writeXmlContents(\\XMLWriter $writer)\n {\n if ($this->lang) {\n $writer->writeAttribute('xml:lang', $this->lang);\n }\n parent::writeXmlContents($writer);\n if ($this->title) {\n $writer->startElementNs('gx', 'title', null);\n $writer->text($this->title);\n $writer->endElement();\n }\n if ($this->size) {\n $writer->startElementNs('gx', 'size', null);\n $writer->text($this->size);\n $writer->endElement();\n }\n if ($this->content) {\n foreach ($this->content as $i => $x) {\n $writer->startElementNs('gx', 'content', null);\n $x->writeXmlContents($writer);\n $writer->endElement();\n }\n }\n if ($this->attribution) {\n $writer->startElementNs('gx', 'attribution', null);\n $this->attribution->writeXmlContents($writer);\n $writer->endElement();\n }\n }", "title": "" }, { "docid": "c604598153ee8a55d42ae6502a3f5a85", "score": "0.5613717", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeBinaryContent('content', $this->getContent());\n $writer->writeStringValue('contentType', $this->getContentType());\n $writer->writeDateTimeValue('lastModifiedDateTime', $this->getLastModifiedDateTime());\n $writer->writeStringValue('name', $this->getName());\n $writer->writeIntegerValue('size', $this->getSize());\n }", "title": "" }, { "docid": "e7e2d599d0f97fe803dd6c72bb74a979", "score": "0.56105787", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeDateTimeValue('assignedDateTime', $this->getAssignedDateTime());\n $writer->writeStringValue('assignerUserId', $this->getAssignerUserId());\n $writer->writeEnumValue('assignmentType', $this->getAssignmentType());\n $writer->writeObjectValue('dueDateTime', $this->getDueDateTime());\n $writer->writeObjectValue('notes', $this->getNotes());\n }", "title": "" }, { "docid": "90e63cd9131d72f4daa411b4d721dbfc", "score": "0.56072783", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeStringValue('activity', $this->getActivity());\n $writer->writeDateTimeValue('activityDateTime', $this->getActivityDateTime());\n $writer->writeStringValue('activityOperationType', $this->getActivityOperationType());\n $writer->writeStringValue('activityResult', $this->getActivityResult());\n $writer->writeStringValue('activityType', $this->getActivityType());\n $writer->writeObjectValue('actor', $this->getActor());\n $writer->writeStringValue('category', $this->getCategory());\n $writer->writeStringValue('componentName', $this->getComponentName());\n $writer->writeStringValue('correlationId', $this->getCorrelationId());\n $writer->writeStringValue('displayName', $this->getDisplayName());\n $writer->writeCollectionOfObjectValues('resources', $this->getResources());\n }", "title": "" }, { "docid": "90a42a739c8d1ac7978b5cdaf5801639", "score": "0.5600106", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeStringValue('boardSupportPackageVersion', $this->getBoardSupportPackageVersion());\n $writer->writeStringValue('description', $this->getDescription());\n $writer->writeStringValue('deviceModel', $this->getDeviceModel());\n $writer->writeStringValue('osVersion', $this->getOsVersion());\n $writer->writeStringValue('patchVersion', $this->getPatchVersion());\n $writer->writeStringValue('releaseNotesUrl', $this->getReleaseNotesUrl());\n }", "title": "" }, { "docid": "0d5da3ecfda7da759cd8d5ddc8ccb602", "score": "0.5586051", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeStringValue('productCode', $this->getProductCode());\n $writer->writeStringValue('productVersion', $this->getProductVersion());\n $writer->writeEnumValue('productVersionOperator', $this->getProductVersionOperator());\n }", "title": "" }, { "docid": "d60355c6cdd71e72752cb7d226d9c951", "score": "0.5576657", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeDateTimeValue('createdDateTime', $this->getCreatedDateTime());\n $writer->writeDateTimeValue('lastActionDateTime', $this->getLastActionDateTime());\n $writer->writeStringValue('resourceLocation', $this->getResourceLocation());\n $writer->writeEnumValue('status', $this->getStatus());\n $writer->writeStringValue('statusDetail', $this->getStatusDetail());\n }", "title": "" }, { "docid": "bdfee47e1002201bb2c678b746117d64", "score": "0.55761784", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeObjectValue('artifact', $this->getArtifact());\n $writer->writeDateTimeValue('collectedDateTime', $this->getCollectedDateTime());\n $writer->writeDateTimeValue('firstSeenDateTime', $this->getFirstSeenDateTime());\n $writer->writeDateTimeValue('lastSeenDateTime', $this->getLastSeenDateTime());\n $writer->writeObjectValue('parentHost', $this->getParentHost());\n $writer->writeStringValue('recordType', $this->getRecordType());\n }", "title": "" }, { "docid": "6c7eb1549d85f552970bbdaf8842bf60", "score": "0.5574753", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeObjectValue('group', $this->getGroup());\n $writer->writeEnumValue('includedSources', $this->getIncludedSources());\n }", "title": "" }, { "docid": "b0c241746105114546e6f7e7e182d4c2", "score": "0.5548599", "text": "abstract public function saveXml();", "title": "" }, { "docid": "3a9b06e7cbd1d02f557eacb230973427", "score": "0.55272335", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeCollectionOfPrimitiveValues('additionalTags', $this->getAdditionalTags());\n $writer->writeStringValue('contentWebUrl', $this->getContentWebUrl());\n $writer->writeCollectionOfPrimitiveValues('contributors', $this->getContributors());\n $writer->writeDateTimeValue('createdDateTime', $this->getCreatedDateTime());\n $writer->writeStringValue('description', $this->getDescription());\n $writer->writeDateIntervalValue('duration', $this->getDuration());\n $writer->writeStringValue('externalId', $this->getExternalId());\n $writer->writeStringValue('format', $this->getFormat());\n $writer->writeBooleanValue('isActive', $this->getIsActive());\n $writer->writeBooleanValue('isPremium', $this->getIsPremium());\n $writer->writeBooleanValue('isSearchable', $this->getIsSearchable());\n $writer->writeStringValue('languageTag', $this->getLanguageTag());\n $writer->writeDateTimeValue('lastModifiedDateTime', $this->getLastModifiedDateTime());\n $writer->writeIntegerValue('numberOfPages', $this->getNumberOfPages());\n $writer->writeCollectionOfPrimitiveValues('skillTags', $this->getSkillTags());\n $writer->writeStringValue('sourceName', $this->getSourceName());\n $writer->writeStringValue('thumbnailWebUrl', $this->getThumbnailWebUrl());\n $writer->writeStringValue('title', $this->getTitle());\n }", "title": "" }, { "docid": "8054de0a5e1bc5427c905256510020ef", "score": "0.55241907", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeObjectValue('callbackConfiguration', $this->getCallbackConfiguration());\n $writer->writeObjectValue('createdBy', $this->getCreatedBy());\n $writer->writeDateTimeValue('createdDateTime', $this->getCreatedDateTime());\n $writer->writeObjectValue('lastModifiedBy', $this->getLastModifiedBy());\n $writer->writeDateTimeValue('lastModifiedDateTime', $this->getLastModifiedDateTime());\n }", "title": "" }, { "docid": "c59b70bf09d28585346e3b16c792147f", "score": "0.55211115", "text": "public function serialize(SerializationWriter $writer): void {\n $writer->writeBooleanValue('allowMultipleValues', $this->getAllowMultipleValues());\n $writer->writeStringValue('@odata.type', $this->getOdataType());\n $writer->writeObjectValue('parentTerm', $this->getParentTerm());\n $writer->writeBooleanValue('showFullyQualifiedName', $this->getShowFullyQualifiedName());\n $writer->writeObjectValue('termSet', $this->getTermSet());\n $writer->writeAdditionalData($this->getAdditionalData());\n }", "title": "" }, { "docid": "01720afe87485084ca87bf410b0e680d", "score": "0.5512293", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeStringValue('approvalId', $this->getApprovalId());\n $writer->writeDateTimeValue('completedDateTime', $this->getCompletedDateTime());\n $writer->writeObjectValue('createdBy', $this->getCreatedBy());\n $writer->writeDateTimeValue('createdDateTime', $this->getCreatedDateTime());\n $writer->writeStringValue('customData', $this->getCustomData());\n $writer->writeStringValue('status', $this->getStatus());\n }", "title": "" }, { "docid": "c96e8b5f31a5ef85fdc55d086f081da5", "score": "0.55059725", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeObjectValue('trainingAssignment', $this->getTrainingAssignment());\n $writer->writeObjectValue('trainingReminder', $this->getTrainingReminder());\n }", "title": "" }, { "docid": "5601675f3a92c62a47660cd4dd6b27bf", "score": "0.5504391", "text": "public function toXml()\r\n\t\t{\r\n\t\t\tCore::import( \"xmlserializer\" );\r\n\t\t\t$arrSerializerOptions = array\r\n\t\t\t(\r\n\t\t\t\t'addDecl' => FALSE,\r\n\t\t\t\t'indent' => '',\r\n\t\t\t\t'linebreak' => '',\r\n\t\t\t\t'rootName' => get_class( $this ),\r\n\t\t\t\t'typeHints' => TRUE,\r\n\t\t\t);\r\n\t\t\t$objSerializer = new XML_Serializer( $arrSerializerOptions );\r\n\t\t\t$status = $objSerializer->serialize( $this->toArray() );\r\n\t\t\tif ( $status )\r\n\t\t\t{\r\n\t\t\t\treturn $objSerializer->getSerializedData();\r\n\t\t\t}\r\n\t\t\treturn NULL;\r\n\t\t}", "title": "" }, { "docid": "9f94a0b6174e3b1a030bab8767c2e25f", "score": "0.54902804", "text": "public function serialize(SerializationWriter $writer): void {\n $writer->writeStringValue('email', $this->getEmail());\n $writer->writeStringValue('name', $this->getName());\n $writer->writeStringValue('notes', $this->getNotes());\n $writer->writeStringValue('@odata.type', $this->getOdataType());\n $writer->writeStringValue('phone', $this->getPhone());\n $writer->writeStringValue('title', $this->getTitle());\n $writer->writeAdditionalData($this->getAdditionalData());\n }", "title": "" }, { "docid": "33b7249017ba191dd5c94e91f1ce9900", "score": "0.54849035", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeObjectValue('accessPackageResource', $this->getAccessPackageResource());\n $writer->writeStringValue('catalogId', $this->getCatalogId());\n $writer->writeBooleanValue('executeImmediately', $this->getExecuteImmediately());\n $writer->writeDateTimeValue('expirationDateTime', $this->getExpirationDateTime());\n $writer->writeBooleanValue('isValidationOnly', $this->getIsValidationOnly());\n $writer->writeStringValue('justification', $this->getJustification());\n $writer->writeObjectValue('requestor', $this->getRequestor());\n $writer->writeStringValue('requestState', $this->getRequestState());\n $writer->writeStringValue('requestStatus', $this->getRequestStatus());\n $writer->writeStringValue('requestType', $this->getRequestType());\n }", "title": "" }, { "docid": "3ad9a58d7215cf1b22c8d52e137831dd", "score": "0.5484481", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeCollectionOfObjectValues('addresses', $this->getAddresses());\n $writer->writeCollectionOfObjectValues('phones', $this->getPhones());\n }", "title": "" }, { "docid": "3d3ae39d209eabf1d277bbeea855c3d0", "score": "0.54756", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeBooleanValue('hasAttachments', $this->getHasAttachments());\n $writer->writeDateTimeValue('lastDeliveredDateTime', $this->getLastDeliveredDateTime());\n $writer->writeStringValue('preview', $this->getPreview());\n $writer->writeCollectionOfObjectValues('threads', $this->getThreads());\n $writer->writeStringValue('topic', $this->getTopic());\n $writer->writeCollectionOfPrimitiveValues('uniqueSenders', $this->getUniqueSenders());\n }", "title": "" }, { "docid": "462702cf6097c139d0f1e232b1cdbc2a", "score": "0.54639196", "text": "public function xmlSerialize(Writer $writer)\n {\n $writer->writeElement('OrderHead', [\n Message::getNsKey('guid') => $this->guid,\n Message::getNsKey('appType') => $this->appType,\n Message::getNsKey('appTime') => $this->appTime,\n Message::getNsKey('appStatus') => $this->appStatus,\n Message::getNsKey('orderType') => $this->orderType,\n Message::getNsKey('orderNo') => $this->orderNo,\n Message::getNsKey('ebpCode') => $this->ebpCode,\n Message::getNsKey('ebpName') => $this->ebpName,\n Message::getNsKey('ebcCode') => $this->ebcCode,\n Message::getNsKey('ebcName') => $this->ebcName,\n Message::getNsKey('goodsValue') => $this->goodsValue,\n Message::getNsKey('freight') => $this->freight,\n Message::getNsKey('currency') => $this->currency,\n ]);\n }", "title": "" }, { "docid": "c8c33a3c1e0bd60c5a1b6e93a2e8acd4", "score": "0.5460563", "text": "public function __toString( ) \n { \n //Return the saved DOMDocument instance as XML \n return( $this->DOMDocument->saveXML( ) ); \n }", "title": "" }, { "docid": "f8deb6c7d3b70faebddd2d9f402953f7", "score": "0.54565334", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeStringValue('mdeDeviceId', $this->getMdeDeviceId());\n $writer->writeStringValue('registryHive', $this->getRegistryHive());\n $writer->writeStringValue('registryKey', $this->getRegistryKey());\n $writer->writeStringValue('registryValue', $this->getRegistryValue());\n $writer->writeStringValue('registryValueName', $this->getRegistryValueName());\n $writer->writeStringValue('registryValueType', $this->getRegistryValueType());\n }", "title": "" }, { "docid": "e035643923239f480422844d4ac9ff0a", "score": "0.54516554", "text": "public function toXmlObject()\n {\n $xmlObj = $this->getXmlObject();\n $useContainer = $this->getUseContainer();\n if ($useContainer) {\n $this->_addRequiredAttributes($xmlObj);\n foreach ($this->getAttributes() as $key => $val) {\n $xmlObj->addAttribute($key, $xmlObj->xmlAttribute($val));\n }\n }\n\n foreach ($this->getElements() as $element) {\n $xmlObj->appendChild($element->toXmlObject());\n }\n\n if (!$useContainer) {\n $result = array();\n foreach ($xmlObj->children() as $child) {\n $result[] = $child;\n }\n }\n return isset($result) ? $result : $xmlObj;\n }", "title": "" }, { "docid": "7d4d612a0b8c71ffa1ac477fc5afd4da", "score": "0.54387534", "text": "public function __toString() {\n return $this->getDom()->saveXML();\n }", "title": "" }, { "docid": "4c9476c4e4695c8dc83298307fa11a01", "score": "0.543669", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeStringValue('azureStorageUri', $this->getAzureStorageUri());\n $writer->writeDateTimeValue('azureStorageUriExpirationDateTime', $this->getAzureStorageUriExpirationDateTime());\n $writer->writeDateTimeValue('createdDateTime', $this->getCreatedDateTime());\n $writer->writeBooleanValue('isCommitted', $this->getIsCommitted());\n $writer->writeBooleanValue('isDependency', $this->getIsDependency());\n $writer->writeBooleanValue('isFrameworkFile', $this->getIsFrameworkFile());\n $writer->writeBinaryContent('manifest', $this->getManifest());\n $writer->writeStringValue('name', $this->getName());\n $writer->writeIntegerValue('size', $this->getSize());\n $writer->writeIntegerValue('sizeEncrypted', $this->getSizeEncrypted());\n $writer->writeEnumValue('uploadState', $this->getUploadState());\n }", "title": "" }, { "docid": "cc84d7288af5e7144731913caed861fb", "score": "0.5436206", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeIntegerValue('cpuCoresCount', $this->getCpuCoresCount());\n $writer->writeStringValue('cpuName', $this->getCpuName());\n $writer->writeIntegerValue('cpuProcessorSpeedInMhz', $this->getCpuProcessorSpeedInMhz());\n $writer->writeObjectValue('feedback', $this->getFeedback());\n $writer->writeObjectValue('identity', $this->getIdentity());\n $writer->writeStringValue('name', $this->getName());\n }", "title": "" }, { "docid": "b14677764c8a081e74986a7b5ce1d5b0", "score": "0.5426019", "text": "public function serialize()\n {\n // TODO: Implement serialize() method.\n }", "title": "" }, { "docid": "b14677764c8a081e74986a7b5ce1d5b0", "score": "0.5426019", "text": "public function serialize()\n {\n // TODO: Implement serialize() method.\n }", "title": "" }, { "docid": "aa7ba72bea971ee1f133e3b18d48c2a0", "score": "0.5425856", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeCollectionOfObjectValues('administrativeUnits', $this->getAdministrativeUnits());\n $writer->writeCollectionOfObjectValues('attributeSets', $this->getAttributeSets());\n $writer->writeObjectValue('certificateAuthorities', $this->getCertificateAuthorities());\n $writer->writeCollectionOfObjectValues('customSecurityAttributeDefinitions', $this->getCustomSecurityAttributeDefinitions());\n $writer->writeCollectionOfObjectValues('deletedItems', $this->getDeletedItems());\n $writer->writeCollectionOfObjectValues('featureRolloutPolicies', $this->getFeatureRolloutPolicies());\n $writer->writeCollectionOfObjectValues('federationConfigurations', $this->getFederationConfigurations());\n $writer->writeCollectionOfObjectValues('impactedResources', $this->getImpactedResources());\n $writer->writeCollectionOfObjectValues('inboundSharedUserProfiles', $this->getInboundSharedUserProfiles());\n $writer->writeCollectionOfObjectValues('onPremisesSynchronization', $this->getOnPremisesSynchronization());\n $writer->writeCollectionOfObjectValues('outboundSharedUserProfiles', $this->getOutboundSharedUserProfiles());\n $writer->writeCollectionOfObjectValues('recommendations', $this->getRecommendations());\n $writer->writeCollectionOfObjectValues('sharedEmailDomains', $this->getSharedEmailDomains());\n $writer->writeCollectionOfObjectValues('subscriptions', $this->getSubscriptions());\n }", "title": "" }, { "docid": "a47b0aca0e7d98f0d4fe2b1e227bea98", "score": "0.54251033", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeStringValue('displayName', $this->getDisplayName());\n $writer->writeIntegerValue('percentageWeight', $this->getPercentageWeight());\n }", "title": "" }, { "docid": "1170b1c791bb9f11230756f9320c465c", "score": "0.54235893", "text": "function write() {\r\n $data = \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?>\\n\";\r\n \r\n if(count($this->css)) {\r\n foreach($this->css as $css)\r\n $data .= \"<?xml-stylesheet type=\\\"text/css\\\" href=\\\"\" . $css . \"\\\"?>\\n\";\r\n }\r\n \r\n if(count($this->xslt)) {\r\n foreach($this->xslt as $xslt)\r\n $data .= \"<?xml-stylesheet type=\\\"text/xsl\\\" href=\\\"\" . $xslt . \"\\\"?>\\n\";\r\n }\r\n \r\n $data .= $this->get_text_node();\r\n\r\n $file = @fopen($this->filename, \"w\");\r\n\r\n if($file) {\r\n fwrite($file, $data);\r\n fclose($file);\r\n return true;\r\n } else return false;\r\n }", "title": "" }, { "docid": "ca25a5345fc8cd10846c0bc41f16c569", "score": "0.541745", "text": "function addSelfToDocument($domtree, $parentElement) {\n $parentElement->appendChild($domtree->createElement('homeurl', home_url()));\n $parentElement->appendChild($domtree->createElement('selectiondate', $this->selectionDate->format('Y-m-d')));\n $parentElement->appendChild($domtree->createElement('selectiondate_long', $this->selectionDate->format('D, d M Y')));\n\n if( $this->lastCompletedAllocScraperJob ) {\n $parentElement->appendChild($domtree->createElement('last_completed_job', \n DateTime::createFromFormat('Y-m-d H:i:s', $this->lastCompletedAllocScraperJob)->format('D, d M Y H:i:s')));\n }\n\n if( $this->isRefreshJobInProgress ) {\n $parentElement->appendChild($domtree->createElement('job_in_progress', 'true' ));\n }\n\n // did the last job fail to run?\n if( $this->lastJob ) {\n $parentElement->appendChild($domtree->createElement('last_job_id', $this->lastJob['jobId'] ));\n $parentElement->appendChild($domtree->createElement('last_job_status', $this->lastJob['status'] ));\n $parentElement->appendChild($domtree->createElement('check_credentials', $this->lastJob['lastJobFailedDueToCredentials'] ? 'true' : 'false' ));\n $parentElement->appendChild($domtree->createElement('last_job_error_log', \n get_option('hbo_log_directory_url') . $this->lastJob['jobId'] ));\n }\n\n $xmlRoot = $parentElement->appendChild($domtree->createElement('bedcounts'));\n foreach( $this->bedcountData as $row ) {\n $roomRoot = $xmlRoot->appendChild($domtree->createElement('room'));\n $roomRoot->appendChild($domtree->createElement('id', htmlspecialchars($row->room)));\n $roomRoot->appendChild($domtree->createElement('capacity', $row->capacity));\n $roomRoot->appendChild($domtree->createElement('room_type', $row->room_type));\n $roomRoot->appendChild($domtree->createElement('num_empty', $row->num_empty));\n $roomRoot->appendChild($domtree->createElement('num_staff', $row->num_staff));\n $roomRoot->appendChild($domtree->createElement('num_paid', $row->num_paid));\n $roomRoot->appendChild($domtree->createElement('num_noshow', $row->num_noshow));\n }\n }", "title": "" }, { "docid": "d52fda44338c98476dd3f75951db20a2", "score": "0.5414845", "text": "public function write()\n {\n $this->parent->clearAttributes();\n\n $termbuffer = $this->parent->termAttribute;\n\n// buffer.getChars(0, buffer.length(), termbuffer, 0);\n// termAttribute.setLength(buffer.length());\n\n if ($this->parent->hasIllegalOffsets) {\n $this->parent->offsetAttribute = [$this->parent->savedStartOffset, $this->parent->savedEndOffset];\n } else {\n $this->parent->offsetAttribute = [$this->startOffset, $this->endOffset];\n }\n $this->parent->posIncAttribute = $this->parent->position(true);\n $this->parent->typeAttribute = $this->parent->savedType;\n $this->parent->accumPosInc = 0;\n }", "title": "" }, { "docid": "fe0869e7bf0b4739910c18e83dd562d4", "score": "0.54077137", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeEnumValue('answerInputType', $this->getAnswerInputType());\n $writer->writeCollectionOfPrimitiveValues('answerOptions', $this->getAnswerOptions());\n $writer->writeStringValue('displayName', $this->getDisplayName());\n $writer->writeBooleanValue('isRequired', $this->getIsRequired());\n }", "title": "" }, { "docid": "58481f191c74e0e5b8d6f42ed5610261", "score": "0.54066354", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeCollectionOfObjectValues('accessPackageAssignments', $this->getAccessPackageAssignments());\n $writer->writeObjectValue('accessPackageResourceRole', $this->getAccessPackageResourceRole());\n $writer->writeObjectValue('accessPackageResourceScope', $this->getAccessPackageResourceScope());\n $writer->writeObjectValue('accessPackageSubject', $this->getAccessPackageSubject());\n $writer->writeStringValue('originId', $this->getOriginId());\n $writer->writeStringValue('originSystem', $this->getOriginSystem());\n $writer->writeStringValue('status', $this->getStatus());\n }", "title": "" }, { "docid": "d41b33757912e99444684a907361416e", "score": "0.5401642", "text": "abstract public function toXML();", "title": "" }, { "docid": "0bf91edf8f4004608df39197aaf34aa1", "score": "0.53984493", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeBooleanValue('isActive', $this->getIsActive());\n }", "title": "" }, { "docid": "9d14ba5f2e500a8e6dab41ce6f0e00f1", "score": "0.5398347", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeEnumValue('accessLevel', $this->getAccessLevel());\n $writer->writeStringValue('appDisplayName', $this->getAppDisplayName());\n $writer->writeStringValue('appPackageFamilyName', $this->getAppPackageFamilyName());\n $writer->writeEnumValue('dataCategory', $this->getDataCategory());\n }", "title": "" }, { "docid": "195a60315d2c1899da6712d245f07353", "score": "0.53950405", "text": "public function __toString() {\n $xml = '';\n $dom = $this->getXml();\n foreach($dom->childNodes as $node) {\n $xml .= $dom->saveXML($node) . \"\\n\";\n }\n\n return $xml;\n }", "title": "" }, { "docid": "110e366e5fe1c7a8d0b0e399fdc5fb45", "score": "0.5386923", "text": "public function render()\n\t{\n\t\t$this->writer->endElement();\n\t\t$this->writer->endDocument();\n\t\t$this->writer->flush();\n\t}", "title": "" }, { "docid": "7f9721094c25596f6b091670436f836b", "score": "0.5374279", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeStringValue('description', $this->getDescription());\n $writer->writeStringValue('displayName', $this->getDisplayName());\n $writer->writeStringValue('internalNetworkProbeUrl', $this->getInternalNetworkProbeUrl());\n $writer->writeObjectValue('microsoftTunnelConfiguration', $this->getMicrosoftTunnelConfiguration());\n $writer->writeCollectionOfObjectValues('microsoftTunnelServers', $this->getMicrosoftTunnelServers());\n $writer->writeStringValue('publicAddress', $this->getPublicAddress());\n $writer->writeCollectionOfPrimitiveValues('roleScopeTagIds', $this->getRoleScopeTagIds());\n $writer->writeBooleanValue('upgradeAutomatically', $this->getUpgradeAutomatically());\n $writer->writeBooleanValue('upgradeAvailable', $this->getUpgradeAvailable());\n $writer->writeTimeValue('upgradeWindowEndTime', $this->getUpgradeWindowEndTime());\n $writer->writeTimeValue('upgradeWindowStartTime', $this->getUpgradeWindowStartTime());\n $writer->writeIntegerValue('upgradeWindowUtcOffsetInMinutes', $this->getUpgradeWindowUtcOffsetInMinutes());\n }", "title": "" }, { "docid": "24645b6abe9ae7ac173e4a3a6dccd31e", "score": "0.5359103", "text": "abstract protected function serializeContents();", "title": "" }, { "docid": "7bc77e74842a967f58f1d2e6563d220a", "score": "0.5351477", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeIntegerValue('deviceCount', $this->getDeviceCount());\n $writer->writeStringValue('displayName', $this->getDisplayName());\n $writer->writeCollectionOfObjectValues('managedDevices', $this->getManagedDevices());\n $writer->writeEnumValue('platform', $this->getPlatform());\n $writer->writeStringValue('publisher', $this->getPublisher());\n $writer->writeIntegerValue('sizeInByte', $this->getSizeInByte());\n $writer->writeStringValue('version', $this->getVersion());\n }", "title": "" }, { "docid": "98482e4f61bf3e134870f899f60513f7", "score": "0.5348608", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeCollectionOfObjectValues('actions', $this->getActions());\n $writer->writeEnumValue('actionSource', $this->getActionSource());\n $writer->writeObjectValue('label', $this->getLabel());\n $writer->writeCollectionOfPrimitiveValues('responsibleSensitiveTypeIds', $this->getResponsibleSensitiveTypeIds());\n }", "title": "" }, { "docid": "98482e4f61bf3e134870f899f60513f7", "score": "0.5348608", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeCollectionOfObjectValues('actions', $this->getActions());\n $writer->writeEnumValue('actionSource', $this->getActionSource());\n $writer->writeObjectValue('label', $this->getLabel());\n $writer->writeCollectionOfPrimitiveValues('responsibleSensitiveTypeIds', $this->getResponsibleSensitiveTypeIds());\n }", "title": "" }, { "docid": "752254bdfd2bacd28e9f5ebeae57b564", "score": "0.534556", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeCollectionOfObjectValues('acceptances', $this->getAcceptances());\n $writer->writeStringValue('displayName', $this->getDisplayName());\n $writer->writeObjectValue('file', $this->getFile());\n $writer->writeCollectionOfObjectValues('files', $this->getFiles());\n $writer->writeBooleanValue('isPerDeviceAcceptanceRequired', $this->getIsPerDeviceAcceptanceRequired());\n $writer->writeBooleanValue('isViewingBeforeAcceptanceRequired', $this->getIsViewingBeforeAcceptanceRequired());\n $writer->writeObjectValue('termsExpiration', $this->getTermsExpiration());\n $writer->writeDateIntervalValue('userReacceptRequiredFrequency', $this->getUserReacceptRequiredFrequency());\n }", "title": "" }, { "docid": "de6edb872578fd1c2fb1aee8756af83d", "score": "0.534533", "text": "public function __toString() {\n\t\t\n\t\t$sOutput = '';\n\t\t\n\t\tif ( $this->_sElem ) {\n\t\t\t$sOutput = sprintf( '<%s', $this->_sElem );\n\t\t}\n\t\t\n\t\t//// add attributes\n\t\t\t\t\n\t\t// integrate special attributes\n\t\tif ( count( $this->_aClass ) > 0 ) {\n\t\t\t$this->_aAtts[ 'class' ] = implode( ' ', $this->_aClass );\n\t\t}\n\t\t\n\t\t// go through attributes and check against valid attributes\n\t\t$aAttFmt = array();\n\t\t$sAtts = '';\n\t\tforeach ( $this->_aAtts as $sAtt => $sValue ) {\n\t\t\tif ( $this->isValidAtt( $sAtt ) ) {\n\t\t\t\t$aAttFmt[] = sprintf( '%s=\"%s\"', $sAtt, htmlspecialchars( $sValue ) );\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ( count( $aAttFmt ) > 0 ) {\n\t\t\t$sAtts = sprintf( ' %s', implode( ' ', $aAttFmt ) );\n\t\t}\n\t\t\n\t\tif ( !$this->_bHasContent ) {\n\t\t\t\n\t\t\t// close the element\n\t\t\t$sOutput .= sprintf( '%s />', $sAtts );\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\tif ( $this->_sElem ) {\n\t\t\t\t$sOutput .= sprintf( '%s>', $sAtts );\n\t\t\t}\n\t\t\t\n\t\t\t//// add content\n\t\t\t$sContent = '';\n\t\t\tforeach ( $this->_aChildren as $oElem ) {\n\t\t\t\t$sContent .= strval( $oElem );\n\t\t\t}\n\t\t\t\n\t\t\t$sOutput .= $sContent;\n\t\t\t\n\t\t\t//// close tag\n\t\t\tif ( $this->_sElem ) {\n\t\t\t\t$sOutput .= sprintf( '</%s>', $this->_sElem );\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn $sOutput;\n\t\t\n\t}", "title": "" }, { "docid": "4a8ad95cd61ddd0e10ea1dabddc46273", "score": "0.5344953", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeStringValue('homeTenantId', $this->getHomeTenantId());\n $writer->writeStringValue('homeTenantName', $this->getHomeTenantName());\n }", "title": "" }, { "docid": "2b6bdb92f0711c0db820c1d96ccb1a52", "score": "0.5330936", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeCollectionOfObjectValues('values', $this->getValues());\n }", "title": "" }, { "docid": "2f79e77320a75ab6841f1fdab0569e2a", "score": "0.5330079", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeCollectionOfPrimitiveValues('bundleIdAccessControlList', $this->getBundleIdAccessControlList());\n $writer->writeCollectionOfObjectValues('configurations', $this->getConfigurations());\n $writer->writeBooleanValue('enableSharedDeviceMode', $this->getEnableSharedDeviceMode());\n }", "title": "" }, { "docid": "1411e5ad213468a3259b40ec90eb7078", "score": "0.5313307", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeStringValue('deviceId', $this->getDeviceId());\n $writer->writeStringValue('errorCode', $this->getErrorCode());\n $writer->writeDateTimeValue('errorDateTime', $this->getErrorDateTime());\n $writer->writeStringValue('errorDescription', $this->getErrorDescription());\n $writer->writeStringValue('recommendedAction', $this->getRecommendedAction());\n $writer->writeStringValue('userId', $this->getUserId());\n }", "title": "" }, { "docid": "f9f86ef833f0ab270f9c919ba43f5b43", "score": "0.5310153", "text": "public function serialize(SerializationWriter $writer): void {\n $writer->writeDateTimeValue('assignedDateTime', $this->getAssignedDateTime());\n $writer->writeStringValue('capabilityStatus', $this->getCapabilityStatus());\n $writer->writeStringValue('@odata.type', $this->getOdataType());\n $writer->writeStringValue('service', $this->getService());\n $writer->writeStringValue('servicePlanId', $this->getServicePlanId());\n $writer->writeAdditionalData($this->getAdditionalData());\n }", "title": "" }, { "docid": "331339f203f5162f983fea91b25b81d2", "score": "0.5308392", "text": "public function write()\n {\n file_put_contents($this->path.$this->name.'.xml',time() + $this->time.PHP_EOL);\n file_put_contents($this->path.$this->name.'.xml',$this->contents,FILE_APPEND);\n }", "title": "" }, { "docid": "efb03c23250cfd4704cf40b06860052e", "score": "0.53018624", "text": "public function serializeToString()\n {\n \\Logger::getLogger(\\get_class($this))->debug(__METHOD__);\n\n return $this->serializeToSimpleXmlElement()->asXML();\n }", "title": "" }, { "docid": "550d39d7cca667bcd3eb55712c57f9cc", "score": "0.5298848", "text": "public function serialize(SerializationWriter $writer): void {\n $writer->writeStringValue('answer', $this->getAnswer());\n $writer->writeEnumValue('answerInputType', $this->getAnswerInputType());\n $writer->writeCollectionOfPrimitiveValues('answerOptions', $this->getAnswerOptions());\n $writer->writeBooleanValue('isRequired', $this->getIsRequired());\n $writer->writeStringValue('@odata.type', $this->getOdataType());\n $writer->writeStringValue('question', $this->getQuestion());\n $writer->writeStringValue('questionId', $this->getQuestionId());\n $writer->writeCollectionOfPrimitiveValues('selectedOptions', $this->getSelectedOptions());\n $writer->writeAdditionalData($this->getAdditionalData());\n }", "title": "" }, { "docid": "5b71b0e368ac6324c4dfa1a6e85ed53b", "score": "0.529816", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeDateTimeValue('lastModifiedDateTime', $this->getLastModifiedDateTime());\n $writer->writeObjectValue('resource', $this->getResource());\n $writer->writeFloatValue('weight', $this->getWeight());\n }", "title": "" }, { "docid": "c624736c1e8834a5931ce1223828e0db", "score": "0.5269337", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeCollectionOfObjectValues('columns', $this->getColumns());\n $writer->writeBooleanValue('highlightFirstColumn', $this->getHighlightFirstColumn());\n $writer->writeBooleanValue('highlightLastColumn', $this->getHighlightLastColumn());\n $writer->writeStringValue('legacyId', $this->getLegacyId());\n $writer->writeStringValue('name', $this->getName());\n $writer->writeCollectionOfObjectValues('rows', $this->getRows());\n $writer->writeBooleanValue('showBandedColumns', $this->getShowBandedColumns());\n $writer->writeBooleanValue('showBandedRows', $this->getShowBandedRows());\n $writer->writeBooleanValue('showFilterButton', $this->getShowFilterButton());\n $writer->writeBooleanValue('showHeaders', $this->getShowHeaders());\n $writer->writeBooleanValue('showTotals', $this->getShowTotals());\n $writer->writeObjectValue('sort', $this->getSort());\n $writer->writeStringValue('style', $this->getStyle());\n $writer->writeObjectValue('worksheet', $this->getWorksheet());\n }", "title": "" }, { "docid": "2999290650c78b040a24457ca882e12f", "score": "0.5263892", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeStringValue('displayName', $this->getDisplayName());\n $writer->writeEnumValue('proficiency', $this->getProficiency());\n $writer->writeEnumValue('reading', $this->getReading());\n $writer->writeEnumValue('spoken', $this->getSpoken());\n $writer->writeStringValue('tag', $this->getTag());\n $writer->writeStringValue('thumbnailUrl', $this->getThumbnailUrl());\n $writer->writeEnumValue('written', $this->getWritten());\n }", "title": "" }, { "docid": "94044bc5647ca5f5d533598c23e3e201", "score": "0.52536994", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeObjectValue('choiceSettingValue', $this->getChoiceSettingValue());\n }", "title": "" }, { "docid": "abf59ce32097b65ba75ba5862f48a2a6", "score": "0.5240565", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeStringValue('action', $this->getAction());\n $writer->writeDateTimeValue('activityDateTime', $this->getActivityDateTime());\n $writer->writeStringValue('changeId', $this->getChangeId());\n $writer->writeStringValue('cycleId', $this->getCycleId());\n $writer->writeIntegerValue('durationInMilliseconds', $this->getDurationInMilliseconds());\n $writer->writeObjectValue('initiatedBy', $this->getInitiatedBy());\n $writer->writeStringValue('jobId', $this->getJobId());\n $writer->writeCollectionOfObjectValues('modifiedProperties', $this->getModifiedProperties());\n $writer->writeEnumValue('provisioningAction', $this->getProvisioningAction());\n $writer->writeObjectValue('provisioningStatusInfo', $this->getProvisioningStatusInfo());\n $writer->writeCollectionOfObjectValues('provisioningSteps', $this->getProvisioningSteps());\n $writer->writeObjectValue('servicePrincipal', $this->getServicePrincipal());\n $writer->writeObjectValue('sourceIdentity', $this->getSourceIdentity());\n $writer->writeObjectValue('sourceSystem', $this->getSourceSystem());\n $writer->writeObjectValue('statusInfo', $this->getStatusInfo());\n $writer->writeObjectValue('targetIdentity', $this->getTargetIdentity());\n $writer->writeObjectValue('targetSystem', $this->getTargetSystem());\n $writer->writeStringValue('tenantId', $this->getTenantId());\n }", "title": "" }, { "docid": "31d51bd070ca50e66970e2f6b7152b7c", "score": "0.52229816", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeStringValue('certificateTemplateName', $this->getCertificateTemplateName());\n $writer->writeStringValue('certificationAuthority', $this->getCertificationAuthority());\n $writer->writeStringValue('certificationAuthorityName', $this->getCertificationAuthorityName());\n $writer->writeCollectionOfObjectValues('managedDeviceCertificateStates', $this->getManagedDeviceCertificateStates());\n $writer->writeStringValue('subjectAlternativeNameFormatString', $this->getSubjectAlternativeNameFormatString());\n }", "title": "" }, { "docid": "1778b70fce57f9723489f7774bcf2909", "score": "0.52201325", "text": "public function serialize(SerializationWriter $writer): void {\n $writer->writeObjectValue('companionAppAllowedState', $this->getCompanionAppAllowedState());\n $writer->writeObjectValue('displayAppInformationRequiredState', $this->getDisplayAppInformationRequiredState());\n $writer->writeObjectValue('displayLocationInformationRequiredState', $this->getDisplayLocationInformationRequiredState());\n $writer->writeObjectValue('numberMatchingRequiredState', $this->getNumberMatchingRequiredState());\n $writer->writeStringValue('@odata.type', $this->getOdataType());\n $writer->writeAdditionalData($this->getAdditionalData());\n }", "title": "" }, { "docid": "ef52e80ae5476b5061debec630af4b9f", "score": "0.5214984", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeBooleanValue('syncCalendar', $this->getSyncCalendar());\n $writer->writeBooleanValue('syncContacts', $this->getSyncContacts());\n $writer->writeBooleanValue('syncTasks', $this->getSyncTasks());\n }", "title": "" }, { "docid": "299f30134c73d8625e31119195c6167e", "score": "0.5213207", "text": "public function serialize(SerializationWriter $writer): void {\n parent::serialize($writer);\n $writer->writeDateTimeValue('startupDateTime', $this->getStartupDateTime());\n }", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "a5074d55e25361cbbc2b14122430247a", "score": "0.0", "text": "public function index()\n {\n return Event::all();\n }", "title": "" } ]
[ { "docid": "1d35b0b22ac44c3da96756e129561d1e", "score": "0.7596523", "text": "protected function listAction()\n {\n $fields = $this->entity['list']['fields'];\n $paginator = $this->findAll($this->entity['class'], $this->request->query->get('page', 1), $this->config['list']['max_results'], $this->request->query->get('sortField'), $this->request->query->get('sortDirection'));\n\n return $this->render('@EasyAdmin/list.html.twig', array(\n 'paginator' => $paginator,\n 'fields' => $fields,\n 'view' => 'list',\n ));\n }", "title": "" }, { "docid": "0da19d65b0ae22a9a9aea8c7d8f9691e", "score": "0.7418999", "text": "public function listAction()\n { $resources = $this->fetchResourcesAndIiifUrls();\n if (!count($resources)) {\n return $this->jsonError(new NotFoundException, \\Laminas\\Http\\Response::STATUS_CODE_404);\n }\n\n $query = $this->params()->fromQuery();\n $version = $this->requestedVersion();\n $currentUrl = $this->url()->fromRoute(null, [], ['query' => $query, 'force_canonical' => true], true);\n\n $iiifCollectionList = $this->viewHelpers()->get('iiifCollectionList');\n try {\n $manifest = $iiifCollectionList($resources, $version, $currentUrl);\n } catch (\\IiifServer\\Iiif\\Exception\\RuntimeException $e) {\n return $this->jsonError($e, \\Laminas\\Http\\Response::STATUS_CODE_400);\n }\n\n return $this->iiifJsonLd($manifest, $version);\n }", "title": "" }, { "docid": "7f885ee63d7fde5e395eeff7eff36f82", "score": "0.7408263", "text": "public function indexAction()\r\n {\r\n $limit = $this->Request()->getParam('limit', 1000);\r\n $offset = $this->Request()->getParam('start', 0);\r\n $sort = $this->Request()->getParam('sort', []);\r\n $filter = $this->Request()->getParam('filter', []);\r\n\r\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\r\n\r\n $this->View()->assign(['success' => true, 'data' => $result]);\r\n }", "title": "" }, { "docid": "5312faff5fa7125f9c939e21e4cc3413", "score": "0.72896063", "text": "public function listAction() {\n // Handle saving of a create/edit first, so it will reflect in the list\n $this->handleSave();\n\n // Process list now\n $this->headings = $this->getListHeadings();\n\n $rows = array();\n if ($this->module) {\n $res = $this->_getApi()->getList($this->module);\n $rows = $this->getListRows($res);\n }\n\n $this->rows = $rows;\n }", "title": "" }, { "docid": "db3decb51890b80d45fe4f716c97523a", "score": "0.7119994", "text": "public function list() {\n\t\t$this->protectIt( 'read' ); \n\t\tsetTitle( 'Listagem' );\n\t\t\n\t\t// Carrega o grid\n\t\tview( 'grid/grid' );\n\t}", "title": "" }, { "docid": "da70bb19a6c8e0562a0e54373a840197", "score": "0.71189886", "text": "public function index()\n {\n $list = $this->resouce->listResource();\n $tree = Helper::menuTree($list, true);\n $list = Helper::multiArrayToOne($tree);\n $this->setResponse($list);\n return $this->response();\n }", "title": "" }, { "docid": "3ebc7b4fb8651186fc87d5fb5cb8b455", "score": "0.7118039", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('VMBResourceBundle:Resource')->findAllByDate();\n\n return $this->render('VMBResourceBundle:Resource:index.html.twig', array(\n 'mainTitle' => $this->get('translator')->trans('resource.browse'),\n\t\t\t'addButtonUrl' => $this->generateUrl('resource_new'),\n 'entities' => $entities\n ));\n }", "title": "" }, { "docid": "405b6604e6bba890cbf7539c671390f5", "score": "0.70984906", "text": "public function list() {\n return $this->render(\"/sandwich/list.html.twig\");\n }", "title": "" }, { "docid": "8abbd6fc2b8eb9c6981a14c1d833bc3f", "score": "0.70859194", "text": "function list() {\n $data = $this->handler->handleList();\n\n $page = new Page(\"Applicants\", \"Applicants\");\n $page->top();\n\n listView($data);\n\n $page->bottom();\n }", "title": "" }, { "docid": "05a3a1abee5cdb637e4ecb2bed78f793", "score": "0.70451564", "text": "public function index() {\n ${$this->resources} = $this->model->orderBy('created_at', 'DESC')\n ->paginate(Variables::get('items_per_page'));\n\n return view($this->view_path . '.index', compact($this->resources));\n }", "title": "" }, { "docid": "abe6de6ae60572e5912b850a19d1d680", "score": "0.703898", "text": "public function actionIndex()\r\n {\r\n $searchModel = new ResourceSearch();\r\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\r\n\r\n return $this->render('index', [\r\n 'searchModel' => $searchModel,\r\n 'dataProvider' => $dataProvider,\r\n ]);\r\n }", "title": "" }, { "docid": "6151a50f557e88b87eb8f70be8393002", "score": "0.70284206", "text": "public function index()\n\t{\n\t\t$resources = Resource::latest()->get();\n\t\treturn view('admin.resources.index', compact('resources'));\n\t}", "title": "" }, { "docid": "6bcdfec0867dafc8b42448cdcf9d2175", "score": "0.7027432", "text": "public function index(){\n $this->show_list();\n }", "title": "" }, { "docid": "6ebebdc63fae4da7ebeb3b9b7f417cd2", "score": "0.7013327", "text": "public function list()\n\t\t{\n\t\t\tglobal $app;\n\t\t\t$sth = $this->PDO->prepare(\"SELECT * FROM cars\");\n\t\t\t$sth->execute();\n\t\t\t$result = $sth->fetchAll(\\PDO::FETCH_ASSOC);\n\t\t\t$app->render('default.php',[\"data\"=>$result],200); \n\t\t}", "title": "" }, { "docid": "f92d52acde121c57bdf5619d33199871", "score": "0.6999621", "text": "public function index()\n {\n $resources = Resource::all();\n return view('resource.index', compact('resources'));\n }", "title": "" }, { "docid": "03aab1a3d0f29df3c9c01f676da4d986", "score": "0.698912", "text": "public function index()\n\t{\n\t\t$this->listing('recent');\n\t}", "title": "" }, { "docid": "613162e5b8bb35685ca245a33b184f09", "score": "0.6918746", "text": "public function index()\n {\n $is_paginated = $this->request->query(\\Config::get('resource.type','resource-type'),'paginated') != 'collection';\n $result = $is_paginated ? $this->_indexPaginate() : $this->_indexCollection() ;\n\n $meta = $this->getMeta($this->resource,$result);\n\n return response()->resource($result,$this->getTransformer(),[ 'message' => $this->getMessage('index'), 'meta' => $meta ]);\n }", "title": "" }, { "docid": "adb2cfce1206f7acf8cb4580fd08df71", "score": "0.69092494", "text": "public function index()\n {\n return DishResource::collection(Dish::paginate());\n }", "title": "" }, { "docid": "79739617940af1c1c53e8d6ecec053f2", "score": "0.6908913", "text": "public function listAction()\n {\n $this->view->pageTitle = \"Document List\";\n \n $service = new App_Service_DocumentService();\n $this->view->docs = $service->getDocuments();\n \n $this->setPartial();\n }", "title": "" }, { "docid": "ce9698986cea138f641a36279605e7e0", "score": "0.6898306", "text": "public function index()\n {\n return InfoResource::collection(Resource::paginate(30));\n }", "title": "" }, { "docid": "35b022b0a4b421fcb5624635dcd9fe8f", "score": "0.6868236", "text": "public function _list()\n\t{\n\t\t_root::getRequest()->setAction('list');\n\n\t\t$oDocModel = new model_doc();\n\t\t$tDocs = $oDocModel->findAll();\n\n\t\t$oView = new _view('docs::list');\n\t\t$oView->tDocs = $tDocs;\n\n\t\t$this->oLayout->add('work', $oView);\n\t}", "title": "" }, { "docid": "30eced964887c2aef75a368b0de6cca4", "score": "0.6837255", "text": "public function index()\n\t{\n // Set the sistema locale configuration.\n $this->set_locale();\n \n\t\t$this->_template(\"{$this->_controller}/list\", $this->_get_assets('list', $this->data));\n }", "title": "" }, { "docid": "f29709817ec3db2d44ad77fdc0a55269", "score": "0.68279153", "text": "public function _index()\n\t{\n\t\t$this->_list();\n\t}", "title": "" }, { "docid": "a050363540859438f2bfba3e253e49b6", "score": "0.68264943", "text": "public function index()\n {\n //\n $resources = Resource::all();\n return view('resources.index', compact('resources'));\n }", "title": "" }, { "docid": "2e1081176934c84955413f91a6d6b5aa", "score": "0.68214476", "text": "public function index()\n\t{\n\t\t$listings = $this->listing->all();\n\n\t\treturn View::make('listings.index', compact('listings'));\n\t}", "title": "" }, { "docid": "e39e490f9dd6d2633e939500f416862a", "score": "0.68191457", "text": "protected function listAction()\n {\n return $this->renderForm('list');\n }", "title": "" }, { "docid": "06d2b70f0a929084bcd3d1ce8021741e", "score": "0.6812902", "text": "public function index()\n {\n $resource = Resource::leftjoin('categories', 'resources.resource_category_id', '=', 'categories.category_id')\n ->leftjoin('sub_categories', 'resources.resource_sub_category_id', '=', 'sub_categories.sub_category_id')\n ->leftjoin('sources', 'resources.resource_source_id', '=', 'sources.source_id')\n ->leftjoin('authors', 'resources.resource_author_id', '=', 'authors.author_id')\n ->orderBy('resources.created_at', 'desc')->get();\n\n $view_data = [\n 'resource' => $resource,\n ];\n\n return view('resource.index', $view_data);\n }", "title": "" }, { "docid": "a07e724e196f9b0fd9d1230bd447f5bf", "score": "0.6810471", "text": "public function index()\n {\n return view('backend.resource.index');\n }", "title": "" }, { "docid": "620b35ada66373ffe1f703e36235dc33", "score": "0.6803154", "text": "public function listAction() {\n\t\t$all = $this->users->findAll();\n\t\t$this->views->add('users/list-all', [\n\t\t\t\t'users' => $all, \n\t\t\t\t'title' => \"Visa alla användare\"\n\t\t\t]);\n\t}", "title": "" }, { "docid": "aa8d3c35a6d3df3c02417b793ad19e32", "score": "0.67996716", "text": "public function actionList() {\r\n\t\t$model = $this->model;\r\n\t\t$items = $model->doList($this->paramsArray);\r\n\t\t$fields = true;\r\n\t\tif (isset($this->paramsArray['fields'])) {\r\n\t\t\t$fields = $this->paramsArray['fields'];\r\n\t\t}\r\n\t\t$itemsAr = ActiveRecord::makeArray($items, $fields);\r\n\t\t$this->respond(200, array(\"result\"=>$itemsAr, \"timestamp\"=>time()));\r\n\t}", "title": "" }, { "docid": "796201f21ca0c2d35a132ef98fbfa143", "score": "0.67937386", "text": "public function listAction()\n {\n $this->init(); // TODO: create a controller listener to call it automatically\n\n $polls = $this->pollEntityRepository->findBy(\n array('published' => true, 'closed' => false),\n array('createdAt' => 'DESC')\n );\n\n return $this->render('PrismPollBundle:Frontend\\Poll:list.html.twig', array(\n 'polls' => $polls\n ));\n }", "title": "" }, { "docid": "09027ea66bbe9d5f56484038f519de35", "score": "0.67874783", "text": "public function index()\n {\n return view('visitor.resources.index', [\n 'resources' => $this->resourceService->all()\n ]);\n }", "title": "" }, { "docid": "1b9b93c758b801d7f44b3b35dcb70a84", "score": "0.67775524", "text": "public function index()\n {\n return RedResponse::success(Todo::getListWithPage($this->requestObj));\n }", "title": "" }, { "docid": "06886aeb949a8582132f62e7cd3ac34f", "score": "0.6776288", "text": "public function actionList()\n {\n $data=array();\n $looks = new Looks('search');\n $looks->unsetAttributes();\n if ( isset($_GET['Looks']) ) {\n $looks->attributes = $_GET['Looks'];\n }\n \n \t\t$users_all = Users::model()->findAll(\"status=:status\", array(':status'=>Users::STATUS_PUBLISH));\n \t\t$data['users'] = CHtml::listData($users_all, 'id', 'fullNameWithId');\n\n \n $this->render('list', array(\n 'model' => $looks,\n 'data'=>$data,\n )); \n }", "title": "" }, { "docid": "f8555ba3dc23008cd0a0c16a4559a6f8", "score": "0.6776143", "text": "public function showAll() {\n echo json_encode([\"MSG\" => $this->rest->showAll(), \"CODE\" => 200]);\n }", "title": "" }, { "docid": "989e888f453ad4e6aca439789fa4e466", "score": "0.6765163", "text": "public function actionList()\n {\n\t\t//$client->connect();\n\t\t\n\t $request = Yii::$app->request;\n\n\t $page = (!empty($request->get('page'))) ? $request->get('page') : 1;\n\n\t $blogService = new BlogService();\n\t $result = $blogService->getList($page);\n\n\t $pages = new Pagination(['totalCount' => $result['total']]);\n\n return $this->render('list', [\n 'models' => $result['blogs'],\n 'pages' => $pages,\n ]);\n }", "title": "" }, { "docid": "39872964f7d5564e8285c3a9fe12f919", "score": "0.67492306", "text": "function index() {\n $this->addBreadcrumb(lang('List'));\n \n $per_page = 10;\n $page = $this->getPaginationPage();\n \n if (!$this->active_category->isNew()) {\n list($files, $pagination) = Files::paginateByCategory($this->active_category, $page, $per_page, STATE_VISIBLE, $this->logged_user->getVisibility());\n } else {\n list($files, $pagination) = Files::paginateByProject($this->active_project, $page, $per_page, STATE_VISIBLE, $this->logged_user->getVisibility());\n } // if\n \n $this->smarty->assign(array(\n 'files' => $files,\n 'pagination' => $pagination,\n 'categories' => Categories::findByModuleSection($this->active_project, 'files', 'files'),\n 'pagination_url' => assemble_url('mobile_access_view_files', array('project_id' => $this->active_project->getId())),\n 'page_back_url' => assemble_url('mobile_access_view_project', array('project_id' => $this->active_project->getId())),\n ));\n }", "title": "" }, { "docid": "92aaa491ca5099382123536e546b9aa3", "score": "0.674686", "text": "public function listAction()\n {\n $article_manager = $this->getDI()->get(\n 'core_article_manager'\n );\n \n // Sisipkan hasil query/find ke dalam variabel articles\n // Secara default, view yang dipanggil adalah Views/Default/article/list.volt\n $this->view->articles = $article_manager->find();\n }", "title": "" }, { "docid": "782e995121f434d308103646571fa51f", "score": "0.6745038", "text": "public function index()\n {\n return Resource::with('location')\n ->orderBy('name')\n ->get();\n }", "title": "" }, { "docid": "b9bc7c6f98f5ba96d276b3ad631acd74", "score": "0.67304873", "text": "public function index()\n {\n $statuses = Status::paginate(10);\n return StatusResource::collection($statuses);\n }", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.6723516", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "244a81dd1c2b337ec541d21216bf2674", "score": "0.67231476", "text": "public function index(Request $request)\n {\n $this->authorize('list', $this->resourceType);\n\n $search = $request->get('q');\n $order = $request->get('order');\n\n $resources = $this->getRepository()->index($search, $order);\n\n return $this->view('index')\n ->with('type', $this->resourceType)\n ->with('instance', $this->instance)\n ->with('resources', $resources);\n }", "title": "" }, { "docid": "df0d6207611fb7003570319e39a4393e", "score": "0.6721086", "text": "public function index()\n {\n $data = Product::paginate(10);\n\t\treturn ProductResource::Collection($data);\n }", "title": "" }, { "docid": "0d8a9aedf606052ab1459ef7661d1186", "score": "0.6716623", "text": "public function index()\n {\n return ItemResource::collection($this->item->list());\n }", "title": "" }, { "docid": "0d159b9b5426dcb31868b3e360075031", "score": "0.6713858", "text": "public function indexAction() {\n\t\t$perpage = $this->perpage;\n\t\t$page = intval($this->getInput('page'));\n\t\t$title = $this->getInput('title');\n\t\t$status = intval($this->getInput('status'));\n\t\tif ($page < 1) $page = 1;\n\t\t\n\t\t$params = array();\n\t\t$search = array();\n\t\tif($title) {\n\t\t\t$search['title'] = $title;\n\t\t\t$params['title'] = array('LIKE', $title);\n\t\t}\n\t\tif($status) {\n\t\t\t$search['status'] = $status;\n\t\t\t$params['status'] = $status - 1;\n\t\t}\n\t\t$params['ad_type'] = $this->ad_type;\n\t list($total, $ads) = Client_Service_Ad::getCanUseAds($page, $perpage, $params);\n\t\t$this->assign('search', $search);\n\t\t$this->assign('ads', $ads);\n\t\t$this->assign('postion', $this->postion);\n\t\t$this->assign('ad_ptype', $this->ad_ptype);\n\t\t$url = $this->actions['listUrl'].'/?' . http_build_query($search) . '&';\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $url));\n\t\t$this->assign(\"total\", $total);\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.6708806", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.6708806", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.6708806", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.6708806", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.6708806", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.6708806", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "1c447ea38f47ee196c9862f06d62be13", "score": "0.66991603", "text": "public function index() {\n // Get all records\n $inventories = Inventory::all();\n // Return a list of inventories as a resource\n return InventoryResource::collection($inventories);\n }", "title": "" }, { "docid": "8232f091751d390d26007fa44c243d15", "score": "0.6695602", "text": "public function ListView()\r\n\t{\r\n\t\t$this->Render();\r\n\t}", "title": "" }, { "docid": "b4a4bae274dd96e096b8b4dd55f07244", "score": "0.66906387", "text": "public function index()\n {\n $listInventory = DB::table('inventory')\n ->join('loker', function ($join) {\n $join->on('inventory.id', '=', 'loker.inventory_id')\n ->where('inventory.status_id', 1);\n })->select('*')->get();\n\n // $listInventory = Inventory::all();\n\n return $this->sendResponse(InventoryResource::collection($listInventory), 'List inventory retrieved successfully.');\n\n // return response(['listInventory' => InventoryResource::collection($listInventory), 'message' => 'Retrieved successfully'], 200);\n\n // return response()->json([\n // 'success' => true,\n // 'message' => 'Inventory List',\n // 'data' => $listInventory\n // ]);\n }", "title": "" }, { "docid": "d22f89e9d6b27f65524503cb66269ec3", "score": "0.66849416", "text": "public function index()\n {\n return StudentResource::collection(Student::paginate());\n }", "title": "" }, { "docid": "d6319a190b91d60006c656ee0a40d758", "score": "0.6684913", "text": "public function index()\n {\n $recipes = Recipe::all();\n return RecipeResource::collection($recipes);\n }", "title": "" }, { "docid": "8c7eaa14947e3fc2a24fd3541c974e98", "score": "0.66804516", "text": "function Index()\r\n\t\t{\r\n\t\t\t$parameters = array('num_rows');\r\n\t\t\t$this->data[$this->name] = $this->controller_model->ListItemsPaged($this->request->get, '', $parameters);\r\n\t\t\t$this->data[num_rows] = $parameters[num_rows];\r\n\t\t}", "title": "" }, { "docid": "dc37386e4ee63037decda6f08247fdd5", "score": "0.66712457", "text": "public function listAction() {\n $id = $this->_getParam('id', null);\n \n $this->view->listname = $id;\n $this->view->tasks = $this->service->getTasksFromList($id);\n }", "title": "" }, { "docid": "145c8599914d7576e7404163ccf8b519", "score": "0.6656833", "text": "public function index()\n {\n $this->data['action_name'] = 'List';\n $this->data['rows'] = $this->crud_model::all();\n return view($this->crud_view . '.index', $this->data);\n }", "title": "" }, { "docid": "e3a22916f65a2ec228b5e3965c154843", "score": "0.66490173", "text": "public function index()\n {\n return ClientResource::collection(Client::paginate(20));\n }", "title": "" }, { "docid": "0fb116b141476b8f916bb11b2f5f58d7", "score": "0.66487056", "text": "public function index()\n {\n $items = Item::paginate();\n\n return $this->sendResponse(new ItemsCollection($items), 'Items retrieved successfully.');\n }", "title": "" }, { "docid": "8d187ee99e2e1fd8633cee90820af4b0", "score": "0.6645784", "text": "protected function run_list() {\n\t\treturn $this->render_template($this->get_template(), ['objects' => $this->get_model()->get()]);\n\t}", "title": "" }, { "docid": "076caa2f864fc2268b0d4d47a19486ab", "score": "0.664311", "text": "public function index()\n {\n return ProductResource::collection(\n Product::paginate(10)\n );\n }", "title": "" }, { "docid": "de506437ae33a70184040846dd276c78", "score": "0.6642667", "text": "public function index(Request $request)\n {\n $this->authorize('viewList', $this->getResourceModel());\n\n $paginatorData = [];\n $perPage = (int) $request->input('per_page', '');\n $perPage = (is_numeric($perPage) && $perPage > 0 && $perPage <= 100) ? $perPage : 15;\n if ($perPage != 15) {\n $paginatorData['per_page'] = $perPage;\n }\n $search = trim($request->input('search', ''));\n if (! empty($search)) {\n $paginatorData['search'] = $search;\n }\n $records = $this->getSearchRecords($request, $perPage, $search);\n $records->appends($paginatorData);\n\n return view($this->filterIndexView('_resources.index'), $this->filterSearchViewData($request, [\n 'records' => $records,\n 'search' => $search,\n 'resourceAlias' => $this->getResourceAlias(),\n 'resourceRoutesAlias' => $this->getResourceRoutesAlias(),\n 'resourceTitle' => $this->getResourceTitle(),\n 'perPage' => $perPage,\n ]));\n }", "title": "" }, { "docid": "22d91bbe1074dab71958a7841af08295", "score": "0.66420954", "text": "public function index()\n {\n $this->global['pageTitle'] = 'List Sparepart - '.APP_NAME;\n $this->global['pageMenu'] = 'List Sparepart';\n $this->global['contentHeader'] = 'List Sparepart';\n $this->global['contentTitle'] = 'List Sparepart';\n $this->global ['role'] = $this->role;\n $this->global ['name'] = $this->name;\n $this->global ['repo'] = $this->repo;\n \n $data['readonly'] = $this->readonly;\n $data['classname'] = $this->cname;\n $data['url_list'] = base_url($this->cname.'/list/json');\n $this->loadViews($this->view_dir.'index', $this->global, $data);\n }", "title": "" }, { "docid": "30e45406c5ee243e6ad94d1aa4cbe67f", "score": "0.6628535", "text": "public function listAction()\n {\n $this->_helper->viewRenderer->setViewSuffix('txt');\n\n $model = new Default_Model_Action();\n $this->view->actions = $model->getAll();\n }", "title": "" }, { "docid": "d0295a3d33fcd89a347becc0a34dbe5c", "score": "0.6627775", "text": "public function index()\n {\n $specializations = Specialization::latest()->paginate(25);\n\n return SpecializationResource::collection($specializations);\n }", "title": "" }, { "docid": "25325ea5baf58fda0bdae7e51324bdd3", "score": "0.66259503", "text": "public function index()\n {\n //get tasks\n $tasks = Task::orderBy('id', 'asc')->paginate(100);\n\n //return the collection of tasks as a resource\n return TaskResource::collection($tasks);\n\n }", "title": "" }, { "docid": "0b40c32743cbb461753992a4b05fa545", "score": "0.66182065", "text": "public function showlist()\n \t{\n \t\t$items = Item::all();\n \t\treturn view('item.list',array('items'=>$items,'page'=>'list'));\n \t}", "title": "" }, { "docid": "8e7a175a1d69fc1e276dbd290552b522", "score": "0.65991837", "text": "public function list(){\n\t\t$this->current->list();\n\t}", "title": "" }, { "docid": "5071a61b8379d3dbc27c9379480e9a8c", "score": "0.65990263", "text": "public function listAction()\n {\n $this->service->setPaginatorOptions($this->getAppSetting('paginator'));\n $page = (int)$this->param($this->view->translate('page'), 1);\n $propertyId = (int)$this->param($this->view->translate('propertyId'));\n $properties =$this->service\n ->retrieveAllPicturesByPropertyId($propertyId, $page);\n $this->view->pictures = $properties;\n $this->view->paginator = $this->service->getPaginator($page);\n $this->view->propertyId = $propertyId;\n }", "title": "" }, { "docid": "8aabf1b98b72ec9ef7738f5deae5172d", "score": "0.6596813", "text": "public function index()\n {\n return EntryResource::collection(Entry::all());\n //return AnswersResource::collection(Answer::all());\n }", "title": "" }, { "docid": "726d3e7e355e4d0b3bbadd1f2237a742", "score": "0.659275", "text": "public function overviewAction()\n\t{\n\t\t$subSiteKey = '*';\n\t\tif (Site::isSiteRequest()) {\n\t\t\t$subSiteKey = Site::getCurrentSite()->getRootDocument()->getKey();\n\t\t}\n\t\t$language = $this->language;\n\n\t\t// Retrieve items from object list\n\t\t$newsList = new Object_Vacancy_List();\n\t\t$newsList->setOrderKey(\"date\");\n\t\t$newsList->setOrder(\"desc\");\n\t\t$newsList->setLocale($language);\n\t\tif (Site::isSiteRequest()) {\n\t\t\t$newsList->setCondition('subsites LIKE ? AND title != \"\"', '%' . $subSiteKey . '%');\n\t\t}\n\n\t\t$paginator = Zend_Paginator::factory($newsList);\n\t\t$paginator->setCurrentPageNumber($this->_getParam('page', 1));\n\t\t$paginator->setItemCountPerPage(10);\n\t\t$this->view->paginator = $paginator;\n\t}", "title": "" }, { "docid": "110b54105de1a0ec45cec206dbc35c67", "score": "0.65853333", "text": "public function index()\n {\n // needs to return multiple articles\n // so we use the collection method\n return TaskListResource::collection(Task::all());\n }", "title": "" }, { "docid": "b81dd94e271b0c84cd548a81ec7d984f", "score": "0.65751404", "text": "public function listAction()\n {\n if ($this->settings['listtype'] === 'x') {\n $projects = $this->projectRepostitory->findAll();\n } else {\n $projects = $this->projectRepostitory->findByStatus($this->settings['listtype']);\n }\n\n $this->view->assign('projects', $projects);\n }", "title": "" }, { "docid": "8668ccc17814e06acdd730ecc3fa0dd2", "score": "0.65750146", "text": "public function indexAction() {\r\n\t\t$page = intval($this->getInput('page'));\r\n\t\t$perpage = $this->perpage;\r\n\t\t\r\n\t\tlist($total, $result) = Activity_Service_Fanli::getList($page, $perpage);\r\n\t\t\r\n\t\t$this->assign('result', $result);\r\n\t\t$this->cookieParams();\r\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl']));\r\n\t}", "title": "" }, { "docid": "c192cad1748d0fe11000b8d2063a908e", "score": "0.6563124", "text": "public function index()\n {\n return $this->view('lists');\n }", "title": "" }, { "docid": "c192cad1748d0fe11000b8d2063a908e", "score": "0.6563124", "text": "public function index()\n {\n return $this->view('lists');\n }", "title": "" }, { "docid": "bf0537679d083764e7d496b7e9f333b7", "score": "0.6550742", "text": "public function index(): View\n {\n $items = QueryBuilder::for(Resource::class)\n ->allowedFilters([\n 'name',\n 'is_facility',\n 'categories.id',\n 'groups.id',\n AllowedFilter::scope('flags', 'currentStatus'),\n ])\n ->defaultSort('name')\n ->allowedSorts(['name', 'description', 'is_facility'])\n ->paginate(15);\n\n $filterCategories = Category::orderBy('name')->pluck('name', 'id');\n $filterGroups = Group::orderBy('name')->pluck('name', 'id');\n $filterFlags = Flag::pluck('name', 'abbr');\n\n return view('resources.index')->with(compact([\n 'items',\n 'filterCategories',\n 'filterGroups',\n 'filterFlags',\n ]));\n }", "title": "" }, { "docid": "ed961c9f0fcb9ad07a48b882d9df24ad", "score": "0.6540003", "text": "public function index()\n\t{\n\t\t$subResourceDetailLikes = $this->subResourceDetailLikeRepository->paginate(10);\n\n\t\treturn view('subResourceDetailLikes.index')\n\t\t\t->with('subResourceDetailLikes', $subResourceDetailLikes);\n\t}", "title": "" }, { "docid": "3cf2644fce763701f59cab74b93915e2", "score": "0.6538733", "text": "public function indexAction() {\n\t\t$request = $this->getRequest();\n\t\t$params = $request->getParams();\n\n\t\t$list = new List8D_Model_List;\n\t\t$list = $list->getById(1);\n\t\t\n\t\t$acl = new List8D_ACL;\n\t\t$this->view->list = $list;\n\t\t$this->view->aclresult = $acl->checkListACL($list);\n\n\t}", "title": "" }, { "docid": "f1ecf3ea6ca691d8230bfd5de1a0c2bc", "score": "0.6536342", "text": "public function index()\n\t{\n\t\t$view = $this->start_view($this->section_url.'/be/list');\n\t\t\n\t\t// Type\n\t\tif($this->input->get('type') !== false && array_key_exists($this->input->get('type'),Kohana::config('example_3.types'))){\n\t\t\t$type = $this->input->get('type');\n\t\t} else {\n\t\t\t$type = 1;\n\t\t}\n\t\t\n\t\tlist($pagination, $data) = $this->list_data($type);\n\t\t\n\t\t$view->set_global('data', $data);\n\t\t$view->set_global('pagination', $pagination);\n\t\t\n\t\t// Set general info\n\t\t$view->set_global($this->section_details());\n\t\t\n\t\t// Type tab override\n\t\t$view->set_global('active_tab',$type);\n\t\t\n\t\t// Set Breadcrumb items\n\t\t$view->breadcrumbs = array(\n\t\t\t$this->section_url => $this->section_name,\n\t\t\t'' => 'Listing'\n\t\t);\n\t\t\n\t\t$this->render_view($view);\n\t}", "title": "" }, { "docid": "f1673a17c984cf24b6d574aa7a325e35", "score": "0.6533108", "text": "public function index()\n {\n return FlightResource::collection(Flight::paginate(15));\n }", "title": "" }, { "docid": "14cbe87d366063edc7062faf79058bc0", "score": "0.6532565", "text": "public function index()\n {\n return $this->response->paginator(Viewer::orderBy('id', 'desc')->paginate(10), new ViewerTransformer);\n }", "title": "" }, { "docid": "a29a971d51fcb42465841db6bd2a38ad", "score": "0.65312624", "text": "public function viewList() {\n\n\t\t$context = (isset($this->options['list_type'])) ? $this->options['list_type'] : 'list';\n\n\t\telgg_push_context($context);\n\n\t\t$items = $this->getItems();\n\t\t$options = $this->getOptions();\n\t\t$count = $this->getCount();\n\n\t\t$offset = elgg_extract('offset', $options);\n\t\t$limit = elgg_extract('limit', $options);\n\t\t$base_url = elgg_extract('base_url', $options, '');\n\t\t$pagination = elgg_extract('pagination', $options, true);\n\t\t$offset_key = elgg_extract('offset_key', $options, 'offset');\n\t\t$position = elgg_extract('position', $options, 'after');\n\n\t\tif ($pagination && $count) {\n\t\t\t$nav = elgg_view('navigation/pagination', array(\n\t\t\t\t'base_url' => $base_url,\n\t\t\t\t'offset' => $offset,\n\t\t\t\t'count' => $count,\n\t\t\t\t'limit' => $limit,\n\t\t\t\t'offset_key' => $offset_key,\n\t\t\t));\n\t\t}\n\n\t\t$html .= '<div class=\"elgg-list-container\">';\n\n\t\tif ($position == 'before' || $position == 'both') {\n\t\t\t$html .= $nav;\n\t\t}\n\n\t\t$list_attrs = elgg_format_attributes($this->getListAttributes());\n\n\t\t$html .= \"<ul $list_attrs>\";\n\n\t\tforeach ($items as $item) {\n\n\t\t\t$view = elgg_view_list_item($item, $options);\n\n\t\t\tif (!$view) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$has_items = true;\n\n\t\t\t$item_attrs = elgg_format_attributes($this->getItemAttributes($item));\n\n\t\t\t$html .= \"<li $item_attrs>$view</li>\";\n\t\t}\n\n\t\tif (!$has_items) {\n\t\t\t$html .= '<li class=\"elgg-list-placeholder\">' . elgg_echo('list:empty') . '</li>';\n\t\t}\n\n\t\t$html .= '</ul>';\n\n\t\tif ($position == 'after' || $position == 'both') {\n\t\t\t$html .= $nav;\n\t\t}\n\n\t\t$html .= '</div>';\n\n\t\telgg_pop_context();\n\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "eb4bc3428c5096a035b8d71351d4f9c3", "score": "0.6530049", "text": "public function index()\n {\n //\n $units = Unit::paginate(10);\n return UnitResource::collection($units);\n }", "title": "" }, { "docid": "1e991a3059ff8a7aa8b4543e6d5ec071", "score": "0.65265703", "text": "public function index()\n {\n $data['resources'] = CarModel::paginate($this->paginate_by);\n return view($this->base_view_path.'index', $data);\n }", "title": "" }, { "docid": "f504aa8b0d4e26dbe40f10d29efd07da", "score": "0.65209836", "text": "public function index()\n {\n return $this->collection(\n $this->repository->all()\n );\n }", "title": "" }, { "docid": "0aefb1879ed86536b4b0301bdcb431fb", "score": "0.6520495", "text": "public function indexAction() {\r\n\t\t$page = intval($this->getInput('page'));\r\n\t\t$ad_type = $this->getInput('ad_type');\r\n\t\t\r\n\t\t$perpage = $this->perpage;\r\n\t\t\r\n\t\t$search = array();\r\n\t\tif ($ad_type) $search['ad_type'] = $ad_type;\r\n\t\tlist($total, $ads) = Gou_Service_Ad::getList($page, $perpage, $search);\r\n\t\t$this->assign('ad_types', $this->ad_types);\r\n\t\t\r\n\t\t$this->assign('search', $search);\r\n\t\t$this->assign('ads', $ads);\r\n\t\t$this->cookieParams();\r\n\t\t$url = $this->actions['listUrl'].'/?' . http_build_query($search) . '&';\r\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $url));\r\n\t}", "title": "" }, { "docid": "84219766af32e7ff206e88dffca57430", "score": "0.6515992", "text": "public function index()\n {\n try {\n return $this->resp->ok(eRespCode::CAT_LISTED_200_00, new CategoryResourceCollection($this->categoryService->getAll()));\n } catch (Throwable $th) {\n Log::info($th);\n return $this->resp->guessResponse(eRespCode::_500_INTERNAL_ERROR);\n }\n }", "title": "" }, { "docid": "5439447ac88f8cc98dc7832990b07305", "score": "0.6512933", "text": "public function indexAction()\n {\n $this->display();\n\n }", "title": "" }, { "docid": "93a7ba35330c263ce449589f25157263", "score": "0.6512549", "text": "public function index()\n {\n $todos = Todo::latest()->get();\n return (new TodoResourceCollection($todos));\n }", "title": "" }, { "docid": "2277c0665c4148cb55e2e8ca37774962", "score": "0.65113294", "text": "public function index()\n {\n return ProductResource::collection(Product::paginate(20));\n }", "title": "" }, { "docid": "e1183ebde99a8d3c589ddd34164e88f0", "score": "0.6510991", "text": "public function index() {\n\t\t$this->all();\n\t}", "title": "" }, { "docid": "b04a0cb3fd073d7067244a0fe69ce396", "score": "0.6509714", "text": "public function index()\n {\n //get movies\n $movies = MoviesModel::paginate(10);\n\n //return collection of article as a resource\n return MoviesResource::collection($movies);\n }", "title": "" }, { "docid": "021eb06ebdab9fb37e6b65a67751a381", "score": "0.64969635", "text": "public function listData()\n {\n $catalog = DB::table($this->screen)->where('IsActive', '1')->paginate(15);\n\n $data['catalog'] = $catalog;\n return view('catalog.index', $data);\n }", "title": "" }, { "docid": "cbfc279e9e82aba8cb2814815737b9eb", "score": "0.6495653", "text": "public function listAction() {\n $users = $this->userRepository->findAll();\n $this->view->assign('users', $users);\n $this->view->render();\n }", "title": "" }, { "docid": "c0ac6b16fca466eabec5fae9f571583e", "score": "0.64926547", "text": "public function actionList() {\n\t\t$id = isset($_GET['id'])? $_GET['id'] : 'all';\n\n\t\tif(is_numeric($id))\n\t\t\t$list = CActiveRecord::model('X2List')->findByPk($id);\n\t\t\t\n\t\tif(isset($list)) {\n\t\t\t$model = new Contacts('search');\n\t\t\t$model->setRememberScenario('contacts-list-'.$id);\n\t\t\t//set this as the list we are viewing, for use by vcr controls\n\t\t\tYii::app()->user->setState('contacts-list', $id);\n\t\t\t$dataProvider = $model->searchList($id);\n\t\t\t$list->count = $dataProvider->totalItemCount;\n\t\t\t$list->save();\n\t\t\t\n\t\t\t$this->render('list',array(\n\t\t\t\t'listModel'=>$list,\n\t\t\t\t// 'listName'=>$list->name,\n\t\t\t\t// 'listId'=>$id,\n\t\t\t\t'dataProvider'=>$dataProvider,\n\t\t\t\t'model'=>$model,\n\t\t\t));\n\t\t\t\n\t\t} else {\n\t\t\tif($id == 'my')\n\t\t\t\t$this->redirect(array('/contacts/myContacts'));\n\t\t\t\t// $dataProvider = CActiveRecord::model('Contacts')->searchAll();\n\t\t\telseif($id == 'new')\n\t\t\t\t$this->redirect(array('/contacts/newContacts'));\n\t\t\t\t// $dataProvider = CActiveRecord::model('Contacts')->searchAll();\n\t\t\telse\n\t\t\t\t$this->redirect(array('/contacts/allContacts'));\n\t\t}\n\t}", "title": "" }, { "docid": "005629388e14797f6fdbc0ea8785e7ac", "score": "0.6487256", "text": "public function index()\n {\n $Products = products::orderby('created_at','desc')->paginate(40);\n return ProductsResource::collection($Products);\n }", "title": "" }, { "docid": "3e2e5ecfe76abe9cd2482096fab1fab6", "score": "0.648447", "text": "public function index()\n {\n //\n $response = $this->rest->all();\n return $this->response(\n \"Menus Successfully Fetched.\",\n $response,\n Response::HTTP_OK\n );\n }", "title": "" }, { "docid": "54386e6f93fa46cdb232c28e7cfdf6fe", "score": "0.64841735", "text": "public function listResources() {\n // Get the list of enabled and disabled resources.\n $config = $this->resourceConfigStorage->loadMultiple();\n\n // Strip out the nested method configuration, we are only interested in the\n // plugin IDs of the resources.\n $enabled_resources = array_combine(array_keys($config), array_keys($config));\n $available_resources = ['enabled' => [], 'disabled' => []];\n $resources = $this->resourcePluginManager->getDefinitions();\n foreach ($resources as $id => $resource) {\n $key = $this->getResourceKey($id);\n $status = (in_array($key, $enabled_resources) && $config[$key]->status()) ? 'enabled' : 'disabled';\n $available_resources[$status][$id] = $resource;\n }\n\n // Sort the list of resources by label.\n $sort_resources = function ($resource_a, $resource_b) {\n return strcmp($resource_a['label'], $resource_b['label']);\n };\n if (!empty($available_resources['enabled'])) {\n uasort($available_resources['enabled'], $sort_resources);\n }\n if (!empty($available_resources['disabled'])) {\n uasort($available_resources['disabled'], $sort_resources);\n }\n\n // Heading.\n $list['resources_title'] = [\n '#markup' => '<h2>' . $this->t('REST resources') . '</h2>',\n ];\n $list['resources_help'] = [\n '#markup' => '<p>' . $this->t('Here you can enable and disable available resources. Once a resource has been enabled, you can restrict its formats and authentication by clicking on its \"Edit\" link.') . '</p>',\n ];\n $list['enabled']['heading']['#markup'] = '<h2>' . $this->t('Enabled') . '</h2>';\n $list['disabled']['heading']['#markup'] = '<h2>' . $this->t('Disabled') . '</h2>';\n\n // List of resources.\n foreach (['enabled', 'disabled'] as $status) {\n $list[$status]['#type'] = 'container';\n $list[$status]['#attributes'] = ['class' => ['rest-ui-list-section', $status]];\n $list[$status]['table'] = [\n '#theme' => 'table',\n '#header' => [\n 'resource_name' => [\n 'data' => $this->t('Resource name'),\n 'class' => ['rest-ui-name'],\n ],\n 'path' => [\n 'data' => $this->t('Path'),\n 'class' => ['views-ui-path'],\n ],\n 'description' => [\n 'data' => $this->t('Description'),\n 'class' => ['rest-ui-description'],\n ],\n 'operations' => [\n 'data' => $this->t('Operations'),\n 'class' => ['rest-ui-operations'],\n ],\n ],\n '#rows' => [],\n ];\n foreach ($available_resources[$status] as $id => $resource) {\n $canonical_uri_path = !empty($resource['uri_paths']['canonical'])\n ? $resource['uri_paths']['canonical']\n : FALSE;\n\n // @see https://www.drupal.org/node/2737401\n // @todo Remove this in Drupal 9.0.0.\n $old_create_uri_path = !empty($resource['uri_paths']['https://www.drupal.org/link-relations/create'])\n ? $resource['uri_paths']['https://www.drupal.org/link-relations/create']\n : FALSE;\n $new_create_uri_path = !empty($resource['uri_paths']['create'])\n ? $resource['uri_paths']['create']\n : FALSE;\n $create_uri_path = $new_create_uri_path ?: $old_create_uri_path;\n\n $available_methods = array_intersect(array_map('strtoupper', get_class_methods($resource['class'])), [\n 'HEAD',\n 'GET',\n 'POST',\n 'PUT',\n 'DELETE',\n 'TRACE',\n 'OPTIONS',\n 'CONNECT',\n 'PATCH',\n ]);\n\n // @todo Remove this when https://www.drupal.org/node/2300677 is fixed.\n $is_config_entity = isset($resource['serialization_class']) && is_subclass_of($resource['serialization_class'], ConfigEntityInterface::class, TRUE);\n if ($is_config_entity) {\n $available_methods = array_diff($available_methods, ['POST', 'PATCH', 'DELETE']);\n $create_uri_path = FALSE;\n }\n\n // Now calculate the configured methods: if a RestResourceConfig entity\n // exists for this @RestResource plugin, then regardless of whether that\n // configuration is enabled or not, inspect its enabled methods. Strike\n // through all disabled methods, so that it's clearly conveyed in the UI\n // which methods are supported on which URL, but may be disabled.\n if (isset($config[$this->getResourceKey($id)])) {\n $enabled_methods = $config[$this->getResourceKey($id)]->getMethods();\n $disabled_methods = array_diff($available_methods, $enabled_methods);\n $configured_methods = array_merge(\n array_intersect($available_methods, $enabled_methods),\n array_map(function ($method) {\n return \"<del>$method</del>\";\n }, $disabled_methods)\n );\n }\n else {\n $configured_methods = $available_methods;\n }\n\n // All necessary information is collected, now generate some HTML.\n $canonical_methods = implode(', ', array_diff($configured_methods, ['POST']));\n if ($canonical_uri_path && $create_uri_path) {\n $uri_paths = \"<code>$canonical_uri_path</code>: $canonical_methods\";\n $uri_paths .= \"</br><code>$create_uri_path</code>: POST\";\n }\n else {\n if ($canonical_uri_path) {\n $uri_paths = \"<code>$canonical_uri_path</code>: $canonical_methods\";\n }\n else {\n $uri_paths = \"<code>$create_uri_path</code>: POST\";\n }\n }\n\n $list[$status]['table']['#rows'][$id] = [\n 'data' => [\n 'name' => !$is_config_entity ? $resource['label'] : $this->t('@label <sup>(read-only)</sup>', ['@label' => $resource['label']]),\n 'path' => [\n 'data' => [\n '#type' => 'inline_template',\n '#template' => $uri_paths,\n ],\n ],\n 'description' => [],\n 'operations' => [],\n ],\n ];\n\n if ($status == 'disabled') {\n $list[$status]['table']['#rows'][$id]['data']['operations']['data'] = [\n '#type' => 'operations',\n '#links' => [\n 'enable' => [\n 'title' => $this->t('Enable'),\n 'url' => Url::fromRoute('restui.edit', ['resource_id' => $id]),\n ],\n ],\n ];\n }\n else {\n $list[$status]['table']['#rows'][$id]['data']['operations']['data'] = [\n '#type' => 'operations',\n '#links' => [\n 'edit' => [\n 'title' => $this->t('Edit'),\n 'url' => Url::fromRoute('restui.edit', ['resource_id' => $id]),\n\n ],\n 'disable' => [\n 'title' => $this->t('Disable'),\n 'url' => Url::fromRoute('restui.disable', ['resource_id' => $id]),\n ],\n 'permissions' => [\n 'title' => $this->t('Permissions'),\n 'url' => Url::fromRoute('user.admin_permissions', [], ['fragment' => 'module-rest']),\n ],\n ],\n ];\n\n $list[$status]['table']['#rows'][$id]['data']['description']['data'] = [\n '#theme' => 'restui_resource_info',\n '#granularity' => $config[$this->getResourceKey($id)]->get('granularity'),\n '#configuration' => $config[$this->getResourceKey($id)]->get('configuration'),\n ];\n }\n }\n }\n\n $list['enabled']['table']['#empty'] = $this->t('There are no enabled resources.');\n $list['disabled']['table']['#empty'] = $this->t('There are no disabled resources.');\n $list['#title'] = $this->t('REST resources');\n return $list;\n }", "title": "" } ]
8d6ceaa7e77b56d0da8b082a6039a104
Get Methods Set Methods
[ { "docid": "6171d5f1ec5234ef06a1b524b134cdad", "score": "0.0", "text": "function setName ($in) {\n $this->name = $in;\n }", "title": "" } ]
[ { "docid": "afde22608038125e1e7b337257449a06", "score": "0.7869939", "text": "public function getMethods();", "title": "" }, { "docid": "3103bd5f7248ade8b2895295a5273a34", "score": "0.7805014", "text": "public function getMethods(): MethodsCollection;", "title": "" }, { "docid": "6e1d7ffe3b85d62299c350d4a3060dbb", "score": "0.7646713", "text": "public function getMethods() : array;", "title": "" }, { "docid": "10fd869cfdaf41d29b13d60aaa8199e0", "score": "0.75839037", "text": "public function getMethods() {\n\t\treturn $this->methods;\n\t}", "title": "" }, { "docid": "10fd869cfdaf41d29b13d60aaa8199e0", "score": "0.75839037", "text": "public function getMethods() {\n\t\treturn $this->methods;\n\t}", "title": "" }, { "docid": "969c8baada75826a7bdbe0830a286f74", "score": "0.7583201", "text": "public function getMethods()\n {\n return $this->methods;\n }", "title": "" }, { "docid": "111ccf366abad4be8d58bcbd37fa1f7d", "score": "0.75830305", "text": "public function getMethods()\n\t{\n\t\treturn $this->methods;\n\t}", "title": "" }, { "docid": "5dba675a101d21697c65e847af8042f0", "score": "0.75752926", "text": "public function getMethods()\n {\n return $this->methods;\n }", "title": "" }, { "docid": "5dba675a101d21697c65e847af8042f0", "score": "0.75752926", "text": "public function getMethods()\n {\n return $this->methods;\n }", "title": "" }, { "docid": "5dba675a101d21697c65e847af8042f0", "score": "0.75752926", "text": "public function getMethods()\n {\n return $this->methods;\n }", "title": "" }, { "docid": "5dba675a101d21697c65e847af8042f0", "score": "0.75752926", "text": "public function getMethods()\n {\n return $this->methods;\n }", "title": "" }, { "docid": "5dba675a101d21697c65e847af8042f0", "score": "0.75752926", "text": "public function getMethods()\n {\n return $this->methods;\n }", "title": "" }, { "docid": "9b7f063aaae799b4e99af26a890e23c7", "score": "0.75405437", "text": "public function getMethods() {\n return $this->methods;\n }", "title": "" }, { "docid": "273bf9051de7b48a2427aea9b710cd7d", "score": "0.74368733", "text": "protected function Get_AvailableMethods()\n\t{\n\t\t/*\n\t\t * these functions are identical;\n\t\t * difference in name is only for purpose of \"humanising\";\n\t\t * but you can use any of them without regard of this\n\t\t */\n\t\t$this -> Methods['Set_Name'] = array( 'Set_Value', '%s' );\n\t\t$this -> Methods['Set_Value'] = array( 'Set_Value', '%s' );\n\t\t$this -> Methods['Set_Part'] = array( 'Set_Value', '%s' );\n\t\t/*\n\t\t * these is mirror function for Set_ExportWay\n\t\t */\n\t\t$this -> Methods['Set_ExportWay'] = array( 'Set_ExportWay', MethodScope::Get_ParameterDefaultValue('JaSC\\CodeGenerator', 'Set_ExportWay') );\n\t\t/*\n\t\t * this is mirror function for Set_Comment\n\t\t */\n\t\t$this -> Methods['Set_Comment'] = array( 'Set_Comment', '', MethodScope::Get_ParameterDefaultValue('JaSC\\CodeGenerator', 'Set_Comment', 1) );\n\n\t\t/*\n\t\t * prepares set of supported functions\n\t\t */\n\t\tforeach( ClassScope::Get_Interfaces('JaSC\\I_JaSC_Union') as $Interface )\n\t\t{\n\t\t\tforeach( ClassScope::Get_ConstantsNames($Interface) as $Constant )\n\t\t\t{\n\t\t\t\t$this -> Methods['Set_'.ucfirst(strtolower(explode('_', $Constant)[2]))] = array( 'Set_'.implode('', str_split(explode('_', $Interface)[2])), ClassScope::Get_ConstantValue($Interface, $Constant) );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "1ccec9779398a6dd37396b68866d3545", "score": "0.7432594", "text": "public static function getMethods() {\n return self::$methods;\n }", "title": "" }, { "docid": "c8ed38cf0d48bce8aeac864a620ca7a6", "score": "0.7374572", "text": "function methods() {\n\t\treturn $this->__methods;\n\t}", "title": "" }, { "docid": "75ebcf9e130882ee7e87c79fb8be88ff", "score": "0.7367062", "text": "public function getMethods(): array\n\t{\n\t\treturn $this->methods;\n\t}", "title": "" }, { "docid": "cae6a65a76664a8deb3757a3745a63f0", "score": "0.73365283", "text": "public function getMethods(): array\n {\n return $this->methods;\n }", "title": "" }, { "docid": "cae6a65a76664a8deb3757a3745a63f0", "score": "0.73365283", "text": "public function getMethods(): array\n {\n return $this->methods;\n }", "title": "" }, { "docid": "cae6a65a76664a8deb3757a3745a63f0", "score": "0.73365283", "text": "public function getMethods(): array\n {\n return $this->methods;\n }", "title": "" }, { "docid": "1743975ffb4efdfc0f5c19e4a54586ec", "score": "0.73023164", "text": "public function methods(): array;", "title": "" }, { "docid": "7849594b9cfa9bf3324e1d4d0cf1b644", "score": "0.72985333", "text": "public function getMethods() : array\n {\n return [];\n }", "title": "" }, { "docid": "77b6862eb7b0d61d56aa97e09cf28c55", "score": "0.7204818", "text": "public function getMethods()\n {\n// if ($isSearch)\n// return array();\n \n \n // class names. order defines the position in the dropdown\n $methods = array(\n 'new', \n 'saving',\n 'bestselling', \n 'mostviewed', \n 'toprated', \n 'commented', \n 'wished',\n 'qty',\n 'profit',\n 'revenue',\n 'revenueview',\n 'orderview',\n ); \n\n return $methods;\n }", "title": "" }, { "docid": "5bb4d6d4ec8837f6180e37bf64977a70", "score": "0.7136652", "text": "public function getMethods()\n\t{\n\t\treturn ['GET'];\n\t}", "title": "" }, { "docid": "d14710c53d78856873062e35246fd084", "score": "0.7096594", "text": "public function getMethods()\n {\n return array(\n \"NConceptExtractor\" => 1,\n \"NFinder\" => 1,\n \"NCategorizer\" => 1,\n \"NSummarizer\" => 1,\n \"NSentiment\" => 1,\n \"NLikeThis_Compare\" => 1,\n \"NLikeThis_Index\" => 1,\n \"NLikeThis_Delete\" => 1\n );\n }", "title": "" }, { "docid": "44b31009d228611ea606eac4ff6e0f4e", "score": "0.7037754", "text": "protected function getAllowedMethods() {\n\n $methods = array('options','get','head','delete','trace','propfind','mkcol','put','proppatch','copy','move','report');\n return $methods;\n\n }", "title": "" }, { "docid": "8b42554577acaf6db87972c2c3da982f", "score": "0.69882506", "text": "public function all()\n {\n return $this->methods;\n }", "title": "" }, { "docid": "8b42554577acaf6db87972c2c3da982f", "score": "0.69882506", "text": "public function all()\n {\n return $this->methods;\n }", "title": "" }, { "docid": "a4376a5c7d0a7289992c0984bf2c410a", "score": "0.69870865", "text": "function get_methods() {\n\t\treturn get_class_methods($this);\n\t\t\n\t}", "title": "" }, { "docid": "800567413fbcb0d0f02253c05599b452", "score": "0.69549954", "text": "public function getMethods() {\n\t\tif (!empty($this->_methods)) {\n\t\t\treturn $this->_methods;\n\t\t}\n\n\t\tif (empty($this->_formMethods)) {\n\t\t\tforeach (get_class_methods($this->_form) as $method) {\n\t\t\t\t$this->_formMethods[strtolower($method)] = array($this->_form, $method);\n\t\t\t}\n\t\t}\n\n\t\t$methods = $this->_formMethods;\n\n\t\treturn $this->_methods = $methods;\n\t}", "title": "" }, { "docid": "aac8f5507d2e64be90eff72195bc38d1", "score": "0.6940776", "text": "public function methods(): array\n {\n return [\n 'getKey',\n 'url',\n 'urlTemp',\n ];\n }", "title": "" }, { "docid": "5260076b451cdacb7593ae13dd4ff386", "score": "0.69370854", "text": "private function getMethods() {\n $tokenizer = new Tokenizer();\n\n $meths=[];\n /**\n * public function GetProductInfo\n */\n $parameters1 = [\n Parameter::fromTokens($tokenizer->lex('string $productCode')),\n Parameter::fromTokens($tokenizer->lex('string $languageCode'))\n ];\n $return1 = Parameter::fromTokens($tokenizer->lex('string $Result'));\n $meths[] = new Method('GetProductInfo', $parameters1, $return1);\n /**\n * public function CallSaleProvider\n *\n */\n\n $parameters2 = [\n Parameter::fromTokens($tokenizer->lex('string $productCode')),\n Parameter::fromTokens($tokenizer->lex('int $Amount')),\n Parameter::fromTokens($tokenizer->lex('string $CellNumber')),\n Parameter::fromTokens($tokenizer->lex('long $SEPId')),\n Parameter::fromTokens($tokenizer->lex('string $languageCode'))\n ];\n $return2 = Parameter::fromTokens($tokenizer->lex('string $Result'));\n $meths[] = new Method('CallSaleProvider', $parameters2, $return2);\n /*\n * public function ExecSaleProvider\n */\n\n $parameters3 = [Parameter::fromTokens($tokenizer->lex('string $ProviderID'))];\n $return3 = Parameter::fromTokens($tokenizer->lex('string $Result'));\n $meths[] = new Method('ExecSaleProvider', $parameters3, $return3);\n\n /**\n * public function CheckStatus\n */\n $parameters4 = [Parameter::fromTokens($tokenizer->lex('string $ProviderID'))];\n $return4 = Parameter::fromTokens($tokenizer->lex('string $Result'));\n $meths[] = new Method('CheckStatus', $parameters4, $return4);\n\n return $meths;\n }", "title": "" }, { "docid": "6cbae11b4142a826056015394c2e74af", "score": "0.69182706", "text": "#[Pure] public function getRequestMethods(): array;", "title": "" }, { "docid": "c49b5bfa20d7966bf28adf1def6d9249", "score": "0.68709207", "text": "private function _getMethods() {\n\t\treturn new ImmutableContainer($this->_reflect()->getMethods());\n\t}", "title": "" }, { "docid": "d9f9dbe22dd8ab5d9c634f5bae79724c", "score": "0.6832155", "text": "public function setMethods($methods);", "title": "" }, { "docid": "432f9a534fc60ca472e4479d52a965bf", "score": "0.68217975", "text": "public function methods()\n {\n if (! isset($this->_links->methods->href)) {\n return new MethodCollection(0, null);\n }\n\n $result = $this->client->performHttpCallToFullUrl(MollieApiClient::HTTP_GET, $this->_links->methods->href);\n\n return ResourceFactory::createCursorResourceCollection(\n $this->client,\n $result->_embedded->methods,\n Method::class,\n $result->_links\n );\n }", "title": "" }, { "docid": "e4f5758d80ca7130cd065dbefcc1e4f2", "score": "0.6813772", "text": "function rpcMethods(){\n \t\n \t$methods = array(\n \t\t'ping' => true,\n \t\t'query' => true,\n \t\t'profile' => true,\n \t\t'etl1' => true,\n \t\t'getRules' => true,\n \t\t'getScenarioList' => true,\n \t\t'getScenarioConfig' => true,\n \t\t'saveScenario' => true,\n \t\t'runScenario' => true,\n \t);\n \t\n \treturn $methods;\n }", "title": "" }, { "docid": "761405ee2b55123cc6f295037de4f6e7", "score": "0.67723876", "text": "public function methods() {\n\t\t$result = parent::methods();\n\t\tunset($result[array_search('schema', $result)]);\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "b1ab4897440c53c176e0e7c0ed0884d4", "score": "0.6755428", "text": "public function getMethods()\n\t{\n\t\treturn ['GET', 'HEAD'];\n\t}", "title": "" }, { "docid": "5319c31ddf835b15417cffd4178c3db8", "score": "0.6750796", "text": "function getMethods(){\r\n $result = array();\r\n $result[] = array(\r\n 'name' => 'getAnchors',\r\n 'desc' => 'returns an array with the anchors as keys and the ids as values',\r\n 'return' => array('anchor => id' => 'array'),\r\n );\r\n return $result;\r\n }", "title": "" }, { "docid": "70fd081c0c73225af7da833e3c04206d", "score": "0.6741724", "text": "public function getMethodList(): array;", "title": "" }, { "docid": "d583f76445dc86a4bbe349e9c241a19c", "score": "0.6736029", "text": "public function __get($method)\n\t{\n\t\treturn array($this, $method);\n\t}", "title": "" }, { "docid": "991f276d645c846d88cd9c45edcba87b", "score": "0.67329055", "text": "protected function setMethodGet()\n {\n $this->method = \"get\";\n }", "title": "" }, { "docid": "0fca0f807b8cc8faa24e62d3e242878c", "score": "0.672322", "text": "public function all()\n {\n $items = array();\n\n // Get all methods\n $resp = $this->api->request->getAll(\"/methods\");\n\n if (!empty($resp) && is_array($resp)) {\n foreach ($resp as $item) {\n $items[] = new Method($this->api, $item);\n }\n }\n\n return $items;\n }", "title": "" }, { "docid": "fd435ff9de2b06a32781d31fad58d26b", "score": "0.6694509", "text": "public function getAccessMethods() {\n return [\"GET\", \"POST\"];\n }", "title": "" }, { "docid": "02d544c953ff48ff48e21abf8f0d9a62", "score": "0.66727144", "text": "public function getMethodArray ()\n {\n if ( $this->method_atr_list == null ) {\n $this->createMethodArray();\n }\n return $this->method_atr_list;\n }", "title": "" }, { "docid": "b01fbb25b0b7a60e2e568599fbe6814f", "score": "0.66332453", "text": "public function getAllMethods()\n {\n if (!$this->_methodsAreLoaded) {\n $this->_loadMethods();\n }\n return $this->_methods;\n }", "title": "" }, { "docid": "f9f64f8530bc3eea2bc30c29bb21edfe", "score": "0.6621555", "text": "protected function getAllowedMethods()\n {\n }", "title": "" }, { "docid": "7861e61545c0e44a1dd5685aa92d8373", "score": "0.6608638", "text": "public function getHttpMethods() {\n return $this->methods;\n }", "title": "" }, { "docid": "d0b545e0b42fdf0ba9bb2e5942635af9", "score": "0.6596177", "text": "public function getMethods() {\n\t\t\t\treturn ossn_call_hook('services', 'methods', false, array(\n\t\t\t\t\t\t'v1.0' => array(\n\t\t\t\t\t\t\t\t'user_details',\n\t\t\t\t\t\t\t\t'user_friends',\n\t\t\t\t\t\t\t\t'user_friend_requests',\n\t\t\t\t\t\t\t\t'user_authenticate',\n\t\t\t\t\t\t\t\t'user_edit',\n\t\t\t\t\t\t\t\t'user_add',\n\t\t\t\t\t\t\t\t'user_is_friend',\n\t\t\t\t\t\t\t\t'user_add_friend',\n\t\t\t\t\t\t\t\t'user_remove_friend',\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t'wall_add',\n\t\t\t\t\t\t\t\t'wall_view',\n\t\t\t\t\t\t\t\t'wall_list_user',\n\t\t\t\t\t\t\t\t'wall_list_home',\n\t\t\t\t\t\t\t\t'wall_list_group',\n\t\t\t\t\t\t\t\t'wall_delete',\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t'comments_list',\n\t\t\t\t\t\t\t\t'comment_add',\n\t\t\t\t\t\t\t\t'comment_delete',\n\t\t\t\t\t\t\t\t'comment_edit',\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t'like_add',\n\t\t\t\t\t\t\t\t'unlike_set',\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t'photos_album_add', //photos add in album\n\t\t\t\t\t\t\t\t'photos_album_create', //album create\n\t\t\t\t\t\t\t\t'photos_list',\n\t\t\t\t\t\t\t\t'photos_list_albums',\n\t\t\t\t\t\t\t\t'photos_list_profile_cover',\n\t\t\t\t\t\t\t\t'photos_view',\n\t\t\t\t\t\t\t\t'photos_view_profile',\n\t\t\t\t\t\t\t\t'photos_delete',\n\t\t\t\t\t\t\t\t'photos_delete_profile',\n\t\t\t\t\t\t\t\t'photos_delete_cover',\n\t\t\t\t\t\t\t\t'photos_profile_add',\n\t\t\t\t\t\t\t\t'photos_cover_add',\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t'groups_add',\n\t\t\t\t\t\t\t\t'groups_user_memberof',\n\t\t\t\t\t\t\t\t'groups_view', \n\t\t\t\t\t\t\t\t'groups_join',\n\t\t\t\t\t\t\t\t'groups_unjoin',\n\t\t\t\t\t\t\t\t'groups_requests',\n\t\t\t\t\t\t\t\t'groups_members',\n\t\t\t\t\t\t\t\t'groups_edit',\n\t\t\t\t\t\t\t\t'groups_request_accept',\n\t\t\t\t\t\t\t\t'groups_request_decline',\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t'notifications_list_user',\n\t\t\t\t\t\t\t\t'notifications_mark_viewed',\n\t\t\t\t\t\t\t\t'notifications_count',\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t'message_add',\n\t\t\t\t\t\t\t\t'message_delete', \n\t\t\t\t\t\t\t\t'message_list',\n\t\t\t\t\t\t\t\t'message_recent',\n\t\t\t\t\t\t\t\t'message_new',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'v2.0' => array(\n\t\t\t\t\t\t\t\t'user/block',\t\t\t\t\n\t\t\t\t\t\t\t\t'user/unblock',\t\t\t\t\n\t\t\t\t\t\t\t\t'user/blocklist',\t\t\t\t\n\t\t\t\t\t\t),\n\t\t\t\t));\n\t\t\t\t\n\t\t}", "title": "" }, { "docid": "77847f3d94ea699d004e2295335fb89f", "score": "0.65928674", "text": "public function getMethod(){ }", "title": "" }, { "docid": "2fb94721923f762709a425a6e3d8e750", "score": "0.6571111", "text": "public function getSetMethod()\n {\n return $this->setMethod;\n }", "title": "" }, { "docid": "90e88e1df28198eee008ea47de177616", "score": "0.6569845", "text": "public function getMethods()\n {\n $methods = $this->getData('methods');\n if (is_null($methods)) {\n $quote = $this->getQuote();\n $store = $quote ? $quote->getStoreId() : null;\n $methods = $this->helper('payment')->getStoreMethods($store, $quote);\n $total = $quote->getBaseSubtotal() + $quote->getShippingAddress()->getBaseShippingAmount();\n foreach ($methods as $key => $method) {\n if ($this->_canUseMethod($method)\n && ($total != 0\n || $method->getCode() == 'free'\n || ($quote->hasRecurringItems() && $method->canManageRecurringProfiles())\n || Mage::helper('aw_sarp2/quote')->isQuoteHasSubscriptionProduct($quote)\n )\n ) {\n $this->_assignMethod($method);\n } else {\n unset($methods[$key]);\n }\n }\n $this->setData('methods', $methods);\n }\n return $methods;\n }", "title": "" }, { "docid": "47ce05961ea77f34bdd8840680d9a34c", "score": "0.6538632", "text": "public function get_method()\n {\n }", "title": "" }, { "docid": "e6f2270979560aa2c43ab25400e00dd2", "score": "0.6534167", "text": "public function getMethod() {}", "title": "" }, { "docid": "e6f2270979560aa2c43ab25400e00dd2", "score": "0.6533656", "text": "public function getMethod() {}", "title": "" }, { "docid": "ccf0a149bc320798de0ecfc1dbad62c8", "score": "0.65333724", "text": "public function getMethods()\n\t{\n\t\treturn ['POST'];\n\t}", "title": "" }, { "docid": "00f2d16197ed4750f8fe9fb66d8001f1", "score": "0.6531663", "text": "public function getMethods(): array\n {\n return $this->reflector->getMethods();\n }", "title": "" }, { "docid": "ccd89d5349dbd8622ba03cb4c7a3e9f4", "score": "0.6529954", "text": "public function getMethod();", "title": "" }, { "docid": "ccd89d5349dbd8622ba03cb4c7a3e9f4", "score": "0.6529954", "text": "public function getMethod();", "title": "" }, { "docid": "ccd89d5349dbd8622ba03cb4c7a3e9f4", "score": "0.6529954", "text": "public function getMethod();", "title": "" }, { "docid": "ccd89d5349dbd8622ba03cb4c7a3e9f4", "score": "0.6529954", "text": "public function getMethod();", "title": "" }, { "docid": "ccd89d5349dbd8622ba03cb4c7a3e9f4", "score": "0.6529954", "text": "public function getMethod();", "title": "" }, { "docid": "ccd89d5349dbd8622ba03cb4c7a3e9f4", "score": "0.6529954", "text": "public function getMethod();", "title": "" }, { "docid": "ccd89d5349dbd8622ba03cb4c7a3e9f4", "score": "0.6529954", "text": "public function getMethod();", "title": "" }, { "docid": "ccd89d5349dbd8622ba03cb4c7a3e9f4", "score": "0.6529954", "text": "public function getMethod();", "title": "" }, { "docid": "ccd89d5349dbd8622ba03cb4c7a3e9f4", "score": "0.6529954", "text": "public function getMethod();", "title": "" }, { "docid": "ccd89d5349dbd8622ba03cb4c7a3e9f4", "score": "0.6529954", "text": "public function getMethod();", "title": "" }, { "docid": "ccd89d5349dbd8622ba03cb4c7a3e9f4", "score": "0.6529954", "text": "public function getMethod();", "title": "" }, { "docid": "d6a7df61d227605760ad51b1089f1f25", "score": "0.6529307", "text": "public function getMethodsInfo()\n {\n return $this->_dataStorage->get('methods');\n }", "title": "" }, { "docid": "d6a7df61d227605760ad51b1089f1f25", "score": "0.6529307", "text": "public function getMethodsInfo()\n {\n return $this->_dataStorage->get('methods');\n }", "title": "" }, { "docid": "a50f527b65309cd9901e226ad5afdfa6", "score": "0.6522691", "text": "function get_method()\n {\n return $this->method;\n }", "title": "" }, { "docid": "9e294998996cd8356383673c5d4b5b80", "score": "0.6521247", "text": "public function methodProvider()\n {\n return [\n ['setId', 'id', 'id-value'],\n ['setPass', 'pass', 'pass-value'],\n ['setIP', 'ip', 'ip-value'],\n ['setQuery', 'q', 'q-value'],\n ['setLocation', 'l', 'l-value'],\n ['setStart', 'start', 'start-value'],\n ['setSort', 'sort', 'sort-value'],\n ['setIndustry', 'industry', 'industry-value'],\n ['setIndustryEx', 'industryEx', 'industryEx-value'],\n ['setFormat', 'format', 'format-value'],\n ['setMobile', 'm', 'm-value'],\n ['setLink', 'link', 'link-value'],\n ['setFullDescription', 'full_desc', 'full_desc-value'],\n ['setJobId', 'jobid', 'jobid-value'],\n ['setJobType', 'jobtype', 'jobtype-value'],\n ['setUid', 'uid', 'uid-value'],\n ['setPid', 'pid', 'pid-value'],\n ];\n }", "title": "" }, { "docid": "cc278a740508301934aa457d31327792", "score": "0.6521131", "text": "public function get_method();", "title": "" }, { "docid": "9097dcdf3c146edde6e80597e04df32d", "score": "0.6483626", "text": "public function getAllowedMethods() {\n\t\treturn array($this->_code => $this->getConfigData('name'));\n\t\t//return array($this->_found);\n\t}", "title": "" }, { "docid": "efd0f2b49bcd71daf0866a91b9977f55", "score": "0.64418113", "text": "public function getRequestMethods ()\n {\n\n return Request::GET | Request::POST;\n\n }", "title": "" }, { "docid": "98dfbc50e54f0f3c4974053b1398e27b", "score": "0.64417857", "text": "public function listMethods() {\n $methods = array_keys($this->services);\n sort($methods);\n return $methods;\n }", "title": "" }, { "docid": "8eb0e884b44cc73be2921ff6f2c76160", "score": "0.64376193", "text": "protected function getFreeMethods()\n {\n }", "title": "" }, { "docid": "9f38808dea532adf5ccdc7b16f7700b2", "score": "0.64340025", "text": "public function getClassMethods()\n\t{\n\t\t//if not set yet, populate the $methods array\n\t\tif( ! isset($methods) )\n\t\t{\n\t\t\t//get class methods\n\t\t\t$methodsArray = $this->_getClassMethods();\n\n\t\t\t//loop through return array getting methodNames and population array\n\t\t\tforeach ($methodsArray as $method) \n\t\t\t{\n\t\t\t\t//add name to $methods array\n\t\t\t\t$methods[] = $method->getName();\n\n\t\t\t}\n\n\t\t}\n\n\t\t//return the method names\n\t\treturn $methods;\n\n\t}", "title": "" }, { "docid": "38e75b129be2043ebb64799ecde1547a", "score": "0.6421995", "text": "public function getAccessableMethods() {\n return array('saveToggleStatuses', 'getAccess', 'copy', 'link');\n }", "title": "" }, { "docid": "096989f51dc23531d6fc4d91199f6fd0", "score": "0.6411586", "text": "protected static function getHttpMethods()\n {\n return\n [\n 'head',\n 'get',\n 'put',\n 'options'\n ];\n }", "title": "" }, { "docid": "b132eece4f83be5f2df58c1edded889e", "score": "0.64083433", "text": "public function getAvailableMethods()\n {\n return [\n 'get',\n 'post',\n ];\n }", "title": "" }, { "docid": "34f2b54d69f0588ec75baa2be7fca229", "score": "0.63846356", "text": "public function getGatherMethods()\n {\n return $this->getOptionValue(self::GATHER_METHODS);\n }", "title": "" }, { "docid": "4616cbded01ee11e65b4a18ebc2ebac4", "score": "0.6377514", "text": "public function getSet()\n {\n }", "title": "" }, { "docid": "aa66d96cd8a005244325c7f42ad66224", "score": "0.63774574", "text": "public function getMethod()\n\t{\n\t}", "title": "" }, { "docid": "eff12f27f6cd6a45e17472a0310da7f4", "score": "0.63741416", "text": "private static function actionsMethods() {\n\n $actionsMethods = array(\n 'wpdk_action_user_by' => true,\n );\n return $actionsMethods;\n }", "title": "" }, { "docid": "4859681449a4adf732f222e5b8a1aa47", "score": "0.6370672", "text": "abstract protected function getMethodsMap();", "title": "" }, { "docid": "0c14304d0f2613f8d5f9302b57cf32b2", "score": "0.6353677", "text": "public function httpMethodDataprovider()\n {\n return [\n ['head'],\n ['get'],\n ['post'],\n ['put'],\n ['delete'],\n ['options'],\n ['patch']\n ];\n }", "title": "" }, { "docid": "97f2b2f1c95fb11dd70a509056bee6d2", "score": "0.63469416", "text": "public static function all ( $method )\n {\n $method = self::getMethod ( $method );\n return $method;\n }", "title": "" }, { "docid": "7ba4ec0747009003b3ceb2781df19bb5", "score": "0.6334223", "text": "public function methods()\n {\n return new ArrayClass(get_class_methods($this));\n }", "title": "" }, { "docid": "69bfd8b6c487600037f75838ba479d11", "score": "0.6320244", "text": "public function getRemoveMethods()\n {\n return $this->removeMethods;\n }", "title": "" }, { "docid": "58ef67a0fd297d1552ad522d08021b6e", "score": "0.6314248", "text": "public function getAllowedMethods() {\n return array($this->_code => $this->getConfigData('title'));\n }", "title": "" }, { "docid": "6ba7c5deeb198156018465738ad15660", "score": "0.631191", "text": "public function allowedMethods() : array;", "title": "" }, { "docid": "52bbf964cc7d1e7cb76b969c2f86a29f", "score": "0.6295369", "text": "public function getAllowedMethods()\n {\n return array($this->_code=>$this->getConfigData('name'));\n }", "title": "" }, { "docid": "bdf780115f044cb5f7f19db727543699", "score": "0.6289987", "text": "private static function setIntrospectionMethods($methods) {\n\n $methods->add(RpcMethod::create(\"system.getCapabilities\", '\\Comodojo\\RpcServer\\Reserved\\GetCapabilities::execute')\n ->setDescription(\"This method lists all the capabilites that the RPC server has: the (more or less standard) extensions to the RPC spec that it adheres to\")\n ->setReturnType('struct')\n );\n\n $methods->add(RpcMethod::create(\"system.listMethods\", '\\Comodojo\\RpcServer\\Introspection\\ListMethods::execute')\n ->setDescription(\"This method lists all the methods that the RPC server knows how to dispatch\")\n ->setReturnType('array')\n );\n\n $methods->add(RpcMethod::create(\"system.methodHelp\", '\\Comodojo\\RpcServer\\Introspection\\MethodHelp::execute')\n ->setDescription(\"Returns help text if defined for the method passed, otherwise returns an empty string\")\n ->setReturnType('string')\n ->addParameter('string', 'method')\n );\n\n $methods->add(RpcMethod::create(\"system.methodSignature\", '\\Comodojo\\RpcServer\\Introspection\\MethodSignature::execute')\n ->setDescription(\"Returns an array of known signatures (an array of arrays) for the method name passed.\".\n \"If no signatures are known, returns a none-array (test for type != array to detect missing signature)\")\n ->setReturnType('array')\n ->addParameter('string', 'method')\n );\n\n $methods->add(RpcMethod::create(\"system.multicall\", '\\Comodojo\\RpcServer\\Reserved\\Multicall::execute')\n ->setDescription(\"Boxcar multiple RPC calls in one request. See http://www.xmlrpc.com/discuss/msgReader\\$1208 for details\")\n ->setReturnType('array')\n ->addParameter('array', 'requests')\n );\n\n }", "title": "" }, { "docid": "31230310ec6580246ae97ec67bf344b2", "score": "0.6275641", "text": "public function providerSetRequestMethod() {\n return [\n ['GET'],\n ['POST'],\n ];\n }", "title": "" }, { "docid": "83bbe9d06c263846cd8a6581f05be92d", "score": "0.62751085", "text": "public function getRequestMethods ()\n {\n return Request::GET;\n }", "title": "" }, { "docid": "c8ead839571e7ff5f3d13b431ba68c07", "score": "0.62714446", "text": "public function get_operations(){\n return $this->find_operations();\n }", "title": "" }, { "docid": "a910b09ae1d0484b81ac5a4a0d40e651", "score": "0.6266005", "text": "public function getMethods(): array\n {\n $methods = [];\n $reflection = new \\ReflectionClass($this);\n\n foreach ($reflection->getMethods() as $method) {\n $identifier = $this->getMethodIdentifier($method);\n\n if (!\\is_null($identifier)) {\n $methods[$identifier] = $method->getName();\n }\n }\n\n return $methods;\n }", "title": "" }, { "docid": "78d136f8ab1cab9c6f6d27e68659da3b", "score": "0.62649024", "text": "public function getMethod(){\n return $this->methodname;\n }", "title": "" }, { "docid": "d327b362d3106b7f38a7e2a59bef3877", "score": "0.62546355", "text": "public function getAllowedMethods()\n {\n return array($this->_code => $this->getConfigData('name'));\n }", "title": "" } ]
6e910cbfbcdbaf2cacd4cad8cb2f896f
Adds a baggage item to the SpanContext which is immutable so it is required to use SpanContext::withBaggageItem to get a new one.
[ { "docid": "1ddcab1f0c796ffdebc7b9722a2670cb", "score": "0.8120657", "text": "public function addBaggageItem($key, $value){\n $this->log([\n 'event' => 'baggage',\n 'key' => $key,\n 'value' => $value,\n ]);\n return $this->spanContext->withBaggageItem($key, $value);\n }", "title": "" } ]
[ { "docid": "78e1c411c4f2eb3244b4b9a374f394ce", "score": "0.73381096", "text": "public function addBaggageItem($key, $value);", "title": "" }, { "docid": "2f5c5a96e49890c75976cedef3e449be", "score": "0.621435", "text": "public function setBaggageItem(string $key, string $value): void;", "title": "" }, { "docid": "778ee561e64c5be36668b854a801e171", "score": "0.5479148", "text": "public function addItem(Item $item) {}", "title": "" }, { "docid": "78128c97e80f679637ad8b4a3305bdd4", "score": "0.5455217", "text": "public function addItem(Item $item);", "title": "" }, { "docid": "acfd89a136265658a8a35f86e467c2f6", "score": "0.53372383", "text": "public function AddItem($item) {\n $this->_item[] = $item;\n }", "title": "" }, { "docid": "f0e6fd513ecdbf36121ee649ea1dcf64", "score": "0.529922", "text": "public function addItem(Item $item): void\n {\n $this->item[] = $item;\n }", "title": "" }, { "docid": "0c3e66db00e5a4582ca41c1980a46078", "score": "0.5253465", "text": "public function add($item): void\n\t{\n\t\t$this->items[] = $item;\n\t}", "title": "" }, { "docid": "f5c07e0dd8056ad614140dad84bf37eb", "score": "0.5252001", "text": "public function add($item)\n {\n $this->items[] = $item;\n }", "title": "" }, { "docid": "56711d747a11dfe50385f6dfa067986f", "score": "0.5238489", "text": "public function addItem($item) {\n $this->items[] = $item;\n }", "title": "" }, { "docid": "f579df4aec18429cfc11154b7778a1b4", "score": "0.52155626", "text": "public function addItem($pageItem) {\n return self::addItemCustom($pageItem, $this);\n }", "title": "" }, { "docid": "91dbdba86a525fa9f888c9917ba6fbc3", "score": "0.5202405", "text": "public function add($item){\n $this->validateItem($item);\n $this->items[] = $item;\n }", "title": "" }, { "docid": "c2f9f380d35f6d6aa6c68d56aa0bd44e", "score": "0.5180418", "text": "public function AddItem($item)\n {\n array_push($this->items, $item);\n }", "title": "" }, { "docid": "913f249c5bccaf60118b6ab49b9da800", "score": "0.51755184", "text": "public function addToAward(\\Devlabs91\\GenericOtaHotelApiService\\StructType\\Award $item)\n {\n // validation for constraint: itemType\n if (!$item instanceof \\Devlabs91\\GenericOtaHotelApiService\\StructType\\Award) {\n throw new \\InvalidArgumentException(sprintf('The Award property can only contain items of \\Devlabs91\\GenericOtaHotelApiService\\StructType\\Award, \"%s\" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__);\n }\n $this->Award[] = $item;\n return $this;\n }", "title": "" }, { "docid": "a01e513d0270940ba2507032796aa090", "score": "0.5136914", "text": "function AddItem($item) {\r\n\t\t$this->ItemData[] = $item;\r\n\t}", "title": "" }, { "docid": "8cba86fa855852eeb294b66644cf9cc7", "score": "0.51340985", "text": "public function addItem(OTS_Item $item)\n {\n $this->items[] = $item;\n }", "title": "" }, { "docid": "2a6b275944361098234c5f38541f29cc", "score": "0.5124391", "text": "public function push($item){\n $this->add($item);\n }", "title": "" }, { "docid": "f640ac37d04fe37618c0ae1b8bfd40af", "score": "0.5113362", "text": "abstract protected function addItem($item);", "title": "" }, { "docid": "db50f4a4cebdc2eebc192fd34db5c45d", "score": "0.5086383", "text": "public function add($item)\n\t{\n\t\t$this->data->addLast($item);\n\t}", "title": "" }, { "docid": "410e3c2873f6b7f99a9854c2a6b83548", "score": "0.5085752", "text": "function addBibItem()\n\t{\n\t\t$this->setTabs();\n\t\t\n\t\t// questionable workaround to make this old stuff work\n\t\t$this->ctrl->setParameter($this, ilCtrl::IL_RTOKEN_NAME, $this->ctrl->getRequestToken());\n\n\t\t$this->addBibItemObject($this->ctrl->getLinkTarget($this));\n\t}", "title": "" }, { "docid": "b1ad31b31f64447489facec767b71e72", "score": "0.5071878", "text": "public function addBoppTag(BoppTag $boppTag)\r\n {\r\n $this->boppTags[] = $boppTag;\r\n\r\n return $this;\r\n }", "title": "" }, { "docid": "9200c2b94231b21958c84465a491673d", "score": "0.50673026", "text": "public function addItem($item)\n {\n if (!empty($item))\n {\n $this->items[] = $item;\n }\n }", "title": "" }, { "docid": "d09d8375da8057e1d753f0493e451824", "score": "0.5036218", "text": "public function addItem($itemId, $qty);", "title": "" }, { "docid": "c0a1f1cad8ac6c6ce62f3fcd0e6a6e42", "score": "0.5033989", "text": "public function add ($item);", "title": "" }, { "docid": "ba76ced03db0f0559729f82cfbd788de", "score": "0.49873236", "text": "public function setBaggageWeight($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (int) $v;\n\t\t}\n\n\t\tif ($this->baggage_weight !== $v) {\n\t\t\t$this->baggage_weight = $v;\n\t\t\t$this->modifiedColumns[] = MissionLegPeer::BAGGAGE_WEIGHT;\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "2f200ff5154c8922d405678ec77ad441", "score": "0.49819997", "text": "public function addToBilag(\\ItkDev\\Serviceplatformen\\SF1600\\StructType\\BilagType $item): self\n {\n // validation for constraint: itemType\n if (!$item instanceof \\ItkDev\\Serviceplatformen\\SF1600\\StructType\\BilagType) {\n throw new InvalidArgumentException(sprintf('The Bilag property can only contain items of type \\ItkDev\\Serviceplatformen\\SF1600\\StructType\\BilagType, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);\n }\n // validation for constraint: maxOccurs(100)\n if (is_array($this->Bilag) && count($this->Bilag) >= 100) {\n throw new InvalidArgumentException(sprintf('You can\\'t add anymore element to this property that already contains %s elements, the number of elements contained by the property must be less than or equal to 100', count($this->Bilag)), __LINE__);\n }\n $this->Bilag[] = $item;\n \n return $this;\n }", "title": "" }, { "docid": "d3ca876eb87504cf94df1859a4564541", "score": "0.49791858", "text": "public function push($item)\n {\n $this->items[] = $item;\n }", "title": "" }, { "docid": "515f15d6efb289c6a60b6feaf1c2d1dd", "score": "0.4926298", "text": "public function add($item): void\n {\n if (!$item instanceof $this->type) {\n throw new InvalidArgumentException(\n 'Invalid object added: ' . gettype($item) . ', expected: ' . $this->getType()\n );\n }\n\n $this->items[] = $item;\n }", "title": "" }, { "docid": "cc29e272efe891aefddad6998ca07390", "score": "0.49256098", "text": "protected function addPurseBalance()\n\t{\n\t\t$purse = $this->deposit->purse;\n\n\t\t$purse_amount = $this->deposit->amount;\n\n\t\t$reason = DepositReason::make($this->deposit->invoice_order);\n\n\t\tAccountantFactory::balance()->add($purse, $purse_amount, $reason);\n\t}", "title": "" }, { "docid": "a5850e62c968ba4322314189eef36ad5", "score": "0.4917405", "text": "public function addItem(ShoppingCartItem $item)\r\n {\r\n array_push($this->items, $item);\r\n }", "title": "" }, { "docid": "ed2ee2d2db5cbd5a4bfe21f344b56ce5", "score": "0.49064067", "text": "public function add_badge( $badge_id ) {\n\t\tglobal $wpdb;\n\n\t\t$badge_data = array(\n\t\t\t'course_id'\t\t=> $this->id,\n\t\t\t'badge_id'\t=> $badge_id,\n\t\t);\n\t\t$wpdb->insert(\n\t\t\t$wpdb->prefix . 'courses_badges',\n\t\t\t$badge_data,\n\t\t\tarray( '%d', '%d' )\n\t\t);\n\t\treturn $wpdb->insert_id;\n\t}", "title": "" }, { "docid": "136c882bf0a2a34f314f676cddd617c6", "score": "0.4903622", "text": "public function addBikeToShoppingBasket($bike_id, Request $request){\n $bike = new Bike();\n $bikeToCheck = $bike->getABike($bike_id);\n\n if(!$bikeToCheck->isEmpty() && $bikeToCheck->first()->status == 'for sale'){\n if ($request->session()->exists('bike_idsInShoppingBasket')) {\n\n $bike_idsInShoppingBasket = $request->session()->get('bike_idsInShoppingBasket');\n $bike_idsInShoppingBasket = array_add($bike_idsInShoppingBasket,'bike_id_'.$bike_id,$bike_id);\n $request->session()->put('bike_idsInShoppingBasket', $bike_idsInShoppingBasket);\n\n return Redirect::back();\n } else{\n $bike_idsInShoppingBasket = [\n 'bike_id_'.$bike_id => $bike_id\n ];\n\n $request->session()->put('bike_idsInShoppingBasket', $bike_idsInShoppingBasket);\n return Redirect::back();\n\n }\n } else{\n return Redirect::back();\n\n } \n \n }", "title": "" }, { "docid": "79237ede989fdad5c4e31a488f7cbafd", "score": "0.4890634", "text": "public function add(mixed $item): void;", "title": "" }, { "docid": "32ca29246f3404ef8b409b8566fc5652", "score": "0.48893404", "text": "protected function _addGiftWrapItemPrice()\n {\n if ($this->getOrder()->getGwItemsPrice() <= 0) {\n return;\n }\n\n $price = $this->getOrder()->getGwItemsPrice();\n $tax = $this->getOrder()->getGwItemsTaxAmount();\n\n $name = $this->_getEntGWHelper()->__(\"Gift Wrapping for Items\");\n\n $sku = $this->_getHelper()->__('gw_items');\n\n $this->_extras[] = array(\n \"qty\" => 1,\n \"sku\" => $sku,\n \"name\" => $name,\n \"price\" => $price + $tax,\n \"total_amount\" => $price + $tax,\n \"total_tax_amount\" => $tax,\n );\n }", "title": "" }, { "docid": "a2b9bb3c6f899c256e7c5f7c88460468", "score": "0.48875952", "text": "protected function _addGwItemsAmount($item)\n {\n if (!$item->getGwId()) {\n return false;\n }\n $lineNumber = count($this->_lines);\n $storeId = $item->getQuote()->getStoreId();\n //Add gift wrapping price(for individual items)\n $gwItemsAmount = $item->getGwBasePrice() * $item->getQty();\n\n $line = new Line();\n $line->setNo($lineNumber);\n $gwItemsSku = $this->_getConfigHelper()->getGwItemsSku($storeId);\n $line->setItemCode($gwItemsSku ? $gwItemsSku : 'GwItemsAmount');\n $line->setDescription('Gift Wrap Items Amount');\n $line->setTaxCode($this->_getGiftTaxClassCode($storeId));\n $line->setQty($item->getQty());\n $line->setAmount($gwItemsAmount);\n $line->setDiscounted(false);\n\n if ($this->_getTaxDataHelper()->priceIncludesTax($storeId)) {\n $line->setTaxIncluded(true);\n }\n\n $this->_lines[$lineNumber] = $line;\n $this->_request->setLines($this->_lines);\n $this->_lineToLineId[$lineNumber] = $this->_getConfigHelper()->getGwItemsSku($storeId);\n $this->_productGiftPair[$lineNumber] = $item->getId();\n\n return $lineNumber;\n }", "title": "" }, { "docid": "c5c1feac8225a007b570051774ebb168", "score": "0.48867765", "text": "public function add_item($item, $qty = 1){\n\t\t$prod_id_col = $this->config['prod_id'];\n\t\tif(array_key_exists($item->$prod_id_col, $this->items)){\n\t\t\t$this->items[$item->$prod_id_col]['qty'] += $qty;\n\t\t}\n\t\telse{\n\t\t\t$this->items[$item->$prod_id_col]['object'] = $item;\n\t\t\t$this->items[$item->$prod_id_col]['qty'] = $qty;\n\t\t}\n\t}", "title": "" }, { "docid": "10d1cf2f38ca0284a2cb0bee885640c9", "score": "0.48752365", "text": "public function add($item) {\n\t\tarray_push($this->queue, $item);\n\n\t\tif ($this->saveOnChanges == true) {\n\t\t\t$this->save();\n\t\t}\n\t}", "title": "" }, { "docid": "0220d85591cfc7485ae3e0a1782cfe41", "score": "0.48622918", "text": "public function add($item)\n {\n return $this->items[] = $item;\n }", "title": "" }, { "docid": "52b94d9071742ceff454a1f78fba6ba2", "score": "0.48602012", "text": "public function addItem(OrderItem $item) {\n $this->cardItems[] = $item;\n\n $this->price += $item->price;\n }", "title": "" }, { "docid": "861fac0cd6845c7ea2520c35ffa22a92", "score": "0.48516527", "text": "function additem()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $this->global['pageTitle'] = '新增品牌';\n $this->global['pageName'] = 'product_brand_add';\n $this->global['typelist'] = $this->product_util_model->getProductTypeList();\n\n if (empty($_POST)) {\n $this->loadViews(\"product_manage/product_brand_add\", $this->global, NULL, NULL);\n } else {\n $this->product_format_validate();\n }\n }\n }", "title": "" }, { "docid": "c876350847048dd16d22734990d77880", "score": "0.48338363", "text": "public function addItem(Item $item)\n {\n if(empty($item) || empty($item->getId()))\n {\n throw new OrionException(\"An empty item can not be added to cart.\");\n }\n if($item->getWeight() > WEIGHT_LIMIT || $item->getCost() > COST_LIMIT)\n {\n throw new OrionException(\"The item you are trying to add exceeds the weight limit of \".WEIGHT_LIMIT.\" KG and or cost limit of $\".COST_LIMIT);\n }\n $_SESSION['cart'][] = $item;\n }", "title": "" }, { "docid": "f7d26136a711b9185d6764c552f07d29", "score": "0.48249233", "text": "public static function add($db, $image) {\r\n $id = $db->insert(\"badges\", array(\"image\" => $image), true);\r\n return $id;\r\n }", "title": "" }, { "docid": "5d120ada1a668e8e92da2ec5dbe6e2b3", "score": "0.48158452", "text": "function addItem($itemName)\n {\n $this -> payObj -> addOneItem($itemName);\n }", "title": "" }, { "docid": "f1a98ac103e20cae26e606842811588b", "score": "0.48003674", "text": "public function addBagItemNew($params)\n {\n $user_id = $params['user_id'];\n $bag_id = $params['bagId'];\n $item_id = $params['itemId'];\n $type = $params['entityType'];\n $imgpath = $params['imgpath'];\n $imgname = $params['imgname'];\n\n if ($imgpath != '' && $imgname != '') {\n //updating the CmsBag\n $qb1 = $this->createQueryBuilder('u')\n ->update('TTBundle:CmsBag', 'cb')\n ->set('cb.imgname', ':imgname')\n ->set('cb.imgpath', ':imgpath')\n ->where('cb.id = :bagId')\n ->setParameter(':bagId', $bag_id)\n ->setParameter(':imgname', $imgname)\n ->setParameter(':imgpath', $imgpath)\n ->getQuery()\n ->getResult();\n }\n\n //checking if item exists\n $select = $this->createQueryBuilder('u')\n ->from('TTBundle:CmsBagitem', 'cbi')\n ->where('cbi.bagId=:bagId')\n ->AndWhere('cbi.itemId=:itemId')\n ->AndWhere('cbi.type=:type')\n ->AndWhere('cbi.userId=:UserId')\n ->setParameter(':bagId', $bag_id)\n ->setParameter(':itemId', $item_id)\n ->setParameter(':type', $type)\n ->setParameter(':UserId', $user_id)\n ->getQuery();\n\n $result = $select->getScalarResult();\n\n if (!empty($result)) {\n return true;\n } else {\n $em = $this->getEntityManager();\n\n $item = new CmsBagitem();\n $item->setType($type);\n $item->setUserId($user_id);\n $item->setBagId($bag_id);\n $item->setItemId($item_id);\n $em->persist($item);\n $em->flush();\n\n if ($item->getId()) {\n return $item->getId();\n } else {\n return false;\n }\n }\n }", "title": "" }, { "docid": "18fce0c3f4afae258cb7e9646f9199dc", "score": "0.47701457", "text": "public function add($item): Pipeline\n {\n $this->items[] = $item;\n\n return $this;\n }", "title": "" }, { "docid": "eb2c6290debc8f6f69523aa65a802bc7", "score": "0.47568896", "text": "public function addHobbie(Hobbie $hobbie){\n \t\t$this->hobbie->add($hobbie);\n }", "title": "" }, { "docid": "4075ce7359b0ba723295b1a7ca40d76a", "score": "0.4749195", "text": "public function addItem(EntityBase $item)\n {\n /**\n * Allow to add only items of correct class\n */\n $itemClass = get_class($item);\n if($itemClass==$this->entityClass) {\n\n /**\n * Duplication is forbidden\n */\n if( array_key_exists($item->name, $this->items) ) {\n throw new \\Exception('Trying to add a repetitive entity');\n }\n\n /**\n * Aggregation\n */\n $fieldsForAggregation = call_user_func($this->entityClass.'::getFieldsForAggregation');\n foreach($fieldsForAggregation as $field) {\n $this->sumData[$field] += $item->$field;\n $this->quantityData[$field]++;\n }\n\n /**\n * if items are collections, aggregating prepared values\n */\n if( is_subclass_of($item, __CLASS__) ) {\n /**\n * @var CollectionBase $item\n */\n foreach( $item->sumData as $field=>$value ) {\n if(array_key_exists($field, $this->sumData)) {\n $this->sumData[$field] += $value;\n $this->quantityData[$field] += $item->quantityData[$field];\n } else {\n $this->sumData[$field] = $value;\n $this->quantityData[$field] = $item->quantityData[$field];\n }\n }\n }\n\n $this->items[$item->name] = $item;\n } else {\n throw new \\Exception('Expected '.$this->entityClass.', got '.$itemClass);\n }\n }", "title": "" }, { "docid": "e51314cdf62986becbaa6937cf0cdeb6", "score": "0.47323287", "text": "public function addToCoverage(\\Devlabs91\\GenericOtaHotelApiService\\StructType\\Coverage $item)\n {\n // validation for constraint: itemType\n if (!$item instanceof \\Devlabs91\\GenericOtaHotelApiService\\StructType\\Coverage) {\n throw new \\InvalidArgumentException(sprintf('The Coverage property can only contain items of \\Devlabs91\\GenericOtaHotelApiService\\StructType\\Coverage, \"%s\" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__);\n }\n $this->Coverage[] = $item;\n return $this;\n }", "title": "" }, { "docid": "caa8ac993b75ac6554d2f99d4f11664e", "score": "0.47250277", "text": "public function itemPipelinePhase(): void {\n $this->engine->pushItems();\n $this->engine->pushRequests();\n }", "title": "" }, { "docid": "9d6b9f83c1d26e23df5b7659d10d19ff", "score": "0.47239974", "text": "public function addItem (Item $item) \n\t\t{\n\t\t\t$id = $item->getID();\n\n\t\t\t\tif (!$id ) {\n\t\t\t\t\techo \"Cart requires unique item id\";\n\t\t\t\t}\n\t\t\t\t//check if theres an item with that id already then call updateItem else add item to cart\n\t\t\t\tif (isset($this->cartItems[$id])) {\n\t\t\t\t\t$this->updateItem($item, $this->cartItems[$item]['qty'] + 1);\n\t\t\t\t}else {\n\t\t\t\t\t$this->cartItems[$id] = array('item' => $item, 'qty' => 1);\n\t\t\t\t\t$this->ids[] = $id;\n\t\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "86258cc2096b1cf2314162d430518c0b", "score": "0.47146145", "text": "public function push($item){\n\t\t$this->stack->insertFront($item);\n\t}", "title": "" }, { "docid": "84a3ff8359ca913465299f6923e26202", "score": "0.47058684", "text": "public function addItem( \\Aimeos\\MShop\\Price\\Item\\Iface $item, $quantity = 1 );", "title": "" }, { "docid": "8640a628252acb467410b66ace93a42c", "score": "0.47003058", "text": "public function addItem($item, $num = 1)\n\t{\n\t\tif(!isset($this->items[$item]) || ($this->items[$item] < 0))\n\t\t{\n\t\t\t$this->items[$item] = 0;\n\t\t}\n\n\t\t$this->items[$item] += $num;\n\t}", "title": "" }, { "docid": "ac853beccc119afc253a718863d8bd20", "score": "0.46975702", "text": "public function addItem(ShopItem $item)\n {\n if ($this->items->has($item->id)) {\n $this->items->get($item->id)->quantity += $item->quantity;\n } else {\n $this->items->put($item->id, $item);\n }\n\n $this->save();\n }", "title": "" }, { "docid": "24503aebd06a7c6206276751eac10e5b", "score": "0.46771935", "text": "public function addBid(Request $request)\n {\n //validation of field for bid.\n $validator = Validator::make($request->all(),[\n 'bid' => 'required',\n ]);\n\n if ($validator->fails()) {\n return back()->withErrors($validator);\n }\n\n DealerServices::addBid($request->bid, $request->id, $request->session()->get('user'));\n return back();\n }", "title": "" }, { "docid": "e51c287317f629880977935156d1d387", "score": "0.46735844", "text": "function add_child($item)\n {\n \tif($this->debug>0){error_log('New LP - In learnpathItem::add_child()',0);}\n \tif(!empty($item))\n \t{\n \t\t//do not check in DB as we expect the call to come from the learnpath class which should\n \t\t//be aware of any fake\n \t\t$this->children[] = $item;\n \t}\n }", "title": "" }, { "docid": "1fba3af028c4716744f87b47032e95b3", "score": "0.46624947", "text": "public function sum(IBag $bag);", "title": "" }, { "docid": "534107193a53719caa32021d29e641aa", "score": "0.4652451", "text": "public function addToPricedEquip($item)\n {\n // validation for constraint: itemType\n if (!false) {\n throw new \\InvalidArgumentException(sprintf('The PricedEquip property can only contain items of anyType, \"%s\" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__);\n }\n $this->PricedEquip[] = $item;\n return $this;\n }", "title": "" }, { "docid": "32e0421ab00deb050af96961ee321c5f", "score": "0.46424216", "text": "abstract protected function addItems();", "title": "" }, { "docid": "b65353896108cda6386c852c430691d5", "score": "0.46375012", "text": "public function addToBarcode($item)\n {\n // validation for constraint: itemType\n if (!is_string($item)) {\n throw new \\InvalidArgumentException(sprintf('The Barcode property can only contain items of base64Binary, \"%s\" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__);\n }\n $this->Barcode[] = $item;\n return $this;\n }", "title": "" }, { "docid": "da3ac812594e3673b02d028243b24589", "score": "0.46337396", "text": "public function add($item)\n {\n $this->addArray('content', $item, array('ButtonContainer', 'Carousel', 'Collapsible', 'Container', 'Detail', 'Form', 'Tabs', 'Heading', 'HTML', 'Image', 'XList', 'Table'));\n }", "title": "" }, { "docid": "1e150c076b949f232e18622ca5eea230", "score": "0.46255472", "text": "public function addItems(\\utilpb\\PavilionItem $value){\r\n return $this->_add(1, $value);\r\n }", "title": "" }, { "docid": "3ed576b5a1e1b029d85e4e023e5f53e8", "score": "0.46140316", "text": "public function bookableTagAdded(BookableTag $bookableTag): void\n {\n $this->bookableTags->add($bookableTag);\n }", "title": "" }, { "docid": "5bf108b49972c559ba6b6aa42fd9554c", "score": "0.46104547", "text": "public function addItem(itemEstimativa $oItem) {\n\n $this->iTotalItens++;\n $oItem->setOrdem($this->iTotalItens);\n $this->aItens[] = $oItem;\n return $this;\n \n }", "title": "" }, { "docid": "8cb18f93b0974299f4d3acbd21bff01c", "score": "0.4595999", "text": "public function add( $item_id, $quantity = 1, array $data = NULL );", "title": "" }, { "docid": "a35ac975261f80b14b197ce10e9eb789", "score": "0.45952797", "text": "public function push($item)\n {\n if($this->getCount() >= 5) {\n throw new QueueOverloadException();\n }\n\n $this->item[] = $item;\n }", "title": "" }, { "docid": "3b6f62436e03f5c6436931a104e5575b", "score": "0.45894727", "text": "public function addToLoyaltyPref($item)\n {\n // validation for constraint: itemType\n if (!false) {\n throw new \\InvalidArgumentException(sprintf('The LoyaltyPref property can only contain items of anyType, \"%s\" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__);\n }\n $this->LoyaltyPref[] = $item;\n return $this;\n }", "title": "" }, { "docid": "91d69e109145a0724de6b29145c1bff5", "score": "0.4586954", "text": "function stream_bucket_append ($brigade, $bucket) {}", "title": "" }, { "docid": "2723ca432c4977cd03b42314cca99d32", "score": "0.45848325", "text": "static function add($page)\n {\n $page->addBehind('itemsLost', 'RealMoney::show');\n }", "title": "" }, { "docid": "13f84eb65b6882abe436f8d3326a88ea", "score": "0.45701975", "text": "public static function bkap_add_cart_item( $cart_item ) {\n\t\n\t\t// Adjust price if addons are set\n\t\tglobal $wpdb;\n\t\t\n\t\tif ( isset( $cart_item['bkap_booking'] ) ) :\n\t\t\t\n\t\t\t$extra_cost = 0;\n\t\t\t\t\n\t\t\tforeach ( $cart_item['bkap_booking'] as $addon ) :\n\t\t\n\t\t\t\tif ( isset( $addon['price'] ) && is_numeric( $addon['price'] ) ) $extra_cost += $addon['price'];\n\t\n\t\t\tendforeach;\n\t\t\t\n\t\t\t$duplicate_of = bkap_common::bkap_get_product_id( $cart_item['product_id'] );\n\t\t\t$product = wc_get_product( $cart_item['product_id'] );\n\t\t\n\t\t\t$product_type = $product->get_type();\n\t\t\t\t\n\t\t\t$variation_id = 0;\n\t\t\t\n\t\t\tif ( $product_type == 'variable' ) {\n\t\t\t\t$variation_id = $cart_item['variation_id'];\n\t\t\t}\n\t\t\t\n\t\t\tif ( ( version_compare( WOOCOMMERCE_VERSION, \"3.0.0\" ) < 0 ) ) {\n\t\t\t $price = bkap_common::bkap_get_price( $cart_item['product_id'], $variation_id, $product_type );\n $extra_cost = $extra_cost - $price;\n $cart_item['data']->adjust_price( $extra_cost );\n\t\t\t} else {\n\t\t\t $cart_item['data']->set_price( $extra_cost );\n\t\t\t}\n\t\t\t\n\t\t\t$cart_item = apply_filters( 'bkap_modify_product_price', $cart_item );\n\t\t\t\t\n\t\tendif;\n\t\t\n\t\treturn $cart_item;\n\t}", "title": "" }, { "docid": "f9fdab0a02f0b04f01ee7b8d1ca752e9", "score": "0.4567325", "text": "public function addToGoal(\\RrGeng\\OpenligaDB\\StructType\\Goal $item)\n {\n if (!$item instanceof \\RrGeng\\OpenligaDB\\StructType\\Goal) {\n throw new \\InvalidArgumentException(sprintf('The Goal property can only contain items of type \\RrGeng\\OpenligaDB\\StructType\\Goal, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);\n }\n $this->Goal[] = $item;\n return $this;\n }", "title": "" }, { "docid": "89bc0572066f065c259ea8cdc776f213", "score": "0.45590997", "text": "public function addToHotelAmenity(\\Devlabs91\\GenericOtaHotelApiService\\StructType\\HotelAmenity $item)\n {\n // validation for constraint: itemType\n if (!$item instanceof \\Devlabs91\\GenericOtaHotelApiService\\StructType\\HotelAmenity) {\n throw new \\InvalidArgumentException(sprintf('The HotelAmenity property can only contain items of \\Devlabs91\\GenericOtaHotelApiService\\StructType\\HotelAmenity, \"%s\" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__);\n }\n $this->HotelAmenity[] = $item;\n return $this;\n }", "title": "" }, { "docid": "c9717476740e8b802a5ac55c1e465c3b", "score": "0.45573068", "text": "public function addToSegmentNumber($item)\n {\n // validation for constraint: maxInclusive\n if ($item > 99) {\n throw new \\InvalidArgumentException(sprintf('Invalid value, the value must be inferior or equal to 99, \"%s\" given', $item), __LINE__);\n }\n // validation for constraint: minInclusive\n if ($item < 1) {\n throw new \\InvalidArgumentException(sprintf('Invalid value, the value must be superior or equal to 1, \"%s\" given', $item), __LINE__);\n }\n // validation for constraint: itemType\n if (!is_numeric($item)) {\n throw new \\InvalidArgumentException(sprintf('The SegmentNumber property can only contain items of integer, \"%s\" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__);\n }\n $this->SegmentNumber[] = $item;\n return $this;\n }", "title": "" }, { "docid": "6d6836ac104b345633251125d4e009fe", "score": "0.45571515", "text": "public function addFromNavigationItem(NavigationItem $item, UrlParameterBag $urlParameterBag): void\n {\n $this->add($item->getLanguageTag(), $item->getHref($urlParameterBag), $item->getTitle());\n }", "title": "" }, { "docid": "db7490d849e91dcb344fea260d210982", "score": "0.45525232", "text": "function addItem() {\n\t\tif($this->getSkuQty() > 0) {\n\t\t\t// Check for item first:\n\t\t\t$query_rsCWSkuExists = sprintf(\"SELECT cart_Line_ID, cart_sku_qty \n\t\t\tFROM tbl_cart\n\t\t\tWHERE cart_custcart_ID = '%s' \n\t\t\tAND\tcart_sku_ID = %d\",$this->getCartId(),$this->sku_id);\n\t\t\t$rsCWSkuExists = $this->db->executeQuery($query_rsCWSkuExists);\n\t\t\t// Item already exists in cart, update it\n\t\t\tif($this->db->recordCount > 0) {\n\t\t\t\t$this->updateItem($this->getSkuId(), $this->getSkuQty());\n\t\t\t}else{\n\t\t\t\t/* Insert sku into cart */\n\t\t\t\t$query_rsCWAdd = sprintf(\"INSERT INTO tbl_cart \n\t\t\t\t(cart_custcart_ID, cart_sku_ID, cart_sku_qty, cart_dateadded)\n\t\t\t\tVALUES ('%s', %d, %d, now())\",$this->CartId,$this->sku_id,$this->getSkuQty());\n\t\t\t\t$rsCWAdd = $this->db->executeQuery($query_rsCWAdd);\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "title": "" }, { "docid": "cec2e554c0630d37ec69db340461e8d7", "score": "0.45369866", "text": "public function addItem($item): void {\n\t\tassert(is_string($item) || $item instanceof PageElement);\n\n\t\tif($item instanceof ListItem) {\n\t\t\t$this->m_items[] = $item;\n\t\t\treturn;\n\t\t}\n\n\t\tif(is_string($item)) {\n\t\t\t$item = new HtmlLiteral(html($item));\n\t\t}\n\n\t\t$listItem = new ListItem();\n\t\t$listItem->addChildElement($item);\n\t\t$this->m_items[] = $listItem;\n\t}", "title": "" }, { "docid": "2e751763e1e079e021647b8aeb7853c5", "score": "0.45327568", "text": "public function addItem($section, $item, $value);", "title": "" }, { "docid": "36330d15b4b496916b9e127bcff48bf2", "score": "0.4532565", "text": "public function add($item, $id){\n $storedItem = ['qty' => 0, 'price'=>$item->price, 'item'=>$item]; //Creating an associative array for the Stored Item\n\n //Check if the added item already exists in the array //Cart// and overwrite it to only keep a product once. //instead of multiple times.\n if ($this->items) {\n if (array_key_exists($id , $this->items)) {\n $storedItem = $this->items[$id];\n }\n }\n $storedItem['qty']++;\n $storedItem['price'] = $item->price * $storedItem['qty'];\n $this->items[$id] = $storedItem;\n $this->totalQty++;\n $this->totalPrice+= $item->price;\n }", "title": "" }, { "docid": "985f3ebced9c99aaf8a7b53884a5122e", "score": "0.45324278", "text": "public function add($key, $item = null);", "title": "" }, { "docid": "aa00e8634132cd0d92c3db33314346bd", "score": "0.45314956", "text": "public function add($item)\n {\n $this->addArray('staticPlacemarks', $item, array('XModule\\GoogleMaps\\MapPoint', 'XModule\\GoogleMaps\\MapPolyline', 'XModule\\GoogleMaps\\MapPolygon'));\n }", "title": "" }, { "docid": "3d455f6abd3a8cb2799fed252c0824d9", "score": "0.45005462", "text": "public function addItem($value) {\n return $this->add('items', func_get_args());\n }", "title": "" }, { "docid": "3d455f6abd3a8cb2799fed252c0824d9", "score": "0.45005462", "text": "public function addItem($value) {\n return $this->add('items', func_get_args());\n }", "title": "" }, { "docid": "438a8f7a4257a333323435108994f0a5", "score": "0.44844615", "text": "public function addBreaths($num = 1) {\n\t return $this->_breaths = $this->_breaths + $num;\n\t}", "title": "" }, { "docid": "0677b70633fe8dbdbba41949469689f0", "score": "0.44823837", "text": "public function addToCoupledBuckets(\\PayPal\\StructType\\CoupledBucketsType $item)\n {\n // validation for constraint: itemType\n if (!$item instanceof \\PayPal\\StructType\\CoupledBucketsType) {\n throw new \\InvalidArgumentException(sprintf('The CoupledBuckets property can only contain items of type \\PayPal\\StructType\\CoupledBucketsType, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);\n }\n // validation for constraint: maxOccurs(5)\n if (is_array($this->CoupledBuckets) && count($this->CoupledBuckets) >= 5) {\n throw new \\InvalidArgumentException(sprintf('You can\\'t add anymore element to this property that already contains %s elements, the number of elements contained by the property must be less than or equal to 5', count($this->CoupledBuckets)), __LINE__);\n }\n $this->CoupledBuckets[] = $item;\n return $this;\n }", "title": "" }, { "docid": "9371bd810c2a1370fb84298bb0cd59d4", "score": "0.44818544", "text": "public function addToFeatureCode($item)\n {\n // validation for constraint: itemType\n if (!is_string($item)) {\n throw new \\InvalidArgumentException(sprintf('The FeatureCode property can only contain items of string, \"%s\" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__);\n }\n $this->FeatureCode[] = $item;\n return $this;\n }", "title": "" }, { "docid": "818ab6969098d499d77b7bbed90afe95", "score": "0.44791004", "text": "public function append($item): self\n\t{\n\t\t$this->items[] = $item;\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "af801c313bae145dde394fc044788e77", "score": "0.4471259", "text": "public function add($name, $item)\n {\n $this->items[$name] = $item;\n }", "title": "" }, { "docid": "f5ec6ab041a0588c0ee84c89791cf815", "score": "0.4464833", "text": "public function AddItem($vContent)\n\t{\n\t\t$oCXHItem = new CXHListItem($vContent);\n\t\n\t\t$this->AppendContent($oCXHItem);\n\t}", "title": "" }, { "docid": "2e3120cec6aab0a624740d68f94ffc4f", "score": "0.44638142", "text": "public function addToCarrierRefund(\\Sabre\\UpdateReservation\\StructType\\CarrierRefund_PNRB $item)\n {\n // validation for constraint: itemType\n if (!$item instanceof \\Sabre\\UpdateReservation\\StructType\\CarrierRefund_PNRB) {\n throw new \\InvalidArgumentException(sprintf('The CarrierRefund property can only contain items of \\Sabre\\UpdateReservation\\StructType\\CarrierRefund_PNRB, \"%s\" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__);\n }\n $this->CarrierRefund[] = $item;\n return $this;\n }", "title": "" }, { "docid": "dcd2882afde517d930f093ae6fe70768", "score": "0.44573838", "text": "public function addItem(returnItem $returnItem) {\n $this->items[] = $returnItem;\n }", "title": "" }, { "docid": "5586d300ac25c85cd24d4e38684fb087", "score": "0.44566384", "text": "public function appendToViewContainer($item)\n {\n $this->getViewContainer()->append($item);\n }", "title": "" }, { "docid": "c92bcacf30bf6abbad004d1967a96d2c", "score": "0.44479823", "text": "public function addItem(MyParcelCustomsItem $item): self\n {\n $item->ensureFilled();\n\n $this->items[] = $item;\n\n return $this;\n }", "title": "" }, { "docid": "d252ae11462164343a52890ad0390097", "score": "0.44421268", "text": "function add_item_stock($item,$amount) {\n $item = \\Model\\Item::find($item);\n $item->stock += $amount;\n $item->save();\n \n return $item->stock;\n }", "title": "" }, { "docid": "9c61b399178f5820659eb268da20b7b7", "score": "0.44415492", "text": "function _add($item) {\n\t\t$cart = $this->getCart();\n\t\t$type = key($item);\n\t\t$cart[$type][$item[$type]['id']] = $item[$type];\n\t\t// $cart_current_type = $cart[$type];\n\t\t// array_push($cart_current_type ,$item[$type]['id'] => $item[$type]);\n\t\t// $cart_current_type[] = array($item[$type]['id'] => $item[$type]);\n\t\t$this->Session->write('Cart', $cart);\n\t\t// $this->Session->write('Cart.add', 'here');\n\t\t// $cart[$type][] = array($item['id'] => $item[$type]);\n\t\t\n\t\t\n\t\t// $this->Session->write('Cart', $cart);\n\t}", "title": "" }, { "docid": "0194c69a8a7c224c7f5898d4dded7f99", "score": "0.44410065", "text": "public function add( $item )\n\t\t{\n\t\t\tif( $item instanceof EventBase )\n\t\t\t{\n\t\t\t\tarray_push( $this->items, $item );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new \\System\\Base\\InvalidArgumentException(\"Argument 1 passed to \".get_class($this).\"::add() must be an object of type EventBase\");\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "818dfafd855f3334585d5eac115b3164", "score": "0.44405577", "text": "public function add($item)\n {\n $this->items[] = $item;\n\n return $this;\n }", "title": "" }, { "docid": "818dfafd855f3334585d5eac115b3164", "score": "0.44405577", "text": "public function add($item)\n {\n $this->items[] = $item;\n\n return $this;\n }", "title": "" }, { "docid": "422ebe8b67a96ae49f48bc041e3578b0", "score": "0.44383487", "text": "public function add_item($item) {\n if ($item instanceof html_list_item || $item instanceof html_list) {\n $this->items[] = $item;\n } else {\n $listitem = new html_list_item();\n $listitem->value = $item;\n $this->items[] = $item;\n }\n }", "title": "" }, { "docid": "0f53e6da6fdd483af19ef72607fba07a", "score": "0.4430252", "text": "public function add($item){\n if(is_array($item)){\n foreach($item as $subitem){\n if(!is_array($subitem)){\n $item['uid'] = sha1($item['id'].serialize($item['options']));\n array_push($this->items, $item);\n }\n else{\n $subitem['uid'] = sha1($subitem['id'].serialize($subitem['options']));\n array_push($this->items, $subitem);\n }\n }\n }\n $this->session->set('cart', $this->items);\n }", "title": "" }, { "docid": "3a97066eb4a912106e5e2379bb7cf4ae", "score": "0.4417926", "text": "public function setBaggageDesc($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->baggage_desc !== $v) {\n\t\t\t$this->baggage_desc = $v;\n\t\t\t$this->modifiedColumns[] = MissionLegPeer::BAGGAGE_DESC;\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "34acf677b7999c31100d770fc5726e72", "score": "0.43998978", "text": "protected function onAddToBasket($event)\n {\n try {\n $product = $event->getProduct();\n $count = $event->getRequest()->getPost('qty');\n $price = $product->getPrice();\n $currency = $this->storeManager->getStore()->getCurrentCurrencyCode();\n\n $script = $this->bxHelperData->reportAddToBasket($product->getId(), $count, $price, $currency);\n $this->addScript($script);\n } catch (\\Exception $e) {\n $this->_logger->critical($e);\n }\n }", "title": "" } ]
1dae75a20267e68d6974040a41621474
Operation customerDebitNoteCreateHeaderAttachmentBydebitNoteNumber Creates an attachment and associates it with a debit note. If the file already exists, a new revision is created.
[ { "docid": "b30f37ae6cd2aa1b87eaa4b37a218003", "score": "0.78008336", "text": "public function customerDebitNoteCreateHeaderAttachmentBydebitNoteNumber($debit_note_number)\n {\n list($response) = $this->customerDebitNoteCreateHeaderAttachmentBydebitNoteNumberWithHttpInfo($debit_note_number);\n return $response;\n }", "title": "" } ]
[ { "docid": "2dd6dc14ed587a646d64b69dddda5390", "score": "0.69546384", "text": "protected function customerDebitNoteCreateHeaderAttachmentBydebitNoteNumberRequest($debit_note_number)\n {\n // verify the required parameter 'debit_note_number' is set\n if ($debit_note_number === null || (is_array($debit_note_number) && count($debit_note_number) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $debit_note_number when calling customerDebitNoteCreateHeaderAttachmentBydebitNoteNumber'\n );\n }\n\n $resourcePath = '/controller/api/v1/customerDebitNote/{debitNoteNumber}/attachment';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($debit_note_number !== null) {\n $resourcePath = str_replace(\n '{' . 'debitNoteNumber' . '}',\n ObjectSerializer::toPathValue($debit_note_number),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('ipp-application-type');\n if ($apiKey !== null) {\n $headers['ipp-application-type'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('ipp-company-id');\n if ($apiKey !== null) {\n $headers['ipp-company-id'] = $apiKey;\n }\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "f434208bed1d9c5d28ed19fa4a0056f5", "score": "0.67496824", "text": "public function customerDebitNoteCreateHeaderAttachmentBydebitNoteNumberWithHttpInfo($debit_note_number)\n {\n $returnType = 'object';\n $request = $this->customerDebitNoteCreateHeaderAttachmentBydebitNoteNumberRequest($debit_note_number);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 201:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "15d5fb78216972ddd4042e9fb370472e", "score": "0.64334387", "text": "public function customerDebitNoteCreateHeaderAttachmentBydebitNoteNumberAsync($debit_note_number)\n {\n return $this->customerDebitNoteCreateHeaderAttachmentBydebitNoteNumberAsyncWithHttpInfo($debit_note_number)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "a6e90c715eec62f4cfe07e60b7c4baca", "score": "0.6273714", "text": "public function customerDebitNoteCreateLineAttachmentBydebitNoteNumberlineNumber($debit_note_number, $line_number)\n {\n list($response) = $this->customerDebitNoteCreateLineAttachmentBydebitNoteNumberlineNumberWithHttpInfo($debit_note_number, $line_number);\n return $response;\n }", "title": "" }, { "docid": "17dae9959fa1c6c254f9827132f702f2", "score": "0.5849212", "text": "public function journalTransactionCreateHeaderAttachmentByjournalTransactionNumber($journal_transaction_number)\n {\n list($response) = $this->journalTransactionCreateHeaderAttachmentByjournalTransactionNumberWithHttpInfo($journal_transaction_number);\n return $response;\n }", "title": "" }, { "docid": "3caececbe922bbe4ff0732673ac1ddc6", "score": "0.58254856", "text": "public function customerDebitNoteCreateHeaderAttachmentBydebitNoteNumberAsyncWithHttpInfo($debit_note_number)\n {\n $returnType = 'object';\n $request = $this->customerDebitNoteCreateHeaderAttachmentBydebitNoteNumberRequest($debit_note_number);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "1cb93578f0575680d0d36c08440cd523", "score": "0.5649193", "text": "public function customerDebitNoteCreate($debit_note)\n {\n list($response) = $this->customerDebitNoteCreateWithHttpInfo($debit_note);\n return $response;\n }", "title": "" }, { "docid": "bdb680c47229ee6526b0d20f2069824a", "score": "0.54865587", "text": "public function customerInvoiceCreateHeaderAttachmentByinvoiceNumber($invoice_number)\n {\n list($response) = $this->customerInvoiceCreateHeaderAttachmentByinvoiceNumberWithHttpInfo($invoice_number);\n return $response;\n }", "title": "" }, { "docid": "41bfef7419fd5815b6954326c664f4c3", "score": "0.54536855", "text": "protected function customerDebitNoteCreateLineAttachmentBydebitNoteNumberlineNumberRequest($debit_note_number, $line_number)\n {\n // verify the required parameter 'debit_note_number' is set\n if ($debit_note_number === null || (is_array($debit_note_number) && count($debit_note_number) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $debit_note_number when calling customerDebitNoteCreateLineAttachmentBydebitNoteNumberlineNumber'\n );\n }\n // verify the required parameter 'line_number' is set\n if ($line_number === null || (is_array($line_number) && count($line_number) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $line_number when calling customerDebitNoteCreateLineAttachmentBydebitNoteNumberlineNumber'\n );\n }\n\n $resourcePath = '/controller/api/v1/customerDebitNote/{debitNoteNumber}/{lineNumber}/attachment';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($debit_note_number !== null) {\n $resourcePath = str_replace(\n '{' . 'debitNoteNumber' . '}',\n ObjectSerializer::toPathValue($debit_note_number),\n $resourcePath\n );\n }\n // path params\n if ($line_number !== null) {\n $resourcePath = str_replace(\n '{' . 'lineNumber' . '}',\n ObjectSerializer::toPathValue($line_number),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('ipp-application-type');\n if ($apiKey !== null) {\n $headers['ipp-application-type'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('ipp-company-id');\n if ($apiKey !== null) {\n $headers['ipp-company-id'] = $apiKey;\n }\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "2228c1918940a2250e0ce24d6eb54cb0", "score": "0.5393684", "text": "public function customerDebitNoteCreateLineAttachmentBydebitNoteNumberlineNumberWithHttpInfo($debit_note_number, $line_number)\n {\n $returnType = 'object';\n $request = $this->customerDebitNoteCreateLineAttachmentBydebitNoteNumberlineNumberRequest($debit_note_number, $line_number);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 201:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "edc94fab012ae6973aa6d5f80ae66e6a", "score": "0.53189623", "text": "protected function customerInvoiceCreateHeaderAttachmentByinvoiceNumberRequest($invoice_number)\n {\n // verify the required parameter 'invoice_number' is set\n if ($invoice_number === null || (is_array($invoice_number) && count($invoice_number) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $invoice_number when calling customerInvoiceCreateHeaderAttachmentByinvoiceNumber'\n );\n }\n\n $resourcePath = '/controller/api/v1/customerinvoice/{invoiceNumber}/attachment';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($invoice_number !== null) {\n $resourcePath = str_replace(\n '{' . 'invoiceNumber' . '}',\n ObjectSerializer::toPathValue($invoice_number),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('ipp-application-type');\n if ($apiKey !== null) {\n $headers['ipp-application-type'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('ipp-company-id');\n if ($apiKey !== null) {\n $headers['ipp-company-id'] = $apiKey;\n }\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "7e6b0878802f5bb17a81c94ca5873f7a", "score": "0.5070101", "text": "public function journalTransactionCreateHeaderAttachmentByjournalTransactionNumberWithHttpInfo($journal_transaction_number)\n {\n $returnType = 'object';\n $request = $this->journalTransactionCreateHeaderAttachmentByjournalTransactionNumberRequest($journal_transaction_number);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 201:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "ac0ea3635d2c7a7b1c599bbe60170a5f", "score": "0.5028571", "text": "protected function journalTransactionCreateHeaderAttachmentByjournalTransactionNumberRequest($journal_transaction_number)\n {\n // verify the required parameter 'journal_transaction_number' is set\n if ($journal_transaction_number === null || (is_array($journal_transaction_number) && count($journal_transaction_number) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $journal_transaction_number when calling journalTransactionCreateHeaderAttachmentByjournalTransactionNumber'\n );\n }\n\n $resourcePath = '/controller/api/v1/journaltransaction/{journalTransactionNumber}/attachment';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($journal_transaction_number !== null) {\n $resourcePath = str_replace(\n '{' . 'journalTransactionNumber' . '}',\n ObjectSerializer::toPathValue($journal_transaction_number),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('ipp-application-type');\n if ($apiKey !== null) {\n $headers['ipp-application-type'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('ipp-company-id');\n if ($apiKey !== null) {\n $headers['ipp-company-id'] = $apiKey;\n }\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "0f1cd01586624cc986345ec25cd0e957", "score": "0.49902454", "text": "public function customerDebitNoteCreateWithHttpInfo($debit_note)\n {\n $returnType = 'object';\n $request = $this->customerDebitNoteCreateRequest($debit_note);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 201:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "19ecefa285f2a6db28eedd09e791af12", "score": "0.4900158", "text": "public function customerDebitNoteCreateLineAttachmentBydebitNoteNumberlineNumberAsync($debit_note_number, $line_number)\n {\n return $this->customerDebitNoteCreateLineAttachmentBydebitNoteNumberlineNumberAsyncWithHttpInfo($debit_note_number, $line_number)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "508a88c7d33fe72eb774f52f0a5d15fd", "score": "0.48445413", "text": "public function journalTransactionCreateLineAttachmentByjournalTransactionNumberlineNumber($journal_transaction_number, $line_number)\n {\n list($response) = $this->journalTransactionCreateLineAttachmentByjournalTransactionNumberlineNumberWithHttpInfo($journal_transaction_number, $line_number);\n return $response;\n }", "title": "" }, { "docid": "4adef89123bd20031e9403980bfb495e", "score": "0.48189", "text": "public function customerInvoiceCreateHeaderAttachmentByinvoiceNumberWithHttpInfo($invoice_number)\n {\n $returnType = 'object';\n $request = $this->customerInvoiceCreateHeaderAttachmentByinvoiceNumberRequest($invoice_number);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 201:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "a792e4b9dd203169b546d58716705c70", "score": "0.47905666", "text": "public function journalTransactionCreateHeaderAttachmentByjournalTransactionNumberAsync($journal_transaction_number)\n {\n return $this->journalTransactionCreateHeaderAttachmentByjournalTransactionNumberAsyncWithHttpInfo($journal_transaction_number)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "d23c91fca6fcffea9d51c6e0426ded38", "score": "0.46896303", "text": "public function customerDebitNoteGetBydebitNoteNumberWithHttpInfo($debit_note_number)\n {\n $returnType = '\\Ekstralys\\VismaNetApi\\Model\\CustomerDebitNoteDto';\n $request = $this->customerDebitNoteGetBydebitNoteNumberRequest($debit_note_number);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Ekstralys\\VismaNetApi\\Model\\CustomerDebitNoteDto',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "1bcc4679cfe52264181dc27cb20d17c4", "score": "0.46425858", "text": "protected function customerDebitNoteGetBydebitNoteNumberRequest($debit_note_number)\n {\n // verify the required parameter 'debit_note_number' is set\n if ($debit_note_number === null || (is_array($debit_note_number) && count($debit_note_number) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $debit_note_number when calling customerDebitNoteGetBydebitNoteNumber'\n );\n }\n\n $resourcePath = '/controller/api/v1/customerDebitNote/{debitNoteNumber}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($debit_note_number !== null) {\n $resourcePath = str_replace(\n '{' . 'debitNoteNumber' . '}',\n ObjectSerializer::toPathValue($debit_note_number),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('ipp-application-type');\n if ($apiKey !== null) {\n $headers['ipp-application-type'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('ipp-company-id');\n if ($apiKey !== null) {\n $headers['ipp-company-id'] = $apiKey;\n }\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "f313f85a15e78dd63d29899050d9471a", "score": "0.4632756", "text": "public function customerDebitNoteCreateAsync($debit_note)\n {\n return $this->customerDebitNoteCreateAsyncWithHttpInfo($debit_note)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "b60a3e7e095cbe3a63d4c9b9367a43e8", "score": "0.45897827", "text": "public function journalTransactionCreateHeaderAttachmentByjournalTransactionNumberAsyncWithHttpInfo($journal_transaction_number)\n {\n $returnType = 'object';\n $request = $this->journalTransactionCreateHeaderAttachmentByjournalTransactionNumberRequest($journal_transaction_number);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "fc0c06d97382e4cce63f0245d84265ec", "score": "0.45720628", "text": "protected function customerDebitNoteCreateRequest($debit_note)\n {\n // verify the required parameter 'debit_note' is set\n if ($debit_note === null || (is_array($debit_note) && count($debit_note) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $debit_note when calling customerDebitNoteCreate'\n );\n }\n\n $resourcePath = '/controller/api/v1/customerDebitNote';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($debit_note)) {\n $_tempBody = $debit_note;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json'],\n ['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('ipp-application-type');\n if ($apiKey !== null) {\n $headers['ipp-application-type'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('ipp-company-id');\n if ($apiKey !== null) {\n $headers['ipp-company-id'] = $apiKey;\n }\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "72522f1fca30202a480678203ebd511b", "score": "0.45267117", "text": "function template_preprocess_xero_creditnote(&$variables) {\n $cn = $variables['creditnote'] = $variables[0];\n unset($variables[0]);\n\n $variables['currency'] = (isset($cn['CurrencyCode'])) ? $cn['CurrencyCode'] : ''; //USD, NZD\n\n $variables['type'] = strtolower(substr($cn['CreditNoteType'], 6));\n $variables['status'] = ucwords(strtolower($cn['Status']));\n $variables['number'] = check_plain($cn['CreditNoteNumber']);\n $variables['creditnotid'] = $cn['CreditNoteID'];\n $variables['name'] = check_plain($cn['Contact']['Name']);\n $variables['contactid'] = $cn['Contact']['ContactID'];\n $date = new DateTime($cn['Date']);\n $due = new DateTime($cn['DueDate']);\n $updated = new DateTime($cn['UpdatedDateUTC']);\n $variables['date'] = $date->format('U');\n $variables['duedate'] = $due->format('U');\n $variables['updated'] = $updated->format('U');\n\n if (isset($cn['FullyPaidOnDate'])) {\n $paidon = new DateTime($cn['FullyPaidOnDate']);\n $variables['paidon'] = $paidon->format('U');\n }\n else {\n $variables['paidon'] = '';\n }\n\n $varaibles['lineitems'] = array();\n if (!empty($cn['LineItems']['LineItem'])) {\n $variables['lineitems'] = $cn['LineItems']['LineItem'];\n }\n}", "title": "" }, { "docid": "a2be5cb6a09d5d69773e832fb42e23d1", "score": "0.4525861", "text": "protected function drawDocumentHeader()\r\n {\r\n // Init\r\n $iWidth = 70;\r\n $this->resetFontColor();\r\n\r\n // Contents\r\n $sOrderNumber = $this->structure['data']['first_page']['num_bdc'];\r\n $sInvoiceDate = $this->structure['data']['first_page']['date_facture'];\r\n $sCustomerVatRegistrationNumber = isset($this->structure['data']['first_page']['customer_vat_registration_number']) ? $this->structure['data']['first_page']['customer_vat_registration_number'] : '';\r\n $sInvoiceHeader = sprintf($this->translations['header_facture'], $this->structure['data']['first_page']['type_fact'], $this->structure['data']['first_page']['num_facture'], $sInvoiceDate);\r\n $sOrderNumberHeader = ! empty($sOrderNumber) ? sprintf($this->translations['header_bdc'], $sOrderNumber, $sInvoiceDate) : '';\r\n\r\n // Draw\r\n $this->SetY(self::POSY_ENTETE);\r\n $this->setBold(true);\r\n $this->Cell($iWidth, 0, $this->structure['data']['first_page']['mention_fact'], 0, 1);\r\n $this->Cell($iWidth, 0, $sInvoiceHeader, 0, 1);\r\n $this->setBold(false);\r\n $this->Cell($iWidth, 0, $sOrderNumberHeader, 0, 1);\r\n\r\n // Specific mention\r\n $this->MultiCell(self::WIDTH_ENTETE_BLOC_DROITE, 0, $this->structure['data']['first_page']['mentions_specifiques'], 0, 'L');\r\n\r\n $iLeftY = $this->GetY();\r\n\r\n $this->SetFontSize(self::FONT_SIZE_MINI);\r\n $this->setColor('text', $this->fontColors['MENTIONS'][0], $this->fontColors['MENTIONS'][1], $this->fontColors['MENTIONS'][2]);\r\n if ($this->structure['data']['first_page']['display_header_reverse_charge'] == 1) {\r\n // Note: \"\\n\" is important to align the line to left\r\n $this->MultiCell($iWidth, 0, $this->translations['header_reverse_charge'] . \"\\n\", 0, 'J');\r\n }\r\n\r\n // Draw customer header\r\n $iWidth = self::WIDTH_ENTETE_BLOC_DROITE;\r\n $iHeight = 30;\r\n $iXPosition = $this->getPageWidth() - ($this->getMargin('right') + $iWidth);\r\n $this->resetFontColor();\r\n\r\n // Draw container rectangle\r\n $this->setColor('draw', $this->fontColors['CONTOUR_BLOC'][0], $this->fontColors['CONTOUR_BLOC'][1], $this->fontColors['CONTOUR_BLOC'][2]);\r\n $this->RoundedRect($iXPosition, self::POSY_ENTETE, $iWidth, $iHeight, self::R);\r\n $this->resetColor();\r\n\r\n // Draw - client\r\n $this->SetXY($iXPosition + self::TEXT_MARGIN, self::POSY_ENTETE + self::TEXT_MARGIN);\r\n $this->Cell($iWidth, 0, $this->structure['data']['first_page']['nom_client'], 0, 2);\r\n\r\n // Client contact\r\n if (Phoenix_Auth_User::getInstance()->isAllowed(AclFonctionnalites::INVOICE_DISPLAY_CLIENT_CONTACT_DATA)) {\r\n $this->Cell($iWidth, 0, $this->translations['attn'] . ' ' . $this->structure['data']['first_page']['contact_client'], 0, 2);\r\n }\r\n\r\n $this->Cell($iWidth, 0, $this->structure['data']['first_page']['adresse_1'], 0, 2);\r\n if (! empty($this->structure['data']['first_page']['adresse_2'])) {\r\n $this->Cell($iWidth, 0, $this->structure['data']['first_page']['adresse_2'], 0, 2);\r\n }\r\n if (! empty($this->structure['data']['first_page']['adresse_3'])) {\r\n $this->Cell($iWidth, 0, $this->structure['data']['first_page']['adresse_3'], 0, 2);\r\n }\r\n $this->Cell($iWidth, 0, $this->structure['data']['first_page']['code_postal'] . ' ' . $this->structure['data']['first_page']['ville'], 0, 2);\r\n $this->Cell($iWidth, 0, $this->structure['data']['first_page']['pays'], 0, 2);\r\n\r\n // Drawing customer VAT registration number\r\n if ($sCustomerVatRegistrationNumber) {\r\n $this->SetY(76);\r\n $this->SetX($iXPosition);\r\n $this->Cell($iWidth, 0, $this->translations['header_customer_vat_registration_number'] . ' : ' . $sCustomerVatRegistrationNumber, 0, 2);\r\n }\r\n\r\n $this->SetY(max(array($iLeftY + (self::TEXT_MARGIN*2), 65)));\r\n }", "title": "" }, { "docid": "a5ef8ebdf2345a76abf50da2f00729aa", "score": "0.44773832", "text": "protected function paymentInformationTraitment ( $document, $header )\n\t\t{\n\t\t\t$this->currentPayment = $document->createElement( 'PmtInf' );\n\t\t\t$this->currentPayment->appendChild( $document->createElement( 'PmtInfId', $this->ref ) );\n\t\t\t$this->currentPayment->appendChild( $document->createElement( 'PmtMtd', \"TRF\" ) );\n\t\t\t$this->currentPayment->appendChild(\n\t\t\t\t$document->createElement( 'NbOfTxs', $this->transactionNumber )\n\t\t\t);\n\t\t\t$this->currentPayment->appendChild(\n\t\t\t\t$document->createElement( 'CtrlSum', $this->controlPrice )\n\t\t\t);\n\n\t\t\t$paymentTypeInformation = $document->createElement( 'PmtTpInf' );\n\t\t\t$instructionPriority = $document->createElement( 'InstrPrty', \"NORM\" );\n\t\t\t$paymentTypeInformation->appendChild( $instructionPriority );\n\t\t\t$this->currentPayment->appendChild( $paymentTypeInformation );\n\n\t\t\t$this->currentPayment->appendChild( $document->createElement( 'ReqdExctnDt', $header->getFormattedDate() ) );\n\t\t\t$debtor = $document->createElement( 'Dbtr' );\n\t\t\t$debtor->appendChild( $document->createElement( 'Nm', StringHelpers::sanitizeString( $this->debtorName ) ) );\n\t\t\t$this->currentPayment->appendChild( $debtor );\n\n\t\t\t$debtorAccount = $document->createElement( 'DbtrAcct' );\n\t\t\t$id = $document->createElement( 'Id' );\n\t\t\t$id->appendChild( $document->createElement( 'IBAN', $this->debtorIBAN ) );\n\t\t\t$debtorAccount->appendChild( $id );\n\t\t\t$this->currentPayment->appendChild( $debtorAccount );\n\t\t\t$debtorAgent = $document->createElement( 'DbtrAgt' );\n\t\t\t$finInstitution = $document->createElement( 'FinInstnId' );\n\t\t\t$finInstitution->appendChild( $document->createElement( 'BIC', $this->debtorBIC ) );\n\n\t\t\t$financialInstitutionId = $finInstitution;\n\t\t\t$debtorAgent->appendChild( $financialInstitutionId );\n\t\t\t$this->currentPayment->appendChild( $debtorAgent );\n\n\t\t\t$this->currentPayment->appendChild( $document->createElement( 'ChrgBr', 'DEBT' ) );\n\n\t\t}", "title": "" }, { "docid": "517e13f6b50de404a5a43147b63f1239", "score": "0.44736603", "text": "protected function customerDebitNoteUpdateBydebitNoteNumberRequest($debit_note_number, $debit_note)\n {\n // verify the required parameter 'debit_note_number' is set\n if ($debit_note_number === null || (is_array($debit_note_number) && count($debit_note_number) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $debit_note_number when calling customerDebitNoteUpdateBydebitNoteNumber'\n );\n }\n // verify the required parameter 'debit_note' is set\n if ($debit_note === null || (is_array($debit_note) && count($debit_note) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $debit_note when calling customerDebitNoteUpdateBydebitNoteNumber'\n );\n }\n\n $resourcePath = '/controller/api/v1/customerDebitNote/{debitNoteNumber}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($debit_note_number !== null) {\n $resourcePath = str_replace(\n '{' . 'debitNoteNumber' . '}',\n ObjectSerializer::toPathValue($debit_note_number),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($debit_note)) {\n $_tempBody = $debit_note;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json'],\n ['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('ipp-application-type');\n if ($apiKey !== null) {\n $headers['ipp-application-type'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('ipp-company-id');\n if ($apiKey !== null) {\n $headers['ipp-company-id'] = $apiKey;\n }\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "aa2a44790b36a2802eac38a24d70a22d", "score": "0.44442582", "text": "public function customerDebitNoteCreateLineAttachmentBydebitNoteNumberlineNumberAsyncWithHttpInfo($debit_note_number, $line_number)\n {\n $returnType = 'object';\n $request = $this->customerDebitNoteCreateLineAttachmentBydebitNoteNumberlineNumberRequest($debit_note_number, $line_number);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "8b3bdddf867f6cffd9b5c3475244f961", "score": "0.4408761", "text": "public function createCreditNoteAttachmentByFileNameRequest($creditNoteID, $fileName, $body)\n {\n // Verify the required parameter 'creditNoteID' is set\n\n if ($creditNoteID === null || (is_array($creditNoteID) && count($creditNoteID) === 0)) {\n throw new InvalidArgumentException(sprintf(\n 'Missing the required parameter $%s when calling %s',\n 'creditNoteID',\n 'createCreditNoteAttachmentByFileName'\n ));\n }\n // Verify the required parameter 'fileName' is set\n\n if ($fileName === null || (is_array($fileName) && count($fileName) === 0)) {\n throw new InvalidArgumentException(sprintf(\n 'Missing the required parameter $%s when calling %s',\n 'fileName',\n 'createCreditNoteAttachmentByFileName'\n ));\n }\n // Verify the required parameter 'body' is set\n\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new InvalidArgumentException(sprintf(\n 'Missing the required parameter $%s when calling %s',\n 'body',\n 'createCreditNoteAttachmentByFileName'\n ));\n }\n\n $resourcePath = '/CreditNotes/{CreditNoteID}/Attachments/{FileName}';\n $formParams = [];\n $queryParams = [];\n $httpBody = null;\n $multipart = false;\n\n \n\n// Path parameters\n if ($creditNoteID !== null) {\n $resourcePath = str_replace(\n '{' . 'CreditNoteID' . '}',\n ObjectSerializer::toPathValue($creditNoteID),\n $resourcePath\n );\n }\n\n if ($fileName !== null) {\n $resourcePath = str_replace(\n '{' . 'FileName' . '}',\n ObjectSerializer::toPathValue($fileName),\n $resourcePath\n );\n }\n\n\n // Body parameter\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/octet-stream']\n );\n }\n\n \n // For model (json/xml)\n\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present.\n\n if ($headers['Content-Type'] === 'application/json') {\n $httpBodyText = $this->jsonEncode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBodyText = $_tempBody;\n }\n\n $httpBody = $this->createStream($httpBodyText);\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n\n // FIXME: how do we do multiparts with PSR-7?\n // MultipartStream() is a Guzzle tool.\n\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = $this->createStream($this->jsonEncode($formParams));\n\n } else {\n // for HTTP post (form)\n $httpBody = $this->createStream($this->buildQuery($formParams));\n }\n }\n\n\n return $this->buildHttpRequest(\n $headers,\n $queryParams,\n $httpBody,\n 'PUT',\n $resourcePath\n );\n }", "title": "" }, { "docid": "faed5b34c29e9a1f30baebc5c61ebef0", "score": "0.43958923", "text": "public function customerDebitNoteGetBydebitNoteNumber($debit_note_number)\n {\n list($response) = $this->customerDebitNoteGetBydebitNoteNumberWithHttpInfo($debit_note_number);\n return $response;\n }", "title": "" }, { "docid": "5591112344fe941af5ecbe2f35b65507", "score": "0.43886995", "text": "public function templateHeader($template, $variables = NULL){\n\t\tif(!file_exists($template)){\n\t\t\tthrow new Exception('Template file not found');\n\t\t}\n\n\t\tif(is_array($variables)){ \n\t\t\t$this->headerVariables = $variables;\n\t\t}\n\n\t\t$this->headerTemplate = $template;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "953dfeda4548ea16d862e0724c26b0aa", "score": "0.43553764", "text": "public function insertHeader($header)\n {\n PurchaseOrder::create([\n 'numPO' => $header[\"numPo\"],\n 'vendor' => $header[\"vendor\"],\n 'responsibleEmployee' => (int)$header[\"id\"],\n 'date' => Carbon::parse($header[\"date\"])->format('Y-m-d'),\n 'validTo' => Carbon::parse($header[\"validTo\"])->format('Y-m-d'),\n 'transactionStatus' => 0,\n 'totalItem' => (int)$header[\"totalItem\"],\n 'freightIn' => (int)$header[\"freightIn\"],\n 'totalPrice' => (int)$header[\"totalPrice\"],\n 'totalDiscount' => (int)$header[\"totalDisc\"],\n 'totalPayment' => (int)$header[\"totalPayment\"]\n ]);\n }", "title": "" }, { "docid": "170a3571ce98fa78450a1cdffe42db60", "score": "0.43474662", "text": "public function customerDebitNoteReleaseDocumentBydebitNoteNumberWithHttpInfo($debit_note_number)\n {\n $returnType = '\\Ekstralys\\VismaNetApi\\Model\\ReleaseCustomerDebitNoteActionResultDto';\n $request = $this->customerDebitNoteReleaseDocumentBydebitNoteNumberRequest($debit_note_number);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Ekstralys\\VismaNetApi\\Model\\ReleaseCustomerDebitNoteActionResultDto',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "f06e2679d43c3f2e377d1a9f8a865831", "score": "0.43142956", "text": "public function customerInvoiceCreateHeaderAttachmentByinvoiceNumberAsync($invoice_number)\n {\n return $this->customerInvoiceCreateHeaderAttachmentByinvoiceNumberAsyncWithHttpInfo($invoice_number)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "d655a769fb8a4f4705a52c437ecb3e48", "score": "0.42679805", "text": "protected function customerDebitNotePrintBydebitNoteNumberRequest($debit_note_number)\n {\n // verify the required parameter 'debit_note_number' is set\n if ($debit_note_number === null || (is_array($debit_note_number) && count($debit_note_number) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $debit_note_number when calling customerDebitNotePrintBydebitNoteNumber'\n );\n }\n\n $resourcePath = '/controller/api/v1/customerDebitNote/{debitNoteNumber}/print';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($debit_note_number !== null) {\n $resourcePath = str_replace(\n '{' . 'debitNoteNumber' . '}',\n ObjectSerializer::toPathValue($debit_note_number),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('ipp-application-type');\n if ($apiKey !== null) {\n $headers['ipp-application-type'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('ipp-company-id');\n if ($apiKey !== null) {\n $headers['ipp-company-id'] = $apiKey;\n }\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "a59773eeb8e0081c638d659bc672f5e6", "score": "0.4238912", "text": "public function customerDebitNotePrintBydebitNoteNumberWithHttpInfo($debit_note_number)\n {\n $returnType = 'object';\n $request = $this->customerDebitNotePrintBydebitNoteNumberRequest($debit_note_number);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "ed3a00aea49308e29b23397b86d76972", "score": "0.41934362", "text": "public function customerDebitNoteCreateAsyncWithHttpInfo($debit_note)\n {\n $returnType = 'object';\n $request = $this->customerDebitNoteCreateRequest($debit_note);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "07f1b6611fa8c2bcf08518e16eea4dc4", "score": "0.41653743", "text": "public function createHeader($header, $value = null);", "title": "" }, { "docid": "4f0d7ca66a0b35ffabedbb906883153d", "score": "0.41629592", "text": "public function invoicesCreateCreditNote(string $id, Invoice $creditNote): Invoice\n {\n $parameters['credit_note'] = $creditNote->toArray(true);\n $rawData = $this->doCall('invoices/' . $id . '/credit_notes.json', $parameters, 'POST');\n\n return Invoice::initializeWithRawData($rawData);\n }", "title": "" }, { "docid": "0928916437b4c8724d51c04728f17547", "score": "0.41617265", "text": "public function customerInvoiceCreateLineAttachmentByinvoiceNumberlineNumber($invoice_number, $line_number)\n {\n list($response) = $this->customerInvoiceCreateLineAttachmentByinvoiceNumberlineNumberWithHttpInfo($invoice_number, $line_number);\n return $response;\n }", "title": "" }, { "docid": "e895a7bb71f3ab41e7ae829076cfb346", "score": "0.41508397", "text": "protected function journalTransactionCreateLineAttachmentByjournalTransactionNumberlineNumberRequest($journal_transaction_number, $line_number)\n {\n // verify the required parameter 'journal_transaction_number' is set\n if ($journal_transaction_number === null || (is_array($journal_transaction_number) && count($journal_transaction_number) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $journal_transaction_number when calling journalTransactionCreateLineAttachmentByjournalTransactionNumberlineNumber'\n );\n }\n // verify the required parameter 'line_number' is set\n if ($line_number === null || (is_array($line_number) && count($line_number) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $line_number when calling journalTransactionCreateLineAttachmentByjournalTransactionNumberlineNumber'\n );\n }\n\n $resourcePath = '/controller/api/v1/journaltransaction/{journalTransactionNumber}/{lineNumber}/attachment';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($journal_transaction_number !== null) {\n $resourcePath = str_replace(\n '{' . 'journalTransactionNumber' . '}',\n ObjectSerializer::toPathValue($journal_transaction_number),\n $resourcePath\n );\n }\n // path params\n if ($line_number !== null) {\n $resourcePath = str_replace(\n '{' . 'lineNumber' . '}',\n ObjectSerializer::toPathValue($line_number),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('ipp-application-type');\n if ($apiKey !== null) {\n $headers['ipp-application-type'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('ipp-company-id');\n if ($apiKey !== null) {\n $headers['ipp-company-id'] = $apiKey;\n }\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "71e7ec57fcc99733a662d13cd2ece12f", "score": "0.4142826", "text": "protected function customerDebitNoteReleaseDocumentBydebitNoteNumberRequest($debit_note_number)\n {\n // verify the required parameter 'debit_note_number' is set\n if ($debit_note_number === null || (is_array($debit_note_number) && count($debit_note_number) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $debit_note_number when calling customerDebitNoteReleaseDocumentBydebitNoteNumber'\n );\n }\n\n $resourcePath = '/controller/api/v1/customerDebitNote/{debitNoteNumber}/action/release';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($debit_note_number !== null) {\n $resourcePath = str_replace(\n '{' . 'debitNoteNumber' . '}',\n ObjectSerializer::toPathValue($debit_note_number),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('ipp-application-type');\n if ($apiKey !== null) {\n $headers['ipp-application-type'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('ipp-company-id');\n if ($apiKey !== null) {\n $headers['ipp-company-id'] = $apiKey;\n }\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "838837673b69fe6619f9e693ac6be0e7", "score": "0.41013002", "text": "public function journalTransactionCreateLineAttachmentByjournalTransactionNumberlineNumberWithHttpInfo($journal_transaction_number, $line_number)\n {\n $returnType = 'object';\n $request = $this->journalTransactionCreateLineAttachmentByjournalTransactionNumberlineNumberRequest($journal_transaction_number, $line_number);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 201:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "9e68f7e55ccc5b3e857520900d7983d7", "score": "0.40812218", "text": "public function view_credit_note($credit_note_number=0) {\n $credit_note_number = $this->input->get('q');\n $data['sideMenuData'] = fetch_non_main_page_content();\n $data['page_title'] = 'Credit Notes';\n $data['tabledata'] = $this->classTraineeModel->get_credit_note($credit_note_number);\n $data['main_content'] = 'classtrainee/view_credit_note';\n $this->load->view('layout', $data);\n }", "title": "" }, { "docid": "8d2ec98c93806e279774e4dd822c688c", "score": "0.4029349", "text": "private function drawPaymentHeader() {\n\t\t// Add a heading above the table\n\t\t$this->drawTableHeading(Language::_(\"PdfInvoice.payments_heading\", true));\n\t\t\n\t\t// Use the same options as line items\n\t\t$options = $this->payment_options;\n\t\t// Start header at top of page, or current page below the other table\n\t\t$options['y_pos'] = max($this->table_heading_y_pos, $this->GetY());\n\t\t\n\t\t// Draw the transaction payment header\n\t\t$options['row'] = array(array('font_size'=>self::$font_size_alt2,'fill_color'=>self::$primary_text_color, 'border'=>\"0\",'align'=>'C','text_color'=>array(255,255,255)));\n\t\t\n\t\t$header = array(array(\n\t\t\t'applied_date' => Language::_(\"PdfInvoice.payments_applied_date\", true),\n\t\t\t'type_name' => Language::_(\"PdfInvoice.payments_type_name\", true),\n\t\t\t'transaction_id' => Language::_(\"PdfInvoice.payments_transaction_id\", true),\n\t\t\t'applied_amount' => Language::_(\"PdfInvoice.payments_applied_amount\", true)\n\t\t));\n\t\t\n\t\t$this->drawTable($header, $options);\n\t}", "title": "" }, { "docid": "77e15c8cb40d2b0b34d3b92dd1c2244d", "score": "0.40284762", "text": "public function customerInvoiceCreateHeaderAttachmentByinvoiceNumberAsyncWithHttpInfo($invoice_number)\n {\n $returnType = 'object';\n $request = $this->customerInvoiceCreateHeaderAttachmentByinvoiceNumberRequest($invoice_number);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "a8bcc95b3c8a6709a78040d5ad809f17", "score": "0.40177494", "text": "public function customerDebitNoteGetBydebitNoteNumberAsyncWithHttpInfo($debit_note_number)\n {\n $returnType = '\\Ekstralys\\VismaNetApi\\Model\\CustomerDebitNoteDto';\n $request = $this->customerDebitNoteGetBydebitNoteNumberRequest($debit_note_number);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "8a582a3b42cc9169847740bbbe925b62", "score": "0.40103927", "text": "public function getCreditNoteAttachmentByFileNameRequest($creditNoteID, $fileName, $contentType)\n {\n // Verify the required parameter 'creditNoteID' is set\n\n if ($creditNoteID === null || (is_array($creditNoteID) && count($creditNoteID) === 0)) {\n throw new InvalidArgumentException(sprintf(\n 'Missing the required parameter $%s when calling %s',\n 'creditNoteID',\n 'getCreditNoteAttachmentByFileName'\n ));\n }\n // Verify the required parameter 'fileName' is set\n\n if ($fileName === null || (is_array($fileName) && count($fileName) === 0)) {\n throw new InvalidArgumentException(sprintf(\n 'Missing the required parameter $%s when calling %s',\n 'fileName',\n 'getCreditNoteAttachmentByFileName'\n ));\n }\n // Verify the required parameter 'contentType' is set\n\n if ($contentType === null || (is_array($contentType) && count($contentType) === 0)) {\n throw new InvalidArgumentException(sprintf(\n 'Missing the required parameter $%s when calling %s',\n 'contentType',\n 'getCreditNoteAttachmentByFileName'\n ));\n }\n\n $resourcePath = '/CreditNotes/{CreditNoteID}/Attachments/{FileName}';\n $formParams = [];\n $queryParams = [];\n $httpBody = null;\n $multipart = false;\n\n \n\n// Path parameters\n if ($creditNoteID !== null) {\n $resourcePath = str_replace(\n '{' . 'CreditNoteID' . '}',\n ObjectSerializer::toPathValue($creditNoteID),\n $resourcePath\n );\n }\n\n if ($fileName !== null) {\n $resourcePath = str_replace(\n '{' . 'FileName' . '}',\n ObjectSerializer::toPathValue($fileName),\n $resourcePath\n );\n }\n\n\n // Body parameter\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/octet-stream']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/octet-stream'],\n []\n );\n }\n\n // Header parameters\n if ($contentType !== null) {\n $headers['contentType'] = ObjectSerializer::toHeaderValue($contentType);\n }\n\n // For model (json/xml)\n\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present.\n\n if ($headers['Content-Type'] === 'application/json') {\n $httpBodyText = $this->jsonEncode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBodyText = $_tempBody;\n }\n\n $httpBody = $this->createStream($httpBodyText);\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n\n // FIXME: how do we do multiparts with PSR-7?\n // MultipartStream() is a Guzzle tool.\n\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = $this->createStream($this->jsonEncode($formParams));\n\n } else {\n // for HTTP post (form)\n $httpBody = $this->createStream($this->buildQuery($formParams));\n }\n }\n\n\n return $this->buildHttpRequest(\n $headers,\n $queryParams,\n $httpBody,\n 'GET',\n $resourcePath\n );\n }", "title": "" }, { "docid": "d01ddec6028d0d14eba9201d98d490fd", "score": "0.39576483", "text": "protected function customerInvoiceCreateLineAttachmentByinvoiceNumberlineNumberRequest($invoice_number, $line_number)\n {\n // verify the required parameter 'invoice_number' is set\n if ($invoice_number === null || (is_array($invoice_number) && count($invoice_number) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $invoice_number when calling customerInvoiceCreateLineAttachmentByinvoiceNumberlineNumber'\n );\n }\n // verify the required parameter 'line_number' is set\n if ($line_number === null || (is_array($line_number) && count($line_number) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $line_number when calling customerInvoiceCreateLineAttachmentByinvoiceNumberlineNumber'\n );\n }\n\n $resourcePath = '/controller/api/v1/customerinvoice/{invoiceNumber}/{lineNumber}/attachment';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($invoice_number !== null) {\n $resourcePath = str_replace(\n '{' . 'invoiceNumber' . '}',\n ObjectSerializer::toPathValue($invoice_number),\n $resourcePath\n );\n }\n // path params\n if ($line_number !== null) {\n $resourcePath = str_replace(\n '{' . 'lineNumber' . '}',\n ObjectSerializer::toPathValue($line_number),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('ipp-application-type');\n if ($apiKey !== null) {\n $headers['ipp-application-type'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('ipp-company-id');\n if ($apiKey !== null) {\n $headers['ipp-company-id'] = $apiKey;\n }\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "3a57591f3d0006ca81fa48b6e27e2f90", "score": "0.39561078", "text": "public function addCustomerHeader($custom_header) {\n $this->_mail->AddCustomHeader($custom_header);\n }", "title": "" }, { "docid": "27a6f01c8add977152e16268dabaf1b5", "score": "0.39560476", "text": "public function customerDebitNotePrintBydebitNoteNumber($debit_note_number)\n {\n list($response) = $this->customerDebitNotePrintBydebitNoteNumberWithHttpInfo($debit_note_number);\n return $response;\n }", "title": "" }, { "docid": "cd0da8b6b0fcfc097a3b6a746cf218e8", "score": "0.39385927", "text": "public function createBankTransactionAttachmentByFileNameRequest($bankTransactionID, $fileName, $body)\n {\n // Verify the required parameter 'bankTransactionID' is set\n\n if ($bankTransactionID === null || (is_array($bankTransactionID) && count($bankTransactionID) === 0)) {\n throw new InvalidArgumentException(sprintf(\n 'Missing the required parameter $%s when calling %s',\n 'bankTransactionID',\n 'createBankTransactionAttachmentByFileName'\n ));\n }\n // Verify the required parameter 'fileName' is set\n\n if ($fileName === null || (is_array($fileName) && count($fileName) === 0)) {\n throw new InvalidArgumentException(sprintf(\n 'Missing the required parameter $%s when calling %s',\n 'fileName',\n 'createBankTransactionAttachmentByFileName'\n ));\n }\n // Verify the required parameter 'body' is set\n\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new InvalidArgumentException(sprintf(\n 'Missing the required parameter $%s when calling %s',\n 'body',\n 'createBankTransactionAttachmentByFileName'\n ));\n }\n\n $resourcePath = '/BankTransactions/{BankTransactionID}/Attachments/{FileName}';\n $formParams = [];\n $queryParams = [];\n $httpBody = null;\n $multipart = false;\n\n \n\n// Path parameters\n if ($bankTransactionID !== null) {\n $resourcePath = str_replace(\n '{' . 'BankTransactionID' . '}',\n ObjectSerializer::toPathValue($bankTransactionID),\n $resourcePath\n );\n }\n\n if ($fileName !== null) {\n $resourcePath = str_replace(\n '{' . 'FileName' . '}',\n ObjectSerializer::toPathValue($fileName),\n $resourcePath\n );\n }\n\n\n // Body parameter\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/octet-stream']\n );\n }\n\n \n // For model (json/xml)\n\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present.\n\n if ($headers['Content-Type'] === 'application/json') {\n $httpBodyText = $this->jsonEncode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBodyText = $_tempBody;\n }\n\n $httpBody = $this->createStream($httpBodyText);\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n\n // FIXME: how do we do multiparts with PSR-7?\n // MultipartStream() is a Guzzle tool.\n\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = $this->createStream($this->jsonEncode($formParams));\n\n } else {\n // for HTTP post (form)\n $httpBody = $this->createStream($this->buildQuery($formParams));\n }\n }\n\n\n return $this->buildHttpRequest(\n $headers,\n $queryParams,\n $httpBody,\n 'PUT',\n $resourcePath\n );\n }", "title": "" }, { "docid": "36e8d469445db4efe579a99a483cfae2", "score": "0.39382544", "text": "public function getCreditNoteAttachmentByIdRequest($creditNoteID, $attachmentID, $contentType)\n {\n // Verify the required parameter 'creditNoteID' is set\n\n if ($creditNoteID === null || (is_array($creditNoteID) && count($creditNoteID) === 0)) {\n throw new InvalidArgumentException(sprintf(\n 'Missing the required parameter $%s when calling %s',\n 'creditNoteID',\n 'getCreditNoteAttachmentById'\n ));\n }\n // Verify the required parameter 'attachmentID' is set\n\n if ($attachmentID === null || (is_array($attachmentID) && count($attachmentID) === 0)) {\n throw new InvalidArgumentException(sprintf(\n 'Missing the required parameter $%s when calling %s',\n 'attachmentID',\n 'getCreditNoteAttachmentById'\n ));\n }\n // Verify the required parameter 'contentType' is set\n\n if ($contentType === null || (is_array($contentType) && count($contentType) === 0)) {\n throw new InvalidArgumentException(sprintf(\n 'Missing the required parameter $%s when calling %s',\n 'contentType',\n 'getCreditNoteAttachmentById'\n ));\n }\n\n $resourcePath = '/CreditNotes/{CreditNoteID}/Attachments/{AttachmentID}';\n $formParams = [];\n $queryParams = [];\n $httpBody = null;\n $multipart = false;\n\n \n\n// Path parameters\n if ($creditNoteID !== null) {\n $resourcePath = str_replace(\n '{' . 'CreditNoteID' . '}',\n ObjectSerializer::toPathValue($creditNoteID),\n $resourcePath\n );\n }\n\n if ($attachmentID !== null) {\n $resourcePath = str_replace(\n '{' . 'AttachmentID' . '}',\n ObjectSerializer::toPathValue($attachmentID),\n $resourcePath\n );\n }\n\n\n // Body parameter\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/octet-stream']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/octet-stream'],\n []\n );\n }\n\n // Header parameters\n if ($contentType !== null) {\n $headers['contentType'] = ObjectSerializer::toHeaderValue($contentType);\n }\n\n // For model (json/xml)\n\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present.\n\n if ($headers['Content-Type'] === 'application/json') {\n $httpBodyText = $this->jsonEncode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBodyText = $_tempBody;\n }\n\n $httpBody = $this->createStream($httpBodyText);\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n\n // FIXME: how do we do multiparts with PSR-7?\n // MultipartStream() is a Guzzle tool.\n\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = $this->createStream($this->jsonEncode($formParams));\n\n } else {\n // for HTTP post (form)\n $httpBody = $this->createStream($this->buildQuery($formParams));\n }\n }\n\n\n return $this->buildHttpRequest(\n $headers,\n $queryParams,\n $httpBody,\n 'GET',\n $resourcePath\n );\n }", "title": "" }, { "docid": "8be0a7e0c7422e21445ab905537a0709", "score": "0.3916057", "text": "public function customerDebitNoteReleaseDocumentBydebitNoteNumber($debit_note_number)\n {\n list($response) = $this->customerDebitNoteReleaseDocumentBydebitNoteNumberWithHttpInfo($debit_note_number);\n return $response;\n }", "title": "" }, { "docid": "280362cc683c31e749bd574cd3540d01", "score": "0.3901459", "text": "function ToHeader() \n\t{ \n\t\t$attachmentData = $this->GetContent(); //** get content for the header.\n\t\tif($attachmentData == null) //** no valid attachment content.\n \t\treturn null; //** no header can be generted. \n\n\t\t//** add the content type and file name of the attachment. \n\t\t$header = \"Content-Type: $this->ContentType;\"; \n\n\t\t//** if an attachment then add the appropriate disposition and file name(s).\n\t\tif(!$this->HasLiteralContent())\n \t{\n \t\t$header .= \" name=\\\"\" . basename($this->FilePath) . \"\\\"\" . EmailNewLine .\n \"Content-Disposition: attachment; filename=\\\"\" . \n basename($this->FilePath) . \"\\\"\"; \n\t\t}\n \n\t\t$header .= EmailNewLine;\n\n\t\t//** add the key for the content encoding of the attachment body to follow. \n\t\t$header .= \"Content-Transfer-Encoding: base64\" . EmailNewLine . \n EmailNewLine; \n\n\t\t//** add the attachment data to the header. encode the binary data in BASE64 \n\t\t//** and break the encoded data into the appropriate chunks. \n\n \t$header .= chunk_split(base64_encode($attachmentData), 76, EmailNewLine) .\n EmailNewLine; \n\n \treturn $header; //** return the headers generated by file. \n \t}", "title": "" }, { "docid": "7f6b505e6242d2d62bb303493b253297", "score": "0.38958475", "text": "public function beforeInsertDocumentNumber(\n \\Webkul\\Marketplace\\Model\\Order\\Pdf\\Creditmemo $pdfCreditmemo,\n $page,\n $text\n ) {\n $creditmemoArr = explode(__('Credit Memo # '), $text);\n\n $creditmemoIncrementedId = $creditmemoArr[1];\n $creditmemoIds = $pdfCreditmemo->getObjectManager()->create(\n 'Magento\\Sales\\Model\\Order\\Creditmemo'\n )->getCollection()\n ->addAttributeToFilter('increment_id', $creditmemoIncrementedId)\n ->getAllIds();\n if ($creditmemoIds) {\n $creditmemo = $pdfCreditmemo->getObjectManager()->create(\n 'Magento\\Sales\\Model\\Order\\Creditmemo'\n )->load($creditmemoIds);\n $payment = $creditmemo->getOrder()->getPayment();\n if (!empty($payment->getMethodInstance())) {\n $method = $payment->getMethodInstance();\n $paymentInfo = $method->getTitle();\n } else {\n $paymentData = $creditmemo->getOrder()->getPayment()->getData();\n if (!empty($paymentData['additional_information']['method_title'])) {\n $paymentInfo = $paymentData['additional_information']['method_title'];\n } else {\n $paymentInfo = $paymentData['method'];\n }\n }\n /* Payment */\n $yPayments = $pdfCreditmemo->y + 65;\n if (!$creditmemo->getOrder()->getIsVirtual()) {\n $paymentLeft = 35;\n } else {\n $yPayments = $yPayments + 15;\n $paymentLeft = 285;\n }\n foreach ($pdfCreditmemo->getString()->split($paymentInfo, 45, true, true) as $_value) {\n $page->drawText(strip_tags(trim($_value)), $paymentLeft, $yPayments, 'UTF-8');\n $yPayments -= 15;\n }\n }\n }", "title": "" }, { "docid": "a474912e3bb8a94ece7b9718abfd849d", "score": "0.3887457", "text": "function Header()\n\t{\n\t\t$this->SetFont('Arial','B',30);\n\t\t$this->SetTextColor(224,224,224);\n\t\t$this->RotatedText(35,220,'BPMS Service - Order Bill Details',45); //watermark in every page\n\n\t}", "title": "" }, { "docid": "b19c2f736788436e48c26c79ff3ed8c4", "score": "0.38806906", "text": "public function customerDebitNoteGetBydebitNoteNumberAsync($debit_note_number)\n {\n return $this->customerDebitNoteGetBydebitNoteNumberAsyncWithHttpInfo($debit_note_number)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "f90ffd7790da2d4533a1829561be3994", "score": "0.385817", "text": "public function render_page_header()\n {\n\n // Invoice number\n $this->style('b');\n $document_name = $this->invoiceType == 'invoice' ? $this->invoiceOptions['woo_pdf_document_name'] : $this->invoiceOptions['woo_pdf_proforma_name'];\n $this->MultiCell(145, 0, $this->decode($document_name), $this->showBorders, 'L', 0, 1, 320, 40, true, 0, false, false, 80, 'T', false);\n $this->MultiCell(95, 0, $this->decode($this->invoiceInfo['prefix']) . ' ' . $this->invoiceInfo['id'] . ' ' . $this->decode($this->invoiceInfo['suffix']), $this->showBorders, 'R', 0, 1, 465, 40, true, 0, false, false, 80, 'T', false);\n\n // Invoice date\n $this->style();\n $this->MultiCell(145, 0, $this->decode($this->invoiceOptions['woo_pdf_title_date']), $this->showBorders, 'L', 0, 1, 320, 55, true, 0, false, false, 80, 'T', false);\n $this->MultiCell(95, 0, $this->date(), $this->showBorders, 'R', 0, 1, 465, 55, true, 0, false, false, 80, 'T', false);\n\n // Order amount\n $this->style();\n $this->MultiCell(145, 0, $this->decode($this->invoiceOptions['woo_pdf_title_amount']) . ' (' . $this->decode($this->currency(false)) . ')', $this->showBorders, 'L', 0, 1, 320, 68, true, 0, false, false, 80, 'T', false);\n $this->MultiCell(95, 0, $this->format_currency($this->total()), $this->showBorders, 'R', 0, 1, 465, 68, true, 0, false, false, 80, 'T', false);\n\n }", "title": "" }, { "docid": "e511ed3eb5f4919ee93e007bd4cb58a9", "score": "0.38380995", "text": "public function InsertBodyDB(&$Tran,$header_id,$user_account,$filename)\n\t{\n\t\tif (self::CheckDuplicatePOBody($this->getBEG()->getBEG03())) {\n\t\t\tthrow new Exception(\"This purchase order is already exist.po number:\".$this->getBEG()->getBEG03());\n\t\t}\n\t\t$query =\"INSERT INTO \".self::AMAZON_BODY_TABLE.\"( \n\t\t\theader_id,\n\t\t\tst_trans_set_id,\n\t\t\tst_trans_set_num,\n\t\t\t\";\n\t\t$query.=\"beg_trans_set_id,\n\t\t\tbeg_po_type,\n\t\t\tpo_number,\n\t\t\tbeg_po_date,\";\n\t\t$query.=\"\n\t\t\tctt_hash,\";\n\t\t$query.=\"\n\t\t\tn1_ST_name,\n\t\t\tn1_ST_n3,\n\t\t\tn1_ST_n4_city,\n\t\t\tn1_ST_n4_province,\n\t\t\tn1_ST_n4_postal,\n\t\t\tn1_ST_n4_country,\n\t\t\ttd5_shippment_method,\";\n\t\t$query.=\"\n\t\t\tn1_SF_code,\n\t\t\t\";\n\t\t$query.=\"\n\t\t\tse_segment,\n\t\t\tse_trans_set_control,\n\t\t\ttotal_revenue,\n\t\t\tuser_account\";\n\t\t$query.=\") VALUES (\";\n\t\t$query.=\"'$header_id',\";\n\t\t$query.= $this->getST()->QueryValuesString().\",\";\n\t\t$query.= $this->getBEG()->QueryValueStringWithOutIndex(4).\",\";\n\t\t$query.= $this->getCTT()->getCTT02().\",\";\n\t\t$query.= \"'\".Milk_EDI::sql_string($this->getReviver()->getName()).\"','\".Milk_EDI::sql_string($this->getReviver()->getN3Address()) ;\n\t\t$query.=\"','\".$this->getReviver()->getN4city().\"','\".$this->getReviver()->getN4province().\"','\".$this->getReviver()->getN4postal().\"','\".$this->getReviver()->getN4country().\"','\";\n\t\t$query.= $this->getReviver()->getTD5_method().\"',\";\n\t\t$query.= \"'\".$this->getN1SF_code().\"',\";\n\t\t$query.= $this->getSE()->QueryValuesString().\",'\";\n\t\t$query.= $this->getOrderTotalRevenue().\"','\";\n\t\t$query.= $user_account.\"'\";\n\t\t$query.=\")\";\t\t\n\t\t$result \t\t\t\t= self::queryInsertWithTran($query,$Tran);\n\t\tif ($result) {\n\t\t\t//insert edi log\n\t\t\t$date \t\t\t\t= Milk_EDIfunctionl::yymmdd();\n\t\t\t$po_number \t\t\t= $this->getPONum();\n\t\t\t$log_flag \t\t\t= EDILog::InsertEDILog($Tran,$user_account,$po_number,EDILog::ORDER_TYPE_DS);\n\t\t\t$insert_id \t\t\t= $Tran ->insert_id;\n\t\t\tif (!Milk_EDIfunctionl::CreateDirectory($date)||!Milk_EDIfunctionl::CreateDirectory($date.\"/\".$insert_id)) {\n\t\t\t\tthrow new Exception(\"Fail to Create Directory \".$date.\"/\".$insert_id);\n\t\t\t}\n\t\t\t//update and move edi 850 file saved path\n\t\t\t$newpath \t\t\t= Milk_EDIConfig::SAVED_PATH.$date.\"/\".$insert_id.'/850';\n\t\t\t$move_flag \t\t\t= Milk_EDIfunctionl::MoveToTargetFolder($filename,$newpath);\n\t\t\tif (!$move_flag) {\n\t\t\t\tthrow new Exception(\"Fail to copy original 850 into Files folder $filename\");\t\n\t\t\t}\n\t\t\t$this->header_path \t= Milk_EDIConfig::SAVED_PATH.$date.\"/\".$insert_id.\"/\";\n\t\t\t//update and move edi 850 body file to saved path\n\t\t\t$path \t\t\t\t= $this->header_path.$this->getPONum();\n\t\t\t$save_flag \t\t\t= $this->SavePOFileInPath($path);\n\t\t\tif ($save_flag) {\n\t\t\t\t$update_flag \t= $this->UpdatePath($Tran,$path);\n\t\t\t\tif (!$update_flag) {\n\t\t\t\t\tthrow new Exception(\"fail to update po path, po: \".$this->getPONum());\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tthrow new Exception(\"fail to save po in target directory: \".$path);\n\t\t\t}\n\t\t\t$flag \t\t\t\t= $this->InsertDetailDB($Tran,$header_id,$user_account);\n\t\t\tif (!$flag) {\n\t\t\t\treturn $flag;\n\t\t\t}else{\n\t\t\t\treturn true; \n\t\t\t}\n\t\t}else{\n\t\t\tthrow new Exception(\"Fail to insert 850 body\");\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "0b0644becaa32289076e0886581aab43", "score": "0.3826816", "text": "public function getImageNtHeaders(ImageDosHeader &$dosHeader = null)\n {\n // IMAGE_NT_HEADERS(IMAGE_FILE_HEADER and IMAGE_OPTIONAL_HEADER)\n if ($dosHeader === null)\n $dosHeader = $this->getImageDosHeader();\n\n $header = new ImageNtHeaders();\n\n // move to IMAGE_NT_HEADER's offset of file\n $header->signature = $this->_streamio->read(4, $dosHeader->lfanew)->toString();\n\n // get IMAGE_FILE_HEADER\n $header->fileheader->machine = $this->_streamio->read(2)->toInteger();\n $header->fileheader->numberOfSections = $this->_streamio->read(2)->toInteger();\n $header->fileheader->timeDateStamp = $this->_streamio->read(4)->toInteger();\n $header->fileheader->pointerToSymbolTable = $this->_streamio->read(4)->toInteger();\n $header->fileheader->numberOfSymbols = $this->_streamio->read(4)->toInteger();\n $header->fileheader->sizeOfOptionalHeader = $this->_streamio->read(2)->toInteger();\n $header->fileheader->characteristics = $this->_streamio->read(2)->toInteger();\n\n // get IMAGE_OPTIONAL_HEADER\n // The size of IMAGE_OPTIONAL_HEADER is put into `$header->fileheader->sizeOfOptionalHeader`.\n\n // The magic parameter of IMAGE_OPTIONAL_HEADER is 0x10B to 32bit mode of operating system.\n // This parameger on 64bit mode of operating system is 0x20B.\n $header->optionalheader->magic = $this->_streamio->read(2)->toInteger();\n $header->optionalheader->majorLinkerVersion = $this->_streamio->read(1)->toInteger();\n $header->optionalheader->minorLinkerVersion = $this->_streamio->read(1)->toInteger();\n $header->optionalheader->sizeOfCode = $this->_streamio->read(4)->toInteger();\n $header->optionalheader->sizeOfInitializedData = $this->_streamio->read(4)->toInteger();\n $header->optionalheader->sizeOfUninitializedData = $this->_streamio->read(4)->toInteger();\n $header->optionalheader->addressOfEntryPoint = $this->_streamio->read(4)->toInteger();\n $header->optionalheader->baseOfCode = $this->_streamio->read(4)->toInteger();\n // The BaseOfData field of IMAGE_OPTIONAL_HEADER is not used to x64 platform.\n $header->optionalheader->baseOfData = 0;\n $header->optionalheader->imageBase = $this->_streamio->read(8)->toInteger();\n $header->optionalheader->sectionAlignment = $this->_streamio->read(4)->toInteger();\n $header->optionalheader->fileAlignment = $this->_streamio->read(4)->toInteger();\n $header->optionalheader->majorOperatingSystemVersion = $this->_streamio->read(2)->toInteger();\n $header->optionalheader->minorOperatingSystemVersion = $this->_streamio->read(2)->toInteger();\n $header->optionalheader->majorImageVersion = $this->_streamio->read(2)->toInteger();\n $header->optionalheader->minorImageVersion = $this->_streamio->read(2)->toInteger();\n $header->optionalheader->majorSubsystemVersion = $this->_streamio->read(2)->toInteger();\n $header->optionalheader->minorSubsystemVersion = $this->_streamio->read(2)->toInteger();\n $header->optionalheader->win32VersionValue = $this->_streamio->read(4)->toInteger();\n $header->optionalheader->sizeOfImage = $this->_streamio->read(4)->toInteger();\n $header->optionalheader->sizeOfHeaders = $this->_streamio->read(4)->toInteger();\n $header->optionalheader->checksum = $this->_streamio->read(4)->toInteger();\n $header->optionalheader->subsystem = $this->_streamio->read(2)->toInteger();\n $header->optionalheader->dllCharacteristics = $this->_streamio->read(2)->toInteger();\n $header->optionalheader->sizeOfStackReserve = $this->_streamio->read(8)->toInteger();\n $header->optionalheader->sizeOfStackCommit = $this->_streamio->read(8)->toInteger();\n $header->optionalheader->sizeOfHeapReserve = $this->_streamio->read(8)->toInteger();\n $header->optionalheader->sizeOfHeapCommit = $this->_streamio->read(8)->toInteger();\n $header->optionalheader->loaderFlags = $this->_streamio->read(4)->toInteger();\n $header->optionalheader->numberOfRvaAndSizes = $this->_streamio->read(4)->toInteger();\n\n for ($i = 0; $i < ImageOptionalHeader::IMAGE_NUMBEROF_DIRECTORY_ENTRIES; $i++)\n {\n $header->optionalheader->dataDirectory[$i] = new ImageDataDirectory();\n $header->optionalheader->dataDirectory[$i]->virtualAddress = $this->_streamio->read(4)->toInteger();\n $header->optionalheader->dataDirectory[$i]->size = $this->_streamio->read(4)->toInteger();\n }\n\n return $header;\n }", "title": "" }, { "docid": "9fb5a78a935af6edb8bf6cf7fb3f8a97", "score": "0.38143525", "text": "function get_message_header_by_number($number)\n\t{\n\t\treturn $this->call(\"Mail.GetMessageHeaderByNumber?number=\".urlencode($number));\n\t}", "title": "" }, { "docid": "6e9fe11b69a818aa1de50e8a5191e4de", "score": "0.38127884", "text": "public function journalTransactionCreateLineAttachmentByjournalTransactionNumberlineNumberAsync($journal_transaction_number, $line_number)\n {\n return $this->journalTransactionCreateLineAttachmentByjournalTransactionNumberlineNumberAsyncWithHttpInfo($journal_transaction_number, $line_number)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "1aff9e9891f140db5049f29b8d782d3f", "score": "0.38109314", "text": "public function getCreditNoteAttachmentByFileName($creditNoteID, $fileName, $contentType)\n {\n ['model' => $model, 'request' => $request, 'response' => $response]\n = $this->getCreditNoteAttachmentByFileNameWithHttpInfo($creditNoteID, $fileName, $contentType);\n\n $statusCode = (int)$response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $request,\n $response,\n $model\n );\n }\n\n return $model;\n }", "title": "" }, { "docid": "5c839551137a7d585f0e4185abcb3ec0", "score": "0.3792829", "text": "public function customerDebitNoteUpdateBydebitNoteNumber($debit_note_number, $debit_note)\n {\n list($response) = $this->customerDebitNoteUpdateBydebitNoteNumberWithHttpInfo($debit_note_number, $debit_note);\n return $response;\n }", "title": "" }, { "docid": "5b66fb1af3f7ba44bd58dbff948add97", "score": "0.37898824", "text": "protected function _addCN22Header()\n {\n $this->font($this->getFont(), 'B', 6);\n $this->setLineHeight(1.4);\n $this->_addImage('swiss_post_en_logo.jpg', self::LINEBEGIN, $this->_iPosition+1, 6);\n $this->text(self::LINEBEGIN + 29, $this->_iPosition + 1, 'Déclaration en douane / Zolldeklaration / Customs Declaration');\n\n $this->font($this->getFont(), 'B', 14);\n $sFormType = 'CN 22';\n $this->text($this->alignRightToColumn(self::LINEEND, $sFormType), $this->_iPosition+1, $sFormType);\n $this->font($this->getFont(), 'B', 6);\n $this->_iPosition = $this->nextLine($this->_iPosition);\n $this->font($this->getFont(), '', 5);\n $this->text(self::LINEBEGIN + 29, $this->_iPosition, 'Peut être ouvert d‘office / Zollamtliche Prüfung gestattet / May be opened officially');\n $this->_iPosition = $this->nextLine($this->_iPosition);\n }", "title": "" }, { "docid": "8f484715371bc0039b5cbdccba51952c", "score": "0.37701923", "text": "public function messageHeaders($messageNumber)\n\t{\n\t\treturn imap_headerinfo($this->stream(), $messageNumber);\n\t}", "title": "" }, { "docid": "a114580be6cf10b4c21d5bfc0b86719b", "score": "0.37642446", "text": "public function getBlockHeader($blockNumber)\n\t{\n\t\ttry {\n\t\t\treturn $this->client->call('database_api', 'get_block_header', [SteemHelper::filterInt($blockNumber)]);\n\t\t} catch (\\Exception $e) {\n\t\t\treturn SteemHelper::handleError($e);\n\t\t}\n\t}", "title": "" }, { "docid": "1d42b0cc4039bd7f7c503f096c1045c0", "score": "0.37537965", "text": "public function customerDebitNoteReleaseDocumentBydebitNoteNumberAsyncWithHttpInfo($debit_note_number)\n {\n $returnType = '\\Ekstralys\\VismaNetApi\\Model\\ReleaseCustomerDebitNoteActionResultDto';\n $request = $this->customerDebitNoteReleaseDocumentBydebitNoteNumberRequest($debit_note_number);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "3533a39aed36af99e66d680d4397c5a0", "score": "0.3750224", "text": "function theme_print_pdf_tcpdf_header($vars) {\n global $base_url;\n\n $pdf = $vars['pdf'];\n preg_match('!<div class=\"print-logo\">(.*?)</div>!si', $vars['html'], $tpl_logo);\n preg_match('!<title>(.*?)</title>!si', $vars['html'], $tpl_title);\n preg_match('!<div class=\"print-site_name\">(.*?)</div>!si', $vars['html'], $tpl_site_name);\n\n $ratio = 0;\n $logo = '';\n if (isset($tpl_logo[1]) && preg_match('!src\\s*=\\s*(?:\"(.*?)\"|\\'(.*?)\\'|([^\\s]*))!i', $tpl_logo[1], $logo_url)) {\n $logo = $logo_url[1];\n\n // Make logo relative again\n $logo = preg_replace(\"!^$base_url(.*)!sm\", dirname($_SERVER['SCRIPT_FILENAME']) . '$1', $logo);\n\n if (!empty($logo)) {\n $size = getimagesize($logo);\n $ratio = $size ? ($size[0] / $size[1]) : 0;\n }\n }\n\n // set header font\n $pdf->setHeaderFont($vars['font']);\n // set header margin\n $pdf->setHeaderMargin(5);\n // set header data\n $pdf->setHeaderData($logo, 10 * $ratio, html_entity_decode($tpl_title[1], ENT_QUOTES, 'UTF-8'), html_entity_decode(strip_tags($tpl_site_name[1]), ENT_QUOTES, 'UTF-8'));\n\n return $pdf;\n}", "title": "" }, { "docid": "4e0d0db0854bf9dcc9c68b48626e3009", "score": "0.37446797", "text": "public function pdfHeader($oPdf)\n {\n }", "title": "" }, { "docid": "d65ddd4f58a61c6a724fda8bdcf860ae", "score": "0.3741296", "text": "protected function createFileHeader()\n {\n $time = date(\"F j, Y, g:i a\");\n $by = $this->centreon->user->get_name();\n $len = $this->writeText(\"###################################################################\\n\");\n $this->writeText(\"# #\\n\");\n $this->writeText(\"# GENERATED BY CENTREON #\\n\");\n $this->writeText(\"# #\\n\");\n $this->writeText(\"# Developped by : #\\n\");\n $this->writeText(\"# - Julien Mathis #\\n\");\n $this->writeText(\"# - Romain Le Merlus #\\n\");\n $this->writeText(\"# #\\n\");\n $this->writeText(\"# www.centreon.com #\\n\");\n $this->writeText(\"# For information : [email protected] #\\n\");\n $this->writeText(\"###################################################################\\n\");\n $this->writeText(\"# #\\n\");\n $this->writeText(\"# Last modification \" . $time);\n\n $margin = strlen($time);\n $margin = $len - 28 - $margin - 2;\n\n for ($i = 0; $i != $margin; $i++) {\n $this->writeText(\" \");\n }\n\n $this->writeText(\"#\\n\");\n $this->writeText(\"# By \" . $by);\n $margin = $len - 13 - strlen($by) - 2;\n\n for ($i = 0; $i != $margin; $i++) {\n $this->writeText(\" \");\n }\n $this->writeText(\"#\\n\");\n $this->writeText(\"# #\\n\");\n $this->writeText(\"###################################################################\\n\\n\");\n }", "title": "" }, { "docid": "d16a1e3d8bf92532243251d961ef38f1", "score": "0.3740543", "text": "public function getCreditNoteAttachmentById($creditNoteID, $attachmentID, $contentType)\n {\n ['model' => $model, 'request' => $request, 'response' => $response]\n = $this->getCreditNoteAttachmentByIdWithHttpInfo($creditNoteID, $attachmentID, $contentType);\n\n $statusCode = (int)$response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $request,\n $response,\n $model\n );\n }\n\n return $model;\n }", "title": "" }, { "docid": "e40e3afadf52afcf317da8d02d13e119", "score": "0.37296373", "text": "function Header() {\r\n $this->Image($this->logourl, 6, 5, 12,12);\r\n $this->SetFont('courier', '', 8);\r\n $this->SetY(11);\r\n $this->SetX(19);\r\n// $this->SetTextColor(224,17,36);\r\n $this->SetTextColor(1,152,74);\r\n $this->SetFont('courier', 'B', 10);\r\n $this->Cell(55, 4, $this->companyname, 0, 0, 'L');\r\n $this->SetY(14);\r\n $this->SetX(19);\r\n $this->SetFont('courier', 'B', 8);\r\n// $this->SetTextColor(1,152,74);\r\n $this->SetTextColor(224,17,36);\r\n $this->Cell(55, 4, $this->companyaddress, 0, 0, 'L');\r\n $this->SetTextColor(0);\r\n $this->SetY(10);\r\n $this->SetX(130);\r\n// $this->Cell(75, 4, 'Department : ' . $this->dataheader[0], 0, 0, 'R', false);\r\n \r\n $this->SetFont('courier', 'B', 14);\r\n \r\n $this->SetY(12);\r\n $this->SetX(5);\r\n $this->Cell(200, 6, $this->metadata['Title'], 0, 0, 'C');\r\n $this->SetY(18);\r\n $this->SetFont('courier', '', 8);\r\n $this->Cell(200, 5, $this->dataheader[0], 0, 0, 'C');\r\n// $this->Cell(200, 5, 'test', 0, 0, 'C');\r\n $this->SetY(22);\r\n \r\n $this->SetFont('courier', 'B', 8);\r\n $this->Ln(1);\r\n }", "title": "" }, { "docid": "b592048f7d1d378067302eb40124f76d", "score": "0.3727995", "text": "function template_preprocess_xero_invoice(&$variables) {\n $invoice = $variables['invoice'] = $variables[0];\n unset($variables[0]);\n\n $variables['currency'] = (isset($invoice['CurrencyCode'])) ? $invoice['CurrencyCode'] : ''; //USD, NZD\n\n $variables['type'] = strtolower($invoice['Type']);\n $variables['status'] = ucwords(strtolower($invoice['Status']));\n $variables['invoiceid'] = $invoice['InvoiceID'];\n $variables['number'] = check_plain($invoice['InvoiceNumber']);\n $variables['name'] = check_plain($invoice['Contact']['Name']);\n $variables['contactid'] = $invoice['Contact']['ContactID'];\n\n $date = new DateTime($invoice['Date']);\n $variables['date'] = $date->format('U');\n $duedate = new DateTime($invoice['DueDate']);\n $variables['duedate'] = $duedate->format('U');\n\n $variables['total'] = (isset($invoice['Total'])) ? $invoice['Total'] : '0.00';\n $variables['paid'] = (isset($invoice['AmountPaid'])) ? $invoice['AmountPaid'] : '0.00';\n $variables['due'] = (isset($invoice['AmountDue'])) ? $invoice['AmountDue'] : '0.00';\n $variables['credited'] = (isset($invoice['AmountCredited'])) ? $invoice['AmountCredited'] : '0.00';\n $variables['lineamounttypes'] = $invoice['LineAmountTypes'];\n\n $variables['lineitems'] = array();\n if (!empty($invoice['LineItems']['LineItem'])) {\n $variables['lineitems'] = $invoice['LineItems']['LineItem'];\n }\n\n $variables['payments'] = '';\n if (!empty($invoice['Payments']['Payment'])) {\n $header = array(t('Date'), t('Amount'));\n $rows = array();\n\n foreach ($invoice['Payments']['Payment'] as $payment) {\n $row = array();\n\n $date = new DateTime($payment['Date']);\n $row[] = format_date($date->format('U'), 'short');\n $row[] = $payment['Amount'];\n\n $rows[] = $row;\n }\n\n $variables['payments'] = theme('table', $header, $rows, array('class' => 'xero-payments'), t('Payments'));\n }\n\n}", "title": "" }, { "docid": "c4a4eea5ab09cc8e2ef3edeb86138827", "score": "0.37227407", "text": "public function setDebitClient($debitClient) {\n $this->debitClient = $debitClient;\n return $this;\n }", "title": "" }, { "docid": "dbbaa4c9476b02aa800b5252efeb1822", "score": "0.37224022", "text": "public function create($lead_id)\n {\n $lead_id = base64_decode($lead_id);\n $lead = Lead::find($lead_id);\n return view('create-invoice',compact('lead'));\n }", "title": "" }, { "docid": "4fcf7b72243d99f7c9b576ba600600d3", "score": "0.37216005", "text": "public function createBankTransferAttachmentByFileNameRequest($bankTransferID, $fileName, $body)\n {\n // Verify the required parameter 'bankTransferID' is set\n\n if ($bankTransferID === null || (is_array($bankTransferID) && count($bankTransferID) === 0)) {\n throw new InvalidArgumentException(sprintf(\n 'Missing the required parameter $%s when calling %s',\n 'bankTransferID',\n 'createBankTransferAttachmentByFileName'\n ));\n }\n // Verify the required parameter 'fileName' is set\n\n if ($fileName === null || (is_array($fileName) && count($fileName) === 0)) {\n throw new InvalidArgumentException(sprintf(\n 'Missing the required parameter $%s when calling %s',\n 'fileName',\n 'createBankTransferAttachmentByFileName'\n ));\n }\n // Verify the required parameter 'body' is set\n\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new InvalidArgumentException(sprintf(\n 'Missing the required parameter $%s when calling %s',\n 'body',\n 'createBankTransferAttachmentByFileName'\n ));\n }\n\n $resourcePath = '/BankTransfers/{BankTransferID}/Attachments/{FileName}';\n $formParams = [];\n $queryParams = [];\n $httpBody = null;\n $multipart = false;\n\n \n\n// Path parameters\n if ($bankTransferID !== null) {\n $resourcePath = str_replace(\n '{' . 'BankTransferID' . '}',\n ObjectSerializer::toPathValue($bankTransferID),\n $resourcePath\n );\n }\n\n if ($fileName !== null) {\n $resourcePath = str_replace(\n '{' . 'FileName' . '}',\n ObjectSerializer::toPathValue($fileName),\n $resourcePath\n );\n }\n\n\n // Body parameter\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/octet-stream']\n );\n }\n\n \n // For model (json/xml)\n\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present.\n\n if ($headers['Content-Type'] === 'application/json') {\n $httpBodyText = $this->jsonEncode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBodyText = $_tempBody;\n }\n\n $httpBody = $this->createStream($httpBodyText);\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n\n // FIXME: how do we do multiparts with PSR-7?\n // MultipartStream() is a Guzzle tool.\n\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = $this->createStream($this->jsonEncode($formParams));\n\n } else {\n // for HTTP post (form)\n $httpBody = $this->createStream($this->buildQuery($formParams));\n }\n }\n\n\n return $this->buildHttpRequest(\n $headers,\n $queryParams,\n $httpBody,\n 'PUT',\n $resourcePath\n );\n }", "title": "" }, { "docid": "6deb9ecc39e54e4b1e57c532e317f0eb", "score": "0.37125978", "text": "public function insertHeaderCell($letter, $number, $value, $style = NULL) {\n $this->insertCell($letter, $number, $value, is_null($style) ? \"HEADER\" : $style);\n return $this;\n }", "title": "" }, { "docid": "ed07ac2618ebc151680e3859f82dfe25", "score": "0.37092826", "text": "private function generateCustomer(IFileTemplate $template) {\n $customer = $this->data->getCustomer();\n $template->customerName = $customer->getName();\n $template->customerStreet = $customer->getStreet();\n $template->customerHouseNumber = $customer->getHouseNumber();\n $template->customerCity = $customer->getCity();\n $template->customerZip = $customer->getZip();\n $template->customerIn = $customer->getIn();\n $template->customerTin = $customer->getTin();\n $template->customerAccountNumber = $customer->getAccountNumber();\n $template->customerOrder= $customer->getOrder();\n }", "title": "" }, { "docid": "976ec331f68a677ff6dd0c6682e8bbc5", "score": "0.369431", "text": "public function createHeader()\n {\n $header = new Header($this->_sectionCount);\n $this->_headers[] = $header;\n return $header;\n }", "title": "" }, { "docid": "33f5878303919965e9e60542f6894054", "score": "0.36920124", "text": "public function customerDebitNoteUpdateBydebitNoteNumberWithHttpInfo($debit_note_number, $debit_note)\n {\n $returnType = 'object';\n $request = $this->customerDebitNoteUpdateBydebitNoteNumberRequest($debit_note_number, $debit_note);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 204:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "3c17e4bb7bfb66f3dd2f4e26f805af9d", "score": "0.36836576", "text": "public function __construct(int $invoiceId, string $dueDate, string $fileName, string $customerName = null)\n {\n $this->invoiceId = $invoiceId;\n $this->dueDate = Carbon::createFromTimeStamp(strtotime($dueDate))->diffForHumans();\n $this->fileName = $fileName;\n $this->customerName = $customerName;\n }", "title": "" }, { "docid": "2cb9e481b36c53d8da1ecb47ea9ab7de", "score": "0.3681128", "text": "private function Get_Process_Date_From_File( $header )\n\t{\n\t\t$stringdate = substr($header, 13, 8);\n\t\t$year = substr($stringdate, 0, 4);\n\t\t$month = substr($stringdate, 4, 2);\n\t\t$day = substr($stringdate, 6, 2);\n\n\t\tif( checkdate($month, $day, $year) )\n\t\t\treturn $year . $month . $day;\n\t\telse\n\t\t\treturn false;\n\t}", "title": "" }, { "docid": "abc44c152ab9f3c6a767192b838d72e7", "score": "0.3680119", "text": "public static function addWordHeader(){\r\n\t\t\r\n\t\twordBase::getXML();\r\n\t\t\r\n\t\t$childNode = wordBase::$xmlElement->addChild('Relationship');\r\n\t\t$nodeIndex = wordBase::getCount();\r\n\t\t$childNode->addAttribute('Id', 'rId' . $nodeIndex);\r\n\t\t$index = count(wordBase::$imageList);\r\n\t\t$childNode->addAttribute('Type', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/header');\r\n\t\t$childNode->addAttribute('Target','header1.xml');\r\n\t}", "title": "" }, { "docid": "2752ad2a6b2b4b9c94fe3393e1badde4", "score": "0.36739293", "text": "public function bookCustomerInvoice($number)\n {\n $this->bookCustomerInvoiceWithHttpInfo($number);\n }", "title": "" }, { "docid": "29fd9d91385c50c16b88bbe4eb8374d9", "score": "0.36710334", "text": "public function HeaderTable($data) {\n\t\t$this->SetFillColor(255, 255, 255);\n\t\t$this->SetTextColor(0);\n\t\t$this->SetDrawColor(0, 0, 0);\n\t\t$this->SetLineWidth(0.1);\n\t\t$this->SetFont('', 'B');\n\n\t\t$this->SetLineStyle(array('width' => 0.3, 'cap' => 'butt', 'join' => 'miter',\n\t\t\t'dash' => '1,2', 'color' => array(142, 102, 66)));\n\n\t\t$this->Cell(179, 8, 'Billed to:', 'LT', 0, 'L', 1, '', 0, 0, 'T', 'B');\n\t\t$this->Cell(50, 8, 'Invoice #', 'LT', 0, 'L', 1, '', 0, 0, 'T', 'B');\n\t\t$this->SetFont('', '');\n\t\t$this->Cell(60, 8, $data->invoice_code, 'RT', 0, 'R', 1, '', 0, 0, 'T', 'B');\n\t\t$this->Ln();\n\n\t\t$this->SetFont('cordiaupcb', '', 18);\n\t\t//$this->SetFont('', 'B');\n\t\t$this->Cell(179, 6, $data->bill_fullname, 'L', 0, 'L', 1, '', 0, 0, 'T', 'C');\n\t\t$this->SetFont('helvetica', 'B', 12);\n\t\t$this->Cell(50, 6, 'Invoice Date', 'L', 0, 'L', 1, '', 0, 0, 'T', 'C');\n\n\t\t$this->SetFont('helvetica', '', 12);\n\t\t//$this->SetFont('', '');\n\t\t$this->Cell(60, 6, $data->invoice_date, 'R', 0, 'R', 1, '', 0, 0, 'T', 'C');\n\t\t$this->Ln();\n\n\t\t$this->SetFont('cordiaupc', 'B', 16);\n\t\t//$this->SetFont('', 'B');\n\t\t$this->Cell(179, 8, $data->invoice_address, 'LB', 0, 'L', 1, '', 0, 0, 'T', 'T');\n\t\t$this->Cell(50, 8, '', 'LB', 0, 'L', 1, '', 0, 0, 'T', 'T');\n\n\t\t$this->SetFont('helvetica', 'B', 12);\n\t\t//$this->SetFont('', '');\n\t\t$this->Cell(60, 8, '', 'RB', 0, 'R', 1, '', 0, 0, 'T', 'T');\n\t\t$this->Ln();\n\n\t\t$this->Cell('', 1, '', '');\n\t}", "title": "" }, { "docid": "f7fb4e14053ea56c597c78a13967423c", "score": "0.36659464", "text": "function bf_postheader() {\r\n\tglobal $post;\r\n\r\n\tif ( is_attachment() ) $postheader .= '<h1>' . get_the_title() . ' [<a href=\"' . get_permalink($post->post_parent) . '\" rev=\"attachment\">' . get_the_title($post->post_parent) . '</a>]</h1>';\r\n\telse $postheader = '<h1 class=\"entry-title\" id=\"post-' . $post->ID . '\"><a href=\"' . get_permalink() . '\" rel=\"bookmark\">' . get_the_title() . '</a></h1>';\r\n\t\t\r\n\t$postheader .= '<div class=\"entry-meta clearfix\">';\r\n\t$postheader .= sprintf( __('<span class=\"author vcard\">By <span class=\"fn\">%s</span></span>', 'buffet'), get_the_author() );\r\n\t$postheader .= sprintf( __('<span class=\"published\">Published: <abbr class=\"date\" title=\"%1$s\">%2$s at %3$s</abbr></span>', 'buffet'), get_the_time( __('c', 'buffet') ), get_the_time( __('F j, Y', 'buffet') ), get_the_time( __('g:i A', 'buffet') ) );\r\n\t\r\n\tif ( !is_attachment() )\r\n\t\t$postheader .= __('<span class=\"entry-tags\">Tags:', 'buffet') . get_the_tag_list(' ', ', ', ' ') . '</span>';\r\n\t\r\n\t$postheader .= '</div><!-- .entry-meta -->';\r\n\t\r\n\techo apply_filters('bf_postheader', $postheader);\r\n}", "title": "" }, { "docid": "f944ae1d7c94340d1a5dba6aba0bfbda", "score": "0.3656708", "text": "public static function create_customer($credit_card_info, $billing_address) {\n\t static::_init();\n\t \n\t if (! static::_check_credit_card_info($credit_card_info)) {\n\t \tthrow new Exception(\"Missing information for credit card\", static::ERROR_INCOMPLETE_CREDIT_CARD_INFO);\n\t }\n\n\t if (! static::_check_billing_address($billing_address)) {\n\t \tthrow new Exception(\"Missing information for billing address\", static::ERROR_INCOMPLETE_BILLING_ADDRESS);\n\t }\n\n\t $customer_info = array(\n 'creditCard' => array(\n 'number' => $credit_card_info['number'],\n 'cvv' => $credit_card_info['cvv'],\n 'expirationDate' => $credit_card_info['expiration_date'],\n 'billingAddress' => array(\n 'streetAddress' => $billing_address['address'],\n \t\t'locality' => $billing_address['city'],\n \t\t'region' => $billing_address['state'],\n \t\t'postalCode' => $billing_address['zip_code'],\n ),\n 'options' => array(\n \t\t'verifyCard' => TRUE\n )\n ),\n );\n\t \n\t $result = \\Braintree_Customer::create($customer_info);\n\n\t static::_check_customer_creation_result($result);\n\n\t $customer = new \\stdClass();\n\t $customer->customer_id = $result->customer->id;\n\t $customer->credit_card_token = $result->customer->creditCards[0]->token;\n\t \n\t return $customer;\n\t}", "title": "" }, { "docid": "59295fabc2d6b9382298f75a73c4a123", "score": "0.3653434", "text": "protected function drawClientHeader($iKey)\r\n {\r\n // Init\r\n $iWidth = self::WIDTH_ENTETE_BLOC_DROITE;\r\n $iPositionX = $this->getPageWidth() - ($this->getMargin(\"right\") + $iWidth);\r\n $this->resetFontColor();\r\n\r\n // Contents\r\n $aReminderDataFirstPage = $this->structure['relances'][$iKey]['data']['first_page'];\r\n $sClientContact = $aReminderDataFirstPage['contact_client'];\r\n $sClientName = $aReminderDataFirstPage['nom_client'];\r\n $sClientAddress1 = $aReminderDataFirstPage['adresse_1'];\r\n $sClientAddress2 = $aReminderDataFirstPage['adresse_2'];\r\n $sClientAddress3 = $aReminderDataFirstPage['adresse_3'];\r\n $sClientZipcode = $aReminderDataFirstPage['code_postal'];\r\n $sClientCity = $aReminderDataFirstPage['ville'];\r\n $sClientCountry = $aReminderDataFirstPage['pays'];\r\n\r\n // Draw - cadre\r\n $this->setColor('draw', $this->fontColors[\"CONTOUR_BLOC\"][0], $this->fontColors[\"CONTOUR_BLOC\"][1], $this->fontColors[\"CONTOUR_BLOC\"][2]);\r\n $this->RoundedRect($iPositionX, self::POSY_ENTETE, $iWidth, 30, self::R);\r\n $this->resetColor();\r\n\r\n // Draw - client\r\n $this->SetXY($iPositionX + self::TEXT_MARGIN, self::POSY_ENTETE + self::TEXT_MARGIN);\r\n $this->Cell($iWidth, 0, $sClientName, 0, 2);\r\n $this->Cell($iWidth, 0, $this->translations['attn'] . ' ' . $sClientContact, 0, 2);\r\n $this->Cell($iWidth, 0, $sClientAddress1, 0, 2);\r\n $this->Cell($iWidth, 0, $sClientAddress2, 0, 2);\r\n if (! empty($sClientAddress3)) {\r\n $this->Cell($iWidth, 0, $sClientAddress3, 0, 2);\r\n }\r\n $this->Cell($iWidth, 0, $sClientZipcode . ' ' . $sClientCity, 0, 2);\r\n $this->Cell($iWidth, 0, $sClientCountry, 0, 2);\r\n }", "title": "" }, { "docid": "2ef1ccee560cca44b27a2759fd67bd92", "score": "0.36523017", "text": "public function makePDF($userInfo, $orderId){\r\n require_once('vendors/TCPDF-master/tcpdf.php');\r\n\r\n // create new PDF document\r\n $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);\r\n\r\n // set document information\r\n $pdf->SetCreator(PDF_CREATOR);\r\n $pdf->SetAuthor('Job Vermeulen');\r\n $pdf->SetTitle('Payment Complete');\r\n $pdf->SetSubject('PDF Document');\r\n $pdf->SetKeywords('TCPDF, PDF, payment, complete');\r\n\r\n // set default monospaced font\r\n $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);\r\n\r\n // set margins\r\n $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);\r\n $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);\r\n $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);\r\n\r\n // set auto page breaks\r\n $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);\r\n\r\n // set image scale factor\r\n $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);\r\n\r\n // set some language-dependent strings (optional)\r\n if (@file_exists(dirname(__FILE__).'/lang/eng.php')) {\r\n require_once(dirname(__FILE__).'/lang/eng.php');\r\n $pdf->setLanguageArray($l);\r\n }\r\n\r\n // ---------------------------------------------------------\r\n\r\n // set default font subsetting mode\r\n $pdf->setFontSubsetting(true);\r\n\r\n // Set font\r\n // dejavusans is a UTF-8 Unicode font, if you only need to\r\n // print standard ASCII chars, you can use core fonts like\r\n // helvetica or times to reduce file size.\r\n $pdf->SetFont('dejavusans', '', 14, '', true);\r\n\r\n // Add a page\r\n // This method has several options, check the source code documentation for more information.\r\n $pdf->AddPage();\r\n\r\n // set text shadow effect\r\n $pdf->setTextShadow(array('enabled'=>true, 'depth_w'=>0.2, 'depth_h'=>0.2, 'color'=>array(196,196,196), 'opacity'=>1, 'blend_mode'=>'Normal'));\r\n\r\n // Set some content to print\r\n $html = \" <h1>Uw betaling is compleet!</h1>\r\n <h2>Beste \".$userInfo['user_first'].\" \".$userInfo['user_last'].\",</h2>\r\n <p>Hierbij ontvangt u uw bevestiging van de donatie aan shoppingcart.nl! Wij bedanken u vriendelijk dat u de ontwikkeling steunt van shoppingcart.nl!</p>\r\n <h2>Met vriendelijke groet,</h2>\r\n <h3>Namens de oprichter van shoppingcart.nl,</h3>\r\n <p>Job Vermeulen</p>\";\r\n \r\n // output the HTML content\r\n $pdf->writeHTML($html, true, false, true, false, '');\r\n\r\n\r\n // new style\r\n $style = array(\r\n 'border' => false,\r\n 'padding' => 0,\r\n 'fgcolor' => array(0,0,0),\r\n 'bgcolor' => false\r\n );\r\n\r\n // QRCODE,H : QR-CODE Best error correction\r\n $pdf->write2DBarcode($orderId, 'QRCODE,H', 15, 120, 50, 50, $style, 'N');\r\n\r\n // ---------------------------------------------------------\r\n\r\n // Close and output PDF document\r\n // This method has several options, check the source code documentation for more information.\r\n $pdfDocument = $pdf->Output('paymentComplete.pdf', 's');\r\n\r\n //============================================================+\r\n // END OF FILE\r\n //============================================================\r\n\r\n return $pdfDocument;\r\n }", "title": "" }, { "docid": "4b8e404ad5e399917297d7c7f895376c", "score": "0.3652298", "text": "public function customerDebitNoteGetAllWithHttpInfo($document_type = null, $released = null, $dunning_level = null, $closed_financial_period = null, $dunning_letter_date_time = null, $dunning_letter_date_time_condition = null, $project = null, $expand_applications = null, $expand_dunning_information = null, $expand_attachments = null, $expand_tax_details = null, $expand_invoice_address = null, $financial_period = null, $document_due_date = null, $status = null, $number_to_read = null, $skip_records = null, $external_reference = null, $payment_reference = null, $customer_ref_number = null, $greater_than_value = null, $last_modified_date_time = null, $last_modified_date_time_condition = null, $created_date_time = null, $created_date_time_condition = null, $page_number = null, $page_size = null)\n {\n $returnType = '\\Ekstralys\\VismaNetApi\\Model\\CustomerDebitNoteDto[]';\n $request = $this->customerDebitNoteGetAllRequest($document_type, $released, $dunning_level, $closed_financial_period, $dunning_letter_date_time, $dunning_letter_date_time_condition, $project, $expand_applications, $expand_dunning_information, $expand_attachments, $expand_tax_details, $expand_invoice_address, $financial_period, $document_due_date, $status, $number_to_read, $skip_records, $external_reference, $payment_reference, $customer_ref_number, $greater_than_value, $last_modified_date_time, $last_modified_date_time_condition, $created_date_time, $created_date_time_condition, $page_number, $page_size);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Ekstralys\\VismaNetApi\\Model\\CustomerDebitNoteDto[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "8a332886a4c25e0cb144d89f880c02b9", "score": "0.3650942", "text": "public function create($file){\n\n\n $header_image = new HeaderImage();\n $header_image->title = \"def\";\n $header_image->image = $file;\n\n\n if($header_image->save()){\n return $this->redirectToSelf()->withMessage(['success' => trans('message.successfully_added_headerimage')]);\n }else{\n return $this->redirectToSelf()->withMessage(['danger' => trans('message.something_went_wrong')]);\n }\n\n\n }", "title": "" }, { "docid": "cdf976dfb6beca11d1d5953cbd6dd75c", "score": "0.36441422", "text": "public function create_debit() {\n\n\t\t$this->transaction_type = 'ecspurchase';\n\n\t\t$this->create_transaction();\n\n\t\t$this->request_data['ssl_bank_account_number'] = $this->get_order()->payment->account_number;\n\t\t$this->request_data['ssl_aba_number'] = $this->get_order()->payment->routing_number;\n\t\t$this->request_data['ssl_check_number'] = $this->get_order()->payment->check_number;\n\n\t\t$this->request_data['ssl_agree'] = 1;\n\n\t\t$this->request_data['ssl_bank_account_type'] = (int) ( 'business' === $this->get_order()->payment->account_type );\n\t}", "title": "" }, { "docid": "4d3c8c69c9928fe8b46f4bccda88b964", "score": "0.36320248", "text": "public function Header() {\n if ($this->header_xobjid === false) {\n // start a new XObject Template\n $this->header_xobjid = $this->startTemplate($this->w, $this->tMargin);\n $headerfont = $this->getHeaderFont();\n $headerdata = $this->getHeaderData();\n $this->y = $this->header_margin;\n if ($this->rtl) {\n $this->x = $this->w - $this->original_rMargin;\n } else {\n $this->x = $this->original_lMargin;\n }\n if (($headerdata['logo']) AND ( $headerdata['logo'] != K_BLANK_IMAGE)) {\n $imgtype = \\TCPDF_IMAGES::getImageFileType(K_PATH_IMAGES . $headerdata['logo']);\n if (($imgtype == 'eps') OR ( $imgtype == 'ai')) {\n $this->ImageEps(K_PATH_IMAGES . $headerdata['logo'], '', '', $headerdata['logo_width']);\n } elseif ($imgtype == 'svg') {\n $this->ImageSVG(K_PATH_IMAGES . $headerdata['logo'], '', '', $headerdata['logo_width']);\n } else {\n $this->Image(K_PATH_IMAGES . $headerdata['logo'], '', '', $headerdata['logo_width']);\n }\n $imgy = $this->getImageRBY();\n } else {\n $imgy = $this->y;\n }\n $cell_height = $this->getCellHeight($headerfont[2] / $this->k);\n // set starting margin for text data cell\n if ($this->getRTL()) {\n $header_x = $this->original_rMargin + ($headerdata['logo_width'] * 1.1);\n } else {\n $header_x = $this->original_lMargin + ($headerdata['logo_width'] * 1.1);\n }\n $cw = $this->w - $this->original_lMargin - $this->original_rMargin - ($headerdata['logo_width'] * 1.1);\n $this->SetTextColorArray($this->header_text_color);\n // header title\n $this->SetFont($headerfont[0], 'B', $headerfont[2] + 1);\n $this->SetX($header_x);\n $this->Cell($cw, $cell_height, $headerdata['title'], 0, 1, 'R', 0, '', 0);\n // Change text color to slate now\n $this->SetTextColor(26,45,60);\n // header string\n $this->SetFont($headerfont[0], $headerfont[1], $headerfont[2]);\n $this->SetX($header_x);\n $this->MultiCell($cw, $cell_height, $headerdata['string'], 0, 'R', 0, 1, '', '', true, 0, false, true, 0, 'M', false);\n // header keyword title\n $this->SetFont($headerfont[0], $headerfont[1], $headerfont[2]);\n $this->SetX($header_x);\n $this->MultiCell($cw, $cell_height, $headerdata['keywordString'], 0, 'R', 0, 1, '', '', true, 0, false, true, 0, 'B', false);\n // print an ending header line\n $this->SetLineStyle(array('width' => 0.85 / $this->k, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => $headerdata['line_color']));\n $this->SetY((2.835 / $this->k) + max($imgy, $this->y));\n if ($this->rtl) {\n $this->SetX($this->original_rMargin);\n } else {\n $this->SetX($this->original_lMargin);\n }\n $this->Cell(($this->w - $this->original_lMargin - $this->original_rMargin), 0, '', 'T', 0, 'C');\n $this->endTemplate();\n }\n // print header template\n $x = 0;\n $dx = 0;\n if (!$this->header_xobj_autoreset AND $this->booklet AND ( ($this->page % 2) == 0)) {\n // adjust margins for booklet mode\n $dx = ($this->original_lMargin - $this->original_rMargin);\n }\n if ($this->rtl) {\n $x = $this->w + $dx;\n } else {\n $x = 0 + $dx;\n }\n $this->printTemplate($this->header_xobjid, $x, 0, 0, 0, '', '', false);\n if ($this->header_xobj_autoreset) {\n // reset header xobject template at each page\n $this->header_xobjid = false;\n }\n }", "title": "" }, { "docid": "0171bf9a8608bcd9f39702ddae6081cb", "score": "0.36167338", "text": "public function createFile($arrTemplate){\n\n // create new PDF document\n $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);\n\n // set document information\n $pdf->SetCreator(PDF_CREATOR);\n $pdf->SetAuthor(' NFK-Save');\n $pdf->SetTitle('TCPDF Example 001');\n\n $pdf->setPrintFooter('hiuhiuhiouh');\n\n // remove default header/footer\n $pdf->setPrintHeader(false);\n $pdf->setPrintFooter(false);\n\n // set default monospaced font\n $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);\n $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));\n $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);\n\n // set margins\n $pdf->SetMargins(PDF_MARGIN_LEFT, 10, PDF_MARGIN_RIGHT);\n\n // set auto page breaks\n $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);\n\n // set image scale factor\n $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);\n\n foreach ($arrTemplate as $page) {\n \n // add a page\n $pdf->AddPage();\t\n\n // set UTF-8 Unicode font\n $pdf->SetFont('freeserif', '');\n\n // output the HTML content\n $pdf->writeHTML($page, true, false, true, false, '');\n\n }\n\n // reset pointer to the last page\n $pdf->lastPage();\n\n $pdf->Output('D:\\xampp\\htdocs\\pdfgenerator\\example_001.pdf', 'F');\n //============================================================\n }", "title": "" }, { "docid": "223a2a7931bfa514a273a973c096bb39", "score": "0.36119854", "text": "public function getCreditNoteAttachments($creditNoteID)\n {\n ['model' => $model, 'request' => $request, 'response' => $response]\n = $this->getCreditNoteAttachmentsWithHttpInfo($creditNoteID);\n\n $statusCode = (int)$response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $request,\n $response,\n $model\n );\n }\n\n return $model;\n }", "title": "" }, { "docid": "3fc245489cc13f18477dd0cd087d330f", "score": "0.36101255", "text": "public function getBankTransactionAttachmentByFileNameRequest($bankTransactionID, $fileName, $contentType)\n {\n // Verify the required parameter 'bankTransactionID' is set\n\n if ($bankTransactionID === null || (is_array($bankTransactionID) && count($bankTransactionID) === 0)) {\n throw new InvalidArgumentException(sprintf(\n 'Missing the required parameter $%s when calling %s',\n 'bankTransactionID',\n 'getBankTransactionAttachmentByFileName'\n ));\n }\n // Verify the required parameter 'fileName' is set\n\n if ($fileName === null || (is_array($fileName) && count($fileName) === 0)) {\n throw new InvalidArgumentException(sprintf(\n 'Missing the required parameter $%s when calling %s',\n 'fileName',\n 'getBankTransactionAttachmentByFileName'\n ));\n }\n // Verify the required parameter 'contentType' is set\n\n if ($contentType === null || (is_array($contentType) && count($contentType) === 0)) {\n throw new InvalidArgumentException(sprintf(\n 'Missing the required parameter $%s when calling %s',\n 'contentType',\n 'getBankTransactionAttachmentByFileName'\n ));\n }\n\n $resourcePath = '/BankTransactions/{BankTransactionID}/Attachments/{FileName}';\n $formParams = [];\n $queryParams = [];\n $httpBody = null;\n $multipart = false;\n\n \n\n// Path parameters\n if ($bankTransactionID !== null) {\n $resourcePath = str_replace(\n '{' . 'BankTransactionID' . '}',\n ObjectSerializer::toPathValue($bankTransactionID),\n $resourcePath\n );\n }\n\n if ($fileName !== null) {\n $resourcePath = str_replace(\n '{' . 'FileName' . '}',\n ObjectSerializer::toPathValue($fileName),\n $resourcePath\n );\n }\n\n\n // Body parameter\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/octet-stream']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/octet-stream'],\n []\n );\n }\n\n // Header parameters\n if ($contentType !== null) {\n $headers['contentType'] = ObjectSerializer::toHeaderValue($contentType);\n }\n\n // For model (json/xml)\n\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present.\n\n if ($headers['Content-Type'] === 'application/json') {\n $httpBodyText = $this->jsonEncode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBodyText = $_tempBody;\n }\n\n $httpBody = $this->createStream($httpBodyText);\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n\n // FIXME: how do we do multiparts with PSR-7?\n // MultipartStream() is a Guzzle tool.\n\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = $this->createStream($this->jsonEncode($formParams));\n\n } else {\n // for HTTP post (form)\n $httpBody = $this->createStream($this->buildQuery($formParams));\n }\n }\n\n\n return $this->buildHttpRequest(\n $headers,\n $queryParams,\n $httpBody,\n 'GET',\n $resourcePath\n );\n }", "title": "" }, { "docid": "66f74348aa6652d80d01912bbc2eb88f", "score": "0.36089742", "text": "public function creating(Estimate $estimate)\n {\n $estimate->reference_no = generateCode('estimates');\n if (!is_numeric($estimate->client_id)) {\n $estimate->client_id = Client::firstOrCreate(\n ['email' => $estimate->client_id],\n ['name' => $estimate->client_id]\n )->id;\n }\n if (empty($estimate->due_date)) {\n $estimate->due_date = now()->addDays(get_option('invoices_due_after', '15'));\n }\n $estimate->exchange_rate = xchangeRate($estimate->currency);\n }", "title": "" }, { "docid": "ca0786e689c6a10dfec7431e451f9b15", "score": "0.3605892", "text": "private function addFileHeader(): void\n {\n $forceEnableZip64 = $this->enableZeroHeader && $this->enableZip64;\n\n $footer = $this->buildZip64ExtraBlock($forceEnableZip64);\n\n $zip64Enabled = $footer !== '';\n\n if($zip64Enabled) {\n $this->version = Version::ZIP64;\n }\n\n if ($this->generalPurposeBitFlag & GeneralPurposeBitFlag::EFS) {\n // Put the tricky entry to\n // force Linux unzip to lookup EFS flag.\n $footer .= Zs\\ExtendedInformationExtraField::generate();\n }\n\n $data = LocalFileHeader::generate(\n versionNeededToExtract: $this->version->value,\n generalPurposeBitFlag: $this->generalPurposeBitFlag,\n compressionMethod: $this->compressionMethod,\n lastModificationDateTime: $this->lastModificationDateTime,\n crc32UncompressedData: $this->crc,\n compressedSize: $zip64Enabled\n ? 0xFFFFFFFF\n : $this->compressedSize,\n uncompressedSize: $zip64Enabled\n ? 0xFFFFFFFF\n : $this->uncompressedSize,\n fileName: $this->fileName,\n extraField: $footer,\n );\n\n\n ($this->send)($data);\n }", "title": "" } ]
0ac7bdb02e5fbb03eb7a9ee5316bf396
Run the database seeds.
[ { "docid": "978811dee2eceba5def6a3cb6550fe10", "score": "0.0", "text": "public function run()\n {\n factory(Tier::class, 3)->create();\n }", "title": "" } ]
[ { "docid": "71c6796615a8344ad02f1c59309a8195", "score": "0.810222", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n $roles = ['superadmin', 'admin', 'user'];\n for ($i=0; $i<count($roles); $i++)\n {\n \\App\\Role::create([\n 'name' => $roles[$i]\n ]);\n }\n\n factory(\\App\\User::class, 10)->create();\n factory(\\App\\Category::class, 5)->create();\n factory(\\App\\Product::class, 20)->create();\n\n $prod_id = \\App\\Product::pluck('id');\n $prod_count = count($prod_id);\n\n foreach ($users = \\App\\User::all() as $user)\n {\n for ($i=0; $i<rand(0, $prod_count); $i++)\n {\n $id = $prod_id[$i];\n $user->favorites()->attach($id);\n }\n }\n factory(\\App\\Review::class, 20)->create();\n }", "title": "" }, { "docid": "da4e361a9e2ff83579cb0561d63b82c2", "score": "0.7990817", "text": "public function run()\n {\n\n DB::table('users')->insert([\n [\n 'name' => \"admin\",\n 'email' => \"[email protected]\",\n 'phone' => \"082181189178\",\n 'role' => \"admin\",\n 'password' => bcrypt('admin')\n ],\n ]);\n\n DB::table('categories')->insert([\n [\n 'name' => \"Beach\",\n ],\n [\n 'name' => 'Mountain',\n ]\n ]);\n\n DB::table('articles')->insert([\n [\n 'user_id' => 4,\n 'categories_id' => 1,\n 'title' => 'Pantai Kuta Bali',\n 'description' => 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Eligendi repellat',\n 'image' => 'b1.jpeg',\n ],\n [\n 'user_id' => 4,\n 'categories_id' => 1,\n 'title' => 'Pantai',\n 'description' => 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Eligendi repellat',\n 'image' => 'b2.jpeg',\n ]\n ]);\n\n\n // $this->call(UserSeeder::class);\n }", "title": "" }, { "docid": "9be7037c6bd7f61f2f9bfe3d1ad6aa33", "score": "0.7957593", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory('App\\User', 20)->create();\n factory('App\\Company', 20)->create();\n factory('App\\Property', 20)->create();\n\n $categories = [\n 'Sold',\n 'Under Offer',\n 'Sold STC',\n 'For Sale'\n ];\n foreach ($categories as $category){\n Category::create(['name'=>$category]);\n }\n\n $propertytypes = [\n 'House',\n 'Bungalow',\n 'Flat'\n ];\n foreach ($propertytypes as $proptype){\n PropertyType::create(['name'=>$proptype]);\n }\n }", "title": "" }, { "docid": "643ca4b2b0a3350305279ecc21004f82", "score": "0.7939023", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n // 30 tag\n $tags = factory(App\\Tag::class, 30)->create();\n\n // 10 categorie\n $categories = factory(App\\Category::class, 10)->create();\n\n // 10 utenti\n $users = factory(App\\User::class, 10)->create();\n\n foreach ($users as $user) {\n // 15 post per utente\n $posts = factory(App\\Post::class, 15)->create([\n 'user_id' => $user->id,\n // 1 categoria random fra quelle create\n 'category_id' => $categories->random()->id,\n ]);\n // 3 tag random fra quelli create\n\n foreach ($posts as $post) {\n $post->tags()->sync($tags->random(3));\n }\n }\n }", "title": "" }, { "docid": "65835db97635cc435cdea4358f845df1", "score": "0.7937348", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n Role::create([\n 'name' => 'Administrator'\n ]);\n Role::create([\n 'name' => 'Member'\n ]);\n\n Status::create([\n 'name' => 'Active'\n ]);\n Status::create([\n 'name' => 'Inactive'\n ]);\n\n Site::create([\n 'name' => 'T&D Jogja'\n ]);\n\n User::create([\n 'site_id' => 1,\n 'role_id' => 1,\n 'name' => 'Admin',\n 'last_name' => 'Jogja',\n 'email' => '[email protected]',\n 'password' => Hash::make('password')\n ]);\n }", "title": "" }, { "docid": "ea5361a7636055f6a2ac45f40d6f9660", "score": "0.7930582", "text": "public function run()\n {\n $this->call(RolesTableSeeder::class);\n $this->call(UserTableSeeder::class);\n\n factory(App\\Category::class, 10)->create();\n factory(App\\Publisher::class, 20)->create();\n factory(App\\Author::class, 30)->create();\n factory(App\\Book::class, 100)->create()->each(function ($book) {\n\n $id_a = rand(1,30);\n $book->authors()->attach($id_a);\n });\n factory(App\\User::class, 100)->create()->each(function ($user){\n $rating = rand(1,10);\n $fav = rand(0,1);\n $books = \\App\\Book::inRandomOrder()->first();\n\n\n $user->books()->attach($books->isbn,[\n 'rating' => $rating,\n 'favourite' => $fav]);\n });\n }", "title": "" }, { "docid": "4b00078ab9a8de5ccf3ec46c08be4992", "score": "0.79253244", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'Super Admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('tester'),\n ]);\n\n DB::table('tags')->insert([\n 'tag' => 'Romance'\n ]);\n\n DB::table('categories')->insert([\n 'category' => 'AniManga'\n ]);\n\n DB::table('categories')->insert([\n 'category' => 'Novel'\n ]);\n\n DB::table('categories')->insert([\n 'category' => 'Light Novel'\n ]);\n\n DB::table('categories')->insert([\n 'category' => 'News'\n ]);\n\n DB::table('categories')->insert([\n 'category' => 'Entertainment'\n ]);\n\n DB::table('categories')->insert([\n 'category' => 'Celebrity'\n ]);\n }", "title": "" }, { "docid": "a19ba6eedf512446a4ff6a821f942a7f", "score": "0.78956264", "text": "public function run()\n {\n // $this->call(ArticlesTableSeeder::class);\n factory(App\\Article::class, 30)->create();\n // $this->call(UsersTableSeeder::class);\n \n $faker = Faker::create();\n $statuses = ['Waiting for approval', 'Approved', 'In progress'];\n foreach (range(1, 400) as $index) {\n \\DB::table('projects')->insert([\n 'status' => $statuses[shuffle($statuses)],\n 'deadline' => $faker->dateTimeBetween('+1 month', '+2 month'),\n 'budget' => rand(10000, 500000),\n ]);\n }\n }", "title": "" }, { "docid": "7c0e5f0f3d9257d2cc92932318f34df1", "score": "0.7893241", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n\n App\\User::create([\n 'name' => 'German Middi',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456')\n ]);\n\n\n App\\Models\\Category::create([\n 'title' => 'Agenda',\n ]);\n\n App\\Models\\PostStatu::create([\n 'status_txt' => 'Borrador',\n ]);\n \n App\\Models\\PostStatu::create([\n 'status_txt' => 'Publicado',\n ]);\n\n App\\Models\\PostStatu::create([\n 'status_txt' => 'Oculta',\n ]);\n \n App\\Models\\Post::create([\n 'user_id' => 1,\n 'title' => 'Primer Post',\n 'body' => 'Lorem ipsum dolor sit amet consectetur, adipisicing elit. Reiciendis deserunt quisquam dolore iusto impedit repellendus quam odio porro laborum harum facilis non accusantium ducimus, est dolores amet ab temporibus numquam.',\n 'category_id' => 1,\n 'status_id' => 1\n ]);\n\n\n\n\n //factory(App\\Models\\Category::class, 8)->create();\n // factory(App\\Models\\Post::class, 24)->create();\n \n }", "title": "" }, { "docid": "9ba09b0cd477f6bcc7e404fb53ae0298", "score": "0.7893209", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n Category::insert([\n ['name' => 'Computer'],\n ['name' => 'Cellphone'],\n ['name' => 'Watch'],\n ['name' => 'Headphone']\n ]);\n Subcategory::insert([\n ['name' => 'Laptop', 'category_id' => '1'],\n ['name' => 'Desktop', 'category_id' => '1'],\n ['name' => 'Iphone', 'category_id' => '2'],\n ['name' => 'Wrist', 'category_id' => '3'],\n ['name' => 'Wired', 'category_id' => '4']\n ]);\n }", "title": "" }, { "docid": "ca98272f756ed2422862b346c61bd5a3", "score": "0.7889463", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Professional::factory(20)->create();\n \\App\\Models\\MedicalCenter::factory(12)->create();\n \\App\\Models\\Affiliate::factory(200)->create();\n\n $this->SeedSpecializations();\n $this->SeedProfessionalSpecializations();\n $this->SeedAvailability();\n }", "title": "" }, { "docid": "efa9a59b6fcaad178163e02ca6c3670b", "score": "0.78812075", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::table('books')->truncate();\n // Only seed if not in production environment\n if (!App::environment('production')) {\n $payload = [\n ['Php In Use', 'thanhnt'],\n ['Advance Java', 'tuvd'],\n ['Html5 practical', 'vidm'],\n ];\n foreach ($payload as $book) {\n Book::create([\n 'title' => $book[0],\n 'author' => $book[1],\n ]);\n }\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "title": "" }, { "docid": "b4aa656fb085f9b1b9a13c6a767fa97e", "score": "0.78684664", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n factory(App\\User::class, 20)->create()->each(function ($users) {\n // Seed the relation with one address\n $songs = factory(App\\Songs::class)->make();\n $users->songs()->save($songs);\n \n }); \n\n }", "title": "" }, { "docid": "b64e1978db418d4451b3ed7886d2c896", "score": "0.7867829", "text": "public function run()\n {\n // Uncomment the below to wipe the table clean before populating\n // DB::table('advisors')->delete();\n\n $advisors = [\n ['id' => '0001111', 'first_name' => 'Hassan', 'last_name' => 'Reza', 'email' => '[email protected]'],\n ['id' => '0002222', 'first_name' => 'Travis', 'last_name' => 'Desell', 'email' => '[email protected]'],\n ];\n\n // Uncomment the below to run the seeder\n DB::table('advisors')->insert($advisors);\n }", "title": "" }, { "docid": "83806ba52791ac39317a9e97fdf5a167", "score": "0.78631747", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(Post::class, 10)->create();\n factory(User::class, 10)->create();\n factory(Catagory::class, 10)->create();\n }", "title": "" }, { "docid": "ab431e20cc3d00876d3107671e71dfce", "score": "0.7857198", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \n DB::table('rols')->insert([\n 'nombre'=>'Administradores',\n 'estado' =>1\n ]);\n\n\n DB::table('personas')->insert([\n 'nombre'=>'admin',\n 'idRol' => 1,\n 'estado' =>1\n ]);\n\n\n DB::table('usuarios')->insert([\n 'nombre'=>'admin',\n 'password' => 'admin',\n 'idPersona' => 1,\n 'estado' => 1\n ]);\n\n\n\n DB::table('rols')->insert([\n 'nombre'=>'Bodeguero',\n 'estado' =>1\n ]);\n\n\n DB::table('rols')->insert([\n 'nombre'=>'Empleados',\n 'estado' =>1\n ]);\n\n }", "title": "" }, { "docid": "60ca7f756e4476d50cae23404adff94e", "score": "0.7848712", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create();\n factory(App\\User::class, 'admin', 1)->create();\n factory(App\\Event::class, 10)->create();\n factory(App\\Vacation::class, 10)->create();\n factory(App\\UserActivites::class, 10)->create();\n \n\n for ($i = 1; $i <= 10; $i++ ) {\n DB::table('user_vacation')->insert([\n 'user_id' => rand(1, 10),\n 'vacation_id' => rand(1, 10)\n ]);\n }\n DB::table('roles')->insert([\n [\n 'role_name' => \"admin\",\n ],\n [\n 'role_name' => \"manager\",\n ],\n [\n 'role_name' => \"employee\",\n ],\n ]);\n }", "title": "" }, { "docid": "87e9177da05f4ca3502f77df8e5593ef", "score": "0.78444487", "text": "public function run()\n {\n // DB::table('users')->truncate();\n // factory(User::class)->create(\n // [\n // \"email\"=>\"[email protected]\",\n // \"password\"=>Hash::make(App::environment(\"DB_PASSWORD\"))\n // ]\n // );\n $this->call(CategorySeeder::class);\n \n $this->call(DiscountSeeder::class);\n\n }", "title": "" }, { "docid": "9b678da2216c7ad2d5530677c1dba41e", "score": "0.7829541", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n \\App\\Sport::truncate();\n \t$sports = [\n \t\t[\n \t\t\t'name' => 'Basquete',\n \t\t],\n \t\t[\n \t\t\t'name' => 'Volei',\n \t\t],\n \t\t[\n \t\t\t'name' => 'Futebol',\n \t\t],\n \t\t[\n \t\t\t'name' => 'Canoagem',\n \t\t],\n \t\t[\n \t\t\t'name' => 'Tênis de mesa',\n \t\t],\n \t\t[\n \t\t\t'name' => 'Bets',\n \t\t],\n \t\t[\n \t\t\t'name' => 'Pipa',\n \t\t],\n \t];\n \t\n \t\n \t\\App\\Sport::insert($sports);\n\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n }", "title": "" }, { "docid": "2d62531f18a91512d0a3f0505f4ef886", "score": "0.78210163", "text": "public function run()\n {\n\n $faker= Faker::create();\n\n foreach (range(1,100) as $index){\n Article::create([\n 'title'=>$faker->sentence(6),\n 'description'=>$faker->paragraph(1),\n ]);\n }\n // \\App\\Models\\User::factory(10)->create();\n }", "title": "" }, { "docid": "08a77e0fbb8703933812bc2c29d383da", "score": "0.78156805", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\Langage::class, 5)\n ->create()\n ->each(function($lang) {\n $lang->translations()->saveMany(factory(App\\Translation::class,\n rand(2, 4))->make());\n });\n }", "title": "" }, { "docid": "a6e889f662490d03076345e00e725d10", "score": "0.7809831", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('events')->insert([\n 'name' => 'sport',\n 'description' => 'football match ',\n 'address' => 'alex gleem '\n ]);\n DB::table('events')->insert([\n 'name' => 'art',\n 'description' => 'draw ',\n 'address' => 'alex sedy gaber '\n ]);\n DB::table('events')->insert([\n 'name' => 'running',\n 'description' => 'running ',\n 'address' => 'alex mandara '\n ]);\n }", "title": "" }, { "docid": "6dca1a129907a23e6374ee008363cb13", "score": "0.7809656", "text": "public function run()\n {\n // La creación de datos de roles debe ejecutarse primero\n $this->call(RoleTableSeeder::class);\n\n // Los usuarios necesitarán los roles previamente generados\n $this->call(UserTableSeeder::class);\n \n DB::table('places')->insert(['place'=>'Depósito']);\n DB::table('places')->insert(['place'=>'Showroom']);\n \n DB::table('img_categories')->insert(['category'=>'previewA']);\n DB::table('img_categories')->insert(['category'=>'previewB']);\n DB::table('img_categories')->insert(['category'=>'previewLarge']);\n DB::table('img_categories')->insert(['category'=>'imgCatalog']);\n \n DB::table('shoe_categories')->insert(['name'=>'Boots']);\n DB::table('shoe_categories')->insert(['name'=>'Sandals']);\n DB::table('shoe_categories')->insert(['name'=>'Stilettos']);\n DB::table('shoe_categories')->insert(['name'=>'Flats']);\n DB::table('shoe_categories')->insert(['name'=>'Tango']);\n \n /* factory(Shoe::class)->times(6)->create(); */\n\n DB::table('addresses')->insert([\n 'user_id'=> 1,\n 'name'=> 'Showroom',\n 'surname'=>'Laila Frank',\n 'street'=>'3 de Febreo',\n 'number'=>'1390',\n 'floor'=>'floor',\n 'apartment'=>'Planta baja E',\n 'city'=>'Capital Federal',\n 'state'=>'Buenos Aires',\n 'post_code' =>'C1428AHD',\n 'country'=>'Argentina'\n ]);\n }", "title": "" }, { "docid": "42022b50cf9926c784f4e79e0feacbdb", "score": "0.78001225", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // Event::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 Event::create([\n 'image' => $faker->image(),\n 'name' => $faker->name(),\n 'date_time' => $faker->date(),\n 'venue' => $faker->address,\n 'phone' => $faker->phoneNumber,\n 'u_id' => $faker->numberBetween($min=1,$max=11), \n 'o_id' => $faker->numberBetween($min=1,$max=11)\n ]);\n }\n }", "title": "" }, { "docid": "f875ec63b40623c53ead81b3a234fea0", "score": "0.7794292", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => \"root\",\n 'email' => \"[email protected]\",\n 'password' => Hash::make('password'),\n ]);\n\n DB::table('phones')->insert([\n 'user_id' => 1,\n 'number' => \"593101010\",\n ]);\n\n DB::table('comments')->insert([\n 'user_id' => 1,\n 'text' => \"My first comment\",\n ]);\n\n DB::table('comments')->insert([\n 'user_id' => 1,\n 'text' => \"My second comment\",\n ]);\n\n DB::table('roles')->insert([\n 'name' => \"customer\",\n ]);\n\n DB::table('roles')->insert([\n 'name' => \"admin\",\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1,\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 2,\n 'user_id' => 1,\n ]);\n }", "title": "" }, { "docid": "afa07ed6bd16bbdeb1f41cb52db0a467", "score": "0.7788638", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'Yuri Ramos Canário Campos',\n 'password' => 'root',\n 'email' => '[email protected]'\n ]);\n \n DB::table('languages')->insert(['name' => 'english']);\n DB::table('languages')->insert(['name' => 'portuguese']);\n DB::table('languages')->insert(['name' => 'spanish']);\n DB::table('knowledges')->insert(['title' => 'Javascript']);\n DB::table('knowledges')->insert(['title' => 'Laravel']);\n DB::table('knowledges')->insert(['title' => 'PHP']);\n DB::table('knowledges')->insert(['title' => 'Delphi']);\n DB::table('courses')->insert(['title' => 'Javascript para Idiotas','emissor' => 'Colégio Dona Bimbinha']);\n DB::table('courses')->insert(['title' => 'Laramassa','emissor' => 'Robertinho Cursos']);\n DB::table('formations')->insert([\n 'title' => 'Analista de Sistemas',\n 'level' => 'Superior'\n ]);\n DB::table('curriculums')\n ->insert(['address'=> 'Coronel Elysio Pereira, 71','phone' => '3422-5194', 'cellphone' => '98535-7065', 'id_user' => 1]);\n }", "title": "" }, { "docid": "e877ab72f0de79c5f54deb3654d66410", "score": "0.7775003", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //factory(\\App\\Model\\User::class, 5)->create();\n //factory(\\App\\Model\\News::class, 150)->create();\n //factory(\\App\\Model\\BookCategory::class, 10)->create();\n //factory(\\App\\Model\\Books::class, 100)->create();\n // factory(\\App\\Model\\Ticket::class, 20)->create();\n //factory(\\App\\Model\\Forum::class, 10)->create();\n //factory(\\App\\Model\\ForumAnswer::class, 40)->create();\n //factory(\\App\\Model\\Community::class, 30)->create();\n //factory(\\App\\Model\\CommunityPost::class, 90)->create();\n //factory(\\App\\Model\\Elon::class, 90)->create();\n //factory(\\App\\Model\\VideoCourse::class, 50)->create();\n //factory(\\App\\Model\\VideoCourseGallery::class, 150)->create();\n //factory(\\App\\Model\\FaqCategory::class, 10)->create();\n //factory(\\App\\Model\\Faq::class, 100)->create();\n// factory(\\App\\Model\\PoolResult::class, 50)->create();\n// factory(\\App\\Model\\Notice::class, 50)->create();\n\n }", "title": "" }, { "docid": "7784ebb5b249a5db796b6f9983ce71ff", "score": "0.77745116", "text": "public function run()\n {\n $user = App\\User::all()->pluck('id')->toArray();\n $faker = Faker::create();\n\n DB::table('posts')->insert([\n [\n 'user_id' =>Arr::random($user),\n 'title' => 'How to use a lightsaber efficiently',\n 'body' => $faker->text($maxNbChars = 2000),\n ],\n [\n 'user_id' =>Arr::random($user),\n 'title' => 'How to deal with an distant father',\n 'body' => $faker->text($maxNbChars = 2000),\n ],\n [\n 'user_id' =>Arr::random($user),\n 'title' => 'How to lose a holochess game to a Wookie',\n 'body' => $faker->text($maxNbChars = 2000),\n ],\n ]);\n }", "title": "" }, { "docid": "05d569ef8b55f0987f197ee527ce3d09", "score": "0.77744925", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\Models\\User::class, 20)->create();\n factory(App\\Models\\Location::class, 20)->create();\n factory(App\\Models\\Category::class, 10)->create();\n factory(App\\Models\\Course::class, 20)->create();\n factory(App\\Models\\Tutor::class, 20)->create();\n factory(App\\Models\\Role::class, 3)->create();\n \n }", "title": "" }, { "docid": "27fc74dfbd1c11bbbe2e4767b9aef069", "score": "0.77672327", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n\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// \\App\\User::create([\n// 'name' => $faker->sentence,\n// 'email' => $faker->email,\n// 'password' => $faker->password(8, 15),\n// 'api_token' => $faker->name('Jll7q0BSijLOrzaOSm5Dr5hW9cJRZAJKOzvDlxjKCXepwAeZ7JR6YP5zQqnw')\n// ]);\n// }\n for ($i = 0; $i < 50; $i++) {\n \\App\\Job::create([\n 'title' => $faker->sentence,\n 'description' => $faker->sentence,\n 'organization' => $faker->sentence,\n 'type' => $faker->word('U'),\n 'salary' => $faker->numberBetween(10000,50000),\n 'date' => $faker->date('1996-08-26')\n ]);\n }\n }", "title": "" }, { "docid": "e81d2ef647926f3ba5603be994a414ca", "score": "0.7765724", "text": "public function run()\n {\n // users table seeds\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n 'user_type' => 1,\n 'status' => 1,\n ]);\n\n // users table seeds\n DB::table('roles')->insert([\n 'name' => 'admin',\n 'display_name' => 'Administrator',\n 'description' => 'administrator can access admin panel',\n ]);\n\n DB::table('roles')->insert([\n 'name' => 'instructor',\n 'display_name' => 'Instructor',\n 'description' => 'instructor can not access admin panel',\n ]);\n\n DB::table('roles')->insert([\n 'name' => 'student',\n 'display_name' => 'Student',\n 'description' => 'student can not access admin panel',\n ]);\n\n // permissions table seeds\n DB::table('permissions')->insert([\n 'name' => 'question',\n 'display_name' => 'question',\n 'description' => 'question',\n ]);\n\n DB::table('permissions')->insert([\n 'name' => 'exam',\n 'display_name' => 'exam',\n 'description' => 'exam',\n ]);\n }", "title": "" }, { "docid": "e21ba40d9f1a7c1c807e323e4659bf00", "score": "0.7761533", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \\App\\User::truncate();\n \\App\\Profile::truncate();\n \\App\\Group::truncate();\n \\App\\GroupUser::truncate();\n\n $user = factory('App\\User')->create([\n 'email' => '[email protected]',\n 'password' => bcrypt(123123),\n 'is_confirmed' => true\n ]);\n\n factory('App\\Profile')->create(['user_id' => $user->id]);\n\n $users = factory('App\\User', 100)->create();\n\n $groups = factory('App\\Group', 20)->create();\n\n $users->each(function ($user) {\n factory('App\\Profile')->create(['user_id' => $user->id]);\n });\n\n $groups->each(function ($group) {\n factory('App\\GroupUser', 5)->create(['group_id' => $group->id]);\n });\n\n }", "title": "" }, { "docid": "ddcf0166e4683fc6ddd3a15c1619f33f", "score": "0.7761254", "text": "public function run()\n {\n $categories = ['Bollywood','Hollywood','Sports','Politics','Health','Tips','Local'];\n foreach($categories as $category){\n DB::table('categories')->insert([\n 'title' => $category\n ]);\n }\n // $this->call(UsersTableSeeder::class);\n // factory(App\\Category::class, 10)->create();\n // factory(App\\User::class, 10)->create();\n }", "title": "" }, { "docid": "2a91b06c48e8a30771182a29303f45e7", "score": "0.77577376", "text": "public function run()\n {\n $this->call(UserSeeder::class);\n $this->call(AuthorSeeder::class);\n $this->call(BookSeeder::class);\n $this->call(GenreSeeder::class);\n $this->call(FollowSeeder::class);\n factory(App\\Shelf::class,4)->create();\n $this->call(reviewSeeder::class);\n //factory(App\\Review::class,1)->create();\n /*factory(App\\User::class, 50)->create();\n factory(App\\Author::class, 20)->create();\n factory(App\\Book::class, 50)->create();\n factory(App\\Review::class,50)->create();\n factory(App\\Genre::class, 20)->create();\n factory(App\\Comment::class,30)->create();\n factory(App\\Likes::class,30)->create();\n factory(App\\Shelf::class,20)->create();\n factory(App\\Following::class,15)->create();*/\n\n }", "title": "" }, { "docid": "7ceb2ba0b5921e33483bce90bd4dcff8", "score": "0.7755898", "text": "public function run()\n {\n // Truncate existing records to start from scratch.\n DB::table('items')->delete();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few items in our database:\n for ($i = 0; $i < 50; $i++) {\n $item_create = Item::create([\n 'name' => $faker->name,\n 'qnt' => $faker->numberBetween(1, 200),\n 'value' => $faker->numberBetween(1, 1264),\n 'category' => $faker->word,\n 'subcategory' => $faker->word,\n 'collection_id' => $faker->numberBetween(0, 1264),\n 'tags' => $faker->shuffleArray([\"porsche\", \"design\"]),\n ]);\n $item_create -> orders() -> attach(Order::all()->random());\n }\n }", "title": "" }, { "docid": "9844485296efb745821003e46a8eb05f", "score": "0.7749864", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n // Calling Category Table Seeder\n // $this->call(CategoryTableSeeder::class);\n\n factory(Category::class,100)->create();\n factory(Person::class,100)->create();\n factory(Post::class,100)->create();\n }", "title": "" }, { "docid": "57c330d48459442abbc71684fe360201", "score": "0.77471614", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n// factory(\\App\\User::class, 4)->create();\n// factory(\\App\\Post::class, 15)->create();\n\n $this->call(RolesTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserRolesTableSeeder::class);\n $this->call(AttributeGroupsSeeder::class);\n $this->call(AttributeProductsSeeder::class);\n $this->call(AttributeValuesSeeder::class);\n $this->call(BrandsSeeder::class);\n $this->call(CategoriesSeeder::class);\n $this->call(CurrenciesSeeder::class);\n $this->call(GalleriesSeeder::class);\n $this->call(ProductsSeeder::class);\n $this->call(RelatedProductsSeeder::class);\n $this->call(OrdersSeeder::class);\n $this->call(AdminOrderProductsSeeder::class);\n }", "title": "" }, { "docid": "70d62fecb535e08b51a51e4932b4b2b3", "score": "0.77444977", "text": "public function run()\n {\n //\\App\\Models\\User::factory(1)->create();\n\n //Category::factory(3)->create();\n \n Tag::factory(10)->create();\n\n /*$this->call([\n PostsTableSeeder::class\n ]);*/\n }", "title": "" }, { "docid": "c76cc6eac7d476133144a0afc9b69d55", "score": "0.7744303", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class,10)->create();\n factory(Category::class,5)->create();\n factory(Question::class,5)->create();\n factory(Reply::class,50)->create()->each(function($reply){\n return $reply->like()->save(factory(Likes::class)->make());\n });\n User::create([\n 'name' => 'hamdi',\n 'email' => '[email protected]',\n 'password' => Hash::make('12345678')\n ]);\n }", "title": "" }, { "docid": "6260cdf97e46414c2a70f26808235789", "score": "0.77442646", "text": "public function run()\n {\n $this->cleanDatabase();\n \n Model::unguard();\n\n factory('App\\User',10)->create();\n factory('App\\Candidate', 10)->create();\n factory('App\\CandidateReview', 20)->create();\n\n // factory('App\\Candidate',10)->create()->each(function($candidate) use ($faker){\n\n // factory('App\\Review', 2)->create([ \n // 'user_id' => 1,\n // 'candidate_id' => $candidate->id,\n // 'review' => $faker->paragraph\n // ]);\n\n // });\n\n\n Model::reguard();\n }", "title": "" }, { "docid": "8044f6e9d8f8fc34aeb7da3559bef600", "score": "0.7743904", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t//quitar validaciones de llaves foeranas\n \tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n //truncaremos la tablas para eliminar datos existentes\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n //Ejecutamos factoris\n\n $CantidadUsuarios = 200;\n $CantidadCategorias = 70;\n $CantidadProductos = 2500;\n $CantidadTransaciones = 1650;\n\n\n factory(User::class, $CantidadUsuarios)->create();\n\n factory(Category::class, $CantidadCategorias)->create();\n\n factory(Product::class, $CantidadProductos)->create()->each(\n\n \t function ($producto)\n \t{\n \t\t$categorias = Category::all()->random(mt_rand(1, 5))->pluck('id');\n \t\t$producto->categories()->attach($categorias);\n \t}\n );\n\n factory(Transaction::class, $CantidadTransaciones)->create();\n }", "title": "" }, { "docid": "764c005a9562e9bdd683c2a6a7fbc498", "score": "0.7740468", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // insert Fake data to table\n\n\n DB::table('companies')->insert(['name' => \"Company 1\", 'created_at' => now()]);\n DB::table('companies')->insert(['name' => \"Company 2\", 'created_at' => now()]);\n DB::table('companies')->insert(['name' => \"Company 3\", 'created_at' => now()]);\n DB::table('companies')->insert(['name' => \"Company 4\", 'created_at' => now()]);\n\n\n DB::table('specialties')->insert(['name' => \"IT\", 'created_at' => now()]);\n DB::table('specialties')->insert(['name' => \"DT\", 'created_at' => now()]);\n\n\n DB::table('users')->insert([\n \"name\" => \"abd\",\n \"email\" => \"abd@haboub\",\n \"password\" => '$2y$10$F6qgEnGfdKncSgldWYchRerE4HjeI6lm1Zg7u8QPRFrsJSmk70Ava',\n \"role\" => 0,\n ]);\n }", "title": "" }, { "docid": "c6bb2cf6f8efd0afe02972619083aff6", "score": "0.7738983", "text": "public function run()\n {\n // Seed database with sample data\n $this->call(RolesTableSeeder::class);\n $this->call(OrganizationTypesTableSeeder::class);\n $this->call(MemberTypesTableSeeder::class);\n $this->call(OrganizationsTableSeeder::class);\n $this->call(MembersTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(ShowTypesSeeder::class);\n $this->call(ShowsTableSeeder::class);\n $this->call(PaymentMethodsTableSeeder::class);\n $this->call(EventTypesSeeder::class);\n $this->call(EventsTableSeeder::class);\n $this->call(TicketTypesTableSeeder::class);\n $this->call(SettingsTableSeeder::class);\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductsTypeTableSeeder::class);\n $this->call(ProductsTableSeeder::class);\n $this->call(RolesAccessControlSeeder::class);\n $this->call(GradesSeeder::class);\n $this->call(PositionsTableSeeder::class);\n\n }", "title": "" }, { "docid": "7b3e6bbb4a66db96f151afdc65f1835a", "score": "0.77370405", "text": "public function run()\n {\n $this->call([\n PermissionsTableSeeder::class,\n RolesTableSeeder::class,\n PermissionRoleTableSeeder::class,\n UsersTableSeeder::class,\n RoleUserTableSeeder::class,\n TeamTableSeeder::class,\n TeamUserTableSeeder::class,\n CategorySeeder::class,\n ]);\n\n Blog::factory(5)->create(); // Create 5 blogs\n Tag::factory(2)->create(); // Create 8 tags\n\n foreach(Blog::all() as $blog){ // loop through all posts \n $random_tags = Tag::all()->random(rand(1, 2))->pluck('id')->toArray();\n // Insert random blog tag\n foreach ($random_tags as $tag) {\n DB::table('blog_tag')->insert([\n 'blog_id' => $blog->id,\n 'tag_id' => $tag,\n 'blog_tag_type' => \"blogs\",\n ]);\n }\n }\n }", "title": "" }, { "docid": "93c52e20cd594fea79bf6e21cba5bf0b", "score": "0.7736773", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Role::truncate();\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Role::flushEventListeners();\n\n\n $this->call([\n RoleSeeder::class\n ]);\n\n $usersQuantity = 100;\n $categoriesQuantity = 30;\n $productsQuantity = 100;\n\n User::factory()\n ->count($usersQuantity)\n ->create();\n\n Category::factory()\n ->count($categoriesQuantity)\n ->create();\n\n Product::factory()\n ->count($productsQuantity)\n ->create()\n ->each(function($product){\n $categories = Category::all()->random(mt_rand(1,5))->pluck('id');\n\n $product->categories()->attach($categories);\n });\n }", "title": "" }, { "docid": "bfa9e61d9a3e49e7b926d240b764afaa", "score": "0.77351654", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('superadmin_account')->insert([\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('admin')\n // ]);\n\n DB::table('tm_role')->insert([\n 'name' => 'Administrator',\n 'level' => 'Admin',\n 'description' => 'Role for administrator'\n ]);\n\n DB::table('tm_role')->insert([\n 'name' => 'User',\n 'level' => 'User',\n 'description' => 'Role for user'\n ]);\n\n $this->call([\n UserSeeder::class,\n ]);\n\n $this->call([\n ModuleSeeder::class,\n ]);\n\n $this->call([\n MenuSeeder::class,\n ]);\n\n $this->call([\n AccessSeeder::class,\n ]);\n\n $this->call([\n ProductCategorySeeder::class,\n ]);\n }", "title": "" }, { "docid": "4dcbd25935917c2d381dccc8d7ded3ad", "score": "0.7734701", "text": "public function run()\n {\n City::factory(config('serempre.seeds.cities'))\n ->hasClients(config('serempre.seeds.clients'))\n ->create();\n\n User::create([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password\n ]);\n\n User::factory(config('serempre.seeds.users'))\n ->create();\n }", "title": "" }, { "docid": "32ccd27e79a39d71880d591a0a9f0bfc", "score": "0.7732237", "text": "public function run()\n {\n //to insert data into my DB table using seed class and call this seeder class inside DatabseSeeder\n // DB::table('posts')->insert([\n\n // 'title' => 'First Post Title',\n // 'body' => 'First Post Body',\n\n //to insert a second record just change this and run the seed commad.\n\n // 'title' => 'Second Post Title',\n // 'body' => 'Second Post Body',\n // ]);\n //to insert a multiple record at a time use Faker packege and write the below code\n\n $faker = Faker::create();\n foreach (range(1, 100) as $index) {\n DB::table('posts')->insert([\n 'title' => $faker->sentence(5),\n 'body' => $faker->paragraph(4),\n ]);\n }\n }", "title": "" }, { "docid": "d681f120866ba260ce624d8f848b39d2", "score": "0.7730474", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('posts')->insert([\n 'content' => \"Of course, manually specifying the attributes for each model seed is cumbersome. Instead, you can use model factories to conveniently generate large amounts of database records. First, review the model factory documentation to learn how to define your factories. Once you have defined your factories, you may use the factory helper function to insert records into your database.\",\n 'user_id'=>1\n ]);\n DB::table('posts')->insert([\n 'content' => \"Of course, for each model seed is cumbersome. Instead, you can use model factories to conveniently generate large amounts of database records. First, review the model factory documentation to learn how to define your factories. Once you have defined your factories, you may use the factory helper function to insert records into your database.\",\n 'user_id'=>2\n ]);\n DB::table('posts')->insert([\n 'content' => \"Of course, manually specifying the attributes for each model seed is cumbersome. Instead, you can use model factories to conveniently generate large amounts of database records. First, review the model factory documentation to learn how to define your factories. Once you have defined your factories, you may use the factory helper function to insert records into your database.\",\n 'user_id'=>1\n ]);\n DB::table('posts')->insert([\n 'content' =>\"Of course, manually specifying the attributes for each model seed is cumbersome. Instead, you can use model factories to conveniently generate large amounts the model factory documentation to learn how to define your factories. Once you have defined your factories, you may use the factory helper function to insert records into your database.\",\n 'user_id'=>2\n ]);\n }", "title": "" }, { "docid": "5f5815401e74483805353b02311e2841", "score": "0.7728041", "text": "public function run()\n {\n //faker 实例\n $faker=app(Faker\\Generator::class);\n //获取用户ID\n $users=User::all()->pluck(\"id\")->toArray();\n $posts=factory(Post::class)->times(100)->make()->each(function($post,$index) use ($users,$faker){\n $post->user_id=$faker->randomElement($users);\n });\n Post::insert($posts->toArray());\n }", "title": "" }, { "docid": "29b7b2d4d9390099d2c10f37ea147499", "score": "0.7719431", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n $this->call(LocationSeeder::class);\n Library::factory(1)->create();\n Book::factory(20)->create();\n Category::factory(15)->create();\n rating::factory(20)->create();\n Blog::factory(20)->create();\n }", "title": "" }, { "docid": "bacac0bd28ab92bcc4f659047ceea4f7", "score": "0.7717704", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'Tobias de Vargas',\n 'email' =>'[email protected]',\n 'password' => bcrypt('12345678'),\n ]);\n\n DB::table('accs')->insert([\n 'nome' => 'Estágios',\n 'limiteHoras' =>'100',\n 'horas' => '180',\n 'user_id' => '1'\n ]);\n\n }", "title": "" }, { "docid": "752c92fd7013ac44464dfe6590becae6", "score": "0.7717582", "text": "public function run()\n {\n \\DB::table('positions')->delete();\n \\DB::table('divisions')->delete();\n \\DB::table('jabatans')->delete();\n \\DB::table('periodes')->delete();\n\n\n Jabatan::create(['name'=>'Founder']);\n Jabatan::create(['name'=>'Director']);\n Jabatan::create(['name'=>'Manager']);\n Jabatan::create(['name'=>'Staff']);\n\n Periode::create(['name'=>'1.0']);\n Periode::create(['name'=>'2.0']);\n Periode::create(['name'=>'3.0']);\n\n Division::factory(10)->create()->each(function($d) {\n $d->positions()\n ->saveMany(\n Position::factory(rand(4, 8))->make());\n }); \n }", "title": "" }, { "docid": "b8c4b74fe31609e49896f56f36110008", "score": "0.7716862", "text": "public function run()\n {\n Model::unguard();\n\n // $this->call(UserTableSeeder::class);\n\n DB::table('users')->insert([\n 'first_name' => 'Администратор',\n 'email' => '[email protected]',\n 'password' => bcrypt('adminadmin'),\n ]);\n\n DB::table('post_statuses')->insert([\n [ 'name' => 'Неопубликован' ],\n [ 'name' => 'На модерации' ],\n [ 'name' => 'Опубликован' ],\n ]);\n\n DB::table('menuitem_types')->insert([\n [ 'name' => 'Внутренняя ссылка' ],\n [ 'name' => 'Внешняя ссылка' ],\n [ 'name' => 'Маркер' ],\n [ 'name' => 'Группа маркеров' ],\n ]);\n\n\n DB::table('administrators')->insert([\n\n 'username' => 'admin',\n 'password' => bcrypt('adminadmin'),\n 'name' => 'Администратор'\n ]);\n\n DB::table('marker_groups')->insert([\n\n [ 'name' => 'Кухня' ],\n [ 'name' => 'Блюдо' ],\n [ 'name' => 'Дневной рацион' ],\n ]);\n\n Model::reguard();\n }", "title": "" }, { "docid": "1412b7a500fe55705ba8cc8539e01d88", "score": "0.77126175", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n DB::table('category_product')->truncate();\n\n $productQty = 200;\n $categoryQty = 20;\n $userQty = 10;\n $transactionQty = 100;\n\n factory(User::class, $userQty)->create();\n factory(Category::class, $categoryQty)->create();\n factory(Product::class, $productQty)->create()->each(function($product){\n \t$categories = Category::all()->random(mt_rand(1,5))->pluck('id');\n \t$product->categories()->attach($categories);\n });\n factory(Transaction::class, $transactionQty)->create();\n\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 1');\n }", "title": "" }, { "docid": "5269eca04d3ed6025e05fdb9504e19a7", "score": "0.7711065", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,50)->create();\n // factory(App\\Category::class,50)->create();\n\n $category=new App\\Category();\n $category->title = \"Features\";\n $category->slug = \"features\";\n $category->save();\n\n $category=new App\\Category();\n $category->title = \"Food\";\n $category->slug = \"food\";\n $category->save();\n\n $category=new App\\Category();\n $category->title = \"Travel\";\n $category->slug = \"travel\";\n $category->save();\n\n $category=new App\\Category();\n $category->title = \"Recipe\";\n $category->slug = \"recipe\";\n $category->save();\n\n $category=new App\\Category();\n $category->title = \"Bread\";\n $category->slug = \"bread\";\n $category->save();\n\n $category=new App\\Category();\n $category->title = \"Breakfast\";\n $category->slug = \"breakfast\";\n $category->save();\n\n $category=new App\\Category();\n $category->title = \"Meat\";\n $category->slug = \"meat\";\n $category->save();\n\n $category=new App\\Category();\n $category->title = \"Fastfood\";\n $category->slug = \"fastfood\";\n $category->save();\n\n $category=new App\\Category();\n $category->title = \"Salad\";\n $category->slug = \"salad\";\n $category->save();\n\n $category=new App\\Category();\n $category->title = \"Soup\";\n $category->slug = \"soup\";\n $category->save();\n }", "title": "" }, { "docid": "0f6e15864469f10a25811c4b5ffceae1", "score": "0.77107096", "text": "public function run()\n {\n /*\n $l=12;\n $faker = Faker\\Factory::create();\n for ($i=1; $i <=$l ; $i++) {\n DB::table('posts')->insert([\n 'title' => 'Titulo'.$i,\n 'description' => $faker->text(),\n 'date' => $faker->date(),\n 'image' => \"58b969a711b739.97759974.png\",\n ]);\n DB::table('tags')->insert([\n 'name' => 'tag'.$i\n ]);\n \t}\n\n for ($i=1; $i <=$l ; $i++) {\n DB::table('post_tag')->insert([\n 'tag_id' => random_int(1, $l),\n 'post_id' => random_int(1, $l)\n ]);\n }\n */\n }", "title": "" }, { "docid": "c201b766accf1049c723381225596164", "score": "0.77106935", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(SettingsTableSeeder::class);\n $this->call(CategoriesTableSeeder::class);\n $this->call(PostsTableSeeder::class);\n $this->call(TagsTableSeeder::class); \n \n\n // $roles = App\\Role::all();\n // // Populate the pivot table\n // App\\User::all()->each(function ($user) use ($roles) { \n // $user->roles()->attach(\n // $roles->random(rand(1, 3))->pluck('id')->toArray()\n // ); \n // });\n }", "title": "" }, { "docid": "8a6f5e3e9c04d0e7d353bd8388559963", "score": "0.77106106", "text": "public function run()\n\t{\n\t\t// Safety measure\n\t\tif(App::environment() == 'production')\n\t\t{\n\t\t\texit('No seeding allowed on production!');\n\t\t}\n\n\t\tEloquent::unguard();\n\n\t $this->insertDefaultUsers();\n\n $this->insertGroups();\n\n $this->addGroupToAdmin();\n\n $this->insertExamplePost();\n \t\t\n\t}", "title": "" }, { "docid": "cccf46daff53fc4f07d90d32ee0a1341", "score": "0.77092713", "text": "public function run()\n {\n $this->call(AdminsTableSeeder::class);\n\n \\App\\Models\\Teacher::factory(100)->create();\n \\App\\Models\\Student::factory(200)->create();\n\n $classes = \\App\\Models\\ClassModel::factory(300)->create();\n ClassModel::chunk(300, function ($classes) {\n foreach ($classes as $class) {\n $student = Student::whereDoesntHave('classes', function($query) use ($class) {\n $query->where('classes.id', $class->id);\n })->get()->random();\n \n ClassStudent::factory()->create(['class_id' => $class->id, 'student_id' => $student->id]);\n }\n });\n\n \\App\\Models\\Mark::factory(700)->create();\n }", "title": "" }, { "docid": "38f2e7532c266522e1d0527e4e080cd3", "score": "0.7709134", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n App\\User::truncate();\n App\\Article::truncate();\n App\\ArticlePage::truncate();\n App\\Comment::truncate();\n\n factory(App\\User::class)->states('myself')->create();\n factory(App\\ArticlePage::class, 20)->create();\n \n $this->call(AdminSeeder::class);\n }", "title": "" }, { "docid": "6173f7ee7635dd924f5ec4c33ab9966a", "score": "0.7703554", "text": "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=> $row->id,\n\t\t\t\t'created_at'\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'slug'\t\t\t=> $row->slug,\n\t\t\t\t'name'\t\t\t=> $row->name,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}", "title": "" }, { "docid": "3517e76e1d8f527e81c70605de01d848", "score": "0.77019715", "text": "public function run()\n {\n $this->seed([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt(000000),\n 'group_id' => 1\n ]);\n\n $this->seed([\n 'name' => 'user1',\n 'email' => '[email protected]',\n 'password' => bcrypt(000000),\n 'group_id' => 3,\n 'district_id' => 35\n ]);\n\n }", "title": "" }, { "docid": "f69ae85a098afc8ab68302edd3f0490e", "score": "0.7698164", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('category_models')->insert([\n 'category' => 'cat',\n ]);\n DB::table('category_models')->insert([\n 'category' => 'dog',\n ]);\n }", "title": "" }, { "docid": "09a708b4e0b52ad5f5689964fc70b6d0", "score": "0.7697185", "text": "public function run()\n {\n //\\App\\Models\\User::factory(50)->create();\n //\\App\\Models\\Skupina::factory(10)->create();\n //\\App\\Models\\Vlakno::factory(50)->create();\n //\\App\\Models\\Prispevek::factory(250)->create();\n //\\App\\Models\\Zadost::factory(10)->create();\n //\\App\\Models\\Clen::factory(100)->create();\n //\\App\\Models\\Hodnotil::factory(1000)->create();\n //\\App\\Models\\Moderator::factory(20)->create();\n $this->call(TestUserSeeder::class);\n $this->call(TestGroupSeeder::class);\n }", "title": "" }, { "docid": "f9448f6133c6e8b37b6532dad95839af", "score": "0.7694687", "text": "public function run()\n {\n $faker = Faker::create();\n\n foreach (range(1, 100) as $i) {\n\n \t$year = Year::orderByRaw('RANDOM()')->first();\n \t$school = School::orderByRaw('RANDOM()')->first();\n\n \tClasse::create([\n \t\t'name' => $faker->words(3, true),\n\t\t\t\t'number' => $faker->randomNumber(2,false),\n\t\t\t\t'year_id' => $year->id,\n\t\t\t\t'school_id' => $school->id\n \t]);\n }\n\n }", "title": "" }, { "docid": "eac5616aa00d523969bc5322c2c0dff6", "score": "0.7694383", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n factory(App\\Models\\Setting::class,1)->create();\n //factory(App\\Models\\Customer::class,1)->create();\n \n //factory(App\\Models\\Category::class,10)->create();\n //factory(App\\Models\\Sub_category::class,10)->create();\n //factory(App\\Models\\ChildTag::class,10)->create();\n //factory(App\\Models\\Pro_model::class,10)->create();\n //factory(App\\Models\\Brand::class,10)->create();\n\n factory(App\\Models\\Invoice_setting::class,1)->create();\n }", "title": "" }, { "docid": "b9cff682d2526f461ce57526e042f677", "score": "0.76934123", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Classroom::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few classrooms in our database:\n for ($i = 0; $i < 10; $i++) {\n Classroom::create([\n 'name' => $faker->word, \n ]);\n }\n }", "title": "" }, { "docid": "b7ef246494fe8d88b196c2b7221af528", "score": "0.7691815", "text": "public function run()\n {\n //Users Seeder factory & Books\n factory(App\\User::class, 10)->create()->each(function ($user)\n {\n $user->books()->saveMany(factory(App\\Models\\Book::class, 2)->make());\n });\n\n //Reviews\n factory(App\\Models\\Review::class, 60)->create();\n }", "title": "" }, { "docid": "f61b7d83aa13c60fe3627733a07ab15f", "score": "0.76914847", "text": "public function run()\n {\n $this->call(UserTableSeeder::class);\n// $this->call(CurrencySeeder::class);\n// $this->call(PermissionsTableSeeder::class);\n// DB::table('users')->insert([\n// 'surname' => 'MR',\n// 'first_name' => 'Imtiaz',\n// 'last_name' => 'ahmed',\n// 'username' => 'admin',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('admin1234'),\n// ]);\n\n// DB::table('business')->insert([\n// 'name' => 'Xyz',\n// 'currency_id' => Currency::first()->id,\n// 'owner_id' => User::first()->id\n// ]);\n// $user = User::first();\n// $user->business_id = Business::first()->id;\n// $user->save();\n }", "title": "" }, { "docid": "4aca49de13fcd4b5b6824cedd323b42a", "score": "0.76904124", "text": "public function run()\n {\n $this->call(EventSpeakerSeeder::class);\n $this->call(EventTypeSeeder::class);\n \n factory(Event::class,10)->create();\n\n factory(Participant::class,10)->create();\n for ($i=0; $i < Event::count(); $i++) {\n factory(EventParticipant::class)->create(['participant_id'=> random_int(1, Participant::count()), 'event_id'=> random_int(1, Event::count())]);\n }\n \n factory(Budget::class,10)->create();\n for ($i=0; $i < Event::count(); $i++) { \n \tfactory(EventBudget::class)->create(['budget_id'=> random_int(1, Budget::count()), 'event_id'=> random_int(1, Event::count())]);\n }\n\n $employee = factory(Employee::class)\n ->create([\n 'email' => '[email protected]',\n 'first_name' => 'Jade',\n 'last_name' => 'Doe',\n 'contact_number' => '09358711471']);\n\n factory(User::class)->create([\n 'email' => $employee->email,\n 'password' => Hash::make('secret'),\n ]);\n }", "title": "" }, { "docid": "d46ce473aff191c97b929677db1af6c9", "score": "0.7689183", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory('App\\Student',40)->create();\n\n $subjects =['Bangla','English','Math'];\n\n foreach ($subjects as $subject) {\n \\App\\Subject::create(['subName' => $subject]);\n }\n }", "title": "" }, { "docid": "1901f179a21e06626c23a8832671e91a", "score": "0.7688056", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('users')->insert([\n // 'name' => 'John Doe',\n // 'email' => '[email protected]',\n // 'email_verified_at' => now(),\n // 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password\n // 'remember_token' => Str::random(10)\n // ]);\n\n //factory(App\\User::class, 20)->create();\n\n /*\n $doe=factory(App\\User::class)->states('john-doe')->create();\n $other=factory(App\\User::class, 20)->create();\n $users=$other->concat([$doe]);\n //dd($users->count());\n\n $posts=factory(App\\BlogPost::class, 50)->make()->each(function($post) use ($users) {\n $post->user_id=$users->random()->id;\n $post->save();\n });\n\n $comments=factory(App\\Comment::class, 150)->make()->each(function($comment) use ($posts) {\n $comment->blog_post_id=$posts->random()->id;\n $comment->save();\n });\n */\n\n if($this->command->confirm('Do you want to refresh the database?', true)) {\n $this->command->call('migrate:refresh');\n $this->command->info('Database was refreshed');\n } else {\n return;\n }\n\n $this->call([\n UsersTableSeeder::class,\n BlogPostsTableSeeder::class,\n CommentsTableSeeder::class,\n TagsTableSeeder::class,\n BlogPostTagTableSeeder::class\n ]);\n }", "title": "" }, { "docid": "fedf5ccdccb089bfacd42517c1914214", "score": "0.7686136", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n $this->call(PostSeeder::class);\n\n // foreach( range(1, 100) as $i) {\n // DB::table('posts')->insert([\n // 'title' => 'First Post',\n // 'content' => 'This is content'\n // ]);\n // }\n\n }", "title": "" }, { "docid": "5f8e1ca4aaa356dde12e347615adf7eb", "score": "0.7683458", "text": "public function run()\n {\n $this->call(RoleSeeder::class);\n\n $this->call(DepartamentSeeder::class);\n $this->call(TownshipSeeder::class);\n \n User::Create([\n 'name' => 'Test',\n 'email' => '[email protected]',\n 'gender'=>'masculino',\n 'birthdate'=>'2000-12-12',\n 'address'=>'direccion del usuario',\n 'number'=>'18007878',\n 'condition'=>1,\n 'email_verified_at' => now(),\n 'password' => '$2y$10$rq5oCT9eD1szjfUsTn5E8uJWCMCvFRjUsrq85t/pz1Qy9CRxoDADu', // password asd.123456\n 'township_id' => rand(1,200),\n 'profile_photo_path' => 'profile-photos/user.png'\n ])->assignRole('Administrador');\n\n User::factory(20)->create();\n $this->call(UserTypeSeeder::class);\n $this->call(UserStatusSeeder::class);\n $this->call(CategorySeeder::class);\n Subscription::factory(90)->Create();\n $this->call(AdvertStatusSeeder::class);\n\n Advert::factory(90)->create();\n $this->call(CurrencySeeder::class);\n Product::factory(90)->create();\n AdvertComment::factory(10)->create();\n $this->call(AdvertPhotoSeeder::class);\n\n \n \n\n }", "title": "" }, { "docid": "4675f99b4c0549cf01a20835acd2fc30", "score": "0.7682812", "text": "public function run()\n {\n $faker = Factory::create();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Order_Fruit::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $usersIDs = DB::table('users')->pluck('id');\n $fruitsIDs = DB::table('users')->pluck('id');\n\n for ($i = 1; $i <= 20; $i++) {\n Order_Fruit::create([\n 'user_id' => $faker->randomElement($usersIDs),\n 'fruit_id' => $faker->randomElement($fruitsIDs),\n 'quantity' => mt_rand(1, 10000)\n ]);\n }\n }", "title": "" }, { "docid": "9ba73b432cc500f657e338ec268d734b", "score": "0.76766217", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $insertUser = [\n 'name' => 'Admin',\n\n 'email' => '[email protected]',\n\n 'email_verified_at' => now(),\n\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password\n\n 'remember_token' => 1\n ];\n\n User::create($insertUser);\n\n //Tipos\n Tipo::create(['nome'=>'Projetor']);\n Tipo::create(['nome'=>'Caixa de Som']);\n Tipo::create(['nome'=>'Cadeira']);\n Tipo::create(['nome'=>'Microfone']);\n //Equipamentos\n Equipamento::create([\n 'nome'=>'Projetor Sala 2',\n 'tombamento'=>520,\n 'tipo_id' =>'1'\n ]);\n Equipamento::create([\n 'nome'=>'Caixa de Som Sala 2',\n 'tombamento'=>420,\n 'tipo_id' =>'2'\n ]);\n Equipamento::create([\n 'nome'=>'Cadeira do L2',\n 'tombamento'=>320,\n 'tipo_id' =>'3'\n ]);\n Equipamento::create([\n 'nome'=>'Microfone da DAEE',\n 'tombamento'=>220,\n 'tipo_id' =>'4'\n ]);\n \n }", "title": "" }, { "docid": "42fc2a1b8f646134de8caf8efc3e3085", "score": "0.7676048", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::table('colaboradores')->insert([\n \t'nome' => 'Thiago Hofmeister',\n \t'email' => '[email protected]',\n \t'telefone' => '(51) 99401-7101',\n \t'data_nascimento' => '1997-04-25',\n \t'password' => Hash::make('540120'),\n \t'status' => '1'\n ]);\n DB::table('colaboradores')->insert([\n \t'nome' => 'Tiago Silveira',\n \t'email' => '[email protected]',\n \t'telefone' => '(51) 99366-4639',\n \t'data_nascimento' => '1997-04-25',\n \t'password' => Hash::make('456123'),\n \t'status' => '1'\n ]);\n }", "title": "" }, { "docid": "afbaaf086b3f79ed1f806e9a33187158", "score": "0.7675129", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //factory('App\\User', 50)->create;\n\n //Model::unguard();\n factory('App\\Estado', 5)->create();\n factory('App\\Municipio', 3)->create();\n factory('App\\Parroquia', 5)->create();\n factory('App\\Filial', 5)->create();\n factory('App\\Nomina', 5)->create();\n //factory('App\\User', 10)->create();\n //factory('App\\Trabajador', 1)->create();\n //factory('App\\Docente', 1)->create();\n factory('App\\Materia', 1)->create();\n //factory('App\\Responsable', 1)->create();\n \n factory('App\\Talla', 4)->create();\n //factory('App\\Institucion', 1)->create();\n //factory('App\\Ruta', 1)->create();\n //factory('App\\Alumno', 1)->create();\n //Model::reguard();\n\n }", "title": "" }, { "docid": "bd0a031dbbd471e642fb795f1cb5d045", "score": "0.7674316", "text": "public function run()\n {\n\n $this->call(\\Database\\Seeders\\RolesSeeder::class);\n $this->call(\\Database\\Seeders\\AdminsSeeder::class);\n \\App\\Models\\Users::factory(4)->create();\n $this->call(\\Database\\Seeders\\CoursesSeeder::class);\n \\App\\Models\\CourseItems::factory(4)->create();\n \\App\\Models\\Assignments::factory(4)->create();\n\n }", "title": "" }, { "docid": "d16b4c245ec59889dc57494208c09493", "score": "0.76738137", "text": "public function run()\n {\n // You can run this seeder after create a db\n // This function can create some fake data\n // sequel pro-test\n\n //need set database as nullable\n // ...->commant()->nullable();\n\n $newResume = new Resume();\n $newResume->name = \"Russell\";\n $newResume->phoneNumber = \"0900000999\";\n $newResume->birthday = \"19960131\";\n $newResume->address = \"home\";\n $newResume->resume = 'hello world';\n //$newResume->resumetyp = 'english';\n $newResume->save();\n }", "title": "" }, { "docid": "7c0b282beba065f3cb3881f8cb6483e6", "score": "0.76734626", "text": "public function run()\n {\n $faker = Factory::create();\n\n factory(User::class, 5)\n ->create()\n ->each(function ($user) use ($faker) {\n factory(Post::class, $faker->numberBetween(2, 20))\n ->create([\n 'user_id' => $user->id\n ])\n ->each(function ($post) use ($faker) {\n factory(Comment::class, $faker->numberBetween(10, 60))\n ->create([\n 'body' => $faker->paragraph,\n 'approved' => mt_rand(1, 2),\n 'type' => mt_rand(1, 10),\n 'commentable_type' => 'App\\Model\\Post',\n 'commentable_id' => $post->id\n ]);\n });\n });\n\n factory(NewsletterSubscription::class, $faker->numberBetween(5, 10))->create();\n //factory(DB::table('post_categories'), $faker->numberBetween(1, 63))->create();\n }", "title": "" }, { "docid": "770a2fa12b33357de3190927264ee1af", "score": "0.76730675", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class,20)->create();\n Topic::create(['name'=>'Featured sitest','slug' => 'featured']);\n Topic::create(['name'=>'Useful links','slug' => 'Links']);\n Topic::create(['name'=>'Guides Tutorials','slug' => 'Tutorials']);\n\n factory(Post::class,20)->create();\n\n }", "title": "" }, { "docid": "719751addae7f27742c307b2982b7fd6", "score": "0.76726", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(AdminSeeder::class);\n $this->call(SettingSeeder::class);\n $this->call(AboutSeeder::class);\n $this->call(CounterSeeder::class);\n $this->call(SeoSeeder::class);\n // \\App\\Models\\Slider::factory(5)->create();\n // \\App\\Models\\Customer::factory(15)->create();\n // \\App\\Models\\Course::factory(30)->create();\n // \\App\\Models\\Gallary::factory(50)->create();\n // \\App\\Models\\Bolg::factory(30)->create();\n // \\App\\Models\\Advert::factory(30)->create();\n \n }", "title": "" }, { "docid": "ec09ea32933a15c9ae1def22c2a6e32b", "score": "0.767247", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n// $this->call(ThanhVienTableSeeder::class);\n factory(App\\Product::class,50)->create();\n factory(App\\Review::class,300)->create();\n\n }", "title": "" }, { "docid": "da277d77f5d75049f332088792d9a23e", "score": "0.76693535", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n\n foreach(range(1,10) as $value){\n \tApp\\Models\\Survey::create([\n \t\t'name' => $faker->name,\n \t\t'description' => $faker->text,\n \t\t'user_id' => 1,\n \t\t'category_id' => rand(1,10),\n \t]);\n }\n }", "title": "" }, { "docid": "ed928faf974c57003bc826bb9ccb457a", "score": "0.76690495", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n /*DB::table('posts')->insert([\n 'title' => Str::random(30),\n 'body' => Str::random(500),\n 'slug' => Str::random(20)\n ]);*/\n \n \n \n DB::table('comments')->insert([\n 'comment'=>Str::random(40),\n 'user_id'=>1,\n 'post_id'=>1\n ]);\n //$this->call(RolesTableSeeder::class);\n //$this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "9a06a265677a0b9239626227aead02d5", "score": "0.76680243", "text": "public function run()\n {\n DB::table('patients')->delete();\n $faker = Faker::create();\n echo \"[Seed] Table 'patients'\\n\";\n foreach(range(1, 80) as $i) {\n Patient::create([\n 'name' => $faker->firstName,\n 'lastname' => $faker->lastName,\n 'jobtitle' => $faker->jobTitle,\n 'cep' => $faker->numerify('#####-###'),\n 'street' => $faker->streetName,\n 'number' => $faker->buildingNumber(),\n 'district' => $faker->word,\n 'state' => $faker->state,\n 'city' => $faker->city,\n 'cellphone' => $faker->numerify('(##) #####-####'),\n 'phone' => $faker->numerify('(##) ####-####'),\n 'email' => $faker->companyEmail\n ]);\n }\n }", "title": "" }, { "docid": "b1db1834572e6aa1aec44e257c716b76", "score": "0.76651335", "text": "public function run()\n {\n\n Eloquent::unguard();\n\n //disable foreign key check for this connection before running seeders\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n User::truncate();\n $usersData = [\n ['first_name'=>'Admin', 'last_name'=>'Admin','email'=>'[email protected]' ,'password' => Hash::make('admin123'),'contact_no' => '9821258699',\n 'role_id'=>'2','created_at' => Carbon::now(),\n\n ],\n ['first_name'=>'Prajakta', 'last_name'=>'Sisale','email'=>'[email protected]' ,'password' => Hash::make('prajakta123'),'contact_no' => '9821258699',\n 'role_id'=>'2','created_at' => Carbon::now(),\n\n ],\n ['first_name'=>'Praju', 'last_name'=>'Sisale','email'=>'[email protected]' ,'password' => Hash::make('praju123'),'contact_no' => '9821258677',\n 'role_id'=>'5','created_at' => Carbon::now(),\n ]\n\n ];\n\n\n DB::table(\"users\")->insert($usersData);\n }", "title": "" }, { "docid": "7de5c832894871b9776743baacb6f84b", "score": "0.7661534", "text": "public function run()\n {\n // $this->call(my_seeds::class)\n //gets unix timestamp\n\t\t$date = new DateTime();\n\t\t$time_now = $date->format('Y-m-d H:i:s');\n\n DB::table('users')->insert([\n 'fname' => \"Ebrahim\",\n 'sname' => \"Ravat\",\n 'email' => \"[email protected]\",\n 'password' => bcrypt('test123')\n ]);\n\n DB::table('users')->insert([\n 'fname' => \"Bob\",\n 'sname' => \"The Builder\",\n 'email' => \"[email protected]\",\n 'password' => bcrypt('test123')\n ]); \n\n $faker = Faker::create('en_GB');\n $num_of_users = 10;\n $num_of_posts = 25;\n\n foreach (range(1,$num_of_users) as $index) {\n $name = $faker->firstName();\n DB::table('users')->insert([\n 'fname' => $name,\n 'sname' => $faker->lastname(),\n 'email' => $name.\"@\".$faker->domainName,\n 'password' => bcrypt('test123')\n ]);\n } \n\n foreach (range(1,$num_of_posts) as $index) {\n DB::table('rental')->insert([\n 'user_id' => $faker->numberBetween(1,$num_of_users),\n 'title' => $faker->word.\" \".$faker->word,\n 'description' => $faker->paragraph,\n 'make' => $this->randomCarType(),\n 'model' => $faker->word,\n 'avail' => $faker->numberBetween(0,1)\n ]);\n } \n }", "title": "" }, { "docid": "44cb8c34219fda585acb1f8ff6dd4ea1", "score": "0.76614374", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n User::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n $faker = \\Faker\\Factory::create();\n\t\tfor ($i=0; $i < 10; $i++) {\n $name = $faker->lastName();\n $firstname = $faker->firstName();\n DB::table('users')->insert([\n 'mail' => $name.'.'.$firstname.'@gmail.com', \n 'password' => md5($name.'.'.$firstname),\n 'nom' => $name,\n 'prenom' => $firstname,\n 'ville' => $faker->address,\n 'login' => $name.'.'.$firstname,\n 'magasin_id' => $faker->numberBetween($min = 1, $max = 10),\n 'created_at' => Now(),\n 'updated_at' => Now(),\n\t\t ]);\n\t\t}\n }", "title": "" }, { "docid": "15bceb499e4f961c56e4636cd137b2e9", "score": "0.76613784", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $this->call(PermissionTableSeeder::class);\n $this->call(VotesTableSeeder::class);\n\n $user = new \\App\\User();\n $user->name = 'Andrey';\n $user->email = '[email protected]';\n $user->password = md5('[email protected]');\n $user->remember_token = md5(time() . '[email protected]');\n $user->id_permission = 1;\n $user->save();\n\n for ($i = 1; $i < 10; $i++) {\n\n $user = new \\App\\User();\n $user->name = 'Andrey' . $i;\n $user->email = $i . '[email protected]';\n $user->password = md5($i . '[email protected]');\n $user->remember_token = md5(time() . '[email protected]' . $i);\n $user->id_permission = 1;\n $user->save();\n }\n\n for ($i = 1; $i < 5; $i++) {\n\n $rand = (int)rand(0, 5);\n\n for ($j = 1; $j < $rand; $j++) {\n $cq = new \\App\\ClosedQuestion();\n $cq->id_votes = $i;\n $cq->id_users = $j;\n $cq->value = (bool)(round(rand()));\n $cq->save();\n }\n }\n }", "title": "" }, { "docid": "0f13bc8606fe11499f6c86ae6956a222", "score": "0.76611", "text": "public function run()\n {\n $faker = Factory::create();\n\n $users = User::all()->pluck('id')->toArray();\n\n for ($i = 1;$i < 20;$i++) {\n $sentence = $faker->sentence(10);\n DB::table('postsenUS')->insert([\n 'title' => $sentence,\n 'user_id' => $faker->randomElement($users),\n 'slug' => $faker->slug,\n 'content' => $faker->text()\n ]);\n }\n }", "title": "" }, { "docid": "1216b563a7d5d0b82da21dc42d8e3a86", "score": "0.7660163", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class)->times(150)->create();\n\n $brands = factory(App\\Brand::class)->times(10)->create();\n $categories = factory(App\\Category::class)->times(9)->create();\n $colors = factory(App\\Color::class)->times(9)->create();\n $sizes = factory(App\\Size::class)->times(7)->create();\n $states = factory(App\\State::class)->times(3)->create();\n $subcategories = factory(App\\Subcategory::class)->times(2)->create();\n $products = factory(App\\Product::class)->times(50)->create();\n \t\t$users = factory(App\\User::class)->times(150)->create();\n \n\n\n\n foreach ($products as $oneProduct) {\n \t\t\t$oneProduct->brand()->associate($brands->random(1)->first()->id);\n $oneProduct->category()->associate($categories->random(1)->first()->id);\n \t\t\t$oneProduct->user()->associate($users->random(1)->first()->id); \n \t\t\t$oneProduct->save();\n\n \t\t\t$oneProduct->colors()->sync($colors->random(3));\n $oneProduct->sizes()->sync($sizes->random(3));\n\n \t\t}\n\n // foreach ($categories as $oneCategory) {\n // $oneCategory->subcategories()->attach($subcategories->random(1)->first()->id);\n // $oneCategory->save();\n // }\n\n\n\n foreach ($categories as $oneCategory) {\n $oneCategory->subcategories()->sync($subcategories->random(2));\n }\n\n\n }", "title": "" }, { "docid": "d4f7e3eb2b114563e335340a50429db0", "score": "0.7659646", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \n $user = new User(\n array(\n 'name' => 'Super Usuario',\n 'email'=> '[email protected]',\n 'password' => bcrypt('rootroot')\n )\n );\n \n $user->save();\n\n $role_admin = new Role(array(\n 'name'=>'admin'\n ));\n $role_admin->save();\n\n $role_user = new Role(array(\n 'name'=>'user'\n ));\n $role_user->save();\n\n $user->roles()->save($role_admin);\n\n $category = new Category(\n array(\n 'name'=>'Todos'\n )\n );\n $category->save();\n\n\n\n }", "title": "" }, { "docid": "9369a1d55f720edc3a33b247d343235e", "score": "0.76572263", "text": "public function run()\n {\n User::factory(3)->create();\n\n User::create([\n 'name' => 'Rizky Kurniawan',\n 'username' => 'rizky',\n 'email' => '[email protected]',\n 'password' => Hash::make('password'),\n ]);\n\n Category::create([\n 'name' => 'Web Programming',\n 'slug' => 'web-programming',\n ]);\n\n Category::create([\n 'name' => 'Web Design',\n 'slug' => 'web-design',\n ]);\n\n Category::create([\n 'name' => 'Personal',\n 'slug' => 'personal',\n ]);\n\n Post::factory(20)->create();\n }", "title": "" }, { "docid": "d2fbae49d0c021aff4c1bfc9c0a66c82", "score": "0.76558894", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Comment::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 Comment::create([\n 'post_id' => random_int(1, 50),\n 'user_id' => random_int(1, 14),\n 'content' => $faker->sentence,\n ]);\n }\n }", "title": "" }, { "docid": "4445947d1e55eb937e648f6e94fd1d65", "score": "0.7655459", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::table('users')->insert([\n 'name'=>'admin',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('1234'),\n 'role'=>'Administrador',\n ]);\n\n DB::table('roles')->insert([\n 'name'=>'admin',\n 'display_name'=>'Administrator',\n 'description'=>'User is allowed to manage and edit other users'\n ]);\n\n DB::table('permissions')->insert([\n 'name'=>'edit',\n 'display_name'=>'Edit Users',\n 'description'=>'edit existing users'\n ]);\n\n DB::table('cities')->insert([\n 'name'=>'Guanare',\n ]);\n DB::table('cities')->insert([\n 'name'=>'Acarigua',\n ]);\n\n DB::table('cities')->insert([\n 'name'=>'Barquisimeto',\n ]);\n\n DB::table('permissions')->insert([\n 'name'=>'Editar',\n 'description'=>'Editar usuarios y planes',\n ]);\n\n DB::table('permissions')->insert([\n 'name'=>'Eliminar',\n 'description'=>'Eliminar usuarios y planes',\n ]);\n\n }", "title": "" }, { "docid": "dd7cde5dc611b9f3b4a33844e23265fd", "score": "0.7654757", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(ProductsTableSeeder::class);\n\n $user = factory(User::class)->create([\n 'name' => 'Toko 1',\n 'email' => '[email protected]',\n 'password' => bcrypt('12345678'),\n ]);\n\n factory(Product::class, 20)->create([\n 'user_id' => $user->id,\n ]);\n }", "title": "" }, { "docid": "aef72117062b88a29f397c729bb74ff7", "score": "0.7654305", "text": "public function run()\n {\n DB::table('articles')->delete();\n \n $articles = array(\n ['id' => 1, 'title' => 'Project 1', 'body' => 'project-1', 'created_at' => new DateTime, 'updated_at' => new DateTime],\n \n );\n \n // Uncomment the below to run the seeder\n DB::table('articles')->insert($articles);\n }", "title": "" }, { "docid": "829de54450e151544dc6fdd3c107be13", "score": "0.7651256", "text": "public function run()\n {\n DB::table('facl_relations')->delete();\n $projects = array(\n ['cid' => '2', 'fid' => '4'],\n ['cid' => '3', 'fid' => '5'],\n\n );\n // Uncomment the below to run the seeder\n DB::table('facl_relations')->insert($projects);\n }", "title": "" } ]
b16a235aa3edfef7177fedf92e6aa68c
Function to download the file with tasks
[ { "docid": "b22efcc4eef992cd5e9e5e01512060e3", "score": "0.0", "text": "function downloadCsvFile($filename) {\n header('Content-Type: text/csv');\n header('Content-Disposition: attachment; filename=' . basename($filename));\n header('Expires: 0');\n header('Cache-Control: must-revalidate');\n header('Pragma: public');\n header('Content-Length: ' . filesize($filename));\n readfile($filename);\n }", "title": "" } ]
[ { "docid": "6f8ce30ed0ac95632e23ff00acae1520", "score": "0.8014008", "text": "public function download();", "title": "" }, { "docid": "61e34d0858371e3aca15140b961153fa", "score": "0.730001", "text": "function httpDownload() {\n }", "title": "" }, { "docid": "129ac4b0a43c707c58226bfa448aed01", "score": "0.7236826", "text": "public function download(){\n\t\tif($this->fileInfo){\n\t\t\tforeach($this->fileInfo[\"headers\"] as $headerString){\n\t\t\t\theader($headerString);\n\t\t\t}\n\t\t\treadfile($this->fileInfo[\"url\"]);\n\t\t}\n\t}", "title": "" }, { "docid": "29570c740eeb7e174f758ef46c9fd2ec", "score": "0.7221798", "text": "public abstract function download_file($file_id);", "title": "" }, { "docid": "03f61d91a88b01d65f039ab54977ada5", "score": "0.70054466", "text": "abstract public function downloadFile($destination, $url);", "title": "" }, { "docid": "ccc3d69d73cbbfb5c9cf3c886a3647f2", "score": "0.69174033", "text": "private function download() : void\n {\n $this->downloader->download();\n }", "title": "" }, { "docid": "aa1445ebac1e77389023037fd10c8a77", "score": "0.6866132", "text": "public function actionDownload($id){\n $task = Task::model()->findByPk($id);\n \n $filename = Yii::getPathOfAlias('application.modules.rush.data').'/'.$task->task;\n //die($filename);\n \n $tmp = json_decode($task->advanced, true);\n \n $ext = pathinfo($filename, PATHINFO_EXTENSION);\n \n Yii::app()->getRequest()->sendFile($tmp[\"title\"].'.'.$ext, file_get_contents($filename), NULL, false);\n }", "title": "" }, { "docid": "4bc6b907fb25fcaf2becdddf690bc46f", "score": "0.68616", "text": "public function download($id){\n\t\t$ret_value = $this->auth_action($id);\n\t\tif($ret_value == 'pass'){\t\n\t\t\t// get task details\n\t\t\t$task_data = $data = $this->TskFile->findById($id, array('fields'=> 'TskFile.title'));\n\t\t\t// get task file details\n\t\t\t$data = $this->TskFile->TskFileDetail->find('all', array('conditions' => array('TskFileDetail.tsk_files_id' => $id, 'TskFileDetail.status' => '1'), \n\t\t\t'fields'=> array('attachment')));\n\t\t\t// update read status\n\t\t\t$this->update_read_status($id);\n\t\t\t// if only one file\n\t\t\tif(count($data) == 1){\n\t\t\t\t$this->download_file(WWW_ROOT.'/uploads/tsk_files/'.$data[0]['TskFileDetail']['attachment']);\n\t\t\t}else if(count($data) > 1){\n\t\t\t\tif(extension_loaded('zip')){\n\t\t\t\t\t// create a zip file\n\t\t\t\t\t$zip = new ZipArchive();\n\t\t\t\t\t$filename = $task_data['TskFile']['title'].'.zip';\t\n\t\t\t\t\t$file_path = WWW_ROOT.'/uploads/tsk_files/'.$filename;\n\t\t\t\t\t// create zip file\n\t\t\t\t\tif ($zip->open($file_path, ZipArchive::CREATE) == TRUE){ \n\t\t\t\t\t\t// iterate the files\n\t\t\t\t\t\tforeach($data as $file_detail){\n\t\t\t\t\t\t\t$zip->addFile(WWW_ROOT.'/uploads/tsk_files/'.$file_detail['TskFileDetail']['attachment'], $file_detail['TskFileDetail']['attachment']);\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$zip->close();\n\t\t\t\t\t\t// download the zip file\n\t\t\t\t\t\t$this->download_file($file_path);\n\t\t\t\t\t\tunlink($file_path);\n\t\t\t\t\t\tdie;\n\t\t\t\t\t}else{\n\t\t\t\t\t\texit(\"cannot open <$filename>\\n\");\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tdie('You donot have zip extension');\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$this->Session->setFlash('<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>Oops, No files found', 'default', array('class' => 'alert alert-info'));\n\t\t\t\t$this->redirect('/tskfile/');\t\n\t\t\t}\n\t\t\tdie;\n\t\t}else{\n\t\t\t$this->Session->setFlash('<button type=\"button\" class=\"close\" data-dismiss=\"alert-error\">&times;</button>Invalid Entry', 'default', array('class' => 'alert alert-error'));\t\t\n\t\t\t$this->redirect('/tskfile/');\t\n\t\t}\n\t}", "title": "" }, { "docid": "7f9d002faf3a05ef71dd82ce1ad3774f", "score": "0.68027985", "text": "function curl_download($http,$name) {\n\t$fp = fopen ($name, 'w+');\n\t$ch = curl_init($http);\n\tcurl_setopt($ch, CURLOPT_FILE, $fp);\n\tcurl_exec($ch);\n\tcurl_close($ch);\n\tfclose($fp);\n}", "title": "" }, { "docid": "dd52ad20221b99b8dfb393ca7dce5c6b", "score": "0.68017143", "text": "public function download()\n\t{\n\t\t$fileName = $this->input->get('filename');\n\t\t$this->load->helper('download');\n\t\t$pathFile = RUTA_ARCHIVOS . $fileName;\n\t\tif (!file_exists($pathFile)) {\n\t\t\tshow_404();\n\t\t}\n\t\tforce_download($pathFile, null, false);\n\t}", "title": "" }, { "docid": "4a053a1db7cda6a5f341c731d8effe64", "score": "0.6784079", "text": "protected function _downloadFile()\n {\n $source = \\Yana\\Db\\Binaries\\File::getFileId();\n if ($source === false) {\n exit(\"Error: invalid resource.\");\n }\n $fileConfiguration = \\Yana\\Db\\Binaries\\ConfigurationSingleton::getInstance();\n $directory = preg_quote($fileConfiguration->getDirectory(), '/');\n // downloading a file\n if (preg_match('/^' . $directory . 'file\\.\\w+\\.gz$/', $source)) {\n\n $dbBlob = new \\Yana\\Db\\Binaries\\File($source);\n $dbBlob->read();\n header(\"Cache-Control: maxage=1\"); // Workaround for a Bug in IE8 with HTTPS-downloads\n header(\"Pragma: public\");\n header('Content-Disposition: attachment; filename=' . $dbBlob->getPath());\n header('Content-Length: ' . $dbBlob->getFilesize());\n header('Content-type: ' . $dbBlob->getMimeType());\n print $dbBlob->getContent();\n\n // downloading an image\n } elseif (preg_match('/^' . $directory . '(image|thumb)\\.\\w+\\.png$/', $source)) {\n\n $image = new Image($source);\n $image->outputToScreen();\n\n } else {\n print \"Error: invalid resource.\";\n }\n exit;\n }", "title": "" }, { "docid": "4c0c984c2baa83730dea4338acd12955", "score": "0.67490053", "text": "public function page_download(){\n $this->log('download');\n /**\n * Ask server for file.\n */\n $settings = $this->getSettings();\n if(!$settings->get('ftp')){\n $filename = wfRequest::get('key');\n $url = $this->getUrl('download_capture');\n wfPlugin::includeonce('server/push');\n $push = new PluginServerPush();\n $result = $push->push($url, array('filename' => $filename, 'remote' => $settings->get('remote'), 'token' => $settings->get('token')));\n $result = new PluginWfArray(unserialize($result));\n if($result->get('success')){\n $filename = $this->replaceWebDir($filename);\n /**\n * Create dir if not exist.\n */\n $dirname = dirname(wfGlobals::getAppDir().$filename);\n if(!wfFilesystem::fileExist($dirname)){\n mkdir($dirname, 0777, true);\n }\n /**\n * Save file.\n */\n $size = file_put_contents(wfGlobals::getAppDir().$filename, $result->get('content'));\n $result->set('content', null);\n $result->set('size', $size);\n }\n exit(json_encode($result->get()));\n }else{\n $this->set_ftp();\n $filename = wfRequest::get('key');\n $local_file = $this->replaceWebDir($filename);\n $remote_file = $this->replaceWebDirFtp($filename);\n $bool = $this->ftp->get(wfGlobals::getAppDir().$local_file, $remote_file);\n $result = new PluginWfArray(array('success' => $bool, 'files' => array($remote_file), 'message' => \"File $remote_file was downloaded with FTP.\"));\n $json = json_encode($result->get());\n exit($json);\n }\n }", "title": "" }, { "docid": "cdbe2896e3e9b1064e4df6851abab845", "score": "0.6719031", "text": "public function downloadPost();", "title": "" }, { "docid": "a2f9a17e86ecb3a15bbf4305f5ca2b84", "score": "0.67163223", "text": "public function downloadAction($fileName);", "title": "" }, { "docid": "0b6d62088d30cd77331203343d8332dc", "score": "0.6683703", "text": "public function downloadExport() {\n // NOTE: Getting - You are not authorized to access this page.\n //$request = new Request(['file' => 'content.tar.gz']);\n //return $this->fileDownloadController->download($request, 'temporary');\n $filename = 'content.tar.gz';\n $file_path = file_directory_temp() . '/' . $filename;\n if (file_exists($file_path) ) {\n unset($_SESSION['content_tar_download_file']);\n $mime = \\Drupal::service('file.mime_type.guesser')->guess($file_path);\n $headers = array(\n 'Content-Type' => $mime . '; name=\"' . Unicode::mimeHeaderEncode(basename($file_path)) . '\"',\n 'Content-Length' => filesize($file_path),\n 'Content-Disposition' => 'attachment; filename=\"' . Unicode::mimeHeaderEncode($filename) . '\"',\n 'Cache-Control' => 'private',\n ); \n return new BinaryFileResponse($file_path, 200, $headers);\n }\n return -1;\n }", "title": "" }, { "docid": "c7659d7428df7b3bff7d542abf69d7ab", "score": "0.66777194", "text": "function fileDownload()\n{\n\tglobal $ajax;\n\tglobal $files;\n\tglobal $moduleFilename;\n\n\t$basePath = getBasePath();\n\t$currentPath = getCurrentPath();\n\t$selectedItem = getSelectedItem();\n\t$url = $files->fileDownloadUrl($basePath, $currentPath,\n\t\t$selectedItem, html::getBaseUrl(), '/application/' .\n\t\t$moduleFilename);\n\t$ajax->sendCommand(46, $url);\n}", "title": "" }, { "docid": "f38d491c4a9fdbe059c88fcd0bab806c", "score": "0.6656459", "text": "function file_download() {\n $file = $_GET['file'];\n if (file_exists(file_create_path($file))) {\n $list = module_list();\n foreach ($list as $module) {\n $headers = module_invoke($module, 'file_download', $file);\n if ($headers === -1) {\n drupal_access_denied();\n }\n elseif (is_array($headers)) {\n file_transfer($file, $headers);\n }\n }\n }\n drupal_not_found();\n}", "title": "" }, { "docid": "8fce5a6c1c69633004b130a910381359", "score": "0.6647642", "text": "function file_download() {\n // Merge remainder of arguments from GET['q'], into relative file path.\n $args = func_get_args();\n $filepath = implode('/', $args);\n\n // Maintain compatibility with old ?file=paths saved in node bodies.\n if (isset($_GET['file'])) {\n $filepath = $_GET['file'];\n }\n\n if (file_exists(file_create_path($filepath))) {\n $headers = module_invoke_all('file_download', $filepath);\n if (in_array(-1, $headers)) {\n return drupal_access_denied();\n }\n if (count($headers)) {\n file_transfer($filepath, $headers);\n }\n }\n return drupal_not_found();\n}", "title": "" }, { "docid": "20efb8d4f68adf437ac515769ae3b21b", "score": "0.6559339", "text": "public function actionDownload() {\n\n $attachment_index = 0;\n if (isset($_GET['1'])) {\n $attachment_index = 1;\n } else if (isset($_GET['2'])) {\n $attachment_index = 2;\n } else if (isset($_GET['3'])) {\n $attachment_index = 3;\n }\n if ($attachment_index != 0) {\n //download from detail \n $file_path = Upload_file_common::getAttachmentById($_GET['id'], $attachment_index, 'report');\n } else {\n //download from registconfirm\n $file_path = $_GET['file_name'];\n }\n Yii::import('ext.helpers.EDownloadHelper');\n EDownloadHelper::download(Yii::getPathOfAlias('webroot') . $file_path);\n\n exit;\n }", "title": "" }, { "docid": "b7ce1fefdcb14701f38167a8f6957f89", "score": "0.6493009", "text": "function downloadFromFile($file, $name = '') {\n\t\t$result['output'] = array();\n\t\t$result['status'] = false;\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "9c4fbe7faa90828b86c965c2d346946e", "score": "0.6429442", "text": "function download_file($url,$ext=''){\r\n\t\t\t\t\r\n\t\t\t\t//curl get\r\n\t\t\t\t$x='error';\r\n\t\t\t\t\t\r\n\t\t\t\tcurl_setopt($this->ch, CURLOPT_HTTPGET, 1);\r\n\t\t\t\tcurl_setopt($this->ch, CURLOPT_URL, trim($url));\r\n\t\t\t\t$exec=curl_exec($this->ch);\r\n\t\t\t\t$x=curl_error($this->ch);\r\n\t\t\t\t\t\r\n\t\t\t\tif(trim($x) == '' && trim($exec) != ''){\r\n\t\t\t\t\t\r\n\t\t\t\t\t$upload_dir = wp_upload_dir ();\r\n\t\t\t\t\t$filePath = $upload_dir['basedir'] .'/wp_automatic_temp'.$ext;\r\n\t\t\t\t\t$fileUrl = $upload_dir['baseurl'] .'/wp_automatic_temp'.$ext;\r\n\t\t\t\t\tfile_put_contents($filePath, $exec);\r\n\t\t\t\t\treturn $fileUrl;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn false;\r\n\t\t\t}", "title": "" }, { "docid": "28b263c131b97b71b9c8ec7b042443ef", "score": "0.64153236", "text": "public function downloadAction() \n {\n $filelib = $this->getServiceLocator()->get('FileBank');\n $id = (int) $this->getEvent()->getRouteMatch()->getParam('id');\n\n $file = $filelib->getFileById($id);\n $filePath = $filelib->getRoot() . $file->getSavePath();\n\n header('Content-Description: File Transfer');\n header('Content-Type: ' . $file->getMimetype());\n header('Content-Disposition: attachment; filename=' . $file->getName());\n header('Content-Transfer-Encoding: binary');\n header('Expires: 0');\n header('Cache-Control: must-revalidate');\n header('Pragma: public');\n header('Content-Length: ' . $file->getSize());\n ob_clean();\n flush();\n readfile($filePath);\n exit;\n }", "title": "" }, { "docid": "88866eef72c040864fb10e210bbbf49b", "score": "0.6406712", "text": "public function actionDownload()\n {\n $fileId = $this->actionParams['variables']['matches']['id'];\n $file = craft()->assets->findFile(array('id' => $fileId));\n\n if($file) {\n // deliver file to the clienct (if permission granted)\n $this->_sendFile($file);\n }\n else {\n // TODO: redirect to 404 page\n CRAFT::dd('File not found');\n }\n }", "title": "" }, { "docid": "ca379f35a6ed1cea5f0fa694dda2cf60", "score": "0.6381106", "text": "function _ugyouthportal_download_file($nid) {\n\t\n\t$node = node_load($nid);\n\t$url = '';\n\t$file_mimetype = '';\n\t$filename = '';\n\t\n\tswitch ($node->type) {\n\t\tcase 'video':\n\t\t\t$url = file_create_url($node->field_video['und'][0]['uri']);\n\t\t\t$file_mimetype = $node->field_video['und'][0]['filemime'];\n\t\t\t$filename = $node->field_video['und'][0]['filename'];\n\t\t\tbreak;\n\t\tcase 'document':\n\t\t\t$url = file_create_url($node->field_pdf_file['und'][0]['uri']);\n\t\t\t$file_mimetype = $node->field_pdf_file['und'][0]['filemime'];\n\t\t\t$filename = $node->field_pdf_file['und'][0]['filename'];\n\t\t\tbreak;\n\t\tcase 'audio':\n\t\t\t$url = file_create_url($node->field_audio_track['und'][0]['uri']);\n\t\t\t$file_mimetype = $node->field_audio_track['und'][0]['filemime'];\n\t\t\t$filename = $node->field_audio_track['und'][0]['filename'];\n\t\t\tbreak;\n\t}\n\t\n\tif (!preg_match('/^(f|ht)tps?:\\/\\/.*/i', $url)) { // check if this is absolute URL \n\t\t// if the URL is relative, then convert it to absolute\n\t\t$url = \"http://\" . $_SERVER['SERVER_NAME'] . $url;\n\t}\n\t\n\t/**\n\t * check if the url is valid or not and update the counter\n\t */\n\tif (is_valid_file_url($url)) {\n\t\tpubdlcnt_update_counter($url, $filename, $nid);\n\t}\n\t\n\t/**\n\t * write a better filename\n\t */\n\t$original_filename_parts = explode('.', $filename);\n\t$file_extension = array_pop($original_filename_parts);\n\t$download_filename = drupal_html_class($node->title).'.'.$file_extension;\n\t\n\t/**\n\t * redirect to the original URL of the file\n\t */\n\t\n\t//header ('Location: ' . $url);\n\theader ('Content-type: ' . $file_mimetype);\n\theader ('Content-Disposition: attachment; filename=\"' . $download_filename . '\";');\n\t//header ('Content-Length: ' . filesize($url));\n\treadfile($url);\n\texit;\n}", "title": "" }, { "docid": "4c8090632269c5a27e4f858fbad5cb86", "score": "0.63753253", "text": "public function downloadAction(){\n jcms\\Files::serveFile(\n $this->getRequest()->getParam('id',null),\n $this->getRequest()->getParam('field',null),\n $this->getRequest()->getParam('width',null),\n $this->getRequest()->getParam('height',null),\n $this->getRequest()->getParam('crop', 0),\n true\n );\n }", "title": "" }, { "docid": "3a7d1c23842610e501d0b9b374878761", "score": "0.6333884", "text": "public function file_download($id){\n\t\t$data = $this->TskFile->TskFileDetail->findById($id, array('fields'=> 'attachment'));\n\t\t$this->download_file(WWW_ROOT.'/uploads/tsk_files/'.$data['TskFileDetail']['attachment']);\n\t\tdie;\n\t}", "title": "" }, { "docid": "cf69b64e941d05241d09591386bd8211", "score": "0.6318549", "text": "public function downloadAction()\n {\t\n\n \t// read the RSS feed and get a list of transactions\n \t$transactions = $this->_processFeedData ($this->_getFeedData());\n \t\n \t//process each indivual transaction\n \tforeach ($transactions as $transaction){\n \t\t$this->_updateDatabase($transaction);\n \t}\n }", "title": "" }, { "docid": "be4a75c3d0c91ca2d191d431abe18b39", "score": "0.63171285", "text": "public function download($path, $file, $callback, $offset){}", "title": "" }, { "docid": "e70b79d8c591bce386461cf8895e715e", "score": "0.6309896", "text": "function downloadFile($url, $path) {\n\t $newfname = $path;\n\t $file = fopen ($url, 'rb');\n\t if ($file) {\n\t $newf = fopen ($newfname, 'wb');\n\t if ($newf) {\n\t while(!feof($file)) {\n\t fwrite($newf, fread($file, 1024 * 8), 1024 * 8);\n\t }\n\t }\n\t }\n\t if ($file) {\n\t fclose($file);\n\t }\n\t if ($newf) {\n\t fclose($newf);\n\t }\n\t}", "title": "" }, { "docid": "523cd700700f1600b00bee424a61d0c2", "score": "0.63016695", "text": "public function download_file($token, $path)\n {\n }", "title": "" }, { "docid": "6050dcef19b9fdf131e35889a5ce1aa8", "score": "0.6294179", "text": "public function download(){\n $this->authorization();\n\n $result = $this->_client->api('repos')->archiveLink($this->config['remote']['owner'], $this->config['remote']['repo'], 'zipball', $this->version_remote);\n\n if(!file_exists($this->config['local']['tmpDir']))\n mkdir($this->config['local']['tmpDir'], 0777, true);\n\n $this->zipball = $this->config['local']['tmpDir'].'latest.zip';\n $fp = fopen($this->zipball, 'w');\n fwrite($fp, $result);\n fclose($fp);\n }", "title": "" }, { "docid": "3b419b1a9e43bdcf7b985dd44c282631", "score": "0.6284688", "text": "function wmte_download_url($url, $order, $download) {\r\n\r\n\tif (strpos($url, '-wmte.txt') !== false) {\r\n\t\t// mp url is full url = including http:// and so on... we want the file url\r\n\t\t$path = $_SERVER[\"DOCUMENT_ROOT\"] . explode($_SERVER[\"SERVER_NAME\"], $url)[1];\r\n\t\t$cohort = \"\";\r\n\t\t$course = \"\";\r\n\t\t$seats = 1;\r\n\t\t$places = 1;\r\n\t\t$expiry = 0;\r\n\t\t$prefix = \"\";\r\n\r\n\t\t$data = file($path); // now it's an array!\r\n\t\tforeach ($data as $row) {\r\n\t\t\t$pair = explode(\"=\",$row);\r\n\t\t\tswitch (strtolower(trim($pair[0]))) {\r\n\t\t\t\tcase \"course\":\r\n\t\t\t\t\t$course = trim(str_replace(array('\\'','\"'), '', $pair[1]));\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"cohort\":\r\n\t\t\t\t\t$cohort = trim(str_replace(array('\\'','\"'), '', $pair[1]));\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"seats\":\r\n\t\t\t\t\t$seats = trim(str_replace(array('\\'','\"'), '', $pair[1]));\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"places\":\r\n\t\t\t\t\t$places = trim(str_replace(array('\\'','\"'), '', $pair[1]));\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"expiry\":\r\n\t\t\t\t\t$expiry = trim(str_replace(array('\\'','\"'), '', $pair[1]));\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"prefix\":\r\n\t\t\t\t\t$prefix = trim(str_replace(array('\\'','\"'), '', $pair[1]));\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$args = array(\r\n\t\t \"course\" => $course,\r\n\t\t \"seats\" => $seats,\r\n\t\t \"places\" => $places,\r\n\t\t \"expiry\" => $expiry,\r\n\t\t \"cohort\" => $cohort,\r\n\t\t \"prefix\" => $prefix,\r\n\t\t);\r\n\r\n\t\t$moodle_webservice_token = get_option('wmte_webservice_token');\r\n\t\t$moodle_url = get_option('wmte_moodle_url');\r\n\t\t$moodle_webservice_url = \"$moodle_url/webservice/rest/server.php?wstoken=$moodle_webservice_token&wsfunction=local_token_generatetokens&moodlewsrestformat=json\";\r\n\r\n\t\t$response = wp_remote_post( $moodle_webservice_url, array(\r\n\t\t\t'method' => 'POST',\r\n\t\t\t'timeout' => 45,\r\n\t\t\t'redirection' => 5,\r\n\t\t\t'httpversion' => '1.0',\r\n\t\t\t'blocking' => true,\r\n\t\t\t'headers' => array(),\r\n\t\t\t'body' => $args,\r\n\t\t\t'cookies' => array()\r\n\t\t));\r\n\r\n\t\tif (ob_get_contents()) { ob_clean(); }\r\n\r\n\t\t// we're rendering a page in the middle of a process that is trying to download\r\n\t\t// so it's going to be a bit of hack. the page might look awful. sorry.\r\n\t\tget_header();\r\n\t\t_e('<div id=\"primary\" class=\"content-area\">');\r\n\t\t_e('<main id=\"main\" class=\"site-main\" role=\"main\">');\r\n\t\t_e('<article ' ); post_class(); _e('>');\r\n\t\t_e('<header class=\"entry-header\">');\r\n\t\t_e('<h1 class=\"entry-title\">Here are your tokens</h1>');\r\n\t\t_e('</header><div class=\"entry-content\">');\r\n\t\tif ( is_wp_error( $response ) ) {\r\n\t\t\t$error_message = $response->get_error_message();\r\n\t\t\t_e(\"Something went wrong: $error_message\");\r\n\t\t} else {\r\n\t\t\t$tokens = json_decode($response['body'])->token;\r\n\t\t\t_e(\"<p>Use them on your moodle site <a href='$moodle_url/auth/token/login.php' target='_blank'>$moodle_url/auth/token/login.php</a>.</p>\");\r\n\t\t\t_e(\"<pre>\");\r\n\t\t\tforeach ($tokens as $token) {\r\n\t\t\t\t_e($token . \"\\n\");\r\n\t\t\t}\r\n\t\t\t_e(\"</pre>\");\r\n\t\t}\r\n\t\t_e('</div></article>');\r\n\t\t_e('</main></div>');\r\n\t\tget_sidebar();\r\n\t\tget_footer();\r\n\t\texit(); // don't go any further\r\n\t}\r\n\treturn $url;\r\n}", "title": "" }, { "docid": "d9de9ec266f41e8a4a9d823ed2defaf5", "score": "0.6282131", "text": "function fopen_download($http,$name) {\n\t$f = fopen($http,\"r\");\n\t$f2 = fopen($name,\"w\");\n\tfwrite($f2,stream_get_contents($f));\n\tfclose($f);\n\tfclose($f2);\n}", "title": "" }, { "docid": "84e4a6c94bbce812b8f9439e1347580b", "score": "0.62821", "text": "function downloadFile($file){\r\n\t\t\r\n\t\tif (!empty($file[$this->name]['link'])){\r\n\t\t\t\t\r\n\t\t\t$link = trim($file[$this->name]['link']);\r\n\t\t\t$link = str_replace(' ', '%20', $link);\r\n\t\t\t\r\n\t\t\tif (preg_match('%^(http)%i', $link)>0){\r\n\t\t\t\t\t\r\n\t\t\t\tApp::import('Core', 'HttpSocket');\r\n\t\t\t\t$HttpSocket = new HttpSocket();\r\n\t\t\t\t$tmp = $HttpSocket->request($link);\r\n\t\t\t\t\r\n\t\t\t\tif (preg_match('%/([a-z0-9_\\-\\.\\%]*)$%i', $link, $fname)>0){\r\n\t\t\t\t\tif (!empty($fname[1])){\r\n\t\t\t\t\t\t$fname = $fname[1];\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (empty($fname)){\r\n\t\t\t\t\t$fname = time();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (empty($file[$this->name]['name'])){\r\n\t\t\t\t\t$file[$this->name]['name'] = $fname;\r\n\t\t\t\t}\r\n\t\t\t\t$tmpf = TMP . $fname;\r\n\t\t\t\t\r\n\t\t\t\t$this->tmpFile = new File($tmpf, true);\r\n\t\t\t\tif ($this->tmpFile->write($tmp)){\r\n\t\t\t\t\t$this->tmpFile->close();\t\r\n\t\t\t\t\t$file[$this->name]['extension'] = $this->getLinkExtension($file[$this->name]['link']);\r\n\t\t\t\t\t$file[$this->name]['file_name'] = array(\r\n\t\t\t\t\t\t'name' => $fname,\r\n\t\t\t\t\t\t'tmp_name' => $tmpf,\r\n\t\t\t\t\t\t'size' => $this->tmpFile->size(),\r\n\t\t\t\t\t\t'error' => UPLOAD_ERR_OK\r\n\t\t\t\t\t);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->tmpFile->close();\r\n\t\t\t\t}\r\n\t\t\t\t \r\n\t\t\t\t// tmp file is later deleted, see method afterSave\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $file;\r\n\t}", "title": "" }, { "docid": "4e8db3939bd036f77909423142bce31b", "score": "0.6273788", "text": "public function downloadFile(int $id)\n\t{\n return FileManager::download($id);\n\t}", "title": "" }, { "docid": "f7cac336dd35ab7aa0719b04ad4f4d93", "score": "0.6259156", "text": "protected function download () {\r\n \t\theader(\"Content-type: application/\" . $this->downloadextension . \"; charset=utf-8\");\r\n \t\theader(\"Content-Disposition: attachment; filename=\" . $this->downloadfilename . \".\" . $this->downloadextension);\r\n \t\theader(\"Content-length: \" . filesize($this->getDownloadFullname()));\r\n \t\theader(\"Pragma: no-cache\");\r\n \t\theader(\"Expires: 0\");\r\n \t\treadfile($this->getDownloadFullname()); \t\t\r\n \t}", "title": "" }, { "docid": "5d81c5dfb29c9c5d272e16aad1e215b9", "score": "0.62484336", "text": "public function download()\n {\n if (! ini_get('allow_url_fopen')) {\n throw new Exception('allow_url_fopen is disabled.');\n }\n\n // open the temp file for writing\n $fileHandle = fopen($this->path, 'wb');\n\n if ($fileHandle === false) {\n throw new Exception('Could not open temp file.');\n }\n\n $caPath = CaBundle::getSystemCaRootBundlePath();\n\n if (is_dir($caPath)) {\n $streamOptions = array('ssl' => array('capath' => $caPath));\n } else {\n $streamOptions = array('ssl' => array('cafile' => $caPath));\n }\n\n $streamParams = array('notification' => array($this, 'showDownloadProgress'));\n\n // download context so we can track download progress\n $downloadContext = stream_context_create($streamOptions, $streamParams);\n\n // open the download url for reading\n $downloadHandle = @fopen($this->url, 'rb', false, $downloadContext);\n\n if ($downloadHandle === false) {\n throw new Exception('Could not download installation file.');\n }\n\n while (! feof($downloadHandle)) {\n if (fwrite($fileHandle, fread($downloadHandle, 1024)) === false) {\n throw new Exception('Could not write installation file to disk.');\n }\n }\n\n fclose($downloadHandle);\n\n fclose($fileHandle);\n\n if ($this->progressBar) {\n $this->progressBar->finish();\n\n $this->output->writeln('');\n }\n\n return $this->path;\n }", "title": "" }, { "docid": "ebd6b4ce29f5977b3cf030d861a31ddf", "score": "0.62425846", "text": "public function downloadFile($item){\n $pathToFile=public_path('/site/downloads/'.$item);\n return response()->download($pathToFile);\n }", "title": "" }, { "docid": "c5507e6efca9e678862785b88b5faef5", "score": "0.6236403", "text": "function download(MegaNode $megaNode)\n{\n // TODO: change to initialized static singleton.\n global $mega;\n\n $fileDownload = \\Apfelbox\\FileDownload\\FileDownload::createFromString($mega->downloadFile($megaNode));\n $fileDownload->sendDownload($megaNode->getAttributes()->getName());\n die();\n}", "title": "" }, { "docid": "bb54ac85031a3928f4128418584bf015", "score": "0.6192982", "text": "public function getDownload($file){\n return Response::download($file);\n}", "title": "" }, { "docid": "5f0eede4dd7c6aeaf2f4cb13b13c2790", "score": "0.6178286", "text": "function getDownloadLink();", "title": "" }, { "docid": "95258753bb90c5a1b6c8aa2c899e5ecb", "score": "0.61661476", "text": "public function downloadAction($id)\n {\n\n // return $this->get('nzo_file_downloader')->readFile('uploads/tofs/anim1.png');\n\n # Force file download:\n $em =$this->getDoctrine()->getManager();\n $cour=$em ->getRepository('MyAppCoursBundle:Cours')->find($id) ;\n $imageName=$cour->getImageName();\n $path='images/products/'.$imageName;\n return $this->get('nzo_file_downloader')->downloadFile($path);\n\n # change the name of the file when downloading:\n\n //return $this->get('nzo_file_downloader')->downloadFile('myfolder/myfile.pdf', 'newName.pdf');\n }", "title": "" }, { "docid": "a856129c458a066cecf63755356e25ee", "score": "0.6163232", "text": "function download_project(){\n $this->_HTML = false;\n if(isset($this->_url_params['project_id'])) $project_id = $this->_url_params['project_id'];\n else exit();\n /**\n * @var \\ADACT\\App\\Models\\Project $project\n */\n $project = $this->set_model();;\n $logged_in = $project->login_check();\n if($logged_in){\n if((string) ((int) $project_id) == $project_id AND $project->verify($project_id)) {\n $file = $project->export($project_id, $project::EXPORT_ALL);\n if ($file != null) {\n header('Content-Type: ' . $file['mime']);\n header('Content-Disposition: attachment; filename=\"' . $file['name'] . '\"');\n readfile($file['path']);\n } else $this->redirect('projects');\n }else $this->redirect('projects');\n }else $this->redirect();\n }", "title": "" }, { "docid": "fe5b683ff4d9dff1e23dd6676da13647", "score": "0.61584044", "text": "function downloadfile($name){\n \n $this->load->helper('download');\n $filepath = \"./uploads/messages/\".$name;\n $data = file_get_contents($filepath);\n force_download($name, $data);\n \n }", "title": "" }, { "docid": "9b1d2b1a5e967fbcb6d6bb5834305c42", "score": "0.6144312", "text": "public function download()\n {\n if (!file_exists($this->file_path)) {\n abort(404, \"Documento no encotrado\");\n }\n\n $this->download_count++;\n $this->downloaded_at = Carbon::now();\n $this->save();\n if ($this->is_embedeable) {\n return response()->file($this->file_path, $this->headers());\n }\n\n return response()->download($this->file_path, $this->name, $this->headers());\n }", "title": "" }, { "docid": "7c1bb5a5ad2a3ab4fbb9f687812bbf62", "score": "0.6140801", "text": "public function download(string $format);", "title": "" }, { "docid": "7dfa178eebbaaebf9db9d079fde08e83", "score": "0.6134162", "text": "function preformDownload($loc, $auto, $indlid)\n {\n \n // No matter if its linix or windows were gonna use / not \\ and this is totaly because wget wast not happy with one of them.\n $loc = str_replace(\"\\\\\", \"/\", $loc); // Adds extra exit char to the pre existing exit char so that when its sent over there still remain in the string.\n\n // Check if the file exists in its path.\n if(file_exists($loc))\n {\n\n // CHANGE THIS TO YOUR HOST NAME!!!! THIS IS THE MAIN SITE DOMAIN WHERE WGET WILL LINK.\n $serverHoster = \"http://192.168.1.108/DownloadManager/\";\n\n if($auto == 2)\n {\n // REDIRECTS PAGE TO THE FILE\n header(\"Location: \" . $serverHoster . $loc, true, 301); \n } else if ($auto == 0 || $auto == 1){\n\n echo \"<script type='text/javascript'>titlepd(\\\"\" . $indlid . \"\\\");</script>\"; // Changes name of webpage to the file name.\n\n // This creates all the basic pramters for the file info.\n $fname = basename($loc);\n $fdatem = date (\"F d Y H:i:s.\", filemtime($loc));\n $fdatec = date (\"F d Y H:i:s.\", filectime($loc));\n $ftype = filetype($loc);\n $fsize = filesize($loc) . \" Bytes\";\n $dynlink = $serverHoster . \"?dlid=\" . $indlid . \"&auto=2\";\n\n echo \"<script type='text/javascript'>updateProp(\\\"\" . $fname . \"\\\",\\\"\" . $fdatec . \"\\\" , \\\"\" . $fdatem . \"\\\" , \\\"\" . $ftype . \"\\\",\\\"\" . $fsize . \"\\\");</script>\"; // Changes name of webpage to the file name.\n echo \"<script type='text/javascript'>updateinfo(\\\"\" . $loc . \"\\\", \\\"\" . $auto . \"\\\",\\\"\" . $dynlink . \"\\\");</script>\";\n\n } else {\n msg(\"red\", \"Your download auto option was invlaid: <br> - 0 = Start Download Manualy. <br> - 1 = Start Download Automaticly. <br> - 2 = DIRECT REDIRECT. (You should not be seeing this page)\");\n }\n }else \n {\n msg(\"red\", \"Failed To find file on server.\");\n } \n }", "title": "" }, { "docid": "a3bd04ef515e571a26bb17c5b7dd7a7d", "score": "0.61175305", "text": "public function actionDownload()\r\n {\r\n $path = $_SERVER['DOCUMENT_ROOT']; // change the path to fit your websites document structure\r\n $fullPath = $path . $_GET['download_file'];\r\n if ($fd = fopen($fullPath, \"r\")) {\r\n $fsize = filesize($fullPath);\r\n $path_parts = pathinfo($fullPath);\r\n $ext = strtolower($path_parts[\"extension\"]);\r\n switch ($ext) {\r\n case \"pdf\":\r\n header(\"Content-type: application/pdf\"); // add here more headers for diff. extensions\r\n header(\"Content-Disposition: attachment; filename=\\\"\" . $path_parts[\"basename\"] . \"\\\"\"); // use 'attachment' to force a download\r\n break;\r\n default;\r\n header(\"Content-type: application/octet-stream\");\r\n header(\"Content-Disposition: filename=\\\"\" . $path_parts[\"basename\"] . \"\\\"\");\r\n }\r\n header(\"Content-length: $fsize\");\r\n header(\"Cache-control: private\"); //use this to open files directly\r\n while (!feof($fd)) {\r\n $buffer = fread($fd, 2048);\r\n echo $buffer;\r\n }\r\n }\r\n fclose($fd);\r\n exit;\r\n }", "title": "" }, { "docid": "7d3c589772413c68ff805193613f05c9", "score": "0.61140347", "text": "function download($http,$name) {\n\tif(function_exists('curl_init'))\n\t\tcurl_download($http,$name);\n\telseif(ini_get('allow_url_fopen') == true)\n\t\tfopen_download($http,$name);\n\telse\n\t\treturn false; //inutilizzabile\n}", "title": "" }, { "docid": "2fa68223319eb82b02e6323e49494d7e", "score": "0.611336", "text": "public function downloadAction()\n {\n \ttry {\n\t // load the channel ID from the request\n\t $channelId = $this->_getRequest()->getParameter(\n\t \tTDProject_Channel_Controller_Util_WebRequestKeys::CHANNEL_ID,\n\t \tFILTER_VALIDATE_INT\n\t );\n\t // load the requested filename from the request\n\t $filename = $this->_getRequest()->getParameter(\n\t \tTDProject_Channel_Controller_Util_WebRequestKeys::FILENAME,\n\t \tFILTER_SANITIZE_STRING\n\t );\n\t \t// load the path to the binary release\n\t \t$downloadUrl = $this->_getDelegate()\n\t \t\t->getDownloadUrl(\n\t \t\t\tnew TechDivision_Lang_Integer((int) $channelId),\n\t \t\t\tnew TechDivision_Lang_String($filename)\n\t \t\t);\n\t // set the download URL for the release in the request\n\t \t$this->_getRequest()->setAttribute(\n\t \t\tTDProject_Channel_Controller_Util_WebRequestKeys::DOWNLOAD_URL,\n\t \t\t$downloadUrl\n\t \t);\n \t}\n \tcatch(Exception $e) {\n\t\t\t$this->_getLogger()->error($e->__toString(), __LINE__);\n\t\t}\n\t\t// go to the standard page\n\t\treturn $this->_findForward(\n\t\t TDProject_Channel_Controller_Channel_Api::DOWNLOAD\n\t\t);\n }", "title": "" }, { "docid": "6c5cb7f6f301f4ab12c9c0253b30a899", "score": "0.6112931", "text": "function downloadfileBuktiPrestasi($ID)\n {\n force_download('uploads/' . $ID, null);\n }", "title": "" }, { "docid": "fa19427ce09b757b70afda622c51b56b", "score": "0.6103257", "text": "public function download(){\n\t\t//SecureFileController is useful...\n\n\t\t$bServeFile = false;\n\t\t$bIsLoggedIn = false;\n\n\t\t$oMember = Member::currentUser();\n\t\tif(!$this->DocumentID) return $this->httpError(404); //no download on this page\n\t\t\n\t\t//check if there is a download \n\t\tif($this->Gated){\n\t\t\t$bRequiresTracking = true;\n\t\t}else{\n\t\t\t$bRequiresTracking = false;\n\t\t}\n\t\t\n\t\tif($oMember){ //check if the user is logged in (pURL user)\n\t\t\t$bIsLoggedIn = true;\n\t\t\t$bServeFile = true;\n\t\t}elseif(Cookie::get(\"guestid\")){ //check if the user has a cookie stored already\n\t\t\t$bServeFile = true;\n\t\t}elseif(!$bRequiresTracking){ //serve file up if no tracking required\n\t\t\t$bServeFile = true;\n\t\t}else{\t//requires tracking, but not logged in or completed form - still serve\n\t\t\t$bServeFile = true;\n\t\t}\n\n\t\tif($bServeFile){ //if all ok, serve up the file\n\t\t\t//$file = File::find($file_path);\n\t\t\tif($oMember){\n\t\t\t\treturn $this->serveFileAndRecord($oMember->ID, NULL, true);\n\t\t\t}elseif(Cookie::get(\"guestid\")){\n\t\t\t\treturn $this->serveFileAndRecord(NULL, Cookie::get(\"guestid\"), true);\n\t\t\t}elseif($bRequiresTracking) {\n\t\t\t\treturn $this->serveFileAndRecord(NULL, NULL, true);\n\t\t\t}elseif(!$bRequiresTracking) {\n\t\t\t\treturn $this->serveFileAndRecord(NULL, NULL, false);\n\t\t\t}\n\t\t}\n\t\t\n\t\techo \"Invalid request\";\t\n\t\t\n\t}", "title": "" }, { "docid": "955ff8535dff0e07362a593943de2726", "score": "0.6092602", "text": "public function download()\n {\n // send headers and read file\n header('Content-Description: File Transfer');\n header('Content-Type: application/octet-stream');\n header('Content-Disposition: attachment; filename=\"'.basename( $this->log_file ).'\"');\n header('Expires: 0');\n header('Cache-Control: must-revalidate');\n header('Pragma: public');\n header('Content-Length: ' . filesize( $this->log_file ) );\n echo file_get_contents( $this->log_file );\n exit;\n\t\t\n }", "title": "" }, { "docid": "6ab7ceb6bc927ee6b133fbaef4ef28c8", "score": "0.6086139", "text": "public function downloadHomework($id)\n {\n $file = DB::select('select * from homework where id = ?', [$id]);\n\n // $file = mysqli_fetch_assoc($result);\n $filepath = 'homeworks/teacher/gv' . $id . '/' . $file[0]->namefile;\n\n if (file_exists($filepath)) {\n header('Content-Description: File Transfer');\n header('Content-Type: application/octet-stream');\n header('Content-Disposition: attachment; filename=' . basename($filepath));\n header('Expires: 0');\n header('Cache-Control: must-revalidate');\n header('Pragma: public');\n header('Content-Length: ' . filesize($filepath));\n\n //This part of code prevents files from being corrupted after download\n ob_clean();\n flush();\n\n readfile($filepath);\n\n // Now update downloads count\n $newCount = $file[0]->download + 1;\n DB::table('homework')\n ->where('id', $id)\n ->update(['download' => $newCount]);\n // $updateQuery = \"UPDATE homework SET download=$newCount WHERE id=$id\";\n // mysqli_query($con, $updateQuery);\n // exit;\n }\n }", "title": "" }, { "docid": "f7dfcbfb408959e63382fe1061c25e06", "score": "0.6079189", "text": "public function downloadAction()\n {\n $model = $this->getModel();\n $model->applyRequest($this->getRequest());\n\n $fileData = $model->loadFirst();\n\n header('Content-Type: application/x-download');\n header('Content-Length: '.$fileData['size']);\n header('Content-Disposition: inline; filename=\"'.$fileData['filename'].'\"');\n header('Pragma: public');\n\n echo $fileData['content'];\n exit();\n }", "title": "" }, { "docid": "c375471688193f7162dd1a81bf8c06c9", "score": "0.6078984", "text": "public function download_proses()\n {\n //\n }", "title": "" }, { "docid": "ecc4dc434f4f1da2057a1fa230227850", "score": "0.60713893", "text": "public function download()\n {\n return $this->storage()->download($this->path, $this->name);\n }", "title": "" }, { "docid": "c36d1b8c2aed0ccdf48842e9067e88c6", "score": "0.6054958", "text": "public function downloadAction()\n {\n /* @var $documentDao \\DDD\\Dao\\Document\\Document */\n $documentDao = $this->getServiceLocator()->get('dao_document_document');\n $documentId = (int)$this->params()->fromRoute('id', 0);\n\n /**\n * @var \\DDD\\Domain\\Document\\Document $documentRow\n */\n $documentRow = $documentDao->fetchOne(\n ['id' => $documentId],\n ['attachment', 'created_date']\n );\n\n $filePath = DirectoryStructure::FS_UPLOADS_DOCUMENTS . date('Y/m/j/', strtotime($documentRow->getCreatedDate())) . $documentRow->getAttachment();\n\n /**\n * @var \\FileManager\\Service\\GenericDownloader $genericDownloader\n */\n $genericDownloader = $this->getServiceLocator()->get('fm_generic_downloader');\n\n $genericDownloader->downloadAttachment($filePath, basename($filePath));\n\n if ($genericDownloader->hasError()) {\n Helper::setFlashMessage(['error' => $genericDownloader->getErrorMessages(true)]);\n\n $url = $this->getRequest()->getHeader('Referer')->getUri();\n $this->redirect()->toUrl($url);\n }\n\n return true;\n }", "title": "" }, { "docid": "134eef77092d827f73070b9cfbacf738", "score": "0.60511553", "text": "public function downloadSample()\n {\n return response()->download(storage_path('exports/ImportUsers.xlsx'));\n }", "title": "" }, { "docid": "14a8d1769bae246c36d68844d8c5f1ee", "score": "0.60313135", "text": "public function downloadAction()\n {\n \n \tif(file_exists($filename)) {\n \tob_start();\n \t$size = readfile($filename);\n \t$this->view->data = ob_get_clean();\n }\n \n header('Expires: Mon, 20 May 1974 23:58:00 GMT');\n\t header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');\n\t header('Cache-Control: no-store, no-cache, must-revalidate');\n\t header('Cache-Control: post-check=0, pre-check=0', false);\n\t header('Cache-Control: private');\n header('Pragma: no-cache');\n header(\"Content-Transfer-Encoding: binary\");\n\t header(\"Content-type: binary/octet-stream\");\n\t header(\"Content-length: {$size}\");\n header(\"Content-disposition: attachment; filename=\\\"{$filename1}\\\"\");\n \n $this->_helper->layout()->disableLayout();\n $this->render('download');\n }", "title": "" }, { "docid": "f755c0aff1a4cffd01cbd5e7853d0ffa", "score": "0.60298276", "text": "function download_modx($modx_zip) {\n\tglobal $zip_url;\n\t$zip_url = DOWNLOAD_PAGE.$modx_zip;\n\t$local_file = $modx_zip; // TODO: different location?\n\tprint \"Downloading from $zip_url\".PHP_EOL;\n\tprintf( \"%c[2J\", ESC ); //clear screen\n\t\n\t$fp = fopen($local_file, 'w');\n\t$ch = curl_init();\n\tcurl_setopt($ch, CURLOPT_URL, $zip_url);\n\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);\n\tcurl_setopt($ch, CURLOPT_FILE, $fp);\n\tcurl_setopt($ch, CURLOPT_NOPROGRESS, false); // req'd to allow callback\n\tcurl_setopt($ch, CURLOPT_PROGRESSFUNCTION, 'progress_indicator');\n\tcurl_setopt($ch, CURLOPT_BUFFERSIZE, 128); // bigger = fewer callbacks\n\tif (curl_exec($ch) === false) {\n\t\tabort(\"There was a problem downloading the zip file: \" .curl_error($ch));\n\t}\n\telse {\n\t\tprint PHP_EOL;\n\t\tprint \"Zip file downloaded to $local_file\".PHP_EOL;\n\t}\n\tcurl_close($ch);\n\tfclose($fp);\t\n}", "title": "" }, { "docid": "d0a103cd36f046c8edcc2ae24d4ee48c", "score": "0.6022321", "text": "function the_event_calendar_importer_download( $url ) {\n\t$url_filename = basename( parse_url( $url, PHP_URL_PATH ) );\n\t$tmpfname = wp_tempnam( $url_filename );\n\t$dest_file = @fopen( $tmpfname, \"w\" );\n\n\t$resource = curl_init();\n\tcurl_setopt( $resource, CURLOPT_URL, $url );\n\tcurl_setopt( $resource, CURLOPT_FILE, $dest_file );\n\tcurl_setopt( $resource, CURLOPT_HEADER, 0 );\n\tcurl_setopt( $resource, CURLOPT_USERPWD, \"login:password\" );\n\tcurl_setopt( $resource, CURLOPT_TIMEOUT, 30 );\n\tcurl_exec( $resource );\n\n\t$headers = curl_getinfo( $resource );\n\n\tif ( isset( $headers['http_code'] ) && $headers['http_code'] == 404 ) {\n\t\treturn new WP_Error( '404', 'File not found' );\n\t}\n\tif ( curl_exec( $resource ) === FALSE ) {\n\t\treturn new WP_Error( 'Err', curl_error( $resource ) );\n\t}\n\n\tcurl_close( $resource );\n\tfclose( $dest_file );\n\n\treturn $tmpfname;\n}", "title": "" }, { "docid": "71cda480028d54aa07c52780912c126c", "score": "0.6017473", "text": "function downloadfileDokumentasi($ID)\n {\n force_download('uploads_BuktiDokumentasi/' . $ID, null);\n }", "title": "" }, { "docid": "40ff5708bef755bdbf640de855db63c3", "score": "0.6010697", "text": "function download_file( $filename = '' )\n\t{\n\t\t//assert the file is valid\n\t\tif( !is_file( $filename ) )\n\t\t\tthrow new Exception( 'Downloader: Could not find file \\''.$filename.'\\'' );\n\t\t\n\t\t//make sure it's read-able\n\t\tif( !is_readable( $filename ) )\t\n\t\t\tthrow new Exception( 'Downloader: File was unreadable \\''.$filename.'\\'' );\t\n\t\n\t\t//set script execution time to 0 so the script\n\t\t//won't time out.\n\t\tset_time_limit(0);\n\t\n\t\t//get the size of the file\n\t\t$this->file_size = filesize( $filename );\n\t\t\n\t\t//set up the main headers\n\t\t//find out the number of bytes to write in this iteration\n\t\t$block_size = $this->prepare_headers( $this->file_size );\n\t\t\n\t\t/* output the file itself */\n\t\t$chunksize = 1*(1024*1024);\n\t\t$bytes_send = 0;\n\t\t\n\t\tif ($file = fopen($filename, 'r'))\n\t\t{\n\t\t\tif( isset( $_SERVER['HTTP_RANGE'] ) && !$this->force_single )\n\t\t\t\tfseek( $file, $this->mt_range );\n\t\t\t\n\t\t\t//write the data out to the browser\n\t\t\twhile( !feof( $file ) && !connection_aborted() && $bytes_send < $block_size )\n\t\t\t{\n\t\t\t\t$buffer = fread( $file, $chunksize );\n\t\t\t\techo $buffer;\n\t\t\t\tflush();\n\t\t\t\t$bytes_send += strlen( $buffer );\n\t\t\t}\n\t\t\t\n\t\t\tfclose($file);\n\t\t} \n\t\telse \n\t\t{\n\t\t\tthrow new Exception( 'Downloader: Could not open file \\''.$filename.'\\'' );\n\t\t}\n\t\t\n\t\t//terminate script upon completion\n\t\tdie();\n\t}", "title": "" }, { "docid": "d540e8d1ffccc2e46c4f78feee86ac1d", "score": "0.6010286", "text": "public static function download($filename) {\n\t\t$dossier = \"repDownload\";\n\t\t$filepath = $dossier . \"/\" . $filename;\n\t\t$filesize = filesize ( $filepath );\n\t\t$filemd5 = md5_file ( $filepath );\n\t\t\n\t\t// Gestion du cache\n\t\theader ( 'Pragma: public' );\n\t\theader ( 'Last-Modified: ' . gmdate ( 'D, d M Y H:i:s' ) . ' GMT' );\n\t\theader ( 'Cache-Control: must-revalidate, pre-check=0, post-check=0, max-age=0' );\n\t\t// Informations sur le contenu à envoyer\n\t\t// header('Content-Tranfer-Encoding: ' . $type . \"\\n\");\n\t\theader ( 'Content-Length: ' . $filesize );\n\t\theader ( 'Content-MD5: ' . base64_encode ( $filemd5 ) );\n\t\theader ( 'Content-Type: application/force-download; name=\"' . $filename . '\"' );\n\t\theader ( 'Content-Disposition: attachement; filename=\"' . $filename . '\"' );\n\t\t// Informations sur la réponse HTTP elle-même\n\t\theader ( 'Date: ' . gmdate ( 'D, d M Y H:i:s', time () ) . ' GMT' );\n\t\theader ( 'Expires: ' . gmdate ( 'D, d M Y H:i:s', time () + 1 ) . ' GMT' );\n\t\theader ( 'Last-Modified: ' . gmdate ( 'D, d M Y H:i:s', time () ) . ' GMT' );\n\t\treadfile ( $filepath );\n\t\texit ();\n\t}", "title": "" }, { "docid": "9fab3794439b7cdb08154208112bac47", "score": "0.5995266", "text": "public static function downloadFile(\\Illuminate\\Http\\Request $request) {\n\n $updaterFolder = Storage::disk('local')->getDriver()->getAdapter()->getPathPrefix() . self::$_UPDATER_STORAGE;\n\n if (!Storage::disk('local')->makeDirectory(self::$_UPDATER_STORAGE)) {\n return ['error' => 'Folder \"' . $updaterFolder . '/' . '\" can not be created.'];\n }\n\n $client = new \\GuzzleHttp\\Client();\n\n try {\n $time = time();\n $filenameTmp = $time . '.tmp';\n $resource = fopen($updaterFolder . '/' . $filenameTmp, 'w');\n $stream = \\GuzzleHttp\\Psr7\\stream_for($resource);\n $res = $client->request('POST', 'http://modules.atlantis-cms.com/api/download-file', [\n 'form_params' => [\n 'version' => $request->get('version'),\n 'path' => $request->get('path'),\n 'namespace' => $request->get('namespace')\n ],\n 'sink' => $stream\n ]);\n //dd($res->getBody()->getContents());\n $filesizeTmp = Storage::disk('local')->size(self::$_UPDATER_STORAGE . '/' . $filenameTmp);\n\n if ($res->getStatusCode() == 200 && isset($res->getHeader('Filename')[0]) && isset($res->getHeader('Filesize')[0]) && $res->getHeader('Filesize')[0] == $filesizeTmp) {\n\n $filename = $time . '-' . $res->getHeader('Filename')[0];\n\n if (!Storage::disk('local')->move(self::$_UPDATER_STORAGE . '/' . $filenameTmp, self::$_UPDATER_STORAGE . '/' . $filename)) {\n\n Storage::disk('local')->delete(self::$_UPDATER_STORAGE . '/' . $filenameTmp);\n return ['error' => 'Download failed'];\n }\n\n return [\n 'success' =>\n [\n 'filename' => $filename\n ]\n ];\n } else {\n\n Storage::disk('local')->delete(self::$_UPDATER_STORAGE . '/' . $filenameTmp);\n return ['error' => 'Download failed'];\n }\n } catch (\\Exception $e) {\n\n Storage::disk('local')->delete(self::$_UPDATER_STORAGE . '/' . $filenameTmp);\n return ['error' => 'Download failed'];\n }\n }", "title": "" }, { "docid": "dc22176e15b23103bb0e989e76904b8b", "score": "0.5992013", "text": "public function download()\n\t{\n\t\t$user = Auth::user();\n\t\t$jawaban = Jawaban::where('id_user', $user->id)->firstOrFail();\n\t\treturn Storage::disk('jawaban')->download($jawaban->nama_file, 'Kelompok ' . $user->nomor . ' - BOJ 2021.zip');\n\t}", "title": "" }, { "docid": "323d4e283717e4bf3cdd9a74b238d616", "score": "0.5990493", "text": "function downloadFile($args, &$request) {\n\t\t$articleId = (int) array_shift($args);\n\t\t$fileId = (int) array_shift($args);\n\t\t$revision = array_shift($args); // Can be null\n\n\t\t$this->validate($request, $articleId);\n\t\tif (!CopyeditorAction::downloadCopyeditorFile($this->submission, $fileId, $revision)) {\n\t\t\t$request->redirect(null, null, 'submission', $articleId);\n\t\t}\n\t}", "title": "" }, { "docid": "9398317910fdefd0f430b9af352263f6", "score": "0.59852844", "text": "function doDownload( $file ) {\n\t\t$url = WPI_CACHE_PATH . '/' . basename( $file );\n\t\tob_start();\n\t\tob_clean();\n\t\theader( \"Location: $url\" );\n\t\texit();\n\t}", "title": "" }, { "docid": "460aa51ed937a815697972229150c1f0", "score": "0.5984657", "text": "public function process_package_download() {\n\t\t\n\t\tif ( isset( $_GET['key'] ) && isset( $_GET['id'] ) && isset( $_GET['license'] ) && isset( $_GET['expires'] ) ) {\n\n\t\t\t$id = absint( urldecode( $_GET['id'] ) );\n\t\t\t$hash = urldecode( $_GET['key'] );\n\t\t\t$license = sanitize_text_field( urldecode( $_GET['license'] ) );\n\t\t\t$expires = is_numeric( $_GET['expires'] ) ? $_GET['expires'] : urldecode( base64_decode( $_GET['expires'] ) );\n\n\t\t\t$requested_file = $this->get_download_package( $id, $license, $hash, $expires );\n\t\t\t\n\t\t\t$file_key = get_post_meta( $id, '_wpec_lic_upgrade_file', true );\n\t\t\t$file = get_post( $file_key );\n\t\t\t$file_url = WPSC_FILE_URL . $file->post_title;\n\t\t\t$file_path = WPSC_FILE_DIR . $file->post_title;\n\t\t\t\n\t\t\tif ( is_file( $file_path ) ) {\n\t\t\n\t\t\t\tif( !ini_get('safe_mode') ) set_time_limit(0);\n\t\t\t\theader( 'Content-Type: ' . $file->post_mime_type );\n\t\t\t\theader( 'Content-Length: ' . filesize( $file_path ) );\n\t\t\t\theader( 'Content-Transfer-Encoding: binary' );\n\t\t\t\theader( 'Content-Disposition: attachment; filename=\"' . stripslashes( $file->post_title ) . '\"' );\n\t\t\t\tif ( isset( $_SERVER[\"HTTPS\"] ) && ($_SERVER[\"HTTPS\"] != '') ) {\n\t\t\t\t\t/*\n\t\t\t\t\t There is a bug in how IE handles downloads from servers using HTTPS, this is part of the fix, you may also need:\n\t\t\t\t\t session_cache_limiter('public');\n\t\t\t\t\t session_cache_expire(30);\n\t\t\t\t\t At the start of your index.php file or before the session is started\n\t\t\t\t\t */\n\t\t\t\t\theader( \"Pragma: public\" );\n\t\t\t\t\theader( \"Expires: 0\" );\n\t\t\t\t\theader( \"Cache-Control: must-revalidate, post-check=0, pre-check=0\" );\n\t\t\t\t\theader( \"Cache-Control: public\" );\n\t\t\t\t} else {\n\t\t\t\t\theader( 'Cache-Control: must-revalidate, post-check=0, pre-check=0' );\n\t\t\t\t}\n\t\t\t\theader( \"Pragma: public\" );\n\t\t\t\theader( \"Expires: 0\" );\n\t\t\t\t// destroy the session to allow the file to be downloaded on some buggy browsers and webservers\n\t\t\t\tsession_destroy();\n\t\t\t\twpsc_readfile_chunked( $file_path );\n\t\t\t\texit();\n\t\t\t}else{\n\t\t\t\twp_die(__('Sorry, something has gone wrong with your download!', 'wp-e-commerce'));\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\twp_die( __( 'You do not have permission to download this file', 'wpec-licensing' ), __( 'Error', 'wpec-licensing' ), array( 'response' => 401 ) );\n\t\t}\n\t\texit;\n\t}", "title": "" }, { "docid": "bf64fddbef0b38a15555f3b461a13bee", "score": "0.5981725", "text": "public function downloadRemote()\n\t{\n\t\t\\IPS\\Dispatcher::i()->checkAcpPermission( 'monitoring_settings' );\n\t\t\\IPS\\Output::i()->sendOutput( file_get_contents( \\IPS\\ROOT_PATH . '/applications/nexus/data/monitoring/remote.txt' ), 200, 'text/plain', array( 'Content-Disposition' => 'attachment; filename=monitor_remote.php' ) );\n\t}", "title": "" }, { "docid": "1db2291d2ebd650966854b35e7f13ba0", "score": "0.5969494", "text": "public function download($path, $file, $callback, $offset = null) {}", "title": "" }, { "docid": "dcf6917f663c01501f978971638d88cd", "score": "0.59677774", "text": "public function download($id) {\n\t\t$fileManager = $this->getManagerof('File');\n\n\t\tif($id == null) {\n\t\t\tHTTPResponse::send('{\"succeed\":false,\"toast\":\"Bad id.\"}');\n\t\t}\n\n\t\telse if(!$fileManager->existById($id)) {\n\t\t\tHTTPResponse::send('{\"succeed\":false,\"toast\":\"Bad id.\"}');\n\t\t}\n\n\t\telse {\n\t\t\t$root_upload = __DIR__.$this->_app->_config->get('root_upload');\n\n\t\t\t$file = $fileManager->getById($id);\n\n\t\t\tif($file == null) {\n\t\t\t\tHTTPResponse::send('{\"succeed\":false,\"toast\":\"Bad id.\"}');\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\t$file_name = $root_upload . $file->getUrl();\n\n\t\t\t\tif(is_file($file_name)) {\n\n\t\t\t\t\t$fileDownloadManager = $this->getManagerof('FileDownload');\n\t\t\t\t\t\n\t\t\t\t\t$fileDownload = new FileDownload(array(\n\t\t\t\t\t\t'id'=> 0,\n\t\t\t\t\t\t'title' => $file->getName(),\n\t\t\t\t\t\t'public' => 0,\n\t\t\t\t\t\t'visibility' => 1,\n\t\t\t\t\t\t'date_creation' => date('Y-m-d H:i:s'),\n\t\t\t\t\t\t'id_user' => $this->_app->_config->getId_user(),\n\t\t\t\t\t\t'id_file' => $file->getId(),\n\t\t\t\t\t\t'size' => $file->getSize(),\n\t\t\t\t\t\t'content' => $file->getContent(),\n\t\t\t\t\t\t'type' => $file->getType()\n\t\t\t\t\t));\n\t\t\t\t\t$fileDownloadManager->add($fileDownload);\n\n\t\t\t\t\t// required for IE\n\t\t\t\t\t//if(ini_get('zlib.output_compression')) { ini_set('zlib.output_compression', 'Off');\t}\n\n\t\t\t\t\t// get the file mime type using the file extension\n\t\t\t\t\tswitch(strtolower(substr(strrchr($file_name, '.'), 1))) {\n\t\t\t\t\t\tcase 'pdf': \t$mime = 'application/pdf'; \t\tbreak;\n\t\t\t\t\t\tcase 'zip': \t$mime = 'application/zip'; \t\tbreak;\n\t\t\t\t\t\tcase 'jpeg':\t$mime = 'image/jpg'; \t\t\tbreak;\n\t\t\t\t\t\tcase 'jpg': \t$mime = 'image/jpg'; \t\t\tbreak;\n\t\t\t\t\t\tcase 'png': \t$mime = 'image/png'; \t\t\tbreak;\n\t\t\t\t\t\tcase 'gif': \t$mime = 'image/gif'; \t\t\tbreak;\n\t\t\t\t\t\tcase 'html': \t$mime = 'image/html'; \t\t\tbreak;\n\t\t\t\t\t\tcase 'doc': \t$mime = 'image/msword'; \t\tbreak;\n\t\t\t\t\t\tcase 'mp3': \t$mime = 'audio/mpeg';\t \t\tbreak;\n\t\t\t\t\t\tcase 'apk': \t$mime = 'application/vnd.android.package-archive'; break;\n\t\t\t\t\t\tdefault: \t\t$mime = 'application/force-download';\n\t\t\t\t\t}\n\t\t\t\t\theader('Pragma: public'); \t// required\n\t\t\t\t\theader('Expires: 0');\t\t// no cache\n\t\t\t\t\theader('Cache-Control: must-revalidate, post-check=0, pre-check=0');\n\t\t\t\t\theader('Last-Modified: '.gmdate ('D, d M Y H:i:s', filemtime ($file_name)).' GMT');\n\t\t\t\t\theader('Cache-Control: private',false);\n\t\t\t\t\theader('Content-Type: '.$mime);\n\t\t\t\t\theader('Content-Disposition: attachment; filename=\"'.basename($file_name).'\"');\n\t\t\t\t\theader('Content-Transfer-Encoding: binary');\n\t\t\t\t\theader('Content-Length: '.filesize($file_name));\t// provide file size\n\t\t\t\t\theader('Connection: close');\n\n\t\t\t\t\t//readfile($file_name);\t\t// push it out\n\t\t\t\t\t// set the download rate limit (=> 6000 kb/s)\n\t\t\t\t\t$download_rate = 60000;\n\t\t\t\t\tflush();\n\t\t\t\t $file = fopen($file_name, \"r\");\n\t\t\t\t while(!feof($file))\n\t\t\t\t {\n\t\t\t\t // send the current file part to the browser\n\t\t\t\t print fread($file, round($download_rate * 1024));\n\t\t\t\t // flush the content to the browser\n\t\t\t\t flush();\n\t\t\t\t // sleep one second\n\t\t\t\t //sleep(1);\n\t\t\t\t }\n\t\t\t\t fclose($file);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tHTTPResponse::send('{\"succeed\":false,\"result\":\"Physic : Bad File url.\"}');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "41119fd7d8c48b5eb5ae5126fc3c553c", "score": "0.5962714", "text": "public function testDownloadableFile() {\n\n\t\t// Set up a Scrivo context.\n\t\t$cfg = new \\Scrivo\\Config(new \\Scrivo\\Str(\"test_config\"));\n\t\t$context = new \\Scrivo\\Context($cfg, Scrivo\\User::PRIMARY_ADMIN_ID);\n\n\t\t// Create a file to download/output.\n\t\t$file = tempnam(sys_get_temp_dir(), \"PHPUnit_Scrivo_DownloadableTest\");\n\t\tfile_put_contents($file, \"Muchos datos\");\n\n\t\t// The output filename.\n\t\t$filename = new \\Scrivo\\Str(\"afile2.dat\");\n\n\t\t// Create a downloadble based on a physical file.\n\t\t$dwnl = new \\Scrivo\\Downloadable($context, $filename,\n\t\t\t\\Scrivo\\Downloadable::TYPE_FILE, new \\Scrivo\\Str($file));\n\n\t\t$this->assertTrue($dwnl->getFileName()->contains($filename));\n\t\t$this->assertFalse($dwnl->getFileName()->equals($filename));\n\n\t\t// Test output.\n\t\t$this->expectOutputString(\"Muchos datos\");\n\t\t$dwnl->outputData();\n\n\t\t// The file should be erased after downloading.\n\t\tif (file_exists($file)) {\n\t\t\t$this->fail(\"File not removed after reading/downloading\");\n\t\t}\n\t}", "title": "" }, { "docid": "ed222e2cf06052c5ba9bdfd227df552d", "score": "0.5961106", "text": "function start() {\n $this->setState(LdwpJob::STATE_RUNNING,0,1,\"Downloading \".$this->url);\n using('lepton.net.httprequest');\n $dl = new HttpRequest($this->url,array(\n 'saveto' => $this->destination,\n 'onprogress' => new Callback($this,'onDownloadProgress')\n ));\n $this->setState(LdwpJob::STATE_COMPLETED,1,1,\"Saved \".$this->url);\n }", "title": "" }, { "docid": "28facce32e635172704c60a1b2a76511", "score": "0.59576327", "text": "function check_download() {\n\t\tif(preg_match(\"/download\\/([0-9]+)\\/.*/\",$this->getIndpEnv(\"TYPO3_SITE_SCRIPT\"),$found)) {\n\t\t\tif($_SERVER[\"REQUEST_METHOD\"] == \"GET\") {\n\t\t\t\t$_GET['download'] = $found[1];\n\t\t\t}\n\t\t}\n\n\t\tif (isset ($_GET['download']) and $_GET['download'] != \"\") {\n\t\t\t$this->CLASS['hooks']->setHook(\"kr_header\",\"check_download\",\"start\");\n\n\t\t\t$rs = $this->CLASS['db']->query(sprintf(\"select f.*, c.belongs_to as cid, f.counter as counter from files f, content c where f.belongs_to = c.id AND f.deleted=0 AND f.id =%d\",$_GET['download']));\n\t\t\t$anz = $this->CLASS['db']->num_rows($rs);\n\n\t\t\tif($anz != 1) {\n\t\t\t\t$this->CLASS['error']->log($this->CLASS['translate']->_(\"WRONG DOWNLOADFILE!\"));\n\t\t\t\texit();\n\t\t\t}\n\n\t\t\t$row = $this->CLASS['db']->fetch_assoc($rs);\n\n\t\t\tif($this->CLASS['knowledgeroot']->checkRecursivPerm($row['cid'], $_SESSION['userid']) == 0) {\n\t\t\t\t$this->CLASS['error']->log($this->CLASS['translate']->_(\"No File for you!\"));\n\t\t\t\texit();\n\t\t\t}\n\n\t\t\t$row['counter']++;\n\t\t\t$res = $this->CLASS['db']->query(sprintf(\"UPDATE files SET counter=%d WHERE id=%d\", $row['counter'], $_GET['download']));\n\n\t\t\t$filename = $row['filename'];\n\n\t\t\theader(\"Content-Type: \" . $row['filetype'] . \"; name=\\\"$filename\\\"\");\n\t\t\theader(\"Content-Disposition: attachment; filename=\\\"$filename\\\";\");\n\t\t\theader(\"Pragma: private\");\n\t\t\theader(\"Expires: 0\");\n\t\t\theader(\"Cache-Control: private, must-revalidate, post-check=0, pre-check=0\");\n\t\t\theader(\"Content-Transfer-Encoding: binary\");\n\n\t\t\tif($this->CLASS['db']->dbtype == \"pgsql\") {\n\t\t\t\t$this->CLASS['db']->query (\"begin\");\n\t\t\t\t$loid = $this->CLASS['db']->lo_open($row['object'], \"r\");\n\t\t\t\t$this->CLASS['db']->lo_read_all ($loid);\n\t\t\t\t$this->CLASS['db']->lo_close ($loid);\n\t\t\t\t$this->CLASS['db']->query (\"commit\");\n\t\t\t\t$this->CLASS['db']->close();\n\t\t\t}\n\n\t\t\tif($this->CLASS['db']->dbtype == \"mysql\" || $this->CLASS['db']->dbtype == \"mysqli\") {\n\t\t\t\t// check for new upload method that uses base64\n\t\t\t\tif(substr($row['file'],0,7) == 'base64:') {\n\t\t\t\t\techo base64_decode(substr($row['file'],7));\n\t\t\t\t} else {\n\t\t\t\t\techo unserialize($row['file']);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif($this->CLASS['db']->dbtype == \"sqlite\" || $this->CLASS['db']->dbtype == \"sqlite3\") {\n\t\t\t\techo base64_decode($row['file']);\n\t\t\t}\n\n\t\t\t$this->CLASS['hooks']->setHook(\"kr_header\",\"check_download\",\"end\");\n\n\t\t\texit();\n\t\t}\n\t}", "title": "" }, { "docid": "ff98b7cf7bdf3b6125ca0512e0e4756c", "score": "0.5944246", "text": "public function download($id){\n $course = Cours::find($id);\n return Storage::download($course->document_path);\n }", "title": "" }, { "docid": "63460d0cf4b8adcb380940e8e0f26c26", "score": "0.59438485", "text": "protected function getHttpFile($supplier) {\r\n \t$contents = null;\r\n \t\r\n \t// Make sure uri exists\r\n \tif(!$supplier->uri) {\r\n \t\t$this->finishAndMark($supplier);\r\n \t\treturn false;\t\r\n \t}\r\n \t\r\n \t// INIT CURL\r\n\t\t$ch = curl_init();\r\n\t\t\r\n\t\t# Setting CURLOPT_RETURNTRANSFER variable to 1 will force cURL\r\n\t\t# not to print out the results of its query.\r\n\t\t# Instead, it will return the results as a string return value\r\n\t\t# from curl_exec() instead of the usual true/false.\r\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n\t\t\r\n \tcurl_setopt($ch, CURLOPT_TIMEOUT, 30);\r\n \tcurl_setopt($ch, CURLOPT_MAXREDIRS, self::MAX_ATTEMPTS);\r\n\t curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);\r\n\t\t\r\n \t// Do we have username and pass?\r\n \tif($supplier->username && $supplier->password) {\r\n \t\t// Login to the site and grab the data\r\n \t\tcurl_setopt($ch, CURLOPT_URL, $supplier->uri);\r\n\t\t\tcurl_setopt($ch, CURLOPT_POST, 1);\r\n\t\t\t// IMITATE CLASSIC BROWSER'S BEHAVIOUR : HANDLE COOKIES\r\n\t\t\tcurl_setopt($ch, CURLOPT_COOKIEJAR, $supplier->id . '_cookie.txt');\r\n\t\t\t\r\n\t\t\t// EXECUTE 1st REQUEST (FORM LOGIN)\r\n\t\t\t$store = curl_exec($ch);\r\n \t}\r\n \t\r\n \t// Find file and save in temp dir\r\n\t\t$filepath = $this->getFilesPath() . '/' . $supplier->id . '_temp.' . strtolower($supplier->file_type);\r\n\t\t\r\n\t\t// Make sure we create the file first\r\n\t\tif(file_exists($filepath)) {\r\n\t\t\t// Delete it then create it\r\n\t\t\tunlink($filepath);\r\n\t\t\tfile_put_contents($filepath, '');\r\n\t\t} else {\r\n\t\t\t// Create it\r\n\t\t\tfile_put_contents($filepath, '');\r\n\t\t}\r\n\t\t\r\n\t\t$downloadfile = trim($supplier->uri);\r\n\t\t\r\n\t\t// Make sure remote file exists\r\n\t\tif(!$this->httpFileExists($downloadfile)) {\r\n\t\t\t$this->errorMessage('Remote file does not exists.');\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t// Check time first\r\n\t\tif(file_exists($this->getLatestFullPath($supplier))) {\r\n\t\t\t// We have the latest\r\n\t\t\t$current_time = filemtime($this->getLatestFullPath($supplier));\r\n\t\t\t$remote_info = $this->getHTTPInfo($downloadfile);\r\n\t\t\tif(isset($remote_info['filetime']) && $remote_info['filetime']) {\r\n\t\t\t\t$remote_time = $remote_info['filetime'];\r\n\t\t\t\t// Stop if the remote time is not newer then the current time\r\n\t\t\t\tif($remote_time && $remote_time <= $current_time) {\r\n\t\t\t\t\t$this->echoMessage('File present but is not newer then the current one. Aborting.');\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Logged in attempting to download\r\n\t\t$this->echoMessage(sprintf(\"Logged in! Attempting to download: '%s'\", $downloadfile));\r\n\t\t\r\n\t\t// SET FILE TO DOWNLOAD\r\n\t\tcurl_setopt($ch, CURLOPT_URL, $supplier->uri);\r\n\t\t\r\n\t\t// EXECUTE 2nd REQUEST (FILE DOWNLOAD)\r\n\t\t$contents = curl_exec($ch);\r\n\t\t\r\n\t\tif(!$contents) {\r\n\t\t\t$this->echoMessage('Content came up empty.');\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t$this->echoMessage('File downloaded');\r\n\t\t\r\n \t// CLOSE CURL\r\n\t\tcurl_close ($ch); \r\n \t\r\n \treturn $contents;\r\n }", "title": "" }, { "docid": "5b9db1f820328dc92c894e6f7bb6e531", "score": "0.5941171", "text": "public function download($id){\n $isAdmin= Auth::user()->hasRole('Admin');\n try{\n $file = File::select()->where('id',$id)->get()[0];\n if ($isAdmin || $file['user_id'] == Auth::id()) {\n return Storage::download($file['route']); \n }\n Alert::error('Error', 'No tiene permisos para descargar este archivo');\n return back();\n } catch(Exception $e) {\n Alert::error('Error', 'ha ocurrido un error');\n return back();\n } \n }", "title": "" }, { "docid": "af393df5d5a66675655b15d1344d6848", "score": "0.5937191", "text": "private function download ($_url) {\n $curl = curl_init();\n\n \tcurl_setopt ($curl, CURLOPT_URL, $_url);\n\t curl_setopt ($curl, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt ($curl, CURLOPT_FOLLOWLOCATION, true); \n\t curl_setopt ($curl, CURLOPT_CONNECTTIMEOUT, 5);\n\t\n $data = curl_exec($curl);\n $code = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n\n if ($code !== 200) {\n $data = null;\n }\n\n \tcurl_close($curl);\n\n \treturn $data;\n }", "title": "" }, { "docid": "b869bd554a9f62a598a182f4dd5b1d84", "score": "0.5935997", "text": "public function actionDownloadFile($afid) {\n\t\t// check if resource id corresponds to course id\n\t\t$file = AssignmentModel::getAnwserFile($afid);\n\t\tif ($file['Course_id'] != $this->cid)\n\t\t\tthrow new BadRequestException;\n\t\t$ext = pathinfo($file->filename, PATHINFO_EXTENSION);\n\t\t$name = $file->firstname . $file->lastname . '_' . $file->label . '.' . $ext;\n\t\t$this->sendResponse(new DownloadResponse(WWW_DIR . '/../uploads/' . $file->filename, $name));\n\t}", "title": "" }, { "docid": "8895b5f28b3aa4be0a61b4bcab2997ea", "score": "0.5935258", "text": "public function downloadrev($id) {\r\n $sql = \"SELECT * FROM revisisurat WHERE id_revisi=\" . $id;\r\n $datas = $this->model->select($sql);\r\n// var_dump($datas);\r\n foreach ($datas as $data) {\r\n\r\n header(\"Content-Disposition: attachment; filename=\" . $data['file']);\r\n\r\n $fp = fopen(\"arsip/temp/\" . $data['file'], 'r');\r\n $content = fread($fp, filesize('arsip/temp/' . $data['file']));\r\n fclose($fp);\r\n\r\n // menampilkan isi file yang akan didownload\r\n echo $content;\r\n }\r\n exit;\r\n }", "title": "" }, { "docid": "ef24476a7279351a2627071b2adc462c", "score": "0.59326965", "text": "function download_assignments($id)\n{\n\tglobal $tool_content, $workPath;\n\n\t$secret = work_secret($id);\n\t$filename = \"$GLOBALS[currentCourseID]_work_$id.zip\";\n\tchdir($workPath);\n\tcreate_zip_index(\"$secret/index.html\", $id);\n\t$zip = new PclZip($filename);\n\t$flag = $zip->create($secret, \"work_$id\", $secret);\n\theader(\"Content-Type: application/x-zip\");\n\theader(\"Content-Disposition: attachment; filename=$filename\");\n\treadfile($filename);\n\tunlink($filename);\n\texit();\n}", "title": "" }, { "docid": "ca504063c28907b69b6f5e00799914d5", "score": "0.59275264", "text": "public function set_download(){\n\t\tset_time_limit(0);\n \n // required for IE, otherwise Content-Disposition may be ignored\n if(ini_get('zlib.output_compression'))\n ini_set('zlib.output_compression', 'Off');\n \n header('Content-Type: ' . $this->download_hook['file_mime_type']);\n header('Content-Disposition: attachment; filename=\"'.$this->download_hook['file_name'].'\"');\n header(\"Content-Transfer-Encoding: binary\");\n header('Accept-Ranges: bytes');\n \n /* The three lines below basically make the \n download non-cacheable */\n header(\"Cache-control: private\");\n header('Pragma: private');\n header(\"Expires: Mon, 26 Jul 1997 05:00:00 GMT\");\n \n $this->set_resume();\n }", "title": "" }, { "docid": "6d1eb2597fa5cf213f5c3f6ccdae9148", "score": "0.592064", "text": "function bulkDownload($post,$status) {\n\n $assigndata=array('gmtime'=>$this->tiiGmtime(),\n 'encrypt'=>TII_ENCRYPT,\n 'aid'=>$this->accountid,\n 'diagnostic'=>0,\n 'fcmd'=>1,\n 'utp'=>$this->utp,\n 'fid'=>21,\n 'assignid'=>$post->assignid,\n 'assign'=>$post->assign,\n 'ctl'=>$post->ctl,\n 'cid'=>$post->cid,\n 'uid'=>$this->uid,\n 'uem'=>$this->uem,\n 'ufn'=>$this->ufn,\n 'uln'=>$this->uln\n );\n $assigndata['md5']=$this->doMD5($assigndata);\n $assigndata['session-id']=$this->tiisession;\n $assigndata['export_data']=$post->export_data;\n $assigndata['src']=TURNITIN_APISRC;\n\n $assigndata['apilang']=$this->getLang();\n $keys = array_keys($assigndata);\n $values = array_values($assigndata);\n $querystring='';\n for ($i=0;$i<count($values); $i++) {\n if ($i!=0) {\n $querystring .= '&';\n }\n $querystring .= $keys[$i].'='.urlencode($values[$i]);\n }\n return $this->apiurl.\"?\".$querystring;\n }", "title": "" }, { "docid": "10518591a819c716eec75d48788e6793", "score": "0.5913295", "text": "private function curlDownloadFile( string $url ) {\n\t\t$ch = curl_init();\n\t\tcurl_setopt( $ch, CURLOPT_URL, $url );\n\t\tcurl_setopt( $ch, CURLOPT_USERAGENT, $this->app_name );\n\t\tcurl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );\n\t\tcurl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1 );\n\t\t$output = curl_exec( $ch );\n\t\tcurl_close( $ch );\n\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "dbeac58aa409b0fed0d5aead8aa85892", "score": "0.58919746", "text": "public function downloadActivityTemplate2()\n {\n $pathToFile = app_path(\"Core/\" . session()->get('version') . \"/Files/Csv/iati_activity_template2.csv\");\n if (!File::exists($pathToFile)) {\n $pathToFile = app_path(\"Core/\" . config('app.default_version_name') . \"/Files/Csv/iati_activity_template2.csv\");\n }\n\n return Response::download($pathToFile);\n }", "title": "" }, { "docid": "b2e83ee5938d702bad879b3d1d2ed6fb", "score": "0.58902824", "text": "public function getOutputFileAction()\n {\n try {\n $fullFileName = base64_decode($this->getRequest()->get('path'));\n $fileName = base64_decode($this->getRequest()->get('filename'));\n if (is_readable($fullFileName)) {\n $content = file_get_contents($fullFileName);\n return $this->_prepareDownloadResponse($fileName, $content);\n }\n } catch (Exception $e) {\n $this->_getSession()->addError(Mage::helper('emvcore')->__('Error during get output file'));\n Mage::logException($e);\n }\n $this->_redirect('*/dataProcessing/');\n }", "title": "" }, { "docid": "b670df15a862975d6323ed6657585e4b", "score": "0.58898246", "text": "public function downloadActivityTemplate()\n {\n $pathToFile = app_path(\"Core/\" . session()->get('version') . \"/Files/Csv/iati_activity_template.csv\");\n if (!File::exists($pathToFile)) {\n $pathToFile = app_path(\"Core/\" . config('app.default_version_name') . \"/Files/Csv/iati_activity_template.csv\");\n }\n\n return Response::download($pathToFile);\n }", "title": "" }, { "docid": "a61513e08da2c68ea1394efa97d3ba02", "score": "0.58892703", "text": "public function getdownloadable($id){\n $get_file= FileUpload::where('id',$id)->first();\n return empty($get_file) ? redirect()->back() : \n response()->download( public_path('product-files/'.$get_file->file), $get_file->originalFileName) ;\n }", "title": "" }, { "docid": "6fd9c9c67d3bf8fec9a0693abf0951af", "score": "0.58878875", "text": "function download() {\n $down_img = $this->input->get('file');\n $file_name = 'needbiznow-seller.jpg';\n $file_path = $this->template->get_frontend_image($down_img, true);\n $mime = 'application/force-download';\n header('Pragma: public');\n header('Expires: 0');\n header('Cache-Control: must-revalidate, post-check=0, pre-check=0');\n header('Cache-Control: private', false);\n header('Content-Type: ' . $mime);\n header('Content-Disposition: attachment; filename=\"' . $file_name . '\"');\n header('Content-Transfer-Encoding: binary');\n header('Connection: close');\n readfile($file_path); // relative path to file \n exit();\n }", "title": "" }, { "docid": "f411e51028597cc60ad778f02b18c881", "score": "0.58709", "text": "public function download(Request $request, $event_id, $file_id)\n {\n $user = Auth::user();\n $event = App\\Event::findOrFail($event_id);\n $this->authorize('show', $event);\n $file = App\\EventFile::where('id', $file_id)\n ->where('event_id', $event->id)\n ->first();\n if(!isset($file)){\n Log::debug(\"File not found. id = \".$file_id.\" event=\".$event_id);\n return;\n }\n $pathToFile = Storage::disk('public')\n ->getDriver()->getAdapter()\n ->applyPathPrefix($file->filename);\n //dump($pathToFile);\n return response()->download($pathToFile, $file->original_filename);\n }", "title": "" }, { "docid": "ee7bc68ed5d129715f8b771b9f6c5b5d", "score": "0.5867284", "text": "function curl_download($file_url, $dst_path) {\n\t$result = false;\n\t// check if destination path is writable\n\t$dst_info = pathinfo($dst_path);\n\tif(!is_writable($dst_info['dirname'])) {\n\t\ttrigger_error(\"Destination directory is not writable: \".$dst_info['dirname'], E_USER_WARNING);\n\t\treturn false;\n\t}\n\t// remove file if already exists\n\tif (file_exists($dst_path) && is_file($dst_path)) {\n\t\tif (!unlink($dst_path)) {\n\t\t\ttrigger_error(\"Error existing destination file\", E_USER_WARNING);\n\t\t\treturn false;\n\t\t}\n\t}\n\t$ch_headers = curl_init($file_url);\n\tcurl_setopt( $ch_headers, CURLOPT_NOBODY, true );\n\tcurl_setopt( $ch_headers, CURLOPT_RETURNTRANSFER, false );\n\tcurl_setopt( $ch_headers, CURLOPT_HEADER, false );\n\tcurl_setopt( $ch_headers, CURLOPT_FOLLOWLOCATION, true );\n\tcurl_setopt( $ch_headers, CURLOPT_MAXREDIRS, 3 );\n\tcurl_setopt( $ch_headers, CURLOPT_SSL_VERIFYPEER, false );\n\tcurl_setopt( $ch_headers, CURLOPT_SSL_VERIFYHOST, false );\n\tcurl_exec( $ch_headers );\n\t$headers = curl_getinfo( $ch_headers );\t\n\tcurl_close( $ch_headers );\n\tif ($headers['http_code'] === 200) {\n\t\t// download file\n\t\t# open file to write\n\t\t$fp = fopen ($dst_path, 'w');\n\t\t# start curl\n\t\t$ch_file = curl_init();\n\t\tcurl_setopt( $ch_file, CURLOPT_URL, $file_url );\n\t\t# set return transfer to false\n\t\tcurl_setopt( $ch_file, CURLOPT_RETURNTRANSFER, false );\n\t\tcurl_setopt( $ch_file, CURLOPT_BINARYTRANSFER, true );\n\t\tcurl_setopt( $ch_file, CURLOPT_SSL_VERIFYPEER, false );\n\t\tcurl_setopt( $ch_file, CURLOPT_SSL_VERIFYHOST, false );\n\t\t# increase timeout to download big file\n\t\tcurl_setopt( $ch_file, CURLOPT_CONNECTTIMEOUT, 10 );\n\t\t# write data to local file\n\t\tcurl_setopt( $ch_file, CURLOPT_FILE, $fp );\n\t\t# execute curl\n\t\tcurl_exec( $ch_file );\n\t\t# close curl\n\t\tcurl_close( $ch_file );\n\t\t# close local file\n\t\tfclose( $fp );\n\n\t\tif (filesize($dst_path) > 0) $result = true;\n\t} else {\n\t\ttrigger_error(\"Error getting file. Status code \".$headers['http_code'], E_USER_WARNING);\n\t}\n\t\n\treturn $result;\n}", "title": "" }, { "docid": "77d205b1705e1a648ffd16502c5c5600", "score": "0.5865663", "text": "function download(string $filename, string $name = null)\n{\n return response()->download($filename, $name);\n}", "title": "" }, { "docid": "fbb2703c552e3ff6b64cebacf3473857", "score": "0.58570933", "text": "public function downloadFileAction(): void\n {\n try {\n $fileName = $this->Request()->getParam('fileName');\n\n if ($fileName === null) {\n throw new \\InvalidArgumentException('File name must be provided');\n }\n\n $filePath = $this->uploadPathProvider->getRealPath($fileName);\n\n $extension = $this->uploadPathProvider->getFileExtension($fileName);\n switch ($extension) {\n case 'csv':\n $application = 'text/csv';\n break;\n case 'xml':\n $application = 'application/xml';\n break;\n default:\n throw new \\UnexpectedValueException('File extension is not valid');\n }\n\n if (\\file_exists($filePath)) {\n $this->View()->assign(\n [\n 'success' => false,\n 'data' => $this->Request()->getParams(),\n 'message' => 'File not exist',\n ]\n );\n }\n\n $this->Front()->Plugins()->ViewRenderer()->setNoRender();\n $this->Front()->Plugins()->Json()->setRenderer(false);\n\n $response = $this->Response();\n $response->clearHeaders();\n $response->headers->replace();\n\n $response->setHeader('Cache-Control', 'public');\n $response->setHeader('Content-Description', 'File Transfer');\n $response->setHeader('Content-disposition', 'attachment; filename=' . $fileName);\n $response->setHeader('Content-Type', $application);\n $response->sendHeaders();\n\n \\readfile($filePath);\n exit;\n } catch (\\Exception $e) {\n $this->View()->assign(\n [\n 'success' => false,\n 'data' => $this->Request()->getParams(),\n 'message' => $e->getMessage(),\n ]\n );\n\n return;\n }\n }", "title": "" }, { "docid": "5833f722e8e0c7c94f09b06cc7955ca4", "score": "0.58559567", "text": "function get_file(){\n extract($this->get_params());\n /**\n * @var string $file_name\n * @var int $project_id\n */\n $this->load_view(false);\n if(!isset($file_name, $project_id)) goto redirect;\n /** @var \\ADACT\\App\\Models\\Project $project */\n $project = $this->set_model();\n $logged_in = $project->login_check();\n if($logged_in AND $project->verify($project_id)){\n $file_type = null;\n switch($file_name){\n case FileManager::SPECIES_RELATION: $file_type = $project::EXPORT_SPECIES_RELATION; break;\n case FileManager::DISTANCE_MATRIX : $file_type = $project::EXPORT_DISTANCE_MATRIX; break;\n case FileManager::NEIGHBOUR_TREE : $file_type = $project::EXPORT_NEIGHBOUR_TREE; break;\n case FileManager::UPGMA_TREE : $file_type = $project::EXPORT_UPGMA_TREE;\n }\n if($file_type == null) goto redirect;\n $file = $project->export($project_id, $file_type);\n if($file == null){\n redirect:\n $this->redirect('projects');\n exit();\n }\n header('Content-Type: ' . $file['mime']);\n header('Content-Disposition: attachment; filename=\"' . $file['name'] . '\"');\n readfile($file['path']);\n exit();\n }\n goto redirect;\n }", "title": "" }, { "docid": "1d9d201108025e454e5191495b55afd5", "score": "0.5853839", "text": "public function testFileDownloadViaHttp() {\n $request = Request::create('/encrypt/files/encryption_profile_1/example.txt');\n /** @var \\Symfony\\Component\\HttpKernel\\HttpKernelInterface $http_kernel */\n $http_kernel = $this->container->get('http_kernel');\n\n $response = $http_kernel->handle($request);\n $this->assertEquals(200, $response->getStatusCode());\n\n\n ob_start();\n $response->send();\n $out = ob_get_contents();\n ob_end_clean();\n // @fixme This doesn't yet catch the actual response.\n }", "title": "" }, { "docid": "e71ad4a0b40de9a596006ef6159f6a91", "score": "0.5851405", "text": "public function lakukan_download(){\t\t\t\t\n\t\tforce_download('gambar/calendar-512.png',NULL);\n\t}", "title": "" }, { "docid": "6e14e46734ecb3bce47df48dac82ffce", "score": "0.5850068", "text": "public function downloadfile($id=null){\n $this->loadModel('CampaignResources');\n if($id!=null){\n $campaignResource = $this->CampaignResources->get($id);\n\t\t$this->request->allowMethod('post');\n $this->Filemanagement->download('campaignresources/'.$campaignResource->filepath,$campaignResource->title);\n return $this->redirect($this->referer());\n }\n return false;\n }", "title": "" }, { "docid": "891cd9c6fecddd9f7fe2b5ad8acf0b4c", "score": "0.58485836", "text": "function sqhrdm_download_link($file_url = null, $force_download = true) {\n echo sqhrdm_get_download_link($file_url, $force_download);\n }", "title": "" }, { "docid": "d8db82dc150ffd4748d1ffa29e5dd223", "score": "0.5841743", "text": "function download_file($file_path, $file_name){\n\theader(\"Content-Type: application/octet-stream\");\n\theader(\"Content-Disposition: attachment; filename=\" . $file_name);\n\theader(\"Content-Transfer-Encoding: binary\");\n\treadfile($file_path);\n}", "title": "" } ]
fff5c0d56bc4c2e990fc5199170f190d
/ Gets item info for a particular item
[ { "docid": "8aa638dd826f227ea2b340f7ea9923a2", "score": "0.0", "text": "public function get_info($room_id)\n {\n $this->db->from('rooms');\n $this->db->where('room_id',$room_id);\n $this->db->where('deleted',0);\n \n $query = $this->db->get();\n\n if($query->num_rows()==1)\n {\n return $query->row();\n }\n else\n {\n $room_obj=new stdClass();\n\n $fields = $this->db->list_fields('rooms');\n\n foreach ($fields as $field)\n {\n $room_obj->$field='';\n }\n\n return $room_obj;\n }\n }", "title": "" } ]
[ { "docid": "202078ff3e3fcfd9e3d15f37ad7be165", "score": "0.72542983", "text": "function get_item_info(string $item_id, array $items) {\n foreach ($items as $item) {\n if ($item[\"id\"] === $item_id) {\n return $item;\n }\n }\n return false;\n }", "title": "" }, { "docid": "e4108930fa939c74c6a5026169449caa", "score": "0.71994954", "text": "function getItemDetails($itemid){\n $pdo = connectDB(); \n $query = \"SELECT * FROM `g10_listitems` WHERE id = ?\";\n $statement = $pdo->prepare($query);\n $statement->execute([$itemid]);\n $results = $statement->fetch();\n\n if(isset($results))\n return $results;\n else\n return NULL;\n }", "title": "" }, { "docid": "9911d2f6670ff95196ee00cff7a83078", "score": "0.7097422", "text": "public function get($item);", "title": "" }, { "docid": "71a900f5400ef9eed3c78741151d7e76", "score": "0.701512", "text": "public function getItem() {\n return $this->item;\n }", "title": "" }, { "docid": "3a370f7a79dd1361b96d2a136df9189d", "score": "0.7005307", "text": "function GetItemInfo($item_id, $update_counter = false)\n\t{\n\t\t// get items list\n\t\t$this->db->q(\"\n\t\t\tSELECT \n\t\t\t cat_id AS cat_id,\n\t\t\t item_caption AS caption,\n\t\t\t item_notes AS notes,\n\t\t\t item_viewed AS viewed_count,\n\t\t\t DATE_FORMAT(created_at, '%M %d, %Y') AS created_at\n\t\t\tFROM \n\t\t\t #_PREF_kb_items\n\t\t\tWHERE \n\t\t\t item_id = $item_id \n\t\t\");\n\t\t$item = $this->db->fetchAssoc();\n\n\t\tif ($update_counter)\n\t\t{\n\t\t\t$this->db->q(\"UPDATE #_PREF_kb_items SET item_viewed = item_viewed + 1 WHERE item_id = $item_id\");\n\t\t}\n\t\t\n\t\treturn $item;\n\t}", "title": "" }, { "docid": "d5d6df1169fc1ca43e1d48b629d8ab4f", "score": "0.69310266", "text": "public function getItem()\r\n\t{\r\n\t\t$this->loadManyToOne('item');\r\n\t\treturn $this->item;\r\n\t}", "title": "" }, { "docid": "722cbcf89a011ae3d808fe9d4b84bc13", "score": "0.69292766", "text": "public function getItem()\n {\n return $this->item;\n }", "title": "" }, { "docid": "722cbcf89a011ae3d808fe9d4b84bc13", "score": "0.69292766", "text": "public function getItem()\n {\n return $this->item;\n }", "title": "" }, { "docid": "722cbcf89a011ae3d808fe9d4b84bc13", "score": "0.69292766", "text": "public function getItem()\n {\n return $this->item;\n }", "title": "" }, { "docid": "3eb1d47104be1bda147317e00d802c7e", "score": "0.68535227", "text": "public function getItem()\r\n {\r\n return $this->item;\r\n }", "title": "" }, { "docid": "d8205b560935987935117318fb41b11b", "score": "0.684917", "text": "function apd_get_item( $asin, $atts = false ) {\n\tglobal $apdCore;\n\n\treturn $apdCore->getElement( $asin, $atts );\n}", "title": "" }, { "docid": "805b8882d6449d20fd62c90ea413f7f9", "score": "0.68357676", "text": "public function getItem() {\n\t\treturn $this->item;\n\t}", "title": "" }, { "docid": "2df03c33498f4448ec5953381f795b6b", "score": "0.6820362", "text": "public function getItem();", "title": "" }, { "docid": "02be3a531dad7b0bbe19b8c7365d4a9c", "score": "0.67988074", "text": "private function getInfoFromItem($item) {\n // title\n // download: link, we should grab hash id to magnet link\n // hash\n // size\n // page: link of this article\n // date\n // seeds\n // leechs\n // category\n $info = array();\n\n // skip non item tr\n if (FALSE === strpos($item, 'download.php?id=')) {\n echo \"not item tr\\n\";\n return FALSE;\n }\n\n $tdArray = explode('<td', $item);\n // 0:\n // 1: category\n // 2: title, page\n // 3: magnet, download\n // 4: datetime\n // 5: seeds\n // 6: leechs\n // 7: publisher\n // 8: size\n\n $info['category'] = $this->getCategory($tdArray[1]);\n $info['title'] = $this->getTitle($tdArray[2]);\n $info['page'] = $this->getPageLink($tdArray[2]);\n $info['hash'] = $this->getHash($tdArray[3]);\n $info['download'] = $this->getDownloadLink($tdArray[3]);\n $info['datetime'] = $this->getDatetime($tdArray[4]);;\n $info['seeds'] = $this->getSeeds($tdArray[5]);;\n $info['leechs'] = $this->getLeechs($tdArray[6]);;\n $info['size'] = $this->getSize($tdArray[8]);\n \n return $info;\n }", "title": "" }, { "docid": "9d0d35ca6aa9d802d95f41d52d375a83", "score": "0.6783041", "text": "function get_data($itemid) {\n\treturn GetItemWZInfo($itemid, CURRENT_LOCALE);\n}", "title": "" }, { "docid": "a34dc8aae9cd36906dc50420cf4f43a9", "score": "0.677975", "text": "function getOneItem() {\n\t\t/**\n\t\t * Let's Assume we have our Items Array already\n\t\t * (E.g, Grabbed from Database or whatever in reality)\n\t\t */\n\t\t$items = array();\n\t\t$items[1] = array( \"id\"=>1, \"name\"=>\"Books\", \"desc\"=>\"Books are books to read for your knowledge.\", \"stock\"=>62, \"price\"=>\"$2.5\", \"purchased\"=>40 );\n\t\t$items[2] = array( \"id\"=>2, \"name\"=>\"Fruits\", \"desc\"=>\"Things to eat and most of them are good for your health.\", \"stock\"=>14, \"price\"=>\"$1.25\", \"purchased\"=>68 );\n\t\t$items[3] = array( \"id\"=>3, \"name\"=>\"Drugs\", \"desc\"=>\"Good thing to risk your life.\", \"stock\"=>8, \"price\"=>\"$106.75\", \"purchased\"=>16 );\n\t\t$items[4] = array( \"id\"=>4, \"name\"=>\"Mobile Handsets\", \"desc\"=>\"Stay Connected!\", \"stock\"=>23, \"price\"=>\"$25\", \"purchased\"=>120 );\n\n\t\tif ( self::$__URIObject[\"method\"] == \"GET\" ) {\n\t\t\t$index = self::$__URIObject[\"params\"];\n\t\t} else if ( self::$__URIObject[\"method\"] == \"POST\" ) {\n\t\t\t$index = self::$__URIObject[\"params\"][\"itemid\"];\n\t\t}\n\t\t\n\t\t/**\n\t\t * RETURN the $item (back to the main() to assign there again) \n\t\t * .. to make it available in the Template Files later.\n\t\t */\n\t\treturn $item = $items[ $index ];\n\t}", "title": "" }, { "docid": "93ade76d1d1f2798bcbf3498ac83bf5c", "score": "0.66896373", "text": "public function getItem()\n\t{\n\t\treturn $this->_item;\n\t}", "title": "" }, { "docid": "6f286eede7a1d227d22562c15f233f45", "score": "0.66485596", "text": "public function getStItemInfo()\n {\n return $this->get(self::STITEMINFO);\n }", "title": "" }, { "docid": "08d489024020e99700fe3754314bb880", "score": "0.6630344", "text": "public function item()\n {\n return $this->item;\n }", "title": "" }, { "docid": "1d502086a97685ea6af246cd7d3b1998", "score": "0.6616728", "text": "public function getInfoForAction($aItem)\n\t{\n\t\tif ($aItem['item_type_id'] == 'music-song')\n\t\t{\t\t\t\n\t\t\t$aRow = $this->database()->select('ms.song_id, ms.title, ms.user_id, u.gender, u.full_name')\t\n\t\t\t\t->from(PHpfox::getT('music_song'), 'ms')\n\t\t\t\t->join(Phpfox::getT('user'), 'u', 'u.user_id = ms.user_id')\n\t\t\t\t->where('ms.song_id = ' . (int) $aItem['item_id'])\n\t\t\t\t->execute('getSlaveRow');\n\t\t\t$aRow['link'] = Phpfox::getLib('url')->permalink('music', $aRow['song_id'], $aRow['title']);\n\t\t\treturn $aRow;\n\t\t}\n\t\t\n\t\t// else its a music-album\n\t\t$aRow = $this->database()->select('ma.album_id, ma.name as title, ma.user_id, u.gender, u.full_name')\t\n\t\t\t->from(PHpfox::getT('music_album'), 'ma')\n\t\t\t->join(Phpfox::getT('user'), 'u', 'u.user_id = ma.user_id')\n\t\t\t->where('ma.album_id = ' . (int) $aItem['item_id'])\n\t\t\t->execute('getSlaveRow');\n\t\t$aRow['link'] = Phpfox::getLib('url')->permalink('music.album', $aRow['album_id'], $aRow['title']);\n\t\treturn $aRow;\n\t\t\t\n\t}", "title": "" }, { "docid": "1e188703a587c7eff0eab573a9349929", "score": "0.6609489", "text": "function requestToItem ()\n\t{\n\t\t$visibility = $this->getFromPost ('visibility', 'private');\n\t\t$parentId = $this->getFromPost ('parentId', 0);\n\t\t$isParent = $this->getFromPost ('isParent', 0);\n\t\t$when_created = $this->getFromPost ('when_created', null);\n\t\t$when_modified = $this->getFromPost ('when_modified', null);\n\t\t$itemId = $this->getFromPost ('itemId', 0);\n\t\t$category = $this->getFromPost ('category', null);\n\t\t$isDeleted = $this->getFromPost ('isDeleted', 0);\n\t\t$name = $this->getFromPost ('name', null);\n\t\t$description = $this->getFromPost ('description', null);\n\n\t\t$referingId = $this->getFromPost ('referingId', 0);\n\t\t$referingType = $this->getFromPost ('referingType', null);\n\t\t$imageURL = $this->getFromPost ('imageURL', null);\n\t\t$informationURL = $this->getFromPost ('informationURL', null);\n\t\t$complete = $this->getFromPost ('complete', null);\n\t\t$reliability = $this->getFromPost ('reliability', null);\n\t\t$comments = $this->getFromPost ('comments', null);\n\n\t\t$item = new Information\n\t\t(\n\t\t\t$itemId,\n\t\t\t$_SESSION['brimUsername'],\n\t\t\t$parentId,\n\t\t\t$isParent,\n\t\t\t$name,\n\t\t\t$description,\n\t\t\t$visibility,\n\t\t\t$category,\n\t\t\t$isDeleted,\n\t\t\t$when_created,\n\t\t\t$when_modified,\n\t\t\t$referingId,\n\t\t\t$referingType,\n\t\t\t$reliability,\n\t\t\t$complete,\n\t\t\t$informationURL,\n\t\t\t$imageURL,\n\t\t\t$comments\n\t\t);\n\t\treturn $item;\n\t}", "title": "" }, { "docid": "23662f7cab4ce94cc935e60403f26206", "score": "0.66061175", "text": "public function getItem($itemID) {\n $sql = \"SELECT * FROM items WHERE item_id = '$itemID' \";\n\n if ($result = $this->conn->query($sql)) {\n return $result->fetch_assoc();\n }\n }", "title": "" }, { "docid": "e17ea79ceede3ebca9f1cc6b43e9320c", "score": "0.65687406", "text": "function getItemId(){\n return $this->item_id;\n }", "title": "" }, { "docid": "1f1becf1bb7317b66af723fffed82cb3", "score": "0.654874", "text": "function get_item($db, $itemID){\n\t$query = \"\n\t\tSELECT i.name, i.userID, i.description, i.date, u.firstname, u.lastname, u.email, u.address, u.profileImg, c.name_nice AS county_name\n\t\tFROM items i\n\t\tINNER JOIN users u ON u.userID = i.userID\n\t\tINNER JOIN counties c ON u.countyID = c.countyID\n\n\t\tWHERE i.itemID = ?\";\n\t$stmnt = $db->prepare ($query);\n\tif (!$stmnt->execute(array($itemID))){\n\t\tdie('Query (get_item) failed:' . $db->errorInfo()[2]);\n\t}\n\treturn $result = $stmnt->fetch(PDO::FETCH_OBJ);\n}", "title": "" }, { "docid": "1303b46c095746f035ff837aa558a669", "score": "0.65045846", "text": "public function show($item)\n {\n try {\n $items = DB::table('items')\n ->select('items.name', 'items.amount', 'items.availability', 'types.name as type')\n ->join('types', 'items.type_id', '=', 'types.id')\n ->where('items.id', '=', $item)\n ->whereNull('items.deleted_at')\n ->get();\n\n return $items;\n } catch (\\Exception $e) {\n if (config('app.debug')) {\n return response()->json([\"message\" => $e->getMessage()], 400);\n }\n\n return response()->json([\"message\" => $e->getMessage()], 400);\n }\n }", "title": "" }, { "docid": "bfc43a50cb01faa5536e890d5a84eb11", "score": "0.6499929", "text": "public function getItem()\r\n {\r\n return $this->getParentBlock()->getData('item');\r\n }", "title": "" }, { "docid": "03662d745e9737e46bfe3c6da6622c76", "score": "0.649363", "text": "public static function get_item($item_id) {\n $link = Db::getInstance();\n $query = 'SELECT * FROM inventario WHERE item_id = :id';\n $stmt = $link->prepare($query);\n $stmt->bindParam(':id', $item_id);\n $stmt->execute();\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n return new Item($row['item_id'], $row['item_name'], $row['item_number'], $row['item_ward'], $row['item_floor'], $row['item_consumable']);\n }", "title": "" }, { "docid": "cbc03f28786c3a3f9aa5adfdace98842", "score": "0.64466906", "text": "public function getItem($itemHash);", "title": "" }, { "docid": "8abb5294509415e063caf3c64f8a742d", "score": "0.6445763", "text": "public function getItem()\n {\n return $this->getParentBlock()->getData('item');\n }", "title": "" }, { "docid": "19b4a720ac283b5a0c7f90d66da934e2", "score": "0.64261043", "text": "public function getItem($datatype, $itemId) {\n $result = $this->client->managementApiCall('GET', \"{$this->hashid}/items/{$datatype}/{$itemId}\");\n return $result['response'];\n }", "title": "" }, { "docid": "fb2f87b3df8cd436adebe274e1acc924", "score": "0.6387183", "text": "public function get_info($item_kit_id)\n\t{\n\t\t$this->db->select('\n\t\titem_kit_id,\n\t\titem_kits.name as name,\n\t\titems.name as item_name,\n\t\titem_kits.description,\n\t\titems.description as item_description,\n\t\titem_kits.item_id as kit_item_id,\n\t\tkit_discount,\n\t\tkit_discount_type,\n\t\tprice_option,\n\t\tprint_option,\n\t\titem_kits.category,\n\t\tsupplier_id,\n\t\titem_number,\n\t\tcost_price,\n\t\tunit_price,\n\t\treorder_level,\n\t\treceiving_quantity,\n\t\tkit_filename,\n\t\tallow_alt_description,\n\t\tis_serialized,\n\t\titems.deleted,\n\t\titem_type,\n\t\tstock_type');\n\n\t\t$this->db->from('item_kits');\n\t\t$this->db->join('items', 'item_kits.item_id = items.item_id', 'left');\n\t\t$this->db->where('item_kit_id', $item_kit_id);\n\n\t\t$query = $this->db->get();\n\n\t\tif($query->num_rows()==1)\n\t\t{\n\t\t\treturn $query->row();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//Get empty base parent object, as $item_kit_id is NOT an item kit\n\t\t\t$item_obj = new stdClass();\n\n\t\t\t//Get all the fields from items table\n\t\t\tforeach($this->db->list_fields('item_kits') as $field)\n\t\t\t{\n\t\t\t\t$item_obj->$field = '';\n\t\t\t}\n\n\t\t\treturn $item_obj;\n\t\t}\n\t}", "title": "" }, { "docid": "1099ebe7a4ed6a888dba94b2aa1561a6", "score": "0.6385707", "text": "function get_item_data(array $items) {\n if (isset($_GET[\"id\"])) {\n foreach ($items as $item) {\n if ($_GET[\"id\"] === $item[\"id\"]) {\n return $item;\n }\n }\n }\n return false;\n }", "title": "" }, { "docid": "df08aebfd5175eda874e67aa80c14512", "score": "0.63789743", "text": "public function show(Item $item)\n {\n\n\n\n }", "title": "" }, { "docid": "35f877c64add0bfda4a8d3f303d6bb14", "score": "0.6368152", "text": "public function getStrItemInfo()\n {\n return $this->get(self::STRITEMINFO);\n }", "title": "" }, { "docid": "06bd75fb43207aa4e58f39aab8aaea88", "score": "0.635596", "text": "function single($item)\n {\n return [\n 'id' => $item->id,\n 'name' => $item->name,\n 'type' => $item->type\n ];\n }", "title": "" }, { "docid": "9468d0e219a7af83bda285d5c1d89252", "score": "0.63405246", "text": "function getItemBasicDetails($itemId){\r\n \t$qry = \"select p.prod_name,p.prod_id,c.class_id,c.class_name from product_base p join classification_base c on (p.prod_subclass_id = c.class_id) where p.prod_id = \".$itemId.\";\";\r\n \t$allRows = executeQuery($qry);\r\n \t$itemDetails= array(\"itemId\" => \"\",\"itemName\" => \"\",\"classId\" => \"\",\"className\" => \"\");\r\n \twhile ($row = mysql_fetch_assoc($allRows)){\r\n \t\t$itemDetails['itemId'] = $row['prod_id'];\r\n \t\t$itemDetails['itemName'] = $row['prod_name']; \t\t\t\r\n \t\t$itemDetails['classId'] = $row['class_id'];\r\n \t\t$itemDetails['className'] = $row['class_name'];\r\n \t}\r\n \t//var_dump($itemDetails);\r\n\treturn $itemDetails;\r\n }", "title": "" }, { "docid": "e2edeef1478ccff516abf61d513fe221", "score": "0.6321479", "text": "public function getInfoById($id) {\n\n $req = $this->_bdd->prepare(\"SELECT information FROM TypeItem WHERE id = ?\");\n $req->execute($id);\n\n return $req->fetch();\n }", "title": "" }, { "docid": "ffefd713d019476499e52a370808a55d", "score": "0.6310615", "text": "public function show(Item $item)\n {\n \n }", "title": "" }, { "docid": "9eb1013508da1f9c3be8053930e56779", "score": "0.63075644", "text": "function getItemIdentifier()\n {\n return $this->itemIdentifier;\n }", "title": "" }, { "docid": "bab37b75410eade81a9e76f581f808c6", "score": "0.6286289", "text": "public function show(Item $item)\n {\n //\n }", "title": "" }, { "docid": "bab37b75410eade81a9e76f581f808c6", "score": "0.6286289", "text": "public function show(Item $item)\n {\n //\n }", "title": "" }, { "docid": "bab37b75410eade81a9e76f581f808c6", "score": "0.6286289", "text": "public function show(Item $item)\n {\n //\n }", "title": "" }, { "docid": "bab37b75410eade81a9e76f581f808c6", "score": "0.6286289", "text": "public function show(Item $item)\n {\n //\n }", "title": "" }, { "docid": "bab37b75410eade81a9e76f581f808c6", "score": "0.6286289", "text": "public function show(Item $item)\n {\n //\n }", "title": "" }, { "docid": "bab37b75410eade81a9e76f581f808c6", "score": "0.6286289", "text": "public function show(Item $item)\n {\n //\n }", "title": "" }, { "docid": "4e0e8d4e029446774afa6f23dc3c54ba", "score": "0.62757236", "text": "public function show($item_id)\n\t{\n\t\tif(Request::ajax())\n\t\t{\n\t\t\t$item = $this->zohoApi->getItem($item_id)['item'];\n\n\t\t\treturn $item;\n\t\t}\n\t}", "title": "" }, { "docid": "6a45eee7f65dde3f18b5894d9544d10f", "score": "0.62669355", "text": "public function item_details( $item_id, $allow_cache = true, $timeout = 300 ) {\n\n $url = $this->public_url . '/market/catalog/item?id=' . $item_id;\n\n /* set transient ID for later */\n $transient = substr( md5( 'item_' . $item_id ), 0, 16 );\n\n if ( $allow_cache ) {\n $cache_results = $this->set_cache( $transient, $url, $timeout );\n $results = $cache_results;\n } else {\n $results = $this->remote_request( $url );\n }\n\n if ( isset( $results->error ) ) {\n $this->set_error( 'error_item_' . $item_id, $results->error );\n }\n\n if ( $errors = $this->api_errors() ) {\n $this->clear_cache( $transient );\n return $errors;\n }\n\n if ( isset( $results ) ) {\n return $results;\n }\n\n return false;\n\n }", "title": "" }, { "docid": "5c3372b8ff766dac40f35adaf0d1e1f6", "score": "0.62564504", "text": "public static function getItemFromRoute(): Item\n {\n return request()->route('item');\n }", "title": "" }, { "docid": "24e020e76e24ef4e90a7eb916d472aae", "score": "0.6234031", "text": "public function get_task_item_information($type, $item_value) {\n if($type == 'monthly') {\n $sql = \"SELECT * FROM $this->i_table WHERE (grouptask_id='$this->grouptask_id' AND item_month='$item_value')\";\n }\n else if($type == 'list') {\n $sql = \"SELECT * FROM $this->i_table WHERE (grouptask_id='$this->grouptask_id' AND item_num='$item_value')\";\n }\n else {\n $sql = \"SELECT * FROM $this->i_table WHERE item_id='$item_value'\";\n }\n\n $records = $this->lisdb->query($sql)->result_array();\n return $records[0];\n }", "title": "" }, { "docid": "be8d2fadd16cde12690256c4d381a19d", "score": "0.62268794", "text": "public function getItem()\n {\n return $this->hasOne(Item::className(), ['id' => 'item_id']);\n }", "title": "" }, { "docid": "be8d2fadd16cde12690256c4d381a19d", "score": "0.62268794", "text": "public function getItem()\n {\n return $this->hasOne(Item::className(), ['id' => 'item_id']);\n }", "title": "" }, { "docid": "aae42edcf5169140f1e4c86c9ab9c4ad", "score": "0.6223204", "text": "public function grabItemByID($itemID)\n\t{\n\t\treturn $this->caches['ibEco_lts'][ $itemID ];\n\t}", "title": "" }, { "docid": "72f8c35950da4de4737adc78ea8e1cd5", "score": "0.6221215", "text": "public static function parse ($item) {\n\t\t$ret = '';\n\n\t\t$ret .= '<div class=\"ml-item-details\">';\n\t\t$ret .= '<div class=\"ml-item-title\">' . $item->ItemAttributes->Title . '</div>';\n\n\t\t$people = array();\n\t\tif (isset($item->ItemAttributes->Author)) {\n\t\t\t$people = (array)$item->ItemAttributes->Author;\n\t\t}\n\t\tif (isset($item->ItemAttributes->Creator)) {\n\t\t\tif (is_array($item->ItemAttributes->Creator)) {\n\t\t\t\tforeach ($item->ItemAttributes->Creator as $extra_name) {\n\t\t\t\t\t$people[] = $extra_name->_;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$people[] = $item->ItemAttributes->Creator->_;\n\t\t\t}\n\t\t}\n\n\t\tif (!empty($people)) {\n\t\t\tarray_walk($people, array('self', 'clean_name'));\n\t\t\t$ret .= '<div class=\"ml-item-people\">' . __('People', 'media-libraries') . ': <span class=\"ml-item-people-names\">' . implode(', ', $people) . '</span></div>';\n\t\t\t}\n\n\t\t$ret .= '<div class=\"ml-item-asin\">ASIN: <span class=\"ml-item-asin-number\">' . $item->ASIN . '</span></div>';\n\t\t$ret .= '<div class=\"ml-item-link\"><a href=\"' . $item->DetailPageURL . '\">Details</a></div>';\n\t\t$ret .= '<div id=\"' . $item->ASIN . '\" class=\"ml-item\">' . __('Use this item', 'media-libraries') . '</div>';\n\t\t$ret .= '</div>';\n\n\t\t$image = (isset($item->MediumImage)) ? $item->MediumImage->URL : ((isset($item->SmallImage)) ? $item->SmallImage->URL : ((isset($item->LargeImage)) ? $item->LargeImage->URL : ml_blank_image()));\n\t\tif (!empty($image)) {\n\t\t\t$ret .= '<div class=\"ml-item-image\"><img src=\"' . $image . '\" /><span class=\"ml-image\" style=\"display:none;\">' . self::strip_image($image) . '</div>';\n\t\t}\n\n\t\treturn '<div id=\"ml-'.$item->ASIN.'\" class=\"ml-list-item\">' . $ret . '</div>' . \"\\n\";\n\t}", "title": "" }, { "docid": "7919c0d920590a741a8c11cc24544f06", "score": "0.6219562", "text": "public function get_item($item) {\n\t\tif (file_exists($this->datadir . '/' . $item)) {\n\t\t\treturn unserialize(file_get_contents($this->datadir . '/' . $item));\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "title": "" }, { "docid": "9b0f5102771005f8b319d03b7290e1f2", "score": "0.6196463", "text": "function get_item( $item_path ) {\n global $session;\n $responses = array();\n\n dbg_error_log(\"PROPFIND\",\"Getting item: Path: %s\", $item_path );\n\n $sql = \"SELECT caldav_data.dav_name, caldav_data, caldav_data.dav_etag \";\n $sql .= \"FROM caldav_data WHERE dav_name = ?\";\n $qry = new PgQuery($sql, PgQuery::Plain(iCalendar::HttpDateFormat()), PgQuery::Plain(iCalendar::HttpDateFormat()), $item_path);\n if( $qry->Exec(\"PROPFIND\",__LINE__,__FILE__) && $qry->rows > 0 ) {\n while( $item = $qry->Fetch() ) {\n $responses[] = item_to_xml( $item );\n }\n }\n return $responses;\n}", "title": "" }, { "docid": "109984853ac618f3620a6b17c19e3866", "score": "0.6192541", "text": "public function actionItemdetails()\n\t{\n\t\t$facebook = Yii :: app()->params['facebook'];\n\t\t$signedRequest=$facebook->getSignedRequest();\n \t$myuid = $facebook->getUser();\n \t$sess=Yii::app()->session;\n\t $this->actionLogin();\n\t \t// renders the view file 'protected/views/site/index.php'\n\t\t// using the default layout 'protected/views/layouts/main.php'\n\t\tswitch($sess['svc']) {\n\t\t\tcase 'Symphony':\n\t\t\t\t$details = $this->viewDetailsSymphony();\n\t\t\t\tbreak;\n\t\t\tcase 'Horizon':\n\t\t\t\t$details = $this->viewDetailsHorizon();\n\t\t\t\tbreak;\n\t\t\tcase 'Discovery':\n\t\t\t\t$details = $this->viewDetailsDiscovery();\n\t\t\t\tbreak;\n\t\t\tcase 'Amazon':\n\t\t\t\t$details = $this->viewDetailsAmazon();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\techo \"Details view not available for this client.\";\n\t\t\t\t$details = null;\n\t\t}\n\t\t$this->render('itemdetails',array(\n\t\t\t'myuid'=> $myuid,\n\t\t\t'facebook'=> $facebook,\n\t\t\t'signedRequest'=> $signedRequest,\n\t\t\t'details'=>$details\n\t\t));\n\t}", "title": "" }, { "docid": "9caf562b07acc69839e6f2c7387ffdea", "score": "0.6185537", "text": "public function Get_Item_Description($Item_Name)\n{\n $Item_Array = array(':User_ID' => $this->User_ID, ':Item_Name'=>$Item_Name);\n $Item_SQL = \"SELECT * FROM inventory WHERE User_ID = :User_ID AND Item_Name=:Item_Name\";\n $Results = $this->Connection->Custom_Query($Item_SQL, $Item_Array);\n\n return $Results['Item_Description'];\n}", "title": "" }, { "docid": "e146fd4f6c6e58b3928275ef8c9c3b46", "score": "0.6182603", "text": "public function show(Item $item)\n {\n return $this->showOne($item);\n }", "title": "" }, { "docid": "9d0d0679888ada29309fa50129570060", "score": "0.61774933", "text": "public function getItemid()\n {\n return $this->get(self::ITEMID);\n }", "title": "" }, { "docid": "ef372c7aa3de3e07b3bbffa78323581a", "score": "0.61741084", "text": "function getItemDescription() {\n return $this->item_description;\n }", "title": "" }, { "docid": "398675e272e17c37591af9369721b419", "score": "0.6169297", "text": "private function getItem($item, $extension_name) {\n if (empty($item)) $item = JFactory::getApplication()->input->get('id', '', 'int');\n \n if (is_object($item)) {\n if ($extension_name == 'com_k2') {\n if (isset($item->category) && is_object($item->category)) {\n $item->catname = $item->category->name;\n return $item;\n }\n }\n }\n \n $itemId = is_object($item) ? $item->id : $item;\n \n if (empty($itemId)) JError::raiseError(404, JText::_(\"Item not found\"));\n \n if ($extension_name == 'com_k2') {\n $this->_db->setQuery('SELECT i.*, c.name as catname, c.access as cataccess, c.published as catpublished, c.trash as cattrash FROM #__k2_items AS i LEFT JOIN #__k2_categories AS c ON i.catid = c.id WHERE i.id = '.(int)$itemId);\n } else {\n $this->_db->setQuery('SELECT i.*, c.id as catid, c.title as catname, c.access as cataccess, c.published as catpublished FROM #__content AS i LEFT JOIN #__categories AS c ON i.sectionid = c.id WHERE i.id = '.(int)$itemId);\n }\n \n $item = $this->_db->loadObject();\n \n return $item;\n }", "title": "" }, { "docid": "dc7947170316d32b1400d2eda973521b", "score": "0.6164114", "text": "public function getItemID()\n {\n return $this->itemID;\n }", "title": "" }, { "docid": "dc7947170316d32b1400d2eda973521b", "score": "0.6164114", "text": "public function getItemID()\n {\n return $this->itemID;\n }", "title": "" }, { "docid": "dc7947170316d32b1400d2eda973521b", "score": "0.6164114", "text": "public function getItemID()\n {\n return $this->itemID;\n }", "title": "" }, { "docid": "dc7947170316d32b1400d2eda973521b", "score": "0.6164114", "text": "public function getItemID()\n {\n return $this->itemID;\n }", "title": "" }, { "docid": "dc7947170316d32b1400d2eda973521b", "score": "0.6164114", "text": "public function getItemID()\n {\n return $this->itemID;\n }", "title": "" }, { "docid": "39e3c7b29d962d6d65cde6f0a4185961", "score": "0.61603", "text": "function get_item_name_from_id($id) {\n\t\t$this->load->model('model_items');\n\t\t$result = $this->model_items->items_details_show($id);\n\t\treturn $result->NAME;\n\t}", "title": "" }, { "docid": "6a5e05e1ba5802440fff30f5861958e1", "score": "0.6153933", "text": "public function show(Request $request, Item $item)\n {\n\t\t$response = Item::find($item->id);\n\t\t$response->makeHidden(['id']);\n\t\tif ( $request->cookie('access_token') && $request->cookie('refresh_token') ) {\n\t\t\t$token_id = (new Parser())->parse($request->cookie('access_token'))->getHeader('jti');\n\t\t\t$token = DB::table('oauth_access_tokens')->where('id', $token_id)->first();\n\t\t\tif ($token) {\n\t\t\t\t$user = User::find($token->user_id);\n\t\t\t\tif ( $user->cart ) {\n\t\t\t\t\t$cart = json_decode($user->cart, true);\n\t\t\t\t\t$existing_item_key = null;\n\t\t\t\t\tforeach ($cart as $key => $value) {\n\t\t\t\t\t\tif ( $cart[$key]['item'] == $item->id ) {\n\t\t\t\t\t\t\t$quantity = $cart[$key]['quantity'];\n\t\t\t\t\t\t\t$in_cart = 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} else {\n\t\t\t\t\t$cart = [];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$quantity = @$quantity ? $quantity : 1;\n\t\t$in_cart = @$in_cart ? $in_cart : false;\n\t\treturn response()->json(['item' => $response, 'quantity' => $quantity, 'in_cart' => $in_cart ]);\n }", "title": "" }, { "docid": "1286091f364fd58af3b9af096d657e5a", "score": "0.6150918", "text": "public function fetchItem()\n {\n return $this->traitFetchItem();\n }", "title": "" }, { "docid": "5a2fee1e6a715894736b4197ba36ea1a", "score": "0.6149188", "text": "function findById($item_id){\n $this->query = array_merge(\n array(\n 'Service' => 'AWSECommerceService',\n 'AWSAccessKeyId' => $this->config['key'],\n 'Timestamp' => gmdate(\"Y-m-d\\TH:i:s\\Z\"),\n 'AccociateTag' => $this->config['tag'],\n 'Version' => '2009-03-31',\n 'Operation' => 'ItemLookup',\n 'ResponseGroup' => 'Images,Offers,ItemAttributes',\n ),\n array('ItemId' => $item_id)\n );\n \n return $this->__request();\n }", "title": "" }, { "docid": "cda7aed24f1df79be4658682d9888bf6", "score": "0.6147522", "text": "public static function display_product($item){\n\t$id = $_GET['product'];\n \t$query = DB::query('SELECT * FROM products WHERE id = :i', array(':i'=>$id))[0][$item];\n \t\treturn $query; //display item\n\t\t}", "title": "" }, { "docid": "98b5dfcce0184ee58721f52255ed13a8", "score": "0.614726", "text": "public function getItemName() {\n\t\t\treturn $this->itemName;\n\t\t}", "title": "" }, { "docid": "c83c31d6b28f2efff190a14f566dc3c9", "score": "0.61471444", "text": "public function getItem($name);", "title": "" }, { "docid": "2526d8c8ca40891c0d366582a3541460", "score": "0.6124425", "text": "public static function get($item) {\n if (isset($_POST[$item])) {\n return $_POST[$item];\n } else if (isset($_GET[$item])) {\n return $_GET[$item];\n }\n return ''; // if data is not available, return an empty string\n }", "title": "" }, { "docid": "3926f506a3abfa89ac12521d4cceae76", "score": "0.6113027", "text": "public function getItem()\n {\n return $this->hasOne(Item::className(), ['item_id' => 'item_id']);\n }", "title": "" }, { "docid": "3926f506a3abfa89ac12521d4cceae76", "score": "0.6113027", "text": "public function getItem()\n {\n return $this->hasOne(Item::className(), ['item_id' => 'item_id']);\n }", "title": "" }, { "docid": "8a519f4ec75c47ab36ea07fdff086833", "score": "0.61046046", "text": "public function getItmItem($itemID) {\n\t\treturn $this->wire('modules')->get('Itm')->item($itemID);\n\t}", "title": "" }, { "docid": "0bbdf8265f02e9e7c9fc6e9b6139b376", "score": "0.6096426", "text": "public static function get_shop_info($shop_id, $item_id) {\n\t $topApi = new Api_Top_Service();\n\t $shop = $topApi->getTbkShopInfo(array('sids'=>$shop_id, 'is_mobile'=>'true'));\n\t if($shop) {\n\t $data = array(\n\t 'data'=>json_encode(array('title'=>$shop['shop_title'], 'image'=>$shop['pic_url'])),\n\t 'title'=>$shop['shop_title'],\n\t 'image'=>$shop['pic_url']\n\t );\n\t User_Service_Favorite::update($data, $item_id);\n\t }\n\t}", "title": "" }, { "docid": "09cf865c74a2d09cdf7d98d95fd2fc57", "score": "0.606417", "text": "public function get_data( $item = null ) {\n\t\treturn self::_get_items( $this->_data, $item );\n\t}", "title": "" }, { "docid": "3cb48b455b1aeccb03c6685965c2ec83", "score": "0.6030008", "text": "public function getItem()\n {\n return $this->_data;\n }", "title": "" }, { "docid": "ad53cb28a624323f146d9729d8005a7f", "score": "0.6028675", "text": "static public function ctrInfoProduct($item, $value)\n {\n $table = 'productos';\n $response = productsModel::sqlInfoProducts($table, $item, $value);\n return $response;\n\n\n }", "title": "" }, { "docid": "7885c85146657895cc3359bd031be167", "score": "0.6017746", "text": "public function getById(int $itemId)\n {\n }", "title": "" }, { "docid": "1fac3a7f7d995896def66003b5f462fc", "score": "0.6015866", "text": "public function getItemID()\n\t\t{\n\t\t return $this->itemID;\n\t\t}", "title": "" }, { "docid": "944b9f0d117d74854c1a475f5118ff94", "score": "0.6009923", "text": "public function getAllItemInfoByItemId($item_id = null)\n {\n // Retrieve all ItemInfo By ItemId\n $q = \"SELECT * FROM item_info WHERE item_id = ?\";\n $var = addslashes($item_id);\n $r = parent::returnResultSet($q, $var);\n // Array to hold ItemInfo objects\n $arrItemInfo = array();\n // Create a ItemInfo object for each row and add to array\n foreach ($r as $l) {\n $thisObj = new ItemInfo(\n $l->id,\n $l->item_id,\n $l->item_info_type_id,\n $l->item_info\n );\n $arrItemInfo[] = $thisObj;\n }\n // Return array of objects\n return $arrItemInfo;\n }", "title": "" }, { "docid": "3600aeacd6a2478f716ad6ec66ae8ab9", "score": "0.59841603", "text": "public function debugInfoItem($item) {\n\t\tif($item instanceof SelectableOption) $item = $item->debugInfoSmall();\n\t\treturn $item;\n\t}", "title": "" }, { "docid": "6acd334690427935f9093b331f377e5a", "score": "0.5983501", "text": "function get($itemKey) {\n $value = null;\n if (array_key_exists($itemKey, $this->items)) {\n $value = $this->items[$itemKey];\n }\n return $value;\n }", "title": "" }, { "docid": "75ab41696b2e75c96b37289358817783", "score": "0.59818935", "text": "public function show(Item $item)\n {\n\n $item = $item->with(['category', 'stocks', 'taxes', 'price'])->find($item->id);\n // $item->currency_id = $item->price->currency_id;\n // $item->purchase_price = $item->price->purchase_price;\n // $item->sale_price = $item->price->sale_price;\n return response()->json(compact('item'), 200);\n }", "title": "" }, { "docid": "0a47c47bf5ce4b1424c89ce993eb2ce3", "score": "0.59807473", "text": "public function getSearchResultItem()\n\t{\n\t\treturn DataObject::get_by_id($this->owner->ClassName, $this->owner->ID);\n\t}", "title": "" }, { "docid": "d6dbf71833a7bd30a94319d8fe68b12c", "score": "0.59739697", "text": "public function getItemId()\n {\n return $this->item_id;\n }", "title": "" }, { "docid": "8714ce91073468e4508a6afc013b8e02", "score": "0.59686846", "text": "public function getItem($name)\n {\n }", "title": "" }, { "docid": "331a9a5b7e2a8731e30b03a9a4053eeb", "score": "0.5963697", "text": "public function show(Item $item)\n {\n return $this->buildResponse(self::CODE_SUCCESS, $item);\n }", "title": "" }, { "docid": "0abf8dabcebd69cebd63d1d2735566cf", "score": "0.5959857", "text": "function item($item)\n\t{\n\t\t$this->actor->setLast($this->who['actor']);\n\t\tif($this->who['stat_ap'] <= 0 || $this->who['stat_hp'] <= 0)\n\t\t\treturn;\n\t\t$this->load->model('item');\n\t\t$item = $this->item->getInfo($item);\n\t\tif($item === false) return $this->ret_val['msg'][] = \"Error\";\n\t\t$s = <<<SQL\n\t\t\tselect 1 from actor_item ai\n\t\t\tjoin item_trigger it on ai.inum = it.inum\n\t\t\twhere ai.instance = ? and it.use = b'1'\nSQL;\n\t\t$q = $this->db->query($s, $item['instance']);\n\t\t\n\t\tif($q->num_rows() > 0)\n\t\t{\n\t\t\t$which = \"i_{$item['abbrev']}\";\n\t\t\t$this->load->model(\"items/{$which}\");\n\t\t\t$num = func_num_args();\n\t\t\t\n\t\t\tif($num == 1)\n\t\t\t\t$ret = call_user_func(array($this->$which, 'fire'), $item,\n\t\t\t\t\t&$this->who, &$this->who);\n\t\t\telse\n\t\t\t{\n\t\t\t\t# grab target actor's info to pass\n\t\t\t\t$args = array();\n\t\t\t\t$target = $this->actor->getInfo(func_get_arg(1));\n\t\t\t\t# grab other params\n\t\t\t\tfor($a = 2; $a <= func_num_args; $args[] = func_get_arg($a++));\n\t\t\t\t$ret = call_user_func(array($this->$which, 'fire'),\n\t\t\t\t\t$item, &$this->who, &$target, $args);\n\t\t\t}\n\t\t\t\n\t\t\tforeach($ret as $r)\n\t\t\t\t$this->ret_val['msg'][] = $this->_logText($r);\n\t\t}\n\t}", "title": "" }, { "docid": "2ca003dc50c467077ea161609f8d1743", "score": "0.595819", "text": "public function testJiscHTItem() {\n\t\t$item = new \\Jisc\\api\\Service\\Hairdressing\\Item(['nid'=>22, 'title'=>'The Graduated Bob: Guide', 'type'=>'page' ]);\n\t\t$this->assertEquals($item->getId(),22, 'Item created and returns the correct ID');\n\t\t$this->assertEquals($item->getHandle(),'node/22', 'Item returns the correct handle');\n\t\t$this->assertEquals($item->getType(), 'page', 'Item type returned correctly');\n\t\t$this->assertEquals($item->getName(), 'The Graduated Bob: Guide', 'We got a Graduated Bob');\n }", "title": "" }, { "docid": "0e627692d956ec499315943e19133704", "score": "0.59499675", "text": "public function show(Item $item)\n {\n return response()->json($item->load('price'));\n }", "title": "" }, { "docid": "001b09ee5ce11a0a6f45a30a53a84cd7", "score": "0.59428525", "text": "public function view_item($item_id) {\n //the select sql statement\n $sql = \"SELECT * FROM \" . $this->tblItems . \",\" . $this->tblCategory . \n \" WHERE \" . $this->tblItems . \".category=\" . $this->tblCategory . \".category_id\" .\n \" AND \" . $this->tblItems . \".item_id='$item_id'\";\n //execute the query\n $query = $this->dbConnection->query($sql);\n\n if ($query && $query->num_rows > 0) {\n $obj = $query->fetch_object();\n\n //create a item object\n $item = new Item(stripslashes($obj->title), stripslashes($obj->price), stripslashes($obj->image), stripslashes($obj->description), stripslashes($obj->category));\n\n //set the id for the item\n $item->setItem_Id($obj->item_id);\n\n return $item;\n }\n\n return false;\n }", "title": "" }, { "docid": "631c9290fb1d46acf9c1b4603b288db8", "score": "0.5931769", "text": "public static function get($item)\n {\n if(isset($_POST[$item])) {\n return $_POST[$item];\n } else if(isset($_GET[$item])) {\n return $_GET[$item];\n } else {\n return '';\n }\n }", "title": "" }, { "docid": "615123a1b87860b3c30cc4814b445af6", "score": "0.5931399", "text": "static public function ctrProductInfo($item, $value)\n {\n $table = 'productos';\n $response = productsModel::sqlProductInfo($table, $item, $value);\n return $response;\n\n\n }", "title": "" }, { "docid": "02e740fa9ad0c13740b03b95153049ba", "score": "0.59273475", "text": "public function item() {\n return $this->hasOne('CharacterSheets\\Models\\Instances\\Item');\n }", "title": "" }, { "docid": "7301ef997bdd182fcfe3a5895b1986f9", "score": "0.5919095", "text": "public function getItem() {\n return $this->beer . $this->wine;\n }", "title": "" }, { "docid": "c76d5070dd4e46ba512c1c93dcf1c7c6", "score": "0.59041023", "text": "public function infoItem($arrParam, $options = null)\r\n\t{\r\n\r\n\t\tif ($options['task'] == 'quick-view') {\r\n\r\n\t\t\t$id \t = $arrParam['id'];\r\n\t\t\t$query[] = \"SELECT `name`, `short_description`, `price`,`sale_off`, `picture`\";\r\n\t\t\t$query[] = \"FROM `$this->table`\";\r\n\t\t\t$query[] = \"WHERE `id` = '$id' \";\r\n\t\t\t$query = implode(\" \", $query);\r\n\t\t\t$result = $this->fetchRow($query);\r\n\r\n\t\t\t$salePrice = ($result['price'] - ($result['price'] * $result['sale_off'] / 100));\r\n\t\t\t$salePriceFormat = number_format($salePrice) . ' đ';\r\n\t\t\t$priceFormat = number_format($result['price']) . ' đ';\r\n\t\t\treturn [\r\n\t\t\t\t'id' => $id,\r\n\t\t\t\t'picture' => $result['picture'],\r\n\t\t\t\t'name' => $result['name'],\r\n\t\t\t\t'short_description' => $result['short_description'],\r\n\t\t\t\t'price' => $result['price'],\r\n\t\t\t\t'salePrice' => $salePrice,\r\n\t\t\t\t'salePriceFormat' => $salePriceFormat,\r\n\t\t\t\t'priceFormat' => $priceFormat,\r\n\t\t\t];\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "cf020cf4d55b0a98db41cf521e425b43", "score": "0.58980376", "text": "public function getItem()\r\n\t{\r\n\t\tif (!count($this->_item))\r\n\t\t{\r\n\t\t\t$app = JFactory::getApplication();\r\n\t\t\t$menu = $app->getMenu();\r\n\t\t\t$active = $menu->getActive();\r\n\t\t\t$params = new JRegistry;\r\n\t\t\tif ($active)\r\n\t\t\t{\r\n\t\t\t\t$params->loadString($active->params);\r\n\t\t\t}\r\n $id = (int) $this->getState('item.id');\r\n\t\t\t$this->_item = $this->_getItem($id);\r\n $this->_item->adf = $this->_getAdfGroups($id, 0);\r\n $this->_item->adftab = $this->_getAdfGroups($id, 1);\r\n $this->_item->adf_singles = $this->_getAdfSingles($id);\r\n $this->_getItemImg($id);\r\n\t\t}\r\n \r\n \r\n\t\treturn $this->_item;\r\n\t}", "title": "" } ]
d347719bc53a295fc1d7b8263f1f7a4b
Check if the planUser starts now or before now
[ { "docid": "33ea732373abe48900941286be17599b", "score": "0.72590345", "text": "public function startsNowOrBefore(): bool\n {\n return $this->start_date <= now();\n }", "title": "" } ]
[ { "docid": "34e7431ce2211046a56711bf3b5d26e0", "score": "0.63134813", "text": "public function started()\n {\n return $this->startDatetime()->isPast();\n }", "title": "" }, { "docid": "e8a5b8385ef7ed574c959b0234134e42", "score": "0.6263544", "text": "private function isActiveNow(BaseUser $user)\n {\n $delay = new \\DateTime($this->interval . ' seconds ago');\n\n return $user->getLastLogin() > $delay;\n }", "title": "" }, { "docid": "998d4f50da045984f5d8c70a29afd90b", "score": "0.61773956", "text": "public function planDatesBeforeRequestPlan($startDate, $endDate, $planUser)\n {\n return $this->where('user_id', $planUser->user_id)\n ->where('id', '!=', $planUser->id)\n ->where('start_date', '<=', $startDate)\n ->where('finish_date', '>=', $startDate)\n ->exists();\n }", "title": "" }, { "docid": "91432ca103a54dc54c85ee86f6a844a3", "score": "0.60693604", "text": "public function isNewUser()\n {\n $beforeDate = Carbon::today()->subDays(3);\n $registeredDate = Carbon::parse($this->created_at);\n return $registeredDate->greaterThanOrEqualTo($beforeDate);\n }", "title": "" }, { "docid": "d4be70f3f04cdbbeb74cd730af6058a4", "score": "0.60353833", "text": "public function isStarted()\n {\n return isset($this->start_at) ? $this->start_at->startOfDay() <= \\Carbon\\Carbon::now() : true;\n }", "title": "" }, { "docid": "0aa49faf295fd7ba657b121a5ff25d7e", "score": "0.6028969", "text": "public function user_has_plan() {\n return plan::record_exists_select('userid = ?', array($this->get('userid')));\n }", "title": "" }, { "docid": "d41282c8721fa4a6de0bad1ca513c247", "score": "0.58912313", "text": "private function statusActivacion($user): bool\n {\n $result = true;\n $fechaActual = Carbon::now();\n if (empty($user->fecha_activacion)) {\n $result = false;\n }else{\n $fechatmp = new Carbon($user->fecha_activacion);\n if ($fechaActual > $fechatmp) {\n $result = false;\n }\n }\n return $result;\n }", "title": "" }, { "docid": "8598d1763a3d9fe32e84c030cca8f7fa", "score": "0.58840185", "text": "function plan_explore($user_id) {\n \n // Get codeigniter object instance\n $CI = get_instance();\n \n // Return time when started the plan\n return $CI->plans->plan_started($user_id);\n \n }", "title": "" }, { "docid": "b4ed8ed6053182a6fef3d2f540f70e96", "score": "0.5871915", "text": "public function started()\n\t{\n\t\tif (!$this->exists() || !$this->isPublished())\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t$now = Date::toSql();\n\n\t\tif ($this->get('start_date')\n\t\t && $this->get('start_date') != $this->_db->getNullDate()\n\t\t && $this->get('start_date') > $now)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "15f98b16e6a08f4f0241336c5bb94638", "score": "0.58696884", "text": "protected function hasPassedTimeLimit()\n {\n // Ensure a limit exists\n $limit = static::config()->get('time_limit');\n if (!$limit) {\n return false;\n }\n\n // Ensure started date is set\n $this->markStarted();\n\n // Check duration\n $now = DBDatetime::now()->getTimestamp();\n return $now > $this->startedAt + $limit;\n }", "title": "" }, { "docid": "be7f13cb45b66135a7ce0da309fcf255", "score": "0.5860652", "text": "public function hasStartTime(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "39f6c080447b22df274854b1772b01f3", "score": "0.5785799", "text": "function is_trial() {\n return is_numeric( $this->trial_plan_id ) && ( strtotime( $this->trial_ends ) > WP_FS__SCRIPT_START_TIME );\n }", "title": "" }, { "docid": "00a3aaa51e363705dbc303a909fa143c", "score": "0.5767304", "text": "public function isActivityStart(){\n\n\t\t// $model = $this->superGetById( $productId );\n\t\t$activityTime = $this->getAttribute( \"ready_time\" );\n\t\t$now = new DateTime(\"now\");\n\t\tif( $now > $activityTime ){\n\t\t\treturn false;\n\t\t}else{\n\t\t\treturn true;\n\t\t}\n\n\t}", "title": "" }, { "docid": "926cae4dbbea561858fd0eecf492aa95", "score": "0.57483965", "text": "public function hasStarttime(){\n return $this->_has(17);\n }", "title": "" }, { "docid": "fd05dc14027c1424d80baf6a46596f83", "score": "0.5735319", "text": "public function isNow(DateTime $time);", "title": "" }, { "docid": "30be953fc3d92b13d35df85dfc8d2338", "score": "0.5719868", "text": "function isLate() {\n\t\t$comparisonTime = time();\n\t\tglobal $system;\n\t\t// Tolerancia en dias\n\t\tif ($system[\"config\"][\"tablero\"][\"activities\"][\"parameterControl\"][\"value\"] == \"DAYS\") {\n\t\t\t$days = $system[\"config\"][\"tablero\"][\"activities\"][\"delayed\"];\n\t\t\tif ($days > 0)\n\t\t\t\t$comparisonTime = time() - ($days * 24 * 60 * 60);\n\t\t}\n\t\t$now = date('U') + (60 * 60 * $system[\"config\"][\"system\"][\"parameters\"][\"applicationTimeZoneGMT\"][\"value\"]);\n\t\t$toleranceDate = strtotime(date('Y-m-d', $comparisonTime)); \t\t\t\t\t// tiempo del comienzo del dia (comparo contra un date, no un datetime)\n\n\t\tif ($this->getObjecttype() == \"Construction\") {\t\t\t\t\t\t\t\t\t\t\t\t// @BR: Si es obra\n\t\t\tif (is_null($this->getRescheduledEnd('U')))\t\t\t\t\t\t\t\t\t\t\t\t\t// @BR: Si no esta reprogramada (rescheduledEnd == null)\n\t\t\t\treturn (($this->getEndingDate('U') < $now)\t\t\t\t\t\t\t\t\t\t\t\t// @BR: Si fecha planificada de fin es menor a hoy\n\t\t\t\t\t\t\t\t\t&& ($this->getEndingDate('U') < $toleranceDate));\t\t\t\t// y menor a fecha de tolerancia\n\t\t\telse\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// @BR: Si esta reprogramada (rescheduledEnd != null)\n\t\t\t\treturn (($this->getRescheduledEnd('U') < $now)\t\t\t\t\t\t\t\t\t\t// @BR: Si fecha reprogramada de fin es menor a hoy\n\t\t\t\t\t\t\t\t\t&& ($this->getRescheduledEnd('U') < $toleranceDate));\t\t// y menor a fecha de tolerancia\n\t\t}\n\t\telse {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// @BR: Si es de proyecto\n\t\t\tif ($this->isStarted()) {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// @BR: Si esta iniciado\n\t\t\t\tif (is_null($this->getRescheduledEnd('U')))\t\t\t\t\t\t\t\t\t\t\t\t\t\t// @BR: Si no esta reprogramada (rescheduledEnd == null)\n\t\t\t\t\treturn (($this->getEndingDate('U') < $now)\t\t\t\t\t\t\t\t\t\t\t\t\t// @BR: Si fecha de fin es menor a hoy\n\t\t\t\t\t\t\t\t\t\t&& ($this->getEndingDate('U') < $toleranceDate));\t\t\t\t\t// y menor a fecha de tolerancia\n\t\t\t\telse\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// @BR: Si esta reprogramada (rescheduledEnd != null)\n\t\t\t\t\treturn (($this->getRescheduledEnd('U') < $now)\t\t\t\t\t\t\t\t\t\t\t// @BR: Si fecha de fin reprogramada es menor a hoy\n\t\t\t\t\t\t\t\t\t\t&& ($this->getRescheduledEnd('U') < $toleranceDate));\t\t\t// y menor a fecha de tolerancia\n\t\t\t}\n\t\t\telse {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// @BR: Si no esta iniciado\n\t\t\t\tif (is_null($this->getRescheduledStart('U')))\t\t\t\t\t\t\t\t\t\t\t\t\t// @BR: Si no esta reprogramada (rescheduledStart == null)\n\t\t\t\t\treturn (($this->getStartingDate('U') < $now)\t\t\t\t\t\t\t\t\t\t\t\t// @BR: Si fecha de inicio es menor a hoy\n\t\t\t\t\t\t\t\t\t\t&& ($this->getStartingDate('U') < $toleranceDate));\t\t\t\t// y menor a fecha de tolerancia\n\t\t\t\telse\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// @BR: Si esta reprogramada (rescheduledStart != null)\t\n\t\t\t\t\treturn (($this->getRescheduledStart('U') < $now)\t\t\t\t\t\t\t\t\t\t// @BR: Si fecha de inicio reprogramado es menor a hoy\n\t\t\t\t\t\t\t\t\t\t&& ($this->getRescheduledStart('U') < $toleranceDate));\t\t// y menor a fecha de tolerancia\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "519bf0dc65738926e6f19df0c0ec2241", "score": "0.570155", "text": "public function onTrial()\n {\n if (! is_null($this->trial_ends_at)) {\n return Carbon::today()->lt($this->trial_ends_at);\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "370034e0583691dbb0097c565e3d42d9", "score": "0.56942606", "text": "public function passed_expiration( DateTime $now = null ) {\n\t\tif ( ! $now )\n\t\t\t$now = new DateTime();\n\n\t\treturn ( $now > $this->get_expiration_date() );\n\t}", "title": "" }, { "docid": "b90ce7138211634d160d554d9f2d9e99", "score": "0.5670373", "text": "public static function checkExcTimeOfPromotionIfExpired()\n {\n $pro_exc = PromotionExceptional::where('user_id',\\Auth::user()->id)->where('active',1)->first();\n if($pro_exc)\n {\n if(Carbon::now()->between($pro_exc->start,$pro_exc->end))\n {\n return true;\n }else{\n return false;\n }\n }\n }", "title": "" }, { "docid": "2f17e4c6be8394c1777cfe84c5a8d1c0", "score": "0.56508875", "text": "public function viewableNow()\n {\n $start = 0;\n $end = PHP_INT_MAX;\n $now = time();\n\n if ($this->Begins) {\n $start = strtotime($this->Begins);\n }\n if ($this->Expires) {\n $end = strtotime($this->Expires);\n }\n\n return $start <= $now && $end >= $now;\n }", "title": "" }, { "docid": "8be7128a16c0213052c30843bb1ff785", "score": "0.56235117", "text": "public function check_starve_dates(){\n if(isset($_SESSION[\"started\"]) && $_SESSION[\"started\"]){\n $weeklongName = $_SESSION['weeklong'];\n $database = new Database();\n $now = (new DateTime(date('Y-m-d H:i:s')))->format('Y-m-d H:i:s');\n\n // kill starved humans that have no points\n $query = \"UPDATE $weeklongName SET status='deceased', status_type='inactive' WHERE starve_date < '$now' AND points=0\";\n $database->executeQuery($query);\n\n // turn starved humans into zombies\n $query = \"UPDATE $weeklongName SET status='zombie', starve_date=('$now' + INTERVAL 1 DAY), status_type='starved' WHERE starve_date < '$now' AND status='human'\";\n $database->executeQuery($query);\n\n // kill starved zombies\n $query = \"UPDATE $weeklongName SET status='deceased' WHERE starve_date < '$now' AND status='zombie'\";\n $database->executeQuery($query);\n\n // give any null starve timer a 24 timer\n $query = \"UPDATE $weeklongName SET starve_date=('$now' + INTERVAL 1 DAY) WHERE starve_date IS NULL\";\n $database->executeQuery($query);\n\n // make sure all starve timers are no more than 48 hours\n $query = \"UPDATE $weeklongName SET starve_date=('$now' + INTERVAL 2 DAY) WHERE starve_date>('$now' + INTERVAL 2 DAY)\";\n $database->executeQuery($query);\n }\n\t}", "title": "" }, { "docid": "69edd325b69b3fb59d94bab2310e9894", "score": "0.5619983", "text": "function has_trial_plan() {\n /**\n * @author Vova Feldman(@svovaf)\n * @since 1.2.1.5\n *\n * Allow setting a trial from the SDK without calling the API.\n * But, if the user did opt-in, continue using the real data from the API.\n */\n if ( $this->_trial_days >= 0 ) {\n return true;\n }\n\n return $this->_storage->get( 'has_trial_plan', false );\n }", "title": "" }, { "docid": "30a543a96128e20e2333fff84861822e", "score": "0.55929565", "text": "public function hasOperationStarted(int $user_id){\n $operation_started = ProductRecord::whereNull('end_time')->where('user_id', '=', $user_id)->latest('start_time')->get()->first();\n\n if (!is_null($operation_started) && is_null($operation_started->end_time)) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "4529a2f4a3d938b5008be74ac0416c8e", "score": "0.5585189", "text": "public function getStartedAttribute()\n {\n if (!auth()->check()) {\n return false;\n }\n\n return $this->users->contains(auth()->user());\n }", "title": "" }, { "docid": "e99a8e19fd9bb8a890aa1547aa5a8a0f", "score": "0.55777776", "text": "public function onTrial(): bool\n {\n return $this->trial_ends_at ? Carbon::now()->lt($this->trial_ends_at) : false;\n }", "title": "" }, { "docid": "e99a8e19fd9bb8a890aa1547aa5a8a0f", "score": "0.55777776", "text": "public function onTrial(): bool\n {\n return $this->trial_ends_at ? Carbon::now()->lt($this->trial_ends_at) : false;\n }", "title": "" }, { "docid": "9f191dec7e322e53ffecdf8d112c3eea", "score": "0.55630934", "text": "function isFuture(){ return $this->compare(Date::Today())>0; }", "title": "" }, { "docid": "ba1447f4d90b258a5fcd5633e6ba6935", "score": "0.5557585", "text": "public function time_future_checker()\n {\n $now = app_now();\n if (date_greater_than($this->request->entry_time,$now)) {\n return $this->build_error([\n 'message' => 'Please an entry time can not be a future time'\n ]);\n }\n \n }", "title": "" }, { "docid": "17e0a711e25b8ccbc76b0f4367942040", "score": "0.5546328", "text": "function _isFirstTime()\n {\n $data = session()->get('register_tenant');\n if (!is_null($data)) {\n return $data['first_time'];\n }\n\n return false;\n }", "title": "" }, { "docid": "17e0a711e25b8ccbc76b0f4367942040", "score": "0.5546328", "text": "function _isFirstTime()\n {\n $data = session()->get('register_tenant');\n if (!is_null($data)) {\n return $data['first_time'];\n }\n\n return false;\n }", "title": "" }, { "docid": "05a74288e6c407e7bbfdc8fd3c4a1ae4", "score": "0.55189425", "text": "public function isNow() {\n\t\t$this->setIsNow();\n\t\treturn $this->isNow;\n\t}", "title": "" }, { "docid": "aaa8152b3f891bfb3ec188732c55bd42", "score": "0.5513897", "text": "public function hasPursuetime(){\n return $this->_has(25);\n }", "title": "" }, { "docid": "676a54b6f92d93ef37920c5fe76a91d6", "score": "0.5488323", "text": "public function hasWorkStarted(int $user_id){\n $work_started = WorkRecord::whereNull('end_time')->where('user_id', '=', $user_id)->latest('start_time')->get()->first();\n\n if (!is_null($work_started) && is_null($work_started->end_time)) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "321f6b4ca6f4961732a4189ad2ec596d", "score": "0.5478203", "text": "function canStartTicket($user_id, $ticket_id) {\n return true;\n }", "title": "" }, { "docid": "f1a13c5f1924431b7d76a97bafd7d3b1", "score": "0.5473358", "text": "public function shouldPlayNow(Chronos $now): bool\n {\n if (!$this->shouldPlayOnCurrentDate($now)) {\n return false;\n }\n\n $startTime = self::getDateTime($this->getStartTime(), $now);\n $endTime = self::getDateTime($this->getEndTime(), $now);\n\n $comparePeriods = [];\n\n if ($startTime->equals($endTime)) {\n // Create intervals for \"play once\" type dates.\n $startTime = $startTime->subMinutes(15);\n $endTime = $endTime->addMinutes(15);\n\n $comparePeriods[] = [$startTime, $endTime];\n $comparePeriods[] = [$startTime->subDay(), $endTime->subDay()];\n $comparePeriods[] = [$startTime->addDay(), $endTime->addDay()];\n } elseif ($startTime->greaterThan($endTime)) {\n // Create intervals for overnight playlists (one from yesterday to today, one from today to tomorrow).\n $comparePeriods[] = [$startTime->subDay(), $endTime];\n $comparePeriods[] = [$startTime, $endTime->addDay()];\n } else {\n $comparePeriods[] = [$startTime, $endTime];\n }\n\n foreach ($comparePeriods as [$start, $end]) {\n /** @var Chronos $start */\n /** @var Chronos $end */\n if ($now->between($start, $end)) {\n $dayToCheck = (int)$start->format('N');\n\n if ($this->isScheduledToPlayToday($dayToCheck)) {\n return true;\n }\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "7b6bcff7bac9b415431b82a365fa2bc2", "score": "0.5473176", "text": "function check_user_schedules($starttime, $exptime, $s_group, $user) {\n\t$sql = \"SELECT * FROM es_schedule WHERE s_u_id=\".$user[\"user_id\"].\" AND s_group!='\".addslashes($s_group).\"' AND ((s_exptime>$starttime AND s_exptime<=$exptime) OR (s_starttime>=$starttime AND s_starttime<$exptime)) ORDER BY s_starttime\";\n\t$schedules = get_db_items($sql);\n\tif (count($schedules)>0) return false;\n\treturn true;\n}", "title": "" }, { "docid": "21bf7c388933ecfd54b67d97d28d0831", "score": "0.5468739", "text": "function isPast(){ return $this->compare(Date::Today())<0; }", "title": "" }, { "docid": "dfa91c580c98d7d256187c70d9c338c0", "score": "0.5466745", "text": "public function getIsStartedAttribute()\n {\n return !is_null($this->started_at);\n }", "title": "" }, { "docid": "2b3ef6b822d74a56fe6214904695e2e7", "score": "0.54621863", "text": "public function check(Carbon $timePoint = NULL) {\n if (!isset($timePoint)) {\n $timePoint = Carbon::now();\n }\n\n $this->shiftBy($timePoint);\n \n if (self::UNLIMITED == $this->quota || $this->usage() < $this->quota) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "d30b73544fc4f409cebf73263167f8ac", "score": "0.546046", "text": "public function checkPlanDatesInBetween($startDate, $endDate, $planUser)\n {\n return $this->where('start_date', '<=', $startDate)\n ->where('finish_date', '>=', $endDate)\n ->exists();\n }", "title": "" }, { "docid": "6c85f16702c196726b47c4fa6cdb3cdb", "score": "0.5458478", "text": "public static function dailyCheckCustomerPlan(){\n\t\twp_schedule_event( time(), 'daily', 'wiloke_submssion_paypal_daily_check' );\n\t}", "title": "" }, { "docid": "3cf7ccdc762afcd75945cb806f3a9701", "score": "0.5446316", "text": "function isOnTime() {\n\t\treturn (!$this->isDelayed() && !$this->isLate() && !$this->isFinished() && !$this->isCancelled());\n\t}", "title": "" }, { "docid": "1289600859c06a0cc7432220b245d492", "score": "0.5440759", "text": "public function checkSchedual()\r\n {\r\n $glo = get_global_setting();\r\n $start = $glo['dream_start_time'];\r\n $end = $glo['dream_end_time'];\r\n $status = $glo['dream_status'];\r\n\r\n if ($status == 0) {\r\n }\r\n\r\n\r\n if ($start > time()) {\r\n }\r\n\r\n\r\n if ($end < time()) {\r\n checkDreamOver();\r\n }\r\n }", "title": "" }, { "docid": "af27b89a6a3b66434c43134960b670f6", "score": "0.54407215", "text": "public function hasPlannedAssessmentDate($user, $process)\n {\n return $this->model->where('user_id', $user)->where('process_id', $process)->first();\n }", "title": "" }, { "docid": "086c680b2cb277f9e963730c3dc9cce3", "score": "0.5440046", "text": "function isToday(){ return $this->compare(Date::Today())==0; }", "title": "" }, { "docid": "bc41c6fddc3a9533ee945ebe14d30a3d", "score": "0.5435111", "text": "public function create(User $user)\n {\n return $user->can('schedules:timetable:create');\n }", "title": "" }, { "docid": "188bc01936ef64e2c49f7ceac913d398", "score": "0.54346144", "text": "public function isActive()\n {\n return ($this->expirationDate === null || $this->expirationDate > $this->now);\n }", "title": "" }, { "docid": "95e5b028caeafa6682f4971f0eeff51f", "score": "0.5421592", "text": "public function create(User $user)\n {\n return $user->type === 'event_planner';\n }", "title": "" }, { "docid": "e07375129c0f0814cca4e1a61f8818dd", "score": "0.5413418", "text": "function sst_at_least_start_now() {\n\tif ( empty( $_GET[ 'start' ] )or $now > $_GET[ 'start' ] ) {\n\t\t$_GET[ 'start' ] = $now;\n\t}\n}", "title": "" }, { "docid": "8e1e140c84b09a7a85f639c45c2117f4", "score": "0.5412036", "text": "public function setCurrentPhaseStart() {\n\n\t\t$intAnswers = $this->getIntAnswers(array(\n\t\t\t'created_time_lower' => $this->workflowStart\n\t\t));\n\n\t\tif (!$intAnswers) {\n\t\t\t$this->currentPhaseStart = time();\n\t\t\treturn true;\n\t\t}\n\n\t\t$bringForward = 0;\n\t\tforeach ($intAnswers as $intAnswer) {\n\t\t\tif ($intAnswer->phase_guid == $this->currentPhase) {\n\t\t\t\t$bringForward = $bringForward + $intAnswer->timeSpent;\n\t\t\t}\n\t\t}\n\n\t\t$this->currentPhaseStart = time() - $bringForward;\n\t\treturn true;\n\t}", "title": "" }, { "docid": "1f3565496198bbcec7862737eea6e9a1", "score": "0.5408044", "text": "public function isOnExecution() {\n\t\treturn ( !$this->getRealEnd() && $this->getRealStart('U') && ($this->getRealStart('U') < date('U')) );\n\t}", "title": "" }, { "docid": "78dbb6522bcbe10a45a7bd1ac7d98fe6", "score": "0.5404324", "text": "public function isCurrent(): bool\n {\n return $this->startsNowOrBefore() && $this->finishesAfterNow();\n }", "title": "" }, { "docid": "f0f04cec8ce64a0c79c27647295ac7ae", "score": "0.5398584", "text": "function check_round_is_starting() {\r\n\tglobal $option, $wpdb;\r\n\t$sql = 'SELECT gametime FROM '.$wpdb->prefix.'pl_games '.\r\n\t\t'WHERE round = \"'.$option['nextday'].'\" '.\r\n\t\t'AND competition_id = '.$option['currentcompetition'].' ORDER by gametime asc LIMIT 1';\r\n\t$nextgametime = $wpdb->get_var($sql);\r\n\r\n//echo '<br>'.mktime();\r\n\r\n\t// nochmal checken aufm server, wegen utc und so.\r\n\tif ((mktime() + 7200) > $nextgametime AND $option['nextday'] < 35){\r\n\t\t//echo \"true\";\r\n\t\treturn TRUE;\r\n\t}\r\n\treturn FALSE;\r\n}", "title": "" }, { "docid": "950dbef199332eca4bc8f7507919200a", "score": "0.5377944", "text": "public function scheduled()\n\t{\n\t\treturn ($this->getValue('status')==='scheduled');\n\t}", "title": "" }, { "docid": "bc20b916445887d0bd043bffeaff1ba5", "score": "0.5377489", "text": "public function suspensionExpired()\n {\n $now = Carbon::now();\n if ($this->penalty_lifted_at) {\n if ($this->penalty_lifted_at->lessThanOrEqualTo($now)) {\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "9e426da0ef7aced8d9d83eee15205500", "score": "0.53733987", "text": "public static function is_member_in( $user_id ) {\n\t\t\t$time = current_time( 'timestamp' );\n\t\t\t$last_checkin = static::get_last_checkin( $user_id );\n\t\t\t$last_checkout = static::get_last_checkout( $user_id );\n\t\t\tif ( $last_checkin && ( $last_checkin > $last_checkout || ! $last_checkout ) && $last_checkout < $time ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "0d2e507cfac401310000c78dffef9bb8", "score": "0.53717756", "text": "public function checkWhoStarts()\n\t{\n\t\tif($this->attacker->getStats('speed') < $this->defender->getStats('speed')) {\n\t\t\t$this->switchRoles();\n\t\t} else {\n\t\t\t// if both players have the same speed then check highest luck\n\t\t\tif($this->attacker->getStats('speed') == $this->defender->getStats('speed')) {\n\t\t\t\tif($this->attacker->getStats('luck') < $this->defender->getStats('luck')) {\n\t\t\t\t\t$this->switchRoles();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "da5cd39e06c43c18295e5a692c88c83b", "score": "0.5357636", "text": "public function canStart()\n {\n if($this->status === SchedulerStatus::OFF)\n return false;\n\n $cron = CronExpression::factory($this->cron_time);\n return $cron->isDue(date('Y-m-d H:i:s'));\n }", "title": "" }, { "docid": "5e18e9199b065c5255ed929f41923d1f", "score": "0.5353362", "text": "public function isActiveTrial()\n {\n return $this->isTrial() && Carbon::today()->lte(Carbon::parse($this->trial_ends_on));\n }", "title": "" }, { "docid": "2427cf92765dcc6496bb4555e700d85e", "score": "0.5348346", "text": "public function hasRegisteredLate()\n {\n if (!$this->isLoaded()) return false;\n return strtotime($this->signed_up) > strtotime(SIGNUPEND);\n }", "title": "" }, { "docid": "93122ae955bf7f2a03e2c250c10d7ac7", "score": "0.53360605", "text": "public function getIsNow(): bool\r\n {\r\n return $this->isNow;\r\n }", "title": "" }, { "docid": "2e8882253ec8dbd82674343d89727406", "score": "0.5311856", "text": "public function isActive()\n {\n return $this->until->gte(now());\n }", "title": "" }, { "docid": "4ca495edd9b8baec4c7065f453156448", "score": "0.5311669", "text": "public function subscription_can_be_canceled_now()\n {\n // Given we have a user and two plans\n $user = $this->createUser();\n $monthlyPlan = $this->createMonthlyPrice();\n\n $subscription = $user->subscribeTo($monthlyPlan, 1, $this->createTestToken());\n\n $this->assertDatabaseHas('subscriptions', [\n 'owner_id'=> $user->id,\n 'price_id' => $monthlyPlan->id,\n ]);\n\n // Expect user to be subscribed to monthly plan\n $this->assertTrue($subscription->isFor($monthlyPlan));\n $this->assertTrue($user->fresh()->isSubscribedTo($monthlyPlan));\n\n // Do cancel subscription immediately\n $subscription->cancelNow();\n\n // Expect user not to be subscribed to monthly plan anymore\n tap($user->fresh(), function(User $user) use ($monthlyPlan) {\n $this->assertFalse($user->isSubscribedTo($monthlyPlan));\n $this->assertFalse($user->hasActiveSubscriptions());\n });\n\n // Expect subscription not to be active anymore\n tap($subscription->fresh(), function(Subscription $subscription) use ($monthlyPlan) {\n $this->assertFalse($subscription->isFor($monthlyPlan));\n $this->assertFalse($subscription->isActive());\n });\n }", "title": "" }, { "docid": "708f16941e8bc6522a32c47d7e3b4981", "score": "0.5311254", "text": "public function finishesBeforeToday(): bool\n {\n return $this->finish_date < today();\n }", "title": "" }, { "docid": "e7ffa642f309ad4a821f820a0e9cda5e", "score": "0.53019094", "text": "public function validTime()\n {\n $startTime = new Carbon($this->start_time);\n $endTime = new Carbon($this->end_time);\n $appointmentStartTime = $startTime->copy()->subMinutes(Appointment::EXTRA_TIME);\n $appointmentEndTime = $endTime->copy()->addMinutes(Appointment::EXTRA_TIME);\n return $appointmentStartTime->lte(Carbon::now()) && $appointmentEndTime->gte(Carbon::now());\n }", "title": "" }, { "docid": "5a255786184716f0d014a2ec66d608c4", "score": "0.5299885", "text": "public function accepted()\n {\n return ($this->_stime <= time()) && (time() <= $this->_etime);\n }", "title": "" }, { "docid": "6ede90841158ff51082e2b0f9fbb9e51", "score": "0.5295651", "text": "public function changeTimetable(User $user)\n {\n return $user->capabilities->contains(5);\n }", "title": "" }, { "docid": "c543b91e9ae6fbc8f73057900b17508d", "score": "0.5294147", "text": "public function canceled(): bool\n {\n return $this->canceled_at ? Carbon::now()->gte($this->canceled_at) : false;\n }", "title": "" }, { "docid": "12dc04d9fc4cd618be9af42c47bd8060", "score": "0.5289866", "text": "protected function checkInNow()\r\n\t{\r\n\t\t// Get set check in time\r\n\t\t$time \t= JComponentHelper::getParams('com_costbenefitprojection')->get('check_in');\r\n\t\t\r\n\t\tif ($time){\r\n\t\t\t// Get Yesterdays date\r\n\t\t\t$date =& JFactory::getDate()->modify($time)->toSql();\t\r\n\t\r\n\t\t\t// Get a db connection.\r\n\t\t\t$db = JFactory::getDbo();\r\n\t\t\t\r\n\t\t\t$query = $db->getQuery(true);\r\n\t\t\t \r\n\t\t\t// Fields to update.\r\n\t\t\t$fields = array(\r\n\t\t\t\t$db->quoteName('checked_out_time') . '=\\'0000-00-00 00:00:00\\'',\r\n\t\t\t\t$db->quoteName('checked_out') . '=0'\r\n\t\t\t);\r\n\t\t\t \r\n\t\t\t// Conditions for which records should be updated.\r\n\t\t\t$conditions = array(\r\n\t\t\t\t$db->quoteName('checked_out') . '!=0', \r\n\t\t\t\t$db->quoteName('checked_out_time') . '<\\''.$date.'\\''\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t// Check table\r\n\t\t\t$query->update($db->quoteName('#__costbenefitprojection_interventions'))->set($fields)->where($conditions); \r\n\t\t\t\t \r\n\t\t\t$db->setQuery($query);\r\n\t\t\t \r\n\t\t\t$result = $db->query();\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "9a0285158a8a16f6d5db251f1d7a14a9", "score": "0.5286608", "text": "public function before($user, $ability, Schedule $schedule){\n if ($user->hasRoles(['moderador','admin']) && $user->hospital_id === $schedule->user->hospital_id) {\n return true;\n }\n }", "title": "" }, { "docid": "68a58a9b77c86b2c23c16672ebe2c6fb", "score": "0.52770674", "text": "protected function registrationsAreEnabled()\n {\n return Carbon::parse(config('lanparty.registration_start_date'))->isPast();\n }", "title": "" }, { "docid": "565898660e174838ecacd34b87273d25", "score": "0.5275942", "text": "public static function member_checkin( WP_REST_Request $request ) {\n\t\t\tif ( $user = static::get_rest_user() ) {\n\t\t\t\t$time = current_time( 'timestamp' );\n\t\t\t\tadd_user_meta( $user->ID, 'makerspace_checkin', $time );\n\t\t\t\treturn $user->ID;\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "5a97c84062283869019f5846d2fb2e3d", "score": "0.52729094", "text": "protected function has_first_activated_on()\n {\n }", "title": "" }, { "docid": "eb3be272d1c338a58817947c58d0eae0", "score": "0.527105", "text": "public function is_expired() {}", "title": "" }, { "docid": "659f700cec249873ff99e7cb7d684b81", "score": "0.5254723", "text": "public function pretrip()\n {\n\n $this->user = Users::getUser($_SESSION['userId']);\n $this->user->checkLoggedIn();\n \n }", "title": "" }, { "docid": "fb046af3988514b6aa637b0df4191e16", "score": "0.52508414", "text": "public function hasTimeCreated()\n {\n return $this->time_created !== null;\n }", "title": "" }, { "docid": "fb046af3988514b6aa637b0df4191e16", "score": "0.52508414", "text": "public function hasTimeCreated()\n {\n return $this->time_created !== null;\n }", "title": "" }, { "docid": "adb9a7a53a9838d43c6ae111c54f3bcd", "score": "0.524959", "text": "function isNew( $created_at ) {\n\t$date1 = now();\n\t$date2 = $created_at;\n\t$diff = $date2->diffInHours( $date1 );\n\tif ( $diff < 24 ) {\n\t\treturn true;\n\t}\n}", "title": "" }, { "docid": "70ea4b3e9ad812d43775b929d5fafbeb", "score": "0.5247198", "text": "public function wp_cron_scheduled_check()\n {\n }", "title": "" }, { "docid": "35717c4636e82ea1e84204303e7866d4", "score": "0.52356", "text": "function site_status_check() {\n $now = time();\n $ret = true;\n \n if(date('D', $now) == 'Fri' && date('H', $now) >= PROD_END_HOUR) {\n // End of the work week. Pause the site\n pause_site();\n $ret = false;;\n } else if(date('D', $now) == 'Mon' && date('H', $now) >= 8) {\n // Beginning of the work week. Resume the site\n resume_site();\n }\n return 1;\n}", "title": "" }, { "docid": "886c8f82afef8d277144e45f2402ed29", "score": "0.5233336", "text": "protected function userIsEligibleForPlan($plan)\n {\n return ! $this->exceedsMaximumTeamMembers($plan) &&\n ! $this->exceedsMaximumCollaborators($plan);\n }", "title": "" }, { "docid": "c49d9333442ef6c5ead92ab1079df194", "score": "0.523243", "text": "public function hasVotedToday() {\n $user_id = sfContext::getInstance()->getUser()->getId();\n $votes = Doctrine::getTable('PilotVote')->createQuery('v')\n ->addWhere('v.user_id = ?', $user_id)\n ->addWhere('DATE(v.created_at) = ?', date('Y-m-d'))\n ->execute();\n \n if ($votes->count()) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "a958b247bad9be1e9ba7bfabb156fe65", "score": "0.52235323", "text": "function isStarted() {\n\t\tif ($this->getObjecttype() == \"Construction\")\t\t\t\t// @BR: Si es obra operan diferentes fechas\n\t\t\treturn false;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// @BR: Nunca puede estar iniciada\n\t\telse\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// @BR: Si es proyecto hay fechas de inicio y fin\n\t\t\treturn (!is_null($this->getRealStart('U')) \t\t\t\t// @BR: Si tienen fecha de inicio real\n\t\t\t\t\t\t\t\t&& is_null($this->getRealEnd('U'))); \t\t// pero no de fin real\n\t}", "title": "" }, { "docid": "b63712776064e2b9b13e12231d085a7a", "score": "0.5219153", "text": "function checkTime(){\n global $config;\n //if(time() - $_SESSION['time'] > $config['session']['duration']){\n if(time() - $_SESSION['time'] > 60*60){ //1 hour\n return false;\n }\n else {\n return true;\n }\n }", "title": "" }, { "docid": "40fdef35f202e97a240f8c35ba1491e0", "score": "0.5215201", "text": "function __validToken($token_created_at) \r\n\t\t{\r\n\t\t\t$expired = strtotime($token_created_at) + 3600;\r\n\t\t\t$time = strtotime(\"now\");\r\n\t\t\tif ($time < $expired) \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}", "title": "" }, { "docid": "77dec2c7b8ef72e445ce92f28afd9af5", "score": "0.5215193", "text": "public function isToday();", "title": "" }, { "docid": "a1cd1263910dafdb1de6cd087516a5c1", "score": "0.5211712", "text": "private function isNewVisit()\n {\n global $wpdb;\n $_isNewVisit = true;\n $_query = \"SELECT * FROM {$wpdb->prefix}olovisitors where ip = '\".$this->ip.\"' AND useragent = '\".$this->userAgent.\"'\" ;\n $_query .= \" AND visit_date > date_sub( now( ) , INTERVAL \".$this->sessionLifeTime.\" MINUTE )\" ;\n $_result = $wpdb->get_results($_query);\n\n if(count($_result) > 0){\n $_isNewVisit = false;\n }\n\n return $_isNewVisit;\n\n }", "title": "" }, { "docid": "bbf738d7b57de36d3cecc4e7ae33451c", "score": "0.52044696", "text": "public function availableToBook(){\n //case 1 : No timings\n $is_no_timings = $this->timings->count() == 0;\n if($is_no_timings){\n return false;\n }\n\n //case 2 : Min hours before session time\n //Care on hours, only session different in time less than a day be checked\n $diff_less_than_a_day = Carbon::now(Setting::timezone())->diffInDays($this->date, false) == 0;\n if($diff_less_than_a_day){\n $earliest_timing = $this->timings->first();\n $session_start_timing_str = $earliest_timing->first_arrival_time;\n\n $minutes = $this->getMinutes($session_start_timing_str);\n $time_hour = (int)round($minutes / 60);\n $time_minute = $minutes % 60;\n //compute exactly start timing of session\n $session_start_timing = $this->date->copy()->setTime($time_hour, $time_minute);\n\n $buffer_config = Setting::bufferConfig();\n $min_hours_session_time = $buffer_config(Setting::MIN_HOURS_IN_ADVANCE_SESSION_TIME);\n\n $diff_in_hours = Carbon::now(Setting::timezone())->diffInHours($session_start_timing, false);\n // Dif in hours >= min hours session time still not enough\n /** @case min_hours = 0\n * Select time just pass session time, less than 1 hours\n * So, compare diffHours function still return as 0, exactly -0\n */\n $still_not_pass= Carbon::now(Setting::timezone())->lte($session_start_timing);\n // Allow pass through session start time as option of IGNORE prior to session start time\n // For this case min_hours_session_time will < 0, current set up is -1000\n $still_not_pass = ($min_hours_session_time < 0) || $still_not_pass;\n $satisfied_in_advance_session_time = $still_not_pass && $diff_in_hours >= $min_hours_session_time;\n\n return $satisfied_in_advance_session_time;\n }\n\n return true;\n }", "title": "" }, { "docid": "d4682e386a419690aa9f9d75383ba15f", "score": "0.52040374", "text": "function active_and_change_plan(){\n\t\tif($this['demo_plan_id']){\n\t\t\t$plan_id = $this['demo_plan_id'];\n\t\t\t$this['demo_plan_id'] = null;\n\t\t\t$status = 'InDemo';\n\t\t}else{\n\t\t\t$plan_id = $this['plan_id'];\n\t\t\t$status = 'Active';\n\t\t}\n\t\t\n\t\t// current plan id not same as new plan id\n\t\t// and if reset_same_plan_again is define then reset the plan agian on reset date if define else \n\t\tif((($p = $this->currentRunningPlan())&& $p->id != $plan_id) OR @$this->app->reset_same_plan_again){\n\t\t\t$on_date = null;\n\t\t\tif(@$this->app->reset_same_plan_again_on_date){\n\t\t\t\t$on_date = $this->app->reset_same_plan_again_on_date;\n\t\t\t}\n\t\t\t\t //setPlan($plan, $on_date=null, $remove_old=false,$is_topup=false,$remove_old_topups=false,$expire_all_plan=false,$expire_all_topup=false,$work_on_pro_data=true,$as_grace = true,$force_plan_end_date=null,$force_set_plan=false)\n\t\t\t$this->setPlan($plan_id,$on_date,null,null,null,$expire_all_plan=true,null,null,$as_grace=false,null,$force_set_plan=true);\n\t\t}\n\t\t\n\t\t$this['status'] = $status;\n\t\t$this['is_active'] = true;\n\t\t$this->save();\n\n\t\t// $this->updateUserConditon();\n\t\t$this->app->isp_invoice_approved_function_not_run = 1;\n\t\t$return_data = $this->createInvoice($this,null,null,$this->app->now);\n\n\t\tif(isset($return_data['master_detail'])){\n\t\t\t$invoice_model = $this->add('xepan\\commerce\\Model_SalesInvoice')\n\t\t\t\t\t->load($return_data['master_detail']['id']);\n\t\t\t// as per logic.jade it is due in status here by default\n\t\t\t// not need of config, that is invoice default status\n\t\t\t// if we set it to due that end date increase twise the plan validity\n\t\t\t// invoive approved hoook not run in caf form even inovice is create\n\t\t\t$invoice_model['status'] = 'Due';\n\t\t\t$invoice_model->save();\n\t\t}\n\n\t\t$this->updateNASCredential();\n\t\t$this->updateWebsiteUser();\n\n\t\treturn $return_data;\n\t}", "title": "" }, { "docid": "d1833d3465f57cb07266f541e0733795", "score": "0.51967", "text": "public function onGracePeriod()\n {\n if (! is_null($endsAt = $this->ends_at)) {\n return Carbon::now()->lt(Carbon::instance($endsAt));\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "c089d5e3ed451fcb9f7cbe13306f4e7f", "score": "0.51964486", "text": "public function start($user)\r\n {\r\n return true;\r\n }", "title": "" }, { "docid": "3cbf291eed78226c4cdbbc75acd1ca41", "score": "0.51961327", "text": "public function isRunning()\n {\n $c = Mage::getModel('cron/schedule')\n ->getCollection()\n ->addFieldToFilter('status', 'running')\n ->addFieldToFilter('executed_at', array(\n 'from' => date('Y-m-d H:i:s', strtotime('-10 minutes'))\n ));\n\n return $c->count() == 0 ? false : true;\n }", "title": "" }, { "docid": "df90a79249e65b86a5d6ea5f17eab786", "score": "0.5187106", "text": "public function hasExpired();", "title": "" }, { "docid": "151f2c6d8ea7bd1b7d530341549a4d65", "score": "0.5185966", "text": "private function isRequestInTime(\\Datetime $passwordRequestedAt = null)\n {\n if ($passwordRequestedAt === null)\n {\n return false; \n }\n \n $now = new \\DateTime();\n $interval = $now->getTimestamp() - $passwordRequestedAt->getTimestamp();\n $daySeconds = 60 * 10;//TODO time on 24hours *60*24\n $response = $interval > $daySeconds ? false : $reponse = true;\n return $response;\n }", "title": "" }, { "docid": "47b2b25fdc2637297704e2510ca79547", "score": "0.51852214", "text": "public function it_plan_changes_to_active_status_at_unfreeze_it()\n {\n $plan_user = factory(PlanUser::class)->create();\n\n $remainingPlanDays = today()->diffInDays($plan_user->finish_date);\n\n $postpone = factory(PostponePlan::class)->create([\n 'days' => $remainingPlanDays,\n 'plan_user_id' => $plan_user->id\n ]);\n\n $this->actingAs($this->admin)->delete(\"/postpones/{$postpone->id}\");\n\n $this->assertDatabaseHas('plan_user', [\n 'id' => $plan_user->id,\n 'plan_status_id' => PlanStatus::ACTIVE\n ]);\n }", "title": "" }, { "docid": "bb54e8b34ca60d3a165dcf85b4d48dc1", "score": "0.5184758", "text": "public function active()\n {\n return is_null($this->ends_at) || $this->onGracePeriod();\n }", "title": "" }, { "docid": "a59ef3b2ec6b8f580bdd6fa6fabf9f96", "score": "0.51733816", "text": "public function isExpired()\n {\n $created = new \\DateTime($this->getTimeCreated(), new \\DateTimeZone('UTC'));\n $sinceCreated = $created->diff(new \\DateTime('now', new \\DateTimeZone('America/New_York')));\n\n $minutes = $sinceCreated->days * 24 * 60;\n $minutes += $sinceCreated->h * 60;\n $minutes += $sinceCreated->i;\n\n return $minutes > 30;\n }", "title": "" }, { "docid": "c914b1f8d27712513643e2de1830c91f", "score": "0.51727843", "text": "public function pause_current_user_task()\n {\n //stop the process if this record is the current one\n if ($this->is_current()) return;\n\n $user = user();\n $other_record = $user->records()->where('is_current',true)\n ->where('id','!=',$this->record->id)\n ->first();\n\n if ($other_record) {\n //get last entry of this record\n $last_entry = $this->get_task_last_entry($other_record);\n \n //change only the record is current to false when its current status is pause\n if ($last_entry->entry_type == 'pause') {\n $other_record->is_current = false;\n return $other_record->save();\n }\n\n //creation of the paused entry\n $paused_entry = $other_record->entries()->create([\n 'entry_type' => 'pause',\n 'entry_time' => app_now(),\n ]);\n \n //calculation of interval duration of a task from its previous entry to the paused one\n \n $paused_entry->entry_duration = diffSecond($last_entry->entry_time,$paused_entry->entry_time);\n $paused_entry->save();\n\n $other_record->status = 'pause';\n $other_record->is_current = false;\n $other_record->save();\n }\n }", "title": "" }, { "docid": "d6aa41074f20c4f47ae375f59ca995ed", "score": "0.5170746", "text": "public function has_pickup_lead_time() {\n\n\t\t$lead_time = $this->get_pickup_lead_time();\n\n\t\treturn $lead_time && ! $lead_time->is_null() && (int) $lead_time->get_amount() > 0;\n\t}", "title": "" }, { "docid": "4e644b2b30342a994efe68259f393830", "score": "0.51628375", "text": "public function testTrueIfEndDateLowerThanToday()\n {\n $createCtrl = new CreateController($this->mockContainer());\n\n $this->assertTrue($createCtrl->isEndDateLowerThanToday('2018-11-13'));\n $this->assertTrue($createCtrl->isEndDateLowerThanToday('2018-11-10'));\n $this->assertFalse($createCtrl->isEndDateLowerThanToday('2019-11-10'));\n }", "title": "" } ]
51e3209666be35fe277f8d54c8e00141
Write clover report to specified file.
[ { "docid": "a0130ddc16bc1ee94b28f6b5f0b2434a", "score": "0.57708687", "text": "#[Arg]\n public function setCloverFile(string $cloverFile) {\n $this->exports[$cloverFile]= function() use($cloverFile) {\n $this->coverage->writeClover($cloverFile);\n };\n }", "title": "" } ]
[ { "docid": "77a4255594ce46418035f7935007129b", "score": "0.65103334", "text": "public function outputClover(string $file_name): void\n {\n $this->xml_writer->process($this->coverage, $file_name);\n }", "title": "" }, { "docid": "5331933b17957cc86be1fb1b0678938e", "score": "0.6354586", "text": "public function outputsCloverReportTo(string $output_file): void\n {\n $this->xml_output_file = $output_file;\n }", "title": "" }, { "docid": "e5b1932a97308a042b92983a13ae7756", "score": "0.5481616", "text": "private function writerFile(){}", "title": "" }, { "docid": "62b0ea09349d38133388754ad275c313", "score": "0.53997993", "text": "public function writeTo($path);", "title": "" }, { "docid": "2b7e111ae6b975909c30c12aca784ba7", "score": "0.53862655", "text": "protected function outputReport() {\n $outputFile = $this->getOutputDir() . '/security-report.yml';\n file_put_contents($outputFile, Yaml::dump($this->report, 6, 2));\n $this->report = [];\n }", "title": "" }, { "docid": "fc6dd02f5a3df54cf9731fb357dddcb5", "score": "0.53797144", "text": "public function setOutputFile($file) {\n $this->outputFile = $file;\n }", "title": "" }, { "docid": "cf343eb17125a900835905a19d1a37d2", "score": "0.52967227", "text": "public function write ()\n {\n $filename = $this->filePath . 'hotels-'. time().'.html';\n $fp = fopen($filename, 'w');\n\n $html = $this->buildHtml();\n\n\n try {\n fwrite($fp, $html);\n } catch (\\Exception $e) {\n throw new FileException('Can not save file!.');\n }\n fclose($fp);\n\n return $filename;\n }", "title": "" }, { "docid": "75b116b17788bd8044e8459ab3711441", "score": "0.5293884", "text": "public function saveFile() {\n // contents to the archive\n require_once dirname( __FILE__ ) .\n '/../StaticHtmlOutput/FileWriter.php';\n\n $file_writer = new FileWriter(\n $this->url,\n $this->processed_file,\n $this->file_type,\n $this->content_type\n );\n\n $file_writer->saveFile( $this->archive_dir );\n }", "title": "" }, { "docid": "2dd7607328f4b8a77a8164747b07eb85", "score": "0.5259621", "text": "private function write_file($file, $content) {\n\t\t$f_conn = @fopen ( $file, 'w+' );\n\t\t@fputs ( $f_conn, $content, strlen ( $content ) );\n\t\t@fclose ( $f_conn );\n\t\treturn;\n\t}", "title": "" }, { "docid": "7cd78726928e75699c6d8efb59161113", "score": "0.52385056", "text": "protected function write_file( $file, $data )\n\t{\n\t\tCCJson::write( $file, $data, true );\n\t}", "title": "" }, { "docid": "6c486c982bdfd5267ae7487d913fe374", "score": "0.5207586", "text": "public function write()\n\t{\n\t\t$countSourceFiles = count($this->sourceFiles);\n\t\t$this->fire('source.processing', $countSourceFiles);\n\n\t\t$content = [];\n\t\t$step = 0;\n\t\tforeach ($this->sourceFiles as $sourceFile)\n\t\t{\n\t\t\t$this->fire('source.processing.file', [$sourceFile->getFilename(), ++$step, $countSourceFiles]);\n\n\t\t\t$content[] = $sourceFile->read();\n\t\t}\n\n\t\t$this->fire('source.processed', $countSourceFiles);\n\n\t\tif (! is_dir(dirname($this->getFilename())))\n\t\t\tmkdir(dirname($this->getFilename()), 0777, true);\n\n\t\tfile_put_contents($this->getFilename(), $content);\n\n\t\tif ($this->compression)\n\t\t{\n\t\t\tfile_put_contents($this->getFilename() . '.gz',\n\t\t\t\tgzencode(implode('', $content),\n\t\t\t\t$this->compressionLevel)\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "6a27ba99d2c6daa7bd6a9801e8be9a93", "score": "0.518019", "text": "public function setOutputFile($fileName) {}", "title": "" }, { "docid": "6a27ba99d2c6daa7bd6a9801e8be9a93", "score": "0.518019", "text": "public function setOutputFile($fileName) {}", "title": "" }, { "docid": "6a27ba99d2c6daa7bd6a9801e8be9a93", "score": "0.518019", "text": "public function setOutputFile($fileName) {}", "title": "" }, { "docid": "eb12ea184115aa7ee84cb1c87905606f", "score": "0.5160271", "text": "public function writeReport(Report $report): void\n {\n $count = 0;\n\n $this->output->writeln('');\n $this->output->writeln('<comment>CHECKSTYLE REPORT</comment>');\n\n $styleMap = [\n Issue::SEVERITY_ERROR => 'error',\n Issue::SEVERITY_WARNING => 'comment',\n Issue::SEVERITY_INFO => 'info',\n ];\n\n foreach ($report->getFiles() as $file) {\n $this->output->writeln(\"=> <comment>{$file->getFilename()}</comment>.\");\n foreach ($file->getIssues() as $issue) {\n $count++;\n\n $style = $styleMap[$issue->getSeverity()];\n\n $this->output->writeln(\n sprintf(\n '<comment>%4d <%s>%s</%s></comment>',\n $issue->getLine() ?? 0,\n $style,\n $issue->getMessage(),\n $style\n )\n );\n }\n }\n\n $summary = [];\n\n foreach ($styleMap as $severity => $style) {\n $severityCount = $report->countIssuesBySeverity($severity);\n if ($severityCount > 0) {\n $summary[] = \"<comment>$severityCount</comment> {$severity}s\";\n }\n }\n\n $this->output->writeln(\"\");\n $this->output->writeln('<comment>SUMMARY</comment>');\n $this->output->write(\"<info><comment>$count</comment> issues in total.</info>\");\n\n if ($count > 0) {\n $this->output->writeln(\" (\" . implode(', ', $summary) . \")\");\n }\n }", "title": "" }, { "docid": "2914ded013bdb46406bb8cac6d3d8362", "score": "0.5147748", "text": "function writeFile($file, $text) {\r\n\t\t$fh = fopen($file, 'w') or die(\"can't open file\");\r\n\t\tfwrite($fh, $text);\r\n\t\tfclose($fh);\r\n\t}", "title": "" }, { "docid": "ae5a24bfd33a611069cde5e077a056ea", "score": "0.51454407", "text": "public function saveToFile($filePath)\n {\n $this->adsUtilityRegistry->addUtility(\n AdsUtility::REPORT_DOWNLOADER_FILE\n );\n $this->reportDownloadResultDelegate->saveToFile($filePath);\n }", "title": "" }, { "docid": "4806005e4cee93c38c4b5bb2191e246c", "score": "0.51196176", "text": "protected function writeLog($html)\n {\n $filename = $this->getLogPath() . DIRECTORY_SEPARATOR . $this->logFile;\n file_put_contents($filename, $html);\n }", "title": "" }, { "docid": "0fc562aae7e8ddb72b7963d8f70843fe", "score": "0.51093626", "text": "protected function write_file( $file, $data )\n\t{\n\t\treturn CCFile::write( $file, '<?php return '.var_export( $data, true ).';' );\n\t}", "title": "" }, { "docid": "4971fef0147253b5b531c36b736bf31d", "score": "0.5097689", "text": "public function write()\n {\n $lines = array();\n\n foreach ($this->data as $fetch) {\n $data = array($fetch['url'], $fetch['length'], $fetch['filename']);\n array_push($lines, join(' ', $data) . \"\\n\");\n }\n\n if (count($lines) == 0) {\n if (file_exists($this->fileName)) {\n unlink($this->fileName);\n }\n } else {\n writeFileText($this->fileName, $this->fileEncoding, join('', $lines));\n }\n }", "title": "" }, { "docid": "58351ebceae0db5513f6f9254fad0fc8", "score": "0.5087934", "text": "public function execute($file) {\n $html = $this->fetch($file);\n $fname = substr(uniqid(md5(uniqid(\"\"))), 0, 10) . '.html';\n $fileexp = Manager::home . '/' . Manager::getConf('home.reports') . '/' . $fname;\n $fp = fopen($fileexp, 'x');\n fwrite($fp, $html);\n fclose($fp);\n $fileout = Manager::getActionURL('manager', 'reports:' . $fname);\n Manager::getPage()->window($fileout);\n }", "title": "" }, { "docid": "ec57ff2759d141c78d4fdaeaaceb0308", "score": "0.506553", "text": "function writeFile($out, $fileName){\r\n\t\t\t\t$myfile = fopen($fileName, \"w\") or exit(\"Unable to open file: \" . $fileName);\r\n\t\t\t\tfwrite($myfile, $out);\r\n\t\t\t\tfclose($myfile);\r\n\t\t\t}", "title": "" }, { "docid": "96718f1e55dfb556b7e57cafe2f1b697", "score": "0.50615656", "text": "function file_write($file, $data){\n\t\t$fh = fopen($file, 'w') or die(\"can't open file\");\n\t\tfwrite($fh, $data);\n\t\tfclose($fh);\t\t\n\t}", "title": "" }, { "docid": "058632f78bc1b53f813e18943e9720f7", "score": "0.50564605", "text": "public function toFile($file);", "title": "" }, { "docid": "493eaa201a7140b4b8883356fc6d581e", "score": "0.50420725", "text": "public function writeFile($file, $content): void {\n // Backup the existing file.\n if (is_file($file)) {\n $this->backupFile($file);\n }\n\n // Dump the file.\n $this->filesystem->dumpFile($file, $content);\n\n // Add it to the list of written files.\n $file = (string) $this->filesystem->readlink($file, TRUE);\n $this->writtenFiles[] = $file;\n }", "title": "" }, { "docid": "4678e73b862cfaa526f307ce5d87330d", "score": "0.50303084", "text": "public function writeFile($file, $content)\n {\n $dirName = $this->file->dirname($file);\n if (!$this->file->fileExists($dirName)) {\n $this->file->mkdir($dirName, 0750, true);\n }\n\n $this->file->write($file, $content);\n }", "title": "" }, { "docid": "450b24e484e11c75dedb98f20818047d", "score": "0.5025441", "text": "public function _toFile($file = null) {\n $file = $file ?: sys_get_temp_dir() . '/belt_trace.log';\n $this->options['printer'] = 'file://'.$file;\n return $this;\n }", "title": "" }, { "docid": "ca56bf49b4629b38c25f454cf93cb5f6", "score": "0.50145423", "text": "public function outputFile(string $filename)\n {\n $this->output($filename);\n }", "title": "" }, { "docid": "fa6cef413edf76087c4616b64ed2aa59", "score": "0.5008652", "text": "public function writeToFile($file) {\n if (!file_put_contents($file, $this->build(), FILE_TEXT)) {\n throw new FrameEx(\"Unable to write CSV file to: \".$file);\n }\n }", "title": "" }, { "docid": "80816681235943249bdd30bd33d09435", "score": "0.5007368", "text": "public function write($filename, $content);", "title": "" }, { "docid": "d48fcb8319d185175049335cd03224c8", "score": "0.49781528", "text": "public function write(\\SplFileObject $file, \\de\\codenamephp\\platform\\core\\file\\property\\Entries $propertyFile);", "title": "" }, { "docid": "dccb72ef470b071dd766252655c95cef", "score": "0.49722254", "text": "private function saveToFile() {\n\t\tif(!isset($this->minified_data)) {\n\t\t\tthrow new MinifyException('There is no data to write to \"'.$this->target.'\"', 300);\n\t\t}\n\t\tif(($handler = @fopen($this->target, 'w')) === false) {\n\t\t\tthrow new MinifyException('Can\\'t open \"' . $this->target . '\" for writing.', 301);\n\t\t}\n\t\tif(!fwrite($handler, $this->minified_data)) {\n\t\t\tthrow new MinifyException('The file \"' . $path . '\" could not be written to. Check if PHP has enough permissions.', 303);\n\t\t}\n\t\tif($this->source_method == 'file') {\n\t\t\t$minify_mtime = filemtime($this->target);\n\t\t\tif($minify_mtime) {\n\t\t\t\t@touch($this->source, $minify_mtime - 1); // Make sure to touch the source file to avoid filemtime issues\n\t\t\t}\n\t\t}\n\t\tfclose($handler);\n\t}", "title": "" }, { "docid": "0cc3caec25b77b7159fa12ed3c51ae06", "score": "0.4962905", "text": "function reportToFile($message)\n{\n file_put_contents(\"Jdebug.txt\", $message . \"\\n\", FILE_APPEND);\n}", "title": "" }, { "docid": "de9100d7875606fae1bbe1e140197cd5", "score": "0.4942354", "text": "public function writeCardFile(){\n\t\tif (!isset($this->output)){\n\t\t\t$this->generateCardOutput();\n\t\t}\n\t\t\n\t\t$handle = fopen($this->download_dir . '/' . $this->card_filename, 'w');\n\t\tfputs($handle, $this->output);\n\t\tfclose($handle);\n\t\t\n\t\t$this->deleteOldFiles(30);\n\t\t\n\t\tif (isset($handle)) {\n\t\t\tunset($handle);\n\t\t}\n\t}", "title": "" }, { "docid": "ca190af3c5a8020f6784173e53ee84ec", "score": "0.49319124", "text": "public function addToSpeedTestFile($file)\n\t{\n\t\texec(\"echo {$file} >> {$this->ALL_TESTS_FILE}\");\n\t}", "title": "" }, { "docid": "9ddf2359b3897b39fcfcaf2824dc255a", "score": "0.49269176", "text": "private function writeFile($err)\n {\n if(LOGS === \"ON\")\n {\n $filename = ENGINE_PATH.\"logs/log.txt\";\n $today = date(\"F j, Y, l, H:i:s\"); \n $fh = fopen($filename, 'a+') or die(\"Can't open file\");\n fwrite($fh, \"Date: \" .$today .\"\\n\");\n fwrite($fh, \"Php Version: \" .PHP_VERSION .\"\\n\");\n fwrite($fh, \"Mensage: \" .$err->getMessage() .\"\\n\");\n fwrite($fh, \"Code: \" .strval($err->getCode()) .\"\\n\");\n fwrite($fh, \"File: \" .$err->getFile() .\"\\n\");\n fwrite($fh, \"Line: \" .strval($err->getLine()) .\"\\n\");\n fwrite($fh, \"Trace: \\n\" .$err->getTraceAsString() .\"\\n\\n\");\n fwrite($fh, \"------------------------------------------------------------------------\\n\\n\");\n fclose($fh);\n\n clearstatcache(); \n }\n }", "title": "" }, { "docid": "36c447c442309035e324d1c3bf8889ee", "score": "0.49183574", "text": "function writeFile( CodeGenTable $tb ) {\n $strFilename = $this->_strPath . $tb->_strNamePhp . \".php\";\n $fh = fopen( $strFilename, 'w' );\n if ( $fh ) {\n fwrite( $fh, $this->code );\n fclose( $fh );\n echo \"$strFilename created<br/>\";\n \n } else echo \"CAN NOT WRITE $strFilename\";\n }", "title": "" }, { "docid": "acb0ef6aadcbcff206e87ca019286910", "score": "0.49180686", "text": "public function write_file( $output_file, $include_header=1 ) {\r\n\r\n\t\t$this->handle_output = fopen( $output_file, \"w\");\r\n\r\n\t\t// Writes column header in 1st row.\r\n\t\tif ( $include_header ) {\r\n\t\t\t$this->write_header();\r\n\t\t}\r\n\t\t\r\n\t\t// Write Taxa tree and records to Output File\r\n\t\t$this->write_tree( $this->tree );\r\n\t\t$this->write_records( $this->tree_index+1 );\r\n\t\r\n\t\tfclose($this->handle_output);\r\n\t\r\n\t}", "title": "" }, { "docid": "e1916bd8285a666f304e14eed0b040d8", "score": "0.49163622", "text": "public function write($data, $file)\n {\n $timestamp = date('Y-m-d H:i:s');\n $data = \"[$timestamp]\" . $data;\n\n if(!file_exists($file)) {\n touch($file);\n }\n\n // if filesize more than 5 Mb rotate it\n if ($this->rotate && filesize($file) > 5242880) {\n $this->rotate($file);\n }\n\n error_log($data, 3, $file);\n\n if ($this->push) {\n $this->push($data);\n }\n }", "title": "" }, { "docid": "d1f9df4af1b8dcdb3b055698e6c040fd", "score": "0.49118116", "text": "public function export(File $file);", "title": "" }, { "docid": "5cc9d6cd488d1e0e47b594bfa5ed8bb2", "score": "0.49061745", "text": "private function writeFile($file, $content)\n {\n return file_put_contents($file, $content . \"\\n\", FILE_APPEND);\n }", "title": "" }, { "docid": "67f253f44b2e7abe20e113403726ca8c", "score": "0.48934105", "text": "Function createFileLog($pFileName,$ctn){\n $newFile = fopen($pFileName, 'w');\n fwrite($newFile, $ctn);\n fclose($newFile); \n }", "title": "" }, { "docid": "fd065bae83cca4598544f81b834a3b27", "score": "0.48878157", "text": "public function write( $file, $data )\n\t{\n\t\t// check for absolut path\n\t\tif ( substr( $file, 0, 1 ) == '/' ) \n\t\t{\n\t\t\treturn $this->write_file( $file, $data );\n\t\t}\n\t\t\n\t\t$this->write_file( $this->path( $file ), $data );\n\t}", "title": "" }, { "docid": "acf3a44e42320a656a79b7d5ac39a6f6", "score": "0.48796242", "text": "public function writeFile($content, OutputInterface $out = null) {\n\t\t$this->write($this->resolveFilePath(), $content);\n\n\t\tif (isset($out)) {\n\t\t\t$out->writeln('<fg=green>[✓]</> create ' . Application::paths()->getRelative($this->getFilePath()));\n\t\t}\n\t}", "title": "" }, { "docid": "29d61af505395aae4c079f6e05abbbb3", "score": "0.4878076", "text": "public function writeToFile($filename, $contents)\n {\n file_put_contents($filename, $contents);\n }", "title": "" }, { "docid": "0e4ba23b491328ae3d0d0fd257cabb52", "score": "0.48637924", "text": "public function writeFile(){\n fwrite($this->fp, $this->saida);\n }", "title": "" }, { "docid": "4a82e3d346e2f90d71177cf92d86b8a5", "score": "0.4849076", "text": "protected function writeToFile($filename, $content, $page) {\n\t\t$content =\n\t\t\t'# Extracted on ' . date('Y-m-d', $GLOBALS['EXEC_TIME']) . LF .\n\t\t\t'# was on page: [' . $page['uid'] . '] ' . $page['title'] . LF . LF . $content;\n\n\t\ttry {\n\t\t\tfile_put_contents($this->path . $filename, $content);\n\n\t\t\tt3lib_div::fixPermissions($this->path . $filename);\n\t\t} catch (Exception $e) {\n\t\t}\n\t}", "title": "" }, { "docid": "1862468a4c3504bc2570d8b7347cac81", "score": "0.48328012", "text": "private function recordOutput($file)\n {\n Logger::logDatabaseActivity($file, $this->output);\n }", "title": "" }, { "docid": "60da3819455b74214b950985660dbac4", "score": "0.48326224", "text": "private function _verifyLogFile($file){\r\n try {\r\n $f = @fopen(_PS_ROOT_DIR_.$file, \"a\");\r\n fclose($f);\r\n }\r\n catch (Exception $e){\r\n die($e->getMessage());\r\n }\r\n }", "title": "" }, { "docid": "4e3b81c1d39592b6bad267933bc1f76f", "score": "0.4831259", "text": "public function setOutputFile($outputFile);", "title": "" }, { "docid": "d35185566681b0dcd6ba84cb98c2ede5", "score": "0.4826542", "text": "public function write($outputFile)\n {\n $this->image->write($outputFile);\n }", "title": "" }, { "docid": "5fb3d6cb12391a4442f91e448040242b", "score": "0.48235446", "text": "public function writeFile($fileName,$content)\n {\n $file = 'resources/logs/'.$fileName; //file path\n $file = fopen($file, \"w\"); //open file\n $status = fwrite($file, $content); //write to the file\n fclose($file);\n }", "title": "" }, { "docid": "22d06baa8d5e95616253f7eb9c0940e5", "score": "0.4821969", "text": "public static function atkWriteToFile($text, $file = '')\n {\n $fp = @fopen($file, 'a');\n if ($fp) {\n fwrite($fp, $text . \"\\n\");\n fclose($fp);\n }\n }", "title": "" }, { "docid": "c2c15736118f722e41cf2f8b324b9f81", "score": "0.48184603", "text": "public static function WriteFile($dir,$file,$content)\r\n\t\t{\r\n\t\t\tif (!is_dir($dir)) {\r\n\t\t\t\t@mkdir($dir, 0755, true);\r\n\t\t\t}\r\n\t\t\t$fh = fopen($file, 'w') or die(\"can't open file\");\r\n\t\t\tfwrite($fh, $content);\r\n\t\t\t//echo \"<!-- \" . $file .\" written -->\";\r\n\t\t\tfclose($fh);\r\n\t\t}", "title": "" }, { "docid": "c11f86c173b84cfe28e9db3056e3453c", "score": "0.48080042", "text": "private function _verifyLogFile($file)\n\t{\n\n\t\ttry\n\t\t{\n\t\t\t$f = fopen($file, \"a\");\n\t\t\tfclose($f);\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\tdie($e);\n\t\t}\n\t}", "title": "" }, { "docid": "5589d1ab9680774fa723ff33dd1d4161", "score": "0.48011976", "text": "public function setOutput($filename)\n {\n curl_setopt($this->curl, CURLOPT_FILE, fopen($filename, 'w+'));\n }", "title": "" }, { "docid": "b47e39d298550fd136d7ab7231431cbf", "score": "0.47989482", "text": "public function write($object, $file_name){}", "title": "" }, { "docid": "061e098180c7ae73494839c5ff3bdfe3", "score": "0.47905833", "text": "private function writeFile() {\n date_default_timezone_set('America/Toronto');\n $this->date = date('m/d/Y h:i:s a', time());\n\n $this->txt = $this->date . \"\\t\" . $this->name . \"\\t\" . $this->team . \"\\t\" . $this->question . \"\\t\" . $this->answer;\n\n $myfile = fopen(\"responses.txt\", \"a\") or die(\"Unable to open file!\");\n fwrite($myfile, \"\\n\". $this->txt);\n fclose($myfile);\n\n $this->response_status = 1;\n $this->response_html = '<p>Thank You! We have received your entry!</p>';\n }", "title": "" }, { "docid": "205e5986f0253e842ccb9c31bcb89c4f", "score": "0.4789081", "text": "function FileWriter() {\r\n\t}", "title": "" }, { "docid": "3da99167ed26f396145bed252a523f12", "score": "0.47634363", "text": "private function writeHashFile(array $file) {\n\t\t\\Yii::trace(\"Writing empty hash file \" . $file['pathname'], __METHOD__);\n\t\t$targetPath = $this->hashFilesPath . DS . md5($file['filename'] . $file['timestamp']);\n\n\t\tif (file_exists($targetPath) && is_file($targetPath)) {\n\t\t\treturn;\n\t\t}\n\n\t\t//protector from double directory scanning\n\t\t$this->hashFilesList[] = md5($file['filename'] . $file['timestamp']);\n\t\t$handle = fopen($targetPath, 'w');\n\t\tfwrite($handle, \"\\x0\");\n\t\tfclose($handle);\n\n\t\tunset($targetPath);\n\t}", "title": "" }, { "docid": "cd4583d58a2e984a8ad8b7714f28e6de", "score": "0.475536", "text": "function save_log($file)\n\t{\n\t\tif (!empty($file))\n\t\t{\n\t\t\tif (file_exists($file))\n\t\t\t{\n\t\t\t\tif ($fp = @fopen($file, 'a'))\n\t\t\t\t{\n\t\t\t\t\t$this->set_error(0002, 'Impossible to write to the payment log file', false);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tfclose($fp);\n\t\t\t\t\t$this->file_log = $file;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$fp = @fopen($file, 'w');\n\t\t\t\t@fwrite($fp, 'paymentgateway log');\n\t\t\t\t@fclose($fp);\n\t\t\t}\n\t\t\tif (!file_exists($file))\n\t\t\t{\n\t\t\t\t$this->set_error(0001, 'Impossible to create the payment log file', false);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->file_log = $file;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->file_log = '';\n\t\t}\n\t}", "title": "" }, { "docid": "e16b9e1dc724c2124b0c30edc7153161", "score": "0.47468972", "text": "function writeChangelog() \n {\n $file = new CodeGen_Tools_Outbuf($this->dirpath.\"/ChangeLog\");\n?>\nThis is a source project generated by <?php echo get_class($this) . \" \" . $this->version(); ?>\n\n...\n<?php\n\n $file->write();\n }", "title": "" }, { "docid": "222de2ac3d2e140181fc7a87922982ec", "score": "0.47421288", "text": "function generateReport($filePath) {\r\n\techo $filePath.\"=================\";\r\n}", "title": "" }, { "docid": "86d5e00adc968cfb683df41819e56db9", "score": "0.4737331", "text": "function logRollover( string $file ) {\n\t// Nothing to rollover\n\tif ( !file_exists( $file ) ) {\n\t\treturn;\n\t}\n\t\n\t$fs\t= \\filesize( $file );\n\tif ( false === $fs ) {\n\t\treturn;\n\t}\n\t\n\t$cf\t= config( 'max_log_size', \\MAX_LOG_SIZE, 'int' );\n\tif ( $fs > $cf ) {\n\t\tbackupFile( $file, false, 'log', 0 );\n\t}\n}", "title": "" }, { "docid": "e64481bb75305991d2d441cbe8dbd08e", "score": "0.4728689", "text": "private function verifyLogFile($file)\n {\n try {\n $f = @fopen(_PS_ROOT_DIR_ . $file, 'a');\n fclose($f);\n } catch (Exception $e) {\n die($e->getMessage());\n }\n }", "title": "" }, { "docid": "467abb3699b5ef0b0b6d94680d5d40cb", "score": "0.4724352", "text": "function writeFile($filePath, $data);", "title": "" }, { "docid": "f7e6883ebc76782fadb9639b1f46aac4", "score": "0.47230166", "text": "public function saveChangesToSourceFile() {\n\t\t$fp = fopen($_SERVER['DOCUMENT_ROOT'].$this->file, 'w');\n\t\tfwrite($fp, json_encode($this->catalog->getCatalog()));\n\t\tfclose($fp);\n\t}", "title": "" }, { "docid": "2e5074696e4dfb5120f3828be0af5e58", "score": "0.4717421", "text": "private function writeToFile($message)\n {\n $this->directory->writeFile($this->logFile, $message . \"\\r\\n\", 'a+');\n }", "title": "" }, { "docid": "0ac14225c5bdcef64bb4f36529387d8e", "score": "0.47125983", "text": "public function createLog()\n {\n $xmlFilePathForWrite = __DIR__ . '/../Resources/views/Api/report.xml.twig';\n\n $this->checkFileExist($xmlFilePathForWrite);\n $user = $this->database->getUserForXmlReport();\n $this->writeToFile($user, $xmlFilePathForWrite);\n\n }", "title": "" }, { "docid": "905534ed7f92d59a99b68981254f1293", "score": "0.46868825", "text": "public function updateFile($file) {\n $tasks = $this->getAllTasks();\n $n = count($tasks);\n $this->log->info(\"Write $n tasks to output file\");\n $file->write($tasks);\n $this->lastUpdate = time();\n }", "title": "" }, { "docid": "b2e69c403161f5a3031e73e481436bcc", "score": "0.46714073", "text": "protected function fileWrite($fp, array $pagesInfo)\n {\n $tableBody = HTMLHelper::generateTable($pagesInfo);\n\n if(empty($tableBody)){\n throw new \\Exception('Table body empty');\n }\n\n fwrite($fp, HTMLHelper::createPageHTML($tableBody));\n\n if (!$fp)\n throw new \\Exception(\"File can`t write\");\n }", "title": "" }, { "docid": "eb116dae7208adef270fc56d083b1574", "score": "0.46684608", "text": "function create_log_file()\n\t{\n\t\t$file = $this->log_file;\n\t\t//logData('create_log=>'.$file);\n\t\t$data = $this->log;\n\t\t$fo = fopen($file,\"a\");\n\t\tif($fo)\n\t\t{\n\t\t\tfwrite($fo,$data);\n\t\t}\n\t\tfclose($fo);\n\t}", "title": "" }, { "docid": "eb49c180467f14486c3455c318964122", "score": "0.46629012", "text": "protected function write($log) {\n\t\n\t\tif ($this->file && ($fp = @fopen($this->file, 'a'))) {\n\t\t\tfwrite($fp, $log.\"\\n\");\n\t\t\tfclose($fp);\n\t\t}\n\t}", "title": "" }, { "docid": "aa0df9ba895b7985d4dc9eb15dffc1cc", "score": "0.46568447", "text": "public function writeToFile($filename, $contents) {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Action('writeToFile', func_get_args()));\n }", "title": "" }, { "docid": "90088f3ecb84a4dedf28af3eacf1d4c2", "score": "0.46538934", "text": "public function output(string $file_name): void\n {\n if (is_null($this->template)) {\n throw new Exception('template is not exist.');\n }\n file_put_contents($file_name, $this->template);\n readfile($file_name);\n }", "title": "" }, { "docid": "1a52da4826c2d2f9ab677780fc4c6ef6", "score": "0.46536034", "text": "public function writeToFile( $file, $contents, $args = [] ) {\n\t\t$args = array_merge( [\n\t\t\t'relative' => true,\n\t\t\t'failExit' => true,\n\t\t\t'flags' => 0,\n\t\t], $args );\n\n\t\tif ( $args['relative'] ) {\n\t\t\t$file = $this->wd . '/' . $file;\n\t\t}\n\n\t\tif ( ! $this->isSilent() ) {\n\t\t\techo $file .' $contents: ';\n\t\t\tprint_r( $contents );\n\t\t\techo \"\\n--------------------\\n\\n\";\n\t\t}\n\n\t\t$results = file_put_contents( $file, $contents, $args['flags'] );\n\n\t\tif ( ! $this->isSilent() ) {\n\t\t\techo $file .' $results: ';\n\t\t\tprint_r( $results );\n\t\t\techo \"\\n--------------------\\n\\n\";\n\n\t\t\tif ( empty( $results ) && ! empty( $contents ) ) {\n\t\t\t\t$this->msg( sprintf( 'Failed to write to file (%s). ABORTING', $file ), 'red' );\n\t\t\t\tif ( $args['failExit'] ) {\n\t\t\t\t\texit( 1 );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $results;\n\t}", "title": "" }, { "docid": "43eb42ce0849d40462b9f37d59605e37", "score": "0.46498787", "text": "public function writeToFile($filename, $contents) {\n return $this->scenario->runStep(new \\Codeception\\Step\\Action('writeToFile', func_get_args()));\n }", "title": "" }, { "docid": "f566cc17a7f2c34fe7cd6ec4a6fbd684", "score": "0.4647888", "text": "function write_error_to_file($error,$file_name){\n\t\tglobal $error_dir;\n\t\t$file_path = $error_dir.$file_name;\n\t\tfile_put_contents($file_path, $error,FILE_APPEND);\n\t}", "title": "" }, { "docid": "e8db1fe0d539f46a01b96838b6c026da", "score": "0.46456802", "text": "protected function _write($event)\n {\n $line = $this->_formatter->format($event);\n $f = @fopen($this->_file, 'a');\n if ($f === false) {\n FaZend_Exception::raise(\n 'FaZend_Log_Writer_File_Exception',\n \"Failed to fopen('{$this->_file}', 'a+')\"\n );\n }\n if (@fwrite($f, $line) === false) {\n FaZend_Exception::raise(\n 'FaZend_Log_Writer_File_Exception',\n \"Failed to fwrite('{$this->_file}', '{$line}')\"\n );\n }\n if (@fclose($f) === false) {\n FaZend_Exception::raise(\n 'FaZend_Log_Writer_File_Exception',\n \"Failed to fclose('{$this->_file}')\"\n );\n }\n }", "title": "" }, { "docid": "d319a174d821d684499ce425e5cf1ca5", "score": "0.4643486", "text": "public function writeToFile($file)\n {\n if (is_string($file)) {\n return file_put_contents($file, $this->generate());\n }\n else if (is_resource($file) && get_resource_type($file) === 'file') {\n return fwrite($file, $this->generate());\n }\n\n throw new BadMethodCallException('Argument file must be a filename or opened file handle.');\n }", "title": "" }, { "docid": "bf2b784fe27523b6fe3446923c673a2d", "score": "0.4642801", "text": "public function write(\\Royalcms\\Component\\DirectoryHasher\\Result $result, $file);", "title": "" }, { "docid": "3e34b71548e91a5d01b90edfc02e6699", "score": "0.4635474", "text": "public function writeContentToFile($file, $content) {\n $root = getcwd();\n if(is_int(strpos($file, $root))){\n $dir = $file;\n } else {\n $dir = $root.DS.'OUTPUT'.DS.$file;\n }\n $dirName = dirname($dir);\n if (!is_dir($dirName)) {\n mkdir($dirName, 0777, true);\n }\n $handle = fopen($dir, 'w');\n $res = fputs($handle, $content);\n fclose($handle);\n return $res;\n }", "title": "" }, { "docid": "b4d1f5598acd0bd8d02210352920be83", "score": "0.4625521", "text": "function save($fileName)\n\t{\n\t\t$this->stream = new FileWriter($fileName);\n\t\t$this->compile();\n\t\t$this->stream->dispose();\n\t}", "title": "" }, { "docid": "b82558230f1177dd0a5b3dcfe7cf16b6", "score": "0.46194077", "text": "public function write(string $filename, string $content): void;", "title": "" }, { "docid": "972954d70e38f2f82412110ae7c76fd8", "score": "0.46116632", "text": "public function save($data, $file)\r\n\t{\r\n\t\tif (file_put_contents($file, $this->getAdapter($file)->dump($data)) === FALSE) {\r\n\t\t\tthrow new Nette\\IOException(\"Cannot write file '$file'.\");\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "bfee744f5cac88031a66af19042abd7a", "score": "0.46089894", "text": "function cl_export_to_file_by_date($file_name, $table, $cl_id, $begin_date, $end_date)\n{\n\t$tmp_filename = tempnam('.', '');\n\t$tmp_handle = fopen($tmp_filename, 'wb');\n\n\t// create data file\n\texec(\"echo -n > $file_name\");\n\n\t// read data one date at a time so we don't exceed memory limit\n\tfor ($i = $begin_date; $i <= $end_date; $i = date(util::DATE, strtotime(\"$i +1 day\")))\n\t{\n\t\t$data = db::select(\"select * from $table where client=$cl_id && data_date='$i'\");\n\n\t\t$data_out = '';\n\t\tforeach ($data as $d) $data_out .= implode(\"\\t\", $d).\"\\n\";\n\n\t\t// write to tmp file and concatenate to standardized report\n\t\tftruncate($tmp_handle, 0);\n\t\tfseek($tmp_handle, 0);\n\t\tfwrite($tmp_handle, $data_out);\n\t\texec('cat '.$tmp_filename.' >> '.$file_name);\n\t}\n\tunlink($tmp_filename);\n\n\t// add newline to end of report\n\texec('echo >> '.$file_name);\n}", "title": "" }, { "docid": "e80a45b6edc731475e338e243ef2593a", "score": "0.46055737", "text": "public function writeFile(string $path): void;", "title": "" }, { "docid": "6524310f0a6e0368a0cb6343a92c1bf8", "score": "0.46050858", "text": "public static function writeFile ($file, $content)\n {\n $path = dirname($file);\n if (!is_writable($path)\n ) {\n if (!mkdir($path, 0777, true)\n ) {\n trigger_error('Can\\t create or write to directory: '.$path, E_USER_ERROR);\n return false;\n };\n }\n \n if ($handle = fopen($file, 'w')\n ) {\n if (fwrite($handle, $content) === false\n ) {\n trigger_error('Can\\'t write to file: '.$file, E_USER_ERROR);\n return;\n }\n fclose($handle);\n }\n else \n {\n trigger_error('Can\\'t create or open file: '.$file, E_USER_ERROR);\n }\n }", "title": "" }, { "docid": "1cd68b75306ae7e7038912a01cad976b", "score": "0.45990932", "text": "public function write($file, $data) {\n\t\t\tif (!$this->sts)\n\t\t\t\treturn file_put_contents($file, $data);\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "832f2d819efa6d5f8abddb16c46ed5c0", "score": "0.4593129", "text": "private function _saveOutputToFile(mixed $output, string $file): void\n {\n\n $dir = rtrim(str_replace(basename($file), '', $file), '/');\n\n if (!is_dir($dir)) {\n mkdir($dir, 0755, true);\n }\n\n $save = file_put_contents($file, $output, FILE_APPEND);\n\n if (false === $save) {\n\n throw new FilesystemException('Unable to save output to file (' . $file . ')');\n\n }\n\n chmod($file, 0664);\n\n }", "title": "" }, { "docid": "90097f36dcd6f5dafe6bae03c7fbd9b1", "score": "0.4581549", "text": "public function output( int $quality = 60, string $filename = null );", "title": "" }, { "docid": "7551d0cfbbdee7a301e33e5a1e1e86c4", "score": "0.45808578", "text": "function _writeFile($fClass, $fName) {\r\n\t // if the directory does not exists then\r\n\t // create it\r\n\t if(!is_dir($this->__generatedClassPath)) {\r\n\t \t // create the directory\r\n\t mkdir($this->__generatedClassPath);\r\n\t }\t\r\n\t\t\r\n\t error_log(__FILE__.':'.__LINE__.\" $fName\");\r\n\t if (!$handle = fopen($fName, 'w')) {\r\n\t echo \"Cannot open file ($fName)\";\r\n\t exit;\r\n\t }\r\n\t \r\n\t // Write $somecontent to our opened file.\r\n\t if (fwrite($handle, $fClass) === FALSE) {\r\n\t echo \"Cannot write to file ($fName)\";\r\n\t exit;\r\n\t }\r\n\t fclose($handle);\r\n\t \r\n\t \r\n\t}", "title": "" }, { "docid": "fc24a0a94dcecc355c42928c2dbeebc1", "score": "0.45723346", "text": "Function createFileLogAdd($pFileName,$ctn){\n $newFile = fopen($pFileName, 'a');\n fwrite($newFile, $ctn);\n fclose($newFile); \n }", "title": "" }, { "docid": "ec2b088dae00b7e0cb305f882f1187f1", "score": "0.45695016", "text": "public function writeToFile(string $filePath, string $content): void;", "title": "" }, { "docid": "d003afe3f868e3ab013f194331bde4cf", "score": "0.45687014", "text": "function crearArchivoDetalleLiquidacion() {\n\t\t\t$fp = fopen(\"../DetalleLiquidacion/ReporteDetalleLiquidacion.html\", \"w+\");\n\t\t\t$encabezado = \"<html> <head> <title> Reporte errores Facturacion.DetalleLiquidacion </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}", "title": "" }, { "docid": "4b78d75fdc40509cef32b51acf30da5c", "score": "0.45654035", "text": "public function writeToPluginFile($file, $data) {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Action('writeToPluginFile', func_get_args()));\n }", "title": "" }, { "docid": "05acfce502e0fa3e55a7de3652cd9860", "score": "0.45565265", "text": "protected function saveFile($file, $content)\n {\n if (!$this->settings['replace-existing-file'] && is_file($file)) {\n throw new FileAlreadyExistsException('File \"' . $file . '\" already exists');\n }\n\n $fh = @fopen($file, 'w');\n if (!$fh) {\n throw new IOException('File \"' . $file . '\" unable to create or open for writing');\n }\n $content = @fwrite($fh, $content);\n @fclose($fh);\n }", "title": "" }, { "docid": "dcae8528d3123c3a3714448857d89155", "score": "0.45530778", "text": "public function output(string $path): void;", "title": "" }, { "docid": "8ddae22e4f6a397001134f55832a5fae", "score": "0.45524216", "text": "private function tcpdfOutput( $destPath )\n {\n\n $this->tcpdf->Output( $destPath, 'F' );\n\n// DIE : PDF could not written\n if ( !file_exists( $destPath ) )\n {\n $prompt = $destPath . ' could not written!<br />\n ' . __METHOD__ . ' (' . __LINE__ . ')';\n die( $prompt );\n }\n// DIE : PDF could not written\n// DRS\n if ( file_exists( $destPath ) )\n {\n if ( $this->pObj->drsUserfunc )\n {\n $prompt = $destPath . ' is written.';\n t3lib_div::devlog( '[INFO/USERFUNC] ' . $prompt, $this->extKey, 0 );\n }\n }\n// DRS\n }", "title": "" }, { "docid": "5b0b5cfba6f30f99affceb76ada8b07f", "score": "0.45470053", "text": "public function setOutputFile($file)\n {\n if (!is_writable(dirname($file))) {\n throw new NotWritableException(sprintf('Output file is not writeable by PhantomJs: %s', $file));\n }\n\n $this->outputFile = $file;\n\n return $this;\n }", "title": "" } ]
8fca4883df93a8028568f96c02cc252d
This method calculates the difference between start and end date and decide the group The group is based on const values of weekly, daily, monthly groups
[ { "docid": "df5a595b0c64f9e28c2f1d1fa00f4a06", "score": "0.53336394", "text": "public function getGroupByDateRange(string $startDate, string $endDate): ?string\n {\n try{\n $rangeStartDate = new DateTimeImmutable($startDate);\n }\n catch (\\Exception $e){\n return null;\n }\n \n try{\n $rangeEndDate = new DateTimeImmutable($endDate);\n } catch (\\Exception $e){\n return null;\n }\n\n $daysRange = $rangeStartDate->diff($rangeEndDate)->days;\n\n if($daysRange <= self::DAILY) { return 'DAY'; }\n if($daysRange <= self::WEEKLY) { return 'WEEK'; }\n if($daysRange > self::WEEKLY) { return 'MONTH'; }\n }", "title": "" } ]
[ { "docid": "d760926078b183806e40bbc51a2e59fc", "score": "0.62908685", "text": "public function getHoursByGroupBetween($group, $start, $end) {\n //Default days to show is 6\n $days = 6;\n\n //If the user has specified a specific number of days to show\n if(Input::get('days')) {\n $days = intval(Input::get('days')) - 1;\n }\n\n $groupName = Helpers::getGroupNameFromTruncated($group);\n\n $ranges = Helpers::generateDateRange(Carbon::createFromFormat('Y-m-d', Carbon::now()->subHour(5)->subDays($days)->format('Y-m-d')),\n Carbon::createFromFormat('Y-m-d', Carbon::now()->subHour(5)->format('Y-m-d')));\n\n $data = [];\n\n if($group == \"ADMIN\" || $group == \"JRCS\") {\n foreach($ranges as $range) {\n $result = Cico::where('check_in_date', '>=', $range)\n ->where('check_out_date', '<=', $range)\n ->sum('minutes_volunteered');\n\n array_push($data, intval($result));\n }\n } else {\n\n foreach($ranges as $range) {\n $result = Cico::where($groupName, 1)\n ->where('check_in_date', '>=', $range)\n ->where('check_out_date', '<=', $range)\n ->sum('minutes_volunteered');\n\n array_push($data, intval($result));\n }\n }\n\n return ['group' => $group, $data, $ranges];\n }", "title": "" }, { "docid": "248e4922257a33f3d82b16be2976eaf5", "score": "0.60211915", "text": "function mfcs_get_request_group_dates_date($form, &$form_state, &$fields, &$request_state, $ps) {\n $values = array(0 => NULL);\n if (!empty($request_state['dates']['date'])) {\n $values = $request_state['dates']['date'];\n }\n\n if ($form['form']['step']['#value'] == 'standard' && array_key_exists('dates', $form['form']['sections']['#value'])) {\n $fields['dates']['group_dates'] = array(\n '#id' => 'group-request-dates-date',\n '#type' => 'container',\n '#attributes' => array(\n 'class' => array(\n 'form-item-wrapper',\n 'group-request-item',\n 'group-request-item-dates-date',\n ),\n ),\n );\n\n $first_key = TRUE;\n\n $options_string = NULL;\n $options = mfcs_get_dates_category_list_options(NULL);\n while (!empty($options)) {\n $option_name = array_shift($options);\n\n if (is_null($options_string)) {\n $options_string = '';\n }\n elseif (empty($options)) {\n $options_string .= ', and ';\n }\n else {\n $options_string .= ', ';\n }\n\n $options_string .= '\"<strong>' . $option_name . '</strong>\"';\n }\n\n foreach ($values as $key => $value) {\n $fields['dates']['group_dates'][$key] = array(\n '#type' => 'container',\n '#attributes' => array(\n 'class' => array(\n 'group-field-container',\n 'group-field-container-' . $key,\n ),\n ),\n );\n\n $new_ps = $ps . '[group_dates][' . $key . ']';\n\n mfcs_get_request_field_dates_date($form, $form_state, $fields['dates']['group_dates'][$key], $request_state, $new_ps, $key);\n mfcs_get_request_field_dates_time_start($form, $form_state, $fields['dates']['group_dates'][$key], $request_state, $new_ps, $key);\n mfcs_get_request_field_dates_time_stop($form, $form_state, $fields['dates']['group_dates'][$key], $request_state, $new_ps, $key);\n mfcs_get_request_field_dates_category($form, $form_state, $fields['dates']['group_dates'][$key], $request_state, $new_ps, $key);\n\n if ($first_key || isset($request_state['dates']['date-cancelled'][$key]) && $request_state['dates']['date-cancelled'][$key] === TRUE) {\n $fields['dates']['group_dates'][$key]['date_container'] = array(\n '#type' => 'container',\n '#attributes' => array(\n 'class' => array(\n 'date_container',\n 'date_container-' . $key,\n ),\n ),\n );\n\n $fields['dates']['group_dates'][$key]['date_container']['note'] = array(\n '#type' => 'markup',\n '#markup' => '',\n '#weight' => 100,\n );\n\n if ($first_key) {\n $fields['dates']['group_dates'][$key]['date_container']['note']['#markup'] .= '<div id=\"mfcs-markup-request-dates-date_note\" class=\"markup-request\">';\n $fields['dates']['group_dates'][$key]['date_container']['note']['#markup'] .= 'Please give separate times for ' . $options_string . '.<br>';\n $fields['dates']['group_dates'][$key]['date_container']['note']['#markup'] .= '<br>';\n $fields['dates']['group_dates'][$key]['date_container']['note']['#markup'] .= 'Providing a true breakdown may keep you from being overcharged by MSU PD for security fees.<br>';\n $fields['dates']['group_dates'][$key]['date_container']['note']['#markup'] .= '<br>';\n $fields['dates']['group_dates'][$key]['date_container']['note']['#markup'] .= 'Please remember to indicate on the next screen under \"additional special setup\" what time you will need the venue opened by MSU PD, if applicable.<br>';\n $fields['dates']['group_dates'][$key]['date_container']['note']['#markup'] .= '</div>';\n\n $first_key = FALSE;\n }\n\n if (isset($request_state['dates']['date-cancelled'][$key]) && $request_state['dates']['date-cancelled'][$key] === TRUE) {\n $fields['dates']['group_dates'][$key]['date_container']['note']['#markup'] .= '<div id=\"mfcs-markup-request-dates-date_note-is_cancelled\" class=\"markup-request\">';\n $fields['dates']['group_dates'][$key]['date_container']['note']['#markup'] .= 'This date has been cancelled.';\n $fields['dates']['group_dates'][$key]['date_container']['note']['#markup'] .= '</div>';\n\n $fields['dates']['group_dates'][$key]['#attributes']['class'][] = 'date-is-cancelled';\n }\n }\n }\n }\n else {\n foreach ($values as $key => $value) {\n $new_ps = $ps . '[group_dates][' . $key . ']';\n\n mfcs_get_request_field_dates_date($form, $form_state, $fields['dates']['group_dates'][$key], $request_state, $new_ps, $key);\n mfcs_get_request_field_dates_time_start($form, $form_state, $fields['dates']['group_dates'][$key], $request_state, $new_ps, $key);\n mfcs_get_request_field_dates_time_stop($form, $form_state, $fields['dates']['group_dates'][$key], $request_state, $new_ps, $key);\n mfcs_get_request_field_dates_category($form, $form_state, $fields['dates']['group_dates'][$key], $request_state, $new_ps, $key);\n }\n }\n\n return $values;\n}", "title": "" }, { "docid": "1dd0266686a6f388190d8f29917edf42", "score": "0.58997333", "text": "function date_difference($start_date,$end_date,$type){\n\n //Type -1:Minute,0:Hour,1:Day,2:Week,3:Month,4:Year\n\n $start = strtotime($start_date); \n\n $end = strtotime($end_date);\n\n if($type == -1){\n\n $start_date = date_create($start_date);\n\n $end_date= date_create($end_date);\n\n $interval= date_diff($start_date, $end_date);\n\n return ($interval->days * 24) + $interval->i;\n\n }else if($type == 0){\n\n $start_date = date_create($start_date);\n\n $end_date= date_create($end_date);\n\n $interval= date_diff($start_date, $end_date);\n\n return ($interval->days * 24) + $interval->h;\n\n }else if($type == 1){\n\n $datediff = $end - $start;\n\n return $day = round($datediff / (60 * 60 * 24));\n\n }elseif ($type == 2) {\n\n $datediff = $end - $start;\n\n $difference = round($datediff / (60 * 60 * 24));\n\n return round($difference / 7);\n\n }elseif ($type == 3) {\n\n $year1 = date('Y', $start);\n\n $year2 = date('Y', $end);\n\n $month1 = date('m', $start);\n\n $month2 = date('m', $end);\n\n return $diff = (($year2 - $year1) * 12) + ($month2 - $month1);\n\n }elseif ($type == 4) {\n\n $start_date = date_create($start_date);\n\n $end_date= date_create($end_date);\n\n $interval= date_diff($start_date, $end_date);\n\n return $year = $interval->format('%y');\n\n } \n\n }", "title": "" }, { "docid": "5b5bb8bd4b0ba090011313fe1e146bf5", "score": "0.58224636", "text": "protected function rangeDates($begin, $end, $group)\n {\n\n $period = new DatePeriod(new DateTime($begin), new DateInterval('P1D'), new DateTime($end));\n $ret = array();\n foreach ($period as $date) {\n switch ($group) {\n case 'day':\n $ret[] = $date->format('Y-m-d');\n break;\n case 'week':\n $ret[] = $date->format('Y') . ' - week ' . $date->format('W');\n break;\n case 'month':\n $ret[] = $date->format('Y') . ' - month ' . $date->format('m');\n break;\n }\n }\n return array_values(array_unique($ret));\n }", "title": "" }, { "docid": "4ee487833ebff5a0fe2f047c0c294b8b", "score": "0.5678326", "text": "public function getExpenseReport($from_date,$to_date,$group=''){\r\nif($group==\"group\"){\r\nreturn $this->db->query(\"SELECT trans_date,sum(amount) as amount FROM\r\n\ttransaction WHERE type='Expense' AND user_id='\".$this->session->userdata('user_id').\"' AND trans_date between '\".$from_date.\"'\r\n\tAND '\".$to_date.\"' GROUP BY trans_date\")->result();\t\r\n}else{\r\nreturn $this->db->query(\"SELECT * FROM transaction WHERE type='Expense' AND user_id='\".$this->session->userdata('user_id').\"'\r\nAND trans_date between '\".$from_date.\"' AND '\".$to_date.\"'\")->result();\t\t\r\n}\r\n}", "title": "" }, { "docid": "a179727a3a0974e83c506bc6a16a03d2", "score": "0.56760186", "text": "function grapher($sql_result, $start_date, $end_date, $type = \"\")\n{\n if (empty($start_date)) { $start_date =\"\"; }\n if (empty($end_date)) { $end_date =\"\"; }\n if ($type == \"\"){ $type = 'day'; }\n $main_year = $main_month_year = $main_day = array();\n // get last 8 days/months\n $last_days = 5;\n $last_months = 3;\n for ($i = $last_days; $i >= 0; $i--) {\n $main_day[date ('d-m-Y', time () - $i * 3600 * 24)] = 0;\n }\n for ($i = $last_months; $i >= 0; $i--) {\n $main_month_year[date ('m-Y', time () - $i * 30 * 3600 * 24)] = 0;\n }\n\n $i = 0;\n if (is_array($sql_result) && count($sql_result) > 0) {\n foreach ($sql_result as $key => $data) {\n //creating the main array\n $main_month_year[date('m-Y', $data['login'])] += float_format(($data['logout'] - $data['login']) / 60, 0);\n $main_day[date('d-m-Y', $data['login'])] += float_format(($data['logout'] - $data['login']) / 60, 0);\n if ($i > 500) {\n break;\n }\n $i++;\n }\n switch ($type) {\n case 'day':\n $main_date = $main_day;\n break;\n case 'month':\n $main_date = $main_month_year;\n break;\n case 'year':\n $main_date = $main_year;\n break;\n }\n\n // the nice graphics :D\n $labels = array_keys($main_date);\n if (count($main_date) == 1) {\n $labels = $labels[0];\n $main_date = $main_date[$labels];\n }\n\n /* Create and populate the pData object */\n $myData = new pData();\n $myData->addPoints($main_date, 'Serie1');\n if (count($main_date)!= 1) {\n $myData->addPoints($labels, 'Labels');\n $myData->setSerieDescription('Labels', 'Months');\n $myData->setAbscissa('Labels');\n }\n $myData->setSerieWeight('Serie1', 1);\n $myData->setSerieDescription('Serie1', get_lang('MyResults'));\n $myData->setAxisName(0, get_lang('Minutes'));\n $myData->loadPalette(api_get_path(SYS_CODE_PATH) . 'palettes/pchart/default.color', true);\n\n // Cache definition\n $cachePath = api_get_path(SYS_ARCHIVE_PATH);\n $myCache = new pCache(array('CacheFolder' => substr($cachePath, 0, strlen($cachePath) - 1)));\n $chartHash = $myCache->getHash($myData);\n\n if ($myCache->isInCache($chartHash)) {\n //if we already created the img\n $imgPath = api_get_path(SYS_ARCHIVE_PATH) . $chartHash;\n $myCache->saveFromCache($chartHash, $imgPath);\n $imgPath = api_get_path(WEB_ARCHIVE_PATH) . $chartHash;\n } else {\n /* Define width, height and angle */\n $mainWidth = 760;\n $mainHeight = 230;\n $angle = 50;\n\n /* Create the pChart object */\n $myPicture = new pImage($mainWidth, $mainHeight, $myData);\n\n /* Turn of Antialiasing */\n $myPicture->Antialias = false;\n\n /* Draw the background */\n $settings = array(\"R\" => 255, \"G\" => 255, \"B\" => 255);\n $myPicture->drawFilledRectangle(0, 0, $mainWidth, $mainHeight, $settings);\n\n /* Add a border to the picture */\n $myPicture->drawRectangle(\n 0,\n 0,\n $mainWidth - 1,\n $mainHeight - 1,\n array(\"R\" => 0, \"G\" => 0, \"B\" => 0)\n );\n\n /* Set the default font */\n $myPicture->setFontProperties(\n array(\n \"FontName\" => api_get_path(SYS_FONTS_PATH) . 'opensans/OpenSans-Regular.ttf',\n \"FontSize\" => 10)\n );\n /* Write the chart title */\n $myPicture->drawText(\n $mainWidth / 2,\n 30,\n get_lang('TimeSpentInTheCourse'),\n array(\n \"FontSize\" => 12,\n \"Align\" => TEXT_ALIGN_BOTTOMMIDDLE\n )\n );\n\n /* Set the default font */\n $myPicture->setFontProperties(\n array(\n \"FontName\" => api_get_path(SYS_FONTS_PATH) . 'opensans/OpenSans-Regular.ttf',\n \"FontSize\" => 8\n )\n );\n\n /* Define the chart area */\n $myPicture->setGraphArea(50, 40, $mainWidth - 40, $mainHeight - 80);\n\n /* Draw the scale */\n $scaleSettings = array(\n 'XMargin' => 10,\n 'YMargin' => 10,\n 'Floating' => true,\n 'GridR' => 200,\n 'GridG' => 200,\n 'GridB' => 200,\n 'DrawSubTicks' => true,\n 'CycleBackground' => true,\n 'LabelRotation' => $angle,\n 'Mode' => SCALE_MODE_ADDALL_START0,\n );\n $myPicture->drawScale($scaleSettings);\n\n /* Turn on Antialiasing */\n $myPicture->Antialias = true;\n\n /* Enable shadow computing */\n $myPicture->setShadow(\n true,\n array(\n \"X\" => 1,\n \"Y\" => 1,\n \"R\" => 0,\n \"G\" => 0,\n \"B\" => 0,\n \"Alpha\" => 10\n )\n );\n\n /* Draw the line chart */\n $myPicture->setFontProperties(\n array(\n \"FontName\" => api_get_path(SYS_FONTS_PATH) . 'opensans/OpenSans-Regular.ttf',\n \"FontSize\" => 10\n )\n );\n $myPicture->drawSplineChart();\n $myPicture->drawPlotChart(\n array(\n \"DisplayValues\" => true,\n \"PlotBorder\" => true,\n \"BorderSize\" => 1,\n \"Surrounding\" => -60,\n \"BorderAlpha\" => 80\n )\n );\n\n /* Do NOT Write the chart legend */\n\n /* Write and save into cache */\n $myCache->writeToCache($chartHash, $myPicture);\n $imgPath = api_get_path(SYS_ARCHIVE_PATH) . $chartHash;\n $myCache->saveFromCache($chartHash, $imgPath);\n $imgPath = api_get_path(WEB_ARCHIVE_PATH) . $chartHash;\n }\n $html = '<img src=\"' . $imgPath . '\">';\n\n return $html;\n } else {\n $foo_img = api_convert_encoding('<div id=\"messages\" class=\"warning-message\">'.get_lang('GraphicNotAvailable').'</div>','UTF-8');\n\n return $foo_img;\n }\n}", "title": "" }, { "docid": "c096e9b2568e28acd7cb3ceffb5daf8f", "score": "0.5631388", "text": "function interval( $startDate , $endDate, $type ){\n\tif($type=='Weekly'){\n\t\tif(date('D', strtotime($startDate)) === 'Mon') {\n\t\t\t$startDate=$startDate;\n\t\t}\n\t\telse{\n\t\t\t$startDate=date('Y-m-d', strtotime('last Monday', strtotime($startDate)));\n\t\t}\n\t}\n\tif($type=='Monthly'){\n\t\tif(date('j', strtotime($startDate)) === '1') {\n\t\t\t$startDate=$startDate;\n\t\t}\n\t\telse{\n\t\t\t$startDate=$startDate;\n\t\t}\n\t}\n $startDate = strtotime( $startDate );\n $endDate = strtotime( $endDate );\n\n // New Variables\n $currDate = $startDate;\n $dayArray = array();\n\n\t // Loop until we have the Array\n\tif($type=='Daily'){\n\t do{\n\t $dayArray[] = date( 'Y-m-d' , $currDate );\n\t $currDate = strtotime( '+1 day' , $currDate );\n\t } while( $currDate<=$endDate );\n\t}\n\tif($type=='Weekly'){\n\t do{\n\t $dayArray[] = date( 'Y-m-d' , $currDate );\n\t $currDate = strtotime( '+1 week' , $currDate );\n\t } while( $currDate<=$endDate );\n\t}\n\tif($type=='Monthly'){\n\t do{\n\t $dayArray[] = date( 'Y-m-d' , $currDate );\n\t $currDate = strtotime( '+1 month' , $currDate );\n\t } while( $currDate<=$endDate );\n\t}\n\t // Return the Array\n\t return $dayArray;\n}", "title": "" }, { "docid": "51af122591278290a6c963a762f8c29f", "score": "0.55932635", "text": "public function intervalHSGrouped($start,$finish,$points)\n {\n\t\t$start = date(\"Y-m-d H:i:s\",$start);\n\t\t$finish = date(\"Y-m-d H:i:s\",$finish);\n\n\t\t$interval =round((strtotime($finish)-strtotime($start))/($points-1));\n\n\t\t$result = $this->CALMori->getAdapter()->query(\"select start_date_time as time, \n\tavg(uncorrected)+std(uncorrected) as uncorrected_open, max(uncorrected) as uncorrected_max, min(uncorrected) as uncorrected_min, avg(uncorrected)-std(uncorrected) as uncorrected_close, \n\tavg(corr_for_pressure)+std(corr_for_pressure) as corr_for_pressure_open, max(corr_for_pressure) as corr_for_pressure_max, min(corr_for_pressure) as corr_for_pressure_min, avg(corr_for_pressure)-std(corr_for_pressure) as corr_for_pressure_close,\n\t\n\tavg(corr_for_efficiency)+std(corr_for_efficiency) as corr_for_efficiency_open, max(corr_for_efficiency) as corr_for_efficiency_max, min(corr_for_efficiency) as corr_for_efficiency_min, avg(corr_for_efficiency)-std(corr_for_efficiency) as corr_for_efficiency_close,\n\n\tavg(pressure_mbar) as pressure_mbar_avg\n\n\tfrom(select t2.*,ROUND(UNIX_TIMESTAMP(t2.start_date_time)/(\".$interval.\")) as timekey from(SELECT o.start_date_time,\n\tCASE WHEN r.start_date_time IS NULL THEN o.measured_uncorrected ELSE r.revised_uncorrected END AS uncorrected, \n\tCASE WHEN r.start_date_time IS NULL THEN o.measured_corr_for_pressure ELSE r.revised_corr_for_pressure END AS corr_for_pressure,\n\tCASE WHEN r.start_date_time IS NULL THEN o.measured_corr_for_efficiency ELSE r.revised_corr_for_efficiency END AS corr_for_efficiency,\n\tCASE WHEN r.start_date_time IS NULL THEN o.measured_pressure_mbar ELSE r.revised_pressure_mbar END AS pressure_mbar\n\nFROM CALM_ori o LEFT JOIN CALM_rev r ON o.start_date_time = r.start_date_time WHERE o.start_date_time >= '\".$start.\"' AND o.start_date_time < '\".$finish.\"' ORDER BY start_date_time ASC) as t2) as t3 group by timekey;\")->execute();\n\n\t\t$resultSet = new ResultSet;\n \t$resultSet->initialize($result);\n\n\t\t$rows = array();\n\t\tforeach ($resultSet as $CALM_oriModel){\n\t\t\t\t$rows[0][]=array(\n\t\t\t\t\tstrtotime($CALM_oriModel->time)*1000,\n\t\t\t\t\t$this->handleFloat($CALM_oriModel->uncorrected_open),\n\t\t\t\t\t$this->handleFloat($CALM_oriModel->uncorrected_max),\n\t\t\t\t\t$this->handleFloat($CALM_oriModel->uncorrected_min),\n\t\t\t\t\t$this->handleFloat($CALM_oriModel->uncorrected_close),\n\t\t\t\t);\n\t\t\t\t$rows[1][]=array(\n\t\t\t\t\tstrtotime($CALM_oriModel->time)*1000,\n\t\t\t\t\t$this->handleFloat($CALM_oriModel->corr_for_pressure_open),\n\t\t\t\t\t$this->handleFloat($CALM_oriModel->corr_for_pressure_max),\n\t\t\t\t\t$this->handleFloat($CALM_oriModel->corr_for_pressure_min),\n\t\t\t\t\t$this->handleFloat($CALM_oriModel->corr_for_pressure_close),\n\t\t\t\t);\n\t\t\t\t$rows[2][]=array(\n\t\t\t\t\tstrtotime($CALM_oriModel->time)*1000,\n\t\t\t\t\t$this->handleFloat($CALM_oriModel->corr_for_efficiency_open),\n\t\t\t\t\t$this->handleFloat($CALM_oriModel->corr_for_efficiency_max),\n\t\t\t\t\t$this->handleFloat($CALM_oriModel->corr_for_efficiency_min),\n\t\t\t\t\t$this->handleFloat($CALM_oriModel->corr_for_efficiency_close),\n\t\t\t\t);\n\t\t\t\t$rows[3][]=array(\n\t\t\t\t\tstrtotime($CALM_oriModel->time)*1000,\n\t\t\t\t\t$this->handleFloat($CALM_oriModel->pressure_mbar_avg),\n\t\t\t\t);\n\t\t\t}\n\n\t\treturn Json::encode($rows);\n\n }", "title": "" }, { "docid": "dc590f1ce61206bcb89e0ae6b7b9ea44", "score": "0.55800366", "text": "private function prepare_chart_data_daily_average( $data, $date_key, $data_key, $interval, $start_date, $group_by ) {\n\n\t\t$prepared_data = array();\n\n\t\tif ( 'day' == $group_by ) {\n\n\t\t\t$prepared_data = $this->prepare_chart_data( $data, $date_key, $data_key, $interval, $start_date, $group_by );\n\n\t\t} else {\n\n\t\t\t// Ensure all days (or months) have values first in this range\n\t\t\tfor ( $i = 0; $i <= $interval; $i ++ ) {\n\n\t\t\t\t$time = strtotime( date( 'Ym', strtotime( \"+{$i} MONTH\", $start_date ) ) . '01' ) . '000';\n\n\t\t\t\tif ( ! isset( $prepared_data[ $time ] ) ) {\n\t\t\t\t\t$prepared_data[ $time ] = array( esc_js( $time ), 0, 'count' => 0 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tforeach ( $data as $days_data ) {\n\n\t\t\t\t$time = strtotime( date( 'Ym', strtotime( $days_data->$date_key ) ) . '01' ) . '000';\n\n\t\t\t\tif ( ! isset( $prepared_data[ $time ] ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ( $data_key ) {\n\t\t\t\t\t$prepared_data[ $time ][1] += $days_data->$data_key;\n\t\t\t\t} else {\n\t\t\t\t\t$prepared_data[ $time ][1] ++;\n\t\t\t\t}\n\n\t\t\t\t$prepared_data[ $time ]['count']++;\n\t\t\t}\n\n\t\t\tforeach ( $prepared_data as $time => $aggregated_data ) {\n\t\t\t\tif ( 0 === $aggregated_data['count'] ) {\n\t\t\t\t\t$prepared_data[ $time ][1] = 0;\n\t\t\t\t} else {\n\t\t\t\t\t$prepared_data[ $time ][1] = round( $prepared_data[ $time ][1] / $aggregated_data['count'] );\n\t\t\t\t}\n\t\t\t\tunset( $prepared_data[ $time ]['count'] );\n\t\t\t}\n\t\t}\n\n\t\treturn $prepared_data;\n\t}", "title": "" }, { "docid": "ae5e75ccb8e66f3fa133497d99622604", "score": "0.5565696", "text": "public function getEventDates(DateTime $startDate, DateTime $stopDate) {\r\n \r\n $oneDay = new DateInterval('P1D');\r\n $oneMonth = new DateInterval('P1M');\r\n\r\n $startMonth = clone($startDate);\r\n $startMonth->modify('first day of this month');\r\n $stopMonth = clone($stopDate);\r\n $stopMonth->modify('last day of this month');\r\n $recurringMonths = array();\r\n while($startMonth < $stopMonth) {\r\n $recurringMonths[] = clone($startMonth);\r\n $startMonth->add($oneMonth);\r\n }\r\n\r\n $recurringWeeks = $this->getRecurringWeeksAsText();\r\n $recurringDays = $this->getRecurringDaysAsText();\r\n $eventDates = array();\r\n foreach($recurringMonths as $workDate) {\r\n # Weeks have been selected, check every nth week / day combination\r\n if(count($recurringWeeks) !== 0) {\r\n foreach($this->getRecurringWeeksAsText() as $week) {\r\n foreach($this->getRecurringDaysAsText() as $day) {\r\n $workDate->modify(sprintf(\"%s %s of this month\", $week, $day));\r\n if($workDate >= $this->getEventStart() && (is_null($this->getRecurringStop()) || $workDate <= $this->getRecurringStop()) && $workDate >= $startDate && $workDate <= $stopDate) {\r\n $eventDates[$workDate->format('Y-m-d')] = clone($workDate);\r\n $re_StartDate = clone($workDate);\r\n $difference = $this->getEventStart()->diff($re_StartDate);\r\n $re_StopDate = clone($this->getEventStop());\r\n $re_StopDate->add($difference);\r\n while($re_StartDate <= $re_StopDate) {\r\n $eventDates[$re_StartDate->format('Y-m-d')] = clone($re_StartDate);\r\n $re_StartDate->modify('+1 day');\r\n }\r\n }\r\n }\r\n }\r\n } else {\r\n # Check the weekdays only, ignoring the weeks of the month\r\n $stopDay = clone($workDate);\r\n $stopDay->modify('last day of this month');\r\n while($workDate <= $stopDay) {\r\n $addCurrentDay = FALSE;\r\n switch($workDate->format('w')) {\r\n case 0:\r\n $addCurrentDay = in_array('Sunday', $recurringDays);\r\n break;\r\n case 1:\r\n $addCurrentDay = in_array('Monday', $recurringDays);\r\n break;\r\n case 2:\r\n $addCurrentDay = in_array('Tuesday', $recurringDays);\r\n break;\r\n case 3:\r\n $addCurrentDay = in_array('Wednesday', $recurringDays);\r\n break;\r\n case 4:\r\n $addCurrentDay = in_array('Thursday', $recurringDays);\r\n break;\r\n case 5:\r\n $addCurrentDay = in_array('Friday', $recurringDays);\r\n break;\r\n case 6:\r\n $addCurrentDay = in_array('Saturday', $recurringDays);\r\n break;\r\n }\r\n if($addCurrentDay) {\r\n if($workDate >= $this->getEventStart() && (is_null($this->getRecurringStop()) || $workDate <= $this->getRecurringStop()) && $workDate >= $startDate && $workDate <= $stopDate) {\r\n $eventDates[$workDate->format('Y-m-d')] = clone($workDate);\r\n $re_StartDate = clone($workDate);\r\n $difference = $this->getEventStart()->diff($re_StartDate);\r\n $re_StopDate = clone($this->getEventStop());\r\n $re_StopDate->add($difference);\r\n while($re_StartDate <= $re_StopDate) {\r\n $eventDates[$re_StartDate->format('Y-m-d')] = clone($re_StartDate);\r\n $re_StartDate->modify('+1 day');\r\n }\r\n }\r\n }\r\n $workDate->add($oneDay);\r\n }\r\n }\r\n }\r\n $myStartDate = clone($this->getEventStart());\r\n $myStopDate = $this->getEventStop();\r\n while($myStartDate <= $myStopDate) {\r\n $eventDates[$myStartDate->format('Y-m-d')] = clone($myStartDate);\r\n $myStartDate->modify('+1 day');\r\n }\r\n\r\n\r\n $eventDates[$this->getEventStart()->format('Y-m-d')] = $this->getEventStart();\r\n ksort($eventDates);\r\n return $eventDates;\r\n }", "title": "" }, { "docid": "9143f107068c3cb1b613cc1ad8d95a50", "score": "0.55059814", "text": "public static function dateRangeComputation(){\n\t\t$data = [];\n\t\t$input = request();\n\t\tif( !empty( $input ) ) $data['input'] = request();\n\t\n\t\t//date_from and date_to will automatically be \"TODAY\" if empty\n\t\tif( !empty( $input['date_from'] ) ){\n\t\t\t$date_from_stamp = strtotime( $input['date_from'] );\n\t\t\t$data['date_from'] = $input['date_from'];\n\t\t}\n\t\telse {\n\t\t\t$date_from_stamp = strtotime( \"this week\",strtotime( \"today\" ) );//by default show first day of the week\n\t\t\t$data['date_from'] = date( \"Y-m-d\", $date_from_stamp );\t\t\t\n\t\t}\n\t\t\n\t\tif( !empty( $input['date_to'] ) ){\n\t\t\t$date_to_stamp = strtotime( $input['date_to'] );\n\t\t\t$data['date_to'] = $input['date_to'];\n\t\t}\n\t\telse{\n\t\t\t$date_to_stamp = strtotime( date( \"Y-m-d\", $date_from_stamp ).\" +1 week\" ) - 1;//by default show last day of the week\n\t\t\t$data['date_to'] = date( \"Y-m-d\", $date_to_stamp );\t\t\t\n\t\t}\t\t\n\t\t\n\t\tif( $date_from_stamp > $date_to_stamp ){\n\t\t\terror(-80101, \"[ date_from ] cannot be more than [ date_to ]\");\n\t\t\t$data['show_by'] = '';\n\t\t\t$data['error'] = 1;//\n\t\t\t$data['date_by'] = [];\n\t\t}\n\t\telse{\n\t\t\tif( empty( $input['show_by'] ) ) $data['show_by'] = 'day';\n\t\t\telse $data['show_by'] = $input['show_by']; \n\t\t\n\t\t\t$from_diff = date_create( $data['date_from'] );\n\t\t\t$to_diff = date_create( $data['date_to'] );\n\t\t\t$date_diff = date_diff( $from_diff, $to_diff );\t\t\t\t\n\t\t\t$week_diff = ceil( ( strtotime( \"this week\", $date_to_stamp ) - strtotime( \"this week\", $date_from_stamp ) ) /604800 );//became complicated..\n\t\t\t\n\t\t\t$difference = [];\t\t\t\n\t\t\t$difference['day'] = $date_diff->days;\n\t\t\t$difference['week'] = $week_diff;\t\n\n\t\t\tif( date(\"m\",$date_to_stamp) < date (\"m\",$date_from_stamp ) ) $month_to = date (\"m\",$date_to_stamp ) + 12;\n\t\t\telse $month_to = date (\"m\",$date_to_stamp );\n\t\t\t\n\t\t\t$difference['month'] = ( $date_diff->y * 12 ) + ( $month_to - date (\"m\",$date_from_stamp ) );\n\n\t\t\t$data['difference'] = $difference;\t\n\t\t\t\n\t\t\t//automatically show ALL if show_by is empty\n\t\t\tif( $data['show_by'] == '' || $data['show_by'] == 'day' ){\n\t\t\t\t$data['date_from_stamp']['day'] = $date_from_stamp;\n\t\t\t\t$data['date_to_stamp']['day'] = strtotime( date( \"Y-m-d\",$date_to_stamp ).\" +1 day\" ) - 1;//needs more test\n\t\t\t\t$data['sql_group_by'] = \" GROUP BY day( FROM_UNIXTIME( created ) )\";\n\t\t\t\t$data['date_guide'] = \"Y-m-d\";\n\t\t\t}\n\t\t\t\n\t\t\tif( $data['show_by'] == '' || $data['show_by'] == 'week' ){\n\t\t\t\t$data['date_from_stamp']['week'] = strtotime( \"this week\", $date_from_stamp );\t\t\t\t\n\t\t\t\t$data['date_to_stamp']['week'] = strtotime( \"this week\", $date_to_stamp );\t\t\t\t\n\t\t\t\t$data['date_to_stamp']['week'] = strtotime( date( \"Y-m-d\",strtotime( \"this week\", $date_to_stamp ) ).\" +1 week\" ) - 1;//needs more test\n\t\t\t\t$data['sql_group_by'] = \" GROUP BY week( FROM_UNIXTIME( created ) )\";\n\t\t\t\t$data['date_guide'] = \"Y-\\WW\";\n\t\t\t}\n\t\t\t\n\t\t\tif( $data['show_by'] == '' || $data['show_by'] == 'month' ){\n\t\t\t\t$data['date_from_stamp']['month'] = strtotime( date('Y-m-1',$date_from_stamp) );\t\t\t\t\n\t\t\t\t$data['date_to_stamp']['month'] = strtotime( date('Y-m-1',$date_to_stamp) );\n\t\t\t\t$data['date_to_stamp']['month'] = strtotime( date( \"Y-m-1\",$date_to_stamp ).\" +1 month\" ) - 1;//needs more test\n\t\t\t\t$data['sql_group_by'] = \" GROUP BY month( FROM_UNIXTIME( created ) )\";\n\t\t\t\t$data['date_guide'] = \"Y-m\";\n\t\t\t}\n\t\t}\t\n\t\t\n\t\t\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "eb6d0300c89deac03735eff58819d99d", "score": "0.54774785", "text": "public function getIncomeReport($from_date,$to_date,$group=''){\r\nif($group==\"group\"){\r\nreturn $this->db->query(\"SELECT trans_date,sum(amount) as amount FROM\r\n\ttransaction WHERE type='Income' AND user_id='\".$this->session->userdata('user_id').\"' AND trans_date between '\".$from_date.\"'\r\n\tAND '\".$to_date.\"' GROUP BY trans_date\")->result();\t\r\n}else{\r\nreturn $this->db->query(\"SELECT * FROM transaction WHERE type='Income' AND user_id='\".$this->session->userdata('user_id').\"'\r\nAND trans_date between '\".$from_date.\"' AND '\".$to_date.\"'\")->result();\t\t\r\n}\r\n}", "title": "" }, { "docid": "a278b2253de2fb311acbf2f42c7ac77c", "score": "0.5449416", "text": "public function getHoursByIdAndGroupBetween($id, $group, $start, $end) {\n\n $group = ['bebco', 'jaco', 'jbc', 'jrcs'];\n\n $response = ['bebco' => null, 'jaco' => null, 'jbc' => null, 'jrcs' => null];\n\n foreach($group as $k => $v) {\n $min = Cico::where('volunteer_id', $id)\n ->where('for_' . $v, 1)\n ->where('check_in_date', '>=', $start)\n ->where('check_out_date', '<=', $end)\n ->sum('minutes_volunteered');\n $response[$v] = Helpers::minutesToHours($min);\n }\n\n $all = Cico::where('volunteer_id', $id)\n ->where('check_in_date', '>=', $start)\n ->where('check_out_date', '<=', $end)\n ->sum('minutes_volunteered');\n\n //Append several KV elements to the response\n $response['all'] = Helpers::minutesToHours($all);\n $response['id'] = $id;\n\n return $response;\n\n }", "title": "" }, { "docid": "034ad38432fbd896afc62517599f2765", "score": "0.5429814", "text": "private function find_group_data()\n {\n global $wpdb;\n\n //get current day and year\n $today = getdate();\n $curr_day = $today['yday'];\n $curr_year = $today['year'];\n\n //get DB data\n $sql = 'SELECT schedule_id,begin_time,end_time,group_target,schedule_content FROM ' . $wpdb->prefix . TABLE_UP_SCHEDULE . ' WHERE group_id = ' . bp_get_current_group_id();\n $result = $wpdb->get_results($sql, ARRAY_A);\n $this->schedule_data = json_decode($result[0]['schedule_content'], true);\n\n $this->group_begin_time = substr($result[0]['begin_time'], 0, 10);\n $this->group_end_time = substr($result[0]['begin_time'], 0, 10);\n $this->group_target = $result[0]['group_target'];\n\n //handle finished and unfinished data and status\n if(is_array($this->schedule_data)){\n foreach ($this->schedule_data as $unit_data) {\n $schedule_date = $unit_data['date'];\n $schedule_year = getdate($schedule_date)['year'];\n $schedule_day = getdate($schedule_date)['yday'];\n\n if ($schedule_year != $curr_year) {\n error_log('schedule date fail');\n }\n\n if ($schedule_day < $curr_day) {\n $status_type = 'before';\n $this->history_schedule_data[] = $this->handle_learning_status($status_type, $unit_data);\n } else {\n //is current day\n if ($curr_day === $schedule_day) {\n $unit_data['current_day'] = true;\n $status_type = 'current';\n $this->current_schedule_data[] = $this->handle_learning_status($status_type, $unit_data);\n } else {\n $status_type = 'after';\n $this->current_schedule_data[] = $this->handle_learning_status($status_type, $unit_data);\n }\n }\n }\n }\n\n //find all today learning member\n $today_sql = \"\n select user_id\n from wp_up_group_squad s ,wp_up_group_squad_detail sd\n where s.squad_id = sd.squad_id\n and s.group_id = '\".bp_get_current_group_id().\"'\n and sd.last_login_time > DATE_FORMAT(NOW(),'%Y-%m-%d')\n \";\n $today_user = $wpdb ->get_results($today_sql,ARRAY_A);\n\n if(is_array($today_user) && !empty($today_user)){\n foreach ($today_user as $user){\n\n $this -> today_users[] = array(\n 'avatar' => get_avatar($user['user_id']),\n 'nick_name' => get_user_meta($user['user_id'],'nickname',true)\n );\n }\n }\n\n\n }", "title": "" }, { "docid": "1a0f4933d8f250b72d7f6cb50b43f4e5", "score": "0.54157186", "text": "function get_dates($start, $end)\n{\n \n $i = 0;\n $timespan_dates[$i] = $start;\n //echo $timespan_dates[$i];\n \n do{\n $date = $timespan_dates[$i];\n $date = strtotime(\"$date +1 day\");\n $timespan_dates[$i+1] = date(\"d.m.Y\", $date);\n $i++;\n } while(strtotime($timespan_dates[$i]) < strtotime($end));\n\n return $timespan_dates;\n}", "title": "" }, { "docid": "98765339c94096241acc7aed7bd7d1fd", "score": "0.53880715", "text": "function get_days($end_date){\n\t$counter = 0;\n $no_included = ['Mon','Tue','Wed','Thu','Fri'];\n $end_date = date (\"Y-m-d\", strtotime(\"+1 day\", strtotime($end_date)));\n //echo date('N',strtotime('2019-03-31'));\n while($counter == 0){\n if(date(\"N\",strtotime($end_date)) <= 5) {\n \t//echo date(\"N\",strtotime($start_date));\n $counter++;\n }else\n $end_date = date (\"Y-m-d\", strtotime(\"+1 day\", strtotime($end_date)));\n\n }\n $month = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August','September', 'October', 'November', 'December'];\n $t = (int)(trim(explode('-',$end_date)[1]));\n $end_month = $month[$t-1];\n $end_year = explode('-',$end_date)[0];\n $end_day = explode('-',$end_date)[2];\n $date = ''.$end_month.' '.$end_day.', '.$end_year.'.';\n return $date;\n}", "title": "" }, { "docid": "6230e23e98a949785742e2c1e344ec94", "score": "0.537931", "text": "protected function groupSpansByMonth(): array\n {\n $spans = [];\n if (count($this->getSubDateSpans()) > 0) {\n $lastDaysGroup = [];\n $lastDaysMonth = null;\n foreach ($this->getSubDateSpans() as $dateSpan) {\n if ($dateSpan->isSingleDay() && null !== $dateSpan->getStartDate()) {\n // Get a month identifier\n $month = $dateSpan->getStartDate()->format('Y-m');\n /*\n * Change month, need to start a new group\n */\n if (null !== $lastDaysMonth && $lastDaysMonth !== $month) {\n $spans[] = [$month => $lastDaysGroup];\n $lastDaysGroup = [];\n }\n /*\n * Add day to current month group\n */\n $lastDaysGroup[] = $dateSpan;\n $lastDaysMonth = $month;\n } else {\n /*\n * Add previous month group if existing\n */\n if (null !== $lastDaysMonth) {\n $spans[] = [$lastDaysMonth => $lastDaysGroup];\n }\n /*\n * Simply add continuous span as a group\n */\n $spans[] = $dateSpan;\n $lastDaysGroup = [];\n $lastDaysMonth = null;\n }\n }\n /*\n * Add last month group if existing\n */\n if (null !== $lastDaysMonth) {\n $spans[] = [$lastDaysMonth => $lastDaysGroup];\n }\n }\n return $spans;\n }", "title": "" }, { "docid": "2503593e036b49c9c5935cad181f4c19", "score": "0.53718275", "text": "private function stats_by_period($total, $year, $month, $day)\n {\n $returned = array();\n $delta = 0;\n\n $sql = \" count(id) as NbPages, count(distinct IP) as NbIP,\n count(image_id) as NbImg, count(distinct category_id) as NbCat \";\n $sql_nfomax = \", MaxPages, MaxIP, MaxImg\";\n $sql_from = \" from \".HISTORY_TABLE.\" \";\n $sql_where = \"\";\n $sql_order = \"\";\n $sql_select = \"\";\n $sql_group = \"\";\n $sql_groupdef=\"\";\n\n if($day!=\"\")\n {\n $sql_groupdef=\"HOUR(time) as GId,\";\n $sql_select=\"select HOUR(time) as GId, \";\n $sql_where=\" where YEAR(date) = $year and MONTH(date) = $month and DAY(date) = $day \";\n $sql_group=\" group by GId \";\n $sql_order=\" order by GId asc\";\n\n for($i=0;$i<24;$i++)\n {\n $returned[$i] = array(\n \"GId\" => $i,\n \"NbPages\" => 0,\n \"NbIP\" => 0,\n \"NbImg\" => 0,\n \"NbCat\"=>0,\n \"MaxPages\" => 0,\n \"MaxIP\" => 0,\n \"MaxImg\" => 0\n );\n }\n }\n elseif($month!=\"\")\n {\n $sql_groupdef=\"DAY(date) as GId,\";\n $sql_select=\"select DAY(date) as GId, \";\n $sql_where=\" where YEAR(date) = $year and MONTH(date) = $month \";\n $sql_group=\" group by GId \";\n $sql_order=\" order by GId asc\";\n\n $delta = 1;\n $NbDays = strftime('%d', mktime(0,0,0,$month+1,0,$year));\n for($i=0;$i<$NbDays;$i++)\n {\n $returned[$i] = array(\n \"GId\" => $i+1,\n \"NbPages\" => 0,\n \"NbIP\" => 0,\n \"NbImg\" => 0,\n \"NbCat\"=>0,\n \"MaxPages\" => 0,\n \"MaxIP\" => 0,\n \"MaxImg\" => 0\n );\n }\n }\n elseif($year!=\"\")\n {\n $sql_groupdef=\"MONTH(date) as GId,\";\n $sql_select=\"select MONTH(date) as GId, \";\n $sql_where=\" where YEAR(date) = $year \";\n $sql_group=\" group by GId \";\n $sql_order=\" order by GId asc \";\n\n $delta = 1;\n for($i=0;$i<12;$i++)\n {\n $returned[$i] = array(\n \"GId\" => $i+1,\n \"NbPages\" => 0,\n \"NbIP\" => 0,\n \"NbImg\" => 0,\n \"NbCat\"=>0,\n \"MaxPages\" => 0,\n \"MaxIP\" => 0,\n \"MaxImg\" => 0\n );\n }\n }\n elseif($total!=\"Y\")\n {\n $sql_groupdef=\"YEAR(date) as GId,\";\n $sql_select=\"select YEAR(date) as GId, \";\n $sql_group=\" group by GId \";\n $sql_order=\" order by GId desc\";\n }\n else\n {\n $sql_select=\"select 'Tout' as GId, \"; $sql_nfomax=\", 0 as MaxPages, 0 as MaxIP, 0 as MaxImg\";\n }\n\n if($this->catfilter!=\"\")\n {\n $catfilter=$this->make_where_clause($this->catfilter);\n ($sql_where==\"\")?$sql_where=\" where \":$sql_where.=\" and \";\n $sql_where.=\" category_id IN (\".$catfilter.\")\";\n }\n\n if(($this->config['AStat_UseBlackList']!=\"false\")&&($this->config['AStat_BlackListedIP']!=\"\"))\n {\n ($sql_where==\"\")?$sql_where=\" where \":$sql_where.=\" AND \";\n ($this->config['AStat_UseBlackList']==\"true\")?$sql_where .= \" NOT \":\"\";\n $sql_where .= $this->make_IP_where_clause($this->config['AStat_BlackListedIP']);\n }\n\n $sql_max=\", (select max(n.MaxPages) as MaxPages, max(n.MaxIP) as MaxIP, max(n.MaxImg) as MaxImg\n from (select \".$sql_groupdef.\" count(id) as MaxPages, count(distinct IP) as MaxIP, count(image_id) as MaxImg\n from \".HISTORY_TABLE.$sql_where.$sql_group.\") as n) as n \";\n $sql=$sql_select.$sql.$sql_nfomax.$sql_from.$sql_max.$sql_where.$sql_group.$sql_order;\n\n $result = pwg_query($sql);\n\n $i=0;\n while ($row = pwg_db_fetch_assoc($result))\n {\n if($year.$month.$day==\"\")\n { $returned[$i] = $row; $i++; }\n else\n { $returned[$row[\"GId\"]-$delta] = $row; }\n }\n\n return($returned);\n }", "title": "" }, { "docid": "3167e9350c0daaeb7a5c00be31b040a2", "score": "0.5360819", "text": "public function group();", "title": "" }, { "docid": "8dd8f0d31a1e929798d619f044368817", "score": "0.5328802", "text": "function repeat_every_week($value,$difference,$start_date,$end_date,$user_current_datetime){\n\n $resArr = array();\n\n for ($i=0; $i <= $difference; $i++) {\n\n \tif( ( strtotime($start_date) > strtotime(date('d-m-Y',strtotime($value->start_date.\"\".$i.\" week\")))\n\n && strtotime(date('d-m-Y',strtotime($start_date))) > strtotime(date('d-m-Y',strtotime($value->end_date.\" +\".$i.\" week\"))) )\n\n || strtotime($end_date) < strtotime(date('d-m-Y',strtotime($value->start_date.\"\".$i.\" week\")))){\n\n \t\tcontinue;\n\n \t}\n\n $resArr[$i]['event_id'] = (string) $value->event_id;\n\n $resArr[$i]['event_type'] = (string) $value->event_type;\n\n $resArr[$i]['is_completed'] = (string) $value->is_completed;\n\n $resArr[$i]['user_id'] = (string) $value->user_id;\n\n $resArr[$i]['title'] = $value->title;\n\n $resArr[$i]['all_day'] = (string) $value->all_day;\n\n $resArr[$i]['start_date'] = date('d-m-Y',strtotime($value->start_date.\"\".$i.\" week\" ));\n\n $resArr[$i]['start_time'] = $value->start_time;\n\n $resArr[$i]['end_date'] = date('d-m-Y',strtotime($value->end_date.\"\".$i.\" week\"));\n\n $resArr[$i]['end_time'] = $value->end_time;\n\n $resArr[$i]['repeat_mode'] = $value->repeat_mode;\n\n $resArr[$i]['created_at'] = $value->created_at;\n\n $resArr[$i]['updated_at'] = $value->updated_at;\n\n $resArr[$i]['set_reminder'] = $value->set_reminder;\n\n $resArr[$i]['reminder_date_time'] = $value->reminder_date_time;\n\n $resArr[$i]['notification_type'] = $value->notification_type;\n\n $resArr[$i]['notification'] = $value->notification;\n\n $resArr[$i]['custom_notification'] = (isset($value->custom_notification) && $value->custom_notification != \"\")? json_decode($value->custom_notification,true) : array();\n\n $resArr[$i]['location'] = (isset($value->location) && $value->location != \"\")? $value->location : \"\";\n\n } \n\n return $resArr;\n\n }", "title": "" }, { "docid": "9b4c169f14f033ea4d40d532308fc9a1", "score": "0.5328092", "text": "function getDateRange($start, $end){\n $result = array();\n\n if($start && $end){\n $start_s = preg_split(\"/\\-/\", $start);\n $end_s = preg_split(\"/\\-/\", $end);\n $start_y = $start_s[0];\n $start_m = $start_s[1];\n $start_d = $start_s[2];\n $end_y = $end_s[0];\n $end_m = $end_s[1];\n $end_d = $end_s[2];\n\n if(\n ($end_y < $start_y)\n ||\n (($end_y === $start_y) && ($end_m < $start_m))\n ||\n (($end_y === $start_y) && ($end_m === $start_m) && ($end_d < $start_d))\n ){\n return '结束时间小于开始时间';\n }\n\n array_push($result, $start);\n if($start_y === $end_y){\n if($start_m === $end_m){\n for(;($start_d++) < $end_d;){\n if($start_d < 10){\n $start_d = '0'.$start_d;\n }\n array_push($result, \"$start_y-$start_m-$start_d\");\n }\n }else if($start_m < $end_m){\n $months = array();\n for($i = $start_m*1; $i < $end_m+1; $i++){\n array_push($months, $i);\n }\n foreach($months as $k => $m){\n if($m < 10){\n $m = '0'.$m;\n }\n if($k === 0){\n for($k = ($start_d*1)+1; $k < 32; $k++){\n if($k < 10){\n $k = '0'.$k;\n }\n array_push($result, \"$start_y-$m-$k\");\n }\n }else if($k !== (count($months)-1)){\n for($k = 1; $k < 32; $k++){\n if($k < 10){\n $k = '0'.$k;\n }\n array_push($result, \"$start_y-$m-$k\");\n }\n }else{\n for($k = 1; $k < $end_d+1; $k++){\n if($k < 10){\n $k = '0'.$k;\n }\n array_push($result, \"$end_y-$m-$k\");\n }\n }\n }\n }\n }else if($end_y > $start_y){\n return '暂时不支持跨年度查询';\n }\n }else{\n return \"缺少开始或结束时间参数\";\n }\n\n return $result;\n}", "title": "" }, { "docid": "dcdfda871966f49963a969ea43e8f9e6", "score": "0.53229725", "text": "public function practice_code()\n {\n // $end = new DateTime( '2018-08-10' );\n // $end = $end->modify( '+1 day' ); \n // $interval = new DateInterval('P1D');\n // $daterange = new DatePeriod($begin, $interval ,$end);\n\n // $present = Carbon::now();\n // $past = Carbon::now()->subMonth()->toDateString();\n // $begin = new DateTime( $present ); \n // $end = new DateTime( $past );\n // $interval = new DateInterval('P1D');\n // $daterange = new DatePeriod($begin, $interval ,$end);\n\n // foreach($daterange as $date){\n // array_push($dates,$date->format('Y-m-d'));\n // }\n }", "title": "" }, { "docid": "360aa0606b387282b24073e66ee8d353", "score": "0.5304479", "text": "function grabDates($start,$end,$category_array) {\n\t$cats = implode(\",\",$category_array);\n\tglobal $supergroup;\n\tglobal $title, $niceday, $start_time, $end_time, $venue, $city, $state, $cat,$ed, $usr, $color, $background,$lang, $w, $ap, $status;\n\t/* get applicable events */\n\t$superedit = true;\n\tif (!$supergroup) {\n\t\t$q = \"select moderate from users_to_groups where group_id = \".$w.\" and user_id = \".$_SESSION[\"user_id\"];\n\t\t$query = mysql_query($q);\n\t\tif (mysql_num_rows($query) > 0) {\n\t\t\t$mod = mysql_result($query,0,0);\n\t\t\tif ($mod > 2) {\n\t\t\t\t$superedit = true;\n\t\t\t}\n\t\t}\n\t} else {\n\t\t$superedit = true;\n\t}\n\tif (($mod > 0) || ($superedit)) {\n\t\t$q = \"select DATE_FORMAT(date_start, '%Y%m%d'),DATE_FORMAT(date_start, '%H%i'), event_id, title, DATE_FORMAT(date_start, '%W, %M %e, %Y'), DATE_FORMAT(date_start, '%l:%i %p'), DATE_FORMAT(date_end, '%l:%i %p'), series, user_id, date_start, status from events order by date_start\";\n\t\t\t$query = mysql_query($q);\n\t\twhile ($row = mysql_fetch_row($query)) {\n\t\t\t$edit = true;\n\t\t\tif ($row[8] == $_SESSION[\"user_id\"]) {\n\t\t\t\t$edit = true;\n\t\t\t} elseif ($superedit) {\n\t\t\t\t$edit = true;\n\t\t\t}\n\t\t\tif ($edit==true) $ed[$row[2]]=true;\n\t\t\tif ($superedit==true) $ap[$row[2]]=true;\n\t\t\t$title[$row[2]]=strip_tags($row[3]);\n\t\t\t$niceday[$row[0]][$row[9]][$row[2]]=$row[4];\n\t\t\tif (($row[5] == \"12:00 AM\") && ($row[6] == \"11:59 PM\")) {\n\t\t\t\t$start_time[$row[0]][$row[9]][$row[2]]=$lang[\"all_day\"];\n\t\t\t} elseif (($row[5] == \"12:00 AM\") && ($row[6] == \"12:00 AM\")) {\n\t\t\t\t$start_time[$row[0]][$row[9]][$row[2]]=\"TBA\";\n\t\t\t} else {\t\n\t\t\t\t$start_time[$row[0]][$row[9]][$row[2]]=$row[5];\n\t\t\t\tif ($row[6]) $end_time[$row[0]][$row[9]][$row[2]]=$row[6];\n\t\t\t}\n\t\t\t$cat[$row[2]]=$row[7];\n\t\t\t$usr[$row[2]]=$row[8];\n\t\t\t$status[$row[2]]=$row[10];\n\t\t}\n\t}\n\n}", "title": "" }, { "docid": "86c57cae3898f953a3b371e0edc15495", "score": "0.5291326", "text": "public function workDaysBetween($start, $end){\n $wDays = [];\n $interval = DateInterval::createFromDateString('1 day');\n $period = new DatePeriod(new DateTime($start), $interval, new DateTime($end));\n $closedDays = Calendar::select('task_date')->whereRaw(' task_date BETWEEN \"'.$start.'\" AND \"'.$end.'\" AND open = 0')->get();\n \n foreach ($period as $dt) {\n array_push( $wDays, $dt->format(\"Y-m-d\"));\n }\n \n foreach ($closedDays as $dt) {\n if(in_array(substr($dt['task_date'],0,10), $wDays)){\n \\array_splice($wDays, array_search(substr($dt['task_date'],0,10), $wDays),1);\n } \n }\n return $wDays;\n\n }", "title": "" }, { "docid": "5c154850ea024efaeb6efae97f81d63f", "score": "0.5286047", "text": "private function periods() {\n\t\t// Today's date.\n\t\t$today = date( 'Y-m-d' );\n\t\t// Yesterday's date.\n\t\t$yesterday = date( 'Y-m-d', strtotime( '-1 days' ) );\n\n\t\t// Dates array.\n\t\t$dates = [\n\t\t\t$today => [\n\t\t\t\t'label' => __( 'Today', 'ga_trans' ),\n\t\t\t\t'end' => $today,\n\t\t\t],\n\t\t\t$yesterday => [\n\t\t\t\t'label' => __( 'Yesterday', 'ga_trans' ),\n\t\t\t\t'end' => $yesterday,\n\t\t\t],\n\t\t\tdate( 'Y-m-d', strtotime( '-7 days' ) ) => [\n\t\t\t\t'label' => __( 'Last 7 days', 'ga_trans' ),\n\t\t\t\t'end' => $yesterday,\n\t\t\t],\n\t\t\tdate( 'Y-m-d', strtotime( '-30 days' ) ) => [\n\t\t\t\t'label' => __( 'Last 30 days', 'ga_trans' ),\n\t\t\t\t'end' => $yesterday,\n\t\t\t],\n\t\t\tdate( 'Y-m-d', strtotime( '-90 days' ) ) => [\n\t\t\t\t'label' => __( 'Last 90 days', 'ga_trans' ),\n\t\t\t\t'end' => $yesterday,\n\t\t\t],\n\t\t\tdate( 'Y-m-d', strtotime( '-1 years' ) ) => [\n\t\t\t\t'label' => __( 'Last year', 'ga_trans' ),\n\t\t\t\t'end' => $yesterday,\n\t\t\t],\n\t\t\tdate( 'Y-m-d', strtotime( '-3 years' ) ) => [\n\t\t\t\t'label' => __( 'Last 3 years', 'ga_trans' ),\n\t\t\t\t'end' => $yesterday,\n\t\t\t],\n\t\t];\n\n\t\t/**\n\t\t * Filter to add or remove periods from date filter.\n\t\t *\n\t\t * The key of the item should be the start date, and the value\n\t\t * array should contain label and end date.\n\t\t *\n\t\t * @param array $dates Dates array.\n\t\t *\n\t\t * @since 3.2.0\n\t\t */\n\t\treturn apply_filters( 'beehive_google_analytics_periods', $dates );\n\t}", "title": "" }, { "docid": "f6f369b262b18403c4c43cf43bf75419", "score": "0.5268981", "text": "protected function groupPeriods()\n { \n foreach ($this->indicators as $indicatorIndex => $values) {\n if (!array_diff_key(array_flip($this->periodFields), $this->indicators[$indicatorIndex])) {\n $grouping = app()->make(Grouping::class, [$this->indicators[$indicatorIndex], $this->periodFields])->groupValues();\n $this->indicators[$indicatorIndex]['period'] = $grouping;\n }\n }\n\n }", "title": "" }, { "docid": "d79779ef087892216c8c30dad37788da", "score": "0.5258724", "text": "function guest_list_month($year = '', $month = '', $data = '', $starting_date = array(), &$week_start = 1)\r\n {\r\n $this->day_list = $this->getdayslist();\r\n\t\t//to make the separation of date display with available and unavailable count\r\n $is_montly_available = 0;\r\n $days = array();\r\n $night_price = $data['night_price'];\r\n $weekly_price = $data['weekly_price'];\r\n $monthly_price = $data['monthly'];\r\n $item_id = $data['item_id'];\r\n unset($data['monthly']);\r\n unset($data['weekly_price']);\r\n unset($data['item_id']);\r\n unset($data['night_price']);\r\n $monthly_start_date = $year . '-' . $month . '-1';\r\n $month_start_date = date('Y-m-d', strtotime($monthly_start_date));\r\n $temmp = explode('-', $monthly_start_date);\r\n $month_end_date = date('Y-m-d', mktime(0, 0, 0, $temmp[1]+1, $temmp[2]-1, $temmp[0]));\r\n $count = count($data) -1;\r\n if (strtotime(date('Y-m-d')) < strtotime($month_start_date)) {\r\n\t $monthly_color = '#98CF67';\r\n\t\t} else {\r\n\t $monthly_color = '#FFFFFF';\r\n\t\t}\r\n\t\t$is_last_month_date_available = 1;\r\n for ($m = 0; $m < $count; $m++) {\r\n\t\t\tif (strtotime($month_start_date) > strtotime($data[$m]['start_date'])) {\r\n\t\t\t\t$start_date = date('M d,Y', strtotime($month_start_date));\r\n\t\t\t\t$data[$m]['start_date'] = $month_start_date;\r\n\t\t\t\t$is_last_month_date_available = 0;\r\n\t\t\t} else {\r\n\t\t\t\t$start_date = date('M d,Y', strtotime($data[$m]['start_date']));\r\n\t\t\t}\r\n $datecnt = explode('-', $data[$m]['start_date']);\r\n\t\t\tif (((int)$datecnt[1]) < $month) {\r\n\t\t\t\t $start_date = date('M d,Y', mktime(0, 0, 0, $month, 1, $datecnt[0]));\t\r\n\t\t\t\t $daycnt = 1;\r\n\t\t\t} else {\r\n\t\t\t\t $daycnt = (int)$datecnt[2];\r\n\t\t\t}\r\n \r\n $end_date = date('M d,Y', strtotime($data[$m]['end_date']));\r\n\t\t\t $ending_date = explode('-', $data[$m]['end_date']); \r\n\t\t\tif( ((int)$ending_date[1]) > $month ){\r\n\t\t\t\t $end_date = date('M d,Y', mktime(0, 0, 0, $month, 31, $ending_date[0]));\t\r\n\t\t\t}\r\n $strdate = strtotime($start_date);\r\n $enddate = strtotime($end_date);\r\n $numdays = intval(($enddate-$strdate) /86400) +1;\r\n $wk_cnt = 1;\r\n for ($k = 1; $k <= $numdays; $k++) {\r\n if (!empty($daycnt)) {\r\n $wkcnt = $this->getWeekOfTheMonth($year, $month, $daycnt);\r\n if (!empty($wkcnt)) {\r\n $is_available = $data['week']['week' . $wkcnt]['is_available'];\r\n if ((isset($data[$m]['is_custom_nights']) && ($data[$m]['is_custom_nights'] == 0)) || (isset($data[$m]['is_available']) && ($data[$m]['is_available'] == 0))) {\r\n $is_available = 0;\r\n }\r\n\t\t\t\t\t\t$is_booked = 0;\r\n\t\t\t\t\t\tif ((isset($data[$m]['is_custom_nights']) && ($data[$m]['is_custom_nights'] == 0))) {\r\n\t\t\t\t\t\t\t$is_booked = 1;\r\n\t\t\t\t\t\t}\r\n $data['week']['week' . $wkcnt] = array(\r\n 'is_available' => $is_available,\r\n\t\t\t\t\t\t\t'is_booked' => $is_booked,\r\n 'price' => $data['week']['week' . $wkcnt]['price'],\r\n 'start_date' => $data['week']['week' . $wkcnt]['start_date'],\r\n 'end_date' => $data['week']['week' . $wkcnt]['end_date'],\r\n );\r\n }\r\n $wk_cnt++;\r\n }\r\n $temp_arr = array();\r\n if ($data[$m]['is_custom_nights']) {\r\n if ($data[$m]['is_available']) {\r\n if ($data[$m]['pastdate'] && (date('Y-m-d', strtotime('now')) > date('Y-m-d', strtotime($month . '/' . $daycnt . '/' . $year)))) {\r\n\t\t\t\t\t\t\t$temp_arr['status'] = 'past date';\r\n\t\t\t\t\t\t} else {\r\n\t $temp_arr['status'] = 'available';\r\n\t\t\t\t\t\t}\r\n $temp_arr['price'] = $data[$m]['price'];\r\n $temp_arr['color'] = $data[$m]['color'];\r\n } else {\r\n $temp_arr['status'] = 'not-available';\r\n $temp_arr['price'] = $data[$m]['price'];\r\n $temp_arr['color'] = $data[$m]['color'];\r\n $monthly_color = '#FFFFFF';\r\n }\r\n } else {\r\n $temp_arr['status'] = 'booked';\r\n $temp_arr['price'] = $data[$m]['price'];\r\n $temp_arr['color'] = $data[$m]['color'];\r\n $monthly_color = '#FFA2B7';\r\n }\r\n if (empty($days[$daycnt])) {\r\n $days[$daycnt++] = $temp_arr;\r\n }\r\n }\r\n }\r\n if (is_array($days)) {\r\n ksort($days);\r\n }\r\n ksort($data['week']);\r\n $data['days'] = $days;\r\n $str = '';\r\n $day = 1;\r\n $today = 0;\r\n $month = $this->month_list[$month-1];\r\n if ($year == '' || $month == '') { // just use current year & month\r\n $year = date('Y');\r\n $month = date('m');\r\n }\r\n $flag = 0;\r\n for ($i = 0; $i < 12; $i++) {\r\n if (strtolower($month) == $this->month_list[$i]) {\r\n if (intval($year) != 0) {\r\n $flag = 1;\r\n $month_num = $i+1;\r\n break;\r\n }\r\n }\r\n }\r\n $temp = array_flip($this->month_list);\r\n //$prev_month_mod = $temp[$prev_month] + 1;\r\n if ($flag == 0) {\r\n $year = date('Y');\r\n $month = date('F');\r\n $month_num = date('m');\r\n }\r\n $next_year = $year;\r\n $prev_year = $year;\r\n $next_month = intval($month_num) +1;\r\n $prev_month = intval($month_num) -1;\r\n if ($next_month == 13) {\r\n $next_month = 'january';\r\n $next_year = intval($year) +1;\r\n } else {\r\n $next_month = $this->month_list[$next_month-1];\r\n }\r\n if ($prev_month == 0) {\r\n $prev_month = 'december';\r\n $prev_year = intval($year) -1;\r\n } else {\r\n $prev_month = $this->month_list[$prev_month-1];\r\n }\r\n if ($year == date('Y') && strtolower($month) == strtolower(date('F'))) {\r\n // set the flag that shows todays date but only in the current month - not past or future...\r\n $today = date('j');\r\n }\r\n $calType = 'big-calendar dc';\r\n $action = 'calendar';\r\n $days_in_month = date(\"t\", mktime(0, 0, 0, $month_num, 1, $year));\r\n $first_day_in_month = date('D', mktime(0, 0, 0, $month_num, 1, $year));\r\n $prev_num = $month_num-1;\r\n $next_num = $month_num-1;\r\n $str.= '<div class=\"hasDatepicker js-calender-permonth\" id=\"datepicker\">';\r\n $str.= '<div class=\"' . $calType . '\">';\r\n $str.= '<div class=\"calendar-month no-pad pr dc tb \">';\r\n $temp = array_flip($this->month_list);\r\n $prev_month_mod = $temp[$prev_month]+1;\r\n $prev_url = Router::url(array(\r\n 'controller' => 'items',\r\n 'action' => 'calendar',\r\n 'guest_list',\r\n 'month' => $prev_month_mod,\r\n 'year' => $prev_year,\r\n 'item_id' => $item_id,\r\n ) , true);\r\n if ($monthly_color == '#98CF67') {\r\n $monthly_title = $this->Html->siteCurrencyFormat($monthly_price, false) . ' ' . __l('(Monthly Booking Price)');\r\n } elseif ($monthly_color == '#FFA2B7') {\r\n $monthly_title = 'Booked';\r\n } else {\r\n $monthly_title = 'Not available';\r\n }\r\n $str.= ' <div class=\"monthly-info show text-11 sep-top sep-bot bot-mspace no-round space dc\" style=\"background:' . $monthly_color;\r\n\t\t$str .= ($monthly_color == '#98CF67') ? ';color:#FFFFFF;': '';\r\n\t\t$str .='\" title=\"' . $monthly_title . '\"> <span class=\"ui-datepicker-month\">' . ucfirst($month) . '</span> <span class=\"ui-datepicker-year \">' . $year . '</span>' . '<span class=\"js-monthstart-date\" style=\"display:none;\">' . $month_start_date . '</span><span class=\"js-monthend-date\" style=\"display:none;\">' . $month_end_date . '</span><div>';\r\n $next_month_mod = $temp[$next_month]+1;\r\n $next_url = Router::url(array(\r\n 'controller' => 'items',\r\n 'action' => 'calendar',\r\n 'guest_list',\r\n 'month' => $next_month_mod,\r\n 'year' => $next_year,\r\n 'item_id' => $item_id,\r\n ) , true);\r\n\t $str .= '</div>';\r\n $str.= '</div>';\r\n $table_class = '';\r\n $str.= '<table' . $table_class . '>';\r\n $str.= '<thead>';\r\n $str.= '<tr>';\r\n\t\t$str.= '<th colspan=\"2\" class=\"calendar-head textn tb\">Week</th>';\r\n for ($i = 0; $i < 7; $i++) {\r\n $str.= '<th class=\"calendar-head textn tb\">' . substr($this->day_list[$i], 0, 2) . '</th>';\r\n }\r\n $str.= '</tr>';\r\n $str.= '</thead>';\r\n $str.= '<tbody>';\r\n $cnt = 0;\r\n $current_date = strtotime(date('M d,Y', mktime(0, 0, 0, date(\"m\") , date(\"d\") , date(\"Y\"))));\r\n $calender_date = strtotime(date('M d,Y', mktime(0, 0, 0, date($month_num) , date($day) , date($year))));\r\n while ($day <= $days_in_month) {\r\n $is_booked = 0;\r\n $cnt++;\r\n $str.= '<tr>';\r\n $title = '';\r\n\t\t\t$current_week_no = $week_start;\r\n\t\t\t$week_start++;\r\n\t\t\t$w_border_left = $w_border_bottom = $w_available_js_color = '';\r\n\t\t\t$w_booked_color = '#FFA2B7';\r\n\t\t\t$w_available_color = '#97CE68';\r\n\t\t\t$w_not_available_color = '#D96566';\r\n\t\t\t$w_pastdate_color = '#FFFFFF';\r\n if (isset($data['week']['week' . $cnt]['is_available'])) {\r\n if ($data['week']['week' . $cnt]['is_available'] == 0) {\r\n if ($data['week']['week' . $cnt]['is_booked'] == 1) {\r\n\t\t\t\t\t\t$w_border_left = $w_pastdate_color;\r\n\t\t\t\t\t\t$w_border_bottom = $w_booked_color;\r\n\t\t\t\t\t\t$w_available_js_color = 'available-left-half';\r\n\t\t\t\t\t\t$classbooked = 'booked-week dc';\r\n\t\t\t\t\t\t$metadata = ' booked {\\'start_date\\': \\'' . $data['week']['week' . $cnt]['start_date'] . '\\', \\'end_date\\': \\'' . $data['week']['week' . $cnt]['end_date'] . '\\', \\'price\\': \\'' . $data['week']['week' . $cnt]['price'] . '\\', \\'status\\': \\'booked\\', \\'week\\': \\'' . $cnt . '\\', \\'title\\': \\'Booked\\', \\'border_left\\': \\'' . $w_border_left . '\\', \\'border_bottom\\': \\'' . $w_border_bottom . '\\', \\'available_js_color\\': \\'' . $w_available_js_color . '\\'}';\r\n\t\t\t\t\t\t$title = 'Booked';\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$w_available_js_color = 'available-left-half';\r\n\t\t\t\t\t\t$w_border_left = $w_pastdate_color;\r\n\t\t\t\t\t\t$w_border_bottom = $w_not_available_color;\r\n\t\t\t\t\t\t$classbooked = 'notavailable-week dc sfont';\r\n\t\t\t\t\t\t$metadata = ' pastweek {\\'start_date\\': \\'' . $data['week']['week' . $cnt]['start_date'] . '\\', \\'end_date\\': \\'' . $data['week']['week' . $cnt]['end_date'] . '\\', \\'price\\': \\'' . $data['week']['week' . $cnt]['price'] . '\\', \\'status\\': \\'post week\\', \\'week\\': \\'' . $cnt . '\\', \\'title\\': \\'Not Available\\', \\'border_left\\': \\'' . $w_border_left . '\\', \\'border_bottom\\': \\'' . $w_border_bottom . '\\', \\'available_js_color\\': \\'' . $w_available_js_color . '\\'}';\r\n\t\t\t\t\t\t$title = 'Not Available';\r\n\t\t\t\t\t}\r\n } else if ($data['week']['week' . $cnt]['is_available'] == 1) {\r\n $w_border_left = $w_available_color;\r\n\t\t\t\t\t$w_border_bottom = $w_available_color;\r\n\t\t\t\t\t$w_available_js_color = 'available-bottom-half';\r\n\t\t\t\t\t$classbooked = 'not-booked-week sfont dc tb';\r\n $metadata = ' available {\\'start_date\\': \\'' . $data['week']['week' . $cnt]['start_date'] . '\\', \\'end_date\\': \\'' . $data['week']['week' . $cnt]['end_date'] . '\\', \\'price\\': \\'' . $data['week']['week' . $cnt]['price'] . '\\', \\'status\\': \\'available\\', \\'week\\': \\'' . $current_week_no . '\\', \\'title\\': \\'' . $data['week']['week' . $cnt]['price'] . '\\', \\'border_left\\': \\'' . $w_border_left . '\\', \\'border_bottom\\': \\'' . $w_border_bottom . '\\', \\'available_js_color\\': \\'' . $w_available_js_color . '\\'}';\r\n $title = $data['week']['week' . $cnt]['price'];\r\n if ((!empty($data['week']['week' . $cnt]['price']))) {\r\n if ($data['week']['week' . $cnt]['price'] > $weekly_price) {\r\n $metadata = ' available {\\'start_date\\': \\'' . $data['week']['week' . $cnt]['start_date'] . '\\', \\'end_date\\': \\'' . $data['week']['week' . $cnt]['end_date'] . '\\', \\'price\\': \\'' . $data['week']['week' . $cnt]['price'] . '\\', \\'status\\': \\'available\\', \\'week\\': \\'' . $current_week_no . '\\', \\'title\\': \\'' . $data['week']['week' . $cnt]['price'] . '\\', \\'border_left\\': \\'' . $w_border_left . '\\', \\'border_bottom\\': \\'' . $w_border_bottom . '\\', \\'available_js_color\\': \\'' . $w_available_js_color . '\\'}';\r\n $title = $data['week']['week' . $cnt]['price'];\r\n } else if ($data['week']['week' . $cnt]['price'] < $weekly_price) {\r\n $metadata = ' available {\\'start_date\\': \\'' . $data['week']['week' . $cnt]['start_date'] . '\\', \\'end_date\\': \\'' . $data['week']['week' . $cnt]['end_date'] . '\\', \\'price\\': \\'' . $data['week']['week' . $cnt]['price'] . '\\', \\'status\\': \\'available\\', \\'week\\': \\'' . $current_week_no . '\\', \\'title\\': \\'' . $data['week']['week' . $cnt]['price'] . '\\', \\'border_left\\': \\'' . $w_border_left . '\\', \\'border_bottom\\': \\'' . $w_border_bottom . '\\', \\'available_js_color\\': \\'' . $w_available_js_color . '\\'}';\r\n }\r\n }\r\n } else {\r\n\t\t\t\t\t$w_available_js_color = 'available-left-half';\r\n\t\t\t\t\t$w_border_left = $w_pastdate_color;\r\n\t\t\t\t\t$w_border_bottom = $w_pastdate_color;\r\n $classbooked = 'notavailable-week dc sfont';\r\n $metadata = ' pastweek {\\'start_date\\': \\'' . $data['week']['week' . $cnt]['start_date'] . '\\', \\'end_date\\': \\'' . $data['week']['week' . $cnt]['end_date'] . '\\', \\'price\\': \\'' . $data['week']['week' . $cnt]['price'] . '\\', \\'status\\': \\'post week\\', \\'week\\': \\'' . $current_week_no . '\\', \\'title\\': \\'Not Available\\', \\'border_left\\': \\'' . $w_border_left . '\\', \\'border_bottom\\': \\'' . $w_border_bottom . '\\', \\'available_js_color\\': \\'' . $w_available_js_color . '\\'}';\r\n $title = 'Not Available';\r\n }\r\n }\r\n\t\t\t$w_style = '';\r\n\t\t\tif (!empty($w_border_left) && !empty($w_border_bottom)) {\r\n\t\t\t\t$w_style = ' style=\"border-left-color:' . $w_border_left . ';border-bottom-color:' . $w_border_bottom . '\"';\r\n\t\t\t\t\r\n\t\t\t}\r\n $str.= '<td id=\"guest-week-' . $current_week_no . '\" class=\"guest-week-' . $current_week_no . ' ' . $classbooked . ' js-guest-week-booking js-month-booking ' . $metadata . '\" title=\"' . $title . '\"><span class=\"datepicker-week-block\"' . $w_style . '><span>W' . $cnt . '</span></span></td>';\r\n $str.= '<td class=\"week-list\">&nbsp;</td>';\r\n\t\t\t\r\n $class_js = '';\r\n\t\t\t\r\n for ($i = 0; $i < 7; $i++) {\r\n $cell = '&nbsp;';\r\n $onClick = $class = $style = $title = $temp_flag = '';\r\n $is_start_date = 0;\r\n $is_end_date = 0;\r\n if ($i > 4) {\r\n $class = ' class=\"ui-datepicker-week-end\" ';\r\n }\r\n $class = $calType;\r\n if ($day == $today) {\r\n $class.= ' cal-today';\r\n $temp_flag = 1;\r\n } else {\r\n $temp_flag = 0;\r\n }\r\n if (isset($data['days'][$day])) {\r\n if (is_array($data['days'][$day])) {\r\n if (isset($data['days'][$day]['onClick'])) {\r\n $onClick = ' onClick=\"' . $data['days'][$day]['onClick'] . '\"';\r\n $style = ' style=\"cursor:pointer;\"';\r\n }\r\n } else $cell = $data['days'][$day];\r\n }\r\n if (($first_day_in_month == $this->day_list[$i] || $day > 1) && ($day <= $days_in_month)) {\r\n $percen = '';\r\n $color_percent = '';\r\n $passDate = $day;\r\n if ($day < 10) {\r\n $passDate = '0' . $day;\r\n }\r\n $passMonth = $month_num;\r\n if ($passMonth < 10) {\r\n $passMonth = '0' . $passMonth;\r\n }\r\n if ($day == '01') {\r\n $day = '1';\r\n }\r\n $date1 = mktime(0, 0, 0, $starting_date['month'], $starting_date['date'], $starting_date['year']); //$start_date\r\n $date2 = mktime(0, 0, 0, $month_num, $day, $year);\r\n $diff_date = $this->dateDiff($date2, $date1);\r\n\t\t\t\t\t$border_left = $border_bottom = $available_js_color = '';\r\n\t\t\t\t\t$prev_day = $day - 1;\r\n if (isset($data['days'][$day]) && !empty($data['days'][$day])) {\r\n $current_date = strtotime(date('M d,Y', mktime(0, 0, 0, date(\"m\") , date(\"d\") , date(\"Y\"))));\r\n $calender_date = strtotime(date('M d,Y', mktime(0, 0, 0, date($month_num) , date($day) , date($year))));\r\n $title = '';\r\n\t\t\t\t\t\t$price = (!empty($data['days'][$day]['price'])) ? $data['days'][$day]['price'] : $night_price;\r\n\t\t\t\t\t\t$class.= ' ' . $data['days'][$day]['status'];\r\n\t\t\t\t\t\tif ($data['days'][$day]['status'] == 'available') {\r\n\t\t\t\t\t\t\t$color_percentage = $this->convertColor($price, $night_price);\r\n\t\t\t\t\t\t\t$class.= $color_percentage . ' available';\r\n\t\t\t\t\t\t}\r\n if ($data['days'][$day]['status'] == 'booked') {\r\n $metadata = '{\\'month\\': \\'' . date($month_num) . '\\', \\'year\\': \\'' . date($year) . '\\', \\'date\\': \\'' . date($day) . '\\', \\'status\\': \\'booked\\', \\'title\\': \\'booked\\', \\'cell\\': \\'' . $diff_date . '\\', \\'border_left\\': \\'' . $border_left . '\\', \\'border_bottom\\': \\'' . $border_bottom . '\\', \\'available_js_color\\': \\'' . $available_js_color . '\\'}';\r\n $title = 'Booked';\r\n } else if ($data['days'][$day]['status'] == 'available') {\r\n $title = (!empty($data['days'][$day]['price'])) ? $data['days'][$day]['price'] : $night_price;\r\n $price = (!empty($data['days'][$day]['price'])) ? $data['days'][$day]['price'] : $night_price;\r\n $metadata = ' {\\'month\\': \\'' . date($month_num) . '\\', \\'year\\': \\'' . date($year) . '\\', \\'date\\': \\'' . date($day) . '\\', \\'status\\': \\'available\\', \\'title\\': \\'' . $title . '\\', \\'price\\': \\'' . $price . '\\', \\'cell\\': \\'' . $diff_date . '\\', \\'border_left\\': \\'' . $border_left . '\\', \\'border_bottom\\': \\'' . $border_bottom . '\\', \\'available_js_color\\': \\'' . $available_js_color . '\\'} ';\r\n if (empty($temp_flag)) {\r\n if ((!empty($data['days'][$day]['price']))) {\r\n\t\t\t\t\t\t\t\t\t$metadata = ' {\\'month\\': \\'' . date($month_num) . '\\', \\'year\\': \\'' . date($year) . '\\', \\'date\\': \\'' . date($day) . '\\', \\'status\\': \\'available\\', \\'title\\': \\'' . $title . '\\', \\'price\\': \\'' . $price . '\\', \\'cell\\': \\'' . $diff_date . '\\', \\'border_left\\': \\'' . $border_left . '\\', \\'border_bottom\\': \\'' . $border_bottom . '\\', \\'available_js_color\\': \\'' . $available_js_color . '\\'} ';\r\n }\r\n }\r\n } else if ($data['days'][$day]['status'] == 'not-available') {\r\n $metadata = '{\\'month\\': \\'' . date($month_num) . '\\', \\'year\\': \\'' . date($year) . '\\', \\'date\\': \\'' . date($day) . '\\', \\'status\\': \\'not-available\\', \\'title\\': \\'Not available\\', \\'cell\\': \\'' . $diff_date . '\\', \\'border_left\\': \\'' . $border_left . '\\', \\'border_bottom\\': \\'' . $border_bottom . '\\', \\'available_js_color\\': \\'' . $available_js_color . '\\'}';\r\n $title = 'Not available';\r\n } else {\r\n $title = 'Not available';\r\n $metadata = '{\\'month\\': \\'' . date($month_num) . '\\', \\'year\\': \\'' . date($year) . '\\', \\'date\\': \\'' . date($day) . '\\', \\'status\\': \\'past date\\', \\'title\\': \\'' . $title . '\\', \\'cell\\': \\'' . $diff_date . '\\', \\'border_left\\': \\'' . $border_left . '\\', \\'border_bottom\\': \\'' . $border_bottom . '\\', \\'available_js_color\\': \\'' . $available_js_color . '\\'}';\r\n $class.= ' js-disable_monthly pastdate';\r\n }\r\n $is_montly_available = 1;\r\n $class_js = 'js-disable_monthly';\r\n } else {\r\n $current_date = strtotime(date('M d,Y', mktime(0, 0, 0, date(\"m\") , date(\"d\") , date(\"Y\"))));\r\n $calender_date = strtotime(date('M d,Y', mktime(0, 0, 0, date($month_num) , date($day) , date($year))));\r\n if ($current_date <= $calender_date) {\r\n $title = (!empty($data['days'][$day]['price'])) ? $data['days'][$day]['price'] : $night_price;\r\n $price = (!empty($data['days'][$day]['price'])) ? $data['days'][$day]['price'] : $night_price;\r\n $metadata = ' {\\'month\\': \\'' . date($month_num) . '\\', \\'year\\': \\'' . date($year) . '\\', \\'date\\': \\'' . date($day) . '\\', \\'status\\': \\'available\\', \\'title\\': \\'' . $title . '\\', \\'price\\': \\'' . $price . '\\', \\'cell\\': \\'' . $diff_date . '\\', \\'border_left\\': \\'' . $border_left . '\\', \\'border_bottom\\': \\'' . $border_bottom . '\\', \\'available_js_color\\': \\'' . $available_js_color . '\\'} ';\r\n $class.= ' available';\r\n if (empty($temp_flag)) {\r\n if ((!empty($data['days'][$day]['price']))) {\r\n\t\t\t\t\t\t\t\t\t$metadata = ' {\\'month\\': \\'' . date($month_num) . '\\', \\'year\\': \\'' . date($year) . '\\', \\'date\\': \\'' . date($day) . '\\', \\'status\\': \\'available\\', \\'title\\': \\'' . $title . '\\', \\'price\\': \\'' . $price . '\\', \\'cell\\': \\'' . $diff_date . '\\', \\'border_left\\': \\'' . $border_left . '\\', \\'border_bottom\\': \\'' . $border_bottom . '\\', \\'available_js_color\\': \\'' . $available_js_color . '\\'} ';\r\n }\r\n }\r\n } else {\r\n $title = 'Not available';\r\n $metadata = '{\\'month\\': \\'' . date($month_num) . '\\', \\'year\\': \\'' . date($year) . '\\', \\'date\\': \\'' . date($day) . '\\', \\'status\\': \\'past date\\', \\'title\\': \\'' . $title . '\\', \\'cell\\': \\'' . $diff_date . '\\', \\'border_left\\': \\'' . $border_left . '\\', \\'border_bottom\\': \\'' . $border_bottom . '\\', \\'available_js_color\\': \\'' . $available_js_color . '\\'}';\r\n $class.= ' js-disable_monthly pastdate';\r\n }\r\n }\r\n if (isset($data['days'][$day]) && !empty($data['days'][$day])) {\r\n $price = '';\r\n } else if (isset($data['days'][$day])) {\r\n $price = $data['days'][$day];\r\n } else {\r\n $price = '';\r\n }\r\n if (isset($data['days'][$day]) && !empty($data['days'][$day])) {\r\n $is_booked = 1;\r\n }\r\n $str.= '<td class=\" js-month-booking js-guest-day-booking guest-cell-' . $diff_date . ' ' . $metadata . $class . '\" id=\"guest-cell-' . $diff_date . '\" title=\"' . $title . '\">';\r\n\t\t\t\t\t$style = '';\r\n\t\t\t\t\tif (!empty($border_left) && !empty($border_bottom)) {\r\n\t\t\t\t\t\t$style = ' style=\"border-left-color:' . $border_left . ';border-bottom-color:' . $border_bottom . '\"';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$str .= '<span class=\"datepicker-days-block\"' . $style . '><span>' . $day . '</span></span>';\r\n\t\t\t\t\t$str.= '</td>';\r\n $day++;\r\n } else {\r\n $str.= '<td class=\"' . $class . '\">&nbsp;</td>';\r\n }\r\n }\r\n if ($is_booked == 1) {\r\n $classbooked = 'booked-week dc';\r\n } else {\r\n $classbooked = 'not-booked-week sfont tb dc';\r\n }\r\n $str.= '</tr>';\r\n }\r\n $str.= '</tbody>';\r\n $str.= '</table>';\r\n $str.= '</div>';\r\n $str.= '</div>';\r\n $str.= '</div>';\r\n return $str;\r\n }", "title": "" }, { "docid": "26d8f3d50e0a34c6de5477b9991bdf67", "score": "0.5242909", "text": "public function calculatedate($datedropdown,$start_date1,$end_date1){\n\t\t\t\tif (isset($datedropdown) && $datedropdown == 1) {\n\t\t\t\t\t$start_date = date(\"Y-m-d\");\n\t\t\t\t\t$end_date = date(\"Y-m-d\");\n\t\t\t\t} else if (isset($datedropdown) && $datedropdown == 2) {\n\t\t\t\t\t$yesterday = strtotime(\"-1 day\");\n\t\t\t\t\t$start_date = date('Y-m-d', $yesterday);\n\t\t\t\t\t$end_date = date(\"Y-m-d\");\n\t\t\t\t} else if (isset($datedropdown) && $datedropdown == 3) {\n\t\t\t\t\t$week = strtotime(\"-7 day\");\n\t\t\t\t\t$start_date = date('Y-m-d', $week);\n\t\t\t\t\t$end_date = date(\"Y-m-d\");\n\t\t\t\t} else if (isset($datedropdown) && $datedropdown == 4) {\n\t\t\t\t\t$month = strtotime(\"-1 month\");\n\t\t\t\t\t$start_date = date('Y-m-d', $month);\n\t\t\t\t\t$end_date = date(\"Y-m-d\");\n\t\t\t\t} else if (isset($datedropdown) && $datedropdown == 5) {\n\t\t\t\t\t$year = strtotime(\"-1 year\");\n\t\t\t\t\t$start_date = date('Y-m-d', $year);\n\t\t\t\t\t$end_date = date(\"Y-m-d\");\n\t\t\t\t}else {\n\t\t\t\t\t$start_date = $start_date1;\n\t\t\t\t\t$end_date = $end_date1;\n\t\t\t\t}\n\t\t\t$data['start_date'] = $start_date;\n\t\t\t$data['end_date'] = $end_date;\n\t\t\treturn $data;\t\n\t}", "title": "" }, { "docid": "dc55d83ed80edbb4cf828249e3ed0727", "score": "0.524263", "text": "private function calculate_diff()\n\t{\t\t\n\t\t$diff = Kohana_Date::span($this->_time, $this->_next_time);\n\t\t// convert weeks to days\n\t\t$diff['days'] += $diff['weeks'] * 7;\n\t\t$diff['weeks'] = 0;\n\t\treturn $diff;\n\t}", "title": "" }, { "docid": "6c9aa1add3bc1d6e11704d97cea70c86", "score": "0.52241844", "text": "function get_Age_difference($start_date,$end_date){ \r\n\tlist($start_year,$start_month,$start_date) = explode('-', $start_date); \r\n\tlist($current_year,$current_month,$current_date) = explode('-', $end_date);\r\n\t$result = ''; \r\n\t\r\n\t\r\n\t/** days of each month **/ \r\n\tfor($x=1 ; $x<=12 ; $x++){ \r\n \t$dim[$x] = date('t',mktime(0,0,0,$x,1,date('Y'))); \r\n\t\t//echo $dim[$x]; \r\n\t} \r\n\t\r\n\t/** calculate differences **/ \r\n\t$m = $current_month - $start_month; \r\n\t$d = $current_date - $start_date; \r\n\t$y = $current_year - $start_year; \r\n\t\t \r\n\t /** if the start day is ahead of the end day **/ \r\n\tif($d < 0) { \r\n\t\t$diff = $current_month-1;\r\n\t\t$mid = $dim[$diff]; \r\n\t\t$today_day = $current_date + $mid ;\r\n\t\t$today_month = $current_month - 1; \r\n\t\t$d = $today_day - $start_date; \r\n\t\t$m = $today_month - $start_month; \r\n\t\t\t \r\n\t\tif(($today_month - $start_month) < 0) { \r\n\t\t\t$today_month += 12; \r\n\t\t\t$today_year = $current_year - 1; \r\n\t\t\t$m = $today_month - $start_month; \r\n\t\t\t$y = $today_year - $start_year; \r\n\t\t} \r\n\t} \r\n\t\t\t \r\n\t/** if start month is ahead of the end month **/ \r\n\tif($m < 0) { \r\n\t\t$today_month = $current_month + 12; \r\n\t\t$today_year = $current_year - 1; \r\n\t\t$m = $today_month - $start_month; \r\n\t\t$y = $today_year - $start_year; \r\n\t} \r\n\t\t\t\t\t \r\n\t/** Calculate dates **/ \r\n\tif($y < 0) {\tdie(\"Start Date Entered is a Future date than End Date.\"); } \r\n\telse { \r\n\t\tswitch($y) { \r\n\t\t\tcase 0 : $result .= ''; break;\r\n\t\t\tcase 1 : $result .= $y.($m == 0 && $d == 0 ? ' year old' : ' year'); break; \r\n\t\t\tdefault : $result .= $y.($m == 0 && $d == 0 ? ' years old' : ' years');\r\n\t\t} \r\n\t\t\r\n\t\tswitch($m) {\r\n\t\t\tcase 0: $result .= ''; break;\r\n\t\t\tcase 1: $result .= ($y == 0 && $d == 0 ? $m.' month old' : ($y == 0 && $d != 0 ? $m.' month' : ($y != 0 && $d == 0 ? ' and '.$m.' month old' : ', '.$m.' month'))); break; \r\n\t\t\tdefault: $result .= ($y == 0 && $d == 0 ? $m.' months old' : ($y == 0 && $d != 0 ? $m.' months' : ($y != 0 && $d == 0 ? ' and '.$m.' months old' : ', '.$m.' months'))); break; \r\n\t\t} \r\n\t\tswitch($d) {\r\n\t\tcase 0: $result .= ($m == 0 && $y == 0 ? 'Today' : ''); break;\r\n\t\tcase 1: $result .= ($m == 0 && $y == 0 ? $d.' day old' : ($y != 0 || $m != 0 ? ' and '.$d.' day old' : '')); break;\r\n\t\tdefault: $result .= ($m == 0 && $y == 0 ? $d.' days old' : ($y != 0 || $m != 0 ? ' and '.$d.' days old' : ''));\r\n\t\t} \r\n\t} \r\n\t\r\n\treturn $y.' tahun '.$m.' bulan '.$d.' hari'; \r\n}", "title": "" }, { "docid": "925039eb79266b37115e8e3da04efd57", "score": "0.52202183", "text": "function dateSpanCalculator($fromDate,$toDate)\n\t{\n\t\t$uxDay = 60 * 60 * 24;\n\t\t\n $difference = strtotime($toDate,0) - strtotime($fromDate,0); // Difference in seconds\n \n $dateSpan = round($difference / $uxDay) +1; //for this app, we add a day as our span is inclusive\n \n\t\treturn $dateSpan; // END : dateSpanCalculator();\n\t}", "title": "" }, { "docid": "01e859a81d0df11747c2e25e59959f2d", "score": "0.5212312", "text": "public abstract function get_days();", "title": "" }, { "docid": "8ea6a24da36c8c539696cb8f115d1677", "score": "0.51978236", "text": "public static function divDate($start, $end, $return = 'D')\n {\n $solar = new Qss_Model_Calendar_Solar();\n $div = 0;\n $mStart = strtotime($start);\n $mEnd = strtotime($end);\n $div = abs($mEnd - $mStart);\n //$div = ceil($div/86400) + 1;\n \n switch ($return)\n {\n case 'Y':\n case 'MO':\n case 'W':\n case 'D':\n \n $div = ceil($div/86400);\n \n break;\n \n case 'H':\n case 'M':\n case 'S':\n \n $div = $div/86400;\n \n break;\n }\n \n if($return == 'Y')\n {\n return $solar->countYear($start, $end)-1;\n }\n elseif($return == 'MO') \n {\n return $solar->countMonth($start, $end)-1;\n } \n elseif($return == 'W')\n {\n return $solar->countWeek($start, $end)-1;\n } \n elseif($return == 'D') // tra ve ngay\n {\n return $div; \n }\n elseif($return == 'H') // tra ve gio\n {\n return $div * 24;\n }\n elseif($return == 'M')// tra ve phut\n {\n return $div * 1440 ;\n }\n elseif($return == 'S')// tra ve giay\n {\n return $div * 86400;\n }\n }", "title": "" }, { "docid": "1518407da68f101de45411966998f6dd", "score": "0.5194696", "text": "public function get_summary_stats_date_range($project_id, $start_date, $end_date) {\n\n $start_date_arr = explode(\"/\", $start_date);\n $end_date_arr = explode(\"/\", $end_date);\n\n if (!$this->valid_date($start_date)) {\n\n throw new Exception(\"Invalid start date entered.\");\n }\n\n if (!$this->valid_date($end_date)) {\n\n throw new Exception(\"Invalid end date entered.\");\n }\n\n $start_month = $start_date_arr[0];\n $start_day = $start_date_arr[1];\n $start_year = $start_date_arr[2];\n\n $end_month = $end_date_arr[0];\n $end_day = $end_date_arr[1];\n $end_year = $end_date_arr[2];\n\n $this->sc_query_string = \n \"&s=summary\" .\n \"&g=daily\" .\n \"&sd=\" . $start_day .\n \"&sm=\" . $start_month .\n \"&sy=\" . $start_year .\n \"&ed=\" . $end_day .\n \"&em=\" . $end_month .\n \"&ey=\" . $end_year .\n \"&pi=\" . $project_id;\n \n $url = $this->build_url(\"stats\");\n\n $xml = simplexml_load_file($url);\n\n if ($xml->attributes()->status == \"ok\") {\n\n $result = array();\n\n foreach($xml->sc_data as $site) {\n\n $result[] = array(\"date\" => $site->date,\n \"page_views\" => $site->page_views,\n \"unique_visits\" => $site->unique_visits,\n \"returning_visits\" => $site->returning_visits,\n \"first_time_visits\" => $site->first_time_visits\n );\n }\n\n return $result;\n }\n\n throw new Exception(\"XML error: Check your login information and project ID.\");\n }", "title": "" }, { "docid": "11b7873e51fd425e15ce6d345a6b3c73", "score": "0.51907307", "text": "function getWorkingDays($leave_start_date,$endDate)\n\t\t\t{\n\t\t\t\t $endDate = strtotime($endDate);\n\t\t\t\t $leave_start_date = strtotime($leave_start_date);\n\n\n\t\t\t\t //The total number of days between the two dates. We compute the no. of seconds and divide it to 60*60*24\n\t\t\t\t //We add one to inlude both dates in the interval.\n\t\t\t\t $days = ($endDate - $leave_start_date) / 86400 + 1;\n\n\t\t\t\t $no_full_weeks = floor($days / 7);\n\t\t\t\t $no_remaining_days = fmod($days, 7);\n\n\t\t\t\t //It will return 1 if it's Monday,.. ,7 for Sunday\n\t\t\t\t $the_first_day_of_week = date(\"N\", $leave_start_date);\n\t\t\t\t $the_last_day_of_week = date(\"N\", $endDate);\n\n\t\t\t\t //---->The two can be equal in leap years when february has 29 days, the equal sign is added here\n\t\t\t\t //In the first case the whole interval is within a week, in the second case the interval falls in two weeks.\n\t\t\t\t if ($the_first_day_of_week <= $the_last_day_of_week) \n\t\t\t\t {\n\t\t\t\t if ($the_first_day_of_week <= 6 && 6 <= $the_last_day_of_week) $no_remaining_days--;\n\t\t\t\t if ($the_first_day_of_week <= 7 && 7 <= $the_last_day_of_week) $no_remaining_days--;\n\t\t\t\t }\n\t\t\t\t else \n\t\t\t\t {\n\t\t\t\t // (edit by Tokes to fix an edge case where the start day was a Sunday\n\t\t\t\t // and the end day was NOT a Saturday)\n\n\t\t\t\t // the day of the week for start is later than the day of the week for end\n\t\t\t\t if ($the_first_day_of_week == 7) \n\t\t\t\t {\n\t\t\t\t // if the start date is a Sunday, then we definitely subtract 1 day\n\t\t\t\t $no_remaining_days--;\n\n\t\t\t\t if ($the_last_day_of_week == 6) \n\t\t\t\t {\n\t\t\t\t // if the end date is a Saturday, then we subtract another day\n\t\t\t\t $no_remaining_days--;\n\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t else \n\t\t\t\t {\n\t\t\t\t // the start date was a Saturday (or earlier), and the end date was (Mon..Fri)\n\t\t\t\t // so we skip an entire weekend and subtract 2 days\n\t\t\t\t $no_remaining_days -= 2;\n\t\t\t\t }\n\t\t\t\t }\n\n\t\t\t\t //The no. of business days is: (number of weeks between the two dates) * (5 working days) + the remainder\n\t\t\t\t\t//---->february in none leap years gave a remainder of 0 but still calculated weekends between first and last day, this is one way to fix it\n\t\t\t\t $workingDays = $no_full_weeks * 5;\n\t\t\t\t if ($no_remaining_days > 0 )\n\t\t\t\t {\n\t\t\t\t $workingDays += $no_remaining_days;\n\t\t\t\t } \n\t\t\t\t return $workingDays;\n\t\t\t}", "title": "" }, { "docid": "7f1fd09e95aef97fe102b7d7ed8b76ae", "score": "0.5183", "text": "function add_sub_days_months($start_date,$str_time_span){\n $next_date = new DateTime($start_date);\n //echo $next_date->format('Y-m-d'). \"<br />\";\n\n if (strchr($str_time_span,\"D\") ==\"D\"){\n $pos = strpos($str_time_span,\"D\");\n $num_days = substr($str_time_span,0,$pos);\n add_days($next_date,$num_days);\n ///echo $num_days . \"<br />\";\n //$next_date ->add(new DateInterval('P'.$num_days.'D'));\n //echo $next_date->format('Y-m-d');\n }elseif (strchr($str_time_span,\"M\") ==\"M\"){\n $pos = strpos($str_time_span,\"M\");\n $num_months = substr($str_time_span,0,$pos);\n //echo $num_months .\"<br />\";\n add_months($next_date, $num_months);\n //echo $next_date->format('Y-m-d');\n }else{\n echo \"Check format of para: str_next_payment\";\n return null;\n }\n return $next_date->format('Y-m-d');\n}", "title": "" }, { "docid": "b8e9e3c0c58ce4e591623719a44c96d8", "score": "0.5181862", "text": "function repeat_every_month($value,$difference,$start_date,$end_date,$user_current_datetime){\n\n $resArr = array();\n\n for ($i=0; $i <= $difference; $i++) {\n\n if( ( strtotime($start_date) > strtotime(date('d-m-Y',strtotime($value->start_date.\"\".$i.\" month\"))) \n\n && strtotime(date('d-m-Y',strtotime($start_date))) > strtotime(date('d-m-Y',strtotime($value->end_date.\" +\".$i.\" month\"))) )\n\n || strtotime($end_date) < strtotime(date('d-m-Y',strtotime($value->start_date.\"\".$i.\" month\")))){\n\n continue;\n\n }\n\n $resArr[$i]['event_id'] = (string) $value->event_id;\n\n $resArr[$i]['event_type'] = (string) $value->event_type;\n\n $resArr[$i]['is_completed'] = (string) $value->is_completed;\n\n $resArr[$i]['user_id'] = (string) $value->user_id;\n\n $resArr[$i]['title'] = $value->title;\n\n $resArr[$i]['all_day'] = (string) $value->all_day;\n\n $resArr[$i]['start_date'] = date('d-m-Y',strtotime($value->start_date.\"\".$i.\" month\" ));\n\n $resArr[$i]['start_time'] = $value->start_time;\n\n $resArr[$i]['end_date'] = date('d-m-Y',strtotime($value->end_date.\"\".$i.\" month\"));\n\n $resArr[$i]['end_time'] = $value->end_time;\n\n $resArr[$i]['repeat_mode'] = $value->repeat_mode;\n\n $resArr[$i]['created_at'] = $value->created_at;\n\n $resArr[$i]['updated_at'] = $value->updated_at;\n\n $resArr[$i]['set_reminder'] = $value->set_reminder;\n\n $resArr[$i]['reminder_date_time'] = $value->reminder_date_time;\n\n $resArr[$i]['notification_type'] = $value->notification_type;\n\n $resArr[$i]['notification'] = $value->notification;\n\n $resArr[$i]['custom_notification'] = (isset($value->custom_notification) && $value->custom_notification != \"\")? json_decode($value->custom_notification,true) : array();\n\n $resArr[$i]['location'] = (isset($value->location) && $value->location != \"\")? $value->location : \"\";\n\n } \n\n return $resArr;\n\n }", "title": "" }, { "docid": "ee5dee86899b04cdedbdd374c027e2b0", "score": "0.5163497", "text": "protected function getStartEndDate(): array\n {\n $dataRange = [\n 'yesterday' => [\n 'start' => date('Ymd', strtotime('yesterday')),\n 'end' => date('Ymd'),\n ],\n 'past_seven_days' => [\n 'start' => date('Ymd', strtotime('-7 days')),\n 'end' => date('Ymd'),\n ],\n 'this_month' => [\n 'start' => date('Ym') . '01',\n 'end' => date('Ym') . '31',\n ],\n 'last_month' => [\n 'start' => date('Ym', strtotime('-1 month')) . '01',\n 'end' => date('Ym', strtotime('-1 month')) . '31',\n ],\n 'past_seven_hours' => [\n 'start' => date('Ymd', strtotime('yesterday')),\n 'end' => date('Ymd'),\n ],\n 'today' => [\n 'start' => date('Ymd'),\n 'end' => '',\n ],\n ];\n\n if (empty($dataRange[$this->type])) {\n if (preg_match('/past_([0-9]+)_days/', $this->type, $matches)) {\n $dayCount = $matches[1];\n $startDate = date('Ymd', strtotime('-' . $dayCount . ' days'));\n $endDate = date('Ymd');\n\n $this->periods['past_' . $dayCount . '_days'] = [\n 'timestamp_begin' => strtotime(date('Ymd', strtotime('-' . $dayCount . ' days'))),\n 'timestamp_end' => strtotime('today'),\n 'display_format' => 'D',\n 'display_count' => $dayCount,\n 'period' => 86400,\n ];\n } else {\n $startDate = date('Ymd');\n $endDate = '';\n $this->periods[$this->type] = $this->periods['today'];\n }\n } else {\n $startDate = $dataRange[$this->type]['start'];\n $endDate = $dataRange[$this->type]['end'];\n }\n\n return [\n 'start' => $startDate,\n 'end' => $endDate,\n ];\n }", "title": "" }, { "docid": "485f41b9066c4bfdb8a0cf1d1d270a69", "score": "0.5157311", "text": "function repeat_every_day($value,$difference,$start_date,$end_date,$user_current_datetime){\n\n $resArr = array();\n\n for ($i=0; $i <= $difference; $i++) {\n\n \tif( ( strtotime(date('d-m-Y',strtotime($start_date))) > strtotime(date('d-m-Y',strtotime($value->start_date.\" +\".$i.\" day\")))\n\n && strtotime(date('d-m-Y',strtotime($start_date))) > strtotime(date('d-m-Y',strtotime($value->end_date.\" +\".$i.\" day\"))) )\n\n || strtotime(date('d-m-Y',strtotime($end_date))) < strtotime(date('d-m-Y',strtotime($value->start_date.\" +\".$i.\" day\")))){\n\n \t continue;\n\n \t}\n\n $resArr[$i]['event_id'] = (string) $value->event_id;\n\n $resArr[$i]['event_type'] = (string) $value->event_type;\n\n $resArr[$i]['is_completed'] = (string) $value->is_completed;\n\n $resArr[$i]['user_id'] = (string) $value->user_id;\n\n $resArr[$i]['title'] = $value->title;\n\n $resArr[$i]['all_day'] = (string) $value->all_day;\n\n $resArr[$i]['start_date'] = date('d-m-Y',strtotime($value->start_date.\" +\".$i.\" day\"));\n\n $resArr[$i]['start_time'] = $value->start_time;\n\n $resArr[$i]['end_date'] = date('d-m-Y',strtotime($value->end_date.\" +\".$i.\" day\"));\n\n $resArr[$i]['end_time'] = $value->end_time;\n\n $resArr[$i]['repeat_mode'] = $value->repeat_mode;\n\n $resArr[$i]['created_at'] = $value->created_at;\n\n $resArr[$i]['updated_at'] = $value->updated_at;\n\n $resArr[$i]['set_reminder'] = $value->set_reminder;\n\n $resArr[$i]['reminder_date_time'] = $value->reminder_date_time;\n\n $resArr[$i]['notification_type'] = $value->notification_type;\n\n $resArr[$i]['notification'] = $value->notification;\n\n $resArr[$i]['custom_notification'] = (isset($value->custom_notification) && $value->custom_notification != \"\")? json_decode($value->custom_notification,true) : array();\n\n $resArr[$i]['location'] = (isset($value->location) && $value->location != \"\")? $value->location : \"\";\n\n } \n\n return $resArr;\n\n }", "title": "" }, { "docid": "15a5560f3adc6682201109419262ff15", "score": "0.51352066", "text": "function days_diff($Startzeit, $Endzeit) {\n \n # @return Zeit in Sekunden\n # negativ bedeutet, dass die Endzeit vor der Startzeit liegt\n \n $date1_array=explode(\" \", $Startzeit);\n $date2_array=explode(\" \", $Endzeit);\n\n #print_r($date1_array);\n #print_r($date2_array);\n\n $date1=$date1_array[0];\n $time1=$date1_array[1];\n\n $date2=$date2_array[0];\n $time2=$date2_array[1];\n\n $d1 = explode(\"-\", $date1);\n $y1 = $d1[0];\n $m1 = $d1[1];\n $d1 = $d1[2];\n\n $t1 = explode(\":\", $time1);\n $Stunde1 = $t1[0];\n $Minute1 = $t1[1];\n $Sekunde1 = $t1[2];\n\n $d2 = explode(\"-\", $date2);\n $y2 = $d2[0];\n $m2 = $d2[1];\n $d2 = $d2[2];\n\n $t2 = explode(\":\", $time2);\n $Stunde2 = $t2[0];\n $Minute2 = $t2[1];\n $Sekunde2 = $t2[2];\n \n #out(\"$Stunde1, $Minute1, $Sekunde1, $m1, $d1, $y1\");\n\n $date1_set = @mktime(0, 0, 0, $m1, $d1, $y1);\n $date2_set = @mktime(0, 0, 0, $m2, $d2, $y2);\n\n $Differenz=round((($date2_set-$date1_set)/60/60/24), 0); #in Tagen!\n\n #shout($Startzeit);\n\n\n return $Differenz;\n\n\n}", "title": "" }, { "docid": "c2a6689fd810ca2340996210b441e19a", "score": "0.5127831", "text": "public function generate_chart_date($start, $end){\n\t\t$n = $this->Home->diff_date($start, $end);\n\t\t$i = 0;\t\t\n\t\twhile($n >= $i){\n\t\t\t$date = date('Y-m-d', strtotime($end. '-'.$i.' days'));\n\t\t\t$chart_date[] = $date;\n\t\t\t$i++;\n\t\t}\t\t\n\t\t$this->set('chartDate', $chart_date);\n\t\t$this->set('noDays', $n);\n\t\treturn $chart_date;\n\t}", "title": "" }, { "docid": "92faf53d569caba8c78a20b3ee4c1f15", "score": "0.51266384", "text": "function getDateForSpecificDayBetweenDates($start, $end, $weekday)\n {\n $weekdays=\"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday\";\n $arr_weekdays=explode(\",\", $weekdays);\n $arr_weekdays_day = explode(\",\", $weekday);\n //print_r($arr_weekdays_day);\n $i = 1;\n\t\t$string='';\n foreach($arr_weekdays_day as $weekdays)\n {\n\t\t\tif($weekdays==1){$weekdays=0;}elseif($weekdays==2){$weekdays=1;}elseif($weekdays==3){$weekdays=2;}elseif($weekdays==4){$weekdays=3;}elseif($weekdays==5){$weekdays=4;}elseif($weekdays==6){$weekdays=5;}elseif($weekdays==7){$weekdays=6;}\n $weekday = $arr_weekdays[$weekdays];\n if(!$weekday)\n $this->inventory_model->store_error(current_user_type(),hotel_id(),\"2\",'Invalid WeekDay','Bulk Update',date('m/d/Y h:i:s a', time()));\n $starts\t= strtotime(\"+0 day\", strtotime($start) );\n\t\t\t//$starts\t= strtotime($start);\n $ends\t= strtotime($end);\n //$dateArr = array();\n $friday = strtotime($weekday, $starts);\n while($friday <= $ends)\n {\n /*$dateArr[] = date(\"Y-m-d\", $friday);\n $friday = strtotime(\"+1 weeks\", $friday);*/\n $dateArr[] = date(\"Y-m-d\", $friday);\n $date \t= date(\"Y-m-d\", $friday);\n $string .= \"value\".$i.\"='\".$date.\"' \";\n $friday = strtotime(\"+1 weeks\", $friday);\n $i++;\n }\n //$dateArr[] = date(\"Y-m-d\", $friday);\n }\n\t\t//echo $string.'<br>';\n //return $dateArr;\n return $string;\n }", "title": "" }, { "docid": "4205a61780828918ef04941406fca53d", "score": "0.5120564", "text": "function betweenDays($start = null, $end = null) {\r\n if($start == null || $end == null) {\r\n echo \"Parameter null\";\r\n exit();\r\n }\r\n\r\n // array kosong\r\n $array = array(); \r\n\r\n // interval 1 hari\r\n $interval = new DateInterval('P1D'); \r\n \r\n $realEnd = new DateTime($end); \r\n $realEnd->add($interval); \r\n \r\n $period = new DatePeriod(new DateTime($start), $interval, $realEnd); \r\n \r\n // looping\r\n foreach($period as $date) { \r\n $array[] = $date->format('Y-m-d'); \r\n } \r\n \r\n //return\r\n return $array; \r\n}", "title": "" }, { "docid": "b0983c1898794729c9bfac476fe7e7b9", "score": "0.51194835", "text": "function startEndDates($y,$m,$wk)\n{ \n\n//find out any date that falls on the week\n$found = false;\n$i = 1;\n$totDays = date(\"t\",mktime(0,0,0,$m,1,$y));\n\n\tdo\n\t{\n\tif (date(\"W\",mktime(0,0,0,$m,$i,$y)) == $wk)\n\t\t{\n\t\t\t$found = true;\n\t\t\t\n\t\t}\n\telse\n\t\t{\t$i = $i + 7;\t}\n\t\t\n\t\n\t}\n\t\n\twhile ($found == false);\n\n\t\n\t$TimeStamp=mktime(0,0,0,$m,$i,$y); \n \n//calculate first & last date of the wk 0 mon, 7 sun \t\n $DateArray[0] = date('Y-m-d',mktime(0,0,0,date('m',$TimeStamp),date \n('d',$TimeStamp)-date('w',$TimeStamp)+1,date('Y',$TimeStamp))); \n\n $DateArray[1] = date('Y-m-d',mktime(0,0,0,date('m',$TimeStamp),date \n('d',$TimeStamp)-date('w',$TimeStamp)+7,date('Y',$TimeStamp))); \n \n \n \n return $DateArray; \n}", "title": "" }, { "docid": "6bb56aaf5b792937b6383635ab3faa92", "score": "0.5115035", "text": "public function percentage_of_single_day() {\n\t\t\n\t\t// Fetch times, in format %Y-%m-%d %g:%i %a\n\t\t$start_time = $this->EE->TMPL->fetch_param('start_time');\n\t\t$end_time = $this->EE->TMPL->fetch_param('end_time');\n\t\t$date_format = $this->EE->TMPL->fetch_param('format');\n\t\t$total_pixels = $this->EE->TMPL->fetch_param('total_pixels');\n\n\t\t// Parse Dates\n\t\t$start_date = DateTime::createFromFormat($date_format, $start_time);\n\t\t$end_date = DateTime::createFromFormat($date_format, $end_time);\n\n\t\t// If the days are the same, but the end hour is less\n\t\t// than the start hour, increment the end date. This deals\n\t\t// with a bug in the calendar module\n\t\tif (($start_date->format('d') == $end_date->format('d'))\n\t\t\t&& $end_date->format('G') < $start_date->format('G')) {\n\t\t\t$end_date->add(new DateInterval('P1D'));\n\t\t}\n\n\t\t// Some counters\n\t\t$day_start_hour = 7; // Day starts at xAM\n\t\t$hours_per_day = 24 - $day_start_hour + 1; // We include 12am here\n\n\t\t// Start and end hours\n\t\t$start_hour = $start_date->format('H') - $day_start_hour;\n\t\t$end_hour = $end_date->format('H') - $day_start_hour;\n\n\t\t// Add half hours\n\t\t$start_hour += ($start_date->format('i') < 30) ? 0 : 0.5;\n\t\t$end_hour += ($end_date->format('i') < 30) ? 0 : 0.5;\n\n\t\t// Account for 12am the next day\n\t\tif ($end_date->format('H') == 0 && $end_date->format('i') <= 30) {\n\t\t\t$end_hour = $hours_per_day - 1;\n\t\t}\n\n\t\t// Account for 12:30am the next day\n\t\tif ($end_date->format('H') == 0 && $end_date->format('i') >= 30) {\n\t\t\t$end_hour = $hours_per_day - 0.5;\n\t\t}\n\n\t\t// Account for 1am the next day\n\t\tif ($end_date->format('H') == 1) {\n\t\t\t$end_hour = $hours_per_day;\n\t\t}\n\n\t\t// Running time in seconds\n\t\t$running_seconds = $end_date->getTimestamp() - $start_date->getTimestamp();\n\n\t\t// Calculate Ratios\n\t\tif ($running_seconds == 0) {\n\n\t\t\t// \"All Day\" Event\n\t\t\t$start_time_ratio = 0;\n\t\t\t$running_time_ratio = 100;\n\n\t\t} else {\n\t\t\t\n\t\t\t// Intraday Event\n\t\t\t$start_time_ratio = $start_hour / $hours_per_day;\n\t\t\t$running_time_ratio = ($end_hour - $start_hour) / $hours_per_day;\n\n\t\t}\n\n\t\t// Vars\n\t\treturn $this->EE->TMPL->parse_variables($this->EE->TMPL->tagdata, array(\n\t\t\tarray(\n\t\t\t\t'start_time_percentage' => floor($start_time_ratio * 100),\n\t\t\t\t'running_time_percentage' => ceil($running_time_ratio * 100),\n\t\t\t\t'start_time_pixels' => floor($start_time_ratio * $total_pixels),\n\t\t\t\t'running_time_pixels' => ceil($running_time_ratio * $total_pixels),\n\t\t\t)\n\t\t));\n\n\t}", "title": "" }, { "docid": "765e35ee11c6c644114ab1b075c795c9", "score": "0.5114542", "text": "function rekursif_group(){\n $this->load->model('a_risan_model');\n $query = $this->a_risan_model->selectGroup();\n // echo $query[0]->batas;\n // echo date('Y-m-d');\n if($query[0]->batas <= date('Y-m-d') and $query[0]->total > 0){\n $data['group'] = $query[0]->group + 1;\n $data['month'] = date('m',strtotime($query[0]->batas))+1;\n\t\t\tif( $data['month'] >= 13){\n\t\t\t\t$data['month'] = $data['month'] - 12;\n\t\t\t}\n $data['batas'] = $query[0]->batas;\n $this->a_risan_model->insertGroup($data);\n //echo \"group\";\n return $this->rekursif_group();\n }elseif($query[0]->total >= $query[0]->jumlah){\n $data['group'] = $query[0]->group + 1;\n $data['month'] = date('m',strtotime($query[0]->batas));\n $data['batas'] = $query[0]->batas;\n $this->a_risan_model->insertGroup($data);\n // echo \"group\";\n return $this->rekursif_group();\n }elseif($query[0]->batas <= date('Y-m-d') and $query[0]->total == 0){\n $data['group'] = $query[0]->group;\n $data['month'] = date('m',strtotime($query[0]->batas))+1;\n\t\t\tif( $data['month'] >= 13){\n\t\t\t\t$data['month'] = $data['month'] - 12;\n\t\t\t}\n $data['batas'] = $query[0]->batas;\n $this->a_risan_model->updateGroup($data);\n // echo \"group\";\n return $this->rekursif_group();\n }else{\n //echo \"yuhuu<br/>\";\n return $query;\n }\n }", "title": "" }, { "docid": "8399c19a86ec65ab8c75808db9fc33ae", "score": "0.51102513", "text": "public function prepare_chart_data($data, $date_key, $data_key, $interval, $start_date, $group_by)\n {\n }", "title": "" }, { "docid": "e43480c501a4098b5373fd193c5fedbb", "score": "0.5110173", "text": "public function getEventBetweenByDay(\\DateTime $start ,\\DateTime $end):array{\n\n $plannings=$this->getEventBetween($start,$end);\n $days=[];\n foreach ($plannings as $planning){\n $date= explode (' ',$planning ['start'])[0];\n if(!isset($day[$date])){\n $days[$date]=[$planning];\n }else{\n $days[$date][]=$planning;\n }\n }\n return $days;\n }", "title": "" }, { "docid": "0aec9f8ee7d68d663da339be2e7deb3f", "score": "0.5109464", "text": "public function run()\n {\n $values = [\n [\n 'day' => 2,\n 'start_time' => '14:00',\n 'end_time' => '16:00',\n 'active' => 1,\n ],\n [\n 'day' => 2,\n 'start_time' => '16:00',\n 'end_time' => '18:00',\n 'active' => 1,\n ],\n [\n 'day' => 3,\n 'start_time' => '14:00',\n 'end_time' => '16:00',\n 'active' => 1,\n ],\n [\n 'day' => 3,\n 'start_time' => '16:00',\n 'end_time' => '18:00',\n 'active' => 1,\n ],\n [\n 'day' => 4,\n 'start_time' => '14:00',\n 'end_time' => '16:00',\n 'active' => 1,\n ],\n [\n 'day' => 4,\n 'start_time' => '16:00',\n 'end_time' => '18:00',\n 'active' => 1,\n ],\n [\n 'day' => 5,\n 'start_time' => '14:00',\n 'end_time' => '16:00',\n 'active' => 1,\n ],\n [\n 'day' => 5,\n 'start_time' => '16:00',\n 'end_time' => '18:00',\n 'active' => 1,\n ],\n [\n 'day' => 6,\n 'start_time' => '10:00',\n 'end_time' => '12:00',\n 'active' => 1,\n ],\n [\n 'day' => 6,\n 'start_time' => '12:30',\n 'end_time' => '14:30',\n 'active' => 1,\n ],\n [\n 'day' => 6,\n 'start_time' => '15:00',\n 'end_time' => '17:00',\n 'active' => 1,\n ],\n ];\n\n DB::table('schedules')->insert($values);\n }", "title": "" }, { "docid": "687d08d0c11e965a1775149ce7f2fc08", "score": "0.5086383", "text": "function add_event_to_array($dates, $page_data){\n foreach ($page_data['dates'] as $date) {\n\n $start_date = $date->{'start-date'} / 1000;\n $end_date = $date->{'end-date'} / 1000;\n $specific_start = date(\"Y-m-d\", $start_date );\n $specific_end = date(\"Y-m-d\", $end_date );\n\n $page_data['specific_start'] = $date->{'start-date'};\n $page_data['specific_end'] = $date->{'end-date'};\n $page_data['specific_all_day'] = $date->{'all-day'};\n\n if($specific_start == $specific_end){\n //Don't need a date range.\n $key = date(\"Y-m-d\", $start_date);\n // Check if this date has events already\n if (isset($dates[$key])) {\n array_push($dates[$key], $page_data );\n //Otherwise add a new array with this event for this date.\n } else {\n $dates[$key] = array($page_data);\n }\n }else{\n $page_data['specific_all_day'] = true;\n $start = date(\"Y-n-j\", $start_date);\n // Add 1 day to $end so that the DatePeriod includes the last day in 'end-date'\n $end = date(\"Y-n-j\", strtotime('+1 day', $end_date));\n // Create a date period for each of the dates this event-date spans.\n // This will put it on the calendar each day.\n\n $period = new DatePeriod(\n new DateTime($start),\n new DateInterval('P1D'),\n new DateTime($end)\n );\n\n\n // Add a listing to the array for each event / event date\n foreach ($period as $date) {\n $key = $date->format('Y-m-d');\n\n // Check if this date has events already\n if (isset($dates[$key])) {\n array_push($dates[$key], $page_data);\n //Otherwise add a new array with this event for this date.\n } else {\n $dates[$key] = array($page_data);\n }\n\n }\n }\n }\n return $dates;\n}", "title": "" }, { "docid": "a04d19cbc078132cde5a5b8dc151a2d7", "score": "0.5064342", "text": "function repeat_every_year($value,$difference,$start_date,$end_date,$user_current_datetime){\n\n $resArr = array();\n\n for ($i=0; $i <= $difference; $i++) {\n\n \n\n if( ( strtotime($start_date) > strtotime(date('d-m-Y',strtotime($value->start_date.\"\".$i.\" year\"))) \n\n && strtotime(date('d-m-Y',strtotime($start_date))) > strtotime(date('d-m-Y',strtotime($value->end_date.\" +\".$i.\" year\"))) )\n\n || strtotime($end_date) < strtotime(date('d-m-Y',strtotime($value->start_date.\"\".$i.\" year\")))){\n\n continue;\n\n }\n\n\n\n $resArr[$i]['event_id'] = (string) $value->event_id;\n\n $resArr[$i]['event_type'] = (string) $value->event_type;\n\n $resArr[$i]['is_completed'] = (string) $value->is_completed;\n\n $resArr[$i]['user_id'] = (string) $value->user_id;\n\n $resArr[$i]['title'] = $value->title;\n\n $resArr[$i]['all_day'] = (string) $value->all_day;\n\n $resArr[$i]['start_date'] = date('d-m-Y',strtotime($value->start_date.\"\".$i.\" year\" ));\n\n $resArr[$i]['start_time'] = $value->start_time;\n\n $resArr[$i]['end_date'] = date('d-m-Y',strtotime($value->end_date.\"\".$i.\" year\"));\n\n $resArr[$i]['end_time'] = $value->end_time;\n\n $resArr[$i]['repeat_mode'] = $value->repeat_mode;\n\n $resArr[$i]['created_at'] = $value->created_at;\n\n $resArr[$i]['updated_at'] = $value->updated_at;\n\n $resArr[$i]['set_reminder'] = $value->set_reminder;\n\n $resArr[$i]['reminder_date_time'] = $value->reminder_date_time;\n\n $resArr[$i]['notification_type'] = $value->notification_type;\n\n $resArr[$i]['notification'] = $value->notification;\n\n $resArr[$i]['custom_notification'] = (isset($value->custom_notification) && $value->custom_notification != \"\")? json_decode($value->custom_notification,true) : array();\n\n $resArr[$i]['location'] = (isset($value->location) && $value->location != \"\")? $value->location : \"\";\n\n } \n\n return $resArr;\n\n }", "title": "" }, { "docid": "e745e0b26680009bb19f7a0fada2d448", "score": "0.5063502", "text": "function groupRecords($records) {\n\n if(!is_array($records) || empty($records)) return;\n\n $groups = array('year' => array());\n\n // walk through dates\n foreach($records as $entry) {\n $data = $entry->getData($this->get('id'));\n if(!is_array($data['start'])) $data['start'] = array($data['start']);\n if(!is_array($data['end'])) $data['end'] = array($data['end']);\n // create calendar\n foreach($data['start'] as $id => $start) {\n $start = date('Y-m-01', strtotime($start));\n if($data['end'][$id] == \"0000-00-00 00:00:00\") $data['end'][$id] = $start;\n $end = date('Y-m-01', strtotime($data['end'][$id]));\n $starttime = strtotime($start);\n $endtime = strtotime($end);\n // find matching months\n while($starttime <= $endtime) {\n $year = date('Y', $starttime);\n $month[1] = date('n', $starttime);\n $month[2] = date('m', $starttime);\n // add entry\n $groups['year'][$year]['attr']['value'] = $year;\n $groups['year'][$year]['groups']['month'][$month[1]]['attr']['value'] = $month[2];\n $groups['year'][$year]['groups']['month'][$month[1]]['records'][] = $entry;\n // jump to next month\n $starttime = strtotime(date('Y-m-01', $starttime) . ' +1 month');\n }\n }\n }\n\n // sort years and months\n ksort($groups['year']);\n foreach($groups['year'] as $year) {\n $current = $year['attr']['value'];\n ksort($groups['year'][$current]['groups']['month']);\n }\n\n // return calendar groups\n return $groups;\n\n\t}", "title": "" }, { "docid": "1b360f730e44379a6f117f8f6c81d361", "score": "0.5056397", "text": "public function getRecurrences($intervalStart, $intervalEnd)\r\n {\r\n\r\n if ($intervalStart > $intervalEnd)\r\n throw new qCal_DateTime_Exception_InvalidRecur('Start date must come before end date');\r\n if (!$this->interval)\r\n throw new qCal_DateTime_Exception_InvalidRecur('You must specify an interval');\r\n\r\n $startDate = $this->dtstart->getDate()->getUnixTimestamp(false);\r\n if ($intervalStart < $startDate)\r\n {\r\n $intervalStart = $startDate;\r\n }\r\n if ($this->until())\r\n {\r\n $endDate = $this->until()->getDate()->getUnixTimestamp(false);\r\n if ($endDate < $intervalEnd)\r\n {\r\n $intervalEnd = $endDate;\r\n }\r\n }\r\n\r\n if ($intervalStart > $intervalEnd)\r\n {\r\n return array();\r\n }\r\n\r\n\r\n $filters = array();\r\n\r\n switch ($this->freq)\r\n {\r\n case \"DAILY\":\r\n $filters['daily'] = new qCal_DateTime_Recur_Filter_Daily($startDate, $this->interval, $this->count);\r\n break;\r\n case \"WEEKLY\":\r\n $filters['weekly'] = new qCal_DateTime_Recur_Filter_Weekly($startDate, $this->interval, $this->count);\r\n break;\r\n case \"MONTHLY\":\r\n //@todo\r\n break;\r\n case \"YEARLY\":\r\n //@todo\r\n break;\r\n\r\n default:\r\n throw new qCal_DateTime_Exception_InvalidRecur(\"Invalid recur freq {$this->freq}\");\r\n }\r\n\r\n if (isset($this->byday))\r\n {\r\n $filters['byday'] = new qCal_DateTime_Recur_Filter_ByDay($this->byday);\r\n }\r\n if (isset($this->bymonthday))\r\n {\r\n $filters['bymonthday'] = new qCal_DateTime_Recur_Filter_ByMonthDay($this->bymonthday);\r\n }\r\n if (isset($this->byyearday))\r\n {\r\n $filters['byyearday'] = new qCal_DateTime_Recur_Filter_ByYearDay($this->byyearday);\r\n }\r\n if (isset($this->byweekno))\r\n {\r\n $filters['byweekno'] = new qCal_DateTime_Recur_Filter_ByWeekNo($this->byweekno);\r\n }\r\n if (isset($this->bymonth))\r\n {\r\n $filters['bymonth'] = new qCal_DateTime_Recur_Filter_ByMonth($this->bymonth);\r\n }\r\n\r\n $ret = $this->doGetRecurrences($filters, $intervalStart, $intervalEnd);\r\n\r\n return $ret;\r\n }", "title": "" }, { "docid": "78d3c930681ecd9b4baaf06c0f0984ad", "score": "0.50526017", "text": "function calculate_graph_timeperiod($view,$start,$end)\n{\n\t//time selections from frontend\n\t$pnpviews = array('-4h', '-24h', '-7d', '-30d','-365d'); \n\t//timestamp conversions for PNP views \n\t$pnpstamps = array((60*60*4), (60*60*24), (60*60*24*7), (60*60*24*30), (60*60*24*365) ); \n\t\n\t//calculate all possible combos and return start/end string \t \n\t//default PNP views, no start/end defined \n\tif($view !='' && $start == '' && $end == '') $timeperiod = \" --start={$pnpviews[$view]} \"; \n\t//specific date\n\telseif($start != '' && $end != '') $timeperiod = \" --start=$start --end=$end \";\n\t//end/view combo\n\telseif($view != '' && $end !='' && $start == '') \n\t{\n\t\t$s = $end - $pnpstamps[$view]; //calculate starting timestamp\n\t\t$timeperiod = \" --start={$s} --end={$end} \"; \n\t}\t\n\t\n\telse $timeperiod = '';\n\t\n\treturn $timeperiod;\n\n}", "title": "" }, { "docid": "323c0fc3615cee1955fba2a342ae90ab", "score": "0.50378424", "text": "public function actionCreateDailyReportBeforeExtend($startDay_str = '', $endDay_str = '') {\n\t\tif($startDay_str == '') {\n\t\t\t$startDay_str = date('Y-m-d 00:00:00', (time() - 60*60*15));\n\t\t}\n\t\tif($endDay_str == '') {\n\t\t\t$endDay_str = date('Y-m-d 00:00:00', time() + 60*60*7); //them 7 tieng de tranh truong hop bi sai gio tren server\n\t\t}\n\t\t// \techo $startDay_str;\n\t\t// \techo \" *** \".$endDay_str;\n\n\t\t$startDay = strtotime($startDay_str);\n\t\t$endDay = strtotime($endDay_str);\n\n\t\t$reportBeforeExtend = BeforeExtendReport::model()->findByAttributes(array('create_date' => $startDay_str));\n\t\tif($reportBeforeExtend != NULL) {\n\t\t\techo \"report for $startDay_str has been created. Exit \\n\";\n\t\t\treturn;\n\t\t}\n\n\t\t$arrReportCanGiaHan = ExtendTransactionReport::model()->findAllBySql(\"select * from extend_transaction_report where create_date between '$startDay_str' and '$endDay_str'\");\n\t\t$countCanGiaHan = 0;\n\t\t$count7CanGiaHan = 0;\n\t\t$count30CanGiaHan = 0;\n\t\t$countCanTruyThu = 0;\n\t\t$count7CanTruyThu = 0;\n\t\t$count30CanTruyThu = 0;\n\t\tforeach($arrReportCanGiaHan as $report) {\n\t\t\tif($report->extend_type == ExtendTransactionReport::EXTEND_TYPE_CAN_GIA_HAN) {\n\t\t\t\tif($report->service_id == $this->PHIM7) {\n\t\t\t\t\t$count7CanGiaHan += $report->subscriber_count;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if($report->extend_type == ExtendTransactionReport::EXTEND_TYPE_CAN_TRUY_THU) {\n\t\t\t\tif($report->service_id == $this->PHIM7) {\n\t\t\t\t\t$count7CanTruyThu += $report->subscriber_count;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\techo $count7CanGiaHan.\"\\n\";\n\t\techo $count7CanTruyThu.\"\\n\";\n\n\t\t$reportBeforeExtend = new BeforeExtendReport();\n\t\t$reportBeforeExtend->create_date = $startDay_str;\n\t\t$reportBeforeExtend->can_gia_han_phim7 = $count7CanGiaHan;\n\t\t$reportBeforeExtend->can_truy_thu7 = $count7CanTruyThu;\n\t\tif(!$reportBeforeExtend->save()) {\n\t\t\tprint_r($reportBeforeExtend->getErrors());\n\t\t\techo \"Create report beforeExtend for $startDay_str failed\";\n\t\t\treturn;\n\t\t}\n\t\techo \"Create report beforeExtend for $startDay_str successfully\";\n\t}", "title": "" }, { "docid": "fe34b26f6fa692733d5dc1334b7c19d1", "score": "0.50343806", "text": "public static function periodRange(){\n\t\t$list = Yii::app()->db->createCommand('select left(soldon, 7) as mnth from sale group by 1 order by 1')->queryAll();\n\t\t$rs=array();\n\t\tforeach($list as $item)\n\t\t\t$rs[$item['mnth']]=$item['mnth'];\n\t\t//add one more item\n\t\t$myDate = new DateTime($item['mnth'] . '-01', new DateTimeZone('America/Los_Angeles'));\n\t\t$myDate->add(new DateInterval('P1M'));\n\t\t$strMyDate = date_format($myDate, \"Y-m\");\n\t\t$rs[$strMyDate]=$strMyDate;\n\t\t\n\t\treturn $rs;\n\t}", "title": "" }, { "docid": "6bc6435f75913b6cb78f3d29d79ba46e", "score": "0.50306976", "text": "function cal_refresh_interval() {\n\t\t$next_arr_delay = $this->cal_next_arrival_delay();\n\t\t$next_dep_delay = $this->cal_next_departure_delay();\n\t\t$next_dep = $this->cal_next_departure();\n\t\t$next_arr = $this->cal_next_arrival();\n\t\t$groups = array($next_arr_delay, $next_dep_delay, $next_dep, $next_arr);\n\t\tforeach ($groups as $key => $group) {\n\t\t\tif ($group == null) {\n\t\t\t\tunset($groups[$key]);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $this->range_check(min($groups));\n\t}", "title": "" }, { "docid": "b3d42e1e42ed4e77f5217a6b9e88264b", "score": "0.5030324", "text": "public function salesDays() {\n\t\tif ($this->request->data) {\n\t\t\t$eventsCollection = Event::collection();\n\t\t\t$ordersCollection = Order::collection();\n\t\t\t/**** OPTIMISATION ****/\n\t\t\t$eventsCollection->ensureIndex(array('start_date' => 1));\n\t\t\t$eventsCollection->ensureIndex(array('end_date' => 1));\n\t\t\t$ordersCollection->ensureIndex(array('date_created' => 1));\n\t\t\t$data = $this->request->data;\n\t\t\tif (!empty($data['min_date']) && !empty($data['max_date'])) {\n\t\t\t\t//start date\n\t\t\t\t$start_day = date(\"j\",strtotime($data['min_date']));\n\t\t\t\t$start_month = date(\"n\",strtotime($data['min_date']));\n\t\t\t\t$start_year = date(\"Y\",strtotime($data['min_date']));\n\t\t\t\t$start_date = mktime(0, 0, 0, $start_month, $start_day, $start_year);\n\t\t\t\t//end date\n\t\t\t\t$end_year = date(\"Y\",strtotime($data['max_date']));\n\t\t\t\t$end_month = date(\"n\",strtotime($data['max_date']));\n\t\t\t\t$end_day = date(\"j\",strtotime($data['max_date']));\n\t\t\t\t$end_date = mktime(0, 0, 0, $end_month, $end_day, $end_year);\n\t\t\t\t$day = 0;\n\t\t\t\t$conditions_event = array(\n\t\t\t\t\t'start_date' => array(\n\t\t\t\t\t'$gt' => new MongoDate($start_date),\n\t\t\t\t\t'$lte' => new MongoDate($end_date)\n\t\t\t\t));\n\t\t\t\t$events = $eventsCollection->find($conditions_event, array('start_date' => 1));\n\t\t\t\tforeach($events as $event) {\n\t\t\t\t\t$day = 0;\n\t\t\t\t\t$weekday = date('l',$event['start_date']->sec);\n\t\t\t\t\t$selected_day = date('j', $event['start_date']->sec);\n\t\t\t\t\t$selected_month = date('n', $event['start_date']->sec);\n\t\t\t\t\t$selected_year = date('Y', $event['start_date']->sec);\n\t\t\t\t \tdo {\n\t\t\t\t\t\t$start_for_selected_order = mktime(0, 0, 0, $selected_month, ($selected_day + $day), $selected_year);\n\t\t\t\t\t\t$end_for_selected_order = mktime(0, 0, 0, $selected_month, ($selected_day + $day + 1), $selected_year);\n\t\t\t\t\t\tif($day == 0) {\n\t\t\t\t\t\t\t$weekday = date('l',$start_for_selected_order);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$conditions_order = array(\n\t\t\t\t\t\t\t'date_created' => array(\n\t\t\t\t\t\t\t\t'$gt' => new MongoDate($start_for_selected_order),\n\t\t\t\t\t\t\t\t'$lte' => new MongoDate($end_for_selected_order)\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'items.event_id' => (string) $event[\"_id\"]\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$orders = $ordersCollection->find($conditions_order);\n\t\t\t\t\t\tif(empty($graphic_datas[$weekday][5])) {\n\t\t\t\t\t\t\t$graphic_datas[$weekday][5] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(empty($graphic_datas[$weekday][$day])) {\n\t\t\t\t\t\t\t$graphic_datas[$weekday][$day] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tforeach($orders as $order) {\n\t\t\t\t\t\t\tforeach($order['items'] as $item) {\n\t\t\t\t\t\t\t\tif($item[\"event_id\"] == $event[\"_id\"]) {\n\t\t\t\t\t\t\t\t\t$graphic_datas[$weekday][5] += ($item[\"sale_retail\"] * $item[\"quantity\"]);\n\t\t\t\t\t\t\t\t\t$graphic_datas[$weekday][$day] += ($item[\"sale_retail\"] * $item[\"quantity\"]);\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$day++;\n\t\t\t\t\t} while ($day != 5);\n\t\t\t\t}\n\t\t\t}\n\t\t\tforeach($graphic_datas as $day => $data) {\n\t\t\t\t\t$chart_datas[$day][0][0] = '$' . round($graphic_datas[$day][0],2);\n\t\t\t\t\t$chart_datas[$day][1][0] = '$' . round($graphic_datas[$day][1],2);\n\t\t\t\t\t$chart_datas[$day][2][0] = '$' . round($graphic_datas[$day][2],2);\n\t\t\t\t\t$chart_datas[$day][3][0] = '$' . round($graphic_datas[$day][3],2);\n\t\t\t\t\tif (!empty($graphic_datas[$day][4])) {\n\t\t\t\t\t\t$chart_datas[$day][4][0] = '$' . round($graphic_datas[$day][4],2);\n\t\t\t\t\t\t$chart_datas[$day][4][1] = ($graphic_datas[$day][4] / $graphic_datas[$day][5]) * 100;\n\t\t\t\t\t}\n\t\t\t\t\t$chart_datas[$day][0][1] = ($graphic_datas[$day][0] / $graphic_datas[$day][5]) * 100;\n\t\t\t\t\t$chart_datas[$day][1][1] = ($graphic_datas[$day][1] / $graphic_datas[$day][5]) * 100;\n\t\t\t\t\t$chart_datas[$day][2][1] = ($graphic_datas[$day][2] / $graphic_datas[$day][5]) * 100;\n\t\t\t\t\t$chart_datas[$day][3][1] = ($graphic_datas[$day][3] / $graphic_datas[$day][5]) * 100;\n\t\t\t}\n\t\t\tforeach($chart_datas as $key => $value) {\n\t\t\t\t# Create Column3D chart Object\n\t\t\t\t$DailyCharts[$key] = new FusionCharts(\"Column3D\",\"700\",\"350\");\n\t\t\t\t# Set chart attributes\n\t\t\t\t$strParam = \"caption=Sales - Total Revenues: $\" . round($graphic_datas[$key][5],2) . \";xAxisName=Days;yAxisName=Percentage;numberSuffix=%\";\n\t\t\t\t$DailyCharts[$key]->setChartParams($strParam);\n\t\t\t\t# add chart values and category names\n\t\t\t\t$DailyCharts[$key]->addChartDataFromArray($value);\n\t\t\t}\n\t\t}\n\t\t$days = array(\n\t\t\t'0' => 'Sunday',\n\t\t\t'1' => 'Monday',\n\t\t\t'2'=> 'Tuesday',\n\t\t\t'3' => 'Wednesday',\n\t\t\t'4' => 'Thursday',\n\t\t\t'5' => 'Friday',\n\t\t\t'6' => 'Saturday'\n\t\t);\n\t\treturn compact('DailyCharts','days','start_date','end_date');\n\t}", "title": "" }, { "docid": "c5bf60466a5eae2a7d2e7b025b101049", "score": "0.5021007", "text": "function weekend_days($starttime, $duration)\n{\n if ($starttime && $duration)\n {\n $org_st = $starttime;\n\n for ($i = 0;$i < $duration;$i++)\n {\n $daty = date(w, $starttime);\n $startdate = date(\"d-M-Y\", $starttime);\n $starttime = $starttime + (60 * 60 * 24);\n\n if ($daty == 0 || $daty == 6)\n {\n $x = $x + 1;\n # $duration = $duration +1;\n \n }\n else\n {\n $leave = HolidayCheck($startdate);\n if ($leave == 1) $x = $x + 1;\n }\n\n }\n\n }\n if (!$x) $x = 0;\n return $x;\n}", "title": "" }, { "docid": "8b4aa306a948ce065587668593717b98", "score": "0.50174415", "text": "function getDiasUteis($startDate,$endDate,$holidays){\n\t // do strtotime calculations just once\n\t $endDate = strtotime($endDate);\n\t $startDate = strtotime($startDate);\n\t\n\t\n\t //The total number of days between the two dates. We compute the no. of seconds and divide it to 60*60*24\n\t //We add one to inlude both dates in the interval.\n\t $days = ($endDate - $startDate) / 86400 + 1;\n\t\n\t $no_full_weeks = floor($days / 7);\n\t $no_remaining_days = fmod($days, 7);\n\t\n\t //It will return 1 if it's Monday,.. ,7 for Sunday\n\t $the_first_day_of_week = date(\"N\", $startDate);\n\t $the_last_day_of_week = date(\"N\", $endDate);\n\t\n\t //---->The two can be equal in leap years when february has 29 days, the equal sign is added here\n\t //In the first case the whole interval is within a week, in the second case the interval falls in two weeks.\n\t if ($the_first_day_of_week <= $the_last_day_of_week) {\n\t if ($the_first_day_of_week <= 6 && 6 <= $the_last_day_of_week) $no_remaining_days--;\n\t if ($the_first_day_of_week <= 7 && 7 <= $the_last_day_of_week) $no_remaining_days--;\n\t }\n\t else {\n\t // (edit by Tokes to fix an edge case where the start day was a Sunday\n\t // and the end day was NOT a Saturday)\n\t\n\t // the day of the week for start is later than the day of the week for end\n\t if ($the_first_day_of_week == 7) {\n\t // if the start date is a Sunday, then we definitely subtract 1 day\n\t $no_remaining_days--;\n\t\n\t if ($the_last_day_of_week == 6) {\n\t // if the end date is a Saturday, then we subtract another day\n\t $no_remaining_days--;\n\t }\n\t }\n\t else {\n\t // the start date was a Saturday (or earlier), and the end date was (Mon..Fri)\n\t // so we skip an entire weekend and subtract 2 days\n\t $no_remaining_days -= 2;\n\t }\n\t }\n\t\n\t //The no. of business days is: (number of weeks between the two dates) * (5 working days) + the remainder\n\t//---->february in none leap years gave a remainder of 0 but still calculated weekends between first and last day, this is one way to fix it\n\t $workingDays = $no_full_weeks * 5;\n\t if ($no_remaining_days > 0 )\n\t {\n\t $workingDays += $no_remaining_days;\n\t }\n\t\n\t //We subtract the holidays\n\t foreach($holidays as $holiday){\n\t $time_stamp=strtotime($holiday);\n\t //If the holiday doesn't fall in weekend\n\t if ($startDate <= $time_stamp && $time_stamp <= $endDate && date(\"N\",$time_stamp) != 6 && date(\"N\",$time_stamp) != 7)\n\t $workingDays--;\n\t }\n\t\n\t return $workingDays;\n\t}", "title": "" }, { "docid": "40252091dad4fb1b36972ce97e0e604a", "score": "0.5017237", "text": "function vopros_statistics_week_view($start = NULL, $end = NULL) {\n if (!$end) {\n $end = REQUEST_TIME;\n }\n if (!$start) {\n $start = REQUEST_TIME - 86400 * 7;\n }\n\n $result = db_query(\"SELECT DAYNAME(FROM_UNIXTIME(q.created)) AS day_name, COUNT(*) AS questions FROM {vopros_question} AS q\n WHERE created < :end\n AND created > :start\n GROUP BY day_name\", array(':end' => $end, ':start' => $start))->fetchAllKeyed(0, 1);\n\n\n $header = array(t('Week day'), t('Total questions created'));\n $rows = array();\n // Create a unix timestamp for a random date that has the time 00:00:00.\n $weeks = array(\n 'Monday' => t('Monday'),\n 'Tuesday' => t('Tuesday'),\n 'Wednesday' => t('Wednesday'),\n 'Thursday' => t('Thursday'),\n 'Friday' => t('Friday'),\n 'Saturday' => t('Saturday'),\n 'Sunday' => t('Sunday'),\n );\n\n // Create the total count\n foreach ($weeks as $week_day => $label) {\n $rows[$week_day] = array($label, isset($result[$week_day]) ? $result[$week_day] : 0);\n }\n\n // Get statistics for each editorial.\n if (module_exists('vopros_editorial')) {\n $vocab = taxonomy_vocabulary_machine_name_load('vopros_editorial');\n $terms = taxonomy_term_load_multiple(FALSE, array('vid' => $vocab->vid));\n foreach ($terms as $tid => $term) {\n $header[] = $term->name;\n $result = db_query(\"SELECT DAYNAME(FROM_UNIXTIME(q.created)) AS day_name, COUNT(*) AS questions FROM {vopros_question} AS q\n INNER JOIN {field_data_vopros_editorial} AS f ON f.entity_id = q.question_id\n WHERE q.created < :end\n AND q.created > :start\n AND f.vopros_editorial_tid = :tid\n GROUP BY day_name\", array(':tid' => $tid, ':end' => $end, ':start' => $start))->fetchAllKeyed(0, 1);\n foreach ($weeks as $week_day => $label) {\n $rows[$week_day][] = isset($result[$week_day]) ? $result[$week_day] : 0;\n }\n }\n }\n\n $build = array(\n 'form' => drupal_get_form('vopros_statistics_week_form', $start, $end),\n 'table' => array(\n '#theme' => 'table',\n '#header' => $header,\n '#rows' => $rows,\n ),\n );\n return $build;\n}", "title": "" }, { "docid": "0f45c6342793a0fc65bf5943b935f3a8", "score": "0.50078094", "text": "public function computeReport() {\n $now = time();\n $startM = $this->start_month;\n $startD = $this->start_day;\n\n for ($y = $this->start_year; $y <= date('Y'); $y++) {\n\n for ($month=$startM; $month<13; $month++) {\n $startTimestamp = mktime(0, 0, 1, $month, $startD, $y);\n $endTimestamp = mktime(0, 0, 1, ($month + 1), $startD, $y);\n\n if ($startTimestamp > $now) { break; }\n\n $periodStats = new PeriodStats($startTimestamp, $endTimestamp);\n\n $projectList = array();\n\n // only projects for specified team, except excluded projects\n $query = \"SELECT project_id FROM `codev_team_project_table` \".\n \"WHERE team_id = $this->teamid \".\n \"AND codev_team_project_table.type <> \".Project::type_noStatsProject;\n\n $result = SqlWrapper::getInstance()->sql_query($query);\n if (!$result) {\n echo \"<span style='color:red'>ERROR: Query FAILED</span>\";\n exit;\n }\n while($row = SqlWrapper::getInstance()->sql_fetch_object($result)) {\n $projectList[] = $row->project_id;\n }\n\n $periodStats->projectList = $projectList;\n $periodStats->computeStats();\n $this->periodStatsList[$startTimestamp] = $periodStats;\n $startD = 1;\n }\n $startM = 1;\n }\n\n return $this->periodStatsList;\n }", "title": "" }, { "docid": "975525fdb299657ae8468d4471ce32b0", "score": "0.49977452", "text": "public function testExample()\n {\n\n // $dateStr = '2017-4-7 00:00:00';\n \n \n // $start = date_create($dateStr);\n // $end = date_create($dateStr);\n \n \n \n // $i = 0;\n // $datafac = new ReportUserrbSubDayData();\n // //$datafac->makeAllDayReport();\n // //$datafac->makeSettlement(\"2017-04-06 0:00:00\",\"2017-04-07 0:00:00\",\"CYC01\");\n \n // // while($i<69){\n // dump(\"Begin.\");\n // date_add($end,date_interval_create_from_date_string(\"1 day\"));\n // dump($start);\n // dump($end); \n\n // $userFac = new UserData();\n\n // // $pageSize = 100;\n // // $pageIndex = 1;\n // $result = $userFac->query([],$pageSize,$pageIndex);\n // while($pageIndex<=($result[\"pageCount\"])){ \n // foreach($result[\"items\"] as $resultitem){\n \n // $datafac->createReport(\n // date_format($start,\"Y-m-d H:00:00\"),\n // date_format($end,\"Y-m-d H:00:00\"),\n // \"CYC01\"); \n // // $datafac->makeReport(\"RUR2017070315112107465\",3);\n // // }\n // // $pageIndex ++;\n // // $result = $userFac->query([],$pageSize,$pageIndex); \n // //}\n \n // date_add($start,date_interval_create_from_date_string(\"1 day\"));\n \n // // $i++;\n \n // // }\n \n // $this->assertTrue(true);\n }", "title": "" }, { "docid": "2fdb69132917ba148d4ef5663dab7b81", "score": "0.49937958", "text": "function getDateRange($week) {\n // Check if the $nextWeek parameter was provided.\n if($week == 'this week') {\n // This switch statement check the current day of the week.\n // Depending on the day, we build an array to hold strings of the 7 days of the current week.\n switch (date(\"l\")) {\n case \"Monday\":\n $dateRange = array (\n gmdate(\"m/d/Y\", strtotime(\"this Monday\")),\n gmdate(\"m/d/Y\", strtotime(\"this Tuesday\")),\n gmdate(\"m/d/Y\", strtotime(\"this Wednesday\")),\n gmdate(\"m/d/Y\", strtotime(\"this Thursday\")),\n gmdate(\"m/d/Y\", strtotime(\"this Friday\")),\n gmdate(\"m/d/Y\", strtotime(\"this Saturday\")),\n gmdate(\"m/d/Y\", strtotime(\"this Sunday\"))\n );\n break;\n\n case \"Tuesday\":\n $dateRange = array (\n gmdate(\"m/d/Y\", strtotime(\"last Monday\")),\n gmdate(\"m/d/Y\", strtotime(\"this Tuesday\")),\n gmdate(\"m/d/Y\", strtotime(\"this Wednesday\")),\n gmdate(\"m/d/Y\", strtotime(\"this Thursday\")),\n gmdate(\"m/d/Y\", strtotime(\"this Friday\")),\n gmdate(\"m/d/Y\", strtotime(\"this Saturday\")),\n gmdate(\"m/d/Y\", strtotime(\"this Sunday\"))\n );\n break;\n\n case \"Wednesday\":\n $dateRange = array (\n gmdate(\"m/d/Y\", strtotime(\"last Monday\")),\n gmdate(\"m/d/Y\", strtotime(\"last Tuesday\")),\n gmdate(\"m/d/Y\", strtotime(\"this Wednesday\")),\n gmdate(\"m/d/Y\", strtotime(\"this Thursday\")),\n gmdate(\"m/d/Y\", strtotime(\"this Friday\")),\n gmdate(\"m/d/Y\", strtotime(\"this Saturday\")),\n gmdate(\"m/d/Y\", strtotime(\"this Sunday\"))\n );\n break;\n\n case \"Thursday\":\n $dateRange = array (\n gmdate(\"m/d/Y\", strtotime(\"last Monday\")),\n gmdate(\"m/d/Y\", strtotime(\"last Tuesday\")),\n gmdate(\"m/d/Y\", strtotime(\"last Wednesday\")),\n gmdate(\"m/d/Y\", strtotime(\"this Thursday\")),\n gmdate(\"m/d/Y\", strtotime(\"this Friday\")),\n gmdate(\"m/d/Y\", strtotime(\"this Saturday\")),\n gmdate(\"m/d/Y\", strtotime(\"this Sunday\"))\n );\n break;\n\n case \"Friday\":\n $dateRange = array (\n gmdate(\"m/d/Y\", strtotime(\"last Monday\")),\n gmdate(\"m/d/Y\", strtotime(\"last Tuesday\")),\n gmdate(\"m/d/Y\", strtotime(\"last Wednesday\")),\n gmdate(\"m/d/Y\", strtotime(\"last Thursday\")),\n gmdate(\"m/d/Y\", strtotime(\"this Friday\")),\n gmdate(\"m/d/Y\", strtotime(\"this Saturday\")),\n gmdate(\"m/d/Y\", strtotime(\"this Sunday\"))\n );\n break;\n\n case \"Saturday\":\n $dateRange = array (\n gmdate(\"m/d/Y\", strtotime(\"last Monday\")),\n gmdate(\"m/d/Y\", strtotime(\"last Tuesday\")),\n gmdate(\"m/d/Y\", strtotime(\"last Wednesday\")),\n gmdate(\"m/d/Y\", strtotime(\"last Thursday\")),\n gmdate(\"m/d/Y\", strtotime(\"last Friday\")),\n gmdate(\"m/d/Y\", strtotime(\"this Saturday\")),\n gmdate(\"m/d/Y\", strtotime(\"this Sunday\"))\n );\n break;\n\n case \"Sunday\":\n $dateRange = array (\n gmdate(\"m/d/Y\", strtotime(\"last Monday\")),\n gmdate(\"m/d/Y\", strtotime(\"last Tuesday\")),\n gmdate(\"m/d/Y\", strtotime(\"last Wednesday\")),\n gmdate(\"m/d/Y\", strtotime(\"last Thursday\")),\n gmdate(\"m/d/Y\", strtotime(\"last Friday\")),\n gmdate(\"m/d/Y\", strtotime(\"last Saturday\")),\n gmdate(\"m/d/Y\", strtotime(\"this Sunday\"))\n );\n break;\n }\n return $dateRange;\n }\n\n if($week == 'next week') {\n // This switch statement check the current day of the week.\n // Depending on the day, we build an array to hold strings of the 7 days of the current week.\n switch (date(\"l\")) {\n case \"Monday\":\n $dateRange = array (\n gmdate(\"m/d/Y\", strtotime(\"7 days\")),\n gmdate(\"m/d/Y\", strtotime(\"8 days\")),\n gmdate(\"m/d/Y\", strtotime(\"9 days\")),\n gmdate(\"m/d/Y\", strtotime(\"10 days\")),\n gmdate(\"m/d/Y\", strtotime(\"11 days\")),\n gmdate(\"m/d/Y\", strtotime(\"12 days\")),\n gmdate(\"m/d/Y\", strtotime(\"13 days\"))\n );\n break;\n\n case \"Tuesday\":\n $dateRange = array (\n gmdate(\"m/d/Y\", strtotime(\"6 days\")),\n gmdate(\"m/d/Y\", strtotime(\"7 days\")),\n gmdate(\"m/d/Y\", strtotime(\"8 days\")),\n gmdate(\"m/d/Y\", strtotime(\"9 days\")),\n gmdate(\"m/d/Y\", strtotime(\"10 days\")),\n gmdate(\"m/d/Y\", strtotime(\"11 days\")),\n gmdate(\"m/d/Y\", strtotime(\"12 days\"))\n );\n break;\n\n case \"Wednesday\":\n $dateRange = array (\n gmdate(\"m/d/Y\", strtotime(\"5 days\")),\n gmdate(\"m/d/Y\", strtotime(\"6 days\")),\n gmdate(\"m/d/Y\", strtotime(\"7 days\")),\n gmdate(\"m/d/Y\", strtotime(\"8 days\")),\n gmdate(\"m/d/Y\", strtotime(\"9 days\")),\n gmdate(\"m/d/Y\", strtotime(\"10 days\")),\n gmdate(\"m/d/Y\", strtotime(\"11 days\"))\n );\n break;\n\n case \"Thursday\":\n $dateRange = array (\n gmdate(\"m/d/Y\", strtotime(\"4 days\")),\n gmdate(\"m/d/Y\", strtotime(\"5 days\")),\n gmdate(\"m/d/Y\", strtotime(\"6 days\")),\n gmdate(\"m/d/Y\", strtotime(\"7 days\")),\n gmdate(\"m/d/Y\", strtotime(\"8 days\")),\n gmdate(\"m/d/Y\", strtotime(\"9 days\")),\n gmdate(\"m/d/Y\", strtotime(\"10 days\"))\n );\n break;\n\n case \"Friday\":\n $dateRange = array (\n gmdate(\"m/d/Y\", strtotime(\"3 days\")),\n gmdate(\"m/d/Y\", strtotime(\"4 days\")),\n gmdate(\"m/d/Y\", strtotime(\"5 days\")),\n gmdate(\"m/d/Y\", strtotime(\"6 days\")),\n gmdate(\"m/d/Y\", strtotime(\"7 days\")),\n gmdate(\"m/d/Y\", strtotime(\"8 days\")),\n gmdate(\"m/d/Y\", strtotime(\"9 days\"))\n );\n break;\n\n case \"Saturday\":\n $dateRange = array (\n gmdate(\"m/d/Y\", strtotime(\"2 days\")),\n gmdate(\"m/d/Y\", strtotime(\"3 days\")),\n gmdate(\"m/d/Y\", strtotime(\"4 days\")),\n gmdate(\"m/d/Y\", strtotime(\"5 days\")),\n gmdate(\"m/d/Y\", strtotime(\"6 days\")),\n gmdate(\"m/d/Y\", strtotime(\"7 days\")),\n gmdate(\"m/d/Y\", strtotime(\"8 days\"))\n );\n break;\n\n case \"Sunday\":\n $dateRange = array (\n gmdate(\"m/d/Y\", strtotime(\"1 days\")),\n gmdate(\"m/d/Y\", strtotime(\"2 days\")),\n gmdate(\"m/d/Y\", strtotime(\"3 days\")),\n gmdate(\"m/d/Y\", strtotime(\"4 days\")),\n gmdate(\"m/d/Y\", strtotime(\"5 days\")),\n gmdate(\"m/d/Y\", strtotime(\"6 days\")),\n gmdate(\"m/d/Y\", strtotime(\"7 days\"))\n );\n break;\n }\n return $dateRange;\n }\n \n }", "title": "" }, { "docid": "04dae50e7d2fcc9df68d234810dc28a8", "score": "0.4972446", "text": "function OverMultipleDays()\n\t{\n\t\treturn strtotime($this->details['endtime']) - strtotime($this->details['starttime']);\t\n\t}", "title": "" }, { "docid": "d85e2d0a9fb6f50644c99473dc26fd8f", "score": "0.49697173", "text": "function organizeShiftsIntoDays($schedule) {\n\t$break = false;\n\t$theDay = \"00\";\n\t\n\t$shiftArray = array();\n\t\n\t$shiftArr = array();\n\t\n\t\n\t$openArray = array(\"user_name\" => \"Open\", \"first_name\" => \"\", \"last_name\" => \"Open\", \"id\" => \"NOPE\");\n\t\n\tforeach($schedule['data'] as $shift) {\n\t\tif(!array_key_exists(\"start\", $shift)) {\n\t\t\n\t\t}\n\t\telse {\n\t\t\t$startDate = $shift['start'];\n\t\t\t$days = explode('-', $startDate);\n\t\t\t$days = explode(' ', $days[2]);\n\t\t\t$day = $days[0];\n\t\t\t\n\t\t\t\n\t\t\tif(($theDay != $day) && $theDay != \"00\") {\n\t\t\t\t$theDay = trim($theDay);\n\t\t\t\t$shiftArray[$theDay] = $shiftArr;\n\t\t\t\t$theDay = $day;\n\t\t\t\t$shiftArr = array();\n\t\t\t}\n\t\t\tif($theDay == \"00\") {\n\t\t\t\t$shiftArr = array();\n\t\t\t\t$theDay = $day;\n\t\t\t}\n\t\t\tif($shift['users'] == null) {\n\t\t\t\t$shift['users'] = array(0 => $openArray);\n\t\t\t}\n\t\t\tarray_push($shiftArr, $shift);\n\t\t}\n\t}\n\t\n\t$shiftArray[$theDay] = $shiftArr;\n\t\n\treturn $shiftArray;\n}", "title": "" }, { "docid": "387d8415316ebee9c1b017a4145b7b31", "score": "0.49599603", "text": "function ddiff($start, $end) {\n \t\t\t\n $sdate = strtotime($start.\" 00:00:00\");\n $edate = strtotime($end.\" 23:59:59\");\n\t\t\n \n if ($edate < $sdate) {\n $sdate_temp = $sdate;\n $sdate = $edate;\n $edate = $sdate_temp;\n \n }\n $time = $edate - $sdate;\n $preday[0] = 0;\n \n if($time>=0 && $time<=59) {\n // Seconds\n $timeshift = $time.' seconds ';\n\n } elseif($time>=60 && $time<=3599) {\n // Minutes + Seconds\n $pmin = ($edate - $sdate) / 60;\n $premin = explode('.', $pmin);\n \n $presec = $pmin-$premin[0];\n $sec = $presec*60;\n \n $timeshift = $premin[0].' min '.round($sec,0).' sec ';\n\n } elseif($time>=3600 && $time<=86399) {\n // Hours + Minutes\n $phour = ($edate - $sdate) / 3600;\n $prehour = explode('.',$phour);\n \n $premin = $phour-$prehour[0];\n $min = explode('.',$premin*60);\n \n $presec = '0.'.$min[1];\n $sec = $presec*60;\n\n $timeshift = $prehour[0].' hrs '.$min[0].' min '.round($sec,0).' sec ';\n\n } elseif($time>=86400) {\n // Days + Hours + Minutes\n $pday = ($edate - $sdate) / 86400;\n $preday = explode('.',$pday);\n\n $phour = $pday-$preday[0];\n $prehour = explode('.',$phour*24);\n\n $premin = ($phour*24)-$prehour[0];\n $min = explode('.',$premin*60);\n \n $presec = '0.'.$min[1];\n $sec = $presec*60;\n \n $timeshift = $preday[0].' days '.$prehour[0].' hrs '.$min[0].' min '.round($sec,0).' sec ';\n\n }\n \n\n return $preday[0]+1;\n}", "title": "" }, { "docid": "fcf1b4c6cb1ed47179d053be2e02810d", "score": "0.49547932", "text": "private function getTotal(){\n //take start date and calculate the number of occurences within 30 days.\n\n }", "title": "" }, { "docid": "f30fd7a6f27931a5b7074237eb274f0c", "score": "0.49545902", "text": "public function checkDateRecursion()\n\t{\n\t\t$duration = (int)$this->dataArray['duration'];\n\t\t$this->dataFromPost();\n\n\t\tif('weekly' == $this->dataArray['recuring']\n\t\t\t|| 'bi-weekly' == $this->dataArray['recuring']\n\t\t\t|| 'monthly' == $this->dataArray['recuring'])\n\t\t{\n\t\t\tif('weekly' == $this->dataArray['recuring'])\n\t\t\t{\n\t\t\t\t$interval = 7;\n\t\t\t\t$period = 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$interval = 14;\n\t\t\t\t$period = 0;\n\t\t\t}\n\t\t\tif('monthly' == $this->dataArray['recuring'])\n\t\t\t{\n\t\t\t\t$interval = 0;\n\t\t\t\t$period = 1;\n\t\t\t}\n\n\t\t\tif(1>$duration || 4<$duration || 28<$duration*$interval)\n\t\t\t{\n\t\t\t\t$duration = 0;\n\t\t\t}\n\t\t\tfor($i = 0; $i <= $duration; $i++)\n\t\t\t{\n\t\t\t\t$startTime[$i] = $this->time($this->selectedStartHour,\n\t\t\t\t\t$this->selectedStartMinute,$this->selectedMonth\n\t\t\t\t\t+ $period*$i, $this->selectedDay + $interval*$i,\n\t\t\t\t\t$this->selectedYear);\n\t\t\t\t$endTime[$i] = $this->time($this->selectedEndHour,\n\t\t\t\t\t$this->selectedEndMinute,$this->selectedMonth + $period*$i,\n\t\t\t\t\t$this->selectedDay + $interval*$i, $this->selectedYear);\n\t\t\t\t$startDay = $this->startDay($this->selectedMonth + $period*$i,\n\t\t\t\t\t$this->selectedDay + $interval*$i,\t$this->selectedYear);\n\t\t\t\t$endDay = $this->endDay($this->selectedMonth + $period*$i,\n\t\t\t\t\t$this->selectedDay + $interval*$i,\t$this->selectedYear);\n\n\t\t\t\tif(6 == date('w', $startTime[$i]))\n\t\t\t\t{\n\t\t\t\t\t$startTime[$i] = $this->time($this->selectedStartHour,\n\t\t\t\t\t\t$this->selectedStartMinute,$this->selectedMonth\n\t\t\t\t\t\t+ $period*$i, $this->selectedDay + 2,\n\t\t\t\t\t\t$this->selectedYear);\n\t\t\t\t\t$endTime[$i] = $this->time($this->selectedEndHour,\n\t\t\t\t\t\t$this->selectedEndMinute,$this->selectedMonth\n\t\t\t\t\t\t+ $period*$i,\n\t\t\t\t\t\t$this->selectedDay + 2, $this->selectedYear);\n\t\t\t\t\t$startDay = $this->startDay($this->selectedMonth,\n\t\t\t\t\t\t$this->selectedDay + 2,\t$this->selectedYear);\n\t\t\t\t\t$endDay = $this->endDay($this->selectedMonth,\n\t\t\t\t\t\t$this->selectedDay + 2,\t$this->selectedYear);\n\t\t\t\t}elseif(0 == date('w', $startTime[$i]))\n\t\t\t\t{\n\t\t\t\t\t$startTime[$i] = $this->time($this->selectedStartHour,\n\t\t\t\t\t\t$this->selectedStartMinute,$this->selectedMonth\n\t\t\t\t\t\t+ $period*$i, $this->selectedDay + 1,\n\t\t\t\t\t\t$this->selectedYear);\n\t\t\t\t\t$endTime[$i] = $this->time($this->selectedEndHour,\n\t\t\t\t\t\t$this->selectedEndMinute,$this->selectedMonth\n\t\t\t\t\t\t+ $period*$i,\n\t\t\t\t\t\t$this->selectedDay + 1, $this->selectedYear);\n\t\t\t\t\t$startDay = $this->startDay($this->selectedMonth,\n\t\t\t\t\t\t$this->selectedDay + 1,\t$this->selectedYear);\n\t\t\t\t\t$endDay = $this->endDay($this->selectedMonth,\n\t\t\t\t\t\t$this->selectedDay + 1,\t$this->selectedYear);\n\t\t\t\t}\n\t\t\t\t$eventCurrentDay = $this->queryToDbObj\n\t\t\t\t\t->getEventSelectedDayAndRoom($startDay, $endDay,\n\t\t\t\t\t\t$this->room);\n\t\t\t\t$cnt = 0;\n\n\t\t\t\tif(!empty($eventCurrentDay))\n\t\t\t\t{\n\t\t\t\t\tif ($endTime[$i] > $startTime[$i]\n\t\t\t\t\t\t&& $this->currentTime < $startTime[$i]\n\t\t\t\t\t\t&& $startTime[$i] != $endTime[$i])\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ($eventCurrentDay as $key => $value)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($value['end'] <= $startTime[$i]\n\t\t\t\t\t\t\t\t|| $value['start'] >= $endTime[$i])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$cnt ++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->error['ERROR_DATA'] = ERROR_WRONG_DATA;\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\tif ($endTime[$i] < $startTime[$i]\n\t\t\t\t\t\t|| $this->currentTime > $startTime[$i]\n\t\t\t\t\t\t|| $startTime[$i] == $endTime[$i])\n\t\t\t\t\t{\n\t\t\t\t\t\t$cnt++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(count($eventCurrentDay) != $cnt)\n\t\t\t\t{\n\t\t\t\t\t$i++;\n\t\t\t\t\t$this->error['ERROR_DATA'] ='Wrong time on '.$i.'\n\t\t\t\t\trecursion!';\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->id = 0;\n\t\t\tif(empty($this->error))\n\t\t\t{\n\t\t\t\tfor($i = 0; $i <= $duration; $i++)\n\t\t\t\t{\n\t\t\t\t\t$this->queryToDbObj->setEventWithRecur\n\t\t\t\t($this->description,\n\t\t\t\t\t\t$this->employee, $startTime[$i], $endTime[$i],\n\t\t\t\t\t\t$this->room, $this->id);\n\t\t\t\t\tif(0 == $i)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->id = $this->queryToDbObj->getLastId();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->queryToDbObj->setParentRecur($this->id);\n\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn $this->error;\n\t}", "title": "" }, { "docid": "7a5baf21a44e3365cc9271ee5368004b", "score": "0.4953968", "text": "public function getWorkableDaysBetweenDatesAction($dateStart, $dateEnd)\n {\n //datetime format YYYY-mm-dd\n $em=$this->getDoctrine()->getManager();\n\n $wkd=array();\n $wkd[5]=true;\n $wkd[4]=true;\n $wkd[3]=true;\n $wkd[2]=true;\n $wkd[1]=true;\n $dateRStart= new DateTime($dateStart);\n $dateREnd= new DateTime($dateEnd);\n $mult=1;\n if($dateRStart>$dateREnd){\n $dateRStart = $dateREnd;\n $dateREnd = new DateTime($dateStart);\n $mult = -1;\n }\n\n $dateRStart->modify('+1 day');\n $dateREnd->modify('+1 day');\n $interval=$dateRStart->diff($dateREnd);\n $answer=0;\n $numberDays=$interval->format(\"%a\");\n $days=[];\n for($i=0;$i<$numberDays;$i++){\n $dateToCheck=new DateTime();\n $dateToCheck->setDate($dateRStart->format(\"Y\"),$dateRStart->format(\"m\"),intval($dateRStart->format(\"d\"))+$i);\n\n if($this->workable($dateToCheck)&&isset($wkd[$dateToCheck->format(\"w\")])){\n $answer++;\n $days[]=$dateToCheck->format(\"Y-m-d\");\n }\n\n }\n $view = View::create();\n $view->setStatusCode(200)->setData(array(\"days\"=>$answer*$mult,\"dateToCheck\"=>$days,\"wkd\"=>$wkd));\n\n return $view;\n }", "title": "" }, { "docid": "370790d964dc053504b314e42ccffd54", "score": "0.49506655", "text": "public static function init($date, $group_id, $service){\r\n// $criteria->condition = 'merchant_id = :id';\r\n// $criteria->addCondition('work_date >= :date_start');\r\n// $criteria->addCondition('work_date <= :date_end');\r\n// $criteria->params = [':id'=>Yii::app()->user->id, ':date_start'=>date('Y-m-d',$date), ':date_end'=> date('Y-m-d',strtotime(\"next Sunday\",$date))];\r\n// \r\n $merchantSchedule = \\frontend\\models\\MerchantSchedule::find()\r\n ->where(['>=', 'work_date', date('Y-m-d',$date)])\r\n ->andWhere(['<=', 'work_date', date('Y-m-d',strtotime(\"next Sunday\",$date))])\r\n ->andWhere(['merchant_id' => $service->merchant_id])\r\n ->all();\r\n \r\n \r\n \r\n if(is_null(self::$merchantAdditionalSchedule))\r\n self::$merchantAdditionalSchedule = \\yii\\helpers\\ArrayHelper::map ($merchantSchedule, 'work_date','model');\r\n \r\n\r\n// $criteria = new CDbCriteria();\r\n// $criteria->condition = 'group_id = :id';\r\n// $criteria->addCondition('work_date >= :date_start');\r\n// $criteria->addCondition('work_date <= :date_end');\r\n// $criteria->params = [':id'=>$group_id, ':date_start'=>date('Y-m-d',$date), ':date_end'=> date('Y-m-d',strtotime(\"next Sunday\",$date))];\r\n\r\n $groupSchedule = \\frontend\\models\\GroupSchedule::find()\r\n ->where(['>=', 'work_date', date('Y-m-d',$date)])\r\n ->andWhere(['<=', 'work_date', date('Y-m-d',strtotime(\"next Sunday\",$date))])\r\n ->andWhere(['group_id' => $group_id])\r\n ->all();\r\n self::$groupAdditionalSchedule[$group_id] = \\yii\\helpers\\ArrayHelper::map($groupSchedule,'work_date', 'model');\r\n \r\n\r\n if(is_null(self::$groups))\r\n self::$groups = \\yii\\helpers\\ArrayHelper::map(\\frontend\\models\\CategoryHasMerchant::find()\r\n ->where(['merchant_id' => $service->merchant_id, 'is_group'=> 1, 'is_active' => 1])\r\n ->all(),'id','model');\r\n \r\n \r\n \r\n \r\n }", "title": "" }, { "docid": "38f25868b9dbb3c6179df31591113a2f", "score": "0.4947333", "text": "function ercore_admin_view_start_end_dates() {\n $ercore_date = variable_get('ercore_start_date');\n $argument_date_format = 'Y-m';\n $default = date_create(implode('/', $ercore_date));\n $default_date['start'] = date_format($default, $argument_date_format);\n $default_date['end'] = date($argument_date_format, strtotime('+1 year'));\n return $default_date;\n}", "title": "" }, { "docid": "d614ded6811011c5b245769d44408136", "score": "0.49472725", "text": "function custom_repeat($value,$start_date,$end_date,$user_current_datetime){\n\n\n\n $custom_repeat = json_decode($value->custom_repeat,true);\n\n\n\n //-------------- \"frequency\": \"0:Daily,1:Weekly,2:Monthly,3:Yearly\" ----------------- //\n\n\n\n $frequency = $custom_repeat[0]['frequency'];\n\n\n\n //-------------- \"every\": \"2:Day,Week,Month,Yearly\" ----------------- //\n\n\n\n $every = $custom_repeat[0]['every'];\n\n\n\n //-------------- \"on\": \"0:Sunday,1:Monday\" ----------------- //\n\n\n\n $on = $custom_repeat[0]['on'];\n\n if($on !=\"\"){\n\n $onArr = explode(',',$on); \n\n }\n\n\n\n //-------------- \"end_never\": \"1:never end\" ----------------- //\n\n\n\n $end_never = $custom_repeat[0]['end_never'];\n\n\n\n //-------------- \"end_on\": \"01-03-2018\" ----------------- //\n\n\n\n $end_on = $custom_repeat[0]['end_on'];\n\n\n\n //-------------- \"end_after_occurrence\": \"01-03-2018\" ----------------- //\n\n\n\n $end_after_occurrence = $custom_repeat[0]['end_after_occurrence'];\n\n\n\n $resArr = array();\n\n\n\n if($frequency == \"0\"){\n\n\n\n\n\n //-------------- REPET DAILY ----------------- //\n\n\n\n $difference = $this->date_difference($value->start_date,$end_date,1);\n\n \n\n\n\n for ($i=0; $i <= $difference; $i=$i+$every) {\n\n\n\n //-------------- CHECK EVENT BETWENT START & END DATE ----------------- //\n\n\n\n if( (strtotime($start_date) > strtotime(date('d-m-Y',strtotime($value->start_date.\" +\".$i.\" day\")))\n\n && strtotime(date('d-m-Y',strtotime($start_date))) > strtotime(date('d-m-Y',strtotime($value->end_date.\" +\".$i.\" day\"))) )\n\n || strtotime($end_date) < strtotime(date('d-m-Y',strtotime($value->start_date.\" +\".$i.\" day\")))){\n\n continue;\n\n }\n\n\n\n //-------------- CHECK END ON EVENT ----------------- //\n\n\n\n if($end_never !=\"1\" && $end_on !=\"\" && (strtotime($end_on) == strtotime(date('d-m-Y',strtotime($value->start_date.\" +\".$i.\" day\"))) \n\n || strtotime($end_on) < strtotime(date('d-m-Y',strtotime($value->start_date.\" +\".$i.\" day\")))) ){\n\n continue;\n\n }\n\n\n\n //-------------- CHECK EVENT OCUURRENCE ----------------- //\n\n\n\n $eventDate = date('d-m-Y',strtotime($value->start_date.\" +\".$i.\" day\"));\n\n $occurrenc_difference = $this->date_difference($value->start_date,$eventDate,1) / $every;\n\n \n\n if($end_never !=\"1\" && isset($end_after_occurrence) && $end_after_occurrence !=\"\" && $occurrenc_difference > $end_after_occurrence - 1){\n\n continue;\n\n }\n\n \n\n $resArr[$i]['event_id'] = (string) $value->event_id;\n\n $resArr[$i]['event_type'] = (string) $value->event_type;\n\n $resArr[$i]['is_completed'] = (string) $value->is_completed;\n\n $resArr[$i]['user_id'] = (string) $value->user_id;\n\n $resArr[$i]['title'] = $value->title;\n\n $resArr[$i]['all_day'] = (string) $value->all_day;\n\n $resArr[$i]['start_date'] = date('d-m-Y',strtotime($value->start_date.\" +\".$i.\" day\"));\n\n $resArr[$i]['start_time'] = $value->start_time;\n\n $resArr[$i]['end_date'] = date('d-m-Y',strtotime($value->end_date.\" +\".$i.\" day\"));\n\n $resArr[$i]['end_time'] = $value->end_time;\n\n $resArr[$i]['repeat_mode'] = $value->repeat_mode;\n\n $resArr[$i]['created_at'] = $value->created_at;\n\n $resArr[$i]['updated_at'] = $value->updated_at;\n\n $resArr[$i]['set_reminder'] = $value->set_reminder;\n\n $resArr[$i]['reminder_date_time'] = $value->reminder_date_time;\n\n $resArr[$i]['notification_type'] = $value->notification_type;\n\n $resArr[$i]['notification'] = $value->notification;\n\n $resArr[$i]['custom_notification'] = (isset($value->custom_notification) && $value->custom_notification != \"\")? json_decode($value->custom_notification,true) : array();\n\n $resArr[$i]['location'] = (isset($value->location) && $value->location != \"\")? $value->location : \"\";\n\n } \n\n return $resArr; \n\n \n\n }else if($frequency == \"1\"){\n\n \n\n //-------------- REPET WEEKLY ----------------- //\n\n\n\n $difference = $this->date_difference($value->start_date,$end_date,2);\n\n // if($every != \"\"){\n\n // $difference = round($difference / $every);\n\n // }else{\n\n // return array();\n\n // } \n\n $resAllArr = array();\n\n \n\n for ($i=0; $i <= $difference; $i=$i+$every) {\n\n \n\n $week_date_actual = date('d-m-Y',strtotime($value->start_date.\" +\".$i.\" week\")).\"\\n\"; \n\n $week_end_date = date('d-m-Y',strtotime($value->end_date.\" +\".$i.\" week\"));\n\n $event_days = $this->date_difference($week_date_actual,$week_end_date,1); \n\n\n\n //-------------- CHECK DAY OF THE WEEK ----------------- //\n\n\n\n if(isset($on) && $on !=\"\" ){\n\n for ($j=0; $j <= 6 ; $j++) { \n\n \n\n //-------------- GET START & END DATE OF WEEK ----------------- //\n\n\n\n $start_week = date(\"Y-m-d\", strtotime('sunday this week', strtotime($week_date_actual)));\n\n \n\n // if($i == 0 && $j == 0){\n\n // $week_date = date('d-m-Y',strtotime($week_date_actual));\n\n // }else{\n\n //$k = $j - 1;\n\n $week_date = date('d-m-Y',strtotime($start_week.\" +\".$j.\" day\"));\n\n $week_end_date = date('d-m-Y',strtotime($week_date.\" +\".$event_days.\" day\"));\n\n //}\n\n\n\n //-------------- CHECK DATE IS NOT LESS THAN ACTUAL DATE ----------------- //\n\n\n\n if(strtotime($week_date) < strtotime($value->start_date)){\n\n continue;\n\n }\n\n \n\n //-------------- CHECK DAY OF THE WEEK ----------------- //\n\n\n\n $day_of_week = date('w',strtotime($week_date));\n\n if(!in_array($day_of_week,$onArr)){\n\n if($i == 0 && $j ==0){\n\n }else{\n\n continue; \n\n }\n\n }\n\n \n\n //-------------- CHECK EVENT BETWENT START & END DATE ----------------- //\n\n\n\n if( ( strtotime($start_date) > strtotime(date('d-m-Y',strtotime($week_date)))\n\n && strtotime(date('d-m-Y',strtotime($start_date))) > strtotime(date('d-m-Y',strtotime($week_end_date.\" +\".$j.\" day\"))) )\n\n || strtotime($end_date) < strtotime(date('d-m-Y',strtotime($week_date)))){\n\n continue;\n\n }\n\n\n\n //-------------- CHECK END ON EVENT ----------------- //\n\n\n\n if($end_never !=\"1\" && $end_on !=\"\" && (strtotime($end_on) == strtotime(date('d-m-Y',strtotime($week_date))) \n\n || strtotime($end_on) < strtotime(date('d-m-Y',strtotime($week_date))) )){\n\n continue;\n\n }\n\n\n\n //-------------- CHECK EVENT OCUURRENCE ----------------- //\n\n\n\n $occurrenc_difference = $this->date_difference($value->start_date,$week_date_actual,2) / $every;\n\n \n\n if($end_never !=\"1\" && isset($end_after_occurrence) && $end_after_occurrence !=\"\" && $occurrenc_difference > $end_after_occurrence - 1){\n\n continue;\n\n }\n\n \n\n // if($end_never !=\"1\" && isset($end_after_occurrence) && $end_after_occurrence !=\"\" && count($resArr) > $end_after_occurrence - 1){\n\n // continue;\n\n // }\n\n\n\n $resArr[$i][$j]['event_id'] = (string) $value->event_id;\n\n $resArr[$i][$j]['event_type'] = (string) $value->event_type;\n\n $resArr[$i][$j]['is_completed'] = (string) $value->is_completed;\n\n $resArr[$i][$j]['user_id'] = (string) $value->user_id;\n\n $resArr[$i][$j]['title'] = $value->title;\n\n $resArr[$i][$j]['all_day'] = (string) $value->all_day;\n\n $resArr[$i][$j]['start_date'] = date('d-m-Y',strtotime($week_date));\n\n $resArr[$i][$j]['start_time'] = $value->start_time;\n\n $resArr[$i][$j]['end_date'] = date('d-m-Y',strtotime($week_end_date));\n\n $resArr[$i][$j]['end_time'] = $value->end_time;\n\n $resArr[$i][$j]['repeat_mode'] = $value->repeat_mode;\n\n $resArr[$i][$j]['created_at'] = $value->created_at;\n\n $resArr[$i][$j]['updated_at'] = $value->updated_at;\n\n $resArr[$i][$j]['set_reminder'] = $value->set_reminder;\n\n $resArr[$i][$j]['reminder_date_time'] = $value->reminder_date_time;\n\n $resArr[$i][$j]['notification_type'] = $value->notification_type;\n\n $resArr[$i][$j]['notification'] = $value->notification;\n\n $resArr[$i][$j]['custom_notification'] = (isset($value->custom_notification) && $value->custom_notification != \"\")? json_decode($value->custom_notification,true) : array();\n\n $resArr[$i][$j]['location'] = (isset($value->location) && $value->location != \"\")? $value->location : \"\";\n\n\n\n }\n\n\n\n $resAllArr = $this->convert_array($resArr);\n\n }else{\n\n\n\n //-------------- CHECK EVENT BETWENT START & END DATE ----------------- //\n\n\n\n if( ( strtotime($start_date) > strtotime(date('d-m-Y',strtotime($week_date_actual)))\n\n && strtotime(date('d-m-Y',strtotime($start_date))) > strtotime(date('d-m-Y',strtotime($week_end_date))) )\n\n || strtotime($end_date) < strtotime(date('d-m-Y',strtotime($week_date_actual)))){\n\n continue;\n\n }\n\n\n\n //-------------- CHECK END ON EVENT ----------------- //\n\n\n\n if($end_never !=\"1\" && $end_on !=\"\" && (strtotime($end_on) == strtotime(date('d-m-Y',strtotime($week_date_actual))) \n\n || strtotime($end_on) < strtotime(date('d-m-Y',strtotime($week_date_actual))))){\n\n continue;\n\n }\n\n\n\n //-------------- CHECK EVENT OCUURRENCE ----------------- //\n\n\n\n $occurrenc_difference = $this->date_difference($value->start_date,$week_date_actual,2) / $every;\n\n \n\n if($end_never !=\"1\" && isset($end_after_occurrence) && $end_after_occurrence !=\"\" && $occurrenc_difference > $end_after_occurrence - 1){\n\n continue;\n\n }\n\n \n\n // if($end_never !=\"1\" && isset($end_after_occurrence) && $end_after_occurrence !=\"\" && count($resArr) > $end_after_occurrence - 1){\n\n // continue;\n\n // }\n\n\n\n $resArr[$i]['event_id'] = (string) $value->event_id;\n\n $resArr[$i]['event_type'] = (string) $value->event_type;\n\n $resArr[$i]['is_completed'] = (string) $value->is_completed;\n\n $resArr[$i]['user_id'] = (string) $value->user_id;\n\n $resArr[$i]['title'] = $value->title;\n\n $resArr[$i]['all_day'] = (string) $value->all_day;\n\n $resArr[$i]['start_date'] = date('d-m-Y',strtotime($week_date_actual));\n\n $resArr[$i]['start_time'] = $value->start_time;\n\n $resArr[$i]['end_date'] = date('d-m-Y',strtotime($week_end_date));\n\n $resArr[$i]['end_time'] = $value->end_time;\n\n $resArr[$i]['repeat_mode'] = $value->repeat_mode;\n\n $resArr[$i]['created_at'] = $value->created_at;\n\n $resArr[$i]['updated_at'] = $value->updated_at;\n\n $resArr[$i]['set_reminder'] = $value->set_reminder;\n\n $resArr[$i]['reminder_date_time'] = $value->reminder_date_time;\n\n $resArr[$i]['notification_type'] = $value->notification_type;\n\n $resArr[$i]['notification'] = $value->notification;\n\n $resArr[$i]['custom_notification'] = (isset($value->custom_notification) && $value->custom_notification != \"\")? json_decode($value->custom_notification,true) : array();\n\n $resArr[$i]['location'] = (isset($value->location) && $value->location != \"\")? $value->location : \"\";\n\n $resAllArr = $resArr;\n\n } \n\n \n\n } \n\n\n\n return $resAllArr; \n\n \n\n }else if($frequency == \"2\"){\n\n\n\n //-------------- REPET MONTHLY ----------------- //\n\n \n\n $difference = $this->date_difference($value->start_date,$end_date,3);\n\n // if($every != \"\"){\n\n // $difference = round($difference / $every);\n\n // }else{\n\n // return array();\n\n // } \n\n\n\n // $time=strtotime($value->start_date);\n\n // $month=date(\"F\",$time);\n\n // $year=date(\"Y\",$time);\n\n\n\n \n\n for ($i=0; $i <= $difference; $i=$i+$every) {\n\n \n\n $month_date = date('d-m-Y',strtotime($value->start_date.\" +\".$i.\" month\")); \n\n $month_end_date = date('d-m-Y',strtotime($value->end_date.\" +\".$i.\" month\")); \n\n $event_days = $this->date_difference($month_date,$month_end_date,1); \n\n\n\n //-------------- CHECK DAY OF THE WEEK ----------------- //\n\n\n\n if(isset($on) && $on !=\"\" && $i != 0){\n\n $dayArr = $this->format_week_day($on);\n\n if($dayArr['week_letter'] !=\"\" && $dayArr['day_letter'] !=\"\" ){\n\n $month_date = date(\"d-m-Y\", strtotime($dayArr['week_letter'].\" \".$dayArr['day_letter'].\" of \".date('M',strtotime($month_date)).\" \".date('Y',strtotime($month_date)).\"\"));\n\n $month_end_date = date('d-m-Y',strtotime($month_date.\" +\".$event_days.\" day\")); \n\n } \n\n }\n\n \n\n //-------------- CHECK EVENT BETWENT START & END DATE ----------------- //\n\n\n\n if( ( strtotime($start_date) > strtotime(date('d-m-Y',strtotime($month_date)))\n\n && strtotime(date('d-m-Y',strtotime($start_date))) > strtotime(date('d-m-Y',strtotime($month_end_date))) )\n\n || strtotime($end_date) < strtotime(date('d-m-Y',strtotime($month_date)))){\n\n continue;\n\n }\n\n\n\n //-------------- CHECK END ON EVENT ----------------- //\n\n\n\n if($end_never !=\"1\" && $end_on !=\"\" && (strtotime($end_on) == strtotime(date('d-m-Y',strtotime($month_date))) \n\n || strtotime($end_on) < strtotime(date('d-m-Y',strtotime($month_date))))){\n\n continue;\n\n }\n\n\n\n //-------------- CHECK EVENT OCUURRENCE ----------------- //\n\n\n\n $occurrenc_difference = $this->date_difference($value->start_date,$month_date,3) / $every;\n\n if($end_never !=\"1\" && isset($end_after_occurrence) && $end_after_occurrence !=\"\" && $occurrenc_difference > $end_after_occurrence - 1){\n\n continue;\n\n }\n\n\n\n $resArr[$i]['event_id'] = (string) $value->event_id;\n\n $resArr[$i]['event_type'] = (string) $value->event_type;\n\n $resArr[$i]['is_completed'] = (string) $value->is_completed;\n\n $resArr[$i]['user_id'] = (string) $value->user_id;\n\n $resArr[$i]['title'] = $value->title;\n\n $resArr[$i]['all_day'] = (string) $value->all_day;\n\n $resArr[$i]['start_date'] = date('d-m-Y',strtotime($month_date));\n\n $resArr[$i]['start_time'] = $value->start_time;\n\n $resArr[$i]['end_date'] = date('d-m-Y',strtotime($month_end_date));\n\n $resArr[$i]['end_time'] = $value->end_time;\n\n $resArr[$i]['repeat_mode'] = $value->repeat_mode;\n\n $resArr[$i]['created_at'] = $value->created_at;\n\n $resArr[$i]['updated_at'] = $value->updated_at;\n\n $resArr[$i]['set_reminder'] = $value->set_reminder;\n\n $resArr[$i]['reminder_date_time'] = $value->reminder_date_time;\n\n $resArr[$i]['notification_type'] = $value->notification_type;\n\n $resArr[$i]['notification'] = $value->notification;\n\n $resArr[$i]['custom_notification'] = (isset($value->custom_notification) && $value->custom_notification != \"\")? json_decode($value->custom_notification,true) : array();\n\n $resArr[$i]['location'] = (isset($value->location) && $value->location != \"\")? $value->location : \"\";\n\n \n\n } \n\n return $resArr;\n\n \n\n }else if($frequency == \"3\"){\n\n\n\n //-------------- REPET YEARLY ----------------- //\n\n\n\n $difference = $this->date_difference($value->start_date,$end_date,4);\n\n // if($every != \"\"){\n\n // $difference = round($difference / $every );\n\n // }else{\n\n // return array();\n\n // } \n\n \n\n for ($i=0; $i <= $difference; $i=$i+$every) {\n\n \n\n $year_date = date('d-m-Y',strtotime($value->start_date.\" +\".$i.\" year\")); \n\n $year_end_date = date('d-m-Y',strtotime($value->end_date.\" +\".$i.\" year\")); \n\n\n\n \n\n //-------------- CHECK EVENT BETWENT START & END DATE ----------------- //\n\n\n\n if( ( strtotime($start_date) > strtotime(date('d-m-Y',strtotime($year_date)))\n\n && strtotime(date('d-m-Y',strtotime($start_date))) > strtotime(date('d-m-Y',strtotime($year_end_date))) )\n\n || strtotime($end_date) < strtotime(date('d-m-Y',strtotime($year_date)))){\n\n continue;\n\n }\n\n\n\n //-------------- CHECK END ON EVENT ----------------- //\n\n\n\n if($end_never !=\"1\" && $end_on !=\"\" && (strtotime($end_on) == strtotime(date('d-m-Y',strtotime($year_date))) \n\n || strtotime($end_on) < strtotime(date('d-m-Y',strtotime($year_date))))){\n\n continue;\n\n }\n\n\n\n //-------------- CHECK EVENT OCUURRENCE ----------------- //\n\n \n\n $occurrenc_difference = $this->date_difference($value->start_date,$year_date,4) / $every;\n\n if($end_never !=\"1\" && isset($end_after_occurrence) && $end_after_occurrence !=\"\" && $occurrenc_difference > $end_after_occurrence - 1){\n\n continue;\n\n }\n\n\n\n $resArr[$i]['event_id'] = (string) $value->event_id;\n\n $resArr[$i]['event_type'] = (string) $value->event_type;\n\n $resArr[$i]['is_completed'] = (string) $value->is_completed;\n\n $resArr[$i]['user_id'] = (string) $value->user_id;\n\n $resArr[$i]['title'] = $value->title;\n\n $resArr[$i]['all_day'] = (string) $value->all_day;\n\n $resArr[$i]['start_date'] = date('d-m-Y',strtotime($year_date));\n\n $resArr[$i]['start_time'] = $value->start_time;\n\n $resArr[$i]['end_date'] = date('d-m-Y',strtotime($year_end_date));\n\n $resArr[$i]['end_time'] = $value->end_time;\n\n $resArr[$i]['repeat_mode'] = $value->repeat_mode;\n\n $resArr[$i]['created_at'] = $value->created_at;\n\n $resArr[$i]['updated_at'] = $value->updated_at;\n\n $resArr[$i]['set_reminder'] = $value->set_reminder;\n\n $resArr[$i]['reminder_date_time'] = $value->reminder_date_time;\n\n $resArr[$i]['notification_type'] = $value->notification_type;\n\n $resArr[$i]['notification'] = $value->notification;\n\n $resArr[$i]['custom_notification'] = (isset($value->custom_notification) && $value->custom_notification != \"\")? json_decode($value->custom_notification,true) : array();\n\n $resArr[$i]['location'] = (isset($value->location) && $value->location != \"\")? $value->location : \"\";\n\n } \n\n return $resArr;\n\n \n\n }\n\n }", "title": "" }, { "docid": "5aa377dd469d96b81f25287c3a1499ff", "score": "0.49454555", "text": "function get_summary_between_dates( $start_date, $end_date ) {\n\t\tglobal $wpdb;\n\n\t\t$actual_start_date = $wpdb->get_row( \"SELECT post_date_gmt FROM \" . $wpdb->prefix . \"posts WHERE post_type = 'shop_order' AND post_date_gmt >= '\" . piggy_mysql_time_from_gmt_timestamp( $start_date ) . \"' ORDER BY post_date_gmt ASC LIMIT 1\" );\n\t\t\n\t\tif ( $actual_start_date ) {\n\t\t\t$start_date = $actual_start_date->post_date_gmt;\n\t\t} else {\n\t\t\t$start_date = piggy_mysql_time_from_gmt_timestamp( $start_date );\n\t\t}\n\t\t\n\t\t$actual_end_date = $wpdb->get_row( \"SELECT post_date_gmt FROM \" . $wpdb->prefix . \"posts WHERE post_type = 'shop_order' AND post_date_gmt <= '\" . piggy_mysql_time_from_gmt_timestamp( $end_date ) . \"' ORDER BY post_date_gmt DESC LIMIT 1\" );\n\t\t\n\t\tif ( $actual_end_date ) {\n\t\t\t$end_date = $actual_end_date->post_date_gmt;\n\t\t} else {\n\t\t\t$end_date = piggy_mysql_time_from_gmt_timestamp( $end_date );\n\t\t}\n\n\t\t$cache_key = md5( $start_date . $end_date );\n\t\tif ( isset( $this->summary_cache[ $cache_key ] ) ) {\n\t\t\treturn $this->summary_cache[ $cache_key ];\n\t\t}\t\t\n\t\t\n\t\t$purchase_info = new stdClass;\n\t\t$purchase_info->total = 0;\n\t\t$purchase_info->count = 0;\n\t\t\n\n\t\t$sql = \"SELECT count(ID) as c,sum(meta_value) as total FROM \" . $wpdb->prefix . \"posts,\" . $wpdb->prefix . \"postmeta WHERE post_type = 'shop_order' AND post_date_gmt >= '\" . $start_date . \"' AND post_date_gmt <= '\" . $end_date . \"' AND \" . $wpdb->prefix . \"posts.ID = \" . $wpdb->prefix . \"postmeta.post_ID and meta_key = '_order_total' AND \" . $wpdb->prefix . \"posts.ID NOT IN \" . $this->get_completed_posts_string() . \";\";\n\t\t$results = $wpdb->get_row( $sql );\n\t\tif ( $results ) {\n\n\t\t\t$purchase_info->count = $results->c;\n\t\t\t$purchase_info->total = $results->total;\n\t\n\t\t\tif ( $purchase_info->count ) {\n\t\t\t\t$total_days = ( strtotime( $end_date ) - strtotime( $start_date ) ) / 86400;\t\n\t\t\t\tif ( $total_days ) {\n\t\t\t\t\t$purchase_info->amount_per_day = $purchase_info->total / $total_days;\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t}\t\t\n\t\t$total_time = microtime( true ) - $start_time;\n\n\t\t$this->summary_cache[ $cache_key ] = $purchase_info;\n\t\t\n\t\treturn $purchase_info;\n\t}", "title": "" }, { "docid": "437719d524b8ccadff635a5da6fa09d9", "score": "0.49303892", "text": "public function chart($start, $end) {\n // The result array\n $result = array();\n\n // Get all the universities\n $universities = $this->University->find('all');\n\n // The array of values that are part of this chart\n $d60_d61 = array();\n for ($i = 60; $i <= 61; $i++) {\n array_push($d60_d61, $this->Data->findByNombre('D' . $i));\n }\n\n\n // Calculates year by year the results\n for ($year = $start; $year <= $end; $year++) {\n $grades = array();\n for ($i = 60; $i <= 61; $i++) {\n array_push($grades, 0);\n }\n\n // Calculates for each univesity\n foreach ($universities as $university) {\n $uy_d60_d61 = array();\n\n // Gets the data involved\n foreach ($d60_d61 as $data_d_) {\n $uy_d_ = $this->UniversityYearData->findByDato_iddatoAndUniversidad_iduniversidadAndAnho($data_d_['Data']['iddato'], $university['University']['iduniversidad'], $year);\n\n // Checks the data obtained and saves the value\n if (!empty($uy_d_)) {\n array_push($uy_d60_d61, $uy_d_['UniversityYearData']['valor']);\n } else {\n array_push($uy_d60_d61, 0);\n }\n }\n\n // Checks all the obtained values and makes the calculation\n if (!empty($uy_d60_d61)) {\n foreach ($grades as $index => $grade) {\n $grades[$index] = $grade + $uy_d60_d61[$index];\n }\n }\n }\n\n // Saves the calculations just done\n $ins011_15 = array();\n $ins011_15['year'] = $year;\n $ins011_15['value'] = $grades;\n\n array_push($result, $ins011_15);\n }\n\n // Series and ticks calculation\n $series = array();\n $ticks = array();\n foreach ($result as $year_result) {\n array_push($ticks, $year_result['year']);\n array_push($series, $year_result['value']);\n }\n\n // Grades calculation\n $grades = array();\n foreach ($d60_d61 as $data_d_) {\n array_push($grades, $data_d_['Data']['descripcion']);\n }\n\n // Saves all the information and prepares to render\n $result = array();\n $result['ticks'] = $ticks;\n $result['series'] = $series;\n $result['grades'] = $grades;\n $result['view'] = 'ins011_15';\n\n // Returns\n return $result;\n }", "title": "" }, { "docid": "ab9b2962989fa0b96ad052ee14545a9b", "score": "0.49218073", "text": "function get_days_per_week($wks_from_dates, $wks) {\n\t$ctr = count($wks);\n\t$days_per_week = array();\n\t\n\tfor ($i=0; $i<$ctr; $i++) {\n\t\t$dt = $wks[$i];\n\t\t\n\t\t// ANY\n\t\tif ( ($wks_from_dates['end_date'] >= $dt) && (get_date_diff($dt, $wks_from_dates['start_date'])+1 < 8) ) {\n\t\t\t$days_per_week[$dt]['any'] = get_days_in_week($dt, $wks_from_dates['start_date'], $wks_from_dates['end_date']);\n\t\t} else {\n\t\t\t$days_per_week[$dt]['any'] = 0;\n\t\t}\n\t\t// CTRL\n\t\tif ( ($wks_from_dates['ctrl_end_date'] >= $dt) && (get_date_diff($dt, $wks_from_dates['ctrl_start_date'])+1 < 8) ) {\n\t\t\t$days_per_week[$dt]['ctrl'] = get_days_in_week($dt, $wks_from_dates['ctrl_start_date'], $wks_from_dates['ctrl_end_date']);\n\t\t} else {\n\t\t\t$days_per_week[$dt]['ctrl'] = 0;\n\t\t}\n\t\t// EXP\n\t\tif ( ($wks_from_dates['exp_end_date'] >= $dt) && (get_date_diff($dt, $wks_from_dates['exp_start_date'])+1 < 8) ) {\n\t\t\t$days_per_week[$dt]['exp'] = get_days_in_week($dt, $wks_from_dates['exp_start_date'], $wks_from_dates['exp_end_date']);\n\t\t} else {\n\t\t\t$days_per_week[$dt]['exp'] = 0;\n\t\t}\n\t}\n\n\treturn $days_per_week;\n}", "title": "" }, { "docid": "8992c73656877aa63294765d224e2e9a", "score": "0.49150506", "text": "public function cal2Day($date_start,$date_end){\n $data = (strtotime($date_end) - strtotime($date_start))/ (60 * 60 * 24);\n return $data;\n }", "title": "" }, { "docid": "f79638d78a04a1fb1b6d3028abbc5b5f", "score": "0.4909212", "text": "function get_days($startdate,$enddate){\r\n $begin = new DateTime(date(\"Y-m-d\", strtotime($startdate)));\r\n $end = new DateTime(date(\"Y-m-d\", strtotime($enddate)));\r\n\r\n $daterange = new DatePeriod($begin, new DateInterval('P1D'), $end);\r\n\r\n foreach($daterange as $date){\r\n $adays[] =$date->format(\"Y-m-d\");\r\n }\r\n $adays[] =date(\"Y-m-d\", strtotime($enddate)) ;\r\n return $adays; \r\n }", "title": "" }, { "docid": "2d26a6da8c4b120f376cee729ac5cd2d", "score": "0.49067137", "text": "public function get_department_to_chart($Start_date, $End_date)\n {\n $sql = \"SELECT * \n FROM ttps_database.requested_form AS req\n INNER JOIN dbmc.employee AS emp\n ON emp.Emp_ID = req.req_emp_id\n INNER JOIN dbmc.sectioncode AS sec\n ON sec.Sectioncode = emp.Sectioncode_ID\n WHERE req.req_requested_date \n BETWEEN '$Start_date' AND '$End_date'\n ORDER BY sec.Sectioncode\";\n $query = $this->db->query($sql);\n return $query;\n }", "title": "" }, { "docid": "b73ff17baac536ffce13288efff96518", "score": "0.49012527", "text": "public function run ()\n {\n //\n \n $saleGroup = [\n '整合行銷部' => [\n '2019-11-01' => [133, 153, 174, 188, 200, 201, 204, 205],\n ],\n '業務五部' => [\n '2019-06-01' => [67, 132, 136, 155],\n '2019-07-01' => [67, 122, 131, 132, 136, 155],\n '2019-08-01' => [67, 122, 131, 132, 136, 155],\n '2019-09-01' => [67, 122, 131, 132, 136, 155],\n '2019-10-01' => [67, 131, 132, 136, 155],\n '2019-11-01' => [67, 131, 132, 136],\n ],\n '業務六部' => [\n '2019-06-01' => [84, 156, 170, 181],\n '2019-07-01' => [84, 170, 181, 186],\n '2019-08-01' => [84, 170, 181, 186],\n '2019-09-01' => [84, 170, 181, 186],\n '2019-11-01' => [84, 170, 181, 186]\n ],\n '後勤' => [\n '2018-01-01' => [16, 33, 48, 78, 89]\n ],\n '離職業務' => [\n '2019-07-01' => [97, 156, 161, 175],\n '2019-08-01' => [97, 156, 161, 175],\n '2019-09-01' => [97, 156, 161, 175],\n '2019-10-01' => [97, 122, 156, 161, 175],\n '2019-11-01' => [97, 122, 155, 156, 161, 175]\n ],\n ];\n $convener = [67, 84];\n $saleBonus = [[\n \"achieving_rate\" => 100,\n \"bonus_rate\" => 0,\n 'bonus_direct' => 15000,\n ],\n [\n \"achieving_rate\" => 150,\n \"bonus_rate\" => 0,\n 'bonus_direct' => 20000,\n ]];\n \n foreach ($saleGroup as $name => $item) {\n \n $saleGroups = SaleGroups::create(['name' => $name]);\n \n $dateNow = new DateTime(date('Ym01'));\n \n $date = new DateTime(date('2017-12-01'));\n \n $groupsData = $saleBonus;\n \n while ($date->format('Y-m-d') != $dateNow->format('Y-m-d')) {\n $setDate = $date->modify('+1Month')->format('Y-m-d');\n $nowSetDate = [];\n $allSetDate = array_keys($item);\n \n if(in_array($setDate,$allSetDate)){\n $nowSetDate = $item[$setDate];\n }else{\n if($setDate < $allSetDate[0]){\n $nowSetDate = $item[$allSetDate[0]];\n }else{\n $nowSetDate = last($item);\n }\n }\n \n $userData = array_map(function ($v) use ($setDate, $convener, $saleGroups) {\n \n $tmp = [\n 'erp_user_id' => $v,\n 'set_date' => $setDate,\n 'is_convener' => in_array($v, $convener) ? 1 : 0\n ];\n \n return $tmp;\n }, $nowSetDate, [$setDate, $convener, $saleGroups]);\n \n \n $saleGroups->groupsUsers()->createMany($userData);\n \n $groupsBonus = array_map(function ($v) use ($setDate) {\n $v['set_date'] = $setDate;\n return $v;\n }, $groupsData, [$setDate]);\n \n $saleGroups->groupsBonus()->createMany($groupsBonus);\n \n };\n }\n }", "title": "" }, { "docid": "68944e1f737eb8b20561eea89cda86f6", "score": "0.48869127", "text": "function groupchart()\n\t{\n\t\t\n\t\t$this->set('fbgroup',$this->Session->read('fbgroup'));\n\t\t$this->set('dt',$this->Session->read('dt'));\n\t}", "title": "" }, { "docid": "d0d424e205dca3c3d6206d8e59d75dd9", "score": "0.48854333", "text": "function create_plan($start, $end)\n{\n $dienstplan = new Dienstplan();\n $plan = array();\n //echo \"Der aktuelle Dienstplan fuer den Zeitraum $start bis $end wird nun erstellt. Bitte haben Sie einen Moment Geduld...\";\n\n // simulated Database entries\n \n \n \n $workdays = array(\"Montag\", \"Dienstag\", \"Mittwoch\", \"Donnerstag\", \"Freitag\"); // DB-Eintrag --> SQL-Abfrage\n $spec_times_business_off = $dienstplan->get_spec_times_business_off();\n $spec_times_business_on = $dienstplan->get_spec_times_business_on();\n \n if($spec_times_business_off == NULL)\n {\n $spec_times_business_off[] = 0;\n \n }\n if($spec_times_business_on == NULL)\n {\n $spec_times_business_on[] = 0;\n \n }\n\n \n $emp_db = $dienstplan->get_emp_ids(); \n \n \n $emp_db_vac = orderDates(\"vacation\");//array(\"300_0\" => \"16.04.2012\", \"925_0\" => \"18.04.2012\");\n $emp_db_times_missed = orderDates(\"missed_times\");//array(\"315_0\" => \"19.04.2012\", \"316_0\" => \"04.04.2012\"); \n \n // $emp_db_spec_times = array(228 => \"FS\", 809 => \"NS\");\n $emp_db_spec_times = $dienstplan->get_emp_spec_times(); \n \n // $emp_db_hours = array(300 => 20, 809 => 1, 953 => -1, 316 => -17); // DB-Eintrag --> SQL-Abfrage\n \n // print_r(array_values($emp_db_hours));\n \n //$shifts = array(0 => \"FS\", 1 => \"MS\", 2 => \"NS\");\n $shifts = $dienstplan->get_all_shifts(); \n \n //$shift_must = array(\"FS\" => 3, \"MS\" => 2, \"NS\" => 1);\n $shift_must = $dienstplan->get_shifts_must(); \n \n // Variables\n // $all_plans = array(0 => \"\", 1 => \"\", 2 => \"\", 3 => \"\", 4 => \"\");\n \n // days of timespan\n $timespan_dates = get_dates($start, $end);\n \n /*foreach($all_plans as $single_plan)\n {\n $single_plan = ; // 5 different plans\n }*/\n \n foreach($timespan_dates as $timespan_date)\n {\n $emp_available = $emp_db;\n $day = get_weekday($timespan_date);\n //echo $day;\n \n if(in_array($day, $workdays) && \n !in_array($timespan_date, $spec_times_business_off) || \n in_array($timespan_date, $spec_times_business_on))\n {\n //echo \"<br />$timespan_date: Arbeitstag<br />\";\n \n if(in_array($timespan_date, $emp_db_vac)) // wenn Mitarbeiter Urlaub, dann aus array gelöscht\n {\n $key = array_search($timespan_date, $emp_db_vac);\n $key = explode(\"_\", $key);\n //echo \"Mitarbeiter $key[0] hat Urlaub.<br />\";\n $key = array_search($key[0], $emp_available);\n unset($emp_available[$key]);\n }\n if(in_array($timespan_date, $emp_db_times_missed)) // wenn Mitarbeiter besondere Ausfallzeiten, dann aus array gelöscht\n {\n $key = array_search($timespan_date, $emp_db_times_missed);\n $key = explode(\"_\", $key);\n //echo \"Mitarbeiter $key[0] hat Sondertag.<br />\";\n $key = array_search($key[0], $emp_available);\n unset($emp_available[$key]);\n } \n \n foreach($shifts as $shift)\n {\n $shift_have = 0;\n $shift_dates[$timespan_date][] = $shift; // jedem verfügbaren Datum werden jeweils schihcten zugeteilt\n \n $av_emps = $emp_available;\n \n if($shift_must[$shift] > 0)\n {\n //echo \"$shift: \".$shift_must[$shift] .\"<br />\"; // Ausgabe der Arbeitstage mit schichten und schichtsoll\n // echo $shift;\n // deleting employees with special times\n if(in_array($shift, $emp_db_spec_times))\n {\n $key = array_search($shift, $emp_db_spec_times);\n //echo \"Mitarbeiter $key hat fuer Schicht $shift eine Sonderzeit.<br />\";\n $key = array_search($key, $av_emps);\n unset($av_emps[$key]);\n }\n \n /*echo \"Fuer $timespan_date und Schicht $shift verfuegbare Mitarbeiter sind: <br />\";*/\n $available_workers = array();\n // Ruhezeiten\n foreach($av_emps as $av_emp)\n {\n //echo $av_emp .\"<br />\";\n $time_difference = restingTime($timespan_date, $av_emp, $shift, $plan);\n if($time_difference < 11)\n {\n //echo \"Bei $av_emp sind Ruhestunden NICHT eingehalten.<br />\";\n }else\n {\n //echo \"Bei $av_emp sind Ruhestunden eingehalten.<br />\";\n \n $available_workers[] = $av_emp;\n \n }\n }\n // print_r($available_workers);\n // put employees into shifts\n do{\n \n $worker = array_rand($available_workers, 1);\n\n $plan[$timespan_date][$shift][] = $available_workers[$worker];\n\n unset($available_workers[$worker]); \n $shift_have += 1;\n }while($shift_have < $shift_must[$shift]);\n \n \n // var_dump($av_emp);\n }\n }\n\n }\n \n }\n //var_dump($shift_dates); // alle schichten für jeden verfügbaren Tag\n //var_dump($emp_db); // alle verfügbaren Mitarbeiter sind enthalten in $emp_db\n \n // Ausgabe erstellter Plan!!!\n /*\n echo \"<br /><br />Dienstplan von $start bis $end:<br />\";\n foreach($plan as $date => $shift)\n {\n echo \"Datum: $date<br />\";\n \n foreach($shifts as $shift)\n {\n echo \"Schicht: $shift: <br />\";\n foreach($plan[$date][$shift] as $key => $emp)\n {\n $key += 1;\n echo \"$key. Mitarbeiter: $emp<br />\";\n }\n }\n }\n */\n return $plan;\n}", "title": "" }, { "docid": "56f4933f3395906ddbd224a7a22541ed", "score": "0.48823035", "text": "public function testIntervalDays()\n {\n $date = new DateTimeBr('2013-10-01');\n $date1 = new DateTimeBr('2013-09-01');\n $date2 = new DateTimeBr('2013-11-01');\n $this->assertEquals(30, $date->intervalDays(new DateTimeBr('2013-10-31')));\n $this->assertEquals(-7, $date1->intervalDays(new DateTimeBr('2013-08-25')));\n $this->assertEquals(30, $date2->intervalDays(new DateTimeBr('2013-12-1')));\n }", "title": "" }, { "docid": "d843f3a3d216a97e9082e10342f33815", "score": "0.48733833", "text": "function monthly_per_store_day_report($month_per_store_day,$year_per_store_day)\n {\n \n // $param['year'] = $month;\n // $param['month'] = $year;\n\n\n // $monthName = date('F', strtotime($year.\"-\".$month));\n\n // $date = $this->getDateNeed($year_per_store, $month_per_store);\n\n\n $arr = array('monthly' => array());\n $arr['monthly'] = array(\n 'store' => $this->queryForMonthStoreMonth(),\n 'mdscsi' => array(),\n '01' => $this->queryForMonthStoreDay($year_per_store_day, $month_per_store_day, '1'),\n '02' => $this->queryForMonthStoreDay($year_per_store_day, $month_per_store_day, '2'),\n '03' => $this->queryForMonthStoreDay($year_per_store_day, $month_per_store_day, '3'),\n '04' => $this->queryForMonthStoreDay($year_per_store_day, $month_per_store_day, '4'),\n '05' => $this->queryForMonthStoreDay($year_per_store_day, $month_per_store_day, '5'),\n '06' => $this->queryForMonthStoreDay($year_per_store_day, $month_per_store_day, '6'),\n '07' => $this->queryForMonthStoreDay($year_per_store_day, $month_per_store_day, '7'),\n '08' => $this->queryForMonthStoreDay($year_per_store_day, $month_per_store_day, '8'),\n '09' => $this->queryForMonthStoreDay($year_per_store_day, $month_per_store_day, '9'),\n '10' => $this->queryForMonthStoreDay($year_per_store_day, $month_per_store_day, '10'),\n '11' => $this->queryForMonthStoreDay($year_per_store_day, $month_per_store_day, '11'),\n '12' => $this->queryForMonthStoreDay($year_per_store_day, $month_per_store_day, '12'),\n '13' => $this->queryForMonthStoreDay($year_per_store_day, $month_per_store_day, '13'),\n '14' => $this->queryForMonthStoreDay($year_per_store_day, $month_per_store_day, '14'),\n '15' => $this->queryForMonthStoreDay($year_per_store_day, $month_per_store_day, '15'),\n '16' => $this->queryForMonthStoreDay($year_per_store_day, $month_per_store_day, '16'),\n '17' => $this->queryForMonthStoreDay($year_per_store_day, $month_per_store_day, '17'),\n '18' => $this->queryForMonthStoreDay($year_per_store_day, $month_per_store_day, '18'),\n '19' => $this->queryForMonthStoreDay($year_per_store_day, $month_per_store_day, '19'),\n '20' => $this->queryForMonthStoreDay($year_per_store_day, $month_per_store_day, '20'),\n '21' => $this->queryForMonthStoreDay($year_per_store_day, $month_per_store_day, '21'),\n '22' => $this->queryForMonthStoreDay($year_per_store_day, $month_per_store_day, '22'),\n '23' => $this->queryForMonthStoreDay($year_per_store_day, $month_per_store_day, '23'),\n '24' => $this->queryForMonthStoreDay($year_per_store_day, $month_per_store_day, '24'),\n '25' => $this->queryForMonthStoreDay($year_per_store_day, $month_per_store_day, '25'),\n '26' => $this->queryForMonthStoreDay($year_per_store_day, $month_per_store_day, '26'),\n '27' => $this->queryForMonthStoreDay($year_per_store_day, $month_per_store_day, '27'),\n '28' => $this->queryForMonthStoreDay($year_per_store_day, $month_per_store_day, '28'),\n '29' => $this->queryForMonthStoreDay($year_per_store_day, $month_per_store_day, '29'),\n '30' => $this->queryForMonthStoreDay($year_per_store_day, $month_per_store_day, '30'),\n '31' => $this->queryForMonthStoreDay($year_per_store_day, $month_per_store_day, '31')\n );\n\n \n \n $temp_arr = $arr;\n\n $temp_arr['monthly']['01']['0'] = $this->complete_arr_per_day($arr,'01');\n $temp_arr['monthly']['02']['0'] = $this->complete_arr_per_day($arr,'02');\n $temp_arr['monthly']['03']['0'] = $this->complete_arr_per_day($arr,'03');\n $temp_arr['monthly']['04']['0'] = $this->complete_arr_per_day($arr,'04');\n $temp_arr['monthly']['05']['0'] = $this->complete_arr_per_day($arr,'05');\n $temp_arr['monthly']['06']['0'] = $this->complete_arr_per_day($arr,'06');\n $temp_arr['monthly']['07']['0'] = $this->complete_arr_per_day($arr,'07');\n $temp_arr['monthly']['08']['0'] = $this->complete_arr_per_day($arr,'08');\n $temp_arr['monthly']['09']['0'] = $this->complete_arr_per_day($arr,'09');\n $temp_arr['monthly']['10']['0'] = $this->complete_arr_per_day($arr,'10');\n $temp_arr['monthly']['11']['0'] = $this->complete_arr_per_day($arr,'11');\n $temp_arr['monthly']['12']['0'] = $this->complete_arr_per_day($arr,'12');\n $temp_arr['monthly']['13']['0'] = $this->complete_arr_per_day($arr,'13');\n $temp_arr['monthly']['14']['0'] = $this->complete_arr_per_day($arr,'14');\n $temp_arr['monthly']['15']['0'] = $this->complete_arr_per_day($arr,'15');\n $temp_arr['monthly']['16']['0'] = $this->complete_arr_per_day($arr,'16');\n $temp_arr['monthly']['17']['0'] = $this->complete_arr_per_day($arr,'17');\n $temp_arr['monthly']['18']['0'] = $this->complete_arr_per_day($arr,'18');\n $temp_arr['monthly']['19']['0'] = $this->complete_arr_per_day($arr,'19');\n $temp_arr['monthly']['20']['0'] = $this->complete_arr_per_day($arr,'20');\n $temp_arr['monthly']['21']['0'] = $this->complete_arr_per_day($arr,'21');\n $temp_arr['monthly']['22']['0'] = $this->complete_arr_per_day($arr,'22');\n $temp_arr['monthly']['23']['0'] = $this->complete_arr_per_day($arr,'23');\n $temp_arr['monthly']['24']['0'] = $this->complete_arr_per_day($arr,'24');\n $temp_arr['monthly']['25']['0'] = $this->complete_arr_per_day($arr,'25');\n $temp_arr['monthly']['26']['0'] = $this->complete_arr_per_day($arr,'26');\n $temp_arr['monthly']['27']['0'] = $this->complete_arr_per_day($arr,'27');\n $temp_arr['monthly']['28']['0'] = $this->complete_arr_per_day($arr,'28');\n $temp_arr['monthly']['29']['0'] = $this->complete_arr_per_day($arr,'29');\n $temp_arr['monthly']['30']['0'] = $this->complete_arr_per_day($arr,'30');\n $temp_arr['monthly']['31']['0'] = $this->complete_arr_per_day($arr,'31');\n\n $temp_arr['monthly']['mdscsi'] = $this->forMonth_perday_getOvrAllStore($temp_arr);\n\n\n $this->get_csv_report_monthly_store_perday($temp_arr,$year_per_store_day, $month_per_store_day);\n\n return $temp_arr;\n }", "title": "" }, { "docid": "c041d051e3649d1a691d2bd98a479df2", "score": "0.48693988", "text": "public function testExample()\n {\n\n $dateStr = '2017-4-6 00:00:00';\n \n \n $start = date_create($dateStr);\n $end = date_create($dateStr);\n \n \n \n $i = 0;\n // $datafac = new ReportSumsHourData();\n \n //$datafac->makeSettlement(\"2017-04-06 0:00:00\",\"2017-04-07 0:00:00\",\"CYC01\");\n \n while($i<68*24){\n dump(\"Begin.\");\n date_add($end, date_interval_create_from_date_string(\"1 hours\"));\n dump($start);\n dump($end);\n\n\n /* $userFac = new UserData();\n \n $pageSize = 100;\n $pageIndex = 1;\n $result = $userFac->query([],$pageSize,$pageIndex);\n while($pageIndex<=($result[\"pageCount\"])){ \n foreach($result[\"items\"] as $resultitem){\n */ \n // $datafac->makeReport(\n // date_format($start,\"Y-m-d H:00:00\"),\n // date_format($end,\"Y-m-d H:00:00\"),\n // \"CYC01\"); \n //}\n /* $pageIndex ++;\n $result = $userFac->query([],$pageSize,$pageIndex); \n }\n */\n date_add($start, date_interval_create_from_date_string(\"1 hours\"));\n \n $i++;\n \n }\n \n $this->assertTrue(true);\n }", "title": "" }, { "docid": "4ca079128841bac275d15cce778ee701", "score": "0.48625723", "text": "public function chartDataAction()\n \t{\n\t $this->_helper->layout->disableLayout();\n\t $this->_helper->viewRenderer->setNoRender(true);\n\t\n\t // Get params\n\t $module = $this->_getParam('modu', '');\n\t $start = $this->_getParam('start');\n\t $offset = $this->_getParam('offset', 0);\n\t $group = $this->_getParam('group', 'earn');\n\t $mode = $this->_getParam('mode');\n\t $chunk = $this->_getParam('chunk');\n\t $period = $this->_getParam('period');\n\t $periodCount = $this->_getParam('periodCount', 1);\n\t //$end = $this->_getParam('end');\n\t\n\t // Validate chunk/period\n\t if( !$chunk || !in_array($chunk, $this->_periods) ) {\n\t $chunk = Zend_Date::DAY;\n\t }\n\t if( !$period || !in_array($period, $this->_periods) ) {\n\t $period = Zend_Date::MONTH;\n\t }\n\t if( array_search($chunk, $this->_periods) >= array_search($period, $this->_periods) ) {\n\t die('whoops');\n\t return;\n\t }\n\t\n\t // Validate start\n\t if( $start && !is_numeric($start) ) {\n\t $start = strtotime($start);\n\t }\n\t if( !$start ) {\n\t $start = time();\n\t }\n\t\n\t // Fixes issues with month view\n\t Zend_Date::setOptions(array(\n\t 'extend_month' => true,\n\t ));\n\t\n\t // Get timezone\n\t $timezone = Engine_Api::_()->getApi('settings', 'core')\n\t ->getSetting('core_locale_timezone', 'GMT');\n\t $viewer = Engine_Api::_()->user()->getViewer();\n\t if( $viewer && $viewer->getIdentity() && !empty($viewer->timezone) ) {\n\t $timezone = $viewer->timezone;\n\t }\n\t\n\t // Make start fit to period?\n\t $startObject = new Zend_Date($start);\n\t $startObject->setTimezone($timezone);\n\t \n\t $partMaps = $this->_periodMap[$period];\n\t foreach( $partMaps as $partType => $partValue ) {\n\t $startObject->set($partValue, $partType);\n\t }\n\t\n\t // Do offset\n\t if( $offset != 0 ) {\n\t $startObject->add($offset, $period);\n\t }\n\t \n\t // Get end time\n\t $endObject = new Zend_Date($startObject->getTimestamp());\n\t $endObject->setTimezone($timezone);\n\t $endObject->add($periodCount, $period);\n\t $endObject->sub(1, Zend_Date::SECOND); // Subtract one second\n\t\n\t // Get data\n\t $logsTable = Engine_Api::_()->getDbtable('logs', 'yncredit');\n\t\t$logName = $logsTable -> info('name');\n\t\t\n\t\t$typeTable = Engine_Api::_() -> getDbTable('types', 'yncredit');\n\t\t$typeName = $typeTable -> info('name');\n\t\t\n\t\t$select = $logsTable -> select() \n\t\t\t-> from($logName, \"$logName.*\") \n\t\t\t-> joinLeft($typeName, \"$logName.type_id = $typeName.type_id\", \"\");\n\t\t\n\t\tif($module)\n\t\t{\n\t\t\t$select ->where('module = ?', $module);\n\t\t}\n\t $select -> where('`group` = ?', $group)\n\t\t // -> where(\"$logName.credit <> 0\")\n\t -> where('creation_date >= ?', gmdate('Y-m-d H:i:s', $startObject->getTimestamp()))\n\t -> where('creation_date < ?', gmdate('Y-m-d H:i:s', $endObject->getTimestamp()))\n\t -> order('creation_date ASC');\n\t $rawData = $logsTable->fetchAll($select);\n\t \n\t // Now create data structure\n\t $currentObject = clone $startObject;\n\t $nextObject = clone $startObject;\n\t $data = array();\n\t $dataLabels = array();\n\t $cumulative = 0;\n\t $previous = 0;\n\t\n\t do {\n\t $nextObject->add(1, $chunk);\n\t \n\t $currentObjectTimestamp = $currentObject->getTimestamp();\n\t $nextObjectTimestamp = $nextObject->getTimestamp();\n\t\n\t $data[$currentObjectTimestamp] = $cumulative;\n\t\n\t // Get everything that matches\n\t $currentPeriodCount = 0;\n\t foreach( $rawData as $rawDatum ) {\n\t $rawDatumDate = strtotime($rawDatum->creation_date);\n\t if( $rawDatumDate >= $currentObjectTimestamp && $rawDatumDate < $nextObjectTimestamp ) {\n\t $currentPeriodCount += abs($rawDatum->credit);\n\t }\n\t }\n\t\n\t // Now do stuff with it\n\t switch( $mode ) {\n\t default:\n\t case 'normal':\n\t $data[$currentObjectTimestamp] = $currentPeriodCount;\n\t break;\n\t case 'cumulative':\n\t $cumulative += $currentPeriodCount;\n\t $data[$currentObjectTimestamp] = $cumulative;\n\t break;\n\t case 'delta':\n\t $data[$currentObjectTimestamp] = $currentPeriodCount - $previous;\n\t $previous = $currentPeriodCount;\n\t break;\n\t }\n\t \n\t $currentObject->add(1, $chunk);\n\t } while( $currentObject->getTimestamp() < $endObject->getTimestamp() );\n\t\n\t // Reprocess label\n\t $labelStrings = array();\n\t $labelDate = new Zend_Date();\n\t foreach( $data as $key => $value ) {\n\t $labelDate->set($key);\n\t $labelStrings[] = $this->view->locale()->toDate($labelDate, array('size' => 'short')); //date('D M d Y', $key);\n\t }\n\t\n\t // Let's expand them by 1.1 just for some nice spacing\n\t $minVal = min($data);\n\t $maxVal = max($data);\n\t $minVal = floor($minVal * ($minVal < 0 ? 1.1 : (1 / 1.1)) / 10) * 10;\n\t $maxVal = ceil($maxVal * ($maxVal > 0 ? 1.1 : (1 / 1.1)) / 10) * 10;\n\t\n\t // Remove some labels if there are too many\n\t $xlabelsteps = 1;\n\t if( count($data) > 10 ) {\n\t $xlabelsteps = ceil(count($data) / 10);\n\t }\n\t\n\t // Remove some grid lines if there are too many\n\t $xsteps = 1;\n\t if( count($data) > 100 ) {\n\t $xsteps = ceil(count($data) / 100);\n\t }\n\t\n\t // Create base chart\n\t require_once 'OFC/OFC_Chart.php';\n\t\n\t // Make x axis labels\n\t $x_axis_labels = new OFC_Elements_Axis_X_Label_Set();\n\t $x_axis_labels->set_steps( $xlabelsteps );\n\t $x_axis_labels->set_labels( $labelStrings );\n\t\n\t // Make x axis\n\t $labels = new OFC_Elements_Axis_X();\n\t $labels->set_labels( $x_axis_labels );\n\t $labels->set_colour(\"#416b86\");\n\t $labels->set_grid_colour(\"#dddddd\");\n\t $labels->set_steps($xsteps);\n\t\n\t // Make y axis\n\t $yaxis = new OFC_Elements_Axis_Y();\n\t $yaxis->set_range($minVal, $maxVal/*, $steps*/);\n\t $yaxis->set_colour(\"#416b86\");\n\t $yaxis->set_grid_colour(\"#dddddd\");\n\t \n\t // Make data\n\t $graph = new OFC_Charts_Line();\n\t $graph->set_values( array_values($data) );\n\t $graph->set_colour(\"#5ba1cd\");\n\t\n\t // Make title\n\t $locale = Zend_Registry::get('Locale');\n\t $translate = Zend_Registry::get('Zend_Translate');\n\t $titleStr = $translate->_('YNCREDIT_GROUP_TYPE_' . strtoupper(trim(preg_replace('/[^a-zA-Z0-9]+/', '_', $group), '_')));\n\t $title = new OFC_Elements_Title( $titleStr . ': '. $this->view->locale()->toDateTime($startObject) . ' to ' . $this->view->locale()->toDateTime($endObject) );\n\t $title->set_style( \"{font-size: 14px;font-weight: bold;margin-bottom: 10px; color: #777777;}\" );\n\t\n\t // Make full chart\n\t $chart = new OFC_Chart();\n\t $chart->set_bg_colour('#ffffff');\n\t\n\t $chart->set_x_axis($labels);\n\t $chart->add_y_axis($yaxis);\n\t $chart->add_element($graph);\n\t $chart->set_title( $title );\n\t \n\t // Send\n\t $this->getResponse()->setBody( $chart->toPrettyString() );\n \t}", "title": "" }, { "docid": "c841c26d0c7a4a924755b19d545d89d1", "score": "0.48621204", "text": "function getLabaBerjalan($periode_start_date, $end_date, $do) {\r\n\t\r\n\t$kode_group_akun_sales = getKodeGroupByID(selectedRefGLSystemByCode(\"LB-PENJUALAN\"));\t\t\r\n\t$data_sales = getGroupByCriteria(\" id_group_account as idgrp, \r\n\t\t\t\t concat(kode_group_account, ' - ', nama_group_account) as des_group \", \r\n\t\t\t\t \" AND kode_group_account = '$kode_group_akun_sales'\",\"kode_group_account\");\r\n\t\t\t\t \r\n\t$kode_group_akun_expense = getKodeGroupByID(selectedRefGLSystemByCode(\"LB-BIAYA\"));\t\t\r\n\t\r\n\t$data_expense = getGroupByCriteria(\" id_group_account as idgrp \", \r\n\t\t\t\t\t\" AND kode_group_account = '$kode_group_akun_expense'\",\"kode_group_account\");\r\n\r\n\t$coa_sales = getChartOfAccountByCriteria(\" kode_coa \",\r\n\t\t \" AND id_group_account = \".getIDGroupByKode($kode_group_akun_sales).\"\", \" kode_coa ASC \");\t\t\t\t\r\n\t\r\n\t// for sales\r\n\t$d_income_plus = 0;\r\n\t$d_income_minus = 0;\r\n\t\r\n\tfor($i_sales = 0; $i_sales < count($coa_sales); $i_sales++) {\t\t\r\n\t\t$res = getSaldoAccountByCoa($coa_sales[$i_sales]['kode_coa'], $periode_start_date, $end_date, 1, $do);\t\t\t\t\r\n\t\tif ($coa_sales[$i_sales]['kode_coa'] == \"41000\") {\t\t\t\t\t\t\r\n\t\t\t$d_income_plus += ($res['kredit'] - $res['debit']);\r\n\t\t}else \r\n\t\t\t$d_income_minus += ($res['debit'] - $res['kredit']);\r\n\t}\t\t\t\r\n\t$value_income_statment = $d_income_plus - $d_income_minus;\r\n\t\r\n\t\r\n\t$coa_expenses = getChartOfAccountByCriteria(\" kode_coa, concat(kode_coa, ' - ', nama_coa) as des_coa\",\r\n\t\t\t\t\t\" AND id_group_account = \".getIDGroupByKode($kode_group_akun_expense).\"\", \" kode_coa ASC \");\r\n\t\t\t\t\r\n\t$sum_expenses = $xpenses = $kredit_expenses = 0;\t\t\t\t\t\t\t\t\t\t \r\n\tfor($i_expense = 0; $i_expense < count($coa_expenses); $i_expense++) {\t\r\n\t\t$result = getSaldoAccountByCoa($coa_expenses[$i_expense]['kode_coa'], $periode_start_date, $end_date, 1, $do);\t\t\t\t\r\n\t\t$xpenses = ($result['debit'] - $result['kredit']); \t\t\r\n\t\t$sum_expenses += $xpenses;\r\n\t}\t\t\t\r\n\t$value_laba = ($value_income_statment - $sum_expenses);\t\r\n\treturn $value_laba;\r\n}", "title": "" }, { "docid": "1d4edc9745506a9e2c2830a7106cb081", "score": "0.4858763", "text": "function dayrangeadmissions($hospital,$start_date,$end_date,$status){\r\n\t//plot patients on Admission and those not on admission within the time period.\r\n\t\t$returnval=\"\";\r\n\t\t$title='';\r\n\t\trequire $_SERVER['DOCUMENT_ROOT'].'/Connections/dbconnection.php';\r\n\t\tmysql_select_db($database_dbconnection, $dbconnection);\r\n\t\tif($status=='undischarged'){\r\n\t\t$sql=\"SELECT count(admissions.patient_id) as admissions,patient_demograph.* FROM admissions,patient_demograph WHERE admissions.patient_id = patient_demograph.patient_ID AND date_discharged is NULL AND date_admitted BETWEEN '\".$start_date.\"' AND '\".$end_date.\"' ORDER BY date_admitted\";\r\n\t\t$title='<h3>ADMITTED UNDISCHARGED PATIENTS</h3>';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t$sql=\"SELECT count(admissions.patient_id) as admissions,patient_demograph.* FROM admissions,patient_demograph WHERE admissions.patient_id = patient_demograph.patient_ID AND date_discharged is NOT NULL AND date_discharged BETWEEN '\".$start_date.\"' AND '\".$end_date.\"' ORDER BY date_discharged\";\r\n\t\t$title='<h3>ADMITTED BUT DISCHARGED PATIENTS</h3>';\r\n\t\t}\r\n\t\t$rst = mysql_query($sql,$dbconnection);\r\n\t\t$row = mysql_fetch_assoc($rst);\r\n\t\tif(mysql_num_rows($rst)>0){\r\n\t\t\t$total=mysql_num_rows($rst);\r\n\t\t\t$total=$row['admissions'];\r\n\t\t\t//$returnval .= $title;\r\n\t\t\treturn $total;\r\n\t\t\t$sn=1;\r\n\t\t$returnval.= '<table id=\"admissionreport\" align=\"left\" width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"5\">';\r\n\t\t\t$returnval.= '<thead>\r\n<tr><th>S/N</th><th>Patient</th><th>Date Admitted</th><th>Date Discharged</th><th>Discharged by</th></tr>\r\n</thead>';\r\n\t\t\tdo {\r\n\t\t\t\trequire_once 'class.patient.php';\r\n\t\t\t\t$pt = new Manager;\r\n\t\t\t\trequire_once 'class.staff.php';\r\n\t\t\t\t$staff = new StaffManager;\r\n\t\t\t$returnval.= '<tr class=\"fancy\"><td align=\"right\">'.$sn.'</td><td><a href=\"../../patient_profile.php?id='.$row['patient_id'].'\">'.$pt->getPatientName($row['patient_id']).'</a></td><td>'.date('d M, Y',strtotime($row['date_admitted'])).'</td><td>'.(($row['date_discharged']!=NULL)?$row['date_discharged']:'Not discharged').'</td><td>'.$staff->getDoctorNameFromID($row['discharged_by'],2).'</td></tr>';\r\n\t\t\r\n\t\t\t\t$sn+=1;\r\n\t\t\t\t}while($row = mysql_fetch_assoc($rst));\r\n\t\t\t\t$returnval.='<tr class=\"fancy\">\r\n <td>&nbsp;</td>\r\n <td colspan=\"4\"><strong>TOTAL: '.$total.'</strong></td>\r\n </tr></table>';\r\n\t\t\t}else {\r\n\t\t$returnval = 'There are no Admissions during this period';\r\n\t\t\t}\r\n\t\treturn $returnval;\r\n\t\t}", "title": "" }, { "docid": "b9de76a82092f91469dec3ea67a608ae", "score": "0.48577282", "text": "function prepare_chart_data( $data, $date_key, $data_key, $interval, $group_by ) {\n\t\t$prepared_data = [];\n\t\t// get start in site's timezone\n\t\t$start_date = clone $this->date_from;\n\t\t$start_date->convert_to_site_time();\n\n\t\t// Ensure all days (or months) have values first in this range\n\t\tfor ( $i = 0; $i <= $interval; $i ++ ) {\n\t\t\tswitch ( $group_by ) {\n\t\t\t\tcase 'day' :\n\t\t\t\t\t$time = strtotime( date( 'Ymd', strtotime( \"+{$i} DAY\", $start_date->getTimestamp() ) ) ) . '000';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'month' :\n\t\t\t\tdefault :\n\t\t\t\t\t$time = strtotime( date( 'Ym', strtotime( \"+{$i} MONTH\", $start_date->getTimestamp() ) ) . '01' ) . '000';\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif ( ! isset( $prepared_data[ $time ] ) ) {\n\t\t\t\t$prepared_data[ $time ] = array( esc_js( $time ), 0 );\n\t\t\t}\n\t\t}\n\n\t\tforeach ( $data as $d ) {\n\t\t\t$date = $d->$date_key;\n\n\t\t\tif ( ! $date ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( ! is_a( $date, 'DateTime' ) ) {\n\t\t\t\t$date = new DateTime( $date );\n\t\t\t}\n\n\t\t\tswitch ( $group_by ) {\n\t\t\t\tcase 'day' :\n\t\t\t\t\t$time = strtotime( $date->format( 'Ymd' ) ) . '000';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'month' :\n\t\t\t\tdefault :\n\t\t\t\t\t$time = strtotime( $date->format( 'Ym' ) . '01' ) . '000';\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif ( ! isset( $prepared_data[ $time ] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( $data_key ) {\n\t\t\t\t$prepared_data[ $time ][1] += $d->$data_key;\n\t\t\t} else {\n\t\t\t\t$prepared_data[ $time ][1] ++;\n\t\t\t}\n\t\t}\n\n\t\treturn $prepared_data;\n\t}", "title": "" }, { "docid": "d63cf7da4403b194ada5018245c829e7", "score": "0.48486987", "text": "public function getDates()\n {\n $carbonOrderDay = new Carbon();\n // $carbonOrderDay = new Carbon('+3 days');\n // $carbonOrderDay = new Carbon('+6 days');\n $weekDaysWithDates = [];\n\n // расчёт дня заказа в зависимости от текущего дня недели\n if ($carbonOrderDay->dayOfWeek == 5) { // пятнца заказ надо делать на понедельник\n $carbonOrderDay = $carbonOrderDay->addDays(3);\n\n for ($i = 1; $i <= 5; $i++) {\n $carbonOrderDay = $carbonOrderDay->addDays($i - 1);\n $weekDaysWithDates[$i] = [\n 'день недели' => $carbonOrderDay->dayOfWeek,\n // 'число' => $carbonOrderDay->day,\n 'число' => $carbonOrderDay->isoFormat('DD'),\n 'месяц' => $carbonOrderDay->isoFormat('MM'),\n 'год' => $carbonOrderDay->year\n ];\n $carbonOrderDay = $carbonOrderDay->addDays(-($i - 1));\n }\n } else if ($carbonOrderDay->dayOfWeek == 6) { // суббота заказ надо делать на понедельник\n $carbonOrderDay = $carbonOrderDay->addDays(2);\n\n for ($i = 1; $i <= 5; $i++) {\n $carbonOrderDay = $carbonOrderDay->addDays($i - 1);\n $weekDaysWithDates[$i] = [\n 'день недели' => $carbonOrderDay->dayOfWeek,\n // 'число' => $carbonOrderDay->day,\n 'число' => $carbonOrderDay->isoFormat('DD'),\n 'месяц' => $carbonOrderDay->isoFormat('MM'),\n 'год' => $carbonOrderDay->year\n ];\n $carbonOrderDay = $carbonOrderDay->addDays(-($i - 1));\n }\n } else if ($carbonOrderDay->dayOfWeek == 0) { // воскресенье заказ надо делать на понедельник\n $carbonOrderDay = $carbonOrderDay->addDays(1);\n\n for ($i = 1; $i <= 5; $i++) {\n $carbonOrderDay = $carbonOrderDay->addDays($i - 1);\n $weekDaysWithDates[$i] = [\n 'день недели' => $carbonOrderDay->dayOfWeek,\n // 'число' => $carbonOrderDay->day,\n 'число' => $carbonOrderDay->isoFormat('DD'),\n 'месяц' => $carbonOrderDay->isoFormat('MM'),\n 'год' => $carbonOrderDay->year\n ];\n $carbonOrderDay = $carbonOrderDay->addDays(-($i - 1));\n }\n } else { // заказ надо делать на следующий день\n // тут задаём даты на дни, которые будут на текущей неделе\n $startDay = $carbonOrderDay->dayOfWeek;\n for ($i = $startDay; $i <= 5; $i++) {\n $carbonOrderDay = $carbonOrderDay->addDays($i - $startDay);\n $weekDaysWithDates[$i] = [\n 'день недели' => $carbonOrderDay->dayOfWeek,\n // 'число' => $carbonOrderDay->day,\n 'число' => $carbonOrderDay->isoFormat('DD'),\n 'месяц' => $carbonOrderDay->isoFormat('MM'),\n 'год' => $carbonOrderDay->year\n ];\n $carbonOrderDay = $carbonOrderDay->addDays(-($i - $startDay));\n }\n // тут задаём даты на дни, которые будут на СЛЕДУЮЩЕЙ неделе\n for ($i = $startDay - 1; $i >= 1; $i--) {\n $carbonOrderDay = $carbonOrderDay->addDays($i + 7 - $startDay);\n $weekDaysWithDates[$i] = [\n 'день недели' => $carbonOrderDay->dayOfWeek,\n // 'число' => $carbonOrderDay->day,\n 'число' => $carbonOrderDay->isoFormat('DD'),\n 'месяц' => $carbonOrderDay->isoFormat('MM'),\n 'год' => $carbonOrderDay->year\n ];\n $carbonOrderDay = $carbonOrderDay->addDays(-($i + 7 - $startDay));\n }\n }\n\n return $weekDaysWithDates;\n }", "title": "" }, { "docid": "73dc09dbbd2d7dc5c091e8be7d41c81c", "score": "0.48461062", "text": "function SetUpStartGroup() {\n\tglobal $nStartGrp, $nTotalGrps, $nDisplayGrps;\n\n\t// Exit if no groups\n\tif ($nDisplayGrps == 0)\n\t\treturn;\n\n\t// Check for a 'start' parameter\n\tif (@$_GET[EW_REPORT_TABLE_START_GROUP] != \"\") {\n\t\t$nStartGrp = $_GET[EW_REPORT_TABLE_START_GROUP];\n\t\t$_SESSION[EW_REPORT_TABLE_SESSION_START_GROUP] = $nStartGrp;\n\t} elseif (@$_GET[\"pageno\"] != \"\") {\n\t\t$nPageNo = $_GET[\"pageno\"];\n\t\tif (is_numeric($nPageNo)) {\n\t\t\t$nStartGrp = ($nPageNo-1)*$nDisplayGrps+1;\n\t\t\tif ($nStartGrp <= 0) {\n\t\t\t\t$nStartGrp = 1;\n\t\t\t} elseif ($nStartGrp >= intval(($nTotalGrps-1)/$nDisplayGrps)*$nDisplayGrps+1) {\n\t\t\t\t$nStartGrp = intval(($nTotalGrps-1)/$nDisplayGrps)*$nDisplayGrps+1;\n\t\t\t}\n\t\t\t$_SESSION[EW_REPORT_TABLE_SESSION_START_GROUP] = $nStartGrp;\n\t\t} else {\n\t\t\t$nStartGrp = @$_SESSION[EW_REPORT_TABLE_SESSION_START_GROUP];\n\t\t}\n\t} else {\n\t\t$nStartGrp = @$_SESSION[EW_REPORT_TABLE_SESSION_START_GROUP];\t\n\t}\n\n\t// Check if correct start group counter\n\tif (!is_numeric($nStartGrp) || $nStartGrp == \"\") { // Avoid invalid start group counter\n\t\t$nStartGrp = 1; // Reset start group counter\n\t\t$_SESSION[EW_REPORT_TABLE_SESSION_START_GROUP] = $nStartGrp;\n\t} elseif (intval($nStartGrp) > intval($nTotalGrps)) { // Avoid starting group > total groups\n\t\t$nStartGrp = intval(($nTotalGrps-1)/$nDisplayGrps) * $nDisplayGrps + 1; // Point to last page first group\n\t\t$_SESSION[EW_REPORT_TABLE_SESSION_START_GROUP] = $nStartGrp;\n\t} elseif (($nStartGrp-1) % $nDisplayGrps <> 0) {\n\t\t$nStartGrp = intval(($nStartGrp-1)/$nDisplayGrps) * $nDisplayGrps + 1; // Point to page boundary\n\t\t$_SESSION[EW_REPORT_TABLE_SESSION_START_GROUP] = $nStartGrp;\n\t}\n}", "title": "" }, { "docid": "73dc09dbbd2d7dc5c091e8be7d41c81c", "score": "0.48461062", "text": "function SetUpStartGroup() {\n\tglobal $nStartGrp, $nTotalGrps, $nDisplayGrps;\n\n\t// Exit if no groups\n\tif ($nDisplayGrps == 0)\n\t\treturn;\n\n\t// Check for a 'start' parameter\n\tif (@$_GET[EW_REPORT_TABLE_START_GROUP] != \"\") {\n\t\t$nStartGrp = $_GET[EW_REPORT_TABLE_START_GROUP];\n\t\t$_SESSION[EW_REPORT_TABLE_SESSION_START_GROUP] = $nStartGrp;\n\t} elseif (@$_GET[\"pageno\"] != \"\") {\n\t\t$nPageNo = $_GET[\"pageno\"];\n\t\tif (is_numeric($nPageNo)) {\n\t\t\t$nStartGrp = ($nPageNo-1)*$nDisplayGrps+1;\n\t\t\tif ($nStartGrp <= 0) {\n\t\t\t\t$nStartGrp = 1;\n\t\t\t} elseif ($nStartGrp >= intval(($nTotalGrps-1)/$nDisplayGrps)*$nDisplayGrps+1) {\n\t\t\t\t$nStartGrp = intval(($nTotalGrps-1)/$nDisplayGrps)*$nDisplayGrps+1;\n\t\t\t}\n\t\t\t$_SESSION[EW_REPORT_TABLE_SESSION_START_GROUP] = $nStartGrp;\n\t\t} else {\n\t\t\t$nStartGrp = @$_SESSION[EW_REPORT_TABLE_SESSION_START_GROUP];\n\t\t}\n\t} else {\n\t\t$nStartGrp = @$_SESSION[EW_REPORT_TABLE_SESSION_START_GROUP];\t\n\t}\n\n\t// Check if correct start group counter\n\tif (!is_numeric($nStartGrp) || $nStartGrp == \"\") { // Avoid invalid start group counter\n\t\t$nStartGrp = 1; // Reset start group counter\n\t\t$_SESSION[EW_REPORT_TABLE_SESSION_START_GROUP] = $nStartGrp;\n\t} elseif (intval($nStartGrp) > intval($nTotalGrps)) { // Avoid starting group > total groups\n\t\t$nStartGrp = intval(($nTotalGrps-1)/$nDisplayGrps) * $nDisplayGrps + 1; // Point to last page first group\n\t\t$_SESSION[EW_REPORT_TABLE_SESSION_START_GROUP] = $nStartGrp;\n\t} elseif (($nStartGrp-1) % $nDisplayGrps <> 0) {\n\t\t$nStartGrp = intval(($nStartGrp-1)/$nDisplayGrps) * $nDisplayGrps + 1; // Point to page boundary\n\t\t$_SESSION[EW_REPORT_TABLE_SESSION_START_GROUP] = $nStartGrp;\n\t}\n}", "title": "" }, { "docid": "2bf7e108c7e392bdcbd6e932466d7ded", "score": "0.48410785", "text": "function blogfused_get_time_diff($from,$to) {\n \n // Array of time period chunks\n\t$chunks = array(\n\t\tarray( 60 * 60 * 24 * 365 , __( 'year', 'bpmagic' ), __( 'years', 'bpmagic' ) ),\n\t\tarray( 60 * 60 * 24 * 30 , __( 'month', 'bpmagic' ), __( 'months', 'bpmagic' ) ),\n\t\tarray( 60 * 60 * 24 * 7, __( 'week', 'bpmagic' ), __( 'weeks', 'bpmagic' ) ),\n\t\tarray( 60 * 60 * 24 , __( 'day', 'bpmagic' ), __( 'days', 'bpmagic' ) ),\n\t\tarray( 60 * 60 , __( 'hour', 'bpmagic' ), __( 'hours', 'bpmagic' ) ),\n\t\tarray( 60 , __( 'minute', 'bpmagic' ), __( 'minutes', 'bpmagic' ) ),\n\t\tarray( 1, __( 'second', 'bpmagic' ), __( 'seconds', 'bpmagic' ) )\n\t);\n \n\t\n \n\t$current_time =$to;\n\t$newer_date =$to;// strtotime( $current_time );\n \n\t// Difference in seconds\n\t$since = $newer_date - $from;\n \n\t// Something went wrong with date calculation and we ended up with a negative date.\n\tif ( 0 > $since )\n\t\treturn __( 'sometime', 'bpmagic' );\n \n\t/**\n\t * We only want to output one chunks of time here, eg:\n\t * x years\n\t * xx months\n\t * so there's only one bit of calculation below:\n\t */\n \n\t//Step one: the first chunk\n\tfor ( $i = 0, $j = count($chunks); $i < $j; $i++) {\n\t\t$seconds = $chunks[$i][0];\n \n\t\t// Finding the biggest chunk (if the chunk fits, break)\n\t\tif ( ( $count = floor($since / $seconds) ) != 0 )\n\t\t\tbreak;\n\t}\n \n\t// Set output var\n\t$output = ( 1 == $count ) ? '1 '. $chunks[$i][1] : $count . ' ' . $chunks[$i][2];\n \n \n\tif ( !(int)trim($output) ){\n\t\t$output = '0 ' . __( 'seconds', 'bpmagic' );\n\t}\n \n\t$output .= __(' ago', 'bpmagic');\n \n\treturn $output;\n}", "title": "" }, { "docid": "f2a4f06dc33b2d3fc4154c6140ec2fd4", "score": "0.4840808", "text": "function facetapi_get_date_gap($start_date, $end_date) {\n $range = array(strtotime($start_date), strtotime($end_date));\n if (!in_array(FALSE, $range, TRUE)) {\n return facetapi_get_timestamp_gap($range[0], $range[1]);\n }\n return FALSE;\n}", "title": "" }, { "docid": "633ac16de79e00d66a6e6ea4bdce8b72", "score": "0.48366672", "text": "function getWeeklyRecurringEventDates($startDate, $endDate, $weeklyFrequency, $numberOccurrencies, $weekDays) {\n\t\t/*$count_week_on_month=floor(date(\"j\")/7) + 1;\n echo \"<br />\";\n echo $count_week_on_month;\n echo \"<br />\";\n echo $weeklyFrequency;\n echo \"--<br />\"; */ \n //stop(); \n //print_r($weekDays); \n // stop();\n $eventDates = array() ;\t\t\t\t\n\t\t$startTime = strtotime($startDate) ;\t\n\t\t$originalStartTime = $startTime ;\n\t\t$endTime = strtotime($endDate) ;\t\n\t\t$originalEndTime = $endTime ; \n //print_r($numberOccurrencies); \n //stop();\n\t\t$endTime = strtotime($endDate.' 23:59:59') ;\n\t\tif ($numberOccurrencies) {\n\t\t\t$count = 0 ;\n $weekCount = 0 ;\n\t\t\t$i = 0 ;\n\t\t\t$weekDay = date('w', $startTime) ; // Номер РґРЅСЏ недели даты начала события\n\t\t\t$startTimeWeek = $startTime - $weekDay*24*3600 ; // Начальная дата недели (начало работы события)\n\t\t\t \n //$weekDays = explode(',',$weekDays); ?????????????????\n \t\t\t//while ($count < $numberOccurrencies) {\n while ($weekCount <= $weeklyFrequency) {\n $weekCount++;\t\t\t\t\n\t\t\t\tforeach ($weekDays as $weekDay) {\n //var_dump($weekDay);stop();\t\n\t\t\t\t\t$nextEventDate = $startTimeWeek + $weekDay*24*3600 ;\n\t\t\t\t\tif (($nextEventDate >= $originalStartTime) && ($count < $numberOccurrencies)) {\n\t\t\t\t\t\t$eventDates[] = strftime('%Y-%m-%d %H:%M:%S', $nextEventDate) ;\n\t\t\t\t\t\t$count++ ;\n\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t}\n $startTimeWeek = $startTimeWeek + (7*24*3600); //Начало следующей недели \n\t\t\t}\t\t\t\t\t\t\n\t\t} else {\n\t\t\t$weekDay = date('w', $startTime) ;\n\t\t\t//$startTime = $startTime - $weekDay*24*3600 ;\n $startTimeWeek = $startTime - $weekDay*24*3600 ;\n\t\t\t//while ($startTime < $endTime) {\n while ($startTimeWeek < $endTime) {\n\t\t\t\tforeach ($weekDays as $weekDay) {\n\t\t\t\t\t//$nextEventDate = $startTime + $weekDay*24*3600 ;\n $nextEventDate = $startTimeWeek + $weekDay*24*3600 ;\n\t\t\t\t\tif ($nextEventDate < $originalStartTime)\n\t\t\t\t\t\tcontinue ;\t\t\t\t\t\n\t\t\t\t\tif ($nextEventDate <= $endTime) {\n\t\t\t\t\t\t$eventDates[] = strftime('%Y-%m-%d %H:%M:%S', $nextEventDate) ;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t//$startTime += $weeklyFrequency*7*24*3600 ;\n $startTimeWeek = $startTimeWeek + (7*24*3600);\t\t\t\t\n\t\t\t}\t\t\t\t\t\n\t\t}\t\n //print_r($eventDates);stop();\t\t\n\t\treturn $eventDates ;\t\n\t}", "title": "" }, { "docid": "e0ab61ee79f4a3ae47f6f7ee5efa93ad", "score": "0.4834726", "text": "function _date_normalize($base, $result)\n{\n $result = $this->_date_range_limit(0, 60, 60, \"s\", \"i\", $result);\n $result = $this->_date_range_limit(0, 60, 60, \"i\", \"h\", $result);\n $result = $this->_date_range_limit(0, 24, 24, \"h\", \"d\", $result);\n $result = $this->_date_range_limit(0, 12, 12, \"m\", \"y\", $result);\n\n $result = $this->_date_range_limit_days($base, $result);\n\n $result = $this->_date_range_limit(0, 12, 12, \"m\", \"y\", $result);\n\n return $result;\n}", "title": "" }, { "docid": "eb484afdee9d8acfd42947a049199ed5", "score": "0.4834536", "text": "function get_amt_same_period($time_start, $time_end){\n $backtracking = 5;\n\n $old_year_start = substr($time_start,0,4);\n $time_start_wo_y = ltrim($time_start,$old_year_start);\n $old_year_end = substr($time_end,0,4);\n $time_end_wo_y = ltrim($time_end,$old_year_end);\n\n $new_time_start=array();\n for($i=0;$i<$backtracking;$i++){\n $new_time_start[$i] = ((int)$old_year_start - $i - 1).$time_start_wo_y;\n }\n $new_time_end=array();\n for($i=0;$i<$backtracking;$i++){\n $new_time_end[$i] = ((int)$old_year_end - $i - 1).$time_end_wo_y;\n }\n\n $array_result = array();\n for($i=0;$i<$backtracking;$i++){\n $query = \"SELECT SUM(quantity) FROM `ew_transaction` WHERE `time` BETWEEN '\".$new_time_start[$i].\"' AND '\".$new_time_end[$i].\"' AND `type` = 'part' AND `quantity` < '0';\";\n\n if($result_set = mysql_query($query)){\n $row_s = mysql_fetch_row($result_set);\n $array_result[$i]['total_amount'] = ($row_s[0] == \"\")?'0':$row_s[0];\n $array_result[$i]['date_start'] = $new_time_start[$i];\n $array_result[$i]['date_end'] = $new_time_end[$i];\n }else{\n $array_result[$i] = null;\n }\n }\n return $array_result;\n //\"SELECT SUM(quantity) FROM `ew_transaction` WHERE `time` BETWEEN '\".$q1s.\" 00:00:00' AND '\".$q1e.\" 23:59:59' AND `type` = 'part' AND `quantity` < '0';\";\n}", "title": "" }, { "docid": "72660ad70d46b814a10d3c6189a57867", "score": "0.48331273", "text": "protected function _fillSeriesIncremental() {\n\n $groupByType = $this->_context->getGroupByType();\n\n /** @var string $period A DatePeriod compatible string */\n $period = null;\n\n switch( $groupByType ) {\n case DateContext::GROUP_HOUR:\n $period = 'PT1H';\n break;\n case DateContext::GROUP_DAY:\n $period = 'P1D';\n break;\n case DateContext::GROUP_WEEK:\n $period = 'P1W';\n break;\n case DateContext::GROUP_MONTH:\n $period = 'P1M';\n break;\n case DateContext::GROUP_QUARTER:\n $period = 'P3M';\n break;\n case DateContext::GROUP_YEAR:\n $period = 'P1Y';\n break;\n default:\n Throw new \\UnexpectedValueException(\"Invalid group by type: {$groupByType}\");\n }\n\n $increment = new DateInterval( $period );\n $seriesTime = clone $this->_context->getFromDate();\n $endDate = $this->_context->getToDate();\n $breaker = 9999;\n\n // If we're incrementing in months then we need to make sure that we don't use a date\n // higher than 28 (because the increment gets confused if we try and jump one month forward\n // from something like the 31st to a month with only 30 days).\n if( in_array($groupByType, [DateContext::GROUP_MONTH, DateContext::GROUP_QUARTER], false) ) {\n $date = (int) $seriesTime->format('d');\n if( $date > 28 ) {\n $seriesTime->setDate( $seriesTime->format('Y'), $seriesTime->format('m'), 28 );\n }\n }\n\n while( $seriesTime <= $endDate && --$breaker ) {\n\n $group = $this->_context->getGroupForTime( $seriesTime );\n $label = $this->_context->getLabelForTime( $seriesTime );\n $period = $this->_context->getPeriodForTime( $seriesTime );\n\n $this->_series[ $group ] = array(\n 'key' => $group,\n 'label' => $label,\n 'stamp' => $seriesTime->getTimestamp(),\n 'period' => $period\n );\n\n $seriesTime->add( $increment );\n }\n\n $group = $this->_context->getGroupForTime( $endDate );\n if( ! array_key_exists($group, $this->_series) ) {\n $label = $this->_context->getLabelForTime( $endDate );\n $this->_series[ $group ] = array(\n 'key' => $group,\n 'label' => $label,\n 'stamp' => $endDate->getTimestamp()\n );\n }\n\n return true;\n\n }", "title": "" }, { "docid": "d65093cd13fba23318538035f7d6e40f", "score": "0.48328578", "text": "public function createDailyCampaignInterval()\n {\n global $inputArrayCSV; // User Data Input\n global $campaignData; // Campaign Days\n\n // Get the first date entered by the user to calculate 3 months from now.\n $firstInputDate = $inputArrayCSV['0'];\n $startTime = strtotime($firstInputDate['0']); // Get the start Campaign Date\n $endTime = strtotime($firstInputDate['0'] . \"+3 months\"); // Get the date when Campaign Ends\n \n for ( $i = $startTime; $i <= $endTime; $i = $i + 86400 ) // Add everyday date in the $campaignData for 3 months\n {\n $thisDate = date( 'm/d/Y', $i );\n $campaignData[$thisDate] = ['date' => $thisDate]; \n\n // Go through every budget change and verify if it coresponds to the actual day, if so, add the budget changes (value,time) to the array. \n foreach($inputArrayCSV as $array)\n {\n if($array[0] == $thisDate)\n {\n array_shift($array);\n\n $j=0;\n $resultArr=[];\n $bugets=[];\n $hours=[];\n\n foreach($array as $arr)\n {\n if($j % 2 !== 0)\n {\n $hours[] = $arr;\n } else {\n $bugets[] = $arr;\n }\n $j++;\n }\n\n for($k=0;$k<sizeof($hours);$k++)\n {\n $resultArr[] = \n [\n 'hour' => $hours[$k],\n 'buget' => $bugets[$k]\n ];\n }\n\n $campaignData[$thisDate]['bugetPerHour'] = $resultArr;\n }\n }\n }\n }", "title": "" }, { "docid": "f7152802a030e0c0673b8ccd2f2d7f80", "score": "0.48282066", "text": "public function actualActivityTarget() {\n \n $allFinancialYear = $this->dao->allFinancialYear();\n\t\t$financial_year =\"\";\n /*******/\n $arr = array();\n $scoreID = $this->dao->getReportSettings(3,\"id\");\n $groupArr = explode('|', $scoreID[0]->param_value);\n if (!empty($groupArr)){\n foreach($groupArr as $k=> $rowdata) {\n $rowArray = explode(\"~\",$rowdata);\n $indexdata = $rowArray[0];\n $data = $rowArray[1];\n $clause = \" id='\" . $indexdata . \"'\";\n $parentDivisionxx = $this->dao->get_division_department($clause); \n $arr[] = $parentDivisionxx[0];\n $arr[$k]->groupid = $data;\n }\n }\n \n $this->beanUi->set_view_data(\"allDistrict\", $arr);\n /*******/\n $_action = $this->bean->get_request(\"_action\");\n if( $_action == \"Create\" ) { \n \n $finalcial_M_Y_from = date(\"Y-m\",strtotime('01-'.$this->bean->get_request(\"month_year_from\")));\n $finalcial_M_Y_to = date(\"Y-m\",strtotime('01-'.$this->bean->get_request(\"month_year_to\")));\n\n $ArrMomthList = $this->getDatesFromRange( $finalcial_M_Y_from, $finalcial_M_Y_to);\n \n $financial_district_id_create = $this->bean->get_request(\"financial_district\");\n \n $allActivity = $this->dao->get_activities();\n $workshop = $commmeeting = $training = $safetyDays = $siteAudit = $incident = $ppeAudit = $safeyObs = $safeyObsLIneFunc = array();\n foreach( $ArrMomthList as $rowdata2)\n {\n \n $month = date(\"Y-m\",strtotime($rowdata2));\n $mnth = date(\"m\",strtotime($rowdata2));\n $year = date(\"Y\",strtotime($rowdata2));\n\n $workshop[1][$month][$financial_district_id_create] = $this->dao->getActualTarget(1,$table=\"actualtarget_view\",$col=\"activity_date\",date(\"Y-m\",strtotime($rowdata2)),$financial_district_id_create); \n $commmeeting[2][$month][$financial_district_id_create] = $this->dao->getActualTarget(2,$table=\"actualtarget_view\",$col=\"activity_date\",date(\"Y-m\",strtotime($rowdata2)),$financial_district_id_create); \n $training[3][$month][$financial_district_id_create] = $this->dao->getActualTargetTraining(date(\"Y-m\",strtotime($rowdata2)),$financial_district_id_create); \n $safetyDays[4][$month][$financial_district_id_create] = $this->dao->getActualTarget(4,$table=\"actualtarget_view\",$col=\"activity_date\",date(\"Y-m\",strtotime($rowdata2)),$financial_district_id_create); \n $siteAudit[5][$month][$financial_district_id_create] = $this->dao->getActualTarget(5,$table=\"actualtarget_audit_view\",$col=\"date_of_audit\",date(\"Y-m\",strtotime($rowdata2)),$financial_district_id_create); \n $incident[6][$month][$financial_district_id_create] = $this->dao->getActualTarget(6,$table=\"actualtarget_incident_view\",$col=\"date_of_incident\",date(\"Y-m\",strtotime($rowdata2)),$financial_district_id_create);\n $ppeAudit[7][$month][$financial_district_id_create] = $this->dao->getActualTarget(7,$table=\"actualtarget_ppeaudit_view\",$col=\"date_of_audit\",date(\"Y-m\",strtotime($rowdata2)),$financial_district_id_create); \n $safeyObs[8][$month][$financial_district_id_create] = $this->dao->getActualTargetSafeyObs($mnth,$year,$financial_district_id_create);\n\n }\n $this->beanUi->set_view_data(\"workshop\", $workshop);\n $this->beanUi->set_view_data(\"commMeeting\", $commmeeting);\n $this->beanUi->set_view_data(\"training\", $training);\n $this->beanUi->set_view_data(\"safetyDays\", $safetyDays);\n $this->beanUi->set_view_data(\"siteAudit\", $siteAudit);\n $this->beanUi->set_view_data(\"incident\", $incident);\n $this->beanUi->set_view_data(\"ppeAudit\", $ppeAudit);\n $this->beanUi->set_view_data(\"safeyObs\", $safeyObs);\n $this->beanUi->set_view_data(\"allActivity\", $allActivity);\n \n }\n $this->beanUi->set_view_data(\"financial_year\", @$ArrMomthList);\n //$this->beanUi->set_view_data(\"allFinancialYear\", $allFinancialYear);\n $this->beanUi->set_view_data(\"FinancialYearFromTo\", @$finalcial_M_Y_from.\",\".@$finalcial_M_Y_to);\n }", "title": "" } ]
fa6679a53c4a857ac0c0a674411ce74f
Deletes a cached fragment.
[ { "docid": "8534f0d97ec57968f61bc0f2c0a4032f", "score": "0.65942055", "text": "function expire_fragment($options)\n {\n $key = $this->fragment_cache_key($options);\n $this->logger->log_debug() && $this->logger->debug(\"Expired fragment $key\");\n $this->cache->delete($key);\n }", "title": "" } ]
[ { "docid": "4305fd58d00722bf36c04842a0c4c72f", "score": "0.61271036", "text": "protected function _deleteCache() {\n $this->memcache->delete($this->_getKey());\n }", "title": "" }, { "docid": "48812af10a2cffd713dee858b581a115", "score": "0.5961777", "text": "protected function delete()\n\t{\n\t\t$this->memcached->forget($this->session['id']);\n\t}", "title": "" }, { "docid": "69c0b67565273270dd495c1a86c304de", "score": "0.5886313", "text": "public function deleteCache(): void\n {\n if ($this->redisManager->getClient()->exists($this->getCacheId())) {\n $this->redisManager->getClient()->del($this->getCacheId());\n }\n }", "title": "" }, { "docid": "1a2a57d5290407f5bc38e1a18fc53cda", "score": "0.5841859", "text": "public function deleted()\n {\n $this->clearCache();\n }", "title": "" }, { "docid": "3670f7cec9040f6c8175d2677cc682f3", "score": "0.57256603", "text": "public function delete($id) \n {\n // Define a file path\n $file = $this->path . DS . $id . '.cache';\n \n // Return the direct result of the deleting\n return unlink($file);\n }", "title": "" }, { "docid": "ecfa3d8e38f97c9b8c7061a5bae10364", "score": "0.5687203", "text": "public function cacheDelete($segmentOne = '', $segmentTwo = '')\n {\n return $this->_getCache()->delete($segmentOne, $segmentTwo);\n }", "title": "" }, { "docid": "0792d8825c643d911b4a1269fd4b25d6", "score": "0.5661959", "text": "public function delete($id)\n\t{\n\t\t$this->oCache->delete($id);\n\t}", "title": "" }, { "docid": "08765a12930f8f0ac8a634f6369ca801", "score": "0.5580851", "text": "public function delete($id)\n\t{\n\t\treturn $this->_cacheComponent->delete($id);\n\t}", "title": "" }, { "docid": "ce9c18783af33479fa68142806f34a7e", "score": "0.55316836", "text": "public function delete($hash = null)\n {\n return $this->cacheProvider->delete($hash);\n }", "title": "" }, { "docid": "6d9b33e7f0e79a61d0dffa5e2f514837", "score": "0.5505906", "text": "function zend_shm_cache_delete($key) {}", "title": "" }, { "docid": "995235c7a260fbd2262730436ffaed4f", "score": "0.54805505", "text": "public function delete($key)\n {\n $stmt_cache = \\md5(__METHOD__);\n\n if (!isset($this->stmts[$stmt_cache])) {\n $this->stmts[$stmt_cache] = $this->db->prepare(\"\n DELETE\n FROM\n sb_cache_mysql\n WHERE\n cache_key LIKE :cache_key\n \");\n }\n\n return $this->stmts[$stmt_cache]->execute(Array(\n ':cache_key' => $key . '%'\n ));\n }", "title": "" }, { "docid": "bf8b07b217b8a85c5cb01934a6cf34b1", "score": "0.5473046", "text": "public function delete(string $cacheName) :void\n {\n unlink($this->getCachePath($cacheName));\n }", "title": "" }, { "docid": "b3402eab0e6e7fcae87ea6d302ba7755", "score": "0.5461113", "text": "public function DELETE() {\r\n // delete the cached resource, if it exists\r\n if ($this->HEAD($this->getURI())) {\r\n // load the resource, then delete it\r\n $this->bind($this->getStorage()->delete($this->getURI()));\r\n // mark changed\r\n $this->changed();\r\n }\r\n // return\r\n return $this->resource;\r\n }", "title": "" }, { "docid": "390d0b9efcb687ba53157e284dca8e1c", "score": "0.5416499", "text": "public function delete($key) {\n\t\t$this->cache->delete($key);\n\t}", "title": "" }, { "docid": "53c9eabd67250bc29ed60c3ee24ee00d", "score": "0.5373307", "text": "public function _delete_feedaty_cache()\n\t{\n\t\t$q = 'DELETE FROM `'._DB_PREFIX_.'feedaty_cache`';\n\t\tDb::getInstance()->execute($q);\n\t}", "title": "" }, { "docid": "6be0db5f53c1a0d68c2d10b24895230b", "score": "0.5334104", "text": "public function cacheClear () {\n $cachePath = $this->cachePath ();\n if (!isset($cachePath)) return;\n unlink ($cachePath);\n }", "title": "" }, { "docid": "3eb790c4c6f59e2b401ed3cd01ce7c04", "score": "0.53039455", "text": "function delete($key)\n {\n $begin = microtime( true );\n\n // Prepend prefix to key\n $key = $this->prefix . $key;\n\n self::$usageStats['deletes'][] = $key;\n $this->fDebug->add('Deleting ' . $key, 2, 'fMemcache');\n $result = $this->memcache->delete($key);\n\n if ( false !== $result )\n {\n \tunset( self::$localCache[$key] );\n }\n\n self::$usageStats['time'] += round( microtime( true ) - $begin, 3);\n return $result;\n }", "title": "" }, { "docid": "235732964a051b00dfbe779ccc965d5e", "score": "0.5298143", "text": "public function delete()\n {\n $this->_strategy->delete();\n }", "title": "" }, { "docid": "44a0b58ebdbf0a60ccec9432e530f5f9", "score": "0.5286147", "text": "public function delete($key)\n {\n Cache::forget($key);\n }", "title": "" }, { "docid": "9aa315bf7a3cb069479078f5210392d5", "score": "0.5283349", "text": "function delete($key) {\n\n if ( $this->multisite ) {\n $key = $this->site_prefix . $key;\n }\n\n $result = $this->_memcached->delete($key);\n if ( false !== $result ) {\n unset( $this->cache[$key] );\n }\n return $result;\n }", "title": "" }, { "docid": "923abf162c8032cf5816189ba116d198", "score": "0.5233406", "text": "private function _delete_feedaty_cache()\n\t{\n\t\t$q = 'DELETE FROM `'._DB_PREFIX_.'feedaty_cache`';\n\t\tDb::getInstance()->execute($q);\n\t}", "title": "" }, { "docid": "21b23c5cde50b88e3bd0433ae92a8538", "score": "0.5230825", "text": "public function delete($key)\n {\n $key = $this->buildKey($key);\n $cacheFile = $this->cachePath . $key;\n // unlink用来删除文件\n return unlink($cacheFile);\n }", "title": "" }, { "docid": "0ebe8c54a49250ae546fb02980b78b7b", "score": "0.52282083", "text": "public function afterDelete()\n {\n\t\t$this->_clearCache();\n }", "title": "" }, { "docid": "c777a54ddbe04496f3d7927ef0142d3b", "score": "0.52189755", "text": "public function deleteLink($hash);", "title": "" }, { "docid": "7133630630636ec9b980f2cf6d61eff6", "score": "0.520254", "text": "public function delete()\n {\n $_GET['id'] = (int) ($_GET['id']);\n if ( ! empty($_GET['id'])) {\n $block_info = db()->query_fetch('SELECT * FROM ' . db('blocks') . ' WHERE id=' . (int) ($_GET['id']));\n }\n if ( ! empty($block_info['id'])) {\n db()->query('DELETE FROM ' . db('blocks') . ' WHERE id=' . (int) ($_GET['id']) . ' LIMIT 1');\n db()->query('DELETE FROM ' . db('block_rules') . ' WHERE block_id=' . (int) ($_GET['id']));\n common()->admin_wall_add(['block deleted: ' . $block_info['name'] . '', $_GET['id']]);\n }\n module('blocks')->_cache_purge();\n if (is_ajax()) {\n no_graphics(true);\n echo $_GET['id'];\n } else {\n return js_redirect(url('/@object'));\n }\n }", "title": "" }, { "docid": "a9f02f22b08e8d12dc959b7bc259296d", "score": "0.5197834", "text": "public function delete_cache() {\n // Super Cache Plugin\n if (function_exists('wp_cache_clear_cache')) {\n wp_cache_clear_cache(is_multisite() && is_plugin_active_for_network($this->plugin_basename) ? get_current_blog_id() : '');\n }\n \n // W3 Total Cache Plugin\n if (function_exists('w3tc_pgcache_flush')) {\n w3tc_pgcache_flush();\n }\n }", "title": "" }, { "docid": "51b36ca8c15a00e7fc42e097f5a79932", "score": "0.5154735", "text": "function zend_disk_cache_delete($key) {}", "title": "" }, { "docid": "f54aa5a02337d99ca9e93c1fc282d9d9", "score": "0.51301306", "text": "public function delete($key){\n switch($this->cache_type){\n case 'eaccelerator':\n eaccelerator_rm($key);\n break;\n\n case 'apc':\n apc_delete($key);\n break;\n\n case 'xcache':\n xcache_unset($key);\n break;\n\n case 'memcache':\n $this->cache_external->delete($key);\n break;\n\n case 'filecache':\n $this->cache_external->delete($key);\n break;\n case 'dbcache':\n $this->cache_external->delete($this->dbcache_table,array('where'=>\"cacheKey='\".base64_encode($key).\"'\"));\n break;\n }\n\n }", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.5125039", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.5125039", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.5125039", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.5125039", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.5125039", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.5125039", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.5125039", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.5125039", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.5125039", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.5125039", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.5125039", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.5125039", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.5125039", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.5125039", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.5125039", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.5125039", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.5125039", "text": "public function delete();", "title": "" }, { "docid": "ee042fe8db5537d9686c26c8d7153d0d", "score": "0.5114097", "text": "public function delete($key)\n {\n $this->cacheAdapter->delete($this->buildMetaDataKey($key));\n return $this->cacheAdapter->delete($key);\n }", "title": "" }, { "docid": "c3c7ddcc2dc2718a5c836fb66edc456d", "score": "0.50772905", "text": "public function comment_delete_comment($h)\r\n {\r\n $args['key'] = 'comment';\r\n $args['value'] = $h->comment->id;\r\n \r\n $h->removeActivity($args);\r\n \r\n $h->clearCache('html_cache', false);\r\n }", "title": "" }, { "docid": "1241b5c0086337155dfec68572a0bbd4", "score": "0.507618", "text": "protected function deleteCacheFile($cache_file) {\n\t\n\t\tif(file_exists($this->template_dir . $cache_file))\n\t unlink($this->template_dir . $cache_file);\n\t\t if(file_exists($this->template_dir . $cache_file))\n\t\t throw new Exception($cache_file . \" couldn't be deleted. Maybe you don't have enough rights for this action.\");\n\t\telse\n \t\t throw new Exception(\"You can't delete the Cache-File \" . $cache_file . \", because it doesn't exist anymore.\");\t\t\n\t\t\n\t}", "title": "" }, { "docid": "a50d19c729bcd0ecae4f0c64627ba229", "score": "0.50583774", "text": "public function delete() {\n $filename = self::getFilename($this->key);\n \n \tif (is_file($filename)) {\n \t\tunlink($filename);\n \t}\n \tunset(self::$members[$this->key]);\n }", "title": "" }, { "docid": "069e4aeed201a9611a8c29ce1e33ff14", "score": "0.5051144", "text": "private function delIndex($index)\n {\n // Se o indice não existir no vetor de cache\n // Não tem nada a se fazer aqui.\n if(!isset($this->cache_data[$index]))\n return;\n\n // Obtém os dados de cache a serem apagados do indice.\n $cache = $this->cache_data[$index];\n unset($this->cache_data[$index]);\n $this->saveIndex();\n\n // Apaga o arquivo de cache informado.\n @unlink($cache->file);\n }", "title": "" }, { "docid": "6769776f6ecad22752d684101a5931bf", "score": "0.50288534", "text": "public function delete(){\n Vipip::delete($this->prefix, ['linkids'=>$this->linkid]);\n }", "title": "" }, { "docid": "47a51590a932e38e6ac82514b7833303", "score": "0.5024555", "text": "public function delete($name)\n {\n $exists = $this->find($name);\n\n if ($exists) {\n $exists->destroy($exists->id);\n }\n\n return Cache::tags(self::CACHE_PREFIX)->forget($name);\n }", "title": "" }, { "docid": "f58e74f0958523c67798d04839063e4c", "score": "0.5021913", "text": "public static function delete($key)\r\n\t{\r\n\t\t$cache = self::getCache();\r\n\t\treturn $cache->delete($key);\r\n\t}", "title": "" }, { "docid": "2f54b3c1cd199c9c02aac56e2d58bd99", "score": "0.5010837", "text": "public function delete($key) {\n\t\treturn $this->cache->delete($this->namespace, $key);\n\t}", "title": "" }, { "docid": "41239766e0b921bf1456a3a0e8ae0fc6", "score": "0.49995005", "text": "public static function delete();", "title": "" }, { "docid": "efca7f4fd188a9460d7b9f2917c14370", "score": "0.49823898", "text": "public function deleted(Region $region)\n {\n // Clean cache...\n Cache::forget('region:'.$region->slug);\n Cache::forget('api:regions');\n Cache::forget('api:regions:'.$region->name);\n }", "title": "" }, { "docid": "cfa75f89f036015c7c8a2c22faaec855", "score": "0.49743652", "text": "public function deleted(Referral $referral)\n {\n clearCacheByArray($this->getCacheKeys($referral));\n clearCacheByTags($this->getCacheTags($referral));\n }", "title": "" }, { "docid": "7f3e6ee7f4771aef67629ace0ebeb91a", "score": "0.4963684", "text": "function wp_cache_delete( $key, $group = 'default' ) {\n\tglobal $wp_object_cache;\n\treturn $wp_object_cache->delete( $key, $group );\n}", "title": "" }, { "docid": "0b1600733f73fd838874774c1d05e368", "score": "0.495542", "text": "private function _deleteCacheData()\n {\n Cache::delete(KEY_MENU_CACHE . MENU_HEADER . '_vi');\n Cache::delete(KEY_MENU_CACHE . MENU_HEADER . '_en');\n Cache::delete(KEY_MENU_CACHE . MENU_FOOTER . '_vi');\n Cache::delete(KEY_MENU_CACHE . MENU_FOOTER . '_en');\n Cache::delete(KEY_MENU_CACHE . MENU_LINK . '_vi');\n Cache::delete(KEY_MENU_CACHE . MENU_LINK . '_en');\n }", "title": "" }, { "docid": "b02352560080032cf79dce547cceddc0", "score": "0.49520096", "text": "public function delete($key)\n {\n try {\n return $this->psr6->deleteItem($key);\n } catch (\\Psr\\Cache\\InvalidArgumentException $e) {\n throw new \\WildWolf\\Cache\\InvalidArgumentException();\n }\n }", "title": "" }, { "docid": "b00957c4a591e15c1f71dbf8a5cdb0be", "score": "0.49462256", "text": "static function delete($id) {\n parent::destroy(get_class(), $id);\n\n\t\t\tif (module_enabled(\"cacher\"))\n\t\t\t Modules::$instances[\"cacher\"]->regenerate();\n }", "title": "" }, { "docid": "e1992c3b0763de9ddf0a5412e6705d87", "score": "0.4945214", "text": "public function delete($id)\n {\n $this->createChunksIndex();\n\n $this->chunks->remove(['files_id' => $id], ['justOne' => false]);\n return parent::remove(['_id' => $id]);\n }", "title": "" }, { "docid": "d97ad6f0d3057635bc4af433a2ac3923", "score": "0.4938438", "text": "public function deleteServerCache(){\n $file = $this->fileServerCache();\n if(file_exists($file)) unlink($file);\n }", "title": "" }, { "docid": "67b2b1193340e94185b4ec59972bc204", "score": "0.49309605", "text": "public function delete($key){\r\n\t\t$file = $this->getCacheFile($key);\r\n\t\tif (! @unlink($file)) {\r\n\t\t\tthrow new Exception(\"Cache file could not be deleted\");\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "9ff3acd5796a4ccd007c4335bdac6f29", "score": "0.4923118", "text": "public function delete(AccessTokenEntity $token);", "title": "" }, { "docid": "cf9159c3f7cbaa27414a61ce5a2d0b4c", "score": "0.49194854", "text": "function gb_delete_template($key) {\r\n\tglobal $wpdb;\r\n\t\r\n\twp_cache_delete( GB_TEMPLATES_TABLE . $key, 'gb_templates' );\r\n\t\r\n\t$query = \"DELETE FROM \" . GB_TEMPLATES_TABLE . \" WHERE template_name = '$key' LIMIT 1\";\r\n\treturn $wpdb->query($wpdb->prepare($query));\r\n}", "title": "" }, { "docid": "3b73af4aa4b35e334a165774994e57bd", "score": "0.49170235", "text": "function wp_cache_delete( $key, $group = '', $time = 0 ) {\n global $wp_object_cache;\n return $wp_object_cache->delete( $key, $group, $time );\n}", "title": "" }, { "docid": "e773b7e39cd48eb7cef42fbd012dd7b3", "score": "0.49122465", "text": "public function delete($activityId, $optParams = array()) {\n $params = array('activityId' => $activityId);\n $params = array_merge($params, $optParams);\n $data = $this->__call('delete', array($params));\n return $data;\n }", "title": "" }, { "docid": "7fbeef1f5c322686c42da3a8a892ea81", "score": "0.49106222", "text": "public function delete(): void;", "title": "" }, { "docid": "632bde928acb254874004df0943eb028", "score": "0.49072576", "text": "public function delete($id)\n {\n return $this->cacheFrontend->remove($this->getNamespacedId($id));\n }", "title": "" }, { "docid": "f37ad1b7d002fb24f96e6187fd78da28", "score": "0.49015108", "text": "public function clearCache(): void;", "title": "" }, { "docid": "906e0419a4f48f696278a2b517b89a34", "score": "0.48920378", "text": "public static function delete($identifier)\n\t{\n\t\tif(!static::$enabled){ return false; }\n\t\tstatic::$cache->delete($identifier);\n\t}", "title": "" }, { "docid": "37f9468950bb48a48691b8fe28bad10d", "score": "0.4883293", "text": "public static function cacheDelete($userid)\n\t{\n\t\t$myCacher = new Cacher(self::cacheBuildKeystring($userid));\n\t\treturn $myCacher->clear();\n\t}", "title": "" }, { "docid": "b6d242bfe668143fe9f6e3555f267c32", "score": "0.48765394", "text": "public function delete() {\n return $this->destroy();\n }", "title": "" }, { "docid": "e633e74fcf81978f4f4d668307df792e", "score": "0.48750004", "text": "public function full_delete() {\n $uploadPath = Config::get('site.galleries_photo_dir');\n $thumbsPath = Config::get('site.galleries_thumb_dir');\n $cachePath = public_path(Config::get('site.galleries_cache_public_dir'));\n\n @unlink($uploadPath . '/' . $this->name);\n @unlink($thumbsPath . '/' . $this->name);\n\n $cache_files = glob($cachePath . '/' . $this->id . \"_*\");\n foreach ($cache_files as $cache_file)\n @unlink($cache_file);\n\n $this->delete();\n\n return true;\n }", "title": "" }, { "docid": "5905a71d40e6ffd40b78784e24ac9216", "score": "0.48741063", "text": "function del_source_cache($id_cache_data, $id_xml_cache)\n { $env = $this->env();\n if($this->del_source_cache_db($id_cache_data))\n { if(@unlink($env->path(\"content\").\"cache/sources/\".$id_xml_cache.\".xml\")) return true;\n }\n return false;\n }", "title": "" }, { "docid": "911213a018bd5912c6ef2e3b32b86f92", "score": "0.4873555", "text": "public function deleteItem($key)\n {\n $this->cache->deleteItem($key);\n }", "title": "" }, { "docid": "cf49aaca39febfc2e07b3e386d1ced98", "score": "0.48700213", "text": "public function deleteToken();", "title": "" }, { "docid": "cf49aaca39febfc2e07b3e386d1ced98", "score": "0.48700213", "text": "public function deleteToken();", "title": "" }, { "docid": "1e7148b1c42ededad91e7c8d9380aff5", "score": "0.4852984", "text": "public function deleteFromCache(EventInterface $event) {\n $request = $event->getRequest();\n\n $cacheKey = $this->getCacheKey(\n $request->getPublicKey(),\n $request->getImageIdentifier()\n );\n\n $this->cache->delete($cacheKey);\n }", "title": "" }, { "docid": "2ded33deae80d79b9f5793208cbdd043", "score": "0.48521078", "text": "private function deleteCookie() {\n $sql = 'DELETE * FROM auth_token WHERE user_id=?';\n $sth = $this->db->prepare($sql);\n $sth-> execute (array ($this->uid));\n }", "title": "" }, { "docid": "1136590f9d0c760ba2115aa30378263e", "score": "0.48503014", "text": "public function clearCache() {\n if( $this->caching ) {\n delete_transient( $this->id );\n }\n }", "title": "" }, { "docid": "90889c37ae896354575ffc7507ceaf0c", "score": "0.48379385", "text": "public function deleteBlock(Block $block): void;", "title": "" }, { "docid": "4a5fa3bfe09c5171941db4cfff330b70", "score": "0.48330572", "text": "public function deleteView()\n\t{\n\t\tif($this->viewId > 0)\n\t\t{\n\t\t\t\\CFile::Delete($this->viewId);\n\t\t\treturn $this->update(array('VIEW_ID' => null));\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "bfadb13cffe144c2d3b43df12b8ba637", "score": "0.48277292", "text": "public function destroy($id) {\n\t\t\n\t\t$url = URL::where('id', $id)->firstOrFail();\n\t\t$url->delete();\n\t\t\n\t}", "title": "" }, { "docid": "d5c3767f4ffd2fdf506f0029e7cf94a8", "score": "0.4826591", "text": "public function delete() { \r\n // if other than content page, delete that page\r\n if ($this->table_name)\r\n $this->db->delete($this->table_name, array('id' => $this->id));\r\n }", "title": "" }, { "docid": "0a9261ceae847153528a26576c8ef644", "score": "0.4823883", "text": "function delete(){\n\t\t$sql = \"DELETE FROM `vertex` WHERE `id`='\".addslashes($this->id).\"'\";\n\n\t\t$this->connection->send_query($sql);\n\t}", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.48220006", "text": "public function delete($path);", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.48220006", "text": "public function delete($path);", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.48220006", "text": "public function delete($path);", "title": "" }, { "docid": "1f9537928f4721bdde812fb9cbc64966", "score": "0.48209828", "text": "function delete_refresh(){\n $current_user_id = (int)$_SESSION['user_logged_in'];\n $id = (int)$_GET['id'];\n $this->check_ownership($id);\n\n // Delete old project image file\n $project_image = trim($this->get_by_id($id)['projectimg']);\n if( !empty($project_image) ){\n if( file_exists(APP_ROOT.'/views/assets/files/'.$project_image )){\n unlink( APP_ROOT.'/views/assets/files/'.$project_image ); //it is the function that will delete a file or folder in php\n }\n }\n\n $sql = \"DELETE FROM posts WHERE id='$id' AND user_id='$current_user_id'\";\n $this->execute($sql);\n }", "title": "" }, { "docid": "cedcb6cf43aab01b135620cf35bb4803", "score": "0.4818304", "text": "public function delete($MId);", "title": "" }, { "docid": "5861dd9f1c7e3df208ea4483c7fe7ebb", "score": "0.48178402", "text": "public function testDel_UniqueId()\n {\n $typeConstant = 'test';\n $uniqueId = '42';\n $this->cacheStore->delete = 'test';\n $this->assertEquals('test', $this->cacheHandler->del($typeConstant, $uniqueId));\n }", "title": "" }, { "docid": "9ac6a2e2927933c2f01373ef077ffa22", "score": "0.4815186", "text": "public function delete_tag($tag)\n\t{\n\t\treturn $this->_memcache->tag_delete($tag);\n\t}", "title": "" }, { "docid": "9c5995895b38527ffd8a90df9c2d6a7b", "score": "0.48105702", "text": "public function deleteCache($id_menu)\n {\n $this->options->deleteCache($this->fromPath('menu'), true);\n return $this->cacheDelete($id_menu);\n }", "title": "" }, { "docid": "2b6bab5871cff3c145a4d1c743470b93", "score": "0.4806195", "text": "public function deleted(TelegramBotMessages $message)\n {\n clearCacheByArray($this->getCacheKeys($message));\n clearCacheByTags($this->getCacheTags($message));\n }", "title": "" }, { "docid": "062960574419d63b94d8e73b022c4f43", "score": "0.48044154", "text": "public function destroy($comment)\n {\n \n Comment::where('id', $comment)->delete();\n\n return redirect('home');\n\n }", "title": "" }, { "docid": "21aa1f341dd169b91f68f9a8312c20b0", "score": "0.48041448", "text": "public function delete()\n {\n $this->getTableHandler()->delete($this->m_id);\n }", "title": "" }, { "docid": "02544d37eb01d980d670c2a678c36b80", "score": "0.4796716", "text": "protected function _doDelete($id)\n {\n return $this->_cache->remove($this->_prefix . $id);\n }", "title": "" }, { "docid": "b39cea08071919bf89d3c7738a5f57aa", "score": "0.47958693", "text": "public function delete($key)\n {\n return $this->memcached->delete($key);\n }", "title": "" } ]
cb19abb2ab04b17b2cb826e11a446000
Create a new collection with the path and value
[ { "docid": "ffdb6d2286ec49d1f4e69ee4dd040230", "score": "0.0", "text": "public function toValues() {\n return $this->getIndex()->mapWithKeys(function(Field $blueprint, $key){\n // Determine the value and the reference route\n return [$key => $blueprint->getValue()];\n });\n }", "title": "" } ]
[ { "docid": "5c18cc038db73b5ce4c5d898c5afcd7b", "score": "0.76004034", "text": "protected function createCollection( $path )\n {\n // Create collection\n $this->content[$path] = array();\n\n // Add collection to parent node\n $this->content[dirname( $path )][] = $path;\n\n // Set initial metadata for collection\n $this->props[$path] = $this->initializeProperties( $path, true );\n }", "title": "" }, { "docid": "7101f08d382a4a32cda2c54293586228", "score": "0.67297965", "text": "protected function createCollection()\n {\n return $this->_setUpNewNode(\n new Collection()\n );\n }", "title": "" }, { "docid": "a36fcf9455e7c2b660fc5af2906741f9", "score": "0.67244184", "text": "public function createCollection($name) {}", "title": "" }, { "docid": "4c596af7b88516f5c695fb1590f4c271", "score": "0.6504658", "text": "abstract public function getCollection(string $path);", "title": "" }, { "docid": "cc4bba0a370bfe2eff2978b09e795b43", "score": "0.6403159", "text": "public function collection($value)\n {\n $this->setProperty('collection', $value);\n return $this;\n }", "title": "" }, { "docid": "8ae8353f816b61295b967802c1b7a73c", "score": "0.6233436", "text": "public function createCollection($data = array());", "title": "" }, { "docid": "b7f361548b4737596ca407b45e226a76", "score": "0.62327766", "text": "static function set_new_or_expand(&$collection=[], $path='', $value=null, $options=[]){\n\t\t$requried_options = [\n\t\t\t'make' => 'true',\n\t\t\t# turn a non-expandable value into an array\n\t\t\t'path_error_handler' => function(&$reference_to_last, $value){\n\t\t\t\t$deferenced_value = $reference_to_last;\n\t\t\t\t$reference_to_last = [$deferenced_value, $value];},\n\t\t\t# turn a collided value into an array\n\t\t];\n\t\t$options = array_merge($options, $requried_options);\n\n\t\t$target = &self::get($collection, $path, $options);\n\n\t\t$set = function(&$reference_to_last, $value){\n\t\t\tif(is_array($reference_to_last)){\n\t\t\t\t$reference_to_last[] = $value;\n\t\t\t}elseif(!is_null($reference_to_last)){\n\t\t\t\t$deferenced_value = $reference_to_last;\n\t\t\t\t$reference_to_last = [$deferenced_value, $value];\n\t\t\t}else{\n\t\t\t\t$reference_to_last = $value;\n\t\t\t}\n\t\t};\n\t\treturn $set($target, $value);\n\t}", "title": "" }, { "docid": "baa3d4d82a5f4b428dc3617621c00eef", "score": "0.6216515", "text": "static function &get(&$collection=[], $path='', $options=[]){\n\t\t$defaults = ['make'=>true];\n\t\t$options = array_merge($defaults, $options);\n\n\t\tif($path === ''){\n\t\t\treturn $collection;\n\t\t}\n\n\t\tif(is_string($path)){\n\t\t\t$path_parts = explode('.', $path);\n\t\t}elseif(is_numeric($path)){\n\t\t\t$path_parts = [$path];\n\t\t}else{\n\t\t\t$path_parts = self::from($path);\n\t\t}\n\n\t\t$reference_to_last =& $collection;\n\t\t$parsed = [];\n\t\t$not_found = function($key) use ($path, $parsed){\n\t\t\tthrow new \\Exception('path not found at \"'.$key.'\" of \"'.$path.'\" at \"'.implode('.', $parsed).'\"');\n\t\t};\n\t\tforeach($path_parts as $part){\n\t\t\tif(is_array($reference_to_last) || (is_object($reference_to_last) && ($reference_to_last instanceof \\ArrayAccess))){\n\t\t\t\tif($options['make'] || self::is_set($reference_to_last, $part)){\n\t\t\t\t\t$reference_to_last =& $reference_to_last[$part]; # will either find or create at key\n\t\t\t\t}else{\n\t\t\t\t\t$not_found($part);\n\t\t\t\t}\n\t\t\t}elseif(is_object($reference_to_last)){\n\t\t\t\tif(isset($reference_to_last->$part)){ # property on object exists\n\t\t\t\t\t$reference_to_last =& $reference_to_last->$part;\n\t\t\t\t}elseif(is_callable([$reference_to_last, $part])){ # it's a callable that is not a property\n\t\t\t\t\t$callable = [$reference_to_last, $part]; # can't return a reference to a method, so just return a callable item\n\t\t\t\t\t$reference_to_last = &$callable;\n\t\t\t\t}else{\n\t\t\t\t\tif($options['make']){\n\t\t\t\t\t\t$reference_to_last =& $reference_to_last->$part; # attempt to create attribute\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$not_found($part);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}elseif(is_null($reference_to_last)){\n\t\t\t\tif($options['make']){\n\t\t\t\t\t# PHP will turn the null `reference_to_last` into an array, and then create the accessed key for referencing\n\t\t\t\t\t$reference_to_last =& $reference_to_last[$part];\n\t\t\t\t}else{\n\t\t\t\t\t$not_found($part);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif(!empty($options['path_error_handler'])){\n\t\t\t\t\t$options['path_error_handler']($reference_to_last, $value, $parsed, $part, $path, $collection, $options);\n\t\t\t\t}else{\n\t\t\t\t\tthrow new \\Exception('Can not expand into path at \"'.$part.'\" with \"'.$path.'\"');\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t$parsed[] = $part;\n\t\t}\n\t\treturn $reference_to_last;\n\t}", "title": "" }, { "docid": "9e3233464bda2705337ce7d9b19dc42c", "score": "0.613994", "text": "function collect($value = null)\n {\n return new Collection($value);\n }", "title": "" }, { "docid": "9e3233464bda2705337ce7d9b19dc42c", "score": "0.613994", "text": "function collect($value = null)\n {\n return new Collection($value);\n }", "title": "" }, { "docid": "5f2651d5efdfadf27307f06cd64f7860", "score": "0.6102271", "text": "function asdb_collect($value = null)\n\t{\n\t\treturn new Collection($value);\n\t}", "title": "" }, { "docid": "209a978b4ca484cff273989dc9e0aee3", "score": "0.60681003", "text": "public function c($name)\n\t{\n\t\tif (is_array($name))\n\t\t{\n\t\t\t$path = '';\n\t\t\tforeach ($name as $folder) { $path = $path.'/'.$folder; }\n\t\t\treturn new Collection($this, substr($path, 1));\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn new Collection($this, $name);\n\t\t}\n\t}", "title": "" }, { "docid": "40072c8a46611e8ae3b123b5fc0cbe6a", "score": "0.6053503", "text": "public function setCollection($value)\n {\n return $this->set('Collection', $value);\n }", "title": "" }, { "docid": "40072c8a46611e8ae3b123b5fc0cbe6a", "score": "0.6053503", "text": "public function setCollection($value)\n {\n return $this->set('Collection', $value);\n }", "title": "" }, { "docid": "40072c8a46611e8ae3b123b5fc0cbe6a", "score": "0.6053503", "text": "public function setCollection($value)\n {\n return $this->set('Collection', $value);\n }", "title": "" }, { "docid": "40072c8a46611e8ae3b123b5fc0cbe6a", "score": "0.6052231", "text": "public function setCollection($value)\n {\n return $this->set('Collection', $value);\n }", "title": "" }, { "docid": "40072c8a46611e8ae3b123b5fc0cbe6a", "score": "0.6052231", "text": "public function setCollection($value)\n {\n return $this->set('Collection', $value);\n }", "title": "" }, { "docid": "40072c8a46611e8ae3b123b5fc0cbe6a", "score": "0.6052231", "text": "public function setCollection($value)\n {\n return $this->set('Collection', $value);\n }", "title": "" }, { "docid": "3147aae00a3a18e0f543103032afa306", "score": "0.5919089", "text": "private function create_collection() {\n\n\t\treturn new MapCollection();\n\t}", "title": "" }, { "docid": "dff6c39cd5bee867a05c6f44d62eb92e", "score": "0.5900925", "text": "function collect(array $value = []): Collection\n {\n return new Collection($value);\n }", "title": "" }, { "docid": "f8afcb45a42df19a028713ec5bd68395", "score": "0.5870234", "text": "protected function createCollection()\n {\n $model = $this->getModel();\n return $model->asCollection();\n }", "title": "" }, { "docid": "ad3a8b4b6037330ff895bab87efea6bc", "score": "0.58563924", "text": "static function collection()\n {\n return new Collection();\n }", "title": "" }, { "docid": "c253a35a933e514977e9b9bf0e53a541", "score": "0.58310306", "text": "private function createCollection()\n {\n $class = get_class($this->data);\n\n $this->name = strtolower(class_basename($class));\n\n $result = $this->callEvent($class, [$class => $this->data]);\n\n if ($result instanceof $this->data) {\n $this->data = $result;\n }\n\n $this->makePaginator();\n }", "title": "" }, { "docid": "fabba2c2471852ff5fa2e2c30d023fd1", "score": "0.5796187", "text": "public function add($value): CollectionInterface;", "title": "" }, { "docid": "d7d8c74566b82cecf755c8f8d541016c", "score": "0.57581663", "text": "public function setCollection()\n {\n $cl = $this->nameCollection;\n $this->collection = self::$database->$cl;\n }", "title": "" }, { "docid": "8457179df046cc2a05d33ba928b617e0", "score": "0.57192355", "text": "public function put($key, $value): CollectionInterface;", "title": "" }, { "docid": "9374376c5c35834ddaec893247e63978", "score": "0.56436574", "text": "public function __construct(){\r\n\t\t$this->collection = new Collection();\r\n\t}", "title": "" }, { "docid": "43117a090db101ebe26ed8c43b960a24", "score": "0.5602084", "text": "public function create($data){ throw new \\Exception('You must define at least one collection!'); }", "title": "" }, { "docid": "568144467f5c97d21784de10175dd4aa", "score": "0.5598397", "text": "private function addValidatedData(array $path, string $field, $value, CollectionAbstract $collection): void {\r\n\r\n if($combine = $this -> combine -> get($field)) {\r\n\r\n $this -> validatedData -> add($path, $value, $combine);\r\n\r\n foreach($combine -> getFieldNames() as $fieldName) {\r\n\r\n $path = $this -> getPath($fieldName);\r\n\r\n foreach($path as $value) {\r\n\r\n if(null !== $value['path'] && null !== $value['value']) {\r\n $this -> addValidatedData($value['path'], $fieldName, $value['value'], $collection);\r\n }\r\n }\r\n }\r\n\r\n return;\r\n }\r\n\r\n $this -> validatedData -> add($path, $value, $collection);\r\n }", "title": "" }, { "docid": "6bda60e145a7d606f9265bc8dfcc0237", "score": "0.55903125", "text": "public function collection(Collection $collection);", "title": "" }, { "docid": "d369b9736fd370ea7282c58122b00b49", "score": "0.5559586", "text": "public function __construct()\n {\n $this->_collection = new Collection();\n }", "title": "" }, { "docid": "c9c25ce11c8e364c6efe3cf666b9f740", "score": "0.55583495", "text": "public function createCollection(CollectionCreateStruct $collectionCreateStruct, Block $block, string $collectionIdentifier): Collection;", "title": "" }, { "docid": "cc03f889da9b14705c00939a11721eb0", "score": "0.554934", "text": "protected function newCollection(array $data)\n {\n return new Collection($data);\n }", "title": "" }, { "docid": "ac667518f7e610013cedb6d687e5baa3", "score": "0.5542565", "text": "public function store(string $collection, string $item, $value)\n {\n $this->needUpdate = true;\n $this->store[$collection][$item] = $value;\n return $this;\n }", "title": "" }, { "docid": "f56d2239aba4130a1cea507f893c85b7", "score": "0.5540553", "text": "public function collection(string $name): CollectionRef\n {\n return new CollectionRef(documents: $this, name: $name);\n }", "title": "" }, { "docid": "2c9cf6f695339a751922e8d244bd6ec1", "score": "0.5522658", "text": "protected function _prepareCollection()\n {\n $collection = $this->collectionFactory->create();\n $this->setCollection($collection);\n\n return parent::_prepareCollection();\n }", "title": "" }, { "docid": "066cc772b7ce99583847873f63bc29f5", "score": "0.5519349", "text": "public function test_create__with_collection()\n {\n\n $testee = new ElementFactory();\n\n $spec = [\n 'attributes' => [\n 'type' => 'collection',\n 'name' => 'test',\n ],\n 'elements' => [\n [\n 'attributes' => [\n 'type' => 'text',\n 'name' => 'my-text'\n ]\n ]\n ]\n ];\n\n $element = $testee->create($spec);\n static::assertInstanceOf(CollectionElementInterface::class, $element);\n\n $elements = $element->elements();\n static::assertNotEmpty($elements);\n static::assertInstanceOf(ElementInterface::class, reset($elements));\n }", "title": "" }, { "docid": "4117d9a5fe53ef92a4e6bc9256dd268a", "score": "0.54928935", "text": "public static function createCollection($values = null)\n {\n return new Collection(get_called_class(), $values);\n }", "title": "" }, { "docid": "601ef583e5b756c34bd4248d6c8cf395", "score": "0.547492", "text": "public function create()\n {\n return view('AdminPanel.Collection.AddCollection');\n }", "title": "" }, { "docid": "a3dc167e88b9ffcd9419d3651674dabe", "score": "0.547192", "text": "public function factory($collection)\n {\n if ($collection instanceof Collection) {\n $collectionName = $collection->getName();\n } else {\n $collectionName = $collection;\n }\n\n if (!isset($this->collections[$collectionName])) {\n if (!($collection instanceof Collection)) {\n $collection = Norm::createCollection(array(\n 'name' => $collection,\n 'connection' => $this,\n ));\n\n $this->applyHook('norm.after.factory', $collection);\n }\n\n $this->collections[$collectionName] = $collection;\n }\n\n return $this->collections[$collectionName];\n }", "title": "" }, { "docid": "c220f3984c1770412193d52d6c4b1a23", "score": "0.54685295", "text": "public static function &collection($name)\n\t{\n\t\t$collection = null;\n\t\t$name = ucfirst($name);\n\t\t$class = self::COLLECTION_CLASS_PREFIX . $name;\n\t\t\n\t\tif(!class_exists($class) && is_file(COLLPATH . $name . EXT)) {\n\t\t\trequire COLLPATH . $name . EXT;\n\t\t}\n\t\t\n\t\tif(class_exists($class)) {\n\t\t\t$collection = new $class($name);\n\t\t\t\n\t\t\tif(!is_subclass_of($collection, self::COLLECTION_BASE_CLASS)) {\n\t\t\t\tthrow new BakedCarrotOrmException(\"Class $class is not subclass of \" . self::COLLECTION_BASE_CLASS);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$class_name = self::COLLECTION_BASE_CLASS;\n\t\t\t$collection = new $class_name($name);\n\t\t}\n\t\t\n\t\treturn $collection;\n\t}", "title": "" }, { "docid": "459295b214cab14678ee1460ffccd78e", "score": "0.54598886", "text": "abstract public static function create(Relation $query): Collection;", "title": "" }, { "docid": "087776d35e4bbf1ab45b93ff34d5efbb", "score": "0.5446647", "text": "public function newCollection(array $models = []);", "title": "" }, { "docid": "d1d0df097409435c883d23f601298f0d", "score": "0.54357815", "text": "protected function createResource( $path, $content = null )\n {\n // Create resource\n $this->content[$path] = $content;\n\n // Add resource to parent node\n $this->content[dirname( $path )][] = $path;\n\n // Set initial metadata for collection\n $this->props[$path] = $this->initializeProperties( $path, false );\n }", "title": "" }, { "docid": "16da23e1ac24cfdf18c171a829ebd2e8", "score": "0.5404964", "text": "public function set($path, $value)\n {\n $pathParts = $this->explodePathParts($path);\n $fullArr = $this->data;\n\n // traverse the $path\n $arr = & $fullArr; // pointer to the current array\n while ($key = array_shift($pathParts)) {\n if (!isset($arr[$key]) || count($pathParts) === 0) {\n array_unshift($pathParts, $key);\n break;\n }\n $arr = & $arr[$key];\n }\n while ($key = array_shift($pathParts)) {\n if (count($pathParts) === 0) {\n if ($value instanceof Config) {\n $value = $value->getAll();\n }\n $arr[$key] = $value;\n } else {\n $arr[$key] = array();\n $arr = & $arr[$key];\n }\n }\n return new self($fullArr);\n }", "title": "" }, { "docid": "536eb31de29f9436d85674dc7e6d865b", "score": "0.5396975", "text": "public function createStructure($path);", "title": "" }, { "docid": "089b76d1d13f4c7eec43603d7e0ea068", "score": "0.5383166", "text": "static function createRef($collection, $id) {\n return array('$ref' => $collection, '$id' => self::id($id));\n }", "title": "" }, { "docid": "4708612ac8281d21b12623ae5058c7c8", "score": "0.53816843", "text": "function getCollection($name);", "title": "" }, { "docid": "91e0df34d10b443d81fba738256645d1", "score": "0.53799653", "text": "static function got($collection, $path){\n\t\treturn self::get($collection, $path, ['make'=>false]);\n\t}", "title": "" }, { "docid": "1bbbc299fea3b0e9fdd8914b1a766aec", "score": "0.5358563", "text": "public function __construct($collection) {\n\t\t\t$this->collection = $collection;\n\t\t}", "title": "" }, { "docid": "b7ff0f0722b61bf159d4fb4a1ae56930", "score": "0.53534955", "text": "public function create() {\n $data = Ensure::Input(func_get_args());\n $data = $data->get();\n\n if (isset($data['domainId'])) {\n new PathResource($this, array(\n \"domains\" => $data['domainId'],\n \"endpoints\" => \"\"\n )\n );\n }\n\n return parent::create($data);\n }", "title": "" }, { "docid": "29433f9885a00c5ba0c9cf80fbdc0e12", "score": "0.5344705", "text": "public function __construct(Collection $collection)\n {\n $this->collection = $collection;\n }", "title": "" }, { "docid": "49449d569960a9173b0125f69ac631eb", "score": "0.5324769", "text": "public function __construct(string $path)\n {\n $this->path = Str::moveFromBothEnds($path, '/') . '/';\n $this->location = path($this->path);\n $this->files = new Arr();\n $this->collection = new Arr();\n $this->directories = new Arr();\n }", "title": "" }, { "docid": "b140cd25483b88c96a1b8495098e6784", "score": "0.530743", "text": "function ag_add_coll() {\n\tif(!isset($_POST['coll_name'])) {die('missing data');}\n\t$name = $_POST['coll_name'];\n\t\n\t$resp = wp_insert_term( $name, 'ag_collections', array( 'slug'=>sanitize_title($name)) );\n\t\n\tif(is_array($resp)) {die('success');}\n\telse {\n\t\t$err_mes = $resp->errors['term_exists'][0];\n\t\tdie($err_mes);\n\t}\n}", "title": "" }, { "docid": "965c8e363103fbf00b8d297b8055a6b3", "score": "0.5305569", "text": "public function collection(): ItemCollection\n {\n if ($this->collection) {\n return $this->collection;\n }\n return $this->collection = new ItemCollection($this->app, $this->path);\n }", "title": "" }, { "docid": "a5599ee00e31536301ae75263dadd735", "score": "0.529998", "text": "public function __construct()\n {\n $this->items = new Collection;\n }", "title": "" }, { "docid": "a5599ee00e31536301ae75263dadd735", "score": "0.529998", "text": "public function __construct()\n {\n $this->items = new Collection;\n }", "title": "" }, { "docid": "3c8bd0da7ef433c1203d23be30e743a7", "score": "0.5290985", "text": "protected function createVirtualElement()\n {\n $id = uniqid();\n\n $depth = $this->reader->depth;\n\n $parent = isset($this->parents[$depth - 1]) ? $this->parents[$depth - 1] : null;\n\n $attributes = [\n '@id' => $id,\n '@parent' => $parent,\n '@element' => $this->reader->name,\n ];\n\n $element = new Collection($attributes);\n\n $this->parents[$depth] = $id;\n\n $this->references[$id] = $element;\n\n return $element;\n }", "title": "" }, { "docid": "e08d8bbe9e5313eb06396893500a399a", "score": "0.5288034", "text": "public function collect($value = null)\n {\n return new CollectionProxy($value);\n }", "title": "" }, { "docid": "a9c182d5d2ad2d0e9c619215f7c10cea", "score": "0.52867836", "text": "public function createCollectionFromArray($data)\n {\n $data['hidden'] = (bool) ArrayUtils::get($data, 'hidden');\n $data['single'] = (bool) ArrayUtils::get($data, 'single');\n $data['managed'] = (bool) ArrayUtils::get($data, 'managed');\n\n return new Collection($data);\n }", "title": "" }, { "docid": "318cdc235f047617690f7600773633da", "score": "0.52858216", "text": "public function __get($name)\n\t{\n\t\treturn new Collection($this, $name);\n\t}", "title": "" }, { "docid": "a9a3bc874d4a1c0cd7ee6be8e17a2f18", "score": "0.5280643", "text": "public function __get($name)\n {\n return new \\MongoCollection($this->getMongoDB(), $name);\n }", "title": "" }, { "docid": "4d49d2128dc9373d4f884b7c9ade3e90", "score": "0.5254648", "text": "public function read($path)\n {\n $finder = $this->getFinder();\n $collection = $this->getCollection();\n\n //read files and folders\n foreach ($finder->directories()->in($path) as $file)\n {\n $releaseModel = new ReleaseModel($file);\n\n $collection->add($releaseModel->getKey(), $releaseModel);\n }\n\n return $collection;\n }", "title": "" }, { "docid": "b4f68e6ad1d9c2efe8cc1d31c99fef86", "score": "0.5251116", "text": "static function wrap($collection)\n {\n return new Collection($collection);\n }", "title": "" }, { "docid": "2d7730723da1faffafb70c91f806a68a", "score": "0.52405864", "text": "public function targetCollection($value)\n {\n $this->setProperty('targetCollection', $value);\n return $this;\n }", "title": "" }, { "docid": "895123f1e2ef31b5ba3154e16f1f4198", "score": "0.52357084", "text": "public static function storage($key = null): Collection\n {\n switch($key)\n {\n \t case 'get':\n \t self::$data = $_GET;\n \t break;\n\n \t case 'post':\n \t self::$data = $_POST;\n \t break;\n\n case 'request':\n self::$data = $_REQUEST;\n break;\n\n case 'file':\n self::$data = $_FILES;\n break;\n\n case 'cookie':\n self::$data = $_COOKIE;\n break;\n\n case 'server':\n self::$data = $_SERVER;\n break;\n\n default:\n throw new \\Exception(sprintf('Sorry, key <strong>%s</strong> not match!', $key));\n }\n\n return new Collection(self::$data);\n }", "title": "" }, { "docid": "f1e60b533cd23b93820ab95f31630115", "score": "0.5227452", "text": "public function testConstructor(): void\n {\n $collection = new Collection(\n collect([(object) ['a.b' => 'c']]),\n ['a' => ['b' => 'c']]\n );\n\n $this->assertEquals([new Item(['a' => ['b' => 'c']])], $collection->toArray());\n }", "title": "" }, { "docid": "fe5475c572abcaa483ce8c6e9aedf5b0", "score": "0.5224584", "text": "public function getCollection($name) {}", "title": "" }, { "docid": "cbe05b9dc146bfe3cfb78fa92af41a5f", "score": "0.5184387", "text": "protected function autoIncludeCollection($value): Collection\n {\n if ($value instanceof ResourceCollection) {\n return $value->getFractalCollection();\n }\n \n if ($value instanceof Collection) {\n return $value;\n }\n \n return $this->getResourceFactory()->makeResourceCollection($value)->getFractalCollection();\n }", "title": "" }, { "docid": "20794e2fcb1868b9ed573a0d58e23961", "score": "0.5184086", "text": "public static function create_ref($collection, $id) {\n return array('$ref' => $collection, '$id' => self::id($id));\n }", "title": "" }, { "docid": "24cdc6395ab77223387654715cc5de99", "score": "0.5179132", "text": "function ting_ting_collection_create($empty, $data = NULL, $conf = FALSE) {\n $context = new ctools_context('ting_collection');\n $context->plugin = 'ting_collection';\n\n if ($empty) {\n return $context;\n }\n\n if ($conf) {\n $collection_id = is_array($data) && isset($data['object_id']) ? $data['object_id'] : (is_object($data) ? $data->id : 0);\n\n module_load_include('client.inc', 'ting');\n $data = ting_get_collection_by_id($collection_id, TRUE);\n }\n\n if (!empty($data)) {\n $context->data = $data;\n $context->title = t('@title by @author', array('@title' => $data->title, '@author' => $data->creators_string));\n $context->argument = $collection_id;\n\n return $context;\n }\n}", "title": "" }, { "docid": "f8f1408abcf7d4ffac1aa9d9fa470959", "score": "0.51752824", "text": "public function createCollection()\n\t{\n\t\t$tag = $this->tag;\n\n\t\tif ($this->hasPaginator) {\n\t\t\t$tag = $this->tag->getCollection();\n\t\t}\n\n\t\t$this->tagCollection = new Collection(\n\t\t\t$tag, \n\t\t\tnew TagTransformer\n\t\t);\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "59f23235dbd0716e75eb08e237301bbc", "score": "0.5174896", "text": "public function create($path);", "title": "" }, { "docid": "114199a85b6f6d01267af05767d78206", "score": "0.515763", "text": "private function createCollection()\n {\n try\n {\n $request = $_POST;\n\n global $cbcollection;\n\n if(!userid())\n throw_error_msg(lang(\"you_not_logged_in\")); \n else \n $uid = userid();\n\n //check if video id provided\n if( !isset($request['collection_name']) || $request['collection_name']==\"\" )\n throw_error_msg(\"Collection Name not provided\");\n\n if( !isset($request['collection_description']) || $request['collection_description']==\"\" )\n throw_error_msg(\"Collection Description not provided\");\n\n if( !isset($request['collection_tags']) || $request['collection_tags']==\"\" )\n $request['tags'] = 'sample_tag';\n\n if( !isset($request['category']) || $request['category']==\"\" ) {\n throw_error_msg(\"Collection category not provided\");\n } else {\n $request['category'] = array($request['category']);\n }\n\n if( !isset($request['type']) || $request['type']==\"\" )\n throw_error_msg(\"Collection type not provided\");\n\n if( !isset($request['broadcast']) || $request['broadcast']==\"\" )\n $request['broadcast'] = 'public';\n\n if( !isset($request['allow_comments']) || $request['allow_comments']==\"\" )\n $request['allow_comments'] = 'yes';\n\n if( !isset($request['public_upload']) || $request['public_upload']==\"\" )\n $request['public_upload'] = 'no';\n\n $toclean = array('collection_name','collection_description');\n foreach ($toclean as $key => $item) {\n $request[$item] = mysql_clean($request[$item]);\n }\n\n $status = $cbcollection->create_collection($request);\n # pex($status,true);\n if( $status )\n {\n $newdata = $cbcollection->get_collection($status);\n $data = array('code' => \"200\", 'status' => \"success\", \"msg\" => \"Collection has been created successfully :P \", \"data\" => $newdata);\n $this->response($this->json($data));\n }\n else\n {\n throw_error_msg(\"Something went wrong trying to create collection\"); \n } \n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage());\n }\n }", "title": "" }, { "docid": "2348fe547eb5d1a0a9efac8ed068dbee", "score": "0.5147895", "text": "public function collection()\n {\n $name = \"$this->db.$this->name.$this->gridFS\";\n if( ! isset(self::$collections[$name]))\n {\n $selectMethod = ($this->gridFS ? 'getGridFS' : 'selectCollection');\n self::$collections[$name] = $this->db()->db()->$selectMethod($this->name);\n }\n return self::$collections[$name];\n }", "title": "" }, { "docid": "add167e7842115785c47eb4d21893283", "score": "0.5142289", "text": "public static function factory($path)\r\n {\r\n /**\r\n * Zend_Path_Item\r\n */\r\n require_once 'Zend/Path/Item.php';\r\n return new Zend_Path_Item($path);\r\n }", "title": "" }, { "docid": "1e98ec7a549622000a390e83bcc32b38", "score": "0.51257026", "text": "protected function parseRoute($collection, $name, $config, $path)\n {\n $method = $config['method'] ?? 'add';\n $options = $config['options'] ?? [];\n\n if (isset($config['as']) || isset($config['options']['as'])) {\n $name = $config['as'] ?? $config['options']['as'];\n }\n\n if ($collection instanceof RouteFactory) {\n $collection->create($method, $name, $config['controller'], $options);\n }\n\n return $collection;\n }", "title": "" }, { "docid": "becd4045d87fc4fc4ec1d491aa7f9e84", "score": "0.51252085", "text": "public function createCollection()\n\t{\n\t\t/** @var $collection \\Magento\\Catalog\\Model\\ResourceModel\\Product\\Collection */\n\t\t$collection = $this->productCollectionFactory->create();\n\t\t$collection->setVisibility($this->catalogProductVisibility->getVisibleInCatalogIds());\n\n\t\t$collection = $this->_addProductAttributesAndPrices($collection)\n\t\t\t->addStoreFilter()\n\t\t\t->setPageSize($this->getPageSize())\n\t\t\t->setCurPage($this->getRequest()->getParam(self::PAGE_VAR_NAME, 1));\n\n\t\t$conditions = $this->getConditions();\n\t\t$conditions->collectValidatedAttributes($collection);\n\t\t$this->sqlBuilder->attachConditionToCollection($collection, $conditions);\n\n\t\treturn $collection;\n\t}", "title": "" }, { "docid": "9147b6a005075368782ca9a9d6f1e7e4", "score": "0.51078194", "text": "public function collection(ContentCollection $collection = null);", "title": "" }, { "docid": "aa33b25aece4f6e9b411ad1b7ad70125", "score": "0.51070005", "text": "public function testCreateCollectionItem()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "38605ff0826b9a84ec52015836c082ea", "score": "0.50830036", "text": "public function toPath(Collection $collection) {\n $collection->put($this->getPath(), $this);\n // Retrieve the hydrated fields\n $HydratedGroups = $this->getHydrated();\n // Loop through each of the field groups\n // For repeaters the hydrated fields contain individual groups of fields\n foreach ($HydratedGroups as $HydratedGroup) {\n // Loop through each of the hydrated group's fields\n foreach ($HydratedGroup as $hydrated) {\n // Pass the field through the to path process\n $hydrated->toPath($collection);\n }\n }\n // Return for chaining\n return $this;\n }", "title": "" }, { "docid": "b4663d3ceccae0d8ec9acacdcfed3772", "score": "0.50829357", "text": "public function testCreateCollection()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "fdfa3d880de65d5377386728390b106d", "score": "0.50828665", "text": "protected function collection($data, $transformer)\n {\n return new Collection($data, $transformer);\n }", "title": "" }, { "docid": "8e29c9573dcff65dcfdb4fe42609185a", "score": "0.5080264", "text": "public function add($path, $slug)\n {\n $this->items[$path] = ['slug' => $slug];\n\n return $this;\n }", "title": "" }, { "docid": "9d1474a8b74e349883fa03c7ca945f5f", "score": "0.50795764", "text": "public function getCollectionGenerator(): CollectionGenerator\n {\n return $this->generator ?? new CollectionGenerator(\n new CollectionSchema(),\n new Config(__DIR__, 'collection')\n );\n }", "title": "" }, { "docid": "2ac7cf25f2fb7a11121412dc86e65283", "score": "0.50778747", "text": "private function createCollectionIfNotExists(string $name): void\n {\n if (is_null($this->collections)) {\n $this->collections = array_map(function ($collection) {\n return $collection['name'];\n }, $this->searcher->listCollections());\n }\n\n // Create the index if it's not in the list\n if (!in_array($name, $this->collections)) {\n $this->logger->info('Creating collection ' . $name);\n $this->searcher->createCollection($name);\n $this->collections[] = $name;\n }\n }", "title": "" }, { "docid": "97c558e095a09dec0a7ff4b10d9c5a3f", "score": "0.50774735", "text": "protected function getCollectionMembers( $path )\n {\n $contents = array();\n\n foreach ( $this->content[$path] as $child )\n {\n if ( is_array( $this->content[$child] ) )\n {\n // Add collection without any children\n $contents[] = new ezcWebdavCollection(\n $child\n );\n }\n else\n {\n // Add files without content\n $contents[] = new ezcWebdavResource(\n $child\n );\n }\n }\n\n return $contents;\n }", "title": "" }, { "docid": "359e9822c6bd5f0834a0bd1baa8fe05b", "score": "0.50735456", "text": "public static function createFromPath($_path)\n {\n $pathRecord = ($_path instanceof Path) ? $_path : new Path(array(\n 'flatpath' => $_path\n ));\n \n return $pathRecord;\n }", "title": "" }, { "docid": "5aedb8971d1defcc456d572b917beca6", "score": "0.5068219", "text": "public function createCollection(array $data = [])\n {\n return ItemCollection::factory($data);\n }", "title": "" }, { "docid": "a6ac517d1ec4ca941cdc47492f3e102a", "score": "0.5056989", "text": "public function setCollectionName($name);", "title": "" }, { "docid": "6cc5ffc79ebfbbeecc5474c450f6d32f", "score": "0.5056974", "text": "public function getNewCollection(string $typeName, string $schema): OCICollection\n {\n return oci_new_collection($this->dbh, $typeName, $schema);\n }", "title": "" }, { "docid": "9b27fa0bf7b9776c77e75548155e5874", "score": "0.5050501", "text": "public function setCollection(array $value);", "title": "" }, { "docid": "c202695a28b0f328650e46ba4b192936", "score": "0.504496", "text": "protected function _getCollection()\n\t{\n\t\t//Check collection\n\t\tif($this->_collection)\n\t\t\treturn $this->_collection;\n\n\t\t//Get collection\n\t\t$this->_collection = new \\Framework\\Database\\Drivers\\Mongo\\CDatabaseModelCollection($this, $this->execute());\n\t\treturn $this->_collection;\n\t}", "title": "" }, { "docid": "0f280fc99986a5c56531647835f1ca80", "score": "0.50386447", "text": "public function collectionBuilder()\n {\n $emptyRobofile = new \\Robo\\Tasks;\n return CollectionBuilder::create($this->getContainer(), $emptyRobofile);\n }", "title": "" }, { "docid": "d4452ec7c82c3faca23467ef65d1dea4", "score": "0.50367767", "text": "public function create(AttributeCollection $attributeCollection, array $filters): Collection;", "title": "" }, { "docid": "860428075f14a14832f8ce5837f59e4d", "score": "0.50360703", "text": "public function __construct($request,$path,$page)\n\t{\n\t\t$this->keys = array('#','name');\n\t\t$this->createList($request,$path,$page);\n\t}", "title": "" }, { "docid": "29bf87a024da3efed0584aa3f8864064", "score": "0.503488", "text": "public function __add(string $name, $value) \n {\n if (!property_exists($this, $name)) \n {\n $this->{Path::toCamelCase($name)} = $value;\n }\n }", "title": "" }, { "docid": "c0c9bf125661b8e3258a0b7a5da9f37c", "score": "0.5030586", "text": "protected function _prepareCollection()\n {\n /** @var $collection ChazkiExpressCollection */\n $collection = $this->_collectionFactory->create();\n $collection->setWebsiteFilter($this->getWebsiteId());\n\n $this->setCollection($collection);\n\n return parent::_prepareCollection();\n }", "title": "" }, { "docid": "1acf4184b5d3c2323e0c6d30b67fc7ef", "score": "0.5021349", "text": "public function __construct(&$collection)\n\t{\n\t\t// Set params\n\t\t$this->collection = $collection;\n\t}", "title": "" }, { "docid": "969451327f72e4dedff99bf7044e000e", "score": "0.5011476", "text": "protected static function newCollection( &$result = null )\n\t{\n\t\t$collection = new Collection();\n\t\t\n\t\tif( $result !== null )\n\t\t{\n\t\t\tforeach( $result as $item )\n\t\t\t{\n\t\t\t\t$collection->items[] = self::newItem($item);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $collection;\n\t}", "title": "" }, { "docid": "2cc72b5b1e02120138c63915fb0b4277", "score": "0.5007809", "text": "public function __construct()\n {\n foreach ($this as $key => $property)\n if (is_array($property) && isset($property['path']))\n $this->{$key}['path'] = VPATH . $property['path'] . EXT;\n }", "title": "" } ]
f21cddf4f1d6023b2627156d64c81637
Plugin is valid for 5.2.13 and higher The signature feature is available from 5.3 and higher This function checks if the methods necessary are available
[ { "docid": "d7aebc4f681b878e4280b3312b0379c0", "score": "0.598427", "text": "protected function shopwareHasSignatureFeature()\n {\n return method_exists($this, 'loadBasketFromSignature')\n && method_exists($this, 'verifyBasketSignature')\n && method_exists($this, 'persistBasket');\n }", "title": "" } ]
[ { "docid": "bdb1c3b9f856c448de0434532e94b8bb", "score": "0.66175103", "text": "static public function isAvailable() {\n\t\t\tthrow new CoreException(AppLanguage::translate('The %s method must be defined in the extension to the %s class', __METHOD__, __CLASS__));\n\t\t}", "title": "" }, { "docid": "12ac52f8e27581ea484812457f808214", "score": "0.63284016", "text": "function mt_supportedMethods()\n {\n // on the library loading order. It will do for now.\n // Refactor to use the introsppection API\n \n $result = array();\n \n // $handlers is declared global so we can fetch it via $GLOBALS\n foreach($GLOBALS['handlers'] as $key => $value)\n {\n $result[] = $key;\n }\n\n return $result;\n }", "title": "" }, { "docid": "574ea64b522c18759fa9766be516d6a5", "score": "0.62917453", "text": "public function isMethods() {}", "title": "" }, { "docid": "5daad4310465d8b9a122f692ecb1173b", "score": "0.6258383", "text": "static function isSupported();", "title": "" }, { "docid": "853b1d8df987e79de9ffeb75576dce39", "score": "0.6216196", "text": "public function isSupported();", "title": "" }, { "docid": "853b1d8df987e79de9ffeb75576dce39", "score": "0.6216196", "text": "public function isSupported();", "title": "" }, { "docid": "9d6eb6fb94f3e73883430f7a23da8d72", "score": "0.6210352", "text": "public function hasMethod(): bool;", "title": "" }, { "docid": "b7ddf1a3abfd94036b5c774c03aa7b5c", "score": "0.61406034", "text": "public function checkRequirements();", "title": "" }, { "docid": "4ac8513104b14b92a6d073d0d6143cad", "score": "0.60568666", "text": "private function check_functions ()\n {\n if ( !function_exists ( 'get_input' ) )\n include 'functions.php';\n }", "title": "" }, { "docid": "c67ec02b84f162b986cc1aba98261c9c", "score": "0.6040079", "text": "protected function checkExtension()\n {\n }", "title": "" }, { "docid": "1b5d32acf16a99ccb817fbab91b14b3c", "score": "0.59930634", "text": "public function testMethodExists() {\n $this->assertTrue(method_exists('OmiseCharge', 'reload'));\n $this->assertTrue(method_exists('OmiseCharge', 'create'));\n $this->assertTrue(method_exists('OmiseCharge', 'update'));\n $this->assertTrue(method_exists('OmiseCharge', 'capture'));\n $this->assertTrue(method_exists('OmiseCharge', 'refunds'));\n $this->assertTrue(method_exists('OmiseCharge', 'getUrl'));\n }", "title": "" }, { "docid": "17322a94a4cfd58aa3c58ba11d5a3a0a", "score": "0.5971572", "text": "public function checkPlugins() {\n\n\t\t// // Plugin Name: SEO by SQUIRRLY\n\t\t// // Plugin URI: http://www.squirrly.co\n\t\t// // Plugin URI: https://wordpress.org/plugins/squirrly-seo/\n\t\t// // Version: 6.0.8\n\t\t// if ( defined('SQ_VERSION') && class_exists('SQ_ObjController') ) {\n\n\t\t// \twpla_show_message(\"\n\t\t// \t\t<b>Warning: An incompatible plugin was found.</b><br>\n\t\t// \t\t<br>\n\t\t// \t\tYou seem to have the <i>SEO by SQUIRRLY</i> plugin installed, which is known to cause issues with WP-Lister.<br>\n\t\t// \t\tVersion 6.0.8 of this plugin prevents WP-Lister from being notified when a product is updated on the edit product page.<br>\n\t\t// \t\tIt does so by calling <i>remove_action()</i> to remove the action hook for 'save_post' from within the method <i>hookSavePost()</i> which is triggered by executing the 'save_post' action in the first place.<br>\n\t\t// \t\t<br>\n\t\t// \t\tIn order to use WP-Lister, you need to deactivate this plugin and use another SEO plugin - like the <i>Yoast SEO</i> plugin by Yoast.\n\t\t// \t\",'warn');\n\t\t// \treturn false;\n\n\t\t// }\n\n\t}", "title": "" }, { "docid": "e477996ace0415dfaf88ead50f6cfb55", "score": "0.59379137", "text": "public static function isSupported(): bool;", "title": "" }, { "docid": "938194bd900c2d44648f5fb2304246e9", "score": "0.5914036", "text": "private function check_callback_method_exists(): bool {\n\t\tif ( ! method_exists( $this, 'callback' ) ) {\n\t\t\tthrow new \\Exception( 'The \"callback\" method must be implemented by the child class.' );\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "ed82773726721c0ba9ffd2d4d42c4d23", "score": "0.5884349", "text": "private static function is_good_method( $method ) {\n }", "title": "" }, { "docid": "0ebc172b23d9c52253cf153398d107a2", "score": "0.5863258", "text": "public function isMethodsFirst(): bool;", "title": "" }, { "docid": "3c46419644a2899cd15ee21bbe889a98", "score": "0.5854252", "text": "function method_exists($method_name) {\n\t\t$methods = this::get_methods();\n\t\t\n\t\treturn in_array($method_name, $methods);\n\t}", "title": "" }, { "docid": "b0f79d4c598b46c5afa10a04d543772d", "score": "0.58480006", "text": "protected function checkVersions() {\n if(ini_get('open_basedir')) {\n $this->foundVulnerabilities[] = 'open_basedir enabled but is insecure by design';\n } else {\n if(isset($_SERVER['GATEWAY_INTERFACE']) && preg_match('~CGI~', $_SERVER['GATEWAY_INTERFACE'])) {\n // ok\n } else {\n $this->foundVulnerabilities[] = 'open_basedir disabled and PHP is not running as a CGI process';\n }\n }\n\n if(ini_get('safe_mode') && version_compare(phpversion(), '<', '5.3.0')) {\n $this->foundVulnerabilities[] = 'safe_mode enabled but is insecure by design';\n } else {\n if(isset($_SERVER['GATEWAY_INTERFACE']) && preg_match('~CGI~', $_SERVER['GATEWAY_INTERFACE'])) {\n // ok\n } else if (version_compare(phpversion(), '<', '5.3.0')){\n $this->foundVulnerabilities[] = 'safe_mode disabled and PHP is not running as a CGI process';\n } else {\n $this->foundVulnerabilities[] = 'safe_mode (deprecated) is disabled and PHP is not running as a CGI process';\n }\n }\n\n if($functions = ini_get('disable_functions')) {\n } else {\n $functions = '';\n }\n $functions = explode(',', $functions);\n array_walk($functions, 'trim');\n $badFunctions = array_diff($this->badFunctions, $functions);\n foreach($badFunctions as $index => $value) {\n if(!function_exists($value)) {\n unset($badFunctions[$index]);\n }\n }\n if(!empty($badFunctions)) {\n $this->foundVulnerabilities[] = 'Unsafe functions available: ' . implode(', ', $badFunctions);\n }\n\n }", "title": "" }, { "docid": "051493fb560d71b4934cf677799915ba", "score": "0.58444345", "text": "protected function checkExtObj() {}", "title": "" }, { "docid": "b46ac48d719e7c6b3c184606344bec7f", "score": "0.58436394", "text": "public function valid(){\n\t\tthrow new Exception(\"Method \".__CLASS__.\"::\".__METHOD__.\" not implemented yet!\");\n\t}", "title": "" }, { "docid": "ace2927f6c7a4a07836af176ac711046", "score": "0.58208805", "text": "static function check_gutenberg() {\n\t\tif( function_exists( 'register_block_type' ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "9f5f1887f25f07c309bcff3245d6fb10", "score": "0.57979727", "text": "function vmware_configwizard_check_prereqs()\n{\n // Plugin doesn't exist\n if (!file_exists(\"/usr/local/nagios/libexec/check_esx3.pl\")) {\n return false;\n }\n \n // Run the plugin to see if the SDK is installed\n $cmd = \"LANG=C LC_ALL=C /usr/local/nagios/libexec/check_esx3.pl | head --lines=1\";\n $proc = proc_open($cmd, array(1 => array('pipe', 'w'), 2 => array('pipe', 'w')), $pipes);\n if (is_resource($proc)) {\n $stdout = stream_get_contents($pipes[1]);\n fclose($pipes[1]);\n $stderr = stream_get_contents($pipes[2]);\n fclose($pipes[2]);\n proc_close($proc);\n }\n \n // Verify there were no errors running the plugin and that the perl module exists\n if (!empty($stderr) || strpos($stdout, \"Missing perl module\") !== false) {\n return false;\n }\n\n return true;\n}", "title": "" }, { "docid": "51588e5388e87f0d6c0586554903b5de", "score": "0.57796836", "text": "protected function isLibParseFuncDefined() : bool {}", "title": "" }, { "docid": "cab8575d389849f23c178835ed6d817e", "score": "0.5746502", "text": "public function check() {}", "title": "" }, { "docid": "e45374ea9d59640b0a5494b636a26c32", "score": "0.5744034", "text": "public function check();", "title": "" }, { "docid": "e45374ea9d59640b0a5494b636a26c32", "score": "0.5744034", "text": "public function check();", "title": "" }, { "docid": "e45374ea9d59640b0a5494b636a26c32", "score": "0.5744034", "text": "public function check();", "title": "" }, { "docid": "e45374ea9d59640b0a5494b636a26c32", "score": "0.5744034", "text": "public function check();", "title": "" }, { "docid": "e45374ea9d59640b0a5494b636a26c32", "score": "0.5744034", "text": "public function check();", "title": "" }, { "docid": "e45374ea9d59640b0a5494b636a26c32", "score": "0.5744034", "text": "public function check();", "title": "" }, { "docid": "6da73abaebae73cd9e805a2d44c2458e", "score": "0.57388014", "text": "public function checkMethod()\n {\n $md = $this->getMethod();\n $methods = func_get_args();\n foreach ($methods as $m) {\n if ($md == strtoupper($m)) {\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "813906293b4b9307031ff9d2ce21b47d", "score": "0.57053095", "text": "public function isPluginUserInt();", "title": "" }, { "docid": "12ceafa0b1accf890e2f122357bf2e01", "score": "0.57035834", "text": "public function supports(): string;", "title": "" }, { "docid": "33d73ec08ecb7bbfabc8279fb26bd3b7", "score": "0.5699861", "text": "abstract public function validatePlugin($plugin);", "title": "" }, { "docid": "9d1c27e1a7dff66249c551332e8e697b", "score": "0.56974983", "text": "private function checkPluginName()\n {\n if (!$this->name) {\n throw new \\InvalidArgumentException('Missing Plugin name.');\n }\n }", "title": "" }, { "docid": "5274603e2d372308354562fb0ef0dade", "score": "0.5695616", "text": "private function _possibility() {\n // this function must be called only from s_list_class() function\n $debug_backtrace = debug_backtrace();\n // get function from calling this method\n $deb_value = $debug_backtrace[2];\n if ($deb_value['function'] == \"s_list_class\" || $deb_value['function'] == \"nc_objects_list\") {\n return true;\n }\n // wrong\n return false;\n }", "title": "" }, { "docid": "551ece8f3fed44b79061de54a008a470", "score": "0.5695493", "text": "function ultimate_plugin_requirements_met() {\n\n\tglobal $wp_version;\n\n\tif ( version_compare( PHP_VERSION, ULTIMATE_PLUGIN_REQUIRED_PHP_VERSION, '<' ) ) {\n\t\treturn false;\n\t}\n\tif ( version_compare( $wp_version, ULTIMATE_PLUGIN_REQUIRED_WP_VERSION, '<' ) ) {\n\t\treturn false;\n\t}\n\n\tif ( !empty( unserialize( ULTIMATE_PLUGIN_REQUIRED_PLUGINS ) ) ) {\n\t\trequire_once ABSPATH . '/wp-admin/includes/plugin.php';\n\n\t\tforeach ( unserialize( ULTIMATE_PLUGIN_REQUIRED_PLUGINS ) as $plugin ) {\n\t\t\tif ( ! is_plugin_active( $plugin ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn true;\n}", "title": "" }, { "docid": "1c3ff41acddd4c5deb4ebd9c7252186d", "score": "0.56933457", "text": "protected function checkRequirements(): void\n {\n //parent::checkRequirements();\n }", "title": "" }, { "docid": "645e4f4caa54116178a3537aa74eb9e2", "score": "0.56887937", "text": "function plugin_compatible_with_this_version_ogp($pi_name) {\n global $_CONF, $_DB_dbms;\n\n return version_compare(PHP_VERSION, '5.0.0', '>=');\n}", "title": "" }, { "docid": "5b15dcc0e8a0a7edb3971b1cf03a06c9", "score": "0.5671867", "text": "public function check_plugin_dependencies() {\n\t\t// Output an error message in case ACF isn't installed.\n\t\tif ( ! class_exists( 'ACF' ) ) {\n\t\t\tadd_action( 'admin_notices', array( $this, 'error_message_no_acf' ) );\n\t\t}\n\t\t// Output an error message in case Timber isn't installed.\n\t\tif ( ! class_exists( 'Timber' ) ) {\n\t\t\tadd_action( 'admin_notices', array( $this, 'error_message_no_timber' ) );\n\t\t}\n\t}", "title": "" }, { "docid": "8fbda0673c6dd208c9ef21db85618b20", "score": "0.5670037", "text": "public function validateArguments() {\n\t\t$messageAppended = ' Forgotten to define \\TYPO3\\CMS\\Vidi\\AjaxDispatcher::addAllowedActions in ext_tables.php or wrong usage?';\n\t\t$extensionName = $this->requestArguments['extensionName'];\n\t\tif (empty(self::$allowedControllerActions[$extensionName])) {\n\t\t\t$message = sprintf('Extension name \"%s\" is not allowed.', $extensionName);\n\t\t\tthrow new \\Exception($message . $messageAppended, 1377018166);\n\t\t}\n\n\t\t$pluginName = $this->requestArguments['pluginName'];\n\t\tif (empty(self::$allowedControllerActions[$extensionName]['plugins'][$pluginName])) {\n\t\t\t$message = sprintf('Plugin name \"%s\" is not allowed.', $pluginName);\n\t\t\tthrow new \\Exception($message . $messageAppended, 1377018167);\n\t\t}\n\n\t\t$controllerName = $this->requestArguments['controllerName'];\n\t\tif (empty(self::$allowedControllerActions[$extensionName]['plugins'][$pluginName]['controllers'][$controllerName])) {\n\t\t\t$message = sprintf('Controller name \"%s\" is not allowed.', $controllerName);\n\t\t\tthrow new \\Exception($message . $messageAppended, 1377018168);\n\t\t}\n\n\t\t$actionName = $this->requestArguments['actionName'];\n\t\tif (!in_array($actionName, self::$allowedControllerActions[$extensionName]['plugins'][$pluginName]['controllers'][$controllerName]['actions'])) {\n\t\t\t$message = sprintf('Action name \"%s\" is not allowed.', $actionName);\n\t\t\tthrow new \\Exception($message . $messageAppended, 1377018169);\n\t\t}\n\t}", "title": "" }, { "docid": "d3a7d7820e84f18af3ed55116f628c9b", "score": "0.56629103", "text": "public function supportsServerControlsInMethods()\n {\n return version_compare(PHP_VERSION, '7.3.0') >= 0;\n }", "title": "" }, { "docid": "6198f669a20bce586422e2c7298ea056", "score": "0.5653705", "text": "public function exists() {\n\t\tthrow new Exception(\"Method exists not implemented.\");\n\t}", "title": "" }, { "docid": "846b29ab564a49bcbdad5f10395d2d27", "score": "0.56429034", "text": "public function isRegistered($plugin) {}", "title": "" }, { "docid": "77a7f2376c1b6d1726e8e11692472252", "score": "0.56395185", "text": "public function permiso(){\n $lst = get_loaded_extensions();\n if(in_array(\"curl\",$lst)){\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "48e15967db48223245f878ba69f136cd", "score": "0.56301504", "text": "abstract protected function _checkParams();", "title": "" }, { "docid": "89f25df4fb8c40e74fa79dfb97bee213", "score": "0.5622176", "text": "function cURLcheckBasicFunctions()\n{\n if( !function_exists(\"curl_init\") &&\n !function_exists(\"curl_setopt\") &&\n !function_exists(\"curl_exec\") &&\n !function_exists(\"curl_close\") ) return false;\n else return true;\n}", "title": "" }, { "docid": "f213d2f2831cb69deaa312f896383fb6", "score": "0.5620611", "text": "function plugin_compatible_with_this_version_links($pi_name)\n{\n global $_CONF, $_DB_dbms;\n\n // check if we support the DBMS the site is running on\n $dbFile = $_CONF['path'] . 'plugins/' . $pi_name . '/sql/'\n . $_DB_dbms . '_install.php';\n if (! file_exists($dbFile)) {\n return false;\n }\n\n if (!function_exists('COM_truncate') || !function_exists('MBYTE_strpos')) {\n return false;\n }\n\n if (!function_exists('SEC_createToken')) {\n return false;\n }\n\n if (!function_exists('COM_showMessageText')) {\n return false;\n }\n\n return true;\n}", "title": "" }, { "docid": "bd0da5a091d94219e0e7bf5a0744ef5f", "score": "0.5619986", "text": "private static function verifyThatEssentialFunctionsAreEnabledOrThrowException()\n {\n if (!self::isFunctionEnabled('shell_exec')) {\n throw new \\RuntimeException('The php function `shell_exec` is disabled. Without this function we would not be able to kill the server after it has been started. You need to turn it on in your php.ini. While you\\'re there, also make sure that `proc_open` and `fsockopen` are enabled.');\n }\n if (!self::isFunctionEnabled('proc_open')) {\n throw new \\RuntimeException('The php function `proc_open` is disabled. Without this function we would not be able to start the server. You need to turn it on in your php.ini. While you\\'re there, make sure that `fsockopen` is enabled.');\n }\n if (!self::isFunctionEnabled('fsockopen')) {\n throw new \\RuntimeException('The php function `fsockopen` is disabled. Without this function we would not be able to check if the server is running. You need to turn it on in your php.ini.');\n }\n }", "title": "" }, { "docid": "e846c3dc4763e17845c656861dda5544", "score": "0.56002146", "text": "function __call($name, $arguments) {\n\t\ttrigger_error(__CLASS__.': No method '.$name, E_USER_WARNING);\n\t\treturn false;\n\t}", "title": "" }, { "docid": "7471ba497cd1273792ef4976a8bfb4e9", "score": "0.559645", "text": "public function checkFixSystem()\n {\n\n }", "title": "" }, { "docid": "a87f761e25178852b073257592dfe28e", "score": "0.5574091", "text": "public function checkInstall();", "title": "" }, { "docid": "84feac5c29022776a6e731b4fcda056c", "score": "0.5570101", "text": "public function testPluginInterfaces()\n {\n $invoker = new \\Magento\\Framework\\App\\Utility\\AggregateInvoker($this);\n $invoker(\n function ($plugin, $type) {\n $this->validatePlugins($plugin, $type);\n },\n $this->pluginDataProvider()\n );\n }", "title": "" }, { "docid": "7c12425c3f2218a0c83f4cf33f4d80b9", "score": "0.5563619", "text": "function missing( $func ) {\n\tif ( \\extension_loaded( 'suhosin' ) ) {\n\t\t$exts = ini_get( 'suhosin.executor.func.blacklist' );\n\t\tif ( !empty( $exts ) ) {\n\t\t\t$blocked\t= explode( ',', strtolower( $exts ) );\n\t\t\t$blocked\t= array_map( 'trim', $blocked );\n\t\t\t$search\t\t= strtolower( $func );\n\t\t\t\n\t\t\treturn ( \n\t\t\t\tfalse\t== \\function_exists( $func ) && \n\t\t\t\ttrue\t== array_search( $search, $blocked ) \n\t\t\t);\n\t\t}\n\t}\n\t\n\treturn !\\function_exists( $func );\n}", "title": "" }, { "docid": "27656233c16777d891eeabd8b0d1c29e", "score": "0.55560327", "text": "public function validatePlugin($plugin)\n {\n }", "title": "" }, { "docid": "edeb23e438e00b7f2a767ba86dfdac89", "score": "0.554769", "text": "function registerApiMethods() {\r\n\t\t\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "56a086cbe73ddb596ae5a4e319409aa2", "score": "0.5538785", "text": "public function hasReturnType(){parent::hasReturnType();}", "title": "" }, { "docid": "fd2c91348a6eecb00bdc33c95cc3dcf4", "score": "0.55370694", "text": "protected function checkDisableFunctions() {}", "title": "" }, { "docid": "1ae8e1339601eef5738a26585c2cab29", "score": "0.55311817", "text": "static protected function methodExists($instance, $methodName){\n\t\treturn method_exists($instance, $methodName);\n\t}", "title": "" }, { "docid": "ccda714ffa64436c8d85bab728316dec", "score": "0.5529823", "text": "function getSupportMethod()\n {\n }", "title": "" }, { "docid": "8c99979a82ce4161d29ae48c4a0a0133", "score": "0.552583", "text": "public function check()\n\t\t{\n\t\t\tswitch($this->type)\n\t\t\t{\n\t\t\t\tcase self::TYPE_FUNCTION:\n\n\t\t\t\t\treturn function_exists($this->what);\n\n\t\t\t\tbreak;\n\n\t\t\t\tcase self::TYPE_EXTENSION:\n\n\t\t\t\t\treturn extension_loaded($this->what);\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "6f579e630c145e4021383f6a11938064", "score": "0.55249804", "text": "function bootstrap_xmlrpc_methods() {\n\t\treturn array(\n\t\t\t'jetpack.verifyRegistration' => array( $this, 'verify_registration' ),\n\t\t);\n\t}", "title": "" }, { "docid": "489cb9b9ee7185ba576656ffc14ce8a3", "score": "0.55247754", "text": "function checkDisableFunctions(){\n $df = & $this->_emitDisableFunctions();\n if (!empty($df)) {\n if (!is_array($df)) {\n $df = (array) $this->splitEnableName($df);\n }\n if (!$this->isAssoc($df)) {\n $df = $this->flipArray($df);\n }\n }\n unset($df);\n }", "title": "" }, { "docid": "46bb8fd5dc2b5bcfbbdceda472d9cf06", "score": "0.55110043", "text": "public function rpcIsValidMethod($method);", "title": "" }, { "docid": "88ba4f87e010a6f5eb8674fe8f4e7eef", "score": "0.55086386", "text": "public function method_exists()\n {\n $methodsToCheck = [\n 'changePassword',\n 'createUser',\n 'getUsers',\n 'updateUser',\n 'deleteUser',\n ];\n\n foreach ($methodsToCheck as $method) {\n $this->checkMethodExist($this->mockUserController, $method);\n }\n }", "title": "" }, { "docid": "c7eb286b6bb2e4e84a824e9779566c22", "score": "0.5506453", "text": "public function is_php_compatible();", "title": "" }, { "docid": "03e955ba6e1e3fb0a4ae47e22f41c56e", "score": "0.54969317", "text": "function check_for_missing_requirements() {\n\tglobal $pagenow;\n\n\t// Only show this warning on the plugin page.\n\tif ( 'plugins.php' !== $pagenow ) {\n\t\treturn;\n\t}\n\n\t// No worries if everything checks out.\n\t$compatibility = Tools\\check_compatibility();\n\n\tif ( $compatibility['compatible'] ) {\n\t\treturn;\n\t}\n\n\t// Display a notice, informing the user why the plugin was deactivated.\n\tadd_action( 'admin_notices', __NAMESPACE__ . '\\notify_user_of_missing_requirements' );\n}", "title": "" }, { "docid": "81b07bd995eb975897a071df262aad26", "score": "0.5496454", "text": "abstract public function checkAvailablity();", "title": "" }, { "docid": "14636bb58ff70fb71d85fc11839e260e", "score": "0.5488987", "text": "private function checkExtensions()\n\t{\n\t\t$problem = false;\n\n\t\tforeach ($this->extensions as $k => &$ext)\n\t\t{\n\t\t\tif ($ext['type'] === 'function') {\n $loaded = function_exists($ext['name']);\n } else {\n $loaded = extension_loaded($ext['name']);\n }\n\n\t\t\t//make notice if any extensions status\n\t\t\t//doesn't match what we need\n\t\t\tif ($loaded !== $ext['expected'])\n\t\t\t{\n\t\t\t\t$problem = true;\n\t\t\t}\n\n\t\t\t$ext['actual'] = $loaded;\n\t\t}\n\n\t\t$this->compatResults['problem'] = $problem;\n\n\t\treturn $this->extensions;\n\t}", "title": "" }, { "docid": "70ddfb3102649ed6810056b739b9ca53", "score": "0.5485902", "text": "function verifySignature($in, $sig) {\r\n return \"verifySignature not supported\";\r\n }", "title": "" }, { "docid": "a629bdd7b28ec7a37f85e858062f0907", "score": "0.54609096", "text": "abstract public function check();", "title": "" }, { "docid": "4a900e22fde23d2b353f966f77af6f60", "score": "0.545965", "text": "public function additional_checks()\n {\n \n }", "title": "" }, { "docid": "6dc8544e4001abe5f969e1d8acb8b0b3", "score": "0.5457891", "text": "abstract protected function checkParams($params);", "title": "" }, { "docid": "f0e214da5dc6addf79596233479cd15e", "score": "0.54521894", "text": "function signature_register_required_plugins() {\n\n /**\n * Array of plugin arrays. Required keys are name and slug.\n * If the source is NOT from the .org repo, then source is also required.\n */\n $plugins = array(\n\n // This is an example of how to include a plugin pre-packaged with a theme.\n array(\n 'name' => 'Redux Framework', // The plugin name.\n 'slug' => 'redux-framework', // The plugin slug (typically the folder name).\n 'required' => true, // If false, the plugin is only 'recommended' instead of required.\n 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch.\n 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins.\n\n ),\n array(\n 'name' => 'CMB 2', // The plugin name.\n 'slug' => 'cmb2', // The plugin slug (typically the folder name).\n 'required' => true, // If false, the plugin is only 'recommended' instead of required.\n 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch.\n 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins.\n\n ),\n array(\n 'name' => 'Demo Importer', // The plugin name.\n 'slug' => 'nova_importer', // The plugin slug (typically the folder name).\n 'source' => get_template_directory_uri() . '/lib/nova_importer.zip', // The plugin source.\n 'version' => '1.1',\n 'required' => true, // If false, the plugin is only 'recommended' instead of required.\n 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch.\n 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins.\n 'external_url' => '', // If set, overrides default API URL and points to an external URL.\n ),\n array(\n 'name' => 'Signature Shop Header', // The plugin name.\n 'slug' => 'signature_shop_header', // The plugin slug (typically the folder name).\n 'source' => get_template_directory_uri() . '/lib/signature_shop_header.zip', // The plugin source.\n 'required' => false, // If false, the plugin is only 'recommended' instead of required.\n 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch.\n 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins.\n 'external_url' => '', // If set, overrides default API URL and points to an external URL.\n ),\n array(\n 'name' => 'Intuitive Custom Post Order', // The plugin name.\n 'slug' => 'intuitive-custom-post-order', // The plugin slug (typically the folder name).\n 'required' => true, // If false, the plugin is only 'recommended' instead of required.\n 'version' => '', // E.g. 1.0.0. If set, the active plugin must be this version or higher.\n 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch.\n 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins.\n\n ),\n array(\n 'name' => 'WPBakery Visual Composer', // The plugin name.\n 'slug' => 'js_composer', // The plugin slug (typically the folder name).\n 'source' => get_template_directory_uri() . '/lib/js_composer.zip', // The plugin source.\n 'version' => '4.11.2.1',\n 'required' => true, // If false, the plugin is only 'recommended' instead of required.\n 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch.\n 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins.\n 'external_url' => '', // If set, overrides default API URL and points to an external URL.\n ),\n array(\n 'name' => 'Signature Shortcodes', // The plugin name.\n 'slug' => 'signature_shortcodes', // The plugin slug (typically the folder name).\n 'source' => get_template_directory_uri() . '/lib/signature_shortcodes.zip', // The plugin source.\n 'version' => '1.1', \n 'required' => true, // If false, the plugin is only 'recommended' instead of required.\n 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch.\n 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins.\n 'external_url' => '', // If set, overrides default API URL and points to an external URL.\n ),\n array(\n 'name' => 'Signature post Types', // The plugin name.\n 'slug' => 'signature_post_types', // The plugin slug (typically the folder name).\n 'source' => get_template_directory_uri() . '/lib/signature_post_types.zip', // The plugin source.\n 'required' => true, // If false, the plugin is only 'recommended' instead of required.\n 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch.\n 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins.\n 'external_url' => '', // If set, overrides default API URL and points to an external URL.\n ),\n array(\n 'name' => 'Revolution Slider', // The plugin name.\n 'slug' => 'revslider', // The plugin slug (typically the folder name).\n 'source' => get_template_directory_uri() . '/lib/revslider.zip', // The plugin source.\n 'required' => true, // If false, the plugin is only 'recommended' instead of required.\n 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch.\n 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins.\n 'external_url' => '', // If set, overrides default API URL and points to an external URL.\n ),\n array(\n 'name' => 'Ultimate Media Background', // The plugin name.\n 'slug' => 'umbg', // The plugin slug (typically the folder name).\n 'source' => get_template_directory_uri() . '/lib/umbg.zip', // The plugin source.\n 'required' => true, // If false, the plugin is only 'recommended' instead of required.\n 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch.\n 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins.\n 'external_url' => '', // If set, overrides default API URL and points to an external URL.\n ),\n array(\n 'name' => 'WooCommerce', // The plugin name.\n 'slug' => 'woocommerce', // The plugin slug (typically the folder name).\n 'required' => false, // If false, the plugin is only 'recommended' instead of required.\n 'version' => '', // E.g. 1.0.0. If set, the active plugin must be this version or higher.\n 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch.\n 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins.\n ),\n array(\n 'name' => 'WP Retina 2x', // The plugin name.\n 'slug' => 'wp-retina-2x', // The plugin slug (typically the folder name).\n 'required' => false, // If false, the plugin is only 'recommended' instead of required.\n 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch.\n 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins.\n\n ),\n \n );\n\n /**\n * Array of configuration settings. Amend each line as needed.\n * If you want the default strings to be available under your own theme domain,\n * leave the strings uncommented.\n * Some of the strings are added into a sprintf, so see the comments at the\n * end of each line for what each argument will be.\n */\n $config = array(\n 'id' => 'tgmpa', // Unique ID for hashing notices for multiple instances of TGMPA.\n 'default_path' => '', // Default absolute path to pre-packaged plugins.\n 'menu' => 'tgmpa-install-plugins', // Menu slug.\n 'has_notices' => true, // Show admin notices or not.\n 'dismissable' => true, // If false, a user cannot dismiss the nag message.\n 'dismiss_msg' => '', // If 'dismissable' is false, this message will be output at top of nag.\n 'is_automatic' => false, // Automatically activate plugins after installation or not.\n 'message' => '' // Message to output right before the plugins table.\n \n );\n\n tgmpa( $plugins, $config );\n\n}", "title": "" }, { "docid": "ac45980102df584bb7ea175dff36ca9d", "score": "0.5444999", "text": "private function checkExtensions()\n {\n $problem = false;\n\n foreach ($this->extensions as $k => &$ext) {\n if ($ext['type'] === 'function') {\n $loaded = function_exists($ext['name']);\n } else {\n $loaded = extension_loaded($ext['name']);\n }\n\n //make notice if any extensions status\n //doesn't match what we need\n if ($loaded !== $ext['expected']) {\n $problem = true;\n }\n\n $ext['actual'] = $loaded;\n }\n\n $this->compatResults['problem'] = $problem;\n\n return $this->extensions;\n }", "title": "" }, { "docid": "36ed5aa65421437677e6b2f8645d7a59", "score": "0.5443617", "text": "function isPHPCompatible () {\n\t\treturn true; // plugin should override it of not true\n\t}", "title": "" }, { "docid": "d6a78b2ceedf48259f7240cb3de8fcf8", "score": "0.5442704", "text": "private static function ver46() { }", "title": "" }, { "docid": "974e1824c93644e4ae7b1c51f34606ff", "score": "0.5438857", "text": "public function isAllowPluginsInCli();", "title": "" }, { "docid": "8d40240ff12ebbcc45a661e4e0d6827c", "score": "0.543657", "text": "abstract public function isKnown(): bool;", "title": "" }, { "docid": "948c60bd42268f69a1eb597aced78486", "score": "0.5435886", "text": "function uopz_get_return(string $class, string $method)\n{\n return true;\n}", "title": "" }, { "docid": "dace0a287b0fcf6d2a71797187b522ae", "score": "0.54317456", "text": "public function hasPlugin($name);", "title": "" }, { "docid": "64425c39c97ba94801b04c387e1958a3", "score": "0.54255235", "text": "public function _versionUpdateCheck()\n\t{\n\t\tif ( ! defined( 'MODERN_WORDPRESS_DEV' ) or \\MODERN_WORDPRESS_DEV == FALSE )\n\t\t{\n\t\t\t$plugin_meta = $this->data( 'plugin-meta' );\n\t\t\tif ( is_array( $plugin_meta ) and isset( $plugin_meta[ 'version' ] ) and $plugin_meta[ 'version' ] )\n\t\t\t{\n\t\t\t\t$install = $this->data( 'install-meta' );\n\t\t\t\tif ( ! is_array( $install ) or version_compare( $install[ 'version' ], $plugin_meta[ 'version' ] ) == -1 )\n\t\t\t\t{\n\t\t\t\t\t$this->versionUpdated();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "6bc737047f13932fd6ce6b00a1bab449", "score": "0.5412908", "text": "function option_tree_plugin_check() {\n\tif ( !function_exists( 'ot_get_option' ) ) { \n\t\theader(\"location:\" . get_template_directory_uri() . \"/plugin_required.php\"); \n\t\texit();\n\t}\n}", "title": "" }, { "docid": "4c6926dff462a12bda750c42eba0cedb", "score": "0.5411395", "text": "function inkpro_is_plugins() {\r\n\r\n\treturn function_exists( 'wolf_plugins_get_page_id' ) && is_page( wolf_plugins_get_page_id() ) || is_tax( 'plugin_cat' ) || is_tax( 'plugin_tag' );\r\n}", "title": "" }, { "docid": "691bbd05a52423b8d6535929ae94f3ee", "score": "0.5410297", "text": "public function getSupported();", "title": "" }, { "docid": "1c57f353566e403a440c538a7ed4a75e", "score": "0.54065394", "text": "abstract public function check();", "title": "" }, { "docid": "654932e7e87116b63134d2cf1c27bea1", "score": "0.5403322", "text": "protected function checkPhpVersion() {}", "title": "" }, { "docid": "2a1b5f4e5ecdfbcb99c62b1c4f8f50ff", "score": "0.5393005", "text": "abstract protected function allowsMetadataAssertions();", "title": "" }, { "docid": "dfd25a6a0cc5cd460220c3c0fe40d2f4", "score": "0.53925836", "text": "function lum_checkCorePlugins()\r\n\t{\r\n\t\t$core = array('Pages', 'Languages', 'Strings');\r\n\t\t\r\n\t\tforeach ($core as $plugin)\r\n\t\t{\r\n\t\t\tif (!is_file(PLUGINS_PATH . $plugin.'/luminance.plugin.class.php'))\r\n\t\t\t{\r\n\t\t\t\tdie(\"Core Plugin: '$plugin' is missing. Aborting.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "title": "" }, { "docid": "d34690c7ff2cd49c87bb5bd09c3e4a48", "score": "0.53877", "text": "public function isAvailable()\n {\n return function_exists('zephir_parse_file');\n }", "title": "" }, { "docid": "1a4bee9ae35f2392dc9a57949f5ff4f3", "score": "0.5387397", "text": "function ppi_wp_compatible() {\n return function_exists('do_shortcodes_in_html_tags');\n}", "title": "" }, { "docid": "a1b2dc5aeb049af6a7685d43b2216760", "score": "0.53850025", "text": "function validMethod($class,$method)\n{\n $valids = get_class_methods($class);\n $num = count($valids);\n\n for ($i=0;$i<$num;$i++) $valids[$i] = strtolower($valids[$i]);\n\n if (@in_array($method,$valids)) return true;\n else return false;\n \n}", "title": "" }, { "docid": "05599ebb0a1434a9d5d4fea92e10c83d", "score": "0.53831047", "text": "function plugin_rmqticket_check_prerequisites() {\n //do what the checks you want\n return true;\n}", "title": "" }, { "docid": "1c338eff46bcf615bc1b1fadcaa5dbad", "score": "0.5372434", "text": "function _plugin_exists($function, $type){\n\t\t//var_dump($this->_plugins);\n\t\t$_plugins_fun = $this->_plugins[$type][$function];\n\t\t// if(empty($_plugins_fun)){\n\t\t// \treturn false;\n\t\t// }\n\t\t// var_dump($_plugins_fun[0],class_exists($_plugins_fun[0]));\n\n\t\tif (isset($_plugins_fun) &&\n\t\t\tis_array($_plugins_fun) &&\n\t\t\tclass_exists($_plugins_fun[0]) &&\n\t\t\tmethod_exists($_plugins_fun[0], $_plugins_fun[1])){\n\n\t\t\tif(is_object($_plugins_fun[0])){\n\t\t\t\treturn $_plugins_fun[0].'->'.$_plugins_fun[1];\n\t\t\t}else{\n\t\t\t\treturn $_plugins_fun[0].'::'.$_plugins_fun[1];\n\t\t\t}\n\t\t}\n\t\t// check for standard functions\n\t\tif (isset($_plugins_fun) && function_exists($_plugins_fun)){\n\t\t\treturn $_plugins_fun;\n\t\t}\n\t\t// check for a plugin in the plugin directory\n\t\t$_plugins_file_name = $type . '.' . $function . '.php';\n\t\t$pluginfile = $this->_get_plugin_dir($_plugins_file_name).$_plugins_file_name;\n\t\tif(@is_file($pluginfile)){\n\t\t\trequire_once $pluginfile;\n\t\t\t$_plugins_fun_name = 'tpl_' . $type . '_' . $function;\n\t\t\tif (function_exists($_plugins_fun_name)){\n\t\t\t\t$this->register_modifier($function,$_plugins_fun_name);\n\t\t\t\t$this->_require_stack[$_plugins_file_name] = array($type, $function, $_plugins_fun_name);\n\t\t\t\treturn $_plugins_fun_name;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "b9f9ea36a5713dd4dcf17f847feaf7ce", "score": "0.5367139", "text": "protected function checkHasPlugin()\n {\n if (!$this->hasPlugin()) {\n throw new \\RuntimeException(L10n::__('You must set CAPTCHA plugin before rendering or validating.'));\n }\n }", "title": "" }, { "docid": "a1ed62909a107ccf08535da3110c32cb", "score": "0.53652304", "text": "public function isMethodFailure() : bool;", "title": "" }, { "docid": "97221d154f702dfa482ce4a6e0fff10d", "score": "0.53595024", "text": "function check()\n {\n }", "title": "" }, { "docid": "e1a5effe1ff48fbdcb724aed57c6ea4e", "score": "0.5357609", "text": "public function testMethodsExist()\n {\n $object = new FishFactory();\n\n $this->assertTrue(method_exists($object, 'createFromArray'));\n }", "title": "" }, { "docid": "05f384d961ea831c6ef23276acca107d", "score": "0.5355371", "text": "function check_requirements(){\n\tif (! file_exists('/usr/local/bin/convert')){\n\t\treturn false;\n\t}\n\tif (! file_exists('/usr/local/bin/exiftool')){\n\t\treturn false;\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "4fd7c6a4e600327adf0eff968b1e92e8", "score": "0.5354695", "text": "protected function checkPcreVersion() {}", "title": "" } ]
0a4452650be3d99df3cefcd35879d8b8
/ /Create Events /edit
[ { "docid": "17bfe95a6cc9ba1a594e84f05f63428c", "score": "0.0", "text": "public function event_edit($event)\n\t{\n\t\t$user_info = $this->session->userdata('logged_user');\n\t\t$user_id = $user_info['user_id'];\n\t\t\n\t\t/*event count */\n\t\t$count = $this->db->count_all_results('em_events');\n\t\t$em_count = $count+1;\n\t\t//\n\t\t/*if($this->input->post('open_to_all'))\n\t\t{\n\t\t\t$open = 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$open = 0;\n\t\t}*/\n\t\tif($this->input->post('select_users') == 1)\n\t\t{\n\t\t\t$s_users = $this->input->post('my_users');\n\t\t\tif(count($s_users) > 0)\n\t\t\t{\n\t\t\t\t$selected_users ='';\n\t\t\t\tforeach($s_users as $s_user)\n\t\t\t\t{\n\t\t\t\t\t$selected_users = $s_user.','.$selected_users;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$selected_users = '';\n\t\t\t}\n\t\t\t$open = 0;\n\t\t\t$selected_bg = 0;\n\t\t\t$selected_roles = 0;\n\t\t\t$selected_area = 0;\n\t\t\t\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$selected_users = '';\n\t\t\t$open = 1;\n\t\t\t//\n\t\t\t$selected_bg = '';\n\t\t\t$selected_area = '';\n\t\t\tif(!empty($_POST['sbg'])) \n\t\t\t{\n\t\t\t\tforeach($_POST['sbg'] as $cnt => $sbg) \n\t\t\t\t{\n\t\t\t\t\t$selected_bg = $sbg.','.$selected_bg;\n\t\t\t\t\t$selected_area = $_POST['sarea'][$cnt].','.$selected_area;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t//\n\t\t\t$open_role = $this->input->post('open_role');\n\t\t\tif(count($open_role) > 0)\n\t\t\t{\n\t\t\t\t$selected_roles ='';\n\t\t\t\tforeach($open_role as $role)\n\t\t\t\t{\n\t\t\t\t\t$selected_roles = $role.','.$selected_roles;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$selected_roles = '';\n\t\t\t}\n\t\t}\n\t\t//\n\t\t\n\t\t/* set reg_fee=1 if */\n\t\tif(!empty($_POST['seatfrom'])) \n\t\t{\n\t\t\t$reg_fee =1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$reg_fee =0;\n\t\t}\n\t\t$stdate = $this->input->post('f_time');\n\t\t$enddate = $this->input->post('t_time');\n\t\t/* */\n\t\t$data = [\n\t\t\t'budget' => $this->input->post('budget'),\n\t\t\t'reg_fee' => $reg_fee,\n\t\t\t'name' => $this->input->post('name'),\n\t\t\t'category' => $this->input->post('categ'),\n\t\t\t'subcategory' => $this->input->post('sub_categ'),\n\t\t\t'selected_users' => $selected_users,\n\t\t\t'selected_bg' => $selected_bg,\n\t\t\t'selected_roles' => $selected_roles,\n\t\t\t'selected_area' => $selected_area,\n\t\t\t'sms_numbers' =>$this->input->post('send_sms'),\n\t\t\t'location' => $this->input->post('location'),\n\t\t\t'venue' => $this->input->post('venue'),\n\t\t\t'open_to_all' => $open,\n\t\t\t'regstart_date' => $this->input->post('rf_time'),\n 'regend_date' => $this->input->post('rt_time'),\n\t\t\t'start_date' => $this->input->post('f_time'),\n 'end_date' => $this->input->post('t_time'),\n\t\t\t'host' \t\t => $this->input->post('host'),\n\t\t\t'organiser'\t\t => $this->input->post('organiser'),\n\t\t\t'guest'\t\t => $this->input->post('guest'),\n\t\t\t'additional_guests'\t => $this->input->post('add_guest'),\n\t\t\t'participants'\t\t => $this->input->post('participants'),\n\t\t\t'status'\t\t => $this->input->post('status'),\n\t\t\t'modified_by' \t => $user_id,\n\t\t\t'modified_at' \t => time()\n\t\t\t];\n\t\t\t$query = $this->db->where('event', $event)->update('em_events', $data);\n\t\t\t$query1 = $this->db->insert('em_track', $data);\n\t\t/* */\n\t\tif($query)\n {\n\t\t\t/* adding labels into em_labels table*/\n\t\t\t/*if(!empty($_POST['label'])) \n\t\t\t{\n\t\t\t\tforeach($_POST['label'] as $cnt => $label) \n\t\t\t\t{\n\t\t\t\t\t$data2 = [\n\t\t\t\t\t\t\t\t'event' => $event,\n\t\t\t\t\t\t\t\t'e_label' => $label,\n\t\t\t\t\t\t\t\t'created_by' \t => $user_id,\n\t\t\t\t\t\t\t\t'created_at' \t => time()\n\t\t\t\t\t\t\t];\n\t\t\t\t\t$query2 = $this->db->insert('em_labels', $data2);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}*/\n\t\t\t/* adding sponsorship into em_sponsorship table */\n\t\t\tif(!empty($_POST['sfor'])) \n\t\t\t{\n\t\t\t\t//\n\t\t\t\t$where_array = \" event = '\".$event.\"' \";\n\t\t\t\t$query = $this->db->where($where_array )->count_all_results('em_sponsorship');\n\t\t\t\tif($query >0)\n\t\t\t\t{\n\t\t\t\t\t$this->db->where('event', $event)->delete('em_sponsorship');\n\t\t\t\t}\n\t\t\t\t//\n\t\t\t\tforeach($_POST['sfor'] as $cnt => $sfor) \n\t\t\t\t{\n\t\t\t\t\t$sponsorship = $event.strtoupper( substr($sfor, 0, 4 ) );\n\t\t\t\t\t$charge = $_POST['scharge'][$cnt];\n\t\t\t\t\t$to = $_POST['sto'][$cnt];\n\t\t\t\t\t\n\t\t\t\t\t$data3 = [\n\t\t\t\t\t\t\t\t'event' => $event,\n\t\t\t\t\t\t\t\t'sponsorship' => $sponsorship,\n\t\t\t\t\t\t\t\t'title' => $sfor,\n\t\t\t\t\t\t\t\t'charge' => $charge,\n\t\t\t\t\t\t\t\t'give_to' => $to,\n\t\t\t\t\t\t\t\t'created_by' \t => $user_id,\n\t\t\t\t\t\t\t\t'created_at' \t => time()\n\t\t\t\t\t\t\t];\n\t\t\t\t\t$query3 = $this->db->insert('em_sponsorship', $data3);\n\t\t\t\t\t//EMAIL\n\t\t\t\t\t$user_info = singleDbTableRow($to);\n\t\t$HTMLrow = '';\n\t\t$HTMLrow .= '<table><tr>\n <td style=\"padding:5px;text-align:center;\">Event : '.$event.'</td>\n <td style=\"padding:5px;text-align:center;\">Event Start date '.$stdate.'</td>\n <td style=\"padding:5px;text-align:center;\">Event End date '.$enddate.'</td>\n\t\t\t\t\t\t<td style=\"padding:5px;text-align:center;\">Contract For '.$sfor.'</td>\n\t\t\t\t\t\t<td style=\"padding:5px;text-align:center;\">Amount '.$charge.'</td>\n </tr></table>';\n\t\t\t\t\t \n\t\t\t$adminEmail = get_option('default_email');\n $subject = 'Hi '.user_full_name($user_info).', your order registered successfully';\n $this->load->library('email');\n $this->email->set_mailtype(\"html\");\n $this->email->from($adminEmail, get_option('company_name'));\n $this->email->to($user_info->email);\n $this->email->cc($adminEmail);\n $this->email->subject($subject);\n $message = $HTMLrow;\n $this->email->message($message);\n $this->email->send();\n\t\t\t//\n\t\t\t\t}\n\t\t\t}\n\t\t\t/* adding seats and reg fee into em_seats table */\n\t\t\tif(!empty($_POST['seatfrom'])) \n\t\t\t{\n\t\t\t\t//\n\t\t\t\t$where_array = \" event = '\".$event.\"' \";\n\t\t\t\t$query = $this->db->where($where_array )->count_all_results('em_seats');\n\t\t\t\tif($query >0)\n\t\t\t\t{\n\t\t\t\t\t$this->db->where('event', $event)->delete('em_seats');\n\t\t\t\t}\n\t\t\t\t//\n\t\t\t\tforeach($_POST['seatfrom'] as $cnt => $seatfrom) \n\t\t\t\t{\n\t\t\t\t\t/*seat count */\n\t\t\t\t\t$Scount = $this->db->count_all_results('em_seats');\n\t\t\t\t\t$st_count = $Scount+1;\n\t\t\t\t\t$seat = strtoupper($_POST['seatname'][$cnt]);\n\t\t\t\t\t$seatto = $_POST['seatto'][$cnt];\n\t\t\t\t\t$seatfee = $_POST['seatfee'][$cnt];\n\t\t\t\t\t$refund_perc = $_POST['seatrefund'][$cnt];\n\t\t\t\t\t\n\t\t\t\t\t$data4 = [\n\t\t\t\t\t\t\t\t'event' => $event,\n\t\t\t\t\t\t\t\t'seat' => $seat,\n\t\t\t\t\t\t\t\t'seat_from' => $seatfrom,\n\t\t\t\t\t\t\t\t'seat_to' => $seatto,\n\t\t\t\t\t\t\t\t'reg_fee' => $seatfee,\n\t\t\t\t\t\t\t\t'refund_perc' => $refund_perc,\n\t\t\t\t\t\t\t\t'created_by' \t => $user_id,\n\t\t\t\t\t\t\t\t'created_at' \t => time()\n\t\t\t\t\t\t\t];\n\t\t\t\t\t$query4 = $this->db->insert('em_seats', $data4);\n\t\t\t\t}\n\t\t\t}\t\t\n //create_activity('Added '.$data['name'].'distributor_commission'); //create an activity\n return true;\n }\n return false;\n\t}", "title": "" } ]
[ { "docid": "27b26169589f1fd3f5b3853b7598d929", "score": "0.7502132", "text": "public\n function edit(Evento $evento)\n {\n\n }", "title": "" }, { "docid": "1942a233ce6fd8d05f193bf7e109ac4c", "score": "0.7336015", "text": "public function edit(Event $event)\n {\n //\n }", "title": "" }, { "docid": "1942a233ce6fd8d05f193bf7e109ac4c", "score": "0.7336015", "text": "public function edit(Event $event)\n {\n //\n }", "title": "" }, { "docid": "1942a233ce6fd8d05f193bf7e109ac4c", "score": "0.7336015", "text": "public function edit(Event $event)\n {\n //\n }", "title": "" }, { "docid": "1942a233ce6fd8d05f193bf7e109ac4c", "score": "0.7336015", "text": "public function edit(Event $event)\n {\n //\n }", "title": "" }, { "docid": "1942a233ce6fd8d05f193bf7e109ac4c", "score": "0.7336015", "text": "public function edit(Event $event)\n {\n //\n }", "title": "" }, { "docid": "1942a233ce6fd8d05f193bf7e109ac4c", "score": "0.7336015", "text": "public function edit(Event $event)\n {\n //\n }", "title": "" }, { "docid": "bc1f661e3f60fe6d3884ee44d855a1e2", "score": "0.7172907", "text": "public function edit(event $event)\n {\n //\n }", "title": "" }, { "docid": "bc1f661e3f60fe6d3884ee44d855a1e2", "score": "0.7172907", "text": "public function edit(event $event)\n {\n //\n }", "title": "" }, { "docid": "dd9195c043fba5c503710e8c3d381f48", "score": "0.7171438", "text": "public function edit(EventName $eventName)\n {\n //\n }", "title": "" }, { "docid": "73484ab73a9afb6e71119c81c3c56396", "score": "0.7141343", "text": "function editEvent() {\n\tglobal $db, $messages;\n\t$event_id = e($_POST['event_id']);\n\t$eventType = e($_POST['eventType']);\n\t$description = e($_POST['description']);\n\t$location = e($_POST['location']);\n\t$time = e($_POST['time']);\n\n\t$editQuery = \"UPDATE events SET eventType='$eventType', description='$description', location='$location', time='$time' WHERE event_id='$event_id'\";\n\t$result = mysqli_query($db, $editQuery);\n\tarray_push($messages, \"Tapahtuma muokattu\");\n}", "title": "" }, { "docid": "673b63fbe4bd6f4f0ca7c5423b450072", "score": "0.69982743", "text": "public function edit(evento $evento)\n {\n //\n }", "title": "" }, { "docid": "1025fcbbf98cda7707d68e2a551c14a6", "score": "0.6987516", "text": "public function edit($eventId = null)\n {\n $options = [\n 'associated' => ['Activities' => ['associated' => ['Addresses', 'Participants' => ['associated' => ['People']]]]],\n ];\n $event = $this->Events->newEntity();\n if (!empty($eventId)) {\n $event = $this->Events->getSingle($eventId);\n }\n if ($this->request->is(['post', 'put', 'patch'])) {\n $event = $this->Events->patchEntity($event, $this->request->data(), $options);\n if ($this->Events->save($event)) {\n $this->Flash->success('The Event was successfully saved.');\n\n return $this->redirect(['action' => 'index_admin']);\n }\n $this->Flash->error('The Event could not be saved. Please check the submitted data and try again.');\n }\n $this->set(compact('event'));\n }", "title": "" }, { "docid": "a368404b03c886e2ee3cbe7a7af6359b", "score": "0.69559443", "text": "public function edit(Evento $evento)\n {\n //\n }", "title": "" }, { "docid": "21db6962711e13f9975930a95b9df051", "score": "0.6946727", "text": "public function edit($id = null) {\n\t\t\t$this->set('title_for_layout','Business Meeting - Editar evento');\n\t\t\t$this ->layout='user';\n\t\t\tif (!$id) {\n\t\t\t\tthrow new NotFoundException(__('Invalid event'));\n\t\t\t}\n\n\t\t\t$event = $this->Event->findById($id);\n\t\t\tif (!$event) {\n\t\t\t\tthrow new NotFoundException(__('Invalid event'));\n\t\t\t}\n\n\t\t\tif ($this->request->is(array('event', 'put'))) {\n\t\t\t\t$this->Event->id = $id;\n\t\t\t\tif ($this->Event->save($this->request->data)) {\n\t\t\t\t\t\n\t\t\t\t\t$this->Session->setFlash('Su evento ha sido actualizado.','default',array('class' => 'success'));\n\t\t\t\t\treturn $this->redirect(array('action' => 'index'));\n\t\t\t\t}\n\t\t\t\t$this->Session->setFlash(__('Unable to update your event.'));\n\t\t\t}\n\n\t\t\tif (!$this->request->data) {\n\t\t\t\t$this->request->data = $event;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "d219c2fa2cb36de8d08b0f1a8ee37340", "score": "0.6917609", "text": "public function edit(int $event_id = null)\n {\n\n if(isset($_POST['editevent']) && !empty($_POST['editevent']))\n {\n //echo\"EDIT EVENT\";\n $event_id = $_POST['editevent'];\n\n $event = Event::loadEvent($event_id);\n $event->date = $_POST['date'];\n $event->start_time = $_POST['start_time'];\n $event->_hometeam_id = $_POST['home_team_id'];\n $event->_awayteam_id = $_POST['away_team_id'];\n $event->_sport_id = $_POST['sport_id'];\n $event->_venue_id = NULL;\n $event->save();\n\n } elseif(isset($_POST['addevent'])){\n\n //echo\"ADD EVENT\";\n $event = new Event();\n $event->date = $_POST['date'];\n $event->start_time = $_POST['start_time'];\n $event->_hometeam_id = $_POST['home_team_id'];\n $event->_awayteam_id = $_POST['away_team_id'];\n $event->_sport_id = $_POST['sport_id'];\n $event->_venue_id = NULL;\n $event->save();\n\n $event_id = $event->getId();\n }\n\n // Check if Event ID was passed\n $event = !empty($event_id) ? Event::loadEvent($event_id) : null;\n\n // Create view and set parameters\n $this->view('editevent',[\n 'event' => $event,\n 'sports' => Sport::loadAllSports(),\n 'teams' => Team::loadAllTeams()\n ]);\n\n $this->view->page_title = $event != null ? 'Edit Event' : 'Add Event';\n $this->view->render();\n }", "title": "" }, { "docid": "ad52159ba9492513bc12a40276be8f7c", "score": "0.68988824", "text": "function editEvent($title, $dir, $ecodes='ECB') { \n HTML::title($title);\n \n echo h2('', $title);\n \n $fields = self::eventFields($dir, $ecodes, 'date');\n \n if (FORM::complete($fields)) {\n $basetime = strtotime(param('date'));\n $date = date('m/d/Y', $basetime);\n $year = date('Y', $basetime);\n \n $eventsfile = $dir.'/'.$year.'/calendar.txt';\n $events = @unserialize(@file_get_contents($eventsfile));\n if (!is_array($events)) $events = array();\n \n if (array_key_exists($date, $events) && count($events[$date])) { \n $editflds = array(\n 'element:text | name:date | hidden',\n 'element:text | name:submit | hidden',\n 'element:checkbox | name:deleteall | label:delete all',\n );\n \n $current = array();\n foreach ($events[$date] as $id => $evt) {\n $current[$id]['id'] = $id;\n $editflds = array_merge($editflds, self::eventFields($dir, $ecodes, 'edit', $id, $evt));\n }\n \n if (FORM::complete($editflds, array('submit-name' => 'update', 'submit' => 'Update'))) {\n $event = param('event');\n \n // merge new back into old\n if (param('deleteall') == 'on') {\n $current = array();\n $event = array();\n }\n\n foreach ($event as $id => $evt) {\n if (is_array($evt) && array_key_exists('id', $evt)) unset($evt['id']);\n $current[$id] = $evt;\n }\n \n // process deleted events\n $deletes = param('delete', array());\n krsort($deletes);\n foreach ($deletes as $id => $on) unset($current[$id]);\n \n $events[$date] = $current;\n file_put_contents($eventsfile, serialize($events));\n \n echo h3('', 'Event(s) Updated');\n \n }\n \n } else {\n echo h3('', 'No Events are scheduled for '.$date);\n }\n }\n \n}", "title": "" }, { "docid": "f21a34674e6455213ebcf51a864d70e6", "score": "0.6873844", "text": "public function edit($id_data)\n {\n if(!DB::table('event')->where('cms_users_id',Session::get('admin_id'))->where('id', $id_data)->exists()){\n CRUDBooster::redirect(URL::to('eo/event'), \"Hey! Event with id \".$id_data.\" is doesn't exist!\",\"warning\");\n }\n\n $data['page_title'] = 'EO Panel: Edit Event';\n $data['event'] = DB::table('event')->where('id', $id_data)->first();\n return view('event_organizer.edit_event', $data);\n }", "title": "" }, { "docid": "f79cb0581bb4cd5af3cb563cad01989f", "score": "0.6855253", "text": "public function edit($id) {\n\t\t$event = Event::findOrFail ( $id );\n\t\t\n\t\treturn view ( 'admin.events.edit', compact ( 'event' ) );\n\t}", "title": "" }, { "docid": "a126e87b371931c18f83e9812518bd8f", "score": "0.6813835", "text": "public function edit($id)\n {\n //\n $objs = Events::find($id);\n $data['objs'] = $objs;\n $data['url'] = url('admin/events/'.$id);\n $data['method'] = \"put\";\n return view('admin.events.edit', $data);\n }", "title": "" }, { "docid": "f61d7c5d7f1a69fe8c40d3f9d0e99d91", "score": "0.6777861", "text": "function event_edit_buttons($event) {\r\n\t\t$event_guid = $event->getGUID();\r\n\t\tif($event->canEdit()){\r\n\t\t\telgg_register_menu_item('title', array(\r\n\t\t\t\t\t'name' => elgg_echo('event:edit'),\r\n\t\t\t\t\t'href' => elgg_get_site_url() . \"event/edit/{$event_guid}\",\r\n\t\t\t\t\t'text' => elgg_echo('event:edit'),\r\n\t\t\t\t\t'link_class' => 'elgg-button elgg-button-action',\r\n\t\t\t));\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "56afeaa600793f9d305116f4c8084847", "score": "0.67597604", "text": "public function edit(EventBooked $eventBooked)\n {\n //\n }", "title": "" }, { "docid": "503279fdd6bc4b77b078b59ae610aae4", "score": "0.6738622", "text": "public function edit($id)\n {\n $event = Event::find($id);\n return view('admin.editEvent',['event'=>$event]);\n }", "title": "" }, { "docid": "bbebbdbb698983ec5117a9233876fb46", "score": "0.66855943", "text": "public function edit($id)\n {\n // return view('admin.event.edit',compact('event'));\n\n $event = Event::findOrFail($id);\n return view('admin.event.edit',compact('event'));\n }", "title": "" }, { "docid": "621aa1fa534c92a9252f961888f599b3", "score": "0.66814476", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BenAssociationBundle:event')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find event entity.');\n }\n\n $editForm = $this->createForm(new eventType(), $entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BenAssociationBundle:event:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "dedcc2912479325f905637de4f26443e", "score": "0.66542435", "text": "public function edit($id)\n {\n //\n $event=Event::find($id);\n if($event){\n\n return array(\n 'code'=>env('API_CODE_SUCCESS'),\n 'data'=>$event,\n 'message'=>'success'\n );\n\n }else{\n\n return array(\n 'code'=>env('API_CODE_ERR'),\n 'data'=>null,\n 'message'=>'success'\n );\n }\n\n }", "title": "" }, { "docid": "7740cc93343b0b3f118d22ecc85f1aa6", "score": "0.664143", "text": "public function edit($id)\n {\n $event = EventCreate::findOrFail($id);\n return view('teacher.events.edit', compact('event','id'));\n }", "title": "" }, { "docid": "2338476e86147399e069f54ebab50d66", "score": "0.66316587", "text": "public function editEventAction(Request $request, $id) {\r\n\r\n $this->denyUnlessGranted(\"ROLE_ADMIN\");\r\n\r\n $event = $this->getOrm()->getRepository(Event::class)->find($id);\r\n\r\n if (!$event) {\r\n throw $this->createNotFoundException('Event not found!');\r\n }\r\n\r\n if ($request->getMethod() === Request::METHOD_POST) {\r\n $data = $request->request;\r\n\r\n $event->setTitle($data->get('title'));\r\n $event->setDescription($data->get('description'));\r\n $event->setSpeaker($data->get('speaker'));\r\n $event->setDateTime($data->get('datetime'));\r\n $event->setLocation($data->get('location'));\r\n\r\n $mgr = $this->getOrm()->getManager();\r\n\r\n $mgr->persist($event);\r\n\r\n $mgr->flush();\r\n\r\n return $this->redirect('/');\r\n }\r\n\r\n return $this->render('addEvent.html.twig', array(\r\n 'event' => $event,\r\n 'title' => 'event.title.edit',\r\n 'action' => 'event.action.edit'\r\n ));\r\n }", "title": "" }, { "docid": "e95fabb79d7342c31c2551781e96050b", "score": "0.6619104", "text": "public function edit() {\n $data['individual'] = $this->getIndividual();\n $this->load->view('Dashboard/header');\n $this->load->view('Event/edit', $data);\n $this->load->view('Dashboard/footer');\n }", "title": "" }, { "docid": "c93deef766bb1e1b08fd4d7ca370725f", "score": "0.66092724", "text": "public function edit($id)\n {\n $Model = Event::whereId($id)->firstOrFail();\n return view('admin.event.edit',['event'=>$Model]);\n }", "title": "" }, { "docid": "cece970a7ca8d0884ea49bc7f123ab19", "score": "0.66062933", "text": "public function edit(VolunteerEvent $volunteerEvent)\n {\n //\n }", "title": "" }, { "docid": "3308faa888607c8a896284766f451a06", "score": "0.6580374", "text": "public function edit($id)\n {\n $event = Event::findOrFail($id);\n return view('event.edit', compact('event'))->with('title',\"Edit Event\");\n }", "title": "" }, { "docid": "ca317979e27cc7e59ad6aefc4077f603", "score": "0.65765643", "text": "function editEvent($req, &$t) {\n\t\t//make page title \n\t\t$this->_makePageTitle($t);\n\n\t\t//make toolbar\n\t\t$this->_makeToolbar($t);\n\n\t\t//load a default data model if one is set\n\t\tif ($this->dataModelName != '') {\n\t\t\t$c = $this->dataModelName;\n\t\t\t$this->dataModel = new $c();\n\t\t\t$this->dataModel->load($req->cleanInt('id'));\n\t\t} else if ($this->tableName != '') {\n\t\t\t$this->dataModel = new Cgn_DataItem($this->tableName);\n\t\t\t$this->dataModel->load($req->cleanInt('id'));\n\t\t} else {\n\t\t\t$this->dataModel = new Cgn_DataItem('');\n\t\t}\n\t\t//make the form\n\t\t$f = $this->_makeEditForm($t, $this->dataModel);\n\t\t$this->_makeFormFields($f, $this->dataModel, TRUE);\n\t}", "title": "" }, { "docid": "fee83382e1cb3fa1ca4d2777cab3345a", "score": "0.65685475", "text": "public function editEvent($req, &$t) {\n\t\t//make page title \n\t\t$this->_makePageTitle($t);\n\n\t\t//make toolbar\n\t\t$this->_makeToolbar($t);\n\n\t\t$this->_makeDataModel($req, $req->cleanInt('id'));\n\n\t\t//make the form\n\t\t$f = $this->_makeEditForm($t, $this->dataModel);\n\t\t$this->_makeFormFields($f, $this->dataModel, TRUE);\n\t}", "title": "" }, { "docid": "7f05eacd284fb479bdbe7dcac581a8e9", "score": "0.6557435", "text": "public function edit(Tienda $tienda){\n\n }", "title": "" }, { "docid": "e535f5a5d9cff09b94878c3eeb5ca0e7", "score": "0.65544784", "text": "public\n function editEvent($type, $id)\n {\n switch ($type) {\n case 'hackathons':\n $hack = Event::findOrFail($id);\n if ($hack->user == Auth::user())\n return $this->editHack($id);\n abort(401);\n break;\n case 'meetups':\n $meet = Event::findOrFail($id);\n if ($meet->user == Auth::user())\n return $this->editMeet($id);\n abort(401);\n break;\n case 'other':\n $other = Event::findOrFail($id);\n if ($other->user == Auth::user())\n return $this->editOtherEvent($id);\n abort(401);\n break;\n default:\n abort(403);\n break;\n }\n }", "title": "" }, { "docid": "76f3c7759325b0dd5bfd6eae7a2d99f4", "score": "0.6545653", "text": "function editEvent($data) {\n $validManager = [\"managerID\" => $_SESSION['managerID'], \"eventID\" => $_POST[$data[0]]];\n if ($this->db->getEventByManagerID($validManager) > 0) {\n $this->db->editEvent($data);\n }\n else {\n return -1;\n }\n }", "title": "" }, { "docid": "502bbc24e558726b5ff2d0b02ef27593", "score": "0.6543248", "text": "public function edit($id)\n\t{\n return View::make('events.edit');\n\t}", "title": "" }, { "docid": "78dd6c686a0898ff92526d2cc27b61f0", "score": "0.6540259", "text": "public function modifyEvent($idEvent){\r\n\t}", "title": "" }, { "docid": "ffa7e499d155e36c94f7faeaa0be7b56", "score": "0.6515271", "text": "public function updateeventAction() {\n\t\t$error = false;\n\t\t$userHelper = new User_Library_Helper_Utils();\n\n\t\t$userid = User_Library_Helper_Utils::currentUserId();\n\t\t$isAdmin = $userHelper->isRole('admin');\n\n\t\t$eventid = $this->getRequest()->getParam('id');\n\n\t\t// If we don't have the eventid , just fail\n\t\tif( !isset($eventid) ) {\n\t\t\t$this->view->msg = $this->getMessage('missingid');\n\t\t\t$error = true;\n\t\t} else {\n\t\t\t$event = new Calendar_Model_Events();\n\t\t\t$eventData = $event->findById($eventid);\n\t\t\t// If we have the event information\n\t\t\tif( !empty($eventData) ) {\n\t\t\t\t$owner = $eventData->getOwner();\n\t\t\t\t// And if we are the owner or we are an admin\n\t\t\t\tif( $userid==$owner or $isAdmin==true) {\n\n\t\t\t\t\t$form = new Calendar_Form_UpdateEvent();\n\n\t\t\t\t\t$args = array('title'=>$eventData->getTitle(),'allDayEvent'=>$eventData->getAllDayEvent(),'data'=>$eventData->getData());\n\n\t\t\t\t\tif( $this->getRequest()->isPost() and\n\t\t\t\t\t$form->isValid( $this->getRequest()->getParams() ) ) {\n\t\t\t\t\t\t$args = $this->getRequest()->getParams();\n\n\t\t\t\t\t\t$eventData->setTitle($args['title'])\n\t\t\t\t\t\t->setData($args['data'])\n\t\t\t\t\t\t->setAllDayEvent($args['allDayEvent']);\n\t\t\t\t\t\t$saved = $eventData->save();\n\t\t\t\t\t\tif( $saved!=false ) {\n\t\t\t\t\t\t\t$this->_flashMessenger = $this->_helper->getHelper('FlashMessenger');\n\t\t\t\t\t\t\t$this->_flashMessenger->addMessage('eventSaved');\n\t\t\t\t\t\t\t$props = $event->getProperties();\n\t\t\t\t\t\t\treturn $this->_redirect($props->event->updated->landing);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$form->populate($args);\n\t\t\t\t\t}\n\t\t\t\t\t$this->view->form = $form;\n\t\t\t\t} else {\n\t\t\t\t\t$error = true;\n\t\t\t\t\t$this->view->msg = $this->getMessage('notYourRecord');\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$error = true;\n\t\t\t\t$this->view->msg = $this->getMessage('resourceExist');\n\t\t\t}\n\t\t}\n\t\t$this->view->error = $error;\n\t}", "title": "" }, { "docid": "21d99e41a1e26e985dcc253e30b0cdcd", "score": "0.6515016", "text": "public function actionEdit() { }", "title": "" }, { "docid": "fdb7b8311b79a294a651d0d6a79d1d7f", "score": "0.6514139", "text": "public function edit(Event $event)\n {\n //\n return view('admin.events.edit', compact('event'));\n }", "title": "" }, { "docid": "bba8adfa45f8592b72656ac1da8c595d", "score": "0.6509485", "text": "public function edit(EventRegistration $eventRegistration)\n {\n //\n }", "title": "" }, { "docid": "324ad3099db7fa5f9d468fbf0be6542e", "score": "0.650342", "text": "public function edit(notificationEvent $notificationEvent)\n {\n //\n }", "title": "" }, { "docid": "de7856ee8e46d90496c1dde7de5983e6", "score": "0.6492198", "text": "public function update(Requests\\UpdateEventRequest $request)\n\t{\t\t\n\t\t$now = Carbon::now('utc')->toDateTimeString(); // later used for timestamps in bulk insert\n\t\t$event = Event::withoutGlobalScope('published')->where('id', $request->event)->firstOrFail();\n\n\t\t$this->authorize('edit', $event);\n\t\t\n\t\tsession()->regenerateToken();\n\t\t$eventAdmins = [];\n\t\t$is_location_hidden = false;\n\n\t\tif($request->has('hide_location') && $request->hide_location == 'on'){\n\t\t\t$is_location_hidden = true;\n\t\t}\n\n\t\t$event->title = $request->title;\n\t\t$event->address = $request->address;\n\t\t$event->zip_code = $request->zip_code;\n\t\t$event->details = $request->details;\n\t\t$event->venue_page_id = $request->venue_page;\n\t\t$event->creator_page_id = $request->creator_page;\n\t\t$event->country_id = $request->country;\n\t\t$event->region_id = $request->region;\n\t\t$event->city_id = $request->city;\n\t\t$event->is_location_hidden = $is_location_hidden;\n\t\t$event->is_private = $request->visibility;\n\n\t\tif(!$event->isHistory){\n\t\t\t$starting_time = new Carbon($request->starting_time.':00', $request->timezone);\n\t\t\t$ending_time = new Carbon($request->ending_time.':00', $request->timezone);\n\n\t\t\t$starting_time_UTC = $starting_time->timezone('UTC');\n\t\t\t$ending_time_UTC = $ending_time->timezone('UTC');\n\n\t\t\t$event->timezone = $request->timezone;\n\t\t\t$event->starts_at = $starting_time_UTC;\n\t\t\t$event->ends_at = $ending_time_UTC;\n\t\t}\n\n\t\t$attributes = array_filter($request->only(['type', 'entrance', 'dress_code', 'age_limit', 'music', 'document']));\n\t\t$images = $request->session()->get('edit_event_images');\n\n\t\tif($request->has('admins') && is_array($request->input('admins'))){\n\t\t\t$eventAdmins = array_filter($request->input('admins'));\n\t\t}\n\n\t\tDB::transaction(function() use ($event, $attributes, $eventAdmins, $images, $request, $now)\n\t\t{\n\t\t\t$event->save();\n\t\t\t$event->attributes()->sync(array_values($attributes));\n\n\t\t\t$event->admins()->sync(array_values($eventAdmins));\n\t\t\t$notifs = [];\n\t\t\t\n\t\t\tforeach($eventAdmins as $a){\n\t\t\t\t$notifs[] = [\n\t\t\t\t'user_id' => $a,\n\t\t\t\t'notification_type' => 'event_admin',\n\t\t\t\t'link_user_id' => Auth::id(),\n\t\t\t\t'link_event_id' => $event->id,\n\t\t\t\t'created_at' => $now,\n\t\t\t\t'updated_at' => $now\n\t\t\t\t];\n\t\t\t}\n\n\t\t\tif($notifs){\n\t\t\t\t\\App\\Notification::insert($notifs);\n\t\t\t}\n\n\t\t\tif(!empty($images))\n\t\t\t{\n\t\t\t\t$imageModels = [];\n\t\t\t\t$firstImageKey = key($images);\n\t\t\t\tforeach($images as $key => $image){\n\t\t\t\t\tif($image[\"is_temp\"] == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tif($key == $firstImageKey){\n\t\t\t\t\t\t\t$imageModels[] = new \\App\\Image(['name' => $image[0], 'is_main_image' => 1]);\n\t\t\t\t\t\t\t$mainImage = $event->mainImage();\n\t\t\t\t\t\t\tif($mainImage){\n\t\t\t\t\t\t\t\t$mainImage->is_main_image = 0;\n\t\t\t\t\t\t\t\t$mainImage->save();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t$imageModels[] = new \\App\\Image(['name' => $image[0]]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telseif($image[\"is_temp\"] == 0 && $key == $firstImageKey){\n\t\t\t\t\t\t$mainImage = $event->mainImage();\n\t\t\t\t\t\tif($mainImage && $mainImage->name !== $image[0])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$newMainImage = $event->images()->where('name', $image[0])->first();\n\t\t\t\t\t\t\tif($newMainImage)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$newMainImage->is_main_image = 1;\n\t\t\t\t\t\t\t\t$newMainImage->save();\n\t\t\t\t\t\t\t\t$mainImage->is_main_image = 0;\n\t\t\t\t\t\t\t\t$mainImage->save();\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$savedImages = $event->images()->saveMany($imageModels);\n\t\t\t\t$request->session()->forget('edit_event_images');\n\t\t\t}\n\n\t\t\t$eventPath = base_path().'/public/uploads/events/'.$event->id;\n\t\t\t$imagesPath = $eventPath.'/images';\n\n\t\t\tif(isset($savedImages) && count($savedImages) > 0){\n\t\t\t\tforeach($savedImages as $row){\n\t\t\t\t\tFile::move($this->uploadsTempDirectory.$row->name, $imagesPath.'/'.$row->name);\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t}); // Database transaction ends here\n\nif($event->published){\n\treturn redirect()->route('events.show', $event);\n}\nreturn redirect()->route('events.preview', $event->id);\n}", "title": "" }, { "docid": "4f19ef5587ed0284aff42eea7cb24ac5", "score": "0.6490928", "text": "public function edit(Event $event)\n {\n //\n $signup_start=$event->signup_start;\n $signup_end=$event->signup_end;\n //把其中的T替换\n $star=str_replace(' ','T',$signup_start);\n $end=str_replace(' ','T',$signup_end);\n return view('event.edit',['event'=>$event],compact('star','end'));\n }", "title": "" }, { "docid": "3fda4b9ab8a4412b85974cd80c5fc1d5", "score": "0.64622927", "text": "public function edit($id)\n {\n //\n $events = Event::findOrFail($id);\n\n return response()\n ->json([\n 'form' => $events,\n 'option' => []\n ]);\n }", "title": "" }, { "docid": "9d5f8330ffe08bec9877d7883892b4e1", "score": "0.6450215", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('SiteMainBundle:Event')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException($this->get('translator')->trans('backend.event.not_found'));\n }\n\n $editForm = $this->createEditForm($entity);\n if ($entity->getDatetime() > new \\DateTime()) {\n $editForm->remove('score');\n $editForm->remove('numberGoals');\n $editForm->remove('numberYellowCards');\n }\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('SiteMainBundle:Backend/Event:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "fd1dc0d722f3623a2cca97213dcfbc04", "score": "0.6440439", "text": "public function edit($id, Events $events)\n {\n //\n function maakgetal($nummer){\n $pieces = explode(\",\", $nummer);\n if(isset($pieces[1])){\n return number_format($pieces[0].\".\".$pieces[1], 2, '.', '');\n }else{\n return number_format($pieces[0], 2, '.', '');\n }\n\n\n }\n function prijs($nummer){\n return number_format($nummer, 2, ',', '');\n }\n $organizations = organization::all();\n\n $event = Events::where('id', $id)->first();\n // dd($event);\n return view('admin.event.edit', compact('organizations', 'event'));\n }", "title": "" }, { "docid": "1b82d4d7dae493c657008278d4aeca94", "score": "0.64199793", "text": "public function edit($id)\n {\n return view('admin.events.edit')->withEvent(event::find($id));\n }", "title": "" }, { "docid": "a77249f6c395274c6fca81a65c738c79", "score": "0.64110833", "text": "public function edit(Event $event)\n {\n $data = [];\n $data['event'] = $event;\n\n\n return view('admin.events.edit', $data);\n\n }", "title": "" }, { "docid": "2d55f3201b43f72456e6ed1e09df799d", "score": "0.6393271", "text": "public function edit($id)\n {\n\n $event = Event::find($id);\n// // Log::error($event->owner_id);\n// session()->put('owner', $event->owner_id);\n // Log::error(session()->get('owner'));\n // Session::put('OWNER',$event->owner_id);\n return view('edit', compact('event'));\n }", "title": "" }, { "docid": "6dc33b6c889310a943925b8b89ecdc5e", "score": "0.63828105", "text": "public function editAction(EventSource $eventSource) {\n\n $this->view->assign( 'language', \\Lsascha\\FullCalendar\\Controller\\StandardController::getLanguage() );\n\n\t\t//$csrf = $this->securityContext->getCsrfProtectionToken();\n\t\t//$this->view->assign('csrf', $csrf);\n\n\t\t$this->view->assign('eventSource', $eventSource);\n\t}", "title": "" }, { "docid": "c3aa007881a5c0a8d760a04c53705cae", "score": "0.6381369", "text": "function edit($eve_codigo)\n {\n // check if the evento exists before trying to edit it\n $data['evento'] = $this->Evento_model->get_evento($eve_codigo);\n\n if(isset($data['evento']['eve_codigo']))\n {\n $this->load->library('form_validation');\n\n $this->form_validation->set_rules('eve_tema','Eve Tema','required');\n $this->form_validation->set_rules('eve_fecha','Eve Fecha','required');\n\n if($this->form_validation->run())\n {\n $params = array(\n 'eve_fecha' => $this->input->post('eve_fecha'),\n 'eve_tema' => $this->input->post('eve_tema'),\n 'eve_descripcion' => $this->input->post('eve_descripcion'),\n );\n\n $this->Evento_model->update_evento($eve_codigo,$params);\n redirect('evento/index');\n }\n else\n {\n $data['_view'] = 'evento/edit';\n $this->load->view('layouts/main',$data);\n }\n }\n else\n show_error('The evento you are trying to edit does not exist.');\n }", "title": "" }, { "docid": "414b0eea1d544ba8fbb9c784c0429a6f", "score": "0.63782734", "text": "public function edit(Evento $evento)\n {\n\treturn view(\"edite_eventos\",[\"evento\"=>$evento]);\n }", "title": "" }, { "docid": "d6bc8ea08824609724ba2bfdfe34134b", "score": "0.6378135", "text": "public function edit($id)\n {\n $event = $this->repository->find($id);\n $modul = $this->modul;\n return view('event.edit', compact('event','modul'));\n }", "title": "" }, { "docid": "d28505fa66f7d985a1738525bcc38560", "score": "0.6372737", "text": "public function getEdit($id)\n\t{\n\t\t#\treturn View::make('event_add', ['service_list' => Service::lists('servname','id')]);\n\t\t#\t# Get all the services (used in the author drop down)\n\t\t#\t$services = Service::getIdNamePair();\n\t\ttry {\n\t\t $hevent = Hevent::findOrFail($id);\n\t\t}\n\t\tcatch(exception $e) {\n\t\t return Redirect::to('/event')\n\t\t \t->with('flash_message', '&nbsp;&nbsp;Event not found.');\n\t\t}\n\t\treturn View::make('event_edit', ['service_list' => Service::lists('servname','id')])->with('hevent', $hevent);\n\t}", "title": "" }, { "docid": "c949d7c95f16e93bcf62f1bf5821cfcc", "score": "0.6369168", "text": "public function edit($id)\n {\n $event = Event::findOrFail($id);\n return view('events.edit', compact('event'));\n }", "title": "" }, { "docid": "5a6037b89c2defe95150d1c0976d573f", "score": "0.63599014", "text": "public function action_edit();", "title": "" }, { "docid": "044653f2d76134425a5d9a0686a47272", "score": "0.6359236", "text": "public function editAction(Request $request, Events $event)\n {\n $deleteForm = $this->createDeleteForm($event);\n $editForm = $this->createForm('eventsBundle\\Form\\EventsType', $event);\n $editForm->handleRequest($request);\n\n if ($editForm->isSubmitted() && $editForm->isValid()) {\n $this->getDoctrine()->getManager()->flush();\n\n return $this->redirectToRoute('events_edit', array('idEvent' => $event->getIdevent()));\n }\n\n return $this->render('@events/Events/edit.html.twig', array(\n 'event' => $event,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "a1afcb8bd7c50272bd2ab944fa05da63", "score": "0.6357802", "text": "public function edit($id)\n {\n $event = Event::where('event_id', $id)->first();\n return view('event.edit', compact('event'));\n }", "title": "" }, { "docid": "1fe6f31cbe7915b34e0e8604bf98a7bb", "score": "0.63567495", "text": "protected function editAction()\n {\n\n \n\n }", "title": "" }, { "docid": "aada3147a51240848bcbd55553a13d72", "score": "0.6350648", "text": "public function edit($id)\n {\n $event=Event::find($id);\n if(auth()->user()->id !==$event->user_id){\n return redirect('postEvents')->with('error', 'Not authorised');\n }\n return view('postEvents.edit')->with('event', $event);\n }", "title": "" }, { "docid": "ddba4be0400429799decf053714fc89d", "score": "0.634973", "text": "public function edit(Event $event) {\n $id = $event->getInfo(\"id\");\n \n \n // get the data storage\n $audio = $this->data->find($this->name, $id);\n \n \n \n // update the data storage...\n $files = $event->getInfo(\"files\");\n foreach($files as $name => $file) {\n $file = $this->module(\"fileupload\")->data->find_by_directory_and_filename(\"file\", \"audio\", $name);\n if(is_object($file)) {\n $audio->file_id = $file->id;\n }\n }\n \n \n // save the data storage\n $audio->save();\n \n \n // dispatch the content event of the page\n // to update the contents on the page\n $this->module(\"page\")->dispatchEvent(\"content\", array(\"data\" => $audio));\n \n \n // add a success message\n $this->response->addSuccess($this, $this->translate(\"%s edited\", \"<b>\".$this->translate($this->information[\"title\"]).\"</b>\"));\n }", "title": "" }, { "docid": "07b6b23414159414a9e54e4d6e38dfa2", "score": "0.6342623", "text": "public function update() {\n\t\t$vars = $this->params['url'];\n\t\t$this->Event->id = $vars['id'];\n\t\t$this->Event->saveField('start', $vars['start']);\n\t\t$this->Event->saveField('end', $vars['end']);\n\t\t$this->Event->saveField('all_day', $vars['allday']);\n\t}", "title": "" }, { "docid": "7d13254e1473666118ea329adaf01d4a", "score": "0.63403916", "text": "public function edit($id)\n {\n $event = Event::Find($id);\n return view('event.editGroupEvent', compact('event'));\n }", "title": "" }, { "docid": "5f3173e9a735c0217422ea0820ca807a", "score": "0.6331137", "text": "public function edit($id)\n {\n $where = array('id' => $id);\n\t\t$event = Event::where($where)->first();\n\t\treturn Response::json($event);\n }", "title": "" }, { "docid": "e84b597e83874e3ef7f43fbddcff59af", "score": "0.6330173", "text": "public function edit($id)\n {\n $event = Event::find($id);\n $datetime = Carbon::createFromFormat('Y-m-d H:i:s', $event->datetime);\n $event->datetime = $datetime->format('d/m/Y H:i');\n\n return view('events.update', ['event' => $event]);\n }", "title": "" }, { "docid": "219453d68f0b612366157544bd1d155b", "score": "0.6327846", "text": "public function edit($id)\n {\n $event = Event::where('user_id',Auth::id())->first();\n return View::make('event.edit')->with('event',$event);\n }", "title": "" }, { "docid": "c2f1ecd91378ddd37d7e3a48efcd5b59", "score": "0.6327306", "text": "public function edit($id)\n {\n $user_id = User::orderBy('id', 'desc')->get();\n $eventEdit = Event::findOrFail($id);\n if ($eventEdit->count() > 0) {\n $events = Event::all();\n return view('backend/MyBackend/Event/index', compact('user_id', 'events', 'eventEdit'));\n } else {\n session()->flash('error', 'Id could not be obtained!');\n return back();\n }\n }", "title": "" }, { "docid": "46aa33907d9455418b635705b91d55a3", "score": "0.63150775", "text": "public function edit($id)\n {\n $event = EventMaster::find($id);\n $event_images = EventImages::where('event_id',$id)->get();\n $events_category = EventCategory::all();\n\n $data = [\n 'event' => $event,\n 'events_categorys' =>$events_category,\n 'event_images' => $event_images,\n 'live_url' => env('LIVE_URL').'images/events/'\n ];\n\n return view('main.event.edit',$data);\n }", "title": "" }, { "docid": "25134248c2c482717bfe584b5ac825c4", "score": "0.6312212", "text": "function admin_edit($id=null) {\n\t\tif (!$id && empty($this->data)) {\n\t\t\t$this->Session->setFlash('Invalid Calendar to edit.');\n\t\t\t$this->redirect(array('action'=>'admin_index'),null,true);\n\t\t} \n\t\tif (!empty($this->data)) {\n\t\t\tif ($this->Calendar->save($this->data)) {\n\t\t\t\t$this->Session->setFlash('The Calendar has been saved.');\n\t\t\t\t$this->redirect(array('action'=>'admin_index'),null,true);\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash('Sorry, the Calendar could not be saved.');\n\t\t\t}\n\t\t}\n\t\tif (empty($this->data)) {\n\t\t\t$this->data = $this->Calendar->read(null,$id);\n\t\t}\n\t\t$tags = $this->Calendar->Tag->find('list');\n\t\t$this->set(compact('tags'));\n\t}", "title": "" }, { "docid": "290162f6eee598845b26949acd1fd53d", "score": "0.6311445", "text": "public function edit();", "title": "" }, { "docid": "21dedded25ac3659939e1c78d26add77", "score": "0.630438", "text": "public function editAction()\n {\n }", "title": "" }, { "docid": "ca22b2e30518c583d20e5325f09ff87c", "score": "0.63016284", "text": "public function editAction()\n {\n }", "title": "" }, { "docid": "1370af346e7f513e7d201019a796d646", "score": "0.62973547", "text": "public function edit($id)\n {\n $event = Event::find($id);\n $formattedDate = new DateTime($event->date);\n $formattedDate = $formattedDate->format('m-d-Y');\n $formattedDate = str_replace('-','/', $formattedDate);\n\n return view('admin.event.edit', compact('event', 'formattedDate'));\n }", "title": "" }, { "docid": "f7fdfb5abee2599f88530ec83f3becce", "score": "0.6285164", "text": "public function create() {\n\t\treturn view ( 'admin.events.create' );\n\t}", "title": "" }, { "docid": "a808418bb1e8e0e070b44af90b062835", "score": "0.62826717", "text": "public function edit($id)\n {\n $event = Event::find($id);\n if(Auth::user()->role == 1){\n return view('dashboard.events.edit',[\n 'event'=> $event,\n ]);\n }\n else{\n return redirect()->route('dashboard.events.index');\n }\n }", "title": "" }, { "docid": "c149b77a0eaa2adaf3aee26c8fe20d45", "score": "0.62760454", "text": "public function edit($id)\n {\n $event = $this->eventRepository->getById($id);\n\n return view('events.edit', compact('event'));\n }", "title": "" }, { "docid": "37db39339ddbe109b44111b8789826ad", "score": "0.62735385", "text": "public function edit($id)\n {\n //\n $event = Event::findOrFail($id);\n $categories = Category::where('type','event')->pluck('name','id');\n return view('admin.events.edit',compact('event','categories'));\n }", "title": "" }, { "docid": "443fe21ba29acb4fe8f56bce154bc4ce", "score": "0.6264895", "text": "public function edit($id)\n {\n $event = Event::find($id);\n\n return view('admin.events.edit')->withEvent($event);\n }", "title": "" }, { "docid": "e86bdd1507d01c87a6f63e69ef613c83", "score": "0.6260055", "text": "public function edit($id)\n {\n $event = Post::find($id);\n $DB_date = date('m-d-Y H:i:s', strtotime($event->eventTime));\n $event->eventTime = $DB_date;\n return view('posts.update')->with('event',$event);\n }", "title": "" }, { "docid": "47597fdc445f5e302b636422127bc979", "score": "0.62567925", "text": "public function edit(Request $request, $id)\n {\n $editData = SmEvent::find($id);\n $events = SmEvent::all();\n\n if (ApiBaseMethod::checkUrl($request->fullUrl())) {\n $data = [];\n $data['editData'] = $editData->toArray();\n $data['events'] = $events->toArray();\n return ApiBaseMethod::sendResponse($data, null);\n }\n return view('backEnd.events.eventsList', compact('editData', 'events'));\n }", "title": "" }, { "docid": "5cb13034ab147bc2fcfad436f957ce04", "score": "0.6249336", "text": "public function edit(Event $event)\n {\n $eventMedias = $event->media;\n $eventImages = $eventMedias->where('type', 'image');\n $eventVideos = $eventMedias->where('type', 'video');\n \n $currentYear = Carbon::now()->year;\n $currentDay = Carbon::now()->day;\n $currentMinute = Carbon::now()->minute;\n $currentHour = Carbon::now()->hour;\n $currentMonth = Carbon::now()->month - 1;\n \n return view('admin.events.event_create', [\n 'event' => $event,\n 'eventImages' => $eventImages,\n 'eventVideos' => $eventVideos,\n 'currentYear' => $currentYear,\n 'currentDay' => $currentDay,\n 'currentMinute' => $currentMinute,\n 'currentHour' => $currentHour,\n 'currentMonth' => $currentMonth,\n ]);\n }", "title": "" }, { "docid": "4c38a34c6245acb628decfa55290c672", "score": "0.62491757", "text": "public function edit($id)\n {\n $event = Event::findOrFail($id);\n\n return view('events.edit',compact('event'));\n }", "title": "" }, { "docid": "9deaf4a4472875373c991b99b890a1b5", "score": "0.6248992", "text": "protected function editAction()\n {\n $this->editAction\n ->setAccess($this, Access::CAN_EDIT)\n ->setOwnerAccess($this)\n ->execute($this, TicketEntity::class, TicketActionEvent::class, NULL, __METHOD__)\n ->render()\n ->with(\n [\n ]\n )\n ->form($this->ticketForm)\n ->end();\n }", "title": "" }, { "docid": "ba9ae181a6b42db46955ab53a324f427", "score": "0.62404984", "text": "public function edit($id)\n {\n $event = $this->events->findOrFail($id);\n\n return view('admin.events.form', compact('event'));\n }", "title": "" }, { "docid": "fa1cb84dacf9af200693369e57edc878", "score": "0.6240337", "text": "public function edit_event_type($id){\t\n\t\t// set the page title\t\t\n\t\t$this->set('title_for_layout', 'Edit Event Type - Work Planner - My PDCA');\t\n\t\t$this->set_event_color();\n\t\tif (!empty($id) && intval($id)){\n\t\t\t// authorize user before action\n\t\t\t$ret_value = $this->auth_action($id);\n\t\t\tif($ret_value == 'pass'){\t\n\t\t\t\t// when the form submitted\n\t\t\t\tif (!empty($this->request->data)){ \n\t\t\t\t\t// validates the form\n\t\t\t\t\t$this->TskEventType->set($this->request->data);\n\t\t\t\t\tif ($this->TskEventType->validates(array('fieldList' => array('name', 'color','status')))) {\n\t\t\t\t\t\t$this->request->data['TskEventType']['modified_by'] = $this->Session->read('USER.Login.id');\t\t\t\t\n\t\t\t\t\t\t$this->request->data['TskEventType']['modified_date'] = $this->Functions->get_current_date();\t\t\t\t\t\n\t\t\t\t\t\t// save the data\n\t\t\t\t\t\tif($this->TskEventType->save($this->request->data['TskEventType'])) {\t\t\t\t\t\n\t\t\t\t\t\t\t// show the msg.\n\t\t\t\t\t\t\t$this->Session->setFlash('<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>Event Type modified successfully', 'default', array('class' => 'alert alert-success'));\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t// show the error msg.\n\t\t\t\t\t\t\t$this->Session->setFlash('<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>Problem in saving the data...', 'default', array('class' => 'alert alert-error'));\t\t\t\t\t\n\t\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t$this->redirect('/tskeventtype/');\t\t\t\t\t\t\n\t\t\t\t\t}\t\n\t\t\t\t}else{\n\t\t\t\t\t$this->request->data = $this->TskEventType->findById($id);\t\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}else if($ret_value == 'fail'){\n\t\t\t\t$this->Session->setFlash('<button type=\"button\" class=\"close\" data-dismiss=\"alert-error\">&times;</button>Invalid Entry', 'default', array('class' => 'alert alert-error'));\t\n\t\t\t\t$this->redirect('/tskeventtype/');\n\t\t\t}else{\n\t\t\t\t$this->Session->setFlash('<button type=\"button\" class=\"close\" data-dismiss=\"alert-error\">&times;</button>Record Deleted: '.$ret_value , 'default', array('class' => 'alert alert-error'));\t\n\t\t\t\t$this->redirect('/tskeventtype/');\n\t\t\t}\n\t\t}else{\n\t\t\t// show the error msg.\n\t\t\t$this->Session->setFlash('<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>Invalid Entry', 'default', array('class' => 'alert alert-error'));\n\t\t\t$this->redirect('/tskeventtype/');\t\t\n\t\t}\t\t\n\t\t\n\t}", "title": "" }, { "docid": "0af25702ce200fb56166df1b3782ee30", "score": "0.62390566", "text": "public function edit($id)\n {\n $event = Event::findOrFail($id);\n\n return view('events.edit', compact('event'));\n }", "title": "" }, { "docid": "6a9947c5432d365f398b6bf8fe959fc0", "score": "0.62297493", "text": "public function edit($id)\n {\n $user = Event::find($id);\n return view('event.edit',compact('user','id'));\n }", "title": "" }, { "docid": "af366d5087a53012fcf5f5048418d6d1", "score": "0.6228352", "text": "public function edit($eventID){\n $this->isAuthorize();\n\n // Get Specific Data\n $userID = $this->request->session()->get('userID');\n $event = Apt_event::where('userID','=',$userID)->where('id','=',$eventID)->firstOrFail();\n return view('appointments.events.edit', compact('event'));\n }", "title": "" }, { "docid": "477efc04a66b884a16394d590c31492a", "score": "0.62279004", "text": "public function edit($id, Request $request)\n\t{\n\t\t$event = Event::with('attributes', 'venuePage', 'creatorPage', 'admins', 'images')->withoutGlobalScope('published')->where('id', $id)->firstOrFail();\n\t\t\n\t\t$this->authorize('edit', $event);\n\n\t\t$timezones = DB::table('timezones')->get();\n\t\t$oldVenuePage = $event->venuePage;\n\t\t$oldCreatorPage = $event->creatorPage;\n\t\t\n\t\t$user = Auth::user();\n\t\t$user->following = $user->following()->paginate(config('common.general_follow_per_load'));\n\t\t$user->followers = $user->followers()->paginate(config('common.general_follow_per_load'));\n\t\t\n\t\t$countries = Country::all();\n\t\t$regions = Region::where('country_id', $event->country_id)->get();\n\t\t$cities = City::where('region_id', $event->region_id)->get();\n\t\t\n\t\t$attributes = Attribute::where('type', 'LIKE', 'event.%')->where('parent_id', NULL)->with('children')->get()->groupBy('type');\n\t\t$event->attributes = $event->attributes->groupBy('type');\n\n\t\t$startsAt = new Carbon($event->getOriginal('starts_at'), \"UTC\");\n\t\t$endsAt = new Carbon($event->getOriginal('ends_at'), \"UTC\");\n\n\t\t$startsAt = $startsAt->timezone($event->timezone);\n\t\t$endsAt = $endsAt->timezone($event->timezone);\n\n\n\t\t// Clear images in session if request is not coming from pre-submitted form\n\t\tif($request->session()->get('errors') == NULL){\n\t\t\tif($request->session()->has('edit_event_images')){\n\t\t\t\t$request->session()->forget('edit_event_images');\n\t\t\t}\n\t\t};\n\n\n\t\tif($event->images && !$request->session()->has('edit_event_images')){\n\t\t\t$images = array('reserved');\n\t\t\tforeach($event->images as $image){\n\t\t\t\t$imageSize = File::size(base_path().'/public/uploads/events/'.$event->id.'/images/'.$image->name);\n\t\t\t\tif($image->name == $event->mainImage()->name){\n\t\t\t\t\t$images[0] = [$image->name, $imageSize, \"is_temp\" => 0];\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$images[] = [$image->name, $imageSize, \"is_temp\" => 0];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($images[0] == 'reserved'){\n\t\t\t\tunset($images[0]);\n\t\t\t}\n\t\t\t$request->session()->put('edit_event_images', $images);\n\t\t}\n\n\n\t\tif($request->old('country') && is_numeric($request->old('country')) && $request->old('country') != $event->country_id){\n\t\t\t$regions = Region::select('id', 'name')->where('country_id', $request->old('country'))->orderBy('name', 'ASC')->get();\n\t\t}\n\n\t\tif($request->old('region') && is_numeric($request->old('region')) && $request->old('region') != $event->region_id){\n\t\t\t$cities = City::select('id', 'name')->where('region_id', $request->old('region'))->orderBy('name', 'ASC')->get();\n\t\t}\n\n\n\n\t\tif($request->old('venue_page') && is_numeric($request->old('venue_page')) && $request->old('venue_page') != $oldVenuePage->id){\n\t\t\t$oldVenuePage = Page::where('id', $request->old('venue_page'))->wherePageType('venue')->select('id','name')->first();\n\t\t}\n\n\t\tif($request->old('creator_page') && is_numeric($request->old('creator_page')) && $request->old('creator_page') != $oldCreatorPage->id){\n\t\t\t$oldCreatorPage = Page::where('id', $request->old('creator_page'))->wherePageType('organization')->select('id','name')->first();\n\t\t}\n\n\t\tif($request->old('admins') && is_array($request->old('admins'))){\n\t\t\t$oldAdmins = User::whereIn('id', $request->old('admins'))->where('id', '<>', Auth::id())->select('id','name', 'username', 'avatar')->get();\n\t\t}\n\t\telse{\n\t\t\t$oldAdmins = $event->admins;\n\t\t}\n\n\t\treturn view('events.edit', compact('event', 'countries','regions', 'cities', 'attributes', 'timezones', 'oldVenuePage', 'oldCreatorPage', 'oldAdmins', 'user', 'startsAt', 'endsAt'));\n\n\t}", "title": "" }, { "docid": "537849ffee0e7edc5e0f60a0e23593ca", "score": "0.6226665", "text": "public function edit11($slug)\n {\n role_or_die('eventsmanager', 'frontend_editing', 'eventsmanager', lang('eventsmanager:notallowed_frontend_editing'));\n\n $slug or show_404();\n\n $event = $this->eventsmanager_m->getBy('slug', $slug);\n if (empty($event)) {\n $this->session->set_flashdata('error', lang('eventsmanager:exists_error'));\n redirect('eventsmanager');\n }\n\n $this->form_validation->set_rules(Events_Validation::rules());\n\n if ($this->form_validation->run()) {\n if ($this->eventsmanager_m->update($event->id, $this->input->post()) == true) {\n $this->session->set_flashdata('success', lang('eventsmanager:update_success'));\n\n $this->input->post('btn-action') == 'save_exit' ? redirect('eventsmanager/' . $event->slug) : redirect('eventsmanager/edit/' . $event->slug);\n } else {\n $this->session->set_flashdata('error', lang('eventsmanager:update_error'));\n }\n }\n\n\n // Load every required stuff for frontend editing\n $this->_load_frontend_form_data($event);\n $this->_load_frontend_form_assets();\n\n $this->template\n ->title($this->module_details['name'], lang('eventsmanager:manage_event_label') . ' : \"' . $event->title . '\"')\n ->set('event', $event)\n ->build('form');\n }", "title": "" }, { "docid": "f6933c2cb76b808547deafba376aa64e", "score": "0.62217504", "text": "function event_field_edit($id=NULL){\n $this->load->model($this->channel_name.'/event_field');\n \n //$date = date('Y-m-d H:i:s');\n\n // Set form\n $rules = $this->event_field->rules;\n $this->form_validation->set_rules($rules);\n \n //Process Form\n if ($this->form_validation->run() == TRUE) {\n $event_id = $this->input->post('event_id');\n // We can continue proccess the form\n $data_post = $this->event_field->array_from_post(array('event_field','event_id')); \n\n $retUrl = $this->input->post('retUrl'); if (!$retUrl) $retUrl = 'cms/event_field';\n \n if ($this->event_field->save($data_post, $id) == TRUE) {\n redirect($retUrl);\n exit;\n } else{\n $this->session->set_flashdata('error','Failed to save new update');\n }\n }\n\n //set page title\n $this->data['page_title'] = $id ? 'Wow Event Field - Edit':'Wow Event Field - New';\n \n //load data to edit\n if ($id)\n $data = $this->event_field->get($id, TRUE);\n else\n $data = $this->event_field->get_new(\n array(\n 'event_field' => '',\n 'event_id' => 1\n )\n );\n \n //set data in form\n $this->data['data'] = $data;\n $this->data['retUrl'] = site_url('cms/wow/event_field');\n \n //get event for dropdown\n $this->load->model($this->channel_name.'/wow_event_m');\n $result = $this->wow_event_m->get();\n $list_event = array();\n foreach ($result as $item){\n $list_event [$item->id] = $item->name;\n }\n $this->data['list_event'] = $list_event;\n \n $this->data['subview'] = 'cms/channels/'.$this->channel_name.'/event_field/edit';\n $this->load->view('cms/_layout_main', $this->data);\n }", "title": "" }, { "docid": "6de6aa9a60b83cbd933010d751ccc659", "score": "0.6217327", "text": "public function edit($id)\n {\n $title = 'اپدیت پست های شما';\n $event = Event::with('user')->find($id);\n\n return view('admin.event.edit', compact('title', 'event'));\n }", "title": "" }, { "docid": "7436239f9ff14efb279b08ab0c53939c", "score": "0.62131286", "text": "function getEditEventForm($id) {\n $event = simplequery(\"SELECT * FROM `event` WHERE `id` = '$id'\");\n if(!$event){\n return;\n }\n $eventname = $event[0]['name'];\n $eventort = $event[0]['ort'];\n $eventdatum = date(\"d.m.Y, H:i\", $event[0]['datum']);\n $veranstalter = $event[0][\"veranstalter\"];\n $addinfos = $event[0][\"addinfos\"];\n $hashtag = $event[0][\"hashtag\"];\n $flickrtag = $event[0][\"flickrtag\"];\n $fb_id = $event[0][\"fb_event_id\"];\n $fb_url = \"\";\n if($fb_id) {\n $fb_url = \"https://www.facebook.com/events/\" . $fb_id . \"/\";\n }\n \n return '\n <img class=\"editeventicon\" src=\"img/edit.png\" alt=\"edit event icon\"><h1>Event bearbeiten</h1>\n <form class=\"neweventform\" action=\"?url=editevent/pr&id=' . $id . '\" method=\"post\">\n \n <h3>Name *</h2>\n <input type=\"text\" name=\"eventname\" value=\"' . $eventname . '\">\n\n <h3>Ort *</h2>\n <input type=\"text\" name=\"eventort\" value=\"' . $eventort . '\">\n\n <h3>Datum *</h2>\n <input type=\"text\" name=\"tag\" value=\"' . date(\"d\", $event[0][\"datum\"]) . '\" maxlength=\"2\" size=\"2\">\n <select name=\"monat\">\n <option '.((date(\"m\", $event[0][\"datum\"])==1)?'selected=\"selected\"':'').'>J&auml;nner</option>\n <option '.((date(\"m\", $event[0][\"datum\"])==2)?'selected=\"selected\"':'').'>Februar</option>\n <option '.((date(\"m\", $event[0][\"datum\"])==3)?'selected=\"selected\"':'').'>M&auml;rz</option>\n <option '.((date(\"m\", $event[0][\"datum\"])==4)?'selected=\"selected\"':'').'>April</option>\n <option '.((date(\"m\", $event[0][\"datum\"])==5)?'selected=\"selected\"':'').'>Mai</option>\n <option '.((date(\"m\", $event[0][\"datum\"])==6)?'selected=\"selected\"':'').'>Juni</option>\n <option '.((date(\"m\", $event[0][\"datum\"])==7)?'selected=\"selected\"':'').'>Juli</option>\n <option '.((date(\"m\", $event[0][\"datum\"])==8)?'selected=\"selected\"':'').'>August</option>\n <option '.((date(\"m\", $event[0][\"datum\"])==9)?'selected=\"selected\"':'').'>September</option>\n <option '.((date(\"m\", $event[0][\"datum\"])==10)?'selected=\"selected\"':'').'>Oktober</option>\n <option '.((date(\"m\", $event[0][\"datum\"])==11)?'selected=\"selected\"':'').'>November</option>\n <option '.((date(\"m\", $event[0][\"datum\"])==12)?'selected=\"selected\"':'').'>Dezember</option>\n </select>\n <input type=\"text\" name=\"jahr\" value=\"' . date(\"Y\", $event[0][\"datum\"]) . '\" title=\"Jahr\" maxlength=\"4\" size=\"4\">\n\n <h3>Uhrzeit *</h3>\n <input type=\"number\" name=\"stunden\" value=\"' . date(\"H\", $event[0][\"datum\"]) . '\" style=\"width:50px;\">:\n <input type=\"number\" name=\"minuten\" value=\"' . date(\"i\", $event[0][\"datum\"]) . '\" style=\"width:50px;\">\n\n <h3>Veranstalter</h3>\n <input type=\"text\" name=\"veranstalter\" value=\"' . $veranstalter . '\">\n <br><br>\n \n <h3>Zus&auml;tzliche Infos:</h3>\n <textarea rows=\"5\" cols=\"70\" name=\"addinfos\">' . $addinfos . '</textarea>\n <br><br>\n \n <p style=\"font-size: 12px;\">Felder mit * m&uuml;ssen ausgef&uuml;llt werden.</p>\n <br>\n \n <h2>Facebook</h2>\n Event-URL: <input type=\"text\" name=\"fb_event_url\" maxlength=\"100\" size=\"70\" value=\"' .$fb_url . '\">\n <br><br><br>\n\n <h2>Twitter</h2>\n Hashtag: #<input type=\"text\" name=\"hashtag\" maxlength=\"20\" value=\"' . $hashtag . '\">\n <br><br><br>\n \n <h2>Flickr</h2>\n \n Flickr-Tag: <input type=\"text\" name=\"flickrtag\" maxlength=\"20\" value=\"' . $flickrtag . '\">\n \n <br>\n <br>\n <br>\n <input class=\"submitbutton\" type=\"submit\" value=\"&Auml;nderungen speichern\">\n \n \n </form>\n \n <button class=\"deletebutton\" onclick=\"checkDelete()\">Event l&ouml;schen</button>\n <script>\n function checkDelete() {\n var r = confirm(\"Bist du dir sicher, dass du das Event löschen willst?\");\n if(r == true)\n this.document.location = \"?url=delete&id=' . $id . '\";\n }\n </script>\n ';\n }", "title": "" }, { "docid": "a98a36b7691b4f1cfea31bfca1c5a702", "score": "0.6211618", "text": "public function edit($id)\n {\n $event = Event::find($id);\n\n return view('event.edit')\n ->with(compact('event'));\n }", "title": "" }, { "docid": "cadb02cd962aedc86713968e4bbb3c2d", "score": "0.6210077", "text": "public function editAction(){\n\n }", "title": "" }, { "docid": "96a3d753a3d4ccd96231bc19d46a8046", "score": "0.6209388", "text": "public function edit($id)\n {\n $dataEdit = Event::find($id);\n\n if( empty($dataEdit) )\n abort(404);\n\n return view('admin.event.edit', compact('dataEdit'));\n }", "title": "" }, { "docid": "769c6848d80bbf5c16234383fe4270fb", "score": "0.62064797", "text": "public function edit($id)\n {\n $eventtype = EventType::findOrFail($id);\n \n return view('eventtypes.edit', compact('eventtype'));\n }", "title": "" }, { "docid": "794c7591c53f24370b1f9a5650d5b6a2", "score": "0.6198455", "text": "public function update($id, Request $request)\n {\n // Validation.\n $validatorRules = $this->validators(true);\n $validator = Validator::make($request->all(), $validatorRules);\n // If validation fails, returns error messages.\n if ($validator->fails()) {\n $errors = $validator->errors();\n return $this->failure($errors);\n }\n // Success message.\n $this->messages[] = 'Event ' . $id . ' edited successfully.';\n // Load the event.\n $event = Event::find($id);\n // Check if the event exists.\n if (!$event) {\n return $this->failure('Event ' . $id . ' not found.', 404);\n }\n // Update the event's fields.\n $event->name = $request->input('name');\n $event->description = $request->input('description');\n // Delete current dates from the event.\n $this->deleteEntity($event, $this->related, 'dates');\n // Store new dates into the event.\n $this->storeEntity($event, 'dates', 'App\\Models\\Date', $request);\n // Delete current prices from the event.\n $this->deleteEntity($event, $this->related, 'prices');\n // Store new prices into the event.\n $this->storeEntity($event, 'prices', 'App\\Models\\Price', $request);\n // Detach current venues from the event.\n $event->venues()->detach();\n // Attach submitted venues to the event.\n $this->attachEntity($event, 'venues', 'Venue', 'App\\Models\\Venue', $request);\n // Detach current people from the event.\n $event->people()->detach();\n // Attach submitted people to the event.\n $this->attachEntity($event, 'people', 'Person', 'App\\Models\\Person', $request);\n // Detach current addresses from the event.\n $this->detachEntity($event, 'event', 'addresses');\n // Delete current addresses from the event.\n $this->deleteEntity($event, $this->related, 'addresses');\n // Store new addresses into the event.\n $this->storeEntity($event, 'addresses', 'App\\Models\\Address', $request);\n // Detach current emails from the event.\n $this->detachEntity($event, 'event', 'emails');\n // Delete current emails from the event.\n $this->deleteEntity($event, $this->related, 'emails');\n // Store new emails into the event.\n $this->storeEntity($event, 'emails', 'App\\Models\\Email', $request);\n // Detach current phones from the event.\n $this->detachEntity($event, 'event', 'phones');\n // Delete current phones from the event.\n $this->deleteEntity($event, $this->related, 'phones');\n // Store new phones into the event.\n $this->storeEntity($event, 'phones', 'App\\Models\\Phone', $request);\n // Detach current taxonomies from the event.\n $event->taxonomies()->detach();\n // Attach submitted taxonomies to the event.\n $this->attachEntity($event, 'taxonomies', 'Taxonomy', 'App\\Models\\Taxonomy', $request);\n // Detach current websites from the event.\n $this->detachEntity($event, 'event', 'websites');\n // Delete current websites from the event.\n $this->deleteEntity($event, $this->related, 'websites');\n // Store new websites into the event.\n $this->storeWebsite($event, $request);\n // Save the event.\n $event->save();\n // Add warning messages to the response.\n if ($this->warning != null) {\n $this->messages[] = $this->warning;\n }\n // Returns the edited event data with response messages.\n return $this->success($this->messages, new EventResource(Event::find($id)), 201);\n }", "title": "" } ]
4b25461dc89257749de586009737432b
Get all others publaction on database
[ { "docid": "d56c595a2b54e2b16198eb7e910c57e9", "score": "0.0", "text": "public function getAllOthers() :array {\n $query='SELECT * FROM Other ORDER BY date DESC;';\n $this->connection->executeQuery($query);\n return $this->connection->getResults();\n }", "title": "" } ]
[ { "docid": "15ce9f672e086ee55f4ba0c8e12baced", "score": "0.6923311", "text": "public function getAllPublished();", "title": "" }, { "docid": "1ceade685ed445e0999fb1ab52eb18af", "score": "0.6862765", "text": "public function getPublishers();", "title": "" }, { "docid": "51ab4684cdc039ab0bf2617b80bbef99", "score": "0.65267843", "text": "public function getAllPublic()\n {\n //Get all public posts\n $dbc = $this->connectToDB();\n $req = $dbc->query('SELECT idpost, title, lead, content, date_creation, post_public, date_planned, \n user_iduser FROM post WHERE post_public=1 AND date_creation <= NOW() ORDER BY date_creation DESC');\n\n return $req->fetchAll();\n }", "title": "" }, { "docid": "e86aa37dfdffdffdfa9ae1ffe573af1e", "score": "0.64206237", "text": "public static function getPublics(){\n\t\t$sql = \"select * from \".self::$tablename.\" where ES_PUBLICO=1\";\n\t\t$query = Executor::doit($sql);\n\t\treturn Model::many($query[0],new BuyProductData());\n\t}", "title": "" }, { "docid": "9a3e0ed942fef6a42a1212a493713baf", "score": "0.6406964", "text": "public function get_all_public_posts() {\r\n // Select All Posts From posts Table Where user_id Column Equals To The Given User id\r\n $result = $result = $this->select('posts', 'privacy', 'public');\r\n\r\n // Init Posts Variable\r\n $posts = array();\r\n\r\n // Append Selected Posts To The posts Array\r\n while ($row = $result->fetch_assoc()) {\r\n array_push($posts, $row);\r\n }\r\n\r\n // Return The posts Array Reversed in Order To Get Them Ordered\r\n return array_reverse($posts);\r\n }", "title": "" }, { "docid": "a7fefc385df1b6efc1a6d4e3b5df66a2", "score": "0.6345661", "text": "function getPublishers() {\n $db = new MyDB();\n $data = array();\n $publisherList = array();\n $publisherAnswer = array();\n $sql = \"SELECT DISTINCT Publisher FROM Journals\";\n $results = $db->query($sql);\n while ($row = $results->fetchArray(SQLITE3_ASSOC)) {\n array_push($publisherList, $row['Publisher']);\n }\n foreach ($publisherList as $publisher) {\n $sql = \"SELECT COUNT(*) as count FROM Journals WHERE Publisher='\".$publisher.\"'\";\n $results = $db->query($sql);\n \n $row = $results->fetchArray();\n $num = $row['count'];\n array_push($data, array('publisher'=>$publisher, 'journals'=>$num));\n }\n \n $answer = array('status'=>'OK', 'msg'=>'Gives the different publishers and journals they represent', 'data'=>$data);\n $db->close();\n echo(json_encode($answer));\n }", "title": "" }, { "docid": "28058ff5899cca412b0ca1df7d887998", "score": "0.63409835", "text": "public function getAllPublished()\n {\n $result = $this->_model->where('is_published', 1)->get();\n\n return $result;\n }", "title": "" }, { "docid": "28058ff5899cca412b0ca1df7d887998", "score": "0.63409835", "text": "public function getAllPublished()\n {\n $result = $this->_model->where('is_published', 1)->get();\n\n return $result;\n }", "title": "" }, { "docid": "e1d76718c9997536637b111dddeddb9c", "score": "0.63225865", "text": "public static function getPublics(){\n\t\t$sql = \"select * from \".self::$tablename.\" where ES_PUBLICO=1\";\n\t\t$query = Executor::doit($sql);\n\t\treturn Model::many($query[0],new StatusData());\n\t}", "title": "" }, { "docid": "1de47302a83e1007b459e86fb4d55a5c", "score": "0.63039196", "text": "public function findPublic(){\n return $this->repo->findAllPublic();\n }", "title": "" }, { "docid": "c259972e436754507a462fc391403f6f", "score": "0.6245103", "text": "public function publishAll();", "title": "" }, { "docid": "389d9978f872e03682271fcb80f6e538", "score": "0.62179124", "text": "public function getAll() {\n $stmtGetAll = pg_query($this->conn, '\n SELECT title, full_name \n FROM books \n JOIN authors ON authors.author_id = books.author_id ');\n\n return pg_fetch_all($stmtGetAll);\n }", "title": "" }, { "docid": "a0b56aff8c5cb04826f83278be747789", "score": "0.6180992", "text": "public function get_todas_noticias_publicadas()\n\t{\n\t\treturn Noticias::where('publicada',1)->orderBy('created_at','DESC')->get();\n\t}", "title": "" }, { "docid": "21b16146c5b29d17f776a29380920bae", "score": "0.61315835", "text": "public function findAllPublished()\n {\n return $this->getArticleRepository()\n ->findBy($this->criteria, array('published' => 'desc'), self::LIMIT);\n }", "title": "" }, { "docid": "42771cdce2d7d2b1253a6d0b9288a7f1", "score": "0.61244035", "text": "public static function listPublicSubscriptions()\n {\n $query = DB::table('polynotice_subs')->where('user_id','=',null)->pluck('event')->toArray();\n\n return $query;\n }", "title": "" }, { "docid": "5044bd6c3a33d2f81fd2490c378e99bd", "score": "0.6083394", "text": "public function queryAll(){\n\t\t$sql = 'SELECT * FROM wiki_articlerevision';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "title": "" }, { "docid": "836efa3d39bba2487dd150ebc632c07e", "score": "0.607994", "text": "public function obtenerNoticiasPublicas() {\n\t\t$fecha = date('Y-m-d');\n\t\t// Obtener materias a visualizar en pantalla\n\t\t$q = Doctrine_Manager::getInstance()->getCurrentConnection()->fetchAssoc(\"\n\t\t\tSELECT DISTINCT N.* \n\t\t\t\tFROM noticias N\t\n\t\t\t\tINNER JOIN noticias_carrera NC \n\t\t\t\t\tON N.id = NC.idnoticia\t\t\t\t\n\t\t\t\tINNER JOIN planes_estudios P \n\t\t\t\t\tON NC.idcarrera = P.idcarrera\t\t\t\t\n\t\t\t\tINNER JOIN alumnos A \n\t\t\t\t\tON P.idplanestudio = A.idplanestudio\t\t\t\t\t\n\t\t\t\tWHERE (A.idpersona = \".$this->getIdpersona().\") AND ('\". $fecha.\"' BETWEEN N.inicio AND N.fin) AND (N.is_active = 1) AND (N.privada = 0)\n\t\t\t\tORDER BY N.orden ASC, N.id DESC\"\n\t\t);\n\t\t\n\t\treturn $q; \n\t}", "title": "" }, { "docid": "b81892f2faf203046a646ec99f43154e", "score": "0.6020196", "text": "public function getPublications($parameters) {\n $this->init($parameters['id']);\n $publicationDao = new publicationDao($this->db,$this->idUtilisateur,$this->entrepriseId);\n $publicationList = $publicationDao->getAllPublications($parameters);\n return $publicationList;\n }", "title": "" }, { "docid": "dd18f46c29a0b62ef5a8d3f707e8aabc", "score": "0.60009366", "text": "public function getall();", "title": "" }, { "docid": "7c755c45579418843b83a4aae8ff5e03", "score": "0.5969556", "text": "public function getPublicPosts(){\n $this->db->query(\"SELECT *, posts.id as postId, users.id as userId FROM posts INNER JOIN users ON posts.user_id = users.id WHERE visibility = 'Public' ORDER BY posts.created_at DESC;\");\n\n $results = $this->db->resultset();\n\n return $results;\n }", "title": "" }, { "docid": "2ff030a1464b6be0ee1985cd8eda3472", "score": "0.5940059", "text": "public function getPublisher();", "title": "" }, { "docid": "6043eaf1b12a5786ff35ecb4ae643ceb", "score": "0.5919197", "text": "function get_all_user_published_posts(){\n\t\t$result = query(\"SELECT * FROM posts WHERE user_id=\".loggedInUserId().\" AND post_status='published'\");\n\t\tconfirmQuery($result);\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "73c6f3b2eb53250205322240eb133bee", "score": "0.59079635", "text": "function getPublishedPosts()\r\n{\r\n // SELECT * FROM posts WHERE published = 1\r\n global $conn;\r\n $sql = \"SELECT p.*, u.user_name FROM posts AS p JOIN users AS u ON p.user_id=u.id WHERE p.published = ?\";\r\n \r\n $fetcher = execQuery($sql, [\"published\" => 1 ]);\r\n $payload = $fetcher->get_result()->fetch_all(MYSQLI_ASSOC);\r\n return $payload;\r\n}", "title": "" }, { "docid": "47a388774884dd9cbdb88360dd9a98b8", "score": "0.5906265", "text": "public static function getAllOnDownloads() {\n\t\t//$select = new Select(\"describe\");\n\t\t//$select->order(\"date\", false);\n\t\t$select = new Select(self::$db);\n\t\t$select->from(self::$table,\"*\");\n\t\t//$select->from(self::$table, \"*\");\n\t\t\t//->where(\"`id` = \".self::$db->getSQ(), array($id));\n\t\t$downloads = ObjectDB::buildMultiple(__CLASS__, self::$db->select($select));\n\t\t//$downloads ='hihihihihihuihih';\n\t\t//$downloads = ObjectDB::addSubObject($downloads, \"id\");\n\t\t//print_r($downloads);\n\t\treturn $downloads;\n\t}", "title": "" }, { "docid": "699874dd863cbcf5c41fa6fc8d1e0d27", "score": "0.58990514", "text": "public function getPublicPages() {\n $result = [];\n $sql = \"SELECT t.topic_id, tt.lng_id\n FROM %s t\n INNER JOIN %s tt\n ON t.topic_id = tt.topic_id\n WHERE t.published_from <= %d\n ORDER BY t.topic_id, tt.lng_id\";\n $parameters = [\n $this->databaseGetTableName('topic_public'),\n $this->databaseGetTableName('topic_public_trans'),\n time()\n ];\n $this->_total = 0;\n if ($res = $this->databaseQueryFmt($sql, $parameters)) {\n while ($row = $res->fetchRow(DB_FETCHMODE_ASSOC)) {\n $this->_total++;\n if (!isset($result[$row['topic_id']])) {\n $result[$row['topic_id']] = [];\n }\n $result[$row['topic_id']][] = $row['lng_id'];\n }\n }\n return $result;\n }", "title": "" }, { "docid": "bee1f242a778eb8d430e5eaff27a843f", "score": "0.5895617", "text": "abstract function get_all ();", "title": "" }, { "docid": "f384a14b812a737ba7675b325922c543", "score": "0.5883779", "text": "public function publishedPages()\n {\n return $this->hasMany('App\\Page')->where('pages.publish', 'Y');\n }", "title": "" }, { "docid": "2b6124c60242a7657578cdd4356197e5", "score": "0.5882331", "text": "public function get_list()\n {\n $ret = DB::select()->\n from(self::$_table_name)->\n // where('published', '>=', $date->format('Y-m-d H:i:s'))->\n // order_by('published', 'desc')->\n // limit($limit)->\n // offset($offset)->\n execute();\n\n return $ret;\n }", "title": "" }, { "docid": "b24ec557257c5b754dbf0309ba1e2662", "score": "0.58742917", "text": "public function all() {\r\n $sql = $this->db->prepare($this->persistence);\r\n $sql->execute();\r\n return $sql->fetchAll(PDO::FETCH_OBJ);\r\n }", "title": "" }, { "docid": "6f2bd4d7c7c399c45e00686f44c55485", "score": "0.5870127", "text": "public function forgetAll();", "title": "" }, { "docid": "c54eeb5bb2165ab794029f99e38943e1", "score": "0.5859944", "text": "public function index()\n {\n $publisher = $this->publisherContracts->getAll();\n return $publisher;\n\n }", "title": "" }, { "docid": "fc2bad41ef2b8062527a8eddc34208d2", "score": "0.58586764", "text": "public static function getAll();", "title": "" }, { "docid": "fc2bad41ef2b8062527a8eddc34208d2", "score": "0.58586764", "text": "public static function getAll();", "title": "" }, { "docid": "fc2bad41ef2b8062527a8eddc34208d2", "score": "0.58586764", "text": "public static function getAll();", "title": "" }, { "docid": "b354c0d08c043f433a4e475f48f0e10a", "score": "0.58581996", "text": "public function getAll() {}", "title": "" }, { "docid": "b354c0d08c043f433a4e475f48f0e10a", "score": "0.5856849", "text": "public function getAll() {}", "title": "" }, { "docid": "b354c0d08c043f433a4e475f48f0e10a", "score": "0.58568174", "text": "public function getAll() {}", "title": "" }, { "docid": "b354c0d08c043f433a4e475f48f0e10a", "score": "0.58568174", "text": "public function getAll() {}", "title": "" }, { "docid": "fadb06cf1d2129843301d933e95470d5", "score": "0.5851141", "text": "function viewAll(){\n\t\t$coll = \"\";\n\t\t$dBase = \"\";\n\t\t$username = \"\";\n\t\t$password = \"\";\n\t\t$host = \"\";\n\t\t$port = \"\";\n\n\t\t$conn = new MongoClient(\"mongodb://${username}:${password}@{$host}:{$port}\");\n\t\t$db = $conn->$dBase;\n\t\t$collection = $conn->$db->$coll;\n\n\t\t$cursor = $collection->find();\n\t\t$arr = array();\n\t\twhile ($cursor->hasNext())\n\t\t{\n \t\tarray_push($arr, $cursor->getNext());\n\t\t}return $arr;\n\t\t$closed = $conn->close();\n\t}", "title": "" }, { "docid": "a654036aa8026a0acbb826ec43ccb6f0", "score": "0.583782", "text": "public function all(){\n $all = mysql_query(\"SELECT galleries.id_user, galleries.image, id_gallery, uploaded_at, qty_votes, sum_votes, average, users.vote FROM galleries INNER JOIN users ON(users.id_user = galleries.id_user )\"); \n \n //-- All data is stored in array. That array is used in personal-gallery\n while($row = mysql_fetch_array($all)){\n $this->all[] = $row;\n }\n\n return $this->all; \n }", "title": "" }, { "docid": "dc520e13df760e24885db7263205d2fb", "score": "0.5835807", "text": "function getAllEntries()\n{\n\t$sql = '\n\t\tSELECT * FROM dw_news\n\t\tORDER BY create_datetime DESC\n\t';\n\treturn \\util\\mysql\\query($sql, true);\n}", "title": "" }, { "docid": "5804cfd31e6dff38e8424f5a49416083", "score": "0.5835767", "text": "public static function getAll(){\n \n try {\n $db = static::getDB(); //function of parent\n \n $statement = $db->query('SELECT id, title, content FROM posts\n ORDER BY created_at');\n $results = $statement->fetchAll(PDO::FETCH_ASSOC);\n \n return $results;\n \n } catch (PDOException $e){\n echo $e->getMessage();\n }\n }", "title": "" }, { "docid": "8c43951e350150d028fb2977cfb7c0a8", "score": "0.58314174", "text": "public function publications()\n {\n return $this->hasMany('App\\Publication');\n }", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.58212024", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.58212024", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.58212024", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.58212024", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.58212024", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.58212024", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.58212024", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.58212024", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.58212024", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.58212024", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.58212024", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.58212024", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.58212024", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.58212024", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.58212024", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.58212024", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.58212024", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.58212024", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.58212024", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.58212024", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.58212024", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.58212024", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.58212024", "text": "public function getAll();", "title": "" }, { "docid": "17d19d6e3c9db4e59f793e663b2bb1e5", "score": "0.58085185", "text": "public function index()\n {\n return PackageListResource::collection(\n Package::query()->withoutGlobalScope('publish')->latest()->paginate()\n );\n }", "title": "" }, { "docid": "155dc13bc16f338ef9ea64cdebc584e8", "score": "0.5802499", "text": "public function getPublicKeys();", "title": "" }, { "docid": "5db93848f0a3276ebdc868582b7fed10", "score": "0.5796473", "text": "public function getFeedReleases();", "title": "" }, { "docid": "13c3fa5909355df88ff141566c2ae24d", "score": "0.57860273", "text": "public function getPublishingPrinciples();", "title": "" }, { "docid": "09c3cbfec20f5706c822721987d6befd", "score": "0.57591784", "text": "public function getAll() {\n\t\treturn $this->boatroom_repo->all();\n\t}", "title": "" }, { "docid": "2b9909b097910294025ac6164d78197a", "score": "0.5753525", "text": "abstract function getAll();", "title": "" }, { "docid": "f285df9c71737badcf066c8ef22cb7ee", "score": "0.575125", "text": "public function findAllOfficialDistributions() {}", "title": "" }, { "docid": "b8012f03ef8ad517b36b8f58e5978561", "score": "0.5745837", "text": "public static function getAll() {\r\n\t\t// TODO: this is example of method selecting multi rec from table\r\n\t\t$db = new DB ();\r\n\t\t$sql = \"SELECT * \";\r\n\t\t$sql .= \"FROM \" . DB_SCHEMA . \".prawa_modul \";\r\n\t\t$db->query ( $sql );\r\n\t\treturn new Collection ( $db, self::get () );\r\n\t}", "title": "" }, { "docid": "2ab0c106e5c57ac2a141b9f852059c9f", "score": "0.5745534", "text": "public function pubFiles(){\n return $this->hasMany('App\\PubFile');\n }", "title": "" }, { "docid": "4d7d359faf7a7ca8aaf909a05b531839", "score": "0.57272637", "text": "public function getAllPostInPublished()\n {\n return $this->getAllPost(\" WHERE is_published = \" . IS_PUBLISHED);\n }", "title": "" }, { "docid": "16a9e21f6f92d9bdebaa60e717a6d404", "score": "0.5723266", "text": "public function getAll() {\n// return $this->repository->getAll();\n }", "title": "" }, { "docid": "bb5b24b65808fe03a6dd71491cb73b40", "score": "0.57164645", "text": "function getUnpublishedPosts()\r\n{\r\n // SELECT * FROM posts WHERE published = 1\r\n global $conn;\r\n $sql = \"SELECT p.*, u.user_name FROM posts AS p JOIN users AS u ON p.user_id=u.id WHERE p.published = ?\";\r\n \r\n $fetcher = execQuery($sql, [\"published\" => 0 ]);\r\n $payload = $fetcher->get_result()->fetch_all(MYSQLI_ASSOC);\r\n return $payload;\r\n}", "title": "" }, { "docid": "a9e761e7f8b6f705a69abc467cfca8ae", "score": "0.57098407", "text": "function getAllPublishedPosts($user) {\n $em = GetEntityManager();\n $q = $em->createQuery(\"SELECT p.post_title, p.post_type FROM MyPost p JOIN p.author a WHERE p.post_status = 'publish' AND a.ID = {$user->getID()}\");\n return $q->getResult();\n }", "title": "" }, { "docid": "75ed1f1d145db2898325ab682b95105e", "score": "0.5707751", "text": "function readAll() {\n\t\tglobal $wpdb;\n\t\tglobal $blog_id;\n\t\t$read = \"SELECT * FROM {$this->table_name} WHERE blog_id=$blog_id ORDER BY ord ASC\";\n\t\t$result = $wpdb->get_results($read);\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "ab17e35998e96f3eab39495d9aff46ee", "score": "0.57051414", "text": "public function getAllPosts() {\n\t\t$stmt = $this->db->prepare('SELECT * FROM post ORDER BY publishedAt DESC');\n\t\t$stmt->execute();\n\t\treturn $stmt->fetchAll(PDO::FETCH_ASSOC);\n\t}", "title": "" }, { "docid": "cdbe266a13b63b9768bc86c8d235eaa6", "score": "0.5704432", "text": "public function get_all($which)\n {\n // get data from the database\n $data = $this->db->get_where('collections',$which);\n \n // return all records\n return $data->result_array();\n }", "title": "" }, { "docid": "f147e22206d8c8d2fc5506d5a5eeb430", "score": "0.5701614", "text": "function find_all_subjects($public = true){\n\t\tglobal $connection;\n\t\t//WHERE visible = 1\n\t\t$query = \"SELECT * \";\n\t\t$query .= \"FROM subjects \";\n\t\tif($public){\n\t\t $query .= \"WHERE visible = 1 \";\n\t\t}\n\t\t$query .= \"ORDER BY position ASC\";\n\t\t$subject_set = mysqli_query($connection, $query);\n\t\tconfirm_query($subject_set);\n\t\treturn $subject_set; \n\t}", "title": "" }, { "docid": "7aceda17fea94adbdbb9ccc8ce4537dc", "score": "0.5701169", "text": "public function queryAll(){\n\t\t$sql = 'SELECT * FROM reclamation';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "title": "" }, { "docid": "aed81afdb008151ed2873581c0020254", "score": "0.5694906", "text": "public function queryAll() {\n $sql = 'SELECT * FROM personaspreguntas';\n $sqlQuery = new SqlQuery($sql);\n return $this->getList($sqlQuery);\n }", "title": "" }, { "docid": "ce9888c3694f7680088d6bd87c196314", "score": "0.5691793", "text": "function get_post_by_subscribe(){\n$posts = array();\n$subscribe = \"SELECT subscribed FROM subscribe WHERE subscriber = '\" . $_SESSION['id'] . \"'\";\n$query = mysql_query(\"SELECT * FROM posts WHERE (post_owner IN (\".$subscribe.\") OR post_owner = '\" . $_SESSION['id'] . \"') ORDER BY id DESC\");\n$num=mysql_numrows($query);\n$i=0;\nwhile ($i < $num) {\n$post['content'] = mysql_result($query,$i,\"content\");\n$post['date'] = mysql_result($query,$i,\"date\");\n$post['info'] = get_otheruser_info(mysql_result($query, $i, \"post_owner\"));\narray_push($posts, $post);\n$i++;\n}\nreturn $posts;\n}", "title": "" }, { "docid": "d810b418378ffff0ae7b82e100e6cc9d", "score": "0.5667623", "text": "private function getAll()\n {\n return $this->db->query_DB(\"SELECT A.Title, A.Content, A.Posted, A.Expires, O.Symbol\n FROM Announcements A, Orgs O\n WHERE A.Org_ID = O.ID\n AND A.Expires >= '\" . date('Y-m-d') . \"'\n ORDER BY A.Expires\n \");\n }", "title": "" }, { "docid": "2bc29a28750037074881dedb53a5185e", "score": "0.5666708", "text": "public static function loadAllPublished(): Paginator\n {\n return static::with([\n 'user' => function (BelongsTo $query) {\n $query->select('id', 'name');\n },\n ])\n ->latest()\n ->published()\n ->paginate();\n }", "title": "" }, { "docid": "db4ef1208c81be753199ac2393ca90ab", "score": "0.5664728", "text": "public function list_all_subscribed(){\n return $this->list_subscribed('*');\n }", "title": "" }, { "docid": "9d3b3012f60fc7b026996366496b4f79", "score": "0.5664686", "text": "public function readAll()\n {\n\n $query = \"SELECT post.id, post.title, post.chapo, post.content, post.author, post.date, post.date_maj, user.username as authoruser\n FROM post\n INNER JOIN user ON post.author = user.id \n order by post.date_maj desc\";\n\n $response = self::$bdd->prepare($query);\n $response->execute();\n $allposts = $response->fetchAll();\n $objects = $this->arrayToObject($allposts, 'post');\n \n return $objects;\n }", "title": "" }, { "docid": "2006015b14273f27ef64105e2a2081a5", "score": "0.56510085", "text": "function get_distribuidores(){\n\t\tglobal $wpdb;\n\t\treturn $wpdb->get_results(\n\t\t\t\"SELECT ID,\n\t\t\t\t\tpost_title AS title,\n\t\t\t\t\tmeta_value AS meta\n\t\t\t\tFROM wp_posts\n\t\t\t\t\tINNER JOIN wp_postmeta\n\t\t\t\t\t\tON ID = post_id\n\t\t\t\t\t\tAND meta_key = '_distribuidor_info'\n\t\t\t\t\t\t\tWHERE post_type = 'distribuidor'\n\t\t\t\t\t\t\tAND post_status = 'publish';\", OBJECT\n\t\t);\n\t}", "title": "" }, { "docid": "aa1e9e42cf55403b386c15c165567483", "score": "0.5649679", "text": "public static function getAll()\n {\n }", "title": "" }, { "docid": "6529f3a0ca4be4a44050e2dd6e5224b9", "score": "0.5647344", "text": "public function queryAll(){\n\t\t$sql = 'SELECT * FROM rapor_fisik';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "title": "" }, { "docid": "74e7c800c96aea874f2dfbf4f77cfac3", "score": "0.56447315", "text": "public function getAll(){\n\t\treturn parent::getAll();\n\t}", "title": "" }, { "docid": "c9e37446e20fd4ce91245ee67a9cb1b4", "score": "0.5641122", "text": "public function allsubs(){\n\n\t$sql=$this->db->query(\"select * from subscription as s join user as u on s.user_id=u.user_id where u.role='subscriber' order by s.sub_id Desc \");\n\t$result=$sql->result_array();\n\treturn $result;\n }", "title": "" }, { "docid": "b28f1dde5431d8acf17c8e54bae953ff", "score": "0.5640871", "text": "function listAll() {\n \treturn common_stream('game:listall', array(\"Game\", \"_listAll\"), null, 3600 * 24);\n }", "title": "" }, { "docid": "56306ba0f59878c3b2f8953afe8659b9", "score": "0.56377536", "text": "public function getPublications()\n {\n if (array_key_exists(\"publications\", $this->_propDict)) {\n return $this->_propDict[\"publications\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "6498bd91365a589c71e75c543c982b1b", "score": "0.56329066", "text": "public function getAllPosts()\n {\n //Get all public posts\n $dbc = $this->connectToDB();\n $req = $dbc->query('SELECT idpost, title, lead, content, date_creation, post_public, date_planned, \n user_iduser FROM post WHERE post_public=1 ORDER BY date_creation DESC');\n\n return $req->fetchAll();\n }", "title": "" }, { "docid": "4d4cbe6d86525aa55008457f69de73e7", "score": "0.563253", "text": "public function getAll(): Collection;", "title": "" }, { "docid": "4816c138ece7cf53749f95ad037d4785", "score": "0.56127894", "text": "public function all()\n {\n \treturn $this->InterventionRepo->all();\n }", "title": "" }, { "docid": "618e956c8c377a6d0a609efd010b9790", "score": "0.56090313", "text": "public function getAll() {\r\n $statement = \"\r\n SELECT * FROM bookauthor;\r\n \";\r\n\r\n try {\r\n $statement = $this->db->query($statement);\r\n $result = $statement->fetchAll(\\PDO::FETCH_ASSOC);\r\n return $result;\r\n }\r\n catch(\\PDOException $e) {\r\n exit($e->getMessage());\r\n }\r\n }", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "4bac3188558c3acab53dd8d5175c1d4e", "score": "0.0", "text": "public function show($id)\n {\n //\n }", "title": "" } ]
[ { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.8190437", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "e5152a75698da8d87238a93648112fcf", "score": "0.72897154", "text": "function display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->fetch($resource_name, $cache_id, $compile_id, true);\n }", "title": "" }, { "docid": "03308cdf1f3eb0c47d8f3059a2a11231", "score": "0.7062654", "text": "public function show(Resource $resource)\n {\n app('App\\Http\\Controllers\\ViewsController')->resourceView($resource);\n\n return view('resources.show', compact('resource'));\n }", "title": "" }, { "docid": "d7820004a578ddc16d57dff08d715ef0", "score": "0.70187664", "text": "public function showResource()\n\t{\n\t\treturn view('resources.list')->with('resources', Resources::all());\n\t}", "title": "" }, { "docid": "426f9c78118dbbe009edc89fcf8571df", "score": "0.6748524", "text": "public function show(Resource $resource)\n {\n //\n\t\t\t\treturn response()->json($resource);\n }", "title": "" }, { "docid": "921410ad408e73391c76fba66fc4ab57", "score": "0.65274835", "text": "function display() {\n global $CFG, $THEME, $USER;\n\n require_once($CFG->libdir.'/filelib.php');\n\n /// Set up generic stuff first, including checking for access\n parent::display();\n\n /// Set up some shorthand variables\n $cm = $this->cm;\n $course = $this->course;\n $resource = $this->resource;\n\n /// Fetch parameters\n $inpopup = optional_param('inpopup', 0, PARAM_BOOL);\n $page = optional_param('page', 0, PARAM_INT);\n $frameset= optional_param('frameset', '', PARAM_ALPHA);\n\n /// Init some variables\n $errorcode = 0;\n $buttontext = 0;\n $querystring = '';\n $resourcetype = '';\n $mimetype = mimeinfo(\"type\", $resource->reference);\n $pagetitle = strip_tags($course->shortname.': '.format_string($resource->name));\n\n $formatoptions = new object();\n $formatoptions->noclean = true;\n\n /// Cache this per request\n static $items;\n\n /// Check for errors\n $errorcode = $this->check4errors($resource->reference, $course, $resource);\n\n /// If there are any error, show it instead of the resource page\n if ($errorcode) {\n if (!has_capability('moodle/course:activityvisibility', get_context_instance(CONTEXT_COURSE, $course->id))) {\n /// Resource not available page\n $errortext = get_string('resourcenotavailable','resource');\n } else {\n /// Depending of the error, show different messages and pages\n if ($errorcode ==1) {\n $errortext = get_string('invalidfiletype','error', $resource->reference);\n } else if ($errorcode == 2) {\n $errortext = get_string('filenotfound','error', $resource->reference);\n } else if ($errorcode == 3) {\n $errortext = get_string('packagenotdeplyed','resource');\n } else if ($errorcode == 4) {\n $errortext = get_string('packagechanged','resource');\n } else if ($errorcode == 5) {\n $errortext = get_string('packagenotdeplyed','resource'); // no button though since from repository.\n }\n }\n /// Display the error and exit\n if ($inpopup) {\n print_header($pagetitle, $course->fullname.' : '.$resource->name);\n } else {\n print_header($pagetitle, $course->fullname, \"$this->navigation \".format_string($resource->name), \"\", \"\", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm));\n }\n print_simple_box_start('center', '60%');\n echo '<p align=\"center\">'.$errortext.'</p>';\n /// If errors were 3 or 4 and isteacheredit(), show the deploy button\n if (has_capability('moodle/course:manageactivities', get_context_instance(CONTEXT_COURSE, $course->id)) && ($errorcode == 3 || $errorcode == 4)) {\n $link = 'type/ims/deploy.php';\n $options['courseid'] = $course->id;\n $options['cmid'] = $cm->id;\n $options['file'] = $resource->reference;\n $options['sesskey'] = $USER->sesskey;\n $options['inpopup'] = $inpopup;\n if ($errorcode == 3) {\n $label = get_string ('deploy', 'resource');\n } else if ($errorcode == 4) {\n $label = get_string ('redeploy', 'resource');\n }\n $method='post';\n /// Let's go with the button\n echo '<center>';\n print_single_button($link, $options, $label, $method);\n echo '</center>';\n }\n print_simple_box_end();\n /// Close button if inpopup\n if ($inpopup) {\n close_window_button();\n }\n\n print_footer();\n exit;\n }\n\n /// Load serialized IMS CP index to memory only once.\n if (empty($items)) {\n if (!$this->isrepository) {\n $resourcedir = $CFG->dataroot.'/'.$course->id.'/'.$CFG->moddata.'/resource/'.$resource->id;\n }\n else {\n $resourcedir = $CFG->repository . $resource->reference;\n }\n if (!$items = ims_load_serialized_file($resourcedir.'/moodle_inx.ser')) {\n error (get_string('errorreadingfile', 'error', 'moodle_inx.ser'));\n }\n }\n\n /// Check whether this is supposed to be a popup, but was called directly\n\n if (empty($frameset) && $resource->popup && !$inpopup) { /// Make a page and a pop-up window\n\n print_header($pagetitle, $course->fullname, \"$this->navigation \".format_string($resource->name), \"\", \"\", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm));\n\n echo \"\\n<script type=\\\"text/javascript\\\">\";\n echo \"\\n<!--\\n\";\n echo \"openpopup('/mod/resource/view.php?inpopup=true&id={$cm->id}','resource{$resource->id}','{$resource->popup}');\\n\";\n echo \"\\n-->\\n\";\n echo '</script>';\n\n if (trim(strip_tags($resource->summary))) {\n print_simple_box(format_text($resource->summary, FORMAT_MOODLE, $formatoptions), \"center\");\n }\n\n $link = \"<a href=\\\"$CFG->wwwroot/mod/resource/view.php?inpopup=true&amp;id={$cm->id}\\\" target=\\\"resource{$resource->id}\\\" onclick=\\\"return openpopup('/mod/resource/view.php?inpopup=true&amp;id={$cm->id}', 'resource{$resource->id}','{$resource->popup}');\\\">\".format_string($resource->name,true).\"</a>\";\n\n echo \"<p>&nbsp;</p>\";\n echo '<p align=\"center\">';\n print_string('popupresource', 'resource');\n echo '<br />';\n print_string('popupresourcelink', 'resource', $link);\n echo \"</p>\";\n\n print_footer($course);\n exit;\n }\n\n\n /// No frames or framesets anymore, except iframe. in print_ims, iframe filled.\n /// needs callback to this file to display table of contents in the iframe so\n /// $frameset = 'toc' leads to output of toc and blank or 'ims' produces the\n /// iframe.\n if (empty($frameset) || $frameset=='ims') {\n\n /// Conditional argument to pass to IMS JavaScript. Need to be global to retrieve it from our custom javascript! :-(\n global $jsarg;\n $jsarg = 'false';\n if (!empty($this->parameters->navigationmenu)) {\n $jsarg = 'true';\n }\n /// Define $CFG->javascript to use our custom javascript. Save the original one to add it from ours. Global too! :-(\n global $standard_javascript;\n $standard_javascript = $CFG->javascript; // Save original javascript file\n $CFG->javascript = $CFG->dirroot.'/mod/resource/type/ims/javascript.php'; //Use our custom IMS javascript code\n\n /// moodle header\n if ($resource->popup) {\n //print_header($pagetitle, $course->fullname.' : '.$resource->name);\n print_header();\n } else {\n print_header($pagetitle, $course->fullname, \"$this->navigation \".format_string($resource->name), \"\", \"\", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm, \"parent\"));\n }\n /// content - this produces everything else\n $this->print_ims($cm, $course, $items, $resource, $page);\n /// Moodle footer is back! Now using the DOMContentLoaded event (see resize.js) to trigger the resize\n /// no Moodle footer (because we cannot insert there the resize script).\n /// echo \"</div></div><script type=\\\"text/javascript\\\">resizeiframe($jsarg);</script></body></html>\";\n /// print_footer();\n echo \"</div></div></body></html>\";\n\n /// log it.\n add_to_log($course->id, \"resource\", \"view\", \"view.php?id={$cm->id}\", $resource->id, $cm->id);\n exit;\n }\n\n if ($frameset == 'toc') {\n print_header();\n $this->print_toc($items, $resource, $page);\n echo '</div></div></body></html>';\n exit;\n }\n }", "title": "" }, { "docid": "b08b6bb501370e4c42f069ea734388a0", "score": "0.64993453", "text": "public function get($resource);", "title": "" }, { "docid": "dd518b422828ccdfc7b932a34e62225d", "score": "0.6273607", "text": "public function show(Resource $resource)\n {\n return response()->json($resource);\n \n }", "title": "" }, { "docid": "51a1c3499847de81938cf22e3e336bf2", "score": "0.62220424", "text": "public function getAction()\n {\n \t/**\n \t * @todo handle error cases and return an error, return valid users ondly\n \t */\n \t$id = $this->_request->getParam('id');\n \t$result = $this->_table->find($id);\n \t$this->view->resource = $result->current();\n }", "title": "" }, { "docid": "04d35d47081d101fff17d30acb1f2178", "score": "0.6141969", "text": "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(SugarAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "title": "" }, { "docid": "556fa9c7c8b0bbfca3848834f795e687", "score": "0.6119021", "text": "public function displayAction($id)\n { }", "title": "" }, { "docid": "0243c17e457a131b89a485445f1cee26", "score": "0.60701436", "text": "public function show()\n {\n $this->getView($this->view_name);\n }", "title": "" }, { "docid": "f0d6bc8f87110dac3699808a11a93b8f", "score": "0.6056663", "text": "public function render()\n {\n $this->bindResource($this->resource);\n return parent::render();\n }", "title": "" }, { "docid": "02d611037299aac573636734fd64f517", "score": "0.59945476", "text": "public function displayAction()\n {\n // set filters and validators for GET input\n $filters = array(\n 'id' => array('HtmlEntities', 'StripTags', 'StringTrim')\n ); \n $validators = array(\n 'id' => array('NotEmpty', 'Int')\n );\n $input = new Zend_Filter_Input($filters, $validators);\n $input->setData($this->getRequest()->getParams());\n\n // test if input is valid\n // retrieve requested record\n // attach to view\n if ($input->isValid()) {\n $q = Doctrine_Query::create()\n ->from('Tripjacks_Model_League l')\n ->where('l.leagueid = ?', $input->id);\n $result = $q->fetchArray();\n if (count($result) == 1) {\n $this->view->league = $result[0]; \n } else {\n throw new Zend_Controller_Action_Exception('Page not found', 404); \n }\n } else {\n throw new Zend_Controller_Action_Exception('Invalid input'); \n }\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5954321", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "7b8f897ba2297696b69f6d8202444107", "score": "0.59492433", "text": "public function displayAction()\n {\n $params = $this->dispatcher->getParams();\n if (isset($params[0]) && $firewall = Firewalls::findFirst(intval($params[0]) ? $params[0] : ['name=:name:', 'bind' => ['name' => $params[0]]])) {\n echo Las::display($firewall->name);\n }\n }", "title": "" }, { "docid": "89b549ed67b4702bbd94de618931239c", "score": "0.594717", "text": "public function show()\n {\n echo $this->render();\n }", "title": "" }, { "docid": "d8bcb4a6a484fbd4595bf60c13751c5f", "score": "0.5916333", "text": "public function display()\n {\n $this->_getAdapter()->display();\n }", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59036547", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59036547", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "4e4b4802386aefba7de0e06d94dac1a8", "score": "0.5861693", "text": "public function viewResources($resourceid='')\n {\n $resourceid = db::escapechars($resourceid);\n \n $sql = \"SELECT * FROM kidschurchresources ORDER BY resourceName ASC\";\n $resources = db::returnallrows($sql);\n if(count($resources) > 0){\n $resourceOutput = \"<table class=\\\"memberTable\\\"><tr><th>ID</th><th>Name</th><th>Description</th><th>Type</th><th>Quantity</th><th>Task</th></tr>\";\n foreach($resources as $resource){\n if($resource['resourceID'] == $resourceid){\n $resourceOutput .= \"<tr class=\\\"highlight\\\">\";\n }\n else{\n $resourceOutput .= \"<tr>\";\n }\n $resourceOutput .= \"<td>\".$resource['resourceID'].\"</td>\";\n $resourceOutput .= \"<td>\".$resource['resourceName'].\"</td>\";\n $resourceOutput .= \"<td>\".$resource['resourceDescription'].\"</td>\";\n $resourceOutput .= \"<td>\".$resource['resourceType'].\"</td>\";\n $resourceOutput .= \"<td>\".$resource['resourceQuantity'].\"</td>\";\n $resourceOutput .= \"<td> \n <a href=\\\"index.php?mid=431&action=edit&resourceID=\".$resource['resourceID'].\"\\\" class=\\\"runbutton\\\">Edit</a>\n <a href=\\\"index.php?mid=430&action=remove&resourceID=\".$resource['resourceID'].\"\\\" class=\\\"delbutton\\\">Remove</a>\n </td>\";\n $resourceOutput .= \"<tr>\";\n }\n $resourceOutput .= \"</table>\";\n }\n else{\n $resourceOutput = \"<p>There are no resources stored at present.</p>\";\n }\n return $resourceOutput;\n }", "title": "" }, { "docid": "8c23114005d84f0741705b7da9ef9695", "score": "0.58511454", "text": "public function list_display($resource){\n\t\techo(\"<table border='1' >\\n<tr>\");\n\t\tforeach($this->list_headers as $head){\n\t\t\techo(\"<th>$head</th>\\n\");\n\t\t}\n\t\tif($this->ed_flag){\n\t\t\techo(\"<th colspan='2'>Admin</th>\\n\");\n\t\t}\n\t\techo(\"</tr>\");\n\t\twhile($row = mysql_fetch_array($resource)){\n\t\t\t\techo(\"<tr>\\n\");\n\t\t\t\tforeach($row as $key => $value) {\n\t\t\t\t$row[$key] = stripslashes($value);\n\t\t\t}\n\t\t\tforeach($this->list_table_cols as $val) {\n\t\t\t\techo(\"<td valign='top'>$row[$val]</td>\");\n\t\t\t}\n\t\t\tif($this->ed_flag){\n\t\t\t\techo(\"<td valign='top'><a href=attendance.php?id={$row[$this->ID]}>Edit</a></td>\\n\"); //Adds Edit button to end of display table\n\t\t\t\techo(\"<td valign='top'><a href=attendance.php?id={$row[$this->ID]}>Delete</a></td>\\n\"); //Adds Delete button to end of display table\n\t\t\t}\n\t\t}\n\t\techo(\"</tr>\\n</table>\");\n\t}", "title": "" }, { "docid": "bebff39922dfa3f37a3d7a6997a89e2f", "score": "0.5843188", "text": "function show()\n\t{\n\t\t$this->postObject->display();\n\t}", "title": "" }, { "docid": "c77fbba2f7b7f5018f4471f75871b57a", "score": "0.5841994", "text": "public function edit(Resource $resource)\n {\n return view(\n 'resources.edit', \n [\n 'resource' => $resource\n ]\n );\n }", "title": "" }, { "docid": "8aae95d60d936382831b42a40edb3397", "score": "0.5824328", "text": "public function show()\r\n\t{\r\n\t\techo $this->template;\r\n\t}", "title": "" }, { "docid": "7c5c6f9fff24e84ba0d3b00444a0acc7", "score": "0.58195084", "text": "public function resolveForDisplay($resource, $attribute = null)\n {\n if (empty($this->value)) {\n $this->value = null;\n }\n\n try {\n $file = new GenericFile($this->value);\n\n $path = FileCache::get($file, function ($file, $path) {\n return basename($path);\n });\n\n $url = vsprintf('%s/%s', [\n 'nova-vendor/skydiver/nova-cached-images',\n $path\n ]);\n\n $value = url($url);\n } catch (\\Throwable $th) {\n $value = 'remote image not found';\n }\n\n $this->value = $value;\n }", "title": "" }, { "docid": "58526873a63ddff4b306282ce5155a89", "score": "0.58138895", "text": "public static function output($resource)\r\n\t{\r\n\t\tif (isset(self::$_resources[$resource])) {\r\n\t\t\t$res =& self::$_resources[$resource];\r\n\r\n\t\t\tif (function_exists('getInternalResource') && $data = getInternalResource($res['data'])) {\r\n\t\t\t\t$filename = self::$embedding_file;\r\n\t\t\t} else {\r\n\t\t\t\t$filename = $res['data'];\r\n\t\t\t}\r\n\r\n\t\t\t// use last-modified time as etag; etag must be quoted\r\n\t\t\t$etag = '\"' . filemtime($filename) . '\"';\r\n\r\n\t\t\t// check headers for matching etag; if etag hasn't changed, use the cached version\r\n\t\t\tif (isset($_SERVER['HTTP_IF_NONE_MATCH']) && $_SERVER['HTTP_IF_NONE_MATCH'] == $etag) {\r\n\t\t\t\theader('HTTP/1.0 304 Not Modified');\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\theader('Etag: ' . $etag);\r\n\r\n\t\t\t// cache file for at most 30 days\r\n\t\t\theader('Cache-control: max-age=2592000');\r\n\r\n\t\t\t// output resource\r\n\t\t\theader('Content-type: ' . $res['mime']);\r\n\r\n\t\t\tif (isset($data)) {\r\n\t\t\t\tif (isset($res['base64'])) {\r\n\t\t\t\t\techo base64_decode($data);\r\n\t\t\t\t} else {\r\n\t\t\t\t\techo $data;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\treadfile($filename);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "d6af1b1d4946c54112fc9b7ca038cb20", "score": "0.58112013", "text": "public function display()\n\t{\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "426c72f34858b1f8fc0c2377d1350691", "score": "0.58062166", "text": "public function show()\n {\n $arguments = func_get_args()[0];\n $id = $arguments[0];\n\n echo \"Show $id\";\n // return $this->view('example.show');\n }", "title": "" }, { "docid": "baf449cd82447c0bffb577fe732c4f2b", "score": "0.57953733", "text": "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\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::add('error', 'msg_info', array('message' => Kohana::message('gw', 'event.view.not_allowed'), 'is_persistent' => FALSE, 'hash' => Text::random($length = 10)));\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}", "title": "" }, { "docid": "21604cc50e9ca2b999b8c59635c9346b", "score": "0.5777744", "text": "protected function _resource($data, $name)\r\n {\r\n $data = get_resource_type($data);\r\n $this->_renderNode('Resource', $name, $data);\r\n }", "title": "" }, { "docid": "ecd6aa7074b9a655f317e213378a7ab9", "score": "0.57773685", "text": "public function show() {\n if (isset($_GET['name'])) {\n $this->view->source = $this->model::getByName($_GET['name']);\n }\n\n $this->view->setData($this->model::get($_GET));\n $this->view->setTemplate(SRC_SHOW);\n $this->view->setLayout(SHOW_LAYOUT);\n $this->view->render();\n }", "title": "" }, { "docid": "e7bae91f4e998eac5e73657c932c48d7", "score": "0.5752467", "text": "public function show($id) {\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "e7bae91f4e998eac5e73657c932c48d7", "score": "0.5752467", "text": "public function show($id) {\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "e3b51ebfe04703c114ab39fc729ba43b", "score": "0.5749091", "text": "public function show(Entry $entry)\n {\n //\n }", "title": "" }, { "docid": "91b553cd446c5431be6377bad7d6e9b7", "score": "0.57440376", "text": "public function show($id)\n\t{\n\t\t//\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.5718969", "text": "public function show($id) {}", "title": "" }, { "docid": "cb9307a32f6d22a33b956aed56db49ba", "score": "0.5717934", "text": "public function show($id)\n\t{\n\t\t//\n\t\t\n\t}", "title": "" }, { "docid": "6c6591ff03468044c76e66dc3ecca033", "score": "0.57143193", "text": "public function display(): Response;", "title": "" }, { "docid": "6ad29c72212e149d40619613cbacfe13", "score": "0.5712024", "text": "protected function addResourceShow(string $name, string $base, string $controller, array $options): RouteContract\n {\n $uri = $this->getResourceUri($name, $options) . '/{' . $base . '}';\n\n $action = $this->getResourceAction($name, $controller, 'show', $options);\n\n return $this->router->get($uri, $action);\n }", "title": "" }, { "docid": "61a627e0c8c8b3a47cc8487387ee35b2", "score": "0.57057", "text": "public function show($id)\n\t{\n\t\t//No need for showing\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "560ae0fd472bad5f1d21beeed5dfbbdd", "score": "0.57012135", "text": "public function show(){}", "title": "" }, { "docid": "690a36be877c22d14829a018fd5e04e9", "score": "0.56947994", "text": "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $information = $em->getRepository('ThiefaineReferentielBundle:Information')->find($id);\n\n if (!$information) {\n throw $this->createNotFoundException(\"Impossible de trouver l'information.\");\n }\n\n $showForm = $this->createShowForm($information);\n $twig = 'ThiefaineReferentielBundle:Information:show.html.twig';\n $paramTwig = array(\n 'information' => $information,\n 'show_form' => $showForm->createView(),\n );\n\n return $this->render($twig,$paramTwig);\n }", "title": "" }, { "docid": "98910c6c774dc1299639c448306ea157", "score": "0.5694748", "text": "public function show($id)\n {\n $this->crud->hasAccessOrFail('show');\n\n // set columns from db\n $this->crud->setFromDb();\n\n // cycle through columns\n foreach ($this->crud->columns as $key => $column) {\n // remove any autoset relationship columns\n if (array_key_exists('model', $column) && array_key_exists('autoset', $column) && $column['autoset']) {\n $this->crud->removeColumn($column['name']);\n }\n }\n\n // get the info for that entry\n $this->data['entry'] = $this->crud->getEntry($id);\n $this->data['crud'] = $this->crud;\n $this->data['title'] = trans('bcrud::crud.preview').' '.$this->crud->entity_name;\n\n // remove preview button from stack:line\n $this->crud->removeButton('preview');\n $this->crud->removeButton('delete');\n\n // load the view from /resources/views/vendor/backpack/crud/ if it exists, otherwise load the one in the package\n return view($this->crud->getShowView(), $this->data);\n }", "title": "" }, { "docid": "851cd390daf8f79de66a294538711bfd", "score": "0.5691463", "text": "public function view(HTTPRequest $request)\n {\n $id = $request->param('ID');\n if ($display = Display::get_by_id($id)) {\n return $this->renderPresentation($display);\n }\n\n return $this->httpError(404);\n }", "title": "" }, { "docid": "89380f02c69f1ed066b5443620b90407", "score": "0.568851", "text": "public function show($id)\n\t{ \n \t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" } ]
8889a9a54bd60e78f141c13237ad8f00
/ Clears all data from the cache
[ { "docid": "01677a8a8189ca12a8677d6028aace55", "score": "0.0", "text": "function phorum_cache_clear() {\n\n $ret=apc_clear_cache(\"user\");\n\n return $ret;\n}", "title": "" } ]
[ { "docid": "8ee09a361045b574a11bfa5c86f573a5", "score": "0.87249714", "text": "public function clearCache();", "title": "" }, { "docid": "8ee09a361045b574a11bfa5c86f573a5", "score": "0.87249714", "text": "public function clearCache();", "title": "" }, { "docid": "8ee09a361045b574a11bfa5c86f573a5", "score": "0.87249714", "text": "public function clearCache();", "title": "" }, { "docid": "822b56c37c5cf4c64bacc6677155d74d", "score": "0.8529332", "text": "public function clearAllCache();", "title": "" }, { "docid": "30b616571a58497df2e1ba364385f217", "score": "0.84123915", "text": "public function clearAllCache()\n {\n $this->nop_cache = [];\n }", "title": "" }, { "docid": "c96791456e32562aa3bf9cf410a1c209", "score": "0.8202426", "text": "public function clear()\r\n {\r\n $this->cache->clean();\r\n }", "title": "" }, { "docid": "097b170b9685991fdeea95ddeb813e78", "score": "0.8176915", "text": "public function clearCache() {\n $this->loaded = [];\n $this->cache->clean();\n }", "title": "" }, { "docid": "e226a1d5a7cad3bc039b9c7128b92b78", "score": "0.81317466", "text": "public function clearCache()\n {\n\n }", "title": "" }, { "docid": "30ef59aa80ebbd898d3eef966322f20f", "score": "0.8078746", "text": "function clearCache() {\n\n clearCache($this->cacheFile,'persistent','');\n }", "title": "" }, { "docid": "ece6957c064744920bf2ea9e076a212b", "score": "0.8037498", "text": "public function clearCache() {\n $cache = self::getCache();\n $cache->clear();\n }", "title": "" }, { "docid": "53a3e0efbcdd7becdbe9a6e5e25cf717", "score": "0.8007973", "text": "function cleanCache() {\n $cache = array();\n }", "title": "" }, { "docid": "ea845e00a3f7a1d943d2a1b29fb76bd4", "score": "0.79722375", "text": "public static function clearCache() {\n\t\t$cache = DevblocksPlatform::getCacheService();\n\t\t$cache->remove(self::CACHE_ALL);\n\t}", "title": "" }, { "docid": "2c1e58e043fbccc8ab6649ff8ceb7823", "score": "0.79654866", "text": "public function clear_cache() {\n\t\tself::$credits = null ;\n\t}", "title": "" }, { "docid": "2b08b27a7359f7042b62dcbaf3cb353f", "score": "0.7886055", "text": "public function clear(): void\n {\n $this->cache->deleteAll();\n }", "title": "" }, { "docid": "2b08b27a7359f7042b62dcbaf3cb353f", "score": "0.7886055", "text": "public function clear(): void\n {\n $this->cache->deleteAll();\n }", "title": "" }, { "docid": "b58f0d4854b2463c1f4d4ba5a200bdec", "score": "0.7873968", "text": "function clear_cache() {\n $t = array(\n AM_SLUG.'_lazyloader',\n AM_SLUG.'_force_load',\n );\n foreach ($t as $d) { delete_transient($d); }\n }", "title": "" }, { "docid": "21769fdb0dfacef6210e38be8b261dce", "score": "0.78680176", "text": "protected function cacheClear()\n\t\t{\n\t\t\tif ($this->query_cache)\n\t\t\t\t$this->query_cache->clear();\n\t\t}", "title": "" }, { "docid": "188e55f5a3c8e5b24b3598e1fa114c52", "score": "0.78637844", "text": "public static function clearCache(): void\n {\n static::$items = [];\n static::$worlds = [];\n }", "title": "" }, { "docid": "18a7b608950bc85ac19b6d9edaa159e7", "score": "0.7849103", "text": "protected final function emptyCache() {\n\t\tCache::emptyCache();\n\t}", "title": "" }, { "docid": "8fe7e9b671ee4f61bd44a6883477b640", "score": "0.7844905", "text": "final public static function clearCache() {\n self::getModX()->getCacheManager()->refresh();\n }", "title": "" }, { "docid": "08837f4e1022936309c5ce17c4ee3b63", "score": "0.783454", "text": "public function cache_clear()\n\t\t{\n\t\t\t$this->cache->clear('.#table#' . $this->getName());\n\t\t}", "title": "" }, { "docid": "8eeb04a2e92e273ba95b77cc107cc936", "score": "0.7831034", "text": "public static function clearCache(): void\n {\n $glob = glob(__DIR__ . '/data/*.cache');\n foreach ($glob as $file) {\n unlink($file);\n }\n }", "title": "" }, { "docid": "6b97061bf0a69fe3503c173227e7dbd9", "score": "0.7783755", "text": "public function clearCache() {\n $this->_statments = [];\n }", "title": "" }, { "docid": "a99abcb5940b1a70e4639a74c9bfa681", "score": "0.77771443", "text": "public function clearAll ()\n {\n return $this->__cache->flushAll();\n }", "title": "" }, { "docid": "2185635b6f9f000169323fb9db216f90", "score": "0.7774661", "text": "public static function clearCache()\r\n\t{\r\n\t\tparent::clearCache(__CLASS__);\r\n\t}", "title": "" }, { "docid": "2185635b6f9f000169323fb9db216f90", "score": "0.7774661", "text": "public static function clearCache()\r\n\t{\r\n\t\tparent::clearCache(__CLASS__);\r\n\t}", "title": "" }, { "docid": "caa48695407d5211ca2fc858859016f3", "score": "0.77736366", "text": "public static function clearCache()\n {\n self::$loadedBeans = array();\n self::$definitions = array();\n self::$total = 0;\n self::$hits = 0;\n }", "title": "" }, { "docid": "7158f62f0edb62b7656081a74d4e01a8", "score": "0.7747965", "text": "public static function clearCache()\n\t{\n\t\tparent::clearCache(__CLASS__);\n\t}", "title": "" }, { "docid": "7158f62f0edb62b7656081a74d4e01a8", "score": "0.7747965", "text": "public static function clearCache()\n\t{\n\t\tparent::clearCache(__CLASS__);\n\t}", "title": "" }, { "docid": "980abcdae245a8197dfd0edf7d22e24d", "score": "0.7740166", "text": "public function cache_delete_all()\n {\n }", "title": "" }, { "docid": "3bc7c0d686d27a37845a5a7ecb9d87f5", "score": "0.77377135", "text": "public function clearCache() {\r\n\t\ttry {\r\n\t\t\tif (!$this->isCacheOn()) return;\r\n\t\t\tif (array_key_exists(get_class($this), self::$clearedCacheByTypes)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tLBoxCacheAbstractRecord::getInstance($this->getClassVar(\"tableName\"), $this->params[$this->getClassVar(\"idColName\")], self::getCacheGroup())->clean();\r\n\r\n\t\t\t// smazat zaroven i collections cache\r\n\t\t\t$itemsType\t\t\t= $this->getClassVar(\"itemsType\");\r\n\t\t\t$cacheGroupItems\t= eval(\"return $itemsType::getCacheGroup();\");\r\n\t\t\tLBoxCacheAbstractRecord::getInstance($this->getClassVar(\"tableName\"), $this->params[$this->getClassVar(\"idColName\")], $cacheGroupItems)->clean();\r\n\r\n\t\t\t$this\t\t\t\t->resetRelevantCache();\r\n\t\t\tself::$clearedCacheByTypes[get_class($this)]\t= true;\r\n\t\t}\r\n\t\tcatch (Exception $e) {\r\n\t\t\tthrow $e;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "6ce0117d082a40bcc6a3a1074a0815b0", "score": "0.77310115", "text": "public function clear_cache() {\r\n\t\twp_cache_flush();\r\n\t}", "title": "" }, { "docid": "aa90232d849aa326ffd896140db17a13", "score": "0.7729795", "text": "protected function emptyCache()\n {\n Cache::forget('tags');\n }", "title": "" }, { "docid": "f2169304ca7d981e5545cccb25c810a0", "score": "0.77283406", "text": "public function clearCache() {\n $this->modx->cacheManager->refresh(array(\n 'db' => array(),\n 'auto_publish' => array('contexts' => array($this->object->get('context_key'))),\n 'context_settings' => array('contexts' => array($this->object->get('context_key'))),\n 'resource' => array('contexts' => array($this->object->get('context_key'))),\n ));\n }", "title": "" }, { "docid": "397a18729269ff3b162f4bf17fc550c8", "score": "0.77217346", "text": "public function clear_cache() {\n\t\t$this->out('Clearing all cache keys:');\n\t\tAssetConfig::clearAllCachedKeys();\n\t\t$this->hr();\n\t}", "title": "" }, { "docid": "05e79e562de9d43bad0763a8d9658a03", "score": "0.7703343", "text": "public function clearCache()\n {\n $this->modx->cacheManager->refresh(array(\n 'db' => array(),\n 'auto_publish' => array('contexts' => array($this->resource->get('context_key'))),\n 'context_settings' => array('contexts' => array($this->resource->get('context_key'))),\n 'resource' => array('contexts' => array($this->resource->get('context_key'))),\n ));\n }", "title": "" }, { "docid": "ab403cf61481e64d99434d76fd8c8019", "score": "0.7686272", "text": "private function flushCache (): void\n {\n $this->cache->forget ($this->cacheKey);\n }", "title": "" }, { "docid": "5ea87016a04a9eef9e23f92bad25328f", "score": "0.768401", "text": "public function resetCache()\n {\n $this->variables = null;\n $this->lookups = array();\n }", "title": "" }, { "docid": "58b545773f68f8c5e3c08ea1abb02434", "score": "0.7669755", "text": "public function reset() {\n $this->cache = array();\n }", "title": "" }, { "docid": "b1022cf485cdfb3e4214520cecb328fd", "score": "0.7656076", "text": "public static function clearCache() {\n\t\tparent::clearCache(__CLASS__);\n\t}", "title": "" }, { "docid": "e98d7b1cad37345e4359a19b9b432df8", "score": "0.7655475", "text": "protected function clearCaches() {\n\t\t_elgg_services()->accessCache->clear();\n\t\t_elgg_services()->dataCache->clear();\n\t\t_elgg_services()->entityCache->clear();\n\t\t_elgg_services()->sessionCache->clear();\n\t\t_elgg_services()->queryCache->clear();\n\t}", "title": "" }, { "docid": "75923e1c00e115049e4c949a0e2de3d7", "score": "0.76034373", "text": "public function clear() {\n\t\t# reinstantiate overall and search cache, not lifetime cache!\n\t\t$this->overall_freq_cache = array();\n\t\t$this->search_freq_cache = array();\n\t}", "title": "" }, { "docid": "78d3a08fe9cacbdaf72d37fddd55b9ff", "score": "0.760181", "text": "private function flushCache(): void\n {\n $this->cache->forget($this->cacheKey);\n }", "title": "" }, { "docid": "ebe4746e55d69bc4fd4b8522563eba5b", "score": "0.75890213", "text": "protected function clearCaches(): void {\n\t\t_elgg_services()->accessCache->clear();\n\t\t_elgg_services()->dataCache->clear();\n\t\t_elgg_services()->entityCache->clear();\n\t\t_elgg_services()->sessionCache->clear();\n\t\t_elgg_services()->queryCache->clear();\n\t}", "title": "" }, { "docid": "2fe5c9b0a475be870b6b1b9163a03f63", "score": "0.75878924", "text": "public function clearExpiredCacheEntries();", "title": "" }, { "docid": "610d9b016439c7786ede2a458f6bfd95", "score": "0.75727767", "text": "public function reset()\n {\n $this->cache = array();\n }", "title": "" }, { "docid": "1025ca40b5d2709822a531a109ff2a23", "score": "0.7570873", "text": "public function reset() {\n $this->cache = [];\n }", "title": "" }, { "docid": "b35ffbc9bbcf8c86b4765f855b1d8456", "score": "0.756407", "text": "public static function resetCache()\n\t{\n\t\tstatic::$arrCache = array();\n\t}", "title": "" }, { "docid": "9498b5bc7da3d9af8fe24ee9d706e607", "score": "0.75548", "text": "protected function ClearInternalCache()\n {\n $this->aResultCache = array();\n }", "title": "" }, { "docid": "9d70ee74f9d7167c63f604e4fcbeb889", "score": "0.7530795", "text": "public function clearCache()\r\n\t{\r\n\t\tparent::clearCache();\r\n\t\t$this->_children = NULL;\r\n\t}", "title": "" }, { "docid": "dec66e20b144abbaeb8cb40d420321aa", "score": "0.7529918", "text": "public function clearCache() {\n\t\t$this->cache->flush('sly.addon', true);\n\t\t$this->pkgService->clearCache();\n\t}", "title": "" }, { "docid": "11bda3147c7462538aa3879092baac1b", "score": "0.75289375", "text": "function cache_reset() {\n global $cache_absfile, $cache_data, $cache_variables;\n $cache_absfile =NULL;\n $cache_data =array();\n $cache_variables=array();\n }", "title": "" }, { "docid": "1aaaf57b3475e917a73d8fe88186021d", "score": "0.7516968", "text": "function clearCache() {\n\t\t$GLOBALS['TYPO3_DB']->exec_DELETEquery('cache_pagesection','');\n\t\t$GLOBALS['TYPO3_DB']->exec_DELETEquery('cache_hash','');\n\t\t$GLOBALS['TYPO3_DB']->exec_DELETEquery('cache_pages','');\n\t}", "title": "" }, { "docid": "78f9921857eb2daf9a6cc4abef7ebcb0", "score": "0.75105304", "text": "public function resetCache()\n {\n wp_cache_delete($this->cacheKey, $this->cacheGroup);\n }", "title": "" }, { "docid": "7fc65a0563db982928345cb3a4c002b9", "score": "0.7508635", "text": "public function cleanCache()\n {\n return $this->reinit();\n }", "title": "" }, { "docid": "7fc65a0563db982928345cb3a4c002b9", "score": "0.7508635", "text": "public function cleanCache()\n {\n return $this->reinit();\n }", "title": "" }, { "docid": "075f2332cabeae5a298c80c5716e9119", "score": "0.7489422", "text": "public function clear()\n {\n $this->data = [];\n $this->lowerKeys = [];\n }", "title": "" }, { "docid": "93a5c57702d960df5c897fa7bf1924bb", "score": "0.7475735", "text": "public function clearCache()\n {\n if($list = File::files($this->storage_path)){\n foreach($list as $cache){\n unlink($cache);\n }\n }\n }", "title": "" }, { "docid": "2733ea3b7d52e084298e7a6a15196186", "score": "0.74444395", "text": "public function flushCache()\n {\n\t\tif (isset(Yii::$app->cache)) {\n\t\t\tYii::$app->cache->delete(self::CACHE_ID);\n\t\t}\n }", "title": "" }, { "docid": "211c350d58ef03f3a1ed05f106a18e2b", "score": "0.74154156", "text": "public function clear(){\n return $this->memcache->flush();\n }", "title": "" }, { "docid": "9760b0d079e10e457f737aab25efdb41", "score": "0.7398863", "text": "function cacheClear ()\n {\n $target = $this->kernelSettings->storagePath . DIRECTORY_SEPARATOR . $this->cachingSettings->cachePath;\n (new CleanDir($target))->run ();\n }", "title": "" }, { "docid": "8ce4df3c0d54869fb703618f91eec0d7", "score": "0.73956734", "text": "public function subcleanCache()\n\t{\n\t\t$this->cleanCache();\n\t}", "title": "" }, { "docid": "6593b6344680462f3f2f8c6401efddba", "score": "0.7388221", "text": "protected function clearCache()\n {\n if (function_exists('apc_clear_cache')) {\n apc_clear_cache();\n }\n\n if (function_exists('opcache_reset')) {\n opcache_reset();\n }\n }", "title": "" }, { "docid": "7ef2371d408505076b71f4fcfade6638", "score": "0.73806417", "text": "abstract protected function clearAllPersistentData();", "title": "" }, { "docid": "ea08804ceef3197db766fa3b2e2bda7c", "score": "0.73727924", "text": "public static function clearCache()\n {\n self::$countries = null;\n }", "title": "" }, { "docid": "72e0944c692d95d67a6a6e6360f1a9d5", "score": "0.7372715", "text": "public function clearCache()\n {\n if ($this->_cacheEnabled)\n $this->_cache->remove($this->_cacheName);\n }", "title": "" }, { "docid": "ab00d3f3f464022cf8781da7a7fd25c5", "score": "0.73619366", "text": "public function clearStoredData()\n\t {\n\t \t$this->store = array();\n\t \t$this->storePos = -1;\n\t }", "title": "" }, { "docid": "45a962b463c169e443f3a41d490ae1d8", "score": "0.73555785", "text": "function ingeni_joi_clear_cache( ) {\n\tdelete_option(JOI_CACHE_TIMEOUT_DATE);\n\tdelete_option(JOI_CACHED_EVENT_INFO);\n\tdelete_option(JOI_CACHED_PROGRAM_INFO);\n\tdelete_option(JOI_CACHED_SESSION_INFO);\n}", "title": "" }, { "docid": "2826169282904eb2561bfa3a02b6d586", "score": "0.7354278", "text": "public function clearData() {\n $this->data = array();\n }", "title": "" }, { "docid": "851663bede56c0d3f31183b3ae7b7a55", "score": "0.7352635", "text": "public function clearCacheInformation()\n {\n $schema = $this->schema;\n if (array_key_exists($schema, self::$localCache)) {\n unset(self::$localCache[$schema]);\n if (($key = array_search($schema, self::$fullyCachedSchemas)) !== false) {\n unset(self::$fullyCachedSchemas[$key]);\n }\n }\n }", "title": "" }, { "docid": "9a2dddee2608e9de4f291e4b35047d6a", "score": "0.7340604", "text": "public function clear()\n {\n $this->cache = [];\n $this->pivotAttributes = [];\n }", "title": "" }, { "docid": "3666ad4f1cd2234fa5dd08ba0b5c457e", "score": "0.7326509", "text": "public function reset() {\n\t\t\t// Be safe and flush the cache if this function is still used\n\t\t\t$this->flush();\n\t\t}", "title": "" }, { "docid": "f79fc81de1370e27480715e3f3455838", "score": "0.7313961", "text": "public static function resetCache()\n {\n if (Cache::has('combiner.index')) {\n $index = (array) @unserialize(@base64_decode(Cache::get('combiner.index'))) ?: [];\n\n foreach ($index as $cacheKey) {\n Cache::forget($cacheKey);\n }\n\n Cache::forget('combiner.index');\n }\n\n CacheHelper::instance()->clearCombiner();\n }", "title": "" }, { "docid": "f548efd0540bfeb3afe6e0fafde7a447", "score": "0.7313559", "text": "public function resetCache() {\n foreach($this->application->languages as $lang) {\n Cache::instance()->delete(self::cacheKey($lang->locale, $this->source));\n }\n }", "title": "" }, { "docid": "c4e2c0c34051bb7f4167c070f3e876bf", "score": "0.7312151", "text": "public static function reset() {\n static::$cached = [];\n }", "title": "" }, { "docid": "ab4871428c48081f30edcb187bb60615", "score": "0.72940916", "text": "public static function clearCache() {\n parent::$cache['Portal2Inventory'] = array();\n }", "title": "" }, { "docid": "8c0a783771ee5192c25690664b8772e8", "score": "0.72884595", "text": "function clear_cache() {\n global $g_image_cache;\n\n foreach ($g_image_cache as $key => $value) {\n unlink($value);\n };\n }", "title": "" }, { "docid": "554a7510ebab1caabec70dc33f6382f1", "score": "0.72865653", "text": "public function removeAll() {\n \n // @todo\n return;\n \n if (!$items = $this->getStats('items')) {\n return;\n }\n $Apc = $this->getApc();\n foreach ($items['items'] as $key => $item) {\n $dump = $Apc->getStats('cachedump', $key, $item['number'] * 2);\n foreach (array_keys($dump) as $ckey) {\n $Apc->delete($ckey);\n }\n }\n $this->stats = null;\n }", "title": "" }, { "docid": "42294fef028f9545ba4c91490e69ef29", "score": "0.72704905", "text": "public function clearCache()\n\t{\n\t\t$this->total = null;\n\t\t$this->cache = array();\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "4979d0bc8ab04d74d50f635b4410c128", "score": "0.7254236", "text": "public function ClearCache() {\n\t\tif ($handle = opendir ( $this->CacheFolder )) {\n\t\t\twhile ( false !== ($file = readdir ( $handle )) ) {\n\t\t\t\tif ($file != \".\" && $file != \"..\")\n\t\t\t\t\tunlink ( $this->CacheFolder . $file );\n\t\t\t}\n\t\t\tclosedir ( $handle );\n\t\t}\n\t}", "title": "" }, { "docid": "95b7794766d5dc89c06e7e89edc42d7d", "score": "0.7254093", "text": "public function clearAll()\n {\n $this->cached = [];\n return $this;\n }", "title": "" }, { "docid": "c9db4820a10b60e99f7f22bff09077d5", "score": "0.7253868", "text": "function ResetCache()\n {\n }", "title": "" }, { "docid": "06606ef17d0441de513650977c009509", "score": "0.72416157", "text": "public function clear();", "title": "" }, { "docid": "06606ef17d0441de513650977c009509", "score": "0.72416157", "text": "public function clear();", "title": "" }, { "docid": "06606ef17d0441de513650977c009509", "score": "0.72416157", "text": "public function clear();", "title": "" }, { "docid": "06606ef17d0441de513650977c009509", "score": "0.72416157", "text": "public function clear();", "title": "" }, { "docid": "06606ef17d0441de513650977c009509", "score": "0.72416157", "text": "public function clear();", "title": "" }, { "docid": "06606ef17d0441de513650977c009509", "score": "0.72416157", "text": "public function clear();", "title": "" }, { "docid": "06606ef17d0441de513650977c009509", "score": "0.72416157", "text": "public function clear();", "title": "" }, { "docid": "06606ef17d0441de513650977c009509", "score": "0.72416157", "text": "public function clear();", "title": "" }, { "docid": "06606ef17d0441de513650977c009509", "score": "0.72416157", "text": "public function clear();", "title": "" }, { "docid": "06606ef17d0441de513650977c009509", "score": "0.72416157", "text": "public function clear();", "title": "" }, { "docid": "06606ef17d0441de513650977c009509", "score": "0.72416157", "text": "public function clear();", "title": "" }, { "docid": "06606ef17d0441de513650977c009509", "score": "0.72416157", "text": "public function clear();", "title": "" }, { "docid": "06606ef17d0441de513650977c009509", "score": "0.72416157", "text": "public function clear();", "title": "" }, { "docid": "06606ef17d0441de513650977c009509", "score": "0.72416157", "text": "public function clear();", "title": "" }, { "docid": "06606ef17d0441de513650977c009509", "score": "0.72416157", "text": "public function clear();", "title": "" }, { "docid": "06606ef17d0441de513650977c009509", "score": "0.72416157", "text": "public function clear();", "title": "" }, { "docid": "06606ef17d0441de513650977c009509", "score": "0.72416157", "text": "public function clear();", "title": "" }, { "docid": "06606ef17d0441de513650977c009509", "score": "0.72416157", "text": "public function clear();", "title": "" }, { "docid": "06606ef17d0441de513650977c009509", "score": "0.72416157", "text": "public function clear();", "title": "" } ]
0a1b5b02f90783207155cadf777aee88
Creates a form to delete a Job entity by id.
[ { "docid": "3bcf36ebe93148e4b33f694922bf9fb2", "score": "0.0", "text": "private function createDeleteForm($token)\n {\n return $this->createFormBuilder(array('token' => $token))\n ->add('token', 'hidden')\n ->getForm();\n ;\n }", "title": "" } ]
[ { "docid": "fabaa3b460cb86707f5fa3dab8276c4b", "score": "0.752397", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('classroom_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "049209cb8c7b0da34437b18093a76fa5", "score": "0.7378414", "text": "private function createDeleteForm( $id ) {\n\t\treturn $this->createFormBuilder()\n\t\t ->setAction( $this->generateUrl( 'empleados_delete', array( 'id' => $id ) ) )\n\t\t ->setMethod( 'DELETE' )\n\t\t ->add( 'submit', 'submit', array( 'label' => 'Delete' ) )\n\t\t ->getForm();\n\t}", "title": "" }, { "docid": "e7c08df08e84a159bdce5238af960cfa", "score": "0.73735416", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('empresas_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "d88e73e6627a6c55812f6986487b91a5", "score": "0.7305716", "text": "private function createDeleteForm($id) {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('meeting_delete', array('id' => $id)))\r\n ->setMethod('DELETE')\r\n ->add('submit', 'submit', array('label' => 'Delete'))\r\n ->getForm()\r\n ;\r\n }", "title": "" }, { "docid": "3f2bec7470ef9c861e6ccb8650bcd041", "score": "0.7278083", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('notadebito_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "fb445c6e43786f6f2d76a5196c336b07", "score": "0.7277303", "text": "private function createDeleteForm($id) {\n \n return $this->createFormBuilder()\n ->setAction($this->generateUrl('pacientes_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit','submit',array('label'=>'Eliminar','attr'=>array('class'=>'btn btn-danger')))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "2483d1cf6cd081ed91984a85b95649eb", "score": "0.72708565", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('mission_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array(\n 'label' => 'Supprimer',\n 'attr' => array( \n 'class' => 'btn btn-danger',\n 'icon' => 'remove',\n )\n ))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "ea62d8173d1cddf670a5bd3f1e4acfc9", "score": "0.7267709", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('personne_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "c7b969eaa90acad165e719b245b82113", "score": "0.7264398", "text": "private function createDeleteForm($id, $request)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('car_delete', array('id' => $id, 'company_id' => $request->get('company_id'))))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "518799b1ddaadc180f83c202972b52b1", "score": "0.72642845", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder(null, array ( 'attr' => array ( 'id' => 'delete_record' ) ) )\n ->setAction($this->generateUrl('cms_banner__delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Excluir', 'attr' => array('class' => 'btn btn-danger delete')))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "01d7ebe381bdb51d4666ee00f4f41f82", "score": "0.7251889", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('task_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Удалить задачу'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "7ee97c708451c0710f7c7a5f95c3ea9a", "score": "0.7245123", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('personas_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar','attr' => array('class' => 'btn btn-default')))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "2872b824654468fa4a5a56b44350347e", "score": "0.7230889", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('jogo_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', SubmitType::class, array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "7f5d8f1ec01a179a016f6ca097648d1f", "score": "0.72281355", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder(null, array('attr'=>array('id' => 'delete-form')))\n ->setAction($this->generateUrl('recipe_delete', array('id' => $id)))\n ->setMethod('DELETE')\n //->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "7c34c86cc0f0aaaebdd5a8a3deafa382", "score": "0.72207475", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('envio_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Borrar', 'attr' => array('class' => 'btn btn-danger')))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "cafec8cb61c30a0d3d36514e402f12b0", "score": "0.72118825", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('organization_delete', array(\n 'id' => $id\n )))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array(\n 'label' => 'Delete'\n ))\n ->getForm();\n }", "title": "" }, { "docid": "28d39828682c24e8dc72c049d42c1fbb", "score": "0.7208082", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('itemcompra_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "01be8cf6cbf9b39cfaf9081f2b4a225f", "score": "0.72045374", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('ville_delete', array('id' => $id)))\n ->setMethod('DELETE')\n //--\n ->add('supprimer', 'submit', array('label' => 'S', 'attr' => array('class' => 'btn-supp btn-danger', 'title' => 'Supprimer')))\n //--\n ->getForm()\n ;\n }", "title": "" }, { "docid": "2b253aa76674955bfe03d58c6c83dbd7", "score": "0.7194927", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('ambiente_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "bed905f5d9e9e3ea495285517941b150", "score": "0.7193803", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_tipocarrusel_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "cd1a9db73332f22e986cfdc9328e950a", "score": "0.71877766", "text": "private function createDeleteForm($id)\r\n {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('les_espaces_delete', array('id' => $id)))\r\n ->setMethod('DELETE')\r\n ->add('submit', 'submit', array('label' => 'Delete'))\r\n ->getForm()\r\n ;\r\n }", "title": "" }, { "docid": "cb64c75d0f806f262bf92a92a0f96bb7", "score": "0.7187284", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('celcat_management_app_schedulemodification_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "a94872fd7b6a6d8fd572cf151c2afed5", "score": "0.7180189", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('cheque_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "5d3b25d3c4bd6bc1f92f41e2472a0d57", "score": "0.7175807", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_personatratamiento_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "3eb16f06d97e138ba4d65cf87f3e30dc", "score": "0.7168637", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('personne_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "5feb4621400e8aec9b19ba8340723af9", "score": "0.7168626", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('etablissement_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "4a30971bb78f55d8e036fe2e0908b20a", "score": "0.716819", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('fitnessdetail_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "08a7ff1f71fdc69e3977c1f2c41c87f9", "score": "0.71675456", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('container_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "0e68e758e8fbecd188c37d66ba28347f", "score": "0.7163832", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('bautizo_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Borrar'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "70992ea3b105afc520877fa245554d64", "score": "0.7157964", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('tarjeta_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "beb05636066ae650bb0b57e4d4d72624", "score": "0.71569693", "text": "public function jobDelete() {\n\n $job = new Wpjb_Model_Job(get_query_var(\"wpjb-id\"));\n $company = Wpjb_Model_Company::current();\n \n if(!get_current_user_id()) {\n return $this->_loginForm(wpjb_link_to(\"job_delete\", $job));\n }\n \n if(!$this->_hasAccess(\"manage_jobs\")) {\n return $this->flash();\n }\n \n if(!Wpjb_Project::getInstance()->conf(\"front_allow_edition\")) {\n $this->addError(__(\"Administrator does not allow job postings edition.\", \"wpjobboard\"));\n return $this->flash();\n }\n \n if(is_null($company)) {\n $m = __('Please complete your <a href=\"%s\">Employer Profile</a> and then get back to this page.', \"wpjobboard\");\n $this->addError(sprintf($m, wpjb_link_to(\"employer_edit\")));\n return $this->flash();\n }\n \n if(!$job->exists()) {\n $this->addError(__(\"Job does not exist.\", \"wpjobboard\"));\n return $this->flash();\n }\n \n if($job->employer_id != $company->getId()) {\n $this->addError(__(\"You do not own this job.\", \"wpjobboard\"));\n return $this->flash();\n }\n \n $this->view = new stdClass();\n $this->view->action = \"\";\n $this->view->submit = __(\"Delete Job\", \"wpjobboard\");\n \n if(!Wpjb_Project::getInstance()->conf(\"front_allow_edition\")) {\n $this->addError(__(\"Administrator does not allow job postings edition.\", \"wpjobboard\"));\n return false;\n }\n if($job->employer_id != Wpjb_Model_Company::current()->getId()) {\n $this->addError(__(\"You are not allowed to access this page.\", \"wpjobboard\"));\n return false;\n }\n\n $form = new Wpjb_Form_Frontend_DeleteJob($job->getId());\n $form->getElement(\"redirect_to\")->setValue(wpjb_link_to(\"employer_panel\"));\n \n if($this->getRequest()->isPost()) {\n $form->isValid($this->getRequest()->getAll());\n }\n\n $this->view->form = $form;\n $this->view->breadcrumbs = array(\n array(\"title\"=>__(\"Home\", \"wpjobboard\"), \"url\"=>wpjb_link_to(\"employer_home\"), \"glyph\"=>\"wpjb-icon-home\"),\n array(\"title\"=>__(\"Listings\", \"wpjobboard\"), \"url\"=>wpjb_link_to(\"employer_panel\"), \"glyph\"=>$this->glyph()),\n array(\"title\"=>sprintf(__(\"Delete Job '%s'\", \"wpjobboard\"), $job->job_title), \"url\"=>wpjb_link_to(\"job_delete\", $job), \"glyph\"=>$this->glyph()),\n );\n \n return $this->render(\"default\", \"form\");\n }", "title": "" }, { "docid": "9016393e61ba6ffa00e504465c74cdf2", "score": "0.7156204", "text": "public function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('spotlight_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "61fb9a02cc382290627253104900059f", "score": "0.71523046", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('abonentph_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "4949315bbae33748a48a76cc64d46fce", "score": "0.71519536", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('teachingunitcontainersubject_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "003182ededb8782c42937ed151c93e71", "score": "0.7148351", "text": "private function createDeleteForm($id)\r\n {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('adminProduits_delete', array('id' => $id)))\r\n ->setMethod('DELETE') \r\n ->getForm()\r\n ;\r\n }", "title": "" }, { "docid": "9235cc8c606d354f865e2fd76a53efe5", "score": "0.71432495", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('arretemodel_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Supprimer', \"attr\" => array(\"class\" => \"btn btn-danger\")))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "a1b40c8a6ffc7b2ea2ec8ad392e137f7", "score": "0.7135526", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('projet_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "c3bd030aa8c93281d86e1419269aba2f", "score": "0.7135042", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('barrio_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "843e124f44b67dce9c299889f9ca3d37", "score": "0.71311855", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('quest_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "63f03e1abef27ff3aa28138c0dc14be8", "score": "0.7127454", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('littlebigjoe_backendbundle_projects_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm();\n }", "title": "" }, { "docid": "4d984d78bb29b3398e41b9145401772e", "score": "0.7126875", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('cooperative_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "06507a1f434eb54e289cd3e0b49bac82", "score": "0.7126194", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('workflow_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete', 'icon' => 'trash', 'attr' => array('class' => 'btn-danger')))\n ->getForm();\n }", "title": "" }, { "docid": "dfd275f76d5da3cc953b7d2fc03c5877", "score": "0.7118711", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('geoindicator_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "aa3e19f6a987c0344244425367b1373f", "score": "0.71147794", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_reglage_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "0d0bfc0e3c256ada012fb239d66a0f8d", "score": "0.7114435", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('registrohoras_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', SubmitType::class, array('label' => 'Delete', 'attr' => array('class' => 'hide-submit')))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "83635e3244b12b41de91ca9781b6aa1d", "score": "0.71135217", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('condicionessubsidio_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'button', array('label' => 'Eliminar','attr' => array('class' => 'btn-danger')))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "c3139102a4b7b8c0c147bee8a96d3c58", "score": "0.71126413", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('bungalow_delete', ['id' => $id]))\n ->setMethod('DELETE')\n ->add('submit', 'submit', ['label' => 'Delete'])\n ->getForm();\n }", "title": "" }, { "docid": "b83a7823c471edb87bce7cfae66e5d7d", "score": "0.71120924", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('timeline_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "9c6c476c7cf9581fae1717c35feef906", "score": "0.711184", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('careerapplicationinterest_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "c199edb3852855fd2bdf37a63f802118", "score": "0.7108839", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('objetivo_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'BORRAR'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "e9045b722a6f69ed299e7bcba67203bb", "score": "0.71081185", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('modification_delete', array('id' => $id)))\n ->setMethod('DELETE')\n //--\n ->add('supprimer', 'submit', array('label' => 'S', 'attr' => array('class' => 'btn-danger btn-supp', 'title' => 'Supprimer')))\n //--\n ->getForm()\n ;\n }", "title": "" }, { "docid": "89edd9ddd5fd726c90eb9f8aaf0df9aa", "score": "0.71039164", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('equipointerno_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "f085d98402be946d81b859fbfbfccab6", "score": "0.71030277", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('entidadreceptora_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "643da6029e7fc17b4509baaa0174d15e", "score": "0.7100768", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('declaracion_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "97797a3b82e847110f44bed21ea27ac8", "score": "0.71003294", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('membro_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Excluir'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "bb41dbae4c3201f5657075c71ccaffc3", "score": "0.71003026", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('siswa_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "6b1b82762076d023987c5e047c470c74", "score": "0.70986205", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('formation_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Supprimer', 'attr' => array('class' => 'btn btn-sm btn-danger')))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "8d1dd71651da28d09356e502fd3a9046", "score": "0.7097304", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('seriesdetiempodeclasepordias_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "51b7da75591bb5a62077a48bd0edf7d3", "score": "0.7093649", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('issueinfographicstitle_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "582bfceb8cb66d28da19976e6f02b889", "score": "0.7093065", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('aturgent_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Supprimer', \"attr\" => array(\"class\" => \"btn btn-danger\")))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "3f774b5ff3a83fcdeb3be007d8f6d84f", "score": "0.7091693", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('promocao_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "e3acad039155fb45b28531bdc92c1e18", "score": "0.708935", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('plantilla_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "f39ed69dacb36d0d97b48333d079975f", "score": "0.70847934", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('zimzim_bundles_app_adminrequestuserbet_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'button.delete'))\n ->getForm();\n }", "title": "" }, { "docid": "ad0a5aed4bdc452661512edb5c3607ce", "score": "0.70847005", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('poi_point_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "45267ebd215d5171f2c5293414292fae", "score": "0.7080264", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('requests_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "d0b6f8a0511ba4ed841027574662123c", "score": "0.7079854", "text": "private function createDeleteForm(JobType $jobType)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('job_type_delete', array('id' => $jobType->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "bbffc613916b47c276f47a8b7b60405c", "score": "0.7076917", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('formato__delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "cfe671b1a5b6331295fb034a0d8d9a29", "score": "0.70739704", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('carreracurso_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "e93e49a445bc77e147cc29c6a7315f8c", "score": "0.70724636", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('profesor_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('Delete', 'submit', array('attr' => array('class' => 'btn btn-xs btn-danger')))\n// ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "fc4d37e5c38d09150026db84027e48fa", "score": "0.7066331", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('annonce_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "1c502ad29e687046f4fb738698fefd8f", "score": "0.70648384", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('t360questions_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => \"Delete\",'attr'=>array(\"class\"=>\"btn btn-box-tool hvr-grow\")))\n ->getForm();\n }", "title": "" }, { "docid": "fb9e3192815ac519aa3e969fe26c93e5", "score": "0.7064087", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('records_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "362c1a94836097159a708fb46713f20d", "score": "0.70585454", "text": "public function deleteJob($id)\n {\n $jobDelete = JobOpportunity::find($id);\n\n // check if the job is in the database\n if ($jobDelete != null) {\n // if the job is found, it is deleted\n $jobDelete->delete();\n return redirect('/edit-jobs');\n }\n // returns to the edit page\n return redirect('/edit-jobs');\n }", "title": "" }, { "docid": "745fabbbe19315e3aaf6a539618c0dc4", "score": "0.705568", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('shedule_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "727f7e2834bacda5db731d0f91a395ab", "score": "0.7055194", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('matricula_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "1afd28fa05efb152260ef502f4e36e6e", "score": "0.7051401", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('com_vehi_traj_voyg_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "6b2eba991f82705dfb70745f82600b83", "score": "0.7051132", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('itemcart_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "1cb560a5e32f4ab11fad2b970cc4daa0", "score": "0.704674", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('payroll_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "4cd5b02969c95de9577c80d2a4659cb2", "score": "0.7046123", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('userbeats_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "6bacde03d1cb2408847241750704a759", "score": "0.7045477", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('aulas_actividad_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "5a20f08cd2e680911839fb9d2a4e0709", "score": "0.70449233", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('dtdict_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Supprimer', \"attr\" => array(\"class\" => \"btn btn-danger\")))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "bede70faefe0355a101ec10626d60445", "score": "0.7044515", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('spot_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "c96e97cd602dc102309a2064793119b8", "score": "0.7040403", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('administration_Module_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "91c708ea14f18945093fa309e17263e0", "score": "0.7040035", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_ventapaquete_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "20f7a5160739c9477690c67ac8564966", "score": "0.70378625", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('library_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "f97d64f4f88d6a07d19433e186535e52", "score": "0.70374197", "text": "private function createDeleteForm($id, $context)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('nomenclature_delete', array('context' => $context, 'id' => $id)))\n ->setMethod('DELETE')\n // ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm();\n }", "title": "" }, { "docid": "5c8703b2573fb38957f2f9bd02b3d9c7", "score": "0.7036825", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('act_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "c6b36eb666a180595868a4a207733d02", "score": "0.7036225", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('file_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array(\n 'label' => 'Delete',\n 'attr' => array('class' => 'btn btn-danger'),\n ))\n ->getForm();\n }", "title": "" }, { "docid": "4982635dc359ca03937cc196ceca09f1", "score": "0.70349395", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('ideia_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "f14584ce76b158cceb230f2ccd92e478", "score": "0.7034598", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('category_delete', array('id' => $id)))\n //->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Supprimer'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "1fe61f9c563ce8cc7d7bde23151853dc", "score": "0.70190805", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('bestellingen_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "77817e2521b96eb15d5831876a9ae4a3", "score": "0.7019058", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('especializaciones_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', SubmitType::class, array('label' => 'Eliminar'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "c22c4d08a8736fdd479c1e83e562234a", "score": "0.70175004", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('maquinasv_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "62a9d77816e1d0915613709b17fb3b7c", "score": "0.7016533", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('shopentry_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Удалить'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "8ce4412cbbd3ff45be22919169e06de9", "score": "0.70147353", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('factura_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "7c5d0f1b253663f257aecdbd0ee43506", "score": "0.70048505", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('plananualservicio_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "d4a82e253c16b79357234bd2ea515d7d", "score": "0.70020723", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('basketitem_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "d3de21c9ba8ad16c410daabfb6452780", "score": "0.7001712", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('item_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "e2234710ec00f6dfe190b2dc6de4a55f", "score": "0.7001157", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('backend_filia_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Usuń'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "b59024068ae2d4444f96ef7f4321aa9a", "score": "0.70005435", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('anomalie_delete', array('id' => $id)))\n ->setMethod('POST')\n ->add('submit', 'submit', array(\n 'label' => 'Delete',\n 'attr' => array(\n 'class' => 'btn btn-danger')\n ))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "2dca61e3b5c2b5750c79a033d65b2c12", "score": "0.6999319", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('photo_species_validation_admin_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" } ]
21e298f46699b3e220890076c442093f
Start the transformation and return the result.
[ { "docid": "870d16f9104f7d422710031f4d2ede84", "score": "0.0", "text": "public function process($data = null)\n { \n if ($this->chainInput) $data = $this->chainInput->process($data);\n \n $this->writer = new \\xmlWriter();\n \t$this->writer->openMemory();\n \t$this->exec($data);\n \treturn $this->writer->flush();\n }", "title": "" } ]
[ { "docid": "773ae3ba4c2ecc5d85bed29ce328f392", "score": "0.64418143", "text": "public function transform();", "title": "" }, { "docid": "a6cfc97ac61159a8fa2c10c4c192b902", "score": "0.63021237", "text": "function run() {\n if (!$this->template) return throw(new TransformerException('Template malformed'));\n if (!$this->input) return throw(new TransformerException('Input malformed'));\n\n if (!($proc= &$this->template->createProcessor())) {\n return throw(new TransformerException('Syntax error'));\n }\n \n // Pass parameters, define input...\n foreach ($this->params as $name => $value) {\n $proc->addParameter($name, $value);\n }\n $proc->input= $this->input;\n\n // ...and transform\n if (TRUE !== $proc->transform()) {\n $proc->release();\n $proc= NULL;\n return throw(new TransformerException('Transformation failed'));\n }\n \n $this->output= $proc->output;\n $proc->release();\n $proc= NULL;\n return TRUE;\n }", "title": "" }, { "docid": "cd3ff30fab1a53586043a93f12ec8e6e", "score": "0.6154649", "text": "public function applyTransformations();", "title": "" }, { "docid": "88ced02558a3bb559c768f0f9385536b", "score": "0.6077324", "text": "abstract protected function transform();", "title": "" }, { "docid": "128769479e405e83681baddfdad3ea3f", "score": "0.58989125", "text": "public function next()\n {\n next($this->transformations);\n }", "title": "" }, { "docid": "2c7004484b7e79a92f4d1738e50d2778", "score": "0.58463544", "text": "public function transforms();", "title": "" }, { "docid": "65fc396186aefdaa30a413c82958afd6", "score": "0.5716159", "text": "public function transform() {\n\t\t$response = array();\n\n\t\tif (isset($this->errors['xmlparse']) || \n\t\t\tisset($this->errors['xslparse']) || \n\t\t\tisset($this->errors['imports'])) {\n\t\t\t$response['errors'] = $this->errors;\n\n\t\t\treturn $response;\n\t\t}\n\n\t\ttry {\n\t\t\t$this->xsl = $this->resolveImports($this->xsl);\n\n\t\t\t$proc = new XSLTProcessor;\n\t\t\t$proc->importStyleSheet($this->xsl);\n\n\t\t\t$timeStart = microtime(true);\n\n\t\t\t$response['result'] = $proc->transformToXML($this->xml);\n\n\t\t\t$timeEnd = microtime(true);\n\n\t\t\t$response['time'] = $timeEnd - $timeStart;\t\t\t\n\t\t} catch (Exception $exception) {\n\t\t\t$this->errors['transform'] = $exception->getMessage();\n\t\t}\n\n\t\tif (count($this->errors)) {\n\t\t\t$response['errors'] = $this->errors;\n\t\t}\n\n\t\t$response['imports'] = $this->usedImports;\n\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "81d801e485877d88fd0a5b1cdb3be3d6", "score": "0.55792385", "text": "abstract protected function transformer();", "title": "" }, { "docid": "3e76a2bececae2f15f3e15d85428f633", "score": "0.5380032", "text": "public function run()\n {\n $extractResult = $this->m_extract->run();\n if ($extractResult->getCode() == ETL_FAILED)\n {\n //extract failed\n $this->m_status = $extractResult;\n return (new ETLResult())->setStatus(ETL_FAILED,\"Extract Failed\");\n }\n\n $transformResult = $this->m_transform->run($this->m_extract->getData());\n if ($transformResult->getCode() == ETL_FAILED)\n {\n //transform failed\n $this->m_status = $transformResult;\n return (new ETLResult())->setStatus(ETL_FAILED,\"Transform Failed\");\n }\n\n $loadResult = $this->m_load->run($this->m_transform->getData());\n $this->m_status = $loadResult;\n if ($loadResult->getCode() == ETL_FAILED)\n {\n //load failed\n return (new ETLResult())->setStatus(ETL_FAILED,\"Load Failed\");\n }\n\n //return success\n return (new ETLResult())->setStatus(ETL_SUCCESS);\n }", "title": "" }, { "docid": "54d8645f1c3726130db042223f9e4766", "score": "0.52445954", "text": "public function transform($output);", "title": "" }, { "docid": "ffe9ae0642002ec2ca3ee8006e0c9f08", "score": "0.52174026", "text": "public function getTransformer();", "title": "" }, { "docid": "8dc00b4503e225471d1c36b999b40afb", "score": "0.51441735", "text": "public function tranfsorm(Closure $transform)\n {\n $this->transformation = $transform;\n }", "title": "" }, { "docid": "a8806eaf05201c0128808c6637a72749", "score": "0.5116694", "text": "public function transform($arg) {\n\t\t\n\t\t$this->url->manipulate('transformation', $arg);\n\t\t\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "cea4d67d5d24d9135210b26550be2459", "score": "0.50756335", "text": "public function execute() {\n\t\t\t\t\n\t\t$result = new ViewableData();\n\t\t$data = $this->getParameters();\n\t\t\n\t\t// Throw exception on null-xml\n\t\tif(!isset($data['xml'])){\n\t\t\tthrow new TranslateXMLCommand_Exception(\"Expected an XML string, but there is nothing given.\");\n\t\t}\n\n\t\t// Throw exception on null or empty xsl\n\t\tif(!isset($data['xsl']) or $data['xsl'] == '' ){\n\t\t\tthrow new TranslateXMLCommand_Exception(\"Expected an XSL file name, but there is none given.\");\n\t\t}\n\n\t\t// return empty string on empty-xml\n\t\tif($data['xml'] == ''){\n\t\t\treturn '';\n\t\t}\n\t\t\n\t\t$xml = $data['xml'];\n\t\t$xsl = $data['xsl'];\n\n\t\tif(! file_exists($xsl)){\n\t\t\tthrow new TranslateXMLCommand_Exception(\"There is something wrong with stylesheet $xsl!\");\n\t\t}\n\n\t\t\n\t\tif (!( strpos($xml, \"<?xml \" ) === 0 )) {\n\t\t\tthrow new TranslateXMLCommand_Exception(\"Invalid response. Expected an XML string, but received something else instead.\");\n\t\t}\n\n\t\t# LOAD XML FILE\n\t\t$XML = new DOMDocument();\n\t\t$XML->loadXML( $xml );\n\n\t\t# START XSLT\n\t\t$xslt = new XSLTProcessor();\n\t\t$XSL = new DOMDocument();\n\n\t\t$XSL->load( $xsl, LIBXML_NOCDATA);\n\t\t$xslt->importStylesheet( $XSL );\n\t\t# Transform XML into php structure\n\t\t$result = $xslt->transformToXML( $XML );\n\t\t$result = str_replace('<?xml version=\"1.0\"?>',\"\",$result);\n\n\t\treturn $result;\t\t\n\t}", "title": "" }, { "docid": "feb4fde01a26cf630c678237800b268b", "score": "0.5042097", "text": "public function current()\n {\n return current($this->transformations);\n }", "title": "" }, { "docid": "48063a13d70d12338351fd1292b72288", "score": "0.5018048", "text": "public function execute()\n {\n $this->_loadOutputFormats();\n $this->_loadProjection();\n $this->_loadShapes();\n $this->_loadSymbols();\n $this->_setWebConfig();\n $this->_setResolution();\n $this->_setUnits();\n $this->_setMapColor();\n $this->_setOutputFormat();\n $this->_setMapExtent();\n $this->_setMapSize();\n $this->_setZoom();\n $this->_setPan();\n $this->_setRotation();\n $this->_setCrop();\n $this->_addLayers();\n $this->addRegions();\n $this->addWKT();\n $this->addGraticules();\n $this->addCoordinates();\n $this->_addWatermark();\n $this->_prepareOutput();\n\n return $this;\n }", "title": "" }, { "docid": "efc1677ab32a211d1290397f34fe3092", "score": "0.4993577", "text": "public function onCreate()\n {\n $this->transform = $this->createTransform();\n $this->buffer = '';\n $this->context = null;\n\n if ($this->transform instanceof BufferedTransformInterface) {\n $this->bufferSize = $this->transform->bufferSize();\n } else {\n $this->bufferSize = 1024;\n }\n\n return true;\n }", "title": "" }, { "docid": "a65c83e4d3e52345b33d1051b89bacc0", "score": "0.49914962", "text": "public function run()\n {\n $autoloads = $this->getAutoloads();\n array_walk($autoloads, [$this, 'transform']);\n }", "title": "" }, { "docid": "f8e659b7ed67caac76cac809d3e690f7", "score": "0.49503875", "text": "public function start(Operation $op){\n\t\t$rqs \t= \t$op->getRequestService();\n\t\t$cs \t= \t$op->getContextService();\n\t\t$ts\t= \t$op->getTransformService();\n\t\t$rps \t= \t$op->getResponseService();\n\t\t\n\t\t$model\t\t= \t$rqs->processRequest();\n\t\t$context \t= \t$cs->getContext($model);\n\t\t\n\t\t$result \t\t= \t$ts->transform($context, $model);\n\t\t$context \t= \t$result[0];\n\t\t$model \t= \t$result[1];\n\t\t\n\t\t$cs->setContext($context);\n\t\techo $rps->processResponse($model);\n\t}", "title": "" }, { "docid": "dd1d03e8f4d3a28323eba917846fb4a7", "score": "0.49208638", "text": "public function rawStart($data)\n {\n $this->data = $this->api->post('/convert', $data);\n\n if ($this->data['status'] == 'error') {\n $this->step = 'error';\n $this->error_message = $this->data['error'];\n } else {\n $this->convert_id = $this->data['data']['id'];\n $this->step = 'convert';\n }\n return $this;\n }", "title": "" }, { "docid": "f1d02c767a527ea6a6d6c3346a09601d", "score": "0.4902832", "text": "public function transform($result)\n {\n return $result;\n }", "title": "" }, { "docid": "b7617ba61a79b48af8b5d6cf70371554", "score": "0.4899706", "text": "public function testTransform(): void\n {\n $this->document->getUuid()->willReturn('1234');\n\n $this->assertEquals('1234', $this->transformer->transform($this->document->reveal()));\n }", "title": "" }, { "docid": "6e29934bdb463ff7eac40d4d9313a2b7", "score": "0.4895374", "text": "abstract protected function _trans_begin(): bool;", "title": "" }, { "docid": "d09e1541807d8a275dfdde08423bc133", "score": "0.48913053", "text": "public function transform()\n {\n // Get uploaded image from tmp directory\n $imagine = new Imagine();\n $image = $imagine->open($this->data['tmp_name']);\n\n // Get path to tmp directory\n $tmpPathParts = explode(DS, $this->data['tmp_name']);\n array_pop($tmpPathParts); // remove filename from path\n $tmpPath = implode(DS, $tmpPathParts);\n\n // Process fullsize image\n if ($this->isTooBig($image)) {\n // Shrink image to max dimensions and save in tmp dir\n $size = new Box(2000, 2000);\n $mode = ImageInterface::THUMBNAIL_INSET;\n $tmpFullsize = microtime().$this->data['name'];\n $image->thumbnail($size, $mode)->save($tmpPath.DS.$tmpFullsize);\n $retval[$tmpPath.DS.$tmpFullsize] = $this->data['name'];\n } else {\n $retval[$this->data['tmp_name']] = $this->data['name'];\n }\n\n // Create thumbnail\n $size = new Box(200, 200);\n $mode = ImageInterface::THUMBNAIL_OUTBOUND;\n $thumbFilename = $this->generateThumbnailFilename($this->data['name']);\n $image->thumbnail($size, $mode)->save($tmpPath.DS.$thumbFilename);\n $retval[$tmpPath.DS.$thumbFilename] = $thumbFilename;\n\n return $retval;\n }", "title": "" }, { "docid": "8802341df281c26aeedb6e3eabdc4c21", "score": "0.48577043", "text": "public function transform($word)\n {\n return call_user_func($this->lambdaFunc, $word);\n }", "title": "" }, { "docid": "bea8495faa44604d916d7f72d4423c40", "score": "0.4851653", "text": "public function testTransformer()\n {\n $settings = new Settings();\n $transformer = m::mock('\\\\CodeYellow\\\\Sync\\\\Server\\\\Model\\\\TransformInterface');\n $data = [\n 'a' => [1, 2, 3],\n 'b' => [4, 5, 6],\n 'c' => [7, 8, 9]\n ];\n\n $transformer->shouldReceive('transform')->with($data);\n\n $result = new Result(\n $data,\n count($data),\n $settings,\n $transformer\n );\n }", "title": "" }, { "docid": "b53ae63719b7504c022aac3d32415985", "score": "0.4849643", "text": "public function start()\n {\n return $this;\n }", "title": "" }, { "docid": "a9cc255da08987bf27ab6b4de9c3b16a", "score": "0.4832156", "text": "public function apply()\n {\n return $this->perform();\n }", "title": "" }, { "docid": "2f45dc8d366b88084b1f0b3854ba9c1a", "score": "0.4831887", "text": "public function __invoke()\n {\n return $this->run();\n }", "title": "" }, { "docid": "e110dafc6b9e982756fb7e3a20749c9a", "score": "0.48305184", "text": "public function transform(Elasticsearch|Promise $result): mixed;", "title": "" }, { "docid": "1680f1410ce4665952b927121f5a35c1", "score": "0.48097518", "text": "public function run()\n {\n return call_user_func(\n array_reduce(\n array_reverse($this->pipes),\n $this->createPipelineCallback(),\n function ($request) {\n return ($this->callback === null) ? $request : call_user_func($this->callback, $request);\n }\n ),\n $this->request\n );\n }", "title": "" }, { "docid": "686aa8fc2aba1ce0f6749f0bc6145852", "score": "0.4795036", "text": "public function invoke()\n {\n $this->middleware[0]->call();\n $this->response()->finalize();\n\n return $this->response();\n }", "title": "" }, { "docid": "97e7667623b286be47cb58bc1fb71c9d", "score": "0.4788317", "text": "public function run() {\n\n // Apply the before middleware event\n if(!empty($this->before)) {\n\n $before = $this->exec($this->before);\n\n if(!is_null($before))\n $output = $before;\n\n }\n\n // Execute the main middleware action\n if(!isset($output))\n $output = $this->exec($this->action);\n\n // Apply the after middleware\n if(!empty($this->after)) {\n\n $after = $this->exec($this->after);\n\n if(!is_null($after))\n $output = $after;\n\n }\n\n\n $output = (is_bool($output) && $output ? 0 : $output);\n exit (is_null($output) ? 0 : intval($output));\n\n }", "title": "" }, { "docid": "2275856d4d6a2ec798b4fd455039466c", "score": "0.4783751", "text": "public function apply()\n {\n switch ($this->myDirection) {\n case 'output':\n $this->content = $this->flexiProxy->outputData;\n $this->process();\n $this->flexiProxy->outputData = $this->content;\n break;\n case 'input':\n $this->content = $this->flexiProxy->inputData;\n $this->process();\n $this->flexiProxy->inputData = $this->content;\n break;\n }\n }", "title": "" }, { "docid": "2fae8ed52737682c15c928b61c40ca69", "score": "0.47586626", "text": "public function run()\n {\n $this->_output = $this->_router->route($this->_input->getRequestMethod(), $this->_input->getRequestPath());\n return $this;\n }", "title": "" }, { "docid": "10064272d3500f45077152aeb17424a9", "score": "0.472126", "text": "public function transform(Document $document);", "title": "" }, { "docid": "337d56b7f65d90ffc23899eac6c61c57", "score": "0.4711466", "text": "abstract protected function transformData();", "title": "" }, { "docid": "683dae0f80c08a3246c946878c3233c5", "score": "0.47011593", "text": "public function run()\n {\n $this->position = $this->position + 4;\n\n return $this;\n }", "title": "" }, { "docid": "84272af5ff66246e6fbba1080e66f6e0", "score": "0.46931505", "text": "public function transformResult() {\n\t\t$this->resultData = $this->queryFetcher->get_resultData();\n\n\t\t// Retrieve keys after which to combine rows from queryController / queryGenerator\n\t\t$this->aquireJoinKeys();\n\n\t\t// Transform rows according to TS-rules - perform separation in sub-array depening on table\n\t\t$resultRows = array();\n\t\tif (is_array($this->resultData)) {\n\t\t\tforeach ($this->resultData as $idx => $dataArray) {\n\t\t\t\t$tmpRow = $this->transformRow($dataArray);\n\t\t\t\tif ($tmpRow) {\n\t\t\t\t\t$resultRows[] = $tmpRow;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Combine rows depending on joinKeys\n\t\tif (is_array($this->joinKeys) && count($this->joinKeys)) {\n\t\t\t$resultRows = $this->combineRows($resultRows);\n\t\t}\n\n\t\tif (is_array($this->useConfig['itemList.']['cObjects.']) && count($this->useConfig['itemList.']['cObjects.'])) {\n\t\t\tforeach ($resultRows as $idx => $dataArray) {\n\t\t\t\t$cObjects = $this->get_cObjects($dataArray, false, $idx);\n\t\t\t\tif (is_array($cObjects) && count($cObjects)) {\n\t\t\t\t\t$resultRows[$idx]['cObjects'] = $cObjects;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->resultData = $resultRows;\n\t\treturn $this->resultData;\n\t}", "title": "" }, { "docid": "dea1d838dc881333f98183e3a5b0661c", "score": "0.46922964", "text": "public function transform(): ETL\n {\n $args = func_get_args();\n\n if (is_array($args[1] ?? '')) {\n $query = $args[0];\n $params = $args[1] ?? [];\n $handle = $args[2] ?? 'morty';\n } else {\n $query = $args[0];\n $params = [];\n $handle = $args[1] ?? 'morty';\n }\n\n //Console::info(\"T -> \".($handle !== '' ? \"$handle = \" : '').\"(\".substr(str_replace([\"\\r\", \"\\n\", ' '], ' ', $query), 0, 30).\"...)\", '');\n Coffer::query($query, $params, $handle);\n //Console::success('...Wubbalubbadubdub!');\n return $this;\n }", "title": "" }, { "docid": "358ebc292f63bff200055f4875f67849", "score": "0.46758947", "text": "public function render()\n\t{\n\t\t$tmpDirectory = PATH_APP . DS . trim($this->config->get('tmppath', '/site/wiki/tmp'), DS);\n\t\t$inputEncoding = 'UTF-8';\n\n\t\t// To use inline TeX, you need to compile 'texvc' (in the 'math' subdirectory of\n\t\t// the MediaWiki package and have latex, dvips, gs (ghostscript), andconvert\n\t\t// (ImageMagick) installed and available in the PATH.\n\t\t// Please see math/README for more information.\n\n\t\t// Location of the texvc binary\n\t\t$b = '/usr/bin'; // dirname(__FILE__);\n\t\t$texvc = $b . DS . 'texvc';\n\n\t\tif ($this->mode == MW_MATH_SOURCE)\n\t\t{\n\t\t\t// No need to render or parse anything more!\n\t\t\treturn ('$ ' . htmlspecialchars($this->tex) . ' $');\n\t\t}\n\t\tif ($this->tex == '')\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tif (!$this->_recall())\n\t\t{\n\t\t\t// Ensure that the temp and output directories are available before continuing...\n\t\t\tif (!file_exists($tmpDirectory))\n\t\t\t{\n\t\t\t\tif (!$this->_makePath($tmpDirectory))\n\t\t\t\t{\n\t\t\t\t\treturn $this->_error('math_bad_tmpdir');\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif (!is_dir($tmpDirectory) || !is_writable($tmpDirectory))\n\t\t\t{\n\t\t\t\treturn $this->_error('math_bad_tmpdir');\n\t\t\t}\n\t\t\t// Ensure we have the texvc executable\n\t\t\tif (function_exists('is_executable') && !is_executable($texvc))\n\t\t\t{\n\t\t\t\treturn $this->_error('math_notexvc');\n\t\t\t}\n\t\t\t$cmd = $texvc . ' ' .\n\t\t\t\t\tescapeshellarg($tmpDirectory) . ' ' .\n\t\t\t\t\tescapeshellarg($tmpDirectory) . ' ' .\n\t\t\t\t\tescapeshellarg($this->tex) . ' ' .\n\t\t\t\t\tescapeshellarg($inputEncoding);\n\n\t\t\t//echo(\"TeX: $cmd\\n\");\n\t\t\t$contents = `$cmd`;\n\t\t\t//echo(\"TeX output:\\n $contents\\n---\\n\");\n\n\t\t\t/*\n\t\t\t\tStatus codes and HTML/MathML transformations are returned on stdout.\n\t\t\t\tA rasterized PNG file will be written to the output directory, named\n\t\t\t\tfor the MD5 hash code.\n\n\t\t\t\ttexvc output format is like this:\n\t\t\t\t +%5\t\tok, but not html or mathml\n\t\t\t\t c%5%h\tok, conservative html, no mathml\n\t\t\t\t m%5%h\tok, moderate html, no mathml\n\t\t\t\t l%5%h\tok, liberal html, no mathml\n\t\t\t\t C%5%h\\0%m\tok, conservative html, with mathml\n\t\t\t\t M%5%h\\0%m\tok, moderate html, with mathml\n\t\t\t\t L%5%h\\0%m\tok, liberal html, with mathml\n\t\t\t\t X%5%m\tok, no html, with mathml\n\t\t\t\t S\t\tsyntax error\n\t\t\t\t E\t\tlexing error\n\t\t\t\t F%s\t\tunknown function %s\n\t\t\t\t -\t\tother error\n\n\t\t\t\t \\0 - null character\n\t\t\t\t %5 - md5, 32 hex characters\n\t\t\t\t %h - html code, without \\0 characters\n\t\t\t\t %m - mathml code, without \\0 characters\n\t\t\t*/\n\n\t\t\tif (strlen($contents) == 0)\n\t\t\t{\n\t\t\t\treturn $this->_error('math_unknown_error1');\n\t\t\t}\n\n\t\t\t$retval = substr($contents, 0, 1);\n\t\t\t$errmsg = '';\n\t\t\tif (($retval == 'C') || ($retval == 'M') || ($retval == 'L'))\n\t\t\t{\n\t\t\t\tif ($retval == 'C')\n\t\t\t\t{\n\t\t\t\t\t$this->conservativeness = 2;\n\t\t\t\t}\n\t\t\t\telse if ($retval == 'M')\n\t\t\t\t{\n\t\t\t\t\t$this->conservativeness = 1;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->conservativeness = 0;\n\t\t\t\t}\n\t\t\t\t$outdata = substr($contents, 33);\n\n\t\t\t\t$i = strpos($outdata, \"\\000\");\n\n\t\t\t\t$this->html = substr($outdata, 0, $i);\n\t\t\t\t$this->mathml = substr($outdata, $i+1);\n\t\t\t}\n\t\t\telse if (($retval == 'c') || ($retval == 'm') || ($retval == 'l'))\n\t\t\t{\n\t\t\t\t$this->html = substr($contents, 33);\n\t\t\t\tif ($retval == 'c')\n\t\t\t\t{\n\t\t\t\t\t$this->conservativeness = 2;\n\t\t\t\t}\n\t\t\t\telse if ($retval == 'm')\n\t\t\t\t{\n\t\t\t\t\t$this->conservativeness = 1;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->conservativeness = 0;\n\t\t\t\t}\n\t\t\t\t$this->mathml = null;\n\t\t\t}\n\t\t\telse if ($retval == 'X')\n\t\t\t{\n\t\t\t\t//$this->html = null;\n\t\t\t\t$this->mathml = substr($contents, 33);\n\t\t\t\t$this->conservativeness = 0;\n\t\t\t}\n\t\t\telse if ($retval == '+')\n\t\t\t{\n\t\t\t\t//$this->html = null;\n\t\t\t\t//$this->mathml = null;\n\t\t\t\t$this->conservativeness = 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$errbit = htmlspecialchars(substr($contents, 1));\n\t\t\t\tswitch ($retval)\n\t\t\t\t{\n\t\t\t\t\tcase 'E':\n\t\t\t\t\t\t$errmsg = $this->_error('math_lexing_error', $errbit);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'S':\n\t\t\t\t\t\t$errmsg = $this->_error('math_syntax_error', $errbit);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'F':\n\t\t\t\t\t\t$errmsg = $this->_error('math_unknown_function', $errbit);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$errmsg = $this->_error('math_unknown_error2', $errbit);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!$errmsg)\n\t\t\t{\n\t\t\t\t $this->hash = substr($contents, 1, 32);\n\t\t\t}\n\n\t\t\tif ($errmsg)\n\t\t\t{\n\t\t\t\treturn $errmsg;\n\t\t\t}\n\n\t\t\tif (!preg_match(\"/^[a-f0-9]{32}$/\", $this->hash))\n\t\t\t{\n\t\t\t\treturn $this->_error('math_unknown_error3');\n\t\t\t}\n\n\t\t\tif (!file_exists(\"$tmpDirectory/{$this->hash}.png\"))\n\t\t\t{\n\t\t\t\treturn $this->_error('math_image_error');\n\t\t\t}\n\n\t\t\t$hashpath = $this->_getHashPath();\n\n\t\t\tif (!file_exists($hashpath))\n\t\t\t{\n\t\t\t\tif (!$this->_makePath($hashpath))\n\t\t\t\t{\n\t\t\t\t\treturn $this->_error('math_bad_output');\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif (!is_dir($hashpath) || !is_writable($hashpath))\n\t\t\t{\n\t\t\t\treturn $this->_error('math_bad_output');\n\t\t\t}\n\n\t\t\tif (!rename(\"$tmpDirectory/{$this->hash}.png\", \"$hashpath/{$this->hash}.png\"))\n\t\t\t{\n\t\t\t\treturn $this->_error('math_output_error');\n\t\t\t}\n\n\t\t\t// Now save it back to the DB:\n\t\t\t$outmd5_sql = $this->hash; //pack('H32', $this->hash);\n\t\t\t$md5_sql = $this->md5; //pack('H32', $this->md5); // Binary packed, not hex\n\n\t\t\t$wm = \\Components\\Wiki\\Models\\Formula::oneByInputhash($md5_sql);\n\t\t\tif (!$wm->get('id'))\n\t\t\t{\n\t\t\t\t$wm->set('inputhash', $this->_encodeBlob($md5_sql));\n\t\t\t\t$wm->set('outputhash', $this->_encodeBlob($outmd5_sql));\n\t\t\t\t$wm->set('conservativeness', (int)$this->conservativeness);\n\t\t\t\t$wm->set('html', (string)$this->html);\n\t\t\t\t$wm->set('mathml', (string)$this->mathml);\n\n\t\t\t\tif (!$wm->save())\n\t\t\t\t{\n\t\t\t\t\treturn $wm->getError();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $this->_doRender();\n\t}", "title": "" }, { "docid": "06349eb930084c7688c92dbf931a203c", "score": "0.4667487", "text": "function start()\n {\n $originalProps = $this->props;\n $response = new ET_PerformExtract($this->authStub, $this->props);\n //print_r($response);\n return $response;\n }", "title": "" }, { "docid": "6773902429d9362d876fc10ba013eb14", "score": "0.4655937", "text": "public function run()\n {\n $this->result = call_user_func_array($this->callable, $this->arguments);\n return $this->result;\n }", "title": "" }, { "docid": "f873b5c9deb0d3f1d306ccc55cf4d14c", "score": "0.4652247", "text": "public function forTemplate()\n {\n $this->performInuitTransformation();\n\n return parent::forTemplate();\n }", "title": "" }, { "docid": "f16bc37b2ec84c9d30576a33d3ef02f7", "score": "0.46428338", "text": "public function make($transformer);", "title": "" }, { "docid": "d84ecd9ebe7cb7ab1dbaf250345b2f58", "score": "0.46347606", "text": "protected function process()\n {\n parent::process();\n $this->result = $this->arrayToObject($this->result);\n }", "title": "" }, { "docid": "b1ef536c66335a63bf04eea4d319da56", "score": "0.45744625", "text": "public function startChain(){\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "9139e48d3739f46bc2c9731bd59fde11", "score": "0.45687947", "text": "abstract public function makeResult();", "title": "" }, { "docid": "93b493a42d0097f3e111104ccb349e8e", "score": "0.45680806", "text": "public function isTransformationSuccessful()\n {\n return $this->transformationSuccessful;\n }", "title": "" }, { "docid": "aee4cef1a0a630e96baecc1c28463b2b", "score": "0.45663783", "text": "protected function start()\n {\n $this->_timestart = time();\n return $this;\n }", "title": "" }, { "docid": "da65e865ee0847c07537d95902ae06a6", "score": "0.45617768", "text": "public function run()\n {\n $this->position = $this->position + 2;\n\n return $this;\n }", "title": "" }, { "docid": "564369c2f344927a3737492a4cd513ec", "score": "0.4559231", "text": "function transform(){\n //$this->is_admin = true;\n\n\n $t = new \\simplerest\\transformers\\UsersTransformer();\n\n $rows = DB::table('users')\n ->registerTransformer($t, $this)\n ->get();\n\n dd($rows);\n }", "title": "" }, { "docid": "f8222b54bb72849ff2a4be178c049f92", "score": "0.45538092", "text": "public function transform(Closure $transformBuilder): IndexTaskBuilder\n {\n $builder = new TransformBuilder();\n call_user_func($transformBuilder, $builder);\n\n if (!$builder->getTransforms()) {\n return $this;\n }\n\n $this->transformSpec = new TransformSpec(\n new TransformCollection(...$builder->getTransforms()),\n $builder->getFilter()\n );\n\n return $this;\n }", "title": "" }, { "docid": "7f755402505509aa1d026e720d598de9", "score": "0.45510823", "text": "public function rewind()\n {\n reset($this->transformations);\n }", "title": "" }, { "docid": "2fc75e05e66395d2d58eb581f87f1e98", "score": "0.4542074", "text": "public function pipe(callable $transform): self\n {\n $this->transforms[] = $transform;\n\n return $this;\n }", "title": "" }, { "docid": "a706c1759f0e5ba6d7f30609fc282b83", "score": "0.45368883", "text": "public function start()\n {\n return $this->start;\n }", "title": "" }, { "docid": "a706c1759f0e5ba6d7f30609fc282b83", "score": "0.45368883", "text": "public function start()\n {\n return $this->start;\n }", "title": "" }, { "docid": "42c3fba539c35db1a70d58dd29bd4dc7", "score": "0.4516435", "text": "public function start() {\n return $this->_start;\n }", "title": "" }, { "docid": "fb5c267c0423dc417f6f9359bdbaa42f", "score": "0.44819835", "text": "public function moveForward()\n {\n return $this->tire->rotate();\n }", "title": "" }, { "docid": "0fcf69e30e657f2cd5f2ee82d9a354d3", "score": "0.44812492", "text": "public function startOutputBuffering()\n {\n ob_start();\n return $this;\n }", "title": "" }, { "docid": "70f9a8e244f505bcdf64a9d5275da818", "score": "0.44798958", "text": "public static function transform(Awaitable $awaitable, callable $transform): Awaitable { }", "title": "" }, { "docid": "a7d7b1b5ba5cea9b9a15eb0358a9ae82", "score": "0.44696808", "text": "public function noTransform(): self\n {\n $this->noTransform = true;\n return $this;\n }", "title": "" }, { "docid": "74c3a378d308eb793a9cdf41778e3fb4", "score": "0.4467539", "text": "public function generate() {\n\t\t// Capture output\n\t\tob_start();\n\t\t\n\t\ttry {\n\t\t\t$this->render();\n\t\t\t// End output buffer and return contents\n\t\t\treturn ob_get_contents();\n\t\t\t\n\t\t} finally {\n\t\t\t// In case of exception or in case of success, we end output buffer\n\t\t\t// We let all exceptions get out\n\t\t\tob_end_clean();\n\t\t}\n\t}", "title": "" }, { "docid": "0a640278daab0d5327b549f57edb4eb6", "score": "0.44407383", "text": "public function start()\n {\n $this->output = $this->_view->fetch($this->_view_file);\n }", "title": "" }, { "docid": "d6aae2e39b82b8b28d04d79cc645d7f3", "score": "0.44358283", "text": "function transform($iterable, Composition $composition = null, Termination $termination = null, $initial = null)\n {\n return (new Transformer($iterable, $composition, $termination, $initial));\n }", "title": "" }, { "docid": "dcf6ce8013065ac0c3c3c839058c5102", "score": "0.44251508", "text": "public function process() {\n\t\tparent::process(); \n\t\t\n\t\t$this->initializeInput();\n\t\t\n\t\t//Process all inner inputs before processing ourselves\n\t\tforeach ($this->inputs as $inp) if (!$inp->processed) $inp->process();\n\t}", "title": "" }, { "docid": "f880520f39beb3b81e0280af13b6e66d", "score": "0.44221848", "text": "public function handle_run()\n\t {\n\t ob_start(); // Just start the buffer\n\t call_user_func_array($this->run_original, $this->arguments); // Just call it, with arguments!\n\t $html_content = ob_get_contents(); // Get all the content from the buffer\n\t ob_end_clean(); // And clean and end the buffer\n\t $javascript_content = $this->convertHTMLtoJS($html_content); // Converte para javascript \\o/\n\t return $javascript_content; //Just returns :D\n\t }", "title": "" }, { "docid": "b5c51506b39949fb7627c2692442cae3", "score": "0.43935025", "text": "public function transactionStart()\n\t{\n\t\t$this->setQuery('START TRANSACTION');\n\t\t$this->query();\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "bf59225ba5ad8ae934d7cded3781af8a", "score": "0.4391047", "text": "protected function transformer()\n {\n return new ProjectAssetTransformer;\n }", "title": "" }, { "docid": "4ee4d6f4a8ce358ed50e86ec2a49d692", "score": "0.4387659", "text": "public function getTransformations()\n {\n return $this->transformations;\n }", "title": "" }, { "docid": "c66ddacebea0bfb02dcf873f0df656c8", "score": "0.43662336", "text": "public function transform(callable $transformer): self\n {\n $transformer($this);\n\n return $this;\n }", "title": "" }, { "docid": "c85d4c6f588ee3e70fa16ddef1bb584f", "score": "0.43649724", "text": "function start() {}", "title": "" }, { "docid": "91d73f83bb88b1dc05e143c4850a3c7a", "score": "0.43644193", "text": "public function transform($object)\n{\n return $object;\n}", "title": "" }, { "docid": "9c1f97690e915e0aef3e0e24591afdcf", "score": "0.43569872", "text": "public function run()\n {\n $signature = $this->callback;\n return $this->object->$signature($this->params, $this->args);\n }", "title": "" }, { "docid": "f6ca9378fbcb3379666f152de5f315c0", "score": "0.4351692", "text": "public function compileAndRun(): Data\n\t{\n\t\t$compilableOutput = [];\n\t\t$compilableResultCode = 0;\n\n\t\tif (!$this->compilable($compilableOutput, $compilableResultCode))\n\t\t{\n\t\t\treturn $this->formatOutput($compilableOutput, $compilableResultCode);\n\t\t}\n\n\t\t$script = $this->prepareCompileAndRunScript();\n\t\t$output = [];\n\t\t$resultCode = 0;\n\n\t\t$this->runInDocker($script, $output, $resultCode);\n\n\t\treturn $this->formatOutput($output, $resultCode);\n\t}", "title": "" }, { "docid": "b91c10ec4898844197ba4d5aa813ebbe", "score": "0.4351333", "text": "function transform($text);", "title": "" }, { "docid": "8c0bfc36b3c4df4b8653477ab03b2025", "score": "0.43487924", "text": "private function transform()\n {\n $this->recordsTransformed = array();\n foreach($this->records as $key => $record) {\n $this->recordsTransformed[$record->getKey()] = $record;\n }\n }", "title": "" }, { "docid": "fff7fff7969922d918f9c496b773959d", "score": "0.43435344", "text": "function getTransform($db , $transformID) {\n // Pokud nenalezena zadna transformace, vrati NULL. \n $transform = NULL;\n // V databazi byla vytvorena tabulka 'Transform', kde jsou ulozeny parametry \n // vztahujici se k transformacim, konkretne jsou to 'rotate','translate' a 'scale'. \n // 'transformID' je transformace, ktera se aplikuje na kazdy konkretni POI. \n // SQL prikaz vracii transformaci, ktera ma stejne id jako hodnota $transformID pro kazdy POI. \n $sql_transform = $db->prepare('\n SELECT rel, \n angle, \n rotate_x,\n rotate_y,\n rotate_z,\n translate_x,\n translate_y,\n translate_z,\n scale\n FROM Transform\n WHERE id = :transformID \n LIMIT 0,1 '); \n\n // Svaze pojmenovany marker parametru ':transformID' se specifikovanou \n // hodnotou parametru $transformID \n $sql_transform->bindParam(':transformID', $transformID, PDO::PARAM_INT);\n // S pouzitim rozhrani PDO::execute() provede se pripraveny prikaz $sql_transform. \n $sql_transform->execute();\n // Nacteni transformaci poi. \n $rawTransform = $sql_transform->fetch(PDO::FETCH_ASSOC);\n\n /* Realizace vysledku $rawTransform */\n // pokud pole $rawTransform neni prazdne \n if ($rawTransform) {\n // Format hodnoty 'scale' bude zmenen na dekadicky.\n $transform['scale'] = changetoFloat($rawTransform['scale']);\n // organizace pole translate \n $transform['translate']['x'] =changetoFloat($rawTransform['translate_x']);\n $transform['translate']['y'] = changetoFloat($rawTransform['translate_y']);\n $transform['translate']['z'] = changetoFloat($rawTransform['translate_z']);\n // organizace pole rotate \n $transform['rotate']['axis']['x'] = changetoFloat($rawTransform['rotate_x']);\n $transform['rotate']['axis']['y'] = changetoFloat($rawTransform['rotate_y']);\n $transform['rotate']['axis']['z'] = changetoFloat($rawTransform['rotate_z']);\n $transform['rotate']['angle'] = changetoFloat($rawTransform['angle']);\n $transform['rotate']['rel'] = changetoBool($rawTransform['rel']);\n }//if \n \n return $transform;\n}", "title": "" }, { "docid": "37cc15997849863157a01219ccddd80f", "score": "0.43383613", "text": "public function startjobAction()\n {\n $this->disableLayout();\n $this->disableView();\n \n // create a task\n $userDao = $this->userSession->Dao;\n $componentLoader = new MIDAS_ComponentLoader();\n $kwbatchmakeComponent = $componentLoader->loadComponent('KWBatchmake', 'batchmake');\n $executeComponent = $componentLoader->loadComponent('Execute', 'rodent');\n $taskDao = $kwbatchmakeComponent->createTask($userDao);\n \n // export any data needed by the pipeline from midas\n $singleBitstreamItemParams = array(\"populationaverage\" => \"populationaverage\",\n \"populationaveragemask\" => \"populationaveragemask\",\n \"template\"=>\"template\",\n \"templatemask\"=>\"templatemask\",\n \"segmentation\" => \"segmentation\",\n \"imagegrid\" => \"imagegrid\");\n \n $singleBitstreamItemIds = array();\n\n // TODO need to keep cleaning up these exports, just working through params one at a time\n // as we develop the pipeline\n \n // first step is all items that have only one bitstream\n $inputParams = $this->_getAllParams();\n $configInputs = array();\n $substrInd = strlen($this->pipelinePrefix);\n foreach($inputParams as $inputParam => $value)\n {\n if(strpos($inputParam, $this->pipelinePrefix) === 0)\n {\n // collect all config inputs\n $configInputs[substr($inputParam, $substrInd)] = $value;\n // find the items needed to export\n $paramName = substr($inputParam, $substrInd);\n if(array_key_exists($paramName, $singleBitstreamItemParams))\n {\n $singleBitstreamItemIds[$paramName] = $value; \n }\n }\n }\n \n $configParamsToBitstreamPaths = $executeComponent->exportSingleBitstreamItemsToWorkDataDir($userDao, $taskDao, $singleBitstreamItemIds);\n\n // replace any exported item config params with their path values\n foreach($configParamsToBitstreamPaths as $configInput => $bitstreamPath) \n {\n $configInputs[$configInput] = $bitstreamPath; \n }\n \n \n // now that we have created a task, create a new folder for this task under\n // the outputFolder\n $outputFolderId = $configInputs[\"outputdirectory\"];\n $modelLoad = new MIDAS_ModelLoader();\n $folderModel = $modelLoad->loadModel('Folder');\n $outputFolderDao = $folderModel->createFolder('AS task ' . $taskDao->getKey() . ' Output', '', $outputFolderId);\n // now set the outputFolderId to be the newly created one\n $outputFolderId = $outputFolderDao->getKey();\n // set the newly created child folder id \n $configInputs['outputdirectory'] = $outputFolderId;\n\n\n \n \n $condorPostScriptPath = BASE_PATH . '/modules/rodent/library/py/as_condor_postscript.py';\n $configScriptStem = \"as\";\n $bmScript = \"as.pipeline.bms\";\n $executeComponent->executeScript($taskDao, $userDao, $condorPostScriptPath, $configScriptStem, $bmScript, $configInputs);\n\n \n// executeScript($taskDao, $userDao, $condorPostScriptPath, $configScriptStem, $bmScript, $configInputs)\n// -->>>>>> $taskDao, $userDao, condorPostScriptPath, $configScriptStem,$bmScript,$configInputs\n /*\n // generate and export midas client communication params\n $executeComponent = $componentLoader->loadComponent('Execute', 'rodent');\n $executeComponent->generatePythonConfigParams($taskDao, $userDao); \n\n \n $condorPostScriptPath = BASE_PATH . '/modules/rodent/library/py/as_condor_postscript.py';\n $configScriptStem = \"as\";\n\n $executeComponent->generateBatchmakeConfig($taskDao, $configInputs, $condorPostScriptPath, $configScriptStem);\n \n // export the batchmake scripts\n $bmScript = \"as.pipeline.bms\";\n $kwbatchmakeComponent->preparePipelineScripts($taskDao->getWorkDir(), $bmScript);\n $kwbatchmakeComponent->preparePipelineBmms($taskDao->getWorkDir(), array($bmScript));\n\n // generate and run the condor dag\n $kwbatchmakeComponent->compileBatchMakeScript($taskDao->getWorkDir(), $bmScript);\n $dagScript = $kwbatchmakeComponent->generateCondorDag($taskDao->getWorkDir(), $bmScript);\n $kwbatchmakeComponent->condorSubmitDag($taskDao->getWorkDir(), $dagScript);\n*/\n }", "title": "" }, { "docid": "4c7b31a76de59988182cce6dae74c7b8", "score": "0.43380556", "text": "public function processed();", "title": "" }, { "docid": "f9a0103f30cd9d72623af57ef9a988b7", "score": "0.43329418", "text": "abstract public function transform(array $data);", "title": "" }, { "docid": "71e349aa418419f3fc850f0c9b3e8ed5", "score": "0.4330612", "text": "public function start()\n {\n if (empty($this->pdfToSignPath)) {\n throw new \\Exception(\"The PDF to be signed was not set\");\n }\n\n if (empty($this->certificatePath)) {\n throw new \\Exception(\"The certificate was not set\");\n }\n\n // Generate transfer file\n $transferFile = parent::getTransferFileName();\n\n $args = array(\n $this->pdfToSignPath,\n $this->certificatePath,\n $this->config->getTransferDataFolder() . $transferFile\n );\n\n // Verify and add common options between signers\n parent::verifyAndAddCommonOptions($args);\n\n if (!empty($this->vrJsonPath)) {\n array_push($args, \"--visual-rep\");\n array_push($args, $this->vrJsonPath);\n }\n\n // Invoke command with plain text output (to support PKI Express < 1.3)\n $response = parent::invokePlain(parent::COMMAND_START_PADES, $args);\n\n // Parse output\n return parent::getResult($response, $transferFile);\n }", "title": "" }, { "docid": "ea74aae05d94a20756ad38dc0314ed86", "score": "0.43206882", "text": "public function process() {\n\t\t$output = $this->getItems();\n\t\t$this->fireEvent('render');\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "c67d7bf28fef98fe709d8b1b5efe1547", "score": "0.43190727", "text": "function start() {\n\t $this->open();\n\t $this->setHeader();\n\t $this->stream();\n\t $this->end();\n\t }", "title": "" }, { "docid": "de379a0cea87cf5b1d732198090ea3be", "score": "0.43176287", "text": "public function getTransformed()\n {\n if (null !== $this->transformed) {\n return $this->transformed;\n }\n\n if (null === $this->transfomer) {\n throw new TransfomerNotSetException('No transformer has been set for the result set.');\n }\n\n return $this->transformed = $this->transfomer->transform($this->getResults());\n }", "title": "" }, { "docid": "f86259ef41fdf27708b9f4503b8b0f17", "score": "0.43172094", "text": "public function flowStart(): FlowMapInterface\n {\n $this->flowStats['start'] = microtime(true);\n\n return $this;\n }", "title": "" }, { "docid": "3495bf51b5964e896f09e14bc901a18d", "score": "0.4316197", "text": "function run() {\n\t\t//$pullcase = new SimpleXMLElement($this->xml);\n\t\t$pullcase = $this->xmlobj;\n\t\t// Run thru steps that are in the XML if there are any\n\t\tif(!empty($pullcase->steps)) {\n\t\tforeach($pullcase->steps->step as $step) {\n\t\t\t$command=(string)$step->command;\n\t\t\t$parameter=(string)$step->parameter;\t\t\t\n\t\t\t// Skip URL Typing as this has already been done\n\t\t\tif($parameter!='url') {\n\t\t\t\tif($command=='type') { \n\t\t\t\t\t$this->$command($parameter,$this->parameter); \n\t\t\t\t} else {\n\t\t\t\t\t$this->$command($parameter);\n\t\t\t\t}\n\t\t\t}\n\t\t}}\n\t\t// Extract data according to the XML\n\t\t// Save the elements as an array to pass to outXML\n\t\t$html = $this->getSource();\n\t\t//echo $html;\n\t\treturn $this->outXML($html);\n\t}", "title": "" }, { "docid": "54cecfa3a18acc54ae861dd396731d41", "score": "0.43081284", "text": "public function renderSequence () {\n \n if ( 0 == func_num_args() ) {\n $this->_error(100, \"[xft2] renderSequence\", \"\");\n } else {\n $all_args = func_get_args();\n \n if (!file_exists($this->pathAddition.$all_args[0])) \n $this->_error(101, \"[xft2] renderSequence\", $this->pathAddition.$all_args[0]);\n \n /** Getting the last modification date of the orginal template-file. */\n $org_time = filemtime($this->pathAddition.$all_args[0]);\n \n $new_render = false;\n \n /** getting the render_template_name */ \n \n $part_1 = implode(\",\", array_keys($all_args[1])\t);\n \n /** part 2 becomes tricky */\n $temp = array_keys($all_args[2][0]);\n $part_2 = \"\";\n foreach($all_args[2] as $aRef) \t$part_2 .= $temp[0]; /** Please keep in mind, that it is a 2-d Array */\n \n $part_3 = implode(\",\", array_keys($all_args[3])\t);\n \n /** getting the md5-hash */\n $temp_md5 = (string)md5($part_1.$part_2.$part_3);\n \n /** Build the render-template-name */\n $render_template_name = $all_args[0].\".\".$temp_md5.\".tmpl\";\n \n /** Looking for the render-template-name in the cache-folder */\n if ( file_exists ($this->cachefolder.$render_template_name ) ) {\n \n /** File is there ... open */\n require ($this->cachefolder.$render_template_name);\n \n if ($org_time <= $test_time) {\n\n /** Direct return */\n return $result_str;\n \n } else {\n /** File to old ... new generate */\n $new_render = true;\n }\n } else {\n /** File isn't there ... generate */\n $new_render = true;\n }\n \n if (true == $new_render) {\n\n /** Holds the hole template-date in the array */\n $templateStrArray = file($this->pathAddition.$all_args[0]);\n \n /** first: declare the begin of the file */\n \n $temp_content = \"<?php\\n\\n/**\\n*\\tAutogenerated by x_fast_template2!\\n*\\tEdit on own risk!\\n*/\\n\\n\\$test_time=\\\"\".$org_time.\"\\\";\\n\\$result_str=\\\"\";\n \n /** \n * Head :: $templateStrArray[1]\n * A simple assoziative Array\n */\n \n $Pattern = Array();\n $Replace = Array();\n \n foreach($all_args[1] as $aLookUp => $aValue) {\n $Pattern[] = $this->__buildPattern($aLookUp);\n $Replace[] = \"\\\".\\$all_args[1]['\".$aLookUp.\"'].\\\"\";\n }\n $temp_content .= preg_replace($Pattern, $Replace, $templateStrArray[1]);\n \n /**\n * Body :: $templateStrArray[3]\n * A two dimensonal Array with an assoziative Array inside ...\n */\n $row_counter = 0;\n foreach($all_args[2] as $tempRow) {\n $Pattern = Array();\n $Replace = Array();\n foreach($tempRow as $aLookUp => $aValue) {\n $Pattern[] = $this->__buildPattern($aLookUp);\n $Replace[] = \"\\\".\\$all_args[2][\".$row_counter.\"]['\".$aLookUp.\"'].\\\"\";\n }\n $temp_content .= preg_replace($Pattern, $Replace, $templateStrArray[3]);\n $row_counter++;\n }\n \n /** \n * Foot :: $templateStrArray[5]\n * Also a simple assoziative Array\n */\n $Pattern = Array();\n $Replace = Array();\n \n foreach($all_args[3] as $aLookUp => $aValue) {\n $Pattern[] = $this->__buildPattern($aLookUp);\n $Replace[] = \"\\\".\\$all_args[3]['\".$aLookUp.\"'].\\\"\";\t\t\t\t\t\n }\n $temp_content .= preg_replace($Pattern, $Replace, $templateStrArray[5]);\n \n /** Making the End ... */\n $temp_content .= \"\\\";\\n?>\\n\";\n \n /**\n * Puh - ready to write ...\n *\n */\n $fp = fopen($this->cachefolder.$render_template_name, 'w');\n if ($fp) {\n fwrite($fp, $temp_content, strlen($temp_content) );\n fclose($fp);\n \n require ($this->cachefolder.$render_template_name);\n \n return $result_str;\n \n } else {\n return \"Error: couldn't write render!\";\n }\n }\n }\n }", "title": "" }, { "docid": "d3837a12d1f57e9c80946eb69fded963", "score": "0.42940995", "text": "public function transform($value)\n {\n }", "title": "" }, { "docid": "928e402be54f9e1fc08723148fd050f4", "score": "0.42918026", "text": "public function apply();", "title": "" }, { "docid": "960ffa7d18f9b634abe7cc522f47db56", "score": "0.4289694", "text": "public function transformAction()\n {\n $mytunesParams = $this->getRequest()->getParam('mytunes');\n if (is_null($mytunesParams) || !isset($mytunesParams['transform'])) {\n $this->_forward('error', 404);\n }\n\n $mytunesTypeId = Que_Mytunes_Model_Product_Type::TYPE_MYTUNES;\n $productId = $mytunesParams['transform']['product_id'];\n $newSku = $mytunesParams['transform']['newsku'];\n $keepSimpleProduct = (boolean) $mytunesParams['transform']['keepsimple'];\n\n $newProductId = $productId;\n\n if ($keepSimpleProduct) {\n // duplicate simple product first\n $oldProduct = Mage::getModel('catalog/product')->load($productId);\n try {\n $newProduct = $oldProduct->duplicate();\n $newProductId = $newProduct->getId();\n $this->_getSession()->addSuccess($this->__('The Simple Product has been duplicated.'));\n } catch (Exception $e) {\n Mage::logException($e);\n $this->_getSession()->addError($e->getMessage());\n }\n }\n\n // simply change sku and product type in catalog_product_entity\n $conn = Mage::getSingleton('core/resource')->getConnection('core_write');\n $conn->query(\"UPDATE `catalog_product_entity` SET `sku`=?, `type_id`=? WHERE `entity_id`=?\", array($newSku, $mytunesTypeId, $newProductId));\n\n $this->_getSession()->addSuccess($this->__('The product was transformed to a Mytunes Product. You can now add Mytunes Options to it.'));\n $this->_redirect(\"adminhtml/catalog_product/edit\", array('_current'=>true, 'id' => $newProductId, 'active_tab' => 'mytunes_options'));\n\n }", "title": "" }, { "docid": "6075be94f402b3ab77e8b1c0072172e4", "score": "0.4285648", "text": "public function transform($item)\n {\n }", "title": "" }, { "docid": "e78f2796e20463aa32d5cdf7e2e014bb", "score": "0.42854056", "text": "public function run() {\r\n try {\r\n $fileName = $this->getFileName();\r\n $debug = $this->debug();\r\n $this->processor->process(\r\n $fileName,\r\n $debug\r\n );\r\n } catch (Exception $e) {\r\n echo $e->getMessage();\r\n }\r\n echo \"\\033[32m You've succesfully created a XML to CSV! \\033[0m \\n\";\r\n }", "title": "" }, { "docid": "684565acc27028888e4ad78de1fc380b", "score": "0.42841193", "text": "public function start();", "title": "" }, { "docid": "684565acc27028888e4ad78de1fc380b", "score": "0.42841193", "text": "public function start();", "title": "" }, { "docid": "684565acc27028888e4ad78de1fc380b", "score": "0.42841193", "text": "public function start();", "title": "" }, { "docid": "684565acc27028888e4ad78de1fc380b", "score": "0.42841193", "text": "public function start();", "title": "" }, { "docid": "684565acc27028888e4ad78de1fc380b", "score": "0.42841193", "text": "public function start();", "title": "" }, { "docid": "684565acc27028888e4ad78de1fc380b", "score": "0.42841193", "text": "public function start();", "title": "" }, { "docid": "684565acc27028888e4ad78de1fc380b", "score": "0.42841193", "text": "public function start();", "title": "" }, { "docid": "684565acc27028888e4ad78de1fc380b", "score": "0.42841193", "text": "public function start();", "title": "" } ]
bef7a67b6f086c0b04564e92a9800ae5
Provide a list of options for the default operator form. Should be overridden by classes that don't override operatorForm.
[ { "docid": "2f59332d48f8dbcd2fcc25efba8582ab", "score": "0.7595293", "text": "public function operatorOptions() {\n return [];\n }", "title": "" } ]
[ { "docid": "56123e6ade2df863610cf9ce6080ed43", "score": "0.71107495", "text": "public function operatorOptions() {\n return [\n 'contains' => 'contains',\n 'starts' => 'starts',\n 'ends' => 'ends',\n 'regex' => 'regex',\n ];\n }", "title": "" }, { "docid": "eb679fd591c4a901ec52a5ac4f6aabf3", "score": "0.70082164", "text": "function operator_options($which = 'title') {\n $options = array();\n foreach ($this->operators() as $id => $info) {\n $options[$id] = $info[$which];\n }\n\n return $options;\n }", "title": "" }, { "docid": "9b03b38744bf73c304027ee261af3330", "score": "0.67620337", "text": "protected function operatorForm(&$form, FormStateInterface $form_state) {\n $options = $this->operatorOptions();\n if (!empty($options)) {\n $form['operator'] = [\n '#type' => count($options) < 10 ? 'radios' : 'select',\n '#title' => $this->t('Operator'),\n '#default_value' => $this->operator,\n '#options' => $options,\n ];\n }\n }", "title": "" }, { "docid": "df45cb448a1b1a769bf37fda1871a12f", "score": "0.6654763", "text": "public function getFormOptions();", "title": "" }, { "docid": "2f675bbdeb265ec3d15c3ced7ae48ea7", "score": "0.6613874", "text": "protected function getOptions()\n {\n return [\n // ['all', 'a', InputOption::VALUE_NONE, 'Generate a migration, seeder, factory, policy, and resource controller for the model'],\n ];\n }", "title": "" }, { "docid": "a8996e5cc71bfa3554acd5bdeb5c6fcd", "score": "0.65467036", "text": "protected function getOptions()\r\n {\r\n return [\r\n [\r\n 'compact',\r\n 'c',\r\n InputOption::VALUE_NONE,\r\n 'Show reduced version'\r\n ]\r\n ];\r\n }", "title": "" }, { "docid": "3d72ae35b062f878baa58f47c218bc19", "score": "0.64995766", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\tarray('ngdashboard', null, InputOption::VALUE_NONE, 'Adds a angular basic dashboard view and controller for service', null),\n\t\t\tarray('ngservice', null, InputOption::VALUE_NONE, 'Adds angular basic service', null),\n\t\t);\n\t}", "title": "" }, { "docid": "46c585b265ceea12f33f18b5f60a8ec9", "score": "0.6479527", "text": "protected function getOptions()\n {\n return [\n ['force', 'f', InputOption::VALUE_NONE, 'Create the class even if the class already exists'],\n ['request', 'r', InputOption::VALUE_NONE, 'Create a FormRequest for the form'],\n ];\n }", "title": "" }, { "docid": "f468b1e2c7aaa4de9312098bd6ae67e4", "score": "0.6440296", "text": "protected function getOptions()\n {\n return [\n ['yaml', 'y', InputOption::VALUE_NONE, 'Creates yaml config file with form class.'],\n ['array', 'a', InputOption::VALUE_NONE, 'Creates array config file with form class.'],\n ];\n }", "title": "" }, { "docid": "23bc841f325a562284d327a4c0fac457", "score": "0.6429333", "text": "protected function getOptions()\n {\n return [\n ['parent', 'p', InputOption::VALUE_NONE, 'Generate a nested resource request class.'],\n ['force', 'f', InputOption::VALUE_NONE, 'Force the operation to run when in production'],\n ];\n }", "title": "" }, { "docid": "49b5fb375b57ab9798f00fabdb3e48b4", "score": "0.64287627", "text": "protected function getOptions()\n {\n return [\n ['all', 'a', InputOption::VALUE_NONE,\n 'Create new service, repository, model file for the controller.'],\n\n ['service', 's', InputOption::VALUE_NONE,\n 'Create a new service file for the controller.'],\n\n ['repository', 'r', InputOption::VALUE_NONE,\n 'Create a new repository file for the controller.'],\n\n ['model', 'm', InputOption::VALUE_NONE,\n 'Create a new model file for the controller.'],\n ];\n }", "title": "" }, { "docid": "fe32e14c7d2c07b2bb47608d0f3ab58a", "score": "0.64068943", "text": "protected function getOptions()\r\n {\r\n return [\r\n\r\n ['pivot', 'p', InputOption::VALUE_NONE, 'Indicates if the generated model should be a custom intermediate table model'],\r\n\r\n ['transformers', 't', InputOption::VALUE_NONE, 'Indicates if should be generated a Transformer for this model'],\r\n ];\r\n }", "title": "" }, { "docid": "33ab3284fc82d0905c9ed70da84e4ee4", "score": "0.64022267", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n \n\t}", "title": "" }, { "docid": "2086dc878ea99dbce27c7e7cd6f3ecb0", "score": "0.63925016", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "title": "" }, { "docid": "2c55e5b0072434694f2c335d2828aa8a", "score": "0.63853353", "text": "protected function getOptions()\n {\n return [\n ['create', 'm', InputOption::VALUE_REQUIRED, 'Table name'],\n ['fields', null, InputOption::VALUE_OPTIONAL, 'Get fields array, use comma as separator'],\n ];\n }", "title": "" }, { "docid": "4a38fff4aa7bed361b994ba58a890937", "score": "0.6384877", "text": "protected function getOptions() {\n return [\n ];\n }", "title": "" }, { "docid": "1bcbb76d11ec16743e3cf8b2abc40fbd", "score": "0.6376398", "text": "protected function getOptions()\n {\n return [\n ['table', 't', InputOption::VALUE_OPTIONAL, 'Set the table for the model.'],\n ['present', 'p', InputOption::VALUE_NONE, 'Generate a Presenter for the model.']\n ];\n }", "title": "" }, { "docid": "1a334cb57889f6e27dabc992a164d6a7", "score": "0.6374612", "text": "protected function getOptions()\n\t{\n\t\treturn [\n\n\t\t];\n\t}", "title": "" }, { "docid": "ca9b6599cbbd0aa3a29b4b918062e359", "score": "0.6351223", "text": "protected function getOptions()\n {\n return [\n\n ];\n }", "title": "" }, { "docid": "ca9b6599cbbd0aa3a29b4b918062e359", "score": "0.6351223", "text": "protected function getOptions()\n {\n return [\n\n ];\n }", "title": "" }, { "docid": "061d29c728bc3b375bdefe45dacf7140", "score": "0.633907", "text": "protected function getOptions()\n {\n return [\n ['reconcile', 'r', InputOption::VALUE_NONE, 'Reconcile any differences'],\n ];\n }", "title": "" }, { "docid": "e5e3dc7676fb3616baf90d2bdd50d071", "score": "0.6335811", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\tarray('full', null, InputOption::VALUE_NONE, 'Full daily import?'),\n\t\t);\n\t}", "title": "" }, { "docid": "28e641c761d568a5d63b74b1b7b5cbdb", "score": "0.6328558", "text": "protected function getOptions()\n {\n return array(\n array('all', null, InputOption::VALUE_NONE, 'Delete all the notes.', null),\n );\n }", "title": "" }, { "docid": "e4333c292e6a2bc4d11cdc623dc9bb8a", "score": "0.63256204", "text": "protected function getOptions()\n {\n return [\n ];\n }", "title": "" }, { "docid": "e4333c292e6a2bc4d11cdc623dc9bb8a", "score": "0.63256204", "text": "protected function getOptions()\n {\n return [\n ];\n }", "title": "" }, { "docid": "e4333c292e6a2bc4d11cdc623dc9bb8a", "score": "0.63256204", "text": "protected function getOptions()\n {\n return [\n ];\n }", "title": "" }, { "docid": "e4333c292e6a2bc4d11cdc623dc9bb8a", "score": "0.63256204", "text": "protected function getOptions()\n {\n return [\n ];\n }", "title": "" }, { "docid": "e4333c292e6a2bc4d11cdc623dc9bb8a", "score": "0.63256204", "text": "protected function getOptions()\n {\n return [\n ];\n }", "title": "" }, { "docid": "9ccc12275c2f2a39f54e60518079d2a5", "score": "0.63156027", "text": "protected function defineOptions() {\n $options = parent::defineOptions();\n $options['label']['default'] = NULL;\n\n $options['if'] = ['default' => ''];\n $options['condition'] = ['default' => ''];\n $options['equalto'] = ['default' => ''];\n $options['then'] = ['default' => ''];\n $options['or'] = ['default' => ''];\n $options['strip_tags'] = ['default' => FALSE];\n return $options;\n }", "title": "" }, { "docid": "3794f3dde4b0e84cac216889423050fc", "score": "0.6309035", "text": "protected function getOptions()\n {\n return [\n ['model', 'm', InputOption::VALUE_OPTIONAL, 'The model that the policy applies to'],\n ];\n }", "title": "" }, { "docid": "f853b3ed7a8dfafbf4e713dc783a101a", "score": "0.63083065", "text": "public function options() {\r\n\t\treturn array();\r\n\t}", "title": "" }, { "docid": "4fcf67db89683a21345407f913141c07", "score": "0.6307264", "text": "public function getOptions()\n {\n $parent = parent::getOptions();\n $return = [\n\n [\n 'web',\n '',\n InputOption::VALUE_NONE,\n 'Create a web route.',\n null\n ],\n\n ];\n\n return array_merge($parent, $return);\n }", "title": "" }, { "docid": "0def18921e9fe2855e9c2c858e2afd7b", "score": "0.627942", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n array('queuefunc', null, InputOption::VALUE_OPTIONAL, 'Queue Function', null),\n );\n\t}", "title": "" }, { "docid": "1b8d9352a2322e037f73d82c446fa398", "score": "0.6274922", "text": "protected function getOptions()\n\t{\n\t\treturn [\n\t\t];\n\t}", "title": "" }, { "docid": "1b8d9352a2322e037f73d82c446fa398", "score": "0.6274922", "text": "protected function getOptions()\n\t{\n\t\treturn [\n\t\t];\n\t}", "title": "" }, { "docid": "1b8d9352a2322e037f73d82c446fa398", "score": "0.6274922", "text": "protected function getOptions()\n\t{\n\t\treturn [\n\t\t];\n\t}", "title": "" }, { "docid": "1b8d9352a2322e037f73d82c446fa398", "score": "0.6274922", "text": "protected function getOptions()\n\t{\n\t\treturn [\n\t\t];\n\t}", "title": "" }, { "docid": "82501668a7971690f348da7a91e9138f", "score": "0.6269944", "text": "protected function getOptions()\n {\n return [\n ['fields', null, InputOption::VALUE_OPTIONAL, 'Fields for the form and table migration', 'name:string']\n ];\n }", "title": "" }, { "docid": "18398b8adbcad6cecad67646f0829f08", "score": "0.6267277", "text": "protected function getOptions()\n {\n return [\n\n ['force', 'f', InputOption::VALUE_NONE, 'force Generate.'],\n ['trait', 't', InputOption::VALUE_NONE, 'Generate Custom Repository Trait class.'],\n ['suffix', 's',InputOption::VALUE_REQUIRED, 'The suffix of the class','Repository'],\n ['database', 'd', InputOption::VALUE_REQUIRED, 'a database class name'],\n\n\n ];\n\n }", "title": "" }, { "docid": "dcd5e50af5fc8133a923280e84854ca2", "score": "0.62613285", "text": "protected function getMatchOperatorOptions() {\n return [\n '=' => t('Equals'),\n 'STARTS_WITH' => t('Starts with'),\n 'CONTAINS' => t('Contains'),\n 'ENDS_WITH' => t('Ends with'),\n ];\n }", "title": "" }, { "docid": "ea00d9a5e31db5b2c800b825b2188d3e", "score": "0.6260293", "text": "protected function getOptions()\n {\n return [\n ['model', 'm', InputOption::VALUE_REQUIRED, 'The model class being represented.'],\n ];\n }", "title": "" }, { "docid": "8f150c9f9b0a70228662bdaf740accc7", "score": "0.62517864", "text": "protected function getOptions()\n {\n return [\n ['force', 'f', InputOption::VALUE_NONE, 'Create the class even if the repository already exists.'],\n ['interface', 'i', InputOption::VALUE_NONE, 'Create a new interface for the repository.'],\n ];\n }", "title": "" }, { "docid": "921c2d961c960efd457a43f26a1459e9", "score": "0.6248919", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\t//array('days', null, InputOption::VALUE_OPTIONAL, 'How many days to search back.', 1),\n\t\t);\n\t}", "title": "" }, { "docid": "e08a78a2943ba4c8256c036f057b8f51", "score": "0.62477684", "text": "protected function getOptions()\n {\n return [\n ['force', 'f', InputOption::VALUE_NONE, 'Create the class even if the controller already exists.'],\n ['resource', 'r', InputOption::VALUE_NONE, 'Generate a resource controller class.'],\n ['only', 'o', InputOption::VALUE_OPTIONAL, 'Select methods for generate.'],\n ['model', 'm', InputOption::VALUE_OPTIONAL, 'Inject or create model from App\\\\Models.'],\n ];\n }", "title": "" }, { "docid": "21d5b6741e16a2c24c4047da3dd93c28", "score": "0.6246907", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n\n\t\t);\n\t}", "title": "" }, { "docid": "21d5b6741e16a2c24c4047da3dd93c28", "score": "0.6246907", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n\n\t\t);\n\t}", "title": "" }, { "docid": "f3dbb787e287481f491da78c00e1a9fa", "score": "0.6237106", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\t'locale', 'l', \n\t\t\t\tInputOption::VALUE_IS_ARRAY|InputOption::VALUE_OPTIONAL, \n\t\t\t\t'Specify for which locale to make a language file.', \n\t\t\t\tnull\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "a15c9ca271a181fe5763042bbd2abebd", "score": "0.62347496", "text": "protected function getOptions()\n {\n return array(\n array('plain', '-p', InputOption::VALUE_NONE, 'Create a plain controller')\n );\n }", "title": "" }, { "docid": "de32e334283dc04fa0665afe648fd846", "score": "0.62265694", "text": "public function getOptions()\n {\n return [\n ['format', null, InputOption::VALUE_REQUIRED, 'The format to get the results in'],\n ['threshold', 'T', InputOption::VALUE_REQUIRED, 'The usage threshold to use'],\n ];\n }", "title": "" }, { "docid": "4d2b2ffec0e125dc0ae2b0b8cb365a34", "score": "0.62262017", "text": "protected function getOptions()\n {\n return array(\n array('table', null, InputOption::VALUE_REQUIRED, 'the table to replicate'),\n array('sort', null, InputOption::VALUE_REQUIRED, '排序的字符串', ''),\n array('source', null, InputOption::VALUE_OPTIONAL, 'source database', 'business'),\n array('target', null, InputOption::VALUE_OPTIONAL, 'target database', 'dc'),\n array('step', null, InputOption::VALUE_OPTIONAL, 'the step', 1000),\n array('columns', null, InputOption::VALUE_OPTIONAL, '需要迁移的数据列', '*'),\n array('prefix', null, InputOption::VALUE_OPTIONAL, '新表的名称', 'odsb_'),\n );\n }", "title": "" }, { "docid": "459c5ccbde7eac01a87de6b3424b69c2", "score": "0.62190986", "text": "protected function getOptions()\n {\n return [\n ['unit', null, InputOption::VALUE_NONE, 'Create a unit test'],\n ];\n }", "title": "" }, { "docid": "451286e1d072abac99128431041936fd", "score": "0.6216388", "text": "protected function getOptions()\n {\n return [\n ['api', null, InputOption::VALUE_NONE, 'Exclude the create and edit methods from the controller.'],\n ['model', 'm', InputOption::VALUE_OPTIONAL, 'Generate a resource controller for the given model.'],\n ];\n }", "title": "" }, { "docid": "0cb5360bfb75bcba73161e3f5a96e45c", "score": "0.62081206", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "title": "" }, { "docid": "0cb5360bfb75bcba73161e3f5a96e45c", "score": "0.62081206", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "title": "" }, { "docid": "0cb5360bfb75bcba73161e3f5a96e45c", "score": "0.62081206", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "title": "" }, { "docid": "0cb5360bfb75bcba73161e3f5a96e45c", "score": "0.62081206", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "title": "" }, { "docid": "0cb5360bfb75bcba73161e3f5a96e45c", "score": "0.62081206", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "title": "" }, { "docid": "0cb5360bfb75bcba73161e3f5a96e45c", "score": "0.62081206", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "title": "" }, { "docid": "0cb5360bfb75bcba73161e3f5a96e45c", "score": "0.62081206", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "title": "" }, { "docid": "1d9fe42f26169d535ad4de1266acca93", "score": "0.62069494", "text": "protected function getOptions()\n {\n return [\n ['force', null, InputOption::VALUE_NONE, 'Create the class even if the view composer already exists'],\n ['views', null, InputOption::VALUE_NONE, 'Create a view composer with a pre-defined set of views'],\n ];\n }", "title": "" }, { "docid": "773708629a1802d007b03285c95220c8", "score": "0.6202656", "text": "protected function getOptions()\n {\n return [\n ['update', null, InputOption::VALUE_NONE, 'If this option is given database will be updated.', null],\n ];\n }", "title": "" }, { "docid": "640bafd73939e401b2d7e3664bcd24d1", "score": "0.6193249", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n//\t\t\tarray('update', null, InputOption::VALUE_REQUIRED, 'Updates a setting with an id given here.', false),\n\t\t\tarray('delete', null, InputOption::VALUE_REQUIRED, 'Deletes a setting with an id given here.', false)\n\t\t);\n\t}", "title": "" }, { "docid": "3d6486c74caca5ead7b77dd5d8b81d20", "score": "0.61849433", "text": "protected function getOptions()\n {\n return [\n ['force', 'f', InputOption::VALUE_NONE, 'Whether force to rewrite.'],\n ['namespace', 'N', InputOption::VALUE_OPTIONAL, 'The namespace for class.', null],\n ];\n }", "title": "" }, { "docid": "7840dc5c0daba66729a41b9b6638e32b", "score": "0.6172776", "text": "protected function getOptions()\n {\n return [\n ['base', 'b', InputOption::VALUE_OPTIONAL, '是否创建一个空的控制器']\n ];\n }", "title": "" }, { "docid": "60eecadbbe6655a4ba054bd0d371adf3", "score": "0.615434", "text": "protected function getOptions()\n {\n return array_merge(parent::getOptions(), [\n ['without-stats-submission', null, InputOption::VALUE_NONE, 'Do not submit anonymous migration statistics to statamic.com'],\n ]);\n }", "title": "" }, { "docid": "41809d36d0258f655c83e1f278c9e3f1", "score": "0.61542255", "text": "protected function getOptions()\n {\n return [\n ['model', 'm', InputOption::VALUE_OPTIONAL, 'The model that the repository applies to.'],\n\n ['resource', 'r', InputOption::VALUE_NONE, 'Generate a resource controller class.'],\n ];\n }", "title": "" }, { "docid": "6e4f014aba8f81f5fcc26b8d183f54a6", "score": "0.61483216", "text": "protected function getOptions()\n {\n return [\n ['reset', null, InputOption::VALUE_NONE, 'Starts a sync from the beginning', null],\n ['limit', null, InputOption::VALUE_OPTIONAL, 'Number of records per type to import', null],\n ];\n }", "title": "" }, { "docid": "0d5cd88429aee95e945b5e74610677c7", "score": "0.6148183", "text": "protected function getOptions()\n {\n return [\n ['force', null, InputOption::VALUE_NONE, 'Overwrite any existing files.'],\n ['routes', null, InputOption::VALUE_NONE, 'Publish with routes.'],\n ];\n }", "title": "" }, { "docid": "75b4c1e56137516c13f117ddeb478aa7", "score": "0.6146798", "text": "protected function getOptions()\n {\n return array(\n array('plagins', null, InputOption::VALUE_REQUIRED, 'this plagins')\n );\n }", "title": "" }, { "docid": "63765611fa66e3b2db7220eb5dd1b1a1", "score": "0.61414695", "text": "protected function getOptions()\n {\n return [\n ['setup', 's', InputOption::VALUE_NONE, 'CltvoSower method to overwrite'],\n ];\n }", "title": "" }, { "docid": "72660952c7b35a35a9a2b0e4572bcd1f", "score": "0.61370146", "text": "protected function getOptions()\n {\n return [\n ['force', null, InputOption::VALUE_NONE, 'Force the operation to run when in production.'],\n ];\n }", "title": "" }, { "docid": "7176eb4452ecdf2aa5f0f4ac4187cfb9", "score": "0.6136385", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\tarray('handler', null, InputOption::VALUE_NONE, 'Indicates that handler class should be generated.'),\n\n\t\t\tarray('queued', null, InputOption::VALUE_NONE, 'Indicates that command should be queued.'),\n\t\t);\n\t}", "title": "" }, { "docid": "eb935edafb5b2c6ea7eda0525f425adf", "score": "0.61357707", "text": "protected function getOptions()\n {\n return [\n ['all', 'a', InputOption::VALUE_NONE, 'Generate a migration, seeder, factory for the model'],\n ['factory', 'f', InputOption::VALUE_NONE, 'Create a new factory for the model'],\n ['force', null, InputOption::VALUE_NONE, 'Create the class even if the model already exists'],\n ['migration', 'm', InputOption::VALUE_NONE, 'Create a new migration file for the model'],\n ['seed', 's', InputOption::VALUE_NONE, 'Create a new seeder file for the model'],\n ['pivot', 'p', InputOption::VALUE_NONE, 'Indicates if the generated model should be a custom intermediate table model'],\n ];\n }", "title": "" }, { "docid": "fa0f512afbde17e822c8d99f79456859", "score": "0.61356", "text": "protected function getOptions()\n {\n return array_merge(parent::getOptions(),[\n ['prefix', 'p', InputOption::VALUE_OPTIONAL, 'Prefix.'],\n ]);\n }", "title": "" }, { "docid": "e258f879f2ec3259f61fa15dc2c46c03", "score": "0.6135222", "text": "protected function getOptions()\n {\n return [\n ['get', 'g', InputOption::VALUE_NONE, 'Get information from internal database', null],\n ['fetch', 'f', InputOption::VALUE_NONE, 'Fetch information from facebook', null],\n ['sync', 's', InputOption::VALUE_NONE, 'Sync information from facebook to local database', null],\n ];\n }", "title": "" }, { "docid": "29433adf3225e71872a0093a7a14fb49", "score": "0.6133185", "text": "protected function getOptions()\n {\n return array(\n\n );\n }", "title": "" }, { "docid": "09d4ba868f941d413e895bc665ed69ce", "score": "0.613082", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\tarray('type', null, InputOption::VALUE_REQUIRED, 'Type of action.', null),\n\t\t\tarray('image_id', null, InputOption::VALUE_REQUIRED, 'Image Id.', null),\t\t\t\n\t\t\tarray('keyword', null, InputOption::VALUE_OPTIONAL, 'Keyword.', null),\n\t\t\tarray('user_id', null, InputOption::VALUE_OPTIONAL, 'User Id.', null),\n\t\t\tarray('query', null, InputOption::VALUE_OPTIONAL, 'Query Uri.', null)\n\t\t);\n\t}", "title": "" }, { "docid": "37689fc757f8f205967d12232d5aea35", "score": "0.6125397", "text": "protected function getOptions()\n {\n return [\n ['model', 'm', InputOption::VALUE_OPTIONAL, 'The name of the model'],\n ['force', 'f', InputOption::VALUE_OPTIONAL, 'force to generate'],\n ];\n }", "title": "" }, { "docid": "ac66b1a339ad38b272874bd788da0f44", "score": "0.61242014", "text": "protected function getOptions()\n {\n return array(\n\t\t\tarray('alias', 'a', InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'add alias to app.aliases', null),\n\t\t\tarray('provider', 'p', InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'add provider to app.providers', null),\t\t\t\n\t\t);\n }", "title": "" }, { "docid": "a9c9acb4da869b141a9aaf69409c3e1c", "score": "0.6115524", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\tarray('refresh', null, InputOption::VALUE_OPTIONAL, 'Force to refresh cached reports', 0),\n\t\t\tarray('days', null, InputOption::VALUE_OPTIONAL, 'Chech x says for finished reports', 1),\n\t\t);\n\t}", "title": "" }, { "docid": "d7f2a33349fa87a277614b4c41d6a930", "score": "0.6111503", "text": "protected function getOptions()\n {\n return [\n ['empty', 'e', InputOption::VALUE_NONE, 'Quick-create empty project']\n ];\n }", "title": "" }, { "docid": "e1945998401e6385306e3ac489faab1d", "score": "0.61078835", "text": "public function getOptions()\n {\n $parentOptions = parent::getOptions();\n return array_merge($parentOptions, [\n ['lucid', false, InputOption::VALUE_NONE, 'Lucid architecture'],\n ['domain', false, InputOption::VALUE_NONE, 'Install in a subdomain'],\n ]);\n }", "title": "" }, { "docid": "6704048978fa61eab5193df8c73ddb44", "score": "0.6106113", "text": "protected function getOptions()\n\t{\n\t\treturn [\n\t\t\t//['example', null, InputOption::VALUE_OPTIONAL, 'An example option.', null],\n\t\t];\n\t}", "title": "" }, { "docid": "6704048978fa61eab5193df8c73ddb44", "score": "0.6106113", "text": "protected function getOptions()\n\t{\n\t\treturn [\n\t\t\t//['example', null, InputOption::VALUE_OPTIONAL, 'An example option.', null],\n\t\t];\n\t}", "title": "" }, { "docid": "51b698269b4c950f097af78e3cb40e91", "score": "0.6105079", "text": "protected function getOptions()\n {\n return [\n ['namespace', 'ns', InputOption::VALUE_REQUIRED, 'Change the modelname on the filename to this'],\n ['model', 'm', InputOption::VALUE_REQUIRED, 'The name of the model to be generated'],\n ['path', 'p', InputOption::VALUE_REQUIRED, 'Directory within pages this should be placed'],\n ['force', 'f', InputOption::VALUE_NONE, 'Force update the scaffolding'],\n ];\n }", "title": "" }, { "docid": "45021e3c36384718669898e39bb7fa57", "score": "0.60974675", "text": "protected function getOptions()\n {\n return array(\n array('pretend', 'p', InputOption::VALUE_NONE, 'Lists affected users without sending out emails.'),\n );\n }", "title": "" }, { "docid": "e5794f2b66df63af2f27a60513c4d77f", "score": "0.6093882", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n//\t\t\tarray('example', null, InputOption::VALUE_OPTIONAL, 'An example option.', null),\n\t\t);\n\t}", "title": "" }, { "docid": "e5794f2b66df63af2f27a60513c4d77f", "score": "0.6093882", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n//\t\t\tarray('example', null, InputOption::VALUE_OPTIONAL, 'An example option.', null),\n\t\t);\n\t}", "title": "" }, { "docid": "d571ab4a16ff560d5229c7283e0fe24d", "score": "0.6091043", "text": "public function options();", "title": "" }, { "docid": "d571ab4a16ff560d5229c7283e0fe24d", "score": "0.6091043", "text": "public function options();", "title": "" }, { "docid": "dbfe22fd3d2556babb1a2f1f2f16fa68", "score": "0.6090178", "text": "public function defaultExposeOptions() {\n $this->options['expose'] = [\n 'use_operator' => FALSE,\n 'operator' => $this->options['id'] . '_op',\n 'operator_limit_selection' => FALSE,\n 'operator_list' => [],\n 'identifier' => $this->options['id'],\n 'label' => $this->definition['title'],\n 'description' => NULL,\n 'remember' => FALSE,\n 'multiple' => FALSE,\n 'required' => FALSE,\n ];\n }", "title": "" }, { "docid": "ef46ed29e1d4d29f0d26687dd6ac26bd", "score": "0.6081757", "text": "protected function getOptions()\n {\n return [\n ['model', 'm', InputOption::VALUE_REQUIRED, 'The model that this repository is based on.'],\n ['force', null, InputOption::VALUE_NONE, 'Create the class even if the event already exists'],\n\n ];\n }", "title": "" }, { "docid": "2cf282f0f82466ed26768b7cdf12899c", "score": "0.6075002", "text": "protected function getOptions()\n {\n return [\n ['force', 'f', InputOption::VALUE_NONE, 'Create the class even if the notification already exists.'],\n ];\n }", "title": "" }, { "docid": "1eb85171f2fdec11130eda246384ae89", "score": "0.60666996", "text": "protected function getOptions()\n {\n return array(\n array('helpers', \"H\", InputOption::VALUE_NONE, 'Include the helper files'),\n array('memory', \"M\", InputOption::VALUE_NONE, 'Use sqlite memory driver'),\n array('sublime', \"S\", InputOption::VALUE_NONE, 'Use different style for SublimeText CodeIntel'),\n );\n }", "title": "" }, { "docid": "c2d8a3b891b1fbd6d2b6d6a3cf448800", "score": "0.6056259", "text": "protected function getOptions(){\n return array(\n array('force', 'f', InputOption::VALUE_NONE, 'Forces a re-compile of all css files'),\n array('summary', 's', InputOption::VALUE_NONE, 'Shows only a summary output')\n );\n }", "title": "" }, { "docid": "66b99631e4f77754ceb751a84150da1e", "score": "0.6041667", "text": "public function getOptions()\n {\n return [\n ['fieldsFile', null, InputOption::VALUE_REQUIRED, 'Fields input as json file'],\n ['jsonFromGUI', null, InputOption::VALUE_REQUIRED, 'Direct Json string while using GUI interface'],\n ['tableName', null, InputOption::VALUE_REQUIRED, 'Table Name'],\n ['fromTable', null, InputOption::VALUE_NONE, 'Generate from existing table'],\n ['save', null, InputOption::VALUE_NONE, 'Save model schema to file'],\n ['primary', null, InputOption::VALUE_REQUIRED, 'Custom primary key'],\n ['prefix', null, InputOption::VALUE_REQUIRED, 'Prefix for all files'],\n ['paginate', null, InputOption::VALUE_REQUIRED, 'Pagination for index.blade.php'],\n [\n 'skip',\n null,\n InputOption::VALUE_REQUIRED,\n 'Skip Specific Items to Generate (migration,model,controllers,api_controller,scaffold_controller,repository,requests,api_requests,scaffold_requests,routes,api_routes,scaffold_routes,views,tests,menu,dump-autoload)',\n ],\n ['datatables', null, InputOption::VALUE_REQUIRED, 'Override datatables settings'],\n [\n 'views',\n null,\n InputOption::VALUE_REQUIRED,\n 'Specify only the views you want generated: index,create,edit,show',\n ],\n ['relations', null, InputOption::VALUE_NONE, 'Specify if you want to pass relationships for fields'],\n ];\n }", "title": "" }, { "docid": "d578c962610666989c8bae9b8a0ef043", "score": "0.6040573", "text": "protected function getOptions()\n {\n return [\n ['contract', 'c', InputOption::VALUE_NONE, 'Generate Contract for the Interaction.']\n ];\n }", "title": "" }, { "docid": "1545204bca9f868a18b2152bae2ea5fb", "score": "0.604016", "text": "public static function getChoiceOperators()\n {\n return array(\n self::CHOICE_AND,\n self::CHOICE_OR,\n self::CHOICE_NAND,\n );\n }", "title": "" }, { "docid": "9364eb1794ee02bd4ca2f0b11e97cf42", "score": "0.60397744", "text": "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "9364eb1794ee02bd4ca2f0b11e97cf42", "score": "0.60397744", "text": "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "title": "" } ]
394095efd5ba2f99c7ea3ce8548796d9
an letzter stelle artikel einfuegen mit standard preis vom auftrag
[ { "docid": "3e71275c5a768436bc60471b7d0bdb5a", "score": "0.64319134", "text": "function AddArtikelAuftrag($artikel,$auftrag)\n {\n\n }", "title": "" } ]
[ { "docid": "2553e86097cc803ec707b3e3f406df2c", "score": "0.6544601", "text": "public function AggiornaPrezzi(){\n\t}", "title": "" }, { "docid": "4f1d1ed6ea267d7df33d0aa3434916bf", "score": "0.6283204", "text": "public function ausgeben() {\r\n\t\techo \"Die aktuelle Geschwindigkeit beträgt \" . $this->geschwindigkeit . \": \";\r\n\t}", "title": "" }, { "docid": "38459961f52156197331e80f3e7908f0", "score": "0.59140944", "text": "function ToonFormulierAfspraak()\n{\n\n}", "title": "" }, { "docid": "7d0f8a3367271c19ab23586655e85fef", "score": "0.5636009", "text": "public function extra_voor_verp()\n\t{\n\t}", "title": "" }, { "docid": "fc0eede48ef62c1f9086c75b21719484", "score": "0.5603377", "text": "public function boleta()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "db3dd661b57f239051ff5d8ed0c84358", "score": "0.55271435", "text": "function stundenErfassen($anzahl)\r\n {\r\n $this->summeStunden += $anzahl;\r\n }", "title": "" }, { "docid": "09ad42b81d8c031fd3f2ca26ad5d2049", "score": "0.5523084", "text": "public function trasnaction(){\n\n\t}", "title": "" }, { "docid": "548e141f76a0525747095595077e3314", "score": "0.5515441", "text": "public function masodik()\n {\n }", "title": "" }, { "docid": "ecddd8943ea8e5b77a88a5d1fe310d9e", "score": "0.5507198", "text": "public function traerCualquiera()\n {\n }", "title": "" }, { "docid": "51c4034995f691cc673a81f938d499c5", "score": "0.5459064", "text": "function hitungUmur($thn_lahir, $thn_sekarang){\n $umur = $thn_sekarang - $thn_lahir;\n return $umur;\n}", "title": "" }, { "docid": "6073c8bad0580ee875cc5b2e22747bbb", "score": "0.54400814", "text": "function\t_buche( $_sign) {\n\t\tFDbg::dumpL( 0x00000100, \"AbKorr.php::AbKorrPosten::_buche( $_sign): begin\") ;\n\t\t$this->dump() ;\n\t\tif ( $_sign == -1) {\n\t\t\t$menge\t=\t$this->MengeGebucht * $_sign ;\n\t\t} else {\n\t\t\t$menge\t=\t$this->Menge - $this->MengeGebucht ;\n\t\t}\n\t\ttry {\n\t\t\t$actArtikel\t=\tnew Artikel( $this->ArtikelNr) ;\n\t\t\t$qtyCorrected\t=\t$actArtikel->correct( $menge) ;\n\t\t\t$this->MengeGebucht\t+=\t$qtyCorrected ;\n\t\t\t$this->updateColInDb( \"MengeGebucht\") ;\n\t\t} catch( Exception $e) {\n\t\t\tthrow $e ;\n\t\t}\n\t\tFDbg::dumpL( 0x00000100, \"AbKorr.php::AbKorrPosten::_buche( $_sign): end\") ;\n\t}", "title": "" }, { "docid": "b706c72c717d18639470c4b8ab240f79", "score": "0.5429955", "text": "public function nadar()\n {\n }", "title": "" }, { "docid": "a5ed4a66e2e5782594ef2e572dc34a62", "score": "0.5417757", "text": "public function contrato()\r\n\t{\r\n\t}", "title": "" }, { "docid": "73b0d2bc807a5f3951c9e8f5961dc0f8", "score": "0.5405905", "text": "public function inOriginal();", "title": "" }, { "docid": "bf9a70c5e87ca61b7c0302eb31576e10", "score": "0.53972346", "text": "function masque_details_evt($evt_tmp)\r\n{\r\n\tif($evt_tmp[\"droit_acces\"]<1){\r\n\t\tglobal $trad;\r\n\t\t$evt_tmp[\"titre\"] = \"<i>\".$trad[\"AGENDA_evt_prive\"].\"</i>\";\r\n\t\t$evt_tmp[\"description\"] = \"\";\r\n\t}\r\n\treturn $evt_tmp;\r\n}", "title": "" }, { "docid": "74504e59bc81635477c6a23f00a236ca", "score": "0.5396165", "text": "public function changeToOrdine()\n {\n\n //crea la tabella degli ordini verso i fornitori\n //Rielabora\n $preventivatore = $this->getPreventivatore();\n $result = $preventivatore->elabora();\n $imponibile = $result['prezzo_cliente_senza_iva'];\n $iva = $result['prezzo_cliente_con_iva'] - $result['prezzo_cliente_senza_iva'];\n $importo_trasportatore = $result['costo_trazione'];\n $importo_depositario = $result['deposito'];\n $importo_traslocatore_partenza = $result['costo_scarico_totale'] ;\n $importo_traslocatore_destinazione = $result['costo_salita_piano_totale'] + $result['costo_montaggio_totale'] + $result['costo_scarico_ricarico_hub_totale'];\n\n $totali = array();\n $totali[$this->id_trasportatore] = 0;\n $totali[$this->id_depositario] = 0;\n $totali[$this->id_traslocatore_destinazione] = 0;\n $totali[$this->id_traslocatore_partenza] = 0;\n\n $totaliMC = array();\n $totaliMC[$this->id_trasportatore] = 0;\n $totaliMC[$this->id_depositario] = 0;\n $totaliMC[$this->id_traslocatore_destinazione] = 0;\n $totaliMC[$this->id_traslocatore_partenza] = 0;\n\n\n $totali[$this->id_trasportatore] = $totali[$this->id_trasportatore] + $importo_trasportatore;\n $totali[$this->id_depositario] = $totali[$this->id_depositario] + $importo_depositario;\n $totali[$this->id_traslocatore_partenza] = $totali[$this->id_traslocatore_partenza] + $importo_traslocatore_partenza;\n $totali[$this->id_traslocatore_destinazione] = $totali[$this->id_traslocatore_destinazione] + $importo_traslocatore_destinazione;\n\n\n $mc = $preventivatore->getMC();\n\n $totaliMC[$this->id_trasportatore] = $totaliMC[$this->id_trasportatore] + $mc;\n $totaliMC[$this->id_depositario] = $totaliMC[$this->id_depositario] + $mc;\n $totaliMC[$this->id_traslocatore_destinazione] = $totaliMC[$this->id_traslocatore_destinazione] + $mc;\n $totaliMC[$this->id_traslocatore_partenza] = $totaliMC[$this->id_traslocatore_partenza] + $mc;\n\n $imponibile = round($totali[$this->id_trasportatore]/(1+ Parametri::getIVA()),2);\n $iva = round($totali[$this->id_trasportatore] - $imponibile,2);\n\n $ordine_trasportatore = new OrdineFornitore($this->id_preventivo, $this->id_trasportatore, $totali[$this->id_trasportatore], $imponibile, $iva, $totaliMC[$this->id_trasportatore], date('Y-m-d'), OrdineFornitore::TIPO_SERVIZIO_TRASPORTO);\n $ordine_trasportatore->save();\n\n $imponibile = round($totali[$this->id_traslocatore_partenza]/(1+ Parametri::getIVA()),2);\n $iva = round($totali[$this->id_traslocatore_partenza] - $imponibile,2);\n\n $ordine_traslocatore_partenza = new OrdineFornitore($this->id_preventivo, $this->id_traslocatore_partenza, $totali[$this->id_traslocatore_partenza], $imponibile, $iva, $totaliMC[$this->id_traslocatore_destinazione], date('Y-m-d'), OrdineFornitore::TIPO_SERVIZIO_TRASLOCO_PARTENZA);\n $ordine_traslocatore_partenza->save();\n\n $imponibile = round($totali[$this->id_traslocatore_destinazione]/(1+ Parametri::getIVA()),2);\n $iva = round($totali[$this->id_traslocatore_destinazione] - $imponibile,2);\n $ordine_traslocatore_destinazione = new OrdineFornitore($this->id_preventivo, $this->id_traslocatore_destinazione, $totali[$this->id_traslocatore_destinazione], $imponibile, $iva, $totaliMC[$this->id_traslocatore_partenza], date('Y-m-d'), OrdineFornitore::TIPO_SERVIZIO_TRASLOCO_DESTINAZIONE);\n $ordine_traslocatore_destinazione->save();\n\n if ($this->giorni_deposito>10) {\n $imponibile = round($totali[$this->id_depositario]/(1+ Parametri::getIVA()),2);\n $iva = round($totali[$this->id_depositario] - $imponibile,2);\n\n $ordine_depositario = new OrdineFornitore($this->id_preventivo, $this->id_depositario, $totali[$this->id_depositario], $imponibile, $iva, $totaliMC[$this->id_depositario], date('Y-m-d'), OrdineFornitore::TIPO_SERVIZIO_DEPOSITO);\n $ordine_depositario->save();\n }\n\n\n\n $data_ordine = date('Y-m-d');\n $con = DBUtils::getConnection();\n $sql =\"UPDATE preventivi SET tipo=\".OrdineBusiness::TIPO_ORDINE.\" , data='\".$data_ordine.\"' ,\n importo_commessa_trasportatore ='\".$totali[$this->id_trasportatore].\"',\n importo_commessa_traslocatore_partenza ='\".$totali[$this->id_traslocatore_partenza].\"',\n importo_commessa_traslocatore_destinazione ='\".$totali[$this->id_traslocatore_destinazione].\"',\n importo_commessa_depositario ='\".$totali[$this->id_depositario].\"',\n imponibile ='\".$imponibile.\"',\n iva ='\".$iva.\"'\n WHERE id_preventivo=\".$this->id_preventivo;\n\n $res = mysql_query($sql);\n //echo \"\\nSQL: \".$sql;\n DBUtils::closeConnection($con);\n\n return new OrdineCliente($this->id_preventivo);\n }", "title": "" }, { "docid": "653459123b78cf9150f295e0440989f4", "score": "0.5387846", "text": "function stocks_pre_boucle($boucle) {\n $id_table = $boucle->id_table;\n\n //Savoir si on consulté la table organisations_liens\n if ($jointure = array_keys($boucle->from, 'spip_stocks')) {\n //Vérifier qu'on est bien dans le cas d'une jointure automatique\n if (isset($boucle->join[$jointure[0]])\n and isset($boucle->join[$jointure[0]][3])\n and $boucle->join[$jointure[0]]\n and $boucle->join[$jointure[0]][3]\n ) {\n //Le critere ON de la jointure (index 3 dans le tableau de jointure) est incompléte\n //on fait en sorte de retomber sur ses pattes, en indiquant l'objet à joindre\n $boucle->join[$jointure[0]][3] = \"'L1.objet='.sql_quote('\".objet_type($id_table).\"')\";\n\t\t}\n }\n\n return $boucle;\n}", "title": "" }, { "docid": "dfbfd933f8cb5be608402a873f43a9e6", "score": "0.5385435", "text": "public function Zapis_vsechny_kolize_v_zaveru_formulare ($pole, $idcka_skolizi, $iducast, $formular){\r\n //zapise kolize formulare \r\n self::Zapis_kolize_formulare($pole,$idcka_skolizi, $iducast, $formular);\r\n //-----------------------------------------------------------------------------\r\n \r\n \r\n //a zjisti a zapise kolize ucastnika pro vsechny formulare \r\n $vsechny_kolize_ucastnika_pole = self::Najdi_kolize_vsechny($iducast);\r\n //echo \"<br>**Vsechny kolize_pole v Zapis_vsechny_kolize..... **\";\r\n //var_dump($vsechny_kolize_ucastnika_pole);\r\n \r\n //znevalidneni vsech kolizi pro ucastnika \r\n self::Znevalidni_kolize_ucastnika_vsechny($iducast);\r\n foreach($vsechny_kolize_ucastnika_pole as $jedna_kolize){\r\n if ($jedna_kolize->kolize_nastala) {\r\n $jedna_kolize->Zapis_jednu_kolizi();\r\n } \r\n }\r\n \r\n}", "title": "" }, { "docid": "c8f485ef7d4a25b5d771b4e6d1d32a1a", "score": "0.537204", "text": "public function liberar() {}", "title": "" }, { "docid": "8f4d37d0f1e1a068c5d10d77fd472954", "score": "0.53698355", "text": "function sevenconcepts_formulaire_charger($flux){\n $form=$flux['args']['form'];\n if($form=='inscription'){\n include_spip('cextras_pipelines');\n $champs_extras=champs_extras_objet(table_objet_sql('auteur'));\n foreach($champs_extras as $value){\n $flux['data'][$value['options']['nom']]=''; \n if(isset($value['options']['obligatoire']))$flux['data']['obligatoire'][$value['options']['nom']]='on';\n }\n $flux['data']['nom_inscription']='';\n $flux['data']['mail_inscription']='';\n }\n \n return $flux;\n}", "title": "" }, { "docid": "a2213bd2cf9fe312995252aa81063e2a", "score": "0.5366889", "text": "public function elso()\n {\n }", "title": "" }, { "docid": "e05a9f0829ca54a1003bb9df7733332e", "score": "0.5332245", "text": "function scheckAusdruck()\r\n {\r\n $summeLohn = $this->summeStunden * $this->stundenlohn;\r\n echo \"<p>Scheck:<br>\"\r\n . \"Name: $this->nachname, $this->vorname<br>\"\r\n . \"IBAN: $this->iban, BIC: $this->bic<br>\"\r\n . \"Bank: $this->bank, Betrag: $summeLohn &euro;</p>\";\r\n }", "title": "" }, { "docid": "4342f245367d87e9cbc61407773ab71e", "score": "0.5325669", "text": "public function partirAuTravail(): void\n\t{\n\t}", "title": "" }, { "docid": "54c7e6ed8bf49ecde942b75403c9c38c", "score": "0.5320739", "text": "function scheckAusdruck()\r\n {\r\n foreach ($this->belegschaft as $schluessel=>$wert)\r\n $this->belegschaft[$schluessel]->scheckAusdruck();\r\n }", "title": "" }, { "docid": "47a25e846cf3a47c3466bba810f05063", "score": "0.53135", "text": "public function get_superficie(){ return $this->_superficie;}", "title": "" }, { "docid": "c071b35f7a86f89b5daf94b06909ce61", "score": "0.52970433", "text": "function hitungDenda(){\n\n return 0;\n }", "title": "" }, { "docid": "10208f866551eb59ce29b773f8f04a6a", "score": "0.52772576", "text": "function suppr_tache_dossier($id_dossier)\r\n{\r\n\tglobal $objet;\r\n\tif(droit_acces($objet[\"tache_dossier\"],$id_dossier)==3 && $id_dossier>1)\r\n\t{\r\n\t\t// on créé la liste des dossiers & on supprime chaque dossier\r\n\t\t$liste_dossiers_suppr = arborescence($objet[\"tache_dossier\"], $id_dossier, \"tous\");\r\n\t\tforeach($liste_dossiers_suppr as $infos_dossier)\r\n\t\t{\r\n\t\t\t// On supprime chaque tache du dossier puis le dossier en question\r\n\t\t\t$liste_taches = db_tableau(\"SELECT * FROM gt_tache WHERE id_dossier='\".$infos_dossier[\"id_dossier\"].\"'\");\r\n\t\t\tforeach($liste_taches as $infos_tache)\t\t{ suppr_tache($infos_tache[\"id_tache\"]); }\r\n\t\t\tsuppr_objet($objet[\"tache_dossier\"], $infos_dossier[\"id_dossier\"]);\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "50fe8d188998dc38b04ce9489bbdb591", "score": "0.5274569", "text": "public function tampilDataGalang(){\n\t\t\n\t}", "title": "" }, { "docid": "d0ace9f64b6f8516a34712a986fb348d", "score": "0.52635634", "text": "public function getChapeau();", "title": "" }, { "docid": "d5dac6b14a595aff143b8880a5e26499", "score": "0.5258226", "text": "final function velcom(){\n }", "title": "" }, { "docid": "7dbc605152890d49a7ee3bb710015c77", "score": "0.52493024", "text": "public function zeigeEinkaufswagen() {\n\t\t$size = sizeof ( $this->einkaufsWagen );\n\t\t$out = \"Der Einkaufswagen enthaelt: \" . $size . \" Produkte<br/>\";\n\t\tif ($size > 0) {\n// \t\t\techo \"test\";\n\t\t\t$kosten = 0.0;\n\t\t\t// Einkaufswagen durchgehen\n\t\t\tforeach ($this->einkaufsWagen as $artikel) {\n\t\t\t\t$kosten += $artikel->getPreis();\n\t\t\t\t$out .= \"Kategorie: \" . $artikel->getKategorie() . \": \" . $artikel->getNummer ()\n\t\t\t\t . \" | \" . $artikel->getMenge() . $artikel->getEinheit()\n\t\t\t\t . \" | \" . $artikel->getBezeichnung()\n\t\t\t\t . \" | Preis: \" . $artikel->getPreis()\n\t\t\t\t. \"<br/>\";\n// \t\t\t\techo \"test\";\n\t\t\t}\n\t\t\t$out .= \"Gesamtkosten: \" . $kosten . \"<br/>\";\n\t\t\tif (!($this->bezahlt))\n\t\t\t\t$out .= \"Die Produkte wurden noch nicht bezahlt<br/>\";\n\t\t\telse\n\t\t\t\t$out .= \"Die Produkte wurden bezahlt<br/>\";\n\t\t\tif (!($this->verpackt))\n\t\t\t\t$out .= \"Die Produkte wurden noch nicht verpackt<br/>\";\n\t\t\telse\n\t\t\t\t$out .= \"Die Produkte wurden verpackt<br/>\";\n\t\t\tif (!($this->verschickt))\n\t\t\t\t$out .= \"Die Produkte wurden noch nicht verschickt<br/>\";\n\t\t\telse\n\t\t\t\t$out .= \"Die Produkte wurden verschickt<br/>\";\n\t\t\t\n\t\t\t$out .= \"<br/><br/><br/>\";\n\t\t}\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "04799ce9192cca9d741f7cd8e6facac7", "score": "0.5229637", "text": "public function fixObject(){\n\t\t//Ex : cadre et texte d'entete\n\t}", "title": "" }, { "docid": "533d2203fc11a3f093089af891ae05ac", "score": "0.5211161", "text": "protected function drukowanie()\n {\n for($i=0,$c=count($this->tags); $i<$c; $i++){\n $this->szkielet = $this->swap( $this->szkielet , $this->install($i) );\n }\n\n }", "title": "" }, { "docid": "9b5bf8ea2d98733c5bb7cf49e50e03c0", "score": "0.5205103", "text": "function formulaires_editer_feuillederoute_charger_dist() {\n\t$valeurs = array( '_texte' => '' );\n\tlire_fichier_securise(_DIR_IMG . 'feuillederoute.php',$contenu);\n\t$contenu = @unserialize($contenu);\n\tif($contenu){\n\t\t$valeurs['_texte'] = $contenu;\n\t}\n\treturn $valeurs;\n}", "title": "" }, { "docid": "526c2cae0e5911b59d1cb1e88abb268d", "score": "0.5203852", "text": "function fonctionBaliseOuvrante($parseur, $nomBalise, $tableauAttributs)\r\n {\r\n // En fait... nous nous conteterons de mémoriser le nom de la balise\r\n // afin d'en tenir compte dans la fonction \"fonctionTexte\"\r\n\r\n global $derniereBaliseRencontree;\r\n\r\n $derniereBaliseRencontree = $nomBalise;\r\n }", "title": "" }, { "docid": "4a426b181ec29f857f29b4a77b879bfc", "score": "0.5197079", "text": "function gesuchtes_feld($angabe,$tabelle,$gegebene_spalte,$gesuchte_spalte) {\n\t$mysqli=MyDatabase();\n\t$abfrage=\"SELECT `$gesuchte_spalte` FROM `$tabelle` WHERE `$gegebene_spalte`='$angabe'\";\n\tif ($result=$mysqli->query($abfrage)) {\n\t\twhile ($row=$result->fetch_object()) {\n\t\t\t$gesuchter_wert=$row->$gesuchte_spalte;\n\t\t\t}\n\t\t}\t\n\tif (!isset($gesuchter_wert)) {$gesuchter_wert=0;}\n\treturn $gesuchter_wert;\n}", "title": "" }, { "docid": "78324fd3a112697111da6670acb29cc8", "score": "0.51861566", "text": "function insert_into_bereich($table, $konvertierung_id, $user_id) {\n\t\t# Based on XPlanung 5.0.1\n\t\t# For XP_Plan\n\t\t$sql = \"INSERT INTO xplan_gml.\" . $table . \"(gml_id, nummer, name, bedeutung, detailliertebedeutung, erstellungsmassstab, geltungsbereich, user_id, konvertierung_id, rasterbasis, \";\n\t\tswitch ($table) {\n\t\t\tcase 'so_bereich' : {\n\t\t\t} break;\n\t\t\tcase 'rp_bereich' : {\n\t\t\t\t$sql .= \"versionbrog, versionbrogtext, versionlplg, versionlplgtext, geltungsmassstab, \";\n\t\t\t} break;\n\t\t\tdefault : {\n\t\t\t\t# Default = BP_Plan and FP_Plan (equivalent Bereich-attribute in XPlanung 5.0.1)\n\t\t\t\t$sql .= \"versionbaunvodatum, versionbaugbtext, versionsonstrechtsgrundlagetext, versionbaunvotext, versionsonstrechtsgrundlagedatum, versionbaugbdatum, \";\n\t\t\t};\n\t\t}\n\n\t\t$sql .= \"\n\t\t\t\tgehoertzuplan)\n\t\t\tSELECT\n\t\t\t\ttrim(leading 'Gml_' FROM (trim(leading 'GML_' FROM gmlas.id)))::text::uuid AS gml_id,\n\t\t\t\tgmlas.nummer AS nummer,\n\t\t\t\tgmlas.xplan_name AS name,\n\t\t\t\tgmlas.bedeutung::xplan_gml.xp_bedeutungenbereich AS bedeutung,\n\t\t\t\tgmlas.detailliertebedeutung AS detailliertebedeutung,\n\t\t\t\tgmlas.erstellungsmassstab AS erstellungsmassstab,\n\t\t\t\tST_Multi(ST_ForceRHR(st_transform(gmlas.geltungsbereich,\". $this->epsg .\"))) AS geltungsbereich,\n\t\t\t\t\" . $user_id . \" AS user_id,\n\t\t\t\t\" . $konvertierung_id . \" AS konvertierung_id,\n\t\t\t\ttrim(leading '#gml_' FROM lower(gmlas.rasterbasis_href)) AS rasterbasis,\";\n\n\t\tswitch ($table) {\n\t\t\tcase 'so_bereich' : {\n\t\t\t} break;\n\t\t\tcase 'rp_bereich' : {\n\t\t\t\t$sql .= \"\n\t\t\t\tgmlas.versionbrog AS versionbrog,\n\t\t\t\tgmlas.versionbrogtext AS versionbrogtext,\n\t\t\t\tgmlas.versionlplg AS versionlplg,\n\t\t\t\tgmlas.versionlplgtext As versionlplgtext,\n\t\t\t\tgmlas.geltungsmassstab AS geltungsmassstab,\";\n\t\t\t} break;\n\t\t\tdefault : {\n\t\t\t\t# Default = BP_Plan and FP_Plan (equivalent Bereich-attribute in XPlanung 5.0.1)\n\t\t\t\t$sql .= \"\n\t\t\t\tgmlas.versionbaunvodatum AS versionbaunvodatum,\n\t\t\t\tgmlas.versionbaugbtext AS versionbaugbtext,\n\t\t\t\tgmlas.versionsonstrechtsgrundlagetext AS versionsonstrechtsgrundlagetext,\n\t\t\t\tgmlas.versionbaunvotext AS versionbaunvotext,\n\t\t\t\tgmlas.versionsonstrechtsgrundlagedatum AS versionsonstrechtsgrundlagedatum,\n\t\t\t\tgmlas.versionbaugbdatum AS versionbaugbdatum,\";\n\t\t\t};\n\t\t}\n\t\t// string needs to be lowered both to simplify cutting #gml_ in all forms and\n\t\t// because uuid (e.g. in gml_id of the associated plan) is always lowercase when cast to text\n\t\t// will take first plan encountered in gmlas-schema if bereich id is not set (or could not be read by ogr)\n\t\t$sql .= \"\n\t\t\t\tCASE\n\t\t\t\t\tWHEN gmlas.gehoertzuplan_href IS NOT NULL THEN trim(leading '#gml_' FROM lower(gmlas.gehoertzuplan_href))::uuid\n\t\t\t\t\tELSE trim(leading '#gml_' FROM lower((SELECT DISTINCT id FROM \" . $this->gmlas_schema . \".\" . substr($table,0,3) . \"plan LIMIT 1)))::uuid\n\t\t\t\tEND AS gehoertzuplan\n\t\t\tFROM\n\t\t\t\t\" . $this->gmlas_schema . \".\" . $table . \" gmlas\n\t\t\t;\";\n\t\t# echo $sql;\n\t\t$ret = $this->pgdatabase->execSQL($sql, 4, 0);\n\t\t$result = pg_fetch_assoc($ret[1]);\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "176e45d5cbea4cafa917074668e7876b", "score": "0.5183557", "text": "function formel_kampf($a_count,$v_count,$a_ang,$v_def,$trefferQuote = 10,$rapidfire = 1)\n{\n $schaden = rand(60,100);\n //28.12.2011 - nun echtes RF\n $schuss = $a_count;// * max(1,$rapidfire);\n \n if($schuss < 0)\n\t\techo \"komische anzahl $a_count<br>\";\n\t$treffer = ($schuss * (rand($trefferQuote,100)/100));\n \n\t\n\t$angWert = $treffer * ($schaden / 100) * $a_ang;\n\t\n\t//$iRest = max(round((1 / ($v_def)) * (($v_count * $v_def) - ($angWert)) ),0);\n $iTmp = ((($v_def * $v_count) - $angWert) / ($v_def * $v_count)) * $v_count;\n $iTmp = max($iTmp,0);\n $iAbsorb = $v_def * ($v_count - $iTmp);\n \n $iRest = ceil($iTmp);\n //$iRest = (round(($v_count / ($v_count * $v_def)) * (($v_count * $v_def) - ($angWert)) ));\n\n\t//echo \"($v_count / ($v_count * $v_def)) * (($v_count * $v_def) - ($angWert)) = $iRest<br/>\";\n\t\n\treturn array(\"rest\" => $iRest, \"schuss\" => $schuss, \"treffer\" => $treffer, \"schaden\" => $angWert, \"absorb\" => $iAbsorb);\n}", "title": "" }, { "docid": "86fee76eeeec8f25e7f71c1dbe9711dd", "score": "0.5163672", "text": "function __construct($min_frachtraum_frachter, $max_frachter_waffen, $min_frachter_lemin_prozent,\n $max_frachter_reichweite, $max_frachter_schaden, $max_gegner_frachter_naehe) {\n $this->min_frachtraum_frachter = $min_frachtraum_frachter;\n $this->max_frachter_waffen = $max_frachter_waffen;\n $this->min_frachter_lemin_prozent = $min_frachter_lemin_prozent;\n $this->max_frachter_reichweite = $max_frachter_reichweite;\n $this->max_frachter_schaden = $max_frachter_schaden;\n $this->max_gegner_frachter_naehe = $max_gegner_frachter_naehe;\n }", "title": "" }, { "docid": "edd6bfc28590e48c33857eebd20578f4", "score": "0.51601076", "text": "function Geral() {\r\n extract($GLOBALS);\r\n if ($P1==1 && $O=='I' &&f($RS_Menu,'envio_inclusao')=='S') {\r\n // Recupera a chave do trâmite de cadastramento\r\n $sql = new db_getTramiteList; $RS = $sql->getInstanceOf($dbms,$w_menu,null,null,null);\r\n $RS = SortArray($RS,'ordem','asc');\r\n foreach($RS as $row) { \r\n $w_tramite = f($row,'sq_siw_tramite'); \r\n break; \r\n }\r\n \r\n $w_envio_inclusao = 'S';\r\n } else {\r\n $w_envio_inclusao = 'N';\r\n }\r\n if ($SG=='SRTRANSP') {\r\n include_once('transporte_gerais.php');\r\n } elseif ($SG=='SRSOLCEL') {\r\n include_once('celular_gerais.php');\r\n } else {\r\n include_once('geral_gerais.php');\r\n }\r\n}", "title": "" }, { "docid": "36894e80635252ea7b9706098e90df8a", "score": "0.5157467", "text": "function faireCours ()\n {\n // ECHAUFFEMENT\n echo \"(echauffez-vous d'abord)\";\n\n parent::faireCours();\n\n // RANGER LES SKIS\n echo \"(e)tirez-vous...\";\n }", "title": "" }, { "docid": "612d1ad2c3da819e8fe51c8aa89f380d", "score": "0.5148051", "text": "public function cortesia()\n {\n $this->costo = 0;\n }", "title": "" }, { "docid": "23482b98fba10503709940db543226bc", "score": "0.5147081", "text": "public function jarjesta() {\n usort($this->ravinnon_saannit, \"self::vertaaPvm\");\n }", "title": "" }, { "docid": "7011b4fc6b5771d69c74bd2a2fcc7b04", "score": "0.514141", "text": "function tache_synthese_dossier($dossier_tmp)\r\n{\r\n\t// Init\r\n\tglobal $objet;\r\n\t$tache_synthese_dossier = $sql_selection_dossiers = \"\";\r\n\t$arborescence = arborescence($objet[\"tache_dossier\"], $dossier_tmp[\"id_dossier\"]);\r\n\tforeach($arborescence as $dossier_tmp2)\t\t{ $sql_selection_dossiers .= $dossier_tmp2[\"id_dossier\"].\",\"; }\r\n\t$sql_selection_dossiers = \"FROM gt_tache WHERE id_dossier in (\".substr($sql_selection_dossiers,0,-1).\")\";\r\n\t// Recup des infos\r\n\tif(db_valeur(\"SELECT count(*) \".$sql_selection_dossiers)>0)\r\n\t{\r\n\t\t$tache_tmp1 = db_ligne(\"SELECT SUM(budget_disponible) as budget_disponible, SUM(budget_engage) as budget_engage, SUM(charge_jour_homme) as charge_jour_homme \".$sql_selection_dossiers);\r\n\t\t$tache_tmp2 = db_ligne(\"SELECT MIN(date_debut) as date_debut, MAX(date_fin) as date_fin \".$sql_selection_dossiers);\r\n\t\t$tache_tmp = array_merge($tache_tmp1, $tache_tmp2);\r\n\t\t$tache_tmp[\"devise\"]\t\t\t\t\t= db_valeur(\"SELECT devise \".$sql_selection_dossiers);\r\n\t\t$tache_tmp[\"avancement\"]\t\t\t\t= db_valeur(\"SELECT ROUND(AVG(avancement)) as avancement \".$sql_selection_dossiers.\" and avancement > 0 \");\r\n\t\t$tache_tmp[\"avancement_moyen_pondere\"]\t= db_valeur(\"SELECT ROUND(SUM(charge_jour_homme*avancement)/SUM(charge_jour_homme)) as avancement \".$sql_selection_dossiers.\" and avancement > 0 and charge_jour_homme > 0 \");\r\n\t\t$tache_synthese_dossier .= tache_budget($tache_tmp, \"dossier\");\r\n\t\t$tache_synthese_dossier .= tache_barre_avancement_charge($tache_tmp, \"dossier\");\r\n\t\t$tache_synthese_dossier .= tache_debut_fin($tache_tmp);\r\n\t\treturn $tache_synthese_dossier;\r\n\t}\r\n}", "title": "" }, { "docid": "1bcf430de333afc80c8be7d07039d30a", "score": "0.51276284", "text": "function afficher() {\r\n \r\n if($this->getEtat()){\r\n echo \"0\";\r\n }else{\r\n \r\n echo \"&nbsp\";\r\n }\r\n \r\n }", "title": "" }, { "docid": "812e9e1509cdf3a84f35e7fca5971a30", "score": "0.5126623", "text": "private function generateAbschlussnoten()\n {\n\t$abschlussnoten = [];\n\t$abschlussnoten[''] = '';\n\t\n\tfor($i = 1.00; $i <= 4.00; $i += 0.01) {\n\t\t$i = number_format($i, 2);\n\t\t$abschlussnoten[$i.''] = $i.'';\n\t}\n\n\t$abschlussnoten['A'] = 'A';\n\t$abschlussnoten['B'] = 'B';\n\t$abschlussnoten['C'] = 'C';\n\t$abschlussnoten['D'] = 'D';\n\t$abschlussnoten['E'] = 'E';\n\t\n\treturn $abschlussnoten;\n }", "title": "" }, { "docid": "d18291e206a464a650bf5bf16caefcc9", "score": "0.5119689", "text": "public function nom_alien()\r\n{\r\n return $this->_nom_alien;\r\n}", "title": "" }, { "docid": "94251ae7469de9c04ac478e138491aa4", "score": "0.5114627", "text": "public function ruta_absoluta()\n {\n throw new Exception( 'Definir.' );\n }", "title": "" }, { "docid": "15e8571cd07d0c3663df4e610c3c604d", "score": "0.51126343", "text": "function fonctionBaliseFermante($parseur, $nomBalise)\r\n {\r\n global $derniereBaliseRencontree;\r\n global $titre;\r\n global $lien;\r\n global $description;\r\n\r\n switch ($nomBalise) {\r\n case \"ITEM\" :\r\n // nous quittons un bloc item\r\n // nous pouvons afficher le titre de l'article\r\n echo \"<tr><td height='28'><a href=\\\"$lien\\\" target='_blank'>\".$titre.\"</a></td></tr>\";\r\n echo \"<tr><td>$description</td></tr>\";\r\n // et on oublie\r\n $titre = \"\";\r\n $lien = \"\";\r\n $description = \"\";\r\n break;\r\n }\r\n \r\n // On oublie la dernière balise rencontrée\r\n // et tout le reste\r\n $derniereBaliseRencontree = \"\";\r\n }", "title": "" }, { "docid": "813e0aaa9da69b35930d285de1421d6e", "score": "0.51087016", "text": "abstract public function getPasiekimai();", "title": "" }, { "docid": "19707594d06c4e039058a7c0ca752273", "score": "0.51042885", "text": "function zusatz_zeichnen($ZEbene_Bezeichnung,$Ebeneninhalt,$s,$X_min,$Y_max,$Stroke_width,$Color)\n{\n\treturn $ZE_Ausg = ' <g transform=\"matrix('.$s.' 0 0 '.$s.' '.$X_min.' '.$Y_max.')\" id=\"zusatz_'.$ZEbene_Bezeichnung.'\" fill=\"none\" pointer-events=\"none\" stroke-width=\"'.$Stroke_width.'\" stroke=\"'.$Color.'\">\n\t\t\t<desc>Zusatz-Inhalt '.utf8_encode($ZEbene_Bezeichnung).'</desc>'.\n\t\t\t$Ebeneninhalt\n\t.'</g>';\n}", "title": "" }, { "docid": "831a2d9b955fe53c7218fc1262e79487", "score": "0.50952697", "text": "function formulaires_editer_encart_charger_dist($id_encart='new', $retour='', $lier_trad=0, $config_fonc='', $row=array(), $hidden=''){\n\t$valeurs = formulaires_editer_objet_charger('encart',$id_encart,'',$lier_trad,$retour,$config_fonc,$row,$hidden);\n\treturn $valeurs;\n}", "title": "" }, { "docid": "4f8e87faae31c6afd02ae8b9ac1a7f9f", "score": "0.5094785", "text": "function truc() {\n}", "title": "" }, { "docid": "f2bf75fa6aa81ec8f82b4f089cf5d485", "score": "0.50878584", "text": "public function reprova()\n {\n $this -> estadoAtual -> reprova($this);\n }", "title": "" }, { "docid": "129f1add35b705c57f325b8588e5b16e", "score": "0.5078966", "text": "function visites_pre_traitement($prev_visites) {\r\n\r\n\t# pour page hier\r\n\tif (!is_array($prev_visites)) {\r\n\t\treturn;\r\n\t}\r\n\r\n\t$temps = $prev_visites[0];\r\n\t$visites = $prev_visites[1];\r\n\t$visites_a = $prev_visites[2];\r\n\r\n\tif (count($temps)) {\r\n\t\tsort($temps);\r\n\t}\r\n\r\n\t$aff = '';\r\n\tif ($nb_articles = count($visites_a)) {\r\n\t\t$heure_f = date('H\\hi', $temps[0]);\r\n\t\t$date_f = date('d/m/Y', $temps[0]);\r\n\r\n\t\t$aff .= \"<div align='center' class='iconeoff verdana2 bold' style='clear:both;'>\\n\"\r\n\t\t\t. _T('actijour:depuis_date_visites_pg',\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'heure' => $heure_f,\r\n\t\t\t\t\t'date' => $date_f == date('d/m/Y') ? '' : '(' . $date_f . ')',\r\n\t\t\t\t\t'nb_visite' => $visites,\r\n\t\t\t\t\t'nb_articles' => $nb_articles\r\n\t\t\t\t))\r\n\t\t\t. \"\\n</div>\\n\";\r\n\t}\r\n\r\n\treturn $aff;\r\n}", "title": "" }, { "docid": "94e37d84b2ad2100ff4c6b090e4c79bf", "score": "0.50782", "text": "function zuiver($tekst)\r\n{\r\n\t$voor = '\"' ;\r\n\t$na = \"&quot;\";\r\n\t$tekst = str_replace($voor, $na, $tekst);\r\n\t$voor = \"'\" ;\r\n\t$na = \"`\";\r\n\t$tekst = str_replace($voor, $na, $tekst);\r\n\t$tekst = strip_tags($tekst);\r\n\t$tekst = stripslashes($tekst);\r\n\t$tekst = htmlentities($tekst);\r\n\treturn $tekst;\r\n}", "title": "" }, { "docid": "b1fafe34bdceffdfcaf9f77dab73db99", "score": "0.5078052", "text": "public function afmelden()\n {\n return true;\n }", "title": "" }, { "docid": "e9bb77779b06bcb111c595a4804efcdf", "score": "0.5061149", "text": "public function accueil()\n {\n }", "title": "" }, { "docid": "5708af3c6299c1a57a5aa3270a73b85f", "score": "0.50587606", "text": "function getOriginal()\n {\n }", "title": "" }, { "docid": "432bdf347686bae961e379c6f225e567", "score": "0.50579953", "text": "public function tocar(){\n echo \"Tocando no volume: \" . $this->volume . \" decibéis. <br>\";\n }", "title": "" }, { "docid": "fb5ebeeac840277bbf1bba2a05ad7430", "score": "0.5049686", "text": "function bestillingAvBrod($type, $antall, $tidspunkt){\r\n //Kunden får oversikt over alle brøene som er tilgjengelig\r\n\r\n //kunden får oversikt over hvor mange brød man kan bestillinger\r\n\r\n //Kunden velger tidspunkt nå brød skal hentes.\r\n\r\n //Informasjon sendes mot database i tabellen som man trenger.\r\n }", "title": "" }, { "docid": "7e85c5f9318dd0d302589cfab04ec245", "score": "0.5043977", "text": "public function testCreateSuperfund()\n {\n }", "title": "" }, { "docid": "f31b5223407bf4ee0d2ad76f3857d180", "score": "0.503899", "text": "public function attaquerAdversaire() {\n\n }", "title": "" }, { "docid": "8c0c6f9192734b338bdb4dea70fa7ad0", "score": "0.50294447", "text": "function gestiondegats($idvaisseauquisefaittirerdessus, $pvvaisseau, $degatdutir, $idarme, $idvaisseauquitire, $idflotteattaquant, $idflottedefenseur, $sensbataille)\r\n {\r\n require __DIR__ . '/../include/bddconnection.php';\r\n $reqdiminuernbtir = $bd->prepare(\"UPDATE c_composantvaisseau SET tirrestant = tirrestant-1 WHERE idtable = ?\");\r\n $reqdiminuernbtir->execute(array($idarme));\r\n\r\n $nvpv = $pvvaisseau - $degatdutir;\r\n $Commentairestour = 'Le vaisseau '.$idvaisseauquisefaittirerdessus.' se fait tirer dessus par le vaisesau '.$idvaisseauquitire.', il perd '.$degatdutir.' PV.<br>';\r\n \r\n $texte1 = '<br>Votre vaisseau ('.$idvaisseauquitire.') vient de tirer sur un vaisseau ennemi ('.$idvaisseauquisefaittirerdessus.'). '.$degatdutir.' dégâts infligés.';\r\n $texte2 = '<br>Votre vaisseau ('.$idvaisseauquisefaittirerdessus.') se fait tirer dessus par un vaisseau ennemi ('.$idvaisseauquitire.'). '.$degatdutir.' dégâts recus.';\r\n\r\n if ($nvpv < 0)\r\n {\r\n $texte1 .= ' Vaisseau détruit.';\r\n $texte2 .= ' Vaisseau détruit.';\r\n\r\n $Commentairestour .= 'Le vaisseau '.$idvaisseauquisefaittirerdessus.' vient de se faire détruire.<br>';\r\n $reqinfopvvaisseau = $bd->prepare(' SELECT p.idjoueurplanete, v.nomvaisseau, f.xflotte, f.yflotte, f.universflotte, v.biensvaisseau, v.titanevaisseau, f.idplaneteflotte\r\n FROM c_vaisseau v\r\n INNER JOIN c_flotte f ON f.idflotte = v.idflottevaisseau\r\n LEFT JOIN c_planete p ON p.idplanete = f.idplaneteflotte\r\n WHERE v.idvaisseau = ?');\r\n $reqinfopvvaisseau->execute(array($idvaisseauquisefaittirerdessus));\r\n $repinfopvvaisseau = $reqinfopvvaisseau->fetch();\r\n\r\n $reqcreerasteroides = $bd->prepare('INSERT INTO c_champsasteroides (xaste , yaste , uniaste, typeitemsaste, quantite) VALUES (?, ?, ?, ?, ?)');\r\n\r\n if ($repinfopvvaisseau['idjoueurplanete'] != 0)\r\n { // On envoit ce message uniquement aux joueurs.\r\n $textemessage = 'Nous avons perdu le vaisseau ' . $repinfopvvaisseau['nomvaisseau'] . ' en ' . $repinfopvvaisseau['xflotte'] . '-' . $repinfopvvaisseau['yflotte'] . ' lors d\\'une bataille spatiale.' ; \r\n $reqmessageinterne = $bd->prepare('INSERT INTO c_messagerieinterne (expediteur , destinataire , lu , titre , texte) VALUES (?, ?, ?, ?, ?)');\r\n $reqmessageinterne->execute(array('Amirauté', $repinfopvvaisseau['idjoueurplanete'], 0, 'Perte d\\'un vaisseau', $textemessage));\r\n }\r\n \r\n // Créer champs d'astéroides : Reprendre le prix du vaisseau\r\n $nbchampsastebien = floor(($repinfopvvaisseau['biensvaisseau'] / 150));\r\n $nbchampsastetitane = floor(($repinfopvvaisseau['titanevaisseau'] / 30));\r\n\r\n if ($nbchampsastebien > 0)\r\n {\r\n $reqcreerasteroides->execute(array($repinfopvvaisseau['xflotte'], $repinfopvvaisseau['yflotte'], $repinfopvvaisseau['universflotte'], 6, $nbchampsastebien));\r\n }\r\n if ($nbchampsastetitane > 0)\r\n {\r\n $reqcreerasteroides->execute(array($repinfopvvaisseau['xflotte'], $repinfopvvaisseau['yflotte'], $repinfopvvaisseau['universflotte'], 8, $nbchampsastetitane));\r\n }\r\n\r\n $reqinfocargo = $bd->prepare(\"SELECT typeitems, quantiteitems FROM c_cargovaisseau WHERE idvaisseaucargo = ?\");\r\n $reqinfocargo->execute(array($idvaisseauquisefaittirerdessus));\r\n while ($repinfocargo = $reqinfocargo->fetch())\r\n { // Cas d'un vaisseau trouvé dans le 1er univers\r\n $reqcreerasteroides->execute(array($repinfopvvaisseau['xflotte'], $repinfopvvaisseau['yflotte'], $repinfopvvaisseau['universflotte'], $repinfocargo['typeitems'], $repinfocargo['quantiteitems']));\r\n }\r\n\r\n // cargovaisseau\r\n $reqdeletecargo = $bd->prepare(\"DELETE FROM c_cargovaisseau WHERE idvaisseaucargo = ?\");\r\n $reqdeletecargo->execute(array($idvaisseauquisefaittirerdessus));\r\n\r\n // composantvaisseau\r\n $reqdeletecomposant = $bd->prepare(\"DELETE FROM c_composantvaisseau WHERE idvaisseaucompo = ?\");\r\n $reqdeletecomposant->execute(array($idvaisseauquisefaittirerdessus));\r\n\r\n // vaisseau\r\n $reqdeletevaisseau = $bd->prepare(\"DELETE FROM c_vaisseau WHERE idvaisseau = ?\");\r\n $reqdeletevaisseau->execute(array($idvaisseauquisefaittirerdessus));\r\n }\r\n else\r\n {\r\n $reqdiminuerpvvaisseau = $bd->prepare('UPDATE c_vaisseau SET HPvaisseau = ? WHERE idvaisseau = ?');\r\n $reqdiminuerpvvaisseau->execute(array($nvpv, $idvaisseauquisefaittirerdessus));\r\n }\r\n\r\n $reqtrouverrapportdecombat = $bd->prepare('SELECT idrapportcombat FROM c_rapportcombat WHERE idflotteattaquant = ? AND idflottedefenseur = ?');\r\n $reqtrouverrapportdecombat->execute(array($idflotteattaquant, $idflottedefenseur));\r\n $reptrouverrapportdecombat = $reqtrouverrapportdecombat->fetch();\r\n\r\n // Vérifier si le rapport existe. Si ce n'est pas le cas, le créer.\r\n if (!isset($reptrouverrapportdecombat['idrapportcombat']))\r\n {\r\n $reqcreerrapportcombat = $bd->prepare('INSERT INTO c_rapportcombat(idflotteattaquant, idflottedefenseur, texteattaquant, textedefenseur) VALUES(?, ?, ?, ?)');\r\n $texteattaquant = 'Début du rapport de combat. Vous attaquez une flotte ('.$idflottedefenseur.').';\r\n $textedefenseur = 'Début du rapport de combat. Vous êtes attaqués par une flotte ('.$idflotteattaquant.').';\r\n $reqcreerrapportcombat->execute(array($idflotteattaquant, $idflottedefenseur, $texteattaquant, $textedefenseur));\r\n }\r\n\r\n if($sensbataille == 1)\r\n {\r\n $textesupplementaireattaquant = $texte1;\r\n $textesupplementairedefenseur = $texte2;\r\n }\r\n elseif($sensbataille == 2)\r\n {\r\n $textesupplementaireattaquant = $texte2;\r\n $textesupplementairedefenseur = $texte1;\r\n }\r\n\r\n // Le compléter.\r\n $requpdaterapportcombat = $bd->prepare('UPDATE c_rapportcombat\r\n SET texteattaquant = concat(texteattaquant, ?), textedefenseur = concat(textedefenseur, ?)\r\n WHERE idflotteattaquant = ? AND idflottedefenseur = ?');\r\n $requpdaterapportcombat->execute(array($textesupplementaireattaquant, $textesupplementairedefenseur, $idflotteattaquant, $idflottedefenseur));\r\n\r\n return $Commentairestour;\r\n }", "title": "" }, { "docid": "c621f7da7c5fe9b48f903af1e6172737", "score": "0.5029231", "text": "public function stampaDipendenti() {\n echo '<p> Nome: ' . $this->nome . '</p>';\n echo '<p> Cognome: ' . $this->cognome . '</p>';\n echo '<p> Software utilizzati: ' . $this->software . '</p>';\n }", "title": "" }, { "docid": "ae73790b5bea3212ad33a1a6f141a552", "score": "0.5028845", "text": "function tratamentoDadosProduto( $name_prod, $preco_prod, $qntd_prod, $categoria_prod,\n $tipo_venda_prod, $qntd_min_prod, $descricao, $producao, $validade, $imgProdutos, \n $tipo_function) \n {\n // limpar o nome do produto para não correr risco de SQLI ou partes html\n $name_prod = filter_var($name_prod, FILTER_SANITIZE_STRING);\n // limpar o valor do produto p/conter apenas números\n $preco_prod = filter_var($preco_prod, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION);\n // limpar a qntd disponivel do produto p/conter apenas números\n $qntd_prod = filter_var($qntd_prod, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION);\n // limpar a categoria do produto p/conter apenas números\n $categoria_prod = filter_var($categoria_prod, FILTER_SANITIZE_STRING);\n // limpar o tipo de venda do produto p/conter apenas números\n $tipo_venda_prod = filter_var($tipo_venda_prod, FILTER_SANITIZE_NUMBER_INT);\n // limpar a qntd minima de venda do produto p/conter apenas números\n $qntd_min_prod = filter_var($qntd_min_prod, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION);\n // limpar a descrição do produto para não correr risco de SQLI ou partes html\n $descricao = filter_var($descricao, FILTER_SANITIZE_STRING);\n // limpar e verificar se a data contém apenas números\n $producao = preg_replace(\"([^0-9/-])\", \"\", $producao);\n // limpar e verificar se a data contém apenas números\n $validade = preg_replace(\"([^0-9/-])\", \"\", $validade);\n\n if ($tipo_function == 1) {\n return $this->cadastrarProduto( $name_prod, $preco_prod, $qntd_prod, $categoria_prod, \n $tipo_venda_prod, $qntd_min_prod, $descricao, $producao, $validade, $imgProdutos);\n\n } elseif ($tipo_function == 2) {\n return $this->updateProduto( $name_prod, $preco_prod, $qntd_prod, $categoria_prod,\n $tipo_venda_prod, $qntd_min_prod, $descricao, $producao, $validade, $imgProdutos);\n }\n }", "title": "" }, { "docid": "48239e331ef349b9b1341d91d1dcf050", "score": "0.50258154", "text": "private function Zapis_kolize_formulare($pole, $idcka_skolizi, $iducast, $formular) { \r\n//znevalidneni vsech kolizi pro ucastnika a tento formular\r\n self::Znevalidni_kolize_ucastnika_formulare($iducast, $formular); \r\n\r\n//zapis do uc_kolize_table pro kazdou nastalou s_kolizi\r\n foreach ($idcka_skolizi as $id_skolize) { //zapisovana policka jsou v $pole\r\n //echo \"policko: \" . $pole['uc_kolize_table§' . $id_skolize . '_revidovano'];\r\n $kolize = new Projektor2_Table_UcKolizeData ($iducast, (int)$id_skolize,\r\n $pole['uc_kolize_table§' . $id_skolize . '_revidovano'],\r\n $pole['uc_kolize_table§' . $id_skolize . '_revidovano_pozn'],\r\n null, 1,\r\n null,null,null,null,null) ;\r\n // echo \"v Zapis_kolize_temp\" . var_dump ($kolize);\r\n $kolize->Zapis_jednu_kolizi(); //kdyz je v tabulce uc_kolize_table, tak prepsat, kdyz neni, tak insert\r\n }\r\n\r\n}", "title": "" }, { "docid": "40be5221c310cca683d39892ba1f5d6e", "score": "0.5025652", "text": "public function obtenerViajesplusAbonados();", "title": "" }, { "docid": "2346e1d44c922b23b68599d77087edd1", "score": "0.5020035", "text": "function archobjet_autoriser() {\n}", "title": "" }, { "docid": "40986cb0845f78040123b8f59df2672a", "score": "0.50192726", "text": "function DelArtikelAuftrag($id)\n {\n\n\n }", "title": "" }, { "docid": "895813270d4149eddaa85b2b0a076df2", "score": "0.50141245", "text": "function sevenconcepts_pre_insertion($flux){\n if ($flux['args']['table']=='spip_auteurs'){\n include_spip('cextras_pipelines');\n $champs_extras=champs_extras_objet(table_objet_sql('auteur'));\n foreach($champs_extras as $value){\n $flux['data'][$value['options']['nom']]=_request($value['options']['nom']); \n }\n $flux['data']['name']=_request('nom_inscription'); \n }\nreturn $flux;\n}", "title": "" }, { "docid": "226143cd953f83a39fed5a22ffe06c0e", "score": "0.50135785", "text": "public function taxonomieen()\n\t{\n\t\t// bepaalde waarden worden opgeslagen\n\t\t// verwerkt de taxonomieen tot bv \"categorie\"\n\t\t// @TODO meervoud van taxonomieen dient nog correct ingesteld te worden in posttypes.php en die hier uitgedraaid te worden via\n\t\t// https://developer.wordpress.org/reference/functions/get_taxonomy_labels/\n\n\t\tif (!$this->taxonomieen || $this->is_categorie) return;\n\n\n\t\t$tl_str = $this->art->post_type . '-taxlijst';\n\t\t//niet iedere keer opnieuw doen.\n\t\tif (!array_key_exists($tl_str, $GLOBALS)) {\n\t\t\t$this->maak_taxlijst();\n\t\t}\n\n\n\t\t$terms = wp_get_post_terms($this->art->ID, $GLOBALS[$tl_str]);\n\n\t\t$overslaan = array('Geen categorie', 'Uncategorized');\n\n\t\t$print_ar = array();\n\n\t\tif (count($terms)) :\n\n\t\t\tforeach ($terms as $term) :\n\n\t\t\t\tif (in_array($term->name, $overslaan)) continue;\n\n\t\t\t\tif (array_key_exists($term->taxonomy, $print_ar)) {\n\t\t\t\t\t$print_ar[$term->taxonomy][] = $term->name;\n\t\t\t\t} else {\n\t\t\t\t\t$print_ar[$term->taxonomy] = array($term->name);\n\t\t\t\t}\n\n\t\t\tendforeach;\n\n\t\t\t///\n\n\t\t\tif (count($print_ar)) {\n\n\t\t\t\t$teller = 0;\n\n\t\t\t\tforeach ($print_ar as $tax_naam => $tax_waarden) :\n\n\t\t\t\t\tif ($tax_naam === 'category') $tax_naam = 'categorie';\n\n\t\t\t\t\t//als geen datum, dan eerste tax waarde geen streepje links.\n\n\t\t\t\t\t$str = \"- \";\n\n\t\t\t\t\tif ($this->geen_datum && $teller < 1) {\n\t\t\t\t\t\t$str = \"\";\n\t\t\t\t\t\t$teller++;\n\t\t\t\t\t}\n\n\t\t\t\t\techo \"<span class='tax tekst-zwart'> $str\" . strtolower(implode(', ', $tax_waarden)) . \"</span>\";\n\n\n\t\t\t\tendforeach; //iedere print_ar\n\t\t\t}\n\t\tendif; //als count terms\n\n\n\t}", "title": "" }, { "docid": "53e3c940eb70161188dfca276bf61587", "score": "0.50130546", "text": "function formulaires_publication_ouverte_agenda_charger_dist()\n{\n\t$values = array();\n\n\t$values['etape'] \t\t= _request('etape');\t\t\t// etape actuelle\n\t$values['id_article']\t \t= _request('id_article');\t\t// id de l'article temporaire\n\t$values['type']\t\t\t= \"evenement\";\t\t\t// article ou evenement ?\n\t$values['id_rubrique'] \t\t= _request('id_rubrique');\t\t// rubrique de la contrib\n\t$values['jour_evenement'] \t= _request('jour_evenement'); \t\t// jour de l'événement\n\t$values['mois_evenement'] \t= _request('mois_evenement'); \t\t// mois de l'événement\n\t$values['annee_evenement'] \t= _request('annee_evenement'); \t\t// annee de l'événement\n\t$values['heure_evenement'] \t= _request('heure_evenement'); \t\t// heure de l'événement\n\t$values['lieu_evenement']\t= _request('lieu_evenement');\t\t// lieu de l'evenement\n\t$values['ville_evenement']\t= _request('ville_evenement');\t\t// lieu de l'evenement\n\t$values['adresse_evenement']\t= _request('adresse_evenement');\t// lieu de l'evenement\n\t$values['tel_evenement']\t= _request('tel_evenement');\t\t// lieu de l'evenement\n\t$values['web_evenement']\t= _request('web_evenement');\t\t// lieu de l'evenement\n\t$values['email_evenement']\t= _request('email_evenement');\t\t// lieu de l'evenement\n\t$values['lieu_evenement_existe']= _request('lieu_evenement_existe');\t// lieu de l'evenement déjà existant\n\t$values['titre'] \t\t= _request('titre');\t\t\t// titre de la contrib\n\t$values['texte'] \t\t= _request('texte');\t\t\t// texte de la contrib\n\t$values['pseudo'] \t\t= _request('pseudo');\t\t\t// pseudo ou nom de l'auteur\n\t$values['email'] \t\t= _request('email');\t\t\t// email de l'auteur\n\t$values['mots'] \t\t= _request('mots');\t\t\t// les mots-clés\n\t$values['date'] = _request('date');\n\t$values['date_modif'] = _request('date_modif');\n\t$values['supprimer_documents'] = _request('supprimer_documents');\n\t// editos\n\t$values['mise_en_edito'] = _request('mise_en_edito');\n\t$values['edito_complet'] = _request('edito_complet');\n\t// focus\n\t$values['mot_focus'] = _request('mot_focus');\n\t// si c'est pas un debut d'article\n\tif (_request('titre') or _request('previsu'))\n\t\t$values['ancre'] = '#etape_4';\n\telse\n\t\t$values['ancre'] = '.page-article';\n\t\n\t/*\n\t * s'il s'agit du premier passage, on créé l'article\n\t */\n\tif (!$values['id_article'])\n\t{\n\t\t$id_article = indymedia_creer_article();\n\t\t$values['id_article'] = $id_article;\n\t}\n\t/*\n\t * sinon, si admin, on peut l'éditer\n\t */\n\telse if ($values['id_article'] && est_admin())\n\t{\n\t\t$id_article = (int) $values['id_article'];\n\t\t// on recupere des infos sur l'article\t\n\t\t$row = sql_fetsel(\n\t\t\tarray('texte','extra','id_rubrique','titre','date_debut_indy','statut','date'),\n\t\t\tarray('spip_articles'),\n\t\t\tarray('id_article='.$id_article)\n\t\t);\n\t\t$values['texte'] = $row['texte'] ;\n\t\t$values['titre'] = $row['titre'] ;\n\t\t$values['id_rubrique'] = $row['id_rubrique'] ;\n\t\t//$values['statut'] = $row['statut'] ;\n\t\t$extra = unserialize($row['extra']);\n\t\t$values['explication'] = $extra['OP_moderation'];\n\t\t$values['pseudo'] = $extra['OP_pseudo'];\n\t\t$values['email'] = $extra['OP_email'];\n\t\t$values['date'] = $row['date'];\n\t\t\n\t\t// on recupere la date, l'heure et le lieu de l'evenement\n\t\t$values = indymedia_ajout_valeurs_date ($values, $row['date_debut_indy']);\n\t\t$values = indymedia_ajout_valeurs_lieu ($values, $id_article);\n\t\t$values = indymedia_ajout_valeurs_mots ($values, $id_article);\n\t}\n\tinclude_spip('inc/securiser_action');\n\t$values['cle_ajouter_document'] = calculer_cle_action('ajouter-document-' . 'article' . '-' . $id_article);\n\n\treturn $values;\n}", "title": "" }, { "docid": "a10c84d4c2cfae5cd53bf384309fcb48", "score": "0.50127053", "text": "function liste_mit_foreignkey($abfrage,$foreignkey,$ur_tabelle,$ur_spalte,$aktion,$url,$url_basiclevel, $anzahl_listen_pro_seite=1) {\n\t$mysqli=MyDatabase();\n\techo '<script language=\"JavaScript\" src=\"'.$url_basiclevel.'tools_vE.js\"></script>';\n\t// Zunaechst werden die Elemente der Urtabelle in einem Array gespeichert:\n\t$ur_abfrage=\"SELECT `ID`,`$ur_spalte` FROM $ur_tabelle\";\n\t$ur_array=array();\n\tif ($result=$mysqli->query($ur_abfrage)); {\n\t\twhile($row=$result->fetch_object()) {\n\t\t\t\t$ur_array[$row->ID] = $row->$ur_spalte;\t\n\t\t\t\tif($ur_tabelle == \"Mitarbeiter\" || $ur_tabelle == \"Kunden\") {$ur_array[$row->ID] = c3po::lesen($ur_array[$row->ID]);}\n\t\t\t}\n\t\t}\n\t\t\n\t// Nun wird die Tabelle abgefragt, welche die foreign-keys beinhaltet:\n\t$elemente_liste_fk=array();\n\tif ($result=$mysqli->query($abfrage)) {\n\t\twhile ($row=$result->fetch_object())\t {\n\t\t\t$id=$row->ID;\n\t\t\t$feld=$row->$foreignkey;\n\t\t\t$elemente_liste_fk[$id]=$ur_array[$feld];\n\t\t\t}\n\t\t}\n\t\t\n\techo \"<table>\";\n\techo \"<table border='0'>\";\n\tasort($elemente_liste_fk);\n\tforeach ($elemente_liste_fk as $key=>$value) {\n\t\techo \"<tr id='zeile_grau'><td>$value</td>\n\t\t\t<td>\";\n\t\t\n\t\t// Nun werden die Grafiken hinzugefuegt:\t\n\t\t$id_bild=$key*10*$anzahl_listen_pro_seite+2;\n\t\t$name_bild=\"bild\".$id_bild;\t\t\n\t\techo '<img src=\"'.$url_basiclevel.'pics/loeschen.png\" \n\t\t\t\tname=\"'.$name_bild.'\"\t\t\t\n\t\t\t\tonclick=\"f_element_deaktivieren('.$key.',\\''.$aktion.'\\',\\''.$url.'\\')\"\n\t\t\t\tonmouseover=\"f_loeschen_big_button2('.$id_bild.',\\''.$url_basiclevel.'\\')\"\n\t\t\t\tonmouseout=\"f_loeschen_small_button2('.$id_bild.',\\''.$url_basiclevel.'\\')\">';\n\t\t\t\t\n\t\techo \"</td><td></tr>\";\n\t\t}\n\t\t\n\techo \"</table>\";\t \n}", "title": "" }, { "docid": "4da51ce21d2a8cb177a9a30669829208", "score": "0.50121796", "text": "public abstract function Ataca();", "title": "" }, { "docid": "6e2fa8ce6e574554774b100bf2f67ad9", "score": "0.5011722", "text": "function formulaires_recommander_charger_dist(){\n\t$valeurs = array('destinataire'=>'','destinataires'=>'','texte'=>'');\n\n\treturn $valeurs;\n}", "title": "" }, { "docid": "11892cd7494c9a7b6ecee96f106d5cca", "score": "0.5009849", "text": "public function plus_abonados();", "title": "" }, { "docid": "45398a971801cfddfc75304c2c35e70b", "score": "0.5009043", "text": "function distribuir(){\r\n\t\t$fPesq = new fachada_pesquisador();\r\n\t\t$fAtend = new fachada_atendimento();\r\n\t\t$fSelecao = new fachada_selecao();\r\n\t\t$fOferta = new fachada_oferta();\r\n\t\t$fMax = new fachada_maxbolsa();\r\n\t\t$ano = $_SESSION['sAno'];\r\n\t\t$tpSelecao = $_SESSION['sEdital'];\r\n\t\t// retorna um vetor com as bolsas ofertadas em um edital em determinado ano. (cod,codTipoEdital,codTipoBolsa,ano,prioridade,qtd)\r\n\t\t$vetOfertaBolsas = $fOferta->getOfertasAnoEdital($ano,$tpSelecao);\r\n\t\t$ofertaBolsasGeral = array();\r\n\t\t$qtdOfertaBolsasCapital = 0;\r\n\t\t$qtdOfertaBolsasAF = 0;\r\n\t\t$qtdOfertaBolsasInterior = 0;\r\n\t\t$qtdOfertaBolsasPIBITI = 0;\r\n\t\t\r\n\t\tfor($i=0;$i<count($vetOfertaBolsas);$i++){\r\n\t\t\t// Soma as quantidades de bolsas ofertadas do 1 - CNPq, 2 - UFPA e 3- FAPESPA e atribui ao vetor $ofertaBolsasGeral\r\n\t\t\tif( ($vetOfertaBolsas[$i]->getPrioridade() == 1) OR ($vetOfertaBolsas[$i]->getPrioridade() == 2) OR ($vetOfertaBolsas[$i]->getPrioridade() == 3) ){\r\n\t\t\t\t$ofertaBolsasGeral[$vetOfertaBolsas[$i]->getCodTipoBolsa()][codTipoBolsa] = $vetOfertaBolsas[$i]->getCodTipoBolsa();\r\n\t\t\t\t$ofertaBolsasGeral[$vetOfertaBolsas[$i]->getCodTipoBolsa()][qtdBolsaOfertada] = $vetOfertaBolsas[$i]->getQtd();\r\n\t\t\t\t//Soma a quantidade de cada bolsa e agrupa no total do subedital Capital\r\n\t\t\t\t$qtdOfertaBolsasCapital += $vetOfertaBolsas[$i]->getQtd();\r\n\t\t\t}\r\n\t\t\t// Soma as quantidades de bolsas ofertadas do 4 - CNPq AF e 5 - UFPA AF e atribui ao vetor $ofertaBolsasGeral\r\n\t\t\tif( ($vetOfertaBolsas[$i]->getPrioridade() == 4) OR ($vetOfertaBolsas[$i]->getPrioridade() == 5) ){\r\n\t\t\t\t$ofertaBolsasGeral[$vetOfertaBolsas[$i]->getCodTipoBolsa()][codTipoBolsa] = $vetOfertaBolsas[$i]->getCodTipoBolsa();\r\n\t\t\t\t$ofertaBolsasGeral[$vetOfertaBolsas[$i]->getCodTipoBolsa()][qtdBolsaOfertada] = $vetOfertaBolsas[$i]->getQtd();\t\t\t\t\t\r\n\t\t\t\t//Soma a quantidade de cada bolsa e agrupa no total do subedital AF\r\n\t\t\t\t$qtdOfertaBolsasAF += $vetOfertaBolsas[$i]->getQtd();\t\t\r\n\t\t\t}\r\n\t\t\t// Soma a quantidade de bolsas ofertadas do 6 - Interior e atribui ao vetor $ofertaBolsasGeral\r\n\t\t\tif( ($vetOfertaBolsas[$i]->getPrioridade() == 6)){\r\n\t\t\t\t$ofertaBolsasGeral[$vetOfertaBolsas[$i]->getCodTipoBolsa()][codTipoBolsa] = $vetOfertaBolsas[$i]->getCodTipoBolsa();\r\n\t\t\t\t$ofertaBolsasGeral[$vetOfertaBolsas[$i]->getCodTipoBolsa()][qtdBolsaOfertada] = $vetOfertaBolsas[$i]->getQtd();\t\t\t\t\t\r\n\t\t\t\t//Soma a quantidade de cada bolsa e agrupa no total do subedital Interior\r\n\t\t\t\t$qtdOfertaBolsasInterior += $vetOfertaBolsas[$i]->getQtd();\t\r\n\t\t\t\t}\r\n\t\t\t// Soma a quantidade de bolsas ofertadas do 7 - PIBITI e atribui ao vetor $ofertaBolsasGeral\r\n\t\t\tif( ($vetOfertaBolsas[$i]->getPrioridade() == 7)){\r\n\t\t\t\t$ofertaBolsasGeral[$vetOfertaBolsas[$i]->getCodTipoBolsa()][codTipoBolsa] = $vetOfertaBolsas[$i]->getCodTipoBolsa();\r\n\t\t\t\t$ofertaBolsasGeral[$vetOfertaBolsas[$i]->getCodTipoBolsa()][qtdBolsaOfertada] = $vetOfertaBolsas[$i]->getQtd();\t\t\t\t\t\r\n\t\t\t\t//Soma a quantidade de cada bolsa e agrupa no total do subedital Interior\r\n\t\t\t\t$qtdOfertaBolsasPIBITI += $vetOfertaBolsas[$i]->getQtd();\t\r\n\t\t\t\t}\t\t\t\t\r\n\t\t} //Fim do FOR\r\n\t\t\r\n\t\t// retorna um vetor com a quantidade m�xima que um pesquisador pode receber de acordo com a pontua��o m�nima. (cod,ponto,qtd,tpselecao,ano)\r\n\t\t$vetMax = $fMax->getMaxbolsaSelecao(); \r\n\r\n\t\t$oferta\t = 0;\r\n\t\t$vetAtend = array();\r\n\t\tif($vetMax and $vetOfertaBolsas ){\r\n\t\t\t$maxqtd = $vetMax[0]->getQtd();\r\n\t\t\tfor($i=0;$i<count($vetOfertaBolsas);$i++){\r\n\t\t\t\t$oferta \t= $oferta + $vetOfertaBolsas[$i]->getQtd(); //Soma das quantidades de bolsas ofertadas em um edital\r\n\t\t\t}\r\n\t\t\t$fSelecao->zeraNumBolsaAtend(); //zera o numero de bolsas atendidas,caso esteja redistribuindo\r\n\t\t\t$fAtend->deletaTodosAt();\t\t //deleta os atendimentos,caso esteja redistribuindo\r\n\t\t\tif($tpSelecao==1){\t\t//problema: considera q os pedidos s�o menores q o disponivel\r\n\t\t\t\t$vetProd = $fPesq->getClassificadosProd(); // retorna os pesquisadores de produtividade inscritos e ativos(nome,id,numBolsa,numBolsaAtend,unidade)\r\n\t\t\t\t\r\n\t\t\t\twhile($l = array_shift($vetProd )){ \r\n\t\t\t\t\t// Retorna um vetor com o(s) tipo(s) de bolsas e quantidade solicitadas pelo pesquisador: tipoConjBolsasSolic,qtdBolsaTipoSolic\r\n\t\t\t\t\t$vTipoBolsasSolicitadas = $fSelecao->getTipoBolsasSolicitadasAno($l[id]);\r\n\t\t\t\t\t$max = $maxqtd; // quantidade m�xima que um pesquisador poder� receber\r\n\t\t\t\t\t\r\n\t\t\t\t\tif($l[numBolsa]>$max){ // se o n�mero de bolsas solicitadas for maior que o n�mero m�ximo de bolsas permitido a um pesquisador\r\n\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($max,$l[id]); // seta no banco de dados o numero de bolsas atendidas igual ao n�mero m�ximo de bolsas permitidas\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t// Caso o pesquisador tenha solicitado um tipo de bolsa\r\n\t\t\t\t\t\t\tif (count($vTipoBolsasSolicitadas)==1){\r\n\t\t\t\t\t\t\t\t$vEditalBolsaSolicitada = array_shift($vTipoBolsasSolicitadas);\r\n\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\r\n\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\t\t\t\t\t\t\t\twhile ($flagProximaBolsa==1){\r\n\t\t\t\t\t\t\t\t\tswitch($vEditalBolsaSolicitada[\"tipoConjBolsasSolic\"]){\r\n\t\t\t\t\t\t\t\t\tcase \"1\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital Capital ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasCapital >0){\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas CNPq\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[1][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t// Verifica se o n�mero de bolsas CNPq � suficiente para atender a quantidade solicitada pelo pesq\r\n\t\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[1][qtdBolsaOfertada]>=$l[numBolsa]){\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[1][codTipoBolsa],$l[numBolsa]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[1][qtdBolsaOfertada] -= $l[numBolsa];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital -= $l[numBolsa];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($l[numBolsa],$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[1][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[1][qtdBolsaOfertada] -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$l[numBolsa]--;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} // Fim cnpq\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas UFPA\r\n\t\t\t\t\t\t\t\t\t\telseif ($ofertaBolsasGeral[2][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[2][qtdBolsaOfertada]>=$l[numBolsa]){ \r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[2][codTipoBolsa],$l[numBolsa]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[2][qtdBolsaOfertada] -= $l[numBolsa];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital -= $l[numBolsa];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($l[numBolsa]+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[2][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[2][qtdBolsaOfertada] -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$l[numBolsa]--;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} // Fim ufpa\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas FAPESPA\r\n\t\t\t\t\t\t\t\t\t\telseif ($ofertaBolsasGeral[4][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[4][qtdBolsaOfertada]>=$l[numBolsa]){ \r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[4][codTipoBolsa],$l[numBolsa]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[4][qtdBolsaOfertada] -= $l[numBolsa];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital -= $l[numBolsa];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($l[numBolsa]+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[4][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[4][qtdBolsaOfertada] -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$l[numBolsa]--;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} // Fim fapespa\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital Capital if($qtdOfertaBolsasCapital >0)\r\n\t\t\t\t\t\t\t\t\t// Caso o subedital n�o possua mais bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\telse $flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\tcase \"2\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital AF ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasAF >0){\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas CNPq AF\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[5][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t// Verifica se o n�mero de bolas CNPq AF � suficiente para atender a quantidade solicitada pelo pesq\r\n\t\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[5][qtdBolsaOfertada]>=$l[numBolsa]){\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[5][codTipoBolsa],$l[numBolsa]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[5][qtdBolsaOfertada] -= $l[numBolsa];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasAF -= $l[numBolsa];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($l[numBolsa]+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[5][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[5][qtdBolsaOfertada] -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasAF -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$l[numBolsa]--;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} // Fim CNPq AF\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas UFPA AF\r\n\t\t\t\t\t\t\t\t\t\telseif ($ofertaBolsasGeral[6][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t// Verifica se o n�mero de bolas UFPA AF � suficiente para atender a quantidade solicitada pelo pesq\r\n\t\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[6][qtdBolsaOfertada]>=$l[numBolsa]){\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[6][codTipoBolsa],$l[numBolsa]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[6][qtdBolsaOfertada] -= $l[numBolsa];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasAF -= $l[numBolsa];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($l[numBolsa]+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[6][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[6][qtdBolsaOfertada] -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasAF -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$l[numBolsa]--;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} // Fim CNPq AF\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital AF if($qtdOfertaBolsasAF >0)\r\n\t\t\t\t\t\t\t\t\t// Caso o subedital n�o possua mais bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\telse $flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\tcase \"3\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital Interior ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasInterior >0){\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas Interior\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[3][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t// Verifica se o n�mero de bolas CNPq � suficiente para atender a quantidade solicitada pelo pesq\r\n\t\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[3][qtdBolsaOfertada]>=$l[numBolsa]){\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[3][codTipoBolsa],$l[numBolsa]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[3][qtdBolsaOfertada] -= $l[numBolsa];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasInterior -= $l[numBolsa];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($l[numBolsa]+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[3][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[3][qtdBolsaOfertada] -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasInterior -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$l[numBolsa]--;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} // Fim Interior\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital INTERIOR if($qtdOfertaBolsasINTERIOR >0)\r\n\t\t\t\t\t\t\t\t\t// Caso o subedital n�o possua mais bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\telse $flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tcase \"4\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital PIBITI ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasPIBITI >0){\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas Interior\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[8][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t// Verifica se o n�mero de bolsas PIBITI CNPq � suficiente para atender a quantidade solicitada pelo pesq\r\n\t\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[8][qtdBolsaOfertada]>=$l[numBolsa]){\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[8][codTipoBolsa],$l[numBolsa]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[8][qtdBolsaOfertada] -= $l[numBolsa];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasPIBITI -= $l[numBolsa];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($l[numBolsa]+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[8][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[8][qtdBolsaOfertada] -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasPIBITI -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$l[numBolsa]--;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} // Fim PIBITI\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital PIBITI if($qtdOfertaBolsasPIBITI >0)\r\n\t\t\t\t\t\t\t\t\t// Caso o subedital n�o possua mais bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\telse $flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} //final switch\r\n\t\t\t\t\t\t\t\t} //Fim while ($flagProximaBolsa=1)\t\r\n\t\t\t\t\t\t\t}// Fim count($vTipoBolsasSolicitadas)==1)\r\n\t\t\t\t\t\t\telseif (count($vTipoBolsasSolicitadas)==2){\r\n\t\t\t\t\t\t\t\t$qtdBolsasSolic = 1;\r\n\t\t\t\t\t\t\t\t// Caso o pesquisador j� tenha recebido alguma bolsa durante a distribui��o atual de bolsas\r\n\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\t\t\t\t\t\t\t\twhile($bolsaSolic = array_shift($vTipoBolsasSolicitadas)){\r\n\t\t\t\t\t\t\t\t\tswitch($bolsaSolic[\"tipoConjBolsasSolic\"]){\r\n\t\t\t\t\t\t\t\t\tcase \"1\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital Capital ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasCapital >0){\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas CNPq\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[1][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[1][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[1][qtdBolsaOfertada]--;\r\n\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital--;\r\n\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t} // Fim cnpq\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas UFPA\r\n\t\t\t\t\t\t\t\t\t\telseif ($ofertaBolsasGeral[2][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[2][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\r\n\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[2][qtdBolsaOfertada]--;\r\n\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital--;\r\n\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t} // Fim ufpa\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas FAPESPA\r\n\t\t\t\t\t\t\t\t\t\telseif ($ofertaBolsasGeral[4][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[4][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\r\n\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[4][qtdBolsaOfertada]--;\r\n\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital--;\r\n\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t} // Fim fapespa\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital Capital\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\tcase \"2\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital AF ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasAF >0){\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas CNPq AF\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[5][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[5][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\r\n\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[5][qtdBolsaOfertada]--;\r\n\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasAF--;\r\n\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t} // Fim cnpq af\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas UFPA AF\r\n\t\t\t\t\t\t\t\t\t\telseif ($ofertaBolsasGeral[6][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[6][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[6][qtdBolsaOfertada]--;\r\n\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasAF--;\r\n\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t} // Fim ufpa af\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital AF\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\tcase \"3\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital Interior ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasInterior >0){\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas Interior\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[3][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[3][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\r\n\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[3][qtdBolsaOfertada]--;\r\n\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasInterior--;\r\n\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t} // Fim Interior\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital Interior\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\tcase \"4\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital PIBITI ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasPIBITI >0){\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas Interior\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[8][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[8][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\r\n\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[8][qtdBolsaOfertada]--;\r\n\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasPIBITI--;\r\n\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t} // Fim PIBITI\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital PIBITI\r\n\t\t\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} //final switch\r\n\t\t\t\t\t\t\t\t}// while\r\n\t\t\t\t\t\t\t} // elseif (count($vTipoBolsasSolicitadas)==2)\r\n\t\t\t\t\t\t} // Fim do else ($l[numBolsa]>$max)\r\n\t\t\t\t}//FIM DO WHILE DE ARRAY DE PESQUISADORES DE PRODUTIVIDADE\r\n\t\t\t}// fim do if $tpSelecao==1\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t$vetPesqPontos = $fPesq->getClassificadosPonto(); //retorna a rela��o de pesquisadores por ordem de pontua��o.\r\n\t\t\t\r\n\t\t\t// INICIO DA ORDENA��O DO VETOR DE PONTUA��O\r\n\t\t\t\r\n\t\t\tforeach($vetPesqPontos as &$vetor){\r\n \t\t\t$anoNota = $_SESSION['sAno']-1;\r\n\t\t\t\t\r\n\t\t\t\tif ($this->getSelecaoNotaPesq($vetor[id],$anoNota)){\r\n\t\t\t\t\t$notaPesquisador = $this->getSelecaoNotaPesq($vetor[id],$anoNota);\r\n\t\t\t\t}\r\n\t\t\t\telse $notaPesquisador = 0;\r\n\t\t\t\t$vetor[ponto] = $vetor[ponto] + ($notaPesquisador*0.025*$vetor[ponto]);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tforeach ($vetPesqPontos as $chave => $linha) { \r\n\t\t\t\t$nome[$chave] = $linha['nome']; \r\n\t\t\t\t$id[$chave] = $linha['id']; \r\n\t\t\t\t$numBolsa[$chave] = $linha['numBolsa']; \r\n\t\t\t\t$unidade[$chave] = $linha['unidade']; \r\n\t\t\t\t$ponto[$chave] = $linha['ponto']; \r\n\t\t\t} \r\n\r\n\t\t\tarray_multisort($ponto, SORT_DESC, $nome, SORT_ASC, $vetPesqPontos);\r\n\t\t\t// FIM DA ORDENA��O DO VETOR DE PONTUA��O\r\n\r\n\t\t\t//foreach ($vetPesqPontos as $vetor) { \r\n\t\t\t//\techo \"O nome do pesquisadador (ID: \".$vetor[id].\") � \".$vetor[nome].\", sua pontua��o � \".$vetor[ponto].\"<br>\";\r\n\t\t\t//}\r\n\r\n\t\t\twhile($l = array_shift($vetPesqPontos)){\r\n\t\t\t\t$valorAtendido = 0;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//verifica se ainda h� bolsa para distribuir\r\n\t\t\t\tif (($qtdOfertaBolsasCapital > 0) || ($qtdOfertaBolsasAF > 0) || ($qtdOfertaBolsasInterior > 0) || ($qtdOfertaBolsasPIBITI > 0)){\r\n\t\r\n\t\t\t\t\t$vBolsasAtivasPesq = $this->getBolsaAtivaPesqAno($l[id],2014); //verifica se determinado pesquisador possui bolsa em vigor\r\n\t\t\t\t\tif($vBolsasAtivasPesq){\r\n\t\t\t\t\t\t$numbolAtivas = count($vBolsasAtivasPesq); // quantidade de bolsas ativas de um pesquisador\r\n\t\t\t\t\t} else $numbolAtivas = 0;\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t$ponto = $l[ponto]; // pontua��o do pesquisador\r\n\t\t\t\t\t$maxBolsaPorPontuacao = 0;\r\n\t\t\t\t\t// verfica a quantidade m�xima que o pesquisador poder� receber comparando as pontua��es m�nima e m�xima. \r\n\t\t\t\t\t//Por exemplo, pontua��o > 300 pontos -> $max=2; pontua��o > 0 pontos -> $max=1;\r\n\t\t\t\t\tfor ($i=0;$i<count($vetMax);$i++){\r\n\t\t\t\t\t\tif($ponto >= $vetMax[$i]->getPonto()){\r\n\t\t\t\t\t\t\t$maxBolsaPorPontuacao = $vetMax[$i]->getQtd();\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t} \r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Caso a soma da quantidade m�xima de bolsas permitidas com o n�mero de bolsas ativas de um pesquisador exceda 2\r\n\t\t\t\t\t$BolsasPesqPodeReceber = $maxBolsaPorPontuacao;\r\n\t\t\t\t\twhile(($BolsasPesqPodeReceber+$numbolAtivas)>2){\r\n\t\t\t\t\t\t$BolsasPesqPodeReceber--;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Quantidade de bolsas que o pesquisador pode receber\t\t\t\t\r\n\t\t\t\t\tif($BolsasPesqPodeReceber>$l[numBolsa]){\r\n\t\t\t\t\t\t$BolsasPesqPodeReceber = $l[numBolsa];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Retorna um vetor com o(s) tipo(s) de bolsas e quantidade solicitadas pelo pesquisador: tipoSubEdital,qtdBolsa\r\n\t\t\t\t\t$vTipoBolsasSolicitadas = $fSelecao->getTipoBolsasSolicitadasAno($l[id]);\r\n\r\n\t\t\t\t\t\t// Caso o pesquisador tenha solicitado um tipo de bolsa\r\n\t\t\t\t\t\t\tif (count($vTipoBolsasSolicitadas)==1){\r\n\t\t\t\t\t\t\t\t$vEditalBolsaSolicitada = array_shift($vTipoBolsasSolicitadas);\r\n\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\r\n\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\t\t\t\t\t\t\t\twhile ($flagProximaBolsa==1){\r\n\r\n\t\t\t\t\t\t\t\t\tswitch($vEditalBolsaSolicitada[\"tipoConjBolsasSolic\"]){\r\n\t\t\t\t\t\t\t\t\tcase \"1\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital Capital ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasCapital >0){\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas CNPq\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[1][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// Verifica se o n�mero de bolas CNPq � suficiente para atender a quantidade solicitada pelo pesq\r\n\t\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[1][qtdBolsaOfertada]>=$BolsasPesqPodeReceber){\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[1][codTipoBolsa],$BolsasPesqPodeReceber);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[1][qtdBolsaOfertada] -= $BolsasPesqPodeReceber;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital -= $BolsasPesqPodeReceber;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($BolsasPesqPodeReceber,$l[id]);\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[1][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[1][qtdBolsaOfertada] -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$BolsasPesqPodeReceber--;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} // Fim cnpq\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas UFPA\r\n\t\t\t\t\t\t\t\t\t\telseif ($ofertaBolsasGeral[2][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[2][qtdBolsaOfertada]>=$BolsasPesqPodeReceber){ \r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[2][codTipoBolsa],$BolsasPesqPodeReceber);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[2][qtdBolsaOfertada] -= $BolsasPesqPodeReceber;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital -= $BolsasPesqPodeReceber;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($BolsasPesqPodeReceber+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[2][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[2][qtdBolsaOfertada] -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$BolsasPesqPodeReceber--;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} // Fim ufpa\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas FAPESPA\r\n\t\t\t\t\t\t\t\t\t\telseif ($ofertaBolsasGeral[4][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[4][qtdBolsaOfertada]>=$BolsasPesqPodeReceber){ \r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[4][codTipoBolsa],$BolsasPesqPodeReceber);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[4][qtdBolsaOfertada] -= $BolsasPesqPodeReceber;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital -= $BolsasPesqPodeReceber;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($BolsasPesqPodeReceber+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\telse {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[4][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[4][qtdBolsaOfertada] -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$BolsasPesqPodeReceber--;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} // Fim fapespa\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital Capital if($qtdOfertaBolsasCapital >0)\r\n\t\t\t\t\t\t\t\t\t// Caso o subedital n�o possua mais bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\telse $flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\tcase \"2\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital AF ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasAF >0){\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas CNPq AF\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[5][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// Verifica se o n�mero de bolas CNPq AF � suficiente para atender a quantidade solicitada pelo pesq\r\n\t\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[5][qtdBolsaOfertada]>=$BolsasPesqPodeReceber){\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[5][codTipoBolsa],$BolsasPesqPodeReceber);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[5][qtdBolsaOfertada] -= $BolsasPesqPodeReceber;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasAF -= $BolsasPesqPodeReceber;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($BolsasPesqPodeReceber+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[5][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[5][qtdBolsaOfertada] -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasAF -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$BolsasPesqPodeReceber--;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} // Fim CNPq AF\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas UFPA AF\r\n\t\t\t\t\t\t\t\t\t\telseif ($ofertaBolsasGeral[6][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// Verifica se o n�mero de bolas CNPq AF � suficiente para atender a quantidade solicitada pelo pesq\r\n\t\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[6][qtdBolsaOfertada]>=$BolsasPesqPodeReceber){\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[6][codTipoBolsa],$BolsasPesqPodeReceber);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[6][qtdBolsaOfertada] -= $BolsasPesqPodeReceber;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasAF -= $BolsasPesqPodeReceber;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($BolsasPesqPodeReceber+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[6][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[6][qtdBolsaOfertada] -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasAF -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$BolsasPesqPodeReceber--;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} // Fim UFPA AF\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital AF if($qtdOfertaBolsasAF >0)\r\n\t\t\t\t\t\t\t\t\t// Caso o subedital n�o possua mais bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\telse $flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\tcase \"3\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital Interior ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasInterior >0){\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas Interior\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[3][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// Verifica se o n�mero de bolsas Interior suficiente para atender a quantidade solicitada pelo pesq\r\n\t\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[3][qtdBolsaOfertada]>=$BolsasPesqPodeReceber){\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[3][codTipoBolsa],$BolsasPesqPodeReceber);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[3][qtdBolsaOfertada] -= $BolsasPesqPodeReceber;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasInterior -= $BolsasPesqPodeReceber;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($BolsasPesqPodeReceber+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[3][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[3][qtdBolsaOfertada] -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasInterior -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$BolsasPesqPodeReceber--;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} // Fim Interior\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital Interior if($qtdOfertaBolsasInterior >0)\r\n\t\t\t\t\t\t\t\t\t// Caso o subedital n�o possua mais bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\telse $flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\tdefault: \r\n\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\techo \"Nenhuma das op��es.\";\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\tcase \"4\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital PIBITI ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasPIBITI >0){\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas PIBITI\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[8][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// Verifica se o n�mero de bolsas PIBITI suficiente para atender a quantidade solicitada pelo pesq\r\n\t\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[8][qtdBolsaOfertada]>=$BolsasPesqPodeReceber){\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[8][codTipoBolsa],$BolsasPesqPodeReceber);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[8][qtdBolsaOfertada] -= $BolsasPesqPodeReceber;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasPIBITI -= $BolsasPesqPodeReceber;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($BolsasPesqPodeReceber+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[8][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[8][qtdBolsaOfertada] -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasPIBITI -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$BolsasPesqPodeReceber--;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} // Fim PIBITI\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital PIBITI if($qtdOfertaBolsasPIBITI >0)\r\n\t\t\t\t\t\t\t\t\t// Caso o subedital n�o possua mais bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\telse $flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\tdefault: \r\n\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\techo \"Nenhuma das op��es.\";\r\n\t\t\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} //final switch\r\n\t\t\t\t\t\t\t\t} //Fim while ($flagProximaBolsa=1)\t\r\n\t\t\t\t\t\t\t}// Fim count($vTipoBolsasSolicitadas)==1)\r\n\t\t\t\t\t\t\telseif (count($vTipoBolsasSolicitadas)==2){\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$qtdBolsasSolic = 1;\r\n\t\t\t\t\t\t\t\t// Caso o pesquisador j� tenha recebido alguma bolsa durante a distribui��o atual de bolsas\r\n\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\t\t\t\t\t\t\t\twhile($bolsaSolic = array_shift($vTipoBolsasSolicitadas)){\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tswitch($bolsaSolic[\"tipoConjBolsasSolic\"]){\r\n\t\t\t\t\t\t\t\t\tcase \"1\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital Capital ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasCapital >0){\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas CNPq\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[1][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[1][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[1][qtdBolsaOfertada]--;\r\n\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital--;\r\n\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t} // Fim cnpq\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas UFPA\r\n\t\t\t\t\t\t\t\t\t\telseif ($ofertaBolsasGeral[2][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[2][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\r\n\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[2][qtdBolsaOfertada]--;\r\n\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital--;\r\n\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t} // Fim ufpa\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas FAPESPA\r\n\t\t\t\t\t\t\t\t\t\telseif ($ofertaBolsasGeral[4][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[4][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\r\n\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[4][qtdBolsaOfertada]--;\r\n\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital--;\r\n\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t} // Fim fapespa\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital Capital\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\tcase \"2\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital AF ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasAF >0){\r\n\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas CNPq AF\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[5][qtdBolsaOfertada]>0){\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[5][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\r\n\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[5][qtdBolsaOfertada]--;\r\n\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasAF--;\r\n\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t} // Fim cnpq af\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas UFPA AF\r\n\t\t\t\t\t\t\t\t\t\telseif ($ofertaBolsasGeral[6][qtdBolsaOfertada]>0){\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[6][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[6][qtdBolsaOfertada]--;\r\n\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasAF--;\r\n\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t} // Fim ufpa af\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital AF\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\tcase \"3\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital Interior ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasInterior >0){\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas Interior\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[3][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[3][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\r\n\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[3][qtdBolsaOfertada]--;\r\n\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasInterior--;\r\n\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t} // Fim Interior\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital Interior\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tcase \"4\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital PIBITI ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasPIBITI >0){\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas PIBITI\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[8][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[8][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\r\n\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[8][qtdBolsaOfertada]--;\r\n\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasPIBITI--;\r\n\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t} // Fim PIBITI\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital PIBITI\r\n\t\t\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tdefault: \r\n\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\techo \"Nenhuma das op��es.\";\r\n\t\t\t\t\t\t\t\t\t} //final switch\r\n\t\t\t\t\t\t\t\t}// while\r\n\t\t\t\t\t\t\t} // elseif (count($vTipoBolsasSolicitadas)==2)\r\n\t\t\t\t}//if (($qtdOfertaBolsasCapital) OR ($qtdOfertaBolsasAF) OR ($qtdOfertaBolsasInterior))\r\n\t\t\t}//fim while naum producao\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t} //fim if($vetMax and $vetOfertaBolsas )\r\n\t}", "title": "" }, { "docid": "8e3e5acd7428ca3bcfbfb13e09e4a0cb", "score": "0.5003162", "text": "public function serch()\n {\n }", "title": "" }, { "docid": "78138d6db1f77cf9d7ccb3f5cb9a4abb", "score": "0.50005186", "text": "function affichageTableau($tableau)\n{\n foreach ($tableau as $element) {\n echo \"[\",$element,\"]\",\"\\t\";\n }\n return $tableau;\n}", "title": "" }, { "docid": "1df995608291d9435f9275bdf945f971", "score": "0.49989295", "text": "function desinstaller_champs_extras($champs, $nom_meta_base_version) {\r\n\tvider_champs_extras($champs);\r\n\teffacer_meta($nom_meta_base_version);\t\r\n}", "title": "" }, { "docid": "1320f8945465b30fcdad8708030ed6a8", "score": "0.49946272", "text": "public function attaqueJoueur($de){\n\n }", "title": "" }, { "docid": "d503b01f272c85b75d975869118486e6", "score": "0.49909106", "text": "public function afficherAll()\n {\n }", "title": "" }, { "docid": "526507d28473e8838ed42e4f1de66d26", "score": "0.49821976", "text": "function ambas()\n {\n print \"Ejecución de la función ambas<br>\";\n # mediante $this-> requerimos la ejecución de metodo prueba\n # de la clase actual\n $this->prueba();\n # al señalar parent:: requerimos la ejecución de metodo prueba\n # de la clase padre\n parent::prueba();\n }", "title": "" }, { "docid": "413ae9f0787ebdd5095e6f6f4e56c308", "score": "0.4979108", "text": "function Geral() {\r\n \r\n extract($GLOBALS);\r\n global $w_Disabled;\r\n $w_chave = $_REQUEST['w_chave'];\r\n $w_sq_tipo_lancamento = $_REQUEST['w_sq_tipo_lancamento'];\r\n $w_readonly = '';\r\n $w_erro = '';\r\n\r\n // Carrega o segmento cliente\r\n $sql = new db_getCustomerData; $RS = $sql->getInstanceOf($dbms,$w_cliente); \r\n $w_segmento = f($RS,'segmento');\r\n \r\n // Verifica se há necessidade de recarregar os dados da tela a partir\r\n // da própria tela (se for recarga da tela) ou do banco de dados (se não for inclusão)\r\n if ($w_troca>'' && $O!='E') {\r\n // Se for recarga da página\r\n $w_codigo_interno = $_REQUEST['w_codigo_interno'];\r\n $w_sq_tipo_lancamento = $_REQUEST['w_sq_tipo_lancamento'];\r\n $w_sq_tipo_documento = $_REQUEST['w_sq_tipo_documento'];\r\n $w_descricao = $_REQUEST['w_descricao'];\r\n $w_valor = $_REQUEST['w_valor'];\r\n $w_fim = $_REQUEST['w_fim'];\r\n $w_conta_debito = $_REQUEST['w_conta_debito'];\r\n $w_sq_forma_pagamento = $_REQUEST['w_sq_forma_pagamento'];\r\n $w_cc_debito = $_REQUEST['w_cc_debito'];\r\n $w_cc_credito = $_REQUEST['w_cc_credito'];\r\n\r\n } elseif(strpos('AEV',$O)!==false || $w_copia>'') {\r\n // Recupera os dados do lançamento\r\n $sql = new db_getSolicData; \r\n $RS = $sql->getInstanceOf($dbms,nvl($w_copia,$w_chave),$SG);\r\n if (count($RS)>0) {\r\n $w_codigo_interno = f($RS,'codigo_interno');\r\n $w_sq_tipo_lancamento = f($RS,'sq_tipo_lancamento');\r\n $w_conta_debito = f($RS,'sq_pessoa_conta');\r\n $w_descricao = f($RS,'descricao');\r\n $w_fim = formataDataEdicao(f($RS,'fim'));\r\n $w_valor = formatNumber(f($RS,'valor'));\r\n $w_sq_forma_pagamento = f($RS,'sq_forma_pagamento');\r\n $w_cc_debito = f($RS,'cc_debito');\r\n $w_cc_credito = f($RS,'cc_credito');\r\n }\r\n }\r\n\r\n // Recupera dados do comprovante\r\n if (nvl($w_troca,'')=='' && (nvl($w_copia,'')!='' || nvl($w_chave,'')!='')) {\r\n $sql = new db_getLancamentoDoc; $RS = $sql->getInstanceOf($dbms,nvl($w_copia,$w_chave),null,null,null,null,null,null,'DOCS');\r\n $RS = SortArray($RS,'sq_tipo_documento','asc');\r\n foreach ($RS as $row) {$RS=$row; break;}\r\n if (nvl($w_copia,'')=='') $w_chave_doc = f($RS,'sq_lancamento_doc'); // Se cópia, não copia a chave do documento \r\n $w_sq_tipo_documento = f($RS,'sq_tipo_documento');\r\n $w_numero = f($RS,'numero');\r\n $w_data = FormataDataEdicao(f($RS,'data'));\r\n $w_serie = f($RS,'serie');\r\n $w_valor_doc = formatNumber(f($RS,'valor'));\r\n $w_patrimonio = f($RS,'patrimonio');\r\n $w_tributo = f($RS,'calcula_tributo');\r\n $w_retencao = f($RS,'calcula_retencao'); \r\n }\r\n\r\n // Default: pagamento para pessoa jurídica\r\n $w_tipo_pessoa = nvl($w_tipo_pessoa,2);\r\n \r\n // Recupera o trâmite de conclusão\r\n $sql = new db_getTramiteList; $RS = $sql->getInstanceOf($dbms, $w_menu,null,null,null);\r\n $RS = SortArray($RS,'ordem','asc');\r\n foreach ($RS as $row) {\r\n if (f($row,'sigla')=='AT') {\r\n $w_tramite_conc = f($row,'sq_siw_tramite');\r\n break;\r\n }\r\n }\r\n \r\n // Verifica as formas de pagamento possíveis. Se apenas uma, atribui direto\r\n $sql = new db_getFormaPagamento; $RS = $sql->getInstanceOf($dbms, $w_cliente, null, $SG, null,'S',null);\r\n $w_exibe_fp = true;\r\n if (count($RS)==1 || nvl($w_sq_forma_pagamento,'')!='') {\r\n foreach($RS as $row) { \r\n if (nvl($w_sq_forma_pagamento,f($row,'sq_forma_pagamento'))==f($row,'sq_forma_pagamento')) {\r\n $w_sq_forma_pagamento = f($row,'sq_forma_pagamento'); \r\n $w_forma_pagamento = f($row,'sigla'); \r\n $w_nm_forma_pagamento = f($row,'nome'); \r\n break; \r\n }\r\n }\r\n if (count($RS)==1) $w_exibe_fp = false;\r\n }\r\n \r\n // Verifica os tipos de documento possíveis. Se apenas um, atribui direto\r\n $sql = new db_getTipoDocumento; $RS = $sql->getInstanceOf($dbms,null,$w_cliente,$w_menu,null);\r\n $w_exibe_dc = true;\r\n if (count($RS)==1) {\r\n foreach($RS as $row) { \r\n $w_sq_tipo_documento = f($row,'chave'); \r\n $w_tipo_documento = f($row,'sigla'); \r\n $w_nm_tipo_documento = f($row,'nome'); \r\n break; \r\n }\r\n $w_exibe_dc = false;\r\n }\r\n\r\n // Se o tipo de lançamento já foi informado, recupera o código externo para definir a conta contábil de débito\r\n if ($w_sq_tipo_lancamento) {\r\n $sql = new db_getTipoLancamento; $RS = $sql->getInstanceOf($dbms,$w_sq_tipo_lancamento,null,$w_cliente,null);\r\n $w_cc_debito = f($RS[0],'codigo_externo');\r\n }\r\n \r\n // Retorna as contas contábeis do lançamento\r\n retornaContasContabeis($RS_Menu, $w_cliente, $w_sq_tipo_lancamento, $w_sq_forma_pagamento, $w_conta_debito, $w_cc_debito, $w_cc_credito);\r\n \r\n Cabecalho();\r\n head();\r\n Estrutura_CSS($w_cliente);\r\n // Monta o código JavaScript necessário para validação de campos e preenchimento automático de máscara,\r\n // tratando as particularidades de cada serviço\r\n ScriptOpen('JavaScript');\r\n CheckBranco();\r\n FormataData();\r\n SaltaCampo();\r\n FormataDataHora();\r\n FormataValor();\r\n ShowHTML('function botoes() {');\r\n ShowHTML(' document.Form.Botao[0].disabled = true;');\r\n ShowHTML(' document.Form.Botao[1].disabled = true;');\r\n ShowHTML('}');\r\n ValidateOpen('Validacao');\r\n if ($O=='I' || $O=='A') {\r\n Validate('w_sq_tipo_lancamento','Tipo do lançamento','SELECT',1,1,18,'','0123456789');\r\n if ($w_exibe_fp) Validate('w_sq_forma_pagamento','Forma de pagamento','SELECT',1,1,18,'','0123456789');\r\n Validate('w_conta_debito','Conta bancária', 'SELECT', 1, 1, 18, '', '0123456789');\r\n if ($w_exibe_dc) Validate('w_sq_tipo_documento','Tipo de documento','SELECT',1,1,18,'','0123456789');\r\n Validate('w_fim','Data da operação', 'DATA', '1', '10', '10', '', '0123456789/');\r\n Validate('w_valor','Valor total do documento','VALOR','1',4,18,'','0123456789.,-');\r\n CompValor('w_valor','Valor total do documento','>','0,00','zero');\r\n Validate('w_descricao','Observação','1','',5,2000,'1','1');\r\n \r\n Validate('w_cc_debito','Conta Débito','','','2','25','ABCDEFGHIJKLMNOPQRSTUVWXYZ','0123456789');\r\n Validate('w_cc_credito','Conta Crédito','','','2','25','ABCDEFGHIJKLMNOPQRSTUVWXYZ','0123456789');\r\n \r\n ShowHTML(' if ((theForm.w_cc_debito.value != \"\" && theForm.w_cc_credito.value == \"\") || (theForm.w_cc_debito.value == \"\" && theForm.w_cc_credito.value != \"\")) {');\r\n ShowHTML(' alert (\"Informe ambas as contas contábeis ou nenhuma delas!\");');\r\n ShowHTML(' theForm.w_cc_debito.focus();');\r\n ShowHTML(' return false;');\r\n ShowHTML(' }');\r\n \r\n } \r\n Validate('w_assinatura',$_SESSION['LABEL_ALERTA'], '1', '1', '3', '30', '1', '1');\r\n ValidateClose();\r\n ScriptClose();\r\n ShowHTML('<BASE HREF=\"'.$conRootSIW.'\">');\r\n ShowHTML('</HEAD>');\r\n if ($w_troca>'') BodyOpen('onLoad=\\'document.Form.'.$w_troca.'.focus()\\';');\r\n elseif (!(strpos('EV',$O)===false)) BodyOpen('onLoad=\\'this.focus()\\';');\r\n else BodyOpen('onLoad=\\'document.Form.w_sq_tipo_lancamento.focus()\\';');\r\n Estrutura_Topo_Limpo();\r\n Estrutura_Menu();\r\n Estrutura_Corpo_Abre();\r\n Estrutura_Texto_Abre();\r\n ShowHTML('<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">');\r\n if ($w_chave>'') ShowHTML(' <tr><td><font size=\"2\"><b>'.$w_codigo_interno.' ('.$w_chave.')</b></td>');\r\n if (strpos('IAEV',$O)!==false) {\r\n if (strpos('EV',$O)!==false) {\r\n $w_Disabled=' DISABLED ';\r\n if ($O=='V') $w_Erro = Validacao($w_sq_solicitacao,$SG);\r\n } \r\n if (Nvl($w_pais,'')=='') {\r\n // Carrega os valores padrão para país, estado e cidade\r\n $sql = new db_getCustomerData; $RS = $sql->getInstanceOf($dbms,$w_cliente);\r\n $w_pais = f($RS,'sq_pais');\r\n $w_uf = f($RS,'co_uf');\r\n $w_cidade = Nvl(f($RS_Menu,'sq_cidade'),f($RS,'sq_cidade_padrao'));\r\n } \r\n AbreForm('Form',$w_dir.$w_pagina.'Grava','POST','return(Validacao(this));',null,$P1,$P2,$P3,$P4,$TP,$SG,$R,$O);\r\n ShowHTML(MontaFiltro('POST'));\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_troca\" value=\"\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_copia\" value=\"'.$w_copia.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_chave\" value=\"'.$w_chave.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_codigo_interno\" value=\"'.$w_codigo_interno.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_menu\" value=\"'.f($RS_Menu,'sq_menu').'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_data_hora\" value=\"'.f($RS_Menu,'data_hora').'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_cidade\" value=\"'.$w_cidade.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_tramite\" value=\"'.$w_tramite_conc.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_tipo\" value=\"'.$w_tipo.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_chave_doc\" value=\"'.$w_chave_doc.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_tipo_pessoa\" value=\"'.$w_tipo_pessoa.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_aviso\" value=\"N\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_dias\" value=\"0\">');\r\n ShowHTML('<tr bgcolor=\"'.$conTrBgColor.'\"><td>');\r\n ShowHTML(' <table width=\"100%\" border=\"0\">');\r\n ShowHTML(' <tr><td colspan=3 align=\"center\" height=\"2\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=3 align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=3 align=\"center\" bgcolor=\"#D0D0D0\"><b>Identificação</td></td></tr>');\r\n ShowHTML(' <tr><td colspan=3 align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=3>Os dados deste bloco serão utilizados para identificação do lançamento, bem como para o controle de sua execução.</td></tr>');\r\n ShowHTML(' <tr><td colspan=3 align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n\r\n ShowHTML(' <tr valign=\"top\">');\r\n selecaoTipoLancamento('Tipo de lançamento:',null,null,$w_sq_tipo_lancamento,$w_menu,$w_cliente,'w_sq_tipo_lancamento',$SG, 'onChange=\"document.Form.action=\\''.$w_dir.$w_pagina.$par.'\\'; document.Form.O.value=\\''.$O.'\\'; document.Form.w_troca.value=\\''.(($w_exibe_fp) ? 'w_sq_forma_pagamento' : 'w_conta_debito').'\\'; document.Form.submit();\"',3);\r\n ShowHTML(' <tr valign=\"top\">');\r\n if ($w_exibe_fp) {\r\n SelecaoFormaPagamento('<u>F</u>orma de pagamento:','F','Selecione na lista a forma desejada para esta aplicação.',$w_sq_forma_pagamento,$SG,'w_sq_forma_pagamento',null,'onChange=\"document.Form.action=\\''.$w_dir.$w_pagina.$par.'\\'; document.Form.O.value=\\''.$O.'\\'; document.Form.w_troca.value=\\'w_conta_debito\\'; document.Form.submit();\"');\r\n } else {\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_sq_forma_pagamento\" value=\"'.$w_sq_forma_pagamento.'\">');\r\n }\r\n SelecaoContaBanco('<u>C</u>onta bancária:','C','Selecione a conta bancária envolvida no lançamento.',$w_conta_debito,null,'w_conta_debito',null,'onChange=\"document.Form.action=\\''.$w_dir.$w_pagina.$par.'\\'; document.Form.O.value=\\''.$O.'\\'; document.Form.w_troca.value=\\''.(($w_exibe_dc) ? 'w_sq_tipo_documento' : 'w_fim').'\\'; document.Form.submit();\"');\r\n ShowHTML(' </tr>');\r\n ShowHTML(' <tr valign=\"top\">');\r\n if ($w_exibe_dc) {\r\n SelecaoTipoDocumento('<u>T</u>ipo do documento:','T', 'Selecione o tipo de documento.', $w_sq_tipo_documento,$w_cliente,$w_menu,'w_sq_tipo_documento',null,null);\r\n } else {\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_sq_tipo_documento\" value=\"'.$w_sq_tipo_documento.'\">');\r\n }\r\n ShowHTML(' <td><b><u>D</u>ata da operação:</b><br><input '.$w_Disabled.' accesskey=\"D\" type=\"text\" name=\"w_fim\" class=\"sti\" SIZE=\"10\" MAXLENGTH=\"10\" VALUE=\"'.$w_fim.'\" onKeyDown=\"FormataData(this,event);\" onKeyUp=\"SaltaCampo(this.form.name,this,10,event);\">'.ExibeCalendario('Form','w_fim').'</td>');\r\n ShowHTML(' <td><b><u>V</u>alor:</b><br><input '.$w_Disabled.' accesskey=\"V\" type=\"text\" name=\"w_valor\" class=\"sti\" SIZE=\"18\" MAXLENGTH=\"18\" VALUE=\"'.$w_valor.'\" style=\"text-align:right;\" onKeyDown=\"FormataValor(this,18,2,event);\" title=\"Informe o valor total do documento.\"></td>');\r\n ShowHTML(' <tr><td colspan=3><b><u>O</u>bservação:</b><br><textarea '.$w_Disabled.' accesskey=\"O\" name=\"w_descricao\" class=\"sti\" ROWS=3 cols=75 title=\"Observação sobre a aplicação.\">'.$w_descricao.'</TEXTAREA></td>');\r\n\r\n ShowHTML(' <tr valign=\"top\">');\r\n ShowHTML(' <td><b><u>C</u>onta contábil de débito:</b></br><input type=\"text\" name=\"w_cc_debito\" class=\"sti\" SIZE=\"11\" MAXLENGTH=\"25\" VALUE=\"'.$w_cc_debito.'\"></td>');\r\n ShowHTML(' <td><b><u>C</u>onta contábil de crédito:</b></br><input type=\"text\" name=\"w_cc_credito\" class=\"sti\" SIZE=\"11\" MAXLENGTH=\"25\" VALUE=\"'.$w_cc_credito.'\"></td>');\r\n \r\n ShowHTML(' <tr><td align=\"LEFT\" colspan=4><b>'.$_SESSION['LABEL_CAMPO'].':<BR> <INPUT ACCESSKEY=\"A\" class=\"sti\" type=\"PASSWORD\" name=\"w_assinatura\" size=\"30\" maxlength=\"30\" value=\"\"></td></tr>');\r\n ShowHTML(' <tr><td align=\"center\" colspan=\"3\" height=\"1\" bgcolor=\"#000000\"></TD></TR>');\r\n ShowHTML(' <tr><td align=\"center\" colspan=\"3\">');\r\n ShowHTML(' <input class=\"stb\" type=\"submit\" name=\"Botao\" value=\"Gravar\">');\r\n if ($P1==0) {\r\n ShowHTML(' <input class=\"STB\" type=\"button\" onClick=\"location.href=\\''.montaURL_JS($w_dir,'tesouraria.php?par=inicial&O=L&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.MontaFiltro('GET')).'\\';\" name=\"Botao\" value=\"Abandonar\">');\r\n } else {\r\n $sql = new db_getMenuData; $RS = $sql->getInstanceOf($dbms,$w_menu);\r\n ShowHTML(' <input class=\"stb\" type=\"button\" onClick=\"location.href=\\''.montaURL_JS($w_dir,$R.'&w_copia='.$w_copia.'&O=L&SG='.f($RS,'sigla').'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.MontaFiltro('GET')).'\\';\" name=\"Botao\" value=\"Cancelar\">');\r\n }\r\n ShowHTML(' </td>');\r\n \r\n ShowHTML(' </tr>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' </TD>');\r\n ShowHTML('</tr>');\r\n ShowHTML('</FORM>');\r\n } else {\r\n ScriptOpen('JavaScript');\r\n ShowHTML(' alert(\"Opção não disponível\");');\r\n ScriptClose();\r\n } \r\n ShowHTML('</table>');\r\n ShowHTML('</center>');\r\n Estrutura_Texto_Fecha();\r\n Estrutura_Fecha();\r\n Estrutura_Fecha();\r\n Estrutura_Fecha();\r\n Rodape();\r\n}", "title": "" }, { "docid": "77522cc89f28ebab93fc67ee1ba10551", "score": "0.49783707", "text": "function citrace_pre_edition($tableau){\n\tstatic $actions = array();\n\tif (isset($tableau['args']['table'])){\n\t\t$table = $tableau['args']['table'];\n\t\tif ($actions AND isset($tableau['args']['action']) AND in_array($table.'/'.$tableau['args']['action'],$actions)) \n\t\t\treturn $tableau;\n\t\telse\n\t\t\t$actions[] = $table.'/'.$tableau['args']['action'];\n\t}\n\n\t// changement de rubrique pour un article publie\n\tif (isset($tableau['args']['action']) AND $tableau['args']['action']=='instituer' \n\t AND isset($tableau['args']['table']) AND $tableau['args']['table']=='spip_articles') {\n\t \t$id_article = intval($tableau['args']['id_objet']);\n\t\t if ($id_article>0) {\n\t\t\t\tinclude_spip('inc/texte');\n\t\t\t\t$row = sql_fetsel('*', 'spip_articles', 'id_article='.$id_article);\n\t\t\t\tif ($row){\n\t\t\t\t\t$old_rubrique = $row['id_rubrique'];\n\t\t\t\t\tif ($row['statut']=='publie'){\n\t\t\t\t\t\t$new_rubrique = (isset($tableau['data']['id_rubrique']) ? intval($tableau['data']['id_rubrique']) : 0);\n\t\t\n\t\t\t \t\tif ($new_rubrique>=1 AND $new_rubrique!=$old_rubrique){\n\t\t\t\t\t\t\t$commentaire = '('.interdire_scripts(supprimer_numero($row['titre'])).')'.\" - id_rubrique_new:\".$new_rubrique.\" - id_rubrique_old:\".$old_rubrique;\n\t\t\t\t\t\t\t$citrace = charger_fonction('citrace', 'inc');\n\t\t\t\t\t\t\t$citrace('article', $id_article, 'changement de rubrique pour article', $commentaire, $new_rubrique);\n\t\t\t \t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n }\t\n\n\t// changement de statut ou de l'email d'un auteur\n\tif (isset($tableau['args']['action']) \n\t AND isset($tableau['args']['table']) AND $tableau['args']['table']=='spip_auteurs') {\n\n \t$id_auteur = intval($tableau['args']['id_objet']);\n\t if ($id_auteur>0) {\n\t\t\tinclude_spip('inc/texte');\n\t\t\t$row = sql_fetsel('*', 'spip_auteurs', 'id_auteur='.$id_auteur);\n\t\t\tif ($row){\n\t\t\t\t// changement de statut d'un auteur\n\t\t\t\tif ($tableau['args']['action']=='instituer'){\n\t\t\t\t\t$old_statut = $row['statut'];\n\t\t\t\t\t$new_statut = (isset($tableau['data']['statut']) ? $tableau['data']['statut'] : '');\n\t\t\t\t\t$old_webmestre = $row['webmestre'];\n\t\t\t\t\t$new_webmestre = (isset($tableau['data']['webmestre']) ? $tableau['data']['webmestre'] : '');\n\t\n\t\t \t\tif ($new_statut AND $new_statut!=$old_statut){\n\t\t\t\t\t\t$commentaire = interdire_scripts(supprimer_numero($row['nom']))\n\t\t\t\t\t\t.' ('.interdire_scripts($row['email']).')'\n\t\t\t\t\t\t.\" - statut_new:\".$new_statut.\" - statut_old:\".$old_statut \n\t\t\t\t\t\t.\" - webmestre_new:\".$new_webmestre.\" - webmestre_old:\".$old_webmestre;\n\t\t\t\t\t\t$citrace = charger_fonction('citrace', 'inc');\n\t\t\t\t\t\t$citrace('auteur', $id_auteur, \"changement de statut pour l'auteur\", $commentaire);\n\t\t \t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// modifier l'email d'un auteur\n\t\t\t\tif ($tableau['args']['action']=='modifier'){\n\t\t\t\t\t$old_email = $row['email'];\n\t\t\t\t\t$new_email = (isset($tableau['data']['email']) ? $tableau['data']['email'] : '');\n\t\n\t\t \t\tif ($new_email!=$old_email){\n\t\t\t\t\t\t$commentaire = '('.interdire_scripts(supprimer_numero($row['nom'])).')'\n\t\t\t\t\t\t.\" - email_new:\".$new_email.\" - email_old:\".$old_email; \n\t\t\t\t\t\t$citrace = charger_fonction('citrace', 'inc');\n\t\t\t\t\t\t$citrace('auteur', $id_auteur, \"changement d'email pour l'auteur\", $commentaire);\n\t\t \t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n }\t\n \n\t// changement de date de publication (ou de depublication) d'un article\n\tif (isset($tableau['args']['action']) \n\t AND isset($tableau['args']['table']) AND $tableau['args']['table']=='spip_articles') {\n\t \t$id_article = intval($tableau['args']['id_objet']);\n\t\t if ($id_article>0) {\n\t\t \t// lors du changement de statut, la date de publication est tracee par le pipeline post_edition\n\t\t \t// aussi ne pas doublonner\n\t \t\tif (!isset($tableau['data']['statut']) OR !isset($tableau['args']['statut_ancien']) OR $tableau['data']['statut'] == $tableau['args']['statut_ancien']){\n\t\t\t\t\tinclude_spip('inc/texte');\n\t\t\t\t\t$row = sql_fetsel('*', 'spip_articles', 'id_article='.$id_article);\n\t\t\t\t\t$date_old = $row['date'];\n\t\t\t\t\t$id_rubrique = $row['id_rubrique'];\n\t\t\t\t\n\t\t\t\t\tif (isset($tableau['data']['date']) AND $date_old != $tableau['data']['date']){\n\t\t\t\t\t\t$article_msg = '('.interdire_scripts(supprimer_numero($row['titre'])).')'.\" - id_rubrique:\".$id_rubrique;\n\t\t\t\t\t\t$article_msg .= \" - date_publication:\".$tableau['data']['date'].\" - date_publication_old:\".$date_old.\" (meta post_dates :\".$GLOBALS['meta'][\"post_dates\"].\")\";\n\t\t\t\t\t\t$citrace = charger_fonction('citrace', 'inc');\n\t\t\t\t\t\t$citrace('article', $id_article, 'modifier_date', $article_msg, $id_rubrique);\t\t\t\t\t\n\t\t\t\t\t}\n\t \t\t}\n\t\t }\n }\n\n\treturn $tableau;\n}", "title": "" }, { "docid": "32043e67b2a388a73035d5551675938a", "score": "0.49768704", "text": "function deplacer_tache($id_tache, $id_dossier_destination)\r\n{\r\n\tglobal $objet;\r\n\t////\tAccès en écriture à la tache et au dossier de destination\r\n\tif(droit_acces($objet[\"tache\"],$id_tache)>=2 && droit_acces($objet[\"tache_dossier\"],$id_dossier_destination)>=2)\r\n\t{\r\n\t\t////\tSi on deplace à la racine, on donne les droits d'accès de l'ancien dossier\r\n\t\tracine_copie_droits_acces($objet[\"tache\"], $id_tache, $objet[\"tache_dossier\"], $id_dossier_destination);\r\n\t\t////\tOn déplace la tache\r\n\t\tdb_query(\"UPDATE gt_tache SET id_dossier=\".db_format($id_dossier_destination).\" WHERE id_tache=\".db_format($id_tache));\r\n\t}\r\n\t////\tLogs\r\n\tadd_logs(\"modif\", $objet[\"tache\"], $id_tache);\r\n}", "title": "" }, { "docid": "5912c80612aa3faf41ee62001a6b0d5f", "score": "0.49762675", "text": "function absender_bestimmen($absender,$db){\n$query1=\"select * from user\";\n\t$antwort1=$db->query($query1);\n\t$antwort1=array_bildung($antwort1);\n\t\n\t$i=0;\n\tforeach($absender[Absender] as $name => $inhalt){\n\tif($inhalt==0){\n\t\t$absender[Absender][$i]=\"Information an Alle !\";\n\t}\n\t\n\t\t$k=0;\n\t\tforeach($antwort1[id] as $name1 => $inhalt1){\n\t\t\tif($inhalt==$inhalt1){\n\t\t\t\t$absender[Absender][$i]=$antwort1[Name][$k].\"&nbsp;&nbsp;\".$antwort1[Vorname][$k].\"&nbsp;&nbsp;- \".$antwort1[Bemerkung][$k].\" -\";\n\t\t\t}\n\t\t$k++;\n\t\t}\n\t$i++;\n\t}\n\treturn $absender;\n}", "title": "" }, { "docid": "f4cf5a79dad150259313ff3110a2ca3e", "score": "0.49749795", "text": "public function tratarDados(){\r\n\t\r\n\t\r\n }", "title": "" }, { "docid": "600fc26568c8ae7c768e694a17dd249d", "score": "0.49711978", "text": "public function get_barbe(){ return $this->_barbe;}", "title": "" }, { "docid": "e036ab965d6d5e25709558e63df8bfcb", "score": "0.49627092", "text": "public function __toString(): String{\n $garage = \"\";\n $jardin = \"\";\n if ($this->hasGarage()){\n $garage = \" avec un garage\";\n }\n if ($this->hasJardin()){\n $jardin = \" et un jardin\";\n }\n return \"Maison situé \".$this->getPays().\" dans la ville de \".$this->getVille().\" avec le code postal : \".$this->getCp().\" avec \".$this->getEtage().\" étage(s) \".\", \".$this->getChambre().\" chambre(s)\".$garage.$jardin;\n }", "title": "" }, { "docid": "51e6f3decdbbe39ca2a5b8a4408af3c8", "score": "0.49611512", "text": "public function BestellingOverzichtView() {\r\n include_once('/var/www/filmpje.nl/backend/Stoelen.php');\r\n include_once('/var/www/filmpje.nl/backend/TotaalPrijsCalculatie.php');\r\n }", "title": "" }, { "docid": "913394ebbba6644665b0abc1b2a26d40", "score": "0.4960164", "text": "function LoadBestellungStandardwerte($id,$adresse)\n {\n $arr = $this->app->DB->SelectArr(\"SELECT * FROM adresse WHERE id='$adresse' LIMIT 1\");\n $field = array('name','vorname','abteilung','unterabteilung','strasse','adresszusatz','plz','ort','land','ustid','email','telefon','telefax','lieferantennummer');\n foreach($field as $key=>$value)\n {\n $this->app->Secure->POST[$value] = $arr[0][$value];\n $uparr[$value] = $arr[0][$value];\n }\n $this->app->DB->UpdateArr(\"bestellung\",$id,\"id\",$uparr);\n $uparr=\"\";\n\n //liefernantenvorlage\n $arr = $this->app->DB->SelectArr(\"SELECT * FROM lieferantvorlage WHERE adresse='$adresse' LIMIT 1\");\n $field = array('kundennummer','zahlungsweise','zahlungszieltage','zahlungszieltageskonto','zahlungszielskonto','versandart');\n foreach($field as $key=>$value)\n {\n //$uparr[$value] = $arr[0][$value];\n $this->app->Secure->POST[$value] = $arr[0][$value];\n }\n //$this->app->DB->UpdateArr(\"bestellung\",$id,\"id\",$uparr);\n\n }", "title": "" }, { "docid": "2f8f87cceb07fdb2acb0baa2bd9e52b9", "score": "0.49565652", "text": "function toon($lijst, $mededeling=\"Geen bijzonderheden<br />\") {\n\tprint \"<b>$mededeling</b><br />\";\n\tprint \"<pre>\";\n\tprint_r($lijst);\n\tprint \"</pre>\";\n}", "title": "" }, { "docid": "1b1fa191caf48479b0ec133a7dde9454", "score": "0.49543872", "text": "function ausgabe_gespeicherte_elemente($spalte_zur_ausgabe,$tabelle,$spalte_wert,$vergleichswert) {\n\t$mysqli=MyDatabase();\n\t$abfrage=\"SELECT `$spalte_zur_ausgabe` FROM $tabelle WHERE `$spalte_wert` LIKE $vergleichswert LIMIT 1\";\n\tif ($result=$mysqli->query($abfrage)) {\n\t\twhile ($row=$result->fetch_object()) {\n\t\t\t$ausgabe=$row->$spalte_zur_ausgabe;\n\t\t\treturn $ausgabe;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "e7938cda019340794b5de651be447694", "score": "0.49478233", "text": "public function testPagarTransbordoNormal(){\n $tarjetaMedioUni= new TarjetaMedioUni;\n $tarjetaMedioUni->recargar(50);\n $tarjetaMedioUni->normalTransbordo();\n $this->assertEquals($tarjetaMedioUni->obtenerSaldo(), 50-$tarjetaMedioUni->obtenerValor()*2*33/100);\n }", "title": "" }, { "docid": "042bef25b113cc4972570c9c0b35aab4", "score": "0.49459645", "text": "function ateliers_autoriser(){}", "title": "" }, { "docid": "255dfbce2db0d309ccf64b2e2e23158e", "score": "0.4943439", "text": "function getAukstis() {\n return $this->aukstis; // grazina nauja reiksme mums\n }", "title": "" }, { "docid": "599ab05847cd1c97d449a37c94eb8bd7", "score": "0.49380878", "text": "public function __toString()\n\t{\n\t\t$ausgabe=\"\";\n\t\tif(strcmp($this->vorname,\"\") !=0)\n\t\t\t$ausgabe = $ausgabe . $this->vorname; \n\t\tif(strcmp($this->name,\"\") !=0)\n\t\t\t$ausgabe = $ausgabe . \" \". $this->name; \n\t\tif(strcmp($this->strasse,\"\") !=0)\n\t\t\t$ausgabe = $ausgabe . \" Strasse: \". $this->strasse; \n\t\tif(strcmp($this->wohnort,\"\") !=0)\n\t\t\t$ausgabe = $ausgabe . \" Wohnort: \". $this->wohnort; \n\t\tif(strcmp($this->nummer,\"\") != 0)\n\t\t\t$ausgabe = $ausgabe . \" Kundennummer: \" . $this->nummer;\n\t\treturn $ausgabe;\n\t}", "title": "" }, { "docid": "d9011657f9fef5419acc9498cf29c3cc", "score": "0.49348474", "text": "public function generujKod(){\n\t\t//\n\t}", "title": "" } ]
d0c8e8fe13c66a1a88f51f8863b1b2ff
encode html special chars in string preferences to save and output in webservices
[ { "docid": "ec4abb357362df66870924ef30ed3409", "score": "0.68476963", "text": "public function encodeHtmlChars() {\n if (!empty($this->sound_cue_format))\n $this->sound_cue_format = htmlspecialchars($this->sound_cue_format, ENT_NOQUOTES);\n\n if (!empty($this->name_tag_format))\n $this->name_tag_format = htmlspecialchars($this->name_tag_format, ENT_NOQUOTES);\n }", "title": "" } ]
[ { "docid": "d7fec128c737ac7ab4f60697ec8eeb7c", "score": "0.7157375", "text": "function setHtmlDecode(){\n $this->specialCharDecode = true;\n }", "title": "" }, { "docid": "f2a4091d36281831eec84c8d7f3b18be", "score": "0.6752087", "text": "function html_encode($string)\n{\n return htmlentities($string, ENT_QUOTES, 'UTF-8') ;\n}", "title": "" }, { "docid": "1fd611d2c2a0c8d2f10b5d47bb174c20", "score": "0.66408473", "text": "function htmlencode($str)\r\n{\r\n\treturn htmlentities($str, ENT_QUOTES, \"UTF-8\");\r\n}", "title": "" }, { "docid": "6cf5c45fab083becef10559fa4988a6d", "score": "0.66350526", "text": "function escape($html) {\n return htmlspecialchars($html, ENT_QUOTES | ENT_SUBSTITUTE, \"UTF-8\");\n }", "title": "" }, { "docid": "fac741f43ec6173961efec523b1047a1", "score": "0.65468276", "text": "public function htmlEncode($value);", "title": "" }, { "docid": "132a473547e16b74b825897af54518c0", "score": "0.6513076", "text": "public function decodeHtmlChars() {\n if (!empty($this->sound_cue_format))\n $this->sound_cue_format = htmlspecialchars_decode($this->sound_cue_format);\n\n if (!empty($this->name_tag_format))\n $this->name_tag_format = htmlspecialchars_decode($this->name_tag_format);\n\n if (!empty($this->disallowed_box_chars))\n $this->disallowed_box_chars = htmlspecialchars_decode($this->disallowed_box_chars);\n\n if (!empty($this->disallowed_box_start_chars))\n $this->disallowed_box_start_chars = htmlspecialchars_decode($this->disallowed_box_start_chars);\n\n if (!empty($this->rhozet_file_location))\n $this->rhozet_file_location = htmlspecialchars_decode($this->rhozet_file_location);\n }", "title": "" }, { "docid": "9a314f9f6a1bbef7c831a93b8a558220", "score": "0.648824", "text": "function encode($val,$extra=\"\") {\n\t$val = str_replace(\"'\",'&#39;',stripslashes($val));\n\t$val = str_replace('\"',\"&quot;\",$val);\n\n\tif($extra == \"tags\") { \n\t\t$val = str_replace(\"<\",'&lt;',stripslashes($val));\n\t\t$val = str_replace('>',\"&gt;\",$val);\n\t}\n\tif($extra == \"amp\") { \n\t\t$val = str_replace(\"&\",'&amp;',stripslashes($val));\n\t}\n\treturn $val;\n}", "title": "" }, { "docid": "667a9b7389b18a125c524b5e8bc89825", "score": "0.64207745", "text": "function specialchars( $str ) {\n\t\treturn wp_specialchars( $str, ENT_QUOTES, false, true );\n\t}", "title": "" }, { "docid": "b24234c9c06e6ccd9062f3e4f17857ee", "score": "0.6407319", "text": "function ohtml_urlencode( $s )\n{\n\t/* Encode special characters first */\n\t$s = str_replace( array( ',', '/', '+' ), array( '%2C', '%2F', '%2B' ), $s );\n\t$s = urlencode( $s );\n\t/* Restore separators for #area */\n\t$s = str_replace( array( '%01%01', '%02%02' ), array( ',', '.' ), $s );\n\treturn $s;\n}", "title": "" }, { "docid": "08bd7518d489fc9cd67176cd7e12dde2", "score": "0.63989776", "text": "function encode_xml_string($str)\n{\n\t$invalid_chars = array('&'=>'&amp;','<'=>'&lt;','>'=>'&gt;','\\''=>'&apos;','\\\"'=>'&quot;');\n\tforeach($invalid_chars as $key=>$val)\n\t{\n\t\t$str = str_replace($key,$val,$str);\n\t}\n\treturn $str;\n}", "title": "" }, { "docid": "0b21438726076dfd0d8485d0f2f6e072", "score": "0.6396822", "text": "function encodeHTML($str){\r\n $result = $str;\r\n $search = array('&', '<', '>', '\"', '&lt;a');\r\n $replace = array('&amp;', '&lt;', '&gt;', '&quot;');\r\n $result = str_replace($search, $replace, $result);\r\n return $result;\r\n }", "title": "" }, { "docid": "d85650b2dd6848cc6733eac6e7199e2c", "score": "0.6393014", "text": "public function bdEscapeString() {}", "title": "" }, { "docid": "65d944f8ca5e56a7cc9640181a9a1688", "score": "0.63892704", "text": "function htmlent($str, $flags = ENT_COMPAT) { //ENT_COMPAT -> Will convert double-quotes and leave single-quotes alone.\r\n return htmlentities($str, $flags, CMuffinPHP::Instance()->config['character_encoding']);\r\n}", "title": "" }, { "docid": "cdaecdc1b55d4c367d5981d7db298d64", "score": "0.6378374", "text": "function encode4solr($txt)\n{\n return utf8_encode(html_entity_decode($txt));\n}", "title": "" }, { "docid": "983c55fbb6aaa2775ced8d12535e6be4", "score": "0.63618857", "text": "function html_entity_encode($string) {\n $chars = [\n \"<\" => \"&lt;\",\n \">\" => \"&gt;\",\n// \"&\" => \"&amp;\",\n \"¢\" => \"&cent;\",\n \"£\" => \"&pound;\",\n \"¥\" => \"&yen;\",\n \"€\" => \"&euro;\",\n \"§\" => \"&sect;\",\n \"©\" => \"&copy;\",\n \"®\" => \"&reg;\",\n \"™\" => \"&trade;\",\n '\"' => \"&quot;\",\n \"\\'\" => \"&apos;\",\n ];\n $string = str_replace(\"&\", \"&amp;\", $string);\n $string = str_replace(array_keys($chars), array_values($chars), $string);\n return $string;\n}", "title": "" }, { "docid": "125de8ba33ab25abeb71f65f1bf776ed", "score": "0.6310647", "text": "function HTML_Escape($String) {\n\n $String = str_replace('\\'', '&#39;', $String);\n $String = str_replace('\"', '&quot;', $String);\n $String = str_replace('<', '&lt;', $String);\n $String = str_replace('>', '&gt;', $String);\n $String = str_replace('{', '&#123;', $String);\n $String = str_replace('}', '&#125;', $String);\n $String = str_replace('[', '&#91;', $String);\n $String = str_replace(']', '&#93;', $String);\n $String = str_replace(['\\%', '%'], '&#37;', $String);\n $String = str_replace('*', '&#42;', $String);\n $String = str_replace([\"\\r\\n\", \"\\r\", \"\\n\"], '␤', $String);\n\n return $String;\n}", "title": "" }, { "docid": "2def9798a7a3c488e7f704cd8ecb2e22", "score": "0.631012", "text": "function e($string) {\r\n return htmlentities($string, ENT_COMPAT, 'UTF-8');\r\n }", "title": "" }, { "docid": "885127609b26465e4ad0a8fb0fcd5e1b", "score": "0.62845933", "text": "function escape($raw)\n{\n return htmlentities($raw, ENT_QUOTES, 'UTF-8');\n}", "title": "" }, { "docid": "8d80b39c104bcef6b8733aacd08e2eef", "score": "0.6277276", "text": "function escapeOutput($string){\n //String, double and single quptes, character encoding\n return htmlentities($string,ENT_QUOTES,'UTF-8');\n}", "title": "" }, { "docid": "bdff8017311a2f3d0928cf4433311a07", "score": "0.6274853", "text": "function escape($string)\n{\n return htmlspecialchars($string, ENT_COMPAT, 'UTF-8');\n}", "title": "" }, { "docid": "bc5e38bf600a62092c1192042650fbd5", "score": "0.62672704", "text": "function h($string)\n{\n return htmlspecialchars($string, ENT_QUOTES, 'utf-8');\n}", "title": "" }, { "docid": "2e92461170ad44b574ab29d13d9ea100", "score": "0.6262506", "text": "function utf8_encode($data) {}", "title": "" }, { "docid": "266e669240e7b0e50bdcaae25d248760", "score": "0.626196", "text": "function escape($string){\r\n return htmlentities($string, ENT_QUOTES, 'UTF-8');\r\n}", "title": "" }, { "docid": "23b90827cc11c4493f26b86362da9520", "score": "0.62411153", "text": "function encodeURL(){\n $this->arrays();\n $this->arrayFirst=array_keys($this->url_vals);\n $this->arraySecond=array_keys(array_flip($this->url_vals));\n $this->outText = str_replace($this->arrayFirst, $this->arraySecond, $this->inText);\n }", "title": "" }, { "docid": "ada5bd7953e74e70d63b6f879983a543", "score": "0.6212102", "text": "function escape($input){\n \n if($this->config()->isHtml() && $this->config()->outEscape()){\n $input = htmlspecialchars($input,ENT_NOQUOTES);\n }//if\n \n return $input;\n \n }", "title": "" }, { "docid": "da81f392bac0d8eb42c2bd004482edd8", "score": "0.62113714", "text": "function _htmlStr($input){\nreturn str_replace(array(\"&\", \"<\", \">\", \"\\\"\", \"'\"), array(\"&amp;\", \"&lt;\", \"&gt;\", \"&quot;\", \"&#39;\"), $input);\n}", "title": "" }, { "docid": "4b8942e20adce1a0747a001587f2850d", "score": "0.6192486", "text": "function htm($data)\n\t{\n\t$rep=htmlentities($data, ENT_QUOTES, \"UTF-8\");\n\treturn $rep;\n\t}", "title": "" }, { "docid": "29a7f0e252699a91191eff1306a31f1c", "score": "0.6191749", "text": "function zen_decode_specialchars($string){\n $string=str_replace('&gt;', '>', $string);\n $string=str_replace('&lt;', '<', $string);\n $string=str_replace('&#039;', \"'\", $string);\n $string=str_replace('&quot;', \"\\\"\", $string);\n $string=str_replace('&amp;', '&', $string);\n\n return $string;\n}", "title": "" }, { "docid": "4800fdd9de8791671756ff43aaf47089", "score": "0.61855847", "text": "function h($str)\n{\n return htmlspecialchars($str, ENT_QUOTES, 'UTF-8');\n}", "title": "" }, { "docid": "7b69b89773e07905984125577a3cb49e", "score": "0.61784625", "text": "function charset_encode($string,$charset,$htmlencode=true) {\n global $default_charset;\n\n $encode=fixcharset($charset);\n $encodefile=SM_PATH . 'functions/encode/' . $encode . '.php';\n if ($encode != 'index' && file_exists($encodefile)) {\n include_once($encodefile);\n $ret = call_user_func('charset_encode_'.$encode, $string);\n } elseif(file_exists(SM_PATH . 'functions/encode/us_ascii.php')) {\n // function replaces all 8bit html entities with question marks.\n // it is used when other encoding functions are unavailable\n include_once(SM_PATH . 'functions/encode/us_ascii.php');\n $ret = charset_encode_us_ascii($string);\n } else {\n /**\n * fix for yahoo users that remove all us-ascii related things\n */\n $ret = $string;\n }\n\n /**\n * Undo html special chars, some places (like compose form) have\n * own sanitizing functions and don't need html symbols.\n * Undo chars only after encoding in order to prevent conversion of\n * html entities in plain text emails.\n */\n if (! $htmlencode ) {\n $ret = str_replace(array('&amp;','&gt;','&lt;','&quot;'),array('&','>','<','\"'),$ret);\n }\n return( $ret );\n}", "title": "" }, { "docid": "f2b2e2aa4d9701167759b4abff2fcfe3", "score": "0.6178432", "text": "function e($str)\r\n\t{\r\n\t\techo htmlspecialchars($str, ENT_QUOTES, 'UTF-8');\r\n\t}", "title": "" }, { "docid": "0fc95192ca259348c723853c9e7ca7c0", "score": "0.6169384", "text": "function escape_html($data){\n\t\t\treturn $data[1] . htmlspecialchars($data[2], ENT_COMPAT|ENT_HTML5, 'UTF-8', false) . $data[3];\n\t\t}", "title": "" }, { "docid": "dd8cc94f433edc3d0e4c40bf895b8bf5", "score": "0.6163547", "text": "function htmlCoding($input, $type = 1)\n{\n if($type == '1')\n {\n $input = str_replace( \"ي\" , \"ی\" , $input ) ; \n $input = str_replace( \"ك\" , \"ک\" , $input ) ;\n $input = str_replace( \"¬\" , \"‏\" , $input ) ;\n return htmlspecialchars($input ,ENT_QUOTES);\n }\n else\n {\n return htmlspecialchars_decode($input, ENT_QUOTES);\n }\n}", "title": "" }, { "docid": "a3b63e406c0f71399e384b9b6cebe3fd", "score": "0.6157581", "text": "function modify_url_encoding_characters($text){\r\n $text = urlencode($text);\r\n $text = str_replace(\"%A0\",\"%20\",$text);\r\n $text = str_replace(\"%C2\",\"\",$text);\r\n return urldecode($text);\r\n}", "title": "" }, { "docid": "e1e4bb2143f1453c67d88c2789a01f84", "score": "0.6146679", "text": "function utf8_htmlspecialchars ($string) {\n $convert_special_chars['\"'] = \"&quot;\";\n $convert_special_chars['<'] = \"&lt;\";\n $convert_special_chars['>'] = \"&gt;\";\n $convert_special_chars['&'] = \"&amp;\";\n $convert_special_chars[\"'\"] = \"&apos;\";\n $convert_special_chars['€'] = \"&#8364;\";\n\t\treturn strtr ($string, $convert_special_chars);\n\t}", "title": "" }, { "docid": "775ef79b1e00ab29296db8e28c56c368", "score": "0.6145408", "text": "function _h($text) {\n return htmlspecialchars($text, ENT_QUOTES, Yii::app()->charset);\n}", "title": "" }, { "docid": "482cc621fcde359e4ddc2c6b561cd70c", "score": "0.6138618", "text": "function escape($string){\n return htmlentities($string, ENT_QUOTES, 'UTF-8');\n}", "title": "" }, { "docid": "482cc621fcde359e4ddc2c6b561cd70c", "score": "0.6138618", "text": "function escape($string){\n return htmlentities($string, ENT_QUOTES, 'UTF-8');\n}", "title": "" }, { "docid": "bbb90da9960c563dbc1bdc304e687cf7", "score": "0.61267364", "text": "function escape($string)\n{\n return htmlentities($string, ENT_QUOTES, 'UTF-8');\n}", "title": "" }, { "docid": "5ce1934da9666ae9019ead6978909e4a", "score": "0.6114323", "text": "public function encode()\n {\n $this->assertEquals('&lt;&quot;hello&quot;&amp;&#039;world&#039;&gt;', $this->htmlSpecialCharsEncoder->encode('<\"hello\"&\\'world\\'>'));\n $this->htmlSpecialCharsEncoder->setQuoteStyle(ENT_NOQUOTES);\n $this->assertEquals('&lt;\"hello\"&amp;\\'world\\'&gt;', $this->htmlSpecialCharsEncoder->encode('<\"hello\"&\\'world\\'>'));\n $this->htmlSpecialCharsEncoder->setQuoteStyle(ENT_COMPAT);\n $this->assertEquals('&lt;&quot;hello&quot;&amp;\\'world\\'&gt;', $this->htmlSpecialCharsEncoder->encode('<\"hello\"&\\'world\\'>'));\n $this->htmlSpecialCharsEncoder->setQuoteStyle(ENT_QUOTES);\n $this->assertEquals('&lt;&quot;hello&quot;&amp;&#039;world&#039;&gt;', $this->htmlSpecialCharsEncoder->encode('<\"hello\"&amp;\\'world\\'>'));\n $this->htmlSpecialCharsEncoder->setDoubleEncode(true);\n $this->htmlSpecialCharsEncoder->setCharset('ISO-8859-1');\n $this->assertEquals('&lt;&quot;hell�&quot;&amp;amp;&#039;world&#039;&gt;', $this->htmlSpecialCharsEncoder->encode('<\"hell�\"&amp;\\'world\\'>'));\n }", "title": "" }, { "docid": "89796b950a80ce011d6dfb01d5e5a5a4", "score": "0.61124825", "text": "function testEncodeImmuneCharsForHTML()\n {\n $immune = array('');\n $this->assertEquals(\n 'testTEST0123&#x2c;&#x2e;&#x2d;&#x5f;&#x20;',\n $this->htmlEntityCodec->encode(\n $immune,\n 'testTEST0123,.-_ '\n )\n );\n }", "title": "" }, { "docid": "5236b3b980aa6f3635d45aaf442407f4", "score": "0.6112386", "text": "function esc($str)\n{\n\t//Remove HTML\n\t// $str = strip_tags($str);\n\t//Remove bad UTF-8 data\n\t$str = preg_replace('/([\\x00-\\x7F]|[\\xC0-\\xDF][\\x80-\\xBF]|[\\xE0-\\xEF][\\x80-\\xBF]{2}|[\\xF0-\\xF7][\\x80-\\xBF]{3})|./x', '$1', $str);\n\t//convert html entities\n\t$str = html_entity_decode($str, ENT_QUOTES, \"UTF-8\"); //revert previous html entities\n\t$str = htmlentities($str, ENT_QUOTES, \"UTF-8\");\n\treturn $str;\n}", "title": "" }, { "docid": "ae548dea00f4684f01286a3872a1e0f3", "score": "0.61099875", "text": "function scrub_out($string) {\n\n return htmlentities($string, ENT_QUOTES, Config::get('site_charset'));\n\n}", "title": "" }, { "docid": "bc5e46d32e193fbf30029e5ccf202bf5", "score": "0.61081034", "text": "function escape_string($cadena_a_ser_escapada) {\n\t\treturn $cadena_a_ser_escapada;\n\t}", "title": "" }, { "docid": "3acfee78daca81d37e3734675919fb02", "score": "0.6103439", "text": "function encode_char_for_mysql($char)\n {\n $char = str_replace(\"&\", \"&amp;\", $char);\n $char = str_replace(\"�\", '&eacute;', $char);\n $char = str_replace(\"�\", \"&Eacute;\", $char);\n $char = str_replace(\"�\", \"&egrave;\", $char);\n $char = str_replace(\"�\", \"&Egrave;\", $char);\n $char = str_replace(\"�\", \"&ccedil;\", $char);\n $char = str_replace(\"�\", \"&Ecirc;\", $char);\n $char = str_replace(\"�\", \"&agrave;\", $char);\n $char = str_replace(\"�\", \"&Agrave;\", $char);\n $char = str_replace(\"�\", \"&acirc;\", $char);\n $char = str_replace(\"�\", \"&Acirc;\", $char);\n $char = str_replace(\"�\", \"&auml;\", $char);\n $char = str_replace(\"�\", \"&ograve;\", $char);\n $char = str_replace(\"�\", \"&ocirc;\", $char);\n $char = str_replace(\"�\", \"o\", $char);\n $char = str_replace(\"�\", \"&ugrave;\", $char);\n $char = str_replace(\"�\", \"&ucirc;\", $char);\n $char = str_replace(\"�\", \"&uuml;\", $char);\n $char = str_replace(\"�\", \"&igrave;\", $char);\n $char = str_replace(\"�\", \"&iuml;\", $char);\n $char = str_replace(\"�\", \"&ccedil;\", $char);\n\n /*\n ��������������������&\n */\n\n return $char;\n }", "title": "" }, { "docid": "368812cfcf7a456c2b9773f4dfe35de6", "score": "0.6086808", "text": "function escape($value) {\r\n return htmlspecialchars($value, ENT_QUOTES, 'UTF-8', false);\r\n}", "title": "" }, { "docid": "d1d00f37736066ef09e1f343e4430a05", "score": "0.6060797", "text": "function ew_JsEncode($val) {\n\t$val = str_replace(\"\\\\\", \"\\\\\\\\\", strval($val));\n\t$val = str_replace(\"'\", \"\\\\'\", $val);\n\t$val = str_replace(\"\\r\\n\", \"<br>\", $val);\n\t$val = str_replace(\"\\r\", \"<br>\", $val);\n\t$val = str_replace(\"\\n\", \"<br>\", $val);\n\treturn $val;\n}", "title": "" }, { "docid": "fb1c85b4c601db8277d9f53189bde83d", "score": "0.60542053", "text": "function escape($value)\n{\n return htmlspecialchars($value, ENT_QUOTES, 'UTF-8', false);\n}", "title": "" }, { "docid": "e824ff4c1c196f8d2879ebef00c9ff66", "score": "0.60539275", "text": "function escape($input)\n {\n return Horde_Text_Filter::filter($input, 'space2html', array('charset' => Horde_Nls::getCharset(), 'encode' => true));\n }", "title": "" }, { "docid": "3a0b9022e123bb990b641bb660031747", "score": "0.6048033", "text": "function escape($text){\n return htmlspecialchars($text, ENT_QUOTES, 'UTF-8');\n}", "title": "" }, { "docid": "cb89cd37892eccf72406b35bbaaa0d64", "score": "0.6029045", "text": "function str_serialize($string){\n\t\t\t\t $string = str_replace('\\'','&#39;',$string);\n\t\t\t\t $string = str_replace('\"','&quot;',$string);\n\t\t\t\t $string = str_replace(\"\\\\\",\"&#92;\",$string);\n\t\t\t\t $string = str_replace(\":\",\"&#58;\",$string); \n\t\t\t\t return $string;\t\n\t\t\t\t}", "title": "" }, { "docid": "48733b162b0ab595e354cb81edd502ea", "score": "0.602389", "text": "function h($text)\n{\n return htmlspecialchars($text, ENT_QUOTES, 'utf-8');\n}", "title": "" }, { "docid": "2df4b3c7b14d85b553d583ebf1ec64e6", "score": "0.602309", "text": "function xml_undo_html_special_chars($str)\n{\n\t$str = preg_replace(\"/&gt;/i\", '>', $str);\n\t$str = preg_replace(\"/&lt;/i\", '<', $str);\n\t$str = preg_replace(\"/&quot;/i\", '\"', $str);\n\t$str = preg_replace(\"/&#039;/i\", \"'\", $str);\t\n\t$str = preg_replace(\"/&amp;nbsp;/i\", '&nbsp;', $str);\n\treturn $str;\n}", "title": "" }, { "docid": "23aaac5a2c7c2d994b925cfc9f5cb462", "score": "0.60180014", "text": "function setCharSetHTML ( $field ) {\n $valueReturn =\n htmlentities ( ucwords ( utf8_encode ( $field ) ),\n ENT_QUOTES, \"UTF-8\" );\n return $valueReturn;\n }", "title": "" }, { "docid": "61739ee3592eba4b4643bd7e70c986d8", "score": "0.6016694", "text": "public function encode();", "title": "" }, { "docid": "260d4fc56f91423f2000402a09bae3c2", "score": "0.6008404", "text": "function foml_escape($Var) {\n return htmlentities($Var, ENT_QUOTES | ENT_SUBSTITUTE | ENT_XML1);\n }", "title": "" }, { "docid": "a51dfb71a4c095f9b473e0345a826dc3", "score": "0.60012347", "text": "function html($string) {\n return htmlspecialchars($string, ENT_COMPAT, 'UTF-8', true);\n}", "title": "" }, { "docid": "88ea113305bcbcf0502cc4c81d13be1e", "score": "0.59952354", "text": "function safe_display($string, $decode_html_special_chars = false, $use_nl2br = false){\n\n if($decode_html_special_chars){\n $string = htmlspecialchars_decode($string);\n }\n if($use_nl2br){\n $string = nl2br($string);\n }\n return $string;\n}", "title": "" }, { "docid": "e6f7f500f488c94f72c6564ed1e04c5e", "score": "0.59876555", "text": "function htmlEscape(&$item, $key)\r\n\t\t{\t\t\t\r\n\t\t\t$scOffTags = array(\"<!-- SC_OFF -->\", \"<!-- SC_ON -->\");\r\n\t\t\t$replace = array(\"\", \"\");\r\n\t\t\t$item[\"data\"][\"selftext_html\"] = substr(html_entity_decode($item[\"data\"][\"selftext_html\"]), 15);\r\n\t\t}", "title": "" }, { "docid": "951f23a48d6efb1e5ae5a666e0a5e2a5", "score": "0.5985816", "text": "function set_html_escape ($bool = 1) {\n//aviso(\"set_order($orden)\");\n\t\t$this->html_escape = ($bool) ? 1 : 0;\n\t\treturn 1;\n\t}", "title": "" }, { "docid": "1b64ae33c5e457209af73e2f973b5627", "score": "0.5983162", "text": "function h($text)\n{\n return htmlspecialchars($text,ENT_QUOTES,Yii::app()->charset);\n}", "title": "" }, { "docid": "9bc5541f0e32563277534673bc3893f8", "score": "0.59823173", "text": "public static function smartXmlSpecialChars($string) {\n\t\t$preserveList = self::getHtmlEntitityList();\n\t\tforeach($preserveList as $i=>$s) {\n\t\t\t$string = _str_replace($s, sprintf('{%u}', $i), $string);\n\t\t}\n\t\t$string = _xmlspecialchars($string);\n\t\tforeach($preserveList as $i=>$s) {\n\t\t\t$string = _str_replace(sprintf('{%u}', $i), $s, $string);\n\t\t}\n\t\treturn $string;\n\t}", "title": "" }, { "docid": "716839eea652a3e078f566a87e177e3a", "score": "0.59762836", "text": "function utf8ToHtmlEntities($str) {\n\t\t\t\n\t\t\tif(defined( '_JEXEC' )){\n\t\t\t\treturn $str;\n\t\t\t}\n\t\t\tglobal $_JC_CONFIG;\n\t\t\t\n\t\t\tif($_JC_CONFIG->get('optimiseEncoding') \n\t\t\t\t&& function_exists('mb_convert_encoding')\n\t\t\t\t&& defined('_ISO')){\n\n\t\t\t\t$iso = explode( '=', _ISO );\n\t\t\t\t$str = mb_convert_encoding($str, $iso[1], \"UTF-8\");\n\t\t\t\treturn $str;\n\t\t\t} else {\n\n\t\t\t\t$temp = $this->utf8ToUnicodeArray($str);\n\t\t\t\treturn $this->unicodeArrayToHtmlEntities($temp);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "abb5062eb15c35798d96cc1e3ec99190", "score": "0.5972499", "text": "function _xmlEntities($string) {\n $string = htmlspecialchars($string, ENT_QUOTES, 'UTF-8', false);\n // $string = parent::_xmlEntities($string);\n $string = htmlentities($string, 8, 'UTF-8');\n $string = $this->superentities($string);\n\n if ( $this->info['scriptmode'] ) {\n $string = str_replace( array( \"&lt;%\", \"%&gt;\", \"&lt;?\", \"?&gt;\"),\n array( \"<%\", \"%>\", \"<?\", \"?>\"),\n $string);\n }\n\n return $string;\n }", "title": "" }, { "docid": "898e670b816507bcca4bffd41f7e4c3b", "score": "0.59695417", "text": "function hs($str) {\n\t$search = array('\"'=>'&quot;', '<'=>'&lt;', '>'=>'&gt;');\n\treturn str_replace(array('<', '>'), array('&lt;', '&gt;'), mb_convert_encoding($str, 'UTF-8'));\n}", "title": "" }, { "docid": "449fdd916bb35acde88818c8d321a4da", "score": "0.5950785", "text": "function securise_string($chaine)\n{\n\t//$chaine = trim($chaine);\n\t//return $chaine;\n\t//return trim(str_replace(array(\"&gt;\", \"&lt;\", \"&quot;\"), array(\">\", \"<\", \"\\\"\"), $chaine));\n\treturn trim(htmlspecialchars($chaine));\n//enlev? \"&\" \"&amp;\"\n//$chaine = str_replace(';','&#x3B',$chaine);\n}", "title": "" }, { "docid": "af1f54afbbc7d0ffe770830dce8c0fc0", "score": "0.5950125", "text": "function e($value)\n {\n return htmlspecialchars($value, ENT_QUOTES, 'UTF-8', false);\n }", "title": "" }, { "docid": "18a6342a364f65aa03cf461a25f5c549", "score": "0.59422237", "text": "function encode_html($html, $can_double_encode = 0) {\n\t\tif (!isset($html))\n\t\t\treturn '';\n\t\tif ($this->char_encoding) {\n\t\t\t$html = htmlentities($html);\n\t\t} else {\n\t\t\t$html = $this->encode_html_basic($html, $can_double_encode);\n\t\t}\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "15fb8c83837ae936499e31d374c3becd", "score": "0.5938454", "text": "function _xmlSafeStr($print_friendly_string){\n if ( is_string($print_friendly_string) )\n //return htmlspecialchars($print_friendly_string, ENT_QUOTES); // only convert &, ', \", <, >\n return preg_replace(\"/&amp;(#[0-9]+|[a-z]+);/i\", \"&$1;\", htmlspecialchars($print_friendly_string, ENT_QUOTES)); // only convert &, ', \", <, > (but exclude BINARY data type which is the format of &#[0-9]+|[a-z]+\n else\n return $print_friendly_string;\n}", "title": "" }, { "docid": "ece6c482df27da897306e1f9e0c82bc1", "score": "0.5936518", "text": "public function encodeString($input);", "title": "" }, { "docid": "caf6a4a59c70a275efca14a323cd3752", "score": "0.5928779", "text": "protected function encode( $string )\n {\n $string = htmlspecialchars( $string );\n\n switch ( strtolower( $this->options->encoding ) )\n {\n case '':\n case 'utf-8':\n case 'utf-16':\n return $string;\n default:\n // Manual escaping of non ANSII characters, because ext/DOM fails here\n return preg_replace_callback( \n '/[\\\\x80-\\\\xFF]/', \n create_function(\n '$char',\n 'return sprintf( \\'&#x%02x;\\', ord( $char[0] ) );'\n ),\n $string \n );\n }\n }", "title": "" }, { "docid": "90ed01d7a0eeb71208b317f243cfc447", "score": "0.5921738", "text": "public function escape_string ($escapestr) {}", "title": "" }, { "docid": "b2b0803e768c7214bd2e653eacc432bc", "score": "0.59207845", "text": "public static function smartHtmlSpecialChars($string) {\n\t\t$preserveList = self::getHtmlEntitityList();\n\t\tforeach($preserveList as $i=>$s) {\n\t\t\t$string = _str_replace($s, sprintf('{%u}', $i), $string);\n\t\t}\n\t\t$string = _htmlspecialchars($string);\n\t\tforeach($preserveList as $i=>$s) {\n\t\t\t$string = _str_replace(sprintf('{%u}', $i), $s, $string);\n\t\t}\n\t\treturn $string;\n\t}", "title": "" }, { "docid": "be12f3eda09bcf7654d7fedcab28123c", "score": "0.59177905", "text": "function h($data,$double=true){\n\t/*#if PROD*/return /*#/if*//*#if DEV */$str=/*#/if*/htmlspecialchars((string)$data,ENT_QUOTES|ENT_SUBSTITUTE,'UTF-8',$double);\n\t/*#if DEV */\n\tif(!Springbok::$inError && strpos($str,'�')!==false && substr($str,0,8)!=='&lt;?php')\n\t\tthrow new Exception('This string has a bad character in it : '.$str);\n\treturn $str;\n\t/*#/if*/\n}", "title": "" }, { "docid": "973beb7f5d82041783e8cc2d05576814", "score": "0.59170866", "text": "function e($string)\n{\n echo htmlspecialchars($string, ENT_QUOTES, 'UTF-8', false);\n}", "title": "" }, { "docid": "34e755c0a623e9f55d50e7df2453cd64", "score": "0.5913506", "text": "function mb_htmlentities($str, $encoding = 'utf-8') { \n mb_regex_encoding($encoding); \n $pattern = array('<', '>', '\"', '\\''); \n $replacement = array('&lt;', '&gt;', '&quot;', '&#39;'); \n for ($i=0; $i<sizeof($pattern); $i++) { \n $str = mb_ereg_replace($pattern[$i], $replacement[$i], $str); \n } \n return $str; \n}", "title": "" }, { "docid": "fe23f8e670fc40e0747abd21d3e4df5d", "score": "0.59116197", "text": "function h($text) {\n return htmlspecialchars($text, ENT_QUOTES, Yii::app()->charset);\n}", "title": "" }, { "docid": "4889fdb7bfca20a768a192a933f415c7", "score": "0.5907398", "text": "function hesc($dirty){\n return htmlentities($dirty, ENT_QUOTES | ENT_IGNORE, 'UTF-8');\n}", "title": "" }, { "docid": "c8efa7f4f0e6c32d7ab43d7db85a18dd", "score": "0.59073645", "text": "function html_to_utf8 ($data)\n {\n return preg_replace(\"/\\\\&\\\\#([0-9]{3,10})\\\\;/e\", '_html_to_utf8(\"\\\\1\")', $data);\n }", "title": "" }, { "docid": "d05518c6eb4ecfc05ed116e409403b20", "score": "0.5905447", "text": "function encode();", "title": "" }, { "docid": "b58ad707ad5eee1be4bcd4e92c25a23d", "score": "0.5902174", "text": "function zen_html_quotes($string) {\n return str_replace(\"'\", \"&#39;\", $string);\n }", "title": "" }, { "docid": "06b3a480dd842389d0d6429300ae1b8e", "score": "0.5899101", "text": "function hdecode($string){ return html_entity_decode($string,ENT_QUOTES,'UTF-8'); }", "title": "" }, { "docid": "e44c7a73ef5000326ecba35b8bcc0992", "score": "0.5899021", "text": "public function htmlEncode($data)\n {\n $SAFE_OUT_CHARS = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890._-\";\n $result = \"\";\n for ($i = 0; $i < strlen($data); $i ++)\n {\n if (strchr($SAFE_OUT_CHARS, $data{$i}))\n {\n $result .= $data{$i};\n } else if (($var = bin2hex(substr($data, $i, 1))) <= \"7F\")\n {\n $result .= \"&#x\" . $var . \";\";\n } else\n {\n $result .= $data{$i};\n }\n }\n\n return $result;\n }", "title": "" }, { "docid": "5eb811a6530f81cf5b3de41fc2086659", "score": "0.5893651", "text": "function postIndexEncode($str) {\n\treturn strtr(urlencode($str),array('.'=>'__2E__','+'=> '_-_','%'=>'_--_'));\n}", "title": "" }, { "docid": "ed11f9d09a5d916a0418ba41f30565b1", "score": "0.58935195", "text": "function escape($string){\n\treturn htmlentities($string, ENT_QUOTES, 'UTF-8');\n}", "title": "" }, { "docid": "054fb8717e97c55df2eebdb90f386a12", "score": "0.58934045", "text": "public function htmlOutput($string) {\n $string = html_entity_decode($string);\n $string = htmlspecialchars_decode($string);\n\n return $string;\n}", "title": "" }, { "docid": "2f7cddd6a1b1b4832c8c8af694ac9a45", "score": "0.58925384", "text": "function html_escaped_output($output_value){\r\n\t$escaped_output = htmlspecialchars($output_value, ENT_QUOTES, \"UTF-8\");\r\n\treturn $escaped_output;\r}", "title": "" }, { "docid": "fb7e97f33761de650ff36a6561620200", "score": "0.5891868", "text": "public function special_chars( &$content )\r\n {\r\n $trans = array(\r\n chr(228) => \"&auml;\",\r\n chr(246) => \"&ouml;\",\r\n chr(252) => \"&uuml;\",\r\n chr(196) => \"&Auml;\",\r\n chr(214) => \"&Ouml;\",\r\n chr(220) => \"&Uuml;\",\r\n chr(171) => \"&laquo;\",\r\n chr(187) => \"&raquo;\",\r\n chr(223) => \"&szlig;\"\r\n );\r\n $content = strtr( $content, $trans );\r\n }", "title": "" }, { "docid": "0782cb589ae320f86f5b9d868354f091", "score": "0.5876419", "text": "function utf8_htmlspecialchars($value)\n{\n\treturn htmlspecialchars($value, ENT_COMPAT, 'UTF-8');\n}", "title": "" }, { "docid": "a87e357f5257fedb272de96c75073df5", "score": "0.5875359", "text": "function unsetHtmlDecode(){\n $this->specialCharDecode = false;\n }", "title": "" }, { "docid": "81cd55d3c2ac08b370c637112ad177f1", "score": "0.587018", "text": "public static function encodeValue(string $value): string\n {\n return str_replace([\"&\", \"<\", \">\"], [\"&amp;\", \"&lt;\", \"&gt;\"], $value);\n // return htmlspecialchars($value, ENT_XML1 | ENT_COMPAT, 'UTF-8');\n }", "title": "" }, { "docid": "5e45e3909628a0a6f7a346af8d10cb04", "score": "0.5869787", "text": "function escape_html($val){\n return htmlspecialchars($val, ENT_QUOTES);\n}", "title": "" }, { "docid": "456aa016f92fb2b6c004d81a9a077650", "score": "0.58583254", "text": "function bj_clean_string($string,$allowed_html=array()) {\r\n\tglobal $bj;\r\n\tif(get_magic_quotes_gpc())\r\n\t\t$string = stripslashes($string);\r\n\t$content = str_replace(\r\n\t\tarray(\r\n\t\t\t\"<\",\r\n\t\t\t\">\",\r\n\t\t\t\"\\\"\",\r\n\t\t\t\"'\",\r\n\t\t\t\"&\"),\r\n\t\tarray(\r\n\t\t\t\"&#60;\",\r\n\t\t\t\"&#62;\",\r\n\t\t\t\"&#34;\",\r\n\t\t\t\"&#39;\",\r\n\t\t\t\"&#38;\"),\r\n\t\t$content);\r\n\t$string = bj_kses($string,$allowed_html);\r\n\t$string = $bj->db->escape($string);\r\n\treturn run_actions('clean_string',$string);\r\n}", "title": "" }, { "docid": "a1dd65d3ced205beec140728bab4c889", "score": "0.5855618", "text": "function quoteInput($s)\t{\n\t\tif ($this->SCRIPT_DECODE_MODE == 'entities') {\n\t\t\treturn str_replace(array('\"', '<', '>'), array('&quot;', '&lt;', '&gt;'), $s);\n\t\t} else {\n\t\t\treturn htmlspecialchars($s);\n\t\t}\n\t}", "title": "" }, { "docid": "52e044490f0a88d63744dabb0c52193c", "score": "0.5855405", "text": "function __escapeHtml($data, array $config = array())\n{\n return __escape($data, 'html', $config);\n}", "title": "" }, { "docid": "2519cec108bc6fcfc571074d01f7af07", "score": "0.58506936", "text": "function txt_htmlspecialchars($t=\"\")\n\t{\n\t\t// Use forward look up to only convert & not &#123;\n\t\t$t = preg_replace(\"/&(?!#[0-9]+;)/s\", '&amp;', $t );\n\t\t$t = str_replace( \"<\", \"&lt;\" , $t );\n\t\t$t = str_replace( \">\", \"&gt;\" , $t );\n\t\t$t = str_replace( '\"', \"&quot;\", $t );\n\t\t$t = str_replace( \"'\", '&#039;', $t );\n\t\t\n\t\treturn $t; // A nice cup of?\n\t}", "title": "" }, { "docid": "f5851c8bf54a4ed0bcb414925319ba11", "score": "0.5844237", "text": "function mj_safeHtml($str)\n{\n return htmlspecialchars($str);\n}", "title": "" }, { "docid": "545f5009c8e718a552e6f89f6a3e9f93", "score": "0.583562", "text": "function escape ($string) {\n return htmlspecialchars($string, 'ENT_QUOTES', 'UTF-8');\n}", "title": "" }, { "docid": "03ab88be0c1ef18c8220fbbbed164312", "score": "0.5835103", "text": "function escape($string) {\n return htmlentities($string);\n}", "title": "" }, { "docid": "773cc11104e95d2983652535c5a85dc9", "score": "0.5832747", "text": "protected function encodeHTML($text) {\n\t\tif (!$this->disableEncoding) {\n\t\t\t$text = StringUtil::encodeHTML($text);\n\t\t}\n\t\t\n\t\treturn $text;\n\t}", "title": "" } ]
95a31042affcdda1977428079ba732de
Receive the messages and dispatch them to the bus.
[ { "docid": "c7e2b7764dccc3765462312b95de4d29", "score": "0.52105385", "text": "public function run()\n {\n if (\\function_exists('pcntl_signal')) {\n pcntl_signal(SIGTERM, function () {\n $this->receiver->stop();\n });\n }\n\n $this->receiver->receive(function (?Envelope $envelope) {\n if (null === $envelope) {\n if (\\function_exists('pcntl_signal_dispatch')) {\n pcntl_signal_dispatch();\n }\n\n return;\n }\n\n $this->dispatchEvent(new WorkerMessageReceivedEvent($envelope, $this->receiverName));\n\n $message = $envelope->getMessage();\n $context = [\n 'message' => $message,\n 'class' => \\get_class($message),\n ];\n\n try {\n $envelope = $this->bus->dispatch($envelope->with(new ReceivedStamp()));\n } catch (\\Throwable $throwable) {\n $shouldRetry = $this->shouldRetry($throwable, $envelope);\n\n $this->dispatchEvent(new WorkerMessageFailedEvent($envelope, $this->receiverName, $throwable, $shouldRetry));\n\n if ($shouldRetry) {\n if (null === $this->retryStrategy) {\n // not logically allowed, but check just in case\n throw new LogicException('Retrying is not supported without a retry strategy.');\n }\n\n $retryCount = $this->getRetryCount($envelope) + 1;\n if (null !== $this->logger) {\n $this->logger->error('Retrying {class} - retry #{retryCount}.', $context + ['retryCount' => $retryCount, 'error' => $throwable]);\n }\n\n // add the delay and retry stamp info + remove ReceivedStamp\n $retryEnvelope = $envelope->with(new DelayStamp($this->retryStrategy->getWaitingTime($envelope)))\n ->with(new RedeliveryStamp($retryCount, $this->getSenderAlias($envelope)))\n ->withoutAll(ReceivedStamp::class);\n\n // re-send the message\n $this->bus->dispatch($retryEnvelope);\n // acknowledge the previous message has received\n $this->receiver->ack($envelope);\n } else {\n if (null !== $this->logger) {\n $this->logger->critical('Rejecting {class} (removing from transport).', $context + ['error' => $throwable]);\n }\n\n $this->receiver->reject($envelope);\n }\n\n if (\\function_exists('pcntl_signal_dispatch')) {\n pcntl_signal_dispatch();\n }\n\n return;\n }\n\n $this->dispatchEvent(new WorkerMessageHandledEvent($envelope, $this->receiverName));\n\n if (null !== $this->logger) {\n $this->logger->info('{class} was handled successfully (acknowledging to transport).', $context);\n }\n\n $this->receiver->ack($envelope);\n\n if (\\function_exists('pcntl_signal_dispatch')) {\n pcntl_signal_dispatch();\n }\n });\n }", "title": "" } ]
[ { "docid": "ed2ab2c628db7b047117db6c2f5b77c0", "score": "0.6625579", "text": "public function consume()\n {\n $handlers = $this->event_handlers;\n\n $callback = function($message) use ($handlers) {\n\n $event = json_decode($message->body, true);\n\n if (array_key_exists($event['name'], $handlers)){\n try {\n $handlers[$event['name']]($event);\n } catch (Exception $ex) {\n print \"Error handling \" . $event['name'] . \" with exception \" . get_class($ex) . \" \" . $ex->getMessage();\n }\n }\n };\n\n $this->connect();\n\n list($queue_name, ,) = $this->channel->queue_declare(\"\", false, false, true, false);\n\n $this->channel->queue_bind($queue_name, $this->channel_name);\n\n $this->channel->basic_consume($queue_name, '', false, true, false, false, $callback);\n\n while(count($this->channel->callbacks)) {\n $this->channel->wait();\n }\n\n }", "title": "" }, { "docid": "ed19ae89fe92fdf33b9c17d3b4809453", "score": "0.6452298", "text": "abstract protected function receiveMessages(): array;", "title": "" }, { "docid": "3bb6c8c69da97ea77b3677eb5dde3058", "score": "0.6284226", "text": "public function dispatch(Messages $messages): void;", "title": "" }, { "docid": "ef1142f10fb34c5a214e0a6767e3919e", "score": "0.6166145", "text": "function Dispatch() {\n\n\t\tswitch($this->messagetype) {\n\t\t\tcase 'ping':\n\t\t\t\t/* no validation needed */\n\t\t\t\t$this->handler->Ping();\n\t\t\t\tbreak;\n\t\t\tcase 'pickup':\n\t\t\t\t/* perform site validation, as opposed to sender validation */\n\t\t\t\t$this->handler->Pickup($this->data);\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tif(! $this->validated) {\n\t\t\t\t\t$this->response['message'] = 'Sender not valid';\n\t\t\t\t\tjson_return_and_die($this->response);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\n\t\t/* Now handle tasks which require sender validation */\n\n\t\tswitch($this->messagetype) {\n\n\t\t\tcase 'auth_check':\n\t\t\t\t$this->handler->AuthCheck($this->data,$this->encrypted);\n\t\t\t\tbreak;\n\n\t\t\tcase 'request':\n\t\t\t\t$this->handler->Request($this->data);\n\t\t\t\tbreak;\n\n\t\t\tcase 'purge':\n\t\t\t\t$this->handler->Purge($this->sender,$this->recipients);\n\t\t\t\tbreak;\n\n\t\t\tcase 'refresh':\n\t\t\tcase 'force_refresh':\n\t\t\t\t$this->handler->Refresh($this->sender,$this->recipients);\n\t\t\t\tbreak;\n\n\t\t\tcase 'notify':\n\t\t\t\t$this->handler->Notify($this->data);\n\t\t\t\tbreak;\n\n\t\t\tcase 'rekey':\n\t\t\t\t$this->handler->Rekey($this->sender, $this->data);\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t$this->response['message'] = 'Not implemented';\n\t\t\t\tjson_return_and_die($this->response);\n\t\t\t\tbreak;\n\t\t}\n\n\t}", "title": "" }, { "docid": "91520daa5bcce1c5f673b23fc64576d4", "score": "0.60547084", "text": "public function run()\n {\n\n // load application and message instance\n $application = $this->application;\n $message = $this->message;\n try {\n // register shutdown handler\n register_shutdown_function(array(&$this, \"shutdown\"));\n\n // we need to register the class loaders again\n $application->registerClassLoaders();\n\n // load class name and session ID from remote method\n $queueProxy = $message->getDestination();\n $sessionId = $message->getSessionId();\n\n // lookup the queue and process the message\n if ($queue = $application->search('QueueContextInterface')->locate($queueProxy)) {\n // the queues receiver type\n $queueType = $queue->getType();\n\n // create an intial context instance\n $initialContext = new InitialContext();\n $initialContext->injectApplication($application);\n\n // lookup the bean instance\n $instance = $initialContext->lookup($queueType);\n\n // inject the application to the receiver and process the message\n $instance->onMessage($message, $sessionId);\n }\n\n // mark the job finished\n $this->finished = true;\n\n } catch (\\Exception $e) {\n $application->getInitialContext()->getSystemLogger()->error($e->__toString());\n }\n }", "title": "" }, { "docid": "696bdc5b729ab0b87d29651ad71a1ecc", "score": "0.58948797", "text": "private function receive() {\n $nl = strpos($this->buffer, \"\\n\");\n while ($nl === false && !$this->finished) {\n curl_multi_exec($this->mh, $running);\n curl_multi_select($this->mh);\n Request::checkError($this->c, $this->buffer);\n if ($running == 0) {\n $this->finished = true;\n }\n $nl = strpos($this->buffer, \"\\n\");\n }\n }", "title": "" }, { "docid": "db00fc1c61fad6daae8dc6a733fde7a9", "score": "0.58645505", "text": "public function dispatch()\r\n {\r\n $this->handle();\r\n }", "title": "" }, { "docid": "02835c56e34853797f60a76866ed9aeb", "score": "0.5779972", "text": "public function dispatch(EventMessageInterface $msg)\n{ \n\n // Debug\n debug::add(4, tr(\"Sending RPC command to {1}\", $msg->get_routing_key(true)));\n\n // Check for all-in-one server\n if (app::_config('core:server_type') == 'all' || app::_config('core:server_type') == 'app') { \n return $this->dispatch_locally($msg);\n }\n\n // Open connection\n if (!$this->connection) { \n $this->connection = $this->get_rabbitmq_connection();\n $this->channel = $this->connection->channel();\n list($this->callback_queue, ,) = $this->channel->queue_declare('', false, false, true, false);\n $this->channel->basic_consume($this->callback_queue, '', false, false, false, false, array($this, 'onresponse'));\n }\n\n // Set variables\n $this->response = null;\n $this->corr_id = uniqid();\n\n // Define message\n if ($msg->get_type() == 'direct') { \n\n $msg = new AMQPMessage(\n serialize($msg),\n array('delivery_mode' => AMQPMessage::DELIVERY_MODE_PERSISTENT)\n );\n\n } else { \n\n $msg = new AMQPMessage(\n serialize($msg),\n array(\n 'correlation_id' => $this->corr_id,\n 'reply_to' => $this->callback_queue\n )\n );\n }\n\n // Publish message\n $this->channel->basic_publish($msg, $this->channel_name, $msg->get_routing_key());\n\n // Wait for response\n $this->channel->wait(false, false, 5);\n\n // Return\n return unserialize($response);\n\n}", "title": "" }, { "docid": "e90570a231e20b21d51cd5a0fc679fa1", "score": "0.5758277", "text": "protected function handleDelivery()\n {\n $source = $this->getEvent()->getSource();\n $nick = $this->getEvent()->getNick();\n\n $this->deliverReminders($source, $nick);\n }", "title": "" }, { "docid": "11d186fbc9921dd7bbdcf600850ee810", "score": "0.566121", "text": "public function handleMessage() {\n $this->server->handler->handleMessage($this);\n }", "title": "" }, { "docid": "3db16187dc0defe8cd824efca892987a", "score": "0.5639367", "text": "protected function receiver()\n\t{\n\t\t$resultQueue = msg_get_queue(self::MSG_QUEUE_KEY+1);\n\n\t\t$task = '';\n\t\t$type = 1;\n\t\t\n\t\tif ($this->groupTasks == true) { \n\t\t\t$limit = 0;\n\t\t\tforeach ($this->taskList as $list) {\n\t\t\t\t$limit += sizeof($list);\n\t\t\t} \n\t\t} else {\n\t\t\t$limit = sizeof($this->taskList); \n\t\t}\n\n\t\tfor ($i=0; $i<$limit; $i++) {\n\t\t\t\n\t\t\t$this->memStore[] = memory_get_usage(true);\n\t\t\n\t\t\tif (msg_receive($resultQueue, 0, $type, self::MSG_QUEUE_SIZE, $task, true, NULL, $error)) {\n\n\t\t\t\t// check state\n\t\t\t\tif ($task->getState() == rtTask::PASS) {\n\t\t\t\t\t$this->countPass++;\n\t\t\t\t} else {\n\t\t\t\t\t$this->countFail++;\n\t\t\t\t}\n\n\t\t\t\t// store result\t\t\t\t\n\t\t\t\t$index = $task->getIndex();\n\t\t\t\t\n\t\t\t\tif ($this->groupTasks == true) {\n\t\t\t\t\t$this->taskList[$type-2][$index] = $task;\n\t\t\t\t} else {\n\t\t\t\t\t$this->taskList[$index] = $task;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tprint \"RECEIVER ERROR $error\\n\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t$inputQueue = msg_get_queue(self::MSG_QUEUE_KEY);\n\t\t\n\t\tfor ($i=1; $i<=$this->processCount; $i++) {\n\n\t\t\tif (msg_send($inputQueue, $i, self::KILL_CHILD, true, true, $error)) {\n\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tprint \"RECEIVER ERROR $error\\n\";\n\t\t\t}\n\t\t}\n\n\t\treturn;\n\t}", "title": "" }, { "docid": "29d77c60e60c54e95b4a1e1986da0828", "score": "0.5612607", "text": "public function receive($request):void{\n if($this->app->get('config')->get('fb-messenger.debug')){\n Log::info('FBMSG Receive',[\n 'body'=>$request->all(),\n ]);\n }\n\n $this->receive->handle($request);\n }", "title": "" }, { "docid": "b8c5038e0ef2641b2d6c01c1a6e4eea4", "score": "0.55183464", "text": "public function dispatch()\n {\n if ($this->debug) {\n return $this->fakeDispatch();\n }\n\n foreach ($this->extractRecipients() as $recipient) {\n $this->guzzle->post('https://app.rule.io/api/v2/transactionals', [\n 'json' => [\n 'apikey' => $this->apiKey,\n 'transaction_type' => 'email',\n 'transaction_name' => $this->subject,\n 'subject' => $this->subject,\n 'from' => $this->from,\n 'to' => $recipient,\n 'content' => [\n 'html' => base64_encode($this->content['html']),\n 'plain' => base64_encode($this->content['plain'])\n ]\n ]\n ]);\n }\n }", "title": "" }, { "docid": "54397b2c3e4e68c06f4fec77f3b68ff0", "score": "0.54897195", "text": "protected static function recieve($message){}", "title": "" }, { "docid": "43613f317e1d871b4c19f4d676195844", "score": "0.54485863", "text": "public function process()\n {\n pcntl_signal_dispatch();\n\n try {\n $read = $write = array();\n $timeout = $this->calculatePollTimeout();\n $this->getPoller()->poll($read, $write, $timeout);\n } catch (\\ZMQPollException $ex) {\n pcntl_signal_dispatch();\n $this->getLogger()->debug('[SERVICE] Received Poll Exception: '.$ex->getMessage().'('.$ex->getCode().')');\n\n return;\n }\n\n $this->stream->handle();\n $this->runSchedule();\n }", "title": "" }, { "docid": "2b4eca5bb8f185043c9237c9cb240fb5", "score": "0.5441398", "text": "public function dispatch(MessageInterface $message);", "title": "" }, { "docid": "8442dc3387bd88a24e2bba64fef56a63", "score": "0.5370611", "text": "public function run()\n {\n $context = new \\ZMQContext();\n $receiver = new \\ZMQSocket($context, \\ZMQ::SOCKET_REP);\n $bindTo = 'tcp://*:' . $this->port;\n echo \"Binding to {$bindTo}\\n\";\n $receiver->bind($bindTo);\n while (TRUE) {\n $msg = $receiver->recv();\n switch ($msg) {\n case 'GEN':\n try {\n $response = $this->generator->generate();\n } catch (\\Exception $e) {\n $response = \"ERROR\";\n }\n break;\n case 'STATUS':\n $response = json_encode($this->generator->status());\n break;\n default:\n $response = 'UNKNOWN COMMAND';\n break;\n }\n $receiver->send($response);\n }\n }", "title": "" }, { "docid": "895bf366f9871c2f98c32fec5f640dd5", "score": "0.5350407", "text": "public function listen()\n {\n $connection = new AMQPConnection(\n RMQ_HOST, #host \n RMQ_PORT, #port\n RMQ_USERNAME,#user\n RMQ_PASSWORD #password\n );\n \n $channel = $connection->channel();\n \n $channel->queue_declare(\n 'transactions', #queue name, the same as the sender\n false, #passive\n false, #durable\n false, #exclusive\n false #autodelete\n );\n \n $channel->basic_consume(\n 'transactions', #queue \n '', #consumer tag - Identifier for the consumer, valid within the current channel. just string\n false, #no local - TRUE: the server will not send messages to the connection that published them\n true, #no ack - send a proper acknowledgment from the worker, once we're done with a task\n false, #exclusive - queues may only be accessed by the current connection\n false, #no wait - TRUE: the server will not respond to the method. The client should not wait for a reply method\n array($this, 'processOrder') #callback - method that will receive the message\n );\n \n while(count($channel->callbacks)) {\n $channel->wait();\n }\n \n $channel->close();\n $connection->close();\n }", "title": "" }, { "docid": "f7c158fd59d4b7d3af90456208ca8169", "score": "0.53136283", "text": "public function perform() {\n $this->send();\n }", "title": "" }, { "docid": "8cf8583ce52ed1f500c44090110f8756", "score": "0.5311179", "text": "public function processReceivedData()\n {\n // to do: call processData() for all members\n }", "title": "" }, { "docid": "7bfe0382e47a90abe0272e07ef998757", "score": "0.5304721", "text": "public function getMessageQueue();", "title": "" }, { "docid": "ea8e5bb5798c44feafd2a4fed3b6939a", "score": "0.5303761", "text": "public function receive(Request $request)\n {\n FBMSG::receive($request);\n }", "title": "" }, { "docid": "c54141f06f42b5a650a80769f42af237", "score": "0.5297272", "text": "public function handle()\n {\n $messages = Message::with('machine')->limit(50)->get();\n foreach($messages as $message) {\n try {\n switch ($message->machine->type) {\n case Machine::TYPE_VENDING:\n Log::debug(self::LOG_TAG.'vending machine['.$message->machine->device.'] '. $message->body);\n $this->vendingHandleMessage($message);\n break;\n case Machine::TYPE_SHOEBOX_V2:\n Log::debug(self::LOG_TAG.'shoe box['.$message->machine->device.'] '. $message->body);\n $this->shoeboxV2HandleMessage($message);\n break;\n default:\n break;\n }\n } catch (Exception $e) {\n Log::error(self::LOG_TAG.$e->getMessage());\n }\n $message->delete();\n }\n }", "title": "" }, { "docid": "72aa824a3cc85a2bc8ec023b5775c414", "score": "0.5293372", "text": "public function processReceivedData()\r\n {\r\n // to do: call processData() for all members\r\n }", "title": "" }, { "docid": "0bab289668cca7c0809bfd13311e0580", "score": "0.528109", "text": "public function receiveMessage() :MessageInterface\n {\n throw new QueueException('Message receiving is not implemented yet!');\n }", "title": "" }, { "docid": "4bec475d21cacec4873e108a103c1087", "score": "0.5272369", "text": "protected function dispatch( Request $request ) : void\n {\n $message = $this->messageFactory->make( $request );\n\n if( $message->ack() )\n {\n $this->send( $message->ack(), $message->request()->host(), $message->request()->port() );\n }\n\n $this->messageDispatcher->dispatch( $message );\n }", "title": "" }, { "docid": "2f60d555e4f98aa66036003bc34749f0", "score": "0.52579033", "text": "public function consume($message);", "title": "" }, { "docid": "98bc616c8d0535876d1c0b252c4c95f9", "score": "0.5239912", "text": "public function receiverMail()\n {\n\n $connection = new AMQPStreamConnection($receivemail->localhost,$receivemail->port,$receivemail->username,$receivemail->password);\n $channel = $connection->channel();\n\n $channel->queue_declare('fundoo', false, false, false, false);\n\n // echo \"\\nReceiving the Message ....\\n\";\n\n // echo \"[*] Waiting for messages. To exit press CTRL+C\\n\";\n\n $callback = function ($msg) {\n\n // echo \" * Message received\", \"\\n\";\n $data = json_decode($msg->body, true);\n\n $from = $data['from'];\n $from_email = $data['from_email'];\n $to_email = $data['to_email'];\n $subject = $data['subject'];\n $message = $data['message'];\n\n /**\n * Create the Transport\n */\n $transport = (new Swift_SmtpTransport('smtp.gmail.com', 587, 'tls'))\n ->setUsername($receivemail->email)\n ->setPassword($receivemail->emailPass);\n /**\n * Create the Mailer using your created Transport\n */\n $mailer = new Swift_Mailer($transport);\n\n /**\n * Create a message\n */\n $message = (new Swift_Message($subject))\n ->setFrom([$data['from'] => $receivemail->from])\n ->setTo([$to_email])\n ->setBody($message);\n /**\n * Send the message\n */\n $result = $mailer->send($message);\n\n $msg->delivery_info['channel']->basic_ack($msg->delivery_info['delivery_tag']);\n };\n\n $channel->basic_qos(null, 1, null);\n $channel->basic_consume('fundoo', '', false, false, false, false, $callback);\n\n while(count[$channel->callbacks]){\n $channel->wait();\n }\n \n\n }", "title": "" }, { "docid": "172f8465617d60caf68330709db83bcd", "score": "0.5227489", "text": "public function run ( ) {\n\n $server = new \\Hoa\\Socket\\Server($this->_socket);\n $server->connectAndWait();\n\n \\Hoa\\Zombie::fork();\n\n $_eom = pack('C', 0);\n\n while(true) foreach($server->select() as $node) {\n\n $request = unpack('nr', $server->read(2));\n $length = unpack('Nl', $server->read(4));\n $message = unserialize($server->read($length['l']));\n $eom = unpack('Ce', $server->read(1));\n\n if($eom['e'] != $_eom) {\n\n $server->disconnect();\n\n continue;\n }\n\n switch($request['r']) {\n\n case self::TYPE_MESSAGE:\n $this->_on->fire('message', new \\Hoa\\Core\\Event\\Bucket(\n $message\n ));\n ++$this->_messages;\n $this->_lastMessage = time();\n break;\n\n case self::TYPE_STOP:\n if($this->_password === $message) {\n\n $server->disconnect();\n\n break 3;\n }\n break;\n\n case self::TYPE_INFORMATIONS:\n $message = array(\n 'id' => $this->_wid,\n 'socket' => $this->_socket,\n 'start' => $this->_startTime,\n 'pid' => getmypid(),\n 'memory' => memory_get_usage(true),\n 'memory_allocated' => memory_get_usage(),\n 'memory_peak' => memory_get_peak_usage(true),\n 'memory_allocated_peak' => memory_get_usage(),\n 'messages' => $this->_messages,\n 'last_message' => $this->_lastMessage,\n 'filename' => $_SERVER['SCRIPT_FILENAME']\n );\n $server->writeAll(self::pack(self::TYPE_MESSAGE, $message));\n break;\n }\n\n $server->disconnect();\n }\n\n $server->disconnect();\n\n if(null !== $this->_wid)\n \\Hoa\\Worker\\Run::unregister($this->_wid);\n\n return;\n }", "title": "" }, { "docid": "32555abebee1a82c2f216a5669a8047e", "score": "0.52270395", "text": "function perform() {\n\t\tswitch ($this->env['action']) {\n\t\t\t\t// check if room is full\n\t\t\tcase 'checkfull': \n\t\t\t\treturn $this->checkFull();\n\t\t\t\t// get messages\n\t\t\tcase 'gm':\n\t\t\t\treturn $this->getMessages($this->env['lastid']);\n\t\t\tbreak;\n\t\t\t\t// send message\n\t\t\tcase 'sm':\n\t\t\t\treturn $this->putMessage($this->env['msg'],$this->env['lastid']);\n\t\t\tbreak;\t\n\t\t\t\t// get userlist\n\t\t\tcase 'gu':\n\t\t\t\treturn $this->getUserlist();\n\t\t\tbreak;\n\t\t\t\t// unhide message\n\t\t\tcase 'commit':\n\t\t\t\treturn $this->commitMessage($this->env['uid']);\n\t\t\tbreak;\n\t\t}\n\t\t\t\t\n\t}", "title": "" }, { "docid": "bb77a03f170101f78da3596d4cb93d09", "score": "0.5213821", "text": "public function testPostMessagesReceive()\n {\n }", "title": "" }, { "docid": "1ee4acb9a6321b4ee8a3691bb968e959", "score": "0.51808876", "text": "public function invoke()\n {\n $method = new \\ReflectionMethod($this->object, $this->getMethodName());\n $method->invoke($this->object, $this->message);\n }", "title": "" }, { "docid": "f9eca2872caef1cffff49924244d82ad", "score": "0.5176494", "text": "function onMessage(ConnectionInterface $from, $msg)\n {\n $json = json_decode($msg, true);\n\n if(isset($json['action'])) {\n $action = explode(\"/\", $json['action']['name']);\n $param = isset($json['action']['param'])? $json['action']['param']: null;\n $res = GeneralHelper::curl_post(\n GeneralHelper::host_url().\"/api.php?\".http_build_query(array('ctl'=> $action[0], 'method'=> $action[1])),\n $param\n );\n $from->send(json_encode(array('action'=> array('name'=> $json['action']['name'], 'data'=> $res))));\n unset($res);\n }\n if(isset($json['subscribe'])){\n foreach($json['subscribe'] as $value){\n $this->getSubscribe($value)->attach($from);\n\n echo \"subscribe \".$value.\"\\n\";\n flush();\n }\n }\n if(isset($json['publish'])){\n $subs = $this->getSubscribe($json['publish']['name']);\n $subs->rewind();\n while($subs->valid()) {\n $sub = $subs->current();\n $sub->send(json_encode(array(\n \"publish\"=> array(\n \"name\"=> $json['publish']['name'],\n \"data\"=> $json['publish']['data']\n )\n )));\n\n echo \"publish \".$json['publish']['name'].\"\\n\";\n flush();\n\n $subs->next();\n }\n }\n\n echo memory_get_usage().','.memory_get_usage(true).\"\\n\";\n }", "title": "" }, { "docid": "bf6eb9b0ba5eead33415ceb5bc383d5f", "score": "0.5156314", "text": "private function _read()\n {\n //listen & callback\n if (in_array($this->_command, ['SUBSCRIBE', 'PSUBSCRIBE']))\n {\n while (!feof($this->_socket))\n {\n call_user_func($this->_callback, $this->_parseResult());\n }\n }\n return $this->_parseResult();\n }", "title": "" }, { "docid": "f09d09c3d8fd2aa6f3ab301f13085af0", "score": "0.51548576", "text": "private function processQueue(): void\n {\n while ($resumeMessage = array_shift($this->queue)) {\n $resumeMessage();\n }\n }", "title": "" }, { "docid": "d95ad8fdede5b1e70ac46843e5e4af70", "score": "0.51482195", "text": "public function dispatch();", "title": "" }, { "docid": "d95ad8fdede5b1e70ac46843e5e4af70", "score": "0.51482195", "text": "public function dispatch();", "title": "" }, { "docid": "73617b9bbaf4eede634823ef091cb1a3", "score": "0.5144882", "text": "private function onData()\n {\n $tmp = $this->buffer;\n $parser = new Parser(new Buffer($tmp));\n\n try {\n while ($message = $this->msgs->parse($parser)) {\n $tmp = $parser->getBuffer()->slice($parser->getPosition())->getBinary();\n $command = $message->getCommand();\n if ($this->exchangedVersion || ($command == 'version' || $command == 'verack')) {\n $this->emit('msg', [$this, $message]);\n }\n }\n } catch (\\Exception $e) {\n $this->buffer = $tmp;\n // Do nothing - it was probably a fragmented message\n }\n }", "title": "" }, { "docid": "e3ec058e1f060e07d05d73035fa34c6c", "score": "0.5143281", "text": "public function receive($request);", "title": "" }, { "docid": "1a68e842b1a927e184b2617c865ea921", "score": "0.51405716", "text": "public function process()\n {\n foreach ($this->registry as $key => $item) {\n switch ($item->status()) {\n // The QueueItem has not run\n case 0:\n $item->run();\n break;\n\n // The QueueItem has run, but not completed\n case 1:\n if ($item->check()) {\n $item->callback($this);\n }\n break;\n\n // If the item has completed, remove it\n case 2:\n unset($this->registry[$key]);\n }\n }\n }", "title": "" }, { "docid": "59473f79efae6af9ea0a6547a600efe1", "score": "0.5137359", "text": "function tendQueue() {\n\t\t$msg_to_deliver = $this->listPendingDeliveries();\n\t\t// If we have any\n\t\tif (count($msg_to_deliver)) {\n\t\t\t// Fetch the data about the messages\n\t\t\t$messages = $this->listMessages(array_keys($msg_to_deliver));\n\t\t\t// And figure out how to deliver them\n\t\t\tforeach($msg_to_deliver as $message_id => $deliveries) {\n\t\t\t\tforeach($delivereis as $delivery_style => $users) {\n\t\t\t\t\t$func = $this->mTransports[$delivery_style]['send_function'];\n\t\t\t\t\tif( function_exists($func) ) {\n\t\t\t\t\t\t$func($event, $users);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbit_error_log( tra( \"Package registered a non-existant function listener:\" ).\" \".$this->mTransports[$delivery_style]['send_function'].\" => $func\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "dd2eae382dad5f05fc12314f8acf982a", "score": "0.51095265", "text": "public function handle()\n {\n // $this -> producer();\n $this -> consumer();\n }", "title": "" }, { "docid": "d9e3ffdd073a9b521693e98dafa50ff0", "score": "0.5104705", "text": "public function dispatch($message): void\n {\n $this->logger->debug(\"Dispatching message\",\n [\n 'message class' => get_class($message),\n 'listeners' => $this->listeners\n ]);\n\n foreach ($this->listeners as $listener) {\n foreach ($listener->getObservables() as $observableClassName) {\n $this->checkTypeAndNotify($listener, $message, $observableClassName);\n }\n }\n }", "title": "" }, { "docid": "2b626f2b56517bb818e67cc41d5734c5", "score": "0.5102194", "text": "public function handle()\n {\n// dispatch(new Crawler\\Douban\\Topic(105928969));\n dispatch(new Crawler\\Douban\\Group(510760));\n }", "title": "" }, { "docid": "7e0f1ce42f9e796c5fba67fe2024c46a", "score": "0.5095277", "text": "public function receive()\n {\n try {\n // Get from SNS notification.\n $message = Message::fromRawPostData();\n\n // Check from SNS notification.\n if (! (new MessageValidator())->isValid($message)) {\n throw new \\Exception('Error: Failed MessageValidator::isValid()');\n }\n\n if (! empty($message['SubscribeURL'])) {\n $this->BounceLogs->SubscriptionEndPoint($message);\n } else {\n $this->BounceLogs->store($message);\n }\n } catch (\\Exception $e) {\n $this->log($e->getMessage());\n }\n\n return null;\n }", "title": "" }, { "docid": "ddb0ba697f73d98e826a5bac5e818390", "score": "0.5093117", "text": "function Receive()\n\t{\n\t\t$this->packetReply = null;\n\t\t$buffer = null;\n\n\n\t\twhile (($this->status == 0) && $buffer = socket_read($this->socket, 2048)) {\n\n\t\t\tif($this->socket === null){\n\t\t\t\techo \"[AuthClient] Socket Null!!\". PHP_EOL;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$this->totalReceive += 1;\n\n\t\t\tLogger::DarkYellow(\"---- Packet Receive [\".$this->totalReceive.\"] -----\");\n\n\t\t\t$this->read($buffer);\n\t\t\t$this->readBytes->reset();\n\n\t\t\t// Se houver resposta, sai do loop\n\t\t\tif ($this->packetReply !== null) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\t}", "title": "" }, { "docid": "19e0191e0540569a644c98b524b3d21e", "score": "0.5087382", "text": "function process($user,$msg){\n /* Basic usage is to echo incoming messages back to client */\n $this->send($user->socket,$msg);\n }", "title": "" }, { "docid": "0dc8687c53bc4d3c390f8fb6016e7a0d", "score": "0.5075248", "text": "public function run()\n {\n $params = array(\n 'routes' => $this->routes,\n 'request' => $this->request\n );\n $response = new Response($params);\n $response->deliverResponse($this);\n }", "title": "" }, { "docid": "3cd9c3b5fb80e9da5a3f2bdc4b553585", "score": "0.507468", "text": "function handleMessage(BinaryBuffer $buffer, MessageInterface $message): void {\n try {\n $buffer2 = $message->parseMessage($buffer);\n if(!$buffer2) {\n return;\n }\n \n if($this->currentCommand !== null) {\n if(\n ($message instanceof OkResponseMessage || $message instanceof EOFMessage)\n && $this->currentCommand->hasFinished()\n ) {\n $command = $this->currentCommand;\n $this->currentCommand = null;\n \n $command->onComplete();\n } /** @noinspection NotOptimalIfConditionsInspection */\n elseif($message instanceof ErrResponseMessage) {\n $error = new Exception($message->errorMessage, $message->errorCode);\n \n $command = $this->currentCommand;\n $this->currentCommand = null;\n \n $command->onError($error);\n } else {\n $command = $this->currentCommand;\n $command->onNext($message);\n \n if($command->hasFinished()) {\n if($this->currentCommand === $command) {\n $this->currentCommand = null;\n }\n \n $command->onComplete();\n }\n }\n } elseif($message instanceof ErrResponseMessage) {\n $error = new Exception($message->errorMessage, $message->errorCode);\n $this->emit('error', array($error));\n }\n \n $this->emit('message', array($message));\n } catch (ParseException $e) {\n $state = $e->getState();\n if($state !== null) {\n $this->state = $state;\n }\n \n $buffer2 = $e->getBuffer();\n if($buffer2 !== null) {\n $this->buffer->clear();\n $this->buffer->append($buffer2);\n }\n \n if($this->currentCommand !== null) {\n $this->currentCommand->onError($e);\n }\n \n $this->emit('error', array($e));\n $this->connection->close();\n } /** @noinspection PhpRedundantCatchClauseInspection */\n catch (Exception $e) {\n if($this->currentCommand !== null) {\n $command = $this->currentCommand;\n $this->currentCommand = null;\n \n $command->onError($e);\n } else {\n $this->emit('error', array($e));\n }\n }\n \n if($this->buffer->getSize() > 0) {\n $this->driver->getLoop()->futureTick(\n function () {\n $this->processBuffer();\n }\n );\n }\n }", "title": "" }, { "docid": "7d46baf70991300743ab1be5b30b9b1c", "score": "0.5034458", "text": "public function handle()\n {\n $this->rpc_server = new RpcServer();\n $this->rpc_server->handle($this->queue, $this->exchange, [new RpcConsumer(), 'processMessage']);\n }", "title": "" }, { "docid": "f1f6023df498f1e6ade71a029f6355c3", "score": "0.50166243", "text": "protected function dispatch(string $channel, $msg)\n {\n\n //--------------------------------------------\n // OPEN SYSTEM\n //--------------------------------------------\n\n $channelFile = $this->container->getApplicationDir() . \"/config/open/Ling.Light_Logger/channels/$channel.byml\";\n\n if (true === file_exists($channelFile)) {\n\n\n $o = new HotServiceResolver();\n $o->setCustomResolveNotationCallback(function ($value, &$isCustomNotation = false) {\n if (is_string($value)) { // value could be anything\n if ('@container()' === $value) {\n $isCustomNotation = true;\n return $this->container;\n } elseif (\n 0 === strpos($value, '@s')\n && preg_match('!@service\\(([a-zA-Z._0-9]*)\\)!', $value, $match)\n ) {\n $isCustomNotation = true;\n $service = $match[1];\n return $this->container->get($service);\n }\n }\n\n return null;\n });\n\n $arr = BabyYamlUtil::readFile($channelFile);\n\n\n // replacing ${app_dir} manually\n $appDir = $this->container->getApplicationDir();\n array_walk_recursive($arr, function (&$v) use ($appDir) {\n if (true === is_string($v)) {\n $v = str_replace('${app_dir}', $appDir, $v);\n\n }\n });\n\n\n foreach ($arr as $planetDotName => $entries) {\n foreach ($entries as $instanceId => $sicBlock) {\n if (true === array_key_exists($instanceId, $this->openListeners)) {\n $listener = $this->openListeners[$instanceId];\n } else {\n $listener = $o->getService($sicBlock);\n $listener = [$listener, \"listen\"];\n $this->openListeners[$instanceId] = $listener;\n }\n call_user_func($listener, $msg, $channel);\n }\n }\n }\n\n\n //--------------------------------------------\n // CLOSE SYSTEM\n //--------------------------------------------\n if (array_key_exists($channel, $this->listeners)) {\n $listeners = $this->listeners[$channel];\n foreach ($listeners as $listener) {\n call_user_func($listener, $msg, $channel);\n }\n }\n\n // handling the * symbol\n foreach ($this->listeners as $chan => $listeners) {\n if (0 === strpos($chan, '*')) {\n if (\"*\" !== $chan) {\n list($asterisk, $sMinus) = explode('-', $chan, 2);\n $minus = explode(\",\", $sMinus);\n if (in_array($chan, $minus, true)) {\n continue;\n }\n }\n\n foreach ($listeners as $listener) {\n call_user_func($listener, $msg, $channel);\n }\n }\n }\n }", "title": "" }, { "docid": "1e1cdbf1016a022963bb97b55cdc512c", "score": "0.5010627", "text": "protected function processCommandQueue()\n {\n while (!empty($this->commandQueue)) {\n\n $command = array_shift($this->commandQueue);\n\n //command extension API\n $acceptedExtensions = $command->getAcceptedExtensions();\n if (!empty($acceptedExtensions)) {\n foreach($acceptedExtensions as $extension) {\n if ($this->canUseExtension($extension))\n $command->processExtension($this, $extension);\n }\n }\n\n $data = $command->execute();\n\n //the return values of the command\n if (is_array($data)) {\n foreach ($data as $key => $value) {\n $this->data[$key] = $value;\n $this->responseDataCallback($key);\n }\n }\n\n }\n }", "title": "" }, { "docid": "1dadd36538c287a132ee4b0542287f32", "score": "0.5008231", "text": "public function dispatch()\n {\n $this->router->dispatch();\n }", "title": "" }, { "docid": "bee537fc66ffdba34640e608fe31e935", "score": "0.50031793", "text": "public function consume();", "title": "" }, { "docid": "bee537fc66ffdba34640e608fe31e935", "score": "0.50031793", "text": "public function consume();", "title": "" }, { "docid": "bee537fc66ffdba34640e608fe31e935", "score": "0.50031793", "text": "public function consume();", "title": "" }, { "docid": "fc96981a3a4f0d11fc7d15e93ddcec99", "score": "0.50015867", "text": "public function processQueue()\n {\n $model = new QueueProcessor($this);\n $model->run();\n }", "title": "" }, { "docid": "e3a46cacc8663ec14b6bc27fcb1ef67c", "score": "0.4997026", "text": "public function sendMessage(){\n\n\t\t$messages = ScheduledMessage::where('status', '=', 0);\n\n\t\tforeach ($messages as $message) {\n\t //We use curl to send the requests\n\t $httpCurl = curl_init();\n\n\t $defaults = [\n\t CURLOPT_URL => $message->destination_uri,\n\t CURLOPT_POST => true,\n\t CURLINFO_HEADER_OUT => true,\n\t CURLOPT_POSTFIELDS => $message->payload,\n\t CURLOPT_RETURNTRANSFER => true,\n\t CURLOPT_SSL_VERIFYPEER => false,\n\t CURLOPT_SSL_VERIFYHOST => 0,\n\t CURLOPT_HTTPHEADER => ['Content-Type: application/json', 'Content-Length: ' . strlen($message->payload)],\n\t ];\n\t curl_setopt_array($httpCurl, $defaults);\n\n\t $response = curl_exec($httpCurl);\n\n $message->ack_message = $response;\n $message->status = 2; // success\n $message->save();\n Log::info(\"Response received from external system: $response for ScheduledMessage {$message->id}\");\n\n\t curl_close($httpCurl);\n\t }\n\t}", "title": "" }, { "docid": "1e7dcbc3577572b68887f4d915460830", "score": "0.49919328", "text": "protected function sender()\n\t{\n\t\t$this->inputQueue = msg_get_queue(self::MSG_QUEUE_KEY);\n\n\t\tfor ($i=0; $i<sizeof($this->taskList); $i++) {\n\n\t\t\tif ($this->groupTasks == true) {\n\t\t\t\t\n\t\t\t\tfor ($j=0; $j<sizeof($this->taskList[$i]); $j++) {\n\n\t\t\t\t\t$this->sendTask($this->taskList[$i][$j], $j, $i+1);\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t$this->sendTask($this->taskList[$i], $i);\n\t\t\t}\n\t\t}\n\n\t\texit(0);\n\t}", "title": "" }, { "docid": "28a34ced1da7af829b54f84aacf4b7a7", "score": "0.49917182", "text": "protected function dispatchEmail()\n {\n foreach ($this->recipients as $to) {\n $this->message->setTo($to);\n $this->mailer->send($this->message);\n }\n }", "title": "" }, { "docid": "e42e20a4a4ecc7a0de20273f49b605b9", "score": "0.49883303", "text": "public function process()\n {\n \n $middleware = new Middleware($this->middleWares, new RequestHandler());\n $response = $middleware->process($this->serverRequest, new RequestHandler());\n\n echo $response->messageBody;\n }", "title": "" }, { "docid": "91c6cda605ab87900fde7b127450853e", "score": "0.49800986", "text": "public function testDispatchJobToMultipleChannels()\n {\n $this->dispatcher->registerChannels('second', 'third');\n\n $job = new Inc(['number' => 123]);\n\n $this->dispatcher->dispatch($job, QueueInterface::MAIN_CHANNEL);\n $this->dispatcher->dispatch($job, 'second');\n $this->dispatcher->dispatch($job, 'third');\n\n $this->assertEquals(3, $this->dispatcher->getQueue()->count());\n $this->assertEquals(1, $this->dispatcher->getQueue()->countByChannel(QueueInterface::MAIN_CHANNEL));\n $this->assertEquals(1, $this->dispatcher->getQueue()->countByChannel('second'));\n $this->assertEquals(1, $this->dispatcher->getQueue()->countByChannel('third'));\n }", "title": "" }, { "docid": "d500b6c341e94d5276db40506ed98290", "score": "0.49797368", "text": "public function receiveMessage($msg)\n\t{\n\t\t$this->message = $msg.PHP_EOL;\n\t\treturn $this->parseMessage();\n\t}", "title": "" }, { "docid": "d046ebad83cde6d4a33003d6eda43939", "score": "0.4976213", "text": "private function sms_receiver() {\n\t\t$this->use_layout = false;\n\t\t$requesting_channel = $this->next_request_segment_value();\n\t\theader('Content-type: text/plain',true);\n\t\tENV::$log->debug('$_REQUEST'.print_r($_REQUEST,1));\n\t\t$sms_channel = Util_VendorFactory::get_instance('extapi/channel/'.$requesting_channel, $this->router);\n\t\tif ($sms_channel && $sms_channel->have_required_request_params() && $sms_channel->authenticate_request()) {\n\t\t\tENV::load_vendor_file('Extapi/Service/Tmet');\n\t\t\t$tmet_service = new Extapi_Service_Tmet($sms_channel);\n\t\t\t$tmet_service->parse_request_statement();\n\t\t\t$tmet_service->act_on_request_statement();\t\t\t\n\t\t\tif ($tmet_service->has_feedback()) {\n\t\t\t\t$arrivals = $tmet_service->gather_feedback();\n\t\t\t\t$this->payload->arrivals = array_get_else($arrivals,'arrivals');\n\t\t\t\t$this->payload->transit_stop = array_get_else($arrivals,'transit_stop');\n\t\t\t\t$this->payload->query_time = array_get_else($arrivals,'query_time');\n\t\t\t} else {\n\t\t\t\t$this->viewless();\n\t\t\t}\n\t\t} else {\n\t\t\tif (! $sms_channel) {\n\t\t\t\tENV::$log->error(__METHOD__.' Util_VendorFactory::get_instance failed for [extapi/channel/'.$requesting_channel.']');\n\t\t\t} else {\n\t\t\t\tENV::$log->notice(__METHOD__.' Required components were not found and/or authentcation failed for this request');\n\t\t\t}\n\t\t\t// don't respond to these requests.\n\t\t\t$this->viewless();\n\t\t}\n\t}", "title": "" }, { "docid": "5618ad2c47ddd490d5605260a357ceb0", "score": "0.49751762", "text": "public function run()\n {\n foreach ($this->queueProcessors as $queueProcessor) {\n $queueProcessor->process();\n }\n }", "title": "" }, { "docid": "9fcdbc0b23bb0f3a28bda369bff8c313", "score": "0.4968469", "text": "public function handle()\n {\n $conn = new AMQPConnection(env('RABBITMQ_HOST'), env('RABBITMQ_PORT'), env('RABBITMQ_LOGIN'), env('RABBITMQ_PASSWORD'), env('RABBITMQ_MESSAGE_VHOST'));\n $channel = $conn->channel();\n\n //交换机\n $channel -> exchange_declare('message_exchenge', 'fanout', false, true, false);\n //声明queue\n $channel -> queue_declare('message_queue', false, true, false, false);\n $channel->queue_bind('message_queue', 'message_exchenge');\n $tag = time().'comsumer';\n\n $this->line('[*] Waiting for messages. To exit press CTRL+C');\n\n $callback = function ($msg) {\n\n //内容\n $ms = json_decode($msg->body, true);\n extract($ms);\n $status = 2;\n\n $emailInfo = DB::table('email_info')\n ->where('email', $sendid)\n ->where('is_delete',0)\n ->first();\n\n if (empty($emailInfo)) {\n $status = 4;\n } else {\n $mail = new \\PHPMailer;\n $mail->isSMTP();\n $mail->SMTPDebug = 2;\n $mail->Host = 'smtp-mail.outlook.com';\n $mail->Port = '587';\n $mail->SMTPAuth = true;\n $mail->Username = $emailInfo->email;\n $mail->Password = $emailInfo->password;\n //发件人\n $mail->setFrom($emailInfo->email, $emailInfo->account);\n //收件人\n $mail->addAddress($receiveid, ' ');\n //主题\n $mail->Subject = $subject;\n //内容\n $mail->Body = $msgbody;\n //嵌入html\n $mail->msgHTML(file_get_contents(storage_path().$replyhtml), storage_path().'/reply_html');\n\n if (!$mail->send()) {\n echo \"Mailer Error: \" . $mail->ErrorInfo;\n $status = 4;\n } else {\n echo \"Message sent!\";\n } \n } \n DB::table('message')\n ->where('id', $mid)\n ->update(['status' => $status]); \n //回馈\n $msg ->delivery_info['channel']->basic_ack($msg->delivery_info['delivery_tag']);\n };\n\n $channel->basic_consume('message_queue', $tag, false, false, false, false, $callback);\n while(count($channel->callbacks)){\n $channel->wait();\n }\n $channel->close();\n $connection->close();\n }", "title": "" }, { "docid": "991c6d73767708d08e621626fd7c01aa", "score": "0.49633038", "text": "protected function _dispatch () {\n $target = $_SERVER['PATH_INFO'];\n\n $routes = $this->_config['routes'];\n if (\\array_key_exists($target, $routes)) {\n $output = $this->_dispatcher->dispatch($target, $routes[$target], $this->_request);\n if (\\array_key_exists('__httpStatus', $output)) {\n HttpStatus::send($output['__httpStatus']);\n unset($output['__httpStatus']);\n }\n\n if (\\is_array($output)) {\n $this->_output = \\array_merge($this->_output, $output);\n }\n }\n // Unknown Method, Bail.\n else {\n HttpStatus::send(HttpStatus::HTTP_BAD_REQUEST);\n $this->_addErrors(array(self::E_UNKNOWN_METHOD => 'Unknown API Call'));\n }\n }", "title": "" }, { "docid": "daa071060e2dd66532609d6bcf443bd9", "score": "0.49498034", "text": "public function postDispatch()\r\n {\r\n $this->_messages->display($this->view);\r\n }", "title": "" }, { "docid": "77da03da1ae758ec088d34bcac8e0a72", "score": "0.49492356", "text": "public function getMsgHandles() : void\n {\n $refl = new ReflectionClass('Msg');\n $data = $refl->getConstants();\n echo json_encode($data);\n }", "title": "" }, { "docid": "309137162deb31368b269bd51a6f432c", "score": "0.49414408", "text": "public function Dispatch ();", "title": "" }, { "docid": "0bb153a74cad012aa76d3c49a5f2c791", "score": "0.49412528", "text": "public function onPrivmsg()\n {\n $this->handleDelivery();\n }", "title": "" }, { "docid": "b27a183aac937068343b19ad0d491757", "score": "0.49392703", "text": "public function dispatchToQueue($command);", "title": "" }, { "docid": "f52d83061557662e42e844ba24b9bce8", "score": "0.49344555", "text": "public function dispatch(RoomMessage $event)\n {\n $command = new CommandParser($this->config['command'], $event->item->message->message);\n $commands = $this->getRegisteredCommands(true);\n\n if (array_key_exists($command->getCommand(), $commands)) {\n $commands[$command->getCommand()]->trigger($command, $event);\n } else {\n $this->showHelp($event->item->room->id);\n }\n }", "title": "" }, { "docid": "e802ffb9f0f4923d8558feca88c7f3af", "score": "0.49331346", "text": "public function dispatch() {\n\t\tif (\n\t\t\t( defined( 'TRIBE_NO_ASYNC' ) && true === TRIBE_NO_ASYNC )\n\t\t\t|| true == getenv( 'TRIBE_NO_ASYNC' )\n\t\t) {\n\t\t\treturn $this->sync_handle( $this->data );\n\t\t}\n\n\t\treturn parent::dispatch();\n\t}", "title": "" }, { "docid": "2443b11a2406d22d0116e5a604778147", "score": "0.4932514", "text": "private function initMessageQueue()\n {\n $this->messageType = $this->getMessageType();\n $this->queue->init();\n }", "title": "" }, { "docid": "ed29be06b026c4aefb3956036dcfa8e4", "score": "0.49302477", "text": "public function run()\n {\n app(OrderDeliveryServer::class)->handle();\n }", "title": "" }, { "docid": "941862284a4c4694e570891aed32b6b2", "score": "0.49302456", "text": "public function receivePayment()\n\t{\n\t\t$this->processPreHooks ($_POST);\n\t\t$this->verifyInformation($_POST);\n\n\t\t$item = trim($_POST['item_number']);\n\n\t\tif ( isset($this->items[$item]) )\n\t\t\t$this->items[$item]($_POST);\n\t\telse\n\t\t\t$this->throwError('No Item Action');\n\n\t\t$this->processPostHooks($_POST);\n\t}", "title": "" }, { "docid": "ffb507e4b0330eab2eab073e3783fbc1", "score": "0.49298233", "text": "public function handle()\n {\n $messages = Message::query()->where('has_read', 0)->groupBy('receiver_user_id')->get();\n foreach ($messages as $message){\n Notification::route('mail', $message->user->email)->notify(new MessageUpdateNotification($message->user));\n }\n\n }", "title": "" }, { "docid": "9e965c3d108172a5255f091942a38a7e", "score": "0.4925204", "text": "public function send(){\n foreach ($this->messages as $message) {\n /* @var $message Message */\n $this->sender->addMsg(\n $message->msisdn,\n $message->content,\n $message->sessionId,\n $message->time\n );\n }\n $this->sender->sendMsg();\n }", "title": "" }, { "docid": "d71cde87760e67fb1ee16329768d1b8f", "score": "0.49143067", "text": "public function work(Message $message)\n {\n while ($event = $this->recorder->shift()) {\n $this->eventBus->dispatch($event);\n }\n }", "title": "" }, { "docid": "a2e0678329eb9ed03d4c37d5ccf67b36", "score": "0.49092552", "text": "public function handle()\n {\n Redis::psubscribe(['heartbeats.*'],function($message, $channel) {\n echo $channel . \" \" . $message . \"\\n\";\n return $this->route($message,$channel);\n });\n }", "title": "" }, { "docid": "486746c39ee98d0051d07638b88e7bcb", "score": "0.49043727", "text": "public function onWorkerMessage(MessageInterface $msg)\n {\n if ($msg instanceof Protocol\\ActionListRequest) {\n $this->getLogger()->debug('[SERVICE] Returning list of actions.');\n $this->stream->send(new Protocol\\ActionListResponse($this->getActionList()));\n\n return;\n }\n\n if ($msg instanceof Protocol\\ExecuteJobRequest) {\n $requestId = $msg->getRequestId();\n $action = $msg->getAction();\n\n $this->getLogger()->debug('[SERVICE] Job for action: '.$action.' with id: '.$requestId);\n\n $params = array();\n $serialized = $msg->getParams();\n foreach ($serialized as $param) {\n $params[] = $this->getSerializer()->unserialize($param);\n }\n\n if (!isset($this->actions[$action])) {\n $this->getLogger()->notice('[SERVICE] Action '.$action.' not found.');\n $this->stream->send(new Protocol\\ActionNotFound($requestId, $action));\n\n return;\n }\n\n $return = $this->execute($action, $params);\n $sendReturn = $this->getSerializer()->serialize($return);\n\n $this->stream->send(new Protocol\\ExecuteJobResponse($requestId, $sendReturn));\n\n return;\n }\n\n throw new RuntimeException('Invalid request.');\n }", "title": "" }, { "docid": "c26a7c792553a9fddb215227167bbdb7", "score": "0.4892435", "text": "public function run() {\n\t\t// starting the router request matching\n\t\t$router = self::get('router');\n\t\t$request = self::get('request');\n\t\t$router->route($request->data);\n\t}", "title": "" }, { "docid": "6f84cec6a8048f5ea5eb8c6e466f19c2", "score": "0.48914212", "text": "public function run()\n {\n /** @codeCoverageIgnoreStart */\n $this->run = true;\n\n while ($this->run) {\n $this->processNext($this->dispatcher);\n \n usleep(50000);\n }\n /** @codeCoverageIgnoreEnd */\n }", "title": "" }, { "docid": "c63504d4c01b191497179c86917cae89", "score": "0.48785952", "text": "public function listenToEvents()\n\t{\n\t\t$this->queue->createPayloadUsing(function ($connection, $queue, $payload) {\n\t\t\t$this->registerJob([\n\t\t\t\t'id' => $id = (new Request)->id,\n\t\t\t\t'connection' => $connection,\n\t\t\t\t'queue' => $queue,\n\t\t\t\t'name' => $payload['displayName'],\n\t\t\t\t'data' => isset($payload['data']['command']) ? $payload['data']['command'] : null,\n\t\t\t\t'maxTries' => $payload['maxTries'],\n\t\t\t\t'timeout' => $payload['timeout'],\n\t\t\t\t'time' => microtime(true)\n\t\t\t]);\n\n\t\t\treturn [ 'clockwork_id' => $id, 'clockwork_parent_id' => $this->currentRequestId ];\n\t\t});\n\t}", "title": "" }, { "docid": "ec1232e6c573dd232749de3254be7585", "score": "0.48764056", "text": "public function __invoke(EventMessage $eventMessage): void\n {\n $this->eventDispatcher->dispatch($eventMessage);\n }", "title": "" }, { "docid": "067890314158c4a8db3cfb4de6873321", "score": "0.48630315", "text": "private function onMessage(Message $message)\n {\n if ($message->author->id == $this->id) {\n return;\n }\n\n $this->info(\"MSG {$message->author->username}: {$message->content}\");\n\n if (substr($message->content, 0, strlen($this->commandClientOptions['prefix'])) == $this->commandClientOptions['prefix']) {\n $withoutPrefix = substr($message->content, strlen($this->commandClientOptions['prefix']));\n $parts = preg_split('/ /', $withoutPrefix, 2);\n $command = count($parts) ? $parts[0] : \"\";\n\n if (array_key_exists($command, $this->commands)) {\n $command = $this->commands[$command];\n } elseif (array_key_exists($command, $this->aliases)) {\n $command = $this->commands[$this->aliases[$command]];\n } else {\n // Command doesn't exist.\n $this->info(\"Received {$command} but is not registered. Ignoring.\");\n return;\n }\n\n // command is registered and we're good to go. do a pre-command check and dispatch it!\n $this->preReceiveCheck();\n $result = $command->receive($message, count($parts) > 1 ? $parts[1] : \"\");\n\n if (is_string($result)) {\n $message->reply($result);\n }\n }\n }", "title": "" }, { "docid": "3bc969d49ad8d619892a19d7888bf792", "score": "0.485836", "text": "private function handleRequest(){\n $routing = new Routing($this->app);\n $routing->initRequestRouting($this->app->getRequest());\n $this->app->setRouting($routing);\n $dispatcher = new Dispatcher($this->app);\n echo $dispatcher->handle($routing);\n }", "title": "" }, { "docid": "a922380a491e213279d3673377108d3d", "score": "0.48558837", "text": "public function postDispatch() {}", "title": "" }, { "docid": "c4b257a3a68d5d051b9bb6d55e965a1e", "score": "0.48487324", "text": "public function dispatch(SMSMessageInterface $sms)\n{ \n\n // Send it\n $msg = new event_message('core.notify.send_sms', $sms);\n $ok = msg::dispatch($msg)->get_response('core');\n\n // Return\n return $ok;\n\n}", "title": "" }, { "docid": "64c137fe2406a35395afe8d7334516ab", "score": "0.48392478", "text": "public function dispatch()\n {\n $this->getController()->dispatch();\n }", "title": "" }, { "docid": "33abdc6b1c7ab899d89d3d50e770a68d", "score": "0.48387015", "text": "public function run()\n {\n // Shuffle arrays\n $this->init();\n\n $messages = [];\n\n while ( count($this->facts) > 0 || count($this->riddles) > 0 || count($this->movies) > 0 || count($this->gifs) > 0 ) {\n // Add one fact\n if (($message = $this->getFact()) != null){\n $messages[] = $message;\n }\n // Add one riddle\n if (($message = $this->getRiddle()) != null){\n $messages[] = $message;\n }\n // Add one movie\n if (($message = $this->getMovie()) != null){\n $messages[] = $message;\n }\n // Add one gif\n if (($message = $this->getGif()) != null){\n $messages[] = $message;\n }\n }\n\n // Now save every message\n foreach ($messages as $message) {\n \\App\\Models\\MessageText::create([\n 'text' => $message\n ]);\n }\n }", "title": "" }, { "docid": "1a29a6de3d2fa35c935a3ddc2fc1f301", "score": "0.48336253", "text": "public function dispatch(Event $event)\n {\n switch($event->getCommand()) {\n\n case \"PING\":\n $this->onPing($event);\n break;\n\n case 376: // RPL_ENDOFMOTD\n case 422: // ERR_NOMOTD\n $this->onEndMotd($event);\n break;\n\n\n case \"PRIVMSG\":\n $this->onPrivMsg($event);\n break;\n }\n }", "title": "" }, { "docid": "05a1f8245bdf2c1a98435042cc2c1c38", "score": "0.48223677", "text": "public function receiveMms() {\n try {\n // check client IP address\n $this->checkRemoteAddress();\n\n // check request type\n if (self::getRequestType() != self::REQ_TYPE_MMS) {\n throw new GwServerException(null, \"Invalid MMS message request\");\n }\n\n // create MMS message\n $mmsMessage = new MmsMessage();\n\n // set MMS message sender\n $sender = $_REQUEST['source'];\n $mmsMessage->setSender($sender);\n\n // set MMS message operator\n $operator = $_REQUEST['operator'];\n $mmsMessage->setOperator($operator);\n\n // add MMS message recipient\n $recipient = $_REQUEST['dest'];\n $mmsMessage->addRecipient($recipient);\n\n // set MMS message keyword(s)\n $keywords = Utils::stripMagicQuotes($_REQUEST['keyword']);\n $mmsMessage->setKeywords($keywords);\n\n // set MMS message parameters\n $parameters = explode(\" \", Utils::stripMagicQuotes($_REQUEST['params']));\n $mmsMessage->setParameters($parameters);\n \n // set timestamp\n $timestamp = $_REQUEST['timestamp'];\n $mmsMessage->setTimestamp($timestamp);\n\n // set MMS message subject (optional)\n if (isset($_REQUEST['subject'])) {\n $subject = Utils::stripMagicQuotes($_REQUEST['subject']);\n $mmsMessage->setSubject($subject);\n }\n\n // read attached files and create MMS objects out of them\n $objects = MmsObjectUtils::readMmsObjectsFromRequest();\n\n // add created MMS objects to message\n foreach ($objects as $object) {\n // set first plain text object as message text\n if (is_null($mmsMessage->getText()) && strpos($object->getContentType(), \"text/plain\") !== false) {\n $mmsMessage->setText($object->getContent());\n }\n\n // add MMS object to MMS message\n $mmsMessage->addObject($object);\n }\n\n return $mmsMessage;\n } catch (GwServerException $e) {\n // respond with error response and rethrow the exception for user\n $this->respondError($e->getHttpStatusCode(), $e->getMessage());\n throw $e;\n }\n }", "title": "" }, { "docid": "9dae1e2f6f21de681034ae2ebd55e734", "score": "0.4816328", "text": "public function handle()\n {\n $lists = MailList::whereStatus(2)->get(); // get all messages that are ready to be sent\n\n foreach($lists as $list)\n {\n $messages = $list->messages()->readyToQueue()->get();\n\n foreach($messages as $message) {\n $message->mailList->queueMessages($message);\n $message->hasBeenQueued();\n $message->markAsReady();\n }\n\n }\n\n }", "title": "" }, { "docid": "d62a47198f964025f1c93fbbd57a1059", "score": "0.48161176", "text": "public function run()\n\t{\n\t\t$this->queue = new QueueModel($this->options);\n\t\t\n\t\topenlog('php-smpp',LOG_PID,LOG_USER);\n\n\t\twhile (true) {\n\t\t\t// commit suicide if the parent process no longer exists\n\t\t\tif (posix_getppid() == 1) exit();\n\t\t\t\n\t\t\t// Do the queue have any deferred messages for us?\n\t\t\t$deferred = $this->queue->lastDeferred(); /* @var $deferred SmsMessage */\n\t\t\tif (!$deferred) { // Idle\n\t\t\t\t$this->checkMemory();\n\t\t\t\tsleep(5);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// How long since last retry?\n\t\t\t$sinceLast = time()-$deferred->lastRetry;\n\t\t\t$timeToRetry = $this->options['queuemanager']['retry_interval']-$sinceLast;\n\t\t\t\n\t\t\t// More idleing required?\n\t\t\tif ($timeToRetry > 0) { \n\t\t\t\t$this->checkMemory();\n\t\t\t\tsleep(min(5,$timeToRetry)); // 5 seconds, or next retry interval, whichever comes first\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// Does the message still have retries left\n\t\t\tif ($deferred->retries <= $this->options['queuemanager']['retries']) { // Retry message delivery\n\t\t\t\t$this->queue->popLastDeferred();\n\t\t\t\t\n\t\t\t\t// Remove recipients that already got the message\n\t\t\t\t$msisdns = $this->queue->getMsisdnsForMessage($deferred->id);\n\t\t\t\tif (!empty($msisdns)) $deferred->recipients = array_diff($deferred->recipients,$msisdns);\n\t\t\t\tif (empty($deferred->recipients)) {\n\t\t\t\t\t$this->debug('Deferred message without valid recipients: '.$deferred->id);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Re-attempt delivery\n\t\t\t\t$this->debug('Retry delivery of failed message: '.$deferred->id.' retry #'.$deferred->retries);\n\t\t\t\t$this->queue->produce(array($deferred));\n\t\t\t\t\n\t\t\t} else { // remove it\n\t\t\t\tsyslog(LOG_WARNING,__FILE__.': Deferred message reached max retries, ID:'.$deferred->id);\n\t\t\t\t$this->debug('Deferred message reached max retries, ID:'.$deferred->id);\n\t\t\t\t$this->queue->popLastDeferred();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "1537e9d224419c6fd7826da31efbee3f", "score": "0.48081362", "text": "protected function setup()\n {\n $this->bus->handle(new GatherPaths());\n $this->bus->handle(new ExtractResources($this->getHelper('process')));\n }", "title": "" }, { "docid": "b923c74ec984d00e1139a20074283008", "score": "0.48060203", "text": "public function dispatch() {\n\t\t\t$params = $this->getParams() ;\n\t\t\t$controller = $this->getController($params) ;\n\t\t\t\n\t\t\t\r\n\t\t\t$this->_data = $controller->getData() ;\n\t\t\t$this->_view = $controller->getView() ;\n\t\t}", "title": "" }, { "docid": "77eb169727bbb649a2fbd9ec6230d095", "score": "0.48039773", "text": "public function eventReceivedCallback(AMQPMessage $msg) : void\n {\n $this->logger->info(\n 'EventConsumer - Event received.',\n [ 'raw_data' => $msg->getBody() ] + $msg->delivery_info + $msg->get_properties()\n );\n\n // Read the received event\n $metadata = $msg->delivery_info + $msg->get_properties();\n $event = $this->decodeEventData($msg->getBody(), $metadata);\n\n try {\n // Call the callback func to process the new event\n call_user_func($this->callback, $event);\n } catch (\\Exception $exc) {\n $this->logger->warning(\n 'EventConsumer - Error procesing an event: ' . get_class($exc) . ' - ' . $exc->getMessage()\n );\n $this->logger->debug($exc);\n\n // Requeue message for further action by sending NACK\n $this->sendNack($msg);\n return;\n }\n\n // Send ACK message to the queue\n $this->sendAck($msg);\n }", "title": "" }, { "docid": "b4179c6c468e84d3ae40f11d3ede7bd1", "score": "0.4798489", "text": "public function notify() {\n\t\t$this->dataHandler->handleIncomingData();\n\t}", "title": "" } ]
a2c9f86908b66f8175fe6467f0a5cdfd
Hotel Callout extension. Generated from protobuf field .google.ads.googleads.v13.common.HotelCalloutFeedItem hotel_callout_feed_item = 23;
[ { "docid": "14e9812adddf767fec9f723a74770e6a", "score": "0.8196581", "text": "public function setHotelCalloutFeedItem($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Ads\\GoogleAds\\V13\\Common\\HotelCalloutFeedItem::class);\n $this->writeOneof(23, $var);\n\n return $this;\n }", "title": "" } ]
[ { "docid": "f8f6cb9c9bbdb2f67ec2f71486454e77", "score": "0.8368601", "text": "public function getHotelCalloutFeedItem()\n {\n return $this->readOneof(23);\n }", "title": "" }, { "docid": "9009d9fd335d197fecf1a965719fb1aa", "score": "0.69786865", "text": "public function getCalloutFeedItem()\n {\n return $this->readOneof(9);\n }", "title": "" }, { "docid": "d89327b0d9a8a1db680efb51922e4db6", "score": "0.6523353", "text": "public function setCalloutFeedItem($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Ads\\GoogleAds\\V13\\Common\\CalloutFeedItem::class);\n $this->writeOneof(9, $var);\n\n return $this;\n }", "title": "" }, { "docid": "61afec8d4052d800707a23ec2ee69722", "score": "0.6201089", "text": "public function getAppFeedItem()\n {\n return $this->readOneof(7);\n }", "title": "" }, { "docid": "235076534929456f860c51b1d91671a6", "score": "0.5581913", "text": "public function getAffiliateLocationFeedItem()\n {\n return $this->readOneof(15);\n }", "title": "" }, { "docid": "159a195c601f616c5c09f55771f50654", "score": "0.55304724", "text": "public function getLocationFeedItem()\n {\n return $this->readOneof(14);\n }", "title": "" }, { "docid": "fefa279d40514cfd52d2ecf15796e0f6", "score": "0.5169169", "text": "public function getCallFeedItem()\n {\n return $this->readOneof(8);\n }", "title": "" }, { "docid": "3cf29915a22dae7a08d31548f15a9694", "score": "0.50752896", "text": "public function getImageFeedItem()\n {\n return $this->readOneof(31);\n }", "title": "" }, { "docid": "2e5e6b356c8a0fcda6a0f8cdff8a3bb3", "score": "0.50707465", "text": "public function setAffiliateLocationFeedItem($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Ads\\GoogleAds\\V13\\Common\\AffiliateLocationFeedItem::class);\n $this->writeOneof(15, $var);\n\n return $this;\n }", "title": "" }, { "docid": "e173707f92fce0d3d8e1aac517610eb0", "score": "0.5054502", "text": "public function getPromotionFeedItem()\n {\n return $this->readOneof(12);\n }", "title": "" }, { "docid": "8e3328bcff58f4cb1d60ae67bc4f4bf3", "score": "0.5010317", "text": "public function addToOtherHotel(\\Devlabs91\\GenericOtaHotelApiService\\StructType\\OtherHotel $item)\n {\n // validation for constraint: itemType\n if (!$item instanceof \\Devlabs91\\GenericOtaHotelApiService\\StructType\\OtherHotel) {\n throw new \\InvalidArgumentException(sprintf('The OtherHotel property can only contain items of \\Devlabs91\\GenericOtaHotelApiService\\StructType\\OtherHotel, \"%s\" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__);\n }\n $this->OtherHotel[] = $item;\n return $this;\n }", "title": "" }, { "docid": "6c7ab8a69c4f022072a9c886088f6f3a", "score": "0.498032", "text": "public function getFeedItem()\n {\n return $this->feed_item;\n }", "title": "" }, { "docid": "df30493504d6b57b2fa3fb62244ab8ec", "score": "0.49725857", "text": "public function getSitelinkFeedItem()\n {\n return $this->readOneof(2);\n }", "title": "" }, { "docid": "30b3798fa4bc5deb7182b9471bdb4764", "score": "0.495406", "text": "public function addIcsItem(&$cal, $item) {\n\t\t$body = $this->getItemDetail($item->ItemId->Id);\n\t\t$event = &$cal->newComponent('vevent');\n\t\t$event->setProperty('dtstart', array('timestamp' => strtotime($item->Start)));\n\t\t$event->setProperty('dtend', array('timestamp' => strtotime($item->End)));\n\t\t$event->setProperty('summary', $item->Subject);\n\t\t$event->setProperty('description', preg_replace(\"/[\\n\\r]/\",\"\", strip_tags($body->_)));\n\t}", "title": "" }, { "docid": "40633d2337555de1f1af3365f3857cad", "score": "0.48682484", "text": "public function setAppFeedItem($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Ads\\GoogleAds\\V13\\Common\\AppFeedItem::class);\n $this->writeOneof(7, $var);\n\n return $this;\n }", "title": "" }, { "docid": "bdf6495871bd7206f63521c6c608d82f", "score": "0.47784615", "text": "public function addToFoodAttribute($item)\n {\n // validation for constraint: enumeration\n if (!\\EnumType\\HotelReviewFoodAttribute::valueIsValid($item)) {\n throw new \\InvalidArgumentException(sprintf('Value \"%s\" is invalid, please use one of: %s', $item, implode(', ', \\EnumType\\HotelReviewFoodAttribute::getValidValues())), __LINE__);\n }\n $this->FoodAttribute[] = $item;\n return $this;\n }", "title": "" }, { "docid": "e81b43c00801242c4137297634c2c8dc", "score": "0.4772082", "text": "public function setHotelId($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Ads\\GoogleAds\\V2\\Common\\HotelIdInfo::class);\n $this->writeOneof(2, $var);\n\n return $this;\n }", "title": "" }, { "docid": "9b2517df5ee6f19e653422c1b03399a4", "score": "0.47269827", "text": "public function getHotelId()\n {\n return $this->readOneof(2);\n }", "title": "" }, { "docid": "db9122080069cbc2d9e77584eb835366", "score": "0.4688813", "text": "public function setLocationFeedItem($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Ads\\GoogleAds\\V13\\Common\\LocationFeedItem::class);\n $this->writeOneof(14, $var);\n\n return $this;\n }", "title": "" }, { "docid": "75869966939f1cf1b3050df7b44340c4", "score": "0.46504384", "text": "public function getHotelBooking()\n {\n return $this->HotelBooking;\n }", "title": "" }, { "docid": "11e2f71092ea81b8d9526c1d63705ab1", "score": "0.4617087", "text": "public function getHotelRef()\n {\n return $this->hotelRef;\n }", "title": "" }, { "docid": "37ff4c8fa2373c595df4dd19c85bb5f6", "score": "0.4535397", "text": "public function getExtensionFeedItemResult()\n {\n return $this->readOneof(36);\n }", "title": "" }, { "docid": "7c670c98a0dda76178a25945ecb5648f", "score": "0.4425102", "text": "public function getPriceFeedItem()\n {\n return $this->readOneof(11);\n }", "title": "" }, { "docid": "f1b8d15483f73cafd82bad1a7cd69237", "score": "0.4391493", "text": "public function addToExtraLocationInfo(\\Devlabs91\\GenericOtaHotelApiService\\StructType\\ExtraLocationInfo $item)\n {\n // validation for constraint: itemType\n if (!$item instanceof \\Devlabs91\\GenericOtaHotelApiService\\StructType\\ExtraLocationInfo) {\n throw new \\InvalidArgumentException(sprintf('The ExtraLocationInfo property can only contain items of \\Devlabs91\\GenericOtaHotelApiService\\StructType\\ExtraLocationInfo, \"%s\" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__);\n }\n $this->ExtraLocationInfo[] = $item;\n return $this;\n }", "title": "" }, { "docid": "f9d21ef7e61eecc6c68115d52a5bf676", "score": "0.4369071", "text": "public function getHotelClass()\n {\n return $this->readOneof(3);\n }", "title": "" }, { "docid": "80e1b48ef276cd0b54b7eb642445a8c7", "score": "0.4356263", "text": "public function getFeedItemDescription(){\n return null;\n }", "title": "" }, { "docid": "9260da5e744bb0c8c9d0cd23e76ac240", "score": "0.43285874", "text": "public function setCallFeedItem($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Ads\\GoogleAds\\V13\\Common\\CallFeedItem::class);\n $this->writeOneof(8, $var);\n\n return $this;\n }", "title": "" }, { "docid": "1e06ae5c657601fe1a9d494683abc66b", "score": "0.42826465", "text": "public function getFeedItems();", "title": "" }, { "docid": "ab2537f9ceab3181b5f3c88ad0803206", "score": "0.42590988", "text": "public function addFeedItem(FeedItem $l)\n {\n if ($this->collFeedItems === null) {\n $this->initFeedItems();\n $this->collFeedItemsPartial = true;\n }\n if (!in_array($l, $this->collFeedItems->getArrayCopy(), true)) { // only add it if the **same** object is not already associated\n $this->doAddFeedItem($l);\n }\n\n return $this;\n }", "title": "" }, { "docid": "f59469b60f678e871a6791f827cc835e", "score": "0.42529297", "text": "function add_vcc_events_ical_feed () {\n add_feed('events-ical', 'vcc_events_ical');\n}", "title": "" }, { "docid": "42a42b28b1d7677af9ff567da23d7514", "score": "0.42443088", "text": "public function getFeedItemResult()\n {\n return $this->readOneof(37);\n }", "title": "" }, { "docid": "6c890b652646e782dfe9b10bf3568f72", "score": "0.42441076", "text": "public function getHotel(){\n if($this->_hotels){\n foreach($this->_hotels as $hotel)\n {\n return $hotel;\n }\n }\n else\n {\n foreach($this->hotelStacks as $hotelStack)\n {\n return $hotelStack->getHotel();\n }\n }\n }", "title": "" }, { "docid": "bc1d3447c9efbf8fd9a5d46a4b0b2f52", "score": "0.42313567", "text": "public function addToFeature(\\Devlabs91\\GenericOtaHotelApiService\\StructType\\Feature $item)\n {\n // validation for constraint: itemType\n if (!$item instanceof \\Devlabs91\\GenericOtaHotelApiService\\StructType\\Feature) {\n throw new \\InvalidArgumentException(sprintf('The Feature property can only contain items of \\Devlabs91\\GenericOtaHotelApiService\\StructType\\Feature, \"%s\" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__);\n }\n $this->Feature[] = $item;\n return $this;\n }", "title": "" }, { "docid": "b7ed9f2d3886b4f5e2a2dae49c728534", "score": "0.4196892", "text": "public function getHotel()\n {\n return $this->hasOne(Hotel::class, ['id' => 'id_hotel']);\n }", "title": "" }, { "docid": "b7ed9f2d3886b4f5e2a2dae49c728534", "score": "0.4196892", "text": "public function getHotel()\n {\n return $this->hasOne(Hotel::class, ['id' => 'id_hotel']);\n }", "title": "" }, { "docid": "74e855e1e1fc1f0eca5d9b54b6662cc9", "score": "0.41900665", "text": "public function setPromotionFeedItem($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Ads\\GoogleAds\\V13\\Common\\PromotionFeedItem::class);\n $this->writeOneof(12, $var);\n\n return $this;\n }", "title": "" }, { "docid": "8ee8179524a69a8ab73e024265a74e08", "score": "0.41652238", "text": "public static function getThisAndAnnotations($item) {\n // If this not an annotation-type Item\n if ($item->item_type_id != get_option('iiifitems_annotation_item_type')) {\n // Return it and all attached annotations\n return array_merge(array($item), CsvExport_IiifItemsUtil::findAnnotationItemsUnder($item));\n // End: If this not an annotation-type Item\n }\n // Otherwise, return all subitems\n return array($item);\n }", "title": "" }, { "docid": "6cd543ae851cc4378efb17dae252e7bd", "score": "0.4161594", "text": "public function add($item): self\n {\n // validation for constraint: itemType\n if (!$item instanceof \\StructType\\EwsMeetingLocationItemType) {\n throw new InvalidArgumentException(sprintf('The MeetingLocation property can only contain items of type \\StructType\\EwsMeetingLocationItemType, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);\n }\n return parent::add($item);\n }", "title": "" }, { "docid": "d4ee42e54ca53e3d552d9fe3a4ba1b33", "score": "0.41534418", "text": "public function addHotel(Hotel $hotel)\n {\n $hotelKey = $hotel->key;\n\n if(isset($this->_hotels[$hotelKey]))\n {\n $this->_hotels[$hotelKey]->countNumbers++;\n }\n else\n {\n $this->_hotels[$hotelKey] = $hotel;\n $this->bestMask |= $hotel->bestMask;\n }\n }", "title": "" }, { "docid": "8bad93ed89f8fe60bbae2635505b4dd3", "score": "0.4139283", "text": "public function addItem($feedItem) {\n $this->items[] = $feedItem; \n return $this;\n }", "title": "" }, { "docid": "92b21aaaf55284071ae63a563aef9eec", "score": "0.41390362", "text": "public function getAppInfo($openId)\n {\n $result = (new HotelAppService())->getAppInfo($this->getValidAccessToken(), $openId);\n if (isset($result['errcode']) && $result['errcode'] == 40001) {\n \\Yii::warning($result['errmsg']);\n $this->refreshAccessToken();\n return $this->getAppInfo($openId);\n }\n return $result;\n }", "title": "" }, { "docid": "5138d092f38c331bbc4f9cc09e028fa1", "score": "0.4138745", "text": "public function get(): object\n {\n $response = $this->amadeus->getClient()->getWithOnlyPath(\n \"/v3/shopping/hotel-offers\".\"/\".$this->offerId\n );\n\n return Resource::fromObject($response, \\Amadeus\\Resources\\HotelOffers::class);\n }", "title": "" }, { "docid": "402a77b424e352fa3845b175ed26ef16", "score": "0.4116598", "text": "public function addToAdditionalInfoPrompt(\\Devlabs91\\GenericOtaHotelApiService\\StructType\\AdditionalInfoPrompt $item)\n {\n // validation for constraint: itemType\n if (!$item instanceof \\Devlabs91\\GenericOtaHotelApiService\\StructType\\AdditionalInfoPrompt) {\n throw new \\InvalidArgumentException(sprintf('The AdditionalInfoPrompt property can only contain items of \\Devlabs91\\GenericOtaHotelApiService\\StructType\\AdditionalInfoPrompt, \"%s\" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__);\n }\n $this->AdditionalInfoPrompt[] = $item;\n return $this;\n }", "title": "" }, { "docid": "24064f068726001792ea0e7c4b024cb7", "score": "0.4109332", "text": "public function addToBackground_Check_Data(\\WorkdayWsdl\\\\StructType\\Background_Check_Overall_Status_DataType $item)\n {\n // validation for constraint: itemType\n if (!$item instanceof \\WorkdayWsdl\\\\StructType\\Background_Check_Overall_Status_DataType) {\n throw new \\InvalidArgumentException(sprintf('The Background_Check_Data property can only contain items of type \\WorkdayWsdl\\\\StructType\\Background_Check_Overall_Status_DataType, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);\n }\n $this->Background_Check_Data[] = $item;\n return $this;\n }", "title": "" }, { "docid": "97ada9cd8799b9f104a5283180b3ce51", "score": "0.4095633", "text": "public function setHotelClass($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Ads\\GoogleAds\\V2\\Common\\HotelClassInfo::class);\n $this->writeOneof(3, $var);\n\n return $this;\n }", "title": "" }, { "docid": "40ba1dd1d3acb2bc788738af8996c19f", "score": "0.40890062", "text": "function feelingrestful_menu_item( $menu_item ) {\n\n\tif ( ! is_array( $menu_item ) ) {\n\t\treturn $menu_item;\n\t}\n\n\t// regex remove domain from\n\t$domain = get_home_url();\n\t$menu_item['url'] = str_replace( $domain, '', $menu_item['url'] );\n\n\t// add in Event and pastEvent settings\n\t$menu_item['event'] = false;\n\t$menu_item['pastEvent'] = false;\n\n\tif ( preg_match( '/\\bevent\\b/', $menu_item['attr'] ) ) {\n\t\t$menu_item['event'] = true;\n\t}\n\n\tif ( preg_match( '/\\bpastEvent\\b/', $menu_item['classes'] ) ) {\n\t\t$menu_item['pastEvent'] = true;\n\t}\n\n\t$menu_item['text'] = $menu_item['title'];\n\n\treturn $menu_item;\n}", "title": "" }, { "docid": "342d5ccd2c1855f005b7613988772cb9", "score": "0.40870538", "text": "public function add(ItemInterface $item) : FeedInterface;", "title": "" }, { "docid": "d092fe79eee0591a85a7c053c01fe6bf", "score": "0.4064698", "text": "function getCorrespondentCalendarItem($open = true)\n {\n $props = mapi_getprops($this->message, array(PR_MESSAGE_CLASS, $this->proptags['goid'], $this->proptags['goid2'], PR_RCVD_REPRESENTING_NAME));\n\n if(!$this->isMeetingRequest($props[PR_MESSAGE_CLASS]) && !$this->isMeetingRequestResponse($props[PR_MESSAGE_CLASS]) && !$this->isMeetingCancellation($props[PR_MESSAGE_CLASS])) {\n // can work only with meeting requests/responses/cancellations\n return false;\n }\n\n $globalId = $props[$this->proptags['goid']];\n $cleanGlobalId = $props[$this->proptags['goid2']];\n\n // If Delegate is processing Meeting Request/Response for Delegator then retrieve Delegator's store and calendar.\n if (isset($props[PR_RCVD_REPRESENTING_NAME])) {\n $delegatorStore = $this->getDelegatorStore($props[PR_RCVD_REPRESENTING_NAME], array(PR_IPM_APPOINTMENT_ENTRYID));\n\n $store = $delegatorStore['store'];\n $calFolder = $delegatorStore[PR_IPM_APPOINTMENT_ENTRYID];\n } else {\n $store = $this->store;\n $calFolder = $this->openDefaultCalendar();\n }\n\n $basedate = $this->getBasedateFromGlobalID($globalId);\n\n /**\n * First search for any appointments which correspond to the $globalId,\n * this can be the entire series (if the Meeting Request refers to the\n * entire series), or an particular Occurence (if the meeting Request\n * contains a basedate).\n *\n * If we cannot find a corresponding item, and the $globalId contains\n * a $basedate, it might imply that a new exception will have to be\n * created for a series which is present in the calendar, we can look\n * that one up by searching for the $cleanGlobalId.\n */\n $entryids = $this->findCalendarItems($globalId, $calFolder);\n if ($basedate && empty($entryids)) {\n $entryids = $this->findCalendarItems($cleanGlobalId, $calFolder, true);\n }\n\n // there should be only one item returned\n if(!empty($entryids) && count($entryids) === 1) {\n // return only entryid\n if($open === false) {\n return $entryids[0];\n }\n\n // open calendar item and return it\n return mapi_msgstore_openentry($store, $entryids[0]);\n }\n\n // no items found in calendar\n return false;\n }", "title": "" }, { "docid": "7e827d8b4ee7690c3dc45035ae80cdd2", "score": "0.40545994", "text": "public function feedEntityAdd( OW_Event $e )\n {\n $params = $e->getParams();\n $data = $e->getData();\n\n if ( $params['entityType'] != 'event' )\n {\n return;\n }\n\n $eventService = EVENT_BOL_EventService::getInstance();\n $event = $eventService->findEvent($params['entityId']);\n\n // if ( $event->getWhoCanView() == EVENT_BOL_EventService::CAN_VIEW_INVITATION_ONLY )\n // {\n // return;\n // }\n //$url = OW::getRouter()->urlForRoute('event.view', array('eventId' => $event->getId()));\n //$thumb = $eventService->generateImageUrl($event->image, true);\n\n $title = UTIL_String::truncate(strip_tags($event->getTitle()), 100, \"...\");\n\n\n /* $data = array(\n 'time' => $event->getCreateTimeStamp(),\n 'ownerId' => $event->getUserId(),\n 'string' => OW::getLanguage()->text('event', 'feed_add_item_label'),\n 'content' => '<div class=\"clearfix\"><div class=\"ow_newsfeed_item_picture\">\n <a href=\"' . $url . '\"><img src=\"' . ( $event->getImage() ? $eventService->generateImageUrl($event->getImage(), true) : $eventService->generateDefaultImageUrl() ) . '\" /></a>\n </div><div class=\"ow_newsfeed_item_content\">\n <a class=\"ow_newsfeed_item_title\" href=\"' . $url . '\">' . $title . '</a><div class=\"ow_remark ow_smallmargin\">' . UTIL_String::truncate(strip_tags($event->getDescription()), 200, '...') . '</div><div class=\"ow_newsfeed_action_activity event_newsfeed_activity\">[ph:activity]</div></div></div>',\n 'view' => array(\n 'iconClass' => 'ow_ic_calendar'\n )\n ); */\n\n $data = array(\n 'time' => $event->getCreateTimeStamp(),\n 'ownerId' => $event->getUserId(),\n 'string' => array(\"key\" => \"event+feed_add_item_label\"),\n 'content' => array(\n \"format\" => \"image_content\",\n \"vars\" => array(\n \"image\" => ( $event->getImage() ? $eventService->generateImageUrl($event->getImage(), false) : $eventService->generateDefaultImageUrl() ),\n \"thumbnail\" => ( $event->getImage() ? $eventService->generateImageUrl($event->getImage(), true) : $eventService->generateDefaultImageUrl() ),\n \"title\" => $title,\n \"description\" => UTIL_String::truncate(strip_tags($event->getDescription()), 200, '...'),\n \"url\" => array(\n \"routeName\" => 'event.view',\n \"vars\" => array('eventId' => $event->getId())\n ),\n 'iconClass' => 'ow_ic_event'\n )\n ),\n 'view' => array(\n 'iconClass' => 'ow_ic_calendar'\n ),\n );\n\n if ( $event->getWhoCanView() == EVENT_BOL_EventService::CAN_VIEW_INVITATION_ONLY )\n {\n $data['params']['visibility'] = 14; // VISIBILITY_FOLLOW + VISIBILITY_AUTHOR + VISIBILITY_FEED\n }\n\n $e->setData($data);\n }", "title": "" }, { "docid": "f677ab8953cd62cc2b4f2bf918b3f2e3", "score": "0.40535325", "text": "public function getFeedItemUrlAnchor() {\n return null;\n }", "title": "" }, { "docid": "8da161edf5adcaa925ff04eb2136ad62", "score": "0.4047342", "text": "private function fieldsMapping(AfAppointment $item)\n {\n $strStartDatetime = Carbon::parse($item->start_datetime)->format('Y-m-d');\n $startDatetime = Carbon::parse($strStartDatetime . \" \" . $item->start_time);\n\n $user = $item->afUser;\n\n $endDatetime = $item->end_datetime;\n if(!$endDatetime) {\n $endDatetimeInstance = Carbon::parse($strStartDatetime . \" \" . $item->start_time);\n $duration = explode(' ', $item->appointment_duration);\n $duration = $duration[0] ?: 0;\n $endDatetimeInstance->addHours($duration);\n $endDatetime = $endDatetimeInstance->format('Y-m-d H:i:s');\n }\n $data = array(\n 'title' => $item->name,\n 'description' => $this->description($item),\n 'start_date_time' => $startDatetime->format('Y-m-d H:i:s'),\n 'end_date_time' => $endDatetime,\n 'location_type' => \"others\" ,\n 'location' => $this->setLocation($item),\n 'customer_id' => $item->afCustomer->customer_id,\n 'lat' => $item->latitude,\n 'long' => $item->longitude,\n 'occurence' => 'never_repeat',\n 'full_day' => 0,\n 'user_id' => $user->user_id,\n );\n return $data;\n }", "title": "" }, { "docid": "947ab4d651f59f18a5fbd75dd657452d", "score": "0.40425226", "text": "public function addToEmployeeInfo($item)\n {\n // validation for constraint: itemType\n if (!false) {\n throw new \\InvalidArgumentException(sprintf('The EmployeeInfo property can only contain items of anyType, \"%s\" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__);\n }\n $this->EmployeeInfo[] = $item;\n return $this;\n }", "title": "" }, { "docid": "dcb715ec8e2523c726010c2dd48f64f7", "score": "0.4018586", "text": "public function getHotelName()\n {\n return $this->hotelName;\n }", "title": "" }, { "docid": "dcb715ec8e2523c726010c2dd48f64f7", "score": "0.4018586", "text": "public function getHotelName()\n {\n return $this->hotelName;\n }", "title": "" }, { "docid": "a61ea335f639926ae00364435d2ca0b5", "score": "0.40033403", "text": "public function getSourceElement(FeedInterface $feed, ItemInterface $item);", "title": "" }, { "docid": "e861eee9bb0e49591d3843f0eed5cda0", "score": "0.3986285", "text": "public function getCampaignFeed()\n {\n return $this->campaign_feed;\n }", "title": "" }, { "docid": "77a0cf3b0467c44bc7061cdefa24f043", "score": "0.3978522", "text": "public function getHotelId(): int\n {\n return $this->hotel_id;\n }", "title": "" }, { "docid": "2d11706ac9fd732dfd7d8f0320ca1ad0", "score": "0.39780208", "text": "function get_feed_link() {\r\n\t\treturn (isset($this->data['info']['link'][0])) ? $this->data['info']['link'][0] : false;\r\n\t}", "title": "" }, { "docid": "c4b363332382c3713045887dcd529723", "score": "0.3966806", "text": "public function addToAdditional(\\Devlabs91\\GenericOtaHotelApiService\\StructType\\Additional $item)\n {\n // validation for constraint: itemType\n if (!$item instanceof \\Devlabs91\\GenericOtaHotelApiService\\StructType\\Additional) {\n throw new \\InvalidArgumentException(sprintf('The Additional property can only contain items of \\Devlabs91\\GenericOtaHotelApiService\\StructType\\Additional, \"%s\" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__);\n }\n $this->Additional[] = $item;\n return $this;\n }", "title": "" }, { "docid": "d97b9f1987cfc03703475f92ba8c0e2b", "score": "0.3965487", "text": "function feed_parser_load_feed_item($type, XmlElement $element, $feed, $feed_item = NULL) {\r\n if ($feed_item = feed_parser_invoke($type, 'load_feed_item', $element, $feed, $feed_item)) {\r\n return feed_item_defaults($feed_item);\r\n }\r\n return FALSE;\r\n}", "title": "" }, { "docid": "6dff88740aeee5fc745c90dcc0556d32", "score": "0.39600426", "text": "public function getHotelUrl(): ?string\n {\n return $this->hotel_url;\n }", "title": "" }, { "docid": "fda07d18c868ccdd41d662acca5263d0", "score": "0.39542347", "text": "public function addHoliday(Holiday $holiday): Item\n {\n $this->holidays[] = $holiday;\n\n return $this;\n }", "title": "" }, { "docid": "2429d00b64f45b143c50ce082f68965f", "score": "0.39461106", "text": "public function &getAppFriendStories()\n {\n return $this->_facebook->callMethod('facebook.feed.getAppFriendStories');\n }", "title": "" }, { "docid": "1f66c747e888dc4c7f68de61d45d63da", "score": "0.39424947", "text": "public function hydrate($o/* source */) {\n\n //use a factory in the future\n $newObj = new HotelDetailedDescription();\n\n if(is_array($o)) {\n if(!empty($o['dd_id'])) {\n $newObj->setId($o['dd_id']);\n }\n\n $newObj->setProviderId($o['dd_provider_id']);\n $newObj->setHotelId($o['dd_hotel_id']);\n $newObj->setLabel($o['dd_label']);\n $newObj->setText($o['dd_text']);\n $newObj->setIndex($o['dd_index']);\n } else {\n //$newObj->setProviderId($o['dd_provider_id']);\n //$newObj->setHotelId($o['dd_hotel_id']);\n $newObj->setLabel($o->Label);\n $newObj->setText($o->Text);\n $newObj->setIndex($o->Index);\n }\n\n return $newObj;\n }", "title": "" }, { "docid": "7890f6869da91f848858c9bb01573eb2", "score": "0.39387837", "text": "public function mappingItem($item)\n\t{\n\t\t\t$response_array = array();\n\t\t\t$response_array['price_now'] = $item->SellingStatus->CurrentPrice->value;\n\t\t\t$response_array['start_date'] = $item->ListingDetails->StartTime;\n\t\t\t$response_array['end_date'] = $item->ListingDetails->EndTime;\n\t\t\tif ($item->ListingDetails->ViewItemURL!=\"\") $response_array['link'] = $item->ListingDetails->ViewItemURL;\t\t\n\t\t\t$response_array['last_updated'] = date('Y-m-d H:i:s');\n\t\t\t$response_array['ListingStatus'] = $item->SellingStatus->ListingStatus;\n\t\t\t$response_array['quantity_sold'] = $item->SellingStatus->QuantitySold;\t\n\t\t\t$response_array['quantity_sold'] = $item->SellingStatus->QuantitySold;\t\n\t\t\t$response_array['ebay_item_id'] = $item->ItemID;\n\t\t\t$response_array['full_response'] = $item;\t\n\n\t\t\treturn $response_array;\n\t}", "title": "" }, { "docid": "a20635f883cc878d714dca033796b528", "score": "0.3937279", "text": "public function addToAddress_Line_Data(\\WorkdayWsdl\\\\StructType\\Address_Line_Information_DataType $item)\n {\n // validation for constraint: itemType\n if (!$item instanceof \\WorkdayWsdl\\\\StructType\\Address_Line_Information_DataType) {\n throw new \\InvalidArgumentException(sprintf('The Address_Line_Data property can only contain items of type \\WorkdayWsdl\\\\StructType\\Address_Line_Information_DataType, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);\n }\n $this->Address_Line_Data[] = $item;\n return $this;\n }", "title": "" }, { "docid": "a1a65d4403890f3bcfe4d7460a7cdfef", "score": "0.39281586", "text": "public function addToBusiness_Process_Attachment_Data(\\WorkdayWsdl\\\\StructType\\Business_Process_Attachment_DataType $item)\n {\n // validation for constraint: itemType\n if (!$item instanceof \\WorkdayWsdl\\\\StructType\\Business_Process_Attachment_DataType) {\n throw new \\InvalidArgumentException(sprintf('The Business_Process_Attachment_Data property can only contain items of type \\WorkdayWsdl\\\\StructType\\Business_Process_Attachment_DataType, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);\n }\n $this->Business_Process_Attachment_Data[] = $item;\n return $this;\n }", "title": "" }, { "docid": "a70eacc378340d666a2eac1eb6912cf1", "score": "0.39124885", "text": "public function getFeed()\n\t{\n\t\treturn $this->formatted_feed;\n\t}", "title": "" }, { "docid": "8307c428040ab73d17ae3857f2a1399f", "score": "0.3905017", "text": "function agrilife_widget_agrilifetoday_rss_output( $rss, $args = array() ) {\n\tif ( is_string( $rss ) ) {\n\t\t$rss = fetch_feed($rss);\n\t} elseif ( is_array($rss) && isset($rss['url']) ) {\n\t\t$args = $rss;\n\t\t$rss = fetch_feed($rss['url']);\n\t} elseif ( !is_object($rss) ) {\n\t\treturn;\n\t}\n\n\tif ( is_wp_error($rss) ) {\n\t\tif ( is_admin() || current_user_can('manage_options') )\n\t\t\techo '<p>' . sprintf( __('<strong>RSS Error</strong>: %s'), $rss->get_error_message() ) . '</p>';\n\t\treturn;\n\t}\n\n\t$default_args = array( 'items' => 5, 'feed_link_index' => 0, 'show_summary' => 0 );\n\t$args = wp_parse_args( $args, $default_args );\n\textract( $args, EXTR_SKIP );\n\n\t$items = (int) $items;\n\tif ( $items < 1 || 20 < $items )\n\t\t$items = 10;\n\t$show_summary = (int) $show_summary;\n\n\tif ( !$rss->get_item_quantity() ) {\n\t\techo '<ul><li>' . __( 'An error has occurred; the feed is probably down. Try again later.' ) . '</li></ul>';\n\t\t$rss->__destruct();\n\t\tunset($rss);\n\t\treturn;\n\t}\n\n\techo '<ul>';\n\tforeach ( $rss->get_items(0, $items) as $item ) {\n\t\t$link = $item->get_link();\n\t\twhile ( stristr($link, 'http') != $link )\n\t\t\t$link = substr($link, 1);\n\t\t$link = esc_url(strip_tags($link));\n\t\t$title = esc_attr(strip_tags($item->get_title()));\n\t\tif ( empty($title) )\n\t\t\t$title = __('Untitled');\n\n\t\t$desc = str_replace( array(\"\\n\", \"\\r\"), ' ', esc_attr( strip_tags( @html_entity_decode( $item->get_description(), ENT_QUOTES, get_option('blog_charset') ) ) ) );\n\t\t//$desc = wp_html_excerpt( $desc, 360 );\n\t\t\n\t\t// Append ellipsis. Change existing [...] to [&hellip;].\n\t\tif ( '...' == substr( $desc, -3 ) )\n\t\t\t$desc = substr( $desc, 0, -5 ) . '&hellip;';\n\t\telseif ( 'Read More...' == substr( $desc, -12 ) )\n\t\t\t$desc = substr( $desc, 0, -13 ).'&hellip;';\n\n\t\t$desc = trim(esc_html( $desc ));\n\t\t\n\t\tif ( $show_summary ) {\n\t\t\t$summary = \"<p class='rss-excerpt'>$desc</p>\";\n\t\t} else {\n\t\t\t$summary = '';\n\t\t}\n\t\t\n\t\t// default\n\t\t$image = '<img class=\"rssthumb\" src=\"'.get_bloginfo('stylesheet_directory') . '/images/agrilifetodaythumb.jpg'.'\" alt=\"'.$title.'\" />';\n\n\t\t$date = $item->get_date( 'U' );\n\t\tif ( $date ) {\n\t\t\t$date = ' <span class=\"rss-date\">' . date_i18n( 'M d', $date ) . '</span>';\n\t\t}\n\n\t\t// SimplePie Bug:\n\t\t// get_enclosures only returns one enclosure\n\t\t// http://tech.groups.yahoo.com/group/simplepie-support/message/2994\t\n\t\tif ($enclosure = $item->get_enclosure()) {\t\t\n\t\t\tif(\t$enclosure->get_extension() == 'jpg' || $enclosure->get_extension() == 'png' || $enclosure->get_extension() == 'gif') {\n\t\t\t \t$image = '<img class=\"rssthumb\" src=\"'.$enclosure->get_link().'\" alt=\"'.$title.'\" />';\n\t\t\t } else {\n\t\t\t \t$image = '<img class=\"rssthumb\" src=\"'.get_bloginfo('stylesheet_directory') . '/images/agrilifetodaythumb.jpg'.'\" alt=\"'.$title.'\" />';\n\t\t\t }\n\t\t}\n\t\t\n\t\t// Link the image\t\n\t\t$image = '<a class=\"rss-img-link\" href=\"'.$link.'\" >'.$image.'</a>';\n\t\t\n\t echo \"<li>\".'<span class=\"rss-title\"><a class=\"rss-title-link\" href=\"'.$link.'\" >'.$title.\"</a></span><div class='rss-content'>{$date}{$image}{$summary}</div></li>\";\n\n\t}\n\techo '</ul>';\n\t$rss->__destruct();\n\tunset($rss);\n}", "title": "" }, { "docid": "fd42ad86c7dfb2953f21113e39815d59", "score": "0.38942882", "text": "public function getFeed()\n {\n return $this->feed;\n }", "title": "" }, { "docid": "b3b662697933a20603a2df5dcdb77172", "score": "0.3883765", "text": "public function getFeedItemRouteName(){\n return 'ccm_event_news_get';\n }", "title": "" }, { "docid": "1b086537742e2027879f26d32b1fc222", "score": "0.38798296", "text": "public static function clinicOne(){\n $xml_string = Http::withBasicAuth('Myah', '654321')\n ->get(config('app.api_endpoint'). 'xml', ['from' => Carbon::now()->addMonth()->toDateTimeString()]);\n $json = self::xmlToJson($xml_string);\n\n $appointments = [];\n foreach($json->appointment as $appointment){\n $a = self::addAppointment($appointment);\n if(! is_null($a)) $appointments[] = $a;\n }\n\n return $appointments;\n }", "title": "" }, { "docid": "eda13bd85731a403ce42a2aafdc9e898", "score": "0.387912", "text": "public function getIncident_news() { return $this->incident_news; }", "title": "" }, { "docid": "7f4cd3b7e78ad4b55828cb28f468eb19", "score": "0.38644964", "text": "public function first(): ?\\StructType\\EwsMeetingLocationItemType\n {\n return parent::first();\n }", "title": "" }, { "docid": "f411d9ceb24f55662da60e3021e3cfdc", "score": "0.3863414", "text": "public function toExpoPush($notifiable)\n {\n $title = $this->ad->title;\n\n $description = substr($this->ad->description, 0, 60);\n // dd( $notifiable->service);\n return ExpoMessage::create()\n ->badge(1)\n ->enableSound()\n ->title($title)\n ->setChannelId('featured-ads')\n ->setJsonData(['ad' => true])\n ->body($description);\n }", "title": "" }, { "docid": "491b66e690820f22755526909de1671a", "score": "0.38520253", "text": "public function getHotelCode()\n {\n return $this->hotelCode;\n }", "title": "" }, { "docid": "491b66e690820f22755526909de1671a", "score": "0.38520253", "text": "public function getHotelCode()\n {\n return $this->hotelCode;\n }", "title": "" }, { "docid": "fa2ff5397403e4e01f2fee208d9bcb9c", "score": "0.3851527", "text": "public function getFeedItemCustom()\n {\n return 'My custom field';\n }", "title": "" }, { "docid": "b272b522215fe6589a243a4bc0af27bf", "score": "0.38511887", "text": "public function setFeedItem($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Ads\\GoogleAds\\V13\\Resources\\FeedItem::class);\n $this->feed_item = $var;\n\n return $this;\n }", "title": "" }, { "docid": "35fbbc5d9ea82f02ccc14875fde7bb4e", "score": "0.3839224", "text": "public function getStructuredSnippetFeedItem()\n {\n return $this->readOneof(3);\n }", "title": "" }, { "docid": "c0d5999c7df676fe86ade40db8f1fe99", "score": "0.38323262", "text": "public function addToEnd_Employment_Reason_Reference(\\WorkdayWsdl\\\\StructType\\Event_Classification_SubcategoryObjectType $item)\n {\n // validation for constraint: itemType\n if (!$item instanceof \\WorkdayWsdl\\\\StructType\\Event_Classification_SubcategoryObjectType) {\n throw new \\InvalidArgumentException(sprintf('The End_Employment_Reason_Reference property can only contain items of type \\WorkdayWsdl\\\\StructType\\Event_Classification_SubcategoryObjectType, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);\n }\n $this->End_Employment_Reason_Reference[] = $item;\n return $this;\n }", "title": "" }, { "docid": "55d036bcde8f412775e1b8a31b62c136", "score": "0.3826872", "text": "public function hotel()\n {\n return $this->belongsTo(HotelDetails::class);\n }", "title": "" }, { "docid": "bf69e03c01e9a65040c7530563446455", "score": "0.38213605", "text": "function add_tf_events_ical_feed () {\n add_feed('tf-events-ical', 'tf_events_ical');\n }", "title": "" }, { "docid": "14d9c16b502c83e7de60fbdd83768f24", "score": "0.3818722", "text": "function mpfs_get_feed_info(){\n\t\t// if requires Advanced Custom fields installed together with Repeter and Options Page extentions\n\t\tif(function_exists('get_field')){\n\t\t\t$feed_info = get_field('feed_info','option'); \t\n\t\t}else{\n\t\t\t$feed_info = '';\n\t\t}\n\t\t\n\n\t\t// fallback in case the data is not acailable from options\n\t\tif(!is_array($feed_info)){\n\t\t\t$feed_info = array( array('title' => \"Appli PAC : Putain d'Autocorrection !\",\n\t\t\t\t\t\t\t\t\t'small_icon' => \"http://www.mesparentsfontdessms.com/wp-content/uploads/2013/11/pac-small.png\",\n\t\t\t\t\t\t\t\t\t'big_icon' =>\"http://www.mesparentsfontdessms.com/wp-content/uploads/2013/11/PAC-big.png\",\n\t\t\t\t\t\t\t\t\t'ios_url' => \"https://itunes.apple.com/fr/app/p*****-dautocorrection-sms-!/id615982234?mt=8\",\n\t\t\t\t\t\t\t\t\t'android_url' => \"\"),\n\n\t\t\t\t\t\t\tarray('title' => \"Suivez-nous sur Facebook !\",\n\t\t\t\t\t\t\t\t\t'small_icon' => \"http://www.mesparentsfontdessms.com/wp-content/uploads/2013/11/facebook-small.png\",\n\t\t\t\t\t\t\t\t\t'big_icon' =>\"http://www.mesparentsfontdessms.com/wp-content/uploads/2013/11/FB-big.png\",\n\t\t\t\t\t\t\t\t\t'ios_url' => \"https://www.facebook.com/MesParentsFontdesSMS?ref=hl\",\n\t\t\t\t\t\t\t\t\t'android_url' => \"https://www.facebook.com/MesParentsFontdesSMS?ref=hl\"),\n\n\t\t\t\t\t\t\tarray('title' => \"Suivez-nous sur Twitter !\",\n\t\t\t\t\t\t\t\t\t'small_icon' => \"http://www.mesparentsfontdessms.com/wp-content/uploads/2013/11/twitter-small.png\",\n\t\t\t\t\t\t\t\t\t'big_icon' =>\"http://www.mesparentsfontdessms.com/wp-content/uploads/2013/11/twitter-big.png\",\n\t\t\t\t\t\t\t\t\t'ios_url' => \"https://twitter.com/mpfs1\",\n\t\t\t\t\t\t\t\t\t'android_url' => \"https://twitter.com/mpfs1\"),\n\n\t\t\t\t\t\t\tarray('title' => \"Chers Voisins :)\",\n\t\t\t\t\t\t\t\t\t'small_icon' => \"http://www.mesparentsfontdessms.com/wp-content/uploads/2013/11/chers-voisin-small.png\",\n\t\t\t\t\t\t\t\t\t'big_icon' =>\"http://www.mesparentsfontdessms.com/wp-content/uploads/2013/11/chers-voisin-big.png\",\n\t\t\t\t\t\t\t\t\t'ios_url' => \"http://chersvoisins.net/\",\n\t\t\t\t\t\t\t\t\t'android_url' => \"http://chersvoisins.tumblr.com/\"),\n\n\t\t\t);\n\t\t}\n\t\t\n\n\t\t\treturn $feed_info;\n\t}", "title": "" }, { "docid": "c81a9286a8b5aefaeb5c60041445fee1", "score": "0.38182968", "text": "public function getCalloutText()\n {\n return $this->callout_text;\n }", "title": "" }, { "docid": "ac1f126c9e1ce5a61eefe1c82420837f", "score": "0.38145086", "text": "public function toFeedEntry(){\n\t\t$view = new Zend_View();\n\n\t\t$date = new Zend_Date($this->updateDate,Zend_Date::ISO_8601);\n\n\t\t$entry = array(\n\t\t\t\t'title' \t=> \t$this->getRecipe()->name.' wurde mit '.$this->name.' verschlagwortet',\n\t\t\t\t'guid'\t\t\t=>\t'http://www.cocktailberater.de'.$view->url(array('module'=>'website',\n\t\t\t\t\t\t\t\t\t'controller'=>'recipe','action'=>'index',\n\t\t\t\t\t\t\t\t\t'index'=>'index','search_type'=>'tag',\n\t\t\t\t\t\t\t\t\t'search'=>$this->name),'rest',true).'#tag-'.$this->id,\n\t\t\t\t'link' \t=> \t'http://www.cocktailberater.de'.$view->url(array('module'=>'website',\n\t\t\t\t\t\t\t\t\t'controller'=>'recipe','action'=>'get',\n\t\t\t\t\t\t\t\t\t'id'=>$this->getRecipe()->getUniqueName()),'rest',true),\n\t\t\t\t'lastUpdate'\t=> \t$date->getTimestamp(),\n\t\t\t\t'content'\t\t=> \t'Am '.$date->get(Zend_Date::DATE_FULL,$de).\n\t\t\t\t\t\t\t\t\t' um '.$date->get(Zend_Date::TIME_MEDIUM,$de).\n\t\t\t\t\t\t\t\t\t' Uhr wurde '.$this->getRecipe()->name.\n\t\t\t\t\t\t\t\t\t' mit dem Tag '.$this->name.' versehen.',\n\t\t\t\t'description'\t=> \t'Am '.$date->get(Zend_Date::DATE_FULL,$de).\n\t\t\t\t\t\t\t\t\t' um '.$date->get(Zend_Date::TIME_MEDIUM,$de).\n\t\t\t\t\t\t\t\t\t' Uhr wurde '.$this->getRecipe()->name.\n\t\t\t\t\t\t\t\t\t' mit dem Tag '.$this->name.' versehen.',\n\t\t);\n\t\treturn $entry;\n\t}", "title": "" }, { "docid": "40cdbd63a2af9df80ee53efc053b08a0", "score": "0.38141674", "text": "private function get_additional_entry_item( $addon_meta_data ) {\n\n\t\tif ( ! isset( $addon_meta_data['value'] ) || ! is_array( $addon_meta_data['value'] ) ) {\n\t\t\treturn array();\n\t\t}\n\t\t$status = $addon_meta_data['value'];\n\t\t$additional_entry_item = array(\n\t\t\t'label' => __( 'Slack Integration', Forminator::DOMAIN ),\n\t\t\t'value' => '',\n\t\t);\n\n\n\t\t$sub_entries = array();\n\t\tif ( isset( $status['connection_name'] ) ) {\n\t\t\t$sub_entries[] = array(\n\t\t\t\t'label' => __( 'Integration Name', Forminator::DOMAIN ),\n\t\t\t\t'value' => $status['connection_name'],\n\t\t\t);\n\t\t}\n\n\t\tif ( isset( $status['is_sent'] ) ) {\n\t\t\t$is_sent = true === $status['is_sent'] ? __( 'Yes', Forminator::DOMAIN ) : __( 'No', Forminator::DOMAIN );\n\t\t\t$sub_entries[] = array(\n\t\t\t\t'label' => __( 'Sent To Slack', Forminator::DOMAIN ),\n\t\t\t\t'value' => $is_sent,\n\t\t\t);\n\t\t}\n\n\t\tif ( isset( $status['description'] ) ) {\n\t\t\t$sub_entries[] = array(\n\t\t\t\t'label' => __( 'Info', Forminator::DOMAIN ),\n\t\t\t\t'value' => $status['description'],\n\t\t\t);\n\t\t}\n\n\t\tif ( Forminator_Addon_Slack::is_show_full_log() ) {\n\t\t\t// too long to be added on entry data enable this with `define('FORMINATOR_ADDON_SLACK_SHOW_FULL_LOG', true)`\n\t\t\tif ( isset( $status['url_request'] ) ) {\n\t\t\t\t$sub_entries[] = array(\n\t\t\t\t\t'label' => __( 'API URL', Forminator::DOMAIN ),\n\t\t\t\t\t'value' => $status['url_request'],\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif ( isset( $status['data_sent'] ) ) {\n\t\t\t\t$sub_entries[] = array(\n\t\t\t\t\t'label' => __( 'Data sent to Slack', Forminator::DOMAIN ),\n\t\t\t\t\t'value' => '<pre class=\"sui-code-snippet\">' . wp_json_encode( $status['data_sent'], JSON_PRETTY_PRINT ) . '</pre>',\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif ( isset( $status['data_received'] ) ) {\n\t\t\t\t$sub_entries[] = array(\n\t\t\t\t\t'label' => __( 'Data received from Slack', Forminator::DOMAIN ),\n\t\t\t\t\t'value' => '<pre class=\"sui-code-snippet\">' . wp_json_encode( $status['data_received'], JSON_PRETTY_PRINT ) . '</pre>',\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\n\t\t$additional_entry_item['sub_entries'] = $sub_entries;\n\n\t\t// return single array\n\t\treturn $additional_entry_item;\n\t}", "title": "" }, { "docid": "b5286747cd03e2f6579f14d8c91a7d92", "score": "0.38057482", "text": "public function hotel()\n {\n return $this->belongsTo(Hotel::class);\n }", "title": "" }, { "docid": "122ea328f74fd45be85d03b55f4aa3b5", "score": "0.38038045", "text": "public function addToResponse_Filter(\\WorkdayWsdl\\\\StructType\\Response_FilterType $item)\n {\n // validation for constraint: itemType\n if (!$item instanceof \\WorkdayWsdl\\\\StructType\\Response_FilterType) {\n throw new \\InvalidArgumentException(sprintf('The Response_Filter property can only contain items of type \\WorkdayWsdl\\\\StructType\\Response_FilterType, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);\n }\n $this->Response_Filter[] = $item;\n return $this;\n }", "title": "" }, { "docid": "66a92d0a7ea1c9f238cc8f27a546c0f3", "score": "0.38007104", "text": "public function getoutboundhistoryofthisitem($item_id)\n\t{\n\t\t$outbounds=OutboundItemsHistory::model()->findAllByAttributes(array('main_item_id'=>$item_id));\n\t\treturn $outbounds;\n\n\t}", "title": "" }, { "docid": "34c342d551453e1a0cee18c77acb1b1e", "score": "0.3796416", "text": "function twentyeleven_custom_excerpt_more( $output ) {\n \n if ( has_excerpt() && ! is_attachment() ) {\n $output .= '().';\n }\n return $output;\n}", "title": "" }, { "docid": "c66624c88ded064905db4cfbef3bdfbd", "score": "0.37908202", "text": "function athemes_custom_excerpt_more( $output ) {\n\tif ( has_excerpt() && ! is_attachment() ) {\n\t\t$output .= athemes_continue_reading_link();\n\t}\n\treturn $output;\n}", "title": "" }, { "docid": "75e077e78230a495a2fdbe32bbf3de13", "score": "0.37906623", "text": "public function getTextMessageFeedItem()\n {\n return $this->readOneof(10);\n }", "title": "" }, { "docid": "7ef78f4b56a8268c75aeefcb6f17958c", "score": "0.37877372", "text": "public function getFeedItemLink()\n {\n return 'http://github.com/eko/FeedBundle/article/fake/url';\n }", "title": "" }, { "docid": "0c49c7dff0a3f317e703a8f1633e9059", "score": "0.37873617", "text": "public function addItem(RssFeedItem $objItem)\r\n\t{\r\n\t\t$this->arrItems[] = $objItem;\r\n\t}", "title": "" }, { "docid": "4af35b9bd0cf3baaf5229692d186005a", "score": "0.37812757", "text": "public function itemToObject($row){\n $hotelInfoObject = new HotelInfo($row['HotelId'], $row['Name'], $row['TelNr'], $row['Url'], $row['Preis'], $row['Stichwort'], $row['AnzZimmer']); \n // var_dump($hotelInfoObject); \n return $hotelInfoObject; \n \n }", "title": "" }, { "docid": "0ab46c781fb157c3ead57ced90b58c78", "score": "0.37757495", "text": "public function getMeal()\n {\n return $this->meal;\n }", "title": "" }, { "docid": "403df183951009a29758c2bba0369634", "score": "0.376723", "text": "public function getFeeder()\n {\n return isset($this->Feeder) ? $this->Feeder : null;\n }", "title": "" }, { "docid": "59735b56a373e33d9c6e31b1e121d6d1", "score": "0.376315", "text": "function twentyten_custom_excerpt_more( $output ) {\n\tif ( has_excerpt() && ! is_attachment() ) {\n\t\t$output .= twentyten_continue_reading_link();\n\t}\n\treturn $output;\n}", "title": "" }, { "docid": "fc95189a2b82f498cea92c0d9582e81d", "score": "0.37579095", "text": "public function createNewItem() {\n $Item = new FeedItem($this->version);\n return $Item;\n }", "title": "" } ]
95ec680a16b5aeb2c90b7799a09ca43c
Scope restriction: When scopes are set the client will be restricted to the listed scopes. Generated from protobuf field repeated string scopes = 7;
[ { "docid": "0be24070f05dd686afa7402edae37bad", "score": "0.5145364", "text": "public function getScopes()\n {\n return $this->scopes;\n }", "title": "" } ]
[ { "docid": "c93691706b046ec81c63ec090874fa1b", "score": "0.70924544", "text": "public function setScopes($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::STRING);\n $this->scopes = $arr;\n\n return $this;\n }", "title": "" }, { "docid": "6afe3aceee359706c8cb4f5f651d1c25", "score": "0.6260444", "text": "public function getAllowedScopes();", "title": "" }, { "docid": "945cb6f5dc0c893e82b66421a3585446", "score": "0.6025019", "text": "public function getAllowedScopes() : array;", "title": "" }, { "docid": "3f2e0c17d52617ff5c49dd2456915508", "score": "0.6012801", "text": "protected function parseScopes($scopes){\n $scopes = array_map('trim', explode(',',$scopes));\n foreach($scopes as $scope){\n if(!in_array($scope, $this->allowedScopes)){\n throw new \\Dingo\\Api\\Exception\\ResourceException('Invalid scope requested.',['invalid scope' => $scope]);\n }\n }\n // return scopes if all are valid\n return $scopes;\n }", "title": "" }, { "docid": "2f2a31b415ecf793d31556d9235949e6", "score": "0.59331733", "text": "public function get_scopes() {\n\t\treturn array(\n\t\t\t'https://www.googleapis.com/auth/ideahub.read',\n\t\t);\n\t}", "title": "" }, { "docid": "67ac9390043c0cc744ce4b5c4b3787b3", "score": "0.5874626", "text": "public function set_scopes($scopes) {\n\t\t$this->client->SetScopes(\n\t\t\t$scopes\n\t\t);\n\t}", "title": "" }, { "docid": "366d6cd16c858ed6edbe7056a4440055", "score": "0.580764", "text": "public function get_permitted_scopes() {\n return null;\n }", "title": "" }, { "docid": "32178ba630ce2e47133aaebfe2949a95", "score": "0.56424165", "text": "public function listScopes()\n {\n throw new Horde_Prefs_Exception('Not implemented!');\n }", "title": "" }, { "docid": "d15da08c7c96800c3ee324a97eb79de5", "score": "0.5575807", "text": "public function add_scopes($scopes) {\n\t\t$this->client->AddScopes(\n\t\t\t$scopes\n\t\t);\n\t}", "title": "" }, { "docid": "ded69865139df30e8ad47f41a6bee396", "score": "0.54929596", "text": "private function scopes() {\r\n\r\n return array(\r\n 'language' => array( 'menu' => false, 'options' => false, 'db_query' => false, 'add_head' => false, 'extend_vars' => false ),\r\n 'feed_server' => array( 'menu' => false, 'options' => false, 'db_query' => false, 'add_head' => false, 'extend_vars' => false ),\r\n 'pay_gateway' => array( 'menu' => false, 'options' => true, 'db_query' => true, 'add_head' => false, 'extend_vars' => true )\r\n );\r\n\r\n}", "title": "" }, { "docid": "15f13853c9bf95cc779a19d3a033d2f6", "score": "0.5438065", "text": "public function setScopes(array $scopes = [])\n {\n if ($scopes === []) {\n $scopes = config('gsuite.scopes');\n }\n\n $this->client->setScopes($scopes);\n\n return $this;\n }", "title": "" }, { "docid": "2013d6a2a62975741034d8f34bcace0d", "score": "0.54306024", "text": "public function getScopes() {\n return $this->scopes; \n }", "title": "" }, { "docid": "1dee85947578118cef5f710ddfa9e478", "score": "0.54173607", "text": "public function setScopes($scopes)\n {\n $this->scopes = $scopes;\n return $this;\n }", "title": "" }, { "docid": "9d9b37233c27a5c4dce154ca8bcfc491", "score": "0.5416043", "text": "function scopes()\n {\n return [\n 'published'=>[\n 'condition'=>''\n ],\n 'recently'=>[\n 'order'=>'id desc'\n ]\n ];\n }", "title": "" }, { "docid": "1a0aff3fd6e2dc32d1c76545fb21ec54", "score": "0.5354347", "text": "public function validateScopes($scopeParam = '', ClientEntity $client, $redirectUri = null)\n {\n $scopesList = explode($this->server->getScopeDelimiter(), $scopeParam);\n\n for ($i = 0; $i < count($scopesList); $i++) {\n $scopesList[$i] = trim($scopesList[$i]);\n if ($scopesList[$i] === '') {\n unset($scopesList[$i]); // Remove any junk scopes\n }\n }\n\n if (\n $this->server->scopeParamRequired() === true\n && $this->server->getDefaultScope() === null\n && count($scopesList) === 0\n ) {\n throw new Exception\\InvalidRequestException('scope');\n } elseif (count($scopesList) === 0 && $this->server->getDefaultScope() !== null) {\n if (is_array($this->server->getDefaultScope())) {\n $scopesList = $this->server->getDefaultScope();\n } else {\n $scopesList = [0 => $this->server->getDefaultScope()];\n }\n }\n\n $scopes = [];\n\n foreach ($scopesList as $scopeItem) {\n $scope = $this->server->getScopeStorage()->get(\n $scopeItem,\n $this->getIdentifier(),\n $client->getId()\n );\n\n if (($scope instanceof ScopeEntity) === false) {\n throw new Exception\\InvalidScopeException($scopeItem, $redirectUri);\n }\n\n $scopes[$scope->getId()] = $scope;\n }\n\n return $scopes;\n }", "title": "" }, { "docid": "e1838b66cd80776697daec16c7a7cac6", "score": "0.5351614", "text": "protected function getSupportedScopes() {\n return array();\n }", "title": "" }, { "docid": "8631e051b03aeeeed6e9c1b874d9afa3", "score": "0.53472215", "text": "protected function getDefaultScopes()\n {\n return explode(',', $this->settings->get('fof-passport.app_oauth_scopes', ''));\n }", "title": "" }, { "docid": "c96ecf59475bb4407450b301177da97a", "score": "0.5327284", "text": "protected function scopes()\r\n {\r\n $tempMan = new TemplateManager('model/search_scope.txt', ['whereClause' => implode(\"\\n\", $this->modelBuilder->makeSearch())]);\r\n $scopes = implode(\"\\n\", array_reverse($this->modelBuilder->scopes));\r\n return $scopes . PHP_EOL . $tempMan->get();\r\n }", "title": "" }, { "docid": "d319e5d32b887ef01ab5849a8d193af5", "score": "0.53055227", "text": "function authorized($cliend_id, $scopes = array()) {\n\n\t\t$query = array(\n\t\t\t\"client_id\" => $cliend_id,\n\t\t\t\"uwap-userid\" => $this->getRealUserID(),\n\t\t);\n\t\t$result = $this->store->queryOne(\"consent\", $query);\n\n\t\tUWAPLogger::debug('auth', \n\t\t\t'Checking if authenticated user [' . $this->getRealUserID() . '] is also authorized to use client [' . $cliend_id . ']', \n\t\t\t$result);\n\n\t\tif (empty($result)) return $scopes;\n\n\t\tif (is_array($result['scopes'])) {\n\t\t\t$remaining = array_diff($scopes, $result['scopes']);\n\t\t\tif (empty($remaining)) return true;\n\t\t\treturn $remaining;\n\t\t}\n\t\treturn $scopes;\n\t}", "title": "" }, { "docid": "1eb9cf0793a7e99b62e9943b4b1b89ad", "score": "0.5293307", "text": "public function defaultScope()\n {\n $userId = Yii::app()->user->id;\n\t\t\n if(User::model()->findByPk($userId)->role == 'admin')\n\t\t\t{\n\t\t\t\t// No Restrictions\n\t\t\t\treturn array();\n\t\t\t}\n\t\telseif(User::model()->findByPk($userId)->role == 'district_admin')\n\t\t\t{\n\t\t\t\t// Return only Period in the District\n\t\t\t\t$userDistrictId = User::model()->findByPk($userId)->district_id;\n\t\t\t\treturn array('condition'=>'school_id IN (SELECT DISTINCT id FROM `school` WHERE district_id=\"' . $userDistrictId . '\")');\n\t\t\t}\n elseif(User::model()->findByPk($userId)->role == 'school_admin' || User::model()->findByPk($userId)->role == 'teacher')\n\t\t\t{\n\t\t\t\t// Returns Periods in the School\n\t\t\t\t$userSchoolId = User::model()->findByPk($userId)->school_id;\n\t\t\t\treturn array('condition'=>'school_id=\"' . $userSchoolId . '\"',);\n\t\t\t}\n }", "title": "" }, { "docid": "669c2a7e771d6d067b5fe1d31cae0a4b", "score": "0.52735054", "text": "public function setResourceScopes($val)\n {\n $this->_propDict[\"resourceScopes\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "71b800e6700e633488f6ef5297b2870c", "score": "0.5250509", "text": "public function testClientHasScope()\n {\n $scopeRepo = new ScopeRepository();\n $scopeList = ['members', 'scope1', 'scope2'];\n $scopes = [];\n\n foreach ($scopeList as $scope) {\n $scopes[] = $scopeRepo->getScopeEntityByIdentifier($scope);\n }\n\n $clientEntity = (new ClientRepository())->getClientEntity(\n 'Thisisanidentifier',\n 'client_credentials',\n 'Thisisareallybadsecret'\n );\n\n $finalizedScopes = $scopeRepo->finalizeScopes(\n $scopes,\n 'client_credentials',\n $clientEntity\n );\n\n $finalScopes = [];\n // convert into array of strings\n foreach ($finalizedScopes as $scope) {\n $finalScopes[] = $scope->getIdentifier();\n }\n\n $this->assertTrue(in_array('members', $finalScopes), 'Should have members scope');\n $this->assertTrue(in_array('scope1', $finalScopes), 'Should have scope1 scope');\n $this->assertFalse(in_array('scope2', $finalScopes), 'Should not have scope2 scope');\n }", "title": "" }, { "docid": "309f427a3c6bff7b07ff14e38bcfc4df", "score": "0.5225837", "text": "public function getScopes();", "title": "" }, { "docid": "309f427a3c6bff7b07ff14e38bcfc4df", "score": "0.5225837", "text": "public function getScopes();", "title": "" }, { "docid": "309f427a3c6bff7b07ff14e38bcfc4df", "score": "0.5225837", "text": "public function getScopes();", "title": "" }, { "docid": "309f427a3c6bff7b07ff14e38bcfc4df", "score": "0.5225837", "text": "public function getScopes();", "title": "" }, { "docid": "a360a73bf765d3e32b38557abe4566da", "score": "0.5194999", "text": "public static function scopes($scopes)\n {\n /** @var \\Illuminate\\Database\\Eloquent\\Builder $instance */\n return $instance->scopes($scopes);\n }", "title": "" }, { "docid": "234b477d247896a084ecfa23254bc509", "score": "0.5194913", "text": "public function getScope(string $scope = ScopeInterface::PROJECT);", "title": "" }, { "docid": "63e0500cc9602d48499fc773db27eefb", "score": "0.5184622", "text": "public function setOauthScopes($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::STRING);\n $this->oauth_scopes = $arr;\n\n return $this;\n }", "title": "" }, { "docid": "827ce71781f8f82384410c43f47e9eb9", "score": "0.51641285", "text": "public function setRequestedScopes(array $requestedScopes)\n {\n $this->requestedScopes = $requestedScopes;\n\n return $this;\n }", "title": "" }, { "docid": "1dfebbc7bbf455a5aaa465249df9a995", "score": "0.51447254", "text": "public function setLdapScopes(array|string $scopes = []): static\n {\n $this->scopes = Arr::wrap($scopes);\n\n return $this;\n }", "title": "" }, { "docid": "ba997154049d17443b43cd6fcb3f51da", "score": "0.51348525", "text": "public function setScopes(array $scopes) : oauth2\\Token\n {\n $this->scopes = [];\n\n foreach ($scopes as $scope) {\n $this->scopes[$scope] = true;\n }\n\n return $this;\n }", "title": "" }, { "docid": "1e17e68ab5510039bf9c691757033810", "score": "0.5134141", "text": "public function setScopes(array $scopes, bool $autoload = true);", "title": "" }, { "docid": "d50699059e258719b9e4fc438cab96d5", "score": "0.5118462", "text": "public function scope()\n {\n return [\n 'private',\n 'private',\n 'private',\n 'anonymous',\n ];\n }", "title": "" }, { "docid": "40cbc12eed96c15c2954f48a2b8b978d", "score": "0.5102232", "text": "public function getScopes()\n {\n return $this->checker->getAccessToken()->getScopes();\n }", "title": "" }, { "docid": "4bf52de1fd29e1dee9d8c3870e0290cb", "score": "0.50995624", "text": "public function getScope()\n {\n return $this->grantedScope;\n }", "title": "" }, { "docid": "32526564b8e73b5549e77c8bbdbaa84e", "score": "0.5091041", "text": "protected function populateScopes()\n {\n $scope = Yii::createObject('sweelix\\oauth2\\server\\models\\Scope');\n /* @var \\sweelix\\oauth2\\server\\models\\Scope $scope */\n $scope->id = 'basic';\n $scope->isDefault = true;\n $scope->definition = 'Basic Scope';\n $scope->save();\n\n $scope = Yii::createObject('sweelix\\oauth2\\server\\models\\Scope');\n /* @var \\sweelix\\oauth2\\server\\models\\Scope $scope */\n $scope->id = 'email';\n $scope->isDefault = false;\n $scope->definition = 'Email Scope';\n $scope->save();\n }", "title": "" }, { "docid": "9e8fff69d1a50221d3e4617526df8b86", "score": "0.5069509", "text": "public function getResourceScopes()\n {\n if (array_key_exists(\"resourceScopes\", $this->_propDict)) {\n if (is_a($this->_propDict[\"resourceScopes\"], \"\\Microsoft\\Graph\\Model\\AccessReviewScope\") || is_null($this->_propDict[\"resourceScopes\"])) {\n return $this->_propDict[\"resourceScopes\"];\n } else {\n $this->_propDict[\"resourceScopes\"] = new AccessReviewScope($this->_propDict[\"resourceScopes\"]);\n return $this->_propDict[\"resourceScopes\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "0ab8a36aaec988eeb7c2e4159805df67", "score": "0.5062763", "text": "public function setScope($scope);", "title": "" }, { "docid": "d12f4497b711933e094c2bfb5f2e9fe8", "score": "0.50616425", "text": "public function getPermissionsByScope ($scope) {\n $permissions = array();\n if(isset($_SESSION[\"loggedIn\"]))\n $permissions = $this->app->CoreManager->getPermissionsByScope(str_replace(\"private\", \"\", $scope));\n $this->app->response->headers->set('Content-Type', 'application/json');\n $this->app->response->body(json_encode($permissions));\n }", "title": "" }, { "docid": "d057599cecc03911a880787da668106c", "score": "0.50547075", "text": "public function finalizeScopes(\n\t\tarray $scopes,\n\t\t$grantType,\n\t\tClientEntityInterface $clientEntity,\n\t\t$userIdentifier = null\n\t) {\n\t\tunset($userIdentifier);\t// not used, but required by function signature\n\n\t\t// check if grantType is allowed for the client\n\t\tif ($grantType && ($limitGrants = $clientEntity->getGrants()) &&\n\t\t\t!in_array($grantType, $limitGrants))\n\t\t{\n\t\t\treturn [];\n\t\t}\n\n\t\t// check if scopes are allowed for the client\n\t\tif (($limitScopes = $clientEntity->getScopes()))\n\t\t{\n\t\t\t$scopes = array_filter($scopes, function($scope) use ($limitScopes)\n\t\t\t{\n\t\t\t\treturn in_array($scope->getIdentifier(), $limitScopes);\n\t\t\t});\n\t\t}\n\n\t\treturn $scopes;\n\t}", "title": "" }, { "docid": "1e097d599ee3bd4bdaca6b4e1396a167", "score": "0.5009714", "text": "function __construct(Array $scopes) {\n\t\t$request = rawurldecode($_SERVER['REQUEST_URI']);\n\t\tif (strpos($request, $_SERVER['SCRIPT_NAME']) === 0) {\n\t\t\t/* cut off path and filename of this script */\n\t\t\t$request = substr($request, 1 + strlen($_SERVER['SCRIPT_NAME']));\n\t\t} else {\n\t\t\t/* cut off path of this script */\n\t\t\t$request = substr($request, 1 + strlen(dirname($_SERVER['SCRIPT_NAME'])));\n\t\t}\n\t\t\n\t\t/* convert to array and remove empty entries, then rebuild keys */\n\t\t$requestArray = array_values(array_diff(explode('/', $request), array('')));\n\t\t/* glue back together to have a clean string */\n\t\t$request = implode('/', $requestArray);\n\t\t\n\t\t/* match scope */\n\t\tforeach (array_merge(self::$scopes, $scopes) as $scope) {\n\t\t\t/* scope = array(0=>type, 1=>match string) */\n\t\t\tswitch ($scope[0]) {\n\t\t\t\tcase self::MATCH_STRING:\n\t\t\t\t\t/* match string */\n\t\t\t\t\tif (strpos($request, $scope[1]) === 0) {\n\t\t\t\t\t\t$this->scope = explode('/', $scope[1]);\n\t\t\t\t\t\t/* adjust request data */\n\t\t\t\t\t\t$request = substr($request, strlen($scope[1]) + 1);\n\t\t\t\t\t\t$requestArray = array_slice($requestArray, count($this->scope));\n\t\t\t\t\t\t/* stop matching */\n\t\t\t\t\t\tbreak 2;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase self::MATCH_REGEX:\n\t\t\t\t\t/* match regex */\n\t\t\t\t\tif (preg_match('#^('.$scope[1].')(/|$)#', $request, $match)) {\n\t\t\t\t\t\t$this->scope = explode('/', $match[1]);\n\t\t\t\t\t\t/* adjust request data */\n\t\t\t\t\t\t$request = substr($request, strlen($match[1]) + 1);\n\t\t\t\t\t\t$requestArray = array_slice($requestArray, count($this->scope));\n\t\t\t\t\t\t/* stop matching */\n\t\t\t\t\t\tbreak 2;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* match album, file and action */\n\t\t/* search for the longest path that is a file or dir */\n\t\tfor ($i = 0; $i <= count($requestArray); $i++) {\n\t\t\t\n\t\t\t$path = dirname(__FILE__).DIRECTORY_SEPARATOR.implode(DIRECTORY_SEPARATOR, array_slice($requestArray, 0, count($requestArray) - $i));\n\t\t\t\n\t\t\t/* check if file */\n\t\t\tif (@is_file($path)) {\n\t\t\t\t$pos = max(0, count($requestArray) - $i - 1);\n\t\t\t\t$this->album = array_slice($requestArray, 0, $pos);\n\t\t\t\t$this->file = $requestArray[$pos];\n\t\t\t\tif (count($requestArray) > ($pos + 1)) {\n\t\t\t\t\t$this->action = array_slice($requestArray, $pos + 1);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (@is_dir($path)) {\n\t\t\t\t$pos = count($requestArray) - $i;\n\t\t\t\t$this->album = array_slice($requestArray, 0, $pos);\n\t\t\t\tif (count($requestArray) > $pos) {\n\t\t\t\t\t$this->action = array_slice($requestArray, $pos);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "fdffc577e1efbfe9986345eee224a1b5", "score": "0.50023335", "text": "private function getAttributeScopes(): array\n {\n $scopes = [\n ScopedAttributeInterface::SCOPE_STORE => __('Store View'),\n ScopedAttributeInterface::SCOPE_WEBSITE => __('Website'),\n ScopedAttributeInterface::SCOPE_GLOBAL => __('Global'),\n ];\n\n return $scopes;\n }", "title": "" }, { "docid": "965046e95ac6e0e2b87e99b6e9360269", "score": "0.4976427", "text": "public function checkScopes($scopes)\n\t{\n\t\t$valid_scopes = array_map(function($s)\n\t\t{\n\t\t\treturn $s['title'];\n\t\t}, $this->selOptions());\n\n\t\t$ids = [];\n\t\tforeach(is_array($scopes) ? $scopes : ($scopes ? explode(',', $scopes) : []) as $scope)\n\t\t{\n\t\t\tif (isset($valid_scopes[$scope]))\n\t\t\t{\n\t\t\t\t$ids[(int)$scope] = $valid_scopes[$scope];\n\t\t\t}\n\t\t\telseif(($id = array_search($scope, $valid_scopes)) !== false)\n\t\t\t{\n\t\t\t\t$ids[(int)$id] = $scope;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new WrongParameter(\"Invalid scope '$scope'!\");\n\t\t\t}\n\t\t}\n\t\treturn $ids;\n\t}", "title": "" }, { "docid": "04ec9d280d6785e5469c3b0cb2e71c06", "score": "0.49756104", "text": "public function getScopes()\n {\n return $this->getParameter('scope_column')\n ? explode(',', str_replace(' ', '', trim($this->getParameter('scope_column'))))\n : array();\n }", "title": "" }, { "docid": "8d04013dbeb6fa9e446fe46f46eeb955", "score": "0.49719694", "text": "public function getScopes() : array\n {\n return $this->scopes;\n }", "title": "" }, { "docid": "20c154969a612f039a5596e721f4cb42", "score": "0.4965923", "text": "protected function getDefaultScopes(): array\n {\n return ['openid'];\n }", "title": "" }, { "docid": "33a7038b605fc23151f2098b99f1e60a", "score": "0.49399826", "text": "public function overrideScopes(string $consumerKey, array $scopes): AppCredentialInterface;", "title": "" }, { "docid": "44e429a6cfbf113d0e33710f9c5e730a", "score": "0.49392244", "text": "abstract public function getDefaultScopes();", "title": "" }, { "docid": "ace62003a79851b8cb075ecdea4e1964", "score": "0.4937855", "text": "public function getAvailableScopes()\n {\n return [\n static::SCOPE_FRONTEND => Yii::t('cms', 'Frontend'),\n static::SCOPE_BACKEND => Yii::t('cms', 'Backend'),\n ];\n }", "title": "" }, { "docid": "d8de821ed4da7a4b6eca453c95dd046d", "score": "0.48896095", "text": "public function scopes()\n\t{\n\t\t$section = Section::blank();\n\n\t\t$db = \\App::get('db');\n\t\t$db->setQuery(\"\n\t\t\tSELECT DISTINCT s.scope, s.scope_id\n\t\t\tFROM \" . $section->getTableName() . \" AS s\n\t\t\tORDER BY s.scope, s.scope_id\n\t\t\");\n\n\t\t$results = $db->loadObjectList();\n\n\t\tif (!$results || !is_array($results))\n\t\t{\n\t\t\t$results = array();\n\t\t}\n\n\t\t$scope = $this->get('scope');\n\t\t$scope_id = $this->get('scope_id');\n\n\t\tforeach ($results as $i => $result)\n\t\t{\n\t\t\t$this->set('scope', $result->scope);\n\t\t\t$this->set('scope_id', $result->scope_id);\n\n\t\t\t$results[$i]->caption = $this->adapter()->name();\n\t\t}\n\n\t\t$this->set('scope', $scope);\n\t\t$this->set('scope_id', $scope_id);\n\n\t\treturn $results;\n\t}", "title": "" }, { "docid": "187767cbe374c2e904ff9b68a4c63da9", "score": "0.48881933", "text": "protected function validateScopes(array $originalScopes = [])\n\t{\n\t\treturn $this->scopeValidator->validate($originalScopes);\n\t}", "title": "" }, { "docid": "bd49aa8912a67ce3b1cd344e98f05567", "score": "0.48867038", "text": "protected function validateScopes($psr, $scopes)\n {\n if(empty($scopes)){\n throw new \\Exception(\"The token no scopes\",config('exceptions.SCOPE_INVALID'));\n }\n\n if (in_array('*', $tokenScopes = $psr->getAttribute('oauth_scopes'))) {\n return;\n }\n\n foreach ($scopes as $scope) {\n if (! in_array($scope, $tokenScopes)) {\n throw new \\Exception(\"The token no this scope[\".$scope.\"]\",config('exceptions.SCOPE_INVALID'));\n }\n }\n }", "title": "" }, { "docid": "5cb37f67f68768e5d570de0691d16d87", "score": "0.48598862", "text": "private function getScopes(): array\n {\n if (php_sapi_name() !== 'cli') {\n return ScopeHelper::forPassport();\n }\n\n return [];\n }", "title": "" }, { "docid": "f87a8610c227e5c059167f1fd6416aa9", "score": "0.48334226", "text": "public function getScopeNamesAsString() {\n //Get the scopes for the service \n $scopes = $this->getScopes();\n \n //Create an empty array to contain scope names\n $scopeNames= array();\n \n //populate the array\n foreach ($scopes as $scope){\n $scopeNames[]=$scope->getName();\n }\n \n sort($scopeNames);\n\n //Turn into a string\n $scopeNamesAsString = implode(\", \" , $scopeNames);\n \n return $scopeNamesAsString;\n }", "title": "" }, { "docid": "8b8164357d4adabdd6164899397c3b3e", "score": "0.4811739", "text": "protected function getDefaultScopes()\n {\n return ['aaaserver.profile.READ', 'ZohoProfile.userinfo.read', 'ZohoProfile.userphoto.read'];\n }", "title": "" }, { "docid": "a6dba23f42993aac3dc83c3b5e8c8d93", "score": "0.48081458", "text": "protected function getDefaultScopes()\n {\n return [];\n }", "title": "" }, { "docid": "a6dba23f42993aac3dc83c3b5e8c8d93", "score": "0.48081458", "text": "protected function getDefaultScopes()\n {\n return [];\n }", "title": "" }, { "docid": "a6dba23f42993aac3dc83c3b5e8c8d93", "score": "0.48081458", "text": "protected function getDefaultScopes()\n {\n return [];\n }", "title": "" }, { "docid": "a6dba23f42993aac3dc83c3b5e8c8d93", "score": "0.48081458", "text": "protected function getDefaultScopes()\n {\n return [];\n }", "title": "" }, { "docid": "a6dba23f42993aac3dc83c3b5e8c8d93", "score": "0.48081458", "text": "protected function getDefaultScopes()\n {\n return [];\n }", "title": "" }, { "docid": "a6dba23f42993aac3dc83c3b5e8c8d93", "score": "0.48081458", "text": "protected function getDefaultScopes()\n {\n return [];\n }", "title": "" }, { "docid": "e0fe787a089a2e60600ded4b6cfd97e3", "score": "0.48004735", "text": "public function scopes() {\n return array(\n 'withRelated' => array(\n 'with' => array(\n 'weapon' => array(\n 'alias' => 'characterEquipmentWeapon' . self::getScopeCounter(),\n 'scopes' => 'withRelated'\n ),\n 'offhand' => array(\n 'alias' => 'characterEquipmentOffhand' . self::getScopeCounter(),\n 'scopes' => 'withRelated'\n ),\n 'accessoryA' => array(\n 'alias' => 'characterEquipmentAccessoryA' . self::getScopeCounter(),\n 'scopes' => 'withRelated'\n ),\n 'accessoryB' => array(\n 'alias' => 'characterEquipmentAccessoryB' . self::getScopeCounter(),\n 'scopes' => 'withRelated'\n ),\n 'accessoryC' => array(\n 'alias' => 'characterEquipmentAccessoryC' . self::getScopeCounter(),\n 'scopes' => 'withRelated'\n ),\n )\n )\n );\n }", "title": "" }, { "docid": "6e248ab4d21471ba8d79dca378813e8d", "score": "0.47766253", "text": "protected function setScopes($scopes)\n {\n $this->get('session')->set('Taskeet\\MainBundle\\Dashboard\\Scopes', $scopes);\n }", "title": "" }, { "docid": "a435a162ad51a367349078ba9884f762", "score": "0.47580066", "text": "public function set_Scope($scope_in) {\n $this->scope = $scope_in;\n }", "title": "" }, { "docid": "64e5007068e2bf8b0164c146f75ab400", "score": "0.47579047", "text": "private function register_scopes_hook() {\n\t\tadd_filter(\n\t\t\t'googlesitekit_auth_scopes',\n\t\t\tfunction( array $scopes ) {\n\t\t\t\treturn array_merge( $scopes, $this->get_scopes() );\n\t\t\t}\n\t\t);\n\t}", "title": "" }, { "docid": "74c65c7fac39241f65049f0dcf8040af", "score": "0.47557512", "text": "public function getScopeNamesAsString() {\n //Get the scopes for the service\n $scopes = $this->getScopes();\n\n //Create an empty array to contain scope names\n $scopeNames= array();\n\n //populate the array\n foreach ($scopes as $scope){\n $scopeNames[]=$scope->getName();\n }\n\n sort($scopeNames);\n\n //Turn into a string\n $scopeNamesAsString = implode(\", \" , $scopeNames);\n\n return $scopeNamesAsString;\n }", "title": "" }, { "docid": "27ce4230fddd8d4188c579a9b34e3020", "score": "0.47436637", "text": "public function get_scopes() {\n\n\t\t$scopes = array(\n\t\t\t'manage_business_extension',\n\t\t\t'catalog_management',\n\t\t\t'ads_management',\n\t\t\t'ads_read',\n\t\t\t'pages_read_engagement', // this scope is needed to enable order management if using the Commerce feature\n\t\t\t'instagram_basic',\n\t\t);\n\n\t\t/**\n\t\t * Filters the scopes that will be requested during the connection flow.\n\t\t *\n\t\t * @since 2.0.0\n\t\t *\n\t\t * @param string[] $scopes connection scopes\n\t\t * @param Connection $connection connection handler instance\n\t\t */\n\t\treturn (array) apply_filters( 'wc_facebook_connection_scopes', $scopes, $this );\n\t}", "title": "" }, { "docid": "690ea38538a6ccd43304ab79bbba61ba", "score": "0.47412392", "text": "protected function scopes(&$query)\n {\n // Concrete class can implement a scopes filter\n // This is in addition of the filters\n }", "title": "" }, { "docid": "e92b07e0ce8bdf2d865f22ef29899d3c", "score": "0.4720089", "text": "protected function getScope(array $configuration): array\n {\n return $configuration['scopes_supported'];\n }", "title": "" }, { "docid": "252c07abcde82a0ae116147e056670cc", "score": "0.47186643", "text": "public function getRequiredScope()\n {\n return \"r_basicprofile r_emailaddress\";\n }", "title": "" }, { "docid": "d9fde37c191148589b9d77c7988d7e7e", "score": "0.47141534", "text": "protected function getSupportedScopes()\n {\n static $scope = null;\n if (!\\is_object($scope)) {\n $scope = new Scope();\n }\n\n return $scope;\n }", "title": "" }, { "docid": "c13e0bb3602c075e7d2212d393b11a7e", "score": "0.4700202", "text": "public function setScope($value)\n {\n $this->setProperty(\"Scope\", $value, true);\n }", "title": "" }, { "docid": "4636c3bffe6f056e2bc41030e278e669", "score": "0.4690861", "text": "public function getDefaultScopes()\n {\n return $this->defaultScopes;\n }", "title": "" }, { "docid": "3ac19ed3f7962d47f1f66fd3e6f637dd", "score": "0.4685814", "text": "public function getAllowedParams() {\n\t\t$autoreviewLevels = FlaggedRevs::getRestrictionLevels();\n\t\t$autoreviewLevels[] = 'none';\n\t\treturn array(\n\t\t\t'protectlevel' => array(\n\t\t\t\tApiBase :: PARAM_TYPE => $autoreviewLevels,\n\t\t\t\tApiBase :: PARAM_DFLT => 'none',\n\t\t\t),\n\t\t\t'expiry' => 'infinite',\n\t\t\t'reason' => '',\n\t\t\t'watch' => null,\n\t\t\t'token' => null,\n\t\t\t'title' => null,\n\t\t);\n\t}", "title": "" }, { "docid": "6d22329af4bf1087f2d35df6e72fc3b1", "score": "0.46838054", "text": "public function getScopeNamesAsString() {\n //Get the scopes for the NGI\n $scopes = $this->getScopes();\n \n //Create an empty array to contain scope names\n $scopeNames= array();\n \n //populate the array\n foreach ($scopes as $scope){\n $scopeNames[]=$scope->getName();\n }\n \n sort($scopeNames);\n\n //Turn into a string\n $scopeNamesAsString = implode(\", \" , $scopeNames);\n \n return $scopeNamesAsString;\n }", "title": "" }, { "docid": "adaf360f75d2beb27e8b701e07206c79", "score": "0.46767616", "text": "public function getOauthScopes()\n {\n return $this->oauth_scopes;\n }", "title": "" }, { "docid": "ab06699c34881c14323a9893157cdcd7", "score": "0.46750715", "text": "protected function getDefaultScopes()\n {\n // TODO: Implement getDefaultScopes() method.\n }", "title": "" }, { "docid": "2270a8be58b6901ca04cf01e57726428", "score": "0.46663648", "text": "public function getDefaultScopes()\n {\n return null;\n }", "title": "" }, { "docid": "601795bc4d8b725b67f709cfe1dfd88e", "score": "0.4665041", "text": "public function remove_scopes($scopes) {\n\t\t$this->client->RemoveScopes(\n\t\t\t$scopes\n\t\t);\n\t}", "title": "" }, { "docid": "1f16cac3bfb507c62ddeff24b41952da", "score": "0.4664443", "text": "public function scopes()\n {\n \treturn array(\n \t\t\t'getList'=>array(\n \t\t\t\t\t'hasmany'=>true,\n \t\t\t),\n \t\t\t'getByVtype'=>array(\n \t\t\t\t\t'hasmany'=>true,\n \t\t\t\t\t'condition'=>'vtype=:vtype',\n \t\t\t\t\t),\n \t\t\t'getBySeriesid'=>array(\n \t\t\t\t\t'hasmany'=>true,\n \t\t\t\t\t'join'=>\"left join groupseries b on b.groupid=t.id where b.seriesid=:seriesid\"\n \t\t\t\t\t),\n \t\t\t'getByCtime10'=>array(\n \t\t\t\t\t'hasmany'=>true,\n \t\t\t\t\t'condition'=>'vtype=:vtype and areashow=:areashow',\n \t\t\t\t\t'order'=>'ctime desc',\n \t\t\t\t\t'limit'=>10,\n \t\t\t\t\t),\n \t\t\t'getByLove10'=>array(\n \t\t\t\t\t'hasmany'=>true,\n \t\t\t\t\t'condition'=>'vtype=:vtype and catesum&:catesum=:catesum',\n \t\t\t\t\t'order'=>'ctime desc',\n \t\t\t\t\t'limit'=>10,\n \t\t\t)\n \t);\n }", "title": "" }, { "docid": "9ee326877e47496f389e2b669dd2b853", "score": "0.4656254", "text": "public function getScopesApproved()\n {\n $scopesApproved = [];\n\n foreach ($this->getModuleResults()->toArray() as $moduleResult) {\n $scopesApproved += $moduleResult->scopesApproved ?? [];\n }\n \n return $scopesApproved + $this->defaultScopes;\n }", "title": "" }, { "docid": "d205dcdf3227b9b78fa0f9dff8f07296", "score": "0.46525297", "text": "public function getDefaultScopes() : ?string\n {\n return $this->scopes;\n }", "title": "" }, { "docid": "1ba964226cc3b3ca1a77a498496344bf", "score": "0.46412012", "text": "public static function getRestriction(): Restriction\n {\n return Restriction::fromArray([Hooks::PRE_COMMIT]);\n }", "title": "" }, { "docid": "5814ae72e33154f81174fed1365dea3f", "score": "0.46341532", "text": "public function appliedScopes()\n {\n return $this->appliedScopes;\n }", "title": "" }, { "docid": "74a04c0b18e4ef62d3f8bebb64d6a6fa", "score": "0.46171528", "text": "protected function getDefaultScopes()\n {\n return $this->defaultScopes;\n }", "title": "" }, { "docid": "74a04c0b18e4ef62d3f8bebb64d6a6fa", "score": "0.46171528", "text": "protected function getDefaultScopes()\n {\n return $this->defaultScopes;\n }", "title": "" }, { "docid": "e280aedc7ee626285be749f81f97c76d", "score": "0.46067885", "text": "public function setScope($scope): self\n {\n if (blank($scope)) {\n $scope = 'https://graph.microsoft.com/.default';\n }\n\n if ($scope == 'https://graph.microsoft.com/.default') {\n $this->scope = $scope;\n\n return $this;\n }\n\n if (Str::startsWith($scope, 'api://') && Str::endsWith($scope, '/.default')) {\n $this->scope = $scope;\n\n return $this;\n }\n\n $this->scope = \"api://{$scope}/.default\";\n\n return $this;\n }", "title": "" }, { "docid": "25e38d96b2a1a87a30eda755ab0f1b72", "score": "0.45914003", "text": "function df_scope() {\n\t$result = null; /** @var array(string, int) $result */\n\tforeach ([SS::SCOPE_WEBSITE => SS::SCOPE_WEBSITES, SS::SCOPE_STORE => SS::SCOPE_STORES] as $s => $ss) {\n\t\tif (!is_null($id = df_request($s))) { /** @var int|null $id */\n\t\t\t$result = [$ss, $id];\n\t\t\tbreak;\n\t\t}\n\t}\n\t/**\n\t * 2017-08-10\n\t * The same constant is also defined in the following places:\n\t * 1) @see \\Magento\\Config\\Block\\System\\Config\\Form::SCOPE_DEFAULT:\n\t * \t\tconst SCOPE_DEFAULT = 'default';\n\t * https://github.com/magento/magento2/blob/2.2.0-RC1.8/app/code/Magento/Config/Block/System/Config/Form.php#L25\n\t * 2) @see \\Magento\\Framework\\App\\Config\\ScopeConfigInterface::SCOPE_TYPE_DEFAULT\n\t * \t\tconst SCOPE_TYPE_DEFAULT = 'default';\n\t * https://github.com/magento/magento2/blob/2.2.0-RC1.8/lib/internal/Magento/Framework/App/Config/ScopeConfigInterface.php#L16-L19\n\t *\n\t * 2017-10-22\n\t * Note 1.\n\t * The @see \\Magento\\Framework\\App\\ScopeInterface::SCOPE_DEFAULT constant is absent in Magento <= 2.2.0:\n\t * https://github.com/magento/magento2/blob/2.1.9/lib/internal/Magento/Framework/App/ScopeInterface.php\n\t * https://github.com/magento/magento2/blob/2.2.0/lib/internal/Magento/Framework/App/ScopeInterface.php#L13-L16\n\t * «Undefined class constant 'SCOPE_DEFAULT' in mage2pro/core/Config/lib/scope.php on line 36»:\n\t * https://github.com/mage2pro/core/issues/39\n\t * The bug was introduced at 2017-08-10 in the 2.10.12 release:\n\t * https://github.com/mage2pro/core/releases/tag/2.10.12\n\t *\n\t * Note 2.\n\t * The @see \\Magento\\Framework\\App\\Config\\ScopeConfigInterface::SCOPE_TYPE_DEFAULT constant\n\t * exists in all the Magento 2 versions:\n\t * https://github.com/magento/magento2/blob/2.0.0/lib/internal/Magento/Framework/App/Config/ScopeConfigInterface.php#L16-L19\n\t * It is not deprecated in Magento 2.2.0:\n\t * https://github.com/magento/magento2/blob/2.2.0/lib/internal/Magento/Framework/App/Config/ScopeConfigInterface.php#L16-L19\n\t *\n\t * Note 3.\n\t * The @see \\Magento\\Config\\Block\\System\\Config\\Form::SCOPE_DEFAULT constant exists in all the Magento 2 versions:\n\t * https://github.com/magento/magento2/blob/2.0.0/app/code/Magento/Config/Block/System/Config/Form.php#L16\n\t * It is not deprecated in Magento 2.2.0:\n\t * https://github.com/magento/magento2/blob/2.2.0/app/code/Magento/Config/Block/System/Config/Form.php#L26\n\t */\n\treturn $result ?: [IScopeConfig::SCOPE_TYPE_DEFAULT, 0];\n}", "title": "" }, { "docid": "ceceff9b29922ebcf22e951a96f304ef", "score": "0.4590057", "text": "public function withoutGlobalScopes($scopes);", "title": "" }, { "docid": "26ff9871d933c47c99a999152f9787f8", "score": "0.45806187", "text": "public function __construct($client_id, $client_secret, array $scopes = [])\r\n {\r\n // restrict client id\r\n if (empty($client_id)) {\r\n Error::setError(Error::EMPTY_CLIENT_ID);\r\n }\r\n $this->client_id = $client_id;\r\n\r\n // restrict client secret\r\n if (empty($client_secret)) {\r\n Error::setError(Error::EMPTY_CLIENT_SECRET);\r\n }\r\n $this->client_secret = $client_secret;\r\n\r\n // set scope\r\n $this->scopes = $scopes;\r\n }", "title": "" }, { "docid": "2a8f21ad0ab0fd95619731754ee58282", "score": "0.45702687", "text": "public function setScope($value)\n {\n return $this->set('Scope', $value);\n }", "title": "" }, { "docid": "cbd670f6ea56e5afdaf4c651bec493ac", "score": "0.45690897", "text": "public function setRightScope($rightScope) {\r\n\t\t$this->restrictedRightScope = $rightScope;\r\n\t}", "title": "" }, { "docid": "e088c9605b9d6af21155bc431717b332", "score": "0.4539568", "text": "public function setRestrictions();", "title": "" }, { "docid": "5734626159858dd7a58dfae221c429ec", "score": "0.45343253", "text": "public function finalizeScopes(array $scopes, $grantType, ClientEntityInterface $clientEntity, $userIdentifier = null) {\n return $this->findBy(['scope' => $scopes]);\n }", "title": "" }, { "docid": "c947286e2f419333490c79bd4715b0cb", "score": "0.45297787", "text": "public function getMinimumScopes()\n {\n // TODO: Implement getMinimumScopes() method.\n }", "title": "" }, { "docid": "765eae96a6fe84648bd3e98f9ba90e23", "score": "0.45250306", "text": "protected function checkScope(\n Request $request,\n $clientId,\n $username,\n $redirectUri,\n $state\n ) {\n $scope = $request->query->get('scope');\n if (empty($scope)) {\n return;\n }\n\n // scope must be in valid format.\n $errors = $this->validator->validate($scope, [\n new \\Symfony\\Component\\Validator\\Constraints\\NotBlank(),\n new \\AuthBucket\\OAuth2\\Symfony\\Component\\Validator\\Constraints\\Scope(),\n ]);\n if (count($errors) > 0) {\n throw new InvalidRequestException([\n 'redirect_uri' => $redirectUri,\n 'state' => $state,\n 'error_description' => 'The request includes an invalid parameter value.',\n ]);\n }\n\n $scope = preg_split('/\\s+/', $scope);\n\n // Compare if given scope within all supported scopes.\n $scopeSupported = [];\n $scopeManager = $this->modelManagerFactory->getModelManager('scope');\n $result = $scopeManager->readModelAll();\n if ($result !== null) {\n foreach ($result as $row) {\n $scopeSupported[] = $row->getScope();\n }\n }\n if (array_intersect($scope, $scopeSupported) !== $scope) {\n throw new InvalidScopeException([\n 'redirect_uri' => $redirectUri,\n 'state' => $state,\n 'error_description' => 'The requested scope is unknown.',\n ]);\n }\n\n // Compare if given scope within all authorized scopes.\n $scopeAuthorized = [];\n $authorizeManager = $this->modelManagerFactory->getModelManager('authorize');\n /** @var AuthorizeInterface $result */\n $result = $authorizeManager->readModelOneBy([\n 'clientId' => $clientId,\n 'username' => $username,\n ]);\n if ($result !== null) {\n $scopeAuthorized = $result->getScope();\n }\n if (array_intersect($scope, $scopeAuthorized) !== $scope) {\n throw new InvalidScopeException([\n 'redirect_uri' => $redirectUri,\n 'state' => $state,\n 'error_description' => 'The requested scope is invalid.',\n ]);\n }\n\n if (!in_array(static::GRANT_TYPE, $result->getGrantType())) {\n throw new InvalidGrantException([\n 'state' => $state,\n 'error_description' => 'The requested grant is invalid.',\n ]);\n }\n\n return $scope;\n }", "title": "" } ]
386b16adbd369b1468a7793a311b7653
/ Funcion que obtiene los colores de un producto
[ { "docid": "b39c4ba63424bee5b50f7394b9ff6534", "score": "0.7091757", "text": "function getColoresProducto($id){\n /* \n * SELECT co.nombre \n * FROM colores co, productos_colores pc\n * WHERE pc.fk_colores = co.id AND pc.fk_productos = 1\n */\n $query = $this->db->select('co.id, co.nombre');\n $query = $this->db->from('colores co, productos_colores pc');\n $query = $this->db->where('pc.fk_colores = co.id');\n $query = $this->db->where('pc.fk_productos', $id);\n $query = $this->db->get();\n $colores = array();\n foreach ( $query->result_array() as $row){\n $colores[] = $row;\n }\n return $colores;\n }", "title": "" } ]
[ { "docid": "eeb8bfeebbb98d6a342bfd908c4afede", "score": "0.71711576", "text": "public function getColores($talla=null)\n\t{\n\t\t//foreach ($this->with(array('preciotallacolor'=>array('condition'=>'Preciotallacolor.color_id == '.$color))) as $producto){\n\t\t//\t$co = Color::model()->findByPk($p->color_id);\n\t\t//}\n\t\tif ($talla == null)\n\t\t\t$ptc = Preciotallacolor::model()->findAllByAttributes(array('producto_id'=>$this->id));\n\t\telse\n\t\t\t$ptc = Preciotallacolor::model()->findAllByAttributes(array('talla_id'=>$talla,'producto_id'=>$this->id));\n\t\t$datos = array();\n\t\tforeach($ptc as $p)\n\t\t{\n\t\t\t\n\t\t\t\n\t\t\t$ta = Color::model()->findByPk($p->color_id);\n\t\t\t$datos[$ta->id]=$ta->valor;\n\t\t\t//array_push($datos,$ta->id);\n\t\t\t//array_push($datos,$ta->valor); // para cada talla guardo su id y su valor\n\t\t\t\n\t\t\t\n\t\t}\t\t\n\t\treturn $datos;\n\t}", "title": "" }, { "docid": "2a52897bf93bf24d91ef56716adf960a", "score": "0.68403304", "text": "public function ListarColores($data){\n $query = \"SELECT * FROM productos WHERE cat_id='\".$this->_codigo.\"'\".$data;\n \n $this->_db->Query($query);\n $rows = array();\n while ($row = $this->_db->FetchAssoc()) {\n $rows[] = $row;\n }\n return $rows;\n }", "title": "" }, { "docid": "2a52897bf93bf24d91ef56716adf960a", "score": "0.68403304", "text": "public function ListarColores($data){\n $query = \"SELECT * FROM productos WHERE cat_id='\".$this->_codigo.\"'\".$data;\n \n $this->_db->Query($query);\n $rows = array();\n while ($row = $this->_db->FetchAssoc()) {\n $rows[] = $row;\n }\n return $rows;\n }", "title": "" }, { "docid": "a49cee647b64fcaecbcfe0529e432895", "score": "0.6717165", "text": "public function listColores($id_producto) {\n\t\t$sql = \"select * from stock_color where id_producto='$id_producto' and stock>0\";\n\t\t$query = $this->db->query($sql);\n\t\treturn $query->result(); \n\t}", "title": "" }, { "docid": "f3844dfaf9e3d155a56284b5c18c402c", "score": "0.6509937", "text": "function getCartoneros()\n {\n $query = $this->db->prepare('SELECT * FROM cartonero');\n $query->execute();\n return $query->fetchAll(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "f871c09e78946f7e4b0a3460e1761ece", "score": "0.64628476", "text": "public static function get_cursos(){\n\t\t$cursos = array();\n\t\t$args = array(\n\t 'post_type' => 'product',\n\t 'posts_per_page' => -1,\n\t 'tax_query' => array(\n\t\t array(\n\t\t 'taxonomy' => 'product_type',\n\t\t 'field' => 'slug',\n\t\t 'terms' => 'simple_course',\n\t\t ),\n\t\t ),\n\t \t);\n\t\t$cursos_query = new WP_Query( $args );\n\t if ( ! $cursos_query->have_posts() ) return $cursos;\n\n\t while ( $cursos_query->have_posts() ) : $cursos_query->the_post();\n\t \t$curso = new YC_Curso( $cursos_query->post->ID );\n\t\t\tarray_push( $cursos, $curso );\n\t\tendwhile; wp_reset_postdata();\n\t\treturn $cursos;\n\t}", "title": "" }, { "docid": "891fa6afff16633f06314d8dec13d222", "score": "0.63382006", "text": "public function listarCentroCostos()\n\t {\n\t \t$em = $this->getEntityManager();\n\t\t$repo = $em->getRepository('MbpFinanzasBundle:CentroCostos');\n\t\t\n\t\t$res = $repo->createQueryBuilder('c')\n\t\t\t\t->select('')\n\t\t\t\t->getQuery()\n\t\t\t\t->getArrayResult();\n\t\t\t\t\n\t\treturn $res;\n\t }", "title": "" }, { "docid": "45f5e8db27ed91a6138099fe3f97b9b1", "score": "0.6321742", "text": "public function getCarrito(){\n\t\t$sql = \"SELECT IdCarrito, p.Nombre, p.Costo, c.Cantidad FROM carrito c, producto p where p.IdProducto = c.IdProducto and c.IdCliente=? and EstadoCompra=0\";\n\t\t$params = array($this->id);\n\t\treturn Database::getRows($sql, $params);\n }", "title": "" }, { "docid": "c20c3a7e3d452b03edbf6268f6fb399f", "score": "0.6292466", "text": "function get_cproductos_detalles() {\n\t\t$u = new Producto();\n\t\t$sql = \"select p.id as cproducto_id, pn.id as producto_numero_id, p.descripcion, 'Par' as unidad_medida, pn.numero_mm,mp.tag as marca_producto, psf.tag as subfamilia_producto, eg.tag as estatus, pf.tag as familia_producto, pm.tag as material, pc.tag as color from cproductos as p left join cproductos_numeracion as pn on pn.cproducto_id=p.id left join cmarcas_productos as mp on mp.id=p.cmarca_producto_id left join cproductos_subfamilias as psf on psf.id=p.csubfamilia_id left join cproductos_familias as pf on pf.id=p.cfamilia_id left join cproductos_material as pm on p.cmaterial_id=pm.id left join cproductos_color as pc on pc.id=p.ccolor_id left join cmarcas_productos as cmp on cmp.id=p.cmarca_producto_id left join estatus_general as eg on eg.id=p.estatus_general_id where p.estatus_general_id='1' order by familia_producto, descripcion\";\n\t\t//Buscar en la base de datos\n\t\t$u->query($sql);\n\t\tif ($u->c_rows > 0) {\n\t\t\treturn $u;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "8cb105f54dc29b147f237007dd13ffca", "score": "0.62660843", "text": "public function getCategoriaProductos(){\n\t\t$sql = \"SELECT nombre_categoria, id_producto, imagen_producto, nombre_producto, descripcion_producto, precio_producto FROM productos INNER JOIN categorias USING(id_categoria) WHERE id_categoria = ? AND estado_producto = 1 ORDER BY nombre_producto\";\n\t\t$params = array($this->categoria);\n\t\treturn Database::getRows($sql, $params);\n\t}", "title": "" }, { "docid": "1d57288c365c142c859d0f936f648564", "score": "0.62566245", "text": "function ConsultarTiposCuerpo()\n\t{\n\t\t//Buscando los tipos de cuerpo existentes\n\t\t$consultar = new Consultar();\n\t\t$result = $consultar->_ConsultarTiposCuerpo();\n\t\t$num_rows = $result->num_rows;\n\t\t$cuerpos = array();\n\n\t\tfor($i=0; $i<$num_rows; $i++)\n\t\t{\n\t\t\t$fila = $result->fetch_assoc();\n\t\t\t$cuerpo = array(\"id\"=>$fila['id'],\"nb_cuerpo\"=>$fila['nb_cuerpo'],\n\t\t\t\t \"desc_tipocuerpo\"=>$fila['desc_tipocuerpo'],\n\t\t\t\t \"url_img\"=>$fila['url_img']);\n\t\t\tarray_push($cuerpos, $cuerpo);\n\t\t}//for\n\t\t\n\t\treturn $datos = array(\"cuerpos\"=>$cuerpos);\n\t}", "title": "" }, { "docid": "5b6291c35f7aefd9e0cbdef189fe7118", "score": "0.6254039", "text": "public function listar_productos(){\n $stmt=$this->conexion->conectar()->prepare(\"\n SELECT * FROM cli_pro INNER JOIN productos ON cli_pro.id_cli_pro=productos.id_vendedor INNER JOIN categorias ON productos.categoria=categorias.id_categoria WHERE categoria=id_categoria AND condicion=1\");\n $stmt->execute();\n return $stmt->fetchAll();\n $stmt->closeCursor();\n }", "title": "" }, { "docid": "09eaa53a1ba80381eac77432c752404c", "score": "0.6244977", "text": "public function obtener_ciclos_valores(){\n\t\t$query = \"SELECT ID_Ciclo, DESC_Centro, COD_Curso, COD_Ciclo, DESC_Ciclo FROM Ciclo, Curso, Centro WHERE Ciclo.ID_Centro=Centro.ID_Centro and Ciclo.ID_Curso= Curso.ID_Curso\";\n\t\t$query = $this->db->query($query);\n\t\tif ($query->num_rows() > 0){\n\t\t\treturn $query;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "794f85cd41bdc05becd06ce2295efbe7", "score": "0.61962396", "text": "function getColores(){\n /*\n * SELECT *\n * FROM colores\n */\n $query = $this->db->select('*');\n $query = $this->db->from('colores');\n $query = $this->db->get();\n $colores = array();\n foreach ($query->result_array() as $row){\n $colores[] = $row;\n }\n return $colores;\n }", "title": "" }, { "docid": "78f05ecf7d1d6b21974f9d5554f4e719", "score": "0.61651874", "text": "private function getComprasClientes(){\n $comprasClientesRepository = new ComprasClientesRepository();\n $comprasClientes = $comprasClientesRepository->getFechasRecompraPorProducto();\n $this->resultados = $comprasClientes;\n }", "title": "" }, { "docid": "1379e2a4c389f99990fe0f35e114d954", "score": "0.6145807", "text": "public function getCOficina() \n\t{\n\t\treturn $this->cOficina;\n\t}", "title": "" }, { "docid": "18dd81840d99eb25aca2e963bedfe132", "score": "0.61386555", "text": "public function coils()\n {\n $view = new View();\n $product = new ProductModel(); // создаю модель\n $view->products = $product->coilsProd();\n $view->render('product_coils.php', 'default_view.php');\n }", "title": "" }, { "docid": "6ed808cd6271769df2b72a0d9d1c5697", "score": "0.61220706", "text": "private static function insertarColores($producto) \r\n {\r\n\t\t$id = $producto->id;\r\n\t\t\r\n\t\t$query1 = \"DELETE FROM colores_productos WHERE idProducto = :idProducto\";\r\n\t\t$stmt = DBConnection::getStatement($query1);\r\n\t\t$stmt->bindParam(':idProducto', $id,PDO::PARAM_INT );\r\n\t\t\r\n\t\tif(!$stmt->execute()) {\r\n\t\t\tthrow new Exception(\"Error en el borrado de la relacion con los colores.\");\r\n\t\t}\r\n\t\t\r\n\t\tforeach($producto->color as $idColor) {\r\n\t\t\t$query = \"INSERT INTO colores_productos (idProducto,idColor) values (:idProducto, :idColor)\";\r\n\t\t \r\n\t\t\t$stmt = DBConnection::getStatement($query);\r\n\t\t\t\r\n\t\t\t$stmt->bindParam(':idProducto', $id,PDO::PARAM_INT );\r\n\t\t\t$stmt->bindParam(':idColor', $idColor,PDO::PARAM_INT );\r\n\t\t\t\r\n\t\t\tif (!$stmt->execute()) {\r\n\t\t\t\tthrow new Exception(\"Error en el insertado de la relacion con los colores.\");\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "69cff87c0a93c631924f471e85a26140", "score": "0.611431", "text": "public function getCarreraCursos()\r\n {\r\n return $this->carreraCursos;\r\n }", "title": "" }, { "docid": "61378d1a99878a15112fddb0316d87a2", "score": "0.60997146", "text": "public function obtenerCajasProductos($productos = array(), $modelo = '')\n\t{\t\n\t\tforeach ($productos as $ip => $producto) {\n\t\t\t$product_width = (float) $producto[$modelo]['width'];\n\t\t\t$product_height = (float) $producto[$modelo]['height'];\n\t\t\t$product_depth = (float) $producto[$modelo]['depth'];\n\t\t\t$values = array(\n $product_width,\n $product_height,\n $product_depth\n );\n \n sort($values);\n\n $boxes[] = array_combine(array('height', 'width', 'length'), $values);\n\t\t}\n\n\t\treturn $boxes;\n\t}", "title": "" }, { "docid": "4e587c16a6220d76bd382be09a9176b8", "score": "0.60944086", "text": "public function get_all_centro()\n {\n\t\t$idcentro = $this->session->userdata('idcentro');\n $this->db->order_by('idsocios', 'DESC');\n\t\t\t\t$query = $this->db->get_where('socios', array('idcentro' => $idcentro));\n\n return $query->result();\n }", "title": "" }, { "docid": "72914c4d0ed3914834aa5217f1a2369e", "score": "0.6075435", "text": "public function lista_productos_categoria_compra( $cod_categoria ){\n\t\t\t\n\t\t\t// VARIABLES\n\t\t\t$lista = \"\";\n\n\t\t\t// CUERPO\n\t\t\t// Abro la conexion a la base de datos\n\t\t\t$con = $this->conexion();\n\n\t\t\t// Primero cuento la cantidad de productos que hay con el codigo de familia elegido\n\t\t\t$consulta = $con->prepare( \"SELECT COUNT(*) AS cantidad FROM producto WHERE cod_categoria = ?\" );\n\t\t\t$consulta->bindValue( 1, $cod_categoria );\n\t\t\t$consulta->execute();\n\t\t\t$temporal = $consulta->fetch( PDO::FETCH_ASSOC );\n\t\t\t$cantidad = $temporal['cantidad'];\n\n\t\t\t// Dependiendo del resultado, se dan las siguientes opciones\n\t\t\tif( $cantidad == 0 ){\t\n\t\t\t\t\n\t\t\t\t$lista .= \"No hay productos en existencia de la categoria seleccionada\";\n\t\t\t}else{\n\n\t\t\t\t// Inicializacion de variables\n\t\t\t\t$productos = array();\n\t\t\t\t$cantidad = 0;\n\n\t\t\t\t$consulta = $con->prepare( \t\"\n\t\t\t\t\t\t\t\t\t\t\t\tSELECT \n\t\t\t\t\t\t\t\t\t\t\t\t\tp.cod_familia AS codigo_familia,\n\t\t\t\t\t\t\t\t\t\t\t\t\tp.cod_producto AS codigo_producto,\n\t\t\t\t\t\t\t\t\t\t\t\t\tp.cod_categoria AS codigo_categoria, \n\t\t\t\t\t\t\t\t\t\t\t\t\tprocat.descripcion AS categoria,\n\t\t\t\t\t\t\t\t\t\t\t\t\tpromar.descripcion AS marca,\n\t\t\t\t\t\t\t\t\t\t\t\t\tpromod.descripcion AS modelo,\n\t\t\t\t\t\t\t\t\t\t\t\t\tprocol.descripcion AS color,\n\t\t\t\t\t\t\t\t\t\t\t\t\tpropla.descripcion AS plataforma,\n\t\t\t\t\t\t\t\t\t\t\t\t\tp.precio_venta AS precio_venta, \n\t\t\t\t\t\t\t\t\t\t\t\t\tp.descripcion AS descripcion\n\t\t\t\t\t\t\t\t\t\t\t\tFROM producto AS p\n\t\t\t\t\t\t\t\t\t\t\t\tJOIN producto_categoria AS procat on p.cod_categoria = procat.cod_categoria\n\t\t\t\t\t\t\t\t\t\t\t\tJOIN producto_marca AS promar on p.cod_marca = promar.cod_marca\n\t\t\t\t\t\t\t\t\t\t\t\tJOIN producto_modelo AS promod on p.cod_modelo = promod.cod_modelo\n\t\t\t\t\t\t\t\t\t\t\t\tJOIN producto_color AS procol on p.cod_color = procol.cod_color\n\t\t\t\t\t\t\t\t\t\t\t\tJOIN producto_plataforma AS propla on p.cod_plataforma = propla.cod_plataforma\n\t\t\t\t\t\t\t\t\t\t\t\tWHERE p.cod_categoria = \".$cod_categoria.\"\n\t\t\t\t\t\t\t\t\t\t\t\tORDER BY codigo_categoria ASC, marca ASC, modelo ASC\n\t\t\t\t\t\t\t\t\t\t\t\");\n\n\t\t\t\t$consulta->execute();\n\n\n\t\t\t\twhile( $row = $consulta->fetch( PDO::FETCH_ASSOC ) )\n\t\t\t\t\t$productos[] = $row;\n\t\t\t\t\n\n\t\t\t\t$cantidad = count( $productos );\n\t\t\t\t\n\t\t\t\t$contador = 0;\n\t\t\t\tfor( $i = 0; $i < $cantidad; $i++ ){\n\n\t\t\t\t\t// Se crea el titulo de la categoria por cada primer producto\n\t\t\t\t\tif( $contador == 0 ){\n\t\t\t\t\t\t$lista .= \t\"\n\t\t\t\t\t\t\t\t\t<br><br>\n\t\t\t\t\t\t\t\t\t<table cellspacing='0' id='TABLA_lista_productos_familia'>\n\t\t\t\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<th width='5%'>Seleccion</th>\n\t\t\t\t\t\t\t\t\t\t\t\t<th width='5%'>Codigo</th>\n\t\t\t\t\t\t\t\t\t\t\t\t<th width='5%'>Marca</th>\n\t\t\t\t\t\t\t\t\t\t\t\t<th width='20%'>Modelo</th>\n\t\t\t\t\t\t\t\t\t\t\t\t<th width='15%'>Color</th>\n\t\t\t\t\t\t\t\t\t\t\t\t<th width='10%'>Plataforma</th>\n\t\t\t\t\t\t\t\t\t\t\t\t<th width='40%'>Descripcion</th>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t</thead>\n\n\t\t\t\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t\t\";\n\t\t\t\t\t}\n\n\t\t\t\t\t$lista .= \t\"\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td><input type='checkbox' class='check_comprar' name='\".$productos[$i][\"codigo_producto\"].\"'></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td id='cod_producto'>\".$productos[$i][\"codigo_producto\"].\"</td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td>\".$productos[$i][\"marca\"].\"</td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td>\".$productos[$i][\"modelo\"].\"</td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td>\".$productos[$i][\"color\"].\"</td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td>\".$productos[$i][\"plataforma\"].\"</td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td>\".$productos[$i][\"descripcion\"].\"</td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t<tr id='contenedor_costo_y_cantidad_\".$productos[$i][\"codigo_producto\"].\"' class='contenedor_costo_y_cantidad' style='display:none'>\n\t\t\t\t\t\t\t\t\t\t\t\t<td colspan='7'>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<!-- CAMPO PARA CARGA DEL COSTO. -->\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>Ingrese el costo del producto: </span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style='margin-right:20px'><input type='text' id='costo_producto_\".$productos[$i][\"codigo_producto\"].\"' size='10' onkeyup='format(this)' onchange='format(this)''></span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<!-- SELECT PARA LA SELECCION DE LA CANTIDAD DE PRODUCTOS A COMPRAR. -->\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style='text-align: center'>Ingrese la cantidad a comprar: </span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style='margin-right:20px'>\". \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$lista_cantidad = $this->listar_cantidad( $productos[$i][\"codigo_producto\"] )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.\"</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<br><br>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<!-- SELECT PARA LA SELECCION DE LA FORMA DE PAGO DE LA COMPRA. -->\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>Ingrese la forma de Pago</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\".\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$lista_formas_pago = $this->lista_formas_pago( $productos[$i][\"codigo_producto\"] )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.\"</span>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<!-- BOTON PARA PROCESAR LA COMPRA. -->\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span><input type='button' id='btn_comprar' name='\".$productos[$i][\"codigo_producto\"].\"' class='boton' value='Comprar'></span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\";\n\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t$contador++;\n\t\t\t\t}\n\n\t\t\t\t$lista .= \t\t\t\t\"</tbody>\n\t\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t\t<br><br>\";\n\t\t\t}\n\n\t\t\treturn $lista;\n\n\t\t\t// Cierra la conexion a la base de datos\n\t\t\t$con = null;\n\t\t}", "title": "" }, { "docid": "4fea1d629a4dff26111314229e2c0095", "score": "0.60653263", "text": "public function getComposant(){\r\n $db = new DatabaseController();\r\n $array = $db->fetchAll('SELECT * FROM vnb_product_component');\r\n return $array;\r\n }", "title": "" }, { "docid": "38b178260d389982012a390006363576", "score": "0.605241", "text": "function get_cproductos_stock() {\n\t\t$u = new Producto();\n\t\t$sql = \"select p.*, p.descripcion, p.clave, p.presentacion, um.tag as unidad_medida, f.tag as familia from cproductos as p left join cunidades_medidas as um on um.id=p.cunidad_medida_id left join cproductos_familias as f on f.id=p.cfamilia_id where p.estatus_general_id='1' order by f.tag asc, p.descripcion\";\n\t\t//Buscar en la base de datos\n\t\t$u->query($sql);\n\t\tif ($u->c_rows > 0) {\n\t\t\treturn $u;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "519f8d11bd0000f9ad78359646936a97", "score": "0.6013389", "text": "public static function getCouleurs(){\n\t\t$dao = new CouleurDAO();\n\t\treturn $dao->getCouleurs();\n\t}", "title": "" }, { "docid": "b1e56771b6d6bf496ac36c38cf7e97a8", "score": "0.59798205", "text": "public function obtener_casas_coto()\n {\n $casas_id = array();\n $coto_id = Coto::where('guardia_users_id', auth()->user()->id)->pluck('id');\n //$coto_id = Guardia::where('users_id', auth()->user()->id)->pluck('coto_id');\n $casas = Casa::where('coto_id', $coto_id)->get();\n\n foreach ($casas as $casa) {\n array_push($casas_id, $casa->id);\n }\n\n return SolicitudIngreso::select(DB::raw('solicitudes_ingreso.*, casas.folio_casa'))\n ->whereIn('casa_id', $casas_id)\n ->leftJoin('casas', 'solicitudes_ingreso.casa_id', '=', 'casas.id')\n ->get();\n }", "title": "" }, { "docid": "0b2a40e893ba5b2f1d5540e1656d9d53", "score": "0.59770125", "text": "function get_cproductos_etiquetas() {\n\t\t$e = new Producto();\n\t\t$e->where(\"estatus_general_id\", 1);\n\t\t$e->where('codigo_barras >', 0);\n\t\t$e->order_by('descripcion');\n\t\t//Buscar en la base de datos\n\t\t$e->get();\n\t\tif ($e->c_rows > 0) {\n\t\t\treturn $e;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "23d036bd4f5384c9fcac37fb039390cf", "score": "0.59612954", "text": "public function getClientesProductos()\n {\n return $this->clientesProductos;\n }", "title": "" }, { "docid": "f858ecb2fe58c2c4bb90f2cf111423a1", "score": "0.59608436", "text": "public function getProductos() {\r\n //obtenemos la informacion de la bdd:\r\n $pdo = Database::connect();\r\n $sql = \"select * from producto order by nombre\";\r\n $resultado = $pdo->query($sql);\r\n //transformamos los registros en objetos:\r\n $listado = array();\r\n foreach ($resultado as $res) {\r\n $producto = new Producto($res['id_producto'], $res['nombre'], $res['precio'], $res['porcentaje_iva']);\r\n array_push($listado, $producto);\r\n }\r\n Database::disconnect();\r\n //retornamos el listado resultante:\r\n return $listado;\r\n }", "title": "" }, { "docid": "54f2a2bdd85653bf0cebec5daa644824", "score": "0.5952915", "text": "public function get_curso() {\r\n $projection = \"idCurso,nomeCurso\";\r\n $order_by = \"nomeCurso ASC\";\r\n \r\n $sql = \"SELECT \" . $projection .\r\n \" FROM \" . $this->table_name .\r\n \" ORDER BY \" . $order_by;\r\n \r\n $this->create_connection();\r\n $result = $this->conn->query($sql);\r\n $this->close_connection();\r\n \r\n $res = NULL;\r\n \r\n while($aux = $result->fetch_array())\r\n \t$res[] = $aux;\r\n \r\n return $res;\r\n }", "title": "" }, { "docid": "88206bc24366550cb608778d8f956846", "score": "0.5918502", "text": "public function GetProductos();", "title": "" }, { "docid": "70368eae2d517cda777b76ba71d9e6d6", "score": "0.5900487", "text": "public function listaProductos(){\n\t\t\t// Validando la suma de los productos de la partida\n \t\t$listaProductos= array();\n \t\t//Nacionales\n\t\t\tif($this->presupuestoProductos)\n\t\t\t\tforeach ($this->presupuestoProductos as $key => $presupuestoProducto) {\n\t\t\t\t\t//if($presupuestoProducto->producto)\n\t\t\t\t\t\t$listaProductos[] = $presupuestoProducto->producto;\t\n\t\t\t\t}\n\t\t//Importados\n\t\t\tif($this->presupuestoImportacion)\n\t\t\t\tforeach ($this->presupuestoImportacion as $key => $presupuestoImportacion) {\n\t\t\t\t\t//if($presupuestoImportacion->producto)\n\t\t\t\t\t\t$listaProductos[] = $presupuestoImportacion->producto;\n\t\t\t\t}\n \t\treturn $listaProductos;\n \t}", "title": "" }, { "docid": "d6b97fa9ad115dde46a82f39973e24a1", "score": "0.5898952", "text": "function getProductos()\n {\n $sentencia = $this->db->prepare( \"select * from delantal\");\n $sentencia->execute();\n $delantales= $sentencia->fetchAll(PDO::FETCH_ASSOC);\n $productosImagenes= $this->asignarImagenes($delantales);\n return $productosImagenes;\n }", "title": "" }, { "docid": "91e54dac165b4319372b25e34f118efa", "score": "0.5897127", "text": "function _ConsultarTiposCuerpo()\n\t{\n\t\t$query='SELECT id,nb_cuerpo from sgtipocuerpo';\n\t\t$cuerpos = $this->EjecutarTransaccionAllNoParams($query);\n\t\treturn $cuerpos;\n\t}", "title": "" }, { "docid": "49c1c928e42627b103bca364195d348d", "score": "0.5872219", "text": "function getComents($id = null){\n\n //preparamos para traer todo\n $query = $this->db->prepare('SELECT * FROM comentarios WHERE id_juego = ?');\n\n //ejecutamos\n $query->execute([$id]);\n \n //fetchAll para traer todos\n $coments = $query->fetchAll(PDO::FETCH_OBJ);\n \n return $coments;\n \n }", "title": "" }, { "docid": "260a2f85f4f0d1d1f8b945f7ddb1e4c0", "score": "0.5870038", "text": "Public function cargoproductos()\n {\n $ruta = public_path('parasubir2.csv'); // lugar donde está el archivo\n $datos = array_map('str_getcsv',file($ruta)); //convierto cada línea en una inst. de array\n // return $datos;\n $contador = 1;\n $lineas=sizeof($datos);\n $lineas--;\n\n while ($contador <= $lineas)\n {\n $xprod = new \\App\\Producto();\n $txtprod = utf8_decode(utf8_encode($datos[$contador][2]));\n $txtcorto= nl2br(utf8_encode($datos[$contador][3]));\n $xprod->codigo = $datos[$contador][0];\n $xprod->codigofacturacion = $datos[$contador][0]; //\n $xprod->nombre = $txtprod; //\n $xprod->nombreslug =str_slug($txtprod,'-'); //\n // $xprod->descripcioncorta = substr($txtcorto,0,120);\n $xprod->mostrar = $datos[$contador][1];\n $xprod->status = $datos[$contador][1];\n $xprod->descripcionlarga = nl2br(utf8_encode($datos[$contador][3]));\n $xprod->moneda = $datos[$contador][7];\n $xprod->precio = $datos[$contador][8];\n $xprod->imagen = $datos[$contador][4];\n $xprod->ventaminima = $datos[$contador][5];\n $xprod->familia = $datos[$contador][9];\n $xprod->nombrefigaro = nl2br($datos[$contador][10]);\n $xprod->marca = $datos[$contador][11];\n $xprod->ultimoingreso = $datos[$contador][6];\n\n $xprod->save();\n $contador++;\n }\n\n return('Se han procesado los siguientes renglones: '.$lineas);\n }", "title": "" }, { "docid": "46ce1b5895270f5d92b9e30e2922bd05", "score": "0.58650535", "text": "public function getBuyProducts() {\n $pdo = parent::connect();\n $userId = $this->getUserId();\n $prod = [];\n\n $sql = $pdo->prepare(\"SELECT * FROM buy WHERE id_cliente = :id_cliente\");\n $sql->bindValue(':id_cliente', $userId);\n $sql->execute();\n $produtosComprados = $sql->fetchAll(PDO::FETCH_ASSOC);\n\n foreach ($produtosComprados as $value) {\n $produto = $pdo->prepare(\"SELECT * FROM produto WHERE id = :id\");\n $produto->bindValue(':id', $value['id_produto']);\n $produto->execute();\n $dadosProduto = $produto->fetchAll(PDO::FETCH_ASSOC);\n array_push($prod, $dadosProduto);\n }\n\n return $prod;\n }", "title": "" }, { "docid": "e5759172c977482ca2a3625f6627e168", "score": "0.58525145", "text": "public function getStockValCentro(){\n\t $data= Yii::app()->db->createCommand()\n\t\t ->select($this->getsumas().', a.codcen ')\n\t\t ->from('{{alinventario}} a ,{{tipocambio}} b , {{almacenes}} c')\n\t\t ->where(\"a.codalm=c.codalm and a.codcen=c.codcen and\n\t\t c.codmon=b.codmon1 and b.codmondef=:Vmonedadefault \",\n\t\t\t array(\":Vmonedadefault\"=>yii::app()->settings->get('general','general_monedadef')))\n\t\t ->group('a.codcen')->order('a.codcen ASC')\n\t\t ->queryAll();\n $centros=array();\n foreach($data as $fila){\n $centros[]=$fila['codcen'] ;\n }\n asort($centros);\n return array_combine($centros,$data);\n\t}", "title": "" }, { "docid": "8903c3d90ded2f974c6d3e69160438de", "score": "0.58322906", "text": "public function lista_productos(){\n\n\t\t\t// Variables\n\t\t\t$productos = array();\n\n\t\t\t// Abro la conexion a la base de datos\n\t\t\t$con = $this->conexion();\n\n\t\t\t//Consulta para traer todos los productos de la base de datos\n\t\t\t$consulta = $con->prepare( \t\"\n\t\t\t\t\t\t\t\t\t\tSELECT\n\t\t\t\t\t\t\t\t\t\t\tp.cod_familia AS codigo_familia,\n\t\t\t\t\t\t\t\t\t\t\tp.cod_producto AS codigo_producto,\n\t\t\t\t\t\t\t\t\t\t\tp.cod_categoria AS codigo_categoria, \n\t\t\t\t\t\t\t\t\t\t\tprocat.descripcion AS categoria,\n\t\t\t\t\t\t\t\t\t\t\tpromar.descripcion AS marca,\n\t\t\t\t\t\t\t\t\t\t\tpromod.descripcion AS modelo,\n\t\t\t\t\t\t\t\t\t\t\tprocol.descripcion AS color,\n\t\t\t\t\t\t\t\t\t\t\tpropla.descripcion AS plataforma,\n\t\t\t\t\t\t\t\t\t\t\tp.precio_venta AS precio_venta,\n\t\t\t\t\t\t\t\t\t\t\tp.stock_actual as stock_actual, \n\t\t\t\t\t\t\t\t\t\t\tp.descripcion AS descripcion,\n\t\t\t\t\t\t\t\t\t\t\tp.foto AS foto\n\t\t\t\t\t\t\t\t\t\tFROM producto AS p\n\t\t\t\t\t\t\t\t\t\tJOIN producto_familia AS profam ON p.cod_familia = profam.cod_familia\n\t\t\t\t\t\t\t\t\t\tJOIN producto_categoria AS procat ON p.cod_categoria = procat.cod_categoria\n\t\t\t\t\t\t\t\t\t\tJOIN producto_marca AS promar ON p.cod_marca = promar.cod_marca\n\t\t\t\t\t\t\t\t\t\tJOIN producto_modelo AS promod ON p.cod_modelo = promod.cod_modelo\n\t\t\t\t\t\t\t\t\t\tJOIN producto_color AS procol ON p.cod_color = procol.cod_color\n\t\t\t\t\t\t\t\t\t\tJOIN producto_plataforma AS propla ON p.cod_plataforma = propla.cod_plataforma\n\t\t\t\t\t\t\t\t\t\tWHERE stock_actual > 0\n\t\t\t\t\t\t\t\t\t\tORDER BY codigo_categoria ASC, marca ASC, modelo ASC\n\t\t\t\t\t\t\t\t\t\t\" );\n\t\t\t$consulta->execute();\n\n\t\t\t// Guardo el resultado en el array $productos\n\t\t\twhile( $row = $consulta->fetch( PDO::FETCH_ASSOC ) )\n\t\t\t\t$productos[] = $row;\n\t\n\n\t\t\t// return \"<pre>\".var_dump($productos).\"</pre>\";\n\t\t\t// exit;\n\n\t\t\t// Creo la variable donde voy a cargar la tabla con los productos\n\t\t\t$lista = \"\";\n\n\t\t\t// Cuento la cantidad de productos que trajo la consulta\n\t\t\t$cantidad = count($productos);\n\t\t\t\n\t\t\t// Defino la primera categoria\n\t\t\t$categoria = $productos[0][\"codigo_categoria\"];\n\t\t\t\n\t\t\t// Ciclo para cargar la variable que retornara la tabla de los productos, ordenados por categoria\n\t\t\t$contador = 0;\n\t\t\tfor( $i = 0; $i < $cantidad; $i++ ){\n\n\t\t\t\t// SE CREA EL TITULO DE LA CATEGORIA POR CADA PRIMER PRODUCTO\n\t\t\t\tif( $contador == 0 ){\n\t\t\t\t\t$lista .= \t\"\n\t\t\t\t\t\t\t\t<span class='titulo'>\".ucfirst($productos[$i][\"categoria\"]).\"</span>\n\t\t\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\t\t<table cellspacing='0' id='TABLA_lista_productos'>\n\t\t\t\t\t\t\t\t\";\n\n\t\t\t\t\t// EN EL CASO DE LOS TITULOS, SE CREA UNO ESPECIFICO PARA JUEGOS, POR NO SOMETERSE\n\t\t\t\t\t// AL MISMO TRATAMIENTO DE TODOS LOS DEMAS PRODUCTOS.\n\t\t\t\t\tif( $productos[$i][\"categoria\"] != \"juego\" ){\n\t\t\t\t\t\t$lista .= \t\"\n\t\t\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t<th width='5%'>Stock</th>\n\t\t\t\t\t\t\t\t\t\t\t<th width='5%'>Codigo</th>\n\t\t\t\t\t\t\t\t\t\t\t<th width='10%'>Marca</th>\n\t\t\t\t\t\t\t\t\t\t\t<th width='15%'>Modelo</th>\n\t\t\t\t\t\t\t\t\t\t\t<th width='10%'>Color</th>\n\t\t\t\t\t\t\t\t\t\t\t<th class='costo' width='10%'>Precio de Costo</th>\n\t\t\t\t\t\t\t\t\t\t\t<th width='10%'>Precio de Venta</th>\n\t\t\t\t\t\t\t\t\t\t\t<th width='35%'>Descripcion</th>\n\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t\t\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$lista .= \t\"\n\t\t\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t<th>Numero</th>\n\t\t\t\t\t\t\t\t\t\t\t<th>Codigo Producto</th>\n\t\t\t\t\t\t\t\t\t\t\t<th>Descripcion</th>\n\t\t\t\t\t\t\t\t\t\t\t<th>Plataforma</th>\n\t\t\t\t\t\t\t\t\t\t\t<th class='costo'>Precio de Costo</th>\n\t\t\t\t\t\t\t\t\t\t\t<th>Precio de Venta</th>\n\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t\t\";\n\t\t\t\t\t}\n\n\t\t\t\t\t$contador++;\t\t\t\n\t\t\t\t}\n\n\t\t\t\t// LO MISMO SE DA PARA EL CUERPO DE LA LISTA.\n\t\t\t\tif( $productos[$i][\"categoria\"] != \"juego\" ){\n\t\t\t\t\t\n\t\t\t\t\t// Se imprimen los productos de la categoria\n\t\t\t\t\t$lista .= \t\"\n\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t<td>\".$productos[$i][\"stock_actual\"].\"</td>\n\t\t\t\t\t\t\t\t\t\t\t<td>\".$productos[$i][\"codigo_producto\"].\"</td>\n\t\t\t\t\t\t\t\t\t\t\t<td>\".ucfirst($productos[$i][\"marca\"]).\"</td>\n\t\t\t\t\t\t\t\t\t\t\t<td><span class='mostrar_foto' name='\".$productos[$i][\"foto\"].\"'>\".$productos[$i][\"modelo\"].\"</span></td>\n\t\t\t\t\t\t\t\t\t\t\t<td>\".$productos[$i][\"color\"].\"</td>\n\t\t\t\t\t\t\t\t\t\t\t<td class='costo'></td>\n\t\t\t\t\t\t\t\t\t\t\t<td>\".number_format( intval($productos[$i][\"precio_venta\"]), 0, ' ', '.').\"</td>\n\t\t\t\t\t\t\t\t\t\t\t<td>\".$productos[$i][\"descripcion\"].\"</td>\n\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\";\t\n\t\t\t\t}else{\n\t\t\t\t\t$lista .= \t\"\n\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t<td>\".$productos[$i][\"stock_actual\"].\"</td>\n\t\t\t\t\t\t\t\t\t\t\t<td>\".$productos[$i][\"codigo_producto\"].\"</td>\n\t\t\t\t\t\t\t\t\t\t\t<td>\".$productos[$i][\"descripcion\"].\"</td>\n\t\t\t\t\t\t\t\t\t\t\t<td>\".$productos[$i][\"plataforma\"].\"</td>\n\t\t\t\t\t\t\t\t\t\t\t<td class='costo'></td>\n\t\t\t\t\t\t\t\t\t\t\t<td>\".$productos[$i][\"precio_venta\"].\"</td>\n\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\";\t\t\n\t\t\t\t}\n\n\t\t\t\t$contador++;\n\n\t\t\t\tif( $i < $cantidad - 1 ){\n\t\t\t\t\tif( $productos[$i+1][\"codigo_categoria\"] != $categoria ){\n\t\t\t\t\t\t$categoria = $productos[$i+1][\"codigo_categoria\"];\n\t\t\t\t\t\t$contador = 0;\n\t\t\t\t\t\t$lista .= \t\"\n\t\t\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\t\t\";\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$lista .= \t\"\n\t\t\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\t\t\";\n\t\t\t\t}\n\t\t\t}\n\t\t\n\n\t\t\treturn $lista;\n\n\t\t\t// Cierra la conexion a la base de datos\n\t\t\t$con = null;\n\t\t}", "title": "" }, { "docid": "34435180fe0aef9c0fac26df2a441cf4", "score": "0.5829965", "text": "public function getCompra()\n {\n $this->load->database();\n $resultado=$this->db->get('tab_proveedores');\n return $resultado->result_array();\n }", "title": "" }, { "docid": "3e4f1da33230890e08bbad5280b4c9db", "score": "0.5819139", "text": "public static function getAllProductos( ) {\n $conn = parent::connect();\n $sql = \"SELECT * FROM \" . TBL_PRODUCTOS . \" where id in (select idproducto from composiciones) \";\n\n // print_r($sql);\n\n try {\n $st = $conn->prepare( $sql );\n // $st->bindValue( \":idproducto\", $idproducto, PDO::PARAM_INT );\n $st->execute();\n $productos = $st->fetchAll(PDO::FETCH_ASSOC);\n parent::disconnect( $conn );\n return $productos;\n } catch ( PDOException $e ) {\n parent::disconnect( $conn );\n die( \"Query failed: \" . $e->getMessage() );\n }\n }", "title": "" }, { "docid": "2d2874cd4a50e571433023c22141bddd", "score": "0.5814448", "text": "function consultarProyectosCoor($identificacion){\r\n $cadena_sql = $this->sql->cadena_sql(\"proyectos_curriculares\", $identificacion);\r\n return $arreglo_proyecto = $this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql, \"busqueda\");\r\n }", "title": "" }, { "docid": "c24149b46730b02ede6dffd448347a58", "score": "0.58111346", "text": "public function getProdutos(){\n\t\t//return array('mesa', 'cadeira');\n\t\t$query = \"Select id, descricao, preco from tb_produtos\";\n\t\treturn $this->db->query($query)->fetchAll();\n\t}", "title": "" }, { "docid": "9549402a92de5bd1fb687d72bccabebe", "score": "0.58002836", "text": "public function costeoProd($idprod){\r\r /*$sql = \"SELECT id, SUM(costo*cantidad * IF(tipo_traspaso=1,1,-1) ) AS t, SUM(cantidad * IF(tipo_traspaso=1,1,-1)) AS c , SUM(costo*cantidad * IF(tipo_traspaso=1,1,-1) ) / SUM(cantidad * IF(tipo_traspaso=1,1,-1)) costo_promedio\r FROM app_inventario_movimientos \r WHERE id_producto = '1' AND estatus = 1 AND costo != 0 ;\";*/\r \r /*$sql =\"SELECT id, sum(costo*cantidad * IF(id_almacen_destino=0 OR referencia NOT LIKE '%Recepcion%',-1,1) ) AS t, sum(cantidad * IF(id_almacen_destino=0 OR referencia NOT LIKE '%Recepcion%',-1,1)) AS c , sum(costo*cantidad * IF(id_almacen_destino=0 OR referencia NOT LIKE '%Recepcion%',-1,1) ) / sum(cantidad * IF(id_almacen_destino=0 OR referencia NOT LIKE '%Recepcion%',-1,1)) costo_promedio\rFROM app_inventario_movimientos \rWHERE id_producto = '$idprod' AND estatus = 1 AND costo != 0;\";*/\r\t\t\t\r\t\t\t/*$sql =\"SELECT id, IF(tipo_traspaso=1 OR referencia like '%Recepcion Movto:%',1,-1), sum(costo*cantidad * IF(tipo_traspaso=1 OR referencia like '%Recepcion Movto:%',1,-1) ) AS t, sum(cantidad * IF(tipo_traspaso=1 OR referencia like '%Recepcion Movto:%',1,-1) ) AS c , sum(costo*cantidad * IF(tipo_traspaso=1 OR referencia like '%Recepcion Movto:%',1,-1) ) / sum(cantidad * IF(tipo_traspaso=1 OR referencia like '%Recepcion Movto:%',1,-1) ) costo_promedio\r\t\t\t\t\tFROM app_inventario_movimientos \r\t\t\t\t\tWHERE id_producto = '$idprod' AND estatus = 1 AND costo != 0;\";*/\r\t\t\t$sql = \"SELECT\t(sum(valor) / sum(cantidad) ) costo_promedio\r\t\t\t\t\tFROM\tapp_inventario\r\t\t\t\t\tWHERE\tid_producto='$idprod';\";\r $res = $this->queryArray($sql);\r return $res['rows'][0][costo_promedio];\r }", "title": "" }, { "docid": "838dbc366b70866e399eb09039f86ce1", "score": "0.57981133", "text": "public function getAgenciaCobradora();", "title": "" }, { "docid": "c03fb350d0c30cd5045848700746a77a", "score": "0.57981044", "text": "public function readProductosAccesorios()\n {\n $sql = 'SELECT nombre_marca, id_producto, imagen_producto, nombre_producto, descripcion_producto, precio_producto\n FROM productos INNER JOIN marca USING(id_marca)\n WHERE id_marca = 9';\n $params = null;\n return Database::getRows($sql, $params);\n }", "title": "" }, { "docid": "13274bb26b2f58a57418a50fd57cee91", "score": "0.5789193", "text": "public static function CantidadxPrecio()\n\t{\n\t\t$objetoAccesoDato = AccesoDatos::dameUnObjetoAcceso(); \n\t\t$consulta =$objetoAccesoDato->RetornarConsulta(\"select ventas.fechaDeVenta,round(ventas.cantidad * producto.precio,2) from ventas,producto WHERE (ventas.idProducto = producto.id)\");\t\n\t\t$consulta->execute();\t\t\t\n\t\treturn $consulta->fetchAll(PDO::FETCH_OBJ);\t\t\n\t}", "title": "" }, { "docid": "537744018e2024741e6d6c6965b15ab2", "score": "0.5784103", "text": "protected function _getCueProducts()\n {\n $page = 1;\n do {\n $results = $this->_productSoapClient->get(\n array(\n 'page' => $page,\n 'pagesize' => self::CUE_GET_PAGE_SIZE,\n 'clipped' => false)\n );\n $pages = ceil($results->totalcount / $results->pagesize);\n foreach ($results->data as $result) {\n if ($result->sku) {\n $this->_cueProducts[$result->sku] = $result;\n }\n }\n unset($results);\n } while ($page++ < $pages);\n }", "title": "" }, { "docid": "0259805efd049b7db705e19c0588bb94", "score": "0.5781703", "text": "function get_catalogo()\n {\n $query = $this->db->get('platos');\n $this->db->order_by('id');\n return $query->result();\n }", "title": "" }, { "docid": "0bd16c6c1a39fd271297055359cb14e6", "score": "0.5775406", "text": "function cantidad_coment_prod($id_producto)\n{\n $objComent = new PDOModel();\n $objComent->where(\"id_producto\", $id_producto);\n $objComent->columns = array(\"count(*) comentario\");\n $cuentaTotal = $objComent->select(\"calificacion_producto\");\n foreach ($cuentaTotal as $cuentaTot) {\n foreach ($cuentaTot as $cuentaTo) {\n $cuenta = $cuentaTo;\n }\n }\n return $cuenta;\n}", "title": "" }, { "docid": "4c66c71585c17638f6fa778992449fa1", "score": "0.57572997", "text": "public function getProducto(){\n try{\n $dwes = DB::connectDB();\n $sql = \"SELECT * FROM Productos\";\n $resultado = $dwes->query($sql);\n if($resultado) {\n $row = $resultado->fetch();\n while ($row != null) {\n $producto[$row['referencia']] = $row['nombre'].\", \".$row['descripcion'].\", \".$row['precio'].\", \".$row['descuento'];\n $row = $resultado->fetch();\n }\n }\n }catch (PDOException $e) {\n $producto = -($e->getCode());\n return $producto;\n }\n return $producto;\n }", "title": "" }, { "docid": "9a2fdfde3c84d4c36b2c2d77e74fd6d6", "score": "0.5751479", "text": "public function getCategoriasCb()\n {\n $sql = 'SELECT id_tipo_producto, tipo_producto FROM tipo_producto ORDER BY tipo_producto';\n $params = null;\n return Database::getRows($sql, $params);\n }", "title": "" }, { "docid": "3e142c8e5c16f9a9d01753b73ea67014", "score": "0.57490903", "text": "public function getProducto(){\n\t\t$page = (isset($_GET['page'])) ? $_GET['page'] : 1;\n\n $limite = 5;\n\n $limite_inicio = ($page - 1)* $limite;\n\t\t$sql = \"SELECT IdProducto, NombreProducto, tipoproducto.TipoProducto, categoriaproducto.CategoriaProducto, Descripcion, Precio FROM productos\tINNER JOIN tipoproducto ON tipoproducto.IdTipo=productos.IdTipo INNER JOIN categoriaproducto ON productos.IdCategoria=categoriaproducto.IdCategoria ORDER BY IdProducto LIMIT $limite_inicio , $limite\";\n\t\t\t\t$params = array(null);\n\t\treturn Database::getRows($sql, $params);\n\t\t}", "title": "" }, { "docid": "b54625f1078414db4b32efbc0776b2e4", "score": "0.57228744", "text": "function getProdAleatorios()\n\t{\n\t\treturn $this->oMySQL->ejecutarConsultaSelect('SELECT producto.id_prod AS id_prod, nombre, descripcion,empresa_fab,iva, producto.id_prod AS ruta,precio.valor AS precio FROM producto,precio WHERE producto.id_prod=precio.cod_producto ORDER BY RAND() LIMIT 3 ');\n\t}", "title": "" }, { "docid": "607525914c79b4ee0400501e204aa3f1", "score": "0.5719667", "text": "public function getStockMatCentro($codigo){\n\t\t$data= Yii::app()->db->createCommand()\n\t\t\t->select($this->getsumas().', a.codcen,a.codart ')\n\t\t\t->from('{{alinventario}} a ,{{tipocambio}} b , {{almacenes}} c')\n\t\t\t->where(\"a.codalm=c.codalm and a.codcen=c.codcen and\n\t\t c.codmon=b.codmon1 and b.codmondef=:Vmonedadefault and a.codart=:vcodigo \",\n\t\t\t\tarray(\":vcodigo\"=>$codigo,\":Vmonedadefault\"=>yii::app()->settings->get('general','general_monedadef')))\n\t\t\t->group('a.codcen,a.codart')->order('a.codcen ASC')\n\t\t\t->queryAll();\n\t\t$centros=array();\n\t\tforeach($data as $fila){\n\t\t\t$centros[]=$fila['codcen'] ;\n\t\t}\n\t\tasort($centros);\n\t\treturn array_combine($centros,$data);\n\t}", "title": "" }, { "docid": "db06d297775124faf341bf6a043d56cc", "score": "0.5698197", "text": "public function censo()\n {\n $query = \"SELECT MAEPAB.MPCodP, MAEPAB.MPNomP, MAEPAB.MPCLAPRO, MAEPAB.MPbodega, MAEPAB.MPMCDpto, MAEPAB.MPInFaPOS, MAEPAB.MPVigPres, '<<' AS SEPARADOR1, MAEPAB1.MPNumC, MAEPAB1.MPDisp, MAEPAB1.MPFchI, MAEPAB1.MPUced, MAEPAB1.MPUDoc, CAPBAS.MPNom1, CAPBAS.MPNom2, CAPBAS.MPApe1, CAPBAS.MPApe2, CAPBAS.MPFchN, CAPBAS.MPSexo, MAEPAB1.MPCtvIn, MAEPAB1.MPUdx, MAEDIA.DMNomb, MAEPAB1.MPActCam, '>>' AS SEPARADOR2, INGRESOS.IngNit, MAEEMP.MENOMB\nFROM ((((MAEPAB INNER JOIN MAEPAB1 ON MAEPAB.MPCodP = MAEPAB1.MPCodP) LEFT JOIN CAPBAS ON (MAEPAB1.MPUDoc = CAPBAS.MPTDoc) AND (MAEPAB1.MPUced = CAPBAS.MPCedu)) LEFT JOIN MAEDIA ON MAEPAB1.MPUdx = MAEDIA.DMCodi) LEFT JOIN INGRESOS ON (MAEPAB1.MPCtvIn = INGRESOS.IngCsc) AND (MAEPAB1.MPUDoc = INGRESOS.MPTDoc) AND (MAEPAB1.MPUced = INGRESOS.MPCedu)) LEFT JOIN MAEEMP ON INGRESOS.IngNit = MAEEMP.MENNIT\nWHERE (((MAEPAB1.MPActCam)='N'))\nORDER BY MAEPAB.MPCodP, MAEPAB1.MPNumC\";\n $info = DB::connection('sqlsrv_censo')->select($query);\n if( isset($info) && count($info) > 0 ){\n $this->excel->create('censo' . date('Y-m-d_h:i:s_A'), function($excel) use($info) {\n $excel->sheet('Sheetname', function($sheet) use($info) {\n $sheet->loadview('info.censo', compact('info'));\n $sheet->setFontFamily('Comic Sans MS');\n $sheet->setStyle(array(\n 'font' => array(\n 'name' => 'Calibri',\n 'size' => 12,\n 'bold' => true\n )\n ));\n });\n })->download('xlsx');\n\n } else {\n return \"no se encontraron resultados\";\n }\n }", "title": "" }, { "docid": "b820a4f51b5219ce848e41987a02e5b0", "score": "0.5695915", "text": "public function lista_productos_por_categoria( $cod_categoria ){\n\t\t\t\n\t\t\t// Variables\n\t\t\t$lista = \"\";\n\n\t\t\t// Cuerpo\n\t\t\t// Abro la conexion a la base de datos\n\t\t\t$con = $this->conexion();\n\n\t\t\tif( $cod_categoria == 0 ){\n\t\t\t\treturn $this->lista_productos();\n\t\t\t}else{\n\n\t\t\t\t// Primero cuento la cantidad de elementos que hay con el codigo de categoria\n\t\t\t\t$consulta = $con->prepare( \"SELECT COUNT(*) AS cantidad FROM producto WHERE cod_categoria = ?\" );\n\t\t\t\t$consulta->bindValue( 1, $cod_categoria );\n\t\t\t\t$consulta->execute();\n\t\t\t\t$temporal = $consulta->fetch( PDO::FETCH_ASSOC );\n\t\t\t\t$cantidad = $temporal['cantidad'];\n\n\t\t\t\t// Dependiendo del resultado, se dan las siguientes opciones\n\t\t\t\tif( $cantidad == 0 ){\t\n\t\t\t\t\t$lista .= \"No hay productos en existencia del codigo\";\n\t\t\t\t}else{\n\n\t\t\t\t\t$productos = array();\n\n\t\t\t\t\t$consulta = $con->prepare( \"SELECT \n\t\t\t\t\t\t\t\t\t\t\t\tp.cod_producto AS codigo_producto,\n\t\t\t\t\t\t\t\t\t\t\t\tp.cod_categoria AS codigo_categoria, \n\t\t\t\t\t\t\t\t\t\t\t\tprocat.descripcion AS categoria,\n\t\t\t\t\t\t\t\t\t\t\t\tpromar.descripcion AS marca,\n\t\t\t\t\t\t\t\t\t\t\t\tpromod.descripcion AS modelo,\n\t\t\t\t\t\t\t\t\t\t\t\tprocol.descripcion AS color,\n\t\t\t\t\t\t\t\t\t\t\t\tpropla.descripcion AS plataforma,\n\t\t\t\t\t\t\t\t\t\t\t\tp.precio_venta AS precio_venta, \n\t\t\t\t\t\t\t\t\t\t\t\tp.descripcion AS descripcion,\n\t\t\t\t\t\t\t\t\t\t\t\tp.stock_actual AS stock_actual,\n\t\t\t\t\t\t\t\t\t\t\t\tp.foto AS foto\n\t\t\t\t\t\t\t\t\t\t\tFROM producto AS p\n\t\t\t\t\t\t\t\t\t\t\tJOIN producto_categoria AS procat on p.cod_categoria = procat.cod_categoria\n\t\t\t\t\t\t\t\t\t\t\tJOIN producto_marca AS promar on p.cod_marca = promar.cod_marca\n\t\t\t\t\t\t\t\t\t\t\tJOIN producto_modelo AS promod on p.cod_modelo = promod.cod_modelo\n\t\t\t\t\t\t\t\t\t\t\tJOIN producto_color AS procol on p.cod_color = procol.cod_color\n\t\t\t\t\t\t\t\t\t\t\tJOIN producto_plataforma AS propla on p.cod_plataforma = propla.cod_plataforma\n\t\t\t\t\t\t\t\t\t\t\tWHERE p.cod_categoria = \".$cod_categoria.\"\n\t\t\t\t\t\t\t\t\t\t\tORDER BY promar.descripcion ASC, modelo ASC\n\t\t\t\t\t\t\t\t\t\t\t\" );\n\t\t\t\t\t$consulta->execute();\n\n\n\t\t\t\t\twhile( $row = $consulta->fetch( PDO::FETCH_ASSOC ) )\n\t\t\t\t\t\t$productos[] = $row;\n\t\t\t\t\t\n\n\t\t\t\t\t$cantidad = count($productos);\n\t\t\t\t\t\n\t\t\t\t\t$categoria = $productos[0][\"codigo_categoria\"];\n\t\t\t\t\t\n\t\t\t\t\t$contador = 0;\n\t\t\t\t\tfor( $i = 0; $i < $cantidad; $i++ ){\n\n\t\t\t\t\t\t// Se crea el titulo de la categoria por cada primer producto\n\t\t\t\t\t\tif( $contador == 0 ){\n\t\t\t\t\t\t\t$lista .= \t\"\n\t\t\t\t\t\t\t\t\t\t<span class='titulo'>\".ucfirst($productos[$i][\"categoria\"]).\"</span>\n\t\t\t\t\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\t\t\t\t<table cellspacing='0' id='TABLA_lista_productos'>\n\t\t\t\t\t\t\t\t\t\t\";\n\n\t\t\t\t\t\t\tif( $productos[$i][\"categoria\"] != \"juego\" ){\n\t\t\t\t\t\t\t\t$lista .= \t\"\n\t\t\t\t\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<th width='5%'>Stock</th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<th width='5%'>Codigo</th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<th width='10%'>Marca</th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<th width='15%'>Modelo</th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<th width='10%'>Color</th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<th class='costo' width='10%'>Precio de Costo</th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<th width='10%'>Precio de Venta</th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<th width='35%'>Descripcion</th>\n\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t\t\t\t\";\n\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$lista .= \t\"\n\t\t\t\t\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<th>Stock</th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<th>Codigo Producto</th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<th>Descripcion</th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<th>Plataforma</th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<th class='costo'>Precio de Costo</th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<th>Precio de Venta</th>\n\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t\t\t\t\t\t<tbody>\n\t\t\t\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$contador++;\t\t\t\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif( $productos[$i][\"categoria\"] != \"juego\" ){\n\t\t\t\t\t\t\t// Se imprimen los productos de la categoria\n\t\t\t\t\t\t\t$lista .= \t\"\n\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td>\".$productos[$i][\"stock_actual\"].\"</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td>\".$productos[$i][\"codigo_producto\"].\"</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td>\".ucfirst($productos[$i][\"marca\"]).\"</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td><span class='mostrar_foto' name='\".$productos[$i][\"foto\"].\"'>\".$productos[$i][\"modelo\"].\"</span></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td>\".$productos[$i][\"color\"].\"</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='costo'></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td>\".number_format( intval($productos[$i][\"precio_venta\"]), 0, ' ', '.').\"</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td>\".$productos[$i][\"descripcion\"].\"</td>\n\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\";\t\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$lista .= \t\"\n\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td>\".$productos[$i][\"stock_actual\"].\"</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td>\".$productos[$i][\"codigo_producto\"].\"</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td>\".$productos[$i][\"descripcion\"].\"</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td>\".$productos[$i][\"plataforma\"].\"</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='costo'></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td>\".$productos[$i][\"precio_venta\"].\"</td>\n\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\";\t\t\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$contador++;\n\n\t\t\t\t\t\tif( $i < $cantidad - 1 ){\n\t\t\t\t\t\t\tif( $productos[$i+1][\"codigo_categoria\"] != $categoria ){\n\t\t\t\t\t\t\t\t$categoria = $productos[$i+1][\"codigo_categoria\"];\n\t\t\t\t\t\t\t\t$contador = 0;\n\t\t\t\t\t\t\t\t$lista .= \t\"\n\t\t\t\t\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\t\t\t\t\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$lista .= \t\"\n\t\t\t\t\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\t\t\t\t\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn $lista;\n\n\t\t\t}\n\n\t\t\t// Cierra la conexion a la base de datos\n\t\t\t$con = null;\n\t\t}", "title": "" }, { "docid": "bd40bb3c03dc68deca484d1b02c7e6a3", "score": "0.56885767", "text": "public function getproductosCarrito(){\n\t\tif($carrito=$this->cart->contents()){\n\t\t\techo json_encode($carrito);\n\t\t}\n\t\telse{\n\t\t\techo json_encode(FALSE);\n\t\t}\n\t}", "title": "" }, { "docid": "de2c861be84f215696784a77d774f333", "score": "0.56723195", "text": "public static function getAll()\r\n {\r\n\t\ttry {\r\n\t\t\t$query = \"SELECT prod.id, prod.modelo, prod.descripcion, prod.stock, prod.precio, \r\n cat.id idCategoria, cat.descripcion descripcionCategoria,\r\n t.id idTalle, t.descripcion descripcionTalle,\r\n c.id idColor, c.descripcion descripcionColor,\r\n img.id idImagen, img.nombre, img.tipo, img.size, img.ruta, \r\n img.rutaThumbnail, img.idProducto, img.orden\r\n FROM productos prod \r\n INNER JOIN categorias cat ON prod.idCategoria = cat.id\r\n LEFT JOIN talles_productos tp ON tp.idProducto = prod.id\r\n LEFT JOIN talles t ON tp.idTalle = t.id\r\n LEFT JOIN colores_productos cp ON cp.idProducto = prod.id\r\n LEFT JOIN colores c ON cp.idColor = c.id\r\n LEFT JOIN imagenes img ON prod.id = img.idProducto\r\n WHERE prod.baja = 0\";\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n $stmt = DBConnection::getStatement($query);\r\n\t\t \r\n if (!$stmt->execute()) {\r\n\t\t\t\tthrow new Exception('Error al traer los productos');\r\n\t\t\t}\r\n $productos = array();\r\n $idAnterior = 0;\r\n $idTalleAnterior = 0;\r\n $idColorAnterior = 0;\r\n $idImagenAnterior = 0;\r\n\t\t\t\r\n while (($row = $stmt->fetch(PDO::FETCH_ASSOC)) !== false) {\r\n //hacer un corte de control para los talles y colores\r\n $producto;\r\n \r\n if ($idAnterior != $row['id']) {\r\n \r\n $talle = new Talle($row['idTalle'],$row['descripcionTalle']);\r\n $color = new Color($row['idColor'],$row['descripcionColor']);\r\n $categoria = new Categoria($row['idCategoria'], $row['descripcionCategoria']);\r\n $producto = new Producto($row['id'], $row['modelo'], $row['descripcion'], \r\n $categoria, null, null, $row['stock'], $row['precio']);\r\n \r\n $imagen = new Imagen($row['idImagen'], $row['nombre'], $row['tipo'], \r\n $row['size'], $row['ruta'],\r\n $row['rutaThumbnail'], $row['idProducto']);\r\n \r\n $producto->addImagen($imagen);\r\n $producto->addTalle($talle);\r\n $producto->addColor($color);\r\n \r\n $idImagenAnterior = $row['idImagen'];\r\n $idTalleAnterior = $row['idTalle'];\r\n $idColorAnterior = $row['idColor'];\r\n\r\n $productos[] = $producto;\r\n } else {\r\n self::CorteControlImagenes($producto, $row, $idImagenAnterior);\r\n self::CorteControlTalles($producto, $row, $idTalleAnterior);\r\n self::CorteControlColores($producto, $row, $idColorAnterior);\r\n }\r\n $idAnterior = $row['id'];\r\n\t\t\t}\r\n return $productos;\r\n } catch(PDOException $e) {\r\n\t\t\t echo 'Error: ' . $e->getMessage();\r\n }\r\n }", "title": "" }, { "docid": "d8c29fb28d6b3d67a29e3b231955fe95", "score": "0.5667255", "text": "public function obtenerProductosPorCodigo($cods) {\n\n $prods = [];\n\n if(!empty($cods)) {\n $resp = Producto::obtenerProductosPorCodigo(json_decode($cods));\n\n if( !empty( $resp['0'] )) {\n foreach( $resp as $val ) {\n $prods[] = $this->procesarProductos($val);\n }\n }\n }\n\n return $prods;\n }", "title": "" }, { "docid": "b35ee8aff728867848bdc90f9fe05e82", "score": "0.566705", "text": "function getProcessoCompras() {\n\n if ($this->iCodLicitacao == null) {\n\n throw new exception(\"Código da licitacao nulo\");\n return false;\n\n }\n $oDaoLicitem = db_utils::getDao(\"liclicitem\");\n $sCampos = \"distinct pc80_codproc,coddepto, descrdepto,login,pc80_data,pc80_resumo\";\n $rsProcessos = $oDaoLicitem->sql_record(\n $oDaoLicitem->sql_query_inf(null, $sCampos,\"pc80_codproc\",\n \"l21_codliclicita = {$this->iCodLicitacao}\")\n );\n if ($oDaoLicitem->numrows > 0) {\n\n for ($iInd = 0; $iInd < $oDaoLicitem->numrows; $iInd++) {\n\n $aSolicitacoes[] = db_utils::fieldsMemory($rsProcessos, $iInd); \n }\n return $aSolicitacoes;\n } else {\n return false;\n }\n\n }", "title": "" }, { "docid": "1f3b7be99ab2a6076c7995c4737072a1", "score": "0.56608367", "text": "public function tipoCosteoProd($idProd){\r $myQuery = \"SELECT id_tipo_costeo from app_productos where id='$idProd';\";\r //echo $myQuery.'<br>';\r $nreq = $this->queryArray($myQuery);\r $tc = $nreq['rows'][0]['id_tipo_costeo'];\r return $tc;\r }", "title": "" }, { "docid": "42625794a7bf90e18426ad858ca5a8eb", "score": "0.5659899", "text": "public function getProduct(){\n $sql = 'SELECT producto.* FROM producto\n inner join categoria on producto.id_categoria = categoria.id_categoria\n inner join marca on producto.id_marca = marca.id_marca \n WHERE producto.activo = \"1\" AND marca.activo = \"1\" ORDER BY nombre ' .$_SESSION['orden'];\n return $this->con->query($sql);\n }", "title": "" }, { "docid": "a92c0cd59c827e74881a4d093f173d95", "score": "0.5647903", "text": "public function getTiposCategorias(){\n $query=\"CALL getTiposCategorias();\";\n $result = $this->newConn->ExecuteQuery($query);\n $result_array = array();\n if($result){\n $i = 0;\n while($row=$this->newConn->GetRows($result)){\n \n $result_array[$i] = $row[0];\n $i++;\n }\n \n return $result_array;\n \n }else{\n echo \"<h3>Error generando la consulta</h3>\";\n }\n }", "title": "" }, { "docid": "32bf9800c872b032478faf0a638858b3", "score": "0.5640961", "text": "function fetch_prods($prod)\n\t{\n\t\t$this->res = array();\n\t\tforeach($prod as $nom_pere => $desc_pere)\n\t\t{\n\t\t\t// on est dans une sous-categorie\n\t\t\tif(is_array($desc_pere))\n\t\t\t$this->res[]= array($desc_pere[1],$desc_pere[0]);\n\t\t\tif(count($desc_pere) >1)\n\t\t\t{\n\t\t\t\t$this->fetch_prods($desc_pere);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "c46023c6d2054c76e1d73d6662cc0a61", "score": "0.56384116", "text": "public function getCommodities() {\n\t\t$db = $this->_db;\n\n\t\t// Create a new query object.\n\t\t$query = $db->getQuery(true);\n\n\t\t$query->select($db->quoteName(array('a.id', 'a.category_id')));\n\t\t$query->select('CONCAT('.$db->quoteName('a.name').', \" (\",'.$db->quoteName('a.denomination').', \")\") name');\n\n\t\t$query->from($db->quoteName('#__gtpihpssurvey_ref_commodities', 'a'));\n\t\t\n\t\t$query->where($db->quoteName('a.published') . ' = 1');\n\t\t\n\t\t$db->setQuery($query);\n\t\t$raw = $db->loadObjectList();\n\t\t$data = array();\n\t\tforeach ($raw as $item) {\n\t\t\t$data[$item->category_id][$item->id] = $item;\n\t\t}\n\t\t//echo nl2br(str_replace('#__','pihps_',$query));\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "ce50f3392d0f963f4f72332ccf0c7402", "score": "0.5635601", "text": "public static function TraerTodosLasComisiones()\n\t{\n\t\t$objetoAccesoDato = AccesoDatos::dameUnObjetoAcceso(); \n\t $consulta =$objetoAccesoDato->RetornarConsulta(\"select * from comisiones\");\n\t\t$consulta->execute();\t\t\t\n\t\t$arrCurso= $consulta->fetchAll(PDO::FETCH_CLASS, \"comision\");\t\n\t\treturn $arrCurso;\n\t}", "title": "" }, { "docid": "2826da94d59d7cb644415e84b9fa48a0", "score": "0.56316", "text": "public function getCurso($idAlumno) {\n $query = $this->db->query(\"SELECT curso \"\n . \"FROM alumno \"\n . \"WHERE idAlumno = '$idAlumno'\");\n\n return $query->result_array();\n }", "title": "" }, { "docid": "3de1ca9fc7ef265ca77c563925fdc305", "score": "0.562881", "text": "public function getCentroDistribucion() {\r\n $bodegas = null;\r\n $sql = \"SELECT * FROM bodega WHERE TipoBodega_idTipoBodega = 1\";\r\n $r = $this->db->ejecutarConsulta($sql);\r\n if ($r) {\r\n $cont = 0;\r\n while ($w = mysql_fetch_array($r)) {\r\n $tipoBodega = $this->getTipoBodegaById($w['TipoBodega_idTipoBodega']);\r\n $bodega = new CBodega($w['idBodega'], $w['codigo'], $w['nombre'], $tipoBodega, null);\r\n $bodegas[$cont] = $bodega;\r\n $cont++;\r\n }\r\n }\r\n return $bodegas;\r\n }", "title": "" }, { "docid": "da787f4ad84606f2cea18b25cdf02a41", "score": "0.5625176", "text": "public function obten_censo_por_id_cinco($id){\n\n\t\t$sql = mysqli_query(Conecta::conx(),\"select stv.*, dv.*, av.* from situacion_vivienda as stv, detalles_vivienda as dv, ayuda_vivienda as av where stv.ID_JEFE=$id and av.ID_JEFE=$id and dv.ID_JEFE=$id\")or die('problemas al tratar de traer los datos de la tabla:' . $sql . mysqli_errno(Conecta::conx()));\n\t\t\n\t\twhile($reg=mysqli_fetch_assoc($sql)){\n\t\t\t$this->datos_censo_cinco[]=$reg;\n\t\t}\n\t\treturn $this->datos_censo_cinco;\n\n\t}", "title": "" }, { "docid": "3910fad9353751ec1c2591a135b6fc9b", "score": "0.56241566", "text": "function getproveedores_producto($producto_id)\r\n {\r\n $sql = \"\r\n SELECT p.*\r\n from proveedor p \r\n left join compra c on p.proveedor_id = c.proveedor_id \r\n left join detalle_compra dc on c.compra_id = dc.compra_id\r\n WHERE\r\n \tdc.`producto_id` = $producto_id\r\n GROUP BY p.`proveedor_id`\r\n ORDER BY p.`proveedor_id` DESC\";\r\n $producto = $this->db->query($sql)->result_array();\r\n return $producto;\r\n\r\n }", "title": "" }, { "docid": "415c0d29be956e4fa539fe261d630f70", "score": "0.56215566", "text": "function get_productos_list_combo($offset, $per_page) {\n\t\t$u = new Producto();\n\t\t$sql = \"select p.*, mp.tag as marca_producto, psf.tag as subfamilia_producto, eg.tag as estatus, pf.tag as familia_producto, pc.tag as color, cmp.tag as marca from cproductos as p left join cmarcas_productos as mp on mp.id=p.cmarca_producto_id left join cproductos_subfamilias as psf on psf.id=p.csubfamilia_id left join cproductos_familias as pf on pf.id=p.cfamilia_id left join cproductos_color as pc on pc.id=p.ccolor_id left join cmarcas_productos as cmp on cmp.id=p.cmarca_producto_id left join estatus_general as eg on eg.id=p.estatus_general_id where p.estatus_general_id='1' and (p.status = '1' or p.status isnull) and p.combo=1 order by p.descripcion asc limit $per_page offset $offset\";\n\t\t//Buscar en la base de datos\n\t\t$u->query($sql);\n\t\tif ($u->c_rows > 0) {\n\t\t\treturn $u;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "0d52ce5515437f2424a438f2ebe383e9", "score": "0.56185275", "text": "public function get_produtos() {\n $sql = $this->get_queries()->get_produtos();\n $statement = $this->m_connection->prepare($sql);\n $statement->execute();\n\n $array = DB::to_array($statement);\n $produtos = array();\n foreach ($array as $f) {\n $produto = DB::getInstance()->criar_produto($f);\n $produtos[] = $produto;\n }\n return $produtos;\n }", "title": "" }, { "docid": "b49efd8f9916daed84ab134d9541e11d", "score": "0.5616511", "text": "function producto_combo($producto_id)\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from(self::pos_combo . ' as c');\n\t\t$this->db->where('c.Producto_Combo', $producto_id);\n\t\t$query = $this->db->get();\n\n\t\tif ($query->num_rows() > 0) {\n\t\t\treturn $query->result();\n\t\t}\n\t}", "title": "" }, { "docid": "848461e70834b438ff92ac5aeed7b242", "score": "0.5616398", "text": "function getCognoms(){\n return $this->cognoms;\n }", "title": "" }, { "docid": "4e03903ef8519da80c7aa09aef56f37e", "score": "0.5607109", "text": "public function obterPreRequisitos() {\n $preRequisitos = array();\n $con = BD::conectar();\n\n $query=sprintf(\"Select * \".\n \"from ComponentePreRequisito \".\n \"where siglaCurso= '%s' and \".\n \"idMatriz = %d and \".\n \"siglaDisciplina = '%s' \",$this->getSiglaCurso(), $this->getIdMatriz(), $this->getSiglaDisciplina());\n $result=mysql_query($query,$con);\n \n while( $resComponentePreRequisito = mysql_fetch_array($result) ) {\n $siglaCurso=$resComponentePreRequisito['siglaCurso'];\n $idMatriz=$resComponentePreRequisito['idMatriz'];\n $siglaDisciplina=$resComponentePreRequisito['siglaDisciplinaPreRequisito'];\n $componente = ComponenteCurricular::obterComponenteCurricular($siglaCurso, $idMatriz, $siglaDisciplina);\n $preRequisitos[] = $componente;\n }\n return $preRequisitos;\n }", "title": "" }, { "docid": "6a3d7872c8d8ecbf639144c90e85905d", "score": "0.560047", "text": "function carrito () {\n \t\t$this->num_productos=0;\n\t}", "title": "" }, { "docid": "3e9a1d407347781e3266137a84e44114", "score": "0.56001526", "text": "function buscar_proveedores()\r\n\t{ \r\n\t\t$c=0;\r\n\t\t$sql=\"select * from tproveedor_medico where id_medico='$this->idMedico' and estatus='1'\";\t\t\r\n\t\t $cursor=parent::ejecuta_sql($sql);\r\n\t\t if($row= parent::proxima_tupla($cursor))\r\n\t\t {\r\n\t\t\t DO\r\n\t\t\t {\r\n\t\t\t\t$fila[$c][1]=$row[\"id_proveedor_medico\"];\r\n\t\t\t\t$fila[$c][2]=$row[\"id_medico\"];\r\n\t\t\t\t$fila[$c][3]=$row[\"id_proveedor\"];\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t$c++;\t\t\t\t \r\n\t\t\t }WHILE($row= parent::proxima_tupla($cursor));\r\n\t\t }\r\n\t\tif ( $fila>0 )\r\n\t\t\treturn $fila;\r\n\t\telse\r\n\t\t\treturn -1;\r\n\t\t\t\r\n\t\tparent::cerrar_bd();\r\n\t}", "title": "" }, { "docid": "f917870394b7c29fe1c5bb8dc519815e", "score": "0.55992633", "text": "function getBeneficiosProducto($producto_id){\n\n\t\tinclude (\"conexion.php\");\n\t\t$sql = \"SELECT B.beneficio_tdc_nombre\n\t\t\t\tFROM comparador_beneficio_tdc B, comparador_producto_beneficio PB\n\t\t\t\tWHERE B.beneficio_tdc_id = PB.beneficio_tdc_id AND PB.producto_tdc_id = '$producto_id'\";\n\t\t$result = mysqli_query($mysqli, $sql);\n\n\t\t$beneficios = array();\n\n\t\twhile($row = mysqli_fetch_array($result))\n\t\t{\n\t\t\t$beneficios[] = $row[\"beneficio_tdc_nombre\"];\n\t\t}\n\n\t\treturn $beneficios;\n\t}", "title": "" }, { "docid": "ad05d5c9303749ab605d44eaf3a9b65f", "score": "0.5599228", "text": "public function getProductImportant(){\n $sql = 'SELECT producto.* FROM producto \n inner join categoria on producto.id_categoria = categoria.id_categoria\n inner join marca on producto.id_marca = marca.id_marca \n WHERE producto.prod_destacado = \"1\" AND producto.activo = \"1\" AND marca.activo = \"1\" ORDER BY nombre ' .$_SESSION['orden'];\n return $this->con->query($sql);\n }", "title": "" }, { "docid": "01bbcc81a775bb48be9f4c72edf39e53", "score": "0.5598769", "text": "abstract function obtenerFilaComoCadena();", "title": "" }, { "docid": "48dc07186aac61b94f20f5cc1d8a0e81", "score": "0.55960923", "text": "public function lista_productos_familia_compra( $cod_familia ){\n\t\t\t\n\t\t\t// VARIABLES\n\t\t\t$lista = \"\";\n\n\t\t\t// CUERPO\n\t\t\t// Abro la conexion a la base de datos\n\t\t\t$con = $this->conexion();\n\n\t\t\t// Primero cuento la cantidad de productos que hay con el codigo de familia elegido\n\t\t\t$consulta = $con->prepare( \"SELECT COUNT(*) AS cantidad FROM producto WHERE cod_familia = ?\" );\n\t\t\t$consulta->bindValue( 1, $cod_familia );\n\t\t\t$consulta->execute();\n\t\t\t$temporal = $consulta->fetch( PDO::FETCH_ASSOC );\n\t\t\t$cantidad = $temporal['cantidad'];\n\n\t\t\t// Dependiendo del resultado, se dan las siguientes opciones\n\t\t\tif( $cantidad == 0 ){\t\n\t\t\t\t\n\t\t\t\t$lista .= \"No hay productos en existencia de la familia seleccionada\";\n\t\t\t}else{\n\n\t\t\t\t// Inicializacion de variables\n\t\t\t\t$productos = array();\n\t\t\t\t$cantidad = 0;\n\n\t\t\t\t$consulta = $con->prepare( \t\"\n\t\t\t\t\t\t\t\t\t\t\t\tSELECT \n\t\t\t\t\t\t\t\t\t\t\t\t\tp.cod_familia AS codigo_familia,\n\t\t\t\t\t\t\t\t\t\t\t\t\tp.cod_producto AS codigo_producto,\n\t\t\t\t\t\t\t\t\t\t\t\t\tp.cod_categoria AS codigo_categoria, \n\t\t\t\t\t\t\t\t\t\t\t\t\tprocat.descripcion AS categoria,\n\t\t\t\t\t\t\t\t\t\t\t\t\tpromar.descripcion AS marca,\n\t\t\t\t\t\t\t\t\t\t\t\t\tpromod.descripcion AS modelo,\n\t\t\t\t\t\t\t\t\t\t\t\t\tprocol.descripcion AS color,\n\t\t\t\t\t\t\t\t\t\t\t\t\tpropla.descripcion AS plataforma,\n\t\t\t\t\t\t\t\t\t\t\t\t\tp.precio_venta AS precio_venta, \n\t\t\t\t\t\t\t\t\t\t\t\t\tp.descripcion AS descripcion\n\t\t\t\t\t\t\t\t\t\t\t\tFROM producto AS p\n\t\t\t\t\t\t\t\t\t\t\t\tJOIN producto_categoria AS procat on p.cod_categoria = procat.cod_categoria\n\t\t\t\t\t\t\t\t\t\t\t\tJOIN producto_marca AS promar on p.cod_marca = promar.cod_marca\n\t\t\t\t\t\t\t\t\t\t\t\tJOIN producto_modelo AS promod on p.cod_modelo = promod.cod_modelo\n\t\t\t\t\t\t\t\t\t\t\t\tJOIN producto_color AS procol on p.cod_color = procol.cod_color\n\t\t\t\t\t\t\t\t\t\t\t\tJOIN producto_plataforma AS propla on p.cod_plataforma = propla.cod_plataforma\n\t\t\t\t\t\t\t\t\t\t\t\tWHERE p.cod_familia = \".$cod_familia.\"\n\t\t\t\t\t\t\t\t\t\t\t\tORDER BY codigo_categoria ASC, marca ASC, modelo ASC\n\t\t\t\t\t\t\t\t\t\t\t\");\n\n\t\t\t\t$consulta->execute();\n\n\n\t\t\t\twhile( $row = $consulta->fetch( PDO::FETCH_ASSOC ) ){\n\n\t\t\t\t\t$productos[] = $row;\n\t\t\t\t}\n\n\t\t\t\t$cantidad = count( $productos );\n\t\t\t\t\n\t\t\t\t$contador = 0;\n\t\t\t\tfor( $i = 0; $i < $cantidad; $i++ ){\n\n\t\t\t\t\t// Se crea el titulo de la categoria por cada primer producto\n\t\t\t\t\tif( $contador == 0 ){\n\t\t\t\t\t\t$lista .= \t\"\n\t\t\t\t\t\t\t\t\t<br><br>\n\t\t\t\t\t\t\t\t\t<table cellspacing='0' id='TABLA_lista_productos_familia'>\n\t\t\t\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<th width='5%'>Seleccion</th>\n\t\t\t\t\t\t\t\t\t\t\t\t<th width='5%'>Codigo</th>\n\t\t\t\t\t\t\t\t\t\t\t\t<th width='5%'>Marca</th>\n\t\t\t\t\t\t\t\t\t\t\t\t<th width='20%'>Modelo</th>\n\t\t\t\t\t\t\t\t\t\t\t\t<th width='15%'>Color</th>\n\t\t\t\t\t\t\t\t\t\t\t\t<th width='10%'>Plataforma</th>\n\t\t\t\t\t\t\t\t\t\t\t\t<th width='40%'>Descripcion</th>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t</thead>\n\n\t\t\t\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t\t\";\n\t\t\t\t\t}\n\n\t\t\t\t\t$lista .= \t\"\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td><input type='checkbox' class='check_comprar' name='\".$productos[$i][\"codigo_producto\"].\"'></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td id='cod_producto'>\".$productos[$i][\"codigo_producto\"].\"</td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td>\".$productos[$i][\"marca\"].\"</td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td>\".$productos[$i][\"modelo\"].\"</td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td>\".$productos[$i][\"color\"].\"</td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td>\".$productos[$i][\"plataforma\"].\"</td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td>\".$productos[$i][\"descripcion\"].\"</td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t<tr id='contenedor_costo_y_cantidad_\".$productos[$i][\"codigo_producto\"].\"' class='contenedor_costo_y_cantidad' style='display:none'>\n\t\t\t\t\t\t\t\t\t\t\t\t<td colspan='7'>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<!-- CAMPO PARA CARGA DEL COSTO. -->\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>Ingrese el costo del producto: </span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style='margin-right:20px'><input type='text' id='costo_producto_\".$productos[$i][\"codigo_producto\"].\"' size='10' value='\".number_format($productos[$i][\"precio_venta\"], 0, ' ', '.').\"' onkeyup='format(this)' onchange='format(this)''></span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<!-- SELECT PARA LA SELECCION DE LA CANTIDAD DE PRODUCTOS A COMPRAR. -->\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style='text-align: center'>Ingrese la cantidad a comprar: </span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style='margin-right:20px'>\". \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$lista_cantidad = $this->listar_cantidad( $productos[$i][\"codigo_producto\"] )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.\"</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<br><br>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<!-- SELECT PARA LA SELECCION DE LA FORMA DE PAGO DE LA COMPRA. -->\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>Ingrese la forma de Pago</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\".\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$lista_formas_pago = $this->lista_formas_pago( $productos[$i][\"codigo_producto\"] )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.\"</span>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<!-- BOTON PARA PROCESAR LA COMPRA. -->\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span><input type='button' id='btn_comprar' name='\".$productos[$i][\"codigo_producto\"].\"' class='boton' value='Comprar'></span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\";\n\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t$contador++;\n\t\t\t\t}\n\n\t\t\t\t$lista .= \t\t\t\t\"</tbody>\n\t\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t\t<br><br>\";\n\t\t\t}\n\n\t\t\treturn $lista;\n\n\t\t\t// Cierra la conexion a la base de datos\n\t\t\t$con = null;\n\t\t}", "title": "" }, { "docid": "a9a393251bef68e2ec250459974e2397", "score": "0.55836505", "text": "public function getCofins()\n {\n return $this->cofins;\n }", "title": "" }, { "docid": "5bb85b458ef9e35a100fb9576b51601e", "score": "0.5583225", "text": "public function get_ventas_ccf_empresarial($empresa){\n $conectar= parent::conexion();\n $sql= \"select c.numero_venta,p.nombres,p.empresas,c.monto,c.saldo,p.id_paciente,c.id_credito,v.evaluado\n from creditos as c inner join pacientes as p on c.id_paciente=p.id_paciente inner join ventas as v on c.numero_venta=v.numero_venta\n where p.empresas=? order by c.id_credito DESC;\";\n $sql=$conectar->prepare($sql);\n $sql->bindValue(1,$empresa);\n $sql->execute();\n return $resultado= $sql->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "157d765a81c85bed199eec787e35929e", "score": "0.5579137", "text": "public function procesarProductos($producto) {\n return [\n 'cod_item' => $producto->cod_item,\n 'referencia' => $producto->referencia,\n 'descrip' => $producto->descrip,\n 'descr_abr' => $producto->descr_ab,\n 'grupo' => $producto->grupo,\n 'itm_linea' => $producto->itm_linea,\n 'itm_extens' => $producto->itm_extens,\n 'precio1' => $producto->precio1,\n 'iva_inc_p1' => $producto->iva_inc_p1,\n 'precio1_ad' => $producto->precio1_ad,\n 'iva_pv1_ad' => $producto->iva_pv1_ad,\n 'precio2' => $producto->precio2,\n 'iva_inc_p2' => $producto->iva_inc_p2,\n 'precio2_ad' => $producto->precio2_ad,\n 'iva_pv2_ad' => $producto->iva_pv2_ad,\n 'precio3' => $producto->precio3,\n 'iva_inc_p3' => $producto->iva_inc_p3,\n 'precio3_ad' => $producto->precio3_ad,\n 'iva_pv3_ad' => $producto->iva_pv3_ad,\n 'uni_factor' => $producto->uni_factor,\n 'l_barcode' => $producto->l_codebar\n ];\n }", "title": "" }, { "docid": "b2113414cb4e95e78b60dabc2de17e2d", "score": "0.55749893", "text": "public static function obtenerProductosPorCodigo($cods) {\n $data = Producto::select( 'initem.cod_item', 'initem.referencia', 'initem.descrip', 'initem.tasa_iva',\n 'initem.tasaivavta', 'initem.itm_linea', 'initem.grupo', 'initem.itm_extens',\n 'inlista.precio1', 'inlista.iva_inc_p1', 'inlista.precio1_ad', 'inlista.iva_pv1_ad',\n 'inlista.precio2', 'inlista.iva_inc_p2', 'inlista.precio2_ad', 'inlista.iva_pv2_ad',\n 'inlista.precio3', 'inlista.iva_inc_p3', 'inlista.precio3_ad', 'inlista.iva_pv3_ad',\n 'insaldo.actual_sdo', Producto::raw('(insaldo.actual_sdo - (insaldo.pdv_sdo + insaldo.sdo_asigpd)) as saldo_disponible')\n )\n ->leftjoin('inlista', 'inlista.cod_lis', '=', 'initem.cod_item') \n ->join('insaldo', 'insaldo.cod_sdo', '=', 'initem.cod_item')\n ->where('insaldo.bod_sdo', '=', '03')\n // ->havingRaw('saldo_disponible > ?', [0])\n ->whereIn('initem.cod_item', $cods)\n ->where('insaldo.actual_sdo', '>', 0)\n ->get();\n\n return $data; \n }", "title": "" }, { "docid": "2a2e58c96e587d4f5488e33a7b85e7e0", "score": "0.5561596", "text": "function find_all_costo_desc()\n {\n $conexion = new Conexion();\n $conn = $conexion->conectar();\n //a continuacion viene la consulta en este caso si recibe parametros\n $stmt = $conn->prepare(\"SELECT VIJ_ID, VIJ_FECHA, VIJ_TIPO, VIJ_COSTO, CANT_BOL, AGENCIA_AG_ID, RUT_ID FROM viaje ORDER BY VIJ_COSTO DESC\");\n //aqui van los parametros de la consulta, que es lo que reemplaza los simbolos de interrogacion en ese orden\n $stmt->execute(array());\n //aqui se obtiene una instancia de un array con objetos de la clase viaje\n $resultado = $stmt->fetchAll(PDO::FETCH_CLASS, \"viaje\");\n return $resultado;\n }", "title": "" }, { "docid": "ab7ec25376c66bbdef3fa71a1d1676cd", "score": "0.5561251", "text": "static function get_nro_claves_no_repetidas($proyecto) \n\t{\n\t\treturn self::get_redefinicion_parametro($proyecto, 'claves_no_repetidas', false);\n\t}", "title": "" }, { "docid": "25c76fc384095432f5c36643798540a2", "score": "0.55593866", "text": "public static function claves($idproyecto, $propietario)\n {\n return DB::table('claves')\n ->select('claves.nombre','claves.identificador',\n DB::raw('(SELECT proyectos_claves.valor\n FROM proyectos_claves\n WHERE proyectos_claves.clave_id=claves.id\n and proyectos_claves.proyecto_id='.$idproyecto.'\n and proyectos_claves.propietario=\"'.$propietario.'\") as valor')\n )\n ->whereIn('claves.modulo_id', function($query){\n $query->select('modulos.id')\n ->from('modulos')\n ->where('modulos.clasificacion_id','=','2');\n })\n ->paginate(10);\n }", "title": "" }, { "docid": "100b0f209d5b97c692783327de878280", "score": "0.5558898", "text": "function get_anios_de_cursada_con_mix($parametros)\n {\n if (isset($parametros['carrera']))\n { \n $carrera = $parametros['carrera'];\n $sql = \"SELECT DISTINCT anio_de_cursada\n FROM ufce_mixes\n WHERE carrera = $carrera \";\n $datos = kernel::db()->consultar($sql, db::FETCH_ASSOC);\n return $datos;\n }\n return null;\n }", "title": "" }, { "docid": "c8e383a4d75221de89e0be701277a6f4", "score": "0.55564934", "text": "public function getCustasPT($idProtesto, $valorTitulo){\n \t$select = $this->select();\n \t\n \t$select->setIntegrityCheck(false);\n \t\n \t$select->from(array('pro' => 'car_protestos'), array('idProtesto'));\n \t\n \t$select->joinInner(array('vig' => 'car_vigencias'), 'pro.idVigencia = vig.idVigencia', array());\n\n \t$select->joinInner(array('cus' => 'car_custas'), 'vig.idVigencia = cus.idVigencia', array('nome', 'valor'));\n \t//pega apenas o emolumento correspondente\n \t$select->joinLeft(array('emo' => 'car_emolumentos'), 'vig.idVigencia = emo.idVigencia', array('emolumento'));\n \t\n \t$select->where(\"cus.nome != 'cancelamento' \");\n \t\n \t$select->where(\"cus.nome != 'certidao' \");\n \t\n \t$select->where('idProtesto = ?', $idProtesto);\n \t\n \t$select->where('valor_inicial <= ?', $valorTitulo);\n \t\n \t$select->where('valor_final >= ?', $valorTitulo);\n \t \t\n \t/*$sql = (string) $select;\n \tprint_r(\"<pre>\");\n\t print_r($sql);\n\t print_r(\"</pre>\");exit;*/\n \t\n \t$data = $this->fetchAll($select);\n \t\n \treturn $data;\n }", "title": "" }, { "docid": "cae81e4d233853ea3ea88d5c6022bc0f", "score": "0.55541503", "text": "private function cargarproductos($param1 = null){\n\t\t$datos_productos = array();\n\t\t$this->CI->load->model('Productos');\n\t\t$mod_productos = new Productos();\n\n\t\tif(isset($param1)){\n\t\t\t$datos_categorias = array();\n\t\t\t$datosProductosTemp = array();\n\t\t\t$this->CI->load->model('Categorias');\n\t\t\t$mod_categorias = new Categorias();\n\t\t\t\n\t\t\t$datos_productos['Posicion'] = $mod_categorias->get_nombre($param1);\n\t\t\t/*Busco si tengo algun producto en la categoria seleccionada*/\n\t\t\t$productos_categoria = $mod_productos->read_Categoria($param1);\n\t\t\tif(isset($productos_categoria))\n\t\t\t\t$datosProductosTemp = $productos_categoria;\n\t\n\t\t\t/*Calculo si tiene categorias descendientes y sus productos*/\n\t\t\t$datos_categorias = $mod_categorias->calcular_descendencia($param1);\n\t\t\tif(isset($datos_categorias))\n\t\t\tforeach($datos_categorias as $categoria){\n\t\t\t\t$productos_categoria = $mod_productos->read_Categoria($categoria[\"categoria_id\"]);\n\t\t\t if(isset($productos_categoria))\n\t\t\t\t\t$datosProductosTemp = array_merge($datosProductosTemp, $productos_categoria);\n\t\t\t}\n\n\t\t\tif(isset($datosProductosTemp))\n\t\t\t$datos_productos['Productos'] = $datosProductosTemp;\n\t\t}else{\n\t\t\t$datos_productos['Posicion'] = \"Ofertas\";\n\t\t\t$datos_productos['Productos'] = $mod_productos->read_ofertas();\n\t\t\t//$datos_productos['Productos'] = $mod_productos->read_all();\n\t\t}\n\t\treturn $datos_productos; \t\n\t}", "title": "" }, { "docid": "7ffd5712afd7369c80c068ba128ea6e9", "score": "0.5553437", "text": "public static function getAllProductos(){\n $conex=new Conexion(\"dwes\");\n \n $resultado=$conex->query(\"SELECT * FROM producto\");\n \n if ($conex->affected_rows){\n while($producto=$resultado->fetch_object()){\n $array[]=new Producto($producto->cod, $producto->nombre_corto, $producto->PVP, $producto->familia, $producto->descripcion);\n }\n \n return $array;\n }\n \n return false;\n }", "title": "" }, { "docid": "df04f08d3cf41537f1eb1e35e7616f30", "score": "0.5550115", "text": "public function fetchCompetitivePricing();", "title": "" }, { "docid": "c8fe21e3a84fe9688c8abaff6304f08c", "score": "0.5538361", "text": "public function get_creditos_cauto($sucursal){\n $conectar= parent::conexion();\n $sql= \"select c.numero_venta,p.nombres,p.empresas,c.monto,c.saldo,p.id_paciente,c.id_credito,v.evaluado\n from creditos as c inner join pacientes as p on c.id_paciente=p.id_paciente inner join ventas as v on c.numero_venta=v.numero_venta\n where c.forma_pago='Cargo Automatico' and p.sucursal=? order by c.id_credito DESC;;\";\n $sql=$conectar->prepare($sql);\n $sql->bindValue(1,$sucursal);\n $sql->execute();\n return $resultado= $sql->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "ab867a5299d3902e61c6b75c38fe5671", "score": "0.5536894", "text": "public function getServicios()\n {\n return Cont_CatalogItem::where('idclaseitem', 2)->orderBy('nombreproducto', 'asc')->get();\n }", "title": "" }, { "docid": "f73d2ff070e15e33b6798e9616edea31", "score": "0.5534994", "text": "function get_each_prod()\n\t{\n\t\t$this->res = array();\n\t\tif(is_array($this->sousprods))\n\t\t{\n\t\t\tforeach($this->sousprods as $nom_pere => $desc_pere)\n\t\t\t\tif(count($desc_pere) >1)\n\t\t\t\t\t$this->fetch_prods($desc_pere);\n\t\t\tsort($this->res);\n\t\t}\n\t\treturn $this->res;\n\t}", "title": "" }, { "docid": "824f941a7b4edcc7e456307a4a59512e", "score": "0.55345166", "text": "function getComision(){ return ($this->comision * $this->precio)/100;}", "title": "" }, { "docid": "7b18b4ba37dac076aca1b13f9ba7d9ec", "score": "0.5534122", "text": "function getAllbyProduct($id_product){\n \n $query = $this->db-> prepare ('SELECT comentario.id, comentario.puntaje ,comentario.comentario,comentario.id_producto, usuario.email, producto.nombre \n FROM comentario INNER JOIN usuario ON (comentario.id_usuario=usuario.id) INNER JOIN producto ON (comentario.id_producto = producto.id)\n WHERE comentario.id_producto = ? '); \n $query->execute([$id_product]);\n return $query->fetchAll(PDO::FETCH_OBJ); \n }", "title": "" }, { "docid": "1fd6b156f63b8f378b386ac9612ad0a5", "score": "0.5532666", "text": "public function pagos_curso_concepto()\n {\n $sql = \"SELECT *, (SELECT COUNT(*) FROM cobros WHERE pago_id = pagos.pago_id) as cobros FROM pagos WHERE concepto_course_id = {$this->conceptoCurso}\";\n $this->Util()->DB()->setQuery($sql);\n $resultado = $this->Util()->DB()->GetResult();\n return $resultado;\n }", "title": "" } ]
a6d28bcfc1f5f0e5997ec3c010217bbe
Update the specified resource in storage.
[ { "docid": "bfb10884973d301fe293c21a46e08089", "score": "0.0", "text": "public function update(ResourceRequest $request, $module, $id)\n {\n if(!auth()->user()->can('edit-'.$module) && !auth()->user()->hasAnyRole('SuperAdmin|Admin')){\n abort(403);\n }\n\n if (strpos($request->created_at, '/') !== false) {\n $request['created_at'] = Carbon::createFromFormat('d/m/Y', $request->created_at);\n }\n\n if($resource = $this->CRUD->update($id, $request->all())) {\n if ($request->has('meta')) {\n $this->CRUD->createUpdateMeta($id, $request->get('meta'));\n }else{\n $this->CRUD->deleteMetaIfExists($id);\n }\n if($request->relations){\n $relations = (array) json_decode($request->relations, true);\n $this->CRUD->getById($id)->relations()->sync($relations);\n }\n if($request->ajax()){\n return response()->json([\n 'status' => 'success',\n 'message' => __(':model Successfully Updated.', ['model' => Str::singular(ucwords($module))]),\n ]); \n }\n return redirect()->route('resources.edit', [$module, $id])\n ->with('success', __(':model Successfully Updated.', ['model' => Str::singular(ucwords($module))]));\n }\n\n return response()->json([\n 'status' => 'error',\n 'message' => __('Something was wrong, please reload page and try again.'),\n ]); \n }", "title": "" } ]
[ { "docid": "995ba0c8f03901b2d9d4e3a2b71aed6a", "score": "0.7192627", "text": "public function put($resource);", "title": "" }, { "docid": "01534868cb4f609380c1221841e980b3", "score": "0.7055208", "text": "public function testUpdateResource()\n {\n\n }", "title": "" }, { "docid": "806a502be14c3132fb31b52b5f6fc652", "score": "0.6811669", "text": "public function update(Request $request, Resource $resource)\n {\n //\n $this->authorize('update', $resource);\n $input=$request->all();\n $resource->update($input);\n return redirect('/resource/'.$resource->id);\n }", "title": "" }, { "docid": "f5a994e832253cd9f55282b676779eee", "score": "0.665668", "text": "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'title' => 'required',\n 'content' => 'required',\n 'icon_id' => 'required'\n ]);\n \n $updateEntry = $resource;\n $updateEntry->title = $request->title;\n $updateEntry->content = $request->content;\n $updateEntry->icon_id = $request->icon_id;\n $updateEntry->save();\n return redirect('resources');\n }", "title": "" }, { "docid": "718f7d64347dbb970d3af2645ff41b28", "score": "0.6624096", "text": "public function update(Request $request, Storage $storage)\n {\n //\n }", "title": "" }, { "docid": "718f7d64347dbb970d3af2645ff41b28", "score": "0.6624096", "text": "public function update(Request $request, Storage $storage)\n {\n //\n }", "title": "" }, { "docid": "24dae383ef96f6cd3c2ae0eb901b0e6e", "score": "0.6533836", "text": "public function update_storage()\n {\n }", "title": "" }, { "docid": "2390e2b8ee9b8954b577e83f8820c087", "score": "0.64636725", "text": "public function update(Request $request, Resource $resource)\n {\n $this->save($resource, $request);\n\n return redirect()->route('resource.show', ['resource' => $resource]);\n }", "title": "" }, { "docid": "8467ecb0dbf1d9ccb84ac63dd18c0896", "score": "0.63440365", "text": "public function update(Request $request, storage $storage)\n {\n $storage->update($request->all());\n\n return redirect()->route('storage.index')->withStatus(__('storage successfully updated.'));\n }", "title": "" }, { "docid": "cc19cd46a06e40af74215bec5d1bff6f", "score": "0.62828", "text": "public function update(Request $request, Storage $storage)\n {\n //\n $data = $request->all();\n $update = Storage::findOrFail($request->storage_id);\n $data = $request->all();\n $ok = $update->update($data);\n\n if ($ok) {\n return back()->with('success', \"Activity updated successfully\");\n } else {\n return back()->with('error', \"Something wen't wrong! Please try again\");\n }\n }", "title": "" }, { "docid": "fa2a013f8711944438e691cb6cc55e66", "score": "0.6139667", "text": "public function update_object ($obj)\n {\n $this->_commit ($obj, Storage_action_update);\n }", "title": "" }, { "docid": "8b36ffcc87dfcd18f23af856d8853acc", "score": "0.6045223", "text": "public function replace(Resource $resource)\n {\n return $this->save($resource, $replace = true);\n }", "title": "" }, { "docid": "53fb2f47835e8885a16e9805805e80d8", "score": "0.60224766", "text": "public function update($resource)\n {\n if ($resource instanceof Model) {\n return $this->form()->update($resource->id);\n }\n\n return $this->form()->update($resource);\n }", "title": "" }, { "docid": "fae18446ab6ba766002815d7efd6d0f2", "score": "0.60153604", "text": "public function updateStream($resource)\n {\n return $this->filesystem->updateStream($this->path, $resource);\n }", "title": "" }, { "docid": "7fcd166007fa0df141cb1ff80f531590", "score": "0.59964967", "text": "public function update(Resource $resource) {\n\t\t$class = get_class($resource);\n\t\t$reflector = new ReflectionClass($class);\n\n\t\t$table = strtolower(substr($class, strrpos($class, \"\\\\\") + 1));\n\t\t$criteria = $resource->getRequiredEqualities();\n\t\t$populateCriteria = $criteria == null;\n\n\t\t$parameters = array();\n\t\tforeach($reflector->getProperties() as $parameter) {\n\t\t\tif($resource->isDirty($parameter->name)) {\n\t\t\t\t$parameters[$parameter->name] = $resource->{'get' . ucfirst(\\framework\\camelCase($parameter->name))}();\n\t\t\t} else if($populateCriteria) {\n\t\t\t\t$criteria[$parameter->name] = $resource->{'get' . ucfirst(\\framework\\camelCase($parameter->name))}();\n\t\t\t}\n\t\t}\n\n\t\ttry {\n\t\t\t$this->driver->update($parameters, $table, $criteria);\n\t\t} catch (InvalidQueryException $exception) {\n\t\t\tthrow $exception; # Move it up the line.\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "c578eae6b6dfa4e69347194aa71e0c56", "score": "0.5987175", "text": "public function update($object)\r\n\t{\r\n\t\tif(file_exists($this->conf->paths['storage'].\"/\".$object->get_id()))\r\n\t\t\t$fp = fopen($this->conf->paths['storage'].\"/\".$object->get_id(), \"w\");\r\n\t\tif(!$fp)\r\n\t\t\tthrow new Exception(\"Failed to open file: '\".$this->conf->paths['storage'].\"/\".$object->get_id().\"'\");\r\n\t\tfwrite($fp, serialize($object));\r\n\t\tfclose($fp);\r\n\t\t$this->update_stat();\r\n\t}", "title": "" }, { "docid": "fb6d6d2f47c01b40c3ee6f90a7b30eaa", "score": "0.59581053", "text": "public function update(Request $request, $id)\n {\n //\n $product=Shirts::find($id);\n // validation\n $this->validate($request,[\n 'name'=>'required',\n 'size'=>'required',\n 'price'=>'required',\n 'description'=>'required'\n ]);\n\n $oldImage=Input::get('image');\n\n $product->description =$request->input('description');\n $product->name = $request->input('name');\n $product->price = $request->input('price');\n $product->size = $request->input('size');\n\n $Image = $request->file('image');\n\n if($Image)\n {\n $filenameToStore= Products::updatePhoto('image','shirts',$request);\n\n $product->image = $filenameToStore;\n\n Storage::delete('public/photos/shirts/'.$oldImage);\n }\n\n $product->save();\n return redirect()->route('shirts.index');\n }", "title": "" }, { "docid": "0491a14749073a0385a7050311d8f458", "score": "0.595499", "text": "public function update(ResourceRequest $request, Resource $resource)\n {\n try {\n $resource = $this->resourceService->updateResource($request->all(), $resource);\n return $this->respondWithSuccess('Resource Updated.', ['resource' => new ResourceResource($resource)], Response::HTTP_ACCEPTED);\n } catch (Exception $e) {\n return $this->respondWithError($e->getMessage());\n }\n }", "title": "" }, { "docid": "98b58f9ade13a98b810ff57532876c2b", "score": "0.5909375", "text": "public function update(Request $request, $id)\n {\n $item = StoragePhoto::findOrFail($id);\n\n if ($request->hasFile('file')) {\n $oldFile = $item->file;\n\n $image = $request->file('image');\n $filename = time() . '.' . $image->getClientOriginalExtension();\n\n $path = $image->storeAs('public/storage_photos', $filename);\n\n $item->file = $filename;\n\n /* TODO - удалить старую пикчу */\n Storage::disk('public')->delete('storage_photos/' . $oldFile);\n }\n\n $item->save();\n\n return redirect()->route('admin.banners.index');\n }", "title": "" }, { "docid": "c505a7676741f8b0f0d5b54e66cdf22a", "score": "0.58993477", "text": "public static function register_or_update_storage_resource($storageResourceDesc, $update = false)\n {\n if ($update) {\n $storageResourceId = $storageResourceDesc->storageResourceId;\n \n if (Airavata::updateStorageResource(Session::get('authz-token'), $storageResourceId, $storageResourceDesc)) {\n $storageResource = Airavata::getStorageResource(Session::get('authz-token'), $storageResourceId);\n return $storageResource;\n } else\n print_r(\"Something went wrong while updating!\");\n exit;\n } else {\n $sr = new StorageResourceDescription( $storageResourceDesc);\n $storageResourceId = Airavata::registerStorageResource(Session::get('authz-token'), $sr);\n }\n $storageResource = Airavata::getStorageResource(Session::get('authz-token'), $storageResourceId);\n return $storageResource;\n\n }", "title": "" }, { "docid": "24392ed55179d91794136a7abc353e0b", "score": "0.5845655", "text": "function handle_put_pic($resource)\n{\n\t$owner = get_owner_of_pic_resource($resource);\n\tif(!authenticate_user($owner))\n\t{\n\t\theader(\"HTTP/1.1 403 Forbidden\");\n\t\tdie(\"You can only update your own resources!\");\n\t}\n\n\t$data = json_decode(file_get_contents(\"php://input\"));\n\n\t$owner = isset($data->owner) ? $data->owner : null;\n\t$info = isset($data->info) ? $data->info : null;\n\t$image_data = isset($data->image) ? $data->image : null;\n\n\t// All fields must be supplied\n\tif(is_null($owner) || is_null($info) || is_null($image_data))\n\t{\n\t\theader('HTTP/1.1 422 Unprocessable Entity');\n\t\tdie(\"owner, info and image fields must be supplied\");\n\t}\n\n\tupdate_pic_resource($resource, $owner, $info, $image_data);\n}", "title": "" }, { "docid": "996f4a8678aca25bf47aeb5352fb1d2d", "score": "0.5841891", "text": "public function update(Request $request, $resource)\n { \n $resource = RequiredDocument::find($resource);\n try {\n $resource->update($request->all()); \n } catch (\\Exception $th) {\n return responseJson(0, $th->getMessage());\n }\n return responseJson(1, __('done'));\n }", "title": "" }, { "docid": "96e56ee021bd9ebb23ab79ce64045619", "score": "0.57721734", "text": "public function update(Request $request, $id)\n {\n // return $request;\n /**\n * melakukan validasi\n */\n $this->validate($request, [\n 'title',\n 'type',\n 'creator',\n 'format',\n 'file' => '',\n 'image' => ''\n ]);\n\n DB::beginTransaction();\n try {\n $resource = Resource::find($id);\n // simpan tanpa gambar dan file\n $resource->update([\n 'title' => $request->title,\n 'subject_id' => $request->subject_id,\n 'description' => $request->description,\n 'creator' => $request->creator,\n 'source' => $request->source,\n 'publisher' => $request->publisher,\n 'date' => Carbon::now(),\n 'contributor_id' => Auth::user()->id,\n 'rights' => $request->rights,\n 'format' => $request->format,\n 'language' => $request->language,\n 'type_id' => $request->type_id,\n 'collection_id' => $request->collection_id,\n 'citation' => null\n ]);\n $resource->save();\n\n // olah gambar dan file\n $file = $request->file('file');\n if($file != NULL){\n $fileExt = $file->getClientOriginalExtension();\n $fileName = 'resource_' . $id . '.' . $fileExt;\n $tujuan_file = $this->path_resource_file;\n $file->move($tujuan_file,$fileName);\n \n $image = $request->file('image');\n $imageExt = $image->getClientOriginalExtension();\n $imageName = 'image_' . $id . '.' . $imageExt;\n $tujuan_image = $this->path_resource_image;\n $image->move($tujuan_image,$imageName);\n \n $resource->update([\n 'file' => $fileName,\n 'image' => $imageName\n ]);\n $resource->save();\n }\n DB::commit();\n return redirect()->route('admin.oer.resource.index')->with('status','Resource berhasil diupdate');\n } catch (\\Throwable $th) {\n DB::rollBack();\n return redirect()->route('admin.oer.resource.index')->with('status','Resource gagal diupdate');\n }\n }", "title": "" }, { "docid": "3b6c3aaa23b4fb918ebc093545c13dc6", "score": "0.57525045", "text": "public function update($entity);", "title": "" }, { "docid": "7fa7323735ca22c15cfa4866e023dcb7", "score": "0.57337505", "text": "public function setResource($resource);", "title": "" }, { "docid": "79170e0c428aa8840550d2f009bc0bd5", "score": "0.57258964", "text": "public function edit($id)\n\t{\n\t\t// the specified resource from storage.\n\t \n\t}", "title": "" }, { "docid": "68611877d8742448025a8506ebac8d13", "score": "0.5723295", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "title": "" }, { "docid": "eaa9290a68686ebc6d5bfe4b4d4da3ed", "score": "0.57221985", "text": "public function update(ResourceUpdateRequest $request, int $id)\n {\n if (auth()->user()->user_type_id == 0){\n return redirect('/admin/resources')->with(['error' => 'Unauthorized!']);\n }\n $subjects = $this->Subject->GetAllAndOrder('name', 'asc')->pluck('name', 'id');\n $courses = $this->Course->GetAllAndOrder('name', 'asc')->pluck('name', 'id');\n\n // Validated Request\n $data = $request->validated();\n\n //Handle File Upload\n if ($request->hasFile('pdf_path')) {\n $ext = $request->file('pdf_path')->getClientOriginalExtension();\n $pdf_path = 'CI_' . time() . '.' . $ext;\n $PDFPath = $request->file('pdf_path')->storeAs('public/cover_images', $pdf_path);\n }\n\n // if ($request->hasFile('video_path')) {\n // $ext = $request->file('video_path')->getClientOriginalExtension();\n // $video_path = 'CI_' . time() . '.' . $ext;\n // $VideoPath = $request->file('video_path')->storeAs('public/cover_images', $video_path);\n // }\n\n if ($request->hasFile('audio_path')) {\n $ext = $request->file('audio_path')->getClientOriginalExtension();\n $audio_path = 'CI_' . time() . '.' . $ext;\n $AudioPath = $request->file('audio_path')->storeAs('public/cover_images', $audio_path);\n }\n\n $entity = $this->Resource->UpdateResource(\n $data['name'],\n $data['description'],\n $data['subject_id'],\n $pdf_path,\n $audio_path,\n $data['video_path'],\n $id\n );\n\n if ($entity == null) {\n return redirect()->back()->withInput()->with(['error' => 'Error encountered while updating user, Please try again!', 'subjects'=>$subjects, 'courses'=>$courses]);\n }\n\n return redirect(\"/admin/resources\")->with(['success' => $entity->name.' Resource Updated!']);\n }", "title": "" }, { "docid": "069b4ac7f6c57fe9a04373680c642655", "score": "0.5707731", "text": "public function update(Request $request, $id)\n {\n $this->validate($request,[\n 'social_name'=>'required',\n 'link'=>'required'\n ]);\n $path=$request->old_image;\n if($request->hasFile('icon')){\n if($path!=null){\n unlink('storage/',$path);\n }\n $path=$request->file('icon')->store('Icon');\n }\n $social=Social::where('id',$id)->first();\n $social->name=$request->social_name;\n $social->icon=$path;\n $social->link=$request->link;\n $social->save();\n return redirect()->route('listSocial');\n }", "title": "" }, { "docid": "f47b9d570ea05e0c010d421e6ee2956d", "score": "0.570513", "text": "public function update(Request $request, $id)\n {\n \n $product= Product::find($id);\n\n $product->fill($request->all())->save();\n\n if($request->file('file')){\n\n $photo =Storage::disk('public')->put('files', $request->file('file'));\n $product->fill(['file'=>asset($photo)])->save();\n //$product->fill($request->all())->save();\n\n }\n return redirect()->route('products.index')->with('info','Actualizacion exitosa.');\n }", "title": "" }, { "docid": "e298ed6e92031fa9134c5a6ed2507d24", "score": "0.5691853", "text": "public function update($object);", "title": "" }, { "docid": "e298ed6e92031fa9134c5a6ed2507d24", "score": "0.5691853", "text": "public function update($object);", "title": "" }, { "docid": "e298ed6e92031fa9134c5a6ed2507d24", "score": "0.5691853", "text": "public function update($object);", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.5675671", "text": "public function update($data);", "title": "" }, { "docid": "aa791f30f13ec2f303130ddbd0ce5da7", "score": "0.56709456", "text": "public function update ($object);", "title": "" }, { "docid": "d1cbfd525b1daec79739ff0e6ccf1268", "score": "0.56673855", "text": "public function testUpdateById()\n {\n $server = $this->server->getByAssetId('78453');\n $rams = $this->ram->getByServerId($server->getId(), 1, 100, true);\n $this->assertTrue($this->ram->updateById($rams[0]['id'], ['size' => '6']));\n }", "title": "" }, { "docid": "1473bff93d350e39f21ce4988672250e", "score": "0.56635326", "text": "public function setResource(?Resource $resource)\n {\n if($this->exists) {\n $this->rewriteResource = true;\n }\n\n $this->resource = $resource;\n }", "title": "" }, { "docid": "0b3db3a626ff99124139d26b53736d7f", "score": "0.56604844", "text": "public function setResource(?string $resource): void;", "title": "" }, { "docid": "069d6ef83ac999fe8c81dd1c3b87e822", "score": "0.565091", "text": "function update_pic_resource($resource, $owner, $info, $image_data)\n{\n\t$pics_table = TABLE_PICS;\n\n\t// Check whether resource exists\n\t$db = connect_database();\n\t$res = $db->prepare(\"SELECT * FROM $pics_table WHERE id=?\");\n\t$input = array($resource);\n\t$res->execute($input);\n\n\tif(!($res))\n\t{\n\t\theader('HTTP/1.1 500 Internal Server Error');\n\t\tdie(\"Database error\");\n\t}\n\n\n\t// Resource does not exist?\n\tif($res->rowCount() != 1)\n\t{\n\t\theader('HTTP/1.1 404 Not Found');\n\t\tdie();\n\t}\n\n\t// Update owner\n\tif(!is_null($owner))\n\t{\n\t\t$res = $db->prepare(\"UPDATE $pics_table SET owner=? WHERE id=?\");\n\t\t$input = array($owner, $resource);\n\t\t$res->execute($input);\n\n\t\tif(!($res))\n\t\t{\n\t\t\theader('HTTP/1.1 500 Internal Server Error');\n\t\t\tdie(\"Database error\");\n\t\t}\n\t}\n\n\t// Update image info\n\tif(!is_null($info))\n\t{\n\t\t$res = $db->prepare(\"UPDATE $pics_table SET info=? WHERE id=?\");\n\t\t$input = array($info, $resource);\n\t\t$res->execute($input);\n\n\t\tif(!($res))\n\t\t{\n\t\t\theader('HTTP/1.1 500 Internal Server Error');\n\t\t\tdie(\"Database error\");\n\t\t}\n\t}\n\n\t// Update actual image\n\tif(!is_null($image_data))\n\t{\n\t\t// Get filename from database\n\t\t$res = $db->prepare(\"SELECT filename FROM $pics_table WHERE id=?\");\n\t\t$input = array($resource);\n\t\t$res->execute($input);\n\t\t$row = $res->fetch(PDO::FETCH_ASSOC);\n\t\t$filename = $row['filename'];\n\n\t\t// Save data to file\n\t\t$res = file_put_contents(BASE_IMAGE_DIR.$filename, base64_decode($image_data));\n\t\t// FIXME: Check result\n\t}\n}", "title": "" }, { "docid": "8eaf334df7b5605dd932f3d2e8a41f85", "score": "0.5650028", "text": "public function update(Request $request, $id)\n {\n $item = Item::find($id);\n if ($request->file('file')) {\n $path = $request->file('file')->store('app/public/img');\n $item->path = $path = 'storage'.substr($path, 10);\n }\n $item->name = $request->input('name');\n\n $item->sizes()->detach();\n if($request->input('sizes')) {\n foreach ($request->input('sizes') as $size) {\n $item->sizes()->attach($size);\n }\n }\n $item->save();\n return redirect()->route('index');\n }", "title": "" }, { "docid": "5291290bcd969edf6f73d602449094f5", "score": "0.5647362", "text": "public function update(StoreRequest $request, $id)\n {\n if ($request->file('image')){\n $path = $request->file('image')->store('images','public');\n $request->validated();\n $data = [\n 'image' => $path,\n 'title' => $request->title,\n 'text' => $request->text,\n ];\n Slider::whereId($id)->update($data);\n return redirect()->route('admin.sliders.index')->with('succsess', 'Данные были обновленны успешно');\n }\n else {\n $request->validated();\n $data = [\n 'image' => $request->hiddenImage,\n 'title' => $request->title,\n 'text' => $request->text,\n ];\n Slider::whereId($id)->update($data);\n return redirect()->route('admin.sliders.index')->with('succsess', 'Данные были обновлены успешно');\n }\n }", "title": "" }, { "docid": "c0f5addccae14c8f29d848399d71595d", "score": "0.5644971", "text": "public function update(Request $request, $id)\n {\n //\n \n $user = User::find($id);\n if($request->has('name'))\n {\n $user->name=$request->get('name');\n }\n\n // TODO: Handle 404 error\n if($request->hasFile('avatar'))\n {\n $featuredImage = $request->file('avatar');\n $filename = time().$featuredImage->getClientOriginalName();\n // Storage::disk('images')->putFileAs($filename, $featuredImage,$filename);\n \n //Storage::putFile('public/images', $featuredImage,'public');\n\n $path= Storage::put('public/images/', $featuredImage, 'public');\n\n // Storage::putFile('photos', new File('/path/to/photo'), 'public');\n\n }\n\n $user->avatar = url($path);\n\n $user->save();\n\n return new UserResource($user);\n }", "title": "" }, { "docid": "3225745ceb37b1c7e09aa4ce56382df1", "score": "0.563803", "text": "public function update(Request $request, $id)\n {\n\n // AIzaSyBT7FGQguFSd8ajZiuAt1zk4LCaM9LAbWo\n try\n {\n $this->validate($request, [\n 'address' => 'required',\n 'latitude' => 'required',\n 'longitude' => 'required',\n ]);\n\n $storage = Storage::findOrFail($id);\n\n $storage->address = $request->input('address');\n $storage->latitude = $request->input('latitude');\n $storage->longitude = $request->input('longitude');\n\n $storage->save();\n\n return redirect()->route('storages.index')->with('success', \"The storage <strong>$storage->address</strong> has successfully been updated.\");\n }\n catch (ModelNotFoundException $ex) \n {\n if ($ex instanceof ModelNotFoundException)\n {\n return response()->view('errors.'.'404');\n }\n }\n }", "title": "" }, { "docid": "c8f367908b757c81a8edc82408118665", "score": "0.5618928", "text": "public function update(StoreProductRequest $request, $id)\n {\n $product = Product::findOrFail($id);\n\n $path = $product->photo;\n $file = '/public/'.$path;\n\n if ($request->file('photo')) {\n $path = $request->file('photo')->store('photos', 'public');\n }\n\n $product->update([\n 'name' => $request->name,\n 'description' => $request->description,\n 'price' => $request->price,\n 'category_id' => $request->category_id,\n 'photo' => $path\n ]);\n\n if (Storage::exists($file) AND $path != self::DEFAULT_IMAGE_STORAGE_URL) {\n Storage::delete($file);\n }\n\n return redirect()->route('admin.products.index')->with('success', 'Product has been updated successfully!');\n }", "title": "" }, { "docid": "7a0daf096da3d4426382a1e223faf321", "score": "0.5611065", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->stream($path, $resource, $config, 'update');\n }", "title": "" }, { "docid": "859149ae859a2b4652938544f4f690ac", "score": "0.55987424", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required|max:255',\n 'price' => 'required|numeric|min:0',\n 'url' => 'nullable|max:255',\n 'manufacturer' => 'exists:manufacturers,id'\n ]);\n \n //$image_store = request()->file('image')->store('/Users/kieranmurphy/Documents/Uni/webAppDev/assignment2/prod/public/products_images');\n $image_store = request()->file('image')->store('', 'public');\n $product = Product::find($id);\n $product->name = $request->name;\n $product->price = $request->price;\n $product->url = $request->url;\n $product->image = $image_store;\n $product->manufacturer_id = $request->manufacturer;\n $product->save();\n return redirect(url(\"product/$product->id\"));\n }", "title": "" }, { "docid": "cf289fdccd02b9207ca528e586bf8602", "score": "0.55945903", "text": "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n\n $product->product_name = $request->input('product_name');\n $product->product_desc = $request->input('product_desc');\n $product->product_condition = $request->input('product_condition');\n $product->product_price = $request->input('product_price');\n $product->brand_id = $request->input('brand_id');\n $product->state_id = $request->input('state_id');\n $product->area_id = $request->input('area_id');\n $product->subcategory_id = $request->input('subcategory_id');\n $product->user_id = auth()->id();\n\n if ($request->hasFile('product_image')) {\n # code...\n $path = $request->product_image->store('public/uploads');\n $product->product_image = $request->product_image->hashName();\n }\n\n $product->save();\n\n // flash('Product successfully updated')->overlay();\n alert()->success('Successfully updated.', 'Good Work!')->autoclose(3000);\n\n return redirect() ->route('products.index');\n }", "title": "" }, { "docid": "08bd864d1d979d05f0f5badd1d9c880d", "score": "0.5584394", "text": "public function update(Request $request,$id)\n {\n\n\n\n\n if ($request->hasFile('file')){\n $todo = Todo::find($id);\n $nam = class_basename($todo->photo);\n Storage::delete('images/'.$nam);\n $path = $request->file('file')->store('images');\n\n\n }else {\n $todo = Todo::find($id);\n $path = $todo->photo;\n }\n $item = Todo::find($id);\n $item->photo = $path;\n $item->text = $request->text;\n $item->update();\n return redirect()->route('slide.index')\n ->with('success','Slider updated successfully');\n }", "title": "" }, { "docid": "5fed529c5b080f27dd2e01ca8fc4ac47", "score": "0.557354", "text": "public function update(Request $request, $id)\n {\n $product = Products::findOrFail($id);\n $product->fill($request->all());\n if (!$request->hasFile('inputFile')) {\n\n } else {\n $imageName = time().'.'.$request->inputFile->extension();\n $request->inputFile->move(public_path('uploads'), $imageName);\n $product->image = 'uploads/'.$imageName;\n }\n $product->save();\n return redirect()->route('product.index');\n }", "title": "" }, { "docid": "5d4b1ffc9d0784b5904148d809883df2", "score": "0.55700654", "text": "public function update(Request $request,$id): \\Illuminate\\Http\\RedirectResponse\n {\n $product = Product::find($id);\n $product->name =$request->name;\n $product->price =$request->price;\n $path = $request->file('image')->store('/image', 'public');\n $product->image = $path;\n $product->save();\n if ($request->hasFile('image')) {\n $file = $request->file('image');\n $file->storeAs('public/image', 'anh_' . $product->id);\n }\n return redirect()->route('product.index');\n }", "title": "" }, { "docid": "af33e60c955c4d563496960443215622", "score": "0.55682975", "text": "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n $product -> ProductName = $request->name;\n $product -> ProductPrice = $request->price;\n $product -> ProductCount = $request->count;\n $product -> ProductName = $request->name;\n $product -> Size = $request->size;\n $product -> Type = $request->type;\n $product -> Brand = $request->brand;\n $product -> Sale = $request->sale;\n $product -> Note = $request->note;\n\n if($request['ImageUpload']){\n\n $ProductImage = $request['ImageUpload'];\n $ext = $ProductImage->getClientOriginalExtension();\n $name = time().'_'.$ProductImage->getClientOriginalName();\n Storage::disk('public')->put($name,File::get($ProductImage));\n $product->ProductImage = $name;\n \n }\n\n $product->save();\n \n return redirect()->back();\n }", "title": "" }, { "docid": "8906f32f155d40c8f8a49be55b1f4a18", "score": "0.55671555", "text": "public function update(Request $request, $id)\n {\n $request_data = $request->all();\n $item = Products::find($id);\n\n // 判斷是否有更新圖片\n if($request->hasFile('img')){\n // 刪除原有圖片\n Storage::disk('public')->delete($item->img);\n // 上傳新的圖片\n $file_name = $request->file('img')->store('','public');\n $request_data['img'] = $file_name;\n }\n // 更新資料\n $item->update($request_data);\n return redirect('/home/product');\n }", "title": "" }, { "docid": "f77c93b62808595a63d9f6f31b1f80e0", "score": "0.55661047", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "2727357bb406596eb8dfe8891f67ccfc", "score": "0.55604166", "text": "public function update(Request $request, EventResource $eventResource): JsonResponse\n {\n if ($request->has('type')) {\n $eventResource->type = $request->type;\n }\n\n if ($request->hasFile('url')) {\n Storage::disk('event')->delete($eventResource->url);\n $eventResource->url = $request->url->store('/', 'event');\n }\n\n if (!$eventResource->isDirty()) {\n return $this->errorResponse(\n 'Se debe especificar al menos un valor diferente para actualizar',\n );\n }\n $eventResource->saveOrFail();\n return $this->api_success([\n 'data' => new EventResourceResource($eventResource),\n 'message' => __('pages.responses.updated'),\n 'code' => 200\n ]);\n }", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "2cfa3f035d49122191c6037f7c1b1ce1", "score": "0.55438745", "text": "public function update(Request $request, $id)\n {\n\n\n $data = $request->all();\n $data['Photo'] = $request->file('Photo')->store(\n 'assets/wisata', 'public'\n );\n\n $item = Gallery::findOrFail($id);\n\n $item->update($data);\n\n return redirect()->route('gallery.index');\n }", "title": "" }, { "docid": "b6ff7a39be0c5754d44a62a820354b5a", "score": "0.55404127", "text": "public function update(Request $request, $id)\n {\n $product = ProductService::update($id,$request);\n return new ProductResource($product);\n }", "title": "" }, { "docid": "abb88a7c05d8fee17d4ac3a6820978dd", "score": "0.5531798", "text": "public function setResource(Resource $resource);", "title": "" }, { "docid": "0cd1468122b5df0652960de9beec7153", "score": "0.5530294", "text": "protected function _update() {\n $name = $this->name;\n $identifier = $this->getIdentifier($name);\n $this->identifier = $identifier;\n }", "title": "" }, { "docid": "e4e5746029a652a8af6357dfd0ecfb0a", "score": "0.55277145", "text": "public function updateRecord($record, ResourceObjectInterface $resource, EncodingParametersInterface $params);", "title": "" }, { "docid": "7475c4693bb0f704a1fb08bd9326903b", "score": "0.55227137", "text": "public function onUpdate(ResourceEvent $e)\n {\n return $this->onPatch($e);\n }", "title": "" }, { "docid": "659edc6c8bc72bf94adc8569c8ce32c9", "score": "0.55171585", "text": "public function put($id, $data);", "title": "" }, { "docid": "a1a5da45e646cd439edfe58999c79c91", "score": "0.5516766", "text": "public function update(Request $request, Product $product)\n {\n \n \n $product->name = $request->name;\n $product->description = $request->description;\n $product->cost = $request->cost;\n $product->acquired_at = $request->dateAcq;\n $product->condition = $request->condition;\n $product->serial_no = $request->serial_no;\n $product->category_id = $request->category;\n $product->quantity = $request->quantity;\n $product->acquired_at = $request->acquired_at;\n $product->manufacturer_id = $request->manufacturer;\n $product->supplier_id = $request->supplier;\n \n if($request->file(\"image\") != null){\n $image = $request->file(\"image\");\n $image_name = time().\".\".$image->getClientOriginalExtension();\n $destination = \"images/\";\n $image->move($destination, $image_name);\n $product->img_path = $destination.$image_name;\n }\n\n $product->save();\n //hint 3: where to go back after editing the product\n return redirect(\"/products/\".$product->id);\n\n }", "title": "" }, { "docid": "f009b4c5e467cb86d91dd277d8f582d8", "score": "0.5515574", "text": "public function update(Request $request, $id)\n {\n $image = $request->newphoto;\n if ($image) {\n $img = Supplier::findOrFail($id);\n $old_imgPath = $img->photo;\n unlink($old_imgPath);\n\n $position = strpos($request->newphoto,';');\n $sub = substr($request->newphoto, 0 ,$position);\n $ext = explode('/', $sub)[1];\n $img_name = time().'.'.$ext;\n Image::make($request->newphoto)->resize(240,240)->save('backend/supplier/'.$img_name);\n $img_url = 'backend/supplier/'.$img_name;\n Supplier::findOrFail($id)->update([\n 'name' => $request->name,\n 'email' => $request->email,\n 'phone' => $request->phone,\n 'address' => $request->address,\n 'shopname' => $request->shopname,\n 'photo' => $img_url,\n 'created_at' => Carbon::now(),\n ]);\n \n }else{\n $old_img = $request->photo;\n Supplier::findOrFail($id)->update([\n 'name' => $request->name,\n 'email' => $request->email,\n 'phone' => $request->phone,\n 'address' => $request->address,\n 'shopname' => $request->shopname,\n 'photo' => $old_img,\n 'created_at' => Carbon::now(),\n \n ]);\n }\n }", "title": "" }, { "docid": "53ffba08b9cf71fb87cb5e0af2376524", "score": "0.551535", "text": "public function update(Request $request, $id)\n {\n $rules = array(\n 'name' => 'required',\n 'category' => 'required',\n 'photo' => 'image|mimes:jpeg,png,jpg,gif,svg|max:1024',\n );\n $validator = Validator::make($request->all(), $rules);\n\n // process the login\n if ($validator->fails()) {\n\n return Redirect::back()->withErrors($validator);\n\n\n } else {\n\n $product = Product::find($id);\n $file = $request->file('photo');\n if ($file){\n\n $path = $file->hashName();\n $image = Image::make($file);\n Storage::put($path, (string)$image->encode());\n $image->resize(100, 100, function ($constraint) {\n $constraint->aspectRatio();\n });\n Storage::put('thumb_' . $path, (string)$image->encode());\n $product->photos = $path;\n $product->save();\n }\n DB::beginTransaction();\n\n try {\n\n\n $product->attributesValues()->sync($request->get('attributes'));\n $product->name = $request->name;\n $product->category_id = $request->category;\n $product->save();\n\n DB::commit();\n } catch (\\Throwable $err) {\n DB::rollBack();\n return Redirect::back()->withErrors($err->getMessage());\n }\n\n\n return Redirect::to('product')->with('status', 'product successfully changed');\n }\n }", "title": "" }, { "docid": "59a46299e3ae479658e854c41ed9b55c", "score": "0.551217", "text": "public function update(Request $request, $client, $resource)\n\t{\n\t\t$resource = Resource::findBySlug($client, $resource);\n\n\t\tif (!$resource) {\n\t\t\treturn response(view('resources.404'), 404);\n\t\t}\n\n\t\t$resource->load('client');\n\t\t$client = $resource->client;\n\n\t\t$this->authorize('manage', $resource);\n\n\t\t$this->validate($request, [\n\t\t\t'name' => ['required', 'max:255'],\n\t\t\t'slug' => [\n\t\t\t\t'required',\n\t\t\t\t'max:255',\n\t\t\t\t'alpha_dash',\n\t\t\t\t'unique:resources,slug,'.$request->input('slug', $resource->slug).',slug,client_id,'.$resource->client->id,\n\t\t\t\t'not_in:create,destroy,edit,prune'\n\t\t\t],\n\n\t\t\t'metadata.*' => ['array'],\n\t\t\t'metadata.keys.*' => ['distinct', 'required_with:metadata.values.*'],\n\n\t\t\t'attachments' => ['array'],\n\t\t\t'uploads' => ['array'],\n\n\t\t\t'type' => ['required'],\n\n\t\t\t'client' => ['required', 'exists:clients,id'],\n\n\t\t\t'tags' => ['array'],\n\t\t\t'tags.*' => ['exists:tags,id'],\n\t\t]);\n\n\t\tif (($newClient = $request->input('client', $resource->client->id)) != $resource->client->id) {\n\t\t\t$client = Client::find($newClient);\n\t\t\t$resource->client()->associate($client);\n\t\t}\n\n\t\t$resource->name = $request->input('name');\n\t\t$resource->slug = $request->input('slug');\n\t\t$resource->description = $request->input('description');\n\n\t\t$metadata = static::parseMetadataFromForm($request->input('metadata', []));\n\t\t$resource->metadata = Crypt::encrypt($metadata);\n\n\t\t$attachments = $request->input('attachments', []);\n\n\t\tif ($request->hasFile('uploads')) {\n\t\t\t$uploads = $request->file('uploads');\n\t\t\t$attachments = array_merge($attachments, $uploads);\n\t\t}\n\n\t\t$resource->attachments = $attachments;\n\n\t\t// set type\n\t\tif (!($type = ResourceType::findBySlug($request->input('type')))) {\n\t\t\t$type = ResourceType::create([\n\t\t\t\t'name' => $request->input('type'),\n\t\t\t\t'slug' => str_slug($request->input('type')),\n\t\t\t]);\n\t\t}\n\n\t\t$resource->type()->associate($type);\n\n\t\t$resource->save();\n\n\t\t$resource->tags()->sync($request->input('tags', []));\n\n\t\treturn redirect()->route('clients.resources.show', ['client' => $resource->client->url, 'resource' => $resource->url])\n\t\t\t->with('alert-success', 'Resource updated!');\n\t}", "title": "" }, { "docid": "265c7e4e1d9ccb8f2d919846c5c6d0e1", "score": "0.55072427", "text": "public function update($id, $input);", "title": "" }, { "docid": "265c7e4e1d9ccb8f2d919846c5c6d0e1", "score": "0.55072427", "text": "public function update($id, $input);", "title": "" }, { "docid": "4f9a7eefe9ee310c77dd90bb772d0268", "score": "0.550326", "text": "protected function save($resource = array()) {\n if (isset($resource['public_id']) && !empty($resource['mode'])) {\n $data = array(\n 'public_id' => $resource['public_id'],\n 'mode' => $resource['mode'],\n 'metadata' => serialize($resource),\n );\n\n db_merge('cloudinary_storage')\n ->key(array('public_id' => $data['public_id']))\n ->fields($data)\n ->execute();\n }\n }", "title": "" }, { "docid": "de666400bd564055ceae68366a410cf6", "score": "0.5495869", "text": "function updateProduct(ProductInterface $product, $andPersist = true);", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54949397", "text": "public function update($id);", "title": "" }, { "docid": "2e6523045766c061920aeea9222af1fe", "score": "0.54858494", "text": "public function edit(Storage $storage)\n {\n //\n }", "title": "" }, { "docid": "2e6523045766c061920aeea9222af1fe", "score": "0.54858494", "text": "public function edit(Storage $storage)\n {\n //\n }", "title": "" }, { "docid": "2e6523045766c061920aeea9222af1fe", "score": "0.54858494", "text": "public function edit(Storage $storage)\n {\n //\n }", "title": "" }, { "docid": "915de74b592076343102ef830bad4760", "score": "0.5483238", "text": "public function update(Request $request, $id)\n {\n\n $product = Product::find($id);\n\n if($request->image !=null)\n {\n $path= $request->images->store('products');\n $product->image =$path;\n }\n $product->name = $request->name;\n $product->title = $request->title;\n $product->subtitle = $request->subtitle;\n $product->price = $request->price;\n $product->description = $request->description;\n\n $product->save();\n return redirect('/admin/products');\n }", "title": "" }, { "docid": "cd9002163bfb014aae433fe03ba6f3c6", "score": "0.5481594", "text": "public function update(Request $request, Product $product)\n {\n try{\n// $product = Product::findOrFail($id);\n $data = $request->all();\n if ($request->hasFile('image')) {\n $this->unlink($product->image);\n $data['image'] = $this->uploadImage($request->image, $request->title);\n }\n $product->update($data);\n $sizes = $request->size;\n $colors = $request->color;\n $tags = $request->tag;\n $product->sizes()->sync($sizes);\n $product->colors()->sync($colors);\n $product->tags()->sync($tags);\n\n return redirect()->route('products.index')->withStatus('Updated Successfully !');\n }catch (QueryException $e){\n return redirect()->back()->withInput()->withErrors($e->getMessage());\n }\n }", "title": "" }, { "docid": "4cfc56539ed021bab827429f46aed628", "score": "0.5481018", "text": "protected function updateResources()\n {\n // Get user model\n $user = $this->buildingQueue->city->nation->user;\n $update = new UpdateResources();\n $update->handle($user);\n }", "title": "" }, { "docid": "345df4adf8928070e91a2554a8379eef", "score": "0.54775786", "text": "public function update(Request $request, $id)\n {\n // dd($request->title);\n $image = $request->image;\n if ($image) {\n //一意のファイル名を自動生成しつつ保存し、かつファイルパス($productImagePath)を生成\n //ここでstore()メソッドを使っているが、これは画像データをstorageに保存している\n $image_path = $image->store('public/uploads'); //storage/app/public/uploadsに保存される\n } else {\n $image_path = \"\";\n }\n \n $update = [\n 'title' => $request->title,\n 'contents' => $request->contents,\n 'image' => $image_path\n ];\n Book::find($id)->update($update);\n return redirect('/');\n }", "title": "" }, { "docid": "c9b0a501066581b7e74c2cd60e16e729", "score": "0.5477371", "text": "public function update($id, Request $request)\n {\n $data = $request->validate([\n 'name' => 'required',\n 'description' => 'required',\n 'barcode' => 'required | digits_between:1,10',\n 'quantity' => 'required | numeric',\n 'cost_price' => 'required | between:0,99.99',\n 'sell_price' => 'required | between:0,99.99',\n 'image' => 'image',\n ]);\n\n\n if ( $request->hasFile('image') )\n {\n $imagePath = $request->file('image')->store('products', 'public');\n $image = Image::make(public_path(\"storage/{$imagePath}\"))->fit(1000, 1000);\n $image->save();\n\n $imageArray = ['image' => $imagePath];\n }\n $data = array_merge($data , $imageArray ?? []);\n\n $product = Product::findOrFail($id);\n\n $product->update($data);\n// dd($product);\n\n return redirect()->route('product.show', ['id' => $product->id]);\n }", "title": "" }, { "docid": "3131a9734c737496b73d9b7f02ce130a", "score": "0.5475807", "text": "public function update(Request $request, ReferenceStorage $referenceStorage)\n {\n //\n }", "title": "" }, { "docid": "a6807e80417b5a587e2afd3bf245f13e", "score": "0.54740566", "text": "public function update(Request $request, $id)\n {\n $v = Volumes::find($id);\n $path = $request->file('capa')->store('capas');\n $v->imagem = $path;\n $v->update($request->all());\n return redirect()->action('VolumeController@index', ['id' => $v->id_colecao]);\n }", "title": "" }, { "docid": "c0e7f9346f3ee0689ec8d7ff708a7de2", "score": "0.5470321", "text": "public function update(Request $request, $id)\n {\n $fullPathName=\"\";\n if($request->has('img')){ \n $fullPathName = $request->file('img')->getClientOriginalName();\n $imagename = $request->file('img');\n $path = public_path(('front/images/sliders/').$imagename->getClientOriginalName());\n $image = Image::make($request->file('img'))->resize(300, 200)->save($path);\n }\n Slider::find($id)->update(\n [\n 'img'=>$fullPathName\n ]);\n \n return redirect()->route('sliders.index')->with('message', 'Data Updated');\n }", "title": "" }, { "docid": "480b6359dcc805593929864642755b60", "score": "0.5468656", "text": "public function update($id)\n\t{\n\t\t$rules = array(\n\t\t\t'name' \t=> \t'required',\n\t\t\t'route' =>\t'required'\n\t\t\t);\n\t\t$validator = Validator::make(Input::all(), $rules);\n\n\t\tif ($validator -> fails()) {\n\t\t\treturn Redirect::to('resource/'. $id. '/edit')\n\t\t\t\t->withErrors($validator)\n\t\t\t\t->withInput(Input::all());\n\t\t}\n\t\telse{\n\t\t\t$resource = Resource::find($id);\n\t\t\t$resource->name \t= \tInput::get('name');\n\t\t\t$resource->route \t= \tInput::get('route');\n\t\t\t$resource->save();\n\n\t\t\tSession::flash('message', 'Successfully edited');\n\t\t\treturn Redirect::to('resource');\n\t\t}\n\t}", "title": "" }, { "docid": "ad38428475befeaa7bd22cc27d29dd43", "score": "0.5467444", "text": "public function update(Request $request, $id)\n {\n\n $requestData = $request->all();\n\n $resource = Resource::findOrFail($id);\n $resource->update($requestData);\n\n return redirect('resources')->with('flash_message', ' updated!');\n }", "title": "" }, { "docid": "18835ea7fdc7fdae900ff435256e6132", "score": "0.5461308", "text": "public function update(StoreUpdateProductRequest $request, $id)\n {\n if(!$product = Product::find($id))\n return redirect()->back();\n\n $data = $request->all();\n\n if($request->hasFile('image') && $request->image->isValid()) {\n\n if($product->image && Storage::exists($product->image)) {\n Storage::delete($product->image);\n //dd(Storage::exists($product->image));\n }\n\n $imagePath = $request->image->store('products');\n\n $data['image'] = $imagePath;\n }\n\n $product->update($data); //$request->all() -> pega todos os dados do formulário.\n\n return redirect()->route('teste.index');\n }", "title": "" }, { "docid": "888eacb2684deea060d74401ec576361", "score": "0.5459631", "text": "public function update($id, Request $request)\n {\n try {\n \n $data = $this->getData($request);\n \n $asset = Asset::findOrFail($id);\n $asset->update($data);\n\n return redirect()->route('assets.asset.index')\n ->with('success_message', 'Asset was successfully updated.');\n } catch (Exception $exception) {\n\n return back()->withInput()\n ->withErrors(['unexpected_error' => 'Unexpected error occurred while trying to process your request.']);\n } \n }", "title": "" }, { "docid": "c2ba1266c1f288e006d63595b8c95475", "score": "0.54551506", "text": "public function updateProductImage(Request $request,$id){\n \n // making sure that an image is uploaded, validating the incoming request\n Validator::make($request->all(),['image' => \"required|file|image|mimes:jpg,png,jpeg|max:5000000\"])->validate();\n\n //Checking if the file exists in the public storage folder\n if($request->hasFile('image')){\n $product = Product::find($id);\n $exists = Storage::disk('local')->exists(\"public/products_images/\".$product->image);\n\n //deleting the old image\n if($exists){\n Storage::delete('public/product_images/'.$product->image);\n }\n\n //uploading a new image\n $ext = $request->file('image')->getClientOriginalExtension(); //getting the image extensions\n\n $request->image->storeAs(\"public/product_images/\",$product->image); //storing the new image in the product_image folder\n\n $arrayToUpdate = array(\"image\" => $product->image);\n DB::table('products')->where('id',$id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayProducts\"); \n\n }else {\n \n $error = \"No image was selected\";\n return $error;\n \n }\n\n }", "title": "" }, { "docid": "36282285831dc6d68f5e70b518199798", "score": "0.54545444", "text": "public function indexResource(Resource $resource)\n {\n $this->addResource($resource);\n $this->commit();\n }", "title": "" }, { "docid": "a0e8039ee0fc1bca4aff88fac58bcb5d", "score": "0.5451169", "text": "public function update(Request $request, Product $product)\n {\n Storage::disk('public')->delete($product->image->path);\n $product->name = $request->name;\n $product->value = $request->value;\n $product->save();\n Image::where('id', $product->image->id)->update(['path' => $request->file('image')->store('product')]);\n return redirect()->route('products.index');\n }", "title": "" }, { "docid": "1cf069cc7d44d8c46dceb5aa2f934b84", "score": "0.5448955", "text": "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 }", "title": "" }, { "docid": "d7171e526ed9dfefe282174959b684f8", "score": "0.5434525", "text": "public function replace($id, $uploaded_file, $disk ='public'){\n $file = \\App\\File::findOrFail($id);\n //Replace on disk\n \\Illuminate\\Support\\Facades\\Storage::disk($disk)->delete($file->filename);\n\n $pathinfo = pathinfo($file->filename);\n $filename = $this->putAs(\n $uploaded_file ,\n $pathinfo['dirname'], \n $pathinfo['filename'], \n $disk,\n false);\n\n //Update on DB\n $this->updateOndb($file,$uploaded_file, $filename);\n }", "title": "" }, { "docid": "4d4572c7b46a11dd63d3345d70b2c678", "score": "0.54325026", "text": "public function update($id)\n {\n $rules = [\n 'name' => 'required|string|max:100'\n ,'description' => 'required|string'\n ,'price' => 'required|numeric|min:0|max:9999999.99'\n ,'image' => 'image|max:1024'\n ,'stock_number' => 'required|alpha_num|size:10'\n ,'available' => 'in:1'\n ];\n\n $validator = Validator::make(Input::all(), $rules);\n\n if($validator->passes())\n {\n $product = Product::find($id);\n\n if(!isset($product)){\n return Redirect::route('admin.home');\n }\n\n if(Input::hasFile('image'))\n {\n $file = public_path().$product->image;\n \n if(File::exists($file)) {\n File::delete($file);\n }\n\n $image = Input::file('image');\n $fileLocation = public_path().'/images/';\n $fileName = uniqid().'.'.$image->getClientOriginalExtension();\n $image->move($fileLocation, $fileName);\n\n $product->image = '/images/'.$fileName;\n }\n\n $product->name = Input::get('name');\n $product->description = Input::get('description');\n $product->price = Input::get('price');\n $product->stock_number = Input::get('stock_number');\n $product->available = Input::get('available', false);\n\n $product->save();\n\n return Redirect::route('admin.product.edit', $id)\n ->with('data', ['alert'=>'Product saved', 'alertType'=>'success']);\n }\n\n return Redirect::route('admin.product.edit', [$id])->withInput()->withErrors($validator);\n }", "title": "" }, { "docid": "ea8973d39e59e8f1c11bb3b1309f8968", "score": "0.54281324", "text": "public function update(RecordInterface $entity);", "title": "" }, { "docid": "f240996101fd1f576310adca24306421", "score": "0.5427304", "text": "public function update(Request $request, $id)\n {\n $product = Product::findOrFail($id);\n $product->name = $request->name;\n $product->airport_id = $request->airport;\n $product->service_id = $request->service;\n $product->product_code = $request->code;\n $product->sell_as_agent = $request->sell_as_agent == 'on' ? 1 : 0;\n $product->is_amendable = $request->is_amendable == 'on' ? 1 : 0;\n $product->is_refundable = $request->is_refundable == 'on' ? 1 : 0;\n\n if($request->file('photo')){\n $path = $this->save_image($request->file('photo'));\n $product->image = $path; \n }else{\n $path = $product->image;\n }\n\n $product->save();\n return response()->json(['message' => 'Product Saved', 'image_url' => $path, 'product_id' => $product->id]);\n }", "title": "" }, { "docid": "5487655f93ce1538067ec32ea1bba609", "score": "0.54081273", "text": "public function update(MetaResource $meta): bool\n {\n $this->checkReadOnly($meta->getKind());\n $response = $this->connector->put($this->getZonePath('/metadata/'.$meta->getKind()), new MetaTransformer($meta));\n\n // If the response is empty, everything is fine.\n return empty($response);\n }", "title": "" }, { "docid": "7b0a591f560c7cc51ca21361b8ff2d2f", "score": "0.54073846", "text": "public function update(Request $request, $id)\n {\n $data = Product::findOrFail($id);\n $data->id_jenis_product = $request->jenis;\n $data->name = $request->name;\n $data->low_name = strtolower($request->name);\n $data->unit = $request->unit;\n $data->price = $request->price;\n $data->stock = $request->stock;\n $data->status = $request->status;\n $data->promo = $request->promo;\n $data->size = $request->size;\n $data->detail = $request->detail;\n\n if ($request->hasFile('picture')) {\n $uploadedFile = $request->file('picture');\n $file_up = $uploadedFile->store('public/product');\n $data->picture = \\Storage::url($file_up);\n\n $picture = ProductPicture::where('id_product', $id)->where('status', 1)->first();\n if (!empty($picture)) {\n $picture->status = 1;\n $picture->id_product = $data->id;\n $picture->picture = \\Storage::url($file_up);\n $product->save();\n }\n }\n\n $data->save();\n\n Session::flash('success', 'Product berhasil di Update');\n return redirect()->back();\n }", "title": "" }, { "docid": "1a6a6b40dbea5cb9d0dbea3f140da229", "score": "0.5407359", "text": "public function update(Request $request, $id)\n {\n $validate=$request->validate([\n 'name'=>'required',\n 'description'=>'required'\n\n ]);\n $food=Food::find($id);\n $photo=$food->photo;\n if($request->file('photo')){\n $photo=$request->file('photo')->store('public/food');\n \\Storage::delete($food->photo);\n \n \n }\n $food->name=$request->name;\n $food->description=$request->description;\n $food->photo=$photo;\n $food->price=$request->price;\n $food->update();\n notify()->success('food Update Successfully!');\n return redirect('/food');\n }", "title": "" }, { "docid": "191adb1d2c401c83f13bd2f62285fdb5", "score": "0.5405329", "text": "public function Update($entity);", "title": "" }, { "docid": "b59a7203e329b5f41bb8bd3bec985c97", "score": "0.5403812", "text": "public function update(Request $request, $id)\n {\n $product = Product::findOrFail($id);\n $this->validate($request,[\n 'name' => 'required',\n 'quantity' => 'required',\n 'rate' => 'required',\n 'brands' => 'required',\n 'categories' => 'required',\n 'status' => 'required',\n 'image' => 'mimes:jpeg,jpg,bmp,png'\n ]);\n\n $image = $request->file('image');\n $slug = str_slug($request->name);\n\n\n if (isset($image)) {\n $currentDate = Carbon::now()->toDateString();\n $imagename = $slug .'-'. $currentDate .'-'. uniqid() .'.'. $image->getClientOriginalExtension();\n \n if (!file_exists('public/product')) {\n mkdir('public/product', 0777, true);\n }\n if (file_exists('public/product/'.$product->image)) {\n unlink('public/product/'.$product->image);\n }\n \n $image->move('public/product',$imagename);\n }else{\n $imagename = $product->image;\n }\n \n $product->name = $request->name;\n $product->quantity = $request->quantity;\n $product->rate = $request->rate;\n $product->status = $request->status;\n $product->image = $imagename;\n\n $product->save();\n\n $product->brands()->sync($request->brands);\n $product->categories()->sync($request->categories);\n\n Toastr::success('Product Successfully Saved :)' ,'Success');\n return redirect()->route('products.index');\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" } ]
cfc7dbb7bee2ba643d8cbc43e353405a
Get a list of course comments for a particular course
[ { "docid": "d6c7f0b2eb8516a053416e523962ba39", "score": "0.72752523", "text": "protected function getCourseList($courseId)\n {\n $pagenumber = 1;\n if($this->hasRequestParameter('page')){\n $pagenumber = $this->getRequestParameter('page');\n }\n \t$pager = new sfPropelPager('CourseComment', skuleadminConst::EXAM_RECORDNUMBER);\n \t$c = new Criteria();\n \t$crit1 = $c->getNewCriterion(CourseCommentPeer::COURSE_ID, $courseId);\n \t$c->addAnd($crit1);\n \t$c->addAscendingOrderByColumn(CourseCommentPeer::INPUT_DT);\n \t\n $pager->setCriteria($c);\n $pager->setPage($pagenumber);\n $pager->init();\n return $pager;\n }", "title": "" } ]
[ { "docid": "6b867ba32c556497b1368b4645aed8f9", "score": "0.74018914", "text": "public function getComments()\n {\n return $this->hasMany(Comment::className(), ['course_id' => 'id']);\n }", "title": "" }, { "docid": "bc5c13b59ee2348f222e16b28a0554f8", "score": "0.7108699", "text": "public function comments()\n {\n return $this->hasMany(CourseComment::class);\n }", "title": "" }, { "docid": "cec611d90d776a851ff4cf6ebe2eab64", "score": "0.7028466", "text": "public function getComments();", "title": "" }, { "docid": "cec611d90d776a851ff4cf6ebe2eab64", "score": "0.7028466", "text": "public function getComments();", "title": "" }, { "docid": "3daaf47762e2357d2a20cf440d366acc", "score": "0.6909495", "text": "public function getComments(){\n $commentsManager = $this->app->getManager('Comments');\n return $commentsManager->getAllComments();\n }", "title": "" }, { "docid": "309f5245755c85bb9106ad89503f1bef", "score": "0.66443336", "text": "public function getCommentsList() {\r\n\t\t$db = PearDatabase::getInstance();\r\n\t\t$commentsList = array();\r\n\r\n\t\t$result = $db->pquery(\"SELECT commentcontent AS comments FROM vtiger_modcomments WHERE related_to = ?\", array($this->getId()));\r\n\t\t$numOfRows = $db->num_rows($result);\r\n\r\n\t\tfor ($i=0; $i<$numOfRows; $i++) {\r\n\t\t\tarray_push($commentsList, $db->query_result($result, $i, 'comments'));\r\n\t\t}\r\n\r\n\t\treturn $commentsList;\r\n\t}", "title": "" }, { "docid": "da3ddff4212b0dfb6d85bcb79edd941b", "score": "0.6635381", "text": "public function getCommentsList() {\n\t\t$db = PearDatabase::getInstance();\n\t\t$commentsList = array();\n\n\t\t$result = $db->pquery(\"SELECT commentcontent AS comments FROM vtiger_modcomments WHERE related_to = ?\", array($this->getId()));\n\t\t$numOfRows = $db->num_rows($result);\n\n\t\tfor ($i=0; $i<$numOfRows; $i++) {\n\t\t\tarray_push($commentsList, $db->query_result($result, $i, 'comments'));\n\t\t}\n\n\t\treturn $commentsList;\n\t}", "title": "" }, { "docid": "02bcaf8c0161b2b5230345705d4ec4e8", "score": "0.65738183", "text": "function getComments() {\n\t\t\treturn $this->API->getComments($this->ID);\n\t\t}", "title": "" }, { "docid": "36e9d4435918a12f45208246852259c3", "score": "0.6553504", "text": "public function getComments() {\r\n $result = $this->model->getComments();\r\n print_r(json_encode($result, true)); exit;\r\n }", "title": "" }, { "docid": "d008f844b67f2fae0b0d8f74097c87df", "score": "0.65066713", "text": "public function getAllComments()\n {\n return $this->db->toList(\"SELECT * FROM `comments` ORDER BY timestamp desc \");\n }", "title": "" }, { "docid": "8fd4df5e7328a713ae6a2afdaedaa018", "score": "0.64403266", "text": "public function getCommentList()\n {\n $comments = [];\n $query = $this->dbConnector->query('SELECT *\n FROM comments\n ORDER BY comment_creationDate\n DESC, comment_postId');\n $query->execute();\n\n while ($datas = $query->fetch(\\PDO::FETCH_ASSOC)) {\n $comments[] = new Comment($datas);\n }\n return $comments;\n }", "title": "" }, { "docid": "d87fd386ff7ccdd49e5005717c50e6df", "score": "0.6437268", "text": "public static function getComments(){\n $db = \\DB::get_instance();\n $stmt = $db->prepare(\"SELECT * FROM comments\");\n $stmt->execute();\n $rows = $stmt->fetchAll();\n return $rows;\n }", "title": "" }, { "docid": "c17492192ec27c6c9bfd78206b23f21f", "score": "0.64216787", "text": "function listComments(){\n\t\treturn $this->fetchAll()->toArray();\n\t}", "title": "" }, { "docid": "4a10f4cce331ee4ca78b4e7bb532cd1e", "score": "0.6406311", "text": "public function getComments() {\n $sql = \"SELECT c.ID AS comment_id, u.user_name, c.comment_text, c.date_created FROM comments c JOIN users u ON u.ID = c.comment_user WHERE comment_post = ?\";\n $stmt = $this->conn->prepare($sql);\n $stmt->bind_param(\"i\", $this->post_id);\n $stmt->execute();\n $result = $stmt->get_result();\n $this->comments = $result->fetch_all(MYSQLI_ASSOC);\n }", "title": "" }, { "docid": "7f466bba3aa15356ec1276cc677f7505", "score": "0.63900316", "text": "public function getAllComments()\n\t{\n\t\treturn $this->all_comments;\n\t}", "title": "" }, { "docid": "920097b268f1081f9d22fbb4024846a7", "score": "0.6360403", "text": "function getAllComments() {\r\n return $this->comments;\r\n }", "title": "" }, { "docid": "c6fcb3a49eefb7d739219b47be93b266", "score": "0.63480085", "text": "public function getComments()\n\t{\n\n\t\t$query = Comment::orderBy('created_at', 'desc');\n\n\t\t$include = Input::get('include');\n\t\t$exclude = Input::get('exclude');\n\t\t$querystring = array();\n\n\t\tif (is_array($include)) {\n\t\t\t$querystring['include'] = array_filter($include, 'strlen');\n\t\t\tforeach ($include as $c) {\n\t\t\t\tif (!empty($c)) $query->where('content', 'LIKE', '%' . $c . '%');\n\t\t\t}\n\t\t}\n\n\t\tif (is_array($exclude)) {\n\t\t\t$querystring['exclude'] = array_filter($exclude, 'strlen');\n\t\t\tforeach ($exclude as $c) {\n\t\t\t\tif (!empty($c)) $query->where('content', 'NOT LIKE', '%' . $c . '%');\t\t\t\n\t\t\t}\t\t\t\n\t\t}\n\n\t\t$comments = $query->paginate(50);\n\n\t\treturn View::make('activity.comments', array(\n\t\t\t'comments' => $comments,\n\t\t\t'total' => $comments->getTotal(),\n\t\t\t'include' => $include,\n\t\t\t'exclude' => $exclude,\n\t\t\t'querystring' => $querystring,\n\t\t));\n\t}", "title": "" }, { "docid": "53fe43bb98a68e433eef238f0857ff14", "score": "0.63446814", "text": "public function getComments()\n {\n // Je prépare la requête \n $requete_prepare = $this->connexion->prepare(\n \"SELECT * \n FROM Comment\"\n );\n // J'execute la requête en passant la valeur\n $requete_prepare->execute();\n // Je récupère le résultat de la requête en mappant avec la classe Comment\n $listComments = $requete_prepare->fetchAll(PDO::FETCH_CLASS, 'Comment');\n // Je retourne une liste d'objets Comment\n return $listComments;\n }", "title": "" }, { "docid": "670009d3f9a0a920f49996bcf7f15050", "score": "0.63028985", "text": "private function getCourses() {\n\n $rawResponse = $this->sendRequest(\"courses\");\n\n $courses = json_decode($rawResponse);\n\n return $courses;\n }", "title": "" }, { "docid": "d83307f69c71166d5ee17f92875e50c4", "score": "0.6284113", "text": "public function getList()\n {\n $list = Internal\\Data::getList('bearcms/comments/thread/');\n $result = new \\IvoPetkov\\DataList();\n foreach ($list as $value) {\n $rawData = json_decode($value, true);\n $tempCollection = Internal\\Data\\Comments::createCommentsCollection($rawData['comments'], $rawData['id']);\n foreach ($tempCollection as $dataObject) {\n $result[] = $dataObject;\n }\n }\n return $result;\n }", "title": "" }, { "docid": "460c209986b1411733b7c2d5ad8710e0", "score": "0.627363", "text": "public function getCourses()\r\n {\r\n $sql = \"SELECT * FROM courses\";\r\n $results = $this->db->query($sql);\r\n $courses = mysqli_fetch_all($results, MYSQLI_ASSOC);\r\n\r\n return $courses;\r\n }", "title": "" }, { "docid": "4d4512cc5954d7af8556afa319da0d38", "score": "0.6253371", "text": "public static function getComments() {\n\t\t$result = array();\n\n\t\ttry {\n\t\t\t$stmt = self::$db->prepare('select * from comments');\n\t\t\t$stmt->execute();\n\t\t\t$rs = $stmt->fetchAll();\n\n\t\t\tforeach ($rs as $row) {\n\t\t\t\t$result[] = new Comment($row['id'], $row['comment'], $row['username']);\n\t\t\t}\n\n\t\t} catch (PDOException $e) {\n\t\t\tthrow $e;\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "c6aad10a8d0ed5fd3d689b6e295f9473", "score": "0.6252694", "text": "public function getComments(): array\n {\n return $this->comments;\n }", "title": "" }, { "docid": "904c068583d6f7b4467bad14401b3b5c", "score": "0.6230378", "text": "public\r\n function loadComments()\r\n {\r\n\r\n $surveys = $this->connection->query(\"SELECT * FROM `comments` ORDER BY `comments`.`id_surveys`;\");\r\n $result = $surveys->fetchAll(PDO::FETCH_ASSOC);\r\n\r\n return $result;\r\n\r\n }", "title": "" }, { "docid": "bdc738e80f0bfe022218f0beddf009a9", "score": "0.6220205", "text": "public function get_courses() {\n\t\t$this->load->database();\n\t\t$courses = $this->db->select(self::NAME_COLUMN . ',' . self::URL_COLUMN)->get(self::TABLE)->result();\n\t\treturn array('courses' => $courses);\n\t}", "title": "" }, { "docid": "ff29da9b7e60d4022b91c8bdb55a1b8c", "score": "0.62183124", "text": "public function comment()\n {\n//left join ischool_courses c on b.course_id=c.id')->get()->paginate(20);\n $comments = DB::table('comments')->paginate(20);\n return view('admin.comment', ['comments' => $comments]);\n }", "title": "" }, { "docid": "1b1646da4cc64242b8d21efcec2fd87c", "score": "0.6202632", "text": "public function getComments($book_id, $connection){\n $query = \"SELECT * FROM book_comments WHERE book_id='$book_id'\";\n $getcomments = $connection->query($query);\n return $getcomments;\n }", "title": "" }, { "docid": "562bc6a5dd90ee611729b479aad97ddd", "score": "0.62023574", "text": "public function getVideocomments()\n {\n return $this->browseVideoComments($this->request->video_id);\n }", "title": "" }, { "docid": "1677d85ad16434a23314946ec32a29e9", "score": "0.6183454", "text": "public static function getAllCourses()\n {\n $key = config('cache.prefix').'AllCourses';\n $courses = Cache::remember($key, 5, function() {\n return Course::with(['level', 'followed_by_users', 'attachments', 'attachments.attachment_revisions', \n 'lessons'])->with(['attachments.attachment_revisions'])->orderBy('number')->get();\n }); // enable eager loading + cache\n\n return $courses;\n }", "title": "" }, { "docid": "5429a69a1e0c9a897c8bdaa8982585e5", "score": "0.61764306", "text": "public function get_all_comments(){\n global $database;\n $commentArray=[];\n $sql = \"SELECT * FROM comments WHERE appreciationId = \".$this->id;\n $result = $database->query($sql);\n while($r = $row = $database->fetch_array($result)){\n $thisCommment = new Comment($r);\n\n $commentArray[] = $thisCommment;\n\n }\n\n return $commentArray;\n }", "title": "" }, { "docid": "92593eec92328b788a9761302d86d991", "score": "0.6172464", "text": "public function index()\n {\n $data = Comment::query()\n ->orderBy(\"created_at\", \"ASC\")\n ->get();\n\n // Implemented Eager loading to pull all comments in a single query\n // better performance\n foreach($data as $d) {\n // A magic way to override the magic __get function for Laravel Model\n $d->children = array_merge($data->where(\"parent_id\", \"=\" ,$d->id)->all(), []);\n }\n $comments = $data->whereNull(\"parent_id\");\n\n return $comments;\n }", "title": "" }, { "docid": "05a1aa35ac9756c2a252a821a38d5376", "score": "0.61654556", "text": "function getDisputedCommentList() {\n\n $arrClms = array('CommentID', 'Title');\n $varWhere = ' 1 ';\n $arrRows = $this->select(TABLE_DISPUTED_COMMENT_LIST, $arrClms, $varWhere, 'CommentID ASC');\n return $arrRows;\n }", "title": "" }, { "docid": "cc4f4d0960fb5e9dac5ff77b158e78ce", "score": "0.6165053", "text": "public function getComments()\n {\n return $this->hasMany(Comments::className(), ['task_id' => 'id']);\n }", "title": "" }, { "docid": "eb51763b8eb71cb3155fe238535c1162", "score": "0.614747", "text": "public function getComments()\n {\n return $this->comments;\n }", "title": "" }, { "docid": "eb51763b8eb71cb3155fe238535c1162", "score": "0.614747", "text": "public function getComments()\n {\n return $this->comments;\n }", "title": "" }, { "docid": "eb51763b8eb71cb3155fe238535c1162", "score": "0.614747", "text": "public function getComments()\n {\n return $this->comments;\n }", "title": "" }, { "docid": "eb51763b8eb71cb3155fe238535c1162", "score": "0.614747", "text": "public function getComments()\n {\n return $this->comments;\n }", "title": "" }, { "docid": "07eb66b5adef78a4cda87c928d4a7fc9", "score": "0.6143089", "text": "public function getComments()\n {\n if (!$this->hasComments()) {\n $comments = $this->commentCollectionFactory->create()\n ->addCommentApprovedFilter()\n ->addOrderByDate('desc');\n\n $comments->getSelect()->limit($this->getNumber() ? $this->getNumber() : 5);\n\n $this->setComments($comments);\n }\n\n return $this->getData('comments');\n }", "title": "" }, { "docid": "e6c4a345641d4027d62e8049b864ed73", "score": "0.6106631", "text": "public function getComments()\n {\n $xpath = new \\DOMXPath($this->getXml());\n $nodeList = $xpath->query(\"//ScoutComment\");\n /** @var \\PHT\\Xml\\Team\\Youth\\Scout\\Comment[] $data */\n $data = new Utils\\XmlIterator($nodeList, '\\PHT\\Xml\\Team\\Youth\\Scout\\Comment');\n return $data;\n }", "title": "" }, { "docid": "a0b1f295c0c7c7b80c7990e64735f592", "score": "0.6091533", "text": "public function getCommentsByLessonId($lessonId = 0)\n {\n $comments = $this->courseLessonCommentService->getCommentsByLessonId($lessonId);\n if (count($comments) > 0) {\n return view('dashboard.instructor.allcomments')\n ->with('commentsList', $comments);\n } else {\n return view('dashboard.instructor.error')->with('errorMessage', 'there is no comments yet!');\n }\n }", "title": "" }, { "docid": "b44661e962d1571a8181ff8c015e4ca0", "score": "0.60808194", "text": "public function commentsWith()\n\t{\n\t\treturn $this->comments()->with('creator')->get();\n\t}", "title": "" }, { "docid": "c6526a5180eadecd317e89288ce28b06", "score": "0.60782397", "text": "public function get_authored_courses()\n {\n $courses = array();\n $query = $this->db->query(\"\n SELECT\n courses.id AS course_id,\n courses.title AS title,\n description,\n \t languages.id AS language_id,\n languages.title AS language\n FROM courses\n LEFT JOIN languages\n ON courses.language_id = languages.id\n WHERE courses.user_id = $this->current_user_id\n \");\n $courses = $query->result();\n //print_r($courses); exit;\n return $courses;\n }", "title": "" }, { "docid": "96d9f2c0c6e0bd5e3b91d9c506b5031a", "score": "0.6074511", "text": "public static function get_apprentice_courses() {\n global $DB, $USER;\n\n $params = [];\n $unitpages = $DB->sql_like('cc.idnumber', ':unitcat', false, false);\n $params['unitcat'] = \"modules_%\";\n $coursepages = $DB->sql_like('cc.idnumber', ':coursecat', false, false);\n $params['coursecat'] = \"courses_%\";\n $params['userid'] = $USER->id;\n $sql = \"SELECT DISTINCT e.courseid, c.shortname, c.fullname, c.startdate, c.enddate, cc.name categoryname\n FROM {enrol} e\n JOIN {user_enrolments} ue ON ue.enrolid = e.id AND ue.userid = :userid\n JOIN {course} c ON c.id = e.courseid AND c.visible = 1 AND c.startdate < UNIX_TIMESTAMP()\n JOIN {course_categories} cc ON cc.id = c.category\n WHERE ue.status = 0 AND e.status = 0 AND ue.timestart < UNIX_TIMESTAMP()\n AND ({$unitpages} OR {$coursepages})\";\n\n $courses = $DB->get_records_sql($sql, $params);\n return $courses;\n }", "title": "" }, { "docid": "7c99c5cc8d494c3aae3e9c4f9bf3abea", "score": "0.6067939", "text": "public function getComments()\n {\n if (is_null($this->_commentCollection)) {\n $entity = $this->getEntity();\n if ($entity instanceof Mage_Sales_Model_Order_Invoice) {\n $collectionClass = 'sales/order_invoice_comment_collection';\n } else if ($entity instanceof Mage_Sales_Model_Order_Creditmemo) {\n $collectionClass = 'sales/order_creditmemo_comment_collection';\n } else if ($entity instanceof Mage_Sales_Model_Order_Shipment) {\n $collectionClass = 'sales/order_shipment_comment_collection';\n } else {\n Mage::throwException(Mage::helper('sales')->__('Invalid entity model'));\n }\n\n $this->_commentCollection = Mage::getResourceModel($collectionClass);\n $this->_commentCollection->setParentFilter($entity)\n ->setCreatedAtOrder()\n ->addVisibleOnFrontFilter();\n }\n\n return $this->_commentCollection;\n }", "title": "" }, { "docid": "c43b480b18ffb7510c3ff356d80dc9f5", "score": "0.60632277", "text": "public function GetCoursesUsing()\n\t{\t$courses = array();\n\t\t$sql = 'SELECT coursecontent.* FROM coursecontent, courses_mm WHERE coursecontent.ccid=courses_mm.cid AND courses_mm.mmid=' . $this->id;\n\t\tif ($result = $this->db->Query($sql))\n\t\t{\twhile ($row = $this->db->FetchArray($result))\n\t\t\t{\t$courses[$row['ccid']] = $row;\n\t\t\t}\n\t\t}\n\t\treturn $courses;\n\t}", "title": "" }, { "docid": "11784fbe7e9680285f2d4d86f785a73f", "score": "0.6048231", "text": "public function getComments()\n {\n return $this->hasMany(Comments::className(), ['task_id' => 'id'])->via('tasks');\n }", "title": "" }, { "docid": "a39cb5d52f973061eea9159371acf51f", "score": "0.60449225", "text": "public function getAllComments()\n {\n $user = $this->userService->getCurrentLoggedInUser();\n $userId = null;\n\n if ($user) {\n $userId = $this->userService->getCurrentLoggedInUser()->id;\n }\n\n $allComments = $this->comStorage->readComment();\n return array_map(function ($item) use ($userId) {\n $item->owner = false;\n $item->userAdmin = false;\n $item->gravatar = $this->userService->generateGravatarUrl($item->email);\n if ($item->userId === $userId) {\n $item->owner = true;\n }\n if ($this->userService->validLoggedInAdmin()) {\n $item->userAdmin = true;\n }\n return $item;\n }, $allComments);\n }", "title": "" }, { "docid": "3352daf9a605ba9129c547c07dadd636", "score": "0.60424364", "text": "public function getAllComments()\n {\n $query = \"SELECT\n users.first_name,\n users.last_name,\n projects.project_title,\n comments.comment_id,\n comments.comment,\n comments.created_at\n from users \n join comments on comments.user_id=users.user_id\n join projects on projects.project_id=comments.project_id\";\n\n $stmt = self::$dbh->prepare($query);\n\n $stmt->execute();\n\n return $stmt->fetchall(\\PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "37cb1a40632cc2656ec879ca3058f4cc", "score": "0.6042068", "text": "function getComments($content_type_id, $content_id);", "title": "" }, { "docid": "8e19c123bccafc881f0e1b01116b28f8", "score": "0.6039846", "text": "public static function findAll()\n {\n self::createTableIfNeeded();\n\n $comments = array();\n\n $response = Connexion::getConnexion()->getPdo()->query(\"SELECT * FROM mb_comment\");\n\n\n while($data = $response->fetch())\n {\n $comment = new Comment($data['articleId'], $data['commentId'], $data['level']);\n\n $comment->setId($data['id']);\n $comment->setTitle($data['title']);\n $comment->setContent($data['content']);\n $comment->setPseudo($data['pseudo']);\n $comment->setDate(new DateTime($data['date']));\n $comment->setAlert($data['alert']);\n\n array_push($comments, $comment);\n }\n\n $response->closeCursor();\n\n return $comments;\n }", "title": "" }, { "docid": "74c4bb37e6c5d5b958a3446b1cba1319", "score": "0.60295665", "text": "public function getCourses()\n {\n $this->endPoint = \"/courses\";\n $this->get();\n }", "title": "" }, { "docid": "757de2793091765eceaf6ea48912bbef", "score": "0.60236496", "text": "public function getComments() {\n\t\treturn $this->_comments;\n\t}", "title": "" }, { "docid": "1dc4b126da1d654dbed89bec30cc4473", "score": "0.6014272", "text": "function get_list() {\n $query = \"SELECT *\n FROM <<tp>>ec_item_comment\n WHERE site_id=$this->site_id\n AND ec_item_id=$this->ec_item_id\n AND ec_item_lang='$this->ec_item_lang'\n ORDER BY ec_item_comment_datetime ASC\";\n return \\e::db_getrows($query);\n # -------------------- get list of comments - end ------------------------------\n }", "title": "" }, { "docid": "618e1f5806d378aa88215c3de7868389", "score": "0.6011305", "text": "public function get()\n {\n return Course::all();\n }", "title": "" }, { "docid": "a938de484e73b76e44acef01b4b1c57f", "score": "0.60026956", "text": "public function get_courses() {\n }", "title": "" }, { "docid": "a0aaa9180ee95bd200f337b9b6503aec", "score": "0.5996044", "text": "public function getComments() {\n return $this->_comments;\n }", "title": "" }, { "docid": "e66a2c6b3d57b103f1f3b6d62b07f86e", "score": "0.5984222", "text": "public function getCourses()\n\t {\n\t\t// Create a new connection \n\t\t$db = JFactory::getDbo();\n\t\t$query = $db->getQuery(true);\n\n\t\t$query\n\t\t\t->select(array('a.*', 'b.*'))\n\t\t\t->select($db->quoteName('b.id', 'course_id'))\n\t\t\t->select($db->quoteName('a.title', 'programme_title'))\n\t\t\t->from($db->quoteName('kesra__programmes', 'a'))\n\t\t\t->join('RIGHT', $db->quoteName('kesra__courses', 'b') . ' ON (' . $db->quoteName('a.id') . ' = ' . $db->quoteName('b.programme_id') . ')');\n\t\t\t//->where($db->quoteName('b.programme_id') . ' = ' . $db->quote('a.id'));\n\n\t\t$db->setQuery($query);\n\n\t\t$results = $db->loadObjectList();\n\t\t return $results;\n\t }", "title": "" }, { "docid": "2794a5c1ff643c9ca6265510ddc272b0", "score": "0.5982465", "text": "public function getArticleComments($artID){\n $connection=$this->getConnection();\n $stmt = $connection->prepare(\"SELECT * FROM comments WHERE artID = ?\"); \n $stmt->bind_param(\"i\", $artID);\n $stmt->execute();\n $result = $stmt->get_result();\n while($row = $result->fetch_assoc()){\n $contact = new Comments();\n $contact->load($row);\n $contacts[]=$contact;\n } \n $stmt->close();\n $connection->close();\n return $contacts;\n }", "title": "" }, { "docid": "b0c9426c2cb8558cddf9d79906dea0bd", "score": "0.5980572", "text": "public function allLessonCourse()\n\t{\n\t\t$allLessonsCourses = $this->allLessonCourseQuery()\n ->select('courses.url as course_url', 'courses.title as course_title',\n\t\t\t\t'courses.id as course_id', 'courses.video as course_video',\n\t\t\t\t'courses.cover_image as course_image', 'lessons.id', 'lessons.title',\n\t\t\t\t'lessons.video', 'courses_progress.id as progress_id')->get();\n\t\treturn $allLessonsCourses;\n\t}", "title": "" }, { "docid": "d10cf8093dec06ccbf2b1bd0d575e7c8", "score": "0.596534", "text": "public function get_comments()\n {\n return Model::fly('Model_OrderComment')->find_all_by_order_id((int) $this->id);\n }", "title": "" }, { "docid": "b0be61895519c85af94e8930488bf80e", "score": "0.5964058", "text": "public function f_GetComments();", "title": "" }, { "docid": "77dc4a79fb9624ca01bcaf38e356e1d1", "score": "0.5964049", "text": "public function getComments()\n {\n return $this->hasMany(Comment::className(), ['post_id' => 'id']);\n }", "title": "" }, { "docid": "23e704cb060c09b033ad4349c1d24154", "score": "0.596005", "text": "public function getComments(): array{\n return $this->getRelatedEntities(\"Comment\");\n }", "title": "" }, { "docid": "7f7d3d4bb652b6317e01ffada7695cb2", "score": "0.5959773", "text": "function smarty_function_papyrine_getcomments ($params, &$smarty) \n\t{\n\t\tif (empty ($params['assign']))\n\t\t\t$params['assign'] = 'comments';\n\n\t\t// Require an id.\n\t\tif (empty ($params['entry']))\n\t\t\t$smarty->trigger_error ('papyrine_getcomments: entry is a required parameter');\n\n\t\t$entry = $smarty->GetEntry ($params['entry']);\n\n\t\t$smarty->assign (\n\t\t\t$params['assign'], \n\t\t\tPapyrine::Objects2Array ($entry->GetComments ())\n\t\t);\n\t}", "title": "" }, { "docid": "8bd83c2ec0d81c142a8b027533a98e88", "score": "0.59488446", "text": "function getComments()\n {\n return $this->comments ;\n }", "title": "" }, { "docid": "658460679c2c593b925db622a790baa2", "score": "0.59433895", "text": "public function getComments(){\n return $this->comments;\n }", "title": "" }, { "docid": "6301f456329cb94af35748ceef293b8e", "score": "0.59431183", "text": "public function getComments()\n {\n return $this->hasMany(Comment::className(), ['post_id' => 'post_id']);\n }", "title": "" }, { "docid": "71579d77af263d723620d20f37632715", "score": "0.59355193", "text": "public function getComments(): QUI\\ERP\\Comments\n {\n return $this->Comments;\n }", "title": "" }, { "docid": "1cf479821ba201e09f1aa36a1acb4eb1", "score": "0.5927332", "text": "public function getCourses()\n\t\t{\n\t\t\t$stmt = $this->dbRead->prepare(\n\t\t\t\t\"SELECT cAbbrev, cName FROM Course ORDER BY cAbbrev ASC;\");\n\t\t\t\t\n\t\t\t$stmt->execute();\n\t\t\t$result = $stmt->fetchAll();\n\t\t\treturn $result;\n\t\t}", "title": "" }, { "docid": "9245028099b7033a807d4580ffea78fe", "score": "0.59218633", "text": "public function getAllComments()\n {\n $allComments = $this->db->query('SELECT comments.idComment AS idComment, comments.commentContent AS commentContent, DATE_FORMAT(comments.dateComment, \\'%d/%m/%Y à %H:%i:%s\\') AS comment_date_fr, user.username AS username, posts.titlePost AS titlePost\n FROM user\n INNER JOIN comments ON comments.idUser = user.idUser\n INNER JOIN posts ON comments.idPost=posts.idPost\n ORDER BY comments.dateComment DESC');\n $allComments->execute();\n return $allComments->fetchAll();\n }", "title": "" }, { "docid": "0858afba23ed17877d6747d11c68b656", "score": "0.59202147", "text": "public function getComments( )\n {\n $ret = [];\n $idxes = parent::getChildren();\n if ( $idxes ) {\n $comments = comment()->loads( $idxes );\n foreach( $comments as $comment ) {\n //$pre = [];\n //$pre['content'] = $comment->content;\n $ret[] = $comment->pre();\n }\n }\n return $ret;\n }", "title": "" }, { "docid": "bb16b352855527faddd0574ce12a2fc2", "score": "0.5914893", "text": "public function comments()\n\t{\n\t\treturn $this->has_many('Comment');\n\t}", "title": "" }, { "docid": "1076eb3fe5cf8a7b984b102e60ffc195", "score": "0.5911969", "text": "public function getCommentsByModuleID($moduleID)\n {\n return $this->moduleStorage->getCommentsByModuleID($moduleID);\n }", "title": "" }, { "docid": "958b37885795e544d92090b10b40d60c", "score": "0.59110916", "text": "function forum_discussion_ids_by_course ($course) {\n\n global $CFG;\n\n return get_records_sql (\"SELECT s.id , s.forum\n FROM {$CFG->prefix}forum_discussions s,\n {$CFG->prefix}forum a\n WHERE a.course = '$course' AND\n s.forum = a.id\");\n }", "title": "" }, { "docid": "6e357b2d8e85937391ae7a1bce1cd442", "score": "0.59031916", "text": "public function comments()\n {\n return $this->request('me/comments');\n }", "title": "" }, { "docid": "77fabd30e7b599504cc1453569d554a2", "score": "0.5902147", "text": "function get_comments()\n {\n // in case there are multiple DBs in use\n $this->select_default_db();\n $result = mysql_query(\"SELECT `author` , `comment` FROM `$this->comments_table_name`\", $this->mysql_link);\n $return = array();\n while ($row = mysql_fetch_assoc($result))\n {\n $return[] = $row;\n }\n return $return;\n }", "title": "" }, { "docid": "88f9b2e80f48c4776076ee2a93f7c189", "score": "0.5894256", "text": "public function index()\n {\n return CommentResource::collection(Comment::all());\n }", "title": "" }, { "docid": "57b52edd923f548b9039896303a6c9e0", "score": "0.58939266", "text": "public function executeCoursecommenting(sfWebRequest $request)\n {\n $this->form = new CourseCommentForm();\n \n if ($request->hasParameter(\"course\")){\n // find the course and the semester in question\n $courseId = $request->getParameter(\"course\");\n $fuzSearch = new fuzzySearch();\n try {\n $fuzSearch->query($courseId);\n $_res = $fuzSearch->getCourseList();\n if ($_res === null || count($_res)!=1) return sfView::SUCCESS;\n } catch (Exception $e){\n return sfView::SUCCESS;\n }\n $this->courseId = $_res[0]->getId();\n \n if ($request->hasParameter(\"id\")){\n $this->redirect(\"admincommenting/editCourse?id=\".$request->getParameter(\"id\").\"&course=\".$this->courseId);\n }\n \n $this->commentList = $this->getCourseList($this->courseId);\n }\n }", "title": "" }, { "docid": "3f03603921138240acc0a9758355fdf8", "score": "0.588018", "text": "public function getComments()\n {\n return $this->hasMany(Comment::className(), ['comment_post_ID' => 'ID']);\n }", "title": "" }, { "docid": "28b9bce446c6add21997e969b2fe6975", "score": "0.5872354", "text": "public static function getCommentsByParentId($parentId){\n $comments = self::run(\"SELECT * FROM comments WHERE parent_id = ? AND deleted = ? \", [$parentId, 0])->fetchAll();\n return $comments;\n }", "title": "" }, { "docid": "d88583366c90e830944cc3b1893d7af8", "score": "0.5865877", "text": "public function get_comments(Request $req) {\n\t\t$user = Auth::user();\n\t\t$group_video_id = intval($req->group_video_id);\n\t\t$comments = $this->get_all_comments($user->id, $group_video_id);\n\t\treturn $comments;\n\t}", "title": "" }, { "docid": "2d635f9f3a6ff88a538dd8ace0580ba9", "score": "0.58651394", "text": "public function index()\n {\n return Comment::all();\n }", "title": "" }, { "docid": "f5303cf8443b102a442a8d16e1a5ed7c", "score": "0.5863022", "text": "public function comments()\n {\n return $this->hasMany('App\\Models\\Comment', 'comment_block_id');\n }", "title": "" }, { "docid": "4d6f89b97d835540657a1662bb6ba537", "score": "0.58623195", "text": "public function getEventComments($eventId, array $options = array()) {\n return $this->runCommand(\n 'event.comments.get',\n array('eventId' => $eventId),\n $options\n );\n }", "title": "" }, { "docid": "48ad742b69e0dd2fa2738e37eca095bc", "score": "0.58574253", "text": "public function getComments() {return $this->comments;}", "title": "" }, { "docid": "4a77e6ec957fe3026a0d4d372791062f", "score": "0.5853661", "text": "public function getCourses(): array\n {\n $sql = \"SELECT * FROM courses ORDER BY progression;\";\n $result = $this->db->query($sql);\n\n return $result->fetch_all(MYSQLI_ASSOC);\n }", "title": "" }, { "docid": "f4d920be42cd5a7cd36ad3a7831240f7", "score": "0.5846144", "text": "public function getCourses()\n {\n $courseList = array();\n\n $bindParams = array();\n\n $sql = \"select COURSE.COURSE_NUMBER || ': ' || COURSE.COURSE_NAME as NAME,\" .\n \" COURSE.COURSE_ID \" .\n \"from $this->dbName.RESERVE_LIST, \" .\n \"$this->dbName.RESERVE_LIST_COURSES, $this->dbName.COURSE \" .\n \"where RESERVE_LIST.RESERVE_LIST_ID = \" .\n \"RESERVE_LIST_COURSES.RESERVE_LIST_ID and \" .\n \"RESERVE_LIST_COURSES.COURSE_ID = COURSE.COURSE_ID \" .\n \"group by COURSE.COURSE_ID, COURSE_NUMBER, COURSE_NAME \" .\n \"order by COURSE_NUMBER\";\n try {\n $sqlStmt = $this->db->prepare($sql);\n $sqlStmt->execute($bindParams);\n while ($row = $sqlStmt->fetch(PDO::FETCH_ASSOC)) {\n $courseList[$row['COURSE_ID']] = $row['NAME'];\n }\n } catch (PDOException $e) {\n return new PEAR_Error($e->getMessage());\n }\n\n return $courseList;\n }", "title": "" }, { "docid": "0d5fcbf95685690592e58245066188a6", "score": "0.5843038", "text": "public function getCourses() {\n return $this->courses;\n }", "title": "" }, { "docid": "15e5a5d71e6539b53dd88e84a7e4cc2a", "score": "0.5838368", "text": "public function getComments(): string\n {\n $html = '';\n\n // Get all comments :\n $commentService = new CommentsService();\n $comments = $commentService->getComments();\n\n // Get html :\n foreach ($comments as $comment) {\n $html .=\n '#' . $comment->getId() . ' ' .\n $comment->getMessage() . ' ' .\n $comment->getUserId() . ' ' .\n $comment->getAdId() . '<br />';\n }\n\n return $html;\n }", "title": "" }, { "docid": "5c02e3edc3c108f103a0925642a28547", "score": "0.5834915", "text": "public function findAll()\n {\n return $this->comment->get();\n }", "title": "" }, { "docid": "e3c5979f6c17ac1faf6b80c10d385c58", "score": "0.58328825", "text": "public function index()\n {\n \n $comments = comment::query()->with('post');\n \n\n return $comments;\n }", "title": "" }, { "docid": "676c69a3e380d060459ca16fa7e8ab86", "score": "0.58312905", "text": "public function getComments()\n {\n if (!isset($this->_comments)) {\n $commentsModel = new Facepalm_Model_Comments();\n $select = $commentsModel->select()->where('point_id = ?', $this->id);\n $this->_comments = $commentsModel->fetchAll($select);\n }\n return $this->_comments;\n\n }", "title": "" }, { "docid": "f3c656728b8cf22d751aa56e56751370", "score": "0.5831047", "text": "public function comments()\n {\n return $this->hasMany(\n config('core.acl.project_comment_model'),\n 'project_id'\n );\n }", "title": "" }, { "docid": "7ec9282baeae27b97ea28eb0d52dd7e2", "score": "0.5826409", "text": "public static function getMainComments(){\n $comments = self::run(\"SELECT * FROM comments WHERE parent_id = ? AND deleted = ? GROUP BY id DESC\",[0,0])->fetchAll();\n return $comments;\n }", "title": "" }, { "docid": "ca3d4aae0d90a1fc246ac60290e2bc15", "score": "0.5823663", "text": "function get_courses_by_categories($categories, $sort=\"c.sortorder ASC\", $fields=\"c.*\") {\n\n global $USER, $CFG, $DB;\n\n $params = array();\n\n if (!empty($categories)) {\n list($in_sql, $params) = $DB->get_in_or_equal($categories);\n $categoryselect = \"WHERE c.category \".$in_sql;\n } else {\n $categoryselect = \"\";\n }\n\n if (empty($sort)) {\n $sortstatement = \"\";\n } else {\n $sortstatement = \"ORDER BY $sort\";\n }\n\n $visiblecourses = array();\n\n list($ccselect, $ccjoin) = context_instance_preload_sql('c.id', CONTEXT_COURSE, 'ctx');\n\n $sql = \"SELECT $fields $ccselect\n FROM {course} c\n $ccjoin\n $categoryselect\n $sortstatement\";\n\n // pull out all course matching the cat\n if ($courses = $DB->get_records_sql($sql, $params)) {\n // loop throught them\n foreach ($courses as $course) {\n context_instance_preload($course);\n if (isset($course->visible) && $course->visible <= 0) {\n // for hidden courses, require visibility check\n if (has_capability('moodle/course:viewhiddencourses', get_context_instance(CONTEXT_COURSE, $course->id))) {\n $visiblecourses [$course->id] = $course;\n }\n } else {\n $visiblecourses [$course->id] = $course;\n }\n }\n }\n return $visiblecourses;\n}", "title": "" }, { "docid": "3318de4feb01250fca9bed4c3274b7ea", "score": "0.58121914", "text": "public function course( array $graph ) : array {\n\t\tglobal $post;\n\n\t\t$meta = get_post_meta( $post->ID, '_sfwd-courses', true );\n\t\t$graph[] = [\n\t\t\t'@type' => 'Course',\n\t\t\t'@id' => '#course',\n\t\t\t'name' => $post->post_title,\n\t\t\t'description' => $meta['sfwd-courses_course_short_description'] ?? '',\n\t\t\t'isAccessibleForFree' => 'True',\n\t\t\t'provider' => [\n\t\t\t\t'@id' => '#aliemu',\n\t\t\t],\n\t\t];\n\n\t\treturn $graph;\n\t}", "title": "" }, { "docid": "6ada492b7f8aa12bba66088e1e91e88e", "score": "0.5811541", "text": "public function allComments() : array\n {\n return $this->api->getJson('pullrequests/{id}/comments', ['id' => $this->id]);\n }", "title": "" }, { "docid": "2d56b031d00536224f4f3f9e788203cb", "score": "0.5803967", "text": "public function comments($movieId)\n {\n $comments = array();\n\n $cachedHtml = $this->getCachedFullPage('animeland_info_show_' . $movieId, $movieId);\n $html = new Htmldom($cachedHtml);\n // create comment url\n $latest_page = ($html->find('.basenavi .navigation a', -1) !== null) ? $html->find('.basenavi .navigation a', -1)->innertext : null;\n //clear html\n $html->clear();\n unset($html);\n\n //fetch all comments pages\n $n = $latest_page ? $latest_page : 1;\n $index=0; // index for page count\n for ($i = 1; $i <= $n; $i++) {\n ++$index;\n if($index > config('api.comment_page_limit')) continue;\n //http://animelend.info/engine/ajax/comments.php?cstart=2&news_id=5555&skin=animelend\n $url = sprintf('%s/engine/ajax/comments.php?cstart=%d&news_id=%d&skin=animelend',env('BASE_URL_ANIMELAND'), $i, $movieId);\n\n $response_json = Cache::remember(md5($url), env('PAGE_CACHE_MIN'), function () use ($url) {\n $client = new Client();\n $response = $client->get($url);\n $responseUtf8 = mb_convert_encoding($response->getBody(true), 'utf-8', 'cp1251');\n $response_json = json_decode($responseUtf8, true);\n return $response_json;\n });\n //parse comment page\n $html = new Htmldom($response_json['comments']);\n foreach ($html->find('div[id^=comment-id]') as $comment_item) {\n $tmpId = explode('-', $comment_item->id);\n $commentId = array_pop($tmpId);\n\n $body_text = $comment_item->find('div[id^=comm-id]', 0)->plaintext;\n $comment = array(\n 'comment_id' => $commentId,\n 'date' => $comment_item->find('.comhead ul>li.first', 0)->plaintext,\n 'author' => $comment_item->find('h3 a', 0)->plaintext,\n 'body' => trim($body_text),\n 'avatar' => $comment_item->find(\".avatarbox > img\", 0)->src\n );\n array_push($comments, $comment);\n }\n }\n\n //get movie from db\n $movie = Movie::firstOrCreate(['movie_id' => $movieId]);\n /*$info = is_object($movie->info) ? $movie->info : new \\stdClass();\n $info->comments = isset($info->comments) ? $info->comments : new \\stdClass();\n $info->comments->list = $comments;\n $movie->info = $info;\n $movie->save();*/\n\n return response()->json(array(\n 'status' => 'success',\n 'count' => $movie->info->comments->count,\n 'list' => $comments,\n ), 200);\n }", "title": "" }, { "docid": "c2fb65b604a7326cfba572668258e2f8", "score": "0.58038116", "text": "public function comments()\n {\n return $this->hasMany(Comments::class, 'card_id', 'id');\n }", "title": "" }, { "docid": "f75f53fd4fced7bfcd70e723f8e8e21c", "score": "0.58035237", "text": "public function getComments($eventid) {\n\t\t$this->getcount = $this->getCommentsCount($eventid);\n\t\t\n\t\tif($this->getcount != 0) {\n\t\t\n\t\t\t$sql=\"SELECT `e`.`title`,\n\t\t\t\t\t\t`c`.`page`,\n\t\t\t\t\t\t`c`.`pageid`,\n\t\t\t\t\t\t`c`.`comment`,\n\t\t\t\t\t\t`c`.`user`,\n\t\t\t\t\t\t`c`.`status`,\n\t\t\t\t\t\t`c`.`posted`,\n\t\t\t\t\t\t`m`.`avatar`\n\t\t\t\t\tFROM `comments` `c`\n\t\t\t\t\t\tLEFT JOIN `users` `u` ON `c`.`email` = `u`.`email`\n\t\t\t\t\t\tLEFT JOIN `misc` `m` ON `m`.`userid` = `u`.`userid`\n\t\t\t\t\t\tLEFT OUTER JOIN `events` `e` ON e.id = `c`.`pageid`\n\t\t\t\t\tWHERE `c`.`page` = 'events'\n\t\t\t\t\t\tAND `c`.`pageid` = :eventid\";\n\t\t\t\n\t\t\t$rows = $this->db->selectCache('events_GetComments'.$page, $sql, array(':eventid' => $eventid));\n\t\t\t\n\t\t\tif($rows > 0) {\n\t\t\t\n\t\t\t\tforeach($rows as $key => $row) {\n\t\t\t\t\n\t\t\t\t\t$rows[$key]['postdate'] = $this->braveheart->getDateDifference($row['posted'], date('Y-m-d'));\n\t\t\t\t}\n\n\t\t\t\treturn array('comments' => $rows);\n\t\t\t}\n\t\t}\n\t}", "title": "" } ]
6f51b3cff3a21a8d1b8c700908556a63
update this user's authed state
[ { "docid": "843da756e49f8866af1535e1334e3663", "score": "0.6475376", "text": "public function setAuthed($authed) {\n $this->isAuthed = $authed;\n }", "title": "" } ]
[ { "docid": "fd506a60bdb3ae3bb8464a5f120d3568", "score": "0.72601795", "text": "private function update(){\n\t\t$info = session_info($this->sessionID);\n\t\t$uid = $info['user_id'];\n\t\t$this->user = User::loadByID($uid);\n\t}", "title": "" }, { "docid": "0a2f0d5220cbcd85450189732e4b6bf3", "score": "0.7169165", "text": "private function update() {\n $user = $this->getUser()->getUsername();\n\n //LastLogin darf nicht aktualisiert werden!\n $lastlog = $this->getUser()->getLastLogin();\n\n $this->setUser(Application::getApplicationRoot()->getUserDAO()->getUserByUsername($user));\n\n //Setzt Lastlogin zurück!\n $this->getUser()->setLastLogin($lastlog);\n\n }", "title": "" }, { "docid": "9c331fe7cc80f9ca9c6c6bd78bf6ed2b", "score": "0.70506835", "text": "public function updateUser()\n {\n }", "title": "" }, { "docid": "e52d9e6e85f3f72b03393bab2e6a0395", "score": "0.6924698", "text": "public function userUpdated();", "title": "" }, { "docid": "aefcc3190080f638c7f61ba1fc620929", "score": "0.6921599", "text": "private final function updateUserInDatabase() {\r\n //there is actually nothing what we want to update..\r\n //maybe we set an callback liveupdates for the user data fields!\r\n }", "title": "" }, { "docid": "12e5023e3342fb0da56d59bfbb88562d", "score": "0.68923277", "text": "private function redact_user()\n {\n $this->o_users->update();\n }", "title": "" }, { "docid": "ecfaccab85fc3c36417b2a6730fabae0", "score": "0.6817758", "text": "function user_update($obj) {\r\n\t\t$this->user->update($obj);\r\n\t}", "title": "" }, { "docid": "2011476ba2d71c1d323a0dbbd4006e32", "score": "0.6804979", "text": "public function activateUser()\n {\n\n $this->set(\n array(\n 'activation_token' => null,\n 'active' => '1',\n 'modified' => time()\n )\n );\n\n $this->save();\n }", "title": "" }, { "docid": "5be481075374af204abb327652c21066", "score": "0.66689473", "text": "public function testUpdate()\n {\n $id = $this->tester->grabRecord('common\\models\\Curtidas', ['id_user'=>1]);\n $user = Curtidas::findOne($id);\n $user->status = 1;\n $user->update();\n $this->tester->seeRecord('common\\models\\Curtidas', ['id_user' => 1,'status'=> 1]);\n }", "title": "" }, { "docid": "6e1ee5648982c3f30a98dd6013eb9560", "score": "0.6663057", "text": "public function refreshUser(): void;", "title": "" }, { "docid": "ba1f59e73c55bab9df353a670b3b7851", "score": "0.65748924", "text": "public function updateAuthedUser(IAuthedUser $user)\n {\n $this->_authedUser = $user;\n $this->_setLoginCookie($user);\n return true;\n }", "title": "" }, { "docid": "5be5884c55d60c2199a4d10acfe48675", "score": "0.6559363", "text": "public function update()\n {\n $data = [\n 'first_name' => \"Code\",\n 'last_name' => \"Gorilla\",\n 'email' => \"[email protected]\",\n 'password' => \"q3234234q3213^^!^w23123\",\n 'birthday' => \"1990-12-31\",\n 'created' => date(\"Y-m-d H:i:s\"),\n ];\n\n UserModel::update($data, 1);\n }", "title": "" }, { "docid": "3858d59d2640caba1d19e1187d3e96da", "score": "0.6487027", "text": "public function update()\n\t{\n\t\t$this->user->db_update();\n\t}", "title": "" }, { "docid": "11cd288ff1c8fc498ce7d8e848f9dd69", "score": "0.64750564", "text": "function update() {\n\t\tglobal $db;\n\t\t\n\t\tif ($this->id == NULL) { // insert the user\n\t\t\t$c = 0;\n\t\t\t$query = \"INSERT INTO {$this->table_name} SET\";\n\t\t\tforeach ($this->info as $key=>$value) {\n\t\t\t\t$c++;\n\t\t\t\t$query.= \" {$key}='{$value}'\". ($c != count($this->info) ? \",\" : \"\");\n\t\t\t}\n\t\t\t\n\t\t\t$db->query($query, __file__, __line__);\n\t\t\t\n\t\t\t$this->id = $db->insert_id;\n\t\t\t\n\t\t} else { // update the user\n\t\t\t\n\t\t\t$c = 0;\n\t\t\t$query = \"UPDATE {$this->table_name} SET \";\n\t\t\tforeach ($this->altered as $key=>$value) {\n\t\t\t\t$c++;\n\t\t\t\t$query.= \" {$key}='{$value}'\". ($c != count($this->altered) ? \",\" : \"\");\n\t\t\t}\n\t\t\t$query .= \" WHERE id = \".$this->id;\n\t\t\t\n\t\t\t$db->query($query, __file__, __line__);\n\t\t\t\n\t\t}\n\t\t\n\t\t// clear altered rows\n\t\t$this->altered = array();\n\t}", "title": "" }, { "docid": "7864fe4e15845e17a632279f8fb8166c", "score": "0.6452494", "text": "public function update():void{\n\t\t$user = $this->session->get('user');\n\n\t\t$input = $this->request;\n\t\t$this->validateEditInput($input, 'settings');\n\n\t\t// Handle password update\n\t\tif(isset($this->request['password']) && $this->request['password'] != '' && isset($this->request['confirmPassword'])){\n\t\t\t$user->setPassword($this->pass_hash($input['password']));\n\t\t}\n\t\t// Handle name updated\n\t\tif($input['firstName'].' '.$input['lastName'] != $user->getFirstName().' '.$user->getLastName()){\n\t\t\t$user->setFirstname($input['firstName']);\n\t\t\t$user->setLastName($input['lastName']);\n\t\t}\n\n\t\t$this->userRepository->save($user);\n\n\t\t// Update user in the session\n\t\t$this->session->add('user', $user);\n\n\t\t// Handle email updated\n\t\tif($input['email'] != $user->getEmail()){\n\t\t\t// Check if email addr is already in use\n\t\t\tif($this->userRepository->get('email',$input['email']) !== NULL){\n\t\t\t\t$this->session->flashMessage('danger', 'This email address is already in use.');\n\t\t\t\tRedirect::toControllerMethod('Account', 'settings');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// send Email\n\t\t\t$emailHandler = new Email();\n\t\t\t$emailHandler->sendEmailUpdateConfirm($input['email'],$user->getEmail());\n\t\t\t$this->session->flashMessage('success', 'A confirmation email has been sent to '.$input['email'].'. Please confirm to update.');\n\t\t\tRedirect::toControllerMethod('Account', 'settings');\n\t\t\treturn;\n\t\t}\n\n\t\t$this->session->flashMessage('success', 'Your account has been updated. Return to <a href=\"/Account/dashboard/\">Dashboard</a>.');\n\t\tRedirect::toControllerMethod('Account', 'settings');\n\n\t}", "title": "" }, { "docid": "6d1f022b26b603de97d6b8e21ca77feb", "score": "0.6448471", "text": "public function testUpdateUserAsAuthenticatedUser()\n {\n $recent_user = User::orderBy('user-id', 'desc')->first();\n $response = $this->actingAs($recent_user, 'api')->json('PATCH', '/api/v1/users/'.$recent_user->{'user-id'}, ['name' => 'Test', 'surname' => 'Account', 'email' => '[email protected]']);\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "622921d30e24850c8c4eb1c56d7e0c40", "score": "0.63901573", "text": "function activateUser(){\n\t\t\n\t\tif(!empty($this->data['Admin']['id'])){\n\t\t\t$existingStatus = $this->User->find('first', array('conditions' => array('User.id' => $this->data['Admin']['id'])));\n\t\t\t$status = $existingStatus['User']['status'];\n\t\t\tif($status == 1){\n\t\t\t\t$finalStatus = 0;\n\t\t\t}else{\n\t\t\t\t$finalStatus = 1;\n\t\t\t}\n\t\t\t$this->User->id = $this->data['Admin']['id'];\n\t\t\t$data['User']['status'] = $finalStatus;\n\t\t\tif($this->User->save($data)){\n\t\t\t\techo $data['User']['status']; \n\t\t\t\tdie;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "c5f2e38b0f61dfb295cffece58fa3ba2", "score": "0.6380421", "text": "function update_user_state(){\n if (get_post('logout')){\n logout();\n print_error_message(\"logged out\");\n unset_post('logout');\n }\n elseif (get_post('login')){\n login();\n unset_post('login');\n print_message(\"logged in\");\n }\n elseif(get_post(\"change_dj_name\")){\n change_dj_name();\n }\n }", "title": "" }, { "docid": "0ea5e6ed87b1e1bb9bf108a0d2aa9ec8", "score": "0.6379735", "text": "public function update() {\n\t\t\t$table = \"test_user\";\n\t\t\t\n\t\t\t$user[\"username\"] = $this->getName();\n\t\t\t$user[\"firstname\"] = $this->getFirstName();\n\t\t\t$user[\"lastname\"] = $this->getLastName();\n\t\t\t$user[\"city\"] = $this->getCity();\n\t\t\t$user[\"state\"] = $this->getState();\n\t\t\t$user[\"zip\"] = $this->getZip();\n\t\t\t$user[\"phone\"] = $this->getPhone();\n\t\t\t$user[\"email\"] = $this->getEmail();\n\t\t\t\n\t\t\t$condition = array('id' => $this->getID());\n\t\t\t\n\t\t\t$this->getDBConn()->update($table, $user, $condition);\n\t\t}", "title": "" }, { "docid": "d73c9886c8cf57904e8bdac87b2380a4", "score": "0.63414204", "text": "public function activateUser(){\n\n\t\tglobal $db;\n\n\t\t$db->SQL = \"UPDATE ebb_users SET active='1' WHERE Username='\".$this->user.\"' LIMIT 1\";\n\t\t$db->query();\n\t}", "title": "" }, { "docid": "d420784c0d2f1c9be5a2c4e68e6dc905", "score": "0.63304275", "text": "function update() {\n if (!$this->classes['auth']->validateFormToken('editToken', $_POST['token'])) {\n header(\"location: http://{$_SERVER['SERVER_NAME']}/mailmaid/account\");\n die();\n }\n if (($this->classes['auth']->checkLevel() == 2) && ($this->classes['auth']->getId() != $_POST['editId'])) {\n header(\"location: http://{$_SERVER['SERVER_NAME']}/mailmaid/account\");\n die();\n }\n $update = array();\n if (!empty($_POST['username']) && !$this->classes['auth']->checkUserExist($_POST['username'])) {\n $update['username'] = $_POST['username'];\n }\n if (!empty($_POST['password'])) {\n $update['password'] = password_hash($_POST['password'], PASSWORD_DEFAULT);\n }\n if (!empty($_POST['role'])) {\n $update['level'] = $_POST['role'];\n }\n $db = $this->classes['db'];\n $db->update('users', $update);\n $db->where('id', '=', $_POST['editId']);\n $db->execute();\n $db->reset();\n header(\"location: http://{$_SERVER['SERVER_NAME']}/mailmaid/account\");\n }", "title": "" }, { "docid": "83d681fa937d19da87dcfde0f6da427c", "score": "0.632356", "text": "private function touchUserLastActive()\n {\n if (WebRequest::getSessionUserId() !== null) {\n $query = 'UPDATE user SET lastactive = CURRENT_TIMESTAMP() WHERE id = :id;';\n $this->getDatabase()->prepare($query)->execute(array(\":id\" => WebRequest::getSessionUserId()));\n }\n }", "title": "" }, { "docid": "c1c1413da2b3e483e4bd1e297535e066", "score": "0.6290638", "text": "public function putActivateUser()\n\t{\n\t\t$user = Emp::find(Input::get('actEmpId'));\n\t\t$user->active = 1;\n\t\t$user->save();\n\n\t\treturn Redirect::route('user_data')\n\t\t->with('message', 'Bruker '.$user->user_name.' aktivert.');\n\t}", "title": "" }, { "docid": "b0ce6bbef7c44e0bdc867b6d9cd60105", "score": "0.6261852", "text": "function sync_user()\n\t{\n\t\t$this->sync();\n\t}", "title": "" }, { "docid": "391d3e63411b3ba3f89cc4a14858cb72", "score": "0.6244314", "text": "public function update()\n {\n return $this->table('user')->where(['id'=>1])->update(['status'=>1, 'name'=>'illu']);\n }", "title": "" }, { "docid": "e12b0113bdeb5b2f2b58f81b839cab4d", "score": "0.62348247", "text": "public final function refreshUser() {\r\n $this->getUserDataFromFB();\r\n }", "title": "" }, { "docid": "254b3a27b60a2c944070d00d5046351d", "score": "0.62058854", "text": "protected function syncUser():void\n {\n if(!$this->isUserSynched())\n {\n $sync = false;\n $userUid = $this->userUid();\n $userPermission = $this->userPermission();\n $class = $this->getUserClass();\n\n if(is_int($userUid))\n {\n $user = $class::findByUid($userUid);\n\n if(!empty($user) && $user->permission() === $userPermission)\n {\n $this->triggerUser($user);\n $sync = true;\n }\n }\n\n if($sync === false)\n $this->logout();\n }\n }", "title": "" }, { "docid": "5843fac3bf61ad143dec4fe38210fee4", "score": "0.61950463", "text": "function profile_update() {\n\t\t\t$current_user = wp_get_current_user();\n\t\t\tif ( ! $current_user->ID ) {\n\t\t\t\tthrow new Exception( 'Janrain Capture: Must be logged in to update profile' );\n\t\t\t}\n\t\t\t$user_id = $current_user->ID;\n\t\t\t$api = new JanrainCaptureApi();\n\t\t\t$user_entity = $api->load_user_entity();\n\t\t\tif ( is_array( $user_entity ) ) {\n\t\t\t\tif ( ! $api->update_user_meta( $user_id ) ) {\n\t\t\t\t\tthrow new Exception( 'Janrain Capture: Failed to update user meta' );\n\t\t\t\t}\n\t\t\t\t$user_entity = $user_entity['result'];\n\t\t\t\tdo_action( self::$name . '_user_entity_loaded', $user_entity );\n\t\t\t\tif ( ! $this->update_user_data( $user_id, $user_entity ) ) {\n\t\t\t\t\tthrow new Exception( 'Janrain Capture: Failed to update user data' );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Exception( 'Janrain Capture: Could not retrieve user entity' );\n\t\t\t}\n\t\t\techo '1';\n\t\t\tdie();\n\t\t}", "title": "" }, { "docid": "a2af73cf3b043037ceef5e01d1142bbf", "score": "0.6186397", "text": "protected function populateState() \r\n\t{\r\n\t\t$input = JFactory::getApplication()->input;\r\n\t\t$user_id = $input->getInt('id');\r\n\t\t$this->setState('user.id', $user_id);\r\n\t\tparent::populateState();\r\n\t}", "title": "" }, { "docid": "09673aa0db5bfec51ad6a60d1a1cbf68", "score": "0.6182391", "text": "public function updateUserStatus($userId, $status) {\r\n $this->user->update(array('activated' => $status), \"id = $userId\");\r\n\t}", "title": "" }, { "docid": "4a139028980dea4ed895a4ebf20182dc", "score": "0.61646855", "text": "public function testUpdateUser()\n {\n $this->markTestIncomplete(\n 'Test of \"updateUser\" method has not been implemented yet.'\n );\n }", "title": "" }, { "docid": "e0ad0bf1a6b854353b0bcb944b6c8237", "score": "0.61487514", "text": "private function updateUser()\n {\n $databaseAdapter = new Database();\n $userMapper = new UserMapper($databaseAdapter);\n $session = Singleton::getInstance(\"Session\");\n\n if($this->view->getUsername() == \"\")\n $username = $session->getUsername();\n else\n {\n $username = $this->view->getUsername();\n }\n\n if($this->view->getUserEmail() == \"\")\n $email = $session->getUserEmail();\n else\n $email = $this->view->getUserEmail();\n\n if($this->view->getUserPassword() == \"\")\n $password = $session->getUserPassword();\n else\n $password = $this->view->getUserPassword();\n\n $image = $this->Upload();\n\n if($image == \"\")\n $image = $session->getUserImage();\n\n\n if($image != $session->getUserImage() && $image != \"Data/profile_images/default_profile_image.gif\")\n unlink($session->getUserImage());\n\n if($userMapper->updateUser($session->getUserId(), $username, $email, $image, $password))\n {\n $session->updateUser($username);\n $this->view->responseAjaxCall(true);\n }else {\n $this->view->responseAjaxCall(false);\n }\n }", "title": "" }, { "docid": "26e526581a3acc9b67654969ca096719", "score": "0.61427534", "text": "public function update_active()\n {\n if(!isset($_SESSION['last_created']))\n {\n $_SESSION['last_created'] = time();\n }\n else if(time() - $_SESSION['last_created'] > 600)\n {\n $_SESSION['last_created'] = time();\n session_regenerate_id();\n }\n\n\n // Logout after 60 mins of inactivity\n if(isset($_SESSION['last_active']) && time() - $_SESSION['last_active'] > 3600)\n {\n $this->signout();\n }\n $_SESSION['last_active'] = time();\n }", "title": "" }, { "docid": "14853c08eb26bf02cf026663a455bfd8", "score": "0.6135122", "text": "public function update()\n {\n try {\n \n $this->command()->update(\n $this->id,\n $this->user->toData()\n );\n \n return true;\n \n } catch (\\Exception $e) {\n \n throw $e;\n \n }\n }", "title": "" }, { "docid": "7d6f61bc506d53da035fd881bd472cc7", "score": "0.61340123", "text": "protected function _refreshAuth() {\n\t\tif (isset($this->User)) {\n\t\t\t$user = $this->User->read(false, $this->Auth->user('id'));\n\t\t} else {\n\t\t\t$this->loadModel('User');\n\t\t\t$this->User->recursive = -1;\n\t\t\t$user = $this->User->findById($this->Auth->user('id'));\n\t\t}\n\t\t$this->Auth->login($user['User']);\n\t}", "title": "" }, { "docid": "621e0ca1d3e2d04e45060850fbfad120", "score": "0.61237484", "text": "public function actionUpdate()\n {\n foreach ($this->body as $k => $value) {\n $this->user->$k = $value;\n }\n if ($this->user->update()) {\n $this->answer = true;\n $this->message = ErrorType::answer_true_update[$this->locale];\n } else {\n $this->message = $this->user->errors;//'update false';\n $this->error = true;\n }\n\n }", "title": "" }, { "docid": "20acfd20977e7ff5fa39a1d8b6d80b77", "score": "0.6116093", "text": "function UpdateCurrentUserData() {\n\t\tglobal $user;\n\t\tif(! (int) $this->m_userId){\n\t\t\treturn array(\n\t\t\t\t'err_cnt' => 1,\n\t\t\t\t'err_msgs' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'err_msg' => getstr('global.onlyLoggedUsersCanPerformThisAction')\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\t$this->InitUserModel();\n\t\t$lUserData = $this->m_models['user_model']->GetUserData($this->m_userId);\n\t\t$user = new mUser($lUserData);\n\t\t$_SESSION['suser'] = serialize($user);\n\t\t$this->m_user = $user;\n\t}", "title": "" }, { "docid": "85f0af5abc252fb4eb7016f57707637f", "score": "0.6114201", "text": "public function activate () {\n\t\tif (!$this->is_id($this->id)) {\n\t\t\tadd_error(\"could_not_find_user\");\n\t\t\treturn false;\n\t\t}\n\t\tif ($this->id == $_SESSION['user_id']) {\n\t\t\treturn false;\n\t\t}\n\t\treturn $this->db_update(\"UPDATE users SET active=1 WHERE id=%d\", array($this->id));\n\t}", "title": "" }, { "docid": "abba9806c9948c22dd044c9cac434b2a", "score": "0.6096072", "text": "public function updateSession()\n {\n if (!isset($_SESSION)) {\n session_start();\n }\n $_SESSION['user'] = $this;\n }", "title": "" }, { "docid": "b75c72f7dfbeaacb4a60b760790ffd6c", "score": "0.60953987", "text": "public function update()\n {\n if (isset($_GET['userId']) && isset($_POST['login']) && isset($_POST['password']) && isset($_POST['email'])) {\n $hashPassword = password_hash($_POST['password'], PASSWORD_DEFAULT);\n \n $affectedUser = $this->usersManager->setChangedUser($_GET['userId'], $_POST['firstName'], $_POST['lastName'], $_POST['login'], $hashPassword, $_POST['email'], $_POST['role']);\n \n if($affectedUser === false) {\n throw new Exception(\"Impossible de mettre à jour l\\'utilisateur !\");\n } else {\n header('Location: admin.php?url=users');\n exit();\n }\n } else {\n throw new Exception($this->actionError);\n }\n\n }", "title": "" }, { "docid": "166f35ba85944c8dade2b99fc3998643", "score": "0.6085601", "text": "public function updateUser(&$user) {\r\n return true;\r\n }", "title": "" }, { "docid": "f9af746a617bde763686b71bbe3d73a4", "score": "0.60784173", "text": "public function updateLastSeen()\n {\n if (authCheck()) {\n $this->builder->where('id', user()->id)->update(['last_seen' => date('Y-m-d H:i:s')]);\n }\n }", "title": "" }, { "docid": "6ba458f6d82257f9e207fa2795886b3a", "score": "0.60656035", "text": "private function updateUser()\t{\n\t\t$userObj = VCDUtils::getCurrentUser();\n\t\t\n\t\t$fullname = $this->getParam('name',true);\n\t\t$email = $this->getParam('email',true);\n\t\t$password = $this->getParam('password',true);\n\t\t\n\t\tif (is_null($fullname) || strlen($fullname)<3) {\n\t\t\tthrow new VCDInvalidInputException('Your name cannot be empty');\n\t\t}\n\t\t\n\t\tif (!preg_match( \"/^([a-zA-Z0-9])+([a-zA-Z0-9._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9._-]+)+$/\", $email)) {\n\t\t\tthrow new VCDInvalidInputException('Invalid email.');\n\t\t}\n\t\t\n\t\tif (!is_null($password)) {\n\t\t\tif (strlen($password) < 5) {\n\t\t\t\tthrow new VCDInvalidInputException('Your password must be at least 4 characters.');\n\t\t\t}\n\t\t\tif ($userObj->isDirectoryUser()) {\n\t\t\t\tthrow new VCDConstraintException('Password cannot be changed for Directory authenticated users.');\n\t\t\t}\n\t\t\t\n\t\t\t// new password seems ok .. update it\n\t\t\t$userObj->setPassword(md5($password));\t\n\t\t} \n\t\t\n\t\t// Everything seems ok .. update the user data\n\t\t$userObj->setName($fullname);\n\t\t$userObj->setEmail($email);\n\t\t\n\t\t// Check for properties\n\t\t$userObj->flushProperties();\n\t\t\n\t\t$properties = $this->getParam('property',true);\n\t\tif (is_array($properties) && sizeof($properties) > 0) {\n\t\t\tforeach ($properties as $property_id) {\n\t\t\t\t$userObj->addProperty(UserServices::getPropertyById($property_id));\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (UserServices::updateUser($userObj)) {\n\t\t\t// update the user in session as well\n\t\t\t$_SESSION['user'] = $userObj;\n\t\t\tVCDUtils::setMessage(\"(\".VCDLanguage::translate('usersettings.updated').\")\");\n\t\t} else {\n\t\t\tVCDUtils::setMessage(\"(\".VCDLanguage::translate('usersettings.update_failed').\")\");\n\t\t}\n\t\t\n\t\tredirect('?page=settings');\n\t\t\n\t}", "title": "" }, { "docid": "5ea39ee10b141a745bb238038580ae06", "score": "0.6065165", "text": "public function updateUser(){\n $pdo = new DBConfig();\n $pdo = $pdo->get_connect();\n $query = \"UPDATE tbl_user SET username = '\".$this->username.\"',email = '\".$this->email.\"',password = '\".$this->password.\"',area = '\".$this->area.\"',is_group = \".$this->is_group.\",avatar = \".$this->avatar.\" WHERE username = '\".$this->username.\"';\";\n $result = $pdo->query($query);\n }", "title": "" }, { "docid": "61bcd035d00d91fd44e8e9c58c6d4c1f", "score": "0.6058836", "text": "public function setLastOnline()\n {\n $user = $this->getUser(false);\n \n if ($user === null) {\n return;\n }\n \n // 1 hour timeout so we are not constantly updating this user\n $timeout = time() - (60 * 60);\n \n if ($user->getLastOnline() < $timeout) {\n $user->setLastOnline(time());\n $this->em->persist($user);\n $this->em->flush();\n }\n }", "title": "" }, { "docid": "c038d3d3d79bac74e36b3827fe4f9f24", "score": "0.605541", "text": "public function actionUpdate()\n {\n $user = $this->loadModel(Yii::app()->user->id, 'YdUser');\n $user->scenario = 'account';\n\n if (isset($_POST['YdUser'])) {\n $user->attributes = $_POST['YdUser'];\n if ($user->save()) {\n Yii::app()->user->addFlash('Your account has been saved.', 'success');\n $this->redirect(Yii::app()->returnUrl->getUrl(array('/account/index')));\n }\n }\n\n $this->render('update', array(\n 'user' => $user,\n ));\n }", "title": "" }, { "docid": "2e150e505a57f40592e535cfcdfb7fc9", "score": "0.60426414", "text": "public function action_update_user()\n\t{\n\t\t/*\n\t\t * KEY OPTIONS\n\t\t * \n\t\t * name\n\t\t * email\n\t\t * blog\n\t\t * company\n\t\t * location\n\t\t */\n\t\t$array = array(\n\t\t\t\t\t\t'name' => 'Testing API',\n\t\t\t\t\t\t'location' => 'Kohanaville',\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t$this->g->update_user($array);\n\t}", "title": "" }, { "docid": "84691e96d861c1cceff729b1c94147a2", "score": "0.6042548", "text": "public function changeUserStatusAction(){\n\t\t$this->users->changeUserStatus($this->_getParam('id'));\n\t\t$user = $this->users->getUserById($this->_getParam('id'));\n\t\techo (int)$user['active']; \t\n }", "title": "" }, { "docid": "39f68ab74de83d84ef87b11f5cb666d1", "score": "0.6041956", "text": "public function update(): void\n {\n if (!$this->helper->isLoggedIn()) {\n header('location: ' . URL_ROOT . '/errorPages/restricted');\n return;\n }\n $id = func_get_args();\n if (empty($id)) {\n header('location: ' . URL_ROOT . '/errorPages/internalError');\n return;\n }\n $id = (int) $id[0];\n if (!$this->helper->isAdmin() && $_SESSION['id'] != $id) {\n header('location: ' . URL_ROOT . '/errorPages/restricted');\n return;\n }\n $data =\n [\n 'redirect' => $_POST['redirect'] ?? $_SERVER['HTTP_REFERER'] ?? URL_ROOT,\n 'usernameError' => '',\n 'emailError' => '',\n 'passwordError' => '',\n 'registrationDateError' => '',\n 'roleError' => '',\n 'lastLoginError' => '',\n 'dateBannedError' => ''\n ];\n $user = $this->model->getUserById($id);\n if (empty($user)) {\n header('location: ' . URL_ROOT . '/errorPages/notFound');\n return;\n }\n\n if ($_SERVER['REQUEST_METHOD'] === 'POST') {\n $updatedUser = clone $user;\n $passwordChange = false;\n $registrationDateChange = false;\n $lastLoginChange = false;\n $dateBannedChange = false;\n\n // extremely cursed way of doing this\n $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n $data['username'] = strtolower(trim($_POST['username']));\n $data['email'] = strtolower(trim($_POST['email']));\n $data['password'] = trim($_POST['password']);\n $data['registrationDate'] = trim($_POST['registrationDate'] ?? $user->registrationDate);\n $data['role'] = trim($_POST['role']?? $user->role);\n $data['lastLogin'] = trim($_POST['lastLogin'] ?? $user->lastLogin);\n $data['banned'] = (isset($_POST['banned']) ? 1 : 0 ?? $user->banned); // TODO: bad workaround for when banned doesn't exist\n $data['dateBanned'] = trim($_POST['dateBanned'] ?? $user->dateBanned);\n\n unset($_POST['username']);\n unset($_POST['email']);\n unset($_POST['password']);\n unset($_POST['registrationDate']);\n unset($_POST['role']);\n unset($_POST['lastLogin']);\n unset($_POST['dateBanned']);\n unset($_POST['banned']);\n\n // case when the user wishes to change the password\n if (!empty($data['password'])) {\n $passwordChange = true;\n }\n if (!empty($data['registrationDate'])) {\n $registrationDateChange = true;\n }\n if (!empty($data['lastLogin'])) {\n $lastLoginChange = true;\n }\n if (!empty($data['dateBanned'])) {\n $dateBannedChange = true;\n }\n\n $data['usernameError'] = $this->helper->validateUsername($data['username']);\n if ($this->helper->checkDuplicateUsername($data['username'], $this->model) && $data['username'] !== strtolower($user->username)) {\n $data['usernameError'] .= ' is already taken. ';\n }\n\n $data['emailError'] = $this->helper->validateEmail($data['email']);\n if ($this->helper->checkDuplicateEmail($data['email'], $this->model) && $data['email'] !== strtolower($user->email)) {\n $data['emailError'] .= ' is already taken. ';\n }\n\n // if the user wishes to change the password\n if ($passwordChange) {\n $data['passwordError'] = $this->helper->validatePassword($data['password']);\n }\n $data['registrationDateError'] = $this->helper->validateDate($data['registrationDate']);\n $data['roleError'] = $this->helper->validateRole($data['role']);\n $data['lastLoginError'] = $this->helper->validateDate($data['lastLogin']);\n $data['dateBannedError'] = $this->helper->validateDate($data['dateBanned']);\n\n if (\n empty($data['usernameError'])\n && empty($data['emailError'])\n && empty($data['passwordError'])\n && empty($data['registrationDateError'])\n && empty($data['roleError'])\n && empty($data['lastLoginError'])\n && empty($data['dateBannedError'])\n ) {\n\n if ($passwordChange) {\n $data['password'] = password_hash($data['password'], PASSWORD_DEFAULT);\n $updatedUser->password = $data['password'];\n }\n if ($registrationDateChange) {\n $updatedUser->registrationDate = $data['registrationDate'];\n }\n if ($lastLoginChange) {\n $updatedUser->lastLogin = $data['lastLogin'];\n }\n if ($dateBannedChange) {\n $updatedUser->dateBanned = $data['dateBanned'];\n }\n\n $updatedUser->username = $data['username'];\n $updatedUser->email = $data['email'];\n $updatedUser->role = $data['role'];\n $updatedUser->banned = $data['banned'];\n\n $this->model->updateUser($updatedUser);\n\n header('location: ' . URL_ROOT . '/users/profile/' . $updatedUser->id);\n return;\n }\n }\n $this->view->render('users/update', ['user' => $user, 'data' => $data]);\n }", "title": "" }, { "docid": "c708f19b4bbb8c34d4238549a1100a7f", "score": "0.6041524", "text": "public function update_user() {\n $user = $_POST['user'];\n $user['id'] = $_SESSION['id'];\n $ret = $this->user_model->update_user($user);\n $this->helper_functions->post_success_of_fail($ret);\n }", "title": "" }, { "docid": "0c7bdd837ecfe9f862ca61805f05115f", "score": "0.60384923", "text": "public function refreshUser()\n {\n $user = $this->getUser();\n\n if (!$user->get('id'))\n {\n // user must be logged in to be able to refresh itself\n return false;\n }\n\n $user->load($user->get('id'));\n $this->setUser($user);\n\n return true;\n }", "title": "" }, { "docid": "0e4918d399f20137b5a70832bf3bd97b", "score": "0.6026243", "text": "public function loggedIn(): void\n {\n $this->last_login_at = $this->freshTimestamp();\n $this->save();\n }", "title": "" }, { "docid": "0599c6b786f27850ae0e125cfc273cdf", "score": "0.6021978", "text": "public function changeState(Request $request)\n {\n if (!$request->ajax()) return redirect('/');\n $user = User::findOrFail($request->id);\n if ($user->state == '1') {\n $user->state = '0';\n } else {\n $user->state = '1';\n }\n $user->save();\n }", "title": "" }, { "docid": "0f47c432f2e4e53452f2ad71b452c906", "score": "0.60193634", "text": "public function update()\n {\n if (!$this->user)\n return response()->json(['status' => false], 401);\n if (request('reagent_code'))\n if (!$this->user->reagentAction())\n return response()->json([\n 'status' => false,\n 'message' => config('constants.server.message.reagentCodeFailed')\n ], 203);\n if (!$profile = $this->user->profile)\n $profile = new UserProfile();\n $profile->set();\n if ($this->user->profile()->save($profile))\n return response()->json(['status' => true]);\n return response()->json(['status' => false]);\n }", "title": "" }, { "docid": "0f71a9a3250e1fee5a0f831c4892f73b", "score": "0.60117066", "text": "protected function updateAuthorizeForm()\n {\n $defult_status = $this->freshRecordState();\n\n\n if (! is_null(static::RECORD_STATE_ID) && ! $this->isDirty(static::RECORD_STATE_ID)) {\n // for create new\n if(!$this->exists)\n {\n $this->setRecordState($defult_status);\n }\n //\n else{\n\n }\n }\n }", "title": "" }, { "docid": "69647b3f3ae093b1df0cc895d2152b31", "score": "0.60114807", "text": "public function update()\n {\n $user = auth()->guard('admin')->user();\n\n $this->validate(request(), [\n 'name' => 'required',\n 'email' => 'email|unique:admins,email,' . $user->id,\n 'password' => 'nullable|min:6|confirmed',\n 'current_password' => 'required|min:6'\n ]);\n\n $data = request()->input();\n\n if (! Hash::check($data['current_password'], auth()->guard('admin')->user()->password)) {\n session()->flash('warning', trans('admin::app.users.users.password-match'));\n\n return redirect()->back();\n }\n\n if (! $data['password'])\n unset($data['password']);\n else\n $data['password'] = bcrypt($data['password']);\n\n $user->update($data);\n\n session()->flash('success', trans('admin::app.users.users.account-save'));\n\n return back();\n }", "title": "" }, { "docid": "6f1bbf5fd7882d7fdf586d363476250d", "score": "0.60112727", "text": "function user_authed() {\n\treturn;\n}", "title": "" }, { "docid": "394be098b9e9f80ec95e0e8b50eec265", "score": "0.6001015", "text": "public function preUpdate($user){\n\n }", "title": "" }, { "docid": "12776638619fc266d073cc54d1da06b7", "score": "0.59959245", "text": "public function dao_update() {\n $db = Database::getInstance();\n $stmt = $db\n ->getPdo()\n ->prepare(sprintf(\"UPDATE `%s` SET `user_id`=:user_id, `opened`=:opened, `closed`=:closed, `state`=:state WHERE `id`=:id\",\n $db->table(UserApproval::DB_TAB_USER_APPROVAL)));\n\n $id = $this->getId();\n $user_id = $this->getUser()->getId();\n $opened = $this->getOpened()->format(Database::DATE_FORMAT);\n if (empty($this->getClosed())) {\n $closed = null;\n } else {\n $closed = $this->getClosed()->format(Database::DATE_FORMAT);\n }\n $state = $this->getState();\n\n $stmt->bindParam(\":id\", $id, PDO::PARAM_INT);\n $stmt->bindParam(\":user_id\", $user_id, PDO::PARAM_STR);\n $stmt->bindParam(\":opened\", $opened, PDO::PARAM_STR);\n $stmt->bindParam(\":closed\", $closed, PDO::PARAM_STR);\n $stmt->bindParam(\":state\", $state, PDO::PARAM_INT);\n\n $stmt->execute();\n }", "title": "" }, { "docid": "92bd154a12842b8caa8e06725c194f94", "score": "0.5993911", "text": "public function updatePassword()\n\t{\n\t\t$ident = new UserIdentity($this->username, $this->passwordText);\n\t\t$md5 = $ident->makePassword();\n\t\t$this->password = $md5;\n\t\t$this->save();\n\t}", "title": "" }, { "docid": "51ce67eb236c5afaec49c98a9c5d6fbb", "score": "0.5992808", "text": "protected function updateUsers()\n {\n $user_id = $this->getAuthUserId();\n if (!$this->validUserId($user_id)) {\n return;\n }\n\n if (!$this->isDirty('updated_by')) {\n $this->updated_by = $user_id;\n }\n\n if (!$this->exists && !$this->isDirty('created_by')) {\n $this->created_by = $user_id;\n }\n }", "title": "" }, { "docid": "4f431ad746f8d9e3a7de7f3441fb709a", "score": "0.599005", "text": "public function update() {\n\t\t$currentUserUpdated = $this->lending->updateAccount($this->input->post());\n\t\t$this->session->set_userdata($currentUserUpdated);\n\t\t$this->load->view('edit');\n\t}", "title": "" }, { "docid": "71e99bb727f0fc908201d3bfd879b07c", "score": "0.5989006", "text": "private function setUser(){\n $this->user = User::load($this->account->id());\n }", "title": "" }, { "docid": "d92e702b59808b40a51d6c861b187b4c", "score": "0.59812534", "text": "function edit_user_profile_update() {\n\tglobal $user_id;\n\t\n\t$GA_enabled\t = ! empty( $_POST['GA_enabled'] );\n\t$GA_hidefromuser = ! empty( $_POST['GA_hidefromuser'] );\n\n\tif ( ! $GA_enabled ) {\n\t\t$GA_enabled = 'disabled';\n\t} else {\n\t\t$GA_enabled = 'enabled';\n\t}\n\n\tif ( ! $GA_hidefromuser ) {\n\t\t$GA_hidefromuser = 'disabled';\n\t} else {\n\t\t$GA_hidefromuser = 'enabled';\n\t}\n\n\tupdate_user_option( $user_id, 'googleauthenticator_enabled', $GA_enabled, true );\n\tupdate_user_option( $user_id, 'googleauthenticator_hidefromuser', $GA_hidefromuser, true );\n\n}", "title": "" }, { "docid": "31f14f592731ea2851b716431de95a44", "score": "0.5976685", "text": "public function update()\n\t{\n\t\t$data = array('first_name' => $_POST['first_name'], 'last_name'=> $_POST['last_name'],'email'=>$_POST['email'],'password'=>md5(sha1($_POST['password'])), 'uID'=>$_POST['uID']);\n\n\t\t$this->userObject = new User();\n\t\t$response = $this->userObject->update($data);\n\t\t$this->set('first_name',$data['first_name']);\n\t\t$this->set('last_name',$data['last_name']);\n\t\t$this->set('email',$data['email']);\n\t\t$this->set('uID',$data['uID']);\n\t\t$this->set('password', $data['password']);\n\t\t$this->set('message', $response);\n\t\t$this->set('task','update');\n\t}", "title": "" }, { "docid": "862ab2932106a32cedc7e545574fcf42", "score": "0.5974407", "text": "public function update_user() {\n\n\t\tglobal $db;\n\t\n\t\t$username = $db->real_escape_string($this->username);\n\t\t$password = $db->real_escape_string($this->password);\n\t\t$email = $db->real_escape_string($this->email);\n\t\t$settings = $db->real_escape_string($this->settings);\n\t\t$permissions = $db->real_escape_string($this->permissions);\n\t\t$active = $db->real_escape_string($this->active);\n\t\t\n\t\t$qry = \"UPDATE users SET \";\n\t\t$qry .= \"username = '{$username}', \";\n\t\t$qry .= \"password = '{$password}', \";\n\t\t$qry .= \"email = '{$email}', \";\n\t\t$qry .= \"settings = {$settings}, \";\n\t\t$qry .= \"permissions = {$permissions}, \";\n\t\t$qry .= \"active = '{$active}' \";\n\t\t$qry .= \"WHERE id = {$this->id} \";\n\t\t$qry .= \"LIMIT 1\";\n\t\t$result = $db->query($qry);\n\t\t$db->confirm_qry($result);\n\t\t\n\t\treturn $result; // just returns true. if false this function would die() before returning\n\t\t\n\t}", "title": "" }, { "docid": "29803d7ed2b480784543a617d80c2a56", "score": "0.596204", "text": "public function updateProfileContactInformation()\n {\n $this->resetErrorBag();\n $user = Auth::user();\n $user->facebook = $this->state['facebook'];\n $user->instagram = $this->state['instagram'];\n $user->save();\n $this->emit('saved');\n $this->emit('refresh-navigation-menu');\n }", "title": "" }, { "docid": "ee182ed432c70a19e7212a5dc798ca07", "score": "0.5960658", "text": "public function update(User $user);", "title": "" }, { "docid": "6d878fd66ceaa49ebb692a1079da420f", "score": "0.59567314", "text": "protected function setUserStateActive($username)\n {\n $this->dbClass->where($this->usernameColumn, $username)\n ->update($this->tableName, [$this->activeColumn => 1]);\n }", "title": "" }, { "docid": "a9fb2213c2bd9a92a6458051adc5e5be", "score": "0.5953309", "text": "public function set_auth_edit()\n {\n $form = $this->_getAuthForm();\n $worker = new \\Yana\\Forms\\Worker($this->_connectToDatabase('user_admin'), $form);\n return $worker->update();\n }", "title": "" }, { "docid": "828fbe7c162b0b3f3e585b3c5f57eae7", "score": "0.59525585", "text": "protected function authenticated(Request $request, $user) {\n SM::update_front_user_meta($user->id, 'user_online_status', 1);\n }", "title": "" }, { "docid": "f1543f946ef8d1fe47e6f2b3ca3d5fd9", "score": "0.5943212", "text": "public function complete_login()\n {\n if ($this->_loaded)\n {\n // Update the number of logins\n // $this->logins = new Database_Expression('logins + 1');\n\n // Set the last login date\n $this->last_login = time();\n\n $this->ip = Request::$client_ip;\n\n // Save the user\n $this->update();\n }\n }", "title": "" }, { "docid": "ced91b766daf2f573cb9b1b11fe0abbd", "score": "0.5939075", "text": "public function userauth() {\r\n\t\t$isaccess = 0; \r\n\t\tif(!empty($this->userid)){\r\n\t\t\t$isaccess = 1;\r\n\t\t}\r\n\t\t$this->isaccess = $isaccess;\r\n\t}", "title": "" }, { "docid": "f3a6091d82d2dffa54f687700ea1589a", "score": "0.59383106", "text": "protected function SetAdminUserStatus()\r\n {\r\n\t\tif ($this->_isAdminUser)\r\n\t\t{\r\n\t\t\t//Make sure we aren't in ReadOnly mode\r\n\t\t\t$this->_isReadOnly = false;\r\n\t\t}\r\n\r\n\t\t$this->LoadTagsList();\r\n }", "title": "" }, { "docid": "eed8d513491bc24d5ee573a22a9e1780", "score": "0.5937592", "text": "public function refreshUser(UserInterface $user)\n {\n }", "title": "" }, { "docid": "5709e4e5671109ac1da2ccd1be9ad549", "score": "0.5936014", "text": "public function save() {\n if( empty( $this->user ) ) {\n return;\n }\n\n $diff = array_diff_assoc( get_object_vars( $this->user ), get_object_vars( $this->orig ) );\n $cnt = count( $diff );\n\n if( $diff == 0 ) {\n return;\n }\n \n // add modification timestamp and rekey using the same logic\n $this->isModified = true;\n $this->modified = date( 'Y-m-d H:i:s' );\n\n $diff = array_diff_assoc( get_object_vars( $this->user ), get_object_vars( $this->orig ) );\n $cnt = count( $diff );\n \n $keys = array_keys( $diff );\n $vals = array_values( $diff );\n\n for( $i=0; $i<$cnt; $i++ ) {\n $fields[] = sprintf( \"%s=?\", $keys[$i] );\n }\n\n // build and run sql update\n $sql = 'UPDATE users SET ' . implode( ',', $fields ) . ' WHERE id = ' . $this->user->id;\n $this->db->run( $sql, $vals );\n // reload the user\n $this->load( $this->user->id );\n return true;\n }", "title": "" }, { "docid": "941207616b9897f510e55ef87268ab5f", "score": "0.5932284", "text": "public function update_user(){\n // NOTE: class MUST be instantiated and properties set first before calling!\n\n if (!$this) return false;\n\n global $db;\n\n // Retrieve class properties and place into array to build SQL statement\n $properties_to_set = $this->set_properties();\n\n // Set WHERE condition to id = $this->id so only 1 record affected\n $conditions = [User::get_table_prefix() . \"id\" => $this->user_id];\n\n if (!$sql = $db->build_update(\n User::get_table_name(),\n $properties_to_set,\n $conditions,\n 1)) return false;\n \n return $db->query($sql);\n }", "title": "" }, { "docid": "d4a607dfaf1c80a177677191a37a9498", "score": "0.5929848", "text": "abstract public function update($user);", "title": "" }, { "docid": "7fa4b5e9bf075b2c82c9b270bfed2494", "score": "0.5927579", "text": "public function userActivate(Request $request)\n {\n User::find($request->input('user_id'))->update(['active' => !$request->input('active')]);\n\n return back()->with('message', 'Benutzer erfolgreich aktualisiert.')->with('mandantChanged', $request->get('mandant_id'));\n }", "title": "" }, { "docid": "41af62d3e904262600352001ab538b07", "score": "0.5924404", "text": "private function update()\n {\n $query = 'UPDATE users SET password = :password WHERE id = :id';\n\n $dbh = \\App\\Database::getInstance();\n $stmt = $dbh->prepare($query);\n $stmt->bindValue(':password', $this->password, \\PDO::PARAM_STR);\n $stmt->bindValue(':id', $this->id, \\PDO::PARAM_INT);\n $stmt->execute();\n }", "title": "" }, { "docid": "de73cc01029e7fce589abc9e7380a711", "score": "0.5923165", "text": "public function active_user($user_id)\n {\n $publication_status_value=\"1\";\n $update=DB::update(\"UPDATE tbl_user SET publication_status='$publication_status_value' WHERE user_id='$user_id'\");\n\n return redirect('/all-user');\n }", "title": "" }, { "docid": "f04200fb9f812501f9373d00e31548ae", "score": "0.592071", "text": "public function afterProlong()\n {\n $extra = $this->_adminUser->getExtra();\n if(isset($extra['configState'])){\n $extra['configState']['last_activity'] = $this->_date->timestamp();\n $extra['configState']['last_active_ip'] = $this->_remoteAddress->getRemoteAddress();\n }\n\n $this->_adminUser->setExtra($extra)->save();\n }", "title": "" }, { "docid": "9f58dd436ef163383a2c6e1358141c36", "score": "0.59195113", "text": "private function update_users() {\n\t\t\t$users = get_users();\n\t\t\tforeach ( $users as $user ) {\n\t\t\t\t$this->connection->hmSet(\n\t\t\t\t\t'user:' . $user->ID,\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'user_id' => $user->ID,\n\t\t\t\t\t\t'login' => $user->data->user_login,\n\t\t\t\t\t\t'display_name' => $user->data->display_name,\n\t\t\t\t\t\t'email' => $user->data->user_email,\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "d7c31c4995d018fb3b245bb793feda51", "score": "0.5909053", "text": "public function updateRememberToken(UserInterface $user, $token)\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "0b4e867d0c922f1ecd507d4b582c0728", "score": "0.59087527", "text": "public function changeAdminStatus()\n\t{\n\t\t$user_id = Input::get('user');\n\t\t$status = Input::get('status');\n\n\t\t$user = User::find($user_id);\n\n\t\t$admin = ($status === 'yes') ? 1 : null;\n\t\t$user->admin = $admin;\n\t\t$user->save();\n\n\t\tSession::put('logged_in_user', $user);\n\n\t\treturn json_encode(['message' => 'success']);\n\t}", "title": "" }, { "docid": "8961552300bd5c5bd5eb0812fddf4443", "score": "0.59053195", "text": "public function updateUser()\n {\n $sql =\n \"UPDATE ip_numbers SET refresh = '\".\n $this->refreshs.\n \"', moment = '\".\n $this->moment.\n \"', blocked = '\".\n $this->blocked.\n \"' WHERE ip = '\".\n $this->ip.\n \"';\"\n ;\n \n return $this->influenceUser($sql); \n }", "title": "" }, { "docid": "5ffbf77944bacef4d29df284944c59b0", "score": "0.59046143", "text": "function setState(UserStateInterface $state);", "title": "" }, { "docid": "ac3ce179fe6b3e6001b0833edb1dd2cc", "score": "0.59024155", "text": "public function update()\n\t{\n\t\t$user = $this->user->find(2);\n\t\t$user->username = Input::get('username');\n\t\t$user->email = Input::get('email');\n\t\t$user->type = Input::get('type');\n\t\t$user->save();\n\t\t//return Redirect::route('users.index');\n\t}", "title": "" }, { "docid": "fa065bee862db57f2e99c28085b13aea", "score": "0.589791", "text": "function updateUser($user) {\n $this->getEntityManager()->flush();\n }", "title": "" }, { "docid": "759e475fab723a456eae2f994756415a", "score": "0.58940834", "text": "public function setUser() {\n\t\t$token = APIToken::where('device_id', '=', \\Input::get('device_id'))->where('token','=',\\Input::get('auth_token'))->get()->first();\n\n\t\tif($token) {\n\t\t\t$user = \\Repo::call('User')->find($token->user_id);\n\n\t\t\tif($user) {\n\t\t\t\t\\Auth::login($user);\n\t\t\t\t$this->token = $token;\n\t\t\t}\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "dcdf211e8046ac49cc019f5d928780a2", "score": "0.58784604", "text": "public function setUser ($userid)\n {\n $this->userid = $userid;\n $this->update();\n }", "title": "" }, { "docid": "465a45887a28b91eaf27e1133f8270ae", "score": "0.5878238", "text": "public function userStateRegist()\n\t\t{\n\t\t\tif (Utils::isUuid($this->id) == false)\n\t\t\t\treturn null;\n\t\t\t$db = Database::getInstance();\n\n\t\t\t$stmt = $db->prepare(\"UPDATE users SET state = ? WHERE id = ?\");\n\t\t\t$stmt->bindValue(1, self::REGISTER, PDO::PARAM_STR);\n\t\t\t$stmt->bindValue(2, $this->id, PDO::PARAM_STR);\n\t\t\t$stmt->execute();\n\t\t\tif ($stmt->rowCount() != 0)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "f493c970441b0e9adf0c9da8dc85dad4", "score": "0.5872098", "text": "public function testUpdateUserByID()\n {\n $user = factory(User::class)->create();\n $param = $this->data;\n $param['id'] = $user->id;\n $response = $this->json('PUT', \"api/user\", $param);\n if($this->isAdmin) {\n $response\n ->assertStatus(200)\n ->assertJson([\n 'data' => true\n ]);\n } else {\n $response\n ->assertStatus(200)\n ->assertJson([\n 'error-message' => 'Unauthorized.'\n ]);\n }\n }", "title": "" }, { "docid": "ae33bd639bbd796e6e8dc905258a8104", "score": "0.5867891", "text": "public static function refreshUserdata() {\r\n\t\tif( Security::loginMethod() != SECURITY_TABLE ) \r\n\t\t\treturn;\r\n\t\tif( !isLogged() || Security::isGuest() )\r\n\t\t\treturn;\r\n\t\t$userData = Security::fetchUserData( Security::getUserName(), \"\", true );\r\n\t\tstorageSet( \"UserData\", $userData );\r\n\t}", "title": "" }, { "docid": "73aec99677875e971831e5bc3f9f7649", "score": "0.5867679", "text": "function updateUserForLogin($id)\n {\n $this->db->set('last_visit', date (\"Y-m-d H:i:s\"));\n $this->db->where('id', $id);\n $this->db->update($this->_table);\n }", "title": "" }, { "docid": "08c7b5d8aab389ae02b45c653bc3802d", "score": "0.5863222", "text": "public function setState(int $user_id, $new_value){\n if($new_value === 'admin' || $new_value === 'user'){\n \n $user_info = $this->getUserByID($user_id);\n $set_user = $this->db->prepare(\"UPDATE users SET `state`=?, passwd=? , login_date=? WHERE ID=?\");\n $set_user->execute(array($new_value, $user_info['passwd'], $user_info['login_date'], $user_id));\n $set_user->closeCursor();\n }\n return False;\n }", "title": "" }, { "docid": "cf97a91829ee0ced5ba4f4dc46406e2b", "score": "0.58627063", "text": "public function changeUserActivationStatus($id)\n {\n $user = User::find($id);\n if($user->activation_status == 0) {\n $user->activation_status = 1;\n } else {\n $user->activation_status = 0;\n }\n $user->save();\n return redirect()->route('user.index')->with('success', \"User Status Change Succesfully\");\n }", "title": "" }, { "docid": "0bde3cd755b80b6d67666ebe821464bb", "score": "0.58610743", "text": "public function updateUser( &$user ) {\n\t\t# Override this and do something\n\t\treturn true;\n\t}", "title": "" }, { "docid": "971cd195d2d3f8594fd89639c06c1f9c", "score": "0.58575416", "text": "public function update()\n\t{\n\t\tglobal $gdbObj;\n\t\t$user_id = $this->user_id;\n\t\t$username = $gdbObj->escape_value($this->username);\n\t\t$first_name = $gdbObj->escape_value($this->first_name);\n\t\t$last_name = $gdbObj->escape_value($this->last_name);\n\t\t$country = $gdbObj->escape_value($this->country);\n\t\t$city = $gdbObj->escape_value($this->city);\n\t\t$street = $gdbObj->escape_value($this->street);\n\t\t$phone = $gdbObj->escape_value($this->phone);\n\t\t$zip = $gdbObj->escape_value($this->zip);\n\t\t$description = $gdbObj->escape_value($this->description);\n\t\t\n\t\t$sql = \"UPDATE \".self::$usersTable.\" SET username = '$username',first_name = '$first_name', last_name = '$last_name', street = '$street', city = '$city', country = '$country', zip_code = '$zip' , phone = '$phone', description = '$description' where user_id = '$user_id'\";\n\t\tif($gdbObj->query($sql))\n\t\t{\n\t\t\t$this->user_id = $gdbObj->insert_id();\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "2f77e89c9334f7bc26dc469d92d469be", "score": "0.58551085", "text": "public function set_user_last_login() {\n $this->user_last_login = time();\n $this->update();\n// $query = sql::result(\"UPDATE `user` SET `user_last_login` = \".time().\" WHERE `userID` ='$this->userID' \");\n }", "title": "" } ]
06cdf9a29da22a80ce804763db579e20
Add activity with failure.
[ { "docid": "c51d7fc92aa7ccc5c93fac67134b0636", "score": "0.6932677", "text": "public function testAddOneActivityWithFailuresTest()\n {\n $responseStructure = [\n 'title' => ['The title field is required.'],\n 'description' => ['The description field is required.'],\n 'start_date' => ['The start date field is required.'],\n 'deadline' => ['The deadline field is required.'],\n 'user_id' => ['The user id field is required.'],\n 'status_id' => ['The status id field is required.']\n ];\n\n $response = $this->post('/api/activities');\n\n $response->assertStatus(422);\n\n $response->assertJson($responseStructure);\n }", "title": "" } ]
[ { "docid": "4acf1c97868026831c0967e6df9b9970", "score": "0.68067706", "text": "function addFailure(EskymoTestFailure $failure);", "title": "" }, { "docid": "ce208df9d5fb28749928571a412a711b", "score": "0.6605988", "text": "public function addActivity($activity);", "title": "" }, { "docid": "30dabae630b0661ca937246d6d186cb2", "score": "0.64754015", "text": "function addFailure(EskymoTestFailure $failure) {\n\t\tif (empty($failure)) {\n\t\t\tthrow new NullPointerException(\"failure\");\n\t\t}\n\t\t$this->successful = FALSE;\n\t\t$this->tested[$this->started] = $failure;\n\t\tunset($this->started);\n\t\tforeach ($this->listeners AS $listener) {\n\t\t\t$listener->addFailure($test, $failure);\n\t\t}\n\t}", "title": "" }, { "docid": "e5919d9262787d67bea99dfa98c84865", "score": "0.610346", "text": "public function onFailure()\n {\n ++$this->stats['failure'];\n }", "title": "" }, { "docid": "1f084ada1099ea5438c76ea34cf770ef", "score": "0.5994526", "text": "public function addActivity()\n {\n $this->activityservice->addRecord();\n }", "title": "" }, { "docid": "f0028db7a47a69f1b8c5150d86161d56", "score": "0.59325576", "text": "private function failed()\n {\n $this->execution->update(['status' => 'failed']);\n\n // Emit task failed event\n event(new Failed($this->task));\n }", "title": "" }, { "docid": "3891c13cc1d8bdc6f4827362e1d58e19", "score": "0.59285766", "text": "public function setFailed()\n {\n $this->attributes['status'] = 'failed';\n self::save();\n }", "title": "" }, { "docid": "3891c13cc1d8bdc6f4827362e1d58e19", "score": "0.59285766", "text": "public function setFailed()\n {\n $this->attributes['status'] = 'failed';\n self::save();\n }", "title": "" }, { "docid": "5c1625b5a96b81cd111957c567f18045", "score": "0.589034", "text": "public function addFailedLogin() {\n // $item = $this->create();\n $item->ip = $_SERVER['REMOTE_ADDR'];\n $item->time_create = time();\n $this->insert((array) $item);\n //item->save();\n }", "title": "" }, { "docid": "1f9d8e4c465de23d496a33312b4ced52", "score": "0.5654857", "text": "public function addActivity(\\classi\\activities\\Activity $activity)\r\n {\r\n if (premiumDate == null) {\r\n \r\n if(sizeof($myActivity) < MAX_ACTIVITY){\r\n $this->myActivity[] = $activity;\r\n }\r\n }else{\r\n echo 'Non puoi inserire altre inserzioni \\r\\nDiventa premium';\r\n //tasto diventa premium e richiama la fuzione diventa premium\r\n }\r\n }", "title": "" }, { "docid": "e96c14b54b2162676616fec2e4b1d901", "score": "0.56393325", "text": "public function saveActivity()\n {\n //verify with db\n $db = new Server;\n $this->database = $db->dbConnect();\n\n $tbl = $this->getTablename();\n $cat_table = $this->getCattable();\n \n //check if category resonates in category table\n $cat = $this->getCategory();\n $sql = \"SELECT * FROM $cat_table WHERE category = :category\";\n $stmt = $this->database->prepare($sql);\n $stmt->bindParam(\":category\", $cat);\n\n if(!$stmt->execute())\n {\n $this->throwError(EXECUTION_ERROR, 'Error executing command @line24.');\n }\n\n $row = $stmt->rowCount();\n if($row < 1)\n {\n //not valid category\n $this->throwResponse(RECORD_DOESNT_EXIST, $cat . ' is invalid.');\n }\n\n //prevent duplicate activity names\n $act = $this->getActivity();\n $pick = \"SELECT * FROM $tbl WHERE activity = :activity\";\n $stmt = $this->database->prepare($pick);\n $stmt->bindParam(\":activity\", $act);\n\n if(!$stmt->execute())\n {\n $this->throwError(EXECUTION_ERROR, 'Error executing command @line42.');\n }\n\n //does activity exist?\n $rowcount = $stmt->rowCount();\n if($rowcount > 0)\n {\n $this->throwResponse(RECORD_EXIST, $act . ' is already recorded.');\n }\n\n //save\n $activity = $this->getActivity();\n $category = $this->getCategory();\n $gameplay = $this->getGameplay();\n $insertdata = \"INSERT INTO $tbl(`id`, `activity`, `category`, `gameplay`)VALUES(NULL, :activity, :category, :gameplay)\";\n $stmt = $this->database->prepare($insertdata);\n $stmt->bindParam(\":activity\", $activity);\n $stmt->bindParam(\":category\", $category);\n $stmt->bindParam(\":gameplay\", $gameplay);\n\n if(!$stmt->execute())\n {\n $this->throwError(EXECUTION_ERROR, 'Error executing command @line62.');\n }\n\n //success\n $this->throwResponse(RECORD_ADDED, $activity . ' saved successfully.');\n\n\n\n }", "title": "" }, { "docid": "4aac842410e674bb885a25092619d6b0", "score": "0.56303215", "text": "protected function storeInvalidActivity($activity, $index)\n {\n $this->jsonData[$index] = $activity;\n $this->storeInJsonFile('xml_invalid.json', $this->jsonData);\n }", "title": "" }, { "docid": "ec57b76e8324537767f27be5754198b5", "score": "0.5619381", "text": "public function failure();", "title": "" }, { "docid": "a3644ef6fa714919bf01845f0622941b", "score": "0.55624723", "text": "public function testInsertWithError()\n {\n $this->authentication();\n $this->post(route('activity.store'), []);\n $this->seeStatusCode(302);\n $this->assertHasOldInput();\n $this->assertSessionHasErrors();\n }", "title": "" }, { "docid": "33403a425fd8eac14d635ac887830c3a", "score": "0.5536189", "text": "public function createFailure(string $description);", "title": "" }, { "docid": "209582cc4a827551bfe72508999ff12b", "score": "0.55064934", "text": "function addError(Exception $error) {\n\t\tif (empty($error)) {\n\t\t\tthrow new NullPointerException(\"error\");\n\t\t}\n\t\t$this->successful = FALSE;\n\t\t$this->tested[$this->started] = $error;\n\t\tunset($this->started);\n\t\tforeach ($this->listeners AS $listener) {\n\t\t\t$listener->addError($test, $error);\n\t\t}\n\t}", "title": "" }, { "docid": "6a3f2e20c09663655d7bb6356cc6a8ef", "score": "0.5454399", "text": "protected function appendFailedItem($status, $label)\n {\n if (!is_null($status) && $this->result['overall_status'] < $status) {\n $this->result['overall_status'] = $status;\n }\n\n $this->result['items'][] = array(\n \"status\" => $status,\n \"label\" => $label\n );\n\n }", "title": "" }, { "docid": "e6ebf004aa61df7ed51071bed65364b0", "score": "0.54047763", "text": "abstract public function failureLogMessage();", "title": "" }, { "docid": "e506e030061261bb1b25530cc91e75f5", "score": "0.53587097", "text": "protected function jobFailedTracking(): void\n {\n $action = new JobFailedAction();\n $action();\n }", "title": "" }, { "docid": "934a3d538822c1368a34bde4b891b8fd", "score": "0.53447086", "text": "public function testInvalidAddExtra()\n {\n $booking = new \\tabs\\api\\booking\\Booking();\n $booking->addNewExtra('TOW', 1, 0);\n }", "title": "" }, { "docid": "7e922aac98b62c0a6a770f1c26c9a1df", "score": "0.5343731", "text": "public function addFailure(RequestInterface $request, Exception $exception)\n {\n }", "title": "" }, { "docid": "fd949297b9db880ab192165a03b834ab", "score": "0.53281695", "text": "public function failure()\n {\n }", "title": "" }, { "docid": "3c55fedb6bb4a386314a7a8b98e6de3f", "score": "0.5290644", "text": "public function addFailedPage($page): self\n {\n $this->failedPages[] = $page;\n\n return $this;\n }", "title": "" }, { "docid": "3cd158f1794e7237bae23d887215eb1e", "score": "0.5258279", "text": "public abstract function isFailure();", "title": "" }, { "docid": "c3725ec139675a2af604b7c2fff413db", "score": "0.52476215", "text": "public static function onWorkflowFailed(FailingWorkflowEvent $event)\n {\n }", "title": "" }, { "docid": "084f6ff336d69cf7eb42b0d699555a91", "score": "0.5247201", "text": "public function testActivityCreate()\n {\n $services = $this->getApplication()->getServiceManager();\n $services->setService('p4_user', $services->get('p4_admin'));\n\n $activity = array(\n 'type' => 'coffee',\n 'user' => 'A dingo',\n 'action' => 'ate my',\n 'target' => 'baby'\n );\n\n $this->post('/api/v1/activity', $activity);\n $actual = json_decode($this->getResponse()->getContent(), true);\n $expected = array(\n 'activity' => array(\n 'id' => 1,\n 'action' => 'ate my',\n 'behalfOf' => null,\n 'change' => null,\n 'depotFile' => null,\n 'description' => '',\n 'details' => array(),\n 'followers' => array(),\n 'link' => '',\n 'preposition' => 'for',\n 'projects' => array(),\n 'streams' => array(),\n 'target' => 'baby',\n 'topic' => '',\n 'type' => 'coffee',\n 'user' => 'A dingo'\n )\n );\n\n unset($actual['activity']['time']);\n\n $this->assertSame(200, $this->getResponse()->getStatusCode());\n $this->assertSame($expected, $actual);\n }", "title": "" }, { "docid": "5ab1a2c8216319ab575833cc6ac837f9", "score": "0.5244915", "text": "public function testTransactionSummaryFailure()\n {\n $this->mock->append($this->mockSuccess('getTransactionSummary-Failure.json'));\n\n $this->explorer->getLastTxs();\n }", "title": "" }, { "docid": "1b59142cc41dbf5baa7aa1057fc1a66c", "score": "0.52185833", "text": "public function testGetActivitiesFailure()\n\t{\n\t\t$returnData = new stdClass;\n\t\t$returnData->code = 401;\n\t\t$returnData->body = $this->errorString;\n\n\t\t$token = $this->oauth->getToken();\n\n\t\t$this->client->expects($this->once())\n\t\t->method('get')\n\t\t->with('me/activities?access_token=' . $token['access_token'])\n\t\t->will($this->returnValue($returnData));\n\n\t\t$this->object->getActivities('me');\n\t}", "title": "" }, { "docid": "5d0a5825ee920108936272fc8b096134", "score": "0.52153945", "text": "public function add(ActivityInterface $element);", "title": "" }, { "docid": "f004f38ac56982d04bfc42b7397caacc", "score": "0.5215062", "text": "public function isFailure();", "title": "" }, { "docid": "39aa1079bf3165e52804b499f3e995c6", "score": "0.52082425", "text": "public function setFailure(\\Throwable $failure): void\n {\n if ($this->failure === null) {\n $this->failure = $failure;\n }\n }", "title": "" }, { "docid": "f1a6da3d1b73bda289dfe3bca814b448", "score": "0.5190718", "text": "public static function add_activity ($user_id, $action)\r\n\t{\r\n\t\t$db_manager\t= new database_manager ();\r\n\t\t$ip \t\t= $_SERVER['REMOTE_ADDR'];\r\n\r\n\t\t$result\t= $db_manager -> insert (\r\n\t\t\t'users_activity',\r\n\t\t\t['user_id', 'action', 'ip'],\r\n\t\t\t[$user_id, $action, $ip]\r\n\t\t);\r\n\r\n\t\treturn ($result);\r\n\t}", "title": "" }, { "docid": "2c76a77657c8fbf1796d05d2d26508de", "score": "0.5187288", "text": "private function processFailedRequest()\n {\n $url = $this->_url->getCurrentUrl();\n $storeId = $this->storeManager->getStore()->getId();\n $failedAuth = $this->failedAuthFactory->create();\n $this->failedAuthResource->load($failedAuth, $storeId, 'store_id');\n $numOfFails = $failedAuth->getFailuresNum();\n $lastAttemptDate = $failedAuth->getLastAttemptDate();\n //set the first failed attempt\n if (!$failedAuth->getId()) {\n $failedAuth->setFirstAttemptDate(time());\n }\n\n //check the time for the last fail and update the records\n if ($numOfFails == \\Dotdigitalgroup\\Email\\Model\\FailedAuth::NUMBER_MAX_FAILS_LIMIT) {\n //ignore the resource is in a locked state\n if ($failedAuth->isLocked()) {\n $this->helper->log(sprintf('Resource locked time : %s ,store : %s', $lastAttemptDate, $storeId));\n return;\n } else {\n //reset with the first lock after the the lock expired\n $numOfFails = 0;\n $failedAuth->setFirstAttemptDate(time());\n }\n }\n try {\n $failedAuth->setFailuresNum(++$numOfFails)\n ->setStoreId($storeId)\n ->setUrl($url)\n ->setLastAttemptDate(time());\n $this->failedAuthResource->save($failedAuth);\n } catch (\\Exception $e) {\n $this->helper->log($e);\n }\n }", "title": "" }, { "docid": "beb14ce6120f5267424a9f18ac40437f", "score": "0.518167", "text": "protected function generateFailureCase()\n {\n $this->cases['failure'] = array_fill_keys($this->params, '');\n }", "title": "" }, { "docid": "50cf061fa971f4248c7801a3fe17b195", "score": "0.5181086", "text": "public function failed()\n {\n }", "title": "" }, { "docid": "79c0d18f98c6dab324a820cfdcbae142", "score": "0.51747173", "text": "public function markFallbackFailure() {\n $this->counter->add(MetricsCounter::FALLBACK_FAILURE);\n }", "title": "" }, { "docid": "a03d0924e056d767453d5aeed040d1a1", "score": "0.5160435", "text": "public function fail(TranModel $tran, array $options = [])\n\t{\n\t\t$tran->update(['status' => TranStatus::FAILED]);\n\n\t\t$this->logActivity('fail', $tran, array_get($options, 'owner'));\n\t}", "title": "" }, { "docid": "eabe48e01490b71d070448fd2e54ff3c", "score": "0.5148487", "text": "public function add_Activity($id=0,$user_id=0){\n\t\t$action = 1;\n\t\tif(hasRole(['ScrumMaster'])){\n\t\t\t$action = 0;\n\t\t}\n\t\tif($this->User->can_add_Activity($user_id)){\n\t\t\t$action = 0;\n\t\t}\n\t\tif($action){\n\t\t\techo \"คุณไม่มีสิทธิ์เข้าถึง\";\n\t\t\treturn ;\n\t\t}\n\t\techo $this->User->add_Activity([ 'activity_id' => $id, 'user_id' => $user_id,'time' => date(\"Y-m-d H:i:s\")]); \n\t}", "title": "" }, { "docid": "ea733624fde691d2a7ffb7163c8cb7d6", "score": "0.5139926", "text": "public function addFailure(RequestInterface $request, ClientExceptionInterface $exception)\n {\n }", "title": "" }, { "docid": "d7b3c22ef1e3f6a6d81d5cba474e9b22", "score": "0.51339257", "text": "public function failed(int $id, array $payload): void;", "title": "" }, { "docid": "5f2f6b9d04b155b222aefe18f7f735e7", "score": "0.5123575", "text": "public function failTask(string $error = null, string $message = null)\n {\n $previousStatus = $this->status;\n $this->status = TaskStatus::FAILED();\n $this->result = null;\n $this->error = $error ?? $this->error;\n $this->error = (string)$error;\n $this->message = $message ?? $this->message;\n !$this->merging && $this->counter++;\n\n if ($previousStatus == TaskStatus::PROCESSING()) {\n $this->emit('failed', [$this]);\n }\n }", "title": "" }, { "docid": "f70f13f23346c9d4e54df3f883ec1c70", "score": "0.5120577", "text": "public function testCreateStatusFailure()\n\t{\n\t\t$user = '134534252';\n\t\t$message = 'message';\n\n\t\t$returnData = new stdClass;\n\t\t$returnData->code = 401;\n\t\t$returnData->body = $this->errorString;\n\n\t\t// Set POST request parameters.\n\t\t$data['message'] = $message;\n\n\t\t$token = $this->oauth->getToken();\n\n\t\t$this->client->expects($this->once())\n\t\t->method('post')\n\t\t->with($user . '/feed?access_token=' . $token['access_token'], $data)\n\t\t->will($this->returnValue($returnData));\n\n\t\t$this->object->createStatus($user, $message);\n\t}", "title": "" }, { "docid": "af3d434d06c2d37365a80340d9dba9e4", "score": "0.5117715", "text": "function add_activity($name_atv, $description_atv){\n\tglobal $db;\n\t$query = 'INSERT INTO activity_atv\n\t\t\t\t(name_atv, description_atv)\n\t\t\t VALUES\n\t\t\t \t(:name_atv, :description_atv)';\n\t$statement = $db->prepare($query);\n $statement->bindValue(':name_atv', $name_atv);\n $statement->bindValue(':description_atv', $description_atv);\n $success = $statement->execute();\n $row_count = $statement->rowCount();\n $statement->closeCursor();\n $entry_id = $db->lastInsertId(); \n}", "title": "" }, { "docid": "30f14d86bc4ac422ef79f972b7feba8e", "score": "0.51176775", "text": "function addError(Exception $error);", "title": "" }, { "docid": "1a3068798f584fc15d2b3ce46b4cc656", "score": "0.50937766", "text": "function duplicate_activity() {\r\n global $USER, $CFG, $COURSE, $DB, $OUTPUT;\r\n\r\n $id = $this->cm->id;\r\n $iassignid = optional_param('iassign_current', NULL, PARAM_TEXT);\r\n\r\n $context = context_module::instance($this->cm->id);\r\n\r\n $contextuser = context_user::instance($USER->id);\r\n\r\n // Get the the iAssign acitivity to be duplicated\r\n $iassign_statement = $DB->get_record(\"iassign_statement\", array(\"id\" => $iassignid));\r\n\r\n // Remove the current id of activity\r\n $iassign_statement->id=0;\r\n\r\n // Get the information about current author, and add this information in author_modified field\r\n $author = $DB->get_record(\"user\", array('id' => $USER->id));\r\n $iassign_statement->author_modified_name = $author->firstname . '&nbsp;' . $author->lastname;\r\n $iassign_statement->author_modified = $iassign_statement->author_modified_name;\r\n\r\n // Store the activity in the table\r\n if ($id_ = $DB->insert_record(\"iassign_statement\", $iassign_statement)) {\r\n\r\n // Duplicate activity file\r\n $fs = get_file_storage();\r\n $files = $fs->get_area_files($context->id, 'mod_iassign', 'exercise', $iassign_statement->file);\r\n\r\n foreach ($files as $value) {\r\n if ($value->get_filename() != \".\") {\r\n $newfile = $fs->create_file_from_storedfile(array('contextid' => $context->id, 'component' => 'mod_iassign', 'filearea' => 'exercise', 'itemid' => $value->get_itemid() + $id_), $value);\r\n\r\n $updateentry = new stdClass();\r\n $updateentry->id = $id_;\r\n $updateentry->file = $newfile->get_itemid();\r\n\r\n // Update the duplicated iLM iAssign with new file id\r\n $DB->update_record(\"iassign_statement\", $updateentry);\r\n }\r\n }\r\n }\r\n\r\n // log event --------------------------------------------------------------------------------------\r\n iassign_log::add_log('duplicate_iassign_exercise', 'name: ' . $author->firstname, $id_, $this->cm->id);\r\n\r\n $this->return_home_course('duplicated_activity');\r\n exit;\r\n }", "title": "" }, { "docid": "d5ef786b017f00ad2b0b3efbbcc1cf4c", "score": "0.509026", "text": "public function createFailure(FunctionalTester $I)\n {\n $I->wantTo('Unsuccessfully create new project');\n\n $user = User::findOne(1004);\n\n $I->amGoingTo('try accessing the action unauthorized');\n $I->sendPOST('/projects');\n $I->seeUnauthorizedResponse();\n\n $I->amGoingTo('authorize and submit invalid form data');\n $I->haveHttpHeader('Authorization', 'Bearer ' . $user->generateAccessToken());\n $I->sendPOST('/projects', [\n 'title' => '',\n 'archived' => 'invalid',\n 'pinned' => 'invalid',\n ]);\n $I->seeResponseCodeIs(400);\n $I->seeResponseIsJson();\n $I->seeResponseMatchesJsonType([\n 'message' => 'string',\n 'errors' => [\n 'title' => 'string',\n 'archived' => 'string',\n 'pinned' => 'string',\n ],\n ]);\n }", "title": "" }, { "docid": "de4958f314d02c8bf944b689becedb3b", "score": "0.5082023", "text": "function addSuccess(EskymoTestSuccess $success);", "title": "" }, { "docid": "6438a957bb3dc99d29f1b482ab2cf71c", "score": "0.50803196", "text": "public function _failed($I)\n {\n }", "title": "" }, { "docid": "6438a957bb3dc99d29f1b482ab2cf71c", "score": "0.50803196", "text": "public function _failed($I)\n {\n }", "title": "" }, { "docid": "312c2f298384ba175bccd92d819c773e", "score": "0.5056305", "text": "public function add_activity_log($user_id,$activity_id){\r\n $time = time();\r\n $_data = array(\r\n 'user_id'=>$user_id,\r\n 'activity_id'=>$activity_id,\r\n 'created'=>$time,\r\n 'updated'=>$time,\r\n );\r\n $insert_id = self::_model()->add($_data);\r\n return $insert_id;\r\n }", "title": "" }, { "docid": "344970b0c59b72b15ddf8e48d2105aaf", "score": "0.5050051", "text": "public function failed(int $id, array $payload) : void;", "title": "" }, { "docid": "215fbffbd91d4121aac216a3754186a0", "score": "0.50478274", "text": "public function setFailed()\n {\n $this->status = static::STATUS_FAILED;\n\n return $this;\n }", "title": "" }, { "docid": "32d9356b46ab85dc27bb46128069112e", "score": "0.5040816", "text": "private function addError($attribute, $rule, $params = [])\r\n {\r\n $message = isset($this->errorMessages()[$rule]) ? $this->errorMessages()[$rule] : '';\r\n foreach ($params as $key => $value)\r\n {\r\n $message = str_replace(\"{{$key}}\", $value, $message);\r\n }\r\n $this->errors[$attribute][] = $message;\r\n }", "title": "" }, { "docid": "d6e6726eb67eee159185de6933029cce", "score": "0.503956", "text": "public function failed($data)\n {\n }", "title": "" }, { "docid": "25bd2af2b18786b428520255d98268ac", "score": "0.50368625", "text": "public function _failed(){\n }", "title": "" }, { "docid": "b37767dee40b890e6d0c33f7820a479d", "score": "0.50191706", "text": "public function addFailedTransactions($failedTransactions)\n {\n //Why can api designers never make this consistent?\n if(is_object($failedTransactions))\n {\n $failedTransactions = [$failedTransactions];\n }\n foreach($failedTransactions as $failedTransaction)\n {\n $this->_failedTransactions[] = new InvalidTransaction(\n isset($failedTransaction->code) ? $failedTransaction->code : \"Unknown\",\n isset($failedTransaction->description) ? $failedTransaction->description : \"Unknown\",\n isset($failedTransaction->merchantTransactionId) ? $failedTransaction->merchantTransactionId : \"Unknown\"\n );\n }\n }", "title": "" }, { "docid": "bc0d393dc80aa5bcf8d2efe62ee199f2", "score": "0.5017466", "text": "static function failure($messages = null): self\n {\n if (empty($messages)) {\n $messages = Message::error(_lang('action.failure'));\n }\n\n return new self(false, $messages);\n }", "title": "" }, { "docid": "cd2119f97b2a73a4708390a96ab883bc", "score": "0.5016096", "text": "private static function log_failed_attempt()\n {\n Yii::app()->db\n ->createCommand(\"INSERT INTO `unauth` (`ip`, `time`) VALUES(:ip, NOW()) \")\n ->execute(array('ip' => Yii::app()->request->getUserHostAddress())) ;\n }", "title": "" }, { "docid": "c1e324ba081934fde71208e6d60e6515", "score": "0.5008067", "text": "function failure();", "title": "" }, { "docid": "6d1dc2eb9cdcdcff9f420189dc24e7f6", "score": "0.5006005", "text": "public function failedAction()\n {\n }", "title": "" }, { "docid": "d25861485ee81c685abc7e5d6e47b92a", "score": "0.5001007", "text": "public function testFailCreateTaskWhenMissingStatus()\n {\n $user = User::factory()->create();\n $createData = [\n \"name\" => \"name test\",\n \"description\" => \"desc test\",\n \"user_id\" => $user->id,\n ];\n $response = $this->post(self::BASE_ROUTE, $createData);\n\n $this->assertTaskUpdate(\n $response,\n 400,\n \"invalid_data\",\n [],\n $createData\n );\n }", "title": "" }, { "docid": "2916b9860f104bf8b1ae3302d57a6eea", "score": "0.49996492", "text": "public static function pushFailure(array $data, int $delay, string $failMsg)\n {\n echo __METHOD__ . PHP_EOL;\n }", "title": "" }, { "docid": "06929a06030b80129347085d156cd452", "score": "0.4995813", "text": "function SaveFailure( $id,$type, $msg){\r\n include('connect.php');\r\n\ttry{\r\n\t\t$stmt = $connect->prepare('INSERT INTO failurereports (stationid,description,failuretype) VALUES (:stationid,:description,:type)');\r\n\t\t$stmt->execute(array('stationid'=> $id, 'description'=> $msg, 'type'=> $type));\r\n\t}\r\n\tcatch(PDOException $e){\r\n\t\techo 'Failed to add failure to db:'.$e .'<br>';\r\n\t}\r\n\t$id = $connect->lastInsertId();\r\n\treturn $id; //Return failure id on success false on error;\r\n}", "title": "" }, { "docid": "92454925ab682ecb558d7230b3fc50a1", "score": "0.49863803", "text": "public function testExecuteValidationFail()\n {\n $commandSubject = ['authorize'];\n $validationFailures = [\n __('Failure #1'),\n __('Failure #2'),\n ];\n\n $this->processRequest($commandSubject, false, $validationFailures);\n\n $this->logger->expects(self::exactly(count($validationFailures)))\n ->method('critical')\n ->withConsecutive(\n [self::equalTo('Payment Error: ' . $validationFailures[0])],\n [self::equalTo('Payment Error: ' . $validationFailures[1])]\n );\n\n $this->command->execute($commandSubject);\n }", "title": "" }, { "docid": "12b4d6ee63b8d15c7a3a7e508877cf85", "score": "0.49863058", "text": "public function catchFailure(\\Throwable $throwable,$row = null): void\n {\n $failure_row = $this->failureRow($throwable,$row);\n $this->failures->add($failure_row);\n }", "title": "" }, { "docid": "76f2a0209504681de92f884767a0a8c4", "score": "0.49600255", "text": "public function callbackFail()\r\n {\r\n $this->AddOutput(\"<p><i>Misslyckades att skapa användare.</i></p>\");\r\n $this->redirectTo();\r\n }", "title": "" }, { "docid": "93e9428c996139076cc1ee28ffa9beed", "score": "0.49497738", "text": "public function failure()\n {\n $this->success = false;\n\n return $this;\n }", "title": "" }, { "docid": "19ff4bdf0aaca5c4f71f3f6d1a97b71c", "score": "0.49491978", "text": "function addSuccess(EskymoTestSuccess $success) {\n\t\tif (empty($success)) {\n\t\t\tthrow new NullPointerException(\"success\");\n\t\t}\n\t\t$this->tested[$this->started] = $success;\n\t\tunset($this->started);\n\t\tforeach ($this->listeners AS $listener) {\n\t\t\t$listener->addSuccess($test, $success);\n\t\t}\n\t}", "title": "" }, { "docid": "845b136457e7d703aed6b510207b049e", "score": "0.4947748", "text": "public function fail()\n {\n $this->_success = false;\n }", "title": "" }, { "docid": "57f3df99ce82927e4061cbc596446c36", "score": "0.49457964", "text": "public function addActivity($ownderID, $creatorID, $itemID) {\n\t}", "title": "" }, { "docid": "05e80323914064eefc86c0a6a5773c7b", "score": "0.49455988", "text": "abstract public function on_failed(\\Exception $e);", "title": "" }, { "docid": "fd445bbac74b67dac311b30b4e09273b", "score": "0.49410173", "text": "public function insert($part, Google_Service_YouTube_Activity $postBody, $optParams = array())\n {\n $params = array('part' => $part, 'postBody' => $postBody);\n $params = array_merge($params, $optParams);\n return $this->call('insert', array($params), \"Google_Service_YouTube_Activity\");\n }", "title": "" }, { "docid": "d3ac7dc194eaa058b082d1c978df2b73", "score": "0.4936993", "text": "protected function addError($attribute, $rule, $parameters)\n {\n $message = $this->messages[$rule];\n array_unshift($parameters, $attribute);\n $this->errors[$attribute] = sprintf($message, ...$parameters);\n }", "title": "" }, { "docid": "75cea0f0d6ee43e472cc281ee4d19ed7", "score": "0.4920627", "text": "public function add_activity($args)\n\t{\n\t\t\n\t\tif($args[\"activity\"] == \"sell\"){\n\t\t\t$this->sell_update($args);\t\t\t\n\t\t}\t\n\t\telseif($args[\"activity\"] == \"watchlist\"){\n\t\t\t$this->watchlist_update($args);\t\t\t\n\t\t} else {\n\t\t\t$this->update($args);\t\t\t\n\t\t}\n\n\t}", "title": "" }, { "docid": "1437cdc27079320c4edfe25fcf361aac", "score": "0.49168777", "text": "function fail($fail);", "title": "" }, { "docid": "e1d191820eea30742ec8bb3006bde575", "score": "0.49134022", "text": "public function failedActivityId(?string $activityId): IncidentQueryInterface;", "title": "" }, { "docid": "31a8dbe8607e0c14eb4cce1f1c66bc9b", "score": "0.49008563", "text": "public function appendItem( ezcConfigurationValidationItem $item )\n {\n if ( $item->type == ezcConfigurationValidationItem::ERROR )\n {\n $this->errorCount++;\n }\n else\n {\n $this->warningCount++;\n }\n $this->resultList[] = $item;\n }", "title": "" }, { "docid": "0d4ffc3ec46bdd469c9cd04a4bc5ee49", "score": "0.48976636", "text": "public function testlogginglogsfailuremessage() {\n global $DB;\n set_config('createorupdate', 0, 'rlipimport_version1elis');\n\n $data = array(\n 'entity' => 'user',\n 'action' => 'update',\n 'username' => 'rlipusername',\n 'password' => 'Rlippassword!0',\n 'firstname' => 'rlipfirstname',\n 'lastname' => 'rliplastname',\n 'email' => '[email protected]',\n 'city' => 'rlipcity',\n 'country' => 'CA'\n );\n $result = $this->run_user_import($data);\n\n $this->assertNull($result);\n\n $message = 'One or more lines from import file memoryfile failed because they contain data errors. ';\n $message .= 'Please fix the import file and re-upload it.';\n $exists = $this->log_with_message_exists($message);\n $this->assertEquals(true, $exists);\n }", "title": "" }, { "docid": "bbe8afeadec7c591c06543a5c231e705", "score": "0.48970667", "text": "public function testDelayIsAppliedToFailedAttempts()\n {\n $this->assertRecordsCount(0);\n\n // Set delay of two seconds, because we sometimes got nextInLine() when job was set in one second, and we got to\n // the next second during assertRecordsCount() step\n $this->assertEquals(1, $this->dispatcher->dispatch(new Failing(['delay' => 2, 'attempts' => 2])));\n\n $this->assertRecordsCount(1);\n\n // First attempt\n $this->assertNull($this->dispatcher->getQueue()->nextInLine());\n\n sleep(2);\n\n $next_in_line = $this->dispatcher->getQueue()->nextInLine();\n\n $this->assertInstanceOf('ActiveCollab\\JobsQueue\\Test\\Jobs\\Failing', $next_in_line);\n $this->assertEquals(1, $next_in_line->getQueueId());\n\n $this->dispatcher->getQueue()->execute($next_in_line);\n\n // Second attempt\n $this->assertRecordsCount(1);\n $this->assertAttempts(1, $next_in_line->getQueueId());\n\n $this->assertNull($this->dispatcher->getQueue()->nextInLine()); // Not yet available\n\n sleep(2);\n\n $next_in_line = $this->dispatcher->getQueue()->nextInLine();\n\n $this->assertInstanceOf('ActiveCollab\\JobsQueue\\Test\\Jobs\\Failing', $next_in_line);\n $this->assertEquals(1, $next_in_line->getQueueId());\n\n $this->dispatcher->getQueue()->execute($next_in_line);\n $this->assertRecordsCount(0);\n }", "title": "" }, { "docid": "03d8df321c1c1b947255abb2e9e18942", "score": "0.48912185", "text": "public function reserveFailed($response);", "title": "" }, { "docid": "e96fc88719ee8e71cbcf00318f8c7905", "score": "0.48893306", "text": "public function addTestCaseInstanceFailure(KalturaTestCaseInstanceFailure $testCaseInstanceFailure)\r\n\t{\r\n\t\tif($this->testCaseInstanceFailures == null)\r\n\t\t{\r\n\t\t\t$this->testCaseInstanceFailures = array();\r\n\t\t}\r\n\t\t\r\n\t\t$name = $testCaseInstanceFailure->getTestCaseInstanceName();\r\n\t\t\t\t\r\n\t\tif(!isset($this->testCaseInstanceFailures[\"$name\"]))\r\n\t\t{\r\n\t\t\t$this->testCaseInstanceFailures[\"$name\"] = $testCaseInstanceFailure;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tthrow new Exception(\"Test Case instance failures [$name] were already added\");\r\n\t\t}\r\n\t\t\r\n\t\treturn $this->testCaseInstanceFailures[\"$name\"];\r\n\t}", "title": "" }, { "docid": "f4943fdf162ffba1fe0fa6477eff3fc3", "score": "0.48828003", "text": "static function insertActivityBind($activity_id, $project_id) {\r\n \t\t$mdb2 = getConnection();\r\n \t$sql = \"INSERT INTO activity_bind (ab_id_a, ab_id_p) VALUES($activity_id, $project_id)\";\r\n \t\t$affected = &$mdb2->exec($sql);\r\n \t\treturn (PEAR::isError($affected) == 0);\r\n \t}", "title": "" }, { "docid": "632699d8eb66cbef0b190aeddb7843e9", "score": "0.48724744", "text": "function add_activity($params)\n {\n $this->db->insert('activities',$params);\n return $this->db->insert_id();\n }", "title": "" }, { "docid": "2002242f473b604d6440b4f0bd447f0f", "score": "0.4869747", "text": "public function stepFailed() {\n self::assertEquals(true, false);\n }", "title": "" }, { "docid": "f6ec85b74c504975d727fab69117f781", "score": "0.48697284", "text": "public function testShowErrorOnInvalidAction()\n {\n $result = $this->runTask(array('action' => 'coffeetime'));\n $this->assertContains('Error! Specified action is not valid.', $result);\n }", "title": "" }, { "docid": "ba67b98ea87dc12f08201c838b57c92d", "score": "0.48616132", "text": "public function testInvalidAddPetExtra()\n {\n $booking = new \\tabs\\api\\booking\\Booking();\n $booking->addPetExtra(1);\n }", "title": "" }, { "docid": "513d66d3219d33bd89f4ef3b2a5365ca", "score": "0.48590234", "text": "public function fail($event)\r\n\t{\r\n\t\t\r\n\t}", "title": "" }, { "docid": "dd9e77e79b0f63be15802ce553acec49", "score": "0.48539165", "text": "abstract public function isFailed();", "title": "" }, { "docid": "dd9e77e79b0f63be15802ce553acec49", "score": "0.48539165", "text": "abstract public function isFailed();", "title": "" }, { "docid": "98e8b54a525cc188d544ad1d060960f1", "score": "0.48500898", "text": "public function addError($message);", "title": "" }, { "docid": "a49a9b4b417458dc816895058104a087", "score": "0.4847327", "text": "public function testInsertWithOutError()\n {\n // Route\n // $route = route('activity.store');\n\n // Session\n // $session['class'] = 'alert alert-success';\n // $session['message'] = '';\n\n // Testing logic.\n // $this->authentication();\n // $this->post($route, $input);\n // $this->seeStatusCode(302);\n }", "title": "" }, { "docid": "aeee6a5130cf03ee525ddbe115f90d4b", "score": "0.4843313", "text": "public static function _auditfiles_referenced_not_used_batch_finish_batch($success, $results, $operations) {\n if (!$success) {\n $error_operation = reset($operations);\n drupal_set_message(\n t('An error occurred while processing @operation with arguments : @args',\n [\n '@operation' => $error_operation[0],\n '@args' => print_r($error_operation[0], TRUE),\n ]\n ),\n 'error'\n );\n }\n }", "title": "" }, { "docid": "4c9298b57d78f37f69ef98648a6f88f1", "score": "0.4840584", "text": "public function reportFailure(string $service): void;", "title": "" }, { "docid": "3b1302841a84872ee61ea3184c8cf99e", "score": "0.48266864", "text": "public function testItPreventsAssociatingAnActorThatIsAlreadyAssociated()\n {\n $movie = factory(Movie::class)->create();\n $actor = factory(Actor::class)->create();\n\n $movie->actors()->attach($actor->id, ['character' => 'Some Character']);\n\n $response = $this->json(\n 'POST',\n \"/api/movies/{$movie->id}/actors\",\n ['actor_id' => $actor->id, 'character' => 'Some Character']\n );\n\n $response->assertStatus(409);\n }", "title": "" }, { "docid": "31efaf24db5abc58e464297340a181dc", "score": "0.48227692", "text": "public function add($task);", "title": "" }, { "docid": "ed40b810cc91fb2f456d874307690cd1", "score": "0.4820219", "text": "public function testLastTransactionsFailure()\n {\n $this->mock->append($this->mockSuccess('getLastTransactions-Failure.json'));\n\n $this->explorer->getLastTxs();\n }", "title": "" }, { "docid": "bf34a9b4bc59dbf689abdb6fa7e781c8", "score": "0.48153645", "text": "public function callbackFail()\n {\n $this->di->msgFlash->error($this->error);\n $this->redirectTo();\n }", "title": "" }, { "docid": "29c7781b5e639ae1ebb24e8dbd0f06f7", "score": "0.4813999", "text": "public static function auditfiles_not_in_database_batch_finish_batch($success, $results, $operations) {\n if ($success) {\n //success action.\n }\n else {\n $error_operation = reset($operations);\n drupal_set_message(\n t('An error occurred while processing @operation with arguments : @args',\n [\n '@operation' => $error_operation[0],\n '@args' => print_r($error_operation[0], TRUE),\n ]\n ),\n 'error'\n );\n }\n }", "title": "" }, { "docid": "64e25bf143f8152a48f46bbbd28d9545", "score": "0.48121235", "text": "public static function _auditfiles_used_not_referenced_batch_finish_batch($success, $results, $operations) {\n if (!$success) {\n $error_operation = reset($operations);\n drupal_set_message(\n t('An error occurred while processing @operation with arguments : @args',\n [\n '@operation' => $error_operation[0],\n '@args' => print_r($error_operation[0], TRUE),\n ]\n ),\n 'error'\n );\n }\n }", "title": "" }, { "docid": "51ac426509791fd90f3c516133e4054c", "score": "0.48106664", "text": "public function failed(array $payload): void;", "title": "" } ]
d679018e668fe2a0f483aa820399e51a
attempts to add invalid file in a filebag er ignored
[ { "docid": "fa88842a45778f26223b307570dbec17", "score": "0.0", "text": "public function offsetSet( $offset, $value )\n {\n if ( is_a( $value, 'Fracture\\Http\\UploadedFile') === true &&\n $value->isValid() === false )\n {\n return;\n }\n\n if ( is_null( $offset ) === true )\n {\n $this->entries[] = $value;\n }\n else\n {\n $this->entries[ $offset ] = $value;\n }\n }", "title": "" } ]
[ { "docid": "978c831543221f984f5259f46f9c8250", "score": "0.7294331", "text": "public function testAddInvalidFiles()\n {\n $this->assertFalse($this->userFileStorage->addFile($this->tmpDir . '/test-invalid-size.txt'));\n $this->assertTrue($this->userFileStorage->hasErrors());\n $this->assertTrue(isset($this->userFileStorage->getErrors()['file']));\n $this->assertTrue(preg_match('#file is very large#i', current($this->userFileStorage->getErrors()['file'])) === 1);\n $this->userFileStorage->resetErrors();\n\n $this->assertFalse($this->userFileStorage->addFile($this->tmpDir . '/test-invalid-extension.bad'));\n $this->assertTrue($this->userFileStorage->hasErrors());\n $this->assertTrue(isset($this->userFileStorage->getErrors()['file']));\n $this->assertTrue(preg_match('#file extension is not allowed#i', current($this->userFileStorage->getErrors()['file'])) === 1);\n $this->userFileStorage->resetErrors();\n\n $this->assertFalse($this->userFileStorage->addFile($this->tmpDir . '/test-invalid-phrase.txt'));\n $this->assertTrue($this->userFileStorage->hasErrors());\n $this->assertTrue(isset($this->userFileStorage->getErrors()['file']));\n $this->assertTrue(preg_match('#file contains forbidden words#i', current($this->userFileStorage->getErrors()['file'])) === 1);\n $this->userFileStorage->resetErrors();\n }", "title": "" }, { "docid": "a92d95f39af9f4771c9135723615f69d", "score": "0.6443585", "text": "public function testLoadBagWithUnencodedFilepaths(): void\n {\n $this->tmpdir = $this->copyTestBag(self::TEST_RESOURCES . \"/TestBadFilePathsBag\");\n $bag = Bag::load($this->tmpdir);\n $this->assertFalse($bag->isValid());\n // 1 errors for bad payload lines, 1 for missing files and 1 for files in the bag not in the payload manifest.\n $this->assertCount(3, $bag->getErrors());\n $payload = $bag->getPayloadManifests()['sha256'];\n $this->assertCount(1, $payload->getHashes());\n }", "title": "" }, { "docid": "664c6dbb19e5e515d408bd921604a999", "score": "0.64351416", "text": "public function testInvalidFilePath()\n {\n $this->loader->addFile('/path/to/non/existing/file');\n }", "title": "" }, { "docid": "1ce795c0498818fadb6581ac3b3504bf", "score": "0.61986643", "text": "public function testAddingFile()\r\n\t{\r\n\t}", "title": "" }, { "docid": "eb8bdb75ed0ea00b03935d1cb2724c7e", "score": "0.60173225", "text": "function _add_file($file, $filename, $potid, $lng, $headers, $comments, $uid = 1) {\n // Get the sha1 hash of the file.\n $hash = sha1_file($file);\n\n // Check whether the file already exists.\n $row = btr::db_query(\n 'SELECT potid, lng FROM {btr_files} WHERE hash = :hash',\n array(':hash' => $hash)\n )->fetchAssoc();\n\n // If file already exists.\n if (isset($row['potid'])) {\n if ($row['potid']==$potid and $row['lng']==$lng) {\n $msg = t(\"Already imported, skipping: !filename\", ['!filename' => $filename]);\n btr::messages($msg, 'warning');\n return NULL;\n }\n else {\n // file already imported for some other template or language\n $row1 = btr::db_query(\n 'SELECT p.origin, p.project, t.tplname\n FROM {btr_templates} t\n LEFT JOIN {btr_projects} p ON (t.pguid = p.pguid)\n WHERE t.potid = :potid',\n array(':potid' => $row['potid'])\n )->fetchAssoc();\n $msg = t(\"File '!filename' has already been imported for '!origin/!project' and language '!lng' as '!tplname'.\",\n [\n '!filename' => $filename,\n '!origin' => $row1['origin'],\n '!project' => $row1['project'],\n '!lng' => $row['lng'],\n '!tplname' => $row1['tplname'],\n ]);\n btr::messages($msg, 'warning');\n }\n }\n\n // The DB field of content is MEDIUMTEXT (16777216 bytes),\n // check that the file does not exceed this length.\n if (filesize($file) > 16777216) {\n $msg = t(\"File is too large to be stored in the DB (longer than MEDIUMTEXT); skipped.\");\n btr::messages($msg, 'warning');\n return NULL;\n }\n\n // Insert the file.\n $fid = btr::db_insert('btr_files')\n ->fields(array(\n 'filename' => $filename,\n 'content' => file_get_contents($file),\n 'hash' => $hash,\n 'potid' => $potid,\n 'lng' => $lng,\n 'headers' => $headers,\n 'comments' => $comments,\n 'uid' => $uid,\n 'time' => date('Y-m-d H:i:s', REQUEST_TIME),\n ))\n ->execute();\n\n return $fid;\n}", "title": "" }, { "docid": "fdf21855ebebd20b68087584d69b2f24", "score": "0.59887964", "text": "public function testInvalidFileExtension()\n {\n $this->loader->addFile('README.md');\n }", "title": "" }, { "docid": "0c0abdfd08bf1bb0d4c4712a63777fa1", "score": "0.5886103", "text": "public function testLoadFileFromWrongLocation()\n {\n\n $file_url = dirname(__FILE__) . '/../resources/doesnotexist.mp3' ;\n $ext_key = \"testAddUrlKey_3\";\n\n MyLog::printWithDuration( \"Adding File from wrong Location (must fail):$file_url Ext.Key:$ext_key\"); \n $this->myFileAddTest($file_url, $ext_key,\"\", 400, array(\"error\"), array(\"code\"));\n }", "title": "" }, { "docid": "d589e70ce2debaffd6cab2aebb42d2e4", "score": "0.58433634", "text": "public function processAddAttachments()\n\t\t{\n\t\t\t$languages = Language::getLanguages(false);\n\t\t\t$is_attachment_name_valid = false;\n\t\t\tforeach ($languages as $language)\n\t\t\t{\n\t\t\t\t$attachment_name_lang = Tools::getValue('attachment_name_'.(int)($language['id_lang']));\n\t\t\t\tif (Tools::strlen($attachment_name_lang ) > 0)\n\t\t\t\t\t$is_attachment_name_valid = true;\n\n\t\t\t\tif (!Validate::isGenericName(Tools::getValue('attachment_name_'.(int)($language['id_lang']))))\n\t\t\t\t\t$this->errors[] = Tools::displayError('Invalid Name');\n\t\t\t\telseif (Tools::strlen(Tools::getValue('attachment_name_'.(int)($language['id_lang']))) > 32)\n\t\t\t\t\t$this->errors[] = sprintf(Tools::displayError('The name is too long (%d chars max).'), 32);\n\t\t\t\tif (!Validate::isCleanHtml(Tools::getValue('attachment_description_'.(int)($language['id_lang']))))\n\t\t\t\t\t$this->errors[] = Tools::displayError('Invalid description');\n\t\t\t}\n\t\t\tif (!$is_attachment_name_valid)\n\t\t\t\t$this->errors[] = Tools::displayError('An attachment name is required.');\n\n\t\t\tif (empty($this->errors))\n\t\t\t{\n\t\t\t\tif (isset($_FILES['attachment_file']) && is_uploaded_file($_FILES['attachment_file']['tmp_name']))\n\t\t\t\t{\n\t\t\t\t\tif ($_FILES['attachment_file']['size'] > (Configuration::get('PS_ATTACHMENT_MAXIMUM_SIZE') * 1024 * 1024))\n\t\t\t\t\t\t$this->errors[] = sprintf(\n\t\t\t\t\t\t\t$this->l('The file is too large. Maximum size allowed is: %1$d kB. The file you\\'re trying to upload is: %2$d kB.'),\n\t\t\t\t\t\t\t(Configuration::get('PS_ATTACHMENT_MAXIMUM_SIZE') * 1024),\n\t\t\t\t\t\t\tnumber_format(($_FILES['attachment_file']['size'] / 1024), 2, '.', '')\n\t\t\t\t\t\t);\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tdo $uniqid = sha1(microtime());\n\t\t\t\t\t\twhile (file_exists(_PS_DOWNLOAD_DIR_.$uniqid));\n\t\t\t\t\t\tif (!copy($_FILES['attachment_file']['tmp_name'], _PS_DOWNLOAD_DIR_.$uniqid))\n\t\t\t\t\t\t\t$this->errors[] = $this->l('File copy failed');\n\t\t\t\t\t\t@unlink($_FILES['attachment_file']['tmp_name']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telseif ((int)$_FILES['attachment_file']['error'] === 1)\n\t\t\t\t{\n\t\t\t\t\t$max_upload = (int)ini_get('upload_max_filesize');\n\t\t\t\t\t$max_post = (int)ini_get('post_max_size');\n\t\t\t\t\t$upload_mb = min($max_upload, $max_post);\n\t\t\t\t\t$this->errors[] = sprintf(\n\t\t\t\t\t\t$this->l('The file %1$s exceeds the size allowed by the server. The limit is set to %2$d MB.'),\n\t\t\t\t\t\t'<b>'.$_FILES['attachment_file']['name'].'</b> ',\n\t\t\t\t\t\t'<b>'.$upload_mb.'</b>'\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$this->errors[] = Tools::displayError('The file is missing.');\n\n\t\t\t\tif (empty($this->errors) && isset($uniqid))\n\t\t\t\t{\n\t\t\t\t\t$attachment = new Attachment();\n\t\t\t\t\tforeach ($languages as $language)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (Tools::getIsset('attachment_name_'.(int)$language['id_lang']))\n\t\t\t\t\t\t\t$attachment->name[(int)$language['id_lang']] = Tools::getValue('attachment_name_'.(int)$language['id_lang']);\n\t\t\t\t\t\tif (Tools::getIsset('attachment_description_'.(int)$language['id_lang']))\n\t\t\t\t\t\t\t$attachment->description[(int)$language['id_lang']] = Tools::getValue('attachment_description_'.(int)$language['id_lang']);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (Tools::getIsset('name_'.(int)Configuration::get('PS_LANG_DEFAULT'))) {\n\t\t\t\t\t\t$sFilename = $_FILES['attachment_file']['name'];\n\t\t\t\t\t\t$sExtention = substr($sFilename, strrpos($sFilename, '.') + 1);\n\t\t\t\t\t\t$attachment->file_name = Tools::link_rewrite(trim(Tools::getValue('name_'.(int)Configuration::get('PS_LANG_DEFAULT'))));\n\n\t\t\t\t\t\t// On regarde si c'est le premier document joint au produit ou pas\n\t\t\t\t\t\t$aAttachmentOfProduct = $attachment->getAttachments(Context::getContext()->language->id, (int)Tools::getValue('id_product'));\n\n\t\t\t\t\t\t$iNb = count($aAttachmentOfProduct);\n\t\t\t\t\t\tif ($iNb > 0)\n\t\t\t\t\t\t\t$attachment->file_name .= '-'.$iNb;\n\n\t\t\t\t\t\t$attachment->file_name .= '.'.$sExtention;\n\t\t\t\t\t}\n\n\t\t\t\t\t$attachment->file = $uniqid;\n\t\t\t\t\t$attachment->mime = $_FILES['attachment_file']['type'];\n\t\t\t\t\tif (empty($attachment->mime) || Tools::strlen($attachment->mime) > 128)\n\t\t\t\t\t\t$this->errors[] = Tools::displayError('Invalid file extension');\n\t\t\t\t\tif (!Validate::isGenericName($attachment->file_name))\n\t\t\t\t\t\t$this->errors[] = Tools::displayError('Invalid file name');\n\t\t\t\t\tif (Tools::strlen($attachment->file_name) > 128)\n\t\t\t\t\t\t$this->errors[] = Tools::displayError('The file name is too long.');\n\t\t\t\t\tif (empty($this->errors))\n\t\t\t\t\t{\n\t\t\t\t\t\t$res = $attachment->add();\n\t\t\t\t\t\tif (!$res)\n\t\t\t\t\t\t\t$this->errors[] = Tools::displayError('This attachment was unable to be loaded into the database.');\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$id_product = (int)Tools::getValue($this->identifier);\n\t\t\t\t\t\t\t$res = $attachment->attachProduct($id_product);\n\t\t\t\t\t\t\tif (!$res)\n\t\t\t\t\t\t\t\t$this->errors[] = Tools::displayError('We were unable to associate this attachment to a product.');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t$this->errors[] = Tools::displayError('Invalid file');\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "de27fadc256a036792362e1f547b24c9", "score": "0.583589", "text": "public function add(){\n\n $expected = array( 'inputName', 'inputComment');\n $files = array( 'inputFile');\n $message = '';\n\n foreach( $expected AS $key ) {\n if ( !empty( $_POST[ $key ] ) ) {\n // cleaning the user inputs\n ${$key} = $this->sanitize($_POST[ $key ]);\n } else {\n ${$key} = NULL;\n }\n $message .= Utils::validate($key, ${$key});\n }\n\n foreach( $files AS $key ) {\n if ( !empty( $_FILES[ $key ] ) ) {\n ${$key} = $_FILES[ $key ]['tmp_name'];\n } else {\n ${$key} = NULL;\n }\n $message .= Utils::validate($key, ${$key});\n }\n\n if (!empty($message)) {\n $this->backToAdmin($message);\n }\n\n $signature = Malware::generateSignature($inputFile);\n\n // if something went wrong with signature generation\n if (!isset($signature) || is_null($signature)) {\n $this->backToAdmin(\"Signature could not be generated.\\n\");\n }\n\n // if there was a problem with saving malware to DB\n if (!Malware::create($inputName, $signature, $inputComment)) {\n $this->backToAdmin(\"Database error could not save malware.\\n\");\n }\n\n // we made it!\n $this->backToAdmin(\"$inputName has been added!\\n\");\n }", "title": "" }, { "docid": "f9b82a49909c392a119021f46928ea9f", "score": "0.5834661", "text": "public function testLoadFileFromLocalFileDuplicateExternalKeyError()\n {\n \n $file_url = dirname(__FILE__) . '/../resources/' . $this->testfileslocal[5][0];\n $ext_key = $this->testfileslocal[5][1];\n $collection = $this->testfileslocal[5][2];\n\n MyLog::printWithDuration( \"Adding File with duplicate External Key (must fail):$file_url Ext.Key:$ext_key Collection:$collection\"); \n $this->myFileAddTest($file_url, $ext_key, $collection, 403, array(\"error\", \"errorDetail\"), array(\"code\"));\n }", "title": "" }, { "docid": "e0702f1425d5861a8a9f399ba9d13e83", "score": "0.5829686", "text": "public function testAddFile()\n {\n $this->userFileStorage->addFile($this->tmpDir . '/test-valid.txt');\n $this->assertFalse($this->userFileStorage->hasErrors());\n $this->assertTrue(file_exists($this->storageDir . '/test-valid.txt'));\n }", "title": "" }, { "docid": "cfb6ced65ee9968ff6449faeaac55b30", "score": "0.57987905", "text": "private function checkFileErrors()\n {\n if($_FILES['picture']['error'] > 0)\n throw new KookiizException('picture', $_FILES['picture']['error']);\n }", "title": "" }, { "docid": "d998bbc7619b68ec64b255d7044aebe5", "score": "0.5728884", "text": "public function ensureFilesExisting();", "title": "" }, { "docid": "c3705cb1e65ed71497a82855865230a5", "score": "0.5723806", "text": "function addFileItem()\n\t{\n\t\tglobal $ilCtrl;\n\t\t\n\t\t$files = $this->content_obj->getFileList();\n\n\t\tif (count($files) >= 1)\n\t\t{\n\t\t\t$ilCtrl->setParameterByClass(\"ilpcfileitemgui\", \"hier_id\",\n\t\t\t\t$files[count($files) - 1][\"hier_id\"]);\n\t\t\t$ilCtrl->setParameterByClass(\"ilpcfileitemgui\", \"pc_id\",\n\t\t\t\t$files[count($files) - 1][\"pc_id\"]);\n\t\t\t$ilCtrl->redirectByClass(\"ilpcfileitemgui\", \"newItemAfter\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$ilCtrl->redirect($this, \"newFileItem\");\n\t\t}\n\t}", "title": "" }, { "docid": "9676b83afdf027fbc69109f0f37414ce", "score": "0.56736434", "text": "public function testWithUploadedFilesInvalid()\n {\n $newFiles = [\n 'foo' => 'bar'\n ];\n\n $serverRequest = $this->getEnviromentForTest();\n $newRequest = $serverRequest->WithUploadedFiles($newFiles);\n }", "title": "" }, { "docid": "e67869e55495c8603ea601ce5a64931b", "score": "0.563079", "text": "function EnsureUploadedFile($element_name, $element_value)\n {\n foreach($_FILES AS $name => $data){\n if($data['error'] == '0'){\n\treturn TRUE;\n }\n }\n return FALSE;\n }", "title": "" }, { "docid": "b5096d91b350f3520b921c02d7f05a32", "score": "0.5619854", "text": "public function validateFiles(): void\n {\n $this->validateFileCounts();\n $this->validateBasenames();\n }", "title": "" }, { "docid": "48afc1026ad7c2302e8bc6cfa97a00e6", "score": "0.560549", "text": "function oublog_add_files($text, $dir, $contextid, $filearea, $itemid) {\n global $CFG, $OUTPUT, $SOURCESERVER;\n if (strpos($text, '@@PLUGINFILE@@')) {\n require_once($CFG->dirroot . '/lib/filestorage/file_storage.php');\n static $knownfiles;\n if (!isset($knownfiles)) {\n $knownfiles = array();\n }\n $pattern = '#<img.*?src=\"(@@PLUGINFILE@@(.*?))\"#';\n preg_match_all($pattern, $text, $matches);\n $filerecord = new stdClass();\n $filerecord->filearea = $filearea;\n $filerecord->itemid = $itemid;\n $filerecord->contextid = $contextid;\n $filerecord->component = 'mod_oublog';\n $filerecord->filepath = '/';\n $fs = get_file_storage();\n for ($a = 0, $len = count($matches[2]); $a < $len; $a++) {\n // Add MyStuff images in a folder based on user name.\n $match = $matches[2][$a];\n try {\n $paths = explode('/', $match);\n $filerecord->filename = array_pop($paths);\n if (strpos($filerecord->filename, '.')) {\n // Looks like we got filename OK so try and store, check if already done first.\n if (!isset($knownfiles[$contextid . $filearea . $itemid . $filerecord->filename])) {\n // Import file into system.\n if (!$fs->file_exists($contextid, 'mod_oublog', $filearea, $itemid, '/', $filerecord->filename)) {\n $fs->create_file_from_pathname($filerecord, $dir . $match);\n // Store we've processed so no need to import again (saves 1 query).\n $knownfiles[$contextid . $filearea . $itemid . $filerecord->filename] = 0;\n }\n }\n // Replace full path to just filename for rewrite plugin urls.\n $text = str_replace($match, '/' . $filerecord->filename, $text);\n }\n } catch (moodle_exception $e) {\n // TODO clean up match if fail?\n output('Failed to import file ' . $match . ' : ' . $e->getMessage());\n }\n }\n $matches = null;\n }\n if (stripos($text, $SOURCESERVER . '/pix/smartpix.php/ou/s/')) {\n // Search for hard-coded Emoticons and convert to local versions.\n $pattern = '#<img.*?src=\"(' . $SOURCESERVER . '/pix/smartpix.php/ou/s/(.*?))\"#';\n preg_match_all($pattern, $text, $matches);\n for ($a = 0, $len = count($matches[2]); $a < $len; $a++) {\n // Add MyStuff images in a folder based on user name.\n $match = $matches[2][$a];\n $match = str_ireplace('.gif', '', $match);\n $newurl = $OUTPUT->image_url('/s/' . $match);\n $text = str_replace($matches[1][$a], $newurl, $text);\n }\n }\n return $text;\n}", "title": "" }, { "docid": "b8410c8f45dcfd1d3850d012ea717779", "score": "0.5587625", "text": "public function addAction()\n {\n $fileNames = $_POST['dropbox-files'];\n $uploadedFileNames = array();\n if ($fileNames) {\n try {\n $uploadedFileNames = $fileNames;\n $fileErrors = $this->_uploadFiles($fileNames);\n if ($fileErrors) {\n $message = 'Some files were not uploaded. Specific errors for each file follow below:';\n foreach ($fileErrors as $fileName => $errorMessage) {\n $message .= \"\\n- $fileName: $errorMessage\";\n }\n $this->_helper->flashMessenger($message, 'error');\n $uploadedFileNames = array_diff($fileNames, array_keys($fileErrors));\n }\n } catch(Exception $e) {\n $this->_helper->flashMessenger($e->getMessage());\n $this->_helper->redirector('index');\n }\n } else {\n $this->_helper->flashMessenger('You must select a file to upload.');\n $this->_helper->redirector('index');\n }\n if ($uploadedFileNames) {\n $message = 'The following files were uploaded:';\n foreach ($uploadedFileNames as $fileName) {\n $message .= \"\\n- $fileName\";\n }\n $this->_helper->flashMessenger($message, 'success');\n } \n $this->_helper->redirector('index');\n }", "title": "" }, { "docid": "9d424a95f628a07514334c0f8744bb82", "score": "0.55695534", "text": "function uploadFiles($id, $db){ \n \n $i = 0 ;\n while(!empty($_FILES['documents']['name'][$i])){\n if(validateFile($_FILES['documents']['name'][$i]))\n {\n $file_parts = pathinfo($_FILES['documents']['name'][$i]);\n $file_extension = $file_parts['extension'];\n if(move_uploaded_file($_FILES['documents']['tmp_name'][$i], 'attachments/'.(md5($_FILES['documents']['tmp_name'][$i]).\".\".$file_extension))){\n insertFiles($db,basename($_FILES['documents']['name'][$i]),md5($_FILES['documents']['tmp_name'][$i]),$id);\n }\n } \n $i++;\n }\n}", "title": "" }, { "docid": "fc8ba9dab9c06b372c4a01dd71ed9317", "score": "0.5543555", "text": "function addFile(Nette\\Http\\FileUpload $file) {\n\t\t$file->move($this->getUniqueFilePath());\n\t\t$this->query('INSERT INTO files (queueID, created, data, name) VALUES (\"'.sqlite_escape_string($this->getQueueID()).'\",'.time().',\\''.sqlite_escape_string(serialize($file)).'\\', \\''.sqlite_escape_string($file->getName()).'\\')');\n\t}", "title": "" }, { "docid": "91856299bed542ed74f5e8ad0ecb1075", "score": "0.55206573", "text": "function pift_test_add_files(array $files) {\n foreach ($files as $file) {\n $file = (array) $file;\n if (pift_test_check_criteria_file($file)) {\n pift_test_add(PIFT_TYPE_FILE, $file['fid']);\n }\n }\n}", "title": "" }, { "docid": "668535831e632f41278957ad9fd38d01", "score": "0.55060667", "text": "function checkFileDoesntExistAndSave($target_file) {\n if (file_exists($target_file)) {\n failRequest(\"There was an error saving your file.\");\n }\n if (!move_uploaded_file($_FILES[\"gps\"][\"tmp_name\"], $target_file)) {\n failRequest(\"There was an error saving your file.\");\n }\n}", "title": "" }, { "docid": "f20050a25a47f2b1890b14947c7d3115", "score": "0.549172", "text": "public function failed()\n {\n $this->file->update([\n 'status_id' => FileStatus::ERROR\n ]);\n }", "title": "" }, { "docid": "4e637705f3856ba8f891ebd6ac76e57d", "score": "0.5488908", "text": "function _addFileOp($joomlaPath, $operation, $packagePath = '')\n {\n if (!in_array($operation, array('upgrade', 'delete'))) {\n $this->fileError = true;\n JError::raiseWarning(100, JText::_('Invalid upgrade operation') . ': ' . $operation);\n return false;\n }\n\n // Do not check if file in package exists - it may be deleted in some future version during upgrade\n // It will be checked before running file operations\n $file = new stdClass();\n $file->operation = $operation;\n $file->packagePath = $packagePath;\n\n $this->_fileList[$joomlaPath] = $file;\n }", "title": "" }, { "docid": "2130850adb512d0adb481c9af8f879cf", "score": "0.5472748", "text": "function AddFiles()\n {\n if( !isset($_FILES[\"pfiles\"]) ) return true;\n $arr_keys = array_keys($_FILES[\"pfiles\"][\"name\"]);\n $cnt0 = count($arr_keys);\n for ($j=0; $j<$cnt0; $j++) {\n $i = $arr_keys[$j];\n //echo '<br>$i='.$i;\n if( !empty($_FILES[\"pfiles\"][\"name\"][$i]) ) {\n $tmp_f_name = $_FILES[\"pfiles\"][\"tmp_name\"][$i];\n $this->pf_filename = $_FILES[\"pfiles\"][\"name\"][$i];\n $this->pf_url = MAILER_UPLOAD_FILES_PATH.'/'.$this->pf_filename;\n $this->pf_path = SITE_PATH.MAILER_UPLOAD_FILES_PATH.'/'.$this->pf_filename;\n //echo '<br>$this->pf_filename='.$this->pf_filename.'<br>$this->pf_url='.$this->pf_url.'<br>$this->pf_path='.$this->pf_path;\n $uploaddir = SITE_PATH.MAILER_UPLOAD_FILES_PATH;\n if ( !file_exists ($uploaddir) ) mkdir($uploaddir,0777);\n else @chmod($uploaddir,0777);\n if ( copy($tmp_f_name, $this->pf_path) ) {\n @chmod($uploaddir,0755);\n $q = \"INSERT INTO `\".TblModMailerDispatchFiles.\"` SET\n `pdf_url`='\".$this->pf_url.\"',\n `pdf_path`='\".$this->pf_path.\"',\n `pdf_filename`='\".$this->pf_filename.\"',\n `id_dispatch`='\".$this->id.\"'\n \";\n $res = $this->Right->Query( $q, $this->user_id, $this->module );\n //echo '<br>q='.$q.' res='.$res.' $this->Right->result='.$this->Right->result;\n if( !$res OR !$this->Right->result ) return false;\n\n }\n else{\n @chmod($uploaddir,0755);\n $this->Err = $this->Err.'Ошибка при сохранении файла <u><i>'.$this->pf_filename.'</i></u><br/>';\n return false;\n }\n\n }\n //}\n }\n return true;\n }", "title": "" }, { "docid": "7cc70b3d13829e026f9fd8dd15815d96", "score": "0.54581064", "text": "public function addFiles(&$files) {\n\t}", "title": "" }, { "docid": "14f7fc1bab070cf13ea3c706d52bc74b", "score": "0.5448642", "text": "private static function is_safe_to_append($filename) {\r\n\t\treturn (substr($filename, 1, 1) !== ':'); //Reject \"C:\\whatever\" and similar.\r\n\t}", "title": "" }, { "docid": "54df09640a5dbaf674a370509a598ff2", "score": "0.54332644", "text": "function add($p_filelist)\n {\n }", "title": "" }, { "docid": "f0f87ff7ba359737c75ffd4a2e6f8d21", "score": "0.5404965", "text": "public function add($files = null);", "title": "" }, { "docid": "fdcf253cfd30a5dbc0dbc48aeb775427", "score": "0.5404508", "text": "public function addFile($path);", "title": "" }, { "docid": "c8ac617f45c62a1e19e5108aed3a9c98", "score": "0.5395413", "text": "function addFileToDatabase($nameGivenToFileTag) {\n $newname = \"\";\n $flag = 0;\n $returnArray = array();\n if((!empty($_FILES[\"$nameGivenToFileTag\"])) && ($_FILES[\"$nameGivenToFileTag\"]['error'] == 0)) {\n //Check if the file is JPEG image and it's size is less than 100Kb\n $filename = basename($_FILES[\"$nameGivenToFileTag\"]['name']);\n $ext = substr($filename, strrpos($filename, '.') + 1);\n if (($ext == \"jpg\" or \"png\" or \"jpeg\") && ($_FILES[\"$nameGivenToFileTag\"][\"size\"] < 200000)) {\n //Determine the path to which we want to save this file\n $random=rand(1111,9999);\n $newname = dirname(__FILE__).'/upload/'.$random.$filename;\n //Check if the file with the same name is already exists on the server\n if (!file_exists($newname)) {\n move_uploaded_file($_FILES[\"$nameGivenToFileTag\"]['tmp_name'],$newname);\n } else {\n $flag = 1;\n }\n } else {\n $flag = 1;\n }\n } else {\n $flag = 1;\n }\n array_push($returnArray,$flag);\n array_push($returnArray,$newname);\n return $returnArray;\n }", "title": "" }, { "docid": "36721cc9f15c979312c88bfcbf1f1165", "score": "0.5391923", "text": "function duplicateFiles()\n {\n $err = \"\";\n $fa = $this->GetFileAttributes();\n foreach ($fa as $aid => $oa) {\n if ($oa->inArray()) {\n $t = $this->getMultipleRawValues($oa->id);\n $tcopy = array();\n foreach ($t as $k => $v) {\n $tcopy[$k] = $this->copyFile($oa->id, \"\", $k);\n }\n $this->setValue($oa->id, $tcopy);\n } else {\n $this->setValue($oa->id, $this->copyFile($oa->id));\n }\n }\n return $err;\n }", "title": "" }, { "docid": "f4d9a5ed5d04b893c03b3b5fa50e4cd3", "score": "0.5388813", "text": "public function testUpdatePhotoInvalidPathUser() {\n\t\t$result = $this->_targetObject->updatePhoto('0010b7b8-d69a-4365-81ca-5f975584fe5c', TMP, UPLOAD_FILE_SIZE_LIMIT, null, false);\n\t\t$expected = __('Invalid file for update.');\n\t\t$this->assertData($expected, $result);\n\t}", "title": "" }, { "docid": "4614f2317aea6621518b4726d723d3dc", "score": "0.5373328", "text": "function addFile(HttpUploadedFile $file) {\n\t\tEnvironment::getService('Nette\\Logger')->logMessage(\"addFile\");\n\t}", "title": "" }, { "docid": "92b96d251a754efd4255463d02bf8151", "score": "0.5356486", "text": "function privAddFile($p_filedescr, &$p_header, &$p_options)\n {\n }", "title": "" }, { "docid": "97ccdf034611742b4c3a659e53d57ecd", "score": "0.53546435", "text": "public function fileisinvalid($request,$addeditid=0)\n {\n \n \n //**** image code starts\n \n \n $allowedFileExtAr=array();\n $allowedFileExtAr[]=\"jpg\";\n $allowedFileExtAr[]=\"jpeg\";\n \n \n $filecontrolname=\"banner_image\";\n \n \n\t\t\t\t$allowedFileExtSizeAr=array();\n $allowedFileExtSizeAr['jpg']=(50*1024*1024);\n\t\t\t\t$allowedFileExtSizeAr['jpeg']=(50*1024*1024);\n \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//max_width & max_height ,min_width & min_height,equal_width & equal_height \n\t\t\t\t$allowedFileResolAr=array();\n\t\t\t\t\n\t\t\t\t$allowedFileResolAr['jpeg']=array('min_width'=>1503,'min_height'=>710);\n\t\t\t\t$allowedFileResolAr['jpg']=array('min_width'=>1503,'min_height'=>710);\n $func=\"validatefile\";//validatefile/uploadfile\n \n $Imcommonpath=public_path().\"/upload/banner-image/\";\n $chkimgresp=Imageuploadlib::imageupload($request,$filecontrolname=\"banner_image\",$Imcommonpath,$allowedFileExtAr,$allowedFileExtSizeAr,$allowedFileResolAr,$func,$addeditid) ;\n \n \n /*\n echo \"==chkimg1==><pre>\";\n print_r($chkimgresp);\n echo \"</pre>\"; exit();\n */\n \n $invalidresp=false;\n \n $errormsgs=''; $fileuploadednames=array();\n \n if(!empty($chkimgresp))\n {\n \n \n if(array_key_exists('errormsgs',$chkimgresp))\n {\n $errormsgs=$chkimgresp['errormsgs'];\n }\n \n \n }\n \n return $errormsgs;\n }", "title": "" }, { "docid": "8c3faa6817a074f9c58bf0e66edcd115", "score": "0.5329895", "text": "private function addParsedContentResourceFile($fileName, DropFolderFile $leadFile, DropFolder $folder)\r\n\t{\r\n\t\tKalturaLog::debug('Trying to add content resource in status PARSED ['.$fileName.']');\r\n\t\ttry\r\n\t {\r\n \t $newFile = new DropFolderFile();\r\n \t\t$newFile->setDropFolderId($folder->getId());\r\n \t\t$newFile->setFileName($fileName);\r\n \t\t$newFile->setFileSize(0);\r\n \t\t$newFile->setStatus(DropFolderFileStatus::PARSED);\r\n \t\t$newFile->setLeadDropFolderFileId($leadFile->getId());\r\n \t\t$newFile->setPartnerId($folder->getPartnerId());\r\n \t\t\t$newFile->save();\r\n\t\t}\r\n\t\tcatch(PropelException $e)\r\n\t\t{\r\n\t\t\tif($e->getCause()->getCode() == self::MYSQL_CODE_DUPLICATE_KEY) //unique constraint\r\n\t\t\t{\r\n\t\t\t\t$existingFile = DropFolderFilePeer::retrieveByDropFolderIdAndFileName($folder->getId(), $fileName);\r\n\t\t\t\tif($existingFile)\r\n\t\t\t\t{\r\n\t\t\t\t\t$unprocessedStatuses = array(DropFolderFileStatus::WAITING, DropFolderFileStatus::DETECTED, DropFolderFileStatus::UPLOADING, DropFolderFileStatus::PENDING);\r\n\t\t\t\t\tif(in_array($existingFile->getStatus(), $unprocessedStatuses))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tKalturaLog::debug('Updating drop folder file ['.$existingFile->getId().'] with lead id ['.$leadFile->getId().']');\r\n\t\t\t\t\t\t$existingFile->setLeadDropFolderFileId($leadFile->getId());\r\n\t\t\t\t\t\t$existingFile->save();\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tKalturaLog::debug('Deleting drop folder file ['.$existingFile->getId().']');\r\n\t\t\t\t\t\t$existingFile->setStatus(DropFolderFileStatus::PURGED);\r\n\t\t\t\t\t\t$existingFile->save();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tKalturaLog::debug('Adding new drop folder file ['.$newFile->getFileName().'] with status PARSED');\r\n\t\t\t\t\t\t$newFileCopy = $newFile->copy();\r\n\t\t\t\t\t\t$newFileCopy->save();\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\telse\r\n\t\t\t{\r\n\t\t\t\tKalturaLog::err('Failed to add content resource for Xml file ['.$leadFile->getId().'] - '.$e->getMessage());\r\n\t\t\t\tthrow new Exception(DropFolderXmlBulkUploadPlugin::ERROR_ADD_CONTENT_RESOURCE_MESSAGE, DropFolderXmlBulkUploadPlugin::getErrorCodeCoreValue(DropFolderXmlBulkUploadErrorCode::ERROR_ADD_CONTENT_RESOURCE));\r\n\t\t\t}\t\t\r\n\t\t}\t\r\n\t}", "title": "" }, { "docid": "46c703702f0dcfbb36c60879c7b764b0", "score": "0.5328854", "text": "public function addData($conn, $lae_ules, $file, $name) {\r\n $dir = \"upload\";\r\n $result = null;\r\n define('MB', 1048576);\r\n if( is_dir($dir) === false ) {\r\n mkdir($dir);\r\n }\r\n\r\n try {\r\n if (isset($_POST[$lae_ules])) {\r\n $failidelugemine = count($_FILES[$file][$name]);\r\n $sihtmärk_dir = \"upload/\";\r\n #kui faile on ühe 4 korraga esitatud]\r\n if ($failidelugemine >= 4) { #aktsepteerib maksimaalselt 3 faili korraga\r\n throw new RuntimeException('Sisestatud liiga palju faile. Proovi uuesti!');\r\n }\r\n\r\n for ($j = 0; $j < $failidelugemine; $j++) { #vaatame failid läbi järjest\r\n $failinimi = $_FILES[$file][$name][$j];\r\n $sihtmärk_fail = $sihtmärk_dir . basename($failinimi);\r\n #sisestatud faili arvude kontrollimine\r\n // Faili suuruse kontroll\r\n $faili_suurus = $_FILES[$file]['size'][$j];\r\n if ($faili_suurus > 5 * MB) {\r\n throw new RuntimeException('Error: sisestatud fail on liiga suur.');\r\n break;\r\n }\r\n //errori kontroll\r\n switch ($_FILES[$file]['error'][$j]) {\r\n case UPLOAD_ERR_OK:\r\n break;\r\n case UPLOAD_ERR_NO_FILE:\r\n throw new RuntimeException('Faili ei esitatud.');\r\n case UPLOAD_ERR_INI_SIZE:\r\n case UPLOAD_ERR_FORM_SIZE:\r\n throw new RuntimeException('Fail ületas suuruse.');\r\n default:\r\n throw new RuntimeException('Määramata errorid');\r\n }\r\n\r\n #faili salvestamise kontroll\r\n move_uploaded_file($_FILES[$file]['tmp_name'][$j], $sihtmärk_dir . $failinimi);\r\n #move_uploaded_file($_FILES[$file]['tmp_name'][$j], $sihtmärk_dir . $failinimi);\r\n $failiTüüp = strtolower(pathinfo($sihtmärk_fail, PATHINFO_EXTENSION)); // Tagastab failitüübi\r\n\r\n $i = 0;\r\n $semikoolon = True;\r\n $pealkirjad = array();\r\n $uuspealkirjad = [\"\",\"\", \"\", \"\", \"\", \"\",\"\"];\r\n [$eikuulukuskile, $eesnimeIndeks, $perekonnanimeIndeks, $koodIndeks, $idIndeks, $depIndeks, $visittimeIndeks, $emailIndeks] = 0;\r\n foreach (file($sihtmärk_fail) as $line) { # rida rea haaval\r\n $line = trim($line);\r\n if ($i == 0) {\r\n $semikoolonite_arv = substr_count($line,';');\r\n $tabulaatorite_arv = substr_count($line, \"\\t\");\r\n if ($semikoolonite_arv == 6) {\r\n $pealkirjad = explode(';', $line);\r\n $semikoolon =True;\r\n }else if ($tabulaatorite_arv == 6) {\r\n $pealkirjad = explode(\"\\t\", $line);\r\n $semikoolon=False;\r\n }else {\r\n throw new RuntimeException('Eraldatud teiste sümbolitega.');\r\n break;\r\n }\r\n if (count($pealkirjad) != 7) { #kontroll, kas sisestatud tabeli veerge on kokku 7\r\n throw new RuntimeException('Sisestatud on teistsuguste andmetega fail. Ei saa vastu võtta.');\r\n break;\r\n }\r\n $lugeja= 0;\r\n for ($i = 0; $i < count($pealkirjad); $i++) { #märgmine ära, mis igal veerul on\r\n #$pealkirjad[$i] = preg_replace('/\\s+/', '', $pealkirjad[$i]);\r\n if ($pealkirjad[$i] == \"first\" || $pealkirjad[$i] == \"eesnimi\" || $pealkirjad[$i] == \"first_name\" ) {\r\n $eesnimeIndeks = $i;\r\n $uuspealkirjad[$i]= \"first\";\r\n } elseif ($pealkirjad[$i] == \"last\" || $pealkirjad[$i] == \"perekonnanimi\" || $pealkirjad[$i] == \"last_name\") {\r\n $perekonnanimeIndeks = $i;\r\n $uuspealkirjad[$i]= \"last\";\r\n } elseif ($pealkirjad[$i] == \"id_code\" || $pealkirjad[$i] == \"isikukood\" || strpos($pealkirjad[$i], \"id\") == True ) {\r\n $idIndeks = $i;\r\n $uuspealkirjad[$i]= \"id_code\";\r\n } elseif ($pealkirjad[$i] == \"code\" || strpos($pealkirjad[$i], \"code\") == True ) {\r\n $koodIndeks = $i;\r\n $uuspealkirjad[$i]= \"code\";\r\n } elseif ($pealkirjad[$i] == \"dep\") {\r\n $depIndeks = $i;\r\n $uuspealkirjad[$i]= \"dep\";\r\n } elseif ($pealkirjad[$i] == \"email\" || $pealkirjad[$i] == \"email \") {\r\n $emailIndeks = $i;\r\n $uuspealkirjad[$i]= \"email\";\r\n } elseif ($pealkirjad[$i] == \"visit_time\") {\r\n $visittimeIndeks = $i;\r\n $uuspealkirjad[$i]= \"visit_time\";\r\n }else {\r\n $eikuulukuskile+=1;\r\n }\r\n $lugeja+=1;\r\n }\r\n } else {\r\n if ($semikoolon == True) { #kontroll, millega ülejäänud read eraldatud on\r\n $tulemused = explode(';', $line);\r\n }else $tulemused = explode(\"\\t\", $line);\r\n\r\n $itul = str_replace(',', '.', $tulemused[$idIndeks] ); #sest muidu ei saa tabelisse sisestada\r\n $isikukoodtulemus = strval((float) $itul);\r\n\r\n $query = \"INSERT INTO public.user($uuspealkirjad[$koodIndeks], $uuspealkirjad[$depIndeks], $uuspealkirjad[$eesnimeIndeks], $uuspealkirjad[$perekonnanimeIndeks], $uuspealkirjad[$emailIndeks], $uuspealkirjad[$visittimeIndeks], $uuspealkirjad[$idIndeks]) VALUES ('$tulemused[$koodIndeks]', '$tulemused[$depIndeks]', '$tulemused[$eesnimeIndeks]', '$tulemused[$perekonnanimeIndeks]', '$tulemused[$emailIndeks]', '$tulemused[$visittimeIndeks]', '$isikukoodtulemus');\";\r\n $result = pg_query($conn, $query);\r\n }\r\n $i += 1;\r\n\r\n }\r\n }\r\n\r\n }if(!$result){\r\n echo pg_last_error($conn);\r\n } else {\r\n echo \"Andmed sisestatud!\";\r\n }\r\n } catch (RuntimeException $e) {\r\n echo $e->getMessage();\r\n\r\n }\r\n\r\n }", "title": "" }, { "docid": "8f7565c9505261292964b3312aa219b8", "score": "0.53284454", "text": "public function testValidationErrorReturnedOnInvalidAdd()\n {\n $document = $this->objFromFixture('DMSDocument', 'not_allowed_in_cart');\n $result = $this->get('/documentcart/add/' . $document->ID . '?ajax=1');\n $this->assertContains('You are not allowed to add this document', (string) $result->getBody());\n }", "title": "" }, { "docid": "fa54774fbb3329ef23b553bcc851f109", "score": "0.5310094", "text": "public function addFile($file) {\n if (file_exists($file)) {\n $this->files[] = $file;\n return true;\n }\n\n throw new AppKitModelException('File not found: '. $file);\n }", "title": "" }, { "docid": "7be7e8a11c8dd92bf1b1045787126ce7", "score": "0.52992225", "text": "function add() {\n \t$advanced_upload = $this->request->get('advanced_upload', false);\n \t$editor_upload = $this->request->get('editor_upload', false);\n\n if (($this->request->isSubmitted() && $this->request->isAsyncCall()) || $editor_upload) {\n try {\n DB::beginWork('Saving temporary attachment @ ' . __CLASS__);\n \n $files_field_name = array_var($_GET, 'field_name', 'attachment');\n if (!isset($_FILES[$files_field_name]) || !is_array($_FILES[$files_field_name])) {\n throw new Error(lang('File is not correctly uploaded'));\n } // if\n \n \t\t\t\t$upload = $_FILES[$files_field_name];\n if ($upload['error'] != UPLOAD_ERR_OK) {\n \tthrow new UploadError($upload['error']);\n } // if\n\n if (FwDiskSpace::isUsageLimitReached() || !FwDiskSpace::has($upload['size'])) {\n throw new Error(lang('Disk Quota Reached. Please consult your system administrator.'));\n } // if\n \n $destination_file = AngieApplication::getAvailableUploadsFileName(); \n if (!move_uploaded_file($upload['tmp_name'], $destination_file)) {\n \tthrow new Error(lang('Failed to write uploaded file to the :folder_name folder', array('folder_name' => dirname($destination_file))));\n } // if\n\n $file_size = filesize($destination_file);\n \n $this->active_attachment = new Attachment();\n $this->active_attachment->setName($upload['name']);\n $this->active_attachment->setSize($file_size);\n $this->active_attachment->setMimeType(get_mime_type($destination_file, $this->active_attachment->getName()));\n $this->active_attachment->setLocation(basename($destination_file));\n\n // set MD5 if file size is smaller than 10MB\n if ($file_size < (1024 * 1024 * 10)) {\n $this->active_attachment->setMd5(md5_file($destination_file));\n } // if\n\n $this->active_attachment->save();\n \n DB::commit('Temporary attachment saved @ ' . __CLASS__);\n \n \t$this->response->setContentType(BaseHttpResponse::PLAIN);\n echo JSON::encode($this->active_attachment, $this->logged_user, false, true);\n die();\n } catch(Exception $e) {\n DB::rollback('Failed to save temporary attachment @ ' . __CLASS__);\n if ($advanced_upload) {\n $this->response->respondWithData($e);\n } else {\n $this->response->exception($e);\n } // if\n } // try\n } else {\n \t$this->response->badRequest();\n } // if\n }", "title": "" }, { "docid": "00161ef2e7e7e186fec197320cdd0809", "score": "0.5290414", "text": "public function upload() {\n\n if($this->files() === false) {\n return false;\n } else if($this->site->files()->count() >= $this->site->maxFiles()) {\n return false;\n } else {\n return $this->site->blueprint()->files()->add() !== false; \n } \n\n }", "title": "" }, { "docid": "2248c280daa66849b07630729a739e3f", "score": "0.5282921", "text": "public function addTestFile(string $filename): \\void {}", "title": "" }, { "docid": "fa2248ecd5cf29db09b2df0faec47ade", "score": "0.5281641", "text": "public function check_files()\n {\n }", "title": "" }, { "docid": "49a7b909a47af7aea898d8a3812afd90", "score": "0.5272447", "text": "function addFile($data)\n {\n self::$files[] = $data;\n }", "title": "" }, { "docid": "a490c0089c0140f2f8c551b6b96220c8", "score": "0.5238372", "text": "function pift_test_add_previous_files($nid) {\n $files = pift_test_get_files_node_all($nid);\n foreach ($files as $file) {\n $file = (array) $file;\n if ($file['test_id'] === NULL && pift_test_check_criteria_file($file)) {\n pift_test_add(PIFT_TYPE_FILE, $file['fid']);\n }\n }\n}", "title": "" }, { "docid": "7ef648ed5ee35002af65c562766f60be", "score": "0.523418", "text": "function insertIntoAttachment($id,$module)\n\t{\n\t\tglobal $log, $adb;\n\t\t$log->debug(\"Entering into insertIntoAttachment($id,$module) method.\");\n\n\t\t$file_saved = false;\n\n\t\tforeach($_FILES as $fileindex => $files)\n\t\t{\n\t\t\tif($files['name'] != '' && $files['size'] > 0)\n\t\t\t{\n\t\t\t\t$files['original_name'] = vtlib_purify($_REQUEST[$fileindex.'_hidden']);\n\t\t\t\t$file_saved = $this->uploadAndSaveFile($id,$module,$files);\n\t\t\t}\n\t\t}\n\n\t\t$log->debug(\"Exiting from insertIntoAttachment($id,$module) method.\");\n\t}", "title": "" }, { "docid": "0aa2bb621cefc1b53dc718fbe1ef3236", "score": "0.52310646", "text": "protected function ensureNoFileExists() {\n $errors = $this->builders->map(function(Builder $builder) {\n return $builder->fileExists();\n })->filter();\n\n if ($errors->count() === 1) {\n throw new \\Exception(\"Following file already exists: \" . $errors->first());\n } elseif ($errors->count() > 1) {\n throw new \\Exception(\"Following files already exist:\\n- \" . $errors->implode(\"\\n- \"));\n }\n }", "title": "" }, { "docid": "726da5ac9e56a0cd912c3dfc6e747279", "score": "0.52262694", "text": "public function assertFileDoesNotExist()\n {\n if ($this->exists()) {\n throw new ConfigExistsException($this->getFilePath(false));\n }\n }", "title": "" }, { "docid": "8a0015e0778ce80ee52b38d90d54bf36", "score": "0.5222756", "text": "function fl_writeifnotexists($filename,$str)\n{\n\t$fl_write_str = \"\\n\".$str;\n\t$infilestr = readfromfile($filename);\n\tif ($infilestr == false)\n\t\treturn writetofile($filename,$fl_write_str);\n\t\n\t\n\tif (fl_isexists($infilestr,$str) == FALSE)\n\t\treturn appendtofile($filename,$fl_write_str);\n\n\treturn 0;\n}", "title": "" }, { "docid": "36465346f2f9c51bd0498c13a4b3c03d", "score": "0.52163833", "text": "protected function _addFileElement()\n {\n $size = $this->getMaxFileSize();\n $byteSize = clone $this->getMaxFileSize();\n $byteSize->setType(Zend_Measure_Binary::BYTE);\n\n $fileValidators = array(\n new Zend_Validate_File_Size(array(\n 'max' => $byteSize->getValue())),\n new Zend_Validate_File_Count(1),\n );\n if ($this->_requiredExtensions) {\n $fileValidators[] =\n new Omeka_Validate_File_Extension($this->_requiredExtensions);\n }\n if ($this->_requiredMimeTypes) {\n $fileValidators[] =\n new Omeka_Validate_File_MimeType($this->_requiredMimeTypes);\n }\n // Random filename in the temporary directory.\n // Prevents race condition.\n $filter = new Zend_Filter_File_Rename($this->_fileDestinationDir\n . '/' . md5(mt_rand() + microtime(true)));\n $this->addElement('file', 'JSON_file', array(\n 'label' => __('Upload JSON File'),\n 'required' => true,\n 'validators' => $fileValidators,\n 'destination' => $this->_fileDestinationDir,\n 'description' => __(\"Maximum file size is %s.\", $size->toString())\n ));\n $this->JSON_file->addFilter($filter);\n }", "title": "" }, { "docid": "ceac5a08d760c72aad15728c956ee71e", "score": "0.521322", "text": "public function addFile($file = '')\r\n {\r\n if (!Helpers::is_string_ne($file) || !is_file($file)) {\r\n return false;\r\n }\r\n\r\n $this->files[] = $file;\r\n\r\n return true;\r\n }", "title": "" }, { "docid": "4667385e3f425ab4f9d3229ac250aa78", "score": "0.5202783", "text": "public function validateFile()\n\t{\n\t\tif (! $this->fileTmpLoc)\n\t\t{\n// \t\t\techo \"ERROR: Please browse for a file before clicking the upload button.\";\n// \t\t\techo $this->fileTmpLoc;\n// \t\t\texit();\n\t\t}\n\t\telse if ($this->fileSize > MAX_SIZE)\n\t\t{\n\t\t\techo \"ERROR: Your file was larger than 5 Megabytes in size.\";\n\t\t\tunlink($this->fileTmpLoc);\n\t\t\texit();\n\t\t}\n\t\telse if (! preg_match(\"/.(gif|jpg|png|jpeg)$/i\", $this->fileName))\n\t\t{\n\t\t\techo \"ERROR: Your image was not .gif, .jpg, or .png.\";\n\t\t\tunlink($this->fileTmpLoc);\n\t\t\texit();\n\t\t}\n\t\telse if ($this->fileErrorMsg == 1)\n\t\t{\n\t\t\techo \"ERROR: An error occured while processing the file. Try again.\";\n\t\t\texit();\n\t\t}\n\t}", "title": "" }, { "docid": "4c351c59a46f1808d7c374c36b1d8af6", "score": "0.5202246", "text": "private function validateFileCounts(): void\n {\n $yamlFiles = $this->getFilesByType(FileTypeDetector::TYPE_YAML);\n if (count($yamlFiles) > 1) {\n throw StructureException::moreThanOneYamlFile($this->directoryInfo, $yamlFiles);\n }\n $markdownFiles = $this->getFilesByType(FileTypeDetector::TYPE_MARKDOWN);\n if (count($markdownFiles) > 1) {\n throw StructureException::moreThanOneMarkdownFile($this->directoryInfo, $markdownFiles);\n }\n }", "title": "" }, { "docid": "127e8851a3ee4c8b650e36e913202ccd", "score": "0.51959455", "text": "function wp_start_scraping_edited_file_errors() {}", "title": "" }, { "docid": "433278fa687ded4cabe77529f2c61329", "score": "0.5179913", "text": "function add_file_to_database($table, $file, $target) {\n\n // Deactivate the 'current' file\n $sql = \"UPDATE $table SET current='no' WHERE current='yes'\";\n\n if ($result = mysqli_query($GLOBALS['mysqli'], $sql))\n {\n $target = addslashes($target);\n\n $sql = \"INSERT INTO $table (name, current, file_path) VALUES ('$file','yes','$target')\";\n if ($result = mysqli_query($GLOBALS['mysqli'], $sql))\n {\n echo $file . \" successfully uploaded.\";\n }\n else\n {\n echo \"ERROR adding file: \" . mysqli_error($GLOBALS['mysqli']);\n }\n }\n else\n {\n echo \"ERROR resetting current: \" . mysqli_error($GLOBALS['mysqli']);\n }\n }", "title": "" }, { "docid": "e878504a1e4933249f9f35c0084683c5", "score": "0.51766557", "text": "function verifyIncommingFiles($board) {\n $files = sane_file_array($_FILES);\n $acceptedFiles=array();\n if(!isset($files['file'])){\n return array();\n }\n foreach($files['file'] as $file) {\n \n if(isUploadError($file)) {\n continue;\n }\n \n //apparently the file type in $file['type']...\n //is just what the browser told the server...\n //still holding back....\n $finfo = new finfo(FILEINFO_MIME_TYPE);\n $filemime = $finfo->file($file['tmp_name']);\n \n $allowedMimes = allowedMimetypesByBoard($board);\n $mimeOK=false;\n foreach($allowedMimes as $aMime) {\n if($aMime[TFILETYPE::MIME] === $filemime){\n $mimeOK = $aMime;\n break;\n }\n }\n if(!$mimeOK) {\n continue;\n }\n $file['forced_fileending'] = $aMime[TFILETYPE::FILEENDING];\n \n //TODO make configurable\n if($file['size'] > (2 * 1024 * 1024)) { // 2MB\n continue;\n }\n \n $acceptedFiles[] = $file;\n }\n return $acceptedFiles;\n \n }", "title": "" }, { "docid": "9f20244538c3b44b43ee770669ada785", "score": "0.51687956", "text": "public function fileisinvalid($request,$addeditid=0)\n {\n \n \n //**** image code starts\n \n \n $allowedFileExtAr=array();\n $allowedFileExtAr[]=\"jpg\";\n $allowedFileExtAr[]=\"jpeg\";\n $allowedFileExtAr[]=\"png\";\n \n $filecontrolname=\"image_name\";\n \n \n\t\t\t\t$allowedFileExtSizeAr=array();\n $allowedFileExtSizeAr['jpg']=(5*1024*1024);\n\t\t\t\t$allowedFileExtSizeAr['jpeg']=(5*1024*1024);\n $allowedFileExtSizeAr['png']=(5*1024*1024);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//max_width & max_height ,min_width & min_height,equal_width & equal_height \n\t\t\t\t$allowedFileResolAr=array();\n\t\t\t\t\n\t\t\t\t$allowedFileResolAr['jpeg']=array('min_width'=>537,'min_height'=>507);\n\t\t\t\t$allowedFileResolAr['jpg']=array('min_width'=>537,'min_height'=>507);\n $allowedFileResolAr['png']=array('min_width'=>537,'min_height'=>507);\n $func=\"validatefile\";//validatefile/uploadfile\n \n \n $destinationsourcePath=public_path().\"/upload/userimage/source-file/\"; \n $chkimgresp=Imageuploadlib::imageupload($request,$filecontrolname,$allowedFileExtAr,$allowedFileExtSizeAr,$allowedFileResolAr,$func,$addeditid,$destinationsourcePath,$errfileAr=array()) ;\n \n \n \n \n \n /* echo \"==chkimg1==><pre>\";\n print_r($chkimgresp);\n echo \"</pre>\"; */ //exit();\n \n \n $invalidresp=false;\n \n $errormsgs=''; $fileuploadednames=array(); $errfileAr=array();\n $totalfileposted=0;\n \n if(!empty($chkimgresp))\n {\n \n \n if(array_key_exists('errormsgs',$chkimgresp))\n {\n $errormsgs=$chkimgresp['errormsgs'];\n }\n \n if(array_key_exists('errfileAr',$chkimgresp))\n {\n $errfileAr=$chkimgresp['errfileAr'];\n }\n \n if(array_key_exists('totalfileposted',$chkimgresp))\n {\n $totalfileposted=$chkimgresp['totalfileposted'];\n }\n \n }\n \n $resparray=array();\n $resparray['errormsgs']=$errormsgs;\n $resparray['errfileAr']=$errfileAr;\n $resparray['totalfileposted']=$totalfileposted;\n \n return $resparray;\n }", "title": "" }, { "docid": "3dbfb7d49458b1412717b13c7e99184e", "score": "0.51669", "text": "protected function addFile($file)\n {\n $this->files[$file->url] = $file;\n }", "title": "" }, { "docid": "931b8344dfc05321a22ace33e2b17def", "score": "0.5158369", "text": "function addFilePart($file_id) {\n \t\t$selectF = myF(myQ(\"SELECT * FROM `[x]files` WHERE `file_id`='\".$file_id.\"' LIMIT 1\"));\n\t\t\n\t\tif ($selectF['translation_status']==0 && $selectF['translator_id']>0) {\n\t\t\n\t\t\t/* Se genereaza un cod UNIC care se va folosi ca ID in Tabela */\n\t\t\t$unic_id = rand(100,999).rand(100,999).rand(100,999).time();\n\t\t\t\n\t\t\t// !!!!!!!!!!!!\n\t\t\t$translation_deadline = time() + _fnc(\"file_deadline\", $selectF['characters_nr']);\n\t\t\t\n\t\t\t\n\t\t\t/* insert to database a new file */\n\t\t\tmyQ(\"INSERT INTO `[x]files_to_translator` (\t\t\t\n\t\t\t\t\t`unic_id`, `company_id`, `original_name`, `original_file`, `parent_file_id`, `parent_file_to_translator_id`, `translator_id`, `languages_type`, `status_file`, \n\t\t\t\t\t`addtime`, `translation_deadline`, `ft_price`, `ft_price_discount`, `salary_translator`, `translation_type`, `translation_method`\t\t\t\t\n\t\t\t\t) VALUES (\t\t\t\t \n\t\t\t\t\t'\".$unic_id.\"', '\".$selectF['company_id'].\"', '\".$selectF['original_name'].\"', '\".$selectF['original_file'].\"', '\".$selectF['file_id'].\"', '0', '\".$selectF['translator_id'].\"', '\".$selectF['languages_type'].\"', '20', \n\t\t\t\t\t'\".time().\"', '\".$translation_deadline.\"', '\".$selectF['price'].\"', '\".$selectF['price_discount'].\"', '\".$selectF['salary_translator'].\"', '0', '1'\n\t\t\t\t)\n\t\t\t\");\t\n\t \n\t\t\t/* Adaugam si in tabela FILES metoda prin care are loc traducerea fisierului */\n\t\t\tmyQ(\"UPDATE `[x]files` SET `translation_status`='1', `translation_method`='1' WHERE `file_id`='\".$file_id.\"' LIMIT 1\");\n\t\t}\n \t}", "title": "" }, { "docid": "575e6f62ab38c1ecb3f5fe8f2475b5f4", "score": "0.5149008", "text": "function maybe_upload_attachments() {\n $files = [];\n\n foreach ( $this->form_instance->fields as $field ) {\n $field = wp_parse_args( $field, $this->get_default_field_args() );\n\n if ( $field['type'] == 'file' ) {\n\n if ( $this->validate_attachment( $field ) ) {\n $file = $this->upload_attachment( $field['name'] );\n\n $files[] = $file['path'];\n\n } else if ( $field['required'] ) {\n $this->send_response([\n 'message' => 'Err 5: File validation failed.'\n ]);\n }\n }\n }\n\n $this->files = $files;\n }", "title": "" }, { "docid": "41fea844fc3c777ba361d6b3c90ea1dd", "score": "0.51472694", "text": "public function badTestUpload()\n\t{\n\t\tGlobals::setUser($this->_getDummy());\n\t\t\n\t\t$_FILES = array(\n\t\t\t'media' => array(\n\t\t\t\t'name' => 'uploadBareges.jpg',\n\t\t\t\t'type' => 'image/jpeg',\n\t\t\t\t'tmp_name' => './files/bareges.jpg',\n\t\t\t\t'error' => '0',\n\t\t\t\t'size' => '93696',\n\t\t\t),\n\t\t);\n\t\t\n\t\t$this->request->setPost(array(\n\t\t\t'MAX_FILE_SIZE' => '4194304',\n\t\t\t'title' => 'Bareges',\n\t\t\t'description' => '360 method',\n\t\t\t'author' => 'paul taylor',\n\t\t\t'riders' => array(),\n\t\t\t'trick' => '',\n\t\t\t'spot' => '',\n\t\t\t'longitude' => '',\n\t\t\t'latitude' => '',\n\t\t\t'zoom' => '0',\n\t\t\t'yaw' => '',\n\t\t\t'pitch' => '',\n\t\t\t'mapType' => '0',\n\t\t));\n\t\t\n\t\t$this->dispatch('/envoyer/photo');\n\t}", "title": "" }, { "docid": "00fa41f5d14fe3188bc41e1a98daf295", "score": "0.51416194", "text": "public function add_files() {\n $files = array();\n foreach($_FILES as $f) {\n $tmp = is_array($f['tmp_name']) ? $f['tmp_name'][0] : $f['tmp_name'];\n $name = is_array($f['name']) ? $f['name'][0] : $f['name'];\n $error = is_array($f['error']) ? $f['error'][0] : $f['error'];\n $sha = $this->Resource->createFile($tmp, array(\n 'filename' => $name, \n 'thumb' => true\n ));\n $files[] = array(\n 'name' => $name,\n 'error' => $error,\n 'sha' => $sha,\n 'thumb' => $this->Resource->url($sha, 'thumb.png'),\n 'preview' => is_file($this->Resource->path($sha, 'preview.png')) ?\n $this->Resource->url($sha, 'preview.png') : \n $this->Resource->url($sha, $name)\n );\n }\n $this->json(201, $files);\n }", "title": "" }, { "docid": "f6c3c29109fcd35d186aebeb596918a0", "score": "0.51284486", "text": "function validateFile()\n {\n if ($this->getFilePath() === null) {\n throw new Exception(\"The file was not informed.\");\n }\n\n if (!$this->exists()) {\n throw new Exception(sprintf('File not found in: %s.', $this->getFilePath()));\n }\n }", "title": "" }, { "docid": "8e8f789a63c0f1986659e70d96b0f543", "score": "0.5128024", "text": "public function testAddPhotoWithNoPhoto()\n {\n $this->vcard->addPhoto(__DIR__ . '/wrongfile', true);\n }", "title": "" }, { "docid": "e5e25ee548b697c8ea5555d5f4317d5b", "score": "0.5125397", "text": "public static function assertFileDoesNotExist(string $filename, string $message = ''): \\void {}", "title": "" }, { "docid": "f9b0a41315cf90d077b29b7a6e09ffa6", "score": "0.5124019", "text": "function uploadFiles() {\n// if()\n}", "title": "" }, { "docid": "89a6d2a167fd299d415f10d954d9a6a2", "score": "0.5119202", "text": "public function addFile($file)\r\n {\r\n $file_id = $file->getId();\r\n\r\n if ($id = $this->fileExists($file_id)) {\r\n return $id;\r\n }\r\n\r\n $db = new DB_Sql();\r\n $db->query(\"INSERT INTO filehandler_append_file SET\r\n date_updated = NOW(),\r\n intranet_id = \".$this->user->getActiveIntranetId().\",\r\n belong_to_key = \".$this->belong_to_key.\",\r\n belong_to_id = \".$this->belong_to_id.\",\r\n file_handler_id = \".$file_id.\",\r\n date_created = NOW()\");\r\n\r\n return $db->insertedId();\r\n }", "title": "" }, { "docid": "6abdcc33f481e6d651dc8727df1e8915", "score": "0.5118906", "text": "function file_post_update_add_txt_if_allows_insecure_extensions(&$sandbox = NULL) {\n if (\\Drupal::config('system.file')->get('allow_insecure_uploads')) {\n return t('The system is configured to allow insecure file uploads. No file field updates are necessary.');\n }\n\n $updater = function (FieldConfig $field) {\n // Determine if this field uses an item definition that extends FileItem.\n if (is_subclass_of($field->getItemDefinition()->getClass(), FileItem::class)) {\n $allowed_extensions_string = trim($field->getSetting('file_extensions'));\n $allowed_extensions = array_filter(explode(' ', $allowed_extensions_string));\n if (in_array('txt', $allowed_extensions, TRUE)) {\n // Since .txt is specifically allowed, there's nothing to do.\n return FALSE;\n }\n foreach ($allowed_extensions as $extension) {\n // Allow .txt if an insecure extension is allowed.\n if (preg_match(FileSystemInterface::INSECURE_EXTENSION_REGEX, 'test.' . $extension)) {\n $allowed_extensions_string .= ' txt';\n $field->setSetting('file_extensions', $allowed_extensions_string);\n return TRUE;\n }\n }\n return FALSE;\n }\n };\n \\Drupal::classResolver(ConfigEntityUpdater::class)->update($sandbox, 'field_config', $updater);\n}", "title": "" }, { "docid": "38f39933e0ac0ae0bc7990b1daf47da2", "score": "0.51133645", "text": "function filetype_blacklisted() {\n $blacklist = ecu_get_blacklist();\n return preg_match('/\\\\.((' . implode('|', $blacklist)\n . ')|~)([^a-z0-9]|$)/i', $_FILES['file']['name']);\n }", "title": "" }, { "docid": "cdb29954c60b4d447f1b908da144fa21", "score": "0.51131433", "text": "private function checkFileFormat() : void\n\t{\n\t\t$imageFileType = strtolower($this->file);\n\t\t$imageFileType = substr($imageFileType, strrpos($imageFileType, '.') + 1);\n\t\tif (!\\in_array($imageFileType, $this->allowedFiletypes, true)) {\n\t\t\t$this->info = 'Sorry, only JPG, JPEG, PNG & GIF files are allowed.';\n\t\t\t$this->uploadOK = false;\n\t\t}\n\t}", "title": "" }, { "docid": "a64f756f95de0f4fe81bc5864d102da1", "score": "0.51119506", "text": "public function testBinarySafeness()\n {\n // make test data that contains null bytes.\n $data = str_repeat(\"deadbeefcafe\\0\", 1000);\n\n // make file obj to stick data in.\n $file = new P4_File;\n $file->setFilespec('//depot/test-file')\n ->setLocalContents($data);\n\n // make sure we wrote the local data correctly.\n $this->assertSame(\n $data,\n $file->getLocalContents(),\n 'Expected matching data.'\n );\n\n // open for add and ensure type is binary.\n $file->add();\n $this->assertTrue($file->isOpened(), 'Expected file to be open.');\n $this->assertSame(\n 'binary',\n $file->getStatus('type'),\n 'Expected binary file type.'\n );\n $file->submit('Test of binary data.');\n\n // ensure depot contents match test data.\n $this->assertSame(\n $data,\n $file->getDepotContents(),\n 'Expected matching depot vs. in-memory data post submit.'\n );\n $this->assertSame(\n $file->getLocalContents(),\n $file->getDepotContents(),\n 'Expected matching depot vs. local data post submit.'\n );\n\n // try again with fresh objects.\n $file = P4_File::fetch('//depot/test-file');\n $this->assertSame(\n $data,\n $file->getDepotContents(),\n 'Expected matching data w. fresh file obj.'\n );\n $query = P4_File_Query::create()->addFilespec('//depot/...');\n $files = P4_File::fetchAll($query);\n $this->assertSame(\n $data,\n $files->current()->getDepotContents(),\n 'Expected matching data via fetch all'\n );\n\n // re-type to text and try again (should still be binary safe).\n $file->edit(null, 'text')->submit('now text');\n $this->assertSame(\n 'text',\n $file->getStatus('headType'),\n 'Expected text file type.'\n );\n $this->assertSame(\n $data,\n $file->getDepotContents(),\n 'Expected matching data even w. text file type.'\n );\n $file = P4_File::fetch('//depot/test-file');\n $this->assertSame(\n $data,\n $file->getDepotContents(),\n 'Expected matching data w. text type and fresh file obj.'\n );\n\n // try binary data in attributes.\n $file = new P4_File;\n $file->setFilespec('//depot/file-w-attr')\n ->touchLocalFile()\n ->add()\n ->setAttribute('foo', $data);\n $this->assertSame(\n $data,\n $file->getOpenAttribute('foo'),\n 'Expected matching data in attribute.'\n );\n\n // submit and check again.\n $file->submit('binary attr.');\n $this->assertSame(\n $data,\n $file->getAttribute('foo'),\n 'Expected matching data in attribute post submit.'\n );\n\n // fetch and check again.\n $file = P4_File::fetch('//depot/file-w-attr');\n $this->assertSame(\n $data,\n $file->getAttribute('foo'),\n 'Expected matching data in attribute post submit w. fresh file obj.'\n );\n }", "title": "" }, { "docid": "216ee55afbb8464966daeaf2b6b47015", "score": "0.5110357", "text": "public function addFile($file) \n\t{\n\t\t$file = $this->getPath();\n\t\tif( file_exists($file) ) \n\t\t{\n\t\t\t$fp = fopen( $file, \"r\");\n\t\t\t$this->document[] = $this->parseCode(fread($fp, filesize( $file)));\n\t\t\tfclose($fp);\n\t\t\treturn 1;\n\t\t}\n\t\tthrow new TemplateFileNotFoundException($file);\n\t}", "title": "" }, { "docid": "f3ae383034600f09561182022c6c31b3", "score": "0.51039284", "text": "public function testWriteFileFailedThrowsFileSystemException() {\n\t\t$this->markTestIncomplete(\"Write the test case & check message & throw code\");\n\t\t$var = FileSystem::getInstance();\n\t\t// @todo, check message & throw code\n\t\tunset($var);\n\t}", "title": "" }, { "docid": "998b7b12f1faf305ddd59a4b4dd7d12c", "score": "0.5100226", "text": "protected function processFileTag($fileTag)\n\t{\n\t\tif(!isset($fileTag['type']))\n\t\t{\n\t\t\tthrow new FileFormatException('The <file> tag must have the \\'type\\' attribute.');\n\t\t}\n\t\t$this->files[(string)$fileTag['type']] = (string)$fileTag;\n\t}", "title": "" }, { "docid": "aeae689597f0067a57186330df53e9d2", "score": "0.50997305", "text": "public function test_file_get_data_invalidfile() {\n $found = maintenance_static_page_io::file_get_data(__DIR__.'/fixtures/invalidfile');\n self::assertSame('', $found['contents']);\n self::assertSame('unknown', $found['mime']);\n self::assertCount(1, $this->getDebuggingMessages());\n $this->resetDebugging();\n }", "title": "" }, { "docid": "d4957431fe1d64a6385c0142feedaf2d", "score": "0.5098927", "text": "function _webform_record_file_usage(array $uuids, $type, $id) {\n if (empty($uuids) || !\\Drupal::moduleHandler()->moduleExists('file')) {\n return;\n }\n\n /** @var \\Drupal\\file\\FileUsage\\FileUsageInterface $file_usage */\n $file_usage = \\Drupal::service('file.usage');\n\n foreach ($uuids as $uuid) {\n if ($file = \\Drupal::entityManager()->loadEntityByUuid('file', $uuid)) {\n if ($file->status !== FILE_STATUS_PERMANENT) {\n $file->status = FILE_STATUS_PERMANENT;\n $file->save();\n }\n $file_usage->add($file, 'editor', $type, $id);\n }\n }\n}", "title": "" }, { "docid": "f44ca7c84c4781c5f4ae84c0766bd9f9", "score": "0.5095622", "text": "public function addimage($imagearray) {\n $folder_upload = \"img/\";\n $extension = array(\"jpeg\", \"jpg\", \"png\", \"gif\");\n if (empty($imagearray['tmp_name'])) {\n return;\n }\n //$message = \" \";\n $size = \\getimagesize($imagearray['tmp_name']);\n // $mimetype = stripslashes($size['mime']); \n if ((empty($size) || ($size[0] === 0) || ($size[1] === 0))) {\n throw new \\Exception('This is unacceptable!. image must be of type : gif, jpeg, png or jpg and less than 2mb.');\n }\n $finfo = new \\finfo(FILEINFO_MIME_TYPE);\n// //$filename = \"company_staff_ids/\".$staff_id;\n $file_type = $finfo->file(h($imagearray['tmp_name']), FILEINFO_MIME_TYPE);\n// \n// echo $file_type; exit;\n if (!(($file_type == \"image/gif\") || ($file_type == \"image/png\") || ($file_type == \"image/jpeg\") ||\n ($file_type == \"image/pjpeg\") || ($file_type == \"image/x-png\"))) {\n throw new \\Exception('This is unacceptable!. image must be of type : gif, jpeg, png or jpg and less than 2mb .');\n }\n\n $file_name = $imagearray['name'];\n $ext = pathinfo($file_name, PATHINFO_EXTENSION);\n\n if (in_array($ext, $extension)) {\n $file_name = md5(uniqid($imagearray['name'], true)) . time();\n\n if (!file_exists($folder_upload . $file_name . '.' . $ext)) {\n $file_name = $file_name . '.' . $ext;\n move_uploaded_file($imagearray[\"tmp_name\"], $folder_upload . $file_name);\n\n chmod($folder_upload . $file_name, 0644);\n return $message = $file_name;\n } else {\n $filename = basename($file_name, $ext);\n $newFileName = crypt($filename . time()) . \".\" . $ext;\n // echo $file_name; exit;\n move_uploaded_file($imagearray[\"tmp_name\"], $folder_upload . $newFileName);\n chmod($folder_upload . $newFileName, 0644);\n return $message = $file_name;\n }\n } else {\n return $message = 'Unable to upload image, please ensure you are uploading a jpg,png,gif or Jpeg file. ';\n // debug(json_encode( $error, JSON_PRETTY_PRINT)); exit;\n }\n\n\n return $message = \"images upload successful\";\n }", "title": "" }, { "docid": "8e3f62a08a16c857925fddf16d504059", "score": "0.50944424", "text": "public function add_file(){\n $userid = $this->userobj->userid;\n\t\n if($this->check_form_input()) {\n $title = $this->input->post('title');\n $category = $this->input->post('category');\n $other_category = $this->input->post('other_category');\n\n $cat_id = getCategoryID($category);\n if(!empty($other_category)) {\n $cat_id = $this->file_folder_model->add_category('filing', $other_category,$userid);\n }\n\t \n // add the file inorder to get the file ID\n $table_name = $this->session->userdata('group').'_folder_files';\n $file_id = $this->filemanager->upload_file(1, $table_name, 0);\n\n $data['file_id'] = $file_id;\n $data['title'] = $title;\n $data['userid'] = $userid;\n $data['cat_id'] = $cat_id;\n $this->file_folder_model->add_file($data);\n\n redirect('group/file_folder');\n } else {\n $data['error_message'] = $this->error_message;\n $this->load_view('error/error_and_back',$data);\n return;\n }\n }", "title": "" }, { "docid": "edfb28af4ab1a6ca914c00f19cbc5a93", "score": "0.5073862", "text": "function salvatore_check_file($file){\n\tif (!file_exists($file)){\n\t\tthrow new Exception(\"Erreur : Le fichier $file est introuvable\");\n\t}\n}", "title": "" }, { "docid": "5c2e980492804bd52aaf542199770081", "score": "0.50736845", "text": "function check_uploaded_file($file_array) {\n if (!is_uploaded_file($file_array['tmp_name'])) {\n echo \"File NOT uploaded OK<br>\";\n die(upload_form());\n } elseif ($file_array['size'] < 1) {\n echo \"File was empty\";\n die(upload_form());\n } elseif ($file_array['error'] > 0) {\n echo \"Uploading file encountered error #\" . $file_array['error'];\n die(upload_form());\n } elseif ($file_array['type'] != 'text/xml') {\n echo \"Expected file of type 'text/xml', but got \" . $file_array['type'];\n die(upload_form());\n } else {\n //echo \"File seems uploaded OK<br>\";\n return true;\n }\n}", "title": "" }, { "docid": "bd5d771ef757d2de395132552b5e71a8", "score": "0.507336", "text": "private static function createACHEFTBatchFileInvalidFormat() {\n // Use timestamp as base for unique ID.\n $timestamp = time();\n\n $batchData = array(\n array(\n ($timestamp + 1),\n 'Test',\n ),\n array (\n ($timestamp + 2),\n 'Test',\n )\n );\n\n self::createBatchFileFromArray($batchData, 'ACHEFTInvalidFormatBatch.txt');\n }", "title": "" }, { "docid": "28080fafe8da962436b420baf6535941", "score": "0.50711775", "text": "function upload_file_with_validation() {\n\t\t$temp_file_name = trim($this->temp_file_name);\t\t\t//Trim Temp File Name\n\t\t$file_name = trim(strtolower($this->file_name));\t\t\t\t//Trim File Name\n\t\t$upload_dir = $this->get_upload_directory();\t\t\t\t\t//Trim Upload Directory\n\t\t$upload_log_dir = $this->get_upload_log_directory();\t\t\t//Trim Upload Log Directory\n\t\t$file_size = $this->get_file_size();\t\t\t\t\t\t\t\t//Get File Size\n\t\t$ip = trim($_SERVER['REMOTE_ADDR']);\t\t\t\t\t\t//Get IP Address\n\t\t$cpu = gethostbyaddr($ip);\n\t\t$m = date(\"m\");\t\t\t\t\t\t\t\t\t\t\t\t\t//Get month\n\t\t$d = date(\"d\");\t\t\t\t\t\t\t\t\t\t\t\t\t//Get day\n\t\t$y = date(\"Y\");\t\t\t\t\t\t\t\t\t\t\t\t\t//Get year\n\t\t$date = date(\"m/d/Y\");\t\t\t\t\t\t\t\t\t\t\t//Get today's date\n\t\t$time = date(\"h:i:s A\");\t\t\t\t\t\t\t\t\t\t\t//Get now's time\n\t\t$valid_user = $this->validate_user();\t\t\t\t\t\t\t//Validate the user\n\t\t$valid_size = $this->validate_size();\t\t\t\t\t\t\t//Validate the size\n\t\t$valid_ext = $this->validate_extension();\t\t\t\t\t\t//Validate the extension\n\t\t$existing_file = $this->existing_file();\t\t\t\t\t\t\t//File Existing\n\t\t\n\t\t\n\t\tif (($upload_dir == \"ERROR\") OR ($upload_log_dir == \"ERROR\")) {\n\t\t\treturn false;\n\t\t}\n\t\tif ((((!$valid_user) OR (!$valid_size) OR (!$valid_ext) OR ($existing_file)))) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\tif (is_uploaded_file($temp_file_name)) {\t\t\t\t\t\t\t\t//Check if file is uploaded\n\t\t\tif (move_uploaded_file($temp_file_name,$upload_dir . $file_name)) {\n\t\t\t\t\n\t\t\t\t$log = $upload_log_dir.$y.\"_\".$m.\"_\".$d.\".txt\";\t\t\t\t//Log File Name\n\t\t\t\t$fp = fopen($log,\"a+\");\t\t\t\t\t\t\t\t\t\t\t//Set File Pointer\n\t\t\t\tfwrite($fp,\"\\n$ip-$cpu | $file_name | $file_size | $date | $time\");\t\t//Write File\n\t\t\t\tfclose($fp);\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Close File Pointer\n\t\t\t\treturn true;\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Return true after upload and written log\n\t\t\t} else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Else\n\t\t\treturn false;\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Return False\n\t\t\t}\n\t\t\t} else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Else\n\t\t\treturn false;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Return False\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "716a1fe52f3b28f9265e7a5e874b245b", "score": "0.5070784", "text": "public function add_attachments() {\n global $CFG, $DB;\n\n // Note: $attachments is an array, who it's 5 sub-array in here.\n // name, type, tmp_name. size, error who have an arrays.\n\n // Prevent errors.\n if ( empty($this->oldattachments) and\n ( empty($this->attachments) or\n ( isset($this->attachments['FILE_0']['error']) and $this->attachments['FILE_0']['error'] == 4)\n )\n ) {\n return true;\n }\n\n // Get course for upload manager.\n if ( !$course = $DB->get_record('course', array('id' => $this->course)) ) {\n return '';\n }\n\n require_once($CFG->dirroot.'/lib/uploadlib.php');\n\n // Get directory for save this attachments.\n $dir = $this->get_file_area();\n\n // Now, delete old corresponding files.\n if ( !empty( $this->oldattachments) ) {\n // Working in same email.\n if ( $this->type != EMAIL_FORWARD and $this->type != EMAIL_REPLY and $this->type != EMAIL_REPLYALL ) {\n // Necessary library for this function.\n include_once($CFG->dirroot.'/lib/filelib.php');\n\n // Get files of mail.\n if ($files = get_directory_list($dir)) {\n\n // Process all attachments.\n foreach ($files as $file) {\n // Get path of file.\n $attach = $this->get_file_area_name() . '/' .$file;\n\n $attachments[] = $attach;\n }\n }\n\n if ( $diff = array_diff($attachments, $this->oldattachments) ) {\n foreach ($diff as $attachment) {\n unlink($CFG->dataroot.'/'.$attachment); // Drop file.\n }\n }\n\n } else if ( $this->type === EMAIL_FORWARD ) { // Copy $this->oldattachments in this new email.\n foreach ($this->oldattachments as $attachment) {\n copy($CFG->dataroot . '/' . $attachment, $this->get_file_area() . '/' . basename($attachment));\n }\n }\n }\n\n if ( !empty($this->attachments) or\n ( isset($this->attachments['FILE_0']['error']) and $this->attachments['FILE_0']['error'] != 4)\n ) {\n // Now, processing all attachments.\n $um = new upload_manager(null, false, false, $course, false, 0, true, true);\n\n if ( !$um->process_file_uploads($dir) ) {\n // Empty file upload. Error solve in latest version of moodle.\n // Warning! Only comprove first mail. Bug of uploadlib.php.\n $message = get_string('uploaderror', 'assignment');\n $message .= '<br />';\n $message .= $um->get_errors();\n print_simple_box($message, '', '', '', '', 'errorbox');\n print_continue($CFG->wwwroot . '/blocks/binerbo/dashboard.php?id=' . $course->id);\n print_footer();\n die;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "ae7c25724a1526bf93fb4b84c6083d90", "score": "0.50674576", "text": "public function testAddAisleFile()\n {\n }", "title": "" }, { "docid": "db5a1978b7900d59750eb7841e7be83c", "score": "0.50665015", "text": "function store_uploaded_files($fid, $module, $type, $id) {\n\t\n\t$file = file_load($fid); // Load the file via file.fid.\n\n\t$file->status = FILE_STATUS_PERMANENT; \t// Change status to permanent.\n\t\n\tfile_save($file); // Save.\n\t\n\tfile_usage_add($file, $module, $type, $id); // Record that the module is using the file.\n}", "title": "" }, { "docid": "fb62c6adcc01c0b4e9d51e6c52213ff7", "score": "0.5065286", "text": "public function testAddFile()\n {\n $object = new FormBuilder;\n $object->addFile('filename', ['class' => 'Special']);\n\n $this->assertSame(\n [\n 'form',\n ['action' => '', 'method' => 'POST'],\n [\n [\n 'input',\n [\n 'name' => 'filename',\n 'type' => 'file',\n 'class' => 'Special'\n ]\n ]\n ]\n ],\n $object->get()\n );\n }", "title": "" }, { "docid": "b898e93835b63d8970260e3c63f2cb96", "score": "0.50629264", "text": "function moodleforum_add_attachment($post, $forum, $cm) {\n global $DB;\n\n if (empty($post->attachments)) {\n return true; // Nothing to do.\n }\n\n $context = context_module::instance($cm->id);\n\n $info = file_get_draft_area_info($post->attachments);\n $present = ($info['filecount'] > 0) ? '1' : '';\n file_save_draft_area_files($post->attachments, $context->id, 'mod_moodleforum', 'attachment', $post->id,\n mod_moodleforum_post_form::attachment_options($forum));\n\n $DB->set_field('moodleforum_posts', 'attachment', $present, array('id' => $post->id));\n\n return true;\n}", "title": "" }, { "docid": "430578a98a2687dcbb60a14e258e1b89", "score": "0.50602955", "text": "public function testTouchInvalidFileName()\n {\n $this->expectException(UnknownException::class);\n\n // The '\\0' is an illegal symbol for linux file name\n // and '*' is an illegal symbol for windows file name.\n $this->fs->touchFile('temp/!@#$%^&*()_\\0+');\n }", "title": "" }, { "docid": "f7e7d5c98b5ec3b6275061811783dc4a", "score": "0.50595295", "text": "protected function addFileToNotificationCollection () {\n }", "title": "" }, { "docid": "a001d7d2f58d718f71356e81431ca9dc", "score": "0.5058648", "text": "function add() {\n\tif (empty($_POST['ip'])) redirect('/admin/ip_ban.php');\n\t$ip = trim($_POST['ip']);\n\t$error = null;\n\t\n\t\n\tif (!preg_match('#^\\d{1,3}\\.\\d{1,3}.\\d{1,3}.\\d{1,3}$#', $ip)) $error = '<li>' . sprintf(__('Wrong chars in \"...\"'), 'IP') . '</li>';\n\tif (!empty($error)) {\n\t\t$_SESSION['add']['errors'] = '<ul class=\"uz_err\">' . $error . '</ul>';\n\t\tredirect('/admin/ip_ban.php');\n\t}\n\t\n\tif (empty($error)) {\n\t\ttouchDir(ROOT . '/sys/logs/ip_ban/');\n\t\t$f = fopen(ROOT . '/sys/logs/ip_ban/baned.dat', 'a+');\n\t\tfwrite($f, $ip . \"\\n\");\n\t\tfclose($f);\n\t}\n\t\n\tredirect('/admin/ip_ban.php');\n}", "title": "" }, { "docid": "8feffc4589dc2be6e62547bcb9773c0b", "score": "0.50522053", "text": "function digestforum_add_attachment($post, $digestforum, $cm, $mform=null, $unused=null) {\n global $DB;\n\n if (empty($mform)) {\n return false;\n }\n\n if (empty($post->attachments)) {\n return true; // Nothing to do\n }\n\n $context = context_module::instance($cm->id);\n\n $info = file_get_draft_area_info($post->attachments);\n $present = ($info['filecount']>0) ? '1' : '';\n file_save_draft_area_files($post->attachments, $context->id, 'mod_digestforum', 'attachment', $post->id,\n mod_digestforum_post_form::attachment_options($digestforum));\n\n $DB->set_field('digestforum_posts', 'attachment', $present, array('id'=>$post->id));\n\n return true;\n}", "title": "" }, { "docid": "396fc9d7836fbba7c821b1180aa871ae", "score": "0.5049646", "text": "private function check_upload() {\n\t\t$error_cmds = array(1 => ': php.ini max file size exceeded', \n \t\t 2 => ': html form max file size exceeded', \n \t\t 3 => ': file upload was only partial', \n \t\t4 => ': no file was attached', \n\t \t5 => ': The servers temporary folder is missing', \n\t \t 6 => ': Failed to write to the temporary folder.'); \n\n\n\t\t($_FILES[$this->fieldname]['error_cmd'] == 0) \n\t\t or error_cmd($this->cmdid, ERR_UPLOAD, $this->uid.$error_cmds[$_FILES[$this->fieldname]['error_cmd']]); \n\t\n\t\t@is_uploaded_file($_FILES[$this->fieldname]['tmp_name'])\n\t\t or error_cmd($this->cmdid, ERR_NO_IMAGE, $this->uid.': tmp pic file is not exist'); \n\n\t\t@is_uploaded_file($_FILES[$this->rec_fieldname]['tmp_name'])\n\t\t or error_cmd($this->cmdid, ERR_NO_IMAGE, $this->uid.': tmp rec file is not exist'); \n\n\t\t@getimagesize($_FILES[$this->fieldname]['tmp_name']) \n \t\tor error_cmd($this->cmdid, ERR_NOT_IMAGE, $this->uid.': only image uploads are allowed'); \n\t}", "title": "" }, { "docid": "1d36fb58acaaf675822774a7a7073dc4", "score": "0.50492615", "text": "public static function assertFileNotExists(string $filename, string $message = ''): \\void {}", "title": "" }, { "docid": "a638b8a50452ef7958ac7997cf3abc37", "score": "0.5046835", "text": "public function testValidateBadCase()\n {\n $this->fileControlBadCase->validate();\n $this->assertNotEmpty($this->fileControlBadCase->errors);\n }", "title": "" }, { "docid": "ea5247fc4aa35372faff3ed8618e5097", "score": "0.50335354", "text": "public function attatch_file($file) {\n\n // check errors\n if (!$file || empty($file) || !is_array($file)) {\n $this->errors[] = read_xmls('/site/msg/nofile');\n return false;\n } elseif ($file['error'] != 0) {\n $this->errors[] = $this->upload_errors[$file['error']];\n return false;\n } elseif (\n strstr($file['type'], '/', false) != '/x-shockwave-flash'\n && strstr($file['type'], '/', false) != '/pdf'\n && strstr($file['type'], '/', true) != 'video'\n && strstr($file['type'], '/', true) != 'audio'\n && strstr($file['type'], '/', false) != '/msword'\n && substr(strstr($file['type'], '/', false),0,5) != '/vnd.'\n ) {\n\n $this->errors[] = read_xmls('/site/file/msg/notfile');\n return false;\n } else {\n // set object attributs to the form parameters\n $basName = str_replace(\" \", \"_\", basename($file['name']));\n $ext = strstr($basName, '.');\n $this->temp_path = $file['tmp_name'];\n $this->filename = rand(100000,100000000) . $ext;\n $this->type = $file['type'];\n $this->size = $file['size'];\n return true;\n }\n }", "title": "" }, { "docid": "20f0e7e8c677eb994a838df7e96d18d5", "score": "0.5033187", "text": "private function _add_item($album_id, $tmp_name, $name) {\n $extension = pathinfo($name, PATHINFO_EXTENSION);\n\n try {\n $item = ORM::factory(\"item\");\n $item->name = $name;\n $item->title = item::convert_filename_to_title($name);\n $item->parent_id = $album_id;\n $item->set_data_file($tmp_name);\n\n if (!$extension) {\n throw new Exception(t(\"Uploaded file has no extension\"));\n } else if (legal_file::get_photo_extensions($extension)) {\n $item->type = \"photo\";\n $item->save();\n log::success(\"content\", t(\"Added a photo\"),\n html::anchor(\"photos/$item->id\", t(\"view photo\")));\n } else if (movie::allow_uploads() && legal_file::get_movie_extensions($extension)) {\n $item->type = \"movie\";\n $item->save();\n log::success(\"content\", t(\"Added a movie\"),\n html::anchor(\"movies/$item->id\", t(\"view movie\")));\n } else {\n throw new Exception(t(\"Uploaded file has illegal extension\"));\n }\n } catch (Exception $e) {\n // Log errors then re-throw exception.\n Kohana_Log::add(\"error\", $e->getMessage() . \"\\n\" . $e->getTraceAsString());\n\n // If we have a validation error, add an additional log entry.\n if ($e instanceof ORM_Validation_Exception) {\n Kohana_Log::add(\"error\", \"Validation errors: \" . print_r($e->validation->errors(), 1));\n }\n\n throw $e;\n }\n\n return $item;\n }", "title": "" }, { "docid": "6b575d3b645188d75f25e2a91086722d", "score": "0.503069", "text": "function checkFile(){\n $valid = false;\n $errors=array();\n for ($i=0; $i<sizeof($_FILES['attachments']['name']);$i++)\n {\n $file_name = $_FILES['attachments']['name'][$i];\n $file_size =$_FILES['attachments']['size'][$i];\n $file_type=$_FILES['attachments']['type'][$i];\n \n $file_ext=strtolower(end(explode('.', $_FILES['attachments']['name'][$i])));\n $extensions= array(\"jpeg\",\"jpg\",\"png\",\"pdf\");\n if(in_array($file_ext,$extensions) === false){\n $errors[]=\"extension not allowed, please choose a JPEG,JPG,PNG or PDF file.\";\n $_SESSION[\"message\"] = \"This Type of file is not allowed, please choose a JPEG,JPG,PNG or PDF file.\\n\";\n }\n if($file_size > 5242880){\n $errors[]='File size must be smaller than 5 MB';\n $_SESSION[\"message\"] = \"File size must be smaller than 5 MB \\n\";\n }\n }\n\n if(empty($errors)==true){\n $valid = true;\n }\n return $valid;\n }", "title": "" }, { "docid": "c6fe68ad41fc760de47b063445c8fbb4", "score": "0.5027162", "text": "public function presskitfileisinvalid($request,$addeditid=0)\n {\n \n \n //**** image code starts\n \n \n $allowedFileExtAr=array();\n $allowedFileExtAr[]=\"pdf\";\n \n \n $filecontrolname=\"presskit_name\";\n \n \n\t\t\t\t$allowedFileExtSizeAr=array();\n $allowedFileExtSizeAr['pdf']=(5*1024*1024);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//max_width & max_height ,min_width & min_height,equal_width & equal_height \n\t\t\t\t$allowedFileResolAr=array();\n\t\t\t\t\n\t\t\t\t//$allowedFileResolAr['jpeg']=array('min_width'=>537,'min_height'=>507);\n\t\t\t\t\n $func=\"validatefile\";//validatefile/uploadfile\n \n \n $destinationsourcePath=public_path().\"/upload/press-kit/source-file/\"; \n $chkimgresp=Imageuploadlib::imageupload($request,$filecontrolname,$allowedFileExtAr,$allowedFileExtSizeAr,$allowedFileResolAr,$func,$addeditid,$destinationsourcePath,$errfileAr=array()) ;\n \n \n \n \n \n /* echo \"==chkimg1==><pre>\";\n print_r($chkimgresp);\n echo \"</pre>\"; */ //exit();\n \n \n $invalidresp=false;\n \n $errormsgs=''; $fileuploadednames=array(); $errfileAr=array();\n $totalfileposted=0;\n \n if(!empty($chkimgresp))\n {\n \n \n if(array_key_exists('errormsgs',$chkimgresp))\n {\n $errormsgs=$chkimgresp['errormsgs'];\n }\n \n if(array_key_exists('errfileAr',$chkimgresp))\n {\n $errfileAr=$chkimgresp['errfileAr'];\n }\n \n if(array_key_exists('totalfileposted',$chkimgresp))\n {\n $totalfileposted=$chkimgresp['totalfileposted'];\n }\n \n }\n \n $resparray=array();\n $resparray['errormsgs']=$errormsgs;\n $resparray['errfileAr']=$errfileAr;\n $resparray['totalfileposted']=$totalfileposted;\n \n return $resparray;\n }", "title": "" }, { "docid": "ca5567577914f6ffc3f406006f4a7fb0", "score": "0.5025064", "text": "function add_photo($file)\n{\n $name = str_replace(' ', '_', (mb_strtolower(trim($file['name']))));\n if (move_uploaded_file($file['tmp_name'], \"data/\" . $name)) {\n echo 'Фаил успешно загружен';\n } else echo 'Ошибка';\n}", "title": "" } ]
70470bcceca1e8bbb53e7212e4e7197e
/ Profile of supplier
[ { "docid": "8b33ea3fb217cbe4ec196421c10b927b", "score": "0.0", "text": "public function actionProfile()\n {\n $this->layout = '@app/views/layouts/dashboard';\n $model = $this->findProfile(Helper::getCurrentUserId()); \n $model->setScenario('updateProfile');\n $email = $model->email; \n $mobileNumber = $model->phone_number; \n $indentityPic = (isset($model->identity_proof_type) && !empty($model->identity_proof_type))? $model->identity_proof_type : Null;\n\n if ($model->load(Yii::$app->request->post())){\n\n if($email != $model->email || $mobileNumber != $model->phone_number){\n $model->email = $email; \n $model->phone_number = $mobileNumber;\n }\n\n $indentityPictureObject = UploadedFile::getInstance($model,'identity_proof_type');\n\n if(!empty($indentityPictureObject)){\n $model->identity_proof_type = $indentityPictureObject;\n $fileName = time().'.'.$model->identity_proof_type->extension;\n $model->identity_proof_type->saveAs('upload/indentity_proof_images/'.$fileName);\n $indentityPic = $fileName;\n }\n $model->identity_proof_type = $indentityPic;\n if($model->save()){\n Yii::$app->session->setFlash('success', \"Profile updated successfully.\");\n return $this->redirect(['supplier/profile']);\n }\n }\n return $this->render('profile', ['model' => $model]); \n }", "title": "" } ]
[ { "docid": "d035402f8b9373cadc6d6744608fd956", "score": "0.6604047", "text": "public function testSuppliersOne()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "b824bef47956b848ba05d7ba858895ea", "score": "0.6413585", "text": "public function makeSupplier()\n {\n $this->class = self::SUPPLIER;\n $this->scenario = self::SCENARIO_SYSTEM_MAKES_USER_AS_SUPPLIER;\n return $this->update(true, ['class']);\n }", "title": "" }, { "docid": "3ba2f2c8fa410d8c1b482043d88b0911", "score": "0.60087806", "text": "public function processSuppliers() {\n\n\t\tif ((int) Tools::getValue('supplier_loaded') === 1 && Validate::isLoadedObject($product = new Product((int) Tools::getValue('id_product')))) {\n\t\t\t// Get all id_product_attribute\n\t\t\t$attributes = $product->getAttributesResume($this->context->language->id);\n\n\t\t\tif (empty($attributes)) {\n\t\t\t\t$attributes[] = [\n\t\t\t\t\t'id_product_attribute' => 0,\n\t\t\t\t\t'attribute_designation' => '',\n\t\t\t\t];\n\t\t\t}\n\n\t\t\t// Get all available suppliers\n\t\t\t$suppliers = Supplier::getSuppliers();\n\n\t\t\t// Get already associated suppliers\n\t\t\t$associatedSuppliers = ProductSupplier::getSupplierCollection($product->id);\n\n\t\t\t$suppliersToAssociate = [];\n\t\t\t$newDefaultSupplier = 0;\n\n\t\t\tif (Tools::isSubmit('default_supplier')) {\n\t\t\t\t$newDefaultSupplier = (int) Tools::getValue('default_supplier');\n\t\t\t}\n\n\t\t\t// Get new associations\n\n\t\t\tforeach ($suppliers as $supplier) {\n\n\t\t\t\tif (Tools::isSubmit('check_supplier_' . $supplier['id_supplier'])) {\n\t\t\t\t\t$suppliersToAssociate[] = $supplier['id_supplier'];\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// Delete already associated suppliers if needed\n\n\t\t\tforeach ($associatedSuppliers as $key => $associatedSupplier) {\n\t\t\t\t/** @var ProductSupplier $associatedSupplier */\n\n\t\t\t\tif (!in_array($associatedSupplier->id_supplier, $suppliersToAssociate)) {\n\t\t\t\t\t$associatedSupplier->delete();\n\t\t\t\t\tunset($associatedSuppliers[$key]);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// Associate suppliers\n\n\t\t\tforeach ($suppliersToAssociate as $id) {\n\t\t\t\t$toAdd = true;\n\n\t\t\t\tforeach ($associatedSuppliers as $as) {\n\t\t\t\t\t/** @var ProductSupplier $as */\n\n\t\t\t\t\tif ($id == $as->id_supplier) {\n\t\t\t\t\t\t$toAdd = false;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ($toAdd) {\n\t\t\t\t\t$productSupplier = new ProductSupplier();\n\t\t\t\t\t$productSupplier->id_product = $product->id;\n\t\t\t\t\t$productSupplier->id_product_attribute = 0;\n\t\t\t\t\t$productSupplier->id_supplier = $id;\n\n\t\t\t\t\tif ($this->context->currency->id) {\n\t\t\t\t\t\t$productSupplier->id_currency = (int) $this->context->currency->id;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$productSupplier->id_currency = (int) Configuration::get('EPH_CURRENCY_DEFAULT');\n\t\t\t\t\t}\n\n\t\t\t\t\t$productSupplier->save();\n\n\t\t\t\t\t$associatedSuppliers[] = $productSupplier;\n\n\t\t\t\t\tforeach ($attributes as $attribute) {\n\n\t\t\t\t\t\tif ((int) $attribute['id_product_attribute'] > 0) {\n\t\t\t\t\t\t\t$productSupplier = new ProductSupplier();\n\t\t\t\t\t\t\t$productSupplier->id_product = $product->id;\n\t\t\t\t\t\t\t$productSupplier->id_product_attribute = (int) $attribute['id_product_attribute'];\n\t\t\t\t\t\t\t$productSupplier->id_supplier = $id;\n\t\t\t\t\t\t\t$productSupplier->save();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// Manage references and prices\n\n\t\t\tforeach ($attributes as $attribute) {\n\n\t\t\t\tforeach ($associatedSuppliers as $supplier) {\n\t\t\t\t\t/** @var ProductSupplier $supplier */\n\n\t\t\t\t\tif (Tools::isSubmit('supplier_reference_' . $product->id . '_' . $attribute['id_product_attribute'] . '_' . $supplier->id_supplier) ||\n\t\t\t\t\t\t(Tools::isSubmit('product_price_' . $product->id . '_' . $attribute['id_product_attribute'] . '_' . $supplier->id_supplier) &&\n\t\t\t\t\t\t\tTools::isSubmit('product_price_currency_' . $product->id . '_' . $attribute['id_product_attribute'] . '_' . $supplier->id_supplier))\n\t\t\t\t\t) {\n\t\t\t\t\t\t$reference = pSQL(\n\t\t\t\t\t\t\tTools::getValue(\n\t\t\t\t\t\t\t\t'supplier_reference_' . $product->id . '_' . $attribute['id_product_attribute'] . '_' . $supplier->id_supplier,\n\t\t\t\t\t\t\t\t''\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t$price = (float) str_replace(\n\t\t\t\t\t\t\t[' ', ','],\n\t\t\t\t\t\t\t['', '.'],\n\t\t\t\t\t\t\tTools::getValue(\n\t\t\t\t\t\t\t\t'product_price_' . $product->id . '_' . $attribute['id_product_attribute'] . '_' . $supplier->id_supplier,\n\t\t\t\t\t\t\t\t0\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t$price = Tools::ps_round($price, 6);\n\n\t\t\t\t\t\t$idCurrency = (int) Tools::getValue(\n\t\t\t\t\t\t\t'product_price_currency_' . $product->id . '_' . $attribute['id_product_attribute'] . '_' . $supplier->id_supplier,\n\t\t\t\t\t\t\t0\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tif ($idCurrency <= 0 || (!($result = Currency::getCurrency($idCurrency)) || empty($result))) {\n\t\t\t\t\t\t\t$this->errors[] = Tools::displayError('The selected currency is not valid');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Save product-supplier data\n\t\t\t\t\t\t$productSupplierId = (int) ProductSupplier::getIdByProductAndSupplier($product->id, $attribute['id_product_attribute'], $supplier->id_supplier);\n\n\t\t\t\t\t\tif (!$productSupplierId) {\n\t\t\t\t\t\t\t$product->addSupplierReference($supplier->id_supplier, (int) $attribute['id_product_attribute'], $reference, (float) $price, (int) $idCurrency);\n\n\t\t\t\t\t\t\tif ($product->id_supplier == $supplier->id_supplier) {\n\n\t\t\t\t\t\t\t\tif ((int) $attribute['id_product_attribute'] > 0) {\n\t\t\t\t\t\t\t\t\t$data = [\n\t\t\t\t\t\t\t\t\t\t'supplier_reference' => pSQL($reference),\n\t\t\t\t\t\t\t\t\t\t'wholesale_price' => (float) Tools::convertPrice($price, $idCurrency),\n\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t\t$where = '\n a.id_product = ' . (int) $product->id . '\n AND a.id_product_attribute = ' . (int) $attribute['id_product_attribute'];\n\t\t\t\t\t\t\t\t\tPhenyxObjectModel::updateMultishopTable('Combination', $data, $where);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$product->wholesale_price = (float) Tools::convertPrice($price, $idCurrency); //converted in the default currency\n\t\t\t\t\t\t\t\t\t$product->supplier_reference = pSQL($reference);\n\t\t\t\t\t\t\t\t\t$product->update();\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$productSupplier = new ProductSupplier($productSupplierId);\n\t\t\t\t\t\t\t$productSupplier->id_currency = (int) $idCurrency;\n\t\t\t\t\t\t\t$productSupplier->product_supplier_price_te = (float) $price;\n\t\t\t\t\t\t\t$productSupplier->product_supplier_reference = pSQL($reference);\n\t\t\t\t\t\t\t$productSupplier->update();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else\n\n\t\t\t\t\tif (Tools::isSubmit('supplier_reference_' . $product->id . '_' . $attribute['id_product_attribute'] . '_' . $supplier->id_supplier)) {\n\t\t\t\t\t\t//int attribute with default values if possible\n\n\t\t\t\t\t\tif ((int) $attribute['id_product_attribute'] > 0) {\n\t\t\t\t\t\t\t$productSupplier = new ProductSupplier();\n\t\t\t\t\t\t\t$productSupplier->id_product = $product->id;\n\t\t\t\t\t\t\t$productSupplier->id_product_attribute = (int) $attribute['id_product_attribute'];\n\t\t\t\t\t\t\t$productSupplier->id_supplier = $supplier->id_supplier;\n\t\t\t\t\t\t\t$productSupplier->save();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// Manage defaut supplier for product\n\n\t\t\tif ($newDefaultSupplier != $product->id_supplier) {\n\t\t\t\t$this->object->id_supplier = $newDefaultSupplier;\n\t\t\t\t$this->object->update();\n\t\t\t}\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "342c2fbd119ec4d52ca6d1a469ab5402", "score": "0.59523547", "text": "public function show(Supplier $supplier)\n {\n \n }", "title": "" }, { "docid": "e8584d956b45935262f37e3d299dfd4f", "score": "0.5934319", "text": "public function testSuppliersAdd()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "bec4ad649767f6cf1d18b4484381b28a", "score": "0.58454317", "text": "public static function getProductTopSupplierInfo()\n\t{\n\t\tif (count(self::$productTopSupplierInfo)>0) return self::$productTopSupplierInfo;\n\t\t\n\t\t$rows=Yii::$app->get('subdb')->createCommand('SELECT ps.sku as sku,su.supplier_id as supplier_id,su.name as name,ps.purchase_price as purchase_price FROM pd_product_suppliers ps,pd_supplier su where ps.supplier_id=su.supplier_id and ps.priority=0 and su.is_disable=0 and su.status=1')->queryAll();\n\t\t//$rows=Yii::app()->subdb->createCommand('SELECT sku,su.supplier_id as supplier_id,su.name as name,purchase_price FROM pd_product pd INNER JOIN pd_supplier su ON ( pd.supplier_id=su.supplier_id)')->queryAll();\n\t\t\n\t\tforeach($rows as $row) {\n\t\t\t$myArr=array();\n\t\t\t$myArr[\"supplier_id\"]=$row['supplier_id'];\n\t\t\t$myArr[\"name\"]=$row['name'];\n\t\t\t$myArr[\"purchase_price\"]=$row['purchase_price'];\n\t\t\tself::$productTopSupplierInfo[$row['sku']]=$myArr;\n\t\t}\t\t\n\t\treturn self::$productTopSupplierInfo;\t\t\n\t}", "title": "" }, { "docid": "85c36fa3a159b4e62e8e9f6c9cb366a9", "score": "0.58348566", "text": "public function show(Supplier $supplier)\n {\n //\n }", "title": "" }, { "docid": "85c36fa3a159b4e62e8e9f6c9cb366a9", "score": "0.58348566", "text": "public function show(Supplier $supplier)\n {\n //\n }", "title": "" }, { "docid": "85c36fa3a159b4e62e8e9f6c9cb366a9", "score": "0.58348566", "text": "public function show(Supplier $supplier)\n {\n //\n }", "title": "" }, { "docid": "85c36fa3a159b4e62e8e9f6c9cb366a9", "score": "0.58348566", "text": "public function show(Supplier $supplier)\n {\n //\n }", "title": "" }, { "docid": "85c36fa3a159b4e62e8e9f6c9cb366a9", "score": "0.58348566", "text": "public function show(Supplier $supplier)\n {\n //\n }", "title": "" }, { "docid": "85c36fa3a159b4e62e8e9f6c9cb366a9", "score": "0.58348566", "text": "public function show(Supplier $supplier)\n {\n //\n }", "title": "" }, { "docid": "85c36fa3a159b4e62e8e9f6c9cb366a9", "score": "0.58348566", "text": "public function show(Supplier $supplier)\n {\n //\n }", "title": "" }, { "docid": "85c36fa3a159b4e62e8e9f6c9cb366a9", "score": "0.58348566", "text": "public function show(Supplier $supplier)\n {\n //\n }", "title": "" }, { "docid": "9d0a326a33071039018b28f1cf5c7d1e", "score": "0.58043903", "text": "public function isSupplier(){\n if(!$this->isClient()){\n return false;\n }\n $accountType = is_int($this->account->account_type) ? Account::stringifyType($this->account->account_type) : $this->account->account_type;\n return $accountType == 'SUPPLIER';\n }", "title": "" }, { "docid": "dca3a2468011b2120920cddebcdddbd4", "score": "0.5795679", "text": "public function testSuppliersUpdate()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "26b051725bf9b4f3869b487cc45c0d64", "score": "0.57837635", "text": "function isSupplier(){\n\t\t\n\t\t$result = false;\n\n\t\tif ($this->getLevelId() == 4)\n\t\t\t$result = true;\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "c740e3e2cc4339f8062880f76e1f52c8", "score": "0.565904", "text": "public function getSupplier(): Participant\n\t{\n\t\treturn $this->supplier;\n\t}", "title": "" }, { "docid": "ec344313abcff7685b347790284db14a", "score": "0.56520474", "text": "public function getPreferredSupplier()\n {\n $pData = $this->getPreferredPurchasingData();\n return $pData ? $pData->getSupplier() : null;\n }", "title": "" }, { "docid": "0a6a0764b30b4bbc957212c0f6fe5514", "score": "0.5623634", "text": "public function supplier()\n {\n return $this->hasOne(Supplier::class);\n }", "title": "" }, { "docid": "5d86d45b22cd3bfe6f113349dea19c22", "score": "0.5566815", "text": "private function setSupplierClass()\n {\n $this->original_class = $this->class;\n if ($this->class == self::CARRIER) {\n $this->class = self::SUPPLIER;\n }\n }", "title": "" }, { "docid": "8af03c7cc3b8840f63e2dad4f1285515", "score": "0.5555279", "text": "public function show(Supplier $suppliers)\n {\n //\n }", "title": "" }, { "docid": "3f5726cc57a488a154e97e810a9c5abf", "score": "0.5503886", "text": "public function testSuppliersAll()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "c7ed1556d6441cf60c3b5faae7bb57bb", "score": "0.5496685", "text": "public function supplierCard()\n {\n $address = $this->supplier->address;\n\n $card = $supplier->name .'<br />'.\n $address->address_1 .'<br />'.\n $address->city . ' - ' . $address->state->name.' <a href=\"javascript:void(0)\" class=\"btn btn-grey btn-xs disabled\">'. $$address->phone .'</a>';\n\n return $card;\n }", "title": "" }, { "docid": "9af25e16b2db1b654c86f59c8e7e4a89", "score": "0.54847896", "text": "public function supplier()\n {\n return $this->belongsTo(Supplier::class);\n }", "title": "" }, { "docid": "b35d6e978d0e52d6c382bfb627e99ff6", "score": "0.5475585", "text": "public function supplier()\n {\n return $this->belongsTo('App\\Supplier', 'supplier_id', 'id');\n }", "title": "" }, { "docid": "7aa319bfcb49200ec5f6ca3c874a8543", "score": "0.54746675", "text": "public static function updateProductSupplierInfo($sku,$supplierId,$price) {\n\t\tif ($price<0) return false;\n\t\t// when price==0 that is special case\n\t\tif ($price==0) return true; \n\t\t\n\t\t$isExistSupplier=false;\n\t\t$existSupplierObject=null;\n\t\t$existSupplierPriority=-1;\n\t\t\n\t\t\n\t\t$productSupplierCollection=ProductSuppliers::findAll(['sku'=>$sku]);\n\t\tforeach($productSupplierCollection as $productSupplier) {\n\t\t\tif ($productSupplier->priority==0 and $productSupplier->supplier_id==$supplierId and $productSupplier->purchase_price==$price) return true; // no difference,no need to update,just return\n\t\t\t\t\n\t\t\tif ($productSupplier->supplier_id==$supplierId) {\n\t\t\t\t$isExistSupplier=true;\n\t\t\t\t$existSupplierPriority=$productSupplier->priority;\n\t\t\t\t$existSupplierObject=$productSupplier;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\n\t\n\t\tif ($isExistSupplier){\n\t\t\tif ($existSupplierPriority==0){\n\t\t\t\t//only need to update the price\n\t\t\t\t$existSupplierObject->purchase_price=$price;\n\t\t\t\tif (!$existSupplierObject->save(false)) return false;\n\t\t\t} else {\n\t\t\t\t//The supplierid exists and priority>0 ,not the first option.\n\t\t\t\t//It needs to be exchanged the priority with the current top supplier.\n\t\t\t\tforeach($productSupplierCollection as $productSupplier) {\n\t\t\t\t\tif ($productSupplier->supplier_id==$supplierId) {\n\t\t\t\t\t\t$productSupplier->priority=0;\n\t\t\t\t\t\t$productSupplier->purchase_price=$price;\n\t\t\t\t\t\tif (!$productSupplier->save(false)) return false;\n\t\t\t\t\t}else if ($productSupplier->priority==0){\n\t\t\t\t\t\t$productSupplier->priority=$existSupplierPriority;\n\t\t\t\t\t\tif (!$productSupplier->save(false)) return false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\t\t\n\t \t//The supplierid does not exist. \n\t\t //The current suppliers for the product needs to postpone the priority to the latter one ,and the chosen supplier setted to the top\n\t\t\tforeach($productSupplierCollection as $productSupplier) {\n\t\t\t\tif ($productSupplier->priority==4) {\n\t\t\t\t\t$productSupplier->delete();\n\t\t\t\t}else{\n\t\t\t\t\t$productSupplier->priority=$productSupplier->priority+1;\n\t\t\t\t\tif (!$productSupplier->save(false)) return false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$productSupplier=new ProductSuppliers();\n\t\t\t$productSupplier->purchase_price=$price;\n\t\t\t$productSupplier->supplier_id=$supplierId;\n\t\t\t$productSupplier->sku=$sku;\n\t\t\t$productSupplier->priority=0;\n\t\t\tif (!$productSupplier->save(false)) return false;\n\t\t}\n\t\t \t\t\n\t\t// pd_product需要和pd_product_suppliers数据表的信息保持一致。 上面设置了pd_product_suppliers, 这里需要设置pd_product数据表的supplier_id。\n\t\t\n\t\t$product=Product::find()->where('sku=:sku', array(':sku'=>$sku))->one();\n\t\tif ($product==null) return false;\n\t\t$product->supplier_id=$supplierId;\n\t\t$product->purchase_price=$price;\n\t\t$product->save(false);\n\t\t\n\t\treturn true;\t\t\n\t}", "title": "" }, { "docid": "8db346f47a74d07bbec1a1b316a5e6fe", "score": "0.54661393", "text": "function viewSupplierProfile()\n\t{\n\t\tif ($this->session->userdata('is_login') == TRUE)\n\t\t{\n\t\t\t$viewed_by = $this->uri->segment(3);\n\n\t\t\tif ($viewed_by == \"admin\")\n\t\t\t{\n\t\t\t\t$supplier_id = $this->uri->segment(4);\n\t\t\t\t$data['supplier_profile'] = $this->suppliers->supplierinfo($supplier_id);\t\t\t\t\n\t\t\t\t$this->load->view('admin/supplier/supplier-view-profile', $data);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "ad64b258f775125c810f8d782faeec30", "score": "0.5459534", "text": "public function supplier()\n {\n\n return $this->hasOne('App\\Supplier', 'id');\n\n }", "title": "" }, { "docid": "5f6956cd50ac0a81b0123645c6947ec1", "score": "0.543267", "text": "public function get_pm_supplier()\n {\n $this->db->select('supplier_id,agency_name as supplier_name');\n $this->db->from('supplier s');\n $this->db->join('supplier_type st','s.type_id=st.type_id');\n $this->db->where('st.type_id',2);\n $res = $this->db->get();\n return $res->result_array();\n }", "title": "" }, { "docid": "40577b37600ac33a97fce511bd84df28", "score": "0.5409084", "text": "public function getSupplierItems() : \\Aimeos\\Map\n {\n return map( $this->get( 'supplier', [] ) );\n }", "title": "" }, { "docid": "9e311dd913ac0fab88def2aeee2b2dea", "score": "0.5402068", "text": "public function show(Supplier $supplier)\n {\n return new SupplierResource($supplier->load(['photos', 'location', 'videos','users', 'joborders.jobrequest']));\n }", "title": "" }, { "docid": "9e7a98e4a1e04ed5814acb6363f1e6cf", "score": "0.53849477", "text": "abstract protected function getUsage();", "title": "" }, { "docid": "5f54de3c285a470441ab5e94b1f68811", "score": "0.5376811", "text": "function getSuppliersToTble(){\n\t\t$dbmain = new DBmain();\n\t\t$res=$dbmain->selectAllData(\"suppliers\",\"LIMIT 0,25\");\n\t\tforeach($res as $r){\t\t\t\t\t\n\t\t\techo $r['f_name'];\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "ed0db2d3dc0c238676bb7a2a2b0e6a16", "score": "0.5368117", "text": "public function supplier()\n {\n return $this->belongsTo('App\\Supplier');\n }", "title": "" }, { "docid": "ddb11baec38b1926bd90eec50fd90090", "score": "0.5360257", "text": "public function supplier()\n {\n return $this->belongsTo('App\\HrmModels\\Supplier');\n }", "title": "" }, { "docid": "55467dac3313072c67d79a6384247088", "score": "0.5356902", "text": "public function getSuppliers()\n {\n $dbm = ErpDbManager::getInstance();\n $mapper = $dbm->getRepository(Supplier::class);\n return $mapper->findByItem($this);\n }", "title": "" }, { "docid": "12529f2865134385b562c06a13a9c3f0", "score": "0.534423", "text": "function contract_suppliers(){\n\n\n $query=\"SELECT `people`.`first_name`, `people`.`id` AS `supplier_id`,\n `people`.`is_disabled` AS `supplier_disabled`,\n `contract`.*\n FROM `people`,`contract`\n WHERE `contract`.`supplier_id`=`people`.`id`\n AND `contract`.`is_removed`=0\n AND `contract`.`is_payed`=0\n AND `people`.`is_disabled`=1\n ORDER BY `contract`.`timestamp` DESC\n \";\n\n return $this->Select_sql('default', $query);\n\n }", "title": "" }, { "docid": "47f09ad632b819738ea8cdebb9ce1bdc", "score": "0.5336792", "text": "public function supplier()\n {\n return $this->belongsTo('Supplier');\n }", "title": "" }, { "docid": "f6634f3433843de6905b6f45bf1765f8", "score": "0.53010607", "text": "public function edit(Supplier $supplier)\n {\n //\n }", "title": "" }, { "docid": "f6634f3433843de6905b6f45bf1765f8", "score": "0.53010607", "text": "public function edit(Supplier $supplier)\n {\n //\n }", "title": "" }, { "docid": "3c7c22a19a19ce8e6266dd043cc185de", "score": "0.52950275", "text": "public function createSupplier(): Supplier\n {\n $supplier = new Supplier(new ErrorRegister());\n $address = $supplier->getBillingAddress();\n $address->setAddressDetail(\"Billing Street test 999\");\n $address->setCity(\"Sintra\");\n $address->setPostalCode(\"1999-999\");\n $address->setRegion(\"Lisbon\");\n $address->setCountry(new SupplierCountry(SupplierCountry::ISO_BR));\n\n $shToAdd = $supplier->addShipFromAddress();\n $shToAdd->setAddressDetail(\"Ship Street test 999\");\n $shToAdd->setCity(\"Sintra\");\n $shToAdd->setPostalCode(\"1999-999\");\n $shToAdd->setRegion(\"Lisbon\");\n $shToAdd->setCountry(new SupplierCountry(SupplierCountry::ISO_BR));\n\n $supplier->setSupplierID(\"ID999999990\");\n $supplier->setAccountID(\"Account id test\");\n $supplier->setSupplierTaxID(\"599999990\");\n $supplier->setCompanyName(\"Supplier name test\");\n $supplier->setContact(\"Supplier contact neme\");\n $supplier->setTelephone(\"+351 987654321\");\n $supplier->setFax(\"123456789\");\n $supplier->setEmail(\"[email protected]\");\n $supplier->setWebsite(\"https://saft.pt\");\n $supplier->setSelfBillingIndicator(false);\n return $supplier;\n }", "title": "" }, { "docid": "90d40ea9881b5901d21515221db5372c", "score": "0.5282807", "text": "function ciniki_wineproduction_supplierGet($ciniki) {\n //\n // Find all the required and optional arguments\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'),\n 'supplier_id'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Supplier'),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $args = $rc['args'];\n\n //\n // Make sure this module is activated, and\n // check permission to run this function for this tenant\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'wineproduction', 'private', 'checkAccess');\n $rc = ciniki_wineproduction_checkAccess($ciniki, $args['tnid'], 'ciniki.wineproduction.supplierGet');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Load tenant settings\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'tenants', 'private', 'intlSettings');\n $rc = ciniki_tenants_intlSettings($ciniki, $args['tnid']);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $intl_timezone = $rc['settings']['intl-default-timezone'];\n $intl_currency_fmt = numfmt_create($rc['settings']['intl-default-locale'], NumberFormatter::CURRENCY);\n $intl_currency = $rc['settings']['intl-default-currency'];\n\n ciniki_core_loadMethod($ciniki, 'ciniki', 'users', 'private', 'dateFormat');\n $date_format = ciniki_users_dateFormat($ciniki, 'php');\n\n //\n // Return default for new Supplier\n //\n if( $args['supplier_id'] == 0 ) {\n $supplier = array('id'=>0,\n 'name'=>'',\n 'supplier_tnid'=>'',\n 'po_name_address'=>'',\n 'po_email'=>'',\n );\n }\n\n //\n // Get the details for an existing Supplier\n //\n else {\n $strsql = \"SELECT ciniki_wineproduction_suppliers.id, \"\n . \"ciniki_wineproduction_suppliers.name, \"\n . \"ciniki_wineproduction_suppliers.supplier_tnid, \"\n . \"ciniki_wineproduction_suppliers.po_name_address, \"\n . \"ciniki_wineproduction_suppliers.po_email \"\n . \"FROM ciniki_wineproduction_suppliers \"\n . \"WHERE ciniki_wineproduction_suppliers.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"AND ciniki_wineproduction_suppliers.id = '\" . ciniki_core_dbQuote($ciniki, $args['supplier_id']) . \"' \"\n . \"\";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryArrayTree');\n $rc = ciniki_core_dbHashQueryArrayTree($ciniki, $strsql, 'ciniki.wineproduction', array(\n array('container'=>'suppliers', 'fname'=>'id', \n 'fields'=>array('name', 'supplier_tnid', 'po_name_address', 'po_email'),\n ),\n ));\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.wineproduction.131', 'msg'=>'Supplier not found', 'err'=>$rc['err']));\n }\n if( !isset($rc['suppliers'][0]) ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.wineproduction.132', 'msg'=>'Unable to find Supplier'));\n }\n $supplier = $rc['suppliers'][0];\n }\n\n $rsp = array('stat'=>'ok', 'supplier'=>$supplier);\n\n //\n // ONLY SYSADMINS: Get the list of other tenants offering products\n //\n if( ($ciniki['session']['user']['perms'] & 0x01) == 0x01 ) {\n $strsql = \"SELECT tenants.id, \"\n . \"tenants.name \" \n . \"FROM ciniki_tenant_modules AS modules \"\n . \"INNER JOIN ciniki_tenants AS tenants ON (\"\n . \"modules.tnid = tenants.id \"\n . \"AND tenants.status = 1 \"\n . \") \"\n . \"WHERE (modules.flags&0x02) \"\n . \"AND modules.package = 'ciniki' \"\n . \"AND modules.module = 'wineproduction' \"\n . \"AND modules.status = 1 \"\n . \"\";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryArrayTree');\n $rc = ciniki_core_dbHashQueryArrayTree($ciniki, $strsql, 'ciniki.wineproduction', array(\n array('container'=>'suppliers', 'fname'=>'id', \n 'fields'=>array('id', 'name')),\n ));\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.wineproduction.201', 'msg'=>'Unable to load suppliers', 'err'=>$rc['err']));\n }\n $rsp['suppliers'] = isset($rc['suppliers']) ? $rc['suppliers'] : array();\n array_unshift($rsp['suppliers'], array('id'=>0, 'name'=>'No Supplier'));\n }\n\n return $rsp;\n}", "title": "" }, { "docid": "3b65a2300e8b2790127cd61a3bec85ba", "score": "0.5270339", "text": "public function update_supplier()\n\t\t{\n\t\t\t$log=new Log(\"supplier-\".date('Y-m-d').\".log\");\n\t\t\t$log->write('update_supplier called');\n\t\t\t$log->write($this->request->post);\n\t\t\t$mcrypt=new MCrypt();\n\t\t\t$keys = array(\n\t\t\t\t'firstname',\n\t\t\t\t'lastname',\n\t\t\t\t'email',\n\t\t\t\t'telephone',\n\t\t\t\t'state_name',\n\t\t\t\t'state_id',\n\t\t\t\t'district',\n\t\t\t\t'district_id',\n\t\t\t\t'supplier_group_id',\n\t\t\t\t'supplier_group_name',\n\t\t\t\t'account',\n\t\t\t\t'ifsc',\n\t\t\t\t'bid',\n\t\t\t\t'bank',\n\t\t\t\t'bankaddress',\n\t\t\t\t'gst',\n\t\t\t\t'pan',\n\t\t\t\t'store_id',\n\t\t\t\t'user_id',\n\t\t\t\t'group_id',\n\t\t\t\t'supplier_id'\n\t\t\t\t);\n\t\t\tforeach ($keys as $key) \t\t\n\t\t\t{\n\t\t\t\t$this->request->post[$key] =$mcrypt->decrypt($this->request->post[$key]); \n\t\t\t}\n\t\t\t\n\t\t\t$this->request->post['first_name'] =$this->request->post['firstname']; \n\t\t\t$this->request->post['last_name'] =$this->request->post['lastname']; \n\t\t\t$this->request->post['ACC_ID'] =$this->request->post['account']; \n\t\t\t$this->request->post['ADDRESS'] =$this->request->post['bankaddress']; \n\t\t\t$this->request->post['BANK_NAME'] =(int)$this->request->post['bank'];\n\t\t\t$this->request->post['bid'] =(int)$this->request->post['bid'];\n\t\t\t$this->request->post['IFSC_CODE'] =(int)$this->request->post['ifsc'];\n\t\t\t$this->request->post['status'] =(int)1;\n\t\t\t\n\t\t\t$this->request->post['fax'] =$this->request->post['district']; \n\t\t\t$this->request->post['location'] =$this->request->post['bankaddress']; \n\t\t\t$this->request->post['pre_mongified_id'] =(int)$this->request->post['supplier_id']; \n\t\t\t$this->request->post['user_group_id'] =(int)$this->request->post['group_id']; \n\t\t\t$this->request->post['store_id'] =array((int)$this->request->post['store_id']); \n\t\t\t$this->request->post['user_id'] =(int)$this->request->post['user_id'];\n\t\t\t$this->request->post['delete_bit'] =(int)0;\n\t\t\t\n\t\t\tunset($this->request->post['bankaddress']);\n\t\t\tunset($this->request->post['supplier_id']);\n\t\t\tunset($this->request->post['group_id']);\n\t\t\tunset($this->request->post['ifsc']);\n\t\t\tunset($this->request->post['bank']);\n\t\t\tunset($this->request->post['account']);\n\t\t\tunset($this->request->post['lastname']);\n\t\t\tunset($this->request->post['firstname']);\n\t\t\t\n\t\t\t$log->write($this->request->post);\n\t\t\tif ((utf8_strlen($this->request->post['firstname']) < 1) || (utf8_strlen(trim($this->request->post['firstname'])) > 32)) \n\t\t\t{\n\t\t\t\t$log->write('First name can not be empty');\n\t\t\t\t$json=array('status'=>0,'msg'=>'First name can not be empty');\n\t\t\t\treturn $this->response->setOutput(json_encode($json));\n\t\t\t}\n\n\t\t\telse if ((utf8_strlen($this->request->post['lastname']) < 1) || (utf8_strlen(trim($this->request->post['lastname'])) > 32)) \n\t\t\t{\n\t\t\t\t$log->write('Last name can not be empty');\n\t\t\t\t$json=array('status'=>0,'msg'=>'Last name can not be empty');\n\t\t\t\treturn $this->response->setOutput(json_encode($json));\n\t\t\t}\n\n\t\t\t//else if ((utf8_strlen($this->request->post['email']) > 96) || !filter_var($this->request->post['email'], FILTER_VALIDATE_EMAIL)) \n\t\t\t//{\n\t\t\t\t//$json=array('status'=>0,'msg'=>'Email must be less then 96 characters');\n\t\t\t\t//return $this->response->setOutput(json_encode($json));\n\t\t\t//}\n\t\t\t\n\t\t\telse if ((utf8_strlen($this->request->post['telephone']) < 3) || (utf8_strlen($this->request->post['telephone']) > 32)) \n\t\t\t{\n\t\t\t\t$log->write('Telephone must be between 3 and 32 characters!');\n\t\t\t\t$json=array('status'=>0,'msg'=>'Telephone must be between 3 and 32 characters!');\n\t\t\t\treturn $this->response->setOutput(json_encode($json));\n\t\t\t}\n\t\t\telse if ((utf8_strlen($this->request->post['district']) < 3) || (utf8_strlen($this->request->post['district']) > 32)) \n\t\t\t{\n\t\t\t\t$log->write('District must be between 3 and 32 characters!');\n\t\t\t\t$json=array('status'=>0,'msg'=>'District must be between 3 and 32 characters!');\n\t\t\t\treturn $this->response->setOutput(json_encode($json));\n\t\t\t}\n\t\t\t/*\n\t\t\telse if ((utf8_strlen($this->request->post['ifsc']) < 3) || (utf8_strlen($this->request->post['ifsc']) > 11)) \n\t\t\t{\n\t\t\t\t$json=array('status'=>0,'msg'=>'IFSC Code must be between 1 and 11 characters!');\n\t\t\t\treturn $this->response->setOutput(json_encode($json));\n\t\t\t}\n\t\t\telse if ((utf8_strlen($this->request->post['bank']) < 3) || (utf8_strlen($this->request->post['bank']) > 50)) \n\t\t\t{\n\t\t\t\t$json=array('status'=>0,'msg'=>'Bank Name must be between 3 and 50 characters!');\n\t\t\t\treturn $this->response->setOutput(json_encode($json));\n\t\t\t}\n\n\t\t\telse if ((utf8_strlen($this->request->post['account']) < 8) || (utf8_strlen($this->request->post['account']) > 25)) \n\t\t\t{\n\t\t\t\t$json=array('status'=>0,'msg'=>'Bank Account Number must be between 8 and 25 characters!');\n\t\t\t\treturn $this->response->setOutput(json_encode($json));\n\t\t\t}\n\t\t\t*/\n\t\t\telse\n\t\t\t{\t\n\t\t\t\t$log->write('in else');\n\t\t\t\t$this->adminmodel('purchase/supplier');\n\t\t\t\t$log->write('1');\n\t\t\t\t$updated = $this->model_purchase_supplier->update_supplier($this->request->post);\n\t\t\t\t$log->write('2');\n\t\t\t\t$log->write($updated);\n\t\t\t\t$json=array('status'=>1,'msg'=>'Supplier updated successfully');\n\t\t\t\treturn $this->response->setOutput(json_encode($json));\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}", "title": "" }, { "docid": "476b4255a51a2818457e6f6b45c06638", "score": "0.5256187", "text": "public function get_supplier()\n {\n $this->db->select('supplier_id,agency_name as supplier_name');\n $this->db->from('supplier s');\n $this->db->join('supplier_type st','s.type_id=st.type_id');\n $this->db->where('st.type_id',1);\n $res = $this->db->get();\n return $res->result_array();\n }", "title": "" }, { "docid": "1b77fed338217f95dbb0e4f7b3130258", "score": "0.52488637", "text": "public function deleteSupplier(){\n\t}", "title": "" }, { "docid": "6aed57fc4123a5c056810c013c3d968b", "score": "0.52423334", "text": "public static function ManageSupplier_Suppliers()\n {\n $sp = 'CALL uspManageSupplier_Suppliers';\n return DBHelper::Select($sp);\n }", "title": "" }, { "docid": "5019dbc5f2c7bbd07b4f5574d904cbea", "score": "0.5231064", "text": "public function supplier(): BelongsTo\n {\n return $this->belongsTo(Supplier::class);\n }", "title": "" }, { "docid": "58567444874eda02d84f53a20367779e", "score": "0.52168334", "text": "public function toString()\n {\n return 'Supplier are present in Supplier grid.';\n }", "title": "" }, { "docid": "b490650d0b752cb352a8adedb08ec96b", "score": "0.52050704", "text": "public function getSuppliesBySupplierId($supplier_id);", "title": "" }, { "docid": "c8ed9e9de16fd99c19f10e2bbe77d62c", "score": "0.51990414", "text": "public static function AssignComplaint_Supplier()\n {\n $sp = 'CALL uspAssignComplaint_Supplier';\n return DBHelper::Select($sp);\n }", "title": "" }, { "docid": "d464e2e9c5750af9c04046b930234793", "score": "0.5193537", "text": "function addSupplier($args, $request) {\n\t\treturn $this->editSupplier($args, $request);\n\t}", "title": "" }, { "docid": "5fd595aadf9349a6a30efdf4a23b289b", "score": "0.5192431", "text": "function add_new_product_supplier($supplierdata)\n\t{\n\t\tif ((isset($supplierdata['suppliers_id'])) && (isset($supplierdata['products_id'])))\n\t\t{\n\t\t\t$this->db->insert('products_suppliers', $supplierdata);\n\t\t\treturn TRUE;\n\t\t}\n\t\telse \n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "60a0b0f707f7a2c04467a7d8c3d79b04", "score": "0.5147652", "text": "public function supplier() {\n //return $this->hasMany('App\\Supplier'); // one to hasMany\n return $this->belongsToMany('App\\Supplier');\n }", "title": "" }, { "docid": "eb6844ff219fdea5db41a9ca2b19396c", "score": "0.5124289", "text": "function Supplier() {\n App::uses(\"Supplier\", \"Inventory.Model\");\n $supplier = new Supplier();\n return $supplier->find(\"list\", array( \"fields\" => array( \"id\", \"name\" ) ));\n }", "title": "" }, { "docid": "8f27955f771a1ddf2ef5ffdfd435541c", "score": "0.5120036", "text": "public function __construct($_supplierNumber = NULL,$_companyName = NULL,$_address1 = NULL,$_address2 = NULL,$_city = NULL,$_state = NULL,$_zip = NULL,$_zipPlus4 = NULL,$_telephone = NULL,$_description = NULL,$_isSupplierParticipating = NULL)\r\n\t{\r\n\t\tparent::__construct(array('SupplierNumber'=>$_supplierNumber,'CompanyName'=>$_companyName,'Address1'=>$_address1,'Address2'=>$_address2,'City'=>$_city,'State'=>$_state,'Zip'=>$_zip,'ZipPlus4'=>$_zipPlus4,'Telephone'=>$_telephone,'Description'=>$_description,'IsSupplierParticipating'=>$_isSupplierParticipating));\r\n\t}", "title": "" }, { "docid": "9d781e54afee12bdcfa76ba8dfe3bca0", "score": "0.5114705", "text": "public function getSupplierDetail($id)\n {\n if ($id > 1) {\n $data = Mage::getModel('admin/user')->load($id);\n $roleData = Mage::getModel('admin/user')->load($id)->getRole()->getData();\n $supplierRole = Mage::getStoreConfig('suppliers/suppliers/role_supplier_user_dropdown');\n if ($roleData['role_id'] == $supplierRole)\n return $data;\n }\n }", "title": "" }, { "docid": "1a042de5a51edcb6442ba612eaed13f8", "score": "0.5105915", "text": "function SupplierAndItemInfo() {\n App::uses(\"Supplier\", \"Inventory.Model\");\n App::uses(\"Item\", \"Model\");\n $supplierModel = new Supplier();\n $itemModel = new Item();\n $supplierModel->recursive = 0;\n $suppliers = $supplierModel->find(\"all\");\n $tmp_suplliers = array( );\n foreach( $suppliers as $key => $supplier ) {\n $tmp_suplliers[$supplier['Supplier']['id']]['name'] = $supplier['Supplier']['name'];\n $tmp_suplliers[$supplier['Supplier']['id']]['email'] = $supplier['Supplier']['email'];\n $tmp_suplliers[$supplier['Supplier']['id']]['gst'] = $supplier['Supplier']['gst_rate'];\n $tmp_suplliers[$supplier['Supplier']['id']]['pst'] = $supplier['Supplier']['pst_rate'];\n $tmp_suplliers[$supplier['Supplier']['id']]['item'] = $itemModel->find(\"list\", array( \"fields\" => array( \"id_plus_item\" ), 'conditions' => array( 'supplier_id' => $supplier['Supplier']['id'] ) ));\n $tmp_suplliers[$supplier['Supplier']['id']]['address'] = $this->address_format($supplier['Supplier']['address'], $supplier['Supplier']['city'], $supplier['Supplier']['province'], $supplier['Supplier']['country'], $supplier['Supplier']['postal_code']);\n $tmp_suplliers[$supplier['Supplier']['id']]['phone'] = $this->phone_format($supplier['Supplier']['phone'], $supplier['Supplier']['phone_ext'], $supplier['Supplier']['cell'], $supplier['Supplier']['fax_number']);\n }\n\n return $tmp_suplliers;\n }", "title": "" }, { "docid": "497ee8e4d2eb9b240f378ab35405fbe7", "score": "0.5102335", "text": "public function processSaveSupplier()\n {\n $json = array();\n $errors = array();\n $address = new Address();\n $address->alias = Tools::getValue('supplier_name', null);\n $address->lastname = 'supplier'; // skip problem with numeric characters in supplier name\n $address->firstname = 'supplier'; // skip problem with numeric characters in supplier name\n $address->address1 = Tools::getValue('supplier_address_1', null);\n $address->address2 = Tools::getValue('supplier_address_2', null);\n $address->postcode = Tools::getValue('supplier_postcode', null);\n $address->phone = Tools::getValue('phone', null);\n $address->phone_mobile = Tools::getValue('phone_mobile', null);\n $address->id_country = Tools::getValue('supplier_id_country', null);\n $address->id_state = Tools::getValue('supplier_id_state', null);\n $address->city = Tools::getValue('supplier_city', null);\n\n $validation = $address->validateController();\n // checks address validity\n if (count($validation) > 0) {\n $errors[] = $this->module->l('The address is not correct. Please make sure all of the required fields are completed.', $this->controller_name);\n } else {\n $address->save();\n $supplier = new Supplier();\n $supplier->name = Tools::getValue('supplier_name', null);\n $supplier->link_rewrite = Tools::getValue('supplier_name', null);\n $supplier->active = 1;\n $supplier->save();\n $address->id_supplier = $supplier->id;\n $address->save();\n }\n if (count($errors) > 0) {\n $json['status'] = false;\n $json['errors'] = $errors;\n } else {\n $json['status'] = true;\n $msg = $this->module->l('Supplier successfully created.', $this->controller_name);\n $json['msg'] = $msg;\n $this->context->cookie->__set(\n 'redirect_success',\n $msg\n );\n $request_param = array();\n $id_product = Tools::getValue('id_product', 0);\n if ($id_product > 0) {\n $request_param['id_product'] = (int) $id_product;\n $request_param['render_type'] = 'form';\n }\n $json['redirect_link'] = $this->context->link->getModuleLink(\n $this->kb_module_name,\n $this->controller_name,\n $request_param,\n (bool) Configuration::get('PS_SSL_ENABLED')\n );\n }\n return $json;\n }", "title": "" }, { "docid": "de7d3ace64c93313a10a9a90c578fe57", "score": "0.51022696", "text": "public function __construct(array $supplier = array(), $secondaryCode = null, $supplierCode = null, $code = null, $codeContext = null, $uRI = null, $quantity = null)\n {\n $this\n ->setSupplier($supplier)\n ->setSecondaryCode($secondaryCode)\n ->setSupplierCode($supplierCode)\n ->setCode($code)\n ->setCodeContext($codeContext)\n ->setURI($uRI)\n ->setQuantity($quantity);\n }", "title": "" }, { "docid": "595da152ec1519da218fce3f4cb597b5", "score": "0.5066321", "text": "public function get_supplier($supplier = false)\n {\n if ($supplier === FALSE)\n {\n $this->db->select('first_name, last_name, company, company_number,address,\n phone, email, website, social_network');\n $this->db->from('users');\n\n $query = $this->db->get();\n return $query->result_array();\n }\n\n $query = $this->db->get_where('users', array('id_users' => $supplier));\n return $query->row_array();\n }", "title": "" }, { "docid": "30e94747aee18bb4bf7c2ef40b8401af", "score": "0.5066284", "text": "function prepare_cnc_data_for_supplier($id,$type='')\n\t{\n\t\t$ref = $type.$id;\n\t\t$prefs = $this->get_company_prefs();\n\t\tif($type == 'DR'){\n\t\t\t$cnc_data = $this->get_cnc_driver($id);\n\t\t\t$address = $cnc_data['present_address'];\n\t\t\t$ac = $cnc_data['bank_account_number'];\n\t\t}elseif($type == 'VW'){\n\t\t\t$cnc_data = $this->get_cnc_vehicle_owner($id);\n\t\t\t$address = $cnc_data['address'];\n\t\t\t$ac = \"\";\n\t\t}\n\t\telse{\n\t\t\t$cnc_data = false;\n\t\t}\n\t\tif($cnc_data){\n\t\t\treturn $data = array(\n\t\t\t\t'supp_name'=>$cnc_data['name'],\n\t\t\t\t'supp_ref'=>$ref,\n\t\t\t\t'address' => $address,\n\t\t\t\t'supp_address' => $address,\n\t\t\t\t'bank_account' => $ac,\n\t\t\t\t'curr_code'=> @$prefs['curr_default'],\n\t\t\t\t'payment_terms'=> @$prefs['default_payment_terms'],\n\t\t\t\t'credit_limit'=> @$prefs['default_credit_limit'],\t\t\n \t\t\t\t'payable_account' => @$prefs['creditors_act'],\n\t\t\t\t'payment_discount_account' => @$prefs['pyt_discount_act'],\n\t\t\t\t'tax_group_id' => 1//static from tax group table\n\t\t\t\t);\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "4651297fc0e25c04e07e9f778fd2b1de", "score": "0.50524116", "text": "public function getSellerSupplierParty()\n {\n return $this->sellerSupplierParty;\n }", "title": "" }, { "docid": "e535dd657c7808e61c65d987fe9a4046", "score": "0.5038389", "text": "public function testSuppliersDelete()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "315c3b326ef64df59cdf31f430487c9d", "score": "0.5029662", "text": "protected function getSupplier($supplierId) {\r\n \tif(self::IN_DEV) {\r\n \t\treturn Supplier::model()->findByPk($supplierId);\r\n \t}\r\n \treturn Supplier::model()->notStarted()->nextClosestRun()->orderByLastRun()->findByPk($supplierId);\r\n }", "title": "" }, { "docid": "66d9c6f295e1936436fa3ec045c7ed67", "score": "0.5026808", "text": "function phar_edit_drugsupplier_info()\r\n {\r\n $data['offline_mode']\t\t=\t$this->config->item('offline_mode');\r\n $data['debug_mode']\t\t =\t$this->config->item('debug_mode');\r\n $data['app_currency']\t\t=\t$this->config->item('app_currency');\r\n\t\t$data['user_rights'] = $this->mthirra->get_user_rights($_SESSION['username']);\r\n $data['breadcrumbs'] = breadcrumbs('ehr_pharmacy/pharmacy_mgt','Pharmacy','ehr_pharmacy_supplier/phar_list_drug_suppliers/drug','List Drug Suppliers'); \r\n $data['form_purpose'] = $this->uri->segment(3);\r\n $data['supplier_type']\t= $this->uri->segment(4);\r\n $data['supplier_id']\t= $this->uri->segment(5);\r\n $data['packages_list']= $this->mpharma_rdb->get_drug_product_bysupplier($data['supplier_id']);\r\n\t \t\r\n if(count($_POST)) {\r\n // User has posted the form\r\n $data['form_purpose'] = $_POST['form_purpose'];\r\n $data['init_supplier_id']\t= $_POST['supplier_id'];\r\n $data['init_supplier_name'] = $_POST['supplier_name'];\r\n $data['init_registration_no']= $_POST['registration_no'];\r\n $data['init_acc_no'] = $_POST['acc_no'];\r\n $data['init_credit_term'] = $_POST['credit_term'];\r\n $data['init_supplier_remarks']= $_POST['supplier_remarks'];\r\n $data['contact_id'] = $_POST['contact_id'];\r\n $data['init_address'] = $_POST['address'];\r\n $data['init_address2'] = $_POST['address2'];\r\n $data['init_address3'] = $_POST['address3'];\r\n $data['init_town'] = $_POST['town'];\r\n $data['init_state'] = $_POST['state'];\r\n $data['init_postcode'] = $_POST['postcode'];\r\n $data['init_country'] = $_POST['country'];\r\n $data['init_tel_no'] = $_POST['tel_no'];\r\n $data['init_tel2_no'] = $_POST['tel2_no'];\r\n $data['init_tel3_no'] = $_POST['tel3_no'];\r\n $data['init_fax_no'] = $_POST['fax_no'];\r\n $data['init_fax2_no'] = $_POST['fax2_no'];\r\n $data['init_email'] = $_POST['email'];\r\n $data['init_contact_person']= $_POST['contact_person'];\r\n $data['init_contact_other'] = $_POST['contact_other'];\r\n $data['init_website'] = $_POST['website'];\r\n $data['init_contact_remarks'] = $_POST['contact_remarks'];\r\n } else {\r\n // First time form is displayed\r\n if ($data['form_purpose'] == \"new_supplier\") {\r\n $data['init_supplier_name'] = \"\";\r\n $data['init_registration_no']= \"\";\r\n $data['init_acc_no'] = \"\";\r\n $data['init_credit_term'] = 0;\r\n $data['init_supplier_remarks']= \"\";\r\n $data['init_address'] = \"\";\r\n $data['init_address2'] = \"\";\r\n $data['init_address3'] = \"\";\r\n $data['init_town'] = \"\";\r\n $data['init_state'] = \"\";\r\n $data['init_postcode'] = \"\";\r\n $data['init_country'] = \"\";\r\n $data['init_tel_no'] = \"\";\r\n $data['init_tel2_no'] = \"\";\r\n $data['init_tel3_no'] = \"\";\r\n $data['init_fax_no'] = \"\";\r\n $data['init_fax2_no'] = \"\";\r\n $data['init_email'] = \"\";\r\n $data['init_contact_person']= \"\";\r\n $data['init_contact_other'] = \"\";\r\n $data['init_website'] = \"\";\r\n $data['init_contact_remarks']= \"\";\r\n } elseif ($data['form_purpose'] == \"edit_supplier\") {\r\n //echo \"Edit supplier\";\r\n $data['supplier_info'] = $this->mpharma_rdb->get_supplier_list_drug($data['supplier_id']);\r\n $data['init_supplier_name'] = $data['supplier_info'][0]['supplier_name'];\r\n $data['init_registration_no']= $data['supplier_info'][0]['registration_no'];\r\n $data['contact_id'] = $data['supplier_info'][0]['contact_id'];\r\n $data['customer_info_id'] = $data['supplier_info'][0]['customer_info_id'];\r\n $data['init_acc_no'] = $data['supplier_info'][0]['acc_no'];\r\n $data['init_credit_term'] = $data['supplier_info'][0]['credit_term'];\r\n $data['init_supplier_remarks']= $data['supplier_info'][0]['remarks'];\r\n $data['init_address'] = $data['supplier_info'][0]['address'];\r\n $data['init_address2'] = $data['supplier_info'][0]['address2'];\r\n $data['init_address3'] = $data['supplier_info'][0]['address3'];\r\n $data['init_town'] = $data['supplier_info'][0]['town'];\r\n $data['init_state'] = $data['supplier_info'][0]['state'];\r\n $data['init_postcode'] = $data['supplier_info'][0]['postcode'];\r\n $data['init_country'] = $data['supplier_info'][0]['country'];\r\n $data['init_tel_no'] = $data['supplier_info'][0]['tel_no'];\r\n $data['init_tel2_no'] = $data['supplier_info'][0]['tel2_no'];\r\n $data['init_tel3_no'] = $data['supplier_info'][0]['tel2_no'];\r\n $data['init_fax_no'] = $data['supplier_info'][0]['fax_no'];\r\n $data['init_fax2_no'] = $data['supplier_info'][0]['fax2_no'];\r\n $data['init_email'] = $data['supplier_info'][0]['email'];\r\n $data['init_contact_person']= $data['supplier_info'][0]['contact_person'];\r\n $data['init_contact_other'] = $data['supplier_info'][0]['contact_other'];\r\n $data['init_website'] = $data['supplier_info'][0]['website'];\r\n $data['init_contact_remarks'] = $data['supplier_info'][0]['contact_remarks'];\r\n } //endif ($data['form_purpose'] == \"new_supplier\")\r\n } //endif(count($_POST))\r\n\t\t$data['title'] = \"Add/Edit Supplier\";\r\n $data['init_location_id'] = $_SESSION['location_id'];\r\n $data['init_clinic_name'] = NULL;\r\n $data['now_id'] = time();\r\n $data['now_date'] = date(\"Y-m-d\",$data['now_id']);\r\n\r\n\t\t$this->load->vars($data);\r\n // Run validation\r\n\t\tif ($this->form_validation->run('edit_drug_supplier') == FALSE){\r\n\t\t //$this->load->view('emr/emr_edit_patient_html');\t\t\t\r\n if ($_SESSION['thirra_mode'] == \"ehr_mobile\"){\r\n $new_header = \"ehr/header_xhtml-mobile10\";\r\n $new_banner = \"ehr/banner_ehr_wap\";\r\n $new_sidebar= \"ehr/sidebar_ehr_pharmacy_wap\";\r\n //$new_body = \"ehr/ehr_orders_edit_imagsupplier_info_wap\";\r\n $new_body = \"ehr/ehr_phar_edit_drugsupplier_info_html\";\r\n $new_footer = \"ehr/footer_emr_wap\";\r\n } else {\r\n //$new_header = \"ehr/header_xhtml1-strict\";\r\n $new_header = \"ehr/header_xhtml1-transitional\";\r\n $new_banner = \"ehr/banner_ehr_html\";\r\n $new_sidebar= \"ehr/sidebar_emr_pharmacy_html\";\r\n $new_body = \"ehr/ehr_phar_edit_drugsupplier_info_html\";\r\n $new_footer = \"ehr/footer_emr_html\";\r\n }\r\n if($data['user_rights']['section_orders'] < 100){\r\n $new_body = \"ehr/ehr_access_denied_html\";\r\n }\r\n $this->load->view($new_header);\t\t\t\r\n $this->load->view($new_banner);\t\t\t\r\n $this->load->view($new_sidebar);\t\t\t\r\n $this->load->view($new_body);\t\t\t\r\n $this->load->view($new_footer);\t\t\t\r\n } else {\r\n //echo \"\\nValidated successfully.\";\r\n //echo \"<br />Insert record\";\r\n if($data['form_purpose'] == \"new_supplier\") {\r\n // New supplier record\r\n $ins_supplier_array = array();\r\n $ins_supplier_array['staff_id'] = $_SESSION['staff_id'];\r\n $ins_supplier_array['now_id'] = $data['now_id'];\r\n $ins_supplier_array['supplier_id']\t = $data['now_id'];\r\n $ins_supplier_array['supplier_name'] = $data['init_supplier_name'];\r\n $ins_supplier_array['registration_no']= $data['init_registration_no'];\r\n $ins_supplier_array['contact_id'] = $data['now_id'];\r\n $ins_supplier_array['customer_info_id']= $data['now_id'];\r\n $ins_supplier_array['acc_no'] = $data['init_acc_no'];\r\n //$ins_supplier_array['account_id'] = $data['init_town'];\r\n if(is_numeric($data['init_credit_term'])){\r\n $ins_supplier_array['credit_term'] = $data['init_credit_term'];\r\n }\r\n //$ins_supplier_array['credit_term'] = $data['init_credit_term'];\r\n $ins_supplier_array['supplier_remarks']= $data['init_supplier_remarks'];\r\n $ins_supplier_array['address'] = $data['init_address'];\r\n $ins_supplier_array['address2'] = $data['init_address2'];\r\n $ins_supplier_array['address3'] = $data['init_address3'];\r\n $ins_supplier_array['town'] = $data['init_town'];\r\n $ins_supplier_array['state'] = $data['init_state'];\r\n $ins_supplier_array['postcode'] = $data['init_postcode'];\r\n $ins_supplier_array['country'] = $data['init_country'];\r\n $ins_supplier_array['tel_no'] = $data['init_tel_no'];\r\n $ins_supplier_array['tel_no2'] = $data['init_tel2_no'];\r\n $ins_supplier_array['tel_no3'] = $data['init_tel3_no'];\r\n $ins_supplier_array['fax_no'] = $data['init_fax_no'];\r\n $ins_supplier_array['fax_no2'] = $data['init_fax2_no'];\r\n $ins_supplier_array['email'] = $data['init_email'];\r\n $ins_supplier_array['contact_person'] = $data['init_contact_person'];\r\n $ins_supplier_array['other'] = $data['init_contact_other'];\r\n $ins_supplier_array['website'] = $data['init_website'];\r\n $ins_supplier_array['contact_remarks'] = $data['init_contact_remarks'];\r\n if($data['offline_mode']){\r\n $ins_supplier_array['synch_out'] = $data['now_id'];\r\n }\r\n\t $ins_supplier_data = $this->mpharma_wdb->insert_new_drugsupplier($ins_supplier_array);\r\n $this->session->set_flashdata('data_activity', 'Drug supplier added.');\r\n } elseif($data['form_purpose'] == \"edit_supplier\") {\r\n // Existing supplier record\r\n $upd_supplier_array = array();\r\n $upd_supplier_array['staff_id'] = $_SESSION['staff_id'];\r\n $upd_supplier_array['supplier_name'] = $data['init_supplier_name'];\r\n $upd_supplier_array['registration_no']= $data['init_registration_no'];\r\n $upd_supplier_array['contact_id'] = $data['contact_id'];\r\n $upd_supplier_array['customer_info_id']= $data['customer_info_id'];\r\n $upd_supplier_array['acc_no'] = $data['init_acc_no'];\r\n //$upd_supplier_array['account_id'] = $data['init_town'];\r\n if(is_numeric($data['init_credit_term'])){\r\n $upd_supplier_array['credit_term'] = $data['init_credit_term'];\r\n }\r\n //$upd_supplier_array['credit_term'] = $data['init_credit_term'];\r\n $upd_supplier_array['supplier_remarks']= $data['init_supplier_remarks'];\r\n $upd_supplier_array['supplier_id']= $data['supplier_id'];\r\n $upd_supplier_array['supplier_name'] = $data['init_supplier_name'];\r\n $upd_supplier_array['address'] = $data['init_address'];\r\n $upd_supplier_array['address2'] = $data['init_address2'];\r\n $upd_supplier_array['address3'] = $data['init_address3'];\r\n $upd_supplier_array['town'] = $data['init_town'];\r\n $upd_supplier_array['state'] = $data['init_state'];\r\n $upd_supplier_array['postcode'] = $data['init_postcode'];\r\n $upd_supplier_array['country'] = $data['init_country'];\r\n $upd_supplier_array['tel_no'] = $data['init_tel_no'];\r\n $upd_supplier_array['tel_no2'] = $data['init_tel2_no'];\r\n $upd_supplier_array['tel_no3'] = $data['init_tel3_no'];\r\n $upd_supplier_array['fax_no'] = $data['init_fax_no'];\r\n $upd_supplier_array['fax_no2'] = $data['init_fax2_no'];\r\n $upd_supplier_array['email'] = $data['init_email'];\r\n $upd_supplier_array['contact_person'] = $data['init_contact_person'];\r\n $upd_supplier_array['other'] = $data['init_contact_other'];\r\n $upd_supplier_array['website'] = $data['init_website'];\r\n $upd_supplier_array['contact_remarks'] = $data['init_contact_remarks'];\r\n\t $upd_supplier_data = $this->mpharma_wdb->update_drug_supplier($upd_supplier_array);\r\n $this->session->set_flashdata('data_activity', 'Drug supplier updated.');\r\n } //endif($data['diagnosis_id'] == \"new_supplier\")\r\n $new_page = base_url().\"index.php/ehr_pharmacy/phar_list_drug_suppliers\";\r\n header(\"Status: 200\");\r\n header(\"Location: \".$new_page);\r\n\r\n } // endif ($this->form_validation->run('edit_drug_supplier') == FALSE)\r\n\r\n\r\n }", "title": "" }, { "docid": "02d13c1694c2dd8c648189cc3b573807", "score": "0.50123584", "text": "function getProduit($reference){\n \n}", "title": "" }, { "docid": "89a38e2e0d93604a7012cab79b10b28c", "score": "0.5010793", "text": "function suppleir_put(){\n\n\t\tif(update('tbl_supplier',[\n\n\t\t\t\n\t\t 'vendor_id'=>parsejson()['vendor_id'],\n\t\t 'supplier_name'=>parsejson()['supplier_name'],\n\t\t 'supplier_mobile'=>parsejson()['supplier_mobile'],\n\t\t 'supplier_address'=>parsejson()['supplier_address'],\n\t\t 'supplier_latitude'=>parsejson()['supplier_latitude'],\n\t\t 'supplier_longitude'=>parsejson()['supplier_longitude'],\n\t\t 'supplier_open'=>parsejson()['supplier_open'],\n\t\t 'supplier_close'=>parsejson()['supplier_close'],\n\t\t 'supplier_holiday'=>parsejson()['supplier_holiday'],\n\t\t 'supplier_website'=>parsejson()['supplier_websit'],\n\t\t 'supplier_url'=>parsejson()['supplier_url'],\n\t\t 'supplier_banner'=>parsejson()['supplier_banner'],\n\t\t 'supplier_display_name'=>parsejson()['supplier_display_name'],\n\t\t 'supplier_description'=>parsejson()['supplier_description'],\n\t\t 'supplier_unicode'=>parsejson()['supplier_unicode'],\n\n\t\t],['suppleir_id'=>parsejson()['suppleir_id']])):\n\n\t\t\tjson_bind(true,CONST_HTTP_STATUS_OK,'Record Updated !',true);\n\n\t\telse:\n\n\t\t\tjson_bind(false,CONST_HTTP_STATUS_OK,'Error !',false);\n\n\t\tendif;\n\n\t}", "title": "" }, { "docid": "69137bcf66a7cb2b673af72794837b08", "score": "0.50107545", "text": "public function suppliersForDropdown()\n {\n return $this->model->suppliers()->get()->pluck('full_name', 'id');\n }", "title": "" }, { "docid": "2dc82dabc7e4c6e128cc4c96eb3ffd15", "score": "0.50068873", "text": "public function getAllSupplierByFPO()\n {\n $this->db->select('fpo_suppliers.supplier_id, fpo_suppliers.supp_name,fpo_suppliers.gl_group_id');\n $this->db->where(array('fpo_suppliers.fpo_id' => $_SESSION['user_id'], 'fpo_suppliers.status' => 1));\n $this->db->distinct();\n $this->db->from('fpo_suppliers');\n return $this->db->get()->result();\n }", "title": "" }, { "docid": "d56ecd6af4c1aac1236f724e8674d038", "score": "0.5003449", "text": "public function suppliers()\n {\n $this->mPageTitle = lang('suppliers');\n $this->repairer->checkPermissions();\n $this->render('inventory/suppliers_index');\n }", "title": "" }, { "docid": "eb5e95d30a39b6cf653352eabbc456fa", "score": "0.5002796", "text": "public function add_supplier()\n\t\t{ \n\t\t\t$log=new Log(\"supplier-\".date('Y-m-d').\".log\");\n\t\t\t$log->write('add_supplier called');\n\t\t\t$log->write($this->request->post);\n\t\t\t\n\t\t\t$mcrypt=new MCrypt();\n\t\t\t$keys = array(\n\t\t\t\t'firstname',\n\t\t\t\t'lastname',\n\t\t\t\t'email',\n\t\t\t\t'telephone',\n\t\t\t\t'state_name',\n\t\t\t\t'state_id',\n\t\t\t\t'district',\n\t\t\t\t'district_id',\n\t\t\t\t'supplier_group_id',\n\t\t\t\t'supplier_group_name',\n\t\t\t\t'location',\n\t\t\t\t'account',\n\t\t\t\t'ifsc',\n\t\t\t\t'bank',\n\t\t\t\t'bid',\n\t\t\t\t'bankaddress',\n\t\t\t\t'gst',\n\t\t\t\t'pan',\n\t\t\t\t'store_id',\n\t\t\t\t'user_id',\n\t\t\t\t'group_id'\n\t\t\t\t);\n\t\t\tforeach ($keys as $key) \t\t\n\t\t\t{\n\t\t\t\t$this->request->post[$key] =$mcrypt->decrypt($this->request->post[$key]); \n\t\t\t}\n\t\t\t\n\t\t\t$this->request->post['fax'] =$this->request->post['district']; \n\t\t\t//$this->request->post['location'] =$this->request->post['bankaddress']; \n\t\t\t$log->write($this->request->post);\n\t\t\tif ((utf8_strlen($this->request->post['firstname']) < 1) || (utf8_strlen(trim($this->request->post['firstname'])) > 32)) \n\t\t\t{\n\t\t\t\t$json=array('status'=>0,'msg'=>'First name can not be empty');\n\t\t\t\treturn $this->response->setOutput(json_encode($json));\n\t\t\t}\n\n\t\t\telse if ((utf8_strlen($this->request->post['lastname']) < 1) || (utf8_strlen(trim($this->request->post['lastname'])) > 32)) \n\t\t\t{\n\t\t\t\t$json=array('status'=>0,'msg'=>'Last name can not be empty');\n\t\t\t\treturn $this->response->setOutput(json_encode($json));\n\t\t\t}\n\t\t\t/*\n\t\t\telse if ((utf8_strlen($this->request->post['email']) > 96) || !filter_var($this->request->post['email'], FILTER_VALIDATE_EMAIL)) \n\t\t\t{\n\t\t\t\t$json=array('status'=>0,'msg'=>'Email must be less then 96 characters');\n\t\t\t\treturn $this->response->setOutput(json_encode($json));\n\t\t\t}\n\t\t\t*/\n\t\t\telse if ((utf8_strlen($this->request->post['telephone']) < 3) || (utf8_strlen($this->request->post['telephone']) > 32)) \n\t\t\t{\n\t\t\t\t$json=array('status'=>0,'msg'=>'Telephone must be between 3 and 32 characters!');\n\t\t\t\treturn $this->response->setOutput(json_encode($json));\n\t\t\t}\n\t\t\telse if ((utf8_strlen($this->request->post['district']) < 3) || (utf8_strlen($this->request->post['district']) > 32)) \n\t\t\t{\n\t\t\t\t$json=array('status'=>0,'msg'=>'District must be between 3 and 32 characters!');\n\t\t\t\treturn $this->response->setOutput(json_encode($json));\n\t\t\t}\n\t\t\t/*\n\t\t\telse if ((utf8_strlen($this->request->post['ifsc']) < 3) || (utf8_strlen($this->request->post['ifsc']) > 11)) \n\t\t\t{\n\t\t\t\t$json=array('status'=>0,'msg'=>'IFSC Code must be between 1 and 11 characters!');\n\t\t\t\treturn $this->response->setOutput(json_encode($json));\n\t\t\t}\n\t\t\telse if ((utf8_strlen($this->request->post['bank']) < 3) || (utf8_strlen($this->request->post['bank']) > 50)) \n\t\t\t{\n\t\t\t\t$json=array('status'=>0,'msg'=>'Bank Name must be between 3 and 50 characters!');\n\t\t\t\treturn $this->response->setOutput(json_encode($json));\n\t\t\t}\n\n\t\t\telse if ((utf8_strlen($this->request->post['account']) < 8) || (utf8_strlen($this->request->post['account']) > 25)) \n\t\t\t{\n\t\t\t\t$json=array('status'=>0,'msg'=>'Bank Account Number must be between 8 and 25 characters!');\n\t\t\t\treturn $this->response->setOutput(json_encode($json));\n\t\t\t}\n\t\t\t*/\n\t\t\telse\n\t\t\t{\t\n\t\t \n\t\t\t\t$this->adminmodel('purchase/supplier');\n\t\t\t\t$log->write('check supplier');\n\t\t\t\t$supplier_data=$this->model_purchase_supplier->get_supplier_by_gst($this->request->post['gst']);\n\t\t\t\t$log->write($supplier_data);\n\t\t\t\tif(empty($supplier_data))\n\t\t\t\t{\n\t\t\t\t\t$supplier_data=$this->model_purchase_supplier->get_supplier_by_pan($this->request->post['pan']);\n\t\t\t\t\t$log->write('in if data not found by gst');\n\t\t\t\t\t$log->write($supplier_data);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($supplier_data->num_rows>0)\n\t\t\t\t{\n\t\t\t\t\tif($supplier_data->row['gst']==$this->request->post['gst'])\n\t\t\t\t\t{\n\t\t\t\t\t\t$json=array('status'=>2,'msg'=>'This GSTN is allready exists !','supplier_id'=>$mcrypt->encrypt($supplier_data->row['pre_mongified_id']));\n\t\t\t\t\t\treturn $this->response->setOutput(json_encode($json));\n\t\t\t\t\t}\n\t\t\t\t\telse if($supplier_data->row['pan']==$this->request->post['pan'])\n\t\t\t\t\t{\n\t\t\t\t\t\t$json=array('status'=>2,'msg'=>'This PAN is allready exists !','supplier_id'=>$mcrypt->encrypt($supplier_data->row['pre_mongified_id']));\n\t\t\t\t\t\treturn $this->response->setOutput(json_encode($json));\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$json=array('status'=>2,'msg'=>'This PAN/GST is allready exists !','supplier_id'=>$mcrypt->encrypt($supplier_data->row['pre_mongified_id']));\n\t\t\t\t\t\treturn $this->response->setOutput(json_encode($json));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$supplier=$this->model_purchase_supplier->insert_supplier($this->request->post);\n\t\t\t\t\t$log->write($supplier);\n\t\t\t\t\t$json=array('status'=>1,'msg'=>'Supplier added successfully');\n\t\t\t\t\treturn $this->response->setOutput(json_encode($json));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}", "title": "" }, { "docid": "02c1118bb32229713b0ed4b0e15352d7", "score": "0.50023204", "text": "function get_supplier_id($id_supplier)\n\t\t{\n\t\t\t$query = $this->db->get_where('tb_supplier', array('id_supplier' => $id_supplier,'kode_kantor' => $this->session->userdata('ses_kode_kantor')));\n\t\t\tif($query->num_rows() > 0)\n\t\t\t{\n\t\t\t\treturn $query->row();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "3f1afb7db446386f5b3708c184ec8f65", "score": "0.4985996", "text": "public function bdtask_product_search_by_supplier()\n {\n $product_name = $this->input->post('product_name', TRUE);\n $product_info = $this->purchase_model->product_search_item($product_name);\n if (!empty($product_info)) {\n $list[''] = '';\n foreach ($product_info as $value) {\n $json_product[] = array('label' => $value['product_name'] . '(' . $value['product_model'] . ')', 'value' => $value['product_id']);\n }\n } else {\n $json_product[] = 'No Product Found';\n }\n echo json_encode($json_product);\n }", "title": "" }, { "docid": "0d4c6c60de5288a000bc7a088d84bd0b", "score": "0.49568546", "text": "function delete_supplier_account()\n {\n \n $db = JFactory::getDbo();\n \n $supplier_id = intval(JRequest::getVar(\"supplier_id\"));\n \n $query = \"select opening_balance, account_balance from `#__suppliers` where id=\" .$supplier_id;\n $db->setQuery($query);\n $balances = $db->loadObject();\n \n $balance = abs( floatval($balances->opening_balance) - floatval($balances->account_balance) );\n \n if($balance > 0)\n {\n return \"Supplier's account cannot be deleted. Opening balance differs from account balance.\";\n }\n \n $count = 0;\n \n $query = \"select count(id) from `#__payments` where party_id=\" . $supplier_id . \" and payment_type=\" . SUPPLIER_PAYMENT;\n $db->setQuery($query);\n $count += intval($db->loadResult());\n \n $query = \"select count(id) from `#__payment_items` where party_id=\" . $supplier_id . \" and payment_type=\" . SUPPLIER_PAYMENT; \n $db->setQuery($query);\n $count += intval($db->loadResult());\n \n /*$query = \"select count(id) from `#__purchase_orders` where supplier_id=\" . $supplier_id;\n $db->setQuery($query);\n $count += intval($db->loadResult());*/\n \n $query = \"select count(id) from `#__purchase` where supplier_id=\" . $supplier_id;\n $db->setQuery($query);\n $count += intval($db->loadResult());\n \n /*$query = \"select count(id) from `#__purchase_returns` where supplier_id=\" . $supplier_id;\n $db->setQuery($query);\n $count += intval($db->loadResult());*/\n \n if($count > 0)\n {\n return \"Unable to delete supplier. It has dependencies.\";\n }\n \n $query = \"select `supplier_name` from `#__suppliers` where id=\" .$supplier_id;\n $db->setQuery($query);\n $supplier_name = $db->loadResult();\n \n $query = \"delete from `#__suppliers` where id=\" .$supplier_id;\n $db->setQuery($query);\n $db->query();\n \n Functions::log_activity(\"Supplier \" . $supplier_name . \" has been deleted.\");\n return \"Supplier account deleted successfully.\";\n }", "title": "" }, { "docid": "84aa89967f30ae6ae3c8e5ae7ecb8384", "score": "0.4956648", "text": "public function checkSupplier($supplierId=1)\n {\n $supplier=0;\n if($supplierId != 1)\n {\n $roleData=Mage::getModel('admin/user')->load($supplierId)->getRole()->getData();\n $supplierRole=Mage::getStoreConfig('suppliers/suppliers/role_supplier_user_dropdown');\n if($roleData['role_id']==$supplierRole)\n {\n $supplier=1;\n }\n }\n return $supplier;\n }", "title": "" }, { "docid": "4f387261410e71565ac981785f37bfb8", "score": "0.495443", "text": "public function show($id)\n {\n return supplier::findOrFail($id);\n }", "title": "" }, { "docid": "7dde301049520c30061fa7495f8a6b3e", "score": "0.4952802", "text": "function add_supp_trans($type, $supplier_id, $date_, $due_date, $reference, $supp_reference,\n\t$amount, $amount_tax, $discount, $err_msg=\"\", $rate=0)\n{\n\t$date = date2sql($date_);\n\tif ($due_date == \"\")\n\t\t$due_date = \"0000-00-00\";\n\telse\n\t\t$due_date = date2sql($due_date);\n\n\t$trans_no = get_next_trans_no($type);\n\n\t$curr = get_supplier_currency($supplier_id);\n\t\n\tif ($rate == 0)\n\t\t$rate = get_exchange_rate_from_home_currency($curr, $date_);\n\n\n\t$sql = \"INSERT INTO \".TB_PREF.\"supp_trans (trans_no, type, supplier_id, tran_date, due_date,\n\t\treference, supp_reference, ov_amount, ov_gst, rate, ov_discount) \";\n\t$sql .= \"VALUES (\".db_escape($trans_no).\", \".db_escape($type)\n\t.\", \".db_escape($supplier_id).\", '$date', '$due_date',\n\t\t\".db_escape($reference).\", \".db_escape($supp_reference).\", \".db_escape($amount)\n\t\t.\", \".db_escape($amount_tax).\", \".db_escape($rate).\", \".db_escape($discount).\")\";\n\n\tif ($err_msg == \"\")\n\t\t$err_msg = \"Cannot insert a supplier transaction record\";\n\n\tdb_query($sql, $err_msg);\n\tadd_audit_trail($type, $trans_no, $date_);\n\n\treturn $trans_no;\n}", "title": "" }, { "docid": "9af31a3844e48e2d752b096b3b31354e", "score": "0.49401256", "text": "public static function UpdateSupplierInfo_SpecificSupplier($supplierID)\n {\n $sp = 'CALL uspUpdateSupplierInfo_SpecificSupplier(?)';\n $param = array(&$supplierID);\n return DBHelper::SelectParam($sp, $param);\n }", "title": "" }, { "docid": "930edd4e551ab003365724718c2339d9", "score": "0.49357948", "text": "public function getShippingProfile();", "title": "" }, { "docid": "fc83cc9f7ef20eaa366cc121e4dc66f2", "score": "0.49244824", "text": "public function product_search_by_supplier(){\n\n\n\t\t$CI =& get_instance();\n\t\t$CI->load->library('lpurchase');\n\t\t$CI->load->model('Suppliers');\n\t\t$supplier_id \t= $this->input->post('supplier_id');\n\t\t$product_name \t= $this->input->post('product_name');\n $product_info \t= $CI->Suppliers->product_search_item($supplier_id,$product_name);\n\n\t\t$list[''] = '';\n\t\tforeach ($product_info as $value) {\n\t\t\t$json_product[] = array('label'=>$value['product_name'].'('.$value['product_model'].')','value'=>$value['product_id']);\n\t\t} \n echo json_encode($json_product);\n\t}", "title": "" }, { "docid": "e37c0f8dbc70df60e5e4fa1defae8756", "score": "0.49230152", "text": "public function getPrimary()\r\n { return \"sku\";\r\n }", "title": "" }, { "docid": "f99b9c28bf893da93822d494b7af8d4e", "score": "0.49187577", "text": "public function Supplier()\n {\n $this->_Supplier->ClearAllOptions();\n return $this->_Supplier;\n }", "title": "" }, { "docid": "5daabba464861283210b73fbe84ba25b", "score": "0.49050224", "text": "function profile()\n\t{\n\t\tif ($this->session->userdata('is_login') == TRUE)\n\t\t{\n\t\t\t$data['feat_categories'] = $this->categories->listings(0); //main categories\n\t\t\t$viewed_by = $this->uri->segment(3);\n\n\t\t\tif ($viewed_by == \"admin\")\n\t\t\t{\n\t\t\t\t$buyer_id = $this->uri->segment(4);\n\t\t\t\t$data['buyer_profile'] = $this->buyers->buyerinfo($buyer_id);\n\t\t\t\t$this->load->view('admin/buyer/buyer-profile', $data);\n\t\t\t}\n\t\t\telse if ($viewed_by == \"supplier\")\n\t\t\t{\n\t\t\t\t$supplier_viewtype = $this->uri->segment(4);\n\t\t\t\t$supplier_id = $this->session->userdata('id');\n\n\t\t\t\tif ($supplier_viewtype == \"view\")\n\t\t\t\t{\n\t\t\t\t\t$data['bt_list'] = $this->suppliers->shipping_list_grouped($supplier_id,'','','','',1); // 1 for shipped status\n\t\t\t\t\t$data['supplier_profile'] = $this->suppliers->supplierinfo($supplier_id);\n\t\t\t\t\t$data['supplierID'] = $supplier_id;\n\t\t\t\t\t$this->load->view('supplier/supplier-view-profile', $data);\n\t\t\t\t}\n\t\t\t\telse if ($supplier_viewtype == \"update\")\n\t\t\t\t{\n\t\t\t\t\t$data['countr_sel'] = $this->countries->default_country();\n\t\t\t\t\t$data['states'] = $this->countries->states($data['countr_sel']);\n\t\t\t\t\t$data['creditcards'] = $this->creditcards->listing();\n\t\t\t\t\t$data['countries'] = $this->countries->listing_country();\n\t\t\t\t\t$data['supplier_profile'] = $this->suppliers->supplierinfo($supplier_id);\n\t\t\t\t\t$this->load->view('supplier/supplier-edit-profile', $data);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "519a4e0eca95b7d11a8589cecc515ed3", "score": "0.4901299", "text": "public function supplier_details($supplier_id) {\n $content = $this->lsupplier->supplier_detail_data($supplier_id);\n $this->supplier_id = $supplier_id;\n $this->template->full_admin_html_view($content);\n }", "title": "" }, { "docid": "d6a07fa90f8444795a05c21e3053bbca", "score": "0.49004552", "text": "public function primary(Supplier $supplier, Photo $photo)\n {\n $supplier->update(['primary' => $photo->id]);\n return Supplier::find($supplier->id);\n }", "title": "" }, { "docid": "c34ff0878d3a6edbbbb585221225cb28", "score": "0.48927015", "text": "public function testFindSuppliersByUser()\n {\n $kernel = static::createKernel();\n $kernel->boot();\n\n // Retrieve admin user.\n $user = $kernel->getContainer()->get('pim_user.repository.user')->findOneByIdentifier('admin');\n // Retrieve or create supplier.\n /** @var Supplier $supplier */\n $supplier = $kernel->getContainer()->get('supplier.repository')->findOneByIdentifier('bosch');\n if (empty($supplier)) {\n $supplier = $kernel->getContainer()->get('supplier.factory')->create();\n $supplier->setCode('bosch');\n $supplier->setName('Bosch');\n }\n\n // Set user & save supplier in DB.\n $supplier->setUsers([$user]);\n $kernel->getContainer()->get('supplier.manager')->save($supplier);\n\n // Find supplier.\n $suppliers = $kernel->getContainer()->get('supplier.repository')->findSuppliersByUser($user);\n\n // Suppliers found should contain 1 element.\n self::assertEquals(1, count($suppliers));\n $supplier = $suppliers[0];\n // This element should be \"bosch\" supplier.\n self::assertEquals('bosch', $supplier->getCode());\n }", "title": "" }, { "docid": "5d1b1eddae3dd186eadbdf6d295847c5", "score": "0.4890363", "text": "public function testApplicableProviders(): void\n {\n $this->supplier->addProvider($this->provider1->reveal());\n $this->supplier->addProvider($this->provider2->reveal());\n $this->provider1->isApplicable()->willReturn(true);\n $this->provider2->isApplicable()->willReturn(true);\n $this->provider1->getInformation()->willReturn($this->information1->reveal());\n $this->provider2->getInformation()->willReturn($this->information2->reveal());\n\n $result = $this->supplier->getInformations();\n\n $this->assertSame([\n $this->information1->reveal(),\n $this->information2->reveal(),\n ], $result);\n }", "title": "" }, { "docid": "71df6f70803e87486e47e5421351818d", "score": "0.48709017", "text": "public function product_search_by_supplier(){\n\n\t\t$CI =& get_instance();\n\t\t$CI->auth->check_admin_auth();\n\t\t$CI->load->library('lpurchase');\n\t\t$CI->load->model('Suppliers');\n\t\t$supplier_id = $this->input->post('supplier_id');\t\t\t\n\t\t$product_name = $this->input->post('product_name');\t\t\t\n $product_info = $CI->Suppliers->product_search_item($supplier_id,$product_name);\n\n \t$list[''] = \"\";\n\t\tforeach ($product_info as $value) {\n\t\t\t$json_product[] = array('label'=>$value['product_name'].'-('.$value['product_model'].')','value'=>$value['product_id']);\n\t\t} \n echo json_encode($json_product);\n\t}", "title": "" }, { "docid": "58c234383c32526079ed9c8757a21987", "score": "0.4867911", "text": "public function getSuppliers($type=null)\n\t {\n\t\t $specificSuppliers=null;\n\t\t if ($type===null) {\n\t\t\t $suppliers = Supplier::where(\"deleted\",0)->orderBy(\"name\")->get();\n\t\t\t $state=\"ALL\";\n\t\t }else{\n\t\t\t $specificSuppliers = Supplier::where(\"type\",\"like\",\"%\".$type.\"%\")->where(\"deleted\",0)->orderBy(\"name\")->get();\n\t\t\t $suppliers = Supplier::where(\"type\",\"not like\",\"%\".$type.\"%\")->where(\"deleted\",0)->orderBy(\"name\")->get();\n\t\t\t $state=\"SPEC\";\n\t\t }\n\t\t return json_encode(['state'=>$state,'suppliers'=>$suppliers,'specificSuppliers'=>$specificSuppliers]);\n\t }", "title": "" }, { "docid": "3bda2275babdd9b960575b6a85d56d70", "score": "0.48600194", "text": "public function run()\n {\n factory(Supplier::class,1)->create([\"supplier_code\"=>\"WAB\"]);\n factory(Supplier::class,1)->create([\"supplier_code\"=>\"WAF\"]);\n factory(Supplier::class,1)->create([\"supplier_code\"=>\"WAC\"]);\n factory(Supplier::class,1)->create([\"supplier_code\"=>\"WAM\"]);\n }", "title": "" }, { "docid": "4a43bd14bbf8331cdcf6b83b7597686c", "score": "0.48580387", "text": "private function parseSupplier($_worksheet, $_rowIndex){\n\t\t\t$cell = $_worksheet->getCell(SUPPLIER_COL . $_rowIndex);\n\t\t\t$supplier = trim($cell->getValue());\n\t\t\t$supplier = htmlspecialchars($supplier,ENT_QUOTES);\n\t\t\treturn $supplier;\n\t\t}", "title": "" }, { "docid": "817262c6595c92e7b36af40dd35c8432", "score": "0.48541063", "text": "public function show($id)\n {\n //\n $id_supplier = $id;\n $oSupplier = Supplier::find($id_supplier);\n }", "title": "" }, { "docid": "cf8f6dabbc5d23c97b5deb8f51f1387f", "score": "0.48480472", "text": "private function updateProductSuppliers($id_product, $id_suppliers = array(), $id_product_attribute = 0)\n {\n Db::getInstance()->delete('product_supplier', \"id_product =\". (int) $id_product.\"\");\n\n foreach ($id_suppliers as $id_supplier) {\n $product_supplier = new ProductSupplier();\n $product_supplier->id_product = $id_product;\n $product_supplier->id_product_attribute = $id_product_attribute;\n $product_supplier->id_supplier = $id_supplier;\n $product_supplier->save();\n }\n }", "title": "" }, { "docid": "db38cb4321f3f64b13d015c89e81cce0", "score": "0.48465943", "text": "function getOne()\n {\n $this->db->where('id', $this->id);\n return $this->db->get('suppliers')->result();\n }", "title": "" }, { "docid": "a8d103037011968e58e71754ddcc1797", "score": "0.48432535", "text": "public function getAccountingSupplierParty()\n {\n return $this->accountingSupplierParty;\n }", "title": "" }, { "docid": "07512413436729b01171393d08794383", "score": "0.48300993", "text": "public function getSupplierProductsCount() {\n $count = array();\n\n $collection = Mage::getModel('catalog/product')\n ->getCollection()\n ->addAttributeToSelect('creator_id')\n ->addAttributeToFilter(array(array('attribute' => 'creator_id', 'eq' => Mage::helper('supplierfrontendproductuploader')->getSupplierId())));\n\n foreach($collection AS $product) {\n $count[] = $product->getId();\n }\n\n return count($count);\n }", "title": "" }, { "docid": "17d27903dd120bf32ae657d5e2eee99f", "score": "0.4826376", "text": "function find_by_supplierID($table,$id){\n \t\tglobal $db;\n \t\t$id = (int)$id;\n \n \tif(tableExists($table)){\n \t$sql = $db->query(\"SELECT * FROM {$db->escape($table)} WHERE supplierID='{$db->escape($id)}' LIMIT 1\");\n \tif($result = $db->fetch_assoc($sql))\n \treturn $result;\n \telse\n \treturn null;\n \t}\n\t}", "title": "" }, { "docid": "6d5879599a7c5f31661be6b7d659b845", "score": "0.48260355", "text": "public function amendSupplierCost(Article $article, Shop $shop)\n {\n // Purchase price is not available before version 5.2\n if (method_exists($article->getMainDetail(), 'getPurchasePrice')) {\n $supplierCost = $article->getMainDetail()->getPurchasePrice();\n $this->setSupplierCost(PriceHelper::convertToShopCurrency($supplierCost, $shop));\n }\n }", "title": "" }, { "docid": "2e3230e7d4dcda98718a322edef6807d", "score": "0.48220515", "text": "public function index()\n {\n $user = Auth::user();\n return $user->suppliers->load(['users']);\n }", "title": "" }, { "docid": "4d792d8a2efd6c4835b2594f81b772f0", "score": "0.4817006", "text": "function &getCredit_usage_info()\n\t{\n\t\tif ($this->_loadCredit_usage_info())\n\t\t{\n\t\t//load the data nothing else\t \n\t\t}\n\t\t//print_r($this->_data);\t\n\t\t\n \treturn $this->_credit_usage_info;\n\t}", "title": "" } ]
124990308c262f881164dd9a5099bbde
don't remove this bracket! COMMENT LAYOUT Comment Layout
[ { "docid": "2fa4b26405cca6183a5db90d5584afb1", "score": "0.0", "text": "function bones_comments( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment; ?>\n\t<li <?php comment_class(); ?>>\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"clearfix\">\n\t\t\t<header class=\"comment-author vcard\">\n\t\t\t\t<?php\n\t\t\t\t/*\n\t\t\t\t\tthis is the new responsive optimized comment image. It used the new HTML5 data-attribute to display comment gravatars on larger screens only. What this means is that on larger posts, mobile sites don't have a ton of requests for comment images. This makes load time incredibly fast! If you'd like to change it back, just replace it with the regular wordpress gravatar call:\n\t\t\t\t\techo get_avatar($comment,$size='32',$default='<path_to_url>' );\n\t\t\t\t*/\n\t\t\t\t?>\n\t\t\t\t<?php // custom gravatar call ?>\n\t\t\t\t<?php\n\t\t\t\t\t// create variable\n\t\t\t\t\t$bgauthemail = get_comment_author_email();\n\t\t\t\t?>\n\t\t\t\t<img data-gravatar=\"http://www.gravatar.com/avatar/<?php echo md5( $bgauthemail ); ?>?s=32\" class=\"load-gravatar avatar avatar-48 photo\" height=\"32\" width=\"32\" src=\"<?php echo get_template_directory_uri(); ?>/library/images/nothing.gif\" />\n\t\t\t\t<?php // end custom gravatar call ?>\n\t\t\t\t<?php printf(__( '<cite class=\"fn\">%s</cite>', 'bonestheme' ), get_comment_author_link()) ?>\n\t\t\t\t<time datetime=\"<?php echo comment_time('Y-m-j'); ?>\"><a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\"><?php comment_time(__( 'F jS, Y', 'bonestheme' )); ?> </a></time>\n\t\t\t\t<?php edit_comment_link(__( '(Edit)', 'bonestheme' ),' ','') ?>\n\t\t\t</header>\n\t\t\t<?php if ($comment->comment_approved == '0') : ?>\n\t\t\t\t<div class=\"alert alert-info\">\n\t\t\t\t\t<p><?php _e( 'Your comment is awaiting moderation.', 'bonestheme' ) ?></p>\n\t\t\t\t</div>\n\t\t\t<?php endif; ?>\n\t\t\t<section class=\"comment_content clearfix\">\n\t\t\t\t<?php comment_text() ?>\n\t\t\t</section>\n\t\t\t<?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\n\t\t</article>\n\t<?php // </li> is added by WordPress automatically ?>\n<?php\n}", "title": "" } ]
[ { "docid": "df75faeb698ddd8c6a8b75723df813ff", "score": "0.7532078", "text": "function upgrade_430_fix_comments()\n {\n }", "title": "" }, { "docid": "fe07ae680d7b08178cb700aba61e1012", "score": "0.7044204", "text": "public function the_comment()\n {\n }", "title": "" }, { "docid": "5b744d1be37ac1b6f7e2cf578434b6d4", "score": "0.68439066", "text": "function the_comment()\n {\n }", "title": "" }, { "docid": "a7754e9c28f45574ba6f67ef2920f52a", "score": "0.6841109", "text": "abstract public function comment();", "title": "" }, { "docid": "1fabc48af375dfee9db8b15de44cf998", "score": "0.6787464", "text": "public function templateComment()\n {\n // just showing how powerful can commenting be with extension\n }", "title": "" }, { "docid": "a024ae5f57f24ef3417e511ed573a847", "score": "0.67515504", "text": "public function next_comment()\n {\n }", "title": "" }, { "docid": "13e9c957bcb517abd9718cc7150b3673", "score": "0.67030543", "text": "public function recent_comments_style()\n {\n }", "title": "" }, { "docid": "1c20a63bede3ed21a9d6ac8b6910d5a1", "score": "0.6630055", "text": "function register_block_core_comments()\n {\n }", "title": "" }, { "docid": "08fa814b6776794cb700c00338a860bb", "score": "0.6584008", "text": "function newUnderComment();", "title": "" }, { "docid": "49b00d790aa5e23a1fc5a7115d7b15c3", "score": "0.6557395", "text": "function df_disable_comments_status()\n{\n return false;\n}", "title": "" }, { "docid": "b61081cb261e1da90c0fbb734aedef5a", "score": "0.65567625", "text": "function wizate_comments_close() {\n\t\techo '</div>';\n }", "title": "" }, { "docid": "2bcf168f9ed89a8e29c9e11a7cfd5c51", "score": "0.65502465", "text": "function register_block_core_comment_template()\n {\n }", "title": "" }, { "docid": "c598986c26135df91fc2f8ac5ab3fb94", "score": "0.64913416", "text": "function tcf_end_comments( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment; ?>\n </div></div>\n<?php\n}", "title": "" }, { "docid": "043465615b9f1ec68cdc6e8881912d00", "score": "0.64845777", "text": "function register_block_core_comments_title()\n {\n }", "title": "" }, { "docid": "8c815a85f62a11940e568233a87d8b73", "score": "0.64832866", "text": "function tempera_comments_off() { \nif ( ! comments_open() ) : ?>\n\t<p class=\"nocomments\"><?php _e( 'Comments are closed.', 'tempera' ); ?></p>\n<?php endif; // end ! comments_open() \n}", "title": "" }, { "docid": "e43cb7656c560b6816ed1d24f9102a6e", "score": "0.6478999", "text": "function register_block_core_comment_content()\n {\n }", "title": "" }, { "docid": "f653d666d24240d51e6e2e9dd9ef3b98", "score": "0.64476013", "text": "function post_process() {\n $this->_format_doc_comment();\n }", "title": "" }, { "docid": "3dcebbe43ce95b4bd93b89fdab36d935", "score": "0.6414668", "text": "function wap8_trackbacks( $comment ) {\n$GLOBALS['comment'] = $comment; ?>\n<li><?php printf( __( '%s', 'designcrumbs' ), get_comment_author_link() ) ?> <?php edit_comment_link( __( 'Edit', 'designcrumbs' ), '<span>', '</span>' ); ?>\n<?php\n}", "title": "" }, { "docid": "6bf074c7b4737674df61e639091244f3", "score": "0.64031184", "text": "function OutputComment() {\n\t\t$pagecomment = trim($this->shortDescription) ? PrepString($this->shortDescription).\"<br />\" : \"\";\n\t\t$pagecomment .= trim($this->longDescription) ? PrepString($this->longDescription).\"<br />\" : \"\";\n\t\t$pagecomment .= trim($this->tags) ? \"<i>\".PrepString($this->tags).\"</i>\" : \"\";\n\t\t$pagecomment = $pagecomment ? $pagecomment : \"<i>(Undocumented)</i>\";\n\t\t$pagecomment = \"<div class='pagecomment'>$pagecomment</div>\";\n\t\treturn $pagecomment;\n\t}", "title": "" }, { "docid": "23ac0aa8cc62fc8920a83347e071dc1a", "score": "0.6357633", "text": "function df_disable_comments_status()\r\n\t{\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "6c27a830b094a54fbec4baa1c4ee98c6", "score": "0.6283154", "text": "function bones_comments( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment; ?>\n <div id=\"comment-<?php comment_ID(); ?>\" <?php comment_class('cf'); ?>>\n <?php echo comment_placeholder($comment, $args, $depth); ?>\n <?php // </li> is added by WordPress automatically ?>\n<?php\n}", "title": "" }, { "docid": "bf455c6b4011a70edecbb3fc904a86b4", "score": "0.62779033", "text": "function df_disable_comments_status() {\n\treturn false;\n}", "title": "" }, { "docid": "bf455c6b4011a70edecbb3fc904a86b4", "score": "0.62779033", "text": "function df_disable_comments_status() {\n\treturn false;\n}", "title": "" }, { "docid": "3593f1831be0db75b06ce53d56cec23e", "score": "0.6270611", "text": "function phptemplate_preprocess_comment_wrapper(&$vars) {\r\n $vars['display_mode'] = COMMENT_MODE_FLAT_EXPANDED;\r\n $vars['display_order'] = COMMENT_ORDER_OLDEST_FIRST;\r\n $vars['comment_controls_state'] = COMMENT_CONTROLS_HIDDEN;\r\n}", "title": "" }, { "docid": "951a769c523179c80e1dbfbdf066363e", "score": "0.62558067", "text": "function hybrid_comments_end_callback() {\n\techo '</li><!-- .comment -->';\n}", "title": "" }, { "docid": "4169003364e705f463f68b67b4950875", "score": "0.6254449", "text": "function rgc_disable_comments_status() {\n return false;\n}", "title": "" }, { "docid": "4169003364e705f463f68b67b4950875", "score": "0.6254449", "text": "function rgc_disable_comments_status() {\n return false;\n}", "title": "" }, { "docid": "0e862332b5c7836b2b41f7a7a1f3f6f1", "score": "0.62368447", "text": "function gwt_disable_comments_status() {\r\n return false;\r\n}", "title": "" }, { "docid": "75ea27d7dcbf92fbc5e62144a7b41fed", "score": "0.6235867", "text": "function close_comment() {?>\n\t</article>\n<?php\n}", "title": "" }, { "docid": "26c251ba1c9b0170cc7dd1fec527a923", "score": "0.6234465", "text": "function pixelgrade_shape_comment( $comment, $args, $depth ) {\n\t\tswitch ( $comment->comment_type ) :\n\t\t\tcase 'pingback':\n\t\t\tcase 'trackback':\n\t\t\t\t?>\n\t\t\t\t<li class=\"post pingback\">\n\t\t\t\t<p><?php esc_html_e( 'Pingback:', '__components_txtd' ); ?><?php comment_author_link(); ?><?php edit_comment_link( esc_html__( '(Edit)', '__components_txtd' ), ' ' ); ?></p>\n\t\t\t\t<?php\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t?>\n\t\t\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n\t\t\t\t<article id=\"div-comment-<?php comment_ID(); ?>\" class=\"comment__wrapper\">\n\t\t\t\t\t<?php if ( 0 != $args['avatar_size'] ) : ?>\n\t\t\t\t\t\t<div class=\"comment__avatar\"><?php echo get_avatar( $comment, $args['avatar_size'] ); ?></div>\n\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t<div class=\"comment__body\">\n\t\t\t\t\t\t<header class=\"c-meta\">\n\t\t\t\t\t\t\t<div class=\"comment__author vcard\">\n\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t/* translators: %s: comment author link */\n\t\t\t\t\t\t\t\tprintf( wp_kses_post( __( '%s <span class=\"says\">says:</span>', '__components_txtd' ) ), sprintf( '<b class=\"fn\">%s</b>', get_comment_author_link( $comment ) ) );\n\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t</div><!-- .comment-author -->\n\n\t\t\t\t\t\t\t<div class=\"comment__metadata\">\n\t\t\t\t\t\t\t\t<a href=\"<?php echo esc_url( get_comment_link( $comment, $args ) ); ?>\">\n\t\t\t\t\t\t\t\t\t<time datetime=\"<?php esc_attr( get_comment_time( 'c' ) ); ?>\">\n\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t/* translators: 1: comment date, 2: comment time */\n\t\t\t\t\t\t\t\t\t\tprintf( esc_html__( '%1$s at %2$s', '__components_txtd' ), esc_html( get_comment_date( '', $comment ) ), esc_html( get_comment_time() ) );\n\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t</time>\n\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t<?php edit_comment_link( esc_html__( 'Edit', '__components_txtd' ), '<span class=\"edit-link\">', '</span>' ); ?>\n\t\t\t\t\t\t\t</div><!-- .comment-metadata -->\n\n\t\t\t\t\t\t\t<?php if ( '0' == $comment->comment_approved ) : ?>\n\t\t\t\t\t\t\t\t<p class=\"comment-awaiting-moderation\"><?php esc_html_e( 'Your comment is awaiting moderation.', '__components_txtd' ); ?></p>\n\t\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t\t</header><!-- .comment-meta -->\n\n\t\t\t\t\t\t<div class=\"comment__content\">\n\t\t\t\t\t\t\t<?php comment_text( $comment ); ?>\n\t\t\t\t\t\t</div><!-- .comment-content -->\n\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\tcomment_reply_link(\n\t\t\t\t\t\t\tarray_merge(\n\t\t\t\t\t\t\t\t$args, array(\n\t\t\t\t\t\t\t\t\t'add_below' => 'div-comment',\n\t\t\t\t\t\t\t\t\t'depth' => $depth,\n\t\t\t\t\t\t\t\t\t'max_depth' => $args['max_depth'],\n\t\t\t\t\t\t\t\t\t'before' => '<div class=\"reply\">',\n\t\t\t\t\t\t\t\t\t'after' => '</div>',\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t$comment\n\t\t\t\t\t\t);\n\t\t\t\t\t\t?>\n\t\t\t\t\t</div>\n\t\t\t\t</article><!-- .comment-body -->\n\t\t\t\t<?php\n\t\t\t\tbreak;\n\t\tendswitch;\n\t}", "title": "" }, { "docid": "ea35f2261cc00177a24cb45ce54d58b2", "score": "0.62294716", "text": "function hankart_disable_comments_status() {\n return false;\n}", "title": "" }, { "docid": "8b658d1cb2f86db99f3ea2b3f8257401", "score": "0.62280375", "text": "public function comments(){\n }", "title": "" }, { "docid": "f6bda0343d4e6107070f414b30eac9cf", "score": "0.6225418", "text": "public function record_comment(){\n\t\t\t\n\t\t}", "title": "" }, { "docid": "f5de427d534993f1230a37326bd76a50", "score": "0.6215911", "text": "function cosmetics_comments( $cosmetics_comment, $cosmetics_comment_args, $cosmetics_comment_depth ) {\n\n if ( 'div' === $cosmetics_comment_args['style'] ) :\n\n $cosmetics_comment_tag = 'div';\n $cosmetics_comment_add_below = 'comment';\n\n else :\n\n $cosmetics_comment_tag = 'li';\n $cosmetics_comment_add_below = 'div-comment';\n\n endif;\n\n?>\n <<?php echo $cosmetics_comment_tag ?> <?php comment_class( empty( $cosmetics_comment_args['has_children'] ) ? '' : 'parent' ) ?> id=\"comment-<?php comment_ID() ?>\">\n\n <?php if ( 'div' != $cosmetics_comment_args['style'] ) : ?>\n\n <div id=\"div-comment-<?php comment_ID() ?>\" class=\"comment-body\">\n\n <?php endif; ?>\n\n <div class=\"comment-author vcard\">\n <?php if ( $cosmetics_comment_args['avatar_size'] != 0 ) echo get_avatar( $cosmetics_comment, $cosmetics_comment_args['avatar_size'] ); ?>\n\n </div>\n\n <?php if ( $cosmetics_comment->comment_approved == '0' ) : ?>\n <em class=\"comment-awaiting-moderation\">\n <?php esc_html_e( 'Your comment is awaiting moderation.', 'cosmetics' ); ?>\n </em>\n <?php endif; ?>\n\n <div class=\"comment-meta commentmetadata\">\n <div class=\"comment-meta-box\">\n <span class=\"name\">\n <?php comment_author_link(); ?>\n </span>\n <span class=\"comment-metadata\">\n <?php comment_date(); ?>\n </span>\n\n <?php edit_comment_link( esc_html__( 'Edit ', 'cosmetics' ) ); ?>\n\n <?php comment_reply_link( array_merge( $cosmetics_comment_args, array( 'add_below' => $cosmetics_comment_add_below, 'depth' => $cosmetics_comment_depth, 'max_depth' => $cosmetics_comment_args['max_depth'] ) ) ); ?>\n\n </div>\n <div class=\"comment-text-box\">\n <?php comment_text(); ?>\n </div>\n </div>\n\n <?php if ( 'div' != $cosmetics_comment_args['style'] ) : ?>\n </div>\n <?php endif; ?>\n\n<?php\n}", "title": "" }, { "docid": "8747d02190cc80482780c713f4e5b080", "score": "0.6206726", "text": "function pmi_preprocess_comment_wrapper(&$vars) {\n if ($vars['content'] && $vars['node']->type != 'forum') {\n $vars['content'] = '<h2 class=\"comments\">'. t('Comments') .'</h2>'. $vars['content'];\n }\n}", "title": "" }, { "docid": "0eab9e98b81b28e387d20575025135e4", "score": "0.62008846", "text": "function voyage_mikado_comments_title() {\n ?>\n\n <div class=\"mkdf-comment-number\">\n <div class=\"mkdf-comment-number-inner\">\n <h3><?php comments_number(esc_html__('No Comments', 'voyage'), ''.esc_html__(' Comment ', 'voyage'), ' '.esc_html__(' Comments: ', 'voyage')); ?></h3>\n </div>\n </div>\n\n <?php\n }", "title": "" }, { "docid": "1bc16880435103a9ca079c8592500e4b", "score": "0.61960065", "text": "function _cleanup_header_comment($str)\n {\n }", "title": "" }, { "docid": "a8aae028249122f232d87a6e068d758b", "score": "0.6194169", "text": "function garland_preprocess_comment_wrapper(&$vars) {\n if ($vars['content'] && $vars['node']->type != 'forum') {\n $vars['content'] = '<h2 class=\"comments\">'. t('Comments') .'</h2>'. $vars['content'];\n }\n}", "title": "" }, { "docid": "74cbb43c80390513bd512faa97c54e13", "score": "0.6191578", "text": "function register_legacy_post_comments_block()\n {\n }", "title": "" }, { "docid": "c29dd901405cb72ed914ecf8f059b97e", "score": "0.61797935", "text": "function render_block_core_comments($attributes, $content, $block)\n {\n }", "title": "" }, { "docid": "db79cb51cfe0b4107a56f1468df6920d", "score": "0.6166044", "text": "function maennaco_preprocess_comment_wrapper(&$vars) {\n if ($vars['content'] && $vars['node']->type != 'forum') {\n $vars['content'] = '<h2 class=\"comments\">' . t('Comments') . '</h2>' . $vars['content'];\n }\n}", "title": "" }, { "docid": "e493c61b6830a85ee0c5e8b03572e220", "score": "0.6158721", "text": "public function getDocComment()\n\t{\n\t\treturn false;\n\t}", "title": "" }, { "docid": "3917f7e86943747c57c6e6345366b334", "score": "0.615729", "text": "public function providerMakeComments() {\n return [\n [\n '/* */ ',\n [''],\n ],\n [\n '/* Exploit * / DROP TABLE node. -- */ ',\n ['Exploit * / DROP TABLE node; --'],\n ],\n [\n '/* Exploit * / DROP TABLE node. --. another comment */ ',\n ['Exploit * / DROP TABLE node; --', 'another comment'],\n ],\n ];\n }", "title": "" }, { "docid": "3b2e627b6eda9fb7d3b662a14e491fe9", "score": "0.6145372", "text": "protected function get__comments()\n\t{\n\t\treturn NULL;\n\t}", "title": "" }, { "docid": "fafc431416f1228338e7e6ea2ff62d4e", "score": "0.61184573", "text": "function separate_comments(&$comments)\n {\n }", "title": "" }, { "docid": "a07dcd123f6860791af8fad8772a1b7e", "score": "0.6089825", "text": "function starkers_comment( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment; \n\t?>\n\t<?php if ( $comment->comment_approved == '1' ): ?>\t\n\t<li>\n\t\t<article id=\"comment-<?php comment_ID() ?>\">\n\t\t\t<?php echo get_avatar( $comment ); ?>\n\t\t\t<h4><?php comment_author_link() ?></h4>\n\t\t\t<time><a href=\"#comment-<?php comment_ID() ?>\" pubdate><?php comment_date() ?> at <?php comment_time() ?></a></time>\n\t\t\t<?php comment_text() ?>\n\t\t</article>\n\t<?php endif; ?>\n\t</li>\n\t<?php \n}", "title": "" }, { "docid": "2759504aaf80782d032b3cea548cb72a", "score": "0.6088216", "text": "function renderComments(Element $element)\n {\n return '';\n }", "title": "" }, { "docid": "790fb369d21d9b30534fe0102bace245", "score": "0.6081315", "text": "function wputh_disable_comments_css() {\n echo \"<style>#dashboard_right_now .comment-count, #dashboard_right_now .table_discussion, #latest-comments{ display:none; } {display:none !important;}</style>\";\n}", "title": "" }, { "docid": "eede93bfeaa1d2d2ab8f3dec184f834a", "score": "0.60793", "text": "public function isComment() {}", "title": "" }, { "docid": "e92f446fad6629f12cb561776f82a7f0", "score": "0.6073455", "text": "function mCOMMENT(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$COMMENT;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n // Tokenizer11.g:616:3: ( '#' ( . )* EOL ) \n // Tokenizer11.g:617:3: '#' ( . )* EOL \n {\n $this->matchChar(35); \n // Tokenizer11.g:617:7: ( . )* \n //loop35:\n do {\n $alt35=2;\n $LA35_0 = $this->input->LA(1);\n\n if ( ($LA35_0==$this->getToken('10')||$LA35_0==$this->getToken('13')) ) {\n $alt35=2;\n }\n else if ( (($LA35_0>=$this->getToken('0') && $LA35_0<=$this->getToken('9'))||($LA35_0>=$this->getToken('11') && $LA35_0<=$this->getToken('12'))||($LA35_0>=$this->getToken('14') && $LA35_0<=$this->getToken('65535'))) ) {\n $alt35=1;\n }\n\n\n switch ($alt35) {\n \tcase 1 :\n \t // Tokenizer11.g:617:7: . \n \t {\n \t $this->matchAny(); \n\n \t }\n \t break;\n\n \tdefault :\n \t break 2;//loop35;\n }\n } while (true);\n\n $this->mEOL(); \n $_channel = HIDDEN; \n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }", "title": "" }, { "docid": "4bf785c9dce4c9e7d86a32d0a2b0585b", "score": "0.60570735", "text": "function bst_comment($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment;\n extract($args, EXTR_SKIP);\n if ( 'div' == $args['style'] ) {\n $tag = 'div';\n $add_below = 'comment';\n } else {\n $tag = 'li';\n $add_below = 'div-comment';\n }\n?>\n<<?php echo $tag ?> <?php comment_class(empty( $args['has_children'] ) ? '' : 'parent') ?> id=\"comment-<?php comment_ID() ?>\">\n <?php if ( 'div' != $args['style'] ) : ?>\n <div id=\"div-comment-<?php comment_ID() ?>\" class=\"comment-body\">\n <?php endif; ?>\n <div class=\"comment-author vcard\">\n <ul> \n <li>by <?php comment_author(); ?> - <?php printf( __('%1$s'), get_comment_date()) ?></li>\n <li><?php $commentrating = get_comment_meta(get_comment_ID(), 'rating', true ); echo '<img src=\"'. get_site_url() .'/wp-content/themes/socrata-app-marketplace/images/'. $commentrating . 'star.png\"/>'; ?></li>\n </ul>\n <?php if ($comment->comment_approved == '0') : ?>\n <p class='alert alert-info'><em class=\"comment-awaiting-moderation\"><?php _e('Your comment is awaiting moderation.') ?></em></p>\n <?php endif; ?>\n </div>\n <div class=\"row\">\n <div class=\"col-sm-12\">\n <?php $commenttitle = get_comment_meta(get_comment_ID(), 'title', true ); echo '<h4>' . esc_attr( $commenttitle ) . '</h4>'; ?>\n \t<?php comment_text() ?>\n </div> \n </div>\n <div class=\"reply\">\n <?php edit_comment_link(__('<p class=\"text-right\"><span class=\"btn btn-default btn-info\">Edit</span></p>'),' ','' );\t?>\n </div>\n <?php if ( 'div' != $args['style'] ) : ?>\n </div>\n <?php endif; ?>\n<?php }", "title": "" }, { "docid": "b01ce3599b72064c42a9fd78720bb7fc", "score": "0.6038204", "text": "public function noComment(): void // phpcs:ignore\n {\n // in the Route Enhancer.\n }", "title": "" }, { "docid": "82af2bbd78e3bfd9db51c68c97bb0fe8", "score": "0.60370094", "text": "public function removeAllComments() {}", "title": "" }, { "docid": "19d518fb6900f45b5b2ba64ddf61dc47", "score": "0.6036475", "text": "private function comment()\n {\n // Comments always begin with a / character.\n $this->nextOrFail('/');\n\n if ($this->currentByte === '/') {\n $this->inlineComment();\n } elseif ($this->currentByte === '*') {\n $this->blockComment();\n } else {\n $this->throwSyntaxError('Unrecognized comment');\n }\n }", "title": "" }, { "docid": "4093ff772243a537845be3864ad2710b", "score": "0.60325336", "text": "function register_block_core_latest_comments()\n {\n }", "title": "" }, { "docid": "1954f7eab899c89fd1ccb15946e1acca", "score": "0.60265833", "text": "function cosmetics_comment_form() {\n\n if ( comments_open() || get_comments_number() ) :\n?>\n\n <div class=\"site-comments\">\n <?php comments_template( '', true ); ?>\n </div>\n\n<?php\n endif;\n}", "title": "" }, { "docid": "d84c1c0fe65605e7bc00dd8ac1a327cc", "score": "0.6022781", "text": "function cellar_door_preprocess_comment(&$vars) {\n /*$comment = $vars['elements']['#comment'];\n $vars['picture'] = theme('user_picture', array('account' => $comment));*/\n}", "title": "" }, { "docid": "ce0cf093db7c5521bcc8dd3df1bacc58", "score": "0.60153997", "text": "function parseComment()\r\n\t{\r\n\t\t$this->start = $this->reader->mark();\r\n\t\t// skip over the comment\r\n\t\t$stop = $this->reader->skipUntil('--%>');\r\n\t\tif (is_null($stop))\r\n\t\t{\r\n\t\t\tthrow_exception(new PhaseException('Comment not properly ended.'));\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t$this->reader->skipSpaces();\r\n\t\treturn '';\r\n\t}", "title": "" }, { "docid": "5c88114168792e7e730e208a215c3194", "score": "0.6014493", "text": "public function getCommentHTML() {\n return str_replace(\"\\n\", \"<br />\", trim(str_replace(array(\"/*\", \"*\"), array(\"\", \"\"), $this->getComment())));\n }", "title": "" }, { "docid": "58aabc8ea54191919748dedd4545ed72", "score": "0.600467", "text": "function render_block_core_comment_template($attributes, $content, $block)\n {\n }", "title": "" }, { "docid": "8dbf36ddd366162b5d127bac6d597562", "score": "0.5995753", "text": "function comment_text_rss()\n {\n }", "title": "" }, { "docid": "d0f334586883862e701c8bb6521c58c5", "score": "0.59942055", "text": "function replace_edit_comment( $arg = '' ){\n\t\t\tglobal $wpdb,$menu,$submenu,$comment,$soc_com;\n\t\t\tinclude('soc-edit-comments.php');\n\t\t\texit;\n\t\t}", "title": "" }, { "docid": "db9f79cdf7c066906b053768505cf8f0", "score": "0.5987458", "text": "function adelle_theme_comment_style($comment, $args, $depth) {\r\n$GLOBALS['comment'] = $comment; ?>\r\n<li <?php comment_class(); ?>>\r\n <article class=\"comment-content\" id=\"comment-<?php comment_ID(); ?>\">\r\n <div class=\"comment-meta\">\r\n <?php echo get_avatar($comment, $size = '32' ); ?>\r\n <?php printf(__( '<h6>%s</h6>', 'adelle-theme' ), get_comment_author_link()) ?>\r\n <small><?php printf( __( '%1$s at %2$s', 'adelle-theme' ), get_comment_date(), get_comment_time()) ?> (<?php printf( __( '%s', 'adelle-theme' ), adelle_theme_time_ago() ) ?>)</small>\r\n </div>\r\n <?php if ($comment->comment_approved == '0' ) : ?><em><?php _e( 'Your comment is awaiting moderation.', 'adelle-theme' ) ?></em><br /><?php endif; ?>\r\n <?php comment_text() ?>\r\n <?php comment_reply_link(array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\r\n </article>\r\n<?php }", "title": "" }, { "docid": "bcda06be9c3cdb3e3f69e611530919c2", "score": "0.5984299", "text": "function phptemplate_comment_wrapper($content, $node) {\n if (!$content || $node->type == 'forum') {\n return '<div id=\"comments\">'. $content .'</div><a name=\"comments\"></a>';\n }\n else {\n return '<div id=\"comments\"><h2 class=\"comments\">'. t('Comments') .'</h2>'. $content .'</div><a name=\"comments\"></a>';\n }\n}", "title": "" }, { "docid": "6f45a6fa009917a02c2732012602c053", "score": "0.59775066", "text": "protected function getDocCommentParser() {}", "title": "" }, { "docid": "6f45a6fa009917a02c2732012602c053", "score": "0.59775066", "text": "protected function getDocCommentParser() {}", "title": "" }, { "docid": "6f45a6fa009917a02c2732012602c053", "score": "0.59775066", "text": "protected function getDocCommentParser() {}", "title": "" }, { "docid": "239f4515acf7c688f5da2de815659c03", "score": "0.5974318", "text": "protected function _prepare_comment($comment)\n {\n }", "title": "" }, { "docid": "b877edac887e329f5b1bb7e55112f8bd", "score": "0.5973133", "text": "function f()\n\t{\n\t\t// Comment in an empty function 1\n\t\t// Comment in an empty function 2\n\t}", "title": "" }, { "docid": "98abe61d4216c76cde72ffdbe6f6bbcb", "score": "0.59695655", "text": "function obishortcodes_comment_worker() {\n return null;\n}", "title": "" }, { "docid": "75a3c5799cb842000589d6b77936a704", "score": "0.5955805", "text": "function have_comments()\n {\n }", "title": "" }, { "docid": "add791c91cdcc96074e8df3068472d7c", "score": "0.59539026", "text": "function redart_comment_style( $comment, $args, $depth ) {\r\n\t$GLOBALS['comment'] = $comment;\r\n\tswitch ($comment->comment_type ) :\r\n\tcase 'pingback':\r\n\tcase 'trackback':\r\n\t\techo '<li class=\"post pingback\">';\r\n\t\techo \"<p>\";\r\n\t\tesc_html_e('Pingback:', 'redart');\r\n\t\tcomment_author_link();\r\n\t\tedit_comment_link(esc_html__('Edit', 'redart'), ' ', '');\r\n\t\techo \"</p>\";\r\n\t\tbreak;\r\n\r\n\tdefault:\r\n\tcase '':\r\n\t\techo \"<li \";\r\n\t\tcomment_class();\r\n\t\techo ' id=\"li-comment-';\r\n\t\tcomment_ID();\r\n\t\techo '\">';\r\n\t\techo '<article class=\"comment\" id=\"comment-';\r\n\t\tcomment_ID();\r\n\t\techo '\">';\r\n\r\n\t\techo '<header class=\"comment-author\">'.get_avatar($comment, 450).'</header>';\r\n\r\n\t\techo '<section class=\"comment-details\">';\r\n\t\techo '\t<div class=\"author-name\">';\r\n\t\techo \t\tcomment_reply_link(array_merge($args, array('reply_text' => ucfirst(get_comment_author_link()) , 'depth' => $depth, 'max_depth' => $args['max_depth'])));\r\n\t\techo '\t\t<span class=\"commentmetadata\"> / '.get_comment_date('d M Y').'</span>';\r\n\t\techo '\t</div>';\t\t\r\n\t\techo ' <div class=\"comment-body\">';\r\n\t\t\t\t\tcomment_text();\r\n\t\t\t\t\tif ($comment->comment_approved == '0') :\r\n\t\t\t\t\t\tesc_html_e('Your comment is awaiting moderation.', 'redart');\r\n\t\t\t\t\tendif;\r\n\t\t\t\t\tedit_comment_link(esc_html__('Edit', 'redart'));\r\n\t\techo '\t</div>';\r\n\t\techo '\t<div class=\"reply\">';\r\n\t\techo \t\tcomment_reply_link(array_merge($args, array('reply_text' => esc_html__('Reply', 'redart'), 'depth' => $depth, 'max_depth' => $args['max_depth'])));\r\n\t\techo '\t</div>';\r\n\t\techo '</section>';\r\n\t\techo '</article><!-- .comment-ID -->';\r\n\t\tbreak;\r\n\tendswitch;\r\n}", "title": "" }, { "docid": "6ce832651d119f8136010cf4972b6c16", "score": "0.59323597", "text": "function ffeeeedd_comment( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment;\n switch ( $comment->comment_type ) {\n case 'pingback' :\n case 'trackback' :\n // On affiche différemment les trackbacks. ?>\n <li <?php comment_class(); ?>>\n <p><?php _e( 'Pingback :', 'ffeeeedd' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( '(Edit)', 'ffeeeedd' ), '<span class=\"edit-link\">', '</span>' ); ?></p>\n <?php break;\n default :\n // On passe aux commentaires standards.\n global $post; ?>\n <li itemscope itemtype=\"http://schema.org/UserComments\">\n <article role=\"article\">\n <header>\n <?php echo get_avatar( $comment, 44 );\n printf( '<cite itemprop=\"creator\">%1$s %2$s</cite>',\n get_comment_author_link(),\n ( $comment->user_id === $post->post_author ) ? '<small> (' . __( 'Post author', 'ffeeeedd' ) . ' ) </small>' : ''\n );\n printf( '<time datetime=\"%2$s\" itemprop=\"commentTime\">%3$s</time>',\n esc_url( get_comment_link( $comment->comment_ID ) ),\n get_comment_time( 'c' ),\n sprintf( '%1$s à %2$s', get_comment_date(), get_comment_time() )\n ); ?>\n </header>\n\n <?php if ( '0' == $comment->comment_approved ) { ?>\n <p><?php _e( 'Your comment is awaiting moderation.', 'ffeeeedd' ); ?>.</p>\n <?php } ?>\n\n <div itemprop=\"commentText\">\n <?php comment_text(); ?>\n <?php edit_comment_link( __( 'Edit', 'ffeeeedd' ), '<p>', '</p>' ); ?>\n </div>\n\n <div class=\"reply\" itemprop=\"replyToUrl\">\n <?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply', 'ffeeeedd' ), 'after' => ' <span>&darr;</span>', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n </div>\n </article>\n <?php break;\n }\n }", "title": "" }, { "docid": "d41d66df225df250e4e33f3655e531dd", "score": "0.5931531", "text": "function tz_list_pings($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment; ?>\n<li id=\"comment-<?php comment_ID(); ?>\"><?php comment_author_link(); ?>\n<?php }", "title": "" }, { "docid": "6b16658b5a75563fbaa9cd27eb2b9aac", "score": "0.59277505", "text": "public function getDocComment();", "title": "" }, { "docid": "2c34ba6c3e6380436b802f85eabfee44", "score": "0.5922749", "text": "function starter_comment_block() {\n $items = array();\n $number = variable_get('comment_block_count', 10);\n\n foreach (comment_get_recent($number) as $comment) {\n //kpr($comment->changed);\n //print date('Y-m-d H:i', $comment->changed);\n $items[] =\n '<h3>' . l($comment->subject, 'comment/' . $comment->cid, array('fragment' => 'comment-' . $comment->cid)) . '</h3>' .\n ' <time datetime=\"'.date('Y-m-d H:i', $comment->changed).'\">' . t('@time ago', array('@time' => format_interval(REQUEST_TIME - $comment->changed))) . '</time>';\n }\n\n if ($items) {\n return theme('item_list', array('items' => $items, 'daddy' => 'comments'));\n }\n else {\n return t('No comments available.');\n }\n}", "title": "" }, { "docid": "d55f4d4616f539fe77d1cf065cd4a4eb", "score": "0.59088933", "text": "public function have_comments()\n {\n }", "title": "" }, { "docid": "044c9bb569ff44df94806c406f555640", "score": "0.5893207", "text": "function lastcomments_block() {\r\n\r\n\tglobal $template;\r\n\t// Action if sidepanel is enabled\r\n\tif (pluginGetVariable('lastcomments', 'sidepanel')) {\r\n\t\t$template['vars']['plugin_lastcomments'] = lastcomments();\r\n\t} else {\r\n\t\t$template['vars']['plugin_lastcomments'] = \"\";\r\n\t}\r\n}", "title": "" }, { "docid": "20f0e6ae90102f1270b200bae837af62", "score": "0.5892144", "text": "function cosmetics_comment_nav() { if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) :\n\n ?>\n <nav class=\"navigation comment-navigation\">\n <h2 class=\"screen-reader-text\">\n <?php _e( 'Comment navigation', 'cosmetics' ); ?>\n </h2>\n <div class=\"nav-links\">\n <?php\n if ( $prev_link = get_previous_comments_link( esc_html__( 'Older Comments', 'cosmetics' ) ) ) :\n printf( '<div class=\"nav-previous\">%s</div>', $prev_link );\n endif;\n\n if ( $next_link = get_next_comments_link( esc_html__( 'Newer Comments', 'cosmetics' ) ) ) :\n printf( '<div class=\"nav-next\">%s</div>', $next_link );\n endif;\n ?>\n </div><!-- .nav-links -->\n </nav><!-- .comment-navigation -->\n\n <?php\n endif;\n }", "title": "" }, { "docid": "9ba4e8587907b9cc28480a769fd491f8", "score": "0.5888446", "text": "function comments_link($deprecated = '', $deprecated_2 = '')\n {\n }", "title": "" }, { "docid": "74445a449d77c9517c3cae617b7b0ba9", "score": "0.58788115", "text": "function register_block_core_comment_date()\n {\n }", "title": "" }, { "docid": "a7f2c1a1958494f4df824ec75a9912aa", "score": "0.58786935", "text": "function gravit_comment( $comment, $args, $depth ) {\r\r\n\t$GLOBALS['comment'] = $comment;\r\r\n\r\r\n\tif ( 'pingback' == $comment->comment_type || 'trackback' == $comment->comment_type ) : ?>\r\r\n\r\r\n\t<li id=\"comment-<?php comment_ID(); ?>\" <?php comment_class(); ?>>\r\r\n\t\t<div class=\"comment-body\">\r\r\n\t\t\t<?php _e( 'Pingback:', 'gravit' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( '<i class=\"fa fa-pencil-square-o\"></i> Edit', 'gravit' ), '<span class=\"edit-link\">', '</span>' ); ?>\r\r\n\t\t</div>\r\r\n\r\r\n\t<?php else : ?>\r\r\n\r\r\n\t<li id=\"comment-<?php comment_ID(); ?>\" <?php comment_class( empty( $args['has_children'] ) ? '' : 'parent' ); ?>>\r\r\n\t\t<article id=\"div-comment-<?php comment_ID(); ?>\" class=\"comment-body\">\r\r\n\t\t\t<footer class=\"comment-meta\">\r\r\n\t\t\t\t<div class=\"comment-author vcard\">\r\r\n\t\t\t\t\t\r\r\n\t\t\t\t\t<?php if ( 0 != $args['avatar_size'] ) { echo get_avatar( $comment, $args['avatar_size'] ); } ?>\r\r\n\r\r\n\t\t\t\t\t<div class=\"comment-name\">\r\r\n\t\t\t\t\t\t<?php printf( __( '%s', 'gravit' ), sprintf( '<span class=\"fn\">%s</span>', get_comment_author_link() ) ); ?>\r\r\n\t\t\t\t\t\t<div class=\"author-star\">\r\r\n\t\t\t\t\t\t\t<i class=\"fa fa-star\"></i>\r\r\n\t\t\t\t\t\t</div>\r\r\n\t\t\t\t\t</div>\r\r\n\t\t\t\t\t\r\r\n\t\t\t\t\t<div class=\"comment-metadata\">\r\r\n\t\t\t\t\t<a href=\"<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>\">\r\r\n\t\t\t\t\t\t<time datetime=\"<?php comment_time( 'c' ); ?>\">\r\r\n\t\t\t\t\t\t\t<?php printf( _x( '%1$s at %2$s', '1: date, 2: time', 'gravit' ), get_comment_date(), get_comment_time() ); ?>\r\r\n\t\t\t\t\t\t</time>\r\r\n\t\t\t\t\t</a>\r\r\n\t\t\t\t\t<?php edit_comment_link( __( '| Edit', 'gravit' ), '<span class=\"edit-link\">', '</span>' ); ?>\r\r\n\t\t\t\t\t</div><!-- .comment-metadata -->\r\r\n\r\r\n\t\t\t\t</div><!-- .comment-author -->\r\r\n\r\r\n\t\t\t\t<div class=\"comment-content\">\r\r\n\t\t\t\t\t<?php comment_text(); ?>\r\r\n\t\t\t\t</div><!-- .comment-content -->\t\t\t\t\r\r\n\r\r\n\t\t\t\t<?php if ( '0' == $comment->comment_approved ) : ?>\r\r\n\t\t\t\t<p class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'gravit' ); ?></p>\r\r\n\t\t\t\t<?php endif; ?>\r\r\n\t\t\t</footer><!-- .comment-meta -->\t\t\t\r\r\n\r\r\n\t\t\t<?php\r\r\n\t\t\t\tcomment_reply_link( array_merge( $args, array(\r\r\n\t\t\t\t\t'add_below' => 'div-comment',\r\r\n\t\t\t\t\t'depth' => $depth,\r\r\n\t\t\t\t\t'max_depth' => $args['max_depth'],\r\r\n\t\t\t\t\t'before' => '<div class=\"reply\">',\r\r\n\t\t\t\t\t'after' => '</div>',\r\r\n\t\t\t\t) ) );\r\r\n\t\t\t?>\r\r\n\r\r\n\t\t</article><!-- .comment-body -->\r\r\n\t<?php\r\r\n\tendif;\r\r\n}", "title": "" }, { "docid": "1b35165b0ad4cb9cc88e87027414e32f", "score": "0.5872166", "text": "function flatsome_comment( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment;\n\tswitch ( $comment->comment_type ) :\n\t\tcase 'pingback' :\n\t\tcase 'trackback' :\n\t?>\n\t<li class=\"post pingback\">\n\t\t<p><?php _e( 'Pingback:', 'flatsome' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( 'Edit', 'flatsome' ), '<span class=\"edit-link\">', '<span>' ); ?></p>\n\t<?php\n\t\t\tbreak;\n\t\tdefault :\n\t?>\n\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"comment-inner\">\n\n <div class=\"flex-row align-top\">\n <div class=\"flex-col\">\n <div class=\"comment-author mr-half\">\n <?php echo get_avatar( $comment, 70 ); ?>\n </div>\n </div><!-- .large-3 -->\n\n <div class=\"flex-col flex-grow\">\n <?php printf( __( '%s <span class=\"says\">says:</span>', 'flatsome' ), sprintf( '<cite class=\"strong fn\">%s</cite>', get_comment_author_link() ) ); ?>\n <?php if ( $comment->comment_approved == '0' ) : ?>\n <em><?php _e( 'Your comment is awaiting moderation.', 'flatsome' ); ?></em>\n <br />\n <?php endif; ?>\n\n <div class=\"comment-content\"><?php comment_text(); ?></div>\n\n\n <div class=\"comment-meta commentmetadata uppercase is-xsmall clear\">\n <a href=\"<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>\"><time datetime=\"<?php comment_time( 'c' ); ?>\" class=\"pull-left\">\n <?php printf( _x( '%1$s at %2$s', '1: date, 2: time', 'flatsome' ), get_comment_date(), get_comment_time() ); ?>\n </time></a>\n <?php edit_comment_link( __( 'Edit', 'flatsome' ), '<span class=\"edit-link ml-half strong\">', '<span>' ); ?>\n\n <div class=\"reply pull-right\">\n <?php\n comment_reply_link( array_merge( $args,array(\n 'depth' => $depth,\n 'max_depth' => $args['max_depth'],\n ) ) );\n ?>\n </div><!-- .reply -->\n </div><!-- .comment-meta .commentmetadata -->\n\n </div><!-- .flex-col -->\n </div><!-- .flex-row -->\n\t\t</article>\n <!-- #comment -->\n\n\t<?php\n\t\t\tbreak;\n\tendswitch;\n}", "title": "" }, { "docid": "0943652b2e7bcb1b0a0f683b75081bd9", "score": "0.5850255", "text": "function pixelgrade_comments_template() {\n\t\t// We need to pass the template path retrieved by our locate function so the component template is accounted for\n\t\t// If present in the root of the theme or child theme, `/comments.php` will take precedence.\n\t\tcomments_template( '/' . pixelgrade_make_relative_path( pixelgrade_locate_component_template( Pixelgrade_Blog::COMPONENT_SLUG, 'comments' ) ) );\n\t}", "title": "" }, { "docid": "f69481d3cb0f25b3617cb8cf668347bc", "score": "0.5846886", "text": "function tempera_number_comments() { ?>\n\t\t\t<h3 id=\"comments-title\"><i class=\"icon-replies\" ></i>\n\t\t\t\t<?php printf( _n( 'One Comment:', '%1$s Comments:', get_comments_number(), 'tempera' ),\n\t\t\t\tnumber_format_i18n( get_comments_number() )); ?>\n\t\t\t</h3>\n<?php }", "title": "" }, { "docid": "4d62c145bda04be578acb2bb8a0df2a8", "score": "0.58440924", "text": "function ivan_comment( $comment, $args, $depth ) {\r\n\t$GLOBALS['comment'] = $comment;\r\n\r\n\tif ( 'pingback' == $comment->comment_type || 'trackback' == $comment->comment_type ) : ?>\r\n\r\n\t<li id=\"comment-<?php comment_ID(); ?>\" <?php comment_class(); ?>>\r\n\t\t<div class=\"comment-body\">\r\n\t\t\t<?php _e( 'Pingback:', 'ivan_domain' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( 'Edit', 'ivan_domain' ), '<span class=\"edit-link\">', '</span>' ); ?>\r\n\t\t</div>\r\n\r\n\t<?php else : ?>\r\n\r\n\t<li id=\"comment-<?php comment_ID(); ?>\" <?php comment_class( empty( $args['has_children'] ) ? '' : 'parent' ); ?>>\r\n\t\t<article id=\"div-comment-<?php comment_ID(); ?>\" class=\"comment-body\">\r\n\t\t\t<div class=\"row\">\r\n\r\n\t\t\t\t<div class=\"comment-avatar-holder\">\r\n\t\t\t\t\t<?php echo get_avatar( $comment, 100 ); ?>\r\n\t\t\t\t\t<?php if(get_the_author_meta('ID') == $comment->user_id) : ?>\r\n\t\t\t\t\t<span class=\"author-tag hidden-xs\"><?php _e(\"Author\", 'ivan_domain'); ?></span>\r\n\t\t\t\t\t<?php endif; ?>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"comment-content-holder\">\r\n\r\n\t\t\t\t\t<footer class=\"comment-meta\">\r\n\t\t\t\t\t\t<div class=\"comment-author vcard\">\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t<?php printf( __( '%s', 'ivan_domain' ), sprintf( '<h5 class=\"fn\">%s</h5>', get_comment_author_link() ) ); ?>\r\n\r\n\t\t\t\t\t\t\t<div class=\"comment-date\">\r\n\t\t\t\t\t\t\t\t<a href=\"<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>\" class=\"comment-time\">\r\n\t\t\t\t\t\t\t\t\t<time datetime=\"<?php comment_time( 'c' ); ?>\">\r\n\t\t\t\t\t\t\t\t\t\t<?php printf( _x( '%1$s at %2$s', '1: date, 2: time', 'ivan_domain' ), get_comment_date(), get_comment_time() ); ?>\r\n\t\t\t\t\t\t\t\t\t</time>\r\n\t\t\t\t\t\t\t\t</a>\r\n\t\t\t\t\t\t\t\t<?php edit_comment_link( __( 'Edit', 'ivan_domain' ), '<span class=\"edit-link\">', '</span>' ); ?>\r\n\t\t\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t</div><!-- .comment-author -->\r\n\r\n\t\t\t\t\t\t<?php if ( '0' == $comment->comment_approved ) : ?>\r\n\t\t\t\t\t\t<p class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'ivan_domain' ); ?></p>\r\n\t\t\t\t\t\t<?php endif; ?>\r\n\t\t\t\t\t</footer><!-- .comment-meta -->\r\n\r\n\t\t\t\t\t<div class=\"comment-content\">\r\n\t\t\t\t\t\t<?php comment_text(); ?>\r\n\t\t\t\t\t</div><!-- .comment-content -->\r\n\r\n\t\t\t\t\t<?php\r\n\t\t\t\t\t\tcomment_reply_link( array_merge( $args, array(\r\n\t\t\t\t\t\t\t'add_below' => 'div-comment',\r\n\t\t\t\t\t\t\t'depth'\t => $depth,\r\n\t\t\t\t\t\t\t'max_depth' => $args['max_depth'],\r\n\t\t\t\t\t\t\t'before'\t=> '<div class=\"reply\">',\r\n\t\t\t\t\t\t\t'after'\t => '</div>',\r\n\t\t\t\t\t\t\t'reply_text'=> __('Reply', 'ivan_domain'),\r\n\t\t\t\t\t\t) ) );\r\n\t\t\t\t\t?>\r\n\r\n\t\t\t\t</div><!-- .col-md-# -->\r\n\t\t\t\t<div class=\"clearfix\"></div>\r\n\t\t\t</div><!-- .row -->\r\n\t\t</article><!-- .comment-body -->\r\n\r\n\t<?php\r\n\tendif;\r\n}", "title": "" }, { "docid": "1d8dfb2186d1ea26236d803980773236", "score": "0.5836795", "text": "function custom_pings($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment;\n ?>\n <li id=\"comment-<?php comment_ID() ?>\" <?php comment_class() ?>>\n <div class=\"comment-author\"><?php printf(__('By %1$s on %2$s at %3$s', 'Foundation'),\n get_comment_author_link(),\n get_comment_date(),\n get_comment_time() );\n edit_comment_link(__('Edit', 'Foundation'), ' <span class=\"meta-sep\">|</span> <span class=\"edit-link\">', '</span>'); ?></div>\n <?php if ($comment->comment_approved == '0') _e('\\t\\t\\t\\t\\t<span class=\"unapproved\">Your trackback is awaiting moderation.</span>\\n', 'Foundation') ?>\n <div class=\"comment-content\">\n <?php comment_text() ?>\n </div>\n<?php }", "title": "" }, { "docid": "dfaee55b168a74a42011cb987f56f468", "score": "0.58315706", "text": "function tempera_comments_on() {\nglobal $temperas;\nforeach ($temperas as $key => $value) { ${\"$key\"} = $value; }\t\n\tif ( comments_open() && ! post_password_required() && $tempera_blog_show['comments'] && ! is_single()) :\n\t\tprint '<div class=\"comments-link\"><i class=\"icon-comments icon-metas\" title=\"' . __('Comments', 'tempera') . '\"></i>';\n\t\tprintf ( comments_popup_link( __( '<b>0</b>', 'tempera' ), __( '<b>1</b>', 'tempera' ), __( '<b>%</b>', 'tempera' ),(''),__('<b>-</b>','tempera') ));\n\t\tprint '</div>';\n\tendif;\n}", "title": "" }, { "docid": "df9596b61db500dc479989536b57925e", "score": "0.5818791", "text": "private function inlineComment()\n {\n do {\n $this->next();\n if ($this->currentByte === \"\\n\" || $this->currentByte === \"\\r\") {\n $this->next();\n\n return;\n }\n } while ($this->currentByte !== null);\n }", "title": "" }, { "docid": "32ed529ce800007838eccbaa4fe0164a", "score": "0.5818208", "text": "function my_skin_comments_link($link) {\n\t$link = str_replace(\"comments\", \"\", $link);\n\treturn $link; \n}", "title": "" }, { "docid": "214c106c1497865a99a213b357124a5e", "score": "0.5817788", "text": "function get_comments(){\n\n\t}", "title": "" }, { "docid": "54a4cb633243eee467f267367750c3a0", "score": "0.58130544", "text": "function dp_trackback_source ($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment; ?>\n<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID() ?>\">\n<div id=\"comment-<?php comment_ID(); ?>\">\n<div class=\"comment-author vcard clearfix\">\n<?php printf(__('<cite class=\"comment_author_name icon-home\">%s</cite>'), get_comment_author_link()) ?>\n<div class=\"comment-meta commentmetadata\"><a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\"><?php printf(__('%1$s at %2$s','DigiPress'), get_comment_date(), get_comment_time()) ?></a><?php edit_comment_link(__('(Edit)',''),' ','') ?></div>\n</div>\n<?php if ($comment->comment_approved == '0') : ?>\n<p><?php _e('Your trackback is awaiting moderation.', 'DigiPress') ?></p>\n<?php endif; ?>\n<div><?php comment_text() ?></div>\n</div>\n<?php }", "title": "" }, { "docid": "49f77eab38e2e500fd7350d8efea1083", "score": "0.581105", "text": "function wp_admin_bar_comments_menu($wp_admin_bar)\n {\n }", "title": "" }, { "docid": "a3822bf6ee8c7c6378d248fc46c56fe3", "score": "0.580966", "text": "function td_comment( $comment, $args, $depth ) {\r\n $GLOBALS['comment'] = $comment;\r\n\r\n $td_isPingTrackbackClass = '';\r\n\r\n if($comment->comment_type == 'pingback') {\r\n $td_isPingTrackbackClass = 'pingback';\r\n }\r\n\r\n if($comment->comment_type == 'trackback') {\r\n $td_isPingTrackbackClass = 'trackback';\r\n }\r\n\r\n if (!empty($comment->comment_author_email)) {\r\n $td_comment_auth_email = $comment->comment_author_email;\r\n } else {\r\n $td_comment_auth_email = '';\r\n }\r\n\r\n $td_article_date_unix = @strtotime(\"{$comment->comment_date_gmt} GMT\");\r\n //print_r($td_article_date_unix);\r\n\r\n\r\n\t?>\r\n <li class=\"comment <?php echo $td_isPingTrackbackClass ?>\" id=\"comment-<?php comment_ID() ?>\">\r\n\t\t\t<article>\r\n\t <footer>\r\n <?php\r\n\t //echo get_template_directory_uri() . \"/images/avatar.jpg\";\r\n\t //echo get_avatar($td_comment_auth_email, 50, get_template_directory_uri() . \"/images/avatar.jpg\");\r\n\t echo get_avatar($td_comment_auth_email, 50);\r\n ?>\r\n <cite><?php comment_author_link() ?></cite>\r\n\r\n <a class=\"comment-link\" href=\"#comment-<?php comment_ID() ?>\">\r\n <time pubdate=\"<?php echo $td_article_date_unix ?>\"><?php comment_date() ?> at <?php comment_time() ?></time>\r\n </a>\r\n </footer>\r\n\r\n <div class=\"comment-content\">\r\n <?php if ($comment->comment_approved == '0') { ?>\r\n <em><?php echo __td('Your comment is awaiting moderation', TD_THEME_NAME); ?></em>\r\n <?php }\r\n comment_text(); ?>\r\n </div>\r\n\r\n\t <div class=\"comment-meta\" id=\"comment-<?php comment_ID() ?>\">\r\n <?php comment_reply_link(array_merge( $args, array(\r\n 'depth' => $depth,\r\n 'max_depth' => $args['max_depth'],\r\n 'reply_text' => __td('Reply', TD_THEME_NAME),\r\n 'login_text' => __td('Log in to leave a comment', TD_THEME_NAME)\r\n )))\r\n ?>\r\n </div>\r\n </article>\r\n <?php\r\n\r\n}", "title": "" }, { "docid": "9735b2390e6071a5c2b4006108154b2e", "score": "0.5806282", "text": "function removexmlcomments($data)\n{\n $data = preg_replace(\"/<!--(.*?)-->/ms\",\"\",$data);\n $data = preg_replace(\"/<\\\\?(.*?)\\\\?>/\",\"\",$data);\n return $data;\n}", "title": "" }, { "docid": "ec25135b6a7124f86c9cf04b45ef370e", "score": "0.5801613", "text": "public function getComment() {}", "title": "" }, { "docid": "ba7295fa39c457cf98ab302561f62650", "score": "0.57989633", "text": "function crunchify_move_comment_form_below( $fields ) { \n $comment_field = $fields['comment']; \n unset( $fields['comment'] ); \n $fields['comment'] = $comment_field; \n return $fields; \n}", "title": "" }, { "docid": "5c7a667d400a8ecf4a846a78d9e04b17", "score": "0.57960737", "text": "function register_block_core_comment_edit_link()\n {\n }", "title": "" }, { "docid": "59dd657549ddaf0e789835d75b52191a", "score": "0.5795114", "text": "function gratis_preprocess_comment(&$vars) {\n $vars['created'] = date('m / j / y', $vars['elements']['#comment']->created);\n $vars['changed'] = date('m / j / y', $vars['elements']['#comment']->created);\n}", "title": "" }, { "docid": "46b0e42325917b4b09d632b27f21df5b", "score": "0.5793894", "text": "function wrapper(){\r\n\tadd_comments_page('Remarks', 'Remarks', 'manage_options', 'remarks', 'remarks_main');\r\n}", "title": "" }, { "docid": "50d615fb484ae12bd6e5e4c7e8e47251", "score": "0.5788688", "text": "function comment2Code($comment)\n\t{\n\t\t$comment = trim($comment);\n\t\t$comment = stripslashes($comment);\n /* ENT_QUOTES convers both ' and \" */\n\t\t$comment = htmlspecialchars($comment, ENT_QUOTES);\n\n\t\t/* Check to see if text exists before first ``` */\n\t\tif(strpos($comment, \"```\") !== 0)\n\t\t\t$comment = \"<p class='text-white'>\" . $comment;\n\n\t\t/* Check for opening ``` and closing ``` */\n\t\tif(checkBackticks($comment))\n {\n\t\t\t/* Comment/Code wrapper */\n\t\t\t$exCodeStart = \"<div class='exBoxComment mb-3 mt-2'>\"\n\t\t\t\t\t\t .\"<figure class='code'>\"\n\t\t\t\t\t\t .\"<pre><table class='table borderless my-auto'>\"\n\t\t\t\t\t\t .\"<tr><td><pre class='co-g'>\";\n\t\t\t$exCodeEnd = \"</pre></td></tr></table></pre></figure></div>\";\n\n\t\t\t/* Insert </p> before <div> */\n\t\t\t/* Encapsulate code with appropriate HTML tags in place of ``` */\n\t\t\t$openOrClose = 0;\n\t\t\twhile(($pos = strpos($comment, \"```\")) !== FALSE)\n {\n\t\t\t\t/* Opening ``` */\n\t\t\t\tif($openOrClose % 2 === 0)\n {\n\t\t\t\t\t/*\n\t\t\t\t\t\tThere is text before the code section\n\t\t\t\t\t\tHowever, in the case of two code sections back to back, there\n\t\t\t\t\t\twill be an empty <p class='text-white'></p> between them\n\t\t\t\t\t*/\n\t\t\t\t\tif($pos !== 0)\n\t\t\t\t\t\t$comment = substr_replace($comment, \"</p>\", $pos, 0);\n\t\t\t\t\t$comment = substr_replace($comment, $exCodeStart, strpos($comment, \"```\"), 3);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$comment = substr_replace($comment, $exCodeEnd, strpos($comment, \"```\"), 3);\n\t\t\t\t++$openOrClose;\n\t\t\t}\n\n\t\t\t/* Indicate how many code sections there are (will be a multiple of 2) */\n\t\t\t$openOrClose = $openOrClose / 2;\n\n\t\t\t/* Insert <p class='text-white'> after </div> to match with above </p> */\n\t\t\t$pos = 0;\n\t\t\twhile($openOrClose-- > 0)\n {\n\t\t\t\t$pos = strpos($comment, \"</div>\", $pos+1);\n\t\t\t\t$comment = substr_replace($comment, \"<p class='text-white'>\", $pos + 6, 0);\n\t\t\t}\n\t\t\t$comment .= \"</p>\";\n\n\t\t\t/* Remove trailing <p class='text-white'> </p> if no text after last code section */\n\t\t\tif(preg_match(\"/^[\\s\\S]+<p class='text-white'>[\\s]*<\\/p>$/m\", $comment))\n {\n\t\t\t\t$comment = substr($comment, 0, strrpos($comment, \"<p\"));\n\t\t\t}\n\n\t\t\treturn $comment;\n\t\t}\n\t\telse\n\t\t\treturn $comment . \"</p>\";\n\t}", "title": "" } ]
f2efb0854c7973c251114ca3a7312531
Sets the kioskModeFolderIcon Folder icon configuration for managed home screen in Kiosk Mode. Possible values are: notConfigured, darkSquare, darkCircle, lightSquare, lightCircle.
[ { "docid": "9a67d0a4725acb6e997fcd98b2f78d67", "score": "0.8154916", "text": "public function setKioskModeFolderIcon($val)\n {\n $this->_propDict[\"kioskModeFolderIcon\"] = $val;\n return $this;\n }", "title": "" } ]
[ { "docid": "ddfedfb20964f79bccee3b02820b7cdb", "score": "0.6780427", "text": "public function getKioskModeFolderIcon()\n {\n if (array_key_exists(\"kioskModeFolderIcon\", $this->_propDict)) {\n if (is_a($this->_propDict[\"kioskModeFolderIcon\"], \"\\Beta\\Microsoft\\Graph\\Model\\AndroidDeviceOwnerKioskModeFolderIcon\") || is_null($this->_propDict[\"kioskModeFolderIcon\"])) {\n return $this->_propDict[\"kioskModeFolderIcon\"];\n } else {\n $this->_propDict[\"kioskModeFolderIcon\"] = new AndroidDeviceOwnerKioskModeFolderIcon($this->_propDict[\"kioskModeFolderIcon\"]);\n return $this->_propDict[\"kioskModeFolderIcon\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "91945c77e46a7c8538c1d33020f466a6", "score": "0.6260401", "text": "public function setKioskModeIconSize($val)\n {\n $this->_propDict[\"kioskModeIconSize\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "fd6008851b741816cc823ef131741a14", "score": "0.57807374", "text": "public function setHomeScreenDockIcons($val)\n {\n $this->_propDict[\"homeScreenDockIcons\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "03b8e564c3438c9a5c5eef3798a976d3", "score": "0.5678486", "text": "public function setKioskModeManagedFolders($val)\n {\n $this->_propDict[\"kioskModeManagedFolders\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "a01c625c0141994702f852e4f58ca29d", "score": "0.5084405", "text": "public function setKioskModeScreenSaverImageUrl($val)\n {\n $this->_propDict[\"kioskModeScreenSaverImageUrl\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "9437f769becd8b4404954e8a9db03e89", "score": "0.5068091", "text": "public function setKioskModeManagedHomeScreenSignInBackground($val)\n {\n $this->_propDict[\"kioskModeManagedHomeScreenSignInBackground\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "f3cda97fbd5ac6c3347d0399c785c58a", "score": "0.50614953", "text": "public function getKioskModeIconSize()\n {\n if (array_key_exists(\"kioskModeIconSize\", $this->_propDict)) {\n if (is_a($this->_propDict[\"kioskModeIconSize\"], \"\\Beta\\Microsoft\\Graph\\Model\\AndroidDeviceOwnerKioskModeIconSize\") || is_null($this->_propDict[\"kioskModeIconSize\"])) {\n return $this->_propDict[\"kioskModeIconSize\"];\n } else {\n $this->_propDict[\"kioskModeIconSize\"] = new AndroidDeviceOwnerKioskModeIconSize($this->_propDict[\"kioskModeIconSize\"]);\n return $this->_propDict[\"kioskModeIconSize\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "e9900b138cf631e71f34c1b459238536", "score": "0.5016808", "text": "public function rootIcon($value) {\n return $this->setProperty('rootIcon', $value);\n }", "title": "" }, { "docid": "e4563edc5fb0dcd5fd915dcc630212ac", "score": "0.4879971", "text": "public function getIcon()\n {\n return 'folder';\n }", "title": "" }, { "docid": "420d2661d184a5f2c674ceef0aca99e6", "score": "0.48217842", "text": "public function setKioskModeWallpaperUrl($val)\n {\n $this->_propDict[\"kioskModeWallpaperUrl\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "51715ba9c5ed6d18141e3c57ce7dfb91", "score": "0.47552878", "text": "public function getHomeScreenDockIcons()\n {\n if (array_key_exists(\"homeScreenDockIcons\", $this->_propDict)) {\n return $this->_propDict[\"homeScreenDockIcons\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "ba457234c332185e74e20b9c70e3ec96", "score": "0.47550797", "text": "public function setKioskModeManagedHomeScreenSignInBrandingLogo($val)\n {\n $this->_propDict[\"kioskModeManagedHomeScreenSignInBrandingLogo\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "5882808eaeb8495f298bebd9678a0d8c", "score": "0.47091755", "text": "public function getKioskModeManagedFolders()\n {\n if (array_key_exists(\"kioskModeManagedFolders\", $this->_propDict)) {\n return $this->_propDict[\"kioskModeManagedFolders\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "ba9b21eea592be5be4b653c597c9230b", "score": "0.46771413", "text": "public function setIconPutAttribute($value)\n {\n if ($value) {\n $path = public_path('tmp/' . $value);\n $this->icon = $path;\n }\n }", "title": "" }, { "docid": "cff6b87a7d03e4e2526de17336e1d206", "score": "0.46761477", "text": "public function setKioskModeUseManagedHomeScreenApp($val)\n {\n $this->_propDict[\"kioskModeUseManagedHomeScreenApp\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "b8f7821ed4780c27ffbdb93bac0d7bd0", "score": "0.46032512", "text": "public function setKioskModeManagedHomeScreenSignInEnabled($val)\n {\n $this->_propDict[\"kioskModeManagedHomeScreenSignInEnabled\"] = boolval($val);\n return $this;\n }", "title": "" }, { "docid": "1cb60a3a743b8bade970734ab4f1f0b7", "score": "0.452728", "text": "public function setKioskModeManagedHomeScreenPinRequired($val)\n {\n $this->_propDict[\"kioskModeManagedHomeScreenPinRequired\"] = boolval($val);\n return $this;\n }", "title": "" }, { "docid": "a543d2a524bc414e5d314d6b0911c374", "score": "0.4516424", "text": "public function registerDefaultIcon() {\n $this->registerIcon('contentdesigner-default', ExtensionManagementUtility::extPath(self::$prefix) . 'ce_wiz.gif');\n $this->registerIcon('contentdesigner-defaultSmall', ExtensionManagementUtility::extPath(self::$prefix) . 'ext_icon.gif');\n }", "title": "" }, { "docid": "2a14cdb874e99033902376aff5d87321", "score": "0.4514513", "text": "public function setKioskModeLockHomeScreen($val)\n {\n $this->_propDict[\"kioskModeLockHomeScreen\"] = boolval($val);\n return $this;\n }", "title": "" }, { "docid": "12a8dda6d75742f9b1fd862665fc8fcb", "score": "0.44999668", "text": "public function setKioskModeScreenSaverConfigurationEnabled($val)\n {\n $this->_propDict[\"kioskModeScreenSaverConfigurationEnabled\"] = boolval($val);\n return $this;\n }", "title": "" }, { "docid": "3eb7d118fe28f9e8fa80e1e787d30fdc", "score": "0.4473621", "text": "private function clearExistingIcon(){\n $config_url = \"../\" . $this->config->get(\"quickpaycheckout_payment_icon\");\n if (file_exists($config_url) && $config_url !== \"../\")\n {\n unlink($config_url);\n }\n }", "title": "" }, { "docid": "a63db7dbd5586f5da3efe45b45d346b3", "score": "0.44382122", "text": "public function setKioskModeManagedHomeScreenPinComplexity($val)\n {\n $this->_propDict[\"kioskModeManagedHomeScreenPinComplexity\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "476fdc7d791c276923bceb01aef4dd36", "score": "0.43953282", "text": "public function setKioskModeAppsInFolderOrderedByName($val)\n {\n $this->_propDict[\"kioskModeAppsInFolderOrderedByName\"] = boolval($val);\n return $this;\n }", "title": "" }, { "docid": "56f74ac057c67006dd0699dbca209ee8", "score": "0.4391626", "text": "public function setFolder($data='')\n {\n $this->folder = $data;\n }", "title": "" }, { "docid": "822852dc2c8401f18a098f78bbe53ad8", "score": "0.4322173", "text": "public function setKioskModeAppStoreUrl($val)\n {\n $this->_propDict[\"kioskModeAppStoreUrl\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "0afc677313e50814cb41ded7de4207d3", "score": "0.43187916", "text": "public function setDefaultIcon($icon)\n {\n $this->icon = $icon;\n }", "title": "" }, { "docid": "d40892483c683604d9fc6a2c1d9d4037", "score": "0.4300908", "text": "public function setKioskModeShowAppNotificationBadge($val)\n {\n $this->_propDict[\"kioskModeShowAppNotificationBadge\"] = boolval($val);\n return $this;\n }", "title": "" }, { "docid": "079f7592181d512707c4e920022397bd", "score": "0.42886838", "text": "public function setKioskModeManagedHomeScreenAutoSignout($val)\n {\n $this->_propDict[\"kioskModeManagedHomeScreenAutoSignout\"] = boolval($val);\n return $this;\n }", "title": "" }, { "docid": "307c559fe00171e32390d61447ead1ba", "score": "0.42785466", "text": "public function setKioskModeWiFiConfigurationEnabled($val)\n {\n $this->_propDict[\"kioskModeWiFiConfigurationEnabled\"] = boolval($val);\n return $this;\n }", "title": "" }, { "docid": "77913156ec3eeff930dc527ccae69509", "score": "0.42773765", "text": "public function setKioskModeWifiAllowedSsids($val)\n {\n $this->_propDict[\"kioskModeWifiAllowedSsids\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "4c20ef3882ddfb24e433bc6b8bec1d19", "score": "0.42701057", "text": "public function getKioskModeScreenSaverImageUrl()\n {\n if (array_key_exists(\"kioskModeScreenSaverImageUrl\", $this->_propDict)) {\n return $this->_propDict[\"kioskModeScreenSaverImageUrl\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "06f9773f9f82c7ab847ab6dee426c3e4", "score": "0.4269172", "text": "public function setClassicAppPath(?string $value): void {\n $this->getBackingStore()->set('classicAppPath', $value);\n }", "title": "" }, { "docid": "32fff74a03fa184021ef736f6e95df02", "score": "0.42679664", "text": "public function setKioskModeApps($val)\n {\n $this->_propDict[\"kioskModeApps\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "636545335d5180f21a7bd33770e1c783", "score": "0.42636454", "text": "public function setEdgeKiosk(?string $value): void {\n $this->getBackingStore()->set('edgeKiosk', $value);\n }", "title": "" }, { "docid": "be03acb553c3484a63da661d83d09e99", "score": "0.42485213", "text": "public function setIcon($value)\n {\n return $this->set(self::ICON, $value);\n }", "title": "" }, { "docid": "32a07101ee8afc2db39b11ffaff62752", "score": "0.42414376", "text": "public function getKioskModeWallpaperUrl()\n {\n if (array_key_exists(\"kioskModeWallpaperUrl\", $this->_propDict)) {\n return $this->_propDict[\"kioskModeWallpaperUrl\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "512a2b533fb2b84b8f7ac479e370a954", "score": "0.42246866", "text": "public function getKioskModeManagedHomeScreenSignInBackground()\n {\n if (array_key_exists(\"kioskModeManagedHomeScreenSignInBackground\", $this->_propDict)) {\n return $this->_propDict[\"kioskModeManagedHomeScreenSignInBackground\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "b64288041da4fef36aaee7dab9559612", "score": "0.42118052", "text": "public function setIcon($value)\n {\n return $this->set(self::icon, $value);\n }", "title": "" }, { "docid": "b64288041da4fef36aaee7dab9559612", "score": "0.42118052", "text": "public function setIcon($value)\n {\n return $this->set(self::icon, $value);\n }", "title": "" }, { "docid": "e70bffc70ad8645b941e8c01ea356bdc", "score": "0.41948962", "text": "public function setThemeRootFolder($folder)\n {\n $this->_themeRootFolder = $folder;\n }", "title": "" }, { "docid": "fbde4cd3588584d1b47247567e297e18", "score": "0.41925794", "text": "public function get_default_icon()\n {\n return 'themes/default/images/icons/48x48/menu/_generic_admin/component.png';\n }", "title": "" }, { "docid": "fbde4cd3588584d1b47247567e297e18", "score": "0.41925794", "text": "public function get_default_icon()\n {\n return 'themes/default/images/icons/48x48/menu/_generic_admin/component.png';\n }", "title": "" }, { "docid": "fbde4cd3588584d1b47247567e297e18", "score": "0.41925794", "text": "public function get_default_icon()\n {\n return 'themes/default/images/icons/48x48/menu/_generic_admin/component.png';\n }", "title": "" }, { "docid": "fbde4cd3588584d1b47247567e297e18", "score": "0.41925794", "text": "public function get_default_icon()\n {\n return 'themes/default/images/icons/48x48/menu/_generic_admin/component.png';\n }", "title": "" }, { "docid": "fbde4cd3588584d1b47247567e297e18", "score": "0.41925794", "text": "public function get_default_icon()\n {\n return 'themes/default/images/icons/48x48/menu/_generic_admin/component.png';\n }", "title": "" }, { "docid": "2ae868ae611156fc45fdebf693ce2810", "score": "0.41757733", "text": "public function get_default_icon()\n {\n return 'themes/default/images_custom/icons/48x48/menu/insults.png';\n }", "title": "" }, { "docid": "e4799b0e13ffd8622d7d17d43eaebf57", "score": "0.41524866", "text": "public function setSalvarImagemCropadaInclusao(){\n\t\t$this->salvarImagemCropadaInclusao();\n\t}", "title": "" }, { "docid": "039c42b26e14cf22a2aa86bb1c873985", "score": "0.41491312", "text": "public function icon($value) {\n return $this->setProperty('icon', $value);\n }", "title": "" }, { "docid": "658d3ec78baf807d1cef1b78ee7d7c1f", "score": "0.41428313", "text": "function setBGMPDefaultIcon( $iconURL, $placemarkID )\n{\n //if( $category-slug == \"pizzarias\" ) // change this to be whatever condition you want\n /*$placemarkCategories = wp_get_object_terms( $placemarkID, 'bgmp-category' );\n\n\tforeach( $placemarkCategories as $pc )\n\t\tif( $pc->slug == 'pizzarias' )\n $iconURL = get_bloginfo( 'stylesheet_directory' ) . '/imagens/icone-pizzaria.png';\n \n return $iconURL;*/\n $placemarkCategories = wp_get_object_terms( $placemarkID, 'bgmp-category' );\n\n\tforeach( $placemarkCategories as $pc )\n\t\tif( $pc->slug == 'pizzaria' )\n\t\t\t$iconURL = get_bloginfo( 'stylesheet_directory' ) . '/imagens/icone-pizzaria.png';\n\n return $iconURL;\n}", "title": "" }, { "docid": "1d66110ea97f5d423d923049eacba967", "score": "0.41402176", "text": "public function setKioskModeShowDeviceInfo($val)\n {\n $this->_propDict[\"kioskModeShowDeviceInfo\"] = boolval($val);\n return $this;\n }", "title": "" }, { "docid": "3905de70abca05abb940ef475480141e", "score": "0.41269737", "text": "public function setFolder($val)\n {\n $this->_propDict[\"folder\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "9aeda5db7a9f835e96a0c39080a5d0eb", "score": "0.41197115", "text": "function default_admin_icon_settings() {\n\tglobal $menu;\n\t$defaults = array();\n\tif ( $menu ) {\n\t\tforeach ( $menu as $m ) {\n\t\t\tif ( isset( $m[5] ) ) {\n\t\t\t\t$crap = array( \"?\", \"=\", \"/\" );\n\t\t\t\t$the_id = str_replace( $crap, \"-\", $m[5] );\n\t\t\t\tif ( isset( $m[0] ) && $m[0] != '' ) {\n\t\t\t\t\t$defaults[ $the_id . '_icon' ] = '';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn apply_filters( 'default_admin_icon_settings', $defaults );\n}", "title": "" }, { "docid": "5b8415e3bd6939626d4eaebed0655eee", "score": "0.4110884", "text": "function getDefaultIcon();", "title": "" }, { "docid": "765bc81c89e2ba974a8ef88c2530806a", "score": "0.40958682", "text": "function initialize_admin_icon_settings() {\n\n\t$theme_obj = wp_get_theme();\n\t$theme_name = $theme_obj->get( 'Name' );\n\t\t\n\tif ( false == get_option( 'admin_icon_settings' ) ) {\t\n\t\tadd_option( 'admin_icon_settings', apply_filters( 'default_admin_icon_settings', default_admin_icon_settings() ) );\n\t}\n\t\n\tadd_settings_section(\n\t\t'admin_icon_settings_section',\n\t\t__( 'Admin Menu Icon Settings', $theme_name ),\n\t\t'admin_icon_settings_section_callback',\n\t\t'admin_icon_settings'\n\t);\n\t\n\tglobal $menu;\n\tif ( $menu ) {\n\t\tforeach ( $menu as $m ) {\n\t\t\tif ( isset( $m[5] ) ) {\n\t\t\t\t$crap = array( \"?\", \"=\", \"/\" );\n\t\t\t\t$the_id = str_replace( $crap, \"-\", $m[5] );\n\t\t\t\tif ( isset( $m[0] ) && $m[0] != '' ) {\n\t\t\t\t\t$title = preg_replace( '/\\d/', '', $m[0] ); // removes the count from some menu titles\n\t\t\t\t\t$field_args = array(\n\t\t\t\t\t\t'id' => $the_id.'_icon',\n\t\t\t\t\t\t'name' => $the_id.'_icon',\n\t\t\t\t\t\t'desc' => '',\n\t\t\t\t\t\t'std' => '',\n\t\t\t\t\t\t'label_for' => $title,\n\t\t\t\t\t\t'class' => 'linker'\n\t\t\t\t\t);\n\t\t\t\t\tadd_settings_field( \n\t\t\t\t\t\t$the_id, \n\t\t\t\t\t\t$title, \n\t\t\t\t\t\t'admin_icon_settings_callback', \n\t\t\t\t\t\t'admin_icon_settings', \n\t\t\t\t\t\t'admin_icon_settings_section', \n\t\t\t\t\t\t$field_args \n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tregister_setting(\n\t\t'admin_icon_settings',\n\t\t'admin_icon_settings',\n\t\t'sanitize_admin_icon_settings'\n\t);\n}", "title": "" }, { "docid": "f158120ff35c6d4a11bdcace042b75bc", "score": "0.4094972", "text": "public function setKioskModeManagedHomeScreenInactiveSignOutNoticeInSeconds($val)\n {\n $this->_propDict[\"kioskModeManagedHomeScreenInactiveSignOutNoticeInSeconds\"] = intval($val);\n return $this;\n }", "title": "" }, { "docid": "10df8e98661c25ee4d69400935ca5401", "score": "0.40825212", "text": "public function setIconId($value) {\n return $this->set(self::ICON_ID, $value);\n }", "title": "" }, { "docid": "10df8e98661c25ee4d69400935ca5401", "score": "0.40825212", "text": "public function setIconId($value) {\n return $this->set(self::ICON_ID, $value);\n }", "title": "" }, { "docid": "10df8e98661c25ee4d69400935ca5401", "score": "0.40825212", "text": "public function setIconId($value) {\n return $this->set(self::ICON_ID, $value);\n }", "title": "" }, { "docid": "d6894f9413368155480ba07b0d77a33b", "score": "0.40640482", "text": "public function setMicrosoftLauncherDockPresenceConfiguration($val)\n {\n $this->_propDict[\"microsoftLauncherDockPresenceConfiguration\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "7b3b2ff6fc5f82648f63fbad28ee835c", "score": "0.405866", "text": "public function getKioskModeManagedHomeScreenSignInBrandingLogo()\n {\n if (array_key_exists(\"kioskModeManagedHomeScreenSignInBrandingLogo\", $this->_propDict)) {\n return $this->_propDict[\"kioskModeManagedHomeScreenSignInBrandingLogo\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "68639325bfffe90bfa2e7cf12e759c5e", "score": "0.4056891", "text": "public function setEdgeKioskType(?WindowsEdgeKioskType $value): void {\n $this->getBackingStore()->set('edgeKioskType', $value);\n }", "title": "" }, { "docid": "dc143ba0f92065368bd41dd555122e9f", "score": "0.40392968", "text": "protected static function setImageSizeDefaults()\n {\n $config = array(\n 'thumbnail_size_w' => '150;300',\n 'thumbnail_size_h' => '150;300',\n 'medium_size_w' => '300;600',\n 'medium_size_h' => '300;600',\n 'large_size_w' => '1024;1280',\n 'large_size_h' => '1024;1280'\n );\n\n // Set new defaults, if needed\n foreach ($config as $option => $data) {\n list($before, $after) = explode(';', $data);\n if (get_option($option) == $before) {\n update_option($option, $after);\n }\n }\n }", "title": "" }, { "docid": "2333f1f4a3bc4ac3994fb51e036cc89d", "score": "0.40344864", "text": "public function getKioskModeUseManagedHomeScreenApp()\n {\n if (array_key_exists(\"kioskModeUseManagedHomeScreenApp\", $this->_propDict)) {\n if (is_a($this->_propDict[\"kioskModeUseManagedHomeScreenApp\"], \"\\Beta\\Microsoft\\Graph\\Model\\KioskModeType\") || is_null($this->_propDict[\"kioskModeUseManagedHomeScreenApp\"])) {\n return $this->_propDict[\"kioskModeUseManagedHomeScreenApp\"];\n } else {\n $this->_propDict[\"kioskModeUseManagedHomeScreenApp\"] = new KioskModeType($this->_propDict[\"kioskModeUseManagedHomeScreenApp\"]);\n return $this->_propDict[\"kioskModeUseManagedHomeScreenApp\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "46b333613ae935240c977c17f088c36b", "score": "0.4017243", "text": "public function setSpecialFolder($val)\n {\n $this->_propDict[\"specialFolder\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "6a0bc15190fc31c6ebb1d8473f9b7e44", "score": "0.40137777", "text": "public function actionSetIcon()\r\n\t{\r\n\t\tif ((isset($_POST['icon']) && !empty($_POST['icon']) &&\r\n\t\t\t($_FILES['icon']['tmp_name'] && $_FILES['icon']['name'])))\r\n\t\t{\r\n\t\t\t$service = include('app/service_func/fileChecker.php');\r\n\r\n\t\t\t$user_img = $_FILES['icon'];\r\n\t\t\t$filePath = $_FILES['icon']['tmp_name'];\r\n\t\t\t$errorCode = $_FILES['icon']['error'];\r\n\t\t\t$mime = getimagesize($filePath);\r\n\t\r\n\t\t\t$outputMessage = checkFile($errorCode, $filePath, $user_img, $mime['mime']);\r\n\t\t\tif (!empty($outputMessage))\r\n\t\t\t\t$this->_view->message($outputMessage);\r\n\r\n\t\t\t$contents = file_get_contents($filePath);\r\n\t\t\t$result = $this->_model->saveIcon($contents, $user_img['type']);\r\n\r\n\t\t\tif ($result)\r\n\t\t\t{\r\n\t\t\t\t$path = $result['path'];\r\n\r\n\t\t\t\t$image = getimagesize($path);\r\n\t\t\t\t$contents = file_get_contents($path);\r\n\t\t\t\t$base = \"data:image/\" . $image['mime'] . \";base64,\" . base64_encode($contents);\r\n\r\n\t\t\t\t$_SESSION['user']['icon'] = $base;\r\n\t\t\t\t\r\n\t\t\t\t$path = ['src' => $base];\r\n\t\t\t\texit(json_encode($path));\r\n\t\t\t}\r\n\t\t\texit();\r\n\t\t}\r\n\t\telse\r\n\t\t\tView::errorCode(404);\r\n\t}", "title": "" }, { "docid": "e5a6d6a0e9ad08a414bfd81d95ef4c8c", "score": "0.40129644", "text": "public function setKioskModeFlashlightConfigurationEnabled($val)\n {\n $this->_propDict[\"kioskModeFlashlightConfigurationEnabled\"] = boolval($val);\n return $this;\n }", "title": "" }, { "docid": "17bd6d2308e32041f913da0639421bb2", "score": "0.40085807", "text": "public function setIcon($icon) //Icon - if you force the icon as type, the makimarker won't work...:(\n {\n $this->clientOptions['icon'] = $icon;\n }", "title": "" }, { "docid": "17bd6d2308e32041f913da0639421bb2", "score": "0.40085807", "text": "public function setIcon($icon) //Icon - if you force the icon as type, the makimarker won't work...:(\n {\n $this->clientOptions['icon'] = $icon;\n }", "title": "" }, { "docid": "09d7f572a903715425d116a75f893f9b", "score": "0.40077603", "text": "public function showIcon($value) {\n return $this->setProperty('showIcon', $value);\n }", "title": "" }, { "docid": "17a5c35dfb43c72dd49b58c66e296e7c", "score": "0.40051478", "text": "public function getIcon(): string\n {\n if ('dir' === $this->type) {\n return 'folder-open-o';\n }\n\n return 'file-o';\n }", "title": "" }, { "docid": "672a0347fe9bfc27e92e98519839e5f2", "score": "0.40040594", "text": "public function site_icon_settings() {\n\t\t$upload_blavatar_url = admin_url( 'options-general.php?page=jetpack-site_icon-upload' );\n\n\t\t// only load the \n\t\t// wp_enqueue_script( 'site-icon-admin' );\n\n\t\t// lets delete the temp data that we might he holding on to\n\t\tself::delete_temporay_data();\n\n\t\t?>\n\t\t<div id=\"site-icon\" class=\"site-icon-shell\">\n\t\t\t<h3><?php echo esc_html_e( 'Site Icon', 'jetpack' ); ?></h3>\n\t\t\t<div class=\"site-icon-content postbox\">\n\t\t\t\t<div class=\"site-icon-image\">\n\t\t\t\t<?php if( jetpack_has_site_icon() ) { \n\t\t\t\t\techo jetpack_get_site_icon( null, 128 ); \n\t\t\t\t\t} ?>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"site-icon-meta\">\n\n\t\t\t\t<?php if ( jetpack_has_site_icon() ) {\n\t\t\t\t\t$remove_blavatar_url = admin_url( 'options-general.php?page=jetpack-site_icon-upload' ).\"&action=remove&nonce=\".wp_create_nonce( 'remove_site_icon' ); // this could be an ajax url\n\t\t\t\t\t?>\n\t\t\t\t\t<p><a href=\"<?php echo esc_url( $upload_blavatar_url ); ?>\" id=\"site-icon-update\" class=\"button\"><?php echo esc_html_e( 'Update Site Icon', 'jetpack' ); ?></a>\n\t\t\t\t\t<a href=\"<?php echo esc_url( $remove_blavatar_url ); ?>\" id=\"site-icon-remove\" ><?php echo esc_html_e( 'Remove Icon', 'jetpack' ); ?></a> </p>\n\n\t\t\t\t<?php } else { ?>\n\t\t\t\t\n\t\t\t\t\t<a href=\"<?php echo esc_url( $upload_blavatar_url ); ?>\" id=\"site-icon-update\" class=\"button\"><?php echo esc_html_e( 'Add a Site Icon', 'jetpack' ); ?></a>\n\t\t\t\t\n\t\t\t\t<?php } ?>\n\t\t\t\t\n\t\t\t\t\t<div class=\"site-icon-info\">\n\t\t\t\t\t\t<p><?php echo esc_html_e( 'Site Icon creates a favicon for your site and more.', 'jetpack' ); ?></p>\n\t\t\t\t\t</div>\n\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t}", "title": "" }, { "docid": "98fc600e140de897f7f9eb6f2c0b62a2", "score": "0.40023363", "text": "public function setIconSize($size = 'standard');", "title": "" }, { "docid": "bde0ed8b1ac28abd8de422ca6c0326d7", "score": "0.39979562", "text": "function initialize_general_icon_settings() {\n\n\t$theme_obj = wp_get_theme();\n\t$theme_name = $theme_obj->get( 'Name' );\n\t\t\n\tif( false == get_option( 'general_icon_settings' ) ) {\t\n\t\tadd_option( 'general_icon_settings', apply_filters( 'default_general_icon_settings', default_general_icon_settings() ) );\n\t}\n\tadd_settings_section(\n\t\t'general_icon_settings_section',\n\t\t__( 'General Icon Settings', $theme_name ),\n\t\t'general_icon_settings_callback',\n\t\t'general_icon_settings'\t\n\t);\n\t\n\tadd_settings_field(\t\n\t\t'frontend_icons',\n\t\t__( 'Disable Front End Icons', $theme_name ),\n\t\t'frontend_icons_callback',\n\t\t'general_icon_settings',\n\t\t'general_icon_settings_section',\n\t\tarray(\n\t\t\t__( 'Disable Font Awesome icons on the front end of your site.', $theme_name ),\n\t\t)\n\t);\n\t\n\tadd_settings_field(\t\n\t\t'the_nav_icons',\n\t\t__( 'Disable Nav Menu Icons', $theme_name ),\n\t\t'the_nav_icons_callback',\n\t\t'general_icon_settings',\n\t\t'general_icon_settings_section',\n\t\tarray(\n\t\t\t__( 'Disable Font Awesome icons in the nav menu of your site.', $theme_name ),\n\t\t)\n\t);\n\t\n\tadd_settings_field(\t\n\t\t'cdn_fa',\n\t\t__( 'Use Local Icon Styles', $theme_name ),\n\t\t'cdn_fa_callback',\n\t\t'general_icon_settings',\n\t\t'general_icon_settings_section',\n\t\tarray(\n\t\t\t__( 'Enqueue Font Awesome icon styles from your site instead of the CDN.', $theme_name ),\n\t\t)\n\t);\n\t\n\tregister_setting(\n\t\t'general_icon_settings',\n\t\t'general_icon_settings'\n\t);\n}", "title": "" }, { "docid": "5110e0da2b4f3f794143e9c9db101369", "score": "0.3995371", "text": "public function setKioskModeBuiltInAppId($val)\n {\n $this->_propDict[\"kioskModeBuiltInAppId\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "af29003f23a9b615875a95343252aa1f", "score": "0.39895898", "text": "public function setKioskCustomizationPowerButtonActionsBlocked($val)\n {\n $this->_propDict[\"kioskCustomizationPowerButtonActionsBlocked\"] = boolval($val);\n return $this;\n }", "title": "" }, { "docid": "65a2a98633f8cc9681604019ea651f0e", "score": "0.39879405", "text": "public function getKioskModeLockHomeScreen()\n {\n if (array_key_exists(\"kioskModeLockHomeScreen\", $this->_propDict)) {\n return $this->_propDict[\"kioskModeLockHomeScreen\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "0c4f29274679ac9634f83ff5aebc1e09", "score": "0.39822024", "text": "public function setKioskModeManagedAppId($val)\n {\n $this->_propDict[\"kioskModeManagedAppId\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "2c0a3a2fd85e7395d23173e6ff845632", "score": "0.39622748", "text": "function initialize_menu_icon_settings() {\n\t$options = get_option('general_icon_settings');\n\tif ( !isset( $options['frontend_icons'] ) || $options['frontend_icons'] == 0 ) {\n\t\tif ( !isset( $options['the_nav_icons'] ) || $options['the_nav_icons'] == 0 ) {\n\t\t\t$theme_obj = wp_get_theme();\n\t\t\t$theme_name = $theme_obj->get( 'Name' );\n\t\t\tif ( false == get_option( 'menu_icon_settings' ) ) {\t\n\t\t\t\tadd_option( 'menu_icon_settings', apply_filters( 'default_menu_icon_settings', default_menu_icon_settings() ) );\n\t\t\t}\n\t\t\t\n\t\t\t$nav_menus = get_registered_nav_menus();\n\t\t\tif ( $nav_menus ) {\n\t\t\t\tforeach ( $nav_menus as $menu => $name ) {\n\t\t\t\t\t$nav_menu_locations = get_nav_menu_locations();\n\t\t\t\t\tif ( $nav_menu_locations ) {\n\t\t\t\t\t\t$menu_id = $nav_menu_locations[ $menu ]; \n\t\t\t\t\t\t$items = wp_get_nav_menu_items( $menu_id );\n\t\t\t\t\t\tif ( $items ) {\n\t\t\t\t\t\t\t add_settings_section(\n\t\t\t\t\t\t\t\t $menu . '_section',\n\t\t\t\t\t\t\t\t __( $name, $theme_name ),\n\t\t\t\t\t\t\t\t 'menu_icon_settings_callback',\n\t\t\t\t\t\t\t\t 'menu_icon_settings'\n\t\t\t\t\t\t\t );\n\t\t\t\t\t\t\t foreach ( (array) $items as $key => $i ) {\n\t\t\t\t\t\t\t\t if ( isset( $i->title ) && isset( $i->ID ) ) {\n\t\t\t\t\t\t\t\t\t $before_field = array(\n\t\t\t\t\t\t\t\t\t\t 'id' => 'icn-menu-item-' . $i->ID,\n\t\t\t\t\t\t\t\t\t\t 'name' => 'icn-menu-item-' . $i->ID,\n\t\t\t\t\t\t\t\t\t\t 'desc' => 'Add icon before ' . $i->title,\n\t\t\t\t\t\t\t\t\t\t 'std' => '',\n\t\t\t\t\t\t\t\t\t\t 'label_for' => '(Before) ' . $i->title,\n\t\t\t\t\t\t\t\t\t\t 'class' => ''\n\t\t\t\t\t\t\t\t\t );\n\t\t\t\t\t\t\t\t\t $after_field = array(\n\t\t\t\t\t\t\t\t\t\t 'id' => 'icn-after-menu-item-' . $i->ID,\n\t\t\t\t\t\t\t\t\t\t 'name' => 'icn-after-menu-item-' . $i->ID,\n\t\t\t\t\t\t\t\t\t\t 'desc' => 'Add icon after ' . $i->title,\n\t\t\t\t\t\t\t\t\t\t 'std' => '',\n\t\t\t\t\t\t\t\t\t\t 'label_for' => $i->title . ' (After)',\n\t\t\t\t\t\t\t\t\t\t 'class' => ''\n\t\t\t\t\t\t\t\t\t );\n\t\t\t\t\t\t\t\t\t $size_before_field = array(\n\t\t\t\t\t\t\t\t\t\t 'id' => 'size-icn-menu-item-' . $i->ID,\n\t\t\t\t\t\t\t\t\t\t 'name' => 'size-icn-menu-item-' . $i->ID,\n\t\t\t\t\t\t\t\t\t\t 'desc' => 'Adjust size of icon before ' . $i->title,\n\t\t\t\t\t\t\t\t\t\t 'std' => '',\n\t\t\t\t\t\t\t\t\t\t 'label_for' => '(Before) ' . $i->title . ' Size',\n\t\t\t\t\t\t\t\t\t\t 'class' => ''\n\t\t\t\t\t\t\t\t\t );\n\t\t\t\t\t\t\t\t\t $size_after_field = array(\n\t\t\t\t\t\t\t\t\t\t 'id' => 'size-icn-after-menu-item-' . $i->ID,\n\t\t\t\t\t\t\t\t\t\t 'name' => 'size-icn-after-menu-item-' . $i->ID,\n\t\t\t\t\t\t\t\t\t\t 'desc' => 'Adjust size of icon after ' . $i->title,\n\t\t\t\t\t\t\t\t\t\t 'std' => '',\n\t\t\t\t\t\t\t\t\t\t 'label_for' => $i->title . ' (After) Size',\n\t\t\t\t\t\t\t\t\t\t 'class' => ''\n\t\t\t\t\t\t\t\t\t );\n\t\t\t\t\t\t\t\t\t add_settings_field( \n\t\t\t\t\t\t\t\t\t\t $i->ID, \n\t\t\t\t\t\t\t\t\t\t '(Before) ' . $i->title, \n\t\t\t\t\t\t\t\t\t\t 'menu_icons_callback', \n\t\t\t\t\t\t\t\t\t\t 'menu_icon_settings', \n\t\t\t\t\t\t\t\t\t\t $menu . '_section', \n\t\t\t\t\t\t\t\t\t\t $before_field \n\t\t\t\t\t\t\t\t\t );\n\t\t\t\t\t\t\t\t\t add_settings_field( \n\t\t\t\t\t\t\t\t\t\t $i->ID . '-size', \n\t\t\t\t\t\t\t\t\t\t '(Before) ' . $i->title . ' Size', \n\t\t\t\t\t\t\t\t\t\t 'menu_icons_size_callback', \n\t\t\t\t\t\t\t\t\t\t 'menu_icon_settings', \n\t\t\t\t\t\t\t\t\t\t $menu . '_section', \n\t\t\t\t\t\t\t\t\t\t $size_before_field \n\t\t\t\t\t\t\t\t\t );\n\t\t\t\t\t\t\t\t\t add_settings_field( \n\t\t\t\t\t\t\t\t\t $i->ID . '-after', \n\t\t\t\t\t\t\t\t\t $i->title . ' (After)', \n\t\t\t\t\t\t\t\t\t 'menu_icons_callback', \n\t\t\t\t\t\t\t\t\t 'menu_icon_settings', \n\t\t\t\t\t\t\t\t\t $menu . '_section', \n\t\t\t\t\t\t\t\t\t $after_field \n\t\t\t\t\t\t\t\t\t );\n\t\t\t\t\t\t\t\t\t add_settings_field( \n\t\t\t\t\t\t\t\t\t\t $i->ID . '-after-size', \n\t\t\t\t\t\t\t\t\t\t $i->title . ' (After) Size', \n\t\t\t\t\t\t\t\t\t\t 'menu_icons_size_callback', \n\t\t\t\t\t\t\t\t\t\t 'menu_icon_settings', \n\t\t\t\t\t\t\t\t\t\t $menu . '_section', \n\t\t\t\t\t\t\t\t\t\t $size_after_field \n\t\t\t\t\t\t\t\t\t );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\tregister_setting(\n\t\t'menu_icon_settings',\n\t\t'menu_icon_settings',\n\t\t'sanitize_menu_icon_settings'\n\t);\n}", "title": "" }, { "docid": "de27727227cadfac61ae18037cd361f7", "score": "0.39614224", "text": "public function setCoreMgrTreeIconContext(string $value): SystemSetting\n {\n $this->setName('mgr_tree_icon_context');\n $this->loadObject(true);\n $this->setValue($value);\n\n return $this;\n }", "title": "" }, { "docid": "f86cc938384424c069f11fa2bbe8b99f", "score": "0.39581493", "text": "public function setCoreAutoIsfolder(bool $value): SystemSetting\n {\n $this->setName('auto_isfolder');\n $this->loadObject(true);\n $this->setValue($value);\n\n return $this;\n }", "title": "" }, { "docid": "c803887f22a930455255caad1a5c90fe", "score": "0.3954809", "text": "function set_root_folder($folder) {\n // normalize the internal folder value by removing any final slashes\n $this->rootFolder = rtrim($folder, '/');\n }", "title": "" }, { "docid": "b3897c2120e4d44a48c45d1ab05c0d02", "score": "0.3954243", "text": "abstract public function setFolder($folder);", "title": "" }, { "docid": "d89bb6cd875aa5bdedceb42ebae02ea8", "score": "0.39535263", "text": "public function getKioskModeManagedHomeScreenSignInEnabled()\n {\n if (array_key_exists(\"kioskModeManagedHomeScreenSignInEnabled\", $this->_propDict)) {\n return $this->_propDict[\"kioskModeManagedHomeScreenSignInEnabled\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "e844ac0a01a51acfbe53f1c359e655e7", "score": "0.39488816", "text": "public function setMicrosoftLauncherCustomWallpaperImageUrl($val)\n {\n $this->_propDict[\"microsoftLauncherCustomWallpaperImageUrl\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "005a3fa69245471ec4c5bcf23b25fd4e", "score": "0.39348224", "text": "public function setKioskModeMediaVolumeConfigurationEnabled($val)\n {\n $this->_propDict[\"kioskModeMediaVolumeConfigurationEnabled\"] = boolval($val);\n return $this;\n }", "title": "" }, { "docid": "70312c9fefec8631bd29a413e9fa1186", "score": "0.39145744", "text": "public function setEditFolder($data) {\n $this->database->table('folders')->where('id', $data->id)->update(array('folder_name' => $data->folder_name));\n\n $this->deleteOrphanTags($data->id);\n $this->deleteRelations($data->id);\n\n if($data->tags != '') {\n $this->addNewTags($data->tags);\n $this->addRelations($data->id, $data->tags);\n }\n }", "title": "" }, { "docid": "4f73694c7d4ef3170978445c9751775c", "score": "0.39028347", "text": "public function setDeleteFolder($data) {\n $this->deleteOrphanTags($data->id);\n $this->deleteFolder($data->id);\n }", "title": "" }, { "docid": "ad3b1543b9d896c1f1a735db07e7b79e", "score": "0.3902628", "text": "public function setKioskModeExitCode($val)\n {\n $this->_propDict[\"kioskModeExitCode\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "7685c926c27a629f43c93ffaae31e55a", "score": "0.3898735", "text": "public function setKioskModeAllowColorInversionSettings($val)\n {\n $this->_propDict[\"kioskModeAllowColorInversionSettings\"] = boolval($val);\n return $this;\n }", "title": "" }, { "docid": "e0aacdd1d7e3d7b78217eabe583ec58a", "score": "0.38897753", "text": "function setFolderId($a_folder_id)\n\t{\n\t\t$this->folder_id = $a_folder_id;\n\t}", "title": "" }, { "docid": "749a9adc1762064f6789fcc75f57de70", "score": "0.38883057", "text": "public function setFolderLocation() {\n if (!$this->title) {\n $this->title = $this->setTitle($this->id);\n }\n $folder[] = $this->repository;\n $folder[] = $this->title->tfolder;\n $folder[] = $this->title->folder;\n $folder[] = $this->title->subfolder;\n $folder[] = $this->title->fileprefix;\n if (!is_dir(implode('/', $folder))) {\n array_pop($folder);\n }\n return $this->folder = implode('/', $folder);\n }", "title": "" }, { "docid": "40530ac3268a95f1b523dcdf8c7d8803", "score": "0.38881138", "text": "public abstract function ChangeFolder($folderid, $oldid, $displayname, $type);", "title": "" }, { "docid": "64f1cf7832dc44850af25f11fac7b951", "score": "0.38840458", "text": "public function setResourcesFolderUrl(?string $value): void {\n $this->getBackingStore()->set('resourcesFolderUrl', $value);\n }", "title": "" }, { "docid": "c68aac400970c3b1a73453e2a77948a5", "score": "0.38824746", "text": "function app_dockApp($App){\n \n $Apps = get_option('dt_int_Apps');\n $appConfig = get_option('_'.sanitize_title($App).'_app');\n \n if(empty($appConfig['docked'])){\n $appConfig['docked'] = true;\n $Return['docked'] = true;\n }else{\n $appConfig['docked'] = false;\n $Return['docked'] = false;\n }\n $appConfig = update_option('_'.sanitize_title($App).'_app', $appConfig);\n\n\n return $Return;\n}", "title": "" }, { "docid": "db6cf37284d513b024f6352e9ca853b5", "score": "0.38785052", "text": "public function setKioskModeScreenOrientation($val)\n {\n $this->_propDict[\"kioskModeScreenOrientation\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "a44c1a3f6a64ac7ec03c4327afe6196e", "score": "0.38745558", "text": "function setDisableShowicons()\n\t{\n\t\t$this -> showicons = false;\n\t}", "title": "" }, { "docid": "31305b0944ce1f4a074436163793bc81", "score": "0.38607824", "text": "public function getKioskModeManagedHomeScreenPinRequired()\n {\n if (array_key_exists(\"kioskModeManagedHomeScreenPinRequired\", $this->_propDict)) {\n return $this->_propDict[\"kioskModeManagedHomeScreenPinRequired\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "383791497812faaa843f26f394aa2f56", "score": "0.38487726", "text": "static private function save_enabled_icons() {\n\t\tif ( isset( $_POST['fl-icons-nonce'] ) && wp_verify_nonce( $_POST['fl-icons-nonce'], 'icons' ) ) {\n\n\t\t\t// Make sure we have at least one enabled icon set.\n\t\t\tif ( ! isset( $_POST['fl-enabled-icons'] ) && empty( $_POST['fl-new-icon-set'] ) ) {\n\t\t\t\tself::add_error( __( 'Error! You must have at least one icon set enabled.', 'fl-builder' ) );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$enabled_icons = array();\n\n\t\t\t// Sanitize the enabled icons.\n\t\t\tif ( isset( $_POST['fl-enabled-icons'] ) && is_array( $_POST['fl-enabled-icons'] ) ) {\n\t\t\t\t$enabled_icons = array_map( 'sanitize_text_field', $_POST['fl-enabled-icons'] );\n\t\t\t}\n\n\t\t\t// we cant have fa4 and fa5 active at same time.\n\t\t\tif ( in_array( 'font-awesome', $enabled_icons ) && (bool) array_intersect( array( 'font-awesome-5-brands', 'font-awesome-5-regular', 'font-awesome-5-solid' ), $enabled_icons ) ) {\n\t\t\t\tself::add_error( __( 'Use either Font Awesome 4 or Font Awesome 5. They are not compatible. Modules already in use will continue to use Font Awesome 4 regardless of your choice here.', 'fl-builder' ) );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Update the enabled sets.\n\t\t\tself::update_enabled_icons( $enabled_icons );\n\n\t\t\t// Delete a set?\n\t\t\tif ( ! empty( $_POST['fl-delete-icon-set'] ) ) {\n\n\t\t\t\t$sets = FLBuilderIcons::get_sets();\n\t\t\t\t$key = sanitize_text_field( $_POST['fl-delete-icon-set'] );\n\t\t\t\t$index = array_search( $key, $enabled_icons );\n\n\t\t\t\tif ( false !== $index ) {\n\t\t\t\t\tunset( $enabled_icons[ $index ] );\n\t\t\t\t}\n\t\t\t\tif ( isset( $sets[ $key ] ) ) {\n\t\t\t\t\tfl_builder_filesystem()->rmdir( $sets[ $key ]['path'], true );\n\t\t\t\t\tFLBuilderIcons::remove_set( $key );\n\t\t\t\t}\n\n\t\t\t\tdo_action( 'fl_builder_admin_settings_remove_icon_set', $key );\n\t\t\t}\n\n\t\t\t// Upload a new set?\n\t\t\tif ( ! empty( $_POST['fl-new-icon-set'] ) ) {\n\n\t\t\t\t$dir\t\t = FLBuilderModel::get_cache_dir( 'icons' );\n\t\t\t\t$id\t\t\t = (int) $_POST['fl-new-icon-set'];\n\t\t\t\t$path\t\t = apply_filters( 'fl_builder_icon_set_upload_path', get_attached_file( $id ) );\n\t\t\t\t$new_path\t = apply_filters( 'fl_builder_icon_set_new_path', $dir['path'] . 'icon-' . time() . '/' );\n\n\t\t\t\tfl_builder_filesystem()->get_filesystem();\n\n\t\t\t\tdo_action( 'fl_builder_before_unzip_icon_set', $id, $path, $new_path );\n\n\t\t\t\t$unzipped\t = unzip_file( $path, $new_path );\n\n\t\t\t\t// unzip returned a WP_Error\n\t\t\t\tif ( is_wp_error( $unzipped ) ) {\n\t\t\t\t\tself::add_error( sprintf( __( 'Unzip Error: %s', 'fl-builder' ), $unzipped->get_error_message() ) );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Unzip failed.\n\t\t\t\tif ( ! $unzipped ) {\n\t\t\t\t\tself::add_error( __( 'Error! Could not unzip file.', 'fl-builder' ) );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Move files if unzipped into a subfolder.\n\t\t\t\t$files = fl_builder_filesystem()->dirlist( $new_path );\n\n\t\t\t\tif ( 1 == count( $files ) ) {\n\n\t\t\t\t\t$values\t\t\t= array_values( $files );\n\t\t\t\t\t$subfolder_info = array_shift( $values );\n\t\t\t\t\t$subfolder\t\t= $new_path . $subfolder_info['name'] . '/';\n\n\t\t\t\t\tif ( fl_builder_filesystem()->file_exists( $subfolder ) && fl_builder_filesystem()->is_dir( $subfolder ) ) {\n\n\t\t\t\t\t\t$files = fl_builder_filesystem()->dirlist( $subfolder );\n\n\t\t\t\t\t\tif ( $files ) {\n\t\t\t\t\t\t\tforeach ( $files as $file ) {\n\t\t\t\t\t\t\t\tfl_builder_filesystem()->move( $subfolder . $file['name'], $new_path . $file['name'] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfl_builder_filesystem()->rmdir( $subfolder );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tdo_action( 'fl_builder_after_unzip_icon_set', $new_path );\n\n\t\t\t\t$check_path = apply_filters( 'fl_builder_icon_set_check_path', $new_path );\n\n\t\t\t\t// Check for supported sets.\n\t\t\t\t$is_icomoon\t = fl_builder_filesystem()->file_exists( $check_path . 'selection.json' );\n\t\t\t\t$is_fontello = fl_builder_filesystem()->file_exists( $check_path . 'config.json' );\n\n\t\t\t\t// Show an error if we don't have a supported icon set.\n\t\t\t\tif ( ! $is_icomoon && ! $is_fontello ) {\n\t\t\t\t\tfl_builder_filesystem()->rmdir( $new_path, true );\n\t\t\t\t\tself::add_error( __( 'Error! Please upload an icon set from either Icomoon or Fontello.', 'fl-builder' ) );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// check for valid Icomoon\n\t\t\t\tif ( $is_icomoon ) {\n\t\t\t\t\t$data = json_decode( fl_builder_filesystem()->file_get_contents( $check_path . 'selection.json' ) );\n\t\t\t\t\tif ( ! isset( $data->metadata ) ) {\n\t\t\t\t\t\tfl_builder_filesystem()->rmdir( $new_path, true );\n\t\t\t\t\t\tself::add_error( __( 'Error! When downloading from Icomoon, be sure to click the Download Font button and not Generate SVG.', 'fl-builder' ) );\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Enable the new set.\n\t\t\t\tif ( is_array( $enabled_icons ) ) {\n\t\t\t\t\t$key = FLBuilderIcons::get_key_from_path( $check_path );\n\t\t\t\t\t$enabled_icons[] = $key;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Update the enabled sets again in case they have changed.\n\t\t\tself::update_enabled_icons( $enabled_icons );\n\t\t}\n\t}", "title": "" }, { "docid": "34b9a68e287de3bfedc643ba9ef6c921", "score": "0.38425806", "text": "public function setKioskModeManagedHomeScreenInactiveSignOutDelayInSeconds($val)\n {\n $this->_propDict[\"kioskModeManagedHomeScreenInactiveSignOutDelayInSeconds\"] = intval($val);\n return $this;\n }", "title": "" }, { "docid": "b762002f298a0321d32b0636d49f7315", "score": "0.38411713", "text": "public function setCorePhpthumbNooffsitelinkEraseImage(bool $value): SystemSetting\n {\n $this->setName('phpthumb_nooffsitelink_erase_image');\n $this->loadObject(true);\n $this->setValue($value);\n\n return $this;\n }", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "f4131e2d32ae7f427e0f023841e58dce", "score": "0.0", "text": "public function store(Request $request)\n {\n $sessions = '';\n $regras = [\n 'email' => 'required',\n 'password' => 'required'\n ];\n\n $feedback = [\n 'required' => 'there are mandatory fields not filled in',\n ];\n\n $request->validate($regras,$feedback);\n\n $email = $request->email;\n $password = base64_encode($request->password);\n \n if(Users::where('email',$email)->where('password',$password)->select(array('id_user','name','email'))->count() > 0){\n $sessions = Users::where('email',$email)->where('password',$password)->select(array('id_user','name','email'))->get();\n return response($sessions,200);\n }else{\n return response('',400);\n }\n\n \n }", "title": "" } ]
[ { "docid": "d2d5025c41b1d2624f860d8ceab9e2ab", "score": "0.7168782", "text": "public function store()\n {\n // Use the parent API to save the resource\n $object = $this->api()->store();\n\n // Redirect back with message\n return $this->redirect('created', ['id' => $object->id])\n ->with('message', $this->message('created') );\n }", "title": "" }, { "docid": "d98a4fb282f0c755f010ee2f5ed4571d", "score": "0.7077314", "text": "protected function save()\n {\n $this->em->persist($this->resource);\n $this->em->flush();\n }", "title": "" }, { "docid": "57d765bdde5c5951746b777b6533d048", "score": "0.69856346", "text": "public function store(StoreResource $request)\n {\n $input = $request->all();\n \n $resource = new Resource;\n $resource->fill($input);\n \n $resource->save();\n\n // redirect\n Session::flash('message', 'Successfully saved resource!');\n \n return redirect('resources');\n }", "title": "" }, { "docid": "d952c501b2ff80d2bf8bb35cd4b5c7f7", "score": "0.6660094", "text": "public function store(StoreResource $request)\n {\n $data = request(['title', 'type', 'description', 'link', 'markdown', 'code']);\n \n $user = JWTAuth::parseToken()->authenticate();\n \n $resource = Resource::create([\n 'title' => $data['title'],\n 'type' => $data['type'],\n 'link' => $data['link'],\n 'code' => $data['code'],\n 'markdown' => $data['markdown'],\n 'user_id' => $user['id'],\n ]);\n \n return $resource;\n }", "title": "" }, { "docid": "0a2dcecef8071427bb4f3c22969d6817", "score": "0.6619958", "text": "public function store()\n {\n if (!$this->id) {\n $this->id = $this->insertObject();\n } else {\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "4e5acd860dcda74c61d836d96050b079", "score": "0.66155946", "text": "public function put(Storage $storage);", "title": "" }, { "docid": "de5fc2070d9e5322839836dc750f4b80", "score": "0.6569558", "text": "public function store(StoragesStoreRequest $request)\n {\n $by_id = Auth::user()->id;\n\n $new_storage = Storage::create([\n 'maker' => $request->maker,\n 'model_number' => $request->model_number,\n 'serial_number' => $request->serial_number,\n 'size' => $request->size,\n 'types' => $request->types,\n 'supported_os' => $request->supported_os,\n 'recovery_key' => $request->recovery_key,\n 'storage_password' => $request->storage_password,\n 'updated_by' => $by_id,\n 'created_by' => $by_id,\n ]);\n\n return redirect()->route('storages.show', $new_storage->id)->with('information', 'レコードを作成しました。');\n }", "title": "" }, { "docid": "3fbbbe537a186e3aba9885c042be89ee", "score": "0.6486008", "text": "public function create_storage();", "title": "" }, { "docid": "5bfca839729027de5944143fb0dca04f", "score": "0.64471614", "text": "public function store(Request $request)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'abstract' => 'required',\n 'content' => 'required',\n 'categories' => 'required|array',\n 'image' => 'required',\n ]);\n\n $resource = Resource::create([\n 'title' => $request->title,\n 'abstract' => $request->abstract,\n 'content' => $request->content,\n 'status' => $request->status,\n 'user_id' => auth()->user()->id,\n ]);\n $resource->categories()->sync($request->categories);\n\n $path = $request->image;\n $image = File::where('file_path', $path)->first();\n $resource->image()->sync($image->id);\n\n $request->session()->flash('flash.banner', 'Recurso creado exitosamente');\n\n return redirect()->route('resource.edit', $resource);\n }", "title": "" }, { "docid": "68f3fa80257f85b02954ae4ca8745d5f", "score": "0.6422112", "text": "public function store(Request $request)\n {\n $req = $request->all();\n if (Validator::make($req,\n [\n 'new_dir' => 'required',\n ])->fails()) return $this->failed(400000);\n if (Validator::make($req,\n [\n 'new_dir' => 'string',\n ])->fails()) return $this->failed(400001);\n\n $resource = new Resource();\n $resource->resource_name = $req['new_dir'];\n $resource->file = false;\n if ($req['current_path']) $resource->path = $req['current_path'];\n if (!$resource->save()) return $this->failed(500001);\n $request->user()->resource()->attach($resource->id);\n return response()->json($resource);\n }", "title": "" }, { "docid": "40718558d61a4c56dc5b2c2b6422e8cf", "score": "0.6419359", "text": "abstract public function createStorage();", "title": "" }, { "docid": "55b375ea7c339e8f0e9c38919b53b1db", "score": "0.637569", "text": "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "634b03751c156f72e00ba740b789cf98", "score": "0.6369132", "text": "public function store()\n\t{\n\t\t//\n\n\n\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
f5ecdd56aa9bf3e402ed80ca9e6db64d
Funcion para obtener el id del ultimo proveedor insertado
[ { "docid": "c573126a11d8395808941b5fe0ad2d5f", "score": "0.0", "text": "public function ObtenIdLastProveedor(){\n\t\t\t$query = \"SELECT MAX(id_proveedor) FROM proveedor\";\n\t\t\t$resultado = $this->db->query($query);\n\t\t\treturn $resultado->row_array();\n\t\t}", "title": "" } ]
[ { "docid": "7aab593618fcaec3a665a71644c58da1", "score": "0.74587816", "text": "public function id_ultimo()\n\t{\n\t\treturn @mysql_insert_id();\n\t}", "title": "" }, { "docid": "b61904fd6f11c63edbe9f41da3798a6b", "score": "0.7420269", "text": "private function getNewIdContato(){\n $sqlStmt = “SELECT MAX(ID) AS ID FROM {$this->tabela}”;\n try {\n $operacao = $this->instanciaConexaoPdoAtiva->prepare($sqlStmt);\n if($operacao->execute()) {\n if($operacao->rowCount() > 0){\n $getRow = $operacao->fetch(PDO::FETCH_OBJ);\n $idReturn = (int) $getRow->ID + 1;\n return $idReturn;\n } else {\n throw new Exception(“Ocorreu um problema com o banco de dados”);\n exit();\n }\n } else {\n throw new Exception(“Ocorreu um problema com o banco de dados”);\n exit();\n }\n } catch (PDOException $excecao) {\n echo $excecao->getMessage();\n }\n }", "title": "" }, { "docid": "9f47c9696c94ae9175bffcb28e0d71b6", "score": "0.73079234", "text": "function BDDlastId(){\n //paramtres non\n //reorourn le denrier id a touche\n \n //ouverturte base de donnes\n $bdd = BDDouverture();\n return $bdd->lastInsertId();\n}", "title": "" }, { "docid": "9aac952e6ccc8443c7af3fb56a3875a1", "score": "0.7239662", "text": "public function getInsertId() {}", "title": "" }, { "docid": "556aabdf474557716f81fc9fb2de7f47", "score": "0.7173255", "text": "public function getInsertId();", "title": "" }, { "docid": "556aabdf474557716f81fc9fb2de7f47", "score": "0.7173255", "text": "public function getInsertId();", "title": "" }, { "docid": "c62a1a7387facc29c164d8567967ef02", "score": "0.71373576", "text": "function maxId() {\n $sql = \"SELECT max(PVE_ID) as id FROM mco_proveedores \";\n $this->consult = $this->connection->Execute($sql);\n $max=$this->consult->fields;\n return $max['id']+1;\n }", "title": "" }, { "docid": "9bfa97cd5bc75e289a55525df78652f2", "score": "0.7103073", "text": "public function getInsertID();", "title": "" }, { "docid": "252178fd502cd7e818565a3717177e2a", "score": "0.7101679", "text": "public function obtenerUltimoId(){\n $query = $this->conexion->prepare(\"SELECT max(id) as id from users\");\n $query->execute();\n $id = $query->fetch(PDO::FETCH_ASSOC);\n return $id['id'];\n }", "title": "" }, { "docid": "324b42d105eccf49f9bf05a7ad44e7a3", "score": "0.70621055", "text": "protected function getLastPouleId() \n\t{\n\t\treturn $this->getConnection()->insert_id;\n\t}", "title": "" }, { "docid": "492d11a1b4110fa9e0073d15b674877f", "score": "0.7051915", "text": "public function obtenerID();", "title": "" }, { "docid": "854570e8ac71bdfc870c85dc2a9d8f01", "score": "0.69953823", "text": "public function calcularId(){\n\n $registros = VinculacionSociedad::withTrashed()->get();\n $max_valor = count($registros);\n\n if($max_valor > 0){\n $max_valor++;\n } else {\n $max_valor = 1;\n }\n\n return $max_valor;\n }", "title": "" }, { "docid": "f7b58667dd3fc55ed44027b5a2b03dc1", "score": "0.69880915", "text": "public function getLastIdPromotion(){\n $connexion = new Connexion();\n $conn = $connexion->getConnexion();\n\n $stmt = $conn->prepare(\"SELECT MAX(pk_promotion) FROM promotion;\");\n $stmt->execute();\n\n $result = $stmt->get_result();\n\n if(!$result){\n die('Could not query:' . mysqli_error());\n }\n\n $row = $result->fetch_assoc();\n $lastId = $row['MAX(pk_promotion)'] + 1;\n\n $stmt->close();\n return $lastId;\n }", "title": "" }, { "docid": "6bcdb5a268797f0e9017b42c4c3b94f9", "score": "0.69859564", "text": "public static function AsignarIdProveedor(){\n $list = ProveedorDb::GetProveedores();\n $id = -1;\n \n foreach($list as $item){\n $id = $item->id > $id? $item->id: $id;\n }\n\n return $id + 1;\n }", "title": "" }, { "docid": "3451fc49d691c8044ad493d0dcb7c6a0", "score": "0.6947257", "text": "public function getLastId(){\n $connexion = new Connexion();\n $conn = $connexion->getConnexion();\n\n $stmt = $conn->prepare(\"SELECT MAX(pk_promotion_service) FROM ta_promotion_service;\");\n $stmt->execute();\n\n $result = $stmt->get_result();\n\n if(!$result){\n die('Could not query:' . mysqli_error());\n }\n\n $row = $result->fetch_assoc();\n $lastId = $row['MAX(pk_promotion_service)'] + 1;\n\n $stmt->close();\n return $lastId;\n }", "title": "" }, { "docid": "fd79a23920d7475a6dc16223be6d3474", "score": "0.68792236", "text": "public function getdernierid(){ \n $req=\"SELECT id FROM contrat WHERE id = (SELECT MAX(id) FROM contrat)\";\n //print_r($req);\n $resultat = $this->pdo->query($req);\n $ligne = $resultat->fetch();\n $donnees = $ligne['id'];\n return intval($donnees);\n }", "title": "" }, { "docid": "3f0741c02a799155f9ff0f98e43c1b7f", "score": "0.6859103", "text": "private function obtenerUltimoGerenteId(){\n $ultimoGerenteId = SasfehpHelper::obtUltimoGerenteSinc();\n return $ultimoGerenteId;\n }", "title": "" }, { "docid": "b1b3ad05e0c2905b8acbdcf66649b943", "score": "0.68549466", "text": "public function obtenerIdProveedor()\n\t\t{\n\t\t\t$sqlidProv = \" SELECT id_prov\n\t\t\t\t\t\t FROM proveedores\n\t\t\t\t\t\t ORDER BY id_prov\n\t\t\t\t\t\t DESC LIMIT 1;\";\n\t\t\t$ejecutaridProv = mysql_query($sqlidProv,$this->conexion) or die (mysql_error());\n\t\t\t$rows = mysql_num_rows($ejecutaridProv);\n\t\t\t\n\t\t\tif($rows==0){\n\t\t\t\t$idProv = 1;\n\t\t\t}else\t{\n\t\t\t\t$idProv = mysql_result($ejecutaridProv,0,'id_prov');\n\t\t\t\t$idProv = ($idProv + 1);\n\t\t\t}\n\t\t\t\n\t\t\treturn $idProv;\n\t\t}", "title": "" }, { "docid": "deef30f112d02b7b6ae2b2f35131374b", "score": "0.6846267", "text": "public function get_id();", "title": "" }, { "docid": "3f30dc2efe97d0bc814f280e5d920c26", "score": "0.6837776", "text": "public function getCreateId($basedatos) {\n\t\t\t$id = DB::table($basedatos)\n ->select(DB::raw('max(SUBSTRING(id,9,12)) as id'))\n ->get();\n\n //conversion a string y suma uno para el siguiente id\n $idsuma = (int)$id[0]->id + 1;\n\n\t\t \t//concatenar con ceros\n\t\t \t$idopcioncompleta = str_pad($idsuma, 12, \"0\", STR_PAD_LEFT); \n\t\t \t//concatenar prefijo\n\t\t \t$prefijo = DB::table('GEN.ConfiguracionLocal')\n\t\t\t->join('GEN.Local', 'GEN.ConfiguracionLocal.idLocal', '=', 'Local.Id')\n\t\t\t->get();\n\t\t\t$idopcioncompleta = $prefijo[0]->PrefijoLocal.$idopcioncompleta;\n\n\t \t\treturn $idopcioncompleta;\n\n\t }", "title": "" }, { "docid": "66e8be00afcb5b446c2b15389822dca9", "score": "0.6833846", "text": "public function obtenerId(){\n\t\treturn $this->id;\n\t}", "title": "" }, { "docid": "6d91de19dbc825dbc65d11ec1ea7a393", "score": "0.6833599", "text": "function add_proveedor($params)\n {\n $this->db->insert('proveedores',$params);\n $vuelta = $this->db->insert_id();\n return $vuelta;\n }", "title": "" }, { "docid": "1600f61455f096d0979a2344f0197e6f", "score": "0.6831854", "text": "public function getLastInsertID() : string|int;", "title": "" }, { "docid": "c476806599cd1ceda6d67cf2e76edb83", "score": "0.682588", "text": "public function insertID();", "title": "" }, { "docid": "44d97587d09a36503256339e8d6cf75d", "score": "0.681372", "text": "function GetNewId() {\n $sql = \"SELECT max(id)+1 as ID FROM prices\";\n $ret = $this->query($sql);\n return $ret[0][0]['ID'];\n }", "title": "" }, { "docid": "50252135c7524a460ac96bfb740607cf", "score": "0.6813419", "text": "public function lastInsertId();", "title": "" }, { "docid": "50252135c7524a460ac96bfb740607cf", "score": "0.6813419", "text": "public function lastInsertId();", "title": "" }, { "docid": "50252135c7524a460ac96bfb740607cf", "score": "0.6813419", "text": "public function lastInsertId();", "title": "" }, { "docid": "9d74ca9e7fe789a43b67600578f8cb24", "score": "0.68026155", "text": "function getLastInsertedId() {\n global $dbh, $schema;\n try {\n $stmt = $dbh->prepare(\"SELECT currval('$schema.centrocustos_aid_seq') as id\");\n $stmt->execute();\n // get next row as an array indexed by column name\n $result = $stmt->fetch(PDO::FETCH_ASSOC);\n return $result[\"id\"];\n }\n catch(PDOException $e) {\n $_SESSION[\"s_errors\"][\"generic\"][] = \"ERRO[26]: \".$e->getMessage();\n header(\"Location: ../principal/index.php\");\n die;\n }\n }", "title": "" }, { "docid": "5b0073bc1e6c7f39cfb00eed034f29b4", "score": "0.6800815", "text": "public function calcularId(){\n\n $registros = ValorMontoBeca::All();\n\n $max_valor = count($registros);\n\n\n if($max_valor > 0){\n\n $max_valor++;\n\n } else {\n\n $max_valor = 1;\n }\n\n return $max_valor;\n\n }", "title": "" }, { "docid": "e0cb5c9bb7046530f672947b47ccd19e", "score": "0.67990446", "text": "function crearUsuario($idUsuario, $idInstancia, $idNivel) {\n $query = new Query();\n $query->insert(\"usuarios\", \"id_usuario_instancia, id_instancia, id_nivel_educativo\", \"$idUsuario, $idInstancia, $idNivel\");\n $id = $query->ultimoID(\"usuarios\");\n\n if (isset($id)) {\n return $id;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "9d2d982663978f51d3b74325c9c1f1ac", "score": "0.67874193", "text": "public function insertGetId()\n {\n return $this->lastId;\n }", "title": "" }, { "docid": "9d2d982663978f51d3b74325c9c1f1ac", "score": "0.67874193", "text": "public function insertGetId()\n {\n return $this->lastId;\n }", "title": "" }, { "docid": "9d2d982663978f51d3b74325c9c1f1ac", "score": "0.67874193", "text": "public function insertGetId()\n {\n return $this->lastId;\n }", "title": "" }, { "docid": "9d2d982663978f51d3b74325c9c1f1ac", "score": "0.67874193", "text": "public function insertGetId()\n {\n return $this->lastId;\n }", "title": "" }, { "docid": "de154c660f561adc0dfd46b112d3b5e2", "score": "0.6781441", "text": "public function getLastInsertId();", "title": "" }, { "docid": "48a544c34e023ebe28e5caadd5260508", "score": "0.678104", "text": "public abstract function getLastInsertId();", "title": "" }, { "docid": "d701f0aebaaaf7b18b163d9e9d130d4a", "score": "0.6774663", "text": "public function getIncrementId();", "title": "" }, { "docid": "b6c9c0a2b0cd6f1a2d1b689c20cb8bae", "score": "0.6712565", "text": "function ultimoid()\r\n {\r\n return $this->mysqli->insert_id;\r\n }", "title": "" }, { "docid": "0ed897cc4239b2d74559300449cda12e", "score": "0.6706626", "text": "function newUserId (){\n //$baseDatos = file_get_contents(\"usuarios.json\");\n $array = json_decode($this->baseDatos, true);\n $ultimoUser = array_pop($array['usuarios']);\n $ultimaId = $ultimoUser['id'];\n return $ultimaId + 1;\n }", "title": "" }, { "docid": "94df811772025db02637a7ce3124f321", "score": "0.67011493", "text": "public function getLastID(){\n return mysqli_insert_id($this->conexion);\n }", "title": "" }, { "docid": "b8fce212b3d4f054e65b313f9427ffca", "score": "0.6693689", "text": "public static function getLastId()\n\t{\n return self::$spojenie->lastInsertId();\n\t}", "title": "" }, { "docid": "3b0d6d6e8022e8cbee6fc8a5271d4f3e", "score": "0.66916", "text": "public function getLastId(){\n $sql = \"SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'gotoevent' AND TABLE_NAME = 'calendars'\";\n // https://es.stackoverflow.com/questions/111980/saber-el-auto-increment-de-una-tabla-mysql-despues-de-borrarse-los-ultimos-ids\n try\n {\n $this->connection = Connection::getInstance();\n $resultSet = $this->connection->execute($sql);\n }\n catch(PDOException $e)\n {\n echo $e;\n }\n if(!empty($resultSet))\n return $resultSet['0']['AUTO_INCREMENT']; // el resultado está ahi adentro\n else\n return false;\n }", "title": "" }, { "docid": "22ff294e5e9cbf65d4d055cee74ac8be", "score": "0.66857016", "text": "public function obtenerID(){\n return $this->id;\n }", "title": "" }, { "docid": "477e9d6906ca9d47803a33ab133b422c", "score": "0.6684142", "text": "public function getLastInsertId(): string;", "title": "" }, { "docid": "3f4ba22228721bf25bfbf0976fa91c74", "score": "0.6670935", "text": "function getLastInsertedId();", "title": "" }, { "docid": "d7d56ed4c8aa27b7354e5e335590dd41", "score": "0.6654447", "text": "public function insertId()\n\t{\n\t\treturn $this->loadResult(\"SELECT LAST_INSERT_ID=@@IDENTITY\");\n\t}", "title": "" }, { "docid": "f5883b90817fc094244fce94eb6daf60", "score": "0.6638193", "text": "function regresaUltimo()\n{\n\t$xqry = mysql_query(\"SELECT LAST_INSERT_ID()\");\n\tlist($ultimo) = mysql_fetch_row($xqry);\n\t\n\treturn $ultimo;\n}", "title": "" }, { "docid": "24602efcf9c71bedbd861f2c798d0894", "score": "0.6616961", "text": "function insertId() { \n\t\treturn $this->mInsertId;\n\t}", "title": "" }, { "docid": "924c230cded6ca0de854b85a611b12ce", "score": "0.6612497", "text": "function lastId(){\n if(is_resource($this->handler)){\n switch($this->driver){\n case 'mysql':\n\tmysql_insert_id($this->handler);\n\tbreak;\n default:\n\tbreak;\n }\n }\n }", "title": "" }, { "docid": "3cb041358efd79a3508586caaa423b04", "score": "0.6611958", "text": "public function Save_a(){\n \n \n\n \n $stmt = self::$Knihy->prepare('INSERT INTO kdb_autor (jmeno, prijmeni, rok_narozeni) VALUES (:jmeno,:prijmeni,:rok_narozeni)');\n $stmt->execute(array(\n ':jmeno' => $this->jmeno,\n ':prijmeni' => $this->prijmeni,\n ':rok_narozeni' => $this->rok_narozeni,\n ));\n \n \n return self::$Knihy->lastInsertId();\n \n\n \n }", "title": "" }, { "docid": "a4339affe7a2c48140de7bb0b005c3b0", "score": "0.6588495", "text": "public function obtenerId() {\n return $this->id;\n }", "title": "" }, { "docid": "c77152fb379c6729cee3201b49e5e4b1", "score": "0.65755427", "text": "public function obtenerID() {\n return $this->id;\n }", "title": "" }, { "docid": "11cfd0d1685f4c2dd7fc845310ce5a73", "score": "0.656727", "text": "public function lastInsertId()\r\n{\r\n\treturn (($sth = $this->dbh->query('SELECT SCOPE_IDENTITY() AS id')) && ($id = $sth->fetchColumn()))\r\n\t\t? $id : parent::lastInsertId();\r\n}", "title": "" }, { "docid": "0268beb1b44bd31f1163adecc7f36c8e", "score": "0.6558359", "text": "abstract public function get_last_id();", "title": "" }, { "docid": "6be7f7256b6a4535e0135b0efe6c5b93", "score": "0.65562177", "text": "abstract public function insertId();", "title": "" }, { "docid": "3977672316c43fb5d6c51c6642ee9364", "score": "0.6544726", "text": "public static function maxid(){\n\t\t\t$sql = \"SELECT numero_licencia FROM \".self::$tablename.\" ORDER BY numero_licencia DESC LIMIT 1\";\n\t\t\t$query = Executor::doit($sql);\n\t\t\treturn Model::one($query[0],new ConstruccionData());\n\t\t}", "title": "" }, { "docid": "620e6cbadc351fc8be0251c458e8b5e2", "score": "0.6541615", "text": "function getLastinsertId (){\n return $this->pdo->lastInsertId();\n }", "title": "" }, { "docid": "741dc4bd3845e6efb31b6eb31308f979", "score": "0.6539712", "text": "function kontroliPersonon($enirnomo,$pasvorto) {\r\n\t$query = \"select id from sam_ludantoj where kromnomo='\".$enirnomo.\"' and pasvorto='\".$pasvorto.\"'\";\r\n\tmysql_select_db(\"sam\");\r\n\t$result = mysql_query($query) or die (\"INSERT : Invalid query :\".$query);\r\n\tif (mysql_num_rows($result)==0) {\r\n\t\treturn null;\r\n\t} else {\r\n\t\t$row = mysql_fetch_array($result);\r\n\t\treturn $row['id'];\r\n\t}\r\n}", "title": "" }, { "docid": "ade5d60c8ab3d7c9ae2f1d9dd068d385", "score": "0.6537761", "text": "function lastID(){\n $sqlstrLast = \"select productoid from productos order by productoid desc limit 1;\";\n $ID = array();\n $ID = obtenerUnRegistro($sqlstrLast);\n return $ID;\n }", "title": "" }, { "docid": "5364833344746c4a4d04b7f9b523bebf", "score": "0.6533807", "text": "public function insertId() {\n\t\tif (!$this->connection) return false;\n\t\t$result = @mssql_query('SELECT @@IDENTITY', $this->connection);\n\t\tif ($result === false) return false;\n\t\t$return = @mssql_result($result, 0, 0);\n\t\t@mssql_free_result($result);\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "948e33607b1cafd3e33dc2d8ae8bc047", "score": "0.65325886", "text": "public function return_id(){\n return $this->conn->lastInsertId();\n }", "title": "" }, { "docid": "9d76b1a5607a8e35b6e947bf8d4deddc", "score": "0.6532174", "text": "function cadastrandoComPdoPegandoId($filme, $preco) {\n try{\n global $id;\n $pdo = conectarComPdo($filme, $preco);\n $cadastrar = $pdo->prepare(\"INSERT INTO filmes(filme, preco) VALUES (:filme, :preco)\");\n $cadastrar->bindValue(\":filme\", $filme);\n $cadastrar->bindValue(\":preco\", $preco);\n $cadastrar->execute();\n\n if($cadastrar->rowCount() == 1):\n $id = $pdo->lastInsertId();\n return $id;\n else:\n return false;\n endif;\n\n }catch (PDOException $e){\n echo \"Erro \".$e->getMessage();\n }\n}", "title": "" }, { "docid": "930ca34cb07fafe30e59d298b1ce6207", "score": "0.65274966", "text": "public function getID();", "title": "" }, { "docid": "930ca34cb07fafe30e59d298b1ce6207", "score": "0.65274966", "text": "public function getID();", "title": "" }, { "docid": "e45ff53592ab98ba380a129e3e7dbbdd", "score": "0.65191096", "text": "public function lastInsertId(){\n return $this->rep->lastInsertId();\n }", "title": "" }, { "docid": "892fb9c235524d0253cbc643afc2cb9c", "score": "0.6513308", "text": "public function getInsertId(){\r\n \r\n sqlsrv_next_result($this->statement);\r\n sqlsrv_fetch($this->statement);\r\n return sqlsrv_get_field($this->statement, 0);\r\n }", "title": "" }, { "docid": "072f6b98189adf2081633b85ae1a6b44", "score": "0.6505186", "text": "public function getId(){\n\t\treturn static::$pdo->lastInsertId();\n\t}", "title": "" }, { "docid": "75dae59073866026cb7d59f1216a569e", "score": "0.650378", "text": "public function id() : int \n {\n return $this->pdo->lastInsertId();\n }", "title": "" }, { "docid": "c551904ad57000824e924b4bcdbc7e49", "score": "0.64931935", "text": "function saida($params)\n {\n $this->db->insert('saida_produto',$params);\n return $this->db->insert_id();\n }", "title": "" }, { "docid": "54e12d038a05a0cd130414d1f6ac9920", "score": "0.64927596", "text": "public static function calcularId()\r\n {\r\n $conexion = GimnasioBD::conectarBD();\r\n\r\n $consulta= $conexion->query(\"SELECT id from usuarios\");\r\n \r\n $max = 0;\r\n\r\n while($i=$consulta->fetchObject()->id)\r\n {\r\n //calcular el maximo\r\n if($i>$max)\r\n {\r\n $max=$i;\r\n }\r\n }\r\n return ($max + 1);\r\n }", "title": "" }, { "docid": "c77675cac6e40d4601fdaf19ddf1bd08", "score": "0.6492582", "text": "public function insertId() { return $this->driver->insertId(); }", "title": "" }, { "docid": "7cb73bc5980a78651d4cc62d246ad41e", "score": "0.64907104", "text": "public function get_id()\n {\n }", "title": "" }, { "docid": "096f51c0523df3bfd203f4bffc0b60e1", "score": "0.64879155", "text": "function insertarEjercicioAlaHoja($id_hoja, $id_ejercicio){\n $connect = new Tools();\n $conexion = $connect->connectDB();\n $orden = \"SELECT max(orden) FROM sqlab_esta_contenido WHERE id_hoja=$id_hoja;\";\n $orden = $orden + 1;\n \t$sql = \"INSERT INTO sqlab_esta_contenido(id_ejercicio,id_hoja,orden) VALUES ('\".$id_ejercicio.\"','\".$id_hoja.\"','\".$orden.\"');\";\n $consulta = mysqli_query($conexion,$sql);\n $connect->disconnectDB($conexion);\n return $consulta;\n }", "title": "" }, { "docid": "7814cd0133d5560eba0bd6b30640d1e6", "score": "0.64876354", "text": "private function getLastInsertId(){\r\n\t\treturn $this->_handle->lastInsertId();\r\n\t}", "title": "" }, { "docid": "554b2946ff9514d42c1154f9e08d7acc", "score": "0.64857644", "text": "function getLastInsertID(): string;", "title": "" }, { "docid": "6f394dd70f1df27fee65bac106cb1653", "score": "0.6481733", "text": "public function GetId()\n\t{\n\t\treturn $this->id_usuario;\n\t}", "title": "" }, { "docid": "0f781c40f3c7aba4cdbd36c4dd14dbeb", "score": "0.6478291", "text": "private function lastInsertId() {\n\t\t$this->execute(\"select SCOPE_IDENTITY() AS id\");\n\t\tif ($this->result) {\n\t\t\t$res = mssql_fetch_assoc($this->result);\n\t\t\tif ($res) {\n\t\t\t\t$id = $res['id'];\n\t\t\t\tif ($this->result) {\n\t\t\t\t\tmssql_free_result($this->result);\n\t\t\t\t}\n\t\t\t\treturn $id;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "title": "" }, { "docid": "9141c86aefbdcf73eb46aaf0a7b0d6de", "score": "0.6478226", "text": "public function getID() {}", "title": "" }, { "docid": "b04176b82e119adb126084567ade1545", "score": "0.6471565", "text": "public function getIdRegistro();", "title": "" }, { "docid": "209c0131c7a0a8c82097ac462a76ad3e", "score": "0.64705646", "text": "abstract public function get_id();", "title": "" }, { "docid": "5930c0050650f207f2927502f7fb3dc1", "score": "0.6465794", "text": "public function getSalesEntityIncrementId();", "title": "" }, { "docid": "7639be715a6efdb460375862881a54a9", "score": "0.6465352", "text": "function cadastrandoSemPdoPegandoId($filme, $preco) {\n global $id;\n $sql = \"INSERT INTO filmes (filme , preco) VALUES ('$filme', '$preco')\";\n $query = mysql_query($sql);\n\n if ($query):\n $id = mysql_insert_id();\n return $id;\n else:\n return false;\n endif;\n}", "title": "" }, { "docid": "9adc68b8625070276f6507057d5a4004", "score": "0.6445881", "text": "function getInsertId() {\n\t\treturn $this->_getInsertId('funders', 'funder_id');\n\t}", "title": "" }, { "docid": "a16c4fd18fbe84a3c85d6b696721a25b", "score": "0.6445295", "text": "public function traer_ultimo($id_usuario)\n {\n $consulta = $this->db->prepare('SELECT id_recorrido FROM recorrido WHERE id_usuario = :id AND completado = 0');\n $consulta->bindParam(':id', $id_usuario);\n $consulta->execute();\n $datos = $consulta->fetch(PDO::FETCH_ASSOC);\n if (!$datos) {\n $consulta = $this->db->prepare('INSERT INTO recorrido(id_usuario) VALUES (:id)');\n $consulta->bindParam(':id', $id_usuario);\n $consulta->execute();\n\n return $this->db->lastInsertId();\n } else {\n return $datos['id_recorrido'];\n }\n }", "title": "" }, { "docid": "b0563a769e1cf63746a5ace6baff3ef4", "score": "0.6442157", "text": "public function generatenewidStokMasuk()\n {\n \t// mengambil seluruh isi tabel\n $temp = $this->findAll();\n // mengambil row terakhir \n $last = end($temp); \n\n // jika $last kosong (jika tabel masih kosong)\n if ($last == Null){\n // mengenerate id baru dengan nilai 1\n $new_id = 1;\n }else{\n // mengenerate id baru dengan nilai id terakhir + 1\n $new_id = $last['id_stok_masuk']+1;\n }\n\n // mengembalikan nilai \n return $new_id;\n }", "title": "" }, { "docid": "446dfed05c5d517478abd75b9d883178", "score": "0.6441967", "text": "public function getLastInsertId() {\n return $this->lastInsertId; \n }", "title": "" }, { "docid": "3700f8625e79cf1fe7214d20908ef558", "score": "0.64320207", "text": "protected function getPrimaryKey()\n {\n return $this->getSubject()->getLastEntityId();\n }", "title": "" }, { "docid": "bddc46202d1801acb46fdc0a34385046", "score": "0.6431495", "text": "public function getLastId()\n {\n return $this->bdd->lastInsertId(); //returns last inserted id\n\n }", "title": "" }, { "docid": "d848e5a23dd170f9cea2a29a4d5759a5", "score": "0.64233524", "text": "public function insertarDevolverID($dato);", "title": "" }, { "docid": "69c7470ce96c44ee374e075561793bda", "score": "0.64182407", "text": "final public function insertId() { return $this->db_handle->lastInsertId(); }", "title": "" }, { "docid": "9755ddd334685234efe1d970800a9754", "score": "0.6413407", "text": "function insertGetId($data){\n\t\t\n\t\t$this->db->insert($this->_table,$data);\n\n\t\tif($this->db->affected_rows() > 0){\n\n\t\t\t$this->db->select('max('.$this->_primary_key.') as id');\n\t\t\t//we use Username because it is Unique\n\t\t\t$query = $this->db->get($this->_table);\n\t\t\t$id = $query->result_array();\n\t\t\treturn $id[0]['id'];\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "1d65a1944a50be5233a7277f19cc9904", "score": "0.64130914", "text": "public function ObtenerId()\n\t{\n\t\treturn $this->Id;\n\t}", "title": "" }, { "docid": "e9a7210c95197c104a5e908dadbee2ca", "score": "0.6410282", "text": "static function LastId()\n {\n return Model::$sqli->insert_id;\n }", "title": "" }, { "docid": "b84df5eae4417198e492088e1b35bb18", "score": "0.6402312", "text": "public function getID(){\n return $this -> idProdotto;\n }", "title": "" }, { "docid": "e2432d0d6602e2fb9c9a684b6db1ac81", "score": "0.64012027", "text": "public function lastInsert(){\n\n\n\n\t\t$id = 0;\n\n\n\n\t\tswitch ($this->motor)\n\n\n\n\t\t{\n\n\n\n\t\t\tcase 'mysql':\n\n\n\n\t\t\t\t$id = $this->DB->lastInsertId();\n\n\n\n\t\t\tbreak;\n\n\n\n\t\t}\n\n\n\n\t\treturn $id;\n\n\n\n\t}", "title": "" }, { "docid": "a11fac14405688e04ff4c9caf2b82627", "score": "0.63955605", "text": "public function id()\n {\n return $this->lastInsertId;\n }", "title": "" }, { "docid": "1063a4831a70e351e0f28c5b0f7fedd4", "score": "0.6392725", "text": "protected function newId() {\n return self::$DB->lastInsertId();\n }", "title": "" }, { "docid": "9e0e6ba02c0c2c18506d618d21676784", "score": "0.6390403", "text": "public function lastID(){\n\t\t$lastID = $this->datab->lastInsertId(); \n\t\treturn $lastID;\n\t}", "title": "" }, { "docid": "5acfcde85da7cb1aeb8cb2986ff4a709", "score": "0.6386154", "text": "function add($objeto){\r\n $sql = 'INSERT INTO contacto(id, nombre) VALUES (null , :nombre)';\r\n $params = array(\r\n 'nombre' => $objeto->getNombre()\r\n );\r\n $res = $this->database->execute($sql , $params);\r\n \r\n if($res){\r\n $id = $this->database->getId();\r\n $objeto->setId($id);\r\n }else{\r\n $id = 0;\r\n }\r\n \r\n return $id;\r\n }", "title": "" }, { "docid": "921cef8342447c7509ed4b61adc188e1", "score": "0.63858885", "text": "function otherpageKategori_CreateID( $tbl_otherpagekategori ){\n\t\t$sql = mysql_query(\"SELECT * FROM $tbl_otherpagekategori ORDER BY id DESC\"); \n\t\t$data =\tmysql_fetch_array($sql);\n\t\t$UID = $data[\"id\"];\n\t\t$UID = $UID+1; \n\t\treturn $UID;\n\t}", "title": "" } ]
b446424d7e2b3c28b52562d9da68555e
Contains the current and the staged representation of the product information.
[ { "docid": "52b71261d013e959955c30c072226675", "score": "0.0", "text": "public function getMasterData()\n {\n if (is_null($this->masterData)) {\n /** @psalm-var stdClass|array<string, mixed>|null $data */\n $data = $this->raw(self::FIELD_MASTER_DATA);\n if (is_null($data)) {\n return null;\n }\n\n $this->masterData = ProductCatalogDataModel::of($data);\n }\n\n return $this->masterData;\n }", "title": "" } ]
[ { "docid": "936b6948a30d89c7e96f1e17ae65244f", "score": "0.6885265", "text": "protected function _getBaseInfo()\n\t{\n\t\treturn array(\n\t\t\t'SKU' => $this->product->seller_sku,\n\t\t\t'StandardProductID' =>array(\n\t\t\t\t'Type' => $this->product->standard_product_id_type,\n\t\t\t\t'Value' => $this->product->standard_product_id,\n\t\t\t),\n\n\t\t\t'GtinExemptionReason' => $this->product->gtin_exemption_reason,\n\n\t\t\t'RelatedProductID' => array(\n\t\t\t\t'Type' => $this->product->related_product_id_type,\n\t\t\t\t'Value' => $this->product->related_product_id,\n\t\t\t),\n\n\t\t\t'ProductTaxCode' => $this->product->product_tax_code,\n\n\t\t\t'LaunchDate' => $this->product->launch_date,\n\t\t\t'DiscontinueDate' => $this->product->discontinue_date,\n\t\t\t'ReleaseDate' => $this->product->release_date,\n\t\t\t'ExternalProductUrl' => $this->product->external_product_url,\n\t\t\t'OffAmazonChannel' => $this->product->offamazon_channel,\n\t\t\t'OnAmazonChannel' => $this->product->on_amazon_channel,\n\n\t\t\t'Condition' => array(\n\t\t\t\t'ConditionType' => $this->product->condition_type,\n\t\t\t\t'ConditionNote' => $this->product->condition_note,\n\t\t\t),\n\n\t\t\t'Rebate' => array(\n\t\t\t\t0 => array(\n\t\t\t\t\t'RebateStartDate' => $this->product->rebate['RebateStartDate'],\n\t\t\t\t\t'RebateEndDate' => $this->product->rebate['RebateEndDate'],\n\t\t\t\t\t'RebateMessage' => $this->product->rebate['RebateMessage'],\n\t\t\t\t\t'RebateName' => $this->product->rebate['RebateName'],\n\t\t\t\t),\n\t\t\t), \n\n\t\t\t'ItemPackageQuantity' => 1,\n\t\t\t'NumberOfItems' => $this->product->number_of_items,\n\n\t\t\t'LiquidVolume' => array(\n\t\t\t\t'@unitOfMeasure' => $this->product->liquid_volumey_type,\n\t\t\t\t'%' => $this->product->liquid_volumey,\n\t\t\t),\n\n\t\t\t'DescriptionData' => array(\n\t\t\t\t'Title' => $this->descinfo->title,\n\t\t\t\t'Brand' => $this->description->brand,\n\t\t\t\t'Designer' => $this->description->designer,\n\t\t\t\t'#Description' => strip_tags($this->descinfo->description,'<b><p><br/><br>'),\n\n\t\t\t\t'BulletPoint' => array(\n\t\t\t\t\t$this->descinfo->bullet_point1,\n\t\t\t\t\t$this->descinfo->bullet_point2,\n\t\t\t\t\t$this->descinfo->bullet_point3,\n\t\t\t\t\t$this->descinfo->bullet_point4,\n\t\t\t\t\t$this->descinfo->bullet_point5,\n\t\t\t\t),\n\n\t\t\t\t'ItemDimensions' => array(\n\t\t\t\t\t'Length' => array(\n\t\t\t\t\t\t\t'@unitOfMeasure' => 'CM',\n\t\t\t\t\t\t\t'%' => $this->description->item_dimensions['Length'],\n\t\t\t\t\t\t),\n\t\t\t\t\t'Width' => array(\n\t\t\t\t\t\t\t'@unitOfMeasure' => 'CM',\n\t\t\t\t\t\t\t'%' => $this->description->item_dimensions['Width'],\n\t\t\t\t\t\t),\n\t\t\t\t\t'Height' => array(\n\t\t\t\t\t\t\t'@unitOfMeasure' => 'CM',\n\t\t\t\t\t\t\t'%' => $this->description->item_dimensions['Height'],\n\t\t\t\t\t\t),\n\t\t\t\t\t'Weight' => array(\n\t\t\t\t\t\t\t'@unitOfMeasure' => 'KG',\n\t\t\t\t\t\t\t'%' => $this->description->item_dimensions['Weight'],\n\t\t\t\t\t\t),\n\t\t\t\t),\n\n\t\t\t\t'PackageDimensions' => array(\n\t\t\t\t\t'Length' => array(\n\t\t\t\t\t\t\t'@unitOfMeasure' => 'CM',\n\t\t\t\t\t\t\t'%' => $this->description->package_dimensions['Length'],\n\t\t\t\t\t\t),\n\t\t\t\t\t'Width' => array(\n\t\t\t\t\t\t\t'@unitOfMeasure' => 'CM',\n\t\t\t\t\t\t\t'%' => $this->description->package_dimensions['Width'],\n\t\t\t\t\t\t),\n\t\t\t\t\t'Height' => array(\n\t\t\t\t\t\t\t'@unitOfMeasure' => 'CM',\n\t\t\t\t\t\t\t'%' => $this->description->package_dimensions['Height'],\n\t\t\t\t\t\t),\n\t\t\t\t\t'Weight' => array(\n\t\t\t\t\t\t\t'@unitOfMeasure' => 'KG',\n\t\t\t\t\t\t\t'%' => $this->description->package_dimensions['Weight'],\n\t\t\t\t\t\t),\n\t\t\t\t),\n\n\t\t\t\t'PackageWeight' => array(\n\t\t\t\t\t'@unitOfMeasure' => $this->description->package_weight['unitOfMeasure'],\n\t\t\t\t\t'%' => $this->description->package_weight['Value'],\n\t\t\t\t),\n\n\t\t\t\t'ShippingWeight' => array(\n\t\t\t\t\t'@unitOfMeasure' => $this->description->shipping_weight['unitOfMeasure'],\n\t\t\t\t\t'%' => $this->description->shipping_weight['Value'],\n\t\t\t\t),\n\n\t\t\t\t'MerchantCatalogNumber' => $this->description->merchant_catalog_number,\n\n\t\t\t\t'MSRP' => array(\n\t\t\t\t\t'@currency' => $this->description->msrp_type,\n\t\t\t\t\t'%' => $this->description->msrp,\n\t\t\t\t),\n\n\t\t\t\t'MSRPWithTax' => array(\n\t\t\t\t\t'@currency' => $this->description->msrp_with_tax_type,\n\t\t\t\t\t'%' => $this->description->msrp_with_tax,\n\t\t\t\t),\n\n\t\t\t\t'MaxOrderQuantity' => $this->description->max_order_quantity,\n\n\t\t\t\t'SerialNumberRequired' => $this->description->serial_number_required,\n\n\t\t\t\t'Prop65' => $this->description->prop65,\n\n\t\t\t\t'CPSIAWarning' => $this->description->CPSIAWarning,\n\n\t\t\t\t'CPSIAWarningDescription' => $this->description->CPSIAWarning_description,\n\n\t\t\t\t'LegalDisclaimer' => $this->description->legal_disclaimer,\n\n\t\t\t\t'Manufacturer' => $this->description->manufacture,\n\n\t\t\t\t'MfrPartNumber' => $this->description->mfr_partnumber,\n\n\t\t\t\t'SearchTerms' => $this->descinfo->keywords,//explode(',', $this->descinfo->keywords),\n\n\t\t\t\t'PlatinumKeywords' => explode(',', $this->description->platinum_keywords),\n\n\t\t\t\t'Memorabilia' => $this->description->memorabilia,\n\n\t\t\t\t'Autographed' => $this->description->autographed,\n\n\t\t\t\t'UsedFor' => $this->description->used_for,\n\n\t\t\t\t'ItemType' => $this->description->item_type,\n\n\t\t\t\t'OtherItemAttributes' => $this->description->other_item_attributes,\n\n\t\t\t\t'TargetAudience' => $this->description->target_audience,\n\n\t\t\t\t'SubjectContent' => $this->description->subject_content,\n\n\t\t\t\t'IsGiftWrapAvailable' => $this->description->is_gift_wrap_available,\n\n\t\t\t\t'IsGiftMessageAvailable' => $this->description->is_gift_message_available,\n\n\t\t\t\t'PromotionKeywords' => explode(',', $this->description->promotion_keywords),\n\n\t\t\t\t'IsDiscontinuedByManufacturer' => $this->description->is_discontinued_by_manufacturer,\n\n\t\t\t\t'DeliveryScheduleGroupID' => $this->description->delivery_schedule_group_id,\n\n\t\t\t\t'DeliveryChannel' => $this->description->delivery_channel,\n\n\t\t\t\t'PurchasingChannel' => $this->description->purchasing_channel,\n\n\t\t\t\t'MaxAggregateShipQuantity' => $this->description->max_aggregate_ship_quantity,\n\n\t\t\t\t'IsCustomizable' => $this->description->is_customizable,\n\n\t\t\t\t'CustomizableTemplateName' => $this->description->customizable_template_name,\n\n\t\t\t\t'RecommendedBrowseNode' => $this->product->btg_node,\n\n\t\t\t\t'MerchantShippingGroupName' => $this->description->merchant_shipping_group_name,\n\n\t\t\t\t'FEDAS_ID' => $this->description->FEDAS_ID,\n\n\t\t\t\t'TSDAgeWarning' => $this->description->TSD_age_warning,\n\n\t\t\t\t'TSDWarning' => $this->description->TSD_warning,\n\n\t\t\t\t'TSDLanguage' => $this->description->TSD_language,\n\n\t\t\t\t'OptionalPaymentTypeExclusion' => $this->description->optional_payment_type_exclusion,\n\n\t\t\t\t'DistributionDesignation' => $this->description->distribution_designation,\n\t\t\t),\n\n\t\t\t'PromoTag' => array(\n\t\t\t\t'PromoTagType' => $this->product->promo_tag_type,\n\t\t\t\t'EffectiveFromDate' => $this->product->effective_from_date,\n\t\t\t\t'EffectiveThroughDate' => $this->product->effective_through_date,\n\t\t\t),\n\n\t\t\t'DiscoveryData' => array(\n\t\t\t\t'Priority' => $this->product->priority,\n\t\t\t\t'BrowseExclusion' => $this->product->browse_exclusion,\n\t\t\t\t'RecommendationExclusion' => $this->product->recommendation_exclusion,\n\t\t\t),\n\n\t\t\t'ProductData' => 'xxx', //占位\n\t\t);\n\t}", "title": "" }, { "docid": "6ea71f89a2a4e069c610253d68545b7c", "score": "0.66180927", "text": "private function allProductExtraInfo()\n {\n $product = $this->product ? $this->product : $this;\n\n $productTypeInstance = $product->getTypeInstance();\n\n return [\n /* grouped product */\n $this->mergeWhen(\n $productTypeInstance instanceof \\Webkul\\Product\\Type\\Grouped,\n $product->type == 'grouped'\n ? $this->getGroupedProductInfo($product)\n : null\n ),\n\n /* bundle product */\n $this->mergeWhen(\n $productTypeInstance instanceof \\Webkul\\Product\\Type\\Bundle,\n $product->type == 'bundle'\n ? $this->getBundleProductInfo($product)\n : null\n ),\n\n /* configurable product */\n $this->mergeWhen(\n $productTypeInstance instanceof \\Webkul\\Product\\Type\\Configurable,\n $product->type == 'configurable'\n ? $this->getConfigurableProductInfo($product)\n : null\n ),\n\n /* downloadable product */\n $this->mergeWhen(\n $productTypeInstance instanceof \\Webkul\\Product\\Type\\Downloadable,\n $product->type == 'downloadable'\n ? $this->getDownloadableProductInfo($product)\n : null\n ),\n\n /* booking product */\n $this->mergeWhen(\n $product->type == 'booking',\n $product->type == 'booking'\n ? $this->getBookingProductInfo($product)\n : null\n ),\n ];\n }", "title": "" }, { "docid": "7a8ad3278c7cf727ed8a362c8141f0f6", "score": "0.650339", "text": "public function getDealInfo()\n {\n $this->highlights = explode(\"\\n\", $this->getProduct()->getHighlights());\n $this->fineprint = explode(\"\\n\", $this->getProduct()->getFinePrint());\n $_productCollection = Mage::getResourceModel('reports/product_collection')\n ->addOrderedQty()\n ->addAttributeToFilter('entity_id', $this->getProduct()->getId())\n ->setOrder('ordered_qty', 'desc')\n ->getFirstItem();\n $this->ordered_qty = (int)$_productCollection->ordered_qty;\n }", "title": "" }, { "docid": "6f4b0b3c2eb7758a800ecb5d6df31cb6", "score": "0.6476218", "text": "public function propertyInfo() {\n\n /*\n Table: commerce_product\n Columns:\n product_id\tint(10) UN PK AI\n revision_id\tint(10) UN\n sku\tvarchar(255)\n title\tvarchar(255)\n type\tvarchar(255)\n language\tvarchar(32)\n uid\tint(11)\n status\ttinyint(4)\n created\tint(11)\n changed\tint(11)\n data\tlongblob\n */\n\n return array(\n 'sku' => array(\n 'type' => 'text',\n 'label' => t('Product SKU'),\n ),\n 'title' => array( // This is the product description you find in orders\n 'type' => 'text',\n 'label' => t('Title'),\n ),\n 'price_amount' => array( // Price in hundredths (pence, cents, ...)\n 'type' => 'int',\n 'label' => t('Price amount'),\n ),\n 'price_currency' => array( // Currency the price is expressed in\n 'type' => 'text',\n 'label' => t('Price currency'),\n ),\n 'tid' => array( // Many of our products are related to a track\n 'type' => 'int',\n 'label' => t('Track node id'),\n ),\n );\n }", "title": "" }, { "docid": "5fae1f29cb2f521fd2a40e11921cfbd1", "score": "0.6424974", "text": "private function get_structured_product_data() {\n\t\t$data = array(\n\t\t\t'@context' => 'http://schema.org/',\n\t\t\t\"@graph\" => $this->get_product_data()\n\t\t);\n\n\t\treturn $this->get_product_data() ? $data : array();\n\t}", "title": "" }, { "docid": "de4d70ad4b8a539859a47cae7eb41064", "score": "0.6274519", "text": "public function getCurrentProduct(){\n return Mage::registry('current_product');\n }", "title": "" }, { "docid": "466ce488bb58c58a34be5f5fab4d79f2", "score": "0.6265299", "text": "public static function getProductSummary()\n {\n $summary = array();\n return $summary;\n\n }", "title": "" }, { "docid": "7457fd934a31a48dc3a8a1f8685c3633", "score": "0.6238296", "text": "public function getProduct()\n {\n return Mage::registry('current_product');\n }", "title": "" }, { "docid": "7457fd934a31a48dc3a8a1f8685c3633", "score": "0.6238296", "text": "public function getProduct()\n {\n return Mage::registry('current_product');\n }", "title": "" }, { "docid": "7457fd934a31a48dc3a8a1f8685c3633", "score": "0.6238296", "text": "public function getProduct()\n {\n return Mage::registry('current_product');\n }", "title": "" }, { "docid": "a89e5f528844e2eb21b476011408219b", "score": "0.6213988", "text": "protected function setProductDataLayer() {\n if($this->fullActionName === 'catalog_product_view') {\n $productId = $this->catalogSession->getData('last_viewed_product_id');\n if ($productId) {\n $_product = $this->productFactory->create()->load($productId);\n if ($_product->getId()) {\n $this->addVariable('list', 'detail');\n\n $product = [];\n $product['id'] = $_product->getId();\n $product['sku'] = $_product->getSku();\n $product['name'] = $_product->getName();\n // $this->addVariable('productPrice', $_product->getPrice());\n\n /**\n * @mod: Adding of imageUrl and price.\n */\n $product['image_url'] = $this->_imageHelper->init($_product, 'product_base_image')->setImageFile($_product->getImage())->getUrl();\n $product['price'] = floatval($_product->getFinalPrice());\n $product['tags'] = $this->getProductCategoryNames($_product);\n\n $this->addVariable('product', $product);\n }\n }\n }\n\n return $this;\n }", "title": "" }, { "docid": "1fa23ec33d4a6826747159c31079bb33", "score": "0.62026805", "text": "public function productDetails();", "title": "" }, { "docid": "d9fb76aeffd3ad2cedc1888583e649e6", "score": "0.6183764", "text": "public abstract function getProductDetails();", "title": "" }, { "docid": "89a21d220cb95c6476ba8fa5984e7396", "score": "0.61291116", "text": "public function getDetailProduct()\n {\n // array assgin product detail\n $product_detail = array();\n // new object product\n $obj_product = new Product($this->id_product, false, Context::getContext()->language->id);\n // assign id_urbit_rate_config to array\n $product_detail['id_urbit_rate_config'] = $this->id;\n // assgin product name to array\n $product_detail['product_name'] = $obj_product->name;\n // assgin id product to array\n $product_detail['product_id'] = $this->id_product;\n // assgin pickup_type_code to array\n $product_detail['pickup_type_code'] = $this->pickup_type_code;\n // assgin type to array\n $product_detail['type'] = $this->type;\n // assgin additional_charges to array\n $product_detail['additional_charges'] = $this->additional_charges;\n //get severice of product\n $services = $this->getDetailIdRateServiceCode();\n // assgin severice to array\n $product_detail['services'] = $services;\n // return product detail\n return $product_detail;\n }", "title": "" }, { "docid": "8dd952589593cdbe11592015161d5281", "score": "0.6122916", "text": "public function getJsonTrackingData()\n {\n try {\n // Get the product\n $product = $this->_registry->registry('current_product');\n if (!$product instanceof Product) {\n return false;\n }\n\n $id = $product->getId();\n $store = $this->_storeManagerInterface->getStore();\n $js_api_key = $this->_configHelper->getJsApiKey();\n\n $name = $product->getName();\n $product_url = $product->getProductUrl();\n $product_sku = $product->getSku();\n\n if ($product->getData(\"type_id\") === Configurable::TYPE_CODE) {\n $parent = $product;\n $productTypeInstance = $product->getTypeInstance();\n $usedProducts = $productTypeInstance->getUsedProducts($product);\n foreach ($usedProducts as $child) {\n $product_saleprice = $this->_priceHelper->getKlevuSalePrice($parent, $child, $store);\n $product_sale_price = $product_saleprice['salePrice'];\n }\n } else {\n $parent = null;\n $product_saleprice = $this->_priceHelper->getKlevuSalePrice($parent, $product, $store);\n $product_sale_price = $product_saleprice['salePrice'];\n }\n //Sending the parent or child product id\n $klevu_productGroupId = $product->getId();\n $klevu_productVariantId = $product->getId();\n\n $rating = $product->getDataUsingMethod(Rating::ATTRIBUTE_CODE);\n $product = [\n 'klevu_apiKey' => $js_api_key,\n 'klevu_productId' => $id,\n 'klevu_productName' => $name,\n 'klevu_productUrl' => $product_url,\n 'klevu_productSku' => $product_sku,\n 'klevu_salePrice' => $product_sale_price,\n 'klevu_productRatings' => is_numeric($rating)\n ? $this->convertToRatingStar((float)$rating)\n : null,\n 'klevu_productGroupId' => $klevu_productGroupId,\n 'klevu_productVariantId' => $klevu_productVariantId,\n ];\n\n return json_encode($product);\n } catch (\\Exception $e) {\n $this->_searchHelperData->log(\n LoggerConstants::ZEND_LOG_CRIT,\n sprintf(\"Exception thrown in %s::%s - %s\", __CLASS__, __METHOD__, $e->getMessage())\n );\n }\n\n return null;\n }", "title": "" }, { "docid": "1b3de7aa1934bf2eb4f9cbb6d96aac78", "score": "0.61224025", "text": "public function getProductInfo()\r\n {\r\n if(isset($this->product) && !empty($this->product)) $productInfo[] = $this->product;\r\n if(isset($this->manufacturer->manufacturer) && !empty($this->manufacturer->manufacturer)) $productInfo[] = $this->manufacturer->manufacturer;\r\n if(isset($this->article) && !empty($this->article)) $productInfo[] = $this->article;\r\n return implode(', ', $productInfo);\r\n }", "title": "" }, { "docid": "7dba0be7ea1e41ae8f89c1377510bbe0", "score": "0.6119638", "text": "public function getProductAdditionalInformationBlock()\n {\n return $this->getLayout()->getBlock('additional.product.info');\n }", "title": "" }, { "docid": "c9307d83a0839e7fb98c7cfe968f63fe", "score": "0.61088", "text": "public function getProduct()\n {\n return $this->_coreRegistry->registry('current_product');\n }", "title": "" }, { "docid": "767fa2e97be1a1df74b656cca160bf4c", "score": "0.6104501", "text": "public function product()\n {\n return $this->_product;\n }", "title": "" }, { "docid": "1add839d2acd04605ec0d257df5c1a0d", "score": "0.60875684", "text": "protected function _getProduct()\n {\n return Mage::registry('current_product');\n }", "title": "" }, { "docid": "1add839d2acd04605ec0d257df5c1a0d", "score": "0.60875684", "text": "protected function _getProduct()\n {\n return Mage::registry('current_product');\n }", "title": "" }, { "docid": "bd871a7fc49b513406a40759fc461f36", "score": "0.60418504", "text": "function getProduct()\n {\n return $this->product;\n }", "title": "" }, { "docid": "6457eea11a55299f073297cf83030108", "score": "0.6027172", "text": "public function getProductInfo() {\n $sql = \"(SELECT product.productID, product.productName, product.price, product.discountprice, product.img, brand.brandName, category.categoryName, category.categoryID, COALESCE((100-product.discountprice) * product.price / 100, 0) AS discountRate FROM product \n LEFT JOIN brand ON product.brandID = brand.brandID\n LEFT JOIN category ON product.categoryID = category.categoryID) AS allproduct \";\n \n return $sql;\n }", "title": "" }, { "docid": "631110798ec518f2a2a04fc5055b2aa5", "score": "0.60101306", "text": "public function getJsonTrackingData()\n {\n // Get the product\n $product = $this->_registry->registry('current_product');\n $id = $product->getId();\n $store = $this->_storeManagerInterface->getStore();\n $js_api_key = $this->_configHelper->getJsApiKey();\n\n $name = $product->getName();\n $product_url = $product->getProductUrl();\n $product_sku = $product->getSku();\n\n if ($product->getData(\"type_id\") == \\Magento\\ConfigurableProduct\\Model\\Product\\Type\\Configurable::TYPE_CODE) {\n $parent = $product;\n $productTypeInstance = $product->getTypeInstance();\n $usedProducts = $productTypeInstance->getUsedProducts($product);\n foreach ($usedProducts as $child) {\n $product_saleprice = $this->_priceHelper->getKlevuSalePrice($parent, $child, $store);\n $product_sale_price = $product_saleprice['salePrice'];\n\n }\n } else {\n $parent = null;\n $product_saleprice = $this->_priceHelper->getKlevuSalePrice($parent, $product, $store);\n $product_sale_price = $product_saleprice['salePrice'];\n }\n\n $product = [\n 'klevu_apiKey' => $js_api_key,\n 'klevu_productId' => $id,\n 'klevu_productName' => $name,\n 'klevu_productUrl' => $product_url,\n 'klevu_productSku' => $product_sku,\n 'klevu_salePrice' => $product_sale_price,\n\t\t\t'klevu_productRatings' => $this->convertToRatingStar($product->getRating())\n //'klevu_shopperIP' => $this->_searchHelperData->getIp(),\n //'klevu_loginCustomerEmail' => $this->_customerSession->getCustomer()->getEmail(),\n //'klevu_sessionId' => md5(session_id())\n ];\n return json_encode($product);\n }", "title": "" }, { "docid": "e4294001fe85130ad03ea757d00f8a7e", "score": "0.5983974", "text": "public function getProduct() {\n return $this->product;\n }", "title": "" }, { "docid": "86ec48ff0b67c56084c5628907543780", "score": "0.59799564", "text": "public function getProduct()\n {\n return $this->product;\n }", "title": "" }, { "docid": "86ec48ff0b67c56084c5628907543780", "score": "0.59799564", "text": "public function getProduct()\n {\n return $this->product;\n }", "title": "" }, { "docid": "86ec48ff0b67c56084c5628907543780", "score": "0.59799564", "text": "public function getProduct()\n {\n return $this->product;\n }", "title": "" }, { "docid": "86ec48ff0b67c56084c5628907543780", "score": "0.59799564", "text": "public function getProduct()\n {\n return $this->product;\n }", "title": "" }, { "docid": "86ec48ff0b67c56084c5628907543780", "score": "0.59799564", "text": "public function getProduct()\n {\n return $this->product;\n }", "title": "" }, { "docid": "86ec48ff0b67c56084c5628907543780", "score": "0.59799564", "text": "public function getProduct()\n {\n return $this->product;\n }", "title": "" }, { "docid": "6da212c2522a4e393ba665fa55bb7a8b", "score": "0.5970391", "text": "public function product(){\n\t\treturn parent::product();\n\t}", "title": "" }, { "docid": "1d4b747855ce509280e36a5fcb15c57c", "score": "0.5903909", "text": "public function getProductStockInformation()\n {\n $stockSelect = $this->adapter->select()\n ->from(\n ['c_s_i' => $this->adapter->getTableName($this->_prefix . 'cataloginventory_stock_item')],\n array('entity_id' => 'product_id', 'value'=>'is_in_stock')\n );\n\n $childrenSelect = $this->adapter->select()\n ->from(\n ['c_p_r' => $this->adapter->getTableName($this->_prefix . 'catalog_product_relation')],\n ['c_p_r.child_id']\n )\n ->joinLeft(\n ['c_p_e' => $this->adapter->getTableName($this->_prefix . 'catalog_product_entity')],\n 'c_p_e.entity_id = c_p_r.parent_id',\n ['c_p_e.entity_id']\n )\n ->join(['t_d' => new \\Zend_Db_Expr(\"( \". $stockSelect->__toString() . ' )')],\n 't_d.entity_id = c_p_r.child_id',\n ['t_d.value']\n )\n ->where('t_d.value = ?', Mage_CatalogInventory_Model_Stock::STOCK_IN_STOCK);\n\n $parentSelect = $this->adapter->select()\n ->from(\n ['c_p_r' => $this->adapter->getTableName($this->_prefix . 'catalog_product_relation')],\n ['c_p_r.parent_id', 'entity_id' => 'c_p_r.child_id']\n )\n ->joinLeft(['t_d' => new \\Zend_Db_Expr(\"( \". $stockSelect->__toString() . ' )')],\n 't_d.entity_id = c_p_r.parent_id',\n ['t_d.value']\n )\n ->where('t_d.value = ?', Mage_CatalogInventory_Model_Stock::STOCK_IN_STOCK);\n\n $childCountSql = $this->adapter->select()\n ->from(\n [\"child_select\"=> new \\Zend_Db_Expr(\"( \". $childrenSelect->__toString() . ' )')],\n [\"child_count\" => new \\Zend_Db_Expr(\"COUNT(child_select.child_id)\"), 'entity_id']\n )\n ->group(\"child_select.entity_id\");\n\n $parentCountSql = $this->adapter->select()\n ->from(\n [\"parent_select\"=> new \\Zend_Db_Expr(\"( \". $parentSelect->__toString() . ' )')],\n [\"parent_count\" => new \\Zend_Db_Expr(\"COUNT(parent_select.parent_id)\"), 'entity_id']\n )\n ->group(\"parent_select.entity_id\");\n\n $select = $this->adapter->select()\n ->from(\n ['c_s_i' => $this->adapter->getTableName($this->_prefix . 'cataloginventory_stock_item')],\n array('entity_id' => 'product_id', 'qty', 'is_in_stock')\n )\n ->joinLeft(\n ['c_p_e' => $this->adapter->getTableName($this->_prefix . 'catalog_product_entity')],\n 'c_p_e.entity_id = c_s_i.product_id',\n ['c_p_e.type_id']\n )\n ->joinLeft(\n ['c_p_r' => $this->adapter->getTableName($this->_prefix . 'catalog_product_relation')],\n 'c_s_i.product_id = c_p_r.child_id',\n ['c_p_r.parent_id']\n );\n\n if($this->isDelta)$select->where('product_id IN(?)', $this->exportIds);\n\n $configurableType = Mage_Catalog_Model_Product_Type_Configurable::TYPE_CODE;\n $groupedType = Mage_Catalog_Model_Product_Type_Grouped::TYPE_CODE;\n $finalSelect = $this->adapter->select()\n ->from(\n [\"entity_select\" => new \\Zend_Db_Expr(\"( \". $select->__toString() . \" )\")],\n [\n \"entity_select.entity_id\",\n \"entity_select.qty\",\n \"is_in_stock\" => new \\Zend_Db_Expr(\"\n (CASE \n WHEN (entity_select.type_id = '{$configurableType}' OR entity_select.type_id = '{$groupedType}') AND entity_select.is_in_stock = '1' THEN IF(child_count.child_count > 0, 1, 0)\n WHEN entity_select.parent_id IS NOT NULL AND entity_select.is_in_stock = '1' THEN IF(parent_stock.parent_count > 0, 1, 0)\n ELSE entity_select.is_in_stock\n END\n )\"\n )\n ]\n )\n\n ->joinLeft(\n [\"child_count\"=> new \\Zend_Db_Expr(\"( \". $childCountSql->__toString() . \" )\")],\n \"child_count.entity_id = entity_select.entity_id\",\n []\n )\n ->joinLeft(\n [\"parent_stock\"=> new \\Zend_Db_Expr(\"( \". $parentCountSql->__toString() . \" )\")],\n \"parent_stock.entity_id = entity_select.entity_id\",\n []\n );\n\n return $this->adapter->fetchAll($finalSelect);\n }", "title": "" }, { "docid": "8262d7418bbdec352ebe858e0f74816f", "score": "0.58993906", "text": "public function addProductInfo()\n {\n $this->getSelect()->joinLeft(\n array('product_table' => $this->getTable('storelocator/location_product')),\n 'main_table.entity_id = product_table.entity_id',\n array()\n );\n\n return $this;\n }", "title": "" }, { "docid": "7c9eb966a767a1134502d8c8be62ba0a", "score": "0.58872163", "text": "public function __toString()\n {\n return $this->getProduct();\n }", "title": "" }, { "docid": "5a37591b93ba31b2bedac4cc30bafb29", "score": "0.5872599", "text": "public function getProduct()\n {\n return $this->_product;\n }", "title": "" }, { "docid": "93228cb6e5c05e18d080c07e203170b8", "score": "0.5866728", "text": "public function show(Product $product)\n {\n return $product->load('info');\n }", "title": "" }, { "docid": "e422fc0cce790b085bf5d71193e2b032", "score": "0.585463", "text": "public function getProductAttributes()\n {\n return $this->_productAttributes;\n }", "title": "" }, { "docid": "ba9a745c86336260cd03fd77eb45788b", "score": "0.5840341", "text": "public function getProduct()\n {\n $result='';\n if($this->hwl){\n $result.= parent::openBlock(); // calls the parent method to open the block\n $result.= parent::getProduct(); // general product's logic\n $result.= \"<span>{$this->hwl}</span>\"; // adds own type\n $result.= parent::closeBlock(); // calls the parent method to close the block\n }\n return $result;\n }", "title": "" }, { "docid": "fc1c1a0f0817e6e8ae2b5cd9142cfab3", "score": "0.58372647", "text": "public function product_info()\n {\n return $this->hasOne(Product::class, 'id', 'product_id');\n }", "title": "" }, { "docid": "bff7c033f6a4319285f8a0e657a58c1e", "score": "0.5820793", "text": "public function actionGetProductDetail() {\n $purifier = Purifier::getInstance();\n $product = $purifier->purify(Yii::app()->request->getParam('product'));\n $json['error'] = true;\n if ($product) {\n $productData = InventoriesExtend::getProductById($product);\n $stock = InventoriesExtend::getStockByWharehouse($product);\n $json['data'] = $this->renderPartial('_product_detail_tabs', ['product' => $productData, 'stock' => $stock], true);\n $json['error'] = false;\n }\n\n echo CJSON::encode($json);\n\n Yii::app()->end();\n }", "title": "" }, { "docid": "74e7b7c710c48f1155f9746b824356f8", "score": "0.5795833", "text": "function yp_product_data_property_info($name = NULL) {\n // Build an array of basic property information for the product field.\n $properties = array(\n 'product_source' => array(\n 'label' => t('Product activity type'),\n 'options list' => '_yp_product_activity_options_list',\n 'type' => 'integer',\n ),\n 'product' => array(\n 'label' => t('Product term name'),\n 'type' => 'taxonomy_term',\n ),\n );\n\n // Add the default values for each of the yp_product field properties.\n foreach ($properties as $key => &$value) {\n $value += array(\n 'description' => !empty($name) ? t('!label of field %name', array('!label' => $value['label'], '%name' => $name)) : '',\n 'getter callback' => 'entity_property_verbatim_get',\n 'setter callback' => 'entity_property_verbatim_set',\n );\n }\n\n return $properties;\n}", "title": "" }, { "docid": "959620fd1f3c77b0046def5540c2bb05", "score": "0.57614255", "text": "private function getConfigurableProductInfo($product)\n {\n $super_attribute_codes = $product->super_attributes->pluck('code');\n\n foreach ($product->variants as $key => $variant) {\n $super_attribute_map = [];\n foreach ($super_attribute_codes as $attribute_code) {\n if ( isset($variant[$attribute_code]) ) {\n $super_attribute_map[$attribute_code] = $variant[$attribute_code];\n }\n }\n\n $product->variants[$key]['map'] = $super_attribute_map;\n }\n \n return [\n 'variants' => $product->variants\n ];\n }", "title": "" }, { "docid": "d6284f82aaceea8e357c611c4501859a", "score": "0.57564527", "text": "public function getProductData ()\n {\n // use\n //$this->request->getParams(); // all params\n $id = $this->request->getParam ( 'param' );\n $product = $this->_product->create ()->load ( $id );\n return $product;\n\n }", "title": "" }, { "docid": "7c50a2696931201718d6efdbbdb51440", "score": "0.5751987", "text": "protected function read_product_data( &$module ) {\n\t\t/*$id = $product->get_id();\n\n\t\tif ( '' === ( $review_count = get_post_meta( $id, '_wc_review_count', true ) ) ) {\n\t\t\tWC_Comments::get_review_count_for_product( $product );\n\t\t} else {\n\t\t\t$product->set_review_count( $review_count );\n\t\t}\n\n\t\tif ( '' === ( $rating_counts = get_post_meta( $id, '_wc_rating_count', true ) ) ) {\n\t\t\tWC_Comments::get_rating_counts_for_product( $product );\n\t\t} else {\n\t\t\t$product->set_rating_counts( $rating_counts );\n\t\t}\n\n\t\tif ( '' === ( $average_rating = get_post_meta( $id, '_wc_average_rating', true ) ) ) {\n\t\t\tWC_Comments::get_average_rating_for_product( $product );\n\t\t} else {\n\t\t\t$product->set_average_rating( $average_rating );\n\t\t}\n\n\t\t$product->set_props( array(\n\t\t\t'sku' => get_post_meta( $id, '_sku', true ),\n\t\t\t'regular_price' => get_post_meta( $id, '_regular_price', true ),\n\t\t\t'sale_price' => get_post_meta( $id, '_sale_price', true ),\n\t\t\t'price' => get_post_meta( $id, '_price', true ),\n\t\t\t'date_on_sale_from' => get_post_meta( $id, '_sale_price_dates_from', true ),\n\t\t\t'date_on_sale_to' => get_post_meta( $id, '_sale_price_dates_to', true ),\n\t\t\t'total_sales' => get_post_meta( $id, 'total_sales', true ),\n\t\t\t'tax_status' => get_post_meta( $id, '_tax_status', true ),\n\t\t\t'tax_class' => get_post_meta( $id, '_tax_class', true ),\n\t\t\t'manage_stock' => get_post_meta( $id, '_manage_stock', true ),\n\t\t\t'stock_quantity' => get_post_meta( $id, '_stock', true ),\n\t\t\t'stock_status' => get_post_meta( $id, '_stock_status', true ),\n\t\t\t'backorders' => get_post_meta( $id, '_backorders', true ),\n\t\t\t'sold_individually' => get_post_meta( $id, '_sold_individually', true ),\n\t\t\t'weight' => get_post_meta( $id, '_weight', true ),\n\t\t\t'length' => get_post_meta( $id, '_length', true ),\n\t\t\t'width' => get_post_meta( $id, '_width', true ),\n\t\t\t'height' => get_post_meta( $id, '_height', true ),\n\t\t\t'upsell_ids' => get_post_meta( $id, '_upsell_ids', true ),\n\t\t\t'cross_sell_ids' => get_post_meta( $id, '_crosssell_ids', true ),\n\t\t\t'purchase_note' => get_post_meta( $id, '_purchase_note', true ),\n\t\t\t'default_attributes' => get_post_meta( $id, '_default_attributes', true ),\n\t\t\t'category_ids' => $this->get_term_ids( $product, 'product_cat' ),\n\t\t\t'tag_ids' => $this->get_term_ids( $product, 'product_tag' ),\n\t\t\t'shipping_class_id' => current( $this->get_term_ids( $product, 'product_shipping_class' ) ),\n\t\t\t'virtual' => get_post_meta( $id, '_virtual', true ),\n\t\t\t'downloadable' => get_post_meta( $id, '_downloadable', true ),\n\t\t\t'gallery_image_ids' => array_filter( explode( ',', get_post_meta( $id, '_product_image_gallery', true ) ) ),\n\t\t\t'download_limit' => get_post_meta( $id, '_download_limit', true ),\n\t\t\t'download_expiry' => get_post_meta( $id, '_download_expiry', true ),\n\t\t\t'image_id' => get_post_thumbnail_id( $id ),\n\t\t) );*/\n\t}", "title": "" }, { "docid": "2f2c5be5fa43e374155fd7aa8ac566a3", "score": "0.5727881", "text": "public function productDetails($product_id)\t{\n if($this->config->get('module_marketplace_status')){\n $details = $this->db->query(\"SELECT pd.name, p.image, CONCAT(c.firstname, ' ', c.lastname) as vendor_name, c.email FROM \" . DB_PREFIX . \"product p LEFT JOIN \" . DB_PREFIX . \"product_description pd ON (p.product_id = pd.product_id) LEFT JOIN \" . DB_PREFIX . \"customerpartner_to_product c2p ON (p.product_id = c2p.product_id) LEFT JOIN \" . DB_PREFIX . \"customer c ON (c2p.customer_id = c.customer_id) WHERE p.product_id = '\" . $product_id . \"'\")->row;\n } else {\n $details = $this->db->query(\"SELECT pd.name, p.image, p.product_id FROM \" . DB_PREFIX . \"product p LEFT JOIN \" . DB_PREFIX . \"product_description pd ON (p.product_id = pd.product_id) WHERE p.product_id = '\" . $product_id . \"'\")->row;\n $details['vendor_name'] = $this->config->get('config_name');\n $details['email'] = $this->config->get('config_email');\n }\n\n \t\treturn $details;\n }", "title": "" }, { "docid": "b82485ef07c0b815e21cf981e6092b1a", "score": "0.5725646", "text": "private function getAttributesAndVariants(): void\n {\n $this->attributes = cache()->rememberForever(\n \"product_detail_attributes_{$this->product->slug}\",\n function () {\n return AttributeValue::select('name', 'code', 'attribute_id')\n ->with(['attribute' => fn ($query) => $query->select('id', 'name')])\n ->whereHas('variants', fn ($query) => $query->whereProductId($this->product->id))\n ->get()\n ->groupBy('attribute_id')\n ->map(fn ($item, $key) => collect([\n 'id' => $key,\n 'name' => $item->first()->attribute->name,\n 'values' => $item,\n ]))\n ->toArray();\n }\n );\n\n // get all variants with attributeValues\n $this->variants = cache()->rememberForever(\n \"product_detail_variants_{$this->product->slug}\",\n function () {\n return $this->product->variants()->with('attributeValues')->get()\n ->map(function ($variant) {\n return [\n 'combination' => $variant->combination,\n 'values' => $variant->attributeValues->map(fn ($value) => [\n 'code' => $value->code,\n 'attribute_id' => $value->attribute_id\n ]),\n ];\n })\n ->toArray();\n }\n );\n }", "title": "" }, { "docid": "a98d2776b85353f831c381cbb89803ea", "score": "0.57192284", "text": "protected function saveState() {\n $arr=array();\n foreach($this->toArray() as $product) {\n $arr[$product->id]=$product->getQuantity();\n }\n Yii::app()->user->setState(__CLASS__, $arr);\n }", "title": "" }, { "docid": "012af051429c8d62d28ccaee28d1d73e", "score": "0.57165706", "text": "public static function getCurrentProductRow()\n {\n Channels::includeSystem('GUI');\n $currProduct = SquizSuite::getProduct();\n\n $typeC = str_replace(' ', '', $currProduct['type']);\n $typeIcon = '<div class=\"SquizSuiteScreen-productIconWrap '.$typeC.'\">&nbsp;</div>';\n\n // Name of the product.\n $name = '<strong>'._('Name').'</strong>&nbsp;&nbsp;';\n $name .= '<span class=\"SquizSuiteScreen-currentPrductNameDesc\">('._('this name will appear in all connected products').')</span><br />';\n $name .= GUI::createWidget(\n 'squizSuite-currProductName',\n 'GUITextBox',\n array(\n 'value' => $currProduct['connection']['name'],\n 'size' => 50,\n )\n );\n\n // URL of the product.\n $url = '<strong>'._('URL').'</strong>&nbsp;&nbsp;';\n $url .= '<span class=\"SquizSuiteScreen-currentPrductNameDesc\">('._('this URL is required to add a new product').')</span><br />';\n $url .= GUI::createWidget(\n 'squizSuite-currProductURL',\n 'GUITextBox',\n array(\n 'value' => $currProduct['connection']['url'],\n 'size' => 50,\n )\n );\n\n // Product summary information.\n $summary = '<strong>'._('Summary').'</strong><br /><div class=\"SquizSuiteScreen-summaryWrap\">';\n $productSummary = SquizSuite::getProductSummary();\n foreach ($productSummary as $field) {\n $summary .= '<span class=\"SquizSuiteScreen-summaryLabel\">'._($field['label']).'</span>';\n $summary .= '<span class=\"SquizSuiteScreen-summaryValue\">'._($field['value']).'</span>';\n }\n\n $summary .= '</div>';\n\n $rows = array();\n $rows[] = array(\n 'currTypeIcon' => $typeIcon,\n 'currName' => $name.$url,\n 'currStatusIcon' => '&nbsp;',\n 'currSummary' => $summary,\n );\n\n return $rows;\n\n }", "title": "" }, { "docid": "9660084b7d6826babac53d7701e2b62a", "score": "0.5715862", "text": "public function Get()\n {\n return self::$ProductArray[self::$CurrentProductName];\n }", "title": "" }, { "docid": "adbb3dcb2d7a0e4ab222885477d1ea89", "score": "0.57133436", "text": "public function getProduct()\n { \n\t\treturn Mage::registry('product');\n }", "title": "" }, { "docid": "bb297ce3d1545d12aa1542c3177be282", "score": "0.57068807", "text": "public function getProduct();", "title": "" }, { "docid": "51295f42abef2f6bce8d3f4215c3aa73", "score": "0.5677858", "text": "public function getProduct()\n {\n return Mage::registry('product');\n }", "title": "" }, { "docid": "dde860968fa80ada7859dff7c6e2b00a", "score": "0.56613755", "text": "public function getBIInfo()\n {\n $data = [];\n //BI information\n $productModel = Mage::getModel('catalog/product');\n $data['products'] = [];\n $attributes = Mage::getResourceModel('catalog/product_attribute_collection')\n ->getItems();\n foreach ($attributes as $attribute) {\n $data['attributes'][] = $attribute->getData();\n }\n $productCollection = $productModel->getCollection()\n ->addAttributeToSelect('price')\n ->addAttributeToSelect('name')\n ->addAttributeToSelect('image')\n ->addAttributeToSelect('url_path')\n ->addAttributeToSelect('status')\n ->addAttributeToSelect('visibility')\n ->addAttributeToSelect('is_salable')\n ->addAttributeToSelect('is_in_stock');\n $products = $productCollection->getItems();\n foreach ($products as $product) {\n $productData = $product->getData();\n unset($productData['stock_item']);\n $data['products'][] = $productData;\n }\n\n\n $categoryModel = Mage::getModel('catalog/category');\n $categories = $categoryModel->getCollection()->getItems();\n foreach ($categories as $category) {\n $categoryData = [];\n $categoryData['id'] = $category['entity_id'];\n $categoryData['parent_id'] = $category['parent_id'];\n $categoryData['created_at'] = $category['created_at'];\n $categoryData['updated_at'] = $category['updated_at'];\n $categoryData['position'] = $category['position'];\n $categoryData['path'] = $category['path'];\n $data['categories'][] = $categoryData;\n }\n\n $bestsellers = Mage::getResourceModel('sales/report_bestsellers_collection')->getItems();\n for ($i=0;$i<2;$i++) {\n $data['bestsellers'][] = $bestsellers[$i]->getData();\n }\n\n $fromDate = date('Y-m-d H:i:s', strtotime(time()-26*60*60)); //yesterday's midnight\n $toDate = date('Y-m-d H:i:s', strtotime(time()-2*60*60)); //trying to get midnight from supposed time of running\n $orders = Mage::getModel('sales/order')->getCollection()\n ->addAttributeToFilter('created_at', array('from'=>$fromDate, 'to'=>$toDate))\n ->addAttributeToFilter('status', array('eq' => Mage_Sales_Model_Order::STATE_COMPLETE));\n $ordersCount = $orders->getSize();\n $data['orders'] = [];\n if ($ordersCount > 0) {\n $price = 0;\n $median = [];\n $data['orders']['qty'] = $ordersCount;\n foreach ($orders->getItems() as $item) {\n $dataItem = $item->getData();\n $price += $dataItem['grand_total'];\n $median[] = $price;\n }\n $median[] = 650;\n $data['orders']['average'] = $price/$ordersCount;\n rsort($median);\n $middle = intval(round(count($median) / 2));\n $data['orders']['median'] = $median[$middle-1];\n }\n\n return $data;\n }", "title": "" }, { "docid": "32422b23a0f5d7de5cea61e59d5fe8d5", "score": "0.56594193", "text": "function get_product_info($product_id = 0)\n\t{\n\t\t$res = $this->product_model->get_product_info($product_id);\n\t\techo json_encode($res);\n\t}", "title": "" }, { "docid": "2e44789bad33da1c5bfbd00cf1b000d4", "score": "0.5649758", "text": "public function output_structured_data() {\n\t\t$data = $this->get_structured_product_data();\n\t\tif ( $data ) {\n\t\t\techo '<script type=\"application/ld+json\">' . wp_json_encode( $data ) . '</script>' . \"\\n\";\n\t\t}\n\t\t$gallery_data = $this->get_structured_image_data();\n\t\tif ( $gallery_data ) {\n\t\t\techo '<script type=\"application/ld+json\">' . wp_json_encode( $gallery_data ) . '</script>' . \"\\n\";\n\t\t}\n\t\t$post_data = $this->get_structured_post_data();\n\t\tif ( $post_data ) {\n\t\t\techo '<script type=\"application/ld+json\">' . wp_json_encode( $post_data ) . '</script>' . \"\\n\";\n\t\t}\n\t}", "title": "" }, { "docid": "7597afedf5da0348d2141270cb397dbe", "score": "0.56423527", "text": "private function getBundleProductInfo($product)\n {\n return [\n 'currency_options' => core()->getAccountJsSymbols(),\n 'bundle_options' => app('Webkul\\Product\\Helpers\\BundleOption')->getBundleConfig($product)\n ];\n }", "title": "" }, { "docid": "08e8582b965c7f01f94b5caabb7d5265", "score": "0.5624862", "text": "protected function setProductCurrentStock(&$product){\n if(JeproshopSettingModelSetting::getValue('advanced_stock_management') && (int)$product->advanced_stock_management == 1\t&& (int)$product->warehouse_id > 0){\n $product->current_stock = JeproshopStockManagerFactory::getManager()->getProductPhysicalQuantities($product->product_id, $product->product_attribute_id, (int)$product->warehouse_id, true);\n }else{\n $product->current_stock = JeproshopStockAvailableModelStockAvailable::getQuantityAvailableByProduct($product->product_id, $product->product_attribute_id, (int)$this->shop_id);\n }\n }", "title": "" }, { "docid": "9fa6aed4cf148a7f7e25adb02981f8be", "score": "0.5621006", "text": "private function get_product_data( $product ) {\n $tags = wp_get_post_terms( $product->id, 'product_tag', array( 'fields' => 'names' ) );\n return [\n 'handle' => $product->get_permalink(),\n 'title' => $product->get_title(),\n 'type' => $product->product_type,\n 'ref_id' => (int) $product->is_type( 'variation' ) ? $product->get_variation_id() : $product->id,\n 'vendor' => '',\n 'published_at' => $product->is_visible() ? beeketing_format_datetime( $product->get_post_data()->post_date_gmt ): null,\n 'out_stock' => !$product->is_in_stock(),\n 'image_source_url' => beeketing_get_product_images( $product )[0]['src'],\n 'price' => $product->get_price(),\n 'price_compare' => $product->get_sale_price() ? $product->get_sale_price() : null,\n 'tags' => $tags ? implode( ', ', $tags ) : null,\n 'variants' => [],\n ];\n }", "title": "" }, { "docid": "f205c55103f97e56dca41d9c7f07b6ee", "score": "0.5616922", "text": "public function __toString() {\n return 'name: ' . $this -> name . '<br>'\n . 'location: ' . $this -> location . '<br>'\n . 'products: ' . count($this -> products);\n }", "title": "" }, { "docid": "3823928832f897a6f91904c2bae5a89c", "score": "0.56091315", "text": "function _getProductsInfo() {\n global $order;\n if (sizeof($order->products)==0) {\n }\n $strRet = '';\n $pluschar = '';\n foreach($order->products as $products) {\n if (!empty($strRet)) { $pluschar = ', '; }\n $strRet.= $pluschar . $products['name'];\n }\n\n return substr($strRet, 0 , 255);\n }", "title": "" }, { "docid": "a0b5c206a9b280ff86445551ecc70758", "score": "0.56086606", "text": "public function woo_add_product_data_fields() {\r\n \r\n\t\t$screen = get_current_screen();\r\n\t\t\r\n\t\tif (\r\n\t\t\t$screen->parent_file == 'edit.php?post_type=product' || \r\n\t\t\t$screen->post_type == 'product'\r\n\t\t) {\r\n\t\t\t\r\n\t\t\tglobal $wpdb, $lumise;\r\n\t\t\t\r\n\t \t$id = get_the_ID();\r\n\t \t$ops = array();\r\n\t \t$js_cfg = array();\r\n\t\t\t\r\n\t $ops['lumise_product_base'] = get_post_meta($id, 'lumise_product_base', true );\r\n\t $ops['lumise_design_template'] = get_post_meta($id, 'lumise_design_template', true );\r\n\t $ops['lumise_customize'] = get_post_meta($id, 'lumise_customize', true );\r\n\t $ops['lumise_disable_add_cart'] = get_post_meta($id, 'lumise_disable_add_cart', true );\r\n\t\t\t\t\r\n \tif (!empty($ops['lumise_product_base'])) {\r\n\t \t\r\n\t \t$query = \"SELECT `name`,`stages`,`attributes` FROM `{$lumise->db->prefix}products` WHERE `id`={$ops['lumise_product_base']}\";\r\n\t \t$data = $wpdb->get_results($query);\r\n\t \t\r\n\t \tif (isset($data[0]) && isset($data[0]->stages)) {\r\n\t\t \t\r\n\t\t \t$color = $lumise->lib->get_color($data[0]->attributes);\r\n\t\t \t\r\n\t\t \t$js_cfg['current_data'] = array(\r\n\t\t\t\t\t\t'id' => $ops['lumise_product_base'],\r\n\t\t\t\t\t\t'name' => $data[0]->name,\r\n\t\t\t\t\t\t'color' => $color,\r\n\t\t\t\t\t\t'stages' => $data[0]->stages,\r\n\t\t\t\t\t\t'attributes' => $data[0]->attributes,\r\n\t\t\t\t\t);\r\n\t\t\t\t\t\r\n\t\t\t\t\t$stage = $lumise->lib->dejson($data[0]->stages);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (isset($stage) && isset($stage->front) && isset($stage->front->label) && !empty($stage->front->label))\r\n\t\t\t\t\t\t$js_cfg['_front'] = rawurldecode($stage->front->label);\r\n\t\t\t\t\tif (isset($stage) && isset($stage->back) && isset($stage->back->label) && !empty($stage->back->label))\r\n\t\t\t\t\t\t$js_cfg['_back'] = rawurldecode($stage->back->label);\r\n\t\t\t\t\tif (isset($stage) && isset($stage->left) && isset($stage->left->label) && !empty($stage->left->label))\r\n\t\t\t\t\t\t$js_cfg['_left'] = rawurldecode($stage->left->label);\r\n\t\t\t\t\tif (isset($stage) && isset($stage->right) && isset($stage->right->label) && !empty($stage->right->label))\r\n\t\t\t\t\t\t$js_cfg['_right'] = rawurldecode($stage->right->label);\r\n\t \t}\r\n \t}\r\n\t\t\t\r\n\t\t\tif (!empty($ops['lumise_design_template'])) {\r\n\t \t\r\n\t \t$designs = json_decode(rawurldecode($ops['lumise_design_template']));\r\n\t \t\r\n\t \tforeach($designs as $s => $d) {\r\n\t\t \t\r\n\t\t \tif (!isset($d->id))\r\n\t\t \t\tcontinue; \r\n\t\t \t\t\r\n\t\t \t$data = $wpdb->get_results(\"SELECT `name`,`screenshot` FROM `{$lumise->db->prefix}templates` WHERE `id`=\".$d->id);\r\n\t\t \tif (isset($data[0]))\r\n\t\t\t \t$designs->{$s}->screenshot = $data[0]->screenshot;\r\n\t\t\t else unset($designs->{$s});\r\n\t\t\t \r\n\t \t}\r\n\t \t\r\n\t \t$js_cfg['current_design'] = $designs;\r\n\t \t\r\n \t}\r\n \t\r\n\t\t\tlumise_cms_product_data_fields($ops, $js_cfg, $id);\r\n\t\t\techo '<script type=\"text/javascript\" src=\"'.esc_url(LW()->plugin_url() . '/assets/js/admin/woo_product.js?version='. LUMISE).'\"></script>';\r\n\t\t\r\n\t\t}\r\n\t\t\r\n }", "title": "" }, { "docid": "6877932192ace5e713cbcd1b55009392", "score": "0.5598911", "text": "function getProdDesc(){\r\n\t\t\t\treturn $this->ProdDesc;\r\n\t\t\t}", "title": "" }, { "docid": "b9e573d1d44e9b4e60dba311b8831427", "score": "0.55927426", "text": "public function getProduct()\n {\n return $this->coreRegistry->registry('product');\n }", "title": "" }, { "docid": "cdaadcddb9bbc230a51d8b6e76beb3f0", "score": "0.559236", "text": "public function product_details_post() {\n $product_id = $this -> post('product_id') ? $this -> post('product_id') : \"\";\n $retailer_id = $this -> post('retailer_id') ? $this -> post('retailer_id') : \"\";\n $store_id = $this -> post('store_id') ? $this -> post('store_id') : \"\";\n $store_type_id = $this -> post('store_type_id') ? $this -> post('store_type_id') : \"\";\n $user_id = $this -> post('user_id') ? $this -> post('user_id') : \"\";\n $special_id = (int) $this -> post('special_id') ? (int) $this -> post('special_id') : 0;\n $device_type = $this -> post('device_type') ? $this -> post('device_type') : \"\"; //W - Web, A - Android, I - I phone\n $device_type = $device_type != '' ? $device_type : \"A\";\n $lat = $this->post('latitude') ? $this->post('latitude') : \"\";\n $long= $this->post('longitude') ? $this->post('longitude') : \"\";\n \n $views = $this -> productmodel -> get_product_views($product_id);\n $views = $views['count'] ? number_shorten($views['count'], 2) : 0;\n $shares = $this -> productmodel -> get_product_shares($product_id);\n $shares = $shares['count'] ? number_shorten($shares['count'], 2) : 0;\n\n $product = $this -> productmodel -> product_details($product_id, $retailer_id, $user_id, $special_id);\n\n if ($product) {\n $front_url = front_url();\n if (strpos($front_url, 'http://www.') === FALSE) {\n $front_url = str_replace('http://', 'http://www.', $front_url);\n }\n \n switch ($device_type) {\n case \"A\":\n $pageUrl = PLAY_STORE_URL;\n break;\n case \"I\":\n $pageUrl = APP_STORE_URL;\n break;\n case \"W\":\n $pageUrl = $front_url . 'productdetails/' . urlencode(encode_per($product['ProductName'])) . '/' . $this -> encrypt -> encode($product['Id']);\n break;\n default:\n $pageUrl = PLAY_STORE_URL;\n }\n //$product['PageUrl'] = $pageUrl; \n \n $product['PageUrl'] = $front_url . 'productdetails/' . urlencode(encode_per($product['ProductName'])) . '/' . $this -> encrypt -> encode($product['Id']); \n $product['AppStoreUrl'] = APP_STORE_URL;\n $product['PlayStoreUrl'] = PLAY_STORE_URL;\n \n if ($product['ProductImage'])\n $product['ProductImage'] = (front_url() . PRODUCT_IMAGE_PATH . \"medium/\" . $product['ProductImage']);\n else\n $product['ProductImage'] = (front_url() . PRODUCT_IMAGE_PATH . \"medium/\" . DEFAULT_PRODUCT_IMAGE_NAME);\n\n # Check if product is favourite for the user\n $is_favorite = $this -> productmodel ->is_product_favorite($user_id, $product_id, $special_id);\n $product['is_favorite'] = $is_favorite;\n \n # Combo Products fpr Special Product \n if($product_id > 0 && $special_id > 0)\n {\n $comboProductName = '';\n $combo_products = $this -> productmodel ->get_combo_products($product_id, $special_id);\n if($combo_products)\n { \n foreach($combo_products as $comboProduct)\n {\n $comboProductName = $comboProductName .\" + \".$comboProduct['Quantity'].\" x \".$comboProduct['ComboProductName']; \n }\n \n $productName = $product['SpecialQty'].\" x \".$product['ProductName'].$comboProductName;\n \n $product['ProductName'] = $productName; \n $product['combo_deal'] = \"1\";\n }else{\n $product['combo_deal'] = \"0\";\n }\n }else{\n $product['combo_deal'] = \"0\";\n }\n \n if ($product['wish_lists'] != NULL && $product['wish_lists'] != 0) {\n $product['wish_lists'] = \"1\";\n }\n else {\n $product['wish_lists'] = \"0\";\n }\n\n if ($product['avg_rating'] == NULL) {\n $product['avg_rating'] = \"0\";\n }\n\n if ($product['price_alert'] != NULL) {\n $product['price_alert'] = \"1\";\n }else {\n $product['price_alert'] = \"0\";\n }\n $price_value = $product['store_price'];\n $product['save_percent'] = \"\";\n $product['save_value'] = \"\";\n if (($product['SpecialQty'] == NULL || $product['SpecialQty'] == 0) && ($product['SpecialPrice'] == NULL || $product['SpecialPrice'] == 0)) {\n $product['SpecialQty'] = \"0\";\n $product['SpecialPrice'] = \"0\";\n }\n else {\n $price_value = $product['SpecialPrice'];\n $one_price = $product['SpecialPrice'];\n if ($product['SpecialQty'] > 1) {\n $one_price = $product['SpecialPrice'] / $product['SpecialQty'];\n }\n $product['save_percent'] = round(100 - (($one_price / $product['store_price']) * 100)) . '%';\n $product['save_value'] = round(($product['store_price']*$product['SpecialQty']) - ($one_price*$product['SpecialQty']), 2);\n $save_arr = explode('.', $product['save_value']);\n if (!isset($save_arr[1])) {\n $product['save_value'] = $product['save_value'] . '.00';\n }\n else{\n if(strlen($save_arr[1]) < 2){\n $product['save_value'] = $save_arr[0].'.'.$save_arr[1].'0';\n }\n }\n }\n\n $product['shares'] = $shares;\n $product['views'] = $views;\n \n # Get Reviews for the product\n $allReviews = $this -> reviewmodel -> get_products_all_reviews($product_id);\n \n # Get Reviews for the product\n $reviews = $this -> reviewmodel -> get_product_reviews($product_id);\n\n //Convert the time to time ago for reviews\n $i = 0;\n $is_review_added = 0;\n foreach ($reviews as $review) {\n if ($review['CreatedOn'])\n $reviews[$i]['CreatedOn'] = humanTiming(strtotime($review['CreatedOn'])) . \" ago\";\n\n if ($review['ProfileImage'])\n $reviews[$i]['ProfileImage'] = (front_url() . USER_IMAGE_PATH . 'medium/' . $review['ProfileImage']);\n else\n $reviews[$i]['ProfileImage'] = (front_url() . DEFAULT_USER_IMAGE_PATH);\n\n //To check if review added by user.\n\n if ($review['UserId'] == $user_id)\n $is_review_added = 1;\n\n $i++;\n }\n\n $lat = \"\";\n $long = \"\";\n $prefDistance = 0;\n\n $user_details = $this -> productmodel ->get_user_details($user_id);\n if($user_details)\n {\n $lat = $user_details['PrefLatitude'];\n $long = $user_details['PrefLongitude'];\n $prefDistance = $user_details['PrefDistance'];\n }\n \n $counter_data = array(\n 'ProductId' => $product_id,\n 'UserId' => $user_id,\n 'RetailerId' => $retailer_id,\n 'StoreId' => $this -> post('store_id')\n );\n //Increase the product view counter\n $this -> productmodel -> add_product_view($counter_data);\n\n $retArr['status'] = SUCCESS;\n $retArr['product'] = array($product);\n $retArr['is_review_added'] = ($is_review_added);\n $retArr['reviews'] = ($reviews);\n $retArr['allReviews'] = ($allReviews);\n $retArr['related_products'] = $this -> _related_products($product_id, $retailer_id, $store_type_id, $store_id, $user_id, $device_type);\n $retArr['store_details'] = $this -> _get_product_store($user_id, $store_id, $retailer_id);\n //$retArr['basket_count'] = $this -> basketmodel -> get_basket_count($user_id);\n $retArr['basket_count'] = $this -> basketmodel -> get_user_basket_count($user_id,$retailer_id,$store_id);\n \n $this -> response($retArr, 200); // 200 being the HTTP response code\n die;\n }\n else {\n $retArr['status'] = FAIL;\n $retArr['message'] = \"No product found\";\n $this -> response($retArr, 200); // 200 being the HTTP response code\n die;\n }\n }", "title": "" }, { "docid": "3cacce1b28267bf86b0b047f0ce35095", "score": "0.55920315", "text": "protected function _set_product_attributes() {\n\t\t\n\t\t$this->product_attributes = $this->_raw_response->productdetail\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->softhardproductdetails[1][0]\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->productvariants\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->prodlist[1][0]\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->product[1][0]\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->attnames[1][0]\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->attname[1];\n\t\t\n\t\t$this->_set_product_attr_values();\n\t}", "title": "" }, { "docid": "e6348f503311ea076afbeaf0cbd505f5", "score": "0.5586027", "text": "public function getProductInfoInTable()\n {\n $productValues = array();\n\n $tableRowNames = $this->getColumnNamesAndNumbers();\n $productLine = $this->_getControlXpath('pageelement', 'product_line');\n\n $productCount = $this->getXpathCount($productLine);\n for ($i = 1; $i <= $productCount; $i++) {\n foreach ($tableRowNames as $key => $value) {\n $xpathValue = $productLine . \"[$i]//td[$value]\";\n if ($key == 'qty' && $this->isElementPresent($xpathValue . '/input/@value')) {\n $productValues['product_' . $i][$key] = $this->getAttribute($xpathValue . '/input/@value');\n } else {\n $text = $this->getText($xpathValue);\n if (preg_match('/Excl. Tax/', $text)) {\n $text = preg_replace(\"/ \\\\n/\", ':', $text);\n $values = explode(':', $text);\n $values = array_map('trim', $values);\n foreach ($values as $k => $v) {\n if ($v == 'Excl. Tax' && isset($values[$k + 1])) {\n $productValues['product_' . $i][$key . '_excl_tax'] = $values[$k + 1];\n }\n if ($v == 'Incl. Tax' && isset($values[$k + 1])) {\n $productValues['product_' . $i][$key . '_incl_tax'] = $values[$k + 1];\n }\n }\n } elseif (preg_match('/Ordered/', $text)) {\n $values = explode(' ', $text);\n $values = array_map('trim', $values);\n foreach ($values as $k => $v) {\n if ($k % 2 != 0 && isset($values[$k - 1])) {\n $productValues['product_' . $i][$key . '_'\n . strtolower(preg_replace('#[^0-9a-z]+#i', '', $values[$k - 1]))] = $v;\n }\n }\n } else {\n $productValues['product_' . $i][$key] = trim($text);\n }\n }\n }\n }\n\n foreach ($productValues as $key => &$productData) {\n $productData = array_diff($productData, array(''));\n foreach ($productData as $fieldName => &$fieldValue) {\n if (preg_match('/([\\d]+\\.[\\d]+)|([\\d]+)/', $fieldValue)) {\n preg_match_all('/^-?.?([\\d]+\\.[\\d]+(\\%)?)|([\\d]+(\\%)?)/', $fieldValue, $price);\n $fieldValue = $price[0][0];\n }\n if (preg_match('/SKU:/', $fieldValue)) {\n $fieldValue = substr($fieldValue, 0, strpos($fieldValue, ':') - 3);\n }\n }\n }\n\n return $productValues;\n }", "title": "" }, { "docid": "cd5bafe8d03691661487d2ae9967ad13", "score": "0.5586001", "text": "function storefront_woocommerce_init_structured_data() {\r\n if (!is_product_category())\r\n return;\r\n global $product;\r\n\r\n $json['@type'] = 'Product';\r\n $json['name'] = get_the_title();\r\n $json['image'] = wp_get_attachment_url($product->get_image_id());\r\n $json['description'] = get_the_excerpt();\r\n $json['sku'] = $product->get_sku();\r\n $json['brand'] = array(\r\n '@type' => 'Thing',\r\n 'name' => $product->get_attribute(__('brand', 'storefront'))\r\n );\r\n if ($product->get_rating_count()) {\r\n $json['aggregateRating'] = array(\r\n '@type' => 'AggregateRating',\r\n 'ratingValue' => $product->get_average_rating(),\r\n 'reviewCount' => $product->get_rating_count()\r\n );\r\n }\r\n $json['offers'] = array(\r\n '@type' => 'Offer',\r\n 'priceCurrency' => get_woocommerce_currency(),\r\n 'price' => $product->get_price(),\r\n 'itemCondition' => 'http://schema.org/NewCondition',\r\n 'availability' => 'http://schema.org/' . $stock = ( $product->is_in_stock ? 'InStock' : 'OutOfStock' ),\r\n 'seller' => array(\r\n '@type' => 'Organization',\r\n 'name' => get_bloginfo('name')\r\n )\r\n );\r\n if (!isset($json))\r\n return;\r\n Storefront::set_structured_data(apply_filters('storefront_woocommerce_structured_data', $json));\r\n }", "title": "" }, { "docid": "1732f13c45fbec5a802cad28a08662c9", "score": "0.55786", "text": "public function getStaged()\n {\n return $this->staged;\n }", "title": "" }, { "docid": "dc32b98804044c67414a0302e766e9c9", "score": "0.55700964", "text": "public function getFullProductData(Mage_Catalog_Model_Product $item) {\n $imageUrl = $this->_imageBaseUrl . $item->getImage();\n\n $isParent = 0;\n if ($item->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE) {\n $isParent = 1;\n }\n\n $parentId = null;\n if ($item->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_SIMPLE) {\n $parentId = Mage::getModel('catalog/product_type_configurable')->getParentIdsByChild($item->getId());\n $parentId = (is_array($parentId) && !empty($parentId)) ? $parentId[0] : null;\n }\n\n $configurableAttributes = array();\n if($parentId && isset($this->_variationThemes[$parentId])) {\n $configurableAttributes = $this->_variationThemes[$parentId];\n } else if($isParent && $parentId === null) {\n $configurableAttributes = $this->_getConfigurableAttributes($item->getId());\n $configurableAttributes = (!empty($configurableAttributes)) ? implode('|', $configurableAttributes) : '';\n $this->_variationThemes[$item->getId()] = $configurableAttributes;\n }\n\n $colorText = ($this->_eavEntity->getAttribute('color')) ? $item->getAttributeText('color') : '';\n\n // set the value to the minimal price if the current product is a bundle, otherwise the product's price\n $calcPrice = ($item->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_BUNDLE) ? Mage::getModel('bundle/product_price')->getTotalPrices($item, 'min', true, false) : $item->getPrice();\n\n $rulePrice = Mage::getModel('catalogrule/rule')->calcProductPriceRule($item->setStoreId($this->_storeId),$calcPrice);\n $price = ($rulePrice) ? $rulePrice : $calcPrice;\n\n $product = $this->_blankProduct;\n\n $product['entity_id'] = $item->getId();\n $product['sku'] = $item->getSku();\n $product['parent_id'] = $parentId;\n $product['variationTheme'] = $configurableAttributes;\n $product['name'] = $this->_getCleanedStringForXml($item->getName());\n $product['description'] = $this->_getCleanedStringForXml($item->getDescription());\n\n $product['price'] = $price;\n if($this->_currencyChange) {\n $product['price'] = round($product['price']*$this->_currencyChange, 2);\n }\n\n $product['categories'] = $this->_getCategoryInformation($item);\n if($this->_eavEntity->getAttribute('manufacturer')) {\n $product['manufacturer'] = $this->_getCleanedStringForXml($item->getManufacturer());\n $product['manufacturer_name'] = $this->_getCleanedStringForXml($item->getAttributeText('manufacturer'));\n }\n $product['ff_product_url'] = $this->getProductUrl($item);\n $product['ff_image_url'] = $imageUrl;\n $product['color'] = ($colorText) ? $this->_getCleanedStringForXml($colorText) : null;\n $product['weight'] = $item->getWeight();\n\n $product = array_merge($product, $this->_getAdditionalImages($item));\n\n $product['is_parent'] = $isParent;\n\n $this->_addExportFields($product, $item);\n\n if(!empty($this->_replaceFields) && !$isParent && $parentId !== null) {\n $this->_replaceFields($product, $parentId);\n }\n\n return $product;\n }", "title": "" }, { "docid": "e1ec26ec743f4cb06b5406a0831b7a8f", "score": "0.556332", "text": "public function getProductDescription()\n {\n return $this->productDescription;\n }", "title": "" }, { "docid": "919d844283841d325790c6186fdb163e", "score": "0.5559701", "text": "public function getProduct()\n {\n return $this->registry->registry('product');\n }", "title": "" }, { "docid": "52471a59e965e91493a5ca5fd5b092fe", "score": "0.5559287", "text": "public function getCurrentProductStatus();", "title": "" }, { "docid": "3bb7be98f813f8891432744e7aa6a28e", "score": "0.5558687", "text": "public function getProduct()\n {\n return $this->_registry->registry('product');\n }", "title": "" }, { "docid": "7d0ce1e9a6e2da85637ff92967d94f2a", "score": "0.5556722", "text": "public function productAttributes()\n {\n return $this->mappedAttributes()->whereAttributeType(Product::class);\n }", "title": "" }, { "docid": "d5fc93186ec307da13815829e0263fde", "score": "0.55555296", "text": "public function getAllProducts() {\n return $this->_productData;\n }", "title": "" }, { "docid": "95ee6a9cb0ae86de0cfbfb28127be18b", "score": "0.55496025", "text": "public function getProductDetailsOnComparePage()\n {\n $xpath = $this->_getControlXpath('fieldset', 'compare_products');\n\n $rowCount = $this->getXpathCount($xpath . '/*/tr');\n $columnCount = $this->getXpathCount($xpath . '/tbody[1]/tr/*');\n\n $data = array();\n for ($column = 0; $column < $columnCount; $column++) {\n for ($row = 0; $row < $rowCount; $row++) {\n $data[$column][$row] = $this->getTable($xpath . '.' . $row . '.' . $column);\n }\n }\n\n //Get Field Names\n $names = array_shift($data);\n $arrayNames = array();\n foreach ($names as $key => $value) {\n if ($value == null) {\n if ($key == 0) {\n if ($names[$key + 1] != null) {\n $arrayNames[$key] = 'product_name';\n } else {\n $arrayNames[$key] = 'remove';\n $arrayNames[$key + 1] = 'product_name';\n }\n } elseif ($key == count($names) - 1) {\n $arrayNames[$key] = 'product_prices';\n }\n } else {\n $arrayNames[$key] = $value;\n }\n }\n\n //Generate correct array\n $returnArray = array();\n foreach ($data as $number => $productData) {\n foreach ($productData as $key => $value) {\n $returnArray['product_' . ($number + 1)][$arrayNames[$key]] = $value;\n }\n unset($data[$number]);\n }\n foreach ($returnArray as $key => &$value) {\n if (isset($value['remove'])) {\n unset($value['remove']);\n }\n $value['product_name'] = trim(preg_replace('/' . preg_quote($value['product_prices']) . '/', '',\n $value['product_name']));\n $value['product_prices'] = trim(preg_replace('#(add to wishlist)|(add to cart)|(\\n)#i', ' ',\n $value['product_prices']), \" \\t\\n\\r\\0\\x0B\");\n preg_match_all('#([a-z (\\.)?]+: ([a-z \\.]+: )?)?\\$([\\d]+(\\.|,)[\\d]+(\\.[\\d]+)?)|([\\d]+)#i',\n $value['product_prices'], $prices);\n $value['product_prices'] = array_map('trim', $prices[0]);\n\n foreach ($value['product_prices'] as $keyPrice => $price) {\n $prices = array_map('trim', explode('$', $price));\n $priceType = trim(strtolower(preg_replace('#[^0-9a-z]+#i', '_', $prices[0])), '_');\n if (!$priceType) {\n $priceType = 'price';\n }\n $value['product_prices'][$priceType] = $prices[1];\n unset($value['product_prices'][$keyPrice]);\n }\n $include = '';\n foreach ($value['product_prices'] as $priceType => $priceValue) {\n if (preg_match('/_excl_tax/', $priceType)) {\n $include = preg_replace('/_excl_tax/', '', $priceType);\n }\n if ($priceType == 'incl_tax' && $include) {\n $value['product_prices'][$include . '_' . $priceType] = $priceValue;\n unset($value['product_prices'][$priceType]);\n }\n }\n }\n\n return $returnArray;\n }", "title": "" }, { "docid": "270f921c6eac684ff90732d760a2ef2c", "score": "0.5537913", "text": "public function save ()\n {\n // wipe current product and replace with new objects properties\n $this->vendObjectProperties = $this->vend->saveProduct($this)->toArray();\n }", "title": "" }, { "docid": "ffa0998047c0021b6cb582985726ee78", "score": "0.55357504", "text": "public function getProductStatusModel()\n {\n return Mage::getSingleton('catalog/product_status');\n }", "title": "" }, { "docid": "10792cb0453fbce3c0de509e99d83acb", "score": "0.55292004", "text": "abstract protected function getProduct();", "title": "" }, { "docid": "0db6c2e6101c963eb4bcd647f7e4fd62", "score": "0.5527367", "text": "protected function _getProduct() {\n return Mage::registry('product');\n }", "title": "" }, { "docid": "bb7b3adf12ac95989698b3695fe6da29", "score": "0.5523256", "text": "private function getActualProduct(){\n\t\t$where = \" uid =1 AND deleted = 0 \";\n\t\t$addWhere = 'pid = '. $this->conf['pidlist'] . ' ' . $this->cObj->enableFields($this->dbTableProducts);\n\t\t$sql = $GLOBALS[\"TYPO3_DB\"]->exec_SELECTquery(\"*\",$this->dbTableProducts,$addWhere);\n\t\twhile($row = $GLOBALS[\"TYPO3_DB\"]->sql_fetch_assoc($sql)){\n\t\t\t$data[] = $row;\n\t\t}\n\t\tforeach($data[0] as $key => $val){\n\t\t\t$res[$key] = $val;\n\t\t}\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "f349c8dfc2f1af23f24b7a3ab0ad4bd6", "score": "0.55211383", "text": "protected function getPostProductData()\n {\n return [\n 'sync_product' => [\n 'name' => 'SDK Test name',\n 'thumbnail' => 'https://picsum.photos/200/300',\n ],\n 'sync_variants' => [\n [\n 'retail_price' => 21.00,\n 'variant_id' => 4011,\n 'files' => [\n [\n 'url' => 'https://picsum.photos/200/300',\n ],\n [\n 'type' => 'back',\n 'url' => 'https://picsum.photos/200/300',\n ],\n ],\n 'options' => [\n [\n 'id' => 'embroidery_type',\n 'value' => 'flat',\n ],\n [\n 'id' => 'thread_colors',\n 'value' => '',\n ],\n ],\n ],\n [\n 'retail_price' => 21,\n 'variant_id' => 4012,\n 'files' => [\n [\n 'url' => 'https://picsum.photos/200/300',\n ],\n [\n 'type' => 'back',\n 'url' => 'https://picsum.photos/200/300',\n ],\n ],\n 'options' => [\n [\n 'id' => 'embroidery_type',\n 'value' => 'flat',\n ],\n [\n 'id' => 'thread_colors',\n 'value' => '',\n ],\n ],\n ],\n ],\n ];\n }", "title": "" }, { "docid": "b1ee58ec746d6f72a5d92e4ddbea1eac", "score": "0.5509938", "text": "public static function productDetail($product)\n {\n GTMdata::pushProductDetail($product);\n }", "title": "" }, { "docid": "a06bf0b3d7489c9d433753775ca77b25", "score": "0.5509797", "text": "public function asArray()\n {\n $productResult = new Shopgate_Model_Abstract();\n\n $productResult->setData('uid', $this->getUid());\n $productResult->setData('last_update', $this->getLastUpdate());\n $productResult->setData('name', $this->getName());\n $productResult->setData('tax_percent', $this->getTaxPercent());\n $productResult->setData('tax_class', $this->getTaxClass());\n $productResult->setData('currency', $this->getCurrency());\n $productResult->setData('description', $this->getDescription());\n $productResult->setData('deeplink', $this->getDeeplink());\n $productResult->setData('promotion_sort_order', $this->getPromotionSortOrder());\n $productResult->setData('internal_order_info', $this->getInternalOrderInfo());\n $productResult->setData('age_rating', $this->getAgeRating());\n $productResult->setData('weight', $this->getWeight());\n $productResult->setData('weight_unit', $this->getWeightUnit());\n $productResult->setData('display_type', $this->getDisplayType());\n\n $imagesData = array();\n foreach ($this->getImages() as $image) {\n $imagesData[] = $image->asArray();\n }\n $productResult->setData('images', $imagesData);\n\n $categoryPathsData = array();\n foreach ($this->getCategoryPaths() as $categoryPath) {\n $categoryPathsData[] = $categoryPath->asArray();\n }\n $productResult->setData('categories', $categoryPathsData);\n\n $productResult->setData('shipping', $this->getShipping()->asArray());\n $productResult->setData('manufacturer', $this->getManufacturer()->asArray());\n $productResult->setData('visibility', $this->getVisibility()->asArray());\n\n $propertiesData = array();\n foreach ($this->getProperties() as $property) {\n $propertiesData[] = $property->asArray();\n }\n $productResult->setData('properties', $propertiesData);\n\n $productResult->setData('stock', $this->getStock()->asArray());\n\n $identifiersData = array();\n foreach ($this->getIdentifiers() as $identifier) {\n $identifiersData[] = $identifier->asArray();\n }\n $productResult->setData('identifiers', $identifiersData);\n\n $tagsData = array();\n foreach ($this->getTags() as $tag) {\n $tagsData[] = $tag->asArray();\n }\n $productResult->setData('tags', $tagsData);\n\n return $productResult->getData();\n }", "title": "" }, { "docid": "6b4fd7fd4a680b619c5da0f3523ea2d5", "score": "0.5492911", "text": "protected function loadProductData()\n\t{\n\t\t$this->_product_data = Kiwi_Object_Manager::load('Kiwi_Product', array($this->product, $this->prodbind)); // allows caching\n\t}", "title": "" }, { "docid": "4cfffa594bce7a5f8f8bc25f493d9798", "score": "0.5489796", "text": "public function getProduct()\n {\n if(!$this->_product)\n {\n $this->_product = Mage::registry('current_product');\n }\n\n return $this->_product;\n }", "title": "" }, { "docid": "013d81b2174268e3e8f8ef028e56d8c8", "score": "0.547908", "text": "public function getAdditionalInfo(): string\n {\n $currentProduct = $this->coreRegistry->registry('current_product');\n $customerEmail = $this->getCustomerEmail();\n $productId = $currentProduct->getId();\n $basePath = $this->getUrl();\n $productUrl = $currentProduct->getUrlKey();\n $productInfo = '<input name=\"productUrl\" type=\"hidden\" value=\"' . $basePath . $productUrl . '.html' . '\">' .\n '<input name=\"productId\" type=\"hidden\" value=\"' . $productId . '\">' .\n '<input name=\"customerEmail\" type=\"hidden\" value=\"' . $customerEmail . '\">';\n\n return $productInfo;\n }", "title": "" }, { "docid": "e20b43fe8ffa13a7221dc3ed2908a013", "score": "0.5478949", "text": "private function specialPriceInfo()\n {\n $product = $this->product ? $this->product : $this;\n\n $productTypeInstance = $product->getTypeInstance();\n\n return [\n 'special_price' => $this->when(\n $productTypeInstance->haveSpecialPrice(),\n $productTypeInstance->getSpecialPrice()\n ),\n 'formated_special_price' => $this->when(\n $productTypeInstance->haveSpecialPrice(),\n core()->currency($productTypeInstance->getSpecialPrice())\n ),\n 'regular_price' => $this->when(\n $productTypeInstance->haveSpecialPrice(),\n data_get($productTypeInstance->getProductPrices(), 'regular_price.price')\n ),\n 'formated_regular_price' => $this->when(\n $productTypeInstance->haveSpecialPrice(),\n data_get($productTypeInstance->getProductPrices(), 'regular_price.formated_price')\n ),\n ];\n }", "title": "" }, { "docid": "2f5b4a69566ad1ff7d878d6495959c1f", "score": "0.5473036", "text": "public function getInfo() {\r\n return;\r\n }", "title": "" }, { "docid": "59ec8575db506d8c4d7dca731ac71f25", "score": "0.54717386", "text": "public function getNewAndSaleProductsData()\n {\n $data = [];\n $collection = $this->_productCollectionFactory->create();\n $attribute_from = $this->_scopeConfig->getValue(\n self::XML_PATH_PRODUCT_NEW_FROM,\n ScopeInterface::SCOPE_STORE,\n $this->getStoreId()\n );\n $this->logger->info(' Attribute from | '.$attribute_from);\n $data['new'] = [];\n $data['sale'] = [];\n\n if($attribute_from == 'news_from_date') {\n $todayDate = date('Y-m-d', time());\n $collectionForNew = clone $collection;\n $collectionForNew->addAttributeToFilter($attribute_from, array('date' => true, 'to' => $todayDate));\n $data['new'] = $collectionForNew->getAllIds(); \n } else {\n $data['new'] = [];\n $this->logger->info(' Please map \"Set product as from date\" from admin setting to get new products. ');\n }\n $data['new'] = array_unique($data['new']);\n\n /* Getting products having special price */\n $collectionForSale = clone $collection;\n $collectionForSale->addAttributeToFilter('special_price', ['neq' => '']);\n foreach ($collectionForSale->getAllIds() as $key => $value) {\n array_push($data['sale'], $value);\n }\n /* Getting products having special price ends */\n \n /* Getting the catalog rule product ids */\n $catalogRule = $this->_ruleFactory->create();\n $websiteId = $this->storeManager->getStore()->getWebsiteId();//current Website Id\n $resultProductIds = [];\n $catalogRuleCollection = $catalogRule->getCollection();\n $catalogRuleCollection->addIsActiveFilter(1);//filter for active rules only\n foreach ($catalogRuleCollection as $catalogRule) {\n $productIdsAccToRule = $catalogRule->getMatchingProductIds();\n foreach ($productIdsAccToRule as $productId => $ruleProductArray) {\n if (!empty($ruleProductArray[$websiteId])) {\n array_push($data['sale'], $productId);\n }\n }\n }\n $data['sale'] = array_unique($data['sale']);\n /* Getting the catalog rule product ids ends */\n\n return $data;\n }", "title": "" }, { "docid": "8b137f342c1e768f8c40be7a3b6e3849", "score": "0.54699785", "text": "public function manageProductInfo() {\n $products = DB::table('products')\n ->join('categories', 'products.category_id', '=', 'categories.id' )\n ->join('brands', 'products.brand_id', '=', 'brands.id')\n ->select('products.*', 'categories.category_name', 'brands.brand_name')\n ->get();\n return view('admin.product.manage-product', ['products' =>$products]);\n }", "title": "" }, { "docid": "e7ecdba79715c1527c242a072a43a035", "score": "0.5466406", "text": "function updateProduct() {\n\t\t$merchantInfo = merchantCore::getMerchantInfo();\n\t\t$product = new product(getRequest('productID', 'integer'));\n\t\tif ($product->exists() && $product->get('memberID') == $merchantInfo['id']) {\n\t\t\t$productID = $product->get('productID');\n\t\t\t$originalCost = $product->get('cost');\n\t\t\t$originalWeight = $product->get('weight');\n\t\t\t$product->set('name', getPost('name'));\n\t\t\t$product->set('availability', getPost('availability'));\n\t\t\t$product->set('cost', getPost('cost'));\n\t\t\t$product->set('weight', getPost('weight'));\n\t\t\t$product->set('length', getPost('length'));\n\t\t\t$product->set('width', getPost('width'));\n\t\t\t$product->set('height', getPost('height'));\n\t\t\t$product->set('sortWeight', getPost('sortWeight'));\n\t\t\t$product->set('description', getPost('description'));\n\t\t\t$product->set('shortDescription', getPost('shortDescription'));\n\t\t\tif (!$product->update()) {\n\t\t\t\taddError('There was an error while updating the product details');\n\t\t\t} else {\n\t\t\t\tif ($originalCost != $product->get('cost') || $originalWeight != $product->get('weight')) {\n\t\t\t\t\tif (!packagesController::updateProductPackages($productID)) {\n\t\t\t\t\t\ttrigger_error('There was an error while updating package cost/weight for product #'.$productID.', merchant #'.$merchantInfo['id'].'; package and offer data may be out of sync', E_USER_WARNING);\n\t\t\t\t\t\tclearErrors();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$inventory = getPost('quantity');\n\t\t\tif ($inventory != $product->getInventory()) {\n\t\t\t\tif ($product->setInventory($inventory)) {\n\t\t\t\t\taddSuccess('Inventory updated');\n\t\t\t\t} else {\n\t\t\t\t\taddError('There was an error while setting the product inventory');\n\t\t\t\t}\n\t\t\t}\n\t\t\t$existingTags = $product->getObjectTags();\n\t\t\t$tags = productsController::retrieveObjectTags('productTags', 'retrieveExistingOnly', 'productTags');\n\t\t\t$addTags = array_diff($tags, $existingTags);\n\t\t\tif (!empty($addTags)) {\n\t\t\t\taddSuccess('New tags: '.implode(', ', $addTags));\n\t\t\t\tif ($product->addTags($addTags)) {\n\t\t\t\t\taddSuccess('Tags added successfully');\n\t\t\t\t} else {\n\t\t\t\t\taddError('There was an error while adding product tags');\n\t\t\t\t}\n\t\t\t}\n\t\t\t$removeTags = array_diff($existingTags, $tags);\n\t\t\tif (!empty($removeTags)) {\n\t\t\t\taddSuccess('Remove tags: '.implode(', ', $removeTags));\n\t\t\t\tif ($product->removeTags($removeTags)) {\n\t\t\t\t\taddSuccess('Tags removed successfully');\n\t\t\t\t} else {\n\t\t\t\t\taddError('There was an error while removing product tags');\n\t\t\t\t}\n\t\t\t}\n\t\t\t$imagesProcessed = productsController::processImages($productID);\n\t\t\tif ($imagesProcessed === true) {\n\t\t\t\taddSuccess('Images have been processed successfully');\n\t\t\t\t$product->load($productID);\n\t\t\t} elseif ($imagesProcessed === false) {\n\t\t\t\taddError('There was an error while processing the product images');\n\t\t\t}\n\t\t\tif (!haveErrors()) {\n\t\t\t\taddSuccess($product->get('name').' was updated successfully');\n\t\t\t\teditProduct($productID);\n\t\t\t} else {\n\t\t\t\t$controller = new productsController;\n\t\t\t\t$template = new template;\n\t\t\t\t$template->assignClean('merchantInfo', $merchantInfo);\n\t\t\t\t$template->assignClean('product', $product->fetchArray());\n\t\t\t\t$template->assignClean('tags', $tags);\n\t\t\t\t$template->assignClean('productTags', productsController::getProductTags());\n\t\t\t\t$template->assignClean('quantity', getPost('quantity', 'integer'));\n\t\t\t\t$template->assignClean('availabilityOptions', $controller->getOptions('availability'));\n\t\t\t\t$template->assignClean('propertyMenuItem', getRequest('propertyMenuItem'));\n\t\t\t\t$template->assignClean('mode', 'edit');\n\t\t\t\t$template->getMessages();\n\t\t\t\t$template->display('merchant/productEdit.htm');\n\t\t\t}\n\t\t} else {\n\t\t\taddError('The product was not found');\n\t\t\tinventoryAdmin();\n\t\t}\n\t}", "title": "" }, { "docid": "07324fc80b57076c8ad409422259bf05", "score": "0.54601014", "text": "public function getProducInformationStyle() {\n\t\treturn $this->getStoreConfig(\"titan/product/product_info\");\n\t}", "title": "" }, { "docid": "07324fc80b57076c8ad409422259bf05", "score": "0.54601014", "text": "public function getProducInformationStyle() {\n\t\treturn $this->getStoreConfig(\"titan/product/product_info\");\n\t}", "title": "" }, { "docid": "6eaf877ebeea192a4b7d78bc9aac7198", "score": "0.5456971", "text": "public function productsStatistics()\n {\n $products = Product::with('statistics')->get();\n\n return $products;\n }", "title": "" }, { "docid": "d4a496a3014672040981226ff93a8dc1", "score": "0.54547", "text": "public function save_as_current_product()\n {\n if (Globals::$session_obj instanceof Session) {\n Globals::$session_obj->product_name = $this->name;\n }\n }", "title": "" }, { "docid": "8e3aa9fa153d27c3063ffc07edda9d8f", "score": "0.5452604", "text": "public function getPriceInfo($store) {\n $options = array();\n $currentProduct = $this->getProduct();\n $_product_prices_info = array();\n $productStock = array();\n foreach ($this->getAllowProducts() as $product) {\n $productId = $product->getId();\n $productStock[$productId] = $product->getStockItem()->getIsInStock();\n $_product_prices_info[$product->getId()] = 0;\n foreach ($this->getAllowAttributes() as $attribute) {\n $productAttribute = $attribute->getProductAttribute();\n $productAttributeId = $productAttribute->getId();\n $attributeValue = $product->getData($productAttribute->getAttributeCode());\n if (!isset($options[$productAttributeId])) {\n $options[$productAttributeId] = array();\n }\n if (!isset($options[$productAttributeId][$attributeValue])) {\n $options[$productAttributeId][$attributeValue] = array();\n }\n $options[$productAttributeId][$attributeValue][] = $productId;\n }\n }\n $this->_resPrices = array(\n $this->_preparePrice($currentProduct->getFinalPrice())\n );\n foreach ($this->getAllowAttributes() as $attribute) {\n $productAttribute = $attribute->getProductAttribute();\n $attributeId = $productAttribute->getId();\n $optionPrices = array();\n $prices = $attribute->getPrices();\n if (is_array($prices)) {\n foreach ($prices as $value) {\n if (!$this->_validateAttributeValue($attributeId, $value, $options)) {\n continue;\n }\n $currentProduct->setConfigurablePrice(\n $this->_preparePrice($value['pricing_value'], $value['is_percent'])\n );\n $currentProduct->setParentId(true);\n $configurablePrice = $currentProduct->getConfigurablePrice();\n if (isset($options[$attributeId][$value['value_index']])) {\n $productsIndexOptions = $options[$attributeId][$value['value_index']];\n $productsIndex = array();\n foreach ($productsIndexOptions as $productIndex) {\n if ($productStock[$productIndex]) {\n $productsIndex[] = $productIndex;\n }\n }\n } else {\n $productsIndex = array();\n }\n foreach ($productsIndex as $_simple_product_id) {\n if (isset($_product_prices_info[$_simple_product_id])) {\n $_product_prices_info[$_simple_product_id]+= $configurablePrice;\n }\n }\n $optionPrices[] = $configurablePrice;\n }\n }\n /**\n * Prepare formated values for options choose\n */\n foreach ($optionPrices as $optionPrice) {\n foreach ($optionPrices as $additional) {\n $this->_preparePrice(abs($additional - $optionPrice));\n }\n }\n }\n foreach ($_product_prices_info as $_id => $_price) {\n $_product_prices_info[$_id] = $_price + $this->_convertPrice($currentProduct->getFinalPrice());\n }\n return $_product_prices_info;\n }", "title": "" }, { "docid": "006220b348a8ea06ca922e718a6bdae0", "score": "0.5448721", "text": "public function findByStagedProduct(Product $product) {\n\t\treturn $this->createQueryBuilder('pl')\n\t\t\t->innerJoin('pl.location','l')\n\t\t\t->andWhere('pl.product = :product')\n\t\t\t->andWhere('l.staging = :staging')\n\t\t\t->andWhere('pl.staged > 0')\n\t\t\t->setParameter('product', $product)\n\t\t\t->setParameter('staging', 0)\n\t\t\t->orderBy('pl.staged','ASC')\n\t\t\t->getQuery()\n\t\t\t->getResult();\n\t}", "title": "" }, { "docid": "6c62e5cb749344ea624ab202e18584ba", "score": "0.5441798", "text": "protected function setProductCurrentStock(&$product)\n {\n }", "title": "" }, { "docid": "b42c750faa21b2f21337124d5cc8b7f0", "score": "0.5439", "text": "public function getAttributesUsedInProductListing() {\n if (is_null($this->_usedInProductListing)) {\n $this->_usedInProductListing = array();\n $entityType = Mage_Catalog_Model_Product::ENTITY;\n $attributesData = $this->_getResource()\n ->setStoreId($this->getStoreId())\n ->getAttributesUsedInListing();\n Mage::getSingleton('eav/config')\n ->importAttributesData($entityType, $attributesData);\n foreach ($attributesData as $attributeData) {\n $attributeCode = $attributeData['attribute_code'];\n $this->_usedInProductListing[$attributeCode] = Mage::getSingleton('eav/config')\n ->getAttribute($entityType, $attributeCode);\n }\n }\n return $this->_usedInProductListing;\n }", "title": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "368ae21f12eb1d772b1a06c3d39cbc91", "score": "0.0", "text": "public function destroy($id)\n {\n //\n $professor = Professor ::find($id);\n if($professor )\n $professor ->delete();\n return redirect()->route('professor .index');\n}", "title": "" } ]
[ { "docid": "2b9d2c85f4c5a3ea90f0276710558864", "score": "0.73587126", "text": "public function removeResource(ResourceInterface $resource);", "title": "" }, { "docid": "993b4783957b008ba5348591f59665c8", "score": "0.7277427", "text": "public function del($resource)\n {\n }", "title": "" }, { "docid": "f927c8635493c1dd0ac8db6bd602ddb2", "score": "0.6954638", "text": "protected function removeResourceFromStorage(HCResource $resource, string $disk): void\n {\n if (Storage::disk($disk)->has($resource['path'])) {\n Storage::disk($disk)->delete($resource['path']);\n }\n }", "title": "" }, { "docid": "440048b39bf8ab60c81c3f27962faaf1", "score": "0.69409096", "text": "public function deleteResource(PersistentResource $resource);", "title": "" }, { "docid": "9935d5b93e750a6c0ddc712ef3c08960", "score": "0.6876637", "text": "public function deleteResource($resourceId);", "title": "" }, { "docid": "9ce11cccf2dced06dd47b1882f8da1bb", "score": "0.6700161", "text": "public function deleted(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "6f90ef2bb7cdf15d03e7caac57f399ca", "score": "0.6653144", "text": "public function remove(ResourceInterface $resource, $files);", "title": "" }, { "docid": "062d77ad6e956ba37743db6eb7cdce0c", "score": "0.6625139", "text": "public function delete(string $resource)\n {\n $name = Normalizer::className($resource);\n $path = PATH_CUSTOM_RESOURCES . \"{$name}.php\";\n if (!file_exists($path)) {\n self::error(\"Resource not found!\", true);\n }\n\n if (!unlink($path)) {\n self::error(\"Failed to delete resource!\");\n return;\n }\n\n self::success(\"Resource deleted!\");\n }", "title": "" }, { "docid": "6c60b1eff618aa8951f7900cc60261d9", "score": "0.65714747", "text": "public static function remove()\n {\n self::$storage = null;\n }", "title": "" }, { "docid": "9bf523fe37f0dc36010278d5bebdd0a1", "score": "0.6514855", "text": "public function unpublishResource(Resource $resource) {\n if ( $this->debug ) {\n $this->systemLogger->log('target ' . $this->name . ': unpublishResource');\n }\n try {\n $this->deleteFile($this->getRelativePublicationPathAndFilename($resource));\n } catch (\\Exception $e) {\n }\n }", "title": "" }, { "docid": "c040ed02d56811524efd11951dd9e13e", "score": "0.6511542", "text": "public function delete(string $id): IStorage;", "title": "" }, { "docid": "eb8ef8644496015cbec33f776a7522f6", "score": "0.6464115", "text": "public function deleteResource($resource)\n {\n // instanceof instead of type hinting so it can be used as slot\n if ($resource instanceof \\TYPO3\\Flow\\Resource\\Resource) {\n $this->resourcePublisher->unpublishPersistentResource($resource);\n if (is_file($this->persistentResourcesStorageBaseUri . $resource->getResourcePointer()->getHash())) {\n unlink($this->persistentResourcesStorageBaseUri . $resource->getResourcePointer()->getHash());\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "b45656cb095db000c7a18b0789ffe517", "score": "0.6381826", "text": "public function delete() {\n $this->storage_file->delete();\n }", "title": "" }, { "docid": "538b378a63649cab0724cc3f9c14d7e7", "score": "0.63669956", "text": "public function delete(resource $resource) {\n $stmt = $this->db->prepare(\"DELETE from resource WHERE id=?\");\n $stmt->execute(array($resource->getIdresource()));\n }", "title": "" }, { "docid": "1a061574cc458c41cee05049e84b3d56", "score": "0.62799686", "text": "public function remove() {\n\t\t$this->assert_ready();\n\n\t\tif (is_file($this->get_internal_path())) {\n\t\t\tif (!unlink($this->get_internal_path())) {\n\t\t\t\tthrow new IntException('Failed to remove asset.');\n\t\t\t}\n\t\t}\n\t\tif (is_file($this->get_internal_thumb_path())) {\n\t\t\tif (!unlink($this->get_internal_thumb_path())) {\n\t\t\t\tthrow new IntException('Failed to remove asset thumbnail.');\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "d9d905e10fc59213e9d27bf1adc77c9c", "score": "0.62419707", "text": "public function delete(Resource\\ResourceInterface $resource)\r\n\t{\r\n\t\t$resourceName = $resource->resourceName();\r\n\t\t$resourceId = $resource->resourceId();\r\n\t\t$params = $resource->params();\r\n\t\t$hash = $this->generateHash($resourceName, $resourceId, $params);\r\n\t\t$hashParts = explode(\"-\", $hash);\r\n\t\t\r\n\t\t$this->_delete($hash);\r\n\t\t\r\n\t\tif (!$resourceId || empty($params)) {\r\n\t\t\t$partialHash = !$resourceId \r\n\t\t\t\t? $hashParts[0] \r\n\t\t\t\t: $hashParts[0] .\"-\". $hashParts[1];\r\n\t\t\t\r\n\t\t\tforeach ($this->hashes as $hash) {\r\n\t\t\t\tif (preg_match(\"/^{$partialHash}/i\", $hash)) {\r\n\t\t\t\t\t$this->_delete($hash);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "23797bba0e5c4bab3f3e851d0a2e599d", "score": "0.6241274", "text": "function delete($resource, $data='') {\n\t\t\t$this->_auth();\n\t\t\treturn $this->_request('DELETE', $this->_resourcefix($resource), $data);\n\t\t}", "title": "" }, { "docid": "71cdf2c8771b0884ed0346cbff1672a0", "score": "0.62021154", "text": "abstract protected function destroyResource(): void;", "title": "" }, { "docid": "c59e81ef63187237bc9f5f3b5e74592e", "score": "0.6177348", "text": "public function deleteResourceType(ResourceTypeInterface $resourceType);", "title": "" }, { "docid": "5292bf6424220d49a3107255e329dbd6", "score": "0.61606133", "text": "public function delete()\n {\n Storage::disk('s3')->delete($this->id);\n }", "title": "" }, { "docid": "f4f09ec06bcbe6e72b5430af6aae6dd6", "score": "0.61495334", "text": "public function forceDeleted(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "e13c01fffe22886d2b3f34922a8a2e93", "score": "0.61296195", "text": "public function deleteAfter($resource)\n {\n return $resource;\n }", "title": "" }, { "docid": "02d92a998dda9d4406781461e1522038", "score": "0.6128936", "text": "public function delete()\n {\n if (!$this->linked) {\n try {\n $this->storage->delete();\n } catch (Exception $e) {}\n }\n }", "title": "" }, { "docid": "e0ec0bbfbe81f9c324f82b9e4214f65b", "score": "0.61096084", "text": "public function delete()\n {\n if ($this->exists()) {\n $this->filesystem->remove($this->path);\n }\n }", "title": "" }, { "docid": "e3417229f36e4c96d533be83d06bde0c", "score": "0.6041458", "text": "public function deleteResource($id)\n\t{\n\t}", "title": "" }, { "docid": "902bb49bf75f0b9c9365d23387afb5d1", "score": "0.60388845", "text": "public function remove($resource)\n {\n $resourceName = $this->getResourceName($resource);\n $index = array_search($resourceName, $this->indexes, true);\n\n if (false !== $index) {\n unset($this->indexes[$index]);\n unset($this->resources[$resourceName]);\n\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "21644a433a62c5fd1c528ea36afc90b8", "score": "0.6036098", "text": "public function destroy(Resource $resource)\n {\n $resource->delete();\n return redirect()->route('resource.index');\n }", "title": "" }, { "docid": "5cbdbc3d6fcbfefa1426cf0c64aa04ca", "score": "0.602262", "text": "public function remove($name) {\n unset($this->storage[$name]);\n }", "title": "" }, { "docid": "6c062b635ba3468052de6e300a6359c6", "score": "0.60063314", "text": "public function destroy(Resource $resource)\n {\n //\n // $this->authorize('delete',Resource::class);\n // $resource->delete();\n // return redirect('/resource');\n return response(['message'=>'Deleted']);\n }", "title": "" }, { "docid": "106ec422b24f32e2c69e65e6763760ce", "score": "0.5998401", "text": "public function remove()\n {\n $this->setId($this->getIdMd5());\n\n $filename =\n $this->_parameters->getFormattedParameter('file.cache.directory') .\n $this->_parameters->getFormattedParameter('file.cache.file');\n\n $file = new HoaFile\\Read($filename);\n $file->delete();\n $file->close();\n\n return;\n }", "title": "" }, { "docid": "9dc6c3fff99085d4ce4d32df40726961", "score": "0.5966733", "text": "public function destroy($id)\n {\n //delete existing image and file\n $userdata = Resources::findOrFail($id);\n\n $image_name = $userdata->book_image;\n $image_name='assets/uploads/cover_images/'.$image_name;\n File::delete($image_name);\n\n $file_name = $userdata->file_name;\n $file_name='assets/uploads/resources/'.$file_name;\n File::delete($file_name);\n $userdata->delete();\n return redirect('/resource/view')->with('success','Resource Successfully Deleted');\n\n }", "title": "" }, { "docid": "b23bab0dfabcc169486df5c49c4053a8", "score": "0.59365857", "text": "public function deletePersonalData()\n {\n if ($this->resource) {\n $this->resource->removeFromStorage();\n $this->resource->delete();\n }\n }", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.59337646", "text": "public function remove($path);", "title": "" }, { "docid": "78f3fcb6a4df88ba8ea45797087a7e8d", "score": "0.59121597", "text": "public function remove($entity);", "title": "" }, { "docid": "1c1c61cd59ebc38ac44e886b6478a747", "score": "0.59062636", "text": "public function remove()\n {\n if ($this->id) {\n static::delete($this->id);\n }\n }", "title": "" }, { "docid": "8f6877c27ea14309583a0c11d265f37c", "score": "0.59036046", "text": "public function delete() {\n if($this->exists()) {\n unlink($this->path);\n }\n }", "title": "" }, { "docid": "94efa591f8ef8e0d19e7776ed552595e", "score": "0.59000266", "text": "public function deleteBefore($resource)\n {\n return $resource;\n }", "title": "" }, { "docid": "5336825b23ae57c225d3534fd55b1861", "score": "0.58972764", "text": "public function remove() {}", "title": "" }, { "docid": "5336825b23ae57c225d3534fd55b1861", "score": "0.58972764", "text": "public function remove() {}", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "6dbf60ad37b681821654b0dc63e31a44", "score": "0.58875144", "text": "public function destroy($path)\n {\n // Remove S3 object path\n }", "title": "" }, { "docid": "dab9609eae6b95de02e986dc8f30ef30", "score": "0.588703", "text": "public function delete($key) {\n\t\tif ($this->readOnly) {\n\t\t\tthrow new StorageException('Trying to write to a read only storage');\n\t\t}\n\n\t\t$startTime = microtime(true);\n\t\t$fileName = $this->makeFullPath($key);\n\n\t\ttry {\n\t\t\t$this->fileHandler->remove($fileName);\n\t\t}\n\t\tcatch (NotFoundException $e) {\n\t\t}\n\t\tcatch (FileException $e) {\n\t\t\tthrow new StorageException('Unable to remove the file: ' . $fileName, 0, $e);\n\t\t}\n\n\t\t$debugger = Application::getInstance()->getDiContainer()->getDebugger();\n\t\tif (!$this->debuggerDisabled && $debugger !== false) {\n\t\t\t$debugger->addItem(new StorageItem('file', 'file.' . $this->currentConfigurationName,\n\t\t\t\tStorageItem::METHOD_DELETE . ' ' . $key, null, microtime(true) - $startTime));\n\t\t}\n\t}", "title": "" }, { "docid": "34400e55dd4ebc208c4594b57d8127b5", "score": "0.58806455", "text": "public function removeResourceParent(ResourceInterface $resource, ResourceInterface $parentResource);", "title": "" }, { "docid": "e3bc23faa27c9a9250d1f82e5c8ffe69", "score": "0.5879126", "text": "public function destroy(Resource $resource)\n {\n $resource->delete();\n return $this->api_success([\n 'data' => new ResourceResource($resource),\n 'message' => __('pages.responses.deleted'),\n 'code' => 201\n ], 201);\n }", "title": "" }, { "docid": "4ca008dccccbaa2670890adc84077b0d", "score": "0.58728075", "text": "public function destroy($id)\n {\n $student = Student::findOrFail($id);\n if($student->delete()){\n return new StudentResource($student);\n }\n}", "title": "" }, { "docid": "3ec1051c44bcdbf6b8f0b979de237ca0", "score": "0.5859524", "text": "public function destroy () {\n\t\treturn unlink(self::filepath($this->name));\n\t}", "title": "" }, { "docid": "a145f758f727b845157c93040e3789f9", "score": "0.5852177", "text": "public function remove(FileInterface $file);", "title": "" }, { "docid": "7c2dd27bffbd51546ccd25eded472c62", "score": "0.58518326", "text": "public static function remove(string $path): void\n\t{\n\t\tif(file_exists(storage_path($path))) {\n\t\t\tunlink(storage_path($path));\n\t\t}\n\t}", "title": "" }, { "docid": "0715c406e16677dec9ed9d1639329836", "score": "0.5848653", "text": "public function deleteResourceById(Request $request, $id = 0);", "title": "" }, { "docid": "4c976f8fadd1a0e0cd388ea9b1c3e799", "score": "0.5832527", "text": "public function destroy($id)\n {\n $get=Product::where('id',$id)->first();\n if($get->thumbnail!=null){\n unlink('storage/'.$get->thumbnail);\n }\n if($get->attachment!=null){\n unlink('storage/'.$get->attachment);\n }\n \n Product::where('id',$id)->delete();\n return redirect()->route('listProduct');\n }", "title": "" }, { "docid": "15bc067b90dbe253b89a72946214ee6f", "score": "0.58205", "text": "public function destroy($id)\n { \n if(\\File::exists(public_path().\"/uploads/\".$id)){\n \\File::deleteDirectory(public_path().\"/uploads/\".$id);\n Resource::destroy($id);\n \\Session::flash('message', 'Tutto bene, eliminato!');\n }else {\n \\Session::flash('message', 'Errore imprevisto, cartella in /uploads non trovata!');\n }\n return \\Redirect::to('admin/resources');\n }", "title": "" }, { "docid": "1006371b48f79fb503e249a0abf3d90d", "score": "0.58135617", "text": "function delete_resource($id, $type = 'thumb')\n {\n $constraints = ['clip_id' => $id];\n\n if($type != '*'){\n $constraints['type'] = $this->res_type[$type];\n }\n\n $query = $this->db->get_where('lib_clips_res', $constraints);\n $rows = $query->result_array();\n\n if ($rows) {\n foreach ($rows as $res) {\n $file = $this->config->item('clip_dir') . $type . '/' .\n $id . '.' . $res['resource'];\n if (is_file($file)) {\n unlink($file);\n }\n if($res['location']){\n if($s3Path = $this->getS3Path($res['location'])){\n $this->aws3_sqs_delete_resources_model->put_job(['MessageBody' => $s3Path]);\n }\n }\n }\n }\n }", "title": "" }, { "docid": "7addba7772d86602ad38891183d5c5c0", "score": "0.5804717", "text": "public function destroy($id)\n {\n $obj = Obj::where('id',$id)->first();\n $this->authorize('update', $obj);\n\n // remove file\n if(Storage::disk('public')->exists($obj->image))\n Storage::disk('public')->delete($obj->image);\n\n $obj->delete();\n\n flash('('.$this->app.'/'.$this->module.') item Successfully deleted!')->success();\n return redirect()->route($this->module.'.index');\n }", "title": "" }, { "docid": "f35aaf17008b130a60b3962b50777f92", "score": "0.5800284", "text": "public function unlink();", "title": "" }, { "docid": "2f7fda6501bcbbb5f68ddb7c065c2c8f", "score": "0.57994014", "text": "private function removeResource($filesystemPath, &$removed)\n {\n if (!file_exists($filesystemPath)) {\n return;\n }\n\n ++$removed;\n\n if (is_dir($filesystemPath)) {\n $removed += $this->countChildren($filesystemPath);\n }\n\n $this->filesystem->remove($filesystemPath);\n }", "title": "" }, { "docid": "cc42a160a9315cdd157733240e749135", "score": "0.57910043", "text": "public function remove($entity): void;", "title": "" }, { "docid": "d4218bcd90f4a47f5ea0150ee353dc32", "score": "0.57905525", "text": "public function destroy($id)\n {\n $brand=Brand::find($id);\n //delete related file from storage\n $brand->delete();\n return redirect()->route('brands.index');\n }", "title": "" }, { "docid": "87a257458af9749998d2821206a44b54", "score": "0.57897776", "text": "public function destroy($id)\n {\n $producto= Producto::findOrFail($id);\n\n if(Storage::delete('public/'.$producto->imagen)){\n\n Producto::destroy($id); \n }\n\n return redirect('producto');\n }", "title": "" }, { "docid": "642f1d1205457b11ef73140be49aa079", "score": "0.5779547", "text": "public function delete($resource)\n {\n return DB::transaction(function () use ($resource) {\n $resource = $this->deleteBefore($resource);\n\n $resource->delete();\n\n return $this->deleteAfter($resource);\n });\n }", "title": "" }, { "docid": "2c0196ccc0507912483f0092cd84b4ae", "score": "0.5779229", "text": "public function removeAvatarResource($resource): bool\n {\n return imagedestroy($resource);\n }", "title": "" }, { "docid": "5760f6df7c6ebd5440da74e84ef8e734", "score": "0.57779175", "text": "public function remove($identifier);", "title": "" }, { "docid": "33b7f072f2b9b81d6150ecf51df6b25f", "score": "0.57706714", "text": "abstract public function remove($path);", "title": "" }, { "docid": "d63269c2f97e9f20ab93b60f53363fbc", "score": "0.5757352", "text": "public function destroy($class_id, $resource)\n {\n $classResource = ClassResource::find($resource);\n\n // Delete Image\n Storage::delete('public/resources/'.$classResource->classResource_location);\n $classResource->delete();\n\n return redirect('/viewClass'.'/'.$class_id.'/resources')->with('success', 'File Deleted!');\n }", "title": "" }, { "docid": "c41a8c586f3cfc39935459b577d1b862", "score": "0.575272", "text": "public function removeUpload()\n {\n if (isset($this->temp)) {\n unlink($this->temp);\n }\n }", "title": "" }, { "docid": "d142a02423f60696b0dd1bc440aa7621", "score": "0.5740473", "text": "public function deleteUploadedFile() {\n // delete file if exists\n if (file_exists(\"../uploaded_resources/\" . $this->filename)) {\n unlink(\"../uploaded_resources/\" . $this->filename);\n }\n }", "title": "" }, { "docid": "37d1f8df79d1b403823098c91384300b", "score": "0.57366985", "text": "public function destroy() {\n $filepath = $this->getFilepath();\n @unlink($filepath);\n }", "title": "" }, { "docid": "966236614f1d8ba524f6647f934a480c", "score": "0.5731254", "text": "public function destroy($id)\n {\n $slider = slider::where('slider_id', $id)->first();\n $imagename = $slider->image;\n if(!empty($imagename)){\n if(Storage::disk('s3')->exists($imagename)) {\n Storage::disk('s3')->delete($imagename);\n } \n /*$filename = public_path().'/images/slider/'.$file;\n \\File::delete($filename);*/\n }\n slider::where('slider_id',$id)->delete();\n return redirect()->route('slider.index')\n ->with('success','Slider deleted successfully.');\n }", "title": "" }, { "docid": "2433a592ecee814d4683e51a2a9ef8b4", "score": "0.5730529", "text": "public function unindex($resource)\n {\n $dataset = $this->util->getDataset($resource);\n\n if($dataset){\n //find the belonging indexes\n $index = $this->getIndexedWords($dataset);\n\n //remove indexed\n foreach($index as $currentIndexToDelete) {\n $word = $currentIndexToDelete->getWord();\n $this->em->remove($currentIndexToDelete);\n $this->searchDirty($word);\n }\n\n //remove dataset\n $this->em->remove($dataset);\n $this->em->flush();\n $this->searchUpdateTotals();\n }\n }", "title": "" }, { "docid": "f895b50d35ef0b215af95a187ee4f8e1", "score": "0.57171595", "text": "public function delete()\n {\n return Storage::disk(config('screeenly.filesystem_disk'))->delete($this->filename);\n }", "title": "" }, { "docid": "8c0c11de31899ddf1bbfd6c29f1c19a7", "score": "0.571522", "text": "public function deleteImage(){\n Storage::delete($this->image);\n }", "title": "" }, { "docid": "e5f174b2d48a7745c3be9c52c54e88b4", "score": "0.56957734", "text": "function delete()\n\t{\n\t\tglobal $sql;\n\t\t$sql->Query(\"DELETE FROM $this->tablename WHERE id = '$this->id'\");\n\n\t\tif($this->path)\n\t\t\t@unlink($this->path);\n\t\tif($this->thumbnail)\n\t\t\t@unlink($this->thumbnail);\n\t\tif($this->square)\n\t\t\t@unlink($this->square);\n\t\tif($this->small)\n\t\t\t@unlink($this->small);\n\t\tif($this->medium)\n\t\t\t@unlink($this->medium);\n\t\tif($this->large)\n\t\t\t@unlink($this->large);\n\n\t}", "title": "" }, { "docid": "9f8e141fd6e26ce3fe7a6921b622fe0e", "score": "0.5689104", "text": "public function delete()\n {\n $path = str_replace(storage_path('app'), '', $this->path);\n\n Storage::delete($path);\n\n return parent::delete();\n }", "title": "" }, { "docid": "b8c78cd19161cf7966e7567365e984a3", "score": "0.56849074", "text": "public function remove(): void;", "title": "" }, { "docid": "04406afe569e9b74ee2744b1cf4852d9", "score": "0.5684563", "text": "public function delete() {\n $this->resourceable->delete();\n return parent::delete();\n }", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "45aa00d01271e734f5db2a1fa7f76483", "score": "0.5677459", "text": "function remove($entity);", "title": "" }, { "docid": "b3f8c1c4e871f05ee3123e1f7f5255e8", "score": "0.56750923", "text": "public function destroy($id)\n {\n $Man = Manufacture::find($id);\n $image_path = storage_path('app/public/manufacturers/'.$Man->image); // Value is not URL but directory file path\n if(File::exists($image_path)) {\n File::delete($image_path);\n\n }\n $Man->delete();\n }", "title": "" }, { "docid": "37ff2347ddf9a6db6a9844965dd1ec38", "score": "0.5665463", "text": "public function destroy($id)\n\t{\n\t\t//eliminar usuario \n\t\t$filename = public_path().'/uploads/foo.bar';\n\n\t\tif (File::exists($filename)) \n\t\t{\n \t\tFile::delete($filename);\n\t\t}\n\t}", "title": "" }, { "docid": "9b8aab241578958a2469c7a9782795c1", "score": "0.5661555", "text": "public function destroy($id)\n {\n $actor=Actor::find($id);\n //delete related file from storage\n $actor->delete();\n return redirect()->route('actors.index');\n }", "title": "" }, { "docid": "493127367eaabfb3f87af291ac81b31c", "score": "0.56471384", "text": "public function remove_resource($resource)\n\t{\n\t\tif (isset($this->acl_perms['user_role'][$resource])) {\n\t\t\tunset($this->acl_perms['user_role'][$resource]);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "9c63fb3cdb6ebf314539690c581f739a", "score": "0.56405896", "text": "public function remove($id){\n $destinationPath = 'public/uploads/'.$id;\n File::delete($destinationPath);\n }", "title": "" }, { "docid": "218fe18765b1d7c380dddd8b2ac4b37b", "score": "0.5638099", "text": "public function removeFile(FileInterface $file);", "title": "" }, { "docid": "a6b9c5e2bcb825e1cfba302990ec2140", "score": "0.563637", "text": "public function remove()\n\t{\n\t\tFile::remove($this->getFilePath());\n\t}", "title": "" }, { "docid": "dc6cb92328efd21aca7092caec752017", "score": "0.5636115", "text": "public function delete(SectionStorageInterface $section_storage);", "title": "" }, { "docid": "e61268a82a87f7cb8cbe76d15484a282", "score": "0.5635627", "text": "static public function remove($objectName);", "title": "" }, { "docid": "e56ffdb12b7e8ce9ce9b709dd82f37f7", "score": "0.56325144", "text": "public function removeById($id);", "title": "" }, { "docid": "e56ffdb12b7e8ce9ce9b709dd82f37f7", "score": "0.56325144", "text": "public function removeById($id);", "title": "" }, { "docid": "cb6fd12ed6b6c067c3274543aee20401", "score": "0.5631915", "text": "public function clearResource(ResolvedObject $resource, Transaction $transaction)\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "0428848b8d6110c6be21d9479ece2192", "score": "0.56237406", "text": "public function removeImage()\n {\n if (!empty($this->image) && !empty($this->id)) {\n $path = storage_path($this->image);\n if (is_file($path)) {\n unlink($path);\n }\n if (is_file($path.'.thumb.jpg')) {\n unlink($path.'.thumb.jpg');\n }\n }\n }", "title": "" }, { "docid": "a6f4504c52a348844985d64b90dad904", "score": "0.56214297", "text": "public function destroy($id)\n {\n $supplier = DB::table('suppliers')->where('id',$id)->first();\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n DB::table('suppliers')->where('id',$id)->delete();\n }\n DB::table('suppliers')->where('id',$id)->delete();\n }", "title": "" }, { "docid": "0ef712f262167f08d89550be49a07125", "score": "0.561652", "text": "public function unlinkResource($yResource){\n try{\n if (is_file($yResource->getPath())){\n unlink($yResource->getPath());\n }elseif (is_dir($yResource->getPath())){\n rmdir($yResource->getPath());\n }\n }catch(Exception $e){\n \n }\n return $this->getResource($yResource->getPath());\n }", "title": "" }, { "docid": "39948b150ec808236472ff391114e58e", "score": "0.5614384", "text": "public function delete()\n {\n File::delete([\n $this->path,\n $this->thumbnail_path\n ]);\n\n parent::delete();\n }", "title": "" }, { "docid": "1a1220576ae4b4bfabb91c580117d74a", "score": "0.5614326", "text": "public function destroy($id)\n {\n $get=Destination::where('id',$id)->first();\n if($get->thumbnail!=null){\n unlink('storage/'.$get->thumbnail);\n }\n \n Destination::where('id',$id)->delete();\n return redirect()->route('listDestination');\n }", "title": "" }, { "docid": "c3420f68b471063a55ff6b63a8e7fce0", "score": "0.56104624", "text": "public function removePurgeable($attribute);", "title": "" }, { "docid": "3c91c642d62c969c158b37413a399fd7", "score": "0.5605259", "text": "public function delete(){\n if($this->id > 0){\n SQL::delete($this::STORAGE, [\"id\" => $this->id]);\n }\n }", "title": "" }, { "docid": "554af8987fffe76970c60a65212b72cf", "score": "0.56006944", "text": "public function destroy($id)\n {\n $art = art::findOrFail($id);\n if($art->image!=null){\n $sliderimage = public_path(\"uploads/{$art->image}\");\n if(File::exists($sliderimage)){\n if(File::exists($sliderimage)){\n unlink($sliderimage);\n }\n }\n }\n $art->delete();\n return redirect()->back();\n }", "title": "" } ]
0ac7bdb02e5fbb03eb7a9ee5316bf396
Run the database seeds.
[ { "docid": "3050d165e0cf97012d1ad80729d9c136", "score": "0.0", "text": "public function run()\n {\n $permission = new Permission();\n $permission->name = 'view';\n $permission->description = 'View';\n $permission->save();\n\n $permission = new Permission();\n $permission->name = 'create';\n $permission->description = 'Create';\n $permission->save();\n\n $permission = new Permission();\n $permission->name = 'update';\n $permission->description = 'Update';\n $permission->save();\n\n $permission = new Permission();\n $permission->name = 'delete';\n $permission->description = 'Delete';\n $permission->save();\n }", "title": "" } ]
[ { "docid": "f74cb2c339072d43cd3b96858a89c600", "score": "0.8112695", "text": "public function run()\n {\n $this->seeds();\n }", "title": "" }, { "docid": "33aedeaa083b959fa5f66e27a7da3265", "score": "0.8026505", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t//Genre\n \\DB::table('genres')->insert(\n \t['name' => 'Comedia seed', 'ranking' => 354784395, 'active' => 1]\n );\n\n \\DB::table('actors')->insert([\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5]\n ]);\n }", "title": "" }, { "docid": "8d9ddbc23166c0cafca145e7a525c10a", "score": "0.80032176", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n /* $faker = Faker::create();\n foreach (range(1,100) as $index) {\n DB::table('product')->insert([\n 'productName' => $faker->company,\n 'description' => $faker->text,\n 'productId' => $faker->randomNumber(),\n 'images' => $faker->image(),\n ]);\n }*/\n $faker = Faker::create();\n foreach (range(1,10) as $index) {\n DB::table('recital')->insert([\n 'pagesRecital' => $faker->text,\n 'pageId' => $faker->randomNumber(),\n ]);\n }\n }", "title": "" }, { "docid": "8113ba9f29863f44dc33dbd7c0f98245", "score": "0.796029", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n DB::table('users')->insert([\n // [\n // 'name' => 'Alan',\n // 'email' => '[email protected]',\n // 'password' => '1234'\n // ],\n // [\n // 'name' => 'Alice',\n // 'email' => '[email protected]',\n // 'password' => '1234'\n // ],\n [\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => Hash::make( 'admin' )\n ],\n ]);\n \n // Création de 10 authors en utilisant la factory\n // la fonction factory de Laravel permet d'utiliser le facker définit\n factory(App\\Author::class, 10)->create();\n $this->call(BookTableSeeder::class);\n }", "title": "" }, { "docid": "424a278b0bd7df7af33c6c946314dcb5", "score": "0.7928953", "text": "public function run()\n {\n Model::unguard();\n\n // $this->call(UserTableSeeder::class);\n factory(App\\User::class, 100)->create();\n\n factory(App\\Category::class, 10)->create()->each(function ($c) {\n $c->audiobook()->saveMany(factory(App\\AudioBook::class, 10)->create()->each(function ($d) {\n $d->audiobookChapter()->saveMany(factory(App\\AudioBookChapter::class, 10)->create()->each(function ($chapter) use ($d) {\n $chapter->purchase()->saveMany(factory(App\\Purchase::class, 10)->create()->each(function ($purchase) use ($d, $chapter) {\n $purchase->user_id = User::all()->random(1)->id;\n $purchase->audiobookChapter_id = $chapter->id;\n $purchase->audiobook_id = $d->id;\n }));\n\n }));\n $d->review()->save(factory(App\\Review::class)->make());\n $d->wishlist()->save(User::all()->random(1));\n }));\n });\n\n\n factory(App\\Collection::class, 10)->create()->each(function ($c) {\n $c->audiobook()->saveMany(factory(App\\AudioBook::class, 5)->create()->each(function ($d) {\n $d->category_id = Category::all()->random(1)->id;\n }));\n });\n\n Model::reguard();\n }", "title": "" }, { "docid": "2fca9bf0725abd081819588688399860", "score": "0.7926935", "text": "public function run()\n {\n $this->call(VideogameSeeder::class);\n $this->call(CategorySeeder::class);\n User::factory(15)->create();\n DB::table('users')->insert([\n 'name' => 'Santiago',\n 'email' => '[email protected]',\n 'password' => bcrypt('12345678'),\n 'address' => 'C/ Ultra',\n 'rol' => 'admin'\n ]);\n //Ratin::factory(50)->create();\n Purchase::factory(20)->create();\n //UserList::factory(1)->create();\n }", "title": "" }, { "docid": "29a4267326dbe1e561d79877123a4ef8", "score": "0.79262906", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory('App\\User', 10)->create();\n factory('App\\School', 10)->create();\n factory('App\\Department', 20)->create();\n factory('App\\Course', 40)->create();\n factory('App\\CourseContent', 40)->create();\n factory('App\\CourseMaterial', 120)->create();\n factory('App\\Library', 200)->create();\n factory('App\\Download', 200)->create();\n factory('App\\Preview', 200)->create();\n factory('App\\Image', 5)->create();\n factory('App\\Role', 2)->create();\n }", "title": "" }, { "docid": "23ad0adf7c7d172d03ff87f186b2b80d", "score": "0.7900386", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n ['nome' => 'Wiiliam',\n 'usuario' => 'will',\n 'cpf' => '033781783958',\n 'tipo' => 'ADM',\n 'ativo' => 1,\n 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm'//secret\n ] \n ]);\n DB::table('dentes')->insert([\n ['nome' => 'canino', 'numero' => 39],\n ['nome' => 'molar', 'numero' => 2],\n ['nome' => 'presa', 'numero' => 21]\n ]);\n\n DB::table('servicos')->insert([\n ['nome' => 'Restauração', 'ativo' => 1],\n ['nome' => 'Canal', 'ativo' => 1],\n ['nome' => 'Limpeza', 'ativo' => 1]\n ]);\n }", "title": "" }, { "docid": "c5b1891e5f39d3e2551b908d083d5516", "score": "0.78698856", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n Poll::create([\n 'user_id' => 1,\n 'poll_name' => 'How much do you like me?',\n 'is_public' => 1,\n 'nr_choice' => 0\n ]);\n \n Votes::create([\n 'user_id' => 1,\n 'vote_to_poll' => 2\n ]);\n\n Choices::create([\n 'choice_id'=> 1,\n 'choice_text'=>'A lot.',\n 'choice_to_poll'=>1,\n 'nr_votes'=>260\n ]);\n\n Choices::create([\n 'choice_id'=> 2,\n 'choice_text'=>'A little.',\n 'choice_to_poll'=>1,\n 'nr_votes'=>178\n ]);\n }", "title": "" }, { "docid": "5b3dd72a68cd7caf5cb41622cf1f17f8", "score": "0.78664595", "text": "public function run()\n {\n // Truncate existing record in book table\n Book::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // Create dummy records in our table books:\n for ($i = 0; $i < 50; $i++) {\n Book::create([\n 'title' => $faker->title,\n 'author' => $faker->name,\n ]);\n }\n }", "title": "" }, { "docid": "0edef3cdac4be0882cf354181e1a63fd", "score": "0.7847239", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::table('users')->truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $faker = \\Faker\\Factory::create();\n\n $ranks = Rank::all();\n $roles = Role::all();\n\n // And now, let's create a few users in our database:\n for ($i = 0; $i < 5; $i++) {\n User::create([\n 'username' => \"user_$i\",\n 'pilot_callsign' => $faker->numerify('SCI###'),\n 'rank_id' => $ranks[rand ( 0 , $ranks->count()-1 )]->id,\n 'role_id' => $roles[0]->id\n ]);\n }\n }", "title": "" }, { "docid": "1696cae69b4e0dea414a1cad524c579c", "score": "0.78417265", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class, 10)->create();\n factory(Product::class, 20)->create();\n factory(Category::class, 8)->create();\n factory(Portfolio::class, 8)->create();\n factory(Article::class, 30)->create();\n }", "title": "" }, { "docid": "124d9b3ae818d6f7c553836f83b3f26d", "score": "0.7836289", "text": "public function run()\n {\n Schema::disableForeignKeyConstraints();\n\n // $this->call(UserSeeder::class);\n DB::table('teams')->truncate();\n DB::table('users')->truncate();\n DB::table('campaigns')->truncate();\n DB::table('memberships')->truncate();\n\n Schema::enableForeignKeyConstraints();\n\n // add users \n $usersfile = 'database/csvs/users.csv';\n $users = HelpersCsvHelper::csvToArray($usersfile);\n for ($i = 0; $i < count($users); $i++) {\n User::firstOrCreate($users[$i]);\n }\n\n // add teams\n $teamsfile = 'database/csvs/teams.csv';\n $teams = HelpersCsvHelper::csvToArray($teamsfile);\n for ($i = 0; $i < count($teams); $i++) {\n Teams::firstOrCreate($teams[$i]);\n }\n\n // add campaigns\n $Campaignsfile = 'database/csvs/campaigns.csv';\n $campaigns = HelpersCsvHelper::csvToArray($Campaignsfile);\n for ($i = 0; $i < count($campaigns); $i++) {\n Campaigns::firstOrCreate($campaigns[$i]);\n }\n\n // add memberships\n $Membershipsfile = 'database/csvs/memberships.csv';\n $memberships = HelpersCsvHelper::csvToArray($Membershipsfile);\n for ($i = 0; $i < count($memberships); $i++) {\n Memberships::firstOrCreate($memberships[$i]);\n }\n }", "title": "" }, { "docid": "7e308ea06065b02bb3be211e8748bf5f", "score": "0.7835999", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n DB::table('partidos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipo' => 1,\n ]);\n DB::table('partidos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipo' => 2,\n ]);\n DB::table('partidos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipo' => 3,\n ]);\n DB::table('partidos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipo' => 4,\n ]);\n DB::table('Puntos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipos' => 1,\n ]);\n DB::table('Puntos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipos' => 2,\n ]);\n DB::table('Puntos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipos' => 3,\n ]);\n DB::table('Puntos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipos' => 4,\n ]);\n }", "title": "" }, { "docid": "9d2abe13b05f99177e4f0e0cdd336b85", "score": "0.78325504", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(Category::class, 10)->create();\n factory(Blog::class, 10)->create();\n }", "title": "" }, { "docid": "29381516f53bafb0bf8797720ed6de7b", "score": "0.78240335", "text": "public function run()\n {\n\n $datas = [\n ['text' => 'Migracion'],\n ['text' => 'Familia'],\n ];\n\n\n foreach($datas as $data){\n \n $this->createSeeder($data);\n\n }\n }", "title": "" }, { "docid": "51daed999a883c3842fb92fb9bf4889b", "score": "0.78238165", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory('App\\User'::class, 20)->create();\n factory('App\\Post'::class, 1000)->create();\n factory('App\\Comment'::class, 2000)->create();\n }", "title": "" }, { "docid": "778b6afd89da9f29737c3c12e565289e", "score": "0.78130686", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Sid',\n 'email' => '[email protected]',\n 'role' => 'admin',\n 'password' => bcrypt(env('SEED_PWD')),\n ]);\n\n // 10 categorie\n $categories = factory(Category::class, 10)->create();\n\n // 20 tags\n $tags = factory(Tag::class, 20)->create();\n\n // 9 utenti\n factory(User::class, 9)->create();\n $users = User::all();\n // x ogni utente 15 posts\n foreach ($users as $user) {\n $posts = factory(Post::class, 15)->create([\n 'user_id' => $user->id,\n 'category_id' => $categories->random()->id,\n ]);\n\n foreach ($posts as $post) {\n $post->tags()->sync($tags->random(3)->pluck('id')->toArray());\n }\n }\n }", "title": "" }, { "docid": "770b2d73679fa00839175bb0616cbdea", "score": "0.78115416", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class,10)->create();\n factory(Product::class,100)->create();\n factory(Review::class,500)->create();\n }", "title": "" }, { "docid": "85cccae108d4de7f16063966a5657344", "score": "0.7810694", "text": "public function run()\n {\n\n $faker = \\Faker\\Factory::create();\n\n \\DB::table('news_categories')->delete();\n\n for ($i = 0; $i <= 10; $i++) {\n \\App\\Models\\NewsCategory::create([\n 'name' => $faker->text(40)\n ]);\n }\n\n \\DB::table('news')->delete();\n\n for ($i = 0; $i <= 40; $i++) {\n \\App\\Models\\News::create([\n 'title' => $faker->text(100),\n 'author_id' => 1,\n 'publish_date' => \\Carbon\\Carbon::now()->addDays(rand(1, 10)),\n 'content' => $faker->text(),\n 'source' => $faker->text(50),\n 'status' => rand(0, 1)\n ]);\n }\n }", "title": "" }, { "docid": "8ad50814f16b74d56ba096d0d57f2685", "score": "0.7809736", "text": "public function run()\n {\n $this->call(LaratrustSeeder::class);\n // $this->call(UsersTableSeeder::class);\n $discount = factory(\\App\\Discount::class, 1)->create();\n\n $categories = factory(\\App\\Category::class, 8)->create();\n $products = factory(\\App\\Product::class, 10)->create();\n $address=factory(\\App\\Users_address::class, 24)->create();\n $this->call(DiscountTableSeeder::class);\n $this->call(m_imagesTableSeeder::class);\n\n $images = factory(\\App\\m_image::class, 2)->create();\n\n }", "title": "" }, { "docid": "b762d028067463470324860cc9a29e0e", "score": "0.7805969", "text": "public function run(): void\n {\n $this->seedUsers();\n $this->seedCategories();\n $this->seedMedia();\n $this->seedProducts();\n $this->seedOrders();\n }", "title": "" }, { "docid": "4f83d3fdd97b667f526563987d1e2e6b", "score": "0.7802494", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Student::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now let's generate a few students for our app:\n $students = App\\User::where('role', 'Student')->get();\n foreach ($students as $student) {\n \tStudent::create([\n 'address' => $faker->city, \n 'user_id' => $student->id,\n ]);\t\t \n\t\t}\n }", "title": "" }, { "docid": "36b206fe3f9e5582fff99bdd44c268e2", "score": "0.77952313", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Edson Chivambo',\n 'email' => '[email protected]',\n 'password' => bcrypt('002523'),\n 'provincia_id' => '1',\n 'distrito_id' => '101',\n 'grupo' => '2'\n ]);\n\n\n DB::table('users')->insert([\n 'name' => 'Emidio Nhacudima',\n 'email' => '[email protected]',\n 'password' => bcrypt('Psi12345'),\n 'provincia_id' => '1',\n 'distrito_id' => '101',\n 'grupo' => '2'\n ]);\n/*\n // Let's truncate our existing records to start from scratch.\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 'title' => $faker->sentence,\n 'body' => $faker->paragraph,\n ]);\n }\n*/\n }", "title": "" }, { "docid": "914dd54501738d8f24f08d44c10d6a1f", "score": "0.77949405", "text": "public function run()\n {\n // default seeder to create fake users by using users factory\n // \\App\\Models\\User::factory(10)->create();\n\n // truncate deletes data or row from db. so when seed is run firsly it will delete the existing fiels\n // Product::truncate();\n // Category::truncate();\n // * first way for database seeding\n // creating a category and then passing it to create a product in seeder\n // $category = Category::create([\n // \"name\" => \"Headphones\",\n // \"description\" => \"This Category contains Headphones\"\n // ]);\n\n // Product::create([\n // \"product_name\" => \"Iphone\",\n // \"product_desc\" => \"An Iphone uses IOS and is developed by Apple\",\n // \"price\" => \"100000\",\n // \"category_id\" => $category->id\n // ]);\n // * using second method for creating/seeding fake data using factory \n // Category::factory(5)->create();\n //* overriding the default category_id of the factory in seeder\n Product::factory(3)->create([\n 'category_id' => 5\n ]);\n }", "title": "" }, { "docid": "73bbd2eb8a462a3994465397aabc387c", "score": "0.7793759", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $users = factory(App\\User::class, 5)->create();\n $product = factory(App\\Product::class, 50)->create();\n $reviews = factory(App\\Review::class, 100)->create()\n ->each(function ($review) {\n $review->reviews()->save(factory(App\\Product::class)->make());\n });\n }", "title": "" }, { "docid": "c3d306bf3f72eced986330e8fcc2293f", "score": "0.77799016", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(CategoriesTableSeeder::class);\n $this->call(ProductsTableSeeder::class);\n $this->call(PostsTableSeeder::class);\n $this->call(PagesTableSeeder::class);\n\n $id = DB::table('seos')->insertGetId([\n 'link' => url('/'),\n 'priority' => 0,\n 'status' => 'publish',\n ]);\n foreach (['vi','en'] as $lang) {\n DB::table('seo_languages')->insert([\n 'title' => 'Trang chủ',\n 'slug' => 'trang-chu',\n 'language' => $lang,\n 'seo_id' => $id,\n ]);\n }\n }", "title": "" }, { "docid": "89ccfc64e34980c1c88e0ac32bd95ed7", "score": "0.7779508", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n \tforeach (range(1,10) as $index) {\n\t DB::table('tags')->insert([\n\t 'title' => $faker->title,\n\t 'slug' => $faker->slug,\n\t \n\t ]);\n\t}\n }", "title": "" }, { "docid": "17ed7bd7f1c8118ed9c57701c65a3308", "score": "0.7774864", "text": "public function run()\n {\n require_once 'vendor/fzaninotto/faker/src/autoload.php';\n $faker = \\Faker\\Factory::create();\n\n// \\DB::table('articles')->delete();\n\n foreach (range(1, 50) as $index) {\n dump($faker->name);\n DB::table('articles')->insert([\n 'name' => $faker->name,\n 'description' => $faker->text($maxNbChars = 400),\n 'slug' => $index,\n 'autor_id' => 2\n ]);\n };\n \n }", "title": "" }, { "docid": "bd7aa608e63a171552e3b4da3b24f5ac", "score": "0.77732813", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Product::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 Product::create([\n 'product_name' => \"Product-\".$i,\n 'description' => \"Product-\".$i.\" Good Product\",\n 'price' => 1000,\n 'offer' => 10,\n 'category_id' => 1,\n 'p_status' => 'A',\n ]);\n }\n }", "title": "" }, { "docid": "c0702e537f33df7826aad62896f41818", "score": "0.77731556", "text": "public function run()\n {\n\n \tif(env('DB_DRIVER')=='mysql')\n\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=0;');\t\n\n\t\t\tDB::table('pages')->truncate();\n\n $faker = Faker::create();\n \t$cours = Db::table('cours')->lists('id') ;\n\n \tforeach (range(1,25) as $key => $value ) {\n\n \t\tPage::create([\n \t\t'title'=>$faker->sentence(3),\n \t\t'body'=>$faker->paragraph(4),\n \t\t'cour_id'=>$faker->randomElement($cours) \n\t ]);\n \t}\n\n \tif(env('DB_DRIVER')=='mysql')\n\t\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=1;') ;\n }", "title": "" }, { "docid": "a00d7625c3ac246fb4c8d0c5f542c844", "score": "0.7772737", "text": "public function run()\n {\n \n /*inserting dummy data, if we want to insert a 1000 of data,every seeder foreach table, it insert 1 data*/\n // DB::table('users')->insert([\n // 'name'=>str_Random(10), \n // 'email'=>str_random(10).'@gmail.com',\n // 'password'=>bcrypt('secret')\n // ]);\n //ro run : php artisan db:seed\n\n\n /**ANOTHER WAY */\n\n //User::factory()->count(10)->hasPosts(1)->create(); //if the user has a relation with post\n User::factory()->count(10)->create();\n\n \n \n }", "title": "" }, { "docid": "7610e7d2e2f861ae0a32e114a63a583f", "score": "0.77626514", "text": "public function run()\n {\n App\\Models\\BusinessItemSetupCases::create([\n 'id'=>100,\n 'item_case_name' => 'الضريبه',\n 'notes' => 'from seeder '\n ]);\n\n App\\Models\\BusinessItemSetupCases::create([\n 'id'=>101,\n 'item_case_name' => 'المشتريات',\n 'notes' => 'from seeder '\n ]);\n\n App\\Models\\BusinessItemSetupCases::create([\n 'id'=>102,\n 'item_case_name' => 'المبيعات',\n 'notes' => 'from seeder '\n ]);\n\n App\\Models\\BusinessItemSetupCases::create([\n 'id'=>103,\n 'item_case_name' => 'السيوله النقديه',\n 'notes' => 'from seeder '\n ]);\n }", "title": "" }, { "docid": "52b78ebee14aac0ddb50ea401a6a927b", "score": "0.776243", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\Models\\admin::class, 50)->create();\n factory(App\\Models\\category::class, 20)->create();\n factory(App\\Models\\clinic::class, 20)->create();\n factory(App\\Models\\nurse::class, 50)->create();\n factory(App\\Models\\Patient::class, 200)->create();\n factory(App\\Models\\comment::class, 500)->create();\n factory(App\\Models\\material::class, 500)->create();\n factory(App\\Models\\prescription::class, 500)->create();\n factory(App\\Models\\receipt::class, 400)->create();\n factory(App\\Models\\reservation::class, 600)->create();\n factory(App\\Models\\worker::class, 200)->create();\n // factory(App\\Models\\image::class, 500)->create();\n }", "title": "" }, { "docid": "b373718e9c234dc4bb756553db264c76", "score": "0.7762365", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call([\n RolesTableSeeder::class,\n UsersTableSeeder::class,\n PagesTableSeeder::class\n ]);\n\n \n \\Illuminate\\Support\\Facades\\DB::table('tbl_introductions')->insert([ \n 'fullname' => 'Ben Wilson',\n 'dob' => '26 September 1999',\n 'email' => '[email protected]',\n 'intro' => 'Hello, I am Ben.',\n 'image' => '1606288979.jpg', \n 'website' => 'www.company.co',\n 'created_at' => '2020-11-24 06:03:28' \n ]);\n }", "title": "" }, { "docid": "6d6a917428726975dd96f2e4e353f871", "score": "0.77620876", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Personas::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 Personas::create([\n 'nombre' => $faker->sentence,\n 'nit' => $faker->paragraph,\n ]);\n }\n }", "title": "" }, { "docid": "0b05db86e70b2e211fbf0469301f7d9a", "score": "0.7761681", "text": "public function run()\n {\n //\n DB::table('employees')->delete();\n $faker = Faker\\Factory::create();\n foreach(range(1,50) as $index)\n {\n Employee::create([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'avatar' => '',\n 'address' => $faker->address,\n 'phone'=> rand(0,9999).'-'.rand(0,9999).'-'.rand(0,9999),\n ]);\n }\n }", "title": "" }, { "docid": "df7b256adbff916fcdd12b520b0dc208", "score": "0.7760763", "text": "public function run() {\n\n\t\t// $this->call('ArticlesTableSeeder::class');\n\t\t// $this->call('CategoriesTableSeeder::class');\n\t\t// factory(App\\Article::class, 50)->create()->each(function ($u) {\n\t\t// \t$u->posts()->save(factory(App\\Article::class)->make());\n\t\t// });\n\n\t}", "title": "" }, { "docid": "e7527a5bc8529a2c2aad4c53046ea43d", "score": "0.7758918", "text": "public function run()\n {\n //\\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Section::factory(10)->create();\n // \\App\\Models\\Classe::factory(20)->create();\n // \\App\\Models\\Eleve::factory(120)->create();\n // \\App\\Models\\Stock::factory(2)->create();\n // \\App\\Models\\Category::factory(5)->create();\n // \\App\\Models\\Product::factory(120)->create();\n\n $this->call([\n AnneScolaireSeeder::class\n ]);\n }", "title": "" }, { "docid": "8efc8b6977291a12f6f3aba05752eca3", "score": "0.7758882", "text": "public function run()\n {\n $this->runSeeder();\n }", "title": "" }, { "docid": "7b81b233cbf3938d421802fdd7f8d35b", "score": "0.77587956", "text": "public function run()\n {\n $categories = [\n [\n 'name' => 'Groenten',\n 'description' => '',\n ],\n [\n 'name' => 'Fruit',\n 'description' => '',\n ],\n [\n 'name' => 'Zuivel',\n 'description' => '',\n ],\n [\n 'name' => 'Vlees',\n 'description' => '',\n ],\n ];\n\n foreach($categories as $category){\n Category::create($category);\n }\n\n //factory(Category::class, DatabaseSeeder::AMOUNT['DEFAULT'])->create();\n }", "title": "" }, { "docid": "3d3644d7189413baa46373e1ac7cdc8f", "score": "0.7754973", "text": "public function run()\n\t{\n\t\tDB::table('posts')->truncate();\n\n $faker = Faker\\Factory::create();\n\n\t\t$posts = [\n [\n 'title' => $faker->sentence(6),\n 'content' => $faker->paragraph(8),\n 'slug' => Str::slug('Hello World'),\n 'user_id' => User::first()->id,\n 'category_id' => Category::whereName('Php')->first()->id,\n 'created_at' => new DateTime,\n 'updated_at' => new DateTime\n ]\n ];\n\n\t\t// Uncomment the below to run the seeder\n\t\tfor ($i=0; $i < 10; $i++) {\n $tag = DB::table('tags')->orderBy('RAND()')->first();\n\n $post_title = $faker->sentence(6);\n\n $post = [\n 'title' => $post_title,\n 'content' => $faker->paragraph(8),\n 'slug' => Str::slug($post_title),\n 'user_id' => $faker->randomElement(User::all()->lists('id')),\n 'category_id' => $faker->randomElement(Category::all()->lists('id')),\n 'created_at' => $faker->dateTime,\n 'updated_at' => new DateTime\n ];\n\n $id = DB::table('posts')->insert($post);\n Post::find($id)->tags()->sync(Tag::all()->lists('id'));\n }\n\n // $this->command->info('Posts table seeded !');\n\t}", "title": "" }, { "docid": "ab9c424e435c82e381ba211c2fe79243", "score": "0.7753077", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n // User::factory()->count(200)\n // ->has(Order::factory()->count(random_int(1, 20)))\n // ->has(Assigned_order::factory()->count(random_int(1,5)))\n // ->has(Blocked_writer::factory()->count(random_int(0, 2)))\n // ->has(Favourite_writer::factory()->count(random_int(0, 5)))\n // ->has(Payed_order::factory()->count(random_int(2, 6)))\n // ->has(Notification::factory()->count(random_int(5, 20)))\n // ->has(Review::factory()->count(random_int(1, 2)))\n // ->has(Assigned_order::factory()->count(random_int(1, 3)))\n // ->create();\n }", "title": "" }, { "docid": "34546962185839c8810e561de7b0508a", "score": "0.77510494", "text": "public function run()\n {\n //$this->call(RestaurantTableSeeder::class);\n factory(App\\User::class,5)->create();\n factory(App\\Model\\Restaurant::class, 10)->create()->each(function ($restaurant) {\n $restaurant->contacts()->save(factory(App\\Model\\Contact::class)->make());\n });\n factory(App\\Model\\Menu::class,30)->create();\n factory(App\\Model\\Item::class,100)->create();\n factory(App\\Model\\Option::class,200)->create();\n factory(App\\Model\\MultiCheckOption::class, 500)->create();\n factory(App\\Model\\Customer::class, 100)->create();\n factory(App\\Model\\Order::class, 300)->create();\n }", "title": "" }, { "docid": "e92b39c751271622081fe6a63248f0d3", "score": "0.7745997", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n Seo::create([\n 'url' => '/',\n 'title' => 'title default',\n 'keywords' => 'keywords default',\n 'description' => 'description default',\n ]);\n\n User::create([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('1234567'),\n ]);\n }", "title": "" }, { "docid": "e5d1626abf07334bad40def153b6ebf5", "score": "0.7744136", "text": "public function run()\n {\n $this->call(UserSeeder::class);\n $this->call(CategorySeeder::class);\n $this->call(MediaSeeder::class);\n //$this->call(GuestSeeder::class);\n $faker = Faker::create();\n \tforeach (range(1,10) as $index) {\n\t DB::table('guests')->insert([\n 'roomnumber' => Category::all()->random()->id,\n 'name' => $faker->firstName,\n 'surname' => $faker->name,\n 'email' => $faker->email,\n 'phonenumber' => $faker->phoneNumber\n\t ]);\n\t }\n\n }", "title": "" }, { "docid": "8da9a1776904f6cc6a5ccc3953a8e40f", "score": "0.7742624", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('products')->insert([\n 'name' => 'Basil',\n 'price' => 0.99,\n 'description' => 'Perhaps the most popular and widely used culinary herb.',\n ]);\n DB::table('products')->insert([\n 'name' => 'Bay Laurel',\n 'price' => 1.99,\n 'description' => 'Bay laurel is an evergreen shrub or tree in warmer growing zones ( 8 and above).',\n ]);\n DB::table('products')->insert([\n 'name' => 'Borage',\n 'price' => 2.99,\n 'description' => 'Borage is a coarse textured plant growing to about 2-3 feet.',\n ]);\n DB::table('products')->insert([\n 'name' => 'Caraway',\n 'price' => 3.99,\n 'description' => 'Caraway is most often grown for its seeds, but the root and leaves are also edible.',\n ]);\n DB::table('products')->insert([\n 'name' => 'Catnip',\n 'price' => 4.99,\n 'description' => 'Catnip is a hardy perennial with an open mound shaped habit growing to about 2-3 feet tall.',\n ]);\n\n }", "title": "" }, { "docid": "cac69861fb7a00c50daa5b54ee724177", "score": "0.7740592", "text": "public function run()\n {\n //\n DB::table('Proveedores')->insert([\n \t[\n \t'nombre'=> 'juan perez',\n \t'marca'=> 'matel',\n \t'correo_electronico'=> '[email protected]',\n \t'direccion'=>'av. peru 321,santiago',\n \t'fono'=> 993842739\n \t]\n ]);\n\n $faker=Faker::create();\n for ($i=0; $i <20 ; $i++) { \n DB::table('Proveedores')->insert([\t\n \t'nombre'=> $faker->name,\n \t'marca'=>$faker->company,\n \t'correo_electronico'=> $faker->email,\n \t'direccion'=>$faker->address,\n \t'fono'=> $faker->isbn10 ,\n ]);\n }\n }", "title": "" }, { "docid": "9a3fc5f60166a9785c73750188e6596d", "score": "0.7737875", "text": "public function run()\n {\n // $this->call(UserTableSeeder::class);\n /*\n DB::table('product')->insert([\n 'title' => 'Ceci est un titre de produit',\n 'description' => 'lorem ipsum',\n 'price' => 12,\n 'brand' => 'nouvelle marque',\n ]);\n */\n factory(App\\Product::class, 2)->create();\n factory(App\\Categorie::class, 2)->create();\n }", "title": "" }, { "docid": "b6066308d0ac655bb5d5825a458ef8b1", "score": "0.77361476", "text": "public function run()\n {\n $this->call(RolesTableSeeder::class);\n $this->call(LangauageTableSeeder::class);\n $this->call(CountryTableSeeder::class);\n\n \n\n Country::create([\n 'name' => 'India'\n ]);\n\n Country::create([\n 'name' => 'USA'\n ]);\n\n Country::create([\n 'name' => 'UK'\n ]);\n\n CompanyCateogry::updateOrCreate([\n 'name' => 'category1'\n ]);\n\n factory(App\\Models\\Customer::class, 50)->create();\n factory(App\\Models\\Supplier::class, 50)->create();\n // $this->call(CompanySeeder::class);\n $this->call(InvoiceSeeder::class);\n $this->call(CashFlowSeeder::class);\n }", "title": "" }, { "docid": "8de228115e4192b5098d2a339ff99bf2", "score": "0.7735688", "text": "public function run()\n {\n //delete the users table when the seeder is called\n DB::table('users')->delete();\n\n Eloquent::unguard();\n\n\t\t//disable foreign key before we run the seeder\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n factory(App\\User::class, 50)->create();\n\n //Also create these accounts - used for easy testing purposes\n DB::table('users')->insert([\n [\n 'name' => 'Test',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'email_verified_at' => now(),\n 'bio' => 'Sed ut perspiciatis unde omnis iste natus',\n ],\n [\n 'name' => 'Test2',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'email_verified_at' => now(),\n 'bio' => 'Sed ut perspiciatis unde omnis iste natus',\n\n ],\n ]);\n }", "title": "" }, { "docid": "e0d9bd8b4c025867e30c1a5579c4da9c", "score": "0.7734883", "text": "public function run()\n {\n\n $this->call([\n EstadosSeeder::class,\n MunicipiosSeeder::class,\n RelacionEstadosMunicipiosSeeder::class,\n StatusSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Categories::factory()->count(20)->create();\n \\App\\Models\\Products::factory()->count(100)->create();\n \\App\\Models\\Galery::factory()->count(1000)->create();\n \\App\\Models\\Providers::factory()->count(20)->create();\n \\App\\Models\\Valorations::factory()->count(1000)->create();\n \\App\\Models\\Sales::factory()->count(999)->create();\n \\App\\Models\\Directions::factory()->count(999)->create();\n \\App\\Models\\LastView::factory()->count(999)->create();\n \\App\\Models\\Offers::factory()->count(20)->create();\n // \\App\\Models\\Favorites::factory()->count(50)->create();\n \\App\\Models\\Notifications::factory()->count(999)->create();\n /**\n * $this->call([\n * CategoriesSeeder::class,\n * ]);\n */\n\n $this->call([\n FavoritesSeeder::class,\n ]);\n\n }", "title": "" }, { "docid": "79751b67da244a7913b06f140364d6c0", "score": "0.7732834", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n User::truncate();\n PartCategory::truncate();\n Brand::truncate();\n Manufacturer::truncate();\n PartSubcategory::truncate();\n Part::truncate();\n Admin::truncate();\n\n $usersQuantity = 500;\n $categoriesQuantity = 30;\n $subCategoriesQuantity = 200;\n $partQuantity = 1000;\n $brandQuantity = 20;\n $manufacturerQuantity = 50;\n $adminQuantity = 10;\n\n factory(User::class, $usersQuantity)->create();\n factory(PartCategory::class, $categoriesQuantity)->create();\n factory(Brand::class, $brandQuantity)->create();\n factory(Manufacturer::class, $manufacturerQuantity)->create();\n\n factory(PartSubcategory::class, $subCategoriesQuantity)->create();\n factory(Part::class, $partQuantity)->create();\n\n factory(Admin::class, $adminQuantity)->create();\n\n }", "title": "" }, { "docid": "fb7d5bba21289ca1ca2041a5e18bd077", "score": "0.77297103", "text": "public function run()\n {\n// factory(Category::class, 20)->create();\n// factory(Post::class, 50)->create();\n// factory(Tag::class, 10)->create();\n\n $this->call(UserTableSeed::class);\n $this->call(PostTableSeed::class);\n }", "title": "" }, { "docid": "77fb1d45e59d982eac35251a4446cfa5", "score": "0.7728479", "text": "public function run()\n {\n //Cmd: php artisan db:seed --class=\"recommendTableSeeder\"\n \n $faker = Faker\\Factory::create(\"ja_JP\");\n \n for( $i=0; $i<10; $i++ ){\n\n App\\Recommend::create([\n\t\t\t\t\t\"from_user\" => $faker->randomDigit(),\n\t\t\t\t\t\"to_man\" => $faker->randomDigit(),\n\t\t\t\t\t\"to_woman\" => $faker->randomDigit(),\n\t\t\t\t\t\"to_man_message\" => $faker->word(),\n\t\t\t\t\t\"to_woman_message\" => $faker->word(),\n\t\t\t\t\t\"man_qa_1\" => $faker->randomDigit(),\n\t\t\t\t\t\"man_qa_2\" => $faker->randomDigit(),\n\t\t\t\t\t\"man_qa_3\" => $faker->randomDigit(),\n\t\t\t\t\t\"woman_qa_1\" => $faker->randomDigit(),\n\t\t\t\t\t\"woman_qa_2\" => $faker->randomDigit(),\n\t\t\t\t\t\"woman_qa_3\" => $faker->randomDigit(),\n\t\t\t\t\t\"created_at\" => $faker->dateTime(\"now\"),\n\t\t\t\t\t\"updated_at\" => $faker->dateTime(\"now\")\n ]);\n }\n }", "title": "" }, { "docid": "95f6236854296207546d9b1517fa175a", "score": "0.77278304", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n\n // Create 10 records of posts\n factory(App\\Post::class, 10)->create()->each(function ($post) {\n // Seed the relation with 5 comments\n $commments = factory(App\\Comment::class, 5)->make();\n $post->comments()->saveMany($commments);\n });\n }", "title": "" }, { "docid": "1667303ce0032ddd973fad5eb00529bd", "score": "0.7726387", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('user_roles')->insert(['name' => 'System Admin', 'description' => 'Description',]);\n DB::table('user_roles')->insert(['name' => 'Owner', 'description' => 'System Owner',]);\n DB::table('user_roles')->insert(['name' => 'Admin', 'description' => 'Admin',]);\n DB::table('user_roles')->insert(['name' => 'Editor', 'description' => 'Editor',]);\n DB::table('user_roles')->insert(['name' => 'Viewer', 'description' => 'Viewer',]);\n }", "title": "" }, { "docid": "f198ce46b8e947563c34aa166ca6fd70", "score": "0.772602", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(\\App\\TourCategory::class, 4)->create()->each(function (\\App\\TourCategory $category) {\n $category->tours()->saveMany(\n factory(\\App\\Tour::class,10)->make()\n );\n });\n }", "title": "" }, { "docid": "377c3a872d4a300cceb5049caf48d66a", "score": "0.7725185", "text": "public function run()\n {\n $this->call([\n UsersTabeleSeeder::class,\n PostsTabeleSeeder::class,\n CategoriesTabeleSeeder::class,\n ]);\n\n //Get array of ids\n $postIds = DB::table('posts')->pluck('id')->all();\n $categoryIds = DB::table('categories')->pluck('id')->all();\n\n //Seed category_post table with max 40 entries\n foreach ((range(1, 70)) as $index) \n {\n DB::table('category_post')->updateOrInsert(\n [\n 'post_id' => $postIds[array_rand($postIds)],\n 'category_id' => $categoryIds[array_rand($categoryIds)]\n ]\n );\n }\n }", "title": "" }, { "docid": "e44b2f3d77d7329f6b2d733b04c6ab80", "score": "0.7718937", "text": "public function run()\n {\n // we can seed specific data directory\n /**\n Let's try \"Faker\" to prepopulate with lots of imaginery data very quickly!\n\n */\n\n $faker = Faker\\Factory::create();\n\n foreach(range(1, 25 ) as $index){\n \tDB::table( 'tweets')->insert(array(\n \t\t'user_id' => rand(1,25),\n \t\t'message' => $faker->catchphrase\n \t));\n }\n }", "title": "" }, { "docid": "064da3a1fd5b172768671dc5b6f1169d", "score": "0.7718056", "text": "public function run()\n {\n\n\n\n Storage::deleteDirectory('eventos');\n\n Storage::makeDirectory('eventos');\n\n $this->call(RoleSeeder::class);\n\n $this->call(UserSeeder::class);\n \n Categoria::factory(4)->create();\n \n $this->call(EventoSeeder::class);\n\n $this->call(AporteSeeder::class);\n\n $this->call(ObjetoSeeder::class);\n\n }", "title": "" }, { "docid": "f6e951e99c926a5aa070324982a80a85", "score": "0.7717371", "text": "public function run()\n {\n Model::unguard();\n\n $seedData = [\n 'Taiwan' => [\n 'Taipei City',\n 'New Taipei City',\n 'Taoyuan City',\n 'Taichung City',\n 'Kaohsiung City',\n 'Tainan City',\n 'Hsinchu City',\n 'Chiayi City',\n 'Keelung City',\n 'Hsinchu County',\n 'Miaoli County',\n 'Changhua County',\n 'Nantou County',\n 'Yunlin County',\n 'Chiayi County',\n 'Pingtung County',\n 'Yilan County',\n 'Hualien County',\n 'Taitung County',\n 'Kinmen County',\n 'Lienchiang County',\n 'Penghu County',\n ]\n ];\n\n foreach ($seedData as $countryName => $cityList) {\n $country = Country::create(['name' => $countryName]);\n\n foreach ($cityList as $cityName) {\n $country->cities()->create(['name' => $cityName]);\n }\n }\n\n Model::reguard();\n }", "title": "" }, { "docid": "4fc1f9ee76a037b3655d6f4e73603494", "score": "0.7714682", "text": "public function run()\n {\n //\n //factory(App\\User::class)->create();\n\n DB::table('users')->insert(\n [\n 'name' => 'Seyi', \n 'email' => '[email protected]',\n 'password' => 'somerandompassword'\n ]\n );\n DB::table('posts')->insert([\n [\n 'title' => 'My First Post', \n 'content' => 'lorem ipsum dolor sit ammet',\n 'user_id' => 1\n ], [\n 'title' => 'My second Post', \n 'content' => 'lorem ipsum dolor sit ammet',\n 'user_id' => 1\n ], [\n 'title' => 'My third Post', \n 'content' => 'lorem ipsum dolor sit ammet',\n 'user_id' => 1\n ]\n ]);\n \n \n }", "title": "" }, { "docid": "80b4dcada74bc12860abdaff1c2aa1bb", "score": "0.7712008", "text": "public function run()\n {\n $faker = Faker::create();\n foreach (range(1, 50) as $index) {\n DB::table('books')->insert([\n 'name' => $faker->firstName(),\n 'yearOfPublishing' => $faker->year(),\n 'content' => $faker->paragraph(1, true),\n 'author_id' => $faker->numberBetween(1, 50),\n ]);\n }\n }", "title": "" }, { "docid": "af51801570c9648f237f5a51624f4182", "score": "0.77119786", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(function($user){\n $user->question()->saveMany(factory(App\\Question::class,rand(1,5))->make())\n ->each(function($question){\n $question->answer()->saveMany(factory(App\\Answer::class,rand(1,5))->make());\n });\n });\n }", "title": "" }, { "docid": "bd6458274ff09172851640f92c233c59", "score": "0.77101403", "text": "public function run()\n {\n Schema::disableForeignKeyConstraints();\n \n User::truncate();\n TipoUsuario::truncate();\n Reserva::truncate();\n PuntuacionEstablecimiento::truncate();\n PuntuacionProducto::truncate();\n Producto::truncate();\n Imagen::truncate();\n Establecimiento::truncate();\n Carta::truncate();\n\n $this->call(TipoUsuarioSeeder::class);\n\n foreach (range(1, 10) as $i){\n $u = factory(User::class)->create();\n $u->usuarios_tipo()->attach(TipoUsuario::all()->random());\n }\n\n\n //factory(Establecimiento::class,4)->create();\n //factory(Reserva::class,20)->create();\n //factory(Carta::class, 4)->create(); //Crear tantas como restaurantes\n //factory(Producto::class,100)->create();\n //factory(PuntuacionEstablecimiento::class,50)->create();\n //factory(PuntuacionProducto::class,50)->create();\n //factory(Imagen::class,200)->create();\n\n Schema::enableForeignKeyConstraints(); \n }", "title": "" }, { "docid": "7d3aed410918c722790ec5e822681b71", "score": "0.7708702", "text": "public function run() {\n \n //seed should only be run once\n $faker = Faker::create();\n\n $cat = [\n 1 => \"Home Appliances\",\n 2 => \"Fashion\",\n 3 => \"Home & Living\",\n 4 => \"TV, Gaming, Audio, WT\",\n 5 => \"Watches, Eyewear, Jewellery\",\n 6 => \"Mobiles & Tablets\",\n 7 => \"Cameras\",\n 8 => \"Computers & Laptop\",\n 9 => \"Travel & Luggage\",\n 10 => \"Health & Beauty\",\n 11 => \"Sports, Automotive\",\n 12 => \"Baby, Toys\",\n ];\n\n for ($i = 1; $i <= 12; $i++) {\n DB::table('categories')->insert([\n 'name' => $cat[$i],\n 'image' => $faker->imageUrl($width = 640, $height = 480),\n \n 'created_at' => $faker->dateTimeThisYear($max = 'now'),\n 'updated_at' => \\Carbon\\Carbon::now(),\n ]);\n }\n }", "title": "" }, { "docid": "75f8fae397ad6cf1e3077c2a32e423ad", "score": "0.77076155", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n User::truncate();\n Category::truncate();\n Product::truncate();\n WarrantyProduct::truncate();\n\n factory(User::class, 200)->create();\n\n factory(Category::class, 10)->create()->each(\n function ($category){\n factory(Product::class, mt_rand(8,15))->create(['category_id' => $category->id])->each(\n function ($product){\n factory(WarrantyProduct::class, mt_rand(2, 3))->create(['product_id' => $product->id]);\n }\n );\n }\n );\n\n }", "title": "" }, { "docid": "8b07e67f8045192de7c1b932e58f1d17", "score": "0.77057153", "text": "public function run()\n {\n /*$faker = Faker\\Factory::create();\n foreach(range(1,10) as $index){\n App\\Post::create([\n 'title'=> $faker->name,\n 'description'=> $faker->name,\n 'content'=> $faker->name\n ]);\n }*/\n\n Post::create([\n 'title'->title,\n 'description'->description,\n 'content'->content\n ]);\n }", "title": "" }, { "docid": "ddf328298d79f78f3d971cd04aba1d68", "score": "0.7705306", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(RoleTableSeeder::class);\n $this->call(PermissionTableSeeder::class);\n\n\n factory(\\App\\Entities\\Category::class, 3)->create()->each(function ($c){\n $c->products()\n ->saveMany(\n factory(\\App\\Entities\\Product::class, 3)->make()\n );\n });\n }", "title": "" }, { "docid": "5f9901567b2bd8ddbdf263c78ddac102", "score": "0.7703055", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n \n // User Table Data\n /*for($i = 0; $i < 1000; $i++) {\n \tApp\\User::create([\n\t 'email' => $faker->email,\n\t 'password' => $faker->password,\n\t 'full_name' => $faker->name,\n\t 'phone_number' => $faker->name,\n\t ]);\n\t }*/\n\n // User Event Data\n\t /*for($i = 0; $i < 50; $i++) {\n \tApp\\Events::create([\n\t 'event_name' => $faker->name,\n\t 'event_date' => $faker->date,\n\t 'event_startTime' => '2019-01-01',\n\t 'event_duration' => '2',\n\t 'event_venue' => $faker->address,\n\t 'event_speaker' => '1',\n\t 'event_sponsor' => '3',\n\t 'event_topic' => $faker->text,\n\t 'event_details' => $faker->text,\n\t 'event_avatar' => $faker->imageUrl,\n\t 'created_at' => $faker->date(),\n\t ]);\n\t }*/\n }", "title": "" }, { "docid": "6fbcd5e15b63b9dabff8dbaff5d2ea82", "score": "0.77023256", "text": "public function run()\n {\n $faker = Factory::create();\n\n Persona::truncate();\n Pago::truncate();\n Detalle::truncate();\n\n // Schema::disableForeignKeyConstraints();\n User::truncate();\n // HaberDescuento::truncate();\n // Schema::enableForeignKeyConstraints();\n\n User::create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'dni' => '12345678',\n 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret\n 'remember_token' => Str::random(10),\n ]);\n\n // foreach (range(1, 25) as $i) {\n // $dni = mt_rand(10000000, 99999999);\n // Persona::create([\n // 'nombre' => $faker->firstname,\n // 'apellidoPaterno' => $faker->lastname,\n // 'apellidoMaterno' => $faker->lastname,\n // 'dni' => $dni,\n // 'codmodular' => '10' . $dni,\n // 'user_id' => 1,\n // 'estado' => $faker->randomElement(['activo', 'inactivo']),\n // ]);\n // }\n\n }", "title": "" }, { "docid": "2db117b1d28054b0f08a58115645189d", "score": "0.7701633", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n // ?for seeding categories\n // Category::factory(5)->create();\n //? for seeding posts \n Post::factory(3)->create([\n 'category_id' => 5\n ]);\n }", "title": "" }, { "docid": "4e84e995d3e716ac7ab157ddfcc67a39", "score": "0.7700629", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\Tag::class, 10)->create();\n\n // Get all the roles attaching up to 3 random roles to each user\n $tags = App\\Tag::all();\n\n\n factory(App\\User::class, 10)->create()->each(function($user) use ($tags){\n $user->save();\n factory(App\\Question::class, 5)->create(['user_id'=>$user->id])->each(function($question) use ($user, $tags){\n \n $question->tags()->attach(\n $tags->random(rand(1, 10))->pluck('id')->toArray()\n ); \n factory(App\\Comment::class, 5)->create(['user_id'=>$user->id, 'question_id'=>$question->id])->each(function($comment){\n $comment->save(); \n });\n });\n });\n }", "title": "" }, { "docid": "44607c99534f6f67a920e806653b05d8", "score": "0.76990753", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n \\App\\Models\\Rol::factory(10)->create();\n \\App\\Models\\Persona::factory(10)->create();\n \\App\\Models\\Configuracion::factory(10)->create();\n }", "title": "" }, { "docid": "5e28bc59cffaacbd443ac1937265c50b", "score": "0.76987165", "text": "public function run()\n {\n $this->call(PostsTableSeeder::class);\n $this->call(SiswaSeeder::class);\n $this->call(MusicsTableSeeder::class);\n $this->call(FilmSeeder::class);\n // $this->call(UsersTableSeeder::class);\n factory(App\\Tabungan::class, 100)->create();\n factory(App\\Costumer::class, 1000)->create();\n }", "title": "" }, { "docid": "55df2400596f6d82130eb26db7635b8b", "score": "0.7695885", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contact::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 Contact::create([\n 'first_name' => $faker->name,\n 'last_name' => $faker->name,\n 'email' => $faker->email,\n 'telephone' => $faker->phoneNumber,\n 'contact_type' => $faker->name,\n ]);\n }\n }", "title": "" }, { "docid": "d250f232a40eb13d0fa688dd5dc63e8c", "score": "0.7693821", "text": "public function run()\n {\n factory(App\\User::class,5)->create();\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'type' => 1,\n 'confirmed' =>1,\n ]);\n\n factory(App\\Category::class,5)->create();\n\n $categories_array = App\\Category::all('id')->pluck('id')->toArray();\n\n $post = factory(App\\Post::class,20)->create()->each(function($post) use ($categories_array){\n $this->attachRandomCategoriesToPost($post->id, $categories_array);\n $this->addCommentsToPost($post->id);\n });\n }", "title": "" }, { "docid": "f440a18e1170b8250c14144757b8cc81", "score": "0.76937693", "text": "public function run()\n\t{\n\t\t//\n\t\tApp\\Book::truncate();\n\t\tApp\\Genre::truncate();\n\t\tApp\\Author::truncate();\n\n\t\tfactory(App\\Book::class, 50)->create()->each(function($books) {\n\t\t$books->authors()->save(factory(App\\Author::class)->make());\n\t\t$books->genres()->save(factory(App\\Genre::class)->make());\n\t\t});\n\t}", "title": "" }, { "docid": "14bcfcdf178e55585d48d15b958ccfc6", "score": "0.7693058", "text": "public function run()\n {\n $data = json_decode(file_get_contents(database_path('seeds/data/voyager.json')), true);\n foreach ($data as $table => $tableData) {\n $this->command->info(\"Seeding ${table}.\");\n \\Illuminate\\Support\\Facades\\DB::table($table)->delete();\n \\Illuminate\\Support\\Facades\\DB::table($table)->insert($tableData);\n }\n\n// $this->seed('DataTypesTableSeeder');\n// $this->seed('DataRowsTableSeeder');\n $this->seed('MenusTableSeeder');\n// $this->seed('MenuItemsTableSeeder');\n $this->seed('RolesTableSeeder');\n $this->seed('PermissionsTableSeeder');\n $this->seed('PermissionRoleTableSeeder');\n $this->seed('SettingsTableSeeder');\n }", "title": "" }, { "docid": "dbd59b913d32cfed4a7fd5cda3083940", "score": "0.7692271", "text": "public function run()\n {\n //\n DB::table('oa')->delete();\n\n DB::table('oa')->insert([\n /*'id' => 1,*/\n /*'id_educativo' => 1,\n 'id_general' => 1,\n 'id_clasificacion' => 1,\n 'id_tecnica' => 1,*/\n ]);\n\n $this->call(Lom_generalSeeder::class);\n $this->call(Lom_clasificacionSeeder::class);\n $this->call(Lom_educativoSeeder::class);\n $this->call(Lom_tecnicaSeeder::class);\n }", "title": "" }, { "docid": "654191b89a3f7b4f8f809dd4ca1e2f6d", "score": "0.76909655", "text": "public function run()\n {\n /**\n * Create default user for admin, lecturer and student\n */\n User::create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('admin'),\n 'role' => 'admin'\n ]);\n\n User::create([\n 'name' => 'Sample Lecturer',\n 'email' => '[email protected]',\n 'password' => Hash::make('lecturer'),\n 'role' => 'admin'\n ]);\n\n User::create([\n 'name' => 'Student',\n 'email' => '[email protected]',\n 'password' => Hash::make('student'),\n 'role' => 'student'\n ]);\n\n /**\n * Create random 300 users with faker and role/password equal \"student\"\n */\n factory(App\\User::class, 300)->create();\n\n // run with php artisan migrate --seed\n }", "title": "" }, { "docid": "82fbb499231e85aef13b133c2fd7bebb", "score": "0.76907074", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Tomas Landa',\n 'email' => '[email protected]',\n 'password' => Hash::make('123456789'),\n ]);\n\n\n $this->call(AuthorSeeder::class);\n $this->call(BookSeeder::class);\n\n\n }", "title": "" }, { "docid": "7d5e2b097fa405f728e42815bc2fa95f", "score": "0.76902896", "text": "public function run()\n {\n Category::create(['name' => 'remeras']);\n Category::create(['name' => 'camperas']);\n Category::create(['name' => 'pantalones']);\n Category::create(['name' => 'gorras']);\n Category::create(['name' => 'mochilas']);\n Category::create(['name' => 'Sombreros']);\n Category::create(['name' => 'Muñequeras']);\n Category::create(['name' => 'Medias']);\n\n $discounts = Discount::factory(40)->create();\n\n $products = Product::factory(50)\n ->make()\n ->each(function ($product){\n $categories = Category::all();\n $product->category_id = $categories->random()->id;\n $product->save();\n });\n\n }", "title": "" }, { "docid": "acbc8ce8381dd5242a3f70eb7db2f7b0", "score": "0.76889795", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'name' => 'mohamed magdy',\n 'email' => '[email protected]'\n ]);\n factory(User::class)->create([\n 'name' => 'ahmed magdy',\n 'email' => '[email protected]'\n ]);\n factory(User::class)->create([\n 'name' => 'abdelhameed',\n 'email' => '[email protected]'\n ]);\n }", "title": "" }, { "docid": "1bfaef844c455e578ca42264d7b5fd55", "score": "0.76846653", "text": "public function run()\n {\n factory(User::class, 10)->create();\n factory(Category::class, 6)->create();\n factory(Question::class, 60)->create();\n factory(Reply::class, 160)->create();\n factory(Like::class, 200)->create();\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "b9641bc88f5f5c670d56d18a040a9927", "score": "0.7675924", "text": "public function run()\n {\n //création de seeder grace a faker\n // $faker = Faker::create();\n // for ($user = 0; $user < 10; $user++){\n // \\App\\User::create([\n // 'name' => $faker->name,\n // 'email' => $faker->unique()->safeEmail,\n // 'password' =>bcrypt('secret')\n // ]);\n // }\n \\App\\User::create([\n 'name' =>'Admin',\n 'email' => '[email protected]',\n 'password' =>bcrypt('adminadmin'),\n 'admin' =>1\n ]);\n\n\n //permet de créer des utilisateurs sans les relations\n factory(\\App\\User::class, 20)->create();\n\n //permet de créer 10 articles chacun écrit par un seul utilisateur\n // factory(\\App\\User::class, 10)->create()->each(function ($u) {\n // $u->articles()->save(factory(\\App\\Article::class)->make());\n // });\n\n //Permet de creer 20 articles par utilisateur -> 15x 20\n // $user = factory(\\App\\User::class, 15)->create();\n // $user->each(function ($user) {\n // factory(\\App\\Article::class, 20)->create([\n // 'user_id' => $user->id\n // ]);\n // });\n }", "title": "" }, { "docid": "0a79213fd15a52faa35b5d39bdf72ab9", "score": "0.7673569", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\Categoria::class, 2)->create();\n\n //Se crearan 40 post\n factory(App\\Curso::class, 40)->create();\n }", "title": "" }, { "docid": "3114ddd54d20a2718dff9452d5974cde", "score": "0.76679426", "text": "public function run()\n {\n $faker = Faker::create();\n foreach (range(1, 20) as $index) {\n \\DB::table('employees')->insert([\n 'name' => $faker->name,\n 'age' => rand(22, 40),\n 'email' => $faker->email,\n 'gender' => $faker->randomElement(array('male', 'female')),\n 'country' => $faker->country\n ]);\n }\n }", "title": "" }, { "docid": "032e6df09c32ce0c18c6e5a3dcfd03cd", "score": "0.76679265", "text": "public function run()\n {\n\t DB::table('roles')->insert([\n\t\t 'name' => 'admin'\n\t ]);\n\n\t DB::table('users')->insert([\n\t\t 'name' => 'David Trushkov',\n\t\t 'email' => '[email protected]',\n\t\t 'password' => bcrypt('d16331633'),\n\t\t 'remember_token' => str_random(10),\n\t\t 'verified' => 1,\n\t\t 'token' => '',\n\t\t 'avatar' => '',\n\t\t 'created_at' => \\Carbon\\Carbon::now()->format('Y-m-d H:i:s'),\n\t\t 'updated_at' => \\Carbon\\Carbon::now()->format('Y-m-d H:i:s'),\n\t ]);\n\n\t DB::table('user_role')->insert([\n\t\t 'user_id' => 1,\n\t\t 'role_id' => 1\n\t ]);\n\n\t $this->call(UserTableSeeder::class);\n\t $this->call(FilesTableSeeder::class);\n\t $this->call(FileUploadsTableSeeder::class);\n\t $this->call(SalesTableSeeder::class);\n\t $this->call(FileCategoryTableSeeder::class);\n }", "title": "" }, { "docid": "fec3323e6f3a81f6348e08d8097828b8", "score": "0.76672584", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n User::truncate();\n Listing::truncate();\n\n $userQuantity=5;\n $listingQnt=100;\n\n factory(App\\User::class,$userQuantity)->create();\n factory(App\\Listing::class,$listingQnt)->create();\n }", "title": "" }, { "docid": "fd3e02773eac9af1278393c90e1ec5e3", "score": "0.7666974", "text": "public function run()\n {\n User::truncate();\n\n User::create([\n 'name' => 'admin',\n 'password' => bcrypt('secret'),\n 'role' => 'admin',\n ]);\n\n User::create([\n 'name' => 'operator',\n 'password' => bcrypt('secret'),\n 'role' => 'operator',\n ]);\n\n User::create([\n 'name' => 'employee',\n 'password' => bcrypt('secret'),\n 'role' => 'employee',\n ]);\n\n $faker = Factory::create('id_ID');\n\n for ($i = 0; $i < 12; $i++) {\n User::create([\n 'name' => $faker->name,\n 'password' => bcrypt('secret'),\n 'role' => 'employee',\n ]);\n }\n\n }", "title": "" }, { "docid": "2344b2d3d5ee3f98e7bbbe7784cad8c9", "score": "0.7663209", "text": "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n $counry = Country::inRandomOrder()->first()->country;\n $city = City::inRandomOrder()->where('country', $counry)->first()->city;\n\n Agencies::create([\n 'name' => $faker->company,\n 'address' => $faker->address,\n\t\t\t\t'city' => $city,\n\t\t\t\t'countri' => $counry,\n\t\t\t\t'phone' => $faker->phoneNumber,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'web' => \"www.addadadadad.com\",\n ]);\n }\n }", "title": "" }, { "docid": "acc4a55ca590e54c9d9cae8f6b80d13b", "score": "0.7662981", "text": "public function run()\n {\n User::factory(100)->create();\n $this->call([\n UserSeeder::class,\n ]);\n Article::factory()->count(100)->create();\n Rate::factory()->count(1000)->create();\n\n }", "title": "" }, { "docid": "47d7ad0594d6fea4c95ece125a11f12f", "score": "0.76622707", "text": "public function run()\n {\n\n foreach (range(1, 10) as $_) {\n $faker = Factory::create();\n DB::table('menus')->insert([\n 'title' => $faker->firstName(),\n 'price' => $faker->randomNumber(2),\n 'weight' => $faker->randomNumber(2),\n 'meat' => $faker->randomNumber(2),\n 'about' => $faker->realText(rand(10, 20))\n ]);\n }\n\n //\n foreach (range(1, 10) as $_) {\n $faker = Factory::create();\n DB::table('restaurants')->insert([\n 'title' => $faker->company(),\n 'customer' => $faker->randomNumber(2),\n 'employee' => $faker->randomNumber(2),\n // 'menu_id' => $faker->randomNumber(1),\n\n ]);\n }\n }", "title": "" }, { "docid": "317d47304eb6df80c5511ceb3b9b995f", "score": "0.76618236", "text": "public function run()\n {\n Model::unguard();\n\n // $this->call(UserTableSeeder::class);\n $faker = Faker\\Factory::create();\n for ($i=0; $i < 10; $i++) { \n BeTagModel::create([\n 'name' => $faker->sentence,\n 'name_alias' => implode('',$faker->sentences(4)),\n 'status' => $faker->randomDigit(),\n 'created_by' => $faker->unixTime(),\n 'updated_by' => $faker->unixTime(),\n 'created_at' => $faker->unixTime(),\n 'updated_at' => $faker->unixTime(),\n ]);\n }\n\n Model::reguard();\n }", "title": "" }, { "docid": "0de657d649c6926b71b8f5e0b4af5374", "score": "0.76618147", "text": "public function run() {\n // Example list, this seed will only create admin role, if you wanna create user account, please use normal register.\n // The pattern for each list value will be array[0] for username, array[1] for password (it will be hashed later, calma) and array[2] for email.\n // Add as many as you like.\n $list = array(\n array('pulselab', 'nopassword', '[email protected]'),\n );\n\n DB::collection('users')->delete();\n DB::collection('users')->insert(array_map(function($o) {\n return array(\n 'username' => $o[0],\n 'password' => app('hash')->make(sha1($o[1])),\n 'email' => $o[2],\n 'facebook_id' => '',\n 'twitter_id' => '',\n 'point' => 0,\n 'role' => 'admin',\n 'word_translated' => 0,\n 'word_categorized'=> 0,\n 'languages'\t\t => '',\n 'isconfirmed'\t => true,\n 'resetcode'\t\t => '',\n 'isVirgin' => 0,\n );\n }, $list));\n }", "title": "" }, { "docid": "591cc779df1a315a5bb877f8e1fe4600", "score": "0.7660859", "text": "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('indicadores')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('indicadores')->insert([\n 'rels' => json_encode([$faker->words(3)]),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->sentence,\n 'ano_inicial' => $faker->numberBetween(2019,2025),\n 'ano_final' => $faker->numberBetween(2025,2030),\n 'status_atual' => $faker->randomNumber(3),\n 'status_final' => $faker->boolean(),\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 'status' => true,\n ]);\n }\n\n\n }", "title": "" }, { "docid": "9bf3fa05d4ae071adbab0386bc123da6", "score": "0.7660738", "text": "public function run()\n {\n $data = [];\n $faker = Factory::create();\n\n for ($i = 0; $i < 100; $i++) {\n $data[] = [\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n 'email' => $faker->email(),\n 'created_at' => date('Y-m-d H:i:s'),\n ];\n }\n\n $users = $this->table(DbConfig::DB_USER_TABLE);\n $users->insert($data)\n ->saveData();\n }", "title": "" }, { "docid": "4928806405a07b1df0cb55aaf31cc6fd", "score": "0.76591706", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Section::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few Section in our database:\n for ($i = 0; $i < 10; $i++) {\n Section::create([\n 'name' => $faker->name,\n ]);\n }\n }", "title": "" }, { "docid": "ac091d03c70afaa39edeb6588c3c3993", "score": "0.7657682", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //semillero cuando se ejecute el comando migrate se crearan en automatico los datos\n factory(User::class)->create(['email'=>'[email protected]']);\n factory(User::class, 50)->create();\n factory(Forum::class, 20)->create();\n factory(Post::class, 50)->create();\n factory(Reply::class, 100)->create();\n }", "title": "" } ]
820dbb628f3d3a8f5b4beeb348b4cbad
TODO: Implement getParam() method.
[ { "docid": "ce8ce80c2f4e37c8854d0411288fd6fc", "score": "0.0", "text": "public function getParam($name, $default = null)\n {\n }", "title": "" } ]
[ { "docid": "4e6b76cf8efc57c2d95d56a378cf00ab", "score": "0.81255126", "text": "public function getParam() {\n return $this->_param;\n }", "title": "" }, { "docid": "5170bfe38199c196eb8468dd3ea4cd3a", "score": "0.77887475", "text": "public function param()\n {\n return $this->param;\n }", "title": "" }, { "docid": "67a2f33daa5c6bc200cb4e54b66dced6", "score": "0.7762415", "text": "abstract public function getParam($name);", "title": "" }, { "docid": "6fc0b9f3fc1f1f3cedace7560657accf", "score": "0.7635206", "text": "public function getParam ( $name );", "title": "" }, { "docid": "b135bf2ed1dc3bdc9b9846b535635370", "score": "0.7558269", "text": "public function getParam($name);", "title": "" }, { "docid": "00c713e3b96465d68f624bcb5978df7a", "score": "0.7531638", "text": "function getParam ($name);", "title": "" }, { "docid": "c604098b2843715fcd3f4c44bb7ae26e", "score": "0.7404416", "text": "public function getParam(string $param);", "title": "" }, { "docid": "bdcac731ea160d250fceaa9d76dd9571", "score": "0.7354962", "text": "public function getParams()\n\t{\n\t}", "title": "" }, { "docid": "eae7d563351c86d28920f5517054835d", "score": "0.73456156", "text": "public function getParams() {}", "title": "" }, { "docid": "ebcc5b55b814b84d591ba9a37f8c9ccf", "score": "0.7340382", "text": "public function getParams()\n {\n }", "title": "" }, { "docid": "e914cb18eccb24c19084b2a55cf96f79", "score": "0.7300699", "text": "public function getParamValue() {\n return $this->_paramValue;\n }", "title": "" }, { "docid": "d3d2599df2b3f2684f2f7beb54c51861", "score": "0.7294882", "text": "public function getParam($paramName);", "title": "" }, { "docid": "6a70f7065443f1364105bb429e7dfdff", "score": "0.7254152", "text": "public function &getParam()\n {\n return $this->_param;\n }", "title": "" }, { "docid": "24893654ca98706642a4e97efb0641de", "score": "0.72289103", "text": "abstract protected function getParamExpectation();", "title": "" }, { "docid": "e012831d5707b901bbd5ae9cd8f75a5b", "score": "0.7211081", "text": "public function getParameter() {\n\t\treturn $this->parameter;\n\t}", "title": "" }, { "docid": "f7cf784e3804ffb03b0921bf7489a099", "score": "0.71815705", "text": "public function getParams() { }", "title": "" }, { "docid": "454f80849504636fa99d5c8886bb8eb8", "score": "0.7148768", "text": "public function get_param() {\n\n\t\treturn $this->request_param;\n\t}", "title": "" }, { "docid": "8c5cf94a9dbc90a63d98236edc80a1b6", "score": "0.7145211", "text": "public function getParams();", "title": "" }, { "docid": "8c5cf94a9dbc90a63d98236edc80a1b6", "score": "0.7145211", "text": "public function getParams();", "title": "" }, { "docid": "8c5cf94a9dbc90a63d98236edc80a1b6", "score": "0.7145211", "text": "public function getParams();", "title": "" }, { "docid": "8c5cf94a9dbc90a63d98236edc80a1b6", "score": "0.7145211", "text": "public function getParams();", "title": "" }, { "docid": "ed2564ffbd90fc170cc0df6fd7d22b48", "score": "0.71347165", "text": "function getParams ();", "title": "" }, { "docid": "99bc9fd86567c3b604c6f91782630834", "score": "0.7126635", "text": "public function get_param($key){\r\n\t\treturn $this->params[$key];\r\n\t}", "title": "" }, { "docid": "a2bb4d165ae3b38a3e5a6c53d8d083cc", "score": "0.71040064", "text": "public function getParam($key);", "title": "" }, { "docid": "bb947763093a8281210529a80a0e9513", "score": "0.70019495", "text": "public function getParameter($name);", "title": "" }, { "docid": "5651e1584dcd626f189183577077e26b", "score": "0.6985868", "text": "public function getUrlParam(){\n\t\treturn $this->_urlParam;\n\t}", "title": "" }, { "docid": "ed9183b5ee1f31243199f34950100fec", "score": "0.6977992", "text": "public function getParam($param)\n {\n return $this->_base\n ? $this->_base->getParam($param)\n : parent::getParam($param);\n }", "title": "" }, { "docid": "ccda1aadef77fea0f15be84defac2dea", "score": "0.6966394", "text": "public function getParameters ();", "title": "" }, { "docid": "91b33959c6bc25d66d0d6e86901073cc", "score": "0.69579595", "text": "public function GetParam($Name,$Def){ return isset($_GET[$Name])? $_GET[$Name]:$Def; }", "title": "" }, { "docid": "0e6a54435d37e2a881025d773ea54648", "score": "0.69509864", "text": "private function getParam() {\n\t\t$param = $_GET;\n\t\t$keys = array (\n\t\t\t\t'_id',\n\t\t\t\t'_sign',\n\t\t\t\t'_time'\n\t\t);\n\t\tforeach ( $keys as $v ) {\n\t\t\tif (empty ( $param [$v] )) {\n\t\t\t\tthrow new Utility_Http_Server_Exception ( 'param ' . $v . ' not found', $this->errorCode );\n\t\t\t}\n\t\t}\n\t\treturn $param;\n\t}", "title": "" }, { "docid": "58892e07aa4b7b68fa9b4af3c9441781", "score": "0.69355357", "text": "public function getParam1()\r\n {\r\n return $this->get(self::_PARAM1);\r\n }", "title": "" }, { "docid": "1964b8165df79f94627ad5c3ef4c5c56", "score": "0.6931326", "text": "public function parameterValue($name);", "title": "" }, { "docid": "4a4200cdb1ea80b5986f57d1c4ecb170", "score": "0.69147813", "text": "abstract protected function getIdParam();", "title": "" }, { "docid": "4dfecc18044c1c220ef2ef60f8c7a85e", "score": "0.69134206", "text": "public function params();", "title": "" }, { "docid": "4df757fe0f2da90b2b043ce7b069e28e", "score": "0.687786", "text": "public function get($param) {\n return $this->params[$param];\n }", "title": "" }, { "docid": "bc4c5664ac5afaf65597ad6b9cd6b157", "score": "0.68602264", "text": "public function getParam()\n {\n if ( !empty($_GET['param']) )\n {\n return $_GET['param'];\n }\n return false;\n }", "title": "" }, { "docid": "befea988d37993e4148e49a726c888a7", "score": "0.68597", "text": "public function getParameters();", "title": "" }, { "docid": "befea988d37993e4148e49a726c888a7", "score": "0.68597", "text": "public function getParameters();", "title": "" }, { "docid": "befea988d37993e4148e49a726c888a7", "score": "0.68597", "text": "public function getParameters();", "title": "" }, { "docid": "befea988d37993e4148e49a726c888a7", "score": "0.68597", "text": "public function getParameters();", "title": "" }, { "docid": "3350a661a44996050972061cd0126c2c", "score": "0.6857124", "text": "function getParam($name)\n {\n return $this->$name;\n }", "title": "" }, { "docid": "5415eab77fa38e8596b1a575817905b1", "score": "0.6850791", "text": "function getParameterValue()\n {\n return $this->_mValue;\n }", "title": "" }, { "docid": "19770618bf942b8067b9209c648b513f", "score": "0.6839816", "text": "public function getParam()\n {\n // Recupère le numero de l'image courante\n global $imageId, $size, $zoom, $category, $order;\n if (isset($_GET[\"imageId\"])) {\n $imageId = $_GET[\"imageId\"];\n } else {\n $imageId = 1;\n }\n // Recupere la taille courante\n if (isset($_GET[\"size\"])) {\n $size = $_GET[\"size\"];\n } else {\n $size = 480;\n }\n\n // Recupere la taille courante\n if (isset($_GET[\"zoom\"])) {\n $zoom = $_GET[\"zoom\"];\n } else {\n $zoom = 1.0;\n }\n\n //Recuere la catégorie courante\n if (isset($_GET[\"category\"])) \n {\n $category = $_GET[\"category\"];\n } \n else \n {\n $category = \"all\";\n }\n\n //Recuere la catégorie courante\n if (isset($_GET[\"order\"])) \n {\n $order = $_GET[\"order\"];\n } \n else \n {\n $order = \"normal\";\n } \n }", "title": "" }, { "docid": "beb26ac1ee479c98d86dd0785d5b2cb0", "score": "0.6835452", "text": "function _getParameters() {\n\t\n\t\tif (!isset($this->param) OR is_null($this->param)) $this->param = array();\t// seit J 4.2 nötig um notice zu vermeiden\n\t\t// turnierid\n\t\t$this->param['id'] = clm_core::$load->request_int('id');\n\t\n\t}", "title": "" }, { "docid": "e09e80354871f098c9e5027b4d870b0d", "score": "0.6821183", "text": "public function getParameter($param) {\n return $this->hasParameter($param) ? $this->params[$param] : NULL;\n }", "title": "" }, { "docid": "0e21887f0c021feca3d8d19f7f528d68", "score": "0.68037474", "text": "public function getParam(string $key);", "title": "" }, { "docid": "1c881a49639386aa8e5970eb3094eb73", "score": "0.6799835", "text": "public function __get($param);", "title": "" }, { "docid": "d211b7d5d3655259032416e63a7d5258", "score": "0.6748886", "text": "function param($name) \n{\n return Yii::app()->params[$name];\n}", "title": "" }, { "docid": "1f93e28c41002289a1b50f2eed59ee5b", "score": "0.673519", "text": "public function getParam($param)\n {\n return array_key_exists($param, $this->params) ? $this->params[$param] : null;\n }", "title": "" }, { "docid": "a90b90bb39e8a5ed9b019b472d407d6b", "score": "0.6702253", "text": "public function testGetParam() {\n $this->assertNull($this->parameter->getParam(\"param\"),\"parameter not known\");\n }", "title": "" }, { "docid": "74fef1e57f6484313610188c62871085", "score": "0.66779196", "text": "function getParam($param)\n {\n $attr = '_' . $param;\n if (isset($this->$attr)) {\n return $this->$attr;\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "f047924042c1649a8ae17cd08826ad38", "score": "0.66505456", "text": "protected function getParameter($param)\n {\n return $this->container->getParameter($param);\n }", "title": "" }, { "docid": "149e64216d959be643491d40ecc0ba7f", "score": "0.66397834", "text": "function param($name) {\n return \\Yii::$app->params[$name];\n}", "title": "" }, { "docid": "ce9508926eefd620de8e60e9a94babc7", "score": "0.66281104", "text": "function _getParam( $name, $default='' )\n {\n \t$return = $this->params->get($name, $default); \n return $return;\n }", "title": "" }, { "docid": "42d2c1763a553396cfbee15b97ff4ad3", "score": "0.6616837", "text": "public function getCustomParam()\n {\n return $this->customParam;\n }", "title": "" }, { "docid": "a33f3619e9451a0953cf2b4c5d5ae5dd", "score": "0.66104835", "text": "public function getParams(){\n\treturn $this->params;\n}", "title": "" }, { "docid": "d3a90983efc65b1c9125039801507064", "score": "0.6592838", "text": "public function getParam($name) {\n\t\treturn isset($this->params[$name]) ? $this->params[$name] : null;\n\t}", "title": "" }, { "docid": "667234dbc6495e9cc6f6b332a2a7f6e0", "score": "0.6590339", "text": "function getGetParameter($param)\n{\n $ci = &get_instance();\n return $ci->input->get($param, TRUE);\n}", "title": "" }, { "docid": "ef37c43a592a2b1b09d13a0a7ba3dec3", "score": "0.6575593", "text": "function param($paramName = \"\")\n {\n return ($this->cfg[$paramName]);\n }", "title": "" }, { "docid": "bc2f5dd1a498f1ad197f0e8ebe7ab012", "score": "0.6566848", "text": "public function getParams(){\r\n return $this->params;\r\n }", "title": "" }, { "docid": "9232f6cfd01385a4c6d244d11a6a375e", "score": "0.65482", "text": "public function getParams()\n {\n return null;\n }", "title": "" }, { "docid": "2c9dda8f789b3ebdda207780a482184c", "score": "0.6538573", "text": "public function getParam($name){\n if(isset($this->requestData[$name])){\n return $this->requestData[$name];\n }\n return \"\";\n }", "title": "" }, { "docid": "a7950eb26a9c9d86ecc988a4df72ec25", "score": "0.65383875", "text": "public function getParam($i)\n {\n return $this->params[$i];\n }", "title": "" }, { "docid": "6adc971cff7e2186cda8b168a09d247e", "score": "0.65335", "text": "public function getGetParameter($key = null);", "title": "" }, { "docid": "6764b79dd7f60fafb72dd4bc17ba4b4c", "score": "0.65207326", "text": "public function paramsGet()\n {\n return $this->params_get;\n }", "title": "" }, { "docid": "147d4a0db01b586fc7e3f23bfc2b28d1", "score": "0.64901483", "text": "abstract function getRequestParams();", "title": "" }, { "docid": "2bad06eb2638733869cb3f90c1d287e5", "score": "0.64870435", "text": "public function getParameters()\n\t{\n\t\treturn $this->params;\n\t}", "title": "" }, { "docid": "93f96b78f5c0761649ff1cbf0ba6b4e7", "score": "0.6473127", "text": "public function get_params()\n {\n return $this->params;\n }", "title": "" }, { "docid": "0e17628aef832abb1c0d9a2e97ad4a90", "score": "0.64718425", "text": "public function getParam($param)\n {\n return $this->getGravParam($param) ?? $this->getQueryParam($param);\n }", "title": "" }, { "docid": "29a6ec9a0b2813022970faf89148f508", "score": "0.6467811", "text": "public function get_param($name){\n if(isset($_POST[$name])){\n $value=$_POST[$name];\n }elseif(isset($_GET[$name])){\n $value=$_GET[$name]; \n }else{\n return null;\n }\n return $this->check_param($value);\n }", "title": "" }, { "docid": "d6c301b92ae03adccbbce7272fa1490c", "score": "0.64566773", "text": "public function getParameters(){\n return self::$parameters;\n }", "title": "" }, { "docid": "999cea12c0ef28a5e6d4f357f77c6354", "score": "0.6453489", "text": "public function __get($name) {\n return $this->__params[$name];\n }", "title": "" }, { "docid": "e62f39c035c9710aba3b1517f15b3f10", "score": "0.64525884", "text": "public function getParams(): array;", "title": "" }, { "docid": "e62f39c035c9710aba3b1517f15b3f10", "score": "0.64525884", "text": "public function getParams(): array;", "title": "" }, { "docid": "4575ded948bd182deac8f1b219a5d53b", "score": "0.6450414", "text": "public function getRowParam()\n {\n return $this->rowParam;\n }", "title": "" }, { "docid": "2e9c660191ed0d828991149d249c8149", "score": "0.64474565", "text": "public function parameters();", "title": "" }, { "docid": "6c6f2ac781d915a9fdf36889e6617b56", "score": "0.6441025", "text": "function get_param_value( $sParam )\n {\n if( array_key_exists( $sParam, $this->_arrParam))\n {\n return $this->_arrParam[$sParam];\n }\n return null;\n }", "title": "" }, { "docid": "d404720875fc9fb40b8f7ebd046b9d5b", "score": "0.64195144", "text": "public function getParams(){\n return $this->params;\n }", "title": "" }, { "docid": "fa1a2749ff7ef41873d8f67862fd4c36", "score": "0.640999", "text": "public function getParams()\n {\n // section 10-10--91-60-7f09995f:12e75e0bc39:-8000:0000000000000938 begin\n // section 10-10--91-60-7f09995f:12e75e0bc39:-8000:0000000000000938 end\n }", "title": "" }, { "docid": "2e25735deff5baed8205147d06b0f684", "score": "0.6408303", "text": "public function params() { //since this is a public function it can be access directly via the API\n\t\t$this->respond($_GET['string']);//you can still pull from $_GET and $_POST\n\t}", "title": "" }, { "docid": "5e324c99182835bf84dfd3d16e745419", "score": "0.640706", "text": "function __get($name)\r\n {\r\n return $this->modelObject->Db->Parameters[\":{$name}\"];\r\n }", "title": "" }, { "docid": "199ac4985961095a69c40300d697cf42", "score": "0.6406628", "text": "public function getValue($name)\n {\n return $this->_attributes['params'][$name];\n }", "title": "" }, { "docid": "288527e6035543cc75d90afbcdd1391f", "score": "0.6404254", "text": "public function getParams()\n {\n return static::$params;\n }", "title": "" }, { "docid": "7e11bcf4ea6c0f58570e1ed83c5e4be7", "score": "0.64019656", "text": "public function __get($param)\n {\n return $this->param($param);\n }", "title": "" }, { "docid": "509cf0fe9c684b2a5969d7fb22877cf9", "score": "0.64015764", "text": "public function params () : array\n { return $this->params; }", "title": "" }, { "docid": "4f82348b445201185d1dc63034fef471", "score": "0.6397291", "text": "public function getParam($name) {\n if (!isset($this->params[$name])) {\n return null;\n }\n return $this->params[$name];\n }", "title": "" }, { "docid": "51055c3f2bdba6c04949f81a9a4cb016", "score": "0.6396837", "text": "public function getParameter( $key );", "title": "" }, { "docid": "e7e2ee2b6b99404e8d7372f76d161fca", "score": "0.63914406", "text": "public function getParameter($key);", "title": "" }, { "docid": "784f71244e7b2891b6732e92ed2922fe", "score": "0.63730806", "text": "function getParams() {\n\t\treturn $this->params;\n\t}", "title": "" }, { "docid": "ed2a41dda7acff9c4e684327f4ee7d4c", "score": "0.6372953", "text": "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 }", "title": "" }, { "docid": "cb7b74a99adc7d70789c070ce53067de", "score": "0.6369381", "text": "public function getParameterHolder()\r\n {\r\n return $this->parameterHolder;\r\n }", "title": "" }, { "docid": "fdcd4f7cca561e0810b0660eb19e30ac", "score": "0.63664716", "text": "function getParam()\n {\n return [\n ['all', 'uncategorized', 1],\n ['all', NULL, 1],\n ['published', 'uncategorized', 1],\n ['published', NULL, 1],\n ['trashed', NULL, 0],\n ['pending', NULL, 0],\n ];\n }", "title": "" }, { "docid": "33c022abe0cfd97b5d481aeb5a2691fa", "score": "0.63639724", "text": "public function getParams() {\n\t\treturn $this->parameters;\n\t}", "title": "" }, { "docid": "77b444ff2f86dbd9b20036edcad27242", "score": "0.6356812", "text": "public function __construct() {\n self::getParam();\n }", "title": "" }, { "docid": "14f380317e0d411c000594287768e315", "score": "0.63555855", "text": "public function __get($parameter);", "title": "" }, { "docid": "14f380317e0d411c000594287768e315", "score": "0.63555855", "text": "public function __get($parameter);", "title": "" }, { "docid": "852684c2ae9403aa35aca83aff5aad94", "score": "0.63515687", "text": "function getParams()\n {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $data_source;\n global $tab;\n\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 }", "title": "" }, { "docid": "dee0a8b1fb05a78dab6e973831f4fb26", "score": "0.6346561", "text": "public function getParams() {\n return $this->params;\n }", "title": "" }, { "docid": "d1df89b1f4fb794aacada351f1f5a8c1", "score": "0.6341659", "text": "public function getParameters()\n {\n return $this->params;\n }", "title": "" }, { "docid": "d1df89b1f4fb794aacada351f1f5a8c1", "score": "0.6341659", "text": "public function getParameters()\n {\n return $this->params;\n }", "title": "" }, { "docid": "e99d8459fdb0812c153b1905edcb5f25", "score": "0.63415796", "text": "public function getParams()\n\t{\n\t\treturn $this->params;\n\t}", "title": "" } ]
04d4b33105bbc7ed24aac806f141a31a
funcion generica para relizar un select de un campo especifico, de una tabla especifica, con un id especifico. Donde id es el valor del indice que queremos traer, nameTabla el nombre de la tabla where es el campo que queremos seleccionar
[ { "docid": "2ce8e4478f92c2c7f0950bd08900e324", "score": "0.0", "text": "public function getOne($id,$nameTable,$where, $select = '*'){\n $this -> db -> select($select)\n ->from($nameTable)\n -> where ($where,$id);\n $query = $this -> db -> get();\n return $query ->result();\n }", "title": "" } ]
[ { "docid": "7995fb7f6ca52062a5c5e18f4b4a994f", "score": "0.7032624", "text": "function consultar_select($id, $columna_descripcion, $tabla){\n\t\t//Primero conectarse a la bd\n\t\t$conexion_bd = conectar_bd();\n\n\t\t$resultado = '<select name =\"'.$tabla.'\"><option value=\"\" disabled selected>Selecciona una opción</option>';\n\n \t$consulta = \"SELECT $id, $columna_descripcion FROM $tabla\";\n \t$resultados = $conexion_bd->query($consulta);\n \twhile ($row = mysqli_fetch_array($resultados, MYSQLI_BOTH)) {\n\t\t\t$resultado .= '<option value=\"'.$row[\"$id\"].'\">'.$row[\"$columna_descripcion\"].'</option>';\n\t\t}\n \n \t// desconectarse al termino de la consulta\n\t\tdesconectar_bd($conexion_bd);\n\n\t\t$resultado .= '</select><label>Marca</label></div>';\n\n\t\treturn $resultado;\n\n\t}", "title": "" }, { "docid": "b50ad1cad0d678d3ae0f150ef8ddfa4d", "score": "0.68599254", "text": "public function select($id)\t{\n\t\t\t$this->data = (array) \n\t\t\t\tself::$db->queryFetch(\n\t\t\t\t\t\"SELECT * FROM `{$this->table}` WHERE `id`=:id\",\n\t\t\t\t\tarray(':id'=>$id)\n\t\t\t\t);\n\t\t}", "title": "" }, { "docid": "3bf89343e579070703dda5ddb07cad09", "score": "0.685518", "text": "private function GeneraSelectQuery($fields,$where)\r\n\t{\r\n\t\t$sql=\"select \r\n\t\t\t\".$fields.\" \r\n\t\t\tfrom Tabla\r\n\t\t\tinner join Tabla1 on Tabla1.id=Tabla.idTabla1\r\n\t\t\t\".(($where)?\" WHERE \".$where:\"\");\r\n\t\treturn $sql;\r\n\t}", "title": "" }, { "docid": "dc0995877b8901d578a90aee3760c713", "score": "0.6850749", "text": "function prepare_read_one($id){\n if(!isset($id)){\n return '';\n }\n $tables_sql = $this->create_table_list();\n $where_sql = $this->create_where($id);\n $column_sql = implode(', ', $this->column_list);\n return \"SELECT $column_sql FROM $tables_sql $where_sql;\";\n }", "title": "" }, { "docid": "deab3674cb8a3d7351384f194d332f03", "score": "0.68193454", "text": "public function selectMethod($table,$where){\n $sql = \"\";\n $condition = \"\";\n foreach($where as $key => $value){\n // id = '5' AND FirstName = 'somename'\n // Concatenate the condition to dynamically generate id when edit button is clicked\n $condition .= $key . \"='\" . $value . \"' AND \";\n }\n // Remove the last 5 characters from the condition\n $condition = substr($condition, 0, -5);\n // SELECT query\n $sql .= \"SELECT * FROM \" .$table. \" WHERE \" . $condition;\n // Execute SELECT query\n $query = $this->connect()->query($sql);\n $row = mysqli_fetch_array($query);\n return $row; \n }", "title": "" }, { "docid": "ae3cb943ec8b8e42c8919faaf60911a4", "score": "0.6778013", "text": "public function select($fields) {\n\n $fields = self::check_fields_of_table_list(array_map('trim', explode(',', $fields)));\n\n // varsayılan olarak ekle, objeler yüklenirken her zaman id olmalıdır.\n $table_and_primary_key = $this->_table . \".id\";\n if (!in_array($table_and_primary_key, $fields))\n array_push($fields, $table_and_primary_key);\n\n $this->_select = $fields; // [\"User.first_name\", \"User.last_name\", \"Comment.name\"]\n return $this;\n }", "title": "" }, { "docid": "cd877dd7e7b4b361a1b97db126c4c228", "score": "0.67582524", "text": "public function select($table_name, $fields = array(), $where = array(), $order_by = '')\r\n {\r\n }", "title": "" }, { "docid": "af1ef1569a6c533592402b88758e9f17", "score": "0.672172", "text": "public function selectById($id){\n $sql = SELECT. TABELA_MODELO. \" where idModelo=\".$id;\n\n \n\n //Abrindo conexão com o BD\n $PDO_conex = $this->conex->connectDataBase();\n\n //executa o script de select no bd\n $select = $PDO_conex->query($sql);\n \n /* $select->fetch no formado pdo retorna os dados do BD\n também retorna com característica do PDO como o fetch\n é necessário especificar o modelo de conversão.\n EX: PDO::FETCH_ASSOC, PDO::FETCH_ARRAY etc. */\n $rsModelo=$select->fetch(PDO::FETCH_ASSOC);\n $modelo = new Modelo();\n $modelo->setIdModelo($rsModelo[\"idModelo\"]);\n $modelo->setIdMarca($rsModelo[\"idMarca\"]);\n $modelo->setNomeModelo($rsModelo[\"nomeModelo\"]);\n\n \n\n $this->conex->closeDataBase();\n\n return($modelo);\n }", "title": "" }, { "docid": "dbfa7ece1ef83b79a9f381a44df60679", "score": "0.66504145", "text": "function get_select($table, $field = 'name'){\t\t\t\t\n\t\t$this->db->order_by($field);\n\t\t$query = $this->db->get($table);\n return $query->result();\n\t}", "title": "" }, { "docid": "30c48ce7c8ab4c6ee6b71005296f25e4", "score": "0.66153145", "text": "function selectFunction($primaryField,$polarityField,$textField,$tableName) {\n\t$sql=\"SELECT \" . $primaryField . \" AS ID, \" . $polarityField . \" AS field1,\" . $textField . \" AS field2 FROM \" . $tableName ;\n\treturn $sql ; \n}", "title": "" }, { "docid": "67b20b29b989bcc96fadc0c53c41f55c", "score": "0.6601591", "text": "function select_by_id($tbl, $cols='*', $value=null, $id='id', $limit=1){\n $where = 1;\n if(isset($value)) $where=\"$id='$value'\";\n $sql = \"SELECT $cols FROM $tbl WHERE $where LIMIT $limit\";\n $result = $this->execute($sql) or $this->error($sql);\n $row = $this->next($result,'{}');\n return $row;\n }", "title": "" }, { "docid": "3959f24265c1e71bfecbf72c9843c99d", "score": "0.6566637", "text": "public function SelectField($fieldName,$cond_id)\r\n\t\r\n {\r\n\t\tglobal $db;\r\n if($fieldName==\"\" && $cond_id=\"\")\r\n {\r\n $sql = \"SELECT * FROM \".$this->TableName;\r\n } else\r\n {\r\n\t\t \t\r\n $sql = \"SELECT \".$fieldName.\" FROM \". $this->TableName.\" \".$cond_id;\r\n }\r\n try{\r\n $query = $db->prepare($sql);\r\n $query->execute();\r\n $arr['rows'] = $query->fetchAll(PDO::FETCH_ASSOC);\r\n $arr['err'] = false;\r\n } catch(PDOException $e){\r\n $arr['err'] = true;\r\n $arr['msg'] = $e->getMessage(); \r\n } \r\n return $arr;\r\n }", "title": "" }, { "docid": "5a39322267109214cdd612c5ab7a93a9", "score": "0.65488255", "text": "function tabledata_Cde_select($table , $field,$trisens,$trival, $key, $idWhere = false)\r\n{\r\n global $connect_statut, $spip_lang, $connect_id_auteur;\r\n\r\n //echo \"table : $table , field : $field, trisens : $trisens, trival $trival, key $key, Where $idWhere\";\r\n //echo \"<br/>field : \";print_r($field);\r\n //echo \"<br/>key : \";print_r($key);\r\n //echo \"<br/>Where : \";print_r($idWhere);\r\n\r\n //$boolCleMultiple = (is_array($key['PRIMARY KEY']))?true:false;\r\n\r\n $leschamps = array();\r\n $lestables = $table;\r\n $clauseWhere = array();\r\n $clauseGroupby = array();\r\n $clauseOrderby = array();\r\n $clauseLimit = array();\r\n $clauseHaving = array();\r\n\r\n // Dans la suite : Le nombre de champs à afficher est dynamique.\r\n // Et : l'Identifiant (Id Ligne) doit être le premier champ retourné par SELECT\r\n\r\n foreach ($field as $cle=>$txtChamp)\r\n {\r\n $leschamps [] = $cle;\r\n } // foreach ($field as $cle=>$txtChamp)\r\n\r\n if ($idWhere!=false)\r\n {\r\n $clauseWhere[] = ($idWhere) ; // Limitation1\r\n } // if ($idWhere)\r\n else\r\n {\r\n if ( isset($trival) && $trival!=\"\")\r\n {\r\n $clauseOrderby[] = $trival.($trisens==\"D\"?\" DESC\":\"\");\r\n }\r\n else if ( is_array($key['PRIMARY KEY']) && isset($key['PRIMARY KEY']) )\r\n {\r\n $clauseOrderby[] = implode(\" , \",$key['PRIMARY KEY']) ; // Limitation1\r\n } //if ( isset($key['PRIMARY KEY']))\r\n } // if ($idWhere)\r\n\r\n $Rselect = sql_select( $leschamps,$table,$clauseWhere\r\n ,$clauseGroupby,$clauseOrderby\r\n ,$clauseLimit,$clauseHaving);\r\n\r\n $nbenreg = sql_count($Rselect) ;\r\n\r\n //-------- Voir le code de la requête\r\n //echo \"<hr/>\",sql_get_select( $leschamps,$table,$clauseWhere,$clauseGroupby,$clauseOrderby,$clauseLimit,$clauseHaving),\"<br/> ressource : \";\r\n\r\n echo ($nbenreg==1)?\"\":\" Nb enreg. dans la s&#233;lection : \".$nbenreg.\"<hr/>\";\r\n\r\n return $Rselect;\r\n\r\n}", "title": "" }, { "docid": "339a2220b6262baecec11ffda70a275a", "score": "0.6492562", "text": "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}", "title": "" }, { "docid": "1fc3dbbc211265077af8fc1b65fef6a7", "score": "0.6481554", "text": "public function selectById($id);", "title": "" }, { "docid": "1fc3dbbc211265077af8fc1b65fef6a7", "score": "0.6481554", "text": "public function selectById($id);", "title": "" }, { "docid": "2715c36a1ade725a1f6015e54686778d", "score": "0.6436455", "text": "public function select($table, $fields, $where, $order, $start);", "title": "" }, { "docid": "9a9cb378636208c3fbd9b52afb9827f9", "score": "0.6430978", "text": "function select_data_by_id($tablename, $columnname, $columnid, $data = '*', $join_str = array()) {\n if($data!='*')\n \n $this->db->select($data);\n \n if (!empty($join_str)) {\n foreach ($join_str as $join) {\n if ($join['join_type'] == '') {\n $this->db->join($join['table'], $join['join_table_id'] . '=' . $join['from_table_id']);\n } else {\n $this->db->join($join['table'], $join['join_table_id'] . '=' . $join['from_table_id'], $join['join_type']);\n }\n }\n }\n $this->db->where($columnname, $columnid);\n $query = $this->db->get($tablename);\n if ($query->num_rows() > 0) {\n return $query->result_array();\n } else {\n return array();\n }\n }", "title": "" }, { "docid": "b160bb8bca60540e3115a0ff0bcbb01b", "score": "0.6411768", "text": "public function select($nometabella,$campi='*',$condizioni=\"\",$order=\"\",$limit=\"\"){\n\t\tif($condizioni!='') $condizioni=\" WHERE \".$condizioni;\n\t\tif($limit!='') $limit=\" LIMIT \".$limit;\n\t\tif($order!='') $order=\" ORDER BY \".$order;\n\t\t\n\t\t$query=mysql_query(\"SELECT \".$campi.\" FROM \".$nometabella.$condizioni.$order.$limit) or die (\"Errore query per la tabella \".$nometabella.\" con errore: \".mysql_error());\n\t\t\n\t\t$this->nome_tabella=$nometabella;\n\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "cea3e0ba1756311759bb33af9069d04b", "score": "0.6404379", "text": "function selectRow($table,$field,$where) {\n\t\tif($where!='')\n\t\t\t$where= ' WHERE '.$where;\n \t$query = \"SELECT \".$field.\"\n \t FROM \".$this->tablePrefix .$table.$where ;\n $res = $this->execute($query);\n \treturn $this->fetchOne($res);\n }", "title": "" }, { "docid": "934162d642d9fa54c4f42f12580f1584", "score": "0.6398868", "text": "public function select($producto);", "title": "" }, { "docid": "6a0bb0dd213dde6c1d5734e64bec4322", "score": "0.6387809", "text": "public function get_table_field_selector()\n {\n $input = JFactory::getApplication()->input;\n\n $response = array();\n $table = $input->get('table');\n $fieldName = $input->get('field_name');\n\n if( ! $table)\n {\n $response['text'] = '';\n }\n else\n {\n $db = JFactory::getDBO();\n $dbTables = $db->getTableList();\n $dbPrefix = $db->getPrefix();\n\n if( ! in_array($dbPrefix.$table, $dbTables))\n {\n $response['text'] = 'Invalid table';\n }\n else\n {\n $fields = $db->getTableFields($dbPrefix.$table);\n\n $fields = $fields[$dbPrefix.$table];\n\n $out = '';\n $out .= '<select name=\"'.$fieldName.'\">';\n $out .= '<option value=\"\">'.jgettext('Select...').'</option>';\n\n foreach(array_keys($fields) as $fieldName)\n {\n $out .= '<option>'.$fieldName.'</option>';\n }\n\n $out .= '</select>';\n $response['text'] = $out;\n $response['status'] = 1;\n }\n }\n\n echo json_encode($response);\n\n jexit();\n }", "title": "" }, { "docid": "5d52a7c5e10eef97c19bf112e81b580d", "score": "0.6370601", "text": "public function get_sql_select_data_ajax($tablename, $where = '', $feild = '', $limit = '', $order_by = '') {\n\n if (!empty($feild))\n $this->db->select($feild);\n\n if (empty($feild))\n $this->db->select();\n\n if (!empty($where))\n $this->db->where($where);\n\n if (!empty($limit))\n $this->db->limit($limit);\n\n if (!empty($order_by))\n $this->db->order_by($order_by);\n\n $this->db->from($tablename);\n\n $query = $this->db->get();\n\n return $query->result();\n}", "title": "" }, { "docid": "81342aebf8c4e0fada7033ec207ec6ef", "score": "0.63638294", "text": "public function selectById($id)\n\t\t{\t\t\t\n\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t# Query\n\t\t\t\tif(!empty($id))\n\t\t\t\t{\n\t\t\t\t\t$query=\"SELECT * FROM parametros WHERE id=\".$id;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\t\t\t\n\t\t\t\t\tthrow new Exception(\"No se selecciono el id.\");\t\t\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\t//echo $query;\n\t\t\t\t//exit();\n\t\t\t\t\n\t\t\t\t# Ejecucion \t\t\t\t\t\n\t\t\t\t$result = SQL::selectArray($query);\n\t\t\t\t\t\t\n\t\t\t\treturn $result;\n\n\t\t\t} catch (Exception $e) {\n\t\t\t\tthrow new Exception($e->getMessage());\t\t\t\t\t\t\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "7da78e0326c66c233c77d588763dd4e5", "score": "0.63613373", "text": "private function rowDataTable($seccion, $tabla, $id) {\n $data = '';\n switch ($tabla) {\n case 'admin_usuario':\n $sql = $this->db->select(\"SELECT wa.nombre, wa.email, wr.descripcion as rol, wa.estado\n FROM admin_usuario wa\n LEFT JOIN admin_rol wr on wr.id = wa.id_rol WHERE wa.id = $id;\");\n break;\n case 'ciudad':\n $sql = $this->db->select(\"SELECT c.id, c.descripcion as ciudad, c.estado, d.descripcion as departamento FROM ciudad c\n LEFT JOIN departamento d on c.id_departamento = d.id WHERE c.id = $id;\");\n break;\n default :\n $sql = $this->db->select(\"SELECT * FROM $tabla WHERE id = $id;\");\n break;\n }\n switch ($seccion) {\n case 'departamento':\n if ($sql[0]['estado'] == 1) {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"departamento\" data-rowid=\"departamento_\" data-tabla=\"departamento\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"1\"><span class=\"label label-primary\">Activo</span></a>';\n } else {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"departamento\" data-rowid=\"departamento_\" data-tabla=\"departamento\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"0\"><span class=\"label label-danger\">Inactivo</span></a>';\n }\n $btnEditar = '<a class=\"editDTContenido pointer btn-xs\" data-id=\"' . $id . '\" data-url=\"modal_editar_departamento\" data-id=\"\"><i class=\"fa fa-edit\"></i> Editar </a>';\n $data = '<td>' . $id . '</td>'\n . '<td>' . utf8_encode($sql[0]['descripcion']) . '</td>'\n . '<td>' . $estado . '</td>'\n . '<td>' . $btnEditar . '</td>';\n break;\n case 'ciudad':\n if ($sql[0]['estado'] == 1) {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"ciudad\" data-rowid=\"ciudad_\" data-tabla=\"ciudad\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"1\"><span class=\"label label-primary\">Activo</span></a>';\n } else {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"ciudad\" data-rowid=\"ciudad_\" data-tabla=\"ciudad\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"0\"><span class=\"label label-danger\">Inactivo</span></a>';\n }\n $btnEditar = '<a class=\"editDTContenido pointer btn-xs\" data-id=\"' . $id . '\" data-url=\"modalEditarCiudad\"><i class=\"fa fa-edit\"></i> Editar </a>';\n $data = '<td>' . utf8_encode($sql[0]['departamento']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['ciudad']) . '</td>'\n . '<td>' . $estado . '</td>'\n . '<td>' . $btnEditar . '</td>';\n break;\n case 'slider':\n if ($sql[0]['estado'] == 1) {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"slider\" data-rowid=\"slider_\" data-tabla=\"web_inicio_slider\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"1\"><span class=\"label label-primary\">Activo</span></a>';\n } else {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"slider\" data-rowid=\"slider_\" data-tabla=\"web_inicio_slider\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"0\"><span class=\"label label-danger\">Inactivo</span></a>';\n }\n $btnEditar = '<a class=\"editDTContenido pointer btn-xs\" data-id=\"' . $id . '\" data-url=\"modalEditarDTSlider\"><i class=\"fa fa-edit\"></i> Editar </a>';\n if (!empty($sql[0]['imagen'])) {\n $img = '<img src=\"' . URL . 'public/images/slider/' . $sql[0]['imagen'] . '\" style=\"width: 160px;\">';\n } else {\n $img = '';\n }\n if ($sql[0]['principal'] == 1) {\n $principal = '<span class=\"badge badge-warning\">Principal</span>';\n } else {\n $principal = '<span class=\"badge\">Normal</span>';\n }\n $data = '<td>' . $sql[0]['orden'] . '</td>'\n . '<td>' . $img . '</td>'\n . '<td>' . utf8_encode($sql[0]['texto_1']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['texto_2']) . '</td>'\n . '<td>' . $principal . '</td>'\n . '<td>' . $estado . '</td>'\n . '<td>' . $btnEditar . '</td>';\n break;\n case 'caracteristicas';\n if ($sql[0]['estado'] == 1) {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"caracteristicas\" data-rowid=\"caracteristicas_\" data-tabla=\"web_inicio_caracteristicas\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"1\"><span class=\"label label-primary\">Activo</span></a>';\n } else {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"caracteristicas\" data-rowid=\"caracteristicas_\" data-tabla=\"web_inicio_caracteristicas\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"0\"><span class=\"label label-danger\">Inactivo</span></a>';\n }\n $icono = '<i class=\"' . utf8_encode($sql[0]['icon']) . '\"></i>';\n $btnEditar = '<a class=\"editDTContenido pointer btn-xs\" data-id=\"' . $id . '\" data-url=\"modalEditarCaracteristicas\"><i class=\"fa fa-edit\"></i> Editar </a>';\n $data = '<td>' . utf8_encode($sql[0]['orden']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['titulo']) . '</td>'\n . '<td>' . $icono . '</td>'\n . '<td>' . $estado . '</td>'\n . '<td>' . $btnEditar . '</td>';\n break;\n case 'frases':\n if ($sql[0]['estado'] == 1) {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"frases\" data-rowid=\"frases_\" data-tabla=\"web_frases\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"1\"><span class=\"label label-primary\">Activo</span></a>';\n } else {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"frases\" data-rowid=\"frases_\" data-tabla=\"web_frases\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"0\"><span class=\"label label-danger\">Inactivo</span></a>';\n }\n $btnEditar = '<a class=\"editDTContenido pointer btn-xs\" data-id=\"' . $id . '\" data-url=\"modalEditarFrases\"><i class=\"fa fa-edit\"></i> Editar </a>';\n $data = '<td>' . utf8_encode($sql[0]['orden']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['frase']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['autor']) . '</td>'\n . '<td>' . $estado . '</td>'\n . '<td>' . $btnEditar . '</td>';\n break;\n case 'servicios':\n if ($sql[0]['estado'] == 1) {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"servicios\" data-rowid=\"servicios_\" data-tabla=\"web_inicio_servicios\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"1\"><span class=\"label label-primary\">Activo</span></a>';\n } else {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"servicios\" data-rowid=\"servicios_\" data-tabla=\"web_inicio_servicios\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"0\"><span class=\"label label-danger\">Inactivo</span></a>';\n }\n $btnEditar = '<a class=\"editDTContenido pointer btn-xs\" data-id=\"' . $id . '\" data-url=\"modalEditarServicios\"><i class=\"fa fa-edit\"></i> Editar </a>';\n $data = '<td>' . utf8_encode($sql[0]['orden']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['servicio']) . '</td>'\n . '<td>' . $estado . '</td>'\n . '<td>' . $btnEditar . '</td>';\n break;\n case 'verContacto':\n if ($sql[0]['leido'] == 1) {\n $estado = '<span class=\"label label-primary\">Leído</span>';\n } else {\n $estado = '<span class=\"label label-danger\">No Leído</span>';\n }\n $btnEditar = '<a class=\"btnVerContacto pointer btn-xs\" data-id=\"' . $id . '\" data-url=\"modalVerContacto\"><i class=\"fa fa-edit\"></i> Ver Datos </a>';\n $data = '<td>' . $id . '</td>'\n . '<td>' . utf8_encode($sql[0]['nombre']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['email']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['asunto']) . '</td>'\n . '<td>' . date('d-m-Y H:i:s', strtotime($sql[0]['fecha'])) . '</td>'\n . '<td>' . $estado . '</td>'\n . '<td>' . $btnEditar . '</td>';\n break;\n case 'blog':\n if ($sql[0]['estado'] == 1) {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"blog\" data-rowid=\"blog_\" data-tabla=\"web_blog\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"1\"><span class=\"label label-primary\">Activo</span></a>';\n } else {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"blog\" data-rowid=\"blog_\" data-tabla=\"web_blog\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"0\"><span class=\"label label-danger\">Inactivo</span></a>';\n }\n $btnEditar = '<a class=\"editDTContenido pointer btn-xs\" data-id=\"' . $id . '\" data-url=\"modalEditarBlogPost\"><i class=\"fa fa-edit\"></i> Editar </a>';\n $imagen = '<img class=\"img-responsive imgBlogTable\" src=\"' . URL . 'public/images/blog/' . $sql[0]['imagen_thumb'] . '\">';\n $data = '<td>' . $sql[0]['id'] . '</td>'\n . '<td>' . utf8_encode($sql[0]['titulo']) . '</td>'\n . '<td>' . $imagen . '</td>'\n . '<td>' . date('d-m-Y', strtotime($sql[0]['fecha_blog'])) . '</td>'\n . '<td>' . $estado . '</td>'\n . '<td>' . $btnEditar . '</td>';\n break;\n case 'usuarios':\n if ($sql[0]['estado'] == 1) {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"usuarios\" data-rowid=\"usuarios_\" data-tabla=\"admin_usuario\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"1\"><span class=\"label label-primary\">Activo</span></a>';\n } else {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"usuarios\" data-rowid=\"usuarios_\" data-tabla=\"admin_usuario\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"0\"><span class=\"label label-danger\">Inactivo</span></a>';\n }\n $btnEditar = '<a class=\"editDTContenido pointer btn-xs\" data-id=\"' . $id . '\" data-url=\"modalEditarDTUsuario\"><i class=\"fa fa-edit\"></i> Editar </a>';\n $data = '<td>' . utf8_encode($sql[0]['nombre']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['email']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['rol']) . '</td>'\n . '<td>' . $estado . '</td>'\n . '<td>' . $btnEditar . '</td>';\n break;\n case 'paciente':\n if ($sql[0]['estado'] == 1) {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"paciente\" data-rowid=\"paciente_\" data-tabla=\"paciente\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"1\"><span class=\"label label-primary\">Activo</span></a>';\n } else {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"paciente\" data-rowid=\"paciente_\" data-tabla=\"paciente\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"0\"><span class=\"label label-danger\">Inactivo</span></a>';\n }\n $btnEditar = '<a class=\"editDTContenido pointer btn-xs\" data-id=\"' . $id . '\" data-url=\"modalEditarDatosPaciente\"><i class=\"fa fa-edit\"></i> Ver Datos / Editar </a>';\n $data = '<td>' . $id . '</td>'\n . '<td>' . utf8_encode($sql[0]['nombre']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['apellido']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['email']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['documento']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['telefono']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['celular']) . '</td>'\n . '<td>' . $estado . '</td>'\n . '<td>' . $btnEditar . '</td>';\n break;\n case 'redes':\n if ($sql[0]['estado'] == 1) {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"redes\" data-rowid=\"redes_\" data-tabla=\"web_redes\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"1\"><span class=\"label label-primary\">Activo</span></a>';\n } else {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"redes\" data-rowid=\"redes_\" data-tabla=\"web_redes\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"0\"><span class=\"label label-danger\">Inactivo</span></a>';\n }\n $btnEditar = '<a class=\"editDTContenido pointer btn-xs\" data-id=\"' . $id . '\" data-url=\"modalEditarRedes\"><i class=\"fa fa-edit\"></i> Editar </a>';\n $data = '<td>' . utf8_encode($sql[0]['descripcion']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['enlace']) . '</td>'\n . '<td>' . $estado . '</td>'\n . '<td>' . $btnEditar . '</td>';\n break;\n case 'metatags':\n $btnEditar = '<a class=\"editDTContenido pointer btn-xs\" data-id=\"' . $id . '\" data-url=\"modalEditarMetaTag\"><i class=\"fa fa-edit\"></i> Editar </a>';\n $data = '<td>' . $id . '</td>'\n . '<td>' . utf8_encode($sql[0]['pagina']) . '</td>'\n . '<td>' . $btnEditar . '</td>';\n break;\n }\n return $data;\n }", "title": "" }, { "docid": "24fbbeb9da9d5a7e7a14e63addca9901", "score": "0.63551795", "text": "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}", "title": "" }, { "docid": "875ac6c86e8dd9e61088bcefc8cd58c9", "score": "0.63423985", "text": "public function seleccionar($tablas, $columnas, $condicion = \"\", $agrupamiento = \"\", $ordenamiento = \"\", $filaInicial = NULL, $numeroFilas = NULL) {\n $listaColumnas = array();\n $listaTablas = array();\n $limite = \"\";\n\n if (!is_array($tablas)){\n $tablas = array($tablas);\n\n }\n \n if (!is_array($columnas)){\n $columnas = array($columnas);\n\n }\n\n foreach ($columnas as $alias => $columna) {\n\n if (preg_match(\"/(^[a-zA-z]+[a-zA-Z0-9]*)/\", $alias)) {\n $alias = \" AS $alias\";\n } else {\n $alias = '';\n }\n\n $listaColumnas[] = $columna . $alias;\n }\n\n $columnas = implode(', ', $listaColumnas);\n\n foreach ($tablas as $alias => $tabla) {\n\n if (preg_match(\"/(^[a-zA-z]+[a-zA-Z0-9]*)/\", $alias)) {\n $alias = ' AS ' . $alias;\n } else {\n $alias = '';\n }\n\n $tabla = $this->prefijo . $tabla;\n $listaTablas[] = $tabla . $alias;\n }\n\n if (!empty($condicion)) {\n $condicion = ' WHERE ' . $condicion;\n }\n\n if (!empty($agrupamiento)) {\n $agrupamiento = ' GROUP BY ' . $agrupamiento;\n }\n\n if (!empty($ordenamiento)) {\n $ordenamiento = ' ORDER BY ' . $ordenamiento;\n }\n\n if (is_int($numeroFilas) && $numeroFilas > 0) {\n $limite = ' LIMIT ';\n\n if (is_int($filaInicial) && $filaInicial >= 0) {\n $limite .= \"$filaInicial, \";\n }\n\n $limite .= $numeroFilas;\n }\n\n $tablas = implode(', ', $listaTablas);\n $sentencia = 'SELECT ' . $columnas . ' FROM ' . $tablas . $condicion . $agrupamiento . $ordenamiento . $limite;\n\n $this->sentenciaSql = $sentencia;\n\n return $this->ejecutar($sentencia);\n }", "title": "" }, { "docid": "1be212f5e3acdeac1e143a4c65c87322", "score": "0.63361585", "text": "public function select($field);", "title": "" }, { "docid": "6c2a4119797ab9120d6116aa9807685f", "score": "0.6333124", "text": "public function getById($id = null){\n $colunas = implode(', ',array_keys($this->arAtributos));\n $id = empty($id) ? $this->arAtributos[$this->campoId] : $id;\n $where = \"\";\n if(!empty($id)){\n $where = \"WHERE {$this->campoId} = '{$id}'\";\n }\n $sql = <<<SQL\n SELECT {$colunas} FROM {$this->tableName} {$where}\nSQL;\n return $this->db->fetchAll($sql)[0];\n }", "title": "" }, { "docid": "803fda7af8f75c0603344deebcb7c42f", "score": "0.6330193", "text": "public function getSelect($param) {\n //operario y poder seleccionar el operario que va ser foranea en otra tabla\n $json = FALSE;\n extract($param);\n $select = \"\";\n $select .= \"<option value='0'>Seleccione un Operario</option>\";\n foreach ($conexion->getPDO()->query(\"SELECT fk_usuario, nombres FROM operario ORDER BY nombres\") as $fila) {\n $select .= \"<option value='{$fila['fk_usuario']}'>{$fila['fk_usuario']} - {$fila['nombres']}</option>\";\n }\n echo $json ? json_encode($select) : (\"<select id='$id'>$select</select>\");\n }", "title": "" }, { "docid": "a290aac88016f43369ff359fca953e90", "score": "0.6326507", "text": "function select($id)\n\t{\n\treturn parent::select($id);\n\t}", "title": "" }, { "docid": "a290aac88016f43369ff359fca953e90", "score": "0.6326507", "text": "function select($id)\n\t{\n\treturn parent::select($id);\n\t}", "title": "" }, { "docid": "5d6be00d822cae4ea0de925295ca4fb2", "score": "0.6310631", "text": "function select($id){\r\n\t\t$sql = \"SELECT * FROM gestaoti.unidade_organizacional WHERE seq_unidade_organizacional = $id\";\r\n\t\t$result = $this->database->query($sql);\r\n\t\t$result = $this->database->result;\r\n\r\n\t\t$row = pg_fetch_object($result);\r\n\t\t$this->SEQ_UNIDADE_ORGANIZACIONAL = $row->seq_unidade_organizacional;\r\n\t\t$this->NOM_UNIDADE_ORGANIZACIONAL = $row->nom_unidade_organizacional;\r\n\t\t$this->SEQ_UNIDADE_ORGANIZACIONAL_PAI = $row->seq_unidade_organizacional_pai;\r\n\t\t$this->SGL_UNIDADE_ORGANIZACIONAL = $row->sgl_unidade_organizacional;\r\n\t}", "title": "" }, { "docid": "a378e9e06a96ba9c7dfb469d3172f566", "score": "0.6310442", "text": "function dataSelect() {\n\t\t\t\t$koneksi = $this->koneksi;\n\t\t\t\t// SQL\n\t\t\t\t$query\t\t\t= \"SELECT * FROM pegawai ORDER BY id ASC\";\n\t\t\t\t\n\t\t\t\t$sql\t\t\t= mysqli_query($koneksi,$query);\n\t\t\t\t\n\t\t\t\treturn $sql;\n\t\t\t}", "title": "" }, { "docid": "f026e5ec4863db449341421badcec13c", "score": "0.6305219", "text": "function getDataTable($table_name, $id = false, $debug = FALSE)\n{\n $table_from = get_sql_from($table_name);\n $table_fields = get_sql_fields($table_name);\n $where_id = \"\";\n if ($id) {\n $table_key_fieldName = getPKFieldName($table_name);\n $where_id = \"AND `$table_name`.`$table_key_fieldName`='$id'\";\n }\n\n $sql = \"SELECT {$table_fields} FROM {$table_from} \" . $where_id;\n if ($debug) {\n echo Notification::placeholder();\n echo Notification::show(array(\n 'message' => $sql,\n 'class' => 'warning',\n 'dismiss_seconds' => 0\n ));\n echo ob_get_clean();\n exit;\n }\n $res = sql($sql, $eo);\n return db_fetch_assoc($res);\n}", "title": "" }, { "docid": "a451c2908812091b8abb931f2a11a360", "score": "0.6303665", "text": "abstract public function prepareSelect();", "title": "" }, { "docid": "5ae2163f24f6768ed71877d4ad2cead2", "score": "0.6285538", "text": "public function select($datos_){\n $id=$datos_->getId();\n\n try {\n $sql= \"SELECT `id`, `nombre_proyecto`, `nombre_actividad`, `modalidad_participacion`, `responsable`, `fecha_realizacion`, `producto`, `semillero_id`\"\n .\"FROM `datos_`\"\n .\"WHERE `id`='$id'\";\n $data = $this->ejecutarConsulta($sql);\n for ($i=0; $i < count($data) ; $i++) {\n $datos_->setId($data[$i]['id']);\n $datos_->setNombre_proyecto($data[$i]['nombre_proyecto']);\n $datos_->setNombre_actividad($data[$i]['nombre_actividad']);\n $datos_->setModalidad_participacion($data[$i]['modalidad_participacion']);\n $datos_->setResponsable($data[$i]['responsable']);\n $datos_->setFecha_realizacion($data[$i]['fecha_realizacion']);\n $datos_->setProducto($data[$i]['producto']);\n $semillero = new Semillero();\n $semillero->setId($data[$i]['semillero_id']);\n $datos_->setSemillero_id($semillero);\n\n }\n return $datos_; } catch (SQLException $e) {\n throw new Exception('Primary key is null');\n return null;\n }\n }", "title": "" }, { "docid": "fdd06200bb3f4c156e2de7fa037709c8", "score": "0.6265374", "text": "function selectRecord($table,$field,$where) {\n\t\tif($where!='')\n\t\t\t$where= ' WHERE '.$where;\n \t$query = \"SELECT \".$field.\"\n \t FROM \".$this->tablePrefix .$table.$where ;\n\t\t // echo $query.'<br>';exit;\n $res = $this->execute($query);\n \treturn $this->fetchRow($res);\n }", "title": "" }, { "docid": "0ce7a5ebbe73074dd69eba3a73cb901f", "score": "0.62627053", "text": "function recorre_tabla_anidada($nombreta, $nombretp, $selectDestino){\r\n$sql_query= \"Select * From $nombreta Where universidad = '$nombretp'\";\t\r\n$consulta=pg_query($sql_query);\r\necho \"<div><select name='$selectDestino' id='$selectDestino' onChange='cargaContenido(this.id)'>\";\r\necho \"<option value='0'>Seleccione $nombreta</option>\";\r\nwhile($fila=pg_fetch_row($consulta)){\r\n\techo \"<option value='\".$fila[0].\"'>\".$fila[1].\"</option>\";}\t\t\t\r\necho \"</select></div>\";\t\r\n}", "title": "" }, { "docid": "e5ef6d7d2786530024158ea2c4c993a8", "score": "0.62581897", "text": "function recorre_tabla_anidada($nombreta, $nombretp, $selectDestino){\r\n$sql_query= \"Select * From $nombreta Where universidad = '$nombretp'\";\t\r\n$consulta=pg_query($sql_query);\r\necho \"<div><select name='$selectDestino' id='$selectDestino' onChange='cargaContenido(this.id)'>\";\r\necho \"<option value='0'>Seleccione $nombreta</option>\";\r\nwhile($fila=pg_fetch_row($consulta)){\r\n\techo \"<option value='\".$fila[0].\"'>\".$fila[0].\"</option>\";}\t\t\t\r\necho \"</select></div>\";\t\r\n}", "title": "" }, { "docid": "218c428caf5933571c30c4d26f6e86de", "score": "0.62526953", "text": "function adv_select($table, array $where = null, array $fields = null, $order = '', $limit = null, $offset = null);", "title": "" }, { "docid": "a2b5717b1fa3291eb48bd76376deb18c", "score": "0.62457794", "text": "function get_row_data($table,$field_name,$id)\r\n\t{\t\r\n\t\t$sql_query=\"SELECT * FROM $table WHERE `id`='\".$id.\"'\";\r\n\t\t$res_query=hb_mysql_query($sql_query);\r\n\t\t$rows_query=hb_mysql_fetch_array($res_query);\r\n\t\t\r\n\t\t$get_field_name=$rows_query[$field_name];\r\n\t\t\r\n\t\treturn $get_field_name;\r\n\t}", "title": "" }, { "docid": "5bd5be41f7cc5b53657e433ba0053a9d", "score": "0.6228982", "text": "public function select($table, $where = '', $fields = '*', $order = '', $limit = null, $offset = '')\n {\n $query = \"SELECT $fields FROM $table \".\n ($where ? \" WHERE $where \" : '')\n .($limit ? \" LIMIT $limit \" : '')\n .(($offset && $limit ? \" OFFSET $offset \" : ''))\n .($order ? \"ORDER BY $order \" : '');\n $this->prepareQuery($query);\n\n }", "title": "" }, { "docid": "d2f35b4e044d338c446a8495d035b754", "score": "0.6198013", "text": "function selectResult($table,$field,$where) {\n\t\tif($where!='')\n\t\t\t$where= ' WHERE '.$where;\n \t$query = \"SELECT \".$field.\"\n \t FROM \".$this->tablePrefix .$table.$where ;\n\t\t//echo $query;//exit;\n $res = $this->execute($query);\n \treturn $this->fetchAll($res);\n }", "title": "" }, { "docid": "3eaca7c45cd9b67a89812b1018d87bfd", "score": "0.6193105", "text": "function select($id){\n\t\t\t$data = $this->dbh->query(\"SELECT * FROM tbl_pegawai WHERE id =\".$id);\n\t\t\treturn $data->fetch();\n\t\t}", "title": "" }, { "docid": "eaec334fd55cacf3d7d0a9265ba501d2", "score": "0.6187496", "text": "static public function selectId($id);", "title": "" }, { "docid": "9cd6e09b55d6d472c395e33b8df716bb", "score": "0.6163662", "text": "public function requeteSelect($table) {\n $injectionSQL = \"SELECT * FROM `$table`\";\n // INSERT INTO `livre` (`id_livre`, `Auteur`, `Titre`) VALUES (NULL, 'Test', 'Un test');\n\n $request = $this->monPDO->prepare($injectionSQL);\n\n if ($request->execute()) { \n \n $res = $request->fetchAll();\n return $res;\n }\n }", "title": "" }, { "docid": "6599cfafed37f9a127b9649a2cb8566e", "score": "0.61603403", "text": "public function getSelect();", "title": "" }, { "docid": "6599cfafed37f9a127b9649a2cb8566e", "score": "0.61603403", "text": "public function getSelect();", "title": "" }, { "docid": "d85caa66a119938048e89538c6dfcb2f", "score": "0.6155454", "text": "function tampil_data_id($tabel,$where,$id)\n {\n $row = $this->db->prepare(\"SELECT * FROM $tabel WHERE $where = :id,:teks,:label,:predict\");\n $row->execute(array($id));\n return $hasil = $row->fetch();\n }", "title": "" }, { "docid": "0cf4181e41338b844c77654125fb220b", "score": "0.6146156", "text": "public function select($fields);", "title": "" }, { "docid": "a24c5c5db1db1de33c2607c755cb58e6", "score": "0.6140803", "text": "public function selectById($id){\r\n $sql = SELECT . VIEW_ANUNCIOS . \" WHERE idVeiculo=\".$id;\r\n\r\n //Abrindo conexão com o BD\r\n $PDO_conex = $this->conex->connectDataBase();\r\n\r\n //executa o script de select no bd\r\n $select = $PDO_conex->query($sql);\r\n\r\n /* $select->fetch no formado pdo retorna os dados do BD\r\n também retorna com característica do PDO como o fetch\r\n é necessário especificar o modelo de conversão.\r\n EX: PDO::FETCH_ASSOC, PDO::FETCH_ARRAY etc. */\r\n if($rsAnuncios=$select->fetch(PDO::FETCH_ASSOC)){\r\n $anuncios = new anuncios();\r\n $anuncios->setIdVeiculo($rsAnuncios[\"idVeiculo\"]);\r\n $anuncios->setNomeModelo($rsAnuncios[\"nomeModelo\"]);\r\n $anuncios->setNomeMarca($rsAnuncios[\"nomeMarca\"]);\r\n $anuncios->setFotoVeiculo($rsAnuncios[\"fotoVeiculo\"]);\r\n }\r\n\r\n $this->conex->closeDataBase();\r\n\r\n return($anuncios);\r\n }", "title": "" }, { "docid": "b60a699e43549f54a5e7e10ba0209683", "score": "0.614055", "text": "public function selectMatiere($id){\n $con=new Connexion();\n $conn2=$con->con; \n $query=\"SELECT * FROM matiere where IdM=$id\";\n $result = $conn2->prepare($query);\n $result->execute();\n return $result->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "6ff4183314ce7fce58ae4f11181e57f4", "score": "0.6134934", "text": "function selectByIdac_consumos($consumo_id){\n\t\t\t$this->connection = Connection::getinstance()->getConn();\n\t\t\t$PreparedStatement = \"SELECT consumo_id, socio_id, nro_medidor, fecha_lectura, fecha_emision, periodo_mes, periodo_anio, consumo_total_lectura, consumo_por_pagar, costo_consumo_por_pagar, estado, fecha_hora_pago, usuario_pago, monto_pagado, pagado_por, ci_pagado_por,\n (SELECT CONCAT(nombres,' ',apellidos) FROM asapasc.ac_socios WHERE socio_id = asapasc.ac_consumos.socio_id) AS socio \n FROM asapasc.ac_consumos WHERE consumo_id = \".Connection::inject($consumo_id).\" ;\";\n\t\t\t$ResultSet = mysql_query($PreparedStatement,$this->connection);\n\t\t\tlogs::set_log(__FILE__,__CLASS__,__METHOD__, $PreparedStatement);\n\n\t\t\t$elem = new ac_consumosTO();\n\t\t\twhile($row = mysql_fetch_array($ResultSet)){\n\t\t\t\t$elem = new ac_consumosTO();\n\t\t\t\t$elem->setConsumo_id($row['consumo_id']);\n\t\t\t\t$elem->setSocio_id($row['socio_id']);\n\t\t\t\t$elem->setNro_medidor($row['nro_medidor']);\n\t\t\t\t$elem->setFecha_lectura($row['fecha_lectura']);\n\t\t\t\t$elem->setFecha_emision($row['fecha_emision']);\n\t\t\t\t$elem->setPeriodo_mes($row['periodo_mes']);\n\t\t\t\t$elem->setPeriodo_anio($row['periodo_anio']);\n\t\t\t\t$elem->setConsumo_total_lectura($row['consumo_total_lectura']);\n\t\t\t\t$elem->setConsumo_por_pagar($row['consumo_por_pagar']);\n\t\t\t\t$elem->setCosto_consumo_por_pagar($row['costo_consumo_por_pagar']);\n\t\t\t\t$elem->setEstado($row['estado']);\n\t\t\t\t$elem->setFecha_hora_pago($row['fecha_hora_pago']);\n\t\t\t\t$elem->setUsuario_pago($row['usuario_pago']);\n\t\t\t\t$elem->setMonto_pagado($row['monto_pagado']);\n\t\t\t\t$elem->setPagado_por($row['pagado_por']);\n\t\t\t\t$elem->setCi_pagado_por($row['ci_pagado_por']);\n $elem->setSocio($row['socio']);\n\n\t\t\t}\n\t\t\tmysql_free_result($ResultSet);\n\t\t\treturn $elem;\n\t\t}", "title": "" }, { "docid": "82d956800783a8a52fd9e83d98952e4c", "score": "0.6129952", "text": "function select($id)\r\n{\r\n\r\n$sql = \"SELECT * FROM aattribut WHERE aatribut_pk_id = $id;\";\r\n$result = $this->database->query($sql);\r\n$result = $this->database->result;\r\n$row = mysql_fetch_object($result);\r\n\r\n\r\n$this->id_attribut = $row->id_attribut;\r\n\r\n$this->id_produit = $row->id_produit;\r\n\r\n$this->valeur = $row->valeur;\r\n\r\n}", "title": "" }, { "docid": "8da8d83f3792c806720f2b582e168c39", "score": "0.6117011", "text": "public function select($table, $where_sql = false, $where_fields_values = false, $custom_select_sql = false, $order = false, $limit = false)\r\n\t{\r\n\t\t$sql = $this->generate_select_sql ($table, $where_sql, $where_fields_values, $custom_select_sql, $order, $limit);\r\n\t\treturn $this->query($sql);\r\n\t}", "title": "" }, { "docid": "230144f75d82aaba7b4034d2ffbb8933", "score": "0.6116582", "text": "public function select($table, array $fields = null);", "title": "" }, { "docid": "185589d9a9b56b23ca0f64201c354753", "score": "0.611361", "text": "public function get_select_data($id = null)\r\n\t{\r\n\t\t$data = $this->get_array_data($id);\r\n\t\t$result = array();\r\n\t\tforeach ($data as $row)\r\n\t\t\t$result[] = array(\r\n\t\t\t\t\"id\" => $row[$this->id_field],\r\n\t\t\t\t\"name\" => $this->map_name_value($row)\r\n\t\t\t);\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "542d33034ced589c00d820e2e3dd94f6", "score": "0.61031455", "text": "private function __select() {\n $from_str = $this->getFromStr();\n $field = $this->field_str;\n if (empty($field)) {\n $field = '*';\n }\n $sql = \"SELECT {$field} FROM {$from_str}\";\n if (!empty($this->join_str_list)) {\n $temp = implode(' ', $this->join_str_list);\n $sql .= \" {$temp}\";\n }\n if (!empty($this->where_str)) {\n $sql .= \" WHERE {$this->where_str}\";\n }\n if (!empty($this->group_str)) {\n $sql .= \" GROUP BY {$this->group_str}\";\n }\n if (!empty($this->order_str)) {\n $sql .= \" ORDER BY {$this->order_str}\";\n }\n if (!empty($this->limit_str)) {\n $sql .= \" LIMIT {$this->limit_str}\";\n }\n $list = $this->query($sql);\n return $list;\n }", "title": "" }, { "docid": "0747c5c1cf96eead3fb2aff446a6520e", "score": "0.6100416", "text": "private function rowDataTable($seccion, $tabla, $id) {\n $data = '';\n switch ($tabla) {\n case 'usuario':\n $sql = $this->db->select(\"SELECT wa.nombre, wa.email, wr.descripcion as rol, wa.estado\n FROM usuario wa\n LEFT JOIN usuario_rol wr on wr.id = wa.id_usuario_rol WHERE wa.id = $id;\");\n break;\n case 'meta_tags':\n $sql = $this->db->select(\"SELECT\n m.es_texto,\n en_texto\n FROM\n meta_tags mt\n LEFT JOIN menu m ON m.id = mt.id_menu WHERE mt.id = $id;\");\n break;\n default :\n $sql = $this->db->select(\"SELECT * FROM $tabla WHERE id = $id;\");\n break;\n }\n\n switch ($seccion) {\n case 'redes':\n if ($sql[0]['estado'] == 1) {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"redes\" data-rowid=\"redes_\" data-tabla=\"redes\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"1\"><span class=\"label label-primary\">Activo</span></a>';\n } else {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"redes\" data-rowid=\"redes_\" data-tabla=\"redes\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"0\"><span class=\"label label-danger\">Inactivo</span></a>';\n }\n $btnEditar = '<a class=\"editDTContenido pointer btn-xs\" data-id=\"' . $id . '\" data-url=\"modalEditarRedes\"><i class=\"fa fa-edit\"></i> Editar </a>';\n $btnBorrar = '<a class=\"deletDTContenido pointer btn-xs txt-red\" data-rowid=\"redes_\" data-id=\"' . $id . '\" data-tabla=\"redes\"><i class=\"fa fa-trash-o\"></i> Eliminar </a>';\n $data = '<td>' . utf8_encode($sql[0]['orden']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['descripcion']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['url']) . '</td>'\n . '<td>' . $estado . '</td>'\n . '<td>' . $btnEditar . ' ' . $btnBorrar . '</td>';\n break;\n case 'usuarios':\n if ($sql[0]['estado'] == 1) {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"usuarios\" data-rowid=\"usuarios_\" data-tabla=\"usuario\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"1\"><span class=\"label label-primary\">Activo</span></a>';\n } else {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"usuarios\" data-rowid=\"usuarios_\" data-tabla=\"usuario\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"0\"><span class=\"label label-danger\">Inactivo</span></a>';\n }\n $btnEditar = '<a class=\"editDTContenido pointer btn-xs\" data-id=\"' . $id . '\" data-url=\"modalEditarDTUsuario\"><i class=\"fa fa-edit\"></i> Editar </a>';\n $btnBorrar = '<a class=\"deletDTContenido pointer btn-xs txt-red\" data-rowid=\"usuarios_\" data-id=\"' . $id . '\" data-tabla=\"usuario\"><i class=\"fa fa-trash-o\"></i> Eliminar </a>';\n $data = '<td>' . utf8_encode($sql[0]['nombre']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['email']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['rol']) . '</td>'\n . '<td>' . $estado . '</td>'\n . '<td>' . $btnEditar . ' ' . $btnBorrar . '</td>';\n break;\n case 'blog':\n if ($sql[0]['estado'] == 1) {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"blog\" data-rowid=\"blog_\" data-tabla=\"blog\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"1\"><span class=\"label label-primary\">Activo</span></a>';\n } else {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"blog\" data-rowid=\"blog_\" data-tabla=\"blog\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"0\"><span class=\"label label-danger\">Inactivo</span></a>';\n }\n $btnEditar = '<a class=\"editDTContenido pointer btn-xs\" data-id=\"' . $id . '\" data-url=\"modalEditarBlogPost\" data-pagina=\"blog\"><i class=\"fa fa-edit\"></i> Editar </a>';\n $btnBorrar = '<a class=\"deletDTContenido pointer btn-xs txt-red\" data-rowid=\"redes_\" data-id=\"' . $id . '\" data-tabla=\"redes\"><i class=\"fa fa-trash-o\"></i> Eliminar </a>';\n if (empty($sql[0]['youtube_id'])) {\n $imagen = '<img class=\"img-responsive imgBlogTable\" src=\"' . URL . 'public/images/blog/thumb/' . $sql[0]['imagen_thumb'] . '\">';\n } else {\n $imagen = '<iframe class=\"scale-with-grid\" src=\"http://www.youtube.com/embed/' . $sql[0]['youtube_id'] . '?wmode=opaque\" allowfullscreen></iframe>';\n }\n $data = '<td>' . $sql[0]['id'] . '</td>'\n . '<td>' . utf8_encode($sql[0]['es_titulo']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['en_titulo']) . '</td>'\n . '<td>' . $imagen . '</td>'\n . '<td>' . date('d-m-Y', strtotime($sql[0]['fecha_blog'])) . '</td>'\n . '<td>' . $estado . '</td>'\n . '<td>' . $btnEditar . ' ' . $btnBorrar . '</td>';\n break;\n case 'slider':\n if ($sql[0]['estado'] == 1) {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"slider\" data-rowid=\"slider_\" data-tabla=\"slider\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"1\"><span class=\"label label-primary\">Activo</span></a>';\n } else {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"slider\" data-rowid=\"slider_\" data-tabla=\"slider\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"0\"><span class=\"label label-danger\">Inactivo</span></a>';\n }\n $btnEditar = '<a class=\"editDTContenido pointer btn-xs\" data-id=\"' . $id . '\" data-url=\"modalEditarDTSlider\" data-pagina=\"slider\"><i class=\"fa fa-edit\"></i> Editar </a>';\n $btnBorrar = '<a class=\"deletDTContenido pointer btn-xs txt-red\" data-rowid=\"slider_\" data-id=\"' . $id . '\" data-tabla=\"slider\"><i class=\"fa fa-trash-o\"></i> Eliminar </a>';\n if (!empty($sql[0]['imagen'])) {\n $img = '<img src=\"' . URL . 'public/images/slider/' . $sql[0]['imagen'] . '\" style=\"width: 160px;\">';\n } else {\n $img = '-';\n }\n $data = '<td>' . utf8_encode($sql[0]['orden']) . '</td>'\n . '<td>' . $img . '</td>'\n . '<td>' . utf8_encode($sql[0]['es_titulo']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['en_titulo']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['es_titulo_principal']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['en_titulo_principal']) . '</td>'\n . '<td>' . $estado . '</td>'\n . '<td>' . $btnEditar . ' ' . $btnBorrar . '</td>';\n break;\n case 'certificaciones':\n if ($sql[0]['estado'] == 1) {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"certificaciones\" data-rowid=\"certificaciones_\" data-tabla=\"certificaciones\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"1\"><span class=\"label label-primary\">Activo</span></a>';\n } else {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"certificaciones\" data-rowid=\"certificaciones_\" data-tabla=\"certificaciones\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"0\"><span class=\"label label-danger\">Inactivo</span></a>';\n }\n $btnEditar = '<a class=\"editDTContenido pointer btn-xs\" data-id=\"' . $id . '\" data-url=\"modalEditarDTCertificaciones\" data-pagina=\"certificaciones\"><i class=\"fa fa-edit\"></i> Editar </a>';\n $btnBorrar = '<a class=\"deletDTContenido pointer btn-xs txt-red\" data-rowid=\"certificaciones_\" data-id=\"' . $id . '\" data-tabla=\"certificaciones\"><i class=\"fa fa-trash-o\"></i> Eliminar </a>';\n if (!empty($sql[0]['imagen_certificacion'])) {\n $img = '<img src=\"' . URL . 'public/images/certificaciones/' . $sql[0]['imagen_certificacion'] . '\" style=\"width: 160px;\">';\n } else {\n $img = '-';\n }\n $data = '<td>' . utf8_encode($sql[0]['orden']) . '</td>'\n . '<td>' . $img . '</td>'\n . '<td>' . utf8_encode($sql[0]['es_nombre']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['en_nombre']) . '</td>'\n . '<td>' . $estado . '</td>'\n . '<td>' . $btnEditar . ' ' . $btnBorrar . '</td>';\n break;\n case 'fraseNosotros':\n if ($sql[0]['estado'] == 1) {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"fraseNosotros\" data-rowid=\"fraseNosotros_\" data-tabla=\"aboutus_seccion2\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"1\"><span class=\"label label-primary\">Activo</span></a>';\n } else {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"fraseNosotros\" data-rowid=\"fraseNosotros_\" data-tabla=\"aboutus_seccion2\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"0\"><span class=\"label label-danger\">Inactivo</span></a>';\n }\n $btnEditar = '<a class=\"editDTContenido pointer btn-xs\" data-id=\"' . $id . '\" data-url=\"modalEditarDTFraseNosotros\"><i class=\"fa fa-edit\"></i> Editar </a>';\n $btnBorrar = '<a class=\"deletDTContenido pointer btn-xs txt-red\" data-rowid=\"fraseNosotros_\" data-id=\"' . $id . '\" data-tabla=\"aboutus_seccion2\"><i class=\"fa fa-trash-o\"></i> Eliminar </a>';\n $data = '<td>' . utf8_encode($sql[0]['orden']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['es_frase']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['en_frase']) . '</td>'\n . '<td>' . $estado . '</td>'\n . '<td>' . $btnEditar . ' ' . $btnBorrar . '</td>';\n break;\n case 'fraseRetail':\n if ($sql[0]['estado'] == 1) {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"fraseRetail\" data-rowid=\"fraseRetail_\" data-tabla=\"privatelabel_seccion2\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"1\"><span class=\"label label-primary\">Activo</span></a>';\n } else {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"fraseRetail\" data-rowid=\"fraseRetail_\" data-tabla=\"privatelabel_seccion2\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"0\"><span class=\"label label-danger\">Inactivo</span></a>';\n }\n $btnEditar = '<a class=\"editDTContenido pointer btn-xs\" data-id=\"' . $id . '\" data-url=\"modalEditarDTFraseRetail\"><i class=\"fa fa-edit\"></i> Editar </a>';\n $btnBorrar = '<a class=\"deletDTContenido pointer btn-xs txt-red\" data-rowid=\"fraseRetail_\" data-id=\"' . $id . '\" data-tabla=\"privatelabel_seccion2\"><i class=\"fa fa-trash-o\"></i> Eliminar </a>';\n $data = '<td>' . utf8_encode($sql[0]['orden']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['es_frase']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['en_frase']) . '</td>'\n . '<td>' . $estado . '</td>'\n . '<td>' . $btnEditar . ' ' . $btnBorrar . '</td>';\n break;\n case 'nosotrosSeccion3':\n if ($sql[0]['estado'] == 1) {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"nosotrosSeccion3\" data-rowid=\"nosotrosSeccion3_\" data-tabla=\"aboutus_seccion3\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"1\"><span class=\"label label-primary\">Activo</span></a>';\n } else {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"nosotrosSeccion3\" data-rowid=\"nosotrosSeccion3_\" data-tabla=\"aboutus_seccion3\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"0\"><span class=\"label label-danger\">Inactivo</span></a>';\n }\n $btnEditar = '<a class=\"editDTContenido pointer btn-xs\" data-id=\"' . $id . '\" data-url=\"modalEditarDTNosotrosSeccion3\"><i class=\"fa fa-edit\"></i> Editar </a>';\n $btnBorrar = '<a class=\"deletDTContenido pointer btn-xs txt-red\" data-rowid=\"nosotrosSeccion3_\" data-id=\"' . $id . '\" data-tabla=\"aboutus_seccion3\"><i class=\"fa fa-trash-o\"></i> Eliminar </a>';\n $data = '<td>' . utf8_encode($sql[0]['orden']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['es_titulo']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['en_titulo']) . '</td>'\n . '<td>' . $estado . '</td>'\n . '<td>' . $btnEditar . ' ' . $btnBorrar . '</td>';\n break;\n case 'itemProductos':\n if ($sql[0]['estado'] == 1) {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"itemProductos\" data-rowid=\"itemProductos_\" data-tabla=\"productos_items\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"1\"><span class=\"label label-primary\">Activo</span></a>';\n } else {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"itemProductos\" data-rowid=\"itemProductos_\" data-tabla=\"productos_items\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"0\"><span class=\"label label-danger\">Inactivo</span></a>';\n }\n $btnEditar = '<a class=\"editDTContenido pointer btn-xs\" data-id=\"' . $id . '\" data-url=\"modalEditarDTItemProducto\" data-pagina=\"itemProductos\"><i class=\"fa fa-edit\"></i> Editar </a>';\n $btnBorrar = '<a class=\"deletDTContenido pointer btn-xs txt-red\" data-rowid=\"itemProductos_\" data-id=\"' . $id . '\" data-tabla=\"productos_items\"><i class=\"fa fa-trash-o\"></i> Eliminar </a>';\n if (!empty($sql[0]['imagen'])) {\n $img = '<img src=\"' . URL . 'public/images/productos/items/' . $sql[0]['imagen'] . '\" style=\"width: 160px;\">';\n } else {\n $img = '-';\n }\n $data = '<td>' . utf8_encode($sql[0]['orden']) . '</td>'\n . '<td>' . $img . '</td>'\n . '<td>' . utf8_encode($sql[0]['es_nombre']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['en_nombre']) . '</td>'\n . '<td>' . $estado . '</td>'\n . '<td>' . $btnEditar . ' ' . $btnBorrar . '</td>';\n break;\n case 'productos':\n if ($sql[0]['estado'] == 1) {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"productos\" data-rowid=\"productos_\" data-tabla=\"productos\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"1\"><span class=\"label label-primary\">Activo</span></a>';\n } else {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"productos\" data-rowid=\"productos_\" data-tabla=\"productos\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"0\"><span class=\"label label-danger\">Inactivo</span></a>';\n }\n $btnListado = '<a class=\"mostrarListadoProductos pointer btn-xs\" data-id=\"' . $id . '\"><i class=\"fa fa-list\"></i> Listado </a>';\n $btnEditar = '<a class=\"editDTContenido pointer btn-xs\" data-id=\"' . $id . '\" data-url=\"modalEditarDTProducto\" data-pagina=\"productos\"><i class=\"fa fa-edit\"></i> Editar </a>';\n //$btnBorrar = '<a class=\"deletDTContenido pointer btn-xs txt-red\" data-rowid=\"productos_\" data-id=\"' . $id . '\" data-tabla=\"productos\"><i class=\"fa fa-trash-o\"></i> Eliminar </a>';\n if (!empty($sql[0]['imagen'])) {\n $img = '<img src=\"' . URL . 'public/images/productos/' . $sql[0]['imagen'] . '\" style=\"width: 160px;\">';\n } else {\n $img = '-';\n }\n $data = '<td>' . utf8_encode($sql[0]['orden']) . '</td>'\n . '<td>' . $img . '</td>'\n . '<td>' . utf8_encode($sql[0]['es_producto']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['en_producto']) . '</td>'\n . '<td>' . $estado . '</td>'\n . '<td>' . $btnListado . ' ' . $btnEditar . '</td>';\n break;\n case 'servicios':\n if ($sql[0]['estado'] == 1) {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"servicios\" data-rowid=\"servicios_\" data-tabla=\"servicios\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"1\"><span class=\"label label-primary\">Activo</span></a>';\n } else {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"servicios\" data-rowid=\"servicios_\" data-tabla=\"servicios\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"0\"><span class=\"label label-danger\">Inactivo</span></a>';\n }\n $btnEditar = '<a class=\"editDTContenido pointer btn-xs\" data-id=\"' . $id . '\" data-url=\"modalEditarDTServicios\" data-pagina=\"servicios\"><i class=\"fa fa-edit\"></i> Editar </a>';\n $btnBorrar = '<a class=\"deletDTContenido pointer btn-xs txt-red\" data-rowid=\"servicios_\" data-id=\"' . $id . '\" data-tabla=\"servicios\"><i class=\"fa fa-trash-o\"></i> Eliminar </a>';\n $data = '<td>' . utf8_encode($sql[0]['orden']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['es_servicio']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['en_servicio']) . '</td>'\n . '<td>' . $estado . '</td>'\n . '<td>' . $btnEditar . ' ' . $btnBorrar . '</td>';\n break;\n case 'verContacto':\n if ($sql[0]['leido'] == 1) {\n $estado = '<span class=\"label label-primary\">Leído</span>';\n } else {\n $estado = '<span class=\"label label-danger\">No Leído</span>';\n }\n $btnEditar = '<a class=\"btnVerContacto pointer btn-xs\" data-id=\"' . $id . '\" data-url=\"modalVerContacto\"><i class=\"fa fa-edit\"></i> Ver Datos </a>';\n $data = '<td class=\"sorting_1\">' . $id . '</td>'\n . '<td>' . utf8_encode($sql[0]['nombre']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['email']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['asunto']) . '</td>'\n . '<td>' . date('d-m-Y H:i:s', strtotime($sql[0]['fecha'])) . '</td>'\n . '<td>' . $estado . '</td>'\n . '<td>' . $btnEditar . '</td>';\n break;\n case 'meta_tags':\n $btnEditar = '<a class=\"editDTContenido pointer btn-xs\" data-id=\"' . $id . '\" data-url=\"modalEditarMetaTag\"><i class=\"fa fa-edit\"></i> Editar </a>';\n $data = '<td>' . $id . '</td>'\n . '<td>' . utf8_encode($sql[0]['es_texto']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['en_texto']) . '</td>'\n . '<td>' . $btnEditar . '</td>';\n break;\n case 'menu':\n if ($sql[0]['estado'] == 1) {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"menu\" data-rowid=\"menu_\" data-tabla=\"menu\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"1\"><span class=\"label label-primary\">Activo</span></a>';\n } else {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"menu\" data-rowid=\"menu_\" data-tabla=\"menu\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"0\"><span class=\"label label-danger\">Inactivo</span></a>';\n }\n $btnEditar = '<a class=\"editDTContenido pointer btn-xs\" data-id=\"' . $id . '\" data-url=\"modalEditarMenu\"><i class=\"fa fa-edit\"></i> Editar </a>';\n $data = '<td>' . utf8_encode($sql[0]['orden']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['es_texto']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['en_texto']) . '</td>'\n . '<td>' . $estado . '</td>'\n . '<td>' . $btnEditar . '</td>';\n break;\n }\n return $data;\n }", "title": "" }, { "docid": "0d60b0b6fb3a9d4e0c5473b3493cba6f", "score": "0.60968596", "text": "public abstract function getSelectSQL($fields, $from, $joins, $where, $having, $group, $order, $limit, $values, $forupdate);", "title": "" }, { "docid": "8f4155134cb60905427b1b07b2ecdaa6", "score": "0.6090315", "text": "function getNameById($table='',$id='',$field=''){\n\t\t\t$qry=\"select * from $table where $field='$id'\";\n\t\t\t$CI =& get_instance();\n\t\t\t$qryy = $CI->db->query($qry);\t\n\t\t\t$result = $qryy->row();\t\n\t\t\treturn $result;\t\n\t\t}", "title": "" }, { "docid": "c24555d69c5f1f01f82a9fa8db7692d4", "score": "0.6088947", "text": "public function GetRecordById($columnas, $tabla, $condicion, $valores,$getObjects=true){\n $sql=null;\n $col=null;\n $auxval=null;\n $auxcol=null;\n \n try {\n /* Extraemos las columnas para preparar la consulta*/\n if(isset($columnas)){\n foreach ($columnas as $key) {\n if (!empty($key)){\n $col.=$key.\",\";\n } \n }\n $sql=\" SELECT \".substr($col, 0, strlen($col)-1).\" FROM \" . $tabla . \" WHERE \" . $condicion;\n }else{\n $sql=\" SELECT * FROM \" . $tabla . \" WHERE \" . $condicion;\n }\n \n $query= $this->con->prepare($sql);\n $query->execute($valores);\n $this->setNumRows($query->rowCount());\n if($getObjects){\n $result=$query->fetchAll(PDO::FETCH_ASSOC);\n } else {\n $result=$query->fetchAll(PDO::FETCH_OBJ);\n }\n \n } catch (PDOException $exc) {\n error_log($exc->getMessage());\n $this->setMerrors($exc->getMessage());\n \n }\n return $result;\n }", "title": "" }, { "docid": "37a7f74af2fb8d92df2fbeaf02cb623e", "score": "0.6084748", "text": "public function Select(string $table, string $where = null, string $order = null, string $limit = null, string $fields = '*')\n\t{\n\t\t$where = !is_null($where) ? 'WHERE ' . self::$link->real_escape_string($where) : '';\n\t\t$order = !is_null($order) ? 'ORDER BY ' . self::$link->real_escape_string($order) : '';\n\t\t$limit = (!is_null($limit) && (strlen($limit) < 256)) ? 'LIMIT ' . self::$link->real_escape_string($limit) : '';\n\t\t$sql = \"SELECT $fields FROM $table $where $order $limit\";\n\n\t\treturn self::$result = mysqli_query(self::$link, $sql);\n\t}", "title": "" }, { "docid": "848dd0e49a57f556307fd7592db47813", "score": "0.60770106", "text": "public function selectById($id) {\n\t\t//$stmt = $this->pdo->prepare($sql);\n\t\t//$stmt->bindValue(':id', $id);\n\t\t//$stmt->execute();\n\t\t//return $stmt->fetch(PDO::FETCH_ASSOC);\n\t}", "title": "" }, { "docid": "8c82cdede68609a72e7036eda36e6a54", "score": "0.6074286", "text": "public function select($cotizacion);", "title": "" }, { "docid": "0898a9303518137316815282f6819641", "score": "0.607325", "text": "public function getSelectDataFields();", "title": "" }, { "docid": "e4275a9bc5c7b5db5fcd82d2857a5178", "score": "0.607249", "text": "function name_from_id($nfi_table, $nfi_id, $nfi_id_col, $nfi_name_col){\r\n\t\tglobal $conn;\r\n\t\t$sql_quary = \"SELECT * FROM \".$nfi_table.\" WHERE \".$nfi_id_col.\"='\".$nfi_id.\"';\";\r\n\t\t$sql = $conn->prepare($sql_quary);\r\n\t\t$sql->execute();\r\n\t\t\t\r\n\t\t$numRows = $sql->fetchAll();\r\n\t\t\tif(count($numRows)>0){\r\n\t\t\t\tforeach($numRows as $row){\r\n\t\t\t\t\treturn $row[$nfi_name_col];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t}", "title": "" }, { "docid": "cbad96a8b88110f989a1cf13f267e78a", "score": "0.6070584", "text": "public function selectTable($table)\n {\n $select_query = \"SELECT * FROM {$table}\"; \n\n if ($this->conexao == null) {\n $this->abrir();\n }\n\n $prepare = $this->conexao->prepare($select_query);\n\n $prepare->execute();\n\n $linha = $prepare->fetchAll(\\PDO::FETCH_OBJ);\n\n return $linha;\n }", "title": "" }, { "docid": "a463bfb04bf3a91cc2b03f357d40c3dc", "score": "0.6067774", "text": "function Select($table, $fields, $where, $limit = false, $where_type = 'AND')\n\t{\n\t\t$where = $this->QueryWhereGenerate($where);\n\t\t\n\t\t$fields_query = '';\n\t\t$where_query = '';\n\t\t\n\t\tif (strstr($fields, ','))\n\t\t{\n\t\t\t$fields_array = explode(',', $fields);\n\t\t\t\n\t\t\tforeach ($fields_array AS $field)\n\t\t\t{\n\t\t\t\t$fields_query .= ', `' . trim($field) . '`';\n\t\t\t}\n\t\t\t\n\t\t\t$fields_query = substr($fields_query, 1);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ($fields == '*')\n\t\t\t{\n\t\t\t\t$fields_query = $fields;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$fields_query = '`' . $fields . '`';\n\t\t\t}\n\t\t}\n\t\t\n\t\tforeach ($where AS $key => $value)\n\t\t{\n\t\t\t$where_query .= ' ' . $where_type. \" `\" . $key . \"` \" . $value;\n\t\t}\n\t\t\n\t\tif ($limit)\n\t\t{\n\t\t\treturn $this->RunQuery(\"SELECT \" . $fields_query . \" FROM `\" . $table . \"` WHERE \" . substr($where_query, strlen($where_type) + 1) . ' LIMIT ' . $limit);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $this->RunQuery(\"SELECT \" . $fields_query . \" FROM `\" . $table . \"` WHERE \" . substr($where_query, strlen($where_type) + 1));\n\t\t}\n\t}", "title": "" }, { "docid": "7f092492a34a4d36f06fc16e72541c14", "score": "0.60577875", "text": "public function SelectById($paciente){\n\t\t\t$sql = \"SELECT p.*, e.* FROM tbl_paciente AS p INNER JOIN tbl_endereco AS e ON p.id_endereco = e.id_endereco WHERE id_paciente = \". $paciente->id_paciente;\n\n\t\t\t//Instancio o banco e crio uma variavel\n\t\t\t$conex = new Mysql_db();\n\n\t\t\t/*Chama o método para conectar no banco de dados e guarda o retorno da conexao\n\t\t\tna variavel que $PDO_conex*/\n\t\t\t$PDO_conex = $conex->Conectar();\n\n\t\t\t$select = $PDO_conex->query($sql);\n\n\t\t\t//Executa o script no banco de dados\n\t\t\tif($rs = $select->fetch(PDO::FETCH_ASSOC)){\n\t\t\t\t//Se der true redireciona a tela\n\n\t\t\t\t$paciente = array();\n\n $paciente = $rs;\n\n\t\t\t\t// Guarda os dados no banco de dados em cada indice do objeto criado\n\t\t\t\t/*$paciente->id_paciente = $rs['id_paciente'];\n $paciente->id_endereco = $rs['id_endereco'];\n $paciente->id_convenio = $rs['id_convenio'];\n $paciente->nome = $rs['nome'];\n $paciente->sobrenome = $rs['sobrenome'];\n $paciente->dt_nasc = $rs['dt_nasc'];\n $paciente->rg = $rs['rg'];\n $paciente->cpf = $rs['cpf'];\n $paciente->carteirinha_convenio = $rs['carteirinha_convenio'];\n $paciente->foto = $rs['foto'];\n $paciente->status = $rs['status'];\n\t\t\t\t $paciente->id_endereco = $rs['id_endereco'];\n $paciente->cep = $rs['cep'];\n $paciente->logradouro = $rs['logradouro'];\n $paciente->numero = $rs['numero'];\n $paciente->id_estado = $rs['id_estado'];\n $paciente->cidade = $rs['cidade'];\n $paciente->bairro = $rs['bairro']; */\n\n return $paciente;\n\n\t\t\t}else {\n\t\t\t\t//Mensagem de erro\n\t\t\t\techo \"Error ao selecionar no Banco de Dados\";\n\t\t\t}\n\n\t\t\t//Fecha a conexão com o banco de dados\n\t\t\t$conex->Desconectar();\n\t\t}", "title": "" }, { "docid": "6b3bf858b54d46562c54d25789aa896c", "score": "0.60520166", "text": "public function select($infos)\n {\n try {\n\n $tabela = $infos['table'];\n $campos = isset($infos['fields']) ? $infos['fields'] : [\"*\"];\n\n $whereCriteria = $infos['where'];\n\n $campos = gettype($campos) == \"array\" ? implode(\", \", $campos) : $campos;\n\n $this->sql = \"SELECT \" . $campos . \" FROM $tabela \";\n if (!empty($whereCriteria)) {\n $this->sql .= \" WHERE \" . $whereCriteria . \" \";\n }\n return $this->sql . \";\";\n\n } catch (PhiberException $phiberException) {\n throw new PhiberException(new Internationalization(\"query_processor_error\"));\n }\n\n }", "title": "" }, { "docid": "94db3b1061b941141cd2e81244bc7382", "score": "0.60395086", "text": "public function select($titulos){\n $id=$titulos->getId();\n\n try {\n $sql= \"SELECT `id`, `descripcion`, `universidad_id`, `docente_id`\"\n .\"FROM `titulos`\"\n .\"WHERE `id`='$id'\";\n $data = $this->ejecutarConsulta($sql);\n for ($i=0; $i < count($data) ; $i++) {\n $titulos->setId($data[$i]['id']);\n $titulos->setDescripcion($data[$i]['descripcion']);\n $titulos->setUniversidad_id($data[$i]['universidad_id']);\n $docente = new Docente();\n $docente->setId($data[$i]['docente_id']);\n $titulos->setDocente_id($docente);\n\n }\n return $titulos; } catch (SQLException $e) {\n throw new Exception('Primary key is null');\n return null;\n }\n }", "title": "" }, { "docid": "f1fb7ce1aab8d3e1339004301960af84", "score": "0.6037048", "text": "protected function get_select_id_col_name() {\n return \"accession\";\n }", "title": "" }, { "docid": "268607ee529248c22fa4cc4ceec28dd7", "score": "0.6034757", "text": "function tablaDatos(){\n\n $editar = $this->Imagenes($this->PrimaryKey,0);\n $eliminar = $this->Imagenes($this->PrimaryKey,1);\n $sql = 'SELECT\n C.id_componentes,\n P.descripcion planta,\n S.descripcion secciones,\n E.descripcion Equipo,\n C.`descripcion` Componente\n ,'.$editar.','.$eliminar.' \nFROM\n `componentes` C\nINNER JOIN\n equipos E ON E.id_equipos = C.`id_equipos`\nINNER JOIN\n secciones S ON S.id_secciones = E.id_secciones\nINNER JOIN\n plantas P ON P.id_planta = S.id_planta\nWHERE\n \n C.`activo` = 1';\n \n $datos = $this->Consulta($sql,1); \n if(count($datos)){\n $_array_formu = array();\n $_array_formu = $this->generateHead($datos);\n $this->CamposHead = ( isset($_array_formu[0]) && is_array($_array_formu[0]) )? $_array_formu[0]: array();\n \n $tablaHtml = '<div class=\"row\">\n <div class=\"col-md-12\">\n <div class=\"panel panel-default\">\n <div class=\"panel-body recargaDatos\" style=\"page-break-after: always;\">\n <div class=\"table-responsive\">';\n $tablaHtml .='';\n \t\t$tablaHtml .= $this->print_table($_array_formu, 7, true, 'table table-striped table-bordered',\"id='tablaDatos'\");\n \t\t$tablaHtml .=' </div>\n </div>\n </div>\n </div>\n </div>\n ';\n }else{\n $tablaHtml = '<div class=\"col-md-8\">\n <div class=\"alert alert-info alert-dismissable\">\n <button class=\"close\" aria-hidden=\"true\" data-dismiss=\"alert\" type=\"button\">×</button>\n <strong>Atenci&oacute;n</strong>\n No se encontraron registros.\n </div>\n </div>';\n }\n \n if($this->_datos=='r') echo $tablaHtml;\n else return $tablaHtml;\n \n }", "title": "" }, { "docid": "3f4360bb22d419872fad7b09d1a8c695", "score": "0.60309535", "text": "public function getQuerySelect() {\n $R = 'R_'. $this->id;\n return \"$R.value_id AS `\". $this->name.\"`\";\n }", "title": "" }, { "docid": "db5d7ca08e2b535a904b975609042fc7", "score": "0.60196024", "text": "private function makeSelectAndFrom()\r\n\t{\r\n\t\t// Build SQL\r\n\t\t$sql = 'SELECT ';\r\n\t\r\n\t\t// Add custom fields (subqueries)\r\n\t\tif ($this->hasCustomFields())\r\n\t\t{\r\n\t\t\t// Find custom fields\r\n\t\t\tforeach ($this->fields as $field)\r\n\t\t\t{\r\n\t\t\t\tif ($field instanceOf CustomField)\r\n\t\t\t\t{\r\n\t\t\t\t\t$sql .= '(' . $field->query . ') AS `' . $field->name . '`, ';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\tif (!$this->hasForeignFields())\r\n\t\t{\r\n\t\t\tif (isset($this->selectFields))\r\n\t\t\t{\r\n\t\t\t\t// Use custom field selection\r\n\t\t\t\t$sql .= implode(', ', $this->selectFields) . ' ';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// Take all fields\r\n\t\t\t\t$sql .= '`'.$this->name.'`.* ';\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t$sql .= 'FROM `'.$this->name.'` ';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t// Get foreign fields\r\n\t\t\t$cols = array();\r\n\t\r\n\t\t\tif (isset($this->selectFields))\r\n\t\t\t{\r\n\t\t\t\t// Use custom field selection\r\n\t\t\t\tforeach ($this->selectFields as $field)\r\n\t\t\t\t{\r\n\t\t\t\t\t$cols[] = $field;\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// Take all fields\r\n\t\t\t\t$cols[] = 't1.*';\r\n\t\t\t}\r\n\t\r\n\t\t\t$from_sql = 'FROM `'.$this->name.'` t1 ';\r\n\t\t\t$joined = array();\r\n\t\t\t$joins = array();\r\n\t\t\t$alias_no = 2;\r\n\t\t\t$tables[] = array('table' => $this->name, 'alias' => 't1');\r\n\t\r\n\t\t\t// Iterate over fields\r\n\t\t\tforeach ($this->fields as &$field)\r\n\t\t\t{\r\n\t\t\t\t$use_alias = false;\r\n\t\r\n\t\t\t\tif ($field instanceof ForeignField)\r\n\t\t\t\t{\r\n\t\t\t\t\t// Check if foreign field should be included, if select fields were set\r\n\t\t\t\t\tif (isset($this->selectFields))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$found = false;\r\n\t\t\t\t\t\tforeach ($this->selectFields as $sel_field)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (str_contains($sel_field, $field->name))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$found = true;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (!$found)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\r\n\t\t\t\t\t// Find out what kind of join it should be (INNER or LEFT)\r\n\t\t\t\t\t$join_type = strtoupper($field->joinType);\r\n\t\r\n\t\t\t\t\t// Check if it's a join between two foreign tables\r\n\t\t\t\t\tif ($field->joinFromTable == null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Join between this table and other table\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Check if we need to make a new join\r\n\t\t\t\t\t\t$this_join = array(\r\n\t\t\t\t\t\t\t'from_table' => $this->name, \r\n\t\t\t\t\t\t\t'to_table' => $field->table,\r\n\t\t\t\t\t\t\t'from' => $field->joinFrom, \r\n\t\t\t\t\t\t\t'to' => $field->joinTo\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t\tif (!$this->CheckJoinExists($this_join, $joins))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$from_sql .= $join_type.' JOIN `'.$field->table .'` t'.$alias_no.' ON t1.`'.$field->joinFrom.'` = t'.$alias_no.'.`'.$field->joinTo.'` ';\r\n\t\t\t\t\t\t\t$joins[] = $this_join;\r\n\t\t\t\t\t\t\t$use_alias = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Join between two other tables\r\n\t\r\n\t\t\t\t\t\t// Check if we need to make a new join\r\n\t\t\t\t\t\t$this_join = array(\r\n\t\t\t\t\t\t\t'from_table' \t=> $this->table_name, \r\n\t\t\t\t\t\t\t'to_table' \t\t=> $field->foreign_field->table,\r\n\t\t\t\t\t\t\t'from' \t\t\t=> $field->foreign_field->join_from, \r\n\t\t\t\t\t\t\t'to' \t\t\t=> $field->foreign_field->join_to\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t\tif (!$this->checkJoinExists($this_join, $joins)) \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (($alias = $this->tableHasAlias($field->table, $tables)) !== false) \r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$from_sql .= $join_type.' JOIN `'.$field->table.'` t'.$alias_no.' ON '.$alias.'.`'.$field->joinFrom.'` = t'.$alias_no.'.`'.$field->joinTo.'` ';\r\n\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$from_sql .= $join_type.' JOIN `'.$field->table.'` t'.$alias_no.' ON `'.$field->joinFromTable.'`.`'.$field->joinFrom.'` = t'.$alias_no.'.`'.$field->joinTo.'` ';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$joins[] = $this_join;\r\n\t\t\t\t\t\t\t$use_alias = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\r\n\t\t\t\t\tif ($use_alias)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$cols[] = 't'.$alias_no.'.`'.$field->foreignFieldName .'` AS `'.$field->name.'`';\r\n\t\t\t\t\t\t$tables[] = array('table' => $field->table, 'alias' => 't'.$alias_no);\r\n\t\t\t\t\t\t$alias_no++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Check if table has alias\r\n\t\t\t\t\t\tif (($alias = $this->tableHasAlias($field->table, $tables)) !== false)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$cols[] = $alias.'.`'.$field->foreignFieldName.'` AS `'.$field->name .'`';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$cols[] = '`'.$field->table.'`.`'.$field->foreignFieldName.'` AS `'.$field->name.'`';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$this->tableAliases = $tables;\r\n\t\r\n\t\t\t$sql .= implode(', ', $cols).' '.$from_sql;\r\n\t\r\n\t\t\t$this->table_aliases = $tables;\r\n\t\t}\r\n\t\r\n\t\treturn $sql;\r\n\t}", "title": "" }, { "docid": "119f569dd1c68bf1250a6ad66ed6e19b", "score": "0.60144085", "text": "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 }", "title": "" }, { "docid": "f145ca8f1872d3d517d206e9c212d08a", "score": "0.60111225", "text": "function GetAnyName($table,$id,$field){\n $con = mysqli_connect('localhost','root','','bloodbank');\n mysqli_query($con,'SET CHARACTER SET utf8');\n mysqli_query($con,' DEFAULT COLLATE utf8_general_ci');\n $sel =mysqli_fetch_all(mysqli_query($con,\"SELECT * FROM \".$table.\" WHERE id='\".$id.\"' \"),MYSQLI_ASSOC);\n return $sel[0][\"$field\"];\n}", "title": "" }, { "docid": "4fbcc96d56d5c49dc7abb6f778ca5ad8", "score": "0.6001992", "text": "function SelectUnidad($db_conx, $query = null) {\r\n\r\n if ($query == NULL) {\r\n $sql = \"SELECT * FROM vlocalizacionxunidad LIMIT 20\";\r\n $query = mysqli_query($db_conx, $sql);\r\n }\r\n\r\n $n_columnas = $query->field_count;\r\n $data = '<tr class=\"row_header\">\r\n <td>COD</td>\r\n <td>Localizacion</td>\r\n <td>Descripcion</td>\r\n <td>Observacion</td>\r\n <td>Activo</td>\r\n <td id=\"custom-action\"></td>\r\n </tr>';\r\n while ($row = mysqli_fetch_array($query)) {\r\n $data .= '<tr class=\"row_data\">';\r\n for ($i = 0; $i < $n_columnas - 1; $i++) {\r\n if ($i == 1) {\r\n $data .= '<td><input type=\"hidden\" id=\"cod_loc_' . $row[0] . '\" value=\"' . $row[$n_columnas - 1] . '\" /><span style=\"display:none;\" id=\"td_' . $row[0] . '_' . $i . '\">' . $row[$i] . '</span>\r\n <span>' . $row[$i] . '</span></td>';\r\n } else {\r\n $data .= '<td><span id=\"td_' . $row[0] . '_' . $i . '\">' . $row[$i] . '</span></td>';\r\n }\r\n }\r\n $data .= '<td id=\"custom-action\"><button id=\"editar\" onclick=\"editUnidad(' . $row[0] . ')\">Editar</button></td></tr>';\r\n }\r\n echo $data;\r\n}", "title": "" }, { "docid": "e432297dc6e2569867b4c0d2cdf49c67", "score": "0.5997676", "text": "function select() {\r\n\r\n $oc_id = $this->oc_id;\r\n $prov_id = $this->prov_id;\r\n $oc_tipo = $this->oc_tipo;\r\n $oc_estado = $this->oc_estado;\r\n $oc_fecha_entrega = $this->oc_fecha_entrega;\r\n $oc_fecha_entrega_fin = $this->oc_fecha_entrega_fin;\r\n\r\n $sql = \"SELECT * FROM ing_oc p LEFT JOIN efectua_compra h ON p.oc_id=h.oc_id WHERE \";\r\n\r\n if ($oc_estado != null) {\r\n $sql = $sql . \"p.oc_estado = '\" . $oc_estado . \"' \";\r\n } else {\r\n $sql = $sql . \"p.oc_estado > '0' \";\r\n }\r\n if ($oc_id != null) {\r\n $sql = $sql . \"AND p.oc_id = '\" . $oc_id . \"' \";\r\n }\r\n if ($prov_id != null) {\r\n $sql = $sql . \"AND p.prov_id = '\" . $prov_id . \"' \";\r\n }\r\n if ($oc_tipo != null) {\r\n $sql = $sql . \"AND p.oc_tipo = '\" . $oc_tipo . \"' \";\r\n }\r\n if ($oc_fecha_entrega != null) {\r\n if ($oc_fecha_entrega_fin != null) {\r\n $sql = $sql . \"AND P.oc_fecha_entrega BETWEEN '\" . $oc_fecha_entrega . \"' AND '\" . $oc_fecha_entrega_fin . \"' \";\r\n }\r\n $sql = $sql . \"AND P.oc_fecha_entrega = '\" . $oc_fecha_entrega . \"' \";\r\n }\r\n\r\n $result = $this->database->query($sql);\r\n// $result = $this->database->result;\r\n// $row = mysql_fetch_object($result);\r\n\r\n $i = 0;\r\n while ($datos = $this->database->fetch_array($result)) {\r\n $this->arringoc[$i]['prov_id'] = $datos['prov_id'];\r\n $this->arringoc[$i]['oc_id'] = $datos['oc_id'];\r\n $this->arringoc[$i]['oc_codigo'] = $datos['oc_codigo'];\r\n $this->arringoc[$i]['oc_tipo'] = $datos['oc_tipo'];\r\n $this->arringoc[$i]['oc_empresa'] = $datos['oc_empresa'];\r\n $this->arringoc[$i]['oc_log'] = $datos['oc_log'];\r\n $this->arringoc[$i]['oc_estado'] = $datos['oc_estado'];\r\n $this->arringoc[$i]['oc_fecha_entrega'] = $datos['oc_fecha_entrega'];\r\n $this->arringoc[$i]['oc_solicitante'] = $datos['oc_solicitante'];\r\n $this->arringoc[$i]['oc_observacion'] = $datos['oc_observacion'];\r\n $this->arringoc[$i]['oc_neto'] = $datos['oc_neto'];\r\n $this->arringoc[$i]['oc_iva'] = $datos['oc_iva'];\r\n $this->arringoc[$i]['oc_total'] = $datos['oc_total'];\r\n $this->arringoc[$i]['oc_forma_pago'] = $datos['oc_forma_pago'];\r\n $this->arringoc[$i]['oc_condiciones'] = $datos['oc_condiciones'];\r\n $this->arringoc[$i]['oc_tipo_descuento'] = $datos['oc_tipo_descuento'];\r\n $this->arringoc[$i]['oc_impuesto'] = $datos['oc_impuesto'];\r\n $this->arringoc[$i]['oc_gasto_envio'] = $datos['oc_gasto_envio'];\r\n $this->arringoc[$i]['solc_id'] = $datos['solc_id'];\r\n $i++;\r\n }\r\n\r\n// $this->prov_id = $row->prov_id;\r\n//\r\n// $this->oc_id = $row->oc_id;\r\n//\r\n// $this->oc_codigo = $row->oc_codigo;\r\n//\r\n// $this->oc_tipo = $row->oc_tipo;\r\n//\r\n// $this->oc_empresa = $row->oc_empresa;\r\n//\r\n// $this->oc_log = $row->oc_log;\r\n//\r\n// $this->oc_estado = $row->oc_estado;\r\n//\r\n// $this->oc_fecha_entrega = $row->oc_fecha_entrega;\r\n//\r\n// $this->oc_solicitante = $row->oc_solicitante;\r\n//\r\n// $this->oc_observacion = $row->oc_observacion;\r\n//\r\n// $this->oc_neto = $row->oc_neto;\r\n//\r\n// $this->oc_iva = $row->oc_iva;\r\n//\r\n// $this->oc_total = $row->oc_total;\r\n//\r\n// $this->oc_forma_pago = $row->oc_forma_pago;\r\n//\r\n// $this->oc_condiciones = $row->oc_condiciones;\r\n//\r\n// $this->oc_rut_emision = $row->oc_rut_emision;\r\n//\r\n// $this->oc_rut_aprobacion = $row->oc_rut_aprobacion;\r\n//\r\n// $this->oc_cheque_adjunto = $row->oc_cheque_adjunto;\r\n//\r\n// $this->oc_descuento = $row->oc_descuento;\r\n//\r\n// $this->oc_tipo_descuento = $row->oc_tipo_descuento;\r\n//\r\n// $this->oc_impuesto = $row->oc_impuesto;\r\n//\r\n// $this->oc_gasto_envio = $row->oc_gasto_envio;\r\n//\r\n// $this->oc_estado_pago = $row->oc_estado_pago;\r\n }", "title": "" }, { "docid": "df8ca69a0741a5ddcfa3dbf4316fa986", "score": "0.5993043", "text": "function getByID($table,$field,$value);", "title": "" }, { "docid": "96238ae611c6b397a826f97723ee5f34", "score": "0.5984857", "text": "protected function getSelect() {\n $oSql = new SqlSelect();\n $oSql->setEntity($this->Persistence->getTableName());\n $oSql->addColumn(implode(',', $this->getColumns()));\n $oSql->setCriteria($this->Criteria); \n return $oSql->getInstruction();\n }", "title": "" }, { "docid": "5b5e6fff6ff76bde34d663818976da94", "score": "0.59847814", "text": "function select($id){\r\n\t\t$query = \"SELECT *\";\r\n\t\t$query .= \" FROM db_equipment_gen INNER JOIN db_group ON equipment_id_link_group=group_id\";\r\n\t\t$query .= \" INNER JOIN db_equipment_list ON equipment_list_gen_link=equipment_gen_id\";\r\n\t\t$query .= \" INNER JOIN db_equipment_pic ON equipment_id_link_pic=equipment_pic_id\";\r\n\t\t$query .= \" LEFT JOIN db_address ON equipment_list_address_link=address_id\";\r\n\t\t$query .= \" LEFT JOIN db_status ON equipment_list_status_link=status_id WHERE equipment_list_id = :ID LIMIT 1\";\r\n\t\t\r\n\t\t$sth=$this->db->select($query,array(':ID'=>$id));\r\n\t\t\r\n\t\t\t$query = \"SELECT group_id,group_name FROM db_group WHERE group_status=0\";\r\n\t\t\t$group=$this->db->select($query,array());\r\n\t\t\t$query = \"SELECT status_id,status_name FROM db_status WHERE status_status=0\";\r\n\t\t\t$status=$this->db->select($query,array());\r\n\t\t\t$query = \"SELECT address_id,address_name FROM db_address WHERE address_status=0\";\r\n\t\t\t$address=$this->db->select($query,array());\r\n\t\t\r\n\t\t$data = array(\"equipment\",0,10,\"\",1,10,0,0,$sth,$group,$status,$address);\r\n\t\t\r\n\t\treturn $data;\r\n\t\t}", "title": "" }, { "docid": "c67c497fa002611b998a7b30acdf7799", "score": "0.5976215", "text": "private function buildSelectString () \n {\n $this->selectSql = \"SELECT \";\n $this->selectSql .= $this->columns;\n $this->selectSql .= \" FROM \" . $this->tableName;\n if ($this->where !== null && $this->where !== \"\") {\n $this->selectSql .= \" WHERE \" . $this->where;\n }\n if ($this->order !== null && $this->order !== \"\") {\n $this->selectSql .= \" ORDER BY \" . $this->order;\n }\n if ($this->other !== null && $this->other !== \"\") {\n $this->selectSql .= $this->other;\n }\n }", "title": "" }, { "docid": "2f077c270539d41ac99639320138d8b5", "score": "0.5975108", "text": "function createSelect($_table, $_value, $_colum)\n{\n\n $_prev_par= false;\n $_query = \"SELECT * FROM $_table\";\n\n foreach ($_value as $_key => $_value)\n {\n if ($_value != \"\")\n {\n if ($_prev_par)\n {\n $_query.= \" AND \";\n }\n else\n {\n $_query.= \" WHERE \";\n }\n\n $_query.= $_colum[$_key].\" = '$_value'\";\n $_prev_par = true;\n }\n }\n $_query.=\";\";\n\n return $_query;\n}", "title": "" }, { "docid": "8706897eaddadb2f412a5fcc7d1dea93", "score": "0.5969602", "text": "function select($id){\n\t\t\t$query=\"SELECT * FROM immobile WHERE id='$id';\";\n\t\t\t$this->database->Query($query);\n\t\t\t$result=$this->database->result;\n\t\t\t$row=mysql_fetch_array($result);\n\t\t\tif($row){\n\t\t\t\t$this->id=$row[0];\n\t\t\t\t$this->approvato=$row[1];\n\t\t\t\t$this->agente=$row[2];\n\t\t\t\t$this->contratto=$row[3];\n\t\t\t\t$this->descrizione=$row[4];\n\t\t\t\t$this->proprietario=$row[5];\n\t\t\t\t$this->immagine=$row[6];\n\t\t\t\t$this->metratura=$row[7];\n\t\t\t\t$this->prezzo=$row[8];\n\t\t\t\t$this->tipo=$row[9];\n\t\t\t\t$this->comune=$row[10];\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "788d6f3c1d6221a4527ea536cc221360", "score": "0.5968298", "text": "protected function RetSelect() {\n\n $return = \"SELECT\";\n\n if ($this->\n distinct) {\n\n $return .= \" DISTINCT\";\n }\n\n $columnsArr = [];\n\n foreach ($this->\n columns as $key => $value) {\n\n if (is_string($value)) {\n\n $columnsArr[] = $value;\n } else if (isset($value['subquery']) &&\n $value['subquery'] instanceof \\FluitoPHP\\Database\\DBQueryHelper &&\n $value['subquery']->\n IsSelect()) {\n\n $columnsArr[] = \"(\" . $value['subquery']->\n Generate() . \")\" . (isset($value['label']) &&\n is_string($value['label']) ? \" AS \\\"{$value['label']}\\\"\" : \"\");\n } else if (isset($value['value'])) {\n\n $columnsArr[] = \"'{$value['value']}'\" . (isset($value['label']) &&\n is_string($value['label']) ? \" AS \\\"{$value['label']}\\\"\" : \"\");\n } else {\n\n $columnsArr[] = \"{$value['column']}\" . (isset($value['label']) &&\n is_string($value['label']) ? \" AS \\\"{$value['label']}\\\"\" : \"\");\n }\n }\n\n if (count($columnsArr)) {\n\n $return .= \" \" . implode($columnsArr, \", \");\n } else {\n\n $return .= \" *\";\n }\n\n\n $tablesStr = \"\";\n\n foreach ($this->\n tables as $key => $value) {\n\n if (is_string($value)) {\n\n $tablesStr .= \", $value\";\n } else {\n\n if (!(isset($value['table']) &&\n $value['table'] != \"\") &&\n isset($value['subquery']) &&\n $value['subquery'] instanceof \\FluitoPHP\\Database\\DBQueryHelper &&\n $value['subquery']->\n IsSelect()) {\n\n $value['table'] = \"(\" . rtrim($value['subquery']->\n Generate(), ';') . \")\";\n\n if (!isset($value['alias'])) {\n\n throw new \\Exception(\"Error: Alias required in case of subquery to be used in from clause.\");\n }\n } else {\n\n $value['table'] = \"{$value['table']}\";\n }\n\n if (isset($value['alias'])) {\n\n $value['alias'] = \"`{$value['alias']}`\";\n }\n\n if (!isset($value['table']) ||\n $value['table'] == \"\") {\n\n throw new \\Exception(\"Error: Tables not properly provided in QueryHelper.\");\n }\n\n if (!isset($value['jointype'])) {\n\n $tablesStr .= \", \" . $value['table'];\n\n if (isset($value['alias'])) {\n\n $tablesStr .= \" AS \" . $value['alias'];\n }\n } else {\n\n switch ($value['jointype']) {\n case 'j':\n\n $tablesStr .= \" JOIN \" . $value['table'];\n break;\n\n case 'ij':\n\n $tablesStr .= \" INNER JOIN \" . $value['table'];\n break;\n\n case 'cj':\n\n $tablesStr .= \" CROSS JOIN \" . $value['table'];\n break;\n\n case 'sj':\n\n $tablesStr .= \" STRAIGHT_JOIN \" . $value['table'];\n break;\n\n case 'lj':\n\n $tablesStr .= \" LEFT JOIN \" . $value['table'];\n break;\n\n case 'rj':\n\n $tablesStr .= \" RIGHT JOIN \" . $value['table'];\n break;\n\n case 'nj':\n\n $tablesStr .= \" NATURAL JOIN \" . $value['table'];\n break;\n\n case 'nlj':\n\n $tablesStr .= \" NATURAL LEFT JOIN \" . $value['table'];\n break;\n\n case 'nrj':\n\n $tablesStr .= \" NATURAL RIGHT JOIN \" . $value['table'];\n break;\n\n case 'loj':\n\n $tablesStr .= \" LEFT OUTER JOIN \" . $value['table'];\n break;\n\n case 'roj':\n\n $tablesStr .= \" RIGHT OUTER JOIN \" . $value['table'];\n break;\n\n case 'nloj':\n\n $tablesStr .= \" NATURAL LEFT OUTER JOIN \" . $value['table'];\n break;\n\n case 'nroj':\n\n $tablesStr .= \" NATURAL RIGHT OUTER JOIN \" . $value['table'];\n break;\n\n default:\n break;\n }\n\n if (isset($value['alias'])) {\n\n $tablesStr .= \" AS \" . $value['alias'];\n }\n\n if (isset($value['joinconditions']) &&\n count($value['joinconditions'])) {\n\n $tablesStr .= $this->\n WhereClause($value['joinconditions'], 1);\n }\n }\n }\n }\n\n $return .= \" FROM \" . ltrim($tablesStr, \", \");\n\n\n if (count($this->\n where)) {\n\n $return .= $this->\n WhereClause($this->\n where);\n }\n\n\n $groupsArr = [];\n\n foreach ($this->\n group as $key => $value) {\n\n if (is_string($value)) {\n\n $groupsArr[] = \"{$value}\";\n } else if (isset($value['subquery']) &&\n $value['subquery'] instanceof \\FluitoPHP\\Database\\DBQueryHelper &&\n $value['subquery']->\n IsSelect()) {\n\n $groupsArr[] = \"(\" . rtrim($value['subquery']->\n Generate(), ';') . \")\";\n } else if (isset($value['value'])) {\n\n $value['value'] = $this->\n connection->\n GetConn()->\n real_escape_string($value['value']);\n $groupsArr[] = \"'{$value['value']}'\";\n } else {\n\n $groupsArr[] = \"{$value['column']}\";\n }\n }\n\n if (count($groupsArr)) {\n\n $return .= \" GROUP BY \" . implode($groupsArr, \", \");\n }\n\n\n if (count($this->\n having)) {\n\n $return .= $this->\n WhereClause($this->\n having, 2);\n }\n\n\n $ordersArr = [];\n\n foreach ($this->\n order as $key => $value) {\n\n if (is_string($value)) {\n\n $ordersArr[] = $value;\n } else if (isset($value['subquery']) &&\n $value['subquery'] instanceof \\FluitoPHP\\Database\\DBQueryHelper &&\n $value['subquery']->\n IsSelect()) {\n\n $ordersArr[] = \"(\" . rtrim($value['subquery']->\n Generate(), ';') . \")\" . (isset($value['type']) &&\n $value['type'] == 'd' ? \" DESC\" : \"\");\n } else if (isset($value['value'])) {\n\n $ordersArr[] = \"'{$value['value']}'\" . (isset($value['type']) &&\n $value['type'] == 'd' ? \" DESC\" : \"\");\n } else {\n\n $ordersArr[] = \"{$value['column']}\" . (isset($value['type']) &&\n $value['type'] == 'd' ? \" DESC\" : \"\");\n }\n }\n\n if (count($ordersArr)) {\n\n $return .= \" ORDER BY \" . implode($ordersArr, \", \");\n }\n\n if ($this->\n perpage > 0) {\n\n if ($this->\n page < 1) {\n\n $this->\n page = 1;\n }\n\n $startcount = $this->\n perpage * ($this->\n page - 1);\n\n $return .= \" LIMIT {$startcount}, {$this->\n perpage}\";\n }\n\n return $return . \";\";\n }", "title": "" }, { "docid": "ec4f4eb69817334d9b2496f6dc73dd68", "score": "0.5967341", "text": "function select($id)\r\n{\r\n\r\n$sql = \"SELECT * FROM attribut WHERE attribut_pk_id = $id;\";\r\n$result = $this->database->query($sql);\r\n$result = $this->database->result;\r\n$row = mysql_fetch_object($result);\r\n\r\n\r\n$this->id_attribut = $row->id_attribut;\r\n\r\n$this->nom = $row->nom;\r\n\r\n}", "title": "" }, { "docid": "f8976c9908b7f7de226e07f2d01da5e7", "score": "0.59625053", "text": "function CreaSelect($Nombre,$Sql,$Comentario,$valor=\"\"){\n\t\t$result = mysql_query($Sql);\n\t\techo \"\\t<tr><td>$Comentario</td><td><select name='$Nombre'>\\n\";\n\t\twhile($row=mysql_fetch_row($result))\n\t\t{\n\t\t \tif($row[0]==$valor)$seleccionar=\"selected\";\n\t\t \telse $seleccionar=\"\";\n\t\t\techo \"\\t\\t<option $seleccionar value='\".$row[0].\"'>\".$row[1].\"</option>\\n\"\t;\n\t\t}\n\t\t\techo \"</select></td></tr>\\n\";\n\t\t\n\t}", "title": "" }, { "docid": "4c9d67d1788a2fdfbac861d9c42b0700", "score": "0.5956246", "text": "private function _montaInicioSelectQuestionario()\r\n {\r\n $select = $this->select()\r\n ->setIntegrityCheck(false);\r\n\r\n $select->from(array('pp' => KT_B_PERGUNTA_PEDIDO),\r\n array('cd_pergunta_pedido',\r\n 'tx_titulo_pergunta',\r\n 'st_multipla_resposta',\r\n 'st_obriga_resposta',\r\n 'tx_ajuda_pergunta'),\r\n $this->_schema);\r\n $select->join(array('orpp' => $this->_name),\r\n '(pp.cd_pergunta_pedido = orpp.cd_pergunta_pedido)',\r\n array('st_resposta_texto',\r\n 'ni_ordem_apresenta'),\r\n $this->_schema);\r\n $select->join(array('rp' => KT_B_RESPOSTA_PEDIDO),\r\n '(orpp.cd_resposta_pedido = rp.cd_resposta_pedido)',\r\n array('cd_resposta_pedido',\r\n 'tx_titulo_resposta'),\r\n $this->_schema);\r\n \r\n return $select;\r\n }", "title": "" }, { "docid": "3bb6cced8b6b4dc0c131ee32db18bbbe", "score": "0.59515333", "text": "function select($parametro, $modo){\n $ingrediente = new ingrediente();\n try{\n if($modo == 1){\n $stmte = $this->pdo->prepare(\"SELECT * FROM tb_ingrediente WHERE igr_nome LIKE :parametro\");\n $stmte->bindParam(\":parametro\", $parametro . \"%\", PDO::PARAM_STR);\n }elseif ($modo == 2) {\n $stmte = $this->pdo->prepare(\"SELECT * FROM tb_ingrediente WHERE igr_pk_id = :parametro\");\n $stmte->bindParam(\":parametro\", $parametro , PDO::PARAM_INT);\n }\n if($stmte->execute()){\n if($stmte->rowCount() > 0){\n while($result = $stmte->fetch(PDO::FETCH_OBJ)){\n $ingrediente->setPkId($result->igr_pk_id);\n $ingrediente->setNome($result->igr_nome);\n $ingrediente->setUnidade($result->igr_unidade);\n $ingrediente->setValor($result->igr_valor);\n }\n }\n }\n return $ingrediente;\n }\n catch(PDOException $e){\n echo $e->getMessage();\n return -1;\n }\n }", "title": "" }, { "docid": "0e44435367e2a20fa9cb42e2150c3fd9", "score": "0.5940492", "text": "function select_fields_joined_DT($data, $PTable, $joins = '', $where = '',$where_in_column ='', $where_in_data = '', $group_by = '', $addColumn = '', $editColumn = '',$unsetColumn = '')\n {\n\n if(is_array($data)){\n $this->datatables->select($data[0],$data[1]);\n }else{\n $this->datatables->select($data);\n }\n\n if ($unsetColumn != '') {\n $this->datatables->unset_column($unsetColumn);\n }\n $this->datatables->from($PTable);\n if ($joins != '') {\n foreach ($joins as $k => $v) {\n $this->datatables->join($v['table'], $v['condition'], $v['type']);\n }\n }\n if ($where != '') {\n if(is_array($where) && array_key_exists(\"QueryCondition\",$where)){\n $this->datatables->where($where[\"QueryCondition\"],$where[0],$where[1]);\n }else{\n $this->datatables->where($where);\n }\n }\n if($where_in_data !== ''){\n $this->datatables->where_in($where_in_column,$where_in_data);\n }\n if($group_by != ''){\n $this->datatables->group_by($group_by);\n }\n if ($addColumn != '') {\n foreach($addColumn as $columnKey=>$columnValue ) {\n if(!is_array($columnValue) && is_string($columnValue)){\n $this->datatables->add_column($columnKey, $columnValue);\n }else{\n $this->datatables->add_column($columnKey, $columnValue[0],$columnValue[1]);\n }\n }\n }\n if ($editColumn != ''){\n foreach($editColumn as $arrayKey=>$arrayValue){\n $this->datatables->edit_column($arrayValue[0],$arrayValue[1],$arrayValue[2]);\n }\n }\n $result = $this->datatables->generate();\n return $result;\n }", "title": "" }, { "docid": "5bcb1b3d4226450f20be582941629072", "score": "0.59386444", "text": "function select($id)\n{\n\n$sql = \"SELECT * FROM test WHERE id = $id;\";\n$result = $this->database->query($sql);\n$result = $this->database->result;\n$row = mysql_fetch_object($result);\n\n\n$this->id = $row->id;\n\n$this->name = $row->name;\n\n$this->vorname = $row->vorname;\n\n$this->adresse = $row->adresse;\n\n$this->telefon = $row->telefon;\n\n$this->jahr = $row->jahr;\n\n}", "title": "" }, { "docid": "ce25c6e9e5f710bf80b9bc931ccb808d", "score": "0.5938413", "text": "public function select($table, $cols=\"*\", $where=\"\", $orderby=\"\", $limit=-1, $offset=-1){\n $query = \"\";\n $query .= \"SELECT \";\n if($cols != \"*\"){\n if(is_array($cols)){\n $query .= implode(\",\", $cols);\n }else{\n $query .= $cols;\n }\n }else{\n $query .= \"*\";\n }\n $query .= \" FROM \";\n $query .= \"\" . $table . \"\";\n\n if($where != \"\"){\n $query .= \" WHERE \";\n if(is_array($where)){\n\t $count = count($where);\n\t foreach($where as $key => $value){\n\t $count--;\n\t $query .= $key . \"='\" . $value . \"'\";\n\t if($count > 0){\n\t $query .= \" AND \";\n\t }\n\t }\n }else{\n\t $query .= $where;\n }\n }\n if($orderby!=\"\"){\n \t$query .= \" ORDER BY \" . $orderby;\n }\n if($limit > 0 AND $offset < 1){\n $query .= \" LIMIT \" . $limit;\n }\n if($limit > 0 AND $offset > 0){\n\t $query .= \" LIMIT \" . $offset . \",\" . $limit;\n }\n if($this->cache){\n\t $data = $this->mysqli_cached_query($query);\n\t return $data;\n\t }else{\n \t$data = mysqli_query($this->mysql, $query);\n\t if(!$data) die(\"ERROR: \" . mysqli_error($this->mysql));\n \t return $this->sqlReturn($data);\n \t }\n }", "title": "" }, { "docid": "8b2ceb51544949ca272df5e0f4ec14c7", "score": "0.59368515", "text": "function select($table, $where = null, $params = array())\n {\n\n $defaults = array(\n 'fields' => '*',\n 'group' => NULL,\n 'order' => NULL,\n 'limit' => NULL,\n 'offset' => 0,\n 'join' => ''\n );\n\n $params = array_merge($defaults, $params);\n\n /**\n * JOIN\n */\n if (is_array($params['join'])) {\n $join = '';\n foreach ($params['join'] as $k => $v) {\n if (is_numeric($k)) {\n $join .= \" $v\";\n } else {\n if ($k[0] == '*') {\n $join .= ' left';\n $k = ltrim($k, '*');\n } else {\n $join .= ' inner';\n }\n $join .= \" join {$this->prefix}{$k} {$k} on {$v}\";\n }\n }\n } else {\n $join = $params['join'];\n }\n\n /**\n * FIELDS\n */\n if (!is_array($params['fields'])) {\n $params['fields'] = explode(\",\", $params['fields']);\n }\n\n $fields = array();\n\n foreach ($params['fields'] as $k => $v) {\n\n // Allow * and functions\n if (preg_match('/(\\*|[A-Z]+\\([^\\)]+\\)|[a-z]+\\([^\\)]+\\)|SQL_CALC_FOUND_ROWS.*)/', $v)) {\n $r = str_replace('`', '``', $v);\n } else {\n $r = \"`\" . implode('`.`', explode(\".\", str_replace('`', '``', $v))) . \"`\";\n }\n\n if (!is_numeric($k)) {\n $r .= sprintf(\" as `%s`\", str_replace('`', '``', $k));\n }\n\n //$fields[] = $r;\n $params['fields'][$k] = $r;\n }\n\n list($where, $bindings) = $this->_where($where);\n\n $sql = sprintf(/** @lang text */\n \"SELECT %s FROM `%s` %s %s %s\",\n implode(\", \", $params['fields']),\n $this->prefix . $table,\n $table,\n $join,\n !empty($where) ? 'WHERE ' . $where : '');\n\n if ($params['group']) {\n if (is_array($params['group'])) {\n throw new \\Exception('not implemented');\n } else {\n $sql .= sprintf(' GROUP BY %s', $params['group']);\n }\n }\n\n if (!empty($params['order'])) {\n if (is_array($params['order'])) {\n $params['order'] = implode(' ', $params['order']);\n }\n $sql .= sprintf(' ORDER BY %s', $params['order']);\n }\n\n if ($params['limit']) {\n $sql .= sprintf(' LIMIT %d,%d', $params['offset'], $params['limit']);\n }\n\n $query = $this->query($sql);\n\n $query->exec($bindings);\n\n return $query;\n }", "title": "" }, { "docid": "99f2bd11fb2dbb2cf64b7e3aecd7f311", "score": "0.59360224", "text": "public function nombre_filtro($id){\n\t\treturn Filtro::where('id', $id)->select('nombre')->get();\n\t}", "title": "" }, { "docid": "bb025f026220ef0c4c8acaad54be564b", "score": "0.59337974", "text": "public static function opciones_campo_select()\n {\n\n $opciones = Grado::where('estado', 'Activo')\n //->where('id_colegio', $colegio->id)\n ->get();\n\n $vec[''] = '';\n foreach ($opciones as $opcion) {\n $vec[$opcion->id] = $opcion->descripcion;\n }\n\n return $vec;\n }", "title": "" }, { "docid": "3c4d261449113577a12adf851777a4db", "score": "0.5929213", "text": "function Get_data_byid($table,$where = '') {\n\t\treturn $this->db->query(\"SELECT * from $table $where;\");\t\n\t}", "title": "" }, { "docid": "18177805e07a077eba14735f37ac87e4", "score": "0.5927985", "text": "public function getByIdAndLanguage($id, $language) {\r\n $select = $this->_createSelectQuery();\r\n // batiment\r\n $select->field('id', $this->_tableName);\r\n $select->field('nom_' . $language, $this->_tableName, 'nom');\r\n $select->field('description_' . $language, $this->_tableName, 'description');\r\n $select->field('image', $this->_tableName);\r\n $select->field('niveau', $this->_tableName);\r\n $select->field('cout', $this->_tableName);\r\n $select->field('entretien', $this->_tableName);\r\n $select->field('duree_construction', $this->_tableName);\r\n $select->field('duree_recolte', $this->_tableName);\r\n $select->field('duree_hospitalisation', $this->_tableName);\r\n $select->field('cout_hospitalisation', $this->_tableName);\r\n $select->field('gain', $this->_tableName);\r\n $select->field('capacite', $this->_tableName);\r\n $select->field('visibilite', $this->_tableName);\r\n $select->field('id_prev', $this->_tableName);\r\n // Batiment Suivant\r\n $select->field('id', 'batiment_suivant', 'id_next');\r\n // type_batiment 1 niveau\r\n $select->field('id', 'type1_batiment', 'id_type1');\r\n $select->field('id_parent', 'type1_batiment', 'id_parent_type1');\r\n $select->field('nom_' . $language, 'type1_batiment', 'nom_type1');\r\n $select->field('is_unique', 'type1_batiment', 'is_unique_type1');\r\n // type_batiment 2 niveau\r\n $select->field('id', 'type2_batiment', 'id_type2');\r\n $select->field('id_parent', 'type2_batiment', 'id_parent_type2');\r\n $select->field('nom_' . $language, 'type2_batiment', 'nom_type2');\r\n $select->field('is_unique', 'type2_batiment', 'is_unique_type2');\r\n // From et jointures\r\n $select->from($this->_tableName);\r\n $select->innerJoin('type_batiment', array('batiment.id_type = type1_batiment.id'), 'type1_batiment');\r\n $select->leftJoin('type_batiment', array('type1_batiment.id_parent = type2_batiment.id'), 'type2_batiment');\r\n $select->leftJoin('batiment', array('batiment_suivant.id_prev = batiment.id'), 'batiment_suivant');\r\n // Conditions\r\n $select->addConditionEquals('batiment.id', $id);\r\n\r\n return $this->_mapper->buildObjectFromRow($this->_selectFirst($select));\r\n }", "title": "" }, { "docid": "9c3490ad899ef1c4cb447f88c82d346a", "score": "0.59235287", "text": "public function select($fields,$table,$where='',$orderby='',$limit='')\n {\n if($where != '') $where = \" WHERE $where\";\n // If a $where variable is pass into the\n // function set the $where variable.\n if($orderby != '') $orderby = \" ORDER BY $orderby\";\n // If a $orderby variable is pass into the\n // function set the $orderby variable.\n if($limit != '') $limit = \" LIMIT $limit\";\n // If a $limit variable is pass into the\n // function set the $limit variable.\n\n $recordSet =\n mysql_query(\n \"SELECT $fields FROM $table\" . $where . $orderby . $limit // Set the SELECT for the query\n ) or die(\n \"Selecting $table - SELECT $fields FROM $table\" . $where . $orderby . $limit .\n \" - \" . mysql_error()\n // If the query fails, we'll exit the function and\n // print this string to the screen.\n );\n if (!$recordSet) // A quick check to see if the query failed. This is a backup to the previos die()\n {\n return \"Record Set Error\";\n }\n else\n {\n $recordSet = new MysqlRecordSet( $recordSet );\n // MysqlRecordSet lets you control the query resource a better. I'll explain it later in\n // this code section. \n \n }\n return $recordSet; // Return the $recordSet whether it passed or now.\n }", "title": "" } ]
10a2004d8de9afa28585ff7b2b5130eb
Localizes an input from standard english notation Fixes a problem of BCMath with setLocale which is PHP related
[ { "docid": "3e0cf1a0ad95301f6c0ea6734403b87b", "score": "0.59858656", "text": "public static function localize($value)\n {\n $convert = localeconv();\n $value = str_replace(\".\", $convert['decimal_point'], (string) $value);\n if (!empty($convert['negative_sign']) and (strpos($value, \"-\"))) {\n $value = str_replace(\"-\", $convert['negative_sign'], $value);\n }\n return $value;\n }", "title": "" } ]
[ { "docid": "a69d2bac7da4d203c74f3bf1456a7fcc", "score": "0.762198", "text": "function localeconv() {}", "title": "" }, { "docid": "da4a21d13c4e01bf933eec0e76e34204", "score": "0.7551659", "text": "abstract public function locale();", "title": "" }, { "docid": "90ac75689472b290e81b675490cae09d", "score": "0.6858718", "text": "function internationalize($in)\r\n\t{\r\n\t\tif (function_exists('langswitch_filter_langs_with_message'))\r\n\t\t{\r\n\t\t\t$in = langswitch_filter_langs_with_message($in);\r\n\t\t}\r\n\r\n\t\tif (function_exists('polyglot_filter'))\r\n\t\t{\r\n\t\t\t$in = polyglot_filter($in);\r\n\t\t}\r\n\r\n\t\tif (function_exists('qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage'))\r\n\t\t{\r\n\t\t\t$in = qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($in);\r\n\t\t}\r\n\r\n\t\t$in = apply_filters('localization', $in);\r\n\r\n\t\treturn $in;\r\n\t}", "title": "" }, { "docid": "082817fdea348980a28894c9078faca2", "score": "0.64278686", "text": "public function preferredLocale();", "title": "" }, { "docid": "0225b343ce70057080eb4648784fe5de", "score": "0.6376015", "text": "function set_locale($locale) { # originally via http://www.onphp5.com/article/22; heavily modified\n if ($locale == \"en_US\") return; # en_US is the default in Chyrp; their system may have\n # its own locale setting and no Chyrp translation available\n # for their locale, so let's just leave it alone.\n\n list($lang, $cty) = explode(\"_\", $locale);\n $locales = array($locale.\".UTF-8\", $lang, \"en_US.UTF-8\", \"en\");\n $result = setlocale(LC_ALL, $locales);\n\n return (!strpos($result, 'UTF-8')) ? \"CP\".preg_replace('~\\.(\\d+)$~', \"\\\\1\", $result) : \"UTF-8\" ;\n }", "title": "" }, { "docid": "8321d1d1c2dd88e39756bebed542aee9", "score": "0.62921363", "text": "public function getLocale();", "title": "" }, { "docid": "8321d1d1c2dd88e39756bebed542aee9", "score": "0.62921363", "text": "public function getLocale();", "title": "" }, { "docid": "8321d1d1c2dd88e39756bebed542aee9", "score": "0.62921363", "text": "public function getLocale();", "title": "" }, { "docid": "8321d1d1c2dd88e39756bebed542aee9", "score": "0.62921363", "text": "public function getLocale();", "title": "" }, { "docid": "b290868172cc95d314b204ba7d9f2629", "score": "0.6267293", "text": "public function formatInternational(): string;", "title": "" }, { "docid": "6cf6f2ebb9d3d4b0e5f16b591d03b8ab", "score": "0.62613356", "text": "public function localisation();", "title": "" }, { "docid": "a79eeb9bbbc30e6c9ecd89a7c56164c4", "score": "0.61878073", "text": "function convert2english($string)\n{\n $newNumbers = range(0, 9);\n $arabic = array('٠', '١', '٢', '٣', '٤', '٥', '٦', '٧', '٨', '٩');\n $string = str_replace($arabic, $newNumbers, $string);\n return $string;\n}", "title": "" }, { "docid": "042dc609867a660950e808fc8e325e52", "score": "0.6125195", "text": "function normalize( $string )\r\n\t{\r\n\t\t/*\r\n\t\tyura: I commented this code because function normalizer_normalize() doesn't convert all chars to english version as expected.\r\n\t\tif( function_exists( 'normalizer_normalize' ) )\r\n\t\t{\t// Use system function to normalize, It is allowed on PHP > 5.3.0 and if PECL extenssion intl >= 1.0.0\r\n\t\t\t$r = normalizer_normalize( $string );\r\n\t\t}\r\n\t\telse*/\r\n\t\t// Replace letters:\r\n\t\t\t$transliteration = array(\r\n\t\t\t\t'IJ'=>'I','Ö'=>'O','Œ'=>'O','Ü'=>'U','ä'=>'a','æ'=>'a',\r\n\t\t\t\t'ij'=>'i','ö'=>'o','œ'=>'o','ü'=>'u','ß'=>'s','ſ'=>'s',\r\n\t\t\t\t'À'=>'A','Á'=>'A','Â'=>'A','Ã'=>'A','Ä'=>'A','Å'=>'A',\r\n\t\t\t\t'Æ'=>'A','Ā'=>'A','Ą'=>'A','Ă'=>'A','Ç'=>'C','Ć'=>'C',\r\n\t\t\t\t'Č'=>'C','Ĉ'=>'C','Ċ'=>'C','Ď'=>'D','Đ'=>'D','È'=>'E',\r\n\t\t\t\t'É'=>'E','Ê'=>'E','Ë'=>'E','Ē'=>'E','Ę'=>'E','Ě'=>'E',\r\n\t\t\t\t'Ĕ'=>'E','Ė'=>'E','Ĝ'=>'G','Ğ'=>'G','Ġ'=>'G','Ģ'=>'G',\r\n\t\t\t\t'Ĥ'=>'H','Ħ'=>'H','Ì'=>'I','Í'=>'I','Î'=>'I','Ï'=>'I',\r\n\t\t\t\t'Ī'=>'I','Ĩ'=>'I','Ĭ'=>'I','Į'=>'I','İ'=>'I','Ĵ'=>'J',\r\n\t\t\t\t'Ķ'=>'K','Ľ'=>'K','Ĺ'=>'K','Ļ'=>'K','Ŀ'=>'K','Ł'=>'L',\r\n\t\t\t\t'Ñ'=>'N','Ń'=>'N','Ň'=>'N','Ņ'=>'N','Ŋ'=>'N','Ò'=>'O',\r\n\t\t\t\t'Ó'=>'O','Ô'=>'O','Õ'=>'O','Ø'=>'O','Ō'=>'O','Ő'=>'O',\r\n\t\t\t\t'Ŏ'=>'O','Ŕ'=>'R','Ř'=>'R','Ŗ'=>'R','Ś'=>'S','Ş'=>'S',\r\n\t\t\t\t'Ŝ'=>'S','Ș'=>'S','Š'=>'S','Ť'=>'T','Ţ'=>'T','Ŧ'=>'T',\r\n\t\t\t\t'Ț'=>'T','Ù'=>'U','Ú'=>'U','Û'=>'U','Ū'=>'U','Ů'=>'U',\r\n\t\t\t\t'Ű'=>'U','Ŭ'=>'U','Ũ'=>'U','Ų'=>'U','Ŵ'=>'W','Ŷ'=>'Y',\r\n\t\t\t\t'Ÿ'=>'Y','Ý'=>'Y','Ź'=>'Z','Ż'=>'Z','Ž'=>'Z','à'=>'a',\r\n\t\t\t\t'á'=>'a','â'=>'a','ã'=>'a','ā'=>'a','ą'=>'a','ă'=>'a',\r\n\t\t\t\t'å'=>'a','ç'=>'c','ć'=>'c','č'=>'c','ĉ'=>'c','ċ'=>'c',\r\n\t\t\t\t'ď'=>'d','đ'=>'d','è'=>'e','é'=>'e','ê'=>'e','ë'=>'e',\r\n\t\t\t\t'ē'=>'e','ę'=>'e','ě'=>'e','ĕ'=>'e','ė'=>'e','ƒ'=>'f',\r\n\t\t\t\t'ĝ'=>'g','ğ'=>'g','ġ'=>'g','ģ'=>'g','ĥ'=>'h','ħ'=>'h',\r\n\t\t\t\t'ì'=>'i','í'=>'i','î'=>'i','ï'=>'i','ī'=>'i','ĩ'=>'i',\r\n\t\t\t\t'ĭ'=>'i','į'=>'i','ı'=>'i','ĵ'=>'j','ķ'=>'k','ĸ'=>'k',\r\n\t\t\t\t'ł'=>'l','ľ'=>'l','ĺ'=>'l','ļ'=>'l','ŀ'=>'l','ñ'=>'n',\r\n\t\t\t\t'ń'=>'n','ň'=>'n','ņ'=>'n','ʼn'=>'n','ŋ'=>'n','ò'=>'o',\r\n\t\t\t\t'ó'=>'o','ô'=>'o','õ'=>'o','ø'=>'o','ō'=>'o','ő'=>'o',\r\n\t\t\t\t'ŏ'=>'o','ŕ'=>'r','ř'=>'r','ŗ'=>'r','ś'=>'s','š'=>'s',\r\n\t\t\t\t'ť'=>'t','ù'=>'u','ú'=>'u','û'=>'u','ū'=>'u','ů'=>'u',\r\n\t\t\t\t'ű'=>'u','ŭ'=>'u','ũ'=>'u','ų'=>'u','ŵ'=>'w','ÿ'=>'y',\r\n\t\t\t\t'ý'=>'y','ŷ'=>'y','ż'=>'z','ź'=>'z','ž'=>'z','Α'=>'A',\r\n\t\t\t\t'Ά'=>'A','Ἀ'=>'A','Ἁ'=>'A','Ἂ'=>'A','Ἃ'=>'A','Ἄ'=>'A',\r\n\t\t\t\t'Ἅ'=>'A','Ἆ'=>'A','Ἇ'=>'A','ᾈ'=>'A','ᾉ'=>'A','ᾊ'=>'A',\r\n\t\t\t\t'ᾋ'=>'A','ᾌ'=>'A','ᾍ'=>'A','ᾎ'=>'A','ᾏ'=>'A','Ᾰ'=>'A',\r\n\t\t\t\t'Ᾱ'=>'A','Ὰ'=>'A','ᾼ'=>'A','Β'=>'B','Γ'=>'G','Δ'=>'D',\r\n\t\t\t\t'Ε'=>'E','Έ'=>'E','Ἐ'=>'E','Ἑ'=>'E','Ἒ'=>'E','Ἓ'=>'E',\r\n\t\t\t\t'Ἔ'=>'E','Ἕ'=>'E','Ὲ'=>'E','Ζ'=>'Z','Η'=>'I','Ή'=>'I',\r\n\t\t\t\t'Ἠ'=>'I','Ἡ'=>'I','Ἢ'=>'I','Ἣ'=>'I','Ἤ'=>'I','Ἥ'=>'I',\r\n\t\t\t\t'Ἦ'=>'I','Ἧ'=>'I','ᾘ'=>'I','ᾙ'=>'I','ᾚ'=>'I','ᾛ'=>'I',\r\n\t\t\t\t'ᾜ'=>'I','ᾝ'=>'I','ᾞ'=>'I','ᾟ'=>'I','Ὴ'=>'I','ῌ'=>'I',\r\n\t\t\t\t'Θ'=>'T','Ι'=>'I','Ί'=>'I','Ϊ'=>'I','Ἰ'=>'I','Ἱ'=>'I',\r\n\t\t\t\t'Ἲ'=>'I','Ἳ'=>'I','Ἴ'=>'I','Ἵ'=>'I','Ἶ'=>'I','Ἷ'=>'I',\r\n\t\t\t\t'Ῐ'=>'I','Ῑ'=>'I','Ὶ'=>'I','Κ'=>'K','Λ'=>'L','Μ'=>'M',\r\n\t\t\t\t'Ν'=>'N','Ξ'=>'K','Ο'=>'O','Ό'=>'O','Ὀ'=>'O','Ὁ'=>'O',\r\n\t\t\t\t'Ὂ'=>'O','Ὃ'=>'O','Ὄ'=>'O','Ὅ'=>'O','Ὸ'=>'O','Π'=>'P',\r\n\t\t\t\t'Ρ'=>'R','Ῥ'=>'R','Σ'=>'S','Τ'=>'T','Υ'=>'Y','Ύ'=>'Y',\r\n\t\t\t\t'Ϋ'=>'Y','Ὑ'=>'Y','Ὓ'=>'Y','Ὕ'=>'Y','Ὗ'=>'Y','Ῠ'=>'Y',\r\n\t\t\t\t'Ῡ'=>'Y','Ὺ'=>'Y','Φ'=>'F','Χ'=>'X','Ψ'=>'P','Ω'=>'O',\r\n\t\t\t\t'Ώ'=>'O','Ὠ'=>'O','Ὡ'=>'O','Ὢ'=>'O','Ὣ'=>'O','Ὤ'=>'O',\r\n\t\t\t\t'Ὥ'=>'O','Ὦ'=>'O','Ὧ'=>'O','ᾨ'=>'O','ᾩ'=>'O','ᾪ'=>'O',\r\n\t\t\t\t'ᾫ'=>'O','ᾬ'=>'O','ᾭ'=>'O','ᾮ'=>'O','ᾯ'=>'O','Ὼ'=>'O',\r\n\t\t\t\t'ῼ'=>'O','α'=>'a','ά'=>'a','ἀ'=>'a','ἁ'=>'a','ἂ'=>'a',\r\n\t\t\t\t'ἃ'=>'a','ἄ'=>'a','ἅ'=>'a','ἆ'=>'a','ἇ'=>'a','ᾀ'=>'a',\r\n\t\t\t\t'ᾁ'=>'a','ᾂ'=>'a','ᾃ'=>'a','ᾄ'=>'a','ᾅ'=>'a','ᾆ'=>'a',\r\n\t\t\t\t'ᾇ'=>'a','ὰ'=>'a','ᾰ'=>'a','ᾱ'=>'a','ᾲ'=>'a','ᾳ'=>'a',\r\n\t\t\t\t'ᾴ'=>'a','ᾶ'=>'a','ᾷ'=>'a','β'=>'b','γ'=>'g','δ'=>'d',\r\n\t\t\t\t'ε'=>'e','έ'=>'e','ἐ'=>'e','ἑ'=>'e','ἒ'=>'e','ἓ'=>'e',\r\n\t\t\t\t'ἔ'=>'e','ἕ'=>'e','ὲ'=>'e','ζ'=>'z','η'=>'i','ή'=>'i',\r\n\t\t\t\t'ἠ'=>'i','ἡ'=>'i','ἢ'=>'i','ἣ'=>'i','ἤ'=>'i','ἥ'=>'i',\r\n\t\t\t\t'ἦ'=>'i','ἧ'=>'i','ᾐ'=>'i','ᾑ'=>'i','ᾒ'=>'i','ᾓ'=>'i',\r\n\t\t\t\t'ᾔ'=>'i','ᾕ'=>'i','ᾖ'=>'i','ᾗ'=>'i','ὴ'=>'i','ῂ'=>'i',\r\n\t\t\t\t'ῃ'=>'i','ῄ'=>'i','ῆ'=>'i','ῇ'=>'i','θ'=>'t','ι'=>'i',\r\n\t\t\t\t'ί'=>'i','ϊ'=>'i','ΐ'=>'i','ἰ'=>'i','ἱ'=>'i','ἲ'=>'i',\r\n\t\t\t\t'ἳ'=>'i','ἴ'=>'i','ἵ'=>'i','ἶ'=>'i','ἷ'=>'i','ὶ'=>'i',\r\n\t\t\t\t'ῐ'=>'i','ῑ'=>'i','ῒ'=>'i','ῖ'=>'i','ῗ'=>'i','κ'=>'k',\r\n\t\t\t\t'λ'=>'l','μ'=>'m','ν'=>'n','ξ'=>'k','ο'=>'o','ό'=>'o',\r\n\t\t\t\t'ὀ'=>'o','ὁ'=>'o','ὂ'=>'o','ὃ'=>'o','ὄ'=>'o','ὅ'=>'o',\r\n\t\t\t\t'ὸ'=>'o','π'=>'p','ρ'=>'r','ῤ'=>'r','ῥ'=>'r','σ'=>'s',\r\n\t\t\t\t'ς'=>'s','τ'=>'t','υ'=>'y','ύ'=>'y','ϋ'=>'y','ΰ'=>'y',\r\n\t\t\t\t'ὐ'=>'y','ὑ'=>'y','ὒ'=>'y','ὓ'=>'y','ὔ'=>'y','ὕ'=>'y',\r\n\t\t\t\t'ὖ'=>'y','ὗ'=>'y','ὺ'=>'y','ῠ'=>'y','ῡ'=>'y','ῢ'=>'y',\r\n\t\t\t\t'ῦ'=>'y','ῧ'=>'y','φ'=>'f','χ'=>'x','ψ'=>'p','ω'=>'o',\r\n\t\t\t\t'ώ'=>'o','ὠ'=>'o','ὡ'=>'o','ὢ'=>'o','ὣ'=>'o','ὤ'=>'o',\r\n\t\t\t\t'ὥ'=>'o','ὦ'=>'o','ὧ'=>'o','ᾠ'=>'o','ᾡ'=>'o','ᾢ'=>'o',\r\n\t\t\t\t'ᾣ'=>'o','ᾤ'=>'o','ᾥ'=>'o','ᾦ'=>'o','ᾧ'=>'o','ὼ'=>'o',\r\n\t\t\t\t'ῲ'=>'o','ῳ'=>'o','ῴ'=>'o','ῶ'=>'o','ῷ'=>'o','А'=>'A',\r\n\t\t\t\t'Б'=>'B','В'=>'V','Г'=>'G','Д'=>'D','Е'=>'E','Ё'=>'E',\r\n\t\t\t\t'Ж'=>'Z','З'=>'Z','И'=>'I','Й'=>'I','К'=>'K','Л'=>'L',\r\n\t\t\t\t'М'=>'M','Н'=>'N','О'=>'O','П'=>'P','Р'=>'R','С'=>'S',\r\n\t\t\t\t'Т'=>'T','У'=>'U','Ф'=>'F','Х'=>'K','Ц'=>'T','Ч'=>'C',\r\n\t\t\t\t'Ш'=>'S','Щ'=>'S','Ы'=>'Y','Э'=>'E','Ю'=>'Y','Я'=>'Y',\r\n\t\t\t\t'а'=>'A','б'=>'B','в'=>'V','г'=>'G','д'=>'D','е'=>'E',\r\n\t\t\t\t'ё'=>'E','ж'=>'Z','з'=>'Z','и'=>'I','й'=>'I','к'=>'K',\r\n\t\t\t\t'л'=>'L','м'=>'M','н'=>'N','о'=>'O','п'=>'P','р'=>'R',\r\n\t\t\t\t'с'=>'S','т'=>'T','у'=>'U','ф'=>'F','х'=>'K','ц'=>'T',\r\n\t\t\t\t'ч'=>'C','ш'=>'S','щ'=>'S','ы'=>'Y','э'=>'E','ю'=>'Y',\r\n\t\t\t\t'я'=>'Y','ð'=>'d','Ð'=>'D','þ'=>'t','Þ'=>'T','ა'=>'a',\r\n\t\t\t\t'ბ'=>'b','გ'=>'g','დ'=>'d','ე'=>'e','ვ'=>'v','ზ'=>'z',\r\n\t\t\t\t'თ'=>'t','ი'=>'i','კ'=>'k','ლ'=>'l','მ'=>'m','ნ'=>'n',\r\n\t\t\t\t'ო'=>'o','პ'=>'p','ჟ'=>'z','რ'=>'r','ს'=>'s','ტ'=>'t',\r\n\t\t\t\t'უ'=>'u','ფ'=>'p','ქ'=>'k','ღ'=>'g','ყ'=>'q','შ'=>'s',\r\n\t\t\t\t'ჩ'=>'c','ც'=>'t','ძ'=>'d','წ'=>'t','ჭ'=>'c','ხ'=>'k',\r\n\t\t\t\t'ჯ'=>'j','ჰ'=>'h','ʼ'=>\"'\",'̧' =>'', 'ḩ'=>'h','ʼ'=>\"'\",\r\n\t\t\t\t'‘'=>\"'\",'’'=>\"'\",'ừ'=>'u','ế'=>'e','ả'=>'a','ị'=>'i',\r\n\t\t\t\t'ậ'=>'a','ệ'=>'e','ỉ'=>'i','ộ'=>'o','ồ'=>'o','ề'=>'e',\r\n\t\t\t\t'ơ'=>'o','ạ'=>'a','ẵ'=>'a','ư'=>'u','ắ'=>'a','ằ'=>'a',\r\n\t\t\t\t'ầ'=>'a','ḑ'=>'d','Ḩ'=>'H','Ḑ'=>'D','ḑ'=>'d','ş'=>'s',\r\n\t\t\t\t'ā'=>'a','ţ'=>'t'\r\n\t\t\t);\r\n\t\t\t$r = strtr( $string, $transliteration );\r\n\r\n\t\treturn $r;\r\n\t}", "title": "" }, { "docid": "b770ce66702e85d35943a9f74096e5d3", "score": "0.6086834", "text": "public function locale($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "title": "" }, { "docid": "0ca5f588b85f04765fcf71c9f4273cc0", "score": "0.60185325", "text": "function i18n_convert($str, $to_encoding, $from_encoding = null) {}", "title": "" }, { "docid": "9b3f8c386f91f31b6bcf5d482a8dca1c", "score": "0.600959", "text": "static protected function localize() {\n\n // set the local for the specific language\n setlocale(LC_ALL, static::$site->locale());\n\n // additional language variables for multilang sites\n if(static::$site->multilang()) {\n // path for the language file\n $file = c::$data['root.site'] . DS . 'languages' . DS . static::$site->language()->code() . '.php';\n // load the file if it exists\n if(file_exists($file)) include_once($file);\n }\n\n }", "title": "" }, { "docid": "7760fdba3d0c077e3c6ac5de9d9ed2fc", "score": "0.5996842", "text": "public function getDefaultLocale();", "title": "" }, { "docid": "7760fdba3d0c077e3c6ac5de9d9ed2fc", "score": "0.5996842", "text": "public function getDefaultLocale();", "title": "" }, { "docid": "7760fdba3d0c077e3c6ac5de9d9ed2fc", "score": "0.5996842", "text": "public function getDefaultLocale();", "title": "" }, { "docid": "4cb5996d5ea083ca1b8c5ffc34a8c96e", "score": "0.5914893", "text": "public function getLocale()\n {\n }", "title": "" }, { "docid": "b896bfb7c46a5d4bc64cf188765c574f", "score": "0.5902494", "text": "function my_theme_localized($locale)\n{\n if (isset($_GET['l'])) {\n return esc_attr($_GET['l']);\n }\n\n//\treturn $locale;\n return 'zh_CN';\n}", "title": "" }, { "docid": "539671e50cbe01031d83fd8e1ad710e6", "score": "0.58682525", "text": "function getLocale ($country_code='', $language_code='') {\r\n // list-of-all-locales-and-their-short-codes\r\n $locales = array(\r\n 'af_ZA',\r\n 'am_ET',\r\n 'ar_AE',\r\n 'ar_BH',\r\n 'ar_DZ',\r\n 'ar_EG',\r\n 'ar_IQ',\r\n 'ar_JO',\r\n 'ar_KW',\r\n 'ar_LB',\r\n 'ar_LY',\r\n 'ar_MA',\r\n 'arn-CL',\r\n 'ar_OM',\r\n 'ar_QA',\r\n 'ar_SA',\r\n 'ar_SY',\r\n 'ar_TN',\r\n 'ar_YE',\r\n 'as_IN',\r\n 'az-Cyrl-AZ',\r\n 'az-Latn-AZ',\r\n 'ba_RU',\r\n 'be_BY',\r\n 'bg_BG',\r\n 'bn_BD',\r\n 'bn_IN',\r\n 'bo_CN',\r\n 'br_FR',\r\n 'bs-Cyrl-BA',\r\n 'bs-Latn-BA',\r\n 'ca_ES',\r\n 'co_FR',\r\n 'cs_CZ',\r\n 'cy_GB',\r\n 'da_DK',\r\n 'de_AT',\r\n 'de_CH',\r\n 'de_DE',\r\n 'de_LI',\r\n 'de_LU',\r\n 'dsb-DE',\r\n 'dv_MV',\r\n 'el_GR',\r\n 'en_AU',\r\n 'en_BZ',\r\n 'en_CA',\r\n 'en_GB',\r\n 'en_IE',\r\n 'en_IN',\r\n 'en_JM',\r\n 'en_MY',\r\n 'en_NZ',\r\n 'en_PH',\r\n 'en_SG',\r\n 'en_TT',\r\n 'en_US',\r\n 'es_AR',\r\n 'es_BO',\r\n 'es_CL',\r\n 'es_CO',\r\n 'es_CR',\r\n 'es_DO',\r\n 'es_EC',\r\n 'es_ES',\r\n 'es_GT',\r\n 'es_HN',\r\n 'es_MX',\r\n 'es_NI',\r\n 'es_PA',\r\n 'es_PE',\r\n 'es_PR',\r\n 'es_PY',\r\n 'es_SV',\r\n 'es_US',\r\n 'es_UY',\r\n 'es_VE',\r\n 'et_EE',\r\n 'eu_ES',\r\n 'fa_IR',\r\n 'fi_FI',\r\n 'fil-PH',\r\n 'fo_FO',\r\n 'fr_BE',\r\n 'fr_CA',\r\n 'fr_CH',\r\n 'fr_FR',\r\n 'fr_LU',\r\n 'fr_MC',\r\n 'fy_NL',\r\n 'ga_IE',\r\n 'gd_GB',\r\n 'gl_ES',\r\n 'gsw-FR',\r\n 'gu_IN',\r\n 'ha-Latn-NG',\r\n 'he_IL',\r\n 'hi_IN',\r\n 'hr_BA',\r\n 'hr_HR',\r\n 'hsb-DE',\r\n 'hu_HU',\r\n 'hy_AM',\r\n 'id_ID',\r\n 'ig_NG',\r\n 'ii_CN',\r\n 'is_IS',\r\n 'it_CH',\r\n 'it_IT',\r\n 'iu-Cans-CA',\r\n 'iu-Latn-CA',\r\n 'ja_JP',\r\n 'ka_GE',\r\n 'kk_KZ',\r\n 'kl_GL',\r\n 'km_KH',\r\n 'kn_IN',\r\n 'kok-IN',\r\n 'ko_KR',\r\n 'ky_KG',\r\n 'lb_LU',\r\n 'lo_LA',\r\n 'lt_LT',\r\n 'lv_LV',\r\n 'mi_NZ',\r\n 'mk_MK',\r\n 'ml_IN',\r\n 'mn_MN',\r\n 'mn-Mong-CN',\r\n 'moh-CA',\r\n 'mr_IN',\r\n 'ms_BN',\r\n 'ms_MY',\r\n 'mt_MT',\r\n 'nb_NO',\r\n 'ne_NP',\r\n 'nl_BE',\r\n 'nl_NL',\r\n 'nn_NO',\r\n 'nso-ZA',\r\n 'oc_FR',\r\n 'or_IN',\r\n 'pa_IN',\r\n 'pl_PL',\r\n 'prs-AF',\r\n 'ps_AF',\r\n 'pt_BR',\r\n 'pt_PT',\r\n 'qut-GT',\r\n 'quz-BO',\r\n 'quz-EC',\r\n 'quz-PE',\r\n 'rm_CH',\r\n 'ro_RO',\r\n 'ru_RU',\r\n 'rw_RW',\r\n 'sah-RU',\r\n 'sa_IN',\r\n 'se_FI',\r\n 'se_NO',\r\n 'se_SE',\r\n 'si_LK',\r\n 'sk_SK',\r\n 'sl_SI',\r\n 'sma-NO',\r\n 'sma-SE',\r\n 'smj-NO',\r\n 'smj-SE',\r\n 'smn-FI',\r\n 'sms-FI',\r\n 'sq_AL',\r\n 'sr-Cyrl-BA',\r\n 'sr-Cyrl-CS',\r\n 'sr-Cyrl-ME',\r\n 'sr-Cyrl-RS',\r\n 'sr-Latn-BA',\r\n 'sr-Latn-CS',\r\n 'sr-Latn-ME',\r\n 'sr-Latn-RS',\r\n 'sv_FI',\r\n 'sv_SE',\r\n 'sw_KE',\r\n 'syr-SY',\r\n 'ta_IN',\r\n 'te_IN',\r\n 'tg-Cyrl-TJ',\r\n 'th_TH',\r\n 'tk_TM',\r\n 'tn_ZA',\r\n 'tr_TR',\r\n 'tt_RU',\r\n 'tzm-Latn-DZ',\r\n 'ug_CN',\r\n 'uk_UA',\r\n 'ur_PK',\r\n 'uz-Cyrl-UZ',\r\n 'uz-Latn-UZ',\r\n 'vi_VN',\r\n 'wo_SN',\r\n 'xh_ZA',\r\n 'yo_NG',\r\n 'zh_CN',\r\n 'zh_HK',\r\n 'zh_MO',\r\n 'zh_SG',\r\n 'zh_TW',\r\n 'zu-ZA'\r\n );\r\n\r\n /*\r\n foreach ($locales as $locale)\r\n {\r\n $locale_region = locale_get_region($locale);\r\n $locale_language = locale_get_primary_language($locale);\r\n $locale_array = array('language' => $locale_language,\r\n 'region' => $locale_region);\r\n\r\n if (strtoupper($country_code) == $locale_region &&\r\n $language_code == '')\r\n {\r\n return locale_compose($locale_array);\r\n }\r\n elseif (strtoupper($country_code) == $locale_region &&\r\n strtolower($language_code) == $locale_language)\r\n {\r\n return locale_compose($locale_array);\r\n }\r\n }\r\n */\r\n\r\n /*\r\n $locale = strtolower($language_code).'_'.strtoupper($country_code);\r\n echo $locale;\r\n if (in_array($locale, $locales))\r\n return $locale;\r\n else\r\n return null;\r\n */\r\n\r\n if (isset($language_code)) {\r\n $ret = '';\r\n foreach ($locales as $value) {\r\n if (strtolower(substr($value,0,strlen($language_code))) == strtolower($language_code))\r\n $ret = $value;\r\n };\r\n return $ret;\r\n }\r\n\r\n return false;\r\n\r\n}", "title": "" }, { "docid": "ad29f6558b7c0eb0315d9d01fce94583", "score": "0.5867785", "text": "function rcmail_set_locale($lang)\n {\n global $OUTPUT, $MBSTRING, $MBSTRING_ENCODING;\n static $s_mbstring_loaded = NULL;\n \n // settings for mbstring module (by Tadashi Jokagi)\n if ($s_mbstring_loaded===NULL)\n {\n if ($s_mbstring_loaded = extension_loaded(\"mbstring\"))\n {\n $MBSTRING = TRUE;\n if (function_exists(\"mb_mbstring_encodings\"))\n $MBSTRING_ENCODING = mb_mbstring_encodings();\n else\n $MBSTRING_ENCODING = array(\"ISO-8859-1\", \"UTF-7\", \"UTF7-IMAP\", \"UTF-8\",\n \"ISO-2022-JP\", \"EUC-JP\", \"EUCJP-WIN\",\n \"SJIS\", \"SJIS-WIN\");\n\n $MBSTRING_ENCODING = array_map(\"strtoupper\", $MBSTRING_ENCODING);\n if (in_array(\"SJIS\", $MBSTRING_ENCODING))\n $MBSTRING_ENCODING[] = \"SHIFT_JIS\";\n }\n else\n {\n $MBSTRING = FALSE;\n $MBSTRING_ENCODING = array();\n }\n }\n\n if ($MBSTRING && function_exists(\"mb_language\"))\n {\n if (!@mb_language(strtok($lang, \"_\")))\n $MBSTRING = FALSE; // unsupport language\n }\n\n $OUTPUT->set_charset(rcube_language_prop($lang, 'charset'));\n }", "title": "" }, { "docid": "41607392aa749b1bc35f86a0371d4865", "score": "0.5857035", "text": "function sq_setlocale($category,$locale) {\n if (is_string($locale)) {\n // string with only one locale\n $ret = setlocale($category,$locale);\n } elseif (! check_php_version(4,3)) {\n // older php version (second setlocale argument must be string)\n $ret=false;\n $index=0;\n while ( ! $ret && $index<count($locale)) {\n $ret=setlocale($category,$locale[$index]);\n $index++;\n }\n } else {\n // php 4.3.0 or better, use entire array\n $ret=setlocale($category,$locale);\n }\n\n /* safety checks */\n if (preg_match(\"/^.*\\/.*\\/.*\\/.*\\/.*\\/.*$/\",$ret)) {\n /**\n * Welcome to We-Don't-Follow-Own-Fine-Manual department\n * OpenBSD 3.8, 3.9-current and maybe later versions\n * return invalid response to setlocale command.\n * SM bug report #1427512.\n */\n $ret = false;\n }\n return $ret;\n}", "title": "" }, { "docid": "e04e0968bbed45cb4d7cb3cbe24e25ba", "score": "0.57940614", "text": "public function testToNumberSystem()\n {\n try {\n $value = Zend_Locale_Format::convertNumerals('١١٠', 'xxxx');\n $this->fail(\"no conversion expected\");\n } catch (Zend_Locale_Exception $e) {\n // success\n }\n\n try {\n $value = Zend_Locale_Format::convertNumerals('١١٠', 'Arab', 'xxxx');\n $this->fail(\"no conversion expected\");\n } catch (Zend_Locale_Exception $e) {\n // success\n }\n\n $this->assertEquals('110', Zend_Locale_Format::convertNumerals('١١٠', 'Arab'));\n $this->assertEquals('११०', Zend_Locale_Format::convertNumerals('١١٠', 'Arab', 'Deva'));\n $this->assertEquals('११०', Zend_Locale_Format::convertNumerals('١١٠', 'arab', 'dEVa'));\n $this->assertEquals('١١٠', Zend_Locale_Format::convertNumerals('110', 'Latn', 'Arab'));\n $this->assertEquals('١١٠', Zend_Locale_Format::convertNumerals('110', 'latn', 'Arab'));\n }", "title": "" }, { "docid": "6dd04e9bcc244aac13f25e7702c0218b", "score": "0.57801944", "text": "function getLocale(){\n\t\t$str=shopware()->System()->sLanguageData[Shopware()->System()->sLanguage][\"isocode\"];\n\t\t$str = strtolower($str);\n\t\tif(strlen($str)<2)\n\t\treturn \"de\";\n\t\telse\n\t\treturn substr($str,0,2);\n\t}", "title": "" }, { "docid": "73d72f872416ab510781d6fc639ba50e", "score": "0.57328194", "text": "function wpbs_get_locale()\n{\n\n return substr(get_locale(), 0, 2);\n\n}", "title": "" }, { "docid": "f963278da7285e980b6513f1ed41bf34", "score": "0.57152057", "text": "public function getCurrencyLocale();", "title": "" }, { "docid": "5ad847a4b700980a5df71eacefb73090", "score": "0.571401", "text": "public function _($in, $locale = null)\n {\n if (!is_array($in)) {\n return parent::_($in, $locale);\n }\n $msg = &$in;\n $msg[0] = parent::_($msg[0], $locale);\n return (count($msg) > 1 ? call_user_func_array('sprintf', $msg) : $msg[0]);\n }", "title": "" }, { "docid": "7a4bf9656a43e9a0128ccf8cde86e0da", "score": "0.5705775", "text": "public function useLocale($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "title": "" }, { "docid": "3cbb9824403f12c15d2879fea9de8603", "score": "0.5699506", "text": "public function testGerman2English()\n {\n $this->assertEquals( '2008-05-25', oxUtilsDate::getInstance()->german2English( '25.05.2008' ) );\n $this->assertEquals( '2008-05', oxUtilsDate::getInstance()->german2English( '05.2008' ) );\n $this->assertEquals( '08-05-25', oxUtilsDate::getInstance()->german2English( '25.05.08' ) );\n }", "title": "" }, { "docid": "c7eafd12503c2622f16526b91fcfde27", "score": "0.56689966", "text": "public static function localize() {\n load_plugin_textdomain('shareaholic', false, basename(dirname(__FILE__)) . '/languages/');\n }", "title": "" }, { "docid": "22075f3685536955fba7b653d2bfaff3", "score": "0.56644076", "text": "function conv($str) // converts from UTF-8 to Win-1251 locale. DEPRECATED, returns unchanged args\r\n{\r\n return $str;\r\n}", "title": "" }, { "docid": "cbd5b6ab35b5cc3714efab28b92d5b73", "score": "0.5661201", "text": "function setLocale($locale) {\r\n\r\n\t\t// ...\r\n\r\n\t}", "title": "" }, { "docid": "055c6b03cd742a21a7b08e66f5905b91", "score": "0.56556475", "text": "function rupee_format($amount) {\n\tsetlocale(LC_MONETARY, 'en_IN');\n\tif (ctype_digit($amount) ) {\n\t\t$amount = money_format('%!.0n', $amount);\n\t}\n\telse {\n\t\t$amount = money_format('%!i', $amount);\n\t}\n\treturn $amount;\n}", "title": "" }, { "docid": "9019e9c117355fd47e5e0e9fa8b4e049", "score": "0.56524104", "text": "function falkvinge_get_language_name_in_current_capitalization ($input)\r\n{\r\n\r\n\tif(!function_exists('icl_object_id'))\r\n\t{\r\n\t\treturn \"WPML_NOT_INSTALLED\";\r\n\t}\r\n\r\n\tif (ICL_LANGUAGE_CODE == \"en\")\r\n\t{\r\n\t\treturn $input;\r\n\t}\r\n\telse if (ICL_LANGUAGE_CODE == \"de\")\r\n\t{\r\n\t\treturn $input;\r\n\t}\r\n\t\r\n\treturn mb_strtolower($input);\r\n}", "title": "" }, { "docid": "46db6847d59cbf5ad6974838607de9b0", "score": "0.56456375", "text": "function normalize_str($str)\n{\n$invalid = array('Š'=>'S', 'š'=>'s','Ð'=>'Dj','Ž'=>'Z','ž'=>'z',\n'C'=>'C', 'c'=>'c', 'C'=>'C', 'c'=>'c', 'À'=>'A', 'Á'=>'A', 'Â'=>'A', 'Ã'=>'A',\n'Ä'=>'A', 'Å'=>'A', 'Æ'=>'A', 'Ç'=>'C', 'È'=>'E', 'É'=>'E', 'Ê'=>'E', 'Ë'=>'E',\n'Ì'=>'I', 'Í'=>'I', 'Î'=>'I', 'Ï'=>'I', 'Ñ'=>'N', 'Ò'=>'O', 'Ó'=>'O', 'Ô'=>'O',\n'Õ'=>'O', 'Ö'=>'O', 'Ø'=>'O', 'Ù'=>'U', 'Ú'=>'U', 'Û'=>'U', 'Ü'=>'U', 'Ý'=>'Y',\n'Þ'=>'B', 'ß'=>'Ss', 'à'=>'a', 'á'=>'a', 'â'=>'a', 'ã'=>'a', 'ä'=>'a', 'å'=>'a',\n'æ'=>'a', 'ç'=>'c', 'è'=>'e', 'é'=>'e', 'ê'=>'e', 'ë'=>'e', 'ì'=>'i', 'í'=>'i',\n'î'=>'i', 'ï'=>'i', 'ð'=>'o', 'ñ'=>'n', 'ò'=>'o', 'ó'=>'o', 'ô'=>'o', 'õ'=>'o',\n'ö'=>'o', 'ø'=>'o', 'ù'=>'u', 'ú'=>'u', 'û'=>'u', 'ý'=>'y', 'ý'=>'y', 'þ'=>'b',\n'ÿ'=>'y', 'R'=>'R', 'r'=>'r', \"`\" => \"'\", \"´\" => \"'\", \"„\" => \",\", \"`\" => \"'\",\n\"´\" => \"'\", \"“\" => \"\\\"\", \"”\" => \"\\\"\", \"´\" => \"'\", \"&acirc;€™\" => \"'\", \"{\" => \"\",\n\"~\" => \"\", \"–\" => \"-\", \"’\" => \"'\",\" \"=>\"-\",\":\"=>\"-\",\",\"=>\"-\",\"/\"=>\"-\",\" \"=>\"-\");\n \n$str = str_replace(array_keys($invalid), array_values($invalid), $str);\n \nreturn $str;\n}", "title": "" }, { "docid": "a9c92573c7d03ed94ddfbd98b30068ea", "score": "0.5641048", "text": "function persian($string) {\n //arrays of persian and latin numbers\n $persian_num = array('۰', '۱', '۲', '۳', '۴', '۵', '۶', '۷', '۸', '۹');\n $latin_num = range(0, 9);\n\n $string = str_replace($latin_num, $persian_num, $string);\n\n return $string;\n}", "title": "" }, { "docid": "2ac234709f58a5ce317151afe11d6ea6", "score": "0.5625637", "text": "function setupLocale () {\r\n global $currentLocale, $browserLocale, $browserLocaleDateFormat;\r\n $paramDefaultLocale=Parameter::getGlobalParameter('paramDefaultLocale');\r\n if (isset($_SESSION['currentLocale'])) {\r\n // First fetch in Session (filled in at login depending on user parameter)\r\n $currentLocale=$_SESSION['currentLocale'];\r\n } else if (isset($_REQUEST['currentLocale'])) {\r\n // Second fetch from request (for screens before user id identified)\r\n $currentLocale=$_REQUEST['currentLocale'];\r\n $_SESSION['currentLocale']=$currentLocale;\r\n $i18nMessages=null; // Should be null at this moment, just to be sure\r\n } else {\r\n // none of the above methods worked : get the default one form parameter file\r\n $currentLocale=$paramDefaultLocale;\r\n }\r\n if (isset($_SESSION['browserLocale'])) {\r\n $browserLocale=$_SESSION['browserLocale'];\r\n } else {\r\n $browserLocale=$currentLocale;\r\n }\r\n $_SESSION['lang']=$currentLocale; // Must be kept for user parameter screen initialization\r\n if (isset($_SESSION['browserLocaleDateFormat'])) {\r\n $browserLocaleDateFormat=$_SESSION['browserLocaleDateFormat'];\r\n } else {\r\n $browserLocaleDateFormat='YYYY-MM-DD';\r\n }\r\n}", "title": "" }, { "docid": "6efee79bd8dee562bd6c11c323489bde", "score": "0.56228966", "text": "static function setLocale($locale) {\n\t\tself::$locale = $locale;\n\t\tif(function_exists('dgettext')) {\n\t\t\tsetlocale(LC_ALL, (self::$locale = $locale) . '.UTF-8');\n\t\t\tputenv('LANGUAGE=' . $locale);\n\t\t}\n\t}", "title": "" }, { "docid": "cef5802a0ea34c7e3e0329ff05056c86", "score": "0.5610109", "text": "function localize() {\r\n\t\tload_plugin_textdomain( 'dev-network' , false , DEV_NETWORK_API_PATH . '/languages/' );\r\n\t}", "title": "" }, { "docid": "1e8d23005e4772823805bfea43d39538", "score": "0.5589421", "text": "function do_lang($x)\n\t{\n\t\treturn 'utf-8'; // or ISO-8859-1\n\t}", "title": "" }, { "docid": "223a361bd33ad9e16648f0c339d0a668", "score": "0.55788684", "text": "abstract public function getCurrentLocale(): string;", "title": "" }, { "docid": "66c199e6e10a69fe4129674ca0c0bdb4", "score": "0.55775374", "text": "public function setLocale($locale);", "title": "" }, { "docid": "d8f412aac73ba0d394b81b8b310bfd09", "score": "0.557178", "text": "public static function latinize(string $inputString)\n {\n $table = [\n 'أ' => 'a', 'ب' => 'b', 'ت' => 't', 'ث' => 'th', 'ج' => 'g', 'ح' => 'h', 'خ' => 'kh', 'د' => 'd', 'ذ' => 'th',\n 'ر' => 'r', 'ز' => 'z', 'س' => 's', 'ش' => 'sh', 'ص' => 's', 'ض' => 'd', 'ط' => 't', 'ظ' => 'th', 'ع' => 'aa',\n 'غ' => 'gh', 'ف' => 'f', 'ق' => 'k', 'ك' => 'k', 'ل' => 'l', 'م' => 'm', 'ن' => 'n', 'ه' => 'h', 'و' => 'o',\n 'ي' => 'y', 'Ä' => 'A', 'Ö' => 'O', 'Ü' => 'U', 'ß' => 'ss', 'ä' => 'a', 'ö' => 'o', 'ü' => 'u', 'က' => 'k',\n 'ခ' => 'kh', 'ဂ' => 'g', 'ဃ' => 'ga', 'င' => 'ng', 'စ' => 's', 'ဆ' => 'sa', 'ဇ' => 'z', 'စျ' => 'za',\n 'ည' => 'ny', 'ဋ' => 't', 'ဌ' => 'ta', 'ဍ' => 'd', 'ဎ' => 'da', 'ဏ' => 'na', 'တ' => 't', 'ထ' => 'ta', 'ဒ' => 'd',\n 'ဓ' => 'da', 'န' => 'n', 'ပ' => 'p', 'ဖ' => 'pa', 'ဗ' => 'b', 'ဘ' => 'ba', 'မ' => 'm', 'ယ' => 'y', 'ရ' => 'ya',\n 'လ' => 'l', 'ဝ' => 'w', 'သ' => 'th', 'ဟ' => 'h', 'ဠ' => 'la', 'အ' => 'a', 'ြ' => 'y', 'ျ' => 'ya', 'ွ' => 'w',\n 'ြွ' => 'yw', 'ျွ' => 'ywa', 'ှ' => 'h', 'ဧ' => 'e', '၏' => '-e', 'ဣ' => 'i', 'ဤ' => '-i', 'ဉ' => 'u',\n 'ဦ' => '-u', 'ဩ' => 'aw', 'သြော' => 'aw', 'ဪ' => 'aw', '၍' => 'ywae', '၌' => 'hnaik', '၀' => '0', '၁' => '1',\n '၂' => '2', '၃' => '3', '၄' => '4', '၅' => '5', '၆' => '6', '၇' => '7', '၈' => '8', '၉' => '9', '္' => '',\n '့' => '', 'း' => '', 'ာ' => 'a', 'ါ' => 'a', 'ေ' => 'e', 'ဲ' => 'e', 'ိ' => 'i', 'ီ' => 'i', 'ို' => 'o',\n 'ု' => 'u', 'ူ' => 'u', 'ေါင်' => 'aung', 'ော' => 'aw', 'ော်' => 'aw', 'ေါ' => 'aw', 'ေါ်' => 'aw', '်' => 'at',\n 'က်' => 'et', 'ိုက်' => 'aik', 'ောက်' => 'auk', 'င်' => 'in', 'ိုင်' => 'aing', 'ောင်' => 'aung', 'စ်' => 'it',\n 'ည်' => 'i', 'တ်' => 'at', 'ိတ်' => 'eik', 'ုတ်' => 'ok', 'ွတ်' => 'ut', 'ေတ်' => 'it', 'ဒ်' => 'd',\n 'ိုဒ်' => 'ok', 'ုဒ်' => 'ait', 'န်' => 'an', 'ာန်' => 'an', 'ိန်' => 'ein', 'ုန်' => 'on', 'ွန်' => 'un',\n 'ပ်' => 'at', 'ိပ်' => 'eik', 'ုပ်' => 'ok', 'ွပ်' => 'ut', 'န်ုပ်' => 'nub', 'မ်' => 'an', 'ိမ်' => 'ein',\n 'ုမ်' => 'on', 'ွမ်' => 'un', 'ယ်' => 'e', 'ိုလ်' => 'ol', 'ဉ်' => 'in', 'ံ' => 'an', 'ိံ' => 'ein',\n 'ုံ' => 'on', 'Č' => 'C', 'Ď' => 'D', 'Ě' => 'E', 'Ň' => 'N', 'Ř' => 'R', 'Š' => 'S', 'Ť' => 'T', 'Ů' => 'U',\n 'Ž' => 'Z', 'č' => 'c', 'ď' => 'd', 'ě' => 'e', 'ň' => 'n', 'ř' => 'r', 'š' => 's', 'ť' => 't', 'ů' => 'u',\n 'ž' => 'z', '°' => 0, '¹' => 1, '²' => 2, '³' => 3, '⁴' => 4, '⁵' => 5, '⁶' => 6, '⁷' => 7, '⁸' => 8, '⁹' => 9,\n '₀' => 0, '₁' => 1, '₂' => 2, '₃' => 3, '₄' => 4, '₅' => 5, '₆' => 6, '₇' => 7, '₈' => 8, '₉' => 9, 'æ' => 'ae',\n 'ǽ' => 'ae', 'À' => 'A', 'Á' => 'A', 'Â' => 'A', 'Ã' => 'A', 'Å' => 'AA', 'Ǻ' => 'A', 'Ă' => 'A', 'Ǎ' => 'A',\n 'Æ' => 'AE', 'Ǽ' => 'AE', 'à' => 'a', 'á' => 'a', 'â' => 'a', 'ã' => 'a', 'å' => 'aa', 'ǻ' => 'a', 'ă' => 'a',\n 'ǎ' => 'a', 'ª' => 'a', '@' => 'at', 'Ĉ' => 'C', 'Ċ' => 'C', 'ĉ' => 'c', 'ċ' => 'c', '©' => 'c', 'Ð' => 'Dj',\n 'Đ' => 'D', 'ð' => 'dj', 'đ' => 'd', 'È' => 'E', 'É' => 'E', 'Ê' => 'E', 'Ë' => 'E', 'Ĕ' => 'E', 'Ė' => 'E',\n 'è' => 'e', 'é' => 'e', 'ê' => 'e', 'ë' => 'e', 'ĕ' => 'e', 'ė' => 'e', 'ƒ' => 'f', 'Ĝ' => 'G', 'Ġ' => 'G',\n 'ĝ' => 'g', 'ġ' => 'g', 'Ĥ' => 'H', 'Ħ' => 'H', 'ĥ' => 'h', 'ħ' => 'h', 'Ì' => 'I', 'Í' => 'I', 'Î' => 'I',\n 'Ï' => 'I', 'Ĩ' => 'I', 'Ĭ' => 'I', 'Ǐ' => 'I', 'Į' => 'I', 'IJ' => 'IJ', 'ì' => 'i', 'í' => 'i', 'î' => 'i',\n 'ï' => 'i', 'ĩ' => 'i', 'ĭ' => 'i', 'ǐ' => 'i', 'į' => 'i', 'ij' => 'ij', 'Ĵ' => 'J', 'ĵ' => 'j', 'Ĺ' => 'L',\n 'Ľ' => 'L', 'Ŀ' => 'L', 'ĺ' => 'l', 'ľ' => 'l', 'ŀ' => 'l', 'Ñ' => 'N', 'ñ' => 'n', 'ʼn' => 'n', 'Ò' => 'O',\n 'Ô' => 'O', 'Õ' => 'O', 'Ō' => 'O', 'Ŏ' => 'O', 'Ǒ' => 'O', 'Ő' => 'O', 'Ơ' => 'O', 'Ø' => 'OE', 'Ǿ' => 'O',\n 'Œ' => 'OE', 'ò' => 'o', 'ô' => 'o', 'õ' => 'o', 'ō' => 'o', 'ŏ' => 'o', 'ǒ' => 'o', 'ő' => 'o', 'ơ' => 'o',\n 'ø' => 'oe', 'ǿ' => 'o', 'º' => 'o', 'œ' => 'oe', 'Ŕ' => 'R', 'Ŗ' => 'R', 'ŕ' => 'r', 'ŗ' => 'r', 'Ŝ' => 'S',\n 'Ș' => 'S', 'ŝ' => 's', 'ș' => 's', 'ſ' => 's', 'Ţ' => 'T', 'Ț' => 'T', 'Ŧ' => 'T', 'Þ' => 'TH', 'ţ' => 't',\n 'ț' => 't', 'ŧ' => 't', 'þ' => 'th', 'Ù' => 'U', 'Ú' => 'U', 'Û' => 'U', 'Ũ' => 'U', 'Ŭ' => 'U', 'Ű' => 'U',\n 'Ų' => 'U', 'Ư' => 'U', 'Ǔ' => 'U', 'Ǖ' => 'U', 'Ǘ' => 'U', 'Ǚ' => 'U', 'Ǜ' => 'U', 'ù' => 'u', 'ú' => 'u',\n 'û' => 'u', 'ũ' => 'u', 'ŭ' => 'u', 'ű' => 'u', 'ų' => 'u', 'ư' => 'u', 'ǔ' => 'u', 'ǖ' => 'u', 'ǘ' => 'u',\n 'ǚ' => 'u', 'ǜ' => 'u', 'Ŵ' => 'W', 'ŵ' => 'w', 'Ý' => 'Y', 'Ÿ' => 'Y', 'Ŷ' => 'Y', 'ý' => 'y', 'ÿ' => 'y',\n 'ŷ' => 'y', 'ა' => 'a', 'ბ' => 'b', 'გ' => 'g', 'დ' => 'd', 'ე' => 'e', 'ვ' => 'v', 'ზ' => 'z', 'თ' => 't',\n 'ი' => 'i', 'კ' => 'k', 'ლ' => 'l', 'მ' => 'm', 'ნ' => 'n', 'ო' => 'o', 'პ' => 'p', 'ჟ' => 'zh', 'რ' => 'r',\n 'ს' => 's', 'ტ' => 't', 'უ' => 'u', 'ფ' => 'f', 'ქ' => 'k', 'ღ' => 'gh', 'ყ' => 'q', 'შ' => 'sh', 'ჩ' => 'ch',\n 'ც' => 'ts', 'ძ' => 'dz', 'წ' => 'ts', 'ჭ' => 'ch', 'ხ' => 'kh', 'ჯ' => 'j', 'ჰ' => 'h', 'ΑΥ' => 'AU',\n 'Αυ' => 'Au', 'ΟΥ' => 'OU', 'Ου' => 'Ou', 'ΕΥ' => 'EU', 'Ευ' => 'Eu', 'ΕΙ' => 'I', 'Ει' => 'I', 'ΟΙ' => 'I',\n 'Οι' => 'I', 'ΥΙ' => 'I', 'Υι' => 'I', 'ΑΎ' => 'AU', 'Αύ' => 'Au', 'ΟΎ' => 'OU', 'Ού' => 'Ou', 'ΕΎ' => 'EU',\n 'Εύ' => 'Eu', 'ΕΊ' => 'I', 'Εί' => 'I', 'ΟΊ' => 'I', 'Οί' => 'I', 'ΎΙ' => 'I', 'Ύι' => 'I', 'ΥΊ' => 'I',\n 'Υί' => 'I', 'αυ' => 'au', 'ου' => 'ou', 'ευ' => 'eu', 'ει' => 'i', 'οι' => 'i', 'υι' => 'i', 'αύ' => 'au',\n 'ού' => 'ou', 'εύ' => 'eu', 'εί' => 'i', 'οί' => 'i', 'ύι' => 'i', 'υί' => 'i', 'Α' => 'A', 'Β' => 'V',\n 'Γ' => 'G', 'Δ' => 'D', 'Ε' => 'E', 'Ζ' => 'Z', 'Η' => 'I', 'Θ' => 'Th', 'Ι' => 'I', 'Κ' => 'K', 'Λ' => 'L',\n 'Μ' => 'M', 'Ν' => 'N', 'Ξ' => 'X', 'Ο' => 'O', 'Π' => 'P', 'Ρ' => 'R', 'Σ' => 'S', 'Τ' => 'T', 'Υ' => 'I',\n 'Φ' => 'F', 'Χ' => 'Ch', 'Ψ' => 'Ps', 'Ω' => 'O', 'Ά' => 'A', 'Έ' => 'E', 'Ή' => 'I', 'Ί' => 'I', 'Ό' => 'O',\n 'Ύ' => 'I', 'Ϊ' => 'I', 'Ϋ' => 'I', 'ϒ' => 'I', 'α' => 'a', 'β' => 'v', 'γ' => 'g', 'δ' => 'd', 'ε' => 'e',\n 'ζ' => 'z', 'η' => 'i', 'θ' => 'th', 'ι' => 'i', 'κ' => 'k', 'λ' => 'l', 'μ' => 'm', 'ν' => 'n', 'ξ' => 'x',\n 'ο' => 'o', 'π' => 'p', 'ρ' => 'r', 'ς' => 's', 'σ' => 's', 'τ' => 't', 'υ' => 'i', 'φ' => 'f', 'χ' => 'ch',\n 'ψ' => 'ps', 'ω' => 'o', 'ά' => 'a', 'έ' => 'e', 'ή' => 'i', 'ί' => 'i', 'ό' => 'o', 'ύ' => 'i', 'ϊ' => 'i',\n 'ϋ' => 'i', 'ΰ' => 'i', 'ώ' => 'o', 'ϐ' => 'v', 'ϑ' => 'th', 'अ' => 'a', 'आ' => 'aa', 'ए' => 'e', 'ई' => 'ii',\n 'ऍ' => 'ei', 'ऎ' => 'ऎ', 'ऐ' => 'ai', 'इ' => 'i', 'ओ' => 'o', 'ऑ' => 'oi', 'ऒ' => 'oii', 'ऊ' => 'uu',\n 'औ' => 'ou', 'उ' => 'u', 'ब' => 'B', 'भ' => 'Bha', 'च' => 'Ca', 'छ' => 'Chha', 'ड' => 'Da', 'ढ' => 'Dha',\n 'फ' => 'Fa', 'फ़' => 'Fi', 'ग' => 'Ga', 'घ' => 'Gha', 'ग़' => 'Ghi', 'ह' => 'Ha', 'ज' => 'Ja', 'झ' => 'Jha',\n 'क' => 'Ka', 'ख' => 'Kha', 'ख़' => 'Khi', 'ल' => 'L', 'ळ' => 'Li', 'ऌ' => 'Li', 'ऴ' => 'Lii', 'ॡ' => 'Lii',\n 'म' => 'Ma', 'न' => 'Na', 'ङ' => 'Na', 'ञ' => 'Nia', 'ण' => 'Nae', 'ऩ' => 'Ni', 'ॐ' => 'oms', 'प' => 'Pa',\n 'क़' => 'Qi', 'र' => 'Ra', 'ऋ' => 'Ri', 'ॠ' => 'Ri', 'ऱ' => 'Ri', 'स' => 'Sa', 'श' => 'Sha', 'ष' => 'Shha',\n 'ट' => 'Ta', 'त' => 'Ta', 'ठ' => 'Tha', 'द' => 'Tha', 'थ' => 'Tha', 'ध' => 'Thha', 'ड़' => 'ugDha',\n 'ढ़' => 'ugDhha', 'व' => 'Va', 'य' => 'Ya', 'य़' => 'Yi', 'ज़' => 'Za', 'Ā' => 'A', 'Ē' => 'E', 'Ģ' => 'G',\n 'Ī' => 'I', 'Ķ' => 'K', 'Ļ' => 'L', 'Ņ' => 'N', 'Ū' => 'U', 'ā' => 'a', 'ē' => 'e', 'ģ' => 'g', 'ī' => 'i',\n 'ķ' => 'k', 'ļ' => 'l', 'ņ' => 'n', 'ū' => 'u', 'Ą' => 'A', 'Ć' => 'C', 'Ę' => 'E', 'Ł' => 'L', 'Ń' => 'N',\n 'Ó' => 'O', 'Ś' => 'S', 'Ź' => 'Z', 'Ż' => 'Z', 'ą' => 'a', 'ć' => 'c', 'ę' => 'e', 'ł' => 'l', 'ń' => 'n',\n 'ó' => 'o', 'ś' => 's', 'ź' => 'z', 'ż' => 'z', 'Ъ' => '', 'Ь' => '', 'А' => 'A', 'Б' => 'B', 'Ц' => 'C',\n 'Ч' => 'Ch', 'Д' => 'D', 'Е' => 'E', 'Ё' => 'E', 'Э' => 'E', 'Ф' => 'F', 'Г' => 'G', 'Х' => 'H', 'И' => 'I',\n 'Й' => 'Y', 'Я' => 'Ya', 'Ю' => 'Yu', 'К' => 'K', 'Л' => 'L', 'М' => 'M', 'Н' => 'N', 'О' => 'O', 'П' => 'P',\n 'Р' => 'R', 'С' => 'S', 'Ш' => 'Sh', 'Щ' => 'Shch', 'Т' => 'T', 'У' => 'U', 'В' => 'V', 'Ы' => 'Y', 'З' => 'Z',\n 'Ж' => 'Zh', 'ъ' => '', 'ь' => '', 'а' => 'a', 'б' => 'b', 'ц' => 'c', 'ч' => 'ch', 'д' => 'd', 'е' => 'e',\n 'ё' => 'e', 'э' => 'e', 'ф' => 'f', 'г' => 'g', 'х' => 'h', 'и' => 'i', 'й' => 'y', 'я' => 'ya', 'ю' => 'yu',\n 'к' => 'k', 'л' => 'l', 'м' => 'm', 'н' => 'n', 'о' => 'o', 'п' => 'p', 'р' => 'r', 'с' => 's', 'ш' => 'sh',\n 'щ' => 'shch', 'т' => 't', 'у' => 'u', 'в' => 'v', 'ы' => 'y', 'з' => 'z', 'ж' => 'zh', 'Ç' => 'C', 'Ğ' => 'G',\n 'İ' => 'I', 'Ş' => 'S', 'ç' => 'c', 'ğ' => 'g', 'ı' => 'i', 'ş' => 's', 'Ґ' => 'G', 'І' => 'I', 'Ї' => 'Ji',\n 'Є' => 'Ye', 'ґ' => 'g', 'і' => 'i', 'ї' => 'ji', 'є' => 'ye', 'ạ' => 'a', 'ả' => 'a', 'ầ' => 'a', 'ấ' => 'a',\n 'ậ' => 'a', 'ẩ' => 'a', 'ẫ' => 'a', 'ằ' => 'a', 'ắ' => 'a', 'ặ' => 'a', 'ẳ' => 'a', 'ẵ' => 'a', 'ẹ' => 'e',\n 'ẻ' => 'e', 'ẽ' => 'e', 'ề' => 'e', 'ế' => 'e', 'ệ' => 'e', 'ể' => 'e', 'ễ' => 'e', 'ị' => 'i', 'ỉ' => 'i',\n 'ọ' => 'o', 'ỏ' => 'o', 'ồ' => 'o', 'ố' => 'o', 'ộ' => 'o', 'ổ' => 'o', 'ỗ' => 'o', 'ờ' => 'o', 'ớ' => 'o',\n 'ợ' => 'o', 'ở' => 'o', 'ỡ' => 'o', 'ụ' => 'u', 'ủ' => 'u', 'ừ' => 'u', 'ứ' => 'u', 'ự' => 'u', 'ử' => 'u',\n 'ữ' => 'u', 'ỳ' => 'y', 'ỵ' => 'y', 'ỷ' => 'y', 'ỹ' => 'y', 'Ạ' => 'A', 'Ả' => 'A', 'Ầ' => 'A', 'Ấ' => 'A',\n 'Ậ' => 'A', 'Ẩ' => 'A', 'Ẫ' => 'A', 'Ằ' => 'A', 'Ắ' => 'A', 'Ặ' => 'A', 'Ẳ' => 'A', 'Ẵ' => 'A', 'Ẹ' => 'E',\n 'Ẻ' => 'E', 'Ẽ' => 'E', 'Ề' => 'E', 'Ế' => 'E', 'Ệ' => 'E', 'Ể' => 'E', 'Ễ' => 'E', 'Ị' => 'I', 'Ỉ' => 'I',\n 'Ọ' => 'O', 'Ỏ' => 'O', 'Ồ' => 'O', 'Ố' => 'O', 'Ộ' => 'O', 'Ổ' => 'O', 'Ỗ' => 'O', 'Ờ' => 'O', 'Ớ' => 'O',\n 'Ợ' => 'O', 'Ở' => 'O', 'Ỡ' => 'O', 'Ụ' => 'U', 'Ủ' => 'U', 'Ừ' => 'U', 'Ứ' => 'U', 'Ự' => 'U', 'Ử' => 'U',\n ];\n\n $string = strtr($inputString, $table);\n\n return $string;\n }", "title": "" }, { "docid": "17059feba9bab316844c8e34f47379d9", "score": "0.5570669", "text": "function is_conversion_safe($input_charset) {\n global $languages, $sm_notAlias, $default_charset, $lossy_encoding;\n\n if (isset($lossy_encoding) && $lossy_encoding )\n return true;\n\n // convert to lower case\n $input_charset = strtolower($input_charset);\n\n // Is user's locale Unicode based ?\n if ( $default_charset == \"utf-8\" ) {\n return true;\n }\n\n // Charsets that are similar\n switch ($default_charset) {\n case \"windows-1251\":\n if ( $input_charset == \"iso-8859-5\" ||\n $input_charset == \"koi8-r\" ||\n $input_charset == \"koi8-u\" ) {\n return true;\n } else {\n return false;\n }\n case \"windows-1257\":\n if ( $input_charset == \"iso-8859-13\" ||\n $input_charset == \"iso-8859-4\" ) {\n return true;\n } else {\n return false;\n }\n case \"iso-8859-4\":\n if ( $input_charset == \"iso-8859-13\" ||\n $input_charset == \"windows-1257\" ) {\n return true;\n } else {\n return false;\n }\n case \"iso-8859-5\":\n if ( $input_charset == \"windows-1251\" ||\n $input_charset == \"koi8-r\" ||\n $input_charset == \"koi8-u\" ) {\n return true;\n } else {\n return false;\n }\n case \"iso-8859-13\":\n if ( $input_charset == \"iso-8859-4\" ||\n $input_charset == \"windows-1257\" ) {\n return true;\n } else {\n return false;\n }\n case \"koi8-r\":\n if ( $input_charset == \"windows-1251\" ||\n $input_charset == \"iso-8859-5\" ||\n $input_charset == \"koi8-u\" ) {\n return true;\n } else {\n return false;\n }\n case \"koi8-u\":\n if ( $input_charset == \"windows-1251\" ||\n $input_charset == \"iso-8859-5\" ||\n $input_charset == \"koi8-r\" ) {\n return true;\n } else {\n return false;\n }\n default:\n return false;\n }\n}", "title": "" }, { "docid": "0b941fe595a7146c8cde55f178edb84b", "score": "0.5550157", "text": "public function testLocaleToLanguageException(): void\n {\n // Send an empty string parameter\n $result = $this->Languages->localeToLanguage('');\n }", "title": "" }, { "docid": "017ec41482de645dbdf6ec6e515e8f25", "score": "0.5546093", "text": "function get_translated_name_of_month($language)\n{\n $currentLocale = setlocale(LC_ALL, 0);\n echo $currentLocale . PHP_EOL; //outputs C/en_US.UTF-8/C/C/C/C on my machine\n setlocale(LC_TIME, $language);\n $month = utf8_encode(strftime('%B'));\n setlocale(LC_TIME, \"C\");\n $currentLocale = setlocale(LC_ALL, 0);\n echo $currentLocale . PHP_EOL;\n return $month;\n}", "title": "" }, { "docid": "9cbb49d8947df88bff1450df893f1e40", "score": "0.5531444", "text": "function NumberToEnglish($number) {\n \n $hyphen = '-';\n $conjunction = ' and ';\n $separator = ', ';\n $negative = 'negative ';\n $decimal = ' point ';\n $dictionary = array(\n 0 => 'zero',\n 1 => 'one',\n 2 => 'two',\n 3 => 'three',\n 4 => 'four',\n 5 => 'five',\n 6 => 'six',\n 7 => 'seven',\n 8 => 'eight',\n 9 => 'nine',\n 10 => 'ten',\n 11 => 'eleven',\n 12 => 'twelve',\n 13 => 'thirteen',\n 14 => 'fourteen',\n 15 => 'fifteen',\n 16 => 'sixteen',\n 17 => 'seventeen',\n 18 => 'eighteen',\n 19 => 'nineteen',\n 20 => 'twenty',\n 30 => 'thirty',\n 40 => 'fourty',\n 50 => 'fifty',\n 60 => 'sixty',\n 70 => 'seventy',\n 80 => 'eighty',\n 90 => 'ninety',\n 100 => 'hundred',\n 1000 => 'thousand',\n 1000000 => 'million',\n 1000000000 => 'billion',\n 1000000000000 => 'trillion',\n 1000000000000000 => 'quadrillion',\n 1000000000000000000 => 'quintillion'\n );\n \n if (!is_numeric($number)) {\n return false;\n }\n \n if (($number >= 0 && (int) $number < 0) || (int) $number < 0 - PHP_INT_MAX) {\n // overflow\n trigger_error(\n 'convert_number_to_words only accepts numbers between -' . PHP_INT_MAX . ' and ' . PHP_INT_MAX,\n E_USER_WARNING\n );\n return false;\n }\n\n if ($number < 0) {\n return $negative . convert_number_to_words(abs($number));\n }\n \n $string = $fraction = null;\n \n if (strpos($number, '.') !== false) {\n list($number, $fraction) = explode('.', $number);\n }\n \n switch (true) {\n case $number < 21:\n $string = $dictionary[$number];\n break;\n case $number < 100:\n $tens = ((int) ($number / 10)) * 10;\n $units = $number % 10;\n $string = $dictionary[$tens];\n if ($units) {\n $string .= $hyphen . $dictionary[$units];\n }\n break;\n case $number < 1000:\n $hundreds = $number / 100;\n $remainder = $number % 100;\n $string = $dictionary[$hundreds] . ' ' . $dictionary[100];\n if ($remainder) {\n $string .= $conjunction . convert_number_to_words($remainder);\n }\n break;\n default:\n $baseUnit = pow(1000, floor(log($number, 1000)));\n $numBaseUnits = (int) ($number / $baseUnit);\n $remainder = $number % $baseUnit;\n $string = convert_number_to_words($numBaseUnits) . ' ' . $dictionary[$baseUnit];\n if ($remainder) {\n $string .= $remainder < 100 ? $conjunction : $separator;\n $string .= convert_number_to_words($remainder);\n }\n break;\n }\n \n if (null !== $fraction && is_numeric($fraction)) {\n $string .= $decimal;\n $words = array();\n foreach (str_split((string) $fraction) as $number) {\n $words[] = $dictionary[$number];\n }\n $string .= implode(' ', $words);\n }\n \n return $string;\n}", "title": "" }, { "docid": "a65fed6b055c1ec77362e822b7903d3a", "score": "0.5522206", "text": "function __() {\n $args = func_get_args();\n $stringOriginal = array_shift($args);\n $string = Localizer::locale($stringOriginal);\n if (!is_string($string)) {\n if (is_array($string)) {\n $string = $string[0];\n } else {\n $string = \"__(!!!required string value!!!$stringOriginal)\";\n }\n }\n if (count($args) > 0) {\n $string = vsprintf($string, $args);\n }\n return $string;\n}", "title": "" }, { "docid": "7c4c4904d78751158017dc80438d43e5", "score": "0.55177826", "text": "function _setlocale($category, $locale)\n{\n return Loader::getInstance()->setlocale($locale);\n}", "title": "" }, { "docid": "01ba870d04fc758b109d91ca8e62c7d8", "score": "0.549034", "text": "private function set_lang_culture()\n\t{\n\t\t// language specific stuff - this sets the language the app will use and sets up ini and location of translation bits\n\t\tif(strlen($this->get_config('lang.default')) && !strlen($this->language_culture) )\n\t\t\t$this->language_culture = str_replace('-', '_', $this->get_config('lang.default') );\n\t\t\n\t\t// I18N support information here\n\t\tputenv(\"LANG=$this->language_culture.utf8\");\n\t\tsetlocale(LC_ALL, \"$this->language_culture.utf8\");\n\t\t\n\t\t// Set the text domain as the app_name in config\n\t\t$domain = $this->get_config('config.app_name');\n\t\tbindtextdomain($domain, MAVERICK_BASEDIR . 'locale');\n\t\tbind_textdomain_codeset($domain, 'UTF-8');\n\t\ttextdomain($domain);\n\t}", "title": "" }, { "docid": "a5d6afe239530ed4aaecd186a1fbb21e", "score": "0.54840636", "text": "public static function convertForeignToLatin($str) {\n $tr = [\n \"А\" => \"a\", \"Б\" => \"b\", \"В\" => \"v\", \"Г\" => \"g\", \"Д\" => \"d\",\n \"Е\" => \"e\", \"Ё\" => \"yo\", \"Ж\" => \"zh\", \"З\" => \"z\", \"И\" => \"i\",\n \"Й\" => \"j\", \"К\" => \"k\", \"Л\" => \"l\", \"М\" => \"m\", \"Н\" => \"n\",\n \"О\" => \"o\", \"П\" => \"p\", \"Р\" => \"r\", \"С\" => \"s\", \"Т\" => \"t\",\n \"У\" => \"u\", \"Ф\" => \"f\", \"Х\" => \"kh\", \"Ц\" => \"ts\", \"Ч\" => \"ch\",\n \"Ш\" => \"sh\", \"Щ\" => \"sch\", \"Ъ\" => \"\", \"Ы\" => \"y\", \"Ь\" => \"\",\n \"Э\" => \"e\", \"Ю\" => \"yu\", \"Я\" => \"ya\", \"а\" => \"a\", \"б\" => \"b\",\n \"в\" => \"v\", \"г\" => \"g\", \"д\" => \"d\", \"е\" => \"e\", \"ё\" => \"yo\",\n \"ж\" => \"zh\", \"з\" => \"z\", \"и\" => \"i\", \"й\" => \"j\", \"к\" => \"k\",\n \"л\" => \"l\", \"м\" => \"m\", \"н\" => \"n\", \"о\" => \"o\", \"п\" => \"p\",\n \"р\" => \"r\", \"с\" => \"s\", \"т\" => \"t\", \"у\" => \"u\", \"ф\" => \"f\",\n \"х\" => \"kh\", \"ц\" => \"ts\", \"ч\" => \"ch\", \"ш\" => \"sh\", \"щ\" => \"sch\",\n \"ъ\" => \"\", \"ы\" => \"y\", \"ь\" => \"\", \"э\" => \"e\", \"ю\" => \"yu\",\n \"я\" => \"ya\", \"ą\" => \"a\", \"č\" => \"c\", \"ę\" => \"e\", \"ė\" => \"e\",\n \"į\" => \"i\", \"š\" => \"s\", \"ų\" => \"u\", \"ū\" => \"u\", \"ž\" => \"z\",\n ];\n\n return strtr($str, $tr);\n }", "title": "" }, { "docid": "d2a6f62888cd0e464a14fc0055e8af57", "score": "0.54823786", "text": "public function setLocale($locale = null);", "title": "" }, { "docid": "b5b44cc1a420a352c0eccd445817770c", "score": "0.5482143", "text": "function mb_language($language = null) {}", "title": "" }, { "docid": "01f39cb67557deac46424d5ba4bf0bb8", "score": "0.54817295", "text": "static function Convertnumber2english($number)\n\t{\n\t\t$number = \"{$number}\";\n\t\tif(empty($number))\treturn 0;\n\t\t$english_number = '';\n\t\t$length = strlen($number);\n\t\tfor($i=0;$i<$length;$i+=2) {\n\t\t\t$persian_one_digit = substr($number,$i,2);\n\t\t\tif(isset(self::$_numArrFaEn[$persian_one_digit])) {\n\t\t\t\t$english_number .= self::$_numArrFaEn[$persian_one_digit];\n\t\t\t} else {\n\t\t\t\t$english_number .= \"{$number[$i]}\";\n\t\t\t\t$i--;\n\t\t\t}\n\t\t}\n\t\treturn $english_number;\n\n\t}", "title": "" }, { "docid": "51f7b76dbf4120a04293578d95859680", "score": "0.54640895", "text": "function test_localization( $locale ) {\n\treturn \"nl_NL\";\n}", "title": "" }, { "docid": "c81b922ec045930b5bfeb9c2a0a340cc", "score": "0.5462598", "text": "function convert_cp1258_to_unicode($input_str)\n{\n\t\n\t$array_1258 = array(\n\t\t\"à\", \"á\", \"ạ\", \"ả\", \"ã\", \"â\", \"ầ\", \"ấ\", \"ậ\", \"ẩ\", \"ẫ\", \"ă\", \"ằ\", \"ắ\", \"ặ\", \"ẳ\", \"ẵ\",\n\t\t\"è\", \"é\", \"ẹ\", \"ẻ\", \"ẽ\", \"ê\", \"ề\", \"ế\", \"ệ\", \"ể\", \"ễ\",\n\t\t\"ì\", \"í\", \"ị\", \"ỉ\", \"ĩ\",\n\t\t\"ò\", \"ó\", \"ọ\", \"ỏ\", \"õ\", \"ô\", \"ồ\", \"ố\", \"ộ\", \"ổ\", \"ỗ\", \"ơ\", \"ờ\", \"ớ\", \"ợ\", \"ở\", \"ỡ\",\n\t\t\"ù\", \"ú\", \"ụ\", \"ủ\", \"ũ\", \"ư\", \"ừ\", \"ứ\", \"ự\", \"ử\", \"ữ\",\n\t\t\"ỳ\", \"ý\", \"ỵ\", \"ỷ\", \"ỹ\",\n\t\t\"đ\"\n\t);\n\t\n\t$array_unicode = array(\n\t\t\"à\", \"á\", \"ạ\", \"ả\", \"ã\", \"â\", \"ầ\", \"ấ\", \"ậ\", \"ẩ\", \"ẫ\", \"ă\", \"ằ\", \"ắ\", \"ặ\", \"ẳ\", \"ẵ\",\n\t\t\"è\", \"é\", \"ẹ\", \"ẻ\", \"ẽ\", \"ê\", \"ề\", \"ế\", \"ệ\", \"ể\", \"ễ\",\n\t\t\"ì\", \"í\", \"ị\", \"ỉ\", \"ĩ\",\n\t\t\"ò\", \"ó\", \"ọ\", \"ỏ\", \"õ\", \"ô\", \"ồ\", \"ố\", \"ộ\", \"ổ\", \"ỗ\", \"ơ\", \"ờ\", \"ớ\", \"ợ\", \"ở\", \"ỡ\",\n\t\t\"ù\", \"ú\", \"ụ\", \"ủ\", \"ũ\", \"ư\", \"ừ\", \"ứ\", \"ự\", \"ử\", \"ữ\",\n\t\t\"ỳ\", \"ý\", \"ỵ\", \"ỷ\", \"ỹ\",\n\t\t\"đ\"\n\t);\n\t\n\treturn str_replace($array_1258, $array_unicode, $input_str);\n}", "title": "" }, { "docid": "3e0af6877dd853fa0eb8e748fabddb65", "score": "0.545901", "text": "function atrans($label, $locale = null)\n {\n return app('aalberts-translate')->translate($label, $locale);\n }", "title": "" }, { "docid": "3ab61ab0fe969ab982f5de18e58ec948", "score": "0.5455425", "text": "function i18n_internal_encoding($encoding = null) {}", "title": "" }, { "docid": "91ead5cf796e0cf0dee57e9bf9187551", "score": "0.54535264", "text": "public function getActiveLocale();", "title": "" }, { "docid": "91ead5cf796e0cf0dee57e9bf9187551", "score": "0.54535264", "text": "public function getActiveLocale();", "title": "" }, { "docid": "94bb2bcf1d6a98410a222ae1c352bc58", "score": "0.54472196", "text": "public function __invoke ($string)\r\n {\r\n //setlocale(LC_ALL, 'en_US.UTF8');\r\n $replace = array(\r\n \"ě\", \r\n \"š\", \r\n \"č\", \r\n \"ř\", \r\n \"ž\", \r\n \"ý\", \r\n \"á\", \r\n \"í\", \r\n \"é\", \r\n \"ú\", \r\n \"ů\", \r\n \"ť\", \r\n \"ď\", \r\n \"ó\", \r\n \"ň\", \r\n \"Ý\", \r\n \"Ú\", \r\n \"&\", \r\n \"„\", \r\n \"“\", \r\n \"!\", \r\n \"Š\", \r\n \"Č\", \r\n \"Ř\", \r\n \"Í\", \r\n \"Ž\", \r\n \"ö\", \r\n \"ć\", \r\n \"Ć\", \r\n \"ä\", \r\n \"ü\", \r\n \"Ö\",\r\n \"ô\",\r\n \"ľ\",\r\n \"ł\",\r\n \"Ś\",\r\n \"ą\",\r\n \"ź\",\r\n \"ż\",\r\n \"ś\", \r\n \"ę\",\r\n \"ń\",\r\n \"ő\",\r\n \"Á\", \r\n );\r\n \r\n $replacement = array(\r\n \"e\", \r\n \"s\", \r\n \"c\", \r\n \"r\", \r\n \"z\", \r\n \"y\", \r\n \"a\", \r\n \"i\", \r\n \"e\", \r\n \"u\", \r\n \"u\", \r\n \"t\", \r\n \"d\", \r\n \"o\", \r\n \"n\", \r\n \"y\", \r\n \"u\", \r\n \"\", \r\n \"\", \r\n \"\", \r\n \"\", \r\n \"s\", \r\n \"c\", \r\n \"r\", \r\n \"i\", \r\n \"z\", \r\n \"o\", \r\n \"c\", \r\n \"c\", \r\n \"a\", \r\n \"u\", \r\n \"o\",\r\n \"o\",\r\n \"l\",\r\n \"l\",\r\n \"s\",\r\n \"a\",\r\n \"z\",\r\n \"z\",\r\n \"s\",\r\n \"e\",\r\n \"n\",\r\n \"o\",\r\n \"A\", \r\n );\r\n \r\n $string = trim($string);\r\n $string = str_replace($replace, $replacement, $string);\r\n $output = iconv('UTF-8', 'ASCII//TRANSLIT', $string);\r\n $output = preg_replace('#[^a-zA-Z0-9\\/_|+ -]#', '', $output);\r\n $output = strtolower(trim($output, '-'));\r\n $output = preg_replace('#[\\/_|+ -]+#', '-', $output);\r\n \r\n return $output;\r\n }", "title": "" }, { "docid": "a03f5cd5592e5dcd6a63d74ccbf1d3fa", "score": "0.54326785", "text": "static function setLocale($locale = null, $cat = LC_ALL)\n {\n if (!strlen($locale)) {\n return setLocale($cat, null);\n }\n \n $locales = I18Nv2::getStaticProperty('locales');\n \n // get complete standard locale code (en => en_US)\n if (isset($locales[$locale])) {\n $locale = $locales[$locale];\n }\n \n // get Win32 locale code (en_US => enu)\n if (I18Nv2_WIN) {\n $windows = I18Nv2::getStaticProperty('windows');\n $setlocale = isset($windows[$locale]) ? $windows[$locale] : $locale;\n } else {\n $setlocale = $locale;\n }\n\n $syslocale = setLocale($cat, $setlocale);\n \n // if the locale is not recognized by the system, check if there \n // is a fallback locale and try that, otherwise return false\n if (!$syslocale) {\n $fallbacks = &I18Nv2::getStaticProperty('fallbacks');\n if (isset($fallbacks[$locale])) {\n // avoid endless recursion with circular fallbacks\n $trylocale = $fallbacks[$locale];\n unset($fallbacks[$locale]);\n if ($retlocale = I18Nv2::setLocale($trylocale, $cat)) {\n $fallbacks[$locale] = $trylocale;\n return $retlocale;\n }\n }\n return false;\n }\n \n $language = substr($locale, 0,2);\n \n if (I18Nv2_WIN) {\n @putEnv('LANG=' . $language);\n @putEnv('LANGUAGE=' . $language);\n } else {\n @putEnv('LANG=' . $locale);\n @putEnv('LANGUAGE=' . $locale);\n }\n \n // unshift locale stack\n $last = &I18Nv2::getStaticProperty('last');\n array_unshift($last, \n array(\n 0 => $locale, \n 1 => $language, \n 2 => $syslocale,\n 'locale' => $locale,\n 'language' => $language,\n 'syslocale' => $syslocale,\n )\n );\n \n // fetch locale specific information\n $info = &I18Nv2::getStaticProperty('info');\n $info = localeConv();\n \n return $syslocale;\n }", "title": "" }, { "docid": "05f242f3380573626e3639a63778d21e", "score": "0.5423232", "text": "function set_locale( $locale = false ) {\n $locale = $this->get_user_language( 'locale' );\n setlocale(LC_ALL,$locale);\n }", "title": "" }, { "docid": "615f9e4c7200dc339037270a01e29d09", "score": "0.5413327", "text": "public function normalize($string) {\n $table = array(\n 'Š' => 'S', 'š' => 's', 'Đ' => 'Dj', 'd' => 'dj', 'Ž' => 'Z', 'ž' => 'z', 'C' => 'C', 'c' => 'c', 'C' => 'C', 'c' => 'c',\n 'Ŕ' => 'A', 'Á' => 'A', 'Â' => 'A', 'Ă' => 'A', 'Ä' => 'A', 'Ĺ' => 'A', 'Ć' => 'A', 'Ç' => 'C', 'Č' => 'E', 'É' => 'E',\n 'Ę' => 'E', 'Ë' => 'E', 'Ě' => 'I', 'Í' => 'I', 'Î' => 'I', 'Ď' => 'I', 'Ń' => 'N', 'Ň' => 'O', 'Ó' => 'O', 'Ô' => 'O',\n 'Ő' => 'O', 'Ö' => 'O', 'Ř' => 'O', 'Ů' => 'U', 'Ú' => 'U', 'Ű' => 'U', 'Ü' => 'U', 'Ý' => 'Y', 'Ţ' => 'B', 'ß' => 'Ss',\n 'ŕ' => 'a', 'á' => 'a', 'â' => 'a', 'ă' => 'a', 'ä' => 'a', 'ĺ' => 'a', 'ć' => 'a', 'ç' => 'c', 'č' => 'e', 'é' => 'e',\n 'ę' => 'e', 'ë' => 'e', 'ě' => 'i', 'í' => 'i', 'î' => 'i', 'ď' => 'i', 'đ' => 'o', 'ń' => 'n', 'ň' => 'o', 'ó' => 'o',\n 'ô' => 'o', 'ő' => 'o', 'ö' => 'o', 'ř' => 'o', 'ů' => 'u', 'ú' => 'u', 'ű' => 'u', 'ý' => 'y', 'ý' => 'y', 'ţ' => 'b',\n '˙' => 'y', 'R' => 'R', 'r' => 'r',\n );\n return strtr($string, $table);\n }", "title": "" }, { "docid": "825545e3cb30e526d5d130b80b56e042", "score": "0.53969383", "text": "static function get_english($string) {\n\t\t$translations = array(\n\t\t\t\"type d'emballage utilisé\" => __( 'Packing type', 'envoimoinscher' ),\n\t\t\t'Boîte' => __( 'Box', 'envoimoinscher' ),\n\t\t\t'Caisse' => __( 'Crate', 'envoimoinscher' ),\n\t\t\t'Bac' => __( 'Container', 'envoimoinscher' ),\n\t\t\t'Emballage isotherme' => __( 'Insulated packaging', 'envoimoinscher' ),\n\t\t\t'Etui' => __( 'Carrying case', 'envoimoinscher' ),\n\t\t\t'Malle' => __( 'Trunk', 'envoimoinscher' ),\n\t\t\t'Sac' => __( 'Bag/sack', 'envoimoinscher' ),\n\t\t\t'Tube' => __( 'Tube', 'envoimoinscher' ),\n\t\t\t'Matériau utilisé' => __( 'Materials', 'envoimoinscher' ),\n\t\t\t'Carton' => __( 'Cardboard box', 'envoimoinscher' ),\n\t\t\t'Bois' => __( 'Wood', 'envoimoinscher' ),\n\t\t\t'Carton blindé' => __( 'Reinforced cardboard', 'envoimoinscher' ),\n\t\t\t'Film opaque' => __( 'Opaque film', 'envoimoinscher' ),\n\t\t\t'Film transparent' => __( 'Transparent film', 'envoimoinscher' ),\n\t\t\t'Métal' => __( 'Metal', 'envoimoinscher' ),\n\t\t\t'Papier' => __( 'Paper', 'envoimoinscher' ),\n\t\t\t'Papier armé' => __( 'Reinforced paper', 'envoimoinscher' ),\n\t\t\t'Plastique et carton' => __( 'Plastic and cardboard', 'envoimoinscher' ),\n\t\t\t'Plastique' => __( 'Plastic', 'envoimoinscher' ),\n\t\t\t'Plastique opaque' => __( 'Opaque plastic', 'envoimoinscher' ),\n\t\t\t'Plastique transparent' => __( 'Transparent plastic', 'envoimoinscher' ),\n\t\t\t'Polystyrène' => __( 'Polystyrene', 'envoimoinscher' ),\n\t\t\t'Protection intérieure utilisée' => __( 'Interior protection', 'envoimoinscher' ),\n\t\t\t'Sans protection particulière' => __( 'No specific protection', 'envoimoinscher' ),\n\t\t\t'Calage papier' => __( 'Paper cushioning', 'envoimoinscher' ),\n\t\t\t'Bulles plastiques' => __( 'Plastic bubble wrap', 'envoimoinscher' ),\n\t\t\t'Carton antichoc' => __( 'Impact-resistant cardboard', 'envoimoinscher' ),\n\t\t\t'Coussin air' => __( 'Air cushion', 'envoimoinscher' ),\n\t\t\t'Coussin mousse' => __( 'Foam cushion', 'envoimoinscher' ),\n\t\t\t'Manchon carton (bouteille)' => __( 'Cardboard bottle protector', 'envoimoinscher' ),\n\t\t\t'Manchon mousse (bouteille)' => __( 'Foam bottle protector', 'envoimoinscher' ),\n\t\t\t'Matelassage' => __( 'Padding', 'envoimoinscher' ),\n\t\t\t'Plaque mousse' => __( 'Foam pad', 'envoimoinscher' ),\n\t\t\t'Coussin de calage' => __( 'Cushioning material', 'envoimoinscher' ),\n\t\t\t'Sachet bulles' => __( 'Padded mailer', 'envoimoinscher' ),\n\t\t\t'Fermeture utilisée' => __( 'Fastener used', 'envoimoinscher' ),\n\t\t\t'Fermeture autocollante' => __( 'Self-adhesive fastener', 'envoimoinscher' ),\n\t\t\t'Ruban adhésif' => __( 'Adhesive tape', 'envoimoinscher' ),\n\t\t\t'Agrafes' => __( 'Staples', 'envoimoinscher' ),\n\t\t\t'Clous' => __( 'Nails', 'envoimoinscher' ),\n\t\t\t'Collage' => __( 'Binding', 'envoimoinscher' ),\n\t\t\t'Ruban de cerclage' => __( 'Strapping tape', 'envoimoinscher' ),\n\t\t\t'Sangle ou feuillard' => __( 'Strap or coiled strip', 'envoimoinscher' ),\n\t\t\t'Agraphes et cerclage' => __( 'Stapling and strapping', 'envoimoinscher' ),\n\t\t\t'Clous et cerclage' => __( 'Nails and fastening', 'envoimoinscher' ),\n\t\t\t'Ficelles' => __( 'String', 'envoimoinscher' ),\n\t\t);\n\n\t\tif ( isset( $translations[$string] ) ) return $translations[$string];\n\t\telse return $string;\n\t}", "title": "" }, { "docid": "30a1dca786de7f598bbb808b3b4e2413", "score": "0.5382849", "text": "function normalize( $s ) {\n\t\tglobal $wgFixMalayalamUnicode;\n\t\t$s = parent::normalize( $s );\n\t\tif ( $wgFixMalayalamUnicode ) {\n\t\t\t$s = $this->transformUsingPairFile( 'normalize-ml.ser', $s );\n\t\t}\n\t\treturn $s;\n\t}", "title": "" }, { "docid": "8db8e102db531ee36074b8cd2b1ea3a5", "score": "0.53768307", "text": "function setVCLLocale() {\n\tglobal $locale;\n\t# set a cookie for the locale if it has not been set already\n\tif(! array_key_exists('VCLLOCALE', $_COOKIE)) {\n\t\tsetcookie(\"VCLLOCALE\", 'en_US', (time() + (86400 * 31)), \"/\", COOKIEDOMAIN);\n\t\t$locale = DEFAULTLOCALE;\n\t}\n\t// if a cookie has already been set, just update the expiration time for it\n\telse {\n\t\tsetcookie(\"VCLLOCALE\", $_COOKIE['VCLLOCALE'], (time() + (86400 * 31)), \"/\", COOKIEDOMAIN);\n\t\t$locale = $_COOKIE['VCLLOCALE'];\n\t}\n\n\t#putenv('LC_ALL=' . $locale);\n\t# use UTF8 encoding for any locales other than English (we may just be able\n\t# to always use UTF8)\n\tif(preg_match('/^en/', $locale))\n\t\tsetlocale(LC_ALL, $locale);\n\telse\n\t\tsetlocale(LC_ALL, $locale . '.UTF8');\n\tbindtextdomain('vcl', './locale');\n\ttextdomain('vcl');\n\tbind_textdomain_codeset('vcl', 'UTF-8');\n}", "title": "" }, { "docid": "795c6f44ea30317e82ecec5b12995b89", "score": "0.5370242", "text": "function setAppLocale($locale = false) {\n $setcookie = true;\n\n\n //Check request\n if (!$locale) $locale = getParameter(\"lang\", false);\n\n //Check cookie\n if (!$locale && isset($_COOKIE[\"mcnbLang\"]) && strlen($_COOKIE[\"mcnbLang\"])) {\n $locale = $_COOKIE[\"mcnbLang\"];\n $setcookie = false;\n }\n\n $locale = strtolower($locale);\n $locale = str_replace(\"_\", \"-\", $locale);\n\n switch ($locale) {\n case \"ca\":\n $locale = \"ca\";\n break;\n case \"es\":\n $locale = \"es\";\n break;\n case \"en\":\n $locale = \"en\";\n break;\t\t\t\n }\n\n if (!$locale || !in_array($locale, explode(\",\", _AVAILABLE_LOCALES))) {\n $locale = _DEFAULT_LOCALE;\n }\n\n //Require localized strings\n $file = _APP_ROOT.\"php/locale/\".$locale.\".inc.php\";\n if (!file_exists($file)) {\n $file = _APP_ROOT.\"php/locale/\"._DEFAULT_LOCALE.\".inc.php\";\n }\n\n require_once($file);\n\n //Set cookie if needed\n if ($setcookie) {\n setUserCookie(\"mcnbLang\", $locale, 3650, _APP_URL_PATH);\n }\n\n return $locale;\n\n}", "title": "" }, { "docid": "05e7411ff9e9cbbae7bdfc633f919bd1", "score": "0.53592587", "text": "function l2l($localeOrLanguage)\n {\n return strtr($localeOrLanguage, '-_', '_-');\n }", "title": "" }, { "docid": "80cab5e1e6bdadb505390a8fad21796e", "score": "0.5343518", "text": "function setupLocale() {\n if ($this->localised) return;\n\n global $conf; // definitely don't invoke \"global $lang\"\n $path = DOKU_PLUGIN.$this->getPluginName().'/lang/';\n\n $lang = array();\n\n // don't include once, in case several plugin components require the same language file\n @include($path.'en/lang.php');\n if ($conf['lang'] != 'en') @include($path.$conf['lang'].'/lang.php');\n\n $this->lang = $lang;\n $this->localised = true;\n }", "title": "" }, { "docid": "211c8d3fb5d0259018af6da707f64cd6", "score": "0.5333307", "text": "function bn_date($str)\r{\r $en = array(1,2,3,4,5,6,7,8,9,0);\r $bn = array('à§§','২','à§©','৪','à§«','৬','à§­','à§®','৯','০');\r $str = str_replace($en, $bn, $str);\r $en = array( 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' );\r $en_short = array( 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'June', 'July', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' );\r $bn = array( 'জানুয়ারী', 'ফেব্রুয়ারী', 'মার্চ', 'এপ্রিল', 'মে', 'জুন', 'জুলাই', 'অগাস্ট', 'সেপ্টেম্বর', 'অক্টোবর', 'নভেম্বর', 'ডিসেম্বর' );\r $str = str_replace( $en, $bn, $str );\r $str = str_replace( $en_short, $bn, $str );\r $en = array('Saturday','Sunday','Monday','Tuesday','Wednesday','Thursday','Friday');\r $en_short = array('Sat','Sun','Mon','Tue','Wed','Thu','Fri');\r $bn_short = array('শনি', 'রবি','সোম','মঙ্গল','বুধ','বৃহঃ','শুক্র');\r $bn = array('শনিবার','রবিবার','সোমবার','মঙ্গলবার','বুধবার','বৃহস্পতিবার','শুক্রবার');\r $str = str_replace( $en, $bn, $str );\r $str = str_replace( $en_short, $bn_short, $str );\r $en = array( 'am', 'pm' );\r $bn = array( 'পূর্বাহ্ন', 'অপরাহ্ন' );\r $str = str_replace( $en, $bn, $str );\r return $str;\r}", "title": "" }, { "docid": "7e33ba3b0f1f1fa7463ae0b2a9532ed0", "score": "0.5333215", "text": "function range_cvt($range, string $lang, $suffix = TRUE): string\n\t{\n\t\tif($lang == 'en'){\n\t\t\t$suffix = $suffix === TRUE ? \" nm\" : \"\";\n\t\t\t$range /= 1.852;\n\t\t\treturn round($range) . $suffix;\n\t\t} else {\n\t\t\t$suffix = $suffix === TRUE ? \" Km\" : \"\";\n\t\t\treturn $range . $suffix;\n\t\t}\n\t}", "title": "" }, { "docid": "4468da3d3ae7520e9a3a14f878a6fab4", "score": "0.5332544", "text": "abstract public function getLangISOFromNormalizedCountry($normalizedCountryStr);", "title": "" }, { "docid": "598362f91d9bfd292282f17e3b570354", "score": "0.53163785", "text": "function builder_timeline_get_graph_locale() {\n static $locale = null;\n if($locale===null){\n $locale = get_locale();\n switch ( $locale ) {\n case 'cs-CZ': $locale = 'cz'; break;\n case 'pt_BR': $locale = 'pt-br'; break;\n case 'zh_TW': $locale = 'zh-tw'; break;\n case 'zh_CN': $locale = 'zh-cn'; break;\n default: $locale = substr( get_locale(), 0, 2 ); break;\n }\n }\n\treturn $locale;\n}", "title": "" }, { "docid": "34769dae62981334ff4012fb3f495d04", "score": "0.5304248", "text": "private function set_locale()\n\t{\n\n\t\t$plugin_i18n = new MagicForm_i18n();\n\n\t\t$this->loader->add_action('plugins_loaded', $plugin_i18n, 'load_plugin_textdomain');\n\t}", "title": "" }, { "docid": "444ad86611c23c3b447f35fb2ec358d1", "score": "0.5303994", "text": "public static function to_lang($str)\n\t{\n\t\tif (self::$nls == null)\n\t\t{\n\t\t\tself::$nls = CmsCache::get_instance()->call(array('CmsLanguage', 'load_nls_files'));\n\t\t}\n\n\t\t// get the incoming accepted languages.\n\t\t$langs = explode(',',$str);\n\n\t\tforeach( $langs as $onelang )\n\t\t{\n\t\t\t// trim the quality portion out.\n\t\t\tif( strpos($onelang,';') !== FALSE )\n\t\t\t{\n\t\t\t\t$onelang = substr($onelang,0,strpos($onelang,';'));\n\t\t\t}\n\n\t\t\tif( isset(self::$nls['language'][$onelang]) )\n\t\t\t{\n\t\t\t\treturn $onelang;\n\t\t\t}\n\n\t\t\tif( isset(self::$nls['alias'][$onelang]) )\n\t\t\t{\n\t\t\t\t$alias = self::$nls['alias'][$onelang];\n\t\t\t\tif( isset(self::$nls['language'][$alias]) )\n\t\t\t\t{\n\t\t\t\t\treturn $alias;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "52508a54580a4125366bd21de5ec638b", "score": "0.5302496", "text": "public function test_number_format() {\n $this->assertSame( '1 337', yourls_number_format_i18n( 1337 ) );\n $this->assertSame( '7', yourls_number_format_i18n( 6.66 ) );\n $this->assertSame( '6,66', yourls_number_format_i18n( 6.66, 2 ) );\n }", "title": "" }, { "docid": "42611992d87cc905c47d6511eee6b6f9", "score": "0.5302056", "text": "function get_locales()\r\n{\r\n $locales = array(\r\n \"Arabic\" => 'ar',\r\n \"Bulgarian\" => 'bg',\r\n \"Catalan\" => 'ca',\r\n \"Czech\" => 'cs',\r\n \"Danish\" => 'da',\r\n \"Albanian\" => 'sq',\r\n \"German\" => 'de',\r\n \"Deutsch\" => 'de',\r\n 'Dutch' => 'nl',\r\n \"Greek\" => 'el',\r\n \"English\" => 'en',\r\n \"Finland\" => 'fi',\r\n \"Spanish\" => 'es',\r\n \"Persian\" => 'fa',\r\n \"Finnish\" => 'fi',\r\n \"French\" => 'fr',\r\n \"Hebrew\" => 'he',\r\n \"Hindi\" => 'hi',\r\n 'Indonesian' => 'id',\r\n \"Hindi\" => 'hi',\r\n \"Croatian\" => 'hr',\r\n \"Hungarian\" => 'hu',\r\n \"Icelandic\" => 'is',\r\n \"Italian\" => 'it',\r\n \"Japanese\" => 'ja',\r\n \"Korean\" => 'ko',\r\n \"Lithuanian\" => 'lt',\r\n \"Latvian\" => 'lv',\r\n \"Norwegian\" => 'nb',\r\n \"Netherlands\" => 'nl',\r\n \"Polish\" => 'pl',\r\n \"Portuguese\" => 'pt',\r\n \"Romanian\" => 'ro',\r\n \"Russian\" => 'ru',\r\n \"Slovak\" => 'sk',\r\n \"Slovenian\" => 'sl',\r\n \"Serbian\" => 'sr',\r\n \"Swedish\" => 'sv',\r\n \"Thai\" => 'th',\r\n \"Turkish\" => 'tr',\r\n \"Ukrainian\" => 'uk',\r\n \"Vietnamese\" => 'vi'\r\n );\r\n\r\n $locales = do_action('before_get_locales', $locales);\r\n return $locales;\r\n}", "title": "" }, { "docid": "863a578227b55e95fb0339ec4bffa7b7", "score": "0.53010935", "text": "private function set_locale() {\n\n\t\t$plugin_i18n = new FullCulqi_i18n();\n\t\t$plugin_i18n->set_domain( 'letsgo' );\n\n\t\tadd_action( 'plugins_loaded', [ $plugin_i18n, 'load_plugin_textdomain' ] );\n\t}", "title": "" }, { "docid": "032d1fb0779fb9ac0cbeb1cb7afd9514", "score": "0.52963", "text": "function util_convert($message){\n /* In this function i have changed Turkish characters to\n English chars.\n */\n $changefrom = array('ı', 'İ', 'ü', 'Ü', 'ö', 'Ö', 'ğ', 'Ğ', 'ç', 'Ç','ş','Ş');\n $changeto = array('i', 'I', 'u', 'U', 'o', 'O', 'g', 'G', 'c', 'C','s','S');\n return str_replace($changefrom, $changeto, $message);\n }", "title": "" }, { "docid": "8863f5dbe3f5f44ddc1ef64ee5d7dd50", "score": "0.5293334", "text": "function custom_locale()\n{\n global $locale, $sitepress;\n if ( !session_id() )\n session_start();\n\n if ( !defined( 'DOING_AJAX' ) ) {\n $locale = get_locale();\n $_SESSION[ 'locale' ] = $locale;\n } else {\n $locale = $_SESSION[ 'locale' ];\n remove_filter( 'locale', array( $sitepress, 'locale' ) );\n add_filter( 'locale', function(){\n return $_SESSION[ 'locale' ];\n }, 1 );\n }\n return $locale;\n}", "title": "" }, { "docid": "049f46872cc68b5411b6232ec920bf67", "score": "0.52909684", "text": "function str_sanitize($str) {\r\n\t\t$from_to = array(\r\n\t\t\t\"Ü\" => \"U\",\r\n\t\t\t\"Õ\" => \"O\",\r\n\t\t\t\"Ö\" => \"O\",\r\n\t\t\t\"Ä\" => \"A\",\r\n\t\t\t\"ü\" => \"u\",\r\n\t\t\t\"õ\" => \"o\",\r\n\t\t\t\"ö\" => \"o\",\r\n\t\t\t\"ä\" => \"a\",\r\n\t\t\t\"Š\" => \"S\",\r\n\t\t\t\"Ž\" => \"Z\",\r\n\t\t\t\"š\" => \"s\",\r\n\t\t\t\"ž\" => \"z\",\r\n\t\t);\r\n\t\t$str = strtr($str, $from_to);\r\n\r\n\t\t// Translitetration for Russian characters\r\n\t\t$cyrillic = array(\r\n\t\t\t\"Щ\", \"Ш\", \"Ч\", \"Ц\",\"Ю\", \"Я\", \"Ж\", \"А\",\"Б\",\"В\",\"Г\",\"Д\",\"Е\", \"Ё\", \"З\",\"И\",\"Й\",\"К\",\"Л\",\"М\",\"Н\",\"О\",\"П\",\"Р\",\"С\",\"Т\",\"У\",\"Ф\",\"Х\", \"Ь\",\"Ы\",\"Ъ\",\"Э\",\r\n\t\t\t\"щ\", \"ш\", \"ч\", \"ц\",\"ю\", \"я\", \"ж\", \"а\",\"б\",\"в\",\"г\",\"д\",\"е\", \"ё\", \"з\",\"и\",\"й\",\"к\",\"л\",\"м\",\"н\",\"о\",\"п\",\"р\",\"с\",\"т\",\"у\",\"ф\",\"х\", \"ь\",\"ы\",\"ъ\",\"э\");\r\n\t\t$latin = array(\r\n\t\t\t\"Shch\",\"Sh\",\"Ch\",\"C\",\"Ju\",\"Ja\",\"Zh\",\"A\",\"B\",\"V\",\"G\",\"D\",\"Je\",\"Jo\",\"Z\",\"I\",\"J\",\"K\",\"L\",\"M\",\"N\",\"O\",\"P\",\"R\",\"S\",\"T\",\"U\",\"F\",\"Kh\",\"\", \"Y\",\"\", \"E\",\r\n\t\t\t\"shch\",\"sh\",\"ch\",\"c\",\"ju\",\"ja\",\"zh\",\"a\",\"b\",\"v\",\"g\",\"d\",\"je\",\"jo\",\"z\",\"i\",\"j\",\"k\",\"l\",\"m\",\"n\",\"o\",\"p\",\"r\",\"s\",\"t\",\"u\",\"f\",\"kh\",\"\", \"y\",\"\", \"e\");\r\n\t\t$str = str_replace($cyrillic, $latin, $str);\r\n\r\n\t\t// Transliterate Czech non-ascii characters\r\n\t\t$from_to = array(\r\n\t\t\t\"á\" => \"a\",\r\n\t\t\t\"Á\" => \"A\",\r\n\t\t\t\"č\" => \"c\",\r\n\t\t\t\"Č\" => \"C\",\r\n\t\t\t\"ď\" => \"d\",\r\n\t\t\t\"Ď\" => \"D\",\r\n\t\t\t\"é\" => \"e\",\r\n\t\t\t\"É\" => \"E\",\r\n\t\t\t\"ě\" => \"e\",\r\n\t\t\t\"Ě\" => \"E\",\r\n\t\t\t\"í\" => \"i\",\r\n\t\t\t\"Í\" => \"I\",\r\n\t\t\t\"ň\" => \"n\",\r\n\t\t\t\"Ň\" => \"N\",\r\n\t\t\t\"ó\" => \"o\",\r\n\t\t\t\"Ó\" => \"O\",\r\n\t\t\t\"ř\" => \"r\",\r\n\t\t\t\"Ř\" => \"R\",\r\n\t\t\t\"ť\" => \"t\",\r\n\t\t\t\"Ť\" => \"T\",\r\n\t\t\t\"ú\" => \"u\",\r\n\t\t\t\"Ú\" => \"U\",\r\n\t\t\t\"ů\" => \"u\",\r\n\t\t\t\"Ů\" => \"U\",\r\n\t\t\t\"ý\" => \"y\",\r\n\t\t\t\"Ý\" => \"Y\",\r\n\t\t);\r\n\t\t$str = strtr($str, $from_to);\r\n\r\n\t\t// Translitetrate German characters\r\n\t\t$from_to = array (\r\n\t\t\t'ä' => 'ae',\r\n\t\t\t'ë' => 'e',\r\n\t\t\t'ï' => 'i',\r\n\t\t\t'ö' => 'oe',\r\n\t\t\t'ü' => 'ue',\r\n\t\t\t'Ä' => 'Ae',\r\n\t\t\t'Ë' => 'E',\r\n\t\t\t'Ï' => 'I',\r\n\t\t\t'Ö' => 'Oe',\r\n\t\t\t'Ü' => 'Ue',\r\n\t\t\t'ß' => 'ss',\r\n\t\t);\r\n\t\t$str = strtr($str, $from_to);\r\n\r\n\t\t// Translitetrate French characters\r\n\t\t$from_to = array (\r\n\t\t\t'â' => 'a',\r\n\t\t\t'ê' => 'e',\r\n\t\t\t'î' => 'i',\r\n\t\t\t'ô' => 'o',\r\n\t\t\t'û' => 'u',\r\n\t\t\t'Â' => 'A',\r\n\t\t\t'Ê' => 'E',\r\n\t\t\t'Î' => 'I',\r\n\t\t\t'Ô' => 'O',\r\n\t\t\t'Û' => 'U',\r\n\t\t\t'œ' => 'oe',\r\n\t\t\t'æ' => 'ae',\r\n\t\t\t'Ÿ' => 'Y',\r\n\t\t\t'ç' => 'c',\r\n\t\t\t'Ç' => 'C',\r\n\t\t);\r\n\t\t$str = strtr($str, $from_to);\r\n\r\n\t\t// Translitetrate Hungarian characters\r\n\t\t$from_to = array (\r\n\t\t\t'á' => 'a',\r\n\t\t\t'é' => 'e',\r\n\t\t\t'í' => 'i',\r\n\t\t\t'ó' => 'o',\r\n\t\t\t'ö' => 'o',\r\n\t\t\t'ő' => 'o',\r\n\t\t\t'ú' => 'u',\r\n\t\t\t'ü' => 'u',\r\n\t\t\t'ű' => 'u',\r\n\t\t);\r\n\t\t$str = strtr($str, $from_to);\r\n\r\n\t\t// Translitetrate Polish characters\r\n\t\t$from_to = array (\r\n\t\t\t'ą' => 'a',\r\n\t\t\t'ę' => 'e',\r\n\t\t\t'ó' => 'o',\r\n\t\t\t'ć' => 'c',\r\n\t\t\t'ł' => 'l',\r\n\t\t\t'ń' => 'n',\r\n\t\t\t'ś' => 's',\r\n\t\t\t'ż' => 'z',\r\n\t\t\t'ź' => 'z',\r\n\t\t\t'Ó' => 'O',\r\n\t\t\t'Ć' => 'C',\r\n\t\t\t'Ł' => 'L',\r\n\t\t\t'Ś' => 'S',\r\n\t\t\t'Ż' => 'Z',\r\n\t\t\t'Ź' => 'Z'\r\n\t\t);\r\n\t\t$str = strtr($str, $from_to);\r\n\r\n\t\t// Translitetrate Danish characters\r\n\t\t$from_to = array (\r\n\t\t\t'æ' => 'ae',\r\n\t\t\t'ø' => 'oe',\r\n\t\t\t'å' => 'aa',\r\n\t\t\t'Æ' => 'Ae',\r\n\t\t\t'Ø' => 'Oe',\r\n\t\t\t'Å' => 'Aa'\r\n\t\t);\r\n\t\t$str = strtr($str, $from_to);\r\n\r\n\t\t// Translitetrate Croatian characters\r\n\t\t$from_to = array (\r\n\t\t\t'Č' => 'C',\r\n\t\t\t'Ć' => 'C',\r\n\t\t\t'Ž' => 'Z',\r\n\t\t\t'Š' => 'S',\r\n\t\t\t'Đ' => 'D',\r\n\t\t\t'č' => 'c',\r\n\t\t\t'ć' => 'c',\r\n\t\t\t'ž' => 'z',\r\n\t\t\t'š' => 's',\r\n\t\t\t'đ' => 'd',\r\n\t\t);\r\n\t\t$str = strtr($str, $from_to);\r\n\r\n\t\t// Translitetrate Slovak characters\r\n\t\t$from_to = array (\r\n\t\t\t'á' => 'a',\r\n\t\t\t'Á' => 'A',\r\n\t\t\t'ä' => 'a',\r\n\t\t\t'Ä' => 'A',\r\n\t\t\t'č' => 'c',\r\n\t\t\t'Č' => 'C',\r\n\t\t\t'ď' => 'd',\r\n\t\t\t'Ď' => 'D',\r\n\t\t\t'é' => 'e',\r\n\t\t\t'É' => 'E',\r\n\t\t\t'í' => 'i',\r\n\t\t\t'Í' => 'I',\r\n\t\t\t'ĺ' => 'l',\r\n\t\t\t'Ĺ' => 'L',\r\n\t\t\t'ľ' => 'l',\r\n\t\t\t'Ľ' => 'L',\r\n\t\t\t'ň' => 'n',\r\n\t\t\t'Ň' => 'N',\r\n\t\t\t'ó' => 'o',\r\n\t\t\t'Ó' => 'O',\r\n\t\t\t'ô' => 'o',\r\n\t\t\t'Ô' => 'O',\r\n\t\t\t'ŕ' => 'r',\r\n\t\t\t'Ŕ' => 'R',\r\n\t\t\t'š' => 's',\r\n\t\t\t'Š' => 'S',\r\n\t\t\t'ť' => 't',\r\n\t\t\t'Ť' => 'T',\r\n\t\t\t'ú' => 'u',\r\n\t\t\t'Ú' => 'U',\r\n\t\t\t'Ý' => 'Y',\r\n\t\t\t'ý' => 'y',\r\n\t\t\t'ž' => 'z',\r\n\t\t\t'Ž' => 'Z',\r\n\t\t);\r\n\t\t$str = strtr($str, $from_to);\r\n\r\n\t\t// Translitetrate Georgian characters\r\n\t\t$from_to = array (\r\n\t\t\t'ა' => 'a',\r\n\t\t\t'ბ' => 'b',\r\n\t\t\t'გ' => 'g',\r\n\t\t\t'დ' => 'd',\r\n\t\t\t'ე' => 'e',\r\n\t\t\t'ვ' => 'v',\r\n\t\t\t'ზ' => 'z',\r\n\t\t\t'თ' => 't',\r\n\t\t\t'ი' => 'i',\r\n\t\t\t'კ' => 'k',\r\n\t\t\t'ლ' => 'l',\r\n\t\t\t'მ' => 'm',\r\n\t\t\t'ნ' => 'n',\r\n\t\t\t'ო' => 'o',\r\n\t\t\t'პ' => 'p',\r\n\t\t\t'ჟ' => 'zh',\r\n\t\t\t'რ' => 'r',\r\n\t\t\t'ს' => 's',\r\n\t\t\t'ტ' => 't',\r\n\t\t\t'უ' => 'u',\r\n\t\t\t'ფ' => 'p',\r\n\t\t\t'ქ' => 'k',\r\n\t\t\t'ღ' => 'gh',\r\n\t\t\t'ყ' => 'q',\r\n\t\t\t'შ' => 'sh',\r\n\t\t\t'ჩ' => 'ch',\r\n\t\t\t'ც' => 'ts',\r\n\t\t\t'ძ' => 'dz',\r\n\t\t\t'წ' => 'ts',\r\n\t\t\t'ჭ' => 'ch',\r\n\t\t\t'ხ' => 'kh',\r\n\t\t\t'ჯ' => 'j',\r\n\t\t\t'ჰ' => 'h',\r\n\t\t);\r\n\t\t$str = strtr($str, $from_to);\r\n\r\n\t\t// $str = mb_convert_encoding($str, \"HTML-ENTITIES\", \"UTF-8\");\r\n\t\treturn $str;\r\n\t}", "title": "" }, { "docid": "eb400b58c3a9045f4b3b01c7ddb6316b", "score": "0.5283957", "text": "public static function guessLocale() : string {\n\t\tif(session_status() !== PHP_SESSION_ACTIVE) {\n\t\t\tthrow(new SessionNotActiveException(\"session inactive\"));\n\t\t}\n\n\t\t// read the default settings\n\t\t$config = readConfig(\"/etc/apache2/encrypted-config/deepdivedylan-mx.ini\");\n\t\t$locales = json_decode($config[\"locales\"]);\n\t\t$locale = $locales->default;\n\n\t\t// first, try the session\n\t\tif(session_status() !== PHP_SESSION_ACTIVE) {\n\t\t\t$locale = $_SESSION[\"locale\"];\n\t\t} else if(empty($_COOKIE[\"locale\"]) === false) {\n\t\t\t// then, try the cookie\n\t\t\t$locale = trim(filter_input(INPUT_COOKIE, \"locale\", FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES));\n\t\t} else if(empty($_GET[\"locale\"]) === false) {\n\t\t\t// then try a get parameter\n\t\t\t$locale = trim(filter_input(INPUT_GET, \"locale\", FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES));\n\t\t} else {\n\t\t\t// search the Accept-Language array and compare to supported languages\n\t\t\t$acceptedLocale = \\Locale::acceptFromHttp($_SERVER[\"HTTP_ACCEPT_LANGUAGE\"]);\n\t\t\t$resultLocales = array_filter($locales->supported, function(string $language) use ($acceptedLocale) {\n\t\t\t\treturn(substr($acceptedLocale, 0, 2) === substr($language, 0, 2));\n\t\t\t});\n\t\t\t$locale = $resultLocales[0] ?? $locales->default;\n\t\t}\n\n\t\t// return the found locale if it exists\n\t\t$locale = self::validateLocale($locale) ? $locale : $locales->default;\n\t\treturn($locale);\n\t}", "title": "" }, { "docid": "d6c30c0736703c2b55fbc4c02bcff5ac", "score": "0.5281365", "text": "public static function initLocale(){\n\t\tLocale::getApplication();\n\t}", "title": "" }, { "docid": "e0bc66440625973e76e677cb47ca6f63", "score": "0.5275706", "text": "private static function _prepareLocale($locale, $strict = false)\n {\n if ($locale instanceof Zend_Locale) {\n $locale = $locale->toString();\n }\n\n if (is_array($locale)) {\n return '';\n }\n\n if (empty(self::$_auto) === true) {\n self::$_browser = self::getBrowser();\n self::$_environment = self::getEnvironment();\n self::$_breakChain = true;\n self::$_auto = self::getBrowser() + self::getEnvironment() + self::getDefault();\n }\n\n if (!$strict) {\n if ($locale === 'browser') {\n $locale = self::$_browser;\n }\n\n if ($locale === 'environment') {\n $locale = self::$_environment;\n }\n\n if ($locale === 'default') {\n $locale = self::$_default;\n }\n\n if (($locale === 'auto') or ($locale === null)) {\n $locale = self::$_auto;\n }\n\n if (is_array($locale) === true) {\n $locale = key($locale);\n }\n }\n\n // This can only happen when someone extends Zend_Locale and erases the default\n if ($locale === null) {\n #require_once 'Zend/Locale/Exception.php';\n throw new Zend_Locale_Exception('Autodetection of Locale has been failed!');\n }\n\n if (strpos($locale, '-') !== false) {\n $locale = strtr($locale, '-', '_');\n }\n\n $parts = explode('_', $locale);\n if (!isset(self::$_localeData[$parts[0]])) {\n if ((count($parts) == 1) && array_key_exists($parts[0], self::$_territoryData)) {\n return self::$_territoryData[$parts[0]];\n }\n\n return '';\n }\n\n foreach($parts as $key => $value) {\n if ((strlen($value) < 2) || (strlen($value) > 3)) {\n unset($parts[$key]);\n }\n }\n\n $locale = implode('_', $parts);\n return (string) $locale;\n }", "title": "" }, { "docid": "d7ee4237650180312f892178e7c12dea", "score": "0.526998", "text": "function convertToEnglishDate($date, $formatDate = false) {\n\t\t//print $date;\n\t\t$temp = str_replace('-', '', $date);\n\t\tif (!is_numeric($temp)) {\n\t\t\t$date = $this->NepaliNumber->toggleNumberLang($date, 'english');\n\t\t}\n\t $date = mb_substr($date, 0, 10, 'UTF-8');\n\t//\tprint $date;\n\t\t$convertedDate = $this->getConvertedDate($date, 'nepali');\n\t\t$returnDate = '';\n\t\tif ($formatDate === true) {\n\t\t\t$returnDate = $this->formatNepaliDate($convertedDate, $format);\n\t\t} else {\n\t\t\t$returnDate = substr($convertedDate, 0, 10);\n\t\t}\n\t\treturn $returnDate;\n\t}", "title": "" }, { "docid": "88a44de2dde4e3c7615ca766e8094ec7", "score": "0.52687955", "text": "public function addFallbackLocale($locale);", "title": "" }, { "docid": "ff43df5e85834e1e16f3c209544d8d1f", "score": "0.5268491", "text": "function specialChar_to_english_letters2($txt) {\n $transliterationTable = array('á' => 'a', 'Á' => 'A', 'à' => 'a', 'À' => 'A', '?' => 'a', '?' => 'A', 'â' => 'a', 'Â' => 'A', 'å' => 'a', 'Å' => 'A', 'ã' => 'a', 'Ã' => 'A', '?' => 'a', '?' => 'A', '?' => 'a', '?' => 'A', 'ä' => 'ae', 'Ä' => 'AE', 'æ' => 'ae', 'Æ' => 'AE', '?' => 'b', '?' => 'B', '?' => 'c', '?' => 'C', '?' => 'c', '?' => 'C', '?' => 'c', '?' => 'C', '?' => 'c', '?' => 'C', 'ç' => 'c', 'Ç' => 'C', '?' => 'd', '?' => 'D', '?' => 'd', '?' => 'D', '?' => 'd', '?' => 'D', 'ð' => 'dh', 'Ð' => 'Dh', 'é' => 'e', 'É' => 'E', 'è' => 'e', 'È' => 'E', '?' => 'e', '?' => 'E', 'ê' => 'e', 'Ê' => 'E', '?' => 'e', '?' => 'E', 'ë' => 'e', 'Ë' => 'E', '?' => 'e', '?' => 'E', '?' => 'e', '?' => 'E', '?' => 'e', '?' => 'E', '?' => 'f', '?' => 'F', 'ƒ' => 'f', '?' => 'F', '?' => 'g', '?' => 'G', '?' => 'g', '?' => 'G', '?' => 'g', '?' => 'G', '?' => 'g', '?' => 'G', '?' => 'h', '?' => 'H', '?' => 'h', '?' => 'H', 'í' => 'i', 'Í' => 'I', 'ì' => 'i', 'Ì' => 'I', 'î' => 'i', 'Î' => 'I', 'ï' => 'i', 'Ï' => 'I', '?' => 'i', '?' => 'I', '?' => 'i', '?' => 'I', '?' => 'i', '?' => 'I', '?' => 'j', '?' => 'J', '?' => 'k', '?' => 'K', '?' => 'l', '?' => 'L', '?' => 'l', '?' => 'L', '?' => 'l', '?' => 'L', '?' => 'l', '?' => 'L', '?' => 'm', '?' => 'M', '?' => 'n', '?' => 'N', '?' => 'n', '?' => 'N', 'ñ' => 'n', 'Ñ' => 'N', '?' => 'n', '?' => 'N', 'ó' => 'o', 'Ó' => 'O', 'ò' => 'o', 'Ò' => 'O', 'ô' => 'o', 'Ô' => 'O', '?' => 'o', '?' => 'O', 'õ' => 'o', 'Õ' => 'O', 'ø' => 'oe', 'Ø' => 'OE', '?' => 'o', '?' => 'O', '?' => 'o', '?' => 'O', 'ö' => 'oe', 'Ö' => 'OE', '?' => 'p', '?' => 'P', '?' => 'r', '?' => 'R', '?' => 'r', '?' => 'R', '?' => 'r', '?' => 'R', '?' => 's', '?' => 'S', '?' => 's', '?' => 'S', 'š' => 's', 'Š' => 'S', '?' => 's', '?' => 'S', '?' => 's', '?' => 'S', '?' => 's', '?' => 'S', 'ß' => 'SS', '?' => 't', '?' => 'T', '?' => 't', '?' => 'T', '?' => 't', '?' => 'T', '?' => 't', '?' => 'T', '?' => 't', '?' => 'T', 'ú' => 'u', 'Ú' => 'U', 'ù' => 'u', 'Ù' => 'U', '?' => 'u', '?' => 'U', 'û' => 'u', 'Û' => 'U', '?' => 'u', '?' => 'U', '?' => 'u', '?' => 'U', '?' => 'u', '?' => 'U', '?' => 'u', '?' => 'U', '?' => 'u', '?' => 'U', '?' => 'u', '?' => 'U', 'ü' => 'ue', 'Ü' => 'UE', '?' => 'w', '?' => 'W', '?' => 'w', '?' => 'W', '?' => 'w', '?' => 'W', '?' => 'w', '?' => 'W', 'ý' => 'y', 'Ý' => 'Y', '?' => 'y', '?' => 'Y', '?' => 'y', '?' => 'Y', 'ÿ' => 'y', 'Ÿ' => 'Y', '?' => 'z', '?' => 'Z', 'ž' => 'z', 'Ž' => 'Z', '?' => 'z', '?' => 'Z', 'þ' => 'th', 'Þ' => 'Th', 'µ' => 'u', '?' => 'a', '?' => 'a', '?' => 'b', '?' => 'b', '?' => 'v', '?' => 'v', '?' => 'g', '?' => 'g', '?' => 'd', '?' => 'd', '?' => 'e', '?' => 'E', '?' => 'e', '?' => 'E', '?' => 'zh', '?' => 'zh', '?' => 'z', '?' => 'z', '?' => 'i', '?' => 'i', '?' => 'j', '?' => 'j', '?' => 'k', '?' => 'k', '?' => 'l', '?' => 'l', '?' => 'm', '?' => 'm', '?' => 'n', '?' => 'n', '?' => 'o', '?' => 'o', '?' => 'p', '?' => 'p', '?' => 'r', '?' => 'r', '?' => 's', '?' => 's', '?' => 't', '?' => 't', '?' => 'u', '?' => 'u', '?' => 'f', '?' => 'f', '?' => 'h', '?' => 'h', '?' => 'c', '?' => 'c', '?' => 'ch', '?' => 'ch', '?' => 'sh', '?' => 'sh', '?' => 'sch', '?' => 'sch', '?' => '', '?' => '', '?' => 'y', '?' => 'y', '?' => '', '?' => '', '?' => 'e', '?' => 'e', '?' => 'ju', '?' => 'ju', '?' => 'ja', '?' => 'ja');\n return str_replace(array_keys($transliterationTable), array_values($transliterationTable), $txt);\n}", "title": "" }, { "docid": "b7502ffbec7b5dee4e1b13a852c98b54", "score": "0.5267046", "text": "function vodi_number_format_i18n( $n ) {\n $n = ( 0 + str_replace( \",\", \"\", $n ) );\n\n // is this a number?\n if( ! is_numeric( $n ) ) {\n return $n;\n }\n\n // now filter it;\n if( $n >= 1000000000000 ) {\n return round( ( $n/1000000000000 ), 1 ) . 'T';\n } elseif( $n >= 1000000000 ) {\n return round( ( $n/1000000000 ), 1 ) . 'B';\n } elseif( $n >= 1000000 ) {\n return round( ( $n/1000000 ), 1 ) . 'M';\n } elseif( $n >= 1000 ) {\n return round( ( $n/1000 ), 1 ) . 'K';\n }\n\n return number_format_i18n( $n );\n}", "title": "" }, { "docid": "3628ceeea3279e6f79fb719dc64be62a", "score": "0.52594316", "text": "function browser_language($locale){\n\n /* Can we get an idea of visitors browser language. */\n if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])):\n\n /* Get the first two letters. */\n $locale = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);\n\n /* Is that Spanish? */\n $locale = 'es' === $locale ? 'es_ES' : 'en_EN';\n\n /* Return new locale. */\n return $locale;\n\n endif;\n\n /* Return what we were given. */\n return $locale;\n }", "title": "" }, { "docid": "816f86a8b0a21ab6ad4a8a6d1ef844f9", "score": "0.5256736", "text": "public function setLocale(string $locale)\n {\n }", "title": "" }, { "docid": "0ea05d1122ec83e923d6dd52cc8800a2", "score": "0.52553123", "text": "public function International()\n {\n return $this->Format(PhoneNumberFormat::INTERNATIONAL);\n }", "title": "" }, { "docid": "58ceb5faf3c6dcfc16987d1ecf47b0fe", "score": "0.5240964", "text": "public function setupLocale() : void {\n\t\tputenv(\"LANG=\" . $this->locale);\n\t\tsetlocale(LC_ALL, $this->locale);\n\t\tbindtextdomain($this->domain, dirname(__DIR__, 2) . \"/locale\");\n\t\tbind_textdomain_codeset($this->domain, \"UTF-8\");\n\t\ttextdomain($this->domain);\n\t}", "title": "" }, { "docid": "71a277ff360151120d09e966b84faa03", "score": "0.52377933", "text": "public static function translate() {\n //Translate a human string to time\n }", "title": "" }, { "docid": "b271dbdb1535c1de15b68eedd7fa783f", "score": "0.52176374", "text": "private function set_locale() {\n\n $plugin_i18n = new Sms_Service_Twilio_i18n();\n\n $this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );\n\n }", "title": "" }, { "docid": "6a96305b61d64701493d12cee464b4ea", "score": "0.52151877", "text": "function standardize_amount($amount)\n{\n $CI =& get_instance();\n $thousands_separator = $CI->mdl_settings->setting('thousands_separator');\n $decimal_point = $CI->mdl_settings->setting('decimal_point');\n\n $amount = str_replace($thousands_separator, '', $amount);\n $amount = str_replace($decimal_point, '.', $amount);\n\n return $amount;\n}", "title": "" }, { "docid": "2d848ef5f9d7c4fa1439d5ec5be07384", "score": "0.5213675", "text": "private function set_locale() {\n\n $plugin_i18n = new VisualBudget_i18n();\n\n $this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );\n\n }", "title": "" }, { "docid": "fbaeb75f2da22ae9aca8949bc546457a", "score": "0.5211551", "text": "private function normalize_string( string $in ) : string\n {\n $search = array( 'á','é','í','ó','ú','ü','A','É','Í','Ó','Ú','Ü');\n $replace = array('a','e','i','o','u','u','A','E','I','O','U','U');\n \n return strtolower(str_replace($search, $replace, $in));\n \n }", "title": "" } ]
1975453505a0365b09a2612a2a0fd929
Makes a value unindexed
[ { "docid": "0e08d119ff3192c1d753d4243825081e", "score": "0.0", "text": "protected function removeFromIndex($scope, $code)\n {\n $indexedValues = $this->getIndexedValues();\n $this->ensureIndexedValueMapInitialized($indexedValues);\n $mapKey = $scope . '!' . $code;\n if (isset($this->indexedValueMap[$mapKey])) {\n foreach ($indexedValues as $indexKey => $indexedValue) {\n if ($indexedValue->getScope() === $scope && $indexedValue->getCode() === $code) {\n $indexedValues->remove($indexKey);\n unset($this->indexedValueMap[$mapKey]);\n break;\n }\n }\n }\n\n return $this;\n }", "title": "" } ]
[ { "docid": "fa7947693d928a0ec23fc1b7b85f4339", "score": "0.6780647", "text": "public function withoutValue($key);", "title": "" }, { "docid": "2a31c0acca970b14c74ceeb50a0ef58f", "score": "0.65510106", "text": "private function deduplicate_unindexed_indexable_rows()\n {\n }", "title": "" }, { "docid": "92698ddf05207996a20c01c511d0625b", "score": "0.64159125", "text": "private function clean_unindexed_indexable_rows_with_no_object_id()\n {\n }", "title": "" }, { "docid": "e5bbf29d9d1d3ec2749200a0ee81356a", "score": "0.63017726", "text": "public function offsetUnset ($index) {}", "title": "" }, { "docid": "e5bbf29d9d1d3ec2749200a0ee81356a", "score": "0.63017726", "text": "public function offsetUnset ($index) {}", "title": "" }, { "docid": "e5bbf29d9d1d3ec2749200a0ee81356a", "score": "0.63017726", "text": "public function offsetUnset ($index) {}", "title": "" }, { "docid": "e5bbf29d9d1d3ec2749200a0ee81356a", "score": "0.63017726", "text": "public function offsetUnset ($index) {}", "title": "" }, { "docid": "3dae5f7b491762315937a240f5b2e819", "score": "0.61804277", "text": "protected function get_noindex_value($meta_value)\n {\n }", "title": "" }, { "docid": "601eb65383f00ce4dd53a4e6353c37a6", "score": "0.61532557", "text": "public function unsetValue($key);", "title": "" }, { "docid": "9ee1417613557a0c6b9d22b6f9f2d3d4", "score": "0.6149729", "text": "public function offsetUnset($index) {}", "title": "" }, { "docid": "ec8e3a13b667cb5b8e21d9cb09442428", "score": "0.61300355", "text": "public function offsetUnset ($index) {\n $this->value = StaticString::substr($this->value, 0, $index) . StaticString::substr($this->value, $index+1);\n }", "title": "" }, { "docid": "e8f096b25c8746d5cf71c38d0e2dd7a6", "score": "0.6054629", "text": "public function offsetUnset($index);", "title": "" }, { "docid": "7367f2d4ca0d0700b3a9d4e7c24fe1f7", "score": "0.60511047", "text": "abstract protected function unsetValue($key);", "title": "" }, { "docid": "8949ccff17fa22ae99972742c6ba90e1", "score": "0.6043775", "text": "public function offsetUnset($indice) {\n }", "title": "" }, { "docid": "01066055ad60e1fb96a053d2e2061647", "score": "0.5990903", "text": "public function offsetUnset($index) { }", "title": "" }, { "docid": "01066055ad60e1fb96a053d2e2061647", "score": "0.5990903", "text": "public function offsetUnset($index) { }", "title": "" }, { "docid": "2e967b19e92dc7214fbd2c6b60e717ee", "score": "0.5970295", "text": "public function removeValue($index)\n {\n $array = $this->getRawValue();\n $i = 0;\n foreach ($array as $key => $value) {\n if ($i == $index) {\n unset($array[$key]);\n break;\n }\n }\n\n $this->setRawValue($array);\n }", "title": "" }, { "docid": "fc19912c084f90752462feb2e1e90016", "score": "0.5966219", "text": "function offsetUnset($index) {\n\t\t$this->setAttr($index, null);\n\t}", "title": "" }, { "docid": "1cb266a6a0fd9bbd24d9a252c97a4f3c", "score": "0.59632266", "text": "function reset_index() {\n $this->_index=array();\n $this->_write_index();\n }", "title": "" }, { "docid": "09051649ab13282f3b8e4132f35c988a", "score": "0.5962661", "text": "protected function _forceNoIndex()\n {\n $this->_blForceNoIndex = true;\n }", "title": "" }, { "docid": "df5f4c7581eb2cf62e0d0822df7b32c4", "score": "0.5944776", "text": "public function reset()\n {\n $this->values[self::_INDEX] = null;\n $this->values[self::_ITEM_ID] = null;\n $this->values[self::_EXP] = null;\n }", "title": "" }, { "docid": "c1aabf9b8bcc6315a239f56cf0eaba66", "score": "0.58570766", "text": "public function noindex()\n\t{\n\t\treturn $this->getValue('noindex');\n\t}", "title": "" }, { "docid": "58e42580e329110aed6aa2de06b1f7c2", "score": "0.5795795", "text": "public function clear_index_indicator() {\n\t\tdelete_option( self::OPTION_INDEX_STATUS );\n\t}", "title": "" }, { "docid": "b2cb40cddc8c559c2890cf9c3a561755", "score": "0.57777923", "text": "abstract public function clear($index);", "title": "" }, { "docid": "b9d413746c394541953a3b2808abc522", "score": "0.57360274", "text": "public function unIndexed(): self\n {\n $this->parameters = array_map(function ($param) {\n return $param->unIndexed();\n }, $this->parameters);\n return $this;\n }", "title": "" }, { "docid": "93c125d55207ee3b0290dc7a704bd14d", "score": "0.57349855", "text": "protected function unmapValue($value) {\n\t\treturn $value;\n\t}", "title": "" }, { "docid": "52bdd560e599465cad17d0732dc32c40", "score": "0.5733955", "text": "public function offsetUnset($index)\n {\n // Is $index scalar?\n if (is_scalar($index)) {\n // unset value\n unset($this->_Storage[$index]);\n }\n }", "title": "" }, { "docid": "d60c94690372da61bd0ae44c907f5fde", "score": "0.5700257", "text": "public function __unset($index)\n {\n if(isset($this->_columns[$index])) unset($this->_columns[$index]);\n }", "title": "" }, { "docid": "d405e6b82c9f30f9be3fbb82d7b11030", "score": "0.56639403", "text": "public function removeIndex($field)\n\t\t{\n\t\t\tunset($this->indexes[$field]);\n\t\t}", "title": "" }, { "docid": "ca02f775431eb49916e071fb1e54d2ab", "score": "0.56527764", "text": "public function offsetUnset($offset)\n\t\t{\n\t\t\tstatic::fail('%s is immutable', typeid($this));\n\t\t}", "title": "" }, { "docid": "3c213104a69608ece1060161b8103fbf", "score": "0.5639031", "text": "public function unsetValues(): void\n {\n $this->values = [];\n }", "title": "" }, { "docid": "892c9874d480bab929c833e4e0b2dcdc", "score": "0.5608568", "text": "public function offsetUnset($offset);", "title": "" }, { "docid": "11088c5bf0a8fcea848393f88298e8b4", "score": "0.5599464", "text": "public function get_unindexed_count()\n {\n }", "title": "" }, { "docid": "98b908c01dcca79dba944979d615836a", "score": "0.5592544", "text": "public function offsetUnset ($object) {}", "title": "" }, { "docid": "02e418e2474f14aa71072ef41aabe8a3", "score": "0.5591377", "text": "public function offsetUnset($offset)\n {\n unset($this->value[$offset]);\n }", "title": "" }, { "docid": "50bf243d7dc090e3da88756f6fd51efe", "score": "0.5558567", "text": "public function unsetCalculationExpression($index)\n {\n unset($this->calculationExpression[$index]);\n }", "title": "" }, { "docid": "a8a9002753e221e3dcbd8c9e155e14a1", "score": "0.55565774", "text": "public function setIndexedField($field)\r\n {\r\n if (!array_key_exists($field, $this->getIndexedFields())) {\r\n $this->indexedFields[$field] = null;\r\n }\r\n }", "title": "" }, { "docid": "69b5132cde40ac1e0efdf97a06dd9f5d", "score": "0.55098665", "text": "public function noindex_map($indexable, $post_meta_key)\n {\n }", "title": "" }, { "docid": "2062a50c8b08c5b47bc3ba9bbe8ee46b", "score": "0.55061114", "text": "public function reset()\n {\n $this->values[self::MATCH] = null;\n $this->values[self::INDEX] = null;\n }", "title": "" }, { "docid": "4a61fd83e78f2a46e84b71b7d4721c29", "score": "0.5502599", "text": "public function offsetUnset($offset) {\n\t\tunset($this->results[$offset]);\n\t}", "title": "" }, { "docid": "e857634b8d1f8d706eeda908db36b56a", "score": "0.54969347", "text": "public function offsetUnset($key);", "title": "" }, { "docid": "46d821967888d078a939bccf518cfbcb", "score": "0.5493431", "text": "public function offsetUnset($index) { throw new Core_ReadOnlyObjectException($this); }", "title": "" }, { "docid": "e8e57d0914199198b2054de486d885de", "score": "0.5478167", "text": "public function __unset($name){\n if( is_array($this->values) && array_key_exists($name, $this->values) )\n unset($this->values[$name]);\n elseif( is_object($this->values) )\n unset($this->values->{$name});\n }", "title": "" }, { "docid": "25b014477a1027ffc5389c4e1945c7ee", "score": "0.5476569", "text": "function offsetUnset($offset)\n {\n // TODO: implement the function ArrayAccess::offsetUnset\n }", "title": "" }, { "docid": "906d9c484153471a3ac42a70f77aadc5", "score": "0.5475237", "text": "public function offsetUnset($index) { unset($this->later[$index]); }", "title": "" }, { "docid": "d16cea37d988a60b8d4dd5260a95c193", "score": "0.54635996", "text": "public function __unset( $name )\n\t{\n\t\tif( !array_key_exists( $name, $this->values ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tunset( $this->values[$name] );\n\t\t$this->modified = true;\n\t}", "title": "" }, { "docid": "fa601e2528e056b6bad859378baf512d", "score": "0.54541403", "text": "public function removeIndex(string $name);", "title": "" }, { "docid": "a91d475ad2acb505930caa47723808a8", "score": "0.5451265", "text": "private function setIndexedArray(&$arr)\n {\n $arr = array_values($arr);\n }", "title": "" }, { "docid": "d87caba888a4da810c7216a11e3e5ed5", "score": "0.5438165", "text": "public function unsetItem($index)\n {\n unset($this->item[$index]);\n }", "title": "" }, { "docid": "d87caba888a4da810c7216a11e3e5ed5", "score": "0.5438165", "text": "public function unsetItem($index)\n {\n unset($this->item[$index]);\n }", "title": "" }, { "docid": "9d5ce857a9ed18c8615b7d4ed1bff471", "score": "0.5435373", "text": "public function offsetUnset ( $index )\r\n\t{\r\n\t\t$l = strtoupper($GLOBALS['CONFIG']['LANGUAGE']);\r\n\t\tif( isset($this->data[$l][$index]) )\r\n\t\t\tunset($this->data[$l][$index]);\r\n\t}", "title": "" }, { "docid": "3580e59641f9bc75e9ea9e91db8cf705", "score": "0.54348105", "text": "public function unsetNationality($index)\n {\n unset($this->nationality[$index]);\n }", "title": "" }, { "docid": "8a5e1c120bafb308c86c983e10893eeb", "score": "0.54197526", "text": "public function reset( $idx ) {\n $this->record = [];\n if ( is_numeric($idx) ) $this->load( $idx );\n else if ( is_array( $idx ) ) $this->record = $idx;\n\n return $this;\n }", "title": "" }, { "docid": "853fc60c64aaf04a4d5ca36b7988dbd9", "score": "0.54006845", "text": "public function remove_indexable_rows_for_non_public_taxonomies()\n {\n }", "title": "" }, { "docid": "4280303ea31971f436287249db495ed9", "score": "0.53990895", "text": "public function offsetUnset($offset)\n {\n \n }", "title": "" }, { "docid": "1a41fa0d36e71e571b8208f53824b339", "score": "0.53988934", "text": "public function __unset(string $name)\n {\n if ($name === 'key' || $name === 'value') {\n $this->$name = null;\n return;\n }\n throw new OutOfBoundsException();\n }", "title": "" }, { "docid": "4ce8b10dbddd6cd2c0e5c5e50f8a2fe0", "score": "0.5394493", "text": "public function unsetWeight($index)\n {\n unset($this->weight[$index]);\n }", "title": "" }, { "docid": "ac6459484dc9d62ad6908bdffc37c03b", "score": "0.53745306", "text": "function strip_numeric_indexes(&$a) \n{\n\t$result = array();\n\tforeach($a as $id_key => $value)\n\t{\n\t\tif(!is_numeric($id_key)) $result[strtoupper($id_key)] = $value;\n\t}\n\treturn $result;\n}", "title": "" }, { "docid": "b6c84a24c73fc3c121afe73f10cd44c4", "score": "0.5371621", "text": "public function offsetUnset($offset) {\n\t\tthrow new LogicException('Unable to unset offset: MustacheLoader is an immutable ArrayAccess object.');\n\t}", "title": "" }, { "docid": "9723de90eec5662612a7dd8d96ec118b", "score": "0.53681016", "text": "public function remove(int $index): static;", "title": "" }, { "docid": "784824b6997c3f9130e3af6a073172a5", "score": "0.5367088", "text": "public function get_total_unindexed()\n {\n }", "title": "" }, { "docid": "784824b6997c3f9130e3af6a073172a5", "score": "0.5367088", "text": "public function get_total_unindexed()\n {\n }", "title": "" }, { "docid": "a7e29733467da29850fa81a5b7fe0587", "score": "0.5366484", "text": "public function removeMark(int $index): void\n\t{\n\t\tif ($this->checkIndex($index)) {\n\t\t\t// on supprime l'index du tableau\n\t\t\tunset($this->marks[$index]);\n\t\t\t// On remet en forme les index du tableau\n\t\t\t$this->marks = array_values($this->marks);\n\t\t\t// On recalcul la moyenne\n\t\t\t$this->Average();\n\t\t}\n\t}", "title": "" }, { "docid": "784824b6997c3f9130e3af6a073172a5", "score": "0.53659904", "text": "public function get_total_unindexed()\n {\n }", "title": "" }, { "docid": "784824b6997c3f9130e3af6a073172a5", "score": "0.53659904", "text": "public function get_total_unindexed()\n {\n }", "title": "" }, { "docid": "784824b6997c3f9130e3af6a073172a5", "score": "0.5365519", "text": "public function get_total_unindexed()\n {\n }", "title": "" }, { "docid": "784824b6997c3f9130e3af6a073172a5", "score": "0.5365519", "text": "public function get_total_unindexed()\n {\n }", "title": "" }, { "docid": "784824b6997c3f9130e3af6a073172a5", "score": "0.5365519", "text": "public function get_total_unindexed()\n {\n }", "title": "" }, { "docid": "cce6ce1879bf576ca57fe08b26ec7751", "score": "0.53642803", "text": "public function offsetUnset($index) { $this->remove($index); }", "title": "" }, { "docid": "8899e11eae0a17bbf59dc5401968a797", "score": "0.53497684", "text": "function removeAt($index);", "title": "" }, { "docid": "1ecd30191ee6b3eb8b00723882147c06", "score": "0.53485364", "text": "function _clearindex(){\n _quietecho(\"Clearing index... \");\n idx_get_indexer()->clear();\n _quietecho(\"done.\\n\");\n}", "title": "" }, { "docid": "b6c22a656b0676545f7bcf294e8a5fcc", "score": "0.5341907", "text": "public function unsetDeletedField($index)\n {\n unset($this->deletedField[$index]);\n }", "title": "" }, { "docid": "846a4cbf3572bb65fd617915ddbc53ea", "score": "0.5339414", "text": "public function disableIndex()\n {\n $this->index = false;\n }", "title": "" }, { "docid": "42d8eeba8da486c40c31238c3d8aab57", "score": "0.5335775", "text": "public function remove_indexable_rows_for_non_public_post_types()\n {\n }", "title": "" }, { "docid": "146b522ed8a7866f9d6b73715a63ada6", "score": "0.5325309", "text": "public function clearUnactualIndexes()\n {\n $sql = new DbQuery();\n $sql->select('id');\n $sql->from('smogbuster');\n $sql->where('updated_at < \\''.$this->updatedAt.'\\'');\n $ids = Db::getInstance()->executeS($sql);\n if (is_array($ids) && count($ids) > 0) {\n foreach ($ids as &$id) {\n $id = $id['id'];\n }\n $ids = implode(', ', $ids);\n\n $data = [\n 'st' => $this->emptyIndexDef,\n 'so2' => $this->emptyIndexDef,\n 'no2' => $this->emptyIndexDef,\n 'co' => $this->emptyIndexDef,\n 'pm10' => $this->emptyIndexDef,\n 'pm25' => $this->emptyIndexDef,\n 'o3' => $this->emptyIndexDef,\n 'c6h6' => $this->emptyIndexDef,\n ];\n $this->getDb()->update('smogbuster', $data, 'id IN ('.$ids.')');\n }\n }", "title": "" }, { "docid": "b9651e7d89bc4a2c804bcbb5d493f88b", "score": "0.532224", "text": "public function unsetSpecialTerms($index)\n {\n unset($this->specialTerms[$index]);\n }", "title": "" }, { "docid": "88ca36068ac81b9b8e142b10b197e7dc", "score": "0.5293542", "text": "final public function offsetUnset($offset)\n\t{\n\t\tthrow new Kohana_Exception('Database results are read-only');\n\t}", "title": "" }, { "docid": "95358a661b24dd004749f407da9a5502", "score": "0.52848935", "text": "public function __unset($key)\n\t\t{\n\t\t\tif (array_key_exists($key, $this->values))\n\t\t\t\tunset($this->values[$key]);\n\t\t}", "title": "" }, { "docid": "83699b581facc031da479b5ffc9322e8", "score": "0.5279649", "text": "public function offsetUnset($offset) {\n\t\tunset($this->_properties[$offset]);\n\t}", "title": "" }, { "docid": "450bdc53881a13f76f5d8af6a9de58f0", "score": "0.52738285", "text": "public function offsetUnset($offset)\n {\n $this->propertyValues->drop($offset);\n }", "title": "" }, { "docid": "01fb26b8b0aa5a851d439464c4c141d5", "score": "0.5273216", "text": "public function import_noindex($noindex, $mapping)\n {\n }", "title": "" }, { "docid": "e4e4fb673de55febfdf3dab3f29256ad", "score": "0.52673453", "text": "public function unsetAccess($index)\n {\n unset($this->access[$index]);\n }", "title": "" }, { "docid": "7553ebc5af0fb0283b97aadab6239599", "score": "0.5264077", "text": "public function get_total_unindexed();", "title": "" }, { "docid": "c9d19d63061a6d043d5d328211884654", "score": "0.5260491", "text": "public function offsetUnset($offset) {\n\t\tunset($this->_array[$offset]);\n\t}", "title": "" }, { "docid": "9dc6ffcc0c0f6171b929d223184aab0c", "score": "0.52555597", "text": "public function unsetInstrumentType($index)\n {\n unset($this->instrumentType[$index]);\n }", "title": "" }, { "docid": "dd2849a07b21daae93299bbfc3bef0d0", "score": "0.5248751", "text": "public function unsetCode($index)\n {\n unset($this->code[$index]);\n }", "title": "" }, { "docid": "571f7855626e2463c4f55b30e6b47fb7", "score": "0.52484196", "text": "public function testOffsetUnsetThrowsExceptionOnNumericKey(ArrayAccess $obj)\n {\n $this->expectException(InvalidArgumentException::class);\n unset($obj[0]);\n }", "title": "" }, { "docid": "59a1c77d5258b493b1bd4586e6100a4b", "score": "0.5242885", "text": "public function offsetUnset($offset)\n {\n }", "title": "" }, { "docid": "59a1c77d5258b493b1bd4586e6100a4b", "score": "0.5242885", "text": "public function offsetUnset($offset)\n {\n }", "title": "" }, { "docid": "59a1c77d5258b493b1bd4586e6100a4b", "score": "0.5242885", "text": "public function offsetUnset($offset)\n {\n }", "title": "" }, { "docid": "59a1c77d5258b493b1bd4586e6100a4b", "score": "0.5242885", "text": "public function offsetUnset($offset)\n {\n }", "title": "" }, { "docid": "2e6811648cc85bccdb7c4c3d240e79d7", "score": "0.52348006", "text": "public function offsetUnset($offset) {\n\t\t\t$this->removeKey($offset);\n\t\t}", "title": "" }, { "docid": "d98644af176cb79d835bb4577b5554d1", "score": "0.523471", "text": "public function offsetUnset($offset)\n {\n $this->unsetAttribute($offset);\n }", "title": "" }, { "docid": "252df00d80690aaac87e2b8cb117a15d", "score": "0.52295846", "text": "function array_unique_noindex($old){\n\t/*\n\tSummary:\n\t\tLike the native array_unique, but does not maintain index values\n\n\tUsage:\n\t\tarray_unique_noindex(array old)\n\n\tReturns:\n\t\told array with unique values\n\t*/\n\n\t$new = array();\n\tfor($i=0;$i<count($old);++$i){\n\t\tif(in_array($old[$i], $new) != \"true\"){\n\t\t\t$new[] = $old[$i];\n\t\t}\n\t}\n\treturn $new;\n}", "title": "" }, { "docid": "59d4d2877442223e7ac776859d245ce9", "score": "0.5224595", "text": "protected function get_robots_noindex($value)\n {\n }", "title": "" }, { "docid": "1f30c159db1ddbd82a0e37b5e0c9f281", "score": "0.52231896", "text": "public function offsetUnset($offset)\n {\n \t$this->remove($offset);\n }", "title": "" }, { "docid": "a20edad2af4d428f064f6ba44c763b9d", "score": "0.5221985", "text": "public function unsetUniqueKey() {\n\t\t$this->unique_key = [];\n\t}", "title": "" }, { "docid": "f1d84d7bfdf210cb7b137172293423c5", "score": "0.52205086", "text": "public function valueReset(): static;", "title": "" }, { "docid": "2505b77cf489e3ae9d7b0206973a1d39", "score": "0.5215723", "text": "public function unSetStaticRankingExpression()\n {\n\t\t$this->setStandardParameter(SearchParameter::$STATIC_RANKING_EXPRESSION, \"\");\n\t}", "title": "" }, { "docid": "8c84eef94cae7e9bf20a91e47366c34e", "score": "0.5208645", "text": "protected function create_no_index_filter()\n {\n }", "title": "" }, { "docid": "4af84a8eede9f748aeb8e5000f4b70c8", "score": "0.52025723", "text": "public function unsetCurrentEntry() {\n unset($this->collection[$this->position]);\n $this->collection = array_values($this->collection);\n }", "title": "" } ]
034eba8c30ff8625767ed751b516aefc
Exclude object from result
[ { "docid": "af6fbd060913634ab15870cdb07ee8b6", "score": "0.0", "text": "public function prune($website = null)\n {\n if ($website) {\n $this->addUsingAlias(WebsiteTableMap::COL_ID, $website->getId(), Criteria::NOT_EQUAL);\n }\n\n return $this;\n }", "title": "" } ]
[ { "docid": "87481cc16a95120f07bbe464371fb110", "score": "0.7681368", "text": "public function _exclude()\n {\n /*if($this->_object->id ) {\n return array(\"id\" => $this->_object->getId());\n } else {\n return array();\n }*/\n }", "title": "" }, { "docid": "d5f81226d122903c47d04895127f786e", "score": "0.7178882", "text": "public function getExcludeObjects()\n {\n return $this->exclude_objects;\n }", "title": "" }, { "docid": "7869c975bed4fe508df1984ac08564d4", "score": "0.66654503", "text": "protected function getExcludeFields() {}", "title": "" }, { "docid": "4c4f7b319507cf25cd00a1f8f9695630", "score": "0.6495181", "text": "public function exclude() {\n\t\t$this->_exclude = TRUE;\n\t}", "title": "" }, { "docid": "695a9ad8105106538a3347e1e93f5f07", "score": "0.63708496", "text": "public function shouldIgnore();", "title": "" }, { "docid": "d41e5045eac1bfb67a385b653cce1450", "score": "0.6298873", "text": "public function excludeReification()\n {\n $this->params[\"include_reification\"] = \"False\";\n \n return($this);\n }", "title": "" }, { "docid": "b70a58564014a853542e67d5babdb839", "score": "0.6273307", "text": "protected function getDoktypeExcludeWhere() {}", "title": "" }, { "docid": "d97d651cd6e5dcd7f79bad7d409f5142", "score": "0.62107784", "text": "public function not() {\n $collection = clone $this;\n foreach(func_get_args() as $uri) {\n if(is_array($uri) or $uri instanceof Traversable) {\n foreach($uri as $u) {\n $collection = $collection->not($u);\n }\n } else if(is_a($uri, 'Page')) {\n // unset by Page object\n unset($collection->data[$uri->id()]);\n } else if(isset($collection->data[$uri])) {\n // unset by URI\n unset($collection->data[$uri]);\n } else if($page = $collection->findBy('uid', $uri)) {\n // unset by UID\n unset($collection->data[$page->id()]);\n }\n }\n return $collection;\n }", "title": "" }, { "docid": "449c68b2d6f16e957fb43fa25746a255", "score": "0.61143297", "text": "protected function getExcluded()\n\t{\n\t\treturn null;\n\t}", "title": "" }, { "docid": "449c68b2d6f16e957fb43fa25746a255", "score": "0.61143297", "text": "protected function getExcluded()\n\t{\n\t\treturn null;\n\t}", "title": "" }, { "docid": "7a470e2ea1a0a34f6e83857384ff5ad7", "score": "0.60281223", "text": "public function getAllowedExcludeFields() {}", "title": "" }, { "docid": "499cb303460f7cdabba818334fff7c51", "score": "0.60165423", "text": "public function skipProperties() {}", "title": "" }, { "docid": "2f101340dbcb8e68b889cf7d8e07a23e", "score": "0.60150445", "text": "public function exceptAll(): static\n\t{\n\t\treturn $this->setOperation('EXCEPT ALL');\n\t}", "title": "" }, { "docid": "abd433346f263b32ab869f26841206fb", "score": "0.59965694", "text": "public function exclude()\n {\n return $this->exclude;\n }", "title": "" }, { "docid": "a150054ba3faf9ad69636a67235ab162", "score": "0.5974872", "text": "public function noDetail(){\n $with = Tender::with('detail')->has('detail')->pluck('id')->toArray();\n $tender = Tender::all()->except($with);\n return $tender;\n }", "title": "" }, { "docid": "80ddfca867236d08c93dad7d2b8dc10b", "score": "0.59540653", "text": "public function not($selector) {\n\t\t// Same as filterData, but for public interface with the $not option specifically set to \"true\".\n\t\treturn $this->filterData($selector, true); \n\t}", "title": "" }, { "docid": "bd3f467f8b3f81f31baa98389cc900ca", "score": "0.590615", "text": "public static function ignoreMorphables();", "title": "" }, { "docid": "0db68913a7e5e331817dd34c1a7bfca0", "score": "0.5863785", "text": "public static function exclude(): array\n {\n return ['survey', 'respondentid'];\n }", "title": "" }, { "docid": "039cf8504436170e42f68813ca4f0726", "score": "0.5859976", "text": "private function getExcludeFields() {\n\t\tif (!empty($this->form)) $this->form->excludeFields = $this->excludeFields;\n\t}", "title": "" }, { "docid": "17b85edf69edfb6f7a862bc89c639443", "score": "0.5808859", "text": "public function findNotArchived(){\n $qb = $this->createQueryBuilder('t');\n $qb->select('t, ma')\n ->join('t.mainAddress', 'ma')\n ->where('t.archived = :f')\n ->setParameter('f', false)\n ;\n\n return $qb->getQuery()->getResult();\n }", "title": "" }, { "docid": "62c90e775c4a43793d748e335bf6284e", "score": "0.57714534", "text": "public function getExcludes() {\n return $this->excludes;\n }", "title": "" }, { "docid": "4d344e0360b954ca183efe67934ca962", "score": "0.57562023", "text": "public function getIgnoreEnableFields();", "title": "" }, { "docid": "2b5c18f3bd7068cf5e503a8928d9d98c", "score": "0.5747345", "text": "public function invisible() {\n $collection = clone $this;\n return $collection->filterBy('isInvisible', true);\n }", "title": "" }, { "docid": "d5bdcb05c2b47781a440d59650ba0cbb", "score": "0.57173324", "text": "public function withoutDataById() : StaticDataApiQuery;", "title": "" }, { "docid": "7fa783e99a5cfbfc9397b172fce15969", "score": "0.5700954", "text": "public function removeExclude($exclude);", "title": "" }, { "docid": "c232bb08ef1cffcf09722b53a7c8842c", "score": "0.5678297", "text": "public function allowAllPropertiesExcept() {}", "title": "" }, { "docid": "ea971c1a4665fbafe2d2312d588a21bb", "score": "0.5677802", "text": "public function getIgnoreEnableFields() {}", "title": "" }, { "docid": "52cce267019a23e5f07f7f626ca2fbd6", "score": "0.56308824", "text": "public function getOracleExcludedObjects()\n {\n return $this->readOneof(1);\n }", "title": "" }, { "docid": "90cc845190cd5a59c66759d3c916804c", "score": "0.56222844", "text": "public function except(): static\n\t{\n\t\treturn $this->setOperation('EXCEPT');\n\t}", "title": "" }, { "docid": "96d8cb12c44dc0283e982dc4a63f3843", "score": "0.5621201", "text": "function getIgnored();", "title": "" }, { "docid": "77389c2baca912c4cea644aa20eb13a7", "score": "0.5617392", "text": "function discard( $victims )\n {\n if( !is_array($victims) )\n {\n $victims = func_get_args();\n }\n\n return $this->project(array_diff(array_keys($this->fields), $victims));\n }", "title": "" }, { "docid": "6b4762320ed640029c55499abfb9e7c7", "score": "0.5613124", "text": "public function skipUnknownProperties() {}", "title": "" }, { "docid": "cc69cd91c77adefe991ff365ab64908e", "score": "0.55995405", "text": "public function notOperator() \r\n {\r\n \r\n $b = $this->cloneObject();\r\n \r\n for($index = 0; $index < $b->count(); $index++) \r\n {\r\n $b->set($index, !$b->get($index));\r\n }\r\n \r\n return $b;\r\n }", "title": "" }, { "docid": "5717741cbf5217cb2928cd69931307bb", "score": "0.5597664", "text": "public function getUnrelated(ResultsetInterface $resultset, FilterInterface $filter) : ResultsetInterface;", "title": "" }, { "docid": "b0c5cc42051dd3d712d9f4b725b04cca", "score": "0.5586565", "text": "function getIgnoreEnableFields() ;", "title": "" }, { "docid": "12709b0e16288cdd10129ef4f8a97e9c", "score": "0.5584204", "text": "public function fetchingHiddenPostsWithIgnoreEnableField() {}", "title": "" }, { "docid": "8b6584344e417cb2a147fb009965ad61", "score": "0.5537515", "text": "public function ignore()\n {\n $this->options['ignore'] = 1;\n return $this;\n }", "title": "" }, { "docid": "570dbc3b1242ae738f58c8b1ba69d960", "score": "0.55227065", "text": "public function getPostgresqlExcludedObjects()\n {\n return $this->readOneof(3);\n }", "title": "" }, { "docid": "0998085196e73edb212e1087c5ebe000", "score": "0.55202717", "text": "public function ignore(): self\n {\n $this->ignore = true;\n\n return $this;\n }", "title": "" }, { "docid": "d14e971139a8eacdc65be3286628dcf4", "score": "0.5516135", "text": "public function allNoFilters() {\n\t\treturn $this->clearFilters()\n\t\t\t\t\t->all();\n\t}", "title": "" }, { "docid": "7d0dfc0867efd2ef88fb3067ac3ddc1b", "score": "0.542664", "text": "public function excludeExpired() {\n $today = new \\DateTime();\n return $this->filter(function(Item $item) use ($today) {\n return $item->getUseByDate() > $today;\n });\n }", "title": "" }, { "docid": "56df34f66e363b8a07fc85242e426c62", "score": "0.5420513", "text": "public function getUnfilteredValues();", "title": "" }, { "docid": "13bdad129cc49fbe690b9d7253478720", "score": "0.54133767", "text": "public function testGetExcludedAttributes()\n {\n $a = new \\Author();\n $a->setFirstName('Douglas');\n $a->SetLastName('Adams');\n $a->setEmail('[email protected]');\n $a->setAge(42);\n $a->setAddress('123 Fake St');\n\n $expected = [\n 'firstName' => 'Douglas',\n 'lastName' => 'Adams',\n 'email' => '[email protected]'\n ];\n\n $actual = $a->toJsonApiAttributes();\n\n $this->assertEqualsCanonicalizing($expected, $actual);\n }", "title": "" }, { "docid": "d4505f9a9479a993a0045b60ce6531f0", "score": "0.54004925", "text": "function my_relationship_query( $args, $field, $post_id ) {\n $args['exclude'] = $post_id;\n\t\n\t\n\t// return\n return $args;\n \n}", "title": "" }, { "docid": "0827f23c7a7f9e23a71dfd6310e5a375", "score": "0.5395572", "text": "public function not($filter) {\n\t\treturn new Grubby_Query_Modifier($this, array('filters'=>new Grubby_NotFilter($filter)));\n\t}", "title": "" }, { "docid": "55cb9970180b8e3d5090f237cc99cd5a", "score": "0.538746", "text": "public function notDeleted()\n {\n return $this->addFilterCondition($this->getNotDeletedCondition());\n }", "title": "" }, { "docid": "61a47e5568c397d55abd16940140de71", "score": "0.53782", "text": "public function notUsed()\n {\n return $this->andWhere([Invitation::tableName() . '.use_date' => null]);\n }", "title": "" }, { "docid": "5bae638e66ecb5794fe532176e396f86", "score": "0.5364092", "text": "public function getVariantExclusion();", "title": "" }, { "docid": "427d08ddafad2414d94e7deb3ecb32d3", "score": "0.53638244", "text": "public function nonHydratedNotWorkingAction()\n {\n $streetRepo = $this->getDoctrine()->getRepository('ptlisDoctrineTestcaseBundle:Street');\n\n $street = $streetRepo->findOneById(1);\n $houseList = $street->getHouses();\n\n $criteria = Criteria::create()\n ->orderBy(['houseName' => Criteria::ASC]);\n\n $sortedHouseList = $houseList->matching($criteria);\n\n $responseData = '';\n foreach ($sortedHouseList as $house) {\n $responseData .= $house->getHouseName() . '<br>';\n }\n\n return new Response($responseData);\n }", "title": "" }, { "docid": "a4f7db4c00cf29bdd43fc01e81b33924", "score": "0.53598946", "text": "public function allNotRelated()\n {\n $listEmploye = DB::select(\"SELECT employes.id,employes.firstname,employes.lastname,employes.identity FROM employes LEFT JOIN user_members t1 ON t1.employe_id = employes.id WHERE t1.employe_id IS NULL\");\n return $listEmploye;\n }", "title": "" }, { "docid": "d41c4f1802b9dbc0d97a9e00ec739acb", "score": "0.5357318", "text": "public function notAll($selector) {\n\t\treturn $this->filterData($selector, 1); \n\t}", "title": "" }, { "docid": "ef4cea35e84a61579a6048e2bb099a4f", "score": "0.5353258", "text": "public function filter_unproductive( $include_neutral = false ) {\n\t\t$productivity = array( -2, -1 );\n\t\tif ( $include_neutral )\n\t\t\t$productivity[] = 0;\n\t\treturn $this->filter( $this->get_rows_with_productivity( $productivity ) );\n\t}", "title": "" }, { "docid": "e341a912abf36a931392861143003d60", "score": "0.5347266", "text": "function filterObj($attr,$flag) {\n\n if ($flag == true) $flag = 'without';\n else $flag = 'with';\n $attrIndex = $attr[0];\n foreach ($GLOBALS['objMap'] as $tag => $currentObj) {\n if ( in_array($attrIndex,$currentObj[$flag]) ) unset($GLOBALS['objMap'][$tag]);\n }\n updateAttr();\n }", "title": "" }, { "docid": "9755c522df9689eb764bc3d43f05a12b", "score": "0.53362745", "text": "public function getIgnore()\n {\n return $this->ignore;\n }", "title": "" }, { "docid": "de765169aa7fcea16a4a426f6a9e24dd", "score": "0.5332458", "text": "public function not();", "title": "" }, { "docid": "7bb879579d5ac6ebcaf004e9364e6ccb", "score": "0.5330317", "text": "public function ignoreExtraKeys()\n {\n $this->ignoreExtraKeys = true;\n\n return $this;\n }", "title": "" }, { "docid": "81a2d9bb99c9641e8b2d291ee535c368", "score": "0.53197634", "text": "public function getObjectsFoundOnlyFromSink()\n {\n return $this->objects_found_only_from_sink;\n }", "title": "" }, { "docid": "38708ded91c18635392b646b2c952418", "score": "0.5307359", "text": "public function getRemovedObjects() {}", "title": "" }, { "docid": "48f01bde153447fc931b5649ea4b4755", "score": "0.53021944", "text": "public function negate();", "title": "" }, { "docid": "b0d203a4963744546a1d2a5d0bcde6ad", "score": "0.529914", "text": "public function except($keys, $returnArray = false)\n {\n $result = parent::except($keys);\n return $returnArray ? $result->toArray() : $result;\n }", "title": "" }, { "docid": "f1a52e6ab7ad0653b52ed975df85046f", "score": "0.5298061", "text": "function matchIgnore($httpContext);", "title": "" }, { "docid": "7953b08b52119850a43f7f9e2aa0035b", "score": "0.52899945", "text": "public function getEnableFieldsToBeIgnored();", "title": "" }, { "docid": "6ec84b5c8e1b86347a189dd1c25af56a", "score": "0.52884203", "text": "public function shouldSkipUnknownProperties();", "title": "" }, { "docid": "5f859378096f7056fcfe67e5df98879d", "score": "0.5285819", "text": "public function filter();", "title": "" }, { "docid": "5f859378096f7056fcfe67e5df98879d", "score": "0.5285819", "text": "public function filter();", "title": "" }, { "docid": "9831bd19034c2581996aa53ec056b1da", "score": "0.5285584", "text": "function shouldSkipUnknownProperties() ;", "title": "" }, { "docid": "ef353e0f5cef5789dbc0633c1f76a7fe", "score": "0.527298", "text": "public function getExcludedAttributes()\n {\n return [\n 'disable_auto_group_change',\n 'is_vendor',\n 'website_id'\n ];\n }", "title": "" }, { "docid": "3e5f2a4ad1c9bbf8d785e72d1661b4e6", "score": "0.5267865", "text": "public function getEnableFieldsToBeIgnored() {}", "title": "" }, { "docid": "6a411a243f1bf53ba3bd4c4702d6bdad", "score": "0.5264787", "text": "public function getMysqlExcludedObjects()\n {\n return $this->readOneof(2);\n }", "title": "" }, { "docid": "56dd8e0a9578d447e8610d0e53fbea8c", "score": "0.5252626", "text": "function exclude($user_exclude = array()) {\n \n if (is_array($user_exclude)) {\n\n foreach ($user_exclude as $user_exclusion) {\n $this->exclude($user_exclusion);\n }\n\n } else {\n\n $type = gettype($user_exclude);\n\n if (in_array($type,array('boolean','integer','double','string')) && !in_array($user_exclude,$this->exclude_list)) {\n $this->exclude_list[] = strval($user_exclude);\n }\n }\n\n }", "title": "" }, { "docid": "b1c409b7b496c4c1c5f203e5a7ec76d4", "score": "0.5252506", "text": "public function getAllUsersExceptUserAuth()\n {\n $user = $this->getUserAuth();\n return $this->repository->findWhereNotIn('id', [$user->id]);\n }", "title": "" }, { "docid": "425c8ea4456c567ad6f37235666aa70d", "score": "0.52513564", "text": "public function nothing_filter()\n {\n return null;\n }", "title": "" }, { "docid": "541e2298e0fd1ce0244123447fddff50", "score": "0.5245716", "text": "final public function getFilterExcepts(): array\n {\n return $this->__filter_excepts ?? [];\n }", "title": "" }, { "docid": "07b3cf10d10835427ee7e9add9b6fe40", "score": "0.5224874", "text": "public function addHasObjectsFilter()\n {\n return $this->addFieldToFilter('count', ['gt' => 0]);\n }", "title": "" }, { "docid": "fe98c678a3639aeefcb3fa9053852a04", "score": "0.5222855", "text": "protected function getDifferencesObject() {}", "title": "" }, { "docid": "48bf3ffc06a1faac924d4821e9899a15", "score": "0.5222273", "text": "public function getExcludeListArray() {}", "title": "" }, { "docid": "cacb1d33bc2538d6f33e25c7fc319a4d", "score": "0.521622", "text": "public function testGetExcludeFolders()\n {\n $this->assertEquals([], $this->object->getExcludeFolders());\n }", "title": "" }, { "docid": "f4d4c7d9ee40743904562376e0470838", "score": "0.5214667", "text": "public function setExcludes($excludes);", "title": "" }, { "docid": "876840e6511a5b9426ce85c0df7d14a8", "score": "0.5208986", "text": "public function getNonContainered()\n\t\t{\n\t\t\t$_result = [];\n\t\t\tforeach( $this->objects as $key => $section ){\n\n\t\t\t\tif( is_null( $section->container_id ) )\n\t\t\t\t\t$_result[ $key ] = $section;\n\n\t\t\t}\n\n\n\t\t\treturn $_result;\n\t\t}", "title": "" }, { "docid": "cc7aff4f062bf1d37849c78488dac289", "score": "0.52064586", "text": "public function toArray2()\n {\n $ignore = $this->getPayloadExclusions();\n\n return array_where(get_object_vars($this), function ($value, $key) use ($ignore) {\n if (! in_array($key, $ignore)) {\n return ! empty($value);\n }\n });\n }", "title": "" }, { "docid": "e00047f8cadffba36bd56979ad9fb147", "score": "0.5203679", "text": "public function newQueryWithoutRelationships();", "title": "" }, { "docid": "c32dfcf33485bd95aae009867ee049a8", "score": "0.519223", "text": "public function testNonModelsExcluded()\n {\n // as PHP gets rather annoyed when you try to do so\n $foo = m::mock(MetadataProviderDummy::class)->makePartial();\n\n $result = $foo->getCandidateModels();\n $traitClass = TestModelTrait::class;\n $this->assertFalse(in_array($traitClass, $result));\n }", "title": "" }, { "docid": "14cb24f737071a67fddf0b927fd3f992", "score": "0.5186359", "text": "public function withoutAttribute(string $attribute): ResponseInterface;", "title": "" }, { "docid": "29f900a8002dc9bc39babfa10f05e6d0", "score": "0.51823384", "text": "public function removeNotTransferDescriptionKind()\n {\n if (empty($this->sales_details)) {\n return $this;\n }\n // Using array_values to reset keys after filter\n $this->sales_details = array_values(array_filter($this->sales_details, function($item) {\n /** @var \\App\\Model\\Entity\\SalesDetail $item */\n return !$item->not_show_cashier;\n }));\n }", "title": "" }, { "docid": "51f5e2154f8c668d9bf61d265461bd4a", "score": "0.5176123", "text": "public function notObject()\n {\n TestCase::assertIsNotObject($this->actual, $this->message);\n }", "title": "" }, { "docid": "10a40e3400e0b2028067c752d7bb5357", "score": "0.51711005", "text": "public function getNotAvailableItems()\n {\n $qb = $this->createQueryBuilder('i');\n \n $query = $qb->where('i.amount = 0')->getQuery();\n \n return $query->getResult();\n }", "title": "" }, { "docid": "571db9e678231eaaae0289da05ef4c31", "score": "0.5167384", "text": "function my_relationship_query( $args, $field, $post_id ) {\n\t\n // exclude current post from being selected\n $args['exclude'] = $post_id;\n\t\n\t\n\t// return\n return $args;\n \n}", "title": "" }, { "docid": "f2059f9f7b1d0a9194e384111b925e60", "score": "0.51649517", "text": "public function addExclude($tag);", "title": "" }, { "docid": "09480b4d81141d1414160bd16e6f152f", "score": "0.5159049", "text": "public function disableSet();", "title": "" }, { "docid": "16be9fe0408c8f6c7a1a0e0b0cd73d2d", "score": "0.5158871", "text": "public function withoutObjectCaching()\n {\n $this->withObjectCaching = false;\n\n return $this;\n }", "title": "" }, { "docid": "1bd3ea5d1cd7201b409a4e8167d5ba51", "score": "0.5155142", "text": "function getEnableFieldsToBeIgnored() ;", "title": "" }, { "docid": "e79593256224cb704291a7695fb2fab1", "score": "0.5152574", "text": "public function ignore()\n {\n $this->_ignoreCurrent = true;\n\n return $this;\n }", "title": "" }, { "docid": "87747757eb942b8eff87944ddfffd7b9", "score": "0.5139868", "text": "public function dontReport(): array;", "title": "" }, { "docid": "7e5aef07fddb363b3e7fe76513cc1d61", "score": "0.5137459", "text": "public static function get_excluded_items() {\n\t\t\treturn get_option( 'astra_portfolio_excludes', array() );\n\t\t}", "title": "" }, { "docid": "2e083619d85e8375f40fa23d51a96a01", "score": "0.5134028", "text": "public function filterOutFields(array $fields)\n {\n $vars = get_object_vars($this);\n\n foreach ($vars as $key => $value) {\n\n if (!in_array($key, $fields)) {\n unset($this->{$key});\n }\n }\n }", "title": "" }, { "docid": "9cb23135b90b573a5cf7d1ebe65c814a", "score": "0.51135993", "text": "function omit(string ...$fields): FieldsOption\n{\n return new FieldsOption($fields, true /* negate */);\n}", "title": "" }, { "docid": "c52ff134a7c2e7198e59284a76cbd661", "score": "0.5113308", "text": "public function negated(): self\n\t{\n\t\treturn self::of($this->getBigNumber()->negated());\n\t}", "title": "" }, { "docid": "77a4bfccf8b9c237ff2349d4f37993ce", "score": "0.51118284", "text": "public function not() {\n return new Predicate('not', array($this));\n }", "title": "" }, { "docid": "701425f394cca0ad8d20335614dfac81", "score": "0.51115084", "text": "public function testNoneIncluded(): void\n {\n $posts = Post::factory()->count(2)->create();\n\n $response = $this\n ->withoutExceptionHandling()\n ->jsonApi('posts')\n ->get('/api/v1/posts?include=');\n\n $response->assertFetchedMany($posts);\n // @TODO assertNoneIncluded should be available on the response.\n $response->getDocument()->assertNoneIncluded();\n }", "title": "" }, { "docid": "efbf4c189d559601dd5f333f616ea2e9", "score": "0.5093927", "text": "public function not()\n {\n return new Not($this);\n }", "title": "" }, { "docid": "cbdae21c48f3053ee138ba5faa562da3", "score": "0.5092616", "text": "public function getExcepts()\n {\n return $this->excepts;\n }", "title": "" } ]
5ac7bf7491aa53739a7827765785d62d
Function which holds the display logic of linked products
[ { "docid": "c7df0b9e98d31ac7fdef91544d09c773", "score": "0.60525244", "text": "function show_prodlinkedinfo($edit_id,$alert='')\n\t{\n\t\tglobal $db,$ecom_siteid;\n\t?> <div class=\"editarea_div\">\n\t\t<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">\n\t\t<?php\n\t\t\tif($alert)\n\t\t\t{\n\t\t?>\n\t\t\t <tr>\n\t\t\t\t<td valign=\"top\" align=\"center\" class=\"errormsg\" colspan=\"2\">\n\t\t\t\t<?php echo $alert?>\n\t\t\t\t</td>\n\t\t\t </tr>\t\n\t\t <?php\n\t\t \t}\n\t\t\t// Get the list of tabs for this product\n\t\t\t\t$sql_link = \"SELECT link_product_id FROM product_linkedproducts \n\t\t\t\t\t\t\t WHERE link_parent_id=$edit_id limit 1\";\n\t\t\t\t$ret_link = $db->query($sql_link);\n\t\t ?>\n\t\t <tr>\n\t\t\t<td align=\"left\" colspan=\"2\" class=\"helpmsgtd\"><?=get_help_messages('EDIT_PROD_LINKED_MAIN')?></td>\n\t\t </tr>\n\t\t <tr>\n\t\t <td align=\"right\" colspan=\"4\" class=\"tdcolorgray_buttons\">\n\t\t\t<input name=\"Addmore_link\" type=\"button\" class=\"red\" id=\"Addmore_link\" value=\"Assign More\" onclick=\"document.frmEditProduct.fpurpose.value='add_prodlink';document.frmEditProduct.submit();\" />\n\t\t\t<a href=\"#\" onmouseover =\"ddrivetip('<?=get_help_messages('EDIT_PROD_LINK_ASSMORE')?>')\"; onmouseout=\"hideddrivetip()\"><img src=\"images/helpicon.png\" width=\"17\" height=\"13\" border=\"0\" /></a>&nbsp;&nbsp;\n\t\t\t<?php\n\t\t\tif ($db->num_rows($ret_link))\n\t\t\t{\n\t\t\t?>\n\t\t\t<div id=\"prodlinkunassign_div\" class=\"unassign_div\">\n\t\t\tChange Hidden Status to \n\t\t\t<?php\n\t\t\t\t$prodlink_chstatus = array(0=>'No',1=>'Yes');\n\t\t\t\techo generateselectbox('prodlink_chstatus',$prodlink_chstatus,0);\n\t\t\t?>\n\t\t\t<input name=\"prodlink_chstatus\" type=\"button\" class=\"red\" id=\"prodlink_chstatus\" value=\"Change\" onclick=\"call_ajax_changestatusprodall('prodlink','checkboxprodlink[]')\" />\n\t\t\t<a href=\"#\" onmouseover =\"ddrivetip('<?=get_help_messages('EDIT_PROD_LINK_CHSTATUS')?>')\"; onmouseout=\"hideddrivetip()\"><img src=\"images/helpicon.png\" width=\"17\" height=\"13\" border=\"0\" /></a>\n\t\t\t&nbsp;&nbsp;<input name=\"prodlink_chorder\" type=\"button\" class=\"red\" id=\"prodlink_chorder\" value=\"Save Order\" onclick=\"call_ajax_changeorderall('prodlink','checkboxprodlink[]')\" />\n\t\t\t<a href=\"#\" onmouseover =\"ddrivetip('<?=get_help_messages('EDIT_PROD_LINK_SAVEORDER')?>')\"; onmouseout=\"hideddrivetip()\"><img src=\"images/helpicon.png\" width=\"17\" height=\"13\" border=\"0\" /></a>\n\t\t\t\n\t\t\t&nbsp;&nbsp;&nbsp;<input name=\"prodlink_delete\" type=\"button\" class=\"red\" id=\"prodlink_delete\" value=\"Un Assign\" onclick=\"call_ajax_deleteall('prodlink','checkboxprodlink[]')\" />\n\t\t\t<a href=\"#\" onmouseover =\"ddrivetip('<?=get_help_messages('EDIT_PROD_LINK_UNASSIGN')?>')\"; onmouseout=\"hideddrivetip()\"><img src=\"images/helpicon.png\" width=\"17\" height=\"13\" border=\"0\" /></a>\t\t\t</div>\t\n\t\t\t<?php\n\t\t\t}\t\t\t\t\n\t\t\t?>\t\t </td>\n </tr>\n\t\t<tr id=\"prodlink_tr\">\n\t\t\t<td align=\"right\" colspan=\"4\" class=\"tdcolorgray_buttons\">\n\t\t\t<?php \n\t\t\t\tshow_prodlinked_list($edit_id);\n\t\t\t?>\n\t\t\t</td>\n\t\t</tr>\t \t\n\t\t</table>\n\t\t</div>\n<?php\t\t\t\n\t}", "title": "" } ]
[ { "docid": "42f1b6ee50ef1469ad5fe81df01c9b48", "score": "0.6703006", "text": "public function displayProduct(){\n\t\t$productObj=new ProductMySqlExtDAO();\n\t\t$productArray=$productObj->getProduct(CommonController::$PRODUCT_LIMIT);\n\t\tset(\"productArray\",$productArray);\n\t\treturn render('sectionProduct.tpl.php');\n\t}", "title": "" }, { "docid": "19b062716ded011a8c16e82108c33621", "score": "0.6697533", "text": "function show_prodlinked_list($edit_id,$alert='')\n\t{\n\t\tglobal $db,$ecom_siteid;\n\t\t\t // Get the list of linked products\n\t\t\t\t$sql_link = \"SELECT link_id,a.product_id,a.product_name,b.link_hide,b.link_order FROM products a,product_linkedproducts b \n\t\t\t\t\t\t\t WHERE b.link_parent_id=$edit_id AND a.product_id =b.link_product_id ORDER BY b.link_order\";\n\t\t\t\t$ret_link = $db->query($sql_link);\n\t?>\n\t\t\t\t\t<table width=\"100%\" cellpadding=\"1\" cellspacing=\"0\" border=\"0\">\n\t\t\t\t\t<?php \n\t\t\t\t\t\tif($alert)\n\t\t\t\t\t\t{\n\t\t\t\t\t?>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td colspan=\"6\" align=\"center\" class=\"errormsg\"><?php echo $alert?></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t <?php\n\t\t\t\t \t\t}\n\t\t\t\t\t\tif ($db->num_rows($ret_link))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$table_headers = array('<img src=\"images/checkbox.gif\" border=\"0\" onclick=\"select_all(document.frmEditProduct,\\'checkboxprodlink[]\\')\"/><img src=\"images/uncheckbox.gif\" border=\"0\" onclick=\"select_none(document.frmEditProduct,\\'checkboxprodlink[]\\')\"/>','Slno.','Linked Product','Order','Hidden');\n\t\t\t\t\t\t\t$header_positions=array('center','center','left','center','center');\n\t\t\t\t\t\t\t$colspan = count($table_headers);\n\t\t\t\t\t\t\techo table_header($table_headers,$header_positions); \n\t\t\t\t\t\t\t$cnt = 1;\n\t\t\t\t\t\t\twhile ($row_link = $db->fetch_array($ret_link))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$cls = ($cnt%2==0)?'listingtablestyleA':'listingtablestyleB';\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td width=\"5%\" align=\"center\" class=\"<?php echo $cls?>\"><input type=\"checkbox\" name=\"checkboxprodlink[]\" value=\"<?php echo $row_link['link_id'];?>\" /></td>\n\t\t\t\t\t\t\t\t\t<td width=\"5%\" align=\"center\" class=\"<?php echo $cls?>\"><?php echo $cnt++?>.</td>\n\t\t\t\t\t\t\t\t\t<td align=\"left\" class=\"<?php echo $cls?>\"><a href=\"home.php?request=products&fpurpose=edit&checkbox[0]=<?php echo $row_link['product_id']?>&productname=<?php echo $_REQUEST['productname']?>&manufactureid=<?php echo $_REQUEST['manufactureid']?>&categoryid=<?php echo $_REQUEST['categoryid']?>&vendorid=<?php echo $_REQUEST['vendorid']?>&rprice_from=<?php echo $_REQUEST['rprice_from']?>&rprice_to=<?php echo $_REQUEST['rprice_to']?>&cprice_from=<?php echo $_REQUEST['cprice_from']?>&cprice_to=<?php echo $_REQUEST['cprice_to']?>&discount=<?php echo $_REQUEST['discount']?>&discountas=<?php echo $_REQUEST['discountas']?>&bulkdiscount=<?php echo $_REQUEST['bulkdiscount']?>&stockatleast=<?php echo $_REQUEST['stockatleast']?>&preorder=<?php echo $_REQUEST['preorder']?>&prodhidden=<?php echo $_REQUEST['prodhidden']?>&start=<?php echo $start?>&pg=<?php echo $pg?>&records_per_page=<?php echo $records_per_page?>\" title=\"edit\" class=\"edittextlink\"><?php echo stripslashes($row_link['product_name']);?></a></td>\n\t\t\t\t\t\t\t\t\t<td class=\"<?php echo $cls?>\" align=\"center\"><input type=\"text\" name=\"prodlink_order_<?php echo $row_link['link_id']?>\" id=\"prodlink_order_<?php echo $row_link['link_id']?>\" value=\"<?php echo stripslashes($row_link['link_order']);?>\" size=\"3\"/></td>\n\t\t\t\t\t\t\t\t\t<td class=\"<?php echo $cls?>\" align=\"center\"><?php echo ($row_link['link_hide']==1)?'Yes':'No'?></td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t <td colspan=\"4\" align=\"center\" valign=\"middle\" class=\"norecordredtext_small\">\n\t\t\t\t\t\t\t\t <input type=\"hidden\" name=\"prodlink_norec\" id=\"prodlink_norec\" value=\"1\" />No Linked Products Assigned.\n\t\t\t\t\t\t\t\t </td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<?php\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t?>\t\n\t\t\t\t</table>\t\n\t<?php\t\n\t}", "title": "" }, { "docid": "3ddd5390027a9058b370e8c8720fa1f7", "score": "0.6693731", "text": "public function getShowRelatedProduct();", "title": "" }, { "docid": "dcd215a5cadc027213f608c5a52f5b1a", "score": "0.65692675", "text": "private function displayProducts(){\n $products = $this->products;\n $categories = $this->categories;\n $this->return['productList'] = $products;\n $this->return['categoryList'] = $categories;\n }", "title": "" }, { "docid": "7936251647bd1d2636cc3e7e1e37d4db", "score": "0.6409187", "text": "public function ProductsDisplay()\n\t{\tob_start();\n\t\tif ($this->id)\n\t\t{\n\t\t\techo '<div class=\"mmdisplay\"><div id=\"bpContainer\">', $this->ProductsTable(), '</div><script type=\"text/javascript\">$().ready(function(){$(\"body\").append($(\".jqmWindow\"));$(\"#bp_modal_popup\").jqm();});</script>',\n\t\t\t\t'<!-- START instructor list modal popup --><div id=\"bp_modal_popup\" class=\"jqmWindow\" style=\"padding-bottom: 5px; width: 640px; margin-left: -320px; top: 10px; height: 600px; \"><a href=\"#\" class=\"jqmClose submit\">Close</a><div id=\"bpModalInner\" style=\"height: 500px; overflow:auto;\"></div></div></div>';\n\t\t\t}\n\t\treturn ob_get_clean();\n\t}", "title": "" }, { "docid": "bee228a0ed0ef9aaea081e2e5901cbf8", "score": "0.6404929", "text": "public function getProductLinks();", "title": "" }, { "docid": "f26c88e35b865a702b6622a01837182d", "score": "0.6316791", "text": "abstract public function displayLink();", "title": "" }, { "docid": "4a937149a14bb825a75de28ab7465a1f", "score": "0.62676007", "text": "public function displayProducts()\n\t{\n\n\t\t$sql = \"SELECT * FROM products\";\n\t\t$products = $this->dataHandler->readAllData($sql);\n\n\t\t$this->html = '';\n\n\t\tforeach($products as $product)\n\t\t{\n\t\t\tif($product->sale == 0)\n\t\t\t{\n\t\t\t\t$price = '&euro;'.$product->product_price;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$price = '<span class=\"sale\">&euro;'.$product->product_price.'</span> &euro;'.$product->sale_price;\n\t\t\t}\n\n\t\t\t$this->html .= \"<div class='col-lg-4 col-md-6 col-sm-12 portfolio-item mb-3'>\n <div class='card h-100'> \n <a href='/details?pid=$product->product_id'><img class='card-img-top p-3' src=assets/custom/img/$product->product_image alt='$product->product_name'></a>\n\t\t\t\t\t <div class='card-body d-flex align-items-start flex-column'>\n\t\t\t\t\t <h5><a href='/details?pid=$product->product_id'>$product->product_name</a></h5>\n\t\t\t\t\t <h5 class='card-title price'>$price</h5>\n\t\t\t\t\t <button class='btn btn-success mt-auto' type='button'><a href='/cart?pid=$product->product_id'>In winkelwagen</a></button>\n\t\t\t\t\t \";\n\t\t\t\t\t \n $this->html .= \"</div></div></div>\";\n\t\t}\n\t\t$this->html .= \"</div></div>\";\n\n\t\treturn $this->html;\n\t}", "title": "" }, { "docid": "9c5a33b1e48e77818ac6cc6c538ca097", "score": "0.6215137", "text": "function displayProduit(){\r\n global $model;\r\n $dataProduct = $model->getProduct();\r\n //print_r($dataProduct);\r\n $result = '<h1> Bienvenue sur la page Produits</h1>';\r\n foreach ($dataProduct as $key => $value) {\r\n $result .= '<div class=\"card ml-4 mb-4\" style=\"width: 18rem; display:inline-block;\">\r\n <img src=\"'.BASE_URL.SP.\"images\".SP.\"produit\".SP.$value[\"image\"].'\" class=\"card-img-top\" alt=\"...\">\r\n <div class=\"card-body\">\r\n <h5 class=\"card-title\">'.$value[\"name\"] .'</h5>\r\n <a href=\"'.BASE_URL.SP.\"details\".'-'.$value[\"id\"].'\" class=\"btn btn-warning\">Détails</a>\r\n <a href=\"'.BASE_URL.SP.\"panier\".'-'.$value[\"id\"].'\" class=\"btn btn-success\">Acheter</a>\r\n </div>\r\n </div>';\r\n }\r\n\r\n return $result;\r\n}", "title": "" }, { "docid": "0d08fb21eb714e19e34f08644b8f22f9", "score": "0.6212022", "text": "public function productDisplay(){\n $query = \"SELECT shop_product.*, shop_category.catName, shop_brand.brand_name\n FROM shop_product\n INNER JOIN shop_category\n ON shop_product.catID = shop_category.catID\n INNER JOIN shop_brand\n ON shop_product.brandID = shop_brand.brandID\";\n $result = $this->db->select($query);\n return $result;\n }", "title": "" }, { "docid": "7b978b63e0900043b55cbfd90d1ceda2", "score": "0.6175229", "text": "function getDetailAssociatedProducts($module,$focus)\n{\n\tglobal $log;\n\t//changed by dingjianting on 2007-11-05 for php5.2.x\n\t$log->debug(\"Entering getDetailAssociatedProducts() method ...\");\n\tglobal $adb;\n\tglobal $theme;\n\tglobal $log;\n\tglobal $app_strings,$current_user;\n\t$theme_path=\"themes/\".$theme.\"/\";\n\t$image_path=$theme_path.\"images/\";\n //changed by dingjianting on 2006-12-29 for gloso project\n\tif($module != 'PurchaseOrder')\n\t{\n\t\tif($module == '') {//changed by dingjianting on 2007-2-25 for gloso project and quote\n\t\t\t//$colspan = '4';\n\t\t\t$colspan = '7';\n\t\t} else {\n\t\t\t$colspan = '8';\n\t\t}\n\t}\n\telse\n\t{\n\t\t//$colspan = '3';\n\t\t$colspan = '7';\n\t}\n\n\t//Get the taxtype of this entity\n\t//$taxtype = getInventoryTaxType($module,$focus->id);\n\n\t$output = '';\n\t//Header Rows\n\t$output .= '<table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"5\" cellspacing=\"0\" class=\"crmTable\" id=\"proTab\">\n\t <tr valign=\"top\">\n\t \t<td colspan=\"'.$colspan.'\" class=\"dvInnerHeader\"><b>'.$app_strings['LBL_PRODUCT_DETAILS'].'</b></td>\n\t </tr>\n\t <tr valign=\"top\">\n\t\t<td width=20% class=\"lvtCol\">\n\t\t\t<b>'.$app_strings['LBL_PRODUCT_NAME'].'</b>\n\t\t</td>';\n\t$output .= '<td width=10% class=\"lvtCol\"><b>'.$app_strings['LBL_PRODUCT_CODE'].'</b></td>';\n\t$output .= '<td width=15% class=\"lvtCol\"><b>'.$app_strings['LBL_PRODUCT_SERIALNO'].'</b></td>';\n\n\t//Add Quantity in Stock column for SO, Quotes and Invoice\n\tif($module == 'Quotes' || $module == 'SalesOrder' || $module == 'Invoice')\n\t\t$output .= '<td width=10% class=\"lvtCol\"><b>'.$app_strings['LBL_QTY_IN_STOCK'].'</b></td>';\n\n\t$output .= '\n\t <td width=10% class=\"lvtCol\"><b>'.$app_strings['LBL_QTY'].'</b></td>\n\t\t<td width=10% class=\"lvtCol\" align=\"left\"><b>'.$app_strings['LBL_LIST_PRICE'].'</b></td>\n\t\t<td width=15% wrap class=\"lvtCol\" align=\"left\"><b>'.$app_strings['LBL_COMMENT'].'</b></td>';\n\tif($module != '') {//changed by dingjianting on 2007-2-25 for gloso project and quote\n\t\t$output .= '\n\t\t\t<td width=10% nowrap class=\"lvtCol\" align=\"right\"><b>'.$app_strings['LBL_PRODUCT_TOTAL'].'</b></td>';\n\t}\n\t$output .= '</tr>';\n\n\n\t// DG 15 Aug 2006\n\t// Add \"ORDER BY sequence_no\" to retain add order on all inventoryproductrel items\n\n\tif($module == 'Quotes')\n\t{\n\t\t$query=\"select ec_products.productname,ec_products.unit_price,ec_products.qtyinstock,ec_products.productcode,ec_products.serialno, ec_inventoryproductrel.* from ec_inventoryproductrel inner join ec_products on ec_products.productid=ec_inventoryproductrel.productid where id=\".$focus->id.\" ORDER BY sequence_no\";\n\t}\n\telseif($module == 'PurchaseOrder')\n\t{\n\t\t$query=\"select ec_products.productname,ec_products.unit_price,ec_products.qtyinstock,ec_products.productcode,ec_products.serialno,ec_inventoryproductrel.* from ec_inventoryproductrel inner join ec_products on ec_products.productid=ec_inventoryproductrel.productid where id=\".$focus->id.\" ORDER BY sequence_no\";\n\t}\n\telseif($module == 'SalesOrder')\n\t{\n\t\t$query=\"select ec_products.productname,ec_products.unit_price,ec_products.qtyinstock,ec_products.productcode,ec_products.serialno,ec_inventoryproductrel.* from ec_inventoryproductrel inner join ec_products on ec_products.productid=ec_inventoryproductrel.productid where id=\".$focus->id.\" ORDER BY sequence_no\";\n\t}\n\telseif($module == 'Invoice')\n\t{\n\t\t$query=\"select ec_products.productname,ec_products.unit_price,ec_products.qtyinstock,ec_products.productcode,ec_products.serialno,ec_inventoryproductrel.* from ec_inventoryproductrel inner join ec_products on ec_products.productid=ec_inventoryproductrel.productid where id=\".$focus->id.\" ORDER BY sequence_no\";\n\t}\n\n\t$result = $adb->query($query);\n\t$num_rows=$adb->num_rows($result);\n\t$netTotal = '0.00';\n\tfor($i=1;$i<=$num_rows;$i++)\n\t{\n\t\t$productid=$adb->query_result($result,$i-1,'productid');\n\t\t$productname=$adb->query_result($result,$i-1,'productname');\n\t\t$comment=$adb->query_result($result,$i-1,'comment');\n\t\tif(empty($comment)) $comment = \"&nbsp;\";\n\t\t$qtyinstock=$adb->query_result($result,$i-1,'qtyinstock');\n\t\t$qty=$adb->query_result($result,$i-1,'quantity');\n\t\t$unitprice=$adb->query_result($result,$i-1,'unit_price');\n\t\t$listprice=$adb->query_result($result,$i-1,'listprice');\n\t\t$total = $qty*$listprice;\n\t\t$unitprice = convertFromDollar($unitprice,1);\n\t\t$listprice = convertFromDollar($listprice,1);\n\t\t$total = convertFromDollar($total,1);\n\t\t$netprice = $total;\n\t\t$productcode = $adb->query_result($result,$i-1,'productcode');\n\t\t$serial_no = $adb->query_result($result,$i-1,'serialno');\n\n\t\t//For Product Name\n\t\t$output .= '\n\t\t\t <tr valign=\"top\">\n\t\t\t\t<td class=\"crmTableRow small lineOnTop\">&nbsp;<a href=\"index.php?action=DetailView&module=Products&record='.$productid.'\" target=\"_blank\">'.$productname.'</a></td>';\n\t\t//Upto this added to display the Product name and comment\n\t\t$output .= '<td class=\"crmTableRow small lineOnTop\" nowrap>&nbsp;'.$productcode.'</td>';\n\t\t$output .= '<td class=\"crmTableRow small lineOnTop\" nowrap>&nbsp;'.$serial_no.'</td>';\n\t\tif($module != 'PurchaseOrder')\n\t\t{\n\t\t\t$output .= '<td class=\"crmTableRow small lineOnTop\">&nbsp;'.$qtyinstock.'</td>';\n\t\t}\n\t\t$output .= '<td class=\"crmTableRow small lineOnTop\">&nbsp;'.$qty.'</td>';\n\t\t$output .= '<td class=\"crmTableRow small lineOnTop\">&nbsp;'.$listprice.'</td>';\n\t\t$output .= '<td class=\"crmTableRow small lineOnTop\" valign=\"bottom\" align=\"left\">&nbsp;'.$comment.'</td>';\n\t\tif($module != '') {//changed by dingjianting on 2007-2-25 for gloso project and quote\n\t\t\t$output .= '<td class=\"crmTableRow small lineOnTop\" align=\"right\">&nbsp;'.$total.'</td>';\n\t }\n\t\t$output .= '</tr>';\n\t\t$netTotal = $netTotal + $netprice;\n\t}\n\n\t$output .= '</table>';\n\n\t//$netTotal should be equal to $focus->column_fields['hdnSubTotal']\n\t$netTotal = $focus->column_fields['hdnSubTotal'];\n\t$netTotal = convertFromDollar($netTotal,1);\n\n\t//Display the total, adjustment, S&H details\n\t$output .= '<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"5\" class=\"crmTable\">';\n\t//Decide discount\n\tif($module != '') {//changed by dingjianting on 2007-2-25 for gloso project and quote\n\t\t$finalDiscount = '0.00';\n\t\tif($focus->column_fields['hdnDiscountPercent'] != '' && $focus->column_fields['hdnDiscountPercent'] != '0.0')\n\t\t{\n\t\t\t$finalDiscount = ($focus->column_fields['hdnSubTotal']*$focus->column_fields['hdnDiscountPercent']/100);\n\t\t\t////changed by dingjianting on 2006-11-10 for simplized chinese\n\t\t\t//$final_discount_info = $focus->column_fields['hdnDiscountPercent'].\" % of $netTotal = $finalDiscount\";\n\t\t\t$final_discount_info = $focus->column_fields['hdnDiscountPercent'].\" % X $netTotal = $finalDiscount\";\n\t\t}\n\t\telseif($focus->column_fields['hdnDiscountAmount'] != '')\n\t\t{\n\t\t\t$finalDiscount = $focus->column_fields['hdnDiscountAmount'];\n\t\t\t$finalDiscount = convertFromDollar($finalDiscount,1);\n\t\t\t$final_discount_info = $app_strings['LBL_FINAL_DISCOUNT_AMOUNT'].\" = $finalDiscount\";\n\t\t}\n\t\tif($final_discount_info != '')\n\t\t\t$final_discount_info = 'onclick=\"alert(\\''.$final_discount_info.'\\');\"';\n\n\t\t$output .= '<tr>';\n\t\t$output .= '<td width=\"80%\" align=\"right\" class=\"crmTableRow small lineOnTop\">(-)&nbsp;<b><a href=\"javascript:;\" '.$final_discount_info.'>'.$app_strings['LBL_DISCOUNT'].'</a></b></td>';\n\t\t$output .= '<td width=\"20%\" align=\"right\" class=\"crmTableRow small lineOnTop\">'.$finalDiscount.'</td>';\n\t\t$output .= '</tr>';\n\n\t\t$shAmount = ($focus->column_fields['hdnS_H_Amount'] != '')?$focus->column_fields['hdnS_H_Amount']:'0.00';\n\t\t$shAmount = convertFromDollar($shAmount,1);\n\t\t$output .= '<tr>';\n\t\t$output .= '<td align=\"right\" class=\"crmTableRow small\">(+)&nbsp;<b>'.$app_strings['LBL_SHIPPING_AND_HANDLING_CHARGES'].'</b></td>';\n\t\t$output .= '<td align=\"right\" class=\"crmTableRow small\">'.$shAmount.'%</td>';\n\t\t$output .= '</tr>';\n\n\n\t\t$adjustment = ($focus->column_fields['txtAdjustment'] != '')?$focus->column_fields['txtAdjustment']:'0.00';\n\t\t$adjustment = convertFromDollar($adjustment,1);\n\t\t$output .= '<tr>';\n\t\t$output .= '<td align=\"right\" class=\"crmTableRow small\">&nbsp;<b>'.$app_strings['LBL_ADJUSTMENT'].'</b></td>';\n\t\t$output .= '<td align=\"right\" class=\"crmTableRow small\">'.$adjustment.'</td>';\n\t\t$output .= '</tr>';\n\n\t\t$grandTotal = ($focus->column_fields['hdnGrandTotal'] != '')?$focus->column_fields['hdnGrandTotal']:'0.00';\n\t\t$grandTotal = convertFromDollar($grandTotal,1);\n\t\t$output .= '<tr>';\n\t\t$output .= '<td align=\"right\" class=\"crmTableRow small lineOnTop\"><b>'.$app_strings['LBL_GRAND_TOTAL'].'</b></td>';\n\t\t$output .= '<td align=\"right\" class=\"crmTableRow small lineOnTop\">'.$grandTotal.'</td>';\n\t\t$output .= '</tr>';\n\t}\n\t$output .= '</table>';\n\n\t$log->debug(\"Exiting getDetailAssociatedProducts method ...\");\n\treturn $output;\n\n}", "title": "" }, { "docid": "ee5d36e072a580a521747372558b7c21", "score": "0.6165398", "text": "public function toString()\n {\n return 'Product on product view page is correct.';\n }", "title": "" }, { "docid": "982243116626473d1eef0e58f6db2079", "score": "0.6102316", "text": "public function getShowCrossSellProduct();", "title": "" }, { "docid": "86b8a114c7ec01a9f5180d33ab5b15a5", "score": "0.60969424", "text": "function display_items()\n{\n\t#$spaces == number of character spaces created by \\t and ||\n\t$spaces = 114;\n\techo \"\\n\";\n\t$i = 0;\n\twhile($i<$spaces)\n\t{\n\techo \"=\";\n\t$i = $i +1;\n\t}\n\techo \"\\n\";\n\techo \"||\\t\";\n\techo \"Product ID\";\n\techo \"\\t||\\t\";\n\techo \"Description\";\n\techo \"\\t\\t\\t||\\t\";\n\techo \"Type\";\n\techo \"\\t\\t||\\t\";\n\techo \"Price\\t\\t||\\n\";\n\t$i = 0;\n\twhile($i<$spaces)\n\t{\n\techo \"=\";\n\t$i = $i +1;\n\t}\n\techo \"\\n\";\n\t$QU3 = mysql_query(\"SELECT DISTINCT Product.id, Product.description, Product.type, Product.price FROM Product\");\n\twhile($row = mysql_fetch_array($QU3))\n\t{\n\t\techo \"||\\t\";\n\t\techo $row['id'];\n\t\techo \"\\t||\\t\";\n\t\techo $row['description'];\n\t\techo \"\\t\\t||\\t\";\n\t\techo $row['type'];\n\t\techo \"\\t\\t||\\t\";\n\t\techo $row['price'];\n\t\techo \"\\t\\t||\";\n\t\techo \"\\n\";\n\t}\n\t$i = 0;\n\twhile($i<$spaces)\n\t{\n\techo \"=\";\n\t$i = $i +1;\n\t}\n\techo \"\\n\";\n\t\n}", "title": "" }, { "docid": "57a93566e6c2bae9e919ab8b56af7e68", "score": "0.60457355", "text": "public function display()\n {\n //Validation to check if there is items to display\n if (empty($this->item_list)) {\n print \"Nothing to display\".PHP_EOL;\n return;\n }\n\n $grand_total = 0;\n $sales_tax = 0;\n print \"Quantity, Product, Price\".PHP_EOL;\n foreach ($this->item_list as $list) {\n $item = $list[0];\n $quantity = $list[1];\n $sales_tax += $quantity*$item->getTotalTax();\n $total_price = $quantity*$item->getTotalCost();\n $grand_total += $total_price;\n\n print \"{$quantity}, {$item->getName()}, \".number_format($item->getTotalCost(), 2).PHP_EOL;\n }\n\n print PHP_EOL;\n print \"Sales Tax: \".number_format($sales_tax, 2).PHP_EOL;\n print \"Total: \".number_format($grand_total, 2);\n print PHP_EOL;\n }", "title": "" }, { "docid": "a65baccaa521d151c3e71e6b3aec13fd", "score": "0.60243165", "text": "public function getProductLinkAction();", "title": "" }, { "docid": "c9706a8232811046aa025bf1556edd37", "score": "0.601472", "text": "public function show($product)\n {\n }", "title": "" }, { "docid": "72407fff4d329e1d5afc403b63bb9eec", "score": "0.6014616", "text": "function elementProduct()\n\t{\n\t\t$model \t= $this->getModel( 'elementproduct' );\n\t\t$view\t= $this->getView( 'elementproduct' );\n\t\t$view->setModel( $model, true );\n\t\t$view->display();\n\t}", "title": "" }, { "docid": "f0d319601796e0c087053751425fb3ae", "score": "0.59632224", "text": "function outputProductOpenLink($record)\n {\n global $application;\n\n $prod_info = &$application -> getInstance('CProductInfo',\n $record['product_id']);\n return \"javascript:openURLinNewWindow('\" .\n $prod_info -> getProductInfoLink($record['product_id'], '') .\n \"', 'ViewProduct');\";\n }", "title": "" }, { "docid": "025742e98d5a795a1c26075f4df9d01b", "score": "0.5958091", "text": "function showProduct()\r\n {\r\n return $this->ShowProduct;\r\n }", "title": "" }, { "docid": "8671f26918542df9522e06f277c97847", "score": "0.59353846", "text": "function view(){\n $product=new product_model();\n\n //Uso metodo del modelo de productos\n $datos=$product->get_product();\n\n //LLamo a la funcion para que me muestre\n // el Carrousel\n $promotion=new product_model();\n\n $ofertas=$promotion->get_Promotion();\n\n //LLamo a la funcion para que me muestre las\n //categorias .\n $category=new category_model();\n\n $verCategorias=$category->get_ViewCategory();\n //LLamo a la funcion para que me muestre las\n //subcategorias\n $subCategory=new category_model();\n\n $verSubcategorias= $subCategory->get_ViewSubcategory();\n\n //LLamo a la funcion para que que me muestre las marcas\n // en el Filtro\n $brands= new product_model();\n\n $viewBrands= $brands->get_viewBrand();\n\n\n //LLamada a la vista: mostrar la pantalla\n require_once(\"views/product_views.phtml\");\n }", "title": "" }, { "docid": "7956984354332672ad4b9f4cf491ce8e", "score": "0.59320873", "text": "public function show(Product $product)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "881873f543a1dbaa570004bcfd7e9aa8", "score": "0.59181225", "text": "function adminDisplayProduct($id, $name, $image, $price, $btw, $desc) {\n\n $string = \"<tr>\n <td>$id</td>\n <td>$name</td>\n <td>$image</td>\n <td>$price</td>\n <td>$btw</td>\n <td>$desc</td>\n <td><a href=index.php?content=admin-edit&productid=$id>Product wijzigen</a></td>\n </tr>\";\n\n echo $string;\n}", "title": "" }, { "docid": "0395a7d14a68ede9c3f1b60f5eb0d5d1", "score": "0.5909449", "text": "public function show(){\n\t\t$sql= $this->link->query(\"SELECT category.name,product_tbl.cat_id,product_tbl.image,product_tbl.discount,product_tbl.price,product_tbl.product_name,product_tbl.id\n FROM product_tbl,category\n WHERE product_tbl.cat_id=category.id\");\n\t\treturn $sql;\n\t}", "title": "" }, { "docid": "3db08b09b5d562eec467a771156b4a90", "score": "0.58998466", "text": "public function generate_display() {\n echo \"\n <li> \n <div>\n <br>\n <a href=\\\"$this->link\\\">\n <p class=\\\"article-name\\\">$this->title</p>\n </a>\n <p>$this->authors</p>\n <p><em>$this->published_in</em></p>\n <p>$this->date</p>\n </div><!-- /li div -->\n </li>\n \";\n }", "title": "" }, { "docid": "1861e23b5d5da753d8aff85470f277a8", "score": "0.58981115", "text": "public function show($link)\n\t{\n\t\t$product_detail = new Products;\n\t\t$product_detail = $product_detail->findProductDetails($link)->first();\n\t\t$q = DB::table('products')->where('link',$link)->first();\n $view = $q->view+1;\n $query = DB::table('products')->where('link', $link)\n \t->update(['view'=> $view]);\n \t$image = DB::table('images_products')->select('id', 'image')->where('products_id', $product_detail->id)->get();\n\n \t $category = new Category;\n $category = $category->findCategoryName($product_detail->category_link)->first();\n \t$related = new Products;\n $related = $related->findRelatedProducts($category->id)->get();\n\n return view('fontend.pages.san-pham.show', compact('product_detail', 'image', 'related'));\n\t}", "title": "" }, { "docid": "565b28f4582275a42db9ccce9f4062fa", "score": "0.58976376", "text": "public function show_ar(Product $product)\n {\n //\n }", "title": "" }, { "docid": "163c72ff57dbf771e2327165da4b8c03", "score": "0.5872873", "text": "function getPro(){\n \tglobal $db;\n \t$get_products = \"SELECT * FROM products ORDER BY 1 DESC LIMIT 0,8\";\n \t$run_products = mysqli_query($db,$get_products);\n \twhile ($row_products=mysqli_fetch_array($run_products)) {\n \t\t$pro_id = $row_products['product_id'];\n \t\t$pro_title = $row_products['product_title'];\n \t\t$pro_price = $row_products['product_price'];\n \t\t$pro_img1 = $row_products['product_img1'];\n $pro_label = $row_products['product_label'];\n $manufacturer_id = $row_products['manufacturer_id'];\n $get_manufacturer =\"select * from manufacturers where manufacturer_id='$manufacturer_id'\";\n $run_manufacturer = mysqli_query($db,$get_manufacturer);\n $row_manufacturer= mysqli_fetch_array($run_manufacturer);\n $manufacturer_name =$row_manufacturer['manufacturer_title'];\n $pro_psp_price=$row_products['product_psp_price'];\n $pro_url=$row_products['product_url'];\n if ($pro_label==\"Sale\" or $pro_label==\"Gift\" or $pro_label==\"Offer\"){\n $product_price = \"<del>Kshs $pro_price</del>\";\n $product_psp_price = \" | Kshs $pro_psp_price\";\n }else{\n $product_psp_price =\"\";\n $product_price = \"Kshs $pro_price\"; \n }\n if ($pro_label ==\"\"){}else{\n $product_label=\"\n <a href='#' style='color:black;' class='label sale'>\n <div class='thelabel'>$pro_label</div>\n <div class='label-backgroud'></div>\n </a>\n \";\n }\n?>\n \t\n <div class=\"col-md-2 mb-2\">\n <div class=\"product_detail\">\n <div class=\"imgbox\">\n <a href=\"<?php echo $pro_url;?>\">\n <img src=\"admin_area/products_imges/<?php echo $pro_img1; ?>\" alt=\"shoes\" width=\"180px\" height=\"200px\"></a>\n </div>\n <div class=\"detail\">\n <h2><a href=\"<?php echo $pro_url;?>\"><?php echo $pro_title;?></a><div class=\"price\"><?php echo $product_price; echo $product_psp_price;?></div><br><span><?php echo $pro_title;?></span></h2>\n <ul class=\"ulproduct\">\n <li><span style=\"font-weight: bold;\">Manufacturer:</span>&nbsp;<?php echo $manufacturer_name;?></li>\n </ul>\n <label class=\"labell\">More</label>\n <a class=\"productlink\" href=\"<?php echo $pro_url;?>\">Detail</a>\n <a class=\"productlink\" href=\"<?php echo $pro_url;?>\">Add Cart</a>\n </div>\n </div>\n <?php echo \" $product_label\"; ?>\n </div>\n \t\n \t<?php }?>\n <?php }", "title": "" }, { "docid": "8eb556087b9b5652c5786fe222e5222f", "score": "0.58682096", "text": "public function hookDisplayFooterProduct($params)\n {\n $multisite = Configuration::get('AV_MULTISITE');\n $av_idshop = (!empty($multisite))? $this->context->shop->getContextShopID():null;\n if (Configuration::get('AV_MULTILINGUE', null, null, $av_idshop) == 'checked') {\n $this->id_lang = $this->context->language->id;\n $this->iso_lang = pSQL(Language::getIsoById($this->id_lang));\n $this->group_name = $this->getIdConfigurationGroup($this->iso_lang);\n }\n if (Configuration::get('AV_DISPLAYSNIPPETSITE', null, null, $av_idshop) == '1' && Configuration::get('AV_DISPLAYSNIPPETPRODUIT', null, null, $av_idshop) == '1') { //rich snippets actived\n $rs_choice = Configuration::get('AV_DISPLAYSNIPPETSITEGLOBAL', null, null, $av_idshop);\n $id_product = (int)Tools::getValue('id_product');\n $o_av = new NetReviewsModel();\n $stats_product = (!isset($this->stats_product) || empty($this->stats_product)) ?\n $o_av->getStatsProduct($id_product, $this->group_name, $av_idshop) :\n $this->stats_product;\n $lang_id = (isset($this->context->language->id) && !empty($this->context->language->id))?(int)$this->context->language->id:1;\n $product = new Product((int)$id_product);\n $product_description = strip_tags($product->description_short[$lang_id]);\n $array_url = NetReviewsModel::getUrlsProduct($product->id, $lang_id);\n $url_page = $array_url['url_product'];\n $url_image = $array_url['url_image_product'];// Image::getCover($id_product);\n $sku = $product->reference;\n $mpn = $product->supplier_reference;\n $gtin_upc = (isset($product->upc) && !empty($product->upc))?$product->upc:'';\n $gtin_ean = $product->ean13;\n $product_price = $product->getPrice(true, null, 2);\n $product_name = $product->name[$lang_id];\n $brand_name ='';\n $manufacturer = new Manufacturer($product->id_manufacturer, (int)$this->id_lang);\n if (isset($manufacturer->name)) {\n $brand_name = $manufacturer->name;\n }\n $this->smartyAssign(array(\n 'count_reviews' => !empty($stats_product)?$stats_product['nb_reviews']:false,\n 'average_rate' => !empty($stats_product)?round($stats_product['rate'], 1):false,\n 'product_id' => $id_product,\n 'product_name' => !empty($product_name)? $product_name: 'product name',\n 'product_description' => $product_description,\n 'product_price' => !empty($product_price)? $product_price: 0,\n 'product_quantity' => $product->quantity,\n 'product_url' => !empty($url_page)? $url_page: false,\n 'url_image' => !empty($url_image)? $url_image: false,\n 'sku' => !empty($sku)? $sku: false,\n 'mpn' => !empty($mpn)? $mpn: false,\n 'gtin_upc' => !empty($gtin_upc)? $gtin_upc: false,\n 'gtin_ean' => !empty($gtin_ean)? $gtin_ean: false,\n 'brand_name' => !empty($brand_name)? $brand_name: false,\n 'rs_choice'=>$rs_choice\n ));\n $tpl = 'avisverifies-product-snippets';\n return $this->displayTemplate($tpl);\n }\n }", "title": "" }, { "docid": "7abcc32921567f16b20b12f2ab63b504", "score": "0.58453375", "text": "public function displayViewProductLink($token = null, $id = 0, $name = null)\n {\n unset($name);\n unset($token);\n $tpl = $this->custom_smarty->createTemplate('list_action.tpl');\n $row = new KbSellerProduct($id);\n $admin_product_url = '';\n if (version_compare(_PS_VERSION_, '1.7.1.0', '<')) {\n $admin_product_url = $this->context->link->getAdminLink(\n 'AdminProducts',\n true,\n array('id_product' => $row->id_product)\n );\n } else {\n $admin_product_url = $this->context->link->getAdminLink(\n 'AdminProducts',\n true,\n array(),\n array('id_product' => $row->id_product)\n );\n }\n $tpl->assign(array(\n 'separate_tab' => true,\n 'href' => $admin_product_url,\n 'action' => $this->module->l('View', 'adminkbmarketplacecorecontroller'),\n 'icon' => 'icon-search-plus'\n ));\n $tpl->assign('kb_admin_dis_conf', $this->module->l('Do you want to disapprove?', 'adminkbmarketplacecorecontroller'));\n $tpl->assign('kb_admin_app_conf', $this->module->l('Do you want to approve?', 'adminkbmarketplacecorecontroller'));\n $tpl->assign('kb_admin_del_conf', $this->module->l('Do you want to delete?', 'adminkbmarketplacecorecontroller'));\n\n return $tpl->fetch();\n }", "title": "" }, { "docid": "55ff8635624858ea7aeb3637a187e126", "score": "0.583849", "text": "public function show(product $product)\n {\n //\n }", "title": "" }, { "docid": "55ff8635624858ea7aeb3637a187e126", "score": "0.583849", "text": "public function show(product $product)\n {\n //\n }", "title": "" }, { "docid": "55ff8635624858ea7aeb3637a187e126", "score": "0.583849", "text": "public function show(product $product)\n {\n //\n }", "title": "" }, { "docid": "3380a811c591a358518268b246675859", "score": "0.58342695", "text": "function woocommerce_output_related_products() {\n\twoocommerce_related_products(5,1); // Display 3 products in rows of 3\n}", "title": "" }, { "docid": "3838ac4d94ddc69f6eb6ca246d8a0473", "score": "0.5833408", "text": "function m_showComparelist()\n\t{\n\t\t$this->ObTpl=new template();\n\t\t$this->ObTpl->set_file(\"TPL_COMPARE_FILE\",$this->template);\n\n\t\t$this->ObTpl->set_var(\"TPL_VAR_SITEURL\",SITE_URL);\t\n\t\t$this->ObTpl->set_var(\"TPL_VAR_GRAPHICSURL\",GRAPHICS_PATH);\t\n\t\t$this->ObTpl->set_var(\"TPL_VAR_CURRENCY\",CONST_CURRENCY);\n\t\t$this->ObTpl->set_var(\"TPL_VAR_USERNAME\",$this->libFunc->m_displayContent($_SESSION['username']));\n\t\t\n\t\t#SETTING TEMPLATE BLOCKS\n\t\t$this->ObTpl->set_block(\"TPL_COMPARE_FILE\",\"TPL_MAINPRODUCT_BLK\",\"mainproduct_blk\");\n\t\t$this->ObTpl->set_block(\"TPL_COMPARE_FILE\",\"TPL_MSG_BLK\",\"msg_blk\");\n\t\t$this->ObTpl->set_block(\"TPL_MAINPRODUCT_BLK\",\"TPL_PRODUCT_BLK\",\"product_blk\");\n\t\t$this->ObTpl->set_block(\"TPL_PRODUCT_BLK\",\"TPL_ATTRIBUTEFIELD_BLK\",\"attributefield_blk\");\n\t\n\n\t\t#INTIALIZING \n\t\t$this->ObTpl->set_var(\"msg_blk\",\"\");\n\t\t$this->ObTpl->set_var(\"mainproduct_blk\",\"\");\n\t\t$this->ObTpl->set_var(\"product_blk\",\"\");\n\t\t\n\t\t$this->ObTpl->set_var(\"attributefield_blk\",\"\");\n\t\t\n\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",\"\");\n\t\t$this->ObTpl->set_var(\"fieldname_blk\",\"\");\n\n\t\t$this->ObTpl->set_var(\"TPL_VAR_COMPARELIST\",MSG_VAR_COMPARELIST);\n\t\t#*******************DISPLAY MAIN PRODUCT*****************************\n\t\t##WISHLIST URL\n\t\t$compareModifyUrl=SITE_URL.\"ecom/index.php?action=compare.modify\";\n\t\t$this->ObTpl->set_var(\"TPL_VAR_COMPAREMODIFYURL\",$this->libFunc->m_safeUrl($compareModifyUrl));\t\n\t\n\t\n\t\t#******************DISPLAY WISHLIST PRODUCT**********************\n\t\t#QUERY TO GET PRODUCTS UNDER SELECTED \n\t\t$query =\"SELECT iCompareid_PK,vTitle,vSku,vSeoTitle,tShortDescription,fListPrice,fPrice,iProdid_PK,iVendorid_FK FROM \".PRODUCTS.\",\".COMPARE.\" WHERE iProductid_FK=iProdid_PK AND iCustomerid_FK='\".$_SESSION['userid'].\"'\";\n\t\t$pn\t\t\t= new PrevNext($this->pageTplPath, $this->pageTplFile,$this->obDb);\n\t\techo $this->request['mode'];\n\t\t$extraStr\t=\"action=ecom.compare&mode=\".$this->request['mode'];\n\t\t$pn->formno=1;\n\t\t$navArr\t= $pn->create($query, $this->pageSize, $extraStr);\n\t\t$this->obDb->query=$navArr['query'];\n\n\t\t$rowProduct=$this->obDb->fetchQuery();\n\t\t$productCount=$this->obDb->record_count;\n\t\tif($productCount>0)\n\t\t{\n\t\t\tfor($i=0;$i<$productCount;$i++)\n\t\t\t{\n\t\t\t\t$productUrl=SITE_URL.\"ecom/index.php?action=ecom.pdetails&mode=\".$rowProduct[$i]->vSeoTitle;\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_PRODUCTURL\",$this->libFunc->m_safeUrl($productUrl));\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_ID\",$this->libFunc->m_displayContent($rowProduct[$i]->iCompareid_PK));\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_TITLE\",$this->libFunc->m_displayContent($rowProduct[$i]->vTitle));\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SKU\",$this->libFunc->m_displayContent($rowProduct[$i]->vSku));\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SHORTDESC\",$this->libFunc->m_displayContent($rowProduct[$i]->tShortDescription));\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_PRICERRP\", CONST_CURRENCY.number_format($rowProduct[$i]->fListPrice, 2, '.', ''));\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_PRICEMAIN\",CONST_CURRENCY.number_format($rowProduct[$i]->fPrice, 2, '.', ''));\n\t\t\t\t\n\t\t\t\t$this->obDb->query = \"SELECT vCompany FROM \" . SUPPLIERS . \" WHERE iVendorid_PK='\" . $rowProduct[$i]->iVendorid_FK . \"'\";\n\t\t\t\t$vendor = $this->obDb->fetchQuery();\n\t\t\t\tif ($vendor[0]->vCompany!=\"\"){\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SUPPLIER\",$vendor[0]->vCompany);\n\t\t\t\t}else{\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SUPPLIER\",\"N/A\");\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t#DISPLAY PRODUCT ATTRIBUTE \n\t\t\t\t\t\t$this->obDb->query=\"SELECT * FROM \".PRODUCTATTRIBUTES.\" WHERE iProductid_FK ='\".$rowProduct[0]->iProdid_PK.\"'\" ; \n\t\t\t\t\t\t$attributerow =$this->obDb->fetchQuery();\n\t\t\t\t\t\t$attcount = $this->obDb->record_count;\n\t\t\t\t\t\tif ($attcount > 0){\n\t\t\t\t\t\t\t$this->obDb->query=\"SELECT A.*, AV.tValues FROM \".ATTRIBUTES.\" A, \".ATTRIBUTEVALUES.\" AV WHERE AV.iValueId_PK=\".$attributerow[0]->iValueid_FK.\" AND A.iAttributesid_PK = \".$attributerow[0]->iAttributeid_FK;\n\t\t\t\t\t\t\t$attribute = $this->obDb->fetchQuery();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ($attribute[0]->vAttributeTitle!=\"\")\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_ATTRIBUTETITLE\",$attribute[0]->vAttributeTitle);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$attdesc = explode(\"¬\",$attribute[0]->tValues);\n\t\t\t\t\t\t\t\t$attfieldname= explode(\"¬\",$attribute[0]->vFieldname);\n\t\t\t\t\t\t\t\t$prefix = explode(\"¬\",$attribute[0]->vPrefix);\n\t\t\t\t\t\t\t\t$suffix = explode(\"¬\",$attribute[0]->vSuffix);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tfor ($i=0;$i<$attribute[0]->iFieldnumber;$i++)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_FILEDNAME\",$attfieldname[$i]);\n\t\t\t\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_FIELDVALUE\",$attdesc[$i]);\t\t\n\t\t\t\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_PREFIX\",$prefix[$i]);\n\t\t\t\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SUFFIX\",$suffix[$i]);\n\t\t\t\t\t\t\t\t$this->ObTpl->parse(\"attributefield_blk\",\"TPL_ATTRIBUTEFIELD_BLK\",true);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$this->ObTpl->parse(\"attributetable_blk\",\"TPL_ATTRIBUTETABLE_BLK\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t#DISPALY PRICE FOR SELECTED PRODUCT\t\t\t\t\n\n\n\t\t\t\t$this->ObTpl->parse(\"product_blk\",\"TPL_PRODUCT_BLK\",true);\t\n\t\t\t}\n\t\t\t$this->ObTpl->parse(\"mainproduct_blk\",\"TPL_MAINPRODUCT_BLK\");\t\n\t\t\n\t\t}else\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",MSG_NOPRODUCT_WISHLIST);\n\t\t\t$this->ObTpl->parse(\"msg_blk\",\"TPL_MSG_BLK\");\n\t\t}\n\t\treturn($this->ObTpl->parse(\"return\",\"TPL_COMPARE_FILE\"));\n\t}", "title": "" }, { "docid": "364a14404b6223e1bcc64dca732470da", "score": "0.58329064", "text": "function display(){\n\t# Global Variables\n\tglobal $cur_page, $_db;\n\t\n\t# Get Data\n\t$data\t\t\t\t\t\t\t\t\t= $_db->fetch(\"\tSELECT\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t*\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t`categories`\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tORDER BY\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t`name`\");\n\t\n\t# Generate Listing\n\t$head\t\t\t\t\t\t\t\t\t= array(\"#\", \"Name\");\n\t$body\t\t\t\t\t\t\t\t\t= array();\n\tforeach ($data as $item) {\n\t\t$body[]\t\t\t\t\t\t\t\t= array(\t$item->uid . \" <a href='$cur_page&action=delete&id={$item->uid}' class='remove'>x</a>\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"<a href='$cur_page&action=profile&id={$item->uid}'>\" . $item->name . \"</a>\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t}\n\t$listing\t\t\t\t\t\t\t\t= results_table($head, $body);\n\t\n\t# Generate HTML\n\t$html\t\t\t\t\t\t\t\t\t= \"\n\t\n\t<div class='content' id='content'>\n\t\n\t\t<h2><span class=''></span>Product Categories</h2>\n\t\t\t\t\n\t\t\" . button(\"Add\", \"$cur_page&action=add\") . \"\n\t\t\n\t\t<!-- Listing -->\n\t\t{$listing}\n\t\n\t</div><!-- END: Content -->\n\t\";\n\t\n\t# Display HTML\n\tprint $html;\n}", "title": "" }, { "docid": "a9f6c0db830dd8c2ad4d639a1ed9fea1", "score": "0.58265966", "text": "function displayLinkToParent($product_parent_id) {\n\t\t$db = JFactory::getDBO();\n\t\t$db->setQuery(' SELECT * FROM `#__virtuemart_products_'.VMLANG.'` as l JOIN `#__virtuemart_products` using (`virtuemart_product_id`) WHERE `virtuemart_product_id` = '.$product_parent_id);\n\t\tif ($parent = $db->loadObject()){\n\t\t\t$result = JText::sprintf('COM_VIRTUEMART_LIST_CHILDREN_FROM_PARENT', $parent->product_name);\n\t\t\techo JHTML::_('link', JRoute::_('index.php?view=product&product_parent_id='.$product_parent_id.'&option=com_virtuemart'), $parent->product_name, array('title' => $result));\n\t\t}\n\t}", "title": "" }, { "docid": "fbc8ed56618e54ba0b37f3ecf6c32540", "score": "0.5816604", "text": "function get_product_tab_label()\r\n {\r\n ?>\r\n <li class=\"wpc_parts_tab\"><a href=\"#wpc_parts_tab_data\"><?php _e( 'Product parts', 'wpd' ); ?></a></li>\r\n <?php\r\n }", "title": "" }, { "docid": "292c013fd9af2f65b378915cd4b68e92", "score": "0.57899404", "text": "static function display() {\n\n\t\techo parent::car_detail();\n\n\t}", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "96644a72013c5d9ae19cd307f9cb0771", "score": "0.5784806", "text": "public function show(Product $product)\n {\n //\n }", "title": "" }, { "docid": "7840af238cc4868f478d926a00cf48ef", "score": "0.57624716", "text": "public function show(Product $product)\n {\n\n }", "title": "" }, { "docid": "7840af238cc4868f478d926a00cf48ef", "score": "0.57624716", "text": "public function show(Product $product)\n {\n\n }", "title": "" }, { "docid": "7840af238cc4868f478d926a00cf48ef", "score": "0.57624716", "text": "public function show(Product $product)\n {\n\n }", "title": "" }, { "docid": "7840af238cc4868f478d926a00cf48ef", "score": "0.57624716", "text": "public function show(Product $product)\n {\n\n }", "title": "" }, { "docid": "ebded3819c4e7fa930513fcd008904a0", "score": "0.5759962", "text": "public function show(loan_products $loan_products)\n {\n //\n }", "title": "" }, { "docid": "e00370f4721bcb0c1ffb434f2fd9f236", "score": "0.5758594", "text": "function show_product_list($edit_id,$alert='')\n\t{\n\t\tglobal $db,$ecom_siteid;\n\t\t\t // Get the list of paroduct assigned for the static page group\n\t\t\t\t$sql_products = \"select p.product_id,p.product_name,adp.id,adp.advert_display_product_hide FROM\nproducts p,advert_display_product adp\nWHERE adp.products_product_id=p.product_id AND adp.sites_site_id=$ecom_siteid\nAND adverts_advert_id=$edit_id ORDER BY product_name\";\n\t\t\t\t$ret_products = $db->query($sql_products);\n\t?>\n\t\t\t\t\t<table width=\"100%\" cellpadding=\"1\" cellspacing=\"1\" border=\"0\">\n\t\t\t\t\t<?php \n\t\t\t\t\t\tif($alert)\n\t\t\t\t\t\t{\n\t\t\t\t\t?>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td colspan=\"6\" align=\"center\" class=\"errormsg\"><?php echo $alert?></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t <?php\n\t\t\t\t \t\t}\n\t\t\t\t\t\tif ($db->num_rows($ret_products))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$table_headers = array('<img src=\"images/checkbox.gif\" border=\"0\" onclick=\"select_all(document.frmEditAdverts,\\'checkboxproducts[]\\')\"/><img src=\"images/uncheckbox.gif\" border=\"0\" onclick=\"select_none(document.frmEditAdverts,\\'checkboxproducts[]\\')\"/>','Slno.','Product Name','Hidden');\n\t\t\t\t\t\t\t$header_positions=array('center','center','left','center','center');\n\t\t\t\t\t\t\t$colspan = count($table_headers);\n\t\t\t\t\t\t\techo table_header($table_headers,$header_positions); \n\t\t\t\t\t\t\t$cnt = 1;\n\t\t\t\t\t\t\twhile ($row_products = $db->fetch_array($ret_products))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$cls = ($cnt%2==0)?'listingtablestyleA':'listingtablestyleB';\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td width=\"5%\" align=\"center\" class=\"<?php echo $cls?>\"><input type=\"checkbox\" name=\"checkboxproducts[]\" value=\"<?php echo $row_products['id'];?>\" /></td>\n\t\t\t\t\t\t\t\t\t<td width=\"5%\" align=\"center\" class=\"<?php echo $cls?>\"><?php echo $cnt++?>.</td>\n\t\t\t\t\t\t\t\t\t<td align=\"left\" class=\"<?php echo $cls?>\"><a href=\"home.php?request=products&fpurpose=edit&checkbox[0]=<?php echo $row_products['product_id'];?>\" class=\"edittextlink\" title=\"Edit\"><?php echo stripslashes($row_products['product_name']);?></a></td>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<td class=\"<?php echo $cls?>\" align=\"center\"><?php echo ($row_products['advert_display_product_hide']==1)?'Yes':'No'?></td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t <td colspan=\"5\" align=\"center\" valign=\"middle\" class=\"norecordredtext_small\">No product Assigned to this Advert. \n\t\t\t\t\t\t\t\t <input type=\"hidden\" name=\"products_norec\" id=\"products_norec\" value=\"1\" /></td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t}\n\t\t\t\t\t\t?>\t\n\t\t\t\t</table>\t\n\t<?php\t\n\t}", "title": "" }, { "docid": "0ca6cbd441bb42817d03bf6016ec2b46", "score": "0.5757749", "text": "function displayCart($db, $product_id) {\r\n $sql = $db->prepare(\"SELECT products.product_id as product_id, categories.category as category, products.product as product, products.price as price, products.image as image \r\n FROM products \r\n INNER JOIN categories \r\n ON categories.category_id = products.category_id \r\n WHERE products.product_id = :product_id\");\r\n $binds = array(\r\n \":product_id\" => $product_id\r\n );\r\n $product=array();\r\n if ($sql->execute($binds) && $sql->rowCount() > 0) {\r\n $products = $sql->fetch(PDO::FETCH_ASSOC);\r\n\r\n\r\n $table = \"<tr>\";\r\n $table .= \"<td>\" . $products['category'] . \"</td>\";\r\n $table .= \"<td>\" . $products['product'] . \"</td>\";\r\n $table .= \"<td>$\" . $products['price'] . \"</td>\";\r\n $table .= \"<td><img src='images/\" . $products['image'] . \"' width='300' height='200'/></td>\";\r\n } else {\r\n $table = \"\";\r\n }\r\n\r\n return $table;\r\n}", "title": "" }, { "docid": "7dd1d563cd7716f2d46cebad4ebb62f9", "score": "0.5756339", "text": "public function toString()\n {\n return 'Only products in stock is presented in layered navigation';\n }", "title": "" }, { "docid": "6d0b4e78a1243c7a73c8838dca144f4c", "score": "0.57455844", "text": "public function detail(){\r\n $this->post();\r\n $this->model->getDetailProduct();\r\n $this->extra();\r\n $this->model->setPage('shop');\r\n $this->model->setPageHeader($this->model->page);\r\n $this->model->fillMenuItems();\r\n include_once 'views/productDetailDoc.php';\r\n $view = new productDetailDoc($this->model);\r\n $view->show();\r\n }", "title": "" }, { "docid": "e8cce51b71ca5abedcfc19187428d1af", "score": "0.5742244", "text": "function display_product_price($product)\n { \n \t$min_price = $product->price;\n \t$productPrice=\\App\\ProductPrice::where('product_id',$product->id)->get();\n \tif(!empty($productPrice))\n \t{\n \t\tforeach ($productPrice as $key => $value) {\n \t\t\tif($value->price < $min_price)\n \t\t\t{\n \t\t\t\t$min_price = $value->price;\n \t\t\t}\n \t\t}\n \t} \n\t\t\n\t\t$min_price = priceFormat($min_price);\n\t\t\n\t\t$pricestr =\"\";\n\t\tif($product->price_sqft_area == 1){\n\t\t\t$pricestr =\"As Low as <strong>$\".$min_price.\"/sq.ft. </strong>\";\n\t\t}elseif($product->show_width_height == 1){\n\t\t\t$pricestr =\"Starting at <strong>$\".$min_price.\"/sq.ft. </strong>\";\n\t\t}else{\n\t\t\t$pricestr =\"Starting at <strong>$\".$min_price.\" </strong>\";\n\t\t}\n\t return $pricestr;\n }", "title": "" }, { "docid": "8697c3543420a9eb396669a97e3d802e", "score": "0.57244396", "text": "public function show(products $products)\n {\n //\n }", "title": "" }, { "docid": "b26ea9ecff76b48467195e25ed90d939", "score": "0.57210267", "text": "public function show(Product $product)\n {\n \n }", "title": "" } ]
fd5191febb3f8b753cfda5204ac0e525
JSON representing this object
[ { "docid": "d89a574d3c4748f3263e832aa636a30e", "score": "0.77302766", "text": "public function jsonSerialize() {\n return json_encode($this->toArray());\n }", "title": "" } ]
[ { "docid": "ce24d5155a31ddafd53f3a0e4c7a1afc", "score": "0.8218275", "text": "public function getJSONRepresentation () {\n return json_encode($this);\n }", "title": "" }, { "docid": "4a433645f4991f879dfce7255594565f", "score": "0.81473464", "text": "public function toJSON()\n {\n return json_encode($this);\n }", "title": "" }, { "docid": "4a433645f4991f879dfce7255594565f", "score": "0.81473464", "text": "public function toJSON()\n {\n return json_encode($this);\n }", "title": "" }, { "docid": "c0b42646f29c8081e20cb95be18b045f", "score": "0.81418085", "text": "public function toJSON()\n\t{\n\t\treturn json_encode($this);\n\t}", "title": "" }, { "docid": "90d2519208cb9769f96d060cd5d0a9aa", "score": "0.81205106", "text": "public function jsonSerialize() {\n return $this->__toString();\n }", "title": "" }, { "docid": "2a66a5143a55c3155132dc4b55f47145", "score": "0.80982304", "text": "public function toJSON(){\n return json_encode( $this->JsonSerialize());\n }", "title": "" }, { "docid": "e9566dd46aa2e25e9d87c289f956af58", "score": "0.8083792", "text": "public function __toString() {\n return json_encode($this);\n }", "title": "" }, { "docid": "704cd01cfe972dd22249b19571e88593", "score": "0.80657834", "text": "public function get_json() {\n\t\treturn json_encode($this);\n\t}", "title": "" }, { "docid": "a34ce6290b7d9c09ab4144f78a0f1d40", "score": "0.8061924", "text": "public function jsonSerialize() {\n\t\t\treturn $this->__toString();\n\t\t}", "title": "" }, { "docid": "397e33d5467456687c1b0959e4bb233c", "score": "0.80612403", "text": "public function __toString() {\n\n return json_encode($this);\n }", "title": "" }, { "docid": "b1b7a3166b0744f31b3710c92c8b4ae7", "score": "0.80325866", "text": "public function __toString() {\n return json_encode( $this->jsonSerialize() );\n }", "title": "" }, { "docid": "a7e218e4aa05dbd061af6f4ed706cefc", "score": "0.8030386", "text": "public function ToJSON(){\n //Se puede poner en private los atributos que no quiero que salgan en el JSON\n return json_encode($this);\n }", "title": "" }, { "docid": "3400e3926bb33122f8babcbd320c151a", "score": "0.80067986", "text": "public function toJson() {\r\n return json_encode($this);\r\n }", "title": "" }, { "docid": "0115dd6e6e41204ded53bbb89eb8768e", "score": "0.7996356", "text": "public function __toString() {\n return json_encode($this);\n }", "title": "" }, { "docid": "bd7cb61598d73f97ceb88f7ac1cd683f", "score": "0.7975739", "text": "public function __toString()\n {\n return json_encode($this);\n }", "title": "" }, { "docid": "5bb111b0cd04bb44dd42b0a518d8947f", "score": "0.7943521", "text": "public function toJson()\n {\n return json_encode($this);\n }", "title": "" }, { "docid": "5be088f13930996d2817af3b2772a3ea", "score": "0.79172707", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\MuhimbiPDFOnline\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\MuhimbiPDFOnline\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "591ab63174d3ab08b8d091a9684786d4", "score": "0.79085547", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Yext\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Yext\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "79083a6926b122ba62852a6625b915a0", "score": "0.7901071", "text": "public function toJson()\n {\n return json_encode($this->toStdClass());\n }", "title": "" }, { "docid": "3abd8eae4cc622d7dbbacc3f6e8f9345", "score": "0.78968793", "text": "public function toJSON(){\n\t\treturn json_encode($this->toObject());\n\t}", "title": "" }, { "docid": "468b8f33ebe407f4d756f0a93f7dec41", "score": "0.7894169", "text": "public function jsonSerialize() {\n return JsonHelper::makeSerializable($this);\n }", "title": "" }, { "docid": "468b8f33ebe407f4d756f0a93f7dec41", "score": "0.7894169", "text": "public function jsonSerialize() {\n return JsonHelper::makeSerializable($this);\n }", "title": "" }, { "docid": "0da38f45046fdb246a2dfb47dabe72cb", "score": "0.7886816", "text": "public function makeJSON()\n {\n return(json_encode($this));\n }", "title": "" }, { "docid": "0da38f45046fdb246a2dfb47dabe72cb", "score": "0.7886816", "text": "public function makeJSON()\n {\n return(json_encode($this));\n }", "title": "" }, { "docid": "1bde8ab7bb882ed5a7394feb68750197", "score": "0.7880175", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\KuntaAPI\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\KuntaAPI\\ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "1bde8ab7bb882ed5a7394feb68750197", "score": "0.7880175", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\KuntaAPI\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\KuntaAPI\\ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "5936fd382e17648e23a1fee2adcaf2d4", "score": "0.7880032", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Alfresco\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Alfresco\\ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "5936fd382e17648e23a1fee2adcaf2d4", "score": "0.7880032", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Alfresco\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Alfresco\\ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "3daad43bbe17642982c0b22520564579", "score": "0.78720427", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\BumbalClient\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\BumbalClient\\ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "3daad43bbe17642982c0b22520564579", "score": "0.78720427", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\BumbalClient\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\BumbalClient\\ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "56b5a9b6c64d1c3eba39ce809a8856b1", "score": "0.7865959", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\RetroTax\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\RetroTax\\ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "3048e62f83d5d6837918feadd3cec2dd", "score": "0.78638846", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\MessageMedia\\RESTAPI\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\MessageMedia\\RESTAPI\\ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "3048e62f83d5d6837918feadd3cec2dd", "score": "0.78638846", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\MessageMedia\\RESTAPI\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\MessageMedia\\RESTAPI\\ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "0d142b3aef6374b97c8640b4221e2b12", "score": "0.7862427", "text": "public function __toString()\r\n {\r\n return json_encode($this);\r\n\r\n }", "title": "" }, { "docid": "dc20c5155b3ef0ed757a4a01d78fa231", "score": "0.78499603", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\ESI\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\ESI\\ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "bac3ad049f506f058e25f9c1f6d8fe52", "score": "0.7836055", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\zipMoney\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\zipMoney\\ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "48449862356f060f8e05e4b761ea6343", "score": "0.7835651", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\SquareConnect\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\SquareConnect\\ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "919b18c97b8d6e5b1510f8f370b538fb", "score": "0.78343284", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Squiggle\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Squiggle\\ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "737d3a810938b572d31e14941b74b979", "score": "0.7823143", "text": "public function toJSON() {\n return json_encode( $this->toArray( false ) );\n }", "title": "" }, { "docid": "7dc49b054c077037243e70e6a0187c80", "score": "0.781957", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\SprintPay\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\SprintPay\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "96405a5eadcec7a1865133a6a1fb1065", "score": "0.78060925", "text": "public function __toString()\n {\n return json_encode($this, JSON_PRETTY_PRINT);\n }", "title": "" }, { "docid": "d818c419ad30011057c2ab4814f47e0d", "score": "0.78026515", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Spinen\\ConnectWise\\Clients\\System\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Spinen\\ConnectWise\\Clients\\System\\ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "e54683e305dc0f67cddab0d4482e04f1", "score": "0.7787179", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Progrupa\\Azure\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Progrupa\\Azure\\ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "e54683e305dc0f67cddab0d4482e04f1", "score": "0.7787179", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Progrupa\\Azure\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Progrupa\\Azure\\ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "3f01317f80ad602f18945097dbce1093", "score": "0.7780147", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\METHIS\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\METHIS\\ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "cdb23e84eab0ce6b5f294450f4628511", "score": "0.7776067", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\VoloCommerce\\Api\\v1\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\VoloCommerce\\Api\\v1\\ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "5b4cf78df7ef720b29af3bf6334c5734", "score": "0.7771414", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "5b4cf78df7ef720b29af3bf6334c5734", "score": "0.7771414", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "5b4cf78df7ef720b29af3bf6334c5734", "score": "0.7771414", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "5b4cf78df7ef720b29af3bf6334c5734", "score": "0.7771414", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "5b4cf78df7ef720b29af3bf6334c5734", "score": "0.7771414", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "5b4cf78df7ef720b29af3bf6334c5734", "score": "0.7771414", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "5b4cf78df7ef720b29af3bf6334c5734", "score": "0.7771414", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "5b4cf78df7ef720b29af3bf6334c5734", "score": "0.7771414", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "5b4cf78df7ef720b29af3bf6334c5734", "score": "0.7771414", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "5b4cf78df7ef720b29af3bf6334c5734", "score": "0.7771414", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "5d39f7d12fe649ce738a9a2406aa7f45", "score": "0.77676946", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Abulia\\TflUnified\\Swagger\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Abulia\\TflUnified\\Swagger\\ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "5d39f7d12fe649ce738a9a2406aa7f45", "score": "0.77676946", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Abulia\\TflUnified\\Swagger\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Abulia\\TflUnified\\Swagger\\ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "5d39f7d12fe649ce738a9a2406aa7f45", "score": "0.77676946", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Abulia\\TflUnified\\Swagger\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Abulia\\TflUnified\\Swagger\\ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "0cf39a25fc2b5096282bf999dd6e1944", "score": "0.77657974", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\CyberSource\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\CyberSource\\ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "0cf39a25fc2b5096282bf999dd6e1944", "score": "0.77657974", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\CyberSource\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\CyberSource\\ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "e8610b35bf777e4fea85e0cddc9d5472", "score": "0.77630204", "text": "public function encodeJSON() {\n return $this->objectToArray($this);\n }", "title": "" }, { "docid": "43ad0e64d5833f78c76b865dee2827af", "score": "0.77587706", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Secuconnect\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Secuconnect\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "b03ef2b87a9c449c6dd40a1085dafc74", "score": "0.77555716", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) {\n return json_encode(\\SquareConnect\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n } else {\n return json_encode(\\SquareConnect\\ObjectSerializer::sanitizeForSerialization($this));\n }\n }", "title": "" }, { "docid": "b03ef2b87a9c449c6dd40a1085dafc74", "score": "0.77555716", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) {\n return json_encode(\\SquareConnect\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n } else {\n return json_encode(\\SquareConnect\\ObjectSerializer::sanitizeForSerialization($this));\n }\n }", "title": "" }, { "docid": "b03ef2b87a9c449c6dd40a1085dafc74", "score": "0.77555716", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) {\n return json_encode(\\SquareConnect\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n } else {\n return json_encode(\\SquareConnect\\ObjectSerializer::sanitizeForSerialization($this));\n }\n }", "title": "" }, { "docid": "f81ee2f2a4f986c5198915d50f98f5f2", "score": "0.77344555", "text": "function __toString()\n {\n return json_encode($this);\n }", "title": "" }, { "docid": "c209eb74dc035163df2188d2010fe3a7", "score": "0.7734351", "text": "public function jsonSerialize()\n {\n return ['id' => $this->getId(), 'logo' => $this->getLogo(), 'name' => $this->getName()];\n }", "title": "" }, { "docid": "6cef02a951bc5772a98f92a2b8f8faf9", "score": "0.7732337", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) {\n return json_encode(\\gooten.api.client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n } else {\n return json_encode(\\gooten.api.client\\ObjectSerializer::sanitizeForSerialization($this));\n }\n }", "title": "" }, { "docid": "5bc288e8a6011c948766ee149eb98d9e", "score": "0.77273124", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) {\n return json_encode(\\BrightpearlApiClient\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n } else {\n return json_encode(\\BrightpearlApiClient\\ObjectSerializer::sanitizeForSerialization($this));\n }\n }", "title": "" }, { "docid": "5bc288e8a6011c948766ee149eb98d9e", "score": "0.77273124", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) {\n return json_encode(\\BrightpearlApiClient\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n } else {\n return json_encode(\\BrightpearlApiClient\\ObjectSerializer::sanitizeForSerialization($this));\n }\n }", "title": "" }, { "docid": "5bc288e8a6011c948766ee149eb98d9e", "score": "0.77273124", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) {\n return json_encode(\\BrightpearlApiClient\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n } else {\n return json_encode(\\BrightpearlApiClient\\ObjectSerializer::sanitizeForSerialization($this));\n }\n }", "title": "" }, { "docid": "5bc288e8a6011c948766ee149eb98d9e", "score": "0.77273124", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) {\n return json_encode(\\BrightpearlApiClient\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n } else {\n return json_encode(\\BrightpearlApiClient\\ObjectSerializer::sanitizeForSerialization($this));\n }\n }", "title": "" }, { "docid": "5576cdecb3a9437e52b4c089a617ccf1", "score": "0.77260154", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\App\\apiModels\\internal\\v2\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\App\\apiModels\\internal\\v2\\ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "b4d5393ae49f5806d6a774633e307b5e", "score": "0.7717108", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Sales\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Sales\\ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "4c22c1943164ec9cd4195d8934da4ce5", "score": "0.77111936", "text": "public function toJSON() {\r\n $array = $this->toArray();\r\n return json_encode($array);\r\n }", "title": "" }, { "docid": "fb70265b043b5f83c2bd700bb4a515e8", "score": "0.7710575", "text": "public function __toString() {\n return $this->toJSON();\n }", "title": "" }, { "docid": "6ea950863cb2a4fafaf9729e31d8f76e", "score": "0.77096635", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) {\n return json_encode(\\DocuSign\\eSign\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n } else {\n return json_encode(\\DocuSign\\eSign\\ObjectSerializer::sanitizeForSerialization($this));\n }\n }", "title": "" }, { "docid": "6ea950863cb2a4fafaf9729e31d8f76e", "score": "0.77096635", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) {\n return json_encode(\\DocuSign\\eSign\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n } else {\n return json_encode(\\DocuSign\\eSign\\ObjectSerializer::sanitizeForSerialization($this));\n }\n }", "title": "" }, { "docid": "6ea950863cb2a4fafaf9729e31d8f76e", "score": "0.77096635", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) {\n return json_encode(\\DocuSign\\eSign\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n } else {\n return json_encode(\\DocuSign\\eSign\\ObjectSerializer::sanitizeForSerialization($this));\n }\n }", "title": "" }, { "docid": "da1ef33fa73a5680dcc5715b03a00f68", "score": "0.7707948", "text": "public function json() {\n\t\t$this->to_json();\n\t\treturn $this->json;\n\t}", "title": "" }, { "docid": "ea17d812f0615ebf4a6d5c5666d4e368", "score": "0.7705326", "text": "public function __toString()\n {\n\n return json_encode($this->data);\n }", "title": "" }, { "docid": "028415707945561cc316ee72b380606b", "score": "0.77042615", "text": "public function __toString()\r\n {\r\n if (defined('JSON_PRETTY_PRINT')) {\r\n return json_encode(\\SquareConnect\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\r\n } else {\r\n return json_encode(\\SquareConnect\\ObjectSerializer::sanitizeForSerialization($this));\r\n }\r\n }", "title": "" }, { "docid": "6cff3c77335cace05e8bcb3ab48a4ef0", "score": "0.7702706", "text": "public function __toString()\n {\n return json_encode($this->data);\n }", "title": "" }, { "docid": "beed9b377e45604550687dcc6f2f5b92", "score": "0.7700842", "text": "public function __toString () {\n\t\treturn json_encode($this->data);\n\t}", "title": "" }, { "docid": "41be51c2b9fa0c618b9b0dc8b2f30d18", "score": "0.77007306", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\ispserverfarm\\sevdesk\\phpclient\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\ispserverfarm\\sevdesk\\phpclient\\ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "41be51c2b9fa0c618b9b0dc8b2f30d18", "score": "0.77007306", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\ispserverfarm\\sevdesk\\phpclient\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\ispserverfarm\\sevdesk\\phpclient\\ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "ec45b1bf07910e82d5235aea3b6b9896", "score": "0.7699683", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\nullx27\\ESI\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\nullx27\\ESI\\ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "9d572eca20065fca0f64ec44657e4c0f", "score": "0.7696445", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Finance\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Finance\\ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "2f545c7d64d6e216100e2c2d1933753d", "score": "0.7693205", "text": "public function toJSON() {\n return json_encode($this->toArray());\n }", "title": "" }, { "docid": "1cc8c9788f77d370c9cd48834dc73707", "score": "0.7690583", "text": "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "title": "" }, { "docid": "1cc8c9788f77d370c9cd48834dc73707", "score": "0.7690583", "text": "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "title": "" }, { "docid": "1cc8c9788f77d370c9cd48834dc73707", "score": "0.7690583", "text": "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "title": "" }, { "docid": "1cc8c9788f77d370c9cd48834dc73707", "score": "0.7690583", "text": "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "title": "" }, { "docid": "1cc8c9788f77d370c9cd48834dc73707", "score": "0.7690583", "text": "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "title": "" }, { "docid": "1cc8c9788f77d370c9cd48834dc73707", "score": "0.7690583", "text": "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "title": "" }, { "docid": "1cc8c9788f77d370c9cd48834dc73707", "score": "0.7690583", "text": "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "title": "" } ]
d7637cab9d14114b53712e1b4451b65c
SETTER interactive action; read a value and stor as value; the variable must exist in config; if a pattern was given the input will be verified against it.
[ { "docid": "56e1e09c606a5a5ff691a28ba4543ad6", "score": "0.49760398", "text": "public function read($sVar) {\n if (!array_key_exists($sVar, $this->_aConfig['params'])) {\n die(__CLASS__ . ':: ERROR in cli config: missing key [params]->[' . $sVar . '] in [array].');\n }\n // remark ... check of this key was done in _getGetoptParams already\n echo $this->_aConfig['params'][$sVar]['shortinfo'] . \"\\n\";\n\n $bOK = false;\n while (!$bOK) {\n\t\t\tif (array_key_exists('description', $this->_aConfig['params'][$sVar])){\n\t\t\t\techo $this->_aConfig['params'][$sVar]['description'] . \"\\n\";\n\t\t\t}\n $sValue = $this->_cliInput($sVar . '>');\n\n if ($this->_checkPattern($sVar, $sValue)) {\n // echo \"Thank you.\\n\";\n $bOK = true;\n }\n }\n // put value to the value store too\n $this->setValue($sVar, $sValue);\n return $sValue;\n }", "title": "" } ]
[ { "docid": "ffbcec2d7522f7806e767bb70691ec35", "score": "0.5609276", "text": "function setValue( $value );", "title": "" }, { "docid": "df8432f42dfe9639ce8ea134c9fdf69d", "score": "0.5376875", "text": "function set($args, $options)\n {\n $conf = $current = \\Pyrus\\Config::current();\n if ($options['plugin']) {\n $conf = \\Pyrus\\Config::singleton(\\Pyrus\\Config::current()->plugins_dir);\n }\n if (in_array($args['variable'], $conf->uservars)) {\n echo \"Setting $args[variable] in \" . $conf->userfile . \"\\n\";\n $conf->{$args['variable']} = $args['value'];\n } elseif (in_array($args['variable'], $conf->systemvars)) {\n echo \"Setting $args[variable] in system paths\\n\";\n $conf->{$args['variable']} = $args['value'];\n } else {\n echo \"Unknown config variable: $args[variable]\\n\";\n exit(1);\n }\n $conf->saveConfig();\n if ($options['plugin']) {\n \\Pyrus\\Config::setCurrent($current->path);\n }\n }", "title": "" }, { "docid": "d4b279e2b73c0d8de44aee36874f8a16", "score": "0.52529126", "text": "abstract public function set_input($input);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.52486026", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.52486026", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.52486026", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.52486026", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.52486026", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.52486026", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.52486026", "text": "public function setValue($value);", "title": "" }, { "docid": "3079acd1e77dea5c439c059abef5287d", "score": "0.5229726", "text": "public function setVariable(string $name, $value);", "title": "" }, { "docid": "e038cd77baf0d39cf9881216b3630124", "score": "0.5193357", "text": "abstract public function setValue($value);", "title": "" }, { "docid": "6b49d925c23ffee91d63bf5d7acdff88", "score": "0.5183124", "text": "abstract function setValue($value);", "title": "" }, { "docid": "55120993dec9dd9a9297fcf585dfcbbe", "score": "0.5182136", "text": "public function set($name, $value, $username);", "title": "" }, { "docid": "2dacbb46297567a38aa0090085d7c410", "score": "0.5181052", "text": "abstract public function set($value);", "title": "" }, { "docid": "7f5a1f30235c7bf21082e700c04ff16c", "score": "0.5174248", "text": "public function setValue($val);", "title": "" }, { "docid": "4fc55891a2ced47ccbc2e52b34d9875b", "score": "0.51499146", "text": "abstract protected function setValue($value);", "title": "" }, { "docid": "ebd9f003121982afdfc70e157bbc6396", "score": "0.5135513", "text": "function readInputData() {\r\n\t\r\n\t\t$this->readUserVars(array('replacement'));\r\n\t}", "title": "" }, { "docid": "0d136dc02d0898c5557aa24ac3c098bd", "score": "0.51258016", "text": "function set($value) {\n\t\t\t$this->value = $value;\n\t\t\tif ($this->type == DCO_DATA_TEXT) {\n\t\t\t\tif ($this->autotrim) {\n\t\t\t\t\tif (is_array($value)) {\n\t\t\t\t\t\t$trimmed = array();\n\t\t\t\t\t\tforeach($value as $key=>$val) {\n\t\t\t\t\t\t\t$trimmed[$key] = $val;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$this->value = $trimmed;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->value = trim($value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($this->autocut) {\n\t\t\t\t\t$len = strlen($this->value);\n\t\t\t\t\tif ($len > $this->maxlength) {\n\t\t\t\t\t\tif ($len > $this->maxlength + strlen($this->autocut_trail)) {\n\t\t\t\t\t\t\t$this->value = substr($value,0,$this->maxlength);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->value = substr($value,0,$this->maxlength+strlen($this->autocut_trail));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $this->validate();\n\t\t}", "title": "" }, { "docid": "a14177844bec2accce100fb7694ce7ae", "score": "0.51116186", "text": "function set($var, $value) {\n\n\t\t// an array of reserved variables that cannot be overwritten\n\t\t$reserved = array(\n\t\t\t'config',\n\t\t\t'post_type_name',\n\t\t\t'singular',\n\t\t\t'plural',\n\t\t\t'slug',\n\t\t\t'options',\n\t\t\t'taxonomies'\n\t\t);\n\n\t\t// if the variable is not a reserved variable\n\t\tif(!in_array($var, $reserved,true)) {\n\n\t\t\t// write variable and value\n\t\t\t$this->$var = $value;\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "721be3050d33906a3e30fd648da55610", "score": "0.50932074", "text": "public static function set($config, $value);", "title": "" }, { "docid": "4c32ecfbea0e79c8ff1207a2e2d8f3e1", "score": "0.50719947", "text": "public function set($value) { }", "title": "" }, { "docid": "b0a0f1154e1ff6c1306a0fc2c7e3a372", "score": "0.5063911", "text": "public function set($name,$value);", "title": "" }, { "docid": "6f3559338095932c5a53b57219d877a9", "score": "0.5015887", "text": "public function __set($pm,$value){\n echo \"we set $pm=$value<br>\";\n }", "title": "" }, { "docid": "03b29c51d6499f430de889ab936a66b6", "score": "0.5015623", "text": "public function Config_Set($parameter, $value);", "title": "" }, { "docid": "24370db7fca2dffb5fe5ddec4bb5b372", "score": "0.4949489", "text": "public static function setInput($input){\n self::$input = $input;\n }", "title": "" }, { "docid": "4fa3710b85404e81ae67158135d50d21", "score": "0.49342862", "text": "public function set($parameter, $value);", "title": "" }, { "docid": "6185f1b2ad795dd74be67597d5842f87", "score": "0.4925076", "text": "protected function handleSet(): void\n {\n $key = $this->matches['key'];\n $chat = $this->message->getChat()->getId();\n $value = trim($this->matches['value']);\n\n Setting::set(\"{$chat}.{$key}\", $value);\n\n $this->espinoso->reply(trans('messages.settings.saved'));\n }", "title": "" }, { "docid": "7de0f80cc75ea8ea6d11f8476344bf7d", "score": "0.48990762", "text": "public function setVar($_strName, $_mValue);", "title": "" }, { "docid": "c84e49df7c1ee3e235b219b5f169a1b3", "score": "0.48964712", "text": "public function set(string $query, $value);", "title": "" }, { "docid": "6f6b5dffd0d8ed58691a41bb998b08e4", "score": "0.4895104", "text": "public function handle(string $value) {\n $this->value = count(explode('@', $value)) ? $value : false;\n }", "title": "" }, { "docid": "b30a0ebb562775cd349131b36cc4ea72", "score": "0.48532265", "text": "static function input($type,$name,$options,$value){}", "title": "" }, { "docid": "c43b95708cdc51d27ad8e0e07cf826ef", "score": "0.4832453", "text": "function getValueSetValue($ind) { /* {{{ */\n\t\tif(strlen($this->_valueset) > 1) {\n\t\t\t$tmp = explode($this->_valueset[0], substr($this->_valueset, 1));\n\t\t\tif(isset($tmp[$ind]))\n\t\t\t\treturn trim($tmp[$ind]);\n\t\t\telse\n\t\t\t\treturn false;\n\t\t} else\n\t\t\treturn false;\n\t}", "title": "" }, { "docid": "4aa6a0530b44436ee442c663c75d600a", "score": "0.4826512", "text": "public function setVar($name, $value){\n switch($name){\n case 'lorDeadline':\n if(!empty($value)){\n if(!$value = \\strtotime($value)){\n throw new \\Jazzee\\Exception(\"{$value} is not a valid date for lorDeadline\");\n }\n $value = \\date('Y-m-d H:i:s', $value);\n }\n break;\n case 'lorWaitDays':\n if(!empty($value)){\n $value = (int)$value;\n if($value < 0 OR $value > 100){\n throw new \\Jazzee\\Exception(\"lorWaitDays should be between 0 and 100. {$value} is not.\");\n }\n }\n break;\n case 'lorDeadlineEnforced':\n break;\n case 'recommenderEmailText':\n break;\n default:\n throw new \\Jazzee\\Exception($name . ' is not a valid variable on this page.');\n }\n parent::setVar($name, $value);\n }", "title": "" }, { "docid": "ee103e281e273523d8a73a172d6e306c", "score": "0.4823587", "text": "public function set(string $path, $value);", "title": "" }, { "docid": "82ce3a48ae1269226b7be4cf3bc2bd02", "score": "0.4817396", "text": "public function input($value = '', $sanitize = true) \r\n { \r\n $this->validation->run($value);\r\n $this->value = $value;\r\n }", "title": "" }, { "docid": "1631f20eb42c8cab4aead2dfe45f0ce0", "score": "0.48005328", "text": "private function inputDefine()\n {\n $path = self::$args['input'] ?? (defined('BASE_PATH') ? BASE_PATH : __DIR__);\n define('INPUT_PATH', $path);\n }", "title": "" }, { "docid": "30fada460675e1e916265113e5e7e860", "score": "0.47964895", "text": "public function set($name, $value);", "title": "" }, { "docid": "30fada460675e1e916265113e5e7e860", "score": "0.47964895", "text": "public function set($name, $value);", "title": "" }, { "docid": "30fada460675e1e916265113e5e7e860", "score": "0.47964895", "text": "public function set($name, $value);", "title": "" }, { "docid": "30fada460675e1e916265113e5e7e860", "score": "0.47964895", "text": "public function set($name, $value);", "title": "" }, { "docid": "30fada460675e1e916265113e5e7e860", "score": "0.47964895", "text": "public function set($name, $value);", "title": "" }, { "docid": "30fada460675e1e916265113e5e7e860", "score": "0.47964895", "text": "public function set($name, $value);", "title": "" }, { "docid": "e95a8eb1c2a8a874f4d47106d0804640", "score": "0.47936875", "text": "function defineSetOption()\n{\n\techo('\nsetOption() {\n\tfile=$1\n\toption=$2\n\tvalue=$3\n\n\techo \"$file: $option=$value\"\n\n\t# escape &-signs, and % for sed\n\tvalue=`echo $value | sed -e \\'s/\\&/\\\\\\\\\\\\&/g\\' -e \\'s/\\%/\\\\\\\\\\\\%/g\\'`\n\tsed -i -e \"s%\\([[:space:]]*$option[[:space:]]*=[[:space:]]*\\).*%\\1$value%\" $file\n}\n');\n}", "title": "" }, { "docid": "fb0cbb8d4467ce0bcc1909e74105ddb8", "score": "0.47843918", "text": "public function checkInput($name = '', $value = null)\n {\n $name = !empty($name) ? $name : $this->propertyprefix . $this->id; \n if (!xarVar::fetch($name,'isset',$configuration,NULL,xarVar::NOT_REQUIRED)) return; \n $this->value = serialize($configuration);\n return true;\n }", "title": "" }, { "docid": "1a66a54d196f1e856bd27922451e7425", "score": "0.4773993", "text": "public function __set($name, $value)\n {\n $this->getInput($name)->fill($value);\n }", "title": "" }, { "docid": "7b7efcce295474220727528c60a5a1d8", "score": "0.47724122", "text": "function _checkValue( $set ) {\r\n\t\tif( isset( $this->value[$set] ) ) {\r\n\t\t\treturn $this->value[$set];\r\n\t\t}else{\r\n\t\t\treturn $this->$set;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "f22bbe9696336f5d952ab18655021690", "score": "0.47638756", "text": "protected function parseArgumentValue($argument) {\n\t\tif(preg_match(\"#--[a-zA-Z0-9]*=.*#\", $argument)) {\n\t\t// matches --option-name=option value\n\t\t// argument has a value assigned to be used\n\t\t\t// split the argument into \"name\" = \"value\" pairs\n\t\t\t$argument_key_pair = preg_split(\"/[=]{1}/\", $argument);\n\t\t\t$argument_value = '';\n\t\t\t// remove the switch string characters from the argument name\n\t\t\t$argument_name = preg_replace(\"#--#\", '', $argument_key_pair[0]);\n\t\t\t// stritch the rest of the string value back together if needed\n\t\t\tfor($i = 1; $i < count($argument_key_pair); $i++ ) {\n\t\t\t\t$argument_value .= $argument_key_pair[$i];\n\t\t\t}\n\t\t\t$this->parsed_config[$argument_name] = $argument_value;\n\t\t} elseif(preg_match(\"#-[a-zA-Z0-9]#\", $argument)) {\n\t\t// matches -option-name\n\t\t// argument is a boolean flag switch\n\t\t\t$argument_name = preg_replace(\"#-#\", '', $argument, 1);\n\t\t\t$this->parsed_config[$argument_name] = TRUE;\n\t\t}\n\t}", "title": "" }, { "docid": "98aba8e9c192b60b185be9fa117c5fdc", "score": "0.4757153", "text": "#[@xmlmapping(element= '@value')]\n public function setValue($value) {\n $this->value= $value;\n }", "title": "" }, { "docid": "faccdc34e23a1c79a7f1f89e9f7adbe8", "score": "0.47408715", "text": "protected function _set_parameter($key, $value)\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $file = new File(self::FILE_CONFIG);\n\n $match = $file->replace_lines(\"/^$key\\s+/\", \"$key $value\\n\");\n\n if ($match === 0) {\n $match = $file->replace_lines(\"/^#$key\\s+/\", \"$key $value\\n\");\n if ($match === 0)\n $file->add_lines(\"$key = $value\\n\");\n }\n\n $this->is_loaded = FALSE;\n }", "title": "" }, { "docid": "27110966fa436e4935e5fbcbb39d15c7", "score": "0.47369033", "text": "function set()\n {\n if ($this->agent_input == \"extract\") {\n return;\n }\n\n $resource = new Variables(\n $this->thing,\n \"variables resource \" . $this->from\n );\n\n $resource->setVariable(\"resource_quantity\", $this->resource_quantity);\n $resource->setVariable(\"resource_name\", $this->resource_name);\n $resource->setVariable(\"refreshed_at\", $this->current_time);\n\n $place = new Variables(\n $this->thing,\n \"variables \" . $this->resource_name . \" \" . $this->from\n );\n\n $place->setVariable(\"resource_name\", $this->resource_name);\n $place->setVariable(\"resource_quantity\", $this->resource_quantity);\n }", "title": "" }, { "docid": "390bcb6b5479d91e5e5f634df7538fff", "score": "0.47332853", "text": "public function testSingleValue() {\n $config = [\n FindReplaceRegex::SETTING_FIND => '/cat/',\n FindReplaceRegex::SETTING_REPLACE => 'dog',\n FindReplaceRegex::SETTING_LIMIT => '',\n ];\n $plugin = new FindReplaceRegex($config, 'find_replace_regex', []);\n $this->assertEquals('The dog went to the park.', $plugin->tamper('The cat went to the park.'));\n }", "title": "" }, { "docid": "98d1df56e9fba0ed4e81e48f8a609f07", "score": "0.47164708", "text": "public function setConfig($key, $value);", "title": "" }, { "docid": "dff512298097336b6aa831f049227487", "score": "0.47114193", "text": "protected function _set_parameter($key, $value)\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $file = new File(self::FILE_CONFIG);\n\n $match = $file->replace_lines(\"/^$key\\s+/\", \"$key $value\\n\");\n\n if ($match === 0) {\n $match = $file->replace_lines(\"/^#\\s*$key\\s+/\", \"$key $value\\n\");\n if ($match === 0)\n $file->add_lines(\"$key = $value\\n\");\n }\n\n $this->is_loaded = FALSE;\n }", "title": "" }, { "docid": "a4d590ffe1aa5774a9012ea02ecf1229", "score": "0.4706706", "text": "public function setWildCardValue($value);", "title": "" }, { "docid": "79eeabc91ea43b664059797aa4f868ad", "score": "0.4706406", "text": "public function __construct($value, $setting);", "title": "" }, { "docid": "28623bf9afa5cd54cb48555991032cb8", "score": "0.47035807", "text": "function media_vimeo_variable_set($name, $value) {\n $variable_name = MEDIA_VIMEO_NAMESPACE . $name;\n return variable_set($variable_name, $value);\n}", "title": "" }, { "docid": "7cad9cf99446b2f3cd6f6eb1f147d6b9", "score": "0.46976608", "text": "function setVariable(&$variable, &$name){\n if(isset($_GET[$name])){\n if(null !== ($_GET[$name] = filter_input(INPUT_GET, $name, FILTER_VALIDATE_INT, FILTER_NULL_ON_FAILURE))){\n $variable = (int)$_GET[$name];\n // echo $variable;\n }\n else{\n echo \"ERROR: \" . $name . \" must be an integer.\";\n exit();\n }\n }\n else{\n echo \"ERROR: \" . $name . \" parameter is missing\";\n exit();\n }\n}", "title": "" }, { "docid": "0ace9716d3394606756b42e5bd42f6f0", "score": "0.4697524", "text": "public function setValue(string $value): void;", "title": "" }, { "docid": "831f0dd1d99066fbf9ca9a50144058bd", "score": "0.46879154", "text": "public function setInput($input) {\n $this->input = $input;\n }", "title": "" }, { "docid": "6cd5b1d7e957ad2debe5e6aef5991c4a", "score": "0.46794033", "text": "function __set($name,$value)\n {\n echo $name . $value;\n }", "title": "" }, { "docid": "40330ad344df5eb720a494d6e2c56533", "score": "0.46788323", "text": "public function set($arg, $value){\n \t\tif(isset($arg) && isset($value)){\n \t\t\t/* Check that if the arg is in the args array */\n \t\t\tif(empty($this->args[$arg])){\n \t\t\t\t$this->args[$arg] = $value;\n \t\t\t}\n \t\t\telse{\n \t\t\t\t/* Update the existing value. */\n \t\t\t\t$this->args[$arg] = $value;\n \t\t\t}\n \t\t}\n \t}", "title": "" }, { "docid": "53d545d027deb8bd8f6e1e5b6cabdef5", "score": "0.46655747", "text": "public function set($name, $value) { \r\n $this->vars[$name] = $value; \r\n }", "title": "" }, { "docid": "f16c935f807fa5d26090f18fcfde426c", "score": "0.46586075", "text": "public function setContent(string $key, string $value) : bool {\n\t\t$key = \"%%\".str_replace(\"%%\", \"\", $key).\"%%\";\n\t\tif( isset( $this->placeholder[$key] ) ){\n\t\t\t$this->placeholder[$key] = $value;\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "cab6d4382ab8dca7c72cde4ad46445b7", "score": "0.4657882", "text": "abstract protected function setting();", "title": "" }, { "docid": "a57682cd31ae2378d0534c9ab62e713a", "score": "0.4655157", "text": "private function process_name_value($line) {\r\n\r\n\t\t$line_split = explode(\"=\",$line);\r\n\t\t$name = trim($line_split[0]);\r\n\t\t$value = trim($line_split[1]);\r\n\r\n\t\t$this->config_array[$name]=$this->process_value($value);\r\n\t}", "title": "" }, { "docid": "dc637beaa11e7fffe0ac6652511cd378", "score": "0.46485114", "text": "public function def($var, $pattern)\n {\n if (!is_string($var) || !is_string($pattern)) {\n throw new \\Exception('Invalid argument type.');\n }\n\n $std_var = trim($var);\n $std_pattern = trim($pattern);\n\n if (trim($std_var) === '' || trim($std_pattern) === '') {\n throw new \\Exception('Invalid argument value.');\n }\n\n $this->vars[$std_var] = $std_pattern;\n return $this;\n }", "title": "" }, { "docid": "3bf5ea62e0983a6ed37109c61a8f440e", "score": "0.46483928", "text": "function lnConfigSetVar($name, $value)\r\n{\r\n /*\r\n * The database parameter are not allowed to change\r\n */\r\n if (empty($name) || ($name == 'dbtype') || ($name == 'dbhost') || ($name == 'dbuname') || ($name == 'dbpass')\r\n || ($name == 'dbname') || ($name == 'system') || ($name == 'prefix') || ($name == 'encoded')) {\r\n return false;\r\n }\r\n\r\n global $config;\r\n foreach($config as $k => $v) {\r\n if ($k == $name && $v == $value) {\r\n return true;\r\n }\r\n }\r\n\r\n /*\r\n * Fetch base data\r\n */\r\n list($dbconn) = lnDBGetConn();\r\n $lntable = lnDBGetTables();\r\n $table = $lntable['module_vars'];\r\n $columns = &$lntable['module_vars_column'];\r\n\r\n\t/*\r\n\t * Update\r\n\t */\r\n\t $query = \"UPDATE $table\r\n\t\t\t SET $columns[value]='\" . lnVarPrepForStore(serialize($value)) . \"'\r\n\t\t\t WHERE $columns[name]='\" . lnVarPrepForStore($name) . \"'\";\r\n\r\n $dbconn->Execute($query);\r\n if($dbconn->ErrorNo() != 0) {\r\n return false;\r\n }\r\n\r\n /*\r\n * Update my vars\r\n */\r\n $lnconfig[$name] = $value;\r\n\r\n return true;\r\n}", "title": "" }, { "docid": "78d10fa93e6f3a9d90b93772aeb77e4b", "score": "0.46442914", "text": "public function setArgument(string $key, $value);", "title": "" }, { "docid": "e99d6ac539bc1891bf7466478e34a3a2", "score": "0.46383685", "text": "public function set_pref()\n\t{\n\t\t$path_el = func_get_args();\n\t\t$value = end($path_el);\n\t\tarray_pop($path_el);\n\t\t$count = count($path_el);\n\n\t\t$data = $this->data['pref']->get();\n $arr_ref =& $data;\n\n for($i = 0; $i < $count; $i++)\n {\n $arr_ref =& $arr_ref[$path_el[$i]];\n }\n\n $arr_ref = $value;\n\n\t\t$this->data['pref']->set($data);\n\t}", "title": "" }, { "docid": "0d156949354d10a33cfd09c68f5232ec", "score": "0.46334222", "text": "public function set(/* string */ $i){\n\t\t$this -> input = (string)$i;\n\t}", "title": "" }, { "docid": "649c49473b70326a15ddae755d23853a", "score": "0.46317396", "text": "public function setValue($value){\r\n $this->value = $value; \r\n }", "title": "" }, { "docid": "2b0cd4411b9af1c4cc40f5f7f2871bfc", "score": "0.46275285", "text": "function setValue($value)\n\t{\n\t\t$tmp=(is_string($value) ? $value : $value . \"\");\n\t\t$this->da[\"value\"]=$tmp;\n\t}", "title": "" }, { "docid": "ffac0f65e6d72425df6f018ed1ac21ad", "score": "0.46220627", "text": "public function setSetting($which, $value)\n\t{\n\t\tif (is_scalar($value)) {\n\t\t\t$this->conf[$which] = $value;\n\t\t\treturn $value;\n\t\t}\n\t\tError::httpApplicationError('Configuration parameter |' . $which . '| not set to a scalar');\n\t}", "title": "" }, { "docid": "c50b82a3396670b9037fa36b952d3051", "score": "0.46155035", "text": "public function testSingleValue() {\n $config = [\n FindReplace::SETTING_FIND => 'cat',\n FindReplace::SETTING_REPLACE => 'dog',\n FindReplace::SETTING_CASE_SENSITIVE => FALSE,\n FindReplace::SETTING_WORD_BOUNDARIES => FALSE,\n FindReplace::SETTING_WHOLE => FALSE,\n ];\n $plugin = new FindReplace($config, 'find_replace', []);\n $this->assertEquals('The dog went to the park.', $plugin->tamper('The cat went to the park.'));\n $this->assertEquals('The dog went to the park.', $plugin->tamper('The Cat went to the park.'));\n $this->assertEquals('The dogwent to the park.', $plugin->tamper('The Catwent to the park.'));\n }", "title": "" }, { "docid": "79a270b48b5a4ef02ac027d562fb4b37", "score": "0.46120554", "text": "function wrtToUserconfig($varName,$value)\n{\n\t$value=strval($value);\n//\techo $varName.'=\"'.$value.'\"';\n//\t$shell_exec_ret=exec('cardmount rw');\n\t$file=\"/boot/userconfig.txt\";\n\t$pattern='/'.$varName.'=\\\".*\\\"/';\n\t$content=file_get_contents($file);\n\t$content=preg_replace($pattern, $varName.'=\"'.$value.'\"', $content);\n\tfile_put_contents($file, $content);\n//\t$shell_exec_ret=exec('cardmount ro');\n}", "title": "" }, { "docid": "d742238b9341ff53857f79874a82c6b6", "score": "0.46110055", "text": "public function set($value)\n {\n $this->tempvalue = $value;\n if ($this->validate()) {\n $this->value = trim($this->tempvalue).';';\n } else {\n throw new \\Exception('Not a valid Value: '.$value.' for given key: '.$this->key);\n }\n }", "title": "" }, { "docid": "06726f7d70b2cf6c80c1cc00e8df745e", "score": "0.46091166", "text": "public function setValueExtractor($var)\n {\n GPBUtil::checkString($var, True);\n $this->value_extractor = $var;\n\n return $this;\n }", "title": "" }, { "docid": "84a290698e0f0e8a5fa8d62702bb8bb8", "score": "0.45987293", "text": "public function setData($value);", "title": "" }, { "docid": "9fe73b8d936dc82f1aaceb59a659072e", "score": "0.45954272", "text": "protected function _set_value( &$args, $value ) {\n\t\t$args['value'] = $value;\n\t}", "title": "" }, { "docid": "89f5f0c0177c0f77651c3861aa9be1a3", "score": "0.4591625", "text": "function init() {\n global $value;\n $value = 5;\n }", "title": "" }, { "docid": "09ae3c01e433a23818313de806578f31", "score": "0.458803", "text": "public function set(string $id, $value);", "title": "" }, { "docid": "5946770c7446cef25ad223a1defc42fb", "score": "0.4587121", "text": "function setArgument($value) {\n $this->argument = $value;\n }", "title": "" }, { "docid": "86728e27629a27edccc3cb19ba67b94c", "score": "0.45841905", "text": "public function set($name, $value)\n {\n\n }", "title": "" }, { "docid": "19f054095df16c2a4dd728df075e65b4", "score": "0.45817974", "text": "public function setValue($value) {\n return $this->value=$value;\n }", "title": "" }, { "docid": "2ef5fb9615a5bb8df4ce6b60620c9a0e", "score": "0.4577556", "text": "public function setUserPreference($name, $value);", "title": "" }, { "docid": "0911ecdf983bcaff155ca7f0eb1d357b", "score": "0.45754606", "text": "public function setDynamicValue($value) {\n\t\tif (!$value) {\n\t\t\treturn;\n\t\t}\n\n\t\t$currentValue = $this->getValue();\n\t\tif ($value === array()) {\n\t\t\tnotify_user_error(\"You made a mistake, writing a dynamic value <code class='r hljs'>\" . h($currentValue) . \"</code> that returns an element of length 0. The most common reason for this is to e.g. refer to data that does not exist, e.g. misspell an item. Valid values need to have a length of one.\", \" There are programming problems related to zero-length dynamic values in this survey.\");\n\t\t\t$this->openCPU_errors[$value] = _('Incorrectly defined value (zero length).');\n\t\t\t$this->alwaysInvalid();\n\t\t\t$value = null;\n\t\t} elseif ($value === null) {\n\t\t\tnotify_user_error(\"You made a mistake, writing a dynamic value <code class='r hljs'>\" . h($currentValue) . \"</code> that returns NA (missing). The most common reason for this is to e.g. refer to data that is not yet set, i.e. referring to questions that haven't been answered yet. To circumvent this, add a showif to your item, checking whether the item is answered yet using is.na(). Valid values need to have a length of one.\", \" There are programming problems related to null dynamic values in this survey.\");\n\t\t\t$this->openCPU_errors[$value] = _('Incorrectly defined value (null).');\n\t\t\t$this->alwaysInvalid();\n\t\t} elseif (is_array($value) && array_key_exists(0, $value)) {\n\t\t\t$value = $value[0];\n\t\t}\n\n\t\t$this->input_attributes['value'] = $value;\n\t}", "title": "" }, { "docid": "26cac92a8df58f90e3b22c233e8c349e", "score": "0.45747498", "text": "public function setValue( $value ) {\n \tif( is_array($value) ) {\n \t\t$value = implode(\"|\", $value);\n \t}\n \t$this->value = $value;\n }", "title": "" }, { "docid": "72d042e029ee4ce90bfbdf50a3b218d2", "score": "0.4567803", "text": "function setTestvalue($value) {\r\n $this->testvalue = $value;\r\n }", "title": "" }, { "docid": "531a74588a2ac3adb50a2344d7afea3a", "score": "0.4562763", "text": "function setValue($val){\n $this->value = $val;\n }", "title": "" }, { "docid": "4e9c95f0a39f0f6e9a64e5ad314e160c", "score": "0.45612526", "text": "private function setValue($value)\n\t{\n\t\t$this->value = (string) $value;\n\t}", "title": "" }, { "docid": "b998c15e7ead4f2de4f522dc235c600b", "score": "0.45581922", "text": "private function setInput($key, $value)\n {\n $this->input[$key] = $value;\n }", "title": "" }, { "docid": "e8662d7e65efd21468a01e698ee22412", "score": "0.45581308", "text": "public function setInput($input)\n {\n $this->_input = $input;\n }", "title": "" }, { "docid": "60a74865691312a195c6dd1083531376", "score": "0.4550663", "text": "public function setVariable(?string $taskId, ?string $variableName, $value): void;", "title": "" }, { "docid": "37f6543039dc2bbd920172778317e493", "score": "0.45468363", "text": "protected function procSetting( $key, $val ){\n\t\tif ( is_string($key) && $key{0} == '_' ){\n\t\t\t$k = substr($key,1);\n\n\t\t\tswitch( $k ){\n\t\t\t\tcase 'include' :\n\t\t\t\t\t$this->include = explode(';', $val);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'target' :\n\t\t\t\t\t$this->target = $val;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'error' :\n\t\t\t\t\t$this->error = $val;\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\t$this->settings[ $k ] = $val;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "2d99a5bf244ae3741a5b2b354c4adad1", "score": "0.45426542", "text": "function assign($var, $val='') {\n if ($this->OK==false) return; // Just exit if the file open failed\n\n // See if the value is an array. If so, ignore the value parameter, and assign\n // the values from the array.\n if (is_array($var)) {\n // Scan through the array, and save the assignments\n foreach ($var as $key=>$val) {\n // ... assuming that the key is properly defined.\n if (!empty($key)) $this->templateVars[$key] = $val;\n }\n } else {\n // If the variable is not an array, just do a direct assignment.\n $this->templateVars[$var] = $val;\n }\n }", "title": "" }, { "docid": "b3b5f0e427fdab5a419b918e45ab3b34", "score": "0.45415118", "text": "public function value($value);", "title": "" }, { "docid": "b3b5f0e427fdab5a419b918e45ab3b34", "score": "0.45415118", "text": "public function value($value);", "title": "" }, { "docid": "3f439f193d4cd39a391700eb6414e31b", "score": "0.45397848", "text": "function setPref($data_dir, $username, $pref_name, $value) {\n global $prefs_cache;\n\n cachePrefValues($data_dir, $username);\n if (isset($prefs_cache[$pref_name]) && ($prefs_cache[$pref_name] == $value)) {\n return;\n }\n\n if ($value === '') {\n removePref($data_dir, $username, $pref_name);\n return;\n }\n\n $prefs_cache[$pref_name] = $value;\n savePrefValues($data_dir, $username);\n}", "title": "" }, { "docid": "c2bd0463b2cfa2c59aa25d2b7271066b", "score": "0.45394614", "text": "public function __set($var, $value) { $this->{$this->_parameterMap[$var]} = $value; }", "title": "" } ]
35c163df492da416f6d5bed6175d0d39
This method includes a stylesheet in current view
[ { "docid": "23ecf90e8f63d82b9f976bef309e022a", "score": "0.0", "text": "public function includeCss($cssName)\n {\n if(in_array($cssName, $this->_styles)) {\n return;\n }\n $this->_styles[] = $cssName;\n }", "title": "" } ]
[ { "docid": "774e5b56e0bb09447462fbdc15c2682c", "score": "0.7471596", "text": "public function _initStylesheets()\r\n {\r\n $this->bootstrap('View');\r\n $view = $this->getResource('View');\r\n $view->headLink()->prependStylesheet('/style.css');\r\n }", "title": "" }, { "docid": "b69f3fbf1fda8a0738e5ad5eff7bc473", "score": "0.68682647", "text": "protected function addStylesheet()\n {\n $stylesheet = new Template(\n $this->path,\n 'theme-stylesheet',\n [\n '{THEME_NAME}' => $this->theme_name,\n '{THEME_URI}' => $this->theme_uri,\n '{DESCRIPTION}' => $this->description,\n '{TAGS}' => $this->tags,\n '{VERSION}' => $this->version,\n '{AUTHOR}' => $this->author,\n '{AUTHOR_URI}' => $this->author_uri,\n '{LICENSE}' => $this->license,\n '{LICENSE_URI}' => $this->license_uri,\n '{TEXT_DOMAIN}' => $this->text_domain\n ]\n );\n $stylesheet->save('style.css', 'force');\n }", "title": "" }, { "docid": "0cfe6c4d29b54eebe8e41465f6c3ed9c", "score": "0.6524682", "text": "protected function _initHeadLink()\n {\n $this->_getView()->headLink()->appendStylesheet('/css/styles.css');\n $this->_getView()->headLink()->appendStylesheet('/css/menu.css');\n }", "title": "" }, { "docid": "66340e27397353a4690a72f4c266a3fb", "score": "0.64419407", "text": "public function hookHeader()\n {\n $this->context->controller->addCSS($this->_path . '/views/css/front.css');\n }", "title": "" }, { "docid": "2e8a152f9b084ac9a134e211ee92e33c", "score": "0.6337196", "text": "public static function include()\r\n {\r\n \\APLib\\Response\\Header\\Link::add(APLibHTML.'Themes/css/sleek.css');\r\n }", "title": "" }, { "docid": "90ebbfc8a7a835d03d665d9d18405056", "score": "0.6288924", "text": "public function load_css() {\n $data = array();\n $this->load->view('load_css', $data);\n }", "title": "" }, { "docid": "7578f7a3735fdec41945e9ebe0dc3e80", "score": "0.6286127", "text": "public function scripts_and_styles() { }", "title": "" }, { "docid": "e7ce81988dd9a7c911915db1c1997ef5", "score": "0.62829274", "text": "function render() {\r\n return $this->view->style_plugin->render($this->view->result);\r\n }", "title": "" }, { "docid": "b6adc08af1a4de1ba0f057942af04f43", "score": "0.62730473", "text": "public function load(){\r\n\t\tif($this->validate()){\r\n\t\t\treturn '<link rel=\"stylesheet\" type=\"text/css\" href=\"css/'.$this->style.'\">';\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "d0383d4b3bc3bd032a7bf40dbb998c7b", "score": "0.6226664", "text": "public function css() {\n return \"/review/review.css\"; \n }", "title": "" }, { "docid": "f25c647913ab6c366f0697e8362c0887", "score": "0.6186181", "text": "public function color_css(){\r\n header(\"Content-Type: text/css\");\r\n if (isset(SETTINGS['theme'])) {\r\n echo app('twig')->render('css/theme-'.SETTINGS['theme'].'.css');\r\n }\r\n }", "title": "" }, { "docid": "0c6d2ef1c3f5e60ba7440b4c12c903e7", "score": "0.61836153", "text": "public function add_styles() {\n\t\tTPHelpers::enqueue( 'style.css' );\n\t}", "title": "" }, { "docid": "bb00c6c0a3357fb1d3537ff976616536", "score": "0.61786294", "text": "public function appendStyles()\n {\n return '<link rel=\"stylesheet\" href=\"css/styles.css\">';\n }", "title": "" }, { "docid": "bb04033e6d55fd4e5b5fa4187c6d7d74", "score": "0.61393577", "text": "function addCssResource(mvcViewCss $inResource) {\n\t\treturn $this->addResource($inResource);\n\t}", "title": "" }, { "docid": "69011726efae715d21d954c6b45d8959", "score": "0.61307186", "text": "private function pageStylesheets() {\n $defaultStylesheet = $this->type . '/' . $this->getPageName() . '.min';\n // Append the default stylesheet.\n if(setting('selio.page.loadDefaultAssets')) {\n $this->addStylesheet($defaultStylesheet);\n }\n foreach($this->stylesheets as $data) {\n $log = $data['name'] !== $defaultStylesheet;\n $this->buildAssetElement('css', $data, $log);\n }\n }", "title": "" }, { "docid": "f33ebf6ab897ef15fde9f48317a590eb", "score": "0.6109064", "text": "public function customStyles() {\n $out = '<link rel=\"stylesheet\" href=\"styles/css/minimal/screen/custom/trip.css\" type=\"text/css\"/>';\n\t\techo $out;\n }", "title": "" }, { "docid": "fe58939e221fa6642d0f1a38ec054d8b", "score": "0.60452694", "text": "public function displayCss() {\n\t\t\tAppDisplay::getInstance()->appendHeader('Content-Type: text/css');\n\t\t\t$this->clientCache();\n\t\t\t$this->strEmbed = \"@import url('%s');\";\n\t\t\t$this->strBaseUrl = AppConfig::get('CssUrl');\n\t\t\t$this->parseUrl(array($this, 'minifyCss'));\n\t\t}", "title": "" }, { "docid": "46757cc11fedff3b28b5392e2085fcb3", "score": "0.60015976", "text": "protected function addPageViewStylesheets() : void\n {\n if ($this->stylesAdded) {\n return;\n }\n /** @var PageRenderer $pageRenderer */\n $pageRenderer = GeneralUtility::makeInstance(PageRenderer::class);\n $pageRenderer->addCssInlineBlock(\n 'DcePageLayoutStyles',\n file_get_contents(ExtensionManagementUtility::extPath('dce') . 'Resources/Public/Css/dceInstance.css')\n );\n $this->stylesAdded = true;\n }", "title": "" }, { "docid": "4544308f14f17b589ef3d7f4720aa918", "score": "0.5989747", "text": "private function _add_assets() {\n\t$this->EE->cp->add_to_head('<link type=\"text/css\" href=\"' . $this->theme_base . 'css/simply_order.css\" rel=\"stylesheet\" />');\n }", "title": "" }, { "docid": "5a079bbc837fb29889ae8df95460b2b4", "score": "0.59684837", "text": "public function loadStyles();", "title": "" }, { "docid": "31684479aefa15b44a372d5f429e7d58", "score": "0.595491", "text": "public function render()\n {\n foreach($this->this_css as $key => $value){\n if(strpos($value, 'http') !== false){\n $this->renders .= '<link rel=\"stylesheet\" href=\"'.$value.'\">\n ';\n }else{\n $this->renders .= '<link rel=\"stylesheet\" href=\"'.asset('admin/'.$value).'\">\n ';\n }\n }\n $extended_css = explode(';', $this->css);\n foreach ($extended_css as $key => $value) {\n if($value != '')\n {\n $this->renders .= '<link rel=\"stylesheet\" href=\"'.$value.'\">\n ';\n }\n }\n return view('components.css');\n }", "title": "" }, { "docid": "cdfa3467f84f9ef4eb4ae5004b41da20", "score": "0.5931209", "text": "public function includeJsCssFiles()\n {\n $this->getView()->layoutHeadScript()->appendFile($this->getView()->layoutAsset('jquery.treeview.js'));\n\n $cssFile = $this->getView()->localization()->isCurrentLanguageLtr() \n ? 'jquery.treeview.css' \n : 'jquery.treeview.rtl.css';\n\n $this->getView()->layoutHeadLink()->appendStylesheet($this->getView()->layoutAsset($cssFile, 'css'));\n }", "title": "" }, { "docid": "13bb0a6aae25ac65c52296edc2ff1ecd", "score": "0.59293455", "text": "abstract public function enqueueCss();", "title": "" }, { "docid": "99c7490fde177c2f389c69d0f21184b0", "score": "0.59175044", "text": "function addStylesheet($url) {\n $this->stylesheets[] = $url;\n }", "title": "" }, { "docid": "09ee076a85f818dc2ab2a5177fd97e90", "score": "0.59038323", "text": "public static function include()\r\n {\r\n \\APLib\\Response\\Header\\Link::add(APLibHTML.'Themes/css/clientlogin.css');\r\n }", "title": "" }, { "docid": "0b059784045fc6dbc1d8dbd5c0c25ee3", "score": "0.5900386", "text": "public function index()\n {\n //using custom css at cake3test/webroot/css/hello_sass.css\n $this->layout = 'sass';\n }", "title": "" }, { "docid": "30e5af0cbd71bb29768a597382df8d05", "score": "0.5880528", "text": "public function appendCssUrl($url) {\n $this->appendToHead(<<<HTML\n <link rel=\"stylesheet\" href=\"{$url}\">\n\nHTML\n);\n }", "title": "" }, { "docid": "49f7c5f2323ebbce0ce26344656cb800", "score": "0.58792096", "text": "public function loadCSS()\n {\n }", "title": "" }, { "docid": "f31776a1e9041e7833ce4bbd820b1f12", "score": "0.58788216", "text": "function add_stylesheet() \n\t{\n // $url = str_replace(\"https://www.fastaval.dk\",\"\",$url);\n\n //todo change function name\n\t\t// load lightbox\n\t\t\n wp_enqueue_script( 'vcsys-lightbox-js', plugins_url('lightbox/js/lightbox.min.js', __FILE__));\n\t wp_enqueue_style( 'vcsys-lightbox', plugins_url('lightbox/css/lightbox.css', __FILE__) );\n\t //wp_enqueue_style( 'prefix-style', plugins_url($this->get_template_folder().'tilmelding.less', __FILE__) );\n\t\twp_enqueue_style( 'prefix-style', plugins_url($this->get_template_folder().'tilmelding.css', __FILE__) );\n\t\twp_enqueue_style( 'fusion-dynamic-css-css', plugins_url($this->get_template_folder().'copy_of_fusion_dynamic.min.css ', __FILE__) );\n\t wp_enqueue_style( 'signup-responsive', plugins_url($this->get_template_folder().'responsive.css', __FILE__) );\n\t}", "title": "" }, { "docid": "f57d80e43993d350c14596abb303099d", "score": "0.5858071", "text": "function use_plugin_stylesheet($plugin, $css, $position = '', $options = array()) {\n\tsfContext::getInstance ()->getResponse ()->addStylesheet ( '../' . $plugin . '/css/' . $css, $position, $options );\n}", "title": "" }, { "docid": "af88df1e0ec29b73417bae65190a1559", "score": "0.5853077", "text": "public function load_css() {\n\n new Slate_CSS('application.css');\n\n }", "title": "" }, { "docid": "1dbc31b4e92fb9afa36207e0549b26a6", "score": "0.5850129", "text": "function stylesheet() {\n\n\t\t// TODO: Bootstrap should come from CDN\n\n\t\t// Load bootstrap\n\t\t$styleURL = plugins_url('bootstrap/css/bootstrap.min.css', __FILE__); \n\t\t$styleFile = WP_PLUGIN_DIR . '/'.$this->pluginName.'/bootstrap/css/bootstrap.min.css';\n\t\t\n\t\tif ( file_exists($styleFile) ) {\n\n\t\t\twp_register_style($this->pluginName.'-style1', \"$styleURL\");\n\t\t\twp_enqueue_style($this->pluginName.'-style1');\n\t\t}\n\n\t\t// Load custom styling\n\t\t$styleURL = plugins_url('style.css', __FILE__); \n\t\t$styleFile = WP_PLUGIN_DIR . '/'.$this->pluginName.'/style.css';\n\t\t\n\t\tif ( file_exists($styleFile) ) {\n\n\t\t\twp_register_style($this->pluginName.'-style2', \"$styleURL\");\n\t\t\twp_enqueue_style($this->pluginName.'-style2');\n\t\t}\n\n\t}", "title": "" }, { "docid": "fc854c2d4c04a58c80bbf6679f1a85a9", "score": "0.5847846", "text": "public function assetModel_styleCss_handler($sender) {\n $sender->addCssFile('topcoder.css', 'plugins/Topcoder');\n }", "title": "" }, { "docid": "f71fe691adf9c9cae536e7fe0a2ff776", "score": "0.5847184", "text": "public function hookHeader()\n {\n if (_PS_VERSION_ < '1.5') {\n Tools::addCSS(\n $this->_path . '/views/css/fianetsceau.css',\n 'all'\n );\n } else {\n $this->context->controller->addCSS(\n $this->_path . '/views/css/fianetsceau.css',\n 'all'\n );\n }\n }", "title": "" }, { "docid": "71ba319b3f7325d59a98d3ba19f88e5b", "score": "0.584521", "text": "public function publicAppStylesheet()\n {\n $view = $this->getView();\n $defaultStylesheet = $view->assetUrl('css/public-app.css', 'Scripto');\n\n if (!$this->publicAppSite) {\n return $defaultStylesheet;\n }\n\n // Get the Scripto stylesheets.\n $stylesheets = [];\n try {\n $path = sprintf('%s/modules/Scripto/asset/css/site-themes', OMEKA_PATH);\n foreach (new \\DirectoryIterator($path) as $fileinfo) {\n if ($fileinfo->isFile() && $fileinfo->isReadable() && 'css' === $fileinfo->getExtension()) {\n $stylesheets[] = $fileinfo->getBasename('.css');\n }\n }\n } catch (\\UnexpectedValueException $e) {\n return $defaultStylesheet; // path not found\n }\n\n if (in_array($this->publicAppSite->theme(), $stylesheets)) {\n // Use the site's corresponding Scripto stylesheet.\n return $view->assetUrl(sprintf('css/site-themes/%s.css', $this->publicAppSite->theme()), 'Scripto');\n }\n return $defaultStylesheet;\n }", "title": "" }, { "docid": "18a2a788508910dc2668ba381243e99d", "score": "0.5798753", "text": "public function includeJsCssFiles()\n {\n $this->getView()->layoutHeadScript()->\n appendFile($this->getView()->layoutAsset('comment.js', 'js', 'comment'));\n\n $this->getView()->layoutHeadLink()->\n appendStylesheet($this->getView()->layoutAsset('main.css', 'css', 'comment'));\n }", "title": "" }, { "docid": "6593824fc930ab5336670c833f64c667", "score": "0.57902735", "text": "public function injectStyles()\n {\n $output = \"\";\n $cache = false ;\n\n // Check for a cache\n if($this->cacheStyles && file_exists(\"cache/\".$this->layout.\".css\")) {\n if($cacheCss = file_get_contents(\"cache/\".$this->layout.\".css\")) {\n $output = \"<link rel='stylesheet' href='/cache/\".$this->layout.\".css'>\";\n $cache = true;\n return $output;\n } \n }\n\n // Combine Styles\n if($this->combineStyles) {\n $output = $this->combineCss();\n } \n\n // If not combined Return Normal Scripts \n else {\n return $this->includeNormalStyles();\n }\n\n // Minify Scripts\n if($this->minifyStyles) {\n $output = $this->minifyCss($output);\n }\n\n // Write and Return Cache\n if($this->cacheStyles) {\n $cacheFile = fopen(\"cache/\".$this->layout.\".css\", \"w\");\n fwrite($cacheFile, $output);\n fclose($cacheFile);\n $output = \"<link rel='stylesheet' href='/cache/\".$this->layout.\".css'>\";\n return $output;\n }\n\n // If not caching then return a combined/minified output \n $output = \"<style>\n \".$output.\"\n </style>\";\n return $output;\n }", "title": "" }, { "docid": "3edbf77280df8ab6f837fcc0d957d550", "score": "0.5781063", "text": "static function addStyleSheet($path, $media='') { \t \t\r\n\t $identifier = md5($path);\r\n\t $options['href'] = $path;\r\n\t $options['type'] = 'text/css';\r\n\t $options['rel'] = 'stylesheet';\r\n\t if ($media) $options['media'] = $media;\r\n \t\r\n \t$GLOBALS['TSFE']->additionalHeaderData[$identifier] = self::getTag('link', $options);\r\n\t}", "title": "" }, { "docid": "7dabde2bfe70f1ed7bb6f5cac5443b12", "score": "0.578", "text": "public static function register_scripts_and_styles() {\n\t}", "title": "" }, { "docid": "680295a36265023c4fcfab72dd36ef49", "score": "0.57748556", "text": "public function cssfile($params) {\n // This stops styles inadvertently clashing with the main site.\n if (strpos($_SERVER['REQUEST_URI'], $this->getPluginPath()) === 0) {\n echo '<link rel=\"stylesheet\" type=\"text/css\" href=\"'.$this->getThemePath().'/css/style.css\" />';\n }\n }", "title": "" }, { "docid": "2ba050f400a5ddeaf21aa0c6ab758c7e", "score": "0.5761491", "text": "function style_sheet_setup($lastmodified=0, $lifetime=300, $themename=\"\") {\n/// approriately as well as the current path\n\n global $CFG;\n\n if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])) { // May not need to send stylesheet\n // Following lines from Wolfram Kriesing and John Dell\n $months = array_flip(array('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'));\n preg_match('~[^,]*,\\s(\\d+)\\s(\\w+)\\s(\\d+)\\s(\\d+):(\\d+):(\\d+).*~',\n $_SERVER['HTTP_IF_MODIFIED_SINCE'], $splitDate);\n $timestamp = gmmktime($splitDate[4], $splitDate[5], $splitDate[6], $months[$splitDate[2]]+1,\n $splitDate[1], $splitDate[3]);\n if ($lastmodified <= $timestamp) {\n header('HTTP/1.x 304 Not Modified');\n exit;\n }\n }\n\n header(\"Last-Modified: \" . gmdate(\"D, d M Y H:i:s\", $lastmodified) . \" GMT\");\n header(\"Expires: \" . gmdate(\"D, d M Y H:i:s\", time() + $lifetime) . \" GMT\");\n header(\"Cache-control: max_age = $lifetime\");\n header(\"Pragma: \");\n header(\"Content-type: text/css\"); // Correct MIME type\n\n if (!empty($themename)) {\n $CFG->theme = $themename;\n }\n\n return \"$CFG->wwwroot/theme/$CFG->theme\";\n\n}", "title": "" }, { "docid": "8653b2e53c24991108d8adab74414896", "score": "0.57602614", "text": "function versioned_stylesheet($relative_url, $add_attributes=\"\"){\n echo '<link rel=\"stylesheet\" href=\"'.versioned_resource($relative_url).'\" '.$add_attributes.'>'.\"\\n\";\n}", "title": "" }, { "docid": "4838c92f7d6f8fbed186761d70ef1b9a", "score": "0.57592005", "text": "public function render_styles() {\n if(!empty($this->styles)) {\n foreach($this->styles as $style) {\n echo '<link rel=\"stylesheet\" type=\"text/css\" href=\"', $style, '\" />';\n }\n }\n }", "title": "" }, { "docid": "9c77efba0732048682815189b339ef84", "score": "0.5748805", "text": "public function adminCustomCssPage()\n {\n get_template_part('inc/template/sunset-custom-css-page'); \n }", "title": "" }, { "docid": "5b3fa039050288c73d80a8c64863abdd", "score": "0.57329446", "text": "public function preExecute()\n {\n parent::preExecute();\n \n //Add ullCourse stylesheet for all actions\n $path = '/ullCourseTheme' . sfConfig::get('app_theme_package', 'NG') . \"Plugin/css/main.css\";\n $this->getResponse()->addStylesheet($path, 'last', array('media' => 'all'));\n }", "title": "" }, { "docid": "e9907f690df98c037a3e53149ab6561a", "score": "0.57163733", "text": "protected function _renderStyles()\n {\n $document = $this->getService('anahita:document');\n $html = '';\n\n // Generate stylesheet links\n foreach ($document->getStyleSheets() as $src => $attr) {\n\n $rel = 'stylesheet';\n\n if (strpos($src, '.less')) {\n $rel .= '/less';\n }\n\n $html .= '<link rel=\"'.$rel.'\" href=\"'.$src.'\" type=\"'.$attr['mime'].'\"';\n\n if (isset($attr['media'])) {\n $html .= ' media=\"'.$attr['media'].'\" ';\n }\n\n $html .= '/>';\n }\n\n foreach ($document->getStyle() as $type => $content) {\n $html .= '<style type=\"'.$type.'\">'.$content.'</style>';\n }\n\n return $html;\n }", "title": "" }, { "docid": "4ab6c1c6427b29885c40bcc9519250fc", "score": "0.5702806", "text": "public function enqueue_style () {\n\t \t\t\n\t \t}", "title": "" }, { "docid": "766a37a77e39f69de8f6408f4f667c68", "score": "0.56997293", "text": "public function hookDisplayHeader()\n {\n $this->context->controller->addCSS($this->_path.'css/avisclient.css', 'all');\n }", "title": "" }, { "docid": "0b1c7f81e29de77bf904ac84e746894e", "score": "0.5694218", "text": "public function hookbackOfficeHeader()\n {\n //if (strstr($_SERVER[\"REQUEST_URI\"], 'AdminSceau')) {\n return '<link rel=\"stylesheet\" type=\"text/css\" href=\"'\n . __PS_BASE_URI__ . 'modules/' . $this->name . '/views/css/fianetsceau.css\" />';\n //}\n }", "title": "" }, { "docid": "0df2eb6cf0a7ecb75d31e983c3730a9c", "score": "0.56870395", "text": "public function loadCss() {\n ?>\n <link rel=\"stylesheet\" href=\"common/css/util/gadgetquickstart.css\" />\n <link rel=\"stylesheet\" href=\"common/css/util/util.css\" />\n <?\n }", "title": "" }, { "docid": "3d3ba02aae5f9029ae66e67a8ee0a341", "score": "0.5686841", "text": "public function getStyleSheet()\n {\n $out = \"\";\n foreach($this->stylesheet as $stylesheet)\n {\n $out .= \"<link rel=\\\"stylesheet\\\" media=\\\"{$stylesheet['media']}\\\" href=\\\"{$stylesheet['href']}\\\">\\n\";\n }\n echo $out;\n }", "title": "" }, { "docid": "25ff1de0c2af815de2cc1f231cc3ad93", "score": "0.5669744", "text": "function indie_studio_dynamic_css(){\n header('Content-Type: text/css');\n indie_studio_create_dynamic_css();\n exit;\n}", "title": "" }, { "docid": "bbb7072fc7a7905d5e5f69257b586f94", "score": "0.5668213", "text": "public function load_custom_stylesheet() {\n\t\t\tglobal $wpex_theme;\n\t\t\tif ( 'base' == $wpex_theme->skin ) {\n\t\t\t\twp_enqueue_style( 'wpex-tribe-events', WPEX_CSS_DIR_URI .'wpex-tribe-events.css' );\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "38be4e03d39f6afd213d65242f6af4ef", "score": "0.566071", "text": "static function includeStyle( $style, $to_cache = false )\n\t{\n\t\tself::_includeScript( $style, 'css', $to_cache, self::POSITION_INITIAL );\n\t}", "title": "" }, { "docid": "1270473b960c5b518177695f347cdc22", "score": "0.5644324", "text": "function AddStylesheet($src, $id = \"\")\n{\n LoadJs(\"css!\" . $src, $id);\n}", "title": "" }, { "docid": "e1de674fb84d187df79befd5bd3ae961", "score": "0.5633334", "text": "public function styles() {\n\t\twp_enqueue_style( 'seb-styles', $this->plugin_url . '/assets/css/style.css' );\n\n\t\t//Add custom css here\n\t\t$css = '';\n\n\t\twp_add_inline_style( 'seb-styles', $css );\n\t}", "title": "" }, { "docid": "86b0c5e93fd329a1c5c5720c6e5e6396", "score": "0.562334", "text": "function css($url, $media = '')\n{\n Yii::app()->clientScript->registerCssFile(baseUrl($url), $media);\n}", "title": "" }, { "docid": "69b4f75a808808ff0aeae4bcfe1ca7aa", "score": "0.5614258", "text": "function rad_ribbon_style(){\n\tif( is_front_page() OR is_home() ):\n\t\t//filepath for the CSS document\n\t\t$css_file = plugins_url( 'css/style.css', __FILE__ );\n\t\t//tell WP this file exists\n\t\twp_register_style( 'rad-ribbon-css', $css_file );\n\t\t//put the file on the page\n\t\twp_enqueue_style( 'rad-ribbon-css' );\n\tendif;\n}", "title": "" }, { "docid": "115f783963e69f9bb239eb4698e83907", "score": "0.55999976", "text": "function CSS($styleName){\nglobal $styleSheet;\n\n\t$styleSheet .= '<link rel=\"stylesheet\" type=\"text/css\" href=\"'.CSS_PATH.$styleName.'\">';\n\t$styleSheet .= \"\\n\";\n\t\n\treturn $styleSheet;\n}", "title": "" }, { "docid": "538f9799b3fc27fd0bb17536f2ec68b9", "score": "0.55890864", "text": "function addCSSFiles()\n\t{\n\t}", "title": "" }, { "docid": "27079e40a870526148cf6e2cf77b04aa", "score": "0.5586751", "text": "function custom_editor_css() {\n echo '<link rel=\"stylesheet\" href=\"'.get_template_directory_uri() .'/stylesheets/editor.css\"></style>';\n }", "title": "" }, { "docid": "8f4011a3344262e0dbc18edccd2a9eef", "score": "0.55860883", "text": "function styles() {\t\t\r\n\t\twp_enqueue_style( $this->domain . '-admin-style' );\t\r\n\t}", "title": "" }, { "docid": "fff12bd95a71c777aba7612bd915da15", "score": "0.55856377", "text": "protected function includeCss($path) {\n echo '<link rel=\"stylesheet\" href=\"' . $this->getUrl($path) . '\">';\n }", "title": "" }, { "docid": "88246cd5d0f1e9f73bb6a51d29776722", "score": "0.55846685", "text": "protected function setDocument()\n\t{\n\t\tif (!isset($this->document))\n\t\t{\n\t\t\t$this->document = JFactory::getDocument();\n\t\t}\n\t\t$this->document->setTitle(JText::_('COM_JCPQM_QUESTIONS'));\n\t\t$this->document->addStyleSheet(JURI::root() . \"administrator/components/com_jcpqm/assets/css/questions.css\", (JcpqmHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');\n\t}", "title": "" }, { "docid": "f037bf2b1c2c6f2b834bd70ab2a2de87", "score": "0.5581245", "text": "public static function css_path(){\n return '../../..' . '/view/assets/css/';\n }", "title": "" }, { "docid": "e3ead26c765ad50a4471fabe809fec71", "score": "0.5577173", "text": "public function admin_head() {\n\t\t$config = Config::current();\n\t\t$path = $config->chyrp_url.\"/modules/picturize/lib/\";\n?>\n\t\t<link rel=\"stylesheet\" href=\"<?php echo $path; ?>style.css\" type=\"text/css\" media=\"screen\" />\n<?php\n\t}", "title": "" }, { "docid": "0cb83048f15cdc73fdf261eae8d68823", "score": "0.5566376", "text": "function cssUrl()\n{\n return Yii::app()->request->baseUrl . '/app/css/';\n}", "title": "" }, { "docid": "0dc647257dcb9807da66abc945bc3b0e", "score": "0.5562818", "text": "protected function addStylesheet($stylesheet)\n {\n $document = JFactory::getDocument();\n $document->addStylesheet($stylesheet);\n }", "title": "" }, { "docid": "d6b2d31b8021007edda925031b1f1fad", "score": "0.555448", "text": "function dtas_addstyle() {\n\techo '<link rel=\"stylesheet\" type=\"text/css\" href=\"'.dtas_pluginUrl().'style/dtas.css\" />'; \n}", "title": "" }, { "docid": "a9e013e5315d11583d7f8fd7d3a02cc9", "score": "0.5547095", "text": "public function editor_styles_callback() {\n\t\theader( 'Content-type: text/css' );\n\t\techo $this->get_primary_styles();\n\t\tdie();\n\t}", "title": "" }, { "docid": "54cbffe49e293eb8b85bb0d9e338ad13", "score": "0.55367374", "text": "public function OpenCSS() {\n if ( ! $this->css ) {\n $this->css = 'body {';\n $this->css .= 'margin-left: .5em;';\n $this->css .= 'margin-right: .5em;';\n $this->css .= 'text-align: left;';\n $this->css .= 'direction: ltr;';\n $this->css .= 'font-family: arial;';\n $this->css .= 'direction: ltr;';\n $this->css .= 'font-size:12pt;';\n $this->css .= 'font-weight:400;';\n $this->css .= '};';\n }\n }", "title": "" }, { "docid": "0cca5ebb0e3d8079afa4c6952caad53b", "score": "0.5533605", "text": "public function hookHeader() {\r\n $this->context->controller->addCSS($this->_path . 'css/style.css');\r\n $this->context->controller->addJS($this->_path . 'js/jquery.zaccordion.min.js');\r\n $this->context->controller->addJS($this->_path . 'js/script.js');\r\n }", "title": "" }, { "docid": "90082c3ad0465c100aae780a2721d2bf", "score": "0.5532724", "text": "function css_url(){\n\treturn base_url().\"_assets/main/css/\";\n}", "title": "" }, { "docid": "88618f692414dcdab314beec23789ac3", "score": "0.5528193", "text": "public function appendCssUrl($url) {\n $this->appendToHead(<<<HTML\n <link rel=\"stylesheet\" type=\"text/css\" href=\"{$url}\">\n\nHTML\n) ;\n }", "title": "" }, { "docid": "d978c7af23e21997ffbfc746c889211e", "score": "0.5526063", "text": "protected function _initLayoutView()\n {\n $this->bootstrap('view');\n $view = $this->getResource('view');\n $view->doctype('HTML5');\n\n $view->headLink()->appendStylesheet('//fonts.googleapis.com/css?family=Maven+Pro:700,900|Open+Sans:300italic,400italic,600italic,400,300,600', 'all');\n $view->headLink()->appendStylesheet('/resources/styles.css', 'all');\n $view->headLink()->appendStylesheet('/resources/960.css', 'all');\n\n $view->headScript()->prependFile('//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js');\n $view->headScript()->appendFile('/resources/main.js');\n// $view->headLink()->appendAlternate('/rss/show/channel/news/', 'application/rss+xml', 'Automotive ' . $view->escape($view->translate('Новини')));\n // $view->headScript()->prependFile($this->_siteCinfiguraion->site->jquery);\n // $view->headScript()->appendFile('/js/main.js');\n $view->headTitle('Lux Software')->setSeparator(' : ');\n // $view->headLink()->appendStylesheet('/css/style.css', 'all');\n $view->headLink(array('rel' => 'SHORTCUT ICON', 'href' => '/favicon.ico'), 'PREPEND');\n // $view->headMeta()->appendHttpEquiv('Content-Type', 'text/html;charset=utf-8');\n // $view->addHelperPath(APPLICATION_PATH . '/views/helpers', 'LuxSoftware_View_Helper_');\n return $view;\n }", "title": "" }, { "docid": "f2bd0db18e906b171dbf78ae3c9b4862", "score": "0.552493", "text": "public function master_print_styles(){\n\t\tif ( is_admin() ) {\n\t\t\t// enqueue all default admin styles\n\t\t\t$this->enqueue_styles((array)$this->admin_styles);\n\n\t\t\t// enqueue additional styles\n\t\t\tif (method_exists($this, 'admin_print_styles') ){\n\t\t\t\t$this->admin_print_styles();\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$this->styles = apply_filters('et_registered_styles', $this->styles);\n\t\t\t// enqueue all default script\n\t\t\t$this->enqueue_styles((array)$this->styles);\n\n\t\t\t// enqueue additional styles\n\t\t\tif ( method_exists($this, 'print_styles') ){\n\t\t\t\t$this->print_styles();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "97cfbc954b049ec9cf3986505b6b9d68", "score": "0.5518637", "text": "public static function loadStyles(): string\r\n {\r\n return TemplateEngine::LoadView('styles', ['styles' => static::$styles]);\r\n }", "title": "" }, { "docid": "00f3b447e9ed7d2ce5e2507d3bf4ae8b", "score": "0.55160487", "text": "public function hookHeader()\n {\n $this->context->controller->addJS($this->_path.'/views/js/front.js');\n $this->context->controller->addCSS($this->_path.'/views/css/front.css');\n }", "title": "" }, { "docid": "00f3b447e9ed7d2ce5e2507d3bf4ae8b", "score": "0.55160487", "text": "public function hookHeader()\n {\n $this->context->controller->addJS($this->_path.'/views/js/front.js');\n $this->context->controller->addCSS($this->_path.'/views/css/front.css');\n }", "title": "" }, { "docid": "00f3b447e9ed7d2ce5e2507d3bf4ae8b", "score": "0.55160487", "text": "public function hookHeader()\n {\n $this->context->controller->addJS($this->_path.'/views/js/front.js');\n $this->context->controller->addCSS($this->_path.'/views/css/front.css');\n }", "title": "" }, { "docid": "14d7f5b9cc4e90f507cdfc473a15b5f4", "score": "0.5514701", "text": "function modelexergue_insert_head_css($flux) {\n\t$flux.= '<link rel=\"stylesheet\" type=\"text/css\" href=\"'.find_in_path('css/modelexergue.css').'\" />' . \"\\n\";\n\treturn $flux;\n}", "title": "" }, { "docid": "a22a40b761aa17700441bd14eedcf83a", "score": "0.55116695", "text": "private function _addStylesheet($name){\r\n\t\tif (file_exists( trailingslashit(get_stylesheet_directory()).$name.'.css')){\r\n\t\t\t$css = trailingslashit(get_stylesheet_directory()).$name.'.css';\r\n\t\t} else if (file_exists(trailingslashit(plugin_dir_path(__FILE__)).'templates/'.$name.'.css')){\r\n\t\t\t$css = trailingslashit(plugin_dir_url(__FILE__)).'templates/'.$name.'.css';\r\n\t\t}\r\n\t\tif (isset($css)){\r\n\t\t\tadd_action( 'wp_enqueue_scripts', function() use($name, $css){\r\n\t\t\t\twp_enqueue_style($name, $css);\r\n\t\t\t} );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "bd2bf12ccf2a48d8b35836b155e918be", "score": "0.55111146", "text": "static function _overideWebFxLayout() {\r\r\n\t\tglobal $_CB_framework;\r\r\n\r\r\n\t\tob_start();\r\r\n?>\r\r\n.dynamic-tab-pane-control h2 {\r\r\n\ttext-align:\tcenter;\r\r\n\twidth:\t\tauto;\r\r\n}\r\r\n\r\r\n.dynamic-tab-pane-control h2 a {\r\r\n\tdisplay:\tinline;\r\r\n\twidth:\t\tauto;\r\r\n}\r\r\n\r\r\n.dynamic-tab-pane-control a:hover {\r\r\n\tbackground: transparent;\r\r\n}\r\r\n<?php\r\r\n\t\t$css\t=\tob_get_contents();\r\r\n\t\tob_end_clean();\r\r\n\t\t$_CB_framework->document->addHeadStyleInline( $css );\r\r\n\t}", "title": "" }, { "docid": "7badb948870f5d60a417aeb48d16a903", "score": "0.55099094", "text": "public function __toString() {\n\t\theader(\"Content-type: text/css\");\n\t\t$this->getCSS();\n\t}", "title": "" }, { "docid": "035da116adc4fccba10f2894301f6bf8", "score": "0.5507635", "text": "function css(){\n return $this->manager->css();\n }", "title": "" }, { "docid": "09581b89c9be920cf6564df834e0bcb7", "score": "0.54957694", "text": "function add_css()\n{\n link_custom_css('/info-page.css');\n}", "title": "" }, { "docid": "865efd4eb08f8a7c968d0d9c48a197e7", "score": "0.5495108", "text": "public function getStyleSheet() {\n return 'controlUsers';\n }", "title": "" }, { "docid": "1182f783e58ccbd7ea0dc67f9f80afae", "score": "0.5493478", "text": "protected static function addExtensionCascadingStyleSheet()\n {\n $extensionKey = self::$controller->getControllerExtensionKey();\n $typoScriptConfiguration = AbstractController::getTypoScriptConfiguration($extensionKey);\n if (empty($typoScriptConfiguration['stylesheet']) === false) {\n $cascadingStyleSheetAbsoluteFileName = GeneralUtility::getFileAbsFileName($typoScriptConfiguration['stylesheet']);\n if (is_file($cascadingStyleSheetAbsoluteFileName)) {\n $cascadingStyleSheet = substr($cascadingStyleSheetAbsoluteFileName, strlen(AbstractController::getSitePath()));\n self::addCascadingStyleSheet($cascadingStyleSheet);\n } else {\n throw new Exception(FlashMessages::translate('error.fileDoesNotExist', [\n htmlspecialchars($cascadingStyleSheetAbsoluteFileName)\n ]));\n }\n } elseif (is_file(ExtensionManagementUtility::extPath($extensionKey) . AbstractController::$cssRootPath . '/' . $extensionKey . '.css')) {\n $extensionWebPath = AbstractController::getExtensionWebPath($extensionKey);\n $cascadingStyleSheet = $extensionWebPath . AbstractController::$cssRootPath . '/' . $extensionKey . '.css';\n self::addCascadingStyleSheet($cascadingStyleSheet);\n }\n }", "title": "" }, { "docid": "dc28f978ada26537788f2cc6ff9aef41", "score": "0.54834086", "text": "public function hookHeader()\n {\n $this->context->controller->addJS($this->_path . '/views/js/front.js');\n $this->context->controller->addCSS($this->_path . '/views/css/front.css');\n }", "title": "" }, { "docid": "7ec221da1f73af658de0be4e9abc16bc", "score": "0.54820156", "text": "public function output_custom_css () {\r\n\t\theader( 'Content-Type: text/css' );\r\n\r\n\t\techo $this->settings['custom-css-code'];\r\n\r\n\t\tdie();\r\n\t}", "title": "" }, { "docid": "a8adb149c6b84cf75ccbc8a000da61f2", "score": "0.54766893", "text": "public function style($context);", "title": "" }, { "docid": "de15cee32ef2dbc94ecce9c9d0f73e7a", "score": "0.54765296", "text": "function login_enqueue_scripts()\n {\n echo '<link rel=\"stylesheet\" id=\"sw-login-css\" href=\"' . $this->settings['stylesheet_url'] . '\" type=\"text/css\" media=\"all\" />';\n }", "title": "" }, { "docid": "1d5847c079940bb3ed0b821a73e2292b", "score": "0.5472549", "text": "public function hookHeader()\n {\n $this->context->controller->addJS($this->_path . '/views/js/front.js');\n $this->context->controller->addCSS($this->_path . '/views/css/front.css');\n }", "title": "" }, { "docid": "1d5847c079940bb3ed0b821a73e2292b", "score": "0.5472549", "text": "public function hookHeader()\n {\n $this->context->controller->addJS($this->_path . '/views/js/front.js');\n $this->context->controller->addCSS($this->_path . '/views/css/front.css');\n }", "title": "" }, { "docid": "990882ba26a1bc5b9286552b2c87eb4b", "score": "0.54658705", "text": "public function vo_add_CSS() {\n\t\twp_register_style( 'samplestyle', plugins_url( '/css/samplestyle.css', __FILE__ ), array(), '1.0', 'screen' );\n\t\twp_enqueue_style( 'samplestyle' );\n\t}", "title": "" }, { "docid": "6f7c80b48945c31ded1905785f8c21cb", "score": "0.5460335", "text": "public function registerStylesheet() {\n // Adding the CSS stylesheet for the widget to wordpress\n wp_enqueue_style('commands', plugin_dir_url(__FILE__) . 'command.css');\n }", "title": "" }, { "docid": "4b8a136a69d59c03223f4707cf792414", "score": "0.54467154", "text": "public function sendCSS() {\n\t\theader(\"Content-type: text/css\");\n\t\techo $this->getCSS();\n\t\n\t}", "title": "" }, { "docid": "d1264f3780264fa1ab33777cad9f8c50", "score": "0.5445453", "text": "function customPageHeader(){\n?>\n<!-- Add any CSS or JS files here -->\n <link rel=\"stylesheet\" href=\"./css/styles.css\" />\n<?php }", "title": "" }, { "docid": "d1264f3780264fa1ab33777cad9f8c50", "score": "0.5445453", "text": "function customPageHeader(){\n?>\n<!-- Add any CSS or JS files here -->\n <link rel=\"stylesheet\" href=\"./css/styles.css\" />\n<?php }", "title": "" }, { "docid": "1ee60303b49e5878dc6172631601257e", "score": "0.54392534", "text": "protected function _renderLayout()\n {\n include 'app/views/layouts/default.phtml';\n }", "title": "" }, { "docid": "22f90d3cb876b01d1ac2bcb5a58c0b62", "score": "0.5435783", "text": "function add_styles () {\r\n\t\t$load_style_url = upfront_ajax_url('upfront_load_styles') . '&layout_post_id=' . self::$layout_post_id . '&template_post_id=' . self::$template_post_id;\r\n\t\t//wp_enqueue_style('upfront-main', $load_style_url, array(), Upfront_ChildTheme::get_version(), 'all');\r\n\r\n\t\t$deps = Upfront_CoreDependencies_Registry::get_instance();\r\n\t\t$deps->add_header_style($load_style_url);\r\n\r\n\t\t// Load theme fonts\r\n\t\t$theme_fonts = json_decode(Upfront_Cache_Utils::get_option('upfront_' . get_stylesheet() . '_theme_fonts'));\r\n\t\t$theme_fonts = apply_filters('upfront_get_theme_fonts', $theme_fonts, array());\r\n\t\tif ( $theme_fonts ) {\r\n\t\t\tforeach ($theme_fonts as $theme_font) {\r\n\t\t\t\t$deps->add_font($theme_font->font->family, $theme_font->variant);\r\n\t\t\t}\r\n\t\t}\r\n\t\t// The dependencies server will manage the fonts.\r\n\t}", "title": "" } ]
9a90b892d85e608090d1c803a3cf147b
Test the result against what was expected.
[ { "docid": "c2567bddba34235daeae9a62c321ffc2", "score": "0.65238976", "text": "public function checkResult($result) {\n switch ($this->_assertion):\n case \"equals\":\n return ($result == $this->_expectedResult);\n default:\n throw new Exception(\"Unknown assertion: $this->assertion\");\n endswitch;\n }", "title": "" } ]
[ { "docid": "ef763ab53811055038c3675f32da7b6a", "score": "0.7593228", "text": "public function testResult()\n\t{\n\t\t$result = $this->instance->result();\n\n\t\treturn $this->assertEquals(true, is_string($result));\n\t}", "title": "" }, { "docid": "dfe3b55a22e4c3e86d41b2290150efca", "score": "0.7107411", "text": "public function testGetResults()\n {\n $is_array = is_array($this->calc->getResults());\n $this->assertTrue($is_array);\n }", "title": "" }, { "docid": "71c389eff2038b570449acfa7c0ec061", "score": "0.68997777", "text": "public function pass() { return $this->assertTrue(1 == 1); }", "title": "" }, { "docid": "6ceb7621a801f5125d6dbbe0de57f469", "score": "0.68793875", "text": "public function returned($result)\n {\n a::assertContains($result, $this->values, \"{$this->signature} returned the expected result at least once\");\n }", "title": "" }, { "docid": "1cef6a55441fda76b49520a2c1927abb", "score": "0.67432463", "text": "protected function _execTest() {\n\n if ($this->_current_value == $this->_recommended_value) {\n return self::RESULT_OK;\n }\n\n return self::RESULT_NOTICE;\n }", "title": "" }, { "docid": "2e0eef87abb883192cd2c104221a1c14", "score": "0.66375184", "text": "public function seeResultEquals($value)\n {\n $this->assertEquals($value, $this->last_result, 'in '.$this->last_result);\n }", "title": "" }, { "docid": "4d18c5ec7569077ee094961be7418025", "score": "0.6595776", "text": "protected function _execTest() {\n if ($this->_current_value == $this->_recommended_value) {\n return self::RESULT_OK;\n }\n\n return self::RESULT_WARN;\n }", "title": "" }, { "docid": "ae2bea2143336d4f2a22d468b74b85b3", "score": "0.65642565", "text": "abstract protected function checkResults(array $results): bool;", "title": "" }, { "docid": "00d2ed68a54bd2610470faf094111bf4", "score": "0.656131", "text": "public function run(&$results)\n {\n // https://randomascii.wordpress.com/2012/02/11/they-sure-look-equal/\n // https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/\n\n\n // TEST: equality comparison with zero and numbers near zero\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0 = -0');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('A.1', 'Expression; check for numeric accuracy with values near zero', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('-0 = 0');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('A.2', 'Expression; check for numeric accuracy with values near zero', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.0 = -0.0');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('A.3', 'Expression; check for numeric accuracy with values near zero', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('-0.0 = 0.0');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('A.4', 'Expression; check for numeric accuracy with values near zero', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.0 = -0.0');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('A.5', 'Expression; check for numeric accuracy with values near zero', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('-0.0 = 0.0');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('A.6', 'Expression; check for numeric accuracy with values near zero', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0 = 0.0000000000000001');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('A.7', 'Expression; check for numeric accuracy with values near zero', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.0000000000000001 = 0');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('A.8', 'Expression; check for numeric accuracy with values near zero', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0 = -0.0000000000000001');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('A.9', 'Expression; check for numeric accuracy with values near zero', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('-0.0000000000000001 = 0');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('A.10', 'Expression; check for numeric accuracy with values near zero', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.0 = 0.0000000000000001');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('A.11', 'Expression; check for numeric accuracy with values near zero', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.0000000000000001 = 0.0');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('A.12', 'Expression; check for numeric accuracy with values near zero', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.0 = -0.0000000000000001');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('A.13', 'Expression; check for numeric accuracy with values near zero', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('-0.0000000000000001 = 0.0');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('A.14', 'Expression; check for numeric accuracy with values near zero', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0 = 1e-308');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('A.15', 'Expression; check for numeric accuracy with values near zero', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('1e-308 = 0');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('A.16', 'Expression; check for numeric accuracy with values near zero', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0 = -1e-308');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('A.17', 'Expression; check for numeric accuracy with values near zero', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('-1e-308 = 0');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('A.18', 'Expression; check for numeric accuracy with values near zero', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.0 = 1e-308');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('A.19', 'Expression; check for numeric accuracy with values near zero', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('1e-308 = 0.0');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('A.20', 'Expression; check for numeric accuracy with values near zero', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.0 = -1e-308');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('A.21', 'Expression; check for numeric accuracy with values near zero', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('-1e-308 = 0.0');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('A.22', 'Expression; check for numeric accuracy with values near zero', $actual, $expected, $results);\n\n\n\n // TEST: equality comparison involving calculations\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.1 + 0.2 = 0.3');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('B.1', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.3 - 0.2 = 0.1');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('B.2', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.2 + 0.3 = 0.5');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('B.3', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.5 - 0.3 = 0.2');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('B.4', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.3 + 0.4 = 0.7');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('B.5', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.7 - 0.4 = 0.3');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('B.6', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.4 + 0.5 = 0.9');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('B.7', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.9 - 0.5 = 0.4');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('B.8', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.5 + 0.6 = 1.1');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('B.9', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('1.1 - 0.6 = 0.5');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('B.10', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.6 + 0.7 = 1.3');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('B.11', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('1.3 - 0.7 = 0.6');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('B.12', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.7 + 0.8 = 1.5');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('B.13', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('1.5 - 0.8 = 0.7');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('B.14', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.8 + 0.9 = 1.7');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('B.15', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('1.7 - 0.9 = 0.8');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('B.16', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.9 + 1.0 = 1.9');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('B.17', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('1.9 - 1.0 = 0.9');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('B.18', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.1 + 9999.2 = 19998.3');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('B.19', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19998.3 - 9999.2 = 9999.1');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('B.20', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.2 + 9999.3 = 19998.5');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('B.21', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19998.5 - 9999.3 = 9999.2');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('B.22', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.3 + 9999.4 = 19998.7');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('B.23', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19998.7 - 9999.4 = 9999.3');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('B.24', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.4 + 9999.5 = 19998.9');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('B.25', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19998.9 - 9999.5 = 9999.4');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('B.26', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.5 + 9999.6 = 19999.1');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('B.27', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19999.1 - 9999.6 = 9999.5');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('B.28', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.6 + 9999.7 = 19999.3');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('B.29', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19999.3 - 9999.7 = 9999.6');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('B.30', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.7 + 9999.8 = 19999.5');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('B.31', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19999.5 - 9999.8 = 9999.7');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('B.32', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.8 + 9999.9 = 19999.7');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('B.33', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19999.7 - 9999.9 = 9999.8');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('B.34', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.9 + 10000.0 = 19999.9');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('B.35', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19999.9 - 10000.0 = 9999.9');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('B.36', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n\n\n // TEST: non-equality comparison involving calculations\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.1 + 0.2 != 0.3');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('C.1', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.3 - 0.2 != 0.1');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('C.2', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.2 + 0.3 != 0.5');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('C.3', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.5 - 0.3 != 0.2');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('C.4', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.3 + 0.4 != 0.7');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('C.5', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.7 - 0.4 != 0.3');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('C.6', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.4 + 0.5 != 0.9');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('C.7', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.9 - 0.5 != 0.4');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('C.8', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.5 + 0.6 != 1.1');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('C.9', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('1.1 - 0.6 != 0.5');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('C.10', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.6 + 0.7 != 1.3');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('C.11', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('1.3 - 0.7 != 0.6');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('C.12', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.7 + 0.8 != 1.5');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('C.13', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('1.5 - 0.8 != 0.7');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('C.14', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.8 + 0.9 != 1.7');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('C.15', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('1.7 - 0.9 != 0.8');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('C.16', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.9 + 1.0 != 1.9');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('C.17', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('1.9 - 1.0 != 0.9');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('C.18', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.1 + 9999.2 != 19998.3');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('C.19', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19998.3 - 9999.2 != 9999.1');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('C.20', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.2 + 9999.3 != 19998.5');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('C.21', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19998.5 - 9999.3 != 9999.2');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('C.22', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.3 + 9999.4 != 19998.7');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('C.23', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19998.7 - 9999.4 != 9999.3');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('C.24', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.4 + 9999.5 != 19998.9');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('C.25', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19998.9 - 9999.5 != 9999.4');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('C.26', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.5 + 9999.6 != 19999.1');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('C.27', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19999.1 - 9999.6 != 9999.5');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('C.28', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.6 + 9999.7 != 19999.3');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('C.29', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19999.3 - 9999.7 != 9999.6');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('C.30', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.7 + 9999.8 != 19999.5');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('C.31', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19999.5 - 9999.8 != 9999.7');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('C.32', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.8 + 9999.9 != 19999.7');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('C.33', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19999.7 - 9999.9 != 9999.8');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('C.34', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.9 + 10000.0 != 19999.9');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('C.35', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19999.9 - 10000.0 != 9999.9');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('C.36', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n\n\n // TEST: non-equality comparison involving calculations\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.1 + 0.2 <> 0.3');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('D.1', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.3 - 0.2 <> 0.1');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('D.2', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.2 + 0.3 <> 0.5');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('D.3', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.5 - 0.3 <> 0.2');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('D.4', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.3 + 0.4 <> 0.7');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('D.5', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.7 - 0.4 <> 0.3');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('D.6', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.4 + 0.5 <> 0.9');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('D.7', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.9 - 0.5 <> 0.4');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('D.8', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.5 + 0.6 <> 1.1');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('D.9', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('1.1 - 0.6 <> 0.5');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('D.10', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.6 + 0.7 <> 1.3');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('D.11', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('1.3 - 0.7 <> 0.6');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('D.12', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.7 + 0.8 <> 1.5');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('D.13', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('1.5 - 0.8 <> 0.7');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('D.14', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.8 + 0.9 <> 1.7');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('D.15', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('1.7 - 0.9 <> 0.8');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('D.16', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.9 + 1.0 <> 1.9');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('D.17', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('1.9 - 1.0 <> 0.9');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('D.18', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.1 + 9999.2 <> 19998.3');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('D.19', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19998.3 - 9999.2 <> 9999.1');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('D.20', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.2 + 9999.3 <> 19998.5');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('D.21', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19998.5 - 9999.3 <> 9999.2');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('D.22', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.3 + 9999.4 <> 19998.7');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('D.23', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19998.7 - 9999.4 <> 9999.3');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('D.24', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.4 + 9999.5 <> 19998.9');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('D.25', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19998.9 - 9999.5 <> 9999.4');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('D.26', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.5 + 9999.6 <> 19999.1');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('D.27', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19999.1 - 9999.6 <> 9999.5');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('D.28', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.6 + 9999.7 <> 19999.3');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('D.29', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19999.3 - 9999.7 <> 9999.6');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('D.30', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.7 + 9999.8 <> 19999.5');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('D.31', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19999.5 - 9999.8 <> 9999.7');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('D.32', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.8 + 9999.9 <> 19999.7');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('D.33', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19999.7 - 9999.9 <> 9999.8');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('D.34', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.9 + 10000.0 <> 19999.9');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('D.35', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19999.9 - 10000.0 <> 9999.9');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('D.36', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n\n\n // TEST: greater-than comparison involving calculations\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.1 + 0.2 > 0.3');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('E.1', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.3 - 0.2 > 0.1');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('E.2', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.2 + 0.3 > 0.5');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('E.3', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.5 - 0.3 > 0.2');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('E.4', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.3 + 0.4 > 0.7');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('E.5', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.7 - 0.4 > 0.3');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('E.6', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.4 + 0.5 > 0.9');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('E.7', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.9 - 0.5 > 0.4');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('E.8', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.5 + 0.6 > 1.1');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('E.9', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('1.1 - 0.6 > 0.5');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('E.10', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.6 + 0.7 > 1.3');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('E.11', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('1.3 - 0.7 > 0.6');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('E.12', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.7 + 0.8 > 1.5');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('E.13', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('1.5 - 0.8 > 0.7');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('E.14', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.8 + 0.9 > 1.7');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('E.15', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('1.7 - 0.9 > 0.8');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('E.16', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.9 + 1.0 > 1.9');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('E.17', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('1.9 - 1.0 > 0.9');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('E.18', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.1 + 9999.2 > 19998.3');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('E.19', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19998.3 - 9999.2 > 9999.1');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('E.20', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.2 + 9999.3 > 19998.5');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('E.21', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19998.5 - 9999.3 > 9999.2');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('E.22', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.3 + 9999.4 > 19998.7');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('E.23', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19998.7 - 9999.4 > 9999.3');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('E.24', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.4 + 9999.5 > 19998.9');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('E.25', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19998.9 - 9999.5 > 9999.4');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('E.26', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.5 + 9999.6 > 19999.1');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('E.27', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19999.1 - 9999.6 > 9999.5');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('E.28', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.6 + 9999.7 > 19999.3');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('E.29', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19999.3 - 9999.7 > 9999.6');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('E.30', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.7 + 9999.8 > 19999.5');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('E.31', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19999.5 - 9999.8 > 9999.7');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('E.32', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.8 + 9999.9 > 19999.7');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('E.33', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19999.7 - 9999.9 > 9999.8');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('E.34', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.9 + 10000.0 > 19999.9');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('E.35', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19999.9 - 10000.0 > 9999.9');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('E.36', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n\n\n // TEST: greater-than-or-equal-to comparison involving calculations\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.1 + 0.2 >= 0.3');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('F.1', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.3 - 0.2 >= 0.1');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('F.2', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.2 + 0.3 >= 0.5');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('F.3', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.5 - 0.3 >= 0.2');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('F.4', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.3 + 0.4 >= 0.7');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('F.5', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.7 - 0.4 >= 0.3');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('F.6', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.4 + 0.5 >= 0.9');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('F.7', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.9 - 0.5 >= 0.4');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('F.8', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.5 + 0.6 >= 1.1');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('F.9', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('1.1 - 0.6 >= 0.5');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('F.10', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.6 + 0.7 >= 1.3');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('F.11', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('1.3 - 0.7 >= 0.6');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('F.12', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.7 + 0.8 >= 1.5');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('F.13', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('1.5 - 0.8 >= 0.7');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('F.14', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.8 + 0.9 >= 1.7');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('F.15', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('1.7 - 0.9 >= 0.8');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('F.16', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.9 + 1.0 >= 1.9');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('F.17', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('1.9 - 1.0 >= 0.9');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('F.18', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.1 + 9999.2 >= 19998.3');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('F.19', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19998.3 - 9999.2 >= 9999.1');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('F.20', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.2 + 9999.3 >= 19998.5');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('F.21', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19998.5 - 9999.3 >= 9999.2');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('F.22', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.3 + 9999.4 >= 19998.7');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('F.23', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19998.7 - 9999.4 >= 9999.3');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('F.24', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.4 + 9999.5 >= 19998.9');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('F.25', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19998.9 - 9999.5 >= 9999.4');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('F.26', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.5 + 9999.6 >= 19999.1');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('F.27', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19999.1 - 9999.6 >= 9999.5');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('F.28', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.6 + 9999.7 >= 19999.3');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('F.29', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19999.3 - 9999.7 >= 9999.6');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('F.30', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.7 + 9999.8 >= 19999.5');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('F.31', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19999.5 - 9999.8 >= 9999.7');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('F.32', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.8 + 9999.9 >= 19999.7');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('F.33', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19999.7 - 9999.9 >= 9999.8');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('F.34', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.9 + 10000.0 >= 19999.9');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('F.35', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19999.9 - 10000.0 >= 9999.9');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('F.36', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n\n\n // TEST: less-than comparison involving calculations\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.1 + 0.2 < 0.3');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('G.1', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.3 - 0.2 < 0.1');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('G.2', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.2 + 0.3 < 0.5');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('G.3', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.5 - 0.3 < 0.2');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('G.4', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.3 + 0.4 < 0.7');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('G.5', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.7 - 0.4 < 0.3');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('G.6', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.4 + 0.5 < 0.9');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('G.7', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.9 - 0.5 < 0.4');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('G.8', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.5 + 0.6 < 1.1');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('G.9', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('1.1 - 0.6 < 0.5');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('G.10', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.6 + 0.7 < 1.3');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('G.11', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('1.3 - 0.7 < 0.6');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('G.12', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.7 + 0.8 < 1.5');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('G.13', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('1.5 - 0.8 < 0.7');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('G.14', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.8 + 0.9 < 1.7');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('G.15', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('1.7 - 0.9 < 0.8');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('G.16', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.9 + 1.0 < 1.9');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('G.17', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('1.9 - 1.0 < 0.9');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('G.18', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.1 + 9999.2 < 19998.3');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('G.19', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19998.3 - 9999.2 < 9999.1');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('G.20', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.2 + 9999.3 < 19998.5');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('G.21', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19998.5 - 9999.3 < 9999.2');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('G.22', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.3 + 9999.4 < 19998.7');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('G.23', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19998.7 - 9999.4 < 9999.3');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('G.24', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.4 + 9999.5 < 19998.9');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('G.25', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19998.9 - 9999.5 < 9999.4');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('G.26', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.5 + 9999.6 < 19999.1');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('G.27', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19999.1 - 9999.6 < 9999.5');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('G.28', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.6 + 9999.7 < 19999.3');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('G.29', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19999.3 - 9999.7 < 9999.6');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('G.30', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.7 + 9999.8 < 19999.5');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('G.31', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19999.5 - 9999.8 < 9999.7');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('G.32', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.8 + 9999.9 < 19999.7');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('G.33', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19999.7 - 9999.9 < 9999.8');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('G.34', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.9 + 10000.0 < 19999.9');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('G.35', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19999.9 - 10000.0 < 9999.9');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('G.36', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n\n\n // TEST: less-than-or-equal-to comparison involving calculations\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.1 + 0.2 <= 0.3');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('H.1', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.3 - 0.2 <= 0.1');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('H.2', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.2 + 0.3 <= 0.5');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('H.3', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.5 - 0.3 <= 0.2');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('H.4', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.3 + 0.4 <= 0.7');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('H.5', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.7 - 0.4 <= 0.3');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('H.6', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.4 + 0.5 <= 0.9');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('H.7', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.9 - 0.5 <= 0.4');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('H.8', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.5 + 0.6 <= 1.1');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('H.9', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('1.1 - 0.6 <= 0.5');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('H.10', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.6 + 0.7 <= 1.3');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('H.11', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('1.3 - 0.7 <= 0.6');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('H.12', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.7 + 0.8 <= 1.5');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('H.13', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('1.5 - 0.8 <= 0.7');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('H.14', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.8 + 0.9 <= 1.7');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('H.15', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('1.7 - 0.9 <= 0.8');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('H.16', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('0.9 + 1.0 <= 1.9');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('H.17', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('1.9 - 1.0 <= 0.9');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('H.18', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.1 + 9999.2 <= 19998.3');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('H.19', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19998.3 - 9999.2 <= 9999.1');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('H.20', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.2 + 9999.3 <= 19998.5');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('H.21', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19998.5 - 9999.3 <= 9999.2');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('H.22', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.3 + 9999.4 <= 19998.7');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('H.23', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19998.7 - 9999.4 <= 9999.3');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('H.24', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.4 + 9999.5 <= 19998.9');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('H.25', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19998.9 - 9999.5 <= 9999.4');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('H.26', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.5 + 9999.6 <= 19999.1');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('H.27', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19999.1 - 9999.6 <= 9999.5');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('H.28', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.6 + 9999.7 <= 19999.3');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('H.29', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19999.3 - 9999.7 <= 9999.6');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('H.30', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.7 + 9999.8 <= 19999.5');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('H.31', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19999.5 - 9999.8 <= 9999.7');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('H.32', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.8 + 9999.9 <= 19999.7');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('H.33', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19999.7 - 9999.9 <= 9999.8');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('H.34', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('9999.9 + 10000.0 <= 19999.9');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('H.35', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Tests\\Util::evalExpression('19999.9 - 10000.0 <= 9999.9');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('H.36', 'Expression; check for numeric accuracy when performing comparison invovling calculations', $actual, $expected, $results);\n }", "title": "" }, { "docid": "e1fedd4f6b9c3dc52b62bd9a9422a3f0", "score": "0.6559643", "text": "public function validateResult()\n\t{\n\t}", "title": "" }, { "docid": "e1fedd4f6b9c3dc52b62bd9a9422a3f0", "score": "0.6559643", "text": "public function validateResult()\n\t{\n\t}", "title": "" }, { "docid": "3fbc66573b67999348b5b62ea7038b25", "score": "0.6557738", "text": "public function passed(){\n\n\t$this->check();\n\n\treturn (in_array(false, $this->results)) ? false : true;\n\n}", "title": "" }, { "docid": "0beb18e66b9461e3d9cc054c6122be4a", "score": "0.6526471", "text": "function assertMatchingResults($results, $expected, $msg = null) {\r\n $this->assertEquals(count($expected), count($results), $msg);\r\n \r\n foreach ($expected as $exp => $expRides) {\r\n $this->assertTrue(isset($results[$exp]), $msg);\r\n $foundForThisRide = $results[$exp];\r\n $this->assertTrue(count(array_diff($foundForThisRide, $expRides)) === 0, $msg);\r\n }\r\n }", "title": "" }, { "docid": "ba34d5241436d8d3ef42148f5c0daaee", "score": "0.6506444", "text": "public function getExpectedResult(): array;", "title": "" }, { "docid": "191c0fa0e957848778b735d4e1734ad4", "score": "0.63936186", "text": "function test ($actual_res, $expect_res) {\n if (str_replace(\" \", \"\", $actual_res) === str_replace(\" \", \"\", $expect_res)) {\n echo \".\\n\";\n }\n else {\n echo \"Test Failed\";\n }\n}", "title": "" }, { "docid": "fde5bed3778a7622516a7dd2c12ddbb1", "score": "0.63579893", "text": "public function assertExecute()\n\t{\t\n\t\t$msgObj \t\t= &parent::getCurrentMessage();\n\t\t$http \t\t\t= $msgObj::getData('currentHttp');\n\t\t$arguments \t\t= $msgObj::getData('currentArguments');\n\t\t$outputFormat\t= $msgObj::getData('outputFormat');\n\t\t$compareTo\t\t= $arguments[0];\n\t\t\n\t\tif(!isset($arguments[1])){\n\t\t\t// If we're not given two terms, match against the body of the latest httpRequest\n\t\t\t$compareAgainst = ($http) ? $http->getBody() : '';\n\t\t}else{\n\t\t\t$compareAgainst = $arguments[1];\n\t\t}\n\n\t\t$passTest = true;\n\t\tswitch(strtolower($outputFormat)){\n\t\t\tcase 'json':\n\t\t\t\tif(json_encode($compareTo)!=json_encode($compareAgainst)){\n\t\t\t\t\t$passTest = false;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t// match as strings\n\t\t\t\tif(trim($compareAgainst)!=trim($compareTo)){\n\t\t\t\t\t$passTest = false;\n\t\t\t\t}\n\t\t}\n\t\t\n\t\tif(!$passTest){\n\t\t\tthrow new Exception(get_class().': Values not equal!');\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "92c3694512ad8d9c8f3c82dbb82a8b05", "score": "0.63494503", "text": "public function testGetResults0()\n{\n\n $actual = $this->morphTo->getResults();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "title": "" }, { "docid": "c0b9a9a9a7eee3fe5fe3f2ba7583e8aa", "score": "0.6289749", "text": "public function testSuccessfulResult()\n {\n $location = new FileLocation(FilePath::parse('./foo.webunit'), 1);\n\n $assert = new AssertContains($location, 'Foo', new Modifiers());\n $result = new AssertResult($assert);\n\n self::assertTrue($result->isSuccess());\n self::assertSame('', $result->getError());\n self::assertSame($assert, $result->getAssert());\n }", "title": "" }, { "docid": "f950cc24c483b4410d6caafbba95dad3", "score": "0.6262952", "text": "function grade_known_good(&$output, &$testCase) {\n $cleanedOutput = qtype_coderunner_grader::clean($output);\n $cleanedExpected = qtype_coderunner_grader::clean($testCase->expected);\n $isCorrect = $cleanedOutput == $cleanedExpected;\n $awardedMark = $isCorrect ? $testCase->mark : 0.0;\n if (isset($testCase->stdin)) {\n $resultStdin = qtype_coderunner_grader::tidy($testCase->stdin);\n } else {\n $resultStdin = null;\n }\n\n return new qtype_coderunner_test_result(\n qtype_coderunner_grader::tidy($testCase->testcode),\n $testCase->mark,\n $isCorrect,\n $awardedMark,\n qtype_coderunner_grader::snip($cleanedExpected),\n qtype_coderunner_grader::snip($cleanedOutput),\n $resultStdin,\n qtype_coderunner_grader::tidy($testCase->extra)\n );\n }", "title": "" }, { "docid": "99e4b27d72bdb6b8d66b7efae83520aa", "score": "0.6254067", "text": "public function testGenerateResults()\n {\n $data = file_get_contents('./fixtures/games-24.txt');\n $testGames = unserialize($data);\n $data = file_get_contents('./fixtures/franchises.txt');\n $testFranchises = unserialize($data);\n\n // We don't need to pass in a DB connection if we're not using the DB\n $mapper = new \\IBL\\GameMapper();\n $testResults = $mapper->generateResults($testGames, $testFranchises);\n $testResult = $testResults['MAD'];\n $expectedResult = array(\n 'homeTeam' => 'MAD',\n 'awayTeam' => 'BOW',\n 'awayScores' => array(4, 5, 2),\n 'homeScores' => array(3, 6, 3)\n );\n $this->assertEquals($expectedResult, $testResult);\n }", "title": "" }, { "docid": "a2c1e0e008d2d75c4e01bfbc5d5f34d0", "score": "0.6233393", "text": "public function assertResultFormat($response) {\n $msg = \"If it doesn't make sure you have Loaded the test data provided by the tripal_ws_brapi_tesdata helper module.\";\n\n // Check Response->result.\n $this->assertObjectHasAttribute('result', $response,\n \"The response for \" . $this->callname . \" should have a result key.\");\n\n // Check Response->result->data.\n $this->assertObjectHasAttribute('data', $response->result,\n \"The response for \" . $this->callname . \" ->result should have a data key.\");\n\n // The data should be an array.\n $this->assertIsArray($response->result->data,\n \"The data for \" . $this->callname . \" should be an array.\");\n\n // A single result should have various keys.\n $datapoint = $response->result->data[0];\n foreach ($this->data_structure as $value) {\n $this->assertIsString($value,\n \"Each crop name should be a simple string.\");\n }\n }", "title": "" }, { "docid": "4cf4b8a8ae2010bfc1e0c4e3c04d68bd", "score": "0.62229145", "text": "public function hasResult(): bool;", "title": "" }, { "docid": "e17c49910d1b65bd4762ba21e5c9ce0e", "score": "0.61848915", "text": "function assertEqual($expected, $actual) : void {}", "title": "" }, { "docid": "e17c49910d1b65bd4762ba21e5c9ce0e", "score": "0.61848915", "text": "function assertEqual($expected, $actual) : void {}", "title": "" }, { "docid": "e17c49910d1b65bd4762ba21e5c9ce0e", "score": "0.61848915", "text": "function assertEqual($expected, $actual) : void {}", "title": "" }, { "docid": "e17c49910d1b65bd4762ba21e5c9ce0e", "score": "0.61848915", "text": "function assertEqual($expected, $actual) : void {}", "title": "" }, { "docid": "f3ca5d7c40848468b23590527fa6a707", "score": "0.61748934", "text": "public function equals(Result $result): bool\n {\n if (null !== $this->score xor null !== $result->score) {\n return false;\n }\n\n if (null !== $this->score && !$this->score->equals($result->score)) {\n return false;\n }\n\n if ($this->success !== $result->success) {\n return false;\n }\n\n if ($this->completion !== $result->completion) {\n return false;\n }\n\n if ($this->response !== $result->response) {\n return false;\n }\n\n if ($this->duration !== $result->duration) {\n return false;\n }\n\n if (null !== $this->extensions xor null !== $result->extensions) {\n return false;\n }\n\n if (null !== $this->extensions && null !== $result->extensions && !$this->extensions->equals($result->extensions)) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "7bc296e9fed31b8681f09e0801a42f87", "score": "0.6141646", "text": "public function testResultConfiguration()\n {\n $this->runConfigurationAssertions(new Results(), [\n 'user_id',\n 'quizes_id',\n 'total_mark',\n 'yes_ans',\n 'no_ans',\n 'status',\n 'date',\n ]);\n }", "title": "" }, { "docid": "03f0f1f2215d399ff055cc4a15c807a2", "score": "0.6130408", "text": "public function testLtiBasicOutcomes()\n {\n }", "title": "" }, { "docid": "3feb5a8a8aece8edd7db24bc7b202a28", "score": "0.61121106", "text": "public function testgetRes()\r\n {\r\n\r\n # Test getting the result in boolean\r\n\r\n $IPc = new IPcontrol(\"8.8.8.8\");\r\n $this->assertInstanceOf(\"\\Anax\\IPcontrol\\IPcontrol\", $IPc);\r\n\r\n # Test getting the result, assert that it is a boolean\r\n $res = $IPc->getResult();\r\n $isBool = is_bool($res);\r\n $this->assertTrue($isBool);\r\n }", "title": "" }, { "docid": "216524b7b961d75fde94c1280f7ab04e", "score": "0.6111878", "text": "public function printResult(bool $result, ?string $why = null, $value = null, $expected = null)\n {\n $this->assertions += 1;\n\n if ($result === false) {\n $this->failures += 1;\n }\n\n if ($this->verbose === false && $result === true) {\n return; // quite successful assertion\n }\n\n if ($this->last_test !== $this->current_test) {\n $this->printTitle($this->current_test);\n\n $this->last_test = $this->current_test;\n }\n\n $trace = $this->trace();\n\n $detailed = $result === false;\n\n $formatted_value = $this->format($value, $detailed);\n\n $show_diff = $value !== $expected && func_num_args() === 4;\n\n if ($show_diff) {\n $formatted_expected = $this->format($expected, $detailed);\n\n $multiline = strpos($formatted_value . $formatted_expected, \"\\n\") !== false;\n\n if ($multiline) {\n $output = \"\\n\" . trim($this->formatDiff($formatted_value, $formatted_expected), \"\\r\\n\");\n } else {\n $output = \" ({$formatted_value} !== {$formatted_expected})\";\n }\n } else {\n $multiline = strpos($formatted_value, \"\\n\") !== false;\n\n if ($multiline) {\n $output = \"\\n\" . trim($this->indent($formatted_value), \"\\r\\n\");\n } else {\n $output = $value === null\n ? \"\" // don't display null when there's no difference from the expected value\n : \" ({$formatted_value})\";\n }\n }\n\n echo ($result === true ? \"PASS\" : \"FAIL\")\n . ($trace ? \" [{$trace}]\" : \"\")\n . ($why ? \" {$why}\" : \"\")\n . $output . \"\\n\";\n }", "title": "" }, { "docid": "52f4b404b9e0fd6dc94cca62909ecdcb", "score": "0.6074434", "text": "function asrt( $a, $b ) {\n\tif ($a === $b) {\n\t\tglobal $tests;\n\t\t$tests++;\n\t\tprint( \"[\".$tests.\"]\" );\n\t}\n\telse {\n\t\tprinttext(\"FAILED TEST: EXPECTED $b BUT GOT: $a \");\n\t\tfail();\n\t}\n}", "title": "" }, { "docid": "e7b08241b91f9a8407fb9622116384fd", "score": "0.60608006", "text": "public function seeEmptyResult()\n {\n \\PHPUnit_Framework_Assert::assertEmpty($this->last_result);\n }", "title": "" }, { "docid": "c157af53fdb07e7f290d7523832ea382", "score": "0.6057302", "text": "public function testAddResult()\n {\n $date = new DateTime('2016-09-18');\n $this->calc->setStartDate($date);\n $result = $this->invokeMethod($this->calc,'calculateMonth',[$date]);\n $this->assertInstanceOf('\\Burroughs\\PayDateCalculator',$this->invokeMethod($this->calc,'addResult',[$result]));\n $result = $this->calc->getResults();\n $this->assertTrue(is_array($result));\n $this->assertTrue(count($result) == 1);\n $this->assertTrue($result[0]['month'] == 'September');\n $this->assertTrue($result[0]['salary_date'] == '30 Sep 2016');\n $this->assertTrue($result[0]['bonus_date'] == '19 Oct 2016');\n }", "title": "" }, { "docid": "534fcb3d80bdccb06f8868c02abfe923", "score": "0.6038753", "text": "public function comparisonTest() {\n\t\tif ($actual = $this->getActual()) {\n\t\t\techo $actual;\n\t\t}\n\t\t// Next line should report no condition assignment without comparison\n\t\tif (\n\t\t\t$actual = $this->getActual()\n\t\t) {\n\t\t\techo $actual;\n\t\t}\n\t\tif ($actual = $this->getActual() == true) {\n\t\t\techo $actual;\n\t\t}\n\t\tif ($actual = $this->getActual() > 3) {\n\t\t\techo $actual;\n\t\t}\n\t\tif ($actual = $this->getActual() < 3) {\n\t\t\techo $actual;\n\t\t}\n\t\tif ($actual = $this->getActual() <= 3) {\n\t\t\techo $actual;\n\t\t}\n\t\tif ($actual = $this->getActual() >= 3) {\n\t\t\techo $actual;\n\t\t}\n\t\tif ($actual = $this->getActual() === 3) {\n\t\t\techo $actual;\n\t\t}\n\t\tif ($actual = $this->getActual() != 3) {\n\t\t\techo $actual;\n\t\t}\n\t\tif ($actual = $this->getActual() !== 3) {\n\t\t\techo $actual;\n\t\t}\n\t\tif (true == $actual = $this->getActual()) {\n\t\t\techo $actual;\n\t\t}\n\t\tif ($actual) {\n\t\t\treturn 'yo';\n\t\t}\n\t}", "title": "" }, { "docid": "2122c5bc066a8f61245e6bf9b52b7434", "score": "0.6035612", "text": "public static function getExpectedResults() {\n\t\t$expectedResults = array(\n\t\t\t1 => 'Incrementar',\n\t\t\t2 => 'Descender',\n\t\t\t3 => 'Acelerar',\n\t\t\t4 => 'Desacelerar',\n\t\t\t5 => 'Sostener',\n\t\t\t6 => 'Conservar',\n\t\t\t7 => 'Mantener'\n\t\t);\n\t\treturn $expectedResults;\n\t}", "title": "" }, { "docid": "a8fc68e9f0e5c085a96b4184978e8cfe", "score": "0.6034989", "text": "public function testGetMarkupWithResult() {\n\n //was the storeFileSize called with right par\n //ameters?\n $this->fileSizeHolderMock->expects($this->once())->method('storeFileSize')->with($this->source, strlen('dummy'));\n\n //Is it the right content?\n $content = $this->markupDownloader->getMarkup($this->source);\n $this->assertEquals($content, 'dummy');\n }", "title": "" }, { "docid": "0de82f3f4230266845b326f23b0c00ef", "score": "0.6027243", "text": "protected function _execTest() {\n\n $curlinfo = curl_version();\n\n if ( version_compare($this->_current_value, '5.1.6', '>=') ||\n (version_compare($this->_current_value, '4.4.4', '>=')) && ( version_compare($this->_current_value, '5', '<') )\n ) {\n return self::RESULT_OK;\n } else {\n return self::RESULT_WARN;\n }\n\n }", "title": "" }, { "docid": "e1ee9948cae75935fbb03d8b9c63f865", "score": "0.6021045", "text": "public function testUserGotCorrectAnswer()\n {\n $question_answer[] = ['question' => 17, 'answer' => 47];\n $question_answer[] = ['question' => 18, 'answer' => 48];\n $question_answer[] = ['question' => 19, 'answer' => 49];\n $question_answer[] = ['question' => 20, 'answer' => 50];\n $question_answer[] = ['question' => 21, 'answer' => 51];\n $question_answer[] = ['question' => 22, 'answer' => 52];\n $question_answer[] = ['question' => 23, 'answer' => 56];\n for ($i = 0; $i < count($question_answer); $i++) {\n $this->post(\n route('result.submit'),\n [\n 'question' => $question_answer[$i]['question'],\n 'answer' => $question_answer[$i]['answer']\n ]\n )->assertJson(['success' => true, 'answer' => true]);\n }\n }", "title": "" }, { "docid": "a7974a86dde11beae0f74bccdb30f359", "score": "0.60159886", "text": "public function hasResult(){\n return $this->_has(4);\n }", "title": "" }, { "docid": "a165d0416d90e1cff119c0e1b934020f", "score": "0.60048854", "text": "function testSum($a, $b, $result)\n{\n $this->assertEquals($result, sum($a, $b));\n}", "title": "" }, { "docid": "7167a604bbb8ee0316198765818ad033", "score": "0.5999868", "text": "public function testGameShowResultsWin()\n {\n $game = new GameResults();\n $this->assertInstanceOf(\"\\Kimchi\\Dice\\GameResults\", $game);\n\n $_SESSION[\"dicetotal\"] = 21;\n $data = $game->showResults();\n\n $this->expectOutputString(\"You win!\");\n\n print $data[\"notice\"];\n }", "title": "" }, { "docid": "8ba2bab6b2eedaaf13fefa3372e2fb03", "score": "0.59973204", "text": "private function run_api_tests() {\n\t\t$response = $this->get_api_results();\n\t\tif ( false === $response ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$this->process_api_results( $response );\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "fb4487a1ffe69d0a55f40e17018c56b9", "score": "0.5996767", "text": "public function __syncFaxCheck($result) {\n $this->assertInstanceOf('SignalWire\\Relay\\Calling\\Results\\FaxResult', $result);\n $this->assertTrue($result->isSuccessful());\n $this->assertEquals($result->getDocument(), 'file.pdf');\n $this->assertEquals($result->getPages(), '1');\n $this->assertEquals($result->getIdentity(), '+1xxx');\n $this->assertObjectHasAttribute('type', $result->getEvent()->payload);\n $this->assertObjectHasAttribute('params', $result->getEvent()->payload);\n }", "title": "" }, { "docid": "61db967e464385e58d7465cd5d255a3e", "score": "0.59967303", "text": "public function test_return_expected_answer() {\n\n\t\t$this->assertSame(\n\t\t\t'42',\n\t\t\t( new Oracle() )->answer(),\n\t\t\t'answer() should return the expected answer.'\n\t\t);\n\t}", "title": "" }, { "docid": "55784265339dbc335307998eed1e2011", "score": "0.5952925", "text": "protected function SelfTest()\n\t\t{\n\t\t\t/* The three test vectors form an absolute minimal test set. */ \n\t\t\tif (($ret = $this->TestVectors()) < 0)\n\t\t\t\treturn $ret;\n\t\t \n\t\t\t/* \n\t\t\t * If at all possible you should run these tests too. They take \n\t\t\t * more time, but provide a more thorough coverage. \n\t\t\t */ \n\t\t\tif (($ret = $this->TestSequences()) < 0)\n\t\t\t\treturn $ret;\n\t\t \n\t\t\t/* Test the odd-sized keys. */ \n\t\t\tif (($ret = $this->TestOddSizedKeys()) < 0)\n\t\t\t\treturn $ret;\n\t\t\t\n\t\t\treturn self::SUCCESS;\n\t\t}", "title": "" }, { "docid": "4ba7ba3a36fac7a622227b498b241153", "score": "0.59525234", "text": "public function run(&$results)\n {\n\n // BEGIN TEST\n $validator = \\Flexio\\Base\\Validator::create();\n $values = array(\n 'id' => 1\n );\n $checks = array(\n 'id' => array('type' => 'number', 'required' => true, 'enum' => [])\n );\n $actual = $validator->check($values, $checks)->getParams();\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('A.1', '\\Flexio\\Base\\Validator::check(); check enumeration of allowed values', $actual, $expected, $results);\n\n // BEGIN TEST\n $validator = \\Flexio\\Base\\Validator::create();\n $values = array(\n 'id' => 1\n );\n $checks = array(\n 'id' => array('type' => 'number', 'required' => true, 'enum' => [2])\n );\n $actual = $validator->check($values, $checks)->getParams();\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('A.2', '\\Flexio\\Base\\Validator::check(); check enumeration of allowed values', $actual, $expected, $results);\n\n // BEGIN TEST\n $validator = \\Flexio\\Base\\Validator::create();\n $values = array(\n 'id' => 1\n );\n $checks = array(\n 'id' => array('type' => 'number', 'required' => true, 'enum' => ['1'])\n );\n $actual = $validator->check($values, $checks)->getParams();\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('A.3', '\\Flexio\\Base\\Validator::check(); check enumeration of allowed values', $actual, $expected, $results);\n\n // BEGIN TEST\n $validator = \\Flexio\\Base\\Validator::create();\n $values = array(\n 'id' => 1\n );\n $checks = array(\n 'id' => array('type' => 'number', 'required' => true, 'enum' => [1])\n );\n $actual = $validator->check($values, $checks)->getParams();\n $expected = array(\n 'id' => 1\n );\n \\Flexio\\Tests\\Check::assertInArray('A.4', '\\Flexio\\Base\\Validator::check(); check enumeration of allowed values', $actual, $expected, $results);\n\n // BEGIN TEST\n $validator = \\Flexio\\Base\\Validator::create();\n $values = array(\n 'id' => 1\n );\n $checks = array(\n 'id' => array('type' => 'number', 'required' => true, 'enum' => [1,2])\n );\n $actual = $validator->check($values, $checks)->getParams();\n $expected = array(\n 'id' => 1\n );\n \\Flexio\\Tests\\Check::assertInArray('A.5', '\\Flexio\\Base\\Validator::check(); check enumeration of allowed values', $actual, $expected, $results);\n\n // BEGIN TEST\n $validator = \\Flexio\\Base\\Validator::create();\n $values = array(\n 'id' => 1\n );\n $checks = array(\n 'id' => array('type' => 'number', 'required' => true, 'enum' => [1,2])\n );\n $actual = $validator->check($values, $checks)->getParams();\n $expected = array(\n 'id' => 1\n );\n \\Flexio\\Tests\\Check::assertInArray('A.6', '\\Flexio\\Base\\Validator::check(); check enumeration of allowed values', $actual, $expected, $results);\n\n // BEGIN TEST\n $validator = \\Flexio\\Base\\Validator::create();\n $values = array(\n 'id' => 'A'\n );\n $checks = array(\n 'id' => array('enum' => [''])\n );\n $actual = $validator->check($values, $checks)->getParams();\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('A.7', '\\Flexio\\Base\\Validator::check(); check enumeration of allowed values', $actual, $expected, $results);\n\n // BEGIN TEST\n $validator = \\Flexio\\Base\\Validator::create();\n $values = array(\n 'id' => 'A'\n );\n $checks = array(\n 'id' => array('enum' => ['a'])\n );\n $actual = $validator->check($values, $checks)->getParams();\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('A.8', '\\Flexio\\Base\\Validator::check(); check enumeration of allowed values', $actual, $expected, $results);\n\n // BEGIN TEST\n $validator = \\Flexio\\Base\\Validator::create();\n $values = array(\n 'id' => 'A'\n );\n $checks = array(\n 'id' => array('enum' => ['AA'])\n );\n $actual = $validator->check($values, $checks)->getParams();\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('A.9', '\\Flexio\\Base\\Validator::check(); check enumeration of allowed values', $actual, $expected, $results);\n\n // BEGIN TEST\n $validator = \\Flexio\\Base\\Validator::create();\n $values = array(\n 'id' => 'A'\n );\n $checks = array(\n 'id' => array('enum' => ['A'])\n );\n $actual = $validator->check($values, $checks)->getParams();\n $expected = array(\n 'id' => 'A'\n );\n \\Flexio\\Tests\\Check::assertInArray('A.10', '\\Flexio\\Base\\Validator::check(); check enumeration of allowed values', $actual, $expected, $results);\n\n // BEGIN TEST\n $validator = \\Flexio\\Base\\Validator::create();\n $values = array(\n 'id' => ''\n );\n $checks = array(\n 'id' => array('enum' => ['','A','B'])\n );\n $actual = $validator->check($values, $checks)->getParams();\n $expected = array(\n 'id' => ''\n );\n \\Flexio\\Tests\\Check::assertInArray('A.11', '\\Flexio\\Base\\Validator::check(); check enumeration of allowed values', $actual, $expected, $results);\n\n // BEGIN TEST\n $validator = \\Flexio\\Base\\Validator::create();\n $values = array(\n 'id' => 'A'\n );\n $checks = array(\n 'id' => array('enum' => ['','A','B'])\n );\n $actual = $validator->check($values, $checks)->getParams();\n $expected = array(\n 'id' => 'A'\n );\n \\Flexio\\Tests\\Check::assertInArray('A.12', '\\Flexio\\Base\\Validator::check(); check enumeration of allowed values', $actual, $expected, $results);\n\n // BEGIN TEST\n $validator = \\Flexio\\Base\\Validator::create();\n $values = array(\n 'id' => 'B'\n );\n $checks = array(\n 'id' => array('enum' => ['','A','B'])\n );\n $actual = $validator->check($values, $checks)->getParams();\n $expected = array(\n 'id' => 'B'\n );\n \\Flexio\\Tests\\Check::assertInArray('A.13', '\\Flexio\\Base\\Validator::check(); check enumeration of allowed values', $actual, $expected, $results);\n\n // BEGIN TEST\n $validator = \\Flexio\\Base\\Validator::create();\n $values = array(\n );\n $checks = array(\n 'id' => array('enum' => ['','A','B'])\n );\n $actual = $validator->check($values, $checks)->getParams();\n $expected = array(\n );\n \\Flexio\\Tests\\Check::assertInArray('A.14', '\\Flexio\\Base\\Validator::check(); check enumeration of allowed values', $actual, $expected, $results);\n\n // BEGIN TEST\n $validator = \\Flexio\\Base\\Validator::create();\n $values = array(\n );\n $checks = array(\n 'id' => array('enum' => ['','A','B'], 'required' => true)\n );\n $actual = $validator->check($values, $checks)->getParams();\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('A.15', '\\Flexio\\Base\\Validator::check(); check enumeration of allowed values', $actual, $expected, $results);\n\n\n\n // TEST: check enumeration of allowed values; make sure values still pass other contraints\n\n // BEGIN TEST\n $validator = \\Flexio\\Base\\Validator::create();\n $values = array(\n 'id' => 1\n );\n $checks = array(\n 'id' => array('type' => 'string', 'required' => true, 'enum' => [1])\n );\n $actual = $validator->check($values, $checks)->getParams();\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('B.1', '\\Flexio\\Base\\Validator::check(); check enumeration of allowed values; value must still pass other contraints', $actual, $expected, $results);\n\n // BEGIN TEST\n $validator = \\Flexio\\Base\\Validator::create();\n $values = array(\n 'id' => true\n );\n $checks = array(\n 'id' => array('type' => 'any', 'required' => true, 'enum' => [1,'A'])\n );\n $actual = $validator->check($values, $checks)->getParams();\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('B.2', '\\Flexio\\Base\\Validator::check(); check enumeration of allowed values; value must still pass other contraints', $actual, $expected, $results);\n\n // BEGIN TEST\n $validator = \\Flexio\\Base\\Validator::create();\n $values = array(\n 'id' => 1\n );\n $checks = array(\n 'id' => array('type' => 'any', 'required' => true, 'enum' => [1,'A',true])\n );\n $actual = $validator->check($values, $checks)->getParams();\n $expected = array(\n 'id' => 1\n );\n \\Flexio\\Tests\\Check::assertInArray('B.3', '\\Flexio\\Base\\Validator::check(); check enumeration of allowed values; value must still pass other contraints', $actual, $expected, $results);\n\n // BEGIN TEST\n $validator = \\Flexio\\Base\\Validator::create();\n $values = array(\n 'id' => 'A'\n );\n $checks = array(\n 'id' => array('type' => 'any', 'required' => true, 'enum' => [1,'A',true])\n );\n $actual = $validator->check($values, $checks)->getParams();\n $expected = array(\n 'id' => 'A'\n );\n \\Flexio\\Tests\\Check::assertInArray('B.4', '\\Flexio\\Base\\Validator::check(); check enumeration of allowed values; value must still pass other contraints', $actual, $expected, $results);\n\n // BEGIN TEST\n $validator = \\Flexio\\Base\\Validator::create();\n $values = array(\n 'id' => true\n );\n $checks = array(\n 'id' => array('type' => 'any', 'required' => true, 'enum' => [1,'A',true])\n );\n $actual = $validator->check($values, $checks)->getParams();\n $expected = array(\n 'id' => true\n );\n \\Flexio\\Tests\\Check::assertInArray('B.5', '\\Flexio\\Base\\Validator::check(); check enumeration of allowed values; value must still pass other contraints', $actual, $expected, $results);\n\n // BEGIN TEST\n $validator = \\Flexio\\Base\\Validator::create();\n $values = array(\n 'id' => false\n );\n $checks = array(\n 'id' => array('type' => 'any', 'required' => true, 'enum' => [1,'A',true])\n );\n $actual = $validator->check($values, $checks)->getParams();\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('B.6', '\\Flexio\\Base\\Validator::check(); check enumeration of allowed values; value must still pass other contraints', $actual, $expected, $results);\n\n // BEGIN TEST\n $validator = \\Flexio\\Base\\Validator::create();\n $values = array(\n 'id' => 1\n );\n $checks = array(\n 'status' => array('type' => 'string', 'required' => false, 'enum' => ['A'])\n );\n $actual = $validator->check($values, $checks)->getParams();\n $expected = array(\n );\n \\Flexio\\Tests\\Check::assertInArray('B.7', '\\Flexio\\Base\\Validator::check(); check enumeration of allowed values; value must still pass other contraints', $actual, $expected, $results);\n\n // BEGIN TEST\n $validator = \\Flexio\\Base\\Validator::create();\n $values = array(\n 'status' => 'A'\n );\n $checks = array(\n 'status' => array('type' => 'string', 'required' => false, 'enum' => ['A'])\n );\n $actual = $validator->check($values, $checks)->getParams();\n $expected = array(\n 'status' => 'A'\n );\n \\Flexio\\Tests\\Check::assertInArray('B.8', '\\Flexio\\Base\\Validator::check(); check enumeration of allowed values; value must still pass other contraints', $actual, $expected, $results);\n\n // BEGIN TEST\n $validator = \\Flexio\\Base\\Validator::create();\n $values = array(\n 'status' => 'B'\n );\n $checks = array(\n 'status' => array('type' => 'string', 'required' => false, 'enum' => ['A'])\n );\n $actual = $validator->check($values, $checks)->getParams();\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('B.9', '\\Flexio\\Base\\Validator::check(); check enumeration of allowed values; value must still pass other contraints', $actual, $expected, $results);\n\n\n\n // TEST: check enumeration of allowed values\n\n // BEGIN TEST\n $validator = \\Flexio\\Base\\Validator::create();\n $values = array(\n 'status' => 'A'\n );\n $checks = array(\n 'status' => array(\n 'array' => true, // explode status into an array, each element of which must satisfy type/enum\n 'type' => 'string',\n 'required' => false,\n 'enum' => ['A','B']\n )\n );\n $actual = $validator->check($values, $checks)->getParams();\n $expected = array(\n 'status' => ['A']\n );\n \\Flexio\\Tests\\Check::assertInArray('C.1', '\\Flexio\\Base\\Validator::check(); check enumeration of allowed values; value must still pass other contraints', $actual, $expected, $results);\n\n // BEGIN TEST\n $validator = \\Flexio\\Base\\Validator::create();\n $values = array(\n 'status' => 'B'\n );\n $checks = array(\n 'status' => array(\n 'array' => true, // explode status into an array, each element of which must satisfy type/enum\n 'type' => 'string',\n 'required' => false,\n 'enum' => ['A','B']\n )\n );\n $actual = $validator->check($values, $checks)->getParams();\n $expected = array(\n 'status' => ['B']\n );\n \\Flexio\\Tests\\Check::assertInArray('C.2', '\\Flexio\\Base\\Validator::check(); check enumeration of allowed values; value must still pass other contraints', $actual, $expected, $results);\n\n // BEGIN TEST\n $validator = \\Flexio\\Base\\Validator::create();\n $values = array(\n 'status' => 'A,B'\n );\n $checks = array(\n 'status' => array(\n 'array' => true, // explode status into an array, each element of which must satisfy type/enum\n 'type' => 'string',\n 'required' => false,\n 'enum' => ['A','B']\n )\n );\n $actual = $validator->check($values, $checks)->getParams();\n $expected = array(\n 'status' => ['A','B']\n );\n \\Flexio\\Tests\\Check::assertInArray('C.3', '\\Flexio\\Base\\Validator::check(); check enumeration of allowed values; value must still pass other contraints', $actual, $expected, $results);\n\n // BEGIN TEST\n $validator = \\Flexio\\Base\\Validator::create();\n $values = array(\n 'status' => 'A,B'\n );\n $checks = array(\n 'status' => array(\n 'array' => false, // explode status into an array, each element of which must satisfy type/enum\n 'type' => 'string',\n 'required' => false,\n 'enum' => ['A,B']\n )\n );\n $actual = $validator->check($values, $checks)->getParams();\n $expected = array(\n 'status' => 'A,B'\n );\n \\Flexio\\Tests\\Check::assertInArray('C.4', '\\Flexio\\Base\\Validator::check(); check enumeration of allowed values; value must still pass other contraints', $actual, $expected, $results);\n\n // BEGIN TEST\n $validator = \\Flexio\\Base\\Validator::create();\n $values = array(\n 'status' => 'A,B'\n );\n $checks = array(\n 'status' => array(\n 'array' => false, // explode status into an array, each element of which must satisfy type/enum\n 'type' => 'string',\n 'required' => false,\n 'enum' => ['A','B']\n )\n );\n $actual = $validator->check($values, $checks)->getParams();\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('C.5', '\\Flexio\\Base\\Validator::check(); check enumeration of allowed values; value must still pass other contraints', $actual, $expected, $results);\n\n // BEGIN TEST\n $validator = \\Flexio\\Base\\Validator::create();\n $values = array(\n 'status' => 'A,C'\n );\n $checks = array(\n 'status' => array(\n 'array' => true, // explode status into an array, each element of which must satisfy type/enum\n 'type' => 'string',\n 'required' => false,\n 'enum' => ['A','B']\n )\n );\n $actual = $validator->check($values, $checks)->getParams();\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('C.6', '\\Flexio\\Base\\Validator::check(); check enumeration of allowed values; value must still pass other contraints', $actual, $expected, $results);\n }", "title": "" }, { "docid": "0046832219ab1068ebe3858e4ee6df1b", "score": "0.59378695", "text": "public function hasResult(){\n return $this->_has(5);\n }", "title": "" }, { "docid": "a3dcf94cc17c1aa98f2c83a661b5b667", "score": "0.59351873", "text": "public function testSetValuesToResult()\n {\n $input = [array(\n 'id' => '1',\n 'idmateria' => '1',\n 'concepto' => 'concepto1',\n 'descripcion' => 'descripcion1'\n )];\n $output = [array(\n 'id' => '1',\n 'idMatter' => '1',\n 'concept' => 'concepto1',\n 'definition' => 'descripcion1'\n )];\n $adminPareja = ParejasManager::getInstance();\n $this->assertEquals($output, $adminPareja->setValuesToResult($input));\n }", "title": "" }, { "docid": "7730e34f9c0b234e6207a10964d395f5", "score": "0.59331185", "text": "public function testGetReturnValue()\n {\n $this->creditMemo->method('getBaseRewardCurrencyAmount')\n ->willReturn(10);\n\n $this->creditMemo->method('getBaseCustomerBalanceReturnMax')\n ->willReturn(100);\n\n self::assertEquals(90, $this->block->getReturnValue(), \"Final refund amount wrong\");\n }", "title": "" }, { "docid": "d72056bfbe4cf4abb111a24fcf7ccf91", "score": "0.5931606", "text": "public function testResultPage()\n {\n $this->call('GET', '/api/result');\n\n $this->assertResponseOk();\n\n $this->call('GET', '/api/result/2015-01-16');\n\n $this->assertResponseOk();\n\n $this->call('GET', '/api/result/2015-01-17');\n\n $this->assertResponseStatus(404);\n }", "title": "" }, { "docid": "070dbcdfd87e80393c2fbd91c5eee205", "score": "0.5925832", "text": "public function testCalculateTheMessageEven(): void\n\t{\n\t\t$returnValue = 2;\n\n\t\t$responseObjectMock = Mockery::mock(CalculationResponseObject::class);\n\t\t$responseObjectMock->expects()->getReturnValue()->andReturns($returnValue);\n\n\t\t$this->relatedService->expects()->calculateOtherStuff($returnValue)->andReturns($responseObjectMock);\n\n\t\t$this->repository->expects()->getAllTheData($returnValue)->andReturns(\"2ataDemos\");\n\n\n\t\t$resultMessage = $this->myService->calculateTheMessage($returnValue);\n\n\t\t$this->assertEquals(\"someData2\", $resultMessage);\n\n\t\t/*\n\t\t$this->assertNotEquals();\n\t\t$this->assertTrue();\n\t\t$this->assertNull();\n\t\t$this->assertEmpty();\n\t\t$this->assertNotEmpty();\n\t\t$this->assertInstanceOf();\n\t\t$this->assertContains();\n\t\t$this->assertGreaterThan();\n\t\t$this->assertGreaterThanOrEquals();\n\t\t$this->assertJsonStringEqualsJsonString();\n\t\t$this->assertCount();\n\t\t$this->assertContains();\n\t\t$this->assertArrayHasKey();\n\t\t*/\n\t\t// Also nice to know:\n\t\t//Mockery::any()\n\t\t//Mockery::on()\n\t}", "title": "" }, { "docid": "fa435064a7dc4ebe9cc51808c70897ea", "score": "0.59219646", "text": "function _check($data)\n\t{\n\t\tforeach ($data as $widget_tests) {\n\t\t\t$widget = $widget_tests['widget'];\n\t\t\tforeach ($widget_tests['params'] as $test) {\n\t\t\t\t$result = $widget->render(\n\t\t\t\t\t$test['params']['name'],\n\t\t\t\t\t$test['params']['value'],\n\t\t\t\t\t$test['params']['options']\n\t\t\t\t);\n\t\t\t\t//$this->assertEquals($test['result'], $result);\n\t\t\t\t$this->assertTrue($this->_compare_html($test['result'],$result),\"\\n\\n### expected ###\\n$test[result]\\n\\n### actual ###\\n$result\\n\\n\");\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "07fe8d2621e817c02470fb9f09d49aa1", "score": "0.59186566", "text": "protected function ok(): void\n\t{\n\t\t$this->assertTrue(true);\n\t}", "title": "" }, { "docid": "0957138d2d94e061c804620c9553ba01", "score": "0.58970463", "text": "public function validateTestListAction1($result)\n\t{\n\t\t$this->assertTrue(true);\n\t\treturn;\n\t}", "title": "" }, { "docid": "215380fc2b05ea3381048d09c86ee409", "score": "0.5888041", "text": "public function testDriverLicence0()\n{\n\n $actual = $this->person->driverLicence();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "title": "" }, { "docid": "b17a31f1bb83275d8a8d37d16f9e9e9b", "score": "0.5874967", "text": "public function testGetReturnValue0()\n{\n\n $actual = $this->context->getReturnValue();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "title": "" }, { "docid": "4f4bbfcd18e6b6637cd12d11a3c2f7dc", "score": "0.58727926", "text": "public function testGetReturnValueReturnsCorrectValue()\n {\n $this->joinPoint->setReturnValue('Test');\n $this->assertEquals('Test', $this->joinPoint->getReturnValue());\n }", "title": "" }, { "docid": "315dcde8507153373980b437875cb7cf", "score": "0.58697927", "text": "public function run(&$results)\n {\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Identifier::isValid('abc');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('A.1', '\\Flexio\\Base\\Identifier::isValid(); identifiers should start with a character', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Identifier::isValid('1bc');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('A.2', '\\Flexio\\Base\\Identifier::isValid(); identifiers should start with a character', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Identifier::isValid('.bc');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('A.3', '\\Flexio\\Base\\Identifier::isValid(); identifiers should start with a character', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Identifier::isValid('/bc');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('A.4', '\\Flexio\\Base\\Identifier::isValid(); identifiers should start with a character', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Identifier::isValid('\\bc');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('A.5', '\\Flexio\\Base\\Identifier::isValid(); identifiers should start with a character', $actual, $expected, $results);\n\n\n\n // TEST: chars after first char should be alphanmeric\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Identifier::isValid('abcdef123');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('B.1', '\\Flexio\\Base\\Identifier::isValid(); non-alphanumeric characters', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Identifier::isValid('abc.def');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('B.2', '\\Flexio\\Base\\Identifier::isValid(); non-alphanumeric characters', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Identifier::isValid('abc/def');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('B.3', '\\Flexio\\Base\\Identifier::isValid(); non-alphanumeric characters', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Identifier::isValid('abc\\def');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('B.4', '\\Flexio\\Base\\Identifier::isValid(); non-alphanumeric characters', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Identifier::isValid('abc-def');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('B.5', '\\Flexio\\Base\\Identifier::isValid(); non-alphanumeric characters; hyphens and underscores are allowed', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Identifier::isValid('abc_def');\n $expected = true;\n \\Flexio\\Tests\\Check::assertBoolean('B.6', '\\Flexio\\Base\\Identifier::isValid(); non-alphanumeric characters; hyphens and underscores are allowed', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Identifier::isValid('abc/');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('B.7', '\\Flexio\\Base\\Identifier::isValid(); non-alphanumeric characters', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Identifier::isValid('abc.');\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('B.8', '\\Flexio\\Base\\Identifier::isValid(); non-alphanumeric characters', $actual, $expected, $results);\n }", "title": "" }, { "docid": "8cf69884d78190f53ede270d4efab1cf", "score": "0.58678997", "text": "public function testGetChallengeSolution(): void\n {\n $result = get_challenge_solution(\"testUser3\", \"reflective_xss\");\n $expected = \"get_test\";\n $this->assertEquals($expected, $result);\n }", "title": "" }, { "docid": "e0aadf0083b031528532ddd90faf50ec", "score": "0.5866676", "text": "function runTest($test, $cache) {\n\t$diff = $test($cache);\n\n\tif ( !$diff ) {\n\t\techo \"ok\\n\";\n\t} else {\n\t\techo \"Unexpected output:\\n $diff\\n\";\n\t}\n}", "title": "" }, { "docid": "90a26fc881435f00f5157aa690af1027", "score": "0.5864519", "text": "public function testUnsuccessfulResult()\n {\n $location = new FileLocation(FilePath::parse('./foo.webunit'), 1);\n\n $assert = new AssertContains($location, 'Foo', new Modifiers());\n $result = new AssertResult($assert, false, 'Bar');\n\n self::assertFalse($result->isSuccess());\n self::assertSame('Bar', $result->getError());\n self::assertSame($assert, $result->getAssert());\n }", "title": "" }, { "docid": "20f05eea7e9a6fd9036848a7279e5b5f", "score": "0.5861598", "text": "function compare($expect, $actual, $test_name) {\n if (is_array($expect)) {\n if (count(array_diff($actual, $expect))) {\n echo \"$test_name failed. Expect:\\n\";\n print_r($expect);\n echo \"Actual:\\n\";\n print_r($actual);\n }\n } else {\n if ($expect !== $actual) {\n echo \"'$test_name' failed. Expect: '$expect' Actual: '$actual'\\n\";\n }\n }\n}", "title": "" }, { "docid": "bcbb1d381958d3fc5d338da09e8042ae", "score": "0.586035", "text": "public function neverReturned($result)\n {\n a::assertNotContains($result, $this->values, \"{$this->signature} never returned the expected result\");\n }", "title": "" }, { "docid": "64f5fab4e4c4555d02ecc8bcc4d40b19", "score": "0.58597136", "text": "public function getTokenResult()\n {\n $testMessageId = 'test_message_id';\n $testToken = '12345';\n\n $mockVerification = $this->getMockBuilder(self::ENTITY_VERIFICATION)->disableOriginalConstructor()->getMock();\n $mockVerification->expects($this->once())->method('verify')->with($testToken, $testMessageId);\n $this->mockEntityFactory->expects($this->once())->method('createEmptyVerification')->will($this->returnValue($mockVerification));\n\n $this->assertSame($mockVerification, $this->twizo->getTokenResult($testMessageId, $testToken));\n }", "title": "" }, { "docid": "3a02823181ac736ed3dfc7dc3209d69f", "score": "0.5850487", "text": "public function calculateFinalResult()\n {\n if (!isset($this->student->average)) {\n $this->calculateAverage();\n }\n\n // Calculate if the student is passed or not\n $pass = $this->student->average >= 7;\n $this->student->final_result = $pass ? 'passed' : 'failed';\n }", "title": "" }, { "docid": "71080d6e9221ddf1dc39bab38dcb38f5", "score": "0.58486855", "text": "private function expectSuccess() {\n $result = $this->adminHandler->getServerVersion();\n $this->assertTrue(is_string($result), 'Version must be a string!');\n }", "title": "" }, { "docid": "6fc1ff51641be0d95f7837956b507d42", "score": "0.5844355", "text": "public function run(&$results)\n {\n\n // BEGIN TEST\n $validator = \\Flexio\\Base\\Validator::create();\n $values = array(\n 'email' => '[email protected]'\n );\n $checks = array(\n 'email' => array('type' => 'email', 'required' => true)\n );\n $actual = $validator->check($values, $checks)->getParams();\n $expected = array(\n 'email' => '[email protected]'\n );\n \\Flexio\\Tests\\Check::assertInArray('A.1', '\\Flexio\\Base\\Validator::check(); return parameter if it passes an email check', $actual, $expected, $results);\n\n // BEGIN TEST\n $validator = \\Flexio\\Base\\Validator::create();\n $values = array(\n 'email' => ''\n );\n $checks = array(\n 'email' => array('type' => 'email', 'required' => true)\n );\n $actual = $validator->check($values, $checks)->getParams();\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('A.2', '\\Flexio\\Base\\Validator::check(); fail if parameter doesn\\'t pass an email check', $actual, $expected, $results);\n\n // BEGIN TEST\n $validator = \\Flexio\\Base\\Validator::create();\n $values = array(\n 'email' => '@flex.io'\n );\n $checks = array(\n 'email' => array('type' => 'email', 'required' => true)\n );\n $actual = $validator->check($values, $checks)->getParams();\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('A.3', '\\Flexio\\Base\\Validator::check(); fail if parameter doesn\\'t pass an email check', $actual, $expected, $results);\n\n // BEGIN TEST\n $validator = \\Flexio\\Base\\Validator::create();\n $values = array(\n 'email' => 'test@'\n );\n $checks = array(\n 'email' => array('type' => 'email', 'required' => true)\n );\n $actual = $validator->check($values, $checks)->getParams();\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('A.4', '\\Flexio\\Base\\Validator::check(); fail if parameter doesn\\'t pass an email check', $actual, $expected, $results);\n\n // BEGIN TEST\n $validator = \\Flexio\\Base\\Validator::create();\n $values = array(\n 'email' => '@'\n );\n $checks = array(\n 'email' => array('type' => 'email', 'required' => true)\n );\n $actual = $validator->check($values, $checks)->getParams();\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('A.5', '\\Flexio\\Base\\Validator::check(); fail if parameter doesn\\'t pass an email check', $actual, $expected, $results);\n\n // BEGIN TEST\n $validator = \\Flexio\\Base\\Validator::create();\n $values = array(\n 'email' => 'test@flex'\n );\n $checks = array(\n 'email' => array('type' => 'email', 'required' => true)\n );\n $actual = $validator->check($values, $checks)->getParams();\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('A.6', '\\Flexio\\Base\\Validator::check(); fail if parameter doesn\\'t pass an email check', $actual, $expected, $results);\n\n // BEGIN TEST\n $validator = \\Flexio\\Base\\Validator::create();\n $values = array(\n 'email' => '[email protected]'\n );\n $checks = array(\n 'email' => array('type' => 'email', 'required' => true)\n );\n $actual = $validator->check($values, $checks)->getParams();\n $expected = array(\n 'email' => '[email protected]'\n );\n \\Flexio\\Tests\\Check::assertInArray('A.7', '\\Flexio\\Base\\Validator::check(); return parameter if it passes an email check', $actual, $expected, $results);\n\n // BEGIN TEST\n $validator = \\Flexio\\Base\\Validator::create();\n $values = array(\n 'email' => \\Flexio\\Base\\Eid::generate()\n );\n $checks = array(\n 'email' => array('type' => 'email', 'required' => true)\n );\n $actual = $validator->check($values, $checks)->getParams();\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('A.8', '\\Flexio\\Base\\Validator::check(); fail if parameter doesn\\'t pass an email check', $actual, $expected, $results);\n\n // BEGIN TEST\n $validator = \\Flexio\\Base\\Validator::create();\n $values = array(\n 'email' => 123\n );\n $checks = array(\n 'email' => array('type' => 'email', 'required' => true)\n );\n $actual = $validator->check($values, $checks)->getParams();\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('A.9', '\\Flexio\\Base\\Validator::check(); fail if parameter doesn\\'t pass an email check', $actual, $expected, $results);\n\n // BEGIN TEST\n $validator = \\Flexio\\Base\\Validator::create();\n $values = array(\n 'email' => true\n );\n $checks = array(\n 'email' => array('type' => 'email', 'required' => true)\n );\n $actual = $validator->check($values, $checks)->getParams();\n $expected = false;\n \\Flexio\\Tests\\Check::assertBoolean('A.10', '\\Flexio\\Base\\Validator::check(); fail if parameter doesn\\'t pass an email check', $actual, $expected, $results);\n }", "title": "" }, { "docid": "9eb4c90316e3126a218b17f3723c7fde", "score": "0.5842819", "text": "public function testUserGetsResults()\n {\n $this->withoutExceptionHandling();\n $this->post(\n route('result.get'),\n [\n 'user_id' => 1,\n 'code' => 91\n ]\n )->assertSuccessful();\n }", "title": "" }, { "docid": "41d0a261106ae028d141b8dd90f45687", "score": "0.58222723", "text": "public function testcheckComputerContinue()\n {\n $dice = new DiceHand();\n $dice->setPlayerScore(15);\n $dice->setComputerScore(2);\n $res = $dice->checkComputerContinue(5);\n $exp = 0;\n $this->assertEquals($exp, $res);\n }", "title": "" }, { "docid": "178e145bf221dcad08c8be0e319c87cd", "score": "0.58056194", "text": "public function testStoreFormat($input, $result) {\n $this->assertEquals($result, $this->validator->validate($input));\n }", "title": "" }, { "docid": "4bd2dabfd21fa0ad90a6c04a21cf4735", "score": "0.5797904", "text": "public function hasResults(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "4bd2dabfd21fa0ad90a6c04a21cf4735", "score": "0.5797904", "text": "public function hasResults(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "4bd2dabfd21fa0ad90a6c04a21cf4735", "score": "0.5797904", "text": "public function hasResults(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "5e670ca71407b34195d4f1328d2b6174", "score": "0.57968515", "text": "public function testGetAll0()\n{\n\n $actual = $this->context->getAll();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "title": "" }, { "docid": "c29a22f2a07df4ba633ba4e823447ed4", "score": "0.57936716", "text": "public function testGetBatchMode0()\n{\n\n $actual = $this->jsonFormatter->getBatchMode();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "title": "" }, { "docid": "5278e801cbfeeaf9622a502c21336f2b", "score": "0.57920027", "text": "public function testIsSuccess(){\n\t\t$response = new PaymentResponse();\n\n\t\t// test success\n\t\t$response->setResult(iResponse::RESULT_CODE_SUCCESS);\n\t\t$this->assertTrue(ResponseUtils::isSuccess($response));\n\n\t\t// test failure\n\t\t$response->setResult(\"101\");\n\t\t$this->assertFalse(ResponseUtils::isSuccess($response));\n\n\n\t}", "title": "" }, { "docid": "8d69e342981d57708a47aa43040d81aa", "score": "0.5788743", "text": "function test($msg, $test, $result, $comment='') {\n $act = '';\n $res = '';\n\n // if (is_array($test)) {\n // foreach($test as $t) {\n\n // if (is_array($t)) $t = print_r($t, true);\n\n // $act .= $t;\n // }\n // } else {\n // $act .= $test;\n // }\n\n // if (is_array($result)) {\n // foreach($result as $r) {\n\n // if (is_array($r)) $r = print_r($r, true);\n\n // $res .= $r;\n // }\n // } else {\n // $res .= $result;\n // }\n $act = htmlentities(print_r($test, true), ENT_QUOTES);\n $res = htmlentities(print_r($result, true), ENT_QUOTES);\n // $act='test';\n // $res='test';\n\n $colr = ($act === $res) ? 'green' : 'red';\n echo \"<table border=1 cellpadding=5 width=95%>\";\n echo \"<tr><td colspan=2 style='background-color:{$colr};'><h2>{$msg}</h2></td></tr>\";\n echo \"<tr><td width=180px><b>TEST RESULT</b></td><td><pre style='font-size:10px;'>$act</pre></td></tr>\";\n echo \"<tr><td width=180px><b>EXPECTED RESULT</b></td><td><pre style='font-size:10px;'>$res</pre></td></tr>\";\n if ($comment) {\n echo \"<tr><td colspan=2 style='background-color:#eeeeee'><pre>{$comment}</pre></td></tr>\";\n }\n echo \"</table><br/></br>\";\n}", "title": "" }, { "docid": "7e5187c64cf2764fc0e7bfaec06353af", "score": "0.5785303", "text": "private function should_display_result($testcase, $testresult) {\n return $testcase->display == 'SHOW' ||\n ($testcase->display == 'HIDE_IF_FAIL' && $testresult->iscorrect) ||\n ($testcase->display == 'HIDE_IF_SUCCEED' && !$testresult->iscorrect);\n }", "title": "" }, { "docid": "5a21303d6a75aac026cb7f9d5223ca38", "score": "0.5782023", "text": "function runTest(&$test, &$result)\r\n\t{\r\n\t\t$test->runWith($result);\r\n\t}", "title": "" }, { "docid": "455aa34d7cd524f640f3a05227594339", "score": "0.576836", "text": "public function testExample()\n {\n\n $this->assertTrue(true); // 要素true\n $this->assertFalse(false); // 要素false\n\n $this->assertEquals(100, 100); // 値が同じ\n $this->assertNotEquals(100, 101); // 値が同じではない\n\n $arr = '';\n $this->assertEmpty($arr); // 要素が空orNull\n $this->assertNull(null); // 要素が空orNull\n\n $arr = [1,2,3];\n $this->assertNotEmpty($arr); // 要素が空orNullではない\n $this->assertNotNull($arr); // 要素が空orNull\n\n $msg = \"Hello\";\n $this->assertEquals('Hello', $msg); //要素が同じ\n\n\n $n = random_int(0, 99);\n $this->assertLessThan(100, $n); // 100 > $n\n $this->assertLessThanorEqual(100, 100); // 100 >= $n\n $this->assertGreaterThan($n, 100); // 100 < $n\n $this->assertGreaterThanorEqual(100, 100); // 100 <= $n\n\n $this->assertStringStartsWith('a','abcdef'); // aで始まる文字\n $this->assertStringEndsWith('f','abcdef'); // fで終わる文字\n\n $response = $this->get('/'); // ルートにアクセス\n $response->assertStatus(302); // 200ステータスであること\n }", "title": "" }, { "docid": "31930f5db8fc42b2cbade3dd387bb64f", "score": "0.57574946", "text": "private static function checkResult($result) {\r\n global $DB;\r\n if (!$result) {\r\n die(\"DB error ({$DB->error})\");\r\n }\r\n }", "title": "" }, { "docid": "66a14740f2d97cd64b09e30a972f5898", "score": "0.5752124", "text": "public function testConfirmOutputMatchesExpected()\n {\n $gridSize = 20;\n \n $this->assertSame('137846528820', bcdiv($this->getFactorial(2 * $gridSize), bcmul($this->getFactorial($gridSize), $this->getFactorial($gridSize))));\n }", "title": "" }, { "docid": "be0b68a6b23ffaa464abc4a76ab7cb00", "score": "0.5748851", "text": "public function testGetStatus1_success()\n {\n $listing= new Listing('CSL123_100259', 'Hill Farm', 'Plough Hill Road', 'Nuneaton', 'CV11 6PE', 'This is a rare opportunity...', '6','355000', 'CSL123_100327_IMG_00.JPG','1','For Sale');\n $result= $listing->getStatus();\n $expected = \"For Sale\";\n $this->assertEquals($expected, $result);\n }", "title": "" }, { "docid": "a57d11adb74ccd7b8af38f9837a6055d", "score": "0.574401", "text": "protected function scoreResult($result, $assertion, $check): bool\n {\n if ($result == $assertion) {\n $this->errors[$check] = false;\n\n return true;\n } else {\n $this->errors[$check] = true;\n $this->deductedPoints += self::$pointDeductions[$check];\n\n return true;\n }\n }", "title": "" }, { "docid": "0abe6bd71f2d85122016510b73670964", "score": "0.5742237", "text": "public function testTrue()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "67a875d845b2f044df7b3d1402ee2b4a", "score": "0.5741142", "text": "public function testCheckPasswordOK() {\n\t\t$result = $this->User->checkPassword('1','12345678');\n\t\tdebug($result);\n\t\t// Password is correct\n\t\t$expected = array('User' => array('id' => '1'));\n\t\n\t\t$this->assertEquals($expected, $result);\n\t}", "title": "" }, { "docid": "529bfcb929dcd2c8ccaf16c83b7c60c4", "score": "0.57389545", "text": "public function testOperation()\n {\n $result = \\App\\Utility\\Sum::operate(3,2); //5\n $this->assertEquals($result,5);\n }", "title": "" }, { "docid": "4be89839745662b02b0f50ca5dc7b4c9", "score": "0.57365215", "text": "public function getResults() {\n\t\treturn $this->correct;\n\t}", "title": "" }, { "docid": "656a5b7ec16e7750a97c7e25a60cac41", "score": "0.5736202", "text": "protected function success() {\n\t\tself::assertTrue(true);\n\t}", "title": "" }, { "docid": "27fbe3dd1e9609b8dc950a999ed678ca", "score": "0.57342094", "text": "public function testSearchValidQueryWoRresult() {\n\t\t$userRoles = [\n\t\t\tUSER_ROLE_USER => '',\n\t\t\tUSER_ROLE_USER | USER_ROLE_SECRETARY => 'secret',\n\t\t\tUSER_ROLE_USER | USER_ROLE_HUMAN_RESOURCES => 'hr',\n\t\t\tUSER_ROLE_USER | USER_ROLE_ADMIN => 'admin',\n\t\t];\n\t\t$opt = [\n\t\t\t'method' => 'GET',\n\t\t\t'return' => 'contents',\n\t\t\t'data' => [\n\t\t\t\t'query' => 'some',\n\t\t\t\t'target' => [\n\t\t\t\t\t'Employee.Employee.' . CAKE_LDAP_LDAP_ATTRIBUTE_DISPLAY_NAME,\n\t\t\t\t]\n\t\t\t]\n\t\t];\n\t\tforeach ($userRoles as $userRole => $userPrefix) {\n\t\t\t$userInfo = [\n\t\t\t\t'role' => $userRole,\n\t\t\t\t'prefix' => $userPrefix,\n\t\t\t];\n\t\t\t$this->applyUserInfo($userInfo);\n\t\t\t$this->generateMockedController();\n\t\t\t$url = [\n\t\t\t\t'controller' => 'employees',\n\t\t\t\t'action' => 'search',\n\t\t\t];\n\t\t\tif (!empty($userPrefix)) {\n\t\t\t\t$url['prefix'] = $userPrefix;\n\t\t\t\t$url[$userPrefix] = true;\n\t\t\t}\n\t\t\t$view = $this->testAction($url, $opt);\n\t\t\t$numForm = $this->getNumberItemsByCssSelector($view, 'div#header div.container form[action$=\"/employees/search\"]');\n\t\t\t$expected = 1;\n\t\t\t$this->assertData($expected, $numForm);\n\n\t\t\t$numTableRows = $this->getNumberItemsByCssSelector($view, 'div#content div.container-fluid table > tbody > tr');\n\t\t\t$expected = 0;\n\t\t\t$this->assertData($expected, $numTableRows);\n\t\t}\n\t}", "title": "" }, { "docid": "326416b70e05503d65d8bff9589ae195", "score": "0.57315713", "text": "public function failed(){\n\t\n\treturn ! $this->passed();\n}", "title": "" }, { "docid": "9d8e478b33c82b7714d93e1e5e966156", "score": "0.57296926", "text": "public function testGetPrice_success()\n {\n $listing= new Listing('CSL123_100259', 'Hill Farm', 'Plough Hill Road', 'Nuneaton', 'CV11 6PE', 'This is a rare opportunity...', '6','355000', 'CSL123_100327_IMG_00.JPG','1','For Sale');\n $result= $listing->getPrice();\n $expected= '355000';\n $this->assertEquals($expected, $result);\n }", "title": "" }, { "docid": "274a1748ae2087eda8ee851c21ac5960", "score": "0.5726808", "text": "public function testDataValidationSuccess()\n {\n $model = new \\Vouchers\\Voucher\\Model([\n 'name' => [\n 'required' => true,\n ],\n 'email' => [\n 'required' => true,\n ],\n ]);\n\n $voucher = new \\Vouchers\\Voucher(['name' => 'Alan Cole', 'email' => '[email protected]'], $model);\n $this->assertSame($voucher->get('name'), 'Alan Cole');\n }", "title": "" }, { "docid": "cfd1d5fe4a0e72846e5371033fff49e0", "score": "0.5726393", "text": "private static function checkResult($result) {\n global $DB;\n if (!$result) {\n die(\"DB error ({$DB->error})\");\n }\n }", "title": "" }, { "docid": "fe2a3206cf70289b0424cc5be07d7d3e", "score": "0.5715695", "text": "public function testResult()\n {\n // /TestResult\n }", "title": "" }, { "docid": "63b77e279d03a38a3b5dac3792c39c95", "score": "0.5715688", "text": "private function verifyProducts(array $products, array $result): void\n {\n $productsNum = count($products);\n $found = 0;\n foreach ($result as $resultProduct) {\n foreach ($products as $expectedProduct) {\n if ($resultProduct['sku'] === $expectedProduct['sku']) {\n $found++;\n self::assertEquals($expectedProduct, $resultProduct);\n }\n }\n }\n self::assertEquals($productsNum, $found);\n }", "title": "" }, { "docid": "9025cf11dce6347da916ca968823cc3b", "score": "0.5715473", "text": "public function testIco2()\n{\n\n // Traversed conditions\n // if ($mod === 0 || $mod === 10) == true (line 112)\n\n $actual = $this->company->ico();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "title": "" }, { "docid": "9d25f2e67ae4e148b4c5954e9c3e4818", "score": "0.57116634", "text": "public function validate( $result )\n {\n return in_array( $result, $this->collection );\n }", "title": "" }, { "docid": "f70a5595238cdfc2556b3fe62eab2500", "score": "0.5707709", "text": "function test($qry) {\n return $this->query($qry);\n }", "title": "" } ]
633764198481e40c14a2f5d9177f33f8
Function to print feedback stars
[ { "docid": "b8d8cfea51a096cf95ac73d623f829bf", "score": "0.7365903", "text": "function print_feedback_stars($result = 0)\n\t{\n\t\tglobal $ilconfig;\n\t\t$result = number_format($result, 1, '.', '');\n\t\tif ($result >= $ilconfig['min_5_stars_value'] AND $result <= $ilconfig['max_5_stars_value'])\n\t\t{\n\t\t\t$stars = '<span title=\"' . $result . ' / 5.0\"><img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'star_full.gif\" border=\"0\" alt=\"\" /> <img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'star_full.gif\" border=\"0\" alt=\"\" /> <img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'star_full.gif\" border=\"0\" alt=\"\" /> <img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'star_full.gif\" border=\"0\" alt=\"\" /> <img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'star_full.gif\" border=\"0\" alt=\"\" /></span>';\n\t\t}\n\t\telse if ($result >= $ilconfig['min_4_stars_value'] AND $result <= $ilconfig['max_4_stars_value'])\n\t\t{\n\t\t\t$stars = '<span title=\"' . $result . ' / 5.0\"><img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'star_full.gif\" border=\"0\" alt=\"\" /> <img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'star_full.gif\" border=\"0\" alt=\"\" /> <img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'star_full.gif\" border=\"0\" alt=\"\" /> <img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'star_full.gif\" border=\"0\" alt=\"\" /> <img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'star_empty.gif\" border=\"0\" alt=\"\" /></span>';\n\t\t}\n\t\telse if ($result >= $ilconfig['min_3_stars_value'] AND $result <= $ilconfig['max_3_stars_value'])\n\t\t{\n\t\t\t$stars = '<span title=\"' . $result . ' / 5.0\"><img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'star_full.gif\" border=\"0\" alt=\"\" /> <img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'star_full.gif\" border=\"0\" alt=\"\" /> <img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'star_full.gif\" border=\"0\" alt=\"\" /> <img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'star_empty.gif\" border=\"0\" alt=\"\" /> <img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'star_empty.gif\" border=\"0\" alt=\"\" /></span>';\n\t\t}\n\t\telse if ($result >= $ilconfig['min_2_stars_value'] AND $result <= $ilconfig['max_2_stars_value'])\n\t\t{\n\t\t\t$stars = '<span title=\"' . $result . ' / 5.0\"><img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'star_full.gif\" border=\"0\" alt=\"\" /> <img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'star_full.gif\" border=\"0\" alt=\"\" /> <img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'star_empty.gif\" border=\"0\" alt=\"\" /> <img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'star_empty.gif\" border=\"0\" alt=\"\" /> <img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'star_empty.gif\" border=\"0\" alt=\"\" /></span>';\n\t\t}\n\t\telse if ($result >= $ilconfig['min_1_stars_value'] AND $result <= $ilconfig['max_1_stars_value'])\n\t\t{\n\t\t\t$stars = '<span title=\"' . $result . ' / 5.0\"><img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'star_full.gif\" border=\"0\" alt=\"\" /> <img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'star_empty.gif\" border=\"0\" alt=\"\" /> <img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'star_empty.gif\" border=\"0\" alt=\"\" /> <img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'star_empty.gif\" border=\"0\" alt=\"\" /> <img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'star_empty.gif\" border=\"0\" alt=\"\" /></span>';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$stars = '<span title=\"' . $result . ' / 5.0\"><img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'star_empty.gif\" border=\"0\" alt=\"\" /> <img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'star_empty.gif\" border=\"0\" alt=\"\" /> <img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'star_empty.gif\" border=\"0\" alt=\"\" /> <img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'star_empty.gif\" border=\"0\" alt=\"\" /> <img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'star_empty.gif\" border=\"0\" alt=\"\" /></span>';\n\t\t}\n\t\treturn $stars;\n\t}", "title": "" } ]
[ { "docid": "f699d539f476b3363a2efc078643a935", "score": "0.7067105", "text": "public function drawRating() {\n\t\t$max = 10;\n\t\t$stjornur = round($this->rating);\n\t\t$tomar = $max - $stjornur;\n\t\t$counter = 0;\n\t\tfor (;$counter < $stjornur; $counter++) {\n\t\t\techo(\"<img src=\\\"images/goldstar.gif\\\" border=\\\"0\\\" alt=\\\"$stjornur stars\\\"/>\");\n\t\t}\n\n\t\t$counter = 0;\n\t\tfor (;$counter < $tomar; $counter++) {\n\t\t\techo(\"<img src=\\\"images/greystar.gif\\\" border=\\\"0\\\" alt=\\\"$stjornur stars\\\"/>\");\n\t\t}\n\n\n\t}", "title": "" }, { "docid": "8041ffa1babc6b019792e04ee0859f32", "score": "0.6994581", "text": "function showStars($rating) {\n \t$empty = \"\";\n \tprint \"<div style=\\\"display:inline;float:right;\\\">\";\n \tfor($i=0; $i<5; $i++) {\n \t\tif ($i >= $rating) {\n \t\t\t$empty = \"-empty\";\n \t\t}\n \t\tprint \"<span class=\\\"glyphicon glyphicon-star\" . $empty . \"\\\" style=\\\"margin:1px;\\\"></span>\";\n \t}\n \tprint \"</div>\";\n }", "title": "" }, { "docid": "16f9ee0bb6240c793b72fe6401991e38", "score": "0.68666637", "text": "function redstar() {\n echo \"<span class='red-star'> * </span>\";\n}", "title": "" }, { "docid": "9035a18f50f43e60095d5f4910094301", "score": "0.68552923", "text": "public function display($star)\n {\n return \"<i class='fa fa-rocket'></i>\";\n }", "title": "" }, { "docid": "c893c311520cee5ed814ee7c40f258d4", "score": "0.6599482", "text": "function show_stars($rating)\n{\n echo \"<span class='align_right'>\";\n if ($rating == 1) {\n echo \"<img src='img/star-green.png' alt='1' /><img src='img/star-gray.png' alt='1' /><img src='img/star-gray.png' alt='1' /><img src='img/star-gray.png' alt='1' /><img src='img/star-gray.png' alt='1' />\";\n }\n if ($rating == 2) {\n echo \"<img src='img/star-green.png' alt='1' /><img src='img/star-green.png' alt='1' /><img src='img/star-gray.png' alt='1' /><img src='img/star-gray.png' alt='1' /><img src='img/star-gray.png' alt='1' />\";\n }\n if ($rating == 3) {\n echo \"<img src='img/star-green.png' alt='1' /><img src='img/star-green.png' alt='1' /><img src='img/star-green.png' alt='1' /><img src='img/star-gray.png' alt='1' /><img src='img/star-gray.png' alt='1' />\";\n }\n if ($rating == 4) {\n echo \"<img src='img/star-green.png' alt='1' /><img src='img/star-green.png' alt='1' /><img src='img/star-green.png' alt='1' /><img src='img/star-green.png' alt='1' /><img src='img/star-gray.png' alt='1' />\";\n }\n if ($rating == 5) {\n echo \"<img src='img/star-green.png' alt='1' /><img src='img/star-green.png' alt='1' /><img src='img/star-green.png' alt='1' /><img src='img/star-green.png' alt='1' /><img src='img/star-green.png' alt='1' />\";\n }\n echo \"</span>\";\n}", "title": "" }, { "docid": "4d82fdb0d58f2d4a801ebb4403067489", "score": "0.65575993", "text": "function inspiry_rating_stars( $rating ) {\n\n\t\t$output = '';\n\n\t\tif ( ! empty( $rating ) ) {\n\n\t\t\t$output = '<span class=\"rating-stars\">';\n\n\t\t\tfor ( $count = 1; $count <= $rating; $count++ ) {\n\t\t\t\t$output .= '<i class=\"fa fa-star-o rated\"></i>';\n\t\t\t}\n\n\t\t\t$unrated = 5 - $rating;\n\t\t\tfor ( $count = 1; $count <= $unrated; $count++ ) {\n\t\t\t\t$output .= '<i class=\"fa fa-star-o\"></i>';\n\t\t\t}\n\n\t\t\t$output .= '</span>';\n\t\t}\n\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "e3c42452a8ac706ecce490abce9f4a90", "score": "0.6216029", "text": "function print_feedback_icon($points = 0)\n\t{\n\t\tglobal $ilance, $ilconfig, $phrase;\n\t\t$points = intval($points);\n\t\t$sqlpoints = $ilance->db->query(\"\n\t\t\tSELECT \" . (MYSQL_QUERYCACHE ? \"SQL_CACHE \" : \"\") . \"icon, pointsfrom, pointsto\n\t\t\tFROM \" . DB_PREFIX . \"stars\n\t\t\tWHERE ((pointsfrom <= \" . intval($points) . \"\n\t\t\t\tAND pointsto >= \" . intval($points) . \")\n\t\t\t\t\tOR (pointsfrom < \" . intval($points) . \"\n\t\t\t\tAND pointsto < \" . intval($points) . \"))\n\t\t\tORDER BY starid DESC\n\t\t\tLIMIT 1\n\t\t\");\n\t\tif ($ilance->db->num_rows($sqlpoints) > 0)\n\t\t{\n\t\t\t$respoints = $ilance->db->fetch_array($sqlpoints, DB_ASSOC);\n\t\t\treturn ' <span title=\"' . $ilance->language->construct_phrase('{_feedback_score_x_to_x_points}', array ($respoints['pointsfrom'], $respoints['pointsto'])) . '\"><img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'icons/' . $respoints['icon'] . '\" border=\"0\" style=\"vertical-align: middle;margin-top:-5px\" /></span>';\n\t\t}\n\t\treturn '';\n\t}", "title": "" }, { "docid": "b81ea46d2f7e533093010f1676048c5f", "score": "0.60567886", "text": "function smoke_rating_headline($ID){\n\t\t\t// Retrieve metadata and save as var\n\t\t\t\tif (get_post_meta( $ID, 'star_rating')) {\n\t\t\t\t\t$star_rating = get_post_meta( $ID, 'star_rating')[0];\n\t\t\t\t} else {\n\t\t\t\t\t$star_rating = 0;\n\t\t\t\t}\n\n\t\t\t\tif ( $star_rating ){\n\t\t\t\t\t// Display container element\n\t\t\t\t\techo \"<div>\";\n\t\t\t\t\t// Display full stars\n\t\t\t\t\tfor ($i=0; $i < $star_rating; $i++) {\n\t\t\t\t\t\techo \"<i class='fa fa-star'></i>\";\n\t\t\t\t\t}\n\t\t\t\t\t// Get difference between star rating and 5, then echo remaining empty stars\n\t\t\t\t\t$white_stars = 5 - $star_rating;\n\t\t\t\t\tfor ($i=0; $i < $white_stars; $i++) {\n\t\t\t\t\t\techo \"<i class='fa fa-star-o'></i>\";\n\t\t\t\t\t}\n\t\t\t\t\t// Close container element\n\t\t\t\t\techo \"</div>\";\n\t\t\t\t}\n\t\t}", "title": "" }, { "docid": "4ebc193f171ec4f8a2f9d4625d2a436e", "score": "0.6053343", "text": "private function displayRating($rating)\n {\n $Keywords = $this->Lang->get('KEYWORDS');\n $icoURL = C::ICON_URL;\n\n for($i = 0; $i < C::RECIPE_RATING_MAX; $i++)\n {\n if($i + 1 <= $rating)\n echo \"<img alt='{$Keywords[10]}' class='icon15 star' src='$icoURL' />\";\n else\n echo \"<img alt='{$Keywords[10]}' class='icon15 star empty' src='$icoURL' />\";\n }\n }", "title": "" }, { "docid": "c6bec2939577a87d8f6ec7bcd0d5aecd", "score": "0.60317564", "text": "function smoke_rating($ID){\n\t\t// Retrieve metadata and save as var\n\t\t\t$star_rating = get_post_meta( $ID, 'star_rating')[0];\n\t\t\tif ( $star_rating ){\n\t\t\t\t// Display container element\n\t\t\t\techo \"<div class='star-rating'><span>\" . $star_rating . \"/5</span>\";\n\t\t\t\t// Display full stars\n\t\t\t\tfor ($i=0; $i < $star_rating; $i++) {\n\t\t\t\t\techo \"<i class='fa fa-star'></i>\";\n\t\t\t\t}\n\t\t\t\t// Get difference between star rating and 5, then echo remaining empty stars\n\t\t\t\t$white_stars = 5 - $star_rating;\n\t\t\t\tfor ($i=0; $i < $white_stars; $i++) {\n\t\t\t\t\techo \"<i class='fa fa-star-o'></i>\";\n\t\t\t\t}\n\t\t\t\t// Close container element\n\t\t\t\techo \"</div><hr>\";\n\t\t\t}\n\t}", "title": "" }, { "docid": "3b85287c60b762717a72c3e3243a8a4e", "score": "0.6014044", "text": "public function show()\n {\n return 'You are my super star, you know ?';\n }", "title": "" }, { "docid": "c01836c862fc007fb703d882879affc2", "score": "0.59639156", "text": "public static function displayRatingOnProfile($avgRating) {\n $startStr = '';\n if($avgRating != 0 ) {\n\n $offStar = 5 - $avgRating ;\n $spiltAvgRating = explode('.',$avgRating);\n #clsCommon::pr($spiltAvgRating);\n\n\n for($r= 0; $r < $spiltAvgRating[0] ; $r++) {\n $startStr .= image_tag('legalgrip/star-on.png');\n }\n\n if(isset($spiltAvgRating[1])) {\n $startStr .= image_tag('legalgrip/halfstar.png');\n }\n\n if(intval($offStar) > 0 ) {\n for($k= 0; $k < intval($offStar) ; $k++) {\n $startStr .= image_tag('legalgrip/star-off.png');\n }\n }\n } else {\n for($k= 0; $k < 5 ; $k++) {\n $startStr .= image_tag('legalgrip/star-off.png');\n }\n\n }\n\n return $startStr;\n\n }", "title": "" }, { "docid": "92d77452921fc317a425cc83ba5870a9", "score": "0.59313256", "text": "public function Dibujar()\n\t {\n\t\t//$tri[1] = array('f' =>\"****\");\n\t\t//$tri[2] = array('f' => \"***\");\n\t\t\n\t\n\t\t$ast = \"*\" ;\n\t\t$espacio = \"&nbsp\" ;\n\t\techo $espacio .$espacio .$espacio . $espacio. $espacio . $ast . \"<br>\";\n\t\techo $espacio. $espacio . $espacio .$ast . $ast . $ast . \"<br>\";\n\t\techo $espacio . $ast . $ast . $ast .$ast.$ast ;\n\t\techo \"<br>\" . \"<br>\" ;\n\t\treturn \"Color: \" . $this->GetColor() ;\n\t }", "title": "" }, { "docid": "8f75957d5a96c78f99315fa0e1e9c0d7", "score": "0.58596456", "text": "function java_make_stars(){ \r\n\t\t?><script language=\"javascript\">\r\n\t\t\tvar cur_form = document.<?=$this->formname ?>;\r\n\t\t\tvar me = cur_form.elements;\r\n\t\t\tvar i24tr = me[2].parentNode.parentNode;\r\n\t\t\tfor (var i=0; i < me.length; i++){\r\n\t\t\t\tif ( me[i].getAttribute('ireq')==1 ){\r\n\t\t\t\t\tvar i24tr = me[i].parentNode.parentNode;\r\n\t\t\t\t\tif ( i24tr.childNodes[0].nodeType==1 ) \ti24tr.childNodes[0].innerHTML += '&nbsp;<span class=\"req_field\">*</span>';\r\n\t\t\t\t\telse \t\t\t\t\t\t\t\t\t\ti24tr.childNodes[1].innerHTML += '&nbsp;<span class=\"req_field\">*</span>';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t</script><?\r\n\t}", "title": "" }, { "docid": "a02f58aef71c87ae2392a45325d1c48a", "score": "0.57898575", "text": "public static function displayRatingOnAttorneyListing($avgRating) {\n $startStr = '';\n if($avgRating != 0 ) {\n $offStar = 5 - $avgRating ;\n $spiltAvgRating = explode('.',$avgRating);\n #clsCommon::pr($spiltAvgRating);\n $startStr = '';\n\n for($r= 0; $r < $spiltAvgRating[0] ; $r++) {\n $startStr .= image_tag('legalgrip/star-full.png');\n }\n\n if(isset($spiltAvgRating[1])) {\n $startStr .= image_tag('legalgrip/star-half.png');\n }\n\n if(intval($offStar) > 0 ) {\n for($k= 0; $k < intval($offStar) ; $k++) {\n $startStr .= image_tag('legalgrip/star-gray.png');\n }\n }\n } else {\n for($k= 0; $k < 5 ; $k++) {\n $startStr .= image_tag('legalgrip/star-gray.png');\n }\n\n }\n return $startStr;\n\n }", "title": "" }, { "docid": "7021e341f30ac01059ecb11828b8f507", "score": "0.56574094", "text": "function constructRating($rating) {\n $imgTags = \"\";\n \n // first output the gold stars\n for ($i=0; $i < $rating; $i++) {\n $imgTags .= '<img src=\"images/star-gold.svg\" width=\"16\" />';\n }\n \n // then fill remainder with white stars\n for ($i=$rating; $i < 5; $i++) {\n $imgTags .= '<img src=\"images/star-white.svg\" width=\"16\" />';\n } \n \n return $imgTags; \n}", "title": "" }, { "docid": "f7b880270a3cac0a8a54503efa7fe089", "score": "0.5650009", "text": "public function rating_value_to_star( $rating ) {\n\t\tif ( $rating < 1 || $rating > 5 ) {\n\t\t\treturn;\n\t\t}\n\t\t$int = intval( $rating );\n\t\t$blank = 5 - $int;\n\t\t$html = str_repeat( $this->star( '#d56e0c' ), $int );\n\t\tif ( is_float( $rating ) ) {\n\t\t\t$html .= $this->star( '#d56e0c', 0.5 );\n\t\t\t$blank--;\n\t\t}\n\t\tif ( $blank > 0 ) {\n\t\t\t$html .= str_repeat( $this->star(), $blank );\n\t\t}\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "9de578d2c5a265b83bb09e0f1f8230fe", "score": "0.5640787", "text": "private function debugGoodness($keyword, $adjective, $rating)\r\n\t{\r\n\t\tif($rating < 0)\r\n\t\t{\r\n\t\t\t$color = 'red';\r\n\t\t\t$affect = 'decreased';\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\t$color = 'green';\r\n\t\t\t$affect = 'increased';\r\n\t\t}\r\n\t\r\n\t\tprintf('<font color=\"%s\"><h5><i>%s</i> (after inversion/amplification) %s the rating of %s by %f</h5></font>', \r\n\t\t\t$color, $adjective, $affect, $keyword, $rating);\r\n\t}", "title": "" }, { "docid": "df1a7ff2268c9aa603f8bd6139cb7f59", "score": "0.55909365", "text": "function drawStars($rating, $scale, $type)\n\t{\n\t\t$ratingPercent = number_format(($rating/$scale)*100,0);\n\n $type = ucfirst($type);\n\n\t\tif ($rating > 0) {\n\n\t\t\treturn \"<div class=\\\"jrRatingStars$type\\\"><div style=\\\"width:{$ratingPercent}%;\\\">&nbsp;</div></div>\";\n\n\t\t} elseif ($this->no_rating_text) {\n\n\t\t\treturn $this->no_rating_text;\n\t\t} else {\n\n\t\t\treturn \"<div class=\\\"jrRatingStars$type\\\"><div style=\\\"width:0%;\\\">&nbsp;</div></div>\";\n\t\t}\n\t}", "title": "" }, { "docid": "c803288922492ab2397ae7bc589bdc54", "score": "0.55893654", "text": "function printScreen()\n\t{\n\t\tglobal $littleScreen;\n\n\t\tforeach($littleScreen as $thisRow)\n\t\t{\n\t\t\tforeach($thisRow as $thisPixel)\n\t\t\t{\n\t\t\t\tif($thisPixel == 0) echo \" \";\n\t\t\t\tif($thisPixel == 1) echo \"#\";\n\t\t\t}\n\t\t\techo \"\\n\";\n\t\t}\n\t\techo \"******END*******\\n\\n\";\n\n\t}", "title": "" }, { "docid": "3f55698c6360be1bdb67d8677e1bec24", "score": "0.5570937", "text": "public static function DisplayRating($recipeID)\n {\n $random = rand(0, 1000000);\n $rating = self::Calculate_Rating($recipeID);\n\n $full_stars = floor($rating);\n $empty_stars = 5 - $full_stars;\n\n $starIndex = $full_stars != 0 ? $full_stars + 1 : $full_stars;\n\n $str = '<div class=\"row\">';\n\n for ($i = 1; $i <= $full_stars; $i++) {\n $str .= '<div class=\"col-1\">';\n $str .= '<i class=\"fa fa-star rating\" data-index=\"' . $i . '\" data-recipeID=\"' . $recipeID . '\" data-star=\"fullStar\" id=\"' . $recipeID . '-' . $i . '\" data-toggle=\"tooltip\" data-placement=\"bottom\" title=\"' . $i . '\"></i>';\n $str .= '</div>';\n }\n\n //Display half star\n if ($rating - $full_stars > 0) {\n $str .= '<div class=\"col-1\">';\n $str .= '<i class=\"fa fa-star-half rating\" data-index=\"' . ($starIndex) . '\" data-recipeID=\"' . $recipeID . '\" data-star=\"halfStar\" id=\"' . $recipeID . '-' . ($starIndex) . '\" data-toggle=\"tooltip\" data-placement=\"bottom\" title=\"' . $starIndex . '\"></i>';\n $str .= '</div>';\n $empty_stars--;\n } else {\n $starIndex--; //! go back to previous index (We don't have halfStar).\n }\n\n if ($empty_stars == 5) {\n $starIndex = 0; //! set index to zero ( 0 -> full start , 0 -> half start)\n }\n\n //Display empty stars\n for ($i = 1; $i <= $empty_stars; $i++) {\n $str .= '<div class=\"col-1\">';\n $str .= '<i class=\"fa fa-star-o rating\" data-index=\"' . ($starIndex + $i) . '\" data-recipeID=\"' . $recipeID . '\" data-star=\"emptyStar\" id=\"' . $recipeID . '-' . ($starIndex + $i) . '\" data-toggle=\"tooltip\" data-placement=\"bottom\" title=\"' . ($starIndex + $i) . '\"></i>';\n $str .= '</div>';\n }\n $str .= '</div>';\n return $str;\n }", "title": "" }, { "docid": "c5cd6264458171d6bf6badb82b8dfd96", "score": "0.5502131", "text": "function putRatingBanner($rating, $totalReviews){\n\t\tif($rating>=60){ ?>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t<img src=\"hw3_images/transparent.png\" class = \"fresh ratingimg\" width=\"64px\" height=\"64px\"/><?=$rating?><span class =\"outOf\">% (out of <?=$totalReviews?> reviews)</span> <!--continued line-->\n<?php }\n\t\telse{ \n?>\n\t\t\t<img src=\"hw3_images/transparent.png\" class = \"rotten ratingimg\" width=\"64px\" height=\"64px\"/><?=$rating?><span class =\"outOf\">% (out of <?=$totalReviews?> reviews)</span> <!--continued line-->\n<?php } \n\t}", "title": "" }, { "docid": "4f16a2ae446b1b52be0cd950f4497c0a", "score": "0.5494964", "text": "public function showRatingSystem() {\n\t\t$cnt = 0;\n\t\t// holder for the output\n\t\t$str = '\n\t\t\t<h2 class=\"ratingStar brown\">Beer Rating System</h2>\n\t\t\t<p class=\"marginTop_8\">Our beer rating system and rating scale is based on overall feel for the beer and the necessity or lack there of, to have another one of the beers in hand. The scale should be similar to other rating scales that you have seen and used. This scale should be pliable to the point in which a you might insinuate your own descriptions for the values, after all, the site is about your personality and subjective views of the beer. So the 10 point scale was born.</p>\n\t\t\t<p class=\"marginTop_8\">The 10 point scale is just from 1 to 10, with 1 being the lowest rating and 10 being the highest. As mentioned before: something you are familiar with from other areas of life.</p>\n\t\t';\n\t\t// get the rating information\n\t\t$info = $this->ci->RatingSystemModel->getRatingSystem();\n\t\t// iterate through the results\n\t\tif(!empty($info)) {\n\t\t\t// start the output\n\t\t\t$str .= '<table id=\"ratingSystem\">';\n\t\t\t// iterate through the result set\n\t\t\tforeach($info as $key) {\n\t\t\t\t// class holder for row color\n\t\t\t\t$class = ($cnt % 2 == 0) ? '' : ' class=\"gray\"';\n\t\t\t\t// continue the screen output\n\t\t\t\t$str .= '\n\t\t\t\t\t<tr' . $class . '>\n\t\t\t\t\t\t<td class=\"ratingValue\">' . $key['ratingValue'] . '</td>\n\t\t\t\t\t\t<td>' . $key['description'] . '</td>\n\t\t\t\t\t</tr>\n\t\t\t\t';\n\t\t\t\t// add to the counter\n\t\t\t\t$cnt++;\n\t\t\t}\n\t\t\t// end the output\n\t\t\t$str .= '\n\t\t\t\t\t</table>\n\t\t\t\t<p class=\"marginTop_8\">Remember when you write a beer review, more than likely, you are taking your first taste of a beer, possibly only, and that there is a lot that factors into the reason you felt the way you did when you wrote a review. Some factors: mood, feelings, like or dislike of beer style, food, other beers drank before, etc. These are the reasons that Two Beer Dudes will more than likely never put a review on the site below a 5. We will try and give the beer another chance on another day.</p>\n\t\t\t\t<p class=\"marginTop_8\">One last thing: when tasting beer only have about 2 to 3 ounces and drink beers of the same beer style. Split a 12 ounce bottle between friends, formulate your own opinion and then share with each other. Each of you may have found something different within the confines of the glass container. Really try to enjoy the beer for the style that it is and appreciate the effort that the brewer put into making the beer. Trying to be unbiased will give the best overall chance and rating for a beer. Enjoy!</p>\n\t\t\t';\n\t\t} else {\n\t\t\t// no results\n\t\t\t$str = '<p>There is no information that matches your request.</p>';\n\t\t}\n\t\t// send back the output\n\t\treturn $str;\n\t}", "title": "" }, { "docid": "5996e8d7c4e0ded0d9217ef1d6062d52", "score": "0.54805076", "text": "function the_listing_star_rating( $post_id = '' ) {\r\n\t$rating = str_replace( '.', '_', va_get_rating_average( $post_id ) );\r\n\r\n\tif ( '' == $rating ) {\r\n\t\t$rating = '0';\r\n\t}\r\n?>\r\n\t\t<div class=\"stars-cont\">\r\n\t\t\t<div class=\"stars stars-<?php echo $rating; ?>\"></div>\r\n\t\t</div>\r\n\t\t<meta itemprop=\"worstRating\" content=\"1\" />\r\n\t\t<meta itemprop=\"bestRating\" content=\"5\" />\r\n\t\t<meta itemprop=\"ratingValue\" content=\"<?php echo esc_attr( $rating ); ?>\" />\r\n\t\t<meta itemprop=\"reviewCount\" content=\"<?php echo esc_attr( va_get_reviews_count( $post_id ) ); ?>\" />\r\n<?php\r\n}", "title": "" }, { "docid": "d15d6cc932015e01e82bb1dd0c3f4158", "score": "0.54512686", "text": "public function print()\n {\n // If there is no hints, print a message for that.\n if (count($this->hints) === 0) {\n $this->output->writeln('<fg=black;bg=green>Awesome! There is nothing from me to teach you!</>');\n $this->output->write(\"\\n\");\n } else {\n foreach ($this->hints as $hint) {\n $this->output->writeln('<info>'.$hint->filename.':'.$hint->lineno.'</>');\n $this->output->writeln(\"\\t\".$hint->type.': '.$hint->message.\" [$hint->link]\");\n $this->output->write(\"\\n\");\n }\n }\n\n $this->output->writeln(count($this->files).' files checked, '.count($this->hints).' hints detected.');\n }", "title": "" }, { "docid": "3c2f471b7c573e100da63d34de3c279d", "score": "0.5414658", "text": "function cetak_gambar($value)\r\n{\r\n\t$aa = $value / 2 + 0.5;\r\n\tfor ($x = 0; $x < $value; $x++) {\r\n\t\tfor ($y = 0; $y < $value; $y++) {\r\n\t\t\tif($x == $aa-1)\r\n\t\t\t\techo \"* \";\r\n\t\t\telse if($y == 0)\r\n\t\t\t\techo \"* \";\r\n\t\t\telse if($y == $value-1)\r\n\t\t\t\techo \"*\";\r\n\t\t\telse\r\n\t\t\t\techo \"= \";\r\n\t\t}\r\n\techo \"<br>\";\r\n\t} \r\n}", "title": "" }, { "docid": "694a7b5621dc7fb5de8dca51eb1ad20a", "score": "0.5414228", "text": "function displaySymbol($randomVal) {\n $bar = \"bar\";\n $cherry = \"grapes\";\n $grapes = \"grapes\";\n $lemon = \"lemon\";\n $orange = \"orange\";\n $seven = \"seven\";\n if($randomVal == 1) {\n $displayImg3 = $bar;\n }\n else if($randomVal == 2) {\n $displayImg3 = $cherry;\n }\n else if($randomVal == 3) {\n $displayImg3 = $grapes;\n }\n else if($randomVal == 4) {\n $displayImg3 = $lemon;\n }\n else if($randomVal == 5) {\n $displayImg3 = $orange;\n }\n else if($randomVal == 0) {\n $displayImg3 = $seven;\n }\n //echo = display on page:\n echo \"<img src=\\\"img/$displayImg3.png\\\" width=\\\"70\\\" alt=\\\"$displayImg3\\\" title=\\\"$displayImg3\\\"/>\";\n }", "title": "" }, { "docid": "49b824768471e7ce29da4f8f22ed66b2", "score": "0.5396314", "text": "function fetchStarRating($value){\n\t\t$star_active='';$star_inactive='';\n\t\tfor($i=0; $i<5; $i++){\n\t\t\tif($i<$value)\n\t\t\t$star_active.='<img src=\"img/rating_active.png\" width=\"17\" height=\"16\">';\n\t\t\telse\n\t\t\t$star_inactive.='<img src=\"img/rating.png\" width=\"17\" height=\"16\">';\n\t\t}\t\t\n\t\treturn $final_rating=$star_active.$star_inactive;\n\t}", "title": "" }, { "docid": "1334815961a809502313dd2da32b72fd", "score": "0.53845507", "text": "public function ft_print()\n\t{\n\t\techo \"player [$this->id] : ($this->y,$this->x). $this->qCount remaininig\\n\";\n\t\t$this->tile->ft_print();\n\t\techo \"\\n\";\n\t}", "title": "" }, { "docid": "844923304c7048694e344fdf68a268de", "score": "0.53834474", "text": "public function intro() {\n\t\t\techo \"<center>Name of that fruit is {$this->fruit_name} and color of that {$this->fruit_name} is {$this->color} and also having total {$this->weight}grams of {$this->fruit_name}. </center>\";\n\t\t}", "title": "" }, { "docid": "a2acaa4e8db10a9b7a5b3a62f20f5a3a", "score": "0.5375838", "text": "public function piano()\n {\n static::line(\n 'I like John Cage\\'s '\n . Effector::color('4\\'33\"', 'black', 'yellow')\n . '... is it not piano!?',\n );\n }", "title": "" }, { "docid": "19f65680d299eaabd634bf709fa3b1b3", "score": "0.5352871", "text": "public function stars( $count, $max = 0 ) {\n\t\t$stars = [\n\t\t\t'filled' => floor( $count ),\n\t\t\t'half' => floor( round( ( $count * 2 ) ) - ( floor( $count ) * 2 ) ) ? 1 : 0,\n\t\t\t'empty' => 0,\n\t\t];\n\n\t\t$max = absint( $max );\n\n\t\tif ( $max > 0 ) {\n\t\t\t$star_count = $stars['filled'] + $stars['half'];\n\n\t\t\t$stars['empty'] = $max - $star_count;\n\n\t\t\tif ( $star_count > $max ) {\n\t\t\t\t$stars['filled'] = $max;\n\t\t\t\t$stars['half'] = 0;\n\t\t\t}\n\t\t}\n\n\t\t$icons = [];\n\n\t\tforeach ( $stars as $type => $_count ) {\n\t\t\tfor ( $i = 1; $i <= $_count; $i++ ) {\n\t\t\t\t$icons[] = ac_helper()->icon->dashicon( [ 'icon' => 'star-' . $type, 'class' => 'ac-value-star' ] );\n\t\t\t}\n\t\t}\n\n\t\tob_start();\n\t\t?>\n\t\t<span class=\"ac-value-stars\">\n\t\t\t<?php echo implode( ' ', $icons ); ?>\n\t\t</span>\n\t\t<?php\n\t\treturn ob_get_clean();\n\t}", "title": "" }, { "docid": "a420edaf5b96cd1d55d9ed277edcf9b8", "score": "0.53296995", "text": "function g_feedback($type = \"info\", $msg = \"Please wait...\"){\n\n // red or black feedback style\n $class = ($type == \"error\") ? \"g_error\" : \"g_info\";\n\n // predefined types list\n $defined_types = array(\n \"error\"=>\"fa-times\",\n \"success\"=>\"fa-check\",\n \"activate\"=>\"fa-check\",\n \"deactivate\"=>\"fa-check\",\n \"update\"=>\"fa-pencil\",\n \"info\"=>\"fa-info\",\n \"restore\"=>\"fa-rotate-right\",\n \"insert\"=>\"fa-plus\",\n \"delete\"=>\"fa-trash\",\n \"wait\"=>\"fa-spinner fa-pulse\",\n );\n\n // format type / icon (will be skipped if icon is not predefined)\n if (!empty($defined_types[$type])) $type = $defined_types[$type];\n\n return '<div class=\"g_feedback '.$class.'\">\n <span><i class=\"fa '.$type.'\"></i></span>\n <p>'.$msg.'</p>\n </div>';\n\n}", "title": "" }, { "docid": "a030829c02ea359f985aa32a42acb1ad", "score": "0.5322723", "text": "function printDetails($row){\n if ($row['avg_rating'] == NULL) {\n echo \"<h1 class='display-4'><strong>\" . $row['gymname'] . \" (No Ratings Yet) </strong></h1>\";\n } else {\n echo \"<h1 class='display-4'><strong>\" . $row['gymname'] . \" (\" . $row['avg_rating'] . \" <i class='fas fa-star'></i>) </strong></h1>\";\n }\n\n if (isset($_SESSION['ID'])){\n echo \"<button id='reviewBtn' class='btn btn-warning btn-lg' data-toggle='modal' data-target='#reviewModal'><strong>Leave A Review!</strong></button>\";\n }\n }", "title": "" }, { "docid": "09888f42e0e515d4bc860d3666abee3a", "score": "0.53099865", "text": "function stairSteps($numOfSteps)\r\n {\r\n //Add space so figure is not against edge\r\n $bottomStars = numOfSpaces(1) . \"***\";\r\n\r\n //create a loop for the stick person\r\n for($i = 0; $i < $numOfSteps; $i++)\r\n {\r\n //call function for specific body part\r\n echo stickPerson($numOfSteps-$i ,\" O *****\", $i );\r\n echo stickPerson($numOfSteps-$i ,\" /|\\ * \", $i );\r\n echo stickPerson($numOfSteps-$i ,\" / \\ * \", $i );\r\n\r\n //grow the bottom level of stars based on number of steps\r\n $bottomStars .= \"********\";\r\n }\r\n //Add a pre tag and print the bottom level stars\r\n echo \"<pre>\" . $bottomStars . \"</pre>\";\r\n }", "title": "" }, { "docid": "d284e9797b6083e770b78737bf2fa5d3", "score": "0.53096753", "text": "function svnx_stroke($text){\r\n $body = $this->adminHeaderMenu();\r\n $body .= $text;\r\n print($body);\r\n \r\n }", "title": "" }, { "docid": "e1be7608fd9260b8c7abf935ae46accb", "score": "0.528573", "text": "function make_stars_in_table($num_half_stars, $num_ratings, $post_id){\n\t$stars = make_stars($num_half_stars, \"-\" . $post_id);\n\t$num_ratings_formatted = \"(\" . $num_ratings . \")\";\n\t$stars_table = \"<style type=\\\"text/css\\\"> .rating_table { table-layout: fixed !important; width: 145px !important; border: 0 !important; background:transparent !important;} #rating_stars{vertical-align: top !important; width: 120px !important;} #num_ratings{text-align: right; !important; vertical-align: middle !important; width: 25px !important;}</style>\";\n\t$stars_table .= \"<table class=\\\"rating_table\\\"> <tr><th>Rating</th><th> </th></tr>\";\n\t$stars_table .= \"<tr><td id=\\\"rating_stars\\\">$stars</td><td id=\\\"num_ratings\\\">$num_ratings_formatted</td></tr></table>\";\n\treturn $stars_table;\n}", "title": "" }, { "docid": "b05f1f1c8cf48343e4ce85ce7e922799", "score": "0.5275726", "text": "protected function _display () : string\n {\n return sprintf(\"%s\\n%s\", $this->board->display(), $this->_displayNextPlayer());\n }", "title": "" }, { "docid": "b539c83faa95741bfeca6306f6965441", "score": "0.5274863", "text": "function fetchStarRatingInside($value){\n\t\t$star_active='';$star_inactive='';\n\t\tfor($i=0; $i<5; $i++){\n\t\t\tif($i<$value)\n\t\t\t$star_active.='<img src=\"../../img/rating_active.png\" width=\"17\" height=\"16\">';\n\t\t\telse\n\t\t\t$star_inactive.='<img src=\"../../img/rating.png\" width=\"17\" height=\"16\">';\n\t\t}\t\t\n\t\treturn $final_rating=$star_active.$star_inactive;\n\t}", "title": "" }, { "docid": "b8ed8ed41bf146897ef4c9023d23224a", "score": "0.5263812", "text": "public function rate($point){\n switch($point){\n case 1:\n return '<i class=\"fas fa-star text-warning\"></i>\n <i class=\"far fa-star text-warning\"></i>\n <i class=\"far fa-star text-warning\"></i>\n <i class=\"far fa-star text-warning\"></i>\n <i class=\"far fa-star text-warning\"></i>';\n break;\n case 2:\n return '<i class=\"fas fa-star text-warning\"></i>\n <i class=\"fas fa-star text-warning\"></i>\n <i class=\"far fa-star text-warning\"></i>\n <i class=\"far fa-star text-warning\"></i>\n <i class=\"far fa-star text-warning\"></i>';\n break;\n case 3:\n return '<i class=\"fas fa-star text-warning\"></i>\n <i class=\"fas fa-star text-warning\"></i>\n <i class=\"fas fa-star text-warning\"></i>\n <i class=\"far fa-star text-warning\"></i>\n <i class=\"far fa-star text-warning\"></i>';\n break;\n case 4:\n return '<i class=\"fas fa-star text-warning\"></i>\n <i class=\"fas fa-star text-warning\"></i>\n <i class=\"fas fa-star text-warning\"></i>\n <i class=\"fas fa-star text-warning\"></i>\n <i class=\"far fa-star text-warning\"></i>';\n break;\n case 5:\n return '<i class=\"fas fa-star text-warning\"></i>\n <i class=\"fas fa-star text-warning\"></i>\n <i class=\"fas fa-star text-warning\"></i>\n <i class=\"fas fa-star text-warning\"></i>\n <i class=\"fas fa-star text-warning\"></i>';\n break;\n default:\n return '<i class=\"far fa-star text-warning\"></i>\n <i class=\"far fa-star text-warning\"></i>\n <i class=\"far fa-star text-warning\"></i>\n <i class=\"far fa-star text-warning\"></i>\n <i class=\"far fa-star text-warning\"></i>';\n }\n }", "title": "" }, { "docid": "d3927d829e92143ea53703ee96318265", "score": "0.52621865", "text": "function displaySnack($snack) { \n \n echo \"<img id='reel' src='img/$snack.png' alt='$snack' title='\".ucfirst($snack) .\"' height='50'/>\";\n }", "title": "" }, { "docid": "2d16b646a1565badb19a3406221d3f63", "score": "0.5257129", "text": "function printPoints($points) {\n if ($points != 0) {\n echo '<embed src=\"' . $GLOBALS['audioFileWin'] . '\" hidden=\"true\" autostart=\"true\"></embed>';\n echo \"<h2 id='message'>You won <span>\" . $points . \"</span> points!</h2>\";\n }\n \n else {\n // play winning sound\n echo '<embed src=\"' . $GLOBALS['audioFileLose'] . '\" hidden=\"true\" autostart=\"true\"></embed>';\n echo \"<h3 id='message'>Oh no! You Lost!</h3>\";\n\n }\n }", "title": "" }, { "docid": "ed1673e4978118b55bc7c93d66676611", "score": "0.524225", "text": "function printCheck()\n{\n return \"<span class='glyphicon glyphicon-ok'></span>\";\n}", "title": "" }, { "docid": "d2d0cffd925c98ac741cccc4915b6ff4", "score": "0.5231385", "text": "function showScore()\n\t{\n\t\treturn '\n\t\t<input type=\"hidden\" id=\"score_'.$this->i.'\" value=\"'.$this->score.'\"/> \n\t\t<input type=\"hidden\" id=\"ups_'.$this->i.'\" value=\"'.$this->ups.'\"/> \n\t\t<input type=\"hidden\" id=\"downs_'.$this->i.'\" value=\"'.$this->downs.'\"/> \n\t\t<center> '\n . $this->score . \"[\" . $this->ups . \"/\" . $this->downs . \"]\" . '<br />\n\t\t</center>\n\t\t';\n\t}", "title": "" }, { "docid": "8782c16c0beb147a94cd8644af7c69b1", "score": "0.52136254", "text": "function feedback()\n{\necho '<p class=note >Please do give us <a href=\"feedback.php\" target=_blank title=feedback style=\"color:red;font-size: 20px;\">here</a> your feedback about the changes you feel to be added on the website. Comments are always welcome!</p>';\n}", "title": "" }, { "docid": "4dc26d663fff10f66e19e0b4df1748b9", "score": "0.52066195", "text": "function neobeat_woo_product_get_rating_html( $html, $rating, $count ) {\n\t\tif ( ! empty( $rating ) ) {\n\t\t\t$html = '<div class=\"qodef-woo-ratings qodef-m\"><div class=\"qodef-m-inner\">';\n\t\t\t$html .= '<div class=\"qodef-m-star qodef--initial\">';\n\t\t\tfor ( $i = 0; $i < 5; $i ++ ) {\n\t\t\t\t$html .= neobeat_get_icon( 'ion-ios-star-outline', 'ionicons', '<span class=\"qodef-m-star-item\">&#9733;</span>' );\n\t\t\t}\n\t\t\t$html .= '</div>';\n\t\t\t$html .= '<div class=\"qodef-m-star qodef--active\" style=\"width:' . ( ( $rating / 5 ) * 100 ) . '%\">';\n\t\t\tfor ( $i = 0; $i < 5; $i ++ ) {\n\t\t\t\t$html .= neobeat_get_icon( 'ion-ios-star', 'ionicons', '<span class=\"qodef-m-star-item\">&#9734;</span>' );\n\t\t\t}\n\t\t\t$html .= '</div>';\n\t\t\t$html .= '</div></div>';\n\t\t}\n\t\t\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "84ef42177c6c09f3064fab60f7783a16", "score": "0.51963454", "text": "function drawinputscreen($guesses)\n\t{\n\t\tprint \"<input type='text' name='guessletter'>\";\n\t\tprint \"Guess a letter. You have $guesses guesses left.\";\n\t\tprint \"<input type='submit' name='action' value='Go'>\";\n\t}", "title": "" }, { "docid": "39752d948da237eccea87cd53dca23d4", "score": "0.5192175", "text": "function sf_rater($object, $options = array())\n{\n if (is_null($object))\n {\n sfLogger::getInstance()->debug('A NULL object cannot be rated');\n }\n \n if (!isset($options['star-width']))\n {\n $star_width = sfConfig::get('app_rating_star_width', 25); \n }\n else\n {\n $star_width = $options['star-width'];\n unset($options['star-width']);\n }\n \n try\n {\n $max_rating = $object->getMaxRating();\n $actual_rating = $object->getRating();\n $bar_width = $actual_rating * $star_width;\n \n $options = _parse_attributes($options);\n if (!isset($options['class']))\n {\n $options = array_merge($options, array('class' => 'star-rating'));\n }\n if (!isset($options['style']) or !preg_match('/width:/i', $options['style']))\n {\n $full_bar_width = $max_rating * $star_width;\n $options = array_merge($options, \n array('style' => 'width:'.$full_bar_width.'px'));\n }\n \n if ($object instanceof sfOutputEscaperObjectDecorator)\n {\n $object_class = get_class($object->getRawValue());\n }\n else\n {\n $object_class = get_class($object);\n }\n $object_id = $object->getReferenceKey();\n $token = sfPropelActAsRatableBehaviorToolkit::addTokenToSession($object_class, $object_id);\n \n $msg_domid = sprintf('rating_message_%s', $token) ;\n $bar_domid = sprintf('current_rating_%s', $token) ;\n \n $list_content = ' <li class=\"current-rating\" id=\"'.$bar_domid.'\" style=\"width:'.$bar_width.'px;\">';\n $list_content .= __('Currently rated %rating% star(s) on %max_rating%', array('%rating%' => $object->getRating(), '%max_rating%' => $max_rating)); \n $list_content .= ' </li>';\n \n for ($i=1; $i <= $max_rating; $i++)\n {\n $label = __('Rate it %number_of_stars% stars', array('%number_of_stars%' => $i));\n $list_content .= \n ' <li>'.link_to_remote($label, \n array('url' => sprintf('sfRating/rate?token=%s&rating=%d&star_width=%d', \n $token, \n $i,\n $star_width),\n 'update' => $msg_domid,\n 'script' => true,\n 'complete' => visual_effect('appear', $msg_domid).\n visual_effect('highlight', $msg_domid)), \n array('class' => 'r'.$i.'stars',\n 'title' => $label)).'</li>';\n }\n \n return content_tag('ul', $list_content, $options).\n content_tag('div', null, array('id' => $msg_domid));\n }\n catch (Exception $e)\n {\n sfLogger::getInstance()->err('Exception catched from sf_rater helper: '.$e->getMessage());\n }\n}", "title": "" }, { "docid": "8caed686d4128949e6693346ff4e52f0", "score": "0.51859283", "text": "function printTitle($text)\n {\n $lineLength = strlen($text) + 2;\n $this->line(str_repeat(\"*\", $lineLength));\n $this->line(\" $text \");\n $this->line(str_repeat(\"*\", $lineLength));\n }", "title": "" }, { "docid": "b96bf96c60e88d63f2400528fdc78ec7", "score": "0.5183979", "text": "protected function assert_contains_star_rating_ui(): void {\n $this->assertContains('<div class=\"self-assessment-rating\"', $this->currentoutput);\n $this->assertContains('<img class=\"icon rated\" alt=\"Rated 5 stars\" ', $this->currentoutput);\n }", "title": "" }, { "docid": "aaa78c6c075f5280cd52398ef9e2ac4c", "score": "0.5153171", "text": "protected function showInstructions()\n {\n // Add empty line\n $this->line('');\n\n // Shoe message\n $this->info('Player 1 (You) - Red , Player 2 (Computer) - Blue');\n\n // Add empty line\n $this->line('');\n }", "title": "" }, { "docid": "eddd332ed3db465069c7bc3f9f8989b0", "score": "0.5151108", "text": "function PrintMethod($prompt){}", "title": "" }, { "docid": "1553bfd883d32ee820b650f77e73cf6b", "score": "0.5147792", "text": "function pr($var)\n\t{\n\t\techo '<pre style=\"background-color: #000; color: #FFF;\">';\n\t\tprint_r($var);\n\t\techo '</pre>';\n\t}", "title": "" }, { "docid": "774e9c1edf246b508d39962708ef44e7", "score": "0.51467276", "text": "public function customnotice(){\n\t\t$html = $this->value['std'];\n\t\techo $html;\n\t}", "title": "" }, { "docid": "5e08bcaa16ff7580be39fdb834b4798d", "score": "0.51278555", "text": "public function star_rating_script() {\n if (is_product()) {\n ?>\n <script type=\"text/javascript\">\n var starsEl = document.querySelector('#respond p.stars');\n if (starsEl) {\n starsEl.addEventListener('click', function (event) {\n if (event.target.tagName === 'A') {\n starsEl.classList.add('selected');\n }\n });\n }\n </script>\n <?php\n }\n }", "title": "" }, { "docid": "b61b572a8eddfbd630f152717a2a9cf8", "score": "0.5125159", "text": "public function displayScore() \n {\n $lost_hearts = $this->phrase->numberLost();\n $full_hearts = $this->lives - $lost_hearts;\n\n $output = '<div id=\"scoreboard\" class=\"section\">';\n $output .= '<ol>';\n\n for($i = 1; $i <= $full_hearts; $i++) {\n $output .= '<li class=\"tries\"><img src=\"images/liveHeart.png\" height=\"35px\" widght=\"30px\"></li>';\n }\n for($i = 1; $i <= $lost_hearts; $i++) {\n $output .= '<li class=\"tries\"><img src=\"images/lostHeart.png\" height=\"35px\" widght=\"30px\"></li>';\n }\n\n $output .= '</ol>';\n $output .= '</div>';\n\n return $output;\n }", "title": "" }, { "docid": "b44a47161ea2cc714cf061b440c4ea96", "score": "0.51233417", "text": "function drawHelp() {\n if ( !empty($this->ohje) and $_SESSION['onkooikeuksia']) {\n beginFrame('ohje');\n print $this->ohje;\n endFrame();\n print '<br>';\n print '<br>';\n\n }\n }", "title": "" }, { "docid": "8bc454312a9ada8b6c34ae6e831e76eb", "score": "0.5119355", "text": "public function draw()\n\t{\n\n\n\t\treturn implode(PHP_EOL, $this->render());\n\n\t}", "title": "" }, { "docid": "69f0c3776b7f722474e08209cc6e6ca9", "score": "0.5101397", "text": "public function showTeaser()\n {\n echo '<div><b>' . $this->name . '</b></div>';\n }", "title": "" }, { "docid": "c232c1fa36f9dc9d3bbb70915f3c3a6b", "score": "0.50828934", "text": "function drawRating($rating,$hauteur,$largeur) {\r\n\t//$largeur=102;$hauteur=10;\r\n $image = imagecreate($largeur,$hauteur);\r\n $back = ImageColorAllocate($image,255,255,255);\r\n $border = ImageColorAllocate($image,0,0,0);\r\n $red = ImageColorAllocate($image,255,60,75);\r\n $fill = ImageColorAllocate($image,44,81,150);\r\n ImageFilledRectangle($image,0,0,$largeur-1,$hauteur-1,$back);\r\n ImageFilledRectangle($image,1,1,($largeur/100*$rating),$hauteur-1,$fill);\r\n ImageRectangle($image,0,0,$largeur-1,$hauteur-1,$border);\r\n imagePNG($image);\r\n imagedestroy($image);\r\n}", "title": "" }, { "docid": "e9912748e86f434262504db5363fd19f", "score": "0.50666547", "text": "public function printStats(): void\n {\n $fuelLeft = number_format($this->fuelLeft, 2);\n echo $this->model . ' ' . $fuelLeft . ' ' . $this->distanceTraveled . PHP_EOL;\n }", "title": "" }, { "docid": "16af6057b19c770d1b43efc40381d3f3", "score": "0.5059709", "text": "function print_screen($article, $params, $access, $attribs = array()) {\n\t\tif ( $params->get( 'show_icons' ) ) {\n if ($params->get( 'print_icon_img_path' ) && $params->get( 'print_icon_img_name' )) {\n $text = JHTML::_('image.site', $params->get( 'print_icon_img_name' ), $params->get( 'print_icon_img_path' ), NULL, NULL, JText::_( 'Print' ) );\n } else {\n $text = JHTML::_('image.site', 'printButton.png', '/images/M_images/', NULL, NULL, JText::_( 'Print' ) );\n }\n\t\t} else {\n\t\t\t$text = JText::_( 'ICON_SEP' ) .'&nbsp;'. JText::_( 'Print' ) .'&nbsp;'. JText::_( 'ICON_SEP' );\n\t\t}\n\t\treturn '<a href=\"#\" onclick=\"window.print();return false;\">'.$text.'</a>';\n\t}", "title": "" }, { "docid": "173a0940755ed1c5548218735a66a103", "score": "0.50561154", "text": "function displaySymbol($random_value){\n \n \n // if($random_value == 0) {\n // $symbol = \"seven\";\n // }\n \n // else if($random_value == 1){\n // $symbol = \"orange\";\n // }\n \n // else {\n // $symbol = \"seven\";\n // }\n \n }", "title": "" }, { "docid": "2ed0f36bdc427746ba4693597684b95e", "score": "0.50400114", "text": "function jeprint_r($mavariable){\n echo \"<small class=\\\"bg-primary text-white p-2\\\">print_r :</small><pre class=\\\"alert alert-primary w-75\\\">\";\n print_r($mavariable);\n echo \"</pre>\";\n }", "title": "" }, { "docid": "05a867912f84d5a679663fabbcd3c329", "score": "0.503936", "text": "function doPrintR($text) {\n\t\tglobal $__daemontools;\n\t\t\n\t\tif (!$__daemontools['forked']) {\n\t\t\tprint_r($text);\n\t\t}\n\t}", "title": "" }, { "docid": "4b7b7e55a7adea467dff59b026a197c7", "score": "0.50122005", "text": "function bibdk_reviews_get_rating($rating) {\n if (!isset($rating) || !strpos($rating, '/')) {\n return;\n }\n\n $values = explode('/', $rating);\n\n $i = 0;\n\n while ($i < $values[1]) {\n $type = ($i < $values[0]) ? 'positive' : 'negative';\n $stars[] = array(\n '#type' => 'html_tag',\n '#tag' => 'span',\n '#value' => '*',\n '#attributes' => array(\n 'class' => array('star', $type)\n ),\n );\n $i++;\n }\n\n return $stars;\n}", "title": "" }, { "docid": "51499f8ae747d020ea1029d6ac8f0168", "score": "0.50115126", "text": "function warning(string $output): void\n{\n output('<fg=red>'.$output.'</>');\n}", "title": "" }, { "docid": "2dc5ae3aba02af88c8a34774dd9d9e03", "score": "0.5010766", "text": "function print_feedback_columnbit($tab = 1)\n\t{\n\t\tglobal $phrase;\n\t\t$html = '';\n\t\t$accepted = array (1, 2, 3, 4);\n\t\tif (in_array($tab, $accepted))\n\t\t{\n\t\t\tswitch ($tab)\n\t\t\t{\n\t\t\t\tcase 1:\n\t\t\t\t{\n\t\t\t\t $html .= '{_from} / {_price}';\n\t\t\t\t break;\n\t\t\t\t}\n\t\t\t\tcase 2:\n\t\t\t\t{\n\t\t\t\t $html .= '{_from_buyer_price}';\n\t\t\t\t break;\n\t\t\t\t}\n\t\t\t\tcase 3:\n\t\t\t\t{\n\t\t\t\t $html .= '{_from_seller}';\n\t\t\t\t break;\n\t\t\t\t}\n\t\t\t\tcase 4:\n\t\t\t\t{\n\t\t\t\t $html .= '{_left_for}';\n\t\t\t\t break;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "1504c3c7fbe214cd376f2843dce7654d", "score": "0.49932927", "text": "function mosaic()\n{\n echo \"\\e[5m███╗ ███╗ ██████╗ ███████╗ █████╗ ██╗ ██████╗ ███████╗██╗ ██╗ ██████╗ ██████╗███████╗███████╗███████╗\n████╗ ████║██╔═══██╗██╔════╝██╔══██╗██║██╔════╝ ██╔════╝██║ ██║██╔════╝██╔════╝██╔════╝██╔════╝██╔════╝\n██╔████╔██║██║ ██║███████╗███████║██║██║ ███████╗██║ ██║██║ ██║ █████╗ ███████╗███████╗\n██║╚██╔╝██║██║ ██║╚════██║██╔══██║██║██║ ╚════██║██║ ██║██║ ██║ ██╔══╝ ╚════██║╚════██║\n██║ ╚═╝ ██║╚██████╔╝███████║██║ ██║██║╚██████╗ ███████║╚██████╔╝╚██████╗╚██████╗███████╗███████║███████║\n╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═════╝ ╚══════╝ ╚═════╝ ╚═════╝ ╚═════╝╚══════╝╚══════╝╚══════╝\n \n\\e[0m\";\n}", "title": "" }, { "docid": "8d1d26972446c823e8725c222f99f920", "score": "0.49845886", "text": "function make_both_ratings($num_half_stars, $num_ratings, $post_id){\n\t$num_read_only_half_stars = get_post_rating_avg($post_id) * 2;\n\t$read_only_stars = make_stars($num_read_only_half_stars, \"-\" . $post_id);\n\t$num_current_user_half_stars = get_current_user_post_rating($post_id) * 2;\n\terror_log(\"read only half: \" . $num_read_only_half_stars . \" current user rating: \" . $num_current_user_half_stars);\n\t$stars = make_stars($num_current_user_half_stars, $post_id);\n\t$num_ratings_formatted = \"(\" . $num_ratings . \")\";\n\t$stars_table = \"<style type=\\\"text/css\\\"> .both_rating_table { table-layout: fixed !important; width: 350px !important; background:transparent !important;} .rating_stars{vertical-align: top !important; width: 110px !important;} #num_ratings_both{ text-align: left !important; vertical-align: middle !important; width: 5px !important;}</style>\";\n\t$stars_table .= \"<table class=\\\"both_rating_table\\\"> <tr><th>Avg Rating:</th><th> </th><th>I Rate it:</th></tr>\";\n\t$stars_table .= \"<tr><td class=\\\"rating_stars\\\">$read_only_stars</td><td id=\\\"num_ratings_both\\\">$num_ratings_formatted</td>\";\n\t$stars_table .= \"<td class=\\\"rating_stars\\\">$stars</td></tr></table>\";\n\treturn $stars_table;\n}", "title": "" }, { "docid": "41fb63ffaa7996816580c0f9b0444ff5", "score": "0.4979584", "text": "function display_alert($msg,$icon){\n echo '<p class=\"has-error\">';\n echo $icon;\n echo $msg;\n echo \"</p>\";\n}", "title": "" }, { "docid": "3304bad602e9d8deb3ec343fd2f8f922", "score": "0.49726954", "text": "public function template_feedback()\n {\n echo <<<EOT\n <div class=\"notification is-$this->color\">\n $this->msg Return to <a href=\"$this->route.php\">$this->route</a> page, otherwise you will be redirected in 5 seconds.\n </div>\n EOT;\n header(\"Refresh:5; url=\" . $this->route . \".php\");\n }", "title": "" }, { "docid": "17fdf2f8605be99c2bc3cb28e9bcb43f", "score": "0.4967942", "text": "function display_interactive_card($cardnumber) {\r\n\tglobal $bingoletters;\r\n\t\r\n\t@$winningset=load_winning_patterns(); //display a pattern preview\r\n\t$hiddenstring=\"\"; //sets the initial value to avoid error msg below.\r\n\tif (is_array($winningset)) {\r\n\t\t\r\n\t\techo '<center><table width=\"75%\" border=\"1\" cellpadding=\"20\" bgcolor=\"silver\" bordercolor=\"red\"><tr>';\r\n\t\t//header\r\n\t\tfor ($column = 0; $column<5; $column++) { \r\n\t\t\t\techo '<td width=\"20%\" align=\"center\" bgcolor=\"#dd00dd\"><b><font size=\"+7\">'.$bingoletters[$column].'</font></b></td>';\r\n\t\t}\r\n\t\techo \"</tr>\";\r\n\r\n\t\t//table\r\n\t\tfor ($row = 0; $row<5; $row++) {\r\n\t\t\techo \"<tr>\\n\";\r\n\t\t\t\r\n\t\t\tfor ($column = 0; $column<5; $column++) { //column has to be inner loop due to HTML table\r\n\t\t\t\techo \"\\n<td align=\\\"center\\\" style=\\\"background:\".($winningset[$cardnumber][$column][$row][\"checked\"]?\"#eeee00;\":\"silver;\").\"\\\" onClick = \\\"this.style.background=clickcell(this.style.background,'\".$bingoletters[$column].$row.\"')\\\">\";\r\n\t\t\t\techo '<font size=\"+5\">';\r\n\t\t\t\techo $winningset[$cardnumber][$column][$row][\"number\"].'</font></td>';\r\n\t\t\t\tif ($winningset[$cardnumber][$column][$row][\"checked\"]) $hiddenstring.=($bingoletters[$column].$row.';');\r\n\t\t\t}\r\n\t\t\techo \"</tr>\";\r\n\t\t}\r\n\t\techo \"</table></center>\";\r\n\t\t\r\n\t}\r\n\telse echo \"set could not be opened\";\r\n\treturn $hiddenstring;\r\n}", "title": "" }, { "docid": "70f323b7f8c7e3b79d7d504ffdb8e641", "score": "0.4965136", "text": "function sa_bmark_print($msg = \"\"){\n GLOBAL $stopwatch;\n echo(\"<span id=\\\"pagetime\\\">bmark: \" . $msg . \": \" . round($stopwatch->clock(),5) . \" / \" . round($stopwatch->elapsed(),5) .\" seconds</span>\");\n}", "title": "" }, { "docid": "d6b1b30d498fa3621bbd5374914d6aa9", "score": "0.49632835", "text": "public function writePlot() {\n echo 'The Plot is entirely a word of Fiction.'.PHP_EOL;\n }", "title": "" }, { "docid": "3a552d5f89965ac4f6223cb6e1dfcd7c", "score": "0.4961029", "text": "function gap()\n{\n echo \"<br>\";\n}", "title": "" }, { "docid": "35f1d266b817d979b593fe73d55bd8ad", "score": "0.49583894", "text": "public function showKeypad()\n {\n $border = '';\n for ($i=0; $i<50; $i++) {\n $border .= '-';\n }\n\n echo $border . PHP_EOL;\n foreach ($this->grid as $row) {\n echo str_replace(1, '#', str_replace(0, '.', implode('', $row))) . PHP_EOL;\n }\n echo $border . PHP_EOL;\n }", "title": "" }, { "docid": "d70ca109f73e7d74022aa6ccd732420b", "score": "0.49574536", "text": "public function printCharInfo() {\n\t\tprint $this->strRepresentation();\n\t}", "title": "" }, { "docid": "14045862b11c51d15f71c7944caff6ef", "score": "0.49485755", "text": "function starredList() {\n\t\treturn \" * \" . implode(\"\\n * \", $this->errorList);\n\t}", "title": "" }, { "docid": "0bbb01698c0c0449d81c35fa95f28297", "score": "0.4941461", "text": "public function show(Starpass $starpass)\n {\n //\n }", "title": "" }, { "docid": "69d066d8eef3779dfd2621b64c49bb11", "score": "0.49331802", "text": "public function output()\n {\n printf(\"<br/>\\n\");\n parent::output();\n }", "title": "" }, { "docid": "222f01a374331d120e622bffbec96e12", "score": "0.49321067", "text": "public function format() {\n\t\treturn strtoupper($this->text) . array_reduce($this->points, function ($carry, $item) {\n\t\t\treturn $carry . \" +\" . $item;\n\t\t});\n\t}", "title": "" }, { "docid": "9ff2bb4b421d3ad250a74eeb5d3d7c79", "score": "0.49317798", "text": "function multiplyNumbers($number) {\n echo(\"<p>Passing a function argument as an integer - Your number multiplied by itself is <span style='color: green; font-weight: bold;'>\" . $number * $number . \"</span></p>\");\n}", "title": "" }, { "docid": "87b7078eafc4a70573be1b8e7851060e", "score": "0.4929187", "text": "public function feedback( $string, ...$args ) {}", "title": "" }, { "docid": "fa390b442dbc5c151be556a25ebfebda", "score": "0.4928186", "text": "function wpsh_display_feedback() {\n\n\t$args = array(\n\t 'type' => 'feedback'\n\t);\n\n\t// The Query\n\t$comments_query = new WP_Comment_Query;\n\t$comments = $comments_query->query( $args );\n\n\t// Comment Loop\n\tif ( $comments ) {\n\t\techo '<div id=\"wpsh-feedback-threads\">';\n\t\tforeach ( $comments as $comment ) {\n\t\t\techo '<div class=\"wpsh-feedback-thread\" id=\"comment-'.$comment->comment_ID.'\">';\n\t\t\techo get_avatar( $comment, $args['avatar_size'] );\n\t\t\techo '<p><strong>Feedback from: ' . $comment->comment_author .'</strong></p>';\n\t\t\techo '<p>' . $comment->comment_content . '</p>';\n\n\t\t\tif (current_user_can( 'manage_options' )) :\n\t\t\t\techo '<p><small><strong>Admin Details:</strong>' . $comment->comment_agent . '</small></p>';\n\t\t\tendif;\n\t\t\techo '</div>';\n\n\t\t}\n\t\techo '</div>';\n\t} else {\n\t\techo 'No comments found.';\n\t}\n\n}", "title": "" }, { "docid": "5f5b14729bf0def34f95f4bd0134bff9", "score": "0.4926744", "text": "function seller_get_readable_rating($author_id) {\n\n global $wpdb;\n \n $result = seller_count_review_ratings($author_id);\n\n $rating = array( 'rating' => number_format( $result->average, 2 ),\n 'count' => (int) $result->count);\n\n if ( ! $rating['count'] ) {\n $html = __( 'No ratings found yet!', 'dokan-lite' );\n } else {\n $long_text = _n( '%d review', '%d reviews', $rating['count'], 'dokan-lite' );\n $text = sprintf( __( 'Rated %s out of %d', 'dokan-lite' ), $rating['rating'], number_format( 5 ) );\n $width = ( $rating['rating']/5 ) * 100;\n $review_text = sprintf( $long_text, $rating['count'] );\n\n $review_text = $review_text;\n\n $html = '<span class=\"seller-rating\">\n <span title=\" '. esc_attr( $text ) . '\" class=\"star-rating\" itemtype=\"http://schema.org/Rating\" itemscope=\"\" itemprop=\"reviewRating\">\n <span class=\"width\" style=\"width: ' . $width . '%\"></span>\n </span>\n </span>\n ';\n }\n\n return $html ;\n}", "title": "" }, { "docid": "18b3290fb6157da772d1f79f2054fb69", "score": "0.49216798", "text": "function html_println() {\n\techo \"<pre>\";\n\tforeach (func_get_args() as $arg) {\n\t\techo htmlentities($arg), \"\\n\";\n\t}\n\techo \"</pre>\";\n}", "title": "" }, { "docid": "0993cb597292e3400e7e1b9aae36f484", "score": "0.4921655", "text": "function printProgress($cur, $min = 1, $max, $displayEvery = 100, $reuseSpace = true)\n{\n\tstatic $lastLineLength;\n\t\n\tif (($cur % $displayEvery == 0) || ($cur == $max))\n\t{\n\t\tif ($reuseSpace && $lastLineLength)\n\t\t{\n\t\t\techo str_repeat(chr(8), $lastLineLength);\n\t\t}\n\t\t\n\t\t$doneCnt = ($cur - $min + 1); \n\t\t$str = sprintf(\"%04d out of %04d (%.2f %% ) is done\", $doneCnt, $max, ($doneCnt / $max * 100));\n\t\tif (!$reuseSpace)\n\t\t\t$str .= \"\\n\";\n\t\techo $str;\n\t\t\n\t\t$lastLineLength = strlen($str);\n\t}\n}", "title": "" }, { "docid": "793b6b998fb5cbab4b3f718665cc9ef4", "score": "0.4907568", "text": "function stars_template_setup( $pStars ) {\n\tglobal $gBitSystem, $gBitUser, $gBitSmarty;\n\t$default_names = array();\n\tfor( $i = 0; $i < $pStars; $i++) {\n\t\t$default_names[] = tra( \"Rating\" ) . \": \" . ( $i+1 );\n\t}\n\t$default_names_flat = implode( \",\", $default_names );\n\t$ratingNames = explode( \",\", \",\" . $gBitSystem->getConfig( 'stars_rating_names', $default_names_flat ) );\n\t$gBitSmarty->assign( 'ratingNames', $ratingNames);\n\t$gBitSmarty->assign( 'starsLinks', $hash = array_fill( 1, $pStars, 1 ) );\n\t$gBitSmarty->assign( 'loadStars', TRUE );\n}", "title": "" }, { "docid": "570c6bb61d6859bd027048e15575301e", "score": "0.489657", "text": "function rating($rate){\r\n\t\t\t//$rate=getDetails(mysql_query(\"SELECT count(*) as count,SUM(rate) as sum FROM rating WHERE rating_ho_idin('$ho_id')\"));\r\n\t\t\tif($rate[0][\"count\"] !=0){\r\n\t\t\t$member=$rate[0][\"count\"];\r\n\t\t\t$rate=$rate[0][\"sum\"];\r\n\t\t\t$cal=($rate/$member);\r\n\t\t\t$half=0;\r\n\t\t\t$full=0;\r\n\t\t\t$no_star=0;\r\n\t\t\tif(is_int($cal)){\r\n\t\t\t\tif(round($cal) < 5){\r\n\t\t\t\t$no_star=5-round($cal);\r\n\t\t\t}\t\r\n\t\t\treturn '0||'.$cal.'||'.$no_star;\t\r\n\t\t\t}\r\n\t\t\t$rem=explode(\".\",$cal)[1];\r\n\t\t\tif($rem[0]==5){\r\n\t\t\t$half_full=1+floor($cal);\r\n\t\t\tif($half_full < 5){\r\n\t\t\t\t$no_star=5-$half_full;\r\n\t\t\t}\r\n\t\t\treturn '1||'.floor($cal).'||'.$no_star;\r\n\t\t\t}else{\r\n\t\t\tif(round($cal) < 5){\r\n\t\t\t\t$no_star=5-round($cal);\r\n\t\t\t}\t\r\n\t\t\t\treturn '0||'.round($cal).'||'.$no_star;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\treturn '0||0||5';\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "48723c0d420bd36aa22fc287cbf7a5e0", "score": "0.48962712", "text": "public function alert($string)\n {\n $length = Str::length(strip_tags($string)) + 12;\n\n $this->colorLine(str_repeat('*', $length), Color::CYAN);\n $this->colorLine('* '.$string.' *', Color::CYAN);\n $this->colorLine(str_repeat('*', $length), Color::CYAN);\n\n $this->output->newLine();\n }", "title": "" }, { "docid": "c4471207158406e67a63718e3785723f", "score": "0.48871377", "text": "function displayComment($comment_text, $comment_fname, $comment_lname, $reply_number, $comment_id){\n $output = $comment_text.\" -\".$comment_fname.\" \".$comment_lname;\n echo str_repeat(\"&nbsp\", 4*$reply_number).$output;\n echo \"<input type='button' value='Reply' onclick='replyToComment($comment_id)'><br>\";\n }", "title": "" }, { "docid": "6adc91bcb3f3d1973597430eda934921", "score": "0.48863682", "text": "function say_graph($gameplay, $graphics, $music, $replay, $tilt, $id)\n\t{\n\t\t\techo \"<tr><td width=177 height=20 valign=top style=\\\"border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-bottom-style: solid; border-bottom-width: 1\\\" bgcolor=#E1E7F3>\\n\";\n\t\t\techo \"<table border=0 style=\\\"border-collapse: collapse\\\" bordercolor=#111111 cellpadding=0 cellspacing=0>\\n\";\n\t\t\t// Output the graphs\n\t\t\tif($gameplay)\n\t\t\t{\n\t\t\t\techo \"<tr><td valign=middle width=100 height=11><b><font size=2 face=Arial>Gameplay:</font></b></td><td width=100 height=11><img border=0 src=pics/poll.gif width=\".($gameplay*10).\" height=10></td><td width=20 height=11 align=center>$gameplay</td></tr>\\n\";\n\t\t\t\techo \"<tr><td valign=middle width=100 height=11><b><font size=2 face=Arial>Graphics:</font></b></td><td width=100 height=11><img border=0 src=pics/poll.gif width=\".($graphics*10).\" height=10></td><td width=20 height=11 align=center>$graphics</td></tr>\\n\";\n\t\t\t\techo \"<tr><td valign=middle width=100 height=11><b><font size=2 face=Arial>Music:</font></b></td><td width=100 height=11><img border=0 src=pics/poll.gif width=\".($music*10).\" height=10></td><td width=20 height=11 align=center>$music</td></tr>\\n\";\n\t\t\t\techo \"<tr><td valign=middle width=100 height=11><b><font size=2 face=Arial>Replay:</font></b></td><td width=100 height=11><img border=0 src=pics/poll.gif width=\".($replay*10).\" height=10></td><td width=20 height=11 align=center>$replay</td></tr>\\n\";\n\t\t\t\techo \"<tr><td valign=middle width=100 height=11><b><font size=2 face=Arial>Tilt:</font></b></td><td width=100 height=11><img border=0 src=pics/poll.gif width=\".($tilt*10).\" height=10></td><td width=20 height=11 align=center>$tilt</td></tr>\\n\";\n\t\t\t// The Rate is Button\n\t\t\t}\n\t\t\telse { echo \"<tr><td width=100% align=center>There are no ratings so far.<td></tr>\"; }\n \t\techo \"</td></tr></table><tr><td align=right><i><b><a href=reviews.php?id=$id&rate=1>Rate it!</a><br><a href=reviews.php?id=$id&review=1>Write a Review!</a></b></i></td></tr>\";\n }", "title": "" }, { "docid": "a155b362933b36e7d21dbf067cd97052", "score": "0.48863682", "text": "function say_graph($gameplay, $graphics, $music, $replay, $tilt, $id)\n\t{\n\t\t\techo \"<tr><td width=177 height=20 valign=top style=\\\"border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-bottom-style: solid; border-bottom-width: 1\\\" bgcolor=#E1E7F3>\\n\";\n\t\t\techo \"<table border=0 style=\\\"border-collapse: collapse\\\" bordercolor=#111111 cellpadding=0 cellspacing=0>\\n\";\n\t\t\t// Output the graphs\n\t\t\tif($gameplay)\n\t\t\t{\n\t\t\t\techo \"<tr><td valign=middle width=100 height=11><b><font size=2 face=Arial>Gameplay:</font></b></td><td width=100 height=11><img border=0 src=pics/poll.gif width=\".($gameplay*10).\" height=10></td><td width=20 height=11 align=center>$gameplay</td></tr>\\n\";\n\t\t\t\techo \"<tr><td valign=middle width=100 height=11><b><font size=2 face=Arial>Graphics:</font></b></td><td width=100 height=11><img border=0 src=pics/poll.gif width=\".($graphics*10).\" height=10></td><td width=20 height=11 align=center>$graphics</td></tr>\\n\";\n\t\t\t\techo \"<tr><td valign=middle width=100 height=11><b><font size=2 face=Arial>Music:</font></b></td><td width=100 height=11><img border=0 src=pics/poll.gif width=\".($music*10).\" height=10></td><td width=20 height=11 align=center>$music</td></tr>\\n\";\n\t\t\t\techo \"<tr><td valign=middle width=100 height=11><b><font size=2 face=Arial>Replay:</font></b></td><td width=100 height=11><img border=0 src=pics/poll.gif width=\".($replay*10).\" height=10></td><td width=20 height=11 align=center>$replay</td></tr>\\n\";\n\t\t\t\techo \"<tr><td valign=middle width=100 height=11><b><font size=2 face=Arial>Tilt:</font></b></td><td width=100 height=11><img border=0 src=pics/poll.gif width=\".($tilt*10).\" height=10></td><td width=20 height=11 align=center>$tilt</td></tr>\\n\";\n\t\t\t// The Rate is Button\n\t\t\t}\n\t\t\telse { echo \"<tr><td width=100% align=center>There are no ratings so far.<td></tr>\"; }\n \t\techo \"</td></tr></table><tr><td align=right><i><b><a href=reviews.php?id=$id&rate=1>Rate it!</a><br><a href=reviews.php?id=$id&review=1>Write a Review!</a></b></i></td></tr>\";\n\t}", "title": "" }, { "docid": "ab6ac0515cd3d9de2767cc8e740dd986", "score": "0.4877722", "text": "public function display() {\n\n\t\t?>\n\t\t<script type=\"text/javascript\">\n\t\t\tjQuery( document ).ready( function( $ ) {\n\t\t\t\t<?php foreach ( self::$messages as $message ) : ?>\n\t\t\t\t\t$.gritter.add( {\n\t\t\t\t\t\ttitle: \"<?php echo esc_js( __( 'Success', 'mwp-system-plugin' ) ); ?>\",\n\t\t\t\t\t\ttext: \"<?php echo esc_js( $message ); ?>\",\n\t\t\t\t\t\ttime: <?php echo absint( 5 * 1000 ); ?>\n\t\t\t\t\t} );\n\t\t\t\t<?php endforeach; ?>\n\t\t\t} );\n\t\t</script>\n\t\t<?php\n\n\t}", "title": "" }, { "docid": "eaf4645ef331d9662ecc538935edc19d", "score": "0.48767227", "text": "function hideStar($str) { //用户名、邮箱、手机账号中间字符串以*隐藏 \n if (strpos($str, '@')) { \n $email_array = explode(\"@\", $str); \n $prevfix = (strlen($email_array[0]) < 4) ? \"\" : substr($str, 0, 3); //邮箱前缀 \n $count = 0; \n $str = preg_replace('/([\\d\\w+_-]{0,100})@/', '***@', $str, -1, $count); \n $rs = $prevfix . $str; \n } else { \n $pattern = '/(1[3458]{1}[0-9])[0-9]{4}([0-9]{4})/i'; \n if (preg_match($pattern, $str)) { \n $rs = preg_replace($pattern, '$1****$2', $str); // substr_replace($name,'****',3,4); \n } else { \n $rs = substr($str, 0, 3) . \"***\" . substr($str, -1); \n } \n } \n return $rs; \n}", "title": "" }, { "docid": "3905fb3c1b00d2e21ff98f6c95a8737e", "score": "0.4866223", "text": "function customize_print1() \n { \n echo \"<p style=color:\".$this->font_color.\";>\".$this->string_value.\"</p>\"; \n }", "title": "" }, { "docid": "e50d1db2cf4741333b1b3549baa7fa02", "score": "0.48601875", "text": "function user_score($user_score,$img) {\n global $theme;\n \n $star=0;\n $half_star=0;\n $my_img=ereg_replace(\".gif$\",\"\",$img);\n $img_half=$my_img.\"_half.gif\";\n $before_point=ereg_replace(\"\\..+$\",\"\",$user_score);\n \n // jezeli srednia ocena jest niepelna (wystepuje kropka)\n if (ereg(\"\\.\",$user_score)) {\n $before_point=ereg_replace(\"\\..+$\",\"\",$user_score); // dowiedz sie jaka jest liczba przed kropka\n $point=ereg_replace(\".\\.(.+$)\",\"\\\\1\",$user_score); // dowiedz sie jaka jest liczba po kropce\n if (ereg(\"^[0-9]$\",$point)) $point=$point.\"0\"; // jesli po przecinku jest tylko jedna liczba dodaj do niej 0\n \n // jezeli liczba po kropce miescie sie w zakresie od 25 do 75\n if (($point>=25)&&($point<75)) {\n // dodaj pol gwiazdki\n $half_star=1;\n // jezeli liczba po kropce jest wieksza od 75\n } elseif($point>=75) {\n // dodaj cala gwiazdke\n $star=1;\n }\n \n \n if ($before_point>5) $before_point=5;\n if ($before_point>0) {\n // wyswietl tyle pelnych gwiazdek ile wskazuje before_point\n for ($i=0;$i<$before_point;$i++) {\n print \"<img src=\\\"\";$this->img(\"_img/$img\"); print \"\\\" border=\\\"0\\\" alt=\\\"\\\" align=\\\"absmiddle\\\">\";\n }\n if ($half_star==1) {\n print \"<img src=\\\"\";$this->img(\"_img/$img_half\"); print \"\\\" border=\\\"0\\\" alt=\\\"\\\" align=\\\"absmiddle\\\">\"; // dodaje pol gwiazdki do zwracanego stringu $o\n } elseif ($star==1) {\n print \"<img src=\\\"\";$this->img(\"_img/$img\"); print \"\\\" border=\\\"0\\\" alt=\\\"\\\" align=\\\"absmiddle\\\">\"; // dodaje cala gwiazdke do zwracanego stringu $o\n }\n }\n } else {\n // wyswietl normalna ilosc gwiazdek w zaleznosci od user_score\n if ($user_score>5) $user_score=5;\n if ($user_score>0) {\n for ($i=0;$i<$user_score;$i++) {\n print \"<img src=\\\"\";$this->img(\"_img/$img\"); print \"\\\" border=\\\"0\\\" alt=\\\"\\\" align=\\\"absmiddle\\\">\";\n }\n }\n }\n \n return;\n }", "title": "" }, { "docid": "a18a42806ce0fd4a4204d6eff9ba074e", "score": "0.4852625", "text": "private function renderPatternHTML()\n {\n return '<img src=\"css/pattern.jpg\" class=\"patternimg\" alt=\"Skirt pattern\">';\n }", "title": "" }, { "docid": "a3e1bb87ec075ca551c88d7e444900a7", "score": "0.48476467", "text": "public function outputStatus($symbol)\n {\n // Windows NT (or earlier without ANSI.SYS) do not\n // support the ANSI color escape codes.\n if (preg_match('/windows/i', php_uname('s'))) {\n echo $symbol;\n return;\n }\n switch ($symbol) {\n case '.':\n $symbol = Console_Color::convert(\"%g$symbol%n\");\n break;\n case 'F':\n $symbol = Console_Color::convert(\"%r$symbol%n\");\n break;\n case 'E':\n $symbol = Console_Color::convert(\"%r$symbol%n\");\n break;\n case 'P':\n $symbol = Console_Color::convert(\"%y$symbol%n\");\n break;\n default:\n }\n \techo $symbol;\n }", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "bfa10fe085a18ad24a00a7f30e9d5cc8", "score": "0.0", "text": "public function index()\n {\n $rays= Ray::orderBy('created_at', 'DESC')->paginate(5);\n return response()->json($rays);\n \n }", "title": "" } ]
[ { "docid": "a8219f7511c208b206421d7070626481", "score": "0.76236707", "text": "public function index() {\r\n $this->listing();\r\n }", "title": "" }, { "docid": "3119bf4433b0eb6e1e5f5d3aefff8f7c", "score": "0.74976325", "text": "public function listAction()\n {\n header('Content-Type: application/json');\n echo json_encode(self::list($this->table, $_GET, $_GET), JSON_PRETTY_PRINT);\n }", "title": "" }, { "docid": "0af0bed2cb54202b9b5f635b805dd270", "score": "0.7456269", "text": "public function index() {\n $this->list();\n }", "title": "" }, { "docid": "fc22d7eb65a1457db19e4e0a158758ae", "score": "0.7440038", "text": "public function indexAction()\n {\n // fetch list with pagination\n $data = $this->service->fetchList($this->getRequest()->getQuery(), [\n 'baseUri' => $this->getBaseUri()\n ]);\n\n // Title for the resource list\n $data['title'] = sprintf('%s List', $this->getResourceTitle());\n $data['pagination'] = $this->getPaginationControl($data['paginator']);\n\n return new ViewModel($data);\n }", "title": "" }, { "docid": "2626767a2d50900ecf067648343b72f2", "score": "0.7381333", "text": "public function index()\n {\n if ($this->perPage) {\n $items = $this->model->paginate($this->perPage);\n } else {\n $items = $this->model->all();\n }\n\n return $this->getViewByAction('index')->with([str_plural($this->resourceName) => $items]);\n }", "title": "" }, { "docid": "91b29c734dd33fa6ab5758c46e47554b", "score": "0.73258376", "text": "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', []);\n $filter = $this->Request()->getParam('filter', []);\n $optin = $this->Request()->getParam('optin', 2);\n $result = $this->resource->getList($offset, $limit, $filter, $sort, $optin);\n $this->View()->assign(['success' => true, 'data' => $result]);\n }", "title": "" }, { "docid": "042ad4983b357357fa2fc3e7b732ee82", "score": "0.72482914", "text": "public function index()\n\t{\n\t\t$resources = $this->resource->all();\n\n\t\treturn View::make('backend.resources.index', compact('resources'));\n\t}", "title": "" }, { "docid": "1169ce14cfc5668f5eea745b36a1f890", "score": "0.721445", "text": "public function index()\n {\n $recipeLists = RecipeList::paginate(5);\n return RecipeListResource::collection($recipeLists);\n }", "title": "" }, { "docid": "035f6de7d67b67c8aac107864bb88b5b", "score": "0.71630436", "text": "public function listAction() {\n $this->_datatable();\n return $this->render('BackendBundle:Feast:list.html.twig');\n }", "title": "" }, { "docid": "fc107b824969a23c68c0c5f2741cd1c6", "score": "0.71610266", "text": "public function index()\n {\n $perPage = request()->get('perPage') ?? 45;\n $with = request()->get('with') ?? [];\n $sanitized = request()->except(['perPage', 'with']);\n return $this->resource::collection($this->repository->list($sanitized, $with, $perPage));\n }", "title": "" }, { "docid": "187ec101935a79ed032959ef1b75d4ae", "score": "0.7118817", "text": "public function actionList()\n {\n \n return $this->render('_list');\n }", "title": "" }, { "docid": "1f35abb1b2dfde3d664df626615da04d", "score": "0.7097277", "text": "public function index()\n {\n //\n return view('admin.resources.index')->with('resources', Resource::all());\n }", "title": "" }, { "docid": "d29399034be7f5e56ab0c5ec77f7aa5a", "score": "0.6957485", "text": "public function listAction()\n {\n $repository = $this->getDoctrine()\n ->getRepository('MyRecipesDosBundle:Recipe');\n \n $recipe = $repository->findAll();\n return $this->render('MyRecipesDosBundle:Recipe:list.html.twig', array('recipes' => $recipe));\n }", "title": "" }, { "docid": "7c5436fac4c77ee77f00987408854421", "score": "0.6907326", "text": "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_book->get_all();\n\t\t$this->template->set('title', 'Book List');\n\t\t$this->template->load('template', 'contents', 'book/book_list', $data);\n\t}", "title": "" }, { "docid": "2be70a4426b327e1d03c05eabde9d81b", "score": "0.6904068", "text": "public function index()\n {\n $this->getLists($this->table);\n }", "title": "" }, { "docid": "99d0096711c4ac4c16aec6ead9d6f9cb", "score": "0.69036937", "text": "public function index()\n {\n // Get Entries\n $entries = Entry::paginate(15);\n\n // Return Collection of entries as a resource\n return EntryResource::collection($entries);\n }", "title": "" }, { "docid": "a3d61b5afcf1642fed8df944d4b81b6f", "score": "0.68887955", "text": "public function listAction()\n {\n return $this->render(\n 'BingoBundle:Page:clicks.html.twig',\n array(\n 'name' => 'FreakXoHBingo',\n 'version' => Kernel::VERSION,\n )\n );\n }", "title": "" }, { "docid": "561046d6e9e022bfc2781d4da04f6f0e", "score": "0.68827784", "text": "public function listAction() {\n\t\treturn $this->render('::base.html.twig');\n\t}", "title": "" }, { "docid": "95f382e4dda4333116a338434b4adcb7", "score": "0.6859838", "text": "public function index()\n {\n return view('resources.index', ['resources' => Resource::orderBy('title')->get()]);\n }", "title": "" }, { "docid": "c72ddbe4283fe8d28a198836a20283ca", "score": "0.6857927", "text": "public function listAction()\n {\n $this->_forward('index');\n }", "title": "" }, { "docid": "374f77abe39cc273e93ae71403c0135d", "score": "0.68395513", "text": "public function index()\n {\n $user = Auth::user();\n $taskLists = TaskList::where('user_id', $user->id)->orderBy('title')->paginate(100);\n return TaskListResource::collection($taskLists);\n }", "title": "" }, { "docid": "a3720146415f23c943668d82d74b6ddc", "score": "0.6833012", "text": "public function indexAction() {\n\t\t$this->initInstance();\n\t\t//récupère les ressources disponibles\n\t\t//http://localhost/omeka-s/api/item_sets?resource_class_label=MediaResource\n\t}", "title": "" }, { "docid": "9051fd38b8c975ac149dd081631df266", "score": "0.68245953", "text": "public function index()\n {\n return $this->fetch('lst');\n }", "title": "" }, { "docid": "6348b646e527696af99b800ca8365e10", "score": "0.68105257", "text": "public function show()\n {\n //\n return BasicResource::collection(Basic::all());\n }", "title": "" }, { "docid": "ab587658e56065a3311a7edf4c3c2213", "score": "0.6784784", "text": "public function index()\n {\n return CollectionResource::collection(Collection::paginate(100));\n }", "title": "" }, { "docid": "9bbc51747f3455267943436dda172ca2", "score": "0.6783519", "text": "public function index()\n {\n $data['resource'] = Resource::all();\n return view('admin.resource.index',$data);\n }", "title": "" }, { "docid": "1ec8c70afa71a91f40bcd16f4d0c6776", "score": "0.67766154", "text": "public function list()\n {\n $datas = $this->model->getBooks(null, $this->level);\n $this->createView($this->_tab . DS . 'list', $datas);\n $this->view->page_title = 'BIBLIOGRAPHIE';\n \n $this->view->render($datas);\n }", "title": "" }, { "docid": "efb2c483c24911e6f2a3d9046c1ef1ef", "score": "0.67576295", "text": "public function listAction()\n {\n $list = $this->listFactory->createList($this->dataBackend, $this->configurationBuilder);\n\n if ($list->count() == 0) {\n $this->addFlashMessage(\\TYPO3\\CMS\\Extbase\\Utility\\LocalizationUtility::translate('general.emptyList', 'PtExtlist'), '', \\TYPO3\\CMS\\Core\\Messaging\\FlashMessage::INFO);\n }\n\n $this->view->assign('config', $this->configurationBuilder);\n $this->view->assign('listHeader', $list->getListHeader());\n $this->view->assign('listCaptions', $list->getRenderedListHeader());\n $this->view->assign('listData', $list->getRenderedListData());\n $this->view->assign('aggregateRows', $list->getRenderedAggregateListData());\n\n $this->view->assign('exportIdentifiers', $this->exportIdentifiers);\n\n if ($this->filterbox) {\n $this->view->assign('filterBoxCollection', $this->filterboxCollection);\n $this->view->assign('filterbox', $this->filterbox);\n }\n\n if ($this->pagerIdentifier) {\n $this->view->assign('pagerCollection', $this->pagerCollection);\n $this->view->assign('pager', $this->pagerCollection->getPagerByIdentifier($this->pagerIdentifier));\n }\n }", "title": "" }, { "docid": "1fe41c52dd75a6340ba0e7415a6acc25", "score": "0.67415196", "text": "public function index()\n {\n return TodoResource::collection(Todo::paginate(10));\n }", "title": "" }, { "docid": "43f39595a775a167f28377481ffc4a07", "score": "0.673642", "text": "public function index()\n {\n $list = $this->repo->allPaged();\n\n if ( ! $list)\n {\n return $this->respondNotFound('Unable to fetch the selected resource');\n }\n\n $resource = new Fractal\\Resource\\Collection($list->getCollection(), new $this->transformerClass);\n $resource->setPaginator(new Fractal\\Pagination\\IlluminatePaginatorAdapter($list));\n\n return $this->fractal->createData($resource)->toArray();\n// return $this->response->collection($list, new $this->transformerClass);\n }", "title": "" }, { "docid": "f58dba1d10587784466e2956148410a7", "score": "0.6732629", "text": "public function index()\n {\n return RapportResource::collection(Rapport::paginate());\n }", "title": "" }, { "docid": "d267abfc43200f6a283a55648822e91b", "score": "0.6730257", "text": "public function index()\n\t{\n\t\t$this->listar();\t\n\t}", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.67255723", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "59aa91737bf5b1a4cfdace1c9bec4b48", "score": "0.6722742", "text": "public function index()\n {\n $cars = Car::paginate(25);\n\n return CarResource::collection($cars);\n }", "title": "" }, { "docid": "2de5d92ccf694ea64c2b87a4044bdfed", "score": "0.671587", "text": "public function index()\n {\n $resources = Resource::all();\n return view('Resource.index',['resources' => $resources]);\n }", "title": "" }, { "docid": "d6fb6897e87bd5dae4bbc01d2557f9de", "score": "0.6715235", "text": "public function index()\n {\n return $this->getList();\n }", "title": "" }, { "docid": "26f3b9a4c8b215d418e8d18a1ba08064", "score": "0.67125565", "text": "public function listAction(){\n\t\t$view = Zend_Registry::get('view');\n\t\t$table = new ProfessorAluno();\n\t\t$table->getCollection();\n\t\t$this->_response->setBody($view->render('default.phtml'));\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "3005a7694daa66d5411575d09a01fd3c", "score": "0.6711127", "text": "public function indexAction()\r\n\t{\r\n\t\t$this->_view->_title = ucfirst($this->_controller) . ' Manager :: List';\r\n\r\n\t\t$totalItems = $this->_model->countItems($this->_arrParam);\r\n\t\t$configPagination = ['totalItemsPerPage' => 3, 'pageRange' => 3];\r\n\t\t$this->setPagination($configPagination);\r\n\t\t$this->_view->pagination = new Pagination($totalItems, $this->_pagination);\r\n\r\n\t\t$this->_view->countActive = $this->_model->countItems($this->_arrParam, ['task' => 'count-active']);\r\n\t\t$this->_view->countInactive = $this->_model->countItems($this->_arrParam, ['task' => 'count-inactive']);\r\n\t\t$this->_view->Items = $this->_model->listItem($this->_arrParam, null);\r\n\t\t$this->_view->render($this->_controller . '/index');\r\n\t}", "title": "" }, { "docid": "a061f90100fcefc770084243e89cb657", "score": "0.67049634", "text": "public function index()\n {\n\t\t\treturn RentalResource::collection(Rental::with()->paginate(25));\n }", "title": "" }, { "docid": "ce69134742a988b497785376ad59ad49", "score": "0.6700845", "text": "public function index()\n\t{\n\t\t$data['lists'] = $this->permission_model->get_all();\n\t\t$this->template->set('title', 'Permission List');\n\t\t$this->template->admin('template', 'list', $data);\n\t}", "title": "" }, { "docid": "e20bfea5cc73d4e9dc13d2e0589cf474", "score": "0.6689846", "text": "public function index()\n {\n // Get hospitals -- paginate\n $hospitals = Hospital::paginate(20);\n\n // Return collection of hospitals as a resource\n return HospitalResource::collection($hospitals);\n }", "title": "" }, { "docid": "b33ee86168eb0ade086aca85bd07f060", "score": "0.66757935", "text": "public function list()\n {\n $CRUDList = $this->crudHandler->list();\n\n return $this->handleResult($CRUDList);\n }", "title": "" }, { "docid": "c4f993dfe3f1f7bd25662bc6f177e545", "score": "0.66563594", "text": "public function index()\n {\n $items = Item::all();\n return ItemResource::collection($items);\n }", "title": "" }, { "docid": "a9152291e72de561c907f0d16b4dd8e9", "score": "0.6654788", "text": "public function indexAction()\n {\n // Get the entity we are making the list of\n $this->entity = $this->params()->fromRoute('entity');\n if (!isset($this->entity))\n {\n return $this->getResponse()->setStatusCode(404);\n }\n\n // Get information about the entity to display to view\n if (empty($info = $this->entity_table[$this->entity]))\n {\n return false;\n }\n\n // Change the view strategy if it is set to use a different one\n if (!empty($info['view_strategy']))\n {\n $view_strategy_class = $info['view_strategy'];\n if (!class_exists($view_strategy_class))\n {\n throw new \\Exception(\"The view strategy class being used to render this page cannot be found.\");\n }\n\n $view_strategy = new $view_strategy_class;\n if (!($view_strategy instanceof IViewStrategy))\n {\n throw new \\Exception(\"The view strategy being used must implement the IViewStrategy interface.\");\n }\n\n $this->setViewStrategy($view_strategy);\n }\n\n // Render the list using the strategy given\n $view_results = $this->view_strategy->render($this);\n if (false === $view_results)\n {\n return $this->getResponse()->setStatusCode(404);\n }\n\n // Attach javascript\n $this->getServiceLocator()->get('ViewRenderer')->headScript()->appendFile('/js/backend/list.js');\n\n return $view_results;\n }", "title": "" }, { "docid": "2193e1e8cdcf85402ba6929069f31734", "score": "0.6635656", "text": "public function index()\n {\n // Get assetModels\n $assetModels = AssetModel::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of assetModels as a resource\n return AssetModelResource::collection($assetModels);\n }", "title": "" }, { "docid": "ea55c90db1e5317add55946b5021b00c", "score": "0.6629907", "text": "public function index()\n {\n //get students\n $students = student::all();\n\n return StudentResource::collection($students);\n }", "title": "" }, { "docid": "0da8ac4a2988814b2e9c07b535204492", "score": "0.6628081", "text": "public function index()\n {\n $cars = Car::all();\n return CarResource::collection($cars);\n }", "title": "" }, { "docid": "5722fce7447cf2831c8c8b4f00a1c30e", "score": "0.66276073", "text": "public function index()\n {\n $entries = Entry::all();\n\n return EntryResource::collection($entries);\n }", "title": "" }, { "docid": "bfcfe58010865f047fee4363102ac43d", "score": "0.66167", "text": "public function index()\n {\n //\n $students = Student::all();\n return StudentResource::collection($students);\n }", "title": "" }, { "docid": "6df1194a3c23fe8044d8a812c5bc1c7a", "score": "0.6610945", "text": "public function index()\n {\n $students = Student::all();\n\n return ResourcesStudent::collection($students);\n }", "title": "" }, { "docid": "daaefee9c34d3101903bfac8a955fb09", "score": "0.66073436", "text": "public function _index()\n {\n // The get_entries function in the\n // entries Streams API drivers grabs\n // entries from a stream.\n // The only really required parameters are\n // stream and namespace.\n\n $params = array(\n 'stream' => 'service',\n 'namespace' => 'service',\n 'paginate' => 'yes',\n 'page_segment' => 3\n );\n\n $this->data->service = $this->streams->entries->get_entries($params);\n \n // Build the page\n $this->template->title($this->module_details['name'])\n ->build('admin/index', $this->data);\n }", "title": "" }, { "docid": "8f2f77c8b6e53012c03b4a96f9c83b40", "score": "0.6598037", "text": "public function showAction()\n {\n $this->forward('list');\n }", "title": "" }, { "docid": "de31ab079d9e333a0d8dac4edd6e4827", "score": "0.6597582", "text": "public function index(Request $request, $resource = null)\n {\n $resource = $this->getResource($resource);\n $cards = $resource->renderCards($request);\n\n $resources = $resource->paginator($request)\n ->getCollection()\n ->mapInto($resource)\n ->map->indexFields($request);\n\n $paginationLinks = $resource->getPaginationLinks($request);\n $modelId = null;\n\n return view('orm.listado',\n compact('resource', 'cards', 'resources', 'paginationLinks', 'modelId')\n );\n }", "title": "" }, { "docid": "987ab94de2b0e9b4db0aa8318acfa28e", "score": "0.6596193", "text": "public function actionIndex() {\n\n\t\t// Setup page title and first breadcrumb\n\t\t$this->view->title = yii::t( 'radtools', '{object} Overview', [\n\t\t\t'object' => $this->model_name,\n\t\t] );\n\t\t$this->addBreadCrumbs( [ $this->view->title ] );\n\n\t\t// Setup data feed\n\t\t$searchModel = new $this->searchModelClass();\n\t\t$dataProvider = $this->indexDataProvider( $searchModel );\n\n\t\t$this->beforeCrudValidation(\n\t\t\t$this->action->id,\n\t\t\t$this->model\n\t\t);\n\n\t\treturn $this->render( 'index', $this->indexRenderData( $searchModel, $dataProvider ) );\n\t}", "title": "" }, { "docid": "11f2bcdc890680ff98f96dec711093ed", "score": "0.6585215", "text": "public function index()\n {\n // Look for overriden views\n $this->overrideViews();\n\n // Get models to show\n $results = $this->makeIndexQuery()->paginate($this->perPage());\n\n // Render the view using the `listing` builder\n $listing = Listing::createFromController($this, $results);\n if ($this->parent) {\n $listing->parent($this->parent);\n\n // The layout header may have a many to many autocomplete\n $this->layout->with($this->autocompleteViewVars());\n }\n\n // Render view\n return $this->populateView($listing);\n }", "title": "" }, { "docid": "e5485fb94e84d7f1a64ec7a4f239f625", "score": "0.6583983", "text": "public function list()\n\t{\n\t\tif(!$this->user->loggedIn())\n\t\t{\n\t\t\t$this->addHTTPStatusCode('401');\n\t\t\t$this->addMessage('danger', 'You are not logged in. Please log in.');\n\t\t\t$this->addTpl('messages');\n\n\t\t\t$this->runHTML();\n\t\t}\n\n\t\t$arrivals = new arrivalModel($this->db);\n\n\t\t# Load GET variables\n\t\t$type_id \t= ! empty($this->params[0]) ? $this->params[0] : false;\n\t\t$name \t\t= ! empty($this->params[1]) ? $this->params[1] : false;\n\n\t\t$data['arrivals'] \t\t\t= $arrivals->getArrivals($type_id, $name);\n\t\t$data['arrival_statistics'] = $arrivals->getArrivalStatistics($type_id, $name);\n\n\t\tif(empty($data['arrivals']))\n\t\t{\n\t\t\t$this->addMessage('danger', 'There are no search results available.');\n\t\t}\n\n\t\t$this->addTpl('messages');\n\t\t$this->addView('search-results');\n\n\t\t$this->runHTML($data);\n\t}", "title": "" }, { "docid": "a3e1dd116a18a3fe10d66cbd4874818b", "score": "0.65685564", "text": "public function index()\n {\n $taskList = Task::with\n (\n [\n 'taskVersionInfo',\n 'userTaskAssignee',\n 'user',\n 'taskVersionInfo',\n 'taskVersionInfo.projectInfo'\n ]\n )->get();\n if(!empty($taskList)){\n return $this->sendSuccessResponse(200,TaskListResource::collection($taskList));\n } else {\n return $this->sendCustomMessage(404,'Sorry! No record found');\n }\n }", "title": "" }, { "docid": "578a96f128221bf5bcf98a2a211cadf8", "score": "0.65538025", "text": "public function listAction()\n {\n if ($this->checkApi->checkKey()) {\n return new JsonResponse($this->checkApi->checkKey());\n }\n\n $em = $this->getDoctrine()->getManager();\n $books = $em->getRepository('BookBundle:Book')->findBy([], ['readIt' => 'DESC']);\n\n return $this->sucessfullResponse($books);\n }", "title": "" }, { "docid": "faa4b62fb90476f0f5cc5f9d659baab7", "score": "0.6550044", "text": "public function index()\n {\n $this->list = $this->role->select();\n $this->display();\n }", "title": "" }, { "docid": "6eadfe639301106d65142408b4536a7d", "score": "0.65397066", "text": "public function index()\n {\n return CentroResource::collection(Centro::paginate());\n }", "title": "" }, { "docid": "df222e53d0f8cd5226717538186f640b", "score": "0.6537331", "text": "public function index()\n {\n return RepresentativeResource::collection($this->representativeRepository->list());\n }", "title": "" }, { "docid": "1265756e79b7627e4f5013af9b86193c", "score": "0.65358984", "text": "public function index()\n {\n $cards = Card::latest()->get();\n return CardResource::collection($cards);\n }", "title": "" }, { "docid": "b2667c25fd50ab1551a340a8fc91baf0", "score": "0.65343034", "text": "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\t\t\n\t\t$param = $this->getInput(array('id', 'category_id', 'title', 'phone', 'status', 'user_id'));\n\t\t\n\t\t$search = array();\n\t\tif ($param['user_id']) $search['user_id'] = $param['user_id'];\n\t\tif ($param['category_id']) $search['category_id'] = $param['category_id'];\n\t\tif ($param['title']) $search['title'] = array('LIKE', $param['title']);\n\t\tif ($param['status']) $search['status'] = $param['status'];\n\t\tif ($param['phone']) $search['phone'] = $param['phone'];\n\t\t\n\t\t$perpage = $this->perpage;\n\t\tlist($total, $jobs) = Ola_Service_Job::getList($page, $perpage, $search, array('sort'=>'DESC', 'id'=>'DESC'));\n\t\tlist(, $categorys) = Ola_Service_Category::getList(1, 100);\n\t\t\n\t\t$this->assign('jobs', $jobs);\n\t\t$this->assign('categorys', Common::resetKey($categorys, 'id'));\n\t\t$this->assign('status', $this->status);\n\t\t$this->assign('param', $param);\n\t\t\n\t\t$this->cookieParams();\n\t\t$url = $this->actions['listUrl'] .'/?'. http_build_query($param) . '&';\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $url));\n\t\t$this->assign('total', $total);\n\t}", "title": "" }, { "docid": "fe378ccbbcf7c936d31c946fb0a1abe1", "score": "0.6515067", "text": "public static function index()\r\n {\r\n $pagination = array(\r\n 'page' => 1,\r\n 'show' => 20\r\n );\r\n\r\n if (isset($_GET['page'])) {\r\n $pagination['page'] = intval($_GET['page']);\r\n }\r\n if (isset($_GET['show'])) {\r\n $pagination['show'] = intval($_GET['show']);\r\n }\r\n\r\n $params = array(\r\n 'controller_list' => array(),\r\n 'app_list' => array()\r\n );\r\n $settings = array(\r\n 'controller_list' => array(),\r\n 'app_list' => array(\r\n 'index' => 'id',\r\n 'flat' => true\r\n )\r\n );\r\n\r\n $params['controller_list'] = array_merge($params['controller_list'], $pagination);\r\n\r\n $list_controller = api::query('controller/list', $params['controller_list'], $settings['controller_list']);\r\n $list_app = api::query('app/list', $params['app_list'], $settings['app_list']);\r\n\r\n view::load('controller/index', array(\r\n 'list' => $list_controller,\r\n 'list_app' => $list_app\r\n ));\r\n }", "title": "" }, { "docid": "5a83f2442eb3f462ff43689e90b37f4f", "score": "0.65103835", "text": "public function index()\n {\n $perfil = Perfil::paginate(10);\n return PerfilResource::collection($perfil);\n }", "title": "" }, { "docid": "09c0cdc32d290582c28c25cdde95a5d3", "score": "0.65102404", "text": "public function index()\n {\n $model = D('Shop');\n $list = $model->search(I());\n $this->assign(array(\n 'list' => $list,\n 'page' => $model->getPage()\n ));\n $this->display();\n }", "title": "" }, { "docid": "985830e6ee02598e997add9d706d5174", "score": "0.65037256", "text": "private function index() {\n $this->showPropertyList();\n }", "title": "" }, { "docid": "adc0929400b9ac560a34d7c75ca9432b", "score": "0.6500579", "text": "public function index()\n {\n //returns list of all todos\n return response(TodoResource::collection(Todo::all(),200));\n }", "title": "" }, { "docid": "702e474e3ad456bc6e922fd8cfae7ff3", "score": "0.6497448", "text": "public function index()\n {\n return TodolistResource::collection($request->user()->todolists);\n }", "title": "" }, { "docid": "157540995e279e1c89b30e8f20197d5d", "score": "0.64969057", "text": "public function index()\n {\n // Get some users\n $users = User::paginate(1);\n\n // Return collection of users as a resource\n return UserResource::collection($users);\n }", "title": "" }, { "docid": "7c3ea8e36693455e99cc4db69f0a7d10", "score": "0.64932173", "text": "public function indexAction ()\n {\n $this->_pageTitle = ['Hardware Library', 'Manufacturers'];\n // Display all of the manufacturers\n $mapper = ManufacturerMapper::getInstance();\n $paginator = new Zend_Paginator(new My_Paginator_MapperAdapter($mapper));\n\n // Set the current page we're on\n $paginator->setCurrentPageNumber($this->_getParam('page', 1));\n\n // Set how many items to show\n $paginator->setItemCountPerPage(100);\n\n // Pass the view the paginator\n $this->view->paginator = $paginator;\n $this->view->canEdit = $this->view->IsAllowed(ProposalgenAclModel::RESOURCE_PROPOSALGEN_ADMIN_SAVEANDAPPROVE, AppAclModel::PRIVILEGE_ADMIN);\n }", "title": "" }, { "docid": "7da1d53b99713be47f9b9e48be3777c8", "score": "0.649269", "text": "public function index()\n {\n return SummaryResource::collection(Summary::latest()->paginate(16));\n }", "title": "" }, { "docid": "9c8446bdda246c4d668c853fcd5f4072", "score": "0.649241", "text": "public function actionList()\n { \n $model = new Tag();\n $params = \\Yii::$app->request->getBodyParams();\n $dataProvider = $model->searchList($params);\n\n return $this->renderList('list', [\n 'model' => $model,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "3c6cae22c627d1ece2035bcbd89096b4", "score": "0.6485393", "text": "public function indexAction()\n {\n $listing = $this->createListing(new TokenOptions($this->getDoctrine()->getEntityManager()));\n\n return array(\n 'listing' => $listing\n );\n }", "title": "" }, { "docid": "bf8285b7ef2df61a00673a171e608d25", "score": "0.6477109", "text": "public function index()\n {\n return $this->showAll(Libro::all());\n }", "title": "" }, { "docid": "f691e682eec0d2b53a65e9e0d6e040f5", "score": "0.6469914", "text": "public function index()\n {\n $listings = Listing::orderBy('created_at', 'desc')->paginate(5);\n\n return view('listings')->with('listings', $listings);\n }", "title": "" }, { "docid": "9255fd66973761a2e3741769b5ec9434", "score": "0.64697826", "text": "public function index()\n {\n $listings = Listing::orderBy('created_at', 'desc')->get();\n return view('listings')->with('listings', $listings);\n }", "title": "" }, { "docid": "34ada56858882a77b2fb954f2f9ca76c", "score": "0.6465993", "text": "public function index()\n {\n $list = $this->surl->all();\n return view('surl::list', compact('list'));\n }", "title": "" }, { "docid": "c839caf8071b295e2edd8ff7dae1d275", "score": "0.64640033", "text": "public function overviewAction()\n\t{\n\n\t\t$subSiteKey = '*';\n\t\tif (Site::isSiteRequest()) {\n\t\t\t$subSiteKey = Site::getCurrentSite()->getRootDocument()->getKey();\n\t\t}\n\t\t$language = $this->language;\n\n\t\t// Retrieve items from object list\n\t\t$newsList = new Object_News_List();\n\t\t$newsList->setOrderKey(\"date\");\n\t\t$newsList->setOrder(\"desc\");\n\t\t$newsList->setLocale($language);\n\t\tif (Site::isSiteRequest()) {\n\t\t\t$newsList->setCondition('subsites LIKE ? AND title != \"\"', '%' . $subSiteKey . '%');\n\t\t}\n\n\t\t$paginator = Zend_Paginator::factory($newsList);\n\t\t$paginator->setCurrentPageNumber($this->_getParam('page', 1));\n\t\t$paginator->setItemCountPerPage(10);\n\t\t$this->view->paginator = $paginator;\n\t}", "title": "" }, { "docid": "2d1d93e01feb274bbc89ed5d265eb12e", "score": "0.6463779", "text": "public function index()\n {\n $listings = Listing::latest()->paginate(5);\n return view('frontend.listings.index',compact('listings'));\n }", "title": "" }, { "docid": "15d0c11efdda27cd3d3db89cdd68dc5e", "score": "0.6463192", "text": "public function index()\n {\n $lists = ListModel::paginate();\n\n return response()->json([\n 'lists' => $lists,\n ],200);\n }", "title": "" }, { "docid": "d3bdd3e6d0c926fc9a4a00e01d03f377", "score": "0.64611477", "text": "public function indexAction() {\r\n\t\t$page = intval($this->getInput('page'));\r\n\t\t\r\n\t\t$perpage = $this->perpage;\r\n\t\t\r\n\t\tlist($total, $links) = Gou_Service_Links::getList($page, $perpage);\r\n\t\t\r\n\t\t$this->assign('links', $links);\r\n\t\t$this->assign('types', $this->link_type);\r\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl']));\r\n\t}", "title": "" }, { "docid": "7772c381ff4b5a7b8e508efe879c68e0", "score": "0.64556235", "text": "public function index()\n {\n return BookResource::collection($this->bookRepo->get());\n }", "title": "" }, { "docid": "2f4d4a0caa725d66f7ce8489ee1f24d9", "score": "0.6455147", "text": "public function index (): AnonymousResourceCollection {\n return RecipeResource::collection(Recipe::paginate(25));\n }", "title": "" }, { "docid": "4592b6588dd629125090dcc48a6bcc63", "score": "0.6452056", "text": "public function index()\n {\n $labels = Label::paginate(10);\n\n return LabelResource::collection($labels);\n }", "title": "" }, { "docid": "71dbc6c395500f777fbf4ca2d2f41ee2", "score": "0.6447849", "text": "public function index()\n {\n $this->list->setText(trans('mconsole::gallery.form.title'), 'title')\n ->setText(trans('mconsole::gallery.form.slug'), 'slug')\n ->setSelect(trans('mconsole::settings.options.enabled'), 'enabled', [\n '1' => trans('mconsole::settings.options.on'),\n '0' => trans('mconsole::settings.options.off'),\n ], true);\n \n return $this->list->setQuery($this->repository->index())->setAddAction('gallery/create')->render(function ($item) {\n return [\n trans('mconsole::tables.id') => $item->id,\n trans('mconsole::gallery.table.updated') => $item->updated_at->format('m.d.Y'),\n trans('mconsole::gallery.table.slug') => $item->slug,\n trans('mconsole::gallery.table.title') => $item->title,\n ];\n });\n }", "title": "" }, { "docid": "6611f31e08d219eb38ba36cc62c071e1", "score": "0.6447639", "text": "public function index()\n {\n $Entreprises = Entreprise::paginate(15);\n\n \n return EntrepriseResource::collection($Entreprises);\n }", "title": "" }, { "docid": "b8ef0597ffab483dc42bf522e376a0f9", "score": "0.64469534", "text": "public function index()\n {\n return $this->showAll(Libreria::all());\n }", "title": "" }, { "docid": "131082979c43e5665d6efcb3e04fa7ec", "score": "0.6443054", "text": "public function index()\n {\n // get hotels\n $hotels = Hotels::orderBy('created_at','desc')->paginate(50);\n // returnn collection of hotels as a resource\n return HotelResource::collection($hotels);\n }", "title": "" }, { "docid": "f787cf0275f5c622f8f691b59884e61b", "score": "0.64424", "text": "public function resources(){\n\t\n\t\tif($this->secureCheck()){\n\t\t\treturn;\n\t\t}\n\t\n\t\t$sortEntry = 'id';\n\t\tif ($this->request->isParameterNotEmpty ( 'actionid' )) {\n\t\t\t$sortEntry = $this->request->getParameter ( \"actionid\" );\n\t\t}\n\t\n\t\t$modelResources = new SyResource();\n\t\t$resourcesArray = $modelResources->resourcesInfo($sortEntry);\n\t\n\t\t$navBar = $this->navBar();\n\t\t$this->generateView ( array (\n\t\t\t\t'navBar' => $navBar, 'resourcesArray' => $resourcesArray\n\t\t) );\n\t\n\t}", "title": "" }, { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.64421135", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.64421135", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "b0fb738cbb82acd366e1a8234e16b18a", "score": "0.6437053", "text": "public function listAction() {\n\t\t$this->view->setVariablesToRender(array('ideas'));\n\n\t\t$ideas = $this->ideaRepository->findAll();\n\t\t$this->view->assign('ideas', $ideas);\n\t}", "title": "" }, { "docid": "12275dd16579b5f5bbc0fd01c4c0372b", "score": "0.6435585", "text": "public function index()\n {\n $users = $this->paginate($this->Users);\n\n $this->set(compact('users'));\n }", "title": "" }, { "docid": "5395605a12301b3a21ad602afe2ffc04", "score": "0.6432393", "text": "public function index()\n\t{\n\t\treturn View::make('Ucionica.index')\n\t\t->with('list', $this->_list());\n\t}", "title": "" }, { "docid": "17ab781471a36ee728b0e79e5f76d380", "score": "0.64322966", "text": "public function lists() {\r\n\t\t$args = array();\r\n\t\t$args['method'] = 'lists';\r\n\r\n\t\treturn $this->callServer( $args );\r\n\t}", "title": "" }, { "docid": "3bc1ba2777d39aa58a5ff9ee7b0585e8", "score": "0.64308184", "text": "public function index()\n {\n $articles = Article::paginate(5);\n return ArticleResource::collection($articles);\n }", "title": "" }, { "docid": "c0ac87b1ec946c408fda431b615e8496", "score": "0.64249504", "text": "public function indexAction()\n {\n /**\n * Adding new Listing\n * IE hack to process image buttons\n */\n if($this -> _request -> getParam('add_listing')\n && !$this -> _request -> getParam('ListingValidated')\n && !$this -> _request -> getParam('ListingAdded'))\n $this -> _forward('ValidateListing');\n\n else\n {\n /** If Listing submition is validated with errors */\n if($this -> _request -> getParam('ListingValidated'))\n {\n $Err = new Zend_Config_Xml(ROOT . 'configs/error_messages/messages.xml', 'errors');\n /** Preparing warning block */\n $this -> smarty -> assign('WarnTitle', $Err -> error_block_title);\n $this -> smarty -> assign('WarnMessages', $this -> _request -> getParam('Errors'));\n $errBlock = $this -> smarty -> fetch('warningBlock.tpl');\n \n $this -> smarty -> assign('warningBlock', $errBlock);\n }\n \n $this -> smarty -> assign('PageBody', 'area/listings.tpl');\n /** Use Calendar js lib */\n $this -> smarty -> assign('UseCalendar', true);\n /** Use Interface js lib */\n $this -> smarty -> assign('UseInterface', true);\n\n $listings = $this -> Listings -> getListingsByUserId($this -> AreaControl -> getUserData() -> id) -> toArray();\n $this -> smarty -> assign('Listings', array_reverse($listings));\n \n $this -> smarty -> assign('CategoryList', $this -> Options -> getCategoryList());\n $this -> smarty -> assign('IndustryList', $this -> Options -> getIndustiresList());\n $this -> smarty -> assign('ListingType', $this -> Options -> getListingTypesList());\n \n $this -> smarty -> assign('EducationLevel', $this -> Options -> getDegreeEducationList());\n $this -> smarty -> assign('Experience', $this -> Options -> getExperienceList());\n $this -> smarty -> assign('Salary', $this -> Options -> getSalaryList());\n \n $this -> smarty -> assign('ProfileType', $this -> AreaControl -> getUserData() -> acc_type);\n\n $this -> smarty -> assign('Title', 'Listings');\n\n $this -> smarty -> display('layouts/main.tpl');\n }\n }", "title": "" }, { "docid": "2e42503d55824f0e5ba1fe3b836c57d4", "score": "0.6420493", "text": "public function indexAction()\n {\n $this->_forward('list');\n }", "title": "" }, { "docid": "2e42503d55824f0e5ba1fe3b836c57d4", "score": "0.6420493", "text": "public function indexAction()\n {\n $this->_forward('list');\n }", "title": "" } ]
0ac7bdb02e5fbb03eb7a9ee5316bf396
Run the database seeds.
[ { "docid": "1147ccb427baa24a92a517789da212e7", "score": "0.0", "text": "public function run()\n {\n //\n DB::table('products')->insert([\n\n [\n 'name' => 'amlodipine',\n 'price' => '309',\n 'description' => '10 capsule in pack',\n 'category' => 'hair care',\n 'gallery' => 'amlodipine.jpg'\n ],\n [\n 'name' => 'pepcid',\n 'price' => '799',\n 'description' => '1 strip',\n 'category' => 'eye care',\n 'gallery' => 'pepcid.jpg'\n ],\n [\n 'name' => 'pipzer',\n 'price' => '1939',\n 'description' => 'oil with the capsule not visible',\n 'category' => 'body oil',\n 'gallery' => 'pipzer.jpg'\n ]\n ]);\n }", "title": "" } ]
[ { "docid": "026cbaddf68d6d6a45da6661bc9c4127", "score": "0.79270625", "text": "public function run() {\n\n $this->call([\n CategorySeeder::class,\n ColorSeeder::class,\n SubCategorySeeder::class\n ]);\n// $products = Product::factory()->count(1000)\n// ->has(Image::factory()->count(4))\n// ->hasAttached(Size::factory()->count(3))\n// ->hasAttached(Price::factory()->count(3), [\n// 'discounted_price' => 0\n// ])\n// ->create();\n//\n// foreach($products as $product) {\n// $product->colors()->attach(Color::whereIn('id', [1, 6, 8, 14])->get());\n// }\n//\n $categories = Category::all();\n $subcategories = Subcategory::all();\n foreach($categories as $category) {\n $category->slug = Str::slug($category->name);\n $category->save();\n }\n foreach($subcategories as $subcategory) {\n $subcategory->slug = Str::slug($subcategory->name);\n $subcategory->save();\n }\n\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'customer']);\n }", "title": "" }, { "docid": "9ebafd651532d8097278ffd87e4126dd", "score": "0.7914175", "text": "public function run()\n {\n User::create([\n 'name' => 'Admin',\n 'username' => 'Admin',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => Hash::make('Admin'),\n 'isadmin' => 1,\n 'remember_token' => Str::random(10),\n ]);\n User::create([\n 'name' => 'User',\n 'username' => 'user',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => Hash::make('password'),\n 'remember_token' => Str::random(10),\n ]);\n \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Author::factory(10)->create();\n\n $authors = Author::all();\n\n foreach ($authors as $author) {\n $booksNumber = rand(1, 10);\n\n for ($i = 0; $i < $booksNumber; $i++) {\n $book = new Book;\n $faker = Faker::create();\n $book->create([\n 'author_id' => $author->id,\n 'title' => $faker->sentence(6),\n 'year' => $faker->year(),\n 'isbn' => $faker->isbn13\n ]);\n }\n }\n }", "title": "" }, { "docid": "652f431dbbffe4e36aa5c0bfc4a05f31", "score": "0.79028475", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n //factory(App\\User::class, 3)->create();\n /*factory(App\\Project::class, 20)->create();\n factory(App\\Position::class, 20)->create();*/\n DB::table('position_categories')->insert([\n 'name' => 'Architecture',\n ]);\n DB::table('position_categories')->insert([\n 'name' => 'Design',\n ]);\n DB::table('position_categories')->insert([\n 'name' => 'Economics',\n ]);\n DB::table('position_categories')->insert([\n 'name' => 'Programming',\n ]);\n DB::table('position_categories')->insert([\n 'name' => 'Network',\n ]);\n\n DB::table('users')->insert([\n 'firstname' => 'Admin',\n 'lastname' => 'Admin',\n 'type' => 'admin',\n 'activate' => '1',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n ]);\n DB::table('users')->insert([\n 'firstname' => 'Tomas',\n 'lastname' => 'Svetlik',\n 'type' => 'supervisor',\n 'activate' => '1',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n ]);\n }", "title": "" }, { "docid": "dfe583e94e177ff570601466401e1b2b", "score": "0.78664804", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = f::create();\n foreach (range(1,20) as $item) {\n DB::table('persons')->insert([\n 'firstName' => $faker->name,\n 'documentType' => \"CC\",\n 'document' => 123456,\n\t 'lastName' => $faker->lastName,\n 'company' => $faker->company,\n 'emailAddress' => $faker->email,\n 'address' => $faker->address,\n 'city' => $faker->city,\n 'province' => $faker->state,\n 'country' => $faker->countryCode,\n 'phone' =>$faker->tollFreePhoneNumber,\n 'mobile'=>$faker->e164PhoneNumber\n\t ]);\n }\n }", "title": "" }, { "docid": "f571785bdbff3ab02c615eb8fd1f1aa1", "score": "0.78613377", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Address::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 Address::create([\n 'addressName' => $faker->randomLetter,\n 'addressStreet' => $faker->streetName,\n 'addressNumber' => $faker->randomNumber(1),\n 'addressZip' => $faker->postcode,\n 'addressPlace' => $faker->city,\n 'addressCountry' => $faker->country,\n 'addressState' => $faker->state,\n 'addressMailBoxNumber' => $faker->buildingNumber,\n 'addressExtraInfo' => $faker->realText($maxNbChars = 30, $indexSize = 2),\n 'loadingPresent' => $faker->boolean(50),\n 'trailerAccess' => $faker->randomLetter\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "title": "" }, { "docid": "56e4a3e209083146c894bf986fe10c2d", "score": "0.7851426", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Articulo::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articulos in our database:\n for ($i = 0; $i < 50; $i++) {\n Articulo::create([\n 'titulo' => $faker->sentence,\n 'cuerpo' => $faker->paragraph,\n ]);\n }\n }", "title": "" }, { "docid": "b7a61e5a71620bfa33e1faa0f7e7a4e0", "score": "0.7838723", "text": "public function run()\n {\n $users = factory(App\\Book::class, 1000)->create();\n // $this->call(UserSeeder::class);\n// DB::table('books')->insert([\n// 'title' => Str::random(10),\n// 'author' => Str::random(10),\n// 'category' => Str::random(10),\n// 'piece' => 5,\n// ]);\n }", "title": "" }, { "docid": "5637d7e19c1ec7123232747c49238622", "score": "0.7834799", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory('App\\User', 10)->create();\n factory('App\\Product')->create(['name' => 'Fanta', 'price' => 140]);\n factory('App\\Product')->create(['name' => 'Coca Cola', 'price' => 180]);\n factory('App\\Product')->create(['name' => 'Pepsi Cola', 'price' => 160, 'discount' => 20]);\n factory('App\\Product')->create(['name' => 'Sprite', 'price' => 120]);\n factory('App\\Product')->create(['name' => 'Limonade', 'price' => 200]);\n }", "title": "" }, { "docid": "b444ac88819a191047d8feec2c185e1c", "score": "0.78344816", "text": "public function run()\n {\n\n DB::table('posts')->delete();\n\n $faker = Faker::create();\n $cats_id = Category::all()->pluck('id')->toArray();\n $pers_id = Person::all()->pluck('id')->toArray();\n foreach (range(1,20) as $i) {\n DB::table('posts')->insert([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'cat_id' => $faker->randomElement($cats_id),\n 'per_id' => $faker->randomElement($pers_id)\n ]);\n }\n }", "title": "" }, { "docid": "b2d9243b0e4d2434d34d38fb01906601", "score": "0.78318644", "text": "public function run()\n {\n // User::truncate();\n // Category::truncate();\n // Donation::truncate();\n // Transacton::truncate();\n // DB::table('category_donation')->truncate();\n\n User::create([\n 'name' => 'Busola Okeowo',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n 'verified' => User::VERIFIED,\n 'admin' => true,\n ]);\n\n factory(User::class, 500)->create();\n\n factory(Category::class, 10)->create();\n\n factory(Donation::class, 1000)->create()->each(\n function ($donation) {\n $categories = Category::all()->random(mt_rand(1, 3))->pluck('id');\n $donation->categories()->attach($categories);\n }\n );\n\n factory(Transacton::class, 1000)->create();\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "6c432cf75a7b37364927c71d18b2a940", "score": "0.7817219", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(App\\Country::class, 10)->create();\n factory(App\\Supplier::class, 5)->create();\n factory(App\\User::class, 3)->create();\n factory(App\\Phone::class, 3)->create();\n factory(App\\Post::class, 3)->create();\n factory(App\\Comment::class, 15)->create();\n factory(App\\Role::class, 5)->create();\n factory(App\\History::class, 5)->create();\n }", "title": "" }, { "docid": "cddbf6f9d3cf8855efd49fd8690a82a9", "score": "0.78134006", "text": "public function run()\n {\n Eloquent::unguard();\n\n $faker= Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n \t$title=$faker->sentence(5);\n \t$slug=str_slug($title, \"-\");\n CatalogCategory::create([\n 'catalog_id'=>2,\n 'parent' => 0,\n 'title' => $title,\n 'content' => $faker->realText(250),\n 'meta_title' => $faker->sentence(5),\n 'meta_keywords' => $faker->sentence(10),\n 'meta_description' => $faker->realText(50),\n 'active' => 'active',\n 'language' => 'en',\n 'slug' => $slug, \n ]);\n }\n }", "title": "" }, { "docid": "e085eed193e63f3018e503b814f52203", "score": "0.7808198", "text": "public function run()\n {\n // DB::table('articles')->insert(\n // [\n\n // [\n // 'category_id' => 4,\n // 'title' => '文章4',\n // 'content' => '内容4'\n // ],\n // [\n // 'category_id' => 5,\n // 'title' => '文章5',\n // 'content' => '内容5'\n // ]\n // ]\n // );\n\n // Let's truncate our existing records to start from scratch.\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 'category_id' => array_random([1, 2, 3, 4, 5, 6]),\n 'title' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'created_at' => \\Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => \\Carbon\\Carbon::now()->toDateTimeString()\n\n ]);\n }\n\n }", "title": "" }, { "docid": "f919a3f40e792d8990ecc3b06279bfa2", "score": "0.780527", "text": "public function run()\n {\n $db = DB::table('users');\n\n $this->faker = Faker\\Factory::create();\n\n $values ['firstName'] = 'Роман';\n $values ['lastName'] = 'Телепнёв';\n $values ['email'] = '[email protected]';\n $values ['password'] = bcrypt('123123');\n $values ['role_id'] = 2;\n\n $db->insert($values);\n\n for($i = 0; $i < 10; $i++) {\n\n $values ['firstName'] = $this->faker->firstName;\n $values ['lastName'] = $this->faker->lastName;\n $values ['email'] = $this->faker->email;\n $values ['password'] = bcrypt('123123');\n $values ['role_id'] = 1;\n\n $db->insert($values);\n }\n }", "title": "" }, { "docid": "dafd5ed6a9dfac3846fdf76150c59c25", "score": "0.7797067", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n User::factory(15)->create();\n Categorie::factory(10)->create();\n Product::factory(200)->create();\n UserProduct::factory(50)->create();\n }", "title": "" }, { "docid": "c11978691651e5bb5ec8631cb4f07e6e", "score": "0.7793273", "text": "public function run()\n {\n //$this->labFacultiesSeeder();\n $this->labRolesSeeder();\n $this->labMembersSeeder();\n $this->labStudentSeeder();\n $this->labTagsTableSeeder();\n $this->labSkillsTableSeeder();\n $this->labPreferencesTableSeeder();\n $this->labPositionsTableSeeder();\n }", "title": "" }, { "docid": "b9287aff88d859492bd31ea1291e44cc", "score": "0.7793", "text": "public function run()\n {\n // Truncate existing records to start from scratch\n // Product::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // create products in DB\n for($i = 0; $i < 10; $i++) {\n // Product::create([\n // 'name' => $faker->word,\n // 'description' => $faker->realText($maxNbChars = 20, $indexSize = 1),\n // 'qty' => $faker->randomDigit\n // ]);\n }\n }", "title": "" }, { "docid": "84a5c18a5563f5fd35652bc3991e7a13", "score": "0.7788151", "text": "public function run()\n {\n // reset the students table\n DB::table('students')->truncate();\n // generate 100 dummy students data\n $students = [];\n $faker = Factory::create();\n for ($i = 1; $i <= 100; $i++) {\n $students[] = [\n 'teacher_id' => rand(1, 2),\n 'classroom_id' => rand(1, 3),\n 'first_name' => $faker->firstName,\n 'last_name' => $faker->lastName,\n 'gender' => $faker->randomElement(['M', 'F']),\n 'joined_year' => $faker->randomElement([2017, 2018, 2019])\n ];\n }\n DB::table('students')->insert($students);\n }", "title": "" }, { "docid": "11c50d315926c6e7b655ef6b05e875c4", "score": "0.778813", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $this->call(UserTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1, 100) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => bcrypt('secret'),\n 'is_admin' => \"0\",\n 'phone' => $faker->phoneNumber,\n 'address' => $faker->address,\n 'nrc' => '9/MaKaNa(N)123456',\n 'passport' => $faker->creditCardNumber,\n 'city' => $faker->city,\n 'country' => $faker->country,\n 'is_foreigner' => $faker->numberBetween(0, 1),\n 'status' => \"1\"\n ]);\n }\n foreach (range(1, 5) as $index) {\n DB::table('room_types')->insert([\n 'type' => $faker->word,\n ]);\n }\n foreach (range(1, 100) as $index) {\n DB::table('rooms')->insert([\n 'name' => 'Room-' . $faker->numberBetween(0, 100),\n 'price' => $faker->numberBetween(1000, 5000),\n 'roomtype_id' => $faker->numberBetween(1, 5),\n 'maxPerson' => $faker->numberBetween(2, 5)\n ]);\n }\n\n }", "title": "" }, { "docid": "0d82c7815e29e8d3580735f06d9c1aaf", "score": "0.7787371", "text": "public function run()\n {\n\n \t/*DB::table('posts')->insert([\n \t\t'title'=>'Hello World Post!',\n \t\t'is_private'=>false,\n \t\t'content'=>'Primeiro Post do Blog!',\n \t\t'tag'=>'tests']);\n\t\t*/\n \t$faker = Faker\\Factory::create();\n \t\n \tfor ($i=0;$i<=50;$i++){\n \t\tDB::table('posts')->insert([\n \t\t\t'title'=>$faker->sentence(4,true),\n \t\t\t'is_private'=>$faker->numberBetween(0,1),\n \t\t\t'content'=>$faker->realText(),\n \t\t\t'tag'=>$faker->word,\n \t\t\t'created_at'=>date(\"Y-m-d H:i:s\"),\n \t\t\t'updated_at'=>date(\"Y-m-d H:i:s\"),\n\t\t\t\t'user_id'=>$faker->numberBetween(1,10),\n \t\t\t]);\n\n \t}\n }", "title": "" }, { "docid": "764ce860db37bfaef26f84398a089d37", "score": "0.77847266", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $this->call(MenuSeeder::class);\n $this->call(SubMenuSeeder::class);\n $this->call(AspirationCategorySeeder::class);\n $this->call(RoleSeeder::class);\n factory(App\\User::class, 10)->create();\n factory(App\\Aspiration::class,100)->create();\n factory(App\\Comment::class, 50)->create();\n factory(App\\Upvote::class,1000)->create();\n }", "title": "" }, { "docid": "1008c0f54658330473447dc378540eff", "score": "0.77835673", "text": "public function run()\n {\n // $this->call(\n // UsersTableSeeder::class\n // AdminTableSeeder::class\n // );\n $faker = Faker\\Factory::create();\n // users Table ..\n /*\n for ($i=0; $i < 4; $i++) { \n App\\User::create([\n 'name'=> $faker->name,\n 'email'=>$faker->unique()->email,\n 'password' => bcrypt('test'),\n 'remember_token' => str_random(10),\n ]);\n }\n */\n\n // questions Table ..\n /*\n for ($i=0; $i < 20; $i++) { \n App\\Question::create([\n 'title'=>$faker->text,\n 'a' => str_random(10),\n 'b' => str_random(10),\n 'c' => str_random(10),\n 'correct_answer'=> str_random(10),\n 'chapter'=> '2',\n 'process_group'=>'3',\n 'feedback'=>$faker->text,\n 'created_at'=>$faker->date,\n 'updated_at'=>$faker->date\n ]);\n }\n */\n }", "title": "" }, { "docid": "7a448194d3ffeafa2e4480cbd7d668c7", "score": "0.7781228", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n Schema::disableForeignKeyConstraints();\n Estudiante::truncate();\n Nota::truncate();\n\n factory(Estudiante::class, 1000)->create();\n factory(Nota::class, 10000)->create();\n\n }", "title": "" }, { "docid": "0f84f24f66f5b72c344f056d5c4ac2be", "score": "0.7779334", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n $this->call([\n //Zbog relacija moramo prvo napraviti seed tablica na koje se oslanjaju relacije. Koristimo reference. \n CategoryTableSeeder::class,\n MealsTableSeeder::class, \n IngredientsTableSeeder::class, \n TagsTableSeeder::class,\n LanguagesTableSeeder::class,\n\n CategoryTranslationSeeder::class,\n IngredientsTranslationSeeder::class,\n MealsTranslationSeeder::class,\n TagsTranslationSeeder::class,\n\n IngredientsMealsSeeder::class,\n TagsMealsSeeder::class,\n ]);\n }", "title": "" }, { "docid": "3367ba7c5de754802d54125c0434d35b", "score": "0.77788985", "text": "public function run()\n {\n // $this->call(DatabaseSeeder::class);\n\n $users = factory(App\\User::class)->times(20)->create();\n \t\t\t$products = factory(App\\Product::class)->times(40)->create();\n \t\t\t$categories = factory(App\\Category::class)->times(5)->create();\n $projects = factory(App\\Project::class)->times(5)->create();\n $organizations = factory(App\\Organization::class)->times(4)->create();\n\n foreach ($products as $oneProduct) {\n \t\t\t\t$oneProduct->user()->associate($users->random(1)->first()->id);\n \t\t\t\t$oneProduct->category()->associate($categories->random(1)->first()->id);\n $oneProduct->project()->associate($projects->random(1)->first()->id);\n \t\t\t\t$oneProduct->save();\n }\n foreach ($projects as $oneProject) {\n \t\t\t\t$oneProject->Organization()->associate($organizations->random(1)->first()->id);\n \t\t\t\t$oneProject->save();\n }\n foreach ($organizations as $oneONG) {\n $oneONG->user()->associate($users->random(1)->first()->id);\n \t\t\t\t$oneONG->save();\n }\n foreach ($organizations as $oneONG) {\n $user = $oneONG->User->id;\n $ElUser = User::find($user);\n $ElUser->organization()->associate($oneONG->id);\n // $ElUser->organization_id = $oneONG->id;\n $ElUser->save();\n }\n }", "title": "" }, { "docid": "73d68c75e35031be9ad04679b3f01bbb", "score": "0.7776164", "text": "public function run()\n {\n // $faker init\n $faker = Factory::create();\n\n // Disable foreign key\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n // truncate users table and start fresh\n DB::table('users')->truncate();\n // Insert three users\n DB::table('users')->insert([\n [\n 'name' => 'Fares Kato',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n 'bio' => $faker->text(rand(200, 300)),\n ],\n [\n 'name' => 'Jhon Doe',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n 'bio' => $faker->text(rand(200, 300)),\n ],\n [\n 'name' => 'Jane Doe',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n 'bio' => $faker->text(rand(200, 300)),\n ],\n\n ]);\n }", "title": "" }, { "docid": "9ccf154b9532504223396f096629de84", "score": "0.77724695", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class, 1)->create();\n factory(Business::class, 10)->create();\n factory(Category::class, 10)->create();\n }", "title": "" }, { "docid": "a876d481bffb816b3f928cdd2f048955", "score": "0.77708864", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n // User::factory(10)->create();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n DB::table('users')->truncate(); // bila tidak ingin menyimpan data tabel user saat generate seed\n DB::table('posts')->truncate(); // bila tidak ingin menyimpan data tabel post saat generate seed\n DB::table('authors')->truncate();\n\n User::factory(10)->create()->each(function($user){\n $user->posts()->save(Post::factory()->make());\n });\n }", "title": "" }, { "docid": "cb0cb2bf6e95ebc39e97de57dc88be67", "score": "0.77682835", "text": "public function run()\n {\n $faker = Faker::create();\n\n $data = array();\n foreach (range(1, 30) as $index)\n {\n $data[] = [\n 'title' => $faker->unique()->realText(40, 3),\n 'summary' => $faker->realText(300, 3),\n 'content' => '<p>'. $faker->realText(500, 3) .'</p>',\n 'is_hidden' => mt_rand(0, 1),\n 'read_num' => mt_rand(10, 1000),\n 'published_at' => $faker->dateTimeBetween('- 1 months', '+ 1 months'),\n 'created_at' => $faker->dateTimeBetween('- 1 months', '+ 1 months'),\n 'updated_at' => $faker->dateTimeBetween('- 1 months', '+ 1 months')\n ];\n }\n DB::table('articles')->insert($data);\n }", "title": "" }, { "docid": "2d7708bdf4209a991289a027ee4a826a", "score": "0.7767735", "text": "public function run()\n {\n // a way of seeding using set rather than random entries\n// Category::create([\n// 'slug' => 'personal',\n// 'name' => 'Personal'\n// ]);\n User::truncate();\n Category::truncate();\n Post::truncate();\n Comment::truncate();\n\n User::factory(2)->create();\n\n// User::factory(2)->create([\n// 'name' => 'Gay Lord'\n// ]);\n\n Category::factory(4)->create();\n Post::factory(10)->create();\n Comment::factory(30)->create();\n }", "title": "" }, { "docid": "e035961a57b8995e91904afa3ddca96a", "score": "0.77625465", "text": "public function run()\n {\n /*$this->call(RoleTableSeeder::class);\n $this->call(UsersTableSeeder::class);*/\n\n //factory(Category::class, 182)->create();\n factory(Tag::class, 182)->create();\n }", "title": "" }, { "docid": "ba2b70724958ce50610fe0a518ac2278", "score": "0.77595687", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n \\App\\User::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n $password = Hash::make('toptal');\n\n \\App\\User::create([\n 'name' => 'Administrator',\n 'email' => '[email protected]',\n 'password' => $password,\n ]);\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n \\App\\User::create([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => $password,\n ]);\n }\n }", "title": "" }, { "docid": "d98bd94d2928528bf0080703ee7ddf4e", "score": "0.77595174", "text": "public function run()\n {\n DB::table('users')->insert([\n \t'name'=> 'Andrius',\n \t'surname'=> 'Kamarauskas',\n \t'phone'=> '37064103803',\n \t'city'=> 'Vilnius',\n \t'car'=> 'Mercedes-Benz',\n \t'car_year'=> 2017,\n \t'email'=> '[email protected]',\n \t'password'=> bcrypt('inzinierius'),\n 'status' => 'admin',\n \t'rating' => 8.8\n ]);\n\n $faker = Faker::create();\n \tforeach (range(1,50) as $index) {\n\t DB::table('users')->insert([\n\t 'name' => $faker->firstNameMale,\n\t 'surname' => $faker->lastName,\n\t 'phone' => rand(37061546100,37069546100),\n\t 'city' => $faker->city,\n\t 'car' => $faker->company,\n\t 'car_year' => rand(1980,2017),\n\t 'email' => $faker->email,\n\t 'password' => bcrypt('inzinierius'),\n\t 'rating' => rand(55, 99) / 10,\n\t ]);\n\t }\n }", "title": "" }, { "docid": "b1559fc256ac5c4b5c1045c0f0e8a8a4", "score": "0.7757995", "text": "public function run()\n {\n $this->call(UserSeeder::class);\n\n \\App\\Models\\User::factory(500)->create();\n \\App\\Models\\Producto::factory(600)->create();\n \\App\\Models\\Pregunta::factory(1601)->create();\n \\App\\Models\\Comentario::factory(1514)->create();\n \\App\\Models\\Follower::factory(5000)->create();\n \\App\\Models\\Respuesta::factory(3401)->create();\n }", "title": "" }, { "docid": "acd8c5aa6a40c4d8772af72a60c15231", "score": "0.77574354", "text": "public function run()\n {\n \t$this->call(PersonSeeder::class);\n $this->call(UsersSeeder::class);\n $this->call(PostSeeder::class);\n /*--Con esto creo 10 usuarios y 3 posteos--\n factory(\\App\\User::class, 10)->create()->each(function ($user) {\n $user->posts()->saveMany(factory(\\App\\Post::class, 3)->make());\n });*/\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "aca60e38bfce5fae0fb865e4ccea4601", "score": "0.77563274", "text": "public function run()\n {\n \\App\\Models\\User::factory(1)->create();\n\n $authors = \\App\\Models\\Author::factory(8)->create();\n $categories = \\App\\Models\\Category::factory(5)->create();\n \n $books = \\App\\Models\\Book::factory(22)->create();\n\n $books->each(function(\\App\\Models\\Book $bk) use($authors) {\n $bk->authors()->attach(\n $authors->random(rand(1, 2))->pluck('id')->toArray()\n );\n });\n\n $books->each(function(\\App\\Models\\Book $bk) use($categories) {\n $bk->categories()->attach(\n $categories->random(rand(1, 2))->pluck('id')->toArray()\n );\n });\n }", "title": "" }, { "docid": "d29f10984b7a9a2b2a29680ef7f29b48", "score": "0.775588", "text": "public function run()\n {\n DB::table('books')->delete();\n\n Book::create(array(\n 'title' => 'First Title',\n 'isbn' => \"4675455555555557\",\n 'price'=> '12.10',\n 'cover' => 'a.jpg',\n 'author_id' => 1\n ));\n\n Book::create(array(\n 'title' => 'Second Title',\n 'isbn' => \"555555557\",\n 'price'=> '16.10',\n 'cover' => 'b.jpg',\n 'author_id' => 2\n ));\n\n Book::create(array(\n 'title' => 'Third Title',\n 'isbn' => \"46754555\",\n 'price'=> '10.10',\n 'cover' => 'c.jpg',\n 'author_id' => 3\n ));\n }", "title": "" }, { "docid": "0c2ded42e9d0c10f029db7e3ed4b12d8", "score": "0.77556497", "text": "public function run()\n {\n Collaborator::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 Collaborator::create([\n 'Sector' => 'Administractive',\n 'full_name' => $faker->name,\n 'birth_date' => $faker->date('Y-m-d'),\n 'salary' => mt_rand(1500, 2000),\n 'status' => true,\n ]);\n }\n }", "title": "" }, { "docid": "00db072ab00cec4bd1725e29a0bb3cb7", "score": "0.7751737", "text": "public function run()\n {\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'username' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'remember_token' => null,\n ]\n );\n\n UserRole::create(\n [\n 'user_id' => $user->id,\n 'role_id' => AppHelper::USER_SUPERADMIN\n ]\n );\n\n }", "title": "" }, { "docid": "064f1e23710aabe50f7131210d3ee5a4", "score": "0.77514464", "text": "public function run()\n {\n \n factory(App\\Type::class, 80)->create(); \n factory(App\\Photo::class, 80)->create();\n factory(App\\Contenu::class, 40)->create(); \n $this->call(menuTableSeeder::class);\n $this->call(UserTableSeeder::class); \n $this->call(UserMenuTableSeeder::class);\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('contenus')->insert([\n 'titre'=> 'voici titre ' . $j ,\n 'prix'=> rand(1, 400),\n 'menu_id' => rand(1, 14),\n 'type_id' => $j,\n 'photo_id' => $j,\n ]);\n }\n }\n \n }", "title": "" }, { "docid": "1f0a50fa2842591d8fbae9ae56978f0b", "score": "0.7750377", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $this->call(RolesTableSeeder::class);\n\n // $faker = Faker::create('id_ID');\n\n // for ($i=0; $i < 10 ; $i++) { \n // DB::table('coba2')\n // ->insert([\n // 'nama'=>$faker->name\n // ]);\n // }\n }", "title": "" }, { "docid": "4958ed0abf866906c5d7a7246225bf5b", "score": "0.77496284", "text": "public function run()\n {\n $this->call(UserTableSeeder::class);\n // $this->call(ProductoTableSeeder::class);\n factory('App\\Producto', 5)->create();\n factory('App\\Proveedor', 5)->create();\n factory('App\\Client', 5)->create();\n factory('App\\Mascota', 5)->create();\n }", "title": "" }, { "docid": "24b9c38dd60797bf8156ad42fe9fa447", "score": "0.7745141", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory( \\App\\User::class , 100 )->create();\n factory(\\App\\Post::class, 1500)->create();\n factory(\\App\\Category::class, 10)->create();\n factory(\\App\\Image::class, 1500)->create();\n factory(\\App\\Comment::class, 2500)->create();\n factory(\\App\\Bid::class, 1500)->create();\n factory(\\App\\Report::class, 15)->create();\n\n }", "title": "" }, { "docid": "c493764ad5b414fc41be06adcd91283d", "score": "0.7744368", "text": "public function run()\n {\n $this->call(CategorySeeder::class);\n factory(\\App\\Models\\User::class,1)->create();\n factory(\\App\\Models\\Announcement::class,15)->create();\n\n }", "title": "" }, { "docid": "756e1e45f695ea39ad39e056034c1896", "score": "0.77388614", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class, 5)->create();\n factory(Terms::class, 3)->create();\n factory(Levels::class, 4)->create();\n factory(ClassType::class, 5)->create();\n factory(Classes::class, 6)->create();\n factory(Subject::class, 10)->create();\n }", "title": "" }, { "docid": "c01585794619650e65c31c6fc9573d03", "score": "0.77383953", "text": "public function run()\n {\n factory(User::class, 10)->create();\n\n factory(Post::class, 20)->create();\n\n factory(Comment::class, 20)->create();\n //\n // $this->call(CategoriesTableSeeder::class);\n // $this->call(BooksTableSeeder::class);\n }", "title": "" }, { "docid": "b43ea34f0172c41cb99daf105ded89cf", "score": "0.77383405", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n DB::table('empresa')\n ->insert([\n 'rif' => 'V123456789',\n 'razon_social' => 'Empresa de prueba, C.A',\n 'direccion' => 'Carupano',\n 'dias_utilidades' => 30,\n 'estatus' => 'activa'\n ]);\n\n DB::table('asignaciones')\n ->insert([\n 'he_diurnas' => 1.5,\n 'he_nocturnas' => 1.8,\n 'feriados' => 1.5,\n 'desde' => '01-01-2019',\n 'estatus' => 'activa'\n ]);\n\n DB::table('deducciones')\n ->insert([\n 'ivss' => 4,\n 'faov' => 1,\n 'paro_forzoso' => 0.5,\n 'desde' => '01-01-2019',\n 'estatus' => 'activa'\n ]);\n\n DB::table('cesta_ticket')\n ->insert([\n 'cantidad' => '1800',\n 'desde' => '01-01-2019',\n 'estatus' => 'activa'\n ]);\n\n DB::table('salario_minimo')\n ->insert([\n 'monto' => 18000,\n 'tipo' => 'mensual',\n 'desde' => '01-01-2019',\n 'estatus' => 'activo'\n ]);\n }", "title": "" }, { "docid": "d5c75e93f0f8e33ad3dafaae89c3f7a2", "score": "0.7737602", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n (new Train())->truncate();\n (new Schedule())->truncate();\n (new Country())->truncate();\n\n $trainData = [\n 'train_number' => '1'\n ];\n\n $scheduleData = [\n 'time_departure' => '12:00',\n 'time_arrival' => '14:00',\n 'id_train' => '1'\n ];\n\n $countryData = [\n 'country' => 'Dnepr'\n ];\n\n $train = App\\Train::create($trainData);\n\n $schedule = App\\Schedule::create($scheduleData);\n\n $country = App\\Country::create($countryData);\n }", "title": "" }, { "docid": "de69c5c7f3e24fa429ea61201ee8058d", "score": "0.7736333", "text": "public function run()\n {\n // Create a faker instance\n $faker = Faker::create();\n\n // For covering the users, we get the count from user model.\n // So that way the foreign key user_id won't give us any problems.\n\n Category::create(\n [\n 'name'=>'Abogado',\n 'description'=>'Todo lo relacionado a la ley',\n 'role_id'=>0,\n 'role'=>0\n\n ]\n );\n\n for ($i=0; $i < 40; $i++) {\n Category::create(\n [\n 'name'=>$faker->text(45),\n 'description'=>$faker->text(500),\n\t\t\t\t\t'role_id'=>0,\n\t\t\t\t\t'role'=>0\n\n ]\n );\n }\n }", "title": "" }, { "docid": "8a376d33104830ce6aa1e08f1eccb298", "score": "0.7736265", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'username' => \"Alice\",\n 'role'=>\"student\",\n 'user_session'=>0,\n ]);\n\n DB::table('users')->insert([\n 'username' => \"Bob\",\n 'role'=>\"student\",\n 'user_session'=>0,\n ]);\n\n DB::table('users')->insert([\n 'username' => \"Professor\",\n 'role'=>\"lecturer\",\n 'user_session'=>0,\n ]);\n\n\n }", "title": "" }, { "docid": "3ac6186a7420c809b274788c1c9f0c6c", "score": "0.77233964", "text": "public function run()\n {\n \tSchema::disableForeignKeyConstraints();\n \tAd::truncate();\n \tSchema::enableForeignKeyConstraints();\n \t$faker = Faker::create();\n for ($i=0; $i < env('SEEDER_ITEM_LIMT'); $i++) { \n \t$title = \"My Test Advert - \".$i;\n \t$title = $title.\"-\".$i;\n \t$slug = \\Str::slug($title, '-');\n\t \tAd::insert([\n\t 'title' => $title,\n\t 'slugurl' => $slug,\n\t 'price' => mt_rand(10, 500),\n\t 'contactnumber' => mt_rand(12, 12),\n\t 'email' => \\Str::random(10, 20).$i.'@mail.com',\n\t 'description' => \"Grab this Christmas special before prices go up!\",\n\t 'category_id' => mt_rand(1,4),\n\t 'currency_id' => mt_rand(1,2),\n\t 'created_at' => \\Carbon\\Carbon::now(),\n\t ]);\n \t}\n }", "title": "" }, { "docid": "f3fac8bb5058ea57eef4e10aa6eee1b8", "score": "0.77152103", "text": "public function run()\n {\n $faker = Faker\\Factory::create('uk_UA');\n\n Doctor::create([\n 'user_id' => 1,\n 'biography' => $faker->text(self::MAX_NB_CHARS),\n 'work_experience' => 5,\n 'is_active' => true,\n ]);\n\n Doctor::create([\n 'user_id' => 2,\n 'biography' => $faker->text(self::MAX_NB_CHARS),\n 'work_experience' => 3,\n 'is_active' => true,\n ]);\n }", "title": "" }, { "docid": "969c4dd5fd7ea0964ba7c8d0fe24bf29", "score": "0.77092785", "text": "public function run()\n {\n factory(\\App\\Models\\Category::class, 50)->create();\n factory(\\App\\Models\\Tag::class, 50)->create();\n\n \\Illuminate\\Support\\Facades\\DB::table('roles')->insert(['name'=>'administrator']);\n \\Illuminate\\Support\\Facades\\DB::table('roles')->insert(['name'=>'user']);\n\n factory(\\App\\Models\\User::class, 50)->create()->each(function($u){\n $team = factory(\\App\\Models\\Team::class)->make();\n $u->own_team()->save($team);\n $u->teams()->save($team);\n $u->roles()->attach(\\App\\Models\\Role::all()->random()->id);\n $u->profile()->save(factory(\\App\\Models\\Profile::class)->make());\n $u->projects()->saveMany(factory(\\App\\Models\\Project::class, rand(3,10))->make())->each(function($p){\n $p->users()->attach(\\App\\Models\\User::all()->random()->id);\n $p->categories()->attach(\\App\\Models\\Category::all()->random()->id);\n $p->tags()->attach(\\App\\Models\\Tag::all()->random()->id);\n });\n $u->clients()->saveMany(factory(\\App\\Models\\Client::class,50)->make());\n });\n }", "title": "" }, { "docid": "045f6aee16de66fd4cb5b31782c1124f", "score": "0.7708508", "text": "public function run()\n {\n Model::unguard();\n // $this->call('UsersTableSeeder');\n factory('App\\PageType', 2)->create();\n factory('App\\OrderStatus', 5)->create();\n factory('App\\Category', 10)->create();\n factory('App\\CompensationPlan', 5)->create();\n factory('App\\Field', 30)->create();\n factory('App\\FindingLine', 30)->create();\n factory('App\\Heading', 200)->create();\n factory('App\\LocalForeign', 5)->create();\n factory('App\\AdType', 30)->create();\n factory('App\\PayPlan', 10)->create();\n factory('App\\PrimaryBook', 50)->create();\n factory('App\\SalesRep', 20)->create();\n factory('App\\SourceBook', 250)->create();\n factory('App\\Udac', 250)->create();\n factory('App\\Customer', 500)->create();\n factory('App\\Order', 500)->create();\n factory('App\\OrderLine', 2000)->create();\n Model::reguard();\n }", "title": "" }, { "docid": "b9ff2268495aff5817159bd76ba8023c", "score": "0.7705018", "text": "public function run()\n {\n //adds the category lists\n $this->call(CategorySeeder::class);\n\n //adds 15 companies (entidades) for testing\n factory(\\App\\Company::class, 15)->create();\n\n //adds 3 accounts for testing\n factory(\\App\\Account::class, 3)->create();\n\n //adds 50 transactions for testing\n factory(\\App\\Transaction::class, 100)->create();\n }", "title": "" }, { "docid": "749d8b2282722f907beee85a97ad43ae", "score": "0.7703396", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n $user = factory(User::class)->create([\n 'name' => 'Amitav Office',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n 'active' => 1,\n ]);\n\n $this->createComments($user->id, 10);\n\n $user = factory(User::class)->create([\n 'name' => 'Amitav Personal',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n 'active' => 1,\n ]);\n\n $this->createComments($user->id, 4);\n }", "title": "" }, { "docid": "f562a75a25e951d5d5b616b128f2a23d", "score": "0.77031195", "text": "public function run()\n { \n \n // $this->call(UsersTableSeeder::class);\n\n // temporarily disables mass assignment protection for our tables, needed to seed from .sql files.\n \tEloquent::unguard();\n\n \t// seed the locations table\n \t$locations_path = 'sql/locations.sql';\n \tDB::unprepared(file_get_contents($locations_path));\n $this->command->info('Locations table seeded!');\n\n // seed the happy_hours table\n $happy_hours_path = 'sql/happy_hours.sql';\n DB::unprepared(file_get_contents($happy_hours_path));\n $this->command->info('Happy Hours table seeded!');\n\n // seed the roles table.\n $roles_path = 'sql/roles.sql';\n DB::unprepared(file_get_contents($roles_path));\n $this->command->info('Roles table seeded!');\n }", "title": "" }, { "docid": "11f6e7c2dabe7122d9342081e225136f", "score": "0.7699845", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(CategoriaSeeder::class);\n $this->call(InvitadoSeeder::class);\n $this->call(RegaloSeeder::class);\n $this->call(UserSeeder::class);\n Evento::factory(50)->create();\n $this->call(RegistroSeeder::class);\n }", "title": "" }, { "docid": "7ccfa8092296c64ec8e74b65a7ffadc8", "score": "0.7695215", "text": "public function run()\n {\n DB::table('users')->truncate();\n DB::table('suppliers')->truncate();\n DB::table('categories')->truncate();\n DB::table('vendors')->truncate();\n DB::table('products')->truncate();\n\n // $this->call(UsersTableSeeder::class);\n factory(Supplier::class, 50)->create();\n factory(Category::class, 20)->create();\n factory(User::class, 50)->create();\n factory(Vendor::class, 50)->create()->each(static function($v) {\n $v->products()->saveMany(factory(Product::class, rand(1,10))->make());\n });\n }", "title": "" }, { "docid": "acca81c2cdc382edc11610c07dd17bdb", "score": "0.7694645", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n \n\n\n DB::table('categories')->truncate(); \n DB::table('categories')->insert(\n ['name' => 'Clothing'],\n );\n DB::table('categories')->insert(\n ['name' => 'Footwear'],\n );\n DB::table('categories')->insert(\n ['name' => 'Beauty'],\n );\n DB::table('categories')->insert(\n ['name' => 'Cars'],\n );\n DB::table('categories')->insert(\n ['name' => 'Mobile technology'],\n );\n DB::table('categories')->insert(\n ['name' => 'Animals'],\n );\n DB::table('categories')->insert(\n ['name' => 'Sports'],\n ); \n DB::table('categories')->insert(\n ['name' => 'Technology'],\n ); \n DB::table('categories')->insert(\n ['name' => 'Specify'],\n );\n\n\n \n \t \n }", "title": "" }, { "docid": "0d3fa3d1d24b4594f3e479d62e2be438", "score": "0.76877815", "text": "public function run()\n {\n //Static seed for Categories table\n\n Category::create(\n [\n 'name' => 'Controllo Access',\n 'description' => 'Sistemi di controlo accessi integrati'\n ]);\n Category::create(\n [\n 'name' => 'TVCC',\n 'description' => 'Realizzaione sistemi di TVCC'\n ]);\n Category::create(\n [\n 'name' => 'Fornitura e configurazione',\n 'description' => 'Fornitura di apparati configurati'\n ]);\n Category::create(\n [\n 'name' => 'Consulenza',\n 'description' => 'Consulenza Tecnica'\n ]);\n }", "title": "" }, { "docid": "b87cc0dffbf57617ce6dfdb861f468e0", "score": "0.7686323", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n //Desativo as Foregn Keys\n DB::statement('SET FOREIGN_KEY_CHECKS = 0;');\n\n //Executo as factories\n dump(factory(\"App\\\\Models\\\\Aluguel\", 2)->create()->toJson());\n dump(factory(\"App\\\\Models\\\\Ator\", 2)->create()->toJson());\n dump(factory(\"App\\\\Models\\\\Categorium\", 2)->create()->toJson());\n dump(factory(\"App\\\\Models\\\\Cidade\", 2)->create()->toJson());\n dump(factory(\"App\\\\Models\\\\Cliente\", 2)->create()->toJson());\n dump(factory(\"App\\\\Models\\\\Endereco\", 2)->create()->toJson());\n dump(factory(\"App\\\\Models\\\\Filme\", 2)->create()->toJson());\n dump(factory(\"App\\\\Models\\\\FilmeAtor\", 2)->create()->toJson());\n dump(factory(\"App\\\\Models\\\\FilmeCategorium\", 2)->create()->toJson());\n dump(factory(\"App\\\\Models\\\\FilmeTexto\", 2)->create()->toJson());\n dump(factory(\"App\\\\Models\\\\Funcionario\", 2)->create()->toJson());\n dump(factory(\"App\\\\Models\\\\Idioma\", 2)->create()->toJson());\n dump(factory(\"App\\\\Models\\\\Inventario\", 2)->create()->toJson());\n dump(factory(\"App\\\\Models\\\\Loja\", 2)->create()->toJson());\n dump(factory(\"App\\\\Models\\\\Pagamento\", 2)->create()->toJson());\n dump(factory(\"App\\\\Models\\\\Pai\", 2)->create()->toJson());\n\n //Ativo as Foregn Keys\n DB::statement('SET FOREIGN_KEY_CHECKS = 1;');\n }", "title": "" }, { "docid": "ad87f4a74146c171f1e42a1d771bd24e", "score": "0.76850647", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\ProductCategory::class, 10)->create();\n factory(App\\ProductSize::class, 10)->create();\n factory(App\\ProductColor::class, 10)->create();\n factory(App\\Product::class, 50)->create()->each(function($product) {\n $product->images()->saveMany(factory(App\\ProductImage::class, 5)->make());\n });\n }", "title": "" }, { "docid": "068a939918fda33f9082cfedcea0988f", "score": "0.7684781", "text": "public function run()\n {\n $faker = app(Faker\\Generator::class);\n\n $models = factory(Model::class )->times(self::GENERATE_NUMBER)->make()->each(function ($model){\n $model->mmid = generate_mmid();\n $model->price = rand(1000 , 9999) / 100;\n $model->download = rand(10 , 999);\n $model->fav = rand(10 , 999);\n $model->view = rand(10 , 999);\n $model->polygons = rand(10 , 999);\n $model->vertices = rand(10 , 999);\n $model->textures = mt_rand(1,2);\n $model->materials = mt_rand(1,2);\n $model->rigged = mt_rand(1,2);\n $model->animated = mt_rand(1,2);\n $model->printable_ready_3d = mt_rand(1,2);\n $model->game_ready = mt_rand(1,2);\n $model->uv_mapped = mt_rand(1,2);\n $model->created_at = \\Carbon\\Carbon::now();\n $model->updated_at = \\Carbon\\Carbon::now();\n\n });\n\n Model::insert($models->toArray());\n }", "title": "" }, { "docid": "bdf30ecf76a15345de09c1ece359c2df", "score": "0.76804036", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(Desigination::class, 5)->create();\n factory(Department::class, 5)->create();\n factory(User::class, 10)->create();\n }", "title": "" }, { "docid": "b31fbf2926f8429938cfe290400a6c2f", "score": "0.7674838", "text": "public function run()\n {\n\n Storage::deleteDirectory('menu');\n Storage::makeDirectory('menu');\n\n Category::factory(5)->create();\n $this->call(UserSeeder::class);\n Client::factory(10)->create();\n Role::factory(8)->create();\n State::factory(9)->create();\n $this->call(MenuSeeder::class);\n $this->call(OrderSeeder::class);\n }", "title": "" }, { "docid": "07ea31818e19b1faf98dd1b38d81ebcb", "score": "0.7672805", "text": "public function run()\n {\n Candidate::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 Candidate::create([\n 'firstName' => $faker->firstName,\n 'lastName' => $faker->lastName,\n 'phone' => $faker->phoneNumber,\n 'email'=> $faker->email,\n 'linkCv' => $faker->url,\n 'origin' => rand(1,3),\n 'position'=> rand(1,3),\n 'status'=> rand(0,1),\n ]);\n }\n }", "title": "" }, { "docid": "6b5f957c69605b7e58e0f80311a997a8", "score": "0.7667893", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n $animals = [];\n for ($i = 0; $i < 20; $i++) {\n $animals[] = [\n 'name' => $faker->firstName,\n 'species' => $faker->randomElement($array = array (1, 2)),\n 'breed' => $faker->lastName,\n 'sex' => $faker->randomElement($array = array (1, 2)),\n 'age' => $faker->randomNumber(2),\n 'notes' => $faker->sentence,\n 'contacts' => $faker->phoneNumber,\n 'main_foto' => $faker->imageUrl(500, 500, 'cats'),\n 'published' => 1,\n ];\n }\n DB::table('animals')->insert($animals);\n }", "title": "" }, { "docid": "7c9bdd789d5f65269e40b2e2f526a8ab", "score": "0.7663764", "text": "public function run()\n {\n // $this->call(RolesAndPermissionsSeeder::class);\n // factory(App\\Model\\Place::class, 15)->create();\n // factory(App\\Model\\Scenic_Culture::class, 30)->create();\n // factory(App\\Model\\Promotion::class, 20)->create();\n // factory(App\\Model\\TourGuider::class, 30)->create();\n // factory(App\\Model\\Schedule::class, 5)->create();\n // factory(App\\Model\\Review::class, 30)->create();\n factory(App\\Model\\News::class, 15)->create();\n // factory(App\\Model\\Tour::class, 15)->create();\n\n }", "title": "" }, { "docid": "1a1406408dd87b056312265f6b8605cc", "score": "0.7663735", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //\n\n// factory(App\\User::class, 80)->create();\n factory(App\\Client::class, 5)->create();\n factory(App\\Contact::class, 20)->create()->each(function ($contact) {\n App\\Client::all()->random()->contacts()->attach($contact);\n });\n factory(App\\Task::class, 5)->create();\n factory(App\\BillablePurchaseOrder::class, 20)->create();\n factory(App\\NonBillablePurchaseOrder::class, 20)->create();\n // factory(App\\Category::class, 8)->create();\n // factory(App\\Dispatch::class, 500)->create();\n // factory(App\\Item::class, 1000)->create()->each(function ($item) {\n // App\\Dispatch::dispatch()->get()->random()->items()->attach($item);\n // });\n }", "title": "" }, { "docid": "dafd840dc1f11c0cbdd36e194644c7a8", "score": "0.7662661", "text": "public function run()\n {\n //$this->call('UsersTableSeeder');\n $faker = Faker\\Factory::create();\n\n for( $i = 0; $i < 10; $i++ ) {\n \tDB::table('books')->insert([\n\t 'title' => $faker->title,\n\t 'author' => $faker->name,\n\t 'isbn' => $faker->isbn10,\n\t ]);\n }\n }", "title": "" }, { "docid": "831749eecbd9350d2739ac1b2536d247", "score": "0.76618975", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Blog::truncate();\n Category::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $categories = ['Pendidikan','Pengetahuan', 'Sosial','Umum'];\n foreach($categories as $cat){\n Category::create(['name'=>$cat]);\n }\n\n $faker = Faker::create('id_ID');\n $category_id = Category::all()->pluck('id');\n $user_id = User::all()->pluck('id');\n for($i=0;$i<15;$i++){\n Blog::create([\n 'category_id'=>$category_id->random(),\n 'title'=>$faker->sentence(10),\n 'banner'=>'banner'.rand(1,5).'.png',\n 'content'=>implode('<br><br>',$faker->paragraphs),\n 'user_id'=>$user_id->random(),\n 'status'=>'accepted'\n ]);\n }\n }", "title": "" }, { "docid": "0969356d2e9fdf8b6e6080a629d07215", "score": "0.7657977", "text": "public function run()\n {\n $this->call([\n RolesSeeder::class,\n CategoriesSeeder::class,\n FilesSeeder::class\n ]);\n Country::factory()->count(10)->create();\n User::factory()->count(10)->create();\n Category::factory()->count(20)->create();\n Product::factory()->hasAttached(File::factory()->count(5)->create(),[], 'images')->count(30)->create();\n Order::factory()->has(Product::factory()->count(2))->count(20)->create();\n Newsletter::factory()->count(12)->create();\n Promotion::factory()->has(Product::factory()->count(2));\n }", "title": "" }, { "docid": "6a627f470c7a9c5cbcb294efa94e3dbe", "score": "0.76559", "text": "public function run()\n {\n //factory(App\\Book::class, 200)->create();\n $faker = Faker::create();\n \n foreach(range(1, 200) as $x)\n {\n \t$book = Book::create([\n \t\t'name' => $faker->name,\n \t\t'author' => $faker->name,\n \t\t'publishedDate' => $faker->date,\n \t]);\n\n \tforeach(range(1, mt_rand(2, 4)) as $y)\n \t{\n \t\t$book->categories()->attach(Category::all()->random()->id);\n \t}\n }\n }", "title": "" }, { "docid": "05177be6524fe4d70cf88eb80b07f0f9", "score": "0.76558113", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionTableSeeder::class);\n \n $this->call(CreateAdminUserSeeder::class);\n\n \n factory(App\\User::class,1)->create();\n factory(App\\Models\\Category::class,1)->create();\n factory(App\\Models\\Brand::class,1)->create();\n factory(App\\Models\\Subcategory::class,1)->create();\n factory(App\\Models\\Product::class,10)->create();\n factory(App\\Models\\Color::class,1)->create();\n factory(App\\Models\\Size::class,1)->create();\n }", "title": "" }, { "docid": "b07e760db9234bd6822f6d81a39f753f", "score": "0.76546866", "text": "public function run()\n {\n $this->seeds([\n KlasifikasiPenyakit::class => ['master/penyakit/klasifikasi_penyakit.csv', 22],\n KelompokPenyakit::class => ['master/penyakit/kelompok_penyakit.csv', 537],\n Penyakit::class => ['master/penyakit/penyakit.csv', 13309],\n ]);\n }", "title": "" }, { "docid": "7faf74d1087f03f60414bc0fbbc49004", "score": "0.76546746", "text": "public function run()\n {\n //\n\n// Students::truncate();\n\n // Initialize the Faker package. We can use several different locales for it, so\n // let's use the german locale to play with it.\n $faker = \\Faker\\Factory::create('de_DE');\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Students::create([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'registration_number' => $faker->numberBetween(0, 99999),\n 'starting_course' => ( $faker->numberBetween(0, 1) == 0 ) ? 'MPP' : 'FPP'\n ]);\n }\n }", "title": "" }, { "docid": "9a0aab2ba333b8672b30964e15cc6493", "score": "0.76514786", "text": "public function run()\n {\n //使用DB方式\n /*DB::table('users')->insert([\n 'name' => str_random(10),\n 'email' => str_random(10).'@gmail.com',\n 'password' => bcrypt('secret'),\n ]);*/\n\n //使用模型工厂\n /*factory(App\\Model\\Role::class, 50)->create()->each(function ($u) {\n $u->posts()->save(factory(App\\Post::class)->make()); //模型关联插入\n });*/\n\n factory(App\\Model\\Role::class, 5)->create();\n //执行命令 php artisan db:seed --class=RolesSeeder\n }", "title": "" }, { "docid": "05857a6ff127b2c1e1f9f0bcb8aa242c", "score": "0.76498", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n ['name' => 'admin',\n 'email' => '[email protected]',\n 'password' => 'admin'],\n ['name' => 'youke',\n 'email' => '[email protected]',\n 'password' => 'youke'],\n ]);\n\n DB::table('menus')->insert([\n ['name'=>'skill','url'=>'/admin'],\n ['name'=>'portfolio','url'=>'/admin'],\n ['name'=>'education','url'=>'/admin'],\n ['name'=>'work','url'=>'/admin'],\n ['name'=>'菜单列表','url'=>'/admin/menu/index'],\n ]);\n }", "title": "" }, { "docid": "e4f4934df5701d0ca97044ef7d5c2079", "score": "0.7649058", "text": "public function run()\n {\n // clear our database ------------------------------------------\n DB::table('users')->delete();\n \n\n $first_user = User::create(array(\n 'name' => 'Muhammad Nauman',\n 'email' => '[email protected]',\n 'password' => bcrypt('12345678'),\n ));\n\n \n \n $this->command->info('Users are seeded!');\n \n // now seed the departments\n DB::table('department')->delete();\n \n\n $first_dpt = Department::create(array(\n 'department_name' => 'Computer Science',\n 'contact' => '0313',\n 'status' => 'Active',\n 'hod_id' => $first_user->id,\n 'entered_id' => $first_user->id,\n ));\n \n $this->command->info('Department are seeded!');\n \n // now seed the programs\n DB::table('programs_offered')->delete();\n \n\n $first_program = ProgramOffered::create(array(\n 'program_name' => 'BSCS',\n 'duration' => '4',\n 'code' =>'BS',\n 'status' => 'Active',\n 'incharge_id' => $first_user->id,\n 'entered_id' => $first_user->id,\n 'department_id' => $first_dpt->id,\n ));\n $this->command->info('Program are seeded!');\n \n }", "title": "" }, { "docid": "d7ebe12cdf5432aa34add67af7be50b3", "score": "0.76487887", "text": "public function run()\n {\n $faker = \\Faker\\Factory::create();\n $faker->addProvider(new \\Bezhanov\\Faker\\Provider\\Species($faker));\n foreach(range(0,7) as $i){\n DB::table('plants')->insert([\n 'name' => $faker->plant,\n 'description' => $faker->sentence(20,true),\n 'price' => $faker->randomNumber(6),\n 'rate' => $faker->randomFloat(NULL,0,5),\n 'types' => 'popular',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n }\n }", "title": "" }, { "docid": "c73b07e08ed90eb5b38fd5ee302292bc", "score": "0.7647306", "text": "public function run()\n {\n /*\n * Calling the seeds in the following order ensures that foreign key \n * constraints are not violated\n */\n factory(App\\Hostel::class, 1)->create(); //add 10 hostels\n factory(App\\AuthorizationLevel::class, 1)->create(); //add 3 auth levels\n DB::table('complaints_status')->insert(array(\n array('name'=>'submitted','message'=>'Your complaint has been submitted','is_viewable'=>true, 'is_editable'=>true, 'is_creatable'=>true, 'is_deletable'=>true),\n array('name'=>'in progress','message'=>'Your complaint is in progress','is_viewable'=>true, 'is_editable'=>false, 'is_creatable'=>false, 'is_deletable'=>false),\n array('name'=>'completed','message'=>'Your complaint has been completed','is_viewable'=>true, 'is_editable'=>false, 'is_creatable'=>false, 'is_deletable'=>false))); \n \n /*Submitted, In progress, completed*/\n }", "title": "" }, { "docid": "18fd1caf8ca6a7017a4b6b4067046cb1", "score": "0.7647273", "text": "public function run()\n {\n $this->call(AdminSeeder::class);\n $this->call(SuperAdminRoleseeder::class);\n $this->call(ProductCategorySeeder::class);\n $this->call(ProductColorSeeder::class);\n $this->call(ProductTagSeeder::class);\n $this->call(ProductSeeder::class);\n $this->call(ProductSizeSeeder::class);\n\n factory(\\App\\User::class,10)->create();\n factory(\\App\\Tag::class,5)->create();\n factory(\\App\\Post::class,10)->create()->each(function ($post){\n return $post->like()->save(factory(\\App\\Like::class)->make());\n });\n factory(\\App\\Comment::class,50)->create();\n\n }", "title": "" }, { "docid": "e962f279a1dbddfaa2db67cf48a15f39", "score": "0.76464486", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n Role::create([\"name\" => \"Administrador\"]);\n Role::create([\"name\" => \"Común\"]);\n User::create([\n \"name\" => \"4dm1n\",\n \"email\" => \"[email protected]\",\n \"role_id\" => 1,\n \"password\" => bcrypt(\"Pollo\")\n ]);\n }", "title": "" }, { "docid": "3754b8504d32198111105ff3083d9046", "score": "0.76400363", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::table('grades')->truncate();\n DB::table('teachers')->truncate();\n DB::table('lessons')->truncate();\n DB::table('students')->truncate();\n DB::table('marks')->truncate();\n DB::table('users')->truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n Grade::factory(5)->create();\n Teacher::factory(5)->create();\n Lesson::factory(4)->create();\n Student::factory(10)->create();\n Mark::factory(20)->create();\n\n User::factory(3)->state(new Sequence(\n [\n 'name' => 'Nicolas',\n 'email' => '[email protected]',\n ],\n [\n 'name' => 'Alexis',\n 'email' => '[email protected]',\n ],\n [\n 'name' => 'Karine',\n 'email' => '[email protected]',\n ],\n ))->create();\n }", "title": "" }, { "docid": "8e6adf883c596121b0906ea06e5abf6c", "score": "0.76395786", "text": "public function run()\n {\n $faker = Faker::create();\n $categories = Category::pluck('id')->all();\n $roles = Role::pluck('id')->all();\n foreach (range(1,20) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->safeEmail,\n 'image' => $faker->imageUrl($width = 640, $height = 480),\n 'biography' => $faker->paragraph,\n 'password' => $faker->password,\n 'category_id' => $faker->randomElement($categories),\n 'role_id' => $faker->randomElement($roles),\n 'birth' => $faker->date,\n 'created_at' => $faker->dateTime($max = 'now'),\n 'updated_at' => $faker->dateTime($max = 'now'),\n ]);\n }\n }", "title": "" }, { "docid": "b063def35fe79f7a0710248af466f402", "score": "0.76395", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n\n $article = DB::table('articles');\n\n $article->truncate();\n\n for($i = 0; $i < 100; $i++){\n $title = $faker->sentence;\n\n $article->insert([\n 'title' => $title,\n 'slug' => str_slug($title),\n 'short_description' => $faker->realText(500),\n 'description' => $faker->realText(10000),\n 'created_at' => $faker->dateTimeBetween(),\n 'updated_at' => $faker->dateTimeBetween(),\n ]);\n }\n }", "title": "" }, { "docid": "b3e9a647fe40c3c7848b4498aaefaeb3", "score": "0.76392335", "text": "public function run()\n {\n $faker = Faker\\Factory::create('ja_JP');\n DB::table('MST_SALES_DETAILS')->delete();\n $data = [];\n foreach (range(1, 100) as $value) {\n foreach (range(1, 5) as $value_v) {\n $data[] = [\n 'sales_id' => $value,\n 'product_id' => $value_v,\n 'price' => 400\n ];\n }\n }\n DB::table('MST_SALES_DETAILS')->insert($data);\n }", "title": "" }, { "docid": "3b722497c87d9f24b84a12a29c4abd9f", "score": "0.76390076", "text": "public function run()\n {\n\n // $this->call(UserTableSeeder::class);\n\n // App\\User::create([\n // 'name'=>'tester',\n // 'email'=>'[email protected]',\n // 'password'=>bcrypt('secret')\n // ]);\n\n $severities = [\n [\n 'rating' => 1,\n 'description' => 'easy walk',\n ],\n [\n 'rating' => 2,\n 'description' => 'moderate walk',\n ],\n [\n 'rating' => 3,\n 'description' => 'strenuous walk',\n ],\n [\n 'rating' => 4,\n 'description' => 'very strenuous walk',\n ]\n ];\n\n $exposures = [\n [\n 'rating' => '1',\n 'description' => 'no exposure to heights',\n ],\n [\n 'rating' => '2',\n 'description' => 'mild exposure to heights',\n ],\n [\n 'rating' => '3',\n 'description' => 'moderate exposure to heights',\n ],\n [\n 'rating' => '4',\n 'description' => 'extreme exposure to heights',\n ]\n ];\n\n DB::table('severities')->delete();\n foreach ($severities as $severity) {\n DB::table('severities')->insert($severity);\n }\n\n DB::table('exposures')->delete();\n foreach ($exposures as $exposure) {\n DB::table('exposures')->insert($exposure);\n }\n\n if (!$severities = DB::table('severities')->select('id')->get()) {\n exit('There are no severities in the db.');\n }\n\n if (!$exposures = DB::table('exposures')->select('id')->get()) {\n exit('There are no exposures in the db.');\n }\n\n $severity_ids = [];\n foreach ($severities as $s) {\n $severity_ids[] = $s->id;\n }\n\n $exposure_ids = [];\n foreach ($exposures as $e) {\n $exposure_ids[] = $e->id;\n }\n\n $trails = [\n [\n 'name' => 'Skeleton Gorge',\n 'description' => 'strenuous shady trail, that leads to a dam',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n 'created_at' => '2015-01-09 22:14:06',\n ],\n [\n 'name' => 'Contour Path',\n 'description' => 'very long level path that goes almost around the table mountain.',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n 'created_at' => '2016-07-10 10:16:11',\n ],\n [\n 'name' => 'Pipe Track',\n 'description' => 'easy trail with historical water pipes.',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n 'created_at' => '2015-01-06 13:04:06',\n ],\n [\n 'name' => 'platteklip gorge',\n 'description' => 'steep trail up the face of table mountain.',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n 'created_at' => '2016-02-28 16:10:06',\n ],\n [\n 'name' => 'kasteels poort',\n 'description' => 'goes from the pipe track up to the twelve apostles',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n ],\n [\n 'name' => 'table mountain road',\n 'description' => 'used to access lower parts of the mountain by car',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n ],\n [\n 'name' => 'tokai forest',\n 'description' => 'walk under the trees',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n ],\n [\n 'name' => 'muizenberg peak',\n 'description' => 'ajofda owerij pasofk ewfjolefakfdj oa fej, asldfj',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n 'created_at' => '2015-05-22 19:01:38',\n ],\n [\n 'name' => 'sIlvermines',\n 'description' => 'o accessused t plowerf the mountain by carts oar',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n ],\n [\n 'name' => 'newlands Ravine',\n 'description' => 'used to access lower parts of the mountain by car',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n 'created_at' => '2014-12-31 23:59:59',\n ],\n [\n 'name' => 'the saddle',\n 'description' => 'used to access lower parts of the mountain by car',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n 'created_at' => '2015-06-10 00:14:06',\n ],\n [\n 'name' => 'cable car',\n 'description' => 'fsadofewm fpaofk epwfkpwef faehg kuylo ',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n ],\n [\n 'name' => 'hely hutchinson dam',\n 'description' => 'used to access lower parts of the mountain by car',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n ],\n [\n 'name' => 'old dogs trail',\n 'description' => 'used to access lower parts of the mountain by car',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n 'created_at' => '2016-10-16 15:14:06',\n ],\n [\n 'name' => '1234 32432 afasdfsa',\n 'description' => 'used to access lower parts of the mountain by car',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n 'created_at' => '2015-08-19 22:14:06',\n ],\n [\n 'name' => 'pfasdf 99',\n 'description' => 'used to access lower parts of the mountain by car',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n ],\n ];\n\n DB::table('trails')->delete();\n foreach ($trails as $trail) {\n DB::table('trails')->insert($trail);\n }\n\n $trails = DB::table('trails')->select('id')->get();\n\n $trail_ids = [];\n foreach ($trails as $trail) {\n $trail_ids[] = $trail->id;\n }\n\n $count = count($trail_ids);\n\n $hikes = [\n [\n 'title' => 'newlands forest to the blockhouse',\n 'description' => 'Hike from newlands forest to the King\\'s Blockhouse.',\n 'severity_id' => $severity_ids[rand(0,3)],\n 'exposure_id' => $exposure_ids[rand(0,3)],\n 'slug' => str_slug('newlands forest to the blockhouse'),\n ],\n [\n 'title' => 'cecilia forest to hely hutchinson dam via skeleton gorge',\n 'description' => 'A steep climb up skeleton gorge to hely hutchinson dam and back down via nursery ravine',\n 'severity_id' => $severity_ids[rand(0,3)],\n 'exposure_id' => $exposure_ids[rand(0,3)],\n 'slug' => str_slug('cecilia forest to hely hutchinson dam via skeleton gorge'),\n ],\n [\n 'title' => 'Rhodes Memorial to Woodstock Cave',\n 'description' => 'A nice hike from Rhodes Mem to Woodstock Cave.',\n 'severity_id' => $severity_ids[rand(0,3)],\n 'exposure_id' => $exposure_ids[rand(0,3)],\n 'slug' => str_slug('Rhodes Memorial to Woodstock Cave'),\n ],\n [\n 'title' => 'Twelve Apostles',\n 'description' => 'A very long hike.',\n 'severity_id' => $severity_ids[rand(0,3)],\n 'exposure_id' => $exposure_ids[rand(0,3)],\n 'slug' => str_slug('Twelve Apostles'),\n ],\n ];\n\n DB::table('hikes')->delete();\n DB::table('hike_trail')->delete();\n foreach ($hikes as $hike) {\n $id = DB::table('hikes')->insertGetId($hike);\n $number_of_trails_to_add = rand(0, $count);\n\n $i = 0;\n $used_trail_ids = [];\n while($number_of_trails_to_add >= $i) {\n\n while(in_array($trail_id = rand(0, ($count - 1)), $used_trail_ids)) {\n continue;\n }\n\n $used_trail_ids[] = $trail_id;\n $hike_trail = [\n 'hike_id' => $id,\n 'trail_id' => $trail_ids[$trail_id],\n ];\n DB::table('hike_trail')->insert($hike_trail);\n $i++;\n }\n\n }\n\n\n }", "title": "" }, { "docid": "154cba18dfdeb8c4ad5a965ced753dd9", "score": "0.76387894", "text": "public function run()\n {\n $faker = Faker::create();\n foreach (range(1,25) as $value) {\n DB::table('posts')->insert([\n 'title' => $faker->title(),\n 'image' => $faker->imageUrl('public/storage/images', 640, 480, null, false),\n 'description' => $faker->text(),\n 'category_id' => rand(1,5),\n 'user_id' => rand(1,15),\n 'created_at' => now(),\n 'updated_at' => now(),\n ]);\n }\n }", "title": "" }, { "docid": "2484f545498eece99a69d15fb3058fc2", "score": "0.76387566", "text": "public function run()\n {\n // Create fixed statuses\n foreach (array('hotovo', 'rozpracované', 'v poradí') as $status) {\n DB::table('statuses')->insert([\n 'name' => $status,\n ]);\n };\n\n $this->call([\n UsersTableSeeder::class,\n GrantsTableSeeder::class,\n SolventsTableSeeder::class,\n SpectrometersTableSeeder::class,\n LabsTableSeeder::class,\n AnalysesTableSeeder::class,\n SamplesTableSeeder::class,\n ]);\n }", "title": "" }, { "docid": "db33a8329f4133fb77121f041bfcf078", "score": "0.7637611", "text": "public function run()\n\t{\n\t\tDB::table('users')->delete();\n\n\t\t$faker = Faker\\Factory::create();\n\t\t\n\t\t$seeds = array(\n\t\t\tarray(\n\t\t\t\t'id' => 1,\n\t\t\t\t'name' => 'admin',\n\t\t\t\t'slug' => 'admin',\n\t\t\t\t'first_name' => 'John',\n\t\t\t\t'last_name' => 'Doe',\n\t\t\t\t'location' => 'Anytown, USA',\n\t\t\t\t'email' => '[email protected]',\n\t\t\t\t'password' => Hash::make('password'),\n\t\t\t\t'admin' => true\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id' => 2,\n\t\t\t\t'name' => 'username',\n\t\t\t\t'slug' => 'username',\n\t\t\t\t'first_name' => $faker->firstName,\n\t\t\t\t'last_name' => $faker->lastName,\n\t\t\t\t'location' => $faker->city . ', ' . $faker->country,\n\t\t\t\t'email' => '[email protected]',\n\t\t\t\t'password' => Hash::make('password'),\n\t\t\t\t'admin' => false\n\t\t\t)\n\t\t);\n\n\t\tDB::table('users')->insert($seeds);\n\n\t\t$users = factory(App\\User::class, 8)->create();\n }", "title": "" }, { "docid": "a94882201bbeb65b0ddb261fe6987a0a", "score": "0.76362485", "text": "public function run()\n { \n User::create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('admin'),\n 'role' => 2\n ]);\n User::create([\n 'name' => 'User',\n 'email' => '[email protected]',\n 'password' => Hash::make('secret'),\n 'role' => 1\n ]);\n User::create([\n 'name' => 'Infinety Admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('12345678'),\n 'role' => 1\n ]);\n // \\App\\Models\\User::factory(10)->create();\n Categorias::factory(20)->create();\n Productos::factory(100)->create();\n }", "title": "" }, { "docid": "d63961b4949c2a17bd2ffc48673c0ad3", "score": "0.763493", "text": "public function run()\n {\n factory(App\\User::class, 50)->create();\n\n factory(App\\Team::class, 10)->create();\n\n App\\Role::insert([\n ['id' => 1, 'title' => 'developer'],\n ['id' => 2, 'title' => 'junior developer'],\n ['id' => 3, 'title' => 'quality assurance'],\n ['id' => 4, 'title' => 'project manager'],\n ['id' => 5, 'title' => 'team leader']\n ]);\n }", "title": "" }, { "docid": "4ae83842aaa0c70b457171306e60ba4a", "score": "0.7630802", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $user=factory(\\App\\User::class)->create();\n factory(\\App\\Course::class,6)->create(['user_id'=>$user->id])->each(function($course){\n factory(\\App\\Episode::class,rand(5,20))->make()->each(function($episode,$key) use ($course){\n $episode->number=$key+1;\n $course->episodes()->save($episode);\n });\n });\n }", "title": "" }, { "docid": "09a6cf87bc1f7ee46aa35dd6a863c3f3", "score": "0.7628901", "text": "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n DB::table('companies')->insert([\n 'ar_name' => 'نبذة تعريفية عن الشركة',\n 'ar_profile' => 'نبذة',\n 'en_name' => 'A brief about the company',\n 'en_profile' => 'Details',\n 'projectSuccessful' => '1',\n 'yearsOfExperienced' => '2',\n 'professionalExpert' => '3',\n 'happyCustomers' => '4',\n ]);\n factory(\\App\\User::class, 1)->create();\n factory(\\App\\Account::class, 1)->create();\n factory(\\App\\Affair::class, 1)->create();\n factory(\\App\\System::class, 1)->create();\n factory(\\App\\Pharmacy::class, 1)->create();\n factory(\\App\\Support::class, 1)->create();\n // $this->call(CompaniesSeeder::class);\n }", "title": "" }, { "docid": "576a34543681e3fe684e1e40febacb80", "score": "0.7628569", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n // $user = \\App\\Models\\User::factory()\n // ->has(\\App\\Models\\Article::factory()->count(10))\n // ->create();\n\n $posts = Article::factory()\n ->count(10)\n ->for(User::factory()->state([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('12345678'),\n ]))\n ->create();\n\n // \\App\\Models\\Article::factory(10)->create();\n \\App\\Models\\Tag::factory(20)->create();\n $tags = Tag::all();\n Article::all()->each(function ($article) use ($tags) { \n $article->tags()->attach(\n $tags->random(rand(1, 3))->pluck('id')->toArray()); \n });\n }", "title": "" }, { "docid": "d2507ab89d2d83f52c957a1a22b5f496", "score": "0.76283425", "text": "public function run()\n {\n $faker = Factory::create();\n\n GrupoEquipo::truncate();\n Equipo::truncate();\n\n foreach(range(1, 5) as $i) {\n GrupoEquipo::create([\n 'zona_id' => $i,\n 'name' => $faker->unique()->name,\n 'description' => $faker->paragraph\n ]);\n foreach(range(1, 10) as $i) {\n Equipo::create([\n 'grupo_equipo_id' => mt_rand(1, 5),\n 'name' => $faker->unique()->name,\n 'marca' => $faker->name,\n 'tipo' => $faker->name,\n 'tarifa' => $faker->randomFloat($nbMaxDecimals = 5, $min = 0, $max = 400)\n ]);\n }\n }\n }", "title": "" }, { "docid": "0ec002cddee037e0013565674e9189ca", "score": "0.76273686", "text": "public function run()\n {\n $this->call([\n BlogStatusSeeder::class,\n CategorySeeder::class,\n SiteConfigSeeder::class,\n ]);\n User::factory(1)->create();\n\n Blog::factory(100)->create();\n\n BlogView::factory(200)->create();\n\n BlogComment::factory(200)->create();\n\n ContactMessage::factory(15)->create();\n }", "title": "" }, { "docid": "3c41de562e9a6d240427b1bd3d7ddd73", "score": "0.76248515", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Master User',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n ]);\n\n $faker = Faker\\Factory::create();\n\n \tfor ($i=0; $i < 9; $i++) { \n\t \tDB::table('posts')->insert([\n\t 'title' => $faker->sentence($nbWords = 4, $variableNbWords = true) , \n\t 'body' => $faker->text,\n\t 'created_at' => date(\"Y-m-d h:i:s\"),\n\t 'updated_at' => date(\"Y-m-d h:i:s\"),\n\t 'author' => 'Master User',\n\t 'thumbnail' => 'blog_pic.png',\n\t 'user_id' => 1\n\t ]);\n\n \t}\n }", "title": "" }, { "docid": "fb3e6d03992e991fc3469db9d336e1d0", "score": "0.7623802", "text": "public function run()\n {\n $faker = Factory::create();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Fruit::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n for ($i = 1; $i <= 20; $i++) {\n Fruit::create([\n 'nom' => $faker->name,\n 'pays_origin' => $faker->name,\n 'price' => mt_rand(1, 1000)\n ]);\n }\n }", "title": "" } ]
ebca8d530b22e139effcf6a7b36a2031
User comments pagination slug of the plugin
[ { "docid": "26eddddbc6e9f3e6730a60f5d01489a3", "score": "0.0", "text": "function wct_cpage_slug_setting_callback() {\n\t?>\n\n\t<input name=\"_wc_talks_cpage_slug\" id=\"_wc_talks_cpage_slug\" type=\"text\" class=\"regular-text code\" value=\"<?php echo esc_attr( wct_cpage_slug() ); ?>\" />\n\t<p class=\"description\"><?php printf( esc_html__( '&#39;%s&#39; slug cannot be used here.', 'wordcamp-talks' ), wct_paged_slug() ); ?></p>\n\n\t<?php\n}", "title": "" } ]
[ { "docid": "4db6cbacf21941ea90d5059a9395f09a", "score": "0.66497993", "text": "function wp_paginate_comments($args = false) {\n\tglobal $wp_paginate;\n\t$wp_paginate->type = 'comments';\n\treturn $wp_paginate->paginate($args);\n}", "title": "" }, { "docid": "beedd7ab0df3f028b6bcd983e500eaa3", "score": "0.6105619", "text": "function my_comment(){\n echo Modules::run('site_security/make_sure_is_user');\n $user_id= $this->session->userdata('user_id'); \n \n //pagination\n $this->load->model('mdl_comment');\n $this->load->library('pagination');\n $config['base_url'] = base_url() . 'comment/my_poll_comment/';\n $config['total_rows'] = $this->count_where('fk_user_id', $user_id);\n $config['per_page'] = 20;\n $config['num_links'] = 4; \n $config['uri_segment'] = 3; // add this line to override the default\n $this->pagination->initialize($config);\n $page = ($this->uri->segment(3)) ? $this->uri->segment(3) : 0;\n //end pagination\n $data['query'] = $this->mdl_comment->my_comment_join_question_and_user($user_id,$config['per_page'], $page);\n $data['current'] = $this->uri->segment(2);\n $data['title'] = 'List question';\n $data['view_file'] = 'list_comment'; //view file\n $data['module'] = 'comment'; //module\n $this->load->module('template');\n $this->template->dashboard($data);\n }", "title": "" }, { "docid": "4729052436d650304c50a537eca3783d", "score": "0.58533216", "text": "function paginate($args = false) {\n\t\t\tif ($this->type === 'comments' && !get_option('page_comments'))\n\t\t\t\treturn;\n\n\t\t\t$r = wp_parse_args($args, $this->options);\n\t\t\textract($r, EXTR_SKIP);\n\n\t\t\tif (!isset($page) && !isset($pages)) {\n\t\t\t\tglobal $wp_query;\n\n\t\t\t\tif ($this->type === 'posts') {\n\t\t\t\t\t$page = get_query_var('paged');\n\t\t\t\t\t$posts_per_page = intval(get_query_var('posts_per_page'));\n\t\t\t\t\t$pages = intval(ceil($wp_query->found_posts / $posts_per_page));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$page = get_query_var('cpage');\n\t\t\t\t\t$comments_per_page = get_option('comments_per_page');\n\t\t\t\t\t$pages = get_comment_pages_count();\n\t\t\t\t}\n\t\t\t\t$page = !empty($page) ? intval($page) : 1;\n\t\t\t}\n\n\t\t\t$prevlink = ($this->type === 'posts')\n\t\t\t\t? esc_url(get_pagenum_link($page - 1))\n\t\t\t\t: get_comments_pagenum_link($page - 1);\n\t\t\t$nextlink = ($this->type === 'posts')\n\t\t\t\t? esc_url(get_pagenum_link($page + 1))\n\t\t\t\t: get_comments_pagenum_link($page + 1);\n\n\t\t\t$output = stripslashes($before);\n\t\t\tif ($pages > 1) {\n\t\t\t\t$output .= sprintf('<ol class=\"wp-paginate%s\">', ($this->type === 'posts') ? '' : ' wp-paginate-comments');\n\t\t\t\tif (strlen(stripslashes($title)) > 0) {\n\t\t\t\t\t$output .= sprintf('<li><span class=\"title\">%s</span></li>', stripslashes($title));\n\t\t\t\t}\n\t\t\t\t$ellipsis = \"<li><span class='gap'>...</span></li>\";\n\n\t\t\t\tif ($page > 1 && !empty($previouspage)) {\n\t\t\t\t\t$output .= sprintf('<li><a href=\"%s\" class=\"prev\">%s</a></li>', $prevlink, stripslashes($previouspage));\n\t\t\t\t}\n\n\t\t\t\t$min_links = $range * 2 + 1;\n\t\t\t\t$block_min = min($page - $range, $pages - $min_links);\n\t\t\t\t$block_high = max($page + $range, $min_links);\n\t\t\t\t$left_gap = (($block_min - $anchor - $gap) > 0) ? true : false;\n\t\t\t\t$right_gap = (($block_high + $anchor + $gap) < $pages) ? true : false;\n\n\t\t\t\tif ($left_gap && !$right_gap) {\n\t\t\t\t\t$output .= sprintf('%s%s%s',\n\t\t\t\t\t\t$this->paginate_loop(1, $anchor),\n\t\t\t\t\t\t$ellipsis,\n\t\t\t\t\t\t$this->paginate_loop($block_min, $pages, $page)\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\telse if ($left_gap && $right_gap) {\n\t\t\t\t\t$output .= sprintf('%s%s%s%s%s',\n\t\t\t\t\t\t$this->paginate_loop(1, $anchor),\n\t\t\t\t\t\t$ellipsis,\n\t\t\t\t\t\t$this->paginate_loop($block_min, $block_high, $page),\n\t\t\t\t\t\t$ellipsis,\n\t\t\t\t\t\t$this->paginate_loop(($pages - $anchor + 1), $pages)\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\telse if ($right_gap && !$left_gap) {\n\t\t\t\t\t$output .= sprintf('%s%s%s',\n\t\t\t\t\t\t$this->paginate_loop(1, $block_high, $page),\n\t\t\t\t\t\t$ellipsis,\n\t\t\t\t\t\t$this->paginate_loop(($pages - $anchor + 1), $pages)\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$output .= $this->paginate_loop(1, $pages, $page);\n\t\t\t\t}\n\n\t\t\t\tif ($page < $pages && !empty($nextpage)) {\n\t\t\t\t\t$output .= sprintf('<li><a href=\"%s\" class=\"next\">%s</a></li>', $nextlink, stripslashes($nextpage));\n\t\t\t\t}\n\t\t\t\t$output .= \"</ol>\";\n\t\t\t}\n\t\t\t$output .= stripslashes($after);\n\n\t\t\tif ($pages > 1 || $empty) {\n\t\t\t\techo $output;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "53b86affd458a04812ae6d8807bc90cc", "score": "0.5704365", "text": "function symposium_rewrite_commenter_link ($comments, $post_ID) {\n\n\tif ( ( $profile_url = __wps__get_url('profile') ) && get_option('symposium_blogpost_rewrite_commenter_link', '') ) {\n\t\tforeach ($comments as $comment) {\n\t\t\t$comment_returned = $comment;\n\t\t\t$commenter = get_user_by('email', $comment->comment_author_email);\n\t\t\tif ( $commenter ) {\n\t\t\t\t$comment_returned->comment_author_url = $profile_url.__wps__string_query($profile_url).'uid='.$commenter->ID;\n\t\t\t}\n\t\t\t$comments_returned[] = $comment_returned;\n\t\t}\n\t\treturn $comments_returned;\n\t\n\t} else {\n\t\treturn $comments;\n\t}\n}", "title": "" }, { "docid": "676ce6e317c7995b98b6dce4d0068371", "score": "0.56762314", "text": "public function showComments()\n {\n// $comments =Comment::where ('username',$tt) ->join('posts', function ($join) {\n// $join->on('posts.id', '=', 'comments.post_id');\n// \n// })\n// ->select('comments.*', 'posts.post_id', 'images.filePath')\n// ->groupBy('posts.id')\n// ->orderBy('posts.created_at','desc')\n// ->paginate(config('comsenblog.posts_per_mainpage'));\n \n \n $tt = Auth::user()->name;\n $comments = Comment::where ('username',$tt)->orderBy('created_at', 'desc') //->simplepaginate(3);\n ->paginate(config('comsenblog.posts_per_page'));\n return view('backend.posts.showcomments', compact('comments'));\n }", "title": "" }, { "docid": "ebf3ffbdc58f7b4d12df66a751c4192f", "score": "0.56715417", "text": "function wp_dashboard_recent_comments_control() {}", "title": "" }, { "docid": "9c466fe3cf76f07a44e409d0fab8ed62", "score": "0.5662571", "text": "public function user_comments($username, $limit = 50, $page = 0)\n {\n // Page 1 is technically page zero\n if ($page == 1)\n {\n $page = 0;\n }\n\n $user = get_user($username);\n $user_id = $user->row('id');\n\n // Get all stories\n $this->data['comments'] = $this->comment_model->get_user_comments($limit, $page, $user_id);\n\n // Load the story template see: themes/zebra/views/comments.tpl\n $this->parser->parse('comments', $this->data); \n }", "title": "" }, { "docid": "32082822649aa3b417dcd8edba969ff7", "score": "0.56533647", "text": "public function index()\n {\n return Comment::paginate(5);\n }", "title": "" }, { "docid": "9845870a2910cc252659c4b1f04d6f0e", "score": "0.5641341", "text": "function author_pagination_links() {\n\t$args = array(\n\t\t'post_type' =>\t'ucl_author',\n\t\t'orderby'\t\t=>\t'title',\n\t\t'order'\t\t\t=>\t'ASC',\n\t\t'numberposts' => -1,\n\t\t'suppress_filters' => false,\n\t);\n\tadd_filter( 'posts_orderby' , 'posts_orderby_lastname' );\n\t$posts = get_posts($args);\n\tremove_filter( 'posts_orderby' , 'posts_orderby_lastname' );\n\n\t$id = get_the_ID();\n\t$i = 0;\n\tforeach($posts as $p) {\n\t\tif($id == $p->ID) break;\n\t\t$i++;\n\t}\n\n\t$n = count($posts);\n\tif($i - 1 >= 0) {\n\t\t$prev = '<div class=\"alignleft\">'\n\t\t\t. '<a href=\"' . get_permalink($posts[$i-1]->ID) . '\">'\n\t\t\t. $posts[$i-1]->post_title . '</a></div>';\n\t} else {\n\t\t$prev = '<div class=\"alignleft\">'\n\t\t\t. '<a href=\"' . get_permalink($posts[$n-1]->ID) . '\">'\n\t\t\t. $posts[$n-1]->post_title . '</a></div>';\n\t}\n\tif($i + 1 < $n) {\n\t\t$next = '<div class=\"alignright\">'\n\t\t\t. '<a href=\"' . get_permalink($posts[$i+1]->ID) . '\">'\n\t\t\t. $posts[$i+1]->post_title . '</a></div>';\n\t} else {\n\t\t$next = '<div class=\"alignright\">'\n\t\t\t. '<a href=\"' . get_permalink($posts[0]->ID) . '\">'\n\t\t\t. $posts[0]->post_title . '</a></div>';\n\t}\n\n\techo '<div class=\"blog-navigation\">' . $prev . $next . '</div>';\n}", "title": "" }, { "docid": "9329c5f155ae8c267773d93aaa015b7d", "score": "0.5571342", "text": "public function comments()\n\t{\n\t\t$url = $this -> basepath();\n\t\t$comments = \\App\\App::getInstance() -> getTable('commentsManager');\n\t\t$commentsWait = $comments -> showComments();\n\t\t$this -> page('admin/posts/comments', compact('commentsWait', 'url'));\n\t}", "title": "" }, { "docid": "8c8728a46b7f040cbf634c09e176c69e", "score": "0.55538857", "text": "function list_pings($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment;\n?>\n <li id=\"comment-<?php comment_ID(); ?>\"><i class=\"icon icon-share-alt\"></i>&nbsp;<?php comment_author_link(); ?>\n<?php \n\n}", "title": "" }, { "docid": "a35ac0b90a2b729d94a49b0f1a347a63", "score": "0.5537489", "text": "function list_pings($comment, $args, $depth) {\n\t $GLOBALS['comment'] = $comment;\n?>\n\t\t<li id=\"comment-<?php comment_ID(); ?>\"><i class=\"icon icon-share-alt\"></i>&nbsp;<?php comment_author_link(); ?>\n<?php \n\n}", "title": "" }, { "docid": "62fddc687fecb364277a3d7df375bba8", "score": "0.5526196", "text": "function wct_sanitize_comments_page_slug( $slug = '' ) {\n\tif ( $slug == wct_paged_slug() ) {\n\t\treturn 'cpage';\n\t}\n\n\treturn wct_sanitize_slug( $slug );\n}", "title": "" }, { "docid": "d954bc37a61c8b3c89ae93a7efa79254", "score": "0.55244803", "text": "function list_pings($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment;\n?>\n <li id=\"comment-<?php comment_ID(); ?>\"><i class=\"fa fa-share-alt\"></i>&nbsp;<?php comment_author_link(); ?></li>\n<?php \n}", "title": "" }, { "docid": "9efd120f207eff673f7fed674622a5b4", "score": "0.54967517", "text": "function bp_the_topic_pagination() {\n\techo bp_get_the_topic_pagination();\n}", "title": "" }, { "docid": "15e13bd19d47db74951a824bcba6d13a", "score": "0.5457926", "text": "function main_author_pagination() {\n\n\t$args = array(\n\t\t'post_type' =>\t'ucl_author',\n\t\t'orderby'\t\t=>\t'title',\n\t\t'order'\t\t\t=>\t'ASC',\n\t\t'numberposts' => -1,\n\t\t'suppress_filters' => false,\n\t);\n\tadd_filter( 'posts_orderby' , 'posts_orderby_lastname' );\n\t$posts = get_posts($args);\n\tremove_filter( 'posts_orderby' , 'posts_orderby_lastname' );\n\n\t$count = 0;\n\t$last_letter = \"A\";\n\t$authors = array();\n\t$letter_group = array();\n\t$sorted_posts = array();\n\t$authors_this_page = array();\n\t$last_index = count($posts) - 1;\n\t$authors_page = site_url( '/authors' );\n\t$author_group = get_query_var( 'group' );\n\t$nav = '<div class=\"blog-navigation paginate-links\">';\n\n\tforeach($posts as $index=>$p) {\n\t\t$count++;\n\n\t\t// Get the first letter of the author's last name.\n\t\t$str = $p->post_title;\n\t\t$last_name_start = strrpos( $str, \" \" ) + 1;\n\t\t$this_letter = strtoupper( substr( $str, $last_name_start, 1 ) );\n\n\t\t// Group the posts into arrays based on last name.\n\t\tif( $this_letter == $last_letter ) {\n\t\t\t$authors[] = $p;\n\t\t}\n\t\telse {\n\t\t\t$letter_group[$last_letter] = $authors;\n\n\t\t\tif( $count > 7 ) {\n\n\t\t\t\tlist( $sorted_posts, $authors_this_page, $nav ) = package_authors(\n\t\t\t\t\t$sorted_posts, $letter_group, $author_group, $authors_this_page, $nav );\n\n\t\t\t\t$letter_group = array();\n\t\t\t\t$count = 0;\n\t\t\t}\n\t\t\t$authors = array( $p );\n\t\t}\n\n\t\t// Special case for the last post.\n\t\tif( $index == $last_index ) {\n\t\t\tif( $this_letter == $last_letter ) {\n\t\t\t\t$authors[] = $p;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$authors = array( $p );\n\t\t\t}\n\n\t\t\t$letter_group[$this_letter] = $authors;\n\t\t\tlist( $sorted_posts, $authors_this_page, $nav ) = package_authors(\n\t\t\t\t$sorted_posts, $letter_group, $author_group, $authors_this_page, $nav );\n\t\t}\n\n\t\t$last_letter = $this_letter;\n\t}\n\n\t$nav .= '</div>';\n\n\t// Redirect to the main authors page if the query string did not indicate\n\t// a group of authors (i.e. it was an old bookmark).\n\tif( $author_group && ! array_key_exists( $author_group, $sorted_posts ) ) {\n\t\twp_safe_redirect( $authors_page );\n\t}\n\n\treturn array( $authors_this_page, $nav );\n}", "title": "" }, { "docid": "c717eb96155980264070cad2e0b49343", "score": "0.5447021", "text": "function ca_commentor_most ($count=10, $exclude='', $before='<li>', $after='</li>', $before_count='(', $after_count=')') {\nglobal $wpdb, $comment;\n\n $comments=$wpdb->get_results(\"SELECT comment_author_url\n , comment_author\n , COUNT(*) cnt \n FROM $wpdb->comments \n WHERE comment_approved = '1' \n AND comment_type NOT IN ('pingback','trackback')\n GROUP BY comment_author_url, comment_author\n ORDER BY 3 DESC\");\n $excludes=explode(',', $exclude);\n\n foreach($comments as $comment) {\n if (!in_array($comment->comment_author, $excludes)) {\n echo $before;\n comment_author_link();\n echo $before_count.$comment->cnt.$after_count.$after;\n if (++$ccount == $count) break;\n }\n }\n}", "title": "" }, { "docid": "c2012e104eb72a09cd1c8a5679b46d37", "score": "0.54461515", "text": "private function _getPositionUser()\n\t{\n\t\t$i =& comments::$catInfos;\n\n\t\t$user = '<span class=\"current\"><a href=\"'\n\t\t\t. utils::genURL('user/' . $_GET['object_id']) . '\">'\n\t\t\t. utils::tplProtect($i['user_login']) . '</a></span>';\n\n\t\tif (comments::$nbItems > 1)\n\t\t{\n\t\t\treturn sprintf(__('Les %s commentaires postés par %s dans %s'),\n\t\t\t\tcomments::$nbItems, $user, category::$infos['type_html']);\n\t\t}\n\t\tif (comments::$nbItems == 1)\n\t\t{\n\t\t\treturn sprintf(__('Le seul commentaire posté par %s dans %s'),\n\t\t\t\t$user, category::$infos['type_html']);\n\t\t}\n\n\t\treturn sprintf(__('%s n\\'a posté aucun commentaire dans %s'),\n\t\t\t$user, category::$infos['type_html']);\n\t}", "title": "" }, { "docid": "af69006e1176603f9469fa02d1d9ca6f", "score": "0.54429346", "text": "function hma_get_user_profile_rewrite_slug() {\n\treturn apply_filters( 'hma_user_profile_rewrite_slug', 'users' );\n}", "title": "" }, { "docid": "bb5be6cb40874b3bd6cd817041e4dfb7", "score": "0.5439624", "text": "public function commentsAction()\n\t{\n\t\t$request = $this->getRequest()->getParams();\n\t\t$userpram = $request['uid'];\n\t\tif(isset($request['searchfield']) && $request['searchfield']!='')\n\t\t\t$seachfield = $request['searchfield'];\n\t\telse\n\t\t\t$seachfield = '';\n\n\t\t$deshboard= new Admin_Model_Deshboard();\n\t\t$latestCommentData = $deshboard->getLatestComment('','',$userpram);\n\t\t//echo'<pre>';print_r($latestCommentData);die;\n\t\t$page = $this->_getParam('page',1);\n\t\t/*\n\t\t * Object of Zend_Paginator\n\t\t*/\n\t\t$paginator = Zend_Paginator::factory($latestCommentData);\n\t\t/*\n\t\t * Set the number of counts in a page\n\t\t*/\n\t\t$paginator->setItemCountPerPage(20);\n\t\t/*\n\t\t * Set the current page number\n\t\t*/\n\t\t$paginator->setCurrentPageNumber($page);\n\t\t\n\t\t$this->view->paginator = $paginator;\n\t\t$this->view->total = $paginator->getTotalItemCount();\n\t\t$this->view->page = $page;\n\t\t$this->view->totalpage = $paginator->count();\n\t\t$this->view->rectodis = $page*20;\n\t\t$this->view->lastpage = $paginator->count();\n\t}", "title": "" }, { "docid": "494a5cee85a011dc218a5ea93cd318d2", "score": "0.5434871", "text": "function ca_commentor_latest ($count=10, $exclude='', $before='<li>', $after='</li>') {\nglobal $wpdb, $comment;\n\n $comments=$wpdb->get_results(\"SELECT comment_author_url\n , comment_author\n FROM $wpdb->comments \n WHERE comment_approved = '1' \n AND comment_type NOT IN ('pingback','trackback')\n ORDER BY comment_date DESC\");\n\n $excludes=explode(',', $exclude);\n\n foreach($comments as $comment) {\n if (!in_array($comment->comment_author, $excludes)) {\n $excludes[]=$comment->comment_author;\n echo $before;\n comment_author_link();\n echo $after;\n if (++$ccount == $count) break;\n }\n }\n}", "title": "" }, { "docid": "cafa1baac773b4cb088cf16b63b45734", "score": "0.5430676", "text": "function plugin_getcommenturlid_staticpages()\n{\n global $_CONF;\n\n $tmp = array(\n $_CONF['site_url'] . '/staticpages/index.php',\n 'page'\n );\n\n return $tmp;\n}", "title": "" }, { "docid": "5b270d4082a53a5d1fde424ca19a6727", "score": "0.54260105", "text": "function learn_press_courses_pagination() {\r\n\t\tlearn_press_get_template( 'loop/course/pagination.php' );\r\n\t}", "title": "" }, { "docid": "6dc2612efe5fe90800ef5494eb4244a8", "score": "0.54054046", "text": "function icy_list_pings($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment; ?>\n\n\t\t<li id=\"comment-<?php comment_ID(); ?>\"><?php comment_author_link(); ?>\n\n<?php }", "title": "" }, { "docid": "6e6fb620d230735fe65a592f49bafd02", "score": "0.54032326", "text": "public function index() {\n return Home::find(Auth::user())->comments;\n }", "title": "" }, { "docid": "97751060f2e4f4c5df1292872314ac34", "score": "0.5399222", "text": "function rosewellness_hook_single_pagination() {\n do_action('rosewellness_hook_single_pagination');\n}", "title": "" }, { "docid": "eb62e7162e3ba17f7eca72ca268d4a2c", "score": "0.5378867", "text": "public function index()\n {\n //$comments = Comment::paginate(10);\n //return view('admin.comment.index')->with('comments', $comments); \n }", "title": "" }, { "docid": "10fc3f5ed3c84d83cae318ed842693de", "score": "0.5357566", "text": "public function getProfileLink(){\n return get_author_posts_url($this->getId(), $this->getNicename());\n }", "title": "" }, { "docid": "4f40145b6c1249f76e91730f4e72efda", "score": "0.5324393", "text": "function paginate_loop($start, $max, $page = 0) {\n\t\t\t$output = \"\";\n\t\t\tfor ($i = $start; $i <= $max; $i++) {\n\t\t\t\t$p = ($this->type === 'posts') ? esc_url(get_pagenum_link($i)) : get_comments_pagenum_link($i);\n\t\t\t\t$output .= ($page == intval($i))\n\t\t\t\t\t? \"<li><span class='page current'>$i</span></li>\"\n\t\t\t\t\t: \"<li><a href='$p' title='$i' class='page'>$i</a></li>\";\n\t\t\t}\n\t\t\treturn $output;\n\t\t}", "title": "" }, { "docid": "bcdcc665b0c16fbedd2684ef03b718fc", "score": "0.53167677", "text": "public function array_displayComments()\n {\n if(isset($this->Data['count']))\n {\n $count = $this->Data['count'];\n }\n else\n {\n $count = 20;\n }\n // get the current page, we'll need to multiply it by the count.\n if(isset($this->Data['page']))\n {\n $page = $this->Data['page']*$count;\n }\n else\n {\n $page = 0;\n }\n // we check what type of comment this is..\n if(isset($this->Data['type']) && isset($this->Data['id']))\n {\n if(strtolower($this->Data['type']) == 'profile' || $this->Data['type'] == '1')\n {\n // profile based comments\n $whereclause = \"`page_id` = '\" . $this->mysqli->real_escape_string($this->Data['id']) . \"'\";\n }\n else if(strtolower($this->Data['type']) == 'video' || $this->Data['type'] == '0')\n {\n // comments on videos.\n $whereclause = \"`epid` = \" . $this->mysqli->real_escape_string($this->Data['id']);\n }\n else\n {\n // this was not a valid request, we won't display data.\n $whereclause = 1;\n }\n }\n else if(!isset($this->Data['type']) && isset($this->Data['id']))\n {\n $whereclause = 2;\n }\n else if(!isset($this->Data['type']) && !isset($this->Data['id']))\n {\n $whereclause = 3;\n }\n else if(isset($this->Data['type']) && !isset($this->Data['id']))\n {\n $whereclause = 0;\n }\n else\n {\n $whereclause = 4;\n }\n // now we check to see if we should pass through content to the client or give them an error.\n if(!is_numeric($whereclause))\n {\n $query = \"SELECT `id`, `comments`, `isSpoiler`, `dated`, `uid`, `negative`, `positive` FROM `page_comments` WHERE $whereclause ORDER BY `dated` LIMIT $page, $count\";\n $result = $this->mysqli->query($query);\n $count = mysqli_num_rows($result);\n $returnarray = array();\n $returnarray['status'] = $this->MessageCodes[\"Result Codes\"][\"200\"][\"Status\"];\n if($count > 0)\n {\n $i = 0;\n while($row = $result->fetch_assoc())\n {\n $returnarray['results'][$i]['id'] = $row['id'];\n $returnarray['results'][$i]['comment'] = stripslashes(nl2br($row['comments']));\n $returnarray['results'][$i]['spoiler'] = $row['isSpoiler'];\n $returnarray['results'][$i]['dated'] = $row['dated'];\n $returnarray['results'][$i]['user'] = $this->string_fancyUsername($row['uid'],NULL,NULL,NULL,NULL,NULL,1);\n $returnarray['results'][$i]['votes-negative'] = $row['negative'];\n $returnarray['results'][$i]['votes-positive'] = $row['positive'];\n $i++;\n }\n //$returnarray['total-comments'] = $this->bool_totalComments($epid);\n }\n else\n {\n $returnarray = array('status' => $this->MessageCodes[\"Result Codes\"][\"402\"][\"Status\"], 'message' => $this->MessageCodes[\"Result Codes\"][\"04-402\"][\"Message\"]);\n }\n }\n else\n {\n if($whereclause == 0)\n {\n // type was not set, we need that to format data..\n $returnarray = array('status' => $this->MessageCodes[\"Result Codes\"][\"400\"][\"Status\"], 'message' => $this->MessageCodes[\"Result Codes\"][\"04-400\"][\"Message\"]);\n }\n else if($whereclause == 1)\n {\n // the type was invalid, not supported so far..\n $returnarray = array('status' => $this->MessageCodes[\"Result Codes\"][\"401\"][\"Status\"], 'message' => $this->MessageCodes[\"Result Codes\"][\"04-401\"][\"Message\"]);\n }\n else if($whereclause == 2)\n {\n // the type was invalid, not supported so far..\n $returnarray = array('status' => $this->MessageCodes[\"Result Codes\"][\"403\"][\"Status\"], 'message' => $this->MessageCodes[\"Result Codes\"][\"04-403\"][\"Message\"]);\n }\n else if($whereclause == 3)\n {\n // the type was invalid, not supported so far..\n $returnarray = array('status' => $this->MessageCodes[\"Result Codes\"][\"404\"][\"Status\"], 'message' => $this->MessageCodes[\"Result Codes\"][\"04-404\"][\"Message\"]);\n }\n else if($whereclause == 4)\n {\n // the type was invalid, not supported so far..\n $returnarray = array('status' => $this->MessageCodes[\"Result Codes\"][\"404\"][\"Status\"], 'message' => $this->MessageCodes[\"Result Codes\"][\"04-404\"][\"Message\"]);\n }\n else\n {\n // nothing else..\n }\n }\n return $returnarray;\n }", "title": "" }, { "docid": "f4ce604e83d4c90f6ba538bbc79761f0", "score": "0.53019667", "text": "function ca_comment_latest ($count=10, $length=60, $before='<li>', $after='</li>', $linktext='Go') {\nglobal $wpdb, $comment;\n\n $comments=$wpdb->get_results(\"SELECT comment_post_id\n , comment_author_url\n , comment_author\n , comment_content \n FROM $wpdb->comments \n WHERE comment_approved = '1' \n AND comment_type NOT IN ('pingback','trackback')\n ORDER BY comment_date DESC\");\n\n foreach($comments as $comment) {\n echo $before;\n comment_author_link();\n $id=$comment->comment_post_id;\n echo ' '.substr(strip_tags($comment->comment_content),0,$length).'..(<a href=\"';\n echo get_permalink($id);\n echo '\">'.$linktext.'</a>)';\n echo $after;\n if (++$ccount == $count) break;\n }\n}", "title": "" }, { "docid": "60bf0c847c91dc7ace376d605b437ef9", "score": "0.5295022", "text": "function tz_list_pings($comment, $args, $depth) {\n\t$GLOBALS['comment'] = $comment; ?>\n<li id=\"comment-<?php comment_ID(); ?>\"><?php comment_author_link(); ?>\n<?php }", "title": "" }, { "docid": "248cc20dbfc475d2e143ee1f3effe60b", "score": "0.5286407", "text": "function paged_comments_update_values()\r\n{\r\n global $paged_comments;\r\n // comments per page\r\n $val = paged_comments_get_custom('comments_per_page');\r\n if (!empty($val)) $paged_comments->per_page = (int)$val;\r\n // comment ordering\r\n $val = strtoupper(paged_comments_get_custom('comment_ordering'));\r\n if (($val == 'ASC') || ($val == 'DESC')) $paged_comments->ordering = $val;\r\n}", "title": "" }, { "docid": "99664c257ff338ee640044715b9684f0", "score": "0.5285221", "text": "public function uriKey()\n {\n return 'most-commentable-posts';\n }", "title": "" }, { "docid": "3f3057efa642c2fd512c4991492965ed", "score": "0.52807945", "text": "function paged_comments_sql_limit()\r\n{\r\n global $paged_comments;\r\n $remainder = $paged_comments->pager->get_total_items() % $paged_comments->per_page;\r\n $offset = ($paged_comments->main_pager->get_current_page() - 1) * $paged_comments->per_page;\r\n\r\n // limit clause for comments in ascending order (or if total-comments multiple of comments-per-page)\r\n if (($paged_comments->ordering == 'ASC') || ($remainder == 0)) {\r\n return array($offset, $paged_comments->per_page);\r\n }\r\n // limit clause for comments in descending order (if we're on the last page)\r\n if ($paged_comments->pager->get_current_page() == $paged_comments->pager->num_pages()) {\r\n return array(0, $remainder);\r\n } else {\r\n return array($offset + $remainder - $paged_comments->per_page, $paged_comments->per_page);\r\n }\r\n}", "title": "" }, { "docid": "a0f6f273398ec94b95a981eaa77a5b6c", "score": "0.527763", "text": "function wp_ajax_ld_course_navigation_admin_pager() {\n\t$reply_data = array();\n\t\n\tif ( ( isset( $_POST['paged'] ) ) && ( !empty( $_POST['paged'] ) ) ) {\n\t\t$paged = intval( $_POST['paged'] );\n\t} else {\n\t\t$paged = 1;\n\t}\n\n\tif ( ( isset( $_POST['widget_data'] ) ) && ( !empty( $_POST['widget_data'] ) ) ) {\n\t\t$widget_data = $_POST['widget_data'];\n\t} else {\n\t\t$widget_data = array();\n\t}\n\n\tif ( ( isset( $widget_data['course_id'] ) ) && ( !empty( $widget_data['course_id'] ) ) ) {\n\t\t$course_id = intval( $widget_data['course_id'] );\n\t} else {\n\t\t$course_id = 0;\n\t}\n\t\t\n\tif ( ( !empty( $course_id ) ) && ( !empty( $widget_data ) ) ) {\n\t\t\n\t\tif ( ( isset( $_POST['widget_data']['nonce'] ) ) && ( ! empty( $_POST['widget_data']['nonce'] ) ) && ( wp_verify_nonce( $_POST['widget_data']['nonce'], 'ld_course_navigation_admin_pager_nonce_' . $course_id . '_' . get_current_user_id() ) ) ) {\n\n\t\t\t$lesson_query_args = array();\n\t\t\t//$course_lessons_per_page = learndash_get_course_lessons_per_page( $course_id );\n\t\t\t//if ( $course_lessons_per_page > 0 ) {\t\t\n\t\t\t\t$lesson_query_args['pagination'] = 'true';\n\t\t\t\t$lesson_query_args['paged'] = $paged;\n\t\t\t//}\n\t\t\t$widget_data['show_widget_wrapper'] = false;\n\t\t\t\n\t\t\t$level = ob_get_level();\n\t\t\tob_start();\n\t\t\tlearndash_course_navigation_admin( $course_id, $widget_data, $lesson_query_args );\n\t\t\t$reply_data['content'] = learndash_ob_get_clean( $level );\n\t\t}\n\t}\n\t\n\techo json_encode( $reply_data );\n\tdie();\n}", "title": "" }, { "docid": "dfe166790596f4ea4588c47e84f3be43", "score": "0.5274637", "text": "function subVueCommentsLast($user_id){\n $user = User::where('id',$user_id)->first();\n\n $descriptions = Description::where('descriptive_type', 'App\\Route')\n ->with('descriptive')\n ->with('user')\n ->orderBy('created_at', 'desc')\n ->skip(0)\n ->take(5)\n ->get();\n\n $data = [\n 'user' => $user,\n 'descriptions' => $descriptions,\n ];\n return view('pages.profile.vues.dashboardBox.boxVues.comments-last', $data);\n }", "title": "" }, { "docid": "68585b9f29d246680e042a47be162990", "score": "0.5270268", "text": "function bp_get_the_topic_pagination() {\n\t\tglobal $topic_template;\n\n\t\treturn apply_filters( 'bp_get_the_topic_pagination', $topic_template->pag_links );\n\t}", "title": "" }, { "docid": "6af55f58f2786a9bb77972344bc5a382", "score": "0.52651864", "text": "public function indexComments()\n {\n return CommentResource::collection(\n Comment::orderBy('id', 'desc')->simplePaginate(30)\n );\n }", "title": "" }, { "docid": "3386ebdb43ebc9305f682a2e77e5e0ad", "score": "0.52422065", "text": "function enqueue_vue_comments_user() {\n\t$comments_translate = array(\n\t\t'askDeleteComment' => esc_html__( 'Do you really want to delete this comment?', 'defaultspace' ),\n\t\t'editComment' => esc_html__( 'Edit comment', 'defaultspace' ),\n\t\t'replyComment' => esc_html__( 'Reply to comment', 'defaultspace' ),\n\t\t'deleteComment' => esc_html__( 'Delete comment', 'defaultspace' ),\n\t\t'yourComment' => esc_html__( 'Your comment', 'defaultspace' ),\n\t\t'at' => esc_html__( 'at', 'defaultspace' ),\n\t\t'reply' => esc_html__( 'Reply', 'defaultspace' ),\n\t\t'profile' => esc_html__( 'profile', 'defaultspace' ),\n\t\t'goToProfileOf' => esc_html__( 'Go to profile of', 'defaultspace' ),\n\t\t'showAllpostsOf' => esc_html__( 'Show posts in this Space', 'defaultspace' ),\n\t\t'addNewComment' => esc_html__( 'Add a new comment', 'defaultspace' ),\n\t\t'deletedComment' => esc_html__( 'Comment has been deleted', 'defaultspace' ),\n\t);\n\twp_localize_script( 'vue-comments_user', 'commentTranslate', $comments_translate );\n\twp_enqueue_script( 'vue-comments_user' );\n\tglobal $post;\n\tif ( is_user_logged_in() && is_single( $post ) ) {\n\t\t$current_user_info = get_current_user_infos();\n\t\t$comment_user = json_encode(\n\t\t\tarray(\n\t\t\t\t'current' => $current_user_info,\n\t\t\t\t'avatar_url' => get_avatar_url( get_current_user_id() ),\n\t\t\t\t'superadmin' => is_super_admin( $current_user_info->id ),\n\t\t\t)\n\t\t);\n\t\t$comment_user = \"var commentUser = ${comment_user};\";\n\t\twp_add_inline_script( 'vue-comments_user', $comment_user, 'after' );\n\t}\n}", "title": "" }, { "docid": "0f7a079f7652b276dd8de35c99b4351a", "score": "0.5240832", "text": "function bp_forum_pagination() {\n\techo bp_get_forum_pagination();\n}", "title": "" }, { "docid": "55c025b1738f8a56289a034de10203b5", "score": "0.52402544", "text": "function pagination($post){\n\t\t\tif (empty($post['ParentPost']['id']) && empty($post['ChildPost'])) {\n\t\t\t\treturn '';\n\t\t\t}\n\t\t\t$this->currentCategory = $post['Category']['slug'];\n\n\t\t\t$out = '<ul>';\n\n\t\t\t$post['Post']['plugin'] = 'blog';\n\t\t\t$post['Post']['controller'] = 'posts';\n\t\t\t$post['Post']['action'] = 'view';\n\t\t\t$eventData = $this->Event->trigger('blog.slugUrl', array('type' => 'posts', 'data' => $post));\n\n\t\t\tif (empty($post['ParentPost']['id'])) {\n\t\t\t\t$out .= '<li>';\n\t\t\t\t$out .= $this->Html->link($post['Post']['title'], current($eventData['slugUrl']));\n\t\t\t\t$out .= '</li>';\n\n\t\t\t\tforeach($post['ChildPost'] as $child ){\n\t\t\t\t\t$child = array_merge($post['Post'], $child);\n\t\t\t\t\t$eventData = $this->Event->trigger('blog.slugUrl', array('type' => 'posts', 'data' => $child));\n\t\t\t\t\t$out .= '<li>';\n\t\t\t\t\t$out .= $this->Html->link($child['title'], current($eventData['slugUrl']));\n\t\t\t\t\t$out .= '</li>';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$post['Post'] = array_merge($post['Post'], $post['ParentPost']);\n\t\t\t\t$eventData = $this->Event->trigger('blog.slugUrl', array('type' => 'posts', 'data' => $post));\n\t\t\t\t$out .= '<li>';\n\t\t\t\t$out .= $this->Html->link($post['ParentPost']['title'], current($eventData['slugUrl']));\n\t\t\t\t$out .= '</li>';\n\n\t\t\t\tforeach($post['ParentPost']['ChildPost'] as $child ){\n\t\t\t\t\t$child = array_merge($post['Post'], $child['Post']);\n\t\t\t\t\t$eventData = $this->Event->trigger('blog.slugUrl', array('type' => 'posts', 'data' => $child));\n\t\t\t\t\t$out .= '<li>';\n\t\t\t\t\t$out .= $this->Html->link($child['title'], current($eventData['slugUrl']));\n\t\t\t\t\t$out .= '</li>';\n\t\t\t\t}\n\t\t\t}\n\t\t\t$out .= '</ul>';\n\t\t\treturn $out;\n\t\t}", "title": "" }, { "docid": "0bbebd5e904590f4e50d1508c0087786", "score": "0.5231682", "text": "public function list_comment()\n {\n $data[\"comment\"] = DB::table(\"tbl_comment\")->paginate(6);\n return view(\"admin.comment\",$data);\n \n }", "title": "" }, { "docid": "8b658d1cb2f86db99f3ea2b3f8257401", "score": "0.52226436", "text": "public function comments(){\n }", "title": "" }, { "docid": "d40e43b883a838eb970c6e6a8498c08c", "score": "0.5219053", "text": "function PageComments() {\n\t\tif($this->hasMethod('CommentsForm')) return $this->CommentsForm();\n\t\telse return parent::PageComments();\n\t}", "title": "" }, { "docid": "69c8db3ec08e23a74625abe63fea9134", "score": "0.5193369", "text": "function most_commented($comment_posts = 5 , $avatar_size = 50){\n$comments = get_comments('status=approve&number='.$comment_posts);\nforeach ($comments as $comment) { ?>\n\t<li>\n\t\t<div class=\"post-thumbnail\">\n\t\t\t<?php echo get_avatar( $comment, $avatar_size ); ?>\n\t\t</div>\n\t\t<a href=\"<?php echo get_permalink($comment->comment_post_ID ); ?>#comment-<?php echo $comment->comment_ID; ?>\">\n\t\t<?php echo strip_tags($comment->comment_author); ?>: <?php echo wp_html_excerpt( $comment->comment_content, 60 ); ?>... </a>\n\t</li>\n<?php } \n}", "title": "" }, { "docid": "bf67c22d7fe950ee3afa08e261382f63", "score": "0.5190413", "text": "function apoc_comments_args() {\n\n\t$args = array(\n\t\t'style' \t\t=> 'ol',\n\t\t'type' \t\t=> 'all',\n\t\t'per_page'\t\t\t=> get_option('comments_per_page'),\n\t\t'reverse_top_level'\t=> false,\n\t\t'avatar_size' \t\t=> 100,\n\t\t'callback' \t\t=> 'apoc_comments_template',\n\t\t'end-callback' \t\t=> 'apoc_comments_end_callback'\n\t);\n\n\treturn $args;\n}", "title": "" }, { "docid": "25d93b298f463d8dd96013cf74a3c75a", "score": "0.5179385", "text": "public function getPostComments(Request $request,$postSlug){\n\n $page = $request->has('page') ? $request->query('page') : 1;\n $per_page = $this->per_page;\n $post = PostsRepository::get($postSlug);\n\n return Cache::tags(\"comments_post\")->remember('comments_post_'.$post->first()->id . '_page_' . $page, Carbon::now()->addHour(1), function() use( $per_page, $post ) {\n return Comment::with(\"replies\")->where(\"commentable_id\",$post->first()->id)->whereNull(\"comment_id\")->where(\"status\",1)->paginate($per_page);\n });\n\n }", "title": "" }, { "docid": "b9f25fba9c0a63750781f0a9802079d2", "score": "0.5172362", "text": "public function getCommentsFromUserPage($idUser){\n try{\n $query = \"SELECT * FROM \".$this->table.\" WHERE id_commented_user = \".$idUser.\" ORDER BY ID DESC\";\n return $this->wpdb->get_results($query);\n \n } catch (Exception $ex) {\n _e($ex);\n return false;\n }\n }", "title": "" }, { "docid": "3ccc3e2dcd09e2a49eab65599ddd4823", "score": "0.51658267", "text": "public function paginate();", "title": "" }, { "docid": "4907d6bef1c3d3bd787556442697aef9", "score": "0.51346755", "text": "public static function get_comment_pagination(array $args = []) {\n\t\tglobal $post;\n\t\t/**\n\t\t * post comment status\n\t\t */\n\t\tstatic $page_comments = null,\n\t\t\t$cpp = null,\n\t\t\t$thread_comments = null,\n\t\t\t$max_pages = null;\n\t\t\t\n\t\tif($page_comments === null)\n\t\t\t$page_comments = theme_cache::get_option('page_comments');\n\t\t/** if comment is closed, return */\n\t\tif(!$page_comments) \n\t\t\treturn false;\n\n\t\t/**\n\t\t * comments per page\n\t\t */\n\t\tif(!$cpp === null)\n\t\t\t$cpp = theme_cache::get_option('comments_per_page');\n\n\t\t/**\n\t\t * thread_comments\n\t\t */\n\t\tif($thread_comments === null)\n\t\t\t$thread_comments = get_option('thread_comments');\n\n\t\tif($max_pages === null)\n\t\t\t$max_pages = get_comment_pages_count(null,get_option('comments_per_page'),theme_cache::get_option('thread_comments'));\n\t\t\t\n\t\t/** \n\t\t * defaults args\n\t\t */\n\t\t$defaults = [\n\t\t\t'classes'\t\t\t=> 'comment-pagination',\n\t\t\t'cpaged'\t\t\t=> max(1,get_query_var('cpage')),\n\t\t\t'cpp' \t\t\t\t=> $cpp,\n\t\t\t'thread_comments'\t=> $thread_comments ? true : false,\n\t\t\t// 'default_comments_page' => get_option('default_comments_page'),\n\t\t\t'default_comments_page' => 'oldest',\n\t\t\t'max_pages' \t\t=> $max_pages,\n\t\t\t\n\t\t];\n\t\t$r = array_merge($defaults,$args);\n\t\textract($r,EXTR_SKIP);\n\t\t\t\t\n\t\t/** If has page to show me */\n\t\tif ( $max_pages > 1 ){\n\t\t\t$big = 999;\n\t\t\t$args = array(\n\t\t\t\t'base' \t\t\t=> str_replace($big,'%#%',get_comments_pagenum_link($big)), \n\t\t\t\t'total'\t\t\t=> $max_pages,\n\t\t\t\t'current'\t\t=> $cpaged,\n\t\t\t\t'echo'\t\t\t=> false, \n\t\t\t\t'prev_text'\t\t=> '<i class=\"fa fa-angle-left\"></i>',\n\t\t\t\t'next_text' \t=> '<i class=\"fa fa-angle-right\"></i>',\n\t\t\t);\n\t\t\t$comments_page_links = paginate_links($args);\n\t\t\t/**\n\t\t\t * add data-* attribute\n\t\t\t */\n\t\t\t$comments_page_links = str_replace(\n\t\t\t\t' href=',\n\t\t\t\t' data-post-id=\"' . $post->ID . '\" data-cpage=\"' . $cpaged . '\" href=',\n\t\t\t\t$comments_page_links\n\t\t\t);\n\t\t\t\n\t\t\treturn '<div class=\"'. $classes .'\">'.$comments_page_links.'</div>';\n\t\t}\n\t}", "title": "" }, { "docid": "f589c9a8a2850f1104a4d21fc912e403", "score": "0.51298463", "text": "function about($page)\n{\n $commentManager = new CommentManager();\n $countC = $commentManager->countComments();\n $commentNb = $countC['commentNb'];\n $perPage = 6;\n $maxPages = ceil($commentNb/$perPage);\n if ($page <= $maxPages) {\n $currentPage = $page;\n }\n else {\n $currentPage = 1;\n }\n $start = (($currentPage - 1) * $perPage);\n\n $comments = $commentManager->getCommentsPaged($start, $perPage);\n\n require('view/frontend/aboutView.php');\n}", "title": "" }, { "docid": "ed5c6bb100ddf66aae220d3435a7f767", "score": "0.51289654", "text": "function primer_comments($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment; ?>\n\t<li <?php comment_class(); ?>>\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"clearfix\">\n\t\t\t<header class=\"comment-author vcard\">\n\t\t\t <?php \n\t\t\t /*\n\t\t\t this is the new responsive optimized comment image. It used the new HTML5 data-attribute to display comment gravatars on larger screens only. What this means is that on larger posts, mobile sites don't have a ton of requests for comment images. This makes load time incredibly fast! If you'd like to change it back, just replace it with the regular wordpress gravatar call:\n\t\t\t echo get_avatar($comment,$size='32',$default='<path_to_url>' );\n\t\t\t */ \n\t\t\t ?>\n\t\t\t <!-- custom gravatar call -->\n\t\t\t <?php\n\t\t\t \t// create variable\n\t\t\t \t$bgauthemail = get_comment_author_email();\n\t\t\t ?>\n\t\t\t <img data-gravatar=\"http://www.gravatar.com/avatar/<?php echo md5($bgauthemail); ?>?s=32\" class=\"load-gravatar avatar avatar-48 photo\" height=\"32\" width=\"32\" src=\"<?php echo get_template_directory_uri(); ?>/library/images/nothing.gif\" />\n\t\t\t <!-- end custom gravatar call -->\n\t\t\t\t<?php printf(__('<cite class=\"fn\">%s</cite>', 'primertheme'), get_comment_author_link()) ?>\n\t\t\t\t<time datetime=\"<?php echo comment_time('Y-m-j'); ?>\"><a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\"><?php comment_time(__('F jS, Y', 'primertheme')); ?> </a></time>\n\t\t\t\t<?php edit_comment_link(__('(Edit)', 'primertheme'),' ','') ?>\n\t\t\t</header>\n\t\t\t<?php if ($comment->comment_approved == '0') : ?>\n \t\t\t<div class=\"alert info\">\n \t\t\t<p><?php _e('Your comment is awaiting moderation.', 'primertheme') ?></p>\n \t\t</div>\n\t\t\t<?php endif; ?>\n\t\t\t<section class=\"comment_content clearfix\">\n\t\t\t\t<?php comment_text() ?>\n\t\t\t</section>\n\t\t\t<?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\n\t\t</article>\n <!-- </li> is added by WordPress automatically -->\n<?php\n}", "title": "" }, { "docid": "8c47e0d63e3db5613ac8947ddabbeb32", "score": "0.51235384", "text": "public function custom_comment_page($comment) {\n $comments_table = new Custom_Comments_List_Table($comment);\n \n //Fetch, prepare, sort, and filter our data...\n $comments_table->prepare_items();\n \n include_once (CCT_VIEWS . 'cct-view-comment-page.php');\n }", "title": "" }, { "docid": "4f5975f598497bb2af57fbd4671f80a9", "score": "0.5121125", "text": "function paged_comments()\r\n{\r\n global $paged_comments;\r\n // paged comments only when viewing a single post or a single page\r\n if (!is_single() && !is_page()) return false;\r\n\t// has user chosen to view all comments?\r\n\t// if so, disable paged comments for this post\r\n if(!(strpos( $_GET['cp'], 'all' )===false) && $paged_comments->show_all_option) return false;\r\n // is paging enabled for all posts?\r\n if ($paged_comments->all_posts) return true;\r\n // has paging been explicitly enabled for this post\r\n $paging_enabled = get_post_custom_values('paged_comments');\r\n if (@$paging_enabled[0] == 'on') return true;\r\n // paging not enabled for this post\r\n return false;\r\n}", "title": "" }, { "docid": "41b5b3f4b8fccd32b1fec334036a3078", "score": "0.51138604", "text": "function numbering_pagination(){\n global $wp_query;\n\n $all_pages = $wp_query->$max_num_pages;\n\n $current_page = max(1,get_query_var('paged'));\n\n if ($all_pages > 1){\n return paginate_links(array(\n\n 'base' => get_pagenum_link() . '%_%',\n 'format' => 'page/%#%',\n 'current'=>$current_page\n\n ));\n }\n }", "title": "" }, { "docid": "e15cd147930e89b47800c996055fad68", "score": "0.50950325", "text": "public function getCommentsVideoSlug($slug, $getCount = 10, $paginate = true)\n {\n $inputArray = $this->request->all();\n if(!empty($inputArray['parent_id'])) {\n $commentList = Comment::with(['customer' => function($query) {\n $query->withTrashed();\n }, 'admin'])->where('_id', $inputArray['parent_id'])->orderBy('_id', 'desc')->paginate(config('access.perpage'));\n }\n else {\n $video = Video::where($this->getKeySlugorId(), $slug)->first();\n $commentList = Comment::with(['customer' => function($query) {\n $query->withTrashed();\n }, 'admin'])->where('video_id', $video->id)->whereNull('parent_id')->orderBy('_id', 'desc')->paginate(config('access.perpage'));\n }\n return $commentList;\n }", "title": "" }, { "docid": "8bbbc1ca4e56cc3e8e9e34a57af35243", "score": "0.5085837", "text": "function allcommentajax(){\r\n $page_id = get_option( 'allcommentpage', 1 );\r\n $page_url = get_permalink( $page_id );\r\n echo json_encode(\r\n array(\r\n 'message' => 'success',\r\n 'page_url' => $page_url\r\n )\r\n );\r\n die(); \r\n }", "title": "" }, { "docid": "3a711a08b012cb2a1e3afc5afd2334dc", "score": "0.50757205", "text": "public function setPageNumberAdmin($pageNum, $rowsPerPage){\n\t$query = \"SELECT COUNT(*) AS numrows FROM \".TABLE_NAME3.\" WHERE idUser=\".$this->idUser;\n\t$result = mysql_query($query) or die('Error, query failed');\n\t$row\t = mysql_fetch_array($result, MYSQL_ASSOC);\n\t$numrows = $row['numrows'];\n\t\t\t\t\t\n\t\n\t//utk bikin link page number\n\t$maxPage = ceil($numrows/$rowsPerPage);\n\t\t\t\t\t\n\t$self = $_SERVER['PHP_SELF'];\n\t$nav = '';\n\tfor($page = 1; $page <= $maxPage; $page++){\n if($page == $pageNum){\n\t\t$nav .= \"<span class=\\\"page-num\\\">$page</span>\";\n }else{\n\t\t$nav .= \"<span class=\\\"page-num-linked\\\"><a href=\\\"$self?tab=userComment&&id=\".$this->idUser.\"&&page=$page\\\">$page</a></span> \";\n }\n\t}\n return $nav;\n }", "title": "" }, { "docid": "c4d6f3974e5179b009ae22d37d9407fc", "score": "0.5064938", "text": "function plugin_displaycomment_staticpages ($id, $cid, $title, $order, $format, $page, $view)\n{\n global $_TABLES, $LANG_ACCESS;\n\n $retval = '';\n\n $sql = \"SELECT COUNT(*) AS count, commentcode, owner_id, group_id, perm_owner, \"\n . \"perm_group, perm_members, perm_anon \"\n . \"FROM {$_TABLES['staticpage']} \"\n . \"WHERE (sp_id = '$id')\" . COM_getPermSQL('AND')\n . ' GROUP BY sp_id';\n $result = DB_query ($sql);\n $A = DB_fetchArray ($result);\n $allowed = $A['count'];\n\n if ($allowed == 1) {\n $delete_option = (SEC_hasRights ('staticpages.edit') &&\n (SEC_hasAccess ($A['owner_id'], $A['group_id'],\n $A['perm_owner'], $A['perm_group'], $A['perm_members'],\n $A['perm_anon']) == 3));\n $retval .= CMT_userComments ($id, $title, 'staticpages', $order, $format,\n $cid, $page, $view, $delete_option,\n $A['commentcode']);\n } else {\n $retval .= COM_startBlock ($LANG_ACCESS['accessdenied'], '',\n COM_getBlockTemplate ('_msg_block', 'header'))\n . $LANG_ACCESS['storydenialmsg']\n . COM_endBlock (COM_getBlockTemplate ('_msg_block', 'footer'));\n }\n\n return $retval;\n}", "title": "" }, { "docid": "85fc5631da5d160752f12c98dd530ca4", "score": "0.50631225", "text": "public function getCommentsPerPage()\n\t{\n\t\treturn $this->getWpOption('page_comments') ? Mage::helper('wordpress')->getWpOption('comments_per_page', 50) : 0;\n\t}", "title": "" }, { "docid": "46e34edecc8c820f9eb5956238de1933", "score": "0.5058217", "text": "public function admin_view()\n {\n $params = App::getRouter()->getParams();\n\n if (isset($params[0])) {\n $id = strtolower($params[0]);\n $this->data['user'] = $this->model->getUserById($id);\n $this->data['user_comments'] = $this->model->getUserComments($id);\n }\n\n /*\n * create array for pagination tree\n */\n $count_rows = 0;\n $this->data['pagination_news'] = array();\n foreach($this->data['user_comments'] as $comment) {\n $this->data['pagination_comment'][$count_rows/20][] = $comment;\n $count_rows++;\n }\n\n // data for pagination work\n $this->data['current_comment'] = (isset($params[0])) ? $params[0] : 0;\n $this->data['current_pag'] = (isset($params[1])) ? $params[1] : 0;\n $this->data['last_pag'] = (int)(count($this->data['user_comments'])/20)-1;\n }", "title": "" }, { "docid": "f5ea15d0df71f9c12e3af67fb1a223b4", "score": "0.5055146", "text": "function tidy_comment_nav() {\n\n\tif( ! is_singular() )\n\t\treturn;\n\n\tif ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) { // are there comments to navigate through\n\t?>\n\t\t<nav id=\"comment-nav-below\" class=\"comment-navigation\" role=\"navigation\">\n\t\t\t<h1 class=\"screen-reader-text\"><?php _e( 'Comment navigation', 'tidy' ); ?></h1>\n\t\t\t<?php\n\t\t\t\tpaginate_comments_links(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'prev_text' => '<span class=\"genericon genericon-leftarrow\"></span><span class=\"screen-reader-text\">' . __( 'Older Comments', 'tidy' ) . '</span>',\n\t\t\t\t\t\t'next_text' => '<span class=\"screen-reader-text\">' . __( 'Newer Comments', 'tidy' ) . '</span><span class=\"genericon genericon-rightarrow\"></span>',\n\t\t\t\t\t\t'type' => 'list'\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t?>\n\t\t</nav><!-- #comment-nav-below -->\n\t<?php\n\t} // check for comment navigation\n\n}", "title": "" }, { "docid": "16b6f7fb8e95ada3205659f7c8834bb6", "score": "0.5041298", "text": "public function index()\n {\n $comments = Comment::latest()->where('user_id', auth()->id())->paginate(10);\n return view('user.comments.index', ['comments' => $comments]);\n }", "title": "" }, { "docid": "1a72860bbf211887cea1457f03fe0a78", "score": "0.5037187", "text": "function wct_user_comments_slug_setting_callback() {\n\t?>\n\n\t<input name=\"_wc_talks_user_comments_slug\" id=\"_wc_talks_user_comments_slug\" type=\"text\" class=\"regular-text code\" value=\"<?php echo esc_attr( wct_user_comments_slug() ); ?>\" />\n\n\t<?php\n}", "title": "" }, { "docid": "73ebf0613c92285fbd7d0a09975e2497", "score": "0.5032266", "text": "function thistle_get_pagenum_link( $result ) {\n global $wp_rewrite;\n\n $pagination = preg_match( \"|\\/$wp_rewrite->pagination_base\\/(\\d+)\\/?|\", $result, $matches );\n\n $result = remove_query_arg( 'page', $result );\n $result = preg_replace( \"|\\/$wp_rewrite->pagination_base\\/\\d+\\/?|\", \"/$2\", $result );\n\n if ( $pagination ) {\n $result = add_query_arg( 'page', $matches[1], $result );\n }\n\n return $result;\n }", "title": "" }, { "docid": "fc154da9d7b345020dabec6914416a0e", "score": "0.50280106", "text": "function ns_show_top_commentators() {\r\n\t\t// Each widget can store its own options. We keep strings here.\r\n\t\t$options = get_option('widget_leaderbrd');\r\n\r\n\t\t// This prepares URLs for filtering\r\n\t\tif($options['filterUrl'] != \"\") {\r\n\t\t\t$filterUrl = trim($options['filterUrl']);\r\n\t\t\t$filterUrl = explode(\",\", $filterUrl);\r\n\t\t\tfor($i=0; $i<count($filterUrl); $i++) {\r\n\t\t\t\t$new_urls .= \" AND leaderboard_name_url NOT LIKE '%\" . trim($filterUrl[$i]) . \"%'\";\r\n\t\t\t}\r\n\t\t\t$filterUrl = $new_urls;\r\n\t\t}\r\n\r\n\t\t// This prepares e-mails for filtering\r\n\t\tif($options['filterEmail'] != \"\") {\r\n\t\t\t$filterEmail = trim($options['filterEmail']);\r\n\t\t\t$filterEmail = explode(\",\", $filterEmail);\r\n\t\t\tfor($i=0; $i<count($filterUrl); $i++) {\r\n\t\t\t\t$new_emails .= \" AND leaderboard_email NOT LIKE '%\" . trim($filterEmail[$i]) . \"%'\";\r\n\t\t\t}\r\n\t\t\t$filterEmail = $new_emails;\r\n\t\t}\r\n\r\n\t\t// This prepares names for filtering\r\n\t\tif($options['excludeNames'] != \"\") {\r\n\t\t\t$excludeNames = trim($options['excludeNames']);\r\n\t\t\t$excludeNames = explode(\",\", $excludeNames);\r\n\t\t\tfor($i=0; $i<count($excludeNames); $i++) {\r\n\t\t\t\t$new_names .= \" AND leaderboard_name NOT IN ('\" . trim($excludeNames[$i]) . \"')\";\r\n\t\t\t}\r\n\t\t\t$excludeNames = $new_names;\r\n\t\t}\r\n\r\n\t\tif($options['limitList'] != \"\")\r\n\t\t\t$limitList = \"LIMIT \" . $options['limitList'];\r\n\t\tif($options['limitChar'] != \"\") {\r\n\t\t\t$limitChar = $options['limitChar'];\r\n\t\t} else {\r\n\t\t\t$limitChar = 20;\r\n\t\t}\r\n\t\t$listDesc = $options['listDesc'];\r\n\t\t$listType = $options['listType'];\r\n\t\t$listPeriod = $options['listPeriod'];\r\n\t\tif($options['listNull'] == \"\") {\r\n\t\t\t$listNull = \"No commentators.\";\r\n\t\t} else {\r\n\t\t\t$listNull = $options['listNull'];\r\n\t\t}\r\n\t\t$makeLink = $options['makeLink'];\r\n\t\t$noFollow = $options['noFollow'];\r\n\t\t$showCount = $options['showCount'];\r\n\t\t$showUtility = $options['showUtility'];\r\n\r\n\r\n\t\t// Gravatar variables by SNascimento\r\n\t\t$displayGravatar = $options['displayGravatar'];\r\n\t\t$avatarSize = $options['avatarSize'];\r\n\r\n\t\t// This sets the type of list to be used\r\n\t\tif($listType == \"num\") {\r\n\t\t\t$listStart = \"<ol>\";\r\n\t\t\t$listEnd = \"</ol>\";\r\n\t\t} else {\r\n\t\t\t$listStart = \"<ul>\";\r\n\t\t\t$listEnd = \"</ul>\";\r\n\t\t}\r\n\r\n\t\t// This is the function that prepare time period limitation for filtering\r\n\t\tif($listPeriod == \"h\") {\r\n\t\t\t$listPeriod = \"DATE_FORMAT(comment_date, '$%Y-%m-%d %H') = DATE_FORMAT(CURDATE(), '%Y-%m-%d %H')\";\r\n\t\t} elseif($listPeriod == \"d\") {\r\n\t\t\t$listPeriod = \"DATE_FORMAT(comment_date, '%Y-%m-%d') = DATE_FORMAT(CURDATE(), '%Y-%m-%d')\";\r\n\t\t} elseif($listPeriod == \"w\") {\r\n\t\t\t$listPeriod = \"DATE_FORMAT(comment_date, '%Y-%v') = DATE_FORMAT(CURDATE(), '%Y-%v')\";\r\n\t\t} elseif($listPeriod == \"m\") {\r\n\t\t\t$listPeriod = \"DATE_FORMAT(comment_date, '%Y-%m') = DATE_FORMAT(CURDATE(), '%Y-%m')\";\r\n\t\t} elseif($listPeriod == \"y\") {\r\n\t\t\t$listPeriod = \"DATE_FORMAT(comment_date, '%Y') = DATE_FORMAT(CURDATE(), '%Y')\";\r\n\t\t} elseif($listPeriod == \"a\") {\r\n\t\t\t$listPeriod = \"1=1\";\r\n\t\t} elseif(is_numeric($listPeriod)) {\r\n\t\t\t$listPeriod = \"comment_date >= CURDATE() - INTERVAL $listPeriod DAY\";\r\n\t\t} else {\r\n\t\t\t$listPeriod = \"DATE_FORMAT(comment_date, '%Y-%m') = DATE_FORMAT(CURDATE(), '%Y-%m')\";\r\n\t\t}\r\n\r\n\t\t// This writes out the proper SQL whether to group commenters\r\n\t\t// by score or by e-mail\r\n\t\tif($options['groupBy'] == \"0\") {\r\n\t\t\t$groupBy = \"GROUP BY utility_cache\";\r\n\t\t} else {\r\n\t\t\t$groupBy = \"GROUP BY leaderboard_email\";\r\n\t\t}\r\n\r\n\t\t// These lines generate our output. Widgets can be very complex\r\n\t\t// but as you can see here, they can also be very, very simple.\r\n\t\tglobal $wpdb;\r\n\t\t$commenters = $wpdb->get_results(\"\r\n\t\t\tSELECT leaderboard_name, utility_cache\r\n\t\t\tFROM wp_surveys_responses\r\n\t\t\t\tWHERE leaderboard_email != ''\r\n\t\t\t\t$excludeNames\r\n\t\t\t\t$filterUrl\r\n\t\t\t\t$filterEmail\r\n\t\t\tORDER BY utility_cache DESC\r\n\t\t\t$limitList\r\n\t\t\t\");\r\n\r\n\t\tif(is_array($commenters)) {\r\n\t\t\t$countList = 0;\r\n\t\t\techo $listDesc . \"\\n\";\r\n\t\t\techo $listStart . \"\\n\";\r\n\t\t\tforeach ($commenters as $k) {\r\n\t\t\t\t$url = ns_get_user_url($k->leaderboard_name);\r\n\r\n// This writes out the list of commentors and checks for 1) Hyperlink each name,\r\n// 2) NoFollow each name, 3) Limit characters in names, 4) Remarks for blank list, and\r\n// 5) Display only users with URLs variables\r\n\r\n// check if onlyWithUrl = 1\r\nif($options['onlyWithUrl'] == '1') {\r\n// if onlyWithUrl = 1, check if trimurl != ''\r\n// write\r\nif(trim($url) != '') {\r\n\t\t\t\techo \"<li>\";\r\n\t\t\t\tif(trim($url) != '' ) {\r\n\t\t\t\t\tif($makeLink == 1) {\r\n\t\t\t\t\t\techo \"<a href='\" . $url . \"'\";\r\n\t\t\t\t\t\tif($noFollow == 1) echo \" rel='nofollow'\";\r\n\t\t\t\t\t\techo \">\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Gravatar display by SNascimento\r\n\t\t\t\tif($displayGravatar == 1) {\r\n\t\t\t\t\t$image=md5(strtolower($k->leaderboard_email));\r\n\t\t\t\t\t$defavatar=urlencode($defaultGravatar);\r\n\t\t\t\t\techo '<img class=\"tcwGravatar\" src=\"http://www.gravatar.com/avatar.php?gravatar_id='.$image.'&amp;size='.$avatarSize.'&amp;default='.$defavatar.'\" alt =\"'.$k->leaderboard_name.'\" title=\"'.$k->leaderboard_name.'\" /> ';\r\n\t\t\t\t}\r\n\r\n\t\t\t\techo ns_substr_ellipse($k->leaderboard_name, $limitChar);\r\n#\t\t\t\tif($showCount == 1) echo \" (\" . $k->comment_comments . \")\";\r\n\t\t\t\tif($showUtility == 1) echo \" (\" . $k->utility_cache . \")\";\r\n\t\t\t\techo print_r($k);\r\n\t\t\t\tif(trim($url) != '') {\r\n\t\t\t\t\tif($makeLink == 1)\r\n\t\t\t\t\t\techo \"</a>\";\r\n\t\t\t\t}\r\n\t\t\t\techo \"</li>\\n\";\r\n\t\t\t\tunset($url);\r\n\t\t\t\t$countList = $ $countList + 1;\r\n// finish checking trimurl\r\n}\r\n// if onlyWithUrl = 0\r\n// write\r\n} else {\r\n\t\t\t\techo \"<li>\";\r\n\t\t\t\tif(trim($url) != '' ) {\r\n\t\t\t\t\tif($makeLink == 1) {\r\n\t\t\t\t\t\techo \"<a href='\" . $url . \"'\";\r\n\t\t\t\t\t\tif($noFollow == 1) echo \" rel='nofollow'\";\r\n\t\t\t\t\t\techo \">\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Gravatar display by SNascimento\r\n\t\t\t\tif($displayGravatar == 1) {\r\n\t\t\t\t\t$image=md5(strtolower($k->leaderboard_email));\r\n\t\t\t\t\t$defavatar=urlencode($defaultGravatar);\r\n\t\t\t\t\techo '<img class=\"tcwGravatar\" src=\"http://www.gravatar.com/avatar.php?gravatar_id='.$image.'&amp;size='.$avatarSize.'&amp;default='.$defavatar.'\" alt =\"'.$k->leaderboard_name.'\" title=\"'.$k->leaderboard_name.'\" border=\"0\"/> ';\r\n\t\t\t\t}\r\n\r\n\t\t\t\techo ns_substr_ellipse($k->leaderboard_name, $limitChar);\r\n#\t\t\t\tif($showCount == 1) echo \" (\" . $k->comment_comments . \")\";\r\n\t\t\t\tif($showUtility == 1) echo \" (\" . $k->utility_cache . \")\";\r\n\t\t\t\t\r\n\t\t\t\tif(trim($url) != '') {\r\n\t\t\t\t\tif($makeLink == 1)\r\n\t\t\t\t\t\techo \"</a>\";\r\n\t\t\t\t}\r\n\t\t\t\techo \"</li>\\n\";\r\n\t\t\t\tunset($url);\r\n\t\t\t\t$countList = $ $countList + 1;\r\n// end check onlyWithUrl\r\n}\r\n\t\t\t}\r\n\t\t\tif($countList == 0)\r\n\t\t\t\techo \"<li>\" . $listNull . \"</li>\\n\";\r\n\t\t\techo $listEnd;\r\n\t\t} else {\r\n\t\t\techo \"<ul><li>\" . $listNull . \"</li></ul>\" . \"\\n\";\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "b6ffabdd983c1ec2490cdaa5753a7b73", "score": "0.5023742", "text": "function wpi_comment_paging_noindex_meta()\n{\tglobal $wp_query;\n\n\tif (version_compare( (float) get_bloginfo('version'), 2.7, '>=') ){\n\n\t\tif ($wp_query->is_singular && get_option('page_comments')){ // comments paging enabled\n\t\t\tif (isset($wp_query->query['cpage'])\n\t\t\t\t&& absint($wp_query->query['cpage']) >= 1 ){\n\n\t\t\t\techo '<meta name=\"robots\" content=\"noindex\" />'.PHP_EOL;\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "8acdf082678983923f548e97464856e1", "score": "0.50115585", "text": "public function index()\n {\n // Si no tiene permisos para ver el listado lo echa.\n if (!auth()->user()->can('admin-posts-comments-list')) {\n app()->abort(403);\n }\n\n $page_title = trans(\"posts::admin_lang.news_comments\");\n\n return view(\"posts::admin_comments_index\", compact('page_title'));\n //->with('page_title_icon', $this->page_title_icon);\n }", "title": "" }, { "docid": "d7649bb5ea36c260e6ff0112bfe79bff", "score": "0.50074893", "text": "public function comments() {\n }", "title": "" }, { "docid": "aa002fc26f9300d2806c8be16b2dbdab", "score": "0.49910253", "text": "function showUserNotes($conn, $current_page_num, $page_limit, $page_offset, $condition, $note_count){\n $query = \"SELECT * FROM notes $condition ORDER BY created_at DESC LIMIT $page_limit OFFSET $page_offset\";\n // fetching data\n $res = mysqli_query($conn, $query);\n $data = mysqli_fetch_all($res, MYSQLI_ASSOC);\n\n if (empty($data)) {\n echo \"<h1 class='title pb-6 '>No notes to display.</h1>\";\n return;\n }\n\n echo \"<div class='columns'>\";\n foreach ($data as $noteInfo) {\n include('templates/note.view.php');\n }\n echo \"</div>\";\n\n $total_page = ceil($note_count / $page_limit);\n $next_page = $current_page_num+1;\n $prev_page = $current_page_num-1;\n\n if(isset($_GET['user'])){\n $user = \"&user=\".$_GET['user'];\n }\n else {\n $user = \"\";\n }\n\n echo \"<nav class='pagination mb-6' role='navigation' aria-label='pagination'>\";\n //showing prev button and check current page number is greater than 1\n $prev = \"class='pagination-previous' \".(($current_page_num > 1)? 'href=\\'?page='.$prev_page.$user.'\\'' :'disabled');\n $next = 'class=\"pagination-next\" '.(($total_page+1 != $next_page)? 'href=\\'?page='.$next_page.$user.'\\'' :'disabled');\n echo '<a '.$prev.'>Previous</a>';\n echo '<a '.$next.'>Next</a>';\n // show all number of pages\n echo \"<ul class='pagination-list'>\";\n for($i = 1; $i <= $total_page; $i++){\n echo \"<li>\";\n //highlight the current page number\n if($i == $current_page_num){\n echo '<a href=\"'.'?page='.$i.$user.'\" class=\"pagination-link is-current\">'.$i.'</a>';\n }else{\n echo '<a href=\"?page='.$i.$user.'\" class=\"pagination-link\">'.$i.'</a>';\n }\n echo \"</li>\";\n }\n\n // showing next button and check this is last page\n\n\n echo \"</nav>\";\n}", "title": "" }, { "docid": "5e844e8d2788ad6176c9eb6d9da8d2cb", "score": "0.49847904", "text": "function omega_author_uri_shortcode() {\r\n\treturn omega_get_author_uri();\r\n}", "title": "" }, { "docid": "e7d151ef29d8eaac0f3b592b236f9652", "score": "0.49828005", "text": "function getComments(){\r\n \r\n $commentsModel = new \\C\\TopElagage\\Model\\Comments();\r\n $comments = $commentsModel->get_comments();\r\n $this->render(\"home\", [\"comments\" => $comments]);\r\n }", "title": "" }, { "docid": "9c1d4af036aba2548bc03d2e9f5f4c93", "score": "0.498083", "text": "public function getPerPageName(): string;", "title": "" }, { "docid": "cb219144dfd459b5b0db09255d987b80", "score": "0.49796355", "text": "public function showMyPosts()\n {\n $tt = Auth::user()->name;\n $posts = Post::where ('username',$tt) ->orderBy('created_at', 'desc')//->simplepaginate(3);\n ->paginate(config('comsenblog.posts_per_page'));\n return view('backend.posts.showmyposts', compact('posts'));\n }", "title": "" }, { "docid": "ffeb7b1b5adbc34ce249157ec0f3c9aa", "score": "0.49756283", "text": "function bp_get_forum_pagination() {\n\t\tglobal $forum_template;\n\n\t\treturn apply_filters( 'bp_get_forum_pagination', $forum_template->pag_links );\n\t}", "title": "" }, { "docid": "1dba026c28da18c898c9f12e72d24927", "score": "0.49746415", "text": "function whiteboard_pings($comment, $args, $depth)\n{\n\t$GLOBALS['comment'] = $comment;\n?>\n\t<li <?php comment_class(); ?> id=\"comment-<?php comment_ID(); ?>\">\n\t\t<?php comment_author_link() ?>\n\t</li>\n<?php\n}", "title": "" }, { "docid": "03082333e4c25ac013d7617488f59d08", "score": "0.49710286", "text": "public function user_view()\n {\n $params = App::getRouter()->getParams();\n\n if (isset($params[0])) {\n $id = strtolower($params[0]);\n $this->data['user'] = $this->model->getUserById($id);\n $this->data['user_comments'] = $this->model->getUserComments($id);\n }\n\n /*\n * create array for pagination tree\n */\n $count_rows = 0;\n $this->data['pagination_news'] = array();\n foreach($this->data['user_comments'] as $comment) {\n $this->data['pagination_comment'][$count_rows/20][] = $comment;\n $count_rows++;\n }\n\n // data for pagination work\n $this->data['current_comment'] = (isset($params[0])) ? $params[0] : 0;\n $this->data['current_pag'] = (isset($params[1])) ? $params[1] : 0;\n $this->data['last_pag'] = (int)(count($this->data['user_comments'])/20)-1;\n\n // data for advertising\n $this->data['adv'] = $this->model->getAdvertising();\n shuffle($this->data['adv']);\n $this->data['adv_left'] = array_slice($this->data['adv'],0,4);\n $this->data['adv_right'] = array_slice($this->data['adv'],3,4);\n }", "title": "" }, { "docid": "a1ae00bb49fb7fd40a08f1a1072feb15", "score": "0.4967898", "text": "function apoc_comments_link() {\n\t$comments_link = '';\n\t$number = doubleval( get_comments_number() );\n\t$comments_link = '<a class=\"comments-link button\" href=\"' . get_comments_link() . '\" title=\"Article Comments\"><i class=\"icon-comments\"></i>';\n\tif( $number == 0 ) :\n\t\t$comments_link .= 'Leave a Comment';\n\telseif ( $number > 0 ) :\n\t\t$comments_link .= 'Comments <span class=\"comments-link-count activity-count\">' . $number . '</span>';\n\tendif;\n\t$comments_link .= '</a>';\n\tif( $comments_link ) echo $comments_link;\n}", "title": "" }, { "docid": "9e85e7e00c8a2f1b85752a99c460b477", "score": "0.49630105", "text": "public function index()\n {\n $comments = Comment::with(['user','product'])->paginate(5);\n\n return view('admin.comment.index',compact('comments'));\n }", "title": "" }, { "docid": "cbd31c488861abb7442d130004f032a0", "score": "0.49630016", "text": "function getPostComments()\n\t{\n\t}", "title": "" }, { "docid": "10be072b4b34dabf6fe83a8ff06800c1", "score": "0.49615288", "text": "function numbering_pagination(){\n global $wp_query;\n\n $number_of_all_pages=$wp_query -> max_num_pages;\n $current_page = max(1,get_query_var('paged')); // get current page\n\n if($number_of_all_pages > 1){\n return paginate_links(array(\n 'base' => get_pagenum_link() . '%_%',\n \"format\" => \"page/%#%\",\n \"current\" => $current_page,\n 'mid_size' => 1, // How many numbers to either side of the current pages. Default 2.\n 'end-size' => 2 // How many numbers on either the start and the end list edges. Default 1.\n ));\n }\n }", "title": "" }, { "docid": "511b84f172d14f8555b51d4dbf0ba604", "score": "0.49596065", "text": "function rosewellness_hook_archive_pagination() {\n do_action('rosewellness_hook_archive_pagination');\n}", "title": "" }, { "docid": "2e47a14fea24481a98fe9da80085ecdc", "score": "0.49574882", "text": "public function index()\n {\n $comments = Comment::with('post')->paginate(30);\n return view('admin.comments.index', compact('comments'));\n }", "title": "" }, { "docid": "af83b9af0d9202e6864ca9d44e1dde29", "score": "0.49544135", "text": "public function firstPageUrl();", "title": "" }, { "docid": "2e604cc9be29cc45229545c9c2dfa922", "score": "0.49503908", "text": "public function indexDirector()\n {\n return UsersResource::collection(User::isDirector()->paginate(config('constants.PAGINATION')));\n }", "title": "" }, { "docid": "1925dacca04f2e3b9b8e1d5ba349a32b", "score": "0.49473405", "text": "public function getURL() {\n\t\treturn $this->getArticle()->getURL().'#comment'.$this->getId();\n\t}", "title": "" }, { "docid": "db509b8518f9813ef6c4fa81f22b14df", "score": "0.49424264", "text": "function comment ($con,$table,$limit,$order_col,$order,$visible_page) {\n\n\t\t$count_sql = \"SELECT * FROM $table\"; \n\t\t$sql_result = mysqli_query($con,$count_sql); \n\t\t$count = mysqli_num_rows($sql_result); \n\n\t\t$toatal_post = $count;\n\t\t$limit = 5; \n\t\t$total_page = ceil($toatal_post / $limit);\n\t\t$visible_page = 5;\n\t \n\t\tif (isset($_GET[\"cmt_page\"])) { $page = $_GET[\"cmt_page\"]; } else { $page=1; }; \n\t\t$start_from = ($page-1) * $limit; \n\t\t\t\t\t\t\t\t\t\t\n\t\t//Limit our results within a specified range. \n\t\t\n\t\t$results = mysqli_query($con,\"SELECT * FROM $table ORDER BY $order_col $order LIMIT $start_from, $limit\") or die (\"Database not connet.\");\n\t\t\n\t\tif($count !=0){\n\n\t\techo'<table class=\"table table-striped\">\n\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t<th>#</th>\n\t\t\t\t<th> Name </th>\n\t\t\t\t<th>Email</th>\n\t\t\t\t<th>Message</th>\n\t\t\t</tr>\n\t\t</thead>\n\t\t<tbody>';\n\t\t//output results from database\n\t\t\twhile($row = mysqli_fetch_array($results))\n\t\t\t{\t$comment_pid = $row['pid'];\n\t\t\t\t$comment = $row['content'];\n\t\t\t\t$sender_name = $row['name'];\n\t\t\t\t$sender_email = $row['email'];\n\t\t\t\t$datetime = $row['datetime'];\n\t\t\t\t$cid = $row['cid'];\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t echo '\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td>'.$row[\"cid\"].'</td>\n\t\t\t\t\t\t\t\t\t<td>'.$sender_name.'</td>\n\t\t\t\t\t\t\t\t\t<td>'.$sender_email.'</td>\n\t\t\t\t\t\t\t\t\t<td><a href=\"comment_details.php?cid='.$cid.'\">'.substr($comment,0,15) . '...</a></td>\n\t\t\t\t\t\t\t\t\t<td><a href=\"post_details.php?pid='.$comment_pid.'\">View on post</a></td>\n\t\t\t\t\t\t\t\t</tr>';\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t \n\t\t\t<?php\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t\t\techo 'There are no comment yet.';\n\t\t\t\t\t}\n\t\techo'\t</tbody>\n\t\t\t</table>';\n\t\t\t ?> \n\t\t\t\t\n\t\t\t\t<ul id=\"pagination-comment\" class=\"pagination-md\"></ul>\n\t\t\n\t\t<!--Pgination -->\n\t\t\t<script>\n\t\t\t$('#pagination-comment').twbsPagination({\n\t\t\t\ttotalPages:<?php echo $total_page; ?>,\n\t\t\t\tvisiblePages:<?php echo $visible_page; ?>,\n\t\t\t\t href: '?cmt_page={{number}}'\n\t\t\t});\n\t\t </script>\n\t\t\t\n\t\t\t<?php \n\t\t\t\n\t}", "title": "" }, { "docid": "826b0f2916ceb3bd87daaacab82a29ce", "score": "0.4935304", "text": "public function getComments(Post $post){\n if(Post::where('id', $post->id)){\n $comments = Post::Find($post->id)->comment()->paginate(5);\n \n return view('posts.post-page',[\n 'comments' => $comments,\n 'post' => $post\n ]);\n }\n }", "title": "" }, { "docid": "58c0990339a63876355d86544fefd4cf", "score": "0.4932867", "text": "public function getName()\n {\n return 'pagination';\n }", "title": "" }, { "docid": "62ece114794f5dafb7d19c92b004ca80", "score": "0.49265653", "text": "public function nextPageUrl();", "title": "" }, { "docid": "d77b419352af8b2323f81783591cd242", "score": "0.49165168", "text": "function ca_comment_latest_posts ($count=10, $show_count='yes', $before='<li>', $after='</li>', $before_count='(', $after_count=')') {\nglobal $wpdb, $comment;\n\n $comments=$wpdb->get_results(\"SELECT id\n ,post_title\n ,COUNT(*) cnt \n FROM $wpdb->comments, $wpdb->posts \n WHERE comment_approved = '1' \n AND comment_post_id = id \n GROUP BY id, post_title \n ORDER BY comment_date DESC\");\n\n foreach($comments as $comment) {\n echo $before.'<a href=\"'.get_permalink($comment->id).'\">'.stripslashes($comment->post_title).'</a>';\n if ($show_count != 'no')\n echo $before_count.$comment->cnt.$after_count;\n echo $after;\n if (++$ccount == $count) break;\n }\n}", "title": "" }, { "docid": "ebaa0f0c20c9bafd0abe1e5fe64532ae", "score": "0.4910947", "text": "public function index()\n {\n $comment=Comments::orderBy('created_at', 'desc')->cursorPaginate(5);\n // $comments = $this->user->posts()->get(['id', 'post', 'user_id','liked']);\n return response()->json(\n [\n 'comment' => $comment,\n 'user' => $this->user,\n ]);\n\n }", "title": "" }, { "docid": "c05c0f86f1f6cb13e04cc9d94223288d", "score": "0.49086198", "text": "private function buildComments()\n {\n $ajax = 0;\n // We need to see if we are on a certain page.\n if(isset($_GET['page']))\n {\n $page = $_GET['page']*$this->PerPage;\n $ajax = 1; // We need to let the script know this should be done through a ajax call\n }\n else\n {\n $page = 0;\n }\n $query = \"SELECT comments.id, comments.comments, comments.isSpoiler, comments.ip, comments.dated, comments.negative, comments.positive, comments.uid, u.Username, u.avatarActivate, u.avatarExtension, (SELECT COUNT(id) FROM ratings WHERE rating_id=CONCAT('c',comments.id) AND IP = '1') AS Voted FROM page_comments AS comments, users AS u WHERE comments.epid = '\" . $this->mysqli->real_escape_string($this->Epid) .\"' AND comments.is_approved = '1' AND comments.type = 0 AND comments.uid=u.ID ORDER by comments.dated DESC LIMIT $page, \" . $this->PerPage;\n $this->mysqli->query(\"SET NAMES 'utf8'\");\n $result = $this->mysqli->query($query);\n $count = mysqli_num_rows($result);\n if($count == 0)\n {\n echo '<div style=\"font-size:20px;margin:10px;color:#d0d0d0;\" align=\"center\">There have been no comments for this video. Oh no...!</div>';\n }\n else\n {\n while($row = $result->fetch_assoc())\n {\n $uid = $row['uid'];\n $cid = $row['id'];\n $comments = $row['comments'];\n $comments = preg_replace('/\\v+|\\\\\\[rn]/','<br />',$comments);\n $comments = stripslashes($comments);\n $isSpoiler = $row['isSpoiler'];\n $ip = $row['ip'];\n $dated = $row['dated'];\n $negative = $row['negative'];\n $positive = $row['positive'];\n\n // Build the date in a normal format..\n $dated = str_replace(array(\" \",\":\"),\"-\",$dated);\n list($year,$month,$day,$hour,$minute) = explode(\"-\",$dated);\n // you can edit this line to display date/time in your preferred notation\n $dated = @date(\"M jS Y\",mktime($hour,$minute,0,$month,$day,$year));\n\n\n // Build the users avatar\n if($row['avatarActivate'] == 'no')\n {\n $avatar = '<img src=\"' . $this->ImageHost . '/avatars/default.gif\" alt=\"avatar\" height=\"50px\" border=\"0\" />';\n }\n else\n {\n $avatar = '<img src=\"' . $this->ImageHost . '/avatars/user'.$uid.'.'.$row['avatarExtension'].'\" alt=\"User avatar\" height=\"60px\" border=\"0\" />';\n }\n if($isSpoiler == 1)\n {\n $comments = \"<a style=\\\"cursor:pointer;\\\" onclick=\\\"ShowHideContent(this,'comment_\".$cid.\"');\\\">****Episode Spoiler**** (click to reveal)</a>\\n<span id=\\\"comment_\".$cid.\"\\\" style=\\\"display:none\\\">\".$comments.\"</span>\\n\";\n }\n // /scripts.php?view=utilities&amp;mode=comutil&amp;stage=after&amp;cid=42213&amp;username=chichi&amp;uid=14788&amp;vote=down\n $commentajax = \"ajax_loadContent('ca-\".$cid.\"','/scripts.php?view=utilities&mode=comutil&cid=\".$cid.\"&username=\".$row['Username'].\"&uid=\".$uid.\"&stage=before');\";\n // Action bar code\n $actionbar = '';\n if($this->UserArray['logged-in'] == 1)\n {\n if($row['Voted'] == 0)\n {\n // it means they have not voted yet\n $actionbar .= '<a id=\"cid-up-' . $cid . '\" class=\"vote-up linkopacity\" style=\"cursor:pointer;\" title=\"Vote Up this Comment!\"><img src=\"//animeftw.tv/images/tinyicons/thumb_up.png\" alt=\"\" border=\"0\"></a>&nbsp;';\n $actionbar .= '<a id=\"cid-dw-' . $cid . '\" class=\"vote-down linkopacity\" style=\"cursor:pointer;\" title=\"Vote Down this Comment!\"><img src=\"//animeftw.tv/images/tinyicons/thumb_down.png\" alt=\"\" border=\"0\"></a>&nbsp;';\n }\n else\n {\n // it means they already voted this up or down.\n $actionbar .= '<a class=\"linkopacity\" title=\"You have already voted on this comment!\"><img src=\"//animeftw.tv/images/tinyicons/thumb_up.png\" alt=\"\" border=\"0\"></a>&nbsp;';\n $actionbar .= '<a class=\"linkopacity\" title=\"You have already voted on this comment!\"><img src=\"//animeftw.tv/images/tinyicons/thumb_down.png\" alt=\"\" border=\"0\"></a>&nbsp;';\n }\n }\n $actionbar .= '<a href=\"/pm/compose/' . $uid . '\" title=\"Will open in a new Tab\" target=\"_blank\" class=\"linkopacity\"><img src=\"//animeftw.tv/images/tinyicons/email.png\" alt=\"\" border=\"0\"></a>&nbsp;';\n $actionbar .= '<a href=\"javascript:void(0)\" class=\"linkopacity\" title=\"Report Comment\" onclick=\"alert(\\'Feature coming soon!\\');\"><img src=\"//animeftw.tv/images/tinyicons/exclamation.png\" alt=\"\" border=\"0\"></a>&nbsp;';\n $actionbar .= '<a href=\"/user/' . $row['Username'] . '\" class=\"linkopacity\" title=\"View User\\'s Profile\" target=\"_blank\"><img src=\"//animeftw.tv/images/tinyicons/user.png\" alt=\"\" border=\"0\"></a>';\n\n echo '\n <div class=\"single-comment-wrapper\" style=\"margin:20px 0 20px 10px;\">\n <div class=\"comment-wrapper\" id=\"comment-' . $cid . '\">\n <div class=\"comment-left\" style=\"display:inline-block;width:10%;vertical-align:top;\" align=\"center\">\n <a href=\"/user/' . $row['Username'] . '\">' . $avatar . '</a>\n </div>\n <div class=\"comment-right\" style=\"display:inline-block;width:80%;vertical-align:top;margin-left:10px;\">\n <div>\n <div style=\"display:inline-block;\">\n ' . $this->string_fancyUsername($row['uid']) . '\n </div>\n <div style=\"display:inline-block;margin-left:15px;\">\n ' . $dated . '\n </div>\n </div>\n <div>\n ' . $comments . '\n </div>\n </div>\n </div>\n </div>';\n }\n\n if($ajax == 0 && $count == 20)\n {\n echo '</div>';\n echo '\n <script>\n var nextpage = 1;\n jQuery(\n function($)\n {\n $(\".comments-group\").bind(\"scroll\", function()\n {\n if($(\".comments-end-dynamic-data\").length)\n {\n }\n else\n {\n if($(this).scrollTop() + $(this).innerHeight()>=$(this)[0].scrollHeight)\n {\n var url = \\'/scripts.php?view=commentsv2&page=\\' + nextpage + \\'&epid=' . $this->Epid . '\\';\n $.post(url, function(data) {\n $(\\'#available-episodes\\').children().last().after(data);\n nextpage++;\n });\n }\n }\n })\n }\n );\n </script>';\n\n echo '\n <script>\n $(document).ready(function(){\n $(\".comment-wrapper\").hover(function() {\n\n });\n $(\".vote-up\").click(function() {\n var comment_id = $(this).attr(\"id\").substring(7);\n var request_url = \"/scripts.php?view=utilities&mode=comment-votes&cid=\" + comment_id + \"&vote=up\";\n $.get(request_url, function(){\n })\n .done(function(html) {\n if(html.indexOf(\"success\") >= 0)\n {\n $(\"#cid-dw-\" + comment_id).attr(\"title\").val(\"You voted up this comment!\");\n $(\"#cid-up-\" + comment_id).attr(\"title\").val(\"You voted up this comment!\");\n }\n else\n {\n alert(html);\n }\n })\n .fail(function(html) {\n alert(html);\n });\n });\n $(\".vote-down\").click(function() {\n var comment_id = $(this).attr(\"id\").substring(7);\n var request_url = \"/scripts.php?view=utilities&mode=comment-votes&cid=\" + comment_id + \"&vote=down\";\n $.get(request_url, function(){\n })\n .done(function(html) {\n if(html.indexOf(\"Success\") >= 0)\n {\n $(\"#cid-dw-\" + comment_id).attr(\"title\").val(\"You voted up this comment!\");\n $(\"#cid-up-\" + comment_id).attr(\"title\").val(\"You voted up this comment!\");\n }\n else\n {\n alert(html);\n }\n })\n .fail(function(html) {\n alert(html);\n });\n });\n });\n </script>';\n }\n }\n }", "title": "" }, { "docid": "6f5138bdad622103e6cc055b0ea6af8e", "score": "0.49069053", "text": "public function name()\n {\n return 'paginate';\n }", "title": "" }, { "docid": "85a3a261e654623a16ad426e5039efbd", "score": "0.48975378", "text": "public function get_comment_pagination( $post_id = null, $sort = null, $per_page = null, $page = null ){\n\n /** If we were not given a post ID see if we can find it. */\n if( empty($post_id) ){\n global $post;\n if ( $post ){\n $post_id = $post->ID;\n } else {\n /** Return empty now, this was called in a bad context and we can't find a post ID. */\n return '';\n }\n }\n\n /** Validate $sort. */\n switch( $sort ){\n case 'ASC':\n case 'asc':\n $sort = 'ASC';\n break;\n case 'DESC':\n case 'desc':\n default:\n $sort = 'DESC';\n break;\n }\n\n /** Validate $per_page. */\n if( !is_int( $per_page + 0 ) || $per_page < 50 || $per_page > 150 ){\n $per_page = 50;\n }\n\n /** Validate $page_number. */\n if( !is_int( $page + 0 ) ){\n $page = 1;\n }\n\n /** How many top level comments are there? */\n $comments_query = new WP_Comment_Query;\n if( $this->_admin ){\n $args = array(\n 'count' => true,\n 'parent' => 0,\n 'post_id' => $post_id,\n 'status' => 'all'\n );\n } else {\n $args = array(\n 'count' => true,\n 'parent' => 0,\n 'post_id' => $post_id,\n 'status' => 1\n );\n }\n $count = $comments_query->query( $args );\n\n /** Is there comments to show? */\n if( $count > 0 ){\n\n /** Yes. Build the pagination HTML. */\n $html = array();\n\n /** How many pages do we need? */\n $pages = ceil( $count / $per_page );\n\n /** The pagenation HTML templates. */\n $html[0] = '<div class=\"wm-pagination\">Showing <select id=\"wm-pagination-comment\">{{comment-options}}</select> comments per page. <select id=\"wm-pagination-sort\">{{sort-options}}</select> comments are shown first and this is page <select id=\"wm-pagination-page\">{{page-options}}</select> of {{page-count}}.</div>';\n $html[1] = '<div class=\"wm-pagination\">Showing <select id=\"wm-pagination-comment-bottom\">{{comment-options}}</select> comments per page. <select id=\"wm-pagination-sort-bottom\">{{sort-options}}</select> comments are shown first and this is page <select id=\"wm-pagination-page-bottom\">{{page-options}}</select> of {{page-count}}.</div>';\n\n /** Replace the various template parts with their actual values. */\n $html[0] = str_replace( '{{page-count}}', $pages, $html[0] );\n $html[1] = str_replace( '{{page-count}}', $pages, $html[1] );\n $replacement = '';\n\n /** Display X comments per page. */\n for( $x = 0; $x < 5; $x++ ){\n $count = 50 + $x * 25;\n if( $count == $per_page ){\n $replacement .= '<option value=\"' . $count . '\" selected=\"\">' . $count . '</option>';\n } else {\n $replacement .= '<option value=\"' . $count . '\">' . $count . '</option>';\n }\n }\n $html[0] = str_replace( '{{comment-options}}', $replacement, $html[0] );\n $html[1] = str_replace( '{{comment-options}}', $replacement, $html[1] );\n $replacement = '';\n\n /** Page options. */\n for( $x = 1; $x <= $pages; $x++ ){\n if( $x > $page ){\n $replacement .= '<option value=\"' . $x . '\">' . $x .'</option>';\n } else {\n $replacement .= '<option value=\"' . $x . '\" selected=\"\">' . $x .'</option>';\n }\n }\n $html[0] = str_replace( '{{page-options}}', $replacement, $html[0] );\n $html[1] = str_replace( '{{page-options}}', $replacement, $html[1] );\n $replacement = '';\n\n /** Sort options. */\n switch( $sort ){\n case 'DESC':\n $replacement = '<option value=\"DESC\" selected>Newest</option><option value=\"ASC\">Oldest</option>';\n break;\n default:\n $replacement = '<option value=\"DESC\">Newest</option><option value=\"ASC\" selected=\"\">Oldest</option>';\n break;\n }\n\n $html[0] = str_replace( '{{sort-options}}', $replacement, $html[0] );\n $html[1] = str_replace( '{{sort-options}}', $replacement, $html[1] );\n\n } else {\n /** No. Don't show any pagination. */\n $html = array( '', '' );\n }\n\n return $html;\n }", "title": "" }, { "docid": "1a976c2dbbc08182a9d17bfa108ec54a", "score": "0.48857838", "text": "function vgb_get_listing_pg($opts)\r\n{\r\n //Capture output\r\n ob_start();\r\n \r\n //First, get the comments and make sure we have some\r\n global $comment, $post;\r\n $comments = get_comments( array('post_id' => $post->ID, 'order' => ($opts['reverseOrder']?'ASC':'DESC') ) );\r\n $commentTotal = count($comments);\r\n \r\n //Output the header\r\n echo vgb_get_header($commentTotal, $opts['entriesPerPg'], $opts['diggPagination']);\r\n \r\n //Check for \"no entries\"\r\n if( $commentTotal == 0 ) {\r\n echo '<div id=\"gbNoEntriesWrap\">\r\n <hr>' . __('No entries yet', WPVGB_DOMAIN) . '. &nbsp;Be the first to sign the Guestbook.<hr></div>';\r\n if(true) {\r\n echo \"Powered by <b><a href='http://software.jamrizzi.com/store/products/rizzi-guestbook/' target='_blank'>Rizzi Guestbook</a></b>.<br />&nbsp;\";\r\n }\r\n }\r\n else {\r\n \r\n //Take a SLICE of the comments array corresponding to the current page\r\n $curPage = vgb_get_current_page_num();\r\n $comments = array_slice($comments, ($curPage-1)*$opts['entriesPerPg'], $opts['entriesPerPg']);\r\n $commentCounter = $commentTotal - ($curPage-1)*$opts['entriesPerPg'];\r\n \r\n //And output each comment!\r\n ?>\r\n<hr>\r\n <div id=\"gbEntriesWrap\">\r\n <?php foreach( $comments as $comment ): ?>\r\n\r\n<b><?php echo $comment->comment_author?></b>&nbsp;<?php edit_comment_link('<i><small>Edit</small></i>', '');?>\r\n\r\n<?php\r\n if( $comment->comment_approved == 1 ) comment_text();\r\n else echo __('<br />This entry is awaiting moderation.<br /><br />',WPVGB_DOMAIN);\r\n ?>\r\n\r\n<hr>\r\n\r\n <?php endforeach; ?>\r\n\r\n<?php\r\n global $wpdb;\r\n $rgb_show_powered_by_name = $wpdb->get_row(\"SELECT * FROM $wpdb->options WHERE option_name = 'rgb_show_powered_by'\", ARRAY_A);\r\n $rgb_show_powered_by_value = $rgb_show_powered_by_name['option_value'];\r\n if(true) {\r\n echo \"Powered by <b><a href='http://software.jamrizzi.com/store/products/rizzi-guestbook/' target='_blank'>Rizzi Guestbook</a></b>.<br />&nbsp;\";\r\n }\r\n?>\r\n\r\n<?php\r\n \r\n //if( $commentTotal == 0 ):\r\n}\r\n \r\n //Stop capturing output and return\r\n $output_string=ob_get_contents();\r\n ob_end_clean();\r\n return $output_string;\r\n}", "title": "" }, { "docid": "78367cb40f012cacf5f438ce811f3379", "score": "0.48845977", "text": "function getWidgetSlugs($params) {\n $slug = new stdClass();\n $slug->subscribe = home_url('/');\n $slug->unsubscribe = home_url('/');\n if ( isset($params['slug']) ) {\n $slug->subscribe = home_url('/'.$params['slug'].'/');\n $slug->unsubscribe = home_url('/'.$params['slug'].'/');\n }\n $slug->subscribe .= $this->config->custom->widgets->subscribe.'/';\n $slug->unsubscribe .= $this->config->custom->widgets->unsubscribe.'/';\n\n return $slug;\n }", "title": "" }, { "docid": "099c63ef1ebdf694e9fb79003705d913", "score": "0.48799598", "text": "function apoc_comment_admin_links() {\n\t\n\t// Make sure it's a logged-in user\n\tif ( !is_user_logged_in() ) return false;\n\t\n\t// If so, go ahead\n\tglobal $comment;\n\t$links = apoc_quote_button( 'comment' );\n\t$links .= '<a class=\"reply-link button button-dark\" href=\"#respond\" title=\"Quick Reply\"><i class=\"icon-reply\"></i>Reply</a>';\n\t$links \t.= apoc_comment_edit_button();\n\t$links\t.= apoc_comment_delete_button();\n\techo $links;\n}", "title": "" }, { "docid": "97245cefcfcc2cd2751a4fd0e7df18dc", "score": "0.48794284", "text": "public function getPageByUrl($slug);", "title": "" }, { "docid": "684725ccf71da87cb2f7fec4c4d7a9aa", "score": "0.48761413", "text": "function __construct() {\n\t\t$i = 1;\n\t\tforeach ( get_users() as $user ) { \n\t\t\t$display_name = $display_name = sanitize_title($user->display_name);\n\t\t\tif ( in_array(sanitize_title($user->display_name), $this->users) ) {\n\t\t\t\t$i++;\n\t\t\t\t$display_name .= \"-$i\";\t\n\t\t\t}\n\t \t$this->users[sanitize_title($user->user_login)] = $display_name;\n\t\t}\n\t\tadd_action('pre_get_posts', array(&$this, 'switch_author'));\n\t\tadd_filter('author_link', array(&$this, 'filter_author'), 10, 3);\n\t}", "title": "" } ]
7287496414dede30fd014a8b7e2f4f65
Asserts that the value is a directory and is readable.
[ { "docid": "23a54ad648884aaf6d55a1cf00f6b87f", "score": "0.6427655", "text": "public function toBeReadableDirectory(string $message = ''): self\n {\n if (! is_string($this->value)) {\n InvalidExpectationValue::expected('string');\n }\n\n Assert::assertDirectoryIsReadable($this->value, $message);\n\n return $this;\n }", "title": "" } ]
[ { "docid": "dfea0adc3aa89eb3393c58756d59cc11", "score": "0.6866605", "text": "public function isDir () {}", "title": "" }, { "docid": "dfea0adc3aa89eb3393c58756d59cc11", "score": "0.6866605", "text": "public function isDir () {}", "title": "" }, { "docid": "dfea0adc3aa89eb3393c58756d59cc11", "score": "0.6866605", "text": "public function isDir () {}", "title": "" }, { "docid": "dfea0adc3aa89eb3393c58756d59cc11", "score": "0.6866605", "text": "public function isDir () {}", "title": "" }, { "docid": "dfea0adc3aa89eb3393c58756d59cc11", "score": "0.6866605", "text": "public function isDir () {}", "title": "" }, { "docid": "9644537f7e01f9b9fe49a8f1d314f803", "score": "0.68664175", "text": "public static function assertDirectoryIsReadable(string $directory, string $message = ''): \\void {}", "title": "" }, { "docid": "b91f6b79aa1cb9a53e30e6f01541f244", "score": "0.6733193", "text": "public function testDirectoryRead()\n {\n $this->assertSame(array('.', '..', 'directory', 'file.ext'), scandir('test://domain/'));\n }", "title": "" }, { "docid": "c084f41ba9ea1cfb12c7b78f5ffdf355", "score": "0.67192066", "text": "protected function isValidInputDir($value)\n {\n return is_dir($value) || RemoteFileSystem::isRemoteHostPath($value);\n }", "title": "" }, { "docid": "1f6c98d33432113222ec13ab0689cf53", "score": "0.6715902", "text": "private function validateDirectory()\n {\n if(is_dir($this->path) && is_readable($this->path)) return true;\n\n return false;\n }", "title": "" }, { "docid": "d6e2db3eda7bf435602650bccf951c21", "score": "0.6634817", "text": "public function testCheckIfIsDirectory()\n {\n $vfs = vfsStream::setup('home');\n\n $dir = $vfs->url();\n $file = vfsStream::url('home/test.txt');\n file_put_contents($file, \"The new contents of the file\");\n\n $this->assertTrue(Filesystem::isDirectory($dir));\n $this->assertFalse(Filesystem::isDirectory($file));\n }", "title": "" }, { "docid": "11652b30d60f40cd36498643379be124", "score": "0.64959633", "text": "public function testIsFileReadable()\n {\n $result = \\PhakeBuilder\\FileSystem::isFileReadable('/this/file/will/never/exist.for.sure');\n $this->assertFalse($result);\n\n // Directory is not a file\n $result = \\PhakeBuilder\\FileSystem::isFileReadable(__DIR__);\n $this->assertFalse($result);\n\n // Not readable file\n $result = \\PhakeBuilder\\FileSystem::isFileReadable('/etc/shadow');\n $this->assertFalse($result);\n\n // Everything is fine\n $result = \\PhakeBuilder\\FileSystem::isFileReadable(__FILE__);\n $this->assertTrue($result);\n }", "title": "" }, { "docid": "c395fcc0c7124b2dc11a4089051a746e", "score": "0.64083284", "text": "public function validateDirectory($attribute, $value, $parameters)\n {\n return is_dir($value);\n }", "title": "" }, { "docid": "fe40c350c7bd2da9a918e9ae1b09d63b", "score": "0.6354486", "text": "public static function assertDirectoryNotIsReadable(string $directory, string $message = ''): \\void {}", "title": "" }, { "docid": "5a5ea50a8f15f4f3c0f023ba5edaa942", "score": "0.62662864", "text": "public function testIsDir()\n {\n\n // mock the filesystem\n $mockFilesystem = $this->getMockBuilder('TechDivision\\Import\\Adapter\\FilesystemAdapterInterface')\n ->setMethods(get_class_methods('TechDivision\\Import\\Adapter\\FilesystemAdapterInterface'))\n ->getMock();\n $mockFilesystem->expects($this->once())\n ->method('isDir')\n ->with($url = '/var/www/test')\n ->willReturn(true);\n\n // set the mock filesystem\n $this->filesystemTrait->setFilesystemAdapter($mockFilesystem);\n\n // query whether or not the directory exists\n $this->assertTrue($this->filesystemTrait->isDir($url));\n }", "title": "" }, { "docid": "5f46ab205a3221d56950d1b6ede89789", "score": "0.6260753", "text": "public static function assertDirectoryIsNotReadable(string $directory, string $message = ''): \\void {}", "title": "" }, { "docid": "5a4ee9dbf5adab27c6d571b367a62154", "score": "0.62415123", "text": "public function isDirectory()\r\n {\r\n return false;\r\n }", "title": "" }, { "docid": "67aca20e604b3041140c5326e35a7c1b", "score": "0.6230478", "text": "public function testValidDirectory()\n {\n $this->assertEquals($this->loader, $this->loader->addDirectory('./', false));\n }", "title": "" }, { "docid": "b76440ead6dbeb175b02ef02f35d0498", "score": "0.6209283", "text": "public function testDirectoryCreateFailsOnReadOnlyStream()\n {\n $this->assertFalse(mkdir('test-read://domain/directory/in-a-directory'));\n }", "title": "" }, { "docid": "5dd51f846b108850e39127a699eb96d0", "score": "0.61785376", "text": "public function test_can_convert_storedfile_to_directory() {\n $converter = $this->get_testable_mock();\n\n // A file with filename '.' is a directory.\n $file = $this->get_stored_file('', '.');\n\n $this->assertFalse($converter->can_convert_storedfile_to($file, 'target'));\n }", "title": "" }, { "docid": "0fb7f04ac4b74113c923f41f762a87da", "score": "0.61763585", "text": "protected function directoryIsNotReadable($path)\n\t{\n\n\t\t$absolute_path = realpath($path);\n\n\t\t// directory does not exists\n\t\tif( false === $absolute_path )\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// return if submitted parameter exists, but is not a directory\n\t\t\tif( !is_dir($absolute_path) )\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\tif( !is_readable($absolute_path) )\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "d58aac45be66d214549a0dd351301643", "score": "0.6143647", "text": "public function isDir($path);", "title": "" }, { "docid": "814753e3392938dc2e2cd1b503a7d6eb", "score": "0.609182", "text": "function isDir()\n {\n return is_dir($this->path);\n }", "title": "" }, { "docid": "b07efe96c7e0af55096668105e8cfe79", "score": "0.6086466", "text": "public function testIsDir()\n {\n $this->testMkdir();\n \n $result = $this->_controller->isDir($this->_basePath . '/PHPUNIT');\n \n $this->assertTrue($result);\n\n $result = $this->_controller->isFile($this->_basePath . '/PHPUNIT');\n \n $this->assertFalse($result);\n }", "title": "" }, { "docid": "dfd059ab062e6d619652a51c76c51d55", "score": "0.6029091", "text": "public function testDir() {\n\t\t$dirs = array(\n\t\t\t'folderA',\n\t\t\t'/folderA',\n\t\t\t'folderA/',\n\t\t\t'//folderA',\n\t\t\t'folderA//',\n\t\t\t' folderA ',\n\t\t\t'/folderB/../folderA/',\n\t\t\t'/folderA/../folderB/../folderA/',\n\t\t\t'/folderB/././../folderA/../folderB/./../folderA',\n\t\t);\n\t\t$expected = '/folderA/';\n\t\t\n\t\tforeach($dirs as $dir) {\n\t\t\t$x = $this->_getX($dir);\n\t\t\t$this->assertEqual($x->getDirPath(false), $expected);\n\t\t}\n\t\t\n\t\t// directory paths above root\n\t\t$dirs = array(\n\t\t\t'/../'\n\t\t);\n\t\t$expected = '/';\n\t\t\n\t\tforeach($dirs as $dir) {\n\t\t\t$x = $this->_getX($dir);\n\t\t\t$this->assertEqual($x->getDirPath(false), $expected);\n\t\t}\n\t\t\n\t\t// accessing a non-existant directory throws exception\n\t\t$this->expectException('Exception');\n\t\t$x = $this->_getX('/non-existant-dir/');\n\t\t\n\t}", "title": "" }, { "docid": "3cec357531d8a6ca4f1a8b94d349c138", "score": "0.5976633", "text": "public function testUnwriteableDirectory()\n {\n $tmpDirectory = sys_get_temp_dir();\n $prefix = 'unwriteable';\n\n // remove old directories\n shell_exec('rm -rf ' . $tmpDirectory . '/' . $prefix . '*');\n // create path\n $unwriteable = tempnam($tmpDirectory, $prefix . '-');\n\n unlink($unwriteable);\n mkdir($unwriteable);\n chdir($unwriteable);\n chmod($unwriteable, 0444);\n\n $this->expectException(IOException::class);\n\n $this->commandTester->execute([\n 'command' => $this->command->getName(),\n ]);\n }", "title": "" }, { "docid": "85e1ddf5efc4a6e9c818795d693099ba", "score": "0.5949806", "text": "public function isFolder(): bool { return is_dir($this->path); }", "title": "" }, { "docid": "04ff003d8a047cf1b4a77704b160f70e", "score": "0.5929469", "text": "public function isDir(): bool\n {\n return $this->_is_dir;\n }", "title": "" }, { "docid": "981b68d0962ea003b198df8e412caf2c", "score": "0.5929453", "text": "public function isDir(string $path): bool;", "title": "" }, { "docid": "15b09344c4755e7aaabf668c56bc7a0a", "score": "0.5897243", "text": "public function isDirectory()\n {\n return $this->name[strlen($this->name) - 1] === '/';\n }", "title": "" }, { "docid": "d54f31f7f11c98f1f78e64dbf5c351c8", "score": "0.58971274", "text": "public function testAddPathThrowsExceptionOnUnreadableDirectory()\n {\n try {\n $this->handler->addPath('/an/unreadable/directory/path');\n } catch(Phergie_Plugin_Exception $e) {\n $this->assertEquals(\n Phergie_Plugin_Exception::ERR_DIRECTORY_NOT_READABLE,\n $e->getCode()\n );\n return;\n }\n\n $this->fail('An expected exception has not been raised');\n }", "title": "" }, { "docid": "6732bdf394764cd62931ad0b2d77692c", "score": "0.5882911", "text": "public function isDirectory()\n {\n return $this->_is_dir;\n }", "title": "" }, { "docid": "19d8f573d8239c72a4371f2e67483811", "score": "0.5881452", "text": "public function testCreateBadDirectory()\n {\n new ResourceMirror(new EventDispatcher(), 'http://example.com/', '/a/probably/not/writable/directory');\n }", "title": "" }, { "docid": "a1fe80a57ba5a2cd2d51f0e752f79380", "score": "0.5841242", "text": "public function isDir() {\n return $this->isDir;\n }", "title": "" }, { "docid": "16952974bb994016ef6dc6f8dc5c6ba0", "score": "0.5839336", "text": "public static function validateDirectory($element, FormStateInterface $form_state) {\n // Strip slashes from the beginning and end of $element['file_directory'].\n $value = trim($element['#value'], '\\\\/');\n $form_state->setValueForElement($element, $value);\n }", "title": "" }, { "docid": "1611be001ce7cb0909bfeb0c0512f35e", "score": "0.58196294", "text": "public static function is_valid_dir($dir, $writable = FALSE) {\n if($writable) {\n return is_dir($dir) && is_readable($dir) && is_writable($dir);\n } else {\n return is_dir($dir) && is_readable($dir);\n }\n }", "title": "" }, { "docid": "af94af2e0ba24eec745ee5e4fcb0bc6e", "score": "0.58083344", "text": "public function testDirectory() {\n // A directory to operate on.\n $directory = $this->createDirectory();\n\n // Try to delete a directory.\n try {\n \\Drupal::service('file_system')->delete($directory);\n $this->fail('Expected NotRegularFileException');\n }\n catch (NotRegularFileException $e) {\n // Ignore.\n }\n $this->assertDirectoryExists($directory);\n }", "title": "" }, { "docid": "e8a076c98066924881d73c3f51139374", "score": "0.5795952", "text": "public function isDirectory()\n {\n return is_dir($this->path);\n }", "title": "" }, { "docid": "7ac008b1e261692f3cffdd5caee44ccf", "score": "0.5788885", "text": "public function isDir() {\n\t\treturn ($this->_isDir === true);\n\t}", "title": "" }, { "docid": "558ab5d99583288a7b5257f6f69fbc3c", "score": "0.57740754", "text": "public function is_dir($path)\n {\n }", "title": "" }, { "docid": "558ab5d99583288a7b5257f6f69fbc3c", "score": "0.57740754", "text": "public function is_dir($path)\n {\n }", "title": "" }, { "docid": "558ab5d99583288a7b5257f6f69fbc3c", "score": "0.57740754", "text": "public function is_dir($path)\n {\n }", "title": "" }, { "docid": "558ab5d99583288a7b5257f6f69fbc3c", "score": "0.57740754", "text": "public function is_dir($path)\n {\n }", "title": "" }, { "docid": "558ab5d99583288a7b5257f6f69fbc3c", "score": "0.57740754", "text": "public function is_dir($path)\n {\n }", "title": "" }, { "docid": "afdbeb07fa4025e988abe04668d65f97", "score": "0.57617486", "text": "public function testGetDirectory()\n {\n $mirror = new ResourceMirror(new EventDispatcher(), 'http://example.com/', $tempDir = sys_get_temp_dir());\n $this->assertEquals($tempDir, $mirror->getDirectory());\n }", "title": "" }, { "docid": "a30f2017ba1e168eae86172d699d213f", "score": "0.5759412", "text": "protected function _check_cache_dir() {\n $stat = @\\stat($this->cache_dir);\n \n if (!$stat) {\n // stat call failed - attempt make the directory\n if (!@\\mkdir($this->cache_dir)){\n // directory could not be created\n throw (\"Could not create cache directory!\");\n }\n \n } else if (!($stat[mode] & 040000)) {\n // not a directory !\n }\n }", "title": "" }, { "docid": "2cecf9f9ae34f27028220c4e2fa09245", "score": "0.5754638", "text": "public function isDir($directoryName);", "title": "" }, { "docid": "41034e85cb24ddef8a8fe03671ca88d9", "score": "0.5737025", "text": "public function getIsDir()\n {\n return $this->is_dir;\n }", "title": "" }, { "docid": "009004243173ad1701447fad331181b9", "score": "0.5723099", "text": "public function testDirectoryRewind()\n {\n $directoryResource = opendir('test://domain/');\n $entry = readdir($directoryResource);\n rewinddir($directoryResource);\n\n $this->assertSame($entry, readdir($directoryResource));\n }", "title": "" }, { "docid": "6b40d7441a716ead4baf252554e4fcb5", "score": "0.57221633", "text": "public function isDirectory() {\n\t\treturn is_dir($this->pathName);\n\t}", "title": "" }, { "docid": "98055e045b684fb651b9742eb5ccbff8", "score": "0.5704449", "text": "public function testReadable()\n {\n $path = __DIR__ . \"/somedir/somefile.txt\";\n $file = \\Loom\\File::fromPath($path);\n $strLen = 56;\n \n $this->assertTrue($file->read());\n $this->assertEquals($strLen, strlen($file->getContent()));\n }", "title": "" }, { "docid": "cd508682973fbf246424e1273dac1498", "score": "0.56965023", "text": "function privDirCheck($p_dir, $p_is_dir = \\false)\n {\n }", "title": "" }, { "docid": "66c6f03040bbd2c391cd01b0cabcd95f", "score": "0.56921685", "text": "public function isDirectory(): bool\n {\n return $this->getStorage()->isDirectory($this->getKey());\n }", "title": "" }, { "docid": "b8e29cd22574efb98d7e04056e8ab8ff", "score": "0.56860185", "text": "public function testEmptyDirectory() {\n\t\t$this->assertSame([], Tool::getDirectoryContents(__DIR__ . \"/RealDirTest/Empty\"));\n\t}", "title": "" }, { "docid": "964255dc49ddd5df48b5a87df6a89ee6", "score": "0.5679088", "text": "public function testNotReadable()\n {\n $path = __DIR__ . \"/somedir/some-other-file.txt\";\n $file = \\Loom\\File::fromPath($path);\n\n touch($path);\n chmod($path, 0000);\n \n $this->assertFalse($file->read());\n $this->assertEmpty($file->getContent());\n\n unlink($path);\n }", "title": "" }, { "docid": "6afc00a07b993af92369e6106ab60c2a", "score": "0.5674926", "text": "protected function checkDirectory() {\n\t\t\t$dirpath = $this->logDir;\n\n\t\t\tif (is_dir($dirpath)) {\n\t\t\t\tif (is_writable($dirpath)) {\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Exception(\"Directory \\\"{$dirpath}\\\" must be writable\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Exception(\"Directory \\\"{$dirpath}\\\" doesn't exists\");\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "b33be030d0599fd0269f9a0c790bc60e", "score": "0.5674219", "text": "public function testAddFolderWithInvalidDirectory()\n {\n $this->expectException(\\LogicException::class);\n $this->folders->add('name', vfsStream::url('does/not/exist'));\n }", "title": "" }, { "docid": "caa1ccf7019eb2ff34f35f3ee01d2a5a", "score": "0.56705517", "text": "public function isDir() {\r\n return ($this->lastFile!='.'&&$this->lastFile!='..'&&is_dir($this->lastFile));\r\n }", "title": "" }, { "docid": "c4b5bb9ed9c9f6c9250c2dbfc3f469b2", "score": "0.56651855", "text": "public function isDir($filePath);", "title": "" }, { "docid": "c4b5bb9ed9c9f6c9250c2dbfc3f469b2", "score": "0.56651855", "text": "public function isDir($filePath);", "title": "" }, { "docid": "fd5eab46224305b6bded56092f9e10c9", "score": "0.56598324", "text": "public function test_UserDirWithDrFile()\n {\n $this->setExpectedException('Q\\Exception', \"File '{$this->dir}' is not a regular file, but a directory\");\n $config = Config::with(\"file:mock:{$this->dir}\");\n }", "title": "" }, { "docid": "c751793ede531fb44e6b47bac03e2da0", "score": "0.56314373", "text": "public static function isReadableDirectory($dir) {\n return is_dir($dir) && is_readable($dir);\n }", "title": "" }, { "docid": "886f2de8dd9ab8065e7ad05e7b6bdca7", "score": "0.56239873", "text": "public function canSeeDirectory($path) {\n $this->scenario->addStep(new \\Codeception\\Step\\ConditionalAssertion('seeDirectory', func_get_args()));\n if ($this->scenario->running()) {\n $result = $this->scenario->runStep();\n return new Maybe($result);\n }\n return new Maybe();\n }", "title": "" }, { "docid": "836c14b7df620caa4346a25996342b99", "score": "0.5603678", "text": "public function isReadable(string $path): bool;", "title": "" }, { "docid": "d04f7b0e649dc6c4e246f9efbbb6ce7d", "score": "0.55977184", "text": "public function dir($value) {\n return $this->setProperty('dir', $value);\n }", "title": "" }, { "docid": "8bd37d8774dcd2be15134014a4ff39f3", "score": "0.559604", "text": "public function isValid():bool {\n\t\t\treturn $this->exists() && \\is_dir($this->path);\n\t\t}", "title": "" }, { "docid": "4645273f4c727e686d92afe377550a23", "score": "0.5582148", "text": "private function check_directory()\n\t{\n\t\tif ( ! is_dir(Kohana::config($this->type.'.cache_folder')))\n\t\t\tmkdir(Kohana::config($this->type.'.cache_folder'));\n\t}", "title": "" }, { "docid": "547c847112bff348be6d3cc20f7f8cc4", "score": "0.5578284", "text": "function check_dir( $dir )\n{\n\tif ( $dir && is_dir( $dir ) && is_writable( $dir ) && is_readable( $dir ) ) {\n\t\treturn 0;\n\t}\n\t$this->set_error( 'dir error : '.$dir );\n\treturn _C_WEBPHOTO_ERR_CHECK_DIR ;\n}", "title": "" }, { "docid": "546845d0679979f939a7af5cd6a4218f", "score": "0.5577106", "text": "public function accept()\r\n {\r\n return is_dir($this->getInnerIterator()->getPathname());\r\n }", "title": "" }, { "docid": "712a1043b953d33a404d2666e5e1d847", "score": "0.5571728", "text": "public static function assertDirectoryIsWritable(string $directory, string $message = ''): \\void {}", "title": "" }, { "docid": "a17205e66b97274ddbcb8ab18014ded2", "score": "0.5565655", "text": "public function isFolder() { return empty($this->path) || substr($this->path, -1) === '/'; }", "title": "" }, { "docid": "661ec8204cc2bd8d595a12ff294eae9d", "score": "0.55546165", "text": "public function canRead(string $directory): bool;", "title": "" }, { "docid": "1b293ed79eb9812d0d8072f447f189a1", "score": "0.55482686", "text": "public function testInvalidDirectoryPath()\n {\n $this->loader->addDirectory('/path/to/non/existing/directory');\n }", "title": "" }, { "docid": "ebd2604109692c5445a333b7e15e0aa8", "score": "0.5543085", "text": "public function toBeDirectory(string $message = ''): self\n {\n if (! is_string($this->value)) {\n InvalidExpectationValue::expected('string');\n }\n\n Assert::assertDirectoryExists($this->value, $message);\n\n return $this;\n }", "title": "" }, { "docid": "480cc5d6080e9766c835b72973bf9d00", "score": "0.5510054", "text": "public function testThrowsExceptionIfFileNotReadable()\n\t{\n\t\t$config = new Configuration('test.ini');\n\n\t\tchmod($this->absolutePath, 0220);\n\n\t\t$config->getIniValues();\n\t}", "title": "" }, { "docid": "2a068aba9a6e44f2c9ba0c8ccd844d31", "score": "0.5507523", "text": "private function validate()\n {\n $destination = realpath($this->destPath);\n if (!is_dir($destination)) {\n throw new \\Exception('The destination provided its not a directory');\n }\n if (!is_writable($destination)) {\n throw new \\Exception('The destination provided its not writable');\n }\n }", "title": "" }, { "docid": "e23baada5021517da4975781154a11f0", "score": "0.5497721", "text": "public function is_allowed_dir($dir)\n {\n }", "title": "" }, { "docid": "b2417758b9db55d59b8d19390dff3bb4", "score": "0.54878116", "text": "public function testCacheDirectoryMustBeWritableWhenDebugIsOn()\n {\n $optionsList = [\n ['debug' => true, 'directory' => __DIR__ . '/non-existent/'],\n ['debug' => false, 'directory' => __DIR__ . '/non-existent/']\n ];\n\n foreach($optionsList as $options) {\n\n $warnings = [];\n $cache = new Cache($options, $warnings);\n\n new SchemaValidator(json_decode(self::VALID_EMPTY_JSON), json_decode(self::VALID_SCHEMA_NUMBER_OPTIONAL_JSON), $cache);\n\n $this->assertTrue(isset($warnings['warnings'][0]));\n $this->assertEquals(isset($warnings['warnings'][0]), 1);\n $this->assertEquals($warnings['warnings'][0]['code'], CacheException::ERROR_CACHE_DIRECTORY_NOT_WRITABLE);\n }\n }", "title": "" }, { "docid": "47edc2781079412caaac454b08d6ac10", "score": "0.54697746", "text": "public function testCreateDirectory()\n {\n // Creates a directory with a name already used by a file.\n $file = new File($this->getDataPathPrefix() . static::FILE_NAME_1);\n $hasException = false;\n $file->create();\n try {\n $file->createDirectory();\n } catch (ExistingFileException $e) {\n $hasException = true;\n }\n $this->assertException($hasException);\n $file->delete();\n\n $file = new File(\n $this->getDataPathPrefix() . static::FILE_NAME_1 . File::DIRECTORY_SEPARATOR . static::FILE_NAME_1\n );\n $this->assertFalse(is_dir($file->getOsPath()));\n $this->assertFalse($file->isDirectory());\n\n // Creates multiple directories without recursive mode.\n $hasException = false;\n try {\n $file->createDirectory();\n } catch (IOException $e) {\n $hasException = true;\n }\n $this->assertException($hasException);\n\n // Creates multiple directories with recursive mode.\n $result = $file->createDirectory(File::DEFAULT_MODE, true);\n $this->assertTrue($result);\n $this->assertTrue(is_dir($file->getOsPath()));\n $this->assertTrue($file->isDirectory());\n\n // Creates an existing directory.\n $result = $file->createDirectory();\n $this->assertFalse($result);\n }", "title": "" }, { "docid": "14ecd4238cfa158da9617c1d9aaf361f", "score": "0.54593575", "text": "public function isDirectory($key)\n {\n return $this->isAlbum();\n }", "title": "" }, { "docid": "e446a82b7ada3ea531c413c35ce82f11", "score": "0.54514015", "text": "public function testFolderExists() {\n\t\t$this->assertTrue(FileSystem::folderExists(dirname($this->actual_file)));\n\t\t$this->assertFalse(FileSystem::folderExists($this->invalid_file));\n\t}", "title": "" }, { "docid": "6990a2ae9e1cac03dddb0211910d8e71", "score": "0.545015", "text": "public function testGetWritableTempDirectory()\n {\n $fileUtil = new FileUtil();\n $this->assertTrue(is_writable($fileUtil->getTempDirectory()));\n }", "title": "" }, { "docid": "aaac62affe5dfdafc897575e6db288cd", "score": "0.5449517", "text": "public function testExistsReturnFalseOnDirectory() {\n\n\t\t$resource = new XMLResource(new SplFileInfo(__DIR__));\n\n\t\t$this->assertFalse($resource->exists());\n\t}", "title": "" }, { "docid": "389113ded93a66b402e034bb4318adb9", "score": "0.5444229", "text": "protected function _validDirectory($path) {\n\t\treturn is_dir($path) && !in_array($this->_fileName($path), array('.', '..'));\n\t}", "title": "" }, { "docid": "998cbc62028a5aaaff8d812087467e7c", "score": "0.542699", "text": "function is_readable(string $path): bool\n{\n if ($path === '/none/readable/file') {\n return false;\n }\n\n return \\is_readable($path);\n}", "title": "" }, { "docid": "44db1488f06f9847decfb17ac2edf85a", "score": "0.5414601", "text": "public function canParseDirectory()\n {\n return false;\n }", "title": "" }, { "docid": "c05c43a2725c4010f7132a1a904e807f", "score": "0.5400186", "text": "public function hasDir(){\n return $this->_has(5);\n }", "title": "" }, { "docid": "fa5a168645cfd794b812e400a16772f1", "score": "0.53683585", "text": "public static function assertDirectoryIsNotWritable(string $directory, string $message = ''): \\void {}", "title": "" }, { "docid": "0ac8731bff452ff603cf8ee1313721c3", "score": "0.53593737", "text": "public function testInvokeThrowsExceptionIfFileIsNotFile()\n {\n $this->setExpectedException('InvalidArgumentException');\n \n $directory = 'foo';\n \n new vfsStreamDirectory($directory);\n \n (new Read())(vfsStream::url($directory));\n \n return;\n }", "title": "" }, { "docid": "44894211e1c92103daefdf4b60d1d28e", "score": "0.5354306", "text": "protected function isValidOutputFile($value)\n {\n return !is_dir($value) && !is_file($value) && !is_link($value);\n }", "title": "" }, { "docid": "4f3150ea2539615cfa533ec32df11258", "score": "0.5353484", "text": "private function checkDir()\n\t{\n\t\t$path = $this->path;\n\t\tif ( ! file_exists( $path ) )\n\t\t{\n\t\t\tif( ! File::makeDirectory($path, 0777, true, true) )\n\t\t\t{\n\t\t\t\tthrow new \\Exception(\"Error when make '$path', be sure your directory is writable\", 1);\n\t\t\t}\n\t\t}\n\n\t\t// create thumb directory\n\t\t$path_thumb = $this->path_thumb;\n\t\tif ( ! file_exists( $path_thumb ) )\n\t\t{\n\t\t\tif ( ! File::makeDirectory($path_thumb, 0777, true, true) )\n\t\t\t{\n\t\t\t\tthrow new \\Exception(\"Error when make '$path_thumb', be sure your directory is writable\", 1);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "2c61af66eeb19a9d704d05353af28405", "score": "0.5340598", "text": "public function isReadable() {\n\t\treturn is_readable($this->pathName);\n\t}", "title": "" }, { "docid": "641228e7109443dd02ce1c58c4dbb6f4", "score": "0.5326911", "text": "public function validate($value, Constraint $constraint)\n {\n if ($value != realpath($value)) {\n $this->context->addViolation($constraint->not_absolute_path_message, array('%string%' => $value));\n }\n if (false === is_dir($value)) {\n $this->context->addViolation($constraint->dont_exists_message, array('%string%' => $value));\n }\n }", "title": "" }, { "docid": "b5f91b45c8f4783bd492f52ff30800c7", "score": "0.5324936", "text": "public function isReadable($dir)\n\t{\n\t\treturn is_dir($dir) && is_readable($dir);\n\t}", "title": "" }, { "docid": "69d7e3ace5d313d323fdb7b865a75168", "score": "0.5321649", "text": "protected static function createDir(string $streamPath): void\n {\n $dir = static::getDirFromStream($streamPath);\n if (null !== $dir && ! is_dir($dir)) {\n static::$errorMessage = null;\n set_error_handler([static::class, 'customErrorHandler']);\n $status = mkdir($dir, 0777, true);\n restore_error_handler();\n if (false === $status && ! is_dir($dir)) {\n throw new UnexpectedValueException(\n sprintf(\n 'There is no existing directory at \"%s\" and its not buildable: ' . static::$errorMessage, $dir));\n }\n }\n }", "title": "" }, { "docid": "4517cfbb4930307dae3a7e2985e525b5", "score": "0.53182703", "text": "public function testIsDirNotExisting()\n {\n $result = $this->_controller->isDir($this->_basePath . '/PHPUNITNotExisting');\n \n $this->assertFalse($result);\n }", "title": "" }, { "docid": "57aac81ae20f4a8b7b47dbd77ff1f7dc", "score": "0.53008294", "text": "static function isDirectoryWritable($path) {\n\t\t\tif (is_writable($path)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t$parts = explode(\"/\",ltrim($path,\"/\"));\n\t\t\tunset($parts[count($parts)-1]);\n\t\t\t$path = \"/\".implode(\"/\",$parts);\n\t\t\tif (!is_dir($path)) {\n\t\t\t\treturn self::isDirectoryWritable($path);\n\t\t\t}\n\t\t\treturn is_writable($path);\n\t\t}", "title": "" }, { "docid": "67a82b9d3af1c6e62e4ea0df0a0f51e1", "score": "0.52970904", "text": "function validatePath($path)\n {\n $msg = \"<img src=\\\"../images/red.gif\\\" alt=\\\"\\\" title=\\\"Path is not Valid\\\"><br><font color=\\\"#ff0000\\\">Path is not Valid</font>\";\n if (is_dir($path))\n {\n if (is_writable($path))\n {\n $msg = \"<img src=\\\"../images/green.gif\\\" alt=\\\"\\\" title=\\\"Valid\\\">\";\n }\n else\n {\n $msg = \"<img src=\\\"../images/red.gif\\\" alt=\\\"\\\" title=\\\"Path is not Writable\\\"><br><font color=\\\"#ff0000\\\">Path is not Writable -- make sure you chmod +w this path</font>\";\n }\n }\n return $msg;\n }", "title": "" }, { "docid": "383ec53a04d3ad990739655b00b3c63f", "score": "0.5296964", "text": "public function testListPlainDirectory() {\n\t\t$obj = new sly_Util_Directory(self::$here.'/tmp');\n\n\t\t$this->assertEquals(array('child', 'foo'), $obj->listPlain(false, true, false, false, 'sort'));\n\t\t$this->assertEquals(array('.blafasel', 'child', 'foo'), $obj->listPlain(false, true, true, false, 'sort'));\n\t\t$this->assertEquals(array('foo', 'child'), $obj->listPlain(false, true, false, false, 'rsort'));\n\t}", "title": "" }, { "docid": "1edd8f943bd14262d74b3fe06f00b6a5", "score": "0.52862537", "text": "public function testValidPathIsAccepted()\n {\n $dir = rtrim(__DIR__, '/').'/';\n\n new Factory(self::URL, 'grabby.png', $dir);\n }", "title": "" }, { "docid": "3d5b10afdb74f7e1b5e1bed0ad5bac4c", "score": "0.5284549", "text": "public function testCreateEmptyDirName()\n {\n $directoryResource = new Directory(new SeafileHttpClient());\n\n self::assertFalse($directoryResource->create(\n new Library(),\n ''\n ));\n }", "title": "" } ]
c92380edadb9db6fbdecaf737bed7b89
Determines if the current user has permission to edit the current/given post
[ { "docid": "53981ae2f3415033fbbe1949dd6c742b", "score": "0.78706396", "text": "function current_user_can( $post_id = 0 ) {\n\t\treturn current_user_can( 'edit_post', $this->get_object_id( $post_id ) );\n\t}", "title": "" } ]
[ { "docid": "192b6e9b42b7c27bbd86a3106feec41d", "score": "0.87349993", "text": "function can_edit( $post )\r\n {\r\n //must be logged in\r\n if ( ! logged_in() ) {\r\n return false;\r\n }\r\n\r\n if ( is_object($post) ) {\r\n $post_user_id = (int) $post->user_id;\r\n }\r\n else {\r\n $post_user_id = (int) $post['user_id'];\r\n }\r\n\r\n $user = get_user();\r\n\r\n $authority = authority();\r\n\r\n $access = false;\r\n\r\n if ( $authority == 1 && $post_user_id === $user->uid || $authority == 2 )\r\n {\r\n $access = true;\r\n }\r\n else {\r\n $access = false;\r\n }\r\n\r\n return $access;\r\n }", "title": "" }, { "docid": "aed591858c76eb5701f45c5fc4710d85", "score": "0.84899706", "text": "public function can_edit()\n {\n\n return current_user_can('edit_posts');\n\n }", "title": "" }, { "docid": "7bdd5ec52fb917d16b9f1db0a15ea9b8", "score": "0.8145284", "text": "function sb_canEdit( $inPostID ) {\n\n global $loggedInID;\n if( strcmp( $loggedInID, \"\" ) == 0 ) {\n // public can never edit\n return false;\n }\n\n if( sb_getUserDatabaseField( $loggedInID, \"administrator\" ) == 1 ) {\n // admins can always edit\n return true;\n }\n\n if( strcmp( $loggedInID,\n sb_getPostDatabaseField( $inPostID, \"user_id\" ) ) == 0 ) {\n // rest of users can only edit their own posts\n return true;\n }\n else {\n return false;\n }\n }", "title": "" }, { "docid": "f9e38623c2204b373e0f33adffec3295", "score": "0.8088085", "text": "protected function check_edit_permission( $post ) {\n\t\t$post_type = get_post_type_object( $post['post_type'] );\n\n\t\tif ( ! current_user_can( $post_type->cap->edit_post, $post['ID'] ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "f7b8f8596f03d62e81b6591bc24e948e", "score": "0.7895762", "text": "public function editPost(User $user, Post $post)\n {\n return $user->owns($post) || $user->hasRole('editor');\n }", "title": "" }, { "docid": "fa654fb98480bf1c51ee6f3305289806", "score": "0.7740747", "text": "public function canEdit()\n {\n return (Yii::app()->user->ID == $this->ID_USER);\n }", "title": "" }, { "docid": "270c8df4e0f49fbb08d68e9fd9214dc0", "score": "0.7629258", "text": "private function canEdit(Post $post, User $user)\n {\n // to get the entity of the user who owns this data object\n //if ($post->getAuthor()->getIsAdmin() and !$user->getIsAdmin()) {\n\n // return false;\n //}\n\n return ($user === $post->getAuthor()\n or $user->getIsAdmin()\n //or $user === $comment->getPost()->getAuthor()\n );\n\n\n }", "title": "" }, { "docid": "206828162a1d0d0a4258ca9714be05b3", "score": "0.7582416", "text": "function hasEditPermission()\r\n {\r\n $attributes['uid'] = getFromSession('uid');\r\n $thisUser = new User($attributes);\r\n $userType = $thisUser->getUserType();\r\n \r\n if($userType == 'Unpreviledged')\r\n {\r\n return false;\r\n }\r\n else\r\n {\r\n return true;\r\n }\r\n }", "title": "" }, { "docid": "58733693835b97ba23d76973d6787da5", "score": "0.75604504", "text": "public function canEdit() {\n\t\treturn $this->can('Edit');\n\t}", "title": "" }, { "docid": "fbd5074d6ba23f9141c3f30724827586", "score": "0.754262", "text": "function userCanEditAndDelete() {\n\t\tglobal $icmsUser, $profile_isAdmin;\n\t\tif (!is_object($icmsUser)) {\n\t\t\treturn false;\n\t\t}\n\t\tif ($profile_isAdmin) {\n\t\t\treturn true;\n\t\t}\n\t\treturn $this->getVar('uid_owner', 'e') == $icmsUser->uid();\n\t}", "title": "" }, { "docid": "baa45d968f85e8e1fa4a0fa3af7dbd1b", "score": "0.7535153", "text": "function current_user_can_modify_post( $post ) {\n\t\t\n\t\tif ( !$post )\n\t\t\treturn false;\n\t\t\t\n\t\t$post_type_object = get_post_type_object( $post->post_type );\n\n\t\t// Editors and admins are fine\n\t\tif ( current_user_can( $post_type_object->cap->edit_others_posts, $post->ID ) )\n\t\t\treturn true;\n\t\t// Authors and contributors can move their own stuff if it's not published\n\t\tif ( current_user_can( $post_type_object->cap->edit_post, $post->ID ) && wp_get_current_user()->ID == $post->post_author && !in_array( $post->post_status, $this->published_statuses ) )\n\t\t\treturn true;\n\t\t// Those who can publish posts can move any of their own stuff\n\t\tif ( current_user_can( $post_type_object->cap->publish_posts, $post->ID ) && wp_get_current_user()->ID == $post->post_author )\n\t\t\treturn true;\n\t\t\n\t\treturn false;\n\t}", "title": "" }, { "docid": "874be719a557e772223fb971caefdbe0", "score": "0.75248855", "text": "public function isEditable()\n\t{\n\t\treturn user::current()->isAuthenticated() && $this->may['edit'];\n\t}", "title": "" }, { "docid": "6a51d9a8b41dbebc39ff5be3ad04be79", "score": "0.7507225", "text": "function user_can_edit_post($user_id, $post_id, $blog_id = 1) {\n\t$author_data = get_userdata($user_id);\n\t$post_data = get_postdata($post_id);\n\t$post_author_data = get_userdata($post_data['Author_ID']);\n\n\tif ( ($user_id == $post_author_data->ID)\n\t || ($author_data->user_level > $post_author_data->user_level)\n\t || ($author_data->user_level >= 10) ) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "2f73160aa87d1dbb5572e512cf610c0a", "score": "0.74593276", "text": "public function canEdit()\n\t{\n\t\treturn boolval(!$this->trashed() and user()->as('admin')->can('accounts.edit'));\n\t}", "title": "" }, { "docid": "35879307c11931abb9eb0a028155463e", "score": "0.7448446", "text": "public function isUserEditAllowed()\n {\n return $this->authorization->isAllowed('Magento_Company::users_edit');\n }", "title": "" }, { "docid": "3d62de78c63c1944057d428a28cd2190", "score": "0.74107426", "text": "public static function api_required_permissions() {\n\t\treturn current_user_can( 'edit_posts' );\n\t}", "title": "" }, { "docid": "e570fa0f5304612b7cc0165d60b6f094", "score": "0.74027735", "text": "public function userCanEditAndDelete() {\n\t\tglobal $profile_isAdmin;\n\n\t\tif (!is_object(icms::$user)) return false;\n\t\tif ($profile_isAdmin) return true;\n\t\treturn $this->getVar('uid_owner', 'e') == icms::$user->getVar('uid');\n\t}", "title": "" }, { "docid": "b11cab0d3d03bc20c01f0a90069676d6", "score": "0.7368303", "text": "public function edit(User $user, Post $post)\n {\n return $this->isOwner($user, $post);\n }", "title": "" }, { "docid": "830f79dec92cbee3644fe735b92fccb4", "score": "0.73634213", "text": "public function canEdit() {\n\t\tif ($this->_AppUI->user_id == $this->task_log_creator || $this->_AppUI->user_id == $this->task_log_record_creator || $this->_perms->checkModuleItem ( $this->_tbl_module, 'edit', $this->{$this->_tbl_key} )) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "a3b171979ae7e4f3541b6d831cb20196", "score": "0.73633075", "text": "public static function can_edit_post($cur_user_id = 0, $post_id = 'new')\n {\n if (!$cur_user_id) {\n $cur_user_id = get_current_user_id();\n }\n\n if (!is_user_logged_in()) {\n return false;\n }\n\n if (current_user_can('edit_others_pages')) {\n return true;\n }\n\n if ($post_id !== 'new') {\n $post_user = (int) get_post_field('post_author', $post_id);\n if ($post_user !== $cur_user_id) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "71aff6f6dbbd50f826d3b3a5d0b74a9c", "score": "0.73255736", "text": "public function authorize()\n {\n $issue = $this->route('issue');\n\n return $issue && $this->user()->can('update', $issue);\n }", "title": "" }, { "docid": "ce7bad55589c7dec4be4b1a8d679cfef", "score": "0.73106503", "text": "protected function user_can_access_post( $post_id ) {\n\t\treturn current_user_can( 'edit_post', $post_id );\n\t}", "title": "" }, { "docid": "0e8ebf8b03b453eb09dc3a0394bd1168", "score": "0.72866344", "text": "public function update(User $user, Post $post)\n {\n return $user->hasRole('editor');\n }", "title": "" }, { "docid": "ad08507d78ef1ae5c48d8987f31c9fea", "score": "0.7271175", "text": "public function canEdit($userId = null)\n {\n if (!$userId && Auth::user()) {\n $userId = Auth::user()->id;\n }\n\n if (is_string($userId)) {\n $user = intval($userId);\n }\n // If user is post/discussion owner returns true, otherwise false.\n return $this->user_id === $userId;// || $this->discussion->canEdit($userId);\n }", "title": "" }, { "docid": "46c2ec99a4dca3563c2ced828b777b3f", "score": "0.7254569", "text": "public function authorize()\n {\n if ($this->isUpdate()) {\n return Post::findOrFail($this->get('id'))->user_id == \\Auth::id();\n }\n\n return \\Auth::check();\n }", "title": "" }, { "docid": "ccda662f2b59311f68acf9188ce8e190", "score": "0.7253837", "text": "function canEdit($member = null) {\n\t\tif(!$member) $member = Member::currentUser();\n\n\t\tif($this->owner->ID == Member::currentUserID()) return true;\n\n\t\tif($member) return $member->can('AdminCMS');\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "1a6d66363a41c9aabf31f23b04290c61", "score": "0.7239663", "text": "public function general_permissions_check( $request ) {\n\t\t// if ( !current_user_can( $post_type->cap->edit_posts ) ) {\n\t\t// \treturn false;\n\t\t// }\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "fc4018dd94e34fa66732f1283d77279e", "score": "0.7233049", "text": "function user_allowed_editing() {\n if (has_capability('format/page:editpages', get_context_instance(CONTEXT_COURSE, $this->id))) {\n return true;\n }\n return parent::user_allowed_editing();\n }", "title": "" }, { "docid": "f25272d3fab1adba554275a866f6b500", "score": "0.7218169", "text": "public static function is_edit_post() {\n\t\t$current_screen = get_current_screen();\n\t\treturn $current_screen && 'post' === $current_screen->base && self::is_active() && self::is_block_editor( $current_screen );\n\t}", "title": "" }, { "docid": "dfda82760604ffb0890bf36b44685e55", "score": "0.72093713", "text": "public function authorize() {\n $action = $this->route()->getAction();\n\n $is_edit = Auth::guard('admin')->user()->can($action['as'], 'edit');\n $own_edit = Auth::guard('admin')->user()->can($action['as'], 'own_edit');\n\n if ($is_edit == 1 || (!empty($own_edit) && ($this->food->created_by == Auth::guard('admin')->user()->id))) {\n return true;\n } else {\n abort(403);\n }\n }", "title": "" }, { "docid": "2e65ac1e261f2e67c9a08a150b61ff34", "score": "0.71930796", "text": "public function authorize()\n {\n\t\treturn $this->user()->can('update', $this->collection);\n }", "title": "" }, { "docid": "8c048697e72f475b95fa94e8dc2fb603", "score": "0.7165001", "text": "public function update()\n {\n return auth()->user()->can('tag_edit');\n }", "title": "" }, { "docid": "6bcbeabfc9aac0397e27883b79655580", "score": "0.71643186", "text": "public function canEdit(){\n if(strtolower($this->getName()) == 'god'){\n return false;\n }\n if(strtolower($this->getName()) == 'admin'){\n if(!Zend_Registry::getInstance()->session->user->hasRole('god')){\n return false;\n }\n }\n if(strtolower($this->getName()) == 'backend'){\n if(!Zend_Registry::getInstance()->session->user->hasRole('god')){\n return false;\n }\n }\n if(strtolower($this->getName()) == 'frontend'){\n if(!Zend_Registry::getInstance()->session->user->hasRole('god')){\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "cb2891b7393851e7c6ecc6a7866defe5", "score": "0.71605957", "text": "public function getAllowEdit()\n\t{\n\t\t$role = Mage::registry('role');\n\t\tif ($role=='view') return false;\n\t\treturn true;\n\t}", "title": "" }, { "docid": "b5289b3f2f5c4687d5bf8d50cd99d1f7", "score": "0.71536374", "text": "public function authorize()\n {\n return $this->user()->can('update', $this->route('user'));\n }", "title": "" }, { "docid": "dc62e40131a4875e48c94da097cebf2f", "score": "0.71341985", "text": "public function canEdit();", "title": "" }, { "docid": "58200a508aeee6fb454dbf7ac77c934e", "score": "0.71307135", "text": "function user_allowed_editing() {\n if (isloggedin() && !isguest()) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "de0b2e0cbbe6fca8a75db0a1dc906421", "score": "0.7125978", "text": "public function editGranted( $resourceId )\n {\n return $this->is_platform_admin\n || $this->is_librarian( $resourceId );\n }", "title": "" }, { "docid": "7f2c9ebb2bfcc6a866350a6a6a7d4a97", "score": "0.70845205", "text": "protected function isUpdateRight()\n {\n if ( in_array('EDIT', $this->getUserPermissions()) || in_array('ROLE_SUPER_ADMIN', $this->getUserRoles()) ) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "6ddce393ec7f1402d487a36ec54fe3af", "score": "0.70825315", "text": "public function AllowEdit()\n {\n if ($this->bAllowEditByAll) {\n return true;\n }\n $bAllowEdit = $this->IsOwner();\n if (!$bAllowEdit) {\n $oUser = TdbDataExtranetUser::GetInstance();\n if (null !== $oUser && $oUser->IsLoggedIn()) {\n $bIsAdmin = (array_key_exists('isadmin', $oUser->sqlData) && '1' == $oUser->sqlData['isadmin']);\n if ($bIsAdmin) {\n $bAllowEdit = true;\n }\n }\n }\n if (false === $bAllowEdit) {\n // if the record does NOT have a data_extranet_user_id then we allow edit - since the record belongs to no user at all\n if (false === TTools::FieldExists($this->table, 'data_extranet_user_id', false)) {\n $bAllowEdit = true;\n }\n }\n\n return $bAllowEdit;\n }", "title": "" }, { "docid": "7bfade1a840b49e4ebbef339f54b3cd2", "score": "0.7073464", "text": "protected function check_permissions( $post_id ){\n\t\t\n\t\tif ( wp_is_post_revision( $post_id ) ) {\n\t\t\t\n\t\t\treturn false;\n\t\t\t\n\t\t} // end if\n\t\t\n\t\t// If this is an autosave, our form has not been submitted, so we don't want to do anything.\n\t\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n\n\t\t\treturn false;\n\n\t\t} // end if\n\n\t\t// Check the user's permissions.\n\t\tif ( isset( $_POST['post_type'] ) && 'page' == $_POST['post_type'] ) {\n\n\t\t\tif ( current_user_can( 'edit_page', $post_id ) ) {\n\n\t\t\t\treturn true;\n\n\t\t\t} // end if\n\n\t\t} else {\n\n\t\t\tif ( current_user_can( 'edit_post', $post_id ) ) {\n\n\t\t\t\treturn true;\n\n\t\t\t} // end if\n\n\t\t} // end if\n\t\t\n\t\treturn false;\n\t\t\n\t}", "title": "" }, { "docid": "650ee281fd239e76867becec69941b85", "score": "0.7073029", "text": "public function isCanEdit(): bool\n {\n return $this->canEdit;\n }", "title": "" }, { "docid": "7b0424a08193012aaeb1ffee22103ea3", "score": "0.70707315", "text": "public function authorize()\n {\n if($this->isMethod('put') || $this->isMethod('patch')) {\n $portfolio = $this->route('portfolio');\n\n return $portfolio && $this->user()->can('update', $portfolio);\n }\n return true;\n }", "title": "" }, { "docid": "585815ec891fcf8d6bca269dd7a22cce", "score": "0.70573807", "text": "public function canEdit(User $user = null) \n\t\t{\n\t\t\t$default = false;\n\t\t\tif (!$user) $user = user_get_current();\n\t\t\tif (($user) && ($user->guid == $this->owner_guid)) $default = true;\n\t\t\treturn $this->__send_object_hook('canedit', $default);\t\t\n\t\t}", "title": "" }, { "docid": "dbb8ab5f68c52e3cff1e13634d8a0ffe", "score": "0.70428294", "text": "function user_can_edit_post_date($user_id, $post_id, $blog_id = 1) {\n\t$author_data = get_userdata($user_id);\n\treturn (($author_data->user_level > 4) && user_can_edit_post($user_id, $post_id, $blog_id));\n}", "title": "" }, { "docid": "fb16d5c66e8c00dfd3940aea3553becf", "score": "0.7012038", "text": "public function authorize()\n {\n // $design = Design::find($this->route('id'));\n\n // return $design && $this->user()->can('update', $design);\n return true;\n }", "title": "" }, { "docid": "fd87444efb1bc1c02093994d68761933", "score": "0.70090306", "text": "private function canView(Post $post, User $user)\n {\n if ($this->canEdit($post, $user)) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "a84215d6f038044407d4296252ee9917", "score": "0.6996175", "text": "public function canEdit()\n {\n if (!$this->current_user) {\n //no current user set\n return false;\n }\n \n if (!$this->join_user) {\n //No join user set\n return false;\n }\n \n if ($this->current_user->isAdmin()) {\n //admin can join anyone\n return true;\n }\n \n if ($this->current_user->id == $this->join_user->id) {\n //The current user can join their self\n return true;\n }\n \n if (!$this->current_user_membership) {\n //The current user needs a membership if they want to join someone else.\n return false;\n }\n \n if ($this->current_user_membership->isVerified()) {\n //The current user needs to be verified to join someone else\n return true;\n }\n \n //Default to false\n return false;\n }", "title": "" }, { "docid": "ade9739bce5bc56516e5273f04fe8dbf", "score": "0.69764006", "text": "public function authorize()\n {\n return auth()->user()->can('update', $this->expense);\n }", "title": "" }, { "docid": "01eae22e930d71d744d980926a20eb11", "score": "0.69659686", "text": "protected function canEdit()\n {\n return true;\n }", "title": "" }, { "docid": "e89fa6e0fae76f46b9aba74b118c9046", "score": "0.69587964", "text": "public function isRoleEditAllowed()\n {\n return $this->authorization->isAllowed('Magento_Company::roles_edit');\n }", "title": "" }, { "docid": "05671ed12ab19e1183583d75368a762e", "score": "0.6956751", "text": "function user_can_edit_post_comments($user_id, $post_id, $blog_id = 1) {\n\t// right now if one can edit a post, one can edit comments made on it\n\treturn user_can_edit_post($user_id, $post_id, $blog_id);\n}", "title": "" }, { "docid": "3a0f52b7d7d5a399f679b7da6ed527a8", "score": "0.6939555", "text": "public function canEdit(): bool\n {\n return true;\n }", "title": "" }, { "docid": "8c0748b56e7c266d531dcdf251c6a96b", "score": "0.6936177", "text": "public function hasEditUserPermissions(User $member)\n\t{\n\t\tif ($this->id == $member->id) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn $this->hasManageDepartmentPermission($member->department);\n\t}", "title": "" }, { "docid": "21238007c4f4c00409340a9a2338ddc2", "score": "0.69334346", "text": "public function checkAccess()\n {\n return !is_null($this->author_id) && $this->author_id == Yii::app()->user->id;\n }", "title": "" }, { "docid": "cdfc33963b9a345918328ff8572c3ce3", "score": "0.6913073", "text": "public function authorize()\n {\n return Auth::check() && Auth::user()->can('update') && Auth::user()->hasRole('admin');\n }", "title": "" }, { "docid": "be092e56a0796091a9f47ee4a6aa1bd0", "score": "0.6910215", "text": "protected function check_edit_permission( $comment ) {\n\t\tif ( 0 === (int) get_current_user_id() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( ! current_user_can( 'moderate_comments' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn current_user_can( 'edit_comment', $comment->comment_ID );\n\t}", "title": "" }, { "docid": "9db31a3dfc3b33b64dfe5d47f9abc520", "score": "0.69044363", "text": "static function canView() {\n\n return (Session::haveRight(self::$rightname, UPDATE));\n }", "title": "" }, { "docid": "4174b7eb9ebc3214fded40822a566b37", "score": "0.69042856", "text": "private function is_in_edit_mode() {\n\t\tglobal $pagenow;\n\n\t\treturn defined( 'DOING_AJAX' ) && in_array( kalium()->request->query( 'action' ), [\n\t\t\t\t'parse-embed',\n\t\t\t\t'parse-media-shortcode',\n\t\t\t] ) || ( is_admin() && in_array( $pagenow, [ 'post.php' ] ) );\n\t}", "title": "" }, { "docid": "f44cac5efa1049ecb6a154beb246ae79", "score": "0.6904234", "text": "public function canEdit(){\n\t\treturn $this->editCondition === null || $this->editCondition->isOk();\n\t}", "title": "" }, { "docid": "3efd7d230767f37e17fdb8d66880e391", "score": "0.6899988", "text": "public function canEdit()\n {\n $r = @mysql_query(\"SELECT id_kategorie FROM kategorie WHERE id_zamestnanec = \".$this->user->idCalendar.\" AND id_kategorie = \".$this->id);\n if(mysql_num_rows($r) > 0)\n return true;\n else\n return false;\n }", "title": "" }, { "docid": "208da48c789f3072945a4877857a3d4f", "score": "0.68941003", "text": "public static function has_post_access( $post_id ) {\n\t\treturn current_user_can( 'edit_post', $post_id ) && apply_filters( 'tcb_user_has_post_access', static::has_access() );\n\t}", "title": "" }, { "docid": "18c45cb5fcd3c55c933c96d9b48a604d", "score": "0.6884214", "text": "function user_is_editing() {\n global $SESSION;\n\n if (isloggedin() && !isguest()) {\n $this->editing = !empty($SESSION->blog_editing_enabled);\n return $this->editing;\n }\n return false;\n }", "title": "" }, { "docid": "4abcc9befe8249139e27512390251640", "score": "0.68718237", "text": "public function getEditAuthorized()\n {\n return $this->editAuthorized;\n }", "title": "" }, { "docid": "77c452ccd0ea914f4aa2e4ccef6d2cc1", "score": "0.68682617", "text": "public function authorize()\n {\n $user = User::find($this->route(\"user_id\"));\n $permission = Permission::find($this->route(\"permission_id\"));\n\n return !empty($user) and !empty($permission) and Auth::user()->can(\"edit users permissions\");\n }", "title": "" }, { "docid": "33b3db53bf5724874f0db06b37814ec5", "score": "0.68651164", "text": "public function authorize() : bool\n {\n return auth()->user()->can('edit', $this->group_setting);\n }", "title": "" }, { "docid": "db14b51edadccae67647a8067a7f5da8", "score": "0.6857155", "text": "public function authorize()\n {\n return $this->user()->can('update tanker', Tanker::class, $this->tanker);\n }", "title": "" }, { "docid": "211205ae23189ae5a3fb0267241e1271", "score": "0.6848184", "text": "public function authorize()\n {\n $admin = $this->route('admin');\n $isCanUpdate = Gate::allows('update', $admin);\n \n return $admin && $isCanUpdate;\n }", "title": "" }, { "docid": "e060ba5d79164b16b2a6334aa150d969", "score": "0.6848141", "text": "public function canEdit(User $user) {\n return $this->user_id == $user->id;\n }", "title": "" }, { "docid": "45085316423c3f13226cb769cb1e790b", "score": "0.6846863", "text": "public function authorize()\n {\n if ($this->isMethod('POST')) {\n return true;\n }\n\n $theVote = Vote::find($this->route('id'));\n return Auth::user()->can('update', $theVote) && Auth::user()->can('delete', $theVote);\n }", "title": "" }, { "docid": "454d0e888311ea11e60e6ccd83c700f6", "score": "0.68427044", "text": "public function isAuthorized($user) {\n\t\tif ($this->action === 'add') {\n\t\t\treturn true;\n\t\t}\n\n\t\t// The owner of a post can edit and delete it\n\t\tif (in_array($this->action, array('edit', 'delete'))) {\n\t\t\t$postId = $this->request->params['pass'][0];\n\t\t\tif ($this->Post->isOwnedBy($postId, $user['id'])) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn parent::isAuthorized($user);\n\t}", "title": "" }, { "docid": "a410b70afcf932dbd9070a1d18c3f888", "score": "0.68377644", "text": "public function authorize(): bool\n {\n return $this->user()->can('edit administrator');\n }", "title": "" }, { "docid": "5a27625a65cf0faef350cbb2e450c2ae", "score": "0.6834773", "text": "public function authorize()\n {\n return hasPermission('admin.product.update');\n }", "title": "" }, { "docid": "a27a80eb599657734cbd2e3c3918de8c", "score": "0.68278193", "text": "public function isAuthorized($user) {\n if (in_array($this->action, array('add','index'))) {\n return true;\n }\n\n // The owner of a post can edit and delete it\n if (in_array($this->action, array('delete'))) {\n $postId = (int)$this->request->params['pass'][0];\n if ($this->Tarea->isOwnedBy($postId, $user['id'])) {\n return true;\n }\n }\n\t\telse\n\t\t\t{\n\t\t\t\tif($this->Auth->user('id'))\n\t\t\t\t{\n\t\t\t\t\t$this->Flash->error('No puede acceder');\n\t\t\t\t\t$this->redirect($this->Auth->redirect('/users/login'));\n\t\t\t\t}\n\t\t\t}\n \treturn parent::isAuthorized($user);\n}", "title": "" }, { "docid": "6c2afaba19f9c22ce8cd16a768c91ee0", "score": "0.6821753", "text": "public function authorize()\n {\n \t$this->application = $this->route('application');\n return $this->user()->can('update',$this->application);\n }", "title": "" }, { "docid": "0055fad0504e34a8a0910ae9711dba12", "score": "0.6812476", "text": "public function can_edit(&$whynot, $userid=0) {\n $userid = mod_forumng_utils::get_real_userid($userid);\n $context = $this->get_forum()->get_context();\n\n // Check if post is a special case\n if ($this->get_deleted() || $this->is_old_version()\n || $this->get_discussion()->is_deleted()) {\n $whynot = 'edit_notcurrentpost';\n return false;\n }\n\n // Check if discussion is different group\n if (!$this->get_discussion()->can_write_to_group()) {\n $whynot = 'edit_wronggroup';\n return false;\n }\n\n // Check if discussion is locked\n if ($this->get_discussion()->is_locked()) {\n $whynot = 'edit_locked';\n return false;\n }\n\n // Check the 'edit any' capability\n $editanypost = has_capability('mod/forumng:editanypost',\n $context, $userid);\n if (!$editanypost) {\n // If they don't have edit any, they must have either the\n // 'start discussion' or 'reply post' capability (the same\n // one they needed to create the post in the first place)\n if (($this->is_root_post() &&\n !has_capability('mod/forumng:startdiscussion', $context, $userid))\n && (!$this->is_root_post() &&\n !has_capability('mod/forumng:replypost', $context, $userid))) {\n $whynot = 'edit_nopermission';\n return false;\n }\n }\n\n // Check post belongs to specified user\n if (($this->get_user()->id != $userid) && !$editanypost) {\n $whynot = 'edit_notyours';\n return false;\n }\n\n // Check editing timeout\n if ((time() > $this->get_edit_time_limit()) && !$editanypost) {\n $whynot = 'edit_timeout';\n return false;\n }\n\n // Check read-only dates\n if ($this->get_forum()->is_read_only($userid)) {\n $whynot = 'edit_readonly';\n return false;\n }\n\n // OK! They're allowed to edit (whew)\n $whynot = '';\n return true;\n }", "title": "" }, { "docid": "023c58b4d3b031425bb56a2900334a39", "score": "0.6802888", "text": "public function authorize()\n {\n $category = ExpenseCategory::find(request()->segment(3));\n return auth()->user()->can('update', $category);\n }", "title": "" }, { "docid": "e8ee3d6f7bb8fbc76db1261fb552cfb2", "score": "0.6798592", "text": "public function canEdit(SecurityContext $sec)\r\n {\r\n $user_id = $sec->getToken()->getUser()->getId();\r\n\r\n return $sec->isGranted('ROLE_ADMIN') ||\r\n (($sec->isGranted('ROLE_FAMILY_HELP') || $sec->isGranted('ROLE_CHILD_WELFARE') || $sec->isGranted('ROLE_CATERING')) &&\r\n ($this->creator->getID() == $user_id || (!empty($this->assignee) && $this->assignee->getId() == $user_id))\r\n );\r\n }", "title": "" }, { "docid": "08b250517ae9ff717c17a4c076959622", "score": "0.6792648", "text": "public function add_edit_post_priv() {\r\n\t\t\t$subscriber = get_role('subscriber');\r\n\t\t\t$subscriber->add_cap('edit_posts');\n\t\t}", "title": "" }, { "docid": "af988d6daf7494e5ef2c11e9756c5723", "score": "0.67891276", "text": "public static function is_post_editable( $post_id ) {\n\n\t\tif ( 0 === $post_id ) {\n\n\t\t\treturn false;\n\n\t\t}\n\n\t\t$post = get_post( absint( $post_id ) );\n\t\t$post_types = FLBuilderModel::get_post_types();\n\t\t$user_can = current_user_can( 'edit_post', $post->ID );\n\n\t\tif ( in_array( $post->post_type, $post_types ) && $user_can ) {\n\n\t\t\treturn true;\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "44bd98ccd139ea7d5af3fa4454cadd36", "score": "0.6787956", "text": "public function update(User $user, Post $post)\n {\n return $user->isAuthor($post);\n }", "title": "" }, { "docid": "92f46160581d771397664abb7f5d01cf", "score": "0.67854226", "text": "public function authorize()\n {\n $user_id =$this->route('user');\n $owner = User::find($user_id);\n\n if (auth()->user()->isAdmin() || auth()->user()->can('user-edit') || $owner->id == auth()->user()->id) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "08b7073d52fe7f560953de01fedb614c", "score": "0.6785064", "text": "public function isAuthorized($user) {\n\t\tif ($this->request->action === 'add') {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (in_array($this->request->action, ['edit', 'delete'])) {\n\t\t\t$postId = $this->request->params['pass'][0];\n\n\t\t\tif ($this->Posts->isOwnedBy($postId, $user['id'])) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn parent::isAuthorized($user);\n\t}", "title": "" }, { "docid": "7817e61cd243cbf8273b8eeb66321795", "score": "0.67780775", "text": "private function hasEditRights($user)\n\t{\n\t\tif ($user == $this->get('security.context')->getToken()->getUser() ||\n\t\t\t\t$this->get('security.context')->isGranted('ROLE_MODERATOR')) {\n\t\t\treturn true;\n\t\t}\n\t\tthrow new AccessDeniedException();\n\t}", "title": "" }, { "docid": "d9eda90016d7c9731ef6d12bac3b44d8", "score": "0.6775718", "text": "public function authorize()\n {\n return $this->user()->can('backend_edit_users');\n }", "title": "" }, { "docid": "e458e47373e1a2ca935445e20d24c711", "score": "0.677287", "text": "public function authorize()\n {\n //de la ruta extrae al modelo user\n //dd($this->route('user')->id);\n\n $user=$this->route('user');\n\n return $this->user()->can('update',$user);\n }", "title": "" }, { "docid": "31a00960c3990c3d4d563f16a0ca6680", "score": "0.67723805", "text": "function hasEditorPermission($uid) {\n return hasPermission($uid, 'becomeEditor');\n}", "title": "" }, { "docid": "ed4808271a3befa4ed1bcb098e28d761", "score": "0.6764325", "text": "public function canEdit($member = false) {\n\t\t\treturn Permission::check(get_class($this->owner) . '_edit');\n\t\t}", "title": "" }, { "docid": "b2a25d58cfde2a7395bef916f2660ce1", "score": "0.67636794", "text": "public function authorize()\n {\n return $this->user()->can('product.update');\n }", "title": "" }, { "docid": "de91438b9d1b61e424173e6e6ef40eb0", "score": "0.6762706", "text": "private function allowModify()\n {\n if($this->controllerVar['loggedUserRole'] <= 40 )\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "title": "" }, { "docid": "2a9979ccd4969ebcec0d93a387c85b47", "score": "0.67602986", "text": "public function authorize()\n {\n $card = $this->findFromUrl('koornbeurs_card');\n return $this->user()->can('update', $card);\n }", "title": "" }, { "docid": "ec195108726f96c85e284c16b3de41e9", "score": "0.67520773", "text": "public function authorize()\n {\n return $this->user()->can('update', $this->chat);\n }", "title": "" }, { "docid": "f916408a7ecb0b43c5ef33e65d9c7299", "score": "0.6748997", "text": "public function authorize()\n {\n return $this->user()->can('library.update');\n }", "title": "" }, { "docid": "e95c85de80a6279faebaa0ec882c3cf9", "score": "0.67449516", "text": "public function authorize()\n {\n $emailAddress = $this->findFromUrl('person_email_address');\n return $this->user()->can('update', $emailAddress);\n }", "title": "" }, { "docid": "561c80483fe63f7b1628d7d0b3ec6799", "score": "0.6738935", "text": "function current_user_can_edit_menu(){\r\n\t\tif ( $this->is_super_plugin() ){\r\n\t\t\treturn is_super_admin();\r\n\t\t} else {\r\n\t\t\treturn current_user_can('manage_options');\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "1b710272989046cfcdae4592206d17b9", "score": "0.6735417", "text": "public function can_post()\n {\n if ($this->role === UserRole::getKey(0) || $this->role === UserRole::getKey(1))\n {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "a6faabd8500a836289215d01a200d050", "score": "0.6734946", "text": "public function isEditable()\n\t{\n\t\treturn $this->getRelationModuleModel()->isPermitted('EditView');\n\t}", "title": "" }, { "docid": "636b6d47c8bc0ba31fbf176f840e618b", "score": "0.6732031", "text": "static function check_edit_post_request(){\n\t\t$postId = $_GET['post'];\n\t\t$current_user = wp_get_current_user();\n\t\tif(isset($_GET['qpa']) && $_GET['qpa'] == 'review' && isset($_GET['kid'])){\n\t\t\t$_SESSION['qonnector_plan_action'] = $_GET['qpa'];\n\t\t\t$_SESSION['qonnector_plan_keyword_id'] = $_GET['kid'];\n\t\t\t$_SESSION['qonnector_current_user_role'] = $current_user->roles[0];\n\t\t\t$_SESSION['qonnector_plan_user_id'] = $current_user->ID;\n\t\t\t$_SESSION['qonnector_post_status'] = 'pending';\n\t\t} else {\n\t\t\t$plan_user = get_post_meta($postId,'qonnector_plan_user_id',true);\n\t\t\t$post_status = get_post_meta($postId,'qonnector_post_status',true);\n\t\t\t$action = get_post_meta($postId,'qonnector_plan_action',true);\n\t\t\t$keywor_id = get_post_meta($postId,'qonnector_plan_keyword_id',true);\t\t\t\n\t\t\tif($plan_user == $current_user->ID && ($post_status == 'pending' || $post_status == 'completed') ){\n\t\t\t\t$_SESSION['qonnector_plan_action'] = $action;\n\t\t\t\t$_SESSION['qonnector_plan_keyword_id'] = $keywor_id;\n\t\t\t\t$_SESSION['qonnector_current_user_role'] = $current_user->roles[0];\n\t\t\t\t$_SESSION['qonnector_plan_user_id'] = $current_user->ID;\n\t\t\t\t$_SESSION['qonnector_post_status'] = $post_status;\n\t\t\t\t/*\n\t\t\t\tif($action=='write'){\n\t\t\t\t\t$current_user->set_role('contributor'); \n\t\t\t\t}\n\t\t\t\t*/\n\t\t\t}\n\t\t}\t\n\t}", "title": "" }, { "docid": "7187e0e893ad1e9f01b3fdafad175884", "score": "0.67296016", "text": "public function isAuthorized($user) {\r\n\t if (in_array($this->action, array('dashboard', 'login', 'logout'))) {\r\n\t return true;\r\n\t }\r\n\r\n\t // The owner of a post can edit and delete it\r\n\t if (in_array($this->action, array('edit', 'delete', 'index'))) {\r\n\t if (isset($user['role']) && $user['role'] === 'admin') {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t }\r\n\r\n\t return parent::isAuthorized($user);\r\n\t}", "title": "" }, { "docid": "e5b400483bac46479dc2cc0c09ec847c", "score": "0.67289096", "text": "public function authorize()\n { \n // Do not allow to edit developer role\n if(!$this->role->editable)\n return false;\n\n return true;\n }", "title": "" } ]
06b048169d6000dd8f2954c77b1ec598
Show the form for creating a new resource.
[ { "docid": "2a46fdbfc8cb01983bb03691388f0169", "score": "0.0", "text": "public function create()\n {\n //\n }", "title": "" } ]
[ { "docid": "79bd06c9a9147df30474aace0ff64511", "score": "0.7651272", "text": "public function create()\n\t{\n\t\treturn View::make('secureadmin.resources.create');\n\t}", "title": "" }, { "docid": "2bc399e3e37eaad09b15e38f2a68e11a", "score": "0.75727344", "text": "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "title": "" }, { "docid": "9ce2c0e041c9fd47a4927ea76ac4dec1", "score": "0.7523307", "text": "public function actionCreate()\n {\n if(!Yii::$app->user->can('admin')){\n throw new ForbiddenHttpException(Yii::t('app','forbidden'));\n }\n\n $model = new Resource();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['resource/index']);\n } else {\n return $this->renderAjax('_form', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "eefd3a34279d87bd94753b0beae69b0d", "score": "0.7391348", "text": "public function create()\n {\n return view('humanresources::create');\n }", "title": "" }, { "docid": "ccbf298ff6b7fe3fc99a2c43c7044671", "score": "0.7352675", "text": "public function create()\n {\n if (is_null($this->resource)) {\n return view('admin.errors.unresolved-resource');\n }\n\n $className = Manager::getResourceClass($this->resource);\n\n $model = Manager::instantiateResource($this->resource);\n\n if (is_null($model)) {\n return view('admin.errors.inexistent-model');\n }\n\n return view(Manager::resolveResourceView($this->resource, 'edit'), [\n 'resource' => $this->resource,\n 'model' => $model,\n 'action' => 'store',\n 'token' => csrf_token()\n ]);\n }", "title": "" }, { "docid": "3a2b518b64d41d79de586443a25fc6b4", "score": "0.73309237", "text": "public function create()\n {\n $enterprise = 'Resources Ltd.';\n $data = [];\n $data['enterprise'] = $enterprise;\n return view('resource.create', $data);\n }", "title": "" }, { "docid": "624172c9b446660675cfc218201c4893", "score": "0.72918165", "text": "public function create()\n {\n return view('student.create_form');\n }", "title": "" }, { "docid": "db8dcffc1ba4b2b605dcce1b909738fb", "score": "0.7291717", "text": "public function create()\n {\n return view('iforms::admin.forms.create');\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.72809595", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "9b8422e12173f216746dee60bf33c3d0", "score": "0.72538716", "text": "public function create(Resource $resource) {\n return view('admin.resources.create', [\n 'resource' => $resource\n ]);\n }", "title": "" }, { "docid": "13c8115a5531399b8349f3dc63b250c9", "score": "0.72222257", "text": "public function create()\n\t{\n\t\treturn View::make('form8as.create');\n\t}", "title": "" }, { "docid": "2256010cbfe6b1a946cb9e41eb0fcdf7", "score": "0.7202679", "text": "protected function showCreateForm()\n\t{\n\n\t\treturn Response::view('adm/User/create');\n\n\t}", "title": "" }, { "docid": "3fb888dea195139fc63f84a6e5b7db63", "score": "0.7199865", "text": "public function create()\n {\n return View::make($this->resourceView.'.create');\n }", "title": "" }, { "docid": "c24e65c8a92dd430f73967cd2fb00ec9", "score": "0.7179227", "text": "public function create()\n {\n $this->resetValidation();\n $this->reset(['fields', 'is_editing']);\n\n $this->showForm();\n }", "title": "" }, { "docid": "329743cf1b042cac0daeb4f0daa763b6", "score": "0.71320176", "text": "public function create()\n {\n return view('forms.form');\n }", "title": "" }, { "docid": "9e9055cb2a8fbd71b31656ad3be35242", "score": "0.7123467", "text": "public function create()\n\t{\n\t\treturn View::make('form');\n\t}", "title": "" }, { "docid": "72d70e3f4e644e89aa9fc634f522e9f3", "score": "0.7121234", "text": "public function create()\n {\n return view('pengguna.form_create');\n }", "title": "" }, { "docid": "8217f78e0802225ffa5ceaca8a306ad6", "score": "0.7117613", "text": "public function create_form()\n {\n return view('dashboard.add-post');\n }", "title": "" }, { "docid": "03cb579a16562d9c16209eb75a728e1b", "score": "0.7117287", "text": "public function create()\n {\n $data['url'] = route('admin.'.$this->route . '.store');\n $data['title'] = 'Add ' . $this->viewName;\n $data['module'] = $this->viewName;\n $data['resourcePath'] = $this->view;\n return view('admin.general.add_form')->with($data);\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "63b10f50a8dceba6cbfaa8ee592a3368", "score": "0.7112527", "text": "public function create()\n {\n return view('dish.create_form');\n }", "title": "" }, { "docid": "21b741286121defb618cafb010ad9311", "score": "0.7101174", "text": "public function create()\n {\n return view('admin.crud.edit-new');\n }", "title": "" }, { "docid": "8095f9d5db36b0cb76f17111897cdb3c", "score": "0.70814747", "text": "public function create()\n {\n $pageTitle = \"Create New Form\";\n\n $saveURL = route('formbuilder::forms.store');\n\n // get the roles to use to populate the make the 'Access' section of the form builder work\n $form_roles = Helper::getConfiguredRoles();\n\n return view('Forms.create', compact('pageTitle', 'saveURL', 'form_roles'));\n }", "title": "" }, { "docid": "20da805cc8877d3018a5e2ca32361d90", "score": "0.70795083", "text": "public function create()\n {\n $title = 'Nova marca';\n\n $bred = 'Cadastro de marca';\n\n return view('panel.brands.form', compact('title', 'bred'));\n }", "title": "" }, { "docid": "a3472bb62fbfd95113a02e6ab298fb16", "score": "0.705323", "text": "public function create()\n {\n return view('admin.new.create');\n }", "title": "" }, { "docid": "891f6ed99624f790e6ba87605bd33af5", "score": "0.7053191", "text": "public function create()\n {\n return view(\"admin.{$this->viewName}.form\");\n }", "title": "" }, { "docid": "3220a8cacf1d32c34277393ecab00add", "score": "0.70478874", "text": "public function create()\n {\n return view('sucursal.new');\n }", "title": "" }, { "docid": "26cbce1c8f0499af8424ebd1f6a6dd57", "score": "0.70178115", "text": "public function create()\n\t{\n\t\treturn View::make(\"patient.addbasic\");\n\t}", "title": "" }, { "docid": "d06f7c1afab4e59a10f15d0cb1d3c4b8", "score": "0.70105183", "text": "function create()\n\t{\n\t\tglobal $tpl;\n\t\t\n\t\t$this->initForm(\"create\");\n\t\t$tpl->setContent($this->form->getHTML());\n\t}", "title": "" }, { "docid": "a5a196e155c478bce8bcc9f63265458b", "score": "0.7009477", "text": "public function actionCreate()\n\t{\n\n\t\t$this->render('create',array(\n\t\t));\n\t}", "title": "" }, { "docid": "3802afaa74a89f2c8d6425e7d6e1cdc7", "score": "0.7007387", "text": "public function create()\n\t{\n\t\treturn view('klien.create');\n\t}", "title": "" }, { "docid": "af465604f58a84e14427dc5be704c4c8", "score": "0.70042765", "text": "public function create()\n {\n return view('backend.restoran.create');\n }", "title": "" }, { "docid": "64a5d2efa5fafb8dc83ad1c29fe35fd6", "score": "0.699464", "text": "public function create()\n {\n //\n $url = \"program_insert\";\n return View('master.program.form', compact('url'));\n }", "title": "" }, { "docid": "12adf4e56f62b6fd6b2be421f733cdb4", "score": "0.698434", "text": "public function create()\n {\n return view( 'create' );\n }", "title": "" }, { "docid": "ab5df463c7a9233952e868bf92dc1ef6", "score": "0.69832397", "text": "public function create()\r\n {\r\n return view('linhas.create');\r\n }", "title": "" }, { "docid": "4f2c32b4e7b7e1111779bbd20db9bcc2", "score": "0.6982109", "text": "public function create()\n {\n //\n return view('pages.mahasiswa.book.form');\n }", "title": "" }, { "docid": "d143d78cb1c9dfb874e8c5f56cd86ff1", "score": "0.6975378", "text": "public function newForm(){\n return view('Admin.Forms.NewForm');\n }", "title": "" }, { "docid": "dfd7817f96e3d3a8efbdc92b688530d2", "score": "0.69740194", "text": "public function create()\n {\n return view('books.form');\n }", "title": "" }, { "docid": "7f62c25e75c6df1439832323661ce428", "score": "0.6971446", "text": "public function create()\n {\n return view('books.bookForm');\n }", "title": "" }, { "docid": "e5bf495201669521b638af27fa8cddb5", "score": "0.6967787", "text": "public function create()\n {\n return view('formation.add');\n }", "title": "" }, { "docid": "ddc9c9c46de513be5e3d6891c9ab972f", "score": "0.695512", "text": "public function create()\n {\n return view(\"addstudent/create\");\n }", "title": "" }, { "docid": "d0269072317f50ab5efacd83467f863a", "score": "0.6953515", "text": "public function create()\n {\n return view('rays.form');\n }", "title": "" }, { "docid": "8ed65484ff2ee4c220e635b0137f51c9", "score": "0.69491976", "text": "public function create()\n {\n return view('show.create');\n }", "title": "" }, { "docid": "05ae7e731f712a3380173a15672178bf", "score": "0.6948597", "text": "public function create() {\n\n //reponse payload\n $payload = [\n 'page' => $this->pageSettings('create'),\n 'resource_types' => $this->resource_types,\n ];\n\n //show the form\n return new CreateResponse($payload);\n }", "title": "" }, { "docid": "d7c7a20338802e16bc22ca75369f06a2", "score": "0.6945281", "text": "public function create()\n {\n return view('layouts.color.admin.form');\n }", "title": "" }, { "docid": "6ecf3520dbc6b244775e5b497a7565a4", "score": "0.69428843", "text": "public function create()\n {\n return view('nfrs.create');\n }", "title": "" }, { "docid": "b897f80400a545eb9d55f183d938e642", "score": "0.6940417", "text": "public function create()\n\t{\n return View::make('collections.form');\n\t}", "title": "" }, { "docid": "7a7cfb5c8701aba1d25ea45b2cf5b102", "score": "0.69309866", "text": "public function create() {\n\t\treturn view('admin.tuwasadkrisi.create');\n\t}", "title": "" }, { "docid": "45617f9262f7e3e6d319d5b51f153fb1", "score": "0.69270843", "text": "public function create()\n {\n //\n return view('admin.marca.form');\n }", "title": "" }, { "docid": "77e3877fefe4a530102f2f40dc331626", "score": "0.6924594", "text": "public function create()\n {\n // Return question create form\n return view('questions/create');\n }", "title": "" }, { "docid": "b549e5d3e6fe0a503fe0f90668ef99f4", "score": "0.69244874", "text": "public function create()\n {\n //\n return view('student.add');\n }", "title": "" }, { "docid": "a917cc1c921d761746db4cf9f3e12a3a", "score": "0.6924233", "text": "public function create()\n {\n return view($this->options['route-views'].\"save\")\n ->with('options', $this->options)\n ->with('typeForm', 'create');\n }", "title": "" }, { "docid": "71caf91bb376f2407900d7d27c12fd02", "score": "0.692264", "text": "public function newAction()\n {\n $entity = new Association();\n $form = $this->createForm(new AssociationType(), $entity);\n\n return $this->render('TperroinTremplinFoyerBundle:Association:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "31d54f71e037cde5639bddde8f2bb7b7", "score": "0.6921259", "text": "public function create()\n {\n return view('laramanager::entries.create')\n ->with('resource', $this->resource);\n }", "title": "" }, { "docid": "cd36d2eae1d0581a0d2c1a4e0882c5af", "score": "0.69212484", "text": "public function create()\n {\n return view('app/new');\n }", "title": "" }, { "docid": "8dccedea5fc74866be1212fb9ebe4a9f", "score": "0.6918725", "text": "public function new_form() {\n return view('kontak.create');\n }", "title": "" }, { "docid": "365c59355a0ce7a203acd4498f821d8b", "score": "0.69159657", "text": "public function create()\n {\n return view('form'); //\n }", "title": "" }, { "docid": "103c74e80f239cbc3e37ed94963cceb9", "score": "0.6915161", "text": "public function create()\n {\n $data['action'] = 'barang.store';\n return view('barang.form', $data);\n }", "title": "" }, { "docid": "e2cc21568f5c3d0b0bef89ccbb160341", "score": "0.69149476", "text": "public function create()\n {\n return view(\"penjualan.create\");\n }", "title": "" }, { "docid": "1d9a9b2f025f67d3cda5ec1f705d2b24", "score": "0.6914163", "text": "public function create()\n\t{\n\t\treturn view('bangunans.create');\n\t}", "title": "" }, { "docid": "72909e874fb00adb84d22089fc22c21f", "score": "0.69111377", "text": "public function create()\n {\n return view('admin.supplier.form');\n }", "title": "" }, { "docid": "cb3e538aa4f105751ebd074337f54482", "score": "0.6908008", "text": "public function create()\n {\n return view('item.form');\n }", "title": "" }, { "docid": "dd5e5000187112fd8684e974a6d38884", "score": "0.6905178", "text": "public function create()\n {\n return view(\"admin.nilai.add\");\n }", "title": "" }, { "docid": "b621d190772589f9c347b44d221d8300", "score": "0.69044167", "text": "public function create()\n\t{\n\t\treturn View::make('convenios.create');\n\t}", "title": "" }, { "docid": "4880a5fb962d118934f1229ef1a0bc83", "score": "0.6904059", "text": "public function create()\n {\n return view('problem_view_forms.create');\n }", "title": "" }, { "docid": "9469e97df6a2418f25d408bc6f6f3872", "score": "0.69038135", "text": "public function create()\n {\n //\n return view('bibliotecas.bibliotecaForm');\n }", "title": "" }, { "docid": "48699531a3cac8bd90071b858ee8a7b4", "score": "0.69034547", "text": "public function create()\n {\n $data['action'] = 'gaji.store';\n return view('gaji.form', $data);\n }", "title": "" }, { "docid": "ec3395e988fcbe87d4d546a3daa901e9", "score": "0.69017965", "text": "public function create()\n {\n return view('book.add');\n }", "title": "" }, { "docid": "a9f59a4d1eafbac435893dad09baa298", "score": "0.6901137", "text": "public function create()\n {\n return view('arklys.create');\n \n }", "title": "" }, { "docid": "799a7107ca6c011a3a40d5681eb321ba", "score": "0.68997043", "text": "public function create()\n {\n return view('admin.enterprises.form');\n }", "title": "" }, { "docid": "f6cfc53832cf748cf4dc7b872721a0cd", "score": "0.6896611", "text": "public function create()\n {\n return view('Enterprise.create');\n }", "title": "" }, { "docid": "b026faf0a320028862c1ad2d3bb9025a", "score": "0.68951064", "text": "public function create()\n {\n return view('Libro.create');\n }", "title": "" }, { "docid": "72905472eb77524448338f6d4f09819a", "score": "0.6891399", "text": "public function create()\n {\n\t\t// load the create form (app/views/project/create.blade.php)\n// \t\treturn view('project.create');\n //\n }", "title": "" }, { "docid": "f881c92fd91c0c6e85a0013d05cabef9", "score": "0.68907523", "text": "public function create()\n\t{\n\t\treturn view('angular.field.create');\n\t}", "title": "" }, { "docid": "6769fe63e35d4f98abe507728065b246", "score": "0.6890337", "text": "public function create()\r\n {\r\n return view('superadmin::create');\r\n }", "title": "" }, { "docid": "bdb0161d2f2f44cdaea93bf890a4c02e", "score": "0.68880934", "text": "public function create()\n {\n return view(\"create\");\n }", "title": "" }, { "docid": "96a1b829528ee1892db1a16ea7cc051c", "score": "0.6887538", "text": "public function create()\n {\n //\n return view('pages/Applicant/applicant-add-wizard');\n }", "title": "" }, { "docid": "d337f2838be9202f4347f66c29dec41a", "score": "0.68870914", "text": "public function create()\n {\n return view('rekening::create');\n }", "title": "" }, { "docid": "97d13fc67b6142f744517f2666c328f9", "score": "0.6885548", "text": "public function create()\n {\n return view('siklus.create');\n }", "title": "" }, { "docid": "b196d7397b30ecc10fff3289f162f61d", "score": "0.6882282", "text": "public function create()\n\t{\n\t\treturn View::make('addbook');\n\t}", "title": "" }, { "docid": "0370323e1b0084d6bb286aa9a34a36b4", "score": "0.6879559", "text": "public function create()\n {\n return view('admin/book/add_book');\n }", "title": "" }, { "docid": "555640b44052bbd2e0076c664a730072", "score": "0.6879199", "text": "public function create()\n {\n $this->pageData['MainHeading'] = \"Add \" . $this->singularName;\n $this->pageData['PageTitle'] = \"Add \" . $this->singularName;\n $this->pageData['SubNav'] = \"Add WebUser\";\n $this->pageData['NavHeading'] = \"New \" . $this->singularName;\n\n // Add App Form\n $form = $this->form();\n return view('admin.add')\n ->with(['pageData' => $this->pageData])\n ->with(compact('form'))\n ->with(compact('jsValidator'));\n }", "title": "" }, { "docid": "e9d218bc4e14ef9fc16a178fb3c0a8a7", "score": "0.68778735", "text": "public function create()\n {\n return view('student.add_student');\n }", "title": "" }, { "docid": "fa5d4892f2202fe3e2b430e8601c7914", "score": "0.68761986", "text": "public function create()\n {\n return view('kelas.form');\n }", "title": "" }, { "docid": "f24fafb5071cdedf2996c6f0b152c5d9", "score": "0.6875914", "text": "public function create()\n {\n $model = new Student();\n return view('student.form', compact('model'));\n }", "title": "" }, { "docid": "21c99f7ff784906712457bbb6803a266", "score": "0.68701106", "text": "public function create()\n {\n return view('/inventario/inventarioForm');\n }", "title": "" }, { "docid": "585c34487cf4b9a7f9702352a458a207", "score": "0.6868935", "text": "public function create()\n {\n return view(\"vm.create\");\n }", "title": "" }, { "docid": "23a9a2968aad0f2152e0b0b2f726e4a7", "score": "0.68646777", "text": "public function create()\n {\n return view('crud.create', array('title' => $this->title,'title_create' => $this->title_create,\n 'route_path' => $this->route, 'form' => $this->form) );\n }", "title": "" }, { "docid": "5413823d42105e7ba8892f6a6617ee65", "score": "0.68627137", "text": "public function create()\n {\n return admin_view('trick.form');\n }", "title": "" }, { "docid": "72662bf2c4720e8e93ece21009afefbc", "score": "0.68591464", "text": "public function create()\n {\n $recipe = new Recipe;\n $formAction = action('RecipeController@store');\n return view(\"backend.recipes.form\", compact('recipe', 'formAction'));\n }", "title": "" }, { "docid": "451449463d63fe09435ede6575b0059a", "score": "0.6858702", "text": "public function create()\n\t{\n\t\treturn view('presentasis.create');\n\t}", "title": "" }, { "docid": "1f02999647bca142e1e38a50a78a2029", "score": "0.6858282", "text": "public function create()\n\t{\n\t\treturn view('admin.cars.create') ;\n\t}", "title": "" }, { "docid": "5f6d12f938909e021083d25409fea8ca", "score": "0.6857598", "text": "public function create()\n \t{\n \t\treturn view('jenisobat.create');\n \t}", "title": "" }, { "docid": "637c25fe6061e30a8bb2e6f2975a200c", "score": "0.68569857", "text": "public function newAction()\n {\n $entity = new Conference();\n $form = $this->createForm(new ConferenceType(), $entity);\n\n return $this->render('CfpConferenceBundle:Conference:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "title": "" }, { "docid": "44d743ec633ed862b902c3ae3c644d23", "score": "0.6853802", "text": "public function create()\n {\n return view(\"admin.{$this->tableName}.add-edit\")\n ->with([\n \"model\"=>null,\n \"action\"=> \"/{$this->tableName}/store\",\n\n ]);\n }", "title": "" }, { "docid": "f941e8fc1096557e8ff62a805c7a1003", "score": "0.68527156", "text": "public function create()\n {\n return view('Solicitud.create');\n }", "title": "" }, { "docid": "e4a3eb616afb7000bb22ee5422af1276", "score": "0.685243", "text": "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cidade\";\n\n return view('admin.cities.form', compact('title', 'subtitle'));\n }", "title": "" }, { "docid": "6a8820b7d2e1b22f6ff49cfebd079202", "score": "0.68513477", "text": "public function newAction()\n {\n $entity = new Restaurant();\n $form = $this->createCreateForm($entity);\n\n return $this->render('MesdLunchBundle:Restaurant:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n\n\n ));\n }", "title": "" }, { "docid": "d58534453dca5d05eb6bf9759a643eaa", "score": "0.68512565", "text": "public function create()\n\t{\n\t\treturn View::make('create');\n\t}", "title": "" }, { "docid": "08b2b1dc380d0797db7570a3627d8b31", "score": "0.68503934", "text": "public function create()\n {\n return view('courier_record.add');\n }", "title": "" } ]
b8757e7f55c59188dda6815ca5633b54
Lists all Pet models.
[ { "docid": "63d70742b16a80463e309ae172389f81", "score": "0.7260601", "text": "public function actionIndex()\n {\n $searchModel = new PetSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" } ]
[ { "docid": "a04d1771f0fbe32885a46ccf19736edd", "score": "0.67855203", "text": "public function index()\n {\n $pets = Pet::all();\n return view('pet.index',compact('pets'));\n }", "title": "" }, { "docid": "8a9b560c7ac8865d6aa3aa34855adc61", "score": "0.6697437", "text": "public function index()\n {\n //gets all pets\n\n $pets = Pets::all();\n return $pets;\n }", "title": "" }, { "docid": "a5e69b7eb6b1a7ef871ee525294f2914", "score": "0.65464216", "text": "public function index()\n {\n $pets = Pet::OrderBy('nome', 'ASC')\n ->where('user_id', Auth::id())\n ->get();\n return view('pet.listapet', ['pets' => $pets]);\n }", "title": "" }, { "docid": "cff86bd44d78bba40d09f2378b1ef3a0", "score": "0.64487374", "text": "public function index()\n {\n $pets = Pet::with('owner')->get();\n return view('admin.pets.index', compact('pets'));\n }", "title": "" }, { "docid": "434db4d631f741983010510760951e05", "score": "0.6379703", "text": "public function index()\n {\n return view ('pet.index' , ['pets' => Pet::all()]);\n }", "title": "" }, { "docid": "2cdfeb72e96c7400fe794e69217ef4eb", "score": "0.62716633", "text": "public function fetchAll()\r\n\t{\r\n\t\t$typePets = $this->getTypePetModel()->fetchAll();\r\n\t\treturn $typePets;\r\n\t}", "title": "" }, { "docid": "9d50e308c537180db080497210065255", "score": "0.6254538", "text": "public function getListOfModels() {\n $requestBody = null;\n $inputArray = [];\n $ret = $this->fetch('GET', 'repository/models', $requestBody, $inputArray, array (\n ), array (\n ), array (\n 200 => 'Indicates request was successful and the models are returned',\n 400 => 'Indicates a parameter was passed in the wrong format. The status-message contains additional information.',\n ));\n return $ret;\n }", "title": "" }, { "docid": "dacdca753c34a07e33842156cc2eb9e2", "score": "0.6129437", "text": "public function allIndex()\n {\n return Pokemon::all();\n }", "title": "" }, { "docid": "9e9370104076be10f6d265af478b45b3", "score": "0.6108979", "text": "public function index()\n {\n $models = $this->modelRepository->getAll();\n return $this->respondOk([\n 'models' => $this->modelTransformer->transformCollection($models)\n ]);\n }", "title": "" }, { "docid": "173d5e20b6fe9c989fd8da19dc4756c3", "score": "0.60902244", "text": "public function findAll()\n {\n try {\n $models = PoTenderItem::all();\n return $models;\n } catch (Exception $e) {\n Log::error($this->logName . '::findAll error : ' . $e->getMessage());\n throw $e;\n }\n }", "title": "" }, { "docid": "c6cf4ee1a8d9ab19ce1afb3e0a897567", "score": "0.60657024", "text": "public function index()\n {\n return ModelsProduct::all();\n }", "title": "" }, { "docid": "ab12e92423b0c80d332e72dc21869600", "score": "0.60420775", "text": "public function index()\n {\n $users = User::all();\n $phones = Phone::all();\n $pets = Pet::with('gender', 'breed', 'type', 'vaccines', 'client.user', 'vets')->get();\n // dd($pets->first()->vets);\n return view('vetsystem.schedule.index', compact('pets', 'users', 'phones'));\n }", "title": "" }, { "docid": "5c5084da01a3d18e3878dff9220c3a43", "score": "0.6037693", "text": "public function getModels();", "title": "" }, { "docid": "ee5f686eda443f201228ff3541c022a5", "score": "0.60373795", "text": "public function index()\n {\n return Animal::all();\n }", "title": "" }, { "docid": "ee5f686eda443f201228ff3541c022a5", "score": "0.60373795", "text": "public function index()\n {\n return Animal::all();\n }", "title": "" }, { "docid": "523abecce4995096b880afc5b1de7051", "score": "0.60202986", "text": "public function getAllModels()\n {\n if (!isset($this->model)) {\n $this->model = $this->modelRepo->findBy([], ['name' => 'asc']);\n }\n\n return $this->model;\n }", "title": "" }, { "docid": "d09e1e3623b70f213c24361c313e3392", "score": "0.6012514", "text": "public function index()\n {\n $petugas = Petugas::all();\n return view('admin.petugas.list', ['petugas'=>$petugas]);\n }", "title": "" }, { "docid": "ff6369deb5f67db749b5e94d9ee16c9a", "score": "0.6012088", "text": "public function listsAll()\n {\n $products = new Product();\n return $products->all();\n }", "title": "" }, { "docid": "29d0bf0024178935c20c057b911ce2a2", "score": "0.5983045", "text": "public function show(pets $pets)\n {\n //\n }", "title": "" }, { "docid": "129d73586c9bb6a0f63846bec59a4301", "score": "0.5972466", "text": "public function model()\n {\n return Pet::class;\n }", "title": "" }, { "docid": "b5b4b1b61ecb6b658eeeb1bb650f2d1b", "score": "0.5942229", "text": "public function index()\n {\n $oCarModels = CarModel::paginate(15);\n return view('admin.fleet_management.models.index', compact('oCarModels'));\n }", "title": "" }, { "docid": "afadb1589cbba9865f2e3346e04e6001", "score": "0.59184456", "text": "public function index()\n {\n return Vehicle::all();\n }", "title": "" }, { "docid": "d7cfa3fa5990ee648c1f7c9042daeb31", "score": "0.5891346", "text": "public function index()\n {\n return $this->model->all();\n }", "title": "" }, { "docid": "d7cfa3fa5990ee648c1f7c9042daeb31", "score": "0.5891346", "text": "public function index()\n {\n return $this->model->all();\n }", "title": "" }, { "docid": "18be17ef8678843ecf6d65f5aa5a9ee8", "score": "0.58553606", "text": "public function actionList() {\r\n\t\t// ToDo: Add security, Add pagination\r\n\t\t\r\n\t\t// Get a list of all the required resources\r\n\t\t$models = \\parallel\\yii\\ActiveRecord::model($this->_model)->findAll();\r\n\t\t\r\n\t\t// Return the list to the client\r\n\t\t$this->sendResponse($models);\r\n\t}", "title": "" }, { "docid": "7fbf01d99d6c497e731539e094fa9c1a", "score": "0.58451384", "text": "public function index()\n {\n $product = new Products();\n return $product->all();\n }", "title": "" }, { "docid": "9777075d5734728c57769451927a836d", "score": "0.5840927", "text": "public function getAll()\n {\n return $this->model->get();\n }", "title": "" }, { "docid": "af1f2f546544fa13d7391e4cfafa0bd2", "score": "0.58179307", "text": "public function all()\n {\n return $this->modelClassName->all();\n }", "title": "" }, { "docid": "472213571a7f05f599acd4ab54ba54ee", "score": "0.5801028", "text": "public function index()\n {\n return Person::all();\n }", "title": "" }, { "docid": "2c6c1101ff3f8d3ecdc9baedf810caf2", "score": "0.5799871", "text": "public function getModelsList(){\n return $this->_get(1);\n }", "title": "" }, { "docid": "f3e0e025d7a45097adb753bd81dfbeb8", "score": "0.579603", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('ItesACBackendBundle:Modelo')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "title": "" }, { "docid": "8258f0372b02a367c988012ed669a64f", "score": "0.57931703", "text": "public function index()\n {\n return Vet::all();\n }", "title": "" }, { "docid": "a412e82eaeb15fd1f8c9a0ab91630d81", "score": "0.5789625", "text": "public function index(){\n\n return $this->model->all();\n }", "title": "" }, { "docid": "64f124af78a9d1c5e8ba31910ec582e1", "score": "0.5780854", "text": "public static function getAll(){\n return Model::factory(__CLASS__)\n ->find_many();\n }", "title": "" }, { "docid": "600baa097cc292bfaecc83c9cfe10193", "score": "0.5777215", "text": "public function index()\n {\n $getall = Animal::all();\n return $getall;\n \n }", "title": "" }, { "docid": "c8584b2c97d4c5f2d3eda4dbf8f3b7f5", "score": "0.5774237", "text": "public function index()\n {\n return Books::all();\n }", "title": "" }, { "docid": "59d39ff4dce5931059cd00e9911bed88", "score": "0.577228", "text": "public static function allTagModels(): Collection\n {\n return app(TagService::class)->getAllTags(static::class);\n }", "title": "" }, { "docid": "494ed28d0542aeefb8c405fbd491663e", "score": "0.5768257", "text": "public function all()\r\n {\r\n return $this->model->get();\r\n }", "title": "" }, { "docid": "fd3cc45630d31112c6c3df962626cfcd", "score": "0.576809", "text": "public function index()\n {\n $dogs = Dog::all();\n return $dogs;\n }", "title": "" }, { "docid": "9f999ac524aa046885cf0a2bfba4c530", "score": "0.5751767", "text": "public function index()\n {\n return $this->resourceCollection($this->model->with('players')->get());\n }", "title": "" }, { "docid": "24a6f5935af4435483c2f0d7a574d097", "score": "0.57516414", "text": "public function index()\n {\n $title = 'Professions';\n $modulo = $this->module;\n $models = Profession::all();\n $total = Profession::all()->count();\n $fields = [\n 'id',\n 'name',\n 'description',\n 'created_at',\n 'updated_at'\n ];\n return view('list', compact('title', 'models', 'total', 'fields', 'modulo'));\n }", "title": "" }, { "docid": "102f8a49c87b091f66aa02ed74d75cea", "score": "0.57414013", "text": "public function all()\n {\n return $this->model->get();\n }", "title": "" }, { "docid": "102f8a49c87b091f66aa02ed74d75cea", "score": "0.57414013", "text": "public function all()\n {\n return $this->model->get();\n }", "title": "" }, { "docid": "102f8a49c87b091f66aa02ed74d75cea", "score": "0.57414013", "text": "public function all()\n {\n return $this->model->get();\n }", "title": "" }, { "docid": "102f8a49c87b091f66aa02ed74d75cea", "score": "0.57414013", "text": "public function all()\n {\n return $this->model->get();\n }", "title": "" }, { "docid": "102f8a49c87b091f66aa02ed74d75cea", "score": "0.57414013", "text": "public function all()\n {\n return $this->model->get();\n }", "title": "" }, { "docid": "102f8a49c87b091f66aa02ed74d75cea", "score": "0.57414013", "text": "public function all()\n {\n return $this->model->get();\n }", "title": "" }, { "docid": "102f8a49c87b091f66aa02ed74d75cea", "score": "0.57414013", "text": "public function all()\n {\n return $this->model->get();\n }", "title": "" }, { "docid": "2a2b81b4cac71e45ef4bdb46d3f3c7b9", "score": "0.5739004", "text": "public function getAll()\n {\n return $this->model->all();\n }", "title": "" }, { "docid": "2a2b81b4cac71e45ef4bdb46d3f3c7b9", "score": "0.5739004", "text": "public function getAll()\n {\n return $this->model->all();\n }", "title": "" }, { "docid": "7d3684cf4600843008f3c401d3c5573f", "score": "0.5723122", "text": "public function pets()\n {\n return $this->hasMany(Pet::class, 'category_id');\n }", "title": "" }, { "docid": "f2263734a177e73295d7a734917c35dd", "score": "0.5714547", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('PhotoPoolPoolBundle:Pool')->findAll();\n\n return array('entities' => $entities);\n }", "title": "" }, { "docid": "a5b7b489da6ddc94ea26d3f7216e6f44", "score": "0.57025516", "text": "public function index()\n {\n return Brand::with('models')->get();\n }", "title": "" }, { "docid": "eb2d7f2b5a44abcb18fd2d1e9e3bf384", "score": "0.5696692", "text": "public function index()\n {\n $objeto = Objeto::all();\n return $this->showAll($objeto);\n }", "title": "" }, { "docid": "a4ce66acedee6dafb6a0d61ccb9950a5", "score": "0.56920743", "text": "public function index()\n {\n\n return $this->productService->getAll();\n }", "title": "" }, { "docid": "676d3f9b7f00e583862f3d8f2247a675", "score": "0.5688839", "text": "public function index()\n {\n return Pedido::all();\n }", "title": "" }, { "docid": "b2cdc02e3261e7f21532cf20f228b598", "score": "0.5682046", "text": "public static function index()\n {\n return Pedido::all();\n }", "title": "" }, { "docid": "38da531880083571059b52f6a7d3405c", "score": "0.567896", "text": "public function index()\n {\n return BetCollection::make(Bet::orderBy('id', 'desc')->limit(200)->get());\n\n //return new Bets(Bet::orderBy('id', 'desc')->get());\n }", "title": "" }, { "docid": "ab33b7f2f8fd78c672c72409499d4cb2", "score": "0.56703717", "text": "public function getModelsList()\n {\n $query = $this->createQueryBuilder('m')\n ->orderBy('m.name', 'DESC')\n ->getQuery();\n\n return $query->execute();\n }", "title": "" }, { "docid": "4f771aaf7ed51baec5ef769a0c5463f1", "score": "0.5662756", "text": "public function index()\n {\n return Puesto::all();\n }", "title": "" }, { "docid": "1c2ef38c3b24dabfb97d037b25ba077a", "score": "0.56577635", "text": "public function getAll()\n {\n return $this->model->newQuery()->orderBy('name')->get();\n }", "title": "" }, { "docid": "e427acd880e29ffb3b0940328026cda6", "score": "0.56505567", "text": "public function index()\n {\n $models = Post::orderBy('created_at', 'DESC')->paginate(10);\n return view('home', ['models' => $models]);\n // $models = Post::all();\n // return view('home', compact('models'));\n }", "title": "" }, { "docid": "5a9bf49770078d99c55754810b21d1ab", "score": "0.5647284", "text": "public function getAll()\n {\n return Product::all();\n }", "title": "" }, { "docid": "008397e18ab71bd8ba6be4f3d150af08", "score": "0.5645335", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('UNAMAppBundle:Precio')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "title": "" }, { "docid": "a0ef86978f81f373a3bde425667a0068", "score": "0.5642904", "text": "public function index()\n {\n $images = Image::with(['pet'])->paginate();\n return view('images.index', compact('images'));\n }", "title": "" }, { "docid": "7eb4d5f9410c2dc6b15a13d47a1433af", "score": "0.56324244", "text": "public function getAll()\n {\n return Pedido::all();\n }", "title": "" }, { "docid": "86029ce3c13ceb873835e8f5569f592a", "score": "0.56320536", "text": "public function index()\n {\n return Product::all();\n }", "title": "" }, { "docid": "86029ce3c13ceb873835e8f5569f592a", "score": "0.56320536", "text": "public function index()\n {\n return Product::all();\n }", "title": "" }, { "docid": "86029ce3c13ceb873835e8f5569f592a", "score": "0.56320536", "text": "public function index()\n {\n return Product::all();\n }", "title": "" }, { "docid": "86029ce3c13ceb873835e8f5569f592a", "score": "0.56320536", "text": "public function index()\n {\n return Product::all();\n }", "title": "" }, { "docid": "86029ce3c13ceb873835e8f5569f592a", "score": "0.56320536", "text": "public function index()\n {\n return Product::all();\n }", "title": "" }, { "docid": "9d0fbcd550a7a5544c8796a762a5dd59", "score": "0.56300765", "text": "public function index()\n {\n $petugaspikets = petugaspikets::all();\n return view('petugaspiket.index', compact('petugaspikets'));\n }", "title": "" }, { "docid": "2da6e717f6a515954f13063f870f7d06", "score": "0.56270546", "text": "public function listar() {\n $dados = $this->model->listar();\n echo $this->toJson($dados);\n }", "title": "" }, { "docid": "7f5e39c31f6a692ec9d89023ca2b983b", "score": "0.5619516", "text": "public function index()\n {\n return Profesor::all();\n }", "title": "" }, { "docid": "670550faf3b07bc644b9a8691c7b2079", "score": "0.56177884", "text": "public function list(){\n\t\treturn view('animals.list', array('animals'=>Animal::all()));\n\t}", "title": "" }, { "docid": "f6a402e7a32104ddaace19677f392b41", "score": "0.56131166", "text": "public function index()\n {\n return $this->repository->with(['cargo', 'perfil'])->all();\n }", "title": "" }, { "docid": "897d1c2e223fabb60e7cc1523e833f56", "score": "0.56050307", "text": "public function index() {\n $models = $this->model->paginate(10);\n $title = 'Models';\n\n return View::make('admin.models.index', compact('models','title'));\n }", "title": "" }, { "docid": "154e22d994f7987e957ccc81768f1ca1", "score": "0.56032676", "text": "public function index()\n {\n $products = Product::all();\n\n return $products;\n }", "title": "" }, { "docid": "154e22d994f7987e957ccc81768f1ca1", "score": "0.56032676", "text": "public function index()\n {\n $products = Product::all();\n\n return $products;\n }", "title": "" }, { "docid": "d9619092e6b91482e5ac8ac16f6850ea", "score": "0.56008774", "text": "public function all()\n {\n return Pedido::all();\n }", "title": "" }, { "docid": "f496f35b0bfb55e965dfdf6544f170c7", "score": "0.5597816", "text": "public function index(Request $request)\n {\n $this->filterTable();\n return $this->getResultList($this->model->orderBy('name'));\n }", "title": "" }, { "docid": "08e4a05f51429d3da923083bce11a0a9", "score": "0.559274", "text": "public function todos() //Ver la lista de Pokémon\n {\n $pokemones=Pokemon::all();\n \n return view('Pokemon.index')->with('pokemones', $pokemones);\n }", "title": "" }, { "docid": "fa66f5c3143cfe04dd8379f7cd9e4d4b", "score": "0.5578254", "text": "public function getAll()\n {\n $this->all();\n }", "title": "" }, { "docid": "08c43a91fa548a48aeb104bc367e89cd", "score": "0.55764747", "text": "public function index()\n {\n return Elettori::all();\n }", "title": "" }, { "docid": "e08b053c436106dadd41ee3090484af2", "score": "0.55739856", "text": "public function index()\n {\n return Price::all();\n }", "title": "" }, { "docid": "94b94526971f2a8f16572c1433dd2d47", "score": "0.5569407", "text": "public function index()\n {\n return Car::all();\n }", "title": "" }, { "docid": "9bb7dfcc6d45bc345a47cff2fc32c370", "score": "0.5568849", "text": "public function findAll(){\n\n /* Reponse ajoutee au tableau des films */\n $response = $this->movieService->findAll();\n\n /* Gestion de la reponse */\n $this->handleResponse($response);\n\n /* Template a afficher */\n include_once './ressources/views/movie/displayAllMovies.php';\n }", "title": "" }, { "docid": "d9c9e79b0262743140cad458ba3b46f3", "score": "0.55683357", "text": "public function index(): Collection\n {\n return Experience::all();\n }", "title": "" }, { "docid": "817e19086d5f43acabdb2d79b4c60044", "score": "0.55678916", "text": "public function actionIndex()\n {\n $searchModel = new EntitySearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "6e8e5ced0045cb52e766c1285c1fea1b", "score": "0.5567507", "text": "public function index()\n {\n return Foto::all();\n }", "title": "" }, { "docid": "05a32ada435b406e2ae9164d9a2359d4", "score": "0.5567345", "text": "public function listar()\n {\n return Produtos::All();\n }", "title": "" }, { "docid": "29df4b3ac907cf74a7fdf9e898dfd46e", "score": "0.55631477", "text": "public function getAll()\n {\n return $this->productsRepository->findAll();\n }", "title": "" }, { "docid": "d286f755da420821e8f66aff21e2b7d0", "score": "0.55570424", "text": "public function index()\n {\n $models=Motormodels::all();\n return view('Models.index')->with('models', $models);\n }", "title": "" }, { "docid": "1df89100d6ed9c8bb16fb51f7cd4927b", "score": "0.5556016", "text": "public function getAll()\n\t{\n\t\t$products = $this->product->with('type');\n\t\treturn $products->paginate(5);\n\t}", "title": "" }, { "docid": "ca592e87cf4ec12e67c3d2eb3eb04fe9", "score": "0.55544907", "text": "public function index()\n\t{\n return Product::all();\n\t}", "title": "" }, { "docid": "f33af7d1382b44698b837ee754f940cc", "score": "0.55446523", "text": "public function allAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n\n $alumnos = $em->getRepository('AppBundle:Alumno')->findAllOrderedByPaterno();\n\n return $this->render(':alumno:todos.html.twig', array(\n 'alumnos' => $alumnos,\n ));\n }", "title": "" }, { "docid": "f2b4ec0bdd3b8a1cf5569c088f21b327", "score": "0.55436915", "text": "public function all()\n {\n \treturn Employees::all();\n }", "title": "" }, { "docid": "8ef8bb26b9000ca28dbfcc5a9d5f6820", "score": "0.55435777", "text": "public function index()\n {\n $personas = Persona::all();\n\n return $this->showAll($personas);\n }", "title": "" }, { "docid": "ae37dd86624d138b2749fcb90a6e89a7", "score": "0.55430084", "text": "public function actionIndex()\n {\n $searchModel = new LotoPocketSearch(['scenario' => LotoPocket::SCENARIO_SEARCH]);\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n $dataProvider->pagination->pageSize = 20;\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "33ed441cd9cfede0e8b67e67a8f09ab1", "score": "0.5542239", "text": "public function get_vip_models()\n {\n $vip_models = ModelsApi::GetVIPModels();\n\n return response()->json([\n 'model' => $vip_models\n ], 200);\n\n }", "title": "" } ]
d27ab4466957a53da4e805e0bd8e9f41
funcao construtor da classe
[ { "docid": "d56d4ccfb415a2f5a8c4cd4f3170861f", "score": "0.0", "text": "function cl_rhconsignacaobancolayout() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhconsignacaobancolayout\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" } ]
[ { "docid": "3eba9c555f66ff4fdfff258bf6b5829d", "score": "0.80764824", "text": "public function _construct()\n\t\t{\n\t\t\t\n\t\t}", "title": "" }, { "docid": "6bd592f13b99fdb628b00e1854be4490", "score": "0.8013261", "text": "public function _construct()\r\n\t{\r\n\r\n\t}", "title": "" }, { "docid": "ed5e00e5e7b8f176d4970635ecd374c6", "score": "0.80035394", "text": "public function __constructor()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "913c9688628ed3c72f08866551531a5e", "score": "0.79978126", "text": "function __construct()\r\t\t\t{\r\t\t\t}", "title": "" }, { "docid": "544c476e12817d0418be89741da13648", "score": "0.79490113", "text": "function __construct() \n\t\t{\n\t\t\t\n\t\t}", "title": "" }, { "docid": "de768133532cb9e288771cb9771f2a1e", "score": "0.7937634", "text": "function __construct()\n\t\t\t{\n\n\t\t\t}", "title": "" }, { "docid": "19573a15d00b86a4d6930e5554f0529d", "score": "0.7910304", "text": "public\tfunction\t__construct(){\r\n\t\t}", "title": "" }, { "docid": "54c320efb86f1551671f3677f035e1c2", "score": "0.78991294", "text": "function __construct()\r\n\t\t{\r\n\t\r\n\t\t}", "title": "" }, { "docid": "27dc3ced3af79a746433e0a9e733c35b", "score": "0.78932434", "text": "function __construct() {}", "title": "" }, { "docid": "27dc3ced3af79a746433e0a9e733c35b", "score": "0.78932434", "text": "function __construct() {}", "title": "" }, { "docid": "27dc3ced3af79a746433e0a9e733c35b", "score": "0.78932434", "text": "function __construct() {}", "title": "" }, { "docid": "3ee234bb24d6adf2a5b41b78325b3c57", "score": "0.7874291", "text": "function constructor(){\n }", "title": "" }, { "docid": "a35772e47995de4a7841f4d10ea9da33", "score": "0.78625774", "text": "function __construct(){}", "title": "" }, { "docid": "a35772e47995de4a7841f4d10ea9da33", "score": "0.78625774", "text": "function __construct(){}", "title": "" }, { "docid": "a35772e47995de4a7841f4d10ea9da33", "score": "0.78625774", "text": "function __construct(){}", "title": "" }, { "docid": "a35772e47995de4a7841f4d10ea9da33", "score": "0.78625774", "text": "function __construct(){}", "title": "" }, { "docid": "8bf733928e83ea47b514aec42fd74459", "score": "0.782691", "text": "function __construct()\n\t{\n\n\t}", "title": "" }, { "docid": "8bf733928e83ea47b514aec42fd74459", "score": "0.782691", "text": "function __construct()\n\t{\n\n\t}", "title": "" }, { "docid": "a4db60350e38cd087ad5f029dfa339ad", "score": "0.782577", "text": "function __construct()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "a4db60350e38cd087ad5f029dfa339ad", "score": "0.782577", "text": "function __construct()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "5b764caee4458e246092a640b198429e", "score": "0.78223693", "text": "function __construct(){\r\n\t\t}", "title": "" }, { "docid": "2bb6f663590d95f59792d67ee3a5b9c0", "score": "0.78204775", "text": "public function __construct() {\n // aqui el contructor de la clase \n }", "title": "" }, { "docid": "118907448dea30a99d8ed40203ed8cac", "score": "0.78085786", "text": "public function __construct(){\n\t\t\n\t\t}", "title": "" }, { "docid": "eab05314dee97d3237d06a72762b7633", "score": "0.780436", "text": "public function __construct()\n\t{\t\t\t\t\t\t\t\t\n\t}", "title": "" }, { "docid": "b2d3b5d1e2c5c5eb37f050b1a362ef72", "score": "0.7797204", "text": "final private function __construct() { }", "title": "" }, { "docid": "3b7061506d352fd059455ee939fcf3f7", "score": "0.7794912", "text": "function __construct (){\n echo \"ini adalah isi method construct </br>\";\n }", "title": "" }, { "docid": "6e412eeeecc728cfc9531940c11e5fac", "score": "0.7794674", "text": "public function __construct()\n\t{\n\t}", "title": "" }, { "docid": "3b3b7c35ea14ca924b874dc76e5eff7a", "score": "0.779204", "text": "function __construct(){\n\t }", "title": "" }, { "docid": "ac977fc5b5b37d3f5f4b66e3824d7f5f", "score": "0.77815616", "text": "public function __construct()\n\t {\n\t //\n\t }", "title": "" }, { "docid": "4a6b4bd755dba30f20b86968ae57b352", "score": "0.77767164", "text": "private function __construct( )\n\t\t{\n\n\t\t}", "title": "" }, { "docid": "5215c877d0440b5e43315f1f137c1206", "score": "0.7767797", "text": "function __construct()\r\n\t{\r\n\t}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.77637684", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.77637684", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.77637684", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.77637684", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.77637684", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.77637684", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.77637684", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.77637684", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.77637684", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.77637684", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.77637684", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.77637684", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.77637684", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.77637684", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.77637684", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.77637684", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.77637684", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.77637684", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.77637684", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.77637684", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.77637684", "text": "private function __construct(){}", "title": "" }, { "docid": "4b349b5d0db42d816079c1f94a426a03", "score": "0.7750885", "text": "function __construct() {\r\n\r\n\t\t}", "title": "" }, { "docid": "e7dd922ddf4b1ac723ee9aeeba11abb7", "score": "0.7749547", "text": "public function __construct()\n\t\t{\n\t\t\t\n\t\t}", "title": "" }, { "docid": "e7dd922ddf4b1ac723ee9aeeba11abb7", "score": "0.7749547", "text": "public function __construct()\n\t\t{\n\t\t\t\n\t\t}", "title": "" }, { "docid": "e7dd922ddf4b1ac723ee9aeeba11abb7", "score": "0.7749547", "text": "public function __construct()\n\t\t{\n\t\t\t\n\t\t}", "title": "" }, { "docid": "2cd72e642a2bed86e519bbbc6c9c4253", "score": "0.7745494", "text": "function __construct()\n\t{\n\t}", "title": "" }, { "docid": "2cd72e642a2bed86e519bbbc6c9c4253", "score": "0.7745494", "text": "function __construct()\n\t{\n\t}", "title": "" }, { "docid": "2cd72e642a2bed86e519bbbc6c9c4253", "score": "0.7745494", "text": "function __construct()\n\t{\n\t}", "title": "" }, { "docid": "2cd72e642a2bed86e519bbbc6c9c4253", "score": "0.7745494", "text": "function __construct()\n\t{\n\t}", "title": "" }, { "docid": "2cd72e642a2bed86e519bbbc6c9c4253", "score": "0.7745494", "text": "function __construct()\n\t{\n\t}", "title": "" }, { "docid": "d051799d4ac2230e0ef8804d723cf4b0", "score": "0.7742173", "text": "public function __construct() {\n\n\n\t\t}", "title": "" }, { "docid": "d051799d4ac2230e0ef8804d723cf4b0", "score": "0.7742173", "text": "public function __construct() {\n\n\n\t\t}", "title": "" }, { "docid": "2bede2056ceba3f1ae4ce818856f7cec", "score": "0.7736786", "text": "public function __construct() // constructor, PHP5 only\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "0483931b02bf2110031b1ebed9086eb8", "score": "0.7723349", "text": "public function __construct()\n\t\t{\n\t\t}", "title": "" }, { "docid": "fe871c06850468f6313d05adb0bfb621", "score": "0.77101105", "text": "function __construct(){\n\n\t}", "title": "" }, { "docid": "d954a360842d4f0a77e7d76b8ad0af07", "score": "0.77045894", "text": "public function __construct()\r\n {\r\n \t\r\n }", "title": "" }, { "docid": "3b6ccf052eab19a3ba3b3d9e1c839f83", "score": "0.7702783", "text": "public function __construct()\n\t{\n\t\n\t}", "title": "" }, { "docid": "3b6ccf052eab19a3ba3b3d9e1c839f83", "score": "0.7702783", "text": "public function __construct()\n\t{\n\t\n\t}", "title": "" }, { "docid": "598c503b3a322449166b067a1b29b482", "score": "0.77001476", "text": "function __construct(){\r\n\t}", "title": "" }, { "docid": "49fdd8d48e8fb6dc3f58c2dc54abb74d", "score": "0.76790756", "text": "public function __construct()\r\n\t\t{\r\n \t\t}", "title": "" }, { "docid": "811091e1c056db4d3ef4ea3f2016724c", "score": "0.7678487", "text": "public function __construct()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "811091e1c056db4d3ef4ea3f2016724c", "score": "0.7678487", "text": "public function __construct()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "811091e1c056db4d3ef4ea3f2016724c", "score": "0.7678487", "text": "public function __construct()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "811091e1c056db4d3ef4ea3f2016724c", "score": "0.7678487", "text": "public function __construct()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "811091e1c056db4d3ef4ea3f2016724c", "score": "0.7678487", "text": "public function __construct()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "811091e1c056db4d3ef4ea3f2016724c", "score": "0.7678487", "text": "public function __construct()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "811091e1c056db4d3ef4ea3f2016724c", "score": "0.7678487", "text": "public function __construct()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "811091e1c056db4d3ef4ea3f2016724c", "score": "0.7678487", "text": "public function __construct()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "811091e1c056db4d3ef4ea3f2016724c", "score": "0.7678487", "text": "public function __construct()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "811091e1c056db4d3ef4ea3f2016724c", "score": "0.7678487", "text": "public function __construct()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "5d7b74f9e076815e29425df8acedfaf4", "score": "0.7670745", "text": "public function __construct(){\n\t\t\t\n\t\t}", "title": "" }, { "docid": "17c44c1961b5f87511f059c3dc8ce3de", "score": "0.7661576", "text": "public function __construct()\n\t{\n\n\t}", "title": "" }, { "docid": "17c44c1961b5f87511f059c3dc8ce3de", "score": "0.7661576", "text": "public function __construct()\n\t{\n\n\t}", "title": "" }, { "docid": "17c44c1961b5f87511f059c3dc8ce3de", "score": "0.7661576", "text": "public function __construct()\n\t{\n\n\t}", "title": "" }, { "docid": "17c44c1961b5f87511f059c3dc8ce3de", "score": "0.7661576", "text": "public function __construct()\n\t{\n\n\t}", "title": "" }, { "docid": "17c44c1961b5f87511f059c3dc8ce3de", "score": "0.7661576", "text": "public function __construct()\n\t{\n\n\t}", "title": "" }, { "docid": "17c44c1961b5f87511f059c3dc8ce3de", "score": "0.7661576", "text": "public function __construct()\n\t{\n\n\t}", "title": "" }, { "docid": "17c44c1961b5f87511f059c3dc8ce3de", "score": "0.7661576", "text": "public function __construct()\n\t{\n\n\t}", "title": "" }, { "docid": "85182905ed5707d84443afc0800c2e20", "score": "0.7658747", "text": "public function __construct(){\r\n\t\t\t\r\n\t\t\t}", "title": "" }, { "docid": "8c58204c10ccad95ec2b8ff75ff9252b", "score": "0.7658298", "text": "protected function _construct()\n\t\t{\n\t\t}", "title": "" }, { "docid": "f1821ca60df673bd38805504a744e9fa", "score": "0.76510185", "text": "function __construct() {\n\n\t}", "title": "" }, { "docid": "22364cfecb172299129fcb42b039ce25", "score": "0.7649274", "text": "public function __construct() {\n\t\t\n\t}", "title": "" }, { "docid": "d08111efec5e9be82c1f29564465e258", "score": "0.7645591", "text": "public function ___construct(){\n \n }", "title": "" }, { "docid": "06992a9df7655cf159e3e00d07b4d3fa", "score": "0.7642958", "text": "private function __construct ( ) { }", "title": "" }, { "docid": "6cf510f99cac617621ddb7cf6f86a5b8", "score": "0.76395047", "text": "public function __construct()\r\n\t{\r\n\t}", "title": "" }, { "docid": "6cf510f99cac617621ddb7cf6f86a5b8", "score": "0.76395047", "text": "public function __construct()\r\n\t{\r\n\t}", "title": "" }, { "docid": "6cf510f99cac617621ddb7cf6f86a5b8", "score": "0.76395047", "text": "public function __construct()\r\n\t{\r\n\t}", "title": "" }, { "docid": "6cf510f99cac617621ddb7cf6f86a5b8", "score": "0.76395047", "text": "public function __construct()\r\n\t{\r\n\t}", "title": "" }, { "docid": "88acb03e00ade56c51b4d13a4c78a450", "score": "0.7633727", "text": "private function __construct() {\r\n\t\r\n\t}", "title": "" }, { "docid": "1f7eb58c5f02145ad13e8cc85822ff1a", "score": "0.7632782", "text": "public function __construct()\n\t {\n \n\t \n\t }", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "e3d0ccd4ada2dc88b7c57c5065e7e2e8", "score": "0.0", "text": "public function store(Request $request)\n {\n //\n }", "title": "" } ]
[ { "docid": "643f51843534c99b002271c413f71061", "score": "0.7149016", "text": "public function store()\n {\n $this->storage->set($this);\n\n }", "title": "" }, { "docid": "aba977442c12d8193d7ce12cb2a46e96", "score": "0.669261", "text": "public function store ()\n {\n $this->_update_login ();\n $this->_pre_store ();\n\n if ($this->exists ())\n {\n $this->_update ();\n }\n else\n {\n $this->_create ();\n }\n }", "title": "" }, { "docid": "75600e5d65c2156987ff7cb140e14a4b", "score": "0.6621582", "text": "public function store() {\n $fileService = $this->getFileService();\n $filename = $this->getCacheDirectory() . $this->generateCacheablefilename();\n $fileService->saveFile($filename, $this->resource->getContent());\n }", "title": "" }, { "docid": "98fadc36fd3a4194a25023de21dae9ff", "score": "0.6428514", "text": "public function save($resource);", "title": "" }, { "docid": "9181113e9ca478f57b376bb60189432a", "score": "0.639531", "text": "public function store()\n\t{\n\t\t//\n\t\t$inputs = Input::all();\n\t\t$validator = Validator::make($inputs , \\App\\Resource::$rules);\n\n\t\tif($validator->passes()){\n\t\t\t$destinationPath = 'pictures/'; // upload path\n\t\t\t$extension = Input::file('image')->getClientOriginalExtension(); // getting image extension\n\t\t\t$fileName = rand(11111,99999). '_' . time() . '.'.$extension; // renameing image\n\t\t\tImage::make(Input::file('image')->getRealPath())->resize(300, null,function($constrain){\n\t\t\t\t$constrain->aspectRatio();\n\t\t\t})->save($destinationPath . $fileName);\n\t\t\t// Input::file('image')->move($destinationPath, $fileName); // uploading file to given path\n\t\t\t$inputs['image'] = $fileName;\n\t\t\t\\App\\Resource::create($inputs);\n\t\t\treturn Redirect::to('/');\n\n\t\t}\n\n\t\treturn Redirect::back()\n\t\t\t->withInput(Input::all())\n\t\t\t->withErrors($validator);\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "bd7a2528e89d1c3f43656fa9d3a11bc3", "score": "0.63575023", "text": "public function store(StoreResourceRequest $request): JsonResponse\n {\n $resource = new Resource;\n $resource->fill($request->all());\n if ($request->has('url')) {\n $resource->url = $request->file('url')->store('articles', 'article');\n }\n $resource->saveOrFail();\n return $this->api_success([\n 'data' => new ResourceArticleResource($resource),\n 'message' => __('pages.responses.created'),\n 'code' => 201\n ], 201);\n }", "title": "" }, { "docid": "af1871e1a1f1d758082bcf4ebeab10eb", "score": "0.6356851", "text": "public function saveStorage()\n {\n $this->storage->save($this->getProduct());\n }", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
1e4de986f0509bbadce10496f4c27f4b
Process an incoming server request and return a response, optionally delegating response creation to a handler.
[ { "docid": "b5264ad4e113de4d21272d894bf36304", "score": "0.6315241", "text": "public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface\n {\n $requestHandler = $request->getAttributes()['requestHandler'][2]['handler'] ?? '';\n $service = App::getBean(AuthServiceInterface::class);\n if (!$service instanceof AuthServiceInterface) {\n throw new AuthException(ErrorCode::POST_DATA_NOT_PROVIDED, 'AuthService should implement Swoft\\Auth\\Mapping\\AuthServiceInterface');\n }\n if (!$service->auth($requestHandler, $request)) {\n throw new AuthException(ErrorCode::ACCESS_DENIED);\n }\n $response = $handler->handle($request);\n return $response;\n }", "title": "" } ]
[ { "docid": "82a6a029e3a7641ca64568064bda548c", "score": "0.8071146", "text": "public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface;", "title": "" }, { "docid": "d2f5435d7bea73131ed12a0b2626a12f", "score": "0.77209675", "text": "public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface\n {\n return $this->handler->handle($request);\n }", "title": "" }, { "docid": "fef3243d832eb634d3a8b626032d09bd", "score": "0.76641333", "text": "public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface\n {\n return $handler->handle($request);\n }", "title": "" }, { "docid": "be54774d4810868b9b9b72d2ed8c7b25", "score": "0.762477", "text": "public function process(\n ServerRequestInterface $request,\n RequestHandlerInterface $handler\n ): ResponseInterface {\n return $handler->handle($request);\n }", "title": "" }, { "docid": "be186e4d1fb4ab0444d66e019597befa", "score": "0.7507017", "text": "public function process(ServerRequestInterface $request, RequestHandlerInterface $handler = null): ResponseInterface\n {\n return $this->handle($request);\n }", "title": "" }, { "docid": "ecbfb2e63c5d2284e1864d3c186860a4", "score": "0.73066455", "text": "public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface\n {\n return ($this->createJsonResponse)($this->router->dispatch($request));\n }", "title": "" }, { "docid": "c37388a2514467397bfef275b642f2ef", "score": "0.7211073", "text": "public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface\n {\n return $this->laminasPipe->process($request, $handler);\n }", "title": "" }, { "docid": "4d663bd8e1d41678f064f1702d57a06f", "score": "0.71522534", "text": "public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface\n {\n if(strpos($request->getUri()->getPath(), $this->path) === 0) {\n return $this->middleware->process($request, $handler);\n }\n return $handler->handle($request);\n }", "title": "" }, { "docid": "357de91aab144d5e3ac0b973de9f3b6e", "score": "0.71169865", "text": "public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface\n {\n if (in_array('application/json', $request->getHeader('content-type'))) {\n $request = $request->withParsedBody(json_decode(\n (string) $request->getBody(),\n true,\n 512,\n JSON_THROW_ON_ERROR\n ));\n }\n\n return $handler->handle($request);\n }", "title": "" }, { "docid": "92c537b62bfecb65c4559499e0b86240", "score": "0.7011644", "text": "public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface\n {\n $span = $this->buildSpan($request);\n\n defer(function () {\n $this->tracer->flush();\n });\n try {\n $response = $handler->handle($request);\n } finally {\n $span->finish();\n }\n\n return $response;\n }", "title": "" }, { "docid": "6348b1dcceeb076d563903845cea7347", "score": "0.6937527", "text": "final public function handle(ServerRequestInterface $request, ResponseInterface $response)\n {\n return $this->__invoke($request, $response);\n }", "title": "" }, { "docid": "6970b39c2f40b5b5db7af7f0f54cb177", "score": "0.6913924", "text": "public function process(\n\t\tServerRequestInterface $request,\n\t\tRequestHandlerInterface $handler\n\t) : ResponseInterface {\n\t\tif ($this->environment !== 'production') {\n\t\t\t// In development environments, we want to see the errors. They can\n\t\t\t// run, but they can't hide!\n\t\t\t$whoops = new Run();\n\t\t\t$whoops->prependHandler(new JsonResponseHandler());\n\t\t\t$whoops->register();\n\n\t\t\treturn $handler->handle($request);\n\t\t}\n\n\t\t// In production environments, the user should not see PHP errors.\n\t\t// Instead, redirect them to our error page.\n\t\ttry {\n\t\t\treturn $handler->handle($request);\n\t\t} catch (Throwable) {\n\t\t\treturn new JsonResponse(['error' => true]);\n\t\t}\n\t}", "title": "" }, { "docid": "9677bd56d97e1191c13d907f82ddc8fd", "score": "0.69003737", "text": "public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface\n {\n //验证签名\n $result = $this->checkSign($request);\n $response = $handler->handle($request);\n if ($result['code'] != 1000) {\n $response = $response->withdata($result);\n }\n return $this->configResponse($response);\n }", "title": "" }, { "docid": "653ae92a2b6b71c617cefa74343fa6c2", "score": "0.6897317", "text": "public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface\n {\n if ($request->getMethod() !== RequestMethod::METHOD_HEAD) {\n return $handler->handle($request);\n }\n\n $result = $request->getAttribute(RouteResult::class);\n if (! $result) {\n return $handler->handle($request);\n }\n\n if ($result->getMatchedRoute()) {\n return $handler->handle($request);\n }\n\n $routeResult = $this->router->match($request->withMethod(RequestMethod::METHOD_GET));\n if ($routeResult->isFailure()) {\n return $handler->handle($request);\n }\n\n // Copy matched parameters like RouteMiddleware does\n foreach ($routeResult->getMatchedParams() as $param => $value) {\n $request = $request->withAttribute($param, $value);\n }\n\n $response = $handler->handle(\n $request\n ->withAttribute(RouteResult::class, $routeResult)\n ->withAttribute(\\Zend\\Expressive\\Router\\RouteResult::class, $routeResult)\n ->withMethod(RequestMethod::METHOD_GET)\n ->withAttribute(self::FORWARDED_HTTP_METHOD_ATTRIBUTE, RequestMethod::METHOD_HEAD)\n );\n\n /** @var StreamInterface $body */\n $body = ($this->streamFactory)();\n return $response->withBody($body);\n }", "title": "" }, { "docid": "eccf94e0f441328240cc46079a06af2d", "score": "0.6849587", "text": "public function process(ServerRequestInterface $request, RequestHandlerInterface $next): ResponseInterface\n {\n $this->next = $next;\n return $this->dispatch($request);\n }", "title": "" }, { "docid": "8843bedfb584544ee222a147bfb0fc7d", "score": "0.68136233", "text": "public function process(ServerRequestInterface $request): ResponseInterface\n {\n return $this->handle($request);\n }", "title": "" }, { "docid": "3d8500de8550d351b93692fff28c4999", "score": "0.6790983", "text": "public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface\n {\n try {\n return $handler->handle($request);\n } catch (\\Exception $e) {\n $this->logger->log($e->getMessage());\n // Do not output any internal information in production environment.\n if ($this->env === 'production') {\n return $this->helper->create(500);\n }\n return $this->helper->create(\n 500,\n [\n 'message' => $e->getMessage(),\n 'code' => $e->getCode(),\n 'trace' => $e->getTrace(),\n ]\n );\n }\n }", "title": "" }, { "docid": "ccaeb12ab67b3a641150d0b3bc37b67a", "score": "0.6779212", "text": "public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface\n {\n $response = $handler->handle($request);\n\n $response = $response\n ->withHeader('Access-Control-Allow-Origin', '*')\n ->withHeader('Access-Control-Allow-Headers', 'Authorization, Accept, Content-Type, Keep-Alive, Origin, User-Agent, X-Requested-With')\n ->withHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, PATCH, OPTIONS');\n\n return $response;\n }", "title": "" }, { "docid": "b7bed5c0df10be646fc3f5ed739f4b88", "score": "0.67575437", "text": "public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface\n {\n $response = $handler->handle($request);\n\n if ($request->getAttribute('encrypted')) {\n $stream = new Stream('php://memory', 'w+');\n $stream->write(base64_encode($response->getBody()));\n $response = $response->withBody($stream);\n }\n\n return $response;\n }", "title": "" }, { "docid": "53db2a2bce051219650d180a03e3282f", "score": "0.6727606", "text": "public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface\n {\n $queryParams = $request->getQueryParams();\n $queryParams['count']++;\n $response = $handler->handle($request->withQueryParams($queryParams));\n $body = $response->getBody();\n $body->write('middleware: ' . $this->num . PHP_EOL);\n return $response->withBody($body);\n }", "title": "" }, { "docid": "01e7f81cd58334f54dc83665865e0575", "score": "0.6705786", "text": "public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface\n {\n try {\n return $handler->handle($request);\n } catch (\\Exception | \\Error $ex) {\n /*\n $errorMessage = sprintf(\n \"Error [%s]: [File %s:%s] %s\",\n get_class($ex),\n $ex->getFile(),\n $ex->getLine(),\n $ex->getMessage()\n );\n */\n\n $error = [\n 'exception' => get_class($ex),\n 'code' => $ex->getCode(),\n 'message' => $ex->getMessage(),\n 'file' => $ex->getFile(),\n 'line' => $ex->getLine(),\n ];\n\n return $this->app->response\n ->withStatus(500, \"\")\n ->withBody(new StringStream(json_encode($error, JSON_PRETTY_PRINT)));\n }\n }", "title": "" }, { "docid": "c5fec2cafc76945553b77828b04aba67", "score": "0.6703239", "text": "public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface\n {\n $routeContext = RouteContext::fromRequest($request);\n $routingResults = $routeContext->getRoutingResults();\n $methods = $routingResults->getAllowedMethods();\n $requestHeaders = $request->getHeaderLine('Access-Control-Request-Headers');\n\n try {\n $response = $handler->handle($request);\n } catch (Throwable $throwable) {\n }\n\n if (!isset($response)) {\n $response = $this->responseFactory->createResponse(500);\n }\n\n $response = $response->withHeader('Access-Control-Allow-Origin', 'http://dev.frontend-example');\n $response = $response->withHeader('Access-Control-Allow-Methods', implode(', ', $methods));\n $response = $response->withHeader('Access-Control-Allow-Headers', $requestHeaders ?: '*');\n\n // Allow Ajax CORS requests with Authorization header\n $response = $response->withHeader('Access-Control-Allow-Credentials', 'true');\n\n if (isset($throwable)) {\n $response = $response->withHeader('Content-Type', 'application/json');\n\n // Add custom response body here...\n $response->getBody()->write(\n json_encode(\n [\n 'error' => [\n 'message' => $throwable->getMessage(),\n ]\n ],\n )\n );\n\n // Throw exception to pass the response with the CORS headers\n throw new CorsMiddlewareException($response, $throwable->getMessage(), 500, $throwable);\n }\n\n return $response;\n }", "title": "" }, { "docid": "45a48c910f23ab75eb7d1c935b928728", "score": "0.6641464", "text": "public function process(ServerRequestInterface $request, RequestHandlerInterface $handler):ResponseInterface\n {\n $response = $handler->handle($request);\n $getAttr = $response->getAttribute('responseAttribute');\n /*if ($getAttr && $getAttr instanceof Goods) {\n $goods = $this->goods->filter($getAttr);\n return $response->withAttribute('responseAttribute', $goods);\n }*/\n if ($getAttr && $getAttr instanceof MyAttachment) {\n $file = fopen($getAttr->filePath, \"r\");\n $response->withHeader('Content-type', 'application/octet-stream')\n ->withHeader('Content-Disposition', 'attachment:filename='.$getAttr->fileName.'')\n ->withBody(new SwooleStream(fread($file, filesize($getAttr->filePath))));\n }\n return $response->withAddedHeader('name', 'lz');\n }", "title": "" }, { "docid": "5cbf563e337c0cc6a84c468b27ead1bb", "score": "0.6635071", "text": "public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface\r\n {\r\n if( $request->getMethod()==RequestMethod::OPTIONS ){\r\n $response = Factory::createResponse();\r\n $body = $response->getBody();\r\n $body->write('');\r\n $response = $response->withBody($body);\r\n $response = $response->withAddedHeader(\"Access-Control-Allow-Headers\",\"content-type\");\r\n }else{\r\n $response = $handler->handle($request);\r\n }\r\n $response = $response->withAddedHeader('Access-Control-Allow-Origin', \"*\");\r\n return $response;\r\n }", "title": "" }, { "docid": "6ad482eefc913684cf08a498136f59b3", "score": "0.6630603", "text": "public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface\n {\n if (!\\in_array($request->getMethod(), ['POST', 'OPTIONS'], true) || $request->getUri()->getPath() !== $this->uriPath) {\n return $handler->handle($request);\n }\n if ($this->simulateControllerObjectName !== null) {\n $mockActionRequest = ActionRequest::fromHttpRequest($request);\n // Simulate a request to the specified controller to trigger authentication\n $mockActionRequest->setControllerObjectName($this->simulateControllerObjectName);\n $this->securityContext->setRequest($mockActionRequest);\n }\n $response = $this->responseFactory->createResponse();\n $response = $this->addCorsHeaders($response);\n if ($request->getMethod() === 'POST') {\n $response = $this->handlePostRequest($request, $response);\n }\n return $response;\n }", "title": "" }, { "docid": "33e80f93d9a76532e14fc11aa548f8f5", "score": "0.6601157", "text": "public function handle(ServerRequestInterface $request);", "title": "" }, { "docid": "1416d2f8b64a863c1a2132ac91b4e365", "score": "0.6580585", "text": "public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface\n {\n if ($request->getHeader(\"Content-Type\")[0] != \"application/json\") {\n throw new \\InvalidArgumentException(\n \"This path only supports JSON requests. Please add Content-Type: application/json to the headers\");\n }\n\n return $handler->handle($request);\n }", "title": "" }, { "docid": "c2b1ac9cba37e2770da979a4adc370a6", "score": "0.6570768", "text": "public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface\n {\n $response = $handler->handle($request);\n $origin = $request->getHeaderLine('origin');\n $method = $request->getMethod();\n \n if ($this->allowed_origins[0] !== '*') {\n if (!$origin || !in_array($origin, $this->allowed_origins)) {\n return $response;\n }\n }\n \n $origin = $this->allowed_origins[0] === '*' ? '*' : $origin;\n $response = $response->withHeader('Access-Control-Allow-Origin', $origin);\n $response = $response->withHeader('Access-Control-Allow-Headers', implode(',', $this->allowed_headers));\n $response = $response->withHeader('Access-Control-Allow-Methods', implode(',', $this->allowed_methods));\n if (!empty($this->exposed_headers)) {\n $response = $response->withHeader('Access-Control-Expose-Headers', implode(',', $this->exposed_headers));\n }\n if ($this->max_age > 0) {\n $response = $response->withHeader('Access-Control-Max-Age', (string) $this->max_age);\n }\n if ($this->supports_credentials) {\n $response = $response->withHeader('Access-Control-Allow-Credentials', (string) $this->supports_credentials);\n }\n return $response;\n }", "title": "" }, { "docid": "22dbfbf0f3751a5cd73327cd6e626796", "score": "0.6566581", "text": "public function handle(ServerRequestInterface $request) : ResponseInterface\n {\n if (!$middleware = array_shift($this->middlewares)) {\n // At the center of the middleware stack, an application turns the\n // request into a response.\n $response = ($this->app)($request);\n\n return $response;\n }\n\n $middleware = $this->container->get($middleware);\n\n return $middleware->process($request, $this);\n }", "title": "" }, { "docid": "adafacad7486573b918c310768ff5be4", "score": "0.6512722", "text": "public function handle(ServerRequestInterface $request): ResponseInterface\n {\n $response = new Response();\n Kernel::$kernel->handle(\n $request,\n $response,\n Kernel::$currentRequestType,\n Kernel::$currentPacket,\n Kernel::$kernel->rawTwig\n );\n return $response;\n }", "title": "" }, { "docid": "59c5c5c63a59b00df9c3f21bb37111e5", "score": "0.6505008", "text": "public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface\n {\n if ($this->auth->check()) {\n return $handler->handle($request);\n }\n\n if ($this->auth->hasRecaller()) {\n try {\n $this->auth->setUserFromCookie();\n } catch (Exception $e) {\n $this->auth->logout();\n }\n }\n\n return $handler->handle($request);\n }", "title": "" }, { "docid": "9ec1d6f6fc2ceb7215340874b8e4c171", "score": "0.64938253", "text": "public function handle(ServerRequestInterface $request): ResponseInterface\n {\n return $this->handler->handle($request);\n }", "title": "" }, { "docid": "04515e4a86e0ab894d74a272aaa2ba97", "score": "0.6491665", "text": "public function handle(ServerRequestInterface $request): ResponseInterface\n {\n $body = $request->getParsedBody();\n\n $method = strtoupper($body[self::METHOD_INPUT_KEY] ?? $request->getMethod());\n\n $request = $request->withMethod($method);\n\n $this->match = $this->adapter->match($request);\n\n return $this->match->handle($request);\n }", "title": "" }, { "docid": "96469f98be8f73848d49b521a325482b", "score": "0.6490828", "text": "public static function processRequest() {\n\t\t\tglobal $logger;\n\t\t\t$request = $rawResponse = $response = null;\n\n\t\t\ttry {\n\t\t\t\t/* Authenticate */\n\t\t\t\t$valid = self :: authenticateRequest($_SERVER); \n\n\t\t\t\t/* Fetch POST data */\n\t\t\t\t$post = file_get_contents (\"php://input\");\n\t\t\t\t$logger -> debug (\"POST Data Received: \" . $post);\n\n\t\t\t\t/* Formulate the request object */\n\t\t\t\t$request = RequestParser :: parseInput ($_SERVER, $_GET, $post);\t\t\t\t\n\t\t\t\t$logger -> debug (\"REQUEST Object: \" . $request -> toString());\n\n\t\t\t\t/* Handle the request */\n\t\t\t\t$rawResponse = RequestHandler :: process ($request);\n\t\t\t\t$logger -> debug (\"RESPONSE Object: \" . json_encode($rawResponse));\n\n\t\t\t} catch (ApiException $e) {\n\t\t\t\t/* Generate response from Exception details */\n\t\t\t\t$logger -> error (\"ApiException encountered!! \" . $e -> toString());\n\t\t\t\t$rawResponse = array(\n\t\t\t\t\t'httpStatusCode'\t\t=> $e -> getHttpStatusCode(),\n\t\t\t\t\t'httpStatusCodeMessage' => $e -> getHttpStatusCodeMessage(),\n\t\t\t\t\t'otherHeaders'\t\t\t=> $e -> getOtherHeaders(), \n\t\t\t\t\t'code'\t\t\t\t\t=> $e -> getCode(),\n\t\t\t\t\t'message'\t\t\t\t=> $e -> getMessage(),\n\t\t\t\t\t'debug'\t\t\t\t\t=> false,\n\t\t\t\t\t'data'\t\t\t\t\t=> null\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Format the $rawResponse variable and output \n\t\t\t$format = (! isset($request) ? 'json' : $request -> getFormat());\n\t\t\t$debug = (! isset($request) ? false : $request -> getDebug());\n\t\t\t$response = ResponseHandler :: respond ($rawResponse, $format, $debug);\n\t\t\t$logger -> debug (\"Output: \" . $response);\n\t\t}", "title": "" }, { "docid": "de847a23df5496b240bb45be43c7835a", "score": "0.64415854", "text": "public function process(\n\n Request $request,\n RequestHandler $handler\n\n ): Response {\n\n $request = $request->withAttribute('mysqli', $this);\n\n // let other middlewares perform their task\n\n $response = $handler->handle($request);\n\n // close connection when other middlewares finish\n\n mysqli_close($this->connection);\n\n return $response;\n }", "title": "" }, { "docid": "5903e60f7edc2b2d8e3995d3e31167c2", "score": "0.6438654", "text": "public function handle(ServerRequestInterface $request): ResponseInterface\n {\n return call_user_func($this->adaptee, $request);\n }", "title": "" }, { "docid": "0aada84ebd17bedbb44ec48d7d245ff8", "score": "0.64303017", "text": "public function handle(ServerRequestInterface $request): ResponseInterface\n {\n if ($middleware = $this->stack->next()) {\n return $middleware->process($request, $this);\n }\n return $this->response;\n }", "title": "" }, { "docid": "c2e7a8c516784366ada8c1aa086bdcf6", "score": "0.64170927", "text": "public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface\n {\n $route = $this->router->match($request);\n\n if ($route) {\n $asset = $this->domain->getAsset($route->vendor, $route->package, $route->file);\n $this->responder->setData(array('asset' => $asset));\n try {\n return $this->responder->__invoke();\n } catch (Exception\\FileNotReadable $e) {\n // do nothing\n }\n }\n\n return $handler->handle($request);\n }", "title": "" }, { "docid": "fbb218d885738a4a8297becaa5645a31", "score": "0.6384761", "text": "public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface\n {\n if (!$this->isValid($request)) {\n return $this->responseFactory->createResponse(403);\n }\n\n return $handler->handle($request);\n }", "title": "" }, { "docid": "1134e2cf457d69473656041a3fc1f4ff", "score": "0.63842344", "text": "public function process(Request $request, Response $response): Response;", "title": "" }, { "docid": "78a699c304ecf606d0c7d56f5592e6fe", "score": "0.6357014", "text": "public function serve()\n {\n Log::debug('Request received:', [\n 'Method' => $this->request->getMethod(),\n 'URI' => $this->request->getRequestUri(),\n 'Query' => $this->request->getQueryString(),\n 'Protocal' => $this->request->server->get('SERVER_PROTOCOL'),\n 'Content' => $this->request->getContent(),\n ]);\n\n $result = $this->handleRequest();\n\n $response = $this->buildResponse($result['response']);\n\n Log::debug('Server response created:', compact('response'));\n\n return new Response($response);\n }", "title": "" }, { "docid": "bd4db06b580fa6cf8d9e785671a8e8cb", "score": "0.6313756", "text": "public function handle(ServerRequestInterface $request): ResponseInterface\n {\n $handlerClass = $this->getRoute($request)['handler'];\n\n /** @var \\Psr\\Http\\Server\\RequestHandlerInterface $handler */\n $handler = $this->app->make($handlerClass);\n\n return $handler->handle($request);\n }", "title": "" }, { "docid": "94be77e32f39b6daaf7200b66c8efff8", "score": "0.6310381", "text": "public function process(ServerRequestInterface $request, RequestHandlerInterface $requestHandler): ResponseInterface\n {\n $layout = $this->renderLayout();\n\n return new HtmlResponse($layout);\n }", "title": "" }, { "docid": "01a6a4a174c82251bbb96d3983103eab", "score": "0.62086457", "text": "public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface\n {\n\n $renderer = $this->debugbar->getJavascriptRenderer();\n if ($this->renderOptions) {\n $renderer->setOptions($this->renderOptions);\n }\n\n //Asset response\n $path = $request->getUri()->getPath();\n $baseUrl = $renderer->getBaseUrl();\n\n if (strpos($path, $baseUrl) === 0) {\n $file = $renderer->getBasePath().substr($path, strlen($baseUrl));\n\n if (file_exists($file)) {\n $response = $this->responseFactory->createResponse();\n $response->getBody()->write((string) file_get_contents($file));\n $extension = pathinfo($file, PATHINFO_EXTENSION);\n\n if (isset(self::$mimes[$extension])) {\n return $response->withHeader('Content-Type', self::$mimes[$extension]);\n }\n\n return $response; //@codeCoverageIgnore\n }\n }\n\n $response = $handler->handle($request);\n\n $isAjax = strtolower($request->getHeaderLine('X-Requested-With')) === 'xmlhttprequest';\n\n //Redirection response\n if (in_array($response->getStatusCode(), [302, 301])) {\n return $this->handleRedirect($response);\n }\n\n //Html response\n if (stripos($response->getHeaderLine('Content-Type'), 'text/html') === 0) {\n return $this->handleHtml($response, $isAjax);\n }\n\n //Ajax response\n if ($isAjax && $this->captureAjax) {\n $headers = $this->debugbar->getDataAsHeaders();\n\n foreach ($headers as $name => $value) {\n $response = $response->withHeader($name, $value);\n }\n }\n\n return $response;\n }", "title": "" }, { "docid": "71d45e7caa5c7c870abd041ae35f3ce4", "score": "0.6194713", "text": "public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface\n {\n $user = $this->getApiUser($request);\n\n $request = $request->withAttribute(ServerRequest::ATTR_USER, $user);\n\n return parent::process($request, $handler);\n }", "title": "" }, { "docid": "3cd52b193c87f3181d5e3d0cb1416705", "score": "0.6191462", "text": "public function processRequest()\n {\n // Process the jaxon request\n jaxon()->processRequest();\n\n // Return the reponse to the request\n return $this->httpResponse();\n }", "title": "" }, { "docid": "e9e212471193ebefe4ae8e16f7f01716", "score": "0.6191332", "text": "abstract public function handle($response);", "title": "" }, { "docid": "181d3b60a28592bebadad0986b7045cf", "score": "0.61851007", "text": "public function handle(ServerRequestInterface $request) : ResponseInterface\n\t{\n\t\treturn $this->resource->handle($request);\n\t}", "title": "" }, { "docid": "fe9ae4837ac0061a82b5a446fedb6008", "score": "0.6181631", "text": "public function process(Response $response);", "title": "" }, { "docid": "4267aee569a3cdda4c20e052be196324", "score": "0.6164727", "text": "public function handle(\n ServerRequestInterface $request\n ): ResponseInterface {\n $container = $this->getContainer();\n $container->add(ServerRequest::class, $request);\n $container->add(ContainerInterface::class, $container);\n\n $this->controllerFactory ??= new ControllerFactory($container);\n\n if (Router::getRequest() !== $request) {\n assert($request instanceof ServerRequest);\n Router::setRequest($request);\n }\n\n $controller = $this->controllerFactory->create($request);\n\n return $this->controllerFactory->invoke($controller);\n }", "title": "" }, { "docid": "7b7613176a83e86a19837da41bd647bf", "score": "0.6159467", "text": "public static function handle_request() {\n\t\tRequest::init();\n\t\tself::log('REQUEST_HTTPS', (int) Request::is_https());\n\t\tself::log('REQUEST_METHOD', Request::method());\n\t\tself::log('REQUEST_URI', Request::uri());\n\n\t\t$http_method = strtoupper(Request::method());\n\t\tif ($http_method == 'OPTIONS') {\n\t\t\t// If we get an OPTIONS request, try to handle it according to\n\t\t\t// the HTTP/1.1 spec. (i.e. report the Allowed HTTP methods)\n\t\t\t$uri = Request::uri();\n\t\t\tif ($uri == '*') {\n\t\t\t\t// general server capabilities; usually Apache intercepts this,\n\t\t\t\t// but if we do receive it, report all the HTTP methods we know\n\t\t\t\t$methods = URIMap::methods();\n\t\t\t} else {\n\t\t\t\t// report which HTTP methods would theoretically work for the\n\t\t\t\t// requested URI\n\t\t\t\t$methods = URIMap::allowed_methods($uri);\n\t\t\t}\n\t\t\tif ($methods) {\n\t\t\t\t// create a 200 OK response, and poke in an Allow header for the\n\t\t\t\t// HTTP methods we think are cool\n\t\t\t\t$response = new Response(Request::http_version());\n\t\t\t\t$response->allow_compression = FALSE;\n\t\t\t\t$response->allow_auto_etag = FALSE;\n\t\t\t\t$response->header('Allow', implode(', ', $methods));\n\t\t\t} else {\n\t\t\t\t// no such resource; no methods would work. Send a 404 Not Found.\n\t\t\t\t$response = Response::generate(404);\n\t\t\t}\n\t\t} elseif ($http_method == 'TRACE') {\n\t\t\t// this one is flat out refused, even if it gets past Apache.\n\t\t\t// sending a 403 Forbidden, instead of a 405 Method Not Allowed.\n\t\t\t$response = Response::generate(403);\n\t\t} elseif ($http_method == 'BREW') {\n\t\t\t// RFC 2324\n\t\t\t$response = Response::generate(418);\n\t\t} else {\n\t\t\t// probably one of the more standard HTTP methods (GET, POST, PUT, DELETE)\n\t\t\t// pass it off to the handlers, and see what comes of it.\n\t\t\t$model = self::get_model();\n\t\t\tif ($model instanceof Response) {\n\t\t\t\t// short circuit; usually means get_model_for failed\n\t\t\t\t$response = $model;\n\t\t\t} else {\n\t\t\t\t// we have a model, now we need to represent it\n\t\t\t\t$response = self::get_response_for($model);\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\t$response->commit();\n\t\t} catch (HttpException $e) {\n\t\t\t$ex_response = Response::generate_ex($e);\n\t\t\t$ex_response->commit();\n\t\t}\n\t}", "title": "" }, { "docid": "37187f971db9f66f16cc8b22a1918cd8", "score": "0.6144192", "text": "public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface\n {\n if (!$request->hasHeader('authorization') && !empty($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])) {\n $request = $request->withAddedHeader('Authorization', $_SERVER['REDIRECT_HTTP_AUTHORIZATION']);\n }\n\n return $handler->handle($request);\n }", "title": "" }, { "docid": "3d331155742a1db4a5122bd0a5769616", "score": "0.608699", "text": "public function handle() : Response\n {\n //Set the response object\n $response = new Response();;\n\n //If the resource exists...\n if($this->resourceExists($this->request)) {\n\n //If is not an php script...\n if (!$this->isAScript($this->request)) {\n $response->setCharset(null);\n\n /*\n * Check if the resource is allowed to be sent to the client. If it is give 200 OK, set the response\n * content type based on the requested resource and read the resource file.\n */\n if ($this->isAllowed($this->request)) {\n $response->setCode(200);\n $response->setContentType($this->getContentType());\n $response->setUri($this->getResource());\n $response->setSendResource(true);\n } else {\n //Otherwise: Give an 403 forbidden\n $response->setCode(403);\n }\n }\n //If is a script check if it can be executed\n else if($this->isScriptingProcessingAllowed()){\n $response->setCode(200);\n $response->setUri($this->getResource());\n }else{\n //Otherwise: define forbidden as the default code\n $response->setCode(403);\n }\n }else{\n $response->setCode(404);\n }\n return $response;\n }", "title": "" }, { "docid": "dce7b673f816718d64ae4f61781d2396", "score": "0.60505486", "text": "public function handle(ServerRequestInterface $request): ResponseInterface\n {\n // instantiate all the modules\n foreach ($this->modules as $module) {\n $this->getContainer()->get($module);\n }\n $middleware = new CombinedMiddleware($this->getContainer(), $this->middlewares);\n return $middleware->process($request, $this);\n }", "title": "" }, { "docid": "f234e57383409f1d45fc5e018f74bef9", "score": "0.60442495", "text": "public function handle(ServerRequestInterface $request): ResponseInterface\n {\n // TODO : ajouter des tests pour ce package notamment sur les événements et le comportement en cas de throw d'exception s'assurer que le finaly fonctionne correctement !!!\n\n\n $middleware = $this->middlewares[$this->position] ?? null;\n\n if ($middleware !== null) {\n $this->dispatcher->dispatch(new BeforeMiddlewareEvent($middleware, $request));\n try {\n return $response = $middleware->process($request, $this->nextHandler());\n } finally {\n $this->dispatcher->dispatch(new AfterMiddlewareEvent($middleware, $response ?? null));\n }\n }\n\n // TODO : eventuellement permettre de laisser le fallback à null et dans ce cas lever l'exception qui est présente dans la classe EmptyPipelineHandler directement à la fin de cette méthode. Ca évitera de conserver la classe EmptyPipelineHandler qui sera inutile !!!!\n $this->dispatcher->dispatch(new BeforeHandlerEvent($this->fallback, $request));\n try {\n return $response = $this->fallback->handle($request);\n } finally {\n $this->dispatcher->dispatch(new AfterHandlerEvent($this->fallback, $response ?? null));\n }\n }", "title": "" }, { "docid": "d5b3ed4bb7cd50b144225bee40bca8d2", "score": "0.60180104", "text": "public function process(RequestInterface $request, RequestHandlerInterface $handler): ResponseInterface\n {\n if (!empty($this->hostnames) && !in_array($request->getUri()->getHost(), $this->hostnames)) {\n return http_forbidden_response($handler);\n }\n return $handler->handle($request);\n }", "title": "" }, { "docid": "ff1861c32ea29f25755c1ac332ebce91", "score": "0.60046804", "text": "public function Process()\n {\n switch ($this->method) {\n case 'GET':\n $this->request = $this->Clean($_GET);\n break;\n case 'POST':\n if (array_key_exists('CONTENT_TYPE', $_SERVER) && $_SERVER['CONTENT_TYPE'] === \"application/json\") {\n $this->request = $this->getJson();\n } else {\n $this->request = $_POST;\n }\n\n if (is_array($this->request)) {\n $this->request = $this->Clean($this->request);\n } else {\n $this->request = [];\n }\n\n break;\n default:\n return $this->invalidMethod();\n break;\n }\n\n $response = ['status' => 'Invalid API endpoint'];\n $status_code = 404;\n if ((int)method_exists($this, $this->endpoint) > 0) {\n $status_code = 200;\n $response = $this->{$this->endpoint}($this->request, $this->args);\n\n if (is_array($response)) {\n if (array_key_exists('status_code',\n $response) && is_numeric($response['status_code'])\n ) {\n $status_code = $response['status_code'];\n unset($response['status_code']);\n }\n }\n }\n\n return $this->{$this->response_function}($response, $status_code);\n }", "title": "" }, { "docid": "c51a6a58f4b3fc919ff3de2195108d32", "score": "0.5993152", "text": "public function handle(ServerRequestInterface $request): ResponseInterface\n {\n if ($this->hasMiddleware()) {\n return $this->processMiddleware($request);\n }\n\n $queryParams = $request->getQueryParams() ?: [];\n $parameters = [\n 'request' => $request,\n 'params' => $queryParams\n ];\n $parameters += $queryParams;\n\n return $this->container->resolve($this->resolvable, $parameters);\n }", "title": "" }, { "docid": "1678997f42485ca94b92d455285051d9", "score": "0.5987187", "text": "public function __invoke(ServerRequestInterface $request)\n {\n $reply = \\app('minions.router')->handle($request);\n\n return \\response(\n $reply->body(), $reply->status(), $reply->headers()\n );\n }", "title": "" }, { "docid": "d9c375071804f407602da7432435a12e", "score": "0.59698445", "text": "public function process(ServerRequest $request, HandlesServerRequests $next): Response\n {\n $response = $next->handle($request);\n if(strtoupper($request->getMethod()) === 'HEAD') {\n $response = $response->withBody($this->responseFactory->createResponse()->getBody());\n }\n\n return $response;\n }", "title": "" }, { "docid": "75fc111ddf27862a8aebf2556f91b3a0", "score": "0.59655887", "text": "public function process(\n ServerRequestInterface $request,\n RequestHandlerInterface $handler\n ): ResponseInterface {\n /** @var array $body */\n $body = $request->getParsedBody();\n $requiredFields = ['to', 'to_name', 'from', 'from_name', 'subject', 'body'];\n $requestFields = array_keys($body);\n $diff = array_diff($requiredFields, $requestFields);\n if (empty($diff)) {\n return $handler->handle($request);\n }\n $missingFields = implode(', ', $diff);\n\n return new JsonResponse(\"$missingFields is required\", 422);\n }", "title": "" }, { "docid": "d70a2e0820d33ad176f37e710cab6c98", "score": "0.595456", "text": "public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface\n {\n $path = $request->getUri()->getPath();\n if (in_array($path, \\config('app.allow_list'))) {\n return $handler->handle($request);\n }\n\n $access_token = $request->getHeaderLine('access_token');\n try {\n $auth = JWT::decode($access_token, \\config('jwt.publicKey'), [\\config('jwt.type')]);\n /** 单端登录 */\n /** @var $tokenLogic AccessTokenLogic */\n $tokenLogic = \\Swoft::getBean(AccessTokenLogic::class);\n $tokenLogic->checkAccessToken($auth->user->manager_id, $access_token);\n\n\t\t\t/** @var $managerDao ManagerDao */\n $managerDao = \\Swoft::getBean(ManagerDao::class);\n /** @var Manager $manager */\n $manager = $managerDao->getManagerById($auth->user->manager_id);\n\n\t\t\t/** @var $managerLogic ManagerLogic */\n $managerLogic = \\Swoft::getBean(ManagerLogic::class);\n $managerLogic->checkStatus($manager->getArrayableAttributes());\n\n /** 挂载到Request请求对象*/\n $request->user = $manager;\n } catch (\\Exception $e) {\n throw new ValidateException(Message::ERR_AUTHORIZE);\n }\n\n /** 用户权限校验 */\n if (!in_array($path, \\config('app.allow_menu'))) {\n //TODO未实现\n }\n\n return $handler->handle($request);\n }", "title": "" }, { "docid": "ca26e606fcae8117f37a5d95aa2f2c00", "score": "0.59433264", "text": "function processRequest()\r\n {\r\n global $HTTP_SERVER_VARS;\r\n\r\n if ( $HTTP_SERVER_VARS[\"REQUEST_METHOD\"] != \"POST\" )\r\n {\r\n print( \"Error: this web page does only understand POST methods\" );\r\n exit();\r\n }\r\n\r\n $call = new eZXMLRPCCall( );\r\n $call->decodeStream( $this->RawPostData );\r\n\r\n $functionWasFound = false;\r\n $equalParameterCount = true;\r\n foreach ( $this->FunctionList as $function )\r\n {\r\n if ( $function->name() == $call->methodName() )\r\n {\r\n $func = $function->name();\r\n\r\n if ( function_exists( $func ) )\r\n {\r\n $functionWasFound = true;\r\n\r\n if ( count( $call->parameterList() ) ==\r\n count( $function->parameters() ) )\r\n {\r\n $result = $func( $call->parameterList() );\r\n }\r\n else\r\n {\r\n $equalParameterCount = false;\r\n }\r\n }\r\n else\r\n {\r\n print( \"Error: could not find function\" );\r\n }\r\n }\r\n }\r\n\r\n if ( is_a( $result, \"eZXMLRPCResponse\" ) )\r\n {\r\n $response =& $result;\r\n }\r\n else\r\n {\r\n // do the server response\r\n $response = new eZXMLRPCResponse( );\r\n\r\n if ( $functionWasFound == false )\r\n {\r\n $response->setError( 1, \"Requested function not found.\" );\r\n }\r\n\r\n if ( $equalParameterCount == false )\r\n {\r\n $response->setError( 2, \"Wrong parameter count for requested function.\" );\r\n }\r\n\r\n $response->setResult( $result );\r\n }\r\n\r\n $payload =& $response->payload();\r\n\r\n Header(\"Server: eZ xmlrpc server\" );\r\n Header(\"Content-type: text/xml\" );\r\n Header( \"Content-Length: \" . strlen( $payload ) );\r\n\r\n ob_end_clean();\r\n\r\n print( $payload );\r\n }", "title": "" }, { "docid": "ff44d17324454f5de822d82f697086a0", "score": "0.591509", "text": "public function handleRequest()\n\t{\n\t\ttry {\n\t\t\t// Return 200 OK response\n\t\t\t$this->returnOkResponse();\n\t\t\t// Store request\n\t\t\t$request = file_get_contents('php://input');\n\t\t\t// Translate the request into a ChatbotAPI request\n\t\t\t$externalRequest = $this->digester->digestToApi($request);\n\t\t\t// Check if it's needed to perform any action other than a standard user-bot interaction\n\t\t\t$this->handleNonBotActions($externalRequest);\n\t\t\t// Handle standard bot actions\n\t\t\t$this->handleBotActions($externalRequest);\n\t\t} catch (Exception $e) {\n\t\t\techo json_encode([\"error\" => $e->getMessage()]);\n\t\t\tdie();\n\t\t}\n\t}", "title": "" }, { "docid": "e03ec21b1558ae70ff16bdda06f7f770", "score": "0.5886818", "text": "public function handle(ServerRequestInterface $request)\n {\n $response = new Response();\n $request = ServerRequestFactory::fromGlobals();\n\n $middleware = $this->application->middleware(new MiddlewareQueue());\n if (!($middleware instanceof MiddlewareQueue)) {\n throw new \\RuntimeException('The application `middleware` method did not return a middleware queue.');\n }\n $this->server->dispatchEvent('Server.buildMiddleware', ['middleware' => $middleware]);\n $middleware->add($this->application);\n $runner = new Runner();\n $response = $runner->run($middleware, $request, $response);\n\n if (!($response instanceof ResponseInterface)) {\n throw new \\RuntimeException(sprintf(\n 'Application did not create a response. Got \"%s\" instead.',\n is_object($response) ? get_class($response) : $response\n ));\n }\n\n return $response;\n }", "title": "" }, { "docid": "953e657992012b3894d8a75394a20130", "score": "0.58757836", "text": "public function process()\n {\n try {\n // obtain the parsed requests from the transport layer & parser\n $request = $this->receive();\n // process the request, and obtain the response\n $response = $this->getResponse($request);\n } catch (Core\\Exception\\JsonParseException $jpe) {\n // can be thrown by this->receive()\n $this->logger->warning(\n \"Received a parse exception when decoding request.\",\n array('error_message' => $jpe->getMessage())\n );\n $response = Core\\ResponseError::createParseError();\n }\n\n if ($response === null) {\n // this is the case for notifications, or a batch of notifications\n $this->logger->info(\"Response\", array('json'=>null));\n $this->transport->reply('');\n } else {\n $responseJson = $response->toJson();\n $this->logger->info(\"Response\", array('json'=>$responseJson));\n $this->transport->reply($responseJson);\n }\n }", "title": "" }, { "docid": "1008d52222d4151c10f421f66f060cc5", "score": "0.5864332", "text": "public function handle(ServerRequestInterface $request): ResponseInterface\n {\n if ($this->delegate instanceof RequestHandlerInterface) {\n\n $keys = array_keys($this->attributes);\n\n return $this->delegate->handle(array_reduce($keys, function ($request, $key) {\n\n return $request->withAttribute($key, $this->attributes[$key]);\n\n }, $request));\n\n }\n\n throw new MatchedHandlerTypeException($this->delegate);\n }", "title": "" }, { "docid": "f9a24059ed6e1137d4fd17f9f55e10b1", "score": "0.5854284", "text": "public function handleRequest()\n {\n try {\n // Return 200 OK response\n $this->returnOkResponse();\n // Store request\n $request = file_get_contents('php://input');\n // Translate the request into a ChatbotAPI request\n $externalRequest = $this->digester->digestToApi($request);\n // Check if it's needed to perform any action other than a standard user-bot interaction\n $this->handleNonBotActions($externalRequest);\n // Handle standard bot actions\n $this->handleBotActions($externalRequest);\n } catch (Exception $e) {\n echo json_encode([\"error\" => $e->getMessage()]);\n die();\n }\n }", "title": "" }, { "docid": "a0583c2455a7c431c0ab0c2f58a33f8f", "score": "0.5841045", "text": "public function handleRequest();", "title": "" }, { "docid": "3a41af8d11352a6b639b4f83881cf7ba", "score": "0.58347005", "text": "function cgi_entry()\n{\n global $config;\n $config['request'] = Normal::request();\n return Normal::response(\n handler($config['request'])\n );\n}", "title": "" }, { "docid": "881b56ca711669676897a29d55a75e36", "score": "0.582657", "text": "public function getHandlerResponse(): Response;", "title": "" }, { "docid": "579059cb2a7ffc6dbecf7d2000a86078", "score": "0.58238316", "text": "public function handle(ServerRequestInterface $request): ResponseInterface\n {\n $counter = $this->metricService->getCounter('some_counter');\n $counter->increment(['blue']);\n\n $gauge = $this->metricService->getGauge('some_gauge');\n $gauge->set(10, ['blue']);\n\n $histogram = $this->metricService->getHistogram('some_histogram');\n $histogram->observe(5.5, ['blue']);\n\n $response = $this->responseFactory->createResponse(200);\n $response->getBody()->write($this->metricService->getMetrics());\n\n return $response;\n }", "title": "" }, { "docid": "bc00fd23746961e75eeaf8ec6f5ae646", "score": "0.5817252", "text": "public function __invoke(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface\n {\n\n $response = $handler->handle($request);\n return $response\n ->withHeader('Access-Control-Allow-Origin', '*')\n ->withHeader('Access-Control-Allow-Headers', 'X-Requested-With, Content-Type, Accept, Origin, Authorization')\n ->withHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, PATCH, OPTIONS');\n }", "title": "" }, { "docid": "3054c58aad8d5b1bdc62e3a226891bf2", "score": "0.5801766", "text": "private static function handleRequest() {\r\n $router = self::getConfiguredRouter();\r\n $route = $router->match();\r\n\r\n if (!$router->match()) {\r\n $response = new Response(['detail' => 'The requested URL not found.'], Response::HTTP_404_NOT_FOUND);\r\n $response->dispatch();\r\n return;\r\n }\r\n\r\n $request = new Request($route['params']);\r\n\r\n call_user_func_array([new $route['target'](), strtolower($_SERVER['REQUEST_METHOD'])], [$request])\r\n ->dispatch();\r\n }", "title": "" }, { "docid": "7276a1ef772cb88678ef7cb4bd08ad5f", "score": "0.57646126", "text": "public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface\n {\n // before request handle\n $token = $request->getHeaderLine(\"token\");\n $key=\\config('jwt.key');\n try {\n\n JWT::$leeway = 60; // $leeway in seconds\n $auth= JWT::decode($token, $key, array('HS256'));\n $request->member = $auth->member;\n } catch (\\Exception $e) {\n return context()->getResponse()->withData(['code'=>101,'msg'=>'授权失败']);\n }\n\n $response = $handler->handle($request);\n // after request handle\n return $response;\n }", "title": "" }, { "docid": "a8a6120356aef3dcb0d560cb75192c86", "score": "0.5760252", "text": "abstract function handle(Request $request);", "title": "" }, { "docid": "31c3b528c80d74230b30b96242ce6bbf", "score": "0.5731052", "text": "private function handleRequests(): void\n {\n $this->getServer()->on(\n 'request',\n function (Request $request, Response $response) {\n $this->getMockServerResponse()->setEndPoint(\n $this->getRouter()->getEndPoint($request)\n );\n\n $this->getMockServerResponse()->setResponseType(\n $this->responseType\n );\n\n $responseObject = $this->getMockServerResponse()\n ->buildResponse($response);\n\n $response->end($responseObject->getResponseData());\n\n $this->log($request, $responseObject);\n }\n );\n }", "title": "" }, { "docid": "6936a9b601538e163c3e15ccb9d8ec7f", "score": "0.5722723", "text": "public function onRequest(ReactRequest $request, ReactResponse $response)\n {\n if (null === $this->application) {\n return;\n }\n\n $content = '';\n $headers = $request->getHeaders();\n $contentLength = array_key_exists('Content-Length', $headers) ? (int)$headers['Content-Length'] : 0;\n\n $app = $this->application;\n $request->on('data', function ($data) use ($request, $response, &$content, $contentLength, &$app) {\n // read data (may be empty for GET request)\n $content .= $data;\n\n // handle request after receive\n if (strlen($content) >= $contentLength) {\n try {\n $syRequest = self::mapRequest($request, $content);\n } catch (Exception $exception) {\n $response->writeHead(500);\n $response->write($exception->getMessage());\n $response->end();\n\n return;\n }\n\n try {\n $syResponse = $this->application->handle($syRequest);\n } catch (Exception $exception) {\n $response->writeHead(500);\n $response->write($exception->getMessage());\n $response->end();\n\n return;\n }\n\n self::mapResponse($response, $syResponse);\n }\n });\n }", "title": "" }, { "docid": "ae7c3e4f2318b346a2c80c30b28293dc", "score": "0.57193977", "text": "public function process(Request $request, RequestHandlerInterface $handler): Response\n {\n /** @var RouteResult $matchedRoute */\n $matchedRoute = $request->getAttribute(RouteResult::class);\n $lang = $matchedRoute->isFailure()\n ? $this->matchLanguageFromPath($request)\n : $this->matchLanguageFromParams($matchedRoute);\n\n $this->translator->setLocale($lang);\n return $handler->handle($request);\n }", "title": "" }, { "docid": "5a8ea48c2d66804e3e92796139674fc4", "score": "0.5716053", "text": "public function processResponse($response);", "title": "" }, { "docid": "b8d81bc5a367598d9ebd4142286cd5ee", "score": "0.5711984", "text": "public function process(ServerRequestInterface $request, DelegateInterface $delegate)\n {\n return CallableHandler::execute($this->handler, [$request, $delegate]);\n }", "title": "" }, { "docid": "836828dc84fb77eb7fc235ee3ada3927", "score": "0.569749", "text": "public function handleIncoming()\n {\n if ( ! $this->mailWebhookVerifier->isValid($this->request->all())) {\n return response('', 406);\n }\n\n $this->mailHandler->parseEmailIntoTicketOrReply($this->request->all());\n }", "title": "" }, { "docid": "7d72a47443c22aa50993deb1d0e22dc3", "score": "0.56660956", "text": "public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface\n {\n $path = substr($request->getUri()->getPath(), 0, 6);\n $authorizate_paths = ['/admin','/jobs','/jobs/add','/users','/users/add'];\n $sessionUserId = $_SESSION['userId'] ?? null;\n\n if($path == \"/login\" && $sessionUserId){\n return new RedirectResponse('/admin');\n }else if(in_array($path,$authorizate_paths)){\n if(!$sessionUserId){\n return new RedirectResponse('/login');\n }\n }\n\n return $handler->handle($request);\n }", "title": "" }, { "docid": "3bdfb3658abfcea861ec093dfa00a0bc", "score": "0.56621945", "text": "public function handle(ServerRequestInterface $request) : ResponseInterface\n {\n return $this->laminasPipe->handle($request);\n }", "title": "" }, { "docid": "e9923043eea29de0526f207194c32b25", "score": "0.5656507", "text": "public function getResponseHandler(): ResponseHandlerInterface;", "title": "" }, { "docid": "a89c04ca585b9a1471240be68947920a", "score": "0.5656341", "text": "abstract public function processRequest ();", "title": "" }, { "docid": "87876b6544d5771597f55fed10b9fd85", "score": "0.5641419", "text": "public function handle(Request $request): Response\n {\n $router = new Router();\n\n if ($router->match($request->getPathInfo(), $request->getMethod())) { // A match has been found\n /** @var Route $match */\n $match = $router->getMatch();\n\n // Check if the handler is a closure or not\n $handler = $match->getHandler();\n\n if (is_object($handler) && $handler instanceof \\Closure) {\n try {\n $content = $this->resolveFunction($handler);\n } catch (\\Exception $e) {\n if (DTAP === 'development') {\n showPlainError('Something went wrong while resolving a closure, details below:', false);\n pr($e);\n exit;\n }\n return $this->respond(500);\n }\n } else {\n $controller = substr($handler, 0, stripos($handler, '.'));\n $method = substr($handler, (stripos($handler, '.') + 1));\n\n try {\n $instance = $this->getInstance($controller);\n $content = $this->resolveMethod($instance, $method, $match->getParameters());\n } catch (\\Exception $e) {\n if (DTAP === 'development') {\n showPlainError('Something went wrong while resolving a controller, details below:', false);\n pr($e);\n exit;\n }\n return $this->respond(500);\n }\n }\n\n return $this->respond(200, $content);\n }\n\n return $this->respond(404);\n }", "title": "" }, { "docid": "53fd30b5735d2944145d0bc20a194046", "score": "0.56409776", "text": "function processRequest() {\n\t\t$requestObj\t= $this->myJsonObj->{$this->requestType};\n\t\tif (is_array($requestObj)) {\n\t\t\tfor ($i=0; $i<count($requestObj);$i++) {\n\t\t\t\t$serverReplyArray[$i] = $this->processInternalRequest($requestObj[$i]);\n\t\t\t}\n\t\t} else {\n\t\t\t$serverReplyArray = $this->processInternalRequest($requestObj);\n\t\t}\n\t\t//echo $serverReplyArray[0];\n\t\t$this->serverReply = (object) [$this->requestResponse=>$serverReplyArray];\n\t\treturn $this->serverReply;\n\t}", "title": "" }, { "docid": "cce1aa95df3776cb46bf82873787411b", "score": "0.5640674", "text": "public function processRequest() {\n\n\t\tif (self::_hasAdapter(get_class(), __FUNCTION__))\n\t\t\treturn self::_callAdapter(get_class(), __FUNCTION__);\n\n\t\t$this->_request_method = strtolower($_SERVER[$this->_request_method]);\n\n\t\tswitch ($this -> _request_method) {\n\n\t\t\tcase 'get' :\n\t\t\t\t$this->_request_data = $_GET;\n\t\t\t\tbreak;\n\t\t\tcase 'post' :\n\t\t\t\t$this->_request_data = ($_POST) ? : file_get_contents('php://input');\n\t\t\t\tbreak;\n\t\t\tcase 'put' :\n\t\t\t\t$this->_request_data = file_get_contents('php://input');\n\t\t\t\tbreak;\n\t\t\tcase 'delete' :\n\t\t\t\t$this->_request_data = file_get_contents('php://input');\n\t\t\t\tbreak;\n\t\t\tcase 'head' :\n\t\t\t\techo 'Run around like a chicken with it\\'s head cut off';\n\t\t\t\tbreak;\n\t\t\tcase 'continue' :\n\t\t\t\techo 'Run around like a chicken with it\\'s head cut off';\n\t\t\t\tbreak;\n\t\t}\n\n\t}", "title": "" }, { "docid": "8e88e687cee7691fe7ef10b35259e0d3", "score": "0.56400025", "text": "public function handle($request);", "title": "" }, { "docid": "13bb2adf0d000e792d08a3b32be06193", "score": "0.5637737", "text": "public function __invoke(ServerRequestInterface $request, ResponseInterface $response, $next);", "title": "" }, { "docid": "18ea76e966541d27650237dbac61e20d", "score": "0.5636376", "text": "public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface\n {\n if (!$request->getAttribute('user')) {\n return $this->helper->create(422, ['message' => 'Es muss ein Benutzer angegeben werden.']);\n }\n // A successful save will return the ID of the updated which is given to the next handler to load data for it.\n try {\n return $handler->handle(\n $request->withAttribute('id', $this->repo->saveUser($request->getAttributes()))\n );\n } catch (RepoException $e) {\n return $this->helper->create($e->getCode(), ['message' => $e->getMessage()]);\n }\n }", "title": "" }, { "docid": "85f3e132934e46497530de8b8638c5e9", "score": "0.5634919", "text": "public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface\n {\n $post = $request->getParsedBody();\n $files = $request->getUploadedFiles();\n\n $input = array_merge($post, $files);\n\n $rules = $this->getRules();\n $labels = $this->getLabels();\n $templates = $this->getTemplates();\n\n $validator = $this->factory->getValidator($rules)\n ->withLabels($labels)\n ->withTemplates($templates);\n\n $result = $validator->validate($input);\n\n if ($result->passed()) {\n\n return $handler->handle($request);\n\n }\n\n throw new DataInvalidException($result->getMessages());\n }", "title": "" }, { "docid": "f8839593508588869dd47d198b09acaa", "score": "0.5576483", "text": "public function run() {\n\n $request = Request::createFromGlobals() ;\n $response = $this->handle($request) ;\n $response->send() ;\n\n }", "title": "" }, { "docid": "a64bba9d2b169f42116cfbb1484a9c87", "score": "0.5547837", "text": "public function handle(Request $request): Response;", "title": "" }, { "docid": "1e1d255215dc5d9d4d0112fa639cd434", "score": "0.55347055", "text": "public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface\r\n {\r\n $token = \"\";\r\n\r\n if ($request->getUri()->getPath() === \"/central/usuario/login\") {\r\n\r\n $params = json_decode($request->getBody()->getContents());\r\n\r\n $recuperarUsuario = new RecuperarUsuario(App::getContainer()->get(\\Doctrine\\ORM\\EntityManager::class));\r\n $Usuario = $recuperarUsuario->login(\r\n $params->email,\r\n $params->senha);\r\n\r\n if ($Usuario === null) {\r\n return (new Response)->withStatus(401);\r\n }\r\n $token = $Usuario->token;\r\n } else if ($request->getUri()->getPath() === \"/central/usuario/esqueceu_senha\") {\r\n\r\n $params = json_decode($request->getBody()->getContents());\r\n\r\n $em = App::getContainer()->get(\\Doctrine\\ORM\\EntityManager::class);\r\n $Usuario = $em->getRepository(Usuario::class)->findOneBy(\r\n array('email' => $params->email\r\n )\r\n );\r\n\r\n if ($Usuario === null) {\r\n return (new Response)->withStatus(401);\r\n }\r\n\r\n $ret = CentralToken::validarToken($Usuario->token);\r\n if ($ret === 403) {\r\n $token = CentralToken::obterToken();\r\n } else {\r\n $token = $Usuario->token;\r\n }\r\n } else {\r\n if (!$request->hasHeader('Authorization')){\r\n return (new Response)->withStatus(401);\r\n }\r\n $token = $request->getHeaderLine('Authorization');\r\n }\r\n\r\n $ret = CentralToken::validarToken($token);\r\n switch ($ret) {\r\n case 402:\r\n return (new Response)->withStatus(402, 'autorização inválida');\r\n break;\r\n case 403:\r\n/*\r\n $response = new Response();\r\n $t = new Token();\r\n $t->token = $token;\r\n\r\n $response->getBody()->write(json_encode($t));\r\nreturn $response->withStatus(403, 'expirado, por favor atualize seu cadastro');\r\n*/\r\n\r\n return (new Response)->withStatus(403, 'expirado, por favor atualize seu cadastro');\r\n break;\r\n case 404:\r\n return (new Response)->withStatus(404, 'nenhum usuário encontrado');\r\n break;\r\n case 500:\r\n return (new Response)->withStatus(500, 'token inválido');\r\n break;\r\n }\r\n\r\n return $handler->handle($request);\r\n }", "title": "" }, { "docid": "a9fae6ba5c77429aeda6ca39d92c2824", "score": "0.5532871", "text": "public static function handleRequest ()\n\t{\n\t\tstatic::getInstance()->handleRequest();\n\t}", "title": "" }, { "docid": "9525af9f28bc8b821bd4150667d60ec1", "score": "0.55186254", "text": "public function invoke(callable $handler, array $args, ServerRequestInterface $request)\n {\n $args[ServerRequestInterface::class] = $request;\n $args[SymfonyRequest::class] = $request;\n $args[MakiseRequest::class] = $request;\n\n return $this->call($handler, $args);\n }", "title": "" }, { "docid": "0a7f39f7e5e7d91654a8e64fff5e5e4d", "score": "0.5516247", "text": "final public function handle()\n {\n \n $this->_preHandle();\n \n if ($this->_request->getActionName() == null) {\n throw new Zend_Tool_Endpoint_Exception('Endpoint failed to setup the action name.');\n }\n\n if ($this->_request->getProviderName() == null) {\n throw new Zend_Tool_Endpoint_Exception('Endpoint failed to setup the provider name.');\n }\n \n ob_start();\n \n try {\n $dispatcher = new Zend_Tool_Rpc_Endpoint_Dispatcher();\n $dispatcher->setRequest($this->_request)\n ->setResponse($this->_response)\n ->dispatch();\n \n } catch (Exception $e) {\n //@todo implement some sanity here\n die($e->getMessage());\n //$this->_response->setContent($e->getMessage());\n return;\n }\n \n if (($content = ob_get_clean()) != '') {\n $this->_response->setContent($content);\n }\n \n $this->_postHandle();\n }", "title": "" }, { "docid": "447ece7805516512ab6c0d547ec2eb8c", "score": "0.54988205", "text": "public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface\n {\n // Get a valid signature.\n $signature = ($this->signature)($request);\n\n if (! is_array($signature)) {\n\n throw new OwnershipSignatureTypeException($signature);\n\n }\n\n // Invalidate the session when signature and session does not match.\n $metadata = $_SESSION[self::METADATA_KEY] ?? [];\n\n if (! $this->compare($signature, $metadata)) {\n\n $_SESSION = [];\n session_regenerate_id();\n\n }\n\n // Process the request and save the current signature.\n $response = $handler->handle($request);\n\n $_SESSION[self::METADATA_KEY] = $signature;\n\n return $response;\n }", "title": "" } ]
9645f3f3d70310b0c9faaf6c69c88c26
/ FUNCIONES relativas al modelo relacionado a este modelo, en este caso NomConcepto
[ { "docid": "7eecaed736f5d619f4d76bc059c27d0b", "score": "0.0", "text": "public static function get_tabla($registro_modelo_padre, $registros_asignados)\n {\n $encabezado_tabla = ['Orden', 'ID', 'Modo Liquidación', 'Descripción', 'Abreviatura', 'Porc. sobre el básico', 'Naturaleza', 'Estado', 'Acción']; // 9 campos\n\n $registros = [];\n $i = 0;\n foreach ($registros_asignados as $fila) {\n $orden = DB::table('nom_agrupacion_tiene_conceptos')->where('nom_concepto_id', '=', $fila['id'])\n ->where('nom_agrupacion_id', '=', $registro_modelo_padre->id)\n ->value('orden');\n\n $registros[$i] = collect([\n $orden,\n $fila['id'],\n $fila['modo_liquidacion_id'],\n $fila['descripcion'],\n $fila['abreviatura'],\n $fila['porcentaje_sobre_basico'],\n $fila['naturaleza'],\n $fila['estado']\n ]);\n $i++;\n }\n\n return View::make('core.modelos.tabla_modelo_relacionado', compact('encabezado_tabla', 'registros', 'registro_modelo_padre'))->render();\n }", "title": "" } ]
[ { "docid": "8b922fff9a7fe2cd0903ab55d7c3b7b4", "score": "0.6387574", "text": "public function concepto()\n {\n return $this->belongsTo(Concepto::class, 'id_concepto', 'id_concepto');\n }", "title": "" }, { "docid": "7375dabfd373568d607d88b690e708fe", "score": "0.60866296", "text": "public function getConcepto()\n {\n return $this->concepto;\n }", "title": "" }, { "docid": "62df209697b112d4dc70842ab9fa5d75", "score": "0.6047463", "text": "abstract public function linkModelName();", "title": "" }, { "docid": "f8948e7699eb0bb7919bdbded29e4f37", "score": "0.5994701", "text": "public function conceptos()\n {\n return $this->hasMany('App\\Concepto', 'empleado_id');\n }", "title": "" }, { "docid": "679bc9c95d58d2199d09f818a87dfdf0", "score": "0.5845005", "text": "abstract public function modelName();", "title": "" }, { "docid": "f56c281f15e901cd0eca42d2b3a8eecb", "score": "0.58071786", "text": "function escribirOneToMany()\n{\n // Leer posibles relaciones\n echo \"<h1>One to Many</h1>\";\n $jsonRelaciones = file_get_contents(\"1tm.json\");\n $modelosRelaciones = json_decode($jsonRelaciones, true);\n\n foreach ($modelosRelaciones as $obj) \n {\n $relations = $obj[\"relations\"];\n \n escribirRelacionHasMany($obj[\"model\"], $obj[\"relations\"]);\n \n } \n}", "title": "" }, { "docid": "851cb13b17581f64cb98f8fb9803afdf", "score": "0.57059354", "text": "public function descripcion(){\n\t\treturn $this->hasOne('App\\Models\\PUCO\\ObraSocial' , 'codigo_osp' , 'codigo_osp');\n\t}", "title": "" }, { "docid": "5bf309cae7a2fe595b117d3a2a40a0bf", "score": "0.5691774", "text": "abstract public function getModelName();", "title": "" }, { "docid": "5bf309cae7a2fe595b117d3a2a40a0bf", "score": "0.5691774", "text": "abstract public function getModelName();", "title": "" }, { "docid": "acde2ef1fcd661e4002b3de1b90d40a9", "score": "0.553894", "text": "public function concept()\n {\n return $this->belongsTo('App\\Concept');\n }", "title": "" }, { "docid": "acde2ef1fcd661e4002b3de1b90d40a9", "score": "0.553894", "text": "public function concept()\n {\n return $this->belongsTo('App\\Concept');\n }", "title": "" }, { "docid": "6783733685f3fce881ae540f5e126341", "score": "0.5495627", "text": "private function relacionamentos() {\r\t\t\t$this->_usuarios = new usuariosModel();\t\r\t\t\t$this->_livros = new livrosModel();\t\r\t\t}", "title": "" }, { "docid": "6b129ab9893f8b1998ea944e32137625", "score": "0.5459037", "text": "public function especialistas()\n { //para 1-->N, un paciente tiene N correos\n // modeloAlQuePertenece //atributoLocalUsadoParaFK //atributoTablaPapá (como es id no se pone) \n return $this->belongsTo('App\\EspecialistaModel', 'id_especialista');\n }", "title": "" }, { "docid": "f411e41eb020e878587e9ff99b64797e", "score": "0.54567635", "text": "function concepto($tipo){\n\t\t\treturn $sql = $this->query(\"select * from bco_conceptos where idtipo=\".$tipo);\n\t\t}", "title": "" }, { "docid": "a4995e0831918dcd2572bd28b3297a12", "score": "0.543323", "text": "public function refer_physician(){\n\t\t\n\t}", "title": "" }, { "docid": "013b43fc1b87679f027f6de5770fbdf7", "score": "0.53900963", "text": "abstract public static function getRelatedEntityName(): string;", "title": "" }, { "docid": "1cd893daf4175eda5cb14f76b62be8a9", "score": "0.53838706", "text": "abstract public function getModelName(): string;", "title": "" }, { "docid": "20fbea9aa799bbe98bdb21992d4dc592", "score": "0.53348076", "text": "public function relationNames()\r\n {\r\n return [\n 'campanias'\n ];\r\n }", "title": "" }, { "docid": "3f40fb55b4856e4a2902f96253c83f15", "score": "0.5327514", "text": "public function getConcepts();", "title": "" }, { "docid": "92a7abc6661d7742617c6df0a3e8ddb6", "score": "0.53100693", "text": "protected function relateModel() {\n\t\tforeach (['belongs-to', 'has-one', 'has-many', 'many-many'] as $relation) {\n\t\t\tforeach ($this->options[$relation] as $name => $options) {\n\n\t\t\t\t// Allows the shorthand relation with just the name of the model\n\t\t\t\tif (is_numeric($name)) {\n\t\t\t\t\t$name = $options;\n\t\t\t\t\t$options = [];\n\t\t\t\t}\n\n\t\t\t\t$method = str_replace('-', '', $relation);\n\n\t\t\t\t$this->$method($name, $options);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "7c0052b3795ac703824652fbd185667c", "score": "0.5294138", "text": "public function relationNames()\r\n {\r\n return [\n 'cartao',\n 'som'\n ];\r\n }", "title": "" }, { "docid": "1b10906fd50aaeefcae8fdcd75d8392d", "score": "0.52917576", "text": "public function CargarConceptos(){\n\n $consultaConcepto = \"SELECT * FROM space.conceptos WHERE componente = 'TODOS' AND estatus=1\";\n $obj = $this->DBSpace->consultar($consultaConcepto); \n foreach ($obj->rs as $clv => $v) { \n $Dir['fnxC'][] = array(\n 'rs' => $v->codigo, \n 'fn' => $v->forumula, \n 'abv' => $v->descripcion, \n 'tipo' => $v->tipo,\n 'part' => $v->partida\n ); \n\n }\n return true;\n }", "title": "" }, { "docid": "cb4cfe427c4509e277f8e800f8b1060d", "score": "0.52538884", "text": "public function relationNames()\n {\n return [\n 'cuti'\n ];\n }", "title": "" }, { "docid": "554c874ffc89b43bc8acc6b0d22ae201", "score": "0.5230784", "text": "public function getRelationsInput();", "title": "" }, { "docid": "926018f383e6e4f8684b04602d62abf9", "score": "0.5227748", "text": "public function getModelName();", "title": "" }, { "docid": "926018f383e6e4f8684b04602d62abf9", "score": "0.5227748", "text": "public function getModelName();", "title": "" }, { "docid": "926018f383e6e4f8684b04602d62abf9", "score": "0.5227748", "text": "public function getModelName();", "title": "" }, { "docid": "926018f383e6e4f8684b04602d62abf9", "score": "0.5227748", "text": "public function getModelName();", "title": "" }, { "docid": "926018f383e6e4f8684b04602d62abf9", "score": "0.5227748", "text": "public function getModelName();", "title": "" }, { "docid": "926018f383e6e4f8684b04602d62abf9", "score": "0.5227748", "text": "public function getModelName();", "title": "" }, { "docid": "926018f383e6e4f8684b04602d62abf9", "score": "0.5227748", "text": "public function getModelName();", "title": "" }, { "docid": "926018f383e6e4f8684b04602d62abf9", "score": "0.5227748", "text": "public function getModelName();", "title": "" }, { "docid": "1490a081e52352b57f72639b1583206e", "score": "0.52228314", "text": "public function tipobollo()\n {\n return $this->belongsTo('App\\TipoBollo','tipobolli_codice','codice');\n }", "title": "" }, { "docid": "4685c36d04ecff42b81c766255bb0776", "score": "0.52180237", "text": "abstract function getModel();", "title": "" }, { "docid": "69f899a81bd7dde3da8f0d32f5664409", "score": "0.5199788", "text": "public static function getRelationName(): Name\n {\n return new Name('part of');\n }", "title": "" }, { "docid": "4529a4a836bd47a16980c0f904e09851", "score": "0.51993126", "text": "function addTranslatedAttribute($currentAttribute, $schema_attrs, $model1) {\n\t#echo \"start translate $currentAttribute<br>\";\n\tif (!isset($schema_attrs[$currentAttribute]) or !is_object($schema_attrs[$currentAttribute])) {\n\t\treturn $model1;\n\t}\n\t\n\t$attr = $schema_attrs[$currentAttribute];\n\t\n\t# Local names are used as part of the URI of the new property.\n\t#$localName = $attr->getName();\n\t#$uriAttr = sdrdf_r(\"#$localName\");\n\n\t$localName = $currentAttribute;\n\t$uriAttr = sdrdf_r(\"ldap:\".strtolower($currentAttribute));\n\n\t$supAttribute = $attr->getSupAttribute();\n\tif ($supAttribute)\n\t\t$syntaxOID = $schema_attrs[strtolower($supAttribute)]->getSyntaxOID();\n\telse\n\t\t$syntaxOID = $attr->getSyntaxOID();\n\t#echo $syntaxOID.\"-<br>\";\n\n\t$description = $attr->getDescription();\n\n\t# The local name should also be used as the value of a rdfs:label property\n\t$model1->add(new Statement ($uriAttr, sdrdf_r(\"rdfs:label\"), sdrdf_tl($localName, \"\", \"xsd:string\")));\n\n # The description is used as rdfs:comment\n\t$model1->add(new Statement ($uriAttr, sdrdf_r(\"rdfs:comment\"), sdrdf_tl($description, \"\", \"xsd:string\")));\n\n\t# any other URI and the OID (in URN form) are mapped with owl:equivalentProperty to the first one.\n\t$oid = $attr->getOID();\n\t$model1->add(new Statement ($uriAttr, sdrdf_r(\"owl:equivalentProperty\"), sdrdf_r(\"urn:oid:$oid\")));\n\n\t$aliases = $attr->getAliases();\n\t#show_array($aliases);\n\t if (count($aliases) > 0)\n\t \tforeach( $aliases as $alias) {\n\t\t\t$model1->add(new Statement ($uriAttr, sdrdf_r(\"rdfs:label\"), sdrdf_tl($alias, \"\", \"xsd:string\")));\n\t \t\t$model1->add(new Statement ($uriAttr, sdrdf_r(\"owl:equivalentProperty\"), sdrdf_r(strtolower(\"ldap:$alias\"))));\n\t \t}\n\n\tswitch ($syntaxOID) {\n\t\tcase \"1.3.6.1.4.1.1466.115.121.1.12\": # Distinguished Name\n\t\tcase \"1.3.6.1.4.1.1466.115.121.1.38\": # OID\n\t\t\t# Every attribute with the syntax of an OID or a DN is created as an object property while all others become datatype properties\n\t\t\t$model1->add(new Statement ($uriAttr, sdrdf_r(\"rdf:type\"), sdrdf_r(\"owl:ObjectProperty\")));\n\t\t\t# Object properties get as range the class top ...\n\t\t\t$model1->add(new Statement ($uriAttr, sdrdf_r(\"rdfs:range\"), sdrdf_r(\"ldap:top\")));\n\t\t\tbreak;\n\t\tcase \"1.3.6.1.4.1.1466.115.121.1.4\": # Audio\n\t\tcase \"1.3.6.1.4.1.1466.115.121.1.5\": # Binary\n\t\tcase \"1.3.6.1.4.1.1466.115.121.1.28\": # JPEG\n\t\t\t$model1->add(new Statement ($uriAttr, sdrdf_r(\"rdf:type\"), sdrdf_r(\"owl:DatatypeProperty\")));\n\t\t\t$model1->add(new Statement ($uriAttr, sdrdf_r(\"rdfs:range\"), sdrdf_r(\"xsd:base64Binary\")));\n\t\t\tbreak;\n\t\tcase \"1.3.6.1.4.1.1466.115.121.1.27\": # Integer\n\t\t\t$model1->add(new Statement ($uriAttr, sdrdf_r(\"rdf:type\"), sdrdf_r(\"owl:DatatypeProperty\")));\n\t\t\t$model1->add(new Statement ($uriAttr, sdrdf_r(\"rdfs:range\"), sdrdf_r(\"xsd:integer\")));\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t# default is datatype-prop with xsd:string\n\t\t\t$model1->add(new Statement ($uriAttr, sdrdf_r(\"rdf:type\"), sdrdf_r(\"owl:DatatypeProperty\")));\n\t\t\t$model1->add(new Statement ($uriAttr, sdrdf_r(\"rdfs:range\"), sdrdf_r(\"xsd:string\")));\n\t}\n\n\t# If there is a single value indicator in the schema definition, then a cardinality restriction ($\\le 1$) for the class top must be created on this property.\n\tif ($attr->getIsSingleValue() == true)\n\t{\n\t\t$model1->add(new Statement ($uriAttr, sdrdf_r(\"rdfs:comment\"), sdrdf_tl(\"isSingleValued\", \"\", \"xsd:string\")));\n\t\t$bNode = new BlankNode($model1);\n\t\t$model1->add(new Statement (sdrdf_r(\"ldap:top\"), sdrdf_r(\"rdfs:subClassOf\"), $bNode));\n\t\t$model1->add(new Statement ($bNode, sdrdf_r(\"rdf:type\"), sdrdf_r(\"owl:Restriction\")));\n\t\t$model1->add(new Statement ($bNode, sdrdf_r(\"owl:onProperty\"), $uriAttr));\n\t\t$model1->add(new Statement ($bNode, sdrdf_r(\"owl:maxCardinality\"), sdrdf_tl(\"1\", \"\", \"xsd:integer\")));\n\t}\n\n\t# The domain of the property will be generated with the owl:unionOf class constructor\n\n\treturn $model1;\n}", "title": "" }, { "docid": "f78e7813b573932cabfa4827117ca637", "score": "0.5159791", "text": "public function buildRelations()\n\t{\n $this->addRelation('Mensaje', 'Mensaje', RelationMap::ONE_TO_MANY, array('id_localizacion' => 'id_localizacion', ), 'RESTRICT', null);\n $this->addRelation('PersonaLocalizacion', 'PersonaLocalizacion', RelationMap::ONE_TO_MANY, array('id_localizacion' => 'id_localizacion', ), 'RESTRICT', null);\n\t}", "title": "" }, { "docid": "0477b88a0bdcd290f2bfd0a1f4df768d", "score": "0.51351476", "text": "private function getModelGeneralActividadEconomica()\r\n\t\t{\r\n\t\t\t$findModelAct = null;\r\n\t\t\t$findModel = self::getModelGeneral();\r\n\t\t\tif ( count($findModel) > 0 ) {\r\n\t\t\t\t$findModelAct = $findModel->andWhere('D.impuesto =:impuesto',[':impuesto' => 1])\r\n\t\t\t\t\t\t\t\t\t ->andWhere('P.id_contribuyente =:id_contribuyente',\r\n\t\t\t\t\t\t\t\t\t \t\t\t[':id_contribuyente' => $this->_id_contribuyente]);\r\n\t\t\t}\r\n\t\t\treturn $findModelAct;\r\n\t\t}", "title": "" }, { "docid": "a0a41dd00ab2695b87f7920b56a90e96", "score": "0.51302755", "text": "abstract public function belongs_to();", "title": "" }, { "docid": "e6f0d3fd7180df843871be61aa8673a5", "score": "0.5128782", "text": "public function getAll(){\n $this->resetModel();\n $collection= new DataAccess('Fonction');\n $funcs = $collection->GetAll();\n foreach($funcs as $func){\n $this->_descriptionList[$func->id_fonction] = $func->f_description;\n } \n }", "title": "" }, { "docid": "283fa8d49b88db8829b1367a89e3765a", "score": "0.5119285", "text": "public function genero()\n {\n return $this->belongsTo('Genero');\n }", "title": "" }, { "docid": "a4379df3dc5d8f4c4861bfe8d252a475", "score": "0.51147276", "text": "public function relationNames()\n {\n return [\n 'targetkinerja'\n ];\n }", "title": "" }, { "docid": "8bc76807819465e1ad44ff0839bfc493", "score": "0.5113372", "text": "function add_rapido() {\n\n\t\tif (!empty($this->passedArgs['RelacionesConcepto.relacion_id'])) {\n\t\t\t$this->RelacionesConcepto->Relacion->contain(array(\"ConveniosCategoria\", \"Trabajador\", \"Empleador\", \"RelacionesConcepto.Concepto\"));\n\t\t\t$relacion = $this->RelacionesConcepto->Relacion->findById($this->passedArgs['RelacionesConcepto.relacion_id']);\n\n $assignedConcepts = Set::extract('/RelacionesConcepto/Concepto/codigo', $relacion);\n\t\t\t$concepts = $this->RelacionesConcepto->Concepto->find('all',\n\t\t\t\tarray(\t'recursive'\t => -1,\n\t\t\t\t\t\t'order'\t\t => array('Concepto.nombre')));\n\t\t\t\n\t\t\t$this->set('relacion', $relacion);\n\t\t\t$this->set('concepts', $concepts);\n\t\t\t$this->set('assignedConcepts', $assignedConcepts);\n\t\t} else {\n\t\t\t$this->Session->setFlash('Debe seleccionar una relacion.', 'error');\n\t\t\t$this->History->goBack(2);\n\t\t}\n\t}", "title": "" }, { "docid": "b01fef5f7e857e6509f09ebd2409b6f7", "score": "0.5112794", "text": "public function especialista()\n \t\t{\n \t\t\treturn $this->belongsTo(Especialista::class);\n \t\t}", "title": "" }, { "docid": "67fa5f2e90aba285a426ff38857c5056", "score": "0.51110595", "text": "public function run()\n {\n $conceptos = [\n [\n 'clave' => 'SUELDO',\n 'descripcion' => 'SUELDO BASE TABULAR',\n 'tipo' =>'PERCEPCION',\n 'aplica' => 'BASE,CONFIANZA',\n 'editable' => true,\n 'excento' => false,\n 'orden' => 0,\n 'auto' => true,\n 'categoria' =>'PRESTACION DE LEY,TABULAR,SBC ISSSTE,SBC SAR,SUELDO'\n ],\n [\n 'clave' => 'QUINQUENIO',\n 'descripcion' => 'PRIMA QUINQUENIAL',\n 'tipo' =>'PERCEPCION',\n 'aplica' => 'BASE,CONFIANZA',\n 'fijable' => true,\n 'orden' => 0,\n 'auto' => true,\n 'editable' => true,\n 'excento' => false,\n 'categoria' =>\"PRESTACION DE LEY,SBC ISSSTE,SBC SAR\"\n ],\n [\n 'clave' => 'CODECA',\n 'descripcion' => 'COMPENSACIÓN POR DESARROLLO Y CAPACITACIÓN',\n 'tipo' =>'PERCEPCION',\n 'aplica' =>'BASE,CONFIANZA',\n 'valor' => 750.0,\n 'fijable' => true,\n 'orden' => 1,\n 'auto' => true,\n 'editable' => false,\n 'excento' => false,\n 'categoria' =>'PRESTACION DE LEY,SBC ISSSTE,SBC SAR'\n ],\n [\n 'clave' => 'DESPENSA',\n 'descripcion' => 'DESPENSA',\n 'tipo' =>'PERCEPCION',\n 'aplica' =>'BASE,CONFIANZA',\n 'valor'=> 342.5,\n 'orden' => 1,\n 'auto' => true,\n 'fijable' => true,\n 'editable' => false,\n 'excento' => false,\n 'categoria' =>'PRESTACION DE LEY'\n ],\n [\n 'clave' => 'AYUDA_SERVICIOS',\n 'descripcion' => 'AYUDA POR SERVICIOS',\n 'tipo' =>'PERCEPCION',\n 'aplica' =>'BASE,CONFIANZA',\n 'valor'=> 247.5,\n 'orden' => 1,\n 'auto' => true,\n 'fijable' => true,\n 'editable' => false,\n 'excento' => false,\n 'categoria' =>'PRESTACION DE LEY'\n ],\n [\n 'clave' => 'PREVISION_SOCIAL',\n 'descripcion' => 'PREVISION SOCIAL MULTIPLE',\n 'tipo' =>'PERCEPCION',\n 'aplica' =>'BASE,CONFIANZA',\n 'valor'=> 257.5,\n 'orden' => 1,\n 'auto' => true,\n 'fijable' => true,\n 'editable' => false,\n 'excento' => false,\n 'categoria' =>'PRESTACION DE LEY'\n ],\n [\n 'clave' => 'C_GARANT',\n 'descripcion' => 'COMPENSACIÓN GARANTIZADA',\n 'tipo' =>'PERCEPCION',\n 'aplica' => 'BASE,CONFIANZA', \n 'orden' => 0,\n 'auto' => true,\n 'editable' => true,\n 'excento' => false,\n 'categoria' =>\"PRESTACION DE LEY,TABULAR\"\n ],\n [\n 'clave' => 'PRIMA',\n 'descripcion' => 'PRIMA VACACIONAL',\n 'tipo' =>'PERCEPCION',\n 'aplica' => 'BASE,CONFIANZA',\n 'fijable' => false,\n 'editable' => true,\n 'excento' => true,\n 'max_excento' => 700.00,\n 'categoria' =>\"PRESTACION DE LEY,TABULAR\"\n ],\n [\n 'clave' => 'GRATIFICACION',\n 'descripcion' => 'GRATIFICACIÓN',\n 'tipo' =>'PERCEPCION',\n 'aplica' => 'HONORARIOS',\n 'tipo_valor' => '$',\n 'fijable' => true,\n 'excento' => false,\n 'orden' => 0,\n 'editable' => true\n ],\n [\n 'clave' => 'PUNTUALIDAD_MENSUAL',\n 'descripcion' => 'PUNTUALIDAD MENSUAL',\n 'tipo' =>'PERCEPCION',\n 'aplica' => 'BASE',\n 'formula' => '(SUELDO/15)*1|SUELDO|0',\n 'valor' => '1',\n 'orden' => 2,\n 'excento' => false,\n ],\n [\n 'clave' => 'PUNTUALIDAD_PERFECTA',\n 'descripcion' => 'PUNTUALIDAD PERFECTA',\n 'tipo' =>'PERCEPCION',\n 'aplica' => 'BASE',\n 'tipo_valor' => 'DIAS[SUELDO]',\n 'valor' => '12',\n 'orden' => 2,\n 'excento' => false,\n ],\n [\n 'clave' => 'GUARDERIA',\n 'descripcion' => 'GUARDERÍA CONTRACTUAL',\n 'tipo' =>'PERCEPCION',\n 'aplica' => 'BASE',\n 'tipo_valor' => '$',\n 'orden' => 2,\n 'excento' => false,\n ],\n [\n 'clave' => 'PRODUCTIVIDAD_MESUAL',\n 'descripcion' => 'PRODUCTIVIDAD MENSUAL',\n 'tipo' =>'PERCEPCION',\n 'aplica' => 'BASE',\n 'tipo_valor' => '$',\n 'valor' => 700,\n 'orden' => 3,\n 'excento' => false,\n ],\n [\n 'clave' => 'PRODUCTIVIDAD_TRIMESTRAL',\n 'descripcion' => 'PRODUCTIVIDAD TRIMESTRAL TD',\n 'tipo' =>'PERCEPCION',\n 'aplica' => 'BASE',\n 'tipo_valor' => '$',\n 'orden' => 3,\n 'excento' => false,\n ],\n [\n 'clave' => 'DEVOLUCION',\n 'descripcion' => 'DEVOLUCIÓN POR DESCUENTO INDEBIDO',\n 'tipo' =>'PERCEPCION',\n 'tipo_valor' => '$',\n 'excento' => true,\n ],\n [\n 'clave' => 'AJUSTE',\n 'descripcion' => 'PRESTAMO POR AJUSTE',\n 'tipo' =>'PERCEPCION',\n 'tipo_valor' => '$',\n 'excento' => false,\n ],\n // DEDUCCIONES\n [\n 'clave' => 'ISR',\n 'descripcion' => 'ISR',\n 'tipo' =>'DEDUCCION',\n 'tipo_valor' => '$',\n 'editable' => false,\n 'visible' => false,\n 'categoria' =>'ISR'\n ],\n [\n 'clave' => 'AHORRO',\n 'descripcion' => 'FONAC',\n 'tipo' =>'DEDUCCION',\n 'aplica' => 'BASE,CONFIANZA',\n 'valor' => 234,\n 'tipo_valor' => '$',\n 'fijable' => true,\n 'editable' => false,\n 'auto' => true,\n 'categoria' =>'DEDUCCION PERSONAL'\n ],\n [\n 'clave' => 'ISSSTE',\n 'descripcion' => 'ISSSTE',\n 'tipo' =>'DEDUCCION',\n 'aplica' => 'BASE,CONFIANZA',\n 'valor' => 6.125,\n 'tipo_valor' => '%',\n 'fijable' => true,\n 'editable' => false,\n 'categoria' =>'ISSSTE',\n 'visible' => false,\n ],\n [\n 'clave' => 'SEG_MEDICO',\n 'descripcion' => 'SEGURO MEDICO ISSSTE',\n 'tipo' =>'DEDUCCION',\n 'aplica' => 'BASE,CONFIANZA',\n 'valor' => 4.5,\n 'tipo_valor' => '%',\n 'fijable' => true,\n 'editable' => false,\n 'categoria' =>'ISSSTE',\n 'visible' => false,\n ],\n [\n 'clave' => 'CUOTA_SIN',\n 'descripcion' => 'CUOTA SINDICAL',\n 'tipo' =>'DEDUCCION',\n 'aplica' => 'BASE',\n 'valor' => 2.5,\n 'tipo_valor' => '%',\n 'fijable' => true,\n 'editable' => false,\n 'visible' => false,\n ],\n [\n 'clave' => 'SEGURO_RETIRO',\n 'descripcion' => 'SEGURO DE RETIRO',\n 'tipo' =>'DEDUCCION',\n 'aplica' => 'BASE,CONFIANZA',\n 'valor' => 7.27,\n 'tipo_valor' => '$',\n 'fijable' => true,\n 'editable' => false,\n 'auto' => true\n ],\n [\n 'clave' => 'POTEN',\n 'descripcion' => 'POTENCIALIZACIÓN DEL SEGURO DE VIDA',\n 'tipo' =>'DEDUCCION',\n 'aplica' => 'BASE,CONFIANZA',\n 'tipo_valor' => '$',\n 'fijable' => true,\n 'editable' => true,\n 'auto' => true,\n ],\n [\n 'clave' => 'METLIFE',\n 'descripcion' => 'SEGURO DE VIDA INDIVIDUAL METLIFE',\n 'tipo' =>'DEDUCCION',\n 'aplica' => 'BASE,CONFIANZA',\n 'tipo_valor' => '$',\n 'fijable' => true,\n 'editable' => true\n ],\n [\n 'clave' => 'PCP',\n 'descripcion' => 'PRESTAMO A CORTO PLAZO',\n 'tipo' =>'DEDUCCION',\n 'aplica' => 'BASE,CONFIANZA',\n 'tipo_valor' => '$',\n 'fijable' => true,\n 'editable' => true\n ],\n [\n 'clave' => 'PHIPO',\n 'descripcion' => 'PRESTAMO HIPOTECARIO',\n 'tipo' =>'DEDUCCION',\n 'aplica' => 'BASE,CONFIANZA',\n 'tipo_valor' => '$',\n 'fijable' => true,\n 'editable' => true\n ],\n [\n 'clave' => 'ADEUDO_FINANZAS',\n 'descripcion' => 'ADEUDO A FINANZAS',\n 'tipo' =>'DEDUCCION',\n 'tipo_valor' => '$',\n 'fijable' => true,\n 'editable' => true\n ],\n [\n 'clave' => 'MUTUAL',\n 'descripcion' => 'FONDO MUTUALISTA SNTEA',\n 'tipo' =>'DEDUCCION',\n 'aplica' => 'BASE',\n 'tipo_valor' => '$',\n 'fijable' => true,\n 'editable' => true\n ],\n [\n 'clave' => 'FAR',\n 'descripcion' => 'FAR SNTEA',\n 'tipo' =>'DEDUCCION',\n 'aplica' => 'BASE',\n 'tipo_valor' => '$',\n 'valor' => 5,\n 'fijable' => true,\n 'editable' => true,\n 'auto' => true\n ],\n [\n 'clave' => 'PENSION_ALIMENTICIA',\n 'descripcion' => 'PENSIÓN ALIMENTICIA',\n 'tipo' =>'DEDUCCION',\n 'tipo_valor' => '$',\n 'fijable' => true,\n 'editable' => true,\n 'visible' => false\n ],\n [\n 'clave' => 'PAPELERIA',\n 'descripcion' => 'DESCUENTO PAPELERIA',\n 'tipo' =>'DEDUCCION',\n 'aplica' => 'BASE',\n 'tipo_valor' => '$',\n 'fijable' => true,\n 'editable' => true\n ],\n [\n 'clave' => 'FAMSA',\n 'descripcion' => 'FAMSA',\n 'tipo' =>'DEDUCCION',\n 'aplica' => 'BASE',\n 'tipo_valor' => '$',\n 'fijable' => true,\n 'editable' => true\n ],\n [\n 'clave' => 'ELECTRODOMESTICOS',\n 'descripcion' => 'ELECTRODOMESTICOS',\n 'tipo' =>'DEDUCCION',\n 'aplica' => 'BASE',\n 'tipo_valor' => '$',\n 'fijable' => true,\n 'editable' => true\n ],\n [\n 'clave' => 'FARMACIA',\n 'descripcion' => 'FARMACIA DEL MAGISTERIO',\n 'tipo' =>'DEDUCCION',\n 'aplica' => 'BASE',\n 'tipo_valor' => '$',\n 'fijable' => true,\n 'editable' => true\n ],\n ];\n\n foreach ($conceptos as $concepto) {\n CatalogoConcepto::firstOrCreate($concepto);\n }\n }", "title": "" }, { "docid": "aeebe1e41a2d110f6530c12cdcbfcd4a", "score": "0.5094581", "text": "private function getModelGeneralVehiculo()\r\n\t\t{\r\n\t\t\t$findModelVehiculo = null;\r\n\t\t\t$findModel = self::getModelGeneral();\r\n\t\t\tif ( count($findModel) > 0 ) {\r\n\t\t\t\t$findModelVehiculo = $findModel->andWhere('D.impuesto =:impuesto',[':impuesto' => 3]);\r\n\t\t\t}\r\n\t\t\treturn $findModelVehiculo;\r\n\t\t}", "title": "" }, { "docid": "e92b4e64381c09a71f8da2614df9defb", "score": "0.509453", "text": "public function getNombreRelacionado()\n {\n switch (get_class($this->userable)) {\n case 'App\\Empresa':\n return $this->userable->razon_social;\n break;\n case 'App\\Centro':\n return $this->userable->empresa->razon_social . \" \" . $this->userable->nombre;\n break;\n case 'App\\CompassRole':\n return __('Compass');\n break;\n default:\n return '';\n break;\n }\n }", "title": "" }, { "docid": "83d67e0f0996e14680d24bc66d21e1b0", "score": "0.5091711", "text": "private function getModelGeneralInmueble()\r\n\t\t{\r\n\t\t\t$findModelInmueble = null;\r\n\t\t\t$findModel = self::getModelGeneral();\r\n\t\t\tif ( count($findModel) > 0 ) {\r\n\t\t\t\t$findModelInmueble = $findModel->andWhere('D.impuesto =:impuesto',[':impuesto' => 2]);\r\n\t\t\t}\r\n\t\t\treturn $findModelInmueble;\r\n\t\t}", "title": "" }, { "docid": "b0be2d7eb8d6ab87789b1012e84a3b82", "score": "0.507856", "text": "public function modulo(){\n //segungo llave foranea de la tabla a relacionar ('tipo_info_id')\n //tercero llave principal de la tabla ('id')\n //return $this->belongsTo('App\\Post', 'foreign_key', 'other_key'); de muchos a uno\n return $this->belongsTo(Modulo::class,'modulo_id','id');\n }", "title": "" }, { "docid": "f24671e7b1f24f0eb6336a09d935bf35", "score": "0.50662076", "text": "public function obra()\n {\n return $this->belongsTo(Obra::class);\n }", "title": "" }, { "docid": "f01725fea1ea5e655c559a1fa9291f55", "score": "0.5060333", "text": "function model($cont,$name)\n {\n if (method_exists($cont, 'loadModel')) {\n $cont->loadModel($name);\n }\n }", "title": "" }, { "docid": "13e017c56f00d1de8ba1efeb53c6d1cb", "score": "0.50581884", "text": "public function buildRelations()\n {\n $this->addRelation('CompNutri', 'CompNutri', RelationMap::ONE_TO_MANY, array('numConst' => 'numConst', ), null, null, 'CompNutris');\n }", "title": "" }, { "docid": "b3fb14d455314d8faf73edd1a8ba424a", "score": "0.5057436", "text": "function __construct(){\n\t\t$table_name = 'person';\n\t\t$model = [\n\t\t\t'id' => [\n\t\t\t\t'type' => OModel::PK,\n\t\t\t\t'comment' => 'Id único de cada persona'\n\t\t\t],\n\t\t\t'name' => [\n\t\t\t\t'type' => OModel::TEXT,\n\t\t\t\t'size' => 50,\n\t\t\t\t'comment' => 'Nombre de la persona',\n\t\t\t\t'nullable' => false\n\t\t\t],\n\t\t\t'num_coffee' => [\n\t\t\t\t'type' => OModel::NUM,\n\t\t\t\t'comment' => 'Número de veces que ha bajado al café',\n\t\t\t\t'nullable' => false,\n\t\t\t\t'default' => 0\n\t\t\t],\n\t\t\t'num_pay' => [\n\t\t\t\t'type' => OModel::NUM,\n\t\t\t\t'comment' => 'Número de veces que ha pagado',\n\t\t\t\t'nullable' => false,\n\t\t\t\t'default' => 0\n\t\t\t],\n\t\t\t'num_special' => [\n\t\t\t\t'type' => OModel::NUM,\n\t\t\t\t'comment' => 'Número de viernes que ha bajado',\n\t\t\t\t'nullable' => false,\n\t\t\t\t'default' => 0\n\t\t\t],\n\t\t\t'num_special_pay' => [\n\t\t\t\t'type' => OModel::NUM,\n\t\t\t\t'comment' => 'Número de viernes que ha pagado',\n\t\t\t\t'nullable' => false,\n\t\t\t\t'default' => 0\n\t\t\t],\n\t\t\t'color' => [\n\t\t\t\t'type' => OModel::TEXT,\n\t\t\t\t'size' => 6,\n\t\t\t\t'comment' => 'Color para identificar a la persona',\n\t\t\t\t'nullable' => false\n\t\t\t],\n\t\t\t'score' => [\n\t\t\t\t'type' => OModel::FLOAT,\n\t\t\t\t'comment' => 'Puntuación de la persona',\n\t\t\t\t'nullable' => false,\n\t\t\t\t'default' => 0\n\t\t\t],\n\t\t\t'created_at' => [\n\t\t\t\t'type' => OModel::CREATED,\n\t\t\t\t'comment' => 'Fecha de creación del registro'\n\t\t\t],\n\t\t\t'updated_at' => [\n\t\t\t\t'type' => OModel::UPDATED,\n\t\t\t\t'comment' => 'Fecha de última modificación del registro'\n\t\t\t]\n\t\t];\n\n\t\tparent::load($table_name, $model);\n\t}", "title": "" }, { "docid": "9d8f8fcaaca4a9da512589a70c66c866", "score": "0.5057071", "text": "public function campo()\n {\n return $this->belongsTo(Campo::class);\n }", "title": "" }, { "docid": "2dd00d529fb647093575e983c6b0f7be", "score": "0.5056657", "text": "abstract protected function Relations();", "title": "" }, { "docid": "fa0b61c256023f1472ca4aaaea870380", "score": "0.5052798", "text": "abstract protected function getEntityNamePlural();", "title": "" }, { "docid": "ba08c9bde2594583c7cd177e11d9c3b5", "score": "0.50517195", "text": "abstract public function getCrudName(): string;", "title": "" }, { "docid": "72a51649138eb0f921a60534dc79aecb", "score": "0.5045664", "text": "public function relationNames()\r\n {\r\n return [\r\n 'jurusan',\r\n 'waliKelas',\r\n 'namaKelas',\r\n 'onKelasSiswas',\r\n 'siswas'\r\n ];\r\n }", "title": "" }, { "docid": "1c3cda317ed78ae4f5e7e2067b10c029", "score": "0.50440264", "text": "abstract public function linkModelField();", "title": "" }, { "docid": "bfd89f28c546a536f7b1f0bb55c7f0e7", "score": "0.5036336", "text": "public function especialidad() {\r\n\t\treturn $this->belongsTo('App\\Especialidad');\r\n\t}", "title": "" }, { "docid": "043b2e1597064b8c13965459cfe64138", "score": "0.5036044", "text": "public function relationNames()\n {\n return [\n 'boda',\n 'seccion',\n 'fotos'\n ];\n }", "title": "" }, { "docid": "43aa0273d77ddaa2ac5ca9aff238f674", "score": "0.5023697", "text": "abstract protected function getRelations();", "title": "" }, { "docid": "458cc1f3da9619762f59d021dca38fb6", "score": "0.50180644", "text": "public function buildRelations()\n {\n $this->addRelation('Articulo', 'Articulo', RelationMap::ONE_TO_MANY, array('idtipo' => 'idtipo', ), 'CASCADE', 'CASCADE', 'Articulos');\n }", "title": "" }, { "docid": "39d9168d1c403cb775651a7319c254ad", "score": "0.5017807", "text": "public function relacionAnteproyecto()\n {\n return $this->hasOne(Anteproyecto::class, 'PK_NPRY_IdMctr008', 'FK_NPRY_IdMctr008');\n }", "title": "" }, { "docid": "b60c6b6aabc0d2582b7cdebd46a68bb4", "score": "0.5015974", "text": "public function lnCaracteristicas()\n {\n return $this->hasMany('App\\Models\\LnCaracteristica','reg_impacto_id','id');\n }", "title": "" }, { "docid": "ac3403f164c85c4f5926c56cc0fc15ef", "score": "0.50007284", "text": "abstract function getModel( );", "title": "" }, { "docid": "f2b91c03e10c82f70a68c29769d7dc17", "score": "0.49979168", "text": "abstract function model();", "title": "" }, { "docid": "d82b403b82d3aa5a501a2eb0ede9236c", "score": "0.49962828", "text": "function __nominasComoOperador__sin_uso__(){\n return $this->belongsToMany('App\\Nominas', 'nominas_user', 'idUser', 'idNomina')\n ->withTimestamps()\n ->withPivot('titular', 'idRoleAsignado', 'idCaptador');\n }", "title": "" }, { "docid": "5c57b91560beffe216d9431ce9d942c2", "score": "0.49932483", "text": "public function getNom();", "title": "" }, { "docid": "917dddb3cd558a5ea5de4b391a8bd57b", "score": "0.49926725", "text": "public function titular()\n {\n return $this->belongsTo('CityBoard\\Entities\\Titular');\n }", "title": "" }, { "docid": "adda7acd1ac24241253b07164095690a", "score": "0.49925202", "text": "public function Idioma(){\n return $this->belongsTo(\"App\\Idioma\");\n }", "title": "" }, { "docid": "b6e33b0ba5e2dfd9e6168ffc92d105aa", "score": "0.49897712", "text": "function Subindice(){\n parent::Modelo();\n }", "title": "" }, { "docid": "48bb6060429f5d960aa6b44b227a9fca", "score": "0.4985653", "text": "function vistaPrenomina(){\n\t\t$nominasPeriodo \t\t= $this->CatalogosModel->periodoactualPrenomina();\n\t\t$conceptosConfig = $this->CatalogosModel->conceptosPrenominaExiste();\n\t\t$numconceptosConf = $conceptosConfig->num_rows;\n\t\trequire(\"views/prenomina/prenomina.php\");\n\t}", "title": "" }, { "docid": "e133a905352597fd22732c3d3c29a60f", "score": "0.49704912", "text": "public function relacion()\n\t{\n\t\treturn $this->belongsTo('relacion');\n\t}", "title": "" }, { "docid": "9d4cbdfea40e4c02c9a1d49a826f1710", "score": "0.49665207", "text": "public function getOperationRel();", "title": "" }, { "docid": "2f47b492c181cce6da73aa9a81deddf8", "score": "0.49610344", "text": "abstract public function getRelations();", "title": "" }, { "docid": "8a1c06fc186c9651dbb426df2f64d376", "score": "0.49576455", "text": "abstract protected function _getParentFkFieldName();", "title": "" }, { "docid": "8c324cb0f48fe0350f1157f5e8271f1a", "score": "0.49553826", "text": "public function prenom()\n{\nreturn $this->prenom;\n}", "title": "" }, { "docid": "85fa06701a9c961909e81298954636cc", "score": "0.49502957", "text": "public function common_type(){\n \treturn $this->belongsTo('App\\module\\common_type','ID_TYPE','ID_CAT');//belongsTo là quan hệ nhiều nhiều 1\n }", "title": "" }, { "docid": "1741a909d2aed1c6fcb0c11f44fc4532", "score": "0.49437544", "text": "public function relationNames()\n {\n return [\n 'instancia',\n 'user'\n ];\n }", "title": "" }, { "docid": "05b31d7fce3692e0a27b4073e7096a89", "score": "0.49353528", "text": "public static function getRelationName(): Name\n {\n return new Name('discography');\n }", "title": "" }, { "docid": "c6969aeead90a0f881155b1f434dcdb6", "score": "0.49318987", "text": "public function getTrinomialName() : string;", "title": "" }, { "docid": "df5bcd2d89891fe049cb9e71f70d9ae1", "score": "0.49307042", "text": "public function relationNames()\n {\n return [\n 'siswa',\n 'izinekskul',\n 'jadwalekskul'\n ];\n }", "title": "" }, { "docid": "5f8043a45101dd6f00ea3e505b49d2d5", "score": "0.49299273", "text": "public function relation(Request $request)\n {\n $slug = $this->getSlug($request);\n $page = $request->input('page');\n $on_page = 50;\n $search = $request->input('search', false);\n $dataType = Voyager::model('DataType')->where('slug', '=', $slug)->first();\n\n $method = $request->input('method', 'add');\n\n $model = app($dataType->model_name);\n if ($method != 'add') {\n $model = $model->find($request->input('id'));\n }\n\n $this->authorize($method, $model);\n\n $rows = $dataType->{$method.'Rows'};\n /** @var Carbon $filterBy */\n $filterBy = null;\n foreach ($rows as $key => $row) {\n if ($row->field === $request->input('type')) {\n\n $options = $row->details;\n /**\n * En esta sección, el valor de $model es el valor del Objeto a editar\n * que en este caso es Cfdi y del cual vamos a obtener su relación que\n * es BankTransaction\n */\n if (\n isset($options->filterBy) &&\n isset($options->filterBy->foreign) &&\n isset($options->filterBy->reference) &&\n isset($model->{$options->filterBy->foreign}) // Verificamos que el campo definido en foreign se encuentre en el Cfdi\n ) {\n $filterBy = $model->{$options->filterBy->foreign};\n debug($filterBy->toDateString());\n }\n // Load Model from Relation \"BankTransaction\"\n /** @var Model $model */\n $model = app($options->model);\n\n $skip = $on_page * ($page - 1);\n\n $additional_attributes = $model->additional_attributes ?? [];\n\n // Apply local scope if it is defined in the relationship-options\n if (isset($options->scope) && $options->scope != '' && method_exists($model, 'scope'.ucfirst($options->scope))) {\n $model = $model->{$options->scope}();\n }\n\n // If search query, use LIKE to filter results depending on field label\n if ($search) {\n // If we are using additional_attribute as label\n if (in_array($options->label, $additional_attributes)) {\n debug(\"searching\");\n if(isset($filterBy)) {\n // Vamos a optar ciegamente en que el campo indicado en \"reference\",\n // realmente existe en la relación en este caso \"BankTransfer\"\n $model = $model->whereMonth($options->filterBy->reference, \"=\", $filterBy->month);\n }\n $relationshipOptions = $model->get();\n $relationshipOptions = $relationshipOptions->filter(function ($model) use ($search, $options) {\n //debug($model->{$options->label});\n return stripos($model->{$options->label}, $search) !== false;\n });\n $total_count = $relationshipOptions->count();\n $relationshipOptions = $relationshipOptions->forPage($page, $on_page);\n } else {\n debug('What a fuck? Maybe from server search?');\n if(isset($filterBy)) {\n // Vamos a optar ciegamente en que el campo indicado en \"reference\",\n // realmente existe en la relación en este caso \"BankTransfer\"\n $model = $model->whereMonth($options->filterBy->reference, \"=\", $filterBy->month);\n }\n $total_count = $model->where($options->label, 'LIKE', '%'.$search.'%')->count();\n $relationshipOptions = $model->take($on_page)->skip($skip)\n ->where($options->label, 'LIKE', '%'.$search.'%')\n ->get();\n }\n } else {\n $total_count = $model->count();\n if(isset($filterBy)) {\n // Vamos a optar ciegamente en que el campo indicado en \"reference\",\n // realmente existe en la relación en este caso \"BankTransfer\"\n $model = $model->whereMonth($options->filterBy->reference, \"=\", $filterBy->month);\n }\n $relationshipOptions = $model->take($on_page)->skip($skip)->get();\n debug($relationshipOptions);\n }\n\n $results = [];\n\n if (!$row->required && !$search && $page == 1) {\n $results[] = [\n 'id' => '',\n 'text' => __('voyager::generic.none'),\n ];\n }\n\n // Sort results\n if (!empty($options->sort->field)) {\n if (!empty($options->sort->direction) && strtolower($options->sort->direction) == 'desc') {\n $relationshipOptions = $relationshipOptions->sortByDesc($options->sort->field);\n } else {\n $relationshipOptions = $relationshipOptions->sortBy($options->sort->field);\n }\n }\n\n foreach ($relationshipOptions as $relationshipOption) {\n $results[] = [\n 'id' => $relationshipOption->{$options->key},\n 'text' => $relationshipOption->{$options->label},\n ];\n }\n\n return response()->json([\n 'results' => $results,\n 'pagination' => [\n 'more' => ($total_count > ($skip + $on_page)),\n ],\n ]);\n }\n }\n\n // No result found, return empty array\n return response()->json([], 404);\n }", "title": "" }, { "docid": "48c66d5ed4cf3d78d50218901959e7ef", "score": "0.49214408", "text": "public function relacionamento()\n {\n Schema::create('carrinho', function (Blueprint $table) {\n $table->integer('id_produto')->unsigned();\n\n $table->foreign('id_produto')\n ->references('id')->on('produtos')\n ->onDelete('cascade');\n });\n }", "title": "" }, { "docid": "8d9d29389d3d1a71f4041cbaa6aee1b6", "score": "0.4917327", "text": "public function getName()\n {\n return 'personne';\n }", "title": "" }, { "docid": "88526219cc654fcd7bdeb23f86e60532", "score": "0.49147925", "text": "public function titulo()\n {\n return $this->belongsTo('App\\Titulo');\n }", "title": "" }, { "docid": "19bf8388cb515ca8d18f31a211d62878", "score": "0.49124676", "text": "public function responsabile()\n {\n return $this->belongsTo(Personale::class,'id_ab_resp','id_ab');\n }", "title": "" }, { "docid": "e94ff7c10f3622d2460c228fb77a8aa4", "score": "0.49095482", "text": "function local_tutores_cli_create_relationship($contextid) {\n $new_relationship = new stdClass();\n $new_relationship->name = 'Grupos de Tutoria';\n $new_relationship->contextid = $contextid;\n $new_relationship->description = 'Criado automáticamente pela ferramenta de migração de Grupos de Tutoria';\n //$new_relationship->component = 'local_tutores';\n //$new_relationship->idnumber = \"local_tutores_{$contextid}\";\n $new_relationship->tags = array('grupo_tutoria');\n\n return relationship_add_relationship($new_relationship);\n}", "title": "" }, { "docid": "f48bdde14093d51c1d43bb990ce207b9", "score": "0.49082598", "text": "public function lnImpacto()\n {\n return $this->belongsTo('App\\Models\\LnImpacto','reg_impacto_id','id');\n }", "title": "" }, { "docid": "0985fb838f271bc158312f94199018e7", "score": "0.4906718", "text": "protected abstract function model();", "title": "" }, { "docid": "488f0412bd8f295858fb306480bef00c", "score": "0.490625", "text": "function generalOntologyInfo() {\n $out=theTitle().'\n<p>We proudly present the reengineering along established semantic web\nconcepts of a small part of the <a\nhref=\"https://wumm-project.github.io/Ontology.html\" >TRIZ Ontology\nProject</a>. It\\'s a first hack, more detailed explanations will be comiled\n<a href=\"https://wumm-project.github.io/OntologyDetails\">elsewhere</a>.</p>\n\n<p>For the moment we compiled \n<ul> \n<li><a href=\"ontology.php?rdf=thesaurus\">A combined Thesaurus</a> </li>\n<li><a href=\"ontology.php?rdf=sparql\">A combined Glossary</a> (by some yet\nuncovered reason not all information is displayed) </li>\n<li><a href=\"ontology.php?rdf=Souchkov\">Souchkov\\'s Glossary</a> </li>\n<li><a href=\"ontology.php?rdf=VDI\">The VDI Glossary</a> </li>\n<li><a href=\"ontology.php?rdf=Matvienko\">Matvienko\\'s Glossary</a> </li>\n<li><a href=\"ontology.php?rdf=TOP\">The Glossary of the TRIZ Ontology\nProject</a> </li>\n<li><a href=\"ontology.php?rdf=Lippert\">Lippert\\'s Notes</a> </li>\n<li><a href=\"ontology.php?rdf=TopLevel\">Top Level Concepts</a> from the TRIZ\nOntology Project</li>\n<li><a href=\"ontology.php?rdf=OntoCards\">OntoCards</a> from the TRIZ Ontology\nProject</li>\n\n</ul> \nThe concepts from the different sources are tagged with different rdf:type,\nthat all are subtypes of skos:Concept to follow up their provenience. Some\nmore efforts are required to unify the URIs of the concepts between the\ndifferent sources.</p>\n\n<p>There is a link attached to each such concept that leads to the full\ninformation about that topic extracted from our <a\nhref=\"http://wumm.uni-leipzig.de:8891/sparql\">SPARQL Endpoint</a> including\nall direct successors (i.e. objects, where the given concept is the subject)\nand predecessors (i.e. subjects, where the given concept is the object). This\nallows for a first navigation through the full WUMM RDF Data stored so far.\n</p>\n\n<p>You can follow up secondary links in such a presentation to different\nconcepts in the WUMM RDF database to get a similar representation for those\nconcepts. In particular you can get listed all instances of a given RDF type,\ncalling the listing of that type, since the instances are predecessors of the\ntype for the predicate <tt>rdf:type</tt>.</p>\n\n<p>Links to sources outside the WUMM RDF database call the target page\ndirectly. For the moment this mainly concerns links to web pages (in Russian)\nof the <a href=\"https://triz-summit.ru/onto_triz\">TRIZ Ontology\nProject</a>.</p>\n\n';\n return '<div class=\"container\">'.$out.'</div>';\n}", "title": "" }, { "docid": "597a195067dcd4cdace07fd35d983ba5", "score": "0.4901308", "text": "public function buildRelations()\n\t{\n $this->addRelation('Horario', 'Horario', RelationMap::MANY_TO_ONE, array('horario_id' => 'id', ), 'SET NULL', null);\n $this->addRelation('Disciplina', 'Disciplina', RelationMap::MANY_TO_ONE, array('disciplina_id' => 'id', ), 'SET NULL', null);\n $this->addRelation('Professor', 'Professor', RelationMap::MANY_TO_ONE, array('professor_id' => 'id', ), 'SET NULL', null);\n $this->addRelation('Periodo', 'Periodo', RelationMap::MANY_TO_ONE, array('periodo_id' => 'id', ), 'SET NULL', null);\n $this->addRelation('Local', 'Local', RelationMap::MANY_TO_ONE, array('local_id' => 'id', ), 'SET NULL', null);\n $this->addRelation('Week', 'Week', RelationMap::MANY_TO_ONE, array('weekDay_id' => 'id', ), 'SET NULL', null);\n\t}", "title": "" }, { "docid": "77eba7ecabd87934c5af6bec1b5c4e2f", "score": "0.48947957", "text": "public function articles () //se establece la relacion con el modelo, no recibe parametro\n{\nreturn $this->hasMany(\"App\\Article\"); //se retorna el tipo de relacion 1.M y el nombre del modelo o clase \n//esto del lado de categoria, hay que establecerla del lado de article igual a la inversa.\n}", "title": "" }, { "docid": "5b8ef5f05d6d42eb194e3fe2cd48ef02", "score": "0.48918194", "text": "public function projectos()\n {\n return $this->belongsToMany(Projecto::class,'projecto__provincias__distritos');\n }", "title": "" }, { "docid": "9e3843a2de14a5382a5c63989b981be6", "score": "0.48887652", "text": "public function getConcept()\n {\n return $this->concept;\n }", "title": "" }, { "docid": "846547aa69d7c3d9da8b62e632221596", "score": "0.48835462", "text": "abstract protected function getModel();", "title": "" }, { "docid": "5d08360a94bb742381e1afc323c6c226", "score": "0.48833656", "text": "public function especialidad()\n\t{\n\t\treturn $this->belongsTo('App\\Especialidad');\n\t}", "title": "" }, { "docid": "922d00b946dc84b663ff233427d73395", "score": "0.48819813", "text": "public function colegio()\n {\n //Segundo argumento es el foreign key que está en la tabla actual, osea en la tabla alumnos se tiene al fk de la tabla colegios_idcolegio\n //El tercer argumento es necesario si o si, representa a la llave primaria de la tabla de donde se extraen los datos, en este caso de la tabla colegios\n return $this->belongsTo('App\\Escuela', 'colegios_idcolegio','idcolegio');\n }", "title": "" }, { "docid": "64e63761710706aefac3b2adbd1b1280", "score": "0.48794812", "text": "public function objetivos()\n {\n return $this->hasMany('Modules\\CorePlanification\\Entities\\Objetivo');\n }", "title": "" }, { "docid": "7ad6962a2ee8f4efe7d3e2c27d84bdb5", "score": "0.48793313", "text": "private function getRelationship($ro)\n {\n //initialisation to prevent logic error\n $related = $ro->relationships;\n\n if (!$related) $related = [];\n\n foreach ($related as &$rel) {\n foreach ($rel['docs'] as &$doc) {\n $doc['display_relationship'] = [];\n if (array_key_exists('relation', $doc)) {\n foreach ($doc['relation'] as $index => $docRelation) {\n $origin = 'EXPLICIT';\n if (isset($doc['relation_origin'][$index])) {\n $origin = $doc['relation_origin'][$index];\n }\n $doc['display_relationship'][] = readable($docRelation, $origin, $doc['from_class'], $doc['to_class']);\n }\n }\n $doc['display_relationship'] = array_unique($doc['display_relationship']);\n $doc['display_relationship'] = implode(', ', $doc['display_relationship']);\n $doc['display_description'] = '';\n }\n\n }\n\n // search class for constructing search queries\n $searchClass = $ro->core['class'];\n if ($ro->core['class'] == 'party') {\n if (strtolower($ro->core['type']) == 'group') {\n $searchClass = 'party_multi';\n } else {\n $searchClass = 'party_one';\n }\n }\n\n // construct the correct search query for each type of related\n $relatedArray = ['data', 'software','programs', 'grants_projects', 'services', 'organisations', 'researchers'];\n foreach ($relatedArray as $rr) {\n $query = [];\n switch ($rr) {\n case \"data\":\n $query = ['related_' . $searchClass . '_id' => $ro->id, 'class' => 'collection', 'collection_type' => '-type:software','sort' => 'score desc'];\n break;\n case \"software\":\n $query = ['related_' . $searchClass . '_id' => $ro->id, 'class' => 'collection', 'type' => 'software', 'sort' => 'score desc'];\n break;\n case \"programs\":\n $query = ['related_' . $searchClass . '_id' => $ro->id, 'class' => 'activity', 'type' => 'program', 'sort' => 'score desc'];\n break;\n case \"grants_projects\":\n $query = ['related_' . $searchClass . '_id' => $ro->id, 'class' => 'activity', 'nottype' => 'program', 'sort' => 'score desc'];\n break;\n case \"services\":\n $query = ['related_' . $searchClass . '_id' => $ro->id, 'class' => 'service', 'sort' => 'score desc'];\n break;\n case \"organisations\";\n $query = ['related_' . $searchClass . '_id' => $ro->id, 'class' => 'party', 'type' => 'group', 'sort' => 'score desc'];\n break;\n case \"researchers\":\n $query = ['related_' . $searchClass . '_id' => $ro->id, 'class' => 'party', 'nottype' => 'group', 'sort' => 'score desc'];\n break;\n }\n $related[$rr]['searchUrl'] = constructPortalSearchQuery($query);\n\n // fix count in case not all records are synced correctly\n if (array_key_exists('count', $related[$rr]) && $related[$rr]['count'] > 5) {\n $related[$rr]['count'] = $this->getSolrCountForQuery($query);\n } elseif (!array_key_exists('count', $related[$rr])) {\n $related[$rr]['count'] = 0;\n }\n\n if (!array_key_exists('docs', $related[$rr])) {\n $related[$rr]['docs'] = [];\n }\n\n if ($rr == \"researchers\" || $rr == \"organisations\") {\n $related[$rr]['docs'] = $this->researcherSort($related[$rr]['docs']);\n }\n }\n\n // Fix duplicate researchers display value TODO: investigate why\n $related['researchers']['docs'] = collect($related['researchers']['docs'])\n ->unique()->toArray();\n\n return $related;\n }", "title": "" } ]
8d8b534f0269ba06fc6106ed6bcbde20
/ Helper function to prepare an array of references
[ { "docid": "f201fb3507526c3baeff8f46794ac2d1", "score": "0.6458689", "text": "function refValues($arr){\n if (strnatcmp(phpversion(),'5.3') >= 0) //Reference is required for PHP 5.3+ \n {\n $refs = array(); \n foreach($arr as $key => $value) \n $refs[$key] = &$arr[$key]; \n return $refs; \n } \n return $arr; \n}", "title": "" } ]
[ { "docid": "021ece804ce7bdebcd1767b43fce724c", "score": "0.73592097", "text": "function makeRefs($array) {\n\t$refs = array();\n\tforeach ($array as $key => $val) {\n\t\t$refs[$key] = &$array[$key];\n\t}\n\treturn $refs;\n}", "title": "" }, { "docid": "20bb2d1f4a54e9fe339cd07f4920b4fe", "score": "0.68878514", "text": "function get_references($references)\n {\n $ref = utf8_encode($reference['reference']);\n if(Functions::is_utf8($ref)) $refs[] = array(\"url\" => $reference['url'], \"fullReference\" => Functions::import_decode($ref));\n }", "title": "" }, { "docid": "c4178eece5029d42457f71d003748399", "score": "0.66811806", "text": "function refValues($arr)\n { \n $refs = array();\n\n foreach ($arr as $key => $value)\n {\n $refs[$key] = &$arr[$key]; \n }\n\n return $refs; \n }", "title": "" }, { "docid": "9ad06f909bd03f5f85874e44e2cf9765", "score": "0.6573604", "text": "abstract public function & getArrayReference();", "title": "" }, { "docid": "d3efbaab889076a4cf14ffac5f4c9e8f", "score": "0.657219", "text": "private function refValues($values) {\n $refs = array();\n\n foreach ($values as $key => $value)\n {\n $refs[$key] = &$values[$key]; \n }\n\n return $refs; \n }", "title": "" }, { "docid": "46ae6382b645dcd87ad0d4cc31e7acfc", "score": "0.6456595", "text": "function referenced_entries() {\n $fields = $this->table->fields();\n $result = array();\n\n $data = $this->data();\n foreach ($fields as $field) {\n if ($data[$field->id] && isset($field->def['backreference'])) {\n $ref_table = explode(':', $field->def['backreference'])[0];\n if ($field->is_multiple()) {\n foreach ($data[$field->id] as $d) {\n $result[] = array($ref_table, $d);\n }\n }\n else {\n $result[] = array($ref_table, $data[$field->id]);\n }\n }\n elseif ($data[$field->id] && isset($field->def['reference'])) {\n if ($field->is_multiple()) {\n foreach ($data[$field->id] as $d) {\n $result[] = array($field->def['reference'], $d);\n }\n }\n else {\n $result[] = array($field->def['reference'], $data[$field->id]);\n }\n }\n }\n\n return $result;\n }", "title": "" }, { "docid": "3e8aec70cf5cfc995f0d4bfaf63f0d9b", "score": "0.6439217", "text": "function array_references($array, $plain = false)\n{\n\t$references = [];\n\n\tforeach ($array as $key => $value)\n\t{\n\t\tif (!$plain) $references[$key] = &$array[$key];\n\t\telse $references[] = &$array[$key];\n\t}\n\n\treturn $references;\n}", "title": "" }, { "docid": "b5ab17cb1b6fd190d71fa0af233b8e8f", "score": "0.643557", "text": "private function refValues($arr){\n $refs = array();\n foreach ($arr as $key => $value){\n $refs[$key] = &$arr[$key];\n }\n return $refs;\n }", "title": "" }, { "docid": "8e763d4a2691c039fe06a8530e01cfe2", "score": "0.6304661", "text": "public function getReference() {\n \t\treturn array();\n \t}", "title": "" }, { "docid": "c5035dc1c049c33fae5b8fc3697e751b", "score": "0.6286889", "text": "private function refValues( $arr ) {\n\t\t$refs = array();\n\t\tforeach ( $arr as $key => $value ) {\n\t\t\t$refs[$key] = & $arr[$key];\n\t\t}\n\t\treturn $refs;\n\t}", "title": "" }, { "docid": "21027b59dae468122caebce24eaa5a3c", "score": "0.626146", "text": "protected function refValues($arr)\n {\n //Reference is required for PHP 5.3+\n if (strnatcmp(phpversion(), '5.3') >= 0) {\n $refs = array();\n foreach ($arr as $key => $value) {\n $refs[$key] = & $arr[$key];\n }\n return $refs;\n }\n return $arr;\n }", "title": "" }, { "docid": "b94c78483e1f83ae91371c914d41249c", "score": "0.61750704", "text": "private function collectReferences(array &$data)\n {\n foreach ($this->referenceKeys as $key) {\n //Adding reference(s)\n $this->references[$key][$data[$key]][] = &$data;\n }\n }", "title": "" }, { "docid": "d047bacaf713c1e3c7df573acca1d5d9", "score": "0.6095152", "text": "public function resetRefArrays() {\n\t\t$fpos=0;\n\t\t$this->codeInstructions=array();\n\t\t$this->fileInstructions=array();\n\t\tksort($this->instructions);\t//sort by key order; modifying elements will shift the element to the end and confuse foreach\n\t\t$this->instructions=array_merge($this->instructions); //remove \"holes\" due to removed elements\n\t\tforeach($this->instructions as $index=>$obj) {\n//\t\t\tlog_msg(\"Processing index %d, asm is %s\",$index,$obj->getASM());\n\t\t\t$obj->setIndex($index);\n\t\t\t$obj->setASMObj($this);\n\t\t\tif($obj instanceof Instr_generic_comment) //comments don't end up in the ref-arrays\n\t\t\t\tcontinue;\n\t\t\t$codeindex=sizeof($this->codeInstructions);\n\t\t\t$this->codeInstructions[$codeindex]=&$this->instructions[$index];\n\t\t\t$obj->setCodeIndex($codeindex);\n\t\t\t\n\t\t\t$obj->setFpos($fpos);\n\t\t\t$numBytes=strlen($obj->getBytes());\n\t\t\tfor($i=$fpos;$i<$fpos+$numBytes;$i++)\n\t\t\t\t$this->fileInstructions[$i]=&$this->instructions[$index];\n\t\t\t$fpos+=$numBytes;\n\t\t}\n//\t\tforeach($this->codeInstructions as $index=>$obj)\n//\t\t\tlog_msg(\"Code instruction %d: %s\",$index,$obj->getASM());\n\t}", "title": "" }, { "docid": "bc52734f0b24553b50daa2e05434585b", "score": "0.60659844", "text": "function refValues($arr){\r\n\tif (strnatcmp(phpversion(),'5.3') >= 0) {\r\n\t\t$refs = array();\r\n\t\tforeach($arr as $key => $value)\r\n\t\t\t$refs[$key] = &$arr[$key];\r\n\t\treturn $refs;\r\n\t}\r\n\treturn $arr;\r\n}", "title": "" }, { "docid": "4dd147101b9eb37d8ae6d9549c48e6a0", "score": "0.60617214", "text": "public function referred(): array;", "title": "" }, { "docid": "6ee60cd550124ab50ca20a582a1747ee", "score": "0.6044202", "text": "public function getReferences();", "title": "" }, { "docid": "f5c40ae63a206902ba1b946b065d19e2", "score": "0.59270674", "text": "public function getReferences()\n {\n return $this->normalizeReferences($this->getRawValues('references'));\n }", "title": "" }, { "docid": "6294354c63de94639808d90d06b9c4fc", "score": "0.5823189", "text": "protected function _ref_values($array)\n {\n if (strnatcmp(phpversion(),'5.3') >= 0)\n {\n $refs = array();\n foreach($array as $key => $value)\n {\n $refs[$key] = &$array[$key];\n }\n return $refs;\n }\n return $array;\n }", "title": "" }, { "docid": "3c97d7a4c475afaf1e8d38cb95def41c", "score": "0.5810254", "text": "protected function convertReferences($references){\n $sourceReferences = array();\n foreach($references as $reference){\n $sourceReferences[] = $this->convertReference($reference);\n }\n return $sourceReferences;\n }", "title": "" }, { "docid": "b1a9bbaf1af2b7564bf1dfc3d113f9c4", "score": "0.57431144", "text": "public function getInternalReferences(): array\n {\n return $this->internalReferences;\n }", "title": "" }, { "docid": "2e1e42f26081eb1524d139b3901a01f4", "score": "0.5740119", "text": "public static function &arrayDynamicRef(array &$a, array $indexList)\n\t{\n\t\t$out =& $a;\n\t\tforeach($indexList as $i)\n\t\t{\n\t\t\t$out =& $out[$i];\n\t\t}\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "43c3084eb6c3b039c21a4838d09c05b5", "score": "0.5698131", "text": "public function mapReferenceFields(array $ids, string $refName): array\n {\n return array_map(\n function (int $id) use ($refName): string {\n return $this->makeReferenceField((string) $id, $refName);\n },\n $ids\n );\n }", "title": "" }, { "docid": "ded0b7a2588a2981051f5e072c8599d1", "score": "0.56638664", "text": "protected function _getReferenceMapNormalized() {\n\t\t$referenceMapNormalized = array ();\n\t\t\n\t\tforeach ( $this->_referenceMap as $rule => $map ) {\n\t\t\t\n\t\t\t$referenceMapNormalized [$rule] = array ();\n\t\t\t\n\t\t\tforeach ( $map as $key => $value ) {\n\t\t\t\tswitch ($key) {\n\t\t\t\t\t\n\t\t\t\t\t// normalize COLUMNS and REF_COLUMNS to arrays\n\t\t\t\t\tcase self::COLUMNS :\n\t\t\t\t\tcase self::REF_COLUMNS :\n\t\t\t\t\t\tif (! is_array ( $value )) {\n\t\t\t\t\t\t\t$referenceMapNormalized [$rule] [$key] = array (\n\t\t\t\t\t\t\t\t\t$value \n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$referenceMapNormalized [$rule] [$key] = $value;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\t// other values are copied as-is\n\t\t\t\t\tdefault :\n\t\t\t\t\t\t$referenceMapNormalized [$rule] [$key] = $value;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $referenceMapNormalized;\n\t}", "title": "" }, { "docid": "000ea4154a90c1a8f07bbbf6d9f57007", "score": "0.565589", "text": "public function getDBRef (array $ref) {}", "title": "" }, { "docid": "000ea4154a90c1a8f07bbbf6d9f57007", "score": "0.565589", "text": "public function getDBRef (array $ref) {}", "title": "" }, { "docid": "000ea4154a90c1a8f07bbbf6d9f57007", "score": "0.565589", "text": "public function getDBRef (array $ref) {}", "title": "" }, { "docid": "7e33c26212cc520376319386fbe7993d", "score": "0.5634247", "text": "private static function explodeRef(string $ref): array {\n return array_map([self::class, 'unescapeRef'], explode('/', $ref));\n }", "title": "" }, { "docid": "61706da17185e11e47f31e4dc0013e93", "score": "0.5576912", "text": "public function getReferencesBroken() {\n $arr = [];\n foreach($this->list as $ref) {\n if($ref instanceof ReferenceGroup) {\n $inner = $ref->getList()->getReferencesBroken();\n foreach($inner as $in) {\n $arr[] = $in;\n }\n }\n else {\n $arr[] = $ref;\n }\n }\n return $arr;\n }", "title": "" }, { "docid": "6b55dbbe9b1166bbf01906e28eb42990", "score": "0.55567265", "text": "public function getReferenceParameters() {\r\n\t\treturn unserialize($this->getFieldValue('reference'));\r\n\t}", "title": "" }, { "docid": "158bf02ffa6291e69d73c688b9c959a5", "score": "0.5551177", "text": "private function process_taxa_references()\n {\n $fields = array(\"reference\", \"bici\", \"coden\", \"doi\", \"eissn\", \"handle\", \"isbn\", \"issn\", \"lsid\", \"oclc\", \"sici\", \"url\", \"urn\", \"int_id\", \"timestamp\", \"autoctr\");\n $taxon_references = self::make_array($this->text_path['TAXON_REFERENCES_PATH'], $fields, \"int_id\", array(1,2,3,4,5,7,8,9,10,12,14,15));\n foreach($taxon_references as $taxon_id => $refs) //taxon_id is int_id in FB text file\n {\n $reference_ids = self::create_references($refs);\n $this->taxa_reference_ids[$taxon_id] = $reference_ids;\n }\n }", "title": "" }, { "docid": "8979ccfaed765f385bbaa31def6ee049", "score": "0.55364525", "text": "private function getReferences(array $content) {\n $references = [];\n\n if (isset($content['_embedded'])) {\n foreach ($content['_embedded'] as $link) {\n foreach ($link as $reference) {\n $uuid = $reference['uuid'][0]['value'];\n $path = $this->getPathToFileByName($uuid);\n\n if ($path) {\n $references[] = $this->files[$path];\n }\n }\n }\n }\n\n return $references;\n }", "title": "" }, { "docid": "b0146866067efef5713e1291bfc0fcb3", "score": "0.5511168", "text": "protected function mapReferences(array $payload, Collection $references)\n {\n if($references->count() == 0) return $payload;\n\n Arr::set($payload, 'References', [\n '@attributes' => ['Type' => 'Array'],\n ]);\n\n $references->each(function (Entities\\Reference $reference) use (&$payload) {\n array_push($payload['References'], $this->serializeReference($reference));\n });\n\n return $payload;\n }", "title": "" }, { "docid": "d3f26535358ffab53624ef15b8775a7b", "score": "0.5510752", "text": "public function getSubreferences($reference, $from = \"replacement\"){\n\t \n\t foreach ($reference->$from->references as $reference_2){\n\t \t$subreferences[] = $reference_2;\n\t }\n\t if (!empty($subreferences)){\n\t \t$reference->subreferences = collect($subreferences);\n\t }\n\t \n\t return $reference;\n }", "title": "" }, { "docid": "a9a83fb47bc41f92b287167e3fa9d799", "score": "0.54995096", "text": "protected function normalizeReferences($references)\n {\n return array_map(\n 'array_unique',\n array_filter(\n (array)$references,\n function ($ids) {\n return is_array($ids) && $ids;\n }\n )\n );\n }", "title": "" }, { "docid": "f437946ca128bc55379fbfc1e4a4165f", "score": "0.54800946", "text": "function &getArrayValueReference( &$array, $arrayKeys, $create = false )\n{\n /* get array entry from first key in list */\n $currentKey = array_shift( $arrayKeys );\n if( !isset( $array[$currentKey] ) )\n {\n if( $create == true )\n {\n $array[$currentKey] = array();\n }\n else\n {\n return null;\n }\n }\n $array = &$array[$currentKey];\n\n /* if there are any keys left, move down one level */\n if( count( $arrayKeys ) > 0 && is_array( $array ) )\n {\n return getArrayValueReference( $array, $arrayKeys, $create );\n }\n\n return $array;\n}", "title": "" }, { "docid": "b6dfd703a0cab65cca75a8521b632ed8", "score": "0.5466118", "text": "public function setReferenceMap() {\n\t\treturn array();\n\t}", "title": "" }, { "docid": "ac983c0ee1550838a21b9d3fe7cbfe70", "score": "0.53710276", "text": "private function _setReferenceProperties( array &$properties ) \n {//-------------------->> _setReferenceProperties()\n \n foreach ( $properties as $property => $value ) {//---------->> for each object's property\n \n if ( is_array( $value ) ) {//---------->> if value is an array\n \n if ( !isset( $value[ 'ref' ] ) ) {//---------->> if value is a reference\n \n $this->_setReferenceProperties( $value );\n $properties[ $property ] = $value;\n \n } else {//---------->> else if value is not a reference\n $properties[ $property ] = $this->get( $value[ 'ref' ] );\n }//---------->> End else if value is not a reference\n \n }//---------->> End if value is an array\n \n }//---------->> End for each object's property\n \n }", "title": "" }, { "docid": "7e227a54aac38eff33ff22c1cf6d3be4", "score": "0.53690237", "text": "function Reference() {\n global $NodesA, $NumNodes, $NodeX;\n global $LocLabelToIdA; # [label => [[id, TAFTT_Element | TAFTT_Label | TAFTT_Reference | TAFTT_Role]]] can have multiple entries for the same label\n $node = $NodesA[$NodeX];\n if (@$node['attributes']['xlink:type'] != 'resource') DieNow('reference type not resource');\n if (!@$label = $node['attributes']['xlink:label']) DieNow('reference xlink:label attribute not set');\n if (@$txt = $node['txt']) DieNow('reference txt is set');\n $set = '';\n foreach ($node['attributes'] as $a => $v) {\n switch ($a) {\n case 'xlink:type': break; # skip\n case 'id': break; # SetIdDef($v, $set); break; # IdId Removed 08.10.12 as not used\n case 'xlink:label': # set to $label above\n break; # skip\n case 'xlink:role': SetRole($v, $set, 'reference'); break; # SetRole($roleURI, &$callingSet, $usedOn) ==> RoleId=RoleId# in $set\n default: DieNow(\"unknown reference attribute $a\");\n }\n }\n $depth1 = $node['depth']+1;\n #$refsA = $RefsA; # copy of the possible references with those elements that have values to be kept for jasonising, others to be zapped\n #while (($NodeX+1) < $NumNodes && $NodesA[$NodeX+1]['depth'] == $depth1) {\n # $node = $NodesA[++$NodeX];\n # $tag = $node['tag'];\n # if (($p=strpos($tag, ':')) === false) DieNow(\"Reference subnode without expected :\");\n # $tag = substr($tag, $p+1);\n # if (!isset($refsA[$tag])) DieNow(\"unknown reference subnode $tag from \".$NodesA[$NodeX]['tag']);\n # if (isset($node['txt']))\n # $refsA[$tag] .= ', ' . $node['txt']; # addslashes() only to the completed json via SetText() or any \\ gets slashed\n #}\n #foreach ($refsA as $a => $v)\n # if ($v)\n # $refsA[$a] = substr($v,2);\n # else\n # unset($refsA[$a]);\n # 2018.10.21 Changed to accept any reference subnodes\n $refsA = [];\n while (($NodeX+1) < $NumNodes && $NodesA[$NodeX+1]['depth'] == $depth1) {\n $node = $NodesA[++$NodeX];\n if (isset($node['txt'])) {\n $tag = $node['tag'];\n if (($p=strpos($tag, ':')) === false) DieNow(\"Reference subnode $tag without expected :\");\n $tag = substr($tag, $p+1);\n if (isset($refsA[$tag]))\n $refsA[$tag] .= ', ' . $node['txt']; # addslashes() only to the completed json via SetText() or any \\ gets slashed\n else\n $refsA[$tag] = $node['txt'];\n }\n }\n SetText(json_encode($refsA), $set); # associative array is encoded as an object\n $id = InsertFromLinkbase('Resources', $set);\n $LocLabelToIdA[$label][] = [$id, TAFTT_Reference]; # [label => [[id, TAFTT_Element | TAFTT_Label | TAFTT_Reference | TAFTT_Role]]] can have multiple entries for the same label\n}", "title": "" }, { "docid": "f886cb0d7d9d67a2e30dc5cb44595ac5", "score": "0.5348179", "text": "static function getObjectReferences( $object_it )\n\t{\n \t $references = array();\n \n \t $object = getFactory()->getObject('ProjectPage');\n \t $object->addFilter( new FilterInPredicate($object_it->idsToArray()) );\n \t $object->setSortDefault( new SortDocumentClause() );\n \t $references[] = $object;\n \t \n \t $attachment = getFactory()->getObject('WikiPageFile');\n\t\t$attachment->addFilter( new FilterAttributePredicate('WikiPage', $object_it->idsToArray()) );\n\t\t$references[] = $attachment;\n\n \t $changes = getFactory()->getObject('WikiPageChange');\n\t\t$changes->addFilter( new FilterAttributePredicate('WikiPage', $object_it->idsToArray()) );\n\t\t$references[] = $changes;\n\t\t\n\t\t$comment = getFactory()->getObject('Comment');\n\t\t$comment->addFilter( new CommentObjectFilter($object_it) );\n\t\t$references[] = $comment;\n\n\t\treturn $references;\n\t}", "title": "" }, { "docid": "420ebc5c5c9a814d993ad1b214d118db", "score": "0.5330321", "text": "private function fixJsonSchemaRefs(array $jsonSchema) : array\n {\n array_walk_recursive($jsonSchema, function (&$value, $key) {\n if ('$ref' === $key) {\n $value = str_replace('#/components/schemas/', '#/definitions/', $value);\n }\n });\n\n return $jsonSchema;\n }", "title": "" }, { "docid": "ec7265191a20d7d77777802e96ed584b", "score": "0.5304657", "text": "private static function arrayify( &$val ) {\n }", "title": "" }, { "docid": "be158cfa176cacb2572e5b3a978f679b", "score": "0.5283153", "text": "public function resetReferences()\n {\n }", "title": "" }, { "docid": "0de4a6e74e037b9105ef4b9fc29615d3", "score": "0.5279604", "text": "protected function sourceRelations(): array\n {\n return [\n '1' => [],\n '2' => [],\n '3' => ['1'],\n '4' => ['1'],\n '5' => ['2', '4', '11'],\n // cyclic dependencies - to failure\n '91' => ['1', '92'],\n '92' => ['3', '91'],\n '93' => ['92'],\n ];\n }", "title": "" }, { "docid": "d1591c5aa880edbd3a8f80be1dc1211c", "score": "0.52721846", "text": "public function getArrayCopy() \n {\n $idCategorie = $this->getRefCategorie();\n if(!(empty($idCategorie)))\n $idCategorie=$idCategorie->getId();\n\n $idActivite = $this->getRefActivite();\n if(!(empty($idActivite)))\n $idActivite=$idActivite->getId();\n\n $idModeReglement = $this->getRefModeReglement();\n if(!(empty($idModeReglement)))\n $idModeReglement=$idModeReglement->getId();\n\n $idConditionReglement = $this->getRefConditionReglement();\n if(!(empty($idConditionReglement)))\n $idConditionReglement=$idConditionReglement->getId();\n\n $idPoste = $this->getRefPosteParDefaut();\n if(!(empty($idPoste)))\n $idPoste=$idPoste->getId();\n\n return array(\n 'id_fournisseur' => $this->getId(),\n 'code_fournisseur' => $this->getCodeFournisseur(),\n 'code_client' => $this->getCodeClient(),\n 'raison_sociale' => $this->getRaisonSociale(),\n 'telephone' => $this->getTelephone(),\n 'fax' => $this->getFax(),\n 'site_web' => $this->getSiteWeb(),\n 'email' => $this->getEmail(),\n 'numero_tva' => $this->getNumeroTva(),\n 'numero_ape' => $this->getNumeroApe(),\n 'numero_siret' => $this->getNumeroSiret(),\n 'actif' => $this->getActif(),\n 'supprime' => $this->getSupprime(),\n 'ref_categorie' => $idCategorie,\n 'ref_activite' => $idActivite,\n 'ref_mode_reglement' => $idModeReglement,\n 'ref_condition_reglement' => $idConditionReglement,\n 'ref_poste_par_defaut' => $idPoste\n );\n }", "title": "" }, { "docid": "7f0adf3a38c07c1feb293f1a57bec4a4", "score": "0.5247557", "text": "public function getRefs()\n {\n return $this->refs;\n }", "title": "" }, { "docid": "2e1db032aebcf034c269ea9894fff2dc", "score": "0.5239109", "text": "function setHeaderLinkArray($array = array()) {\n\n // Roll through the generic 'link' stuffarray.\n $ret = array();\n foreach ($array as $array_type => $array_parts) {\n $parts = array();\n foreach ($array_parts as $key => $value) {\n if ($key == 'href') {\n if (!filter_var($value, FILTER_VALIDATE_URL)) {\n $value = BASE_URL . $value;\n }\n }\n $parts[] = $key . '=\"' . $value . '\"';\n }\n // $ret[$array_type] = sprintf('<!-- %s link_items -->', $type);\n $ret[$array_type] = sprintf('<link %s />', join(' ', $parts));\n }\n\n return $ret;\n\n }", "title": "" }, { "docid": "d597feb1e82d090cdcd2f2cd7f70c710", "score": "0.52378005", "text": "public function getExternalReferences(): array\n {\n return $this->externalReferences;\n }", "title": "" }, { "docid": "05a8198ccc4bb7a806c43dc433f72bb6", "score": "0.52284324", "text": "function git_ref_list($project, $tags = true, $heads = true, $remotes = true)\n{\n\t$cmd = \"show-ref --dereference\";\n\tif (!$remotes) {\n\t\tif ($tags) { $cmd .= \" --tags\"; }\n\t\tif ($heads) { $cmd .= \" --heads\"; }\n\t}\n\n\t$result = array();\n\t$output = run_git($project, $cmd);\n\tforeach ($output as $line) {\n\t\t// <hash> <ref>\n\t\t$parts = explode(' ', $line, 2);\n\t\t$name = str_replace(array('refs/', '^{}'), array('', ''), $parts[1]);\n\t\t$result[$parts[0]][] = $name;\n\t}\n\treturn $result;\n}", "title": "" }, { "docid": "3b4dc20aa3211279a0a8e07ee7200ee3", "score": "0.52223253", "text": "public function relationsToArray()\n {\n \tthrow new MethodNotSupportedException('This method not supported on a Definition object.');\n }", "title": "" }, { "docid": "e386de162619d9ae1cc9ce7ba26e9dc4", "score": "0.5193252", "text": "public function rebuild() : array {}", "title": "" }, { "docid": "2beb5e018d47524d5bd762c894f00b21", "score": "0.51524335", "text": "function force_refs($table = 'ticket') {\n\n\t$db =& database_object_factory();\n\n\t$db->query(\"SELECT id FROM $table WHERE !ref\");\n\twhile ($res = $db->row_array()) {\n\t\t$process[] = $res['id'];\n\t}\n\n\tforeach($process AS $id) {\n\t\t$db->query(\"UPDATE $table SET ref = '\" . $db->escape(make_table_ref($table)) . \"' WHERE id = \" . intval($id));\n\t}\n}", "title": "" }, { "docid": "f766b169ab827678874438d328f4f44b", "score": "0.5128097", "text": "function dataset_person_ref_fields() {\n $dataset_person_ref_fields = array(\n 'field_dataset_owner_ref' => 'Owner',\n 'field_dataset_contact_ref' => 'Contact',\n 'field_dataset_datamanager_ref' => 'Data Manager',\n 'field_dataset_ext_assoc_ref' => 'Associated Researcher',\n 'field_dataset_fieldcrew_ref' => 'Field Crew',\n 'field_dataset_labcrew_ref' => 'Lab Crew',\n );\n return $dataset_person_ref_fields;\n}", "title": "" }, { "docid": "57a88f0d55822c242dd70df7926da824", "score": "0.511844", "text": "public function getValidRefAttributes(): array\n {\n return [\n 'Prefix (absent) and bound to default namespace' => [\n 'element_ref_0009.xsd', \n [\n '' => 'http://example.org', \n 'xs' => 'http://www.w3.org/2001/XMLSchema', \n ], \n 'http://example.org', \n 'foo', \n ], \n 'Prefix and local part (starts with _)' => [\n 'element_ref_0010.xsd', \n [\n 'xs' => 'http://www.w3.org/2001/XMLSchema', \n 'baz' => 'http://example.org/baz', \n ], \n 'http://example.org/baz', \n '_foo', \n ], \n 'Prefix and local part (starts with letter)' => [\n 'element_ref_0011.xsd', \n [\n 'xs' => 'http://www.w3.org/2001/XMLSchema', \n 'baz' => 'http://example.org/baz', \n ], \n 'http://example.org/baz', \n 'f', \n ], \n 'Prefix and local part (contains letter)' => [\n 'element_ref_0012.xsd', \n [\n 'xs' => 'http://www.w3.org/2001/XMLSchema', \n 'baz' => 'http://example.org/baz', \n ], \n 'http://example.org/baz', \n 'foo', \n ], \n 'Prefix and local part (contains digit)' => [\n 'element_ref_0013.xsd', \n [\n 'xs' => 'http://www.w3.org/2001/XMLSchema', \n 'baz' => 'http://example.org/baz', \n ], \n 'http://example.org/baz', \n 'f00', \n ], \n 'Prefix and local part (contains .)' => [\n 'element_ref_0014.xsd', \n [\n 'xs' => 'http://www.w3.org/2001/XMLSchema', \n 'baz' => 'http://example.org/baz', \n ], \n 'http://example.org/baz', \n 'f.bar', \n ], \n 'Prefix and local part (contains -)' => [\n 'element_ref_0015.xsd', \n [\n 'xs' => 'http://www.w3.org/2001/XMLSchema', \n 'baz' => 'http://example.org/baz', \n ], \n 'http://example.org/baz', \n 'f-bar', \n ], \n 'Prefix and local part (contains _)' => [\n 'element_ref_0016.xsd', \n [\n 'xs' => 'http://www.w3.org/2001/XMLSchema', \n 'baz' => 'http://example.org/baz', \n ], \n 'http://example.org/baz', \n 'f_bar', \n ], \n 'Prefix (starts with _) and local part' => [\n 'element_ref_0017.xsd', \n [\n 'xs' => 'http://www.w3.org/2001/XMLSchema', \n '_foo' => 'http://example.org', \n ], \n 'http://example.org', \n 'baz', \n ], \n 'Prefix (starts with letter) and local part' => [\n 'element_ref_0018.xsd', \n [\n 'xs' => 'http://www.w3.org/2001/XMLSchema', \n 'f' => 'http://example.org', \n ], \n 'http://example.org', \n 'baz', \n ], \n 'Prefix (contains letter) and local part' => [\n 'element_ref_0019.xsd', \n [\n 'xs' => 'http://www.w3.org/2001/XMLSchema', \n 'foo' => 'http://example.org', \n ], \n 'http://example.org', \n 'baz', \n ], \n 'Prefix (contains digit) and local part' => [\n 'element_ref_0020.xsd', \n [\n 'xs' => 'http://www.w3.org/2001/XMLSchema', \n 'f00' => 'http://example.org', \n ], \n 'http://example.org', \n 'baz', \n ], \n 'Prefix (contains .) and local part' => [\n 'element_ref_0021.xsd', \n [\n 'xs' => 'http://www.w3.org/2001/XMLSchema', \n 'f.bar' => 'http://example.org', \n ], \n 'http://example.org', \n 'baz', \n ], \n 'Prefix (contains -) and local part' => [\n 'element_ref_0022.xsd', \n [\n 'xs' => 'http://www.w3.org/2001/XMLSchema', \n 'f-bar' => 'http://example.org', \n ], \n 'http://example.org', \n 'baz', \n ], \n 'Prefix (contains _) and local part' => [\n 'element_ref_0023.xsd', \n [\n 'xs' => 'http://www.w3.org/2001/XMLSchema', \n 'f_bar' => 'http://example.org', \n ], \n 'http://example.org', \n 'baz', \n ], \n ];\n }", "title": "" }, { "docid": "60eb73fde66798b2421f50a8db814361", "score": "0.51160765", "text": "public function getReferences(UserInterface $user = null, $groups = array())\n {\n if (empty($this->_references)) {\n $this->_references = array(\n 'category' => $this->getCategory(),\n 'background' => $this->getBackground()\n\n );\n if ($user && $user->isAdmin()) {\n $this->_references['createdBy'] = $this->getCreatedBy();\n $this->_references['updatedBy'] = $this->getUpdatedBy();\n }\n }\n return $this->_references;\n }", "title": "" }, { "docid": "b05fc2c722781cfa2e067f0d02749a30", "score": "0.5113898", "text": "public function getReferences(UserInterface $user = null)\n {\n if (empty($this->_references)) {\n $this->_references = array();\n if ($user && $user->isAdmin()) {\n $this->_references['createdBy'] = null;\n if ($this->createdBy) {\n $this->_references['createdBy'] = $this->createdBy;\n }\n }\n }\n return $this->_references;\n }", "title": "" }, { "docid": "b6ad61e60249748123960b29334b90e3", "score": "0.51053816", "text": "public function getMatchReferences();", "title": "" }, { "docid": "f0baffcaa7d0d75b8ede32fc183f6f33", "score": "0.50891083", "text": "private function _removeReferencesToReferences()\n {\n $this->getDependencies()->free();\n\n $this->interfaceReferences = array();\n $this->parentClassReference = null;\n }", "title": "" }, { "docid": "558d2a0b744366580d34d6229d55f473", "score": "0.50840884", "text": "public function getAllReferencesForFileUid() : array {}", "title": "" }, { "docid": "75fbabbb6749793e4bf54050ef10e56b", "score": "0.5072542", "text": "public static function prepareURL(&$data, $reference = false)\n {\n if (!is_array($data)) {\n return $data;\n }\n\n reset($data);\n\n if (is_array(current($data))) {\n foreach ($data as &$item) {\n self::prepare($item);\n }\n } else {\n self::prepare($data);\n }\n\n if (!$reference) {\n return $data;\n }\n }", "title": "" }, { "docid": "9beba00b3da9ae8f883ad634a2bc855e", "score": "0.50614434", "text": "protected function getReferences(string $className): array\r\n {\r\n $references = [];\r\n $refs = $this->referenceRepository;\r\n\r\n foreach ($refs->getReferences() as $key => $value) {\r\n if (is_a($value, $className)) {\r\n $id = $value->getId();\r\n $entity = $this->manager->find($className, $id);\r\n $references[] = $entity;\r\n }\r\n }\r\n\r\n return $references;\r\n }", "title": "" }, { "docid": "25a166b496051da7071fc81aedfbc958", "score": "0.5058732", "text": "protected function func_refindex() {}", "title": "" }, { "docid": "560812f051ff852738885648ab9b7d10", "score": "0.5057073", "text": "function test4() {\n$D = array(array(3));\n\nprint($D[0][0]);\n$E = &koo($D); // this must be referenced\n$D[0][0] = 4;\nprint($E[0][0]); // 4\nprintln($D[0][0]); //4\n}", "title": "" }, { "docid": "2413fb3f7eaa3ecdb84cf3f8b5fce1ad", "score": "0.50532204", "text": "public function getRelatedListReferenceStructure(array $block): array\n\t{\n\t\t$fieldValue = $this->recordModel->get($block['referenceField']);\n\t\tif ($fieldValue && App\\Record::isExists($fieldValue)) {\n\t\t\t$relation = Vtiger_Relation_Model::getInstanceById($block['relationId']);\n\t\t\t$relatedRecordModel = \\Vtiger_Record_Model::getInstanceById($fieldValue);\n\t\t\t$block['relationStructure'] = Vtiger_Link_Model::getInstanceFromValues([\n\t\t\t\t'linklabel' => ($block['label'] ?? $relation->get('label')),\n\t\t\t\t'linkurl' => $relation->getListUrl($relatedRecordModel) . ($block['relationConditions'] ?? ''),\n\t\t\t\t'linkicon' => '',\n\t\t\t\t'relatedModuleName' => $relation->getRelationModuleName(),\n\t\t\t\t'relationId' => $relation->getId(),\n\t\t\t]);\n\t\t}\n\t\treturn $block;\n\t}", "title": "" }, { "docid": "437986aa6bead845d931e5ec8539da5b", "score": "0.5045115", "text": "function & linkCreateFromArray($aParameters) {\n\t$oLink = & new Link($aParameters[0], $aParameters[1], $aParameters[2], $aParameters[3], $aParameters[4], $aParameters[5], $aParameters[6], $aParameters[7], $aParameters[8], $aParameters[9], $aParameters[10]);\n\treturn $oLink;\n}", "title": "" }, { "docid": "7672d053c4d530f973e44d0ff6c7f6e6", "score": "0.504162", "text": "public function getReferences() {\n $this->lazyLoad();\n return $this->_countings['references'];\n }", "title": "" }, { "docid": "7b6686814be47e1e30d968165c9a676f", "score": "0.5025132", "text": "public function substituteMarkerAndSubpartArrayRecursiveResolvesMarkersAndSubpartsArrayDataProvider() : array {}", "title": "" }, { "docid": "1ddb915564a79bf447db7fecd9349e87", "score": "0.5023484", "text": "public function processXmlReferenceArray($row, $markerArray) {\n\n // Special processing\n foreach ($markerArray as $key => $value) {\n // Replaces & by &amp;\n $markerArray[$key] = str_replace('& ', '&amp; ', $markerArray[$key]);\n\n // Suppresses empty tags\n $markerArray[$key] = preg_replace('/<[^\\/>][^>]*><\\/[^>]+>/', '', $markerArray[$key]);\n }\n\n // Sets the file Path\n $filePath = PATH_site . 'typo3temp/' . $this->extKey . '/';\n \n // Checks if a replaceDistinct id has changed\n foreach ($this->xmlReferenceArray as $key => $value) {\n switch ($value['type']) {\n case 'replacedistinct':\n if ($row[$value['id']] != $value['fieldValue']) {\n if (!is_null($value['fieldValue'])) {\n // Sets all the previous replaceDistinct ids to \"changed\"\n $this->recursiveChangeField($key, 'changed', true);\n }\n $this->xmlReferenceArray[$key]['fieldValue'] = $row[$value['id']];\n } \n break;\n }\n }\n\n // Processes the replaceDistinct and cutter parts\n foreach ($this->xmlReferenceArray as $key => $value) {\n switch ($value['type']) {\n case 'emptyifsameasprevious':\n // Parse the template with the known markers\n $buffer = utf8_decode($value['template']);\n $buffer = $this->cObj->substituteMarkerArrayCached(\n $buffer,\n $markerArray,\n array(),\n array()\n );\n // Keeps the value in the XML reference array\n $this->xmlReferenceArray[$key]['fieldValue'] = $buffer;\n break;\n case 'replacedistinct':\n if ($value['changed']) {\n // Parses the template with the previous known markers\n $buffer = utf8_decode($value['template']);\n $buffer = $this->cObj->substituteMarkerArrayCached(\n $buffer,\n $this->previousMarkerArray,\n array(),\n array()\n );\n\n $fileName = $key . '.xml';\n\n if(!$this->replaceReferenceMarkers($filePath, $fileName, $buffer)) {\n return false;\n }\n \n $this->recursiveChangeField($key, 'changed', false);\n $this->unlinkReplaceAlways($filePath, $key);\n } \n break;\n case 'cutifnull':\n case 'cutifempty':\n case 'cutifnotnull':\n case 'cutifnotempty':\n case 'cutifequal':\n case 'cutifnotequal':\n case 'cutifgreater':\n case 'cutifless':\n case 'cutifgreaterequal':\n case 'cutiflessequal':\n\n // Set the file name\n $fileName = $key . '.xml';\n\n // Sets the field value\n $value['fieldValue'] = $row[$value['id']];\n \n // The processing of the cutters depends on their place with respect to the replaceAlways attribute\n $isChildOfReplaceAlways = $this->isChildOfReplaceAlways($key);\n if ($isChildOfReplaceAlways) {\n $value['changed'] = true;\n $fieldValue = $value['fieldValue'];\n $marker = $markerArray;\n } else {\n $fieldValue = $value['previousFieldValue'];\n $marker = $this->previousMarkerArray;\n }\n \n // Set the condition\n switch ($value['type']) {\n case 'cutifnull':\n case 'cutifempty':\n $condition = empty($fieldValue);\n break;\n case 'cutifnotnull':\n case 'cutifnotempty':\n $condition = !empty($fieldValue);\n break;\n case 'cutifequal':\n $condition = ($fieldValue == $value['value']);\n break;\n case 'cutifnotequal':\n $condition = ($fieldValue != $value['value']);\n break;\n case 'cutifgreater':\n $condition = ($fieldValue > $value['value']);\n break;\n case 'cutifless':\n $condition = ($fieldValue > $value['value']);\n break;\n case 'cutifgreaterequal':\n $condition = ($fieldValue >= $value['value']);\n break;\n case 'cutiflessequal':\n $condition = ($fieldValue <= $value['value']);\n break;\n }\n\n // Checks if the field must be replaced\n if ($value['changed'] && !$condition) {\n\n // Replaces markers in the template\n $buffer = utf8_decode($value['template']);\n $buffer = $this->cObj->substituteMarkerArrayCached(\n $buffer,\n $marker,\n array(),\n array()\n );\n\n if(!$this->replaceReferenceMarkers($filePath, $fileName, $buffer)) {\n return false;\n }\n\n if (!$isChildOfReplaceAlways) {\n $this->recursiveChangeField($key, 'changed', false);\n }\n\n } else {\n // The field is cut\n $buffer = '';\n\n if(!$this->replaceReferenceMarkers($filePath, $fileName, $buffer)) {\n return false;\n }\n }\n\n // Updates the previous fied value\n $this->xmlReferenceArray[$key]['previousFieldValue'] = $value['fieldValue'];\n\n break;\n }\n }\n \n // Processes the replaceAlways part\n foreach ($this->xmlReferenceArray as $key => $value) {\n switch ($value['type']) {\n case 'replacealways':\n\n\t\t $fileName = $key . '.xml';\n\n // Replaces markers in the template\n $buffer = utf8_decode($value['template']);\n $buffer = $this->cObj->substituteMarkerArrayCached(\n $buffer,\n $markerArray,\n array(),\n array()\n );\n\n if(!$this->replaceReferenceMarkers($filePath, $fileName, $buffer)) {\n return false;\n }\n break;\n }\n }\n\n // Keeps the marker array\n $this->previousMarkerArray = $markerArray;\n\n return true;\n }", "title": "" }, { "docid": "361e257eaefb428cec63d83e04ba284e", "score": "0.500001", "text": "public function setReference(array $reference)\n {\n $this->reference = $reference;\n return $this;\n }", "title": "" }, { "docid": "48d4e88bae99f0ab8ea83363427508d4", "score": "0.49651438", "text": "public function getReferenceList(): array\n\t{\n\t\treturn (array) ($this->getFieldModel()->getFieldParams()['module'] ?? []);\n\t}", "title": "" }, { "docid": "9ed3a3b83ed6726ebd11885a2a354513", "score": "0.49573818", "text": "public function initializeReferencesAction() {}", "title": "" }, { "docid": "29649e7143f0ae69cefad385982e35fc", "score": "0.49556094", "text": "public function getReferenceConstraints()\n {\n $constraints = [];\n\n foreach ($this->getConstraints() as $constraint) {\n if ($constraint instanceof Reference) {\n $constraints[$constraint->getName()] = $constraint;\n }\n }\n\n return $constraints;\n }", "title": "" }, { "docid": "ff0ff690ea75cb3504765fbf27b44de6", "score": "0.49525353", "text": "public function createMultipleDiff() : array {}", "title": "" }, { "docid": "0b8a9206f0ea9aa62087f3791b905b38", "score": "0.49474263", "text": "function ref_params(&$arr) {\n unset($arr[0]);\n }", "title": "" }, { "docid": "fc184989efb03fd12219bfa63c6436c4", "score": "0.49422", "text": "public function getAllReferencesForPersistenceIdentifier() : array {}", "title": "" }, { "docid": "3860be4be8949f355a15c6e3247cf4cf", "score": "0.49362016", "text": "function api_update_references() {\n // Figure out all the dids of the object/branch/types.\n //db_query('UPDATE {api_reference_storage} r, {api_documentation} d SET r.to_did = d.did WHERE r.object_name = d.object_name AND r.branch_name = d.branch_name AND r.object_type = d.object_type');\n \n db_query('UPDATE {api_reference_storage} r SET to_did = d.did' .\n \t\t' FROM {api_documentation} d WHERE r.object_name = d.object_name AND r.branch_name = d.branch_name AND r.object_type = d.object_type');\n}", "title": "" }, { "docid": "be043ab0e5d89188d03d00ad0ee84d12", "score": "0.49333712", "text": "function array_replace_recursive($base, $replacements) {\n foreach (array_slice(func_get_args(), 1) as $replacements) {\n $brefStack = array(&$base);\n $headStack = array($replacements);\n\n do {\n end($brefStack);\n\n $bref = &$brefStack[key($brefStack)];\n $head = array_pop($headStack);\n\n unset($brefStack[key($brefStack)]);\n\n foreach (array_keys($head) as $key) {\n if (isset($key, $bref) && is_array($bref[$key]) && is_array($head[$key])) {\n $brefStack[] = &$bref[$key];\n $headStack[] = $head[$key];\n } else {\n $bref[$key] = $head[$key];\n }\n }\n } while (count($headStack));\n }\n\n return $base;\n }", "title": "" }, { "docid": "7b59c3e23bd558c3dd881324e41f4e11", "score": "0.49321893", "text": "public static function provideGetArrayChanges()\n {\n return array(\n array(\n array(\n array(\n 'a',\n ),\n array(\n 'a',\n ),\n ),\n true,\n ),\n array(\n array(\n array(\n 'a',\n ),\n array(\n 'b',\n ),\n ),\n false,\n ),\n array(\n array(\n array(\n ),\n array(\n 'a' => 'b',\n ),\n ),\n false,\n ),\n array(\n array(\n array(\n ),\n array(\n 'b',\n ),\n ),\n false,\n ),\n );\n }", "title": "" }, { "docid": "0c871446803719206f0193500563a9bc", "score": "0.49282306", "text": "public function setByReference(array &$array = null): self\n {\n $array = $array ?? [];\n $this->content =& $array;\n $this->count();\n return $this;\n }", "title": "" }, { "docid": "f444a239b88d77ee365cec7674963f2b", "score": "0.49248093", "text": "public function &link_data(): array\n {\n return $this->link_data;\n }", "title": "" }, { "docid": "7220ab081969aa41c2e35291bf95dc5a", "score": "0.49189872", "text": "public static function getReferenceColumns() {\n if (!isset(Civi::$statics[__CLASS__]['links'])) {\n Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__);\n Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'document_id', 'civicrm_document', 'id');\n Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'updated_by', 'civicrm_contact', 'id');\n CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);\n }\n return Civi::$statics[__CLASS__]['links'];\n }", "title": "" }, { "docid": "ddca7076aca1e397421bf2503584595c", "score": "0.49179193", "text": "function toUrlArray($blogs) {\n\t\t$ret = array();\n\t\tfor ($i = 0; $i < count($blogs); $i = $i + 1) {\n\t\t\tarray_push($ret, $blogs[$i]->url);\n\t\t}\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "1a754cd875fbb5f1fd8ae0af4cccefa8", "score": "0.49102503", "text": "function &getref(&$conf){\r\n\t\t$rv = NULL;\r\n\t\tforeach($conf as &$confe){\r\n\t\t\tif($confe['type'] != 'test') continue;\r\n\t\t\t$rv = &$confe['tests'];\r\n\t\t}\r\n\t\tif($rv === NULL){\r\n\t\t\t$rv = array('type' => 'test', 'pos'=> 0, 'tests' => array());\r\n\t\t\t$conf[] = $rv;\r\n\t\t\t$rv = &$conf[count($conf) - 1]['tests'];\r\n\t\t}\r\n\t\treturn $rv;\r\n\t\r\n\t}", "title": "" }, { "docid": "789c87da3572a5f9b7817ca65b6a0a47", "score": "0.49059734", "text": "public function getReferenceData(object $object) : array\n {\n $refClass = get_class($object);\n $refMeta = $this->entityManager->getClassMetadata($refClass);\n\n $identifiers = $refMeta->getIdentifierValues($object);\n if (! count($identifiers)) {\n throw new InvalidArgumentException(\n 'Target object has no identifiers, must be persisted first!'\n );\n }\n\n return ['class' => $refClass, 'identifiers' => $identifiers];\n }", "title": "" }, { "docid": "f6e735e24504ed978aeae9281f13abc7", "score": "0.48845017", "text": "protected function buildLinks()\r\n {\r\n $currentUri = \"\";\r\n $result = [];\r\n\r\n foreach($this->origin as $uri){\r\n if($uri == \"\") continue;\r\n if($uri != \"/\"){\r\n $currentUri .= \"/\" . $uri;\r\n }else{\r\n $currentUri .= ($uri . \"/\");\r\n }\r\n $result[] = $currentUri;\r\n }\r\n\r\n return $result;\r\n }", "title": "" }, { "docid": "a6cede50dd29b4c3499037ae13941e22", "score": "0.4883455", "text": "public function setRefs(array $refs)\n {\n $future = $options = array();\n\n foreach ($refs as $ref) {\n $value = $ref->getRef();\n if ($ref->isMasterRef()) {\n $options[$value] = $this->createLabel($ref);\n } else {\n $future[$value] = $this->createLabel($ref);\n }\n }\n if (count($future)) {\n $options[] = array(\n 'label' => 'Future Releases',\n 'options' => $future\n );\n }\n $this->setValueOptions($options);\n\n return $this;\n }", "title": "" }, { "docid": "c3eb2284948de9710a20b93917945d6a", "score": "0.48758852", "text": "function Add($ref) {\n\t\t// Expand singular -> plurals\n\t\tforeach (array(\n\t\t\t'author' => 'authors',\n\t\t\t'url' => 'urls',\n\t\t) as $single => $plural)\n\t\t\tif (isset($ref[$single])) {\n\t\t\t\t$ref[$plural] = array($ref[$single]);\n\t\t\t\tunset($ref[$single]);\n\t\t\t}\n\t\n\t\tif (isset($ref['date']))\n\t\t\t$ref['date'] = $this->ToEpoc($ref['date']);\n\n\t\t$this->refs[] = $ref;\n\t}", "title": "" }, { "docid": "5e020a8fbe11091bdf75b9483c34b95e", "score": "0.48751673", "text": "function &set_data($data_array);", "title": "" }, { "docid": "7bda4eba9530a537757969e1aaf8924f", "score": "0.48701966", "text": "public function publicMethodWithReference(ClassGenerator &$classGenerator, &$param1, array &$array)\n {\n }", "title": "" }, { "docid": "a2afbaea411b1d21d95bbe45cf1c1183", "score": "0.48682478", "text": "public function getLeagueReferences();", "title": "" }, { "docid": "c2645ca40128bc0f6b587163473ce67d", "score": "0.48606446", "text": "function register_anchor($name,$type=NULL)\r\n{\r\n global $Cbucket;\r\n if(is_array($name)) {\r\n foreach($name as $key => $naam){\r\n if(is_array($naam)) {\r\n foreach($naam as $name) {\r\n $Cbucket->anchorList[$name][] = $key;\r\n }\r\n } else {\r\n $Cbucket->anchorList[$naam][] = $key;\r\n }\r\n }\r\n } else if($type!=NULL) {\r\n $Cbucket->anchorList[$type][] = $name;\r\n }\r\n}", "title": "" }, { "docid": "d615c7465d7c4bafbb93e6924e517a38", "score": "0.4855902", "text": "public function toIdAll($name)\n\t{\n\t\t$ret = array();\n\t\t\n\t\tforeach ($this->reference_tables AS $reference_table)\n\t\t{\n\t\t\tif ($id = $reference_table->toId($name))\n\t\t\t{\n\t\t\t\t$ret[] = $id;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "837f70c57ad58fa6c5fd18d757182f0a", "score": "0.48506024", "text": "public static function getViewHtmlReferences()\n\t{\n\t\t$input = JFactory::getApplication()->input;\n\n\t\t$filters = $input->get('filters', array(), 'array');\n\t\t\n\t\t$filters_lookup = array(\n\t\t\t'group',\n\t\t\t'service',\n\t\t\t'price',\n\t\t\t'country',\n\t\t\t'state',\n\t\t\t'city',\n\t\t\t'zip',\n\t\t\t'distance',\n\t\t\t'base_coord',\n\t\t);\n\n\t\tforeach ($filters_lookup as $f)\n\t\t{\n\t\t\tif (!array_key_exists($f, $filters))\n\t\t\t{\n\t\t\t\t$filters[$f] = '';\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (!empty($filters['price']))\n\t\t{\n\t\t\t$filters['price'] = explode(':', $filters['price']);\n\t\t}\n\t\t\n\t\treturn array('filters' => $filters);\n\t}", "title": "" }, { "docid": "2b0bf2340c56b17476b99badc2f07019", "score": "0.48490772", "text": "function toArray() ;", "title": "" }, { "docid": "2b0bf2340c56b17476b99badc2f07019", "score": "0.48487127", "text": "function toArray() ;", "title": "" }, { "docid": "60bdf6b955cc3d77b3d737cbf7c20802", "score": "0.48467332", "text": "public function getBackReferences( $name )\n {\n $expandedName = $this->expandName( $name );\n if ( array_key_exists( $expandedName, $this->backreferences ) ) {\n return $this->backreferences[$expandedName];\n } else {\n return array();\n }\n }", "title": "" }, { "docid": "ad262b12d344d385485642859d3c9fb1", "score": "0.48440674", "text": "private function getTournamentReferencesFromStore()\n {\n $tournamentReferences = $this->tournamentReferences;\n if (null === $tournamentReferences) {\n $tournamentReferences = new ArrayCollection();\n $this->tournamentReferences = $tournamentReferences;\n }\n\n return $tournamentReferences;\n }", "title": "" }, { "docid": "9f0470e6b861eeddf722ab98efadb090", "score": "0.48406592", "text": "function __PushLinkToArray( $replacement )\n {\n //global $gLinkExtractor_linkRecipient;\n array_push($this->gLinkExtractor_linkRecipient, htmlspecialchars( $replacement[2] ) );\n// print_r($this->gLinkExtractor_linkRecipient);\n }", "title": "" }, { "docid": "273fdbef9dd47cfe7277e457220df7b0", "score": "0.48368925", "text": "protected function prepare_array() {\n\t\t$array_output = array();\n\n\t\t$this->push_field_values_to_array( $this->entry_values->get_field_values(), $array_output );\n\n\t\treturn $array_output;\n\t}", "title": "" }, { "docid": "bdf0e4c9d4d0651f28bbe31082210d52", "score": "0.4822119", "text": "public function wrapRelationNameAndField(): array\n {\n [$relation, $column] = \\explode('.', $this->name, 2);\n\n return [\n $relation,\n new static($column),\n ];\n }", "title": "" }, { "docid": "da7d053226284a9c87494109744e7e0b", "score": "0.4821519", "text": "public function GetQualifierAssociationsAsArray(&$RefArray)\n\t\t{\n\n\t\t\t$query = \"select qualifierassociationname from [|PREFIX|]qualifierassociations\";\n\t\t\t$result = $GLOBALS[\"ISC_CLASS_DB\"]->Query($query);\n\n\t\t\twhile($row = $GLOBALS[\"ISC_CLASS_DB\"]->Fetch($result))\n\t\t\t\t$RefArray[] = isc_strtolower($row['qualifierassociationname']);\n\t\t}", "title": "" } ]
658fdc982d53ec0e8c35dc7d13e2163e
Constructor open DB connection
[ { "docid": "f5ed11568d634561cc88504391eae327", "score": "0.0", "text": "function __construct()\n\t{\n\t\t$conf = json_decode(file_get_contents('configuration.json'), TRUE);\n\t\t$this->db = new mysqli($conf[\"host\"], $conf[\"user\"], $conf[\"password\"], $conf[\"database\"]);\n\t}", "title": "" } ]
[ { "docid": "56f755c950d1580b6c403ef06b9f6ec4", "score": "0.79415965", "text": "public function __construct()\n {\n $this->_dbInstance = Database::getInstance();\n $this->_dbHandle = $this->_dbInstance->getConnection();\n }", "title": "" }, { "docid": "9b6ef5dfb6b795a70ba32f004e0fea16", "score": "0.7891164", "text": "protected function openConn() {\n $database = new Database();\n $this->conn = $database->getConnection();\n }", "title": "" }, { "docid": "db2b7f7aba93b263de46faeb6743e7c9", "score": "0.7843749", "text": "public function __construct()\n\t\t{\n\t\t\t$this->_db = new DbConnect();\n\t\t\t$this->OpenConnect();\n\t\t}", "title": "" }, { "docid": "194a40a329f3537ddc2472db7a116b7c", "score": "0.7826149", "text": "public function __construct()\n {\n $this->db = Db::getConnection(DB_HOST, DB_USER, DB_PWD, DB_NAME, DB_PORT);\n }", "title": "" }, { "docid": "fbba9519c79ef73d2c80f173194e6bac", "score": "0.77657324", "text": "public function __construct(){\n\t\t$database = new Database();\n\t\t$db = $database->getConnection();\n $this->conn = $db;\n }", "title": "" }, { "docid": "cab32b1df6fed70509f8d637f9a60282", "score": "0.77645373", "text": "public function __construct()\n {\n $this->conn = DatabaseConnection::getInstance()->getConnection();\n }", "title": "" }, { "docid": "57691ce395a9a893231017bd88291c64", "score": "0.7743647", "text": "private static function openConnection()\n {\n $options = array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ, PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING);\n self::$db = new PDO(DB_TYPE . ':host=' . DB_HOST . ';dbname=' . DB_NAME . ';charset=' . DB_CHARSET, DB_USER, DB_PASS, $options);\n \n self::$apartment_db = new ApartmentDB(self::$db);\n self::$user_db = new UserDB(self::$db);\n }", "title": "" }, { "docid": "200be3e450ca6668838fd7786a0d4e05", "score": "0.7742698", "text": "function __construct(){\n $this->open_db_connection(); // by referring database object calling open_db_connection() method\n\n }", "title": "" }, { "docid": "7b3f071e6c436a96c43a464ea047ed5c", "score": "0.7735282", "text": "function __construct() {\n\t\t$this->conn = $this->connectDB();\n\t}", "title": "" }, { "docid": "dd13fe0611e2fa0a07155e36c833adab", "score": "0.77282244", "text": "public function __construct()\n {\n try {\n // Create connection with the command oci_connect(String(username), String(password), String(connection_string))\n // The @ sign avoids the output of warnings\n // It could be helpful to use the function without the @ symbol during developing process\n $this->conn = @oci_connect(\n DatabaseHelper::username,\n DatabaseHelper::password,\n DatabaseHelper::con_string\n );\n\n //check if the connection object is != null\n if (!$this->conn) {\n // die(String(message)): stop PHP script and output message:\n die(\"DB error: Connection can't be established!\");\n }\n\n } catch (Exception $e) {\n die(\"DB error: {$e->getMessage()}\");\n }\n }", "title": "" }, { "docid": "07673c0ef88967dd2f89553d4819de02", "score": "0.7722222", "text": "function __construct() {\n\n\t\t$this->opendb_connection();\n\t}", "title": "" }, { "docid": "b82fc678205fb446aaefce79ddbe9f46", "score": "0.76713747", "text": "public function __construct()\r\n {\r\n $this->open_connection();\r\n }", "title": "" }, { "docid": "bba113c57f64cecae21c909b7ac58b05", "score": "0.7657316", "text": "public function __construct() {\r\n $this->conn = PersistentManager::getInstance()->get_connection();\r\n }", "title": "" }, { "docid": "eaa6509ccd06433b44a79648ed1f4aef", "score": "0.7654574", "text": "public function __construct()\n {\n $this->db = Database::getInstance();\n $this->dbConnection = $this->db->getConnection();\n }", "title": "" }, { "docid": "6c917532f902c8104b455501a31b0490", "score": "0.76516813", "text": "public function __construct()\n\t\t{\n\t\t\t$this->_db = parent::connect();\n\t\t}", "title": "" }, { "docid": "a90325740bfc40a211605aaf2df44b4a", "score": "0.7649175", "text": "public function __construct()\n {\n $this->db = \\Config\\Database::connect($this->DBGroup);\n }", "title": "" }, { "docid": "a90325740bfc40a211605aaf2df44b4a", "score": "0.7649175", "text": "public function __construct()\n {\n $this->db = \\Config\\Database::connect($this->DBGroup);\n }", "title": "" }, { "docid": "50fe16b66fdafdac5c8a1667df8bd4a0", "score": "0.7647485", "text": "function __construct () {\r\n// opening db connection\r\n$db = new DbConnect () ;\r\n$this -> conn = $db->getDB () ;\r\n}", "title": "" }, { "docid": "3532eb0f8b872378be0fc694432297db", "score": "0.76265854", "text": "public function __construct()\n {\n DEBUG_MODE ? Core::mark('database.init') : null;\n \n if ( ! $this->_object)\n { \n switch(Core::getParam(array('db', 'driver')))\n {\n default:\n $driver = 'core.database.driver.mysql';\n }\n \n $this->_object = Core::getLib($driver);\n $this->_object->connect(Core::getParam(array('db', 'host')), Core::getParam(array('db', 'user')), Core::getParam(array('db', 'pass')), Core::getParam(array('db', 'name')), Core::getParam(array('db', 'port')));\n }\n }", "title": "" }, { "docid": "afffc1075d5fcd8a7e7f131cff3c31aa", "score": "0.7610039", "text": "function __construct()\n {\n $this->db = $this->connect();\n }", "title": "" }, { "docid": "448e5f75a0a384a573fa68bc24936118", "score": "0.76086634", "text": "public function __construct() {\n $this->conn = new DBConnection();\n }", "title": "" }, { "docid": "c2061852a38358ceb936cc3f38a78fd8", "score": "0.7595432", "text": "private function __construct()\n {\n $this->conn = oci_connect(ORACLE_DB_USERNAME, ORACLE_DB_PASSWORD, ORACLE_DB_HOSTNAME . '/' . ORACLE_DB_DATABASE, ORACLE_DB_CHARSET);\n }", "title": "" }, { "docid": "d151a6b2141f4d5502b91965822c869f", "score": "0.7593432", "text": "function __construct() {\n $this->con = $this->getConnection();\n }", "title": "" }, { "docid": "a46d5a39364fd479f98e37c86b3996d8", "score": "0.758161", "text": "public function __construct(){\n\t\t// Create a new connection for this object to use\n\t\t$this->db = new db();\n\t}", "title": "" }, { "docid": "c061dc2cecce832ebcd42421daec9581", "score": "0.75795436", "text": "public function __construct()\n {\n //Get instance of the database\n $this->db = Database::getInstance();\n //Get the connection to the database\n $this->connection = $this->db->getConnection();\n }", "title": "" }, { "docid": "c58438b174157ed2ba084f4ad633cd69", "score": "0.7534368", "text": "function __construct(){\n $this->_db = (new DataBaseServices())->connect();\n }", "title": "" }, { "docid": "5501c87d487f3feca5d7b5feb2920144", "score": "0.7531662", "text": "public function __construct() {\n // get datbase settings\n include \"settings/db.php\";\n\n try {\n // create database object\n $this->_db = new DBAccess ($dsn, $username, $password);\n } catch (PDOException $e) {\n die (\"Unable to connect to database, \" . $e->message());\n }\n }", "title": "" }, { "docid": "b331af388022ecd179e847e9216459cf", "score": "0.753105", "text": "public function __construct() {\r\n $this->db = Database::connect();\r\n }", "title": "" }, { "docid": "b331af388022ecd179e847e9216459cf", "score": "0.753105", "text": "public function __construct() {\r\n $this->db = Database::connect();\r\n }", "title": "" }, { "docid": "b331af388022ecd179e847e9216459cf", "score": "0.753105", "text": "public function __construct() {\r\n $this->db = Database::connect();\r\n }", "title": "" }, { "docid": "53b4da4fe8aad0f5f4b739e187f08192", "score": "0.75289196", "text": "function __construct()\n {\n $database = new Database();\n $this->db = $database->getConnection();\n }", "title": "" }, { "docid": "cd5714fda7dcf0c6fdfa4c5cbe4f3199", "score": "0.75284785", "text": "public function __construct()\n {\n $database = new Database();\n $this->connection = $database->getConnection();\n }", "title": "" }, { "docid": "766890686d7599a4bce4b9920341a1ca", "score": "0.75221115", "text": "public function __construct()\n {\n $this->db = App::call()->db->getConnection();\n }", "title": "" }, { "docid": "b80c10308524e6b33814bae6986fefbc", "score": "0.75181407", "text": "function __construct() {\n require_once dirname(__FILE__) . '/../include/DbConnect.php';\n // opening db connection\n $db = new DbConnect();\n $this->conn = $db->connect();\n $this->conni = $db->connecti();\n \n }", "title": "" }, { "docid": "3ba294e76d3717537f50d743f58eba70", "score": "0.74955463", "text": "public function __construct()\n\t{\n\t\ttry {\n\t\t\t$options = array(\n\t\t\t\tPDO::ATTR_PERSISTENT => false,\n\t\t\t\tPDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,\n\t\t\t\tPDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES 'utf8'\"\n\t\t\t);\n\t\t\t$this->conn = new PDO(\"mysql:host={$this->host};dbname={$this->name}\", $this->user,$this->pass, $options);\n\n\t\t\tif(!self::$instance)\n\t\t\t{\n\t\t\t\tself::$instance = $this->conn;\n\t\t\t}\n\t\t\t$this->connection = self::$instance;\n\t\t\t$this->conn = null;\n\t\t}\n\t\tcatch (PDOException $err) {\n\t\t\tthrow new apiSDKException(\"Error connecting DB.\", 1);\n\t\t\tdie();\n\t\t}\n\t}", "title": "" }, { "docid": "e18b613d5242803c7d59a19b92d3b567", "score": "0.7495222", "text": "public function __construct() {\n // Making a connection with the database\n $database = new Database();\n $this->db = $database->getConnection();\n }", "title": "" }, { "docid": "bcf41ce472bd865acf85c98c685bdfeb", "score": "0.748859", "text": "public function __construct(){\n\t\t\t$this->db = Database::connect();\n\t\t}", "title": "" }, { "docid": "0eb080c0a1def4ffebb9e221a5cc38f6", "score": "0.74884254", "text": "public function __construct()\n {\n $dbconn = new Db();\n $this->conn = $dbconn->koneksi();\n }", "title": "" }, { "docid": "04a6232c6d8c22282e882844349ffac1", "score": "0.7487303", "text": "public function __construct() {\n $this->datab = DatabaseConc::instance();\n $this->connector = $this->datab->getConnection();\n }", "title": "" }, { "docid": "5f2bb225023abcb8e73b0f62f4c3b6d3", "score": "0.74734455", "text": "function __construct($db) {\n $this->conn = $db;\n }", "title": "" }, { "docid": "39a50adc3aba6eb73f57131d41fdb7c4", "score": "0.74664575", "text": "public function __construct(){\n\n\t\t\tif($this->DEBUG){\n\t\t\t\t// Clears Error Log each time a Database connection is made only \n\t\t\t\t// if in debugging mode.\n\t\t\t\t$this->CleanseErrorLog();\n\t\t\t}\n\t\t\t\n\t\t\t// Set DSN\n\t\t\tswitch ($this->type) {\n\t\t\t\tcase 'mysql':\n\t\t\t\t\t// Set DSN (MySQL)\n\t\t\t\t\t$this->dsn = 'mysql:host=' . $this->host . ';dbname=' . $this->name;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'sqlite':\n\t\t\t\t\t// Set DSN (SQLite)\n\t\t\t\t\t$this->dsn = 'sqlite:' . $this->name . '.sqlite';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'mssql':\t// NOT TESTED\n\t\t\t\t\t// Set DSN (MSSQL)\n\t\t\t\t\t$this->dsn = 'dblib:host=' . $this->host . ';dbname=' . $this->name;\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\t$this->LogError(__FUNCTION__, \"Database Connection Type not Set.\");\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\n\t\t\t// Set options\n\t\t\t$options = array(\n\t\t\t\tPDO::ATTR_PERSISTENT => true,\n\t\t\t\tPDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION\n\t\t\t);\n\n\n\t\t\ttry{ // Create a PDO instance\n\t\t\t\t$this->dbh = new PDO($this->dsn, $this->user, $this->pass, $options);\n\t\t\t}\n\t\t\tcatch(PDOException $err){ // Catch any errors\n\t\t\t\t$this->LogError(__FUNCTION__, \"Database Connection Error: \" . $err->getMessage());\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "5b20c198bf981a81081e07c0de4b7ff8", "score": "0.74447316", "text": "public function open() {\r\n try {\r\n $this->connection = new PDO($this->db_dsn, \r\n $this->db_username, \r\n $this->db_password);\r\n }\r\n catch(PDOException $e) {\r\n echo \"An database connection error occurred: {$e->getMessage()}\";\r\n exit();\r\n }\r\n }", "title": "" }, { "docid": "bf8fbb9ab35b1033f924a1f6ab9c0597", "score": "0.74425673", "text": "private function openDatabaseConnection()\n {\n $options = array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ, PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING);\n $this->db = new PDO(DB_TYPE . ':host=' . DB_HOST . ';dbname=' . DB_NAME . ';charset=' . DB_CHARSET, DB_USER, DB_PASS, $options);\n }", "title": "" }, { "docid": "b7e8663d494ab07089c756c75f76feb7", "score": "0.74330485", "text": "function __construct() {\r\n\t\t$this->connBanco = new Db();\r\n\t}", "title": "" }, { "docid": "53b5ac500db5b32a297b276f26da8482", "score": "0.74289757", "text": "private function __construct(){\r\n\t\t$this->createConnection();\r\n\t}", "title": "" }, { "docid": "fabdd9684b7b14f7b3aa72e79d4a31c9", "score": "0.74268985", "text": "public function __construct() {\n include_once 'xc_config.php';\n $database = new Database();\n $this->conn = $database->getConnection();\n }", "title": "" }, { "docid": "fca1a786169e59231c8b65768a07d4fe", "score": "0.7426276", "text": "public function __construct($db) {\n $this->conn = $db;\n }", "title": "" }, { "docid": "21869c710f2a819c2eccc41dc35b691d", "score": "0.7421272", "text": "protected function __construct()\n\t{\n\n\t\tself::$db = new db(DB_NAME);\n\t}", "title": "" }, { "docid": "8b63bfef94af42f8a4dd4435fee8c534", "score": "0.7413415", "text": "function __construct()\n {\n $con_obj = new ConnectionClass();\n $this->con = $con_obj->getConnection();\n }", "title": "" }, { "docid": "78806b176ede89690be5fec69422df08", "score": "0.74043536", "text": "function __construct() {\n require_once 'DBConnet.php';\n // connecting to database\n $this->db = new DBConnect();\n $this->db->connect();\n }", "title": "" }, { "docid": "787e8031578ddf23f76d7e76c15c2c9e", "score": "0.7387053", "text": "public function __construct() {\n\t\t\n\t\t$this->dbh = \\Database::getInstance();\n\t\t\n\t}", "title": "" }, { "docid": "2c803b080d50adb0374b0573b046921f", "score": "0.73828214", "text": "public function __construct() {\n $database = new Database();\n $this->connection = $database->getConnection(); \n }", "title": "" }, { "docid": "5f5681e2c4ca3cfceae9a53aad0e94d6", "score": "0.7376782", "text": "public function __construct($db)\n {\n $this->conn = $db;\n }", "title": "" }, { "docid": "5f5681e2c4ca3cfceae9a53aad0e94d6", "score": "0.7376782", "text": "public function __construct($db)\n {\n $this->conn = $db;\n }", "title": "" }, { "docid": "5f5681e2c4ca3cfceae9a53aad0e94d6", "score": "0.7376782", "text": "public function __construct($db)\n {\n $this->conn = $db;\n }", "title": "" }, { "docid": "5f5681e2c4ca3cfceae9a53aad0e94d6", "score": "0.7376782", "text": "public function __construct($db)\n {\n $this->conn = $db;\n }", "title": "" }, { "docid": "d05a1089bc83f3f2c98eb17bd79faa6a", "score": "0.73757404", "text": "public function __construct() {\n $this->db = new DB(DBHOST, DBUSER, DBPASS, DATABASE);\n }", "title": "" }, { "docid": "c50dffe028bfc06ec87bb0c1b8d1cad0", "score": "0.73756135", "text": "public function __construct()\n\t{\n\t\t# Get DB handle\n\t\t$this->db = $GLOBALS['db'];\n\t}", "title": "" }, { "docid": "4dd427dd83c49868e3941ee7c7d63f6e", "score": "0.73733693", "text": "public function __construct($db) {\n $this->conn = $db;\n }", "title": "" }, { "docid": "8d65c00e511a4b6e7f11b20665310446", "score": "0.73703754", "text": "public function __construct($db) {\n $this->conn = $db;\n }", "title": "" }, { "docid": "a301181e96e28ea8dc723bd064c63517", "score": "0.73692995", "text": "public function __construct($db) {\n $this->conn = $db;\n }", "title": "" }, { "docid": "af50761240cf78960bbeee2260dd9052", "score": "0.7359409", "text": "private function __construct() {\n\t\t$dsn = DBConfig::dbVars();\n\t\t$this->dbconn =& DB::Connect($dsn, array());\n\t\t\n\t\tif (PEAR::isError($this->dbconn)) {\n\t\t\tthrow new Exception('Unable to connect to the database');\n\t\t}\n\t}", "title": "" }, { "docid": "0875e47d9d96a724d589354bbe0ec3a2", "score": "0.7359248", "text": "public function __construct()\n\t{\n\t\tif ( ! is_object($this->db))\n\t\t{\n\t\t\t// Load the default database\n\t\t\t$this->db = \\Phpill\\Libraries\\Database::instance('default');\n\t\t}\n\t}", "title": "" }, { "docid": "6f1657745ca2d8a23b3f9f6081026b84", "score": "0.7358604", "text": "function __construct() {\n\t\trequire_once dirname(__FILE__) . '/DBconnect.php';\n\t\t$db = new DBconnect;\n\t\t$this->con = $db->connect();\n\t}", "title": "" }, { "docid": "aa3578e13a152aa8bb7599d63a858061", "score": "0.7346204", "text": "public function __construct()\n\t{\n\t\t$dba = new DBAccess();\n\t\t$this->pdo = $dba->get_connection();\n\t}", "title": "" }, { "docid": "4042773d60b3bec6220b43f385079baa", "score": "0.73340416", "text": "private function openDatabaseConnection()\n {\n // set the (optional) options of the PDO connection. in this case, we set the fetch mode to\n // \"objects\", which means all results will be objects, like this: $result->user_name !\n // For example, fetch mode FETCH_ASSOC would return results like this: $result[\"user_name] !\n // @see http://www.php.net/manual/en/pdostatement.fetch.php\n $options = array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ, PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING);\n\n if (!isset(self::$db)) {\n\n // generate a database connection, using the PDO connector\n // @see http://net.tutsplus.com/tutorials/php/why-you-should-be-using-phps-pdo-for-database-access/\n self::$db = new PDO(DB_TYPE . ':host=' . DB_HOST . ';dbname=' . DB_NAME . ';charset=' . DB_CHARSET, DB_USER, DB_PASS, $options);\n }\n }", "title": "" }, { "docid": "66601bef8595d854c4d7e66c4d4be4d7", "score": "0.7333447", "text": "function __construct() \n {\n try {\n \t$this->db = new Database(DB_TYPE, DB_HOST, DB_NAME, DB_USER, DB_PASS);\n }\n catch (PDOException $ex){\n \techo 'Database connection failed';\n \tdie(); \t\n }\n }", "title": "" }, { "docid": "3843f1fa09bcab746d015e207642995e", "score": "0.73324895", "text": "function __construct()\n\t{\n\t\trequire_once dirname(__FILE__) . '/Constants.php';\n require_once dirname(__FILE__) . '/DbConnect.php';\n // opening db connection\n $db = new DbConnect();\n $this->conn = $db->createConnect();\n\n\t}", "title": "" }, { "docid": "3dcac959d3454ccb6dfc0cbe4a14b2aa", "score": "0.7327617", "text": "public function __construct()\n {\n $this->_db = DatabaseFactory::getDefaultPdoObject();\n }", "title": "" }, { "docid": "370da19a1f3861d4a033e0bb974d6d30", "score": "0.7319794", "text": "public function __construct($db) {\n $this->conn = $db;\n }", "title": "" }, { "docid": "370da19a1f3861d4a033e0bb974d6d30", "score": "0.7319794", "text": "public function __construct($db) {\n $this->conn = $db;\n }", "title": "" }, { "docid": "370da19a1f3861d4a033e0bb974d6d30", "score": "0.7319794", "text": "public function __construct($db) {\n $this->conn = $db;\n }", "title": "" }, { "docid": "370da19a1f3861d4a033e0bb974d6d30", "score": "0.7319794", "text": "public function __construct($db) {\n $this->conn = $db;\n }", "title": "" }, { "docid": "78ddeab5da203b6020b22d4f2e39bb6f", "score": "0.7311744", "text": "public function __construct($db){\n $this-> conn = $db;\n }", "title": "" }, { "docid": "1bc51af02fe12ec4c1a9f4c3ffbfae69", "score": "0.7310299", "text": "function __construct()\r\n {\r\n $this->openDatabaseConnection();\r\n $this->openMagentoConnection();\r\n }", "title": "" }, { "docid": "530fd1e538fd8f72b00a7b9777b49c04", "score": "0.73069113", "text": "private function __construct(){\n $this->createConnection();\n }", "title": "" }, { "docid": "530fd1e538fd8f72b00a7b9777b49c04", "score": "0.73069113", "text": "private function __construct(){\n $this->createConnection();\n }", "title": "" }, { "docid": "4d68076df8ab8004982df4c2de6ecc57", "score": "0.7305685", "text": "public function __construct($db)\n {\n $this->conn = $db;\n }", "title": "" }, { "docid": "4d68076df8ab8004982df4c2de6ecc57", "score": "0.7305685", "text": "public function __construct($db)\n {\n $this->conn = $db;\n }", "title": "" }, { "docid": "4d68076df8ab8004982df4c2de6ecc57", "score": "0.7305685", "text": "public function __construct($db)\n {\n $this->conn = $db;\n }", "title": "" }, { "docid": "4d68076df8ab8004982df4c2de6ecc57", "score": "0.7305685", "text": "public function __construct($db)\n {\n $this->conn = $db;\n }", "title": "" }, { "docid": "4d68076df8ab8004982df4c2de6ecc57", "score": "0.7305685", "text": "public function __construct($db)\n {\n $this->conn = $db;\n }", "title": "" }, { "docid": "4d68076df8ab8004982df4c2de6ecc57", "score": "0.7305685", "text": "public function __construct($db)\n {\n $this->conn = $db;\n }", "title": "" }, { "docid": "4d68076df8ab8004982df4c2de6ecc57", "score": "0.7305685", "text": "public function __construct($db)\n {\n $this->conn = $db;\n }", "title": "" }, { "docid": "4d68076df8ab8004982df4c2de6ecc57", "score": "0.7305685", "text": "public function __construct($db)\n {\n $this->conn = $db;\n }", "title": "" }, { "docid": "4d68076df8ab8004982df4c2de6ecc57", "score": "0.7305685", "text": "public function __construct($db)\n {\n $this->conn = $db;\n }", "title": "" }, { "docid": "4d68076df8ab8004982df4c2de6ecc57", "score": "0.7305685", "text": "public function __construct($db)\n {\n $this->conn = $db;\n }", "title": "" }, { "docid": "4d68076df8ab8004982df4c2de6ecc57", "score": "0.7305685", "text": "public function __construct($db)\n {\n $this->conn = $db;\n }", "title": "" }, { "docid": "4d68076df8ab8004982df4c2de6ecc57", "score": "0.7305685", "text": "public function __construct($db)\n {\n $this->conn = $db;\n }", "title": "" }, { "docid": "4d68076df8ab8004982df4c2de6ecc57", "score": "0.7305685", "text": "public function __construct($db)\n {\n $this->conn = $db;\n }", "title": "" }, { "docid": "4d68076df8ab8004982df4c2de6ecc57", "score": "0.7305685", "text": "public function __construct($db)\n {\n $this->conn = $db;\n }", "title": "" }, { "docid": "4d68076df8ab8004982df4c2de6ecc57", "score": "0.7305685", "text": "public function __construct($db)\n {\n $this->conn = $db;\n }", "title": "" }, { "docid": "4d68076df8ab8004982df4c2de6ecc57", "score": "0.7305685", "text": "public function __construct($db)\n {\n $this->conn = $db;\n }", "title": "" }, { "docid": "4d68076df8ab8004982df4c2de6ecc57", "score": "0.7305685", "text": "public function __construct($db)\n {\n $this->conn = $db;\n }", "title": "" }, { "docid": "458ba2399405278c09e6e3647fb3cb1b", "score": "0.7305241", "text": "public function __construct() {\n\n $this->_db = DB::getInstance();\n }", "title": "" }, { "docid": "2db996b15d2ba426e9cfa68125e66233", "score": "0.7304819", "text": "public function __construct() {\n\t\t$_db = new Db;\n\t\t$this->_pdo = $_db->connect();\n\t}", "title": "" }, { "docid": "20661037b97864f32efb55b008349aa7", "score": "0.73044175", "text": "public function __construct($db) {\r\n $this->conn = $db;\r\n }", "title": "" }, { "docid": "cbb27b5ae2c4d067811d344a0d7ae0b2", "score": "0.7299009", "text": "protected function create_db_connection(){\n $this->db = new DBase();\n }", "title": "" }, { "docid": "40b5cd49f6c0d037ae039d75fc65e311", "score": "0.7297349", "text": "public function __construct()\n {\n $this->_db = DB::getInstance();\n }", "title": "" }, { "docid": "4a7ed02bcebaf45dc28adb011ac133c9", "score": "0.7291212", "text": "private function connect()\r\n\t{\r\n\t\tswitch(static::getDbName())\r\n\t\t{\r\n\t\t\tcase static::$active['db']['name']:\r\n\t\t\t$this->connection = \\Yii::$app->db;\r\n\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\t$this->connection = new Connection([\r\n\t\t\t\t'dsn' => static::$active['driver'].\":host=\".$this->host.\";dbname=\".static::$active['db']['name'],\r\n\t\t\t\t'username' => $this->username,\r\n\t\t\t\t'password' => $this->_password\r\n\t\t\t]);\r\n\t\t\t$this->connection->open();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "9bd1c1dbeb09dce2fba057637403dcea", "score": "0.72886497", "text": "public function __construct()\n { //ovde pristupamo public metodi klase Connect i trazimo tu instancu\n $this->db = Connect::getInstance();\n }", "title": "" } ]
a4997b748eeb24e46cbc28cb80d93a38
CLASS FUNCTIONS: function classMethod [classFunction Description] [Put PseudoCode Here]
[ { "docid": "a4205947613bfae2e9c49e47abcfcc04", "score": "0.76817733", "text": "function classMethod($param1, $param2) \n {\n // CODE\n }", "title": "" } ]
[ { "docid": "ce5b0b7ba88378edd82e952be6133a11", "score": "0.6524424", "text": "private function handleClassMethodNode(Node $node)\n {\n if (!$node instanceof ClassMethod) {\n return;\n }\n\n $return_type = $this->getClassMethodReturnType($node);\n $this->current_function++;\n $this->analyzed_functions[$this->current_function] = new AnalyzedFunction(\n $this->current_class,\n $node->name,\n $return_type,\n $return_type !== null,\n $this->getClassMethodParameters($node)\n );\n\n if ($node->getDocComment() === null) {\n return;\n }\n\n $docblock = new Docblock($node->getDocComment()->getText());\n $this->analyzed_functions[$this->current_function]->setDocblock($docblock);\n }", "title": "" }, { "docid": "6841a2831a0ec76e010797e82a1cf1a4", "score": "0.64680696", "text": "public function GetMethod ();", "title": "" }, { "docid": "0aee519535e42de5cb94f264a575d9f8", "score": "0.6268497", "text": "function get_class_methods ($class_name) {}", "title": "" }, { "docid": "c165b022ed4a22234a4b3880b15afee7", "score": "0.6227628", "text": "public function method5();", "title": "" }, { "docid": "63024b7ece3247cc714e0f45f81aa28b", "score": "0.62140346", "text": "abstract public function getMethod();", "title": "" }, { "docid": "d21237f1fe93210ffd506d7da7b2fad3", "score": "0.61765337", "text": "function classMethod($param1, $param2) \n {\n // CODE\n //return $this->getValueByFieldName( 'applicant_codename' );\n }", "title": "" }, { "docid": "d21237f1fe93210ffd506d7da7b2fad3", "score": "0.61765337", "text": "function classMethod($param1, $param2) \n {\n // CODE\n //return $this->getValueByFieldName( 'applicant_codename' );\n }", "title": "" }, { "docid": "d21237f1fe93210ffd506d7da7b2fad3", "score": "0.61765337", "text": "function classMethod($param1, $param2) \n {\n // CODE\n //return $this->getValueByFieldName( 'applicant_codename' );\n }", "title": "" }, { "docid": "d21237f1fe93210ffd506d7da7b2fad3", "score": "0.61765337", "text": "function classMethod($param1, $param2) \n {\n // CODE\n //return $this->getValueByFieldName( 'applicant_codename' );\n }", "title": "" }, { "docid": "d21237f1fe93210ffd506d7da7b2fad3", "score": "0.61765337", "text": "function classMethod($param1, $param2) \n {\n // CODE\n //return $this->getValueByFieldName( 'applicant_codename' );\n }", "title": "" }, { "docid": "d21237f1fe93210ffd506d7da7b2fad3", "score": "0.61765337", "text": "function classMethod($param1, $param2) \n {\n // CODE\n //return $this->getValueByFieldName( 'applicant_codename' );\n }", "title": "" }, { "docid": "d21237f1fe93210ffd506d7da7b2fad3", "score": "0.61765337", "text": "function classMethod($param1, $param2) \n {\n // CODE\n //return $this->getValueByFieldName( 'applicant_codename' );\n }", "title": "" }, { "docid": "d21237f1fe93210ffd506d7da7b2fad3", "score": "0.61765337", "text": "function classMethod($param1, $param2) \n {\n // CODE\n //return $this->getValueByFieldName( 'applicant_codename' );\n }", "title": "" }, { "docid": "d21237f1fe93210ffd506d7da7b2fad3", "score": "0.61765337", "text": "function classMethod($param1, $param2) \n {\n // CODE\n //return $this->getValueByFieldName( 'applicant_codename' );\n }", "title": "" }, { "docid": "190382c2deff7069d9e4bcd58926d9aa", "score": "0.612826", "text": "function getClass();", "title": "" }, { "docid": "65979c6cb9a03a0edd2333ab44846425", "score": "0.6051252", "text": "private function __create_class($row, $class, $base, $namespace)\r\n {\r\n $namespace = ($namespace) ? \"namespace $namespace ;\" : '';\r\n $classtext = <<<END\r\n$namespace\r\n\r\nclass $class extends $base\r\n {\r\n public function __construct ( \\$row )\r\n {\r\n parent::__construct ( \\$row ) ;\r\n }\r\n\r\nEND;\r\n $methods = array();\r\n foreach ($row->Methods_ as $row_method) {\r\n $method = array(\r\n 'name' => $row_method->Name,\r\n 'parameters' => array(),\r\n 'has-result' => false\r\n );\r\n if ($row_method->InParameters) {\r\n foreach ($row_method->InParameters->Properties_ as $parameter)\r\n $method['parameters'][] = array(\r\n 'name' => $parameter->Name,\r\n 'out' => false\r\n );\r\n }\r\n\r\n if ($row_method->OutParameters) {\r\n foreach ($row_method->OutParameters->Properties_ as $parameter) {\r\n if (!strcasecmp($parameter->Name, 'ReturnValue'))\r\n $method['has-result'] = true;\r\n else\r\n $method['parameters'][] = array(\r\n 'name' => $parameter->Name,\r\n 'out' => true\r\n );\r\n }\r\n }\r\n\r\n $methods[] = $method;\r\n }\r\n\r\n // Build method text\r\n foreach ($methods as $method) {\r\n\r\n // Function header\r\n $classtext .= \"\\n\\n\\tpublic function {$method['name']} ( \";\r\n\r\n // Function arguments\r\n $list = array();\r\n foreach ($method['parameters'] as $parameter) {\r\n if ($parameter['out'])\r\n $item = '&$' . $parameter['name'];\r\n else\r\n $item = '$' . $parameter['name'];\r\n $list[] = $item;\r\n }\r\n\r\n $classtext .= implode(', ', $list) . \" )\\n\\t {\\n\";\r\n\r\n // Create a variant for each OUT parameter\r\n foreach ($method['parameters'] as $parameter) {\r\n if ($parameter['out']) {\r\n $classtext .= \"\\t\\t\\$vt_{$parameter['name']};\\n\"; #@%+=FEFGT6R3987EFDF86347GR=+%@#\"= new \\VARIANT ( ) ;\\n\";\r\n }\r\n }\r\n\r\n // Call the underlying COM function\r\n $classtext .= \"\\n\\t\\t\\$__result__( \"; #@%+=FEFGT6R3987EFDF86347GR=+%@#\"= \\$this -> WmiRow -> {$method['name']} ( \";\r\n $list = array();\r\n foreach ($method['parameters'] as $parameter) {\r\n if ($parameter['out'])\r\n $item = '$vt_' . $parameter['name'];\r\n else\r\n $item = '$' . $parameter['name'];\r\n $list[] = $item;\r\n }\r\n\r\n $classtext .= implode(', ', $list) . \" ) ;\\n\\n\";\r\n\r\n // Convert OUT parameters from variant to PHP data\r\n foreach ($method['parameters'] as $parameter) {\r\n if ($parameter['out'])\r\n $classtext .= \"\\t\\t\\${$parameter['name']};\"; #@%+=FEFGT6R3987EFDF86347GR=+%@#\"= Wmi::FromVariant ( \\$vt_{$parameter['name']} ) ;\\n\";\r\n }\r\n\r\n $classtext .= \"\\n\";\r\n\r\n // If method returns a value then convert it\r\n if ($method['has-result'])\r\n $classtext .= \"\\t\\treturn ( Wmi::FromVariant ( \\$__result__ ) ) ;\\n\";\r\n $classtext .= \"\\t }\\n\";\r\n }\r\n\r\n // Create the class\r\n $classtext = $classtext . \"\\n }\";\r\n\r\n eval($classtext);\r\n }", "title": "" }, { "docid": "8dfd2f5da106754a1aeb748f581d38c0", "score": "0.60472584", "text": "function tclass($function, $params, $content,$arrayin=false) {\n\t}", "title": "" }, { "docid": "9b2e747ffb6945e8d446ed7597d00690", "score": "0.60228753", "text": "function cc(string $class, string $method)\n{\n return sprintf('%s::%s', $class, $method);\n}", "title": "" }, { "docid": "551cb4e991d07e293c29bd6cf51bd964", "score": "0.600717", "text": "public function get_method() { }", "title": "" }, { "docid": "54f89a5e5b28dbf032152ba9fa113076", "score": "0.59563094", "text": "public function static(string $class, string $method, int $position): string;", "title": "" }, { "docid": "341cea66da921981b08d2905ba7ae555", "score": "0.5936692", "text": "public function getMethod ();", "title": "" }, { "docid": "7089b337e075e3d48da15c273206c768", "score": "0.59152764", "text": "function class_methods ($class_name)\n{\n return get_class_methods($class_name);\n}", "title": "" }, { "docid": "f32b186e2a0503c28483ea05be024a5e", "score": "0.5884145", "text": "public function getRealMethod();", "title": "" }, { "docid": "21951b672c1d8c19c345b1935cae822f", "score": "0.58522683", "text": "protected function parseMethods(SimpleXMLElement $xmlClass, array $class)\n {\n $className = (string)$xmlClass->full_name;\n \n $methods = [];\n foreach ($xmlClass->method as $method) {\n $methodName = (string)$method->name;\n\n $return = $method->xpath('docblock/tag[@name=\"return\"]');\n \n\n if (count($return)) {\n $returnType = (string)$return[0]->type;\n $returnDescription = (string)$return[0]['description'];\n } else {\n $returnType = 'mixed';\n $returnDescription = '';\n }\n\n $arguments = [];\n\n foreach ($method->argument as $argument) {\n $nArgument = [\n 'type' => (string)$argument->type,\n 'name' => (string)$argument->name\n ];\n\n $tags = $method->xpath(\n sprintf('docblock/tag[@name=\"param\" and @variable=\"%s\"]', $nArgument['name'])\n );\n\n if (count($tags)) {\n $tag = $tags[0];\n\n if ((string)$tag['type']) {\n $nArgument['type'] = (string)$tag['type'];\n }\n\n if ((string)$tag['description']) {\n $nArgument['description'] = preg_replace(\n '#(^'.preg_quote('<p>').')|('.preg_quote('</p>').'$)#', \n '',\n (string)$tag['description']\n );\n \n $nArgument['description'] = trim($nArgument['description']);\n }\n\n if ((string)$tag['variable']) {\n $nArgument['name'] = (string)$tag['variable'];\n }\n }\n\n $arguments[] = $nArgument;\n }\n \n $methods[$methodName] = (new PHP\\Method)\n ->setName($methodName)\n ->setArguments($arguments)\n ->setDescription($method->docblock->description . $method->docblock->{'long-description'})\n ->setVisibility((string) $method['visibility'])\n ->isAbstract( ((string)$method['abstract']) == \"true\")\n ->isStatic( ((string)$method['static']) == \"true\")\n ->isFinal( ((string)$method['final']) == \"true\")\n ->isDeprecated( count($xmlClass->xpath('docblock/tag[@name=\"deprecated\"]')) > 0)\n ->isDefinedBy($className)\n ->setReturnType($returnType)\n ->setReturnDescription($returnDescription)\n ->setFile($class['path'])\n ->setLine((string)$method['line'])\n ;\n \n }\n\n return $methods;\n }", "title": "" }, { "docid": "ccd89d5349dbd8622ba03cb4c7a3e9f4", "score": "0.58424014", "text": "public function getMethod();", "title": "" }, { "docid": "ccd89d5349dbd8622ba03cb4c7a3e9f4", "score": "0.58424014", "text": "public function getMethod();", "title": "" }, { "docid": "ccd89d5349dbd8622ba03cb4c7a3e9f4", "score": "0.58424014", "text": "public function getMethod();", "title": "" }, { "docid": "ccd89d5349dbd8622ba03cb4c7a3e9f4", "score": "0.58424014", "text": "public function getMethod();", "title": "" }, { "docid": "ccd89d5349dbd8622ba03cb4c7a3e9f4", "score": "0.58424014", "text": "public function getMethod();", "title": "" }, { "docid": "ccd89d5349dbd8622ba03cb4c7a3e9f4", "score": "0.58424014", "text": "public function getMethod();", "title": "" }, { "docid": "ccd89d5349dbd8622ba03cb4c7a3e9f4", "score": "0.58424014", "text": "public function getMethod();", "title": "" }, { "docid": "ccd89d5349dbd8622ba03cb4c7a3e9f4", "score": "0.58424014", "text": "public function getMethod();", "title": "" }, { "docid": "aabb44ff484d0371ad9b3b2c73a926f5", "score": "0.58338183", "text": "public abstract function method1();", "title": "" }, { "docid": "4bb8fdf246e91ed78954a38c770d1ee6", "score": "0.58290946", "text": "public function getMethod()\n {\n }", "title": "" }, { "docid": "5e55143186c443a0658e98096bc7acb9", "score": "0.5803193", "text": "public function CallService($class, $method)\n {\n global $g_BizSystem;\n //$ret = $g_BizSystem->CallService($class, $method, $this->m_Name);\n $svcobj = $g_BizSystem->GetService($class);\n $svcobj->$method($this->m_Name);\n }", "title": "" }, { "docid": "1de72a8639d61c3aaee30646c0091d9f", "score": "0.5737621", "text": "abstract protected function getMethod(): string;", "title": "" }, { "docid": "67285236a3cda92e89455565cb9df1f3", "score": "0.5703323", "text": "abstract public function getMethod(): string;", "title": "" }, { "docid": "74d6dbe2dc7b0f7bfb5890fa22dce1a5", "score": "0.56739765", "text": "public function test_allMethods_called__correctReturn($method, $class)\n {\n $actual = $this->configureSut()->$method();\n $this->assertInstanceOf($class, $actual);\n }", "title": "" }, { "docid": "ccf7e79dd563c5d66019779619e776e1", "score": "0.565307", "text": "public function testFunctionRunMethod()\n {\n /* method is not string or closure */\n $this->assertNull($this->app->runMethod('some-class', 2000));\n\n /* method is string and id not class */\n $this->assertNull($this->app->runMethod('not-class', 'some-method'));\n\n /* set reflection classes entry of the application */\n /* if method is constructor and constructor does not exist return instance of the class */\n $sampleService = $this->app->runMethod(SampleService::class);\n $reflectionClasses = $this->app->getReflections();\n $this->assertArrayHasKey(SampleService::class, $reflectionClasses);\n $this->assertInstanceOf(\\ReflectionClass::class, $reflectionClasses[SampleService::class]);\n $this->assertInstanceOf(SampleService::class, $sampleService);\n\n /* set reflection classes function entry of the application */\n /* if method is closure with parameters return output by executing the function */\n $function = function (string $name, SampleServiceInterface $sampleService) { return ['name' => $name, 'sampleService' => $sampleService]; };\n $services = [SampleServiceInterface::class => SampleService::class];\n $parameters = ['name' => 'Amit Sidhpura'];\n $return = $this->app->runMethod('sample-closure', $function, $services, $parameters);\n $reflectionClasses = $this->app->getReflections();\n $this->assertArrayHasKey('sample-closure', $reflectionClasses);\n $this->assertInstanceOf(\\ReflectionFunction::class, $reflectionClasses['sample-closure']);\n $this->assertSame('Amit Sidhpura', $return['name']);\n $this->assertInstanceOf(SampleService::class, $return['sampleService']);\n\n /* if method is constructor with parameters return instance of the class */\n $services = [SampleServiceForServicesArgumentInterface::class => SampleServiceForServicesArgument::class];\n $parameters = ['name' => 'Amit Sidhpura'];\n $sampleServiceHasParameters = $this->app->runMethod(SampleServiceHasParameters::class, '__construct', $services, $parameters);\n $this->assertInstanceOf(SampleServiceHasParameters::class, $sampleServiceHasParameters);\n $this->assertSame('Amit Sidhpura', $sampleServiceHasParameters->name);\n $this->assertInstanceOf(SampleServiceForServicesArgument::class, $sampleServiceHasParameters->sampleServiceForServicesArgument);\n\n /* if method is class method with parameters return output by executing the function */\n $this->app->set(SampleServiceHasParameters::class, ['services' => $services, 'parameters' => $parameters]);\n $return = $this->app->runMethod(SampleServiceHasParameters::class, 'methodHasParameters', $services, $parameters);\n $this->assertSame('Amit Sidhpura', $return['name']);\n $this->assertInstanceOf(SampleServiceForServicesArgument::class, $return['sampleServiceForServicesArgument']);\n\n /* throws parameter not found exception */\n $this->expectException(MissingParameterException::class);\n $parameters = [];\n $this->app->runMethod(SampleServiceHasParameters::class, 'methodHasParameters', $services, $parameters);\n }", "title": "" }, { "docid": "a20db2b95f75d875e566f775f5432887", "score": "0.56468326", "text": "public function testCreateMyClass() {\n }", "title": "" }, { "docid": "bcb09217713566ccc874f49d16697fb0", "score": "0.5615638", "text": "private function Method7(){}", "title": "" }, { "docid": "393d5b00fbbfbcef5be945979ec24088", "score": "0.5609118", "text": "public function handle($class_name){\n \n \n \n \n }", "title": "" }, { "docid": "4ed8de5589e1f5591cd5c2abbfd55817", "score": "0.5584725", "text": "function get_methods($app, $class)\n {\n clearos_profile(__METHOD__, __LINE__);\n\n require_once clearos_app_base($app) . '/libraries/' . $class . '.php';\n\n $class_path = '\\clearos\\apps\\\\' . $app . '\\\\' . $class;\n $object = new $class_path();\n\n $all_methods = get_class_methods($object);\n $methods = [];\n\n foreach ($all_methods as $method) {\n if (!preg_match('/^_/', $method))\n $methods[] = $method;\n }\n\n sort($methods);\n\n return $this->_response(API::CODE_OK, lang('base_success'), $methods);\n }", "title": "" }, { "docid": "7e36c42ad734158c1627a4a8bdfe9906", "score": "0.55822074", "text": "public function method()\n\t{\n\t\techo 'THIS METHOD<br>';\n\t}", "title": "" }, { "docid": "e240739c31a8b87e110200fdc7aa383f", "score": "0.5576843", "text": "public function DemoMethod(){\r\n\t}", "title": "" }, { "docid": "fdea41861184685fcc5de8154726b59c", "score": "0.55733114", "text": "public function getRealMethod(): string;", "title": "" }, { "docid": "e8e25fedb1611573d6cae04965285081", "score": "0.5572511", "text": "function execute($class, $methodName, $instance = null, $args = []) {\n\t\tif (is_string($class)) $class = new \\ReflectionClass($class);\n\t\t$methods = $this->getDefinedMethods($class, $methodName);\n\t\t$final = $this->iv;\n\t\tforeach ($methods as $method) {\n\t\t\t$final = call_user_func($this->op, $final, $method->invokeArgs($instance, $args));\n\t\t}\n\t\treturn $final;\n\t}", "title": "" }, { "docid": "49374b285dc723df8a74a85d76357b18", "score": "0.5557407", "text": "abstract function __invoke();", "title": "" }, { "docid": "c28dbf5c00cca946128d5542ffe6a624", "score": "0.55534536", "text": "public function isClassMethod()\n {\n return $this->object instanceof ClassMethod;\n }", "title": "" }, { "docid": "cc497ea14f98a8ba8c6a8de6c5f447b0", "score": "0.55507296", "text": "public function Bar()\n {\n // treated as regular method as of PHP 5.3.3\n }", "title": "" }, { "docid": "d84274b61a1d19f0780b8e04a1538daf", "score": "0.55247635", "text": "protected function _addMethods($class)\n {\n $this->api[$class]['methods'] = array();\n \n $reflect = new ReflectionClass($class);\n \n foreach ($reflect->getMethods() as $method) {\n \n // get the method name\n $name = $method->getName();\n \n // parse the doc comments\n $docs = $this->_phpdoc->parse($method->getDocComment());\n \n // the basic method information\n $info = array(\n 'from' => false,\n 'name' => $name,\n 'summ' => $docs['summ'],\n 'narr' => $docs['narr'],\n 'tech' => $docs['tech'],\n 'abstract' => $method->isAbstract() ? 'abstract' : false,\n 'access' => null,\n 'static' => $method->isStatic() ? 'static' : false,\n 'final' => $method->isFinal() ? 'final' : false,\n 'return' => null,\n 'byref' => $method->returnsReference() ? '&' : false,\n 'params' => array(),\n );\n \n // add the access visibility\n if ($method->isPublic()) {\n $info['access'] = 'public';\n } elseif ($method->isProtected()) {\n $info['access'] = 'protected';\n } elseif ($method->isPrivate()) {\n $info['access'] = 'private';\n }\n \n // is this a class we ignore?\n // use the declaring class, not the current class, because\n // the property may be inherited.\n $decl = $method->getDeclaringClass()->getName();\n $ignore = (array) @$this->_ignore[$decl]['methods'];\n \n // is there a summary line?\n if (empty($docs['summ'])) {\n // no summary line. \n if (! in_array($name, $ignore)) {\n // not in the list of ignored methods\n $this->_log($class, \"method '$name' has no summary\");\n }\n }\n \n // find the return type in the technical docs\n if ($method->isConstructor()) {\n // it's a constructor, so it returns its own class\n $info['return'] = $class;\n } elseif (! empty($docs['tech']['return']['type'])) {\n // return type comes from tech docs\n $info['return'] = $docs['tech']['return']['type'];\n } else {\n // no return type noted in the class docs\n $info['return'] = $this->_config['unknown'];\n \n // can we ignore this lack of type?\n if (! in_array($name, $ignore)) {\n // not to be ignored\n $unknown = $this->_config['unknown'];\n $this->_log($class, \"method '$name' has unknown @return type, used '$unknown'\");\n }\n }\n \n // add the parameters\n $info['params'] = $this->_getParameters($class, $method, $docs['tech']);\n \n // save in the API\n $this->api[$class]['methods'][$name] = $info;\n \n // was it inherited after all?\n $inherited = $this->_isInheritedMethod($class, $method);\n $this->api[$class]['methods'][$name]['from'] = $inherited;\n }\n \n // sort them\n ksort($this->api[$class]['methods']);\n }", "title": "" }, { "docid": "752c896b72102e972f3e6f05c918cc68", "score": "0.55227983", "text": "abstract public function getTestedClass();", "title": "" }, { "docid": "db40355a931dd96f8e100c0fd64fa066", "score": "0.5511882", "text": "protected abstract function getMethod(): string;", "title": "" }, { "docid": "36bb7c15c8a0d35b93a6d6437d1e9f04", "score": "0.55110556", "text": "function call_static_method($class, $method) {\n $args = func_get_args();\n array_shift($args);\n array_shift($args);\n return call_user_func_array(array($class, $method), $args);\n}", "title": "" }, { "docid": "80b932b43bb8f03e19d63586b85cce02", "score": "0.54936963", "text": "abstract public function invoke($method,$params);", "title": "" }, { "docid": "4fa613bb52aa980cf0edf2f3ad3922e7", "score": "0.54868466", "text": "private function _methodToClass($method) {\n\t\t$method = substr($method, 3, (strlen($method) - 3));\n\t\t$upper = range('A', 'Z');\n\n\t\t$new_string = \"\";\n\t\t$method_length = strlen($method);\n\t\t$upper_switch = in_array($method[$i], $upper);\n\t\tfor( $i = 0 ; $i < $method_length ; $i++) {\n\t\t\tif(false == $upper_switch && true == in_array($method[$i], $upper)) {\n\t\t\t\t$new_string .= \"_\";\n\t\t\t}\n\n\t\t\tif(false == $numeric_switch && true == is_numeric($method[$i])) {\n\t\t\t\t$new_string .= \"_\";\n\t\t\t}\n\n\t\t\t$new_string .= $method[$i];\n\t\t\t$upper_switch = in_array($method[$i], $upper);\n\t\t\t$numeric_switch = is_numeric($method[$i]);\n\t\t}\n\t\treturn $new_string;\n\t}", "title": "" }, { "docid": "19ab068a30a9324b2e05da00880eb091", "score": "0.5473411", "text": "public function getMethod() : \\string;", "title": "" }, { "docid": "c18ac8a4472bce67cd78c2a931feb394", "score": "0.54705447", "text": "abstract function objectClassName();", "title": "" }, { "docid": "40432067520af65e450d089275273e86", "score": "0.54629326", "text": "function yy_r95(){ $this->_retvalue = yy('Class', $this->yystack[$this->yyidx + -2]->minor, $this->yystack[$this->yyidx + 0]->minor); }", "title": "" }, { "docid": "d4c66feda499bd09d86a0d2d42c39303", "score": "0.5433869", "text": "public function call_method($class = null, $method = '', $param_arr = null){\n\t\t/**\n\t\t * if the $method is empty, get the current $_GET array 'page' element\n\t\t * mostly this is the index of the class\n\t\t * */\n\t\tif( sanitize_text_field($method) == '' ){\n\t\t\t$method = $this->get_method();\n\t\t}\n\t\t/**\n\t\t * make sure method name hyphen is converted into underscore\n\t\t * */\n\t\t$method = str_replace('-', '_', $method);\n\t\t/**\n\t\t * check if method exists and if its callable\n\t\t * */\n\t\tif(\n\t\t\tmethod_exists($class, $method)\n\t\t\t&& is_callable(array($class, $method))\n\t\t){\n\t\t\treturn call_user_func_array(array($class, $method), array($param_arr));\n\t\t}\n\t}", "title": "" }, { "docid": "7c801c8f92ff038ee06cf4dd3098ddf6", "score": "0.5431956", "text": "protected static function _invokeMethod($class, $method, $args) {\n\t\tif (!is_object($class))\n\t\t\t$class = new $class();\n\n\t\tswitch(count($args)) :\n\t\t\tcase 0 :\n\t\t\t\treturn $class -> {$method}();\n\t\t\t\tbreak;\n\t\t\tcase 1 :\n\t\t\t\treturn $class -> {$method}($args[0]);\n\t\t\t\tbreak;\n\t\t\tcase 2 :\n\t\t\t\treturn $class -> {$method}($args[0], $args[1]);\n\t\t\t\tbreak;\n\t\t\tcase 3 :\n\t\t\t\treturn $class -> {$method}($args[0], $args[1], $args[2]);\n\t\t\t\tbreak;\n\t\t\tcase 4 :\n\t\t\t\treturn $class -> {$method}($args[0], $args[1], $args[2], $args[3]);\n\t\t\t\tbreak;\n\t\t\tcase 5 :\n\t\t\t\treturn $class -> {$method}($args[0], $args[1], $args[2], $args[3], $args[4]);\n\t\t\t\tbreak;\n\t\t\tdefault :\n\t\t\t\treturn call_user_func_array(array($class, $method), $args);\n\t\t\t\tbreak;\n\t\tendswitch;\n\n\t}", "title": "" }, { "docid": "b1ef72baf60cc3a48798d5745c12fb7a", "score": "0.5414378", "text": "public function getClass() : string;", "title": "" }, { "docid": "b1ef72baf60cc3a48798d5745c12fb7a", "score": "0.5414378", "text": "public function getClass() : string;", "title": "" }, { "docid": "27c72c64b33477f3af111712205ef9c0", "score": "0.54127795", "text": "function spl_classes () {}", "title": "" }, { "docid": "cfc58e61e706b7891eba32a3fb175797", "score": "0.5405049", "text": "public function className();", "title": "" }, { "docid": "e5cea0e2380eb7f1664346ea3f2a43ed", "score": "0.5403613", "text": "public function getMethod() : string;", "title": "" }, { "docid": "e5cea0e2380eb7f1664346ea3f2a43ed", "score": "0.5403613", "text": "public function getMethod() : string;", "title": "" }, { "docid": "e5cea0e2380eb7f1664346ea3f2a43ed", "score": "0.5403613", "text": "public function getMethod() : string;", "title": "" }, { "docid": "e5cea0e2380eb7f1664346ea3f2a43ed", "score": "0.5403613", "text": "public function getMethod() : string;", "title": "" }, { "docid": "1e7f3fc923932618ed8c2f6b8ca5614c", "score": "0.5402082", "text": "function yy_r96(){ $this->_retvalue = yy('Class', $this->yystack[$this->yyidx + -3]->minor, $this->yystack[$this->yyidx + -1]->minor, $this->yystack[$this->yyidx + 0]->minor); }", "title": "" }, { "docid": "a69e28f6b1cf7b5b5c75f7959fb76634", "score": "0.5399769", "text": "public function printMethodName(){\r\n echo 'This is ' . __METHOD__ . \"\\n</br>\"; //This is TestMagic\\Magic::printMethodName \r\n }", "title": "" }, { "docid": "38934067689296f9533782d8bbfd097e", "score": "0.53881377", "text": "function yy_r94(){ $this->_retvalue = yy('Class', $this->yystack[$this->yyidx + -1]->minor, NULL, $this->yystack[$this->yyidx + 0]->minor); }", "title": "" }, { "docid": "a2615333a5417b67bcbfc7163f3d0a50", "score": "0.537404", "text": "function _synergycpreseller_map_class($class) {\n\tforeach ($class::functions() as $name => $method) {\n\t\t$fullName = 'synergycpreseller_' . $name;\n\t\teval('function ' . $fullName . ' (array $params)\n {\n return ' . App::class . '::get($params)\n ->make(\"' . $class . '\")\n ->' . $method . '();\n }');\n\t}\n}", "title": "" }, { "docid": "22ff0403333b6cb47d295bdff2b87dec", "score": "0.53667015", "text": "public function __invoke();", "title": "" }, { "docid": "5a774af7b3b5be35615e83ab25640353", "score": "0.53622174", "text": "public abstract function FunctionName(OtherClass $parameter);", "title": "" }, { "docid": "b7e7a1117e5840e38037ebf9767ea3cd", "score": "0.5353179", "text": "protected function getMethod($className)\n\t{\n\t\tif (!isset($this->methods[$className])) {\n\t\t\t$this->methods[$className] = new $className($this->extension);\n\t\t}\n\t\t\n\t\treturn $this->methods[$className];\n\t}", "title": "" }, { "docid": "d2829e2f20f34d4e8cb83f0407915ec8", "score": "0.53474975", "text": "static function method_exists($ctx, $class_name, $method_name)\n\t{\n\t\t$class_name = static::find_class($class_name);\n\t\tif (!class_exists($class_name)) return false;\n\t\tif (!method_exists($class_name, $method_name)) return false;\n\t\treturn true;\n\t}", "title": "" }, { "docid": "8f52d7917ed07e156dab500e4d300606", "score": "0.5315311", "text": "function invoke_method() {\n\t\t$this->debug('in invoke_method, methodname=' . $this->methodname . ' methodURI=' . $this->methodURI . ' SOAPAction=' . $this->SOAPAction);\n\n\t\tif ($this->wsdl) {\n\t\t\tif ($this->opData = $this->wsdl->getOperationData($this->methodname)) {\n\t\t\t\t$this->debug('in invoke_method, found WSDL operation=' . $this->methodname);\n\t\t\t\t$this->appendDebug('opData=' . $this->varDump($this->opData));\n\t\t\t} elseif ($this->opData = $this->wsdl->getOperationDataForSoapAction($this->SOAPAction)) {\n\t\t\t\t// Note: hopefully this case will only be used for doc/lit, since rpc services should have wrapper element\n\t\t\t\t$this->debug('in invoke_method, found WSDL soapAction=' . $this->SOAPAction . ' for operation=' . $this->opData['name']);\n\t\t\t\t$this->appendDebug('opData=' . $this->varDump($this->opData));\n\t\t\t\t$this->methodname = $this->opData['name'];\n\t\t\t} else {\n\t\t\t\t$this->debug('in invoke_method, no WSDL for operation=' . $this->methodname);\n\t\t\t\t$this->fault('Client', \"Operation '\" . $this->methodname . \"' is not defined in the WSDL for this service\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->debug('in invoke_method, no WSDL to validate method');\n\t\t}\n\n\t\t// if a . is present in $this->methodname, we see if there is a class in scope,\n\t\t// which could be referred to. We will also distinguish between two deliminators,\n\t\t// to allow methods to be called a the class or an instance\n\t\t$class = '';\n\t\t$method = '';\n\t\tif (strpos($this->methodname, '..') > 0) {\n\t\t\t$delim = '..';\n\t\t} else if (strpos($this->methodname, '.') > 0) {\n\t\t\t$delim = '.';\n\t\t} else {\n\t\t\t$delim = '';\n\t\t}\n\n\t\tif (strlen($delim) > 0 && substr_count($this->methodname, $delim) == 1 &&\n\t\t\tclass_exists(substr($this->methodname, 0, strpos($this->methodname, $delim)))) {\n\t\t\t// get the class and method name\n\t\t\t$class = substr($this->methodname, 0, strpos($this->methodname, $delim));\n\t\t\t$method = substr($this->methodname, strpos($this->methodname, $delim) + strlen($delim));\n\t\t\t$this->debug(\"in invoke_method, class=$class method=$method delim=$delim\");\n\t\t}\n\n\t\t// does method exist?\n\t\tif ($class == '') {\n\t\t\tif (!function_exists($this->methodname)) {\n\t\t\t\t$this->debug(\"in invoke_method, function '$this->methodname' not found!\");\n\t\t\t\t$this->result = 'fault: method not found';\n\t\t\t\t$this->fault('Client',\"method '$this->methodname' not defined in service\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else {\n\t\t\t$method_to_compare = (substr(phpversion(), 0, 2) == '4.') ? strtolower($method) : $method;\n\t\t\tif (!in_array($method_to_compare, get_class_methods($class))) {\n\t\t\t\t$this->debug(\"in invoke_method, method '$this->methodname' not found in class '$class'!\");\n\t\t\t\t$this->result = 'fault: method not found';\n\t\t\t\t$this->fault('Client',\"method '$this->methodname' not defined in service\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t// evaluate message, getting back parameters\n\t\t// verify that request parameters match the method's signature\n\t\tif(! $this->verify_method($this->methodname,$this->methodparams)){\n\t\t\t// debug\n\t\t\t$this->debug('ERROR: request not verified against method signature');\n\t\t\t$this->result = 'fault: request failed validation against method signature';\n\t\t\t// return fault\n\t\t\t$this->fault('Client',\"Operation '$this->methodname' not defined in service.\");\n\t\t\treturn;\n\t\t}\n\n\t\t// if there are parameters to pass\n\t\t$this->debug('in invoke_method, params:');\n\t\t$this->appendDebug($this->varDump($this->methodparams));\n\t\t$this->debug(\"in invoke_method, calling '$this->methodname'\");\n\t\tif (!function_exists('call_user_func_array')) {\n\t\t\tif ($class == '') {\n\t\t\t\t$this->debug('in invoke_method, calling function using eval()');\n\t\t\t\t$funcCall = \"\\$this->methodreturn = $this->methodname(\";\n\t\t\t} else {\n\t\t\t\tif ($delim == '..') {\n\t\t\t\t\t$this->debug('in invoke_method, calling class method using eval()');\n\t\t\t\t\t$funcCall = \"\\$this->methodreturn = \".$class.\"::\".$method.\"(\";\n\t\t\t\t} else {\n\t\t\t\t\t$this->debug('in invoke_method, calling instance method using eval()');\n\t\t\t\t\t// generate unique instance name\n\t\t\t\t\t$instname = \"\\$inst_\".time();\n\t\t\t\t\t$funcCall = $instname.\" = new \".$class.\"(); \";\n\t\t\t\t\t$funcCall .= \"\\$this->methodreturn = \".$instname.\"->\".$method.\"(\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->methodparams) {\n\t\t\t\tforeach ($this->methodparams as $param) {\n\t\t\t\t\tif (is_array($param)) {\n\t\t\t\t\t\t$this->fault('Client', 'NuSOAP does not handle complexType parameters correctly when using eval; call_user_func_array must be available');\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t$funcCall .= \"\\\"$param\\\",\";\n\t\t\t\t}\n\t\t\t\t$funcCall = substr($funcCall, 0, -1);\n\t\t\t}\n\t\t\t$funcCall .= ');';\n\t\t\t$this->debug('in invoke_method, function call: '.$funcCall);\n\t\t\t@eval($funcCall);\n\t\t} else {\n\t\t\tif ($class == '') {\n\t\t\t\t$this->debug('in invoke_method, calling function using call_user_func_array()');\n\t\t\t\t$call_arg = \"$this->methodname\";\t// straight assignment changes $this->methodname to lower case after call_user_func_array()\n\t\t\t} elseif ($delim == '..') {\n\t\t\t\t$this->debug('in invoke_method, calling class method using call_user_func_array()');\n\t\t\t\t$call_arg = array ($class, $method);\n\t\t\t} else {\n\t\t\t\t$this->debug('in invoke_method, calling instance method using call_user_func_array()');\n\t\t\t\t$instance = new $class ();\n\t\t\t\t$call_arg = array(&$instance, $method);\n\t\t\t}\n\t\t\t$this->methodreturn = call_user_func_array($call_arg, $this->methodparams);\n\t\t}\n $this->debug('in invoke_method, methodreturn:');\n $this->appendDebug($this->varDump($this->methodreturn));\n\t\t$this->debug(\"in invoke_method, called method $this->methodname, received $this->methodreturn of type \".gettype($this->methodreturn));\n\t}", "title": "" }, { "docid": "69551c7e42d381b1c3e32856024cb188", "score": "0.53143376", "text": "function yy_r90(){ $this->_retvalue = yy('Class', NULL, NULL, $this->yystack[$this->yyidx + 0]->minor); }", "title": "" }, { "docid": "ede32f4c0cfcb38ae02d82eec9264b43", "score": "0.530609", "text": "function __call($method_name, $args){\n\t\t$class_to_build=array_pop($this->calling_classes);\n\t\t$this->calling_classes=Array();\n\t\t//TODO different constructor args must create different objects\n\t\tif (!empty($args['FW_CONSTRUCTOR_ARGUMENTS'])) {\n\t\t\tunset($args['FW_CONSTRUCTOR_ARGUMENTS']);\n\t\t}\n\t\t$return_only_instance=($method_name==SPAM_config::$GET_INSTANCE_METHOD);\n\t\t//TODO we need here ability to have more than one object of given class\n\n\t\t$obj=FW::get_class_instance($class_to_build);\n\t\t\n\t\tif (!$obj) {\n\t\t\tif ( ($return_only_instance && class_exists($class_to_build)) || method_exists($class_to_build, $method_name) ) {\n\t\t\t\t$obj=new $class_to_build();\n\t\t\t\tFW::set_class_instance($obj, $class_to_build);\n\t\t\t} else {\n\t\t\t\terror_log('Framework cant call the method \"'.$class_to_build.'\"::\"'.$method_name.'\"');\n\t\t\t\texit();\n\t\t\t}\n\t\t}\n\n\t\tif ($return_only_instance){ return $obj; }\n\t\t\n\t\treturn call_user_func_array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t$obj,\n\t\t\t\t\t\t$method_name\n\t\t\t\t\t),\n\t\t\t\t\t$args \n\t\t\t\t);\n\t}", "title": "" }, { "docid": "329a91f5cfd60f7fd4aa919e073d09a7", "score": "0.5304752", "text": "public function __invoke()\n {\n }", "title": "" }, { "docid": "329a91f5cfd60f7fd4aa919e073d09a7", "score": "0.5304752", "text": "public function __invoke()\n {\n }", "title": "" }, { "docid": "329a91f5cfd60f7fd4aa919e073d09a7", "score": "0.5304752", "text": "public function __invoke()\n {\n }", "title": "" }, { "docid": "329a91f5cfd60f7fd4aa919e073d09a7", "score": "0.5304752", "text": "public function __invoke()\n {\n }", "title": "" }, { "docid": "4acb6d310aff301f5a8e23f10f607569", "score": "0.5291506", "text": "public function method(&$class, $method) {\n // Does the Method have a Documentation Block?\n if (isset($property['docblock'])) { // YES: Normalize it\n $docblock = $this->_commentToDocBlock($method['docblock']);\n\n if (isset($docblock)) {\n // Add Missing Properties\n $docblock['file'] = $method['file'];\n $docblock['line'] = $method['line'];\n $docblock['char'] = $method['char'];\n\n // Modify the Property Document Block\n $method['docblock'] = [$docblock];\n } else {\n unset($method['docblock']);\n }\n }\n\n $method['statements'] = $this->_processStatementBlock($method['statements']);\n return $method;\n }", "title": "" }, { "docid": "8b2491cd630586b88f5e4bf65dcf6c2c", "score": "0.5286834", "text": "public function setMethod($cls, $func) {\n $call = ucfirst($cls) . '.' . $func;\n $this->setStyleSheet(strtolower($cls));\n switch (ucfirst($cls)) {\n default :\n throw new Piwik_Segmentation_InvalidMethod($call . ' is not a valid piwik call');\n\n case 'Referers':\n break;\n case 'Goals':\n break;\n case 'Actions':\n break;\n }\n \n $this->setParam('method',$call);\n \n }", "title": "" }, { "docid": "ba083e70676663558ae53fcec1704cc8", "score": "0.528377", "text": "public function doSomethingAwesome()\n {\n }", "title": "" }, { "docid": "c68b788e91bf38699493ea08b6f521de", "score": "0.5281817", "text": "function Xtest_CallMethod() {\r\n\r\n\t\t// Later date. CallMethodRule not yet implemented\r\n\t\t// ........... \r\n\r\n\t}", "title": "" }, { "docid": "f4058e446fa671b47cf1e66f81f551f5", "score": "0.5278797", "text": "public function processApi()\n{\n$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['rquest'])));\nif((int)method_exists($this,$func) > 0)\n$this->$func();\nelse\n$this->response('',404); \n// If the method not exist with in this class, response would be \"Page not found\".\n}", "title": "" }, { "docid": "7a5180c73b3232d4b1b38aa42f6afd12", "score": "0.5263548", "text": "public function addToClass($class) {\n\n }", "title": "" }, { "docid": "f99a6592c28f8db14730fcb8158e35f2", "score": "0.5246397", "text": "function yy_r91(){ $this->_retvalue = yy('Class', NULL, $this->yystack[$this->yyidx + 0]->minor); }", "title": "" }, { "docid": "8316bd8469889d02fc1a3a1376d1d0c5", "score": "0.52418566", "text": "public function visitClassModel($class)\n {\n parent::visitClassModel($class);\n\n if ($this->testClass) {\n // do not explore classes of PHPUnit tests suites\n return;\n }\n\n foreach ($class->getMethods() as $method) {\n $method->accept($this);\n }\n }", "title": "" }, { "docid": "2efb7a3fe319a2ecb91f439654330a16", "score": "0.52415365", "text": "public function getMethod($classname, $methodname, $arg1 = '', $arg2 = '', $arg3 = '', $arg4 = '', $arg5 = '')\n {\n $class = 'BITS\\\\'.$classname;\n $method = $methodname;\n\n return $class::$method($arg1, $arg2, $arg3, $arg4, $arg5);\n }", "title": "" }, { "docid": "5a5c5b74ab76dc528941d27829b8cdcb", "score": "0.5237147", "text": "public function className() {}", "title": "" }, { "docid": "ce0d1f39bc9e768c85369e994b8fb18f", "score": "0.5210846", "text": "public function beforeMethod($classInstance, $methodName, array $args);", "title": "" }, { "docid": "28863ad7478a5cb197552e50d3914cba", "score": "0.5209799", "text": "protected function _can_access_method_of_class($method = NULL, $class = NULL)\n {\n $user_groups = $this->session->userdata('groups');\n $user_group = $user_groups[0];\n \n // get group\n $all_groups = $this->config->item('groups');\n\n if ( @$all_groups[$user_group]['*'] == '*' ||\n @$all_groups[$user_group][$class] == '*' ||\n @in_array($method, array($all_groups[$user_group][$class])) \n )\n {\n return true;\n }\n else if (@in_array('*', $all_groups[$user_group]['*']) || @in_array('*', $all_groups[$user_group][$class]))\n {\n return true;\n }\n else if (@in_array($method, $all_groups[$user_group][$class]))\n {\n return true;\n }\n return false;\n }", "title": "" } ]
4e55bc55297e2025c11689b68f735d53
Tears down the fixture, for example, closes a network connection. This method is called after a test is executed.
[ { "docid": "baa60fb505be392e4bd77e712d45fa19", "score": "0.0", "text": "protected function tearDown() {\n\t\t\n\t}", "title": "" } ]
[ { "docid": "1ca206bccacb923960d6fd5c2a3c4a14", "score": "0.80747306", "text": "protected function tearDown() {\n\t\tunset($this->fixture);\n\t}", "title": "" }, { "docid": "628be2b800bd15d42c3b6060c27f8157", "score": "0.7617165", "text": "public function teardown()\n {\n Mad_Test_Fixture_Base::resetToTeardown();\n foreach ($this->_fixtures as $fixture) {\n $fixture->teardown();\n }\n }", "title": "" }, { "docid": "ca09dcbf067150f6dc3224dd3ff35aa6", "score": "0.7411215", "text": "public function teardown()\n {\n $this->dispatchTeardown();\n }", "title": "" }, { "docid": "36e8a66c2d075f498f24df9995d89d9c", "score": "0.73776966", "text": "protected function tearDown()\r\n {\r\n\r\n if (!empty($this->record))\r\n {\r\n $this->em->remove($this->record);\r\n $this->em->flush();\r\n }\r\n $fixture = new WellnessFixtures();\r\n $fixture->unload($this->em);\r\n\r\n\r\n parent::tearDown();\r\n\r\n $this->em->close();\r\n $this->em = null;\r\n }", "title": "" }, { "docid": "f426c659fdfcbbd59e7ae08eba94327d", "score": "0.7345346", "text": "public function tearDown()\n {\n unset($this->deletedFixture);\n // since we do not touch $this->abandonedFixture, its collection\n // is not predictable. It can happen at any time after the tests execution.\n }", "title": "" }, { "docid": "70c9fc25a86cc77d1a5550f26c874c86", "score": "0.7298984", "text": "public function teardown();", "title": "" }, { "docid": "7c37caeb465845a2b7084496db0b03ea", "score": "0.7276959", "text": "protected function tearDown()\n {\n \tfclose($this->socket);\n $this->cleanup($this->file);\n\n\t\tparent::tearDown();\n\t}", "title": "" }, { "docid": "029a533ff60898d581f088586b830ddc", "score": "0.72541815", "text": "protected function tear_down()\n {\n $this->removeTestEnvironment();\n }", "title": "" }, { "docid": "029a533ff60898d581f088586b830ddc", "score": "0.72541815", "text": "protected function tear_down()\n {\n $this->removeTestEnvironment();\n }", "title": "" }, { "docid": "38cb666f6b70283c3d88d9fb841fadc0", "score": "0.72393274", "text": "public function tearDown() {\n\t\tm::close();\n\t}", "title": "" }, { "docid": "9888eace9438ce332c0884341923ba82", "score": "0.7236937", "text": "public function tearDown() {\n $this->driver->close();\n }", "title": "" }, { "docid": "4adcb8c1e4e5ab934e14ad5d8d3865d2", "score": "0.72364944", "text": "public function teardown()\n {\n //\n }", "title": "" }, { "docid": "74a29b30ad0c061169690ad2754e9913", "score": "0.7191245", "text": "public function teardown(): void;", "title": "" }, { "docid": "9801bf315e08c247e6cb348db94974c2", "score": "0.7149808", "text": "protected function tearDown() {\n $this->object->cleanup();\n }", "title": "" }, { "docid": "3741d46b61cc8cb6322d9651ab22ec6e", "score": "0.7137021", "text": "public function tearDown()\n\t{\n\t\t$this->removeApplication();\n\t\tunset($this->client);\n\n\t\tO\\Core::shutdown();\n\t\tEvent::first('orchestra.testable: teardown-db');\n\t}", "title": "" }, { "docid": "54422f929be3ec15f22d425cb640148e", "score": "0.71288633", "text": "protected function tearDown()\n {\n try {\n $this->driver->close();\n $this->driver->quit();\n } catch (\\Throwable $throwable) {\n\n }\n }", "title": "" }, { "docid": "aef221f3bf0dfd24057cd20b7664879a", "score": "0.7119696", "text": "public function tearDown()\n\t{\n\t\tm::close();\n\t}", "title": "" }, { "docid": "57023c531974c8154ca4c3bb4719fad6", "score": "0.7107286", "text": "public function tearDown() {\r\n $this->webDriver->close();\r\n }", "title": "" }, { "docid": "57170e24fbb653c210a11f19924fc856", "score": "0.7100008", "text": "public function tearDown()\n {\n $this->webDriver->close();\n }", "title": "" }, { "docid": "6cc66fa5666f89090867f1e8f33abc75", "score": "0.7091196", "text": "public function tearDown()\r\n {\r\n $this->webDriver->close();\r\n }", "title": "" }, { "docid": "6cc66fa5666f89090867f1e8f33abc75", "score": "0.7091196", "text": "public function tearDown()\r\n {\r\n $this->webDriver->close();\r\n }", "title": "" }, { "docid": "728ab0fac45338579ab0329c84c4b582", "score": "0.70868635", "text": "public function tearDown() {\n\t\tunset($this->fixture);\n\t\tunset($this->meeting);\n\t\tunset($this->meetingIdentifier);\n\t\tunset($this->meetingRepositoryMock);\n\t\tunset($this->permissionServiceMock);\n\t}", "title": "" }, { "docid": "b4cf69279782b6cfd19ca92b23ad1bdd", "score": "0.70847887", "text": "public function teardown(): void\n {\n }", "title": "" }, { "docid": "0715bd19976b77b45b92b04dd8abb561", "score": "0.7065863", "text": "public function tearDown()\n {\n socket_close($this->serverResource);\n }", "title": "" }, { "docid": "f9516537683383675a7476d5a40c4c80", "score": "0.7062466", "text": "public function teardown()\n\t{\n\t\t// Nothing by default\n\t}", "title": "" }, { "docid": "d62754bfe97703388f5535a38ed4eb21", "score": "0.7058617", "text": "public function tearDown() {\n\t\t$this->stop();\n\t}", "title": "" }, { "docid": "4d0332a1de4909a6d439c2e9e8516e49", "score": "0.70543325", "text": "public function tearDown() {\n $this->connection = null;\n $this->driver = null;\n }", "title": "" }, { "docid": "4a9158ee8142e854338f6e0f33a07038", "score": "0.7050779", "text": "protected function tearDown(): void\n {\n Helper::removeDirectory(TESTS_TMP_PATH);\n\n StreamWrapper::unregister();\n }", "title": "" }, { "docid": "0800bd15e0a45877453b078b01721f2b", "score": "0.70496726", "text": "public function tearDown()\n {\n unset($this->stub);\n m::close();\n }", "title": "" }, { "docid": "2134543298c86ac691ab0b680b538d51", "score": "0.7048074", "text": "protected function tearDown(): void\n {\n $this->closeDatabase();\n }", "title": "" }, { "docid": "d6955e97ea2ab22eca141178db5e99c9", "score": "0.7031558", "text": "public function tearDown()\n\t{\n\t\t// parent::tearDown();\n\t\tTrunk::forgetAll();\n\t\t// $this->artisan('db:seed', [\n\t\t// \t'--class' => 'ClearDB'\n\t\t// ]);\n\n\t\tDB::disconnect();\n\n\t\tparent::tearDown();\n\t}", "title": "" }, { "docid": "b4adb5b539396ec09c5bdeec76b882ff", "score": "0.70281804", "text": "public function tearDown() {\n m::close();\n }", "title": "" }, { "docid": "dab70569811b5ce7a71a392d2f78924c", "score": "0.7025337", "text": "protected function tearDown()\n\t{\n\t\t$this->dropbox = null;\n\n\t\tparent::tearDown();\n\t}", "title": "" }, { "docid": "2bbd5903a7258097c7341c02b1b5516e", "score": "0.7021807", "text": "public function tearDown()\n\t{\n\t\t$this->beforeApplicationDestroyed(function () {\n\t\t\tDB::disconnect();\n\t\t});\n\t\n\t\t\tparent::tearDown();\n\t\t\t// \t\tMockery::close();\n\t}", "title": "" }, { "docid": "2bbd5903a7258097c7341c02b1b5516e", "score": "0.7021807", "text": "public function tearDown()\n\t{\n\t\t$this->beforeApplicationDestroyed(function () {\n\t\t\tDB::disconnect();\n\t\t});\n\t\n\t\t\tparent::tearDown();\n\t\t\t// \t\tMockery::close();\n\t}", "title": "" }, { "docid": "4c101775631e32d3c2d56c2613279936", "score": "0.70215607", "text": "public function tearDown() {\n $this->purgePreviousData();\n parent::tearDown();\n }", "title": "" }, { "docid": "899fea3ed2abb2270247356f100a0d2f", "score": "0.7007173", "text": "protected function tearDown()\n\t{\n\t\tparent::tearDown ();\n\t\tEnUser::release();\n\t\tRPCContext::getInstance()->resetSession();\n\t\tRPCContext::getInstance()->unsetSession('global.uid');\n\t\tRPCContext::getInstance()->unsetSession('divine.info');\n\t\tDivineObj::release();\n\t}", "title": "" }, { "docid": "a12b33313fd18a1d63a878d069a693d7", "score": "0.7003393", "text": "public function tearDown():void\n {\n $this->webDriver->close();\n }", "title": "" }, { "docid": "c92bdef5e620cf50520514d8e4b54766", "score": "0.69912326", "text": "protected function tearDown()\n {\n $this->ensureDoctrineClosed();\n\n $this->_after();\n }", "title": "" }, { "docid": "32613a2705d821903acac42e1f543b86", "score": "0.69900304", "text": "public function teardown()\n {\n parent::teardown();\n }", "title": "" }, { "docid": "758f679b6d7a4432831cad5da87d50dd", "score": "0.6988218", "text": "protected function tearDown()\n\t{\n\t\tm::close();\n\t}", "title": "" }, { "docid": "c633e436abf54703ed144f6c411525f7", "score": "0.6984196", "text": "protected function tearDown()\n\t{\n\t\tunset($this->options, $this->client, $this->response, $this->object);\n\t\tparent::tearDown();\n\t}", "title": "" }, { "docid": "0927dec6d12f9346e3f73d46068b58e2", "score": "0.6982247", "text": "protected function tearDown()\n\t{\n\t\tunset($this->introCallObj);\n\t}", "title": "" }, { "docid": "1a781b6c85138ff7dc4f8743f566cb10", "score": "0.69796723", "text": "protected function doTearDown(): void\n {\n }", "title": "" }, { "docid": "1a781b6c85138ff7dc4f8743f566cb10", "score": "0.69796723", "text": "protected function doTearDown(): void\n {\n }", "title": "" }, { "docid": "eed13b4057bcfc0f0a759c982b4164e3", "score": "0.6977414", "text": "public function endTest() {\n\t\t\tunset($this->Helper);\n\t\t\tClassRegistry::flush();\n\t\t}", "title": "" }, { "docid": "d0acef1f253a10ccd1b9facc1c7093b4", "score": "0.69765586", "text": "public function tearDown(): void\n {\n $this->closeDatabase();\n }", "title": "" }, { "docid": "ce7be9ccd1b70187b9f79fcae7b04263", "score": "0.6974033", "text": "protected function tearDown()\n {\n m::close();\n unset($this->repo);\n }", "title": "" }, { "docid": "a59f821285ad56b3721d95a369bf18da", "score": "0.6969422", "text": "public function tearDown()\n {\n unset($this->webhook, $this->subscriber, $this->data);\n }", "title": "" }, { "docid": "496e985c37a705a0a01ae09663922022", "score": "0.6956488", "text": "public function teardown() {\n m::close();\n }", "title": "" }, { "docid": "b5e2bdfc2f7634906ea97635b19df6c6", "score": "0.6953734", "text": "protected function tearDown() {\n\t\t$this->config=null;\n\t\tparent::tearDown ();\n\t}", "title": "" }, { "docid": "2252f9d2077e84e3410940a1259ce62b", "score": "0.69472766", "text": "public function tearDown() {\n\t\tTest::tearDown();\n\n\t\t// then\n\t\tparent::tearDown();\n\t}", "title": "" }, { "docid": "bbcd1772e2f1342a8ca885b8224ba945", "score": "0.69446355", "text": "public static function tearDownAfterClass()\n {\n //teardown\n }", "title": "" }, { "docid": "06ed6cacc1da99c4f4b512cf11037524", "score": "0.69387966", "text": "public function teardown() { \n\n }", "title": "" }, { "docid": "61caac6278cb839fb7e6650e93ddb38a", "score": "0.6936957", "text": "protected function tearDown(): void\n {\n Helper::removeDirectory(TESTS_TMP_PATH);\n }", "title": "" }, { "docid": "c1c1e0fcbff4eed3551ac0a171d39992", "score": "0.69221747", "text": "function finalTeardown()\n {\n\n }", "title": "" }, { "docid": "711e186652885d1b0e5d39aa97327453", "score": "0.69216204", "text": "public function tearDown()\n {\n MysqlDataSourceTestSetupTearDown::tearDown();\n // End of user code\n }", "title": "" }, { "docid": "f7a03d04d0e997af16faa7bdc01bff00", "score": "0.69164276", "text": "public function tearDown()\n {\n $this->transport = null;\n $this->client = null;\n parent::tearDown();\n }", "title": "" }, { "docid": "ce9aab236cb7964619a4adb2b5f1a722", "score": "0.69064987", "text": "public function teardown()\n {\n Mockery::close();\n }", "title": "" }, { "docid": "6a1a8e369a2ac5679967a3a6c928b619", "score": "0.68996114", "text": "protected function tearDown()\n {\n $this->subject->sql_query(\"DROP TABLE {$this->testTable};\");\n unset($this->subject);\n }", "title": "" }, { "docid": "88054129a5192b879413883a39630968", "score": "0.6898707", "text": "public function tearDown(): void\n {\n $this->client = null;\n $this->httpStub = null;\n }", "title": "" }, { "docid": "ae02c8724b651b8f2e0f9cbaf59c41c7", "score": "0.68983", "text": "public function tearDown(): void\n {\n $this->apiAccess->delete($this->testApiId);\n $this->db = null;\n }", "title": "" }, { "docid": "0241215a445f6a52c89a2ad43d6fe021", "score": "0.6894667", "text": "public function tearDown()\n {\n unset($this->app);\n unset($this->router);\n unset($this->request);\n m::close();\n }", "title": "" }, { "docid": "c387d71e7d00a22a55ff6602650cf0d3", "score": "0.689134", "text": "protected function tearDown()\n {\n unset($this->object);\n\n \\FwkDbTestUtil::dropTestDb($this->connection);\n }", "title": "" }, { "docid": "d9781566f11d32022040aa3537f1c5ef", "score": "0.68892854", "text": "public function tearDown()\n {\n m::close();\n }", "title": "" }, { "docid": "d9781566f11d32022040aa3537f1c5ef", "score": "0.68892854", "text": "public function tearDown()\n {\n m::close();\n }", "title": "" }, { "docid": "d9781566f11d32022040aa3537f1c5ef", "score": "0.68892854", "text": "public function tearDown()\n {\n m::close();\n }", "title": "" }, { "docid": "d9781566f11d32022040aa3537f1c5ef", "score": "0.68892854", "text": "public function tearDown()\n {\n m::close();\n }", "title": "" }, { "docid": "d9781566f11d32022040aa3537f1c5ef", "score": "0.68892854", "text": "public function tearDown()\n {\n m::close();\n }", "title": "" }, { "docid": "9d4e7d0083c6f13c9bed0deea73ed76b", "score": "0.6888574", "text": "public function tearDown()\n {\n unset($this->helper);\n }", "title": "" }, { "docid": "2f9f960244e9f5236dcd7e69fed09b6e", "score": "0.6886925", "text": "public function TearDown():void\n {\n unset($this->object);\n parent::tearDown();\n }", "title": "" }, { "docid": "9a5008c37d0a183acc0c9dbb3e029970", "score": "0.6882208", "text": "public function tearDown()\n\t{\n\t\tunset($this->stub);\n\t}", "title": "" }, { "docid": "7d0e806f6b257eed32ad7cb97bcdcc90", "score": "0.6874765", "text": "protected function tearDown() {\r\n\t\tunset ( $this->typo3DbBackend );\r\n\t}", "title": "" }, { "docid": "2e74eaad3d6969efd6cc1a614b005000", "score": "0.68729657", "text": "protected function tearDown() {\n\t\tunset($this->testStageTitle);\n\t\tunset($this->testComment);\n\t\tunset($this->testWorkspaceId);\n\t\tunset($this->testStageId);\n\t\tunset($this->testRecipients);\n\t\tunset($this->testNotifications);\n\t\tunset($this->testRecords);\n\t\tunset($this->nextRecordCallbackValues);\n\n\t\tunset($this->tceMainMock);\n\n\t\t$GLOBALS['TYPO3_DB'] = $this->originalDatabase;\n\t\tunset($this->originalDatabase);\n\t\tunset($this->databaseMock);\n\n\t\tunset($GLOBALS['TCA']['tx_irreworkspaces_test']);\n\t\tt3lib_div::purgeInstances();\n\t}", "title": "" }, { "docid": "b411f3936c17d73d21994facd4622534", "score": "0.6872079", "text": "public function tearDown()\n\t{\n\t\t\\Mockery::close();\n\t\t$this->transport = null;\n\t\tparent::tearDown();\n\t}", "title": "" }, { "docid": "735f9dc8c48325dbf3d2deddefda2494", "score": "0.68607086", "text": "protected function tearDown()\n {\n $this->local = null;\n parent::tearDown();\n }", "title": "" }, { "docid": "f73e8529b2c3c7db1b77f815052eee95", "score": "0.6858118", "text": "public function tearDown(): void\n {\n global $di;\n\n $di = null;\n $this->di = null;\n }", "title": "" }, { "docid": "65427d299abd6054e781b472bbf2a70e", "score": "0.6857888", "text": "protected function tear_down()\n {\n }", "title": "" }, { "docid": "65427d299abd6054e781b472bbf2a70e", "score": "0.6857888", "text": "protected function tear_down()\n {\n }", "title": "" }, { "docid": "1a302f6f14360319cd038cb64e964192", "score": "0.6856639", "text": "protected function tearDown()\n {\n $this->manager = null;\n\n $filesystem = new Filesystem();\n $filesystem->remove($this->tempDir);\n }", "title": "" }, { "docid": "af45d885b5d22bacc08c87ee3862dba6", "score": "0.68554306", "text": "public function tearDown() {\n parent::tearDown();\n unset($this->config);\n }", "title": "" }, { "docid": "9e3d95efeedaec1f2ea43cb5e18d5a0c", "score": "0.685214", "text": "protected function tearDown()\n {\n $this->testDbConnector->clearDataFromTables();\n }", "title": "" }, { "docid": "28e2b3c7f446b477b8b0883e018e0d84", "score": "0.6844855", "text": "protected function tearDown() {\n\t\t$this->weatherModel = null;\n\t\t\n\t\tparent::tearDown ();\n\t}", "title": "" }, { "docid": "53376eb427d275e971aab8efd3928254", "score": "0.6839242", "text": "protected function tearDown(): void {\n\t}", "title": "" }, { "docid": "12825a6513c0efc8759f1f312b2cf7c3", "score": "0.68389446", "text": "protected function tearDown() {\r\n\t\toci_close($this->oci);\r\n\t\toci_close($this->persistenceAdapter->getDatabase());\r\n\t\tparent::tearDown();\r\n\t}", "title": "" }, { "docid": "9633cc89da8dce4f22a33238ab23ebc2", "score": "0.68376416", "text": "protected function tearDown() {\n// fclose($this->handle); // don't close the handle so tests can pass the object among themselves.\n }", "title": "" }, { "docid": "28d879697a897d441bc644f225a4cb7a", "score": "0.68370056", "text": "public function tearDown()\n {\n unset($this->helper, $this->view);\n }", "title": "" }, { "docid": "cb0a58c23b6a4324cf2ddabc1254db67", "score": "0.68308675", "text": "public function tearDown(): void {\n\t\tMockery::close();\n\t}", "title": "" }, { "docid": "de6470849d3f7f1c5980b107110144b1", "score": "0.68259484", "text": "protected function tearDown() {\r\n\t\tunset($this->tsfeMock);\r\n\t\tunset($this->hook);\r\n\t}", "title": "" }, { "docid": "b5f874d61fff6a5c525a52c2a55856e8", "score": "0.6823756", "text": "protected function tearDown()\n {\n //$c = new Cache('test', $this->lifetime, self::$dir);\n //$c->destroy();\n }", "title": "" }, { "docid": "8f299c5ea703c4b304bde1ae81b7773e", "score": "0.68219066", "text": "protected function tearDown()\n {\n unset($this->blockee);\n }", "title": "" }, { "docid": "49cf888ce965672bb048da6d1f9a3124", "score": "0.6821471", "text": "public function tearDown()\n {\n unset($this->app);\n m::close();\n }", "title": "" }, { "docid": "3f7b142edcbb38e224331cb9e2b6ada3", "score": "0.681744", "text": "protected function tearDown()\n {\n $this->config = null;\n parent::tearDown();\n }", "title": "" }, { "docid": "dbe0d124888d6182e1048acb10536d0c", "score": "0.68161124", "text": "public function teardown() \n {\n m::close();\n }", "title": "" }, { "docid": "70ce8a85ebf48bbe2f1b3ca532f0a01c", "score": "0.6816102", "text": "protected function tearDown()\n {\n //teardown\n }", "title": "" }, { "docid": "12d585f0cabff3dd2fafe65b4281365e", "score": "0.68154615", "text": "protected function tearDown()\n {\n unset($this->app);\n m::close();\n }", "title": "" }, { "docid": "9b329f4b2ef4b415c2e5e409d92ee1d5", "score": "0.6814262", "text": "protected function tearDown()\n\t{\n\t\tunset($this->client);\n\t\tunset($this->options);\n\t\tunset($this->object);\n\t}", "title": "" }, { "docid": "13d94b3fca81d2da55b6b261b64ee99f", "score": "0.6811279", "text": "public static function tearDownAfterClass()\n\t{\n\t\t// Remove our testing database before writing tests.\n\t\t$mongo = new Mongo;\n\n\t\t$config = Kohana::$config->load(\"mundo\");\n\n\t\t// Select our database\n\t\t$db = $mongo->{$config->database};\n\n\t\t// Drop it like it's hot.\n\t\t$db->drop();\n\t}", "title": "" }, { "docid": "af214c31a09e8020abbe9bec145a10e8", "score": "0.6809944", "text": "protected function tearDown()\n {\n unset($this->adapter);\n }", "title": "" }, { "docid": "0210a54a7c7175ec9459908dff059444", "score": "0.68067276", "text": "public function tearDown()\n {\n unset($this->_daughter);\n }", "title": "" }, { "docid": "38b146e6f3fae508d2612dcb16d685fd", "score": "0.68063504", "text": "protected function tearDown(): void\n {\n unset($this->mockBackEnd);\n }", "title": "" } ]
04e6782ffa444a392d17b37258d58f93
Finds a user by his username and throws an exception if we can't find it.
[ { "docid": "5b6819c3cc9af4fd125034dc75e0804c", "score": "0.0", "text": "private function findAdminByUsernameOrThrowException($username)\n {\n $admin = $this->userManager->findUserByUsername($username);\n\n if (!$admin) {\n throw new \\InvalidArgumentException(sprintf('Admin user identified by \"%s\" username does not exist.', $username));\n }\n\n return $admin;\n }", "title": "" } ]
[ { "docid": "8dc749b9644c89f7a2e1aef52e75c01b", "score": "0.7531709", "text": "protected function findUser($username)\n {\n try {\n $user = User::fromUser($this->authenticator->getUserByUsername($username));\n } catch (UserNotFoundException $e) {\n throw new UsernameNotFoundException($e->getMessage(), $e->getCode(), $e);\n }\n return $user;\n }", "title": "" }, { "docid": "6c3a5db3d5e61be96d93b648de93c182", "score": "0.7492327", "text": "function findUser($username) {\n $user = R::findOne('user',\n ' username = ? ',array($username));\n return $user;\n }", "title": "" }, { "docid": "193c4573d554a6441de69e59aa2e31f0", "score": "0.7406462", "text": "public function loadUserByUsername($username)\n {\n // Load a User object from your data source or throw UsernameNotFoundException.\n // The $username argument may not actually be a username:\n // it is whatever value is being returned by the getUsername()\n // method in your User class.\n $user = $this->entityManager\n ->getRepository(User::class)\n ->findOneBy(['mail' => $username])\n ;\n\n if (!$user instanceof UserInterface) {\n throw new UsernameNotFoundException('TODO: fill in loadUserByUsername() inside '.__FILE__);\n }\n\n return $user;\n }", "title": "" }, { "docid": "f174b77a533662370f47cb82786b5c9d", "score": "0.73811543", "text": "public function loadUserByUsername($username)\n {\n if (strpos($username, '@') !== false) {\n $user = $this->findOneBy(array('email' => $username));\n if (!$user) {\n throw new UsernameNotFoundException(sprintf('Email \"%s\" does not exist.', $username));\n }\n\n return $user;\n }\n\n $user = $this->findOneBy(array('username' => $username));\n if (!$user) {\n throw new UsernameNotFoundException(sprintf('Username \"%s\" does not exist.', $username));\n }\n\n return $user;\n }", "title": "" }, { "docid": "4b38bd897d0eb36a4eaea1b58c5a063f", "score": "0.7354992", "text": "public function loadUserByUsername($username)\n {\n /** @var EntityManager $em */\n $em = $this->getManager();\n $user = $em->getRepository('AppBundle:User')->findOneBy(['username' => $username]);\n\n if (!$user) {\n throw new UsernameNotFoundException;\n }\n\n return $user;\n }", "title": "" }, { "docid": "3e991537d47f4ee8f25ed6f16d942138", "score": "0.73047036", "text": "public function loadUserByUsername($username)\n {\n $user = $this->findUserByEmail($username);\n\n if (!$user) {\n throw new UsernameNotFoundException(sprintf('No user with name \"%s\" was found.', $username));\n }\n\n return $user;\n }", "title": "" }, { "docid": "264f160e6fbc9f4108d84b68a9175df2", "score": "0.72806364", "text": "public function loadUserByUsername($username) {\n\t\t$entityManager = $this->getEntityManager();\n\t\t$query = $entityManager->createQuery('\n\t\t\tSELECT u\n\t\t\tFROM DigitalKanbanBaseBundle:User u\n\t\t\tWHERE\n\t\t\t\tu.disabled = 0\n\t\t\t\tAND (\n\t\t\t\t\tu.username = :username\n\t\t\t\t\tOR u.email = :username\n\t\t\t\t)\n\t\t');\n\t\t$query->setParameters(array('username' => $username));\n\t\t$user = $query->getOneOrNullResult();\n\n\t\tif($user === NULL) {\n\t\t\tthrow new UsernameNotFoundException('Sorry dude, but the could not be found or is disabled.');\n\t\t}\n\n\t\treturn $user;\n\t}", "title": "" }, { "docid": "13086c55da546ff55d8db4d344b20cd0", "score": "0.72398144", "text": "public static function find_user($username)\n {\n $user_model = Kohana::$config->load('authenticate.user_model');\n\n // Check on username first\n $user = Brass::factory($user_model, ['username' => $username])->load();\n\n if ($user->loaded())\n return $user;\n\n // Check for email instead\n $user = Brass::factory($user_model, ['email' => $username])->load();\n\n if ($user->loaded())\n return $user;\n\n $user = Brass::factory($user_model, ['_id' => $username])->load();\n\n if ($user->loaded())\n return $user;\n\n return FALSE;\n }", "title": "" }, { "docid": "29e3b5ff743bcf28f88bd741466cfa63", "score": "0.7230337", "text": "public function findUserOfUsername(string $username): User\n {\n }", "title": "" }, { "docid": "ddd7a07482ca55170f8a8d1267116287", "score": "0.72109026", "text": "public function loadUserByUsername($username) {\r\n // create new one in db if not exists\r\n throw new UsernameNotFoundException(sprintf(\"Authentication should be handled in loadUserByOAuthUserResponse – User '%s' not found.\", $username));\r\n }", "title": "" }, { "docid": "4e3b49c76c9eee08b0e0fab5f13acd28", "score": "0.72069263", "text": "public function loadUserByUsername($username)\n {\n $q = $this\n ->createQueryBuilder('u')\n ->where('u.user_name = :user_name OR u.email = :email')\n ->setParameter('user_name', $username)\n ->setParameter('email', $username)\n ->getQuery();\n\n try {\n // The Query::getSingleResult() method throws an exception\n // if there is no record matching the criteria.\n $user = $q->getSingleResult();\n } catch (NoResultException $e) {\n $message = sprintf(\n 'Unable to find an active admin VektorVektorBundle:User object identified by \"%s\".',\n $username\n );\n throw new UsernameNotFoundException($message, 0, $e);\n }\n\n return $user;\n }", "title": "" }, { "docid": "7fab5318e23f92fe9f3365cabeed4c73", "score": "0.7193785", "text": "public function loadUserByUsername($username)\n {\n if (is_null($this->db)) {\n throw new UsernameNotFoundException('Could not connect to the DB!');\n }\n $users = $this->db->getByEqualConditions(self::ENTITY_NAME, array('email' => $username));\n\n if (!is_array($users) || (is_array($users) && empty($users))) {\n throw new UsernameNotFoundException(sprintf('Email \"%s\" does not exist.', $username));\n }\n // first and possibly only user\n $user = $users[0];\n\n if ($user === false) {\n throw new UsernameNotFoundException(sprintf('Email \"%s\" does not exist.', $username));\n }\n\n return new User($user['user_id'], $user['email'], $user['password'], explode(',', $user['roles']), true);\n }", "title": "" }, { "docid": "ca2a4edd91c570f74b3ca36bdcbf48d2", "score": "0.7158513", "text": "public function loadUserByUsername($username)\n {\n $user = $this->personRepository->getUserDetails($username);\n if (!$user) {\n throw new UsernameNotFoundException(\"Username {$username} not found\");\n }\n\n return $user;\n }", "title": "" }, { "docid": "a20e0db5973c5ac7c6685dc62b3f729c", "score": "0.71538854", "text": "public function findUser( $username )\r\n {\r\n $me = \"findUser\" ;\r\n Logger::logMessage( $me, 3, \"Looking for \\\"$username\\\"\" );\r\n\r\n $userId = strtolower( $username );\r\n if ( !array_key_exists( $userId, $this->_users ) ) {\r\n return null ;\r\n }\r\n return $userId;\r\n }", "title": "" }, { "docid": "e97941f4dedd2e88893a1ea36867516a", "score": "0.7138355", "text": "public function loadUserByUsername($username)\n {\n $user = $this->findOneByUsername($username);\n\n if(!$user) {\n throw new UsernameNotFoundException(sprintf('The user \"%s\" does not exist'));\n }\n\n return $user;\n }", "title": "" }, { "docid": "ab14e290863f846f681ced2b272c64bc", "score": "0.71316904", "text": "public function findUserByUsername($username);", "title": "" }, { "docid": "438e5dd112f258e3ae3fd9d20ef511d2", "score": "0.71259737", "text": "public function loadUserByUsername($username)\n {\n $user = $this->getEntityManager()->getRepository('AcmeDemoBundle:User')->findOneBy(array(\n 'username' => $username\n ));\n\n if(!$user) {\n throw new UsernameNotFoundException(\n sprintf('Username \"%s\" does not exist.', $username)\n );\n }\n\n return $user;\n }", "title": "" }, { "docid": "157c424c37f108e1aeff482225a66318", "score": "0.70842767", "text": "public function getUserByUserName($query)\n {\n try {\n $stmt = $this->db->prepare('SELECT * FROM users WHERE userName = ?');\n\n $var = Helpers::sanitize($query);\n $stmt->execute([$var]);\n $user = $stmt->fetch(PDO::FETCH_OBJ);\n } catch (\\PDOException $exception){\n echo 'Internal Error';\n exit();\n }\n\n if ($user) {\n return $user;\n }\n\n throw new Exception('User Not Found');\n }", "title": "" }, { "docid": "985ac9dbe80981421e275a610574c7aa", "score": "0.706449", "text": "protected function fetchUser($username)\n {\n $userModel = '\\\\'.ltrim(config('ldap.user'), '\\\\');\n $user = ((new $userModel))->where(config('ldap.usernameField'), $username)->first();\n if (is_null($user)) {\n throw new LdapException('User is not registered in the system.');\n }\n return $user;\n }", "title": "" }, { "docid": "14d3d8154baf796c39c11948855cac29", "score": "0.70570636", "text": "function findUserByUsername($username)\r\n {\r\n $user = UserFacade::findByField('username', $username)->first();\r\n return $user;\r\n }", "title": "" }, { "docid": "37f55dd098471806f5a90308f3de22a7", "score": "0.70434904", "text": "private function findUser($username) {\n $userModel = ClassRegistry::init($this->settings['userModel']);\n $user = $userModel->find('first', [\n 'conditions' => [\n $this->settings['userModel'] . '.' . $this->settings['userField'] => strtolower($username)\n ]\n ]);\n if (isset($user[$this->settings['userModel']])) {\n return $user[$this->settings['userModel']];\n }\n return $user;\n }", "title": "" }, { "docid": "544e08781b2848dd2fe9c2c48927d4b0", "score": "0.7030933", "text": "public function findOneByUsername($username)\n\t{\t\t\n\t\t$users = $this->getEntityManager()->getRepository('UekUserBundle:User')->findAll();\n\t\t\n\t\tforeach ($users as $user)\n\t\t\n\t\tif ($user->getUsername() == $username)\n\t\t{\n\t\t\treturn $user;\n\t\t}\n\n\t\treturn null;\t\t\t\n\t}", "title": "" }, { "docid": "413be8391983a03b132c18ce652f9628", "score": "0.70274603", "text": "public function findByUsername($username)\n {\n $user = self::where('username', '=', $username)->first();\n\n if ($user === null)\n abort(404, 'Der Benutzer konnte nicht gefunden werden!');\n\n return $user;\n }", "title": "" }, { "docid": "9663674391fd38907a22643d20209f57", "score": "0.70171064", "text": "protected function getUser($username) {\n\t\tif(isset($this->kernel->config['security']['users'][$username])) {\n\t\t\treturn new User($username, $this->kernel->config['security']['users'][$username]);\n\t\t}\n\t\t//user not found in config (should almost never happen)\n\t\telse {\n\t\t\tthrow new \\Exception(\"User '$username' Not Found\");\n\t\t}\n\t}", "title": "" }, { "docid": "655b845fc18847938f043e55a7d7f645", "score": "0.70059514", "text": "public function askUser()\n {\n if ($this->option('user')) {\n $user = $this->option('user') == '#first-item' ? ServerUser::first() : ServerUser::where('name', $this->option('user'))->first();\n } else {\n $users = ServerUser::get();\n\n $options = [];\n foreach ($users as $user) {\n $options[] = $user->name;\n }\n\n if (count($options) > 0) {\n $user = ServerUser::where('name', $this->choice('Select user', $options))->first();\n }\n }\n\n if ($user) {\n return $user;\n }\n\n throw new Exception(\"Could not find user.\");\n }", "title": "" }, { "docid": "75cb3bed1dd627ad2f07ec4de37302b5", "score": "0.69828904", "text": "function get_user_by_username($username) {\r\n global $db;\r\n $query = \"SELECT * FROM users WHERE username = :username\";\r\n $statement = $db->prepare($query);\r\n $statement->bindValue(\":username\", $username);\r\n\r\n\r\n\r\n try {\r\n $statement->execute();\r\n } catch (Exception $ex) {\r\n\r\n//redirect to an error page passing the error message\r\n header(\"location:../view/error.php?msg=\" . $ex->getMessage());\r\n exit();\r\n }\r\n\r\n $user = $statement->fetch();\r\n $statement->closeCursor();\r\n\r\n return $user;\r\n}", "title": "" }, { "docid": "0c878546f069bd8d1e11fc92950d7923", "score": "0.69770324", "text": "function findUser($username, $password) {\r\n\t\t$salt = \"cs464\";\r\n\t\t\r\n\t\t$users = $this->getUsers ();\r\n\t\tforeach ( $users as $user ) {\r\n\t\t\t\r\n\t\t\tif ($username == $user->userName) {\r\n\t\t\t\tif ($user->password == md5 ( $salt . $password )) {\r\n\t\t\t\t\treturn $user;\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "title": "" }, { "docid": "72b5bfde4603caed6ada599d2e0bc988", "score": "0.69559956", "text": "public function loadUserByUsername($username)\n {\n //error_log(\"login user $username\");\n //$user = array('role' => 1);\n //$password = '$2y$10$3i9/lVd8UOFIJ6PAMFt8gu3/r5g0qeCJvoSlLCsvMTythye19F77a';\n $sql = 'SELECT * FROM user WHERE ' . (strpos($username, '@') ? 'email' : 'name') . ' = ?';\n //error_log(\"sql=$sql\");\n $stmt = $this->conn->executeQuery($sql, array(strtolower($username)));\n $user = $stmt->fetch();\n \n //$user = User::getUser($username);\n if (empty($user)) {\n $app = SilexApplication::instance();\n $message = sprintf('Username \"%s\" does not exist.', $username);\n $app['session']->getFlashBag()->add('error', $message);\n //error_log(\"login user $username not exist\");\n throw new UsernameNotFoundException($message);\n }\n \n //error_log(\"login user $username exist\");\n //$user['password'] = $password;\n $roles = array(1=>'ROLE_ADMIN',2=>'ROLE_ADMIN',3=>'ROLE_USER');\n return new User($username, $user['password'], explode(',', $roles[$user['role']]), true, true, true, true);\n \n /*$dummyusers = array(\n 1 => array('ROLE_ADMIN', $password,'admin'),\n array('ROLE_ADMIN', $password,'employer'),\n array('ROLE_USER', $password,'employee'),\n );\n $user = $dummyusers[$user['role']];\n if (empty($user)) {\n throw new UsernameNotFoundException(sprintf('Dummy username \"%s\" does not exist.', $username));\n }\n return new User($user[2], $user[1], explode(',', $user[0]), true, true, true, true);\n */\n }", "title": "" }, { "docid": "b3f1c9a2a81364f581765c0006a1e703", "score": "0.69506073", "text": "private static function findUserID($userName) {\r\n $stmt = Database::getDB()->prepare('select userID from Users where userName = :userName');\r\n $stmt->execute(array(\":userName\" => $userName));\r\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\r\n if ($row === false)\r\n throw new UserNotFoundException('User name \"' . htmlspecialchars($userName). '\" not found');\r\n \r\n return $row['userID'];\r\n }", "title": "" }, { "docid": "ffee0bf3103951e38d5fcad50dcb7caf", "score": "0.690619", "text": "protected function getUser($username)\n {\n // search local user in database\n $configObj = Config::getInstance()->object();\n $userObject = null;\n foreach ($configObj->system->children() as $key => $value) {\n if ($key == 'user' && !empty($value->name)) {\n // depending on caseInSensitiveUsernames setting match exact or case-insensitive\n if (\n (string)$value->name == $username ||\n ($this->caseInSensitiveUsernames && strtolower((string)$value->name) == strtolower($username))\n ) {\n // user found, stop search\n $userObject = $value;\n break;\n }\n }\n }\n return $userObject;\n }", "title": "" }, { "docid": "3422c8f350f2c576ede0547a02c501f7", "score": "0.68839014", "text": "function getUser($username) {\r\n\t\t$users = $this->getUsers ();\r\n\t\tforeach ( $users as $user ) {\r\n\t\t\tif ($username == $user->userName) {\r\n\t\t\t\t\treturn $user;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "title": "" }, { "docid": "5de9a89d720c1341627a2a3442e707df", "score": "0.68775654", "text": "public function checkAndGetUser($userId)\n {\n $query = 'SELECT * FROM users WHERE id=:id';\n $statement = $this->database->prepare($query);\n $statement->bindParam('id', $userId);\n $statement->execute();\n $user = $statement->fetchObject();\n if (empty($user)) {\n throw new UserException('User not found.', 404);\n }\n\n return $user;\n }", "title": "" }, { "docid": "b235e8ee5210671302a1d179871fdc29", "score": "0.6868629", "text": "public static function getUserByUsername($username)\n {\n require_once('Database.php');\n \n $db = Database::getDb();\n $sth = $db->prepare('SELECT * FROM user WHERE username LIKE :username');\n $sth->execute(array(':username' => $username));\n\n $result = $sth->fetchObject('User');\n\n if($result instanceof User){\n return $result;\n }\n\n return NULL;\n }", "title": "" }, { "docid": "ee9eeeca358472b3e3ea6beb338e785a", "score": "0.68490994", "text": "public function findUser(array $params)\n {\n /** @var UserProvider $userProvider */\n $userProvider = $this->container[UserProvider::class];\n try {\n /** @var User $user */\n $user = $userProvider->loadUserByUsername($params['username']);\n } catch(\\Exception $e) {\n return false;\n }\n return $user;\n }", "title": "" }, { "docid": "a5644f4879b4ad8accf9931e002af307", "score": "0.6848501", "text": "public function loadUserByUsername($username)\n {\n $user = $this->em->getRepository('TTBundle:CmsUsers')->findOneBy(array('yourusername' => $username));\n\n if (!$user) {\n $user = $this->em->getRepository('TTBundle:CmsUsers')->findOneBy(array('youremail' => $username));\n }\n\n if (!$user) {\n throw new UnsupportedUserException();\n }\n\n return $user;\n }", "title": "" }, { "docid": "58cde0be93e0cec07c8810ade8ebd8bc", "score": "0.6833262", "text": "function checkUserName($userName){\n\n $this->connection->where(\"username\", $userName);\n $row = $this->connection->getOne(\"users\");\n\n if(!is_null($row)){\n throw new Exception(\"<strong>Error:</strong> Username Already Taken!\");\n }\n\n }", "title": "" }, { "docid": "8602c545a675cb9a02c7b1d0f8833967", "score": "0.68207705", "text": "public function findUserByUsername($username)\n {\n return $this->findUser(['username' => $username])->one();\n }", "title": "" }, { "docid": "deced9414e1eebc3de8ebe7aceb0a19f", "score": "0.6813509", "text": "function getUserByUsername ($username)\n\t{\n\t\t$db = new Database();\n\t\t$select = \"select user_id from USERS where username = '{$username}';\";\n\t\t$result = $db->query($select);\n\t\tif ($row = mysqli_fetch_assoc($result)) {\n\t\t\treturn getUser($row['user_id']);\n\t\t}\n\t\treturn null;\n\t}", "title": "" }, { "docid": "3217c4850f16fb65e306a22cce1cdda2", "score": "0.6803409", "text": "function findUsername(User $user){\n \n Log::info(\"Entering SecurityDAO::checkUsername()\");\n \n try{\n // Select username from database\n $username = $user->getUsername();\n $statement = $this->connection->prepare(\"SELECT * FROM USER WHERE USERNAME = :username LIMIT 1\");\n \n if(!$statement){\n echo \"Something wrong in the binding process.sql error?\";\n exit;\n }\n \n //bindParam properties\n $statement->bindParam(':username', $username);\n $statement->execute();\n \n //if statement execute successfully\n if($statement->rowCount() == 1){\n //if result matches username exists in database, return false, else return true\n Log::info(\"Exit SecurityDAO.checkUsername() with false\");\n return false;\n exit;\n }else{\n Log::info(\"Exit SecurityDAO.checkUsername() with true\");\n return true;\n exit;\n }\n \n \n }catch(PDOException $e)\n {\n // catch exception and throw DatabaseException\n Log::error(\"Exception: \", array(\"message \" => $e->getMessage()));\n throw new DatabaseException(\"Database Exception: \". $e->getMessage(), 0, $e);\n }\n }", "title": "" }, { "docid": "d36760eadc85dd86ea9c4be358a4e06e", "score": "0.6799895", "text": "function getUserByUsername( $username ) {\n global $connection;\n\n $exists = searchForUserByUsername( $username );\n\n if (!$exists) {\n return 0;\n }\n \n $query = \"SELECT * FROM users \";\n $query .= \"WHERE username = '$username' \"; \n\n $result = mysqli_query( $connection, $query );\n\n confirmQuery( $result );\n\n return $result; \n }", "title": "" }, { "docid": "509dd0f0f571d2b03c3340cd4dbcb5ba", "score": "0.679296", "text": "public function findByName($name) {\n // load the entity manager and the user repository\n $entityManager = $this->getEntityManager();\n $repository = $entityManager->getRepository('EmberChat\\Entities\\User');\n\n // try to load the user\n return $repository->findOneBy(array('name' => $name));\n }", "title": "" }, { "docid": "a1f148fcd3f16b517faac3899ada3950", "score": "0.67603415", "text": "public function findUsername($username){\n $query = $this->connect->prepare(\"SELECT username FROM user WHERE username = ?\");\n $username = $this->escape_string($username);\n $query->bind_param(\"s\", $username);\n $query->execute();\n $query->bind_result($foundUsername);\n $query->fetch();\n return $foundUsername;\n }", "title": "" }, { "docid": "a0b5d0335bd7d88ddd23f908a85ce5ea", "score": "0.67543906", "text": "public function loadUserByUsername($username) {\n return $this->getEntityManager()\n ->createQuery('SELECT u FROM\n EIPHRBundle:HRUser u\n WHERE u.username = :username\n OR u.email = :username')\n ->setParameters(array(\n ':username' => $username\n ))\n ->getOneOrNullResult();\n }", "title": "" }, { "docid": "bf340566a1adcdd4439c9062faecfd6f", "score": "0.6746939", "text": "public function getUserByUsername($username);", "title": "" }, { "docid": "4a6d0c58a7b4a971e632210770a17395", "score": "0.6739851", "text": "public function get_user_by_username($username) {\n\t\t$sql = \"SELECT * FROM user WHERE username = '\".$username.\"';\";\n\t\t$result = $this->link->query($sql);\n\t\tif ($result->num_rows > 0) {\n\t\t\t$row = $result->fetch_assoc();\n\t\t\t$user = new User($row);\n\t\t\treturn $user;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "f90b4acc2570b826b0bcaea5ac16f348", "score": "0.6733427", "text": "public function findByName($name)\n {\n\n // load the entity manager and the user repository\n $entityManager = $this->getEntityManager();\n $repository = $entityManager->getRepository('EmberChat\\Entities\\User');\n\n // try to load the user\n return $repository->findOneBy(array('name' => $name));\n }", "title": "" }, { "docid": "ef8d8c6f44cdf66c56c87aa919c33497", "score": "0.67326146", "text": "public function getByUsername(string $username)\n {\n // TODO - validation?\n // TODO - uniqueness on username\n $sql = \"SELECT * FROM users WHERE name = :name\";\n $data = [\n ':name' => $username\n ];\n $result = self::$dbh->execQuery($sql, $data);\n if (count($result) !== 1) {\n // TODO - throw something maybe i dunno, be better.\n return;\n }\n $user = new \\App\\Model\\User();\n $user->name = $result[0]['name'];\n $user->id = $result[0]['id'];\n return $user;\n }", "title": "" }, { "docid": "529ce4fa53818a90509ee41412cf31d4", "score": "0.6731819", "text": "function getUserByName($username) {\n\t\t$response = $this->_connection->selectAllFromWhere ( \"users\", \"`name`=:name\", array (\n\t\t\t\t\":name\" => $username \n\t\t) );\n\t\t$result = $response->fetch ();\n\t\ttry {\n\t\t\treturn new User ( $result );\n\t\t} catch ( Exception $e ) {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "28cdecedca2231577cd46372394cb472", "score": "0.67168224", "text": "public static function findUserByUsername(string $username): ?UserModelInterface;", "title": "" }, { "docid": "cbba2c7a499d86ef64ee76b6d774348b", "score": "0.67055535", "text": "public function findUserByUsername($username)\n {\n return $this->findUserBy(array('username' => $username));\n }", "title": "" }, { "docid": "2cd4c6f911f199b77d3f497721e227e6", "score": "0.67040545", "text": "public function loadUserByUsername($username)\n {\n /**\n * get your user from some source here\n */\n $user = null;\n\n if (!$user) {\n throw new UsernameNotFoundException(sprintf('Username \"%s\" does not exist.', $username));\n }\n\n return new User($user);\n }", "title": "" }, { "docid": "510d0fd85d90929d2b10b5b6c2f4c4cd", "score": "0.6697597", "text": "public function findUserByUsername($username)\n {\n return $this->findUser(['username' => $username, 'scope' => [User::SCOPE_BACKEND, User::SCOPE_BOTH]])->one();\n }", "title": "" }, { "docid": "85acc2cac44a12861f6812155508cf8c", "score": "0.66945815", "text": "public function findUserByUsername($username)\n {\n return $this->findUserBy(array(\n 'username' => $username\n ));\n }", "title": "" }, { "docid": "26cb24c5a5a54b3bb1c7cd515e7d2070", "score": "0.669309", "text": "public static function findByUsername( $username ) {\n \treturn User::findOne( ['username' => $username] );\n }", "title": "" }, { "docid": "0437a89cd82e0753a5cf8f1b10d821aa", "score": "0.6689347", "text": "function discoverUser($username) {\n\t\t$plugins = JPluginHelper :: getPlugin('usersource');\n\t\tforeach ($plugins as $plugin) {\n\t\t\t$className = 'plg' . $plugin->type . $plugin->name;\n\t\t\tif (class_exists($className)) {\n\t\t\t\t$plugin = new $className ($this, (array)$plugin);\n\t\t\t} else {\n\t\t\t\tJError :: raiseWarning('SOME_ERROR_CODE', 'JAuthUserSource::discoverUser: Could not load ' . $className);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// Try to find user\n\t\t\t$user = new JUser();\n\t\t\tif(method_exists($plugin, 'getUser') && $plugin->getUser($username,$user)) {\n\t\t\t\treturn $user; //return the first user we find\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tJError::raiseNotice(1, 'Plugin '. $className .' failed to find user');\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "fe5054392d9204b9bebf55fb594b3e4d", "score": "0.66841966", "text": "function fetchUserByUsername($username)\n {\n $sql = 'SELECT * FROM '. $this->name .' WHERE username = :username';\n $results = $this->dbHandler->prepare($sql);\n $results->execute(array(\n ':username' => $username\n ));\n $row = $results->fetch();\n if($row) {\n $user = new User($row);\n } else {\n $user = NULL;\n }\n return $user;\n }", "title": "" }, { "docid": "1a275da0eeaf7da2e24ebe18e5ef23be", "score": "0.66814244", "text": "public function getUserByUserName(string $username)\n {\n $query = \"SELECT UserID FROM Users WHERE UserName=?\";\n $query = $this->db->prepare($query);\n $query->execute([$username]);\n\n\n if ($query->rowCount() > 0) {\n $result = $query->fetch();\n return $this->getOne($result['UserID']);\n }\n\n return false;\n }", "title": "" }, { "docid": "b01c4acdaa46811c488663257c69c483", "score": "0.6677967", "text": "public static function findByUsername($username) {\n $user = static::findOne(['usu_user' => $username, 'usu_estado' => 1]);\n if (isset($user->usu_id))\n return $user;\n else\n return NULL;\n }", "title": "" }, { "docid": "cb464ec13eaf21eb36dd797f4d83c6dd", "score": "0.66705924", "text": "public function getUserByName(string $username, bool $force = false)\n {\n\n if (!$force AND isset($this->cache['users'][$username]['details'])) {\n return $this->cache['users'][$username]['details'];\n }\n\n $body = $this->_request('GET',\"Users?filter=userName eq \\\"$username\\\"\");\n\n if ($body->totalResults != 1) {\n throw new SlackSCIMUserNotFoundException(\"User not found\");\n }\n\n $this->_cacheUser($body->Resources[0]);\n\n return $body->Resources[0];\n }", "title": "" }, { "docid": "b3de79e3e38dfc540e0be19c7f824124", "score": "0.6661929", "text": "public function lookup_user_by_name($name);", "title": "" }, { "docid": "85e769c22b23318fe94bb14b6993cb5d", "score": "0.66606134", "text": "function getUserByUsername($username){\n\t$result = mysql_query(\"\n\t\tselect * \n\t\tfrom users\n\t\twhere username = '$username'\n\t\");\n\tif (!$result){\n\t\techo 'Quick, tell the nearest professional:'.mysql_errno().': '.mysql_error().'<br>';\n\t}\n\t$rows = mysql_num_rows($result); // extra valdation for function use in login...\n\tif ($rows == 0){\n\t\t// user not found\n\t\treturn false;\n\t} else {\n\t\t// user was found\n\t\t$data = mysql_fetch_assoc($result);\n\t\treturn $data;\n\t\treturn true;\n\t}\n}", "title": "" }, { "docid": "a2f272392badef66d4990e864ad922fa", "score": "0.6655738", "text": "public function findUserByUsername($username)\n {\n return $this->findUserBy(['username' => $username]);\n }", "title": "" }, { "docid": "a597c980222299a16c4e07ee04c46842", "score": "0.6655096", "text": "public function loadUserByUsername($username)\n {\n $contact = $this->contactRepository->findByName($username);\n if (is_null($contact)) {\n throw new UsernameNotFoundException();\n }\n return $contact;\n }", "title": "" }, { "docid": "cace86a87a10a8070493de7294fa7398", "score": "0.6644717", "text": "function get_user_by_username($username)\n\t{\n\t\t$this->db->where('LOWER(username)', strtolower($username));\n\n\t\t$query = $this->db->get($this->table_name);\n\t\tif ($query->num_rows() == 1) return $query->row();\n\t\treturn NULL;\n\t}", "title": "" }, { "docid": "420c27fb8f4b46bdedbabc2b4f7f3359", "score": "0.66314715", "text": "public function findUserByUsername($username)\n {\n return \\Chamilo\\Core\\User\\Storage\\DataManager::retrieve_user_by_username($username);\n }", "title": "" }, { "docid": "61aa8956896b04112da651d1d8f16f86", "score": "0.6630797", "text": "function get_user_by_username($username)\r\n\t{\r\n\t\t$this->db->where('LOWER(username)=', strtolower($username));\r\n\r\n\t\t$query = $this->db->get($this->table_name);\r\n\t\tif ($query->num_rows() == 1) return $query->row();\r\n\t\treturn NULL;\r\n\t}", "title": "" }, { "docid": "b8dfb5bd9b05f8d4b825fdd509668b23", "score": "0.66241825", "text": "function getUserByName($username);", "title": "" }, { "docid": "6deb510e0d5782cc4f0bf9f9d301c0e7", "score": "0.66174", "text": "function loadUserByUsername($username) {\r\n\t\tglobal $modx;\r\n\r\n\t\t$res = $modx->db->select('id', $modx->getFullTableName(\"web_users\"), 'username=\"' . $username . '\"');\r\n\t\t$cnt = $modx->db->getRecordCount($res);\r\n\t\tif ($cnt > 1) {\r\n\t\t\t$this->error = 'Duplicate username ' . $username . ' in DB!';\r\n\t\t} else if ($cnt == 1) {\r\n\t\t\t$row = $modx->db->getRow($res);\r\n\t\t\t$this->uid = $row['id'];\r\n\t\t\t$this->getWebuserInfo();\r\n\t\t\tif ($this->error == '') {\r\n\t\t\t\t$this->isNew = false;\r\n\t\t\t\t$this->userExists = true;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "c7721c7a76e37daffefc29069883f51c", "score": "0.6613461", "text": "public function getUserWithUsername($username): ?User;", "title": "" }, { "docid": "0c422d3fb8f485f4d882969b73556900", "score": "0.6607562", "text": "public function findByName($name): User\r\n {\r\n if (!$user = User::findByName($name)) {\r\n throw new EntityNotFoundException('User not found.');\r\n }\r\n\r\n return $user;\r\n }", "title": "" }, { "docid": "d55396de64db9d7a18d75092179c3a1e", "score": "0.6601583", "text": "public function loadUserByUsername($username)\n {\n return $this->findOneBy(array('login' => $username));\n }", "title": "" }, { "docid": "cae781729e7ef62b40a6822de8dffe52", "score": "0.6585012", "text": "public function getUserByName(\n $username\n )\n {\n\n if (!is_int($username)) {\n throw new InvalidArgumentException(\n \"is not a valid username. {$username} given.\"\n );\n }\n\n /* handle database with return */\n }", "title": "" }, { "docid": "5a1e86868ca8c5a73267df3a526375cf", "score": "0.6584169", "text": "public function loadUserByUsername($username)\n {\n\t\t$userData = array(\"username\" => \"jaap\", \"password\" => \"jaap1234\", \"salt\" => \"\", \"roles\" => array('ROLE_USER'));\n // pretend it returns an array on success, false if there is no user\n\n if ($userData) {\n $username = $userData['username'];\n $password = $userData['password'];\n $salt = $userData['salt'];\n $roles = $userData['roles'];\n\t\t\t\n\t\t\t$user = new WebserviceUser($username, $password, $salt, $roles);\n\t\t\treturn $user;\n\t\t}\n\n //throw new UsernameNotFoundException(sprintf('Username \"%s\" does not exist.', $username));\n }", "title": "" }, { "docid": "9b9532a9e4243b2be76a9ee2b626c3ff", "score": "0.6583543", "text": "public function findById(string $userId) : User\n {\n /** @var User $user */\n foreach ($this->users as $user) {\n if ($user->getName() == $userId) {\n return $user;\n }\n }\n\n throw new \\InvalidArgumentException(\"Missing user: {$userId}\");\n }", "title": "" }, { "docid": "bbf89e1f39f638cc28da3e01711f1099", "score": "0.65827984", "text": "private function checkUserExists(string $username, bool $auto_throw = false){\n $this->checkNotConnected();\n $qr_all = $this->connection->query(\"SELECT nm_user FROM tb_users WHERE nm_user = \\\"$username\\\";\");\n while($row = $qr_all->fetch_array()){\n if($row['nm_user'] == $username) return true;\n }\n if($auto_throw) throw new UserNotFound(\"There's no user '$username'\", 1);\n else return false;\n }", "title": "" }, { "docid": "a3bf42dbfcb3a6439da24aad67ed8d48", "score": "0.65749466", "text": "public function getUserbyUsername($username) {\n\t\t$this->dbHandler = Pdo::getPdo ();\n\t\t$stmt = $this->dbHandler->prepare ( \"SELECT * from user where username=:username\" );\n\t\t$stmt->bindParam ( ':username', $username, PDO::PARAM_STR );\n\t\t$stmt->execute ();\n\t\t// if user does not exisit create dummy object and set valid to false\n\t\tif (! ($stmt->rowCount () < 1)) {\n\t\t\t$result = $stmt->fetch ( PDO::FETCH_ASSOC );\n\t\t\t$user = getUserFromRecord ( $result );\n\t\t} else {\n\t\t\t$user = new User ();\n\t\t\t$user->setValid ( false );\n\t\t}\n\t\t\n\t\t$stmt->close ();\n\t\t$this->dbHandler->close ();\n\t\t\n\t\treturn $user;\n\t}", "title": "" }, { "docid": "5d4cd15df1911bba01d1d75a221c72e2", "score": "0.65679294", "text": "private function getUser($username)\n {\n return $this->userRepository->findOneByUserName($username);\n }", "title": "" }, { "docid": "06ef6c0fd675bedbdda37c9aa1d28bb1", "score": "0.6565332", "text": "public function byUsername($name)\r\n {\r\n return $this->user->whereUsername($name)->firstOrFail();\r\n }", "title": "" }, { "docid": "3b6b770e5a9fc93a4696c4764c4b7e84", "score": "0.6557848", "text": "public static function findByUsername($username)\n {\n return User::find()->where(['username' => $username])->one();\n }", "title": "" }, { "docid": "10ec6b77d7c26c943a14a846d168db1a", "score": "0.6553488", "text": "public function loadUser()\n {\n\n // load the entity manager and the user repository\n $entityManager = $this->getEntityManager();\n $repository = $entityManager->getRepository('AppserverIo\\Apps\\Example\\Entities\\Impl\\User');\n\n // try to load the user and log the found name\n if ($user = $repository->findOneBy(array('username' => 'appserver'))) {\n \\info(sprintf('Found user with username: %s', $user->getUsername()));\n }\n }", "title": "" }, { "docid": "b65b29c61c12be917af25b20436b4e4a", "score": "0.6553354", "text": "public function find($id)\n\t{\n\t\t$user = $this->model->find($id);\n\n\t\tif (!$user)\n\t\t{\n\t\t\tthrow new UserNotFound('User #' . $id . ' not found');\n\t\t}\n\t\t\n\t\treturn $user;\n\t}", "title": "" }, { "docid": "5d4b767bc8e75c9b8cb4c2e4d7321781", "score": "0.65449995", "text": "public function findUserByUsername($username){\n $em = $this->get('doctrine.orm.entity_manager');\n $user = $em->getRepository(\"ApplicationSonataUserBundle:User\")->findOneByUsername($username);\n return $user;\n }", "title": "" }, { "docid": "2294a064dba942920c22a79a2b732691", "score": "0.6540109", "text": "public function findUserForAuthentication($username)\n {\n $requestManager= new ServerRequestManager();\n $requestManager->setDatabase($requestManager->getDatabaseUsers());\n $requestManager->setOperation('WS:OP:GET-ONE');\n $requestManager->setCollection('CUser');\n $requestManager->setQuery(Tags::kTAG_USER_CODE,Types::kTYPE_STRING, $username, Operators::kOPERATOR_EQUAL);\n $requestManager->addQuery(Tags::kTAG_USER_DOMAIN,Types::kTYPE_STRING,'TIP', Operators::kOPERATOR_EQUAL);\n \n return $requestManager->sendRequest();\n }", "title": "" }, { "docid": "c0b665ba4e8ed4161480c54d94286fd3", "score": "0.6539426", "text": "public function loadUserByUsername($username)\n {\n $user = $this->findUserByUid($username);\n\n if (empty($user))\n throw new UsernameNotFoundException('User with uid ' . $username . ' can not be found');\n\n return $user;\n// if (empty($user)) {\n// try {\n// $this->oauthProxy->authorize();\n// $uid = $this->oauthProxy->getUserId();\n//\n// } catch (\\Exception $e) {\n// $uid = null;\n// }\n//\n// if (!empty($uid)) {\n// $user = new User();\n// $user->setEnabled(true); // Temporary enable user - to access connect page\n// $user->setPassword('');\n// $user->setUsername($uid);\n// $user->setEmail($uid . '@facebook.com');\n// $user->setOkUid($uid);\n// $user->addRole(User::ROLE_FACEBOOK_USER);\n//// $this->userManager->updateUser($user, false);\n// }\n// }\n//\n// if (empty($user)) {\n// throw new UsernameNotFoundException('The user is not authenticated on Facebook');\n// }\n\n }", "title": "" }, { "docid": "ce52dabdfc58b4dfc9f58917b31ed6b0", "score": "0.6536872", "text": "public static function findByUsername($username=\"\") {\n global $database;\n\t\t$sql = \"SELECT * FROM users \";\n\t\t$sql .= \"WHERE username = '{$username}' \";\n\t\t$sql .= \"LIMIT 1\";\n\t\t$result_array = self::findBySql($sql); // $result_array is an object\n\t\t\n\t\treturn !empty($result_array) ? array_shift($result_array) : false;\n\t\t\t\n\t}", "title": "" }, { "docid": "3aea0780925fd29b8d577b23ce29bb35", "score": "0.6533414", "text": "private function findUser($identifier)\n {\n try {\n $user = $this->userRepository->findUserByIdentifier($identifier);\n } catch (NoResultException $exc) {\n throw new EntityNotFoundException($this->userRepository->getClassName(), $identifier, $exc);\n }\n\n if (!$this->hasSystem($user)) {\n throw new UserNotInSystemException($this->getSystem(), $identifier);\n }\n\n return $user;\n }", "title": "" }, { "docid": "3b2dbfc1f77378e47b7f934b1d42df3b", "score": "0.65333116", "text": "public function getUser($username);", "title": "" }, { "docid": "3b2dbfc1f77378e47b7f934b1d42df3b", "score": "0.65333116", "text": "public function getUser($username);", "title": "" }, { "docid": "a4466b5517a00931bd4753b4b40f4b78", "score": "0.6532417", "text": "public static function get_user($username)\n {\n global $db;\n if (strpos($username, '@') !== false) {\n $user = query_one($db, '\n SELECT user_id FROM users\n WHERE email=%s', $username);\n } else {\n $user = query_one($db, '\n SELECT user_id FROM users\n WHERE username=%s', $username);\n }\n if (!$user)\n return false;\n return new User($user->user_id);\n }", "title": "" }, { "docid": "0fd6026da80a2204b9e02baa677761db", "score": "0.6523354", "text": "public function loadUserByUsername($username)\n {\n $userData = array();\n // pretend it returns an array on success, false if there is no user\n\n if ($userData) {\n $password = '...';\n\n // ...\n\n return new UserWebservice($username, $password, $salt, $roles);\n }\n\n throw new UsernameNotFoundException(\n sprintf('Username \"%s\" does not exist.', $username)\n );\n }", "title": "" }, { "docid": "2c9c15aab7b00c71f19e8c07e49a07ae", "score": "0.6518768", "text": "function account_validate_user() {\n $username = request('username');\n if (!$username) {\n // no username specified. we're probably talking about\n // current remote user\n global $identity_user;\n $user = $identity_user;\n } else {\n // validate username\n $user = user_get_by_username($username);\n }\n\n // permission check\n\n return $user;\n}", "title": "" }, { "docid": "d077aae233877878cfaeda5392b66800", "score": "0.65161186", "text": "public function getByUsername($username)\n {\n return Table\\Users::findOne(['username' => $username]);\n }", "title": "" }, { "docid": "21f6fd0f1b4ba202c70d61f57b54aff6", "score": "0.65137637", "text": "public static function get_user_by_username($username) {\n\t\t\n\t\tglobal $db;\n\t\t\n\t\t$username = $db->real_escape_string($username);\n\t\t\n\t\t$qry = \"SELECT * \";\n\t\t$qry .= \"FROM users \";\n\t\t$qry .= \"WHERE user='{$username}' \"; // single quotes around {$username} because its a string, not integer\n\t\t$qry .= \"LIMIT 1\";\n\t\t$result = $db->query($qry);\n\t\t$db->confirm_qry($result);\n\t\t\n\t\tif ($user = $result->fetch_assoc()) {\n\t\t\t$result->free();\t\t\n\t\t\treturn self::create_from_record($user);\n\t\t} \n\t\t\n\t\treturn false;\n\n\t}", "title": "" }, { "docid": "c7b5bf659fbefae1ccbdc2d6dc1abd82", "score": "0.65033615", "text": "public function loadUserByUsername($email)\n {\n $repository = $this->em->getRepository(LocalAccount::class);\n\n $user = $repository->findOneBy(['email' => $email]);\n if (null === $user) {\n $excep = new UsernameNotFoundException('User not found.');\n $excep->setUsername($email);\n throw $excep;\n }\n\n return $user;\n }", "title": "" }, { "docid": "a39360c76cd645abcaccba729a384ea6", "score": "0.65019923", "text": "private function fetchUser(string $apiToken) : User\n {\n $user = $this->repository->findOneByToken($apiToken);\n if ( $user === null ) {\n throw new UsernameNotFoundException(\n sprintf('No user with the provided token \"%s\" could be found.', $apiToken)\n );\n }\n return $user;\n }", "title": "" }, { "docid": "695092304daff0663973031375d6df06", "score": "0.64944", "text": "public function fetchUserByUsername($username)\n {\n $result = $this->repository->findByField('email', $username);\n return count($result) ? $result[0] : null;\n }", "title": "" }, { "docid": "be36d43eebabadca362e370ecf3a7bed", "score": "0.647389", "text": "protected function resolveUser()\n {\n if ($this->user = User::where('username', $this->argument('username'))->first()) {\n if ($this->user->username == config('auth.admin.username')) {\n return $this->error('Cannot update admin account.');\n } \n return true;\n }\n return $this->error(\"Cannot find user [{$this->argument('username')}].\");\n }", "title": "" }, { "docid": "e3d4deebd7124f5d16129ab8cebabe70", "score": "0.64727163", "text": "public function getUserByUsername($username)\n {\n }", "title": "" }, { "docid": "ae3d68103e9da3fa50062783ac1ecacc", "score": "0.64703214", "text": "public function testFindUserByUsernameFailed()\n {\n expect_not(User::findByUsername('not-existing'));\n }", "title": "" }, { "docid": "eae3d0897f3af3cd094f725769bef04b", "score": "0.6470306", "text": "public static function findByUsername($username)\n {\n $user = new User();\n return $user->findBySql(\"SELECT * FROM user WHERE username =:username\", array(':username'=>$username))->one();\n }", "title": "" }, { "docid": "91e5e73ee48a2ad9215eea841c88d763", "score": "0.64683455", "text": "public function findOneByUsername(string $username): ?UserInterface;", "title": "" } ]
06ea1df7e601f16ec922125eff2dab12
Index Page for this controller. Maps to the following URL or or Since this controller is set as the default controller in config/routes.php, it's displayed at So any other public methods not prefixed with an underscore will map to /index.php/welcome/
[ { "docid": "e88e51328c0f59454cea4c05b9c74c22", "score": "0.0", "text": "public function __construct() {\n parent::__construct();\n $this->load->library('session');\n $this->load->model(\"Page_model\");\n $this->load->model(\"Book_model\");\n $this->load->model(\"Register_model\");\n $this->load->model(\"./Lang_fc\");\n }", "title": "" } ]
[ { "docid": "8ba2bad3a25739ea30952c8f105f6775", "score": "0.72283494", "text": "public function index()\n\t{\n\t\treturn view('welcome');\n\t}", "title": "" }, { "docid": "8ba2bad3a25739ea30952c8f105f6775", "score": "0.72283494", "text": "public function index()\n\t{\n\t\treturn view('welcome');\n\t}", "title": "" }, { "docid": "8ba2bad3a25739ea30952c8f105f6775", "score": "0.72283494", "text": "public function index()\n\t{\n\t\treturn view('welcome');\n\t}", "title": "" }, { "docid": "322f4c0b5e55561d1ebc84657a942c2f", "score": "0.7207821", "text": "public function index() {\n $data = [\n 'title' => 'Welcome'\n ];\n\n // Calls view() method from parent class\n $this->view('pages/index', $data);\n }", "title": "" }, { "docid": "b0e9c710265eccc42d9d9242ed8e1e93", "score": "0.7129021", "text": "public function index(){\n \techo \"Hello from index action in the Home controller!\";\n }", "title": "" }, { "docid": "91e7d56a324ebf377066a8e85a203147", "score": "0.7076934", "text": "public function index()\n\t{\n\t\t$this->view('home');\n\t}", "title": "" }, { "docid": "fe1c568fb595326c28b10e5304c644b4", "score": "0.70441884", "text": "public function index()\n\t{\n\t\t$this->load->helper('url');\n\t\t\n\t\t$this->load->view('welcome_message');\t\t\n\t}", "title": "" }, { "docid": "e7f8089146dcd0d0d610ae2c72bd1e9a", "score": "0.70290965", "text": "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "title": "" }, { "docid": "e7f8089146dcd0d0d610ae2c72bd1e9a", "score": "0.70290965", "text": "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "title": "" }, { "docid": "e7f8089146dcd0d0d610ae2c72bd1e9a", "score": "0.70290965", "text": "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "title": "" }, { "docid": "bf147cf4390d36507b27f8b7355e42aa", "score": "0.6950622", "text": "public function index()\n\t{\n\t\t$this->load->helper('url');\n\t\texit('cao');\n\n\t\t//$this->load->view('welcome_message');\n\t}", "title": "" }, { "docid": "f98a1166979aa71dcc6f80a8bf7d6bdd", "score": "0.69477123", "text": "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "title": "" }, { "docid": "f98a1166979aa71dcc6f80a8bf7d6bdd", "score": "0.69477123", "text": "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "title": "" }, { "docid": "f98a1166979aa71dcc6f80a8bf7d6bdd", "score": "0.69477123", "text": "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "title": "" }, { "docid": "f98a1166979aa71dcc6f80a8bf7d6bdd", "score": "0.69477123", "text": "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "title": "" }, { "docid": "f98a1166979aa71dcc6f80a8bf7d6bdd", "score": "0.69477123", "text": "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "title": "" }, { "docid": "f98a1166979aa71dcc6f80a8bf7d6bdd", "score": "0.69477123", "text": "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "title": "" }, { "docid": "f98a1166979aa71dcc6f80a8bf7d6bdd", "score": "0.69477123", "text": "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "title": "" }, { "docid": "f98a1166979aa71dcc6f80a8bf7d6bdd", "score": "0.69477123", "text": "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "title": "" }, { "docid": "f98a1166979aa71dcc6f80a8bf7d6bdd", "score": "0.69477123", "text": "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "title": "" }, { "docid": "f98a1166979aa71dcc6f80a8bf7d6bdd", "score": "0.69477123", "text": "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "title": "" }, { "docid": "f98a1166979aa71dcc6f80a8bf7d6bdd", "score": "0.69477123", "text": "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "title": "" }, { "docid": "f98a1166979aa71dcc6f80a8bf7d6bdd", "score": "0.69477123", "text": "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "title": "" }, { "docid": "86de67bf7fab1a110395a901426a9c64", "score": "0.6943613", "text": "public function index()\n {\n return view ('welcome');\n }", "title": "" }, { "docid": "6b0de5afe9af51a2c502df2af4570203", "score": "0.69391036", "text": "public function index()\n\t{\n $this->showPage('index');\n\t}", "title": "" }, { "docid": "f2ad6cb05edbcab06201eb9644e9fceb", "score": "0.6937144", "text": "public function index()\n {\n return view('welcome', ['title' => 'Home']);\n }", "title": "" }, { "docid": "7b693ad33621bb553322198d699939a0", "score": "0.69365185", "text": "public function index()\n {\n return view(\"welcome\");\n }", "title": "" }, { "docid": "ab12bb7355ae277d14179392a283446f", "score": "0.6934733", "text": "public function index()\n\t{\n\t\t $this->load->view('index');\n\t}", "title": "" }, { "docid": "28bb6a5bf19b2d04c6e2f0133261118c", "score": "0.6918673", "text": "public function index()\n {\n return view('welcome.index');\n }", "title": "" }, { "docid": "44336d6969abdf633d4e7eff0476b52d", "score": "0.69144815", "text": "public function index() {\n $this->registry->template->welcome = 'Welcome to miny MVC';\n /* * * load the index template ** */\n $this->registry->template->show('index');\n }", "title": "" }, { "docid": "3e5a4736ca1c43987f8b5f452369c6e1", "score": "0.6899198", "text": "function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "title": "" }, { "docid": "d5276dd01e9d0a8016e9e9ec1ebd1be9", "score": "0.6891972", "text": "public function index()\n\t{\n\t\t// redirect to custom page\n\t\tredirect('welcome');\n\t\t// or display some view\n\t\t// $this->render('public/dashboard');\n\t}", "title": "" }, { "docid": "4093cc23be624a3e0c58dba5c29d8844", "score": "0.68771684", "text": "public function indexAction()\n {\n View::renderTemplate('Home/index.html', [\n 'name' => 'Kris',\n 'colors' => ['red', 'green', 'blue']\n ]);\n\n //echo 'Hello from the index action of the HomeController';\n /**View::render(\n 'Home/index.php',\n [\n 'name' => 'Dave',\n 'colors' => ['red', 'green', 'blue']\n ]\n );*/\n //what is ::?\n //:: means Scope resolution operator.\n //Scope resolution operator: allows access to content\n }", "title": "" }, { "docid": "f4b5ddd28870e45223f5d2ca4ec39734", "score": "0.68664455", "text": "public function index()\n {\n $this->registry->view->welcome = 'Welcome to Code_IT task';\n\n /*** load the index template ***/\n $this->registry->view->show('index');\n }", "title": "" }, { "docid": "8d3e08a5ee0e46b7ead8465373e7119d", "score": "0.6815909", "text": "public function index() {\n $this->load->view('welcome_message');\n }", "title": "" }, { "docid": "5821cb787b6ac78b547b4f2552539a11", "score": "0.6812756", "text": "public function index() {\n Session::init();\n if(Session::get('username')){\n if(Session::get('admin')){\n Url::redirect('exec');\n }\n }else{\n Url::redirect('');\n }\n\n $data['title'] = 'Home';\n\t\t\n //$welcome_model = new \\models\\welcome();\n \n \n\t\tView::rendertemplate('header', $data);\n\t\tView::render('welcome/welcome', $data);\n\t\tView::rendertemplate('footer', $data);\n\t}", "title": "" }, { "docid": "b8554d895ae1a174ee814e91709ca9da", "score": "0.68030185", "text": "public function index()\n {\n $this->load->view('welcome_message');\n }", "title": "" }, { "docid": "b8554d895ae1a174ee814e91709ca9da", "score": "0.68030185", "text": "public function index()\n {\n $this->load->view('welcome_message');\n }", "title": "" }, { "docid": "afd14188c9b7e2d9895165d6576ec55c", "score": "0.67976046", "text": "public function index(){\n $this->view(\"index\", array());\n }", "title": "" }, { "docid": "76df352eb0e9fe815ee37f2d980c922a", "score": "0.67949975", "text": "public function index()\n {\n return view('public.welcome');\n }", "title": "" }, { "docid": "694ec9539ab8476cbf824c8900aebd5e", "score": "0.67919886", "text": "public function index() {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.6768394", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.6768394", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.6768394", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.6768394", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.6768394", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.6768394", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.6768394", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.6768394", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.6768394", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.6768394", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.6768394", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.6768394", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.6768394", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.6768394", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.6768394", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.6768394", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.6768394", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.6768394", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.6768394", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.6768394", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "5d4e0ccf87bfa1bc7426cd164600e587", "score": "0.6760406", "text": "public function index()\n\t{\n\t\treturn view('home');\n\t}", "title": "" }, { "docid": "5d4e0ccf87bfa1bc7426cd164600e587", "score": "0.6760406", "text": "public function index()\n\t{\n\t\treturn view('home');\n\t}", "title": "" }, { "docid": "5d4e0ccf87bfa1bc7426cd164600e587", "score": "0.6760406", "text": "public function index()\n\t{\n\t\treturn view('home');\n\t}", "title": "" }, { "docid": "5d4e0ccf87bfa1bc7426cd164600e587", "score": "0.6760406", "text": "public function index()\n\t{\n\t\treturn view('home');\n\t}", "title": "" }, { "docid": "5d4e0ccf87bfa1bc7426cd164600e587", "score": "0.6760406", "text": "public function index()\n\t{\n\t\treturn view('home');\n\t}", "title": "" }, { "docid": "5d4e0ccf87bfa1bc7426cd164600e587", "score": "0.6760406", "text": "public function index()\n\t{\n\t\treturn view('home');\n\t}", "title": "" }, { "docid": "5d4e0ccf87bfa1bc7426cd164600e587", "score": "0.6760406", "text": "public function index()\n\t{\n\t\treturn view('home');\n\t}", "title": "" }, { "docid": "5d4e0ccf87bfa1bc7426cd164600e587", "score": "0.6760406", "text": "public function index()\n\t{\n\t\treturn view('home');\n\t}", "title": "" }, { "docid": "5d4e0ccf87bfa1bc7426cd164600e587", "score": "0.6760406", "text": "public function index()\n\t{\n\t\treturn view('home');\n\t}", "title": "" }, { "docid": "b42e74733c3142bcd3cdcd88e3d71310", "score": "0.6760064", "text": "public function index() {\n\t\t\n\t\treturn view('home');\n\t}", "title": "" }, { "docid": "6e1e9409e4c66ee3a51fc5753f8a9d45", "score": "0.67521983", "text": "function index()\n\t{\n\t$this->load->view(\"index\");\n\t}", "title": "" }, { "docid": "8762139717b1cc4749d41f4467ef9fbd", "score": "0.6741907", "text": "public function index()\n\t{\n\t\t$this->load->helper('form');\n\n\t\t$this->load->helper('url');\n\n\t\t$this->load->view('welcome_message');\n\t}", "title": "" }, { "docid": "0f3e0a75e2673573da6cc23c74cc4c42", "score": "0.67413354", "text": "function index() {\r\n $this -> display('index');\r\n }", "title": "" }, { "docid": "8385e6598f936aa1ba3b3cb0977f4261", "score": "0.6739434", "text": "public function index()\n {\n //\n return 'Welcome';\n }", "title": "" }, { "docid": "14105e8b6cbe06cf9485f86946d1bfb7", "score": "0.6738347", "text": "function index() {\n\t\trender(\"home/index\");\t\n\t}", "title": "" }, { "docid": "a1d759fb756d5776157c3d5207c16f08", "score": "0.67217577", "text": "public function index()\n\t{\n\t\t// header(\"Location\")\n\t\tredirect(\"welcome/sing\");\n\t\t// $this->load->view('welcome_message');\n\t}", "title": "" }, { "docid": "ae9f34b3e3311592c770935e37259d6a", "score": "0.671263", "text": "public static function index() {\n $success = 'alert-success';\n $doneMsg = 'welcome';\n return homeController::index($doneMsg, $success);\n }", "title": "" }, { "docid": "b4c3e961f359739a59ea4d9737aade5b", "score": "0.6708278", "text": "public function index()\n\t{\n\t\t$dato['string'] = '<br /> 1. abre el index desde controllers/Welcome.php :D\n\t\t\t\t\t\t <br /> 2. La URL http://localhost:8000/CodeIgniter/Controlador -> carga index\n\t\t\t\t\t\t <br /> http://localhost:8000/Controlador/Funcion -> carga una funcion del controlador\n\t\t\t\t\t\t <br /> 3. Sintaxis de los helpers nombreHelper_helper.php\n\t\t\t\t\t\t ';\n\t\t$this->load->view('welcome_message', $dato);\n\t}", "title": "" }, { "docid": "772752ab4d8244fda81acf360cb0ff40", "score": "0.67009115", "text": "public function index()\n\t{\n\t\t$this->load->view('pages/index');\n\t}", "title": "" }, { "docid": "a225a47c792f29147e3f65e8467a2ea7", "score": "0.6695596", "text": "public function index()\n {\n $data['title'] = $this->language->get('welcomeText');\n $data['welcome_message'] = $this->language->get('welcomeMessage');\n\t\techo(\"welcome index\");\n View::renderTemplate('header', $data);\n View::render('Welcome/welcome', $data);\n View::renderTemplate('footer', $data);\n }", "title": "" }, { "docid": "bd2b9467fd73a10228c55289770d10dc", "score": "0.66942126", "text": "public function index() {\n\t\treturn view('home');\n\t}", "title": "" }, { "docid": "bd2b9467fd73a10228c55289770d10dc", "score": "0.66942126", "text": "public function index() {\n\t\treturn view('home');\n\t}", "title": "" }, { "docid": "8173aa114e26861bc8fcc562995c77af", "score": "0.66843945", "text": "public function index()\n {\n // debug message to show where you are, just for the demo\n echo 'Message from Controller: You are in the controller home, using the method index()';\n // load views. within the views we can echo out $songs and $amount_of_songs easily\n require 'application/views/_templates/header.php';\n require 'application/views/home/index.php';\n require 'application/views/_templates/footer.php';\n }", "title": "" }, { "docid": "020c592f8003cd80de80427225ccbed9", "score": "0.66641897", "text": "public function index()\r\n {\r\n $view = Init::app()->getView();\r\n $view->setData('title', 'Main page');\r\n $view->display('index');\r\n }", "title": "" }, { "docid": "d665d18755ef537859ee048b4ed7b550", "score": "0.66604406", "text": "public function index()\r\n\t{\r\n\t\techo \"index\";\r\n\t}", "title": "" }, { "docid": "72a4515ab2015a21be59ffac195ae3a1", "score": "0.6644451", "text": "public function index()\n {\n view('Home/index');\n }", "title": "" }, { "docid": "8d429d3101dd76631bc715a4c821c724", "score": "0.66436934", "text": "public function index()\r\n\t{ \r\n\t\treturn view('hello');\r\n\t}", "title": "" }, { "docid": "0b3b8d89428684718664bada2d3235b0", "score": "0.66352236", "text": "public function indexAction () {\t\n\t\techo \"index page!\";\n\t}", "title": "" }, { "docid": "2420a3b0fccb8003ed2980f174a65831", "score": "0.6633307", "text": "public function index()\n\t{\n\t return view('home.index.index');\n\t}", "title": "" }, { "docid": "c66aa05470ef9162fb5b70520493d500", "score": "0.66118306", "text": "public function actionIndex()\n\t{\n\t\techo \"basic index\";\n\t}", "title": "" }, { "docid": "0641dbad36e2147d8c9bee3386bb1c8f", "score": "0.66115475", "text": "public function index()\n\t{\n\t\t//return view('home');\n\t\treturn view('dashboard.dashboard_index');\n\t}", "title": "" }, { "docid": "0d32d71b5980eef13977fc83beb1533d", "score": "0.661031", "text": "function index()\r\n\t{\r\n\t\t$this->view();\r\n\t}", "title": "" }, { "docid": "7c81bdd2a9e181d2a6f9684a1b543720", "score": "0.65970546", "text": "public function indexAction()\n {\n View::render('Home/index.php', [\n 'user' => Authentication::getUser()\n ]);\n }", "title": "" }, { "docid": "cccaee802bbf83fe8255d03e6ca57958", "score": "0.6593197", "text": "public function getIndex()\n {\n return View::make('backend/posts/welcome');\n }", "title": "" }, { "docid": "01eae32227eda9e70b70311285b74f26", "score": "0.65880793", "text": "public function index()\n\t{\n\t\t$this->data['view'] = 'homepage/homepage_view'; // main view we will see in the middle of the page\n\n\t\t$this->load_view(); // declared in MY_Controller - equivalent to $this->load->view('main_template_view');\n\t}", "title": "" }, { "docid": "f864084ede34ba2d445ac476b644a23d", "score": "0.6575556", "text": "public function index()\n\t{\n\t\treturn view('index');\n\t}", "title": "" }, { "docid": "f864084ede34ba2d445ac476b644a23d", "score": "0.6575556", "text": "public function index()\n\t{\n\t\treturn view('index');\n\t}", "title": "" }, { "docid": "8c78760cbd403024e79d034f70e55e0f", "score": "0.6573281", "text": "public function index()\r\n {\r\n $message = \"Bienvenue dans le projet marathon 2016\";\r\n\r\n return View::make('Welcome/Welcome')\r\n ->shares('title', __('Welcome'))\r\n ->with('welcomeMessage', $message);\r\n }", "title": "" }, { "docid": "42b37cb31994738620a07e1aa66651df", "score": "0.6559845", "text": "function index() {\n $this->load->view('home');\n }", "title": "" }, { "docid": "c90dd31c8f3d3730dbc31abc02b04a3c", "score": "0.65598184", "text": "public function index() {\n return view('default.index');\n }", "title": "" } ]
329fe52b4c472d5dd1a816d7eeb666c8
Set a given attribute on the resource.
[ { "docid": "7908d57cb22f81ee3eff13896a9b3882", "score": "0.0", "text": "public function setAttribute($key, $value)\n {\n if ($this->hasSetMutator($key)) {\n return $this->setMutatedAttributeValue($key, $value);\n }\n\n if (property_exists($this, $key)) {\n $this->{$key} = $value;\n }\n\n return $this;\n }", "title": "" } ]
[ { "docid": "f7bb1b06529ccd4b4839a3b7b959696c", "score": "0.77347124", "text": "public function setAttribute(string $attribute);", "title": "" }, { "docid": "dbdadc5eba5553f6a58f88d2be528562", "score": "0.72693163", "text": "function terminus_api_site_attribute_set($site_uuid, $attribute, $data) {\n $realm = 'site';\n $path = 'attributes/' . $attribute;\n $method = 'PUT';\n return terminus_request($realm, $site_uuid, $path, $method);\n}", "title": "" }, { "docid": "99f1b3c4116e7dad1fa8cde52cf18a57", "score": "0.7204912", "text": "public function __set($attribute, $value) {\n\t\t$this->$attribute= $value;\n\t}", "title": "" }, { "docid": "c76b63f955d6003e8785c8fb10497e7c", "score": "0.7187392", "text": "public function set($attr,$value){\n\t\t\t$this->$attr = $value;\n\t\t}", "title": "" }, { "docid": "2d61dccbeaa027ada91af725c1642387", "score": "0.7112511", "text": "function set_attribute($name, $value) {\r\n $this->attributes[$name] = (string) $value;\r\n }", "title": "" }, { "docid": "bf643f9277e9c9933b77902a89f5c8f8", "score": "0.71039206", "text": "abstract public function setAttribute($value);", "title": "" }, { "docid": "9ba4b4393511f5f7791b623c19ab453c", "score": "0.7088194", "text": "public function __set($attribute, $value)\n {\n $this->setAttribute($attribute, $value);\n }", "title": "" }, { "docid": "13f720e19f73c8a5cd56e076abfcb30c", "score": "0.7053833", "text": "function setattr($attribute, $value)\n {\n $this->_attributeValues[$attribute] = $value;\n }", "title": "" }, { "docid": "f2ca1db2ca739fb4407001d7b533b9b6", "score": "0.703539", "text": "public function __set($attr, $value)\n\t{\n\t\t$this->$attr = $value;\n\t}", "title": "" }, { "docid": "07a135849a8ddacc8244bb7ca7284026", "score": "0.69908655", "text": "protected function setAttribute( $attribute, $value ) {\n\t\t$this->{$attribute} = $value;\n\t}", "title": "" }, { "docid": "9c00e3cc7bb1862d128b18d871b07d17", "score": "0.69728935", "text": "public function setAttribute(Fci_Model_Attribute $attribute)\n {\n $this->_attribute = $attribute;\n }", "title": "" }, { "docid": "9f031c6c6af585d20699174cbf84fbbb", "score": "0.69377995", "text": "function set_attribute($name, $value) {\r\n $this->basenode->set_attribute($name, $value);\r\n }", "title": "" }, { "docid": "158517f9ee07e7e70d074ea0bc2d8069", "score": "0.6912988", "text": "public function setAttribute($attributeName, $attributeValue);", "title": "" }, { "docid": "c5effcb008979f5fdc903da1b39cefe4", "score": "0.6911943", "text": "public function set($attribute, $value){\n\t\tif(in_array($attribute, $this->getAttributes())){\n\t\t\t$this->data[$attribute] = $value;\n\t\t}\n\t}", "title": "" }, { "docid": "1560112507172f2138c51260d57d3511", "score": "0.689454", "text": "public function setAttribute($attr, $value) {\n $this->attributes[$attr] = $value;\n }", "title": "" }, { "docid": "254dcc6a23a3d7d998c443331a4ba8d7", "score": "0.68885607", "text": "function setAttribute($name, $value);", "title": "" }, { "docid": "3bde803dc8821f065150fa763bf82f7d", "score": "0.6866868", "text": "public function setAttribute($key, $value);", "title": "" }, { "docid": "57012843a87aca4531f034ccf093784b", "score": "0.6845862", "text": "public function setAttribute($model, Attribute $attribute, $value): void;", "title": "" }, { "docid": "cf5fa75b6eb4b14b33dfd9efd7f0086f", "score": "0.68389606", "text": "public function setAttributes($resource, array $attributes);", "title": "" }, { "docid": "3e1a60d7401b8a3cfd46f0d1b955cae7", "score": "0.68112296", "text": "abstract public function setAttribute($attr, $mode);", "title": "" }, { "docid": "8a96605e177389a0f31d9ce6fc5a3981", "score": "0.68085235", "text": "public function setAttribute($name, $value);", "title": "" }, { "docid": "8a96605e177389a0f31d9ce6fc5a3981", "score": "0.68085235", "text": "public function setAttribute($name, $value);", "title": "" }, { "docid": "26367197334a913364ddd2b98814533e", "score": "0.6799195", "text": "public function setAttribute($attribute, $value) {\n $this->attributes->setAttribute($attribute, $value);\n return $this;\n }", "title": "" }, { "docid": "c6680cfa4ccc335d0c0d071d3ff8e75a", "score": "0.67831576", "text": "abstract protected function __setAttribute( $strAttribute, $mixValue );", "title": "" }, { "docid": "5a823919585dc1f4c9dcd2bc7959d6af", "score": "0.6742174", "text": "public function set($attribute, $value)\n\t{\n\t\tif(in_array($attribute, $this->getAttributes())){\n\t\t\t$this->data[$attribute] = $value;\n\t\t}\n\t}", "title": "" }, { "docid": "4fff2776aba3816b988ebde5ec50a032", "score": "0.671539", "text": "function apigee_appdashboard_attribute_set($entity, $name, $value, $langcode, $type, $info)\n{\n $name = str_replace(\"attribute_\", '', $name);\n $entity->attributes[$name] = $value;\n}", "title": "" }, { "docid": "e818b62952f022080fee49fc3bb88a64", "score": "0.66926104", "text": "public function setAttribute($attribute, $value)\n {\n return $this->attributes->setAttribute($attribute, $value);\n }", "title": "" }, { "docid": "c8618d6f4673b565e1b25f0de952ebac", "score": "0.6686024", "text": "function __set_attribute($key, $value)\n {\n return $this->setattr($key, $value);\n }", "title": "" }, { "docid": "a7045efb37f279be362f59110f737f6e", "score": "0.6658322", "text": "public function setAttribute($attrName, $attrValue);", "title": "" }, { "docid": "efe8ad2e217af97f3c529d3117812713", "score": "0.66417587", "text": "public function __set($attrName, $attrValue);", "title": "" }, { "docid": "46e2e3ff42e8eb9a27dd6a56d78d6eac", "score": "0.66323173", "text": "public function setAttribute($key, $value) {\n\t\t$this->attributes->offsetSet($key,$value);\n\t}", "title": "" }, { "docid": "c195b89950a62582dce330bc4dbcd9ee", "score": "0.6595942", "text": "public function setAttr($attribute_name, $attribute_value)\n\t{\n\t\treturn $this->setAttribute($attribute_name, $attribute_value);\n\t}", "title": "" }, { "docid": "01d2925c714d22bbace759e243a33e94", "score": "0.6594304", "text": "public function __set($name, $value) {\n $this->attributes[$name] = $value;\n }", "title": "" }, { "docid": "afaf05a18023a08292ac2afd93522b6f", "score": "0.65648293", "text": "public function setAttribute($attribute, $value)\n {\n $this->pdo->setAttribute($attribute,$value);\n }", "title": "" }, { "docid": "b2905d0f3338765c8cacfe925c7b3977", "score": "0.65456504", "text": "public function setAttr($name, $value) {\n\t\t$this->$name = $value;\n\t}", "title": "" }, { "docid": "aede1798286198c2587cdc46d9e52be7", "score": "0.6540734", "text": "public function set_attribute($key, $value)\n {\n $params = array('key' => $key, 'value' => $value);\n return $this->_run('set_attribute', $params);\n }", "title": "" }, { "docid": "11dea9535fd59b482e3b4740b49dec5d", "score": "0.652683", "text": "public function __set($name, $value) {\n\t\t$this->attributes[$name] = $value;\n\t}", "title": "" }, { "docid": "137c40170085a52930c671050f6257e3", "score": "0.65250903", "text": "public function setAttribute($attribute = '')\n {\n if ($this->_options['mediaType'] == '') {\n throw new Zend_Service_Itunes_Exception('Attribute relates to media typebut no media type is set.');\n }\n\n // check if the attribute is in the set of attributes for media type\n if (in_array($attribute, $this->_attributesTypes[$this->_options['mediaType']])) {\n $this->_options['attribute'] = $attribute;\n } else {\n throw new Zend_Service_Itunes_Exception('Attribute is not in the set of attributes for this media type.');\n }\n }", "title": "" }, { "docid": "a33b17f51f0b25f98665488eb3dff530", "score": "0.64893615", "text": "function set_attribute($name,$value = NULL)\r\n\t\t{\r\n\t\t\t$this->attrs[$name] = $value;\r\n\t\t\treturn;\r\n\t\t}", "title": "" }, { "docid": "d68c2af025baaddd4b38c6f36b71ee06", "score": "0.64688724", "text": "public function SetAttribute( $name, $value )\r\n\t{\r\n\t\t$this->attributes[ $name ] = $value;\r\n\t}", "title": "" }, { "docid": "1f9c0ed3da4698853e41d89607d3e71f", "score": "0.64629453", "text": "public function __set($name, $value)\r\n {\r\n $this->attributes[$name] = $value;\r\n }", "title": "" }, { "docid": "54e0d972b61b9b3b601a5c37a971ffcb", "score": "0.644725", "text": "public function set_attribute($key, $value)\n {\n $this->attributes[$key] = $value;\n }", "title": "" }, { "docid": "ced4b17a4ea0a670f0d46db8e5a71e1f", "score": "0.64442426", "text": "function setResource($resource);", "title": "" }, { "docid": "f16ee8c1e4ca1a91c92a68e512a61ee5", "score": "0.64309883", "text": "public function set($attr, $value)\n {\n\n if ($this->phclass->is_boolean($attr) && !is_bool($value))\n {\n $value = boolval($value);\n }\n else if ($this->phclass->is_number($attr) && is_string($value))\n {\n // TODO: check for PHP_INT_MAX since the value can be truncated\n $value = $value + 0; // converts the value to a number\n }\n $this->{$attr} = $value;\n }", "title": "" }, { "docid": "17b56be8016141f989991f0fe3f8a0a0", "score": "0.6418944", "text": "function set_attributes($attrib)\r\n\t{\r\n\t\t$this->attributes = $attrib;\r\n\t}", "title": "" }, { "docid": "54e781c89f8d6be829ce08681deda1ee", "score": "0.63971835", "text": "public function __set(string $name, $value)\n {\n $this->attributes[$name] = $value;\n }", "title": "" }, { "docid": "abbcd8eb123d90fb8b0da2214319cbb7", "score": "0.63936937", "text": "public function __set(string $key, $attvalue);", "title": "" }, { "docid": "416bb7a117995ca8f9a37d007b2e2ba2", "score": "0.63885057", "text": "public function setAttribute($name, $value, $rundata) {\n $this->attributes[$name]= $value;\n }", "title": "" }, { "docid": "18585c3f17445c36eedd9aacbdf7b7f5", "score": "0.6367236", "text": "public function setAttributeValue($key, $value);", "title": "" }, { "docid": "e15a1364affa1a894d989f344302591d", "score": "0.6365139", "text": "public function setAttribute(int $attribute, mixed $value): bool;", "title": "" }, { "docid": "e15a1364affa1a894d989f344302591d", "score": "0.6365139", "text": "public function setAttribute(int $attribute, mixed $value): bool;", "title": "" }, { "docid": "6111628b3a8a743f689d775f17b03244", "score": "0.63585746", "text": "public function __set($name, $value)\n {\n $this->attributes[$name] = $value;\n }", "title": "" }, { "docid": "6111628b3a8a743f689d775f17b03244", "score": "0.63585746", "text": "public function __set($name, $value)\n {\n $this->attributes[$name] = $value;\n }", "title": "" }, { "docid": "0993e1849a2b00fb4bfc5cfd0d726214", "score": "0.6325054", "text": "public function setAttribute( $name, $value ) {\n\t\t$this->attributes[ $name ] = $value;\n\t}", "title": "" }, { "docid": "231f17d0bccb7c47e6983f249b5d3722", "score": "0.63152", "text": "public function set_attribute( string $attribute_name, $attribute_value ): void {\n\t\t\t_deprecated_function( __METHOD__, '4.6.0', 'setAttribute' );\n\n\t\t\t$this->attributes[ $attribute_name ] = $attribute_value;\n\t\t}", "title": "" }, { "docid": "8fbed4e77edc295a47e63b62d9d4097e", "score": "0.6283006", "text": "function setLinkAttribute($name, $value);", "title": "" }, { "docid": "01c24f05e847eadb5484970764aab84b", "score": "0.62810344", "text": "public function setAttributes(array $attr)\n\t{\n\t\t$this->_attributes = $attr;\n\t\tphpCAS::log('Forced setting of user masquerading attributes: '\n\t\t\t. serialize($attr));\n\t}", "title": "" }, { "docid": "a9dd403312974f24016b7f73edc4d91c", "score": "0.6277422", "text": "public function attribute($name, $value);", "title": "" }, { "docid": "c284f4809ce9e63d32092ff0cc7a14bd", "score": "0.6267598", "text": "public function _setAttributes($attributes);", "title": "" }, { "docid": "2ff47544cc10b70337555d98fc381edd", "score": "0.6258733", "text": "public function setAttribute($attribute, $value)\n {\n if ($attribute >= 100 && $attribute < 1000) {\n parent::setAttribute($attribute, $value);\n } else {\n if ($this->isConnected) {\n $this->dbh->setAttribute($attribute, $value);\n } else {\n $this->pendingAttributes[$attribute] = $value;\n }\n }\n\n return $this;\n }", "title": "" }, { "docid": "edaafbb1e37621ec1b366aaced7c94c0", "score": "0.6246045", "text": "public function setAttribute($name, $value) {\n\t\t\t$this->startAttribute($name);\n\t\t\t$this->text($value);\n\t\t\t$this->endAttribute();\n\t\t}", "title": "" }, { "docid": "5bde8b12431ee8b6e2d2279de1065a95", "score": "0.6241961", "text": "public function setAttribute(string $name, mixed $value): void;", "title": "" }, { "docid": "d492f9e07e9244fa42a2f5924cbd9eea", "score": "0.62414163", "text": "public function __set($name, $value)\n {\n if ($this->hasAttribute($name)) {\n $this->attributes[$name] = $value;\n } else {\n parent::__set($name, $value);\n }\n }", "title": "" }, { "docid": "d8fccb0f33af4b3438916da61de8c846", "score": "0.62317264", "text": "public function setAttribute($name, $value)\n {\n $this->attributes[$name] = $value;\n }", "title": "" }, { "docid": "3435a19bee48ee32302e7c2fb7b27cd1", "score": "0.62308973", "text": "public function __set($attrib, $value) {\r\n if (in_array($attrib, $this->commonAttribs)) {\r\n $this->$attrib = $value;\r\n }\r\n }", "title": "" }, { "docid": "1e7a0a82dc3e6704f31d3e9505369203", "score": "0.6225031", "text": "public function __SET($att, $valor){\n $this->$att = $valor;\n}", "title": "" }, { "docid": "855cb4296e3f24852686afcd82992e20", "score": "0.62229574", "text": "function __set($atrib, $valor){\n\t\t\t$this->$atrib = $valor;\n\t\t}", "title": "" }, { "docid": "afd0df98356b37b91ed2586c43ea8dbb", "score": "0.62079775", "text": "function set($key, $value)\n\t{\n\t\t$this->attr[$key] = $value;\n\t}", "title": "" }, { "docid": "4e9f11a1cfa046f7bed0db3aa6d43f77", "score": "0.61968637", "text": "public function __set($name, $value)\n\t{\n\t\tswitch($name) {\n\t\t\tcase 'ACCOUNTINGEXPENSES_UTILITIES_ID':\n\t\t\t\t//if the id isn't null, you shouldn't update it!\n\t\t\t\tif( !is_null($this->ACCOUNTINGEXPENSES_UTILITIES_ID) ) {\n\t\t\t\t\tthrow new Exception('Cannot update ACCOUNTINGEXPENSES_UTILITIES_ID!');\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\t\t\n\t\t//set the attribute with the value\n\t\t$this->$name = $value;\n\t}", "title": "" }, { "docid": "b3e0348836de6e83c518a5f7804a6797", "score": "0.6184877", "text": "public function __set($name, $value)\n {\n // Set the $name key to hold $value in $data\n // this instance of attributes name is the value - i.e. $name='location', $value='San Antonio' -- cheks and compares the two name and value.\n $this->attribute[$name] = $value;\n }", "title": "" }, { "docid": "61938a1a42e67833326f3671665f63ad", "score": "0.61702013", "text": "public function withAttribute(string $attribute): self;", "title": "" }, { "docid": "2e802c5956de5f25316a8e932c8374d1", "score": "0.6167247", "text": "function setTableAttribute($attr, $value)\r\n {\r\n $this->_table->_attributes[$attr] = $value;\r\n }", "title": "" }, { "docid": "ab4c7919703d4aba4b587738efd902b0", "score": "0.61523306", "text": "public function setAttribute($key, $value)\n {\n $this->_attributes[$key] = $value;\n }", "title": "" }, { "docid": "b52cb9f0e1b3d7dc934e8ef8fe01c88c", "score": "0.6150817", "text": "function setAttribute($name, &$value)\r\n\t{\r\n\t\tif (is_null($name))\r\n\t\t{\r\n\t\t\tthrow_exception(new IllegalArgumentException('Attribute name cannot be null [Application Context]'));\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// null value is the same as removeAttribute()\r\n\t\tif (is_null($value))\r\n\t\t{\r\n\t\t\t$this->removeAttribute($name);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->attributes[$name] =& $value;\r\n\t\t\t$this->context->setContextModified(true);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "2e36f10e9fb8148267503c4c9e30ff9a", "score": "0.61436856", "text": "public function touch($attribute)\n {\n $this->owner->updateAttributes(array_fill_keys((array) $attribute, $this->getValue(null)));\n }", "title": "" }, { "docid": "6fffb229ee1d498563be46cb6f843da9", "score": "0.61386526", "text": "public function setAttribute($key, $value)\n {\n $this->attributes[$key] = $value;\n }", "title": "" }, { "docid": "edaa2043999f70174666e869f0f41700", "score": "0.613142", "text": "function set($fieldName, $value)\n\t\t{\n\t\t\tif (array_key_exists($arguments[0], $this->ruleAttrs))\n\t\t\t\t$this->assignAttrs[$arguments[0]] = $arguments[1];\n\t\t\telse\n\t\t\t\tthrow new Exception($arguments[0] . ' is not defined attribute.', 1);\t\n\t\t}", "title": "" }, { "docid": "dc6a65e9e012ba9abb293c199b3f4fc3", "score": "0.61269736", "text": "public function __set($name, $value)\n\t{\n\t\tif (in_array($name, $this->attributeNames())) {\n\t\t\t$this->_attributes[$name] = $value;\n\t\t} else {\n\t\t\tparent::__set($name, $value);\n\t\t}\n\t}", "title": "" }, { "docid": "d99168a0860ba7d2b4665d47e9a450ae", "score": "0.6125347", "text": "public function setAttribute($attributeName, $value)\n {\n if (property_exists(get_class($this), $attributeName)) {\n $this->$attributeName = $value;\n }\n }", "title": "" }, { "docid": "17f229fc0d112432cf5afdedf57328d7", "score": "0.6108491", "text": "function setattribute($term,$data){\n\t\t\n\t\t$this->$term=$data;\n\t\t$this->savetodb();\n\t\t\n\t}", "title": "" }, { "docid": "a22c05a120a3b12a1393fa7f6cd985fa", "score": "0.60991746", "text": "public function setDocumentAttribute(string $key, $value);", "title": "" }, { "docid": "543cd8d1989a14cafcdd211152e1acc4", "score": "0.6098788", "text": "public function setAttribute($key, $value)\n {\n \t$this->_attributes[$key] = $value;\n \treturn $this;\n }", "title": "" }, { "docid": "dbb40cbf60aeb904a0d5f63d795e348a", "score": "0.6095546", "text": "public function __set($name, $value)\n\t{\n\t\t$this->attrs[$name] = $value;\n\t}", "title": "" }, { "docid": "31db671cfb9e07fc76f4ce4b0112c190", "score": "0.60853356", "text": "function setAttribute($xp, $attName, $attValue)\n{\n\tglobal $xpath, $errorEncountered, $DEBUG;\n\tif($DEBUG) echo '<br/><b>'.$attName.' = '.$attValue.'</b>';\n\t$nodeset = $xpath->query($xp);\n\tif($nodeset->length > 0)\n\t{\n\t\t$nodeset->item(0)->setAttribute($attName, $attValue);\n\t\tif($DEBUG) echo '<br/>set attribute: '.$xp.' @'.$attName.' = '.$attValue;\n\t}\n\telse\n\t{\n\t\tif($DEBUG) echo '<br/>Error: unable to set attribute';\n\t\t$errorEncountered = 'yes';\n\t}\n}", "title": "" }, { "docid": "f8ca31c9e45528c213c3bde9737a0c44", "score": "0.6085253", "text": "public function setAttribute(string $key, $value)\n {\n return $this->{'set' . Str::studly($key) . 'Attribute'}($value);\n }", "title": "" }, { "docid": "6bd52d19b7c005954a334c174d935ed5", "score": "0.6080628", "text": "public function __set($name, $value)\n\t{\n\t\tswitch($name) {\n\t\t\tcase 'ACCOUNTINGEXPENSES_BRANCH_ID':\n\t\t\t\t//if the id isn't null, you shouldn't update it!\n\t\t\t\tif( !is_null($this->ACCOUNTINGEXPENSES_BRANCH_ID) ) {\n\t\t\t\t\tthrow new Exception('Cannot update ACCOUNTINGEXPENSES_BRANCH_ID!');\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\t\t\n\t\t//set the attribute with the value\n\t\t$this->$name = $value;\n\t}", "title": "" }, { "docid": "e42ffd727fdde22bed2dd7d6876404b2", "score": "0.6074908", "text": "public function setDoctrineObjectAttribute($attributeName, $value);", "title": "" }, { "docid": "c9cd641253068c07a314d59ae08bf092", "score": "0.6072477", "text": "public function setAttribute ($attribute) {\n $this->setAttributes(array($attribute));\n return $this;\n }", "title": "" }, { "docid": "e11fee08e0648d322455c9d0b8f6db4e", "score": "0.6063082", "text": "public function __set( string $key, $value ) {\n\t\t$this->setAttribute( $key, $value );\n\t}", "title": "" }, { "docid": "5af26becfd11f770df1be0bba284f281", "score": "0.60444903", "text": "public function setAttribute($key, $value)\n {\n return parent::setAttribute(snake_case($key), $value);\n }", "title": "" }, { "docid": "5ea1d9467b05d454a0bed5f5222d2a57", "score": "0.60411125", "text": "public function setAttribute($key, $value)\n {\n parent::setAttribute($key, $value);\n\n $this->doEncryptAttribute($key);\n }", "title": "" }, { "docid": "6a393ac281561e22f72f68b7d1aeabd4", "score": "0.60316455", "text": "public function setUploadAttribute($attribute, $url) {\n\t\t$this->fill([$attribute => $url]);\n\t}", "title": "" }, { "docid": "476d4732e207a92de0e2d97d86dc1f3a", "score": "0.60307026", "text": "public function setResource($resource)\n {\n $this->resource = $resource;\n }", "title": "" }, { "docid": "7fa7323735ca22c15cfa4866e023dcb7", "score": "0.6026133", "text": "public function setResource($resource);", "title": "" }, { "docid": "35e5800cdc3ecee2884f2beb150b98e7", "score": "0.6022909", "text": "public function setAttribute($propertyName, $propertyValue);", "title": "" }, { "docid": "5b0b99e50ba4337a9a5e978eeed20196", "score": "0.60225475", "text": "public function setAttribute($name, $value)\n {\n $attributes = $this->getAttributeList();\n $attributes->set($name, $value);\n }", "title": "" }, { "docid": "cc5139c8174b8c1042fcc552cca377cb", "score": "0.60171306", "text": "public function attribute(string $attribute): self\n {\n $this->attribute = $attribute;\n\n return $this;\n }", "title": "" }, { "docid": "bd12805b8ab4239b576d4843ea8f4403", "score": "0.6015928", "text": "public function __set($name, $value)\n {\n $this->setAttribute($name, $value);\n }", "title": "" }, { "docid": "1091458c09455a1f01e62f987d3abdfb", "score": "0.6006527", "text": "public function __set($key, $value)\n {\n $this->attributes[$key] = $value;\n }", "title": "" }, { "docid": "1091458c09455a1f01e62f987d3abdfb", "score": "0.6006527", "text": "public function __set($key, $value)\n {\n $this->attributes[$key] = $value;\n }", "title": "" }, { "docid": "1091458c09455a1f01e62f987d3abdfb", "score": "0.6006527", "text": "public function __set($key, $value)\n {\n $this->attributes[$key] = $value;\n }", "title": "" } ]
a85e260dd2e6e462a217a94383d34f85
Register any application services.
[ { "docid": "b97bd1e64ec6742719120d297ae49421", "score": "0.0", "text": "public function register()\n {\n View::addNamespace('theme', [\n config('theme.path'),\n app_path().'/views'\n ]);\n \n }", "title": "" } ]
[ { "docid": "d70c37ddb88a852efcfd8b23f16a6080", "score": "0.78882134", "text": "public function register()\n {\n // Register any bindings or services here\n }", "title": "" }, { "docid": "bf07a6ccbc1940e2be8abff91e94a2f6", "score": "0.7879658", "text": "public function register()\n {\n $this->registerServices();\n }", "title": "" }, { "docid": "bf07a6ccbc1940e2be8abff91e94a2f6", "score": "0.7879658", "text": "public function register()\n {\n $this->registerServices();\n }", "title": "" }, { "docid": "f70d8ed816e1156cec094ddb6d5d1e6f", "score": "0.7652205", "text": "public function register()\n\t{\n\t\t$this->registerServices();\n\t}", "title": "" }, { "docid": "c768ccc5d210c060f9397c11f3e08a43", "score": "0.7504075", "text": "public function register()\n { \t\n \t$this->registerArretService();\t\n \t$this->registerAnalyseService();\t\n \t$this->registerSeminaireService();\t\n \t$this->registerSubjectService();\t\n \t$this->registerAuteurService();\t\n \t$this->registerCategorieService();\n \t$this->registerBSCategorieService();\t \t\t\t\n }", "title": "" }, { "docid": "a1b47fbaafde6c789337321ea0ed35da", "score": "0.74701923", "text": "public function register()\n {\n $this->defineServices();\n }", "title": "" }, { "docid": "9ecb8f965303ffa0f4c237d34c3bcbb1", "score": "0.7450847", "text": "public function register()\n {\n $this->registerService();\n }", "title": "" }, { "docid": "9ecb8f965303ffa0f4c237d34c3bcbb1", "score": "0.7450847", "text": "public function register()\n {\n $this->registerService();\n }", "title": "" }, { "docid": "9ecb8f965303ffa0f4c237d34c3bcbb1", "score": "0.7450847", "text": "public function register()\n {\n $this->registerService();\n }", "title": "" }, { "docid": "ff2e87df5f8fe1995a7f566a66029a9a", "score": "0.7373759", "text": "public function register()\n {\n $this->registerConfig();\n $this->registerService();\n }", "title": "" }, { "docid": "fbf745c5826f86c4c823fe56841976ec", "score": "0.73706204", "text": "public function register()\n {\n $this->registerSeoMetaService();\n $this->registerSeoOpenGraphService();\n $this->registerSeoTwitterService();\n }", "title": "" }, { "docid": "b5585067d9f260015063e06f97fd199e", "score": "0.7294904", "text": "public function register()\n {\n $this->registerTailwindService();\n\n if ($this->app->runningInConsole()) {\n $this->registerResources();\n }\n }", "title": "" }, { "docid": "e10ce6dcc700e5192b2732ba48acbc04", "score": "0.727807", "text": "public function register()\n {\n $this->registerPasswordBroker();\n\n $this->registerTokenRepository();\n }", "title": "" }, { "docid": "f5f3f84b78f65540e54e1171a6d19495", "score": "0.72768116", "text": "public function register()\n {\n $this->app->make('Exdeliver\\Marketplace\\Controllers\\MarketplaceController');\n\n $this->app->bind('marketplaceservice', 'Exdeliver\\Marketplace\\Services\\MarketplaceService'); // bind service\n\n $this->loadViewsFrom(__DIR__.'/Views', 'marketplace');\n $this->loadMigrationsFrom(__DIR__.'/Migrations');\n\n }", "title": "" }, { "docid": "4eda3e1dba7047d11a9185d19899a33c", "score": "0.7270899", "text": "public function register()\n {\n if ($this->app->environment() !== 'production') {\n $this->app->register(IdeHelperServiceProvider::class);\n }\n\n // $this->app->bind(BaseService::class, UserService::class);\n // $this->app->bind(BaseService::class, CompanyService::class);\n }", "title": "" }, { "docid": "c9bc6cfd69a60feee0745325044d378e", "score": "0.7268026", "text": "public function register()\n {\n $this->registerRepositories();\n }", "title": "" }, { "docid": "294b64101d8d64a5ad7b8810628ae2de", "score": "0.724781", "text": "public function register()\n {\n // Account\n\n $this->app->bind(\n 'Mobilozophy\\MZCAPILaravel\\Services\\Api\\MZCAPI\\MessageCenter\\DeviceAPIService',\n function () {\n return new DeviceAPIService($this->app['GuzzleHttp\\Client']);\n }\n );\n\n $this->app->bind(\n 'Mobilozophy\\MZCAPILaravel\\Services\\Api\\MZCAPI\\MessageCenter\\SubscriptionAPIService',\n function () {\n return new SubscriptionAPIService(\n $this->app['GuzzleHttp\\Client']\n );\n }\n );\n\n $this->app->bind(\n 'Mobilozophy\\MZCAPILaravel\\Services\\Api\\MZCAPI\\MessageCenter\\TriggeredSendAPIService',\n function () {\n return new TriggeredSendAPIService(\n $this->app['GuzzleHttp\\Client']\n );\n }\n );\n\n $this->app->bind(\n 'Mobilozophy\\MZCAPILaravel\\Services\\Api\\MZCAPI\\MessageCenter\\TriggeredSendProfileAPIService',\n function () {\n return new TriggeredSendProfileAPIService(\n $this->app['GuzzleHttp\\Client']\n );\n }\n );\n }", "title": "" }, { "docid": "00f133a1ea16305d53d0bc40d354894e", "score": "0.7237675", "text": "public function register()\n {\n $this->app->register(ConsoleServiceProvider::class);\n $this->app->register(WebSocketServiceProvider::class);\n }", "title": "" }, { "docid": "498b52609b28a7945490ca3e8d705db5", "score": "0.7218538", "text": "public function register()\n {\n $this->mergeConfigFrom(__DIR__.'/../config/laralastica.php', 'laralastica');\n\n $this->registerClient();\n $this->registerCommands();\n }", "title": "" }, { "docid": "3b29493e307a4cb1b6e6a510302c2946", "score": "0.7206262", "text": "public function register()\n {\n $this->mergeConfigFrom(__DIR__.'/../config/filesystems.php', 'disks');\n $this->mergeConfigFrom(__DIR__.'/../config/volcator.php', 'volcator');\n $this->mergeConfigFrom(__DIR__.'/../config/prefix.php', 'prefix');\n $this->mergeConfigFrom(__DIR__.'/../config/languages.php', 'languages');\n $this->app->register(VolcatorRouteServiceProvider::class);\n $this->app->register(VolcatorMailServiceProvider::class);\n $this->app->register(VolcatorEventServiceProvider::class);\n $this->app->register(VolcatorTranslationServiceProvider::class);\n $this->app->register(VolcatorGuardServiceProvider::class);\n $this->app->register(VolcatorEventServiceProvider::class);\n $this->registerVolcator();\n $this->registerCommands();\n }", "title": "" }, { "docid": "9be2e59030125ec07ee7c56c1627e733", "score": "0.72031647", "text": "public function register() {\n\n $this->registerFaceBook();\n $this->registerGoogleClient();\n $this->registerGithubClient();\n }", "title": "" }, { "docid": "4e47ba6bee848a4d803b1825e06da0dc", "score": "0.7195809", "text": "public function register()\n {\n // ユーザー登録サービス\n $this->app->bind(\n \\App\\Services\\Api\\Interfaces\\UserRegisterServiceInterface::class,\n \\App\\Services\\Api\\UserRegisterService::class\n );\n // ユーザーログインサービス\n $this->app->bind(\n \\App\\Services\\Api\\Interfaces\\UserLoginServiceInterface::class,\n \\App\\Services\\Api\\UserLoginService::class\n );\n // ユーザーログアウトサービス\n $this->app->bind(\n \\App\\Services\\Api\\Interfaces\\UserLogoutServiceInterface::class,\n \\App\\Services\\Api\\UserLogoutService::class\n );\n // バインダー一覧情報取得サービス\n $this->app->bind(\n \\App\\Services\\Api\\Interfaces\\BinderListSelectServiceInterface::class,\n \\App\\Services\\Api\\BinderListSelectService::class\n );\n // バインダー検索サービス\n $this->app->bind(\n \\App\\Services\\Api\\Interfaces\\BinderSearchServiceInterface::class,\n \\App\\Services\\Api\\BinderSearchService::class\n );\n // バインダー作成サービス\n $this->app->bind(\n \\App\\Services\\Api\\Interfaces\\BinderSaveServiceInterface::class,\n \\App\\Services\\Api\\BinderSaveService::class\n );\n // バインダー削除サービス\n $this->app->bind(\n \\App\\Services\\Api\\Interfaces\\BinderDeleteServiceInterface::class,\n \\App\\Services\\Api\\BinderDeleteService::class\n );\n // バインダー情報取得サービス\n $this->app->bind(\n \\App\\Services\\Api\\Interfaces\\BinderDetailSelectServiceInterface::class,\n \\App\\Services\\Api\\BinderDetailSelectService::class\n );\n // バインダーお気に入りサービス\n $this->app->bind(\n \\App\\Services\\Api\\Interfaces\\BinderFavoriteServiceInterface::class,\n \\App\\Services\\Api\\BinderFavoriteService::class\n );\n // 画像追加サービス\n $this->app->bind(\n \\App\\Services\\Api\\Interfaces\\ImageAddServiceInterface::class,\n \\App\\Services\\Api\\ImageAddService::class\n );\n // 画像削除サービス\n $this->app->bind(\n \\App\\Services\\Api\\Interfaces\\ImageDeleteServiceInterface::class,\n \\App\\Services\\Api\\ImageDeleteService::class\n );\n // 画像リネームサービス\n $this->app->bind(\n \\App\\Services\\Api\\Interfaces\\ImageRenameServiceInterface::class,\n \\App\\Services\\Api\\ImageRenameService::class\n );\n // 画像並び順更新サービス\n $this->app->bind(\n \\App\\Services\\Api\\Interfaces\\ImageSortServiceInterface::class,\n \\App\\Services\\Api\\ImageSortService::class\n );\n // 画像検索サービス\n $this->app->bind(\n \\App\\Services\\Api\\Interfaces\\ImageSearchServiceInterface::class,\n \\App\\Services\\Api\\ImageSearchService::class\n );\n // 画像ダウンロードサービス\n $this->app->bind(\n \\App\\Services\\Api\\Interfaces\\ImageDownloadServiceInterface::class,\n \\App\\Services\\Api\\ImageDownloadService::class\n );\n // ラベル保存サービス\n $this->app->bind(\n \\App\\Services\\Api\\Interfaces\\LabelSaveServiceInterface::class,\n \\App\\Services\\Api\\LabelSaveService::class\n );\n // ラベル削除サービス\n $this->app->bind(\n \\App\\Services\\Api\\Interfaces\\LabelDeleteServiceInterface::class,\n \\App\\Services\\Api\\LabelDeleteService::class\n );\n // ラベル並び順更新サービス\n $this->app->bind(\n \\App\\Services\\Api\\Interfaces\\LabelSortServiceInterface::class,\n \\App\\Services\\Api\\LabelSortService::class\n );\n // ラベリングサービス\n $this->app->bind(\n \\App\\Services\\Api\\Interfaces\\LabelingServiceInterface::class,\n \\App\\Services\\Api\\LabelingService::class\n );\n // 一括ラベリングサービス\n $this->app->bind(\n \\App\\Services\\Api\\Interfaces\\MultipleLabelingServiceInterface::class,\n \\App\\Services\\Api\\MultipleLabelingService::class\n );\n // パスワードリセットサービス\n $this->app->bind(\n \\App\\Services\\Api\\Interfaces\\PasswordResetServiceInterface::class,\n \\App\\Services\\Api\\PasswordResetService::class\n );\n }", "title": "" }, { "docid": "f7078315af9b48af27dc0081f0bb2d25", "score": "0.7195688", "text": "public function register()\n {\n $this->registerRepository();\n\n $this->registerPasswordService();\n\n $this->registerLoginThrottleService();\n\n $this->registerUserValidator();\n\n $this->registerConfide();\n\n $this->registerCommands();\n }", "title": "" }, { "docid": "7e3cb6415935ad012bc096695895311a", "score": "0.7191818", "text": "public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n\n $this->registerCommands();\n $this->registerMiddleware();\n $this->registerSms();\n $this->registerOss();\n }", "title": "" }, { "docid": "8711c1e1f3b85bbfc5cb6694b3936e8c", "score": "0.71872747", "text": "public function register()\r\n {\r\n $this->app->booting(function()\r\n {\r\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\r\n $loader->alias('EggLog', 'EggDigital\\Service\\Facades\\EggLog');\r\n $loader->alias('PcsClient', 'EggDigital\\Service\\Facades\\PcsClient');\r\n });\r\n\r\n $this->app['service\\egglog'] = $this->app->share(function($app)\r\n {\r\n return new Provider\\EggLogProvider;\r\n });\r\n\r\n $this->app['service\\pcsclient'] = $this->app->share(function($app)\r\n {\r\n return new Provider\\PcsClientProvider;\r\n });\r\n }", "title": "" }, { "docid": "a1acff972959d28d63b989930ef331bc", "score": "0.7183288", "text": "public function register()\n {\n $this->registerCommands();\n $this->registerMiddleware();\n }", "title": "" }, { "docid": "61e65ee702f02ee14fd20b90c63007b9", "score": "0.7173724", "text": "public function register(): void\n {\n $this->app->register(AdmEventServiceProvider::class);\n// $this->app->register(AuthServiceProvider::class);\n }", "title": "" }, { "docid": "ba2c799823b7021e7135323e94af6eb2", "score": "0.716557", "text": "public function register()\n {\n $this->app->register(L5SwaggerServiceProvider::class);\n $this->app->register(ValidatorProvider::class);\n }", "title": "" }, { "docid": "cd21a20fc32e98ad0e6e47d9739c78df", "score": "0.7158182", "text": "public function register()\n {\n $this->mergeConfig();\n $this->registerService();\n }", "title": "" }, { "docid": "e9ad4fee4cd41d753962dcadf9300989", "score": "0.7156002", "text": "public function register()\n {\n // Bind any implementations.\n $this->app->register('Yajra\\Datatables\\DatatablesServiceProvider');\n }", "title": "" }, { "docid": "dbd3a1daf5f3f41e27551967413c7351", "score": "0.71554124", "text": "public function register()\n {\n //Blog\n $this->app->bind(\n 'BlogService', BlogService::class\n );\n\n //Match\n $this->app->bind(\n \\App\\Repositories\\Match\\MatchRepositoryInterface::class,\n \\App\\Repositories\\Match\\MatchRepository::class\n );\n }", "title": "" }, { "docid": "720e69666e277d737e44f1a2387f7361", "score": "0.71511674", "text": "public function register()\n {\n $this->registerVaahIndexer();\n\n $this->app->alias('indexer', \\WebReinvent\\VaahIndexer\\Indexer::class);\n\n $this->mergeConfigFrom(\n __DIR__.'/config/config.php', 'indexer'\n );\n }", "title": "" }, { "docid": "0fdc41058c3a9ff8e3d89d7b1b27c0c9", "score": "0.7149695", "text": "public function register()\r\n {\r\n $this->registerRateLimiting();\r\n\r\n $this->registerHttpValidation();\r\n\r\n $this->registerHttpParsers();\r\n\r\n $this->registerResponseFactory();\r\n\r\n $this->registerMiddleware();\r\n }", "title": "" }, { "docid": "57c3d51e68337e7c5d69e676ec4f0593", "score": "0.7147116", "text": "public function register()\n {\n $this->mergeConfigFrom(__DIR__.'/../config/laravel-vidible.php', 'laravel-vidible');\n\n $this->mergeConfig();\n\n $this->registerRepository();\n\n $this->registerService();\n }", "title": "" }, { "docid": "898c9b38b71877bcd735fb7cf13ef57d", "score": "0.71459216", "text": "public function register()\n {\n $this->app->bind(CoinbaseService::class, function ($app) {\n return new CoinbaseService();\n });\n $this->app->bind(UserPaymentService::class, function ($app) {\n return new UserPaymentService();\n });\n }", "title": "" }, { "docid": "d27f1acbc477e8459b0072c1207d9499", "score": "0.714219", "text": "public function register()\n {\n $this->app->register(CoreServiceProvider::class);\n $this->app->register(FleetOpsServiceProvider::class);\n }", "title": "" }, { "docid": "8eca91e8dab25620f4164dd34b17d380", "score": "0.7138682", "text": "public function register()\n {\n $this->mergeConfigFrom(__DIR__.'/../config/laravel-velo-api.php', 'laravel-velo-api');\n\n $this->app->bind(VeloStations::class);\n\n if (app()->environment('testing')) {\n $this->app->bind('velo-stations', function () {\n return new VeloStations(new VeloClientMock());\n });\n } else {\n $this->app->bind('velo-stations', function () {\n return new VeloStations(new VeloClient());\n });\n }\n }", "title": "" }, { "docid": "5c919a614732afcf707ebae5e2a47393", "score": "0.71363944", "text": "public function register()\n {\n $this->registerConfig();\n $this->registerPreConfiguredApiClients();\n }", "title": "" }, { "docid": "eb2f4a3a7acbeb81156db5c950b1a6bd", "score": "0.71333814", "text": "public function register()\n {\n $this->registerProviders();\n\n $this->registerFacades();\n\n $this->registerRoutes();\n }", "title": "" }, { "docid": "6afc53633335550e9e9b6020b782d721", "score": "0.7133341", "text": "public function register()\n\t{\n $this->registerCommandTranslator();\n $this->registerCommandBus();\n }", "title": "" }, { "docid": "1aabfb48903552bd6b83772b797fa2fd", "score": "0.71279067", "text": "public function register()\n {\n // Khai báo cái repository ở đây\n //$this->app->singleton(ServiceGroupRepositoryInterface::class, ServiceGroupRepository::class);\n }", "title": "" }, { "docid": "24faaaea05c7ee4728ce4afbbd5e6409", "score": "0.7124383", "text": "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__.'/config/services.php', 'services'\n );\n }", "title": "" }, { "docid": "6e011b8ee340f504fa73f8b092762bd5", "score": "0.7122692", "text": "public function register()\n\t{\n\n\t\t$this->registerRoleService();\n\t\t$this->registerResourceActionDataProvider();\n\t\t$this->registerPermService();\n\t\t$this->registerPermitService();\n\t}", "title": "" }, { "docid": "864a9f90fa2a4425128a9b6de2199edb", "score": "0.7122022", "text": "public function register()\n {\n $this->app->bind('App\\Services\\PessoaService', function ($app){\n return new PessoaService();\n });\n }", "title": "" }, { "docid": "7c2d0c8e8752a24a1af90580fc063bfb", "score": "0.7118542", "text": "public function register()\n {\n $this->registerService();\n\n $this->app->bind('Modules\\Search\\SearchServiceInterface', 'Modules\\Search\\SearchService');\n\n $this->registerCommands();\n }", "title": "" }, { "docid": "54c888e03d980f34a1cad6546d509652", "score": "0.71171767", "text": "public function register()\n {\n $this->app->bind('Matthewbdaly\\LaravelCart\\Contracts\\Services\\Cart', 'Matthewbdaly\\LaravelCart\\Services\\Cart');\n $this->app->bind('Matthewbdaly\\LaravelCart\\Contracts\\Services\\UniqueId', 'Matthewbdaly\\LaravelCart\\Services\\UniqueId');\n }", "title": "" }, { "docid": "98fe8affc950dc5b156e569d09e04ee4", "score": "0.7117026", "text": "public function register()\n\t{\n\t\t$this->registerAppBindings();\n\t}", "title": "" }, { "docid": "7350737a0324d9bcc0b8c54e50d9a0c0", "score": "0.7114688", "text": "public function register()\n {\n $this->app->register(BaumServiceProvider::class);\n }", "title": "" }, { "docid": "09d85a9bfadd8ea99fdc1ba74e4601d5", "score": "0.7112727", "text": "public function register()\n {\n $this->registerAppBindings();\n }", "title": "" }, { "docid": "3b2ac8229eff3e59213768b7ccadf9b6", "score": "0.7110834", "text": "public function register()\n {\n $this->app['laravel-dreamfactory'] = $this->app->share(function($app)\n {\n return new LaravelDreamfactory($app['router']);\n });\n\n $this->app['gdce'] = $this->app->share(function($app)\n {\n return new GDCE();\n });\n }", "title": "" }, { "docid": "dcfc45a0a5f45a230baa8492d6e15d8e", "score": "0.7109655", "text": "public function register()\n {\n //\n\n $this->app->bind(IUserService::class, UserService::class);\n $this->app->bind(IUserRepository::class, UserRepository::class);\n $this->app->bind(IPizzaService::class, PizzaService::class);\n $this->app->bind(IPizzaRepository::class, PizzaRepository::class);\n $this->app->bind(IOrderService::class, OrderService::class);\n $this->app->bind(IOrderRepository::class, OrderRepository::class);\n }", "title": "" }, { "docid": "87645e0fa0a7dccf36744ff035691afe", "score": "0.71094", "text": "public function register()\n {\n // Automatically apply the package configuration\n $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'laravel-notion-api');\n\n $this->app->singleton(Notion::class, function () {\n return new Notion(config('laravel-notion-api.notion-api-token'), config('laravel-notion-api.version'));\n });\n\n if ($this->app->runningInConsole()) {\n PestHttpRecorder::register();\n }\n }", "title": "" }, { "docid": "a2938fa22f84e99e0a456a083e6a32b2", "score": "0.71043277", "text": "public function register()\n {\n // $this->register(BaseAuthServiceProvider::class);\n }", "title": "" }, { "docid": "e97451de10235d467ba77c4a27cf6f32", "score": "0.70957905", "text": "public function register()\n {\n $this->registerProductRepository($this->app);\n $this->registerCategoryRepository($this->app);\n }", "title": "" }, { "docid": "79490f1d0dadc7c1a053fa47b0bc4cc7", "score": "0.70946366", "text": "public function register()\n {\n $this->app->register('ProAI\\Datamapper\\Providers\\MetadataServiceProvider');\n\n $this->registerEntityScanner();\n\n $this->registerSchemaBuilder();\n\n $this->registerModelGenerator();\n\n $this->registerCommands();\n }", "title": "" }, { "docid": "6c4803387dfe758755a4896ad1079f7a", "score": "0.7094242", "text": "public function register()\n {\n /*REGISTER SWAGGER INTEGRATION*/\n $this->app->register(\\L5Swagger\\L5SwaggerServiceProvider::class);\n }", "title": "" }, { "docid": "a847a96b05a26b9e302c2a2e9d5dc89c", "score": "0.7092194", "text": "public function register()\n {\n $this->registerPublishables();\n $this->registerCommands();\n }", "title": "" }, { "docid": "da1bc636f5076a61e905c37509fbd72f", "score": "0.70815176", "text": "public function register()\n {\n $this->app->register(RepositoryServiceProvider::class);\n }", "title": "" }, { "docid": "da1bc636f5076a61e905c37509fbd72f", "score": "0.70815176", "text": "public function register()\n {\n $this->app->register(RepositoryServiceProvider::class);\n }", "title": "" }, { "docid": "da1bc636f5076a61e905c37509fbd72f", "score": "0.70815176", "text": "public function register()\n {\n $this->app->register(RepositoryServiceProvider::class);\n }", "title": "" }, { "docid": "7f8694f681d935116737924b47467e75", "score": "0.70803225", "text": "public function register()\n {\n //$this->app->make('tchoblond59\\ssrollershutter');\n }", "title": "" }, { "docid": "08553f585017a086b923667963887805", "score": "0.70789444", "text": "public function register()\n {\n $this->registerCommands();\n $this->registerAlias();\n $this->registerMiddleware();\n }", "title": "" }, { "docid": "8c59617e567cf26d8701d09d0014e2ea", "score": "0.70764685", "text": "public function register()\n {\n $guzzleClient = new Client(['timeout' => 1200, 'read_timeout' => 1200]);\n\n $this->app->bind(ConsultaEmpresaService::class, function ($app) use ($guzzleClient) {\n return new ConsultaEmpresaService($guzzleClient);\n });\n\n $this->app->bind(ConsultaSociosService::class, function ($app) use ($guzzleClient) {\n return new ConsultaSociosService($guzzleClient);\n });\n\n\n }", "title": "" }, { "docid": "f1daec42e01ba370c87c45d8575346fd", "score": "0.7074053", "text": "public function register()\n {\n // REPOSITORIES\n $this->app->bind(\"App\\Http\\Repositories\\Interfaces\\UserRepositoryInterface\", \"App\\Http\\Repositories\\UserRepository\");\n $this->app->bind(\"App\\Http\\Repositories\\Interfaces\\RoleRepositoryInterface\", \"App\\Http\\Repositories\\RoleRepository\");\n $this->app->bind(\"App\\Http\\Repositories\\Interfaces\\ExpenseRepositoryInterface\", \"App\\Http\\Repositories\\ExpenseRepository\"); \n $this->app->bind(\"App\\Http\\Repositories\\Interfaces\\ExpenseCategoryRepositoryInterface\", \"App\\Http\\Repositories\\ExpenseCategoryRepository\"); \n \n }", "title": "" }, { "docid": "e858d7be63a3ba1b754acdd9771da5f6", "score": "0.7073267", "text": "public function register()\n {\n\t if ($this->app->environment() !== 'production') {\n\t\t $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n\t }\n\t\t$this->app->register('Collective\\Html\\HtmlServiceProvider');\n\t\t$this->app->register('Joselfonseca\\ImageManager\\ImageManagerServiceProvider');\n }", "title": "" }, { "docid": "17060aab9a1367de6767bfa7f37e3941", "score": "0.7071299", "text": "public function register()\n {\n $this->registerRepositoryInterface();\n $this->registerServiceInterface();\n //\n }", "title": "" }, { "docid": "806f458840a1879493d8d3ef24f42bd6", "score": "0.70694697", "text": "public function register()\n {\n $this->app->bind(\n 'DOLucasDelivery\\Repositories\\CategoryRepository',\n 'DOLucasDelivery\\Repositories\\CategoryRepositoryEloquent'\n );\n $this->app->bind(\n 'DOLucasDelivery\\Repositories\\ClientRepository',\n 'DOLucasDelivery\\Repositories\\ClientRepositoryEloquent'\n );\n $this->app->bind(\n 'DOLucasDelivery\\Repositories\\OrderItemRepository',\n 'DOLucasDelivery\\Repositories\\OrderItemRepositoryEloquent'\n );\n $this->app->bind(\n 'DOLucasDelivery\\Repositories\\OrderRepository',\n 'DOLucasDelivery\\Repositories\\OrderRepositoryEloquent'\n );\n $this->app->bind(\n 'DOLucasDelivery\\Repositories\\ProductRepository',\n 'DOLucasDelivery\\Repositories\\ProductRepositoryEloquent'\n );\n $this->app->bind(\n 'DOLucasDelivery\\Repositories\\UserRepository',\n 'DOLucasDelivery\\Repositories\\UserRepositoryEloquent'\n );\n $this->app->bind(\n 'DOLucasDelivery\\Repositories\\CouponRepository',\n 'DOLucasDelivery\\Repositories\\CouponRepositoryEloquent'\n );\n }", "title": "" }, { "docid": "b4586e87990525c38da1f23e5ac1d94a", "score": "0.7065518", "text": "public function register()\n {\n $this->registerUploadService();\n }", "title": "" }, { "docid": "c377bf3dad455df93faf8d9e6e872efc", "score": "0.70642203", "text": "public function register()\n {\n\n $this->app->singleton(ExceptionHandler::class, Handler::class);\n $this->app->singleton(KernelContract::class, Kernel::class);\n\n $this->app->middleware([HandleCors::class]);\n\n // Mathrix Lumen Zero Providers\n $this->app->register(ObserverServiceProvider::class);\n $this->app->register(PolicyServiceProvider::class);\n $this->app->register(RegistrarServiceProvider::class);\n\n $this->app->register(CorsServiceProvider::class);\n }", "title": "" }, { "docid": "f59c0e77a226acc33c5285d84a049f48", "score": "0.706125", "text": "public function register()\n {\n $this->app->bind(LeagueService::class, function () {\n return new LeagueService(\n new LeagueRepository(new League()),\n new LeaguePlayerRepository(new LeaguePlayer())\n );\n });\n }", "title": "" }, { "docid": "149a1f09d9db3d673d7f9e37da83a09f", "score": "0.7059463", "text": "public function register()\n {\n $this->registerAliases();\n\n $this->registerGuzzle();\n\n $this->registerApi();\n\n $this->registerAuth();\n\n $this->registerUserProvider();\n\n $this->registerGuard();\n\n $this->registerEncrypter();\n\n $this->registerCaptcha();\n\n $this->aliasMiddleware('scope', \\App\\Support\\Middleware\\Scope::class);\n $this->aliasMiddleware('group', \\App\\Support\\Middleware\\Group::class);\n $this->aliasMiddleware('api.debugbar', \\App\\Support\\Middleware\\ApiDebugbar::class);\n }", "title": "" }, { "docid": "ea35651997bcc337bc7c577f67c913cd", "score": "0.7057708", "text": "public function register()\n {\n\n /** Register Services */\n collect($this->getServices())->each(function($service){\n $this->app->singleton(class_basename($service), function($app) use ($service){\n return new $service();\n });\n });\n }", "title": "" }, { "docid": "655015c995aaeb1e2b4e8606872e2482", "score": "0.70575196", "text": "public function register()\n {\n $this->app->bind(VisitorServiceContract::class, VisitorService::class);\n $this->app->bind(SiteLinkServiceContract::class, SiteLinkService::class);\n $this->app->bind(SiteServiceContract::class, SiteService::class);\n\n }", "title": "" }, { "docid": "52b751787621d7cff3213984084eb435", "score": "0.70562744", "text": "public function register()\n {\n $this->registerEvents();\n $this->registerAuthMiddleware();\n }", "title": "" }, { "docid": "aaad779ab117f4ceb6bce4391d5bf03b", "score": "0.70553434", "text": "public function register()\r\n\t{\r\n\t\t$this->app->register(OdemeSistemiEventServiceProvider::class);\r\n\t}", "title": "" }, { "docid": "5f4e6333fab0d02385b022aa04d4d66a", "score": "0.70547795", "text": "public function register()\n {\n $this->registerMiddlewares();\n\n //\n }", "title": "" }, { "docid": "59b834fd2a18cfa624585553a983c343", "score": "0.7051233", "text": "public function register()\n {\n // Register the app\n $this->registerLarablog();\n\n // Register Commands\n $this->registerCommands();\n }", "title": "" }, { "docid": "8d67e2dfac65e450c1e707031a081914", "score": "0.7045259", "text": "public function register()\n {\n $this->registerConfigurationFiles();\n\n $this->registerMediaboxSingleton();\n\n $this->registerRoutes();\n }", "title": "" }, { "docid": "514ce1a5f5103bddaa5eae945984092c", "score": "0.70448357", "text": "public function register()\n {\n App::singleton('models\\\\oauth2\\\\IResourceServerContext', 'models\\\\oauth2\\\\ResourceServerContext');\n App::singleton('App\\Models\\ResourceServer\\IAccessTokenService', 'App\\Models\\ResourceServer\\AccessTokenService');\n App::singleton('App\\Models\\ResourceServer\\IApi', 'models\\\\resource_server\\\\Api');\n App::singleton('App\\Models\\ResourceServer\\IApiEndpoint', 'models\\\\resource_server\\\\ApiEndpoint');\n App::singleton('App\\Models\\ResourceServer\\IApiScope', 'models\\\\resource_server\\\\ApiScope');\n }", "title": "" }, { "docid": "565959d5b1ff161cf2a2c5c888740e21", "score": "0.70444924", "text": "public function register()\n {\n // Register main classes\n $this->app->make('CoreSolutions\\CoreAdmin\\Controllers\\CoreAdminController');\n $this->app->make('CoreSolutions\\CoreAdmin\\Controllers\\UserActionsController');\n $this->app->make('CoreSolutions\\CoreAdmin\\Controllers\\CoreAdminMenuController');\n $this->app->make('CoreSolutions\\CoreAdmin\\Cache\\QuickCache');\n $this->app->make('CoreSolutions\\CoreAdmin\\Builders\\MigrationBuilder');\n $this->app->make('CoreSolutions\\CoreAdmin\\Builders\\ModelBuilder');\n $this->app->make('CoreSolutions\\CoreAdmin\\Builders\\RequestBuilder');\n $this->app->make('CoreSolutions\\CoreAdmin\\Builders\\ControllerBuilder');\n $this->app->make('CoreSolutions\\CoreAdmin\\Builders\\ViewsBuilder');\n $this->app->make('CoreSolutions\\CoreAdmin\\Events\\UserLoginEvents');\n // Register dependency packages\n $this->app->register('Collective\\Html\\HtmlServiceProvider');\n $this->app->register('Intervention\\Image\\ImageServiceProvider');\n $this->app->register('Yajra\\Datatables\\DatatablesServiceProvider');\n // Register dependancy aliases\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n $loader->alias('HTML', 'Collective\\Html\\HtmlFacade');\n $loader->alias('Form', 'Collective\\Html\\FormFacade');\n $loader->alias('Image', 'Intervention\\Image\\Facades\\Image');\n $loader->alias('Datatables', 'Yajra\\Datatables\\Datatables');\n }", "title": "" }, { "docid": "0400d0b841121aeb0463542307b86b6e", "score": "0.70440096", "text": "public function register()\n {\n $this->app->bind(RandomGenerator::class, RandomGeneratorService::class);\n $this->app->bind(CarSharing::class, CarSharingService::class);\n $this->app->bind(Repository::class, CarRepository::class);\n }", "title": "" }, { "docid": "b310e936a32a1a8aab0472d76357cfdd", "score": "0.70401716", "text": "public function register()\n {\n $this->app->bind(IProjectService::class, ProjectService::class);\n $this->app->bind(ITodoService::class, TodoService::class);\n }", "title": "" }, { "docid": "16deb41babe80835a0b94e6dc5da3573", "score": "0.7039949", "text": "public function register()\n {\n\n $this->app->bind(\n ILogger::class,\n Logger::class\n );\n\n $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'uniexlogger');\n\n }", "title": "" }, { "docid": "81674a6a1bb9eb9a1acc14023042517b", "score": "0.7038738", "text": "public function register()\n {\n $this->app->bind(\\App\\Services\\EventReport\\IEventReportService::class, \\App\\Services\\EventReport\\EventReportService::class);\n }", "title": "" }, { "docid": "3b1f3492480c36b8e987334dc72d9c6e", "score": "0.7036467", "text": "public function register()\n {\n //check that app is local\n if ($this->app->isLocal()) {\n //if local register your services you require for development\n $this->app->register('Barryvdh\\Debugbar\\ServiceProvider');\n } else {\n //else register your services you require for production\n $this->app['request']->server->set('HTTPS', true);\n }\n }", "title": "" }, { "docid": "ff0d5543fe533fb95142672e97ebe7d2", "score": "0.7034839", "text": "public function register(): void\n {\n $this->mergeConfigFrom(__DIR__ . '/../config/larapress.php', 'larapress');\n $this->mergeConfigFrom(__DIR__ . '/../config/model-status.php', 'model-status');\n $this->mergeConfigFrom(__DIR__ . '/../config/medialibrary.php', 'medialibrary');\n\n $this->app->register(ModelStatusServiceProvider::class);\n $this->app->register(MediaLibraryServiceProvider::class);\n $this->app->register(QueryBuilderServiceProvider::class);\n }", "title": "" }, { "docid": "dfd54e63f903ce7617b114a3ac08f690", "score": "0.7033221", "text": "public function register()\n {\n //\n $this->app->bind(\n MoneyInterface::class,\n MoneyService::class\n );\n $this->app->bind(\n SnackInterface::class,\n SnackService::class\n );\n $this->app->bind(\n VendingMachineInterface::class,\n VendingMachineService::class\n );\n $this->app->bind(\n CurrencyInterface::class,\n CurrencyService::class\n );\n }", "title": "" }, { "docid": "9f19a061c256794c8ce45fded4532661", "score": "0.7029003", "text": "public function register()\n {\n $this->app->singleton(\\Laragrad\\Largent\\Services\\OperationService::class, function ($app) {\n return new \\Laragrad\\Largent\\Services\\OperationService();\n });\n\n $this->app->singleton(\\Laragrad\\Largent\\Services\\EntryService::class, function ($app) {\n return new \\Laragrad\\Largent\\Services\\EntryService();\n });\n }", "title": "" }, { "docid": "c404b06688de10839da765628fc19e7b", "score": "0.70282733", "text": "public function register()\n {\n // Register the app\n $this->registerApp();\n\n // Register Commands\n $this->registerCommands();\n }", "title": "" }, { "docid": "131cc17d3d1eb96b8fe13880be03bd79", "score": "0.7028227", "text": "public function register()\n {\n $this->mergeConfigFrom(__DIR__ . '/config/http_logger.php', 'http_logger');\n\n if (config('http_logger.is_enabled')) {\n $this->app['router']->pushMiddlewareToGroup('web', HttpLogger::class);\n $this->app['router']->pushMiddlewareToGroup('api', HttpLogger::class);\n }\n\n $this->app->register(HttpLoggerRouteServiceProvider::class);\n\n $this->app->register(HttpLoggerAuthServiceProvider::class);\n }", "title": "" }, { "docid": "80823d6ca7c9581e725444f7ed45076d", "score": "0.70265925", "text": "public function register()\n {\n\n if (config('app.env')=='local' && class_exists(\\Barryvdh\\Debugbar\\ServiceProvider::class))\n $this->app->register(\\Barryvdh\\Debugbar\\ServiceProvider::class);\n\n if (class_exists(\\Laravel\\Cashier\\CashierServiceProvider::class))\n $this->app->register(\\Laravel\\Cashier\\CashierServiceProvider::class);\n\n if (class_exists(\\ErpNET\\Bot\\Providers\\ErpnetBotServiceProvider::class))\n $this->app->register(\\ErpNET\\Bot\\Providers\\ErpnetBotServiceProvider::class);\n\n if (class_exists(\\ErpNET\\Migrates\\Providers\\ErpnetMigratesServiceProvider::class))\n $this->app->register(\\ErpNET\\Migrates\\Providers\\ErpnetMigratesServiceProvider::class);\n\n if (class_exists(\\ErpNET\\Models\\Providers\\ErpnetModelsServiceProvider::class))\n $this->app->register(\\ErpNET\\Models\\Providers\\ErpnetModelsServiceProvider::class);\n\n if (class_exists(\\ErpNET\\Delivery\\Providers\\ErpnetDeliveryServiceProvider::class))\n $this->app->register(\\ErpNET\\Delivery\\Providers\\ErpnetDeliveryServiceProvider::class);\n\n if (class_exists(\\ErpNET\\Auth\\Providers\\ErpnetAuthServiceProvider::class))\n $this->app->register(\\ErpNET\\Auth\\Providers\\ErpnetAuthServiceProvider::class);\n\n if (class_exists(\\ErpNET\\WidgetResource\\Providers\\ErpnetWidgetResourceServiceProvider::class))\n $this->app->register(\\ErpNET\\WidgetResource\\Providers\\ErpnetWidgetResourceServiceProvider::class);\n\n if (class_exists(\\ErpNET\\SocialAuth\\Providers\\ErpnetSocialAuthServiceProvider::class))\n $this->app->register(\\ErpNET\\SocialAuth\\Providers\\ErpnetSocialAuthServiceProvider::class);\n\n }", "title": "" }, { "docid": "299189b147d839d078bbddc5cd813f8a", "score": "0.7021252", "text": "public function register()\n {\n $this->app->bind(\n IProduto::class,\n ProdutoRepository::class\n );\n\n $this->app->bind(\n IEstoque::class,\n EstoqueRepository::class\n );\n\n $this->app->bind(\n IEstoqueServices::class,\n EstoqueServices::class\n );\n\n }", "title": "" }, { "docid": "4144c3d789410d254c2b4bbe78dd14f0", "score": "0.70184", "text": "public function register()\n {\n\n $this->setupOauthRedirects();\n\n }", "title": "" }, { "docid": "e8551da6c48babca3c4dc5328885e5a0", "score": "0.70151865", "text": "public function register()\n {\n //\n $this->app->singleton(ArticlesRepository::class, function($app) {\n // ...\n });\n\n $this->bindSearchClient();\n }", "title": "" }, { "docid": "398484ed8053020aad5abe39ca4b882b", "score": "0.7015066", "text": "public function register()\n {\n include __DIR__.'/../routes/api.php';\n include __DIR__.'/../routes/web.php';\n\n $this->app->register(EventServiceProvider::class);\n\n }", "title": "" }, { "docid": "c9f1682d37edb234face96c8cf37a7b0", "score": "0.70137614", "text": "public function register()\n {\n $this->app->bind(App\\Services\\ConvertService::class, function ($app) {\n return new ConvertService();\n });\n }", "title": "" }, { "docid": "91e276d4d27717b0e0a40e1ad82a7f8b", "score": "0.7013136", "text": "public function register()\n {\n $this->app->singleton(CodifierService::class, function () {\n return new CodifierService();\n });\n }", "title": "" }, { "docid": "b4e1d9a1b47a254f633028263c047bca", "score": "0.70125127", "text": "public function register()\n {\n $this->app->bind(FriendshipInterface::class, FriendshipService::class);\n $this->app->bind(PostRepositoryInterface::class, PostRepository::class);\n }", "title": "" }, { "docid": "1783b12bc9f137bd88dac3acea04a4e4", "score": "0.70123285", "text": "public function register()\n {\n $this->registerConfig();\n $this->registerBeamFacade();\n $this->registerActivationTokenRepository();\n }", "title": "" }, { "docid": "6d7abe34cba1e62811b72a8de0bb2983", "score": "0.70104986", "text": "public function register()\n {\n $this->app->bind(\n 'App\\Services\\IUserService',\n 'App\\Services\\Implementation\\UserService'\n );\n $this->app->bind(\n 'App\\Services\\IArticleService',\n 'App\\Services\\Implementation\\ArticleService'\n );\n }", "title": "" }, { "docid": "c702ae56a6d615c2a838f8ca156a46e8", "score": "0.7010262", "text": "public function register()\r\n {\r\n //rutas\r\n $this->registerRoutes();\r\n //controlador\r\n $this->app->make('Reddatasrd\\Conver\\Controllers\\MainController');\r\n\r\n //Resources \r\n $this->registerResources();\r\n //Migrations \r\n $this->registerMigrations();\r\n //clase broma\r\n $this->app->bind('Conver', function($app){\r\n return new Conver();\r\n });\r\n }", "title": "" } ]
376a2bff000ac53911cae948574c10cb
Komik : Naruto | Masashi Kishimoto, Shonen Jump (Rp. 30000) 100 Halaman
[ { "docid": "21bd8fc9628ef5a02ea790cdb6b5c40d", "score": "0.0", "text": "public function getInfo()\n {\n $str = \"{$this->judul} | {$this->getLabel()} (Rp. {$this->harga})\";\n\n return $str;\n }", "title": "" } ]
[ { "docid": "067d68e66e48d79137db02efcd55bee6", "score": "0.6309151", "text": "public function keliling()\n {\n return 2*($this->panjang + $this->lebar);\n }", "title": "" }, { "docid": "538ad11f3e3b354efa89226164f7b762", "score": "0.6255248", "text": "function suapvalint_iki_sitmecio ($metai) {\r\n if ($metai%100 == 0) {\r\n $simtmetis = $metai/100;\r\n return $simtmetis. \" osom\";\r\n }\r\n\r\n else {\r\n $simtmetis = round($metai/100,0);\r\n return $simtmetis. \" reikejo apvalint\";\r\n }\r\n}", "title": "" }, { "docid": "f7dd10f140004fc27b73f769ff279a2e", "score": "0.6231691", "text": "function rp($nominal) {\n //mengupdate nominal menjadi string, takutnya yang dimasukkan bertipe data int (angka)\n //mengeset string kosong buat penampung nanti, dan counter $c = 0\n $nominal = strval($nominal); $r = ''; $c = 0;\n $nominal = explode('.', $nominal); //memisah jika terdapat titik, takutnya ada titik seperti 4000.00\n $nominal = $nominal[0]; //mengambil data index pertama sebelum titik, berarti mengambil 4000-nya\n $nominal = explode('-', $nominal); //jika ada tanda minus di depan, maka akan dipecah lagi berdasarkan tanda minus tsb\n if (sizeof($nominal)>1) { //jika ternyata array yang dihasilkan oleh pemecahan tanda minus berjumlah lebih dari 1, berarti angka tersebut memang minus\n $min = '-'; $nominal = $nominal[1]; //dilakukan pemisahan dengan index 0 nin dan nominalnya di array index 1\n } else {\n $min = ''; $nominal = $nominal[0]; //jika tidak, maka memang bukan angka minus dan $min diset string kosong agar tidak berpengaruh saat direturn\n }\n for ($x=strlen($nominal)-1; $x>=0; $x--) { //diulang sebanyak string tapi dari belakang\n $r = $nominal[$x].$r; $c++; //menambah string kosong $r dengan index nominal dari belakang sambil menambah counter ($c)\n //jika counter kelipatan 3, maka saatnya ditambahkan dengan titik\n //misalnya 10000000, maka tiap perulangan 3x dari belakang akan ditambah titik, sehingga menjadi 10.000.000\n if ($c%3==0 & $x>0) $r = \".\".$r;\n }\n //mereturn hasil tadi, dengan tanda minusnya, tetapi jika tidak minus makan tidak akan mengganggu, karena variabel $min diisi string kosong di atas\n //return ditambahkan dengan ,00 dibelakang dan tanda Rp di depan sehingga berformat Rp ##.###,00\n return 'Rp '.$min.$r.',00';\n}", "title": "" }, { "docid": "ee4f00d2901cde07c1e4524fbbd77e0b", "score": "0.61436236", "text": "public function hallo(){\n\t\treturn self::$no++.\" Hallo my name is \".$this->harga;\n\t}", "title": "" }, { "docid": "b5010b34b9644321f0a5b7241ae2eaa5", "score": "0.60995305", "text": "function penyebut($nilai)\n{\n $nilai = abs($nilai);\n $huruf = array(\"\", \"satu\", \"dua\", \"tiga\", \"empat\", \"lima\", \"enam\", \"tujuh\", \"delapan\", \"sembilan\", \"sepuluh\", \"sebelas\");\n $temp = \"\";\n if ($nilai < 12) {\n $temp = \" \" . $huruf[$nilai];\n } else if ($nilai < 20) {\n $temp = penyebut($nilai - 10) . \" belas\";\n } else if ($nilai < 100) {\n $temp = penyebut($nilai / 10) . \" puluh\" . penyebut($nilai % 10);\n } else if ($nilai < 200) {\n $temp = \" seratus\" . penyebut($nilai - 100);\n } else if ($nilai < 1000) {\n $temp = penyebut($nilai / 100) . \" ratus\" . penyebut($nilai % 100);\n } else if ($nilai < 2000) {\n $temp = \" seribu\" . penyebut($nilai - 1000);\n } else if ($nilai < 1000000) {\n $temp = penyebut($nilai / 1000) . \" ribu\" . penyebut($nilai % 1000);\n } else if ($nilai < 1000000000) {\n $temp = penyebut($nilai / 1000000) . \" juta\" . penyebut($nilai % 1000000);\n } else if ($nilai < 1000000000000) {\n $temp = penyebut($nilai / 1000000000) . \" milyar\" . penyebut(fmod($nilai, 1000000000));\n } else if ($nilai < 1000000000000000) {\n $temp = penyebut($nilai / 1000000000000) . \" trilyun\" . penyebut(fmod($nilai, 1000000000000));\n }\n return $temp;\n}", "title": "" }, { "docid": "b96eec9c9cc52a4a882fa2cad33052e2", "score": "0.60818356", "text": "public function luas_Persegi()\n {\n $hitung = $this->lebar * $this->panjang;\n return $hitung;\n }", "title": "" }, { "docid": "0fcf3606007ce2776fb9b7a53381baf9", "score": "0.60503316", "text": "public function hidupkan_laptop($pemilik,$merk) {\n return \"Hidupkan Laptop $merk punya $pemilik\";\n }", "title": "" }, { "docid": "68469255163a7787281a47299e39c216", "score": "0.59362555", "text": "function data_mhs(){\r\n\t\t\techo \"KodeMataKuliah : \".$this->KodeMataKuliah.\"<br />\";\r\n\t\t\techo \"SKS : \".$this->SKS.\"<br />\";\r\n\t\t\techo \"Daftar matakuliah yang diambil:<br />\";\r\n\t\t\t\r\n\t\t\t$i = 0; // nomor urut daftar SKS matakuliah yang diambil\r\n\t\t\tforeach($this->NamaMataKuliah as $mk){\r\n\t\t\t\techo ++$i.\". \".$mk.\"<br />\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Cuma buat ganti baris aja kok :-)\r\n\t\t\techo \"<br />\";\r\n\t\t}", "title": "" }, { "docid": "c289710ca33a869d8084bee90c4495f9", "score": "0.58756226", "text": "function hilangkan_spesial_karakter($result) { \n\t$result = strip_tags($result);\n\t$result = preg_replace('/&.+?;/', '', $result); \n\t$result = preg_replace('/\\s+/', ' ', $result);\n $result = preg_replace('|%([a-fA-F0-9][a-fA-F0-9])|', ' ', $result);\n\t$result = preg_replace('|-+|', ' ', $result);\n $result = preg_replace('/&#?[a-z0-9]+;/i','',$result);\n $result = preg_replace('/[^%A-Za-z0-9 _-]/', ' ', $result);\n\t$result = trim($result, ' ');\n\treturn $result;\n}", "title": "" }, { "docid": "a83a1148c075767ec616ae6ba7ac99bd", "score": "0.587356", "text": "function penyebut($nilai) {\n\t\t$nilai = abs($nilai);\n\t\t$huruf = array(\"\", \"satu\", \"dua\", \"tiga\", \"empat\", \"lima\", \"enam\", \"tujuh\", \"delapan\", \"sembilan\", \"sepuluh\", \"sebelas\");\n\t\t$temp = \"\";\n\t\tif ($nilai < 12) {\n\t\t\t$temp = \" \". $huruf[$nilai];\n\t\t} else if ($nilai <20) {\n\t\t\t$temp = penyebut($nilai - 10). \" belas\";\n\t\t} else if ($nilai < 100) {\n\t\t\t$temp = penyebut($nilai/10).\" puluh\". penyebut($nilai % 10);\n\t\t} else if ($nilai < 200) {\n\t\t\t$temp = \" seratus\" . penyebut($nilai - 100);\n\t\t} else if ($nilai < 1000) {\n\t\t\t$temp = penyebut($nilai/100) . \" ratus\" . penyebut($nilai % 100);\n\t\t} else if ($nilai < 2000) {\n\t\t\t$temp = \" seribu\" . penyebut($nilai - 1000);\n\t\t} else if ($nilai < 1000000) {\n\t\t\t$temp = penyebut($nilai/1000) . \" ribu\" . penyebut($nilai % 1000);\n\t\t} else if ($nilai < 1000000000) {\n\t\t\t$temp = penyebut($nilai/1000000) . \" juta\" . penyebut($nilai % 1000000);\n\t\t} else if ($nilai < 1000000000000) {\n\t\t\t$temp = penyebut($nilai/1000000000) . \" milyar\" . penyebut(fmod($nilai,1000000000));\n\t\t} else if ($nilai < 1000000000000000) {\n\t\t\t$temp = penyebut($nilai/1000000000000) . \" trilyun\" . penyebut(fmod($nilai,1000000000000));\n\t\t} \n\t\treturn $temp;\n\t}", "title": "" }, { "docid": "9ab93c2833ba5d8b54f6dfbcf5eb9684", "score": "0.5837207", "text": "function hapusawalan1($kata){\n if(substr($kata,0,4)==\"meng\"){\n if(substr($kata,4,1)==\"e\"||substr($kata,4,1)==\"u\"){\n $kata = \"k\".substr($kata,4);\n }else{\n $kata = substr($kata,4);\n }\n }else if(substr($kata,0,4)==\"meny\"){\n $kata = \"ny\".substr($kata,4);\n }else if(substr($kata,0,3)==\"men\"){\n $kata = substr($kata,3);\n }else if(substr($kata,0,3)==\"mem\"){\n if(substr($kata,3,1)==\"a\" || substr($kata,3,1)==\"i\" || substr($kata,3,1)==\"e\" || substr($kata,3,1)==\"u\" || substr($kata,3,1)==\"o\"){\n $kata = \"p\".substr($kata,3);\n }else{\n $kata = substr($kata,3);\n }\n }else if(substr($kata,0,2)==\"me\"){\n $kata = substr($kata,2);\n }else if(substr($kata,0,4)==\"peng\"){\n if(substr($kata,4,1)==\"e\" || substr($kata,4,1)==\"a\"){\n $kata = \"k\".substr($kata,4);\n }else{\n $kata = substr($kata,4);\n }\n }else if(substr($kata,0,4)==\"peny\"){\n $kata = \"s\".substr($kata,4);\n }else if(substr($kata,0,3)==\"pen\"){\n if(substr($kata,3,1)==\"a\" || substr($kata,3,1)==\"i\" || substr($kata,3,1)==\"e\" || substr($kata,3,1)==\"u\" || substr($kata,3,1)==\"o\"){\n $kata = \"t\".substr($kata,3);\n }else{\n $kata = substr($kata,3);\n }\n }else if(substr($kata,0,3)==\"pem\"){\n if(substr($kata,3,1)==\"a\" || substr($kata,3,1)==\"i\" || substr($kata,3,1)==\"e\" || substr($kata,3,1)==\"u\" || substr($kata,3,1)==\"o\"){\n $kata = \"p\".substr($kata,3);\n }else{\n $kata = substr($kata,3);\n }\n }else if(substr($kata,0,2)==\"di\"){\n $kata = substr($kata,2);\n }else if(substr($kata,0,5)==\"keter\"){\n $kata = substr($kata,5);\n }else if(substr($kata,0,3)==\"ter\"){\n $kata = substr($kata,3);\n }else if(substr($kata,0,2)==\"ke\"){\n $kata = substr($kata,2);\n }\n return $kata;\n }", "title": "" }, { "docid": "bb1e784946d0a18298d40cf6b141cf88", "score": "0.5830591", "text": "public function percobaan()\n {\n \t$a = \"Ahmad Muhaimin\";\n \treturn \"Nama Saya Adalah \".$a;\n }", "title": "" }, { "docid": "07ec886b43a21624bf173f25f9a1805d", "score": "0.5770252", "text": "function cariPosisi($batas){\nif(empty($_GET['halpengumuman'])){\n\t$posisi=0;\n\t$_GET['halpengumuman']=1;\n}\nelse{\n\t$posisi = ($_GET['halpengumuman']-1) * $batas;\n}\nreturn $posisi;\n}", "title": "" }, { "docid": "d3831a99f17f1f411afd73b6f007c3cd", "score": "0.57470334", "text": "function soogiHind($taisHind, $soodusKaart = false, $kasOledOpilane = false){\n $soodusHind = $taisHind;\n $soodustusProtsent = 15;\n $opilaseToetus = 1.80; // €\n\n if($soodusKaart){\n $soodusHind = $taisHind * (100 - $soodustusProtsent) / 100;\n }\n if($kasOledOpilane){\n $soodusHind -= $opilaseToetus;\n }\n return $soodusHind;\n}", "title": "" }, { "docid": "f59e3f08aa50f8d509ee0813c4927961", "score": "0.57180977", "text": "function hp($nohp) {\r\n $nohp = str_replace(\" \",\"\",$nohp);\r\n // kadang ada penulisan no hp (0274) 778787\r\n $nohp = str_replace(\"(\",\"\",$nohp);\r\n // kadang ada penulisan no hp (0274) 778787\r\n $nohp = str_replace(\")\",\"\",$nohp);\r\n // kadang ada penulisan no hp 0811 239 345\r\n $nohp = str_replace(\" \",\" \",$nohp);\r\n\r\n // cek apakah no hp mengandung karakter + dan 0-9\r\n if(!preg_match('/[^+0-9]/',trim($nohp))){\r\n // cek apakah no hp karakter 1-3 adalah +62\r\n if(substr(trim($nohp), 0, 3)=='+62'){\r\n $hp = trim($nohp);\r\n }\r\n // cek apakah no hp karakter 1 adalah 0\r\n elseif(substr(trim($nohp), 0, 1)=='0'){\r\n $hp = '+62'.substr(trim($nohp), 1);\r\n }\r\n }\r\n print $hp;\r\n}", "title": "" }, { "docid": "4b75a293f9481fcab9255c0190e4c553", "score": "0.5690065", "text": "function dienTichHT(int $a, int $b, float $h) : void\n\t{\n\t\t// ham bat buoc phai co return\n\t\t//$t = (($a+$b)*$h)/2;\n\t\t//$t = (string)$t;\n\t\t//return 100;\n\t\techo 100;\n\t}", "title": "" }, { "docid": "8a8e6b92418ade3041ae984366bbb2f4", "score": "0.56831026", "text": "public function luas()\n {\n return $this->panjang * $this->lebar;\n }", "title": "" }, { "docid": "8b8624c9a6f61bbab620ae687868ce13", "score": "0.5668458", "text": "function pengurangan($first_number,$second_number){\n\t\t\t\t// variabel kurang\n\t\t\t\t$kurang = $first_number - $second_number;\n\t\t\t\techo \"Pengurangan $first_number - $second_number = $kurang <br><br>\";\n\t\t\t}", "title": "" }, { "docid": "46bd0347915f366c0c8b9ad89f03618f", "score": "0.5663524", "text": "function tampilSikap($nilai) {\nif($nilai== '1'){ \n\t$nilai = 'Kurang';\n}\nelseif($nilai== '2'){ \n\t$nilai = 'Cukup';\n}\nelseif($nilai== '3'){ \n\t$nilai = 'Baik';\n}\nelse { \n\t$nilai = 'Baik Sekali';\n}\n\treturn $nilai;\n}", "title": "" }, { "docid": "683869909b9b2340dd8530c717c0b481", "score": "0.5661289", "text": "public function vaziuoti($km){\n echo $this->kebuloNumeris.\"Liko vaziuoti $km <br />\";\n }", "title": "" }, { "docid": "3c1682d849415167e71dce554d358cde", "score": "0.5650053", "text": "function Tn_tro_her($level,$MBn) // Ct dung\n{\n\treturn round((2300+450*($level-1)+pow(1.6*($level-1),3))*$MBn);\n}", "title": "" }, { "docid": "a7c07a0c28fe6b1a7c699122068d7a91", "score": "0.56325954", "text": "function Tinh ($x,$n){\n $tong = 0;\n if($x<0 || $n <0){\n echo \"<p>Không cho phép tính toán với số âm</p>\";\n }else{\n for ($i=1;$i<=$n;$i++){\n $tong+=$x*$i*2;\n }echo \"<p>S($n) = $tong</p>\";\n }\n}", "title": "" }, { "docid": "5c85ef7a31b3c44e9f7b0168079b6a45", "score": "0.56236374", "text": "function terbilang($bilangan) {\n\n\t\t$angka = array('0','0','0','0','0','0','0','0','0','0',\n\t\t\t'0','0','0','0','0','0');\n\t\t$kata = array('','satu','dua','tiga','empat','lima',\n\t\t\t'enam','tujuh','delapan','sembilan');\n\t\t$tingkat = array('','ribu','juta','milyar','triliun');\n\n\t\t$panjang_bilangan = strlen($bilangan);\n\n\t\t/* pengujian panjang bilangan */\n\t\tif ($panjang_bilangan > 15) {\n\t\t\t$kalimat = \"Diluar Batas\";\n\t\t\treturn $kalimat;\n\t\t}\n\n\t\t/* mengambil angka-angka yang ada dalam bilangan,\n dimasukkan ke dalam array */\n\t\tfor ($i = 1; $i <= $panjang_bilangan; $i++) {\n\t\t\t$angka[$i] = substr($bilangan,-($i),1);\n\t\t}\n\n\t\t//only for debugging\n\t\t//var_dump ($angka);\n\n\t\t$i = 1;\n\t\t$j = 0;\n\t\t$kalimat = \"\";\n\n\n\t\t/* mulai proses iterasi terhadap array angka */\n\t\twhile ($i <= $panjang_bilangan) {\n\n\t\t\t$subkalimat = \"\";\n\t\t\t$kata1 = \"\";\n\t\t\t$kata2 = \"\";\n\t\t\t$kata3 = \"\";\n\n\t\t\t/* untuk ratusan */\n\t\t\tif ($angka[$i+2] != \"0\") {\n\t\t\t\tif ($angka[$i+2] == \"1\") {\n\t\t\t\t\t$kata1 = \"seratus\";\n\t\t\t\t} else {\n\t\t\t\t\t$kata1 = $kata[$angka[$i+2]] . \" ratus\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/* untuk puluhan atau belasan */\n\t\t\tif ($angka[$i+1] != \"0\") {\n\t\t\t\tif ($angka[$i+1] == \"1\") {\n\t\t\t\t\tif ($angka[$i] == \"0\") {\n\t\t\t\t\t\t$kata2 = \"sepuluh\";\n\t\t\t\t\t} elseif ($angka[$i] == \"1\") {\n\t\t\t\t\t\t$kata2 = \"sebelas\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$kata2 = $kata[$angka[$i]] . \" belas\";\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$kata2 = $kata[$angka[$i+1]] . \" puluh\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/* untuk satuan */\n\t\t\tif ($angka[$i] != \"0\") {\n\t\t\t\tif ($angka[$i+1] != \"1\") {\n\t\t\t\t\t$kata3 = $kata[$angka[$i]];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/* pengujian angka apakah tidak nol semua,\n lalu ditambahkan tingkat */\n\t\t\tif (($angka[$i] != \"0\") OR ($angka[$i+1] != \"0\") OR\n\t\t\t\t($angka[$i+2] != \"0\")) {\n\t\t\t\t$subkalimat = \"$kata1 $kata2 $kata3 \" . $tingkat[$j] . \" \";\n\t\t\t}\n\n\t\t\t/* gabungkan variabe sub kalimat (untuk satu blok 3 angka)\n ke variabel kalimat */\n\t\t\t$kalimat = $subkalimat . $kalimat;\n\t\t\t$i = $i + 3;\n\t\t\t$j = $j + 1;\n\n\t\t}\n\n\t\t/* mengganti satu ribu jadi seribu jika diperlukan */\n\t\tif (($angka[5] == \"0\") AND ($angka[6] == \"0\")) {\n\t\t\t$kalimat = str_replace(\"satu ribu\",\"seribu\",$kalimat);\n\t\t}\n\n\t\treturn trim($kalimat);\n\n\t}", "title": "" }, { "docid": "5b86d1ce4067302100e2a2b2966239d4", "score": "0.5614047", "text": "function Tn_tro_sta($level,$MBn) // CT dung\n{\n\treturn round((2000+500*($level-1)+pow(2*($level-1),3))*$MBn);\n}", "title": "" }, { "docid": "ed6588870cc503d2655b16f78492e42f", "score": "0.56121796", "text": "public static function doYouMean() {\r\n\t\t$aranan_kelime = 'ph'; //Bu değerin veritabanından geldiğini varsayalım\r\n\t\t$diziler = array('php', 'asp', '.net', 'jsp', 'java', 'javascript', 'html', 'c', 'css', 'xml');\r\n\t\t//$diziler dizisi, veritabanından çekilen birçok veri dizisi olduğu varsayalım\r\n\t\t$uzunluk = -1;\r\n\t\t\r\n\t\tforeach($diziler as $dizi) {\r\n\t\t\t$benzerlik = levenshtein($aranan_kelime, $dizi);\r\n\t\t\tif($benzerlik == 0) {\r\n\t\t\t\t$yakinlik = $dizi;\r\n\t\t\t\t$uzunluk = 0;\r\n\t\t\t}\r\n\t\t\tif(($benzerlik <= $uzunluk) || ($uzunluk < 0)) {\r\n\t\t\t\t$yakinlik = $dizi;\r\n\t\t\t\t$uzunluk = $benzerlik;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$op = \"Aranan Kelime: \".$aranan_kelime;\r\n\t\tif($uzunluk == 0) {\r\n\t\t\t$op .= $yakinlik.\" için herhangi bir sonuç bulunamadı!\";\r\n\t\t} else {\r\n\t\t\t$op .= \"Bunu mu demek istediniz? \".$yakinlik;\r\n\t\t}\r\n\t\treturn $op;\r\n\t}", "title": "" }, { "docid": "79235c5a1367510210dc58d609dd85d2", "score": "0.55960906", "text": "public function terbilang($angka) {\n $angka = floatval($angka);\n if ($angka < 12) {\n return $this->_bilangan[$angka];\n } else if ($angka < 20) {\n return $this->_bilangan[$angka - 10] . ' Belas';\n } else if ($angka < 100) {\n $hasil_bagi = (int)($angka / 10);\n $hasil_mod = $angka % 10;\n return trim(sprintf('%s Puluh %s', $this->_bilangan[$hasil_bagi], $this->_bilangan[$hasil_mod]));\n } else if ($angka < 200) {\n return sprintf('Seratus %s', self::terbilang($angka - 100));\n } else if ($angka < 1000) {\n $hasil_bagi = (int)($angka / 100);\n $hasil_mod = $angka % 100;\n return trim(sprintf('%s Ratus %s', $this->_bilangan[$hasil_bagi], self::terbilang($hasil_mod)));\n } else if ($angka < 2000) {\n return trim(sprintf('Seribu %s', self::terbilang($angka - 1000)));\n } else if ($angka < 1000000) {\n $hasil_bagi = intval($angka / 1000);\n $hasil_mod = $angka % 1000;\n return sprintf('%s Ribu %s', self::terbilang($hasil_bagi), self::terbilang($hasil_mod));\n } else if ($angka < 1000000000) {\n $hasil_bagi = intval($angka / 1000000);\n $hasil_mod = $angka % 1000000;\n return trim(sprintf('%s Juta %s', self::terbilang($hasil_bagi), self::terbilang($hasil_mod)));\n } else if ($angka < 1000000000000) {\n $hasil_bagi = intval($angka / 1000000000);\n $hasil_mod = fmod($angka, 1000000000);\n return trim(sprintf('%s Milyar %s', self::terbilang($hasil_bagi), self::terbilang($hasil_mod)));\n } else if ($angka < 1000000000000000) {\n $hasil_bagi = $angka / 1000000000000;\n $hasil_mod = fmod($angka, 1000000000000);\n return trim(sprintf('%s Triliun %s', self::terbilang($hasil_bagi), self::terbilang($hasil_mod)));\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "b8231d7b154b97c92d9976aa4c7893d5", "score": "0.5569494", "text": "public function getInfoLengkap(){\n $str = \"{$this->tipe} : {$this->judul} | {$this->getLable()} (Rp. {$this->harga}\";\n if($this->tipe == \"Komik\"){\n $str .= \" - ($this->jmlHalaman) Halaman.\";\n }elseif ($this->tipe == \"Game\"){\n $str .= \" ~ ($this->waktuMain) Jam.\";\n }\n return $str;\n }", "title": "" }, { "docid": "8127acdfea557d3697e2783d09a6b1e3", "score": "0.55690175", "text": "function noidungtt($sotu,$noidung)\n{\n\n\t$n=explode(\" \",$noidung);\n\t$noidunginra=\" \";\n\tif($sotu<=count($n)){\n for($i=0;$i<$sotu;$i++)\n\t\t $noidunginra = $noidunginra.$n[$i].\" \";\n $noidunginra .=\"...\";\n }\n\telse\n\t\techo \"<h1>cảnh báo : số từ tóm lược nhiều hơn nội dung ban đầu</h1>\"; \n\treturn $noidunginra;\n}", "title": "" }, { "docid": "b3c280a60ebedd75e92a7aba528e2743", "score": "0.556828", "text": "function cariPosisi($batas){\nif(empty($_GET['halpengajar'])){\n\t$posisi=0;\n\t$_GET['halpengajar']=1;\n}\nelse{\n\t$posisi = ($_GET['halpengajar']-1) * $batas;\n}\nreturn $posisi;\n}", "title": "" }, { "docid": "eec2115a186172350380840a72bc1ba0", "score": "0.55586356", "text": "function hapusakhiran($kata){\n if (substr($kata, -3)== \"kan\" ){\n $kata = substr($kata, 0, -3);\n }\n else if(substr($kata, -1)== \"i\" ){\n $kata = substr($kata, 0, -1);\n }else if(substr($kata, -2)== \"an\"){\n $kata = substr($kata, 0, -2);\n }\n return $kata;\n }", "title": "" }, { "docid": "54bc7a740ca8c3ea9bf65d00f2105b44", "score": "0.55575895", "text": "public function info_hp($merk){\n return \"Merk Handphone : $merk\";\n }", "title": "" }, { "docid": "b5207db1489312582f9a9637cb713f07", "score": "0.55529904", "text": "public function run()\n {\n $NoiDung = \"\n\t\t<p>Kể từ khi ra mắt vào tháng 03 năm ngoái, Nintendo Switch đã tẩu tán được gần 20 triệu máy. Tính đến giờ, hầu hết mọi người đều nghĩ rằng Nintendo Switch, Xbox One và Sony PS4 là ba đối thủ cạnh tranh trực tiếp trên thị trường.</p>\n\t\t<p>Tuy nhiên nếu nhìn sâu hơn vào những số liệu cũng như thói quen chơi game của những gia đình và người tiêu dùng sở hữu Switch, phát hiện được ra một điều đáng nể của Nintendo: Họ đang tự tạo ra cả một thị trường riêng, không cạnh tranh trực tiếp với console truyền thống, lại càng không đụng vào game mobile trên các thiết bị di động khác.</p>\n\t\t<p>Tháng 10/2017, chủ tịch Nintendo Tatsumi Kimishima chia sẻ một bản báo cáo sau khi cuộc họp công bố báo cáo tài chính kết thúc. Những dữ kiện ông chia sẻ trong bản báo cáo này khiến chúng ta nhận ra một điều rằng Nintendo Switch có một tính năng mà không máy console hiện tại nào cạnh tranh được, đó chính là cơ chế căn bản cho phép chơi kiểu hybrid, vừa ngồi nhà xuất hình lên TV thông qua dock sạc, vừa cho phép mang ra đường thưởng thức game như một tablet nho nhỏ.</p>\n\t\t<p>Hiện tại hơn 50% tổng số người sử dụng Switch đều chơi game bằng cả hai cách, theo dữ liệu gửi về cho Nintendo. Điều này có nghĩa concept máy chơi game của người Nhật Bản đã được cộng đồng chấp nhận và sử dụng hàng ngày.</p>\n\t\t<p>Chính sự độc đáo này khiến cho tiềm năng lâu dài của Switch trở nên vô cùng khả quan.</p>\";\n\n DB::table('blog')->insert([\n \t[\n \t\t'Title' => 'Hơn 1 năm qua Nintendo Switch đã tự tạo ra một thị trường mới toanh như thế nào?',\n \t\t'NoTitle' => 'hon-1-nam-qua-nintendo-switch-da-tu-tao-ra-mot-thi-truong-moi-toanh-nhu-the-nao',\n \t\t'Excerpts' => 'Bên cạnh 400 suất học bổng Nguyễn Văn Đạo, ĐH FPT lần đầu tiên chọn ra 30 học sinh xuất sắc nhất để cấp học bổng toàn phần đào tạo từ cử nhân lên thẳng tiến sĩ, với tổng giá trị quỹ lên tới 5 triệu USD.',\n \t\t'Content' => $NoiDung,\n 'Image' => 'hero-1.jpg',\n 'Highlights' => 1,\n \t\t'View' => 0,\n 'idCategoryBlog'=>'1'\n \t],\n \t[\n \t\t'idCategoryBlog'=>'1',\n \t\t'Title' => 'Lần đầu ĐH FPT cấp học bổng tiến sĩ ',\n \t\t'NoTitle' => 'Lan-Dau-Dh-Fpt-Cap-Hoc-Bong-Tien-Si',\n \t\t'Excerpts' => 'Bên cạnh 400 suất học bổng Nguyễn Văn Đạo, ĐH FPT lần đầu tiên chọn ra 30 học sinh xuất sắc nhất để cấp học bổng toàn phần đào tạo từ cử nhân lên thẳng tiến sĩ, với tổng giá trị quỹ lên tới 5 triệu USD.',\n \t\t'Content' => $NoiDung,\n \t\t'Image' => 'hero-1.jpg',\n 'Highlights' => 1,\n 'View' => 0,\n 'idCategoryBlog'=>'1'\n \t],\n \t[\n \t\t'idCategoryBlog'=>'1',\n \t\t'Title' => 'Bên trong ổ cắm điện cắm 4000W',\n \t\t'NoTitle' => 'ben-trong-o-cam-dien-cam-4000w',\n \t\t'Excerpts' => 'Bên cạnh 400 suất học bổng Nguyễn Văn Đạo, ĐH FPT lần đầu tiên chọn ra 30 học sinh xuất sắc nhất để cấp học bổng toàn phần đào tạo từ cử nhân lên thẳng tiến sĩ, với tổng giá trị quỹ lên tới 5 triệu USD.',\n \t\t'Content' => $NoiDung,\n \t\t'Image' => 'hero-1.jpg',\n \t\t'Highlights' => 1,\n 'View' => 0,\n 'idCategoryBlog'=>'1'\n \t],\n \t[\n \t\t'idCategoryBlog'=>'2',\n \t\t'Title' => 'Phải chăng PS4 là món đồ chơi chỉ dành cho người nhiều tiền?',\n \t\t'NoTitle' => 'phai-chang-ps4-la-mon-do-choi-chi-danh-cho-nguoi-nhieu-tien',\n \t\t'Excerpts' => 'Bên cạnh 400 suất học bổng Nguyễn Văn Đạo, ĐH FPT lần đầu tiên chọn ra 30 học sinh xuất sắc nhất để cấp học bổng toàn phần đào tạo từ cử nhân lên thẳng tiến sĩ, với tổng giá trị quỹ lên tới 5 triệu USD.',\n \t\t'Content' => $NoiDung,\n \t\t'Image' => 'hero-1.jpg',\n \t\t'Highlights' => 1,\n 'View' => 0,\n 'idCategoryBlog'=>'1'\n \t],\n \t[\n \t\t'idCategoryBlog'=>'3',\n \t\t'Title' => 'Tự làm UPS cho modem wifi, đèn led',\n \t\t'NoTitle' => 'tu-lam-ups-cho-modem-wifi-den-led',\n \t\t'Excerpts' => 'Bên cạnh 400 suất học bổng Nguyễn Văn Đạo, ĐH FPT lần đầu tiên chọn ra 30 học sinh xuất sắc nhất để cấp học bổng toàn phần đào tạo từ cử nhân lên thẳng tiến sĩ, với tổng giá trị quỹ lên tới 5 triệu USD.',\n \t\t'Content' => $NoiDung,\n \t\t'Image' => 'hero-1.jpg',\n \t\t'Highlights' => 1,\n 'View' => 0,\n 'idCategoryBlog'=>'1'\n \t]\n\n \t]);\n }", "title": "" }, { "docid": "37bc80f9fff647fa2e7c45aedec834ff", "score": "0.55520916", "text": "function tach_chu_hien_thi($content){\r\n $mang = explode(\" \", $content);\r\n $str = \"\";\r\n $sochu = sizeof($mang);\r\n if($sochu < 10){\r\n for($j = 0; $j < sizeof($mang); $j++){\r\n $str = $str.\" \".$mang[$j];\r\n }\r\n }else{\r\n for($j = 0; $j < 15; $j++){\r\n $str = $str.\" \".$mang[$j];\r\n }\r\n }\r\n return $str;\r\n}", "title": "" }, { "docid": "d37099526413c7c2d7d7abe0f99c1f4e", "score": "0.5549221", "text": "function halamanf3($jum)\n{// function halaman() - mula\n $mula = '<div style=\"background-color: #fffaf0; color:black;text-align:center\">';\n $tamat = '</div>';\n $page = $jum['page'];\n // Tentukan had query berasaskan nombor halaman semasa.\n //$jum['dari'] = (($jum['page'] * $jum['max']) - $jum['max']); \n // Tentukan bilangan halaman. $jum['muka_surat'] \n\t$jum['max'] = 30; // ubahsuai bil max untuk cetakf3\n\t$muka_surat = ceil($jum['bil_semua'] / $jum['max']);\n $bil_semua = $jum['bil_semua'];\n $baris_max = $jum['max'];\n \n $url = dpt_url(); // sepatutnya kawalan/semua/30/1/amin/\n $class = ( !isset($url[0]) ) ? null : $url[0]; //'kawalan'; \n $fungsi = 'cetakf3'; //( !isset($url[1]) ) ? null : $url[1]; //'semua'; \n $batch = ( !isset($url[2]) ) ? null : $url[2]; //'30'; \n $item = ( !isset($url[3]) ) ? null : $url[3]; //'30'; \n $ms = ( !isset($url[4]) ) ? null : $url[4]; //'ms'; \n //$fe = ( !isset($url[4]) ) ? null : $url[4]; //'fe'; \n \n //return \"\\$batch:$batch|\\$bil_semua:$bil_semua|\\$baris_max:$baris_max|\\$muka_surat:$muka_surat\";\n\t\n\t$senarai = URL . \"$class/$fungsi/$batch/$baris_max/\";\n $halaman = \"\\n$mula\\r\" \n\t\t. '<ul class=\"pagination pagination-sm\">' \n\t\t. \"\\r<li><a>Bil:($bil_semua) ms($muka_surat)- Papar halaman</a></li>\";\n \n if($page > 1) // Bina halaman sebelum\n $halaman .= \"\\r<li><a href='$senarai\" . ($page-1) . \"'>&laquo;</a></li>\";\n for($i = 1; $i <= $muka_surat; $i++) // Bina halaman terkini\n {$halaman .= ($page==$i)? \"\\r<li><a href='$senarai$i'>($i)</a></li>\" : \n\t\t\"\\r<li><a href='$senarai$i'>$i</a></li>\";}\n if($page < $muka_surat) // Bina halaman akhir\n $halaman .= \"\\r<li><a href='$senarai\" . ($page+1) . \"'>&raquo;</a></li>\";\n \n $halaman .= \"\\n</ul>\\n$tamat\";\n\n return $halaman;\n\t\n}", "title": "" }, { "docid": "8861ca055a7d3722fddadba880665bc1", "score": "0.5543318", "text": "function rp($angka)\n{\n\n $hasil_rupiah = \"Rp. \" . number_format($angka, 0, '', '.');\n return $hasil_rupiah;\n}", "title": "" }, { "docid": "b3305024e05fce07e348910481759167", "score": "0.55393916", "text": "function kira2($dulu,$kini)\n{\n return @number_format((($kini-$dulu)/$dulu)*100,0,'.',',');\n //@$kiraan=(($kini-$dulu)/$dulu)*100;\n}", "title": "" }, { "docid": "c1f788ab9591afbc8da2c0935ea65464", "score": "0.55282843", "text": "function bank($bedrag){\n $jaar = 1;\n for ($jaar;$jaar<=10;++$jaar){\n $nieuwbedrag = $bedrag *pow(1.08,$jaar);\n echo 'na '.$jaar.' jaar heeft Hans '.$nieuwbedrag.'euro <br>';\n }\n }", "title": "" }, { "docid": "07e8f4f5194511647ddc82534610d946", "score": "0.5525103", "text": "function analisisK($perangkaan, $jadual, $key, $data)\n{\n\t$sv = $perangkaan['sv'];\n\t$hasil = $perangkaan['hasil'];\n\t$belanja = $perangkaan['belanja'];\n\t$aset = $perangkaan['aset'];\n\t$sewa = $perangkaan['asetsewa'];\n\t$noKey = substr($key, 0, 3);\n\t//echo \"<hr>$key : $sewaHarta \";\n\t\n\tif (in_array($key, array('thn','batch','Estab') ) )\n\t{\n\t\t$value = $data;\n\t\t\n\t}\n\telseif ($sv=='205') \n\t{//untuk survey 205 sahaja\n\t\tif ($jadual == 'q04_2010' && $noKey == 'F09') \n\t\t\t$nilai = ($sewa==0) ? 0 : (($data / $sewa) * 100);\n\t\telseif ($jadual == 'q04_2010' && $noKey != 'F09') \n\t\t\t$nilai = ($aset==0) ? 0 : (($data / $aset) * 100);\n\t\telseif ($jadual == 'q08_2010')\n\t\t\t$nilai = ($hasil==0) ? 0 : (($data / $hasil) * 100 );\n\t\telseif ($jadual == 'q09_2010')\n\t\t\t$nilai = ($belanja==0) ? 0 : (($data / $belanja) * 100 );\n\t\t$value = number_format($nilai,4,'.',',') . '%';\n\t\t$name = 'name=\"' . $sv . '_' . $jadual . '[' . $key . ']\"';\n\t}\n\telse\n\t{\n\t\tif ($jadual == 's'.$sv.'_q02_2010')\n\t\t\t$nilai = ($hasil==0) ? 0 : (($data / $hasil) * 100 );\n\t\telseif ($jadual == 's'.$sv.'_q03_2010')\n\t\t\t$nilai = ($belanja==0) ? 0 : (($data / $belanja) * 100 );\n\t\telseif ($jadual == 's'.$sv.'_q04_2010')\n\t\t\t$nilai = ($aset==0) ? 0 : (($data / $aset) * 100 );\n\t\t$value = number_format($nilai,4,'.',',') . '%';\n\t\t$name = 'name=\"' . $jadual . '[' . $key . ']\"';\n\n\t}\n\t// istihar pembolehubah \n\t$input = '<input type=\"text\" ' . $name . ' value=\"' \n\t\t . $data . '\" class=\"input-large\">' . $value;\n\treturn '<td>' . $input . '</td>' . \"\\r\";\n}", "title": "" }, { "docid": "953ba38958948b90e56be81f2a86d9d5", "score": "0.55244255", "text": "function kaloriusia($u, $tb, $g){\n\tif($u <=39){\n\t\t$kbu = \"0 kkal \";\n\t}else if($u >=40 && $u <= 59){\n\t\t$kbu = kalorinormal($g, $tb) * 0.05;\n\t}else if($u >=60 && $u <= 69){\n\t\t$kbu = kalorinormal($g, $tb) * 0.1;\n\t}else if($u >69){\n\t\t$kbu = kalorinormal($g, $tb) * 0.2;\n\t}\nreturn $kbu;\n}", "title": "" }, { "docid": "adeebcac46cd4db2d53932dac35f719e", "score": "0.55234116", "text": "function IMC($name, $weightKg, $heightCm){\n $heightM = $heightCm/100;\n $heightCarre = $heightM * $heightM;\n $IMC = $weightKg/$heightCarre;\n $message = \"Bonjour $name , votre IMC est $IMC\";\n return $message;\n\n}", "title": "" }, { "docid": "0001003ba1a9321fb7806c80d7deb059", "score": "0.55207217", "text": "function penjumlahan($bil1,$bil2){//fungsi penjumlahan\r\n $jumlah=$bil1 + $bil2;//operasi dengan operator aritmatika\r\n return $jumlah;//mengembalikan nilai ke var. jumlah\r\n }", "title": "" }, { "docid": "b5ceb6bede0caf31ba7a727e3827b642", "score": "0.5518764", "text": "function ahoj($priezvisko)\n {\n echo \"Nazdar<br>\".$priezvisko;\n echo \"<br><br>\";\n }", "title": "" }, { "docid": "9f196796b1a3d60e7c2fa8c43b72bc11", "score": "0.55093414", "text": "function Terbilang($x)\n{\n $abil = array(\"\", \"satu\", \"dua\", \"tiga\", \"empat\", \"lima\", \"enam\", \"tujuh\", \"delapan\", \"sembilan\", \"sepuluh\", \"sebelas\");\n if ($x < 12)\n\treturn \" \" . $abil[$x];\n elseif ($x < 20)\n\treturn Terbilang($x - 10) . \"belas\";\n elseif ($x < 100)\n\treturn Terbilang($x / 10) . \" puluh\" . Terbilang($x % 10);\n elseif ($x < 200)\n\treturn \" seratus\" . Terbilang($x - 100);\n elseif ($x < 1000)\n\treturn Terbilang($x / 100) . \" ratus\" . Terbilang($x % 100);\n elseif ($x < 2000)\n\treturn \" seribu\" . Terbilang($x - 1000);\n elseif ($x < 1000000)\n\treturn Terbilang($x / 1000) . \" ribu\" . Terbilang($x % 1000);\n elseif ($x < 1000000000)\n\treturn Terbilang($x / 1000000) . \" juta\" . Terbilang($x % 1000000);\n}", "title": "" }, { "docid": "7c32c21222e3b307e30514c66aee2cf1", "score": "0.5499358", "text": "function Hasil_pencarian($cek,$tempprodi) {\n\t\t\n\t\t//D_TIMAJAR2013 (KD_KELAS, KD_DOSEN)\n\t\t\n\t\t$hp = $this->db->query(\"SELECT DISTINCT B.KD_DOSEN, B.NM_DOSEN, B.NM_DOSEN_F FROM SIA.V_KELAS A, SIA.V_DOSEN B, SIA.D_TIMAJAR2013 C WHERE A.KD_KELAS = C.KD_KELAS AND C.KD_DOSEN = B.KD_DOSEN AND (UPPER(B.NM_DOSEN) LIKE (UPPER ('%\".$cek.\"%')) OR B.KD_DOSEN LIKE '%\".$cek.\"%') AND (A.KD_PRODI IN ('\".$tempprodi.\"'))\")->result_array();\n\t\t\n\t\t\n\t\t/* $out_kd_prodi = $this->db->query(\"SELECT DISTINCT D.KD_PRODI FROM SIA.V_KELAS D, SIA.D_TIMAJAR2013 E WHERE D.KD_KELAS = E.KD_KELAS(+) AND E.KD_DOSEN = '\".$cek.\"'\")->result_array();\n\t\tif(!empty($out_kd_prodi)){\n\t\t\tfor($i=0; $i<count($out_kd_prodi); $i++){\n\t\t\t\tif($i==0) $kd_prodi_b[0] = $out_kd_prodi[$i]['KD_PRODI'];\n\t\t\t\t$kd_prodi_b[0] .= \"','\".$out_kd_prodi[$i]['KD_PRODI'];\n\t\t\t}\n\t\t}else{\n\t\t\t$kd_prodi_b[0] = '';\n\t\t}\n\t\t$hp = $this->db->query(\"SELECT DISTINCT B.KD_DOSEN, B.KD_PRODI, B.NM_DOSEN\n\t\t\t\t\t\t\t\t\tFROM SIA.V_KELAS A, SIA.V_DOSEN B, SIA.D_TIMAJAR2013 C \n\t\t\t\t\t\t\t\t\tWHERE A.KD_KELAS = C.KD_KELAS AND C.KD_DOSEN = B.KD_DOSEN AND (UPPER(B.NM_DOSEN) LIKE (UPPER ('%$cek%')) OR B.KD_DOSEN = '\".$cek.\"') AND (A.KD_PRODI IN ('$tempprodi') OR A.KD_PRODI IN ('\".$kd_prodi_b[0].\"'))\")->result_array(); */\n\t\treturn $hp;\n }", "title": "" }, { "docid": "5c24656be69cfdd4c076cf4104419ae5", "score": "0.54901457", "text": "public static function inferensi($nilaiIPK, $nilaiPenghasilan, $nilaiJarak, $nilaiTanggungan, $nilaiRumah, $nilaiMotor, $nilaiMobil, $nilaiListrik, $nilaiAir) {\n\n echo \"Rule yang digunakan : \\n\";\n $x = 0;\n $kondisi = [];\n\n for ($ip = 0; $ip < count($nilaiIPK); $ip++) {\n for ($pn = 0; $pn < count($nilaiPenghasilan); $pn++) {\n for ($jr = 0; $jr < count($nilaiJarak); $jr++) {\n for ($tg = 0; $tg < count($nilaiTanggungan); $tg++) {\n for ($rm = 0; $rm < count($nilaiRumah); $rm++) {\n for ($mt = 0; $mt < count($nilaiMotor); $mt++) {\n for ($mb = 0; $mb < count($nilaiMobil); $mb++) {\n for ($ls = 0; $ls < count($nilaiListrik); $ls++) {\n for ($ai = 0; $ai < count($nilaiAir); $ai++) {\n if (($nilaiIPK[$ip] > 0) && ($nilaiPenghasilan[$pn] > 0) && ($nilaiJarak[$jr] > 0) && ($nilaiTanggungan[$tg] > 0) && ($nilaiRumah[$rm] > 0) && ($nilaiMotor[$mt] > 0) && ($nilaiMobil[$mb] > 0) && ($nilaiListrik[$ls] > 0) && ($nilaiAir[$ai] > 0)) {\n $alpha[$x] = min($nilaiIPK[$ip], $nilaiPenghasilan[$pn], $nilaiJarak[$jr], $nilaiTanggungan[$tg], $nilaiRumah[$rm], $nilaiMotor[$mt], $nilaiMobil[$mb], $nilaiListrik[$ls], $nilaiAir[$ai]);\n if ($ip == 2 && $jr == 2 && $pn == 1 && $tg == 2 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 2 && $pn == 1 && $tg == 1 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 2 && $pn == 0 && $tg == 2 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 2 && $pn == 0 && $tg == 1 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 1 && $pn == 1 && $tg == 2 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 1 && $pn == 1 && $tg == 1 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 1 && $pn == 0 && $tg == 2 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 1 && $pn == 0 && $tg == 1 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 0 && $pn == 1 && $tg == 2 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 0 && $pn == 1 && $tg == 1 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 0 && $pn == 0 && $tg == 2 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 0 && $pn == 0 && $tg == 1 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else {\n $z[$x] = self::z_tidakDapat($alpha, $x);\n $kondisi[$x] = \"tidak dapat\";\n }\n echo \"IF IPK = {$nilaiIPK[$ip]} AND Penghasilan = {$nilaiPenghasilan[$pn]} AND Jarak = {$nilaiJarak[$jr]} AND Tanggungan = {$nilaiTanggungan[$tg]} AND Rumah = {$nilaiRumah[$rm]} AND Motor = {$nilaiMotor[$mt]} AND Mobil = {$nilaiMobil[$mb]} AND Listrik = {$nilaiListrik[$ls]} AND Air = {$nilaiAir[$ai]} THEN a_predikat = {$alpha[$x]} z = {$z[$x]} kondisi = {$kondisi[$x]} \\n\";\n $x++;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n self::defuzzifikasi($alpha, $z);\n }", "title": "" }, { "docid": "38b16eb7d839433b2c3c09bbbefab761", "score": "0.5484162", "text": "function sikapSiswa($nilai) {\nif($nilai=='Kurang'){ \n\t$nilai = 1;\n}\nelseif($nilai=='Cukup'){ \n\t$nilai = 2;\n}\nelseif($nilai=='Baik'){ \n\t$nilai = 3;\n}\nelse { \n\t$nilai = 4;\n}\n\treturn $nilai;\n}", "title": "" }, { "docid": "63d5fa74009d87a8576c8374d096b054", "score": "0.5482886", "text": "function get_jml_mhs_dpa(){\n\t\t\t$mahasiswa = $this->api->get_api_json(URL_API_SIA.'sia_mahasiswa/data_search', 'POST', \n\t\t\t\t\t\tarray('api_kode'=>28000, 'api_subkode' => 6, \n\t\t\t\t\t\t'api_search' => array('A', $this->session->userdata('id_user'))));\n\n\t\t\t$bimbingan_pa = array();\n\t\t\tforeach ($mahasiswa as $mhs) {\n\t\t\t\tif(isset($bimbingan_pa[strtoupper($mhs['NM_JENJANG'])])){\n\t\t\t\t\t$bimbingan_pa[strtoupper($mhs['NM_JENJANG'])]['JUMLAH']++;\n\t\t\t\t}else{\n\t\t\t\t\t$bimbingan_pa[strtoupper($mhs['NM_JENJANG'])]['JENJANG'] = strtoupper($mhs['NM_JENJANG']);\n\t\t\t\t\t$bimbingan_pa[strtoupper($mhs['NM_JENJANG'])]['NM_PRODI'] = $mhs['NM_PRODI'];\n\t\t\t\t\t$bimbingan_pa[strtoupper($mhs['NM_JENJANG'])]['JUMLAH'] = 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $bimbingan_pa;\n\t\t}", "title": "" }, { "docid": "cdf939700d6697e7d222cdbc83a8cf4d", "score": "0.54823184", "text": "public function smanjiCenu(){\n if($this->getGodiste() < 2010){\n $discount=$this->cenapolovnogauta*0.7;\n return $this->cenapolovnogauta=$discount;\n }\n return $this->cenapolovnogauta; \n }", "title": "" }, { "docid": "c07bc7269430814646358c2ea242544e", "score": "0.5477189", "text": "function berekening(){\n\n\tstatic $kapitaal = 100000;\n\t$rentevoet = 0.08;\n\t$periode = 10;\n\n\tstatic $result = array();\n\n\tstatic $jaren = 1;\n\n\tif ($jaren <= $periode) {\n\n\t\t$rente = floor($kapitaal*$rentevoet);\n\t\t\t\n\t\t$kapitaal = $kapitaal + $rente;\n\n\t\t$result[ ] = 'Na '.$jaren.' jaar heeft Hans '.$kapitaal.'€ op zijn rekening staan. (waarvan '.$rente.'€ rente is)';\n\n\t\t++$jaren;\n\n\t\tberekening();\n\n\t} else {\n\n\t\treturn $result;\n\n\t}\n\t\n\n}", "title": "" }, { "docid": "d44025660a87472ddf4d704303c0a8b0", "score": "0.5473043", "text": "function Tn_eco_iro($level,$MBn) // -> CT sai neu test level >=7\n{\n\treturn round(6000*pow(2-($level-1)/10,$level-1)*$MBn);\n}", "title": "" }, { "docid": "8c671ec244fb7b44f5bd21208258a496", "score": "0.5470829", "text": "public function hapus_toko(){\n\t}", "title": "" }, { "docid": "c6ce58653c797680681988767c7cbe01", "score": "0.5470255", "text": "function Tn_tro($level,$MBn) // Ct dung\n{\n\treturn\tround((2000+350*($level-1)+pow(2*($level-1),3))*$MBn);\n}", "title": "" }, { "docid": "9dceba8a104a03c0db51b68c37fada7c", "score": "0.54673785", "text": "function pembagian($first_number,$second_number){\n\t\t\t\t// variabel bagi\n\t\t\t\t$bagi = $first_number / $second_number;\n\t\t\t\techo \"Pembagian $first_number / $second_number = $bagi <br><br>\";\t\t\t\t\t\t\t\t\n\t\t\t}", "title": "" }, { "docid": "2f8d606b4d4252950f742a0e29fffbd0", "score": "0.54640335", "text": "function hitung()\n\t{\n\t\t$this->model->hitungMhs();\n\t\t//$this->dashboardukmapendaftar(); //controller dikembalikan ke method index setelah selesai mengakses method ini.\n\t}", "title": "" }, { "docid": "dc4dab7f6c2722fba404dd072c425b83", "score": "0.5452653", "text": "function cariPosisi($batas){\nif(empty($_GET['halaman'])){\n\t$posisi=0;\n\t$_GET['halaman']=1;\n}\nelse{\n\t$posisi = ($_GET['halaman']-1) * $batas;\n}\nreturn $posisi;\n}", "title": "" }, { "docid": "f952ba5fd6866a20d1c7dfed92c112bb", "score": "0.5445028", "text": "function Atv_HumanAksesKegiatan($akses): string\n{\n if ($akses == '5') return 'Presensi';\n elseif ($akses == '7') return 'Tambahan';\n}", "title": "" }, { "docid": "d39f6c5b532e6056c1413b5890a837e6", "score": "0.5442703", "text": "public function bernafas()\n \t{\n \t\techo 'Bernafas menggunakan hidung, '.PHP_EOL;\n \t}", "title": "" }, { "docid": "895ded0cab3c2200b93fad2731b82030", "score": "0.5442183", "text": "public function jalan() {\n return \"Hewan ini berjalan<br/>\";\n }", "title": "" }, { "docid": "69ed260db467ec63d4b2308d50531ae1", "score": "0.5436393", "text": "public function penjumlahan3($n1 = '0', $n2 = '0')\n {\n\n $this->load->model('Model_latihan1');\n $hasil = $this->Model_latihan1->jumlah2($n1, $n2);\n \n echo \"Hasil Penjumlahan\" . $hasil;\n }", "title": "" }, { "docid": "94812f38490b0317438eac326709c845", "score": "0.5431346", "text": "function apa_kabar() {\n return \"Apa kabar dunia?\"; //tidak menampilkan apapun\n}", "title": "" }, { "docid": "9e84ed155ab8c256c94ae99f19d77a11", "score": "0.5418735", "text": "function toPersen($total,$pembagi){\t\n $hasil = empty($pembagi) ? 0 : round(($total)/($pembagi)*100,2);\n\treturn $hasil;\n}", "title": "" }, { "docid": "2e056792dde9cfdbdaf84dbf7560cb0f", "score": "0.5413853", "text": "function hapuspp($kata){\n if(strlen($kata) > 4){\n if((substr($kata, -2)== 'ku')||(substr($kata, -2)== 'mu')){\n $kata = substr($kata, 0, -2);\n }else if((substr($kata, -3)== 'nya')){\n $kata = substr($kata,0, -3);\n }\n }\n return $kata;\n }", "title": "" }, { "docid": "f5cdc093b957362565a4e0393b975392", "score": "0.54051507", "text": "function perkalian($first_number,$second_number){\n\t\t\t\t// variabel kali\n\t\t\t\t$kali = $first_number * $second_number;\t\t\t\t\n\t\t\t\techo \"Perkalian $first_number x $second_number = $kali <br><br>\";\n\t\t\t}", "title": "" }, { "docid": "9d07820761f163fe872619c6a08ed6c2", "score": "0.54037255", "text": "function salam($waktu, $nama) {\n\treturn \"Selamat $waktu, $nama!!\";\n}", "title": "" }, { "docid": "283c00c4a80da11052825806d7ba2b02", "score": "0.5398952", "text": "function cariPosisi($batas){\nif(empty($_GET[halaman])){\n\t$posisi=0;\n\t$_GET[halaman]=1;\n}\nelse{\n\t$posisi = ($_GET[halaman]-1) * $batas;\n}\nreturn $posisi;\n}", "title": "" }, { "docid": "477a06d9544ed3a9b343d44c3c260192", "score": "0.5396494", "text": "function shwe_16_pell_to_15_pell($kyat){\n $ans = $kyat * 17;\n $ans = $ans / 16;\n return $ans;\n}", "title": "" }, { "docid": "d747f4dafec9b11861bffa68f36373a9", "score": "0.539551", "text": "function tambah_nol($angka,$jumlah)\n\t\t{\n\t\t\t$jumlah_nol=strlen($angka);\n\t\t\t$angka_nol=$jumlah-$jumlah_nol;\n\t\t\t$nol = \"\";\n\t\t\tfor($i=1;$i<=$angka_nol;$i++)\n\t\t\t{\n\t\t\t$nol.='0000';\n\t\t\t}\n\t\t\treturn $nol.$angka;\n\t\t}", "title": "" }, { "docid": "11bff82abb634d789e41023c7de81115", "score": "0.53943884", "text": "function perpraktikum($mhsw, $khs, $bipot, $ada, $pmbmhswid=1) {\r\n // Jumlah Matakuliah praktikum/responsi yg diambil mhsw. \r\n $jml = GetaField('krstemp k left outer join jadwal j on k.JadwalID=j.JadwalID', \r\n \"k.TahunID='$khs[TahunID]' and k.MhswID='$mhsw[MhswID]' and j.JenisJadwalID\", \r\n 'R', \"count(*)\") *2;\r\n if (($jml == 0) and (empty($mhsw['MhswID']))) $jml = 2;\r\n $totharga = $bipot['Jumlah'];\r\n if (empty($ada) && ($totharga > 0)) {\r\n $s0 = \"insert into bipotmhsw(PMBID, MhswID, TahunID, BIPOT2ID, BIPOTNamaID,\r\n PMBMhswID, TrxID, Jumlah, Besar, Catatan,\r\n LoginBuat, TanggalBuat)\r\n values('$mhsw[PMBID]', '$mhsw[MhswID]', '$khs[TahunID]', '$bipot[BIPOT2ID]', '$bipot[BIPOTNamaID]',\r\n '$pmbmhswid', '$bipot[TrxID]', $jml, '$totharga', '$mk',\r\n '$_SESSION[_Login]', now())\";\r\n $r0 = _query($s0);\r\n }\r\n else {\r\n $s0 = \"update bipotmhsw set Jumlah=$jml, Besar='$totharga',\r\n PMBMhswID='$pmbmhswid',\r\n Catatan='Total SKS: $totsks',\r\n LoginEdit='$_SESSION[_Login]', TanggalEdit=now()\r\n where BIPOTMhswID='$ada[BIPOTMhswID]' \";\r\n $r0 = _query($s0);\r\n }\r\n}", "title": "" }, { "docid": "b15aa2a5fc4d54166aba1a97dd3fc12c", "score": "0.5388386", "text": "function cariPosisi($batas){\nif(empty($_GET['halproduk'])){\n\t$posisi=0;\n\t$_GET['halproduk']=1;\n}\nelse{\n\t$posisi = ($_GET['halproduk']-1) * $batas;\n}\nreturn $posisi;\n}", "title": "" }, { "docid": "3d1acc77e94166d8d7f0229414edee27", "score": "0.5385469", "text": "function jumlahHalaman($jmldata, $batas){\n$jmlhalaman = ceil($jmldata/$batas);\nreturn $jmlhalaman;\n}", "title": "" }, { "docid": "3d1acc77e94166d8d7f0229414edee27", "score": "0.5385469", "text": "function jumlahHalaman($jmldata, $batas){\n$jmlhalaman = ceil($jmldata/$batas);\nreturn $jmlhalaman;\n}", "title": "" }, { "docid": "3d1acc77e94166d8d7f0229414edee27", "score": "0.5385469", "text": "function jumlahHalaman($jmldata, $batas){\n$jmlhalaman = ceil($jmldata/$batas);\nreturn $jmlhalaman;\n}", "title": "" }, { "docid": "3d1acc77e94166d8d7f0229414edee27", "score": "0.5385469", "text": "function jumlahHalaman($jmldata, $batas){\n$jmlhalaman = ceil($jmldata/$batas);\nreturn $jmlhalaman;\n}", "title": "" }, { "docid": "3d1acc77e94166d8d7f0229414edee27", "score": "0.5385469", "text": "function jumlahHalaman($jmldata, $batas){\n$jmlhalaman = ceil($jmldata/$batas);\nreturn $jmlhalaman;\n}", "title": "" }, { "docid": "3d1acc77e94166d8d7f0229414edee27", "score": "0.5385469", "text": "function jumlahHalaman($jmldata, $batas){\n$jmlhalaman = ceil($jmldata/$batas);\nreturn $jmlhalaman;\n}", "title": "" }, { "docid": "3d1acc77e94166d8d7f0229414edee27", "score": "0.5385469", "text": "function jumlahHalaman($jmldata, $batas){\n$jmlhalaman = ceil($jmldata/$batas);\nreturn $jmlhalaman;\n}", "title": "" }, { "docid": "3d1acc77e94166d8d7f0229414edee27", "score": "0.5385469", "text": "function jumlahHalaman($jmldata, $batas){\n$jmlhalaman = ceil($jmldata/$batas);\nreturn $jmlhalaman;\n}", "title": "" }, { "docid": "3d1acc77e94166d8d7f0229414edee27", "score": "0.5385469", "text": "function jumlahHalaman($jmldata, $batas){\n$jmlhalaman = ceil($jmldata/$batas);\nreturn $jmlhalaman;\n}", "title": "" }, { "docid": "3d1acc77e94166d8d7f0229414edee27", "score": "0.5385469", "text": "function jumlahHalaman($jmldata, $batas){\n$jmlhalaman = ceil($jmldata/$batas);\nreturn $jmlhalaman;\n}", "title": "" }, { "docid": "3d1acc77e94166d8d7f0229414edee27", "score": "0.5385469", "text": "function jumlahHalaman($jmldata, $batas){\n$jmlhalaman = ceil($jmldata/$batas);\nreturn $jmlhalaman;\n}", "title": "" }, { "docid": "3d1acc77e94166d8d7f0229414edee27", "score": "0.5385469", "text": "function jumlahHalaman($jmldata, $batas){\n$jmlhalaman = ceil($jmldata/$batas);\nreturn $jmlhalaman;\n}", "title": "" }, { "docid": "3d1acc77e94166d8d7f0229414edee27", "score": "0.5385469", "text": "function jumlahHalaman($jmldata, $batas){\n$jmlhalaman = ceil($jmldata/$batas);\nreturn $jmlhalaman;\n}", "title": "" }, { "docid": "3d1acc77e94166d8d7f0229414edee27", "score": "0.5385469", "text": "function jumlahHalaman($jmldata, $batas){\n$jmlhalaman = ceil($jmldata/$batas);\nreturn $jmlhalaman;\n}", "title": "" }, { "docid": "3d1acc77e94166d8d7f0229414edee27", "score": "0.5385469", "text": "function jumlahHalaman($jmldata, $batas){\n$jmlhalaman = ceil($jmldata/$batas);\nreturn $jmlhalaman;\n}", "title": "" }, { "docid": "3d1acc77e94166d8d7f0229414edee27", "score": "0.5385469", "text": "function jumlahHalaman($jmldata, $batas){\n$jmlhalaman = ceil($jmldata/$batas);\nreturn $jmlhalaman;\n}", "title": "" }, { "docid": "3d1acc77e94166d8d7f0229414edee27", "score": "0.5385469", "text": "function jumlahHalaman($jmldata, $batas){\n$jmlhalaman = ceil($jmldata/$batas);\nreturn $jmlhalaman;\n}", "title": "" }, { "docid": "3d1acc77e94166d8d7f0229414edee27", "score": "0.5385469", "text": "function jumlahHalaman($jmldata, $batas){\n$jmlhalaman = ceil($jmldata/$batas);\nreturn $jmlhalaman;\n}", "title": "" }, { "docid": "3d1acc77e94166d8d7f0229414edee27", "score": "0.5385469", "text": "function jumlahHalaman($jmldata, $batas){\n$jmlhalaman = ceil($jmldata/$batas);\nreturn $jmlhalaman;\n}", "title": "" }, { "docid": "f154447421bffc95ca6226b9e0660780", "score": "0.5384615", "text": "function terbilang($x, $style) {\n // untuk menggunakan gunakan cara berikut\n // terbilang('your_number', 'style_number')\n // style_number [1=> Untuk huruf terbilang besar seluruhnya, 2 => untuk huruf kecil seluruhnya, 3 => untuk huruf awal besar, 4 => untuk huruf pertama besar]\n if($x<0) {\n $hasil = \"minus \". trim(kekata($x));\n } else {\n $hasil = trim(kekata($x));\n } \n switch ($style) {\n case 1:\n $hasil = strtoupper($hasil);\n break;\n case 2:\n $hasil = strtolower($hasil);\n break;\n case 3:\n $hasil = ucwords($hasil);\n break;\n default:\n $hasil = ucfirst($hasil);\n break;\n } \n return $hasil;\n}", "title": "" }, { "docid": "55c49b12277803231d1a345185aa37e5", "score": "0.53842515", "text": "function displayMontant($val) {\n if( $val < 1000 ) return $val;\n $val = $val/1000;\n if( $val < 1000 ) return \"${val} K\";\n $val = $val/1000;\n return \"${val} M\";\n}", "title": "" }, { "docid": "82bbeac6d6c3d14a8cac4c4adf5fcea1", "score": "0.5378581", "text": "function NilaiPajakDr($db,$jumlah_tagihan,$kode_dokter,$bln_mulai,$thn_mulai){\r\n\r\n\t\t\t$sql = \"SELECT * FROM mt_pajak_progresif ORDER BY nilai_max\";\r\n\t\t\t$hasil =& $db->Execute($sql);\r\n\t\t\t$dpp = $jumlah_tagihan;\r\n\t\t\t$kumulatif = $kumulatif;\r\n\r\n\t\t\t$i = 1;\t\t\r\n\t\t\twhile ($tampil=$hasil->FetchRow()) {\r\n\r\n\t\t\t\t$id_mt_pajak_progresif = $tampil[\"id_mt_pajak_progresif\"];\r\n\t\t\t\t$nilai_min = $tampil[\"nilai_min\"];\r\n\t\t\t\t$nilai_max = $tampil[\"nilai_max\"];\r\n\t\t\t\t$thn_pajak = $tampil[\"thn_pajak\"];\r\n\t\t\t\t$persentase_pajak = $tampil[\"persentase_pajak\"];\r\n\t\t\t\t\r\n\t\t\t\t$dpp_kumulatif = $kumulatif + $dpp;\r\n\r\n\t\t\t\tif($dpp_kumulatif >= $nilai_max){\r\n\t\t\t\t\t$id_check = 1;\r\n\t\t\t\t\t$tampil_kumulatif = $nilai_max;\r\n\t\t\t\t\t$kena_pajak = $nilai_max - $kumulatif;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$id_check = 2;\r\n\t\t\t\t\t$tampil_kumulatif = $dpp_kumulatif;\r\n\t\t\t\t\t$kena_pajak = ($i == 1)?$dpp : $dpp_kumulatif - $nilai_min;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif($kena_pajak >0 ):\r\n\t\t\t\t\t$i++;\r\n\t\t\t\t\t$pph_21 = $kena_pajak*($persentase_pajak/100);\r\n\r\n\t\t\t\t\t$tot_kena_pajak +=$pph_21;\r\n\r\n\t\t\t\t\tInsertPajakDr($db,$bln_mulai,$thn_mulai,$kode_dokter,$jumlah_tagihan,$id_mt_pajak_progresif,$kena_pajak,$tampil_kumulatif,$persentase_pajak,$pph_21);\r\n\r\n\t\t\t\tendif; //if($kena_pajak < 1):\r\n\t\t\t} // end of while ($hasil->FetchRow())\r\n\r\n\r\n\r\n\t\t\t$hasil = $this->HasilPajakDr[$kode_dokter];\r\n\t\t\treturn $hasil;\r\n\t\t}", "title": "" }, { "docid": "15873437809f306a1e9222020b728e07", "score": "0.53731126", "text": "function cariPosisi($batas){\nif(empty($_GET['halberita'])){\n\t$posisi=0;\n\t$_GET['halberita']=1;\n}\nelse{\n\t$posisi = ($_GET['halberita']-1) * $batas;\n}\nreturn $posisi;\n}", "title": "" }, { "docid": "15873437809f306a1e9222020b728e07", "score": "0.53731126", "text": "function cariPosisi($batas){\nif(empty($_GET['halberita'])){\n\t$posisi=0;\n\t$_GET['halberita']=1;\n}\nelse{\n\t$posisi = ($_GET['halberita']-1) * $batas;\n}\nreturn $posisi;\n}", "title": "" }, { "docid": "94973a1934f0bbfbba44877b796484ec", "score": "0.53720194", "text": "function Tn_tec($level,$MBn) // ->tang dung\n{\n\treturn round((2000+350*($level-1)+pow(2*($level-1),3))*$MBn);\n}", "title": "" }, { "docid": "73bf23252c13fca30afc2f339bbd19e9", "score": "0.5370498", "text": "public function run()\n {\n $cities[1]=\"Adana\";\n $cities[2]=\"Adıyaman\";\n $cities[3]=\"Afyon\";\n $cities[4]=\"Ağrı\";\n $cities[5]=\"Amasya\";\n $cities[6]=\"Ankara\";\n $cities[7]=\"Antalya\";\n $cities[8]=\"Artvin\";\n $cities[9]=\"Aydın\";\n $cities[10]=\"Balıkesir\";\n $cities[11]=\"Bilecik\";\n $cities[12]=\"Bingöl\";\n $cities[13]=\"Bitlis\";\n $cities[14]=\"Bolu\";\n $cities[15]=\"Burdur\";\n $cities[16]=\"Bursa\";\n $cities[17]=\"Çanakkale\";\n $cities[18]=\"Çankırı\";\n $cities[19]=\"Çorum\";\n $cities[20]=\"Denizli\";\n $cities[21]=\"Diyarbakır\";\n $cities[22]=\"Edirne\";\n $cities[23]=\"Elazığ\";\n $cities[24]=\"Erzincan\";\n $cities[25]=\"Erzurum\";\n $cities[26]=\"Eskişehir\";\n $cities[27]=\"Gaziantep\";\n $cities[28]=\"Giresun\";\n $cities[29]=\"Gümüşhane\";\n $cities[30]=\"Hakkari\";\n $cities[31]=\"Hatay\";\n $cities[32]=\"Isparta\";\n $cities[33]=\"İçel\";\n $cities[35]=\"İstanbul\";\n $cities[34]=\"İzmir\";\n $cities[36]=\"Kars\";\n $cities[37]=\"Kastamonu\";\n $cities[38]=\"Kayseri\";\n $cities[39]=\"Kırklareli\";\n $cities[40]=\"Kırşehir\";\n $cities[41]=\"Kocaeli\";\n $cities[42]=\"Konya\";\n $cities[43]=\"Kütahya\";\n $cities[44]=\"Malatya\";\n $cities[45]=\"Manisa\";\n $cities[46]=\"Kahramanmaraş\";\n $cities[47]=\"Mardin\";\n $cities[48]=\"Muğla\";\n $cities[49]=\"Muş\";\n $cities[50]=\"Nevşehir\";\n $cities[51]=\"Niğde\";\n $cities[52]=\"Ordu\";\n $cities[53]=\"Rize\";\n $cities[54]=\"Sakarya\";\n $cities[55]=\"Samsun\";\n $cities[56]=\"Siirt\";\n $cities[57]=\"Sinop\";\n $cities[58]=\"Sivas\";\n $cities[59]=\"Tekirdağ\";\n $cities[60]=\"Tokat\";\n $cities[61]=\"Trabzon\";\n $cities[62]=\"Tunceli\";\n $cities[63]=\"Şanlıurfa\";\n $cities[64]=\"Uşak\";\n $cities[65]=\"Van\";\n $cities[66]=\"Yozgat\";\n $cities[67]=\"Zonguldak\";\n $cities[68]=\"Aksaray\";\n $cities[69]=\"Bayburt\";\n $cities[70]=\"Karaman\";\n $cities[71]=\"Kırıkkale\";\n $cities[72]=\"Batman\";\n $cities[73]=\"Şırnak\";\n $cities[74]=\"Bartın\";\n $cities[75]=\"Ardahan\";\n $cities[76]=\"Iğdır\";\n $cities[77]=\"Yalova\";\n $cities[78]=\"Karabük\";\n $cities[79]=\"Kilis\";\n $cities[80]=\"Osmaniye\";\n $cities[81]=\"Düzce \";\n\n\n foreach ($cities as $city){\n\n City::create([\n 'country_id' => 1,\n 'name' => $city,\n 'is_active' => 1,\n ]);\n }\n }", "title": "" }, { "docid": "0eb65105e02e9302ff46aa639cd3b55b", "score": "0.53610146", "text": "function maladies($p1,$p2,$p3,$p4,$p5,$p6,$p7,$p8,$mal){\n $lop1 = json_decode($p1,true);\n $lop2 = json_decode($p2,true);\n $lop3 = json_decode($p3,true);\n $lop4 = json_decode($p4,true);\n $lop5 = json_decode($p5,true);\n $lop6 = json_decode($p6,true);\n $lop7 = json_decode($p7,true);\n $lop8 = json_decode($p8,true);\n\n $this->SetFont('Arial','',15);\n $this->Cell(0,6,\"Tableau de frequence des maladies \");\n $this->Ln();\n\n $this->SetFont('Times','B',12);\n $x_axis=$this->getx();\n $this->hcell(10,10,$x_axis,\"Num\");\n $x_axis=$this->getx();\n $this->fcell(58,10,$x_axis,\"Tranches / Maladies\");\n $x_axis=$this->getx();\n $this->hCell(14,10,$x_axis,'0-11 mois');\n $x_axis=$this->getx();\n $this->hCell(14,10,$x_axis,'1-4 ans');\n $x_axis=$this->getx();\n $this->hCell(14,10,$x_axis,'5-14 ans');\n $x_axis=$this->getx();\n $this->hCell(14,10,$x_axis,'15-19 ans');\n $x_axis=$this->getx();\n $this->hCell(14,10,$x_axis,'20-24 ans');\n $x_axis=$this->getx();\n $this->hCell(14,10,$x_axis,'25-49 ans');\n $x_axis=$this->getx();\n $this->hCell(14,10,$x_axis,'50-59 ans');\n $x_axis=$this->getx();\n $this->hCell(14,10,$x_axis,'60 ans et plus');\n $x_axis=$this->getx();\n $this->hCell(14,10,$x_axis,'Totals');\n\n $this->Ln();\n $itera = 0;\n $totals = 0;\n foreach($lop1 as $k=>$v){\n $somme = $lop1[$k]+$lop2[$k]+$lop3[$k]+$lop4[$k]+$lop5[$k]+$lop6[$k]+$lop7[$k]+$lop8[$k];\n if($somme > 0){\n $this->SetFont('Times','',10);\n $x_axis=$this->getx();\n $this->hcell(10,10,$x_axis,$itera+1);\n $x_axis=$this->getx();\n $this->ecell(58,10,$x_axis,utf8_decode($mal[$itera]));\n $x_axis=$this->getx();\n $this->hcell(14,10,$x_axis,$lop1[$k]);\n $x_axis=$this->getx();\n $this->hcell(14,10,$x_axis,$lop2[$k]);\n $x_axis=$this->getx();\n $this->hcell(14,10,$x_axis,$lop3[$k]);\n $x_axis=$this->getx();\n $this->hcell(14,10,$x_axis,$lop4[$k]);\n $x_axis=$this->getx();\n $this->hcell(14,10,$x_axis,$lop5[$k]);\n $x_axis=$this->getx();\n $this->hcell(14,10,$x_axis,$lop6[$k]);\n $x_axis=$this->getx();\n $this->hcell(14,10,$x_axis,$lop7[$k]);\n $x_axis=$this->getx();\n $this->hcell(14,10,$x_axis,$lop8[$k]);\n $this->SetFont('Times','B',13);\n $x_axis=$this->getx();\n $this->hcell(14,10,$x_axis,$somme);\n $this->Ln();\n $itera +=1; \n $totals += $somme;\n }\n }\n $this->SetFont('Times','B',13);\n $x_axis=$this->getx();\n $this->ecell(180,10,$x_axis,'Totals');\n $x_axis=$this->getx();\n $this->hcell(14,10,$x_axis,$totals);\n $this->Ln();\n $this->Ln();\n }", "title": "" }, { "docid": "3d39fe7a618b9ac8326fd60ad222bb3a", "score": "0.5359771", "text": "function hapusawalan2($kata){\n if(substr($kata,0,3)==\"ber\"){\n $kata = substr($kata,3);\n }else if(substr($kata,0,3)==\"bel\"){\n $kata = substr($kata,3);\n }else if(substr($kata,0,2)==\"be\"){\n $kata = substr($kata,2);\n }else if(substr($kata,0,3)==\"per\" && strlen($kata) > 5){\n $kata = substr($kata,3);\n }else if(substr($kata,0,2)==\"pe\" && strlen($kata) > 5){\n $kata = substr($kata,2);\n }else if(substr($kata,0,3)==\"pel\" && strlen($kata) > 5){\n $kata = substr($kata,3);\n }else if(substr($kata,0,2)==\"se\" && strlen($kata) > 5){\n $kata = substr($kata,2);\n }\n return $kata;\n }", "title": "" }, { "docid": "f5f8504966293b61c5c03803474cf5a6", "score": "0.5359108", "text": "function cariPosisi($batas){\nif(empty($_GET['halhasilkelulusansiswa'])){\n\t$posisi=0;\n\t$_GET['halhasilkelulusansiswa']=1;\n}\nelse{\n\t$posisi = ($_GET['halhasilkelulusansiswa']-1) * $batas;\n}\nreturn $posisi;\n}", "title": "" }, { "docid": "91404c0901b0bf699c9bf8c8453d9eb8", "score": "0.5358318", "text": "function set_luaspersegipanjang($p, $l){\n \t\t$this->panjang = $p;\n \t\t$this->lebar = $l;\n \t}", "title": "" }, { "docid": "c32245e56659c52dabcfc450183a2a55", "score": "0.53539294", "text": "function huruf($jenis, $papar)\n{\n \n switch ($jenis) \n {// mula - pilih $jenis\n case 'BESAR':\n $papar = strtoupper($papar);\n break;\n case 'kecil':\n $papar = strtolower($papar);\n break;\n case 'Depan':\n $papar = ucfrist($papar);\n break;\n case 'Besar_Depan':\n $papar = mb_convert_case($papar, MB_CASE_TITLE);\n break;\n }// tamat - pilih $jenis\n \n return $papar;\n}", "title": "" }, { "docid": "f3db29bacfc00ec4e93e67501024ab65", "score": "0.53469783", "text": "function addjapeng($kanjicity, $kanalocal, $kanacity, $kanastreet,/* $kanahouse,*/ $hyphens)\n\t{\n\t\tif (strstr(substr($kanjicity,8),encode(\"郡\"))!==false) $kanacity=substr($kanacity,0,8) . str_replace(encode(\"グン\"),\"gun \",substr($kanacity,8));\n\t\t$string= trim($kanalocal.\" \". $kanacity . \" \" . $kanastreet/* . \" \" . $kanahouse*/);\n\n\n\t\t//Array to prevent \"-shi,-ku\" errors\n\t\t$cities=array(encode(\"サイタマシ\") =>\"Saitamashi \",encode(\"キョウトシ\") =>\"Kyotoshi \",encode(\"センダイシ\") =>\"Sendaishi \",encode(\"キタキュウシュウシ\") =>\"Kita Kyushushi \",encode(\"チバシ\") =>\"Chibashi \",encode(\"ナゴヤシ\") =>\"Nagoyashi \",encode(\"サカイシ\") =>\"Sakaishi \",encode(\"オオサカシ\") =>\"Osakashi \",encode(\"カワサキシ\") =>\"Kawasakishi \",encode(\"ヒロシマシ\") =>\"Hiroshimashi \",encode(\"ニイガタシ\") =>\"Nigatashi \",encode(\"サッポロシ\") =>\"Sapporoshi \",encode(\"ヨコハマシ\") =>\"Yokohamashi \",encode(\"ハママツシ\") =>\"Hamamatsushi \",encode(\"コウベシ\") =>\"Kobeshi \",encode(\"フクオカシ\") =>\"Fukuokashi \",encode(\"シズオカシ\") =>\"Shizuokashi \");\n\t\t//Irregular combinations\n\t\t$irregular=array(encode(\"ゥウ\") => encode(\"ゥ\") ,encode(\"ォオ\") => encode(\"ォ\") ,encode(\"ョウ\") => encode(\"ョ\") ,encode(\"ュウ\") => encode(\"ュ\")/*, encode(\" ミナミ\") =>\" Minami \", encode(\" ヒガシ\") =>\" higashi \"/*, encode(\" キタ\") =>\" kita \", encode(\" ニシ\") =>\" nishi\" */);\n\t\t//Basic transition\n\t\t$trans=array(encode(\"シモウ\") => \"shimou\" ,encode(\"モトウ\") => \"motou\" ,encode(\"モトオ\") => \"motoo\" ,encode(\"ン\") => \"n\" ,encode(\"ヲ\") => \"wo\" ,encode(\"ワ\") => \"wa\" ,encode(\"ロウ\") => \"ro\" ,/*encode(\"ロオ\") => \"ro\" ,*/encode(\"ロ\") => \"ro\" ,encode(\"レ\") => \"re\" ,encode(\"ル\") => \"ru\" ,encode(\"リイ\") => \"ri\" ,encode(\"リョ\") => \"ryo\" ,encode(\"リュ\") => \"ryu\" ,encode(\"リャ\") => \"rya\" ,encode(\"リ\") => \"ri\" ,encode(\"ラ\") => \"ra\" ,encode(\"ヨウ\") => \"yo\" ,encode(\"ユウ\") => \"yu\" ,encode(\"ヨ\") => \"yo\" ,encode(\"ユ\") => \"yu\" ,encode(\"ヤ\") => \"ya\" ,encode(\"モオ\") => \"mo\" ,encode(\"モウ\") => \"mo\" ,encode(\"モ\") => \"mo\" ,encode(\"メ\") => \"me\" ,encode(\"ム\") => \"mu\" ,encode(\"ミョ\") => \"myo\" ,encode(\"ミュ\") => \"myu\" ,encode(\"ミャ\") => \"mya\" ,encode(\"ミ\") => \"mi\" ,encode(\"マ\") => \"ma\" ,encode(\"ボウ\") => \"bo\" ,encode(\"ボ\") => \"bo\" ,encode(\"ベ\") => \"be\" ,encode(\"ブウ\") => \"bu\" ,encode(\"ブ\") => \"bu\" ,encode(\"ビョ\") => \"byo\" ,encode(\"ビュ\") => \"byu\" ,encode(\"ビャ\") => \"bya\" ,encode(\"ビ\") => \"bi\" ,encode(\"バ\") => \"ba\" ,encode(\"ポウ\") => \"po\" ,encode(\"ポ\") => \"po\" ,encode(\"ペ\") => \"pe\" ,encode(\"プウ\") => \"pu\" ,encode(\"プ\") => \"pu\" ,encode(\"ピョ\") => \"pyo\" ,encode(\"ピュ\") => \"pyu\" ,encode(\"ピャ\") => \"pya\" ,encode(\"パ\") => \"pa\" ,encode(\"ノウ\") => \"no\" ,encode(\"ホウ\") => \"ho\" ,encode(\"ホ\") => \"ho\" ,encode(\"ヘ\") => \"he\" ,encode(\"フォ\") => \"fo\" ,encode(\"フェ\") => \"fe\" ,encode(\"フゥ\") => \"fu\" ,encode(\"フィ\") => \"fi\" ,encode(\"ファ\") => \"fa\" ,encode(\"フウ\") => \"fu\" ,encode(\"フ\") => \"fu\" ,encode(\"ヒョ\") => \"hyo\" ,encode(\"ヒュ\") => \"hyu\" ,encode(\"ヒャ\") => \"hya\" ,encode(\"ヒ\") => \"hi\" ,encode(\"ハ\") => \"ha\" ,encode(\"ノ\") => \"no\" ,encode(\"ネ\") => \"ne\" ,encode(\"ヌウ\") => \"nu\" ,encode(\"ヌ\") => \"ne\" ,encode(\"ニョ\") => \"nyo\" ,encode(\"ニュ\") => \"nyu\" ,encode(\"ニャ\") => \"nya\" ,encode(\"ニ\") => \"ni\" ,encode(\"ナ\") => \"na\" ,encode(\"ドオ\") => \"do\" ,encode(\"ドウ\") => \"do\" ,encode(\"ド\") => \"do\" ,encode(\"ディ\") => \"di\" ,encode(\"デ\") => \"de\" ,encode(\"ヅウ\") => \"ju\" ,encode(\"ヅ\") => \"ju\" ,encode(\"ヂョ\") => \"jyo\" ,encode(\"ヂュ\") => \"jyu\" ,encode(\"ヂャ\") => \"jya\" ,encode(\"ヂェ\") => \"jye\" ,encode(\"ヂィ\") => \"ji\" ,encode(\"ヂ\") => \"ji\" ,encode(\"ダ\") => \"da\" ,encode(\"トオ\") => \"to\" ,encode(\"トウ\") => \"to\" ,encode(\"ト\") => \"to\" ,encode(\"ティ\") => \"ti\" ,encode(\"テ\") => \"te\" ,encode(\"ツウ\") => \"tsu\" ,encode(\"ツ\") => \"tsu\" ,encode(\"チョ\") => \"cho\" ,encode(\"チュ\") => \"chu\" ,encode(\"チャ\") => \"cha\" ,encode(\"チェ\") => \"che\" ,encode(\"チィ\") => \"chi\" ,encode(\"チ\") => \"chi\" ,encode(\"タ\") => \"ta\" ,encode(\"ゾウ\") => \"zo\" ,encode(\"ゾオ\") => \"zo\" ,encode(\"ゾ\") => \"zo\" ,encode(\"ゼ\") => \"ze\" ,encode(\"ズ\") => \"zu\" ,encode(\"ジョ\") => \"jo\" ,encode(\"ジェ\") => \"je\" ,encode(\"ジュ\") => \"ju\" ,encode(\"ジャ\") => \"ja\" ,encode(\"ジ\") => \"ji\" ,encode(\"ザ\") => \"za\" ,encode(\"ソウ\") => \"so\" ,encode(\"ソオ\") => \"so\" ,encode(\"ソ\") => \"so\" ,encode(\"セ\") => \"se\" ,encode(\"ス\") => \"su\" ,encode(\"ショ\") => \"sho\" ,encode(\"シェ\") => \"she\" ,encode(\"シュ\") => \"shu\" ,encode(\"シャ\") => \"sha\" ,encode(\"シ\") => \"shi\" ,encode(\"サ\") => \"sa\" ,encode(\"ゴウ\") => \"go\" ,encode(\"ゴオ\") => \"go\" ,encode(\"ゴ\") => \"go\" ,encode(\"ゲ\") => \"ge\" ,encode(\"グ\") => \"gu\" ,encode(\"ギョ\") => \"gyo\" ,encode(\"ギェ\") => \"gye\" ,encode(\"ギュ\") => \"gyu\" ,encode(\"ギィ\") => \"gyi\" ,encode(\"ギャ\") => \"gya\" ,encode(\"ギ\") => \"gi\" ,encode(\"ガ\") => \"ga\" ,encode(\"コウ\") => \"ko\" ,encode(\"コオ\") => \"ko\" ,encode(\"コ\") => \"ko\" ,encode(\"ケ\") => \"ke\" ,encode(\"ク\") => \"ku\" ,encode(\"キョ\") => \"kyo\" ,encode(\"キェ\") => \"kye\" ,encode(\"キュ\") => \"kyu\" ,encode(\"キィ\") => \"kyi\" ,encode(\"キャ\") => \"kya\" ,encode(\"キ\") => \"ki\" ,encode(\"カ\") => \"ka\" ,encode(\"オオ\") => \"o\" ,encode(\"オウ\") => \"o\" ,encode(\"ヴォ\") => \"vo\" ,encode(\"ヴェ\") => \"ve\" ,encode(\"ヴィ\") => \"vi\" ,encode(\"ヴァ\") => \"va\" ,encode(\"ヴ\") => \"vu\" ,encode(\"オ\") => \"o\" ,encode(\"エ\") => \"e\" ,encode(\"ウ\") => \"u\" ,encode(\"イ\") => \"i\" ,encode(\"ア\") => \"a\",encode(\"ッ\") => \"l\");\n\t\t//Perform Conversion\n\t\t$string=strtr($string,$cities);\n\t\t$string=strtr($string,$irregular);\n\t\t$string=strtr($string,$trans);\n\t\t$string=strtoupper(substr($string,0,1)) . substr($string,1);\n\t\t$length=strlen($string);\n\t\t//echo \"<br />basic switch $string\";\n\t\t//Remove tsu or \"l\" as it is now written\n\t\tfor ($pos=0;$pos<=$length;$pos++)\n\t\t\t{\n\t\t\t\t$part=substr($string,$pos,1);\n\t\t\t\t$tsu=strstr($part,\"l\");\n\t\t\t\tif ($tsu!==false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$string=substr($string,0,$pos) . substr($string,($pos+1),1) . substr($string,($pos+1));\n\t\t\t\t\t}\n\t\t\t}\n\t\t//echo \"<br />remove tsu $string\";\n\t\t//Add Capital Letters to the start of each place\n\t\t$off=1+strpos($string,\" \");\n\t\twhile ($off!=1)\n\t\t\t{\n\t\t\t\t$string=substr($string,0,$off) . strtoupper(substr($string,$off,1)) . substr($string,($off+1));\n\t\t\t\t$off=1+strpos($string,\" \",$off);\n\t\t\t}\n\t\t//echo \"</br> Capital Letters $string\";\n\t\t//Function to add Hyphens to the end of each word\n\t\t$vowels=array(\"a\",\"e\",\"i\",\"o\",\"u\",\"n\");\n\t\t$stringer=explode(\" \",$string);\n\t\t$count=(count($stringer)-(1+$hyphens));\n\t\tfor ($i=0;$i<=$count;$i++)\n\t\t\t{\n\t\t\t\t$stringer[$i]=hyphenator($stringer[$i],$vowels);\n\t\t\t}\n\t\t$string=implode(\" \",$stringer);\n\t\t//echo \"<br />Hyphens $string\";\n\t\t//Strip off any bracketed areas\n\t\t$string=str_replace(\"ma-chi\",\"machi\",$string);\n\t\tif (strstr($string,encode(\"(\"))!==false) $string=substr($string,0,strpos($string,encode(\"(\"))) . substr($string,(8+strpos($string,encode(\")\"))));\n\t\t//echo \"<br />Final $string\";\n\t\treturn $string;\n\t}", "title": "" } ]
3c54d1e6b5adb5ad3ab2f1a3ac72945c
Operation getPublisherVhostConfigWithHttpInfo Retrieves the specified Publisher configuration
[ { "docid": "27d894bb5d0c6d31259c0d504c42a487", "score": "0.7478399", "text": "public function getPublisherVhostConfigWithHttpInfo($server_name, $vhost_name, $publisher_name)\n {\n $returnType = '\\Swagger\\Client\\Model\\PublisherVhostConfig';\n $request = $this->getPublisherVhostConfigRequest($server_name, $vhost_name, $publisher_name);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\PublisherVhostConfig',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" } ]
[ { "docid": "215edf32dface41eb2f7d98e7355d549", "score": "0.68964297", "text": "public function getPublisherVhostConfigAsyncWithHttpInfo($server_name, $vhost_name, $publisher_name)\n {\n $returnType = '\\Swagger\\Client\\Model\\PublisherVhostConfig';\n $request = $this->getPublisherVhostConfigRequest($server_name, $vhost_name, $publisher_name);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "1c446526e03a73e393b487c01e993185", "score": "0.6528156", "text": "public function getPublishersVhostConfigWithHttpInfo($server_name, $vhost_name)\n {\n $returnType = '\\Swagger\\Client\\Model\\PublishersVhostConfig';\n $request = $this->getPublishersVhostConfigRequest($server_name, $vhost_name);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\PublishersVhostConfig',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "d5903ad1971b3545e5e185a500ab4bd0", "score": "0.607824", "text": "public function postPublisherVhostConfigWithHttpInfo($server_name, $vhost_name, $publisher_name, $body)\n {\n $returnType = '';\n $request = $this->postPublisherVhostConfigRequest($server_name, $vhost_name, $publisher_name, $body);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "da58db190d3a4220e41026388d75e8e1", "score": "0.60530806", "text": "public function getPublisherVhostConfigAsync($server_name, $vhost_name, $publisher_name)\n {\n return $this->getPublisherVhostConfigAsyncWithHttpInfo($server_name, $vhost_name, $publisher_name)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "a815341a112f6bce730526730ad1c339", "score": "0.6048983", "text": "public function getPublisherVhostConfig($server_name, $vhost_name, $publisher_name)\n {\n list($response) = $this->getPublisherVhostConfigWithHttpInfo($server_name, $vhost_name, $publisher_name);\n return $response;\n }", "title": "" }, { "docid": "508bc517212fbfc7f034c029e9630c67", "score": "0.6038133", "text": "public function getPublishersVhostConfigAsyncWithHttpInfo($server_name, $vhost_name)\n {\n $returnType = '\\Swagger\\Client\\Model\\PublishersVhostConfig';\n $request = $this->getPublishersVhostConfigRequest($server_name, $vhost_name);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "48d366aa0f2d1c23719c10fc48ad68fb", "score": "0.594075", "text": "protected function getPublisherVhostConfigRequest($server_name, $vhost_name, $publisher_name)\n {\n // verify the required parameter 'server_name' is set\n if ($server_name === null || (is_array($server_name) && count($server_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $server_name when calling getPublisherVhostConfig'\n );\n }\n // verify the required parameter 'vhost_name' is set\n if ($vhost_name === null || (is_array($vhost_name) && count($vhost_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $vhost_name when calling getPublisherVhostConfig'\n );\n }\n // verify the required parameter 'publisher_name' is set\n if ($publisher_name === null || (is_array($publisher_name) && count($publisher_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $publisher_name when calling getPublisherVhostConfig'\n );\n }\n\n $resourcePath = '/v2/servers/{serverName}/vhosts/{vhostName}/publishers/{publisherName}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($server_name !== null) {\n $resourcePath = str_replace(\n '{' . 'serverName' . '}',\n ObjectSerializer::toPathValue($server_name),\n $resourcePath\n );\n }\n // path params\n if ($vhost_name !== null) {\n $resourcePath = str_replace(\n '{' . 'vhostName' . '}',\n ObjectSerializer::toPathValue($vhost_name),\n $resourcePath\n );\n }\n // path params\n if ($publisher_name !== null) {\n $resourcePath = str_replace(\n '{' . 'publisherName' . '}',\n ObjectSerializer::toPathValue($publisher_name),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'text/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'text/xml', 'application/json'],\n ['application/xml', 'text/xml', 'application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "b5fa43a846d19389a86e827ad1cdb165", "score": "0.58597857", "text": "public function deletePublisherVhostConfigWithHttpInfo($server_name, $vhost_name, $publisher_name)\n {\n $returnType = '';\n $request = $this->deletePublisherVhostConfigRequest($server_name, $vhost_name, $publisher_name);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "25e945141315fd03e9da7b800726af64", "score": "0.5804286", "text": "public function getVHostsConfigWithHttpInfo($server_name)\n {\n $returnType = '\\Swagger\\Client\\Model\\VHostsConfig';\n $request = $this->getVHostsConfigRequest($server_name);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\VHostsConfig',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "b4b7fa20d6e35347c580877571852802", "score": "0.56395555", "text": "public function getVHostConfigWithHttpInfo($server_name, $vhost_name)\n {\n $returnType = '\\Swagger\\Client\\Model\\VHostConfig';\n $request = $this->getVHostConfigRequest($server_name, $vhost_name);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\VHostConfig',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "a7e0f8a9d710c16eef79fa5c54f566d6", "score": "0.5605856", "text": "public function putPublisherVhostConfigWithHttpInfo($server_name, $vhost_name, $publisher_name, $body)\n {\n $returnType = '';\n $request = $this->putPublisherVhostConfigRequest($server_name, $vhost_name, $publisher_name, $body);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "1124e258c6cf33af30384b1cd7951509", "score": "0.5578673", "text": "public function postPublisherVhostConfigAsyncWithHttpInfo($server_name, $vhost_name, $publisher_name, $body)\n {\n $returnType = '';\n $request = $this->postPublisherVhostConfigRequest($server_name, $vhost_name, $publisher_name, $body);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "8df312943e710252bde04a62b4f931e8", "score": "0.5549051", "text": "protected function getPublishersVhostConfigRequest($server_name, $vhost_name)\n {\n // verify the required parameter 'server_name' is set\n if ($server_name === null || (is_array($server_name) && count($server_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $server_name when calling getPublishersVhostConfig'\n );\n }\n // verify the required parameter 'vhost_name' is set\n if ($vhost_name === null || (is_array($vhost_name) && count($vhost_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $vhost_name when calling getPublishersVhostConfig'\n );\n }\n\n $resourcePath = '/v2/servers/{serverName}/vhosts/{vhostName}/publishers';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($server_name !== null) {\n $resourcePath = str_replace(\n '{' . 'serverName' . '}',\n ObjectSerializer::toPathValue($server_name),\n $resourcePath\n );\n }\n // path params\n if ($vhost_name !== null) {\n $resourcePath = str_replace(\n '{' . 'vhostName' . '}',\n ObjectSerializer::toPathValue($vhost_name),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'text/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'text/xml', 'application/json'],\n ['application/xml', 'text/xml', 'application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "f53235c071e0310c54e0ff868f79d26b", "score": "0.539129", "text": "public function getPublishersVhostConfigAsync($server_name, $vhost_name)\n {\n return $this->getPublishersVhostConfigAsyncWithHttpInfo($server_name, $vhost_name)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "ca325b849112ef88e83a46b1424bb7ee", "score": "0.5340991", "text": "public function putPublisherVhostConfigAsyncWithHttpInfo($server_name, $vhost_name, $publisher_name, $body)\n {\n $returnType = '';\n $request = $this->putPublisherVhostConfigRequest($server_name, $vhost_name, $publisher_name, $body);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "4bb1c20c85c5200a6a9b88fb087ece35", "score": "0.5333146", "text": "public function getVHostsConfigAsyncWithHttpInfo($server_name)\n {\n $returnType = '\\Swagger\\Client\\Model\\VHostsConfig';\n $request = $this->getVHostsConfigRequest($server_name);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "50f3f22e94c890ca4408264f74202ca1", "score": "0.52210444", "text": "public function getVHostConfigAsyncWithHttpInfo($server_name, $vhost_name)\n {\n $returnType = '\\Swagger\\Client\\Model\\VHostConfig';\n $request = $this->getVHostConfigRequest($server_name, $vhost_name);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "1e4e07d47b65463e3a27490e816a5e27", "score": "0.51442355", "text": "protected function deletePublisherVhostConfigRequest($server_name, $vhost_name, $publisher_name)\n {\n // verify the required parameter 'server_name' is set\n if ($server_name === null || (is_array($server_name) && count($server_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $server_name when calling deletePublisherVhostConfig'\n );\n }\n // verify the required parameter 'vhost_name' is set\n if ($vhost_name === null || (is_array($vhost_name) && count($vhost_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $vhost_name when calling deletePublisherVhostConfig'\n );\n }\n // verify the required parameter 'publisher_name' is set\n if ($publisher_name === null || (is_array($publisher_name) && count($publisher_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $publisher_name when calling deletePublisherVhostConfig'\n );\n }\n\n $resourcePath = '/v2/servers/{serverName}/vhosts/{vhostName}/publishers/{publisherName}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($server_name !== null) {\n $resourcePath = str_replace(\n '{' . 'serverName' . '}',\n ObjectSerializer::toPathValue($server_name),\n $resourcePath\n );\n }\n // path params\n if ($vhost_name !== null) {\n $resourcePath = str_replace(\n '{' . 'vhostName' . '}',\n ObjectSerializer::toPathValue($vhost_name),\n $resourcePath\n );\n }\n // path params\n if ($publisher_name !== null) {\n $resourcePath = str_replace(\n '{' . 'publisherName' . '}',\n ObjectSerializer::toPathValue($publisher_name),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'text/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'text/xml', 'application/json'],\n ['application/xml', 'text/xml', 'application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'DELETE',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "417cfc8b550176b4c07229cc9808ad00", "score": "0.50111014", "text": "public function postPublishersVhostConfigWithHttpInfo($server_name, $vhost_name, $body)\n {\n $returnType = '';\n $request = $this->postPublishersVhostConfigRequest($server_name, $vhost_name, $body);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "b355885e7e4ea928b13f277e6e56109a", "score": "0.4997928", "text": "public function getPublishersVhostConfig($server_name, $vhost_name)\n {\n list($response) = $this->getPublishersVhostConfigWithHttpInfo($server_name, $vhost_name);\n return $response;\n }", "title": "" }, { "docid": "bd62d6e74c7a646077f9bd0f449ce7e8", "score": "0.49920627", "text": "protected function getVHostConfigRequest($server_name, $vhost_name)\n {\n // verify the required parameter 'server_name' is set\n if ($server_name === null || (is_array($server_name) && count($server_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $server_name when calling getVHostConfig'\n );\n }\n // verify the required parameter 'vhost_name' is set\n if ($vhost_name === null || (is_array($vhost_name) && count($vhost_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $vhost_name when calling getVHostConfig'\n );\n }\n\n $resourcePath = '/v2/servers/{serverName}/vhosts/{vhostName}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($server_name !== null) {\n $resourcePath = str_replace(\n '{' . 'serverName' . '}',\n ObjectSerializer::toPathValue($server_name),\n $resourcePath\n );\n }\n // path params\n if ($vhost_name !== null) {\n $resourcePath = str_replace(\n '{' . 'vhostName' . '}',\n ObjectSerializer::toPathValue($vhost_name),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'text/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'text/xml', 'application/json'],\n ['application/xml', 'text/xml', 'application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "74e052bdad5e695f0d498791673eadce", "score": "0.49846575", "text": "protected function getVHostsConfigRequest($server_name)\n {\n // verify the required parameter 'server_name' is set\n if ($server_name === null || (is_array($server_name) && count($server_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $server_name when calling getVHostsConfig'\n );\n }\n\n $resourcePath = '/v2/servers/{serverName}/vhosts';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($server_name !== null) {\n $resourcePath = str_replace(\n '{' . 'serverName' . '}',\n ObjectSerializer::toPathValue($server_name),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'text/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'text/xml', 'application/json'],\n ['application/xml', 'text/xml', 'application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "28a22b258bc7787e0c07d21efb374cb6", "score": "0.49722832", "text": "public function getVirtualMachineConfig()\n {\n return $this->virtual_machine_config;\n }", "title": "" }, { "docid": "27e63879d0a2a404aa2296c6041233db", "score": "0.49631637", "text": "public function deletePublisherVhostConfigAsyncWithHttpInfo($server_name, $vhost_name, $publisher_name)\n {\n $returnType = '';\n $request = $this->deletePublisherVhostConfigRequest($server_name, $vhost_name, $publisher_name);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "3789c9301830e6cd3093c9eaf54b5263", "score": "0.4949766", "text": "public function getVHostsConfig($server_name)\n {\n list($response) = $this->getVHostsConfigWithHttpInfo($server_name);\n return $response;\n }", "title": "" }, { "docid": "2f493d87bcaa6c151e93dc25a0574c3b", "score": "0.4871287", "text": "public function getVHostConfigAdvWithHttpInfo($server_name, $vhost_name)\n {\n $returnType = '\\Swagger\\Client\\Model\\VHostConfigAdv';\n $request = $this->getVHostConfigAdvRequest($server_name, $vhost_name);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\VHostConfigAdv',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "cbce20a92d6c47e9c3a8eba2773ade84", "score": "0.4831784", "text": "public function getTranscoderConfigWithHttpInfo($server_name, $vhost_name)\n {\n $returnType = '\\Swagger\\Client\\Model\\TranscoderConfig';\n $request = $this->getTranscoderConfigRequest($server_name, $vhost_name);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\TranscoderConfig',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "e7eddeeb624e82d02ec4a3be4368dad7", "score": "0.4828023", "text": "public function postPublishersVhostConfigAsyncWithHttpInfo($server_name, $vhost_name, $body)\n {\n $returnType = '';\n $request = $this->postPublishersVhostConfigRequest($server_name, $vhost_name, $body);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "12d8fb8bbd71170911e8017122cf733b", "score": "0.4819799", "text": "public function getVayantConfig()\n {\n return isset($this->VayantConfig) ? $this->VayantConfig : null;\n }", "title": "" }, { "docid": "297649ffdf3e916ea3760bd6ac554c76", "score": "0.4818532", "text": "protected function postPublisherVhostConfigRequest($server_name, $vhost_name, $publisher_name, $body)\n {\n // verify the required parameter 'server_name' is set\n if ($server_name === null || (is_array($server_name) && count($server_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $server_name when calling postPublisherVhostConfig'\n );\n }\n // verify the required parameter 'vhost_name' is set\n if ($vhost_name === null || (is_array($vhost_name) && count($vhost_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $vhost_name when calling postPublisherVhostConfig'\n );\n }\n // verify the required parameter 'publisher_name' is set\n if ($publisher_name === null || (is_array($publisher_name) && count($publisher_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $publisher_name when calling postPublisherVhostConfig'\n );\n }\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling postPublisherVhostConfig'\n );\n }\n\n $resourcePath = '/v2/servers/{serverName}/vhosts/{vhostName}/publishers/{publisherName}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($server_name !== null) {\n $resourcePath = str_replace(\n '{' . 'serverName' . '}',\n ObjectSerializer::toPathValue($server_name),\n $resourcePath\n );\n }\n // path params\n if ($vhost_name !== null) {\n $resourcePath = str_replace(\n '{' . 'vhostName' . '}',\n ObjectSerializer::toPathValue($vhost_name),\n $resourcePath\n );\n }\n // path params\n if ($publisher_name !== null) {\n $resourcePath = str_replace(\n '{' . 'publisherName' . '}',\n ObjectSerializer::toPathValue($publisher_name),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'text/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'text/xml', 'application/json'],\n ['application/xml', 'text/xml', 'application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "c646d8c1db9690f9ee02c029cb351de8", "score": "0.4807191", "text": "protected function putPublisherVhostConfigRequest($server_name, $vhost_name, $publisher_name, $body)\n {\n // verify the required parameter 'server_name' is set\n if ($server_name === null || (is_array($server_name) && count($server_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $server_name when calling putPublisherVhostConfig'\n );\n }\n // verify the required parameter 'vhost_name' is set\n if ($vhost_name === null || (is_array($vhost_name) && count($vhost_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $vhost_name when calling putPublisherVhostConfig'\n );\n }\n // verify the required parameter 'publisher_name' is set\n if ($publisher_name === null || (is_array($publisher_name) && count($publisher_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $publisher_name when calling putPublisherVhostConfig'\n );\n }\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling putPublisherVhostConfig'\n );\n }\n\n $resourcePath = '/v2/servers/{serverName}/vhosts/{vhostName}/publishers/{publisherName}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($server_name !== null) {\n $resourcePath = str_replace(\n '{' . 'serverName' . '}',\n ObjectSerializer::toPathValue($server_name),\n $resourcePath\n );\n }\n // path params\n if ($vhost_name !== null) {\n $resourcePath = str_replace(\n '{' . 'vhostName' . '}',\n ObjectSerializer::toPathValue($vhost_name),\n $resourcePath\n );\n }\n // path params\n if ($publisher_name !== null) {\n $resourcePath = str_replace(\n '{' . 'publisherName' . '}',\n ObjectSerializer::toPathValue($publisher_name),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'text/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'text/xml', 'application/json'],\n ['application/xml', 'text/xml', 'application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "f190e28955cdbc4689141a0f25649c4c", "score": "0.47860068", "text": "public function getVHostsConfigAsync($server_name)\n {\n return $this->getVHostsConfigAsyncWithHttpInfo($server_name)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "f32effcf633d2d0d2dc5fbb671bfeb5f", "score": "0.47080314", "text": "public function deletePublisherVhostConfig($server_name, $vhost_name, $publisher_name)\n {\n $this->deletePublisherVhostConfigWithHttpInfo($server_name, $vhost_name, $publisher_name);\n }", "title": "" }, { "docid": "d32a362982dff68792c3079402b51708", "score": "0.46840003", "text": "public function getStartupStreamsConfigWithHttpInfo($server_name, $vhost_name)\n {\n $returnType = '\\Swagger\\Client\\Model\\StartupStreamsConfig';\n $request = $this->getStartupStreamsConfigRequest($server_name, $vhost_name);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\StartupStreamsConfig',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "54c8669aa1e25e023d47685de3a5db9d", "score": "0.4681734", "text": "public function getHostSettings()\n {\n return array(\n array(\n \"url\" => \"https://us1.pdfgeneratorapi.com/api/v3\",\n \"description\" => \"No description provided\",\n )\n );\n }", "title": "" }, { "docid": "f6daa3bd8fd3f6a60c5e89700b86f936", "score": "0.46547082", "text": "public function getConfig()\n {\n return $this->publisher->getConfig();\n }", "title": "" }, { "docid": "a59154125ca5c8e331a71e86739b1788", "score": "0.46539992", "text": "public function getHostPortConfigAdvWithHttpInfo($server_name, $vhost_name, $portname)\n {\n $returnType = '\\Swagger\\Client\\Model\\HostPortConfigAdv';\n $request = $this->getHostPortConfigAdvRequest($server_name, $vhost_name, $portname);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\HostPortConfigAdv',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "0bbc845f041e8594fea4d209a7c0d563", "score": "0.46535605", "text": "public function getTranscoderConfigAsyncWithHttpInfo($server_name, $vhost_name)\n {\n $returnType = '\\Swagger\\Client\\Model\\TranscoderConfig';\n $request = $this->getTranscoderConfigRequest($server_name, $vhost_name);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "80b3006b8c3ceae7da809cfe263f154b", "score": "0.46466663", "text": "public function getVHostTuneConfigWithHttpInfo($server_name, $vhost_name)\n {\n $returnType = '\\Swagger\\Client\\Model\\VHostTuneConfig';\n $request = $this->getVHostTuneConfigRequest($server_name, $vhost_name);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\VHostTuneConfig',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "0f5dd7dd373a87149db74a88af56a309", "score": "0.46085358", "text": "public function getVHostConfigAsync($server_name, $vhost_name)\n {\n return $this->getVHostConfigAsyncWithHttpInfo($server_name, $vhost_name)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "9e010971248e709eeafa40d2035d9d26", "score": "0.45865205", "text": "public function getVHostTuneConfigAsyncWithHttpInfo($server_name, $vhost_name)\n {\n $returnType = '\\Swagger\\Client\\Model\\VHostTuneConfig';\n $request = $this->getVHostTuneConfigRequest($server_name, $vhost_name);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "1528342b6091591437de37f1ef4b26cb", "score": "0.45617428", "text": "protected function getVHostConfigAdvRequest($server_name, $vhost_name)\n {\n // verify the required parameter 'server_name' is set\n if ($server_name === null || (is_array($server_name) && count($server_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $server_name when calling getVHostConfigAdv'\n );\n }\n // verify the required parameter 'vhost_name' is set\n if ($vhost_name === null || (is_array($vhost_name) && count($vhost_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $vhost_name when calling getVHostConfigAdv'\n );\n }\n\n $resourcePath = '/v2/servers/{serverName}/vhosts/{vhostName}/adv';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($server_name !== null) {\n $resourcePath = str_replace(\n '{' . 'serverName' . '}',\n ObjectSerializer::toPathValue($server_name),\n $resourcePath\n );\n }\n // path params\n if ($vhost_name !== null) {\n $resourcePath = str_replace(\n '{' . 'vhostName' . '}',\n ObjectSerializer::toPathValue($vhost_name),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'text/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'text/xml', 'application/json'],\n ['application/xml', 'text/xml', 'application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "0eeb9ffa120212d5517c69797e57708a", "score": "0.45391992", "text": "public function getStartupStreamsConfigAsyncWithHttpInfo($server_name, $vhost_name)\n {\n $returnType = '\\Swagger\\Client\\Model\\StartupStreamsConfig';\n $request = $this->getStartupStreamsConfigRequest($server_name, $vhost_name);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "6ad5aa2fdad9418818ac31bf5e8ca70f", "score": "0.45387316", "text": "public function getVHostConfigAdvAsyncWithHttpInfo($server_name, $vhost_name)\n {\n $returnType = '\\Swagger\\Client\\Model\\VHostConfigAdv';\n $request = $this->getVHostConfigAdvRequest($server_name, $vhost_name);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "1608575d12964a021349b1a022c8abce", "score": "0.450333", "text": "public function SiteConfig($host, $siteId)\r\n {\r\n $post_string = '<?xml version=\"1.0\" encoding=\"UTF-8\"?><SiteConfigRequest session-id='.'\"'.$this->getSessionId().'\"'.' site-id='.'\"'.$siteId.'\"'.' ></SiteListingRequest>';\r\n\r\n $data = $this->call($host, $post_string);\r\n\r\n return $data;\r\n }", "title": "" }, { "docid": "2e14e17a0f877d8958e6e5164e3ecb84", "score": "0.44906038", "text": "public function getHostPortsConfigAsyncWithHttpInfo($server_name, $vhost_name)\n {\n $returnType = '\\Swagger\\Client\\Model\\HostPortsConfig';\n $request = $this->getHostPortsConfigRequest($server_name, $vhost_name);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "6318ebb8edc5dfa8a128cbd4a9061e17", "score": "0.44898802", "text": "public function getHostportsTuneConfigAsyncWithHttpInfo($server_name, $vhost_name)\n {\n $returnType = '\\Swagger\\Client\\Model\\HostportsTuneConfig';\n $request = $this->getHostportsTuneConfigRequest($server_name, $vhost_name);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "f56d66fec4b0521dfcd1ef297f193c12", "score": "0.44803378", "text": "public function postPublisherVhostConfig($server_name, $vhost_name, $publisher_name, $body)\n {\n $this->postPublisherVhostConfigWithHttpInfo($server_name, $vhost_name, $publisher_name, $body);\n }", "title": "" }, { "docid": "f6208f8a2e741c1046600fb2083b6990", "score": "0.44731027", "text": "public function getHostPortsConfigWithHttpInfo($server_name, $vhost_name)\n {\n $returnType = '\\Swagger\\Client\\Model\\HostPortsConfig';\n $request = $this->getHostPortsConfigRequest($server_name, $vhost_name);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\HostPortsConfig',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "13cfb837182498c42089f6ee81e918c3", "score": "0.44642892", "text": "public function getHostportsTuneConfigWithHttpInfo($server_name, $vhost_name)\n {\n $returnType = '\\Swagger\\Client\\Model\\HostportsTuneConfig';\n $request = $this->getHostportsTuneConfigRequest($server_name, $vhost_name);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\HostportsTuneConfig',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "43572630ae1c9611f0b373dd643b2ed3", "score": "0.44538715", "text": "public function getHostPortConfigAdvAsyncWithHttpInfo($server_name, $vhost_name, $portname)\n {\n $returnType = '\\Swagger\\Client\\Model\\HostPortConfigAdv';\n $request = $this->getHostPortConfigAdvRequest($server_name, $vhost_name, $portname);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "b1b8faaf90df6fb9b9a22503d349fffb", "score": "0.44446918", "text": "public function virtualHost(): string\n {\n return $this->data['vhost'];\n }", "title": "" }, { "docid": "34a6a44611b8b7e85f45b448b6ff708a", "score": "0.44442713", "text": "public function getVhost()\n {\n return $this->vhost;\n }", "title": "" }, { "docid": "31f12eb9894cf5ff97b8c20104bb7780", "score": "0.44262114", "text": "protected function postPublishersVhostConfigRequest($server_name, $vhost_name, $body)\n {\n // verify the required parameter 'server_name' is set\n if ($server_name === null || (is_array($server_name) && count($server_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $server_name when calling postPublishersVhostConfig'\n );\n }\n // verify the required parameter 'vhost_name' is set\n if ($vhost_name === null || (is_array($vhost_name) && count($vhost_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $vhost_name when calling postPublishersVhostConfig'\n );\n }\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling postPublishersVhostConfig'\n );\n }\n\n $resourcePath = '/v2/servers/{serverName}/vhosts/{vhostName}/publishers';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($server_name !== null) {\n $resourcePath = str_replace(\n '{' . 'serverName' . '}',\n ObjectSerializer::toPathValue($server_name),\n $resourcePath\n );\n }\n // path params\n if ($vhost_name !== null) {\n $resourcePath = str_replace(\n '{' . 'vhostName' . '}',\n ObjectSerializer::toPathValue($vhost_name),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'text/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'text/xml', 'application/json'],\n ['application/xml', 'text/xml', 'application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "269c20754238584a161ba94896fc274f", "score": "0.4398528", "text": "protected function getTranscoderConfigRequest($server_name, $vhost_name)\n {\n // verify the required parameter 'server_name' is set\n if ($server_name === null || (is_array($server_name) && count($server_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $server_name when calling getTranscoderConfig'\n );\n }\n // verify the required parameter 'vhost_name' is set\n if ($vhost_name === null || (is_array($vhost_name) && count($vhost_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $vhost_name when calling getTranscoderConfig'\n );\n }\n\n $resourcePath = '/v2/servers/{serverName}/vhosts/{vhostName}/transcoder';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($server_name !== null) {\n $resourcePath = str_replace(\n '{' . 'serverName' . '}',\n ObjectSerializer::toPathValue($server_name),\n $resourcePath\n );\n }\n // path params\n if ($vhost_name !== null) {\n $resourcePath = str_replace(\n '{' . 'vhostName' . '}',\n ObjectSerializer::toPathValue($vhost_name),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'text/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'text/xml', 'application/json'],\n ['application/xml', 'text/xml', 'application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "dc57f0bc76dd3d93c67c3444956d4b25", "score": "0.4375188", "text": "public function postPublisherVhostConfigAsync($server_name, $vhost_name, $publisher_name, $body)\n {\n return $this->postPublisherVhostConfigAsyncWithHttpInfo($server_name, $vhost_name, $publisher_name, $body)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "b28b48261a4af9bf6bc2423094bd263d", "score": "0.43629083", "text": "public function teamBuilderConfigsGlobalGetWithHttpInfo()\n {\n // parse inputs\n $resourcePath = \"/TeamBuilderConfigs/global\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','application/x-www-form-urlencoded','application/xml','text/xml'));\n\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token');\n if (strlen($apiKey) !== 0) {\n $queryParams['access_token'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'GET',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\TeamBuilderConfig',\n '/TeamBuilderConfigs/global'\n );\n\n return array($this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\TeamBuilderConfig', $httpHeader), $statusCode, $httpHeader);\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\TeamBuilderConfig', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }", "title": "" }, { "docid": "de5c443c3646209e221ddac7744a0fc6", "score": "0.43619946", "text": "public function getVHostConfigAdvAsync($server_name, $vhost_name)\n {\n return $this->getVHostConfigAdvAsyncWithHttpInfo($server_name, $vhost_name)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "8063f5d0420f2a936a1ead7bee2d78a0", "score": "0.43411386", "text": "private function getWebserverConfigs() \n {\n $server = str_replace(array('http://','https://'), '', $this->getServer());\n if (false !== strpos($server, '/')) {\n $pieces = explode('/', $server);\n $server = $pieces[0];\n }\n return array(\n 'home_dir' => realpath(dirname(__FILE__)),\n 'curl_options' => array(\n 'CURLOPT_URL' => $this->getServer().$this->getUri(),\n 'CURLOPT_REFERER' => $this->getHost(),\n ),\n 'curl_headers' => array(\n 'Host: '.$server,\n 'User-Agent: '.$_SERVER['HTTP_USER_AGENT'],\n 'X-Publisher-Id: '.$_SERVER['SERVER_NAME'],\n ),\n );\n }", "title": "" }, { "docid": "64dc97f60f8a296e0fc463a16064ddb8", "score": "0.43384764", "text": "protected function getStartupStreamsConfigRequest($server_name, $vhost_name)\n {\n // verify the required parameter 'server_name' is set\n if ($server_name === null || (is_array($server_name) && count($server_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $server_name when calling getStartupStreamsConfig'\n );\n }\n // verify the required parameter 'vhost_name' is set\n if ($vhost_name === null || (is_array($vhost_name) && count($vhost_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $vhost_name when calling getStartupStreamsConfig'\n );\n }\n\n $resourcePath = '/v2/servers/{serverName}/vhosts/{vhostName}/startupstreams';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($server_name !== null) {\n $resourcePath = str_replace(\n '{' . 'serverName' . '}',\n ObjectSerializer::toPathValue($server_name),\n $resourcePath\n );\n }\n // path params\n if ($vhost_name !== null) {\n $resourcePath = str_replace(\n '{' . 'vhostName' . '}',\n ObjectSerializer::toPathValue($vhost_name),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'text/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'text/xml', 'application/json'],\n ['application/xml', 'text/xml', 'application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "035029168322291119ac782b6dbda4ca", "score": "0.43284476", "text": "public function getHostPortConfigWithHttpInfo($server_name, $vhost_name, $portname)\n {\n $returnType = '\\Swagger\\Client\\Model\\HostPortConfig';\n $request = $this->getHostPortConfigRequest($server_name, $vhost_name, $portname);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\HostPortConfig',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "4b625dc537a7ecbc79c8ef95c7464af4", "score": "0.42785162", "text": "public function getTranscoderTemplateConfigAdvWithHttpInfo($server_name, $vhost_name, $template_name)\n {\n $returnType = '\\Swagger\\Client\\Model\\TranscoderTemplateConfigAdv';\n $request = $this->getTranscoderTemplateConfigAdvRequest($server_name, $vhost_name, $template_name);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\TranscoderTemplateConfigAdv',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "b3078c23344ca84a2aecfd6cc89c8b04", "score": "0.42638183", "text": "public function getTranscoderEncodeConfigAdvWithHttpInfo($server_name, $vhost_name, $template_name, $encode_name)\n {\n $returnType = '\\Swagger\\Client\\Model\\TranscoderEncodeConfigAdv';\n $request = $this->getTranscoderEncodeConfigAdvRequest($server_name, $vhost_name, $template_name, $encode_name);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\TranscoderEncodeConfigAdv',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "2777f70d85be40356016c75b446328ec", "score": "0.42369184", "text": "public function getHostPortConfigAsyncWithHttpInfo($server_name, $vhost_name, $portname)\n {\n $returnType = '\\Swagger\\Client\\Model\\HostPortConfig';\n $request = $this->getHostPortConfigRequest($server_name, $vhost_name, $portname);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "a1fb717ebc7e44eb8aaef23fa3444120", "score": "0.4231128", "text": "public function getTranscoderTemplatesConfigAsyncWithHttpInfo($server_name, $vhost_name)\n {\n $returnType = '\\Swagger\\Client\\Model\\TranscoderTemplatesConfig';\n $request = $this->getTranscoderTemplatesConfigRequest($server_name, $vhost_name);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "3c05598a57a60e725f5c46ce333fe80d", "score": "0.42280298", "text": "public function putPublisherVhostConfigAsync($server_name, $vhost_name, $publisher_name, $body)\n {\n return $this->putPublisherVhostConfigAsyncWithHttpInfo($server_name, $vhost_name, $publisher_name, $body)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "ba739c155c84455e216ea837a14bc21b", "score": "0.42255485", "text": "public function getTranscoderTemplateConfigAdvAsyncWithHttpInfo($server_name, $vhost_name, $template_name)\n {\n $returnType = '\\Swagger\\Client\\Model\\TranscoderTemplateConfigAdv';\n $request = $this->getTranscoderTemplateConfigAdvRequest($server_name, $vhost_name, $template_name);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "f70e80f02a2b2768cd7b5242480a7bda", "score": "0.42234874", "text": "public function deletePublisherVhostConfigAsync($server_name, $vhost_name, $publisher_name)\n {\n return $this->deletePublisherVhostConfigAsyncWithHttpInfo($server_name, $vhost_name, $publisher_name)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "b9c118838cd49b1056d74b424adb4c6a", "score": "0.421164", "text": "protected function getConfig(ServiceLocatorInterface $serviceLocator)\n {\n if ($this->config !== null) {\n return $this->config;\n }\n\n if (!$serviceLocator->has('Config')) {\n $this->config = array();\n return $this->config;\n }\n\n $config = $serviceLocator->get('Config');\n if (!isset($config['mongovc'])\n || !is_array($config['mongovc'])\n ) {\n $this->config = array();\n return $this->config;\n }\n\n $config = $config['mongovc'];\n if (!isset($config['virtual_collections'])\n || !is_array($config['virtual_collections'])\n ) {\n $this->config = array();\n return $this->config;\n }\n\n $this->config = $config['virtual_collections'];\n return $this->config;\n }", "title": "" }, { "docid": "d49d1af7286f8577c85d0d5271f01957", "score": "0.41954753", "text": "public function get_config_for_external() {\n // Return everything (nothing to hide).\n return $this->get_format_options();\n }", "title": "" }, { "docid": "0f816ccf8c5cfa5b72f23eb228939123", "score": "0.41939536", "text": "protected function getCurrentVHostStatisticsRequest($server_name, $vhost_name)\n {\n // verify the required parameter 'server_name' is set\n if ($server_name === null || (is_array($server_name) && count($server_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $server_name when calling getCurrentVHostStatistics'\n );\n }\n // verify the required parameter 'vhost_name' is set\n if ($vhost_name === null || (is_array($vhost_name) && count($vhost_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $vhost_name when calling getCurrentVHostStatistics'\n );\n }\n\n $resourcePath = '/v2/servers/{serverName}/vhosts/{vhostName}/monitoring/current';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($server_name !== null) {\n $resourcePath = str_replace(\n '{' . 'serverName' . '}',\n ObjectSerializer::toPathValue($server_name),\n $resourcePath\n );\n }\n // path params\n if ($vhost_name !== null) {\n $resourcePath = str_replace(\n '{' . 'vhostName' . '}',\n ObjectSerializer::toPathValue($vhost_name),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'text/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'text/xml', 'application/json'],\n ['application/xml', 'text/xml', 'application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "e89cd022b8a46d95c6e277b89e24c4c7", "score": "0.4192979", "text": "public function getTranscoderTemplatesConfigWithHttpInfo($server_name, $vhost_name)\n {\n $returnType = '\\Swagger\\Client\\Model\\TranscoderTemplatesConfig';\n $request = $this->getTranscoderTemplatesConfigRequest($server_name, $vhost_name);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\TranscoderTemplatesConfig',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "741b3b49f8adbdfea1fa988356df0356", "score": "0.41755745", "text": "public function getStreamFilesConfigWithHttpInfo($server_name, $vhost_name)\n {\n $returnType = '\\Swagger\\Client\\Model\\StreamFilesConfig';\n $request = $this->getStreamFilesConfigRequest($server_name, $vhost_name);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\StreamFilesConfig',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "ac3deb40bd45e00fb96a442f2e0a2ea1", "score": "0.41582894", "text": "public function getTranscoderEncodesConfigWithHttpInfo($server_name, $vhost_name, $template_name)\n {\n $returnType = '\\Swagger\\Client\\Model\\TranscoderEncodesConfig';\n $request = $this->getTranscoderEncodesConfigRequest($server_name, $vhost_name, $template_name);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\TranscoderEncodesConfig',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "9284efdc700a5c392421ed3a68cd0585", "score": "0.4157551", "text": "public function getVHostTuneConfigAsync($server_name, $vhost_name)\n {\n return $this->getVHostTuneConfigAsyncWithHttpInfo($server_name, $vhost_name)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "9955915ec265d71576bb069da70d3766", "score": "0.41153196", "text": "public function getConfig(){\n\t\treturn array(\n\t\t\t'url' => $this->url,\n\t\t\t'useSandbox' => $this->useSandbox,\n\t\t\t'apikey' => $this->apikey\n\t\t);\n\t}", "title": "" }, { "docid": "84eb1b8836cbaefa56851ebcf8a0e72a", "score": "0.41148117", "text": "public function getStreamFileConfigAdvWithHttpInfo($server_name, $vhost_name, $streamfile_name)\n {\n $returnType = '\\Swagger\\Client\\Model\\StreamFileConfigAdv';\n $request = $this->getStreamFileConfigAdvRequest($server_name, $vhost_name, $streamfile_name);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\StreamFileConfigAdv',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "7327d96ada92c05912685ee02c1c4d83", "score": "0.40966812", "text": "protected function getVHostTuneConfigRequest($server_name, $vhost_name)\n {\n // verify the required parameter 'server_name' is set\n if ($server_name === null || (is_array($server_name) && count($server_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $server_name when calling getVHostTuneConfig'\n );\n }\n // verify the required parameter 'vhost_name' is set\n if ($vhost_name === null || (is_array($vhost_name) && count($vhost_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $vhost_name when calling getVHostTuneConfig'\n );\n }\n\n $resourcePath = '/v2/servers/{serverName}/vhosts/{vhostName}/tune';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($server_name !== null) {\n $resourcePath = str_replace(\n '{' . 'serverName' . '}',\n ObjectSerializer::toPathValue($server_name),\n $resourcePath\n );\n }\n // path params\n if ($vhost_name !== null) {\n $resourcePath = str_replace(\n '{' . 'vhostName' . '}',\n ObjectSerializer::toPathValue($vhost_name),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'text/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'text/xml', 'application/json'],\n ['application/xml', 'text/xml', 'application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "3829243d8291b86a4c6fec3e661c0114", "score": "0.40920988", "text": "public function getStreamFilesConfigAsyncWithHttpInfo($server_name, $vhost_name)\n {\n $returnType = '\\Swagger\\Client\\Model\\StreamFilesConfig';\n $request = $this->getStreamFilesConfigRequest($server_name, $vhost_name);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "9b7f12a8705d50c885f9d386810ce9dd", "score": "0.40909904", "text": "protected function getHostPortConfigAdvRequest($server_name, $vhost_name, $portname)\n {\n // verify the required parameter 'server_name' is set\n if ($server_name === null || (is_array($server_name) && count($server_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $server_name when calling getHostPortConfigAdv'\n );\n }\n // verify the required parameter 'vhost_name' is set\n if ($vhost_name === null || (is_array($vhost_name) && count($vhost_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $vhost_name when calling getHostPortConfigAdv'\n );\n }\n // verify the required parameter 'portname' is set\n if ($portname === null || (is_array($portname) && count($portname) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $portname when calling getHostPortConfigAdv'\n );\n }\n\n $resourcePath = '/v2/servers/{serverName}/vhosts/{vhostName}/hostports/{portname}/adv';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($server_name !== null) {\n $resourcePath = str_replace(\n '{' . 'serverName' . '}',\n ObjectSerializer::toPathValue($server_name),\n $resourcePath\n );\n }\n // path params\n if ($vhost_name !== null) {\n $resourcePath = str_replace(\n '{' . 'vhostName' . '}',\n ObjectSerializer::toPathValue($vhost_name),\n $resourcePath\n );\n }\n // path params\n if ($portname !== null) {\n $resourcePath = str_replace(\n '{' . 'portname' . '}',\n ObjectSerializer::toPathValue($portname),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'text/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'text/xml', 'application/json'],\n ['application/xml', 'text/xml', 'application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "3a6134439a0ee47d2a7230e810a237a4", "score": "0.40902993", "text": "public function getStartupStreamConfigWithHttpInfo($server_name, $vhost_name, $stream_name, $app_name, $instance_name)\n {\n $returnType = '\\Swagger\\Client\\Model\\StartupStreamConfig';\n $request = $this->getStartupStreamConfigRequest($server_name, $vhost_name, $stream_name, $app_name, $instance_name);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\StartupStreamConfig',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "b20f68523c22c2840decab047ff0e4ed", "score": "0.4085285", "text": "public function getTranscoderTemplateConfigAsyncWithHttpInfo($server_name, $vhost_name, $template_name)\n {\n $returnType = '\\Swagger\\Client\\Model\\TranscoderTemplateConfig';\n $request = $this->getTranscoderTemplateConfigRequest($server_name, $vhost_name, $template_name);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "5447f7fbd77e8bf6884a7ac213a41f3d", "score": "0.4071695", "text": "public function getApiVersion(): string\n {\n return config('global.api_version');\n }", "title": "" }, { "docid": "c06fae357c3be460b2e9e895688e321c", "score": "0.40645242", "text": "public function getTranscoderConfigAsync($server_name, $vhost_name)\n {\n return $this->getTranscoderConfigAsyncWithHttpInfo($server_name, $vhost_name)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "0ea5b5b29fe7cffa50bd95d04598f9e1", "score": "0.4059622", "text": "public function postStartupStreamsConfigAsyncWithHttpInfo($server_name, $vhost_name, $body)\n {\n $returnType = '';\n $request = $this->postStartupStreamsConfigRequest($server_name, $vhost_name, $body);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "737e1724a22f13ad6c0e1854cd73d633", "score": "0.40456304", "text": "protected function getHostPortsConfigRequest($server_name, $vhost_name)\n {\n // verify the required parameter 'server_name' is set\n if ($server_name === null || (is_array($server_name) && count($server_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $server_name when calling getHostPortsConfig'\n );\n }\n // verify the required parameter 'vhost_name' is set\n if ($vhost_name === null || (is_array($vhost_name) && count($vhost_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $vhost_name when calling getHostPortsConfig'\n );\n }\n\n $resourcePath = '/v2/servers/{serverName}/vhosts/{vhostName}/hostports';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($server_name !== null) {\n $resourcePath = str_replace(\n '{' . 'serverName' . '}',\n ObjectSerializer::toPathValue($server_name),\n $resourcePath\n );\n }\n // path params\n if ($vhost_name !== null) {\n $resourcePath = str_replace(\n '{' . 'vhostName' . '}',\n ObjectSerializer::toPathValue($vhost_name),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'text/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'text/xml', 'application/json'],\n ['application/xml', 'text/xml', 'application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "297ac73f26c4b63cc7447cc89acae7ee", "score": "0.4044656", "text": "private function getHttpClientConfig()\n {\n $config = [\n 'base_uri' => 'http://ip-api.com/',\n 'headers' => [\n 'User-Agent' => 'Laravel-GeoIP',\n ],\n 'query' => [\n 'fields' => 16895,\n ],\n ];\n\n // Using the Pro service\n if ($this->getOption('key')) {\n $config['base_uri'] = $this->isSecure() ? 'https://pro.ip-api.com/' : 'http://pro.ip-api.com/';\n $config['query']['key'] = $this->getOption('key');\n }\n\n return $config;\n }", "title": "" }, { "docid": "41876c3bd323bdcba60c67c73ae1ea0b", "score": "0.40419093", "text": "public function getTranscoderTemplateConfigWithHttpInfo($server_name, $vhost_name, $template_name)\n {\n $returnType = '\\Swagger\\Client\\Model\\TranscoderTemplateConfig';\n $request = $this->getTranscoderTemplateConfigRequest($server_name, $vhost_name, $template_name);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\TranscoderTemplateConfig',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "99b7d6116fb1954ad7bc37d53375c013", "score": "0.40383905", "text": "public function getApiHost()\n {\n return $this->hostURL;\n }", "title": "" }, { "docid": "fe378934322b7453482023914bd599b1", "score": "0.4030804", "text": "public function getTranscoderEncodesConfigAsyncWithHttpInfo($server_name, $vhost_name, $template_name)\n {\n $returnType = '\\Swagger\\Client\\Model\\TranscoderEncodesConfig';\n $request = $this->getTranscoderEncodesConfigRequest($server_name, $vhost_name, $template_name);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "4535f3fb6605a04efa6cea70d19621f1", "score": "0.40260282", "text": "public function putPublisherVhostConfig($server_name, $vhost_name, $publisher_name, $body)\n {\n $this->putPublisherVhostConfigWithHttpInfo($server_name, $vhost_name, $publisher_name, $body);\n }", "title": "" }, { "docid": "4712a075aa9c72286a4c3ed381712650", "score": "0.4018777", "text": "public function getSDPFilesConfigAsyncWithHttpInfo($server_name, $vhost_name)\n {\n $returnType = '\\Swagger\\Client\\Model\\SDPFilesConfig';\n $request = $this->getSDPFilesConfigRequest($server_name, $vhost_name);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "57153efe041ccf19c5a75bcdc777671c", "score": "0.4016856", "text": "public function postStartupStreamsConfigWithHttpInfo($server_name, $vhost_name, $body)\n {\n $returnType = '';\n $request = $this->postStartupStreamsConfigRequest($server_name, $vhost_name, $body);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "9bf5193140439e01332d352353c77750", "score": "0.4004511", "text": "public function getTranscoderEncodeConfigAdvAsyncWithHttpInfo($server_name, $vhost_name, $template_name, $encode_name)\n {\n $returnType = '\\Swagger\\Client\\Model\\TranscoderEncodeConfigAdv';\n $request = $this->getTranscoderEncodeConfigAdvRequest($server_name, $vhost_name, $template_name, $encode_name);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "0c4d80eb193ae559362be685b24cf52a", "score": "0.39950153", "text": "public function getInspectConfig()\n {\n return $this->inspect_config;\n }", "title": "" }, { "docid": "0c4d80eb193ae559362be685b24cf52a", "score": "0.39950153", "text": "public function getInspectConfig()\n {\n return $this->inspect_config;\n }", "title": "" }, { "docid": "ab6b55601b10732ff29337a6ea253d41", "score": "0.39636338", "text": "public function getSDPFilesConfigWithHttpInfo($server_name, $vhost_name)\n {\n $returnType = '\\Swagger\\Client\\Model\\SDPFilesConfig';\n $request = $this->getSDPFilesConfigRequest($server_name, $vhost_name);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\SDPFilesConfig',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "fcbfd97a5ef71e2b3e2c9c7757a1e58f", "score": "0.3935857", "text": "public function getConfig() {\n $plugin = new Application_Model_DbTable_Plugins();\n return $plugin->getBySettingsBySystemName('branding');\n }", "title": "" }, { "docid": "f063e582e786bce1d2ee3981792906d7", "score": "0.39291415", "text": "protected function getVHostConfigPath(VHost $vhost)\n {\n return sprintf('%s/sites.d/%s.conf', $this->configsPath, $vhost->getName());\n }", "title": "" }, { "docid": "24b72c2bc6dedc7f8798efaaf588c4eb", "score": "0.39245427", "text": "public function getStartupStreamsConfigAsync($server_name, $vhost_name)\n {\n return $this->getStartupStreamsConfigAsyncWithHttpInfo($server_name, $vhost_name)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" } ]
02c2147bc7a158524746e725ee5c2246
Performs a database query and returns the value of ProgramID based on the value of $ID passed to the function
[ { "docid": "87df45e030ee49610ed80daf1b1e544b", "score": "0.7437979", "text": "public function getProgramID($ID) {\n\t\t$columns = array ('ID');\n\t\t$records = array ($ID);\n\t\t$ProgramID_ = $this->query_from_rep_customfields ( $columns, $records );\n\t\treturn sizeof($ProgramID_)>0 ? $ProgramID_ [0] ['ProgramID'] : null;\n\t}", "title": "" } ]
[ { "docid": "a740fb6c3caa818a042d9dbd26a74686", "score": "0.7936027", "text": "function returnProgram($programID) {\n $sSQL = sprintf(\"SELECT * FROM program WHERE programID = %d\", $programID);\n $result = mysql_query($sSQL);\n return $result;\n}", "title": "" }, { "docid": "9c7158befca09d5d79a418761845ad1a", "score": "0.7005214", "text": "function getProgramID()\n\t{\n\t\treturn $this->program_id;\n\t}", "title": "" }, { "docid": "e0c6252e87b7bc2168129908b5e5cb16", "score": "0.68126094", "text": "public function _getProgramID() {\n\t\treturn $this->_programID;\n\t}", "title": "" }, { "docid": "f15ea5268162dc1875701f5eb5c9650f", "score": "0.67402583", "text": "function getProgramId()\n\t{\n\t\treturn $this->program_id;\n\t}", "title": "" }, { "docid": "c272c83f06eeb34b5c6852aa106e185f", "score": "0.65188295", "text": "function getParentProgramName($programID){\n $sSQL = sprintf(\"SELECT parentID FROM program WHERE programID = %d\", $programID);\n $result = mysql_query($sSQL);\n if (mysql_num_rows($result) == 0){\n return \"\";\n }\n else {\n $tmpParentID = mysql_result($result, 0);\n $sSQL = sprintf(\"SELECT program_name FROM program WHERE programID = %d\", $tmpParentID);\n $result = mysql_query($sSQL);\n if (mysql_num_rows($result) == 0) return \"\";\n else return mysql_result($result, 0);\n }\n}", "title": "" }, { "docid": "34e4f116e7268ac447d9d27e188401fe", "score": "0.64199656", "text": "function getProgramCode()\n {\n // execute query\n $sql = \"SELECT * FROM chlorine_delivery.reference_pilots order by id\";\n return $this->processCDQueries($sql);\n }", "title": "" }, { "docid": "19d1cf1cafd4e153ddcf0feae17d4142", "score": "0.62826276", "text": "function getApp($appID) {\r\n\t$row = good_query_assoc(\"SELECT * FROM applications WHERE id = '$appID' LIMIT 1\");\r\n\treturn $row;\r\n}", "title": "" }, { "docid": "430b923893f8068e39e5e2bc4db92500", "score": "0.6245035", "text": "function getPrevProgramId($db, $pProgramId) {\n $sql = array();\n $sql[] = \"Select `pPr:@SchoolId`,`pPr:SemesterCode`,`pPr:ProgramType`\";\n $sql[] = \" ,`pPr:SchoolYear`,`pPr:DayOfWeek`\";\n $sql[] = \"FROM `pr:program`\";\n $sql[] = \"WHERE `pPr:ProgramId`='$pProgramId'\";\n $query = implode( $sql, ' ');\n //echo '<hr>', $query,'<hr>' ; \n $result = $db->rc_query( $query );\n if ($result === FALSE) {\n kcm_db_CriticalError( __FILE__,__LINE__);\n }\n if ($result->num_rows == 0) {\n exit('System Inconsistency - This program does not exist');\n }\n $row=$result->fetch_array();\n $schoolId = $row['pPr:@SchoolId'];\n $semCode = $row['pPr:SemesterCode'];\n $year = $row['pPr:SchoolYear'];\n $dow = $row['pPr:DayOfWeek'];\n $curProgType = $row['pPr:ProgramType'];\n $curYearSem = $year . $semCode;\n //--- find similar programs\n $maxProgId = getPrevProgramSemesterId($db, $pProgramId, $schoolId, $curProgType, $curYearSem, $dow);\n \n\n if ($maxProgId == 0) {\n $maxProgId = getPrevProgramSemesterId($db, $pProgramId, $schoolId, $curProgType, $curYearSem, NULL);\n }\n return $maxProgId;\n }", "title": "" }, { "docid": "d300bb4db4a53fdec16c7ebcb3cfec2c", "score": "0.61692834", "text": "public function getID($ID,$ProviderID,$ProgramID,$ColumnName,$Description) {\n\t\t$columns = array ('ID','ProviderID','ProgramID','ColumnName','Description');\n\t\t$records = array ($ID,$ProviderID,$ProgramID,$ColumnName,$Description);\n\t\t$ID_ = $this->query_from_rep_customfields ( $columns, $records );\n\t\treturn sizeof($ID_)>0 ? $ID_ [0] ['ID'] : null;\n\t}", "title": "" }, { "docid": "c551c537a47d3eb7c744b6edfe5fc38f", "score": "0.6081672", "text": "function getIdProg($nomeP){\n\tinclude 'connect.php';\n $query = \"SELECT idProgetto from progetto WHERE nome='$nomeP'\";\n \n $result = mysqli_query($conn, $query);\n $row = mysqli_fetch_assoc($result);\n \n mysqli_close($conn);\n return $row['idProgetto'];\n}", "title": "" }, { "docid": "e94fb3cfd4a7c9852086ca6d439a5b03", "score": "0.6047931", "text": "function getBudget_FY_Program($programID, $fiscal_year){\n\n $sSQL = sprintf(\"SELECT budget FROM fy_budget WHERE fiscal_year = '%s' AND programID = %d\", $fiscal_year, $programID);\n $result = mysql_query($sSQL);\n if (!mysql_num_rows($result)) return 0;\n else return mysql_result($result, 0);\n}", "title": "" }, { "docid": "506a0e68a9bfb414fb827671fff73c43", "score": "0.60393363", "text": "function returnProgramListing($programID, $programType){\n if ($programID == 0) {\n //0 means bring back parent level programs\n if ($programType > 0) $tmpProgramFilter = \" AND programTypeID = \" . $programType;\n else $tmpProgramFilter = \"\";\n $sSQL = sprintf(\"SELECT * FROM program WHERE parentID is NULL %s ORDER BY programID\", $tmpProgramFilter);\n }\n else {\n //get subprograms of a parent\n $sSQL = sprintf(\"SELECT * FROM program WHERE parentID = %d ORDER BY programID\", $programID);\n }\n\n $result = mysql_query($sSQL);\n\n //Can't find any sub-level programs, must need ONLY one program.\n if (mysql_num_rows($result) == 0 ){\n $sSQL = sprintf(\"SELECT * FROM program WHERE programID = %d\", $programID);\n $result = mysql_query($sSQL);\n }\n\n\n return $result;\n}", "title": "" }, { "docid": "29e35796443ea9ab17fd67e24362732a", "score": "0.6002247", "text": "public function findPrograma($idPrograma) {\n $lista = $this->_config->enumeraciones->programas_computo->toArray();\n foreach ($lista as $key => $value) {\n if ($key == $idPrograma) {\n return $value;\n }\n }\n }", "title": "" }, { "docid": "3f90a2a6080f18d674e640d01116bd77", "score": "0.5943165", "text": "private function getProgramme() {\r\n $sql = 'SELECT programme FROM utilisateur WHERE identifiant = ?';\r\n $donnees = $this->executerRequete($sql, array($_SESSION['identifiant']));\r\n $donnees = $donnees->fetch();\r\n $this->programme = $donnees['programme'];\r\n return $this->programme;\r\n }", "title": "" }, { "docid": "f4601977bd21b043eaee5ec4d6aecc76", "score": "0.59124744", "text": "public function Lister_ID($id){\n include('ConnectionBD.php');\n $stmt = $BDD->prepare(\"SELECT * from programme where ID=?\");\n $stmt->execute(array($id)); \n return $stmt;\n $stmt->closeCursor();\n }", "title": "" }, { "docid": "7d58350dea60a74285e238a315e9a0b6", "score": "0.58588463", "text": "function returnSingleValue($TABLE_NAME,$SELECTED_FIELD,$COMPARE_FIELD,$id){\n global $dbh;\n $stmt = $dbh->prepare(\"SELECT * FROM \".$TABLE_NAME.\" WHERE \".$COMPARE_FIELD.\"=?\");\n $stmt->execute([$id]); \n $rcourse = $stmt->fetch();\n return $rcourse[\"$SELECTED_FIELD\"];\n}", "title": "" }, { "docid": "e45c0bcbbc07d1c84a724b30212c1fc0", "score": "0.58502215", "text": "function GetIDofFirst()\r\n {\r\n global $COMMON;\r\n $testQuery = \"SELECT * FROM `ProjectDB` LIMIT 1\";\r\n $return = $COMMON->executeQuery($testQuery, $this);\r\n $countRows = $return->fetch(PDO::FETCH_ASSOC);\r\n return $countRows['id'];\r\n\r\n }", "title": "" }, { "docid": "c165c977dc786306d7257a62421b8ed9", "score": "0.5844695", "text": "public function getProgram() {\r\n if($this->program_id > 0) {\r\n return $this->getProgramName($this->program_id);\r\n } else {\r\n return '';\r\n }\r\n }", "title": "" }, { "docid": "a49b9415766077097f152c6619c2d1af", "score": "0.5814575", "text": "function ipal_current_question_code($ipal_id){\r\n global $DB;\r\n if($DB->record_exists('ipal_active_questions', array('ipal_id'=>$ipal_id))){\r\n $question=$DB->get_record('ipal_active_questions', array('ipal_id'=>$ipal_id));\r\n return($question->id);\r\n }\r\nreturn(0); \r\n\r\n}", "title": "" }, { "docid": "21698fb260df75804f2d740e5cd2ab4a", "score": "0.5788127", "text": "public function getCurrentId() {\r\n\t\t\r\n\t\t$sch = SCHEDULE_TABLE;\r\n\t\t\r\n\t\t$query = \"SELECT schedule_id FROM $sch ORDER BY schedule_id DESC LIMIT 0,1\";\r\n\t\t\t\r\n\t\t\r\n\t\t$Resultset = $this->executeQuery($query);\r\n\t\t\r\n\t//\techo \"herea\";\r\n\t\t\r\n\t\t$data = $Resultset->fetchRow();\r\n\t\t\r\n\t//\techo \"hereb\";\r\n\t\treturn $data[0];\r\n\t\t\r\n\t}", "title": "" }, { "docid": "ae624a84a0f4464a3ee4ce3f1da904ef", "score": "0.57679975", "text": "function getDealProject($did)\n{\n $did = intval($did);\n global $DB;\n $select = 'select * from m_deal_project where DEAL_ID=\"'.$DB->ForSQL($did).'\" limit 1';\n $result = $DB->Query($select);\n $pid = null;\n if ($row = $result->Fetch()) {\n $pid = intval($row['PROJECT_ID']);\n }\n\n return $pid;\n}", "title": "" }, { "docid": "75f007417691d601682420884b8d1b48", "score": "0.5746448", "text": "function GetActualPatientID($labid) {\n $samplequery = mysql_query(\"SELECT patient FROM samples where ID='$labid' \") or die(mysql_error());\n $dd = mysql_fetch_array($samplequery);\n $patient = $dd['patient'];\n\n return $patient;\n}", "title": "" }, { "docid": "eabb495cf2472746f5dfa8333654d208", "score": "0.5739242", "text": "function get_rr_num ($ID) {\n\t$rr_num = db_single_val(\"SELECT rr_num as single_val FROM users WHERE ID = '\".$ID.\"'\"); \n\treturn $rr_num;\n}", "title": "" }, { "docid": "f9e28cc91b9a005d5169bb73fd2736c0", "score": "0.57064766", "text": "function get_id(){\n \tif($this->debug>1){error_log('New LP - In learnpathItem::get_id()',0);}\n \tif(!empty($this->db_id))\n \t{\n \t\treturn $this->db_id;\n \t}\n \t//TODO check this return value is valid for children classes (SCORM?)\n \treturn 0;\n }", "title": "" }, { "docid": "166442fb050356a40d730cec1b5ff8d1", "score": "0.5705371", "text": "public function prepareProgram($programId) {\n\t\t\t\t\n\t\treturn $this->_sendRequest($this->_domain.'Program/program/program/'.(int) $programId, 'GET');\n\t\t}", "title": "" }, { "docid": "8459d401539036654cc690d2b656a5c2", "score": "0.5688554", "text": "public function get_ID();", "title": "" }, { "docid": "1e064cea4cb7d12fa61e91c24ad56dc0", "score": "0.5679295", "text": "function get_one_game($gameID) {\n $selectonegame = \"SELECT * FROM game WHERE gameID='\" . $_GET['gameID'] . \"'\";\n include 'connect.php';\n $stmt = $conn->prepare($selectonegame);\n $result = $stmt->execute();\n return $stmt->fetch(PDO::FETCH_ASSOC);\n}", "title": "" }, { "docid": "7c95ec178d0a03ec8f70ff7b613a7b91", "score": "0.567149", "text": "public function getEventID(){\n $sqlQuery = \"SELECT ID\n FROM\n \". $this->db_table .\"\n WHERE \n EVENT_ID = ?\";\n $stmt = $this->conn->prepare($sqlQuery);\n\n $stmt->bindParam(1, $this->event_id, PDO::PARAM_STR);\n $stmt->execute();\n return $stmt;\n \n }", "title": "" }, { "docid": "725380c11146ad66e28aa9e366a88768", "score": "0.5653916", "text": "function get_assignID($name, $course) {\n $sql = \"SELECT * FROM `assignment` WHERE CourseID=? AND AssignmentName=?\";\n $query = MySQL::getInstance()->prepare($sql);\n $query->execute(array($course, $name));\n return $query->fetchAll(PDO::FETCH_ASSOC);\n}", "title": "" }, { "docid": "a0fae5a1233b3ae7dd54551e4469d111", "score": "0.56454784", "text": "function getUserLanguageID($id)\n{\n $conn = connectToDB();\n $query = \"SELECT languageID FROM UserLanguage WHERE userID = '\".$id.\"';\";\n $result = mysqli_query($conn, $query);\n $row = mysqli_fetch_assoc($result);\n $id = $row['languageID'];\n return $id;\n}", "title": "" }, { "docid": "3e823c05b4b5d861138cbf5518d501c3", "score": "0.5643157", "text": "function chat_id($chat_no)\n{\n\t$chat_no = db_escape($chat_no);\n $result = db_query(\"SELECT `ID` FROM `chat_room` WHERE `id_hash` = '$chat_no' LIMIT 1\");\n if (mysqli_num_rows($result) == 1) {\n $row = mysqli_fetch_assoc($result);\n\n return $row['ID'];\n }\n}", "title": "" }, { "docid": "930ca34cb07fafe30e59d298b1ce6207", "score": "0.5639507", "text": "public function getID();", "title": "" }, { "docid": "930ca34cb07fafe30e59d298b1ce6207", "score": "0.5639507", "text": "public function getID();", "title": "" }, { "docid": "930ca34cb07fafe30e59d298b1ce6207", "score": "0.5639507", "text": "public function getID();", "title": "" }, { "docid": "930ca34cb07fafe30e59d298b1ce6207", "score": "0.5639507", "text": "public function getID();", "title": "" }, { "docid": "930ca34cb07fafe30e59d298b1ce6207", "score": "0.5639507", "text": "public function getID();", "title": "" }, { "docid": "6653025e9887d6782b5a850ef0f2ba36", "score": "0.56160694", "text": "function getId()\n {\n global $debug;\n global $warn;\n\n if (!is_string($this->prime) || strlen($this->prime) == 0)\n return null;\n $retval = $this->row[$this->prime];\n \n if (is_null($retval) ||\n (is_string($retval) && strlen($retval) == 0))\n {\n if ($debug)\n $warn .= \"<p>Record::getId: table \" . $this->table .\n \" does not have a unique primary key</p>\\n\";\n return null;\n }\n\n if ($this->needInsert && $retval == 0)\n {\n if ($debug)\n $warn .= \"<p>Record::getId: table \" . $this->table .\n \" record does not exist in database</p>\\n\";\n error_log(\"Record::getId: table \" . $this->table .\n \" record does not exist in database\");\n return null;\n }\n return $retval;\n }", "title": "" }, { "docid": "c71841d1cefa85bd5fa84606e347769e", "score": "0.56140304", "text": "function getDIIDfromLearnerID($profileID){\n\t$db = new database;\t//------ Establish connection with the database.\n\t\n\t$result = $db->query(\"SELECT `di_id` FROM `learner` WHERE `learner_id` = '$profileID';\");\t//------ Query the database table.\n\t\n\treturn $result[0][di_id];\t//------ Returns the DI's profile ID if the Learner Driver is associated with a DI. Otherwise, it returns blank.\n}", "title": "" }, { "docid": "f66b85b69cbc3eba7308e53d44e21697", "score": "0.55964947", "text": "public function GetID () \r\n\t{\r\n\t\treturn ($ID);\r\n\t}", "title": "" }, { "docid": "869a0868395fa141167e74657393fe23", "score": "0.5590913", "text": "function getRecordId($project_id, $event_id, $primary_key_field, $primary_key_value)\n {\n $query_string = sprintf(\n \"SELECT record FROM redcap_data\n WHERE\n project_id=%u\n AND event_id=%u\n AND field_name=%s\n AND value=%s\",\n $project_id, $event_id, checkNull($primary_key_field), checkNull($primary_key_value)\n );\n $result = db_query($query_string);\n if($row=db_fetch_object($result)) return $row->record;\n return;\n }", "title": "" }, { "docid": "c37b4eeab22e09e5e870570c18a45330", "score": "0.5585992", "text": "function getLanguageName($langID)\n{\n $conn = connectToDB();\n $query = \"SELECT languageName FROM Language WHERE languageID = '\".$langID.\"';\";\n $result = mysqli_query($conn, $query);\n $row = mysqli_fetch_assoc($result);\n $langName = $row['languageName'];\n return $langName;\n}", "title": "" }, { "docid": "83a4ac857aab21f9c06c05a115130980", "score": "0.55797327", "text": "function getID()\n{\n $theID = isset($_GET['ID'])\n ? $_GET['ID']\n : null;\n return $theID;\n}", "title": "" }, { "docid": "9d0ece724004e9a4134c63d26c6cf543", "score": "0.557501", "text": "function getLastID()\n{\n global $connection;\n global $getVoorwerpNummerQuery;\n return sendtoDatabase2($getVoorwerpNummerQuery);\n}", "title": "" }, { "docid": "52cf2a7f7524b987c579001647b4bf5e", "score": "0.5568799", "text": "private function doProgramServiceGet($id) {\n // Create the soap client for the program service\n //$soapClient = new SoapClient($this->soapUrl.$this->programUri);\n \n // Create the id argument for the soap client\n //$soapArgs = new SoapArguments();\n //$soapArgs->addStringArgument('id', $id);\n \n // Query the server and capture the result\n //$soapResult = $soapClient->Get($soapArgs)->GetResult;\n \n $request = \"http://72.54.98.142/sql.php?view=program&format=json&id=\" . $id;\n $response = file_get_contents($request);\n //print_r(json_decode(htmlentities($programs)));\n \n $programs = json_decode($response);\n //print_r($programs);\n //die();\n // Only process the result if there actually was one.\n // The receiver should expect a null value if there\n // was no result.\n //$programModel = null;\n //if(!is_null($soapResult)) {\n // $programModel = $this->convertProgramModel($soapResult);\n //}\n \n return $programs[0];\n }", "title": "" }, { "docid": "20e5eb179f95947359fa818e2b32d18a", "score": "0.5562782", "text": "public function getUserID() {\n\t\t\t\n\t\t\t// Check to see if the user is currently logged in\n\t\t\t$username = \"\";\n\t\t\tif (isset($_SESSION['username'])) {\n\t\t\t\t$username = $_SESSION['username'];\n\t\t\t}\n\t\t\t\n\t\t\t// Set the initial status\n\t\t\t$rvalue = Engine::DATABASE_ERROR_COULD_NOT_ACCESS_DATABASE;\n\t\t\t\n\t\t\t// Check to ensure that a database module is installed\n\t\t\tif ($this->isModuleInstalled(Engine::FEATURE_SUPPORT_DATABASE)) {\n\t\t\t\t\n\t\t\t\t// Query the database to get the user ID\n\t\t\t\t$result = $this->modules[$this->database_module]->queryDatabase(\"SELECT id FROM scms_accounts WHERE username = '\".$username.\"';\");\n\t\t\t}\n\t\t\t\n\t\t\t// Check to see if there are results\n\t\t\tif (count($result) > 0) {\n\t\t\t\t\n\t\t\t\t// Loop through the results and get the user ID\n\t\t\t\tforeach ($result as $resultrow) {\n\t\t\t\t\t$userid = $resultrow[0];\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$rvalue = $userid;\n\t\t\t} else {\n\t\t\t\t$rvalue = Engine::DATABASE_ERROR_NO_QUERY_RESULTS;\n\t\t\t}\n\t\t\t\n\t\t\t// Return the result\n\t\t\treturn $rvalue;\n\t\t}", "title": "" }, { "docid": "163b1aaa64729dd5835655a4f5fa5374", "score": "0.55459017", "text": "function get_app_data($val) {\n\tglobal $mysqli;\n\t$q = 'SELECT '.$val.' FROM apps WHERE id = \"'.get_app_info('app').'\" AND userID = '.get_app_info('main_userID');\n\t$r = mysqli_query($mysqli, $q);\n\tif ($r && mysqli_num_rows($r) > 0)\n\t{\n\t while($row = mysqli_fetch_array($r))\n\t {\n\t\t\treturn $row[$val];\n\t } \n\t}\n}", "title": "" }, { "docid": "01a24f463d894c599d03dbd721e89654", "score": "0.55407566", "text": "function getImageId($imageProject) {\n $db = get_db();\n $query = 'SELECT image_id FROM image WHERE image_project = :image_project';\n $stmt = $db->prepare($query);\n $stmt->bindValue(':image_project', $imageProject);\n $stmt->execute();\n $imageId = $stmt->fetch();\n $stmt->closeCursor();\n return $imageId['image_id'];\n}", "title": "" }, { "docid": "492d11a1b4110fa9e0073d15b674877f", "score": "0.55364394", "text": "public function obtenerID();", "title": "" }, { "docid": "209c0131c7a0a8c82097ac462a76ad3e", "score": "0.5528608", "text": "abstract public function get_id();", "title": "" }, { "docid": "58676cb2c283f326866cfe0592453c7d", "score": "0.55157596", "text": "function getAlternativeID($no_urut) {\r\n\tinclude('config.php');\r\n\t$query = \"SELECT id FROM alternative ORDER BY id\";\r\n\t$result = mysqli_query($shobhit, $query);\r\n\r\n\twhile ($row = mysqli_fetch_array($result)) {\r\n\t\t$listID[] = $row['id'];\r\n\t}\r\n\r\n\treturn $listID[($no_urut)];\r\n}", "title": "" }, { "docid": "5746200bd8a0fbeeefdaf56834295d79", "score": "0.5502737", "text": "function get_dbid($rownr){return $this->rowstorage->get_dbid($rownr);}", "title": "" }, { "docid": "ab6bf53047307d39b853162a37fb0638", "score": "0.54895395", "text": "public function getProjectID()\r\n\t{\r\n\t \r\n\t $sql=\"SELECT\r\n\t\t\t\tp_id\r\n\t\t\t\tFROM projet\r\n\t\t\t\tORDER BY p_id DESC\";\r\n\t $query = $this->db->query($sql);\r\n\t $id=$query->result_array();\r\n\t $lastiddatasource=$id[0][\"p_id\"];\r\n\t return $lastiddatasource;\r\n\t}", "title": "" }, { "docid": "da9687c094f117df08e590db72a5662b", "score": "0.54890215", "text": "function get_parcel_id($conn, $block_num, $parcel_num){\n\n\t$query = \"SELECT parcel_id FROM humanface.parcels WHERE parcel_no='$parcel_num' AND block_no='$block_num';\";\n\n\t$result = pg_query($conn, $query);\n\n\tif (pg_num_rows($result) > 0) {\n \twhile($row = pg_fetch_assoc($result)) {\n \t\t$id = $row[\"parcel_id\"];\n \t}\n\t} else {\n\t\t$insert_query = \"INSERT INTO humanface.parcels (block_no, parcel_no) VALUES ('$block_num', '$parcel_num') RETURNING parcel_id;\";\n\n\t\t$r = pg_query($conn, $insert_query);\n\t\t$row = pg_fetch_row($r);\n\n\t\t//write array to variable $user_id\n\t\treturn $row[0];\n\t}\n\treturn $id;\n}", "title": "" }, { "docid": "9f22402908e261f492dda37a413910dd", "score": "0.5486854", "text": "function getAdmissionSessionID($session_id,$campus_id,$program_type_id){\n\t\t$this->legacy_db = $this->load->database(\"admission_db\",true);\n\t\t$this->legacy_db->from('admission_session ass');\n\t\t$this->legacy_db->join('sessions AS s', 's.SESSION_ID = ass.SESSION_ID');\n\t\t$this->legacy_db->join('campus AS c', 'c.CAMPUS_ID = ass.CAMPUS_ID');\n\t\t$this->legacy_db->join('program_type AS pt', 'pt.PROGRAM_TYPE_ID= ass.PROGRAM_TYPE_ID');\n\t\t$this->legacy_db->where('ass.SESSION_ID',$session_id);\n\t\t$this->legacy_db->where('ass.CAMPUS_ID',$campus_id);\n\t\t$this->legacy_db->where('ass.PROGRAM_TYPE_ID',$program_type_id);\n\t\treturn $this->legacy_db->get()->row_array();\n\t}", "title": "" }, { "docid": "7d5d96f8f7e0dc8053873387867fa728", "score": "0.5483668", "text": "function getSchool($schoolID) {\r\n\t$row = good_query_assoc(\"SELECT * FROM schools WHERE id = '$schoolID' LIMIT 1\");\r\n\treturn $row;\r\n}", "title": "" }, { "docid": "146cb23df00c3cef102aae937c0112f6", "score": "0.5476172", "text": "function getInfoByCourseID($id){\n checkConnectivity();\n\n $query =sprintf(\"select * from course where ID = %s\",$id);\n $result =mysqli_query($GLOBALS['connection_link'],$query);\n if ($row = mysqli_fetch_assoc($result)) {\n return $row;\n }\n return false;\n }", "title": "" }, { "docid": "85a2ba8692c57bac5ae8287b5f64fa42", "score": "0.54611826", "text": "function get_project_id($prj_id){\n\tinclude('com_momax/functions/path.php');\n\t$found_user_id = \"\";\n\t$result=mysql_query(\"select user_id from $db_transaction where project_id='$prj_id'\") or die(mysql_error());\n\twhile($row = mysql_fetch_array($result)){\n\t\t$found_user_id = $row['user_id'];\n\t}\n\treturn $found_user_id;\n}", "title": "" }, { "docid": "16470b50f93c09282603db0b8792a8a8", "score": "0.5453704", "text": "function\tretrieve_item_datas($ID)\n{\n\tglobal $conn;\n\t$sql = 'SELECT * FROM items WHERE id = \"'.$ID.'\"';\n\t$datas = mysqli_query($conn, $sql);\n\t$row = mysqli_fetch_array($datas);\n\treturn ($row);\n}", "title": "" }, { "docid": "78356783e467d3214c2f065527e22b4e", "score": "0.5452145", "text": "function get_game_id($game_name) {\n $db = open_db();\n $query = \"SELECT * FROM games WHERE game_name = :game_name\";\n $stmt = $db->prepare($query);\n $stmt->bindParam(\":game_name\", $game_name);\n if(!$stmt->execute()) {\n close_db();\n print_r($stmt->errorinfo());\n return -1;\n }\n $result = $stmt->fetchAll();\n close_db();\n foreach ($result as $row) {\n return intval($row[\"game_id\"]);\n }\n return -1;\n}", "title": "" }, { "docid": "6c5a9e665006b68f8728fcd00d4a401e", "score": "0.54459167", "text": "function getUserID($name)\r\n{\r\n\tglobal $mysql_users_table, $db;\r\n\r\n\t$sql = \"select id from $mysql_users_table where user_name='$name'\";\r\n\t$result = $db->query($sql);\r\n\t$row = $db->fetch_row($result);\r\n\r\n\treturn $row[0];\r\n\r\n}", "title": "" }, { "docid": "a1b998dd4251c0a59c4e8671544d79de", "score": "0.5438233", "text": "private function getPressroomId()\n {\n global $core;\n if (isset($_GET['proomid'])) {\n $proomid = (is_numeric($_GET['proomid']) && $_GET['proomid'] > -1) ? intval($_GET['proomid']) : false;\n $proomid = sanitize($proomid);\n\n if ($proomid == false) {\n $core->error(\"You have selected an Invalid EventId\", \"eventManager::getEventId()\");\n } else\n return $this->proomid = $proomid;\n }\n }", "title": "" }, { "docid": "a42ffe064437d14d5f90d7119769dbcb", "score": "0.5433626", "text": "function queryGenero($idGenero){\n global $db; \n $dataQuery = \"\";\n \n $db->where('id_genero', $idGenero); \n $queryTbl = $db->getOne (\"genero_tbl\", \"nombre_genero\");\n $dataQuery = $queryTbl['nombre_genero'];\n \n return $dataQuery; \n}", "title": "" }, { "docid": "65632cbfe983940536aadc8cd475e991", "score": "0.5420216", "text": "function getLocationID($location_name) {\n $conn = getDB();\n $stmt = $conn->prepare(\"SELECT * FROM Location WHERE name=:location_name\");\n $stmt->bindParam(':location_name', $location_name);\n $stmt->execute();\n $result = $stmt->fetchAll();\n closeDB($conn);\n return $result;\n}", "title": "" }, { "docid": "4e55125c9dedbfe9fb0143c2ac9ecbc2", "score": "0.5419369", "text": "public function getProgram($id) {\n $id = (int) $id;\n $rowset = $this->select(array('id' => $id));\n\n $row = $rowset->current();\n if (!$row) {\n throw new \\Exception(\"Could not find row $id\");\n }\n $program = new Program();\n $program->exchangeArray($row);\n return $program;\n }", "title": "" }, { "docid": "89ff4fb109f877041262af1d782aeee5", "score": "0.5415296", "text": "public function sel_next_prog_id()\r\n\t{\r\n\t\t$prog_id = null;\r\n\t\ttry{\r\n\t\t\t$t_prog = new Model_T_Prog($this->db, $this->client_id);\r\n\t\t\t$prog_id = $t_prog->sel_next_id();\r\n\t\t} catch(Exception $e){\r\n\t\t\tKohana::$log->add(Log::ERROR, Kohana_Exception::text($e))->write();\r\n\t\t\t$prog_id = null;\r\n\t\t}\r\n\t\treturn $prog_id;\r\n\t}", "title": "" }, { "docid": "91d94423f7a005ed4f59932be52151d4", "score": "0.54089046", "text": "function getValueFromID($table, $id, $field)\n{\n $result = do_mysql_query(\"SELECT * FROM $table WHERE ID=$id\");\n $tempOutput = \"\";\n\t\n\twhile ($row = mysql_fetch_array($result)) {\n $tempOutput = $row[$field];\n } \n\n return $tempOutput;\n}", "title": "" }, { "docid": "f37ce826573078906294dc90a05c0882", "score": "0.54071677", "text": "function regist_ID($P,$db){\r\n\t\t$sql = \"SELECT PHONE FROM `PHONE` WHERE PHONE = ?\";\r\n\t\t$sth = $db->prepare($sql);\r\n\t\t$sth->execute(array($P));\r\n\t\t$row = $sth->fetchObject();\r\n\t\tif(isempty($row)){\r\n\t\t\t$sql = \"INSERT INTO PHONE (PID, PHONE) \r\n\t\t\t\t\tVALUES (NULL, ?) ON DUPLICATE KEY UPDATE PID=PID\";\r\n\t\t\t$sth = $db->prepare($sql);\r\n\t\t\t$sth->execute(array($P);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "42fe235a53d78d5345c2ff49e0996d12", "score": "0.5399057", "text": "function getProjectId($projectTitle) {\n $db = get_db();\n $query = 'SELECT project_id FROM project WHERE project_title = :project_title';\n $stmt = $db->prepare($query);\n $stmt->bindValue(':project_title', $projectTitle);\n $stmt->execute();\n $projectId = $stmt->fetch();\n $stmt->closeCursor();\n\n return $projectId['project_id'];\n}", "title": "" }, { "docid": "98880560a0a5755e22e9e1a23d272cd0", "score": "0.53987664", "text": "function getDIIDFromFeeID($feeID){\n\t$db = new database;\t//------ Establish connection with the database.\n\n\t$result = $db->query(\"SELECT `di_id` FROM `fee` WHERE `fee_id` = '$feeID';\");\t//------ Query the database table.\n\n\treturn $result[0][di_id];\t//------ Returns the ID of the driving instructor.\n}", "title": "" }, { "docid": "deef30f112d02b7b6ae2b2f35131374b", "score": "0.53938633", "text": "public function get_id();", "title": "" }, { "docid": "deef30f112d02b7b6ae2b2f35131374b", "score": "0.53938633", "text": "public function get_id();", "title": "" }, { "docid": "deef30f112d02b7b6ae2b2f35131374b", "score": "0.53938633", "text": "public function get_id();", "title": "" }, { "docid": "83bd90b0c58b9da098d421e240231396", "score": "0.53899086", "text": "function insert($program){\n if($this->db->insert('mysharing', $program)){\n \treturn $this->db->insert_id();\n }else{\n \treturn false;\n }\n }", "title": "" }, { "docid": "b790c15d7da71e2f03b81ecb36253191", "score": "0.5387683", "text": "function select_id($TB_Name,$F_Name,$F_id){\n\t\t$sql = \"SELECT * FROM \".$TB_Name.\" WHERE \".$F_Name.\" = \".$F_id.\"\";\n\t\t$db = db_query($sql);\n\t\t$GLOBALS['row'] = mysqli_fetch_object($db);\n\t\treturn $sql;\n\t}", "title": "" }, { "docid": "acb4e4348c633f274ad2c6daad1fa179", "score": "0.5381564", "text": "function getLastProjectId(){\n\tinclude 'connect.php';\n\t$query = \"SELECT MAX(idProgetto) AS id FROM progetto\";\n \n $result = mysqli_query($conn, $query);\n $row = mysqli_fetch_assoc($result);\n \n mysqli_close($conn);\n return $row['id'];\n}", "title": "" }, { "docid": "d07e174852432f5633843c1dd63f9f22", "score": "0.5378976", "text": "function getProjectById($projID) {\n\t\tglobal $dbh;\n\t\t$stmt = $dbh->prepare('SELECT projID, description, date_due FROM PROJECT WHERE projID = ?');\n $stmt->execute(array($projID));\n return $stmt->fetch();\n\t}", "title": "" }, { "docid": "9b80e05883ccc00211a4de7557bf27c1", "score": "0.5374106", "text": "function getapplications($Condition,$CI){\r\n //select program\r\n $progm=$CI->db->get_where('programs',$Condition);\r\n foreach ($progm->result() as $row) {\r\n return $row->program_name;\r\n }\r\n}", "title": "" }, { "docid": "113d4c79f69b892181e4407d7f6536e2", "score": "0.53607446", "text": "public function getProgramId($storeId = null)\n {\n return Mage::getStoreConfig(self::XML_PATH_PROGRAM_ID, $storeId);\n }", "title": "" }, { "docid": "e5b91a15d6502800f950a31c32b3f82d", "score": "0.53596956", "text": "public function setProgramID($programID) {\n\t\t$this->_setProgramID($programID);\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "41b89bfcb82c90e628da393f586e18ee", "score": "0.5356312", "text": "function lookup()\n {\n\t\t$db = new db();\n global $app;\n\t\t$args = func_get_args();\n\t\tswitch (func_num_args()):\n\t\t\tcase 3:\n\t\t\t\t$sql = \"select $args[0] from \".$app['table'][$args[1]].\" where $args[2] limit 1\";\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\t$sql = \"select $args[0] from \".$app['table'][$args[1]].\" where $args[2] = '$args[3]' limit 1\";\n\t\t\t\tbreak;\n\t\tendswitch;\n\t\t//echo $sql;\n \t$db->query($sql, $rs, $nr);\n \tif ($nr):\n \t $record = $db->fetch($rs);\n \tendif;\n \tmysqli_free_result($rs);\n \treturn $record[$args[0]];\n }", "title": "" }, { "docid": "9f27a6f55c7be9e17af2c8ca5cbce171", "score": "0.5354858", "text": "function getEntryRowFromDBWithEntryId($entryId) {\n if ($entryId == 0) return 0;\n $selectWorkString = \"SELECT workId, title, designatedId, yearProduced, runTime, submissionFormat, originalFormat, synopsisOriginal, \"\n . \"webSite, previouslyShownAt, photoCredits, submitter, callForEntries, howPaid, permissionsAtSubmission, \"\n . \"lastModificationDate, checkOrPaypalNumber, datePaid, dateMediaReceived, amtPaid, photoLocation, submissionNotes \"\n . \"FROM works WHERE workId = $entryId\";\n debugLogLineQuery($selectWorkString);\n $result = mysql_query($selectWorkString);\n debugLogLine(\"Select Query Finished -- result = \" . $result); \n// debugLogQuery($result, $selectWorkString);\n \tif ($result && ($entryRow = mysql_fetch_array($result))) return $entryRow;\n \telse return 0;\n }", "title": "" }, { "docid": "60b208bc31a711220d3aa5a15cf232fd", "score": "0.5348728", "text": "function Get_Building_Address_ID($Building_ID){\n\n\t\t$query = \"select ID from building_address\n\t\t\t\t\twhere Building_ID = '$Building_ID'\";\n\n\t\t$Address_Bul_ID = mysqli_query($this->getDbc(),$query);\n \t\t$Address_Bul_ID = mysqli_fetch_array($Address_Bul_ID,MYSQLI_ASSOC);\n\t\t$Address_Bul_ID = $Address_Bul_ID['ID'];\n\n\t\tif($Address_Bul_ID){\n\t\t\treturn $Address_Bul_ID;\n\t\t}\n\t\telse{\n\t\t\treturn null;\n\t\t}\n\n\t}", "title": "" }, { "docid": "fdae7b551b492b8b2ca1753a694d2894", "score": "0.53402793", "text": "function setID(){\n $getid = getData();\n $id = 0;\n if($getid){\n while ($row = mysqli_fetch_assoc($getid)){\n $id = $row['task_id'];\n }\n }\n return ($id + 1);\n}", "title": "" }, { "docid": "5326d93ce9b39b4846727cc1a44e2da1", "score": "0.53371257", "text": "function getStageID($gameID) {\n $query = \"SELECT stageID FROM all_games WHERE gameID=$gameID;\";\n $row = $this->run_query($query, True, False);\n return $row[\"stageID\"];\n }", "title": "" }, { "docid": "f596be71c3e1115c6d85a7dcb1864deb", "score": "0.533607", "text": "public static function getById($EqID){\n\n\t\t$query = \"SELECT * FROM equipment WHERE EqID = :EqID LIMIT 1\";\n\n\t\t$param = [':EqID' => $EqID]; // the parameter that will be bind by pdo\n\n\t\ttry {\n\t\t\t// use static method run() from class DB \n\t \tif ($stmt = DB::Run($query, $param)) { // this will run the build query\n\n\t\t\t\t// need to use fetch to retrieve only 1 row of data\n\t\t\t\t// this will retrieve the row of data\n\t\t\t\t// that is associated to the passed id\n\t\t\t\t$equipment = $stmt->fetch(PDO::FETCH_ASSOC); \n\t\t\t\t\t\t\t\t\t\t\t\t\t \t \n\t\t\t\t// return the equipment object\n\t\t\t\treturn $equipment;\n\t\t\t};\n\t\t} catch (PDOException $e) {\n\t\t\treturn $e->getMessage();\n\t\t}\n\t}", "title": "" }, { "docid": "13fbbc4af1b9de6f34aba6c6310f2937", "score": "0.53349227", "text": "function getParentID($labid, $lab) {\n $parentquery = mysql_query(\"SELECT samples.parentid as 'parentid'\n FROM samples,facilitys\n WHERE samples.facility=facilitys.ID AND facilitys.lab='$lab' AND samples.ID='$labid'\");\n $parentname = mysql_fetch_array($parentquery);\n $parentvalue = $parentname['parentid'];\n return $parentvalue;\n}", "title": "" }, { "docid": "56fb3771402c8cb6b7fb6663355b1401", "score": "0.53304803", "text": "function GetExistingBatchNo($datereceived, $facility, $lab) {\n\n $strQuery = mysql_query(\"SELECT samples.batchno FROM samples,facilitys WHERE samples.datereceived='$datereceived' AND samples.facility='$facility' AND samples.facility=facilitys.ID AND facilitys.lab='$lab' \") or die(mysql_error());\n $dd = mysql_fetch_array($strQuery);\n $batch = $dd['batchno'];\n return $batch;\n}", "title": "" }, { "docid": "6630eccb1a9c0e90f4fcf05bfe1d2a20", "score": "0.53286433", "text": "public function getID() {\r\n include(\"../../globalVariables.php\");\r\n\r\n $verbindung = mysql_connect($url, $user, $pwd) or die\r\n (\"Keine Verbindung moeglich\");\r\n mysql_select_db($dbName) or die\r\n (\"Die Datenbank existiert nicht.\");\r\n\r\n $query = \"SELECT groupoffer_id FROM GROUPOFFER where savename = '$this->savename'\";\r\n\r\n $result = mysql_query($query);\r\n\r\n $row = mysql_fetch_object($result);\r\n\r\n mysql_close($verbindung);\r\n\r\n\r\n return $row->groupoffer_id;\r\n }", "title": "" }, { "docid": "61afd9085a9ec1601cdc587be7ca6efd", "score": "0.53202665", "text": "function getPrograms($conn, $condition=1)\n{\t\t\n\t$sql_select_prog = \"\n\t\tSELECT *\n\t FROM programs\n\t\tWHERE \" . $condition;\n\n\t$result = mysqli_query($conn, $sql_select_prog);\n\t$programs_data = array();\n\n\tif ($result && mysqli_num_rows($result) > 0) {\n\t while($row = mysqli_fetch_assoc($result)) {\n\t \t$programs_data[$row['prog_id']] = $row;\n\t }\n\t}\n\treturn $programs_data;\n}", "title": "" }, { "docid": "3f45d18774d07976116f9e86df7cca64", "score": "0.53202343", "text": "function getQuestionForId($questionId)\n\t{\n\t\t// Connect to the database.\n\t\trequire(\"connectToDB.php\");\n\n\t\t$questionQuery = \"SELECT q.surveyid,\n\t\t\t\t\t\t\t\t q.questionid,\n\t\t\t\t\t\t\t\t q.questionnumber,\n\t\t\t\t\t\t\t\t q.questiontext,\n\t\t\t\t\t\t\t\t q.questiontype,\n\t\t\t\t\t\t\t\t q.datecreated\n\t\t\t\t\t\tFROM devpoll.questions q\n\t\t\t\t\t\tWHERE q.questionid = $questionId;\n\t\t\";\n\n\t\t// Get the questions and answers for this survey.\n\t\t$result = $conn->query($questionQuery);\n\n\t\t// Close the connection.\n\t\t$conn->close();\n\n\t\t// Return the result.\n\t\treturn $result;\t\t\n\t}", "title": "" }, { "docid": "21c83f4e835c56179fc12602c91ae4de", "score": "0.5319719", "text": "function getCriteriaID($no_urut) {\r\n\tinclude('config.php');\r\n\t$query = \"SELECT id FROM criteria ORDER BY id\";\r\n\t$result = mysqli_query($shobhit, $query);\r\n\r\n\twhile ($row = mysqli_fetch_array($result)) {\r\n\t\t$listID[] = $row['id'];\r\n\t}\r\n\r\n\treturn $listID[($no_urut)];\r\n}", "title": "" }, { "docid": "e332e98f64df43b99461a379de1bdef5", "score": "0.5319436", "text": "function getIdActual(&$db,$strSecuencia){\n\t\t$id=0;\n\t\t$strSql=\"select currval('$strSecuencia') as id\";\n\t\t\n\t\t$rs=$db->Execute($strSql);\n\t\tif($rs){\n\t\t\tif(($row=$rs->fetchRow())){\n\t\t\t\t$id=$row[\"id\"];\n\t\t\t}\n\t\t}\n\t\treturn $id;\n\t}", "title": "" }, { "docid": "fa646314a8787e5658a68bbbaa59d28d", "score": "0.5318882", "text": "function getID_AREA($BLDG, $FLOOR, $SECTION)\n{\n\t\n\tglobal $db;\n\t$ID = $db->query(\"SELECT ID FROM AREA WHERE BLDG='{$BLDG}' AND FLOOR='{$FLOOR}' AND SECTION='{$SECTION}'\")or die(print_r($db->errorInfo()));\n\treturn $ID->fetchAll();\n\n}", "title": "" }, { "docid": "b30c99493f5143caecfa563828984fe7", "score": "0.5318698", "text": "function getMachineUseForm($idMachineUseForm) {\n\tglobal $DB_DB;\n\t$request = $DB_DB->prepare(\"SELECT * FROM MachineUseForm WHERE idUseForm = :idMachineUseForm\");\n\n\ttry {\n\t\t$request->execute(array(\n\t\t\t'idMachineUseForm' => $idMachineUseForm\n\t\t));\n\t}\n\tcatch(Exception $e) {\n\t\tif($DEBUG_MODE)\n\t\t\techo $e;\n\t\treturn -2;\n\t}\n\n\treturn $request->fetchAll()[0];\n}", "title": "" }, { "docid": "e47f45561a07c4b51f59ab0adae109d3", "score": "0.53111535", "text": "protected static function id(): mixed\n\t{\n\t\treturn self::$query->id;\n\t}", "title": "" }, { "docid": "8f6b56a7a7420d4237864bcf36b15802", "score": "0.5311072", "text": "public function _setProgramID($programID) {\n\t\t$this->_programID = $programID;\n\t}", "title": "" }, { "docid": "5a408b70b43fa8266d91dfef0b81568a", "score": "0.5310725", "text": "function rols_field_id($field , $id) {\n global $db ;\n $data = null ;\n $req = $db->prepare(\"SELECT $field FROM rols WHERE id= ?\") ;\n $req->execute(array( $id )) ;\n $data = $req->fetch() ;\n //return $data[0];\n return (isset($data[0])) ? $data[0] : false ;\n}", "title": "" }, { "docid": "f61c3f6a77c7909cc980189d59fdb541", "score": "0.5308944", "text": "function getPackageId($PDid,$type,$style){\n\t\t$sql = \"SELECT `ID` FROM `\".DB_TABLE_PREFIX.\"productpackage` WHERE `Productid`=\".(int)$PDid.\" AND `Name`='\".$type.\"' AND `type`=\".(int)$style; \t\t\t\n\t\t_trace($sql);\n\t\treturn mysql_fetch_assoc(mysql_query($sql));\t\t\n\t}", "title": "" }, { "docid": "80dae7c6d470986c23850d5bb766e508", "score": "0.5304976", "text": "function B1T3P($P, $P1Val) {\n\n\treturn B1T_SelSingleId(\"3\", $P, $P1Val);\n/*\n$db = new SQLite_prj(DIRDB1DB);\n\n$Tbl = \"B1T3\";\n$TblP = \"B1T3P\";\n$PleID = \"B1T3P1\";\n\nswitch ($P) {\n case 2:\n $Ple = $TblP . $P;\n break;\n case 3:\n $Ple = $TblP . $P;\n break;\n case 4:\n $Ple = $TblP . $P;\n break;\n case 5:\n $Ple = $TblP . $P;\n break;\n case 6:\n $Ple = $TblP . $P;\n break;\n case 7:\n $Ple = $TblP . $P;\n break;\n case 8:\n $Ple = $TblP . $P;\n break;\n case 9:\n $Ple = $TblP . $P;\n break;\n case 10:\n $Ple = $TblP . $P;\n break;\n case 11:\n $Ple = $TblP . $P;\n break;\n default:\n return false;\n\texit(1);\n}\n\n\treturn $db->selSingle($Tbl, $Ple, $PleID . \" = \" . $P1);\n\n$db->Close();\nunset($db);*/\n}", "title": "" }, { "docid": "d64f6a4969b44f728f35af9bf5568de3", "score": "0.53035986", "text": "function bind_id($file)\n{\n\tglobal $db;\n\t// Tomamos el valor de la tabla de acuerdo a los procesos que corremos\n\t$tabla = array(\n\t\t'ICRX2' => 'shear_icrx2',\n\t\t'SuperNovaROSA_HIC' => 'supernovarosa_hic',\n\t\t'PMQPSK' => 'shear_pmkpsk',\n\t\t'DiamondROSA_HIC' => 'DiamondROSA_HIC',\n\t\t'DiamondTOSA_HIC' => 'Shear_DiamondTOSA_HIC'\n\t);\n\t$db->query('select max(id) id from ' . $tabla[$_POST['PROCESS']]);\n\t// $db->results[0]['ID'] << Este valor representa de la lista de valores que retorna el query\n\t// el primer valor de la lista ID\n\treturn str_replace(':ID', $db->results[0]['ID'] + 2 , $file);\n}", "title": "" } ]
06b048169d6000dd8f2954c77b1ec598
Show the form for creating a new resource.
[ { "docid": "819d9d4f2ab0ae61a9614d78e04e1850", "score": "0.0", "text": "public function create($id)\n\t{\t\n\t\t/*$user = User::find(Auth::user()->id);\n\t\t$project = Project::find($id);\n\t\tif (is_null($project)) {\n\t\t\treturn redirect()->back();\n\t\t}\n\t\treturn view('admins.projects.suggestions.create',compact('user','id','project'));*/\n\n\t}", "title": "" } ]
[ { "docid": "cb267e3ebbd54b9945858b4232a6e394", "score": "0.7782105", "text": "public function create()\n {\n return view('admin.resource.create');\n }", "title": "" }, { "docid": "ffef4ac93b8831ae51d698379f4d9c1b", "score": "0.76836234", "text": "public function create()\n\t{\n\t\treturn view('resources.create');\n\t}", "title": "" }, { "docid": "ff6aafdb1355ea23d1a8bd6d152d0539", "score": "0.7601253", "text": "public function create()\n {\n $this->authorize('create', Resource::class);\n\n return view('resources.create');\n }", "title": "" }, { "docid": "c1a53014b3e8009982c57be36ab41329", "score": "0.75948673", "text": "public function create()\n {\n return $this->showForm('create');\n }", "title": "" }, { "docid": "c1bfef22261096ce14c95c47446dff78", "score": "0.758359", "text": "public function actionCreate() {\n $model = new Resource;\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['Resource'])) {\n $model->attributes = $_POST['Resource'];\n if ($model->save())\n $this->redirect(array('view', 'id' => $model->id));\n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n }", "title": "" }, { "docid": "2bc399e3e37eaad09b15e38f2a68e11a", "score": "0.75727344", "text": "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "title": "" }, { "docid": "38a11ec3ba36293b95bb60274536cad5", "score": "0.7465305", "text": "public function create()\n {\n $this->render('form');\n }", "title": "" }, { "docid": "f40137ad18991df137990863ff05faa1", "score": "0.7345145", "text": "public function newAction()\n {\n $this->addBaseBreadcrumb()->add('Nouveau');\n\n return $this->render($this->getParam('newTemplate'), array(\n 'form' => $this->getFormHandler()->getForm($this->getFormType(), $this->createObject())->createView()\n ));\n }", "title": "" }, { "docid": "e1c4a637db2fd84ef7dabb5b305e9961", "score": "0.7336561", "text": "public function create()\n {\n $resource = $this->resource;\n $resource['action'] = 'Create';\n return view('dashboard.views.'.$this->resources.'.create',compact( 'resource'));\n\n }", "title": "" }, { "docid": "dc0018a36c4c3e57ecd34c9226ac6191", "score": "0.72947586", "text": "function createForm() {\n $this->authorize('update',Recommand::class);\n return view('recommand-create', [\n 'title' => \"{$this->title} : Create\",\n ]);\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.72809595", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "8833e5d4ef4d0cbd0c24ff5ec2a1661c", "score": "0.7276202", "text": "public function create() {\n // View with a form\n return view('create');\n }", "title": "" }, { "docid": "ee98362215b714ada087b095dbaa2786", "score": "0.72557795", "text": "public function create()\n {\n return view('libros.form');\n }", "title": "" }, { "docid": "07f489b5920e8e515a252e3a556a445e", "score": "0.7240459", "text": "public function create()\n {\n return view('/informationForm');\n }", "title": "" }, { "docid": "5ed71688e44b59ce8bfa48e11136925b", "score": "0.7225436", "text": "public function create()\n {\n return view('backend.forms.create');\n }", "title": "" }, { "docid": "b669f070b96c62b6c7dd6c6d62678e03", "score": "0.72241485", "text": "public function create()\n {\n return view(\"admin.add_new\");\n }", "title": "" }, { "docid": "755e91a474eae625dfda22659e4c1f6c", "score": "0.72203404", "text": "public function create()\n {\n return view('form.create');\n }", "title": "" }, { "docid": "067a134abf6125c342c56b1ef91e1eeb", "score": "0.72168785", "text": "public function create()\n {\n // Show creation form\n return view(\"app.data-new\");\n }", "title": "" }, { "docid": "3fb888dea195139fc63f84a6e5b7db63", "score": "0.7199865", "text": "public function create()\n {\n return View::make($this->resourceView.'.create');\n }", "title": "" }, { "docid": "98d06b49a25eca742de2d2725f07c2b9", "score": "0.71838534", "text": "public function create()\n {\n return view('back.forms.create');\n }", "title": "" }, { "docid": "14eb25b8645bd80d69c0874afb39257f", "score": "0.7179826", "text": "public function create()\n {\n // Show the page\n return view('admin.material.create_edit');\n }", "title": "" }, { "docid": "c24e65c8a92dd430f73967cd2fb00ec9", "score": "0.7179227", "text": "public function create()\n {\n $this->resetValidation();\n $this->reset(['fields', 'is_editing']);\n\n $this->showForm();\n }", "title": "" }, { "docid": "d7792233bdf3a051b8ecc8a3bf85491e", "score": "0.717068", "text": "public function create()\n {\n return view('admin.form.create');\n }", "title": "" }, { "docid": "2e0866dd4968a0252a9972c2a0f1a8f1", "score": "0.7168598", "text": "public function create()\n {\n\n $this->data[\"$this->modelName\"] = $this->model;\n $this->data[\"formRoute\"] = \"app.admin.$this->pluralModelName.create\";\n\n\n if ($this->package) {\n return \\View::make(\"{$this->package}{$this->pluralModelName}.form\", $this->data);\n }\n return \\View::make(\"{$this->pluralModelName}::form\", $this->data);\n }", "title": "" }, { "docid": "33888fcb4cc71e0f03093b8e8a5197ed", "score": "0.71485233", "text": "public function create()\n {\n return view('forms.addClientForm');\n }", "title": "" }, { "docid": "aea0d1aab0b4ab918e93439a4ab1c242", "score": "0.71329117", "text": "public function create()\n {\n $options = ['route' => sprintf('%s.%s', $this->type, $this->formAction)];\n\n return $this->render(compact('options'));\n }", "title": "" }, { "docid": "a49b82b2f45e7ba34835574231e74fc7", "score": "0.71237063", "text": "public function create() {\n return view('resto.create');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "e2fccfcb135b6e8bbace40258561a9d9", "score": "0.71011", "text": "public function create() {\n return view('backend.car.new');\n }", "title": "" }, { "docid": "2d47830de802ad372b9413f5c799b6ed", "score": "0.7100993", "text": "public function create()\n {\n // View create form\n return view('client.create');\n }", "title": "" }, { "docid": "b7c6cd46917c26fb065c2292eecc323e", "score": "0.7085582", "text": "public function showCreateForm()\n {\n return view(\"admin.report.create\");\n }", "title": "" }, { "docid": "9bb0d731ffffb70cb4894ae1bcfbef68", "score": "0.7080855", "text": "public function newAction() {\n \n $this->tag->setTitle('New User');\n $this->breadcrumbs->add('User',$this->url->getBackend());\n $this->breadcrumbs->add('Add User');\n\n if (!$this->theForm) $this->theForm = new UserForm();\n \n $this->view->setVars([\n 'form' => $this->theForm,\n 'disableHeaderMessage' => TRUE,\n ]);\n $this->view->pick('user/form');\n }", "title": "" }, { "docid": "c27004d00e3f9afb85f74623ec456ca9", "score": "0.708025", "text": "public function create()\n {\n //\n return view('form');\n }", "title": "" }, { "docid": "0ee6b9ec9193265a43d0071906bdbba8", "score": "0.7068578", "text": "public function create()\n {\n return view(\"admin.fasilitas.form\");\n }", "title": "" }, { "docid": "5c9edf7a5ebaed5b2ffdda69a3142b5e", "score": "0.7056119", "text": "public function create()\n {\n //\n return view('fabricante.FormCreate');\n }", "title": "" }, { "docid": "0811f3b35e8abdf159ef38fbd5921e43", "score": "0.7053645", "text": "public function showCreateForm()\n {\n if (!Auth::check('user')) {\n return view('auth/login');\n };\n\n return view('poll/create');\n }", "title": "" }, { "docid": "21ca75fbf4cead94faae6a4003ecc093", "score": "0.7048532", "text": "public function create()\n\t{\n\t\t\n\t\t$resourcetags = array();\n\t\t$tags = Tag::all();\n\t\t$this->layout->content = View::make(\"resources.create\", compact('resourcetags', 'tags'));\n\t}", "title": "" }, { "docid": "c3830347da2f5033313539354fb374a1", "score": "0.7048263", "text": "public function create()\n {\n return view('form.newdokter');\n }", "title": "" }, { "docid": "6d6638d93353979e91d132adb030c770", "score": "0.7048106", "text": "public function create()\n {\n return view('arl.create');\n }", "title": "" }, { "docid": "e8ae4b7ffa4723fa50e5657bde33cb9c", "score": "0.70415264", "text": "public function create()\n\t{\n\t\treturn view('lokasis.create');\n\t}", "title": "" }, { "docid": "ee99d4dc55d426f11cebc62caa686b30", "score": "0.7028933", "text": "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem(\"Inicio\", $this->get(\"router\")->generate(\"home_page\"));\n $breadcrumbs->addItem(\"Infraccion\", $this->get(\"router\")->generate(\"infraccion\"));\n $breadcrumbs->addItem(\"Nuevo\");\n $entity = new Infraccion();\n $form = $this->createForm(new InfraccionType(), $entity);\n\n return $this->render('InfraccionBundle:Infraccion:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "dd5b0f3ce27dfd87ed7122c7b68a7c1a", "score": "0.70237505", "text": "public function create()\n {\n $car_status = $this->car_status;\n $meta = \"Create\";\n\n return view('car.form', compact('meta', 'car_status'));\n }", "title": "" }, { "docid": "5aeb76e66efd1357306038b0083ff2c3", "score": "0.7023672", "text": "public function create()\n {\n // Renderizar formulario para nuevo registro\n return view('admin.director.create');\n }", "title": "" }, { "docid": "d0a0415989715b5b5654f1e48db01a96", "score": "0.70210916", "text": "public function formCreate()\n {\n return view('clients.formCreate');\n }", "title": "" }, { "docid": "7ca42f9e26eceaf20c6f09a15e65e991", "score": "0.70151645", "text": "public function create()\n {\n $this->init();\n\n $model = \"App\\\\\".$this->model;\n $action = $this->action;\n $view=$this->model;\n\n $form = $model::form();\n\n\n return view('forms.add',compact( \"form\", 'action','view'));\n }", "title": "" }, { "docid": "3d29af10b4a3a63ad19ba85639f8ccb5", "score": "0.70122755", "text": "public function create()\n {\n //Creare Studenti (Form per inserire le informazioni)\n return view('student.create');\n }", "title": "" }, { "docid": "d85281966cc367fac063f9b9134161a5", "score": "0.70066863", "text": "public function create()\n {\n $form = $this->form;\n $route = $this->route;\n\n return view($this->rCreate,compact('form','route'));\n }", "title": "" }, { "docid": "b679c40074f9111d684e22f203cdc583", "score": "0.70033646", "text": "public function create()\n {\n return view('projects_forms.create');\n }", "title": "" }, { "docid": "5ebde8e797b651ee38647f3ebdaa6ed2", "score": "0.7000297", "text": "public function create()\n {\n return view ('student.add');\n }", "title": "" }, { "docid": "6fa062499d7b6569cf7f999f8c656ce5", "score": "0.69934726", "text": "public function create()\n {\n return view('about.form.create');\n }", "title": "" }, { "docid": "98811bcda96da1bb035f86f6bb53ebfc", "score": "0.69921947", "text": "public function create()\n {\n return view('admin.new.create');\n //\n }", "title": "" }, { "docid": "fd564bf5840d9d004110195e2ea8caac", "score": "0.6990177", "text": "public function create()\n {\n return view('personil.form');\n }", "title": "" }, { "docid": "c566e9d1861ec0a585d782640f88115e", "score": "0.6986656", "text": "public function create()\n {\n //\n return view(\"products.form\")->with([\n \"product\" => new Product(),\n \"action\" => \"/products\",\n \"method\" => \"POST\"\n ]);\n }", "title": "" }, { "docid": "e58f17523277fc6c291ecbf3f817eb22", "score": "0.6986169", "text": "public function create()\n {\n return view('radars.create');\n }", "title": "" }, { "docid": "e58f17523277fc6c291ecbf3f817eb22", "score": "0.6986169", "text": "public function create()\n {\n return view('radars.create');\n }", "title": "" }, { "docid": "5a27005c67429ee148bb4445da9a4f82", "score": "0.6982127", "text": "public function create()\n {\n return view('management.create');\n }", "title": "" }, { "docid": "270cbed854a0719c8772b2194b3fb90a", "score": "0.6976372", "text": "public function newAction()\n {\n $entity = new Ruta();\n $form = $this->createForm(new RutaType(), $entity);\n\n return $this->render('RutaMicroBundle:Ruta:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "5f3c68b60fd80eb4444eb7152dfbb94e", "score": "0.69708157", "text": "public function create()\n {\n $page_title = __(\" Add consult\");\n $page_description = __(\" Add new consult\");\n return view('school.consult.create', compact('page_title', 'page_description'));\n }", "title": "" }, { "docid": "3550257fb37b0afbdb6907ce7bcfa97c", "score": "0.6969799", "text": "public function create()\n\t{\n\t\t//\n\t\treturn View::make(\"admin.newStudent\");\n\n\t}", "title": "" }, { "docid": "5ccbefe1f6b35224d550c04618929098", "score": "0.6969252", "text": "public function create()\n {\n return view('forms.newUser');\n }", "title": "" }, { "docid": "307bb1f1a7654e2dd53bf64336069792", "score": "0.6967743", "text": "public function create()\n {\n return view('url.form');\n }", "title": "" }, { "docid": "8e51e1b3126c2bddb89f48578f55b0df", "score": "0.6961905", "text": "public function newAction()\n {\n $entity = new Student();\n $form = $this->createForm(new StudentType(), $entity);\n\n return $this->render('BdxTutoratBundle:Student:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "title": "" }, { "docid": "279f28fbbb4daa2b04b92c9524bc3793", "score": "0.6961802", "text": "public function newAction()\n {\n $this->view->form = new UsersForm(null, array('create' => true));\n }", "title": "" }, { "docid": "cbe6d3677d39be698b72d0cc40cc79ec", "score": "0.69600844", "text": "public function create()\n {\n // \n /*\n *RETURN CREATE FORM BLADE\n */\n //\n return View('company.create');\n }", "title": "" }, { "docid": "ea30089b05638deecfcdcc640118738c", "score": "0.69564354", "text": "public function create()\n {\n return view('student.add');\n }", "title": "" }, { "docid": "b8e99d11c1bb25036e33dc3a5647bea2", "score": "0.69563407", "text": "public function create()\n {\n $data['action'] = 'kontrak.store';\n return view('kontrak.form', $data);\n }", "title": "" }, { "docid": "f18f0d893e1e12d83e8864a9a8c0f0b2", "score": "0.69517267", "text": "public function newAction()\n {\n $entity = new Question();\n \n $form = $this->createCreateForm($entity);\n\n return $this->render('StelQuestionBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "d2dfb39011e7751d334f3b102132bcc0", "score": "0.6937871", "text": "public function create()\n {\n return view('libro.create');\n }", "title": "" }, { "docid": "b755f6dc762c7fcef5960693dc550a8c", "score": "0.6937492", "text": "public function create()\n {\n return view('relatorio/create');\n }", "title": "" }, { "docid": "f05f4a2f83cd17b9bd5adbe347692097", "score": "0.6935773", "text": "public function create()\n {\n $form = new Form;\n return view('customForms.create');\n }", "title": "" }, { "docid": "3bd5f8f33a9a9f7308459ce2c15c8eea", "score": "0.6934245", "text": "public function create()\n {\n return view('admin/sucursal_form');\n }", "title": "" }, { "docid": "c1837ba0b5873eb669c993210480e9c2", "score": "0.6927363", "text": "public function create()\n\t{\n\t\treturn view('turista.create');\n\t}", "title": "" }, { "docid": "047181576c3e6ad0088b9b96fa131b35", "score": "0.6920257", "text": "public function create() {\n $data['crud_table'] = $this->table_name();\n return view('crud.'.$this->table_name().'._form')->with($data);\n }", "title": "" }, { "docid": "c4416390a701ec4941a20dc3ab095a2a", "score": "0.6919174", "text": "public function create()\n\t{\n\t\treturn view('create');\n\t}", "title": "" }, { "docid": "850e83d2b304c9abb6eb4fa4264598c2", "score": "0.69189566", "text": "public function create()\n {\n $data = new supplier();\n return view('admin.master.supplier.form', compact('data'));\n }", "title": "" }, { "docid": "07b34800d82b4752154612b743b2fbf0", "score": "0.6918779", "text": "public function create()\n {\n return view('rescuer.create');\n }", "title": "" }, { "docid": "35c563964f6d86122b762a351b30e581", "score": "0.69098777", "text": "public function newAction()\n {\n $entity = new Prueba();\n $form = $this->createForm(new PruebaType(), $entity);\n\n return $this->render('AuditoriaBundle:Prueba:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "f9a1258e50a03182d193266b2526e6db", "score": "0.6908334", "text": "public function create()\n {\n return view('mir.create');\n }", "title": "" }, { "docid": "72d216b75443b4090ac0a1387c18009c", "score": "0.6906656", "text": "public function create()\n {\n //\n return view('crud.add');\n }", "title": "" }, { "docid": "33812f00a7ea90b676f5b715bd231e74", "score": "0.69030726", "text": "public function newAction() {\n\t\t$this->view->form = $this->getForm ( \"/admin/services/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Service\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new service\");\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/services/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\r\n\t\t\n\t\t$this->render ( 'applicantform' );\n\t}", "title": "" }, { "docid": "e88b17f0dfcb8e1d7ac04c5b9f6af8f1", "score": "0.6902272", "text": "public function create()\n {\n return view('cars.form');\n }", "title": "" }, { "docid": "5be46dd600196087a3b8464e42aa9f4f", "score": "0.6897392", "text": "public function create()\n {\n $data['action'] = 'karyawan.store';\n return view('karyawan.form', $data);\n }", "title": "" }, { "docid": "1b589526d939246aa9ef7b40179c7739", "score": "0.689703", "text": "public function create()\n {\n $title = 'Thêm trạng thái';\n return view('service._form', compact('title'));\n }", "title": "" }, { "docid": "9a709a92af338fffb07b6fe3d45b4129", "score": "0.6896563", "text": "public function new()\n\t{\n\t\treturn view('Dadmin/create');\n\t}", "title": "" }, { "docid": "5b7558f5f0a446dd445867917bd98918", "score": "0.6895003", "text": "public function create()\n {\n return view('che.add');\n }", "title": "" }, { "docid": "fbdf9369686334f9d6c8e43c9232fff9", "score": "0.68936795", "text": "public function create()\n {\n Return view(\"admin.productsform\");\n }", "title": "" }, { "docid": "5a8dd9cdd3724225efe424e0e91baf8e", "score": "0.6891947", "text": "public function createAction()\n {\n\n $form = $this->_doServerForm();\n $this->view->form = $form;\n\n }", "title": "" }, { "docid": "bdb0161d2f2f44cdaea93bf890a4c02e", "score": "0.68880934", "text": "public function create()\n {\n return view(\"create\");\n }", "title": "" }, { "docid": "037551b0e96b00a002be40f361b54ad7", "score": "0.68869364", "text": "public function create()\n {\n return view('paul.create');\n }", "title": "" }, { "docid": "70acd05f150e38467827ec0ef2853a04", "score": "0.6886042", "text": "protected function create()\n {\n $internauta = new Internauta();\n return view('/layouts/admin/internauta_form',compact('internauta'));\n }", "title": "" }, { "docid": "da11617a72ceec362ed235f9a4d58453", "score": "0.6884816", "text": "public function create()\n {\n return view('escuderia.escuderia-form');\n }", "title": "" }, { "docid": "af54a363bc62302637235c045a2f56b8", "score": "0.68831575", "text": "public function create()\n {\n return view('admin.iva99030.create');\n }", "title": "" }, { "docid": "7f965f069e40f5f6854b6a3bf71c5cd3", "score": "0.68812406", "text": "public function create()\n {\n return view('eksterior.create');\n }", "title": "" }, { "docid": "03402f9ca28344e85e26fd6084f319a0", "score": "0.68810815", "text": "public function create()\n {\n return view('widoki.create');\n }", "title": "" }, { "docid": "a705ec418ba0a86ae6e21101240fcc17", "score": "0.6879124", "text": "abstract protected function showCreateForm();", "title": "" }, { "docid": "e140a12761122070f5327b09900c0721", "score": "0.68769", "text": "public function create()\n {\n return view('control1.create');\n }", "title": "" }, { "docid": "6e1e5668e0314c521059488779983d78", "score": "0.68746406", "text": "public function create()\n {\n return view('creation');\n }", "title": "" }, { "docid": "a3c5b11bbc0c856907f42999109e1b8c", "score": "0.68742007", "text": "public function create()\n\t{\n\t\t// return View::make('espressioni.create');\n\t\treturn View::make('espressioni.edit');\n\t}", "title": "" }, { "docid": "180353d80dab0370c281cce907176a1c", "score": "0.687389", "text": "public function create()\n\t{\n\t\treturn view('periksas.create');\n\t}", "title": "" }, { "docid": "48f81c129bc98e6a3c8a7c03a78b753c", "score": "0.68737423", "text": "public function formCreateAction() {\n $this->view->form = new ProductsForm();\n }", "title": "" } ]
37be02e3f796e09b0cf66cfbcdd4ef39
Sets the query to use
[ { "docid": "7de77e5d4eb7bb5d82a3e8a21d40e369", "score": "0.0", "text": "public function setQuery(array $aQuery): self\n {\n $this->aQuery = $aQuery;\n return $this;\n }", "title": "" } ]
[ { "docid": "4f7b800f324072b118857fdd7a609a8a", "score": "0.79689413", "text": "function setQuery($query){$this->query=$query;}", "title": "" }, { "docid": "e99523d32e0fcea9dea80c7b21ffdf44", "score": "0.7915504", "text": "public function setQuery($value) {\n $this->query = $value;\n }", "title": "" }, { "docid": "f6e3831c4f112736b0103b94efd34e05", "score": "0.77896965", "text": "public function setQuery($query){\r\n \t$this->query = $query;\r\n }", "title": "" }, { "docid": "395acfd80f1008c6480c47284de0fabb", "score": "0.7728215", "text": "function setQuery($query)\n {\n $this->_query = $query ;\n }", "title": "" }, { "docid": "261a89df2ca90f3101bd7573518601f2", "score": "0.7687343", "text": "public function setQuery($query) {\n\n $this->query = $query;\n\n }", "title": "" }, { "docid": "ef5e380ce3d5298064959f0a46070bc1", "score": "0.7652161", "text": "protected function setGlobalQuery(){}", "title": "" }, { "docid": "198d4cb1114852d70c7d0cf0ab8f3813", "score": "0.76289904", "text": "public function setQuery($query)\n {\n $this->query = $query;\n }", "title": "" }, { "docid": "6af525b1cb97567350f363150c336a36", "score": "0.7563321", "text": "public function setQuery($query)\r\n {\r\n $this->query = $query;\r\n }", "title": "" }, { "docid": "011b31e87770f8b0fcfe71faeadef921", "score": "0.75360924", "text": "public static function setQuery($query)\n {\n self::$query = $query;\n }", "title": "" }, { "docid": "0ffce05bd4b86485c09e4dac13adc0cd", "score": "0.75192404", "text": "public function setQuery($query)\n {\n $this->query = $query;\n }", "title": "" }, { "docid": "0ffce05bd4b86485c09e4dac13adc0cd", "score": "0.75192404", "text": "public function setQuery($query)\n {\n $this->query = $query;\n }", "title": "" }, { "docid": "9623899fb92f595e78f1a156090e87ed", "score": "0.73959243", "text": "public function setQuery ( $query ) {\n\n\t\tif ( $this->query != null ) return $this->query;\n\n\t\t$this->query = $query;\n\n\t\treturn $this->query;\n\n\t}", "title": "" }, { "docid": "35609ae3ca484b2fe504d4e54cff34e6", "score": "0.7380391", "text": "public function setQuery($data);", "title": "" }, { "docid": "7311ee0c013efbaca7c945b502f41215", "score": "0.73383045", "text": "public function setQuery($query){\n $this->query = $query;\n return $this;\n }", "title": "" }, { "docid": "8988bbff8ea9a847697b0e6b2a12b8bd", "score": "0.7287298", "text": "public function setQuery($query): void;", "title": "" }, { "docid": "ce8c5d9aa6ae36c252eb864c0fbd516b", "score": "0.72775406", "text": "public function setSearchQuery($query){\n\t\t$this->_query = $query;\n\t}", "title": "" }, { "docid": "af0c94723ae3b449c534fc8ee752ab9c", "score": "0.72620517", "text": "public function setQuery($query)\n {\n $this->set(self::QUERY, $query);\n }", "title": "" }, { "docid": "8e7b809e8e0f3bae9b2e860ce80e4ed0", "score": "0.72565573", "text": "public function setQuery($query) {\n $this->query = $query;\n return $this;\n }", "title": "" }, { "docid": "6a4a1532fea91f22d9313e7b0f4c9cb3", "score": "0.7254418", "text": "public function setQuery($query)\n {\n $this->parameters['query'] = $query;\n }", "title": "" }, { "docid": "2b80f417f5bf1c9e457875c472078839", "score": "0.72457606", "text": "public function setQuery( $sql )\n {\n \t$this->query = $sql;\n }", "title": "" }, { "docid": "ad63b4784e20c64fb580837dded47c16", "score": "0.72431356", "text": "public function setQuery( $sql )\r\n {\r\n \t$this->query = $sql;\r\n }", "title": "" }, { "docid": "570a06a4fe776e0984fa4fb850538f81", "score": "0.7121449", "text": "public function setQuery($name, $value = null);", "title": "" }, { "docid": "5dd0d408fe7593d603468c8903ef24ba", "score": "0.7084021", "text": "public function setQuery($str)\r\n {\r\n $this->query=$str;\r\n }", "title": "" }, { "docid": "7288e605559e7dec370c01d3fe2eba8c", "score": "0.7073955", "text": "function setQuery($query)\n { \n foreach ($this->collections as $c){\n $c->setQuery($query);\n print_r ( $c->query);\n $c->buildQuery();\n }\n }", "title": "" }, { "docid": "c1f3479103242376a79a85c1cb87891e", "score": "0.7022676", "text": "protected function set_query(){\n try {\n $this->db_open();\n $this->conn->query($this->query);\n\t\t $this->db_close();\n } catch (Exception $e) {\n //Mensaje de error al poder ejecutar la query\n die(\"Error de no se pudo ejecutar la query: \" . $e->getMessage() . \" en la línea \" . $e->getLine());\n }\n \n }", "title": "" }, { "docid": "6a7aa5d0cb1acc5e21bae71a7506ac0f", "score": "0.70166355", "text": "public function setQuery($query=array()) {\n $this->query = $query;\n ksort($this->query);\n return $this;\n }", "title": "" }, { "docid": "89f6650075cbdbe3455ad682e82901a8", "score": "0.6981703", "text": "public function setQuery($value)\n {\n return $this->set('Query', $value);\n }", "title": "" }, { "docid": "89f6650075cbdbe3455ad682e82901a8", "score": "0.6981703", "text": "public function setQuery($value)\n {\n return $this->set('Query', $value);\n }", "title": "" }, { "docid": "89f6650075cbdbe3455ad682e82901a8", "score": "0.6981703", "text": "public function setQuery($value)\n {\n return $this->set('Query', $value);\n }", "title": "" }, { "docid": "0d21969beefd3c8ed82723098a516c76", "score": "0.69749457", "text": "public function SetQueryObject()\n\t{\n\n\t}", "title": "" }, { "docid": "4bea118f52562725cf5946b50f6b562d", "score": "0.69606465", "text": "protected function setDefaultQuery()\n\t{\n\t\t// Create a new query object.\n\t\t$db = $this->getDbo();\n\t\t$query = $db->getQuery(true);\n\n\t\t// Select the required fields from the table.\n\t\t$query->select(\n\t\t\t$this->getState(\n\t\t\t\t'list.select',\n\t\t\t\t'a.*'\n\t\t\t)\n\t\t);\n\n\t\t$query->from('#__newsletter_extensions AS a');\n\n\t\t// Filter by search in title.\n\t\t$search = $this->_explodeSearch($this->getState('filter.search'));\n\t\tswitch ($search[0]) {\n\t\t\tcase 'id':\n\t\t\tcase 'default':\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// Add the list ordering clause.\n\t\t$orderCol = $this->state->get('list.ordering', 'title');\n\t\t$orderDirn = $this->state->get('list.direction', 'asc');\n\t\t$query->order($db->getEscaped($orderCol . ' ' . $orderDirn));\n\n\t\t//echo nl2br(str_replace('#__','jos_',$query)); die();\n\t\t$this->query = $query;\n\t}", "title": "" }, { "docid": "6473508d9a03dcea14c7e35894eb317d", "score": "0.69413847", "text": "public function query() {\n $this->field_alias = $this->real_field;\n if (isset($this->value, $this->definition['trovequery']) && $this->value) {\n // $this->query->args['method'] = $this->definition['trovequery']['method'];\n // $this->query->args[$this->definition['trovequery']['arg']] .=\n // $this->definition['trovequery']['index'] . ':' .\n // $this->value . ' ';\n $this->query->add_where('',\n $this->definition['trovequery']['arg'],\n $this->definition['trovequery']['index'] . ':' . $this->value);\n }\n }", "title": "" }, { "docid": "b134ac98b2e08d019494ef918e3a29cf", "score": "0.6924984", "text": "function setQueries($queries){\n $this->query = $queries;\n }", "title": "" }, { "docid": "13d9fa13f3e867e3bda846d6eea86441", "score": "0.6891093", "text": "protected function setQuery()\n {\n // Set CSS selectors.\n if (!empty($this->query['selector'])) {\n $this->cssSelectors = is_array($this->query['selector'])\n ? $this->query['selector']\n : [$this->query['selector']];\n }\n // Set extractors for each selector.\n foreach ($this->cssSelectors as $id => $selector) {\n $this->extractors[$id] = empty($this->query['extract'][$id])\n ? ['_text']\n : (\n is_array($this->query['extract'][$id])\n ? $this->query['extract'][$id]\n : [$this->query['extract'][$id]]\n );\n }\n }", "title": "" }, { "docid": "f8f970a1669269f282ef07f6aba21244", "score": "0.6887779", "text": "public function newQuery()\n {\n }", "title": "" }, { "docid": "fe229272b87d75f021189fc0426e3843", "score": "0.68676966", "text": "protected function setQuery($array = [])\n {\n self::$query = new Query($array);\n }", "title": "" }, { "docid": "0cf883016aa275994ae52bb53260fdcc", "score": "0.68597186", "text": "function setQuery(array $query, $override = false) {\n if ($this->isOpen) {\n $this->close();\n }\n if ($override) Ac_Util::ms($this->query, $query);\n else $this->query = $query;\n }", "title": "" }, { "docid": "0085788b20b33ee4487115a9533ba1fa", "score": "0.68369704", "text": "protected function set_query(){\r\n $this->db_open();\r\n $this->conn->query($this->query);\r\n $this->db_close();\r\n }", "title": "" }, { "docid": "68f83116bd406414ee31204574f6ed41", "score": "0.6812452", "text": "public function setQuery($query = null) {\n if ($query instanceof QueryString) {\n $this->parts[self::QUERY] = $query;\n } else {\n $this->parts[self::QUERY] = new QueryString($query);\n }\n return $this;\n }", "title": "" }, { "docid": "5e603d0106c77d66818f0a608430337e", "score": "0.6811366", "text": "protected function set_query()\n {\n $this->db_open();\n //$this->conn->query() = Es un método de la clase \"mysqli\" \n $this->conn->query($this->query);\n $this->db_close();\n }", "title": "" }, { "docid": "945035a95a1669f89044007481f86f26", "score": "0.67957443", "text": "public function setQuery($query)\n {\n $this->query = $query;\n\n return $this;\n }", "title": "" }, { "docid": "945035a95a1669f89044007481f86f26", "score": "0.67957443", "text": "public function setQuery($query)\n {\n $this->query = $query;\n\n return $this;\n }", "title": "" }, { "docid": "945035a95a1669f89044007481f86f26", "score": "0.67957443", "text": "public function setQuery($query)\n {\n $this->query = $query;\n\n return $this;\n }", "title": "" }, { "docid": "945035a95a1669f89044007481f86f26", "score": "0.67957443", "text": "public function setQuery($query)\n {\n $this->query = $query;\n\n return $this;\n }", "title": "" }, { "docid": "945035a95a1669f89044007481f86f26", "score": "0.67957443", "text": "public function setQuery($query)\n {\n $this->query = $query;\n\n return $this;\n }", "title": "" }, { "docid": "5ed2fb8e278be5ca9bd2da0f5bc2c020", "score": "0.67905957", "text": "protected function setQuery($query)\n\t{\n\t\tif (!$query instanceof ParametersInterface) {\n\t\t\t$query = new Parameters($query);\n\t\t}\n\t\t$this->getRequest()->setQuery($query);\n\t}", "title": "" }, { "docid": "bf70e771fb5aeef4c0d742d8a43c525d", "score": "0.67895526", "text": "function query() {\n $this->field_alias = $this->real_field;\n }", "title": "" }, { "docid": "bf70e771fb5aeef4c0d742d8a43c525d", "score": "0.67895526", "text": "function query() {\n $this->field_alias = $this->real_field;\n }", "title": "" }, { "docid": "bf70e771fb5aeef4c0d742d8a43c525d", "score": "0.67895526", "text": "function query() {\n $this->field_alias = $this->real_field;\n }", "title": "" }, { "docid": "4cb0d3dce8dd4b897aa5ec21a169d7bf", "score": "0.6767748", "text": "public function setQuery($query)\n {\n //argument 1 must be a string\n Argument::i()->test(1, 'string');\n $this->query['query'] = $query;\n \n return $this;\n }", "title": "" }, { "docid": "c935c432a871e58b96300ef7ad3bc41f", "score": "0.67572886", "text": "public function query($query)\n {\n }", "title": "" }, { "docid": "c935c432a871e58b96300ef7ad3bc41f", "score": "0.67572886", "text": "public function query($query)\n {\n }", "title": "" }, { "docid": "c935c432a871e58b96300ef7ad3bc41f", "score": "0.67571306", "text": "public function query($query)\n {\n }", "title": "" }, { "docid": "c935c432a871e58b96300ef7ad3bc41f", "score": "0.67571306", "text": "public function query($query)\n {\n }", "title": "" }, { "docid": "c935c432a871e58b96300ef7ad3bc41f", "score": "0.67571306", "text": "public function query($query)\n {\n }", "title": "" }, { "docid": "c935c432a871e58b96300ef7ad3bc41f", "score": "0.67571306", "text": "public function query($query)\n {\n }", "title": "" }, { "docid": "2f3429ecc63a0bbf1dc9c3804e4995e2", "score": "0.673153", "text": "public function Query($query);", "title": "" }, { "docid": "2cc8e6d3458149d420c33d0dd461eefc", "score": "0.67152464", "text": "function setUpQuery() {\n\t\t$query = \"\";\n\t\t\n\t\t// Set up your basic fields here that will be used in the query\n\t\tif ($this->language_id >0) $query.=\"+language_id:$this->language_id \";\n\t\tif ($this->group_id >0) $query.=\"+group_id:$this->group_id \";\n\t\t\n\t\t$lowerdate = \"*\";\n\t\t$upperdate = \"*\";\n\t\t \n\t\tif ($this->lowerdate >0) $lowerdate = $this->lowerdate;\n\t\tif ($this->upperdate >0) $upperdate = $this->upperdate;\n\t\t\n\t\tif (($lowerdate!=\"*\") || ($upperdate != \"*\")) {\n\t\t\t$query.=\"+lucene_date:[\".$lowerdate.\" TO \".$upperdate.\"] \";\n\t\t}\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "0ce1192dccfedd024e2e3f718dc37678", "score": "0.67044127", "text": "protected function setupQuery()\n {\n $this->checkUser();\n $this->checkSort();\n $this->checkLimit();\n $this->checkFrom();\n $this->checkTo();\n $this->setupCriteria();\n $this->setupFilters();\n\n if (!empty($this->channel)) {\n $this->channel($this->channel);\n }\n\n $this->_built = true;\n }", "title": "" }, { "docid": "2c8425d72177e25a69ed666b8ffbbbf4", "score": "0.66935194", "text": "function query() {\n }", "title": "" }, { "docid": "2c8425d72177e25a69ed666b8ffbbbf4", "score": "0.66935194", "text": "function query() {\n }", "title": "" }, { "docid": "2c8425d72177e25a69ed666b8ffbbbf4", "score": "0.66935194", "text": "function query() {\n }", "title": "" }, { "docid": "2c8425d72177e25a69ed666b8ffbbbf4", "score": "0.66935194", "text": "function query() {\n }", "title": "" }, { "docid": "2aff1484b6a24f4b8aaed6528d300fd3", "score": "0.66832316", "text": "public function customQuery($statement = \"\")\n {\n $this->_query = $statement;\n return $this;\n }", "title": "" }, { "docid": "d24374ae5789badc446ac7d3e30a42c6", "score": "0.6677572", "text": "function query() { }", "title": "" }, { "docid": "d24374ae5789badc446ac7d3e30a42c6", "score": "0.6677572", "text": "function query() { }", "title": "" }, { "docid": "4819adc40115c63afe480e36d567dfc3", "score": "0.6663191", "text": "public function newQuery();", "title": "" }, { "docid": "6af054627b4b9d0226655a07acd729f1", "score": "0.6633839", "text": "function DoQuery()\n {\n parent::DoQuery();\n }", "title": "" }, { "docid": "6af054627b4b9d0226655a07acd729f1", "score": "0.6633839", "text": "function DoQuery()\n {\n parent::DoQuery();\n }", "title": "" }, { "docid": "6af054627b4b9d0226655a07acd729f1", "score": "0.6633839", "text": "function DoQuery()\n {\n parent::DoQuery();\n }", "title": "" }, { "docid": "6af054627b4b9d0226655a07acd729f1", "score": "0.6633839", "text": "function DoQuery()\n {\n parent::DoQuery();\n }", "title": "" }, { "docid": "6af054627b4b9d0226655a07acd729f1", "score": "0.6633839", "text": "function DoQuery()\n {\n parent::DoQuery();\n }", "title": "" }, { "docid": "417ba1e99a7dc59988a9d804633f648d", "score": "0.6628848", "text": "public function query($query);", "title": "" }, { "docid": "417ba1e99a7dc59988a9d804633f648d", "score": "0.6628848", "text": "public function query($query);", "title": "" }, { "docid": "417ba1e99a7dc59988a9d804633f648d", "score": "0.6628848", "text": "public function query($query);", "title": "" }, { "docid": "3c4c611f2f0e0800fb6523471c0c666a", "score": "0.66178036", "text": "private function setNewQuery()\n\t{\n\t\t$this->deleteQuery = new Delete($this->getTableName());\n\t}", "title": "" }, { "docid": "5f8e1616898b88bf4781586860bf0935", "score": "0.6613161", "text": "public static function query()\n {\n }", "title": "" }, { "docid": "23216916b027d1c8e422a7e488aadc6c", "score": "0.65863127", "text": "function setQuery($sql, $offset = 0, $limit = 0) {\n $this->_sql = $sql;\n $this->_limit = (int) $limit;\n $this->_offset = (int) $offset;\n }", "title": "" }, { "docid": "ab019a7d9a0acb49e576be4b0ca61eac", "score": "0.6578341", "text": "public function createQuery() {}", "title": "" }, { "docid": "ab019a7d9a0acb49e576be4b0ca61eac", "score": "0.6578341", "text": "public function createQuery() {}", "title": "" }, { "docid": "ab019a7d9a0acb49e576be4b0ca61eac", "score": "0.6578341", "text": "public function createQuery() {}", "title": "" }, { "docid": "ab019a7d9a0acb49e576be4b0ca61eac", "score": "0.6578341", "text": "public function createQuery() {}", "title": "" }, { "docid": "a2e2132c79349f6172da76ab3db8153e", "score": "0.6556565", "text": "protected function createQuery()\n {\n if (!$this->queryCreated) {\n $this->setBaseQuery();\n $this->queryCreated=1;\n }\n }", "title": "" }, { "docid": "e5ed15d459d553d8d7ae23bec46f797a", "score": "0.6538366", "text": "function DoQuery($query)\n {\n parent::SetQuery($query);\n parent::DoQuery();\n }", "title": "" }, { "docid": "cb2d0a1535963f3ac4cd41e461e8f477", "score": "0.6537235", "text": "public function setQry($qry) {\n $this->qry = $qry;\n return $this;\n }", "title": "" }, { "docid": "95124a3262ddc82695824f32f365d38d", "score": "0.6518693", "text": "function setQuery( $sql, $offset = 0, $limit = 0, $prefix='#__' )\n\t{\n\t\t$this->_sql\t\t= $this->replacePrefix( $sql, $prefix );\n\t\t$this->_limit\t= (int) $limit;\n\t\t$this->_offset\t= (int) $offset;\n\t}", "title": "" }, { "docid": "44d3c8fb1efab63afce3125f59e2d2ad", "score": "0.65169984", "text": "function setQuery( $sql, $offset = 0, $limit = 0, $prefix='#__' ) {\n $this->_sql = $this->replacePrefix( $sql, $prefix );\n $this->_limit = intval( $limit );\n $this->_offset = intval( $offset );\n }", "title": "" }, { "docid": "5b38541997e7e8c49839004131fc2b77", "score": "0.6513866", "text": "public function setQuery(QueryBuilder $query): void;", "title": "" }, { "docid": "e34520b08da2299aaf3c19d772af2e80", "score": "0.65015113", "text": "function setQuery($sql, $offset = 0, $limit = 0) {\n\t\t$this -> _sql = str_replace('#__', $this -> _table_prefix, $sql);\n\t\t$this -> _sql = $this -> _getLangSQL($this -> _sql);\n\t\t$this -> _limit = intval($limit);\n\t\t$this -> _offset = intval($offset);\n\t}", "title": "" }, { "docid": "c60ead71a06e3883c043d001a233770d", "score": "0.6496393", "text": "function addCustomQuery($query) {\n if ($query != '') {\n $this->customQuery = $query;\n }\n }", "title": "" }, { "docid": "098876556b6efeb5adc573f5e50462fb", "score": "0.6494918", "text": "function setQuery($query)\r\n {\r\n $statement = $this->getConn()->prepare($query);\r\n // Return the prepared statement from the database.\r\n return $statement;\r\n }", "title": "" }, { "docid": "c90cc976f179d31dd153a26ba94f0148", "score": "0.64927626", "text": "public function setQuery($query, $count_key = '*'){\n $this->query = $query;\n $this->count_key = $count_key;\n return $this;\n }", "title": "" }, { "docid": "c72e0c2d8038427967ea8481fc3593ab", "score": "0.64686584", "text": "private function resetQuery(){\n\n\t\t$this->_where = [];\n\n\t\t$this->_sql = '';\n\t\t\n\t\t$this->_bindValues = [];\n\t\t\n\t\t$this->_join = '';\n\t\t\n\t\t$this->_orderBy = '';\n\t}", "title": "" }, { "docid": "5e79622825a3dff769ce3218d31bc80c", "score": "0.6460219", "text": "function setQuery($query,$params=false){\n\t\n\t\t$this -> setParams($params);\n\t\t$this -> query = $query;\n\t\t\n\t\tif($n = strripos($query, \"insert\") === 0){\n\t\t\t$this -> type = 1;\t\t\t\n\t\t}\t\t\n\t\telseif($n = strripos($query, \"select\") === 0){\n\t\t\t$this -> type = 2;\t\t\t\n\t\t}\t\t\n\t\telseif($n = strripos($query, \"update\") === 0){\n\t\t\t$this -> type = 3;\t\t\t\n\t\t}\t\t\n\t\telseif($n = strripos($query, \"delete\") === 0){\n\t\t\t$this -> type = 4;\t\t\t\n\t\t}\n\t\telse{\n\t\t\tError::setError(\"Query incorreta, so sera aceito Update,Insert,Delete e Select\");\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "3bdf9d3eb90e383fcb71d16871ce490d", "score": "0.6445063", "text": "private function buildQuery()\n {\n }", "title": "" }, { "docid": "2b2c2e0d677b4403c4fe2d87fc1e6558", "score": "0.6436431", "text": "public function query();", "title": "" }, { "docid": "2b2c2e0d677b4403c4fe2d87fc1e6558", "score": "0.6436431", "text": "public function query();", "title": "" }, { "docid": "2b2c2e0d677b4403c4fe2d87fc1e6558", "score": "0.6436431", "text": "public function query();", "title": "" }, { "docid": "2b2c2e0d677b4403c4fe2d87fc1e6558", "score": "0.6436431", "text": "public function query();", "title": "" }, { "docid": "2b2c2e0d677b4403c4fe2d87fc1e6558", "score": "0.6436431", "text": "public function query();", "title": "" }, { "docid": "2b2c2e0d677b4403c4fe2d87fc1e6558", "score": "0.6436431", "text": "public function query();", "title": "" } ]
0ac7bdb02e5fbb03eb7a9ee5316bf396
Run the database seeds.
[ { "docid": "fe8bb5965028bb6deac073eb9e5b96ee", "score": "0.0", "text": "public function run()\n {\n $admin = new class implements Authenticatable\n {\n use \\Illuminate\\Auth\\Authenticatable;\n\n public function getAuthIdentifier()\n {\n return 1;\n }\n };\n $service = RoleEditService::getInstance($admin, RoleScope::getInstance());\n $service->edit('超級管理員', RoleInherentConstants::ADMIN, 'N');\n $service->edit('系統管理員', RoleInherentConstants::SYSTEM_MANAGER);\n $service->edit('會員', RoleInherentConstants::CUSTOM, 'Y', 'Y');\n }", "title": "" } ]
[ { "docid": "f74cb2c339072d43cd3b96858a89c600", "score": "0.8112695", "text": "public function run()\n {\n $this->seeds();\n }", "title": "" }, { "docid": "33aedeaa083b959fa5f66e27a7da3265", "score": "0.8026505", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t//Genre\n \\DB::table('genres')->insert(\n \t['name' => 'Comedia seed', 'ranking' => 354784395, 'active' => 1]\n );\n\n \\DB::table('actors')->insert([\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5]\n ]);\n }", "title": "" }, { "docid": "8d9ddbc23166c0cafca145e7a525c10a", "score": "0.80032176", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n /* $faker = Faker::create();\n foreach (range(1,100) as $index) {\n DB::table('product')->insert([\n 'productName' => $faker->company,\n 'description' => $faker->text,\n 'productId' => $faker->randomNumber(),\n 'images' => $faker->image(),\n ]);\n }*/\n $faker = Faker::create();\n foreach (range(1,10) as $index) {\n DB::table('recital')->insert([\n 'pagesRecital' => $faker->text,\n 'pageId' => $faker->randomNumber(),\n ]);\n }\n }", "title": "" }, { "docid": "8113ba9f29863f44dc33dbd7c0f98245", "score": "0.796029", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n DB::table('users')->insert([\n // [\n // 'name' => 'Alan',\n // 'email' => '[email protected]',\n // 'password' => '1234'\n // ],\n // [\n // 'name' => 'Alice',\n // 'email' => '[email protected]',\n // 'password' => '1234'\n // ],\n [\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => Hash::make( 'admin' )\n ],\n ]);\n \n // Création de 10 authors en utilisant la factory\n // la fonction factory de Laravel permet d'utiliser le facker définit\n factory(App\\Author::class, 10)->create();\n $this->call(BookTableSeeder::class);\n }", "title": "" }, { "docid": "424a278b0bd7df7af33c6c946314dcb5", "score": "0.7928953", "text": "public function run()\n {\n Model::unguard();\n\n // $this->call(UserTableSeeder::class);\n factory(App\\User::class, 100)->create();\n\n factory(App\\Category::class, 10)->create()->each(function ($c) {\n $c->audiobook()->saveMany(factory(App\\AudioBook::class, 10)->create()->each(function ($d) {\n $d->audiobookChapter()->saveMany(factory(App\\AudioBookChapter::class, 10)->create()->each(function ($chapter) use ($d) {\n $chapter->purchase()->saveMany(factory(App\\Purchase::class, 10)->create()->each(function ($purchase) use ($d, $chapter) {\n $purchase->user_id = User::all()->random(1)->id;\n $purchase->audiobookChapter_id = $chapter->id;\n $purchase->audiobook_id = $d->id;\n }));\n\n }));\n $d->review()->save(factory(App\\Review::class)->make());\n $d->wishlist()->save(User::all()->random(1));\n }));\n });\n\n\n factory(App\\Collection::class, 10)->create()->each(function ($c) {\n $c->audiobook()->saveMany(factory(App\\AudioBook::class, 5)->create()->each(function ($d) {\n $d->category_id = Category::all()->random(1)->id;\n }));\n });\n\n Model::reguard();\n }", "title": "" }, { "docid": "2fca9bf0725abd081819588688399860", "score": "0.7926935", "text": "public function run()\n {\n $this->call(VideogameSeeder::class);\n $this->call(CategorySeeder::class);\n User::factory(15)->create();\n DB::table('users')->insert([\n 'name' => 'Santiago',\n 'email' => '[email protected]',\n 'password' => bcrypt('12345678'),\n 'address' => 'C/ Ultra',\n 'rol' => 'admin'\n ]);\n //Ratin::factory(50)->create();\n Purchase::factory(20)->create();\n //UserList::factory(1)->create();\n }", "title": "" }, { "docid": "29a4267326dbe1e561d79877123a4ef8", "score": "0.79262906", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory('App\\User', 10)->create();\n factory('App\\School', 10)->create();\n factory('App\\Department', 20)->create();\n factory('App\\Course', 40)->create();\n factory('App\\CourseContent', 40)->create();\n factory('App\\CourseMaterial', 120)->create();\n factory('App\\Library', 200)->create();\n factory('App\\Download', 200)->create();\n factory('App\\Preview', 200)->create();\n factory('App\\Image', 5)->create();\n factory('App\\Role', 2)->create();\n }", "title": "" }, { "docid": "23ad0adf7c7d172d03ff87f186b2b80d", "score": "0.7900386", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n ['nome' => 'Wiiliam',\n 'usuario' => 'will',\n 'cpf' => '033781783958',\n 'tipo' => 'ADM',\n 'ativo' => 1,\n 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm'//secret\n ] \n ]);\n DB::table('dentes')->insert([\n ['nome' => 'canino', 'numero' => 39],\n ['nome' => 'molar', 'numero' => 2],\n ['nome' => 'presa', 'numero' => 21]\n ]);\n\n DB::table('servicos')->insert([\n ['nome' => 'Restauração', 'ativo' => 1],\n ['nome' => 'Canal', 'ativo' => 1],\n ['nome' => 'Limpeza', 'ativo' => 1]\n ]);\n }", "title": "" }, { "docid": "c5b1891e5f39d3e2551b908d083d5516", "score": "0.78698856", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n Poll::create([\n 'user_id' => 1,\n 'poll_name' => 'How much do you like me?',\n 'is_public' => 1,\n 'nr_choice' => 0\n ]);\n \n Votes::create([\n 'user_id' => 1,\n 'vote_to_poll' => 2\n ]);\n\n Choices::create([\n 'choice_id'=> 1,\n 'choice_text'=>'A lot.',\n 'choice_to_poll'=>1,\n 'nr_votes'=>260\n ]);\n\n Choices::create([\n 'choice_id'=> 2,\n 'choice_text'=>'A little.',\n 'choice_to_poll'=>1,\n 'nr_votes'=>178\n ]);\n }", "title": "" }, { "docid": "5b3dd72a68cd7caf5cb41622cf1f17f8", "score": "0.78664595", "text": "public function run()\n {\n // Truncate existing record in book table\n Book::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // Create dummy records in our table books:\n for ($i = 0; $i < 50; $i++) {\n Book::create([\n 'title' => $faker->title,\n 'author' => $faker->name,\n ]);\n }\n }", "title": "" }, { "docid": "0edef3cdac4be0882cf354181e1a63fd", "score": "0.7847239", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::table('users')->truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $faker = \\Faker\\Factory::create();\n\n $ranks = Rank::all();\n $roles = Role::all();\n\n // And now, let's create a few users in our database:\n for ($i = 0; $i < 5; $i++) {\n User::create([\n 'username' => \"user_$i\",\n 'pilot_callsign' => $faker->numerify('SCI###'),\n 'rank_id' => $ranks[rand ( 0 , $ranks->count()-1 )]->id,\n 'role_id' => $roles[0]->id\n ]);\n }\n }", "title": "" }, { "docid": "1696cae69b4e0dea414a1cad524c579c", "score": "0.78417265", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class, 10)->create();\n factory(Product::class, 20)->create();\n factory(Category::class, 8)->create();\n factory(Portfolio::class, 8)->create();\n factory(Article::class, 30)->create();\n }", "title": "" }, { "docid": "124d9b3ae818d6f7c553836f83b3f26d", "score": "0.7836289", "text": "public function run()\n {\n Schema::disableForeignKeyConstraints();\n\n // $this->call(UserSeeder::class);\n DB::table('teams')->truncate();\n DB::table('users')->truncate();\n DB::table('campaigns')->truncate();\n DB::table('memberships')->truncate();\n\n Schema::enableForeignKeyConstraints();\n\n // add users \n $usersfile = 'database/csvs/users.csv';\n $users = HelpersCsvHelper::csvToArray($usersfile);\n for ($i = 0; $i < count($users); $i++) {\n User::firstOrCreate($users[$i]);\n }\n\n // add teams\n $teamsfile = 'database/csvs/teams.csv';\n $teams = HelpersCsvHelper::csvToArray($teamsfile);\n for ($i = 0; $i < count($teams); $i++) {\n Teams::firstOrCreate($teams[$i]);\n }\n\n // add campaigns\n $Campaignsfile = 'database/csvs/campaigns.csv';\n $campaigns = HelpersCsvHelper::csvToArray($Campaignsfile);\n for ($i = 0; $i < count($campaigns); $i++) {\n Campaigns::firstOrCreate($campaigns[$i]);\n }\n\n // add memberships\n $Membershipsfile = 'database/csvs/memberships.csv';\n $memberships = HelpersCsvHelper::csvToArray($Membershipsfile);\n for ($i = 0; $i < count($memberships); $i++) {\n Memberships::firstOrCreate($memberships[$i]);\n }\n }", "title": "" }, { "docid": "7e308ea06065b02bb3be211e8748bf5f", "score": "0.7835999", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n DB::table('partidos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipo' => 1,\n ]);\n DB::table('partidos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipo' => 2,\n ]);\n DB::table('partidos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipo' => 3,\n ]);\n DB::table('partidos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipo' => 4,\n ]);\n DB::table('Puntos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipos' => 1,\n ]);\n DB::table('Puntos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipos' => 2,\n ]);\n DB::table('Puntos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipos' => 3,\n ]);\n DB::table('Puntos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipos' => 4,\n ]);\n }", "title": "" }, { "docid": "9d2abe13b05f99177e4f0e0cdd336b85", "score": "0.78325504", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(Category::class, 10)->create();\n factory(Blog::class, 10)->create();\n }", "title": "" }, { "docid": "29381516f53bafb0bf8797720ed6de7b", "score": "0.78240335", "text": "public function run()\n {\n\n $datas = [\n ['text' => 'Migracion'],\n ['text' => 'Familia'],\n ];\n\n\n foreach($datas as $data){\n \n $this->createSeeder($data);\n\n }\n }", "title": "" }, { "docid": "51daed999a883c3842fb92fb9bf4889b", "score": "0.78238165", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory('App\\User'::class, 20)->create();\n factory('App\\Post'::class, 1000)->create();\n factory('App\\Comment'::class, 2000)->create();\n }", "title": "" }, { "docid": "778b6afd89da9f29737c3c12e565289e", "score": "0.78130686", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Sid',\n 'email' => '[email protected]',\n 'role' => 'admin',\n 'password' => bcrypt(env('SEED_PWD')),\n ]);\n\n // 10 categorie\n $categories = factory(Category::class, 10)->create();\n\n // 20 tags\n $tags = factory(Tag::class, 20)->create();\n\n // 9 utenti\n factory(User::class, 9)->create();\n $users = User::all();\n // x ogni utente 15 posts\n foreach ($users as $user) {\n $posts = factory(Post::class, 15)->create([\n 'user_id' => $user->id,\n 'category_id' => $categories->random()->id,\n ]);\n\n foreach ($posts as $post) {\n $post->tags()->sync($tags->random(3)->pluck('id')->toArray());\n }\n }\n }", "title": "" }, { "docid": "770b2d73679fa00839175bb0616cbdea", "score": "0.78115416", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class,10)->create();\n factory(Product::class,100)->create();\n factory(Review::class,500)->create();\n }", "title": "" }, { "docid": "85cccae108d4de7f16063966a5657344", "score": "0.7810694", "text": "public function run()\n {\n\n $faker = \\Faker\\Factory::create();\n\n \\DB::table('news_categories')->delete();\n\n for ($i = 0; $i <= 10; $i++) {\n \\App\\Models\\NewsCategory::create([\n 'name' => $faker->text(40)\n ]);\n }\n\n \\DB::table('news')->delete();\n\n for ($i = 0; $i <= 40; $i++) {\n \\App\\Models\\News::create([\n 'title' => $faker->text(100),\n 'author_id' => 1,\n 'publish_date' => \\Carbon\\Carbon::now()->addDays(rand(1, 10)),\n 'content' => $faker->text(),\n 'source' => $faker->text(50),\n 'status' => rand(0, 1)\n ]);\n }\n }", "title": "" }, { "docid": "8ad50814f16b74d56ba096d0d57f2685", "score": "0.7809736", "text": "public function run()\n {\n $this->call(LaratrustSeeder::class);\n // $this->call(UsersTableSeeder::class);\n $discount = factory(\\App\\Discount::class, 1)->create();\n\n $categories = factory(\\App\\Category::class, 8)->create();\n $products = factory(\\App\\Product::class, 10)->create();\n $address=factory(\\App\\Users_address::class, 24)->create();\n $this->call(DiscountTableSeeder::class);\n $this->call(m_imagesTableSeeder::class);\n\n $images = factory(\\App\\m_image::class, 2)->create();\n\n }", "title": "" }, { "docid": "b762d028067463470324860cc9a29e0e", "score": "0.7805969", "text": "public function run(): void\n {\n $this->seedUsers();\n $this->seedCategories();\n $this->seedMedia();\n $this->seedProducts();\n $this->seedOrders();\n }", "title": "" }, { "docid": "4f83d3fdd97b667f526563987d1e2e6b", "score": "0.7802494", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Student::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now let's generate a few students for our app:\n $students = App\\User::where('role', 'Student')->get();\n foreach ($students as $student) {\n \tStudent::create([\n 'address' => $faker->city, \n 'user_id' => $student->id,\n ]);\t\t \n\t\t}\n }", "title": "" }, { "docid": "36b206fe3f9e5582fff99bdd44c268e2", "score": "0.77952313", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Edson Chivambo',\n 'email' => '[email protected]',\n 'password' => bcrypt('002523'),\n 'provincia_id' => '1',\n 'distrito_id' => '101',\n 'grupo' => '2'\n ]);\n\n\n DB::table('users')->insert([\n 'name' => 'Emidio Nhacudima',\n 'email' => '[email protected]',\n 'password' => bcrypt('Psi12345'),\n 'provincia_id' => '1',\n 'distrito_id' => '101',\n 'grupo' => '2'\n ]);\n/*\n // Let's truncate our existing records to start from scratch.\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 'title' => $faker->sentence,\n 'body' => $faker->paragraph,\n ]);\n }\n*/\n }", "title": "" }, { "docid": "914dd54501738d8f24f08d44c10d6a1f", "score": "0.77949405", "text": "public function run()\n {\n // default seeder to create fake users by using users factory\n // \\App\\Models\\User::factory(10)->create();\n\n // truncate deletes data or row from db. so when seed is run firsly it will delete the existing fiels\n // Product::truncate();\n // Category::truncate();\n // * first way for database seeding\n // creating a category and then passing it to create a product in seeder\n // $category = Category::create([\n // \"name\" => \"Headphones\",\n // \"description\" => \"This Category contains Headphones\"\n // ]);\n\n // Product::create([\n // \"product_name\" => \"Iphone\",\n // \"product_desc\" => \"An Iphone uses IOS and is developed by Apple\",\n // \"price\" => \"100000\",\n // \"category_id\" => $category->id\n // ]);\n // * using second method for creating/seeding fake data using factory \n // Category::factory(5)->create();\n //* overriding the default category_id of the factory in seeder\n Product::factory(3)->create([\n 'category_id' => 5\n ]);\n }", "title": "" }, { "docid": "73bbd2eb8a462a3994465397aabc387c", "score": "0.7793759", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $users = factory(App\\User::class, 5)->create();\n $product = factory(App\\Product::class, 50)->create();\n $reviews = factory(App\\Review::class, 100)->create()\n ->each(function ($review) {\n $review->reviews()->save(factory(App\\Product::class)->make());\n });\n }", "title": "" }, { "docid": "c3d306bf3f72eced986330e8fcc2293f", "score": "0.77799016", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(CategoriesTableSeeder::class);\n $this->call(ProductsTableSeeder::class);\n $this->call(PostsTableSeeder::class);\n $this->call(PagesTableSeeder::class);\n\n $id = DB::table('seos')->insertGetId([\n 'link' => url('/'),\n 'priority' => 0,\n 'status' => 'publish',\n ]);\n foreach (['vi','en'] as $lang) {\n DB::table('seo_languages')->insert([\n 'title' => 'Trang chủ',\n 'slug' => 'trang-chu',\n 'language' => $lang,\n 'seo_id' => $id,\n ]);\n }\n }", "title": "" }, { "docid": "89ccfc64e34980c1c88e0ac32bd95ed7", "score": "0.7779508", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n \tforeach (range(1,10) as $index) {\n\t DB::table('tags')->insert([\n\t 'title' => $faker->title,\n\t 'slug' => $faker->slug,\n\t \n\t ]);\n\t}\n }", "title": "" }, { "docid": "17ed7bd7f1c8118ed9c57701c65a3308", "score": "0.7774864", "text": "public function run()\n {\n require_once 'vendor/fzaninotto/faker/src/autoload.php';\n $faker = \\Faker\\Factory::create();\n\n// \\DB::table('articles')->delete();\n\n foreach (range(1, 50) as $index) {\n dump($faker->name);\n DB::table('articles')->insert([\n 'name' => $faker->name,\n 'description' => $faker->text($maxNbChars = 400),\n 'slug' => $index,\n 'autor_id' => 2\n ]);\n };\n \n }", "title": "" }, { "docid": "bd7aa608e63a171552e3b4da3b24f5ac", "score": "0.77732813", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Product::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 Product::create([\n 'product_name' => \"Product-\".$i,\n 'description' => \"Product-\".$i.\" Good Product\",\n 'price' => 1000,\n 'offer' => 10,\n 'category_id' => 1,\n 'p_status' => 'A',\n ]);\n }\n }", "title": "" }, { "docid": "c0702e537f33df7826aad62896f41818", "score": "0.77731556", "text": "public function run()\n {\n\n \tif(env('DB_DRIVER')=='mysql')\n\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=0;');\t\n\n\t\t\tDB::table('pages')->truncate();\n\n $faker = Faker::create();\n \t$cours = Db::table('cours')->lists('id') ;\n\n \tforeach (range(1,25) as $key => $value ) {\n\n \t\tPage::create([\n \t\t'title'=>$faker->sentence(3),\n \t\t'body'=>$faker->paragraph(4),\n \t\t'cour_id'=>$faker->randomElement($cours) \n\t ]);\n \t}\n\n \tif(env('DB_DRIVER')=='mysql')\n\t\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=1;') ;\n }", "title": "" }, { "docid": "a00d7625c3ac246fb4c8d0c5f542c844", "score": "0.7772737", "text": "public function run()\n {\n \n /*inserting dummy data, if we want to insert a 1000 of data,every seeder foreach table, it insert 1 data*/\n // DB::table('users')->insert([\n // 'name'=>str_Random(10), \n // 'email'=>str_random(10).'@gmail.com',\n // 'password'=>bcrypt('secret')\n // ]);\n //ro run : php artisan db:seed\n\n\n /**ANOTHER WAY */\n\n //User::factory()->count(10)->hasPosts(1)->create(); //if the user has a relation with post\n User::factory()->count(10)->create();\n\n \n \n }", "title": "" }, { "docid": "7610e7d2e2f861ae0a32e114a63a583f", "score": "0.77626514", "text": "public function run()\n {\n App\\Models\\BusinessItemSetupCases::create([\n 'id'=>100,\n 'item_case_name' => 'الضريبه',\n 'notes' => 'from seeder '\n ]);\n\n App\\Models\\BusinessItemSetupCases::create([\n 'id'=>101,\n 'item_case_name' => 'المشتريات',\n 'notes' => 'from seeder '\n ]);\n\n App\\Models\\BusinessItemSetupCases::create([\n 'id'=>102,\n 'item_case_name' => 'المبيعات',\n 'notes' => 'from seeder '\n ]);\n\n App\\Models\\BusinessItemSetupCases::create([\n 'id'=>103,\n 'item_case_name' => 'السيوله النقديه',\n 'notes' => 'from seeder '\n ]);\n }", "title": "" }, { "docid": "52b78ebee14aac0ddb50ea401a6a927b", "score": "0.776243", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\Models\\admin::class, 50)->create();\n factory(App\\Models\\category::class, 20)->create();\n factory(App\\Models\\clinic::class, 20)->create();\n factory(App\\Models\\nurse::class, 50)->create();\n factory(App\\Models\\Patient::class, 200)->create();\n factory(App\\Models\\comment::class, 500)->create();\n factory(App\\Models\\material::class, 500)->create();\n factory(App\\Models\\prescription::class, 500)->create();\n factory(App\\Models\\receipt::class, 400)->create();\n factory(App\\Models\\reservation::class, 600)->create();\n factory(App\\Models\\worker::class, 200)->create();\n // factory(App\\Models\\image::class, 500)->create();\n }", "title": "" }, { "docid": "b373718e9c234dc4bb756553db264c76", "score": "0.7762365", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call([\n RolesTableSeeder::class,\n UsersTableSeeder::class,\n PagesTableSeeder::class\n ]);\n\n \n \\Illuminate\\Support\\Facades\\DB::table('tbl_introductions')->insert([ \n 'fullname' => 'Ben Wilson',\n 'dob' => '26 September 1999',\n 'email' => '[email protected]',\n 'intro' => 'Hello, I am Ben.',\n 'image' => '1606288979.jpg', \n 'website' => 'www.company.co',\n 'created_at' => '2020-11-24 06:03:28' \n ]);\n }", "title": "" }, { "docid": "6d6a917428726975dd96f2e4e353f871", "score": "0.77620876", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Personas::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 Personas::create([\n 'nombre' => $faker->sentence,\n 'nit' => $faker->paragraph,\n ]);\n }\n }", "title": "" }, { "docid": "0b05db86e70b2e211fbf0469301f7d9a", "score": "0.7761681", "text": "public function run()\n {\n //\n DB::table('employees')->delete();\n $faker = Faker\\Factory::create();\n foreach(range(1,50) as $index)\n {\n Employee::create([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'avatar' => '',\n 'address' => $faker->address,\n 'phone'=> rand(0,9999).'-'.rand(0,9999).'-'.rand(0,9999),\n ]);\n }\n }", "title": "" }, { "docid": "df7b256adbff916fcdd12b520b0dc208", "score": "0.7760763", "text": "public function run() {\n\n\t\t// $this->call('ArticlesTableSeeder::class');\n\t\t// $this->call('CategoriesTableSeeder::class');\n\t\t// factory(App\\Article::class, 50)->create()->each(function ($u) {\n\t\t// \t$u->posts()->save(factory(App\\Article::class)->make());\n\t\t// });\n\n\t}", "title": "" }, { "docid": "e7527a5bc8529a2c2aad4c53046ea43d", "score": "0.7758918", "text": "public function run()\n {\n //\\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Section::factory(10)->create();\n // \\App\\Models\\Classe::factory(20)->create();\n // \\App\\Models\\Eleve::factory(120)->create();\n // \\App\\Models\\Stock::factory(2)->create();\n // \\App\\Models\\Category::factory(5)->create();\n // \\App\\Models\\Product::factory(120)->create();\n\n $this->call([\n AnneScolaireSeeder::class\n ]);\n }", "title": "" }, { "docid": "8efc8b6977291a12f6f3aba05752eca3", "score": "0.7758882", "text": "public function run()\n {\n $this->runSeeder();\n }", "title": "" }, { "docid": "7b81b233cbf3938d421802fdd7f8d35b", "score": "0.77587956", "text": "public function run()\n {\n $categories = [\n [\n 'name' => 'Groenten',\n 'description' => '',\n ],\n [\n 'name' => 'Fruit',\n 'description' => '',\n ],\n [\n 'name' => 'Zuivel',\n 'description' => '',\n ],\n [\n 'name' => 'Vlees',\n 'description' => '',\n ],\n ];\n\n foreach($categories as $category){\n Category::create($category);\n }\n\n //factory(Category::class, DatabaseSeeder::AMOUNT['DEFAULT'])->create();\n }", "title": "" }, { "docid": "3d3644d7189413baa46373e1ac7cdc8f", "score": "0.7754973", "text": "public function run()\n\t{\n\t\tDB::table('posts')->truncate();\n\n $faker = Faker\\Factory::create();\n\n\t\t$posts = [\n [\n 'title' => $faker->sentence(6),\n 'content' => $faker->paragraph(8),\n 'slug' => Str::slug('Hello World'),\n 'user_id' => User::first()->id,\n 'category_id' => Category::whereName('Php')->first()->id,\n 'created_at' => new DateTime,\n 'updated_at' => new DateTime\n ]\n ];\n\n\t\t// Uncomment the below to run the seeder\n\t\tfor ($i=0; $i < 10; $i++) {\n $tag = DB::table('tags')->orderBy('RAND()')->first();\n\n $post_title = $faker->sentence(6);\n\n $post = [\n 'title' => $post_title,\n 'content' => $faker->paragraph(8),\n 'slug' => Str::slug($post_title),\n 'user_id' => $faker->randomElement(User::all()->lists('id')),\n 'category_id' => $faker->randomElement(Category::all()->lists('id')),\n 'created_at' => $faker->dateTime,\n 'updated_at' => new DateTime\n ];\n\n $id = DB::table('posts')->insert($post);\n Post::find($id)->tags()->sync(Tag::all()->lists('id'));\n }\n\n // $this->command->info('Posts table seeded !');\n\t}", "title": "" }, { "docid": "ab9c424e435c82e381ba211c2fe79243", "score": "0.7753077", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n // User::factory()->count(200)\n // ->has(Order::factory()->count(random_int(1, 20)))\n // ->has(Assigned_order::factory()->count(random_int(1,5)))\n // ->has(Blocked_writer::factory()->count(random_int(0, 2)))\n // ->has(Favourite_writer::factory()->count(random_int(0, 5)))\n // ->has(Payed_order::factory()->count(random_int(2, 6)))\n // ->has(Notification::factory()->count(random_int(5, 20)))\n // ->has(Review::factory()->count(random_int(1, 2)))\n // ->has(Assigned_order::factory()->count(random_int(1, 3)))\n // ->create();\n }", "title": "" }, { "docid": "34546962185839c8810e561de7b0508a", "score": "0.77510494", "text": "public function run()\n {\n //$this->call(RestaurantTableSeeder::class);\n factory(App\\User::class,5)->create();\n factory(App\\Model\\Restaurant::class, 10)->create()->each(function ($restaurant) {\n $restaurant->contacts()->save(factory(App\\Model\\Contact::class)->make());\n });\n factory(App\\Model\\Menu::class,30)->create();\n factory(App\\Model\\Item::class,100)->create();\n factory(App\\Model\\Option::class,200)->create();\n factory(App\\Model\\MultiCheckOption::class, 500)->create();\n factory(App\\Model\\Customer::class, 100)->create();\n factory(App\\Model\\Order::class, 300)->create();\n }", "title": "" }, { "docid": "e92b39c751271622081fe6a63248f0d3", "score": "0.7745997", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n Seo::create([\n 'url' => '/',\n 'title' => 'title default',\n 'keywords' => 'keywords default',\n 'description' => 'description default',\n ]);\n\n User::create([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('1234567'),\n ]);\n }", "title": "" }, { "docid": "e5d1626abf07334bad40def153b6ebf5", "score": "0.7744136", "text": "public function run()\n {\n $this->call(UserSeeder::class);\n $this->call(CategorySeeder::class);\n $this->call(MediaSeeder::class);\n //$this->call(GuestSeeder::class);\n $faker = Faker::create();\n \tforeach (range(1,10) as $index) {\n\t DB::table('guests')->insert([\n 'roomnumber' => Category::all()->random()->id,\n 'name' => $faker->firstName,\n 'surname' => $faker->name,\n 'email' => $faker->email,\n 'phonenumber' => $faker->phoneNumber\n\t ]);\n\t }\n\n }", "title": "" }, { "docid": "8da9a1776904f6cc6a5ccc3953a8e40f", "score": "0.7742624", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('products')->insert([\n 'name' => 'Basil',\n 'price' => 0.99,\n 'description' => 'Perhaps the most popular and widely used culinary herb.',\n ]);\n DB::table('products')->insert([\n 'name' => 'Bay Laurel',\n 'price' => 1.99,\n 'description' => 'Bay laurel is an evergreen shrub or tree in warmer growing zones ( 8 and above).',\n ]);\n DB::table('products')->insert([\n 'name' => 'Borage',\n 'price' => 2.99,\n 'description' => 'Borage is a coarse textured plant growing to about 2-3 feet.',\n ]);\n DB::table('products')->insert([\n 'name' => 'Caraway',\n 'price' => 3.99,\n 'description' => 'Caraway is most often grown for its seeds, but the root and leaves are also edible.',\n ]);\n DB::table('products')->insert([\n 'name' => 'Catnip',\n 'price' => 4.99,\n 'description' => 'Catnip is a hardy perennial with an open mound shaped habit growing to about 2-3 feet tall.',\n ]);\n\n }", "title": "" }, { "docid": "cac69861fb7a00c50daa5b54ee724177", "score": "0.7740592", "text": "public function run()\n {\n //\n DB::table('Proveedores')->insert([\n \t[\n \t'nombre'=> 'juan perez',\n \t'marca'=> 'matel',\n \t'correo_electronico'=> '[email protected]',\n \t'direccion'=>'av. peru 321,santiago',\n \t'fono'=> 993842739\n \t]\n ]);\n\n $faker=Faker::create();\n for ($i=0; $i <20 ; $i++) { \n DB::table('Proveedores')->insert([\t\n \t'nombre'=> $faker->name,\n \t'marca'=>$faker->company,\n \t'correo_electronico'=> $faker->email,\n \t'direccion'=>$faker->address,\n \t'fono'=> $faker->isbn10 ,\n ]);\n }\n }", "title": "" }, { "docid": "9a3fc5f60166a9785c73750188e6596d", "score": "0.7737875", "text": "public function run()\n {\n // $this->call(UserTableSeeder::class);\n /*\n DB::table('product')->insert([\n 'title' => 'Ceci est un titre de produit',\n 'description' => 'lorem ipsum',\n 'price' => 12,\n 'brand' => 'nouvelle marque',\n ]);\n */\n factory(App\\Product::class, 2)->create();\n factory(App\\Categorie::class, 2)->create();\n }", "title": "" }, { "docid": "b6066308d0ac655bb5d5825a458ef8b1", "score": "0.77361476", "text": "public function run()\n {\n $this->call(RolesTableSeeder::class);\n $this->call(LangauageTableSeeder::class);\n $this->call(CountryTableSeeder::class);\n\n \n\n Country::create([\n 'name' => 'India'\n ]);\n\n Country::create([\n 'name' => 'USA'\n ]);\n\n Country::create([\n 'name' => 'UK'\n ]);\n\n CompanyCateogry::updateOrCreate([\n 'name' => 'category1'\n ]);\n\n factory(App\\Models\\Customer::class, 50)->create();\n factory(App\\Models\\Supplier::class, 50)->create();\n // $this->call(CompanySeeder::class);\n $this->call(InvoiceSeeder::class);\n $this->call(CashFlowSeeder::class);\n }", "title": "" }, { "docid": "8de228115e4192b5098d2a339ff99bf2", "score": "0.7735688", "text": "public function run()\n {\n //delete the users table when the seeder is called\n DB::table('users')->delete();\n\n Eloquent::unguard();\n\n\t\t//disable foreign key before we run the seeder\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n factory(App\\User::class, 50)->create();\n\n //Also create these accounts - used for easy testing purposes\n DB::table('users')->insert([\n [\n 'name' => 'Test',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'email_verified_at' => now(),\n 'bio' => 'Sed ut perspiciatis unde omnis iste natus',\n ],\n [\n 'name' => 'Test2',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'email_verified_at' => now(),\n 'bio' => 'Sed ut perspiciatis unde omnis iste natus',\n\n ],\n ]);\n }", "title": "" }, { "docid": "e0d9bd8b4c025867e30c1a5579c4da9c", "score": "0.7734883", "text": "public function run()\n {\n\n $this->call([\n EstadosSeeder::class,\n MunicipiosSeeder::class,\n RelacionEstadosMunicipiosSeeder::class,\n StatusSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Categories::factory()->count(20)->create();\n \\App\\Models\\Products::factory()->count(100)->create();\n \\App\\Models\\Galery::factory()->count(1000)->create();\n \\App\\Models\\Providers::factory()->count(20)->create();\n \\App\\Models\\Valorations::factory()->count(1000)->create();\n \\App\\Models\\Sales::factory()->count(999)->create();\n \\App\\Models\\Directions::factory()->count(999)->create();\n \\App\\Models\\LastView::factory()->count(999)->create();\n \\App\\Models\\Offers::factory()->count(20)->create();\n // \\App\\Models\\Favorites::factory()->count(50)->create();\n \\App\\Models\\Notifications::factory()->count(999)->create();\n /**\n * $this->call([\n * CategoriesSeeder::class,\n * ]);\n */\n\n $this->call([\n FavoritesSeeder::class,\n ]);\n\n }", "title": "" }, { "docid": "79751b67da244a7913b06f140364d6c0", "score": "0.7732834", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n User::truncate();\n PartCategory::truncate();\n Brand::truncate();\n Manufacturer::truncate();\n PartSubcategory::truncate();\n Part::truncate();\n Admin::truncate();\n\n $usersQuantity = 500;\n $categoriesQuantity = 30;\n $subCategoriesQuantity = 200;\n $partQuantity = 1000;\n $brandQuantity = 20;\n $manufacturerQuantity = 50;\n $adminQuantity = 10;\n\n factory(User::class, $usersQuantity)->create();\n factory(PartCategory::class, $categoriesQuantity)->create();\n factory(Brand::class, $brandQuantity)->create();\n factory(Manufacturer::class, $manufacturerQuantity)->create();\n\n factory(PartSubcategory::class, $subCategoriesQuantity)->create();\n factory(Part::class, $partQuantity)->create();\n\n factory(Admin::class, $adminQuantity)->create();\n\n }", "title": "" }, { "docid": "fb7d5bba21289ca1ca2041a5e18bd077", "score": "0.77297103", "text": "public function run()\n {\n// factory(Category::class, 20)->create();\n// factory(Post::class, 50)->create();\n// factory(Tag::class, 10)->create();\n\n $this->call(UserTableSeed::class);\n $this->call(PostTableSeed::class);\n }", "title": "" }, { "docid": "77fb1d45e59d982eac35251a4446cfa5", "score": "0.7728479", "text": "public function run()\n {\n //Cmd: php artisan db:seed --class=\"recommendTableSeeder\"\n \n $faker = Faker\\Factory::create(\"ja_JP\");\n \n for( $i=0; $i<10; $i++ ){\n\n App\\Recommend::create([\n\t\t\t\t\t\"from_user\" => $faker->randomDigit(),\n\t\t\t\t\t\"to_man\" => $faker->randomDigit(),\n\t\t\t\t\t\"to_woman\" => $faker->randomDigit(),\n\t\t\t\t\t\"to_man_message\" => $faker->word(),\n\t\t\t\t\t\"to_woman_message\" => $faker->word(),\n\t\t\t\t\t\"man_qa_1\" => $faker->randomDigit(),\n\t\t\t\t\t\"man_qa_2\" => $faker->randomDigit(),\n\t\t\t\t\t\"man_qa_3\" => $faker->randomDigit(),\n\t\t\t\t\t\"woman_qa_1\" => $faker->randomDigit(),\n\t\t\t\t\t\"woman_qa_2\" => $faker->randomDigit(),\n\t\t\t\t\t\"woman_qa_3\" => $faker->randomDigit(),\n\t\t\t\t\t\"created_at\" => $faker->dateTime(\"now\"),\n\t\t\t\t\t\"updated_at\" => $faker->dateTime(\"now\")\n ]);\n }\n }", "title": "" }, { "docid": "95f6236854296207546d9b1517fa175a", "score": "0.77278304", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n\n // Create 10 records of posts\n factory(App\\Post::class, 10)->create()->each(function ($post) {\n // Seed the relation with 5 comments\n $commments = factory(App\\Comment::class, 5)->make();\n $post->comments()->saveMany($commments);\n });\n }", "title": "" }, { "docid": "1667303ce0032ddd973fad5eb00529bd", "score": "0.7726387", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('user_roles')->insert(['name' => 'System Admin', 'description' => 'Description',]);\n DB::table('user_roles')->insert(['name' => 'Owner', 'description' => 'System Owner',]);\n DB::table('user_roles')->insert(['name' => 'Admin', 'description' => 'Admin',]);\n DB::table('user_roles')->insert(['name' => 'Editor', 'description' => 'Editor',]);\n DB::table('user_roles')->insert(['name' => 'Viewer', 'description' => 'Viewer',]);\n }", "title": "" }, { "docid": "f198ce46b8e947563c34aa166ca6fd70", "score": "0.772602", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(\\App\\TourCategory::class, 4)->create()->each(function (\\App\\TourCategory $category) {\n $category->tours()->saveMany(\n factory(\\App\\Tour::class,10)->make()\n );\n });\n }", "title": "" }, { "docid": "377c3a872d4a300cceb5049caf48d66a", "score": "0.7725185", "text": "public function run()\n {\n $this->call([\n UsersTabeleSeeder::class,\n PostsTabeleSeeder::class,\n CategoriesTabeleSeeder::class,\n ]);\n\n //Get array of ids\n $postIds = DB::table('posts')->pluck('id')->all();\n $categoryIds = DB::table('categories')->pluck('id')->all();\n\n //Seed category_post table with max 40 entries\n foreach ((range(1, 70)) as $index) \n {\n DB::table('category_post')->updateOrInsert(\n [\n 'post_id' => $postIds[array_rand($postIds)],\n 'category_id' => $categoryIds[array_rand($categoryIds)]\n ]\n );\n }\n }", "title": "" }, { "docid": "e44b2f3d77d7329f6b2d733b04c6ab80", "score": "0.7718937", "text": "public function run()\n {\n // we can seed specific data directory\n /**\n Let's try \"Faker\" to prepopulate with lots of imaginery data very quickly!\n\n */\n\n $faker = Faker\\Factory::create();\n\n foreach(range(1, 25 ) as $index){\n \tDB::table( 'tweets')->insert(array(\n \t\t'user_id' => rand(1,25),\n \t\t'message' => $faker->catchphrase\n \t));\n }\n }", "title": "" }, { "docid": "064da3a1fd5b172768671dc5b6f1169d", "score": "0.7718056", "text": "public function run()\n {\n\n\n\n Storage::deleteDirectory('eventos');\n\n Storage::makeDirectory('eventos');\n\n $this->call(RoleSeeder::class);\n\n $this->call(UserSeeder::class);\n \n Categoria::factory(4)->create();\n \n $this->call(EventoSeeder::class);\n\n $this->call(AporteSeeder::class);\n\n $this->call(ObjetoSeeder::class);\n\n }", "title": "" }, { "docid": "f6e951e99c926a5aa070324982a80a85", "score": "0.7717371", "text": "public function run()\n {\n Model::unguard();\n\n $seedData = [\n 'Taiwan' => [\n 'Taipei City',\n 'New Taipei City',\n 'Taoyuan City',\n 'Taichung City',\n 'Kaohsiung City',\n 'Tainan City',\n 'Hsinchu City',\n 'Chiayi City',\n 'Keelung City',\n 'Hsinchu County',\n 'Miaoli County',\n 'Changhua County',\n 'Nantou County',\n 'Yunlin County',\n 'Chiayi County',\n 'Pingtung County',\n 'Yilan County',\n 'Hualien County',\n 'Taitung County',\n 'Kinmen County',\n 'Lienchiang County',\n 'Penghu County',\n ]\n ];\n\n foreach ($seedData as $countryName => $cityList) {\n $country = Country::create(['name' => $countryName]);\n\n foreach ($cityList as $cityName) {\n $country->cities()->create(['name' => $cityName]);\n }\n }\n\n Model::reguard();\n }", "title": "" }, { "docid": "4fc1f9ee76a037b3655d6f4e73603494", "score": "0.7714682", "text": "public function run()\n {\n //\n //factory(App\\User::class)->create();\n\n DB::table('users')->insert(\n [\n 'name' => 'Seyi', \n 'email' => '[email protected]',\n 'password' => 'somerandompassword'\n ]\n );\n DB::table('posts')->insert([\n [\n 'title' => 'My First Post', \n 'content' => 'lorem ipsum dolor sit ammet',\n 'user_id' => 1\n ], [\n 'title' => 'My second Post', \n 'content' => 'lorem ipsum dolor sit ammet',\n 'user_id' => 1\n ], [\n 'title' => 'My third Post', \n 'content' => 'lorem ipsum dolor sit ammet',\n 'user_id' => 1\n ]\n ]);\n \n \n }", "title": "" }, { "docid": "80b4dcada74bc12860abdaff1c2aa1bb", "score": "0.7712008", "text": "public function run()\n {\n $faker = Faker::create();\n foreach (range(1, 50) as $index) {\n DB::table('books')->insert([\n 'name' => $faker->firstName(),\n 'yearOfPublishing' => $faker->year(),\n 'content' => $faker->paragraph(1, true),\n 'author_id' => $faker->numberBetween(1, 50),\n ]);\n }\n }", "title": "" }, { "docid": "af51801570c9648f237f5a51624f4182", "score": "0.77119786", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(function($user){\n $user->question()->saveMany(factory(App\\Question::class,rand(1,5))->make())\n ->each(function($question){\n $question->answer()->saveMany(factory(App\\Answer::class,rand(1,5))->make());\n });\n });\n }", "title": "" }, { "docid": "bd6458274ff09172851640f92c233c59", "score": "0.77101403", "text": "public function run()\n {\n Schema::disableForeignKeyConstraints();\n \n User::truncate();\n TipoUsuario::truncate();\n Reserva::truncate();\n PuntuacionEstablecimiento::truncate();\n PuntuacionProducto::truncate();\n Producto::truncate();\n Imagen::truncate();\n Establecimiento::truncate();\n Carta::truncate();\n\n $this->call(TipoUsuarioSeeder::class);\n\n foreach (range(1, 10) as $i){\n $u = factory(User::class)->create();\n $u->usuarios_tipo()->attach(TipoUsuario::all()->random());\n }\n\n\n //factory(Establecimiento::class,4)->create();\n //factory(Reserva::class,20)->create();\n //factory(Carta::class, 4)->create(); //Crear tantas como restaurantes\n //factory(Producto::class,100)->create();\n //factory(PuntuacionEstablecimiento::class,50)->create();\n //factory(PuntuacionProducto::class,50)->create();\n //factory(Imagen::class,200)->create();\n\n Schema::enableForeignKeyConstraints(); \n }", "title": "" }, { "docid": "7d3aed410918c722790ec5e822681b71", "score": "0.7708702", "text": "public function run() {\n \n //seed should only be run once\n $faker = Faker::create();\n\n $cat = [\n 1 => \"Home Appliances\",\n 2 => \"Fashion\",\n 3 => \"Home & Living\",\n 4 => \"TV, Gaming, Audio, WT\",\n 5 => \"Watches, Eyewear, Jewellery\",\n 6 => \"Mobiles & Tablets\",\n 7 => \"Cameras\",\n 8 => \"Computers & Laptop\",\n 9 => \"Travel & Luggage\",\n 10 => \"Health & Beauty\",\n 11 => \"Sports, Automotive\",\n 12 => \"Baby, Toys\",\n ];\n\n for ($i = 1; $i <= 12; $i++) {\n DB::table('categories')->insert([\n 'name' => $cat[$i],\n 'image' => $faker->imageUrl($width = 640, $height = 480),\n \n 'created_at' => $faker->dateTimeThisYear($max = 'now'),\n 'updated_at' => \\Carbon\\Carbon::now(),\n ]);\n }\n }", "title": "" }, { "docid": "75f8fae397ad6cf1e3077c2a32e423ad", "score": "0.77076155", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n User::truncate();\n Category::truncate();\n Product::truncate();\n WarrantyProduct::truncate();\n\n factory(User::class, 200)->create();\n\n factory(Category::class, 10)->create()->each(\n function ($category){\n factory(Product::class, mt_rand(8,15))->create(['category_id' => $category->id])->each(\n function ($product){\n factory(WarrantyProduct::class, mt_rand(2, 3))->create(['product_id' => $product->id]);\n }\n );\n }\n );\n\n }", "title": "" }, { "docid": "8b07e67f8045192de7c1b932e58f1d17", "score": "0.77057153", "text": "public function run()\n {\n /*$faker = Faker\\Factory::create();\n foreach(range(1,10) as $index){\n App\\Post::create([\n 'title'=> $faker->name,\n 'description'=> $faker->name,\n 'content'=> $faker->name\n ]);\n }*/\n\n Post::create([\n 'title'->title,\n 'description'->description,\n 'content'->content\n ]);\n }", "title": "" }, { "docid": "ddf328298d79f78f3d971cd04aba1d68", "score": "0.7705306", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(RoleTableSeeder::class);\n $this->call(PermissionTableSeeder::class);\n\n\n factory(\\App\\Entities\\Category::class, 3)->create()->each(function ($c){\n $c->products()\n ->saveMany(\n factory(\\App\\Entities\\Product::class, 3)->make()\n );\n });\n }", "title": "" }, { "docid": "5f9901567b2bd8ddbdf263c78ddac102", "score": "0.7703055", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n \n // User Table Data\n /*for($i = 0; $i < 1000; $i++) {\n \tApp\\User::create([\n\t 'email' => $faker->email,\n\t 'password' => $faker->password,\n\t 'full_name' => $faker->name,\n\t 'phone_number' => $faker->name,\n\t ]);\n\t }*/\n\n // User Event Data\n\t /*for($i = 0; $i < 50; $i++) {\n \tApp\\Events::create([\n\t 'event_name' => $faker->name,\n\t 'event_date' => $faker->date,\n\t 'event_startTime' => '2019-01-01',\n\t 'event_duration' => '2',\n\t 'event_venue' => $faker->address,\n\t 'event_speaker' => '1',\n\t 'event_sponsor' => '3',\n\t 'event_topic' => $faker->text,\n\t 'event_details' => $faker->text,\n\t 'event_avatar' => $faker->imageUrl,\n\t 'created_at' => $faker->date(),\n\t ]);\n\t }*/\n }", "title": "" }, { "docid": "6fbcd5e15b63b9dabff8dbaff5d2ea82", "score": "0.77023256", "text": "public function run()\n {\n $faker = Factory::create();\n\n Persona::truncate();\n Pago::truncate();\n Detalle::truncate();\n\n // Schema::disableForeignKeyConstraints();\n User::truncate();\n // HaberDescuento::truncate();\n // Schema::enableForeignKeyConstraints();\n\n User::create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'dni' => '12345678',\n 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret\n 'remember_token' => Str::random(10),\n ]);\n\n // foreach (range(1, 25) as $i) {\n // $dni = mt_rand(10000000, 99999999);\n // Persona::create([\n // 'nombre' => $faker->firstname,\n // 'apellidoPaterno' => $faker->lastname,\n // 'apellidoMaterno' => $faker->lastname,\n // 'dni' => $dni,\n // 'codmodular' => '10' . $dni,\n // 'user_id' => 1,\n // 'estado' => $faker->randomElement(['activo', 'inactivo']),\n // ]);\n // }\n\n }", "title": "" }, { "docid": "2db117b1d28054b0f08a58115645189d", "score": "0.7701633", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n // ?for seeding categories\n // Category::factory(5)->create();\n //? for seeding posts \n Post::factory(3)->create([\n 'category_id' => 5\n ]);\n }", "title": "" }, { "docid": "4e84e995d3e716ac7ab157ddfcc67a39", "score": "0.7700629", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\Tag::class, 10)->create();\n\n // Get all the roles attaching up to 3 random roles to each user\n $tags = App\\Tag::all();\n\n\n factory(App\\User::class, 10)->create()->each(function($user) use ($tags){\n $user->save();\n factory(App\\Question::class, 5)->create(['user_id'=>$user->id])->each(function($question) use ($user, $tags){\n \n $question->tags()->attach(\n $tags->random(rand(1, 10))->pluck('id')->toArray()\n ); \n factory(App\\Comment::class, 5)->create(['user_id'=>$user->id, 'question_id'=>$question->id])->each(function($comment){\n $comment->save(); \n });\n });\n });\n }", "title": "" }, { "docid": "44607c99534f6f67a920e806653b05d8", "score": "0.76990753", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n \\App\\Models\\Rol::factory(10)->create();\n \\App\\Models\\Persona::factory(10)->create();\n \\App\\Models\\Configuracion::factory(10)->create();\n }", "title": "" }, { "docid": "5e28bc59cffaacbd443ac1937265c50b", "score": "0.76987165", "text": "public function run()\n {\n $this->call(PostsTableSeeder::class);\n $this->call(SiswaSeeder::class);\n $this->call(MusicsTableSeeder::class);\n $this->call(FilmSeeder::class);\n // $this->call(UsersTableSeeder::class);\n factory(App\\Tabungan::class, 100)->create();\n factory(App\\Costumer::class, 1000)->create();\n }", "title": "" }, { "docid": "55df2400596f6d82130eb26db7635b8b", "score": "0.7695885", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contact::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 Contact::create([\n 'first_name' => $faker->name,\n 'last_name' => $faker->name,\n 'email' => $faker->email,\n 'telephone' => $faker->phoneNumber,\n 'contact_type' => $faker->name,\n ]);\n }\n }", "title": "" }, { "docid": "d250f232a40eb13d0fa688dd5dc63e8c", "score": "0.7693821", "text": "public function run()\n {\n factory(App\\User::class,5)->create();\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'type' => 1,\n 'confirmed' =>1,\n ]);\n\n factory(App\\Category::class,5)->create();\n\n $categories_array = App\\Category::all('id')->pluck('id')->toArray();\n\n $post = factory(App\\Post::class,20)->create()->each(function($post) use ($categories_array){\n $this->attachRandomCategoriesToPost($post->id, $categories_array);\n $this->addCommentsToPost($post->id);\n });\n }", "title": "" }, { "docid": "f440a18e1170b8250c14144757b8cc81", "score": "0.76937693", "text": "public function run()\n\t{\n\t\t//\n\t\tApp\\Book::truncate();\n\t\tApp\\Genre::truncate();\n\t\tApp\\Author::truncate();\n\n\t\tfactory(App\\Book::class, 50)->create()->each(function($books) {\n\t\t$books->authors()->save(factory(App\\Author::class)->make());\n\t\t$books->genres()->save(factory(App\\Genre::class)->make());\n\t\t});\n\t}", "title": "" }, { "docid": "14bcfcdf178e55585d48d15b958ccfc6", "score": "0.7693058", "text": "public function run()\n {\n $data = json_decode(file_get_contents(database_path('seeds/data/voyager.json')), true);\n foreach ($data as $table => $tableData) {\n $this->command->info(\"Seeding ${table}.\");\n \\Illuminate\\Support\\Facades\\DB::table($table)->delete();\n \\Illuminate\\Support\\Facades\\DB::table($table)->insert($tableData);\n }\n\n// $this->seed('DataTypesTableSeeder');\n// $this->seed('DataRowsTableSeeder');\n $this->seed('MenusTableSeeder');\n// $this->seed('MenuItemsTableSeeder');\n $this->seed('RolesTableSeeder');\n $this->seed('PermissionsTableSeeder');\n $this->seed('PermissionRoleTableSeeder');\n $this->seed('SettingsTableSeeder');\n }", "title": "" }, { "docid": "dbd59b913d32cfed4a7fd5cda3083940", "score": "0.7692271", "text": "public function run()\n {\n //\n DB::table('oa')->delete();\n\n DB::table('oa')->insert([\n /*'id' => 1,*/\n /*'id_educativo' => 1,\n 'id_general' => 1,\n 'id_clasificacion' => 1,\n 'id_tecnica' => 1,*/\n ]);\n\n $this->call(Lom_generalSeeder::class);\n $this->call(Lom_clasificacionSeeder::class);\n $this->call(Lom_educativoSeeder::class);\n $this->call(Lom_tecnicaSeeder::class);\n }", "title": "" }, { "docid": "654191b89a3f7b4f8f809dd4ca1e2f6d", "score": "0.76909655", "text": "public function run()\n {\n /**\n * Create default user for admin, lecturer and student\n */\n User::create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('admin'),\n 'role' => 'admin'\n ]);\n\n User::create([\n 'name' => 'Sample Lecturer',\n 'email' => '[email protected]',\n 'password' => Hash::make('lecturer'),\n 'role' => 'admin'\n ]);\n\n User::create([\n 'name' => 'Student',\n 'email' => '[email protected]',\n 'password' => Hash::make('student'),\n 'role' => 'student'\n ]);\n\n /**\n * Create random 300 users with faker and role/password equal \"student\"\n */\n factory(App\\User::class, 300)->create();\n\n // run with php artisan migrate --seed\n }", "title": "" }, { "docid": "82fbb499231e85aef13b133c2fd7bebb", "score": "0.76907074", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Tomas Landa',\n 'email' => '[email protected]',\n 'password' => Hash::make('123456789'),\n ]);\n\n\n $this->call(AuthorSeeder::class);\n $this->call(BookSeeder::class);\n\n\n }", "title": "" }, { "docid": "7d5e2b097fa405f728e42815bc2fa95f", "score": "0.76902896", "text": "public function run()\n {\n Category::create(['name' => 'remeras']);\n Category::create(['name' => 'camperas']);\n Category::create(['name' => 'pantalones']);\n Category::create(['name' => 'gorras']);\n Category::create(['name' => 'mochilas']);\n Category::create(['name' => 'Sombreros']);\n Category::create(['name' => 'Muñequeras']);\n Category::create(['name' => 'Medias']);\n\n $discounts = Discount::factory(40)->create();\n\n $products = Product::factory(50)\n ->make()\n ->each(function ($product){\n $categories = Category::all();\n $product->category_id = $categories->random()->id;\n $product->save();\n });\n\n }", "title": "" }, { "docid": "acbc8ce8381dd5242a3f70eb7db2f7b0", "score": "0.76889795", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'name' => 'mohamed magdy',\n 'email' => '[email protected]'\n ]);\n factory(User::class)->create([\n 'name' => 'ahmed magdy',\n 'email' => '[email protected]'\n ]);\n factory(User::class)->create([\n 'name' => 'abdelhameed',\n 'email' => '[email protected]'\n ]);\n }", "title": "" }, { "docid": "1bfaef844c455e578ca42264d7b5fd55", "score": "0.76846653", "text": "public function run()\n {\n factory(User::class, 10)->create();\n factory(Category::class, 6)->create();\n factory(Question::class, 60)->create();\n factory(Reply::class, 160)->create();\n factory(Like::class, 200)->create();\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "b9641bc88f5f5c670d56d18a040a9927", "score": "0.7675924", "text": "public function run()\n {\n //création de seeder grace a faker\n // $faker = Faker::create();\n // for ($user = 0; $user < 10; $user++){\n // \\App\\User::create([\n // 'name' => $faker->name,\n // 'email' => $faker->unique()->safeEmail,\n // 'password' =>bcrypt('secret')\n // ]);\n // }\n \\App\\User::create([\n 'name' =>'Admin',\n 'email' => '[email protected]',\n 'password' =>bcrypt('adminadmin'),\n 'admin' =>1\n ]);\n\n\n //permet de créer des utilisateurs sans les relations\n factory(\\App\\User::class, 20)->create();\n\n //permet de créer 10 articles chacun écrit par un seul utilisateur\n // factory(\\App\\User::class, 10)->create()->each(function ($u) {\n // $u->articles()->save(factory(\\App\\Article::class)->make());\n // });\n\n //Permet de creer 20 articles par utilisateur -> 15x 20\n // $user = factory(\\App\\User::class, 15)->create();\n // $user->each(function ($user) {\n // factory(\\App\\Article::class, 20)->create([\n // 'user_id' => $user->id\n // ]);\n // });\n }", "title": "" }, { "docid": "0a79213fd15a52faa35b5d39bdf72ab9", "score": "0.7673569", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\Categoria::class, 2)->create();\n\n //Se crearan 40 post\n factory(App\\Curso::class, 40)->create();\n }", "title": "" }, { "docid": "3114ddd54d20a2718dff9452d5974cde", "score": "0.76679426", "text": "public function run()\n {\n $faker = Faker::create();\n foreach (range(1, 20) as $index) {\n \\DB::table('employees')->insert([\n 'name' => $faker->name,\n 'age' => rand(22, 40),\n 'email' => $faker->email,\n 'gender' => $faker->randomElement(array('male', 'female')),\n 'country' => $faker->country\n ]);\n }\n }", "title": "" }, { "docid": "032e6df09c32ce0c18c6e5a3dcfd03cd", "score": "0.76679265", "text": "public function run()\n {\n\t DB::table('roles')->insert([\n\t\t 'name' => 'admin'\n\t ]);\n\n\t DB::table('users')->insert([\n\t\t 'name' => 'David Trushkov',\n\t\t 'email' => '[email protected]',\n\t\t 'password' => bcrypt('d16331633'),\n\t\t 'remember_token' => str_random(10),\n\t\t 'verified' => 1,\n\t\t 'token' => '',\n\t\t 'avatar' => '',\n\t\t 'created_at' => \\Carbon\\Carbon::now()->format('Y-m-d H:i:s'),\n\t\t 'updated_at' => \\Carbon\\Carbon::now()->format('Y-m-d H:i:s'),\n\t ]);\n\n\t DB::table('user_role')->insert([\n\t\t 'user_id' => 1,\n\t\t 'role_id' => 1\n\t ]);\n\n\t $this->call(UserTableSeeder::class);\n\t $this->call(FilesTableSeeder::class);\n\t $this->call(FileUploadsTableSeeder::class);\n\t $this->call(SalesTableSeeder::class);\n\t $this->call(FileCategoryTableSeeder::class);\n }", "title": "" }, { "docid": "fec3323e6f3a81f6348e08d8097828b8", "score": "0.76672584", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n User::truncate();\n Listing::truncate();\n\n $userQuantity=5;\n $listingQnt=100;\n\n factory(App\\User::class,$userQuantity)->create();\n factory(App\\Listing::class,$listingQnt)->create();\n }", "title": "" }, { "docid": "fd3e02773eac9af1278393c90e1ec5e3", "score": "0.7666974", "text": "public function run()\n {\n User::truncate();\n\n User::create([\n 'name' => 'admin',\n 'password' => bcrypt('secret'),\n 'role' => 'admin',\n ]);\n\n User::create([\n 'name' => 'operator',\n 'password' => bcrypt('secret'),\n 'role' => 'operator',\n ]);\n\n User::create([\n 'name' => 'employee',\n 'password' => bcrypt('secret'),\n 'role' => 'employee',\n ]);\n\n $faker = Factory::create('id_ID');\n\n for ($i = 0; $i < 12; $i++) {\n User::create([\n 'name' => $faker->name,\n 'password' => bcrypt('secret'),\n 'role' => 'employee',\n ]);\n }\n\n }", "title": "" }, { "docid": "2344b2d3d5ee3f98e7bbbe7784cad8c9", "score": "0.7663209", "text": "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n $counry = Country::inRandomOrder()->first()->country;\n $city = City::inRandomOrder()->where('country', $counry)->first()->city;\n\n Agencies::create([\n 'name' => $faker->company,\n 'address' => $faker->address,\n\t\t\t\t'city' => $city,\n\t\t\t\t'countri' => $counry,\n\t\t\t\t'phone' => $faker->phoneNumber,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'web' => \"www.addadadadad.com\",\n ]);\n }\n }", "title": "" }, { "docid": "acc4a55ca590e54c9d9cae8f6b80d13b", "score": "0.7662981", "text": "public function run()\n {\n User::factory(100)->create();\n $this->call([\n UserSeeder::class,\n ]);\n Article::factory()->count(100)->create();\n Rate::factory()->count(1000)->create();\n\n }", "title": "" }, { "docid": "47d7ad0594d6fea4c95ece125a11f12f", "score": "0.76622707", "text": "public function run()\n {\n\n foreach (range(1, 10) as $_) {\n $faker = Factory::create();\n DB::table('menus')->insert([\n 'title' => $faker->firstName(),\n 'price' => $faker->randomNumber(2),\n 'weight' => $faker->randomNumber(2),\n 'meat' => $faker->randomNumber(2),\n 'about' => $faker->realText(rand(10, 20))\n ]);\n }\n\n //\n foreach (range(1, 10) as $_) {\n $faker = Factory::create();\n DB::table('restaurants')->insert([\n 'title' => $faker->company(),\n 'customer' => $faker->randomNumber(2),\n 'employee' => $faker->randomNumber(2),\n // 'menu_id' => $faker->randomNumber(1),\n\n ]);\n }\n }", "title": "" }, { "docid": "317d47304eb6df80c5511ceb3b9b995f", "score": "0.76618236", "text": "public function run()\n {\n Model::unguard();\n\n // $this->call(UserTableSeeder::class);\n $faker = Faker\\Factory::create();\n for ($i=0; $i < 10; $i++) { \n BeTagModel::create([\n 'name' => $faker->sentence,\n 'name_alias' => implode('',$faker->sentences(4)),\n 'status' => $faker->randomDigit(),\n 'created_by' => $faker->unixTime(),\n 'updated_by' => $faker->unixTime(),\n 'created_at' => $faker->unixTime(),\n 'updated_at' => $faker->unixTime(),\n ]);\n }\n\n Model::reguard();\n }", "title": "" }, { "docid": "0de657d649c6926b71b8f5e0b4af5374", "score": "0.76618147", "text": "public function run() {\n // Example list, this seed will only create admin role, if you wanna create user account, please use normal register.\n // The pattern for each list value will be array[0] for username, array[1] for password (it will be hashed later, calma) and array[2] for email.\n // Add as many as you like.\n $list = array(\n array('pulselab', 'nopassword', '[email protected]'),\n );\n\n DB::collection('users')->delete();\n DB::collection('users')->insert(array_map(function($o) {\n return array(\n 'username' => $o[0],\n 'password' => app('hash')->make(sha1($o[1])),\n 'email' => $o[2],\n 'facebook_id' => '',\n 'twitter_id' => '',\n 'point' => 0,\n 'role' => 'admin',\n 'word_translated' => 0,\n 'word_categorized'=> 0,\n 'languages'\t\t => '',\n 'isconfirmed'\t => true,\n 'resetcode'\t\t => '',\n 'isVirgin' => 0,\n );\n }, $list));\n }", "title": "" }, { "docid": "591cc779df1a315a5bb877f8e1fe4600", "score": "0.7660859", "text": "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('indicadores')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('indicadores')->insert([\n 'rels' => json_encode([$faker->words(3)]),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->sentence,\n 'ano_inicial' => $faker->numberBetween(2019,2025),\n 'ano_final' => $faker->numberBetween(2025,2030),\n 'status_atual' => $faker->randomNumber(3),\n 'status_final' => $faker->boolean(),\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 'status' => true,\n ]);\n }\n\n\n }", "title": "" }, { "docid": "9bf3fa05d4ae071adbab0386bc123da6", "score": "0.7660738", "text": "public function run()\n {\n $data = [];\n $faker = Factory::create();\n\n for ($i = 0; $i < 100; $i++) {\n $data[] = [\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n 'email' => $faker->email(),\n 'created_at' => date('Y-m-d H:i:s'),\n ];\n }\n\n $users = $this->table(DbConfig::DB_USER_TABLE);\n $users->insert($data)\n ->saveData();\n }", "title": "" }, { "docid": "4928806405a07b1df0cb55aaf31cc6fd", "score": "0.76591706", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Section::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few Section in our database:\n for ($i = 0; $i < 10; $i++) {\n Section::create([\n 'name' => $faker->name,\n ]);\n }\n }", "title": "" }, { "docid": "ac091d03c70afaa39edeb6588c3c3993", "score": "0.7657682", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //semillero cuando se ejecute el comando migrate se crearan en automatico los datos\n factory(User::class)->create(['email'=>'[email protected]']);\n factory(User::class, 50)->create();\n factory(Forum::class, 20)->create();\n factory(Post::class, 50)->create();\n factory(Reply::class, 100)->create();\n }", "title": "" } ]
1ffe833091ef37187bb0a2ee971b547d
REVERSE TO PREVIOUS HANDLER IF NEW EXTERNAL HANDLER WAS GIVEN
[ { "docid": "9a1c260ad94415514c3899563ecdb90e", "score": "0.7518864", "text": "public static function reverseHandler() {\n if (self::$prev_handler !== null) {\n self::$handler = self::$prev_handler;\n self::$prev_handler = null;\n }\n }", "title": "" } ]
[ { "docid": "15a9ef1ea9fa9ffb8b609dd21545dcec", "score": "0.6067328", "text": "public function restore_handler()\n {\n restore_error_handler();\n }", "title": "" }, { "docid": "3cac8ab5c96788d2e7dd27cd544b34eb", "score": "0.57093817", "text": "public function removeLastHandler()\n {\n array_shift($this->handlerStack);\n }", "title": "" }, { "docid": "d4c5bd362b25accbc7b7d3c18600d911", "score": "0.5498959", "text": "public function removeFirstHandler()\n {\n array_pop($this->handlerStack);\n }", "title": "" }, { "docid": "a91e8e0c87084b846540a723fac998c2", "score": "0.5448346", "text": "public function unshift( $handler ) {\n\t\tarray_unshift( $this->handlers[], $handler );\n\t}", "title": "" }, { "docid": "a74ab75291ecfaaefd6ec15748b03fdc", "score": "0.53718746", "text": "private function rewindErrorHandler()\n {\n $dummyHandler = function ($level, $message) { return false; };\n\n while (set_error_handler($dummyHandler)) {\n // Unsets the error handler we just set.\n restore_error_handler();\n // Unsets the previous error handler.\n restore_error_handler();\n }\n\n // Restores the built-in error handler.\n restore_error_handler();\n }", "title": "" }, { "docid": "ceb3cefbebd8261c286d12aa90fa35ea", "score": "0.52835155", "text": "public function _hookOther() {\r\n }", "title": "" }, { "docid": "99e17589bb10752c6b4dff096cbe1740", "score": "0.52249897", "text": "public function testHandleTwice(): void\n {\n $expected = 'second value';\n\n /** @var Mock|HandlerInterface $handler2 */\n $handler2 = \\Mockery::mock(Handler::class);\n $handler2->shouldReceive('handle')->once()->andReturn($expected);\n\n $this->handler->setNext($handler2);\n $result = $this->handler->handle('value');\n\n $this->assertEquals($expected, $result);\n }", "title": "" }, { "docid": "51819d7bbda725ece9a8c7abeba459a6", "score": "0.5176335", "text": "public abstract function processReversal();", "title": "" }, { "docid": "1fc3d0fb9f8ef27cfcda5fc16cf98d70", "score": "0.51121783", "text": "public function setNext(Handler $handler): Handler;", "title": "" }, { "docid": "8e29878c2fdec36a746517c57dd67ee1", "score": "0.51065123", "text": "function putErrorHandlersBack()\n\t{\n\t\t\n\t\tif (empty($GLOBALS['_JERROR_HANDLERS_BACKUP_DEFENDER']))\n\t\t\treturn;\n\t\t\n\t\t/// backup the error handlers\n\t\tforeach ($GLOBALS['_JERROR_HANDLERS'] as $k => $v)\n\t\t{\n\t\t\t$GLOBALS['_JERROR_HANDLERS'][ $k ] = $GLOBALS['_JERROR_HANDLERS_BACKUP_DEFENDER'][ $k ];\n\t\t}\n\t\t\n\t\t\n\t\t// unset the backup\n\t\tunset($GLOBALS['_JERROR_HANDLERS_BACKUP_DEFENDER']);\n\t}", "title": "" }, { "docid": "a1b6296898e76e5c08b74fced0634797", "score": "0.50896263", "text": "public function setRouted() {}", "title": "" }, { "docid": "66e3f7b5c9012608afc525cbc063a5f8", "score": "0.5079786", "text": "public function restore()\n {\n return restore_error_handler();\n }", "title": "" }, { "docid": "f27c5e8a3b4d540efc28469fe9bb63d2", "score": "0.506813", "text": "function onAfterRoute()\n {\n }", "title": "" }, { "docid": "4f4eebcba885fbd06a63b46a516a3c7f", "score": "0.5065358", "text": "protected function afterHandling () { }", "title": "" }, { "docid": "e6263a33b7a652159b9825235cb8f8fd", "score": "0.5055817", "text": "public function afterExecuteRoute() {\n if ($this->dispatcher->isFinished() && $this->dispatcher->wasForwarded())\n return;\n\n parent::afterExecuteRoute();\n }", "title": "" }, { "docid": "c23c1d2371fc7f8d4fa7b5629cbf8f42", "score": "0.5047244", "text": "public function getInternalHandler() {}", "title": "" }, { "docid": "40df3bfd81b6b4520cc605a0f0c93719", "score": "0.5031629", "text": "public abstract function rest_request_after_callbacks( $response, $handler, $request );", "title": "" }, { "docid": "be62ebfa29a3f436dbeb2b28b2719d0b", "score": "0.5009689", "text": "public function handle($passable, $next);", "title": "" }, { "docid": "853ac51526e301131b3946f478d5e9f4", "score": "0.49594358", "text": "public function popHandler()\n {\n return array_pop($this->handlerStack);\n }", "title": "" }, { "docid": "853ac51526e301131b3946f478d5e9f4", "score": "0.49594358", "text": "public function popHandler()\n {\n return array_pop($this->handlerStack);\n }", "title": "" }, { "docid": "32a7aca5f2d66e966cb316a7d250ffc1", "score": "0.49423602", "text": "public function stop()\n\t{\n\t\tif ($this->started & 1) restore_error_handler();\n\t\tif ($this->started & 2) restore_exception_handler();\n\n\t\t$this->started = 0;\n\t}", "title": "" }, { "docid": "05cd7bdbcffc5eb56d0961f512e540f0", "score": "0.49020272", "text": "public function resurrect() {\n\t}", "title": "" }, { "docid": "9faf3118a9d5d1ed8acf2b8b648fa809", "score": "0.4898578", "text": "protected function restoreErrorHandler()\n {\n $this->lastIconvError = false;\n restore_error_handler();\n }", "title": "" }, { "docid": "f97c9b9046446759b4e7f78e5d3353e3", "score": "0.48944876", "text": "function afterroute(){\n\t}", "title": "" }, { "docid": "4690c91f58ac6d7dc7c6e828ecb4ea8d", "score": "0.4893925", "text": "abstract protected function createHandler();", "title": "" }, { "docid": "bb15b0ecadb2f4809baf3585d56c9f4c", "score": "0.48938343", "text": "public function smartGoBack()\n {\n // Current action is delete\n if (preg_match('@(.*)/delete$@', Yii::$app->request->pathInfo, $res)) {\n $controller = $res[1];\n // Referer is view of deleted item\n if (preg_match('@'.$controller.'/view@', Yii::$app->request->referrer)) {\n return $this->redirect([$controller.'/index']);\n }\n }\n\n return $this->redirect(Yii::$app->request->referrer);\n }", "title": "" }, { "docid": "494b5ac005a6398c47349f485574a788", "score": "0.48844668", "text": "function determineForward()\n {\n if( $this->_request->hasParameter( 'url' ) )\n $this->forwardMobilize();\n else\n $this->forwardWidget();\n }", "title": "" }, { "docid": "ce3178cfef32846fd3a4ffb8d4c1325f", "score": "0.48609594", "text": "function routeUpLevel() {\n $this->delLast_route();\n $this->route = $this->getLast_route();\n }", "title": "" }, { "docid": "fe385872adc71308faf16286d91ac4e7", "score": "0.48566225", "text": "function back($add='', $status=301) {\n return Router::back($add, $status);\n}", "title": "" }, { "docid": "dc9038a69a79f63ee47f9857006923a5", "score": "0.4846682", "text": "function afterroute() {\n\n }", "title": "" }, { "docid": "f1f21b842fe05514257b68b02ff62095", "score": "0.48371714", "text": "protected function revert()\n {\n }", "title": "" }, { "docid": "303e07168ade4eaebe3806bcd7c9f270", "score": "0.48047373", "text": "public static function rollBack() {\n self::$handler->rollBack();\n }", "title": "" }, { "docid": "24c9479319bcffba2b42cb66eb5fb81b", "score": "0.48039502", "text": "abstract protected function handle();", "title": "" }, { "docid": "205a40f90729d2baca6862f3181e627a", "score": "0.4803212", "text": "static final public function wakeupHandler(IInjectedAfterUnserialization $obj) {\n\t\tself::$currentSerializer->injectDependencies($obj);\n\t}", "title": "" }, { "docid": "11be3780a28ba3039e6529e12ddda60c", "score": "0.4791752", "text": "abstract protected function resetCompleteRoute($user, $code);", "title": "" }, { "docid": "a4714ff00097cdaf40ea1cfa3e679fd5", "score": "0.47846693", "text": "public function Rewind()\n\t {\n\t\t// elseif($this->sth) $this->FetchAllRows();\n\t\treset($this->data);\n\t }", "title": "" }, { "docid": "b38320c6fa1f495d38ec63e74d30b3f5", "score": "0.4782507", "text": "function rewind(){}", "title": "" }, { "docid": "c5e0dd61470f73794212b8d1acef53ab", "score": "0.47807178", "text": "public static function restoreErrorHandler(){\r\n //Restore the php engine error handler\r\n set_error_handler(null);\r\n }", "title": "" }, { "docid": "36fb608e60b5611d7f51239a629fdc02", "score": "0.47730246", "text": "public function handleDefunctRoutes()\n {\n while ($uriContextCollection = array_pop($this->pendingUriContextCollections)) {\n $this->defunctRouteHandler->handleDefunctRoutes($uriContextCollection);\n }\n }", "title": "" }, { "docid": "36fb608e60b5611d7f51239a629fdc02", "score": "0.47730246", "text": "public function handleDefunctRoutes()\n {\n while ($uriContextCollection = array_pop($this->pendingUriContextCollections)) {\n $this->defunctRouteHandler->handleDefunctRoutes($uriContextCollection);\n }\n }", "title": "" }, { "docid": "c6b8caf4887f84a6a6d1e61f69d4352d", "score": "0.47714812", "text": "function redirect_decidir_requests(){\n global $wp_query;\n if(!isset($wp_query->query_vars[$this->decidir_endpoint]))\n return;\n\n $this->process_decidir_request();\n }", "title": "" }, { "docid": "ff9a934988eaf092044adddce2a356a1", "score": "0.47686267", "text": "public function back(): void;", "title": "" }, { "docid": "821dd080b512dc4bd6a03641a5da68e3", "score": "0.47591045", "text": "protected function dispatchToRouter()\n {\n $this->replaceRouter();\n\n return parent::dispatchToRouter();\n }", "title": "" }, { "docid": "ddbb5b9f23337aad25205066bd0f43fd", "score": "0.47391227", "text": "abstract protected function after();", "title": "" }, { "docid": "79496af5269fdd3cca61c91ee7d0f3d0", "score": "0.47337598", "text": "function __invoke(Request $req, Response $res, callable $next) {\n $newResponse = $next($req, $res);\n $res->write('hllo');\n // Do stuff after route is rendered\n return $newResponse; // continue\n }", "title": "" }, { "docid": "317167ea71afdc225a17b20a8011c80a", "score": "0.47202033", "text": "public function postDispatch()\n {\n parent::postDispatch();\n $this->_getSession()->unsNoReferer(false);\n }", "title": "" }, { "docid": "91d3cfb7dc5dd72d1f2e3a61753d76e7", "score": "0.47177777", "text": "function post_restoreItem() {\n if ((isset($this->input['_no_history']) && $this->input['_no_history'])\n || !static::$logs_for_parent) {\n return;\n }\n\n if ($this->useDeletedToLockIfDynamic()\n && $this->isDynamic()) {\n $item = $this->getItem();\n\n if (($item !== false)\n && $item->dohistory) {\n $changes = [\n '0',\n '',\n addslashes($this->getHistoryNameForItem($item, 'unlock')),\n ];\n Log::history($item->getID(), $item->getType(), $changes, $this->getType(),\n static::$log_history_unlock);\n }\n }\n }", "title": "" }, { "docid": "9894f94b4c1e2d08b6785e264ae415ca", "score": "0.4716553", "text": "public function restored(Routine $routine)\n {\n //\n }", "title": "" }, { "docid": "8a260657e89f44f15f5f4a0233e9b2a5", "score": "0.47115898", "text": "public function slingback($or_else='/')\n \t{\n \t\tif ((isset($_SERVER['HTTP_REFERER'])) && ($_SERVER['HTTP_REFERER']!=null))\n \t\t\treturn redirect($_SERVER['HTTP_REFERER']);\n \t\t\t\n \t\treturn redirect($or_else);\n \t}", "title": "" }, { "docid": "2edfbee7f15f3e1c49c8dfdaa3c37c51", "score": "0.4705148", "text": "protected function redirectToLastCalledControllerActionPair() {\n\t\t$state = $this->getLastCalledControllerActionPairForRedirect();\n\t\tif (count($state) && trim($state['action']) !== '' && trim($state['controller']) !== '') {\n\t\t\t$currentAction = $this->request->getControllerActionName();\n\t\t\t$currentController = $this->request->getControllerName();\n\t\t\tif (!($currentController === $state['controller'] && $currentAction === $state['action'])) {\n\t\t\t\t$extensionName = $this->request->getControllerExtensionName();\n\t\t\t\t$moduleSignature = $this->request->getPluginName();\n\t\t\t\t$extensionConfig = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['extbase']['extensions'][$extensionName];\n\t\t\t\t$availableControllers = $extensionConfig['modules'][$moduleSignature]['controllers'];\n\t\t\t\t$controllerExists = isset($availableControllers[$state['controller']]);\n\t\t\t\tif ($controllerExists) {\n\t\t\t\t\t$actionExists = in_array($state['action'], $availableControllers[$state['controller']]['actions']);\n\t\t\t\t\tif ($actionExists) {\n\t\t\t\t\t\t$this->forward($state['action'], $state['controller']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "efdcc733f38472984a77b5f16f98261f", "score": "0.46895236", "text": "public function handle(){\n\t\t$found = false;\n\t\tif(empty($this->_routes[$this->_req['method']])){\n\t\t\tthrow new Exception(\"The method your trying to use doesn't exist or misspelled\", 400);\n\t\t}\n\t\tforeach ($this->_routes[$this->_req['method']] as $route) {\n\t\t\tif(preg_match('@^' . $route['route'] . '$@', $this->_req['request'], $p_value)){\n\t\t\t\tarray_shift($p_value);\n\t\t\t\tif(!empty($route['keys'])){\n\t\t\t\t\tforeach($p_value as $key => $value){\n\t\t\t\t\t\t$route['parameters'][$route['keys'][$key]] = $value;\n\t\t\t\t\t}\n\t\t\t\t\tunset($route['keys']);\n\t\t\t\t}else{\n\t\t\t\t\t$route['parameters'] = array();\n\t\t\t\t}\t\n\t\t\t\tif(!empty($route['parameters']))\n\t\t\t\t\t$route['callback']($route['parameters']);\t\t\t\n\t\t\t\telse\n\t\t\t\t\t$route['callback']();\t\t\t\n\t\t\t\t$found = true;\n\t\t\t}\n\t\t}\n\t\tif(!$found)\n\t\t\tthrow new Exception(\"The method your trying to use doesn't exist or misspelled\", 400);\n\t}", "title": "" }, { "docid": "83a5e97b0eb9a811993b6c8a96a95550", "score": "0.46815488", "text": "public function processRestore() {\r\n if (!isset($this->session->us_username)) {\r\n $redirect = \"index.php/app/\";\r\n redirect($redirect);\r\n }\r\n\r\n $type = $this->input->post(\"restore_type\");\r\n\r\n $res_id = $this->app_model->restoreTrashItem();\r\n if ($res_id) {\r\n $redirect = \"index.php/app/showTrash/\" . $type;\r\n redirect($redirect);\r\n }\r\n }", "title": "" }, { "docid": "ffe7ff4e9dce180233020edce0c83c2e", "score": "0.46618783", "text": "public function popHandler()\n {\n if (!$this->handlers) {\n throw new \\LogicException('You tried to pop from an empty handler stack.');\n }\n return array_shift($this->handlers);\n }", "title": "" }, { "docid": "a601612790badc00be5e70a7376e1e95", "score": "0.4660423", "text": "function redirect_old_permalink($req_uri) {\n global $wp_query, $wp_rewrite;\n global $wp_version;\n\n $rules = get_option('permalink_redirect_rules');\n if (!$rules) {\n return;\n }\n\n // Backing up the rewrite object for you, imperative programmers!\n $wp_rewrite_old = $wp_rewrite;\n\n // Unsetting the globals. Argh! Evil global variables!\n foreach ($wp_query->query_vars as $key => $val) {\n unset($GLOBALS[$key]);\n }\n\n // Going through the rules.\n foreach ($rules as $rules2) {\n $wp2 = new WP();\n $wp_rewrite = new YLSY_Rewrite();\n $wp_rewrite->index = $wp_rewrite_old->index;\n $wp_rewrite->rules = $rules2;\n\n $wp2->parse_request();\n if (isset($wp2->query_vars['error']) && \n ($wp2->query_vars['error'] == 404)) \n {\n continue;\n }\n $query = new WP_Query();\n if ($wp_version >= '2.1') {\n $posts = $query->query($wp2->query_vars);\n } else {\n $wp2->build_query_string();\n $posts = $query->query($wp2->query_string);\n }\n if (count($posts) > 0) {\n $wp_rewrite = $wp_rewrite_old;\n $this->execute2($query, false);\n return;\n }\n }\n\n // Restoring global variables. We don't bother to reset the other \n // variables as we are going to do a 404 anyway.\n $wp_rewrite = $wp_rewrite_old;\n }", "title": "" }, { "docid": "a10c691268e8f8afa1eda0c55efb83ad", "score": "0.46561778", "text": "function __intended()\n\t{\n\t\tredirectTo(getReferer());\n\t}", "title": "" }, { "docid": "a722b115217cdfd83ec4a48fb59133b2", "score": "0.46559325", "text": "public function handleBackActions(): void\n {\n if (empty($this->serverRequest)) {\n throw new InternalErrorException('$serverRequest must contain the request object to use BackButtonTrait in ' . self::class);\n }\n\n if (!$this->serverRequest->getSession()->check('back_action')) {\n $this->serverRequest->getSession()->write('back_action', []);\n }\n if (!empty($this->serverRequest->getQuery('back_action'))) {\n $requestedBackAction = $this->serverRequest->getQuery('back_action');\n $requestedAction = $this->getRequestedAction();\n\n if (!$this->serverRequest->getSession()->check('back_action.' . $requestedBackAction)\n || ($this->serverRequest->getSession()->check('back_action.' . $requestedBackAction)\n && $this->serverRequest->getSession()->read('back_action.' . $requestedBackAction) != $requestedAction\n )\n && !$this->serverRequest->getSession()->check('back_action.' . $requestedAction)\n ) {\n $this->serverRequest->getSession()->write('back_action.' . $requestedAction, $requestedBackAction);\n }\n }\n }", "title": "" }, { "docid": "3f8fc9bf3bbc7d09e516e8b708e90d71", "score": "0.4653726", "text": "function __destruct() {\n $currentRoute = $this->getCurrentRoute();\n if (!$this->checkIfRouteAvailable($currentRoute)) {\n $this->handleInvalidRoute();\n }\n\n $controller = $this->routes[$currentRoute];\n\n if (!$this->checkIfAllowedMethod($controller)) {\n $this->handleForbiddenMethod();\n }\n\n $controller->handleRequest($this->method);\n }", "title": "" }, { "docid": "1af2e113c5134e90ff7af59a9e62375f", "score": "0.4650448", "text": "public function handle($request, HandlerInterface $next)\n {\n if ($this->isEmpty()) {\n return $request;\n }\n if ($this->shadow == false) {\n $bundle = clone $this;\n $bundle->store->setIteratorMode(SplDoublyLinkedList::IT_MODE_FIFO | SplDoublyLinkedList::IT_MODE_DELETE);\n $this->shadow = true;\n\n return $next->handle($request, $bundle);\n }\n $handler = $this->frontPop();\n\n return $handler->handle($request, $this);\n }", "title": "" }, { "docid": "913cdaca646d7df0e3108be167c49789", "score": "0.4644154", "text": "public function tearDown()\n {\n unset($this->handler);\n }", "title": "" }, { "docid": "d66550af4f5d3caad664a011b5899e37", "score": "0.4630163", "text": "public function redirigir() {\n \treturn $this->redirect('https://linktr.ee/yowsam');\n }", "title": "" }, { "docid": "9c45095a8ce155f58b72d9f2a389fa1a", "score": "0.46233517", "text": "public static function setPrevExceptionHandler()\n\t\t{\n\t\t\tif (null === self::$prev)\n\t\t\t\tself::$prev = set_exception_handler(null);\n\n\t\t\t$handler = self::$handler;\n\t\t\tself::$handler = self::$prev;\n\t\t\tself::$prev = $handler;\n\n\t\t\trestore_exception_handler();\n\n\t\t\treturn self::$prev;\n\t\t}", "title": "" }, { "docid": "0675d1f2d1b9ba8f68513181f966188f", "score": "0.46222827", "text": "protected function run(){\n $aPackages = AMI_PackageManager::getInstance()->getDownloadedPackages();\n if($aPackages[$this->oArgs->pkgId]['instCnt'] > 1){\n AMI_Tx::log(get_class($this) . '::run() There are other instances, handlers added already');\n return;\n }\n\n $file = $this->oArgs->target;\n $content = $this->oStorage->load($this->backuped ? $this->backupPath : $file, FALSE);\n if($content === FALSE){\n $content = $this->createNewContent();\n }\n $backupedModId = $this->oArgs->modId;\n $this->oArgs->overwrite('modId', $this->oArgs->hypermod . '_' . $this->oArgs->config);\n $opener = $this->getOpeningMarker();\n $closer = $this->getClosingMarker();\n $this->oArgs->overwrite('modId', $backupedModId);\n\n $backupedMode = $this->oArgs->mode;\n $this->oArgs->overwrite('mode', $this->oArgs->mode | AMI_iTx_Cmd::MODE_OVERWRITE);\n $handlerRegistrationContent = $content;\n if($this->checkMarkers($handlerRegistrationContent, $this->handlerDeclarationOpener, $this->handlerDeclarationCloser)){\n $start = mb_strpos(\n $handlerRegistrationContent,\n $this->handlerRegistrationOpener\n ) + mb_strlen($this->handlerRegistrationOpener);\n $end = mb_strpos($handlerRegistrationContent, $this->handlerRegistrationCloser);\n $handlerRegistrationContent =\n mb_substr($handlerRegistrationContent, $start, $end - $start);\n $newHandlerRegistrationContent = $handlerRegistrationContent;\n $this->oArgs->overwrite('mode', $backupedMode);\n if($this->checkMarkers($newHandlerRegistrationContent, $opener, $closer)){\n $this->oArgs->overwrite('source', $this->oArgs->handlerRegistrationSource);\n $this->modify($newHandlerRegistrationContent, $opener, $closer);\n }\n }\n\n $this->oArgs->overwrite('mode', $this->oArgs->mode | AMI_iTx_Cmd::MODE_OVERWRITE);\n $handlerDeclarationContent = $content;\n if($this->checkMarkers($handlerDeclarationContent, $this->handlerRegistrationOpener, $this->handlerRegistrationCloser)){\n $start = mb_strpos(\n $handlerDeclarationContent,\n $this->handlerDeclarationOpener\n ) + mb_strlen($this->handlerDeclarationOpener);\n $end = mb_strpos($handlerDeclarationContent, $this->handlerDeclarationCloser);\n $handlerDeclarationContent =\n mb_substr($handlerDeclarationContent, $start, $end - $start);\n $newHandlerDeclarationContent = $handlerDeclarationContent;\n $this->oArgs->overwrite('mode', $backupedMode);\n if($this->checkMarkers($newHandlerDeclarationContent, $opener, $closer)){\n $this->oArgs->overwrite('source', $this->oArgs->handlerDeclarationSource);\n $this->modify($newHandlerDeclarationContent, $opener, $closer);\n }\n }\n\n $this->oArgs->overwrite('mode', $backupedMode);\n\n if(\n $handlerRegistrationContent === $newHandlerRegistrationContent ||\n $handlerDeclarationContent === $newHandlerDeclarationContent\n ){\n throw new AMI_Tx_Exception(\n \"Broken content marker at file '\" . $file . \"'\",\n AMI_Tx_Exception::CMD_BROKEN_CONTENT_MARKER\n );\n }\n\n $content =\n str_replace(\n array(\n $this->handlerRegistrationOpener . $handlerRegistrationContent . $this->handlerRegistrationCloser,\n $this->handlerDeclarationOpener . $handlerDeclarationContent . $this->handlerDeclarationCloser\n ),\n array(\n $this->handlerRegistrationOpener . $this->eol . trim($newHandlerRegistrationContent) . $this->eol . $this->eol . $this->handlerRegistrationCloser,\n $this->handlerDeclarationOpener . $this->eol . trim($newHandlerDeclarationContent) . $this->eol . $this->eol . $this->handlerDeclarationCloser\n ),\n $content\n );\n\n $this->set($content);\n }", "title": "" }, { "docid": "14fcfcd991159b4419826c1da26085fb", "score": "0.4621022", "text": "private function _Route_request_to_handler($request){\n $handler_response = NULL;\n $handler_response = $this->handler->Process_request($request);\n if(!is_null($handler_response)) {\n $this->_response_data = $handler_response;\n }\n }", "title": "" }, { "docid": "90a4918749a05433ae59ee4befc49e99", "score": "0.4619963", "text": "protected function resetLastCalledControllerActionPair() {\n\t\tif (!$this->backendUser) {\n\t\t\treturn;\n\t\t}\n\n\t\t$extensionKey = $this->request->getControllerExtensionKey();\n\t\t$this->backendUser->uc[$extensionKey . 'State']['LastActionControllerPair'] = array();\n\t\t$this->backendUser->uc[$extensionKey . 'State']['LastActionControllerPairForRedirect'] = array();\n\t\t$this->backendUser->writeUC($this->backendUser->uc);\n\n\t\tif ($this->view instanceof ViewInterface) {\n\t\t\t$this->view->assign('lastCalledControllerActionPair', NULL);\n\t\t}\n\t}", "title": "" }, { "docid": "969b37b6792a7ead62ae1587e6b69719", "score": "0.4619631", "text": "public function return_handler()\n {\n set_error_handler([$this, 'error_handler']);\n }", "title": "" }, { "docid": "69e6c4dcad0b9c1433ad190480603312", "score": "0.46111807", "text": "function handlers ();", "title": "" }, { "docid": "e6268023baf703cb09fa0c5980142031", "score": "0.4610854", "text": "function forward($action)\n{\n // get app\n $app = \\maestro\\Registrar::run('wicked.app');\n\n // reverse routing\n $route = $app->router->reverse($action);\n\n // update mog\n $mog = mog();\n $mog->route = $route;\n\n // reload app\n $app->reload($mog);\n\n exit;\n}", "title": "" }, { "docid": "1e680cf97f5f22f1c8ad6c52fce04cb3", "score": "0.4610684", "text": "private function __restore() {\n \n // Fetch the cached data.\n $data = $this->cache->get($this->method, $this->endpoint, $this->query);\n\n // Restore the results.\n $this->data = $data['data'];\n $this->status = $data['status'];\n $this->features = $data['features'];\n \n }", "title": "" }, { "docid": "d9303f3232cde60e3f36244c3ba29e3b", "score": "0.4608276", "text": "public function pull() {\n\t\t$githook_request = $this->verify_request();\n\t\tif ($githook_request == \"\")\n\t\t\treturn;\n\n\t\tif (! $this->route($githook_request)) {\n\t\t\thttp_response_code(404);\n\t\t\texit;\n\t\t}\n\t}", "title": "" }, { "docid": "446673c6a996ebbf7d01e8fc290e26f0", "score": "0.46045446", "text": "function proxy_router() {\n $reset = FALSE;\n\n // Define parameters\n $params = array(\n 'request_uri' => !empty($_GET[PROXY_ROUTER_QUERY_VAR]) ? $_GET[PROXY_ROUTER_QUERY_VAR] : '',\n );\n\n // Check for reset\n if (isset($_GET['reset']) && $_GET['reset'] && user_access('reset cache via router')) {\n $reset = TRUE;\n }\n\n // Proxy it up!\n $response = proxy($params, $reset);\n if (!is_array($response)) {\n // Check for data\n if (is_object($response) && !empty($response->data)) {\n // Set headers\n if (is_array($response->headers)) {\n foreach ($response->headers as $header => $value) {\n drupal_set_header($header . ': ' . $value);\n }\n }\n else {\n // Should we guess at headers? (TO DO)\n }\n\n // Print actual data\n print $response->data;\n exit;\n }\n else {\n watchdog('proxy', 'Data not provided to router.', array(), WATCHDOG_WARNING);\n }\n }\n else {\n // Watchdog\n foreach ($response as $message) {\n watchdog('proxy', $message, array(), WATCHDOG_WARNING);\n }\n }\n\n // Default is 404, which helps masks the fact that the proxy exists.\n // Also, reset a couple variables so that Drupal does not try to\n // redirect here\n $_REQUEST['destination'] = '';\n $_GET['q'] = '';\n drupal_not_found();\n}", "title": "" }, { "docid": "3af6188267295184b20de10e1bdf6398", "score": "0.46030673", "text": "public function shutdown_handler() {\n if ($error = error_get_last()) {\n $this->exception_handler(new \\ErrorException($error['message'],\n $error['type'], 0, $error['file'], $error['line']));\n }\n }", "title": "" }, { "docid": "850fc4c94079f0182591a21a414a33f6", "score": "0.4600035", "text": "public function onBeforeRouting() {}", "title": "" }, { "docid": "1ff5d0fa0c3cbab538b2b7777a0eeb93", "score": "0.45998716", "text": "protected function refrescar()\r\n\t\t{\r\n\t\t}", "title": "" }, { "docid": "8707aae4a905a3376d8c730e19163060", "score": "0.45967212", "text": "private function __goBack()\n {\n // Address where the user came\n $referer = $_SERVER['HTTP_REFERER'];\n\n if ( empty($referer) ) {\n $this->__goHome();\n }else{\n redirect($referer);\n }\n }", "title": "" }, { "docid": "f59ca0532b2c5ab5389207b216f3cac8", "score": "0.4588515", "text": "public function linkBack() {\n //$redir = $this->Session->read('redir');\n $this->redirect($this->referer());\n }", "title": "" }, { "docid": "e14e48c161f5f1ba182d345f8677a91f", "score": "0.45811823", "text": "public static function handler()\n\t{\n\t\t$instance = self::get_instance() ;\n\n\t\t$type = LiteSpeed_Cache_Router::verify_type() ;\n\n\t\tswitch ( $type ) {\n\n\t\t\tcase self::TYPE_SEND_REPORT :\n\t\t\t\t$instance->_post_env() ;\n\t\t\t\tbreak ;\n\n\t\t\tdefault:\n\t\t\t\tbreak ;\n\t\t}\n\n\t\tLiteSpeed_Cache_Admin::redirect() ;\n\t}", "title": "" }, { "docid": "d1d1132abb5deba6d4c869ed2a74b5b6", "score": "0.457963", "text": "public function anotherHookMethod()\n {\n }", "title": "" }, { "docid": "2f711dba45d24c5289974112ceb10443", "score": "0.45759445", "text": "abstract protected function getPreviousPageRoute();", "title": "" }, { "docid": "dd94cb5b734552305b5733f68f14758b", "score": "0.45659184", "text": "public function retire(): void;", "title": "" }, { "docid": "6881bbb9a4b0987c6871c6192745c738", "score": "0.45626363", "text": "private function intercept_permalinks() {\n\t\tadd_filter( 'pre_option_rewrite_rules', [ $this, 'get_old_rewrite_rules' ] );\n\t\tadd_filter( 'pre_option_permalink_structure', [ $this, 'get_old_permalink' ] );\n\t}", "title": "" }, { "docid": "c583c95ac03504c724ab91474bd4b6f3", "score": "0.4562332", "text": "public function revert()\n {\n }", "title": "" }, { "docid": "2b961fadba861a2eacd699ecaf83a5ea", "score": "0.45602506", "text": "public static function end_hook() {\n\n\t}", "title": "" }, { "docid": "99d4ba44e155c3aee02ac42754da64a9", "score": "0.4549647", "text": "abstract public function restore();", "title": "" }, { "docid": "d8f0e05eaa0cac71117c0a5de3271c2c", "score": "0.45495635", "text": "abstract public function handle();", "title": "" }, { "docid": "d8f0e05eaa0cac71117c0a5de3271c2c", "score": "0.45495635", "text": "abstract public function handle();", "title": "" }, { "docid": "d8f0e05eaa0cac71117c0a5de3271c2c", "score": "0.45495635", "text": "abstract public function handle();", "title": "" }, { "docid": "d8f0e05eaa0cac71117c0a5de3271c2c", "score": "0.45495635", "text": "abstract public function handle();", "title": "" }, { "docid": "d8f0e05eaa0cac71117c0a5de3271c2c", "score": "0.45495635", "text": "abstract public function handle();", "title": "" }, { "docid": "d8f0e05eaa0cac71117c0a5de3271c2c", "score": "0.45495635", "text": "abstract public function handle();", "title": "" }, { "docid": "d8f0e05eaa0cac71117c0a5de3271c2c", "score": "0.45495635", "text": "abstract public function handle();", "title": "" }, { "docid": "f1110926d94682d08534597d3b0bed6d", "score": "0.45473003", "text": "protected abstract function hookSpecific($data, $handler);", "title": "" }, { "docid": "1531e80c2a0ed4cbdb40cd8537aa8db5", "score": "0.45302317", "text": "function handle($args)\n {\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\n $this->handlePost();\n if (!$this->boolean('ajax')) {\n $this->returnToPrevious();\n }\n }\n }", "title": "" }, { "docid": "d36645077d21073d5f00a8e4b5638b6a", "score": "0.4529249", "text": "protected function back()\n {\n $this->redirect(Router::getLocalReferer() ?: '/', 303);\n }", "title": "" }, { "docid": "04767dacb4aa146b27878b8a8990c321", "score": "0.4522208", "text": "public abstract function handle();", "title": "" }, { "docid": "04767dacb4aa146b27878b8a8990c321", "score": "0.4522208", "text": "public abstract function handle();", "title": "" }, { "docid": "34a213d03da2ffb737d09eecf95eea38", "score": "0.45206037", "text": "function bbp_move_reply_handler($action = '')\n{\n}", "title": "" }, { "docid": "2fd7645a249a9c13f9f123169c823cb0", "score": "0.45131552", "text": "public function handleRequest($request)\n {\n if($request == 'two'){\n echo \"具体处理者2负责处理该请求!\\n\";\n }else{\n if($this->getNext() != null){\n $this->getNext()->handleRequest($request);\n }else{\n echo \"没有人处理该请求\\n\";\n }\n }\n }", "title": "" }, { "docid": "38c051c1f67be8d696ce14bef32d2853", "score": "0.45036912", "text": "public function bringToBack()\n {\n return $this->addMethod('bringToBack');\n }", "title": "" }, { "docid": "23bc9eaf378b50fc3c9c41b4a84ead3d", "score": "0.44913656", "text": "public function routerShutdown(Yaf\\Request_Abstract $request, Yaf\\Response_Abstract $response) {}", "title": "" }, { "docid": "f5432df200bd998bd326d8c8758e3d7f", "score": "0.44896406", "text": "public function after()\n\t{\n\t\tif($this->request->status===200){\n\t\t\t//gzip it?\n\t\t\t$this->request->response = $this->gzip($this->request->response);\n\t\t}\n\t\tif ($this->cache AND $this->request->status === 200)\n\t\t{\n\t\t\tswitch ($this->cache_config)\n\t\t\t{\n\t\t\t\tcase Controller_Assets::IN_CACHE:\n\t\t\t\t\t$this->cache_save();\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase Controller_Assets::IN_DOCROOT:\n\t\t\t\t\t$this->cache_in_docroot();\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new SMVC_Exception('Unknown cache_type :type',\n\t\t\t\t\t\tarray('type' => $this->cache_config));\n\t\t\t}\n\t\t}\n\n\t\treturn parent::after();\n\t}", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "4bac3188558c3acab53dd8d5175c1d4e", "score": "0.0", "text": "public function show($id)\n {\n //\n }", "title": "" } ]
[ { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.8190437", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "fa12d91e9349fafc5fadd2869e01afe7", "score": "0.81538695", "text": "public function show(Resource $resource) {\n //\n }", "title": "" }, { "docid": "364c14abc03f539e9a17828c2c3c5094", "score": "0.7142873", "text": "protected function makeDisplayFromResource()\n\t{\n\t\treturn $this->activeResource->makeDisplay();\n\t}", "title": "" }, { "docid": "c32c82f3c9f666d7ebd6a4a17c715dde", "score": "0.71033037", "text": "public function show(App\\Resource $resource){\n return $resource;\n }", "title": "" }, { "docid": "63ed4e18ae3ec83b0374866b78fa0cb2", "score": "0.69621414", "text": "public function show(Resources $resources)\n {\n //\n }", "title": "" }, { "docid": "028815e256d04884fbfd1abcd49553a0", "score": "0.6881821", "text": "public function show(ResourceInterface $resource)\n\t{\n if(Auth::user()->can('show', $resource)) {\n $variables = [];\n $variables['extends'] = Config::get('roles::extends');\n $variables['resource'] = $resource;\n $response = View::make('roles::resource.show', $variables);\n } else {\n $errors = new MessageBag();\n $errors->add('error', trans('roles::resource.show permission denied'));\n $response = Redirect::back()->withErrors($errors);\n }\n\n return $response;\n\t}", "title": "" }, { "docid": "72eb4a0f938598778f7d1bb6c9a7c01a", "score": "0.6460539", "text": "public function show(Res $res)\n {\n //\n }", "title": "" }, { "docid": "f9c75fc80c4e08207bdf6a688293bd30", "score": "0.64507407", "text": "public function actionDisplay() {\n global $mainframe, $user;\n if (!$user->isSuperAdmin()) {\n YiiMessage::raseNotice(\"Your account not have permission to visit page\");\n $this->redirect(Router::buildLink(\"cpanel\"));\n }\n $this->addIconToolbar(\"New\", Router::buildLink(\"users\",array('view'=>'resource','layout'=>'new')), \"new\");\n $this->addIconToolbar(\"Edit\", Router::buildLink(\"users\",array('view'=>'resource','layout'=>'edit')), \"edit\", 1, 1, \"Please select a item from the list to edit\"); \n $this->addIconToolbar(\"Publish\", Router::buildLink(\"users\",array('view'=>'resource','layout'=>'publish')), \"publish\");\n $this->addIconToolbar(\"Unpublish\", Router::buildLink(\"users\",array('view'=>'resource','layout'=>'unpublish')), \"unpublish\");\n $this->addIconToolbar(\"Delete\", Router::buildLink(\"users\",array('view'=>'resource','layout'=>'remove')), \"trash\", 1, 1, \"Please select a item from the list to Remove\"); \n $this->addBarTitle(\"Resource <small>[tree]</small>\", \"user\"); \n \n $model = Resource::getInstance();\n $items = $model->getItems();\n \n $this->render('default', array('items'=>$items));\n }", "title": "" }, { "docid": "9a30795d980babc94eaea5f358f9a346", "score": "0.6348493", "text": "public function view($id = null) {\n $resource = $this->resources[$id];\n $this->set(array('resource' => $resource, '_serialize' => 'resource'));\n }", "title": "" }, { "docid": "2fcca60eabc9fa263815bdb0af23227b", "score": "0.6310235", "text": "public function show($title)\n {\n $searchTerm = DB::table('searches')->where('query', '* '.$title)->first();\n if (isset($searchTerm)) $accesses = $searchTerm->accesses;\n $resource = Resource::where('title', '=', $title)->first();\n if (isset($resource)){\n return view('resources.show')\n ->with('title', $resource->title)\n ->with('body', $resource->body)\n ->with('accesses', $accesses); \n }\n else return \"resource not found\";\n }", "title": "" }, { "docid": "d88de1aa779e246b7fddebd9a98ba96d", "score": "0.6300392", "text": "public function resource($resource);", "title": "" }, { "docid": "5ff14c79a9b59fe32898fb8081a44d38", "score": "0.62861", "text": "public function show($id)\n {\n //abort('404');\n //$resource = Resource::find($id);\n\n // To throw an exception\n //$resource = Resource::findOrFail($id);\n $resource = Resource::find($id);\n if ( ! $resource) {\n // I think findOPrFail is equivalent\n abort(404); # @TODO Check what happens here and compare with the findOrFail\n }\n //dd($resource);\n return view('resources.show', compact('resource'));\n }", "title": "" }, { "docid": "3b18817b82995fa8322e3e648666dc69", "score": "0.62845415", "text": "public function show() {\n\t\tstatus_header(200);\n\t\t\n\t\tparent::show();\n\t}", "title": "" }, { "docid": "ba5a2c7902e0156425e3dea1470df9a3", "score": "0.6231386", "text": "public function show($id)\n {\n return \"This is show controller resource showing ID: \". $id;\n }", "title": "" }, { "docid": "9f4baef36bbd297dd8826a3cf4c65825", "score": "0.6228845", "text": "public function show($id)\n {\n $resource = Resource::findOrFail($id);\n $model = $resource;\n\n return view('backend.resources.show', compact('resource', 'model'));\n }", "title": "" }, { "docid": "6bca27d0e9ea5eb6ef16196ace65c00a", "score": "0.6185019", "text": "public function show($resource) {\n $id = $this->getUserIdByResource($resource);\n return $id ? $this->user->find($id) : $this->noSuchUserResponse();\n }", "title": "" }, { "docid": "cbf3bf22b6453f9015dd8d3552392655", "score": "0.6155763", "text": "protected function showResourceView($id)\n\t{\n\n\t\t$element = $this->getElements($id);\n\t\treturn Response::view('adm/IAS/element', array('data' => $element));\n\n\t}", "title": "" }, { "docid": "7ee4932d24e9f896454c46b5725bca09", "score": "0.61360765", "text": "public function resourceAction ()\n { \n $this->setRefer(); // Set auth referer\n \n $this->view->params = $this->_request->getParams(); // Pass params to view\n \n $resourceid = $this->_request->getParam('id'); // Get Article ID from params\n \n if (isset($resourceid)) : // If resource ID set continue\n \n\t\t // Setup Registry\n \t $registry = Zend_Registry::getInstance();\n \t\n \t // Get Article data\n \t $select = $registry->db->select()\n \t\t\t\t\t ->from(array('r' => 'resources'))\n\t\t\t\t \t\t ->join(array('c' => 'resources_categories'),'r.resource_category = c.rcat_id',array('c.rcat_title'))\n\t\t\t\t \t\t ->join(array('t' => 'resources_types'),'t.rtype_id = r.resource_type')\n\t\t\t\t \t\t ->join(array('b' => 'resources_brands'),'b.rbrand_id = r.resource_brand',array('b.rbrand_title','b.rbrand_id'))\n\t\t\t\t \t\t ->where('r.resource_status = ?','published')\n\t\t\t\t \t \t ->where('r.resource_id = ?',$resourceid)\n \t\t\t\t\t ->limit(1,0);\n\n \t // Set the data array\n\t\t $resourceArray = $registry->db->fetchall($select);\n\t\t\n\t\t if (count($resourceArray)) : // If resource exists\n\n // Pass Resource to View \n\t\t $this->view->resourceArray = $resourceArray[0];\n \n else : // Else redirect to 404 Error\n \n \t $this->_helper->layout->setLayout('main');\t \n $this->_forward('notfound','error','default');\n \n endif;\n \n $this->view->comment = NULL; // Reset the comment value\n \n if($this->_request->isPost()) // If form has been posted\n {\n if ($this->view->authenticated) // The user is authenticated\n {\n $options = array();\n\n $filters = array(\n \t\t\t'content' => array('StringTrim', 'StripTags')\n );\n\n $validators = array(\n 'content' => array(\n \t\t'presence' => 'required',\n \t\t'NotEmpty',\n \t\t\t'messages' => array(array( Zend_Validate_NotEmpty::IS_EMPTY => \"You did not enter a comment\"))\n ),\n );\n\n $input = new Zend_Filter_Input($filters, $validators, $_POST, $options);\n \n // setup database\n \t $registry = Zend_Registry::getInstance();\n\n if ($input->isValid()) // If the form input validates\n {\n // Set moderation variable\n if($this->view->resourceArray['resource_moderate'] == 'Y') :\n $approved = 'N';\n else :\n $approved = 'Y';\n endif;\n \n // Create our data array\n $data = array(\n \t'comment_type' => 'R',\n \t\t\t\t\t\t'comment_slave' => $this->view->resourceArray['resource_id'],\n \t\t\t\t\t\t'comment_approved' => $approved,\n \t\t\t'comment_content'\t=> $input->content,\n \t\t\t'comment_user'\t => $this->view->user->user_id,\n \t\t\t'comment_date'\t\t=> new Zend_Db_Expr('NOW()')\n );\n\n // Insert data into database\n $registry->db->insert('comments', $data);\n \n } else { // If input is invalid\n $this->view->messages = $input->getMessages(); // Pass Messages to view\n $this->view->comment = $_POST['content']; // Set value of message to match input\n }\n }\n }\n \n // Get Comments\n \t $select = $registry->db->select()\n \t\t\t\t\t ->from(array('c' => 'comments'),array('c.*'))\n\t\t\t\t \t\t ->join(array('u' => 'users'),'c.comment_user = u.user_id',array('u.user_alias','u.user_role'))\n\t\t\t\t \t\t ->where('comment_approved = ?','Y')\n\t\t\t\t \t\t ->where('comment_type = ?','R')\n\t\t\t\t \t\t ->where('comment_slave = ?',$resourceid)\n \t\t\t\t\t ->order('c.comment_date ASC');\n\n \t // Pass the comments to view\n\t\t $this->view->commentsArray = $registry->db->fetchall($select);\n\t\t\n\t\telse : // Else if Article ID not set redirect to 404 Error\n \n $this->_helper->layout->setLayout('main');\t \n $this->_forward('notfound','error','default');\n \n endif;\n }", "title": "" }, { "docid": "947c1c8f23ecc67503ddd9aaa8d0c053", "score": "0.6131235", "text": "public abstract function display(Response $response);", "title": "" }, { "docid": "d48eea5127e3c179d902a8be0b6f8468", "score": "0.6094903", "text": "public function show($id)\n {\n $resource = Resource::find($id);\n if (is_null($resource)) {\n return redirect()->route('resources.index');\n }\n return view(\n 'resources.show',\n ['resource' => $resource]\n );\n }", "title": "" }, { "docid": "15870f022600bd008a2dda714833e3a8", "score": "0.60690975", "text": "public function display() {\n\n\t\t$this->displayRequest();\n\t\tprint '<br /><br />';\n\t\t$this->displayResponse();\n\t}", "title": "" }, { "docid": "2c4681f3d2ea72046a4a8fbabafd2fda", "score": "0.60642564", "text": "public function viewResource($slug)\n {\n if ($resource = Resource::findBySlug($slug)) {\n // No se utiliza el metodo each() por que se trata de un solo recurso, no es necesario hacer un recorrido.\n $resource->category;\n $resource->tags;\n $resource->book;\n\n $ay_tags = $resource->tags;\n\n $actual_link = 'http://'.$_SERVER['HTTP_HOST'].'/resources/'.$slug;\n\n return view('front.resource')\n ->with('resource', $resource)\n ->with('ay_tags', $ay_tags)\n ->with('actual_link', $actual_link);\n }\n else {\n abort(404);\n }\n }", "title": "" }, { "docid": "f1919612984d797496fb91a1df6bfc28", "score": "0.60360175", "text": "public function show(Resident $resident)\n {\n //\n }", "title": "" }, { "docid": "ddc28327288006b3d29c6bdc8761ca44", "score": "0.598783", "text": "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "title": "" }, { "docid": "d091fe2536049092c575a390aa36ed46", "score": "0.5972", "text": "public function display()\n {\n switch ($this->platform->getPost('section')) {\n case 'download':\n $this->downloadAction();\n break;\n \n case 'remove_backup':\n $this->deleteBackupsAction();\n break;\n \n case 'backup_note':\n $this->updateBackupNoteAction();\n break;\n \n case 'restore_db':\n $this->restoreDbAction();\n break;\n }\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5954321", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "53013b6882d008888ea7afca1b751f49", "score": "0.5934595", "text": "function render_individual_resource_page($v, $url){\n\tglobal $wpdb;\n\n\t// specify the template file to use\n\t$v->template = 'resource';\n\n\t// include the helper\n\trequire_once('helper.php');\n\n\t// create a resource object\n\t$resource = new en_Resource();\n\n\t// determine the slug, load it into the object\n\t$uri = $_SERVER['REQUEST_URI'];\n\t$slug = substr($uri, 11);\n\t$end = strrpos($slug, '/');\n\t$end = ($end ? $end : strrpos($slug, '.'));\n\tif($end){\n\t\t$slug = substr($slug, 0, $end);\n\t}\n\t$resource->slug = $slug;\n\n\t// load the resource data from the database\n\t$resource->load();\n\n\t// check that such a resource exists\n\t$v->body = '';\n\t$v->title = 'No resource Found';\n\tif($resource->name != '' && $resource->status == 'publish'){\n\t\t// load the name\n\t\t$v->title = $resource->name;\n\t}\n\n\t$_SESSION['en_resource'] = $resource;\n}", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59036547", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "0d00cd39f55015604f557b3b7ebf1eca", "score": "0.5876515", "text": "public function show($id)\n\t{\n\t\t$resources = $this->resourcesRepository->find($id);\n\n\t\tif(empty($resources))\n\t\t{\n\t\t\tFlash::error('Resources not found');\n\n\t\t\treturn redirect(route('resources.index'));\n\t\t}\n\n\t\treturn view('resources.show')->with('resources', $resources);\n\t}", "title": "" }, { "docid": "d752fd3972b546ef194ae14ab221ca30", "score": "0.58688277", "text": "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "title": "" }, { "docid": "62de9bb9e8014b878862d1b3e9dfd27c", "score": "0.5865432", "text": "public function showResourcesPage()\n {\n $mTitle = $this->_mTitle;\n $title = trans(\"admin.resources\");\n $data = ['mTitle', 'title'];\n return view('home.resources')\n ->with(compact($data)); \n }", "title": "" }, { "docid": "7c25d9175a0b8f2be9a3f3b0c4a64c29", "score": "0.5860501", "text": "public function showAction()\r\n\t{\r\n\t\t$this->loadLayout()->renderLayout();\r\n\t}", "title": "" }, { "docid": "e1c49860e31b5bc5d738e44a442665de", "score": "0.58473253", "text": "public function displayAction()\n\t{\t// Look up policy with the given url parameters\n\t\t$policy = $this->db->getPolicy($this->_getParam('page'));\n\t\t$this->view->policy = $policy;\n\t}", "title": "" }, { "docid": "5a5e25617e1019b0143435d1dcee143b", "score": "0.58304006", "text": "public function edit(Resource $resource) {\n $resource = Resource::find($resource->id);\n return view('resources.edit', compact('resource'));\n }", "title": "" }, { "docid": "305f64db85d64f68019d2fadcd0a85d2", "score": "0.58012545", "text": "public function show()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "55ebb313f26c5900b8cfe594dfa4e5eb", "score": "0.57751614", "text": "public function display() {\n\t\techo $this->render();\n\t}", "title": "" }, { "docid": "4de642a6f69c75724da5f78bd193b43e", "score": "0.57721317", "text": "public function display($name)\n {\n echo $this->fetch($name);\n }", "title": "" }, { "docid": "34a8fc606e2e5031dcfc0be2c4eda232", "score": "0.5769309", "text": "function resource($resource_id)\n\t{\n\t\t# Call model function to get resource record\n\t\t$q = $this -> ResourceDB_model -> get_resource_detail($resource_id);\n\t\t# Check that it exists (in case of URL editing in the browser)\n\t\tif ($q -> num_rows() == 0) \n\t\t{ \n\t\t\t$data['title'] = \"No such resource\"; $data['heading'] = \"Resource not found\"; \n\t\t\t$data['error'] = \"There is no resource with the ID $resource_id. Tough mazoomas.\n\t\t\t\t\t\t\t\tPlease choose another resource to edit.\"; \n\t\t\t$data['message'] = \"\";\n\t\t\t$this -> load -> view('resourcedb/database_error_view', $data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$resource_title = $q -> row() -> title;\n\t\t\t$data['title'] = \"Edit resource \" . $resource_title;\n\t\t\t$data['heading'] = \"Edit resource \" . $resource_title;\n\t\t\t$data['resource__id'] = $resource_id; \n\t\t\t\n\t\t\t# Get the user ID to save as record editor\n\t\t\t$user_id = $this->ion_auth->user()->row()-> id;\n\t\t\t# Set messages for the view file\n\t\t\t$data['title'] = 'Global health repository: edit resource';\n\t\t\t$data['heading'] = 'Edit resource';\n\t\t\t# Set user message and error as blanks, to prevent PHP warning if one or t'other isn't set\n\t\t\t$data['message'] = \"\"; $data['error'] = \"\";\n\t\t\t\n\t\t\t# Populate form elements.\n\t\t\t# Get full resource record first \n\t\t\t$data['resource_detail_query'] = $this -> ResourceDB_model -> get_resource_detail($resource_id);\n\n\t\t\t# -- SUBJECTS ---\n\t\t\t# Get all subjects in the database, to display in the 'subjects' <div> in the view\n\t\t\t# False param indicates that all subjects should be returned, not just those 'in use'\n\t\t\t# by existing resources\n\t\t\t$data['subjects_query'] = $this -> ResourceDB_model -> get_subjects(false);\n\t\t\t# Get subjects attached to this resource, if any. These will be selected in the view\n\t\t\t$attached_subjects_query = $this -> ResourceDB_model -> get_resource_subjects($resource_id);\n\t\t\t$old_subjects_ary = array();\n\t\t\t# Create 2-D array, subject IDs as keys, subject titles as values\n\t\t\tforeach ($attached_subjects_query -> result() as $row)\n\t\t\t{\n\t\t\t\t$old_subjects_ary[$row -> id] = $row -> title;\n\t\t\t}\n\t\t\t# Pass currently attached subjects to the view page\n\t\t\t$data['attached_subjects_ary'] = $old_subjects_ary;\t\t\t\n\t\t\t\n\t\t\t# -- ORIGINS --\n\t\t\t$data['origins_query'] = $this -> ResourceDB_model -> get_origins();\n\n\t\t\t# -- RESOURCE TYPES ---\n\t\t\t$data['resource_types_query'] = $this -> ResourceDB_model -> get_resource_types();\n\t\t\t\n\t\t\t# -- TAGS --\n\t\t\t# Get all tags attached to this resource, both to use in the view and in this script\n\t\t\t# Note: only tag names stored as IDs aren't used in this script or the view\n\t\t\t$tags_query = $this -> ResourceDB_model -> get_resource_tags($resource_id);\n\t\t\t$old_tags_ary = array();\n\t\t\tforeach ($tags_query -> result() as $row)\n\t\t\t{\n\t\t\t\t$old_tags_ary[] = $row -> name;\t\n\t\t\t}\n\t\t\t$data['tags_ary'] = $old_tags_ary; \n\t\t\t\n\t\t\t# ==== FORM VALIDATION ======\n\t\t\t# Note that set_value() to repopulate the form *only* works on elements with \n\t\t\t# validation rules, hence a rul for all elements below. See CI Forum thread at:\n\t\t\t# http://codeigniter.com/forums/viewthread/170221/\n\n\t\t\t# NB: The callback function to check the title has the existing title as a 'parameter' in \n\t\t\t# sqare brackets, as just checking for the title existing would always \n\t\t\t# return true - we need to check that the edited title exists or not. \n\t\t\t$this->form_validation->set_rules('title', 'Title', \"required|trim|xss_clean|callback_title_check[$resource_title]\");\n\t\t\t$this->form_validation->set_rules('url', 'URL', 'required|trim|xss_clean|prep_url');\n\t\t\t$this->form_validation->set_rules('description', 'Description', 'required|xss_clean');\n\t\t\t$this->form_validation->set_rules('tags', 'Tags', 'trim|xss_clean');\n\t\t\t$this->form_validation->set_rules('creator', 'Creator', 'trim|xss_clean');\n\t\t\t$this->form_validation->set_rules('rights', 'Rights', 'trim|xss_clean');\t\t\n\t\t\t$this->form_validation->set_rules('notes', 'Notes', 'trim|xss_clean');\t\t\n\t\t\t\n\t\t\t# If the form doesn't validate, or indeed hasn't even been submitted, \n\t\t\t# (re)populate with user data\n\t\t\tif ($this->form_validation->run() == FALSE)\n\t\t\t{\n\t\t\t\t$data ['error'] = validation_errors();\t\n\t\t\t\t$this -> load -> view('resourcedb/editview', $data);\n\n\t\t\t}\n\t\t\t# If form validates, update record\n\t\t\telse\n\t\t\t{\n\t\t\t\t# Get form values for fields in RESOURCE table\n\t\t\t\t# What's the current date and time? Use the date helper - \n\t\t\t\t# now() returns current time as Unix timestamp, unix_to_human\n\t\t\t\t# converts it to YYYY-MM-DD HH:MM:SS which mySQL needs for the \n\t\t\t\t# DATETIME data type\n\t\t\t\t$now = \tunix_to_human(now(), TRUE, 'eu'); // Euro time with seconds\n\t\n\t\t\t\t$record_data = array (\n\t\t\t\t\t\t\t\t'title' => $_POST['title'], \n\t\t\t\t\t\t\t\t'url' => $_POST['url'], \n\t\t\t\t\t\t\t\t'description' => $_POST['description'], \n\t\t\t\t\t\t\t\t'type' => $_POST['type'], \n\t\t\t\t\t\t\t\t'creator' => $_POST['creator'], \n\t\t\t\t\t\t\t\t'source' => $_POST['source'], \n\t\t\t\t\t\t\t\t'rights' => $_POST['rights'], \n\t\t\t\t\t\t\t\t'restricted' => $_POST['restricted'], \n\t\t\t\t\t\t\t\t'visible' => $_POST['visible'], \n\t\t\t\t\t\t\t\t'metadata_created' => $now, \n\t\t\t\t\t\t\t\t'metadata_modified' => $now, \n\t\t\t\t\t\t\t\t'metadata_author' => $user_id, \n\t\t\t\t\t\t\t\t'notes' => $_POST['notes']\t\t\t\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t# Run update query in model\n\t\t\t\t$this -> Edit_model -> update_resource($record_data, $resource_id);\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t# ======== JUNCTION TABLES ==========\n\t\t\t\t# Now get form values for fields using junction tables\t\t\t\t\n\t\n\t\t\t\t# TAGS\n\t\t\t\t# First, get tag(s) user's inserted. Get cleaned field text...\n\t\t\t\t$tags = $this -> security -> xss_clean($_POST['tags']);\n\t\t\t\t# ...then split string by the semicolon delimiter...\n\t\t\t\t$tags_ary = explode(';', $tags);\n\t\t\t\t# ...then remove any duplicate tags...\t\t\t\n\t\t\t\t$tags_ary = array_unique($tags_ary);\n\t\t\t\t# ...then see if the user's removed any existing tags.\n\t\t\t\t$detached_tags_ary = $this -> compare_tags($old_tags_ary, $tags_ary);\n\t\t\t\t# Detach the tags removed from reource \n\t\t\t\t# (deleting rows in the RESOURCE_KEYWORD junction table)\n\t\t\t\tforeach($detached_tags_ary as $key => $val)\n\t\t\t\t{\n\t\t\t\t\t# Get id of tag to detach\n\t\t\t\t\t$q = $this -> ResourceDB_model -> get_tag_id($val);\n\t\t\t\t\t$tag_id = $q -> row() -> keyword_num;\n\t\t\t\t\t$this -> Edit_model -> detach_tag($resource_id, $tag_id);\n\t\t\t\t}\n\t\t\t\t# Go through user-entered tags and attach to the resource, \n\t\t\t\t# adding new tags to KEYWORDS if not already exist\n\t\t\t\t$this -> attach_tags($tags_ary, $resource_id);\n\t\t\t\t\n\t\t\t\t# SUBJECTS\n\t\t\t\t# The input form lists subjects as a series of checkboxes with the name\n\t\t\t\t# subjects[] which generates an array in POST, so go through that array\n\t\t\t\t# and 'attach' subjects to the resource in RESOURCE_SUBJECT junction table\n\t\t\t\t# First, check that any subjects are checked at all, and if not just create an \n\t\t\t\t# empty array so as not to generate a runtime error\n\t\t\t\tif (isset($_POST['subjects']))\n\t\t\t\t{ $subjects_id_ary = $_POST['subjects']; }\n\t\t\t\telse\n\t\t\t\t{ $subjects_id_ary = array(); }\n\t\t\t\t# Get an array of the IDs of subjects to detach\n\t\t\t\t$detached_subjects_id_ary = $this -> compare_subjects($old_subjects_ary, $subjects_id_ary);\n\t\t\t\tforeach ($detached_subjects_id_ary as $key => $val)\n\t\t\t\t{\n\t\t\t\t\t$this -> Edit_model -> detach_subject($resource_id, $val);\t\n\t\t\t\t}\n\n\t\t\t\tforeach ($subjects_id_ary as $val)\n\t\t\t\t{\n\t\t\t\t\t# The model function checks if subject already attached\n\t\t\t\t\t$this -> Edit_model -> attach_subject($resource_id, $val);\t\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t\t# Set messages etc for the result page\n\t\t\t\t$data['title'] = \"Edit resource: result\";\n\t\t\t\t$data['heading'] = \"Edit resource: result\";\n\t\t\t\t$data['resource_title'] = $record_data['title'];\n\t\t\t\t$data['resource_id'] = $resource_id; \n\t\t\t\t$data['message'] = 'Record edited ok'; \t\n\t\t\t\t# Load results page with data array\n\t\t\t\t$this->load->view('resourcedb/edit_result_view', $data);\n\t\t\t} // end if validates\n\t\t} // end else \n\t\t\n\t}", "title": "" }, { "docid": "64ca047c763cbf564dd5de6f46e00c8a", "score": "0.5757105", "text": "public function display(){}", "title": "" }, { "docid": "428d435450a183e9f2b1cf67fe4ca1ee", "score": "0.5746211", "text": "public function showAction($id)\n {\n }", "title": "" }, { "docid": "25fef2b3e221da4874ce751e7620e1b8", "score": "0.57376534", "text": "public function show($id)\n {\t\n\t\t//\n \n }", "title": "" }, { "docid": "8f15cdd2f287675d36c7b7df028043ec", "score": "0.5736634", "text": "public function show($id)\n\t{\n\t//\n\t}", "title": "" }, { "docid": "dbfb7ac40503919a18ba680b317c5bcf", "score": "0.57300025", "text": "function show()\r\n\t{\r\n\t\tparent::display();\r\n\t}", "title": "" }, { "docid": "6ec9b736dc660b1af85b3d3e6b5c2891", "score": "0.5728069", "text": "public function showAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('FklFranklinBundle:Intervention')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Intervention entity.');\n }\n\n return $this->render('FklFranklinBundle:Intervention:show.html.twig', array(\n 'entity' => $entity,\n ));\n }", "title": "" }, { "docid": "20397e06b8673db8692c5f84120c3011", "score": "0.5724891", "text": "public function show()\n\t{\n\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "c422e600117f23ecb3e910d02cd71439", "score": "0.5719182", "text": "public function show($id)\n\t{ \n\t\t//\n\t}", "title": "" }, { "docid": "7464e9c5980c37f2e71c965980844f2f", "score": "0.57157016", "text": "public function display() {\r\n \r\n function pec_display($pecio, $template_path_c) {\r\n \tinclude($template_path_c);\r\n }\r\n \r\n \t// here we need to get the canonicalized template path, so that we can include it with `include()`\r\n $template_path_c = $this->template_resource->get('template')->get_directory_path();\r\n \r\n // that's the \"normal\" path to the template directory\r\n $template_path = $this->template_resource->get('template')->get_directory_path(false);\r\n \r\n $this->template_resource->set('template_path', $template_path);\r\n $this->template_resource->set('template_path_c', $template_path_c);\r\n \r\n $pecio = $this->template_resource;\r\n pec_display($pecio, $template_path_c . $this->template_file);\r\n }", "title": "" }, { "docid": "39d7fb3e638fbdb7af4616a9e66a7c1e", "score": "0.571459", "text": "public function display() {\n $id = $_GET['value'];\n $product = $this->productManager->findOne($id);\n $page = 'product';\n require('./View/default.php');\n }", "title": "" }, { "docid": "e5b68899adbea6a73109d8e4dd1a0aad", "score": "0.5703109", "text": "public function showAction() {\r\n // Load View template\r\n $actorModel = new ActorModel(\"actors\");\r\n $actor = $actorModel->getActor(\"id\");\r\n include CURR_VIEW_PATH . \"actors\". DS . \"show.php\";\r\n // actorDB/application/views/actors/show.php;\r\n }", "title": "" }, { "docid": "fa1c2eb41c95d94a4e3d5fbf93d1fb39", "score": "0.5700314", "text": "public function show($id)\n\t{\n\t\t$user = Sentry::getUser();\n\t\t$request = $user->requests()->with('file')->where('id', $id)->first();\n\n\t\tif (! $request) return App::abort(404, \"Request resource [$id] not found.\");\n\n\t\t$file = $request->file()->first();\n\n\t\t$this->layout->content = View::make('my.requests.show')\n\t\t\t\t\t\t\t\t\t->with('user', $user)\n\t\t\t\t\t\t\t\t\t->with('request', $request)\n\t\t\t\t\t\t\t\t\t->with('file', $file);\n\t}", "title": "" }, { "docid": "7b283ba1c0546a155efc95a44dd0f9cf", "score": "0.56981397", "text": "public function show(Response $response)\n {\n //\n }", "title": "" }, { "docid": "7580b6a8a70ffcf0c85b9c5fd2d164c8", "score": "0.56878597", "text": "public function show($id)\n\t{\t\n\t\t\n\t}", "title": "" }, { "docid": "8fb8368b4d32374cf0802714864ca045", "score": "0.5686805", "text": "public function show(Spec $spec)\n {\n //\n }", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" } ]
a51c9d8dbb243e66e30a8339cf7b9c5d
Gets the value of FECHA.
[ { "docid": "9a1e6455732c76010c1ed82f211a4f0c", "score": "0.7801791", "text": "public function getFECHA()\n {\n return $this->FECHA;\n }", "title": "" } ]
[ { "docid": "43db4c1bde459d56f121a8b1b2629103", "score": "0.71004945", "text": "public function getValue() {\n \n //session_start();\n $valor_captcha = $_SESSION[\"captcha\"];\n session_write_close();\n \n return $valor_captcha;\n }", "title": "" }, { "docid": "edf90210902929907754fd2cf409505c", "score": "0.6788682", "text": "public function getCaptchaValue()\n {\n if($this->_captchaValue === null){\n $this->_captchaValue = CCaptcha::generate();\n CrypticBrain::app()->getSession()->set('captcha', $this->_captchaValue);\n }\n return $this->_captchaValue;\n }", "title": "" }, { "docid": "4fa72fe128c9b43cdfa7475b0f051193", "score": "0.6368739", "text": "public function getCaptcha(){\n return $this->validator->getCaptcha();\n }", "title": "" }, { "docid": "45748ac549fe2470153495c755355b3e", "score": "0.61043143", "text": "public function getFormValue();", "title": "" }, { "docid": "c8b18f72c5ec547f28a615c17722523a", "score": "0.56979465", "text": "public function getPoseebecafecha()\n\t{\n\t\treturn $this->poseebecafecha;\n\t}", "title": "" }, { "docid": "1bc809318fe6aee2556e3e48259f4121", "score": "0.5692774", "text": "public function getFechaprueba()\n {\n return $this->fechaprueba;\n }", "title": "" }, { "docid": "ccd01bfd2821fd5e0de017232f39e013", "score": "0.5611719", "text": "public function get_value() {\n return $this->field->getValue();\n }", "title": "" }, { "docid": "1e0008f8c695f4708ffc5551e410253a", "score": "0.5456926", "text": "public function getFactura()\n {\n return $this->factura;\n }", "title": "" }, { "docid": "14f88d554de5f47b03ff97c54120e6b0", "score": "0.54565287", "text": "public function get_field_value( $cf_7 ){\n error_log(\"POST DATA\");\n $this->send_data = $cf_7; \n return $cf_7;\n }", "title": "" }, { "docid": "30dee9bba503653531bc6f198f9c269e", "score": "0.5447927", "text": "public function getCaptchaKey()\n {\n return $this->_captchaKey;\n }", "title": "" }, { "docid": "4a5eaab5891aec21b9310e03a5b83e21", "score": "0.5443015", "text": "public function getTipobecafecha()\n\t{\n\t\treturn $this->tipobecafecha;\n\t}", "title": "" }, { "docid": "fead3947c4fc816961f9cf67a37dc6ba", "score": "0.54278535", "text": "public function getFieldValue()\n {\n return $this->field_value;\n }", "title": "" }, { "docid": "bca1a3c9678d4472739254635fe4c491", "score": "0.54136", "text": "public function getTextValue()\n {\n if (null === $this->textValue) {\n $this->textValue = $this->formTextValue($this->getValue());\n }\n return $this->textValue;\n }", "title": "" }, { "docid": "d5062b544789bfdf3a6a228998fe013a", "score": "0.53751534", "text": "public function getValue() {\n return $this->message;\n }", "title": "" }, { "docid": "bcc8fe3c0776ec541317323e1b0025d0", "score": "0.5367792", "text": "public function getSubmitValue();", "title": "" }, { "docid": "dc2973487c4cb1378c7f815192c37a23", "score": "0.5351646", "text": "public function verify()\n {\n $captcha = $this->captcha;\n $captcha->length = 4;\n $captcha->imageW = 120;\n $captcha->imageH = 35;\n $captcha->fontSize = 16;\n $captcha->expire = 30; //有效期\n $captcha->useNoise = true; //不添加杂点\n\n return $captcha->entry();\n }", "title": "" }, { "docid": "18a9c6998109bd0db69bff474dedd316", "score": "0.53427565", "text": "public function getValue()\n {\n return base64_decode($this->value);\n }", "title": "" }, { "docid": "85076cbbad0af0b5bb5ba60d8506c472", "score": "0.53322864", "text": "function getValue()\r\n {\r\n return $this->_DM->getValue();\r\n }", "title": "" }, { "docid": "42172ebcd51b8579eab87f3856121148", "score": "0.5318996", "text": "function getTextValue($reply) {\n return $reply;\n }", "title": "" }, { "docid": "236163952ba92f69328fc50516577929", "score": "0.5290218", "text": "public function getSubmitValue() {\n return $this->attributes()->getValue('value');\n }", "title": "" }, { "docid": "1b830c8bd149942482c4a272722a8220", "score": "0.5284879", "text": "public static function getBidderEmail()\n {\n return request()->cookie('bidder_email');\n }", "title": "" }, { "docid": "5976a6e423713bca0ce1b0ddb3d12f47", "score": "0.52764034", "text": "private function getCaptcha() : Tag {\n\n\t\t\treturn $this->getTag('input', ['type' => 'text', 'value' => '']);\n\t\t}", "title": "" }, { "docid": "a6e212d33f583b8041d3a03209bce1bd", "score": "0.5259608", "text": "public function getCaptcha()\n {\n if (!$this->captcha instanceof CaptchaAdapter) {\n $captcha = Pi::service('captcha')->load();\n $this->setCaptcha($captcha);\n }\n return $this->captcha;\n }", "title": "" }, { "docid": "abd562cf0cde802d4082053ed8040426", "score": "0.5258724", "text": "public function get_value() {\n return $this->value;\n }", "title": "" }, { "docid": "ff47ebf08d8bbfd6ac0983d57f4f629e", "score": "0.52415496", "text": "private function getCaptchaValidation() {\r\n $captchaValidation = $_POST['captchaValidation'];\r\n if (isset($captchaValidation) && $captchaValidation !== '') {\r\n return $captchaValidation;\r\n } else {\r\n return FALSE;\r\n }\r\n }", "title": "" }, { "docid": "749d9c221fbc4cf253f70ceb7b2ba417", "score": "0.52286476", "text": "public function get_value() {\n\t\n\t\t\treturn $this->value;\n\t\t}", "title": "" }, { "docid": "8e7de92d558ecc53c4cc9273af656d00", "score": "0.52244604", "text": "public function getValue() {\n\t\treturn $this->data[\"value\"];\n\t}", "title": "" }, { "docid": "5edc155deb6b23190b4567fef88d5f34", "score": "0.52202845", "text": "public function getValue()\n {\n $this->eventManager->dispatchEvent(['get_value'], [__METHOD__, $this->getAbsoluteSelector()]);\n $code = $this->getAttributeCode($this->getAbsoluteSelector());\n $inputType = $this->getElementByClass($this->getElementClass($code));\n return $this->find(sprintf($this->inputSelector, $code), Locator::SELECTOR_CSS, $inputType)->getValue();\n }", "title": "" }, { "docid": "e04706db7a466fa00fc9ebb92e403978", "score": "0.52183914", "text": "public function getValor()\n {\n return $this->valor;\n }", "title": "" }, { "docid": "e04706db7a466fa00fc9ebb92e403978", "score": "0.52183914", "text": "public function getValor()\n {\n return $this->valor;\n }", "title": "" }, { "docid": "e04706db7a466fa00fc9ebb92e403978", "score": "0.52183914", "text": "public function getValor()\n {\n return $this->valor;\n }", "title": "" }, { "docid": "e04706db7a466fa00fc9ebb92e403978", "score": "0.52183914", "text": "public function getValor()\n {\n return $this->valor;\n }", "title": "" }, { "docid": "5f0a0d0eaf7f1f9827393d6dd8a4adcd", "score": "0.5209566", "text": "private function getVal() {\n if(isset($_POST['submit'])){\n echo \"<br/>Button was pressed\";\n $this->email = htmlspecialchars(trim($_POST['email']));\n $this->password = htmlspecialchars(trim($_POST['password']));\n }else{\n echo \"<br/>Button was not pressed\";\n exit;\n }\n }", "title": "" }, { "docid": "bfcedf0a2f983c0c68416a5f736d3e2e", "score": "0.52050185", "text": "function value() {\r\n return $this->value;\r\n }", "title": "" }, { "docid": "9df4ff45dc7697d614b503ac9dc327ec", "score": "0.52043545", "text": "function getValue() {\r\n return $this->value;\r\n }", "title": "" }, { "docid": "a7dda3624c15b608196356eff70f5248", "score": "0.5200285", "text": "protected function getCookieValue(): string\n {\n return Crypta::encrypt('' . time());\n }", "title": "" }, { "docid": "5d7f1aef5d156b6a380c6398a10bf3b0", "score": "0.519528", "text": "public function getFee_cpf()\n {\n return $this->fee_cpf;\n }", "title": "" }, { "docid": "79015905c53ed775cebc2bae949d276b", "score": "0.51858944", "text": "public function get_value()\n\t{\n\t\treturn $this->value;\n\t}", "title": "" }, { "docid": "638ac36d8d7f0bb979ab715e944c2ff6", "score": "0.5185291", "text": "function getEmailValue($value, $data, $c )\r\n\t{\r\n\t\treturn \"\";\r\n\t}", "title": "" }, { "docid": "6b5edc56a458d199cba50a95bcbee0bd", "score": "0.51823056", "text": "public function getFormData()\n {\n return base64_decode($this->_getOrder()->getPayment()->getAdditionalInformation('HTML_ANSWER'));\n }", "title": "" }, { "docid": "493bfef47c0a443cc63a42e076c6d903", "score": "0.5179847", "text": "public function getDeliveryFax()\n {\n return $this->getParameter('deliveryFax');\n }", "title": "" }, { "docid": "56a2f70eb776240bd9cf6aa9fd12b9c5", "score": "0.51786625", "text": "public function getChamado()\n {\n return $this->chamado;\n }", "title": "" }, { "docid": "b8214c6be7356e8e60f6eb1a07c0e777", "score": "0.5171426", "text": "public function getValor()\n {\n return $this->valor;\n }", "title": "" }, { "docid": "a2e404bc5186adb149864d5980b8b93a", "score": "0.51616293", "text": "public function field( $return = false )\n\t{\n\t\tif (!($this->enabled)) {\n\t\t\treturn false;\n\t\t}\n\t\tif (!defined('SOBIPRO_ADM')) {\n\t\t\t$lang = JFactory::getLanguage()->getlocale();\n\t\t\tSPFactory::header()->addJsCode( \"var RecaptchaOptions = {\n\t\t\t\ttheme : '{$this->recaptcha_template}',\n\t\t\t\tlang : '{$lang[4]}'\n\t\t\t };\" );\n\t\t\tSPFactory::header()->addJsFile( 'jquery' );\n\t\t\tSPFactory::header()->addJsCode( \"jQuery( document ).ready( function() {\n\t\t\t\tjQuery( '#recaptcha_response_field' )\n\t\t\t\t\t.addClass( ' required' )\n\t\t\t\t\t.css('border' , '')\n\t\t\t});\");\n\t\t\trequire_once(SOBI_PATH.'/lib/recaptcha/recaptcha.php');\n\t\t\t$captcha = recaptcha_get_html($this->public_key, null, $this->ssl);\n\t\t} else {\n\t\t\t$captcha = \"For Backend the reCaptcha is deactivated!\";\n\t\t}\n\t\tif (!$return) {\n\t\t\techo $captcha;\n\t\t}\n\t\telse {\n\t\t\treturn $captcha;\n\t\t}\n\t}", "title": "" }, { "docid": "c82dda7b6fc637573d8aff57fd15db58", "score": "0.5153096", "text": "public function get_value()\n\t{\n\t\treturn $this->_value;\n\t}", "title": "" }, { "docid": "028dde8e3c6b019f8bfcdb3d20eb5bcd", "score": "0.51427513", "text": "function getValue() {\r\n return $this->_value;\r\n }", "title": "" }, { "docid": "abda7710efdb57d623b8f1553fcb1782", "score": "0.5139142", "text": "public function setValue(){\n\t\tif (isset($_POST[self::$value]))\n \treturn ($_POST[self::$value]);\n\t}", "title": "" }, { "docid": "822133661cd4dd580b6d10147906fde1", "score": "0.5137669", "text": "public function getValue()\n {\n return isset($this->value) ? $this->value : '';\n }", "title": "" }, { "docid": "5f349bb41dd861947b2c15364db19394", "score": "0.5134797", "text": "function getValue() {\n\n return $this->value;\n }", "title": "" }, { "docid": "47393153578f1bcbd61d9a76da4323cb", "score": "0.5130266", "text": "public function getFecha_cita()\n {\n return $this->fecha_cita;\n }", "title": "" }, { "docid": "75c2e22ba190a89ba17ac13e2133e81c", "score": "0.5128835", "text": "public function getAnswer() {\r\n return $this->_answer;\r\n }", "title": "" }, { "docid": "a97621c765c4903ba50096a55d47c320", "score": "0.5127834", "text": "public function getValue()\n\t{\n\t\t# code...\n\t\treturn $this->value;\n\t}", "title": "" }, { "docid": "8d0968ed4d3d343f5b87803bf6bfa213", "score": "0.51201564", "text": "protected function getValue() {\n\t\treturn isset($_POST[$this->inputField]) ? $_POST[$this->inputField] : null;\n\t}", "title": "" }, { "docid": "dc650d397315d11c6a3a178882992959", "score": "0.511751", "text": "private function getValue() {\n return $this->value;\n }", "title": "" }, { "docid": "715a301b21bfebb2d81c5fd5278b13fd", "score": "0.5113874", "text": "public function getPostAcfField()\r\n {\r\n if (empty($this->_meta) || empty($this->_id)) {\r\n return false;\r\n }\r\n\r\n return get_field($this->_meta, $this->_id); \r\n }", "title": "" }, { "docid": "23e1c6504f0c290d44c749928568b6ca", "score": "0.51065856", "text": "function getValue ()\r\n\t{\r\n\t\treturn $this->value;\r\n\t}", "title": "" }, { "docid": "cb66d7a2648ae62b27db5fc09adbd9f9", "score": "0.5099914", "text": "public function getValor(){\n\t\treturn $this->valor;\n\t}", "title": "" }, { "docid": "cb66d7a2648ae62b27db5fc09adbd9f9", "score": "0.5099914", "text": "public function getValor(){\n\t\treturn $this->valor;\n\t}", "title": "" }, { "docid": "824e946c38660407a0e7188a46c6e7d7", "score": "0.5095151", "text": "public function getCaptchaSecurityCode()\n {\n return $this->captchaSecurityCode;\n }", "title": "" }, { "docid": "872473eed9d3e148728a6939276ddcda", "score": "0.5095143", "text": "public function getCodeAffaire(): ?string {\n return $this->codeAffaire;\n }", "title": "" }, { "docid": "872473eed9d3e148728a6939276ddcda", "score": "0.5095143", "text": "public function getCodeAffaire(): ?string {\n return $this->codeAffaire;\n }", "title": "" }, { "docid": "681a443bbfaba724733c996db97cb23a", "score": "0.5088088", "text": "public function getFax()\n {\n $value = $this->get(self::FAX);\n return $value === null ? (string)$value : $value;\n }", "title": "" }, { "docid": "516cc571524af82cfcb4ca71e38c4371", "score": "0.5080934", "text": "public function value(){\n\t\treturn $this->value;\n\t}", "title": "" }, { "docid": "48c24fd79c08a9a3d042069b64eeca75", "score": "0.5077572", "text": "public function value()\n {\n return $this->value;\n }", "title": "" }, { "docid": "48c24fd79c08a9a3d042069b64eeca75", "score": "0.5077572", "text": "public function value()\n {\n return $this->value;\n }", "title": "" }, { "docid": "b82cc27ac5d21cf085b1a233657bdfcc", "score": "0.5071837", "text": "function getValue()\n\t{\n\t\treturn $this->value;\n\t}", "title": "" }, { "docid": "b287c1ec3320390df79f8a512f62586a", "score": "0.5066449", "text": "public function value()\n {\n return $this->render();\n }", "title": "" }, { "docid": "b504ffe1bdf5eaff71d833416f657f86", "score": "0.50647926", "text": "public function getFormValue() {\n\t\treturn $this->record->{$this->fieldName};\n\t}", "title": "" }, { "docid": "47c44e55db92dbf5f90dfa3c75b4f8ad", "score": "0.5064693", "text": "public function getActualizacionFecha()\n {\n return $this->BIT_ACTUALIZACION_FECHA;\n }", "title": "" }, { "docid": "add798946f7da93f366f0c0134c57c2f", "score": "0.5063355", "text": "protected function setFECHA($FECHA)\n {\n $this->FECHA = $FECHA;\n\n return $this;\n }", "title": "" }, { "docid": "0cca2968240e54769d6a9fdd1d12c5a3", "score": "0.5054093", "text": "public function getValue()\n {\n if ($this->find($this->parentContainer, 'xpath')->find('input:checked')->isVisible()) {\n return 'Yes';\n } elseif ($this->find($this->parentContainer, 'xpath')->find('input')->isVisible()) {\n return 'No';\n } else {\n throw new \\Exception(\n sprintf('Element %s not found on page', $this->getLocator())\n );\n }\n }", "title": "" }, { "docid": "cc145e24414d22424a8025bb4f0643cb", "score": "0.50539106", "text": "public function getCfopEntrada()\n {\n return $this->cfop_entrada;\n }", "title": "" }, { "docid": "97069889b378f6f164119dc4dea860a6", "score": "0.5052384", "text": "public function getValue()\r\n {\r\n return $this->value;\r\n }", "title": "" }, { "docid": "97069889b378f6f164119dc4dea860a6", "score": "0.5052384", "text": "public function getValue()\r\n {\r\n return $this->value;\r\n }", "title": "" }, { "docid": "8070d89043c79cef6185f1f503cfd47d", "score": "0.50485176", "text": "public function getValue() {\r\n return $this->_value;\r\n }", "title": "" }, { "docid": "4de3ba056ff1772f27107c009e137989", "score": "0.5046035", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "32df67c687d1fb8089c5c97744794091", "score": "0.5039023", "text": "function getChambre()\n {\n return $this->m_chambre;\n }", "title": "" }, { "docid": "bcefa69d558fcb82e703fa90e827fdc8", "score": "0.5037875", "text": "public function getValue()\n {\n return $this->_value;\n }", "title": "" }, { "docid": "bcefa69d558fcb82e703fa90e827fdc8", "score": "0.5037875", "text": "public function getValue()\n {\n return $this->_value;\n }", "title": "" }, { "docid": "bcefa69d558fcb82e703fa90e827fdc8", "score": "0.5037875", "text": "public function getValue()\n {\n return $this->_value;\n }", "title": "" }, { "docid": "bcefa69d558fcb82e703fa90e827fdc8", "score": "0.5037875", "text": "public function getValue()\n {\n return $this->_value;\n }", "title": "" }, { "docid": "1ccf3417d181d2f0a633ee25ee430791", "score": "0.5036168", "text": "public function getValue()\n {\n\n return $this->_value;\n\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.50361365", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.50361365", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.50361365", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.50361365", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.50361365", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.50361365", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.50361365", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.50361365", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.50361365", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.50361365", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.50361365", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.50361365", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.50361365", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.50361365", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.50361365", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.50361365", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.50361365", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.50361365", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" } ]
cfaaae0926315387435e7d0c46fd6e3c
removeMediaFromForm() Deletes an image from the form
[ { "docid": "60de995496ac05ae472efb9905004184", "score": "0.75955117", "text": "function removeMediaFromForm($form=NULL, $form_state=NULL)\n{\n removeMediaHelper($form_state['MID']);\n\n if (isset($form_state['OID'])){\n drupal_goto('viewMedia', array('query'=>array('OID'=>$form_state['OID'])));\n } else {\n drupal_goto('myMedia');\n }\n}", "title": "" } ]
[ { "docid": "67faa233f6bbb7d6d32ec04fde525689", "score": "0.71333164", "text": "public function remove_image() {\n\t\t$this->join_name = \"images\";\n\t\t$this->use_layout=false;\n\t\t$this->page = new $this->model_class(Request::get('id'));\n\t\t$image = new WildfireFile($this->param(\"image\"));\n\t\t$this->page->images->unlink($image);\n\t}", "title": "" }, { "docid": "064c4654b8ecad40bebc09045a5093dd", "score": "0.7030919", "text": "public function postRemove(MediaInterface $media);", "title": "" }, { "docid": "17a49b5423046820265db48b4722be7e", "score": "0.69515747", "text": "public function remove_image() {\n $ad = $this->ad_protected_for_current_user($this->params['id']);\n $ad->remove_image($this->params['image_id']);\n redirect('/ads/edit', ['notice' => 'Image successfully removed.'], ['id' => $ad->id]);\n }", "title": "" }, { "docid": "f34fcaf08682a9b0139c1f88c2ba91af", "score": "0.6791094", "text": "public function preRemove(Media $media): void;", "title": "" }, { "docid": "df76e304787c6be76144a24a799b6900", "score": "0.6768503", "text": "public function removeAction()\n {\n Pi::service('log')->mute();\n $id = $this->params('id', 0);\n $fakeId = $this->params('fake_id', 0);\n $affectedRows = 0;\n $module = $this->getModule();\n\n if ($id) {\n $row = $this->getModel('media')->find($id);\n\n if ($row && $row->url) {\n // Delete media\n unlink(Pi::path($row->url));\n\n // Update db\n $row->url = '';\n $row->type = '';\n $row->size = 0;\n $row->meta = '';\n $affectedRows = $row->save();\n }\n } elseif ($fakeId) {\n $session = Media::getUploadSession($module, 'media');\n\n if (isset($session->$fakeId)) {\n $uploadInfo = isset($session->$id) ? $session->$id : $session->$fakeId;\n\n unlink(Pi::path($uploadInfo['tmp_name']));\n\n unset($session->$id);\n unset($session->$fakeId);\n }\n $affectedRows = 1;\n }\n\n echo json_encode([\n 'status' => $affectedRows ? self::AJAX_RESULT_TRUE : self::AJAX_RESULT_FALSE,\n 'message' => 'ok',\n ]);\n exit;\n }", "title": "" }, { "docid": "e47c713905c8a4ebbb0953639a7d53cc", "score": "0.6623696", "text": "function DeleteImageForm() {\n\t\tif($this->Image()->ID) {\n\t\t\t$isImage = $this->IsImage();\n\t\t\t$type = $isImage ? _t('Controller.IMAGE') : _t('Controller.FILE');\n\t\t\t$title = sprintf(\n\t\t\t\t_t('ImageUploader.DELETE', 'Delete %s', PR_MEDIUM, 'Delete file/image'), \n\t\t\t\t$type\n\t\t\t);\n\t\t\t$form = new Form(\n\t\t\t\t$this,\n\t\t\t\t'DeleteImageForm', \n\t\t\t\tnew FieldSet(\n\t\t\t\t\tnew HiddenField(\"Class\", null, $this->urlParams['Class']),\n\t\t\t\t\tnew HiddenField(\"ID\", null, $this->urlParams['ID']),\n\t\t\t\t\tnew HiddenField(\"Field\", null, $this->urlParams['Field'])\n\t\t\t\t),\n\t\t\t\tnew FieldSet(\n\t\t\t\t\t$deleteAction = new ConfirmedFormAction(\n\t\t\t\t\t\t\"delete\",\n\t\t\t\t\t\t$title, \n\t\t\t\t\t\tsprintf(_t('ImageUploader.REALLYDELETE', \"Do you really want to remove this %s?\"), $type)\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\t\t\t$deleteAction->addExtraClass('delete');\n\t\t\t\n\t\t\treturn $form;\n\t\t}\n\t}", "title": "" }, { "docid": "2337fe4636098a84461a3d4ba2d6eea2", "score": "0.659543", "text": "public function removeImage()\n {\n // Suppression de l'image principale\n $fichier = $this->getAbsolutePath();\n\n if (file_exists($fichier))\n {\n unlink($fichier);\n }\n\n // Suppression des thumbnails\n foreach($this->thumbnails as $key => $thumbnail)\n {\n $thumb = $this->getUploadRootDir() . '/' . $key . '-' . $this->name;\n if (file_exists($thumb))\n {\n unlink($thumb);\n }\n }\n }", "title": "" }, { "docid": "51185449bdcd20a158cd9a24c3f1b9e4", "score": "0.65880984", "text": "public function remove()\n {\n // Get the image\n $query = $this->db->getQuery(true);\n $query\n ->select(\"a.image, a.thumb\")\n ->from($this->db->quoteName(\"#__crowdf_images\", \"a\"))\n ->where(\"a.id = \" . (int)$this->imageId);\n\n $this->db->setQuery($query);\n $row = $this->db->loadObject();\n\n if (!empty($row)) {\n\n // Remove the image from the filesystem\n $file = \\JPath::clean($this->imagesFolder . DIRECTORY_SEPARATOR . $row->image);\n if (\\JFile::exists($file)) {\n \\JFile::delete($file);\n }\n\n // Remove the thumbnail from the filesystem\n $file = \\JPath::clean($this->imagesFolder . DIRECTORY_SEPARATOR . $row->thumb);\n if (\\JFile::exists($file)) {\n \\JFile::delete($file);\n }\n\n // Delete the record\n $query = $this->db->getQuery(true);\n $query\n ->delete($this->db->quoteName(\"#__crowdf_images\"))\n ->where($this->db->quoteName(\"id\") . \" = \" . (int)$this->imageId);\n\n $this->db->setQuery($query);\n $this->db->execute();\n }\n }", "title": "" }, { "docid": "5eabd25d9878477984beb316aea0c019", "score": "0.65295017", "text": "public function removeUpload()\n {\n $this->picture = null;\n }", "title": "" }, { "docid": "3deaa7e4d30f592c88ca1904770c1f07", "score": "0.651456", "text": "public function preRemove(MediaInterface $media);", "title": "" }, { "docid": "42522ef0f372b9effdf836de606e079e", "score": "0.6449972", "text": "public function removeAction() {\r\n if (empty($_POST['photo_id']))\r\n die('error');\r\n //GET PHOTO ID AND ITEM\r\n $photo_id = (int) $this->_getParam('photo_id');\r\n $photo = Engine_Api::_()->getItem('sesvideo_chanelphoto', $photo_id);\r\n $db = Engine_Api::_()->getDbTable('chanelphotos', 'sesvideo')->getAdapter();\r\n $db->beginTransaction();\r\n try {\r\n $photo->delete();\r\n $db->commit();\r\n } catch (Exception $e) {\r\n $db->rollBack();\r\n throw $e;\r\n }\r\n }", "title": "" }, { "docid": "724cba470d23311f37db6c62f0a4401e", "score": "0.6426955", "text": "public function deleteImage(){\n if(file_exists($this->getImage())){\n unlink($this->getImage());\n }\n $this->setImage(null);\n }", "title": "" }, { "docid": "46fbc49256620f989fe00879f02ef5d1", "score": "0.64095736", "text": "function removeMediaHelper($MID){\n\n $FID = dbDeleteMedia($MID);\n if($FID != null){\n removePicture($FID, 'Media');\n }\n}", "title": "" }, { "docid": "a6e5f90e49b58458866e5cef3789f902", "score": "0.6397054", "text": "public function delete_images(){\n\t\t# Cargar modelo de base de datos\n\t\t$this->load->model('MultimediaModel', 'medios', TRUE);\n\t\t# Enviar peticion de eliminación\n\t\t$this->medios->delete($this->input->post('id'));\n\t\t# Buscar el archivo en el directorio y eliminarlos\n\t\t$this->delete_medio_imagen($this->input->post('name'));\n\t}", "title": "" }, { "docid": "1078ed2ce3effe6dfbbd51c61e9a004f", "score": "0.63734174", "text": "public function supprimerImageMorphoAction()\n\t{\n\t\t$id_cons = $this->params()->fromPost('id_cons');\n\t\t$id = $this->params()->fromPost('id'); //numero de l'image dans le diapo\n\t\t$typeExamen = $this->params()->fromPost('typeExamen');\n\t\n\t\t/**\n\t\t * RECUPERATION DE TOUS LES RESULTATS DES EXAMENS MORPHOLOGIQUES\n\t\t*/\n\t\t $result = $this->demandeExamensTable()->recupererDonneesExamenMorpho($id_cons, $id, $typeExamen);\n\t\t/**\n\t\t * SUPPRESSION PHYSIQUE DE L'IMAGE\n\t\t*/\n\t\t unlink ( 'C:\\wamp\\www\\simens\\public\\images\\images\\\\' . $result['NomImage'] . '.jpg' );\n\t\t/**\n\t\t * SUPPRESSION DE L'IMAGE DANS LA BASE\n\t\t*/\n\t\t $this->demandeExamensTable()->supprimerImage($result['IdImage']);\n\t\n\t\t$this->getResponse()->getHeaders ()->addHeaderLine ( 'Content-Type', 'application/html' );\n\t\treturn $this->getResponse ()->setContent(Json::encode ());\n\t}", "title": "" }, { "docid": "0da029fb43c0f7a51611d3ab8bee4902", "score": "0.63377047", "text": "public function removeMedia(Request $request){\n if(isset($request->medianame) && isset($request->folder) && ($request->folder == \"projects\" || $request->folder == \"points\")){\n Media::find($request->medianame)->delete();\n }else return abort(400);\n }", "title": "" }, { "docid": "fb4d25d01ec70e2e12eddd74ebe89a59", "score": "0.6331793", "text": "public function postRemove($image)\n {\n $this->deleteImageFile($image);\n }", "title": "" }, { "docid": "d271ce4a6b5d2fc4764f7997ca7be1bd", "score": "0.63192046", "text": "public function removeImage()\n {\n if (file_exists($this->getPath())) {\n @unlink($this->getPath());\n }\n if (file_exists($this->getPath('small'))) {\n @unlink($this->getPath('small'));\n }\n if (file_exists($this->getPath('medium'))) {\n @unlink($this->getPath('medium'));\n }\n }", "title": "" }, { "docid": "955be5d8136955aa5f5985f593496d29", "score": "0.63179183", "text": "public function delete_medio_imagen($file){\n\t\t$route_file = 'assets/dist/img/multimedia/images/'.$file;\n\t \tunlink($route_file);\n\t}", "title": "" }, { "docid": "a230e6f2ec63d9491c3ba95cc594aedd", "score": "0.6298863", "text": "public function removeMedia(Request $request)\n {\n $input = $request->all();\n $driver = $this->driverRepository->findWithoutFail($input['id']);\n try {\n if($driver->hasMedia($input['collection'])){\n $driver->getFirstMedia($input['collection'])->delete();\n }\n } catch (\\Exception $e) {\n Log::error($e->getMessage());\n }\n }", "title": "" }, { "docid": "04b4be5434deb81cf38dcdad6ce6ed25", "score": "0.6297256", "text": "public function removeMedia(Request $request)\n {\n $input = $request->all();\n try {\n $this->eServiceRepository->pushCriteria(new EServicesOfUserCriteria(auth()->id()));\n $eService = $this->eServiceRepository->findWithoutFail($input['id']);\n if ($eService->hasMedia($input['collection'])) {\n $eService->getFirstMedia($input['collection'])->delete();\n }\n } catch (Exception $e) {\n Log::error($e->getMessage());\n }\n }", "title": "" }, { "docid": "7d10ed3e157f6ce82f967d589380b77f", "score": "0.62969965", "text": "public function removeMedia(Request $request)\n {\n $input = $request->all();\n $encargo = $this->EncargoRepository->findWithoutFail($input['id']);\n try {\n if ($encargo->hasMedia($input['collection'])) {\n $encargo->getFirstMedia($input['collection'])->delete();\n }\n } catch (\\Exception $e) {\n Log::error($e->getMessage());\n }\n }", "title": "" }, { "docid": "c2945bbc17011ee2dc0c2a5dd01db2fb", "score": "0.628449", "text": "public function delete_image() {\n if (!$this->image) { return; }\n $this->image->destroy();\n $this->image = null;\n }", "title": "" }, { "docid": "06e55855b877e5cf8d239a63ba7b7b43", "score": "0.62761223", "text": "public function destroy(Media $media)\n {\n //\n }", "title": "" }, { "docid": "cf4e6ac3d2a41bf9650e219db90deb5b", "score": "0.6254747", "text": "public function remove_image( $media_id ) {\n\n\n\t\treturn (bool) wp_delete_attachment( $media_id, true );\n\t}", "title": "" }, { "docid": "9553181bc8e7ab9fc2fd24e2aa71e57d", "score": "0.62322193", "text": "public function removeImage($image)\n {\n if (file_exists('upload_image/' . $image)) {\n unlink('upload_image/' . $image);\n }\n }", "title": "" }, { "docid": "9f0df85a73a671ea5497a75e0c5d76bb", "score": "0.62318116", "text": "public function deletephotoAction() {\n\t\t$midencoded=($this->_request->getParam('mid'));\n\t\t$uid=($this->_request->getParam('uid'));\n\t\t$mid=base64_decode($midencoded);\n\t\t$this->view->uid = $uid;\n\t\t$this->view->midencoded=$midencoded;\n\t\t$this->view->photoURL = MediabankResourceConstants::createCompassImageUrl($mid, null, 320, 320);;\n\t}", "title": "" }, { "docid": "1bdefa7a1fbececaa6e84237679af680", "score": "0.6227093", "text": "public function removeMedia(Request $request)\n {\n $input = $request->all();\n $shopReview = $this->shopReviewRepository->findWithoutFail($input['id']);\n try {\n if ($shopReview->hasMedia($input['collection'])) {\n $shopReview->getFirstMedia($input['collection'])->delete();\n }\n } catch (\\Exception $e) {\n Log::error($e->getMessage());\n }\n }", "title": "" }, { "docid": "35d959303659579a02dcd2981be11ea2", "score": "0.6220487", "text": "public function deleted(Media $media)\n {\n if ( $media->local ) {\n $type = $media->mediatype->slug;\n switch ('image') {\n case 'value':\n Storage::delete( 'public/'.$media->source );\n $arr = explode( '/', $media->source );\n $thmb = array_pop( $arr );\n Storage::delete( MediaController::$thmbdir.$thmb );\n break;\n\n default:\n // code...\n break;\n }\n }\n }", "title": "" }, { "docid": "5cd5b3e7e9543b78d868376f0653f875", "score": "0.62016374", "text": "public function deleteImage()\n {\n Storage::delete($this->image);\n }", "title": "" }, { "docid": "f4f091d779c61b629b11b474173d572a", "score": "0.6197938", "text": "public function deleteImage($id)\n {\n if ($id > 4) {\n $media = Media::find($id);\n $image_path = $media->media_location;\n if (File::exists($image_path)) {\n File::delete($image_path);\n }\n $media->delete();\n }\n }", "title": "" }, { "docid": "ca2b3a248fc9c845372ae49fcaa87df2", "score": "0.61637825", "text": "public function removeMedia(Request $request)\n {\n $input = $request->all();\n $shop = $this->shopRepository->findWithoutFail($input['id']);\n try {\n if ($shop->hasMedia($input['collection'])) {\n $shop->getFirstMedia($input['collection'])->delete();\n }\n } catch (\\Exception $e) {\n Log::error($e->getMessage());\n }\n }", "title": "" }, { "docid": "a1f3472fd5404b925775f9de7de1c401", "score": "0.61498135", "text": "public function removeImage() {\n //check if we have an old image\n if ($this->image) {\n //store the old name to delete the image on the upadate\n $this->temp = $this->image;\n //delete the current image\n $this->setImage(NULL);\n }\n }", "title": "" }, { "docid": "5968c5b0c5b9bccd87355be2551a9a69", "score": "0.6148419", "text": "public function removeMedia(Request $request)\n {\n $input = $request->all();\n $market = $this->marketRepository->findWithoutFail($input['id']);\n try {\n if ($market->hasMedia($input['collection'])) {\n $market->getFirstMedia($input['collection'])->delete();\n }\n } catch (\\Exception $e) {\n Log::error($e->getMessage());\n }\n }", "title": "" }, { "docid": "341c517e9159157b71bd17fd62fe8145", "score": "0.6148113", "text": "public function removeMedia(Request $request)\n {\n $input = $request->all();\n $marketsPayout = $this->marketsPayoutRepository->findWithoutFail($input['id']);\n try {\n if ($marketsPayout->hasMedia($input['collection'])) {\n $marketsPayout->getFirstMedia($input['collection'])->delete();\n }\n } catch (\\Exception $e) {\n Log::error($e->getMessage());\n }\n }", "title": "" }, { "docid": "5144347b94394a832f6491fe089b62ac", "score": "0.6146026", "text": "public function destroyimage($id) {\n $delete = ProductsGallary::find($id);\n if(!empty($delete->media) and file_exists(public_path().'/upload/products/'.$delete->media))\n {\n unlink(public_path().'/upload/products/'.$delete->media);\n }\n $delete->delete();\n session()->flash('success',trans('admin.deleted'));\n return back();\n }", "title": "" }, { "docid": "a0d586959b508346cafa3286d848d0e2", "score": "0.61395967", "text": "public function removeMedia(Request $request)\n {\n $input = $request->all();\n $category = $this->contryRepository->findWithoutFail($input['id']);\n try {\n if ($category->hasMedia($input['collection'])) {\n $category->getFirstMedia($input['collection'])->delete();\n }\n } catch (\\Exception $e) {\n Log::error($e->getMessage());\n }\n }", "title": "" }, { "docid": "4f96b58117ef676d330c02c249ff5291", "score": "0.61262834", "text": "public function deleteVideoSectionImg(){\n\t\tif(count($_POST)>0){\t\t\t\n\t\t\t\t\t\t\n\t\t\t$location_id = $_POST['location_id'];\n\t\t\t$this->db->where(\"location_id\", $location_id);\n\t\t\t\n\t\t\tif($this->db->query(\"update tbl_school_video_section set photo='' where location_id=\".$location_id.\"\"))\n\t\t\t{\t\n\t\t\t\t/*$dir=pathinfo(BASEPATH);\n\t\t\t\t//echo $dir; die;\n\t\t\t\t$img=$dir['dirname'].'/'.$_POST['image_path'];\t\t\t\t\n\t\t\t\tunlink($img); */\t\t\t\t\t\n\t\t\t\techo 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo 0;\n\t\t\t}\n\t\t}else{\n\t\t\t\techo 0;\n\t\t}\n\t\n\t}", "title": "" }, { "docid": "196660bc24a3965aad34eded520fd9a9", "score": "0.6077726", "text": "function DeleteFormFolderImage($folder_id,$form_id)\n{\n\t$directory = PATH_UPLOAD_FORMS.\"master_temp_$folder_id/form_$form_id\";\n\t$success =\\File::deleteDirectory($directory);\n return $success;\n}", "title": "" }, { "docid": "f97b22a72fffc94a7c420f6a8282e7a7", "score": "0.6056304", "text": "public function deleteImage()\n\t{\n\t\t$file = $this->getImagePath() . $this->getImageFilename();\n\n\t\tif(file_exists($file))\n\t\t{\n\t\t\tunlink($file);\n\t\t\t$this->image_filename = '';\n\t\t}\n\t}", "title": "" }, { "docid": "f99a3f83c9e8765a995368b5529ead09", "score": "0.60557544", "text": "public function delete($fieldName='')\n {\n if ($this->id == 0) {\n return true; \n }\n\n if (!strlen($this->name)) {\n return false;\n }\n\n $domainDa = \\Innomatic\\Core\\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')\n ->getCurrentDomain()\n ->getDataAccess();\n\n $domainDa->execute(\"DELETE FROM innomedia_media WHERE id = {$this->id}\");\n\n $mediaPath = $this->getPath(true); \n unlink($mediaPath);\n\n // Delete reference image from innomedia_blocks\n if (!empty($fieldName)) {\n $this->deleteFromBlock($fieldName);\n }\n\n // @todo Delete here all image aliases\n\n $this->id = 0;\n }", "title": "" }, { "docid": "4771e071d2fc76e5063824674f049af4", "score": "0.60416895", "text": "private function removeUploadedFile()\n {\n if(!isset($_REQUEST['file']))\n {\n exit; \n }\n \n list($file, $src, $size) = explode(':', $_REQUEST['file']);\n \n if(file_exists($src))\n {\n @unlink($src);\n }\n exit;\n }", "title": "" }, { "docid": "0828dccd4e20a5f715335323ee5a03b9", "score": "0.6040404", "text": "public function deleteMediaImage(Request $request, $id, $image)\n {\n if ($request->isMethod('get') && Package::where('id', $id)->exists()) {\n $site = site();\n $package = $site->packages()->where('id', $id)->firstOrFail();\n $images = $package->getMedia('images');\n\n foreach ($images as $index => $_image) {\n if ($index == $image) {\n $_image->delete();\n flash('Successfully deleted media image.');\n return redirect()->route('admin.packages.edit', $package);\n }\n }\n }\n\n flash('Package or media resource does not exist');\n return redirect()->route('admin.packages.index');\n }", "title": "" }, { "docid": "72dc5bfa6ca53ddd2451fc0e14e6fcfe", "score": "0.6031449", "text": "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "title": "" }, { "docid": "2c818666224f4ab8636aa29e244b6c8e", "score": "0.6031339", "text": "private function _unlink_media_image($image){\n\t\t\n \t\tif($image!=\"\" and file_exists(SLIDER_IMAGES_PATH.\"/\".$image)){\n\t\t\tunlink(SLIDER_IMAGES_PATH.\"/\".$image);\n\t\t\tunlink(SLIDER_IMAGES_PATH.\"/300/\".$image);\n\t\t}\n\t\treturn true ;\n\t}", "title": "" }, { "docid": "b1024cc552b551c4d816d94b4d16fb29", "score": "0.60222346", "text": "public function page_extra_remove_image($id)\n\t{\n\t\t$pages_extra = PageExtra::where('id',$id)->get();\n\t\tif($pages_extra[0]->image!='' && file_exists(public_path().'/uploads/'.$pages_extra[0]->image))\n\t\t{\n\t\t\tunlink(public_path().'/uploads/'.$pages_extra[0]->image);\n\t\t}\n\t\tif($pages_extra[0]->image2!='' && file_exists(public_path().'/uploads/'.$pages_extra[0]->image2))\n\t\t{\n\t\t\tunlink(public_path().'/uploads/'.$pages_extra[0]->image2);\n\t\t}\n\t\tif ($pages_extra[0]->type==1 || ($pages_extra[0]->type==7 && $pages_extra[0]->page_id!=1)) {\n\t\t\tDB::delete('delete from pages_extra where id = ?',[$id]);\n\t\t}else{\n\t\t\tDB::table('pages_extra')\n\t\t\t->where('id', $id)\n\t\t\t->update( array('image' => '' ) );\n\t\t}\n\t\t\n\n\t\treturn redirect()->back()->with('remove_image_success', true);\n\t}", "title": "" }, { "docid": "11c5021056bacb792d2024f8e1bdb709", "score": "0.5970334", "text": "public function deleteTextSectionBoxImg(){\n\t\tif(count($_POST)>0){\t\t\t\n\t\t\t\t\t\t\n\t\t\t$location_id = $_POST['location_id'];\n\t\t\t$this->db->where(\"location_id\", $location_id);\n\t\t\t\n\t\t\tif($this->db->query(\"update tbl_school_text_sections set left_photo='' where location_id=\".$location_id.\"\"))\n\t\t\t{\t\n\t\t\t\t/*$dir=pathinfo(BASEPATH);\n\t\t\t\t//echo $dir; die;\n\t\t\t\t$img=$dir['dirname'].'/'.$_POST['image_path'];\t\t\t\t\n\t\t\t\tunlink($img); */\t\t\t\t\t\n\t\t\t\techo 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo 0;\n\t\t\t}\n\t\t}else{\n\t\t\t\techo 0;\n\t\t}\n\t\n\t}", "title": "" }, { "docid": "4d0194562ceebee96b9ea91717e1b92b", "score": "0.59628254", "text": "function article_photo_delete() {\r\n\t global $database;\r\n\t $article_photo = $this->article_photo();\r\n\t if($article_photo != \"\") {\r\n\t unlink($article_photo);\r\n\t $database->database_query(\"UPDATE se_articles SET article_photo='' WHERE article_id='\".$this->article_info[article_id].\"'\");\r\n\t $this->article_info[article_photo] = \"\";\r\n\t }\r\n\t}", "title": "" }, { "docid": "5a0799128cb93c234ac74c4524b136da", "score": "0.5952783", "text": "function mediaIndexRemove($file){\n\t$this->dbQuery(\"DELETE FROM k_media WHERE mediaUrl='\".$file.\"'\");\n}", "title": "" }, { "docid": "a6704a8e4297b76001479bbbba309d09", "score": "0.59523064", "text": "function submitDeleteImage() {\n\t$imageid = getContinuationVar(\"imageid\");\n\t$deleted = getContinuationVar(\"deleted\");\n\tif($deleted) {\n\t\t$query = \"UPDATE image \"\n\t\t\t\t . \"SET deleted = 0 \"\n\t\t\t\t . \"WHERE id = $imageid\";\n\t\t$qh = doQuery($query, 210);\n\t}\n\telse {\n\t\t$query = \"UPDATE image \"\n\t\t\t\t . \"SET deleted = 1 \"\n\t\t\t\t . \"WHERE id = $imageid\";\n\t\t$qh = doQuery($query, 211);\n\t\t$query = \"UPDATE computer \"\n\t\t\t\t . \"SET nextimageid = 0 \"\n\t\t\t\t . \"WHERE nextimageid = $imageid\";\n\t\tdoQuery($query, 212);\n\t}\n\tviewImages();\n}", "title": "" }, { "docid": "843d323196e45f1ec32f6ff290b03023", "score": "0.59293574", "text": "public function teacher_pic_Dropzone_remove(Request $request)\n {\n $img = $request->img;\n /******************************remove from directory*/\n\n if (isset($img)) {\n $fileName = public_path('dropZon/teacher' . '/' . $img);\n unlink($fileName);\n }\n return \"yes\";\n }", "title": "" }, { "docid": "67118aabdc4d4d9e45043a1b9ea77f43", "score": "0.5905205", "text": "public function destroy($id)\n {\n $media = Media::find($id);\n // handle post content picture\n Storage::delete(str_replace(\"/storage/\", \"\", $media->path));\n $media->delete();\n }", "title": "" }, { "docid": "b36cf6614522a902b216519e3592c3ba", "score": "0.5903933", "text": "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 }", "title": "" }, { "docid": "f6073f032034991db6787ec1e6f3be25", "score": "0.58981293", "text": "public function presentation_image_delete($image_id)\n\t\t{\n\t\t\t$this->is_login();\n\t\t\t$image_id = rawurldecode($image_id);\n\t\t\t$this->load->model('presentation_images_model', 'pim');\n\t\t\t$this->pim->delete($image_id);\n\t\t\tredirect('/admin/presentation_images','refresh');\n\t\t}", "title": "" }, { "docid": "23d98957f1db9fcd8cadcd9a472655e4", "score": "0.5893663", "text": "public function delete_imgAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Resource_Service_Img::getGameImg($id);\n\t\tif ($info && $info['id'] == 0) $this->output(-1, '无法删除');\n\t\tUtil_File::del(Common::getConfig('siteConfig', 'attachPath') . $info['img']);\n\t\t$result = Resource_Service_Img::deleteGameImg($id);\n\t\tif (!$result) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\n\t}", "title": "" }, { "docid": "0331add920be9abbc6d9f182c05ff04c", "score": "0.58936423", "text": "public function deleteImage($id){\n $delete_image=Details::findOrFail($id);\n $image_large=public_path().'/'.$delete_image->image;\n if($delete_image){\n $delete_image->image='';\n $delete_image->save();\n \n unlink($image_large);\n }\n session()->flash('success','Image bien supprimer');\n return back();\n }", "title": "" }, { "docid": "59e799333b76fa14ecfd87f92ae8b246", "score": "0.58872575", "text": "public function deleteAboutImg(){\n\t\t\n\t\t//echo '<pre>'; print_r($_POST); die;\n\t\tif(count($_POST)>0){\t\t\t\n\t\t\t\t\t\t\n\t\t\t$location_id = $_POST['location_id'];\n\t\t\t$this->db->where(\"location_id\", $location_id);\n\t\t\t\n\t\t\tif($this->db->query(\"update tblschool_about_school set photo='' where location_id=\".$location_id.\"\"))\n\t\t\t{\t\n\t\t\t\t/*$dir=pathinfo(BASEPATH);\n\t\t\t\t//echo $dir; die;\n\t\t\t\t$img=$dir['dirname'].'/'.$_POST['image_path'];\t\t\t\t\n\t\t\t\tunlink($img); */\t\t\t\t\t\n\t\t\t\techo 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo 0;\n\t\t\t}\n\t\t}else{\n\t\t\t\techo 0;\n\t\t}\n\t\n\t}", "title": "" }, { "docid": "19dc2aa5c27cf6cc64b7fdedc66c7ca6", "score": "0.5884159", "text": "public function deleteSelectorImage()\r\n\t{\r\n\t\t// Get request\r\n\t\t$metaSelectorId = Request::getInt('selector');\r\n\t\t\r\n\t\t// Delete from model\r\n\t\t$metaModel = BluApplication::getModel('meta');\r\n\t\t$deleted = $metaModel->updateMetaSelector($metaSelectorId, array(\r\n\t\t\t'images' => array($type => '')\r\n\t\t));\r\n\t\t\r\n\t\t// Back to listing\r\n\t\tif ($deleted) {\r\n\t\t\tMessages::addMessage('Meta selector image deleted', 'info');\r\n\t\t}\r\n\t\t$this->view();\r\n\t}", "title": "" }, { "docid": "ecc8725489fb99aa26b2803ce3cc1c11", "score": "0.58762413", "text": "public function actionDropImg() {\n\n $modelGallery = Gallery::find()->where([\n 'path' => Yii::$app->request->post('url')\n ])->one();\n\n unlink('../' . Yii::$app->request->post('url'));\n\n $modelGallery->delete();\n\n }", "title": "" }, { "docid": "4183369e8af0d29f9fe23102f41bb8e2", "score": "0.58654046", "text": "public function removeAction() {\r\n //DELETE SLIDE DURING THE UPLOAD\r\n $is_ajax = (int) $this->_getParam('is_ajax');\r\n if (!empty($is_ajax)) {\r\n\r\n //GET IMAGE ID AND IT'S OBJECT\r\n $image_id = (int) $this->_getParam('image_id');\r\n $image = Engine_Api::_()->getItem('advancedslideshow_image', $image_id);\r\n\r\n $db = $image->getTable()->getAdapter();\r\n $db->beginTransaction();\r\n\r\n try {\r\n $image->delete();\r\n $db->commit();\r\n } catch (Exception $e) {\r\n $db->rollBack();\r\n throw $e;\r\n }\r\n //@unlink(APPLICATION_PATH . \"/public/advancedslideshow/1000000/1000/5/\" . $image_id . 't.' . $image->extension);\r\n }\r\n\r\n //GET SLIDESHOW ID AND IT'S OBJECT\r\n $advancedslideshow_id = (int) $this->_getParam('advancedslideshow_id');\r\n $this->view->advancedslideshow = $advancedslideshow = Engine_Api::_()->getItem('advancedslideshow', $advancedslideshow_id);\r\n\r\n if ($this->getRequest()->isPost() && $this->getRequest()->getPost('confirm') == true) {\r\n\r\n //GET IMAGE ID AND IT'S OBJECT\r\n $image_id = (int) $this->_getParam('image_id');\r\n $image = Engine_Api::_()->getItem('advancedslideshow_image', $image_id);\r\n\r\n if (empty($image)) {\r\n return;\r\n }\r\n\r\n $db = $image->getTable()->getAdapter();\r\n $db->beginTransaction();\r\n\r\n try {\r\n $image->delete();\r\n $db->commit();\r\n } catch (Exception $e) {\r\n $db->rollBack();\r\n throw $e;\r\n }\r\n\r\n //@unlink(APPLICATION_PATH . \"/public/advancedslideshow/1000000/1000/5/\" . $image_id . 't.' . $image->extension);\r\n\r\n //GET TOTAL SLIDES COUNT\r\n $total_images = Engine_Api::_()->getDbTable('images', 'advancedslideshow')->getTotalSlides($advancedslideshow_id);\r\n\r\n $start_index = $advancedslideshow->start_index;\r\n\r\n if ($start_index > $total_images - 1) {\r\n if ($total_images != 0) {\r\n $advancedslideshow->start_index = $total_images - 1;\r\n $advancedslideshow->save();\r\n } else {\r\n $advancedslideshow->start_index = 0;\r\n $advancedslideshow->save();\r\n }\r\n }\r\n\r\n $parentRedirect = 'admin/advancedslideshow/slides/manage/advancedslideshow_id/' . $advancedslideshow_id;\r\n $this->_forward('success', 'utility', 'core', array(\r\n 'smoothboxClose' => true,\r\n 'parentRefresh' => 10,\r\n 'parentRedirect' => $parentRedirect,\r\n 'messages' => Zend_Registry::get('Zend_Translate')->_('You have successfully deleted the slide.')\r\n ));\r\n }\r\n }", "title": "" }, { "docid": "1916c2caddc2e7042908e1dfdc4abd03", "score": "0.58653504", "text": "private function _removeMediaFolder()\n\t{\n\t\tjimport('joomla.filesystem.folder');\n\n\t\t// Remove the folder if exists\n\t\tif (is_dir(JPATH_SITE . '/modules/mod_tweetdisplayback/media/'))\n\t\t{\n\t\t\tJFolder::delete(JPATH_SITE . '/modules/mod_tweetdisplayback/media/');\n\t\t}\n\t}", "title": "" }, { "docid": "fdf8193414779985fcd2e2b5725a797c", "score": "0.58651453", "text": "public function DeleteImage()\n\t{\t\n\t\t// === GET ID === //\n\t\t$id = $this->segment_item;\n\t\t\n\t\t$this->companies_model->RemovePostImage($id);\n\t\t\n\t\tredirect($this->_getBaseURI().\"/edit/$this->segment_orderby/\".$this->segment_orderseq.\"/\".$this->segment_offset.\"/\".$id);\n\t}", "title": "" }, { "docid": "274a754b5ed691f5185548ec6c04efec", "score": "0.5859629", "text": "public function removeimg($id)\n {\n $img = ImagenesPaginas::findOrFail($id);\n if($img->delete()){\n //Hay que borrar la imagen del disco!!!\n if (file_exists(public_path($img->imagen))) {\n unlink(public_path($img->imagen));\n }\n echo \"true\";\n }\n die();\n }", "title": "" }, { "docid": "d8a230d27d001c2053888d9c796e4cf9", "score": "0.58571285", "text": "function cinerama_edge_user_del_image() {\n\t\tif ( ! isset( $_GET['user_id'] ) ) {\n\t\t\tesc_html_e( 'Not Set or Empty', 'cinerama' );\n\t\t\texit;\n\t\t}\n\n\t\t$field_name = $_GET['field_name'];\n\t\t$user_id = $_GET['user_id'];\n\t\t$imageID = get_user_meta( $user_id, $field_name, true );; // Get our attachment ID\n\n\t\tif ( is_numeric( $imageID ) ) { // Verify that the attachment ID is indeed a number\n\t\t\tdelete_user_meta( $user_id, $field_name );// Delete our image meta\n\t\t\texit;\n\t\t}\n\n\t\tesc_html_e( 'Contact Administrator', 'cinerama' ); // If we've reached this point, something went wrong - enable debugging\n\t\texit;\n\t}", "title": "" }, { "docid": "84ed2d0bd396d1160209b0a6c511e3b8", "score": "0.5841151", "text": "public function deleteImage($image){\n /** @var Image $image */\n $this->em->remove($image);\n $image->onPreRemove();\n $this->em->flush();\n }", "title": "" }, { "docid": "9974efc9047920f3284b2717c982f4fa", "score": "0.5837292", "text": "public function deleted(Media $media)\n {\n (new MediaStorage())->delete($media->path);\n }", "title": "" }, { "docid": "8827b6c239d69a194720ffb0c32b73e7", "score": "0.58187973", "text": "function deleteMediaByID( $mediaID )\n\t\t{\n\t\t\t\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\t$query = $this->_db->prepare( \"SELECT media_filename FROM media WHERE media_id = :mediaID\" );\n\n\t\t\t\t$query->bindParam( ':mediaID', $mediaID, PDO::PARAM_INT );\n\n\t\t\t\t$query->execute();\n\n\t\t\t\t$media = $query->fetch();\n\t\t\t\n\t\t\t\t$query = $this->_db->prepare( \"DELETE FROM media WHERE media_id = :mediaID\" );\n\n\t\t\t\t$query->bindParam( ':mediaID', $mediaID, PDO::PARAM_INT );\n\n\t\t\t\t$query->execute();\n \n\t\t\t\t//unlink from the upload foldrer\n\t\t\t\tunlink( \"../uploads/\" . $media[ \"media_filename\" ] );\n\n \n\t\t\t} catch ( PDOException $e ) {\n\n\t\t\t\techo $e->getMessage();\n\n\t\t\t}\n\t\t\t\n\t\t}", "title": "" }, { "docid": "a46295dacabe53abd7349757dc5bc4e2", "score": "0.5810677", "text": "protected function deleteimageAction() {\n $request = $this->getRequest();\n $status = false;\n\n if ($request->isPost()) {\n $data = $request->getPost()->toArray();\n\n if ($request->isXmlHttpRequest()) {\n if (is_file('public'.$data['img'])) {\n unlink('public'.$data['img']);\n $status = true;\n }\n }\n }\n\n return $status;\n }", "title": "" }, { "docid": "133607e6e2fe77a8e882d4578be7a572", "score": "0.5806811", "text": "public function delete(MediaDocument $media)\n {\n $media->delete();\n $this->repository->save($media);\n }", "title": "" }, { "docid": "09a49a378332b29f4736099abd7edba1", "score": "0.57968384", "text": "public function deleteImage1()\n {\n Storage::delete($this->image1);\n }", "title": "" }, { "docid": "dbe8d26dc8cf19175c8ffd067be61dd7", "score": "0.57587564", "text": "public function actionDeletepimage()\n\t{\n\t $sessionimagesarr = array();\n\t if($_POST['type']=='1'){\n\t\t @unlink(Yii::getPathOfAlias('webroot').'/'.$_POST['path']);\n\t\t $thumbpath = str_replace(basename($_POST['path']), 'thumb/'.basename($_POST['path']),$_POST['path']);\n\t\t @unlink(Yii::getPathOfAlias('webroot').'/'. $thumbpath);\n\t\t }else{\n\t\t $images = Images::model()->findByPK($_POST['path']);\n\t\t @unlink( Yii::getPathOfAlias('webroot').'/'.$images->image_path );\n\t\t $thumbpath = str_replace(basename($images->image_path), 'thumb/'.basename($images->image_path),$images->image_path);\n\t\t @unlink(Yii::getPathOfAlias('webroot').'/'. $thumbpath);\n\t\t $images->delete();\n\t\t }\n\t \n\t\t echo 'Deleted';\n\t\t die;\n\t}", "title": "" }, { "docid": "699fda78a00e1f8443904ddffc7ba7a9", "score": "0.5756797", "text": "public function undelete(MediaDocument $media)\n {\n $media->undelete();\n $this->repository->save($media);\n }", "title": "" }, { "docid": "c1550bc61c1aec58492f5ec2bfdbb6c1", "score": "0.5742373", "text": "public function actionDeleteImage()\n {\n $this->goHomeIfNotPost();\n $this->goHomeIfNotCinema();\n\n $validationResult = $this->isValid(\"actionDeleteGalleryImage\", $_POST);\n if ($validationResult != 1)\n {\n header(\"Location: /Theatre\");\n exit();\n }\n\n $imageName = $_POST[\"deleteImageName\"];\n \n try\n {\n (new GalleryModel())->where(\"email\", $this->userMail)->where(\"name\", $imageName)->delete();\n }\n catch (Exception $e)\n {\n $msg = \"Deleting an image from the gallery failed!<br/>\".$e->getMessage();\n return view(\"Exception.php\",[\"msg\" => $msg,\"destination\" => \"/Theatre\"]);\n }\n\n header(\"Location: /Theatre\");\n exit();\n }", "title": "" }, { "docid": "f1dda91975bbec56b8ac6c404c3e89c8", "score": "0.5721246", "text": "function delete($image, $path) {\n\t\tif($path) {\n\t\t\t$path = $path.DS;\n\t\t}\n @unlink(Configure::read('__Site.upload_path').DS.$path.$image);\n\t}", "title": "" }, { "docid": "fefea74adf326c2fcfd98e36edd942b9", "score": "0.57066715", "text": "public function removeImage($data)\n\t{\n\t\t$this->db->delete('tbl_gambar', $data);\n\t}", "title": "" }, { "docid": "eca1d0efb1ffccd46e88a415f3f1c443", "score": "0.5705969", "text": "function ara__post__removevideo() {\n\tupdate_post_meta($_POST['post_id'],'ara_video_attachment_id','');\n }", "title": "" }, { "docid": "245e2d2773afa2ee1cec0591878c2344", "score": "0.5700236", "text": "public function destroy(Media $media)\n {\n $this->authorize('delete', $media);\n\n $media->delete();\n }", "title": "" }, { "docid": "b4f1021ccae9d7f597acec83c3e5904b", "score": "0.56912714", "text": "public function delete() {\n\n\t \t if(!unlink($this->directory .'/' . $_FILES[$this->inputName]['name']))\n Log::debug('Upload::delete Failed to delete upload');\n else\n Log::debug('Upload::delete Delete successful');\n\t }", "title": "" }, { "docid": "6c8a6f690d9e9c46bf4f0346a78bf1ff", "score": "0.56892496", "text": "protected function deleteMedia($reception)\n {\n $oldMedia = $reception->getAllMediaByTag(); \n foreach($oldMedia as $media) \n { \n $media->first()->delete();\n } \n }", "title": "" }, { "docid": "6f3fb697f9795dfb1b704488400d9d26", "score": "0.56889313", "text": "public function destroy($multiMedia)\n {\n if(file_exists(public_path().'/'.MultiMedia::findOrFail($multiMedia)->href)){\n unlink(public_path().'/'.MultiMedia::findOrFail($multiMedia)->href);\n }\n MultiMedia::findOrFail($multiMedia)->delete();\n return redirect()->route('admin.multimedia.index')->with('success', 'Image Deleted Successfully');\n }", "title": "" }, { "docid": "0fb044bc4ace929d47d3f604fe89a37c", "score": "0.56848633", "text": "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if (null !== $file && is_file($file)) {\n unlink($file);\n }\n }", "title": "" }, { "docid": "dfc0b79ae8c9d1e5063694209ff599e9", "score": "0.56801856", "text": "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}", "title": "" }, { "docid": "5b9fa2c7addeed64b8cfb088ebb059ff", "score": "0.5674923", "text": "public function removeUpload()\n {\n if ($file = $this->getAbsolutePath()) {\n unlink($file);\n }\n }", "title": "" }, { "docid": "4a032a5117fe7cea169b18f984c153bc", "score": "0.56740856", "text": "public function destroy($id)\n {\n $media = Media::with('images')->where('id', $id)->first();\n Storage::disk('public')->delete(\"$media->logo\");\n if (!empty($media->images)) {\n foreach ($media->images as $key) {\n Storage::disk('public')->delete(\"$key->image\");\n Storage::disk('public')->delete(\"$key->pdf\");\n }\n }\n Media::destroy($media->id);\n\n return redirect(self::ROUTE);\n }", "title": "" }, { "docid": "5273e639a2e4436b567293c30268a6e2", "score": "0.56673324", "text": "public function remove(PersistentImageInterface $image): void\n\t{\n\t}", "title": "" }, { "docid": "33cc6ed12080feb03142e682f4937833", "score": "0.5664929", "text": "public function destroy($form_id, $submission_id)\n {\n \n $submission = SubmittedForms::where(['form_id' => $form_id, 'id' => $submission_id])->firstOrFail();\n //dd($submission);\n $files_to_del = array();\n foreach ($submission->content as $key => $value) {\n $key_ary = explode('-', $key);\n if($key_ary[0] == \"file\"){\n $files_to_del[] = $value;\n }\n }\n if($submission->delete()){\n if(!empty($files_to_del)){\n foreach($files_to_del as $file){\n //$file = 'uploads/n1jl6X9twCtgL60zxyIGb0iEGTsEeTQ8vBRA6BqE.jpeg'\n Storage::delete('public/'.$file);\n }\n }\n return redirect()\n ->route('form.status', $submission_id)\n ->with('success', 'The submitted form data deleted successfully.');\n }else{\n return redirect()\n /*->route('form.status', $submission_id)*/\n ->back()\n ->with('error', 'Error deleting submitted form data!');\n }\n\n }", "title": "" }, { "docid": "646840b88260bf30d707c3545fada736", "score": "0.5663142", "text": "function removeMediaFromMID($MID, $OID = 0){\n\n removeMediaHelper($MID);\n\n if ($OID != 0){\n drupal_goto('viewMedia', array('query'=>array('OID'=>$OID)));\n } else {\n drupal_goto('myMedia');\n }\n}", "title": "" }, { "docid": "3acc4a17a4f8dd711e9d0f95c0c8aa30", "score": "0.5662641", "text": "public function delete_photo(){\n $sql=\"DELETE FROM photos WHERE id=\".$this->id;\n self::$connect->query($sql);\n\n }", "title": "" }, { "docid": "48bf58e94d0d222014770d497fd2752a", "score": "0.56585044", "text": "public function delete_file(){\n unlink('/opt/lampp/htdocs/specijalisticki_rad/uploaded_images/'.$this->name);\n\n }", "title": "" }, { "docid": "a7b60f8cfaa6132881ed1b6f9745228f", "score": "0.5652525", "text": "public function deleteValueImage()\r\n\t{\r\n\t\t// Get request\r\n\t\t$metaValueId = Request::getInt('value');\r\n\t\t$type = Request::getCmd('type', 'main');\r\n\t\t\r\n\t\t// Delete from model\r\n\t\t$metaModel = BluApplication::getModel('meta');\r\n\t\t$deleted = $metaModel->updateMetaValue($metaValueId, array(\r\n\t\t\t'images' => array($type => '')\r\n\t\t));\r\n\t\t\r\n\t\t// Back to listing\r\n\t\tif ($deleted) {\r\n\t\t\tMessages::addMessage('Meta value image deleted', 'info');\r\n\t\t}\r\n\t\t$this->view();\r\n\t}", "title": "" }, { "docid": "576a7924c85f724ee9d18cd1eaed403f", "score": "0.5648987", "text": "public function renderRemoveEntry( $mediaId, $elementId, $imageId)\n {\n\n $tpl = $this->getTplEngine();\n\n $pageFragment = new WgtAjaxArea();\n $pageFragment->selector = 'table#wgt-grid-mediathek-'.$elementId.'-document-table tr.node-'.$imageId;\n $pageFragment->action = 'remove';\n\n $tpl->setArea('mediathek', $pageFragment);\n\n $jsCode = <<<WGTJS\n\n \\$S('table#wgt-grid-mediathek-{$elementId}-document-table').grid('renderRowLayout').grid('decEntries');\n\nWGTJS;\n\n $tpl->addJsCode($jsCode);\n\n }", "title": "" }, { "docid": "ae79ad1775ef10b7b7b4ee0c3deb7672", "score": "0.5648452", "text": "public function deleteMedia() {\n\t\tif(isset($this->data['mdid'])) {\n\t\t\t$rs = mq(\"update \" . DB_TBL_MEDIA . \" set md_active='0' where mdid='\" . $this->data['mdid'] . \"'\");\n\t\t\t$_SESSION['_mtype'] = \"W\";\n\t\t\t$_SESSION['_msg'] = \"deletedmedia\";\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "72be14d2b066234d2eb4c9d4514b0571", "score": "0.5647132", "text": "public function destroy($id)\n {\n $post = $this->modelname::find($id);\n if(!empty($this->imageinputname))\n {\n $inpname = $this->imageinputname;\n foreach ($inpname as $img) {\n File::delete($post->$img);\n }\n\n }\n $post->delete();\n Session::flash('success', $this->deletionSuccess);\n return redirect()->route($this->route['index']);\n }", "title": "" }, { "docid": "651378ede5492f61c3424272864ecde1", "score": "0.5642526", "text": "public function delete_photo() {\n\n\tif(unlink($this->upload_directory.DS.$this->filename)) {\n\t\n\t\t$this->delete();\n\t\treturn redirect('../photos.php');\n\n\t\t} else {\n\n\t\t\treturn redirect('../photos.php');\n\t\t}\n\t}", "title": "" }, { "docid": "e147e39b6ea508619a2de278081bc9a3", "score": "0.5637455", "text": "public function destroy($id)\n {\n \n \n try {\n \n $media = Media::find($id);\n \n $media->delete();\n \n } catch (\\Exception $ex) {\n $error = __('Se ha producido un error al intentar eliminarlo.');\n Log::error($ex);\n return Redirect::back()->withInput()->with('error', $error);\n }\n \n // Redirect to the group management page\n return Redirect::back()->with('success', __('Se ha eliminado correctamente.'));\n }", "title": "" }, { "docid": "d3ca0e9abba7e6ce443a33af7eda935d", "score": "0.56359005", "text": "private function delete_old_picture(){\n foreach ( glob( UPLOADS.$this->get_name_sanitized().'.*' ) as $picture ){\n if(is_writable($picture)){unlink($picture);}\n }\n }", "title": "" }, { "docid": "e3952c4753049e6aa94c5b2000761859", "score": "0.5634083", "text": "public function delete() {\n\n $image = $this->path;\n $thumbnail_image = $this->thumbnail_path;\n\n \\File::delete([\n $image,\n $thumbnail_image\n ]);\n parent::delete();\n }", "title": "" }, { "docid": "ca3fe3dbe937d833e89dbe5bb66f1ed7", "score": "0.5631618", "text": "public function deleteById($image_id);", "title": "" }, { "docid": "8791edf40a2b7e87256d48e70d7caafc", "score": "0.56308246", "text": "public function deleteImage( $imageId, $skipValidation = TRUE );", "title": "" }, { "docid": "1610e9414a08da769d900b85ef68c33e", "score": "0.56258255", "text": "public function actuallydeletephotoAction() {\n\t\t$midencoded=($this->_request->getParam('mid'));\n\t\t$uid=($this->_request->getParam('uid'));\n\t\t$mid=base64_decode($midencoded);\n\t\t//$uid=UserAcl::getUid();\n\t\t$this->view->uid = $uid;\n\t\t$result = PeopleService::modifyPhoto($mid, array(\"uid\"=>\"zzdeleted\".UserAcl::getUid()));\n\t\t$this->view->success=$result;\n\t}", "title": "" } ]
2e640b2819e0e2483ca2c8015eacce77
Show the application dashboard.
[ { "docid": "66938bd20f032e054d8a91ec0b2d22a5", "score": "0.0", "text": "public function dashboard()\n {\n return redirect('/admin/home');\n }", "title": "" } ]
[ { "docid": "cb6e0ad71a421a47071a8f6e8333e017", "score": "0.7825051", "text": "public function showDashboard()\n {\n return view(\"admin.dashboard\");\n }", "title": "" }, { "docid": "36ddaf38a543d27dc03afc1ab1ad175d", "score": "0.7605309", "text": "public function dashboard() {\n\t $this->render('dashboard');\n\t }", "title": "" }, { "docid": "87ce5015f00182229623646de59c2709", "score": "0.75718164", "text": "public function showDashboard()\n {\n return View::make('users.dashboard', ['user' => Sentry::getUser()]);\n }", "title": "" }, { "docid": "0fdd0382be975f86689160af24ea82c2", "score": "0.7555917", "text": "public function dashboard()\n {\n return view ('adminpanel.dashboard');\n }", "title": "" }, { "docid": "a66115f23f587470b8c0c36938a2607b", "score": "0.7533549", "text": "public function dashboard()\n\t{\n\t\treturn view('dashboard');\n\t}", "title": "" }, { "docid": "a814c74fa33fb66ab68bf5961a861428", "score": "0.75147", "text": "public function actionDashboard()\n {\n return $this->render('dashboard', []);\n }", "title": "" }, { "docid": "f1458f21e8ba0082475fb4d3d5dd5b82", "score": "0.75045663", "text": "public function dashboard()\n\t{\n\t\t//setting the side bar\n\t\t$sidebar = \"dashbaord\";\n\t\treturn view(\"admin/dashboard\",compact(\"sidebar\"));\n\t}", "title": "" }, { "docid": "560953216347e5dfd01ad84a476bd35c", "score": "0.7495437", "text": "protected function show() {\n Nav::setActiveTabs(['dashboard']);\n View::show('pages/auth/dashboard');\n }", "title": "" }, { "docid": "0be0696e4498cd39f61a470931f87acd", "score": "0.7490185", "text": "static public function dashboard() {\n App::render('dashboard.twig');\n }", "title": "" }, { "docid": "e405e9ef1b9206f4917a18f739d89aad", "score": "0.7482813", "text": "public function index()\n {\n $this->global['pageTitle'] = MYAPP_NAME.' : Dashboard';\n \n $this->loadViews(\"admin/dashboard\", $this->global, NULL , NULL);\n }", "title": "" }, { "docid": "21f99163ffbd4f48bcba74332ed01ce5", "score": "0.74373347", "text": "public function dashboard() {\n return view('backend.dashboard');\n }", "title": "" }, { "docid": "f684044cc49478a6f199ba7323f08d53", "score": "0.7425294", "text": "public function dashboard() {\n return view('admin.dasboard');\n }", "title": "" }, { "docid": "5ce46c83f39e108a118a06a4bd021633", "score": "0.74246854", "text": "public function dashboard()\n {\n return view('event-manager.dashboard');\n }", "title": "" }, { "docid": "66b8f7c1ffb939236185b94231da88ff", "score": "0.7417151", "text": "public function index()\n {\n return view('oxygencms::admin.dashboard');\n }", "title": "" }, { "docid": "b292d0aefb95b98b0c9bb9c5234aecca", "score": "0.7395091", "text": "public function index()\n {\n $widgets['fullcolumn'] = new DashboardWidget(Event::call('reborn.dashboard.widgets.fullcolumn'));\n $widgets['leftcolumn'] = new DashboardWidget(Event::call('reborn.dashboard.widgets.leftcolumn'));\n $widgets['rightcolumn'] = new DashboardWidget(Event::call('reborn.dashboard.widgets.rightcolumn'));\n\n $this->template->title(t('label.dashboard'))\n ->set('widgets', $widgets)\n ->view('dashboard');\n }", "title": "" }, { "docid": "6414c13dbbf066eeac6b39b4f8618d46", "score": "0.73931515", "text": "public function dashboard(){\n $data['current_page'] = $_SERVER['REQUEST_URI'];\n $data['title'] = \"Dashboard\";\n $data['welcome_message'] = \"Welcom to the Admin Panel Dashboard - Stuff Coming Soon!\";\n\n // Setup Breadcrumbs\n $data['breadcrumbs'] = \"\n <li><a href='\".DIR.\"AdminPanel'><i class='fa fa-fw fa-cog'></i> Admin Panel</a></li>\n <li class='active'><i class='fa fa-fw fa-dashboard'></i>\".$data['title'].\"</li>\n \";\n\n View::renderModule('AdminPanel/views/header', $data);\n View::renderModule('AdminPanel/views/adminpanel', $data);\n View::renderModule('AdminPanel/views/footer', $data);\n }", "title": "" }, { "docid": "6ac160069c243ac2fc9d561c605d8dca", "score": "0.7359748", "text": "public function index()\n {\n $this->global['pageTitle'] = 'CodeInsect : Dashboard';\n \n $this->loadViews(\"dashboard\", $this->global, NULL , NULL);\n }", "title": "" }, { "docid": "7f943c4ab23ae9224174d929e27daf6a", "score": "0.7357403", "text": "public function index()\n {\n return view('agent.dashboard');\n }", "title": "" }, { "docid": "1a8925153d4fdf57b36c041ec5d7a890", "score": "0.7350788", "text": "public function dashboard()\n {\n return view('admin.dashboard');\n }", "title": "" }, { "docid": "1a8925153d4fdf57b36c041ec5d7a890", "score": "0.7350788", "text": "public function dashboard()\n {\n return view('admin.dashboard');\n }", "title": "" }, { "docid": "77f64e9ebec53575cbee69c808ae641c", "score": "0.7348339", "text": "public function dashboard()\n {\n $this->layout->title = \"Frugal Calendar\";\n $this->layout->content = View::make('dashboard');\n }", "title": "" }, { "docid": "ccffd0739878752ff0eb825ba1b421b4", "score": "0.73473203", "text": "public function main()\n {\n return view('user.user.dashboard.main');\n }", "title": "" }, { "docid": "8b7b3f70249264987814e906e0c4a08e", "score": "0.7310895", "text": "public function dashboard()\n {\n $this->global['pageTitle'] = 'Incoming Parts - '.APP_NAME;\n $this->global['pageMenu'] = 'Incoming Parts';\n $this->global['contentHeader'] = 'Incoming Parts';\n $this->global['contentTitle'] = 'Incoming Parts';\n $this->global ['role'] = $this->role;\n $this->global ['name'] = $this->name;\n \n $data['classname'] = $this->cname;\n $data['readonly'] = $this->readonly;\n $this->loadViews($this->view_dir.'/dashboard', $this->global, $data);\n }", "title": "" }, { "docid": "28196d084f0a4275d3027e6d198899cc", "score": "0.73100924", "text": "public function dashboard()\n {\n //Insatnce de la class AnnonceModel\n $all = new AnnonceModel();\n $annonce = $all->findAll();\n $this->show('default/dashboard' , array('annonce' => $annonce));\n }", "title": "" }, { "docid": "c2d2e2ddd5f30c45bbec66ebafab47c6", "score": "0.7304336", "text": "public function index()\n {\n $this->render();\n $this->share( 'dashboardRightLeft', $this->container->render( 'dashboard-right-left' ) );\n $this->share( 'dashboardRightRight', $this->container->render( 'dashboard-right-right' ) );\n $this->layout->content = view( 'ensphere.auth::dashboard.dashboard' );\n }", "title": "" }, { "docid": "118f6fdb91be91d751e42108dcda45c1", "score": "0.7297324", "text": "public function dashboard()\n {\n \n return view('convection.dashboard');\n \n }", "title": "" }, { "docid": "651619d31743c1ca5cb10a5b635c5503", "score": "0.72939444", "text": "public function show()\n {\n return view('admin.dashboard');\n }", "title": "" }, { "docid": "3e734887a0c9a587d6e79869270e41b9", "score": "0.7287446", "text": "public function index()\n {\n return view('app.administrators.dashboard.index');\n }", "title": "" }, { "docid": "118c04aca94182d0b2f7ac749a41b569", "score": "0.7285838", "text": "public function dashboard()\n {\n return view('pages.superAdmin.dashboard');\n }", "title": "" }, { "docid": "979df6f8245a87c8084d6a419248f035", "score": "0.727347", "text": "public function dashboard()\n {\n return view('dashboard');\n }", "title": "" }, { "docid": "979df6f8245a87c8084d6a419248f035", "score": "0.727347", "text": "public function dashboard()\n {\n return view('dashboard');\n }", "title": "" }, { "docid": "979df6f8245a87c8084d6a419248f035", "score": "0.727347", "text": "public function dashboard()\n {\n return view('dashboard');\n }", "title": "" }, { "docid": "4af7b25b19bfd1003655810a690dad6b", "score": "0.72733915", "text": "public function dashboard() {\n add_action( 'admin_menu', function() {\n add_menu_page( 'Fuse', 'Fuse', 'manage_options', config::$slug, function() {\n include_once(config::$viewspath . 'admin/fuse-dashboard.php');\n }); \n });\n\n\n /**\n * Fuse dashboard widgets\n */\n add_action('wp_dashboard_setup', function() {\n \\add_meta_box(\n 'dash_contact',\n 'Developer Contact Details',\n array($this, 'dash_contact' ),\n 'dashboard', 'side', 'high'\n );\n });\n\n /**\n * Hijack the Welcome Panel\n */\n \\remove_action( 'welcome_panel', 'wp_welcome_panel' );\n \\add_action('welcome_panel', function() {\n include_once(config::$viewspath . 'admin/fuse-dashboard-meta-welcome.php');\n });\n\n }", "title": "" }, { "docid": "8c07c24a1f4352676bdd170ad221de34", "score": "0.72663695", "text": "public function getDashboard()\n {\n $page['page_title'] = config('app.name') . ': Admin - Dashboard';\n $page['page_description'] = config('app.name') . ': Doctor Appointment Scheduler ';\n\n return view('main.layout');\n }", "title": "" }, { "docid": "cd420ee47132019bc667fc6201ff6e14", "score": "0.72559637", "text": "public function getDashboard()\n {\n return view('admin.index');\n }", "title": "" }, { "docid": "8cd0a13f3368c82f274273b3a5634a62", "score": "0.7251768", "text": "public function index()\n {\n return view('admin.dashboard');\n }", "title": "" }, { "docid": "8cd0a13f3368c82f274273b3a5634a62", "score": "0.7251768", "text": "public function index()\n {\n return view('admin.dashboard');\n }", "title": "" }, { "docid": "8cd0a13f3368c82f274273b3a5634a62", "score": "0.7251768", "text": "public function index()\n {\n return view('admin.dashboard');\n }", "title": "" }, { "docid": "8cd0a13f3368c82f274273b3a5634a62", "score": "0.7251768", "text": "public function index()\n {\n return view('admin.dashboard');\n }", "title": "" }, { "docid": "8cd0a13f3368c82f274273b3a5634a62", "score": "0.7251768", "text": "public function index()\n {\n return view('admin.dashboard');\n }", "title": "" }, { "docid": "8cd0a13f3368c82f274273b3a5634a62", "score": "0.7251768", "text": "public function index()\n {\n return view('admin.dashboard');\n }", "title": "" }, { "docid": "8cd0a13f3368c82f274273b3a5634a62", "score": "0.7251768", "text": "public function index()\n {\n return view('admin.dashboard');\n }", "title": "" }, { "docid": "8cd0a13f3368c82f274273b3a5634a62", "score": "0.7251768", "text": "public function index()\n {\n return view('admin.dashboard');\n }", "title": "" }, { "docid": "8cd0a13f3368c82f274273b3a5634a62", "score": "0.7251768", "text": "public function index()\n {\n return view('admin.dashboard');\n }", "title": "" }, { "docid": "8cd0a13f3368c82f274273b3a5634a62", "score": "0.7251768", "text": "public function index()\n {\n return view('admin.dashboard');\n }", "title": "" }, { "docid": "8cd0a13f3368c82f274273b3a5634a62", "score": "0.7251768", "text": "public function index()\n {\n return view('admin.dashboard');\n }", "title": "" }, { "docid": "8cd0a13f3368c82f274273b3a5634a62", "score": "0.7251768", "text": "public function index()\n {\n return view('admin.dashboard');\n }", "title": "" }, { "docid": "908a901a034226f160e1d57b626fae9c", "score": "0.72466016", "text": "public function index()\n {\n return view('/dashboards/application/index');\n }", "title": "" }, { "docid": "633fb58c80a5951c414d6ae33c1978d7", "score": "0.7241399", "text": "public function dashboard()\n {\n return View::make('admins.dashboard');\n }", "title": "" }, { "docid": "2ffc7668a2d7dafbb34f0f037ea18408", "score": "0.72408867", "text": "public function index()\n\t{\n\t\treturn view('agent.dashboard.index');\n\t}", "title": "" }, { "docid": "170c8bf6de673492828f0205cea49285", "score": "0.7235519", "text": "public function index()\n {\n return view('admin.dashboard');\n }", "title": "" }, { "docid": "4f9cad14ec3924b214c3985f7b9584f3", "score": "0.7233406", "text": "public function indexAction()\r\n {\r\n \t$this->loadLayout()->_setActiveMenu('dashboard')->_title($this->__('DashBoard'));\r\n \t$this->_addBreadcrumb(Mage::helper('vendors')->__('DashBoard'), Mage::helper('vendors')->__('DashBoard'));\r\n\t\t$this->renderLayout();\r\n }", "title": "" }, { "docid": "b9f6b853ad276f6b6d25624c13274d3e", "score": "0.7228874", "text": "public function index()\n\t{\n\t return View::make('dashboard.dashboard');\n\t}", "title": "" }, { "docid": "4f692545c4f494cf661e7d389a31cf5f", "score": "0.7225958", "text": "protected function get_dashboard()\n\t{\n\t\treturn View::make('dashboard');\n\t}", "title": "" }, { "docid": "c85ecbcd8bfdc6c1649fce9f2ff24d90", "score": "0.7223095", "text": "public function index()\n {\n $dashboard_data = [];\n Session::flash('success','Welcome to future Starr admin panel.');\n return view('admin.dashboard', compact('dashboard_data'));\n }", "title": "" }, { "docid": "d5c9a1c7366ab2bbb988a0ede2547df3", "score": "0.7215577", "text": "public function index()\n {\n return view('Admin::dashboard');\n }", "title": "" }, { "docid": "1448d517659a49af3a75046bfa87f525", "score": "0.72135884", "text": "public function index()\n {\n return view('apps.pages.dashboard');\n }", "title": "" }, { "docid": "5632ff6f197064f244a6952c0fba9d45", "score": "0.72134346", "text": "public function index()\n\t{\n\n\t\treturn View::make('ims.dashboard.index');\n\t}", "title": "" }, { "docid": "59d85a2aaf4e3319679196fe6bfb07b6", "score": "0.71935964", "text": "public function index()\n\t{\n\t\treturn view('sanatorium/dashboards::index');\n\t}", "title": "" }, { "docid": "954c2b1f5888401f9e5f9d43cb39cb66", "score": "0.71893674", "text": "public function index()\n {\n return view('dashboard/main');\n }", "title": "" }, { "docid": "fdbdec2d62c5ca2d6accbaa165e3710d", "score": "0.71856666", "text": "public function index()\n {\n \n return view('pages.admin.dashboard');\n }", "title": "" }, { "docid": "860677a27259f47e2abf267f4d2f7e27", "score": "0.71845174", "text": "public function index()\n {\n $this->authorize(LogViewerPolicy::PERMISSION_DASHBOARD);\n\n $stats = $this->logViewer->statsTable();\n $percents = $this->calcPercentages($stats->footer(), $stats->header());\n\n $this->setTitle('LogViewer Dashboard');\n $this->addBreadcrumb('Dashboard');\n\n return $this->view('admin.system.log-viewer.dashboard', compact('percents'));\n }", "title": "" }, { "docid": "3bdce1ac3450af9600ef1e0548e495ba", "score": "0.71791834", "text": "public function index() {\n\n\t\t$this->dashboard();\n\n\t}", "title": "" }, { "docid": "510a3d4d4fc5f26735cfb805c403bc12", "score": "0.7178999", "text": "public function dashboard()\n {\n return view('admin.pages.dashboard');\n }", "title": "" }, { "docid": "57f81f91b584b0f1969f137fee33b74e", "score": "0.7178822", "text": "public function index()\n {\n // Gate::allows('is-admin')\n return view('dashboard');\n }", "title": "" }, { "docid": "fb056c0b3b80a9835b08833ffe9aef25", "score": "0.71748364", "text": "public function index()\r\n {\r\n $this->global['pageTitle'] = 'Dashboard';\r\n \r\n $this->loadViews(\"dashboard\", $this->global, NULL , NULL);\r\n }", "title": "" }, { "docid": "b936a80ac0cd743dc4c80e034f16d06d", "score": "0.7174445", "text": "public function index()\n {\n // dd(Route::current(), Route::currentRouteName(), Route::currentRouteAction());\n $this->attr['title'] = 'Dashboard';\n // dd('后台首页,当前用户名:'.auth('admin')->user()->name);\n return view('admin.dashboard.index', compact('title'));\n }", "title": "" }, { "docid": "598b327e8519f75058dc7eb896e444e4", "score": "0.71721923", "text": "public function index()\n\t{\n\t\t$data['applications'] = $this->applicationRepo->getAll();\n\n\t\treturn view('admin.applications.overview', $data);\n\t}", "title": "" }, { "docid": "8958569f9cef194dca7f2a15c320c0cb", "score": "0.7161582", "text": "public function actionDashboard()\n {\n if (Yii::app()->user->isGuest)\n {\n $this->actionLogin();\n exit;\n }\n\n $this->render('dashboard');\n }", "title": "" }, { "docid": "c6cdb2d5b3844895dda145f7b5bfde00", "score": "0.71599877", "text": "public function dashboard(){\n $user = $this->get('user');\n \n $dashpanel = $this->output->layout(\"dashpanel\");\n $dashbanner = $this->output->layout(\"dashbanner\");\n \n $this->output->addToPosition(\"banner\" , $dashbanner );\n $this->output->addToPosition(\"body\" , $dashpanel );\n \n }", "title": "" }, { "docid": "c1c7e6ec460fb29cc84ed2e548d123a5", "score": "0.7151146", "text": "public function index()\n {\n\n return view('provider.dashboard');\n }", "title": "" }, { "docid": "2ea2c71e80d6868006a25563720e0281", "score": "0.71509403", "text": "public function index()\n {\n $data = ['title' => 'Home','sub_title' => 'DPWH Bidding System','content' => 'Welcome to the online DPWH Bidding System.'];\n\n return view('dashboard')->with(compact('data'));\n }", "title": "" }, { "docid": "79d4f3dcbdf219617607d7fdec69656b", "score": "0.714957", "text": "public function dashboard()\n {\n\t\tif($this->sensors->is_not_empty('sensors'))\n\t\t{\n\t\t\t$data['title'] = \"Dashboard\";\n\t\t\t$data['subtitle'] = \"Display relevant data\";\n\t\t\t$data['description'] = \"Using charts and tables to illustrate the most important informations\";\n\n\t\t\t$this->load->view('header', $data);\n\t\t\t$this->load->view('dashboard', $data);\n\t\t\t$this->load->view('footer');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data['title'] = \"Error\";\n\t\t\t$data['subtitle'] = \"Whoops, look like something went wrong...\";\n\t\t\t$data['description'] = \"The website encountered an error\";\n\n\t\t\t$this->load->view('header', $data);\n\t\t\t$this->load->view('db_empty', $data);\n\t\t\t$this->load->view('footer');\n\t\t}\n }", "title": "" }, { "docid": "f6b6324e72ee6fab33c9f214d91b76cf", "score": "0.71441406", "text": "public function dashboardAction() {\n return $this->render('ControlPanelBundle:Dashboard:dashboard.html.twig');\n }", "title": "" }, { "docid": "417ccfa69dc8486060c5255b5f8b193a", "score": "0.7142982", "text": "public function index()\n\t{\n\t\treturn View::make(\"dashboard.index\");\n\t}", "title": "" }, { "docid": "e5e61cee6f68de18db3dd1bccb8f1cf9", "score": "0.7136884", "text": "public function index()\n {\n return view('admin.dashboard',['title'=>'Dashboard','subtitle'=>'Admin Dashboard']);\n }", "title": "" }, { "docid": "dc50af2aef83e99d7a83c50f03b72521", "score": "0.7132746", "text": "public function index()\n {\n return view('admin.dashboard.index');\n }", "title": "" }, { "docid": "2941df939fb1581541b8662f49fc178f", "score": "0.713098", "text": "public function dashboard()\n\t{\n\n\t\tif (Auth::user()) {\n\t\t\treturn View::make('account.dashboard');\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn View::make('account.login');\n\t\t}\n\t}", "title": "" }, { "docid": "2653f0ce71dedaa1e205b4f0c7197723", "score": "0.7130058", "text": "public function index()\n {\n $statistics = $this->dashboard->getDashboardStatistics();\n return view('admin.dashboard.index')\n ->withStatistics($statistics);\n }", "title": "" }, { "docid": "5321ac25772a9c35e42d3b7b949b3d4f", "score": "0.7128687", "text": "public function index()\n {\n return view('laradmin::dashboard');\n }", "title": "" }, { "docid": "9dac154b72c62c4b94ca6d990dba4de0", "score": "0.712398", "text": "public function dashboard()\n {\n return view('pages.dashboard');\n }", "title": "" }, { "docid": "4948e699fcc1cdca8436e6583d123e5e", "score": "0.71188265", "text": "public function index()\n {\n $this->setMeta('Title', 'Page Title', 'description');\n\n return view('dashboard.index', $this->data);\n }", "title": "" }, { "docid": "ea9df934397a50f058796d2fa2638087", "score": "0.71174717", "text": "public function dashboard()\n {\n $this->global['pageTitle'] = 'Outgoing Parts - '.APP_NAME;\n $this->global['pageMenu'] = 'Outgoing Parts';\n $this->global['contentHeader'] = 'Outgoing Parts';\n $this->global['contentTitle'] = 'Outgoing Parts';\n $this->global ['role'] = $this->role;\n $this->global ['name'] = $this->name;\n \n $data['classname'] = $this->cname;\n $data['readonly'] = $this->readonly;\n $this->loadViews($this->view_dir.'/dashboard', $this->global, $data);\n }", "title": "" }, { "docid": "07d718b8ca39f85d5e428d97a12b177b", "score": "0.7117433", "text": "public function getIndex()\n\t{\n\t\t// Show the page\n\t\treturn View::make('backend.account.dashboard');\n\t}", "title": "" }, { "docid": "8436aa5902306289ef4aa397666ddd3b", "score": "0.7109032", "text": "public function index()\n {\n if($this->isAdmin() == TRUE)\n {\n $this->loadThis();\n }\n $this->global['pageTitle'] = 'Touba : Dashboard';\n \n $this->loadViews(\"dashboard\", $this->global, NULL , NULL);\n }", "title": "" }, { "docid": "3fd7ee20f2f65bfb6adcebd47464c5b2", "score": "0.71077615", "text": "public function index()\n {\n \treturn view('admin.dashboard');\n }", "title": "" }, { "docid": "5857c5429afb87a158b48c3c7902c4b4", "score": "0.7099872", "text": "public function index() {\n $this->view->render('dashboard/index', null, null);\n }", "title": "" }, { "docid": "bad12283e37ddb9cfaca585ea76b7a79", "score": "0.7098498", "text": "public function show()\n {\n return view('app');\n }", "title": "" }, { "docid": "f715d1f124bd07ff9f81a0d7ce96f852", "score": "0.70929056", "text": "public function dashboard()\n {\n view()->share('menu', 'dashboard');\n return view('admin.dashboard');\n }", "title": "" }, { "docid": "09e07b62162bd32a8608e5ccb4ca0e59", "score": "0.7089245", "text": "public function dashboard(){\n\n\t\tif($this->session->userdata('admin_login')){\n\t\t\t// if admin is logged in loading the dash view\n\t\t\t$data['page_title'] = 'Admin Dashboard';\n\t\t\t$data['page_name'] = 'dashboard';\n\t\t\t$data['active'] = 'dashboard';\n\n\t\t\t$this->load->view('backend/index', $data, FALSE);\n\t\t}\n\t\telse{\n\t\t\tredirect(base_url('admin'),'refresh');\n\t\t}\n\t}", "title": "" }, { "docid": "e9e333d30b0a5fbbd74d7ac86380e64f", "score": "0.7088498", "text": "public function index()\n {\n return view('admin/dashboard');\n }", "title": "" }, { "docid": "e9e333d30b0a5fbbd74d7ac86380e64f", "score": "0.7088498", "text": "public function index()\n {\n return view('admin/dashboard');\n }", "title": "" }, { "docid": "6afb81606502d3aacca63761dbd8b28b", "score": "0.7084292", "text": "public function index()\n {\n return view('adminpartials.admindashboard');\n }", "title": "" }, { "docid": "4fe0a13b8bd492791e46ff69ea732208", "score": "0.7083742", "text": "public function index()\n {\n return view('admin.crud_admin.dashboard');\n }", "title": "" }, { "docid": "b59874ac9d8bc2f978d360b556d41f2a", "score": "0.7083035", "text": "public function dashboard()\n {\n if(!isset($_SESSION['logedin'])){\n header('Location: '. DOMAIN );\n }\n $this->view->render('dashboard');\n }", "title": "" }, { "docid": "812b850f2935fdf5dc3df428b6be7f66", "score": "0.7082308", "text": "public function index()\n {\n $client = Auth::user();\n return view('client.dashboard', compact('client'));\n }", "title": "" }, { "docid": "7c62fe1f03fd48ba49ec4ac57acd9963", "score": "0.7075653", "text": "public function index()\n {\n return view('dashboard.dashboard');\n }", "title": "" }, { "docid": "c9e82b04a5cffddf30be74e089a4641e", "score": "0.70751685", "text": "public function show()\n {\n return view('dashboard::show');\n }", "title": "" }, { "docid": "c9e82b04a5cffddf30be74e089a4641e", "score": "0.70751685", "text": "public function show()\n {\n return view('dashboard::show');\n }", "title": "" }, { "docid": "ae8ad0d436b585e184597f282b6ad1f6", "score": "0.70699096", "text": "public function index()\n {\n $dashboardWidgets = Dashboardwidget::orderBy('position', 'asc')->get();\n\n return view_backend('dashboard', compact('dashboardWidgets'));\n }", "title": "" }, { "docid": "048ed5c3ae90c3535c33e73d1e11ed4c", "score": "0.70698303", "text": "public function dashboard()\n {\n return view('admin/dashboard');\n }", "title": "" } ]
44106d86da86f7fef3fe1b858dd893e3
INIT query by action name
[ { "docid": "e7ed982af3ce3f8b4fb02b2179bf14c5", "score": "0.8004576", "text": "public function queryInit()\n {\n $queryAction = $this->queryAction;\n $this->$queryAction();\n }", "title": "" } ]
[ { "docid": "08e45e89779f17d332af6d11ed16dde1", "score": "0.6624609", "text": "function initAction(){\n\n\t\t}", "title": "" }, { "docid": "39fc6b3c3caf80c2f27bc432ddf9d76a", "score": "0.6348593", "text": "function action_init(){\n }", "title": "" }, { "docid": "4eec7d131ca9dec4842c562df752c61b", "score": "0.61939913", "text": "public function init()\n {\n $this->_config = Sohan_Core_Config::loadConfig();\n Sohan_Core_DB::DBInit();\n Sohan_Core_Request::URLparser();\n $this->callAction();\n }", "title": "" }, { "docid": "c80d1d6610c388deb2544fc506d895d2", "score": "0.60740733", "text": "private function setQuery()\n {\n \n }", "title": "" }, { "docid": "e5f729116f824b4ef1edd534f439daff", "score": "0.6034157", "text": "protected static function getFromQuery() {\r\n\t\t// TODO: we are currently using action as the object for bc\r\n\t\treturn self::get(Helper_Request::getRequest('action', self::DEFAULT_ACTION), Helper_Request::getRequest('method', null));\r\n\t}", "title": "" }, { "docid": "349858fdbb02e11f51024370b9fd5cec", "score": "0.60170823", "text": "function query(){}", "title": "" }, { "docid": "6cff1c50ec5d2598de310deb81213278", "score": "0.60084593", "text": "public function init() {\n\t\t$this->load_actions();\n\t}", "title": "" }, { "docid": "6cff1c50ec5d2598de310deb81213278", "score": "0.60084593", "text": "public function init() {\n\t\t$this->load_actions();\n\t}", "title": "" }, { "docid": "6bf98b7e3493ef421c50e34e974aa238", "score": "0.59183776", "text": "public function initializeAction() {\n\t}", "title": "" }, { "docid": "cdd088f16bf976a8ee489fdb241eece2", "score": "0.58443844", "text": "public function initializeAction()\n {\n\n }", "title": "" }, { "docid": "48c42faa1ab54c6150d357dcb610c1fa", "score": "0.57932186", "text": "public function init() {\n\t\trequire_once Package::instance()->package_path( 'listings/query.php' );\n\t\tnew Query();\n\t}", "title": "" }, { "docid": "984ceefa958fb70becc759a777efaf41", "score": "0.57700366", "text": "function __construct() {\n $action = $_REQUEST['action'];\n if (function_exists($action)) {\n call_user_func($action);\n } else {\n $this->main();\n }\n }", "title": "" }, { "docid": "9d93346f0aee3b6c4d2d937f1b9031c4", "score": "0.5745665", "text": "function query() {\n }", "title": "" }, { "docid": "d24374ae5789badc446ac7d3e30a42c6", "score": "0.5740289", "text": "function query() { }", "title": "" }, { "docid": "d24374ae5789badc446ac7d3e30a42c6", "score": "0.5740289", "text": "function query() { }", "title": "" }, { "docid": "d24374ae5789badc446ac7d3e30a42c6", "score": "0.5740289", "text": "function query() { }", "title": "" }, { "docid": "d24374ae5789badc446ac7d3e30a42c6", "score": "0.5740289", "text": "function query() { }", "title": "" }, { "docid": "d24374ae5789badc446ac7d3e30a42c6", "score": "0.5740289", "text": "function query() { }", "title": "" }, { "docid": "d24374ae5789badc446ac7d3e30a42c6", "score": "0.5740289", "text": "function query() { }", "title": "" }, { "docid": "d24374ae5789badc446ac7d3e30a42c6", "score": "0.5740289", "text": "function query() { }", "title": "" }, { "docid": "d24374ae5789badc446ac7d3e30a42c6", "score": "0.5740289", "text": "function query() { }", "title": "" }, { "docid": "d24374ae5789badc446ac7d3e30a42c6", "score": "0.5740289", "text": "function query() { }", "title": "" }, { "docid": "d24374ae5789badc446ac7d3e30a42c6", "score": "0.5740289", "text": "function query() { }", "title": "" }, { "docid": "d78360171dee132bd27558bcd008a819", "score": "0.5739136", "text": "public function actionInit()\n {\n\n $this->setupShortcodes();\n\n $query_competitions = $this->app->make('QueryCompetitions');\n $query_competitions->setAllPastCompetitionsClose();\n\n $this->setupWpSeoActionsFilters();\n $this->setupUserMeta();\n $this->setupSocialButtons();\n\n $this->registerScriptsStyles();\n\n unset($query_competitions);\n }", "title": "" }, { "docid": "3fe48fa6ac01b0188957137cb96c3bca", "score": "0.5735698", "text": "function query() {\n\t}", "title": "" }, { "docid": "2c8425d72177e25a69ed666b8ffbbbf4", "score": "0.5721177", "text": "function query() {\n }", "title": "" }, { "docid": "2c8425d72177e25a69ed666b8ffbbbf4", "score": "0.5721177", "text": "function query() {\n }", "title": "" }, { "docid": "4d3cd1e6033962da9945310ec704e9a1", "score": "0.57173073", "text": "function _query_init()\n\t{\t\n\t\t// Grab data from model\n\t\tif($this->get('order'))\n\t\t{\n\t\t $order = explode(':', $this->get('order'));\n\t\t foreach($order AS $key => $row)\n\t\t {\n\t\t \t$this->{$this->_model}->{$this->_model_methods['order']}($row . ' ' . $this->get('sort'));\n\t\t }\n\t\t} \n\t\t\n\t\t// Set limit & offset\n\t\tif($this->get('limit'))\n\t\t{\n\t\t if($this->get('offset'))\n\t\t {\n\t\t \t$this->{$this->_model}->{$this->_model_methods['limit']}($this->get('limit'), $this->get('offset'));\n\t\t } else \n\t\t {\n\t\t \t$this->{$this->_model}->{$this->_model_methods['limit']}($this->get('limit'));\t\t\t\t\n\t\t }\n\t\t}\n\t\t\n\t\t// Set no extra\n\t\tif($this->get('noextra'))\n\t\t{\n\t\t\t$this->{$this->_model}->{$this->_model_methods['noextra']}();\n\t\t} \n\t\t\n\t\t// Set select fields\n\t\tif($this->_select_fields)\n\t\t{\n\t\t // Set the fields we want to return.\n\t\t foreach($this->_select_fields AS $key => $row)\n\t\t {\n\t\t \t$this->{$this->_model}->{$this->_model_methods['select']}($row);\t\n\t\t }\n\t\t}\n\t}", "title": "" }, { "docid": "ea0030effb46d438fb4a8c41dca69ee0", "score": "0.56862855", "text": "public function getQueryAction() {\n return @$this->attributes['query_action'];\n }", "title": "" }, { "docid": "ea13b26bfc883fdc71f1fe5f3bbb81c6", "score": "0.5679808", "text": "public function __construct()\n {\n $this->setAction('index', array('idle', 'toggleOnline', 'toggleArchived', 'expunge'));\n }", "title": "" }, { "docid": "57c75b137fb71f38d551b64635f226ad", "score": "0.5662115", "text": "public function __construct()\n {\n // Prepare the action for execution, leveraging constructor injection.\n }", "title": "" }, { "docid": "7273330906cea09e9d6bf15f79ed1b75", "score": "0.56363785", "text": "public static function init() {\n\t\tself::setup_actions();\n\t}", "title": "" }, { "docid": "adee7e9516e529a8b913f92854d076d9", "score": "0.560655", "text": "function query() {}", "title": "" }, { "docid": "bfc5585fb82098f34e9ec3a484c62c6e", "score": "0.5599191", "text": "protected function initializeAction(): void\n {\n $this->pageUid = (int)($this->request->getQueryParams()['id'] ?? 0);\n parent::initializeAction();\n }", "title": "" }, { "docid": "9498c16947d6dacc635ed786fa21601b", "score": "0.5588989", "text": "public function __construct($action = null)\n {\n $this\n ->setAction($action);\n }", "title": "" }, { "docid": "15cf848afd4dfa26de4641bc19f2b926", "score": "0.55587626", "text": "function adminInitAction(){\n\n\t\t}", "title": "" }, { "docid": "0b600298f4ed193081151750ff9cbdc2", "score": "0.55531716", "text": "public static function initAction($params) {\n\t\t/* Do nothing */\n\t}", "title": "" }, { "docid": "97e2bd1e7a3797d155bb4e8d18f34ab3", "score": "0.5527349", "text": "public function __construct()\n {\n $this->setAction('index', array('idle', 'toggleEnabled', 'expunge'));\n }", "title": "" }, { "docid": "100ad5b1f1105094115ba2f370e44fb7", "score": "0.55113184", "text": "public function initialize()\n\t{\n\t\t// attributes\n\t\t$this->setName('action');\n\t\t$this->setPhpName('Action');\n\t\t$this->setClassname('Blog\\\\Model\\\\Action');\n\t\t$this->setPackage('Blog.Model');\n\t\t$this->setUseIdGenerator(true);\n\t\t// columns\n\t\t$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);\n\t\t$this->addColumn('ACTOR_ID', 'ActorId', 'INTEGER', true, null, null);\n\t\t$this->addColumn('ACTOR_TYPE', 'ActorType', 'VARCHAR', true, 255, null);\n\t\t$this->addColumn('ACTOR_NAME', 'ActorName', 'VARCHAR', true, 255, null);\n\t\t$this->addColumn('ACTOR_URL', 'ActorUrl', 'VARCHAR', true, 255, null);\n\t\t$this->addColumn('ACTOR_IMAGE', 'ActorImage', 'VARCHAR', true, 255, null);\n\t\t$this->addColumn('VERB', 'Verb', 'VARCHAR', true, 255, null);\n\t\t$this->addColumn('OBJECT_ID', 'ObjectId', 'INTEGER', false, null, null);\n\t\t$this->addColumn('OBJECT_TYPE', 'ObjectType', 'VARCHAR', false, 255, null);\n\t\t$this->addColumn('OBJECT_NAME', 'ObjectName', 'VARCHAR', false, 255, null);\n\t\t$this->addColumn('OBJECT_URL', 'ObjectUrl', 'VARCHAR', false, 255, null);\n\t\t$this->addColumn('OBJECT_IMAGE', 'ObjectImage', 'VARCHAR', false, 255, null);\n\t\t$this->addColumn('TARGET_ID', 'TargetId', 'INTEGER', false, null, null);\n\t\t$this->addColumn('TARGET_TYPE', 'TargetType', 'VARCHAR', false, 255, null);\n\t\t$this->addColumn('TARGET_NAME', 'TargetName', 'VARCHAR', false, 255, null);\n\t\t$this->addColumn('TARGET_URL', 'TargetUrl', 'VARCHAR', false, 255, null);\n\t\t$this->addColumn('TARGET_IMAGE', 'TargetImage', 'VARCHAR', false, 255, null);\n\t\t$this->addColumn('PUBLISHED_AT', 'PublishedAt', 'TIMESTAMP', true, null, null);\n\t\t// validators\n\t}", "title": "" }, { "docid": "54ba1e5cbffcaecfe69ba2a38dd9e280", "score": "0.5509862", "text": "private function invokeAction() {\n\t\t$model = $this->getModel();\n\t\t$dbClass = new $model();\n\t\t$action = $this->action;\n\t\t\n\t\tif(method_exists($dbClass, $action)) {\n\t\t\t$dbClass->$action($this->id);\n\t\t}else {\n\t\t\tthrow new Exception('Not found', 404);\n\t\t}\n\t}", "title": "" }, { "docid": "1e4693f7a94466a962be0ab2b5c49cdd", "score": "0.5502437", "text": "function init() {\r\n\tstyles();\r\n\t// проверка - передан ли атрибут строки action\r\n\tif ( ! empty( $_GET['action'] ) ) {\r\n\r\n\t\t// определение переменной\r\n\t\t$action = $_GET['action'];\r\n\r\n\t\t// если функция, имя которой соответствует значению переменной $action существует\r\n\t\tif ( function_exists( $action ) ) {\r\n\r\n\t\t\t// происходит вывозов указанной функции\r\n\t\t\t$action();\r\n\t\t}\r\n\t} else {\r\n\t\tmy_func();\r\n\t}\r\n}", "title": "" }, { "docid": "45e99ed9320e120e807879bd20a0490f", "score": "0.5496653", "text": "private function init()\n {\n //Retrieve then save to favorites\n $action = self::$input['action'];\n $id = self::$input['id'];\n\n //Make sure request is not in error\n if (!$this->validMethod($action) || !$this->validContent($action)) {\n $this->inErr = true;\n $this->assignData(\"err\", $action);\n }\n\n }", "title": "" }, { "docid": "5d7a0f598dd7f5c2fe0a1058ae821416", "score": "0.54539984", "text": "function __construct($action,$session) {\n\t\t(!isset($action)or empty($action)) ? $this->action=\"test\" : $this->action=$action; //\"Test\" is default action behavior\n\t\t$this->session=$session;\n\t}", "title": "" }, { "docid": "4bfff01c1913b2b7025551b96daee97a", "score": "0.5452308", "text": "protected function initializeAction(){\n// error_log($this->actionMethodName.\" cookies \".var_export($_COOKIE,1));\n\n //Be sure not to cause a redirect Loop! Check that the errorAction is not beeing forwarded to already\n if( $this->actionMethodName != 'errorAction' ){\n\n //If a user is not logged in make an internal redirection to the error Action\n if( !$this->checkForLogin() )\n $this->forward(\"error\");\n }\n\n $this->pridelovalec = $this->pridelovalecRepository->findByUid($this->checkForLogin());\n }", "title": "" }, { "docid": "112e2451402466e525482fb01317fc22", "score": "0.54255074", "text": "public function __construct() {\r\n\t\t$this->setup_actions();\r\n\t}", "title": "" }, { "docid": "cd70c26fad08cb6a3f70284bff71aa2b", "score": "0.53853345", "text": "public function __construct()\n {\n //This bit uses the ?action=methodName format so that the user has them\n //some working bookmarks\n if (isset($_GET['action']) and ! is_numeric($_GET['action'])) {\n $this->$_GET['action']();\n } else {\n //if there isn't a $_GET['action'] we just call the child's index() method\n $this->index();\n }\n $this->showViews();\n }", "title": "" }, { "docid": "1db7d2f33bbf0ddc995d43bd6d17dd08", "score": "0.5369702", "text": "public function __construct(array $action = array())\n {\n $this\n ->setAction($action);\n }", "title": "" }, { "docid": "fdea4f0322b7f19d781670da69141454", "score": "0.53658754", "text": "public function queries();", "title": "" }, { "docid": "7bfa6c6de4905428a7588cd8eccb12d9", "score": "0.53636247", "text": "public function initActionPanel()\n {\n\n }", "title": "" }, { "docid": "e7b9941eee5050d47da3d1851114d272", "score": "0.5355635", "text": "public function NewQuery();", "title": "" }, { "docid": "7be2bc5ef3830e95e2e92453e23c1548", "score": "0.53527665", "text": "protected function initializeAction()\n {\n $this->nj_domain_model = \\N1coode\\NjCollection\\Utility\\General::getShortClassName(__CLASS__);\n\t\t$this->nj_domain = strtolower($this->nj_domain_model);\n\t\t$this->init($this->nj_domain_model);\n }", "title": "" }, { "docid": "fce751d038da2110300d6af7921744ed", "score": "0.5352391", "text": "function query($name);", "title": "" }, { "docid": "d40d490494cc92c19489cd5761bf7bb2", "score": "0.53333026", "text": "public function query($name);", "title": "" }, { "docid": "b5b33150a2b1d61bdc81f52c68c61f87", "score": "0.5320189", "text": "public function get_query();", "title": "" }, { "docid": "b5b33150a2b1d61bdc81f52c68c61f87", "score": "0.5320189", "text": "public function get_query();", "title": "" }, { "docid": "ff04c3a576691e83c85561d6940fabfc", "score": "0.5314515", "text": "function init(){\n \n global $url; \n \n $a_url=array();\n $a_url=explode('/', $url);\n $controller=$a_url[0];\n \n array_shift($a_url);\n \n if(!empty($a_url)){\n $action=$a_url[0];\n array_shift($a_url);\n $qs=$a_url;\n }\n else {\n $action='index';\n $qs=array();\n }\n \n // manage defaults and routing \n if(empty($controller)){\n $controller='home';\n $action='index';\n }\n \n $controllerName=$controller;\n $controller=ucwords($controller);\n $model=rtrim($controller);\n $controller .= 'Controller';\n $dispatch = new $controller($model, $controllerName, $action);\n \n if((int)method_exists($controller, $action)){\n call_user_func_array(array($dispatch,$action),$qs);\n } else {\n new Error(502, 'Controller <strong>'.$controller.'</strong> Not Found. Program Shutdown. (main.php, 67)');\n }\n \n \n }", "title": "" }, { "docid": "c6a5f5980a5d0b684f1e8684b3cab145", "score": "0.53103894", "text": "protected function initializeAction() {\n\t\t$this->labelRelationTypeRepository = t3lib_div::makeInstance('Tx_Taxonomy_Domain_Repository_LabelRelationTypeRepository');\n\t}", "title": "" }, { "docid": "c9e0098117070207222f1a777ec34905", "score": "0.52984756", "text": "public function configureQuery()\n {\n if (isset($_GET))\n {\n $this->query = $_GET;\n }\n }", "title": "" }, { "docid": "c1f9b8c31d31eec1fb42da44b7e28901", "score": "0.52941597", "text": "private function actions() {\n\n\t\tif ( method_exists( $this, 'action' . $_REQUEST['action'] ) ) {\n\t\t\tif ( isset( $_POST['requestType'] ) && $_POST['requestType'] == 'ajax' ) {\n\t\t\t\t$this->ajaxActions();\n\t\t\t} else {\n\t\t\t\t$func = 'action' . $_REQUEST['action'];\n\t\t\t\t$this->$func( $_REQUEST );\n\t\t\t}\n\t\t} else {\n\t\t\treturn;\n\t\t}\n\t}", "title": "" }, { "docid": "0126e24d465cbb5095686f79696c4318", "score": "0.52920216", "text": "function __construct($name, $action_url = NULL) \r\n\t{\r\n\t\t$this->setName($name);\r\n\t\t\r\n\t\tif( NULL !== $action_url )\r\n\t\t{\r\n\t\t\t$this->setAction($action_url);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "63115c273ec15e45b06e97d5a660721a", "score": "0.5285962", "text": "public function __construct() {\n\t\t// default sql conditions\n\t\t$this->initDefaultSQL();\n\t}", "title": "" }, { "docid": "7603cbc466f99a3ab29785b32eaac8e1", "score": "0.5282792", "text": "public function initializeAction() {\n\t\t\t// En TS plugin.tx_f2facebook.settings.actioname.js\n\t\t\t// Puede ser relativo a EXT:\n\t\t$this->addJavaScript(str_replace('EXT:', t3lib_extMgm::siteRelPath('f2facebook'), $this->settings[$this->request->getControllerActionName()]['js']));\n\t\t\t// En TS plugin.tx_f2facebook.settings.actioname.stylesheet\n\t\t\t// Puede ser relativo a EXT:\n\t\t$this->addStylesheet(str_replace('EXT:', t3lib_extMgm::siteRelPath('f2facebook'), $this->settings[$this->request->getControllerActionName()]['stylesheet']));\n\n\t\t$this->getFacebookJavaScript();\n\n\n\t}", "title": "" }, { "docid": "9294af9589da374e36ef818a5bf195c4", "score": "0.52813584", "text": "public function __construct() {\n parent::__construct();\n $methodname = strtolower(\"index_\" . $this->request->method);\n if (method_exists($this, $methodname)) {\n $this->$methodname();\n }\n }", "title": "" }, { "docid": "b5cfcb10a020d09ddd9185ddc3d5748e", "score": "0.5276799", "text": "protected function initializeAction() {\n\t\t$this->articleRepository = t3lib_div::makeInstance('Tx_Wpj_Domain_Repository_articleRepository');\n\t\t$this->placeRepository = t3lib_div::makeInstance('Tx_Wpj_Domain_Repository_placeRepository');\n $this->thumbProcessor = t3lib_div::makeInstance('Tx_Wpj_Utility_ThumbProcessing');\n\t}", "title": "" }, { "docid": "1d87c025b7f2571a28aebd1fa48278e4", "score": "0.5276617", "text": "public function init(){\r\n\t\t$this->_data = $this->_request->getParams();\r\n\r\n $loadfunction = new Default_Model_Common();\r\n foreach($loadfunction->loadFunction($this->_data['module']) as $value){\r\n if($this->_data['action'] == $value['action']){\r\n $load = new $value['model_load']();\r\n $this->view->$value['varname'] = $load->$value['function_load']();\r\n }\r\n }\r\n }", "title": "" }, { "docid": "b10945d285a5f8bdf72a02814f2fa5eb", "score": "0.52742773", "text": "public function Query(){\n\t}", "title": "" }, { "docid": "b10945d285a5f8bdf72a02814f2fa5eb", "score": "0.52742773", "text": "public function Query(){\n\t}", "title": "" }, { "docid": "b10945d285a5f8bdf72a02814f2fa5eb", "score": "0.52742773", "text": "public function Query(){\n\t}", "title": "" }, { "docid": "b10945d285a5f8bdf72a02814f2fa5eb", "score": "0.52742773", "text": "public function Query(){\n\t}", "title": "" }, { "docid": "b10945d285a5f8bdf72a02814f2fa5eb", "score": "0.52742773", "text": "public function Query(){\n\t}", "title": "" }, { "docid": "b10945d285a5f8bdf72a02814f2fa5eb", "score": "0.52742773", "text": "public function Query(){\n\t}", "title": "" }, { "docid": "b10945d285a5f8bdf72a02814f2fa5eb", "score": "0.52742773", "text": "public function Query(){\n\t}", "title": "" }, { "docid": "b10945d285a5f8bdf72a02814f2fa5eb", "score": "0.52742773", "text": "public function Query(){\n\t}", "title": "" }, { "docid": "49f6ed77797aebf2aa7093acebee2799", "score": "0.5273846", "text": "public function runAction($action,$data){\n\t\t$udata = unserialize($data);\n\t\t$this->searchModel = new $udata['classname'];\n\t\t$this->attributes = $udata['attributes'];\n\t\t$this->context = $udata['context'];\n\t\t\n\t\t$primaryKey = $this->attributes[0];\n\t\t$label = $this->attributes[1];\n\t\t\n\t\tYii::log(\"runAction called action is:\".$action,\"info\");\n\t\tif($action == 'search'){\n\t\t\t$searchText = $_GET['searchtext'];\n\t\t\t// perform a query to specified class name referenced by $this->searchModel\n\t\t\t// this class must implements:\n\t\t\t//\tEYuiSearchable\n\t\t\treturn CHtml::listData(\n\t\t\t\t$this->searchModel->eyuisearchable_findModels($searchText,$this->context),\n\t\t\t\t$primaryKey,\n\t\t\t\t$label\n\t\t\t);\n\t\t}\n\t\treturn array();\n\t}", "title": "" }, { "docid": "a7f6c8fc48c5a248158475e71e11ade2", "score": "0.525845", "text": "public function initializeAction() {\n\t\tparent::initializeAction();\n\t\t\n\t\t$this->injectGameRepository(t3lib_div::makeInstance('Tx_Ccore_Domain_Repository_GameRepository'));\n\t\t$this->injectClanRepository(t3lib_div::makeInstance('Tx_Ccore_Domain_Repository_ClanRepository'));\n\t\t$this->injectLeagueRepository(t3lib_div::makeInstance('Tx_Ccore_Domain_Repository_LeagueRepository'));\n }", "title": "" }, { "docid": "2f0f2e90357becff6ee16826b01f38f5", "score": "0.5252235", "text": "protected function initDefaultSQL() {\n\t}", "title": "" }, { "docid": "15fc58c97fd7b7ce44f532cbbd8c3d3c", "score": "0.5248065", "text": "public function init($action)\n {\n $helper = Mage::helper('mp_debug');\n\n /** @var Mage_Core_Controller_Request_Http $request */\n $request = $action->getRequest();\n\n $this->httpMethod = $request->getMethod();\n $this->requestOriginalPath = $request->getOriginalPathInfo();\n $this->requestPath = $request->getPathInfo();\n $this->remoteIp = Mage::helper('core/http')->getRemoteAddr();\n\n $this->routeName = $request->getRouteName();\n $this->module = $request->getControllerModule();\n $this->class = get_class($action);\n $this->action = $action->getActionMethodName($request->getActionName());\n $this->sessionId = Mage::getSingleton('core/session')->getEncryptedSessionId();\n\n $this->serverParameters = $helper->getGlobalServer();\n $this->requestHeaders = $helper->getAllHeaders();\n $this->cookies = $helper->getGlobalCookie();\n $this->session = $helper->getGlobalSession();\n $this->getParameters = $helper->getGlobalGet();\n $this->postParameters = $helper->getGlobalPost();\n }", "title": "" }, { "docid": "0859bdc747196c1053b6014f984f9da8", "score": "0.52421904", "text": "public function ajActionAction() {\r\n\r\n //inactivate template\r\n $this->_includeTemplate = false;\r\n //give data to view\r\n $this->actions = $_SESSION['actions'];\r\n }", "title": "" }, { "docid": "a8fe6794137d7aea8df10068cb8f143c", "score": "0.5240725", "text": "public function getTaskSettingByName($action_name){\n\t\t/*$query = $this->getTaskSettingBy(\n\t\t\tarray('action_name' => $action_name)\n\t\t);\n\t\treturn $query;*/\n\t}", "title": "" }, { "docid": "b217a268f30b26460655ec703350a670", "score": "0.52396667", "text": "public function getSimpleAction();", "title": "" }, { "docid": "56ed9e9e87bdfe4b47e40ca303995f09", "score": "0.52367187", "text": "public function __construct(){\n\t\t$this->controller = isset($_GET['c']) ? $_GET['c'] : Config::$DEFAULT_CONTROLLER;\n\t\t$this->action = isset($_GET['a']) ? $_GET['a'] : '';\n\t}", "title": "" }, { "docid": "38c16efc3e907ca9eda0dd08f5c94b95", "score": "0.5236454", "text": "public function searchAction()\n\t{\n\t}", "title": "" }, { "docid": "19533b8623fee7390d756f85cc9632b2", "score": "0.522325", "text": "public function action($action, $table, $where = array()) {\n\n\t\t\t$sql = \"{$action} from {$table}\";\n\n\t\t\tif($where && count($where) === 3) {\n\n\n\t\t\t\t$field = $where[0];\n\t\t\t\t$condition = $where[1];\n\t\t\t\t$value = $where[2];\n\n\t\t\t\t$sql .= \" where {$field} {$condition} ?\";\n\n\t\t\t\tif(!$this->query($sql, array($value))->error()) {\n\n\t\t\t\t\treturn $this;\n\t\t\t\t}\n\n\n\t\t\t} else if(!$where) {\n\n\t\t\t\tif(!$this->query($sql)->error()) {\n\n\t\t\t\t\treturn $this;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $this;\n\n\t\t}", "title": "" }, { "docid": "ba5085a37581e35b58ed3629efc30113", "score": "0.52181935", "text": "public function query()\n {\n }", "title": "" }, { "docid": "ba5085a37581e35b58ed3629efc30113", "score": "0.52181935", "text": "public function query()\n {\n }", "title": "" }, { "docid": "ba5085a37581e35b58ed3629efc30113", "score": "0.52181935", "text": "public function query()\n {\n }", "title": "" }, { "docid": "ba5085a37581e35b58ed3629efc30113", "score": "0.52181935", "text": "public function query()\n {\n }", "title": "" }, { "docid": "d6fefe8db90dcef666eb44735dfac721", "score": "0.5216696", "text": "public function init()\n {\n #设置模型\n $this->setModel();\n #设置查询字段\n $this->setSearchFields();\n #设置服务\n $this->setService();\n #设置显示类型\n $this->setDisplay();\n #设置datatables的可用按键\n $this->_tableButton = \\Yii::$service->admin->role->getDataTableAuth('user');\n #获得查询的字段\n $param = $this->_display->getRequest();\n $this->_primaryKey = $this->_service->getPrimaryKey();\n //var_dump($param);exit;\n if (empty($param['offset'])) {\n $param['offset'] = $this->_offset;\n }\n if (empty($param['limit'])) {\n $param['limit'] = $this->_limit;\n }\n if (empty($param['orderBy'])) {\n $param['orderBy'] = $this->_primaryKey;\n }\n if (empty($param['orderDirection'])) {\n $param['orderDirection'] = $this->_orderDirection;\n }\n if (empty($param['asArray'])) {\n $param['asArray'] = $this->_asArray;\n }\n $this->_param = array_merge($this->_param, $param);\n\n $this->_model = $this->_service->getModel();\n }", "title": "" }, { "docid": "3f54d63a7051197c57182d6295004775", "score": "0.52112865", "text": "static function get_action_parameter()\r\n {\r\n return self :: PARAM_ACTION;\r\n }", "title": "" }, { "docid": "3f54d63a7051197c57182d6295004775", "score": "0.52112865", "text": "static function get_action_parameter()\r\n {\r\n return self :: PARAM_ACTION;\r\n }", "title": "" }, { "docid": "5e0c9c2dfafcc9f1fca134dcda3d0c55", "score": "0.52071667", "text": "public function actionIndex()\n {\n $query = QinlianPetition::find();\n $ChallengeQuery = QinlianChallenge::find();\n $ThreadQuery = QinlianThread::find();\n $RegisterQuery = QinlianRegister::find();\n\n $querys = Yii::$app->request->get('query');\n if(empty($querys)== false && count($querys) > 0){\n $condition = \"\";\n $ChallengeCondition = \"\";\n $ThreadCondition = \"\";\n $RegisterCondition = \"\";\n $parame = array();\n foreach($querys as $key=>$value){\n $value = trim($value);\n if(empty($value) == false){\n $parame[\":{$key}\"]= '%'.$value.'%';\n if(empty($condition) == true){\n\n if ($key == 'name') {\n $condition = \" name_reported LIKE :{$key} \";\n }elseif ($key == 'case_keyword'){\n $condition = \" main_issues LIKE :{$key} \";\n }else{\n $condition = \" {$key} LIKE :{$key} \";\n }\n } else{\n if ($key == 'name') {\n $condition = $condition . \" AND name_reported LIKE :{$key} \";\n }elseif ($key == 'case_keyword'){\n $condition = $condition . \" AND main_issues LIKE :{$key} \";\n }else{\n $condition = $condition . \" AND {$key} LIKE :{$key} \";\n }\n }\n\n if(empty($ChallengeCondition) == true){\n if ($key == 'name') {\n $ChallengeCondition = \" respondent_unit LIKE :{$key} \";\n }elseif ($key == 'case_keyword'){\n $ChallengeCondition = \" main_issues LIKE :{$key} \";\n }else{\n $ChallengeCondition = \" {$key} LIKE :{$key} \";\n }\n } else{\n if ($key == 'name') {\n $ChallengeCondition = $ChallengeCondition . \" AND respondent_unit LIKE :{$key} \";\n }elseif ($key == 'case_keyword'){\n $ChallengeCondition = $ChallengeCondition . \" AND main_issues LIKE :{$key} \";\n }else{\n $ChallengeCondition = $ChallengeCondition . \" AND {$key} LIKE :{$key} \";\n }\n }\n\n if(empty($ThreadCondition) == true){\n if ($key == 'name') {\n $ThreadCondition = \" person_reflected LIKE :{$key} \";\n }elseif ($key == 'case_keyword'){\n $ThreadCondition = \" main_problem_clues LIKE :{$key} \";\n }else{\n $ThreadCondition = \" {$key} LIKE :{$key} \";\n }\n } else{\n if ($key == 'name') {\n $ThreadCondition = $ThreadCondition . \" AND person_reflected LIKE :{$key} \";\n }elseif ($key == 'case_keyword'){\n $ThreadCondition = $ThreadCondition . \" AND main_problem_clues LIKE :{$key} \";\n }else{\n $ThreadCondition = $ThreadCondition . \" AND {$key} LIKE :{$key} \";\n }\n }\n\n if(empty($RegisterCondition) == true){\n if ($key == 'name') {\n $RegisterCondition = \" person_investigated LIKE :{$key} \";\n }elseif ($key == 'case_keyword'){\n $RegisterCondition = \" brief_case_report LIKE :{$key} \";\n }elseif ($key == 'id_card'){\n $RegisterCondition = \" credentials_number LIKE :{$key} \";\n } else{\n $RegisterCondition = \" {$key} LIKE :{$key} \";\n }\n } else{\n if ($key == 'name') {\n $RegisterCondition = $RegisterCondition . \" AND person_investigated LIKE :{$key} \";\n }elseif ($key == 'case_keyword'){\n $RegisterCondition = $RegisterCondition . \" AND brief_case_report LIKE :{$key} \";\n }elseif ($key == 'id_card'){\n $RegisterCondition = $RegisterCondition . \" AND credentials_number LIKE :{$key} \";\n }else{\n $RegisterCondition = $RegisterCondition . \" AND {$key} LIKE :{$key} \";\n }\n }\n }\n }\n if(count($parame) > 0){\n $query = $query->where($condition, $parame);\n $ChallengeQuery = $ChallengeQuery->where($ChallengeCondition, $parame);\n $ThreadQuery = $ThreadQuery->where($ThreadCondition, $parame);\n $RegisterQuery = $RegisterQuery->where($RegisterCondition, $parame);\n }\n }\n\n $pagination = new Pagination([\n 'totalCount' =>$query->count(), \n 'pageSize' => '5',\n 'pageParam'=>'page', \n 'pageSizeParam'=>'per-page']\n );\n\n $ChallengePagination = new Pagination([\n 'totalCount' =>$ChallengeQuery->count(),\n 'pageSize' => '5',\n 'pageParam'=>'page',\n 'pageSizeParam'=>'per-page']\n );\n\n $ThreadPagination = new Pagination([\n 'totalCount' =>$ThreadQuery->count(),\n 'pageSize' => '5',\n 'pageParam'=>'page',\n 'pageSizeParam'=>'per-page']\n );\n\n $RegisterPagination = new Pagination([\n 'totalCount' =>$RegisterQuery->count(),\n 'pageSize' => '5',\n 'pageParam'=>'page',\n 'pageSizeParam'=>'per-page']\n );\n \n $orderby = Yii::$app->request->get('orderby', '');\n if(empty($orderby) == false){\n $query = $query->orderBy($orderby);\n }\n \n \n $models = $query\n ->offset($pagination->offset)\n ->limit($pagination->limit)\n ->all();\n\n $ChallengeModels = $ChallengeQuery\n ->offset($ChallengePagination->offset)\n ->limit($ChallengePagination->limit)\n ->all();\n\n $ThreadModels = $ThreadQuery\n ->offset($ThreadPagination->offset)\n ->limit($ThreadPagination->limit)\n ->all();\n\n $RegisterModels = $RegisterQuery\n ->offset($RegisterPagination->offset)\n ->limit($RegisterPagination->limit)\n ->all();\n\n $departments = $this->getDepartment();\n return $this->render('index', [\n 'models'=>$models,\n 'pages'=>$pagination,\n 'query'=>$querys,\n 'ChallengeModels'=>$ChallengeModels,\n 'ChallengePages'=>$ChallengePagination,\n 'ThreadModels'=>$ThreadModels,\n 'ThreadPages'=>$ThreadPagination,\n 'RegisterModels'=>$RegisterModels,\n 'RegisterPages'=>$RegisterPagination,\n 'departments'=>$departments,\n ]);\n\n }", "title": "" }, { "docid": "2e6dd8207e07bf6ae640d0558d5e8687", "score": "0.5205729", "text": "public static function prepareActionsInjection();", "title": "" }, { "docid": "7b7da63bbee9807516c099a6687c21c9", "score": "0.5202157", "text": "protected function initializeAction() {\r\n\t\t$this->galleryRepository = t3lib_div::makeInstance('Tx_MfGallery_Domain_Repository_GalleryRepository');\r\n\t}", "title": "" }, { "docid": "3065d77cab70fe588093612f94002d1f", "score": "0.52013266", "text": "function QueryInitialise()\n\t{\n\t\tglobal $config;\n\t\t\n\t\t$this->client = new nusoap_client('http://www.ebi.ac.uk/ontology-lookup/OntologyQuery.wsdl', 'wsdl',\n\t\t\t\t\t$config['proxy_name'], $config['proxy_port'], '', '');\n\t\t\t\t\t\n\t\t//print_r($this->client);\t\t\t\t\t\n\t\t\t\n\t\t$err = $this->client->getError();\n\t\tif ($err) \n\t\t{\n\t\t\t// handle this...\n\t\t\t\n\t\t}\n\t\t$this->client->setUseCurl(true);\n\t}", "title": "" }, { "docid": "2b2c2e0d677b4403c4fe2d87fc1e6558", "score": "0.5199856", "text": "public function query();", "title": "" }, { "docid": "2b2c2e0d677b4403c4fe2d87fc1e6558", "score": "0.5199856", "text": "public function query();", "title": "" }, { "docid": "2b2c2e0d677b4403c4fe2d87fc1e6558", "score": "0.5199856", "text": "public function query();", "title": "" }, { "docid": "ed712b1bdb0dc20c9b2f1b1f4c01a038", "score": "0.5192044", "text": "public function initQuery() {\n if (!empty($this->query)) {\n $class = get_class($this->query);\n if ($class && $class != 'stdClass') {\n // return if query is already initialized.\n return TRUE;\n }\n }\n\n // Create and initialize the query object.\n $views_data = Views::viewsData()->get($this->storage->get('base_table'));\n $this->storage->set('base_field', !empty($views_data['table']['base']['field']) ? $views_data['table']['base']['field'] : '');\n if (!empty($views_data['table']['base']['database'])) {\n $this->base_database = $views_data['table']['base']['database'];\n }\n\n $this->query = $this->display_handler->getPlugin('query');\n return TRUE;\n }", "title": "" }, { "docid": "8f24d25d9e00597caa55a5193b278e79", "score": "0.5180489", "text": "private function _setAction($action) {\n if (in_array($_GET['action'],\n array('createBackupDb', 'dbConnectTest', 'runTableProcessAction', 'printConfig', 'getPartners', 'printJsI18nFile'))\n )\n return;\n\n if (! isset($this->_session['oldAction']))\n $this->_session['oldAction'] = '';\n else {\n if ($this->_session['currentAction'] != $action)\n $this->_session['oldAction'] = $this->_session['currentAction'];\n }\n\n $this->_session['currentAction'] = $action;\n }", "title": "" }, { "docid": "4686ad0866231abc4b26d673c0faa08f", "score": "0.5164828", "text": "private function action($action, $table, $where = array())\r\n\t{\r\n\t\tif( count($where) === 3 )\r\n\t\t{\r\n\t\t\t$operators = array( '=', '>', '<', '>=', '<=' );\r\n\t\t\t$field = $where[0];\r\n\t\t\t$operator = $where[1];\r\n\t\t\t$value = $where[2];\r\n\t\t\t\r\n\t\t\tif( in_array( $operator, $operators ) )\r\n\t\t\t{\r\n\t\t\t\t$sql = \"{$action} FROM {$table} WHERE {$field} {$operator} ?\";\r\n\t\t\t\r\n\t\t\t\t//If there is an error, error() returns true.\r\n\t\t\t\t//We want error() to return false which means DB operation was as\r\n\t\t\t\t//success.\r\n\t\t\t\tif( !$this->query( $sql, array($value))->error() )\r\n\t\t\t\t{\r\n\t\t\t\t\treturn $this;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "title": "" } ]
986f212724c714d3a4a3a1c1942e9555
/ llena el slect de laboratorios para agragar practicas
[ { "docid": "e4f35620031a24fc048cb4a0ad9ee960", "score": "0.0", "text": "static function sallabor($id)\n{\n include 'db_connect.php';\n echo \"<select class=form-field name=labor id=labor>\";\n echo \"<option >Seleccione Laboratorio </option>\";\n $result = $mysqli->query(\"SELECT idlaboratorios, nombre FROM laboratorios where laboratoristas_members_id = $id\");\n if ($result->num_rows > 0) \n {\n while ($row = $result->fetch_assoc()) \n { \n echo '<option value=\"'.$row['idlaboratorios'].'\">'.$row['nombre'].'</option>';\n }\n }\n echo \"</select>\";\n}", "title": "" } ]
[ { "docid": "384d86ddd4173483ba1510c7812651b8", "score": "0.6122605", "text": "public function approach();", "title": "" }, { "docid": "36abcae1e34c735b2784688fae5d5b54", "score": "0.5748927", "text": "function philosophybasics() {\n}", "title": "" }, { "docid": "0f87b3e1af078f1beb050c6a9ff295c2", "score": "0.5667724", "text": "public function run()\n {\n $intelligences = ['Lingüística',\n 'Lógico-matemática',\n 'Espacial',\n 'Musical',\n 'Corporal-cinestésica',\n 'Intrapersonal',\n 'Interpersonal',\n 'Naturalista'];\n\n $slugs = ['linguistica',\n 'logico-matematica',\n 'espacial',\n 'musical',\n 'corporal-cinestesica',\n 'intrapersonal',\n 'interpersonal',\n 'naturalista'];\n\n $descriptions = ['La función del lenguaje es universal, y su desarrollo en los niños es sorprendentemente similar en todas las culturas. Incluso en el caso de personas sordas a las que no se les ha enseñado explícitamente una lengua de signos, a menudo independientemente de una cierta modalidad en ello tienen dificultades para construir frases más sencillas. Al mismo tiempo, otros procesos mentales pueden quedar completamente ilesos.',\n 'En los seres humanos dotados de esta forma de inteligencia, el proceso de resolución de problemas abstractos a menudo es extraordinariamente rápido: el matemático y científico en general competente maneja simultáneamente muchas variables y crea numerosas hipótesis que son evaluadas sucesivamente y, posteriormente, son aceptadas o rechazadas.',\n 'La resolución de problemas espaciales se aplica a la navegación y al uso de mapas como sistema notacional. Otro tipo de solución a los problemas espaciales, aparece en la visualización de un objeto visto desde un ángulo diferente y en el juego del ajedrez. También se emplea este tipo de inteligencia en las artes visuales.',\n 'Los datos procedentes de diversas culturas hablan de la universalidad de la noción musical. Incluso, los estudios sobre el desarrollo infantil sugieren que existe habilidad natural y una percepción auditiva (oído y cerebro) innata en la primera infancia hasta que existe la habilidad de interactuar con instrumentos y aprender sus sonidos, su naturaleza y sus capacidades.',\n 'La evolución de los movimientos corporales especializados es de importancia obvia para la especie; en los humanos esta adaptación se extiende al uso de herramientas. El movimiento del cuerpo sigue un desarrollo claramente definido en los niños y no hay duda de su universalidad cultural.',\n 'La inteligencia intrapersonal es el conocimiento de los aspectos internos de una persona: el acceso a la propia vida emocional, a la propia gama de sentimiento, la capacidad de efectuar discriminaciones entre ciertas emociones y, finalmente, ponerles un nombre y recurrir a ellas como medio de interpretar y orientar la propia conducta.',\n 'La inteligencia interpersonal se constituye a partir de la capacidad nuclear para sentir distinciones entre los demás, en particular, contrastes en sus estados de ánimo, temperamento, motivaciones e intenciones. Esta inteligencia le permite a un adulto hábil, leer las intenciones y los deseos de los demás, aunque se los hayan ocultado. Esta capacidad se da de forma muy sofisticada en los líderes religiosos, políticos, terapeutas y maestros. Esta forma de inteligencia no depende necesariamente del lenguaje.',\n 'Esta inteligencia la utilizamos cuando observamos la naturaleza o los elementos que se encuentran a nuestro alrededor. Se describe como la competencia para percibir las relaciones que existen entre varias especies o grupos de objetos y personas, así como reconocer y establecer si existen distinciones y semejanzas entre ellos.'];\n\n foreach ($intelligences as $index => $intelligence) {\n factory('App\\Intelligence')\n ->create([\n 'name' => $intelligence,\n 'slug' => $slugs[$index],\n 'description' => $descriptions[$index],\n ]);\n\n }\n\n\n }", "title": "" }, { "docid": "834f612fa0b41dd7a7ae75b92a20589f", "score": "0.56525123", "text": "public function run()\n {\n\n $algorithms = new stdClass();\n $algorithms->fail = \"onv > 2 of vold + goed - onv < 12, of een show stopper\";\n $algorithms->pass = \"vold + goed - onv > 12 en onv < 2 en (vold - onv < 12 of goed < 4), geen showstopper\";\n $algorithms->good = \"onv = 0 en vold = 12 en goed > 4, geen showstoppers\";\n\n $exam_section_one = new stdClass();\n $exam_section_one->title = \"Broncode\";\n\n $exam_section_one_criteria_one = new stdClass();\n $exam_section_one_criteria_one->criteria_name = \"Version Control\";\n $exam_section_one_criteria_one->criteria_description = \"De kandidaat slaat zijn/haar code op in een version control ssyteem.\";\n $exam_section_one_criteria_one->rating_group = \"pass\";\n $exam_section_one_criteria_one->show_stopper = False;\n\n $exam_section_one_criteria_two = new stdClass();\n $exam_section_one_criteria_two->criteria_name = \"Commits\";\n $exam_section_one_criteria_two->criteria_description = \"De kandidaat checkt meerdere keren per week substantiele en goed omgschreven commits in.\";\n $exam_section_one_criteria_two->rating_group = \"good\";\n $exam_section_one_criteria_two->show_stopper = False;\n $exam_section_one->criteria = array($exam_section_one_criteria_one, $exam_section_one_criteria_two);\n\n $exam_section_two = new stdClass();\n $exam_section_two->title = \"Database\";\n\n $exam_section_two_criteria_one = new stdClass();\n $exam_section_two_criteria_one->criteria_name = \"ERD onderhoud\";\n $exam_section_two_criteria_one->criteria_description = \"De ERD is niet onderhouden\";\n $exam_section_two_criteria_one->rating_group = \"fail\";\n $exam_section_two_criteria_one->show_stopper = True;\n\n $exam_section_two_criteria_two = new stdClass();\n $exam_section_two_criteria_two->criteria_name = \"ERD\";\n $exam_section_two_criteria_two->criteria_description = \"De gebruiker heeft een ERD\";\n $exam_section_two_criteria_two->rating_group = \"pass\";\n $exam_section_two_criteria_two->show_stopper = False;\n $exam_section_two->criteria = array($exam_section_two_criteria_one, $exam_section_two_criteria_two);\n\n\n $data = array(\n \"exam_title\" => \"Proeve van Bekwaamheid 1\",\n \"exam_description\" => \"KT2 (B1-K2): Realiseert en test een applicatie\",\n \"active\" => true,\n \"editable\" => true,\n \"exam_cohort\" => 2016,\n \"exam_rating_algorithms\" => $algorithms,\n \"exam_criteria\" => Array(\n $exam_section_one,\n $exam_section_two\n )\n );\n\n App\\DeterminedExam::create($data);\n\n //-------------------------//\n\n $algorithms = new stdClass();\n $algorithms->fail = \"onv > 2 of vold + goed - onv < 12, of een show stopper\";\n $algorithms->pass = \"vold + goed - onv > 12 en onv < 2 en (vold - onv < 12 of goed < 4), geen showstopper\";\n $algorithms->good = \"onv = 0 en vold = 12 en goed > 4, geen showstoppers\";\n\n $exam_section_one = new stdClass();\n $exam_section_one->title = \"Broncode\";\n\n $exam_section_one = new stdClass();\n $exam_section_one->title = \"section_one\";\n\n $exam_section_one_criteria_one = new stdClass();\n $exam_section_one_criteria_one->criteria_name = \"Code geschreven\";\n $exam_section_one_criteria_one->criteria_description = \"De kandidaat heeft een goede hoeveelheid aan code van het totale project geschreven\";\n $exam_section_one_criteria_one->rating_group = \"pass\";\n $exam_section_one_criteria_one->show_stopper = False;\n\n $exam_section_one_criteria_two = new stdClass();\n $exam_section_one_criteria_two->criteria_name = \"Commits\";\n $exam_section_one_criteria_two->criteria_description = \"De kandidaat checkt meerdere keren per week substantiele en goed omgschreven commits in.\";\n $exam_section_one_criteria_two->rating_group = \"good\";\n $exam_section_one_criteria_two->show_stopper = False;\n $exam_section_one->criteria = array($exam_section_one_criteria_one, $exam_section_one_criteria_two);\n\n $exam_section_two = new stdClass();\n $exam_section_two->title = \"section_two\";\n $exam_section_two->title = \"User Interface\";\n\n $exam_section_two_criteria_one = new stdClass();\n $exam_section_two_criteria_one->criteria_name = \"Geen user interface\";\n $exam_section_two_criteria_one->criteria_description = \"Er is geen user interface\";\n $exam_section_two_criteria_one->rating_group = \"fail\";\n $exam_section_two_criteria_one->show_stopper = True;\n\n $exam_section_two_criteria_two = new stdClass();\n $exam_section_two_criteria_two->criteria_name = \"Good criteria\";\n $exam_section_two_criteria_two->criteria_description = \"Criteria van de \\\"good\\\" group\";\n $exam_section_two_criteria_two->rating_group = \"fail\";\n $exam_section_two_criteria_two->show_stopper = True;\n $exam_section_two->criteria = array($exam_section_two_criteria_one, $exam_section_two_criteria_two);\n $exam_section_two_criteria_two->criteria_name = \"Duidelijke interface\";\n $exam_section_two_criteria_two->criteria_description = \"De user interface is duidelijk\";\n $exam_section_two_criteria_two->rating_group = \"pass\";\n $exam_section_two_criteria_two->show_stopper = False;\n $exam_section_two->criteria = array($exam_section_two_criteria_one, $exam_section_two_criteria_two);\n\n\n $data = array(\n \"exam_title\" => \"Proeve van Bekwaamheid 2\",\n \"exam_description\" => \"KT2 (B1-K2): Realiseert en test een applicatie\",\n \"active\" => true,\n \"editable\" => true,\n \"exam_cohort\" => 2017,\n \"exam_rating_algorithms\" => $algorithms,\n \"exam_criteria\" => Array(\n $exam_section_one,\n $exam_section_two\n )\n );\n\n App\\DeterminedExam::create($data);\n }", "title": "" }, { "docid": "cc4864bfdce189f31b6a71a871729d72", "score": "0.5527248", "text": "public function run()\n {\n $questions = [\n [\"Your mood can change very quickly.\", \"U\"],\n [\"You rarely feel insecure.\", \"U\"],\n [\"You feel very anxious in stressful situations\", \"U\"],\n [\"Your work style is closer to random energy spikes than to a methodical and organized approach.\", \"U\"],\n [\"People can rarely upset you.\",\t\"T\"],\n [\"Logic is usually more important than heart when it comes to making important decisions.\",\t\"T\"],\n [\"Being right is more important than being cooperative when it comes to teamwork.\",\t\"T\"],\n [\"It is often difficult for you to relate to other people’s feelings.\",\t\"T\"],\n [\"In a discussion, truth should be more important than people’s sensitivities.\",\t\"T\"],\n [\"You rarely do something just out of sheer curiosity.\",\t\"S\"],\n [\"You consider yourself more practical than creative.\",\t\"S\"],\n [\"You rarely get carried away by fantasies and ideas.\",\t\"S\"],\n [\"Your dreams tend to focus on the real world and its events.\",\t\"S\"],\n [\"You would not call yourself a dreamer.\",\t\"S\"],\n [\"Generally speaking, you rely more on your experience than your imagination.\",\t\"S\"],\n [\"You are more of a natural improviser than a careful planner\",\t\"P\"],\n [\"You would rather improvise than spend time coming up with a detailed plan.\",\t\"P\"],\n [\"Keeping your options open is more important than having a to-do list.\",\t\"P\"],\n [\"You often contemplate the reasons for human existence.\",\t\"N\"],\n [\"You frequently misplace your things.\",\t\"N\"],\n [\"You often get so lost in thoughts that you ignore or forget your surroundings.\",\t\"N\"],\n [\"You often find yourself lost in thought when you are walking in nature.\",\t\"N\"],\n [\"You often spend time exploring unrealistic and impractical yet intriguing ideas.\",\t\"N\"],\n [\"Your mind is always buzzing with unexplored ideas and plans.\",\t\"N\"],\n [\"You have always been interested in unconventional and ambiguous things, e.g. in books, art, or movies\",\t\"N\"],\n [\"Your home and work environments are quite tidy\",\t\"J\"],\n [\"Your travel plans are usually well thought out.\",\t\"J\"],\n [\"Being able to develop a plan and stick to it is the most important part of every project.\",\"J\"],\n [\"You have no difficulties coming up with a personal timetable and sticking to it.\",\t\"J\"],\n [\"You try to respond to your e-mails as soon as possible and cannot stand a messy inbox.\",\t\"J\"],\n [\"Being organized is more important to you than being adaptable\",\t\"J\"],\n [\"You find it difficult to introduce yourself to other people\",\t\"I\"],\n [\"You do not usually initiate conversations.\",\t\"I\"],\n [\"You rarely worry about how your actions affect other people.\",\t\"I\"],\n [\"You are a relatively reserved and quiet person.\",\t\"I\"],\n [\"You usually find it difficult to relax when talking in front of many people.\",\t\"I\"],\n [\"If the room is full, you stay closer to the walls, avoiding the center\",\t\"I\"],\n [\"An interesting book or a video game is often better than a social event.\",\t\"I\"],\n [\"As a parent, you would rather see your child grow up kind than smart.\",\t\"F\"],\n [\"If your friend is sad about something, you are more likely to offer emotional support than suggest ways to deal with the problem.\",\t\"F\"],\n [\"You think that everyone’s views should be respected regardless of whether they are supported by facts or not.\",\t\"F\"],\n [\"You believe that it is more rewarding to be liked by others than to be powerful\",\t\"F\"],\n [\"Winning a debate matters less to you than making sure no one gets upset.\",\t\"F\"],\n [\"You are usually highly motivated and energetic.\",\t\"E\"],\n [\"You do not mind being at the center of attention.\",\t\"E\"],\n [\"It does not take you much time to start getting involved in social activities at your new workplace.\",\t\"E\"],\n [\"You feel more energetic after spending time with a group of people.\",\t\"E\"],\n [\"You worry too much about what other people think\",\t\"E\"],\n [\"You often take initiative in social situations\",\t\"E\"],\n [\"You often feel as if you have to justify yourself to other people.\",\t\"E\"],\n [\"You do not let other people influence your actions.\",\t\"A\"],\n [\"Your emotions control you more than you control them\",\t\"A\"],\n [\"You see yourself as very emotionally stable.\",\t\"A\"],\n [\"You find it easy to stay relaxed and focused even when there is some pressure.\",\"A\"],\n ];\n foreach ($questions as $question){\n $newQ = \\App\\Models\\Question::create([\n \"text\" => $question[0]\n ]);\n $optionConfig = $this->getQuestionConfig($question[1]);\n $optionConfig[\"text\"] = \"Yes\";\n $optionConfig[\"question_id\"] = $newQ->id;\n\n Option::create($optionConfig);\n\n $optionConfig = $this->getReverseQuestionConfig($optionConfig);\n $optionConfig[\"text\"] = \"No\";\n Option::create($optionConfig);\n }\n }", "title": "" }, { "docid": "182361e537e611cf3a0d433a5f308cc2", "score": "0.5420931", "text": "public function run()\n {\n App\\lecture::create([\n 'title'=>'디지털 상상력과 글쓰기',\n 'content'=>'디지털 환경 매체에 익숙한 학생에게 창의적이고 논리적인 사고를 표현 할 수 있는 글쓰기 능력을 키우는데 목적이 있다.\n 글쓰기가 경쟁력인 시대,글쓰기 기본과 글을 잘 쓰는 방법을 익히게 해 사회 경쟁력을 갖추게 한다.',\n 'professor' => '강영기',\n ]);\n }", "title": "" }, { "docid": "17ee107a87374dced007637d436f73f0", "score": "0.540499", "text": "private function definePerfis() {\n // Define os perfils e suas heranças\n $this->addRole(new Zend_Acl_Role(null));\n $this->addRole(new Zend_Acl_Role('consulta', null));\n $this->addRole(new Zend_Acl_Role('planejamento'), 'consulta');\n $this->addRole(new Zend_Acl_Role('diefi'), 'consulta');\n $this->addRole(new Zend_Acl_Role('secretaria'), 'diefi');\n $this->addRole(new Zend_Acl_Role('secretaria_reserva'), 'secretaria');\n $this->addRole(new Zend_Acl_Role('seccional'), 'secretaria');\n $this->addRole(new Zend_Acl_Role('dipor'), 'seccional');\n $this->addRole(new Zend_Acl_Role('desenvolvedor'), 'dipor');\n }", "title": "" }, { "docid": "a9a8c60da8c964360741a208e990ec3c", "score": "0.5338953", "text": "function descripcion_indicador_familiar($nombre_indicador)\n{\n if ($nombre_indicador == \"Fortaleza Alta\") {\n $nombre_indicador = \"<p> El o la estudiante posee fortalezas en la mayoria de los siguientes aspectos:</p><br>\n <p> -La familia del (la) estudiante suele apoyar a su hijo(a) en el proceso de aprendizaje y cuando tiene problemas, ayudándolo con las tareas, conversando lo que sucede en la escuela, animándolo y motivándolo a trabajar bien.</p>\";\n } elseif ($nombre_indicador == \"Fortaleza Moderada\") {\n $nombre_indicador = \"<p> El o la estudiante posee fortalezas en algunos de los siguientes aspectos:</p><br>\n <p> -La familia del (la) estudiante suele apoyar a su hijo(a) en el proceso de aprendizaje y cuando tiene problemas, ayudándolo con las tareas, conversando Io que sucede en la escuela, animándolo y motivándolo a trabajar bien.</p>\";\n } elseif ($nombre_indicador == \"Alerta Alta\") {\n $nombre_indicador = \"<p> El o la estudiante posee alertas en la mayoria de los siguientes aspectos:</p><br>\n <p> -La familia del (la) estudiante no suele apoyar a su hijo(a) en el proceso de aprendizaje o cuando tiene problemas. Tampoco suele apoyarlo en las tareas, motivarlo a trabajar bien o conversar con él o ella sobre Io que sucede en la escuela.</p>\";\n } elseif ($nombre_indicador == \"Alerta Moderada\") {\n $nombre_indicador = \"<p> El o la estudiante posee alertas en algunos de los siguientes aspectos:</p><br>\n <p> -La familia del (la) estudiante no suele apoyar a su hijo(a) en el proceso de aprendizaje o cuando tiene problemas. Tampoco suele apoyarlo en las tareas, motivarlo a trabajar bien o conversar con él o ella sobre Io que sucede en la escuela.</p>\";\n } else {\n $nombre_indicador = \"Indefinido\";\n }\n\n return $nombre_indicador;\n}", "title": "" }, { "docid": "f3ddf15632099d663842f07b150f1c76", "score": "0.53336793", "text": "public function testAlgoUtil() {\n\t\t$cole= new Colectivo (\"122 negro\", 1, \"Semtur\");\n\t\t$this->assertEquals($cole->linea(), \"122 negro\");\n\t}", "title": "" }, { "docid": "f1c985ff22d8ce2efc265a3a366e2cd1", "score": "0.53264606", "text": "protected function init()\n\t{\n\t\t$categoryPatterns = array(\n\t\t\t'interior-design', \t\t \t\t// Дизайн интерьеров\n\t\t\t'landscape-design', \t\t// Ландшафтный дизайн и проектирование\n\t\t\t'steps',\t\t\t\t\t\t// Лестницы: продажа и установка\n\t\t\t'elevators-escalators',\t\t\t// Лифты, эскалаторы: продажа и установка\n\t\t\t'gates',\t\t\t\t\t\t// Ворота, защитные роллеты\n\t\t\t'balconies',\t\t\t\t\t// Балконы: обшивка и утепление\n\t\t\t'window-glasses',\t\t\t\t// Окна: продажа и установка\n\t\t\t'fences',\t\t\t\t\t\t// Ограждение, заборы\n\t\t\t'heating',\t\t\t\t\t\t// Отопление, обогрев: продажа и установка\n\t\t\t'glass_constructions_glass',\t// Стеклянные конструкции, стекло, зеркала\n\t\t\t'security',\t\t\t\t\t\t// Охранные системы и видеонаблюдение\n\t\t\t'ceiling',\t\t\t\t\t\t// Потолки: продажа и установка\n\t\t\t'floor',\t\t\t\t\t\t// Пол, паркет, ламинат: продажа и укладка\n\t\t\t'planning-works',\t\t\t\t// Проектные и архитектурные работы\n\t\t\t'appartments-repair',\t\t\t// Ремонт квартир, домов и офисов\n\t\t\t'sanitation',\t\t\t\t\t// Сантехника: продажа и установка\n\t\t\t'saunas-pools',\t\t\t\t\t// Сауны и бассейны\n\t\t\t'air-conditioning',\t\t\t\t// Вентиляция и кондиционирование\n\t\t\t'wall-materials',\t\t\t\t// Кирпич, плиты: продажа и укладка\n\t\t\t'constructional-works',\t\t\t// Строительные и монтажные работы\n\t\t\t'electricity',\t\t\t\t\t// Электрика, проводка: монтаж и продажа\n\t\t\t'other',\t\t\t\t\t\t// Другие строительные товары и услуги\n\t\t);\n\t\t\n\t\t// we have categories for each region\n\t\tforeach ($categoryPatterns as $pattern) {\n\t\t\t$this->_categoryLinks[] = '@^http://(' . str_replace('.', '\\.', implode('|', $this->_domains)) . ')/construction/' . $pattern . '$@';\n\t\t\t$this->_categoryLinks[] = '@^http://(' . str_replace('.', '\\.', implode('|', $this->_domains)) . ')/construction/' . $pattern . '/[0-9]+$@';\n\t\t}\n\t\t$this->_categoryLinks[] = '@^http://(' . str_replace('.', '\\.', implode('|', $this->_domains)) . ')/construction$@';\n\t\t\n\t\t// each region has its own sub domail URL\n\t\t$this->_dataLinks[] = '@^http://(' . str_replace('.', '\\.', implode('|', $this->_domains)) . ')/construction/.*_[0-9]+\\.html@';\n\t\t\n\t\t// we need initial URL for each category\n\t\tforeach ($this->_domains as $domain) {\n\t\t\t$this->_initialUrls[] = 'http://' . $domain . '/construction';\n\t\t}\n\t}", "title": "" }, { "docid": "ca0152dfe09935fdffcf1bc9c137fb0f", "score": "0.53051114", "text": "public function run()\n {\n $faker = Faker::create();\n\n $titles = ['Matematika', 'Bahasa Inggris', 'Tematik'];\n\n foreach ($titles as $title) {\n\n $course = new Course;\n $course->title = $title;\n $course->save();\n\n for ($i = 0; $i < $faker->numberBetween(5, 15); $i++) {\n\n $level = new CourseLevel;\n $level->course_id = $course->id;\n $level->title = 'Paket ' . toAlpha($i);\n $level->save();\n\n for ($j = 1; $j <= $faker->numberBetween(10, 30); $j++) {\n\n $sublevel = new CourseSublevel;\n $sublevel->course_level_id = $level->id;\n $sublevel->title = $level->title . $j;\n $sublevel->time = $faker->numberBetween(80, 120);\n $sublevel->minimum_score = $faker->numberBetween(50, 100);\n $sublevel->description = $faker->realText($maxNbChars = 200);\n $sublevel->save();\n\n for ($k = 1; $k <= $faker->numberBetween(15, 30); $k++) {\n\n $question = new Question;\n $question->course_sublevel_id = $sublevel->id;\n $question->number = $k;\n $question->type = 1;\n $question->media = null;\n $question->question = $faker->realText($maxNbChars = 80);\n $question->save();\n\n $choice_count = $faker->numberBetween(3, 5);\n $choice_correct = $faker->numberBetween(1, $choice_count);\n for ($l = 1; $l <= $choice_count; $l++) {\n $answer = new MultipleChoiceAnswer;\n $answer->question_id = $question->id;\n $answer->order = $l;\n $answer->is_correct = ($l == $choice_correct);\n $answer->answer = $faker->realText($maxNbChars = 30);\n $answer->save();\n\n }\n }\n }\n }\n }\n }", "title": "" }, { "docid": "19c9511d2361408cd8a9d85f37601156", "score": "0.52756923", "text": "public function eveluate();", "title": "" }, { "docid": "3b93f940ea082612ad67d2b36d5e9558", "score": "0.5262955", "text": "function qualityAdjective()\r\n{\r\n\t\r\n\treturn randWord(\"traditional\",\"amusing\",\"diverting\",\"entertaining\",\"popular\",\"interesting\",\"challenging\",\"enjoyable\",\"little-known\",\"classic\",\"underrated\",\"over-rated\",\"mediocre\",\"tolerable\");\r\n}", "title": "" }, { "docid": "83af946ffe3cacd7dd544ca28eeff4a3", "score": "0.5258519", "text": "public function support();", "title": "" }, { "docid": "8903661f97b58d68be8440f6534e273f", "score": "0.52462345", "text": "function findPerfectCandidate($cv)\n{\n $isItAMatched = false;\n $i = 0;\n $matchingSkill = 0;\n $arr_Experiences['required'] = array(\n 'PHP object' => 'great',\n 'MySQL/MariaDB' => 'great',\n 'HTML/CSS/JavaScript' => 'cool'\n );\n $arr_Experiences['appreciated'] = array(\n 'Laravel/Silex/Symfony2/Zend' => 'at less 1',\n 'PHP units' => 'test = doubt !'\n );\n \n if ($cv->xp_years >= EXPERIENCE_MIN) {\n if ($cv->dip_years >= DIPLOMA_LEVEL || $cv->anywayIamPerfectCandidate === TRUE) {\n foreach ($cv->skills as $key => $value) {\n if (isset($arr_Experiences['required'][$key]) && $value === $arr_Experiences['required'][$key]) {\n $matchingSkill++;\n }\n if (isset($arr_Experiences['appreciated'][$key]) && $value === $arr_Experiences['appreciated'][$key]) {\n $matchingSkill += 0.5;\n }\n }\n \n if ($matchingSkill / (count($arr_Experiences['required']) + count($arr_Experiences['appreciated']) / 2) >= 0.9) {\n $isItAMatched = LIFE_UNIVERSE_EVERYTHG_ANSWER;\n }\n }\n }\n if ($isItAMatched) {\n sendApplicationNow(\"[email protected]\");\n }\n return $isItAMatched;\n}", "title": "" }, { "docid": "1d64f2387ac42aa87250958e46a408b9", "score": "0.5230911", "text": "function creercommerce($type,$particu,$typevillenum,$taille){\r\n\t\r\n\tinclude_once ('auberge.php');\r\n\tinclude_once ('nomevolue.php');\r\n\tinclude_once ('lieudit.php');\r\n\t$sortie='';\r\n\t$pasgob = array (1,2,3,4,6,7,8);\r\n\t$pasorkpasgob = array (1,3,4,6,7,8);\r\n\t$pashumain = array (1,3,4,6,8);\r\n\t$ex =rand(1,9);\r\n\t$exbis =rand(1,9);\r\n\t$raceisole = array (7,7,7,7,7,7,7,7,$exbis,$ex);\r\n\t$ex2=$pashumain[rand(0,count($pashumain)-1)];\r\n\t$ex3=$pashumain[rand(0,count($pashumain)-1)];\r\n\t$ex4=$pashumain[rand(0,count($pashumain)-1)];\r\n\t\r\n\t$raceouvert = array (7,7,7,7,7,$ex2,$ex2,$ex3,$ex4,$ex);\r\n\t\r\n\t\r\n\t$race= array();\r\n\t$hommedupeuple = array (\"Un acrobate\",\"Un jongleur\",\"Un artiste de rue\",\"Un(e) prostitué(e)\",\"Un tanneur\",\"Un potier\",\"Un menuisier\",\"Un barbier\",\"Un horloger\",\"Un crieur public\");\r\n\t$adepte = array (\"Un soigneur\",\"Un alchimiste\",\"Un herboriste\",\"Un apothicaire\",\"Un scribe\");\r\n\t$expert =array (\"Un tisserand\",\"Un palefrenier\",\"Un architecte\",\"Un forgeron\",\"Un armurier\",\"Un artisan du cuir\",\"Un chasseur\",\"Un tailleur de pierre\",\"Un joaillier\",\"Un cordonnier\",\"Un charpentier\",\"Un maçon\",\"Un meûnier\",\"Un couturier\",\"Un boquetier\",\"Un bourreau\",\"Un calamier \",\"Un homme de loi\",\"Un assassin\",\"Un navigateur\",\"Un guide\",\"Un fromager\",\"Un épicier\",\"Un vendeur d’objet rare\",\"Un boulanger\");\r\n\t$commerce = array (\"Un dispensaire\",\"Une étable\",\"Une salle de jeux\",\"Une petite échoppe de magie\",\"Une librairie (non magique)\",\"Un moulin\",\"Un maréchal-ferrant\",\"Une maison de joie\",\"Une menuiserie\",\"Un hôtel\",\"Une épicerie\",\"Une boulangerie\",\"Un temple d'une divinité bonne\",\"Une temple d'une divinité mauvaise\");\r\n\t\t\r\n\t$expertmarin = array (\"Un chantier maritime\",\"Une capitainerie\",\"Un chantier naval\",\"Un port\",\"Une poissonnerie\");\r\n\t$commercemarin = array (\"Un cartographe\",\"Une équipe de mousses\",\"Un capitaine\",\"Un batelier\",\"Un poissonnier\");\r\n\t$titrenoblessefemfull =array (\"Impératrice\",\"Reine\",\"Grande-duchesse\",\"Archiduchesse\",\"Duchesse\",\"Princesse\",\"Marquise\",\"Comtesse\",\"Vicomtesse\",\"Baronne\",\"Dame\",\"Première Impératrice\",\"Première Reine\",\"Première Grande-duchesse\",\"Première Archiduchesse\",\"Première Duchesse\",\"Première Princesse\",\"Première Marquise\",\"Première Comtesse\",\"Première Vicomtesse\",\"Première Baronne\",\"Première Dame\",\"Seconde Impératrice\",\"Seconde Reine\",\"Seconde Grande-duchesse\",\"Seconde Archiduchesse\",\"Seconde Duchesse\",\"Seconde Princesse\",\"Seconde Marquise\",\"Seconde Comtesse\",\"Seconde Vicomtesse\",\"Seconde Baronne\",\"Seconde Dame\");\r\n\t$titrenoblessemasfull =array (\"Empereur\",\"Roi\",\"Grand-duc\",\"Archiduc\",\"Duc\",\"Prince\",\"Marquis\",\"Comte\",\"Vicomte\",\"Baron\",\"Chevalier\",\"Écuyer\",\"Seigneur\",\"Dauphin\",\"Monsieur\",\"Banneret\",\"Baronnet\",\"Châtelain\",\"Prince de sang\",\"Premier Empereur\",\"Premier Roi\",\"Premier Grand-duc\",\"Premier Archiduc \",\"Premier Duc \",\"Premier Prince\",\"Premier Marquis\",\"Premier Comte\",\"Premier Vicomte\",\"Premier Baron\",\"Premier Chevalier\",\"Premier Écuyer\",\"Premier Seigneur\",\"Premier Dauphin\",\"Premier Banneret\",\"Premier Baronnet\",\"Premier Prince de sang\",\"Premier Châtelain\",\"Second Empereur\",\"Second Roi\",\"Second Grand-duc\",\"Second Archiduc\",\"Second Duc\",\"Second Prince\",\"Second Marquis\",\"Second Comte\",\"Second Vicomte\",\"Second Baron\",\"Second Chevalier\",\"Second Écuyer\",\"Second Seigneur\",\"Second Dauphin\",\"Second Banneret\",\"Second Baronnet\",\"Second Prince de sang\");\r\n\t$titrenoblessefemfaible =array(\"Duchesse\",\"Marquise\",\"Comtesse\",\"Vicomtesse\",\"Baronne\",\"Dame\",\"Première Duchesse\",\"Première Marquise\",\"Première Comtesse\",\"Première Vicomtesse\",\"Première Baronne\",\"Première Dame\",\"Seconde Duchesse\",\"Seconde Marquise\",\"Seconde Comtesse\",\"Seconde Vicomtesse\",\"Seconde Baronne\",\"Seconde Dame\");\r\n\t$titrenoblessemasfaible =array(\"Marquis\",\"Comte\",\"Vicomte\",\"Baron\",\"Chevalier\",\"Écuyer\",\"Seigneur\",\"Dauphin\",\"Monsieur\",\"Banneret\",\"Baronnet\",\"Châtelain\",\"Premier Marquis\",\"Premier Comte\",\"Premier Vicomte\",\"Premier Baron\",\"Premier Chevalier\",\"Premier Écuyer\",\"Premier Seigneur\",\"Premier Dauphin\",\"Premier Banneret\",\"Premier Baronnet\",\"Premier Châtelain\",\"Second Marquis\",\"Second Comte\",\"Second Vicomte\",\"Second Baron\",\"Second Chevalier\",\"Second Écuyer\",\"Second Seigneur\",\"Second Dauphin\",\"Second Banneret\",\"Second Baronnet\");\r\n\t$noblessemas = array();\r\n\t$noblessefem = array();\r\n\t\r\n\t//type 1 commerce type 2 expert type 3 adpetes 4 nobles)\r\n\t//typevillenum 0 isolée 1 ouverte vers l\\'extérieur 2 cosmopolite \r\n\t\r\n\tswitch ($typevillenum){\r\n\t\tcase 0:\r\n\t\t\t$race=$raceisole;\r\n\t\tbreak;\r\n\t\tcase 1:\r\n\t\t\t$race=$raceouvert;\r\n\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\t$race=$pasorkpasgob;\r\n\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\r\n\t\tbreak;\r\n\t\r\n\t}\r\n\t\r\n\t\r\n\tif ($particu==1) {\r\n\t\tarray_merge($expert,$expertmarin);\r\n\t\tarray_merge($commerce,$commercemarin);\r\n\t}\r\n\t\r\n\tif ($taille<=3) {\r\n\t\t$noblessemas = $titrenoblessemasfaible;\r\n\t\t$noblessefem = $titrenoblessefemfaible;\r\n\t}\r\n\telse {\r\n\t\t$noblessemas = $titrenoblessemasfull;\r\n\t\t$noblessefem = $titrenoblessefemfull;\r\n\t}\r\n\t\r\n\tswitch ($type) {\r\n\t\tcase 1:\r\n\t\t\tif(rand(1,100)>50) {\r\n\t\t\t\t$nom=creerauberge();\r\n\t\t\t\t$sortie='Une auberge portant le nom : '.$nom.'<a href=\"index.php?page=aubergedetail&nom='.urlencode($nom).'\" target=\"_blank\"><i> Détail</i></a>';;\r\n\t\t\t\tcompteur('auberge');\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$sortie=$commerce[rand(0,count($commerce)-1)].' tenu par '.creernomevo($race[rand(0,6)],rand(1,2));\r\n\t\t\t}\r\n\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\t$sortie=$expert[rand(0,count($expert)-1)].' du nom de '.creernomevo($race[rand(0,6)],rand(1,2));\r\n\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\t$sortie=$adepte[rand(0,count($adepte)-1)].' du nom de '.creernomevo($race[rand(0,6)],rand(1,2));\r\n\t\tbreak;\r\n\t\tcase 4:\r\n\t\t\t$sexe=rand(1,2);\r\n\t\t\tif ($sexe==1) $sortie=creernomevo($race[rand(0,5)],$sexe).' '.$noblessemas[rand(0,count($noblessemas)-1)].' de '.creerlieudit(1); \r\n\t\t\telse $sortie=creernomevo($race[rand(0,5)],$sexe).' '.$noblessefem[rand(0,count($noblessefem)-1)].' de '.creerlieudit(1); \r\n\t\tbreak;\r\n\t}\r\n\t\r\n\treturn $sortie;\r\n}", "title": "" }, { "docid": "589385c02792d0e6a41b0c2a5c7dd27d", "score": "0.5222025", "text": "public function automate() {\n $member = new Member();\n $board = Board::filterByName($member->getBoards(), 'Projekt IT')[0];\n $lists = $board->getLists();\n $labels = $board->getLabels();\n $cards = $board->getCards();\n\n // get exact labels for rules\n $supporLabel = Label::filterByName($labels, 'Opieka')[0];\n $warrantyLabel = Label::filterByName($labels, 'Gwarancja')[0];\n // get exact lists for rules\n $backlogList = BoardList::filterByName($lists, 'BACKLOG')[0];\n $todoList = BoardList::filterByName($lists, 'DO ZROBIENIA')[0];\n\n foreach ($cards as $card) {\n // continue loop only if card is in BACKLOG list\n if($card->idList !== $backlogList->id){\n continue;\n }\n\n //setting flags of OPIEKA and GWARANCJA labels\n $labelFlag = false;\n $warrantyFlag = false;\n foreach ($card->idLabels as $label) {\n if($label == $supporLabel->id) {\n $labelFlag = true;\n }\n if($label == $warrantyLabel->id) {\n $warrantyFlag = true;\n }\n }\n\n $name = $card->name;\n $due = $card->due;\n $time = null;\n // parsing data provided in card name, e.g. \"Task number 345 {+2d}\" will set \"due date\" to 2 days from now\n if((strpos($name, \"{\") && strpos($name, \"}\")) && (strpos($name, \"}\") > strpos($name, \"{\"))){\n $timeStart = strpos($name, \"{\") + 1;\n $timeLength = strpos($name, \"}\") - $timeStart;\n $time = substr($name, $timeStart, $timeLength);\n $name = str_replace('{' . $time . '}', '', $name);\n $time = str_replace(['+','d'],'', $time); \n $time = intval($time);\n }\n\n if(($labelFlag || $warrantyFlag) && $due == null && $time == null) {\n $daysOffset = 2;\n $dayOfWeek = intval(date('w'));\n if($dayOfWeek > 3) $daysOffset += 2;\n $due = new DateTime();\n $due = $due->modify(\"+{$daysOffset} days\");\n $due = $due->format(DateTime::ATOM);\n }\n\n if(!$labelFlag && $due == null && $time == null){\n $due = new DateTime();\n $due = $due->modify(\"+14 days\");\n $due = $due->format(DateTime::ATOM);\n }\n\n\n if($due == null && $time != null) {\n $daysOffset = $time;\n $dayOfWeek = intval(date('w'));\n if($dayOfWeek > 3) $daysOffset += 2;\n $due = new DateTime();\n $due = $due->modify(\"+{$daysOffset} days\");\n $due = $due->format(DateTime::ATOM);\n }\n\n // save card to trello\n if($labelFlag || $warrantyFlag){\n Card::makeRequest(\"cards/{$card->id}\", [\n 'name' => $name,\n 'idList' => $todoList->id,\n 'due' => $due\n ], 'PUT');\n } else {\n Card::makeRequest(\"cards/{$card->id}\", [\n 'name' => $name,\n 'due' => $due\n ], 'PUT');\n }\n\n \n \n }\n }", "title": "" }, { "docid": "d5cbbed68237dbf6745c149b233b6308", "score": "0.52137655", "text": "function altaPelicula() {\r\n $tpl = new TemplatePower(\"templates/altaPelicula.html\");\r\n $tpl->prepare();\r\n $tpl->gotoBlock(\"_ROOT\");\r\n $mod = new Pelicula_Model();\r\n $res_d = $mod->listarDirectores();\r\n\r\n if($res_d){\r\n $tpl->gotoBlock(\"_ROOT\");\r\n foreach($res_d as $director){\r\n $tpl->newBlock(\"DIRECTORES\");\r\n $tpl->assign(\"director\",$director['di_nombreArtistico']);\r\n }\r\n }\r\n\r\n $res_g = $mod->listarGeneros();\r\n\r\n if($res_g){\r\n $tpl->gotoBlock(\"_ROOT\");\r\n foreach($res_g as $genero){\r\n $tpl->newBlock(\"GENEROS\");\r\n $tpl->assign(\"genero\",$genero['ge_nombre']);\r\n }\r\n }\r\n\r\n return $tpl->getOutputContent();\r\n }", "title": "" }, { "docid": "84004ccf27a12b435c7637752e8f1d36", "score": "0.5192557", "text": "public function programa(){\n\t\t$crud = $this->new_crud('ProgramaAcademico','Programa');\n\t\t$crud->set_relation('MateriaId','Materia','MateriaNombre',array('LicenciaturaId' => 1));\n\t\t$crud->set_relation('TipoMateriaId','TipoMateria','TipoMateriaNombre');\n\t\t$crud->set_relation('TipoPropCurrId','TipoPropuestaCurricular','TipoPropCurrNombre');\n\t\t$crud->set_relation_n_n(\n\t\t\t'Profesional',\n\t\t\t'ProgAcademicoCompProf',\n\t\t\t'CompProfesional',\n\t\t\t'ProgAcademicoId',\n\t\t\t'CompProfId',\n\t\t\t'CompProfNombre',\n\t\t\t'priority',\n\t\t\tarray('LicenciaturaId' => 1)\n\t\t);\n\t\t$crud->set_relation_n_n(\n\t\t\t'Transversal',\n\t\t\t'ProgAcademicoCompTransv',\n\t\t\t'CompTransversal',\n\t\t\t'ProgAcademicoId',\n\t\t\t'CompTransvId',\n\t\t\t'CompTransvNombre',\n\t\t\t'priority'\n\t\t);\n\n\t\t$crud->display_as('ProgAcademicoSemestre','Semestre')\n\t\t\t->display_as('ProgAcademicoHrsTeoria','Hrs Teoría')\n\t\t\t->display_as('ProgAcademicoHrsPractica','Hrs Práctica')\n\t\t\t->display_as('ProgAcademicoHrsAdicional','Hrs Adicional')\n\t\t\t->display_as('ProgAcademicoCreditos','Créditos')\n\t\t\t->display_as('ProgAcademicoObjGeneral','Objetivo General')\n\t\t\t->display_as('TipoMateriaId','Tipo')\n\t\t\t->display_as('MateriaId','Materia')\n\t\t\t->display_as('TipoPropCurrId','Propuesta')\n\t\t\t->display_as('ProgAcademicoCompartido','Compartido')\n\t\t\t->display_as('ProgAcademicoSeriado','Seriado')\n\t\t\t->display_as('ProgAcademicoVersion','Versión')\n\t\t\t->display_as('Profesional','Competencias Profesionales')\n\t\t\t->display_as('Transversal','Competencias Transversales')\n\t\t\t->display_as('ProgAcademicoId','ID');\n\n\t\t$crud->columns(array(\n\t\t\t'ProgAcademicoId',\n\t\t\t'MateriaId',\n\t\t\t'ProgAcademicoSemestre',\n\t\t\t'ProgAcademicoHrsTeoria',\n\t\t\t'ProgAcademicoHrsPractica',\n\t\t\t'ProgAcademicoCreditos',\n\t\t\t'TipoMateriaId',\n\t\t\t'ProgAcademicoVersion'\n\t\t));\n\n\t\t$this->crud_output( $crud->render() );\n\t}", "title": "" }, { "docid": "e4500532581ba03ed6d54637d1283714", "score": "0.51770014", "text": "public function ratel()\n {\n $this->colegios = array();\n $this->datos = (New Licences)->ratios_licencias();\n }", "title": "" }, { "docid": "3ed41ad19d519274b476e576a36d1fe9", "score": "0.51739025", "text": "function __construct($alfredo, $lasagna, $spaghetti){\n\t\t\t\t$this->alfredo = $alfredo;\n\t\t\t\t$this->lasagna = $lasagna;\n\t\t\t\t$this->spaghetti = $spaghetti;\n\t\t\t\t//$this->cooks = $cooks;\n\t\t\t\t//$this->buys = $buys;\n\t\t\t}", "title": "" }, { "docid": "c97111a25cb2770078ef48d21779c06d", "score": "0.5160658", "text": "public function survey_inference($object){\n $answer = '';\n if($object->ans_1 == 0){\n $answer = $answer.\"<li>Cassava grows best on light sandy loams or on loamy sands which are moist, fertile and deep, but it also does well on soils ranging in texture from the sands to the clays and on soils of relatively low fertility.</li><br>\";\n }\n if($object->ans_2 == 0){\n $answer = $answer. \"<li>Use Land Burning Method for land preparation. By clearing the bush in the selected area using the burning method, you will destroy disease vectors and other parasites present in the soil. In addition, the layer of ashes left after burning may help to increase the quantity of potassium salt in the soil available to the growing plants.</li><br>\";\n }\n // if($object->ans_3 == 0){\n // $answer = $answer. \"<li>Use Land Burning Method for land preparation. By clearing the bush in the selected area using the burning method, you will destroy disease vectors and other parasites present in the soil. In addition, the layer of ashes left after burning may help to increase the quantity of potassium salt in the soil available to the growing plants.</li><br>\";\n // }\n if($object->ans_3 == 0 || $object->ans_4 = 1){\n $answer = $answer. \"<li><b>“March to June”</b> is the best planting season for cassava farmers and seed producers in Nigeria. \n March to June is the long rainy season which occurs. Although some farmers plant cassava in March to June, \n it’s more common for them to plant during the short “October to December” rainy season. \n Research shows that there is a much higher degree of infection by cassava brown streak disease (CBSD) in October to December than in March to June. \n This is why yields are lower in October to December and higher in March to June. <b>During the october-december season, cassava plants are infested by higher numbers of whiteflies leading to more virus transmission and higher CBSD incidence</b></li><br>\";\n }\n if($object->ans_5 == 1){\n $answer = $answer. \"<li>Planting Cassava in dry season isn't advisable. I'll advise you plant during wet season</li><br>\";\n }\n\n if($object->ans_6 == 0 || $object->ans_6 == 1){\n $answer = $answer. \"<li>Ensure you are planting cassava stem cuttings you cut from plants that are up to 8 – 18 months old. Use a sharp machete or cutlass to cut the stem.\n\n Take care not to bruise the buds or otherwise damage the stem.\n \n The cuttings should be about 20-25 cm in length with 5 or more nodes.</li><br>\";\n }\n\n if($object->ans_7 == 0){\n $answer = $answer. \"<li><b>Ridges</b> depends on the availability of planting materials and the fertility of the soil..</li><br>\";\n }\n\n if($object->ans_8 == 0){\n $answer = $answer. \"<li>Ensure stem cutting is not from old cassava plants which might be infected and cause low yield.</li><br>\";\n }\n\n return $answer;\n\n }", "title": "" }, { "docid": "99204ff769ec0df4a30be9f4c8b00f61", "score": "0.51600677", "text": "function __construct($_arraycap,$v_preguntans) {\n \n $l_array=0; //Numeracion de las preguntas y respuestas...\n $_vrules=array(); //Guarda las reglas del modelo como se ve en la funcion rules de un modelo normal\n $_vlabels=array();\n $_vrequires=array();\n $vscenario=array();\n \n \n for($a=0;$a<count($_arraycap);$a++){\n \n $model_indicap = $_arraycap[$a];\n \n /*==================================PARA PREGUNTAS SIN SECCION============================================*/\n if(!empty($v_preguntans[$model_indicap])){\n \n \n foreach ($v_preguntans[$model_indicap] as $clave){\n \n $_bandera=0;\n \n if($clave['obligatorio']=='S' and empty($clave['tipo_agrupacion']) and $clave['id_tpregunta']!='11'){\n $_vrequires[]='rpta'.$l_array;\n $_bandera=1;\n }\n \n if($clave['obligatorio']=='S' and $clave['id_tpregunta']=='11' and empty($clave['id_respuesta'])){\n $_vrequires[]='rpta'.$l_array;\n $_bandera=1;\n }\n\n $v_linea=$this->{\"tipo_\".$clave['id_tpregunta']}($clave,$l_array);\n \n \n if(!empty($v_linea)){\n\n $_vrules[]=$v_linea; //Agregando a vector de reglas -> simula el rules de una clase normal\n $_indicelabels='rpta'.$l_array; //Creando vector de labels -> simula el attibutelabels de una clase normal\n $_vlabels[$_indicelabels]=''; //Nombre vacios dado que se dese colocar al lado y no arriba\n \n }else{\n throwException(\"Error al crear el campo de la respuesta \".$l_array);\n }\n \n if($_bandera == 0){\n $vscenario[]='rpta'.$l_array;\n }\n\n $l_array=$l_array+1; //Conteo para pasar a siguiente respuesta....IMPORTANTE OJO!!\n }\n \n \n }\n }\n \n $this->v_rules = $_vrules;\n $this->v_label = $_vlabels;\n \n \n }", "title": "" }, { "docid": "998b94d9280d78248f36a147d922d082", "score": "0.5154525", "text": "function cs_aide_raccourcis() {\r\n\tglobal $outils;\r\n\t$aide = array();\r\n\tforeach ($outils as $outil) \r\n\t\tif($a = cs_aide_raccourci($outil['id'])) $aide[] = '<li style=\"margin: 0.7em 0 0 0;\">&bull; ' . $a . '</li>';\r\n\tif(!count($aide)) return '';\r\n\t// remplacement des constantes de forme @_CS_XXXX@\r\n\t$aide = preg_replace_callback(',@(_CS_[a-zA-Z0-9_]+)@,', 'cs_aide_raccourcis_callback', join(\"\\n\", $aide));\r\n\treturn '<p><b>' . couteauprive_T('raccourcis') . '</b></p><ul class=\"cs_raccourcis\">' . $aide . '</ul>';\r\n}", "title": "" }, { "docid": "272c8fec4658a1ea361be6d26230c1ef", "score": "0.5152214", "text": "function cs_aide_pipelines($outils_affiches_actifs) {\r\n\tglobal $cs_metas_pipelines, $outils, $metas_outils;\r\n\t$aide = array();\r\n\t$keys = array_keys($cs_metas_pipelines); sort($keys);\r\n\tforeach ($keys as $pipe) {\r\n\t\t// stockage de la liste des pipelines et du nombre d'outils actifs concernes\r\n\t\t$nb=0; foreach($outils as $outil) if($outil['actif'] && (isset($outil['pipeline:'.$pipe]) || isset($outil['pipelinecode:'.$pipe]))) $nb++;\r\n\t\tif(($len=strlen($pipe))>25) $pipe = substr($pipe, 0, 8).'...'.substr($pipe, $len - 14);\r\n\t\tif($nb) $aide[] = couteauprive_T('outil_nb'.($nb>1?'s':''), array('pipe'=>$pipe, 'nb'=>$nb));\r\n\t}\r\n\t// nombre d'outils actifs / interdits par les autorisations (hors versionnage SPIP)\r\n\t$nb = $ca2 = 0; \r\n\tforeach($metas_outils as $o) if(isset($o['actif']) && $o['actif']) $nb++;\r\n\tforeach($outils as $o) if(isset($o['interdit']) && $o['interdit'] && !cs_version_erreur($o)) $ca2++;\r\n\t// nombre d'outils caches de la configuration par l'utilisateur\r\n\t$ca1 = isset($GLOBALS['meta']['tweaks_caches'])?count(unserialize($GLOBALS['meta']['tweaks_caches'])):0;\r\n\treturn '<p><b>' . couteauprive_T('outils_actifs') . \"</b> $nb\"\r\n\t\t. '<br /><b>' . couteauprive_T('outils_caches') . \"</b> $ca1\"\r\n\t\t. (!$ca2?'':('<br /><b>' . couteauprive_T('outils_non_parametrables') . \"</b> $ca2\"))\r\n\t\t.'<br /><b>' . couteauprive_T('pipelines') . '</b> '.count($aide)\r\n\t\t. '</p><p style=\"font-size:80%; line-height: 1.4em;\">' . join(\"<br />\", $aide) . '</p>';\r\n}", "title": "" }, { "docid": "e08329f016bf8a5a5aacfd6a083e38f9", "score": "0.5149611", "text": "function lorify($paranum, $parasize){\n$wordlen = array(2,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,6,7,8);\n$wlarraysize = sizeof($wordlen);\n\n//populate $letarray with range of alphabet characters and extras\n$letarray = array_merge(range('a', 'z'), array(\"a\",\"e\",\"eo\",\"i\",\"o\",\"u\"));\n$letarraysize = sizeof($letarray);\n\n// clean user input\npreg_replace('/[^a-zA-Z0-9\\s]/', '', $paranum); // 3 Nov 2015\n\n// for number of paras in paranum\nfor ( $p = 1; $p <= $paranum; $p++){ \t\t\t\t// for each para p\n\t// build para, with number of words set by $parasize\n\t$thispara = \"\";\n\tfor ( $w = 1; $w <= $parasize; $w++){ \t\t\t// for each word w\n\t\t// get word length at random from $wordlen array\n\t\t$randlen = rand(0,$wlarraysize-1);\n\t\t$thiswordlen = $wordlen[$randlen];\n\t\t// build word of random length and characters\n\t\t$randword = \"\";\n\t\tfor ( $c = 1; $c <= $thiswordlen; $c++){ \t// for each letter c\n\t\t\t// get a random character from $letarray and append to word\n\t\t\t$index = rand(0,$letarraysize-1);\n\t\t\t$randlet = $letarray[$index];\n\t\t\t$randword = $randword . $randlet;\n\t\t}\n\n\t\t// append word to paragraph\t\n\t\t$thispara = $thispara . \" \" . $randword;\n\t}\n\n\t// format each para\n\t$thispara = trim($thispara); \t\t\t// remove whitespace\n\t$thispara = ucfirst($thispara); \t\t// capitalize first letter\n\t// $thispara = strtoupper($thispara);\t// uppercase everything\n\n\tif ($paranum === 1) { echo strtoupper($thispara); } // if just one sentence, uppercase it as TITLE\n\telse { echo \"\\n\". $thispara . \".\\n\"; } // otherwise, write out sentence w closing period & whitespace. \n\n} // end outer for loop\n}", "title": "" }, { "docid": "3cbf6ec7c7c51d8a05a4a5a6fdb005ed", "score": "0.51264554", "text": "function risk_proposed() {\n \n }", "title": "" }, { "docid": "885d51ce56c0c7ce8bbb519d0748f41e", "score": "0.51252824", "text": "function __construct($_arraycap,$v_preguntans,$r_secciones,$v_preguntass) {\n\n $l_array=0; //Numeracion de las preguntas y respuestas...\n $_vrules=array(); //Guarda las reglas del modelo como se ve en la funcion rules de un modelo normal\n $_vlabels=array();\n $_vrequires=array();\n $_vrequires2=array();\n $vscenario=array();\n\t//$_arraysRpta=array();\n\t\n\n\n for($a=0;$a<count($_arraycap);$a++){\n\n $model_indicap = $_arraycap[$a];\n\n /*==================================PARA PREGUNTAS SIN SECCION============================================*/\n if(!empty($v_preguntans[$model_indicap])){\n\n\n foreach ($v_preguntans[$model_indicap] as $clave){\n \n \n\n $_bandera=0;\n\t\t\t\t\t\n\t\t\t\t\t\n /*Almacenar en vector id de pregunta BDD asociado al array de los campos que se construyen en el formulario*/\n\t\t $_arraysRpta[$clave['id_pregunta']] = $l_array;\n \n if($clave['caracteristica_preg']=='S' and $clave['obligatorio']=='S'){\n\n if(empty($clave['tipo_agrupacion']) and $clave['id_tpregunta']!='11'){\n $_vrequires[]='rpta'.$l_array;\n $_bandera=1;\n }\n\n if($clave['id_tpregunta']=='11' and empty($clave['id_respuesta'])){\n $_vrequires2[]='rpta'.$l_array;\n $_bandera=1;\n }\n\n }else if($clave['caracteristica_preg']=='M' and $clave['obligatorio']=='S'){\n\n\n //Averiguando si la pregunta tiene respuestas ===========================================================\n if(empty($clave['id_respuesta'])){\n $_vrequires[]='rpta'.$l_array;\n $_bandera=1;\n }\n }\n\n $v_linea=$this->{\"tipo_\".$clave['id_tpregunta']}($clave,$l_array);\n\n\n if(!empty($v_linea)){\n\n $_vrules[]=$v_linea; //Agregando a vector de reglas -> simula el rules de una clase normal\n $_indicelabels='rpta'.$l_array; //Creando vector de labels -> simula el attibutelabels de una clase normal\n $_vlabels[$_indicelabels]=''; //Nombre vacios dado que se dese colocar al lado y no arriba\n\n }\n\n if($_bandera == 0){\n $vscenario[]='rpta'.$l_array;\n }\n\t\t\t\t \n\t\t\t\t \t//Modificacion para las preguntas tipo 5 que tiene como atributo una sumatoria\n\t\t\t\t\t //Fecha:2019-03-14, si existe otro tipo de validacion especial se agrega aqui =================================================\n if(!empty($clave['atributos']) and $clave['id_tpregunta']=='5'){\t//Cambio aplicado para sumatorias\n\t\t\t$_dataAtributos[]=$clave['atributos'];\n\t\t }\n\n $l_array=$l_array+1; //Conteo para pasar a siguiente respuesta....IMPORTANTE OJO!!\n }\n\n\n }\n\n /*==================================PARA PREGUNTAS CON SECCION============================================*/\n\n if(!empty($r_secciones[$model_indicap])){\n\n foreach($r_secciones[$model_indicap] as $_clasesec){\n\n $_indicesec=$_clasesec['id_seccion'];\n\n if(!empty($v_preguntass[$model_indicap][$_indicesec])){\n\n\n foreach($v_preguntass[$model_indicap][$_indicesec] as $_clasepreg){\n\n $_bandera=0;\n\t\t\t\t$_arraysRpta[$_clasepreg['id_pregunta']] = $l_array;\n \n if($_clasepreg['caracteristica_preg']=='S' and $_clasepreg['obligatorio']=='S'){\n\n if(empty($_clasepreg['tipo_agrupacion']) and $_clasepreg['id_tpregunta']!='11'){\n $_vrequires[]='rpta'.$l_array;\n $_bandera=1;\n }\n\n if($_clasepreg['id_tpregunta']=='11' and empty($_clasepreg['id_respuesta'])){\n $_vrequires2[]='rpta'.$l_array;\n $_bandera=1;\n }\n\n }else if($_clasepreg['caracteristica_preg']=='M' and $_clasepreg['obligatorio']=='S'){\n\n //Averiguando si la pregunta tiene respuestas ===========================================================\n if(empty($_clasepreg['id_respuesta'])){\n $_vrequires[]='rpta'.$l_array;\n $_bandera=1;\n }\n }\n\n\n $v_linea=$this->{\"tipo_\".$_clasepreg['id_tpregunta']}($_clasepreg,$l_array);\n\n if(!empty($v_linea)){\n\n $_vrules[]=$v_linea; //Agregando a vector de reglas -> simula la funcion rules de un modelo comun\n $_indicelabels='rpta'.$l_array; //Creando vector de labels -> simula la funcion attributelabels de un modelo comun\n $_vlabels[$_indicelabels]=''; //Nombre vacios dado que se dese colocar al lado y no arriba\n\n }\n\n if($_bandera == 0){\n $vscenario[]='rpta'.$l_array;\n }\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//Modificacion para las preguntas tipo 5 que tiene como atributo una sumatoria\n\t\t\t\t\t\t\t //Fecha:2019-03-14, si existe otro tipo de validacion especial se agrega aqui =================================================\n\t\t\t\t\t\t\t \n\t\t\t\tif(!empty($_clasepreg['atributos']) and ($_clasepreg['id_tpregunta']=='5' or $_clasepreg['id_tpregunta']=='8' or $_clasepreg['id_tpregunta']=='6')){\t\t\t//Cambio aplicado para sumatorias\n $_dataAtributos[]=$_clasepreg['atributos'];\n\t\t\t\t}\n\n\n $l_array=$l_array+1; //Conteo para pasar a siguiente respuesta....IMPORTANTE OJO!!\n }\n }\n\n }\n\n }\n\n }\n\n\n //Requeridos para otros diferentes a 11 ===================================================================================\n $_vrules[]=[$_vrequires,'required','message' => 'Campo requerido','when' => function ($model) {\n return $model->hidden1 == '1';\n }, 'whenClient' => \"function (attribute, value) {\n return $('#detcapitulo-hidden1').val() == '1';\n }\"];\n \n //Requeridos para 11 ====================================================================================================\n $_vrules[]=[$_vrequires2, 'required', 'message' => 'Se necesita un archivo.', 'when' => function($model) {\n //return ($model->rpta23) ? 0:1;\n return $model->hidden1 == '1';\n }, 'whenClient' => \"function (attribute, value) {\n return $('#detcapitulo-hidden1').val() == '1';\n }\"];\n\n\t//Funciones que se leen desde la base de datos en la columna atributos para crear nuevas reglas\n if(!empty($_dataAtributos)){\n $_vrulesattrb = $this->atributosEspeciales($_dataAtributos,$_arraysRpta);\n if(!empty($_vrulesattrb))\n {\n foreach($_vrulesattrb as $_clvrulesAtrb){\n $_vrules[]=$_clvrulesAtrb;\n }\n }\n }\n\t\t\n\t\t//$_vrules[]=['rpta24',sumnumber::className(),'params'=>['sumandos'=>'24+25','resultado'=>'23','mensajeVis'=>'Hola que carajos pasa']]; Ejemplo de lo que estoy enviando\n\t\t//==========================================================================================================================\n\t\t\n $this->v_rules = $_vrules;\n $this->v_label = $_vlabels;\n\n }", "title": "" }, { "docid": "2fa8c9430cf118fe608392db9c79383e", "score": "0.51202524", "text": "public function testEvaluation()\n {\n $this->exam->getEvaluation();\n }", "title": "" }, { "docid": "fb8bb4e13ab7be8523e070ff03ac6d3b", "score": "0.51188886", "text": "function test_territories() {\n test_territory(\"AAA\", 533, 0, 0, 0);\n test_territory(\"AB\", 396, 0, 0, 496);\n test_territory(\"ABW\", 26, 0, 0, 0);\n test_territory(\"AC\", 328, 0, 0, 410);\n test_territory(\"ACT\", 309, 0, 0, 409);\n test_territory(\"AD\", 417, 0, 0, 497);\n test_territory(\"AFG\", 207, 0, 0, 0);\n test_territory(\"AG\", 237, 1, 0, 412);\n test_territory(\"AGO\", 225, 0, 0, 0);\n test_territory(\"AGU\", 237, 0, 0, 412);\n test_territory(\"AH\", 507, 0, 0, 529);\n test_territory(\"AIA\", 19, 0, 0, 0);\n test_territory(\"AK\", 394, 0, 0, 411);\n test_territory(\"AL\", 483, 0, 1, 497);\n test_territory(\"AL\", 365, 0, 1, 411);\n test_territory(\"AL\", 319, 0, 1, 410);\n test_territory(\"ALA\", 199, 0, 0, 0);\n test_territory(\"ALB\", 103, 0, 0, 0);\n test_territory(\"ALT\", 484, 0, 0, 497);\n test_territory(\"AM\", 343, 0, 0, 410);\n test_territory(\"AMU\", 494, 0, 0, 497);\n test_territory(\"AN\", 275, 0, 0, 408);\n test_territory(\"AND\", 50, 0, 0, 0);\n test_territory(\"AP\", 326, 0, 1, 410);\n test_territory(\"AP\", 304, 0, 1, 408);\n test_territory(\"AR\", 366, 0, 1, 411);\n test_territory(\"AR\", 286, 0, 1, 408);\n test_territory(\"ARE\", 131, 0, 0, 0);\n test_territory(\"ARG\", 271, 0, 0, 0);\n test_territory(\"ARK\", 455, 0, 0, 497);\n test_territory(\"ARM\", 105, 0, 0, 0);\n test_territory(\"AS\", 287, 0, 1, 408);\n test_territory(\"AS\", 28, 1, 1, 411);\n test_territory(\"ASC\", 36, 1, 0, 0);\n test_territory(\"ASM\", 28, 0, 0, 0);\n test_territory(\"AST\", 435, 0, 0, 497);\n test_territory(\"ATA\", 532, 0, 0, 0);\n test_territory(\"ATF\", 76, 0, 0, 0);\n test_territory(\"ATG\", 45, 0, 0, 0);\n test_territory(\"AU\", 409, 1, 0, 0);\n test_territory(\"AU-ACT\", 309, 0, 0, 409);\n test_territory(\"AU-CC\", 5, 1, 0, 409);\n test_territory(\"AU-CX\", 22, 1, 0, 409);\n test_territory(\"AU-HM\", 43, 1, 0, 409);\n test_territory(\"AU-JBT\", 310, 0, 0, 409);\n test_territory(\"AU-NF\", 12, 1, 0, 409);\n test_territory(\"AU-NSW\", 308, 0, 0, 409);\n test_territory(\"AU-NT\", 311, 0, 0, 409);\n test_territory(\"AU-QLD\", 316, 0, 0, 409);\n test_territory(\"AU-SA\", 312, 0, 0, 409);\n test_territory(\"AU-TAS\", 313, 0, 0, 409);\n test_territory(\"AU-VIC\", 314, 0, 0, 409);\n test_territory(\"AU-WA\", 315, 0, 0, 409);\n test_territory(\"AUS\", 409, 0, 0, 0);\n test_territory(\"AUS-ACT\", 309, 0, 0, 409);\n test_territory(\"AUS-CC\", 5, 1, 0, 409);\n test_territory(\"AUS-CX\", 22, 1, 0, 409);\n test_territory(\"AUS-HM\", 43, 1, 0, 409);\n test_territory(\"AUS-JBT\", 310, 0, 0, 409);\n test_territory(\"AUS-NF\", 12, 1, 0, 409);\n test_territory(\"AUS-NSW\", 308, 0, 0, 409);\n test_territory(\"AUS-NT\", 311, 0, 0, 409);\n test_territory(\"AUS-QLD\", 316, 0, 0, 409);\n test_territory(\"AUS-SA\", 312, 0, 0, 409);\n test_territory(\"AUS-TAS\", 313, 0, 0, 409);\n test_territory(\"AUS-VIC\", 314, 0, 0, 409);\n test_territory(\"AUS-WA\", 315, 0, 0, 409);\n test_territory(\"AUT\", 132, 0, 0, 0);\n test_territory(\"AZ\", 389, 0, 0, 411);\n test_territory(\"AZE\", 133, 0, 0, 0);\n test_territory(\"BA\", 464, 0, 1, 497);\n test_territory(\"BA\", 339, 0, 1, 410);\n test_territory(\"BC\", 395, 0, 1, 496);\n test_territory(\"BC\", 254, 1, 1, 412);\n test_territory(\"BCN\", 254, 0, 0, 412);\n test_territory(\"BCS\", 257, 0, 0, 412);\n test_territory(\"BDI\", 101, 0, 0, 0);\n test_territory(\"BE\", 427, 0, 0, 497);\n test_territory(\"BEL\", 107, 0, 0, 0);\n test_territory(\"BEN\", 145, 0, 0, 0);\n test_territory(\"BES\", 34, 0, 0, 0);\n test_territory(\"BFA\", 173, 0, 0, 0);\n test_territory(\"BGD\", 152, 0, 0, 0);\n test_territory(\"BGR\", 142, 0, 0, 0);\n test_territory(\"BHR\", 58, 0, 0, 0);\n test_territory(\"BHS\", 86, 0, 0, 0);\n test_territory(\"BIH\", 119, 0, 0, 0);\n test_territory(\"BJ\", 500, 0, 0, 529);\n test_territory(\"BLM\", 6, 0, 0, 0);\n test_territory(\"BLR\", 161, 0, 0, 0);\n test_territory(\"BLZ\", 96, 0, 0, 0);\n test_territory(\"BMU\", 15, 0, 0, 0);\n test_territory(\"BOL\", 220, 0, 0, 0);\n test_territory(\"BR\", 288, 0, 0, 408);\n test_territory(\"BR-AC\", 328, 0, 0, 410);\n test_territory(\"BR-AL\", 319, 0, 0, 410);\n test_territory(\"BR-AM\", 343, 0, 0, 410);\n test_territory(\"BR-AP\", 326, 0, 0, 410);\n test_territory(\"BR-BA\", 339, 0, 0, 410);\n test_territory(\"BR-CE\", 327, 0, 0, 410);\n test_territory(\"BR-DF\", 317, 0, 0, 410);\n test_territory(\"BR-ES\", 321, 0, 0, 410);\n test_territory(\"BR-GO\", 337, 0, 0, 410);\n test_territory(\"BR-MA\", 336, 0, 0, 410);\n test_territory(\"BR-MG\", 340, 0, 0, 410);\n test_territory(\"BR-MS\", 338, 0, 0, 410);\n test_territory(\"BR-MT\", 341, 0, 0, 410);\n test_territory(\"BR-PA\", 342, 0, 0, 410);\n test_territory(\"BR-PB\", 323, 0, 0, 410);\n test_territory(\"BR-PE\", 325, 0, 0, 410);\n test_territory(\"BR-PI\", 333, 0, 0, 410);\n test_territory(\"BR-PR\", 329, 0, 0, 410);\n test_territory(\"BR-RJ\", 320, 0, 0, 410);\n test_territory(\"BR-RN\", 322, 0, 0, 410);\n test_territory(\"BR-RO\", 331, 0, 0, 410);\n test_territory(\"BR-RR\", 330, 0, 0, 410);\n test_territory(\"BR-RS\", 335, 0, 0, 410);\n test_territory(\"BR-SC\", 324, 0, 0, 410);\n test_territory(\"BR-SE\", 318, 0, 0, 410);\n test_territory(\"BR-SP\", 332, 0, 0, 410);\n test_territory(\"BR-TO\", 334, 0, 0, 410);\n test_territory(\"BRA\", 410, 0, 0, 0);\n test_territory(\"BRA-AC\", 328, 0, 0, 410);\n test_territory(\"BRA-AL\", 319, 0, 0, 410);\n test_territory(\"BRA-AM\", 343, 0, 0, 410);\n test_territory(\"BRA-AP\", 326, 0, 0, 410);\n test_territory(\"BRA-BA\", 339, 0, 0, 410);\n test_territory(\"BRA-CE\", 327, 0, 0, 410);\n test_territory(\"BRA-DF\", 317, 0, 0, 410);\n test_territory(\"BRA-ES\", 321, 0, 0, 410);\n test_territory(\"BRA-GO\", 337, 0, 0, 410);\n test_territory(\"BRA-MA\", 336, 0, 0, 410);\n test_territory(\"BRA-MG\", 340, 0, 0, 410);\n test_territory(\"BRA-MS\", 338, 0, 0, 410);\n test_territory(\"BRA-MT\", 341, 0, 0, 410);\n test_territory(\"BRA-PA\", 342, 0, 0, 410);\n test_territory(\"BRA-PB\", 323, 0, 0, 410);\n test_territory(\"BRA-PE\", 325, 0, 0, 410);\n test_territory(\"BRA-PI\", 333, 0, 0, 410);\n test_territory(\"BRA-PR\", 329, 0, 0, 410);\n test_territory(\"BRA-RJ\", 320, 0, 0, 410);\n test_territory(\"BRA-RN\", 322, 0, 0, 410);\n test_territory(\"BRA-RO\", 331, 0, 0, 410);\n test_territory(\"BRA-RR\", 330, 0, 0, 410);\n test_territory(\"BRA-RS\", 335, 0, 0, 410);\n test_territory(\"BRA-SC\", 324, 0, 0, 410);\n test_territory(\"BRA-SE\", 318, 0, 0, 410);\n test_territory(\"BRA-SP\", 332, 0, 0, 410);\n test_territory(\"BRA-TO\", 334, 0, 0, 410);\n test_territory(\"BRB\", 44, 0, 0, 0);\n test_territory(\"BRN\", 75, 0, 0, 0);\n test_territory(\"BRY\", 432, 0, 0, 497);\n test_territory(\"BS\", 257, 1, 0, 412);\n test_territory(\"BTN\", 111, 0, 0, 0);\n test_territory(\"BU\", 475, 0, 0, 497);\n test_territory(\"BVT\", 14, 0, 0, 0);\n test_territory(\"BWA\", 201, 0, 0, 0);\n test_territory(\"CA\", 392, 0, 0, 411);\n test_territory(\"CA-AB\", 396, 0, 0, 496);\n test_territory(\"CA-BC\", 395, 0, 0, 496);\n test_territory(\"CA-MB\", 400, 0, 0, 496);\n test_territory(\"CA-NB\", 402, 0, 0, 496);\n test_territory(\"CA-NL\", 401, 0, 0, 496);\n test_territory(\"CA-NS\", 403, 0, 0, 496);\n test_territory(\"CA-NT\", 406, 0, 0, 496);\n test_territory(\"CA-NU\", 407, 0, 0, 496);\n test_territory(\"CA-ON\", 397, 0, 0, 496);\n test_territory(\"CA-PE\", 404, 0, 0, 496);\n test_territory(\"CA-QC\", 398, 0, 0, 496);\n test_territory(\"CA-SK\", 399, 0, 0, 496);\n test_territory(\"CA-YT\", 405, 0, 0, 496);\n test_territory(\"CAF\", 205, 0, 0, 0);\n test_territory(\"CAM\", 249, 0, 0, 412);\n test_territory(\"CAN\", 496, 0, 0, 0);\n test_territory(\"CAN-AB\", 396, 0, 0, 496);\n test_territory(\"CAN-BC\", 395, 0, 0, 496);\n test_territory(\"CAN-MB\", 400, 0, 0, 496);\n test_territory(\"CAN-NB\", 402, 0, 0, 496);\n test_territory(\"CAN-NL\", 401, 0, 0, 496);\n test_territory(\"CAN-NS\", 403, 0, 0, 496);\n test_territory(\"CAN-NT\", 406, 0, 0, 496);\n test_territory(\"CAN-NU\", 407, 0, 0, 496);\n test_territory(\"CAN-ON\", 397, 0, 0, 496);\n test_territory(\"CAN-PE\", 404, 0, 0, 496);\n test_territory(\"CAN-QC\", 398, 0, 0, 496);\n test_territory(\"CAN-SK\", 399, 0, 0, 496);\n test_territory(\"CAN-YT\", 405, 0, 0, 496);\n test_territory(\"CC\", 5, 1, 0, 409);\n test_territory(\"CCK\", 5, 0, 0, 0);\n test_territory(\"CE\", 421, 0, 1, 497);\n test_territory(\"CE\", 327, 0, 1, 410);\n test_territory(\"CG\", 295, 1, 0, 408);\n test_territory(\"CH\", 474, 0, 1, 497);\n test_territory(\"CH\", 274, 0, 1, 408);\n test_territory(\"CH\", 265, 1, 1, 412);\n test_territory(\"CHE\", 112, 0, 0, 0);\n test_territory(\"CHH\", 265, 0, 0, 412);\n test_territory(\"CHL\", 210, 0, 0, 0);\n test_territory(\"CHN\", 529, 0, 0, 0);\n test_territory(\"CHN-11\", 500, 1, 0, 529);\n test_territory(\"CHN-12\", 499, 1, 0, 529);\n test_territory(\"CHN-13\", 517, 1, 0, 529);\n test_territory(\"CHN-14\", 510, 1, 0, 529);\n test_territory(\"CHN-15\", 519, 1, 0, 529);\n test_territory(\"CHN-21\", 508, 1, 0, 529);\n test_territory(\"CHN-22\", 516, 1, 0, 529);\n test_territory(\"CHN-23\", 520, 1, 0, 529);\n test_territory(\"CHN-31\", 498, 1, 0, 529);\n test_territory(\"CHN-32\", 505, 1, 0, 529);\n test_territory(\"CHN-33\", 504, 1, 0, 529);\n test_territory(\"CHN-34\", 507, 1, 0, 529);\n test_territory(\"CHN-35\", 506, 1, 0, 529);\n test_territory(\"CHN-36\", 511, 1, 0, 529);\n test_territory(\"CHN-37\", 509, 1, 0, 529);\n test_territory(\"CHN-41\", 512, 1, 0, 529);\n test_territory(\"CHN-42\", 515, 1, 0, 529);\n test_territory(\"CHN-43\", 521, 1, 0, 529);\n test_territory(\"CHN-44\", 514, 1, 0, 529);\n test_territory(\"CHN-45\", 522, 1, 0, 529);\n test_territory(\"CHN-46\", 501, 1, 0, 529);\n test_territory(\"CHN-50\", 503, 1, 0, 529);\n test_territory(\"CHN-51\", 523, 1, 0, 529);\n test_territory(\"CHN-52\", 513, 1, 0, 529);\n test_territory(\"CHN-53\", 524, 1, 0, 529);\n test_territory(\"CHN-54\", 525, 1, 0, 529);\n test_territory(\"CHN-61\", 518, 1, 0, 529);\n test_territory(\"CHN-62\", 526, 1, 0, 529);\n test_territory(\"CHN-63\", 527, 1, 0, 529);\n test_territory(\"CHN-64\", 502, 1, 0, 529);\n test_territory(\"CHN-65\", 528, 1, 0, 529);\n test_territory(\"CHN-71\", 110, 1, 0, 529);\n test_territory(\"CHN-91\", 62, 1, 0, 529);\n test_territory(\"CHN-92\", 9, 1, 0, 529);\n test_territory(\"CHN-AH\", 507, 0, 0, 529);\n test_territory(\"CHN-BJ\", 500, 0, 0, 529);\n test_territory(\"CHN-CQ\", 503, 0, 0, 529);\n test_territory(\"CHN-FJ\", 506, 0, 0, 529);\n test_territory(\"CHN-GD\", 514, 0, 0, 529);\n test_territory(\"CHN-GS\", 526, 0, 0, 529);\n test_territory(\"CHN-GX\", 522, 0, 0, 529);\n test_territory(\"CHN-GZ\", 513, 0, 0, 529);\n test_territory(\"CHN-HA\", 512, 0, 0, 529);\n test_territory(\"CHN-HB\", 515, 0, 0, 529);\n test_territory(\"CHN-HE\", 517, 0, 0, 529);\n test_territory(\"CHN-HI\", 501, 0, 0, 529);\n test_territory(\"CHN-HK\", 62, 1, 0, 529);\n test_territory(\"CHN-HL\", 520, 0, 0, 529);\n test_territory(\"CHN-HN\", 521, 0, 0, 529);\n test_territory(\"CHN-JL\", 516, 0, 0, 529);\n test_territory(\"CHN-JS\", 505, 0, 0, 529);\n test_territory(\"CHN-JX\", 511, 0, 0, 529);\n test_territory(\"CHN-LN\", 508, 0, 0, 529);\n test_territory(\"CHN-MC\", 9, 1, 0, 529);\n test_territory(\"CHN-NM\", 519, 0, 0, 529);\n test_territory(\"CHN-NX\", 502, 0, 0, 529);\n test_territory(\"CHN-QH\", 527, 0, 0, 529);\n test_territory(\"CHN-SC\", 523, 0, 0, 529);\n test_territory(\"CHN-SD\", 509, 0, 0, 529);\n test_territory(\"CHN-SH\", 498, 0, 0, 529);\n test_territory(\"CHN-SN\", 518, 0, 0, 529);\n test_territory(\"CHN-SX\", 510, 0, 0, 529);\n test_territory(\"CHN-TJ\", 499, 0, 0, 529);\n test_territory(\"CHN-TW\", 110, 1, 0, 529);\n test_territory(\"CHN-XJ\", 528, 0, 0, 529);\n test_territory(\"CHN-XZ\", 525, 0, 0, 529);\n test_territory(\"CHN-YN\", 524, 0, 0, 529);\n test_territory(\"CHN-ZJ\", 504, 0, 0, 529);\n test_territory(\"CHP\", 256, 0, 0, 412);\n test_territory(\"CHU\", 488, 0, 0, 497);\n test_territory(\"CIV\", 178, 0, 0, 0);\n test_territory(\"CL\", 238, 0, 0, 412);\n test_territory(\"CM\", 249, 1, 0, 412);\n test_territory(\"CMR\", 193, 0, 0, 0);\n test_territory(\"CN\", 529, 1, 0, 0);\n test_territory(\"CN-11\", 500, 1, 0, 529);\n test_territory(\"CN-12\", 499, 1, 0, 529);\n test_territory(\"CN-13\", 517, 1, 0, 529);\n test_territory(\"CN-14\", 510, 1, 0, 529);\n test_territory(\"CN-15\", 519, 1, 0, 529);\n test_territory(\"CN-21\", 508, 1, 0, 529);\n test_territory(\"CN-22\", 516, 1, 0, 529);\n test_territory(\"CN-23\", 520, 1, 0, 529);\n test_territory(\"CN-31\", 498, 1, 0, 529);\n test_territory(\"CN-32\", 505, 1, 0, 529);\n test_territory(\"CN-33\", 504, 1, 0, 529);\n test_territory(\"CN-34\", 507, 1, 0, 529);\n test_territory(\"CN-35\", 506, 1, 0, 529);\n test_territory(\"CN-36\", 511, 1, 0, 529);\n test_territory(\"CN-37\", 509, 1, 0, 529);\n test_territory(\"CN-41\", 512, 1, 0, 529);\n test_territory(\"CN-42\", 515, 1, 0, 529);\n test_territory(\"CN-43\", 521, 1, 0, 529);\n test_territory(\"CN-44\", 514, 1, 0, 529);\n test_territory(\"CN-45\", 522, 1, 0, 529);\n test_territory(\"CN-46\", 501, 1, 0, 529);\n test_territory(\"CN-50\", 503, 1, 0, 529);\n test_territory(\"CN-51\", 523, 1, 0, 529);\n test_territory(\"CN-52\", 513, 1, 0, 529);\n test_territory(\"CN-53\", 524, 1, 0, 529);\n test_territory(\"CN-54\", 525, 1, 0, 529);\n test_territory(\"CN-61\", 518, 1, 0, 529);\n test_territory(\"CN-62\", 526, 1, 0, 529);\n test_territory(\"CN-63\", 527, 1, 0, 529);\n test_territory(\"CN-64\", 502, 1, 0, 529);\n test_territory(\"CN-65\", 528, 1, 0, 529);\n test_territory(\"CN-71\", 110, 1, 0, 529);\n test_territory(\"CN-91\", 62, 1, 0, 529);\n test_territory(\"CN-92\", 9, 1, 0, 529);\n test_territory(\"CN-AH\", 507, 0, 0, 529);\n test_territory(\"CN-BJ\", 500, 0, 0, 529);\n test_territory(\"CN-CQ\", 503, 0, 0, 529);\n test_territory(\"CN-FJ\", 506, 0, 0, 529);\n test_territory(\"CN-GD\", 514, 0, 0, 529);\n test_territory(\"CN-GS\", 526, 0, 0, 529);\n test_territory(\"CN-GX\", 522, 0, 0, 529);\n test_territory(\"CN-GZ\", 513, 0, 0, 529);\n test_territory(\"CN-HA\", 512, 0, 0, 529);\n test_territory(\"CN-HB\", 515, 0, 0, 529);\n test_territory(\"CN-HE\", 517, 0, 0, 529);\n test_territory(\"CN-HI\", 501, 0, 0, 529);\n test_territory(\"CN-HK\", 62, 1, 0, 529);\n test_territory(\"CN-HL\", 520, 0, 0, 529);\n test_territory(\"CN-HN\", 521, 0, 0, 529);\n test_territory(\"CN-JL\", 516, 0, 0, 529);\n test_territory(\"CN-JS\", 505, 0, 0, 529);\n test_territory(\"CN-JX\", 511, 0, 0, 529);\n test_territory(\"CN-LN\", 508, 0, 0, 529);\n test_territory(\"CN-MC\", 9, 1, 0, 529);\n test_territory(\"CN-NM\", 519, 0, 0, 529);\n test_territory(\"CN-NX\", 502, 0, 0, 529);\n test_territory(\"CN-QH\", 527, 0, 0, 529);\n test_territory(\"CN-SC\", 523, 0, 0, 529);\n test_territory(\"CN-SD\", 509, 0, 0, 529);\n test_territory(\"CN-SH\", 498, 0, 0, 529);\n test_territory(\"CN-SN\", 518, 0, 0, 529);\n test_territory(\"CN-SX\", 510, 0, 0, 529);\n test_territory(\"CN-TJ\", 499, 0, 0, 529);\n test_territory(\"CN-TW\", 110, 1, 0, 529);\n test_territory(\"CN-XJ\", 528, 0, 0, 529);\n test_territory(\"CN-XZ\", 525, 0, 0, 529);\n test_territory(\"CN-YN\", 524, 0, 0, 529);\n test_territory(\"CN-ZJ\", 504, 0, 0, 529);\n test_territory(\"CO\", 387, 0, 1, 411);\n test_territory(\"CO\", 263, 1, 1, 412);\n test_territory(\"COA\", 263, 0, 0, 412);\n test_territory(\"COD\", 268, 0, 0, 0);\n test_territory(\"COG\", 183, 0, 0, 0);\n test_territory(\"COK\", 29, 0, 0, 0);\n test_territory(\"COL\", 222, 0, 0, 0);\n test_territory(\"COM\", 66, 0, 0, 0);\n test_territory(\"CPT\", 531, 0, 0, 0);\n test_territory(\"CPV\", 73, 0, 0, 0);\n test_territory(\"CQ\", 503, 0, 0, 529);\n test_territory(\"CRI\", 118, 0, 0, 0);\n test_territory(\"CS\", 256, 1, 0, 412);\n test_territory(\"CT\", 347, 0, 1, 411);\n test_territory(\"CT\", 295, 0, 1, 408);\n test_territory(\"CU\", 422, 0, 0, 497);\n test_territory(\"CUB\", 141, 0, 0, 0);\n test_territory(\"CUW\", 46, 0, 0, 0);\n test_territory(\"CX\", 22, 1, 0, 409);\n test_territory(\"CXR\", 22, 0, 0, 0);\n test_territory(\"CYM\", 33, 0, 0, 0);\n test_territory(\"CYP\", 78, 0, 0, 0);\n test_territory(\"CZE\", 129, 0, 0, 0);\n test_territory(\"DA\", 438, 0, 0, 497);\n test_territory(\"DC\", 344, 0, 0, 411);\n test_territory(\"DD\", 272, 0, 0, 408);\n test_territory(\"DE\", 346, 0, 0, 411);\n test_territory(\"DEU\", 184, 0, 0, 0);\n test_territory(\"DF\", 317, 0, 1, 410);\n test_territory(\"DF\", 234, 1, 1, 412);\n test_territory(\"DG\", 262, 1, 0, 412);\n test_territory(\"DGA\", 16, 1, 0, 0);\n test_territory(\"DIF\", 234, 0, 0, 412);\n test_territory(\"DJI\", 97, 0, 0, 0);\n test_territory(\"DL\", 277, 0, 0, 408);\n test_territory(\"DMA\", 57, 0, 0, 0);\n test_territory(\"DN\", 273, 0, 0, 408);\n test_territory(\"DNK\", 114, 0, 0, 0);\n test_territory(\"DOM\", 116, 0, 0, 0);\n test_territory(\"DUR\", 262, 0, 0, 412);\n test_territory(\"DZA\", 269, 0, 0, 0);\n test_territory(\"ECU\", 169, 0, 0, 0);\n test_territory(\"EGY\", 218, 0, 0, 0);\n test_territory(\"ERI\", 146, 0, 0, 0);\n test_territory(\"ES\", 321, 0, 0, 410);\n test_territory(\"ESH\", 170, 0, 0, 0);\n test_territory(\"ESP\", 195, 0, 0, 0);\n test_territory(\"EST\", 115, 0, 0, 0);\n test_territory(\"ETH\", 221, 0, 0, 0);\n test_territory(\"FIN\", 182, 0, 0, 0);\n test_territory(\"FJ\", 506, 0, 0, 529);\n test_territory(\"FJI\", 90, 0, 0, 0);\n test_territory(\"FL\", 373, 0, 0, 411);\n test_territory(\"FLK\", 83, 0, 0, 0);\n test_territory(\"FRA\", 198, 0, 0, 0);\n test_territory(\"FRO\", 64, 0, 0, 0);\n test_territory(\"FSM\", 54, 0, 0, 0);\n test_territory(\"GA\", 371, 0, 1, 411);\n test_territory(\"GA\", 290, 0, 1, 408);\n test_territory(\"GAB\", 171, 0, 0, 0);\n test_territory(\"GBR\", 167, 0, 0, 0);\n test_territory(\"GD\", 514, 0, 0, 529);\n test_territory(\"GEO\", 125, 0, 0, 0);\n test_territory(\"GGY\", 18, 0, 0, 0);\n test_territory(\"GHA\", 165, 0, 0, 0);\n test_territory(\"GIB\", 3, 0, 0, 0);\n test_territory(\"GIN\", 168, 0, 0, 0);\n test_territory(\"GJ\", 300, 0, 0, 408);\n test_territory(\"GLP\", 65, 0, 0, 0);\n test_territory(\"GMB\", 81, 0, 0, 0);\n test_territory(\"GNB\", 109, 0, 0, 0);\n test_territory(\"GNQ\", 102, 0, 0, 0);\n test_territory(\"GO\", 337, 0, 0, 410);\n test_territory(\"GR\", 252, 1, 0, 412);\n test_territory(\"GRC\", 150, 0, 0, 0);\n test_territory(\"GRD\", 38, 0, 0, 0);\n test_territory(\"GRL\", 266, 0, 0, 0);\n test_territory(\"GRO\", 252, 0, 0, 412);\n test_territory(\"GS\", 526, 0, 0, 529);\n test_territory(\"GT\", 244, 1, 0, 412);\n test_territory(\"GTM\", 140, 0, 0, 0);\n test_territory(\"GU\", 51, 1, 0, 411);\n test_territory(\"GUA\", 244, 0, 0, 412);\n test_territory(\"GUF\", 130, 0, 0, 0);\n test_territory(\"GUM\", 51, 0, 0, 0);\n test_territory(\"GUY\", 162, 0, 0, 0);\n test_territory(\"GX\", 522, 0, 0, 529);\n test_territory(\"GZ\", 513, 0, 0, 529);\n test_territory(\"HA\", 512, 0, 0, 529);\n test_territory(\"HB\", 515, 0, 0, 529);\n test_territory(\"HE\", 517, 0, 0, 529);\n test_territory(\"HG\", 240, 1, 0, 412);\n test_territory(\"HI\", 501, 0, 1, 529);\n test_territory(\"HI\", 352, 0, 1, 411);\n test_territory(\"HID\", 240, 0, 0, 412);\n test_territory(\"HK\", 62, 1, 0, 529);\n test_territory(\"HKG\", 62, 0, 0, 0);\n test_territory(\"HL\", 520, 0, 0, 529);\n test_territory(\"HM\", 43, 1, 0, 409);\n test_territory(\"HMD\", 43, 0, 0, 0);\n test_territory(\"HN\", 521, 0, 0, 529);\n test_territory(\"HND\", 144, 0, 0, 0);\n test_territory(\"HP\", 293, 0, 0, 408);\n test_territory(\"HR\", 285, 0, 0, 408);\n test_territory(\"HRV\", 120, 0, 0, 0);\n test_territory(\"HTI\", 100, 0, 0, 0);\n test_territory(\"HUN\", 137, 0, 0, 0);\n test_territory(\"IA\", 369, 0, 0, 411);\n test_territory(\"ID\", 381, 0, 0, 411);\n test_territory(\"IDN\", 233, 0, 0, 0);\n test_territory(\"IL\", 370, 0, 0, 411);\n test_territory(\"IMN\", 52, 0, 0, 0);\n test_territory(\"IN\", 416, 0, 1, 497);\n test_territory(\"IN\", 357, 0, 1, 411);\n test_territory(\"IN-AN\", 275, 0, 0, 408);\n test_territory(\"IN-AP\", 304, 0, 0, 408);\n test_territory(\"IN-AR\", 286, 0, 0, 408);\n test_territory(\"IN-AS\", 287, 0, 0, 408);\n test_territory(\"IN-BR\", 288, 0, 0, 408);\n test_territory(\"IN-CG\", 295, 1, 0, 408);\n test_territory(\"IN-CH\", 274, 0, 0, 408);\n test_territory(\"IN-CT\", 295, 0, 0, 408);\n test_territory(\"IN-DD\", 272, 0, 0, 408);\n test_territory(\"IN-DL\", 277, 0, 0, 408);\n test_territory(\"IN-DN\", 273, 0, 0, 408);\n test_territory(\"IN-GA\", 290, 0, 0, 408);\n test_territory(\"IN-GJ\", 300, 0, 0, 408);\n test_territory(\"IN-HP\", 293, 0, 0, 408);\n test_territory(\"IN-HR\", 285, 0, 0, 408);\n test_territory(\"IN-JH\", 296, 0, 0, 408);\n test_territory(\"IN-JK\", 294, 0, 0, 408);\n test_territory(\"IN-KA\", 297, 0, 0, 408);\n test_territory(\"IN-KL\", 291, 0, 0, 408);\n test_territory(\"IN-LD\", 276, 0, 0, 408);\n test_territory(\"IN-MH\", 305, 0, 0, 408);\n test_territory(\"IN-ML\", 278, 0, 0, 408);\n test_territory(\"IN-MN\", 280, 0, 0, 408);\n test_territory(\"IN-MP\", 302, 0, 0, 408);\n test_territory(\"IN-MZ\", 282, 0, 0, 408);\n test_territory(\"IN-NL\", 279, 0, 0, 408);\n test_territory(\"IN-OD\", 299, 1, 0, 408);\n test_territory(\"IN-OR\", 299, 0, 0, 408);\n test_territory(\"IN-PB\", 284, 0, 0, 408);\n test_territory(\"IN-PY\", 307, 0, 0, 408);\n test_territory(\"IN-RJ\", 298, 0, 0, 408);\n test_territory(\"IN-SK\", 283, 0, 0, 408);\n test_territory(\"IN-TG\", 303, 0, 0, 408);\n test_territory(\"IN-TN\", 292, 0, 0, 408);\n test_territory(\"IN-TR\", 281, 0, 0, 408);\n test_territory(\"IN-UK\", 289, 1, 0, 408);\n test_territory(\"IN-UP\", 306, 0, 0, 408);\n test_territory(\"IN-UT\", 289, 0, 0, 408);\n test_territory(\"IN-WB\", 301, 0, 0, 408);\n test_territory(\"IND\", 408, 0, 0, 0);\n test_territory(\"IND-AN\", 275, 0, 0, 408);\n test_territory(\"IND-AP\", 304, 0, 0, 408);\n test_territory(\"IND-AR\", 286, 0, 0, 408);\n test_territory(\"IND-AS\", 287, 0, 0, 408);\n test_territory(\"IND-BR\", 288, 0, 0, 408);\n test_territory(\"IND-CG\", 295, 1, 0, 408);\n test_territory(\"IND-CH\", 274, 0, 0, 408);\n test_territory(\"IND-CT\", 295, 0, 0, 408);\n test_territory(\"IND-DD\", 272, 0, 0, 408);\n test_territory(\"IND-DL\", 277, 0, 0, 408);\n test_territory(\"IND-DN\", 273, 0, 0, 408);\n test_territory(\"IND-GA\", 290, 0, 0, 408);\n test_territory(\"IND-GJ\", 300, 0, 0, 408);\n test_territory(\"IND-HP\", 293, 0, 0, 408);\n test_territory(\"IND-HR\", 285, 0, 0, 408);\n test_territory(\"IND-JH\", 296, 0, 0, 408);\n test_territory(\"IND-JK\", 294, 0, 0, 408);\n test_territory(\"IND-KA\", 297, 0, 0, 408);\n test_territory(\"IND-KL\", 291, 0, 0, 408);\n test_territory(\"IND-LD\", 276, 0, 0, 408);\n test_territory(\"IND-MH\", 305, 0, 0, 408);\n test_territory(\"IND-ML\", 278, 0, 0, 408);\n test_territory(\"IND-MN\", 280, 0, 0, 408);\n test_territory(\"IND-MP\", 302, 0, 0, 408);\n test_territory(\"IND-MZ\", 282, 0, 0, 408);\n test_territory(\"IND-NL\", 279, 0, 0, 408);\n test_territory(\"IND-OD\", 299, 1, 0, 408);\n test_territory(\"IND-OR\", 299, 0, 0, 408);\n test_territory(\"IND-PB\", 284, 0, 0, 408);\n test_territory(\"IND-PY\", 307, 0, 0, 408);\n test_territory(\"IND-RJ\", 298, 0, 0, 408);\n test_territory(\"IND-SK\", 283, 0, 0, 408);\n test_territory(\"IND-TG\", 303, 0, 0, 408);\n test_territory(\"IND-TN\", 292, 0, 0, 408);\n test_territory(\"IND-TR\", 281, 0, 0, 408);\n test_territory(\"IND-UK\", 289, 1, 0, 408);\n test_territory(\"IND-UP\", 306, 0, 0, 408);\n test_territory(\"IND-UT\", 289, 0, 0, 408);\n test_territory(\"IND-WB\", 301, 0, 0, 408);\n test_territory(\"IOT\", 16, 0, 0, 0);\n test_territory(\"IRK\", 477, 0, 0, 497);\n test_territory(\"IRL\", 126, 0, 0, 0);\n test_territory(\"IRN\", 230, 0, 0, 0);\n test_territory(\"IRQ\", 188, 0, 0, 0);\n test_territory(\"ISL\", 139, 0, 0, 0);\n test_territory(\"ISR\", 93, 0, 0, 0);\n test_territory(\"ITA\", 175, 0, 0, 0);\n test_territory(\"IVA\", 423, 0, 0, 497);\n test_territory(\"JA\", 259, 1, 0, 412);\n test_territory(\"JAL\", 259, 0, 0, 412);\n test_territory(\"JAM\", 80, 0, 0, 0);\n test_territory(\"JBT\", 310, 0, 0, 409);\n test_territory(\"JEY\", 21, 0, 0, 0);\n test_territory(\"JH\", 296, 0, 0, 408);\n test_territory(\"JK\", 294, 0, 0, 408);\n test_territory(\"JL\", 516, 0, 0, 529);\n test_territory(\"JOR\", 135, 0, 0, 0);\n test_territory(\"JPN\", 185, 0, 0, 0);\n test_territory(\"JS\", 505, 0, 0, 529);\n test_territory(\"JTN\", 530, 1, 0, 0);\n test_territory(\"JX\", 511, 0, 0, 529);\n test_territory(\"KA\", 297, 0, 0, 408);\n test_territory(\"KAM\", 489, 0, 0, 497);\n test_territory(\"KAZ\", 270, 0, 0, 0);\n test_territory(\"KB\", 419, 0, 0, 497);\n test_territory(\"KC\", 420, 0, 0, 497);\n test_territory(\"KDA\", 444, 0, 0, 497);\n test_territory(\"KEM\", 482, 0, 0, 497);\n test_territory(\"KEN\", 200, 0, 0, 0);\n test_territory(\"KGD\", 415, 0, 0, 497);\n test_territory(\"KGN\", 473, 0, 0, 497);\n test_territory(\"KGZ\", 160, 0, 0, 0);\n test_territory(\"KHA\", 493, 0, 0, 497);\n test_territory(\"KHM\", 157, 0, 0, 0);\n test_territory(\"KI\", 459, 0, 0, 497);\n test_territory(\"KIR\", 59, 0, 0, 0);\n test_territory(\"KK\", 481, 0, 0, 497);\n test_territory(\"KL\", 445, 0, 1, 497);\n test_territory(\"KL\", 291, 0, 1, 408);\n test_territory(\"KLU\", 430, 0, 0, 497);\n test_territory(\"KM\", 470, 0, 0, 497);\n test_territory(\"KNA\", 32, 0, 0, 0);\n test_territory(\"KO\", 454, 0, 0, 497);\n test_territory(\"KOR\", 138, 0, 0, 0);\n test_territory(\"KOS\", 442, 0, 0, 497);\n test_territory(\"KR\", 452, 0, 0, 497);\n test_territory(\"KRS\", 429, 0, 0, 497);\n test_territory(\"KS\", 380, 0, 0, 411);\n test_territory(\"KWT\", 89, 0, 0, 0);\n test_territory(\"KY\", 358, 0, 0, 411);\n test_territory(\"KYA\", 486, 0, 0, 497);\n test_territory(\"LA\", 364, 0, 0, 411);\n test_territory(\"LAO\", 163, 0, 0, 0);\n test_territory(\"LBN\", 79, 0, 0, 0);\n test_territory(\"LBR\", 143, 0, 0, 0);\n test_territory(\"LBY\", 231, 0, 0, 0);\n test_territory(\"LCA\", 53, 0, 0, 0);\n test_territory(\"LD\", 276, 0, 0, 408);\n test_territory(\"LEN\", 447, 0, 0, 497);\n test_territory(\"LIE\", 25, 0, 0, 0);\n test_territory(\"LIP\", 424, 0, 0, 497);\n test_territory(\"LKA\", 124, 0, 0, 0);\n test_territory(\"LN\", 508, 0, 0, 529);\n test_territory(\"LSO\", 106, 0, 0, 0);\n test_territory(\"LTU\", 123, 0, 0, 0);\n test_territory(\"LUX\", 69, 0, 0, 0);\n test_territory(\"LVA\", 122, 0, 0, 0);\n test_territory(\"MA\", 351, 0, 1, 411);\n test_territory(\"MA\", 336, 0, 1, 410);\n test_territory(\"MAC\", 9, 0, 0, 0);\n test_territory(\"MAF\", 11, 0, 0, 0);\n test_territory(\"MAG\", 487, 0, 0, 497);\n test_territory(\"MAR\", 189, 0, 0, 0);\n test_territory(\"MB\", 400, 0, 0, 496);\n test_territory(\"MC\", 9, 1, 0, 529);\n test_territory(\"MCO\", 2, 0, 0, 0);\n test_territory(\"MD\", 353, 0, 0, 411);\n test_territory(\"MDA\", 108, 0, 0, 0);\n test_territory(\"MDG\", 202, 0, 0, 0);\n test_territory(\"MDV\", 35, 0, 0, 0);\n test_territory(\"ME\", 460, 0, 1, 497);\n test_territory(\"ME\", 356, 0, 1, 411);\n test_territory(\"ME\", 241, 1, 1, 412);\n test_territory(\"MEX\", 412, 0, 0, 0);\n test_territory(\"MEX-AG\", 237, 1, 0, 412);\n test_territory(\"MEX-AGU\", 237, 0, 0, 412);\n test_territory(\"MEX-BC\", 254, 1, 0, 412);\n test_territory(\"MEX-BCN\", 254, 0, 0, 412);\n test_territory(\"MEX-BCS\", 257, 0, 0, 412);\n test_territory(\"MEX-BS\", 257, 1, 0, 412);\n test_territory(\"MEX-CAM\", 249, 0, 0, 412);\n test_territory(\"MEX-CH\", 265, 1, 0, 412);\n test_territory(\"MEX-CHH\", 265, 0, 0, 412);\n test_territory(\"MEX-CHP\", 256, 0, 0, 412);\n test_territory(\"MEX-CL\", 238, 0, 0, 412);\n test_territory(\"MEX-CM\", 249, 1, 0, 412);\n test_territory(\"MEX-CO\", 263, 1, 0, 412);\n test_territory(\"MEX-COA\", 263, 0, 0, 412);\n test_territory(\"MEX-COL\", 238, 1, 0, 412);\n test_territory(\"MEX-CS\", 256, 1, 0, 412);\n test_territory(\"MEX-DF\", 234, 1, 0, 412);\n test_territory(\"MEX-DG\", 262, 1, 0, 412);\n test_territory(\"MEX-DIF\", 234, 0, 0, 412);\n test_territory(\"MEX-DUR\", 262, 0, 0, 412);\n test_territory(\"MEX-GR\", 252, 1, 0, 412);\n test_territory(\"MEX-GRO\", 252, 0, 0, 412);\n test_territory(\"MEX-GT\", 244, 1, 0, 412);\n test_territory(\"MEX-GUA\", 244, 0, 0, 412);\n test_territory(\"MEX-HG\", 240, 1, 0, 412);\n test_territory(\"MEX-HID\", 240, 0, 0, 412);\n test_territory(\"MEX-JA\", 259, 1, 0, 412);\n test_territory(\"MEX-JAL\", 259, 0, 0, 412);\n test_territory(\"MEX-ME\", 241, 1, 0, 412);\n test_territory(\"MEX-MEX\", 241, 1, 0, 412);\n test_territory(\"MEX-MI\", 250, 1, 0, 412);\n test_territory(\"MEX-MIC\", 250, 0, 0, 412);\n test_territory(\"MEX-MO\", 236, 1, 0, 412);\n test_territory(\"MEX-MOR\", 236, 0, 0, 412);\n test_territory(\"MEX-MX\", 241, 0, 0, 412);\n test_territory(\"MEX-NA\", 243, 1, 0, 412);\n test_territory(\"MEX-NAY\", 243, 0, 0, 412);\n test_territory(\"MEX-NL\", 253, 1, 0, 412);\n test_territory(\"MEX-NLE\", 253, 0, 0, 412);\n test_territory(\"MEX-OA\", 261, 1, 0, 412);\n test_territory(\"MEX-OAX\", 261, 0, 0, 412);\n test_territory(\"MEX-PB\", 245, 1, 0, 412);\n test_territory(\"MEX-PUE\", 245, 0, 0, 412);\n test_territory(\"MEX-QE\", 239, 1, 0, 412);\n test_territory(\"MEX-QR\", 247, 1, 0, 412);\n test_territory(\"MEX-QUE\", 239, 0, 0, 412);\n test_territory(\"MEX-ROO\", 247, 0, 0, 412);\n test_territory(\"MEX-SI\", 248, 1, 0, 412);\n test_territory(\"MEX-SIN\", 248, 0, 0, 412);\n test_territory(\"MEX-SL\", 251, 1, 0, 412);\n test_territory(\"MEX-SLP\", 251, 0, 0, 412);\n test_territory(\"MEX-SO\", 264, 1, 0, 412);\n test_territory(\"MEX-SON\", 264, 0, 0, 412);\n test_territory(\"MEX-TAB\", 242, 0, 0, 412);\n test_territory(\"MEX-TAM\", 260, 0, 0, 412);\n test_territory(\"MEX-TAM\", 260, 1, 0, 412);\n test_territory(\"MEX-TB\", 242, 1, 0, 412);\n test_territory(\"MEX-TL\", 235, 1, 0, 412);\n test_territory(\"MEX-TLA\", 235, 0, 0, 412);\n test_territory(\"MEX-TM\", 260, 1, 0, 412);\n test_territory(\"MEX-VE\", 255, 1, 0, 412);\n test_territory(\"MEX-VER\", 255, 0, 0, 412);\n test_territory(\"MEX-YU\", 246, 1, 0, 412);\n test_territory(\"MEX-YUC\", 246, 0, 0, 412);\n test_territory(\"MEX-ZA\", 258, 1, 0, 412);\n test_territory(\"MEX-ZAC\", 258, 0, 0, 412);\n test_territory(\"MG\", 340, 0, 0, 410);\n test_territory(\"MH\", 305, 0, 0, 408);\n test_territory(\"MHL\", 27, 0, 0, 0);\n test_territory(\"MI\", 384, 0, 1, 411);\n test_territory(\"MI\", 250, 1, 1, 412);\n test_territory(\"MIC\", 250, 0, 0, 412);\n test_territory(\"MID\", 352, 1, 0, 411);\n test_territory(\"MKD\", 98, 0, 0, 0);\n test_territory(\"ML\", 278, 0, 0, 408);\n test_territory(\"MLI\", 224, 0, 0, 0);\n test_territory(\"MLT\", 37, 0, 0, 0);\n test_territory(\"MMR\", 208, 0, 0, 0);\n test_territory(\"MN\", 383, 0, 1, 411);\n test_territory(\"MN\", 280, 0, 1, 408);\n test_territory(\"MNE\", 85, 0, 0, 0);\n test_territory(\"MNG\", 229, 0, 0, 0);\n test_territory(\"MNP\", 49, 0, 0, 0);\n test_territory(\"MO\", 456, 0, 1, 497);\n test_territory(\"MO\", 374, 0, 1, 411);\n test_territory(\"MO\", 236, 1, 1, 412);\n test_territory(\"MOR\", 236, 0, 0, 412);\n test_territory(\"MOS\", 436, 0, 0, 497);\n test_territory(\"MOW\", 413, 0, 0, 497);\n test_territory(\"MOZ\", 213, 0, 0, 0);\n test_territory(\"MP\", 302, 0, 1, 408);\n test_territory(\"MP\", 49, 1, 1, 411);\n test_territory(\"MRT\", 219, 0, 0, 0);\n test_territory(\"MS\", 363, 0, 1, 411);\n test_territory(\"MS\", 338, 0, 1, 410);\n test_territory(\"MSR\", 20, 0, 0, 0);\n test_territory(\"MT\", 391, 0, 1, 411);\n test_territory(\"MT\", 341, 0, 1, 410);\n test_territory(\"MTQ\", 63, 0, 0, 0);\n test_territory(\"MUR\", 451, 0, 0, 497);\n test_territory(\"MUS\", 67, 0, 0, 0);\n test_territory(\"MWI\", 147, 0, 0, 0);\n test_territory(\"MX\", 241, 0, 0, 412);\n test_territory(\"MX-AG\", 237, 1, 0, 412);\n test_territory(\"MX-AGU\", 237, 0, 0, 412);\n test_territory(\"MX-BC\", 254, 1, 0, 412);\n test_territory(\"MX-BCN\", 254, 0, 0, 412);\n test_territory(\"MX-BCS\", 257, 0, 0, 412);\n test_territory(\"MX-BS\", 257, 1, 0, 412);\n test_territory(\"MX-CAM\", 249, 0, 0, 412);\n test_territory(\"MX-CH\", 265, 1, 0, 412);\n test_territory(\"MX-CHH\", 265, 0, 0, 412);\n test_territory(\"MX-CHP\", 256, 0, 0, 412);\n test_territory(\"MX-CL\", 238, 0, 0, 412);\n test_territory(\"MX-CM\", 249, 1, 0, 412);\n test_territory(\"MX-CO\", 263, 1, 0, 412);\n test_territory(\"MX-COA\", 263, 0, 0, 412);\n test_territory(\"MX-COL\", 238, 1, 0, 412);\n test_territory(\"MX-CS\", 256, 1, 0, 412);\n test_territory(\"MX-DF\", 234, 1, 0, 412);\n test_territory(\"MX-DG\", 262, 1, 0, 412);\n test_territory(\"MX-DIF\", 234, 0, 0, 412);\n test_territory(\"MX-DUR\", 262, 0, 0, 412);\n test_territory(\"MX-GR\", 252, 1, 0, 412);\n test_territory(\"MX-GRO\", 252, 0, 0, 412);\n test_territory(\"MX-GT\", 244, 1, 0, 412);\n test_territory(\"MX-GUA\", 244, 0, 0, 412);\n test_territory(\"MX-HG\", 240, 1, 0, 412);\n test_territory(\"MX-HID\", 240, 0, 0, 412);\n test_territory(\"MX-JA\", 259, 1, 0, 412);\n test_territory(\"MX-JAL\", 259, 0, 0, 412);\n test_territory(\"MX-ME\", 241, 1, 0, 412);\n test_territory(\"MX-MEX\", 241, 1, 0, 412);\n test_territory(\"MX-MI\", 250, 1, 0, 412);\n test_territory(\"MX-MIC\", 250, 0, 0, 412);\n test_territory(\"MX-MO\", 236, 1, 0, 412);\n test_territory(\"MX-MOR\", 236, 0, 0, 412);\n test_territory(\"MX-MX\", 241, 0, 0, 412);\n test_territory(\"MX-NA\", 243, 1, 0, 412);\n test_territory(\"MX-NAY\", 243, 0, 0, 412);\n test_territory(\"MX-NL\", 253, 1, 0, 412);\n test_territory(\"MX-NLE\", 253, 0, 0, 412);\n test_territory(\"MX-OA\", 261, 1, 0, 412);\n test_territory(\"MX-OAX\", 261, 0, 0, 412);\n test_territory(\"MX-PB\", 245, 1, 0, 412);\n test_territory(\"MX-PUE\", 245, 0, 0, 412);\n test_territory(\"MX-QE\", 239, 1, 0, 412);\n test_territory(\"MX-QR\", 247, 1, 0, 412);\n test_territory(\"MX-QUE\", 239, 0, 0, 412);\n test_territory(\"MX-ROO\", 247, 0, 0, 412);\n test_territory(\"MX-SI\", 248, 1, 0, 412);\n test_territory(\"MX-SIN\", 248, 0, 0, 412);\n test_territory(\"MX-SL\", 251, 1, 0, 412);\n test_territory(\"MX-SLP\", 251, 0, 0, 412);\n test_territory(\"MX-SO\", 264, 1, 0, 412);\n test_territory(\"MX-SON\", 264, 0, 0, 412);\n test_territory(\"MX-TAB\", 242, 0, 0, 412);\n test_territory(\"MX-TAM\", 260, 0, 0, 412);\n test_territory(\"MX-TAM\", 260, 1, 0, 412);\n test_territory(\"MX-TB\", 242, 1, 0, 412);\n test_territory(\"MX-TL\", 235, 1, 0, 412);\n test_territory(\"MX-TLA\", 235, 0, 0, 412);\n test_territory(\"MX-TM\", 260, 1, 0, 412);\n test_territory(\"MX-VE\", 255, 1, 0, 412);\n test_territory(\"MX-VER\", 255, 0, 0, 412);\n test_territory(\"MX-YU\", 246, 1, 0, 412);\n test_territory(\"MX-YUC\", 246, 0, 0, 412);\n test_territory(\"MX-ZA\", 258, 1, 0, 412);\n test_territory(\"MX-ZAC\", 258, 0, 0, 412);\n test_territory(\"MYS\", 180, 0, 0, 0);\n test_territory(\"MYT\", 40, 0, 0, 0);\n test_territory(\"MZ\", 282, 0, 0, 408);\n test_territory(\"NA\", 243, 1, 0, 412);\n test_territory(\"NAM\", 214, 0, 0, 0);\n test_territory(\"NAY\", 243, 0, 0, 412);\n test_territory(\"NB\", 402, 0, 0, 496);\n test_territory(\"NC\", 367, 0, 0, 411);\n test_territory(\"NCL\", 91, 0, 0, 0);\n test_territory(\"ND\", 376, 0, 0, 411);\n test_territory(\"NE\", 379, 0, 0, 411);\n test_territory(\"NEN\", 453, 0, 0, 497);\n test_territory(\"NER\", 226, 0, 0, 0);\n test_territory(\"NF\", 12, 1, 0, 409);\n test_territory(\"NFK\", 12, 0, 0, 0);\n test_territory(\"NGA\", 216, 0, 0, 0);\n test_territory(\"NGR\", 440, 0, 0, 497);\n test_territory(\"NH\", 349, 0, 0, 411);\n test_territory(\"NIC\", 149, 0, 0, 0);\n test_territory(\"NIU\", 31, 0, 0, 0);\n test_territory(\"NIZ\", 457, 0, 0, 497);\n test_territory(\"NJ\", 348, 0, 0, 411);\n test_territory(\"NL\", 401, 0, 1, 496);\n test_territory(\"NL\", 279, 0, 1, 408);\n test_territory(\"NL\", 253, 1, 1, 412);\n test_territory(\"NLD\", 113, 0, 0, 0);\n test_territory(\"NLE\", 253, 0, 0, 412);\n test_territory(\"NM\", 519, 0, 1, 529);\n test_territory(\"NM\", 390, 0, 1, 411);\n test_territory(\"NOR\", 179, 0, 0, 0);\n test_territory(\"NPL\", 153, 0, 0, 0);\n test_territory(\"NRU\", 7, 0, 0, 0);\n test_territory(\"NS\", 403, 0, 0, 496);\n test_territory(\"NSW\", 308, 0, 0, 409);\n test_territory(\"NT\", 406, 0, 1, 496);\n test_territory(\"NT\", 311, 0, 1, 409);\n test_territory(\"NU\", 407, 0, 0, 496);\n test_territory(\"NV\", 388, 0, 0, 411);\n test_territory(\"NVS\", 478, 0, 0, 497);\n test_territory(\"NX\", 502, 0, 0, 529);\n test_territory(\"NY\", 368, 0, 0, 411);\n test_territory(\"NZL\", 172, 0, 0, 0);\n test_territory(\"OA\", 261, 1, 0, 412);\n test_territory(\"OAX\", 261, 0, 0, 412);\n test_territory(\"OD\", 299, 1, 0, 408);\n test_territory(\"OH\", 361, 0, 0, 411);\n test_territory(\"OK\", 375, 0, 0, 411);\n test_territory(\"OMN\", 176, 0, 0, 0);\n test_territory(\"OMS\", 480, 0, 0, 497);\n test_territory(\"ON\", 397, 0, 0, 496);\n test_territory(\"OR\", 386, 0, 1, 411);\n test_territory(\"OR\", 299, 0, 1, 408);\n test_territory(\"ORE\", 461, 0, 0, 497);\n test_territory(\"ORL\", 425, 0, 0, 497);\n test_territory(\"PA\", 362, 0, 1, 411);\n test_territory(\"PA\", 342, 0, 1, 410);\n test_territory(\"PAK\", 212, 0, 0, 0);\n test_territory(\"PAN\", 128, 0, 0, 0);\n test_territory(\"PB\", 323, 0, 1, 410);\n test_territory(\"PB\", 284, 0, 1, 408);\n test_territory(\"PB\", 245, 1, 1, 412);\n test_territory(\"PCN\", 13, 0, 0, 0);\n test_territory(\"PE\", 404, 0, 1, 496);\n test_territory(\"PE\", 325, 0, 1, 410);\n test_territory(\"PER\", 228, 0, 0, 0);\n test_territory(\"PHL\", 174, 0, 0, 0);\n test_territory(\"PI\", 333, 0, 0, 410);\n test_territory(\"PLW\", 48, 0, 0, 0);\n test_territory(\"PM\", 463, 0, 0, 497);\n test_territory(\"PNG\", 192, 0, 0, 0);\n test_territory(\"PNZ\", 458, 0, 0, 497);\n test_territory(\"PO\", 491, 0, 0, 497);\n test_territory(\"POL\", 177, 0, 0, 0);\n test_territory(\"PR\", 329, 0, 1, 410);\n test_territory(\"PR\", 77, 1, 1, 411);\n test_territory(\"PRI\", 77, 0, 0, 0);\n test_territory(\"PRK\", 148, 0, 0, 0);\n test_territory(\"PRT\", 136, 0, 0, 0);\n test_territory(\"PRY\", 187, 0, 0, 0);\n test_territory(\"PSE\", 94, 0, 0, 0);\n test_territory(\"PSK\", 441, 0, 0, 497);\n test_territory(\"PUE\", 245, 0, 0, 412);\n test_territory(\"PY\", 307, 0, 0, 408);\n test_territory(\"PYF\", 72, 0, 0, 0);\n test_territory(\"QAT\", 82, 0, 0, 0);\n test_territory(\"QC\", 398, 0, 0, 496);\n test_territory(\"QE\", 239, 1, 0, 412);\n test_territory(\"QH\", 527, 0, 0, 529);\n test_territory(\"QLD\", 316, 0, 0, 409);\n test_territory(\"QR\", 247, 1, 0, 412);\n test_territory(\"QUE\", 239, 0, 0, 412);\n test_territory(\"REU\", 68, 0, 0, 0);\n test_territory(\"RI\", 345, 0, 0, 411);\n test_territory(\"RJ\", 320, 0, 1, 410);\n test_territory(\"RJ\", 298, 0, 1, 408);\n test_territory(\"RN\", 322, 0, 0, 410);\n test_territory(\"RO\", 331, 0, 0, 410);\n test_territory(\"ROO\", 247, 0, 0, 412);\n test_territory(\"ROS\", 448, 0, 0, 497);\n test_territory(\"ROU\", 164, 0, 0, 0);\n test_territory(\"RR\", 330, 0, 0, 410);\n test_territory(\"RS\", 335, 0, 0, 410);\n test_territory(\"RU\", 497, 1, 0, 0);\n test_territory(\"RU-AD\", 417, 0, 0, 497);\n test_territory(\"RU-AL\", 483, 0, 0, 497);\n test_territory(\"RU-ALT\", 484, 0, 0, 497);\n test_territory(\"RU-AMU\", 494, 0, 0, 497);\n test_territory(\"RU-ARK\", 455, 0, 0, 497);\n test_territory(\"RU-AST\", 435, 0, 0, 497);\n test_territory(\"RU-BA\", 464, 0, 0, 497);\n test_territory(\"RU-BE\", 427, 0, 0, 497);\n test_territory(\"RU-BEL\", 427, 1, 0, 497);\n test_territory(\"RU-BRY\", 432, 0, 0, 497);\n test_territory(\"RU-BU\", 475, 0, 0, 497);\n test_territory(\"RU-CE\", 421, 0, 0, 497);\n test_territory(\"RU-CH\", 474, 0, 0, 497);\n test_territory(\"RU-CHE\", 474, 1, 0, 497);\n test_territory(\"RU-CHU\", 488, 0, 0, 497);\n test_territory(\"RU-CU\", 422, 0, 0, 497);\n test_territory(\"RU-DA\", 438, 0, 0, 497);\n test_territory(\"RU-IN\", 416, 0, 0, 497);\n test_territory(\"RU-IRK\", 477, 0, 0, 497);\n test_territory(\"RU-IVA\", 423, 0, 0, 497);\n test_territory(\"RU-KAM\", 489, 0, 0, 497);\n test_territory(\"RU-KB\", 419, 0, 0, 497);\n test_territory(\"RU-KC\", 420, 0, 0, 497);\n test_territory(\"RU-KDA\", 444, 0, 0, 497);\n test_territory(\"RU-KEM\", 482, 0, 0, 497);\n test_territory(\"RU-KGD\", 415, 0, 0, 497);\n test_territory(\"RU-KGN\", 473, 0, 0, 497);\n test_territory(\"RU-KHA\", 493, 0, 0, 497);\n test_territory(\"RU-KHM\", 470, 1, 0, 497);\n test_territory(\"RU-KI\", 459, 0, 0, 497);\n test_territory(\"RU-KIR\", 459, 1, 0, 497);\n test_territory(\"RU-KK\", 481, 0, 0, 497);\n test_territory(\"RU-KL\", 445, 0, 0, 497);\n test_territory(\"RU-KLU\", 430, 0, 0, 497);\n test_territory(\"RU-KM\", 470, 0, 0, 497);\n test_territory(\"RU-KO\", 454, 0, 0, 497);\n test_territory(\"RU-KOS\", 442, 0, 0, 497);\n test_territory(\"RU-KR\", 452, 0, 0, 497);\n test_territory(\"RU-KRS\", 429, 0, 0, 497);\n test_territory(\"RU-KYA\", 486, 0, 0, 497);\n test_territory(\"RU-LEN\", 447, 0, 0, 497);\n test_territory(\"RU-LIP\", 424, 0, 0, 497);\n test_territory(\"RU-MAG\", 487, 0, 0, 497);\n test_territory(\"RU-ME\", 460, 0, 0, 497);\n test_territory(\"RU-MO\", 456, 0, 0, 497);\n test_territory(\"RU-MOS\", 436, 0, 0, 497);\n test_territory(\"RU-MOW\", 413, 0, 0, 497);\n test_territory(\"RU-MUR\", 451, 0, 0, 497);\n test_territory(\"RU-NEN\", 453, 0, 0, 497);\n test_territory(\"RU-NGR\", 440, 0, 0, 497);\n test_territory(\"RU-NIZ\", 457, 0, 0, 497);\n test_territory(\"RU-NVS\", 478, 0, 0, 497);\n test_territory(\"RU-OMS\", 480, 0, 0, 497);\n test_territory(\"RU-ORE\", 461, 0, 0, 497);\n test_territory(\"RU-ORL\", 425, 0, 0, 497);\n test_territory(\"RU-PER\", 463, 1, 0, 497);\n test_territory(\"RU-PM\", 463, 0, 0, 497);\n test_territory(\"RU-PNZ\", 458, 0, 0, 497);\n test_territory(\"RU-PO\", 491, 0, 0, 497);\n test_territory(\"RU-PRI\", 491, 1, 0, 497);\n test_territory(\"RU-PSK\", 441, 0, 0, 497);\n test_territory(\"RU-ROS\", 448, 0, 0, 497);\n test_territory(\"RU-RYA\", 434, 0, 0, 497);\n test_territory(\"RU-SA\", 495, 0, 0, 497);\n test_territory(\"RU-SAK\", 490, 0, 0, 497);\n test_territory(\"RU-SAM\", 467, 0, 0, 497);\n test_territory(\"RU-SAR\", 468, 0, 0, 497);\n test_territory(\"RU-SE\", 418, 0, 0, 497);\n test_territory(\"RU-SMO\", 437, 0, 0, 497);\n test_territory(\"RU-SPE\", 414, 0, 0, 497);\n test_territory(\"RU-STA\", 443, 0, 0, 497);\n test_territory(\"RU-SVE\", 471, 0, 0, 497);\n test_territory(\"RU-TA\", 466, 0, 0, 497);\n test_territory(\"RU-TAM\", 431, 1, 0, 497);\n test_territory(\"RU-TOM\", 479, 0, 0, 497);\n test_territory(\"RU-TT\", 431, 0, 0, 497);\n test_territory(\"RU-TUL\", 426, 0, 0, 497);\n test_territory(\"RU-TVE\", 446, 0, 0, 497);\n test_territory(\"RU-TY\", 485, 0, 0, 497);\n test_territory(\"RU-TYU\", 472, 0, 0, 497);\n test_territory(\"RU-UD\", 465, 0, 0, 497);\n test_territory(\"RU-ULY\", 462, 0, 0, 497);\n test_territory(\"RU-VGG\", 449, 0, 0, 497);\n test_territory(\"RU-VLA\", 428, 0, 0, 497);\n test_territory(\"RU-VLG\", 450, 0, 0, 497);\n test_territory(\"RU-VOR\", 439, 0, 0, 497);\n test_territory(\"RU-YAN\", 469, 0, 0, 497);\n test_territory(\"RU-YAR\", 433, 0, 0, 497);\n test_territory(\"RU-YEV\", 492, 0, 0, 497);\n test_territory(\"RU-ZAB\", 476, 0, 0, 497);\n test_territory(\"RUS\", 497, 0, 0, 0);\n test_territory(\"RUS-AD\", 417, 0, 0, 497);\n test_territory(\"RUS-AL\", 483, 0, 0, 497);\n test_territory(\"RUS-ALT\", 484, 0, 0, 497);\n test_territory(\"RUS-AMU\", 494, 0, 0, 497);\n test_territory(\"RUS-ARK\", 455, 0, 0, 497);\n test_territory(\"RUS-AST\", 435, 0, 0, 497);\n test_territory(\"RUS-BA\", 464, 0, 0, 497);\n test_territory(\"RUS-BE\", 427, 0, 0, 497);\n test_territory(\"RUS-BEL\", 427, 1, 0, 497);\n test_territory(\"RUS-BRY\", 432, 0, 0, 497);\n test_territory(\"RUS-BU\", 475, 0, 0, 497);\n test_territory(\"RUS-CE\", 421, 0, 0, 497);\n test_territory(\"RUS-CH\", 474, 0, 0, 497);\n test_territory(\"RUS-CHE\", 474, 1, 0, 497);\n test_territory(\"RUS-CHU\", 488, 0, 0, 497);\n test_territory(\"RUS-CU\", 422, 0, 0, 497);\n test_territory(\"RUS-DA\", 438, 0, 0, 497);\n test_territory(\"RUS-IN\", 416, 0, 0, 497);\n test_territory(\"RUS-IRK\", 477, 0, 0, 497);\n test_territory(\"RUS-IVA\", 423, 0, 0, 497);\n test_territory(\"RUS-KAM\", 489, 0, 0, 497);\n test_territory(\"RUS-KB\", 419, 0, 0, 497);\n test_territory(\"RUS-KC\", 420, 0, 0, 497);\n test_territory(\"RUS-KDA\", 444, 0, 0, 497);\n test_territory(\"RUS-KEM\", 482, 0, 0, 497);\n test_territory(\"RUS-KGD\", 415, 0, 0, 497);\n test_territory(\"RUS-KGN\", 473, 0, 0, 497);\n test_territory(\"RUS-KHA\", 493, 0, 0, 497);\n test_territory(\"RUS-KHM\", 470, 1, 0, 497);\n test_territory(\"RUS-KI\", 459, 0, 0, 497);\n test_territory(\"RUS-KIR\", 459, 1, 0, 497);\n test_territory(\"RUS-KK\", 481, 0, 0, 497);\n test_territory(\"RUS-KL\", 445, 0, 0, 497);\n test_territory(\"RUS-KLU\", 430, 0, 0, 497);\n test_territory(\"RUS-KM\", 470, 0, 0, 497);\n test_territory(\"RUS-KO\", 454, 0, 0, 497);\n test_territory(\"RUS-KOS\", 442, 0, 0, 497);\n test_territory(\"RUS-KR\", 452, 0, 0, 497);\n test_territory(\"RUS-KRS\", 429, 0, 0, 497);\n test_territory(\"RUS-KYA\", 486, 0, 0, 497);\n test_territory(\"RUS-LEN\", 447, 0, 0, 497);\n test_territory(\"RUS-LIP\", 424, 0, 0, 497);\n test_territory(\"RUS-MAG\", 487, 0, 0, 497);\n test_territory(\"RUS-ME\", 460, 0, 0, 497);\n test_territory(\"RUS-MO\", 456, 0, 0, 497);\n test_territory(\"RUS-MOS\", 436, 0, 0, 497);\n test_territory(\"RUS-MOW\", 413, 0, 0, 497);\n test_territory(\"RUS-MUR\", 451, 0, 0, 497);\n test_territory(\"RUS-NEN\", 453, 0, 0, 497);\n test_territory(\"RUS-NGR\", 440, 0, 0, 497);\n test_territory(\"RUS-NIZ\", 457, 0, 0, 497);\n test_territory(\"RUS-NVS\", 478, 0, 0, 497);\n test_territory(\"RUS-OMS\", 480, 0, 0, 497);\n test_territory(\"RUS-ORE\", 461, 0, 0, 497);\n test_territory(\"RUS-ORL\", 425, 0, 0, 497);\n test_territory(\"RUS-PER\", 463, 1, 0, 497);\n test_territory(\"RUS-PM\", 463, 0, 0, 497);\n test_territory(\"RUS-PNZ\", 458, 0, 0, 497);\n test_territory(\"RUS-PO\", 491, 0, 0, 497);\n test_territory(\"RUS-PRI\", 491, 1, 0, 497);\n test_territory(\"RUS-PSK\", 441, 0, 0, 497);\n test_territory(\"RUS-ROS\", 448, 0, 0, 497);\n test_territory(\"RUS-RYA\", 434, 0, 0, 497);\n test_territory(\"RUS-SA\", 495, 0, 0, 497);\n test_territory(\"RUS-SAK\", 490, 0, 0, 497);\n test_territory(\"RUS-SAM\", 467, 0, 0, 497);\n test_territory(\"RUS-SAR\", 468, 0, 0, 497);\n test_territory(\"RUS-SE\", 418, 0, 0, 497);\n test_territory(\"RUS-SMO\", 437, 0, 0, 497);\n test_territory(\"RUS-SPE\", 414, 0, 0, 497);\n test_territory(\"RUS-STA\", 443, 0, 0, 497);\n test_territory(\"RUS-SVE\", 471, 0, 0, 497);\n test_territory(\"RUS-TA\", 466, 0, 0, 497);\n test_territory(\"RUS-TAM\", 431, 1, 0, 497);\n test_territory(\"RUS-TOM\", 479, 0, 0, 497);\n test_territory(\"RUS-TT\", 431, 0, 0, 497);\n test_territory(\"RUS-TUL\", 426, 0, 0, 497);\n test_territory(\"RUS-TVE\", 446, 0, 0, 497);\n test_territory(\"RUS-TY\", 485, 0, 0, 497);\n test_territory(\"RUS-TYU\", 472, 0, 0, 497);\n test_territory(\"RUS-UD\", 465, 0, 0, 497);\n test_territory(\"RUS-ULY\", 462, 0, 0, 497);\n test_territory(\"RUS-VGG\", 449, 0, 0, 497);\n test_territory(\"RUS-VLA\", 428, 0, 0, 497);\n test_territory(\"RUS-VLG\", 450, 0, 0, 497);\n test_territory(\"RUS-VOR\", 439, 0, 0, 497);\n test_territory(\"RUS-YAN\", 469, 0, 0, 497);\n test_territory(\"RUS-YAR\", 433, 0, 0, 497);\n test_territory(\"RUS-YEV\", 492, 0, 0, 497);\n test_territory(\"RUS-ZAB\", 476, 0, 0, 497);\n test_territory(\"RWA\", 99, 0, 0, 0);\n test_territory(\"RYA\", 434, 0, 0, 497);\n test_territory(\"SA\", 495, 0, 1, 497);\n test_territory(\"SA\", 312, 0, 1, 409);\n test_territory(\"SAK\", 490, 0, 0, 497);\n test_territory(\"SAM\", 467, 0, 0, 497);\n test_territory(\"SAR\", 468, 0, 0, 497);\n test_territory(\"SAU\", 267, 0, 0, 0);\n test_territory(\"SC\", 523, 0, 1, 529);\n test_territory(\"SC\", 355, 0, 1, 411);\n test_territory(\"SC\", 324, 0, 1, 410);\n test_territory(\"SD\", 509, 0, 1, 529);\n test_territory(\"SD\", 378, 0, 1, 411);\n test_territory(\"SDN\", 232, 0, 0, 0);\n test_territory(\"SE\", 418, 0, 1, 497);\n test_territory(\"SE\", 318, 0, 1, 410);\n test_territory(\"SEN\", 159, 0, 0, 0);\n test_territory(\"SGP\", 55, 0, 0, 0);\n test_territory(\"SGS\", 71, 0, 0, 0);\n test_territory(\"SH\", 498, 0, 0, 529);\n test_territory(\"SHN\", 36, 0, 0, 0);\n test_territory(\"SI\", 248, 1, 0, 412);\n test_territory(\"SIN\", 248, 0, 0, 412);\n test_territory(\"SJM\", 41, 0, 0, 0);\n test_territory(\"SK\", 399, 0, 1, 496);\n test_territory(\"SK\", 283, 0, 1, 408);\n test_territory(\"SL\", 251, 1, 0, 412);\n test_territory(\"SLB\", 104, 0, 0, 0);\n test_territory(\"SLE\", 127, 0, 0, 0);\n test_territory(\"SLP\", 251, 0, 0, 412);\n test_territory(\"SLV\", 95, 0, 0, 0);\n test_territory(\"SMO\", 437, 0, 0, 497);\n test_territory(\"SMR\", 17, 0, 0, 0);\n test_territory(\"SN\", 518, 0, 0, 529);\n test_territory(\"SO\", 264, 1, 0, 412);\n test_territory(\"SOM\", 206, 0, 0, 0);\n test_territory(\"SON\", 264, 0, 0, 412);\n test_territory(\"SP\", 332, 0, 0, 410);\n test_territory(\"SPE\", 414, 0, 0, 497);\n test_territory(\"SPM\", 30, 0, 0, 0);\n test_territory(\"SRB\", 134, 0, 0, 0);\n test_territory(\"SSD\", 204, 0, 0, 0);\n test_territory(\"STA\", 443, 0, 0, 497);\n test_territory(\"STP\", 61, 0, 0, 0);\n test_territory(\"SUR\", 155, 0, 0, 0);\n test_territory(\"SVE\", 471, 0, 0, 497);\n test_territory(\"SVK\", 117, 0, 0, 0);\n test_territory(\"SVN\", 92, 0, 0, 0);\n test_territory(\"SWE\", 191, 0, 0, 0);\n test_territory(\"SWZ\", 88, 0, 0, 0);\n test_territory(\"SX\", 510, 0, 0, 529);\n test_territory(\"SXM\", 10, 0, 0, 0);\n test_territory(\"SYC\", 47, 0, 0, 0);\n test_territory(\"SYR\", 158, 0, 0, 0);\n test_territory(\"TA\", 466, 0, 0, 497);\n test_territory(\"TAA\", 36, 1, 0, 0);\n test_territory(\"TAB\", 242, 0, 0, 412);\n test_territory(\"TAM\", 260, 0, 0, 412);\n test_territory(\"TAS\", 313, 0, 0, 409);\n test_territory(\"TB\", 242, 1, 0, 412);\n test_territory(\"TCA\", 60, 0, 0, 0);\n test_territory(\"TCD\", 227, 0, 0, 0);\n test_territory(\"TG\", 303, 0, 0, 408);\n test_territory(\"TGO\", 121, 0, 0, 0);\n test_territory(\"THA\", 196, 0, 0, 0);\n test_territory(\"TJ\", 499, 0, 0, 529);\n test_territory(\"TJK\", 151, 0, 0, 0);\n test_territory(\"TKL\", 4, 0, 0, 0);\n test_territory(\"TKM\", 194, 0, 0, 0);\n test_territory(\"TL\", 235, 1, 0, 412);\n test_territory(\"TLA\", 235, 0, 0, 412);\n test_territory(\"TLS\", 87, 0, 0, 0);\n test_territory(\"TM\", 260, 1, 0, 412);\n test_territory(\"TN\", 359, 0, 1, 411);\n test_territory(\"TN\", 292, 0, 1, 408);\n test_territory(\"TO\", 334, 0, 0, 410);\n test_territory(\"TOM\", 479, 0, 0, 497);\n test_territory(\"TON\", 56, 0, 0, 0);\n test_territory(\"TR\", 281, 0, 0, 408);\n test_territory(\"TT\", 431, 0, 0, 497);\n test_territory(\"TTO\", 74, 0, 0, 0);\n test_territory(\"TUL\", 426, 0, 0, 497);\n test_territory(\"TUN\", 154, 0, 0, 0);\n test_territory(\"TUR\", 211, 0, 0, 0);\n test_territory(\"TUV\", 8, 0, 0, 0);\n test_territory(\"TVE\", 446, 0, 0, 497);\n test_territory(\"TW\", 110, 1, 0, 529);\n test_territory(\"TWN\", 110, 0, 0, 0);\n test_territory(\"TX\", 393, 0, 0, 411);\n test_territory(\"TY\", 485, 0, 0, 497);\n test_territory(\"TYU\", 472, 0, 0, 497);\n test_territory(\"TZA\", 217, 0, 0, 0);\n test_territory(\"UD\", 465, 0, 0, 497);\n test_territory(\"UGA\", 166, 0, 0, 0);\n test_territory(\"UK\", 289, 1, 0, 408);\n test_territory(\"UKR\", 203, 0, 0, 0);\n test_territory(\"ULY\", 462, 0, 0, 497);\n test_territory(\"UM\", 530, 1, 0, 411);\n test_territory(\"UMI\", 530, 0, 0, 0);\n test_territory(\"UP\", 306, 0, 0, 408);\n test_territory(\"URY\", 156, 0, 0, 0);\n test_territory(\"US\", 411, 1, 0, 0);\n test_territory(\"US-AK\", 394, 0, 0, 411);\n test_territory(\"US-AL\", 365, 0, 0, 411);\n test_territory(\"US-AR\", 366, 0, 0, 411);\n test_territory(\"US-AS\", 28, 1, 0, 411);\n test_territory(\"US-AZ\", 389, 0, 0, 411);\n test_territory(\"US-CA\", 392, 0, 0, 411);\n test_territory(\"US-CO\", 387, 0, 0, 411);\n test_territory(\"US-CT\", 347, 0, 0, 411);\n test_territory(\"US-DC\", 344, 0, 0, 411);\n test_territory(\"US-DE\", 346, 0, 0, 411);\n test_territory(\"US-FL\", 373, 0, 0, 411);\n test_territory(\"US-GA\", 371, 0, 0, 411);\n test_territory(\"US-GU\", 51, 1, 0, 411);\n test_territory(\"US-HI\", 352, 0, 0, 411);\n test_territory(\"US-IA\", 369, 0, 0, 411);\n test_territory(\"US-ID\", 381, 0, 0, 411);\n test_territory(\"US-IL\", 370, 0, 0, 411);\n test_territory(\"US-IN\", 357, 0, 0, 411);\n test_territory(\"US-KS\", 380, 0, 0, 411);\n test_territory(\"US-KY\", 358, 0, 0, 411);\n test_territory(\"US-LA\", 364, 0, 0, 411);\n test_territory(\"US-MA\", 351, 0, 0, 411);\n test_territory(\"US-MD\", 353, 0, 0, 411);\n test_territory(\"US-ME\", 356, 0, 0, 411);\n test_territory(\"US-MI\", 384, 0, 0, 411);\n test_territory(\"US-MID\", 352, 1, 0, 411);\n test_territory(\"US-MN\", 383, 0, 0, 411);\n test_territory(\"US-MO\", 374, 0, 0, 411);\n test_territory(\"US-MP\", 49, 1, 0, 411);\n test_territory(\"US-MS\", 363, 0, 0, 411);\n test_territory(\"US-MT\", 391, 0, 0, 411);\n test_territory(\"US-NC\", 367, 0, 0, 411);\n test_territory(\"US-ND\", 376, 0, 0, 411);\n test_territory(\"US-NE\", 379, 0, 0, 411);\n test_territory(\"US-NH\", 349, 0, 0, 411);\n test_territory(\"US-NJ\", 348, 0, 0, 411);\n test_territory(\"US-NM\", 390, 0, 0, 411);\n test_territory(\"US-NV\", 388, 0, 0, 411);\n test_territory(\"US-NY\", 368, 0, 0, 411);\n test_territory(\"US-OH\", 361, 0, 0, 411);\n test_territory(\"US-OK\", 375, 0, 0, 411);\n test_territory(\"US-OR\", 386, 0, 0, 411);\n test_territory(\"US-PA\", 362, 0, 0, 411);\n test_territory(\"US-PR\", 77, 1, 0, 411);\n test_territory(\"US-RI\", 345, 0, 0, 411);\n test_territory(\"US-SC\", 355, 0, 0, 411);\n test_territory(\"US-SD\", 378, 0, 0, 411);\n test_territory(\"US-TN\", 359, 0, 0, 411);\n test_territory(\"US-TX\", 393, 0, 0, 411);\n test_territory(\"US-UM\", 530, 1, 0, 411);\n test_territory(\"US-UT\", 382, 0, 0, 411);\n test_territory(\"US-VA\", 360, 0, 0, 411);\n test_territory(\"US-VI\", 39, 1, 0, 411);\n test_territory(\"US-VT\", 350, 0, 0, 411);\n test_territory(\"US-WA\", 377, 0, 0, 411);\n test_territory(\"US-WI\", 372, 0, 0, 411);\n test_territory(\"US-WV\", 354, 0, 0, 411);\n test_territory(\"US-WY\", 385, 0, 0, 411);\n test_territory(\"USA\", 411, 0, 0, 0);\n test_territory(\"USA-AK\", 394, 0, 0, 411);\n test_territory(\"USA-AL\", 365, 0, 0, 411);\n test_territory(\"USA-AR\", 366, 0, 0, 411);\n test_territory(\"USA-AS\", 28, 1, 0, 411);\n test_territory(\"USA-AZ\", 389, 0, 0, 411);\n test_territory(\"USA-CA\", 392, 0, 0, 411);\n test_territory(\"USA-CO\", 387, 0, 0, 411);\n test_territory(\"USA-CT\", 347, 0, 0, 411);\n test_territory(\"USA-DC\", 344, 0, 0, 411);\n test_territory(\"USA-DE\", 346, 0, 0, 411);\n test_territory(\"USA-FL\", 373, 0, 0, 411);\n test_territory(\"USA-GA\", 371, 0, 0, 411);\n test_territory(\"USA-GU\", 51, 1, 0, 411);\n test_territory(\"USA-HI\", 352, 0, 0, 411);\n test_territory(\"USA-IA\", 369, 0, 0, 411);\n test_territory(\"USA-ID\", 381, 0, 0, 411);\n test_territory(\"USA-IL\", 370, 0, 0, 411);\n test_territory(\"USA-IN\", 357, 0, 0, 411);\n test_territory(\"USA-KS\", 380, 0, 0, 411);\n test_territory(\"USA-KY\", 358, 0, 0, 411);\n test_territory(\"USA-LA\", 364, 0, 0, 411);\n test_territory(\"USA-MA\", 351, 0, 0, 411);\n test_territory(\"USA-MD\", 353, 0, 0, 411);\n test_territory(\"USA-ME\", 356, 0, 0, 411);\n test_territory(\"USA-MI\", 384, 0, 0, 411);\n test_territory(\"USA-MID\", 352, 1, 0, 411);\n test_territory(\"USA-MN\", 383, 0, 0, 411);\n test_territory(\"USA-MO\", 374, 0, 0, 411);\n test_territory(\"USA-MP\", 49, 1, 0, 411);\n test_territory(\"USA-MS\", 363, 0, 0, 411);\n test_territory(\"USA-MT\", 391, 0, 0, 411);\n test_territory(\"USA-NC\", 367, 0, 0, 411);\n test_territory(\"USA-ND\", 376, 0, 0, 411);\n test_territory(\"USA-NE\", 379, 0, 0, 411);\n test_territory(\"USA-NH\", 349, 0, 0, 411);\n test_territory(\"USA-NJ\", 348, 0, 0, 411);\n test_territory(\"USA-NM\", 390, 0, 0, 411);\n test_territory(\"USA-NV\", 388, 0, 0, 411);\n test_territory(\"USA-NY\", 368, 0, 0, 411);\n test_territory(\"USA-OH\", 361, 0, 0, 411);\n test_territory(\"USA-OK\", 375, 0, 0, 411);\n test_territory(\"USA-OR\", 386, 0, 0, 411);\n test_territory(\"USA-PA\", 362, 0, 0, 411);\n test_territory(\"USA-PR\", 77, 1, 0, 411);\n test_territory(\"USA-RI\", 345, 0, 0, 411);\n test_territory(\"USA-SC\", 355, 0, 0, 411);\n test_territory(\"USA-SD\", 378, 0, 0, 411);\n test_territory(\"USA-TN\", 359, 0, 0, 411);\n test_territory(\"USA-TX\", 393, 0, 0, 411);\n test_territory(\"USA-UM\", 530, 1, 0, 411);\n test_territory(\"USA-UT\", 382, 0, 0, 411);\n test_territory(\"USA-VA\", 360, 0, 0, 411);\n test_territory(\"USA-VI\", 39, 1, 0, 411);\n test_territory(\"USA-VT\", 350, 0, 0, 411);\n test_territory(\"USA-WA\", 377, 0, 0, 411);\n test_territory(\"USA-WI\", 372, 0, 0, 411);\n test_territory(\"USA-WV\", 354, 0, 0, 411);\n test_territory(\"USA-WY\", 385, 0, 0, 411);\n test_territory(\"UT\", 382, 0, 1, 411);\n test_territory(\"UT\", 289, 0, 1, 408);\n test_territory(\"UZB\", 190, 0, 0, 0);\n test_territory(\"VA\", 360, 0, 0, 411);\n test_territory(\"VAT\", 1, 0, 0, 0);\n test_territory(\"VCT\", 42, 0, 0, 0);\n test_territory(\"VE\", 255, 1, 0, 412);\n test_territory(\"VEN\", 215, 0, 0, 0);\n test_territory(\"VER\", 255, 0, 0, 412);\n test_territory(\"VGB\", 24, 0, 0, 0);\n test_territory(\"VGG\", 449, 0, 0, 497);\n test_territory(\"VI\", 39, 1, 0, 411);\n test_territory(\"VIC\", 314, 0, 0, 409);\n test_territory(\"VIR\", 39, 0, 0, 0);\n test_territory(\"VLA\", 428, 0, 0, 497);\n test_territory(\"VLG\", 450, 0, 0, 497);\n test_territory(\"VNM\", 181, 0, 0, 0);\n test_territory(\"VOR\", 439, 0, 0, 497);\n test_territory(\"VT\", 350, 0, 0, 411);\n test_territory(\"VUT\", 84, 0, 0, 0);\n test_territory(\"WA\", 377, 0, 1, 411);\n test_territory(\"WA\", 315, 0, 1, 409);\n test_territory(\"WAK\", 27, 1, 0, 0);\n test_territory(\"WB\", 301, 0, 0, 408);\n test_territory(\"WI\", 372, 0, 0, 411);\n test_territory(\"WLF\", 23, 0, 0, 0);\n test_territory(\"WSM\", 70, 0, 0, 0);\n test_territory(\"WV\", 354, 0, 0, 411);\n test_territory(\"WY\", 385, 0, 0, 411);\n test_territory(\"XJ\", 528, 0, 0, 529);\n test_territory(\"XZ\", 525, 0, 0, 529);\n test_territory(\"YAN\", 469, 0, 0, 497);\n test_territory(\"YAR\", 433, 0, 0, 497);\n test_territory(\"YEM\", 197, 0, 0, 0);\n test_territory(\"YEV\", 492, 0, 0, 497);\n test_territory(\"YN\", 524, 0, 0, 529);\n test_territory(\"YT\", 405, 0, 0, 496);\n test_territory(\"YU\", 246, 1, 0, 412);\n test_territory(\"YUC\", 246, 0, 0, 412);\n test_territory(\"ZA\", 258, 1, 0, 412);\n test_territory(\"ZAB\", 476, 0, 0, 497);\n test_territory(\"ZAC\", 258, 0, 0, 412);\n test_territory(\"ZAF\", 223, 0, 0, 0);\n test_territory(\"ZJ\", 504, 0, 0, 529);\n test_territory(\"ZMB\", 209, 0, 0, 0);\n test_territory(\"ZWE\", 186, 0, 0, 0);\n}", "title": "" }, { "docid": "d09358ab1e29ac66c102c9a387059448", "score": "0.5117225", "text": "public function evaluate_the_sea(){\n\n\n\t}", "title": "" }, { "docid": "f1f4f86f315e9533fb41e29c850ef249", "score": "0.50974965", "text": "public function imprimeCaracteristicas()\n\t{\n\t\techo \"<br />--------------------------------\\n\";\n\t\techo \"<br />Pelicula en DVD:\\n\";\n\t\t//ejecutamos la funciona \"imprimeCaracteristicas()\" de la clase\n\t\t// extendida \"soporte\"\n\t\tparent::imprimeCaracteristicas();\n\t\techo \"<br />Duracion: \".$this->duracion.\"\\n\";\n\t\techo \"<br />Idiomas: \".$this->idiomas.\"\\n\";\n\t\techo \"<br />formato de Pantalla: \".$this->pantalla.\"\\n\";\n\t\techo \"<br />--------------------------------\\n\";\n\t}", "title": "" }, { "docid": "c8815d74753b8ac1cc1fbc112a88eb73", "score": "0.50849545", "text": "function movimentosPossiveis() {\n }", "title": "" }, { "docid": "6a0cb6445233743a3024b2daf6c670d2", "score": "0.5084239", "text": "public function testCreateContadorPatrimonios()\n {\n }", "title": "" }, { "docid": "38988d89c490d926c474ca5c8f833d20", "score": "0.50809413", "text": "public function run()\n {\n $eps = [\n \"Pertandingan Pertarungan Bebas yang Didedikasikan untuk Anda\",\n \"Bodoh\",\n \"Kafein yang Sepi\",\n \"Masa Muda Tanpa Kamu\",\n \"Seeing You in the Crowd\",\n \"Tahun-Tahun Itu\",\n \"Raja Bertelinga Keledai\",\n \"Penggembala dan Biri-biri\",\n \"Romeo dan Juliet\",\n\n \n \"Anak Lelaki yang Penuh Ketakutan\",\n \"Gadis Bersepatu Merah\",\n \"Penyihir Tidur\",\n \"Kisah Hidup Zombi\",\n \"Rapunzel: Kastel Terkutuk\",\n \"Rahasia Janggut Biru\",\n \"Anjing Musim Semi\",\n \"Si Cantik dan Si Buruk Rupa\",\n \"Mencari Jati Diri Sesungguhnya\",\n\n \n \"Titik Biru di Seragam\",\n \"Never Turning Back\",\n \"Menyentak\",\n \"Sindrom Cinta\",\n \"Ekor Kuda Gadis Itu\", \n \"Semprotan Terakhir\",\n \"Sayap Semua Orang\",\n \"Kekanak-kanakan\",\n \"Kenangan\",\n\n \n \"Lonely Night\",\n \"Introduce Me a Good Person\",\n \"Aloha\",\n \"Confession Is Not Flashy\",\n \"Beautiful My Love\",\n \"In Front of City Hall at the Subway Station\",\n \"You Always\",\n \"With My Tears\",\n \"Me to You, You to Me\",\n\n\n\n\n \n \"Revival of the Classics Club and Its History\",\n \"Activities of the Esteemed Classics Club\",\n \"Inheritors of the Classics Club and Its Circumstances\",\n \"Past Days of the Classics Club and Its Glory\",\n \"The Truth of the Classics Club and Its Past\",\n \"To Commit a Grave Sin\",\n \"When the Fog Lifts\",\n \"To the Preview!\",\n \"Murder in the Ghost Town of Furuoka\",\n\n \n \"Set up/Stand up\",\n \"Renewal/Soul\",\n \"Wisdom/Kingdom\",\n \"Marriage/Bonds\",\n \"Ronde/Hound\",\n \"Fear/SIX\",\n \"Anima/Force\",\n \"Close/Friend\",\n \"Curse/Cornered\",\n\n \n \"Ryomen Sukuna\",\n \"Fearsomne Womb\",\n \"Young Fish and Reverse Punishment\",\n \"I'm Gonna Kill You!\",\n \"Kyoto Sister School Goodwill Event\",\n \"Black Flash\",\n \"The Origin of Obedience\",\n \"Hidden Inventory\",\n \"Premature Death\",\n\n \n \"The Shield Hero\",\n \"The Slave Girl\",\n \"Wave of Catastrophe\",\n \"Lullaby at Dawn\",\n \"Filo\",\n \"A New Comrade\",\n \"The Savior of the Heavenly Fowl\",\n \"Curse Shield\",\n \"The Rising of the Shield Hero\",\n\n \n \"Siluman Ular\",\n \"Amalia Tambunan\",\n \"Ilmu Kebal\",\n \"Santet oleh Partisipan\",\n \"Adu Ilmu!\",\n \"Sang Kuntilanak\",\n \"Cantik Sesaat, Cantik sesat\",\n \"Penyembah Setan Dajjal\",\n \"Pembawa Petaka\",\n\n \n \"Sugesti Massal\",\n \"Azis Gagap Bingung\",\n \"Uchiha Roy Ngeprank OVJ\",\n \"Vicky Punya 623 Mantan Pacar\",\n \"Anak Metal Main Tebak Kata\",\n \"Bily Marah\",\n \"Makin Tua Makin Lucu\",\n \"Toko Kenangan Mantan\",\n \"Sayembara Suara Emas\",\n\n \n \"Halo\",\n \"Mama Knows Best\",\n \"Damai Bersamamu\",\n \"Titanium\",\n \"Heaven\",\n \"Karena Ku Sanggup\",\n \"Yang Terlupakan\",\n \"Farewell!\",\n \"We Are The World\",\n\n \n \"Ga Masuk Akal Tapi Nyata\",\n \"Manusia Kanibal\", \n \"Misteri Dalam Air\", \n \"Pantai Berbahaya\", \n \"Orang Dari Masa Depan\", \n \"Kota Kuno\", \n \"Pasar Teraneh\", \n \"Makhluk Tuhan Paling Cantik\", \n \"Jenazah Bangkit Dari Kubur\"\n\n ];\n $count = 0;\n for($i=0; $i<12; $i++){\n for ($j=0; $j<9; $j++) { \n $episode = new episodes;\n $episode->fill([\"movie_id\"=>$i+1,\"episode\"=>$j+1 ,\"title\"=>$eps[$count]]);\n $count = $count+1;\n $episode->save(); \n \n }\n \n } \n\n\n }", "title": "" }, { "docid": "ee44392ccbb9f70ca3f83405b118b5da", "score": "0.5071268", "text": "public function run()\n {\n $sector = new App\\Sector();\n $sector->name = \"Sector primario\";\n $sector->description = \"explotación de materias primas\";\n $sector->save();\n\n\n\n $classifications = [\"Agricultura\", \"Forestal\", \"Pesca\", \"Minería\", \"Cantería\", \"Servicios básicos (electricidad, gas, agua, manejo de desechos)\" ];\n $images = [\"1. Agricultura\", \"2 forestal\", \"3. pesca\", \"2. Mineria\", \"5. Canteria\", \"3. electricidad\" ];\n\n foreach ($classifications as $key => $value) {\n $classification = new App\\Classification;\n $classification->sector_id = $sector->id;\n $classification->classification = $value;\n $classification->default_image = $images[$key];\n $classification->save();\n }\n\n\n $sector = new App\\Sector();\n $sector->name = \"Sector secundario\";\n $sector->description = \"venta de productos elaborados\";\n $sector->save();\n\n $classifications = [\"Manufactura\", \"Construcción\", \"Venta al por mayor y al detalle\" ]; \n $images = [\"4. Manufactura\", \"5. construccion\", \"6. Retail\" ]; \n\n foreach ($classifications as $key => $value) {\n $classification = new App\\Classification;\n $classification->sector_id = $sector->id;\n $classification->classification = $value;\n $classification->default_image = $images[$key];\n $classification->save();\n }\n\n\n $sector = new App\\Sector();\n $sector->name = \"Sector terciario\";\n $sector->description = \"servicios\";\n $sector->save();\n\n $classifications = [\"Transporte\", \"Almacenamiento\", \"Hotelería y actividades de servicios de comida\", \"Información y comunicación\", \"Actividades financieras y de seguros\", \"Actividades inmobiliarias o de corretaje\", \"Actividades técnicas, científicas y profesionales\", \"Actividades administrativas y de soporte\", \"Administración pública y defensa; seguridad social obligatoria\", \"Educación\", \"Salud humana y actividades de trabajo social\", \"Arte, entretenimiento y recreación\", \"Otras actividades de servicios\" ];\n $images = [\"10 transporte\", \"7. Almacenamiento\", \"8. restorant 1\", \"9. comunicacion\", \"10. financiera\", \"11. inmobiliaria\", \"12 ciencias\", \"13. administracion\", \"14. seguridad\", \"15. educacion\", \"16. medicina\", \"17. arte\", \"18.otros servicios\" ];\n\n foreach ($classifications as $key => $value) {\n $classification = new App\\Classification;\n $classification->sector_id = $sector->id;\n $classification->classification = $value;\n $classification->default_image = $images[$key];\n $classification->save();\n }\n\n\n $business_type = new App\\BusinessType();\n $business_type->type = 'B2B';\n $business_type->name = 'business to business';\n $business_type->description = 'si sus clientes son otras empresas';\n $business_type->save();\n\n $business_type = new App\\BusinessType();\n $business_type->type = 'B2C';\n $business_type->name = 'business to customer';\n $business_type->description = 'si sus clientes son personas';\n $business_type->save();\n\n }", "title": "" }, { "docid": "8522a9598f679aab0d5903d99dc311dc", "score": "0.5065573", "text": "public function run()\n {\n $questions = [\n 0 => [\n 'question' => 'Are you male or female?',\n 'sort' => 1,\n 'answers' => [\n 'Female',\n 'Male'\n ]\n ],\n 1 => [\n 'question' => 'What is your budget for a full skincare regime (including all products)?',\n 'sort' => 2,\n 'answers' => [\n '£50 - £75',\n '£75 - 100',\n '£100 - 150',\n '£150 - 200',\n '£200+'\n ]\n ],\n 2 => [\n 'question' => 'What is your age?',\n 'sort' => 3,\n 'answers' => [\n '25 and under',\n '26 - 30',\n '31 - 40',\n '41 - 50',\n '51 - 65',\n '65+'\n ]\n ],\n 3 => [\n 'question' => 'How many products would you be willing to use in your regime?',\n 'sort' => 4,\n 'answers' => [\n '2', '3', '4', '5', '6+'\n ]\n ],\n 4 => [\n 'question' => 'What is your natural skin tone?',\n 'sort' => 5,\n 'answers' => [\n 'Type 1 ()',\n 'Type 2 ()',\n 'Type 3 ()',\n 'Type 4 ()',\n 'Type 5 ()'\n ]\n ],\n 5 => [\n 'question' => 'After spending time in the sun, my skin becomes:',\n 'sort' => 6,\n 'answers' => [\n 'My skin always burns, never tans',\n 'My skin usually burns, tans with some difficulty',\n 'My skin burns sometimes and is slow to tan',\n 'My skin rarely burns and tans quickly',\n 'My skin rarely burns; it is really easy and fast to tan',\n 'My skin almost never burns; fast and dark tanning'\n ]\n ],\n 6 => [\n 'question' => 'When you first wake up in the morning (before using any product), how does your skin feel?',\n 'sort' => 7,\n 'answers' => [\n 'Oily all over',\n 'Oily t-zone, dry cheeks',\n 'Normal',\n 'Dry everywhere',\n 'Other'\n ]\n ],\n 7 => [\n 'question' => 'Skincare moisturizers, makeup, and cleansers cause my face to break out, itch or burn:',\n 'sort' => 8,\n 'answers' => [\n 'Always',\n 'Often',\n 'Sometimes',\n 'Rarely',\n 'Never'\n ]\n ],\n 8 => [\n 'question' => 'Which best describes the results you are looking for in your new regime?',\n 'sort' => 9,\n 'answers' => [\n 'Reducing blemishes/acne',\n 'Adding more moisture to dry skin',\n 'Anti-aging results',\n 'General improvement in texture and radiance, no specific concerns',\n 'Improving scarring'\n ]\n ],\n 9 => [\n 'question' => 'How would you best describe your living environment :',\n 'sort' => 10,\n 'answers' => [\n 'High sun exposure, high pollution levels',\n 'Low sun exposure, high pollution levels',\n 'High sun exposure, low pollution levels',\n 'Low sun exposure, low pollution levels'\n ]\n ],\n 10 => [\n 'question' => 'Do you suffer with any of the following concerns:',\n 'sort' => 11,\n 'answers' => [\n 'Acne',\n 'Spots',\n 'Pigmentation marks',\n 'Scarring',\n 'Excessive oiliness',\n 'Bumps under the skin',\n 'Ezcema / Dry patches',\n 'Rosacea / Redness',\n 'Sensitive skin',\n 'Fine lines',\n 'Wrinkles',\n 'Enlarged pores',\n 'Blackheads',\n 'Dullness',\n 'Dark circles around the eyes',\n 'Puffiness around the eyes',\n 'Sagging skin',\n 'None'\n ]\n ],\n 11 => [\n 'question' => 'Which types of ingredients sensitive to?',\n 'sort' => 12,\n 'answers' => [\n 'Fragrances',\n 'Essential oils',\n 'Vitamins',\n 'Gluten',\n 'Shea Butter',\n 'Nuts',\n 'Other',\n 'None'\n ]\n ],\n 12 => [\n 'question' => 'Do you have any additional requirements from the brands you use?',\n 'sort' => 13,\n 'answers' => [\n 'Vegan',\n 'Fragrance free',\n 'High % natural',\n 'Hypoallergenic',\n 'Suitable for those pregnant or breast feeding',\n 'None'\n ]\n ],\n ];\n\n\n foreach ($questions as $item){\n\n\n $question = new \\App\\Question();\n\n $question->title = $item['question'];\n $question->sort = $item['sort'];\n $question->is_active = 1;\n $question->created_by = 1;\n $question->updated_by = 1;\n $question->save();\n foreach($item['answers'] as $ans){\n\n $question->answers()->create([\n 'title' => $ans,\n 'created_by' => 1,\n 'updated_by' => 1\n ]);\n }\n\n }\n\n\n\n }", "title": "" }, { "docid": "71b73fd558a68b77bef94d46b13c58cb", "score": "0.50603", "text": "public function __construct() {\n \n $descripcion = \"Hoy en día, la tecnología juega un papel esencial en la comunicación cotidiana de la sociedad. Las plataformas digitales le brindan a las empresas medios alternativos y eficaces, que permiten establecer relaciones que tienden a perdurar en el tiempo. \";\n $puntosClavesIntro = \"Contamos con la experiencia tecnológica que permitirá conectar su empresa con el consumidor de forma diferente y virtual, mediante:\";\n $puntosClaves= array('Diseño y programación de páginas web.','Desarrollo de aplicaciones personalizadas basadas en la web.','Web Hosting.','Implementaciones de software.','SEO - Optimización en motores de búsqueda.');\n $sceenshots = array('primero');\n $descripcionCorta = 'Conecta tus actividades empresariales al mundo virtual.';\n parent::__construct($descripcion, $puntosClavesIntro, $puntosClaves, $screenshots,$descripcionCorta);\n }", "title": "" }, { "docid": "b9aa39739617077a1e0d61a2a080c8d2", "score": "0.50570416", "text": "public function run()\n {\n if (advantages::count() == 0){\n advantages::create([\n 'icon' => 'fa fa-arrow-down',\n 'name' => '100%',\n 'text' => 'Уменьшение падежа телят до 100%',\n ]);\n advantages::create([\n 'icon' => 'fa fa-balance-scale',\n 'name' => '850',\n 'text' => 'Средний привес телят 850 г/сутки',\n ]);\n advantages::create([\n 'icon' => 'fa fa-heart',\n 'name' => '100%',\n 'text' => '100% Повышенный иммунитет',\n ]);\n\n\n }\n }", "title": "" }, { "docid": "c716b93260cb996ca552de6f52442b76", "score": "0.5054109", "text": "public function run()\n {\n \n\n $program= new App\\Program();\n $program->name=\"CAJERO COMERCIAL - 3 meses\";\n $program->description=\"Trabaja como cajero en centros comerciales del sector retail.\n Sede Lima, sede Huancayo, sede Huánuco, sede Iquitos, sede Pucallpa, sede Tarapoto.\";\n\n $program->icon=\"ico-cajero-promotor.png\";\n $program->save();\n\n $program= new App\\Program();\n $program->name=\"- CAJERO PROMOTOR DE SERVICIOS FINANCIEROS Y COMERCIALES - 6 meses\";\n\n $program->description=\"Podrás desempeñarte como cajero en negocios, comercios, empresas, entidades bancarias y más.\n Sedes Lima, sede Huancayo, sede Huánuco, sede Iquitos, sede Pucallpa, sede Tarapoto.\";\n $program->icon=\"ico-asistente-contable.png\";\n $program->save();\n\n $program= new App\\Program();\n $program->name=\"ASISTENTE CONTABLE - 6 meses\";\n $program->description=\"Realiza todo tipo de análisis financieros y contables de manera eficiente.\n Sedes Lima, sede Huánuco, sede Iquitos, sede Pucallpa, sede Tarapoto.\";\n $program->icon=\"ico-cajero-comercial.png\";\n $program->save();\n\n $program= new App\\Program();\n $program->name=\"GESTOR DE CRÉDITOS Y COBRANZAS - 6 meses\";\n $program->description=\"Gestiona de manera efectiva créditos y cobranzas para todo tipo de negocios.\n Sedes Lima, sede Huancayo, sede Huánuco, sede Iquitos, sede Pucallpa, sede Tarapoto.\";\n $program->icon=\"ico-gestor-ventas.png\";\n $program->save();\n\n $program= new App\\Program();\n $program->name=\"- ASISTENTE DE GERENCIA - 6 meses\";\n\n $program->description=\"Adquiere los conocimientos necesarios para apoyar a los gerentes.\n Sedes Lima\";\n $program->icon=\"ico-asistente-gerencia.png\";\n $program->save();\n\n $program= new App\\Program();\n $program->name=\"- GESTOR DE VENTAS - 6 meses\";\n $program->description=\"Aprende procedimientos y técnicas de venta efectivas.\n Sedes Lima, Pucallpa.\";\n $program->icon=\"ico-gestor-credito.png\";\n $program->save();\n\n\n\n }", "title": "" }, { "docid": "976255b7efe8620162154ffab67b8f12", "score": "0.50418633", "text": "function getDescription() {\n return \"Jurnal Club for OJS\";\n }", "title": "" }, { "docid": "7cd88e429b50c25ad6f5f9f12b72932a", "score": "0.5039078", "text": "function cl_aberturaexercicio() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"aberturaexercicio\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "8cdd1dbf3e775b22885c8debb3cadf5f", "score": "0.5023146", "text": "function lifeimprovementrpt()\n\t{\n\t\t$this->load->model('constantmodel');\n\t\t\n\t\t$this->data['elder_elderWorkAbility'] = $this->constantmodel->get_sub_constant(45);\n\t\t$this->data['elder_familyMember'] = $this->constantmodel->get_sub_constant(46);\n\t\t$this->data['elder_choice'] = $this->constantmodel->get_sub_constant(38);\n\t\t\n\t}", "title": "" }, { "docid": "b5bf68cbb899c88cf01ba3b7bb0592b2", "score": "0.5019253", "text": "public function __construct() {\n \n $descripcion = \"Disponemos del conocimiento y los recursos necesarios para que los consumidores tengan una experiencia visual agradable con la imagen de tu empresa. Tanto la identidad corporativa como los recursos de comunicación que debe proyectar su entidad, representan una oportunidad de atraer a consumidores potenciales.\";\n $puntosClavesIntro = \"Podemos ayudarte con:\";\n $puntosClaves= array('Diseño de material publicitario y promocional.','Multimedia.','Diseño, creación y producción de material audiovisual.','Impresión de todo tipo de material publicitario.');\n $descricionCorta = 'Comunicación atractiva para todo tipo de público.';\n $sceenshots = array('primero');\n \n parent::__construct($descripcion, $puntosClavesIntro, $puntosClaves, $screenshots,$descricionCorta);\n }", "title": "" }, { "docid": "ea63454fb8efe2fc865378dfaf70682c", "score": "0.5016656", "text": "public static function getMajorChoices()\n {\n return array(\n 0=>\"-- Select Major --\",\n 1=>\"Agricultural Business and Production\",\n 2=>\"Agriculture/Agricultural Sciences\",\n 3=>\"Architecture and Related Programs\",\n 4=>\"Area, Ethnic and Cultural Studies\",\n 5=>\"Arts - Visual and Performing\",\n 6=>\"Basic Skills\",\n 7=>\"Biological Sciences/Life Sciences\",\n 8=>\"Business Mgmt and Admin. Services\",\n 9=>\"Citizenship Activities\",\n 10=>\"Communications\",\n 11=>\"Computer and Information Sciences\",\n 12=>\"Conservation and Renew. Nat. Resources\",\n 13=>\"Construction Trades\",\n 14=>\"Dental, Medical And Veterinary Residency Programs\",\n 15=>\"Education\",\n 16=>\"Educational/Instruc. Media Tech./Technician\",\n 17=>\"Engineering\",\n 18=>\"Engineering-Rel. Technol./Technician\",\n 19=>\"English Language and Lit./Letters\",\n 20=>\"Foreign Languages and Literatures\",\n 21=>\"Health Professions and Related Sciences\",\n 22=>\"Health-Related Knowledge and Skills\",\n 23=>\"High School/Secondary Diplomas and Certificates\",\n 24=>\"History\",\n 25=>\"Home Economics\",\n 26=>\"Interpersonal and Social Skills\",\n 27=>\"Law and Legal Studies\",\n 28=>\"Leisure and Recreational Activities\",\n 29=>\"Lib. Art and Sciences, Gen. Studies and Humanities\",\n 30=>\"Library Science\",\n 31=>\"Marketing Ops./Marketing and Distrib.</option\",\n 32=>\"Mathematics\",\n 33=>\"Mechanics and Repairers\",\n 34=>\"Military Studies\",\n 35=>\"Military Technologies\",\n 36=>\"Multi/Interdisciplinary Studies\",\n 37=>\"Parks, Rec., Leisure, and Fitness Studies\",\n 38=>\"Personal and Miscellaneous Services\",\n 39=>\"Personal Awareness and Self-Improvement\",\n 40=>\"Philosophy and Religion\",\n 41=>\"Physical Sciences\",\n 42=>\"Precision Production Trades\",\n 43=>\"Protective Services\",\n 44=>\"Psychology\",\n 45=>\"Public Administration and Services\",\n 46=>\"Science Technol./Technicians\",\n 47=>\"Social Sciences and History\",\n 48=>\"Theological Studies and Religious Vocations\",\n 49=>\"Transport. and Materials Moving Workers\",\n 50=>\"Travel, Tourism, and Culinary Arts\",\n 51=>\"Vocational Home Economics\",\n );\n }", "title": "" }, { "docid": "c9c28206272728cd0c6a1d3907206bed", "score": "0.50132966", "text": "function estadisticasAnuales(){\n\t\techo $this->templates->render('Inicio/estadisticas-anuales');\n\t}", "title": "" }, { "docid": "a25c40a0e3c0e0b2b69f6ab06a832f36", "score": "0.50070816", "text": "public function hitungLuas();", "title": "" }, { "docid": "5be5002edf4b4e50fbfb5ad1d00533fc", "score": "0.5006077", "text": "function formulaires_carte_voeux_2017_verifier_dist($acteur){\n\t$erreurs = array();\n\tforeach(array('autho') as $obli) {\n\t\t\tif (!_request($obli))\n\t\t\t$erreurs[$obli] = (isset($erreurs[$obli])?$erreurs[$obli]:'') . \"Vous devez accepter les conditions d'utilisation pour participer à la mosa&iuml;que\";\n\t\t\t\t\n\t}\n\treturn $erreurs;\n}", "title": "" }, { "docid": "f6651ab8ef43d514825e582e235bbed3", "score": "0.5000848", "text": "function prenotazioniLaboratorio() {\n $lab = new LaboratorioController();\n $laboratorio = $lab->idLaboratorio();\n\n $prenotazione = new Prenotazione();\n $prenotazioni = $prenotazione->trovaPrenotazioniLaboratorio($laboratorio['id']);\n \n if($prenotazioni == false) {\n return false;\n } else {\n $tamponiLaboratorio = array();\n $tampone = new Tampone();\n foreach($prenotazioni as $prenotazione) {\n $tamponiLaboratorio[] = $tampone->trovaTamponi($prenotazione['id']);\n }\n return $tamponiLaboratorio; \n }\n }", "title": "" }, { "docid": "b33dd6f84bcdd1c151a9e92b5db20193", "score": "0.4999335", "text": "function matikan_laptop(){\n\t\t}", "title": "" }, { "docid": "b23604110b2764ef539247c64e7df569", "score": "0.49974963", "text": "private function getSueldoBasico(){\n\t\t\t$sueldo = ($this->Empleoplanta->EMPL_SUELDO)*(($this->Empleoplanta->EMPL_DIASAPAGAR)/30);\n\t\treturn ($sueldo);\n }", "title": "" }, { "docid": "b1aea7b1754c4b46b7f7b16d3b63a831", "score": "0.4984776", "text": "function cl_examerequisicaoexame() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"examerequisicaoexame\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "8e5a048c71fe9ad3bf887f5eeea4d9c1", "score": "0.49816614", "text": "public function test_helpfulness() {\n \n }", "title": "" }, { "docid": "b0d0fe2a3aa8925f8fd092bf864b7a52", "score": "0.4980107", "text": "public function testApplyPlanning()\n {\n }", "title": "" }, { "docid": "d8f72b5fa61c966d2ce92377e2a83e48", "score": "0.4968498", "text": "function lab($fecharecibida,$fechaenviada,$ahora){\n$aniolab=0;\n$meslab=0;\n$diaslab=0;\n$horares=0;\n$minres=0;\n\nlist($fecha1,$hora1)=explode(\" \",$fecharecibida);\nlist($fecha2,$hora2)=explode(\" \",$fechaenviada);\nlist($hora3,$ms1)=explode(\".\",$hora1);\nlist($hora4,$ms2)=explode(\".\",$hora2);\n\n$fecharec=$fecha1;\n$fechaen=$fecha2;\n$horarec=$hora3;//hora de recepcion\n$horaen=$hora4;//hora de envio\n\nlist($diar,$mesr,$anior) = explode(\"/\",$fecharec);\nlist($diae,$mese,$anioe) = explode(\"/\",$fechaen);\n\nif ($anioe<1971){\n\t$fechaen = $ahora;\n\tlist($diae,$mese,$anioe) = explode(\"/\",$fechaen);\n\tlist($anioe,$horaen) = explode(\" \",$anioe);\n}\n\nif ($anior<1971){\n\t$fecharec = $ahora;\n\tlist($diar,$mesr,$anior) = explode(\"/\",$fecharec);\n\tlist($anior,$horarec) = explode(\" \",$anior);\n}\n\n$hora3=$horarec;\n$hora4=$horaen;\n\nlist($h1,$m1)=explode(\":\",$hora3);\nlist($h2,$m2)=explode(\":\",$hora4);\n\n$timestamp1=mktime(0,0,0,$mesr,$diar,$anior);\n$timestamp2=mktime(0,0,0,$mese,$diae,$anioe);\n\n$dif_secs = $timestamp2 - $timestamp1;\n$diastotales=$dif_secs/86400 +1;\n$fechainicio=$fecharec;\n$diaslab=0;\n\nfor ($i=$diastotales;$i>0;$i--){\n\tlist($diai,$mesi,$anioi) = explode(\"/\",$fechainicio);\n\tif(!checkdate($mesi,$diai,$anioi)){\n\t\tif ($mesi>12){\n\t\t\t$diai=1;\n\t\t\t$mesi=1;\n\t\t\t$anioi++;\n\t\t}else{\n\t\t\t$diai=1;\n\t\t\t$mesi++;\n\t\t}\n\t\t$i++;\n\t\t$fechainicio=$diai.\"/\".$mesi.\"/\".$anioi;\n\t}else{\n\t\t$diasem= date(\"w\",mktime(0,0,0,$mesi,$diai,$anioi));\n\t\tif ($diasem==\"6\" || $diasem==\"0\"){\n\t\t}else{\n\t\t\t$diaslab++;\n\t\t}\n\t\t$diai++;\n\t\t$fechainicio = $diai.\"/\".$mesi.\"/\".$anioi;\n\t}\n}\n\nif ($diaslab<2){\n\t$diaslab=0;\n}else{\n\t$diaslab = $diaslab - 2;\n}\n\nif ($diar == $diae){\n\t$horares=($horaen-$horarec);\n}else{\n\t$horares=(\"16:00:00\"-$horarec)+($horaen-\"08:00:00\");\n}\n\nif (($diar == $diae)&&($h1==$h2)){\n\t$minres=$m2-$m1;\n}else{\n\t$minres=(60-$m1)+$m2;\n}\n\nif ($m2<$m1){\n\t$horares--;\n}\n\nif ($minres<60){\n\t//\n}else{\n\t$minres=$minres-60;\n}\n\nif ($horares<8||$diar==$diae){\n\t//\n}else{\n\t$diaslab++;\n\t$horares=$horares-8;\n}\n\nif ($diaslab>30){\n\t$meslab=floor($diaslab/30);\n\t$diaslab=$diaslab%30;\n}\n$hora3=$horarec;\nif ($meslab>12){\n\t$aniolab=floor($meslab/12);\n\t$meslab=$meslab%12;\n}\n\nif ($aniolab>1){\n\t$alabel=\" años, \";\n}else{\n\t$alabel=\" año, \";\n}\n\nif ($meslab>1){\n\t$melabel=\" meses, \";\n}else{\n\t$melabel=\" mes, \";\n}\n\nif ($diaslab>1){\n\t$dlabel=\" dias, \";\n}else{\n\t$dlabel=\" dia, \";\n}\n\nif ($horares>1){\n\t$hlabel=\" horas y \";\n}else{\n\t$hlabel=\" hora y \";\n}\n\nif ($minres>1){\n\t$milabel=\" minutos\";\n}else{\n\t$milabel=\" menos de un minuto\";\n}\n\nif ($aniolab<>'0'){\n\t$tiempolaboral=$aniolab.$alabel.$meslab.$melabel.$diaslab.$dlabel.$horares.$hlabel.$minres.$milabel;\n}else{\n\tif ($meslab<>'0'){\n\t\t$tiempolaboral=$meslab.$melabel.$diaslab.$dlabel.$horares.$hlabel.$minres.$milabel;\n\t}else{\n\t\tif ($diaslab<>'0'){\n\t\t\t$tiempolaboral=$diaslab.$dlabel.$horares.$hlabel.$minres.$milabel;\n\t\t}else{\n\t\t\tif($horares<>'0'){\n\t\t\t\t$tiempolaboral=$horares.$hlabel.$minres.$milabel;\n\t\t\t}else{\n\n\t\t\t\t\tif ($minres>1){\n\t\t\t\t\t\t$tiempolaboral=$minres.$milabel;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$tiempolaboral=$milabel;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}\n}\n\nreturn $tiempolaboral;\n\n}", "title": "" }, { "docid": "053fbdea7e854e2c3b5c5d4b8410e27e", "score": "0.49678522", "text": "public function run()\n {\n $a = [\n ['name' => 'Beloit College'],\n ['name' => 'Brown University'],\n ['name' => 'California State University-Fresno'],\n ['name' => 'California State University-Stanislaus'],\n ['name' => 'Carleton College'],\n ['name' => 'Carnegie Mellon University'],\n ['name' => 'Case Western Reserve University'],\n ['name' => 'Central Michigan University'],\n ['name' => 'Dartmouth College'],\n ['name' => 'Eastern Connecticut State University'],\n ['name' => 'George Fox University'],\n ['name' => 'Georgetown University'],\n ['name' => 'Hampshire College'],\n ['name' => 'Indiana University-Bloomington'],\n ['name' => 'Institute of Ocean Technology'],\n ['name' => 'Johns Hopkins University'],\n ['name' => 'Lehigh University'],\n ['name' => 'Marquette University'],\n ['name' => 'Massachusetts Institute of Technology'],\n ['name' => 'Minnesota State University-Mankato'],\n ['name' => 'Muskingum University'],\n ['name' => 'Northwestern University'],\n ['name' => 'Occidental College'],\n ['name' => 'Pomona College'],\n ['name' => 'Rensselaer Polytechnic Institute'],\n ['name' => 'Rice University'],\n ['name' => 'Simmons College'],\n ['name' => 'Smith College'],\n ['name' => 'Stanford University'],\n ['name' => 'SUNY College at Oswego'],\n ['name' => 'Swarthmore College'],\n ['name' => 'The University of Texas at Dallas'],\n ['name' => 'Tufts University'],\n ['name' => 'United States Military Academy'],\n ['name' => 'University of Arizona'],\n ['name' => 'University of California-Berkeley'],\n ['name' => 'University of California-Davis'],\n ['name' => 'University of California-Irvine'],\n ['name' => 'University of California-Los Angeles'],\n ['name' => 'University of California-Merced'],\n ['name' => 'University of California-San Diego'],\n ['name' => 'University of California-Santa Cruz'],\n ['name' => 'University of Connecticut'],\n ['name' => 'University of Delaware'],\n ['name' => 'University of Evansville'],\n ['name' => 'University of Georgia'],\n ['name' => 'University of Memphis'],\n ['name' => 'University of Michigan-Ann Arbor'],\n ['name' => 'University of Pennsylvania'],\n ['name' => 'University of Richmond'],\n ['name' => 'University of Rochester'],\n ['name' => 'University of Southern California'],\n ['name' => 'University of Virginia'],\n ['name' => 'University of Wisconsin-Stout'],\n ['name' => 'Vanderbilt University'],\n ['name' => 'Vassar College'],\n ['name' => 'Whitman College'],\n ['name' => 'Yale University'],\n ];\n\n foreach($a as $uni) {\n University::firstOrCreate($uni);\n }\n }", "title": "" }, { "docid": "7d2a8dec23b378c220e8de21ee5bd3ab", "score": "0.49673778", "text": "function view_intro() {\n $formatoptions = new stdClass;\n $formatoptions->noclean = true;\n\n print_box_start();\n echo format_text($this->assignment->description, $this->assignment->format, $formatoptions);\n print_box_end();\n }", "title": "" }, { "docid": "33b99342cc6f1d2de224207de8927b78", "score": "0.49513137", "text": "function armarFormularioEstructura(){\n\t\t$this->armarFormulario();\n\t}", "title": "" }, { "docid": "bd872792cf0ff54fd6fa9daaa0d860ef", "score": "0.49508917", "text": "public function bajarPantallaElectrica( ) {\n $this->setEstadoPantallaElectrica(1);\n $this->setComando(self::$PANTALLA_ELECTRICA, \"ABAJO\");\n }", "title": "" }, { "docid": "0319798cc06713cf7240ac0cb7f36915", "score": "0.49432334", "text": "public function definition()\n {\n $help = array();\n $countOfParagraph = rand(2, 10);\n for ($i = 1; $i <= $countOfParagraph; $i++) {\n// $pathToImg = url('images/demo/demo1/'.DemoData::DemoImages()[rand(1,19)]->getBaseName());\n// $help[] = '<img src=\"'.$pathToImg.'\" class=\"img-fluid\">';\n $help[] = $this->faker->realText(mt_rand(100, 300));\n }\n $help = implode('<br><br>', $help);\n\n return [\n 'key' => $this->faker->unique()->randomNumber($nbDigits = 4),\n 'title' => $this->faker->unique()->realText(50),\n 'help_ru' => $help,\n 'help_en' => $help,\n ];\n }", "title": "" }, { "docid": "58531fc646d48bd284226110e661e6f2", "score": "0.49362546", "text": "function createGamePage()\n{\n\n // gibt die eingabefelder für den nutzer aus\n printInputTools();\n\n\n // erstellt die beiden tabellen zur darstellung bisheriger versuche\n printTrylistBeautiful();\n}", "title": "" }, { "docid": "15d0acde6405227e5c7081c7e0369204", "score": "0.49356115", "text": "public function run()\n {\n $lab1=Analysis::create([\n 'en_name'=>'CPK ',\n 'en_desc'=>'CPK - Total',\n 'original_cost' =>200,\n 'discount_pct' =>10\n ]);\n\n $lab2=Analysis::create([\n 'en_name'=>'Fasting Blood Glucose ',\n 'en_desc'=>' Total-Fasting Blood Glucose',\n 'original_cost' =>400,\n 'discount_pct' =>10\n ]);\n\n $lab3=Analysis::create([\n 'en_name'=>'Amylase ',\n 'en_desc'=>'Amylase - Total',\n 'original_cost' =>300,\n 'discount_pct' =>15\n ]);\n //\n }", "title": "" }, { "docid": "3d036b1067ed11807af7326124b4ee67", "score": "0.49345592", "text": "public function definition()\n {\n $newfaker = $this->faker;\n $newfaker->addProvider(new \\Faker\\Provider\\en_ZA\\Person($this->faker));\n\n $job = $this->faker->randomElement([\n 'nurse','factory','construction','informal','other'\n ]);\n \n $religion = $this->faker->randomElement([\n 'christianity','islam','hinduism','buddhism','sikhism','judaism'\n ]);\n \n $unemployed = $this->faker->randomElement([\n true,false\n ]);\n $eat_pig = $this->faker->randomElement([\n true,false\n ]);\n $status = $this->faker->randomElement([\n \"待聘女傭\",\"直聘\",\"已收合同但未有簽證者\",\"請確定航程\",\"已收合同但未有簽證,有預訂機者\",\"已收合同和簽證,有預訂機票者\",\"航程已被確定\",\"機票在侯補單\",\"已收合同和簽證,有預訂機票者\"\n ]);\n $marital_status = $this->faker->randomElement([\n 'married','widowed','separated','divorced','single'\n ]);\n\n if($unemployed){\n $visa['in'] = $this->faker->dateTimeThisYear();\n $visa['out'] = $this->faker->dateTimeInInterval($startDate = '+2 years', $interval = '+ 5 days', $timezone = null);\n $employer = $this->faker->name;\n } else {\n $visa['in'] = NULL;\n $visa['out'] = NULL;\n $employer = NULL;\n }\n \n\n return [\n 'bio_no' => $this->faker->userName,\n 'name' => $this->faker->name,\n 'jobs' => $job,\n 'unemployed' => $unemployed,\n 'cfm_date' => $this->faker->date,\n 'employer_name' => $employer,\n 'medical_date' => $this->faker->dateTime,\n 'medical_result' => '',\n 'passport_no' => $newfaker->idNumber,\n 'passport_expired' => $this->faker->dateTime,\n 'jo_type' => 'other',\n 'jo_rcv_date' => $this->faker->dateTime,\n 'jo_no' => $this->faker->buildingNumber,\n 'mofa_rcv_date' => $this->faker->dateTime,\n 'mofa_no' => $this->faker->buildingNumber,\n 'visa_in' => $visa['in'],\n 'visa_out' => $visa['out'],\n 'jpl_date' => $this->faker->buildingNumber,\n 'flight_date' => $this->faker->dateTime,\n 'flight_no' => $this->faker->swiftBicNumber,\n 'flight_eta' => $this->faker->dateTime,\n 'marital_status' => $marital_status,\n 'address' => $this->faker->address,\n 'dob' => $this->faker->dateTime,\n 'gender' => 'female',\n 'height' => $this->faker->numberBetween(150,180),\n 'weight' => $this->faker->numberBetween(40,200),\n 'religion' => $religion,\n 'eat_pig' => $eat_pig,\n 'status' => $status,\n ];\n }", "title": "" }, { "docid": "83f86f683eceb8e99b27d8f19114fd43", "score": "0.49341017", "text": "public function run()\n { \n $maize_types = ['katumani','40A','70B','A009','30G19','P3812','Twiga 81'];\n $facts = ['species'=>'maize','optimal_conditions'=>'cool and wet','months_to_maturity'=>6,'production_rate'=>30,'shelf_life'=>1040,'storage_meth'=>'Dry the Seed And Put in bags','price_per_bag'=>1800];\n \n $bean_types= ['rosecoco','chik peas','aduki','black eyed peas','soya','marowfat','black turtle'];\n $bean_facts = ['species'=>'beans','optimal_conditions'=>'cool and wet','months_to_maturity'=>3,'production_rate'=>30,'shelf_life'=>1040,'storage_meth'=>'Dry the Seed And Put in bags','price_per_bag'=>2800];\n \n $wheat_types= ['lemeso','haby','mangudo','amina','durum','sallet','wheat-thinopyrum'];\n $wheat_facts = ['species'=>'wheat','optimal_conditions'=>'cool and dry','months_to_maturity'=>6,'production_rate'=>30,'shelf_life'=>1040,'storage_meth'=>'Dry the Seed And Put in bags','price_per_bag'=>1800];\n \n $rice_types = ['kienyeji','exotic'];\n $rice_facts = ['species'=>'wheat','optimal_conditions'=>'cool and wet','months_to_maturity'=>6,'production_rate'=>30,'shelf_life'=>1040,'storage_meth'=>'Dry the Seed And Put in bags','price_per_bag'=>4800];\n \n $tea_types= ['green','purple'];\n $tea_facts = ['species'=>'tea','optimal_conditions'=>'cool and wet','months_to_maturity'=>24,'production_rate'=>300,'shelf_life'=>0,'storage_meth'=>'perishable','price_per_bag'=>300];\n \n $coffee_types= ['arabica','robusta'];\n $coffee_facts = ['species'=>'cofee','optimal_conditions'=>'cool and wet','months_to_maturity'=>24,'production_rate'=>300,'shelf_life'=>0,'storage_meth'=>'perishable','price_per_bag'=>300];\n \n $x = 0;\n while (True) {\n while ($x < count($maize_types)) {\n DB::table('plant_fact_sheets')->insert([\n 'species' =>'maize',\n 'type'=>$maize_types[$x],\n 'optimal_conditions' =>$facts['optimal_conditions'],\n 'months_to_maturity' =>$facts['months_to_maturity'],\n 'production_rate' =>$facts['production_rate'],\n 'shelf_life' =>$facts['shelf_life'],\n 'storage_meth' =>$facts['storage_meth'],\n 'price_per_bag' =>$facts['price_per_bag'],\n ]);\n $x+=1;\n }\n\n\n $pointer = 0;\n while ($pointer < count($bean_types) ) {\n DB::table('plant_fact_sheets')->insert([\n 'species' =>'beans',\n 'type'=>$bean_types[$pointer],\n 'optimal_conditions' =>$bean_facts['optimal_conditions'],\n 'months_to_maturity' =>$bean_facts['months_to_maturity'],\n 'production_rate' =>$bean_facts['production_rate'],\n 'shelf_life' =>$bean_facts['shelf_life'],\n 'storage_meth' =>$bean_facts['storage_meth'],\n 'price_per_bag' =>$bean_facts['price_per_bag'],\n ]);\n $pointer += 1;\n }\n\n \n $pointer = 0;\n while ($pointer < count($wheat_types) ) {\n DB::table('plant_fact_sheets')->insert([\n 'species' =>'wheat',\n 'type'=>$wheat_types[$pointer],\n 'optimal_conditions' =>$wheat_facts['optimal_conditions'],\n 'months_to_maturity' =>$wheat_facts['months_to_maturity'],\n 'production_rate' =>$wheat_facts['production_rate'],\n 'shelf_life' =>$wheat_facts['shelf_life'],\n 'storage_meth' =>$wheat_facts['storage_meth'],\n 'price_per_bag' =>$wheat_facts['price_per_bag'],\n ]);\n $pointer += 1;\n }\n\n \n \n \n $pointer = 0;\n while ($pointer < count($rice_types) ) {\n DB::table('plant_fact_sheets')->insert([\n 'species' =>'rice',\n 'type'=>$rice_types[$pointer],\n 'optimal_conditions' =>$rice_facts['optimal_conditions'],\n 'months_to_maturity' =>$rice_facts['months_to_maturity'],\n 'production_rate' =>$rice_facts['production_rate'],\n 'shelf_life' =>$rice_facts['shelf_life'],\n 'storage_meth' =>$rice_facts['storage_meth'],\n 'price_per_bag' =>$rice_facts['price_per_bag'],\n ]);\n $pointer += 1;\n }\n \n $pointer = 0;\n while ($pointer < count($tea_types) ) {\n DB::table('plant_fact_sheets')->insert([\n 'species' =>'tea',\n 'type'=>$tea_types[$pointer],\n 'optimal_conditions' =>$tea_facts['optimal_conditions'],\n 'months_to_maturity' =>$tea_facts['months_to_maturity'],\n 'production_rate' =>$tea_facts['production_rate'],\n 'shelf_life' =>$tea_facts['shelf_life'],\n 'storage_meth' =>$tea_facts['storage_meth'],\n 'price_per_bag' =>$tea_facts['price_per_bag'],\n ]);\n $pointer += 1;\n }\n\n\n $pointer = 0;\n while ($pointer < count($coffee_types) ) {\n DB::table('plant_fact_sheets')->insert([\n 'species' =>'coffee',\n 'type'=>$coffee_types[$pointer],\n 'optimal_conditions' =>$coffee_facts['optimal_conditions'],\n 'months_to_maturity' =>$coffee_facts['months_to_maturity'],\n 'production_rate' =>$coffee_facts['production_rate'],\n 'shelf_life' =>$coffee_facts['shelf_life'],\n 'storage_meth' =>$coffee_facts['storage_meth'],\n 'price_per_bag' =>$coffee_facts['price_per_bag'],\n ]);\n $pointer += 1;\n };\n break;\n };\n}", "title": "" }, { "docid": "207938a2f9a48cd2144b29758a1c296d", "score": "0.49310735", "text": "public function subirPantallaElectrica( ) {\n $this->setEstadoPantallaElectrica(0);\n $this->setComando(self::$PANTALLA_ELECTRICA, \"ARRIBA\");\n }", "title": "" }, { "docid": "73ba38ca487c884c3303b2ea23130b97", "score": "0.4916788", "text": "function test_costruttore(){\n //-------------- test persona 1 ----------------------- \n $cl = new CarrieraLaureando(\"123456\", \"T. Ing. Informatica\");\n\n $expected = 123456;\n $result =$cl->matricola;\n if($expected != $result) echo \"CarrieraLaureando : errore: expected:\" . $expected . \" recived:\" . $result;\n\n $expected = \"GIANLUIGI\";\n $result =$cl->nome;\n if($expected != $result) echo \"CarrieraLaureando : errore: expected:\" . $expected . \" recived:\" . $result;\n\n $expected = \"DONNARUMMA\";\n $result =$cl->cognome;\n if($expected != $result) echo \"CarrieraLaureando : errore: expected:\" . $expected . \" recived:\" . $result;\n \n $expected = \"[email protected]\";\n $result =$cl->email;\n if($expected != $result) echo \"CarrieraLaureando : errore: expected:\" . $expected . \" recived:\" . $result;\n \n $expected = \"ELETTROTECNICA\";\n $result =$cl->esami[0]->nomeEsame;\n if($expected != $result) echo \"CarrieraLaureando : errore: expected:\" . $expected . \" recived:\" . $result;\n \n $expected = 26;\n $result =$cl->esami[0]->votoEsame;\n if($expected != $result) echo \"CarrieraLaureando : errore: expected:\" . $expected . \" recived:\" . $result;\n \n $expected = 1;\n $result =$cl->esami[0]->faMedia;\n if($expected != $result) echo \"CarrieraLaureando : errore: expected:\" . $expected . \" recived:\" . $result;\n \n //-------------- test persona 2 ----------------------- \n $cl = new CarrieraLaureando(\"234567\", \"M. Ing. Elettronica\");\n\n $expected = 234567;\n $result =$cl->matricola;\n if($expected != $result) echo \"CarrieraLaureando : errore: expected:\" . $expected . \" recived:\" . $result;\n\n $expected = \"ALESSANDRO\";\n $result =$cl->nome;\n if($expected != $result) echo \"CarrieraLaureando : errore: expected:\" . $expected . \" recived:\" . $result;\n\n $expected = \"BASTONI\";\n $result =$cl->cognome;\n if($expected != $result) echo \"CarrieraLaureando : errore: expected:\" . $expected . \" recived:\" . $result;\n \n $expected = \"[email protected]\";\n $result =$cl->email;\n if($expected != $result) echo \"CarrieraLaureando : errore: expected:\" . $expected . \" recived:\" . $result;\n \n $expected = \"NANOELETTRONICA E FOTONICA\";\n $result =$cl->esami[0]->nomeEsame;\n if($expected != $result) echo \"CarrieraLaureando : errore: expected:\" . $expected . \" recived:\" . $result;\n \n $expected = 20;\n $result =$cl->esami[0]->votoEsame;\n if($expected != $result) echo \"CarrieraLaureando : errore: expected:\" . $expected . \" recived:\" . $result;\n \n $expected = 1;\n $result =$cl->esami[0]->faMedia;\n if($expected != $result) echo \"CarrieraLaureando : errore: expected:\" . $expected . \" recived:\" . $result;\n \n console_log(\"test per il costruttore di carriera laureando eseguiti\");\n\n\n }", "title": "" }, { "docid": "4d8658b97bcc34249459b95105de9d86", "score": "0.4915504", "text": "public function team();", "title": "" }, { "docid": "ce0d346d3240f11f8f0b264694166680", "score": "0.49093983", "text": "public function Alimentar()\n {\n echo \"<br>Comendo substâncias\";\n }", "title": "" }, { "docid": "e2c1d76da17d6076e399faaecd59cc0e", "score": "0.4907212", "text": "public function run()\n {\n $titles = [\"100 Хадис\", \"Черная риторика: Власть и магия слова\", \"Поток: Психология оптимального переживания\", \"Хадис 52\", \"B\", \"C\", \"D\"];\n $description = [\"Еңбекте адамзаттың асылы, Алланың сүйікті елшісі Мұхаммед Мұстафа пайғамбарымыздың (саллаллаһу аләйһи уә сәлләм) ең таңдаулы 100 хадисі іріктелген. Руханияттың тереңіне тартатын мағынасы зор, тәлімі мол бұл хадистер иман байлығын жоғары қойған барша оқырман қауымға арналған.\",\n \"Карстен Бредемайер — тренер № 1 в области коммуникативной техники для всей немецкоговорящей Европы. Черная риторика, по Бредемайеру, — это умение манипулировать всеми риторическими средствами и методами для того, чтобы в процессе переговоров или выступления оппонент или аудитория пришли к необходимому для вас выводу; отличать, в каком контексте и при каких вопросах ваши аргументы ничего не значат или, наоборот, являются решающими; устранять противоречия и давать «красную нить» каждому разговору; превращать негативное мышление и поведение собеседника в позитивное и конструктивное; находчиво и элегантно устранять ловушки; в горячих спорах не терять головы и вести себя уверенно. Книгу Бредемайера отличает новый нестандартный подход, предлагающий как для начинающих, так и для профессионалов удачное сочетание методов, техник и упражнений для тренировки. С первых страниц становится ясно, что автор — специалист в своей области, а от легкого и остроумного стиля изложения получаешь истинное удовольствие. Прочитав эту книгу, вы поймете, насколько велика магия слова, усовершенствуете свое восприятие, отточите свой стиль ведения дискуссий — и начнете вести их совсем по-другому. Книга рассчитана на широкую аудиторию.\",\n \"В своей культовой книге выдающийся ученый Михай Чиксентмихайи представляет совершенно новый подход к теме счастья. Счастье для него сродни вдохновению, а состояние, когда человек полностью поглощен интересным делом, в котором максимально реализует свой потенциал, Чиксентмихайи называет потоком. Автор анализирует это плодотворное состояние на примере представителей самых разных профессий и обнаруживает, что эмоциональный подъем, который испытывают художники, артисты, музыканты, доступен в любом деле. Более того, к нему надо стремиться – и не только в целенаправленной деятельности, но и в отношениях, в дружбе, в любви. На вопрос, как этому научиться, и отвечает книга.\",\n \"D\", \"C\", \"B\", \"A\" \n ];\n $imgs = [route('get_cover', ['name' => 0]), route('get_cover', ['name' => 1])];\n $links = [route('get_book', ['name' => 0]), route('get_book', ['name' => 1])];\n $data = json_decode(file_get_contents(\"database/seeds/result.json\"), true);\n for ($i = 1; $i < 73; $i++) {\n if ($data[$i]['title'] == null) echo $i;\n Book::create([\n 'title' => ($data[$i]['title'] != null) ? $data[$i]['title'] : 'Аты жоқ',\n 'description' => $data[$i]['description'],\n 'img' => 'https://reader.prosthesis.kz/api/cover/'.($i),//route('get_cover', ['name' => $i + 1]),\n 'link' => 'https://reader.prosthesis.kz/api/book/'.($i),//route('get_book', ['name' => $i + 1])\n ]);\n }\n }", "title": "" }, { "docid": "5c865e9976fa3f77206a7e00477ad904", "score": "0.49064434", "text": "public function testAreaSkillv1areas1()\n {\n\n }", "title": "" }, { "docid": "ce360e28c9f39c23a6bcfdb7bf26f2a3", "score": "0.49061236", "text": "function spyplanet()\r\n\t{\r\n\t\tglobal $langdir;\r\n\t\tswitch ($langdir)\r\n\t\t{\r\n\t\t\tcase \"estonian\":\r\n\t\t\t\t$this->classname = \"Planeetide Spy Tehis\";\r\n\t\t\t\t$this->description = \"See Tehis paneb spioon iga vaenlase planeeti. See on täiesti ümbersõit planeedid andurid. Sa pead olema samas sektoris on planeet ja kõik heldekäelisus piiranguid kohaldatakse. Tehis saab näha mingit planeeti sektoris olenemata sellest, milline varjatud väärtus tal on. On kokku \" . $this->pieces . \" tükki, et tuleb leida. Kui kõik nupud on leitud saate valida planeedi koht spioon kaudu Tehis nimekiri käsk. Tehis tükki on salvestatud laeva. Kui teie laev on hävitatud Ründaja võib leida mõningaid nuppe. Iga tükki ei ole püütud ründaja on juhuslikult jagatud ümber galaktika.\";\r\n\t\t\t\t$this->success = \"Sa ei leidnud kõiki \" . $this->pieces . \" tükid \" . $this->classname . \". Võite kasutada seda Artefakti igal ajal Tehis nimekiri leheküljel.\";\r\n\t\t\t\t$this->incomplete = \"Olete leidnud [pieces] tükki \" . $this->classname . \". Peate [left] veel [piece] lõpule artefaktist.\";\r\n\t\t\t\t$this->singular = \"tk\";\r\n\t\t\t\t$this->plural = \"tk\";\r\n\t\t\t\t$this->title = \"<b><font size=\\\"4\\\" color=\\\"lime\\\">Koht Spy planeedil</font></b>\";\r\n\t\t\t\t$this->select = \"Valige planeedi koht spioon\";\r\n\t\t\t\t$this->l_bountyscan = \"Bounty\";\r\n\t\t\t\t$this->noplanet = \"Valitud planeedil pole võimalik leida selles sektoris.\";\r\n\t\t\t\t$this->l_fedbounty = \"<b><font color='red' size='4'>Föderatsioon ei kiida rünnata palju väiksemad turuosalised. See on paigutatud halastus teid.</font></b>\";\r\n\t\t\t\t$this->placedspy = \"Spioon õnnestus koht planeedil [planet].\";\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"french\":\r\n\t\t\t\t$this->classname = \"Planetary Spy Artefact\";\r\n\t\t\t\t$this->description = \"Cet artefact mettra un espion sur une planète ennemie. Il sera complètement contourner les capteurs planètes. Vous devez être dans le même secteur que la planète et toutes les restrictions Bounty sera applicable. L&#39;artefact sera en mesure de voir la planète TOUT dans le secteur peu importe ce manteau de valeur qu&#39;elle possède. Il ya un total de \" . $this->pieces . \" pièces qui doivent être trouvés. Une fois toutes les pièces sont trouvés, vous pouvez sélectionner la planète à l&#39;endroit de l&#39;espion grâce à la commande Liste Artefact. Les morceaux d&#39;artefact seront stockées sur votre bateau. Si votre vaisseau est détruit à l&#39;attaquant mai trouver certaines des pièces. Les morceaux non exploités par l&#39;attaquant seront distribuées au hasard autour de la galaxie.\";\r\n\t\t\t\t$this->success = \"Vous avez trouvé toutes les \" . $this->pieces . \" pièces de la \" . $this->classname . \". Vous pouvez utiliser cet objet à tout moment sur la page Liste Artefact.\";\r\n\t\t\t\t$this->incomplete = \"Vous avez trouvé [pieces] pièces de la \" . $this->classname . \". Vous devez vous [left] plus [piece] pour terminer l&#39;artefact.\";\r\n\t\t\t\t$this->singular = \"morceau\";\r\n\t\t\t\t$this->plural = \"pièces\";\r\n\t\t\t\t$this->title = \"<b><font size=\\\"4\\\" color=\\\"lime\\\">Place Spy sur la planète</font></b>\";\r\n\t\t\t\t$this->select = \"Sélectionnez une planète à placer l&#39;espion\";\r\n\t\t\t\t$this->l_bountyscan = \"Bounty\";\r\n\t\t\t\t$this->noplanet = \"La planète sélectionné ne peut être trouvé dans ce secteur.\";\r\n\t\t\t\t$this->l_fedbounty = \"<b><font color='red' size='4'>La Fédération n&#39;approuve pas d&#39;attaquer des acteurs beaucoup plus petits. Il a placé une prime sur vous.</font></b>\";\r\n\t\t\t\t$this->placedspy = \"Un espion a réussi à placer sur la planète [planet].\";\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"german\":\r\n\t\t\t\t$this->classname = \"Planetary Spy Artefakt\";\r\n\t\t\t\t$this->description = \"Dieses Artefakt wird ein Spion Platz auf jeden Feind Planeten. Es wird komplett umgehen die Planeten-Sensoren. Sie müssen in der gleichen Branche wie der Planet und alle Güte Beschränkungen gelten. Das Artefakt wird in der Lage, jedem Planeten in diesem Sektor, egal, was Mantel Wert besitzt. Es gibt insgesamt \" . $this->pieces . \" Stücke, die gefunden werden müssen. Wenn alle Teile gefunden sind, können Sie den Planeten auf der Spion durch das Artefakt List-Kommando zu stellen wählen. The Artifact Stücke werden auf dem Schiff gelagert werden. Wenn Ihr Schiff zerstört wird der Angreifer einige der Stücke zu finden. Jedes Stück vom Angreifer nicht erfasst werden nach dem Zufallsprinzip auf der ganzen Galaxie verteilt werden.\";\r\n\t\t\t\t$this->success = \"Sie haben festgestellt, alle \" . $this->pieces . \" Teile des \" . $this->classname . \". Sie können dieses Artefakt Nutzung jederzeit aus der Liste Artefakt Seite.\";\r\n\t\t\t\t$this->incomplete = \"Sie haben sie gefunden [pieces] Teile des \" . $this->classname . \". Sie müssen [left] mehr [piece], um das Artefakt abzuschließen.\";\r\n\t\t\t\t$this->singular = \"Stück\";\r\n\t\t\t\t$this->plural = \"Stück\";\r\n\t\t\t\t$this->title = \"<b><font size=\\\"4\\\" color=\\\"lime\\\">Spy Ort auf dem Planeten</font></b>\";\r\n\t\t\t\t$this->select = \"Wählen Sie einen Planeten, der Spion Ort\";\r\n\t\t\t\t$this->l_bountyscan = \"Bounty\";\r\n\t\t\t\t$this->noplanet = \"Die ausgewählten Planeten kann nicht in diesem Bereich gefunden werden.\";\r\n\t\t\t\t$this->l_fedbounty = \"<b><font color='red' size='4'>Die Föderation nicht billigen Angriff wesentlich kleinerer Unternehmen. Es hat ein Kopfgeld auf Sie gelegt.</font></b>\";\r\n\t\t\t\t$this->placedspy = \"Ein Spion wurde erfolgreich auf dem Planeten place [planet].\";\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"italian\":\r\n\t\t\t\t$this->classname = \"Planetari Spy Artifact\";\r\n\t\t\t\t$this->description = \"Questo artefatto metterà una spia su qualsiasi pianeta nemico. E &#39;completamente bypassare i sensori pianeti. Devi essere nello stesso settore, come il pianeta e tutte le restrizioni di taglie si applica. Il manufatto sarà in grado di vedere pianeta QUALSIASI nel settore, non importa cosa mantello valore che esso possiede. Ci sono un totale di \" . $this->pieces . \" pezzi che devono essere trovati. Una volta che tutti i pezzi sono trovati, è possibile selezionare il pianeta al posto della spia attraverso il comando Artefatto List. I pezzi Artifact verranno memorizzati sulla tua nave. Se la tua nave è distrutta l&#39;utente malintenzionato potrebbe trovare alcuni dei pezzi. I pezzi non catturato da un aggressore saranno distribuiti a caso intorno alla galassia.\";\r\n\t\t\t\t$this->success = \"Hai trovato tutti \" . $this->pieces . \" pezzi del \" . $this->classname . \". È possibile utilizzare questo artefatto in qualsiasi momento dalla pagina Artefatto List.\";\r\n\t\t\t\t$this->incomplete = \"Hai trovato [pieces] pezzi del \" . $this->classname . \". Avete bisogno di [left] continua [piece] per completare l&#39;artefatto.\";\r\n\t\t\t\t$this->singular = \"pezzo\";\r\n\t\t\t\t$this->plural = \"pezzi\";\r\n\t\t\t\t$this->title = \"<b><font size=\\\"4\\\" color=\\\"lime\\\">Spy posto su Planet</font></b>\";\r\n\t\t\t\t$this->select = \"Selezionare un pianeta al posto della spia\";\r\n\t\t\t\t$this->l_bountyscan = \"Bounty\";\r\n\t\t\t\t$this->noplanet = \"Il pianeta selezionato non può essere trovato in questo settore.\";\r\n\t\t\t\t$this->l_fedbounty = \"<b><font color='red' size='4'>La Federazione non approva attaccanti molto più piccolo. Ha messo una taglia su di te.</font></b>\";\r\n\t\t\t\t$this->placedspy = \"Una spia è stato posto con successo sul pianeta [planet].\";\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"spanish\":\r\n\t\t\t\t$this->classname = \"Planetario espía Artefacto\";\r\n\t\t\t\t$this->description = \"Este artefacto colocará un espía en cualquier planeta enemigo. Se pasará por alto completamente los sensores de los planetas. Debe estar en el mismo sector que el planeta y todas las restricciones se aplicarán recompensa. El artefacto será capaz de ver cualquier planeta en el sector no importa lo que la capa de valor que posee. Hay un total de \" . $this->pieces . \" piezas que necesitan ser encontrados. Una vez que todas las piezas se encuentran se puede seleccionar el planeta para colocar el espía a través de la Lista de comandos Artefacto. Las piezas artefacto se almacenará en su barco. Si el barco es destruido el atacante puede encontrar algunas de las piezas. Cualquier pieza no capturados por el atacante se distribuyen al azar alrededor de la galaxia.\";\r\n\t\t\t\t$this->success = \"Se han encontrado todos los \" . $this->pieces . \" piezas de la \" . $this->classname . \". Usted puede usar este artefacto en cualquier momento desde la página Lista de Artefacto.\";\r\n\t\t\t\t$this->incomplete = \"Se han encontrado [pieces] piezas de la \" . $this->classname . \". Usted necesita [left] más [piece] para completar el artefacto.\";\r\n\t\t\t\t$this->singular = \"pieza\";\r\n\t\t\t\t$this->plural = \"piezas\";\r\n\t\t\t\t$this->title = \"<b><font size=\\\"4\\\" color=\\\"lime\\\">Lugar espía en el Planeta</font></b>\";\r\n\t\t\t\t$this->select = \"Seleccione un planeta a otro el espía\";\r\n\t\t\t\t$this->l_bountyscan = \"Bounty\";\r\n\t\t\t\t$this->noplanet = \"El planeta seleccionado no se puede encontrar en este sector.\";\r\n\t\t\t\t$this->l_fedbounty = \"<b><font color='red' size='4'>La Federación no aprueba atacar a jugadores mucho más pequeños. Se ha puesto una recompensa por usted.</font></b>\";\r\n\t\t\t\t$this->placedspy = \"Un espía con éxito lugar en el planeta [planet].\";\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"albanian\":\r\n\t\t\t\t$this->classname = \"Planetare spiun Objekti\";\r\n\t\t\t\t$this->description = \"Kjo Objekti i do të vendos një spiun në ndonjë planet armikut. Ajo do të anashkalojë plotësisht sensorë planetet. Ju duhet të jetë në sektorin e njëjtë si të gjithë planetin dhe do të aplikohen kufizimet e mirësisë. Objekti do të jetë në gjendje të shohim planetin NDONJE në sektorin pa marrë parasysh çfarë mantel vlerë që ajo zotëron. Ka një numër të \" . $this->pieces . \" pjesë që duhet të gjendet. Pasi të gjitha këngët janë gjetur ju mund të zgjidhni planetit për të vendosur spiun përmes komandës Lista Objekti. Objekti do të jetë pjesë ruhet në anije tuaj. Nëse anija juaj është shkatërruar sulmues mund të gjeni disa nga copa. Çdo copë nuk kapur nga sulmuesit do të shpërndahen rreth rastësisht galaktikë.\";\r\n\t\t\t\t$this->success = \"Ju keni gjetur të gjithë \" . $this->pieces . \" copë \" . $this->classname . \". Ju mund të përdorni këtë Objekti në çdo kohë nga faqe Lista Objekti.\";\r\n\t\t\t\t$this->incomplete = \"Ju keni gjetur [pieces] copë \" . $this->classname . \". Ju duhet [left] më [piece] për të përfunduar Objekti.\";\r\n\t\t\t\t$this->singular = \"copë\";\r\n\t\t\t\t$this->plural = \"copë\";\r\n\t\t\t\t$this->title = \"<b><font size=\\\"4\\\" color=\\\"lime\\\">Vendi spiun në Planet</font></b>\";\r\n\t\t\t\t$this->select = \"Zgjidhni një planet në vendin e spiun\";\r\n\t\t\t\t$this->l_bountyscan = \"Mirat\";\r\n\t\t\t\t$this->noplanet = \"Planet e zgjedhur nuk mund të gjenden në këtë sektor.\";\r\n\t\t\t\t$this->l_fedbounty = \"<b><font color='red' size='4'>Federata nuk e miratojnë sulmuar lojtarë shumë më të vogël. Ajo ka vendosur një begati për ju.</font></b>\";\r\n\t\t\t\t$this->placedspy = \"Një spiun u zhvillua me sukses në planetin [planet].\";\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"catalan\":\r\n\t\t\t\t$this->classname = \"Planetari espia Artefacte\";\r\n\t\t\t\t$this->description = \"Aquest artefacte col.locarà un espia a qualsevol planeta enemic. Es passarà per alt completament els sensors dels planetes. Ha d&#39;estar en el mateix sector que el planeta i totes les restriccions s&#39;aplicaran recompensa. L&#39;artefacte serà capaç de veure qualsevol planeta en el sector no importa el que la capa de valor que té. Hi ha un total de \" . $this->pieces . \" peces que necessiten ser trobats. Un cop que totes les peces es troben es pot seleccionar el planeta per col.locar el espia a través de la Llista de comandaments Artefacte. Les peces artefacte quedarà emmagatzemat al vaixell. Si el vaixell és destruït l&#39;atacant pot trobar algunes de les peces. Qualsevol peça no capturats per l&#39;atacant es distribueixen a l&#39;atzar al voltant de la galàxia.\";\r\n\t\t\t\t$this->success = \"S&#39;han trobat tots els \" . $this->pieces . \" peces de la \" . $this->classname . \". Vostè pot usar aquest artefacte en qualsevol moment des de la pàgina Llista de Artefacte.\";\r\n\t\t\t\t$this->incomplete = \"S&#39;han trobat [pieces] peces de la \" . $this->classname . \". Vostè necessita [left] més [piece] per completar l&#39;artefacte.\";\r\n\t\t\t\t$this->singular = \"peça\";\r\n\t\t\t\t$this->plural = \"peces\";\r\n\t\t\t\t$this->title = \"<b><font size=\\\"4\\\" color=\\\"lime\\\">Lloc espia al Planeta</font></b>\";\r\n\t\t\t\t$this->select = \"Seleccioneu un planeta a un altre l&#39;espia\";\r\n\t\t\t\t$this->l_bountyscan = \"Bounty\";\r\n\t\t\t\t$this->noplanet = \"El planeta seleccionat no es pot trobar en aquest sector.\";\r\n\t\t\t\t$this->l_fedbounty = \"<b><font color='red' size='4'>La Federació no aprova atacar jugadors molt més petits. S&#39;ha col.locat una recompensa per vostè.</font></b>\";\r\n\t\t\t\t$this->placedspy = \"Un espia amb èxit lloc al planeta [planet].\";\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"danish\":\r\n\t\t\t\t$this->classname = \"Planetary Spy Artifact\";\r\n\t\t\t\t$this->description = \"Dette Artifact vil placere en spion på en fjendtlig planet. Det vil helt omgå planeter sensorer. Du skal være i den samme sektor som planeten og alle dusør restriktioner finder anvendelse. Den Artifact vil være i stand til at se nogen planet i sektoren uanset hvad kappen værdi den har. Der er i alt \" . $this->pieces . \" stykker, der skal findes. Når alle brikker er fundet, kan du vælge planeten for at placere spion gennem Artifact List kommando. Den Artifact stykker vil blive gemt på dit skib. Hvis dit skib er ødelagt hacker kan finde nogle af brikkerne. Nogen stykker, ikke opfanges af angriberen vil være tilfældigt fordelt over hele galaksen.\";\r\n\t\t\t\t$this->success = \"Du har fundet alle \" . $this->pieces . \" stykker af \" . $this->classname . \". Du kan bruge denne genstand som helst fra Artifact List side.\";\r\n\t\t\t\t$this->incomplete = \"Du har fundet [pieces] stykker af \" . $this->classname . \". Du har brug for [left] mere [piece] for at afslutte artefakt.\";\r\n\t\t\t\t$this->singular = \"brik\";\r\n\t\t\t\t$this->plural = \"stykker\";\r\n\t\t\t\t$this->title = \"<b><font size=\\\"4\\\" color=\\\"lime\\\">Sted Spy på Planet</font></b>\";\r\n\t\t\t\t$this->select = \"Vælg en planet for at placere spion\";\r\n\t\t\t\t$this->l_bountyscan = \"Bounty\";\r\n\t\t\t\t$this->noplanet = \"Den valgte planet kan ikke findes i denne sektor.\";\r\n\t\t\t\t$this->l_fedbounty = \"<b><font color='red' size='4'>Federation ikke godkender at angribe meget mindre aktører. Det har sat en dusør på dig.</font></b>\";\r\n\t\t\t\t$this->placedspy = \"En spion lykkedes sted på planeten [planet].\";\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"dutch\":\r\n\t\t\t\t$this->classname = \"Planetaire Spy Artifact\";\r\n\t\t\t\t$this->description = \"Dit zal plaatsvinden Artefact een spion op een vijandelijke planeet. Het zal volledig rondweg de planeten sensoren. Je moet in dezelfde sector als de planeet en alle bounty beperkingen van toepassing. De Artefact staat zullen zijn om alle planeten zien in de sector niet uit wat mantel waarde zij beschikt. Er zijn in totaal \" . $this->pieces . \" stukken die moeten worden gevonden. Zodra alle stukken zijn te vinden kunt u de planeet om de spion plaats via het Artefact opdracht Lijst. De Artefact stukken zal worden opgeslagen op uw schip. Als uw schip wordt vernietigd de aanvaller kan u enkele van de stukken. Elke stukken niet gevangen genomen door de aanvaller zal willekeurig worden verdeeld over de hele melkweg.\";\r\n\t\t\t\t$this->success = \"U hebt al gevonden \" . $this->pieces . \" stukken van \" . $this->classname . \". U kunt deze artefact op elk moment van de Artefact Lijst pagina.\";\r\n\t\t\t\t$this->incomplete = \"U hebt gevonden [pieces] stukken van de \" . $this->classname . \". Je moet [left] meer [piece] te voltooien het artefact.\";\r\n\t\t\t\t$this->singular = \"stuk\";\r\n\t\t\t\t$this->plural = \"stuks\";\r\n\t\t\t\t$this->title = \"<b><font size=\\\"4\\\" color=\\\"lime\\\">Plaats Spy op Planet</font></b>\";\r\n\t\t\t\t$this->select = \"Selecteer een planeet naar de plaats spion\";\r\n\t\t\t\t$this->l_bountyscan = \"Bounty\";\r\n\t\t\t\t$this->noplanet = \"De geselecteerde planeet kan niet gevonden worden in deze sector.\";\r\n\t\t\t\t$this->l_fedbounty = \"<b><font color='red' size='4'>De Federatie heeft geen goedkeuring van aanvallende veel kleinere spelers. Het heeft geplaatst een bounty op je.</font></b>\";\r\n\t\t\t\t$this->placedspy = \"Een spion is succesvol plaats op de planeet [planet].\";\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"finnish\":\r\n\t\t\t\t$this->classname = \"Planetaarista Spy Teos\";\r\n\t\t\t\t$this->description = \"Tämä Teos asettaa vakoilla tahansa vihollisen planeetalla. Se on kokonaan ohi planeetat anturit. Sinun täytyy olla samalla alalla kuin maapallon ja kaikki armo rajoituksia sovelletaan. Teos voi nähdä mitään Planet alalla riippumatta siitä, mitä piilo-arvo sillä on. On yhteensä \" . $this->pieces . \" kappaletta, jotka on löydettävä. Kun kaikki palaset löytyy voit valita planeetan saattaa vakooja kautta Artifact List-komentoa. Teos kappaleet on tallennettu aluksella. Jos alus on tuhoutunut hyökkääjä voi löytää joitakin paloja. Kaikki palaset eivät vangiksi hyökkääjän on satunnaisesti ympäri galaksia.\";\r\n\t\t\t\t$this->success = \"Olet löytänyt kaikki \" . $this->pieces . \" palaset \" . $this->classname . \". Voit käyttää tätä artefakti milloin tahansa Artifact-sivulta.\";\r\n\t\t\t\t$this->incomplete = \"Olet löytänyt [pieces] paloja \" . $this->classname . \". Tarvitset [left] lisää [piece] loppuun artefakti.\";\r\n\t\t\t\t$this->singular = \"palan\";\r\n\t\t\t\t$this->plural = \"palaset\";\r\n\t\t\t\t$this->title = \"<b><font size=\\\"4\\\" color=\\\"lime\\\">Paikka vakoilla Planet</font></b>\";\r\n\t\t\t\t$this->select = \"Valitse planeetan saattaa vakooja\";\r\n\t\t\t\t$this->l_bountyscan = \"Runsaudessaan\";\r\n\t\t\t\t$this->noplanet = \"Valitun planeetta ei löydy tällä alalla.\";\r\n\t\t\t\t$this->l_fedbounty = \"<b><font color='red' size='4'>Liitto ei hyväksy hyökkää paljon pieniä toimijoita. Se on sijoitettu armo teitä.</font></b>\";\r\n\t\t\t\t$this->placedspy = \"Spy onnistuneesti paikka planeetalla [planet].\";\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"indonesian\":\r\n\t\t\t\t$this->classname = \"Planet Spy artifak\";\r\n\t\t\t\t$this->description = \"Artefak ini akan menempatkan mata-mata di planet musuh. Ini akan benar-benar melewati sensor planet. Anda harus berada dalam sektor yang sama seperti planet dan semua karunia-pembatasan akan berlaku. Artefak akan dapat melihat APAPUN planet di sektor apa pun nilai jubah yang dimilikinya. Ada total \" . $this->pieces . \" potongan-potongan yang perlu ditemukan. Setelah semua potongan yang ditemukan Anda dapat memilih planet untuk menempatkan mata-mata melalui perintah Daftar artefak. Potongan artefak akan disimpan di kapal Anda. Jika Anda adalah menghancurkan kapal penyerang dapat menemukan beberapa bagian. Setiap potongan tidak tertangkap oleh penyerang akan didistribusikan secara acak di sekitar galaksi.\";\r\n\t\t\t\t$this->success = \"Anda telah menemukan semua \" . $this->pieces . \" potongan \" . $this->classname . \". Anda dapat menggunakan artifak ini sewaktu-waktu dari halaman Daftar artefak.\";\r\n\t\t\t\t$this->incomplete = \"Anda telah menemukan [pieces] potongan \" . $this->classname . \". Anda perlu [left] lebih [piece] untuk melengkapi artefak.\";\r\n\t\t\t\t$this->singular = \"potong\";\r\n\t\t\t\t$this->plural = \"potongan\";\r\n\t\t\t\t$this->title = \"<b><font size=\\\"4\\\" color=\\\"lime\\\">Tempat Spy di Planet</font></b>\";\r\n\t\t\t\t$this->select = \"Pilih sebuah planet untuk menempatkan mata-mata\";\r\n\t\t\t\t$this->l_bountyscan = \"Bounty\";\r\n\t\t\t\t$this->noplanet = \"Planet yang dipilih tidak dapat ditemukan di sektor ini.\";\r\n\t\t\t\t$this->l_fedbounty = \"<b><font color='red' size='4'>Federasi tidak menyetujui menyerang pemain jauh lebih kecil. Ini telah menempatkan karunia pada Anda.</font></b>\";\r\n\t\t\t\t$this->placedspy = \"Sebuah tempat mata-mata berhasil di planet [planet].\";\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"norwegian\":\r\n\t\t\t\t$this->classname = \"Planetary Spy Artifact\";\r\n\t\t\t\t$this->description = \"Dette Artifact vil plassere en spion på en fiende planet. Det vil helt utenom planetene sensorer. Du må være i samme sektor som planeten og alle skuddpremie restriksjoner gjelder. The Artifact vil kunne se noen planet i sektoren uansett hva kappen verdi det har. Det er totalt \" . $this->pieces . \" stykker som trenger å bli funnet. Når alle brikkene er funnet kan du velge planeten å plassere spion gjennom Artifact Liste-kommandoen. The Artifact brikkene vil bli lagret på skipet ditt. Hvis skipet ditt blir ødelagt angriperen kan finne noen av bitene. Eventuelle brikkene ikke fanges opp av angriperen vil bli tilfeldig fordelt rundt om i galaksen.\";\r\n\t\t\t\t$this->success = \"Du har funnet alle \" . $this->pieces . \" stykker av \" . $this->classname . \". Du kan bruke denne gjenstand når som helst fra Artifact-siden.\";\r\n\t\t\t\t$this->incomplete = \"Du har funnet [pieces] stykker av \" . $this->classname . \". Du trenger [left] mer [piece] for å fullføre gjenstand.\";\r\n\t\t\t\t$this->singular = \"piece\";\r\n\t\t\t\t$this->plural = \"pieces\";\r\n\t\t\t\t$this->title = \"<b><font size=\\\"4\\\" color=\\\"lime\\\">Plasser Spy on Planet</font></b>\";\r\n\t\t\t\t$this->select = \"Velg en planet for å plassere spy\";\r\n\t\t\t\t$this->l_bountyscan = \"Bounty\";\r\n\t\t\t\t$this->noplanet = \"Den valgte Planeten kan ikke forekomme i denne sektoren.\";\r\n\t\t\t\t$this->l_fedbounty = \"<b><font color='red' size='4'>Landsorganisasjonen godtar ikke å angripe mye mindre spillere. Det har plassert en dusør på deg.</font></b>\";\r\n\t\t\t\t$this->placedspy = \"En spion ble vellykket sted på planeten [planet].\";\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"portuguese\":\r\n\t\t\t\t$this->classname = \"Planetário Spy Artefato\";\r\n\t\t\t\t$this->description = \"Este artefato vai colocar um espião em qualquer planeta inimigo. Ele irá ignorar completamente os sensores de planetas. Você deve estar no mesmo sector, como o planeta e todas as restrições recompensa será aplicada. O artefato será capaz de ver de qualquer outro planeta do sector não importa o manto valor que possui. Há um total de \" . $this->pieces . \" peças que precisam ser encontrados. Uma vez que todas as peças são encontradas você pode selecionar o planeta para colocar o espião através do comando List Artefato. As peças Artefato serão armazenados em seu navio. Se o seu navio é destruído o invasor pode encontrar algumas das peças. Todas as partes não captadas pelo atacante serão distribuídos aleatoriamente em torno da galáxia.\";\r\n\t\t\t\t$this->success = \"Você encontrou todos \" . $this->pieces . \" peças do \" . $this->classname . \". Você pode usar esse artefato, a qualquer momento a partir da página Lista de Artefato.\";\r\n\t\t\t\t$this->incomplete = \"Você encontrou [pieces] peças do \" . $this->classname . \". Você precisa [left] mais [piece] para completar o artefato.\";\r\n\t\t\t\t$this->singular = \"pedaço\";\r\n\t\t\t\t$this->plural = \"peças\";\r\n\t\t\t\t$this->title = \"<b><font size=\\\"4\\\" color=\\\"lime\\\">Spy lugar no Planeta</font></b>\";\r\n\t\t\t\t$this->select = \"Selecione um planeta para colocar o espião\";\r\n\t\t\t\t$this->l_bountyscan = \"Bounty\";\r\n\t\t\t\t$this->noplanet = \"O planeta escolhido não pode ser encontrado neste sector.\";\r\n\t\t\t\t$this->l_fedbounty = \"<b><font color='red' size='4'>A Federação não aprovar de atacar jogadores muito menor. Colocou uma graça em você.</font></b>\";\r\n\t\t\t\t$this->placedspy = \"Um espião foi sucesso lugar no planeta [planet].\";\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase \"swedish\":\r\n\t\t\t\t$this->classname = \"Planetary Spy Artefakt\";\r\n\t\t\t\t$this->description = \"Detta Artefakt kommer att placera en spion på någon fiende planet. Det kommer helt förbi planeterna sensorer. Du måste vara i samma bransch som vår planet och alla begränsningar givmildhet kommer att gälla. Artefakten kommer att kunna se alla planeter i branschen oavsett mantel värde det har. Finns totalt \" . $this->pieces . \" bitar som måste hittas. När alla bitar finns kan du välja planeten att placera spionera genom den fiktiva List kommandot. Artefakten bitar sparas på ditt skepp. Om ditt skepp förstörs Angriparen kan hitta några av de bitar. Alla bitar som inte fångas upp av angriparen kommer att vara slumpmässigt fördelade över galaxen.\";\r\n\t\t\t\t$this->success = \"Du har hittat alla \" . $this->pieces . \" bitar av \" . $this->classname . \". Du kan använda denna artefakt som helst från den fiktiva List sida.\";\r\n\t\t\t\t$this->incomplete = \"Du har hittat [pieces] bitar av \" . $this->classname . \". Du behöver [left] mer [piece] för att genomföra artefakt.\";\r\n\t\t\t\t$this->singular = \"piece\";\r\n\t\t\t\t$this->plural = \"bitar\";\r\n\t\t\t\t$this->title = \"<b><font size=\\\"4\\\" color=\\\"lime\\\">Placera Spy på Planet</font></b>\";\r\n\t\t\t\t$this->select = \"Välj en planet att placera Spy\";\r\n\t\t\t\t$this->l_bountyscan = \"Bounty\";\r\n\t\t\t\t$this->noplanet = \"De utvalda planet kan inte hittas i denna sektor.\";\r\n\t\t\t\t$this->l_fedbounty = \"<b><font color='red' size='4'>Förbundet godkänner inte att anfalla mycket mindre aktörer. Det har placerat en bounty på dig.</font></b>\";\r\n\t\t\t\t$this->placedspy = \"En spion har framgångsrikt plats på planeten [planet].\";\r\n\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\t\t$this->classname = \"Planetary Spy Artifact\";\r\n\t\t\t\t$this->description = \"This Artifact will place a spy on any enemy planet. It will completely bypass the planets sensors. You must be in the same sector as the planet and all bounty restrictions will apply. The Artifact will be able to see ANY planet in the sector no matter what cloak value it possesses. There are a total of \" . $this->pieces . \" pieces that need to be found. Once all pieces are found you can select the planet to place the spy through the Artifact List command. The Artifact pieces will be stored on your ship. If your ship is destroyed the attacker may find some of the pieces. Any pieces not captured by the attacker will be randomly distributed around the galaxy.\";\r\n\t\t\t\t$this->success = \"You have found all \" . $this->pieces . \" pieces of the \" . $this->classname . \". You can use this artifact at any time from the Artifact List page.\";\r\n\t\t\t\t$this->incomplete = \"You have found [pieces] pieces of the \" . $this->classname . \". You need [left] more [piece] to complete the artifact.\";\r\n\t\t\t\t$this->singular = \"piece\";\r\n\t\t\t\t$this->plural = \"pieces\";\r\n\t\t\t\t$this->title = \"<font size=\\\"4\\\" color=\\\"lime\\\"><b>Place Spy on Planet</b></font>\";\r\n\t\t\t\t$this->select = \"Select a planet to place the spy\";\r\n\t\t\t\t$this->l_bountyscan = \"Bounty\";\r\n\t\t\t\t$this->noplanet = \"The selected planet cannot be found in this sector.\";\r\n\t\t\t\t$this->l_fedbounty = \"<font color='red' size='4'><b>The Federation does not approve of attacking much smaller players. It has placed a bounty on you.</b></font>\";\r\n\t\t\t\t$this->placedspy = \"A spy was successfully place on planet [planet].\";\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "e651818f045743af6e96928b10406ab0", "score": "0.4890841", "text": "public function run()\n {\n $courses = [\n [\n 'name' => 'Android Development',\n 'description' => 'Learn mobile application development on the Android platform by acquiring strong knowledge of Android SDK. You will gain familiarity with RESTful APIs to connect Android applications to back-end services\nAs a part of this course, you will create widgets, customize list views and create applications using Facebook, Twitter, maps & location based services.',\n 'duration' => '3 months',\n 'start_date' => date('Y-m-d', strtotime('17th April 2017')),\n 'price' => 150000.00,\n 'slug' => 'android-development',\n 'image_reference' => 'course_4.png',\n 'short_desc' => 'Learn mobile application development on the Android platform by acquiring strong knowledge of Android SDK.'\n\n ],\n [\n 'name' => 'Backend Development',\n 'description' => 'Be a back-end web developer and be responsible for server-side web application logic and integration of the work front-end web developers do. Back-end developers usually write web services and APIs used by front-end developers and mobile application developers.',\n 'duration' => '6 weeks',\n 'start_date' => date('Y-m-d', strtotime('17th April 2017')),\n 'price' => 150000.00,\n 'slug' => 'backend-development',\n 'image_reference' => 'course_2.png',\n 'short_desc' => 'Be a back-end web developer and be responsible for server-side web application logic'\n ],\n [\n 'name' => 'Frontend Development',\n 'description' => 'Get the skills to build engaging, interactive user experiences on the web as a front-end web developer. Learn everything you need to design and develop user-facing code, and discover how to bring concepts to life on the browser canvas by combining essential graphic design and coding principles.\nDevelop competency with HTML, CSS, JavaScript, and jQuery. Earn between ....... and ......Apply best practices in responsive design and progressive enhancement.',\n 'duration' => '6 weeks',\n 'start_date' => date('Y-m-d', strtotime('17th April 2017')),\n 'price' => 150000.00,\n 'slug' => 'frontend-development',\n 'image_reference' => 'course_1.png',\n 'short_desc' => 'Get the skills to build engaging, interactive user experiences on the web as a front-end web developer.'\n ],\n [\n 'name' => 'Product Design',\n 'description' => 'More than 50% of the web is built using PHP. Easy to get started with, yet powerful in its functionality, PHP is used by individuals, startups, and enterprise-scale companies like Facebook to build websites. Get the skills to work with both client and server-side technologies as a PHP developer.\nLearn the basics of front-end (client-side) technologies, like HTML, JavaScript, and CSS.Create a relational database using MySQL.Build dynamic websites that can retrieve and return information from the client side to the server side using PHP and MySQL.',\n 'duration' => '6 weeks',\n 'start_date' => date('Y-m-d', strtotime('1st March 2017')),\n 'price' => 150000.00,\n 'slug' => 'product-design',\n 'image_reference' => 'course_3.png',\n 'short_desc' => 'More than 50% of the web is built using PHP. Easy to get started with, yet powerful in its functionality, PHP is used by individuals, startups, and enterprise-scale companies like Facebook to build websites.'\n ]\n ];\n \n $all_courses = Course::all();\n\n if(!$all_courses){\n\n foreach ($courses as $course) {\n Course::create($course);\n }\n\n }\n }", "title": "" }, { "docid": "c2519fd3ccec1a2e841eb5762b3ebf3c", "score": "0.48897845", "text": "function catSuggestionTwo($hwBreakdown, $exBreakdown, $qzBreakdown, $pjBreakdown, $desiredGrade, $total)\r\n{\r\n\t\tif($total == 0){\r\n\t\t\r\n\t\treturn \"Goal reached!\";\r\n\t\t\r\n\t}\r\n\t\r\n\t$left = $desiredGrade - $total;\r\n\t\r\n\t//$message = \"For the remaining \" + $left \"You will need to \";\r\n\t\r\n\tif($exBreakdown[0]>0&& $left>0){\r\n\t\t\r\n\t\t$left -= $exBreakdown[1];\r\n\t\t$pPerEX = $exBreakdown[1]/$exBreakdown[0];\r\n\t\t\r\n\t\tif($left <= 0){\r\n\t\t\t\r\n\t\t\techo \"For the remaining \". $exBreakdown[0] .\" exams you need to get \". $pPerEX .\" percent for each or combined<br>\";\r\n\t\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\techo \"For the remaining \". $exBreakdown[0] .\" exams you need to get \". $pPerEX .\" percent for each or combined<br>\";\r\n\t\t}\r\n\t\t\r\n\t}\r\n\telse if($exBreakdown[0]==0)\r\n\t{\r\n\t\techo \"No exams left <br>\";\r\n\t}\r\n\telse\r\n\t{\r\n\t\techo \"----- <br>\";\r\n\t}\r\n\t\r\n\tif($pjBreakdown[0]>0 && $left>0){\r\n\t\t\r\n\t\t$left -= $pjBreakdown[1];\r\n\t\t$pPerPJ = $pjBreakdown[1]/$pjBreakdown[0];\r\n\t\t\r\n\t\tif($left <= 0){\r\n\t\t\t\r\n\t\t\techo \"For the remaining \". $pjBreakdown[0] .\" projects you need to get \". $pPerPJ .\" percent for each or combined<br>\";\r\n\t\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\techo \"For the remaining \". $pjBreakdown[0] .\" projects you need to get \". $pPerPJ .\" percent for each or combined<br>\";\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}\r\n\telse if($pjBreakdown[0]==0)\r\n\t{\r\n\t\techo \"No projects left <br>\";\r\n\t}\r\n\telse\r\n\t{\r\n\t\techo \"----- <br>\";\r\n\t}\r\n\t\r\n\tif($hwBreakdown[0]>0 && $left > 0){\r\n\t\t\r\n\t\t$left -= $hwBreakdown[1];\r\n\t\t$pPerHW = $hwBreakdown[1]/$hwBreakdown[0];\r\n\t\t\r\n\t\tif($left <= 0){\r\n\t\t\t\r\n\t\t\t$perNeeded = $left + $hwBreakdown[1];\r\n\t\t\t\r\n\t\t\techo \"For the remaining \". $hwBreakdown[0] .\" homeworks you need to get \". $pPerHW .\" percent for each or combined<br>\";\r\n\t\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\techo \"For the remaining \". $hwBreakdown[0] .\" homeworks you need to get \". $pPerHW .\" percent for each or combined<br>\";\r\n\t\t}\r\n\t\t\r\n\t}\r\n\telse if($hwBreakdown[0]==0)\r\n\t{\r\n\t\techo \"No homeworks left <br>\";\r\n\t}\r\n\telse\r\n\t{\r\n\t\techo \"----- <br>\";\r\n\t}\r\n\t\r\n\t\r\n\tif($qzBreakdown[0]>0 && $left>0){\r\n\t\t\r\n\t\t$left -= $qzBreakdown[1];\r\n\t\t$pPerQZ = $qzBreakdown[1]/$qzBreakdown[0];\r\n\t\t\r\n\t\tif($left <= 0){\r\n\t\t\t\r\n\t\t\techo \"For the remaining \". $qzBreakdown[0] .\" quizes you need to get \". $pPerQZ .\" percent for each or combined<br>\";\r\n\t\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\techo \"For the remaining \". $qzBreakdown[0] .\" quizes you need to get \". $pPerQZ .\" percent for each or combined<br>\";\r\n\t\t}\r\n\t\t\r\n\t}\r\n\telse if($qzBreakdown[0]==0)\r\n\t{\r\n\t\techo \"No quizzes left <br>\";\r\n\t}\r\n\telse\r\n\t{\r\n\t\techo \"----- <br>\";\r\n\t}\r\n\r\n\t$finalPercent = $_POST[\"fep\"];\r\n\t$finalInput = $_POST[\"Final\"];\r\n\tif($finalInput == '' && $left>0)\r\n\t{\r\n\t\t$left -= $finalPercent;\r\n\t\tif($left <= 0){\r\n\t\t\t\r\n\t\t\t$need = $left + $finalPercent;\r\n\t\t\t\r\n\t\t\techo \"For the Final you need \". $need .\"<br>\";\r\n\t\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\techo \"For the Final you need \". $need .\"<br>\";\r\n\t\t}\r\n\t}\r\n\telse\r\n\t{\r\n\t\techo \"No final exam left <br>\";\r\n\t}\r\n\t\r\n\tif($left>0)\r\n\t{\r\n\t\techo \"You can't reach your desired grade.\";\r\n\t}\r\n}", "title": "" }, { "docid": "4f536e6a66a6ecb355ff094a71bef008", "score": "0.48827615", "text": "function catSuggestionOne($hwBreakdown, $exBreakdown, $qzBreakdown, $pjBreakdown, $desiredGrade, $total)\r\n{\r\n\t\r\n\t\r\n\tif($total == 0){\r\n\t\t\r\n\t\treturn \"Goal reached!\";\r\n\t\t\r\n\t}\r\n\t\r\n\t$left = $desiredGrade - $total;\r\n\t\r\n\t//$message = \"For the remaining \" + $left \"You will need to \";\r\n\t\r\n\tif($hwBreakdown[0]>0 && $left > 0){\r\n\t\t\r\n\t\t$left -= $hwBreakdown[1];\r\n\t\t$pPerHW = $hwBreakdown[1]/$hwBreakdown[0];\r\n\t\t\r\n\t\tif($left <= 0){\r\n\t\t\t\r\n\t\t\t$perNeeded = $left + $hwBreakdown[1];\r\n\t\t\t\r\n\t\t\techo \"For the remaing \". $hwBreakdown[0] .\" homeworks you need to get \". $pPerHW .\" percent for each or combined <br>\";\r\n\t\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\techo \"For the remaing \". $hwBreakdown[0] .\" homeworks you need to get \". $pPerHW .\" percent for each or combined <br>\";\r\n\t\t}\r\n\t\t\r\n\t}\r\n\telse if($hwBreakdown[0]==0)\r\n\t{\r\n\t\techo \"No homeworks left <br>\";\r\n\t}\r\n\telse\r\n\t{\r\n\t\techo \"----- <br>\";\r\n\t}\r\n\t\r\n\tif($exBreakdown[0]>0&& $left>0){\r\n\t\t\r\n\t\t$left -= $exBreakdown[1];\r\n\t\t$pPerEX = $exBreakdown[1]/$exBreakdown[0];\r\n\t\t\r\n\t\tif($left <= 0){\r\n\t\t\t\r\n\t\t\techo \"For the remaining \". $exBreakdown[0] .\" exams you need to get \". $pPerEX .\" percent for each or combined <br>\";\r\n\t\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\techo \"For the remaing \". $exBreakdown[0] .\" exams you need to get \". $pPerEX .\" percent for each or combined <br>\";\r\n\t\t}\r\n\t\t\r\n\t}\r\n\telse if($exBreakdown[0]==0)\r\n\t{\r\n\t\techo \"No exams left <br>\";\r\n\t}\r\n\telse\r\n\t{\r\n\t\techo \"----- <br>\";\r\n\t}\r\n\t\r\n\tif($qzBreakdown[0]>0 && $left>0){\r\n\t\t\r\n\t\t$left -= $qzBreakdown[1];\r\n\t\t$pPerQZ = $qzBreakdown[1]/$qzBreakdown[0];\r\n\t\t\r\n\t\tif($left <= 0){\r\n\t\t\t\r\n\t\t\techo \"For the remaing \". $qzBreakdown[0] .\" quizes you need to get \". $pPerQZ .\" percent for each or combined <br>\";\r\n\t\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\techo \"For the remaing \". $qzBreakdown[0] .\" quizes you need to get \". $pPerQZ .\" percent for each or combined <br>\";\r\n\t\t}\r\n\t\t\r\n\t}\r\n\telse if($qzBreakdown[0]==0)\r\n\t{\r\n\t\techo \"No quizzes left <br>\";\r\n\t}\r\n\telse\r\n\t{\r\n\t\techo \"----- <br>\";\r\n\t}\r\n\t\r\n\tif($pjBreakdown[0]>0 && $left>0){\r\n\t\t\r\n\t\t$left -= $pjBreakdown[1];\r\n\t\t$pPerPJ = $pjBreakdown[1]/$pjBreakdown[0];\r\n\t\t\r\n\t\tif($left <= 0){\r\n\t\t\t\r\n\t\t\techo \"For the remaing \". $pjBreakdown[0] .\" projects you need to get \". $pPerPJ .\" percent for each or combined <br>\";\r\n\t\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\techo \"For the remaing \". $pjBreakdown[0] .\" projects you need to get \". $pPerPJ .\" percent for each or combined <br>\";\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}\r\n\telse if($pjBreakdown[0]==0)\r\n\t{\r\n\t\techo \"No projects left <br>\";\r\n\t}\r\n\telse\r\n\t{\r\n\t\techo \"----- <br>\";\r\n\t}\r\n\t\r\n\t$finalPercent = $_POST[\"fep\"];\r\n\t$finalInput = $_POST[\"Final\"];\r\n\tif($finalInput == '' && $left>0)\r\n\t{\r\n\t\t$left -= $finalPercent;\r\n\t\tif($left <= 0){\r\n\t\t\t\r\n\t\t\t$need = $left + $finalPercent;\r\n\t\t\t\r\n\t\t\techo \"For the Final you need \". $need .\"<br>\";\r\n\t\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\techo \"For the Final you need \". $need .\"<br>\";\r\n\t\t}\r\n\t}\r\n\telse\r\n\t{\r\n\t\techo \"No final exam left <br>\";\r\n\t}\r\n\t\r\n\tif($left>0)\r\n\t{\r\n\t\techo \"You can't reach your desired grade.\";\r\n\t}\r\n}", "title": "" }, { "docid": "deaa12093988143f02d2a9dffe8f6f3a", "score": "0.48791605", "text": "function ucpalabras($frace) { \n $excepciones = array( \n 'de','a','el','y','o','no','para',\n 'la','las','lo','los','que',\n 'un','dar','es','si','por', \n 'sino','cuando', 'usa','una', \n 'de','del','por','en' \n ); \n\n $palabras = explode(' ', $frace); \n foreach ($palabras as $key => $palabra) \n { \n if (!in_array($palabra, $excepciones)) \n $palabras[$key] = ucwords($palabra); \n } \n\n $nuevafrace = implode(' ', $palabras); \n return $nuevafrace; \n }", "title": "" }, { "docid": "f8cca3aa8e6a93d21f653144b5698d1e", "score": "0.48739704", "text": "public function run()\n {\n $faker = Factory::create();\n $hospitals = Hospital::all();\n $hospital_images = HospitalImage::all()->groupBy('hospital_id');\n $image_orders = ImageOrder::all();\n $minors = MinorClassification::all();\n $options = Option::all()->groupBy('hospital_id');\n $calendars = Calendar::all()->groupBy('hospital_id');\n\n $courses = factory(Course::class, 50)->make();\n\n foreach ($courses as $index => $course) {\n $hospital = $faker->randomElement($hospitals);\n $course->hospital_id = $hospital->id;\n $course->code = 'C'.$index.'H'.$hospital->id;\n $course->calendar_id = $faker->randomElement($calendars->get($hospital->id))->id;\n $course->save();\n\n factory(CourseQuestion::class, 5)->create([\n 'course_id' => $course->id\n ]);\n\n foreach ($minors as $minor) {\n $detail = [\n 'course_id' => $course->id,\n 'minor_classification_id' => $minor->id,\n 'middle_classification_id' => $minor->middle_classification_id,\n 'major_classification_id' => $minor->major_classification_id,\n ];\n if ($minor->is_fregist == RegistrationDivision::CHECK_BOX) {\n $detail['inputstring'] = null;\n $detail['select_status'] = $faker->randomElement([0, 1]);\n } else {\n $detail['inputstring'] = $faker->text($minor->max_length);\n $detail['select_status'] = null;\n }\n factory(CourseDetail::class)->create($detail);\n }\n\n $images = $faker->randomElements($hospital_images->get($hospital->id), 1);\n // foreach ($images as $image) {\n // factory(CourseImage::class)->create([\n // 'course_id' => $course->id,\n // ]);\n // }\n\n foreach ($options->get($hospital->id) as $option) {\n //random option\n if ($faker->randomElement([0, 1]) == 1) {\n $course_option = new CourseOption();\n $course_option->fill([\n 'course_id' => $course->id,\n 'option_id' => $option->id\n ]);\n $course_option->save();\n }\n }\n }\n }", "title": "" }, { "docid": "5a1b977c2be4dbf2acdcb977359eb7ac", "score": "0.48659897", "text": "function fantacalcio_get_modifiers($vote_round) {\n drupal_set_title(t('Risultati: Giornata #@round', array(\n \"@round\" => $vote_round)));\n \n if (variable_get('fantacalcio_modifier_role_0', '0') || variable_get('fantacalcio_modifier_role_1', '0') || variable_get('fantacalcio_modifier_role_2', '0') || variable_get('fantacalcio_modifier_role_3', '0')) {\n \n $out = \"\";\n \n // $vote_round = get_last_votes();\n $teams = Team::all();\n $round = Round::getByRound($vote_round); // print_r($round);die();\n $votes = $round->getVotes();\n $competitions = Competition::all();\n \n $matches = Match::getMatchesByRound($vote_round);\n \n foreach ($matches as $m_id => $match) {\n $t1_id = $match->t1_id;\n $t2_id = $match->t2_id;\n $competition_round = $match->round;\n \n if (variable_get('fantacalcio_modifier_role_0', '0')) {\n $mod_1_role_0 = Result::getModifierRole_0($t1_id, $match->c_id, $vote_round, $competition_round);\n $mod_2_role_0 = Result::getModifierRole_0($t2_id, $match->c_id, $vote_round, $competition_round);\n }\n else {\n $mod_1_role_0 = 0;\n $mod_2_role_0 = 0;\n }\n \n if (variable_get('fantacalcio_modifier_role_1', '0')) {\n $mod_1_role_1 = Result::getModifierRole_1($t2_id, $match->c_id, $vote_round, $competition_round);\n $mod_2_role_1 = Result::getModifierRole_1($t1_id, $match->c_id, $vote_round, $competition_round);\n }\n else {\n $mod_1_role_1 = 0;\n $mod_2_role_1 = 0;\n }\n \n if (variable_get('fantacalcio_modifier_role_2', '0')) {\n $mod_role_2 = Result::getModifierRole_2($t1_id, $t2_id, $match->c_id, $vote_round, $competition_round);\n $mod_1_role_2 = $mod_role_2[1];\n $mod_2_role_2 = $mod_role_2[2];\n }\n else {\n $mod_1_role_2 = 0;\n $mod_2_role_2 = 0;\n }\n \n if (variable_get('fantacalcio_modifier_role_3', '0')) {\n $mod_1_role_3 = Result::getModifierRole_3($t1_id, $match->c_id, $vote_round, $competition_round);\n $mod_2_role_3 = Result::getModifierRole_3($t2_id, $match->c_id, $vote_round, $competition_round);\n }\n else {\n $mod_1_role_3 = 0;\n $mod_2_role_3 = 0;\n }\n \n $sql = \"UPDATE {fanta_matches} SET \n mod_1_role_0 = '%f',\n mod_2_role_0 = '%f',\n mod_1_role_1 = '%f',\n mod_2_role_1 = '%f',\n mod_1_role_2 = '%f',\n mod_2_role_2 = '%f',\n mod_1_role_3 = '%f',\n mod_2_role_3 = '%f'\n WHERE m_id = '%d'\";\n // $result = db_query($sql, $mod_1_role_0, $mod_2_role_0, $mod_1_role_1, $mod_2_role_1, $mod_1_role_2, $mod_2_role_2, $mod_1_role_3, $mod_2_role_3, $match->m_id);\n \n $query = db_update(\"fanta_matches\");\n $query->fields(array(\n \"mod_1_role_0\" => $mod_1_role_0, \n \"mod_1_role_1\" => $mod_1_role_1, \n \"mod_1_role_2\" => $mod_1_role_2, \n \"mod_1_role_3\" => $mod_1_role_3, \n \"mod_2_role_0\" => $mod_2_role_0, \n \"mod_2_role_1\" => $mod_2_role_1, \n \"mod_2_role_2\" => $mod_2_role_2, \n \"mod_2_role_3\" => $mod_2_role_3));\n $query->condition(\"m_id\", $m_id);\n \n $query->execute();\n }\n \n // output\n foreach ($round->competitions as $round_competition) {\n \n // $sql = \"SELECT * FROM {fanta_matches} \"\n // . \"WHERE g_id IN (SELECT g_id FROM {fanta_groups} WHERE c_id = '%d') \"\n // . \"AND round = '%d' \";\n // $result = db_query($sql, $c_id, $competition_round);\n \n $subquery = db_select('fanta_groups', 'g');\n $subquery->condition(\"c_id\", $round_competition->competition_id);\n $subquery->fields('g', array(\"g_id\"));\n \n $query = db_select(\"fanta_matches\", \"m\");\n $query->condition(\"g_id\", $subquery, \"IN\");\n $query->condition(\"round\", $round_competition->competition_round);\n \n $query->fields(\"m\");\n \n $result = $query->execute();\n \n $out .= \"<h3>\" . check_plain($competitions[$round_competition->competition_id]->name) . \"</h3>\";\n \n $header = array(\n t(\"Squadra\"), \n t(\"Portiere\"), \n t(\"Difesa\"), \n t(\"Centrocampo\"), \n t(\"Attacco\"));\n $rows = array();\n \n foreach ($result as $row) {\n $rows[$row->m_id . \"_1\"][] = $teams[$row->t1_id]->name;\n $rows[$row->m_id . \"_1\"][] = $row->mod_1_role_0;\n $rows[$row->m_id . \"_1\"][] = $row->mod_1_role_1;\n $rows[$row->m_id . \"_1\"][] = $row->mod_1_role_2;\n $rows[$row->m_id . \"_1\"][] = $row->mod_1_role_3;\n $rows[$row->m_id . \"_2\"][] = $teams[$row->t2_id]->name; // squadra 2\n $rows[$row->m_id . \"_2\"][] = $row->mod_2_role_0;\n $rows[$row->m_id . \"_2\"][] = $row->mod_2_role_1;\n $rows[$row->m_id . \"_2\"][] = $row->mod_2_role_2;\n $rows[$row->m_id . \"_2\"][] = $row->mod_2_role_3;\n \n $rows[$row->m_id . \"_3\"][] = array(\"data\" => \"\", \"colspan\" => 5); // separatore\n }\n \n $out .= theme(\"table\", array(\n \"header\" => $header, \n \"rows\" => $rows, \n \"attributes\" => array(\"class\" => array(\"table\", \"table-responsive\"))));\n }\n }\n else\n $out = t(\"No modificatori\");\n \n return $out;\n}", "title": "" }, { "docid": "3068566cc3a794ded0b32a7c33177514", "score": "0.48648962", "text": "function LimpiaAi()\n\t{\t\n\t\t$this->hide(\"p6\");\n\t\t$this->hide(\"p7\");\n\t\t$this->hide(\"p7-rendicion\");\n\t}", "title": "" }, { "docid": "8f4588067595dc69ae008c530a258407", "score": "0.48633933", "text": "function muestra_capas_elegidas($reg_dte,$edcn)\n\t\t{\n\t\t$docente = $reg_dte['Docente_Nro'];\n\t\t$Solicitudes = new Solicitudes_de_Asignacion_de_Capacitacion() ;\n\t\t$Solicitudes->Set_id($docente);\n\t\t$Prof = new Docente() ;\n\t\t$Prof->Set_id($docente) ;\n\t\t$Prof->Leer() ;\n\t\t$profe = $Prof->Obtener_Registro() ;\n\t\t//\n\t\t//\n\t\t$pagina=new Paginai('Crono','</td><td><input type=\"submit\" value=\"Salir\" name=\"okSalir\">');\n\t\t$txt = 'Docente: </td><td colspan=\"9\"> '.$docente.' - '.$profe['Apellido y Nombre'];\n\t\t$pagina->insertarCuerpo($txt);\n\t\t//\n\t\t// Capacitaciones\n\t\t// \n\t\t$txt='Capacitaciones Seleccionadas </td><td>'.$Solicitudes->texto_mostrar_abm() ;\n\t\t$pagina->insertarCuerpo($txt);\n\t\t$pagina->graficar_c_form($_SERVER['PHP_SELF']);\n\t\n\t\t}", "title": "" }, { "docid": "11b71fcc3b6393eccceb4b5855409856", "score": "0.48612753", "text": "public function testCreateEstoqueFicha()\n {\n\n }", "title": "" }, { "docid": "e5252078dccde8872fbc3a6d63bf7645", "score": "0.48550582", "text": "public function Agility()\n {\n return \"Super power of Captain America is Agility.<br>\";\n }", "title": "" }, { "docid": "8287eea694f2d4332a1bd07e6d2db41e", "score": "0.48499557", "text": "public function get_applicable_tutorials()\n {\n return array();\n }", "title": "" }, { "docid": "8287eea694f2d4332a1bd07e6d2db41e", "score": "0.48499557", "text": "public function get_applicable_tutorials()\n {\n return array();\n }", "title": "" }, { "docid": "7b1cadc4b422230157b5499d5561cc76", "score": "0.48494047", "text": "public function run(){\n\n $lessonAttendDate = [\n '2020-12-24',\n '2020-12-25',\n '2020-12-26',\n '2020-12-27',\n '2020-12-28',\n '2020-12-29',\n '2020-12-30',\n '2020-12-31',\n '2021-1-1',\n '2021-1-2'\n ];\n $lessonReview = [\n '2',\n '3',\n '4',\n '5',\n '1',\n '2',\n '3',\n '4',\n '5',\n '0'\n ];\n $lessonIntro = [\n 'クリスマスイブに幸せな夜を共に過ごしましょう!',\n '今日はクリスマスです。Merry Xmas.',\n 'よろしくお願いします!26日',\n 'よろしくお願いします!',\n 'よろしくお願いします!',\n 'よろしくお願いします!',\n 'よろしくお願いします!',\n 'よろしくお願いします!',\n 'よろしくお願いします!',\n 'よろしくお願いします!'\n ];\n $lessonUser_id = [\n '1',\n '1',\n '2',\n '2',\n '3',\n '3',\n '4',\n '4',\n '5',\n '5'\n ];\n $lessonLanguage_id = [\n '1',\n '2',\n '3',\n '4',\n '5',\n '6',\n '7',\n '8',\n '9',\n '10'\n ];\n $lessonTimetype_id = [\n '1',\n '2',\n '3',\n '4',\n '5',\n '6',\n '7',\n '8',\n '9',\n '10'\n ];\n\n for($i = 0; $i < count($lessonAttendDate); $i++){\n DB::table('lessons')->insert([\n 'attendDate' => $lessonAttendDate[$i],\n 'review' => $lessonReview[$i],\n 'intro' => $lessonIntro[$i],\n 'user_id' => $lessonUser_id[$i],\n 'language_id' => $lessonUser_id[$i],\n 'timetype_id' => $lessonTimetype_id[$i]\n ]);\n }\n }", "title": "" }, { "docid": "22404f9005b6b003cc632405a2cf1b9e", "score": "0.48482946", "text": "protected function getStandardConjugation(){\n\n $arr = array();\n $model = $this->getVerbModel();\n \n if ($model == '230' || $model == '250' || $model == '251'){\n $arr['00_IndPres|Present'] = \"i,es,,èm,ètz,on\";\n $arr['01_IndImp|Imperfach'] = \"iái,iás,iá,iam,iatz,ián\";\n $arr['02_IndPret|Preterit'] = \"iguèri,iguères,iguèt,iguèrem,iguèretz,iguèron\";\n $arr['03_IndFutur|Futur'] = \"irai,iràs,irà,irem,iretz,iràn\";\n $arr['04_Infinitiu|Infinitiu'] = \"ir\";\n $arr['05_Gerondiu|Gerondiu'] = \"issent\";\n $arr['06_PartPassat|Participi passat'] = \"it,ida\";\n if ($model == '230' || $model == '251'){\n $arr['06_PartPassat|Participi passat'] = \"òrt,òrta\";\n }\n\n $arr['07_Imperatiu|Imperatiu'] = \",am,ètz,iscas,iscam,iscatz\";\n\n if ($model == '230' || $model == '251'){\n $arr['07_Imperatiu|Imperatiu'] = \",am,ètz,a,am,atz\";\n }\n\n $arr['08_SubPres|Subjontiu present'] = \"a,as,a,am,atz,an\";\n $arr['09_SubImp|Subjontiu imperfach'] = \"iguèsse,iguèsses,iguèsse,iguèssem,iguèssetz,iguèsson\";\n $arr['10_Conditional|Conditional'] = \"iriái,iriás,iriá,iriam,iriatz,irián\";\n return $arr;\n }\n if ($model == '210' || $model == '211' || $model == '212' || $model == '213'){\n $arr['00_IndPres|Present'] = \"ïssi,ïsses,ís,ïssèm,ïssètz,ïsson\";\n $arr['01_IndImp|Imperfach'] = \"ïssiái,ïssiás,ïssiá,ïssiam,ïssiatz,ïssián\";\n $arr['02_IndPret|Preterit'] = \"ïguèri,ïguères,ïguèt,ïguèrem,ïguèretz,ïguèron\";\n $arr['03_IndFutur|Futur'] = \"ïrai,ïràs,ïrà,ïrem,ïretz,ïràn\";\n $arr['04_Infinitiu|Infinitiu'] = \"ïr\";\n $arr['05_Gerondiu|Gerondiu'] = \"ïssent\";\n $arr['06_PartPassat|Participi passat'] = \"ït,ida\";\n $arr['07_Imperatiu|Imperatiu'] = \"ís,ïscam,ïssètz,ïscas,ïscam,ïscatz\";\n $arr['08_SubPres|Subjontiu present'] = \"ïsca,ïscas,ïsca,ïscam,ïscatz,ïscan\";\n $arr['09_SubImp|Subjontiu imperfach'] = \"ïguèsse,ïguèsses,ïguèsse,ïguèssem,ïguèssetz,ïguèsson\";\n $arr['10_Conditional|Conditional'] = \"ïriái,ïriás,ïriá,ïriam,ïriatz,ïrián\";\n return $arr;\n }\n\n $arr['00_IndPres|Present'] = \"issi,isses,ís,issèm,issètz,isson\";\n $arr['01_IndImp|Imperfach'] = \"issiái,issiás,issiá,issiam,issiatz,issián\";\n $arr['02_IndPret|Preterit'] = \"iguèri,iguères,iguèt,iguèrem,iguèretz,iguèron\";\n $arr['03_IndFutur|Futur'] = \"irai,iràs,irà,irem,iretz,iràn\";\n $arr['04_Infinitiu|Infinitiu'] = \"ir\";\n $arr['05_Gerondiu|Gerondiu'] = \"issent\";\n $arr['06_PartPassat|Participi passat'] = \"it,ida\";\n $arr['07_Imperatiu|Imperatiu'] = \"ís,iscam,issètz,iscas,iscam,iscatz\";\n $arr['08_SubPres|Subjontiu present'] = \"isca,iscas,isca,iscam,iscatz,iscan\";\n $arr['09_SubImp|Subjontiu imperfach'] = \"iguèsse,iguèsses,iguèsse,iguèssem,iguèssetz,iguèsson\";\n $arr['10_Conditional|Conditional'] = \"iriái,iriás,iriá,iriam,iriatz,irián\";\n\n if ($model == '220'){\n $arr['06_PartPassat|Participi passat'] = \"èrt,èrta\";\n }\n\n if ($model == '230'){\n $arr['06_PartPassat|Participi passat'] = \"òrt,òrta\";\n }\n\n return $arr;\n }", "title": "" }, { "docid": "39f70f126d65157597bf15fa0ed58c56", "score": "0.48477024", "text": "public function practice() {\n $this->layout = \"buzzydocinner\";\n $sessionbuzzy = $this->Session->read('userdetail');\n $clinicId = $this->params['id'];\n //condition to check valid pratice.\n if (isset($clinicId) && $clinicId != '') {\n $options['conditions'] = array(\n 'Clinic.api_user' => $clinicId\n );\n $options['fields'] = array(\n 'Clinic.id',\n 'Clinic.industry_type'\n );\n $clinics = $this->Clinic->find('first', $options);\n $paydetchk['conditions'] = array(\n 'PaymentDetail.clinic_id' => $clinics['Clinic']['id']\n );\n $getpayemntdetailschk = $this->PaymentDetail->find('first', $paydetchk);\n //getting the access for practice.\n $staffaceess = $this->AccessStaff->getAccessForClinic($clinics['Clinic']['id']);\n $this->set('staffaccess', $staffaceess);\n $ind = $this->IndustryType->find('first', array('conditions' => array('IndustryType.id' => $clinics['Clinic']['industry_type'])));\n $leads = $this->LeadLevel->find('all', array('conditions' => array('LeadLevel.industryId' => $clinics['Clinic']['industry_type'])));\n $ref_msg = json_decode($ind['IndustryType']['reffralmessages']);\n if ($ref_msg == '') {\n $rmsg = array();\n } else {\n $rmsg = $ref_msg;\n }\n $this->set('refer_msg', $rmsg);\n $this->set('industry_id', $ind['IndustryType']['id']);\n $this->set('leads', $leads);\n $admin_set = $this->AdminSetting->find('first', array(\n 'conditions' => array(\n 'AdminSetting.clinic_id' => $clinics['Clinic']['id'],\n 'AdminSetting.setting_type' => 'leadpoints'\n )\n ));\n $this->set('admin_settings', $admin_set);\n\n\n if (isset($sessionbuzzy->User->id)) {\n $data = array('user_id' => $sessionbuzzy->User->id);\n } else {\n $data = array('user_id' => 0);\n }\n //getting the details od pratice.\n $clinicdetails = json_decode($this->Api->submit_cURL(json_encode($data), Buzzy_Name . '/api/clinic/' . $clinicId . '.json'));\n\n if ($clinicdetails->clinics->success == 1) {\n $sessionbuzzy = $this->Session->read('userdetail');\n\n if (isset($sessionbuzzy->User->id) && isset($clinicdetails->clinics->data->Clinic->fb_app_id)) {\n $config = array(\n 'appId' => $clinicdetails->clinics->data->Clinic->fb_app_id,\n 'secret' => $clinicdetails->clinics->data->Clinic->fb_app_key,\n 'allowSignedRequest' => false\n );\n $facebook_url = $clinicdetails->clinics->data->Clinic->facebook_url;\n $facebook = new Facebook($config);\n $user = $facebook->getUser();\n //condition to check patient like as facebook or not.\n if ($facebook_url != '' && $user > 0) {\n $page_id = $this->getFacebookId($facebook_url);\n $user_fb_email = '';\n $user_profile = $facebook->api('/me');\n if (array_key_exists(\"email\", $user_profile)) {\n $user_fb_email = $user_profile['email'];\n }\n\n $qry = \"SELECT page_id FROM page_fan WHERE page_id = '\" . $page_id . \"' AND uid = '\" . $user . \"'\";\n $isFan = $facebook->api(array(\n \"method\" => \"fql.query\",\n \"query\" => $qry\n ));\n // page id=139168709464290\n // first like\n $fbliked = 0;\n if (!empty($sessionbuzzy->Fblikes)) {\n foreach ($sessionbuzzy->Fblikes as $flike) {\n if ($flike->FacebookLike->clinic_id == $clinicdetails->clinics->data->Clinic->id && $flike->FacebookLike->like_status == 1) {\n $fbliked = 1;\n }\n }\n }\n if ((count($isFan) > 0) && $fbliked == 0) { // first like\n $this->set(\"loginUrl\", \"\");\n $options_pro['fields'] = array(\n 'Promotion.id',\n 'Promotion.value',\n 'Promotion.description',\n 'Promotion.operand'\n );\n $options_pro['conditions'] = array(\n 'Promotion.clinic_id' => $clinicdetails->clinics->data->Clinic->id,\n 'Promotion.description like' => '%Facebook Like%'\n );\n\n $Promotions = $this->Promotion->find('first', $options_pro);\n $data['user_id'] = $sessionbuzzy->User->id;\n $data['first_name'] = $sessionbuzzy->User->first_name;\n $data['last_name'] = $sessionbuzzy->User->last_name;\n if (!empty($Promotions)) {\n $data['promotion_id'] = $Promotions['Promotion']['id'];\n $data['amount'] = $Promotions['Promotion']['value'];\n } else {\n $data['amount'] = 100;\n }\n $getval = $this->Api->getPatientLevelForAcceleratedReward($clinicdetails->clinics->data->Clinic->id, $sessionbuzzy->User->id);\n $data['amount'] = $data['amount'] * $getval;\n $data['activity_type'] = 'N';\n $data['authorization'] = 'facebook point allocation';\n $data['clinic_id'] = $clinicdetails->clinics->data->Clinic->id;\n $data['date'] = date('Y-m-d H:i:s');\n $data['status'] = 'New';\n $data['is_buzzydoc'] = 1;\n\n $this->Transaction->create();\n\n if ($this->Transaction->save($data)) {\n //condition to check user's first transaction.\n $getfirstTransaction = $this->Api->get_firsttransaction($sessionbuzzy->User->id, $clinicId);\n if ($getfirstTransaction == 1 && $sessionbuzzy->User->email != '' && $data['amount'] > 0) {\n\n $template_array = $this->Api->get_template(39);\n $link1 = str_replace('[username]', $sessionbuzzy->User->first_name, $template_array['content']);\n $link = str_replace('[points]', $data['amount'], $link1);\n $link2 = str_replace('[clinic_name]', $clinicdetails->clinics->data->Clinic->api_user, $link);\n $Email = new CakeEmail(MAILTYPE);\n $Email->from(array(\n SUPER_ADMIN_EMAIL => 'BuzzyDoc'\n ));\n $Email->to($sessionbuzzy->User->email);\n $Email->subject($template_array['subject'])\n ->template('buzzydocother')\n ->emailFormat('html');\n $buzzylogin = Buzzy_Name . 'buzzydoc/login/' . base64_encode($sessionbuzzy->User->id) . '/Unsubscribe';\n $Email->viewVars(array(\n 'msg' => $link2\n ));\n $Email->send();\n }\n $options2['conditions'] = array('Notification.user_id' => $sessionbuzzy->User->id, 'Notification.clinic_id' => $clinicdetails->clinics->data->Clinic->id, 'Notification.earn_points' => 1);\n $Notifications = $this->Notification->find('first', $options2);\n if (!empty($Notifications) && $sessionbuzzy->User->email != '' && $data['amount'] > 0) {\n\n $template_array = $this->Api->get_template(1);\n $link = str_replace('[username]', $sessionbuzzy->User->first_name, $template_array['content']);\n $link1 = str_replace('[click_here]', '<a href=\"' . Buzzy_Name . '\">Click Here</a>', $link);\n $link2 = str_replace('[clinic_name]', $clinicdetails->clinics->data->Clinic->api_user, $link1);\n $link3 = str_replace('[points]', $data['amount'], $link2);\n $Email = new CakeEmail(MAILTYPE);\n $Email->from(array(\n SUPER_ADMIN_EMAIL => 'BuzzyDoc'\n ));\n $Email->to($sessionbuzzy->User->email);\n $Email->subject($template_array['subject'])\n ->template('buzzydocother')\n ->emailFormat('html');\n $buzzylogin = Buzzy_Name . 'buzzydoc/login/' . base64_encode($sessionbuzzy->User->id) . '/Unsubscribe';\n $Email->viewVars(array(\n 'msg' => $link3,\n 'Unsubscribe' => $buzzylogin\n ));\n $Email->send();\n }\n $optionsfblike['conditions'] = array(\n 'FacebookLike.user_id' => $sessionbuzzy->User->id,\n 'FacebookLike.clinic_id' => $clinicdetails->clinics->data->Clinic->id\n );\n $fblikes = $this->FacebookLike->find('first', $optionsfblike);\n if (empty($fblikes)) {\n $ldata = array(\n 'clinic_id' => $clinicdetails->clinics->data->Clinic->id,\n 'user_id' => $sessionbuzzy->User->id,\n 'like_status' => 1,\n 'facebook_email' => ''\n );\n $this->FacebookLike->create();\n $this->FacebookLike->save($ldata);\n } else {\n $this->FacebookLike->query(\"update facebook_likes set like_status=1 where user_id=\" . $sessionbuzzy->User->id . \" and clinic_id=\" . $_POST['clinic_id']);\n }\n $totalpoint = $sessionbuzzy->User->points + $data['amount'];\n $this->User->query(\"UPDATE `users` SET `points` = '\" . $totalpoint . \"' WHERE `id` =\" . $sessionbuzzy->User->id);\n $this->set('errorMsg', \"We've credited \" . $data['amount'] . \" points to you as we found that you've already liked our Facebook page. Thanks!\");\n }\n }\n }\n }\n\n if ($clinicdetails->clinics->data->Clinic->is_buzzydoc == 1 && isset($sessionbuzzy->User->id)) {\n\n $perclinicbuzzpnt = $this->getPointsDetails($sessionbuzzy);\n $this->set('Perclinicbuzzpnt', $perclinicbuzzpnt);\n }\n\n $this->set('Clinics', $clinicdetails->clinics->data);\n $paydet['conditions'] = array(\n 'PaymentDetail.clinic_id' => $clinicdetails->clinics->data->Clinic->id\n );\n $getpayemntdetails = $this->PaymentDetail->find('first', $paydet);\n if (!empty($getpayemntdetails) && $getpayemntdetails['PaymentDetail']['customer_account_profile_id'] > 0) {\n $this->set('paymentcheck', 1);\n } else {\n $this->set('paymentcheck', 0);\n }\n } else {\n return $this->redirect('/practice/');\n }\n } else {\n //getting the all list of pratice.\n $this->set('limit', 10);\n $this->set('offset', 0);\n $options2['conditions'] = array(\n 'CharacteristicInsurance.type' => 'insurance'\n );\n $insurence = $this->CharacteristicInsurance->find('all', $options2);\n $this->set('insurence', $insurence);\n $options1['fields'] = array(\n 'IndustryType.id,IndustryType.name'\n );\n $industry = $this->IndustryType->find('all', $options1);\n $this->set('industry', $industry);\n $data = array(\n 'limit' => 10,\n 'offset' => 0\n );\n $cliniclist = json_decode($this->Api->submit_cURL(json_encode($data), Buzzy_Name . '/api/cliniclist.json'));\n if ($cliniclist->cliniclists->success == 1) {\n $this->set('cliniclists', $cliniclist->cliniclists->data);\n $this->render('/Buzzydoc/practicelist');\n }\n }\n }", "title": "" }, { "docid": "dac28fc042b87e7904127c1415565638", "score": "0.4847209", "text": "function cl_orcimpactomovpai() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"orcimpactomovpai\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "638ded33da27850520a534b1630fd87c", "score": "0.48462924", "text": "public function run()\n {\n $specailties = [\n ['id' => 1, 'specialtyName' => 'Audiologist'],\n ['id' => 2, 'specialtyName' => 'Anesthesiologist'],\n ['id' => 3, 'specialtyName' => 'Andrologists'],\n ['id' => 4, 'specialtyName' => 'Cardiologist'],\n ['id' => 5, 'specialtyName' => 'Cardiovascular'],\n ['id' => 6, 'specialtyName' => 'Cardiovascular Surgery'],\n ['id' => 7, 'specialtyName' => 'Neurologist'],\n ['id' => 8, 'specialtyName' => 'Dentist'],\n ['id' => 9, 'specialtyName' => 'Audiolog'],\n ['id' => 10, 'specialtyName' => 'dermatologist'],\n ['id' => 11, 'specialtyName' => 'Emergency Doctors'],\n ['id' => 12, 'specialtyName' => 'Endocrinologist'],\n ['id' => 13, 'specialtyName' => 'gynecologist'],\n ['id' => 14, 'specialtyName' => 'hematology'],\n ['id' => 16, 'specialtyName' => 'Hepatologists'],\n ['id' => 17, 'specialtyName' => 'Internists Gastroenterology Neonatologist'],\n ['id' => 18, 'specialtyName' => 'Orthopdist'],\n ['id' => 19, 'specialtyName' => 'Pediatrician'],\n ['id' => 20, 'specialtyName' => 'Plastic Surgeon'],\n ['id' => 21, 'specialtyName' => 'Surgeon'],\n ['id' => 22, 'specialtyName' => 'Urologist'],\n ['id' => 23, 'specialtyName' => 'Rheumatologist'],\n ['id' => 24, 'specialtyName' => 'Ophthalmologist'],\n ['id' => 25, 'specialtyName' => 'General Practitioner'],\n ['id' => 26, 'specialtyName' => 'Ear , Nose and Throat'],\n ['id' => 27, 'specialtyName' => 'Endoscopic Surgeon'],\n ['id' => 28, 'specialtyName' => 'Laboratory & Analytical'],\n ['id' => 29, 'specialtyName' => 'Pharmacist'],\n ['id' => 30, 'specialtyName' => 'Oncologist'],\n ];\n foreach($specailties as $spceailty){\n Specialty::create($spceailty);\n }\n }", "title": "" }, { "docid": "ed8c65781e07b6fc9aca1f0f146deea8", "score": "0.48457083", "text": "function VerificaLaboratorio()\r\n {\r\n /*\r\n $query = sprintf(\"select * from horario\r\n where laboratorio = '1'\r\n and curso = '%s'\r\n and seccion = '%s'\r\n and periodo = '%s'\r\n and anio = '%s';\",\r\n $this->mCurso,$this->mSeccion,$this->mPeriodo,$this->mAnio);\r\n */\r\n//Modificado por Pancho López, el 06/06/2007, para administrar de mejor forma el laboratorio\r\n// $query = sprintf(\"select tipo from horariodetalle\r\n// where\r\n// curso = '%s'\r\n// and periodo = '%s'\r\n// and anio = '%s'\r\n//\t\t\t\t\t and ( tipo=2 or tipo=6 );\",\r\n//// $this->mCurso,$this->mSeccion,$this->mPeriodo,$this->mAnio);\r\n// $this->mCurso,$this->mPeriodo,$this->mAnio);\r\n\r\n $query = $this->gsql_IA->VerificaLaboratorio_select1($this->mCurso,$this->mPeriodo,$this->mAnio,$this->mIndex);\r\n\r\n\r\n $_SESSION[\"sNotas\"]->query($query);\r\n if ( $_SESSION[\"sNotas\"]->num_rows() < 1 )\r\n { return 0; }\r\n else {\r\n $_SESSION[\"sNotas\"]->next_record();\r\n return $_SESSION[\"sNotas\"]->f('idscheduletype');\r\n }\r\n }", "title": "" }, { "docid": "76a4f691b5d71bd2e63acb83106e1556", "score": "0.48455936", "text": "public function run()\n {\n \t$prob = Problem::create(array(\n\t\t\t 'name' => 'A +B Problem',\n\t\t\t 'source_id' => '1',\n\t\t\t 'points' => '50',\n\t\t\t 'description' => 'For this problem you must calculate <strong>A + B</strong>, numbers given in the input. ',\n\t\t\t 'input_specification' => 'The only line of input contain two space separated integers <strong>A, B (0 <= A, B <= 10).</strong> ',\n\t\t\t 'output_specification' => 'The only line of output should contain one integer: the sum of <strong>A</strong> and <strong>B</strong>. ',\n\t\t\t 'sample_input' => '1 2',\n\t\t\t 'sample_output' => '3',\n\t\t\t 'hints' => 'no se weno si se pero no te wa decir',\n\t\t\t 'added_by' => '1',\n\t\t\t 'enable' => '1',\n\t\t\t 'multidata' => '1',\n\t\t\t 'dataset' => 1,\n\t\t\t));\n\n\t\t$prob->tags()->sync([1 => ['level' => 1],2 => ['level' => 2]]);\n\t\t$prob->languages()->sync([1,2]);\n\n \tfor ($i=2; $i <= 4 ; $i++) { \n \t\t$prob = Problem::create(array(\n\t\t\t 'name' => 'Problema ' . $i,\n\t\t\t 'source_id' => '1',\n\t\t\t 'points' => '50',\n\t\t\t 'description' => 'Este problema si que rifa machin <br> <strong>hola que hace</strong><br><p>ferras ya estuvo</p>',\n\t\t\t 'input_specification' => 'mete lo que sea',\n\t\t\t 'output_specification' => 'saldra lo que sea',\n\t\t\t 'sample_input' => '1 2 3 fibonanci',\n\t\t\t 'sample_output' => 'fibonanci c',\n\t\t\t 'hints' => 'no se weno si se pero no te wa decir',\n\t\t\t 'added_by' => '1',\n\t\t\t 'enable' => '1',\n\t\t\t 'multidata' => '1',\n\t\t\t));\n\t\t\t$prob->tags()->sync([1 => ['level' => 1],2 => ['level' => 2]]);\n\t\t\t$prob->languages()->sync([1,2]);\n \t}\n\n\n }", "title": "" }, { "docid": "f7db0f277adde04e0859ce780309fd61", "score": "0.48326677", "text": "function __construct($j1, $j2){\n\t$this -> joueur1 = $j1; \n\t$this -> joueur2 = $j2;\n\t$plateau = array();\n\n\t//Initilaise l'ensemble des cases du plateau\n\tfor($i=0;$i<5;$i++){ // 5 Lignes / Taille du plateau 5x5\n\t\t$y=0;\n\t\tif($i==0){\n\t\t$ligne = array(new casep($i, $y++, new pion($this->joueur1))); // Ajoute dans la matrice une case avec ses positions X, Y et un pion. Pion qui dispose d'un joueur ou non.\n\t\t$ligne[] = new casep($i, $y++, new pion($this->joueur1));\n\t\t$ligne[] = new casep($i, $y++,new pion($this->joueur1));\n\t\t$ligne[] = new casep($i, $y++, new pion($this->joueur1));\n\t\t$ligne[] = new casep($i, $y++, new pion($this->joueur1));\n\t\t}\n\t\tif($i==1){\n\t\t$ligne = array(new casep($i, $y++, new pion($this->joueur1)));\n\t\t$ligne[] = new casep($i, $y++, null);\n\t\t$ligne[] = new casep($i, $y++, null);\n\t\t$ligne[] = new casep($i, $y++, null);\n\t\t$ligne[] = new casep($i, $y++, new pion($this->joueur1));\n\t\t}\n\t\tif($i==2){\n\t\t$ligne = array(new casep($i, $y++, null));\n\t\t$ligne[] = new casep($i, $y++, null);\n\t\t$ligne[] = new casep($i, $y++, null);\n\t\t$ligne[] = new casep($i, $y++, null);\n\t\t$ligne[] = new casep($i, $y++, null);\n\t\t}\n\t\tif($i==3){\n\t\t$ligne = array(new casep($i, $y++, new pion($this->joueur2)));\n\t\t$ligne[] = new casep($i, $y++, null);\n\t\t$ligne[] = new casep($i, $y++, null);\n\t\t$ligne[] = new casep($i, $y++, null);\n\t\t$ligne[] = new casep($i, $y++, new pion($this->joueur2));\n\t\t}\n\t\tif($i==4){\n\t\t$ligne = array(new casep($i, $y++, new pion($this->joueur2)));\n\t\t$ligne[] = new casep($i, $y++, new pion($this->joueur2));\n\t\t$ligne[] = new casep($i, $y++,new pion($this->joueur2));\n\t\t$ligne[] = new casep($i, $y++, new pion($this->joueur2));\n\t\t$ligne[] = new casep($i, $y++, new pion($this->joueur2));\n\t\t}\n\n\t\t$this-> plateau[$i] = $ligne;\n\n\t\t\n\t}\n}", "title": "" }, { "docid": "2832aff0b505f01d35ae8d858db0c078", "score": "0.48295406", "text": "public function run()\n {\n $faker = \\Faker\\Factory::create();\n $curriculums = Curriculum::select('id')->get();\n \n /**\n * On each curriculum, it has at least 60 subjects in it.\n * And course offerings is added as well just according\n * to what the subjects are.\n */\n foreach ($curriculums as $curriculum) {\n $subjects = Subject::all()->toArray();\n $subjectKeys = array_keys($subjects);\n $numberOfSubjects = 64;\n \n /**\n * Each Curriculum will have 64 subjects.\n */\n for ($i = 0; $i < $numberOfSubjects; $i++) {\n $index = null;\n while (!$index) {\n $index = array_rand($subjects); \n }\n \n $subject_id = $subjects[$index]['id'];\n unset($subjects[$index]);\n \n $curr_subj = CurriculumSubject::create([\n 'curriculum_id' => $curriculum->id,\n 'subject_id' => $subject_id,\n ]);\n\n $department = App\\Curriculum::where('id', $curr_subj->curriculum_id)->first();\n $faculties = App\\Faculty::where('department_id', $department->id)->select('id')->get()->toArray();\n\n if(count($faculties) > 0) {\n Offering::create([\n 'room_id' => $faker->numberBetween($min = 1, $max = App\\Room::count()),\n 'faculty_id' => $faculties[array_rand($faculties)]['id'],\n 'subject_id' => $subject_id,\n ]);\n }\n }\n\n }\n }", "title": "" }, { "docid": "c1bf6808443317470355e9a80244a39f", "score": "0.4827985", "text": "function overviewTerms($movie){\n\t\t$overview = file(\"$movie/overview.txt\", FILE_IGNORE_NEW_LINES);\n\t\tlist($term, $definition) = $overview;\n\t\tfor($j=0; $j<count($overview); $j++){ \n\t\t\t$sections = explode(\":\", $overview[$j]); //separate the terms of the list from the definitions using an array\n\t\t\tlist($term, $definition) = $sections; //assign variables to the two elements of the array\n\t\t?>\n\t\t\t<dt><?=$term?></dt>\n\t\t\t<dd><?=$definition?></dd>\n<?php\n\t\t} \t?>\n\t\t\t<dt>LINKS</dt>\n\t\t\t<dd>\n\t\t\t\t<ul id = \"links\">\n\t\t\t\t\t<li><a href=\"http://www.ninjaturtles.com/\">The Official TMNT Site</a></li>\n\t\t\t\t\t<li><a href=\"http://www.rottentomatoes.com/m/teenage_mutant_ninja_turtles/\">RT Review</a></li>\n\t\t\t\t\t<li><a href=\"http://www.rottentomatoes.com/\">RT Home</a></li>\n\t\t\t\t</ul>\n\t\t\t</dd>\n<?php\t}", "title": "" }, { "docid": "1166d2226a4e0c59a6d5fa211b7f3383", "score": "0.4826424", "text": "public function run()\n {\n// Fact::factory()->count(100)->create();\n Fact::factory()->createMany([\n [\n 'title' => '2 месяца',\n 'subtitle' => 'онлайн-продуктивного обучения',\n 'course_id' => 1\n ],\n [\n 'title' => 'Обучение',\n 'subtitle' => 'на реальных данных',\n 'course_id' => 1\n ],\n [\n 'title' => 'Язык',\n 'subtitle' => 'английский, руский',\n 'course_id' => 1\n ],\n [\n 'title' => 'Расписание',\n 'subtitle' => 'гибкое расписание',\n 'course_id' => 1\n ],\n [\n 'title' => '2 месяца',\n 'subtitle' => 'онлайн-продуктивного обучения',\n 'course_id' => 2\n ],\n [\n 'title' => 'Обучение',\n 'subtitle' => 'на реальных данных',\n 'course_id' => 2\n ],\n [\n 'title' => 'Язык',\n 'subtitle' => 'английский, руский',\n 'course_id' => 2\n ],\n [\n 'title' => 'Расписание',\n 'subtitle' => 'гибкое расписание',\n 'course_id' => 2\n ],\n [\n 'title' => '2 месяца',\n 'subtitle' => 'онлайн-продуктивного обучения',\n 'course_id' => 3\n ],\n [\n 'title' => 'Обучение',\n 'subtitle' => 'на реальных данных',\n 'course_id' => 3\n ],\n [\n 'title' => 'Язык',\n 'subtitle' => 'английский, руский',\n 'course_id' => 3\n ],\n [\n 'title' => 'Расписание',\n 'subtitle' => 'гибкое расписание',\n 'course_id' => 3\n ],\n ]);\n }", "title": "" }, { "docid": "dc7575f6632d4cbdfc51d398cda2ea22", "score": "0.48231435", "text": "function cl_lab_examematerial() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"lab_examematerial\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "2e2f3bb8550c80f1ad67c05c6fb86bdb", "score": "0.48210815", "text": "public function about() {\n\t\t$areas = collect([\n\t\t\t[\n\t\t\t'name' => 'Aplicaciones a la ingeniería de producción de bienes y servicios',\n\t\t\t'subAreas' => [\n\t\t\t\t[ 'name' => 'Gestión de la Cadena de Suministro' ],\n\t\t\t\t[ 'name' => 'Gestión del Rendimiento' ],\n\t\t\t\t[ 'name' => 'Logística' ],\n\t\t\t\t[ 'name' => 'Planificación y Programación de Procesos Industriales' ],\n\t\t\t\t[ 'name' => 'Programación de Proyectos' ],\n\t\t\t\t[ 'name' => 'Sistemas de Inventarios y Producción' ],\n\t\t\t\t[ 'name' => 'Transporte (pasajeros, carga)' ],\n\t\t\t],\n\t\t\t],\n\t\t\t[\n\t\t\t'name' => 'Aplicaciones a la economía y negocios',\n\t\t\t'subAreas' => [\n\t\t\t\t[ 'name' => 'Comercio Electrónico' ],\n\t\t\t\t[ 'name' => 'Modelación Financiera' ],\n\t\t\t\t[ 'name' => 'Modelos Económicos' ]\n\t\t\t]\n\t\t\t],\n\t\t\t[\n\t\t\t'name' => 'Aplicaciones específicas de optimización',\n\t\t\t'subAreas' => [\n\t\t\t\t[ 'name' => 'Análisis Envolvente de Datos' ],\n\t\t\t\t[ 'name' => 'Corte y Empaque' ],\n\t\t\t\t[ 'name' => 'Localización de Instalaciones' ],\n\t\t\t\t[ 'name' => 'Problema de Asignación' ],\n\t\t\t\t[ 'name' => 'Programación de Horarios' ],\n\t\t\t\t[ 'name' => 'Ruteo de Vehículos' ]\n\t\t\t]\n\t\t\t],\n\t\t\t[\n\t\t\t'name' => 'Aplicaciones estadísticas',\n\t\t\t'subAreas' => [\n\t\t\t\t[ 'name' => 'Control de Calidad' ],\n\t\t\t\t[ 'name' => 'Estadística descriptiva e inferencial' ],\n\t\t\t\t[ 'name' => 'Minería de Datos' ],\n\t\t\t\t[ 'name' => 'Pronósticos' ]\n\t\t\t]\n\t\t\t],\n\t\t\t[\n\t\t\t'name' => 'Gestión del Conocimiento',\n\t\t\t'subAreas' => [\n\t\t\t\t[ 'name' => 'Sistemas de Aplicación del Conocimiento' ],\n\t\t\t\t[ 'name' => 'Sistemas de Captura del Conocimiento' ],\n\t\t\t\t[ 'name' => 'Sistemas de Compartición del Conocimiento' ],\n\t\t\t\t[ 'name' => 'Sistemas de Descubrimiento del Conocimiento' ]\n\t\t\t]\n\t\t\t],\n\t\t\t[\n\t\t\t'name' => 'Métodos computacionales',\n\t\t\t'subAreas' => [\n\t\t\t\t[ 'name' => 'Heurísticas' ],\n\t\t\t\t[ 'name' => 'Inteligencia Artificial' ],\n\t\t\t\t[ 'name' => 'Metaheurísticas' ],\n\t\t\t\t[ 'name' => 'Redes Neuronales' ]\n\t\t\t]\n\t\t\t],\n\t\t\t[\n\t\t\t'name' => 'Optimización matemática',\n\t\t\t'subAreas' => [\n\t\t\t\t[ 'name' => 'Grafos y Redes' ],\n\t\t\t\t[ 'name' => 'Optimización lineal' ],\n\t\t\t\t[ 'name' => 'Optimización no lineal' ],\n\t\t\t\t[ 'name' => 'Optimización combinatoria' ],\n\t\t\t\t[ 'name' => 'Programación Dinámica' ],\n\t\t\t\t[ 'name' => 'Programación Estocástica' ],\n\t\t\t\t[ 'name' => 'Programación Lineal Entera' ],\n\t\t\t\t[ 'name' => 'Programación Multicriterio' ]\n\t\t\t]\n\t\t\t],\n\t\t\t[\n\t\t\t'name' => 'Toma de decisiones',\n\t\t\t'subAreas' => [\n\t\t\t\t[ 'name' => 'Análisis de Decisión' ],\n\t\t\t\t[ 'name' => 'Procesos de análisis Jerárquico' ],\n\t\t\t\t[ 'name' => 'Sistemas de Soporte a la toma Decisión' ],\n\t\t\t\t[ 'name' => 'Teoría de Juegos' ]\n\t\t\t]\n\t\t\t],\n\t\t\t[ 'name' => 'Procesos Estocásticos' ],\n\t\t\t[ 'name' => 'Simulación' ]\n\t\t]);\n\n\t\treturn view('copios.about')->withAreas($areas);\n\t}", "title": "" }, { "docid": "003540b6f26ef964610230f15b2fa245", "score": "0.48197716", "text": "function GetDescent(){}", "title": "" }, { "docid": "6e27c5f124af6ec0a7cfae4d16d3aacb", "score": "0.48192754", "text": "public function testAreaSkillv1areas0()\n {\n\n }", "title": "" }, { "docid": "ba4d089a843705b4884948ea01b60710", "score": "0.48157766", "text": "public function definition()\n {\n return [\n 'nom'=> $this->faker->unique()->randomElement(['web','design','mobile','devops','programmation'])\n ];\n }", "title": "" }, { "docid": "41b071b344991aa201ced05c3c88e40a", "score": "0.48140383", "text": "public function testGetAgreementSecurityOptionsForParticipation()\n {\n }", "title": "" }, { "docid": "1667e1715b37d102dec6a8dd0f8dbf89", "score": "0.48125166", "text": "function generar_txtAct($longitud,$especiales){\n $semilla = array(); \n $semilla[] = array('a','e','i','o','u'); \n $semilla[] = array('b','c','d','f','g','h','j','k','l','m','n','p','q','r','s','t','v','w','x','y','z'); \n $semilla[] = array('0','1','2','3','4','5','6','7','8','9'); \n $semilla[] = array('A','E','I','O','U'); \n $semilla[] = array('B','C','D','F','G','H','J','K','L','M','N','P','Q','R','S','T','V','W','X','Y','Z'); \n $semilla[] = array('0','1','2','3','4','5','6','7','8','9'); \n // si puede contener caracteres especiales, aumentamos el array $semilla \n if ($especiales) { $semilla[] = array('$','#','%','&','@','-','?','¿','!','¡','+','-','*'); } \n // creamos la clave con la longitud indicada \n\t\t\t for ($bucle=0; $bucle < $longitud; $bucle++) \n\t\t\t { \n\t\t\t // seleccionamos un subarray al azar \n\t\t\t $valor = mt_rand(0, count($semilla)-1); \n\t\t\t // selecccionamos una posicion al azar dentro del subarray \n\t\t\t $posicion = mt_rand(0,count($semilla[$valor])-1); \n\t\t\t // cojemos el caracter y lo agregamos a la clave \n\t\t\t $clave .= $semilla[$valor][$posicion]; \n\t\t\t } \n\t\t\t // devolvemos la clave \n\t\t\t return $clave; \n}", "title": "" } ]
7d1bc6bc4139b922fe415c00d530aaa0
Handy little method to disable unused HTTP verb methods
[ { "docid": "a141b4ff97c31e7ba550820445532d59", "score": "0.5805827", "text": "protected function methodNotAllowed()\n {\n \treturn $this->setError(405, 'method_not_allowed');\n }", "title": "" } ]
[ { "docid": "654786e517abd348a3a1241526397e16", "score": "0.6911838", "text": "public static function enableHttpMethodParameterOverride(){}", "title": "" }, { "docid": "654786e517abd348a3a1241526397e16", "score": "0.6911838", "text": "public static function enableHttpMethodParameterOverride(){}", "title": "" }, { "docid": "6683b41955d9beb49a06c53116c90b2c", "score": "0.66471714", "text": "public function notAllowedAction() {\n\t\t$this->getResponse()->setHeader('Allow', $this->allow);\n\t\t$this->getResponse()->setHttpResponseCode(405);\n\t}", "title": "" }, { "docid": "3eff507cc0067a309e5522fc2e80cd01", "score": "0.6614881", "text": "private function invalidMethodHandler()\n {\n header(\"{$this->request->serverProtocol} 405 Method Not Allowed\");\n }", "title": "" }, { "docid": "ac9ba874deafac43fe17df3ab96297e8", "score": "0.65047556", "text": "private function allowedMethod()\n {\n return [\"get\", \"post\", \"delete\", \"put\"];\n }", "title": "" }, { "docid": "b454b84fec00dece274e990d1382ad4d", "score": "0.6398401", "text": "public function getAllowedMethods()\n {\n return false;\n }", "title": "" }, { "docid": "1222f717dc61989aeeab6916b2ce49bc", "score": "0.6287021", "text": "public function action_invalid()\n\t{\n\t\t// Send the \"Method Not Allowed\" response\n\t\t$this->response->status(405)\n\t\t\t->headers('Allow', implode(', ', array_keys($this->_action_map)));\n\t}", "title": "" }, { "docid": "4f85db2e30c2b4ab3675cd5bfdd73a03", "score": "0.61183625", "text": "function request_methods()\n{\n return array(\"GET\",\"POST\",\"PUT\",\"DELETE\", \"HEAD\");\n}", "title": "" }, { "docid": "8876e7610f4996828eca173417b7d52e", "score": "0.6105414", "text": "public function setHttpMethods() {\n $args = func_get_args();\n $this->methods = $args;\n }", "title": "" }, { "docid": "dfdf28da1425baf15765d4e0695f0e10", "score": "0.60847634", "text": "function defaultAction() {\n\t\tthrow new xException(\"Method not allowed\", 403);\n\t}", "title": "" }, { "docid": "296ae521b4e0998158d4361e9cd55cad", "score": "0.60418195", "text": "protected static function getHttpMethods()\n {\n return\n [\n 'head',\n 'get',\n 'post',\n 'delete',\n 'options'\n ];\n }", "title": "" }, { "docid": "1fc8d55a59caf8b24a5dfe3c9e973b26", "score": "0.60111195", "text": "public function getHTTPMethods() {\n\n return array();\n\n }", "title": "" }, { "docid": "d9c6c3f6c8f79be857713d744da6c916", "score": "0.6007085", "text": "public function test_GET_collection_is_disabled()\n {\n $this->client->request('GET', $this->urlApi);\n $this->assertHttpMethodNotAllowed405('GET', $this->urlApi, ['POST']);\n }", "title": "" }, { "docid": "f72b83fe72cd5cff4c6783b20b148525", "score": "0.59693676", "text": "protected function httpMethod()\n {\n }", "title": "" }, { "docid": "dd944be7cad6bd6853d058b5eaa5d6b3", "score": "0.59515244", "text": "function request_method_is_allowed($m = null)\n{\n if(is_null($m)) $m = request_method();\n return in_array(strtoupper($m), request_methods());\n}", "title": "" }, { "docid": "f863f57f8322a9f8314c9dac9b223a16", "score": "0.5938318", "text": "protected function verbs()\n {\n return [];\n }", "title": "" }, { "docid": "f863f57f8322a9f8314c9dac9b223a16", "score": "0.5938318", "text": "protected function verbs()\n {\n return [];\n }", "title": "" }, { "docid": "c5588dff55b5835998000cf32eceaba3", "score": "0.5925409", "text": "public function forbiddenAction() : array\n {\n // Deal with the action and return a response.\n $json = [\n \"message\" => __METHOD__ . \", forbidden to access.\",\n ];\n return [$json, 403];\n }", "title": "" }, { "docid": "ae82e8da9aa22b595844925e0e1f890e", "score": "0.591609", "text": "protected function verbs()\n\t{\n\t\treturn [\n\t\t 'index' => ['GET'],\n\t\t];\n\t}", "title": "" }, { "docid": "6d978fd783aff2b992bd65df2bafe9f7", "score": "0.5912349", "text": "protected function verbs()\n {\n return [\n 'index' => ['GET', 'HEAD'],\n 'read-all' => ['POST'],\n 'unread-notifications' => ['GET', 'HEAD'],\n ];\n }", "title": "" }, { "docid": "6b1a134394cff26ea6210db1d308e9d0", "score": "0.5911011", "text": "public function testInvalidRequestMethod()\n {\n $response = $this->call('POST', '/api/v1/ips');\n $this->assertEquals(405, $response->status());\n }", "title": "" }, { "docid": "633cbbdf61d04e1557a4921a884c6893", "score": "0.5900585", "text": "public function testGettingRoutesForMethodThatDoesNotHaveAny()\n {\n $this->assertEquals([], $this->collection->get(RequestMethods::GET));\n }", "title": "" }, { "docid": "8cbdb63c08436dfc51a3dc84ab9c0997", "score": "0.58875555", "text": "public static function getHttpMethodParameterOverride(){}", "title": "" }, { "docid": "8cbdb63c08436dfc51a3dc84ab9c0997", "score": "0.58875555", "text": "public static function getHttpMethodParameterOverride(){}", "title": "" }, { "docid": "3330ad94901f7e1219b6c8ce301fcfbd", "score": "0.587683", "text": "public function defaultNoRouteAction()\n {\n $this->_findRewrite();\n return parent::defaultNoRouteAction();\n }", "title": "" }, { "docid": "db0ce82527d3a3c6f37eba96ca0d70ed", "score": "0.5867822", "text": "public function getHttpMethods() : array;", "title": "" }, { "docid": "684cbeb9098c67455a774ea4eda1cb90", "score": "0.58620495", "text": "public function action_405()\n\t{\n\t\t$this->set_title_and_breadcrumbs('405 Method Not Allowed', null, null, null, null, true);\n\t\t$this->template->content = View::forge('error/405');\n\t\t$this->response_status = 405;\n\t}", "title": "" }, { "docid": "744cf82e69ee8325b031cf2a49900ce7", "score": "0.58102655", "text": "function pandago_disable_rest_api( $access ) {\r\r\n return new WP_Error( 'rest_disabled', __( 'REST API ir atslēgts.' ), array( 'status' => rest_authorization_required_code() ) );\r\r\n}", "title": "" }, { "docid": "cb792c136b17c892cdb16795326f21a8", "score": "0.5780157", "text": "public function rest_api_init(): void\n {\n // suppress adding default endpoints (such as \"/wp/v2/posts\", \"/wp/v2/categories\" etc.)\n remove_action('rest_api_init', 'create_initial_rest_routes', 99);\n }", "title": "" }, { "docid": "cafc8e48720135fd2ac1306dff6b8e22", "score": "0.5776967", "text": "protected function verbs()\n {\n return [\n 'index' => ['GET'],\n 'view' => ['GET'],\n 'create' => ['POST'],\n 'callback' => ['POST'],\n ];\n }", "title": "" }, { "docid": "272f271b24f6b260cf21d70b7e7725db", "score": "0.57759655", "text": "public function disabledAction(Request $request)\n {\n $apiMethod = substr($request->getPathInfo(), strrpos($request->getPathInfo(), '/') + 1);\n throw new UserException(\n \"This api call without component name is not supported, perhaps you wanted to call /{component}/\" .\n $apiMethod\n );\n }", "title": "" }, { "docid": "efd7a0d57a5e0df0f006b1a3473a6695", "score": "0.57755876", "text": "function validHttpMethod(string $method) : string\n{\n $verbs = ['get', 'post', 'patch', 'put', 'delete'];\n $token = tokenize($method);\n return validWithSuggestion($token, $verbs);\n}", "title": "" }, { "docid": "8b1fad86414444c9ef66a83306e6e29a", "score": "0.5765915", "text": "public static function methodNotAllowed( $tMethods )\r\n\t{\r\n\t\theader( \"Access-Control-Allow-Methods: \" . $tMethods );\r\n\t\thttp_response_code( 405 );\r\n\t}", "title": "" }, { "docid": "c8013248f5d095739ceea07cac19edfe", "score": "0.5764186", "text": "protected function verbs()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "140eae93e62d7cb7399b7e7930272901", "score": "0.5742776", "text": "public function getHttpVerb()\n {\n return $this->httpVerb;\n }", "title": "" }, { "docid": "ad9df486c528c195000d018c6cf13b5e", "score": "0.57282996", "text": "public function unsupportedHttpMethodsProvider()\n {\n return [\n // Unsupported HTTP methods.\n ['CONNECT'],\n ['DELETE'],\n ['HEAD'],\n ['OPTIONS'],\n ['PUT'],\n ['TRACE'],\n // Lowercase HTTP methods are invalid.\n ['connect'],\n ['delete'],\n ['get'],\n ['head'],\n ['options'],\n ['post'],\n ['put'],\n ['trace'],\n // Some arguments that are no HTTP methods.\n [null],\n [true],\n [false],\n [''],\n [0],\n [1],\n [-1],\n ['0'],\n ];\n }", "title": "" }, { "docid": "c36bf2f2118ad0cc3b318a6b207a8ac2", "score": "0.572627", "text": "public static function getRouteVerbs(): array\n {\n return ['GET', 'POST'];\n }", "title": "" }, { "docid": "7da17e39920e6f69449698b26e32b3f2", "score": "0.5722734", "text": "protected function setDefaultVia(): void\n {\n $this->via(...static::DEFAULT_HTTP_METHODS);\n }", "title": "" }, { "docid": "b070de69da3ea38997015d72548c656d", "score": "0.5701667", "text": "public function admin_notice_rest_disabled() {\n\t\tif (!current_user_can('manage_options')) return;\n\t\t$this->show_admin_warning('<strong>'.__('Keyy disabled', 'keyy').'</strong><br> '.sprintf(__('The %s plugin cannot work, because the REST interface has been explicitly turned off on this site; probably by another plugin. You will need to enable the WordPress REST interface to use %s.', 'keyy'), 'Keyy', 'Keyy'), 'error');\n\t}", "title": "" }, { "docid": "49690b6c4a2ff49eb12ab2b23154a0f7", "score": "0.5689951", "text": "public function testSetMethodsInvalid(): void\n {\n $this->expectException(InvalidArgumentException::class);\n $this->expectExceptionMessage('Invalid HTTP method received. `NOPE` is invalid');\n $route = new Route('/books/reviews', ['controller' => 'Reviews', 'action' => 'index']);\n $route->setMethods(['nope']);\n }", "title": "" }, { "docid": "f8c19b01a73593447ad54f96ffc27834", "score": "0.5688534", "text": "function _http_action () {\r\n // to use the method functions instead\r\n\r\n $this->glob->log->add ( 'xs_Action : ACTION : Start' ) ;\r\n\r\n // echo \"(\".$this->_meta->class.\") \" ;\r\n\r\n // Get the HTTP method\r\n $m = $this->glob->request->method() ;\r\n\r\n // Create an indexed array of all this class' methods\r\n $mm = array_keyify ( $this->_meta->methods ) ;\r\n\r\n // If any of the match the HTTP method, just call it, so for example\r\n // if the HTTP method is 'DELETE', and it exists, we call $this->DELETE()\r\n\r\n if ( isset ( $mm[$m] ) )\r\n $this->$m() ;\r\n \r\n $this->glob->log->add ( 'xs_Action : ACTION : End' ) ;\r\n }", "title": "" }, { "docid": "4a53a8dd4ae7901ed3e677e59d369384", "score": "0.5683597", "text": "protected function replace($data) {\n $this->response = $this->response->withStatus(405, \"Method Not Allowed\");\n }", "title": "" }, { "docid": "2acd1fc0c2a4b3765167f266078c3700", "score": "0.5673611", "text": "public function nopriv_ajax_handler() {\n\t\t$this->ajax_handler(false);\n\t}", "title": "" }, { "docid": "adbd4c2d5813fcb149306a865aed17a9", "score": "0.56542027", "text": "protected function get($data) {\n $this->response = $this->response->withStatus(405, \"Method Not Allowed\");\n }", "title": "" }, { "docid": "c179494b464f25ce31c02acc2bd907b2", "score": "0.5653477", "text": "public function appendHttpMethods() {\n $args = func_get_args();\n if (count($args) && is_array($args[0])) {\n $args = $args[0];\n }\n $this->methods = array_merge($this->methods, $args);\n }", "title": "" }, { "docid": "85d1fb3f4bf22ab4a532abec05a1eb9b", "score": "0.56229997", "text": "function setRequestMethod($method) {}", "title": "" }, { "docid": "042c4510db548960831d06af3063e67b", "score": "0.5621494", "text": "protected function setDefaultVia(): void\n {\n $this->via(static::DEFAULT_HTTP_METHODS);\n }", "title": "" }, { "docid": "82c8c7db03d7cb618feedaace40b7ffb", "score": "0.56158936", "text": "public function shouldSkipRequestValidation()\n {\n return false;\n }", "title": "" }, { "docid": "f4fdad3e2f60b8a848c002141addcfa2", "score": "0.5570286", "text": "public function notVia(...$methods): self\n {\n $this->notVia = array_intersect(\n $methods,\n Http::METHODS\n );\n\n return $this;\n }", "title": "" }, { "docid": "83bbe9d06c263846cd8a6581f05be92d", "score": "0.55649525", "text": "public function getRequestMethods ()\n {\n return Request::GET;\n }", "title": "" }, { "docid": "4b4f4736daace9f2449a0ab827b0fa00", "score": "0.5536569", "text": "protected function doNoAction()\n {\n }", "title": "" }, { "docid": "aa208f02836cbcccc23db100452c76c5", "score": "0.5523399", "text": "function getRequestMethod() {}", "title": "" }, { "docid": "12398d485473180941b68f360567e8e4", "score": "0.5519868", "text": "public function testHttpMethodOverride()\n {\n $_SERVER['REQUEST_METHOD'] = 'POST';\n $_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'] = 'PUT';\n\n $method = new ReflectionMethod(\n '\\Bramus\\Router\\Router',\n 'getRequestMethod'\n );\n\n $method->setAccessible(true);\n\n $this->assertEquals(\n 'PUT',\n $method->invoke(new \\Bramus\\Router\\Router())\n );\n }", "title": "" }, { "docid": "cd13480e75806da1ce30e71a2b3d49be", "score": "0.5508432", "text": "public function before()\n\t{\n\t\t$this->_action_requested = $this->request->action();\n\n\t\t$method = Arr::get($_SERVER, 'HTTP_X_HTTP_METHOD_OVERRIDE', $this->request->method());\n\n\t\tif ( ! isset($this->_action_map[$method]))\n\t\t{\n\t\t\t$this->request->action('invalid');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->request->action($this->_action_map[$method]);\n\t\t}\n\n\t\treturn parent::before();\n\t}", "title": "" }, { "docid": "a760589ba32c6b9baf03e28bbeeb3d01", "score": "0.5497789", "text": "private function set_req_method()\n {\n\n // set the request method\n $this->reqMethod = strtolower($_SERVER['REQUEST_METHOD']);\n }", "title": "" }, { "docid": "4a702dad00ec8105d4811b8ff7be7fc6", "score": "0.5494014", "text": "protected function forbiden()\n {\n header('HTTP/1.0 403 Not Found');\n die('acces interdit');\n }", "title": "" }, { "docid": "3669e711959339ed6f79cb14ef2fdc11", "score": "0.5486715", "text": "public function dataForTestAllowMethods()\n {\n return [\n ['POST', true],\n ['GET', false],\n ['PUT', false],\n ['PATCH', false],\n ['HEAD', false],\n ['DELETE', false],\n ];\n }", "title": "" }, { "docid": "21f72567a05a381c62cab51c97202553", "score": "0.54777265", "text": "final public static function disallowedmethod ($content='', $mime='text/html')\n {\n self::setHeader (\"Content-type: $mime\");\n self::setResponseCode (405);\n return $content;\n }", "title": "" }, { "docid": "6fa236ccc779b2e2df47c02ee1a6ed0d", "score": "0.5468568", "text": "protected function getHttpMethod()\n {\n return 'GET';\n }", "title": "" }, { "docid": "255ce6375a17e4475c181cc47fc3e044", "score": "0.5440519", "text": "public function disable();", "title": "" }, { "docid": "255ce6375a17e4475c181cc47fc3e044", "score": "0.5440519", "text": "public function disable();", "title": "" }, { "docid": "a85e8ca6b385d2010cdf838e54ecd8a1", "score": "0.54337597", "text": "public function unknownMethod($method, $uri) {\n\n switch($method) {\n\n case 'LOCK' : $this->httpLock($uri); return false;\n case 'UNLOCK' : $this->httpUnlock($uri); return false;\n\n }\n\n }", "title": "" }, { "docid": "317d01159f1c2e7fe1608860ea8b8585", "score": "0.5431081", "text": "public function getHTTPMethods($uri) {\n\n if ($this->locksBackend)\n return array('LOCK','UNLOCK');\n\n return array();\n\n }", "title": "" }, { "docid": "0b71705dc25bb10786eb60247e5bf292", "score": "0.54300386", "text": "private function validHttpVerb($http_method)\n {\n $valid_verbs = array('GET', 'POST', 'PUT', 'DELETE');\n if (!in_array($http_method, $valid_verbs)) {\n throw new Exception('Method does not exist.');\n }\n return true;\n }", "title": "" }, { "docid": "f667c2a61a5ee0dfc59fd3ec147f7ca5", "score": "0.5429194", "text": "protected function verbs()\n {\n $options = \"OPTIONS\";\n return [\n 'index' => ['GET', 'HEAD', $options],\n 'view' => ['GET', 'HEAD', $options],\n 'create' => ['POST', $options],\n 'update' => ['PUT', 'PATCH'],\n 'delete' => ['DELETE'],\n ];\n }", "title": "" }, { "docid": "abc7c8b705ce60df2416dc9c81c050f4", "score": "0.5425697", "text": "function isGET(){\n $this->request = \"GET\";\n }", "title": "" }, { "docid": "5517b38dc66b254e1c62b7a17979550a", "score": "0.5418147", "text": "protected function head($data) {\n $this->response = $this->response->withStatus(405, \"Method Not Allowed\");\n }", "title": "" }, { "docid": "1b5f447212e113ae955f49d422cd3873", "score": "0.54166436", "text": "protected function routeProtections()\n\t{\n\t\tRoute::when('*', 'csrf', ['post', 'put', 'patch']);\n\t}", "title": "" }, { "docid": "7ccd6b9474973d4340c49901d03c183e", "score": "0.5409526", "text": "public function requestMethod($method) {\r\n try {\r\n $requestMethod = $_SERVER['REQUEST_METHOD'];\r\n\r\n switch ($requestMethod) {\r\n case 'GET': $ret = true; break;\r\n case 'POST': $ret = true; break;\r\n case 'PUT': $ret = true; break;\r\n case 'PATCH': $ret = true; break;\r\n case 'DELETE': $ret = true; break;\r\n case 'OPTIONS': $ret = true; break;\r\n default: $ret = false; break;\r\n }\r\n\r\n if (strpos($requestMethod, $method) === false || $ret === false) {\r\n\r\n $this->httpStatus(405);\r\n throw new \\InvalidArgumentException(MSG_ERROR_METHOD);\r\n \r\n }\r\n } catch (\\Exception $e) {\r\n $this->httpStatus(203);\r\n $this->log->write(array(\r\n \"TYPE\" => HTTP_STATUS_405, \r\n \"MSG\"=> $e->getMessage(), \r\n \"CLASS\" => __CLASS__\r\n ));\r\n die(json_encode(array(\r\n \"TYPE\" => HTTP_STATUS_405, \r\n \"MSG\"=> $e->getMessage(), \r\n \"CLASS\" => __CLASS__\r\n )));\r\n }\r\n }", "title": "" }, { "docid": "a7a4ec4633ba4d27d63807db0eae2680", "score": "0.54029405", "text": "private function requestMethod() {\n\t\tif (isset($_SERVER['REQUEST_METHOD'])) {\n\t\t\t$this->request_method = $_SERVER['REQUEST_METHOD'];\n\t\t}\n\t}", "title": "" }, { "docid": "8bcea42ed8ccd99569da9c6ea94d31bf", "score": "0.53999764", "text": "protected function filterMethod($method)\n {\n if (is_string($method) && strtolower($method) === 'any') {\n return ['GET', 'HEAD', 'POST', 'PUT', 'DELETE', 'OPTIONS', 'PATCH'];\n }\n\n if (is_array($method)) {\n $method = array_map('strtoupper', $method);\n } elseif (is_string($method)) {\n $method = strtoupper($method);\n }\n\n return $method;\n }", "title": "" }, { "docid": "d8c80c6ac292a7067118519e39db2b5f", "score": "0.53991973", "text": "protected function delete($data) {\n $this->response = $this->response->withStatus(405, \"Method Not Allowed\");\n }", "title": "" }, { "docid": "61772a1671ea0fd64e00decc8783fad1", "score": "0.5390974", "text": "public function Forbidden()\n\t{\n\t\t$$this->router->runHttpErrorPage(403);\n\t}", "title": "" }, { "docid": "399293befe65a05f321b8313404688bb", "score": "0.5374281", "text": "public static function getAllowedMethods();", "title": "" }, { "docid": "5b842552fd3cebc94a9bbc5af521adf5", "score": "0.5366876", "text": "public function testServiceWithNoMethod()\n {\n $route = new Route();\n\n $route->set(null, null, null, [\"user\", \"nomethod\"]);\n $this->assertTrue($route->match(\"\"));\n $route->handle(\"\", self::$di);\n }", "title": "" }, { "docid": "b046f32160afd029b0a8c7a03ef5e5b9", "score": "0.53653795", "text": "public static function getBlockedMethods(): array\n {\n return [\n 'get',\n 'bind',\n 'factory',\n 'register',\n ];\n }", "title": "" }, { "docid": "ab0570e8fc27c05cd943cb5a43b8975f", "score": "0.53653246", "text": "public static function isValidHttpMethod($method) {}", "title": "" }, { "docid": "1c5eaac309b475b8d7d775c99dab9504", "score": "0.5361575", "text": "public function disableBasicAuth(): void\n {\n $this->basicAuth = false;\n }", "title": "" }, { "docid": "dbc66e3a107e4600be2b941345b78b2c", "score": "0.53602195", "text": "abstract public function getHTTPMethod(): string;", "title": "" }, { "docid": "a0cc4cc35b5e17e4b7e80e596464d887", "score": "0.53584766", "text": "public function setIgnoreOptionsMethod()\n {\n $this->ignoreOptionsMethod = true;\n }", "title": "" }, { "docid": "18956fed97a792fcdbc231a2117c5cda", "score": "0.53493214", "text": "public function allowedActions()\n\t{\n\t\treturn '*';\n\t}", "title": "" }, { "docid": "18956fed97a792fcdbc231a2117c5cda", "score": "0.53493214", "text": "public function allowedActions()\n\t{\n\t\treturn '*';\n\t}", "title": "" }, { "docid": "93e53f7c277fa9519a9927d4f6d0e545", "score": "0.53342915", "text": "protected function methodNotAllowedResponse() \n\t{\n\t\theader('Allow: ' . $this->supportedMethods, true, 405);\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "56058449c907c2d4fce9cbcf48a1e89c", "score": "0.53290856", "text": "function client_http_method()\r\n{\r\n $method = 'get';\r\n\r\n if (isset($_SERVER['REQUEST_METHOD']) && is_string($_SERVER['REQUEST_METHOD']))\r\n {\r\n $server_method = strtolower((string)$_SERVER['REQUEST_METHOD']);\r\n\r\n // https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html\r\n foreach (array('get', 'options', 'head', 'post', 'put', 'delete', 'trace', 'connect') as $valid_method)\r\n {\r\n if ($server_method === $valid_method)\r\n {\r\n $method = $valid_method;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return $method;\r\n}", "title": "" }, { "docid": "a3e0d04bea29cc35020f1d67787f3a9f", "score": "0.5328689", "text": "private function initDefaultMethod()\n {\n $method = static::GET;\n if (isset($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'])) {\n $method = $_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'];\n } elseif (isset($_SERVER['REQUEST_METHOD'])) {\n $method = $_SERVER['REQUEST_METHOD'];\n }\n $this->setMethod(strtolower($method));\n return $this;\n }", "title": "" }, { "docid": "f5385c1b2ddf4514d5071881f6791999", "score": "0.53137463", "text": "public function hasAllowedMethods()\n {\n return !empty($this->allowedMethods);\n }", "title": "" }, { "docid": "e328a6bac0f0e5b7d5cd84ce72115fa0", "score": "0.5309563", "text": "function kbVoteNotHelpful($params=array()) {\r\n\t\t$params['method'] = 'kb.voteNotHelpful';\r\n\t\treturn $this->request( $params );\r\n\t}", "title": "" }, { "docid": "9622f9a3e03931e287ad6b37429123e4", "score": "0.5309485", "text": "public function testIsGet()\n {\n $this->assertFalse($this->request->isGet());\n }", "title": "" }, { "docid": "2d9cd1f3414dbbaaeda685bfcab3996d", "score": "0.53001684", "text": "function getHttpMethod() {\n\tif (count($_POST)) {\n\t\treturn 'POST';\n\t} else {\n\t\treturn 'GET';\n\t}\n}", "title": "" }, { "docid": "cde5c938ca989d3a15aa1449ed0a8596", "score": "0.52949685", "text": "function __construct(array $allowed)\n {\n parent::__construct(405);\n\n $this->allowed = $allowed;\n }", "title": "" }, { "docid": "8a927b62db7c8ca61d2b2df8e749a132", "score": "0.5294315", "text": "protected function OPTIONS()\n\t{\n\t\t$this->Response->setHeader('Allow', 'OPTIONS, GET, HEAD, POST, PUT, PATCH, DELETE, TRACE');\n\t}", "title": "" }, { "docid": "e21891d8e442aae1c43073935f0d219f", "score": "0.52892387", "text": "function testAllowDenyAll() {\n\t\t$this->Controller->Auth->initialize($this->Controller);\n\n\t\t$this->Controller->Auth->allow('*');\n\t\t$this->Controller->Auth->deny('add', 'camelcase');\n\n\t\t$this->Controller->params['action'] = 'delete';\n\t\t$this->assertTrue($this->Controller->Auth->startup($this->Controller));\n\n\t\t$this->Controller->params['action'] = 'add';\n\t\t$this->assertFalse($this->Controller->Auth->startup($this->Controller));\n\n\t\t$this->Controller->params['action'] = 'Add';\n\t\t$this->assertFalse($this->Controller->Auth->startup($this->Controller));\n\n\t\t$this->Controller->params['action'] = 'camelCase';\n\t\t$this->assertFalse($this->Controller->Auth->startup($this->Controller));\n\n\t\t$this->Controller->Auth->allow('*');\n\t\t$this->Controller->Auth->deny(array('add', 'camelcase'));\n\n\t\t$this->Controller->params['action'] = 'camelCase';\n\t\t$this->assertFalse($this->Controller->Auth->startup($this->Controller));\n\t}", "title": "" }, { "docid": "15b50c2c2c786d8c5d19119cdbda2e27", "score": "0.5283217", "text": "protected function processMethods()\n {\n if (! isset($this->config->methods) || ! is_array($this->config->methods)) {\n return;\n }\n\n // Request method won't be set for CLI-based requests\n $method = strtolower($this->request->getMethod()) ?? 'cli';\n\n if (array_key_exists($method, $this->config->methods)) {\n $this->filters['before'] = array_merge($this->filters['before'], $this->config->methods[$method]);\n }\n }", "title": "" }, { "docid": "3fb9de7c7c3aa49a9a802c9ca812a820", "score": "0.52806234", "text": "public function testAllowedMethodsToGetRoutes()\n {\n $I = $this->tester;\n\n // Bad methods\n foreach(['POST', 'PATCH', 'PUT', 'DELETE'] as $method) {\n $I->{'send' . $method}('/routes', []);\n $I->seeResponseIsJson();\n $I->seeResponseContainsJson([\n 'previous' => ['name' => 'Invalid Route'],\n ]);\n }\n\n // Success method\n $I->sendGET('/routes', []);\n $I->seeResponseIsJson();\n $I->dontSeeResponseContainsJson([\n 'previous' => ['name' => 'Invalid Route'],\n ]);\n }", "title": "" }, { "docid": "cc9f6954d88086b32bdb1aed9edaf1a2", "score": "0.5276759", "text": "public function deny()\n {\n }", "title": "" }, { "docid": "4207f057ff6319e94495765bee683fcb", "score": "0.5276171", "text": "public function testGettingInvalidMethodRoutes()\n {\n $this->assertEquals([], $this->collection->get('methodThatDoeNotExist'));\n }", "title": "" }, { "docid": "056d43d95709718846c1053c018667a7", "score": "0.52761537", "text": "public function testAllowedMethodRequestIsNotLogged() {\n\t\t$this->fakeRequest('rate_limiter_test', 'method_a', 'method_a');\n\n\t\t//Check total\n\t\t$key = 'ratelimit_127.0.0.1_' . date('ymd');\n\t\t$total_actual = RateLimiterTestStorage::get($key);\n\t\t$total_expected = false;\n\t\t$this->assertEqual($total_expected, $total_actual);\n\t\t//Check method_a\n\t\t$key .= '_rate_limiter_test.method_a';\n\t\t$method_actual = RateLimiterTestStorage::get($key);\n\t\t$method_expected = false;\n\t\t$this->assertEqual($method_expected, $method_actual);\n\t}", "title": "" }, { "docid": "5833286a328252827d2286b1d58ed25d", "score": "0.5259875", "text": "protected function options() {\n $action = constant(strtoupper(str_replace(\"Action\", \"\", end(explode(\"\\\\\", get_class($this))))));\n\n if ($action === NULL) {\n $this->response = $this->response->withStatus(405, \"Method Not Allowed\");\n return;\n }\n\n $apiMap = require file_build_path(APP_DIRECTORY, \"api-map.php\");\n\n if (!isset($apiMap[$action])) {\n $this->response = $this->response->withStatus(405, \"Method Not Allowed\");\n return;\n }\n\n $actionMap = $apiMap[$action];\n $this->response = (new JsonResponse($actionMap[\"body\"]))->withHeader(\"Allow\", $actionMap[\"allowed\"]);\n }", "title": "" }, { "docid": "1cfac9b3d887f913f41c6b611487d8fb", "score": "0.5258837", "text": "function getRequestMethods ()\n\t{\n\t\treturn REQ_GET;\n\t}", "title": "" }, { "docid": "29b495b66d52043c5b10e53dba1399dc", "score": "0.5256131", "text": "public function getAllowedMethods()\n {\n return [\n 'standard' => 'Standard',\n 'fast' => 'Fast'\n ];\n }", "title": "" } ]
7a3bc6ecea1f3af6574389714dd74088
return server side filename
[ { "docid": "ce3950f7281c9f11553202c7aa74848b", "score": "0.7991774", "text": "public function getServerSideFilename()\n {\n return pathinfo($this->server_side_filename, PATHINFO_FILENAME);\n }", "title": "" } ]
[ { "docid": "cf864fab4b1b6617b13fe49aa860a7e3", "score": "0.7807648", "text": "public function getServerFilename(): string\n {\n return $this->hash.'.'.$this->extension;\n }", "title": "" }, { "docid": "726fd06320055dfa2aea010abf330efa", "score": "0.7800196", "text": "protected function filename()\n {\n return 'ServerSide_' . date('YmdHis');\n }", "title": "" }, { "docid": "7dda5b06ce393485b7cb364e35278d58", "score": "0.7787456", "text": "public function getClientFileName();", "title": "" }, { "docid": "2c2a894ddc716d1a4fac1f8f84991b2c", "score": "0.7532496", "text": "public function getFilename();", "title": "" }, { "docid": "2c2a894ddc716d1a4fac1f8f84991b2c", "score": "0.7532496", "text": "public function getFilename();", "title": "" }, { "docid": "16061b5e51ded00a5e4294fb92c465e8", "score": "0.74313533", "text": "public function getServerSidePath()\n {\n return $this->server_side_filename;\n }", "title": "" }, { "docid": "a511ed105e33737c2c05654ececda9bd", "score": "0.7400174", "text": "public function getClientSideFilename()\n {\n return $this->client_side_filename;\n }", "title": "" }, { "docid": "e89fe1db30740b2f6a1e6ca356fab01a", "score": "0.73837256", "text": "public function getFileName();", "title": "" }, { "docid": "e89fe1db30740b2f6a1e6ca356fab01a", "score": "0.73837256", "text": "public function getFileName();", "title": "" }, { "docid": "00c72d4fe1cb536c46f9056cca0f36ca", "score": "0.73680276", "text": "public function getFilename() {}", "title": "" }, { "docid": "5505b1fd80c90151614850b70bdc91d9", "score": "0.72857404", "text": "public static function getFilename(){ }", "title": "" }, { "docid": "1f345d02ffe83cc8f2c42c303a650725", "score": "0.72423273", "text": "function get_file_name()\n {\n global $objSmarty, $admin_smarty;\n\n $php_self_arr = explode(\"/\", $_SERVER['PHP_SELF']);\n #echo \"<pre>Request\";print_r($php_self_arr);echo\"</pre>\";\n $req_file_name = end($php_self_arr);\n /*$cnt_php_self_arr1\t= count($php_self_arr1);\n $req_file_name\t\t= $php_self_arr1[$cnt_php_self_arr1-1];*/\n //echo \"<br>\".$req_file_name;\n\n $objSmarty->assign('req_file_name', $req_file_name);\n $admin_smarty->assign('req_file_name', $req_file_name);\n\n return $req_file_name;\n }", "title": "" }, { "docid": "617b6137138364a515c982ce50804931", "score": "0.7183352", "text": "public function getFilename() {\n if( ! empty( $this->value ) ) {\n if( ! empty( $this->value[$this->name]['name'] ) ) {\n preg_match(\"|\\.[a-zA-Z]{2,6}$|\", $this->value[$this->name]['name'], $ext );\n $len = strlen( $ext[0] );\n// $tmp_name = preg_replace( \"|[ '_-]|\",\"\", $this->value[$this->name]['name'] );\n $tmp_name = substr( $this->value[$this->name]['name'], -$len );\n// echo \"<tt><pre>\". print_r( $ext[0], TRUE) . \"</pre></tt>\";\n return $this->encodestring( $this->prefix.$this->time.$tmp_name);\n } else return \"\";\n } else return \"\";\n }", "title": "" }, { "docid": "328f88334fd5caf00cd5da620ba6ec06", "score": "0.7117019", "text": "private function fileName(): string {\n if ($this->displayDate) { return $this->filePrefix.date($this->dateFormat).$this->fileExtension; }\n else { return $this->filePrefix.$this->fileExtension; }\n }", "title": "" }, { "docid": "83f60050e27f55971e0e1f82ebe026e3", "score": "0.7114332", "text": "public function getFileName(){\n return basename($this->path);\n }", "title": "" }, { "docid": "ebafb8b130469ca3836cbcd1a8a85f00", "score": "0.7080258", "text": "protected function filename()\n {\n return 'File_' . date('YmdHis');\n }", "title": "" }, { "docid": "4e37b83df389cd5989371e04541f204e", "score": "0.7077373", "text": "protected function getFile() : string\n\t{\n\t\t$file = hash('sha256', $this->app->full_url) . '.' . $this->extension;\n\t\tif ($this->gzip) {\n\t\t\t$file.= '.gz';\n\t\t}\n\n\t\treturn $file;\n\t}", "title": "" }, { "docid": "d2055e958941f36d0d0121b3e8bb7db9", "score": "0.70028955", "text": "public function filename() {\n return $this->doc != NULL? realpath($this->doc->documentURI) : \"\";\n }", "title": "" }, { "docid": "29e91e722e017fa1e39032f54e484d58", "score": "0.7000597", "text": "protected function getFilename()\n {\n return Helpers::postFixWith(trim($this->option('fields-filename')) ?: $this->getTableName(), '.json');\n }", "title": "" }, { "docid": "46e021c1014daf16082a56b9991aca26", "score": "0.6984661", "text": "public function get_file_name()\r\n\t{\r\n\t\treturn $this->file_name;\r\n\t}", "title": "" }, { "docid": "68e22397d59249c2c5c0acae98954861", "score": "0.69625306", "text": "public function getFileName() {\n return empty($this->filename) ? '' : $this->filename;\n }", "title": "" }, { "docid": "f43426cf57a7d9acc01f3c786e2f7de4", "score": "0.6960371", "text": "public function filename(): string\n {\n return $this->_filename;\n }", "title": "" }, { "docid": "2d7fbf812dc8657b029dfb1e465f7ce8", "score": "0.6957791", "text": "public function filename()\n {\n return basename($this->_path);\n }", "title": "" }, { "docid": "6d547262dd5be20dd7b859ec5c8c4185", "score": "0.6949378", "text": "public function return_filename($filename) {\r\n\t\tif (!file_exists(DIR_IMAGE . $filename) || !is_file(DIR_IMAGE . $filename)) {\r\n\t\t\treturn;\r\n\t\t} \r\n\t\t\r\n\t\tif (isset($this->request->server['HTTPS']) && (($this->request->server['HTTPS'] == 'on') || ($this->request->server['HTTPS'] == '1'))) {\r\n\t\t\treturn HTTPS_IMAGE . $filename;\r\n\t\t} else {\r\n\t\t\treturn HTTP_IMAGE . $filename;\r\n\t\t}\t\r\n\t}", "title": "" }, { "docid": "85a70aedaa027d61483c584529002004", "score": "0.6941335", "text": "protected function _file_name()\n\t{\n\t\t$backup_date = date($this->file_date_format);\n\t\t$prefix = $this->file_prefix;\n\t\t\n\t\tif ($prefix == 'AUTO')\n\t\t{\n\t\t\t$prefix = url_title($this->fuel->config('site_name'), 'underscore', TRUE);\n\t\t}\n\t\t$file_name = $prefix.'_'.date($this->file_date_format);\n\t\treturn $file_name;\n\t}", "title": "" }, { "docid": "388662245c332e798d74a561ada7c52e", "score": "0.69336426", "text": "public function getFilename() : string\n {\n return $this->filename;\n }", "title": "" }, { "docid": "88afde2c2c02e3bd080383ba3a4f3799", "score": "0.692579", "text": "public function getFilename(): string\n {\n return $this->filename;\n }", "title": "" }, { "docid": "88afde2c2c02e3bd080383ba3a4f3799", "score": "0.692579", "text": "public function getFilename(): string\n {\n return $this->filename;\n }", "title": "" }, { "docid": "9d782b680e2413b66edfbe7daefc808f", "score": "0.69201225", "text": "public function the_filename() {\n\t\tDLM_Debug_Logger::deprecated( 'DLM_Download::get_the_filename()' );\n\n\t\techo $this->get_version()->get_filename();\n\t}", "title": "" }, { "docid": "be24c6b328a0ebf6cf50b8ad379ea857", "score": "0.69125175", "text": "public static function getFilename() {\n $from_opt = !empty(self::cmdOptionsGet()['out']) ? self::cmdOptionsGet()['out'] : '';\n return $from_opt ? $from_opt : self::filenameFromOperand();\n }", "title": "" }, { "docid": "1db8e0240fe50ff83b953ba4d6e24c46", "score": "0.68956345", "text": "protected function filename()\n {\n return 'Dữ liệu Poster Cá nhân ' . date('YmdHis');\n }", "title": "" }, { "docid": "e5cfca36aa50677e4f4e3520906ed18f", "score": "0.6883218", "text": "abstract protected function get_file_name(): string;", "title": "" }, { "docid": "fc7bb8d0c9ebe6e76a648dd6ffe94d69", "score": "0.6879368", "text": "public function get_filename()\n {\n error_log('\\\\unikent\\\\KAR\\\\Publication::get_filename is deprecated - please use get_files instead.');\n $files = $this->get_files();\n if (empty($files)) {\n return;\n }\n\n $file = reset($files);\n\n return '/' . $this->get_id() . '/' . $file->get_pos() . '/' . $this->_api->encode_string($file->get_filename());\n }", "title": "" }, { "docid": "663e6e237c29f0a3e7bb779a619a9992", "score": "0.6873937", "text": "public function generateFilename() \n\t{\n\t\t$this->filename_data = $this->root_path . $this->domain . '/' . $this->domain . '.' . \n\t\t\t\t$this->form_name . '.data.zip';\n\t\t$this->filename_header = $this->root_path . $this->domain . '/' . $this->domain . '.' . \n\t\t\t\t$this->form_name . '.header.txt';\n\t}", "title": "" }, { "docid": "fb03b4d6ad14c970c561b7fc0f7847f1", "score": "0.6866039", "text": "function header_filename($file)\n{\n\tglobal $request;\n\n\t$user_agent = $request->header('User-Agent');\n\n\t// There be dragons here.\n\t// Not many follows the RFC...\n\tif (strpos($user_agent, 'MSIE') !== false || strpos($user_agent, 'Konqueror') !== false)\n\t{\n\t\treturn \"filename=\" . rawurlencode($file);\n\t}\n\n\t// follow the RFC for extended filename for the rest\n\treturn \"filename*=UTF-8''\" . rawurlencode($file);\n}", "title": "" }, { "docid": "4bcdafa0d6af716beeb01be57b426248", "score": "0.6864813", "text": "public function getRealname(){\n\t\treturn $this->file;\n\t}", "title": "" }, { "docid": "065cfab173b15c67e562ea0c95da054d", "score": "0.68637764", "text": "protected function getFileName()\n {\n return 'Sephpa.DirectDebit.' . $this->msgId;\n }", "title": "" }, { "docid": "610ba64c24ff1367c80750425e54d64f", "score": "0.68621063", "text": "public function getFileName(): string\n {\n return $this->filename;\n }", "title": "" }, { "docid": "145e6ff05eb8ee2a9fdd2e906ae85f84", "score": "0.6849923", "text": "protected function filename()\n {\n return 'Documents_' . date('YmdHis');\n }", "title": "" }, { "docid": "7139b7a808f296c992a2896e857b4337", "score": "0.68473786", "text": "public function getFilename()\n {\n return $this->filename ?: '(unknown)';\n }", "title": "" }, { "docid": "caefd7c78c3d896c2f892ccd5fdd7764", "score": "0.68470454", "text": "public function getFilename() {\n return $this->path;\n }", "title": "" }, { "docid": "aff600da400da665543632a7a8517e5d", "score": "0.6838453", "text": "protected function filename()\n {\n return 'Clients_' . date('YmdHis');\n }", "title": "" }, { "docid": "fff06e502192d42273268df5a4f8ee35", "score": "0.6837672", "text": "public function get_the_filename() {\n\t\tDLM_Debug_Logger::deprecated( 'DLM_Download::get_the_filename()' );\n\n\t\treturn $this->get_version()->get_filename();\n\t}", "title": "" }, { "docid": "61006369cbd8743a4d7517f909411a19", "score": "0.682823", "text": "public function getFilename()\n {\n return __FILE__;\n }", "title": "" }, { "docid": "61006369cbd8743a4d7517f909411a19", "score": "0.682823", "text": "public function getFilename()\n {\n return __FILE__;\n }", "title": "" }, { "docid": "0bac013aacfab36c4c6da308c93a2d85", "score": "0.6817839", "text": "public function get_file_name()\n {\n return $this->file_name;\n }", "title": "" }, { "docid": "8cdf5f747e2d041081255f1962f63067", "score": "0.6816365", "text": "protected function getFilename()\n {\n return rtrim(static::getDir(), '/') . '/' . $this->code;\n }", "title": "" }, { "docid": "94744b24ae4f954457a1c6433cddbdb1", "score": "0.679643", "text": "public function getFilename ()\n {\n return $this->filename;\n }", "title": "" }, { "docid": "9a9ab8d34a7673f960428ba2bb0ff9b1", "score": "0.67957443", "text": "public function getFileName()\n {\n\n $filename = 'robots';\n\n if (is_multisite()) {\n\n $blog_id = get_current_blog_id();\n $filename .= \"-\" . $blog_id;\n\n }\n\n $filename .= '.txt';\n\n return apply_filters('fpcms_robotstxt_name', $filename);\n\n }", "title": "" }, { "docid": "f21f6cc53a3f46ca31e704ddaec17276", "score": "0.6791518", "text": "private static function getFileName(): string\n {\n $matches = [];\n\n preg_match(\"/^[^\\.]+/\", self::$currentPath, $matches);\n\n return $matches[0];\n }", "title": "" }, { "docid": "73b058ea40602819e38f6db1ca4996f1", "score": "0.6788382", "text": "public function getRealFilename()\n {\n list($fdir,$fid) = explode('-', $this->getFileid());\n $directory = 'data/genericresources/' . $fdir;\n\n return $directory . '/' . $fid . '.dat';\n }", "title": "" }, { "docid": "ca9b2f3d1fa2f6e337d44ac1394306c9", "score": "0.6786829", "text": "private function _generate_filename()\n\t{\n\t\t// Generate filename\n\t\t$parsed_home = parse_url( get_home_url() ) ;\n\t\t$filename = 'LSCWP_cfg-' ;\n\t\tif ( ! empty( $parsed_home[ 'host' ] ) ) {\n\t\t\t$filename .= $parsed_home[ 'host' ] . '_' ;\n\t\t}\n\n\t\tif ( ! empty( $parsed_home[ 'path' ] ) ) {\n\t\t\t$filename .= $parsed_home[ 'path' ] . '_' ;\n\t\t}\n\n\t\t$filename = str_replace( '/', '_', $filename ) ;\n\n\t\t$filename .= '-' . date( 'Ymd_His' ) . '.data' ;\n\n\t\treturn $filename ;\n\t}", "title": "" }, { "docid": "045de5e1d88ec83e3463d8b88e227539", "score": "0.6773763", "text": "public function filename()\n\t{\n\t\treturn pathinfo($this->_path, PATHINFO_FILENAME);\n\t}", "title": "" }, { "docid": "6a5e72c8450d49f4453c1b4de917d5a6", "score": "0.67685956", "text": "protected function filename()\n {\n return $this->subscription_type_name . '_territory-' . $this->territory_name . '_sector-' . $this->sector_name . '_' . Carbon::now('Asia/Dhaka');\n }", "title": "" }, { "docid": "80e2fb977923875cb97e22f9e459a624", "score": "0.6766068", "text": "protected function filename()\n {\n return 'fornecedores';\n }", "title": "" }, { "docid": "ec34ed496466a737af509cc514a6c378", "score": "0.67612374", "text": "public function getFileName(): string;", "title": "" }, { "docid": "a886ca16f079f10304659d5e7610159f", "score": "0.6756297", "text": "protected function getFileName()\n {\n return date('Y_m_d_His_') . $this->getSchemaName();\n }", "title": "" }, { "docid": "462572a4c956119255e6375f607f51ce", "score": "0.675602", "text": "protected function filename()\n {\n return 'SITERNAK_Pemilik_' . date('YmdHis');\n }", "title": "" }, { "docid": "9a0c5ecf31f62b30bb2c45caed2ddb27", "score": "0.6753358", "text": "protected function getFilename() {\n $date = new \\DateTime();\n $dateLabel = $date->format('YmdHis');\n $exportPath = $this->directoryList->getPath('var') . \"/export/\";\n if(!$this->fileHandler->isDirectory($exportPath)) {\n $this->fileHandler->createDirectory($exportPath);\n }\n return \"{$exportPath}customers-{$dateLabel}\";\n }", "title": "" }, { "docid": "cf0a8ae0eb1ab5e43478f6684de50048", "score": "0.67499244", "text": "public function getFilename() {\n return $this->page_filename;\n }", "title": "" }, { "docid": "e677fdab93f1d468ae93beb6f9adf313", "score": "0.67490983", "text": "private function getFileName() {\n\t\treturn $this->fileName;\n\t}", "title": "" }, { "docid": "ab8af996a1551de524058fbbab5a4212", "score": "0.6748232", "text": "public function getFileName()\n {\n if ($this->name !== null)\n {\n return $this->name;\n }\n else\n {\n return basename($this->getPath());\n }\n }", "title": "" }, { "docid": "ea6c53699b065e33828b6ca2a18e11a4", "score": "0.6747388", "text": "public function getFileName(): string\n {\n return $this->file->getName();\n }", "title": "" }, { "docid": "a030091ed5be273e905193c5274cd810", "score": "0.67399186", "text": "public function getFileName()\n\t{\n\t\treturn $this->filename;\n\t}", "title": "" }, { "docid": "0cf581392c109642a9ed4b51f4a41495", "score": "0.67395204", "text": "public function getFileName(): string\n {\n return $this->fileName;\n }", "title": "" }, { "docid": "d1dd6646d03b6c605d08f4c6bed11fd6", "score": "0.67346776", "text": "protected function getFileName(): string\n {\n return date('YmdHis') . '_' . uniqid('', true);\n }", "title": "" }, { "docid": "87f53d7c38935fba6149943c2e5d6e9c", "score": "0.6720823", "text": "function getName() {\n\n /* The file name is preceded by its id to keep\n * the client able to request the file from its id\n */\n $basename = basename($this->getFile()->getFileName());\n return $basename;\n\n }", "title": "" }, { "docid": "fa762935a7732e45a39c4abe9f37d8f3", "score": "0.67159754", "text": "public function getLeadFileName()\n {\n $lead_file_array = $this->getLeadFile();\n if (isset($lead_file_array['filename']) && !empty($lead_file_array['filename'])) {\n return $lead_file_array['filename'];\n }\n return 'index.php'; \n }", "title": "" }, { "docid": "fc41743fc41a66280c7e052679395375", "score": "0.6700965", "text": "private function generateFileName(): string {\r\n return $this -> directory -> getPath() . date($this -> getMode()) . $this -> getSuffix() . $this -> getExtension();\r\n }", "title": "" }, { "docid": "d1e921f66cf099b1ecd999d87a6c7511", "score": "0.6697206", "text": "public function getFileName()\n {\n return $this->uploadedFileName;\n }", "title": "" }, { "docid": "695337dc3de1f0d9a20e38406d8a9fee", "score": "0.6692812", "text": "public function getFileName()\n {\n return $this->filename;\n }", "title": "" }, { "docid": "695337dc3de1f0d9a20e38406d8a9fee", "score": "0.6692812", "text": "public function getFileName()\n {\n return $this->filename;\n }", "title": "" }, { "docid": "695337dc3de1f0d9a20e38406d8a9fee", "score": "0.6692812", "text": "public function getFileName()\n {\n return $this->filename;\n }", "title": "" }, { "docid": "088348bd6c6d622e464e7678191f7e54", "score": "0.66927993", "text": "protected static function getFilename(): string\n {\n return Carbon::now()->format(Backup::FILENAME_FORMAT);\n }", "title": "" }, { "docid": "3770fae365350cdeac2b56686dc17094", "score": "0.6691306", "text": "public function getFileName() {\n\t\treturn $this->file['name'];\n\t}", "title": "" }, { "docid": "6199e28de858595f1700c57cacd744ed", "score": "0.6691103", "text": "public function getFilename()\n {\n return $this->filename;\n }", "title": "" }, { "docid": "6199e28de858595f1700c57cacd744ed", "score": "0.6691103", "text": "public function getFilename()\n {\n return $this->filename;\n }", "title": "" }, { "docid": "6199e28de858595f1700c57cacd744ed", "score": "0.6691103", "text": "public function getFilename()\n {\n return $this->filename;\n }", "title": "" }, { "docid": "6199e28de858595f1700c57cacd744ed", "score": "0.6691103", "text": "public function getFilename()\n {\n return $this->filename;\n }", "title": "" }, { "docid": "6199e28de858595f1700c57cacd744ed", "score": "0.6691103", "text": "public function getFilename()\n {\n return $this->filename;\n }", "title": "" }, { "docid": "6199e28de858595f1700c57cacd744ed", "score": "0.6691103", "text": "public function getFilename()\n {\n return $this->filename;\n }", "title": "" }, { "docid": "6199e28de858595f1700c57cacd744ed", "score": "0.6691103", "text": "public function getFilename()\n {\n return $this->filename;\n }", "title": "" }, { "docid": "6199e28de858595f1700c57cacd744ed", "score": "0.6691103", "text": "public function getFilename()\n {\n return $this->filename;\n }", "title": "" }, { "docid": "6199e28de858595f1700c57cacd744ed", "score": "0.6691103", "text": "public function getFilename()\n {\n return $this->filename;\n }", "title": "" }, { "docid": "6199e28de858595f1700c57cacd744ed", "score": "0.6691103", "text": "public function getFilename()\n {\n return $this->filename;\n }", "title": "" }, { "docid": "c29ec17c8e59fa8bf17a944430ea8a64", "score": "0.6688953", "text": "public function getFileName()\n {\n return array_get(array_reverse(explode('/', $this->object->getPath())), 0);\n }", "title": "" }, { "docid": "1c89a47171131fcabb0b918c7b9271d6", "score": "0.6673591", "text": "public function filename()\n {\n return $this->filename;\n }", "title": "" }, { "docid": "406a744370574f580f27052bba89d3e0", "score": "0.66564816", "text": "function getFileName()\n\t{\n\t\t$this->file_name = strtolower(str_replace(\" \", \"_\",$_FILES[$this->input_filename]['name']));\n\t\treturn $this->file_name;\n\t}", "title": "" }, { "docid": "586771be0fcfc1e69b53ec0ddda9a827", "score": "0.66502136", "text": "public function getFilename()\n {\n if ($this->_saved_filename) {\n return basename($this->_saved_filename);\n }\n }", "title": "" }, { "docid": "29b6b6d6d1c80cf60eeb29877a0a23cb", "score": "0.66488403", "text": "public function getFileName()\n\t{\n\t\treturn $this->fileName;\n\t}", "title": "" }, { "docid": "7e994c373a5f673f8de8b0d7290d01b7", "score": "0.6636288", "text": "protected function buildFilename() {\n\t\t$filename = $this->path; \n\t\tif($this->secondaryID) $filename .= $this->secondaryID; \n\t\t\telse $filename .= $this->primaryID; \n\t\t$filename .= self::cacheFileExtension; \n\t\treturn $filename; \n\t}", "title": "" }, { "docid": "c5c5aaaa83c8e2cc96c0713847d83a0e", "score": "0.6626868", "text": "public function getFilename()\n\t{\n\t\treturn $this->_filename;\n\t}", "title": "" }, { "docid": "76a83bbcd85f77f2eb58cbfd120baeb3", "score": "0.66092634", "text": "public function getFilename() {\n return DocumentHelper::getFilename($this);\n }", "title": "" }, { "docid": "004d95f1a951993257ebc761fdc4892d", "score": "0.66085523", "text": "public function getFileName()\n {\n return $this->name;\n }", "title": "" }, { "docid": "aef45366afe2641131bf8c21c9bf5f0a", "score": "0.66045976", "text": "public function getFilename() {\n\t\treturn $this->filename;\n\t}", "title": "" }, { "docid": "aef45366afe2641131bf8c21c9bf5f0a", "score": "0.66045976", "text": "public function getFilename() {\n\t\treturn $this->filename;\n\t}", "title": "" }, { "docid": "73d89495c7e0fdbffe7290cabe6075ae", "score": "0.6603961", "text": "protected function filename()\n {\n return 'Export_' . date('YmdHis');\n }", "title": "" }, { "docid": "b433a19fc9351bf1b7e98d166c41ffbf", "score": "0.66022485", "text": "public function getFileName(): string\n {\n return \"$this->artist - $this->title\";\n }", "title": "" }, { "docid": "532e26a2a971134cd7951217cf24a9c2", "score": "0.6599114", "text": "public static function getFilename()\n\t{\n\t\treturn Registry::get('genie_config', 'filename');\n\t}", "title": "" }, { "docid": "addececb89544a0315d64299b75f687a", "score": "0.65967065", "text": "protected function filename()\n {\n return null;\n }", "title": "" } ]
90ff4e7f750c1a9b854d571a61a2c418
Loads one or more personPhotos of given one or more personAlbums
[ { "docid": "25ca94569f01aa18373de832d1c84173", "score": "0.8668506", "text": "function loadPersonPhotosFor($personAlbums) {\n $rel = $this->getRelation('_personPhotos');\n return $rel->loadDest($personAlbums); \n }", "title": "" } ]
[ { "docid": "e4aba8dda82678eb9626f5d1b13b2853", "score": "0.7948383", "text": "function loadPeopleFor($personAlbums) {\n $rel = $this->getRelation('_person');\n return $rel->loadDest($personAlbums); \n }", "title": "" }, { "docid": "95bce1d9387bd7ad92734aa40787a5c5", "score": "0.752817", "text": "function loadForPersonPhotos($personPhotos) {\n $rel = $this->getRelation('_personPhotos');\n return $rel->loadSrc($personPhotos); \n }", "title": "" }, { "docid": "6e089a68ab30b4056d26fcb0cfee86ad", "score": "0.6921408", "text": "function getOfPersonPhotos($personPhotos) {\n $rel = $this->getRelation('_personPhotos');\n $res = $rel->getSrc($personPhotos); \n return $res;\n }", "title": "" }, { "docid": "f2293d760aa57034e0abcd4fca7cdf4c", "score": "0.6538572", "text": "public function getAlbumPhotos($criteria = null, PropelPDO $con = null)\n\t{\n\t\tif ($criteria === null) {\n\t\t\t$criteria = new Criteria(sfGuardUserPeer::DATABASE_NAME);\n\t\t}\n\t\telseif ($criteria instanceof Criteria)\n\t\t{\n\t\t\t$criteria = clone $criteria;\n\t\t}\n\n\t\tif ($this->collAlbumPhotos === null) {\n\t\t\tif ($this->isNew()) {\n\t\t\t $this->collAlbumPhotos = array();\n\t\t\t} else {\n\n\t\t\t\t$criteria->add(AlbumPhotoPeer::USER_ID, $this->id);\n\n\t\t\t\tAlbumPhotoPeer::addSelectColumns($criteria);\n\t\t\t\t$this->collAlbumPhotos = AlbumPhotoPeer::doSelect($criteria, $con);\n\t\t\t}\n\t\t} else {\n\t\t\t// criteria has no effect for a new object\n\t\t\tif (!$this->isNew()) {\n\t\t\t\t// the following code is to determine if a new query is\n\t\t\t\t// called for. If the criteria is the same as the last\n\t\t\t\t// one, just return the collection.\n\n\n\t\t\t\t$criteria->add(AlbumPhotoPeer::USER_ID, $this->id);\n\n\t\t\t\tAlbumPhotoPeer::addSelectColumns($criteria);\n\t\t\t\tif (!isset($this->lastAlbumPhotoCriteria) || !$this->lastAlbumPhotoCriteria->equals($criteria)) {\n\t\t\t\t\t$this->collAlbumPhotos = AlbumPhotoPeer::doSelect($criteria, $con);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->lastAlbumPhotoCriteria = $criteria;\n\t\treturn $this->collAlbumPhotos;\n\t}", "title": "" }, { "docid": "5dd76285867dd264e0ae76af3d1e5b18", "score": "0.63127685", "text": "public function albumPhotos()\n {\n $album_id=$_POST['album_id'];\n if (!$album_id) {\n redirect('Fb_Login');\n }\n $user = $this->facebook->getUser();\n $album_photos=$this->facebook->api('/'.$album_id.'/photos?fields=name,source,picture&limit=1000');\n $album_photos_url = array();\n $photos_name = array();\n \n foreach ($album_photos['data'] as $album_photo) {\n $album_photos_url[]=$album_photo['source'];\n if (isset($album_photo['name'])) {\n $photos_name[]=$album_photo['name']; \n }\n if (!isset($album_photo['name'])) {\n // $album['name']='';\n $photos_name[]=\"\";\n continue;\n }\n } \n echo json_encode(array('album_photos_url' => $album_photos_url,'photos_name' => $photos_name));\n }", "title": "" }, { "docid": "992102c1c0346baf5f4cbac28157b6f7", "score": "0.62944806", "text": "public function initAlbumPhotos()\n\t{\n\t\t$this->collAlbumPhotos = array();\n\t}", "title": "" }, { "docid": "92e07cc0b7f556747bc8e7cfef672f47", "score": "0.62835366", "text": "public function photos()\n {\n return $this->hasManyThrough(Photo::class, Album::class);\n }", "title": "" }, { "docid": "23919229ec19d401953684a04a5ad3f3", "score": "0.62269515", "text": "public function getAlbumPhotosJoinPhoto($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)\n\t{\n\t\tif ($criteria === null) {\n\t\t\t$criteria = new Criteria(sfGuardUserPeer::DATABASE_NAME);\n\t\t}\n\t\telseif ($criteria instanceof Criteria)\n\t\t{\n\t\t\t$criteria = clone $criteria;\n\t\t}\n\n\t\tif ($this->collAlbumPhotos === null) {\n\t\t\tif ($this->isNew()) {\n\t\t\t\t$this->collAlbumPhotos = array();\n\t\t\t} else {\n\n\t\t\t\t$criteria->add(AlbumPhotoPeer::USER_ID, $this->id);\n\n\t\t\t\t$this->collAlbumPhotos = AlbumPhotoPeer::doSelectJoinPhoto($criteria, $con, $join_behavior);\n\t\t\t}\n\t\t} else {\n\t\t\t// the following code is to determine if a new query is\n\t\t\t// called for. If the criteria is the same as the last\n\t\t\t// one, just return the collection.\n\n\t\t\t$criteria->add(AlbumPhotoPeer::USER_ID, $this->id);\n\n\t\t\tif (!isset($this->lastAlbumPhotoCriteria) || !$this->lastAlbumPhotoCriteria->equals($criteria)) {\n\t\t\t\t$this->collAlbumPhotos = AlbumPhotoPeer::doSelectJoinPhoto($criteria, $con, $join_behavior);\n\t\t\t}\n\t\t}\n\t\t$this->lastAlbumPhotoCriteria = $criteria;\n\n\t\treturn $this->collAlbumPhotos;\n\t}", "title": "" }, { "docid": "676e97a382cc525419a6d538c6425cf6", "score": "0.61123955", "text": "public function get_photos_by_album($id)\r\n {\r\n $query = $this->db->query('SELECT * FROM photos WHERE album=\"'.$id.'\"');\r\n return $query->result_array();\r\n }", "title": "" }, { "docid": "69242e24b67fc82f01bdc7dc00c4d805", "score": "0.60783696", "text": "public function getPhotos() {\n\t\t$photos = array();\n\t\t$q = $this->bdd->prepare('SELECT * FROM photos ORDER BY id');\n\t\t$q->execute();\n\t\twhile ($data = $q->fetch(PDO::FETCH_ASSOC)) {\n\t\t\t$photos[] = new Photo($data);\n\t\t}\n\t\treturn $photos;\n\t}", "title": "" }, { "docid": "14ce30a12047f5342fbe06dae249c4f2", "score": "0.6067748", "text": "public function getPhotos($albumId)\n {\n $data = file_get_contents(\n $this->_baseUrl\n . 'feed/base/'\n . 'user/' \n . $this->_userId\n . '/albumid/' . $albumId\n . '?hl=en_US&imgmax=d'\n );\n $data = preg_replace(\"/(<\\/?)(\\w+):([^>]*>)/\", \"$1$2_$3\", $data);\n\n $photos = array();\n\n try { \n $xml = new SimpleXMLElement($data);\n foreach ($xml->entry as $photo) {\n $link = (string) $photo->content->attributes()->src[0];\n \n // tripple encoded filenames. Why, oh Why?\n $filename = str_replace(\"%25\", \"%\", basename($link));\n $filename = urldecode(urldecode($filename));\n \n // Use filename for Title if no title is given in picasa\n $title = (string) $photo->title;\n $title = empty($title)\n ? $title\n : $filename;\n \n preg_match(\n '|\\/photoid\\/([0-9]+)[/\\?]|i', \n (string) $photo->id, \n $matches\n );\n \n $photos[] = (object) array(\n 'title' => (string) $photo->title,\n 'id' => (string) $photo->id,\n 'link' => $link,\n 'photoid' => $matches[1],\n 'filename' => $filename,\n );\n }\n } catch (Exception $e) {\n throw new Exception(\"PICASA: Invalid response: {$e}\");\n }\n\n return $photos;\n }", "title": "" }, { "docid": "029ed97876270d2b840cfa00bae5c0b7", "score": "0.5962406", "text": "public function getAlbum() {\n $sql = \"SELECT photo_album.album_id, photo_album.album_name, user.user_id, user.first_name, user.last_name\n FROM photo_album\n INNER JOIN user\n ON photo_album.user_id = user.user_id\";\n\n $result = $this->_db->query($sql);\n\n if ($result->rowCount() > 0)\n return $result->fetchAll(PDO::FETCH_OBJ);\n else\n return false;\n }", "title": "" }, { "docid": "4e13ce930d087dd04742020676d78cdf", "score": "0.5938135", "text": "public function getProfilePhotos($criteria = null, PropelPDO $con = null)\n\t{\n\t\tif ($criteria === null) {\n\t\t\t$criteria = new Criteria(sfGuardUserPeer::DATABASE_NAME);\n\t\t}\n\t\telseif ($criteria instanceof Criteria)\n\t\t{\n\t\t\t$criteria = clone $criteria;\n\t\t}\n\n\t\tif ($this->collProfilePhotos === null) {\n\t\t\tif ($this->isNew()) {\n\t\t\t $this->collProfilePhotos = array();\n\t\t\t} else {\n\n\t\t\t\t$criteria->add(ProfilePhotoPeer::USER_ID, $this->id);\n\n\t\t\t\tProfilePhotoPeer::addSelectColumns($criteria);\n\t\t\t\t$this->collProfilePhotos = ProfilePhotoPeer::doSelect($criteria, $con);\n\t\t\t}\n\t\t} else {\n\t\t\t// criteria has no effect for a new object\n\t\t\tif (!$this->isNew()) {\n\t\t\t\t// the following code is to determine if a new query is\n\t\t\t\t// called for. If the criteria is the same as the last\n\t\t\t\t// one, just return the collection.\n\n\n\t\t\t\t$criteria->add(ProfilePhotoPeer::USER_ID, $this->id);\n\n\t\t\t\tProfilePhotoPeer::addSelectColumns($criteria);\n\t\t\t\tif (!isset($this->lastProfilePhotoCriteria) || !$this->lastProfilePhotoCriteria->equals($criteria)) {\n\t\t\t\t\t$this->collProfilePhotos = ProfilePhotoPeer::doSelect($criteria, $con);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->lastProfilePhotoCriteria = $criteria;\n\t\treturn $this->collProfilePhotos;\n\t}", "title": "" }, { "docid": "b3c25ec11103273889df22054198f671", "score": "0.5933665", "text": "function getAlbums($return_object=false){\n\t\n\tglobal $enc;\n\n\tunset($_SESSION[\"app_data\"]);\n\n\tif(!userAndToken()){\n\t\techo json_encode(array(\"error\"=>createLoginURL()));\n\t}\n\telse{\n\t\t\n\t\t$fqlquery = '{\"query1\":\"SELECT+cover_pid,aid,created,visible,photo_count,is_user_facing,type,modified,modified_major,name,like_info,comment_info+FROM+album+WHERE+owner='. $_SESSION[\"user_id\"] . '\",\"query2\":\"SELECT+src,aid+FROM+photo+WHERE+pid+IN+' . $enc[\"pl\"] . 'SELECT+cover_pid+FROM+' . $enc[\"pound\"] .'query1' . \t$enc[\"pr\"] . '\"}&access_token=' . $_SESSION[\"access_token\"];\n\t\t$token_url = 'https://graph.facebook.com/v2.0/fql?q=' . $fqlquery;\t\n\t\t$response = curlget($token_url);\n\t\t\n\t\t//for testing\n\t\t$data = json_decode($response);\n\n\t\tfile_put_contents(FB_DOCUMENT_ROOT . $_SESSION[\"user_id\"] . \"_albums\", json_encode($response));\n\t\t\n\t\tif(checkOAuthError($data)){\n\n\t\t\t$login_array = array(\"error\"=>createLoginURL());\n\n\t\t\tif(!$return_object){\n\t\t\t\techo json_encode($login_array);\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn $login_array;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t\n\t\t\tif(isset($data->data[0]->fql_result_set)){\n\t\t\t\t$albums = $data->data[0]->fql_result_set;\n\t\t\t\t$albumsPhotos = $data->data[1]->fql_result_set;\n\t\t\t\t$newAlbum = array();\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t$g=0;\n\t\t\t\t$i=0;\n\t\t\t\n\t\t\t\t$currentpage = 0;\n\t\t\t\t$pagecounter = 0;\n\t\t\t\t$itemsonpage = 16;\n\t\t\t\t\n\t\t\t\t//error_log(json_encode($albums) . \"\\n\\n\");\t\t\t\n\t\t\t\t//error_log(sizeof($albums) . \"\\n\\n\");\n\n\t\t\t\twhile($i<sizeof($albumsPhotos)){\n\t\t\t\t\t\t//error_log(json_encode($albums[$g]));\n\t\t\t\t\t\tif($albums[$g]->aid == $albumsPhotos[$i]->aid){\t\n\t\t\t\t\t\t\t$newAlbum[$currentpage][] = array($albums[$g]->name,$albumsPhotos[$i]->src,$albums[$g]->aid);\n\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif($pagecounter<$itemsonpage-1){\n\t\t\t\t\t\t\t\t\t$pagecounter++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t$currentpage++;\n\t\t\t\t\t\t\t\t\t$pagecounter = 0;\n\t\t\t\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if($albums[$g]->aid==0 || $albumsPhotos[$i]->aid==0){\n\t\t\t\t\t\t\t//update if album id is zeor\n\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t}\n\t\t\t\n\t\t\t\t\t\tif($g<sizeof($albums)-1){\n\t\t\t\t\t\t\t$g++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t$g=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//$newAlbum[$currentpage][] = $_SESSION;\n\t\t\t\tif(!$return_object){\n\t\t\t\t\techo json_encode($newAlbum);\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\treturn $data;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/*$i=0;\n\t\t\t\tforeach($newAlbum as $album){\n\t\t\t\t\techo '<div class=\"albumcover\">';\n\t\t\t\t\techo '<span>'. (string) $album[0] . '</span>';\n\t\t\t\t\techo '<div class=\"coverholder\">';\n\t\t\t\t\techo '<img src=\"'. $album[1] . '\" id=\"' . $album[2] . '\"/>';\n\t\t\t\t\techo '</div>';\n\t\t\t\t\techo '</div>';\n\t\t\t\t}//end foreach*/\n\t\t\t}// end if\n\t\t\telse{\n\t\t\t\techo createLoginURL();\n\t\t\t}\n\t\t}//end else\n\t}// end if\n\t\n}", "title": "" }, { "docid": "edc42296dbfb4a51b5026926cbd0b173", "score": "0.59312093", "text": "public function getAlbums()\n {\n $sql=\"SELECT * FROM album where genre= \". $this->getId();\n $resultat=MonPdo::getInstance()->query($sql);\n $lesAlbums=$resultat->fetchAll(PDO::FETCH_CLASS|PDO::FETCH_PROPS_LATE,'Album');\n return $lesAlbums;\n }", "title": "" }, { "docid": "49049b6817b4776e3095c88eb68be5bb", "score": "0.589694", "text": "public function photos(PaginateRequest $request, $album)\n {\n return $this->paginatealbe($request, $album->photos());\n }", "title": "" }, { "docid": "cbda1aaab61b68f7239e77f5f04ea8a1", "score": "0.58842194", "text": "function loadForPeople($people) {\n $rel = $this->getRelation('_person');\n return $rel->loadSrc($people); \n }", "title": "" }, { "docid": "ca9dc540a0039e0fe07629c07f333f5b", "score": "0.58831686", "text": "public function fetchPhotoIdsByAlbumId($albumId);", "title": "" }, { "docid": "ac4bedef96133c7ba8156d526225fbdc", "score": "0.58771044", "text": "public function getPhotos()\n\t{\n\t\t// determine the total number of records\n\t\t$totalSql = 'SELECT COUNT(*) FROM `photos` WHERE `user` = :user';\n\t\t$params = array(':user' => $_SESSION['id']);\n\n\t\tif (!$this->pagination->totalRecords($totalSql, $params)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// set limit for pagination\n\t\t$this->pagination->setLimit($this->limit);\n\t\t\n\t\t// offset for progressive selection based on pageno\n\t\t$offset = ($this->pagination->page() - 1) * $this->limit;\n\n\t\t// get photos of user\n\t\t$sql = \"SELECT `title`, `filename` FROM `photos` WHERE `user` = :user LIMIT $offset, $this->limit\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute(array(':user' => $_SESSION['id']));\n\n\t\t// array of photos to be returned\n\t\treturn array(\n\t\t\t\t\t$this->pagination->firstBack(),\n\t\t\t\t\t$this->pagination->nextLast(),\n\t\t\t\t\t$this->pagination->where(),\n\t\t\t\t\t$stmt->fetchAll(PDO::FETCH_ASSOC)\n\t\t\t\t\t);\n\t}", "title": "" }, { "docid": "4cfe86410241af0c63a2ade84c0976bc", "score": "0.58646834", "text": "public function getUserPictures()\n {\n session_start();\n $this->_userManager = new UserManager();\n $id = $this->_userManager->getUserId($_SESSION['user']);\n $this->_query = 'SELECT `id`, `source` FROM `photo` WHERE `user_id` = :id ORDER BY `id` DESC';\n $req = $this->getDb()->prepare($this->_query);\n $req->bindParam(':id', $id, PDO::PARAM_INT);\n $req->execute();\n $pictures = [];\n while ($data = $req->fetch(PDO::FETCH_ASSOC))\n $pictures[] = $data; \n $req->closeCursor();\n return $pictures;\n }", "title": "" }, { "docid": "88ad6eae1420b3be847031a79abfda3e", "score": "0.586385", "text": "function albums()\n{\t\t\n\ttry\n\t{\n\t\t$album_data = $this->facebook->api('/me/albums');\n\t} \n\tcatch(FacebookApiException $e)\n\t{\n\t\t$album_data = \"\";\n\t}\n\t\n\t$data['albums'] = array();\n\t\n\tif( is_array($album_data) && !empty($album_data['data']) ){\n\t\tforeach($album_data['data'] as $album){\n\t\t\t$temp = array('aid'=>$album['id'],'name'=>$album['name']);\n\t\t\tarray_push($data['albums'],$temp);\n\t\t}\n\t}\n\t\n\t$album_viewer = $this->load->view(\"modals/photo_album\",$data,TRUE);\n\techo $album_viewer;\n}", "title": "" }, { "docid": "556b8eeb4d8b88c8c160416e1effbf7c", "score": "0.5838074", "text": "public function GetPhotos($liveonly = true)\n\t{\t$this->photos = array();\n\t\t$where = array('gid = ' . (int)$this->id);\n\t\tif ($liveonly)\n\t\t{\t$where[] = 'live=1';\n\t\t}\n\t\t$sql = 'SELECT * FROM galleryphotos WHERE ' . implode(' AND ', $where) . ' ORDER BY displayorder ASC';\n\t\t\n\t\tif ($result = $this->db->Query($sql))\n\t\t{\twhile ($row = $this->db->FetchArray($result))\n\t\t\t{\t$this->photos[$row['id']] = $row;\t\n\t\t\t}\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "797e614602110ea55db32e309994386d", "score": "0.5822396", "text": "public function getPhotos(){\n $userId = SANTA_ID;\n $albumId = SANTA_ALBUM_ID;\n $photosJSON = Application_Model_VK::makeVKRequest(\"photos.get\",array('uid'=>$userId, 'aid'=>$albumId, 'format'=>'json'));\n return json_decode($photosJSON);\n }", "title": "" }, { "docid": "5a690222f76bf468d2415909b20ff810", "score": "0.58182454", "text": "function loadForPeople($people) {\n $rel = $this->getRelation('_people');\n return $rel->loadSrc($people); \n }", "title": "" }, { "docid": "c69b9df88971fe290f2581237b17d6b5", "score": "0.5815989", "text": "public function showPhotosbyAlbumAction()\n\t{\n\t\tif(isset($this->data['showThePhotos']))\n\t\t{\n\t\t\t\t\t// Le titre de la page d'accueil\n\t\t\t$titre = \"Photographies\";\n\t\t\t//Le header commun\n\t\t\t$header = $this->getHeader();\n\t\t\t$model = new albumModel();\n\t\t\t$mesPhotosByAlbum = $model->getPhotosByAlbum($this->parameters['$idAlbum']);\n\t\t\t//Le contenu de la vue\n\t\t\tob_start();\n\t\t\trequire(VIEWS.'Photos/photosByAlbumView.php');\n\t\t\t$contenu = ob_get_clean();\n\t\t\t//Le footer commun\n\t\t\t$footer = $this->getFooter();\n\t\t\trequire(COMMON);\n\t\t}\n\t}", "title": "" }, { "docid": "695c138619ef0e8af079c87abb2401a0", "score": "0.5808081", "text": "public function getProfilePhotosJoinPhoto($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)\n\t{\n\t\tif ($criteria === null) {\n\t\t\t$criteria = new Criteria(sfGuardUserPeer::DATABASE_NAME);\n\t\t}\n\t\telseif ($criteria instanceof Criteria)\n\t\t{\n\t\t\t$criteria = clone $criteria;\n\t\t}\n\n\t\tif ($this->collProfilePhotos === null) {\n\t\t\tif ($this->isNew()) {\n\t\t\t\t$this->collProfilePhotos = array();\n\t\t\t} else {\n\n\t\t\t\t$criteria->add(ProfilePhotoPeer::USER_ID, $this->id);\n\n\t\t\t\t$this->collProfilePhotos = ProfilePhotoPeer::doSelectJoinPhoto($criteria, $con, $join_behavior);\n\t\t\t}\n\t\t} else {\n\t\t\t// the following code is to determine if a new query is\n\t\t\t// called for. If the criteria is the same as the last\n\t\t\t// one, just return the collection.\n\n\t\t\t$criteria->add(ProfilePhotoPeer::USER_ID, $this->id);\n\n\t\t\tif (!isset($this->lastProfilePhotoCriteria) || !$this->lastProfilePhotoCriteria->equals($criteria)) {\n\t\t\t\t$this->collProfilePhotos = ProfilePhotoPeer::doSelectJoinPhoto($criteria, $con, $join_behavior);\n\t\t\t}\n\t\t}\n\t\t$this->lastProfilePhotoCriteria = $criteria;\n\n\t\treturn $this->collProfilePhotos;\n\t}", "title": "" }, { "docid": "ccdcea0f9e566f51a4d860555abdfef2", "score": "0.5789703", "text": "public function initProfilePhotos()\n\t{\n\t\t$this->collProfilePhotos = array();\n\t}", "title": "" }, { "docid": "41342e3efd1b7c6ff8807f89d97080de", "score": "0.57854974", "text": "public function get_images_by_album($album_id) {\n $this->db->where('album_id', $album_id);\n $this->db->select(array('image_name'));\n $images = $this->db->get('galleries');\n return $images->result();\n }", "title": "" }, { "docid": "52c151bcfe9b84f8c2f7d1393352c91b", "score": "0.57849836", "text": "function photo()\r\n\t{\r\n\t\t$mainframe\t=& JFactory::getApplication();\r\n\t\t$document\t=& JFactory::getDocument();\r\n\r\n\t\t// Load window library\r\n\t\tCFactory::load( 'libraries' , 'window' );\t\t\r\n\t\tCWindow::load();\r\n\t\t\r\n\t\t// Get the configuration object.\r\n\t\t$config\t=& CFactory::getConfig();\r\n\r\n\t\t$css\t= JURI::root() . 'components/com_community/assets/album.css';\r\n\t\t$document->addStyleSheet($css);\r\n\t\t$css\t= JURI::root() . 'components/com_community/assets/photos.css';\r\n\t\t$document->addStyleSheet($css);\r\n\t\t\r\n\t\t$js = '/assets/gallery';\r\n\t\t$js\t.= ( $config->getBool('usepackedjavascript') ) ? '.pack.js' : '.js';\r\n\t\tCAssets::attach($js, 'js');\r\n\r\n \t\t$albumId\t= JRequest::getVar('albumid' , '' , 'GET');\r\n\r\n \t\tif( empty( $albumId ) )\r\n \t\t{\r\n \t\t\techo JText::_('CC NO PROPER ALBUM ID');\r\n \t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tCFactory::load( 'models' , 'photos' );\r\n\t\t// Load the album table\r\n\t\t$album\t\t=& JTable::getInstance( 'Album' , 'CTable' );\r\n\t\t$album->load( $albumId );\r\n\t\t\r\n\t\tif($album->type == PHOTOS_GROUP_TYPE)\r\n\t\t{\r\n\t\t\t$this->_groupPhoto();\r\n\t\t}\r\n\t\telse\r\n\t\t{\t\t\t\r\n\t\t\t$this->_userPhoto();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "cacae70b51dac079e4ee6541f3817dfc", "score": "0.57297635", "text": "public function getProfileStripPhotos($params) {\n\n $parentTable = Engine_Api::_()->getItemTable('album');\n $parentTableName = $parentTable->info('name');\n\n $photoTableName = $this->info('name');\n\n $select = $this->select()\n ->from($photoTableName, array('album_id', 'photo_id', 'file_id', 'title'))\n ->where($photoTableName . '.owner_id = ?', $params['owner_id'])\n ->where($photoTableName . '.photo_hide = ?', 0)\n ->where('search = ?', true);\n if (!Engine_Api::_()->sitealbum()->isLessThan417AlbumModule()) {\n $select->joinLeft($parentTableName, $parentTableName . '.album_id=' . $photoTableName . '.album_id', null);\n } else {\n $select->joinLeft($parentTableName, $parentTableName . '.album_id=' . $photoTableName . '.collection_id', null);\n }\n\n if (!empty($params['category_id'])) {\n $select->where($parentTableName . '.category_id = ?', $params['category_id']);\n }\n if (!empty($params['subcategory_id'])) {\n $select->where($parentTableName . '.subcategory_id = ?', $params['subcategory_id']);\n }\n\n if (isset($params['orderby']) && !empty($params['orderby'])) {\n switch ($params['orderby']) {\n case \"creation_date\":\n $select->order($photoTableName . '.creation_date DESC');\n break;\n case \"modified_date\":\n $select->order($photoTableName . '.modified_date DESC');\n break;\n case \"view_count\":\n $select->order($photoTableName . '.view_count DESC');\n break;\n case \"comment_count\":\n $select->order($photoTableName . '.comment_count DESC');\n break;\n case 'like_count':\n case 'likesphotos':\n $select->order($photoTableName . '.like_count DESC');\n break;\n case 'rating':\n $select->order($photoTableName . '.rating DESC');\n break;\n default:\n $select->order($photoTableName . '.modified_date DESC');\n break;\n }\n }\n\n if (isset($params['orderby']) && !empty($params['orderby']) && $params['orderby'] != 'creation_date' && $params['orderby'] != 'modified_date' && $params['orderby'] != 'random') {\n $select->order($photoTableName . \".photo_id DESC\");\n }\n\n if (isset($params['featured']) && !empty($params['featured'])) {\n $select->where($photoTableName . '.featured = ?', 1);\n }\n\n $select->group(\"$photoTableName.photo_id\");\n\n if (!Engine_Api::_()->getApi('settings', 'core')->getSetting('sitealbum.photo.specialalbum', 1))\n $select->where($parentTableName . '.type IS NULL');\n $select->limit($params['itemCountPerPage']);\n\n //$select = Engine_Api::_()->sitealbum()->addPrivacyAlbumsSQl($select, $photoTableName);\n $select = Engine_Api::_()->getDbTable('albums', 'sitealbum')->getNetworkBaseSql($select, array('browse_network' => (isset($params['view_view']) && $params['view_view'] == \"3\")));\n\n return Zend_Paginator::factory($select);\n }", "title": "" }, { "docid": "7daf9c71b3a9569fba8e1c1fbc8098fb", "score": "0.571855", "text": "public function api_get_gallery($album_id) {\n $this->db->where('album_id', $album_id);\n $this->db->where('image_status', 1);\n $this->db->select(array('id', 'image_name'));\n $images = $this->db->get('galleries');\n return $images->result();\n }", "title": "" }, { "docid": "3a439256bc48ac36cd62e526e07d0359", "score": "0.57164323", "text": "function getGalleryPicturesFrom($residentID) {\r\n $query = $this->db->query(\r\n \"SELECT *\"\r\n . \" FROM a16_webapps_3.gallery_pictures\"\r\n . \" WHERE resident_id='$residentID'\"\r\n );\r\n return $query->result();\r\n }", "title": "" }, { "docid": "398866dddd7e1d2b9aaa377f3f536f7e", "score": "0.5713305", "text": "function read_albumimages($dir) {\n $path = opendir($dir);\n while (false !== ($file = readdir($path))) {\n if(($file !== \".\") and ($file !== \"..\")) {\n if(is_file($dir.\"/\".$file))\n $files[]=$file;\n else\n $dirs[]=$file; \n }\n }\n\n if($files) {\n\tnatcasesort($files);\n\n foreach ($files as $file) {\n //Check if the files are JPG\n list($fdirname, $ext) = explode(\".\", $file);\n\tif (($ext == \"jpg\") || ($ext == \"JPG\")) {\n $album = $_GET['album'];\n include (\"data/albums/$album/$fdirname.php\");\n\n\t\t\t\techo \"<div class=\\\"album\\\" style=\\\"margin: 15px;\\\">\n\t\t\t\t\t\t\t<table>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t<a href=\\\"data/inc/albums_getimage.php?image=$album/$fdirname.jpg\\\" rel=\\\"lightbox[album]\\\"><img src=\\\"data/inc/albums_getimage.php?image=$album/thumb/$fdirname.jpg\\\" alt=\\\"$name\\\" style=\\\"border: 0px;\\\" /></a>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t<span style=\\\"font-size: 17pt;\\\">$name</span><br />\n\t\t\t\t\t\t\t\t\t<i>$info</i>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t</div>\";\n }\n }\n }\n closedir($path);\n}", "title": "" }, { "docid": "41d8cd8eeddf286f38a93801e3afab85", "score": "0.5699242", "text": "public function getPhotos() {\n return $this->findDependentRowset('My_Model_Table_Photo');\n }", "title": "" }, { "docid": "f3877181c27c21b6411da478a3677bf0", "score": "0.5693675", "text": "public static function SyncPhotos( Album $album ) {\n self::CreateDirs( $album );\n\n $sph = SiteParamHelper::GetInstance();\n $photos = PhotoFactory::Get( [ 'albumId' => $album->albumId ], [ BaseFactory::WithoutPages => true, BaseFactory::WithColumns => '\"photoId\",\"filename\", \"originalName\", \"statusId\"' ] );\n $fileDir = DirectoryInfo::GetInstance( self::GetRealPath( $album, self::Source ) );\n $cPhotos = ArrayHelper::Collapse( $photos, 'originalName', false );\n $maxId = self::GetMaxPhoto( $cPhotos );\n $changed = false;\n\n\n foreach ( $fileDir->GetFiles() as $f ) {\n $maxId++;\n\n $name = $f['filename'];\n if ( mb_strpos( mb_strtolower( $name ), 'sync' ) !== false ) {\n continue;\n }\n\n if ( !empty( $cPhotos[$name] ) ) {\n Logger::Debug( '%s already in db', $f['filename'] );\n continue;\n }\n\n if ( !exif_imagetype( $f['path'] ) ) {\n Logger::Warning( '%s is not an image', $f['filename'] );\n continue;\n }\n\n $now = DateTimeWrapper::Now();\n $p = new Photo();\n $p->exif = exif_read_data( $f['path'], null, true );\n $p->albumId = $album->albumId;\n $p->album = $album;\n $p->createdAt = $now;\n $p->isFavorite = false;\n $p->filename = sprintf( '%04d.jpg', $maxId );\n $p->fileSize = filesize( $f['path'] );\n $p->originalName = $f['filename'];\n\n $photoDate = $p->exif && !empty( $p->exif['EXIF'] ) ? ArrayHelper::GetValue( $p->exif['EXIF'], 'DateTimeOriginal', null ) : null;\n if ( $photoDate ) {\n $p->photoDate = $photoDate ? DateTime::createFromFormat( 'Y:m:d G:i:s', $photoDate ) : null;\n $p->statusId = StatusUtility::Enabled;\n }\n\n $hdPath = self::GetRealPath( $album, self::HD ) . $p->filename;\n if ( !ImageHelper::Resize( $f['path'], $hdPath, $sph->GetBigImageSize(), $sph->GetBigImageSize(), $sph->GetBigImageQuality(), true ) ) {\n Logger::Warning( 'Failed to create hd image %s', $hdPath );\n continue;\n }\n\n $p->fileSizeHd = filesize( $hdPath );\n\n $thumbPath = self::GetRealPath( $album, self::Thumbs ) . $p->filename;\n if ( !ImageHelper::Resize( $hdPath, $thumbPath, PhotoUtility::$ThumbSize[0], PhotoUtility::$ThumbSize[1], $sph->GetSmallImageQuality(), false ) ) {\n Logger::Warning( 'Failed to create thumb image %s', $thumbPath );\n break;\n }\n\n if ( !$p->exif ) {\n $p->exif = [ ];\n }\n\n if ( !PhotoFactory::Add( $p ) ) {\n Logger::Error( 'Failed to add photo to database', $p->filename );\n } else {\n Logger::Debug( 'Successfully added photo %s', $p->filename );\n $changed = true;\n }\n }\n\n if ( $changed ) {\n $album->modifiedAt = DateTimeWrapper::Now();\n self::FillMetaInfo( $album );\n\n if ( !AlbumFactory::Update( $album ) ) {\n Logger::Error( 'Failed to update Album metainfo' );\n }\n }\n }", "title": "" }, { "docid": "e4cd10e947ea77698d47b5b4fb56e3a4", "score": "0.5681996", "text": "public function getTaggedYouAndOwnerPhotos($viewer_id, $owner_id, $limit = null) {\n\n $tableTagmaps = Engine_Api::_()->getDbtable('tagMaps', 'core');\n $tableTagmapsName = $tableTagmaps->info('name');\n\n $nestedSelect = $tableTagmaps->select()\n ->from($tableTagmapsName, array('resource_id'))\n ->where($tableTagmapsName . '.resource_type = ?', \"album_photo\")\n ->where($tableTagmapsName . '.tag_type = ?', \"user\")\n ->where($tableTagmapsName . '.tag_id = ?', $viewer_id);\n $viewerTagged = $tableTagmaps->fetchAll($nestedSelect);\n $resource_id = array();\n foreach ($viewerTagged as $value)\n $resource_id[] = $value->resource_id;\n // Not any tagged photo\n if (empty($resource_id))\n return;\n\n $parentTable = Engine_Api::_()->getItemTable('album');\n $parentTableName = $parentTable->info('name');\n\n $photoTableName = $this->info('name');\n\n $select = $tableTagmaps->select()\n ->from($tableTagmapsName, array('resource_id'))\n ->join($photoTableName, $tableTagmapsName . '.resource_id=' . $photoTableName . '.photo_id', array());\n if (!Engine_Api::_()->sitealbum()->isLessThan417AlbumModule()) {\n $select->join($parentTableName, $parentTableName . '.album_id=' . $photoTableName . '.album_id', array());\n } else {\n $select->join($parentTableName, $parentTableName . '.album_id=' . $photoTableName . '.collection_id', array());\n }\n\n $select->where($tableTagmapsName . '.resource_type = ?', \"album_photo\")\n ->where($tableTagmapsName . '.resource_id in (?)', new Zend_Db_Expr(\"'\" . join(\"', '\", $resource_id) . \"'\"))\n ->where($tableTagmapsName . '.tag_id = ?', $owner_id)\n ->where('search = ?', true);\n\n //$select = Engine_Api::_()->sitealbum()->addPrivacyAlbumsSQl($select, $photoTableName);\n $select = Engine_Api::_()->getDbTable('albums', 'sitealbum')->getNetworkBaseSql($select);\n\n if (!empty($limit)) {\n $select->limit($limit);\n $select->order('RAND()');\n }\n\n return Zend_Paginator::factory($select);\n }", "title": "" }, { "docid": "0baa54f9286a74af0b5b8af50ebfcc94", "score": "0.566894", "text": "function getPhotos( $id , $limit = null , $limitstart = null )\r\n\t{\r\n\t\t$db\t\t=& $this->getDBO();\r\n\t\t\r\n\t\t// Get limit\r\n\t\t$limit\t\t= ( is_null( $limit ) ) ? $this->getState('limit') : $limit;\r\n\t\t$limitstart\t= ( is_null( $limitstart ) ) ? $this->getState( 'limitstart' ) : $limitstart;\r\n\r\n\t\t// Get total photos from specific album\r\n\t\t$query\t\t= 'SELECT COUNT(*) FROM ' . $db->nameQuote( '#__community_photos') . ' '\r\n\t\t\t\t\t. 'WHERE ' . $db->nameQuote( 'albumid' ) . '=' . $db->Quote( $id );\r\n\t\t\r\n\t\t$db->setQuery( $query );\r\n\t\t$total\t\t= $db->loadResult();\r\n\t\t\r\n\t\tif($db->getErrorNum())\r\n\t\t{\r\n\t\t\tJError::raiseError( 500, $db->stderr());\r\n\t\t}\r\n\r\n\t\t// Appy pagination\r\n\t\tif( empty($this->_pagination) )\r\n\t\t{\r\n\t \t jimport('joomla.html.pagination');\r\n\t \t $this->_pagination = new JPagination($total, $limitstart, $limit);\r\n\t \t}\r\n\t \t//var_dump($limitstart);\r\n\t\t// Get all photos from specific albumid\r\n\t\t$query\t\t= 'SELECT * FROM ' . $db->nameQuote( '#__community_photos') . ' '\r\n\t\t\t\t\t. 'WHERE ' . $db->nameQuote( 'albumid' ) . '=' . $db->Quote( $id ) . ' '\r\n\t\t\t\t\t. ' ORDER BY `created` DESC '\r\n\t\t\t\t\t. 'LIMIT ' . $limitstart . ',' . $limit;\r\n\r\n\t\t$db->setQuery( $query );\r\n\t\t$result\t= $db->loadObjectList();\r\n\r\n\t\tif($db->getErrorNum())\r\n\t\t{\r\n\t\t\tJError::raiseError( 500, $db->stderr());\r\n\t\t}\r\n\t\t\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "6d52e65027e8b8220a9c9bd356c038d4", "score": "0.56427616", "text": "public function fotos_facebook(){\n\t$local = $this->uri->segment(3);\n\t$query = $this->wdb->get_oauth($this->session->userdata('us_codigo'))->result_array();\n\t$saida = '';\n\t\n\t$album = $this->getpage('https://graph.facebook.com/'.$query[0]['oa_facebook_usuario'].'/albums?access_token='.$query[0]['oa_facebook_access_token']);\n\t\n\t$pg = json_decode($album)->data;\n\t\n\tforeach($pg as $al){\n\t $photo = $this->getpage('https://graph.facebook.com/'.$al->id.'/photos?access_token='.$query[0]['oa_facebook_access_token']);\n\t $dec = json_decode($photo)->data;\n\t \n\t foreach($dec as $ph){\n\t\t$src = $ph->images[0];\n\t\t$low = $ph->images[4];\n\t\t$saida .= $this->photo_face($src->source,$low->source,$src->height,$src->width,$local);\n\t }\n\t}\n\techo $saida;\n }", "title": "" }, { "docid": "0ce3d2d707d8e48ba3c6180656b451e3", "score": "0.56033224", "text": "public function photos(Album $album, $photos_sql, bool $full_photo, string $license = 'none')\n\t{\n\t\t[$sortingCol, $sortingOrder] = $this->get_sort($album);\n\n\t\t$previousPhotoID = '';\n\t\t$return_photos = [];\n\t\t$photo_counter = 0;\n\t\t/**\n\t\t * @var Collection[Photo]\n\t\t */\n\t\t$photos = $this->customSort($photos_sql, $sortingCol, $sortingOrder);\n\n\t\tif ($sortingCol === 'title' || $sortingCol === 'description') {\n\t\t\t// The result is supposed to be sorted by the user-specified\n\t\t\t// column as the primary key and by 'id' as the secondary key.\n\t\t\t// Unfortunately, sortBy can't be chained the way orderBy can.\n\t\t\t// Instead, we use array_multisort which can be used in a\n\t\t\t// stable fashion, preserving the ordering of elements that\n\t\t\t// compare equal. We depend here on the collection already\n\t\t\t// being sorted by 'id', via the SQL query.\n\n\t\t\t// Convert to array so that we can use standard PHP functions.\n\t\t\t// TODO: use collections.\n\t\t\t// * see if this works\n\t\t\t// $photos = $photos\n\t\t\t// \t->sortBy($sortingCol, SORT_NATURAL | SORT_FLAG_CASE, $sortingOrder === 'ASC' ? SORT_ASC : SORT_DESC)\n\t\t\t// \t->sortBy('id', SORT_ASC);\n\t\t\t$photos = $photos->all();\n\t\t\t// Primary sorting key.\n\t\t\t$values = array_column($photos, $sortingCol);\n\t\t\t// Secondary sorting key -- just preserves current order.\n\t\t\t$keys = array_keys($photos);\n\t\t\tarray_multisort($values, $sortingOrder === 'ASC' ? SORT_ASC : SORT_DESC, SORT_NATURAL | SORT_FLAG_CASE, $keys, SORT_ASC, $photos);\n\t\t}\n\n\t\tforeach ($photos as $photo_model) {\n\t\t\t// Turn data from the database into a front-end friendly format\n\t\t\t$photo = PhotoCast::toArray($photo_model);\n\t\t\tPhotoCast::urls($photo, $photo_model);\n\t\t\tPhotoCast::print_license($photo, $license);\n\n\t\t\t$this->symLinkFunctions->getUrl($photo_model, $photo);\n\t\t\tif (!$this->sessionFunctions->is_current_user($photo_model->owner_id) && !$full_photo) {\n\t\t\t\t$photo_model->downgrade($photo);\n\t\t\t}\n\n\t\t\t// Set previous and next photoID for navigation purposes\n\t\t\t$photo['previousPhoto'] = $previousPhotoID;\n\t\t\t$photo['nextPhoto'] = '';\n\n\t\t\t// Set current photoID as nextPhoto of previous photo\n\t\t\tif ($previousPhotoID !== '') {\n\t\t\t\t$return_photos[$photo_counter - 1]['nextPhoto'] = $photo['id'];\n\t\t\t}\n\t\t\t$previousPhotoID = $photo['id'];\n\n\t\t\t// Add to return\n\t\t\t$return_photos[$photo_counter] = $photo;\n\n\t\t\t$photo_counter++;\n\t\t}\n\n\t\tAlbumCast::wrapAroundPhotos($return_photos);\n\n\t\treturn $return_photos;\n\t}", "title": "" }, { "docid": "293a089497e4ae97c48b646c6c48dcda", "score": "0.55730367", "text": "public function getPhotos($id, $userId, $albumId)\n\t{\n\t\t//$page = $this->_cache->get('model.entity.page.factory.getpage.' . $id);\n\n\t\tif (true === empty($page)) {\n\t\t\t// get from db\n\t\t\t$page = array_map(function($p) {\n\t\t\t\t$rt = Model_Entity_Photo_Factory::create();\n\t\t\t\tforeach ($p as $key => $value) {\n\t\t\t\t\t$rt->$key = $value;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $rt;\n\t\t\t}, $this->_gateway->getPhotos($id, $userId, $albumId));\n\n\t\t\t$this->_cache->set('model.entity.page.factory.getpage.' . $id, $page, DATE::WEEK);\n\t\t}\n\t\treturn $page;\n\t}", "title": "" }, { "docid": "15e459e29a750b1bd959b99635bd48c0", "score": "0.556696", "text": "function getAllPhotos() {\n $photos1 = getPublicPhotos();\n if (!empty($_SESSION['username'])) {\n $photos2 = getPrivatePhotos();\n $photos = array_merge($photos1, $photos2);\n }\n else\n $photos = $photos1;\n return $photos;\n}", "title": "" }, { "docid": "0a713865051b0578f25bc744623f254d", "score": "0.5565637", "text": "public function album_image_get($details=array())\r\n\t{\r\n\t\t$details = $this->get();\r\n\t\t$response = $this->album_image_api->_get_album_image($details);\r\n\t\t$this->response($response, REST_Controller::HTTP_OK);\r\n\t}", "title": "" }, { "docid": "a0c050be4f2b84e2ae9268c27e8afad5", "score": "0.5559534", "text": "public function getImagesOfAlbum($id)\n {\n $sql = \"SELECT * FROM images WHERE id IN (SELECT imageId FROM albumdetail WHERE albumId = $id)\";\n $query = $this->db->prepare($sql);\n if (!$query) {\n return 0;\n } else {\n $query->execute();\n return $query->fetchAll(PDO::FETCH_OBJ);\n }\n\n }", "title": "" }, { "docid": "624e1a434e92a0f70bef6eca9de5447c", "score": "0.5558835", "text": "protected function getPhotos()\n {\n if($this->photos instanceof PhotoCollection)\n {\n return $this->photos;\n }\n $photos = $this->api->getFromGraph(\"/{$this->id}/photos\");\n $this->photos = new PhotoCollection($photos);\n return $this->photos;\n }", "title": "" }, { "docid": "49df43a8fb7c79c20871221f7b18be3f", "score": "0.5547839", "text": "function getAlbums( $userId = '' , $pagination = false, $doubleLimit = false )\r\n\t{\r\n\t\treturn $this->_getAlbums( $userId , PHOTOS_USER_TYPE , $pagination , $doubleLimit );\r\n\t}", "title": "" }, { "docid": "ece2ad1956855dad0a4b3574df2d2d1e", "score": "0.5539981", "text": "public function get_photos()\r\n {\r\n $query = $this->db->query('SELECT * FROM photos');\r\n return $query->result_array(); \r\n }", "title": "" }, { "docid": "43829209bc1b2887bb5105ab429f1f55", "score": "0.55328125", "text": "abstract protected function fetchPhoto($id);", "title": "" }, { "docid": "0b72f6c75774eff3fea1fb9bf80140ca", "score": "0.5524907", "text": "public function getPhotos() {\n\t\t$photos = array();\n\t\tforeach ($this->feed->photos->photo as $photo) {\n\t\t\t$photos[] = $this->api->getPhotoById((string) $photo['id']);\n\t\t}\n\t\t\n\t\treturn $photos;\n\t}", "title": "" }, { "docid": "57af95a03aaf0919c47953913b94f53a", "score": "0.5519158", "text": "public function getPhotos()\n {\n return $this->photos;\n }", "title": "" }, { "docid": "f731461893898d83f925bef49f9ec7ea", "score": "0.5476638", "text": "function get_albums()\n {\n $retval = array();\n if ($source = $this->object->get_source()) {\n if (in_array('album', $source->returns)) {\n $mapper = C_Album_Mapper::get_instance();\n $album_key = $mapper->get_primary_key_column();\n if ($this->object->container_ids) {\n $mapper->select()->where(array(\"{$album_key} IN %s\", $this->object->container_ids));\n }\n $retval = $mapper->run_query();\n }\n }\n return $retval;\n }", "title": "" }, { "docid": "30c9d0c2089472d635f4901de35cb596", "score": "0.54738253", "text": "public function importAlbums()\n {\n var_dump( $this->fixturesPath);exit;\n $albums = $this->deserializeAlbums(\n $this->readAlbumsJSON()\n );\n\n foreach ($albums as $album) {\n $this->importAlbum($album);\n }\n }", "title": "" }, { "docid": "b4687b5704bb111962a8f39b028380e5", "score": "0.5445498", "text": "public function getAllPhotosFacebook($fb)\n {\n try {\n $photos_request = $fb->get('/me/photos?limit=100&type=uploaded');\n $photos = $photos_request->getGraphEdge();\n } catch (Facebook\\Exceptions\\FacebookResponseException $e) {\n // When Graph returns an error\n echo 'Graph returned an error: ' . $e->getMessage();\n exit;\n } catch (Facebook\\Exceptions\\FacebookSDKException $e) {\n // When validation fails or other local issues\n echo 'Facebook SDK returned an error: ' . $e->getMessage();\n exit;\n }\n\n $all_photos = array();\n if ($fb->next($photos)) {\n $photos_array = $photos->asArray();\n $all_photos = array_merge($photos_array, $all_photos);\n while ($photos = $fb->next($photos)) {\n $photos_array = $photos->asArray();\n $all_photos = array_merge($photos_array, $all_photos);\n }\n } else {\n $photos_array = $photos->asArray();\n $all_photos = array_merge($photos_array, $all_photos);\n }\n $all_photo = array();\n foreach ($all_photos as $key) {\n $photo_request = $fb->get('/' . $key['id'] . '?fields=images');\n $photo = $photo_request->getGraphNode()->asArray();\n $all_photo[] = $photo;\n echo '<img src=\"' . $photo['images'][2]['source'] . '\"><br>';\n }\n\n return $all_photo;\n\n }", "title": "" }, { "docid": "757b2760e4a3aa5719140ab25e09a3c5", "score": "0.5430968", "text": "function getPhotoUrls()\n{\n //to search in for the trained $uids\n include('images.php');\n return $images;\n \n}", "title": "" }, { "docid": "8a65b2c8ddf796b36ad31c26d3d2ee91", "score": "0.5429251", "text": "public function getProjectPhotos()\n {\n $input = Request::onlyLegacy('project_id', 'per_page', 'page');\n\n $validator = Validator::make($input, ['project_id' => 'required']);\n\n if ($validator->fails()) {\n return ApiResponse::validation($validator);\n }\n\n try {\n $photos = $this->companyCamService->getProjectPhotos($input['project_id'], $input);\n\n return ApiResponse::success([\n\n 'data' => $photos,\n ]);\n } catch (AuthorizationException $e) {\n return ApiResponse::errorGeneral($e->getMessage());\n } catch (PaymentRequredException $e) {\n return ApiResponse::errorGeneral($e->getMessage());\n } catch (InternalServerErrorException $e) {\n return ApiResponse::errorGeneral($e->getMessage());\n } catch(TimeoutException $e) {\n return ApiResponse::errorGeneral($e->getMessage());\n } catch (\\Exception $e) {\n return ApiResponse::errorInternal(trans('response.error.something_wrong'), $e);\n }\n }", "title": "" }, { "docid": "6284b6865bba998a215ea7522872afa1", "score": "0.5412617", "text": "public function getFriendsPhotos($friend_ids, $params) {\n\n $parentTable = Engine_Api::_()->getItemTable('album');\n $parentTableName = $parentTable->info('name');\n\n $photoTableName = $this->info('name');\n\n $select = $this->select()\n ->setIntegrityCheck(false)\n ->from($photoTableName, array('album_id', 'photo_id', 'file_id', 'title', 'owner_id', 'like_count', 'view_count', 'comment_count', 'rating', 'location', 'seao_locationid', 'creation_date'));\n if (!Engine_Api::_()->sitealbum()->isLessThan417AlbumModule()) {\n $select->joinLeft($parentTableName, $parentTableName . '.album_id=' . $photoTableName . '.album_id', null);\n } else {\n $select->joinLeft($parentTableName, $parentTableName . '.album_id=' . $photoTableName . '.collection_id', null);\n }\n\n $select\n ->where($parentTableName . '.search = ?', true)\n ->where($parentTableName . '.owner_id in (?)', new Zend_Db_Expr(\"'\" . join(\"', '\", $friend_ids) . \"'\"))\n ->limit($params['itemCountPhoto'])\n ->order('Rand()');\n\n if (!empty($params['category_id'])) {\n $select->where($parentTableName . '.category_id = ?', $params['category_id']);\n }\n if (!empty($params['subcategory_id'])) {\n $select->where($parentTableName . '.subcategory_id = ?', $params['subcategory_id']);\n }\n\n if (isset($params['featured']) && !empty($params['featured'])) {\n $select->where($photoTableName . '.featured = ?', 1);\n }\n\n $select->group(\"$photoTableName.photo_id\");\n\n if (!Engine_Api::_()->getApi('settings', 'core')->getSetting('sitealbum.photo.specialalbum', 1))\n $select->where($parentTableName . '.type IS NULL');\n //$select = Engine_Api::_()->sitealbum()->addPrivacyAlbumsSQl($select, $photoTableName);\n $select = Engine_Api::_()->getDbTable('albums', 'sitealbum')->getNetworkBaseSql($select, array('browse_network' => (isset($params['view_view']) && $params['view_view'] == \"3\")));\n return $this->fetchAll($select);\n }", "title": "" }, { "docid": "e1ecf2a7b62780ef0e31e967f944ed69", "score": "0.5409407", "text": "function getPhotos($hotel_id) {\n global $connection;\n\n $sql = \"SELECT * FROM Photos WHERE hotel_id = $hotel_id AND type != 'Title'\";\n $result = $connection->query($sql);\n\n $photos = array();\n\n if ($result->num_rows > 0) {\n while ($row = $result->fetch_assoc()) {\n array_push($photos, $row[\"path\"]);\n }\n }\n\n return $photos;\n }", "title": "" }, { "docid": "ddc84b72ec05538b22cfcc954de3da48", "score": "0.54091966", "text": "public function photos($photos)\n {\n return $this->setProperty('photos', $photos);\n }", "title": "" }, { "docid": "a6e28f4e4b501935dcb7529987957e75", "score": "0.5409172", "text": "public function lastUploadedPhotos(Request $request, $album) {\n\t\t$photosIds = $request->session()->pull('lastPhotosSaved-album-'.$album->id, []);\n\t\treturn $photos = count($photosIds) ? AlbumPhoto::whereIn('id', $photosIds)->get() : [];\n\t}", "title": "" }, { "docid": "9d9a342a550b548cd4a3625809a0ce6c", "score": "0.5395682", "text": "protected function _getPhotosList()\r\n\t{\r\n\t\t$retArray = array();\r\n\t\t$photos = intval($this->_posting->photo);\r\n\t\tlogFire('photo gallery', $photos);\r\n\t\tif (empty($photos))\r\n\t\t{\r\n\t\t\treturn $retArray;\r\n\t\t}\r\n\r\n\t\tif ( $photos >= 10000)\r\n\t\t{\r\n\t\t\t$retArray[] = 1;\r\n\t\t}\r\n\t\tif ( ($photos % 10000) >= 1000)\r\n\t\t{\r\n\t\t\t$retArray[] = 2;\r\n\t\t}\r\n\t\tif ( ($photos % 1000) >= 100)\r\n\t\t{\r\n\t\t\t$retArray[] = 3;\r\n\t\t}\r\n\t\tif ( ($photos % 100) >= 10)\r\n\t\t{\r\n\t\t\t$retArray[] = 4;\r\n\t\t}\r\n\t\tif ( ($photos % 10) >= 1)\r\n\t\t{\r\n\t\t\t$retArray[] = 5;\r\n\t\t}\r\n\r\n\t\treturn $retArray;\r\n\r\n\t}", "title": "" }, { "docid": "d144b0184c0073f38f56e64fe34a8a19", "score": "0.5385092", "text": "function getPublicPhotos( $nsid, $extras = '', $per_page = '', $page = '' )\n\t{\n\t\t$params = array( 'user_id' => $nsid );\n\t\tif ( $extras ){\n\t\t\t$params['extras'] = $extras;\n\t\t}\n\t\tif ( $per_page ){\n\t\t\t$params['per_page'] = $per_page;\n\t\t}\n\t\tif ( $page ){\n\t\t\t$params['page'] = $page;\n\t\t}\n\n\t\t$xml = $this->call( 'flickr.people.getPublicPhotos' , $params );\n\t\tforeach( $xml->photos->attributes() as $key => $value ){\n\t\t\t$pic[$key] = (string)$value;\n\t\t}\n\t\t$i = 0;\n\t\tforeach( $xml->photos->photo as $photo ){\n\t\t\tforeach( $photo->attributes() as $key => $value ){\n\t\t\t\t$pic['photos'][(string)$photo['id']][$key] = (string)$value;\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t\treturn $pic;\n\t}", "title": "" }, { "docid": "d7e6c1c4f6224d713394f97eeb7ffbf5", "score": "0.5339702", "text": "public function getPhotos() : array\n {\n $conn = $this->entityManager->getConnection();\n $sql = '\n select date(timestamp) AS fecha, count(distinct title) as archivos\n , count(distinct author) as usuarios\n from foto\n group by fecha\n order by fecha';\n $stmt = $conn->prepare($sql);\n $stmt->execute();\n\n return $stmt->fetchAll();\n }", "title": "" }, { "docid": "28a618a14ccc22f21c78bf9fa229dcb5", "score": "0.5327671", "text": "public function getGalleryImagesAttribute()\n {\n return $this->getPhotosTo([\"use\"=>\"gallery\"]);\n }", "title": "" }, { "docid": "ab754c1647bbd3f477ae78afa244bf35", "score": "0.5326722", "text": "public function getPhotosByTag($tag)\n\t{\n\t\t// get photos of user\n\t\t$sql = \"SELECT `title`, `filename`\n\t\t\t\tFROM `photos` INNER JOIN `tagged_photos`\n\t\t\t\tON photos.id = tagged_photos.photo_id\n\t\t\t\tINNER JOIN `tags`\n\t\t\t\tON tagged_photos.tag_id = tags.id\n\t\t\t\tWHERE tags.tag = :tag AND photos.user = :user_id\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute(array(':tag' => $tag, ':user_id' => $_SESSION['id']));\n\n\t\t// array of photos to be returned\n\t\treturn array(\n\t\t\t\t\t$this->pagination->firstBack(),\n\t\t\t\t\t$this->pagination->nextLast(),\n\t\t\t\t\t$this->pagination->where(),\n\t\t\t\t\t$stmt->fetchAll(PDO::FETCH_ASSOC)\n\t\t\t\t\t);\n\t}", "title": "" }, { "docid": "c4b4023923a02f4f4eade0fd7d338757", "score": "0.53255826", "text": "public function getAlbumRows($params = array())\n\t{\n\t\treturn Engine_Api::_() -> getDbTable('albums', 'mp3music') -> fetchAll($this -> getAlbumSelect($params));\n\t}", "title": "" }, { "docid": "4046edc70ec330c467321c99ef57e8cc", "score": "0.5323553", "text": "Public function photoBySearching($params = array()) {\n $parentTable = Engine_Api::_()->getItemTable('album');\n $parentTableName = $parentTable->info('name');\n\n $locationTable = Engine_Api::_()->getDbtable('locationitems', 'seaocore');\n $locationName = $locationTable->info('name');\n //GET TAGMAP TABLE NAME\n $tagMapTableName = Engine_Api::_()->getDbtable('TagMaps', 'core')->info('name');\n\n $photoTableName = $this->info('name');\n $viewer_id = Engine_Api::_()->user()->getViewer()->getIdentity();\n $select = $this->select()\n ->setIntegrityCheck(false)\n ->from($photoTableName, array('album_id', 'photo_id', 'title', 'file_id', 'owner_id', 'view_count', 'comment_count', 'rating', 'seao_locationid', 'location', 'like_count', 'description', 'creation_date'));\n\n $select->where($parentTableName . '.search = ?', true);\n\n if (!Engine_Api::_()->sitealbum()->isLessThan417AlbumModule()) {\n $select->joinLeft($parentTableName, $parentTableName . '.album_id=' . $photoTableName . '.album_id', null);\n } else {\n $select->joinLeft($parentTableName, $parentTableName . '.album_id=' . $photoTableName . '.collection_id', null);\n }\n\n if (isset($params['album_city']) && !empty($params['album_city']) && strstr(',', $params['album_city'])) {\n $album_city = explode(',', $params['album_city']);\n $params['album_city'] = $album_city[0];\n }\n\n if (isset($params['album_street']) && !empty($params['album_street'])) {\n $select->join($locationName, \"$photoTableName.seao_locationid = $locationName.locationitem_id\");\n $select->where($locationName . '.formatted_address LIKE ? ', '%' . $params['album_street'] . '%');\n } if (isset($params['album_city']) && !empty($params['album_city'])) {\n $select->join($locationName, \"$photoTableName.seao_locationid = $locationName.locationitem_id\");\n $select->where($locationName . '.city = ?', $params['album_city']);\n } if (isset($params['album_state']) && !empty($params['album_state'])) {\n $select->join($locationName, \"$photoTableName.seao_locationid = $locationName.locationitem_id\");\n $select->where($locationName . '.state = ?', $params['album_state']);\n } if (isset($params['album_country']) && !empty($params['album_country'])) {\n $select->join($locationName, \"$photoTableName.seao_locationid = $locationName.locationitem_id\");\n $select->where($locationName . '.country = ?', $params['album_country']);\n }\n if (!isset($params['location']) && (isset($params['detactLocation']) && $params['detactLocation'] && isset($params['latitude']) && $params['latitude'] && isset($params['longitude']) && $params['longitude'] && isset($params['defaultLocationDistance']) && $params['defaultLocationDistance'])) {\n $radius = $params['defaultLocationDistance']; //in miles\n $latitude = $params['latitude'];\n $longitude = $params['longitude'];\n $flage = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitealbum.proximity.search.kilometer', 0);\n if (!empty($flage)) {\n $radius = $radius * (0.621371192);\n }\n //$latitudeRadians = deg2rad($latitude);\n $latitudeSin = \"sin(radians($latitude))\";\n $latitudeCos = \"cos(radians($latitude))\";\n\n $select->join($locationName, \"$photoTableName.seao_locationid = $locationName.locationitem_id \", array(\"latitude\", \"longitude\", \"(degrees(acos($latitudeSin * sin(radians($locationName.latitude)) + $latitudeCos * cos(radians($locationName.latitude)) * cos(radians($longitude - $locationName.longitude)))) * 69.172) AS distance\"));\n $sqlstring = \"(degrees(acos($latitudeSin * sin(radians($locationName.latitude)) + $latitudeCos * cos(radians($locationName.latitude)) * cos(radians($longitude - $locationName.longitude)))) * 69.172 <= \" . \"'\" . $radius . \"'\";\n $sqlstring .= \")\";\n $select->where($sqlstring);\n }\n\n if ((isset($params['location']) && !empty($params['location']))) {\n if (isset($params['locationmiles']) && (!empty($params['locationmiles']))) {\n $longitude = 0;\n $latitude = 0;\n $detactLatLng = false;\n if (isset($params['location']) && $params['location']) {\n $cookieLocation = Engine_Api::_()->seaocore()->getMyLocationDetailsCookie();\n $detactLatLng = isset($cookieLocation['location']) && $cookieLocation['location'] != $params['location'];\n }\n //check for zip code in location search.\n if (empty($params['Latitude']) && empty($params['Longitude']) || $detactLatLng) {\n\n if ($params['location']) {\n $selectLocQuery = $locationTable->select()->where('location = ?', $params['location']);\n $locationValue = $locationTable->fetchRow($selectLocQuery);\n }\n\n if (empty($locationValue)) {\n $locationResults = Engine_Api::_()->getApi('geoLocation', 'seaocore')->getLatLong(array('location' => $params['location'], 'module' => 'Advanced Photo Albums'));\n if (!empty($locationResults['latitude']) && !empty($locationResults['longitude'])) {\n $latitude = $locationResults['latitude'];\n $longitude = $locationResults['longitude'];\n }\n } else {\n $latitude = (float) $locationValue->latitude;\n $longitude = (float) $locationValue->longitude;\n }\n } else {\n $latitude = (float) $params['Latitude'];\n $longitude = (float) $params['Longitude'];\n }\n\n if ($latitude && $latitude && isset($params['location']) && $params['location']) {\n $seaocore_myLocationDetails['latitude'] = $latitude;\n $seaocore_myLocationDetails['longitude'] = $longitude;\n $seaocore_myLocationDetails['location'] = $params['location'];\n $seaocore_myLocationDetails['locationmiles'] = $params['locationmiles'];\n\n Engine_Api::_()->seaocore()->setMyLocationDetailsCookie($seaocore_myLocationDetails);\n }\n\n $radius = $params['locationmiles']; //in miles\n\n $flage = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitealbum.proximity.search.kilometer', 0);\n if (!empty($flage)) {\n $radius = $radius * (0.621371192);\n }\n //$latitudeRadians = deg2rad($latitude);\n $latitudeSin = \"sin(radians($latitude))\";\n $latitudeCos = \"cos(radians($latitude))\";\n $select->join($locationName, \"$photoTableName.seao_locationid = $locationName.locationitem_id \", array(\"latitude\", \"longitude\", \"(degrees(acos($latitudeSin * sin(radians($locationName.latitude)) + $latitudeCos * cos(radians($locationName.latitude)) * cos(radians($longitude - $locationName.longitude)))) * 69.172) AS distance\", 'locationitem_id', 'resource_type', 'resource_id', 'formatted_address', 'country', 'state', 'zipcode', 'city', 'address', 'location as seao_location'));\n $sqlstring = \"(degrees(acos($latitudeSin * sin(radians($locationName.latitude)) + $latitudeCos * cos(radians($locationName.latitude)) * cos(radians($longitude - $locationName.longitude)))) * 69.172 <= \" . \"'\" . $radius . \"'\";\n $sqlstring .= \")\";\n $select->where($sqlstring);\n } else {\n $select->join($locationName, \"$photoTableName.seao_locationid = $locationName.locationitem_id\", array('locationitem_id', 'resource_type', 'resource_id', 'latitude', 'longitude', 'formatted_address', 'country', 'state', 'zipcode', 'city', 'address', 'location as seao_location'));\n $select->where(\"`{$locationName}`.formatted_address LIKE ? or `{$locationName}`.location LIKE ? or `{$locationName}`.city LIKE ? or `{$locationName}`.state LIKE ?\", \"%\" . urldecode($params['location']) . \"%\");\n }\n } elseif (empty($params['album_street']) && empty($params['album_city']) && empty($params['album_state']) && empty($params['album_country']) && (!isset($params['notLocationPage']) && empty($params['notLocationPage']))) {\n $select->joinLeft($locationName, \"$photoTableName.seao_locationid = $locationName.locationitem_id\", array('locationitem_id', 'resource_type', 'resource_id', 'latitude', 'longitude', 'formatted_address', 'country', 'state', 'zipcode', 'city', 'address', 'location as seao_location'));\n }\n\n if (!empty($params['tag_id'])) {\n $select\n ->setIntegrityCheck(false)\n ->joinLeft($tagMapTableName, \"$tagMapTableName.resource_id = $photoTableName.photo_id\", array('tagmap_id', 'resource_type', 'resource_id', $tagMapTableName . '.tag_id'))\n ->where($tagMapTableName . '.resource_type = ?', 'album_photo')\n ->where($tagMapTableName . '.tag_id = ?', $params['tag_id']);\n }\n if (!empty($params['category_id'])) {\n $select->where($parentTableName . '.category_id = ?', $params['category_id']);\n }\n if (!empty($params['subcategory_id'])) {\n $select->where($parentTableName . '.subcategory_id = ?', $params['subcategory_id']);\n }\n\n if (isset($params['orderby']) && !empty($params['orderby'])) {\n switch ($params['orderby']) {\n case 'taken_date' :\n $select->order($photoTableName . '.date_taken DESC');\n break;\n case 'featuredTakenBy' :\n $select->order($photoTableName . '.featured DESC');\n $select->order('date_taken DESC');\n break;\n case 'modified_date':\n $select->order($photoTableName . '.modified_date DESC');\n break;\n case 'creation_date':\n $select->order($photoTableName . '.creation_date DESC');\n break;\n case 'like_count':\n case 'likesphotos':\n $select->where($photoTableName . '.like_count != ?', 0);\n $select->order($photoTableName . '.like_count DESC');\n break;\n case 'view_count':\n $select->where($photoTableName . '.view_count != ?', 0);\n $select->order($photoTableName . '.view_count DESC');\n break;\n case 'comment_count':\n $select->where($photoTableName . '.comment_count != ?', 0);\n $select->order($photoTableName . '.comment_count DESC');\n break;\n case 'rating':\n $select->where($photoTableName . '.rating != ?', 0);\n $select->order($photoTableName . '.rating DESC');\n break;\n case 'featured':\n // $select->where($photoTableName . '.featured = ?', 1);\n $select->order($photoTableName . '.featured DESC');\n $select->order('creation_date DESC');\n break;\n case 'random':\n $select->order('Rand()');\n break;\n }\n }\n if (!empty($params['search'])) {\n\n $tagName = Engine_Api::_()->getDbtable('Tags', 'core')->info('name');\n $select\n ->setIntegrityCheck(false)\n ->joinLeft($tagMapTableName, \"$tagMapTableName.resource_id = $photoTableName.photo_id and \" . $tagMapTableName . \".resource_type = 'album_photo'\", array('tagmap_id', 'resource_type', 'resource_id', $tagMapTableName . '.tag_id'))\n ->joinLeft($tagName, \"$tagName.tag_id = $tagMapTableName.tag_id\", array());\n\n $select->where($photoTableName . \".title LIKE ? OR \" . $photoTableName . \".description LIKE ? OR \" . $tagName . \".text LIKE ? \", '%' . $params['search'] . '%');\n }\n $select->group(\"$photoTableName.photo_id\");\n if (!empty($params['ownerObject'])) {\n $ownerObject = $params['ownerObject'];\n $viewer = Engine_Api::_()->user()->getViewer();\n if (!Engine_Api::_()->getApi('settings', 'core')->getSetting('sitealbum.photo.specialalbum', 1) && $viewer->getIdentity() != $ownerObject->getIdentity()) {\n $select->where('type IS NULL');\n }\n } elseif (!Engine_Api::_()->getApi('settings', 'core')->getSetting('sitealbum.photo.specialalbum', 1))\n $select->where('type IS NULL');\n\n //$select = Engine_Api::_()->sitealbum()->addPrivacyAlbumsSQl($select, $photoTableName);\n $select = Engine_Api::_()->getDbTable('albums', 'sitealbum')->getNetworkBaseSql($select, array('browse_network' => (isset($params['view_view']) && $params['view_view'] == \"3\")));\n\n if (isset($params['limit']) && !empty($params['limit'])) {\n $limit = $params['limit'];\n }\n\n if (isset($params['start_index']) && $params['start_index'] >= 0) {\n $select = $select->limit($limit, $params['start_index']);\n return $this->fetchAll($select);\n }\n\n return Zend_Paginator::factory($select);\n }", "title": "" }, { "docid": "f268a467c05f27dc6f62560aba91222b", "score": "0.5315986", "text": "public function setPhotos($photos)\n {\n $this->photos = $photos;\n }", "title": "" }, { "docid": "2b6f01669d8b01108d5e67db8bffbd02", "score": "0.53110623", "text": "public function getTaggedInOthersPhotos($params = array()) {\n\n $parentTable = Engine_Api::_()->getItemTable('album');\n $parentName = $parentTable->info('name');\n\n $photoTableName = $this->info('name');\n\n $tableTagmaps = Engine_Api::_()->getDbtable('tagMaps', 'core');\n $tableTagmapsName = $tableTagmaps->info('name');\n\n $select = $tableTagmaps->select()\n ->from($tableTagmapsName, array('resource_id', 'creation_date'))\n ->join($photoTableName, $tableTagmapsName . '.resource_id=' . $photoTableName . '.photo_id', array());\n\n if (!Engine_Api::_()->sitealbum()->isLessThan417AlbumModule()) {\n $select->join($parentName, $parentName . '.album_id=' . $photoTableName . '.album_id', array());\n } else {\n $select->join($parentName, $parentName . '.album_id=' . $photoTableName . '.collection_id', array());\n }\n\n if (!empty($params['category_id'])) {\n $select->where($parentName . '.category_id = ?', $params['category_id']);\n }\n\n if (!empty($params['subcategory_id'])) {\n $select->where($parentName . '.subcategory_id = ?', $params['subcategory_id']);\n }\n\n $select->where($tableTagmapsName . '.resource_type = ?', \"album_photo\")\n ->where($photoTableName . '.\towner_id <> ?', $params['owner_id'])\n ->where($parentName . '.\towner_id <> ?', $params['owner_id'])\n ->where($tableTagmapsName . '.tag_id = ?', $params['owner_id'])\n ->where($tableTagmapsName . '.tag_type = ?', \"user\")\n ->where('search = ?', true)\n ->order($tableTagmapsName . '.creation_date DESC');\n\n return Zend_Paginator::factory($select);\n }", "title": "" }, { "docid": "02a858130a7508e4e0c0c80ab8a19d85", "score": "0.531025", "text": "function GetArquivosByAlbum($album)\n{\n\t$arquivo = new Arquivos();\n\t\n\t$list_arquivos = $arquivo->GetArquivosFromAlbum($album);\n\t\n\treturn $list_arquivos;\n}", "title": "" }, { "docid": "cbd4134a68dfafcb0f8e4323c077eb56", "score": "0.5303025", "text": "private function get_images(){\n\t\timport('wddsocial.model.WDDSocial\\ImageVO');\n\t\t$data = array('id' => $this->id);\n\t\tswitch ($this->type){\n\t\t\tcase 'project':\n\t\t\t\t$query = $this->db->prepare($this->sql->getProjectImages);\n\t\t\t\t$query->execute($data);\n\t\t\t\t$query->setFetchMode(\\PDO::FETCH_CLASS,'WDDSocial\\ImageVO');\n\t\t\t\twhile($image = $query->fetch()){\n\t\t\t\t\tarray_push($this->images,$image);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'article':\n\t\t\t\t$query = $this->db->prepare($this->sql->getArticleImages);\n\t\t\t\t$query->execute($data);\n\t\t\t\t$query->setFetchMode(\\PDO::FETCH_CLASS,'WDDSocial\\ImageVO');\n\t\t\t\twhile($image = $query->fetch()){\n\t\t\t\t\tarray_push($this->images,$image);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault :\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "bce988419899ea682abae79677f1a0fa", "score": "0.5301442", "text": "public function myAlbum() {\n $user_id = Auth::user()->id;\n $images = Image::whereUserId($user_id)->get();\n $data = ImageCollection::collection($images);\n\n return response()->json([\n 'success' => true,\n 'images' => $data\n ], 200);\n }", "title": "" }, { "docid": "e1f8b716bc626bd83b9edceff3aaec2d", "score": "0.52975273", "text": "public function getAllPhotos()\n {\n $input = Request::onlyLegacy('project_ids', 'per_page', 'page');\n\n try {\n $projects = $this->companyCamService->getAllPhotos($input);\n\n return ApiResponse::success([\n\n 'data' => $projects,\n ]);\n } catch (AuthorizationException $e) {\n return ApiResponse::errorGeneral($e->getMessage());\n } catch (PaymentRequredException $e) {\n return ApiResponse::errorGeneral($e->getMessage());\n } catch (InternalServerErrorException $e) {\n return ApiResponse::errorGeneral($e->getMessage());\n } catch (\\Exception $e) {\n return ApiResponse::errorInternal(trans('response.error.something_wrong'), $e);\n }\n }", "title": "" }, { "docid": "0a92ebd06c9e480be24b870b9b8ecd56", "score": "0.52969074", "text": "function get_pet_photos($pet) {\n\n // Define Variables\n $pet_photos = '';\n\n // Photo Sizes\n $pet_photo_large = 'x'; // original, up to 500x500\n $pet_photo_medium = 'pn'; // up to 320x250\n $pet_photo_thumbnail_small = 't'; // scaled to 50px tall\n $pet_photo_thumbnail_medium = 'pnt'; // scaled to 60px wide\n $pet_photo_thumbnail_large = 'fpm'; // scaled to 95px wide\n\n // Set Photo Options\n $pet_photo_size = $pet_photo_medium; // change as desired\n $pet_photo_limit_number = true; // limit number of photos to just first photo? true = yes\n\n // If pet has photos\n if( count($pet->media->photos) > 0 ) {\n\n // For each photo, get photos that match the set size\n foreach ( $pet->media->photos->photo as $photo ) {\n foreach( $photo->attributes() as $key => $value ) {\n if ( $key == 'size' ) {\n if ( $value == $pet_photo_size ) {\n\n // If limit set on number of photos, get the first photo\n if ( $pet_photo_limit_number == true ) {\n $pet_photos = '<img alt=\"Photo of ' . $pet_name . '\" src=\"' . $photo . '\">';\n break;\n }\n\n // Otherwise, get all of them\n else {\n $pet_photos .= '<img alt=\"Photo of ' . $pet_name . '\" src=\"' . $photo . '\">';\n }\n \n }\n }\n }\n }\n }\n\n // If no photos have been uploaded for the pet\n else {\n $pet_photos = ''; // Add a URL for a fallback/placeholder photo\n }\n\n return $pet_photos;\n \n}", "title": "" }, { "docid": "df7403ca856e394a5aa9eebda1f7ca5a", "score": "0.5296461", "text": "function afficherPhotosUtilisateur($db, $choixUtilisateur)\n{\n $ormPhoto = new ORMPhoto($db);\n $listePhotos = $ormPhoto->getAllPhotosUtilisateur($choixUtilisateur);\n foreach($listePhotos as $photo)\n {\n $idPhoto = $photo->getIdPhoto();\n $texte = $photo->getTitre() . \", \" . $ormPhoto->getVille($idPhoto). \", \" . $ormPhoto->getPays($idPhoto) . \"<br/>Description: \" . $photo->getDescription() . \"<br/>Postée par \" . $ormPhoto->getUtilisateur($idPhoto) .\".\";\n echo \"<div class=\\\"media all people\\\">\n <a href=\\\"\" . $photo->getUrlFull() . \"\\\"><img src=\\\"\" .$photo->getUrlThumb() . \"\\\" alt=\\\"\\\" title=\\\"\" . $texte . \"\\\" /></a>\n </div>\";\n }\n}", "title": "" }, { "docid": "710eb5a1623c1900e9fc485da74dd97a", "score": "0.5289324", "text": "public function get_personAlbum($id)\n {\n $person = Person::find($id);\n return view('albums/personAlbum', compact('person'));\n }", "title": "" }, { "docid": "6505b5902f2f5ca8e18a633bc8e61798", "score": "0.52848595", "text": "public function loadmore_photos($tbl_name='', $photoid='', $s_id='', $c_id='')\n\t{\n\t\t$query=$this->db->query(\"SELECT * FROM client_photos WHERE id < \".$photoid.\" AND s_id =\".$s_id.\" AND c_id =\".$c_id.\" ORDER BY createdate DESC LIMIT 3\");\n\t\t\n\t\treturn $query->result_array();\n\t}", "title": "" }, { "docid": "1fca4a390c7eeb554e0ae7e5a938ffe3", "score": "0.52808213", "text": "public function getUserPictures()\n {\n return $this->hasMany(UserPictures::className(), ['profile_id' => 'id']);\n }", "title": "" }, { "docid": "df3ae6817a28835aa61c66c20e3479ff", "score": "0.5277855", "text": "public function album()\n {\n return $this->belongsTo('App\\Models\\PhotoAlbum');\n }", "title": "" }, { "docid": "80ddbb94e89666c54268a28d230d611a", "score": "0.52769107", "text": "function getAllPhotos( $albumId = null , $photoType = PHOTOS_USER_TYPE, $limit = null , $permission=null , $orderType = 'DESC' )\r\n\t{\r\n\t\t$db\t\t=& $this->getDBO();\r\n\t\t\r\n\t\t$where\t= ' WHERE b.`type` = ' . $db->Quote($photoType);\r\n\r\n\t\tif( !is_null($albumId) )\r\n\t\t{\r\n\t\t\t$where\t.=\t' AND b.`id`'\r\n\t\t\t\t\t.\t'=' . $db->Quote( $albumId )\r\n\t\t\t\t\t.\t' AND a.`albumid`'\r\n\t\t\t\t\t.\t'=' . $db->Quote( $albumId );\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t// Only apply the permission if explicitly specified\t\r\n\t\tif( !is_null($permission) ) \r\n\t\t{\r\n\t\t\t$where\t.= ' AND a.`permissions`'\r\n\t\t\t\t. '=' . $db->Quote( $permission );\r\n\t\t}\r\n\t\t\r\n\t\t$limitWhere\t= '';\r\n\t\t\r\n\t\tif( !is_null($limit) )\r\n\t\t{\r\n\t\t\t$limitWhere\t.= ' LIMIT ' . $limit;\r\n\t\t}\r\n\t\t\r\n\t\t$query\t= 'SELECT a.* FROM ' . $db->nameQuote( '#__community_photos') . ' AS a';\r\n\t\t$query\t.= ' INNER JOIN ' . $db->nameQuote( '#__community_photos_albums') . ' AS b';\r\n\t\t$query\t.= ' ON a.`albumid` = b.`id`';\r\n\t\t$query\t.= $where;\r\n\t\t$query\t.= ' ORDER BY a.`created` ' . $orderType;\r\n\t\t$query\t.= $limitWhere;\t\t\t\t\r\n\r\n\t\t$db->setQuery( $query );\r\n\t\t\r\n\t\t$result\t= $db->loadObjectList();\r\n\r\n\t\tif($db->getErrorNum())\r\n\t\t{\r\n\t\t\tJError::raiseError( 500, $db->stderr());\r\n\t\t}\r\n\t\t\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "ce043f4265821a5bb19bdcbefd591a83", "score": "0.52610344", "text": "public function apartmentPhotos($id){\n\n $photos = DB::table('apartament_photos')\n ->where('apartament_id', $id)\n ->get();\n\n return $photos;\n }", "title": "" }, { "docid": "7f848e8634926e6aa278ba3142ad9c97", "score": "0.5253441", "text": "public function getPhotos($pid){\n $count = $this->photoCount($pid);\n $recs = array();\n $ret = array('count_total' => $count, 'count' => 0, 'records' => $recs,\n\t\t 'record_offset' => intval($this->offset), 'record_limit' => $this->recordLimit);\n if($count){\n $q = Doctrine_Query::create()\n\t->select('ffa.file_id,ffa.pid,f.sec,f.caption,f.keyword,f.detail,DATE_FORMAT(f.date_create,\\'%c/%e/%y\\') AS date_create,f.ts,f.status,u.username,u.photo_id')\n\t->from($this->fileTableName . ' ffa')\n\t->innerJoin('ffa.File f')\n\t->innerJoin('f.User u')\n\t->where('ffa.pid = ?',$pid)\n\t->andWhere('f.ftype < 10')\n\t->orderBy('f.date_create DESC')\n\t->limit($this->recordLimit);\n $rows = $q->execute(array(),Doctrine_Core::HYDRATE_SCALAR);\n $recs = array();\n $reply = new fbPhotoReply();\n $fish = new fbPhotoFish();\n if($rows && (count($rows) > 0) ){\n\tforeach($rows as $i => $row){\n\t $file_id = intval($row['ffa_file_id']);\n\t $recs[$i]['id'] = $file_id;\n\t $recs[$i]['pid'] = intval($row['ffa_pid']);\n\t $recs[$i]['sec'] = intval($row['f_sec']);\n\t $recs[$i]['caption'] = trim($row['f_caption']);\n\t $recs[$i]['keyword'] = trim($row['f_keyword']);\n\t $recs[$i]['detail'] = trim($row['f_detail']);\n\t $recs[$i]['date_create'] = $row['f_date_create'];\n\t $recs[$i]['ts'] = $row['f_ts'];\n\t $recs[$i]['status'] = trim($row['f_status']);\n\t $recs[$i]['username'] = $row['u_username'];\n\t $recs[$i]['photo_id'] = $row['u_photo_id'];\n\t $recs[$i]['reply_count'] = $reply->replyCount($file_id);\n\t $recs[$i]['fish_count'] = $fish->fishCount($file_id);\n\t}\n }\n $ret['count'] = count($recs);\n $ret['records'] = $recs;\n }\n return $ret;\n }", "title": "" }, { "docid": "2925bf23f888624486c134974c7951c3", "score": "0.52503705", "text": "public function getPosts(){\n\t\t\t$options = array(\n\t\t\t\t\t'method' => 'flickr.people.getPublicPhotos',\n\t\t\t\t\t'api_key' => $this->_apiKey,\n\t\t\t\t\t'user_id' => $this->_userID,\n\t\t\t\t\t'extras' => 'date_upload%2Cviews%2Curl_q',\n\t\t\t\t\t'per_page' => $this->_limit,\n\t\t\t\t\t'format' => 'json',\n\t\t\t\t\t'nojsoncallback' => 1\n\t\t\t);\n\t\t\t$url = self::_getUrl(self::API_URI, $options);\n\t\t\t$result = $this->_curlResponse($url);\n\t\t\treturn $this->_loop($result->photos->photo);\n\t\t}", "title": "" }, { "docid": "339943091478895a4358afbeb257609a", "score": "0.5246938", "text": "public function albumimageslist($albumid){\n\t\t\n\t\t$resultrow = array();\n\t\t$query = \"select * from \".TABLEALBUMIMAGES.\" where albumid = '\".$albumid.\"'\";\n\t\t$result = $this -> db -> query($query);\n\t\tforeach($result -> result() as $row){\n\t\t\t$resultrow[] = $row;\n\t\t}\n\treturn $resultrow;\n\t\t// echo \"<pre>\";\n\t\t// print_r($resultrow);\n\t\t// echo \"</pre>\";\n\t}", "title": "" }, { "docid": "b43579196245c42706336d28644d13a9", "score": "0.52453667", "text": "public function album()\r\n {\r\n return $this->belongsTo('App\\PhotoAlbum');\r\n }", "title": "" }, { "docid": "e606ad75a385dba2f4afe33e6d91e77e", "score": "0.5235922", "text": "public function getPhotos()\n {\n return $this->data['fields']['photos'];\n }", "title": "" }, { "docid": "59854aa188744d12b331f4cb20f80d46", "score": "0.5233026", "text": "public function getAlbums()\n {\n return $this->albums;\n }", "title": "" }, { "docid": "b682dad2236af0bc984f82f9fd6743ab", "score": "0.5232027", "text": "function getAlbumbyAlbumIdAndUserId($params)\r\n\t\t{\r\n\t\t\t$sql = 'SELECT * FROM album WHERE id=? and user_id=?';\r\n\t\t\t$types = array('integer','integer');\r\n\t\t\t$res = $this->execute_query($sql,$params,$types);\r\n\t\t\tif(sizeof($res) > 0)\r\n\t\t\t{\r\n\t\t\t\treturn $res[0] ;\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t}", "title": "" }, { "docid": "064f6118fd7420bac8413e17bb26ef8d", "score": "0.5228324", "text": "public function get_unsorted_photographs() {\n $pics = $this->_list_files($this->photo_dir);\n if( $pics === false ) {\n $wcsa->send_error(\"Could not retrieve list of photographs directory.\");\n }\n return(json_encode($pics));\n }", "title": "" }, { "docid": "e3c6f658ae5226e5e2f091377b4d7db7", "score": "0.52248317", "text": "public function photos()\n {\n return $this->hasMany(Photo::class, 'user_id');\n }", "title": "" }, { "docid": "4b6ad9d563637197e30b9f94596eb82f", "score": "0.52197725", "text": "private function getImages()\n {\n $photos = $this->event->get('photo');\n $caption = $this->event->get('caption');\n\n if (empty($photos)) {\n return [];\n }\n\n // Order by size in descending order\n usort($photos, function ($a, $b) {\n $aSize = $a['width'] * $a['height'];\n $bSize = $b['width'] * $b['height'];\n\n if ($aSize == $bSize) {\n return 0;\n }\n\n return ($aSize > $bSize) ? -1 : 1;\n });\n\n $photo = reset($photos);\n\n $response = $this->http->get($this->buildApiUrl('getFile'), [\n 'file_id' => $photo['file_id'],\n ]);\n\n $responseData = json_decode($response->getContent());\n\n if ($response->getStatusCode() !== 200) {\n return [new ImageException($responseData->description)];\n }\n\n $url = $this->buildFileApiUrl($responseData->result->file_path);\n\n return [(new Image($url, $photo))->title($caption)];\n }", "title": "" }, { "docid": "3c9184dbd72e1969cf3e7e875e6d1415", "score": "0.5217706", "text": "public function photo_array() {\n if ( empty($this->photo_array) ) {\n if ($this->page[\"Images\"] == \"\") $this->openpage (\"Images\");\n $icount = count($this->page[\"Images\"]);\n if (!$icount) return array();\n foreach ($this->page[\"Images\"] as $img) {\n $this->photo_array[] = array(\n \"width\"=>$img->width,\n \"size\" =>$img->size,\n \"url\" =>$img->base_url . $img->photo_id . '/' . $img->file_name_base . '.' . $img->extension\n );\n }\n }\n return $this->photo_array;\n }", "title": "" }, { "docid": "5a0cf2ee7fc4343da0c1e78de64b2bd7", "score": "0.5213247", "text": "public function userPhotosets($query, array $options = null)\n {\n static $method = 'flickr.photosets.getList';\n static $defaultOptions = array('per_page' => 500,\n 'page' => 1,\n 'extras' => '');\n\n // can't access by username, must get ID first\n if (strchr($query, '@')) {\n // optimistically hope this is an email\n $options['user_id'] = $this->getIdByEmail($query);\n } else {\n // we can safely ignore this exception here\n $options['user_id'] = $this->getIdByUsername($query);\n }\n\n $options = $this->_prepareOptions($method, $options, $defaultOptions);\n $this->_validateUserSearch($options);\n\n // now search for photos\n $restClient = $this->getRestClient();\n $restClient->getHttpClient()->resetParameters();\n $response = $restClient->restGet('/services/rest/', $options);\n\n if ($response->isError()) {\n /**\n * @see Zend_Service_Exception\n */\n require_once 'Zend/Service/Exception.php';\n throw new Zend_Service_Exception('An error occurred sending request. Status code: '\n . $response->getStatus());\n }\n\n $dom = new DOMDocument();\n $dom->loadXML($response->getBody());\n\n self::_checkErrors($dom);\n\n return new AG_Flickr_PhotosetResultSet($dom, $this);\n }", "title": "" }, { "docid": "cee05c19628275fc4cdef29d619cb9cf", "score": "0.52128977", "text": "public function executeAddPictures()\n {\n $this->gallery = GalleryPeer::retrieveByPK($this->getRequestParameter('gallery_id'));\n \n }", "title": "" }, { "docid": "beac70b49fe13897d03a3be8c892be3e", "score": "0.52074784", "text": "public function pictures($albumId, $page = 1, $perPage = 12)\n {\n /** @var $repo PictureRepository */\n $repo = $this->em->getRepository(\"AppBundle:Picture\");\n\n $query = $repo->fetchAlbumPicturesQuery($albumId);\n\n /** @var $slider SlidingPagination */\n $slider = $this->paginator->paginate($query, $page, $perPage);\n\n $pictures = $this->serializer->normalize($slider->getItems(), 'json', ['groups' => ['short']]);\n\n $slider = $this->paginatorSerializer->normalize($slider);\n\n return [$pictures, $slider];\n }", "title": "" }, { "docid": "a0fba19b0efab2423b4563331e443cff", "score": "0.5199498", "text": "public function show(fotos $fotos)\n {\n //\n }", "title": "" }, { "docid": "1ad5c61be4297a08b38f7e8386d10f4e", "score": "0.5194935", "text": "public function photos()\n {\n return $this->hasMany(Photo::class);\n }", "title": "" }, { "docid": "5918b3cc727a4d00857eec7a5a4d71b7", "score": "0.5181231", "text": "function showAlbums($ownerID) {\n $myPdo = connectToDb();\n $sql = \"SELECT Album_Id, Title, Date_Updated, Owner_Id, Accessibility_Code, Description\n FROM album\n INNER JOIN users ON album.Owner_ID = users.UserId\n WHERE Owner_ID = :ownerID;\";\n $pStatment = $myPdo->prepare($sql);\n $pStatment->execute( array('ownerID' => $ownerID));\n $data = $pStatment->fetchAll();\n return $data;\n}", "title": "" }, { "docid": "718b3585c685cd95ab258e1d8d5f1208", "score": "0.51778156", "text": "function getAllGalleryPictures() {\r\n $query = $this->db->query(\r\n \"SELECT *\"\r\n . \" FROM a16_webapps_3.gallery_pictures\"\r\n );\r\n return $query->result();\r\n }", "title": "" }, { "docid": "566e38804d530561ddb61e439b4acfd1", "score": "0.5176831", "text": "public function get_images()\n {\n if(!$this->id) return NULL;\n \n global $db;\n $query = \"SELECT photoName FROM photo\n WHERE\n locationID='\".$db->real_escape_string( $this->id ).\"'\";\n $result = $db->query( $query );\n $images = array();\n if($result)\n {\n while($row=$result->fetch_assoc()) {\n $images[] = $row['photoName'];\n }\n }\n \n return $images;\n }", "title": "" }, { "docid": "2606598695ae3d641d17de6153d1f232", "score": "0.517674", "text": "public function getPictures($p_pet_id){\n\t\t$result = $this->helper->getAllPictureInfo($p_pet_id);\n\t\t$array = array();\n\t\tfor($i=0;$i<sizeof($result);$i++){\n\t\t\t$picture = new Picture();\n\t\t\t$picture->setInfo($result[$i]);\n\t\t\tarray_push($array,$picture);\n\t\t}\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "04e01a1cbfaad91c6f9c086c0ac3a87e", "score": "0.5175389", "text": "public static function photos($filters = [])\n {\n $photos = self::get(\"/search/photos\", ['query' => $filters]);\n\n return self::getPageResult($photos->getBody(), $photos->getHeaders(), Photo::class);\n }", "title": "" } ]
d0aafad76dba4ebbd44afda6e419bb5e
Tests that the Id does not change with new claims when manually set
[ { "docid": "9993550c7f3e42f20820875e242288c3", "score": "0.81434417", "text": "public function testIdDoesNotChangeWithNewClaimsWhenManuallySet()\n {\n $this->payload->setId('theJti');\n $jti1 = $this->payload->getId();\n $this->payload->add('foo', 'bar');\n $jti2 = $this->payload->getId();\n $this->payload->add('baz', 'blah');\n $jti3 = $this->payload->getId();\n $this->assertEquals('theJti', $this->payload->getId());\n $this->assertEquals('theJti', $this->payload->get('jti'));\n $this->assertEquals($jti1, $jti2);\n $this->assertEquals($jti2, $jti3);\n }", "title": "" } ]
[ { "docid": "fa135c0f8a8078ae75f8fd804c7eb21a", "score": "0.7807524", "text": "public function testIdChangesWithNewClaims()\n {\n $jti1 = $this->payload->getId();\n $this->payload->add('foo', 'bar');\n $jti2 = $this->payload->getId();\n $this->payload->add('baz', 'blah');\n $jti3 = $this->payload->getId();\n $this->assertNotEquals($jti1, $jti2);\n $this->assertNotEquals($jti2, $jti3);\n }", "title": "" }, { "docid": "880ddeb00dab08be08c165c851ad0fd6", "score": "0.71056205", "text": "public function testSettingId()\n {\n $oldId = 1;\n $newId = 2;\n $validFrom = new DateTime(\"-1 week\");\n $validTo = new DateTime(\"+1 week\");\n $token = new Token($oldId, \"\", $validFrom, $validTo, true);\n $token->setId($newId);\n $this->assertEquals($newId, $token->getId());\n }", "title": "" }, { "docid": "a226cfbb2e90af097def5df63eae99bb", "score": "0.6695561", "text": "public function testSettingId()\n {\n $this->payload->setId('foo');\n $this->assertEquals('foo', $this->payload->get('jti'));\n $this->assertEquals('foo', $this->payload->getId());\n }", "title": "" }, { "docid": "a211020580778fcea4b87f03d418569e", "score": "0.66824156", "text": "public function testSetId()\n {\n $contributor = new Contributor();\n $id = '1234';\n\n $contributor->setId($id);\n\n $this->assertEquals($id, $contributor->getId(),\n \"setId should set an id\");\n }", "title": "" }, { "docid": "f261cf2d75a6e83d9ccf2be019c764fb", "score": "0.65723825", "text": "public function testSecurityIdentityUpdate()\r\n {\r\n\r\n }", "title": "" }, { "docid": "c7b17175b2fe2a3f8c7112013725d907", "score": "0.637277", "text": "public function testGetAndSetDomainId()\n {\n $id = 56;\n\n $this->domain->setDomainId($id);\n $actual = $this->domain->getDomainId();\n\n $this->assertEquals($id, $actual);\n }", "title": "" }, { "docid": "1bd923a84c94f37ba2bbab2719b1e0e2", "score": "0.63131005", "text": "public function testId()\n {\n $this->assertEquals(1234, $this->getUserReader()->getId(new SampleModel()));\n }", "title": "" }, { "docid": "f97feddb5e5e22563d24d1137bc58d36", "score": "0.6236417", "text": "public function testGettingId()\n {\n $this->assertNotEmpty($this->payload->get('jti'));\n $this->assertNotEmpty($this->payload->getId());\n }", "title": "" }, { "docid": "f8c71308a3dccec4d19ae0120c043c79", "score": "0.61781025", "text": "public function testSetId()\n {\n // Arrange\n $message = new Admin();\n $message->setId(1);\n\n $expectedResult = 1;\n // Act\n $result = $message->getId();\n // Assert\n $this->assertEquals($expectedResult, $result);\n }", "title": "" }, { "docid": "da96414775c3f5ce8a1fb53a0f9fabfc", "score": "0.60884804", "text": "public function setIdentityId($id);", "title": "" }, { "docid": "dfc48c1fa1223a2020ca982a91bd7875", "score": "0.6082237", "text": "public function testSetAndGetId(){\n $id = 1;\n $this->foodItem->setId($id);\n $this->assertEquals($this->foodItem->getId(), $id);\n }", "title": "" }, { "docid": "bbce99ea1dfb9c829409df9ce1241879", "score": "0.60458547", "text": "public function testShouldNotSetAnIdWhenBuilded()\n {\n \n // $this->assertEmpty($entity->getId());\n }", "title": "" }, { "docid": "ca55be1f765f18917c2f08d729fe9bc1", "score": "0.6021515", "text": "public function testGettingId()\n {\n $id = 1;\n $validFrom = new DateTime(\"-1 week\");\n $validTo = new DateTime(\"+1 week\");\n $token = new Token($id, \"\", $validFrom, $validTo, true);\n $this->assertEquals($id, $token->getId());\n }", "title": "" }, { "docid": "d8864d00dffc534e4db02ed792581ccf", "score": "0.600451", "text": "public function testIdInvalid() {\n $value = -1;\n $this->flight->id = $value;\n $this->assertNotEquals($value, $this->flight->id);\n }", "title": "" }, { "docid": "7c8bb4e1a727860be472d9e53ecc6017", "score": "0.59682995", "text": "public function testSetIdentifier()\n {\n // Start of user code MysqlEntityAttributeMapperTest.testsetIdentifier\n $entity = new SomeEntity();\n $mapper = new MysqlEntityAttributeMapper();\n $mapper->setEntity($entity);\n $mapper->setEntityMapping(\n EntityMappingsRegistry::getEntityMapping(\n 'TiBeN\\\\Framework\\\\Tests\\\\Fixtures\\\\Entity\\\\SomeEntity'\n )\n );\n $mapper->setIdentifier(1337);\n $this->assertEquals(1337, $entity->getId()); \n // End of user code\n }", "title": "" }, { "docid": "e2689dbbfc12421e354c64ce48b67e2d", "score": "0.5907008", "text": "function newId() {\n session_regenerate_id();\n }", "title": "" }, { "docid": "8db989f30ca1d188f7f4571d3489d1cc", "score": "0.5896861", "text": "public function testSetUserID() {\n $testUser = new User();\n $testUser->setID('test');\n $testUser->create();\n\n // Create a test user notification\n $testUserNotification = new UserNotification();\n\n // Set the id\n try {\n $testUserNotification->setID($testUser->getID(), true);\n $this->assertEquals($testUser->getID(), $testUserNotification->getUserID());\n } finally {\n $testUser->delete();\n }\n }", "title": "" }, { "docid": "c185f10bfd6fd74a33f768d0aff87c91", "score": "0.5895331", "text": "public function testIdentityIsNotSetPerDefault()\n {\n $this->assertFalse(Zend_Auth::getInstance()->hasIdentity());\n }", "title": "" }, { "docid": "59aba1462fd64c7b92662de87aa4df14", "score": "0.58539516", "text": "#[@test]\n public function idMemberIsset() {\n $hash= create('GenericMap<int, text.String>');\n $this->assertNotEmpty($hash->__id);\n }", "title": "" }, { "docid": "97c82c4c9d1f59545e41fe77e403436d", "score": "0.5847988", "text": "public function testGetIdentity()\n {\n $expected = $this->modelData['id'];\n $actual = $this->model->getIdentity();\n \n $this->assertEquals($expected, $actual);\n }", "title": "" }, { "docid": "e377fb99e2996862b584c0af0579177e", "score": "0.5844148", "text": "abstract public function isIdUpdated();", "title": "" }, { "docid": "f67f53f0320582ca891fb4e3d4226924", "score": "0.583371", "text": "function set_id( $new_id );", "title": "" }, { "docid": "4565fc352eac36128dab1eb3f9414909", "score": "0.583054", "text": "public function fakeIdentification();", "title": "" }, { "docid": "46707ffd9fd3302a8ce4959c153160d9", "score": "0.5790602", "text": "public function testGetAndSetRevisionId()\n {\n $id = 99;\n\n $this->revision->setRevisionId($id);\n\n $actual = $this->revision->getRevisionId();\n\n $this->assertEquals($id, $actual);\n }", "title": "" }, { "docid": "a6e370480100394a0fd260d118cef779", "score": "0.57604164", "text": "public function testSetIdentityRemovesIdentityIfNullIsPassed()\r\n {\r\n $this->setIdentity('first identity');\r\n $this->setIdentity(null);\r\n $this->assertFalse(Zend_Auth::getInstance()->hasIdentity());\r\n }", "title": "" }, { "docid": "82e352b8476053e5bdd41b2a69536ea8", "score": "0.57178193", "text": "public function testSetIdentitySimulatesIdentity()\n {\n $this->setIdentity('my identity');\n $this->assertEquals('my identity', Zend_Auth::getInstance()->getIdentity());\n }", "title": "" }, { "docid": "e1f441e43d3e1ff69f9c1eb117eed5e3", "score": "0.5698698", "text": "public function testIdValue()\n {\n $this->assertInstanceOf(DocumentType::class, $this->entity->setId(1));\n $this->assertTrue(is_int($this->entity->getId()));\n }", "title": "" }, { "docid": "2c19d68667000bda35449a0da8b9843e", "score": "0.56854385", "text": "public function testSetID()\n {\n self::setProperty($this->widget, 'id', null);\n $this->widget->setID('foo');\n $this->assertNull(self::getProperty($this->widget, 'id'), 'Set an invalid ID');\n $this->widget->setID(self::VALID_TWEET_ID);\n $this->assertEquals(self::VALID_TWEET_ID, self::getProperty($this->widget, 'id'), 'Failed to set a valid ID');\n }", "title": "" }, { "docid": "0555a63f896ff864348605a005cd75e4", "score": "0.5683225", "text": "public function testV1PropertyTemplatesClaimsClaimTemplateIdFormsGet()\n {\n }", "title": "" }, { "docid": "999ff3f045b7d86073d26a8b7d53e60e", "score": "0.5683203", "text": "public function testAddingIdentityCanResetPrimaryIdentity(): void\n {\n /**\n * @psalm-suppress MixedInferredReturnType The closure will always return an identity\n * @psalm-suppress MixedReturnStatement Ditto\n */\n $primaryIdentitySelector = static fn (array $identities): ?IIdentity => \\count($identities) === 0 ? null : $identities[\\count($identities) - 1];\n $user = new User([], $primaryIdentitySelector);\n $this->assertNull($user->getPrimaryIdentity());\n $identity1 = new Identity([], 'http://example.com');\n $user->addIdentity($identity1);\n $this->assertSame($identity1, $user->getPrimaryIdentity());\n $identity2 = new Identity([], 'http://example.com');\n $user->addIdentity($identity2);\n $this->assertSame($identity2, $user->getPrimaryIdentity());\n }", "title": "" }, { "docid": "f3554fecc6fd571869de054b8e60bad3", "score": "0.56756467", "text": "public function testCourseEditExistingID() {\n $response = $this->get('course/' . $this->course->id . '/edit');\n $this->assertEquals('200', $response->foundation->getStatusCode());\n }", "title": "" }, { "docid": "13994e3ed1aa3ad18b5b35442883ef83", "score": "0.56675804", "text": "public function fakeIdentifier()\n {\n $faker = \\Faker\\Factory::create();\n\n return $this->setId($faker->numberBetween(1, 100));\n }", "title": "" }, { "docid": "54a750bf254e873f78cccb2ccf6d1978", "score": "0.5650317", "text": "public function testGetID()\n {\n self::setProperty($this->widget, 'id', self::VALID_TWEET_ID);\n $this->assertEquals(self::VALID_TWEET_ID, $this->widget->getID(), 'Failed to retrieve Tweet ID property');\n }", "title": "" }, { "docid": "e03c9c6689ce8ceac8b861cbbd014726", "score": "0.56381625", "text": "public function setId($value){\n if($this->validateId($value)){\n $this->id = $value;\n return true;\n }\n else{\n return false;\n }\n }", "title": "" }, { "docid": "f6c0e39bc26c702621a64e6ea1b25aa1", "score": "0.56332475", "text": "public function testIdValid() {\n $value = 0;\n $this->flight->id = $value;\n $this->assertGreaterThanOrEqual($this->min_valid_int, $this->flight->id);\n }", "title": "" }, { "docid": "98668dd87fbf126a7faf535aa3342bd8", "score": "0.56319696", "text": "public function testSetNotificationID() {\n $testNotification = new Notification();\n $testNotification->setBody('test');\n $testNotification->create();\n\n // Create a test user notification\n $testUserNotification = new UserNotification();\n\n // Set the id\n try {\n $testUserNotification->setNotificationID($testNotification->getID(), true);\n $this->assertEquals($testNotification->getID(), $testUserNotification->getNotificationID());\n } finally {\n $testNotification->delete();\n }\n }", "title": "" }, { "docid": "4c997015ab625f82c8e2be72e3649ed5", "score": "0.56297827", "text": "private function SaveClaimant()\n\t\t{\n\t\t}", "title": "" }, { "docid": "645067a65993a150c7b40c311c13bb99", "score": "0.56204313", "text": "public function setId($value){\n if($this->validateId($value)){\n $this->id=$value;\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "d0956f07f3d0c090fe4050e2c69ad66a", "score": "0.56148", "text": "public function testSetNullIdWorks()\n {\n //prx($x);\n\n $m = new \\MM_Model_PersistentModelFoo();\n $m->id = null;\n\n// $m = new \\MM_Model_PersistentModelFoo([\n// 'id' => null\n// ]);\n }", "title": "" }, { "docid": "ffa42c6a9840d81f1feeaddfd629d2a7", "score": "0.5607523", "text": "public function testV1PropertyTemplatesClaimsClaimTemplateIdRolesGet()\n {\n }", "title": "" }, { "docid": "c597b0225ebf8e740c83f6d8df65c386", "score": "0.5602803", "text": "public function testUpdateProfiles() {\n $user = User::inRandomOrder()->first(); \n $response = $this->actingAs($user, 'api')->json('PUT','/Profiles/'+$record->id+'', [ \n'bio'=> $this->faker->name,\n'designation'=> $this->faker->name,\n'company'=> $this->faker->name,\n'city'=> $this->faker->name,\n'country'=> $this->faker->name,\n'dob'=> $this->faker->name,\n'user_id'=> $this->faker->name\n\n ]); \n $response->assertOk(); \n}", "title": "" }, { "docid": "73701f26938d0a7a18a854fb3cb25b0a", "score": "0.55939335", "text": "public function testSecurityIdentityGet()\r\n {\r\n\r\n }", "title": "" }, { "docid": "2e333fc01a44a92e3cdcb17958741322", "score": "0.55881166", "text": "public function testGetId()\n {\n self::bootKernel();\n $user = static::getContainer()->get('doctrine')->getManager()->getRepository(User::class)->findOneBy(['username' => 'testUser']);\n \n $this->assertEquals(4, $user->getId());\n }", "title": "" }, { "docid": "3d8e5d23dbc0e067e1db6b2e5aaeae11", "score": "0.5580247", "text": "public function testVisitorsCanNotShowIdentifier(): void\n {\n $resource = Resource::factory()->create();\n $identifier = $resource->identifiers()->create(['value' => 'test-value']);\n\n $this->get('resources/'.$resource->id.'/identifiers/'.$identifier->id)\n ->assertRedirect('login');\n }", "title": "" }, { "docid": "7f798023e8fe7d091c531121e8bb3148", "score": "0.5569014", "text": "public function testClearIdentity(): void\n {\n $this->authenticate();\n $this->auth->clearIdentity();\n $this->assertFalse($this->auth->hasIdentity());\n $this->assertEquals(null, $this->auth->getIdentity());\n }", "title": "" }, { "docid": "24133fff63cd068466cd17e3eb7f0569", "score": "0.55675054", "text": "private function setId($val)\n {\n $this->touch(); //there are now pending changes\n $this->id = $val;\n }", "title": "" }, { "docid": "6b1b8991df7a875408d8779b6fd89f39", "score": "0.55647635", "text": "public function testGetIdentityReturnsCurrentIdentity()\n {\n $this->setIdentity('my identity');\n $this->assertEquals('my identity', $this->getIdentity());\n }", "title": "" }, { "docid": "894b039598683c9edb3109b2f71d5622", "score": "0.5563238", "text": "public function testIdValue()\n {\n $this->assertInstanceOf(SocialNetworkType::class, $this->entity->setId(1));\n $this->assertTrue(is_int($this->entity->getId()));\n }", "title": "" }, { "docid": "d52ad4a5fdaeea076256d13ceb5a2dfe", "score": "0.5557116", "text": "function ClaimAllAPIKeys($id = NULL) {\n\t\tif (empty($id)) {\n\t\t\t// Get the first USER ID from user table in the database\n\t\t\t$id = $this->db->get(\"users\")->row()->user_id;\n\t\t}\n\n\t\t$data = array(\n\t\t\t\t'user_id' => $id,\n\t\t);\n\t\t\t\n\t\t$this->db->update('api', $data);\n\t}", "title": "" }, { "docid": "cf61b1f5942ca417dff6c65483d939e9", "score": "0.55567664", "text": "public function testUsersCanNotShowIdentifier(): void\n {\n $resource = Resource::factory()->create();\n $identifier = $resource->identifiers()->create(['value' => 'test-value']);\n\n $this->actingAs(User::factory()->create())\n ->get('resources/'.$resource->id.'/identifiers/'.$identifier->id)\n ->assertForbidden();\n }", "title": "" }, { "docid": "760a5e86b6116da9acac1835815ef895", "score": "0.55453956", "text": "public function testWhenIdIsNotPassed() {\n $this->dispatch('/employee/profile/show-profile');\n\n $this->assertResponseCode(302);\n }", "title": "" }, { "docid": "7a3a44235bf83c39bb28957ded7f1c38", "score": "0.55375", "text": "public function testDeleteReturnsFalseWhenIdNotSet()\n {\n\t\t$collectionName = 'users';\n\n\t\t$userData = $this->getUserData();\n\t\tunset($userData['_id']);\n\n\t\t$this->connectionMock\n\t\t\t->expects( $this->never() )\n\t\t\t->method('update');\n\n\t\t$user = new SoftDeletesUser($userData);\n\t\t$user->delete();\n }", "title": "" }, { "docid": "cd3ad60adcfd72a2473096a7fa388deb", "score": "0.5537487", "text": "public function testSetId()\n {\n $mixed = new P4Cms_Menu_Mixed;\n $mixed->setId('foo');\n }", "title": "" }, { "docid": "7861be9cf63f8f3d7b15a35acd6beff8", "score": "0.5535132", "text": "public function testGetId() {\n\t\techo (\"\\n********************Test GetId()**********************************************************\\n\");\n\t\t\n\t\t$this->stubedAnnotation->method ( 'getId' )->willReturn ( 1 );\n\t\t$this->assertEquals ( 1, $this->stubedAnnotation->getId () );\n\t}", "title": "" }, { "docid": "f4d9de58e14df4680ba0490fae40064e", "score": "0.5534041", "text": "public function testIdIsAlwaysInt()\n {\n $this->assertEquals(0, $this->accounts->count());\n\n $id = $this->accounts->insert([\n 'license_key' => '123',\n 'subdomain' => 'afiveone',\n 'url' => 'https://www.activecollab.com',\n ])[0];\n\n $this->assertEquals(1, $id);\n $this->assertEquals(1, $this->accounts->count());\n\n $this->assertSame(1, $this->accounts->get('1')['_id']);\n }", "title": "" }, { "docid": "12acda7872bf16ee539a0d826e24ba2d", "score": "0.553348", "text": "public function testGetIdentifierValue()\n {\n // Start of user code MysqlEntityAttributeMapperTest.testgetIdentifierValue\n $entity = new SomeEntity();\n $mapper = new MysqlEntityAttributeMapper();\n $mapper->setEntityMapping(\n EntityMappingsRegistry::getEntityMapping(\n 'TiBeN\\\\Framework\\\\Tests\\\\Fixtures\\\\Entity\\\\SomeEntity'\n )\n );\n $mapper->setEntity($entity);\n $this->assertNull($mapper->getIdentifierValue());\n \n $entity->setId(1337);\n $this->assertSame(1337, $mapper->getIdentifierValue());\n // End of user code\n }", "title": "" }, { "docid": "84072242bfe1896e7c1fcaa989b55191", "score": "0.55033374", "text": "public function testUserPilotIdAdded()\n {\n $new_user = factory(App\\Models\\User::class)->make()->toArray();\n $new_user['password'] = Hash::make('secret');\n $user = $this->userSvc->createUser($new_user);\n $this->assertEquals($user->id, $user->pilot_id);\n\n // Add a second user\n $new_user = factory(App\\Models\\User::class)->make()->toArray();\n $new_user['password'] = Hash::make('secret');\n $user2 = $this->userSvc->createUser($new_user);\n $this->assertEquals($user2->id, $user2->pilot_id);\n\n // Now try to change the original user's pilot_id to 3\n $user = $this->userSvc->changePilotId($user, 3);\n $this->assertEquals(3, $user->pilot_id);\n\n // Create a new user and the pilot_id should be 4\n $user3 = factory(App\\Models\\User::class)->create();\n $this->assertEquals(4, $user3->pilot_id);\n }", "title": "" }, { "docid": "eaf3c2b9602543bbb21a4a37a45ae5dc", "score": "0.55016226", "text": "public function testHasClaimReturnsWhetherOrNotAnyIdentityHasClaim(): void\n {\n $identity = new Identity([new Claim('foo', 'bar', 'http://example.com')]);\n $user = new User([$identity]);\n $this->assertTrue($user->hasClaim('foo', 'bar'));\n $this->assertFalse($user->hasClaim('foo', 'baz'));\n $this->assertFalse($user->hasClaim('doesNotExist', 'bar'));\n\n // Test with enum types\n $identity = new Identity([new Claim(ClaimType::Actor, 'bar', 'http://example.com')]);\n $user = new User([$identity]);\n $this->assertTrue($user->hasClaim(ClaimType::Actor, 'bar'));\n $this->assertFalse($user->hasClaim(ClaimType::Actor, 'baz'));\n $this->assertFalse($user->hasClaim(ClaimType::NameIdentifier, 'bar'));\n\n // Test with multiple identities\n $user = new User([\n new Identity([new Claim('foo', 'bar', 'http://example.com')]),\n new Identity([new Claim('baz', 'quz', 'http://example.com')])\n ]);\n $this->assertTrue($user->hasClaim('foo', 'bar'));\n $this->assertTrue($user->hasClaim('baz', 'quz'));\n $this->assertFalse($user->hasClaim('baz', 'qiz'));\n }", "title": "" }, { "docid": "530f11ac3934c87f7aaf796d32b44fa2", "score": "0.5499298", "text": "public function testSecurityIdentityDelete()\r\n {\r\n\r\n }", "title": "" }, { "docid": "aa015e8930016f1b62501ba62d8e3dc8", "score": "0.5497797", "text": "function test_Marcas_Update_Validate_Id()\n {\n\n $this->json('PATCH', 'api/v1/marca/1000', [], ['Content-Type' =>'application/json', 'Accept' => 'application/json'])\n ->assertStatus(404)\n ->assertJson([\n 'message' => 'Actualizacion de Marca',\n 'status' => 'Not found',\n ]);\n }", "title": "" }, { "docid": "c747f3b49a59ed9035279b0424a683c3", "score": "0.5456113", "text": "public function supportsAdditionalId();", "title": "" }, { "docid": "7dfc9e2a7fe61c282147fac359ff523f", "score": "0.5427347", "text": "public function testIdentityMap()\n {\n $this->assertSame($this->getCrud('my_sharded_space'), $this->getCrud('test.my_sharded_space'));\n }", "title": "" }, { "docid": "18c5e60c600fc2c33f115360598a1f64", "score": "0.54174995", "text": "public function testGetSetClientId()\n {\n $clientId = 12345;\n\n $this->validate->setClientId($clientId);\n $this->assertEquals($clientId, $this->validate->getClientId());\n }", "title": "" }, { "docid": "04a356bda9963f056dd47044b5fc2d85", "score": "0.5417192", "text": "function setId($id)\n\t{\n\t\tif($id != $this->id)\n\t\t{\n\t\t\t$this->_modified = true;\n\t\t\t$this->id = $id;\n\t\t}\n\t}", "title": "" }, { "docid": "8494b07ae08e5cdd045b1c5af1dfe337", "score": "0.54157376", "text": "function setId($id) {\n\t\t$this->_id = $id;\n\t\t$this->_data = null;\n\t\t$this->_coordinator = null;\n\t\t$this->_instructors = array();\n\t}", "title": "" }, { "docid": "d06f04ec317a7045d234ab557b692a14", "score": "0.54075426", "text": "public function testUserID()\n {\n $user = $this->getUserLogin();\n\n $this->get('/api/users/invalidInteger/posts')\n ->seeJson([\n 'data' => null,\n 'meta' => array(\n 'code' => trans('api.CODE_INPUT_FAILED'),\n 'description' => trans('api.DESCRIPTION_INPUT_FAILED'),\n \"messages\" => array(\n array(\"message\" => trans('validation.integer', ['attribute' => 'Author ID']) ),\n )\n )\n ]);\n // not found in database\n $subUser = $this->getSubUser();\n $userId = $subUser->id;\n $subUser->delete();\n $this->get('/api/users/'. $userId.'/posts')\n ->seeJson([\n 'meta' => array(\n 'code' => trans('api.CODE_DB_NOT_FOUND'),\n 'description' => trans('api.DESCRIPTION_DB_NOT_FOUND'),\n \"messages\" => array(\n array(\"message\" => trans('api.MSG_DB_NOT_FOUND',['attribute' => 'User']) ),\n )\n )\n ]);\n\n }", "title": "" }, { "docid": "d497b8aab647c1579c0b3278f8f05719", "score": "0.540687", "text": "public function testProfileAuthorizationByXUserIdSuccess()\n {\n $user = factory(App\\User::class)->make();\n $user->save();\n\n $this->json('GET', '/api/v1/profile', [], [\n 'X-User-Id' => $user->id\n ])\n ->seeStatusCode(JsonResponse::HTTP_OK)\n ->seeJsonEquals($user->toArray());\n }", "title": "" }, { "docid": "4d604fc21ede7f883277d88c57d1aa6e", "score": "0.53933275", "text": "public function testNullReturnedWhenUserIDNotValidInteger()\n\t{\n\t\tSession::$instance = new Payload($this->getMock('Laravel\\\\Session\\\\Drivers\\\\Driver'));\n\t\t\n\t\tAuth::login('asdlkasd');\n\n\t\t$this->assertNull(Auth::user());\n\t}", "title": "" }, { "docid": "96a465cafb1040966d3525c7d3529bb4", "score": "0.53924906", "text": "public function testV1PropertyTemplatesClaimsClaimTemplateIdStatusChangeReasonsGet()\n {\n }", "title": "" }, { "docid": "f327fc30abf7c6acc846ff9ff2ab3562", "score": "0.53898054", "text": "public function testAuthKeepCurrentSessionId()\n {\n $a = $this->authComponent;\n $session = $a->getSessionComponent();\n $session->open();\n $sid = $session->getSessionID();\n\n $a->setKeepCurrentSessionId(true)->openSession($a->getOfficeSessionId(), 'some_prefix');\n $this->assertEquals($sid, $session->getSessionID());\n }", "title": "" }, { "docid": "49f181678f77e007f5be373fd32cac26", "score": "0.5379172", "text": "public function testSetIdentifierValue()\n {\n $identifier = '/path/to/document';\n $this->odmMetadataFactory->getMetadataFor(\\stdClass::class)->willReturn(\n $this->odmMetadata->reveal()\n );\n $this->metadataFactory->getMetadataForClass(\\stdClass::class)->willReturn($this->ctMetadata->reveal());\n\n $this->odmMetadata->getIdentifierValue($this->document)->willReturn($identifier);\n $this->odmMetadata->childrenMappings = [\n 'some_collection',\n ];\n $this->ctMetadata->propertyMetadata = [\n 'some_collection' => 'something',\n ];\n $this->odmMetadata->getFieldValue($this->document, 'some_collection')->willReturn([\n $this->child1,\n $this->child2,\n ]);\n\n $this->encoder->encode('some_collection', 0)->willReturn('some_collection-0');\n $this->encoder->encode('some_collection', 1)->willReturn('some_collection-1');\n $this->odmMetadata->setIdentifierValue($this->child1, $identifier . '/some_collection-0')->shouldBeCalled();\n $this->odmMetadata->setIdentifierValue($this->child2, $identifier . '/some_collection-1')->shouldBeCalled();\n\n $this->updater->update($this->documentManager->reveal(), $this->document);\n }", "title": "" }, { "docid": "d60c8df968e60189d46d2150c870c9e0", "score": "0.53790903", "text": "public function setId($id)\n {\n throw new IKL_Domain_Exception('id changing not allowed');\n }", "title": "" }, { "docid": "2be2e350c780a011058573a722c47d5c", "score": "0.5376649", "text": "public function onceUsingId($id)\n {\n\n // $user = $this->provider->retrieveById($id);\n\n // if (!is_null($user)) {\n // $this->setUser($user);\n // return true;\n // }\n // return false;\n }", "title": "" }, { "docid": "5f666125b35cdd1e81364be22c28cb9b", "score": "0.5374563", "text": "public function testGetSetPageId()\n {\n $createTargetedMessageRequest = new CreateTargetedMessageRequest();\n $this->assertNull($createTargetedMessageRequest->getPageId());\n $this->assertSame($createTargetedMessageRequest, $createTargetedMessageRequest->setPageId(15));\n $this->assertSame(15, $createTargetedMessageRequest->getPageId());\n }", "title": "" }, { "docid": "3f5d2906738efcdeffc4b988ce94376a", "score": "0.5365562", "text": "public function setElementId()\n {\n $this->elementId = substr(md5(rand()), 0, 6);\n }", "title": "" }, { "docid": "8a7f6e80cf2a073d5e5e469a321d8c0a", "score": "0.53606427", "text": "function SetId($value) { $this->id=$value; }", "title": "" }, { "docid": "8a7f6e80cf2a073d5e5e469a321d8c0a", "score": "0.53606427", "text": "function SetId($value) { $this->id=$value; }", "title": "" }, { "docid": "8a7f6e80cf2a073d5e5e469a321d8c0a", "score": "0.53606427", "text": "function SetId($value) { $this->id=$value; }", "title": "" }, { "docid": "bc7d63ff2261081af3535a22fe569f9a", "score": "0.53600943", "text": "public function test_id()\n {\n $contact= new \\App\\Models\\cartorder();\n $contact->setId(1);\n $this->assertEquals($contact->getId(),1);\n \n }", "title": "" }, { "docid": "8b04953ad4ac37d729dc0013a26d8d79", "score": "0.53574044", "text": "public function testV1PropertyTemplatesClaimsClaimTemplateIdReportsGet()\n {\n }", "title": "" }, { "docid": "40190f7325421ca14009d61cc1520d98", "score": "0.5349653", "text": "public function testGettingAllValues()\n {\n $claims = [\n 'iss' => null,\n 'sub' => null,\n 'aud' => null,\n 'exp' => null,\n 'nbf' => null,\n 'iat' => null,\n 'jti' => $this->payload->getId()\n ];\n $this->assertEquals($claims, $this->payload->getAll());\n $this->payload->setIssuer('foo');\n $claims['jti'] = $this->payload->getId();\n $claims['iss'] = 'foo';\n $this->assertEquals($claims, $this->payload->getAll());\n $this->payload->setSubject('bar');\n $claims['jti'] = $this->payload->getId();\n $claims['sub'] = 'bar';\n $this->assertEquals($claims, $this->payload->getAll());\n $this->payload->setAudience('baz');\n $claims['jti'] = $this->payload->getId();\n $claims['aud'] = 'baz';\n $this->assertEquals($claims, $this->payload->getAll());\n $validTo = new DateTimeImmutable();\n $this->payload->setValidTo($validTo);\n $claims['jti'] = $this->payload->getId();\n $claims['exp'] = $validTo->getTimestamp();\n $this->assertEquals($claims, $this->payload->getAll());\n $validFrom = new DateTimeImmutable();\n $this->payload->setValidFrom($validFrom);\n $claims['jti'] = $this->payload->getId();\n $claims['nbf'] = $validFrom->getTimestamp();\n $this->assertEquals($claims, $this->payload->getAll());\n $issuedAt = new DateTimeImmutable();\n $this->payload->setIssuedAt($issuedAt);\n $claims['jti'] = $this->payload->getId();\n $claims['iat'] = $issuedAt->getTimestamp();\n $this->assertEquals($claims, $this->payload->getAll());\n $this->payload->setId('blah');\n $claims['jti'] = 'blah';\n $this->assertEquals($claims, $this->payload->getAll());\n $this->payload->add('name', 'dave');\n $claims['name'] = 'dave';\n $this->assertEquals($claims, $this->payload->getAll());\n }", "title": "" }, { "docid": "7142d8553fa1125923daba5230e0669b", "score": "0.5343551", "text": "public function testGetId()\n {\n $this->package = new Package('id/test', 10);\n $this->assertEquals(10, $this->package->getId());\n \n $this->package->setId(123);\n $this->assertEquals(123, $this->package->getId());\n }", "title": "" }, { "docid": "ae21c135585b88cd8f2bbab89dd54990", "score": "0.5337329", "text": "public function testCashInvoicesIdPut()\n {\n }", "title": "" }, { "docid": "0049ea38f6eef6751cba35734af566b7", "score": "0.53321165", "text": "public function testProfilesInsertIdErp()\n {\n }", "title": "" }, { "docid": "733aad6fb7b32a0bc5a3cb57dfea461d", "score": "0.53290784", "text": "public function testGetId() {\n\t\techo (\"\\n********************Test GetId()**********************************************************\\n\");\n\t\t\n\t\t$this->stubedCondition->method ( 'getId' )->willReturn ( 1 );\n\t\t$this->assertEquals ( 1, $this->stubedCondition->getId () );\n\t}", "title": "" }, { "docid": "66bd9ad957d4f4246a8d671f900cb53d", "score": "0.5325595", "text": "public function testUserPilotIdChangeAlreadyExists()\n {\n $this->expectException(UserPilotIdExists::class);\n $user1 = factory(App\\Models\\User::class)->create(['id' => 1]);\n $user2 = factory(App\\Models\\User::class)->create(['id' => 2]);\n\n // Now try to change the original user's pilot_id to 2 (should conflict)\n $this->userSvc->changePilotId($user1, 2);\n }", "title": "" }, { "docid": "f56ecf38ebffe936fef7d1940eff08dd", "score": "0.53233874", "text": "public function testSetEntityIdAppliesEvenIfNoId()\n {\n $context = new TransitionContext();\n $context->setIsStartTransition(true);\n $context->setRequest($this->request);\n\n $this->request->expects($this->once())\n ->method('get')\n ->with('entityId')\n ->willReturn(null);\n\n $this->processor->process($context);\n\n $this->assertTrue($context->has(TransitionContext::ENTITY_ID));\n $this->assertEquals(null, $context->get(TransitionContext::ENTITY_ID));\n $this->assertSame([], $context->get(TransitionContext::INIT_DATA));\n }", "title": "" }, { "docid": "747df3c2ba9592bc55012747eaf2a100", "score": "0.5311414", "text": "public function testCustomIdType(): void\n {\n $doc = new GH529CustomIdDocument();\n $doc->id = 'foo';\n\n $this->dm->persist($doc);\n $this->dm->flush();\n $this->dm->clear();\n\n $doc = $this->dm->find($doc::class, $doc->id);\n\n self::assertNotNull($doc);\n self::assertSame('foo', $doc->id);\n }", "title": "" }, { "docid": "dc17495b4649458fcd799671282045c7", "score": "0.5308434", "text": "public function testGetId()\n {\n $mixed = new P4Cms_Menu_Mixed;\n\n $this->assertSame(\n null,\n $mixed->getId(),\n 'Expected matching starting id'\n );\n\n $menuItem = new Zend_Navigation_Page_Uri;\n $menuItem->uuid = 'menuItemId';\n $mixed->setMenuItem($menuItem);\n \n $this->assertSame(\n null,\n $mixed->getId(),\n 'Expected matching id with just a menu item set'\n );\n\n $menu = new P4Cms_Menu;\n $menu->setId('menuId');\n $mixed->setMenu($menu);\n\n $this->assertSame(\n 'menuId/menuItemId',\n $mixed->getId(),\n 'Expected matching id with menu and menu item'\n );\n\n $mixed->setMenuItem(null);\n\n $this->assertSame(\n 'menuId',\n $mixed->getId(),\n 'Expected matching id with just a menu'\n );\n }", "title": "" }, { "docid": "c5856964acb47de7e05c6c82968d44e9", "score": "0.5305235", "text": "public function setUserId(string $id);", "title": "" }, { "docid": "ff5e7c1d3731da36de1fe8d617f00792", "score": "0.5303219", "text": "public function testGetID() {\n\t\t// should be set in constructor\n\t\t$this->assertNotEquals(\"\",$this->address->getID());\n\t}", "title": "" }, { "docid": "704a5d0409e022aec59e09ef041143be", "score": "0.53027946", "text": "public function testNextId()\n {\n $this->assertEquals(1, $this->accounts->getNextId());\n $this->assertEquals(1, $this->accounts->getNextId());\n $this->assertEquals(1, $this->accounts->getNextId());\n }", "title": "" }, { "docid": "0ed2af51ddb3fb8f4272947211ab7e71", "score": "0.53015864", "text": "public function onceUsingId($id);", "title": "" }, { "docid": "b9bdcfc72fa56bc14c8c82e0db449dfd", "score": "0.53005165", "text": "public function testShouldRequireACustomerId()\n {\n $this->orderInputFilter->setData([]);\n $isValid = $this->orderInputFilter->isValid();\n $error = [\n 'id' => [\n 'isEmpty' => 'Value is required and can\\'t be empty'\n ]\n ];\n $customer = $this->orderInputFilter\n ->getMessages()['customer'];\n\n static::assertFalse($isValid);\n static::assertEquals($error, $customer);\n }", "title": "" }, { "docid": "2e93d1262e614790e9a1a83fb62f1967", "score": "0.5293985", "text": "public function testActionPutWithInvalidId() {\n\t\t$i = 0;\n\t\t$Action = $this\n\t\t\t->getMockBuilder('EditCrudAction')\n\t\t\t->disableOriginalConstructor()\n\t\t\t->setMethods(array(\n\t\t\t\t'_validateId'\n\t\t\t))\n\t\t\t->getMock();\n\t\t$Action\n\t\t\t->expects($this->at($i++))\n\t\t\t->method('_validateId')\n\t\t\t->with(null)\n\t\t\t->will($this->returnValue(false));\n\n\t\t$this->setReflectionClassInstance($Action);\n\t\t$this->callProtectedMethod('_put', array(null), $Action);\n\t}", "title": "" }, { "docid": "2cedf1cb6c34001b6ee9c86604e533c6", "score": "0.52912533", "text": "function testSetIdInsteadOfUpload() {\n\t\t$this->page->create($this->data);\n\t\t$this->page->File->loadIDFromUpload($this->page);\n\n\t\t$result = $this->page->data;\n\t\t$this->assertNotNull($result['Page']['document_file']);\n\t}", "title": "" }, { "docid": "64d57245c4d91302c65e6a3ab0959a3d", "score": "0.52911097", "text": "public function testSetterMethodCalled()\n {\n $value = 'abc123';\n \n // Should call $model->setIdentity($value);\n $this->model->identity = $value;\n \n $this->assertEquals($value, $this->model->getIdentity());\n }", "title": "" }, { "docid": "e67ea8036066f0a08d8552b0ec152d70", "score": "0.52909166", "text": "public function testAccountIdPut()\n {\n\n }", "title": "" }, { "docid": "1eb22e94bbc42264169b8e5ef37dbb29", "score": "0.5278814", "text": "function setId($value) {\n $this->id = $value;\n }", "title": "" }, { "docid": "e2a8769842087f2c004106cb0539ba2f", "score": "0.5277074", "text": "function test_updateUser_IAmTheUser()\n {\n \tFakeAccess::$identity = 'login';\n \t$this->test_updateUser_noemailnoalias();\n\n }", "title": "" } ]
4a5c51073a2f095d99f9ab8482f13b60
find the user to delete
[ { "docid": "542e83956942116d5cc1248cef3d9eb7", "score": "0.0", "text": "function delete($id)\n {\n if ($layout = Record::findByIdFrom('Layout', $id)) {\n if ($layout->isUsed()) {\n Flash::set('error', __('Layout <b>:name</b> is used! It CAN NOT be deleted!', array(':name'=>$layout->name))); \n } else if ($layout->delete()) {\n Flash::set('success', __('Layout <b>:name</b> has been deleted!', array(':name'=>$layout->name)));\n Observer::notify('layout_after_delete', $layout);\n } else {\n Flash::set('error', __('Layout <b>:name</b> has not been deleted!', array(':name'=>$layout->name))); \n }\n } else {\n Flash::set('error', __('Layout not found!'));\n }\n \n redirect(get_url('layout'));\n }", "title": "" } ]
[ { "docid": "f224f19e7467914f70bdbeff29cc00de", "score": "0.74658465", "text": "static function delete(){\n // If Username Set and Not Current User\n if(strlen(F3::get('POST.name')) && F3::get('POST.name') != F3::get('username')){\n // Load Existing User\n $user = new Axon(F3::get('dbprefix').'users');\n $user->load(array('username=:id',array(':id'=>F3::get('POST.name'))));\n\n // Remove User\n if(!$user->dry()){\n $user->erase();\n }else\n F3::error(404);\n }else{\n F3::error(404);\n }\n }", "title": "" }, { "docid": "c83a378428e9adbc8926898e7d615d54", "score": "0.71702635", "text": "public function deleteUser($id)\r\n{\r\n\t$rowUser = $this->find($id)->current();\r\n\tif($rowUser) {\r\n\t$rowUser->delete();\r\n\t}else{\r\n\tthrow new Zend_Exception(\"Could not delete user. User not found!\");\r\n\t}\r\n}", "title": "" }, { "docid": "e417eba39a8e8510b862ad6014a9c269", "score": "0.71693623", "text": "private function deleteUser(){\n\t\t\tif($this->get_request_method() != \"DELETE\"){\n\t\t\t\t$this->response('',406);\n\t\t\t}\n\t\t\t$id = (int)$this->_request['id'];\n\t\t\tif($id > 0){\t\t\t\t\n\t\t\t\tmysql_query(\"DELETE FROM users WHERE user_id = $id\");\n\t\t\t\t$success = array('status' => \"Success\", \"msg\" => \"Successfully one record deleted.\");\n\t\t\t\t$this->response($this->json($success),200);\n\t\t\t}else\n\t\t\t\t$this->response('',204);\t// If no records \"No Content\" status\n\t\t}", "title": "" }, { "docid": "14f41f9270705779d1a30ce4bcd14b4c", "score": "0.7151734", "text": "public function deleteUser()\n {\n return ;\n }", "title": "" }, { "docid": "0561980ec3853064fbfdf185ef30a2a3", "score": "0.7150308", "text": "public function delete($user);", "title": "" }, { "docid": "4d0bdb84a720ab8e49379e59c1f244d9", "score": "0.7149354", "text": "public function delete_delete(){\n $response = $this->UserM->delete_user(\n $this->delete('id')\n );\n $this->set_response($response);\n }", "title": "" }, { "docid": "45390bb87f3b5534bd56c951beecde55", "score": "0.7131974", "text": "function delete()\n {\n $data['user'] = $this->user;\n $response = $this->HTTP->getData('sql/deluser.html', $data);\n if (strpos($response, 'Removed')) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "82bbb0668dc0524ca968186399f23d9f", "score": "0.7126006", "text": "public function deleteUser()\n {\n // $logger = new Logger();\n // $logger->log(\"User Created:\");\n $this->logger->log(\"User Deleted\");\n }", "title": "" }, { "docid": "6a32dc28336dfb6d3934216ddb85b6c4", "score": "0.71208096", "text": "public function account_delete() {\n\t\t$this->autoLayout = false;\n\t\t$this->User->id = $this->Auth->user('id');\n\t\tif (!$this->User->exists()) {\n\t\t\tthrow new NotFoundException(__('Invalid user'));\n\t\t}\n\t\tif ($this->User->delete()) {\n\t\t\t$this->Session->setFlash('Account deleted', 'alert-success');\n\t\t\t//logout the user after delete\n\t\t\t$this->redirect(array('action' => 'logout'));\n\t\t}\n\t\t\n\t\t$this->Session->setFlash('User was not deleted', 'alert-warning');\n\t\t$this->redirect(array('action' => 'account_edit'));\n\t}", "title": "" }, { "docid": "88a5214f20ceae6ed8ad5049e0aa36c5", "score": "0.7116663", "text": "public function deleteUser($user);", "title": "" }, { "docid": "e8e2c79aa494ceec8848154b529b436b", "score": "0.7110246", "text": "function delete_user(){\n \n}", "title": "" }, { "docid": "d9a20f110515e18e07c64d225fe02d65", "score": "0.7105572", "text": "public function deleteUser()\n {\n\t\t$prms = $this->getRequest()->getParams();\n\t\t\n\t\tforeach( $prms['ids_r'] as $user_id)\n\t\t{\n\t\t\t$user_obj = \\Extended\\ilook_user::getRowObject($user_id); \n\t\t\t\n\t\t\t//Check if user is not yet deleted only then deactivate him/her.\n\t\t\tif($user_obj)\n\t\t\t{\n\t\t\t\tif($user_obj->getAccount_closed_on() == null)\n\t\t\t\t{\n\t\t\t\t\t$users_to_be_deleted[] = $user_id;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(!empty($users_to_be_deleted))\n\t\t{\n\t\t\tforeach( $users_to_be_deleted as $user_to_be_deleted )\n\t\t\t{\n\t\t\t\t//Deactivate users.\n\t\t\t\t\\Extended\\ilook_user::setAccountClosedDate($user_to_be_deleted);\n\t\t\t\t\\Extended\\ilook_user::updateUserStatus($user_to_be_deleted,0);\n\t\t\t}\n\t\t\treturn 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn 2;\n\t\t}\n\t\t\n\t\tdie;\n\t\t\n }", "title": "" }, { "docid": "3a733fa8cca1c4eed2ef570ade6c0bab", "score": "0.7028831", "text": "public function deleteUser()\n {\n $this->logger->log(\"User Deleted\");\n }", "title": "" }, { "docid": "e25a779913dec49941f93dff4a9a4911", "score": "0.7014808", "text": "private function databaseDeleteUser(){\n\t\t$personId = $this->databaseGetUser('personId');\n\t\t$row = $this->db->query(\"DELETE FROM `user` WHERE `personId` = '\" . $personId . \"'\");\n\t\t\n\t\tif(!$row)\n\t\t\treturn $this->setResponseText('dbDeleteError');\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "bcbdc6ccdd3f889b1579569fb5e53826", "score": "0.70121247", "text": "public static function deleteUser($userId) {\r\n \r\n }", "title": "" }, { "docid": "b4eae71c0f57649cfda15876bd471fa7", "score": "0.7004182", "text": "public function deleteUser()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteUser($id);\n $loggedIn = $database->getAdminById($_SESSION['id']);\n \n\n\n if($loggedIn['adminId'] == $id) {\n $this->_f3->reroute('/Logout');\n } else {\n if( $_SESSION['id'] == $loggedIn['adminId']) {\n unset($_SESSION['adminId']);\n }\n $this->_f3->reroute('/Admin');\n }\n \n }", "title": "" }, { "docid": "91ec0bcb6ec54629afa4f4dd6b9fc2b2", "score": "0.69911784", "text": "public function delete(){\n\t\t//Get Posted UserID\n\t\t$userID = $this->input->post('id');\n\t\t\n\t\tif(empty($userID) || !is_numeric($userID)){\n\t\t\tmsgError($this->data['ErrorMsg']['Post']);\n\t\t\treturn NULL;\n\t\t}\n\t\t$where = array(\n\t\t\t'id' => $userID\n\t\t);\n\t\t$deleted = $this->Common_model->delete('users',$where);\n\t\tif($deleted){\n\t\t\t// delete registration data also\n\t\t\t$where = ['user_id'=>$userID];\n\t\t\t$this->Common_model->delete('register', $where);\n\t\t\t$where = ['guest_of'=>$userID];\n\t\t\t$this->Common_model->delete('register', $where);\n\t\t\tmsgOk('User Record deleted successfully!');\n\t\t}\n\t}", "title": "" }, { "docid": "fcf718c693607944abd7dc1590f32a55", "score": "0.6986658", "text": "function deleteUser(){\n\n // si l'utilisateur n'est pas un administrateur\n if($_SESSION['role'] != ROLE_ADMIN ){\n throw new Exception('You do not have the rights to access this page');\n }\n\n $userNo = $_GET['no'];\n\n // vérifie que l'utilisateur existe\n $user = getUserByID($userNo)->fetch();\n if($user != null) {\n\n // si l'utilsateur à supprimer est différent de celui connecté actuellement\n if($userNo != $_SESSION['no']){\n // appel de la fonction supprimant l'utilisateur de la DB\n dropUser($userNo);\n }\n else {\n $_SESSION['message'] = \"You cannot delete yourself\";\n }\n }\n else {\n $_SESSION['message'] = \"This user does not exist\";\n }\n administration();\n}", "title": "" }, { "docid": "6754988f8712adc1bf849dcf3b6fc095", "score": "0.6947634", "text": "public function deleteuserAction() {\n\t\t$uid = Annuaire_User::getCurrentUserId();\n\t\t$db = Gears_Db::getDb();\n\t\t$id = (int) $_POST['id'];\n\t\t$sql = \"DELETE FROM ANNUAIRE_CONTACT WHERE CONTACT_ID = ? AND USER_ID = ?\";\n\t\t$db->query($sql, Array($id, $uid));\n\t\t$this->_redirect('/');\n\t}", "title": "" }, { "docid": "e32b1d7847b7b322041623a8e27dac89", "score": "0.6932025", "text": "public function onDelete(){\n \tif (($removeUser = post('removeUser')) != ''){\n \t\t$user = User::find($removeUser);\n \t\tif ($user){\n \t\t\t// remove from group\n \t\t\t$group = $this->getGroup();\n \t\t\t$group->removeUser($user);\n \n // Updated list of users and other vars\n $this->prepareVars($group);\n \n \t\t}else{\n \t\t\tthrow new \\Exception('User not found.');\n \t\t}\n \t}\n }", "title": "" }, { "docid": "5f967bfc6b2390a0c87dca86a4978fc0", "score": "0.6927948", "text": "public function delete() {\n if(isset($this->user_id)) {\n $message = \"\";\n $message .= \"You <strong>can't</strong> use this command im a group, please do it in a <strong>private conversation</strong> with me.\\n\";\n\n $this->sendMessage($message, null, true);\n return;\n }\n\n try {\n $user = User::where('chat_id', '=', $this->chat_id)->delete();\n\n $message = \"\";\n $message .= \"<strong>Done, your user has been deleted!</strong>\\n\";\n\n $this->sendMessage($message, null, true);\n } catch(\\Exception $e) {\n $message = \"\";\n $message .= \"<strong>Something went wrong...</strong>\\n\";\n\n $this->sendMessage($message, null, true);\n }\n }", "title": "" }, { "docid": "d8a4f59c7542e099779119641d51ff9f", "score": "0.69218165", "text": "public function delete()\n {\n $this->publishEvent(self::EVENT_USER_DELETED);\n }", "title": "" }, { "docid": "4b8c7a0108761615fe61b69184070c2d", "score": "0.6894499", "text": "public function deleteuser(Request $request){\n $user = User::all()->where('id','=',$request->id)->first();\n $user->delete();\n return redirect()->back();\n }", "title": "" }, { "docid": "e08326e74675a9498cafacabc39cd4a2", "score": "0.68866634", "text": "function action_delete($template)\n {\n global $DB;\n\n try {\n\n if (!(check_permission(PERM_USER_WRITE)))\n throw new Exception(\"You do not have the required permissions to delete users!\");\n\n $query = $DB->create_query(\"users\");\n\n if (!(isset($_GET[\"user\"])))\n throw new Exception(\"You did not select any users to delete.\");\n\n $user = $_GET[\"user\"];\n if (is_array($user)) {\n $query->where_in(\"user\", $user);\n } else {\n $query->where(\"user\", \"=\", $user);\n }\n\n if (isset($_GET[\"confirm\"])) {\n $query->run_query_delete();\n\n /* Redirect to the previous location */\n $this->redirect($this->get_tab_referrer());\n return;\n\n } else {\n\n $results = $query->run_query_select(\"user,fullname\");\n\n require($template->load(\"delete_user.tpl\"));\n\n odbc_free_result($results);\n }\n } catch (Exception $e) {\n $this->show_messagebox(MESSAGEBOX_ERROR, $e->getmessage(), true);\n }\n }", "title": "" }, { "docid": "5290e34cfff67e6613e9e4ba9dc8dccd", "score": "0.68836427", "text": "function delete_user() {\n $user_id = $this->input->get_post('user_id');\n $result = $this->if_delete_user($user_id);\n if ($result) {\n $this->users();\n } else {\n echo \"faild to delete the user\";\n $this->users();\n }\n }", "title": "" }, { "docid": "d4280aa358b7da9a4f8c1915e0527bbe", "score": "0.68741363", "text": "public function getDeletedByOne()\r\n {\r\n return $this->getOne(User::class, [\r\n 'id' => 'deleted_by',\r\n ]); \r\n }", "title": "" }, { "docid": "e9199c11e68a75aff9ae918f5035ce29", "score": "0.6859721", "text": "public function userDeleted($uid);", "title": "" }, { "docid": "5c9f4af0737272d8cd624f3c75082d05", "score": "0.6854164", "text": "public function user_delete($id)\n {\n $deluser = User::find($id);\n $deluser->delete();\n\n\n\n }", "title": "" }, { "docid": "1f10c19a2ab23d889635149c9e5ca8d5", "score": "0.68234336", "text": "public function deleteUser()\n {\n /** @var User */\n $user = User::find($this->userId);\n\n if($user){\n\n $user->delete();\n\n $this->emit('hideDeleteUserModal');\n }\n }", "title": "" }, { "docid": "a5413983068464abad3cd737292ce98c", "score": "0.6815264", "text": "public function deleteAction() {\n\t\t$uid = $this->getGet('user_id');\n\t\t$info = Admin_Service_UserModel::getUser($uid);\n\t\tif ($info && $info['group_id'] == 0) $this->output(-1, '此用户无法删除');\n\t\tif ($uid < 1) $this->output(-1, '参数错误');\n\t\t$result = Admin_Service_UserModel::deleteUser($uid);\n\t\tif (!$result) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\n\t}", "title": "" }, { "docid": "d9ae6e4b8114ffc1251173d0b989eebe", "score": "0.6805385", "text": "public function delete(User $user);", "title": "" }, { "docid": "d9ae6e4b8114ffc1251173d0b989eebe", "score": "0.6805385", "text": "public function delete(User $user);", "title": "" }, { "docid": "41b9092067b945c588ffc5726ebd1ee4", "score": "0.67878", "text": "public function delete() {\n $conexion = StorianDB::connectDB();\n $borrado = \"DELETE FROM usuario WHERE nombreUser='\".$this->getNombreUser().\"'\";\n $conexion->exec($borrado);\n }", "title": "" }, { "docid": "f05dfbef483315134519dec88a688545", "score": "0.67832464", "text": "private function deleteUser()\n {\n $user = User::getInstance();\n \n if ( $user->delete() ) {\n // $this->sendDeleteConfirmationEmail();\n $this->redirect('logout');\n }\n }", "title": "" }, { "docid": "d8144836038fcd9f8eaae4586ba91e9e", "score": "0.6781512", "text": "function deleteUser($username){\r\n\t\t\t$query = \"DELETE FROM utente WHERE username = '$username'\";\r\n\t\t\t$flag = DatabaseModel::executeQuery($query);\r\n\t\t\treturn $flag;\r\n\t\t}", "title": "" }, { "docid": "32a44e8244419d17cbc7a305e42665d6", "score": "0.6781373", "text": "function delete($user){\n $deleted=false;\n if($this->exist($user)){\n $handler=Maqinato::connect(\"delete\");\n $stmt = $handler->prepare(\"DELETE User WHERE id=:id\");\n $stmt->bindParam(':id',$user->getId());\n if($stmt->execute()){\n $deleted=true;\n }else{\n $error=$stmt->errorInfo();\n error_log(\"[\".__FILE__.\":\".__LINE__.\"]\".\"Mysql: \".$error[2]);\n }\n }else{\n $deleted=false;\n }\n return $deleted;\n }", "title": "" }, { "docid": "8f4f98cad8dd4f0a29cdcfdd3945bd78", "score": "0.67812943", "text": "public function delete_user(){\n\n // check for eligibility for user to execute operation\n $res = $this->user_model->validate_user_access('dusu');\n if ($res === false) {\n exit(json_encode(array('err'=>'You have no permission to perform this action')));\n }\n\n $user_id = $_POST['user_id'];\n $stat = $this->user_model->delete_user($user_id);\n if($stat) {\n echo json_encode(true);\n } else {\n echo json_encode(array('err'=>'User not deleted due to server error!'));\n }\n }", "title": "" }, { "docid": "24382e66730e0388a990ceee564dab1c", "score": "0.67667085", "text": "public function deleteUserAction($userId)\n {\n\n }", "title": "" }, { "docid": "0718fbee6c9adc1df713035c61ec85a1", "score": "0.675374", "text": "public static function deleteUser() {\n\t\t$userDel = new dataAccountManagement;\n if($userDel->delUser(Input::get('username'))) {\n $_SESSION['alert'] = true; \n $_SESSION['message'] = '<div class=\"alert alert-success\">Succesvol verwijderd!</div>';\n }\n\t\t}", "title": "" }, { "docid": "12add6815ab3bf8187c3807635b6461c", "score": "0.673854", "text": "public function delete_user()\n\t\t{\n\t\t\t// Remove user object by ID from database\n\t\t\t$success = database::query(\"DELETE FROM users WHERE id=?;\", $this->id);\n\n\t\t\t// Check for failure\n\t\t\tif (!$success)\n\t\t\t{\n\t\t\t\t// On failure, trigger warning\n\t\t\t\ttrigger_error(\"user->delete_user() database delete failed with code: '\" . $success . \"'\", E_USER_WARNING);\t\n\t\t\t}\n\n\t\t\treturn $success;\n\t\t}", "title": "" }, { "docid": "57b120b89be104fb8f6eed0ca98122d2", "score": "0.673754", "text": "public function deleteUser(User $user);", "title": "" }, { "docid": "57b120b89be104fb8f6eed0ca98122d2", "score": "0.673754", "text": "public function deleteUser(User $user);", "title": "" }, { "docid": "9a6c15c007157ec26f9b4cc222f0a270", "score": "0.67295283", "text": "function deleteUser($id){\r\n $db = Database::instance()->db();\r\n\r\n $stmt = $db->prepare('DELETE FROM User WHERE id = ?');\r\n $stmt->execute(array($id));\r\n return $stmt->fetchAll();\r\n }", "title": "" }, { "docid": "71d72955e780d74ae9bd04eb7660aa1f", "score": "0.670516", "text": "public function deleteUser($userId){\n\n $user = User::find($userId);\n\n $user->delete();\n\n}", "title": "" }, { "docid": "e8b3321268890500a095df741f21e964", "score": "0.6699246", "text": "public function deleteAccount()\n {\n $this->loadManagers();\n $userManager = new \\project_Alaska\\Model\\UserManager();\n $userStatus = $userManager->getUserStatus($_GET['id']);\n if (isset($userStatus) && $userStatus[0] === 'member')\n {\n $deletedUser = $userManager->deleteAccount($_GET['id']);\n }\n header('Location: index.php?action=getMemberPanel&id=' . $_GET['id']);\n }", "title": "" }, { "docid": "72d8e63e915c55403deede2f7c65929d", "score": "0.668605", "text": "public function user_info_delete()\n\t{\n\t}", "title": "" }, { "docid": "4327c11192293c5673e65b96071b4e1a", "score": "0.6675924", "text": "public function deleteuser($id){\n $this->db->where('users.id', $id);\n return $this->db->delete('users');\n }", "title": "" }, { "docid": "77cf86f6bcb439e53268ca2ed8eaab11", "score": "0.66642", "text": "public function deleteUserAction()\n\t{\n\t\t$this->checklogin();\n\t\t$users = new Application_Model_Users();\n\t\t\n\t\t//update user device data\n\t $UserId = $this->getRequest()->getParam('uid'); \n\t\t$mode = $this->getRequest()->getParam('mode'); \n\t\n\t\tif($UserId !=\"\" && $mode == \"delete\")\n\t\t{ \n\t\t $Data = $users->getUserdetailsByUserId($UserId);\n\t\t $UserStaffCode = $Data['StaffCode']; \n\t\t\t$result = $users->deleteDeviceDataByStaffCode($UserStaffCode);\n\t\t}\n\t\t\n\t\tdie;\n\t}", "title": "" }, { "docid": "d54c5230bae690e68e92c367d591ae53", "score": "0.6662363", "text": "public function deleteUser($user_id){\n return $this->where('id', $user_id)->delete();\n }", "title": "" }, { "docid": "7b94222b4c708f315996f747e14e0b76", "score": "0.66549003", "text": "public function deletePerson() {\n if (!Input::has('user_id')) {\n return Response::json(['errorMessage' => \"No account selected for deletion.\"], \n self::STATUS_BAD_REQUEST);\n }\n if (Input::get('user_id') != Auth::user()->id) {\n return Response::json(['errorMessage' => \n \"The account you're trying to access and the account you're logged in under don't match.\"], \n self::STATUS_BAD_REQUEST);\n }\n $deleteStatus = UserModel::deleteUser(Input::get('user_id'));\n if (!$deleteStatus) {\n return Response::json(['errorMessage' => \n \"The account you're trying to delete doesn't exist.\"], \n self::STATUS_NOT_FOUND);\n }\n return Response::json(['message' => 'Account deleted'], self::STATUS_OK);\n }", "title": "" }, { "docid": "6ee6d21c7a83c39ae861c8862b617b47", "score": "0.6631928", "text": "public function delete()\n\t{\n\t\t$this->userModel->delete();\n\t}", "title": "" }, { "docid": "b13302920a3c4f2c9ba026243d81cdbe", "score": "0.66278577", "text": "public function delete()\n {\n // $userRepository->deleteById($_GET['id']);\n\n // Anfrage an die URI /user weiterleiten (HTTP 302)\n header('Location: /user');\n }", "title": "" }, { "docid": "3d1ad5bc88bc2fa94f7b2c8bc4f53b33", "score": "0.6625393", "text": "static function delete ($id) {\n\t\tif (User::exists_by_id($id)) {\n\t\t\t// user exists by id, check if validator passed (stops demo mode)\n\t\t\tif (Validator::valid()) {\n\t\t\t\t// delete tokens and db entry\n\t\t\t\tUser::delete_tokens($id);\n\t\t\t\tUser::delete($id);\n\n\t\t\t\tif ($id == AppUser::get_id()) {\n\t\t\t\t\t// user deleted is current app user, redirect to sign in\n\t\t\t\t\tRedirector::redirect('sign_in');\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// user deleted is not current app user, show success\n\t\t\t\t\tAlerter::set_message('success', 'User deleted successfully');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// redirect to user index\n\t\tRedirector::redirect('user');\n\t}", "title": "" }, { "docid": "4bb9c3d406a5ca0daf0ecd0f2ad359ef", "score": "0.6617292", "text": "public function DeleteByUID(){\n\t\tinclude 'connect.php';\n\t\t$req =$bdd->prepare('DELETE FROM user WHERE UID=:UID');\n\t\t$req->execute(array(\n\t\t\t'UID'=>$this->getUID()\n\t\t));\n\t}", "title": "" }, { "docid": "93cbce4b74f8e50f1c5ea6b7105fec9c", "score": "0.66151613", "text": "public function delete()\n {\n $model = new user($_GET['id']);\n $model->deleteuser();\n\n /*** Redirect User to BoatRamp/Index ***/\n header(\"location: index.php?rt=user/index\");\n\n }", "title": "" }, { "docid": "6003d49b2368fd6a7cf7dd7ec7f2a8b2", "score": "0.661278", "text": "function deletecalendaruser()\r\n\t\t{\r\n\t\t\t$lang = new language;\r\n\r\n\t\t\tif (isset($_POST['editaccount']) and trim($_POST['editaccount']) != \"\")\r\n\t\t\t{\r\n\t\t\t\t// create the database access object\r\n\t\t\t\t$accesscaldb = new caldbaccess;\r\n\t\t\t\t$accountid = $accesscaldb->RemoveJunkTags(strtolower(trim($_POST['editaccount'])));\r\n\t\t\t\tif ($accountid == $this->userid['userid'])\r\n\t\t\t\t\treturn $lang->word_fail_selfdelete;\r\n\r\n\t\t\t\t$accesscaldb->DeleteUser($accountid);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\treturn $lang->word_fail_nouser;\r\n\r\n\t\t\treturn $lang->word_deleteuser_ok;\r\n\t\t}", "title": "" }, { "docid": "75d74422ed85da61659f092ffac3cbdb", "score": "0.6610011", "text": "function admin_user_sdelete() {\r\n $this->checkAdminSession();\r\n $pageID = $_POST['id'];\r\n $this->User->id = $_POST['id'];\r\n $this->data['User']['delete_status'] = '1';\r\n $this->User->delete($this->User->id);\r\n // $this->User->save($this->data);\r\n $this->Session->setFlash('User has been deleted successfully.', \"success\");\r\n die();\r\n }", "title": "" }, { "docid": "3094155384e8730bd9aaac09c3d10eeb", "score": "0.6603011", "text": "function delete_user($id)\n {\n return $this->db->delete('users',array('id'=>$id));\n }", "title": "" }, { "docid": "e85114382cbf1ae2d1fe6ea0070e2b07", "score": "0.6588714", "text": "function del(){\r\n\t\t$json = json_decode(file_get_contents('php://input'), true);\r\n\t\tif(isset($json['id']) and is_numeric($json['id'])){\r\n\t\t\t$id = $this->_util->basico($json['id']);\r\n\r\n\t\t\t$remove = $this->_consulta->delUser($id);\r\n\r\n\t\t\techo json_encode($remove);\r\n\t\t\texit;\t\t\t\r\n\t\t}\r\n\r\n\t\techo json_encode(array('res' => 'no', 'data' => 'ERRO: Informe o usuário'));\r\n\t\texit;\r\n\t}", "title": "" }, { "docid": "5b68cd6b812de1ac576c1e43ad9f723d", "score": "0.6585231", "text": "function delete() {\n\n if (!$user = App::getById((int) $_SESSION['userId'])) {\n header(\"Location: user.php\");\n }\n\n $results = array();\n $results['user'] = $user;\n $results['pageTitle'] = \"Delete Me | Find Solidarity\";\n\n $message = new Message;\n $messages = Message::getListByRecipient($results['user']->user_id);\n\n if (isset($_POST['deleteUser'])) {\n\n if ($messages['totalRows'] > 0) {\n $message->deleteMessagesByRecipient($results['user']->user_id);\n }\n $user->deleteImages();\n $user->delete();\n logout();\n header(\"Location: user.php\");\n\n } elseif (isset($_POST['cancel'])) {\n\n // User has cancelled the elimination process: return to the user profile\n header(\"Location: user.php\");\n\n } else {\n\n require(TEMPLATE_PATH . \"/front/includes/eliminate.php\");\n\n }\n\n }", "title": "" }, { "docid": "22c15f1fdacb12ab60b7566ab65359a7", "score": "0.6584209", "text": "public function deleted(User $user)\n {\n //\n }", "title": "" }, { "docid": "ca7d767be225ab35e2931018eff41986", "score": "0.65808547", "text": "function delete_user($id) {\n $this->db->where('id', $id);\n $this->db->delete('instagram_users');\n }", "title": "" }, { "docid": "219d3f997d5b8292a57ade9f51239374", "score": "0.6574703", "text": "public function delete_account($user_id) {\n \n }", "title": "" }, { "docid": "219d3f997d5b8292a57ade9f51239374", "score": "0.6574703", "text": "public function delete_account($user_id) {\n \n }", "title": "" }, { "docid": "4affe6e6f444daaf89d8174fd2a75f8e", "score": "0.6571895", "text": "function delete_user($id_user)\n {\n return $this->db->delete('user', array('id_user' => $id_user));\n }", "title": "" }, { "docid": "b97cdfad6250e1dc84a7b47a4ef493bc", "score": "0.6571111", "text": "public function deleteUser($id) {\n $sql = 'DELETE FROM User WHERE id = ? LIMIT 1';\n $res = $this->db->ExecuteQuery($sql, array($id));\n \n if ($res) {\n return '<p>Användaren raderades.</p>';\n }\n else {\n return '<p>Användaren raderades EJ.<br><pre>' . print_r($this->db->ErrorInfo(), 1) . '</pre></p>';\n }\n }", "title": "" }, { "docid": "41f177e4302285855a8bd97dec24be09", "score": "0.6566871", "text": "function deleteUser($user){\n \n Log::info(\"Entering SecurityService.deleteUser()\");\n \n //create connection to database\n $database = new Database();\n $db = $database->getConnection();\n \n // Create a User Data Service with this connection and calls deleteUser method/\n $dbService = new UserDataService($db);\n $flag = $dbService->deleteUser($user);\n \n // close the connection\n $db = null;\n \n // return the finder result\n Log::info(\"Exit UserBusinessService.deleteUser() with \". $flag);\n return $flag;\n }", "title": "" }, { "docid": "f19fe4a60e272a116492cd9b4922a53e", "score": "0.6566794", "text": "function delete_user($id, $username)\n\t{\n\t\tglobal $conn;\n\t$sql = \"DELETE FROM user where user_name = :username || user_id= :id \";\n\t\t$statement = $conn->prepare($sql);\n\t\t$statement->bindValue(':username', $username);\n\t\t$statement->bindValue(':id', $id);\n\t\t$statement->execute();\n\t\t$result = $statement->rowCount();\n\t\t$statement->closeCursor();\n\t\treturn $result;\t\t\t\n\t}", "title": "" }, { "docid": "139bf085c454af820ef10a5883df519c", "score": "0.6565286", "text": "public function destroy()\n {\n $user = DB::table(\"users\")\n ->where(\"id\", Auth::user()->id)\n ->delete();\n }", "title": "" }, { "docid": "968acc3f43d4eaabdf7a04bb816791c9", "score": "0.6565262", "text": "function _openx_user_manager_delete(&$user) {\n if ($nid = db_result(db_query(\"SELECT nid FROM {openx_manager_manager}\n WHERE duid = %d\", $user->uid))) {\n $node = node_delete($nid);\n }\n}", "title": "" }, { "docid": "3256713f2e870a5c0e475270d737412b", "score": "0.6564321", "text": "function delete() {\n $oAccesoDatos = new AccesoDatos();\n $sQuery = \"\";\n $nAfectados = null;\n if ($this -> id == \"\")\n exit(\"User->delete(): error de codificaci&oacute;n, faltan datos\");\n else {\n if ($oAccesoDatos -> conectar()) {\n $sQuery = \"DELETE FROM app_user WHERE id = '\" . $this -> id . \"'\";\n $nAfectados = $oAccesoDatos -> ejecutarComando($sQuery);\n $oAccesoDatos -> desconectar();\n }\n }\n return $nAfectados;\n }", "title": "" }, { "docid": "2e7ae17cdd73294052f65c6a61f7e649", "score": "0.6561365", "text": "public function delete() {\n\n if (!is_null($this->resource_link)) {\n $ok = $this->resource_link->getConsumer()->getDataConnector()->User_delete($this);\n } else {\n $ok = TRUE;\n }\n\n return $ok;\n\n }", "title": "" }, { "docid": "d70658aacbcd3dcdf5f08ef066794958", "score": "0.6552152", "text": "public function user_delete($id)\n {\n\n if ($user = User::find($id)) {\n if ($user->hasRole('Admin') || $user->hasRole(\"Superadmin\")) {\n\n Session::flash('warning',\"Failed! Can't delete an Admin/Superadmin\");\n return Redirect::back();\n \n }else{\n\n $user->delete();\n\n Session::flash('message','Successful! user Deleted');\n return Redirect::back();\n\n }\n \n }\n\n Session::flash('warning','Failed! user Not Deleted');\n return Redirect::back();\n }", "title": "" }, { "docid": "8f6bacb5b36e660702c0e391841c0ee1", "score": "0.6551258", "text": "public function deleted(User $user)\n {\n //\n }", "title": "" }, { "docid": "8f6bacb5b36e660702c0e391841c0ee1", "score": "0.6551258", "text": "public function deleted(User $user)\n {\n //\n }", "title": "" }, { "docid": "8f6bacb5b36e660702c0e391841c0ee1", "score": "0.6551258", "text": "public function deleted(User $user)\n {\n //\n }", "title": "" }, { "docid": "8f6bacb5b36e660702c0e391841c0ee1", "score": "0.6551258", "text": "public function deleted(User $user)\n {\n //\n }", "title": "" }, { "docid": "8f6bacb5b36e660702c0e391841c0ee1", "score": "0.6551258", "text": "public function deleted(User $user)\n {\n //\n }", "title": "" }, { "docid": "b6976cb4166f4e0a796879f6528f5ee2", "score": "0.65480125", "text": "function deleteUser($post){\n\t$selected = $post['selected_verify'];\n\tforeach($selected as $user){\n\t\tremove($user);\n\t}\n}", "title": "" }, { "docid": "bc790bc8835d1d479de56eff9d1aba4d", "score": "0.6546657", "text": "public function deleteUser(Request $request){\n if (!empty($request['email'])) {\n $user = DB::table('users')->where('email', '=', $request['email'])->get();\n\n $delete_documents = DB::table('documents')->where('id_user', '=', $user[0]->id)->delete();\n $was_delete = DB::table('users')->where('id', '=', $user[0]->id)->delete();\n\n DB::table('oauth_sessions')->where('owner_id', '=', $user[0]->id)->delete();\n\n if ($was_delete) {\n return CustomResponsesHandler::response([\n 'code' => 200,\n 'message' => 'Usuario eliminado con éxito',\n 'response' => null\n ]);\n } else {\n return CustomResponsesHandler::response([\n 'code' => 404,\n 'message' => 'Error al eliminar usuario',\n 'response' => null\n ]);\n }\n } else {\n return CustomResponsesHandler::response([\n 'code' => 404,\n 'message' => 'Email nulo, proporciona uno válido',\n 'response' => null\n ]);\n }\n }", "title": "" }, { "docid": "7c54916c14fb11eb068035b536dac49e", "score": "0.6538048", "text": "public function deleted( User $user ) {\n //\n }", "title": "" }, { "docid": "c1b93ec57118371e993f0b76f2131072", "score": "0.6535995", "text": "public function delete(){\r\n\t\t$type = $this->view->getVariable(\"currentusertype\");\r\n\t\tif ($type != \"administrador\") {\r\n\t\t\tthrow new Exception(i18n(\"You must be an administrator to access this feature.\"));\r\n\t\t}\r\n\t\t// Se guarda el id del recurso seleccionado\r\n\t\t$id = $_REQUEST[\"id\"];\r\n\t\t// Se coge de la BD el usuario seleccionado.\r\n\t\t$resource = $this->resourceMapper->findById($id);\r\n\t\t// Se borra al usuario seleccionado.\r\n\t\t$this->resourceMapper->delete($resource);\r\n\t\t// Se muestra un mensaje de confirmación.\r\n\t\t$this->view->setFlash(sprintf(i18n(\"Resource \\\"%s\\\" successfully deleted.\"),$resource->getNombre()));\r\n\t\t// Se recarga la lista de usuarios mostrada.\r\n\t\t$this->view->redirect(\"resources\", \"resourcesList\");\r\n\t}", "title": "" }, { "docid": "cea861f076b6fa004bbf8c2fa4b75210", "score": "0.65331566", "text": "function query_refuse_user()\n {\n global $con;\n $user = $_POST['user'];\n\n $sql_user = \"DELETE FROM user WHERE user = '$user' AND role = 'REQUESTER'\";\n $result_user = @mysqli_query($con, $sql_user) or die(\"Errore rifiuto user!\");\n @mysqli_free_result($result_user);\n return $result_user;\n }", "title": "" }, { "docid": "50490976bf19b3f9f3d82d004ac981d7", "score": "0.6512301", "text": "public function deleteUser( $data ){\n\t\tSWPLogManager::log(\"Delete user by user id\",array(\"data\"=>$data),TLogger::INFO,$this,\"deleteUser\",\"SWP\");\n\t\tif( isset($data['user_id'] ) ){\n\t\t\t\textract( $data );\n\t\t\tif (($user = UserRecord::finder()->findByUsername($user_id))) {\n\t\t\n\t\t\t\t\n\t\t\t\t$user->delete();\n\t\t\t\tSWPLogManager::log(\"Returns user delete status\",array('success'=>true ,'Message'=> ' User Deleted sucessfully '),TLogger::INFO,$this,\"deleteUser\",\"SWP\");\n\t\t\t\treturn array('success'=>true ,'Message'=> ' User Deleted sucessfully ');\n\t\t\n\t\t\t}else{\n\t\t\t\tSWPLogManager::log(\"Returns if user id does not exist\",array('success'=>false ,'Message'=> ' No users exists in the system with the user_id ' . $user_id),TLogger::INFO,$this,\"deleteUser\",\"SWP\");\n\t\t\t\treturn array('success'=>false ,'Message'=> ' No users exists in the system with the user_id ' . $user_id);\n\t\t\t}\n\t\t\t\t\n\t\t}else{\n\t\t\tSWPLogManager::log(\"Returns if user id does not exist\",array('success'=>false ,'Message'=> 'user_id is mandatory'),TLogger::INFO,$this,\"deleteUser\",\"SWP\");\t\n\t\t\treturn array('success'=>false ,'Message'=> 'user_id is mandatory');\n\t\t}\n\t}", "title": "" }, { "docid": "23172a0f1a40d2824225d7f248990872", "score": "0.6510079", "text": "function eliminarUsuario(){\r\n\t$usuario = new User();\r\n\t$role = $usuario->getRole($_GET['nameUser']);\t\r\n\tif($usuario->deleteUser($_GET['nameUser'],$role)){\r\n\t\taddNotificacion(\"Usuario eliminado\",\"success\");\r\n\t\tredirecionarWithParams($GLOBALS['CONTROLLER_URL'].'adminController.php',array(array('action','verEliminarUsuario')));\r\n\t}\r\n\telse{\t\t\t\r\n\t\taddNotificacion(\"Usuario no eliminado\",\"danger\");\r\n\t\tredirecionarWithParams($GLOBALS['CONTROLLER_URL'].'adminController.php',array(array('action','verEliminarUsuario')));\r\n\t}\r\n}", "title": "" }, { "docid": "7961ce767af1e21c37118ff2a1e159da", "score": "0.6504188", "text": "public function test_delete_user()\n {\n $user = User::factory()->create();\n $userId = $user->id;\n\n $admin = User::factory()->create(['role' => 'admin']);\n\n $this->actingAs($admin)\n ->delete('/user/'.$userId)\n ->assertStatus(302);\n\n $deleted = User::find($userId);\n\n $this->assertNull($deleted);\n }", "title": "" }, { "docid": "144e2c2baedb7af32110f61dac0b4c09", "score": "0.64989686", "text": "public function processDeleteUser() {\r\n /*\r\n * Fails if the proper action was not submitted\r\n */\r\n // echo \"<script>alert('\".$_POST['input-username'].\"')</script>\";\r\n if ($_POST['action'] != 'user_delete') {\r\n return \"Invalid action supplied for process Delete User.\";\r\n }\r\n /*\r\n * Escapes the user input for security\r\n */\r\n $unid = htmlentities($_POST['input-id'], ENT_QUOTES);\r\n\r\n\r\n /*\r\n * Retrieves the matching info from the DB if it exists\r\n */\r\n $sql = \"delete from members where Members_id=:id\";\r\n try {\r\n $res = $this->query($sql, array(\"id\" => $unid));\r\n $this->log->logActions($_SESSION['user']['email'], 'Delete User', 'Success Delete', 'users ID :' . $unid . ' deleted');\r\n } catch (Exception $e) {\r\n // $this->db=null;\r\n return ($e->getMessage());\r\n $this->log->logActions($_SESSION['user']['email'], 'Delete User', 'Faild Delete due to ' . $e->getMessage(), 'users ID :' . $unid . ' deleted');\r\n }\r\n\r\n /*\r\n * Fails if username doesn't match a DB entry\r\n */\r\n if (!$res) {\r\n return FALSE; //\"Your username or password is invalid.\";\r\n } else {\r\n return TRUE; //success\r\n }\r\n }", "title": "" }, { "docid": "2a498ee59677b20d8b59303ac2b13904", "score": "0.6498378", "text": "public function testUserRemove() {\n $id = self::$testUser->getId();\n self::$user_management_api->deleteUser($id);\n $this->assertTrue(\n self::assertPredicate(\n function($id) { self::$user_management_api->findUserById($id); },\n array($id), true\n )\n );\n self::$testUser = null;\n }", "title": "" }, { "docid": "3f3598241e87bd0b52cd5416127dbc64", "score": "0.64982015", "text": "function deletedata () {\n\t\t// pq contem os totais dos usuarios e guests\n\t}", "title": "" }, { "docid": "ff02445439263959f98351ee81499b38", "score": "0.6497724", "text": "function users_del($id) {\n\t\tglobal $db, $core, $lang;\n\t\tif(is_numeric($id) && $id!=1) {\n\t\t\tif($db->select('users', array('id'=>$id))) {\n\t\t\t\tif($db->delete('users', array('id'=>$id))) $core->notify($lang['users']['delete_success'],1);\n\t\t\t\telse $core->notify($lang['users']['delete_fail'],2);\n\t\t\t} else $core->notify($lang['users']['user_doesnt_exist'],2);\n\t\t}\n\t}", "title": "" }, { "docid": "0b419eb982e7464ebab471b914711ce4", "score": "0.6492815", "text": "public function deleteAction(){\n\n\t\t$input = Input::all();\n\t\t$id = $input[\"id\"];\n\t\t$status = false;\n\t\ttry {\n\t\t\t$user = User::find($id);\n\t\t\tif ($user->permission == \"administrator\") {\n\t\t\t\t$message = \"I'm sorry, you cannot remove the user with Super user permission.\";\n\t\t\t} else {\n\t\t\t\t$status = $user->delete();\t\t\n\t\t\t\t$message = \"\";\n\t\t\t}\n\t\t} catch(Exception $ex) {\n\t\t\t$message = \"I'm sorry, You cannot delete this user.\";\n\t\t}\n\n\t\t$responses = array(\n\t\t\t'idx'\t => $id,\t\n\t\t\t'message' => $message,\n\t\t\t'status' => $status,\n\t\t);\n\n\t\treturn Response::json( $responses );\n\n\t}", "title": "" }, { "docid": "481ab4ed9d2b75aa389d5a0cfe9f3e31", "score": "0.6492506", "text": "function testUserDelete()\r\n {\r\n // Clean Unit Test User First\r\n $this->dbh->Query(\"delete from users where name like '%unittestusername%';\");\r\n \r\n // instantiate controller\r\n $userController = new UserController($this->ant, $this->user);\r\n $userController->debug = true;\r\n \r\n // create user data\r\n $params['userName'] = \"UnitTestUserName\";\r\n $params['name'] = \"UnitTestUserName\";\r\n $params['password'] = \"UnitTest UserPassword\";\r\n $params['active'] = \"t\";\r\n $userId = $userController->saveUser($params);\r\n $this->assertTrue($userId > 0);\r\n \r\n // test user delete\r\n $params['uid'] = $userId;\r\n $result = $userController->userDelete($params);\r\n $this->assertTrue($result > 0);\r\n $this->assertEquals($result, 1);\r\n \r\n // retrieve user using AntObject\r\n $obj = new CAntObject($this->dbh, \"user\", $userId, $this->user);\r\n $this->assertEquals($obj->getValue(\"name\"), strtolower($params['name'])); \r\n \r\n // clear data\r\n $obj->removeHard();\r\n }", "title": "" }, { "docid": "b96502fe70ef27b0df50cc79b58139de", "score": "0.6488215", "text": "public function deleteByUser(){\n // delete query\n $query = \"DELETE FROM \" . $this->table_name . \" WHERE user_id=:user_id\";\n $stmt = $this->conn->prepare($query);\n\n // sanitize\n $this->user_id=htmlspecialchars(strip_tags($this->user_id));\n\n // bind id\n $stmt->bindParam(\":user_id\", $this->user_id);\n\n if($stmt->execute()){\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "a69b2585ebeaa76f4def9c381a89b60c", "score": "0.6481319", "text": "public function delete($id = null) {\n $this->request->onlyAllow('post');\n\n \n $this->User->id = $id;\n //cant find user\n if (!$this->User->exists()) {\n throw new NotFoundException(__('Invalid user'));\n \n }\n if ($this->User->delete()) {\n $this->Session->setFlash(__('User deleted'));\n return $this->redirect(array('action' => 'index'));\n }\n // if it doesn't work , display the message user was not deleted. \n $this->Session->setFlash(__('User was not deleted'));\n return $this->redirect(array('action' => 'index'));\n \n }", "title": "" }, { "docid": "6bd289dc1645ed37dc3e92b46673b90b", "score": "0.64784104", "text": "public function delete($un = \"\", $db){ // Deletes a user from the database\n\t\t$sql = \"delete from users where username = :un\";\n\t\t\t\t\t\t\t\n\t\t$statement = $db->prepare($sql);\n\t\t$statement->execute(array(\":un\"=>$un));\n\t\treturn $statement->fetchAll();\n\t}", "title": "" }, { "docid": "fe0a5b8910b484325aa76bbae000c694", "score": "0.64739597", "text": "public function delete()\n\t{\n\t\t// Check for request forgeries\n\t\tFoundry::checkToken();\n\n\t\t// Get current view\n\t\t$view \t= $this->getCurrentView();\n\n\t\t// Get the current logged in user.\n\t\t$my \t= Foundry::user();\n\n\t\t// Determine if the user is really allowed\n\t\tif( !$my->deleteable() )\n\t\t{\n\t\t\t$view->setMessage( JText::_( 'COM_EASYSOCIAL_PROFILE_NOT_ALLOWED_TO_DELETE' ) , SOCIAL_MSG_ERROR );\n\t\t\treturn $view->call( __FUNCTION__ );\n\t\t}\n\n\t\t$config \t= Foundry::config();\n\n\t\t// Determine if we should immediately delete the user\n\t\tif( $config->get( 'users.deleteLogic' ) == 'delete' )\n\t\t{\n\t\t\t$mailTemplate \t= 'deleted.removed';\n\n\t\t\t// Delete the user.\n\t\t\t$my->delete();\n\t\t}\n\n\t\tif( $config->get( 'users.deleteLogic' ) == 'unpublish' )\n\t\t{\n\t\t\t$mailTemplate \t= 'deleted.blocked';\n\n\t\t\t// Block the user\n\t\t\t$my->block();\n\t\t}\n\n\t\t// Send notification to admin\n\n\t\t// Push arguments to template variables so users can use these arguments\n\t\t$params \t= array(\n\t\t\t\t\t\t\t\t'name'\t\t\t\t=> $my->getName(),\n\t\t\t\t\t\t\t\t'avatar'\t\t\t=> $my->getAvatar( SOCIAL_AVATAR_MEDIUM ),\n\t\t\t\t\t\t\t\t'profileLink'\t\t=> JURI::root() . 'administrator/index.php?option=com_easysocial&view=users&layout=form&id=' . $my->id,\n\t\t\t\t\t\t\t\t'date'\t\t\t\t=> Foundry::date()->format( 'jS M, Y' ),\n\t\t\t\t\t\t\t\t'totalFriends'\t\t=> $my->getTotalFriends(),\n\t\t\t\t\t\t\t\t'totalFollowers'\t=> $my->getTotalFollowers()\n\t\t\t\t\t\t);\n\n\n\t\t$title \t\t= JText::sprintf( 'COM_EASYSOCIAL_EMAILS_USER_DELETED_ACCOUNT_TITLE' , $my->getName() );\n\n\t\t// Get a list of super admins on the site.\n\t\t$usersModel = Foundry::model( 'Users' );\n\n\t\t$admins \t= $usersModel->getSiteAdmins();\n\n\t\tif( $admins )\n\t\t{\n\t\t\tforeach( $admins as $admin )\n\t\t\t{\n\t\t\t\t$params[ 'adminName' ]\t= $admin->getName();\n\n\t\t\t\t$mailer \t= Foundry::mailer();\n\t\t\t\t$template\t= $mailer->getTemplate();\n\n\t\t\t\t$template->setRecipient( $admin->getName() , $admin->email );\n\t\t\t\t$template->setTitle( $title );\n\t\t\t\t$template->setTemplate( 'site/profile/' . $mailTemplate , $params );\n\t\t\t\t$template->setPriority( SOCIAL_MAILER_PRIORITY_IMMEDIATE );\n\n\t\t\t\t// Try to send out email to the admin now.\n\t\t\t\t$state \t\t= $mailer->create( $template );\n\t\t\t}\n\t\t}\n\n\t\t// Log the user out from the system\n\t\t$my->logout();\n\n\t\treturn $view->call( __FUNCTION__ );\n\t}", "title": "" }, { "docid": "cb255d95efd4f9d0655afe051a797029", "score": "0.64715284", "text": "public function deleted(User $user)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "96e15a967bc397a57afb0f6e8774cbf4", "score": "0.6469553", "text": "public function userdeleteAction() {\n $em = $this->getEntityManager(); /* Call Entity Manager */\n\n $userId = $this->params('userId');\n if (empty($userId)) {\n echo \"2\";\n } else {\n $userObj = $em->getRepository('\\Admin\\Entity\\Users')->find($userId);\n if (!empty($userObj)) {\n $userObj->setStatus(2);\n $em->persist($userObj);\n $em->flush();\n echo 1;\n } else {\n echo \"3\";\n }\n }\n exit();\n //return new ViewModel(array('users'=>$users));\n }", "title": "" }, { "docid": "b270374510ce39453c2c40985e731516", "score": "0.64680654", "text": "public function action_delete_user($user_id = null)\n {\n // check if has admin access\n if (Auth::has_access('admin.delete_user'))\n {\n // is user id not given, redirect away\n is_null($user_id) and Response::redirect('/');\n\n // get user to be deleted\n $query = Model_Orm_User::query()->where('user_id', $user_id);\n $user_obj = $query->get_one();\n\n // check if user found\n if ( ! empty($user_obj))\n {\n // user found, check if its not admin\n if ($user_obj->group != 100)\n {\n // delete all invites to this event\n $query = Model_Orm_Invite::query()\n ->where('sender_id', $user_id)\n ->or_where('recipient_id', $user_id);\n $invite_obj = $query->get();\n\n foreach ($invite_obj as $invite)\n {\n $invite->delete();\n }\n\n // delete all participants for this event\n $query = Model_Orm_Participant::query()->where('user_id', $user_id);\n $participant_obj = $query->get();\n\n foreach ($participant_obj as $participant)\n {\n if ($participant->role != 10)\n {\n // participant isn't author, delete ir\n $participant->delete();\n }\n else\n {\n // participant is author, remove author ID\n $participant->user_id = 0;\n $participant->save();\n }\n }\n\n // delete all requests to this event\n $query = Model_Orm_Request::query()->where('sender_id', $user_id);\n $request_obj = $query->get();\n\n foreach ($request_obj as $request)\n {\n $request->delete();\n }\n\n // delete all alerts to this event\n $query = Model_Orm_Alert::query()->where('recipient_id', $user_id);\n $alert_obj = $query->get();\n\n foreach ($alert_obj as $alert)\n {\n $alert->delete();\n }\n\n // remove author from all user comments\n $comment_obj = Model_Orm_Comment::get_comment_by_user($user_id);\n\n foreach ($comment_obj as $comment)\n {\n $comment->author_id = 0;\n $comment->save();\n }\n\n // remove author from all user tags\n $query = Model_Orm_Tag::query()->where('author_id', $user_id);\n $tag_obj = $query->get();\n\n foreach ($tag_obj as $tag)\n {\n $tag->author_id = 0;\n $tag->save();\n }\n\n // delete user\n $user_obj->delete();\n\n Session::set_flash('success', 'Lietotājs \"'.$user_obj->username.'\" veiksmīgi dzēsts!');\n Response::redirect('admin/user');\n }\n else\n {\n // user is not power user\n $error[] = 'Nevar dzēst operatoru!';\n Session::set_flash('errors', $error);\n Response::redirect('admin/user');\n }\n }\n else\n {\n // no user found, show error\n $error[] = 'Šāds lietotājs netika atrasts, mēģini vēlreiz!';\n Session::set_flash('errors', $error);\n Response::redirect('admin/user');\n }\n }\n else\n {\n // doesn't have admin access, redirect away\n Response::redirect('/');\n }\n }", "title": "" }, { "docid": "c0ff94e8707c10cb9d43ec0459f7a99f", "score": "0.6465635", "text": "private function user_antique_delete(){\n\t\tglobal $lang;\n\t\t\n\t\tif ( isset($this->user) ){\n\t\t\t\n\t\t\t$result = array(\n\t\t\t\t'deleted_count'=> 0,\t\t\t\t\n\t\t\t);\n\t\t\t\n\t\t\t// validate user has the right to create new user\n\t\t\t$user_id = $this->user->validateToken($_POST);\n\t\t\t\n\t\t\tif ($user_id==false){\n\t\t\t\theader('HTTP/1.0 401 Unauthorized');\t\t\t\t\t\t\t\n\t\t\t\treturn $result;\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif ( !isset($_POST['antique_ids']) || empty($_POST['antique_ids']) ){\n\t\t\t\t$result['message'] = 'Invalid antique Ids!';\n\t\t\t\treturn $result;\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tif (class_exists('ANTIQUES')){\n\t\t\t\n\t\t\t\t$ANTIQUES = new ANTIQUES;\n\t\t\t\t\n\t\t\t\t$result['deleted_count'] = $ANTIQUES->deleteUserAntiques($user_id, $_POST['antique_ids']);\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\treturn $result;\t\n\t\t}\n\t\treturn $this->error_response;\t\n\t}", "title": "" }, { "docid": "53658441cbae5ef9f92007cb6a23b867", "score": "0.6460308", "text": "function deleteOneUser() {\n if (isset($_POST['username'])) {\n \n $username = $_POST['username'];\n \n $url = 'http://admin:[email protected]/userlist.cgi?UserName='.$username.'&UserDelete=Yes';\n $contents = file_get_contents($url, true);\n return \"Utilisateur supprimé\";\n }\n }", "title": "" } ]
1395634f3eada5920588a9644c30342c
another one that speaks for itself
[ { "docid": "e7a9c74a65ac1f23167aab2fde5f6173", "score": "0.0", "text": "public function disconnect(){\n // execute the disconnect routine\n try{\n $this->onDisconnect();\n }catch(Exception $e){\n throw new ConnectionException();\n }\n // invoke the callback if implemented\n if(method_exists($this, \"onDisconnected\")){\n $this->onDisconnected();\n }\n }", "title": "" } ]
[ { "docid": "e4984a37af5708fa4445fbd3164161b3", "score": "0.5617899", "text": "function __constract()\n\t\t{\n\t\t\t}", "title": "" }, { "docid": "68eb92f971ee529fb05f277e8cf4ef68", "score": "0.5425051", "text": "public function beforerun(){}", "title": "" }, { "docid": "4e26dc0575e4736cafd80dbfa4a26e10", "score": "0.54051256", "text": "private function selfCache()\n\t{\n\n\t}", "title": "" }, { "docid": "84f656df8b8a67e9d598a23687cc1815", "score": "0.536487", "text": "public function next(): self;", "title": "" }, { "docid": "874f1cfa173eb893960626af9fe73eab", "score": "0.53519803", "text": "function selfcontrol();", "title": "" }, { "docid": "56fd550e23ca5b8cc0f82dabc7b6e078", "score": "0.5251449", "text": "abstract protected function leer();", "title": "" }, { "docid": "0ae15d7e04c6c77db7b63cd8a9f18a13", "score": "0.52467614", "text": "private function __wakeup() {}", "title": "" }, { "docid": "0ae15d7e04c6c77db7b63cd8a9f18a13", "score": "0.52467614", "text": "private function __wakeup() {}", "title": "" }, { "docid": "0ae15d7e04c6c77db7b63cd8a9f18a13", "score": "0.52467614", "text": "private function __wakeup() {}", "title": "" }, { "docid": "0ae15d7e04c6c77db7b63cd8a9f18a13", "score": "0.52467614", "text": "private function __wakeup() {}", "title": "" }, { "docid": "0ae15d7e04c6c77db7b63cd8a9f18a13", "score": "0.52467614", "text": "private function __wakeup() {}", "title": "" }, { "docid": "0ae15d7e04c6c77db7b63cd8a9f18a13", "score": "0.52467614", "text": "private function __wakeup() {}", "title": "" }, { "docid": "0ae15d7e04c6c77db7b63cd8a9f18a13", "score": "0.52467614", "text": "private function __wakeup() {}", "title": "" }, { "docid": "0ae15d7e04c6c77db7b63cd8a9f18a13", "score": "0.52467614", "text": "private function __wakeup() {}", "title": "" }, { "docid": "8093f291a562fecd9f31139443e8581f", "score": "0.5224482", "text": "private function __wakeup(){}", "title": "" }, { "docid": "8093f291a562fecd9f31139443e8581f", "score": "0.5224482", "text": "private function __wakeup(){}", "title": "" }, { "docid": "8093f291a562fecd9f31139443e8581f", "score": "0.5224482", "text": "private function __wakeup(){}", "title": "" }, { "docid": "8093f291a562fecd9f31139443e8581f", "score": "0.5224482", "text": "private function __wakeup(){}", "title": "" }, { "docid": "f441304cf0cbcee82926095abeaeb932", "score": "0.5147321", "text": "abstract protected function run();", "title": "" }, { "docid": "f441304cf0cbcee82926095abeaeb932", "score": "0.5147321", "text": "abstract protected function run();", "title": "" }, { "docid": "a7015f580545d1dbfbfef0eccc0bfd73", "score": "0.51226914", "text": "public function next(){ }", "title": "" }, { "docid": "c9ad1dcbd8baa7b66dd599f522f458f9", "score": "0.5111097", "text": "public function getThis()\n {\n }", "title": "" }, { "docid": "341bfdb8f3a063bff82cec278257de87", "score": "0.5072641", "text": "public function getThis();", "title": "" }, { "docid": "b381b072eb78dcdfcac46e7846295bbc", "score": "0.5070864", "text": "abstract protected function _run();", "title": "" }, { "docid": "b381b072eb78dcdfcac46e7846295bbc", "score": "0.5070864", "text": "abstract protected function _run();", "title": "" }, { "docid": "e4db6274f9f197634a1d436712abe49a", "score": "0.50563186", "text": "abstract public function __invoke();", "title": "" }, { "docid": "e4db6274f9f197634a1d436712abe49a", "score": "0.50563186", "text": "abstract public function __invoke();", "title": "" }, { "docid": "7d8ac88d4f47f4bfd3869f8d1e5d86e6", "score": "0.5054311", "text": "public function next();", "title": "" }, { "docid": "7d8ac88d4f47f4bfd3869f8d1e5d86e6", "score": "0.5054311", "text": "public function next();", "title": "" }, { "docid": "7d8ac88d4f47f4bfd3869f8d1e5d86e6", "score": "0.5054311", "text": "public function next();", "title": "" }, { "docid": "7d8ac88d4f47f4bfd3869f8d1e5d86e6", "score": "0.5054311", "text": "public function next();", "title": "" }, { "docid": "7d8ac88d4f47f4bfd3869f8d1e5d86e6", "score": "0.5054311", "text": "public function next();", "title": "" }, { "docid": "7d8ac88d4f47f4bfd3869f8d1e5d86e6", "score": "0.5054311", "text": "public function next();", "title": "" }, { "docid": "7d8ac88d4f47f4bfd3869f8d1e5d86e6", "score": "0.5054311", "text": "public function next();", "title": "" }, { "docid": "3c25f9d4352426e34c9c28b0a5fae96b", "score": "0.5025321", "text": "private function __wakeup()\n\t{\n\t}", "title": "" }, { "docid": "d03e3a73ba6b086b63acee97b59daa49", "score": "0.50027436", "text": "protected abstract function advance();", "title": "" }, { "docid": "f6e56881928af5d9ae0f8899465f21b2", "score": "0.49986896", "text": "function takeOver() {\n return null;\n }", "title": "" }, { "docid": "df53bf4bce6c18e7a94fa26cbaed4298", "score": "0.49924985", "text": "private function __wakeup() { }", "title": "" }, { "docid": "128d2f8234cf6408f548efe0fc320792", "score": "0.49720544", "text": "private function __wakeup() {\r\n\t}", "title": "" }, { "docid": "a8dab6f03c3aa2ad65f9f506fbe3d5cb", "score": "0.49529704", "text": "private function __wakeup() {\n \n }", "title": "" }, { "docid": "a8dab6f03c3aa2ad65f9f506fbe3d5cb", "score": "0.49529704", "text": "private function __wakeup() {\n \n }", "title": "" }, { "docid": "600a6fb56d6840e66dfb0cbed01ab38c", "score": "0.49450517", "text": "public function dispatchAgain()\n {\n $this->_dispatched = false;\n\n return $this;\n }", "title": "" }, { "docid": "85b765f503ad326fd7cbce2394ae8a3e", "score": "0.49422657", "text": "private function __wakeup()\r\n {\r\n }", "title": "" }, { "docid": "85b765f503ad326fd7cbce2394ae8a3e", "score": "0.49422657", "text": "private function __wakeup()\r\n {\r\n }", "title": "" }, { "docid": "de54dd16d3cf199f3deebedf79938416", "score": "0.4931161", "text": "private function __wakeup() {\n\t}", "title": "" }, { "docid": "606bace638bb19849176f513b2f0037a", "score": "0.49280503", "text": "public function advance() : void {}", "title": "" }, { "docid": "6e9e1803f2ba6f7c369fdc73b85046a2", "score": "0.49199837", "text": "public function next(): Sheep;", "title": "" }, { "docid": "7613a35db2809fc0cbb56e59803e15fb", "score": "0.49188116", "text": "private function __wakeup()\n {\n \n }", "title": "" }, { "docid": "7613a35db2809fc0cbb56e59803e15fb", "score": "0.49188116", "text": "private function __wakeup()\n {\n \n }", "title": "" }, { "docid": "755dd89475068b918aa54c660f418095", "score": "0.49121585", "text": "public function _getthis() { return $this; }", "title": "" }, { "docid": "689cbaf70e8fe6a8517e7a048ab14431", "score": "0.49103767", "text": "function next();", "title": "" }, { "docid": "05b364b24f7da58401bee58479a7322a", "score": "0.49075767", "text": "private function __wakeup()\n {\n // TODO: Implement __wakeup() method.\n }", "title": "" }, { "docid": "22ff0403333b6cb47d295bdff2b87dec", "score": "0.49075055", "text": "public function __invoke();", "title": "" }, { "docid": "22ff0403333b6cb47d295bdff2b87dec", "score": "0.49075055", "text": "public function __invoke();", "title": "" }, { "docid": "22ff0403333b6cb47d295bdff2b87dec", "score": "0.49075055", "text": "public function __invoke();", "title": "" }, { "docid": "22ff0403333b6cb47d295bdff2b87dec", "score": "0.49075055", "text": "public function __invoke();", "title": "" }, { "docid": "d9d996f57c4869b2992b033e844366e7", "score": "0.49059486", "text": "abstract protected function run(): void;", "title": "" }, { "docid": "3a79663b73101eca16b39c517663604a", "score": "0.4904895", "text": "public final function __wakeup(){}", "title": "" }, { "docid": "f2026decf0ed19406653208fa5288496", "score": "0.4898236", "text": "public function next(): void;", "title": "" }, { "docid": "281b38396e41d80bf2a0e97bff9578d3", "score": "0.4890258", "text": "public function call(){\t\t\n\t\tself::$count++;\n\t}", "title": "" }, { "docid": "82b2fec70d74bb46c033845355f283e5", "score": "0.48798123", "text": "private function __() {\n }", "title": "" }, { "docid": "9ee6fffd024885695115f395be52d3fc", "score": "0.48716995", "text": "public function refine()\n\t{\n\n\t}", "title": "" }, { "docid": "25d639bc17bcf04395371559fb9896e9", "score": "0.48599175", "text": "public static function returnSelf() : \\PHPUnit\\Framework\\MockObject\\Stub\\ReturnSelf\n {\n }", "title": "" }, { "docid": "bf2376390633e3bb5b102da1db5fd490", "score": "0.48548594", "text": "function Owad()\n\t{\n\t\t$this->__construct();\n\t}", "title": "" }, { "docid": "1f956048501e1fed697a36bbe1eaa427", "score": "0.48545772", "text": "private function __wakeup()\n {\n }", "title": "" }, { "docid": "8ca5e4f496f68f76f670f511bee1959e", "score": "0.48543692", "text": "public function __wakeup () {\n\t\t_doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?' ), $this->parent->_version );\n\t}", "title": "" }, { "docid": "8ca5e4f496f68f76f670f511bee1959e", "score": "0.48543692", "text": "public function __wakeup () {\n\t\t_doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?' ), $this->parent->_version );\n\t}", "title": "" }, { "docid": "329a91f5cfd60f7fd4aa919e073d09a7", "score": "0.48504698", "text": "public function __invoke()\n {\n }", "title": "" }, { "docid": "329a91f5cfd60f7fd4aa919e073d09a7", "score": "0.48504698", "text": "public function __invoke()\n {\n }", "title": "" }, { "docid": "329a91f5cfd60f7fd4aa919e073d09a7", "score": "0.48504698", "text": "public function __invoke()\n {\n }", "title": "" }, { "docid": "b2ea8b6289cbdb519502f490985712a2", "score": "0.48499727", "text": "public function fly()\n {\n }", "title": "" }, { "docid": "293094a151b4aed5fe205771dc56dee8", "score": "0.48444054", "text": "public function passed();", "title": "" }, { "docid": "b4f5d467c08e2c5d5551e94acf8f7a66", "score": "0.48422262", "text": "public function __wakeup(){}", "title": "" }, { "docid": "960b268b504e048d8097f01bc09dbc6a", "score": "0.48272252", "text": "private function __wakeup()\n {\n }", "title": "" }, { "docid": "960b268b504e048d8097f01bc09dbc6a", "score": "0.48272252", "text": "private function __wakeup()\n {\n }", "title": "" }, { "docid": "960b268b504e048d8097f01bc09dbc6a", "score": "0.48272252", "text": "private function __wakeup()\n {\n }", "title": "" }, { "docid": "960b268b504e048d8097f01bc09dbc6a", "score": "0.48272252", "text": "private function __wakeup()\n {\n }", "title": "" }, { "docid": "960b268b504e048d8097f01bc09dbc6a", "score": "0.48272252", "text": "private function __wakeup()\n {\n }", "title": "" }, { "docid": "960b268b504e048d8097f01bc09dbc6a", "score": "0.48272252", "text": "private function __wakeup()\n {\n }", "title": "" }, { "docid": "960b268b504e048d8097f01bc09dbc6a", "score": "0.48272252", "text": "private function __wakeup()\n {\n }", "title": "" }, { "docid": "960b268b504e048d8097f01bc09dbc6a", "score": "0.48272252", "text": "private function __wakeup()\n {\n }", "title": "" }, { "docid": "c34e2d64245f38d4523bb69c1169ec14", "score": "0.48256555", "text": "public function eat()\n {\n }", "title": "" }, { "docid": "c34e2d64245f38d4523bb69c1169ec14", "score": "0.48256555", "text": "public function eat()\n {\n }", "title": "" }, { "docid": "18e66d0ed2857cc8fe47435b0e548e74", "score": "0.48255983", "text": "public function operator();", "title": "" }, { "docid": "aaf6ca3e6b56470cf70f59e623cdd3c3", "score": "0.48229855", "text": "public function doRollover()\n {\n return;\n }", "title": "" }, { "docid": "df9fbd18aa77da981c3c1eabd506ea1c", "score": "0.48165858", "text": "public static function isCallingSelf(): bool\n\t{\n\t\t$trace = debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT | DEBUG_BACKTRACE_IGNORE_ARGS, 3);\n\t\treturn isset($trace[2]) && isset($trace[1]['object']) && isset($trace[2]['object']) && $trace[1]['object'] === $trace[2]['object'];\n\t}", "title": "" }, { "docid": "43d0dc9110188d09a1185cd301e8252d", "score": "0.48142543", "text": "public function swim()\n {\n }", "title": "" }, { "docid": "5043ff1239371794534c5d07e41af581", "score": "0.481325", "text": "public function reflash() : void;", "title": "" }, { "docid": "454f169384ba8bde76b6e2816233653e", "score": "0.48127097", "text": "function deleg_autoriser() {\n}", "title": "" }, { "docid": "7ecb3bae6c0a61e769c818906900bef8", "score": "0.4812471", "text": "abstract function run();", "title": "" }, { "docid": "f6730b7079c7e06a3b334221aedeca57", "score": "0.4811896", "text": "protected function _minutely() {\n\n }", "title": "" }, { "docid": "26ab3cd0a75840cacbe39526c2b89d13", "score": "0.47955012", "text": "public function forward()\n {\n\n }", "title": "" }, { "docid": "bd60171ac6b426a380332c44b29d3c72", "score": "0.47919416", "text": "public function super()\n {\n\tself::foo();\n\treturn;\n }", "title": "" }, { "docid": "3e79f290f9d350b21123fffedba51d2e", "score": "0.47904208", "text": "private function __wakeup(){\n }", "title": "" }, { "docid": "cf25ba19cf2530ff818a78ba07d27dbe", "score": "0.4781252", "text": "abstract public function passes();", "title": "" }, { "docid": "ddc010e1b83ada77589122c5632999b3", "score": "0.47783777", "text": "public function admit()\n\t{\n\n\t}", "title": "" }, { "docid": "4d60ba9578b8989dee9c6172cddda840", "score": "0.4772088", "text": "public function next(): static;", "title": "" }, { "docid": "0cf5445de22544ca063a0a3fa2e67a1c", "score": "0.4771121", "text": "private function __wakeup()\n {\n\n }", "title": "" }, { "docid": "657b97cd6a1d79b798c25b9f5cd4053d", "score": "0.47709087", "text": "public function run()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "b3b4b355a1908e033209f0df20cd5a67", "score": "0.47698975", "text": "private function __wakeup() {\n }", "title": "" }, { "docid": "97c1e0be97d8738a04fb56d5ce317fc6", "score": "0.47681862", "text": "public function sub() {\n \t// TODO\n }", "title": "" } ]
6b60eab0a8d110547d8d53cee9d56cfc
Get an attribute array of all arrayable attributes.
[ { "docid": "5cb9ddf8be3737d2783b0d5014a56eed", "score": "0.7773791", "text": "protected function getArrayableAttributes()\n {\n return $this->doDecryptAttributes(parent::getArrayableAttributes());\n }", "title": "" } ]
[ { "docid": "833c6259f62afc648ae48f7d08c5c4d3", "score": "0.85259503", "text": "protected function getArrayableAttributes()\n {\n return $this->getArrayableItems($this->attributes);\n }", "title": "" }, { "docid": "833c6259f62afc648ae48f7d08c5c4d3", "score": "0.85259503", "text": "protected function getArrayableAttributes()\n {\n return $this->getArrayableItems($this->attributes);\n }", "title": "" }, { "docid": "7df0efd967f624277a40ce26298774fa", "score": "0.7871007", "text": "public function toArray()\n {\n $array = [];\n\n foreach ($this->attributes as $key => $value) {\n $array[$key] = ($value instanceof AttributeCollection) ? $value->toArray() : $value;\n }\n\n return $array;\n }", "title": "" }, { "docid": "f281c21a053b1483c99eb5f3d8520109", "score": "0.78581065", "text": "public function getAttributes(): array\n {\n return array_filter(get_object_vars($this), static function ($attribute) {\n return $attribute !== null && !is_array($attribute) && !($attribute instanceof ModelInterface);\n });\n }", "title": "" }, { "docid": "a27ec4b46726201a9b7e5d77cc1b25f5", "score": "0.7857006", "text": "public function attributesToArray(): array\n {\n return $this->attributes;\n }", "title": "" }, { "docid": "0dc200df503df1d2d6a1b50b239d27da", "score": "0.7745453", "text": "public function toArray()\n {\n $array = array();\n\n foreach ($this->attributes as $key => $value)\n {\n if ($value instanceof ArrayableInterface)\n {\n $array[$key] = $value->toArray();\n }\n else\n {\n $array[$key] = $value;\n }\n }\n\n return $array;\n }", "title": "" }, { "docid": "8f7dc5809e079ddd1c77d9172ab16d91", "score": "0.77205384", "text": "public function attributesToArray()\n {\n if (!(self::$noCasts[static::class] ?? false)) {\n return parent::attributesToArray();\n }\n\n return $this->attributes;\n }", "title": "" }, { "docid": "eea83274eb2469c6e7c89333284b03f5", "score": "0.7704875", "text": "protected function attributesToArray()\n\t{\t\n\t\t$attributes = [];\n\n\t\tforeach($this->attributes as $key => $attribute)\n\t\t{\n\t\t\tif ($attribute instanceof ProxyInterface) continue;\n\n\t\t\tif ($attribute instanceof Entity || $attribute instanceof EntityCollection\n\t\t\t|| $attribute instanceof ValueObject)\n\t\t\t{\n\t\t\t\t$attributes[$key] = $attribute->toArray();\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$attributes[$key] = $attribute;\n\t\t}\n\n\t\treturn $attributes;\n\t}", "title": "" }, { "docid": "0e0076436f07b09ef1cd8a47eb6d1271", "score": "0.7689314", "text": "public function toArray(): array {\n return $this->attrs;\n }", "title": "" }, { "docid": "5f14b4a71f18d1062b46942cd51dc39c", "score": "0.76864916", "text": "public function toArray()\n {\n return array_map(function ($value) {\n if (!is_array($value)) {\n return is_object($value) && method_exists($value, 'toArray') ? $value->toArray() : $value;\n } else {\n return $value;\n }\n }, $this->_attributes);\n }", "title": "" }, { "docid": "1ee7ed988f3acefbc5415b94e045dd6e", "score": "0.7623514", "text": "public function getAttributes() {\n return $this->_toArray(false, false);\n }", "title": "" }, { "docid": "fb45bf7d2aa81691a05a3e30d553792a", "score": "0.7593043", "text": "public function toArray() : array\n {\n return $this->attributes;\n }", "title": "" }, { "docid": "e150d20011ffb3559ef75e65188254db", "score": "0.7569079", "text": "private function getAttributesArray(): array\n {\n $order = $this->orderBuilder\n ->setField('attribute_code')\n ->create();\n\n $searchCriteria = $this->searchCriteriaBuilder\n ->addSortOrder($order)\n ->create();\n\n $attributes = $this->attributeRepository->getList(\n ProductAttributeInterface::ENTITY_TYPE_CODE,\n $searchCriteria\n );\n\n return $attributes->getTotalCount() ? $attributes->getItems() : [];\n }", "title": "" }, { "docid": "2154f1cb9160c7a13493622cdd3c7325", "score": "0.7563044", "text": "public function getAttributes(): array;", "title": "" }, { "docid": "e16ab6c88783ebca24be56c13f45a54d", "score": "0.75539804", "text": "public function toArray(): array\n {\n return $this->attributes;\n }", "title": "" }, { "docid": "e16ab6c88783ebca24be56c13f45a54d", "score": "0.75539804", "text": "public function toArray(): array\n {\n return $this->attributes;\n }", "title": "" }, { "docid": "285a7b0f2be466d8aff3fd0ba73ad20c", "score": "0.75166", "text": "public function toArray()\n {\n\n $attributes = [];\n\n foreach ($this->attributes as $name => $value) {\n if (!in_array($name, $this->hidden)) {\n $attributes[$name] = $this->getOriginalAttribute($name);\n }\n }\n\n foreach ($this->appends as $name) {\n $attributes[$name] = $this->getAppendsAttribute($name);\n }\n\n return $attributes;\n }", "title": "" }, { "docid": "88aa90c865dc06b39f6d31bb9377a125", "score": "0.7513697", "text": "protected static function getAttributes()\n {\n return array();\n }", "title": "" }, { "docid": "9171e016208771829f40a022a5f473b1", "score": "0.74906754", "text": "function toArray() \n\t{\n\t\treturn (array) $this->attributes;\n\t}", "title": "" }, { "docid": "6727fc2d710aff78364e6c39e5641c99", "score": "0.74766", "text": "public function getAttributes() : array;", "title": "" }, { "docid": "1ea8b6d9fbe88e6dc93af272c1a4a14b", "score": "0.7459956", "text": "public function getAttributes()\n {\n if (is_array($this->_attributes) === false) {\n return array();\n }\n\n return $this->_attributes;\n }", "title": "" }, { "docid": "12bf3a904a39a85e0c7492e4dac74d76", "score": "0.7320019", "text": "public function toArray($mutated = false): array\n {\n if (!$mutated) {\n return $this->attributes;\n } else {\n $attributes = array_keys($this->attributes);\n $attributes = array_diff($attributes, $this->hidden);\n $values = [];\n foreach ($attributes as $k) {\n $values[$k] = $this->getAttribute($k);\n }\n return $values;\n }\n }", "title": "" }, { "docid": "62af36399bccc16640f32c4a1ee609da", "score": "0.73182297", "text": "public function getAttributes(): array\n {\n return $this->attributes;\n }", "title": "" }, { "docid": "62af36399bccc16640f32c4a1ee609da", "score": "0.73182297", "text": "public function getAttributes(): array\n {\n return $this->attributes;\n }", "title": "" }, { "docid": "b4a8faaa4dbe739c1ed9065399987a8e", "score": "0.7314152", "text": "public function toArray()\n {\n return $this->attributesToArray();\n }", "title": "" }, { "docid": "91ca730f57084405b4985a9cb8ac9075", "score": "0.73130876", "text": "public function toArray() {\n return $this->_attributes;\n }", "title": "" }, { "docid": "65c006f45352d752ca8a474d9d9d012e", "score": "0.7308889", "text": "public function toArray()\n {\n return $this->attributes;\n }", "title": "" }, { "docid": "65c006f45352d752ca8a474d9d9d012e", "score": "0.7308889", "text": "public function toArray()\n {\n return $this->attributes;\n }", "title": "" }, { "docid": "b90dcc9642f53e2614be1a5316108756", "score": "0.730344", "text": "public function toArray()\n {\n return collect($this->attributesToArray())\n ->reject(function ($value) {\n return $value === null;\n })\n ->all();\n }", "title": "" }, { "docid": "9e3e373c14cd80a754dfa8e25c7b05de", "score": "0.7281736", "text": "public static function attributeMap(): array;", "title": "" }, { "docid": "58633d454d594ee500f1b8fb947120d1", "score": "0.726721", "text": "public function getAttributes()\n {\n return array();\n }", "title": "" }, { "docid": "58633d454d594ee500f1b8fb947120d1", "score": "0.726721", "text": "public function getAttributes()\n {\n return array();\n }", "title": "" }, { "docid": "9c7902fe6af4c38e8d6bd3d8ac385055", "score": "0.7251764", "text": "public function toArray() {\n\t\treturn $this->_atts;\n\t}", "title": "" }, { "docid": "f68f585c5a56fc7642cd481603178c2e", "score": "0.7245793", "text": "public function toArray()\n {\n // TODO: Need to actually roll through the attributes & make sure that nested objects are converted\n return $this->attributes;\n }", "title": "" }, { "docid": "07dea06d1f532c1633f3116eb51dcae4", "score": "0.72131056", "text": "public function toArray() {\n $arr = array();\n\n if (is_array($this)) {\n foreach ($this as $value) {\n $arr[] = $this->toArray($value);\n }\n }\n if (is_object($this)) {\n $ardef = array();\n $arObj = (array) $this;\n foreach ($arObj as $key => $value) {\n $attribute = str_replace(get_class($this), \"\", $key);\n if (is_object($value) || is_array($value)) {\n $value = $this->toArray($value);\n }\n $arr[$attribute] = $value;\n }\n }\n return $arr;\n }", "title": "" }, { "docid": "0186d950b44310dfa04d2fb0990f0ae0", "score": "0.72060764", "text": "protected function getAttributes(): array\n {\n return $this->eavHelper->getAttributes($this->locator->getEntity(), $this->getAttributeSetId());\n }", "title": "" }, { "docid": "e578de0a38bfe94b210fb2861726b57e", "score": "0.7199274", "text": "public function getAttributes(): array\n {\n return $this->attrs;\n }", "title": "" }, { "docid": "34a5bc1853326fe74589908e1e0c7cdf", "score": "0.7193576", "text": "public function getAttributes(): array {\n return $this->attributes;\n }", "title": "" }, { "docid": "506e05603b9486857277f73f990d2a00", "score": "0.7181005", "text": "public function attributes(): array\n {\n return get_object_vars($this);\n }", "title": "" }, { "docid": "3cf59f84fa482ebac4bd1743ea2eee02", "score": "0.71681696", "text": "public function getAttributeList(): array\n {\n return [];\n }", "title": "" }, { "docid": "2353117ed283b6daae34602694165f47", "score": "0.71462876", "text": "public function attr(): array {}", "title": "" }, { "docid": "47f6f905a676b1c1a40b182888b8c79d", "score": "0.7143719", "text": "public function getAttributes(): array\n\t{\n\t\treturn $this->attributes;\n\t}", "title": "" }, { "docid": "3c25ad221235d603abc65644e8bfd20c", "score": "0.7134924", "text": "public function to_array()\n {\n $out = array();\n\n foreach ($this->attributes as $key => $value)\n {\n if ($this->attributes[$key] instanceof Basicmodel)\n {\n $out[$key] = $this->attributes[$key]->to_array();\n }\n\n else\n {\n $out[$key] = $value;\n }\n }\n\n return $out;\n }", "title": "" }, { "docid": "6b43e137975575009387132cd08dbb9f", "score": "0.7133958", "text": "public function getAttributes()\n\t{\n\t\t$this->_fetchAttributes();\n\t\t$attributes = [];\n\t\tforeach ($this->attributes as $key => $val) {\n\t\t\t$attributes[$key] = $this->getAttribute($key);\n\t\t}\n\t\treturn $attributes;\n\t}", "title": "" }, { "docid": "e9d4370e3a47cd77ac87cd95e85c360b", "score": "0.7130247", "text": "public function getAttrs(): array;", "title": "" }, { "docid": "b184b2456672352e5e08bdf743733d1c", "score": "0.71055675", "text": "public function attributesToArray()\n {\n $attributes = parent::attributesToArray();\n $schemaAttributes = $this->getJsonSchemaAttributes();\n foreach ($schemaAttributes as $attribute) {\n $value = array_get($attributes, $attribute, null);\n if (is_object($value)) {\n $attributes[$attribute] = json_decode(json_encode($attributes[$attribute]), true);\n }\n }\n return $attributes;\n }", "title": "" }, { "docid": "ff2a28f4157b9bdd41add4d8c3e6cc2d", "score": "0.7098401", "text": "public function attributesToArray()\n {\n $attributes = parent::attributesToArray();\n foreach ($this->getEncryptableList() as $key) {\n if (isset($attributes[$key])) {\n $attributes[$key] = $this->decryptAttribute($attributes[$key]);\n }\n }\n return $attributes;\n }", "title": "" }, { "docid": "b9adafcc0a5027376c675a3e5355dc1e", "score": "0.7079711", "text": "public function asArray(array $arrAttributes = array())\n {\n return array();\n }", "title": "" }, { "docid": "4da5d80ba22eb4f571d2620a8f762585", "score": "0.70786566", "text": "protected function getAttributes() {\n return $this->arr_Attribute;\n }", "title": "" }, { "docid": "0a3a11bf168af2d01f627e967adde7ba", "score": "0.70511997", "text": "public function attributes()\n {\n return [];\n }", "title": "" }, { "docid": "0a3a11bf168af2d01f627e967adde7ba", "score": "0.70511997", "text": "public function attributes()\n {\n return [];\n }", "title": "" }, { "docid": "0a3a11bf168af2d01f627e967adde7ba", "score": "0.70511997", "text": "public function attributes()\n {\n return [];\n }", "title": "" }, { "docid": "75eb5937366bc06c513ee2e7d1babd02", "score": "0.70321435", "text": "public function getListingAttributes(): array\n {\n return $this->collection($this->getAttributes())\n ->filter(fn (Attribute $attribute) => $attribute->getShowInAttributeListing())\n ->toArray();\n }", "title": "" }, { "docid": "db639028afa44b90c60dfac08497f4d0", "score": "0.7020337", "text": "public function getDefinedAttributes(): array;", "title": "" }, { "docid": "9297bdb870027e09488ad1407b370156", "score": "0.69995505", "text": "public function getAttributes(): array\n {\n $attributes = [\n 'name' => $this->name(),\n 'fields' => [$this, 'resolveFields'],\n ];\n\n return $attributes;\n }", "title": "" }, { "docid": "74a695d7b7561323d66bbe644ddf3117", "score": "0.69898236", "text": "public function toArray()\n {\n $copy = $this->attributes;\n foreach ($copy as $k => $v) {\n if (is_object($v) && method_exists($v, 'toArray')) {\n $copy[$k] = $v->toArray();\n }\n }\n\n return $copy;\n }", "title": "" }, { "docid": "ad9ea63e4736990920412fd1cae3698a", "score": "0.6955163", "text": "public function toArray()\n {\n $reflection = new \\ReflectionClass($this);\n $vars = array_keys($reflection->getdefaultProperties());\n\n $array = array();\n foreach ($vars as $attribute) {\n $getter = 'get'.ucfirst($attribute);\n if (method_exists($this, $getter)) {\n if (!is_object($this->$getter())) {\n $array[$attribute] = $this->$getter();\n } elseif (is_object($this->$getter())) {\n if (method_exists($this->$getter(), 'getId')) {\n $array[$attribute] = $this->$getter()->getId();\n } elseif ($this->$getter() instanceof \\DateTime) {\n $array[$attribute] = $this->$getter()->format('d-m-Y');\n } elseif ($this->$getter() instanceof \\Doctrine\\Common\\Collections\\Collection) {\n $collection = array();\n foreach ($this->$getter() as $item) {\n $collection[] = $item->getId();\n }\n $array[$attribute] = $collection;\n }\n }\n }\n }\n\n return $array;\n }", "title": "" }, { "docid": "c06c24ba213c212c41f26b947ef04d2e", "score": "0.69479924", "text": "public function getAttributes()\n {\n return [\n Attributes\\IdAttribute::make(),\n Attributes\\TextAttribute::make('year')\n ->setRequired(true)\n ->setDefault(function ($entity) {\n return '*';\n }),\n Attributes\\TextAttribute::make('month')\n ->setRequired(true)\n ->setDefault(function ($entity) {\n return '*';\n }),\n Attributes\\TextAttribute::make('day')\n ->setRequired(true)\n ->setDefault(function ($entity) {\n return '*';\n }),\n Attributes\\TextAttribute::make('weekday')\n ->setRequired(true)\n ->setDefault(function ($entity) {\n return '*';\n }),\n Attributes\\TextAttribute::make('start')\n ->setRequired(true),\n Attributes\\TextAttribute::make('end')\n ->setRequired(true),\n Attributes\\BooleanAttribute::make('aggregate')\n ->setDefault(function ($entity) {\n return 1;\n }),\n Attributes\\NumberAttribute::make('count')\n ->setDefault(function ($entity) {\n return 1;\n }),\n \\Amethyst\\Core\\Attributes\\DataNameAttribute::make('target_type')\n ->setRequired(true),\n Attributes\\MorphToAttribute::make('target_id')\n ->setRelationKey('target_type')\n ->setRelationName('target')\n ->setRelations(app('amethyst')->getDataManagers())\n ->setRequired(true),\n Attributes\\CreatedAtAttribute::make(),\n Attributes\\UpdatedAtAttribute::make(),\n Attributes\\DeletedAtAttribute::make(),\n ];\n }", "title": "" }, { "docid": "2f57c6f0c7db8bd4eb2ff70f161cdb3b", "score": "0.6943044", "text": "public function attributes(): array\n {\n return $this->collection->pluck('name')->toArray();\n }", "title": "" }, { "docid": "cb0fd6a57ee1e5be1558e6d7e71e7694", "score": "0.69320446", "text": "public function toArray($arrAttributes = array())\n {\n $arr = array();\n foreach ($this->_items as $k => $item) {\n $arr[$k] = $item->toArray($arrAttributes);\n }\n return $arr;\n }", "title": "" }, { "docid": "f501facb0b422198d1e163160d008c1f", "score": "0.6917941", "text": "public function getAttributes()\n {\n return [\n Attributes\\IdAttribute::make(),\n Attributes\\BelongsToAttribute::make('catalogue_id')\n ->setRelationName('catalogue')\n ->setRelationManager(CatalogueManager::class)\n ->setRequired(true),\n Attributes\\BelongsToAttribute::make('product_id')\n ->setRelationName('product')\n ->setRelationManager(ProductManager::class)\n ->setRequired(true),\n Attributes\\CreatedAtAttribute::make(),\n Attributes\\UpdatedAtAttribute::make(),\n Attributes\\DeletedAtAttribute::make(),\n ];\n }", "title": "" }, { "docid": "fd21001c0b5ad3bb1d616b3e8c9b6370", "score": "0.6907645", "text": "public function __toArray(array $arrAttributes = [])\n {\n if (empty($arrAttributes)) {\n return $this->_data;\n }\n $arrRes = [];\n foreach ($arrAttributes as $attribute) {\n if (isset($this->_data[$attribute])) {\n $arrRes[$attribute] = $this->_data[$attribute];\n } else {\n $arrRes[$attribute] = null;\n }\n }\n\n return $arrRes;\n }", "title": "" }, { "docid": "692859e90e936e11cb865b378ce06f7e", "score": "0.68947965", "text": "public function propsToArray( $attr = [] ): array\n {\n $result = get_object_vars( $this );\n\n return !$attr ? $result : array_intersect_key( $result, array_flip( $attr ) );\n }", "title": "" }, { "docid": "8fc7b56555f38918e06d76c041e6f8d3", "score": "0.68756366", "text": "public static function attributeMap(): array\n {\n return static::$attributeMap;\n }", "title": "" }, { "docid": "6772f513a39601147771eb830bcde27a", "score": "0.68723613", "text": "protected function getSafeAttributesArray()\n {\n return count($this->safeAttributes) == 0 ? array_keys($this->attributes) : $this->safeAttributes;\n // return $this->safeAttributes->count() == 0 ? $this->attributes->keys : $this->safeAttributes->toArray();\n }", "title": "" }, { "docid": "6aef5b2521844c516c17041b20b48eed", "score": "0.6871639", "text": "public function toArray()\n {\n $parameters = array();\n\n foreach ($this->getAttributes() as $attribute)\n {\n if (is_scalar($this->{$attribute}))\n {\n $parameters[$attribute] = $this->{$attribute};\n }\n else\n {\n $parameters[$attribute] = json_decode(\n json_encode($this->{$attribute}),\n true\n );\n }\n }\n\n return array(\n 'method' => static::getMethod(),\n 'parameters' => $parameters\n );\n }", "title": "" }, { "docid": "e6c1dac442534bf0c99fc0fc92e744e1", "score": "0.68575174", "text": "public function getAttributes() {\n $r= array();\n foreach ($this->attrs as $attr) $r[]= $attr->toSqlString();\n foreach ($this->relatives as $tjp) foreach ($tjp->getAttributes() as $attr) $r[]= $attr;\n return $r;\n }", "title": "" }, { "docid": "a6871b17910ea30387596031f118d2fe", "score": "0.68568605", "text": "public function attributesToArray()\n {\n $attributes = $this->getArrayableAttributes();\n\n // If an attribute is a date, we will cast it to a string after converting it\n // to a DateTime / Carbon instance. This is so we will get some consistent\n // formatting while accessing attributes vs. arraying / JSONing a model.\n foreach ($this->getDates() as $key) {\n if (! isset($attributes[$key])) {\n continue;\n }\n\n $attributes[$key] = $this->serializeDate(\n $this->asDateTime($attributes[$key])\n );\n }\n\n $mutatedAttributes = $this->getMutatedAttributes();\n\n // We want to spin through all the mutated attributes for this model and call\n // the mutator for the attribute. We cache off every mutated attributes so\n // we don't have to constantly check on attributes that actually change.\n foreach ($mutatedAttributes as $key) {\n if (! array_key_exists($key, $attributes)) {\n continue;\n }\n\n $attributes[$key] = $this->mutateAttributeForArray(\n $key, $attributes[$key]\n );\n }\n\n // Next we will handle any casts that have been setup for this model and cast\n // the values to their appropriate type. If the attribute has a mutator we\n // will not perform the cast on those attributes to avoid any confusion.\n foreach ($this->getCasts() as $key => $value) {\n if (! array_key_exists($key, $attributes) ||\n in_array($key, $mutatedAttributes)) {\n continue;\n }\n\n $attributes[$key] = $this->castAttribute(\n $key, $attributes[$key]\n );\n\n if ($attributes[$key] && ($value === 'date' || $value === 'datetime')) {\n $attributes[$key] = $this->serializeDate($attributes[$key]);\n }\n }\n\n // Here we will grab all of the appended, calculated attributes to this model\n // as these attributes are not really in the attributes array, but are run\n // when we need to array or JSON the model for convenience to the coder.\n foreach ($this->getArrayableAppends() as $key) {\n $attributes[$key] = $this->mutateAttributeForArray($key, null);\n }\n\n return $attributes;\n }", "title": "" }, { "docid": "0896c54b6744c9532f81f8f4c27413f7", "score": "0.6814776", "text": "public function toArray()\n {\n return $this->attributes ? $this->attributes : null;\n }", "title": "" }, { "docid": "f48088e9447bf2466a5764fb0c122912", "score": "0.6799802", "text": "function attributes()\n {\n $attributes = array();\n if ($items = $this->object->attributes()) {\n foreach ($items as $item) {\n $attributes[$item->name()] = $item->value();\n }\n }\n return $attributes;\n }", "title": "" }, { "docid": "8cbfadc623b00caac837c6a6056ea284", "score": "0.67893636", "text": "public function toArray()\n {\n return Helpers::arrayExcept($this->attributes, $this->hidden);\n }", "title": "" }, { "docid": "c08a0d219b210543057325a2eb7b27ee", "score": "0.6786434", "text": "public function toArray(array $arrAttributes = [])\n {\n return $this->__toArray($arrAttributes);\n }", "title": "" }, { "docid": "33817ee6e8b5057bc4030e5f7d7b453f", "score": "0.6772159", "text": "public static function attributeMap() : array\n {\n return self::$attributeMap;\n }", "title": "" }, { "docid": "33817ee6e8b5057bc4030e5f7d7b453f", "score": "0.6772159", "text": "public static function attributeMap() : array\n {\n return self::$attributeMap;\n }", "title": "" }, { "docid": "5df2d91a2d474c11f13cac5268313f07", "score": "0.6767318", "text": "public function getResourceAttributes(): array\n {\n $data = $this->getResource();\n\n return $data[\"attributes\"] ?? [];\n }", "title": "" }, { "docid": "97b0ed275fe3588ec91b0522325a2454", "score": "0.676526", "text": "public function toArray() {\n\t\t$attributes = array_map(array('Library\\Model','htmlClean'), $this->attributes);\n\t\treturn $attributes;\n\t}", "title": "" }, { "docid": "c1a193b565a9aacd9ae34b05b6ef5fbf", "score": "0.6759497", "text": "public function getArrayData(){\n\t $data = array();\n\t foreach($this as $atribute => $value){\n\t \tif(!is_array($value))\n\t \t$data[$atribute] = $value;\n\t }\n\t return $data;\n\t }", "title": "" }, { "docid": "71c7790e222322e6ca006aa158c378af", "score": "0.67590386", "text": "public static function attributeMap(): array\n {\n return self::$attributeMap;\n }", "title": "" }, { "docid": "c9d56ca60bcf60f4fa9d4e2392d76fe0", "score": "0.6753762", "text": "public function getAttributesForTable()\n {\n $attributes = [];\n foreach ($this->attributesToArray() as $key => $value) {\n if (in_array($key, $this->tableAttributes)) {\n $attributes[$key] = $value;\n }\n }\n return $attributes;\n }", "title": "" }, { "docid": "e228989840433b5a58b8eada994a99f2", "score": "0.6752729", "text": "public function attributesToArray() {\n $toReturn = parent::attributesToArray();\n $toReturn[YiiConcernModel::URI] = $this->uri;\n $toReturn[YiiConcernModel::RDF_TYPE] = $this->rdfType;\n \n return $toReturn;\n }", "title": "" }, { "docid": "13dd652704f4a888c5070953c9cca493", "score": "0.6750868", "text": "public function getAllAttributes()\n {\n return $this->getAttributes();\n }", "title": "" }, { "docid": "0ee836f744428b123e564ed53227c524", "score": "0.67501664", "text": "public function getAttributes()\n {\n return $this->getValue('attributes', []);\n }", "title": "" }, { "docid": "0b57b798d396fec2e92360a4e1515cfd", "score": "0.6746209", "text": "public function getAllAttributes();", "title": "" }, { "docid": "aec03dcecb9cdc6c2ebbcc86bb56f9a8", "score": "0.6736761", "text": "public function getGroupsOfAttributes(): array;", "title": "" }, { "docid": "86c006b5127defe2e9551b7af2625401", "score": "0.6733746", "text": "public function getAttributes(): array\n {\n $attributes = parent::getAttributes();\n $values = $this->getValues();\n\n $attributes['values'] = empty($values) ? null : $values;\n\n return $attributes;\n }", "title": "" }, { "docid": "7a426a94df178efff73e5d9e075ff564", "score": "0.67326164", "text": "public function export_attributes_data(): array {\n return [\n $this->build_attribute_name(),\n $this->build_attribute_db_type(),\n $this->build_attribute_db_name(),\n $this->build_attribute_db_host(),\n $this->build_attribute_db_collation(),\n $this->build_attribute_reg_users(),\n $this->build_attribute_active_users(),\n $this->build_attribute_no_courses(),\n $this->build_attribute_filedir(),\n $this->build_attribute_wwwroot(),\n $this->build_attribute_local_cache(),\n $this->build_attribute_course_backup(),\n $this->build_attribute_course_backup_specified_dir(),\n $this->build_attribute_search_enabled(),\n $this->build_attribute_auth_methods(),\n ];\n }", "title": "" }, { "docid": "67e9b913a38a3a2a701a33501d71b90d", "score": "0.67258507", "text": "public function getFilterableAttributes() : array;", "title": "" }, { "docid": "aec500119ca6cf4478859191284d0d6c", "score": "0.6707449", "text": "public function toArray()\n {\n return array_merge($this->model->toArray(), $this->attributesToArray());\n }", "title": "" }, { "docid": "04f78b7c9053d61186ec83c325b9d389", "score": "0.6696925", "text": "public function relationsToArray()\n {\n $attributes = [];\n\n foreach ($this->getArrayableRelations() as $key => $value) {\n // If the values implements the Arrayable interface we can just call this\n // toArray method on the instances which will convert both models and\n // collections to their proper array form and we'll set the values.\n if ($value instanceof Arrayable) {\n $relation = $value->toArray();\n }\n\n // If the value is null, we'll still go ahead and set it in this list of\n // attributes since null is used to represent empty relationships if\n // if it a has one or belongs to type relationships on the models.\n elseif (is_null($value)) {\n $relation = $value;\n }\n\n // If the relationships snake-casing is enabled, we will snake case this\n // key so that the relation attribute is snake cased in this returned\n // array to the developers, making this consistent with attributes.\n if (static::$snakeAttributes) {\n $key = Str::snake($key);\n }\n\n // If the relation value has been set, we will set it on this attributes\n // list for returning. If it was not arrayable or null, we'll not set\n // the value on the array because it is some type of invalid value.\n if (isset($relation) || is_null($value)) {\n $attributes[$key] = $relation;\n }\n\n unset($relation);\n }\n\n return $attributes;\n }", "title": "" }, { "docid": "04f78b7c9053d61186ec83c325b9d389", "score": "0.6696925", "text": "public function relationsToArray()\n {\n $attributes = [];\n\n foreach ($this->getArrayableRelations() as $key => $value) {\n // If the values implements the Arrayable interface we can just call this\n // toArray method on the instances which will convert both models and\n // collections to their proper array form and we'll set the values.\n if ($value instanceof Arrayable) {\n $relation = $value->toArray();\n }\n\n // If the value is null, we'll still go ahead and set it in this list of\n // attributes since null is used to represent empty relationships if\n // if it a has one or belongs to type relationships on the models.\n elseif (is_null($value)) {\n $relation = $value;\n }\n\n // If the relationships snake-casing is enabled, we will snake case this\n // key so that the relation attribute is snake cased in this returned\n // array to the developers, making this consistent with attributes.\n if (static::$snakeAttributes) {\n $key = Str::snake($key);\n }\n\n // If the relation value has been set, we will set it on this attributes\n // list for returning. If it was not arrayable or null, we'll not set\n // the value on the array because it is some type of invalid value.\n if (isset($relation) || is_null($value)) {\n $attributes[$key] = $relation;\n }\n\n unset($relation);\n }\n\n return $attributes;\n }", "title": "" }, { "docid": "3c6cb2de191739b219594ac6b37ca313", "score": "0.6686388", "text": "public function availableAttributes(): array\n {\n return $this->availableAttributes;\n }", "title": "" }, { "docid": "8cf8ff1331bdb0adcb7dd7ce121db6b9", "score": "0.6673819", "text": "public function attributes()\n {\n $attributes = [];\n foreach (static::$db_columns as $column) {\n if ($column == \"id\") {\n continue;\n }\n $attributes[$column] = $this->$column;\n }\n return $attributes;\n }", "title": "" }, { "docid": "3bcd4ef6d88499f8462c30c316428753", "score": "0.665975", "text": "function attributes()\n {\n $attributes = array();\n foreach ($this->object->attributes as $item) {\n $attributes[$item->name] = $item->value;\n }\n return $attributes;\n }", "title": "" }, { "docid": "a56debd7d4a339d9c076140d7f6fb23f", "score": "0.6656654", "text": "function attributeMap() {\n $attr = [];\n foreach (array_reverse($this->attributes) as $attr) {\n $attr += [$attr[1] => $attr[3]];\n }\n return $attr;\n }", "title": "" }, { "docid": "d5ca5b445873f44dca9e81fb3d1d4253", "score": "0.66477835", "text": "protected function get_attribute_array($includeID = true) {\n\t\t// return an array of attribute names and their values\n\t\t$attributes = array();\n\t\tforeach (static::$db_fields as $field) {\n\t\t\tif (property_exists($this, $field)) {\n\t\t\t\tif ($includeID == false && $field == \"id\") {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$attributes[$field] = $this->$field;\n\t\t\t}\n\t\t}\n\t\treturn $attributes;\n\t}", "title": "" }, { "docid": "783f3deb462aa6e0bda96fd5b9929df2", "score": "0.6640202", "text": "public function toArray()\n {\n $arr = array();\n foreach ($this as $key => $value) {\n $method = 'get' . $key;\n if (method_exists($this, $method)) {\n $arr[$key] = $this->$method();\n }\n }\n\n return $arr;\n }", "title": "" }, { "docid": "544ceaf98d58f330eb36e3488acaac99", "score": "0.6623128", "text": "public function toArray()\n {\n $attributes = parent::toArray();\n \n foreach ($this->getTranslatableAttributes() as $name) {\n $attributes[$name] = $this->getTranslation($name, app()->getLocale());\n }\n \n return $attributes;\n }", "title": "" }, { "docid": "cfb6ca48cd555618e4d7df27c52d8491", "score": "0.66120905", "text": "public function all_attributes()\n\t{\n\t\treturn array_keys( $this->data );\n\t}", "title": "" }, { "docid": "d96046e8e748f2ef0a79f4038c8d6098", "score": "0.6601939", "text": "public function getAttributes() : iterable\n {\n return $this->attributes;\n }", "title": "" } ]
86113dd297014b91b5a475188fa4e3c7
Rename an item in the storage service to a given name.
[ { "docid": "5d7b8b912ea2b3c8e07a180de50c8e86", "score": "0.63348967", "text": "public function renameItem($path, $name, $options = null)\n {\n return $this->moveItem($path, $name, $options);\n }", "title": "" } ]
[ { "docid": "937eeafacaea8866519c8998f3c4f8d6", "score": "0.7088706", "text": "public function renameItem($path, $name, $options = null)\n {\n require_once 'Zend/Cloud/OperationNotAvailableException.php';\n throw new Zend_Cloud_OperationNotAvailableException('Rename not implemented');\n }", "title": "" }, { "docid": "70be81d42b1a2fef5e9925df6f24909d", "score": "0.70226353", "text": "public function setItemName(string $name);", "title": "" }, { "docid": "90ced307c58ff028bca0169c31fd0033", "score": "0.64916766", "text": "public function rename($newName) {\n\t\t\tsearchEngine::deleteSong($this->Row->id);\n\n\t\t\t// Update name\n\t\t\tself::update('SongName', $newName);\n\n\t\t\t// Add newName to live search\n\t\t\tsearchEngine::addSong($this->Row->id);\n\t\t\t\t\n\t\t\t}", "title": "" }, { "docid": "0507a96af47802e622c95d74e74dc5c6", "score": "0.61473745", "text": "public function releaseItem(string $name);", "title": "" }, { "docid": "7545fbf3a96dec071f4c4b9acf4d6eda", "score": "0.6130177", "text": "public function renameAccount($oldname, $newname);", "title": "" }, { "docid": "5d5eb8dbed362d7d821248506e113840", "score": "0.6097481", "text": "public static function renameItem($arguments) {\n\t\t$oldSource = \"/\".OC_User::getUser().\"/files\".$arguments['oldpath'];\n\t\t$oldSource = self::cleanPath($oldSource);\n\t\t$newSource = \"/\".OC_User::getUser().\"/files\".$arguments['newpath'];\n\t\t$newSource = self::cleanPath($newSource);\n\t\tself::setSource($oldSource, $newSource);\n\t}", "title": "" }, { "docid": "eb4a28bdce56d71b259195c6471cffb1", "score": "0.6070944", "text": "abstract public function rename($strOldName, $strNewName);", "title": "" }, { "docid": "ee9f88746f0ac515a244b8de7020f23c", "score": "0.6025754", "text": "public function storageboxnameUpdate($id, $name)\n {\n $url = $this->baseUrl . '/storagebox/' . $id;\n\n return $this->post($url, array('storagebox_name' => $name));\n }", "title": "" }, { "docid": "03a897c0e249b8abdd3db07f4d76741a", "score": "0.59927773", "text": "private function _updateGivenNameCartItem($item)\n {\n return $this->_updateGivenNameOfCurrentCartItemToCart($item);\n }", "title": "" }, { "docid": "e7cf5431bd593822109f36db51d150f9", "score": "0.59157825", "text": "public static function UpdateItemName( $db_name, $__id__, $ItemName, $NewItemName )\r\n\t{\r\n\t\t$get = self::GetItem( $db_name, $__id__, $ItemName, FALSE );\r\n\t\tif (!isset($get->$ItemName)){return null;}\r\n\t\t$Content = $get->$ItemName;\r\n\t\t##########################\r\n\t\tDELETE::Item( $db_name, $__id__, $ItemName );\r\n\t\tself::InsertData( $db_name, $__id__, $NewItemName, $Content);\r\n\t}", "title": "" }, { "docid": "e7cf5431bd593822109f36db51d150f9", "score": "0.59157825", "text": "public static function UpdateItemName( $db_name, $__id__, $ItemName, $NewItemName )\r\n\t{\r\n\t\t$get = self::GetItem( $db_name, $__id__, $ItemName, FALSE );\r\n\t\tif (!isset($get->$ItemName)){return null;}\r\n\t\t$Content = $get->$ItemName;\r\n\t\t##########################\r\n\t\tDELETE::Item( $db_name, $__id__, $ItemName );\r\n\t\tself::InsertData( $db_name, $__id__, $NewItemName, $Content);\r\n\t}", "title": "" }, { "docid": "b31186f3eb1ed460c0b3ac761fb6fb8f", "score": "0.5908668", "text": "public function update(string $name, ItemInterface $item): void;", "title": "" }, { "docid": "2e747dde52ac702ef7e648f385f5776e", "score": "0.5834584", "text": "public function renameName(\n #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,\n #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $new_name\n ) {}", "title": "" }, { "docid": "57cd5358753d5a22873d125f21d833aa", "score": "0.58284885", "text": "public function rename($newName)\n {\n if ($this->storage->renameKey($this->key, $newName)) {\n $event = new StorageEvent($this);\n\n $event->oldName = $this->key;\n $this->key = $newName;\n $this->eventManager()->fire(StorageEvent::FILE_RENAMED, $event);\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "fc094b97085b7c83848977dfef075ae8", "score": "0.58052087", "text": "public function rename(string $old_name, string $new_name): Redis|bool;", "title": "" }, { "docid": "e9c670d68f5aee726fdd85177af5da97", "score": "0.57701296", "text": "public function setItemName($value)\n {\n $this->_fields['ItemName']['FieldValue'] = $value;\n return $this;\n }", "title": "" }, { "docid": "42024d71f0712319819cb2ff43197468", "score": "0.5756223", "text": "public function rename( $name ) {\n $this->name = $name;\n\n return $this;\n }", "title": "" }, { "docid": "5d0bd1b9a63a99b4b1094ea00601d597", "score": "0.5728604", "text": "public function rename($path, $newpath)\n {\n }", "title": "" }, { "docid": "7c98cd4b79ae9ce3ba130e6007340269", "score": "0.5723298", "text": "public function setItemListName(string $name);", "title": "" }, { "docid": "36b7c01121c738251282939ad27232d8", "score": "0.5721357", "text": "public function setItemName($value)\n {\n return $this->setParameter('itemName', $value);\n }", "title": "" }, { "docid": "235c8a0a7162df84fbfbb1da32ab94b0", "score": "0.57161856", "text": "function rename( $id, $newname )\n {\n if( !$id || !is_numeric( $id ) ) return;\n if( !trim( $newname ) ) return $id;\n\n $sql = \"UPDATE\n \".$this->table.\"\n SET\n name = '\". addslashes( trim( $newname ) ). \"'\n WHERE \n id = $id\";\n $this->dba->exec( $sql );\n }", "title": "" }, { "docid": "ecce738748bd2a329afb81d975b38686", "score": "0.57013345", "text": "public function setName($newName) {\r\n\t\t$this->name = $newName;\r\n\t}", "title": "" }, { "docid": "d3ccaae0ff69b193ad4413dd4f4c29d5", "score": "0.56560475", "text": "public function testInventoryItemNameUpdate()\n {\n $user = User::all()->random();\n\n $this->actingAs($user, 'api')\n ->patch(\"api/inventoryitem/1\", [\n 'name' => 'Anderes Buch',\n ]);\n $this->seeStatusCode(200);\n }", "title": "" }, { "docid": "510bb56424c7e2ab02e7a27a5b0d6cf6", "score": "0.5645825", "text": "public function renameMailbox(string $oldName, string $newName): void\n {\n Imap::renamemailbox($this->getImapStream(), $this->getCombinedPath($oldName), $this->getCombinedPath($newName));\n }", "title": "" }, { "docid": "412f0f9ddac2f1820b5d977d6cae08df", "score": "0.5644099", "text": "function setName($new_name)\n {\n $this->name = (string) $new_name;\n }", "title": "" }, { "docid": "0f65d660b87387d9e26ec45f375ad99d", "score": "0.56353235", "text": "public function removeItem(string $name);", "title": "" }, { "docid": "66bf6960696efc0c5740ac992d4610d9", "score": "0.56336486", "text": "function setName($new_name)\n {\n $this->name = $new_name;\n }", "title": "" }, { "docid": "63daf76fcd3d847c1a13e297b551932f", "score": "0.56297576", "text": "public function setBackupName($entity, $name, AMI_iStorage $oStorage = null);", "title": "" }, { "docid": "aded0fc59346196db61e5cd77d606bb4", "score": "0.5590079", "text": "public function setName($name)\n {\n $this->_name = (string) $name;\n }", "title": "" }, { "docid": "aded0fc59346196db61e5cd77d606bb4", "score": "0.5590079", "text": "public function setName($name)\n {\n $this->_name = (string) $name;\n }", "title": "" }, { "docid": "56ec272b7d8de90c8d3ee5dc6fcc4fcd", "score": "0.5573161", "text": "public function changeName(){\n $this->autoRender = false;\n \n $dir = $this->request->data('dir');\n $file = $this->request->data('file');\n $newName = $this->request->data('name');\n \n rename($dir.$file, $dir.$newName);\n }", "title": "" }, { "docid": "a22882bdac08e1ce47f80799bb1f7325", "score": "0.5573112", "text": "public function setItem($item_name, $item) {\n $_SESSION[$item_name] = $item;\n }", "title": "" }, { "docid": "d6a5412671ff68b0d4e2527d3033c105", "score": "0.5509361", "text": "public function setName(string $name);", "title": "" }, { "docid": "d6a5412671ff68b0d4e2527d3033c105", "score": "0.5509361", "text": "public function setName(string $name);", "title": "" }, { "docid": "4c0b8166c2e3d93c5fcba5f9cc2c9d05", "score": "0.54974467", "text": "function setName($name)\n\t{\n\t\tif($name != $this->name)\n\t\t{\n\t\t\t$this->_modified = true;\n\t\t\t$this->name = $name;\n\t\t}\n\t}", "title": "" }, { "docid": "7c86df827ca937040ee0368be8f397c9", "score": "0.54972416", "text": "private function setName($name) {\n $this->name = (string) $name;\n }", "title": "" }, { "docid": "095668a0272482cee1701104e7cbb640", "score": "0.54960066", "text": "public function renameDir($item)\n {\n $oldDir = Article::$path . $item;\n $newDir = Article::$path . $this->title;\n Directories::renameDir($oldDir,$newDir);\n }", "title": "" }, { "docid": "c2a57ad95a0e90f176f83529c85e71bc", "score": "0.549141", "text": "public function setName($name)\n\t{\n\t\t$this->getJson()->name = $name;\n\t}", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.5487098", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.5487098", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.5487098", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.5487098", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.5487098", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.5487098", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.5487098", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.5487098", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.5487098", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.5487098", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.5487098", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.5487098", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.5487098", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.5487098", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.5487098", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.5487098", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.5487098", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.5487098", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.5487098", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.5487098", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.5487098", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.5487098", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.5487098", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.5487098", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.5487098", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.5487098", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.5487098", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.5487098", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.5487098", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.5487098", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.5487098", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.5487098", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.5487098", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.5487098", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.5487098", "text": "public function setName($name);", "title": "" }, { "docid": "5e4599097c74672e7a20a21e339d9db8", "score": "0.5483625", "text": "public function setName($name)\n {\n if ($this->isPublished()) {\n throw new RuntimeException(self::ERR_ALREADY_PUBLISHED);\n }\n\n $this->name = substr($name, 0, 255);\n }", "title": "" }, { "docid": "4ded9ea39de355513cde6c9c5a80bd32", "score": "0.54805446", "text": "public function rename($oldname, $newname) {\n\t\t$this->gftp->rename($oldname, $newname);\n\t}", "title": "" }, { "docid": "64979a80bdfe7d15bb48b01dee377fee", "score": "0.5479248", "text": "public function setName(string $name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "64979a80bdfe7d15bb48b01dee377fee", "score": "0.5479248", "text": "public function setName(string $name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "64979a80bdfe7d15bb48b01dee377fee", "score": "0.5479248", "text": "public function setName(string $name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "f02afb9402c8ae3126837102026cb4ac", "score": "0.5474194", "text": "function set_name($new_name){\n $this->name = $new_name;\n }", "title": "" }, { "docid": "bb61d73ce252f5ad607c1020c0b38941", "score": "0.545823", "text": "public function setName($name)\r\n {\r\n parent::_throwIfNotIsString($name);\r\n $this->_name = $name;\r\n }", "title": "" }, { "docid": "f49d1b9b9d7a10e46c2137d3d7e18a44", "score": "0.5457937", "text": "public function rename($oldname, $newname) {\n\t\t$gateway = $this->getGateway(true);\n\t\t$result = $gateway->rename($oldname, $newname);\n\t\tif ($result === false) {\n\t\t\tthrow new ConnectionException(sprintf('Unable to renamce \"%s\" to \"%s\": %s', $oldname, $newname, $gateway->getLastSFTPError()));\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "c6500070f3b5f14f07139c91c505ec53", "score": "0.54416573", "text": "private function RenameValue(ListViewItem $item, string $newname){\r\n //Technically the same situation as key rename, but copying is quite easy\r\n try{//Open key\r\n $key=$this->getRegistryKey($this->tvwRegistry->SelectedNode->FullPath,true);\r\n }catch(System:::Exception $ex){\r\n self::OnError($ex->Message);\r\n return false;\r\n }\r\n try{//Chekck existence of newname-named value\r\n $key->GetValueKind($newname);\r\n self::OnError(Program::$Resources->e_Rename($item->Text,$newname));\r\n return false;\r\n }catch(System:::IO:::IOException $ex){}//If thrown it does not exist\r\n try{//Set new value\r\n $key->SetValue($newname,\r\n $key->GetValue($item->Name,null,RegistryValueOptions::DoNotExpandEnvironmentNames),\r\n $key->GetValueKind($item->Name));\r\n }catch(System:::Exception $ex){\r\n self::OnError($ex->Message);\r\n return false;\r\n }\r\n try{//Delete old value\r\n $key->DeleteValue($item->Name);\r\n }catch(System:::Exception $ex){\r\n //Failed of delete (inprobable when we were allowed to create one). Let user see both\r\n $this->LoadValues($key);\r\n foreach($this->lvwRegistry->Items as $item2):\r\n $item2->Selected = ($item2->Name == $newname or $item2->Name == $item->Name);\r\n endforeach;\r\n return true;\r\n } \r\n //Do the rename\r\n $item->Name=$newname;\r\n $item->Text=$newname;#is that necessary?\r\n return true;\r\n }", "title": "" }, { "docid": "98bcdd0c730ecdf25e325b4d743f3b25", "score": "0.5437896", "text": "public function setName($name)\n {\n $this->_name = $name;\n }", "title": "" }, { "docid": "98bcdd0c730ecdf25e325b4d743f3b25", "score": "0.5437896", "text": "public function setName($name)\n {\n $this->_name = $name;\n }", "title": "" }, { "docid": "0b44e8b50c48f55da534c9082e593dd6", "score": "0.54283607", "text": "public function rename($name, $to)\n {\n $this->renameFrom = $name;\n $this->renameTo = (new SeedGroup($to, $this->baseSeedFolder))->name();\n $this->originalFolder = $this->absoluteBaseFolder . $this->renameFrom . '/';\n\n $this->renameFiles()\n ->updateReferences()\n ->renameDirectory()\n ->dumpAutoload();\n }", "title": "" }, { "docid": "d432445e96476671ba2b9ea2c9fbccde", "score": "0.54277647", "text": "public function setName($name)\r\n {\r\n $this->_name = $name;\r\n }", "title": "" }, { "docid": "594bf0e6aaadfb00dc9b0e1751f45bb5", "score": "0.5421156", "text": "public function setName(string $name){\n $this->name = $name;\n }", "title": "" }, { "docid": "355443e2257b7942d43d04a5f132e44b", "score": "0.53988135", "text": "public function setName($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "355443e2257b7942d43d04a5f132e44b", "score": "0.53988135", "text": "public function setName($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "355443e2257b7942d43d04a5f132e44b", "score": "0.53988135", "text": "public function setName($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "355443e2257b7942d43d04a5f132e44b", "score": "0.53988135", "text": "public function setName($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "355443e2257b7942d43d04a5f132e44b", "score": "0.53988135", "text": "public function setName($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "355443e2257b7942d43d04a5f132e44b", "score": "0.53988135", "text": "public function setName($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "355443e2257b7942d43d04a5f132e44b", "score": "0.53988135", "text": "public function setName($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "355443e2257b7942d43d04a5f132e44b", "score": "0.53988135", "text": "public function setName($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "355443e2257b7942d43d04a5f132e44b", "score": "0.53988135", "text": "public function setName($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "355443e2257b7942d43d04a5f132e44b", "score": "0.53988135", "text": "public function setName($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "355443e2257b7942d43d04a5f132e44b", "score": "0.53988135", "text": "public function setName($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "355443e2257b7942d43d04a5f132e44b", "score": "0.53988135", "text": "public function setName($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "355443e2257b7942d43d04a5f132e44b", "score": "0.53988135", "text": "public function setName($name)\n {\n $this->name = $name;\n }", "title": "" } ]
ac5bbbb3affc82fa0c07b93a5e2fd0c1
get the pager html
[ { "docid": "97e670952cf78a478aa9fc23a1997fed", "score": "0.7999187", "text": "public function getPagerHtml(){\r\n return $this->getChildHtml('pager');\r\n }", "title": "" } ]
[ { "docid": "13aeee75ff0666a24972216280e7504d", "score": "0.7785111", "text": "public function getPagerHtml()\n {\n return $this->getChildHtml('pager');\n }", "title": "" }, { "docid": "f4a2ecc91bc3c29cdc03ce3770347214", "score": "0.7783605", "text": "public function getPagerHtml() {\n return $this->getChildHtml ( 'pager' );\n }", "title": "" }, { "docid": "b3c0b76991caf9197b7492609a6e06f8", "score": "0.75658226", "text": "public function getPaginationHtml()\n {\n return (null === $this->pager) ? '' : $this->pager->getHtml();\n }", "title": "" }, { "docid": "779646b7ca008488d126493029a6dbbd", "score": "0.74585617", "text": "public function getPaginationHtml()\n {\n $html = '';\n if(null !== $this->pager)\n {\n $html = $this->pager->getHtml();\n }\n\n return $html;\n }", "title": "" }, { "docid": "b50c580e78d038235684550467fa73fd", "score": "0.6962667", "text": "public function getPagerHtml()\n {\n /** @var \\Magento\\Theme\\Block\\Html\\Pager $pagerBlock */\n $pagerBlock = $this->getChildBlock('sales_order_item_pager');\n return $pagerBlock ? $pagerBlock->toHtml() : '';\n }", "title": "" }, { "docid": "851f010522b2de6a8678802c36925713", "score": "0.6631654", "text": "public function getPager(){\n \n return $this->pager;\n \n }", "title": "" }, { "docid": "e5765239f20dd93dfa36ffed9083613a", "score": "0.6613091", "text": "public function getPage();", "title": "" }, { "docid": "e5765239f20dd93dfa36ffed9083613a", "score": "0.6613091", "text": "public function getPage();", "title": "" }, { "docid": "9197c168b11275e4f7380cb514c5b93d", "score": "0.6611766", "text": "public function render()\n {\n //$links = $this->links->links();\n return view('lwcrud::components.lw-pager');\n }", "title": "" }, { "docid": "22c69c00c1f0fa34d2456db0120228a5", "score": "0.6604165", "text": "public function pager() : Pager\n {\n return $this->pager;\n }", "title": "" }, { "docid": "9275282e64bfa87932b8521ff3509c72", "score": "0.6529735", "text": "private function createPager()\n {\n\n $pages = ceil($this->data['count'] / $this->search->limit);\n $pager = '<ul class=\"pager\">';\n if (!isset($_GET['page']) || (isset($_GET['page']) && $_GET['page'] == 1)) {\n $pager .= '<li class=\"previous disabled\"><a href=\"javascript:void(0)\">« « Предыдущая страница</a></li>';\n } else {\n $pager .= '<li class=\"previous\"><a href=\"'.$this->createPagerUrl($_GET['page'] - 1).'\">« « Предыдущая страница</a></li>';\n }\n for ($i = 1; $i <= $pages; $i++) {\n if ((isset($_GET['page']) && $_GET['page'] == $i) || (!isset($_GET['page']) && $i == 1)) {\n $pager .= '<li><span style=\"background: #ddd\">'.$i.'</span></li>';\n } else {\n $pager .= '<li><a href=\"'.$this->createPagerUrl($i).'\">'.$i.'</a></li>';\n }\n }\n if ((isset($_GET['page']) && $_GET['page'] == $pages) || $pages == 1) {\n $pager .= '<li class=\"next disabled\"><a href=\"javascript:void(0)\">Следующая страница » »</a></li>';\n } else {\n if (!isset($_GET['page'])) {\n $pager .= '<li class=\"next\"><a href=\"'.$this->createPagerUrl(2).'\">Следующая страница » »</a></li>';\n } else {\n $pager .= '<li class=\"next\"><a href=\"'.$this->createPagerUrl($_GET['page'] + 1).'\">Следующая страница » »</a></li>';\n }\n }\n $pager .= '</ul>';\n return $pager;\n\n }", "title": "" }, { "docid": "5e6c0af6ba8f45422b560a2b58d3b3ab", "score": "0.64884055", "text": "public function getPage()\n {\n return \"\";\n }", "title": "" }, { "docid": "d9fceb271a3cb52f7b998178a36fc5fd", "score": "0.64631456", "text": "public function toHtml(): string {\n if ( $this->num_pages <= 1 ) {\n return '';\n }\n\n $html = '<ul class=\"pagination\">';\n\n if ( $this->getPrevUrl() ) {\n $html .= '<li class=\"page-item\"><a href=\"' . htmlspecialchars( $this->getPrevUrl() ) . '\" class=\"page-link\"><i class=\"fas fa-chevron-left\" aria-hidden=\"true\"></i></a></li>';\n }\n\n foreach ( $this->getPages() as $page ) {\n if ( $page['url'] ) {\n $html .= '<li class=\"page-item' . ( $page['isCurrent'] ? ' active' : '' ) . '\"><a href=\"' . htmlspecialchars( $page['url'] ) . '\" class=\"page-link\">' . htmlspecialchars( $page['num'] ) . '</a></li>';\n } else {\n $html .= '<li class=\"page-item disabled\"><a href=\"#\" class=\"page-link\">' . htmlspecialchars( $page['num'] ) . '</a></li>';\n }\n }\n\n if ( $this->getNextUrl() ) {\n $html .= '<li class=\"page-item\"><a href=\"' . htmlspecialchars( $this->getNextUrl() ) . '\" class=\"page-link\"><i class=\"fas fa-chevron-right\" aria-hidden=\"true\"></i></a></li>';\n }\n\n $html .= '</ul>';\n\n return $html;\n }", "title": "" }, { "docid": "6c135b2c7f82c43628c48a49666beb6c", "score": "0.6414449", "text": "function get_HTML(){\n\t\techo \"<div class='pageSummaryContiner'>\";\n\t\tforeach($this->plants as $key => $value){\n\t\t\t$value->get_HTML();\n\t\t}\n\t\techo \"</div>\";\n\t}", "title": "" }, { "docid": "5e58e6cd7d748882bf3666d07a3fccda", "score": "0.6391896", "text": "public static function pager($className = 'wide', $txtPrev = 'Anterior', $txtNext = 'Siguiente') \n {\n return '<div class=\"pager '.$className.'\">\n <div class=\"prev\">\n <a href=\"#\" class=\"btnPrev\"><span class=\"icon\"><img src=\"'.Url::to('@web/img/Back.png').'\"></span> '.$txtPrev.'</a>\n </div>\n \n <div class=\"next\">\n <a href=\"#\" class=\"btnNext\">'.$txtNext.' <span class=\"icon\"><img src=\"'.Url::to('@web/img/Next.png').'\"></span></a>\n </div>\n </div>';\n }", "title": "" }, { "docid": "653acec1c019296c6780fda23f801f23", "score": "0.63089174", "text": "public function get_result_page() {\n\n global $wp_query;\n\n $pagination = new WM_Pagination();\n\n $html = $pagination->get_top();\n\n $counter = 1;\n\n foreach ( $wp_query->posts as $post ) {\n\n setup_postdata( $post );\n\n $html .= $this->get_post_summary_html( $post, $counter++ );\n }\n\n $html .= $pagination->get_bottom();\n\n return $html;\n }", "title": "" }, { "docid": "d402ae8c5ee66477c5e236ab3f691be8", "score": "0.62652576", "text": "private function displayPager()\n {\n $pager = ($this->maxPage > 9) ? $this->createFullPages() : $this->createSimplePages();\n echo '<div class=\"pager\">';\n $this->displayLeftSide();\n for ($i = 0; $i < count($pager); $i++) {\n echo $pager[$i];\n }\n $this->displayRightSide();\n echo \"</div>\";\n }", "title": "" }, { "docid": "06eb96a7151f02b96b546846dad082c8", "score": "0.62528044", "text": "function pages(){\n\t\t$ret \t= \"\";\n\t\t$start \t= 1; \n\t\tif($this->page + $this->offset > $this->max_page){\n\t\t\t$offset_val = $this->max_page;\n\t\t}\n\t\telse{\n\t\t\t$offset_val = ($this->page + $this->offset)-1;\n\t\t\t$start = $this->page;\n\t\t}\n\t\tfor($i = $start; $i <= $offset_val; $i++){\n\t\t\tif($i == $this->page){\n\t\t\t\t$ret .= \"<span class=\\\"pagingBoxSel\\\">\" . $i . \"</span>\\n\";\n\t\t\t}else{\n\t\t\t\t$ret .= \"<a class=\\\"page\\\" href=\\\"\" . $this->links . \"page=\" . $i . \"\\\"><span class=\\\"pagingBox\\\">\" . $i . \"</span></a>\\n\";\n\t\t\t}\n\t\t}\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "813694af6873d471153964a6a979d1fd", "score": "0.62432134", "text": "public function render()\n\t{\n\t\treturn $this->view('components.pagination');\n\t}", "title": "" }, { "docid": "9627f4032ddb16ae33e08eefa002a8cf", "score": "0.6243", "text": "public function gePager()\n {\n $page = $this->getPage();\n $ipp = $this->getItemsPerPage();\n\n $this->total_pages = ceil($this->total_items / $ipp);\n\n $pages = array();\n\n if ($this->total_pages <= $this->pager_positions) {\n for ($i = 1; $i <= $this->total_pages; ++$i) {\n $pages[$i - 1] = $i;\n }\n } else {\n for ($i = 1; $i <= $this->pager_positions; ++$i) {\n if ($page < ceil($this->pager_positions / 2)) {\n if ($i == $this->pager_positions - 1) {\n $pages[$i - 1] = $this->filler_char;\n } elseif ($i == $this->pager_positions) {\n $pages[$i - 1] = $this->total_pages;\n } else {\n $pages[$i - 1] = $i;\n }\n } elseif ($page > ($this->total_pages - ($this->pager_positions / 2)) + 2) {\n if ($i == 1) {\n $pages[$i - 1] = '1';\n } elseif ($i == $this->filler_position) {\n $pages[$i - 1] = $this->filler_char;\n } else {\n $pages[$i - 1] = ($this->total_pages - $this->pager_positions + $i);\n }\n } else {\n if ($i == 1) {\n $pages[$i - 1] = '1';\n } elseif ($i == $this->pager_positions) {\n $pages[$i - 1] = $this->total_pages;\n } elseif ($i == $this->filler_position || $i == $this->pager_positions - 1) {\n $pages[$i - 1] = $this->filler_char;\n } else {\n $pages[$i - 1] = ceil($page - $this->pager_positions / 2 + $i - 1);\n }\n }\n }\n }\n\n $offset = (($page - 1) * $ipp) + 1;\n\n return array(\n 'pages' => $pages,\n 'page' => $page,\n 'total_pages' => $this->total_pages,\n 'total_items' => $this->total_items,\n 'items' => $ipp,\n 'is_first_page' => ($page == 1),\n 'is_last_page' => ($page >= $this->total_pages),\n 'prev_page' => $page - 1,\n 'next_page' => $page + 1,\n 'offset' => $offset,\n 'offset_end' => $offset + ($ipp - 1)\n );\n }", "title": "" }, { "docid": "d8e563a037324a5df753a3ea73c8e2ab", "score": "0.61572397", "text": "public function getPager()\n {\n return $this->_model->getPager();\n }", "title": "" }, { "docid": "4a1f4f71f97760e2459e33e5c1ecbfe4", "score": "0.6142255", "text": "public function create_html() {\r\n\r\n $max_page = $this->max_page = $this->max_page();\r\n\r\n if (!$max_page)\r\n return \"\";\r\n\r\n $visible_page_start = max(\r\n 1,\r\n min($this->current_page,$max_page) - $this->hidden_page_padding\r\n );\r\n\r\n $visible_page_end = min(\r\n $max_page,\r\n $this->current_page + $this->hidden_page_padding\r\n );\r\n\r\n $visible_pages = array_merge(array(1),range($visible_page_start,$visible_page_end),array($max_page));\r\n\r\n $visible_pages = array_unique($visible_pages);\r\n\r\n\r\n $visible_page_urls = array();\r\n\r\n foreach ($visible_pages as $pagex) {\r\n\r\n $visible_page_urls[$pagex] = $this->page_url($pagex);\r\n\r\n }\r\n\r\n #var_dump($visible_page_urls,$visible_pages);\r\n\r\n $view = new add_smarty();\r\n $view -> assign('visible_page_urls',$visible_page_urls);\r\n $view -> assign('current_page',$this->current_page);\r\n $view -> assign('pagination',$this);\r\n #var_dump($view -> fetch('includes/pagination.tpl'));\r\n $this->append($view -> fetch('includes/pagination.tpl'));\r\n\r\n }", "title": "" }, { "docid": "d74820abd4a53514e266924b86431a2a", "score": "0.61343384", "text": "public function pager($limit = 10, $element = NULL);", "title": "" }, { "docid": "5ed7aae73800c1ebed114508e5986305", "score": "0.61311555", "text": "public function getPage() {\n\n\t\t$this->main = $this->makeMain($this->main);\n\n\t\treturn \t$this->pageStart.\n\t\t\t\t$this->header.\n\t\t\t\t$this->main.\n\t\t\t\t$this->footer.\n\t\t\t\t$this->pageEnd; \n\t}", "title": "" }, { "docid": "07a1079fcbd62aec273287daf99cd8bb", "score": "0.612424", "text": "function page_html(){\n\t\tfor ($i=0;$i<count($this->blocco);$i++) $this->body.=$this->blocco_html($i);\n\t\treturn \"<div class=\\\"xmr_contenuto\\\">\".$this->body.\"</div>\";\n\t}", "title": "" }, { "docid": "21e940120f2e66b0d909b48324292130", "score": "0.61127985", "text": "private function pagerElements() {\n $this->totalelements = $this->result[BrpProps::FEEDBACK_PAGE][BrpProps::FEEDBACK_PAGE_TOTALELEMENTS];\n $this->totalpages = $this->result[BrpProps::FEEDBACK_PAGE][BrpProps::FEEDBACK_PAGE_TOTALPAGES];\n }", "title": "" }, { "docid": "2127a0d37396e6e3824b303b719d8130", "score": "0.6103925", "text": "function gll20_devel_pager($tags = array(), $limit = 10, $element = 0, $parameters = array(), $quantity = 9) {\n global $pager_page_array, $pager_total;\n\n // Calculate various markers within this pager piece:\n // Middle is used to \"center\" pages around the current page.\n $pager_middle = ceil($quantity / 2);\n // current is the page we are currently paged to\n $pager_current = $pager_page_array[$element] + 1;\n // first is the first page listed by this pager piece (re quantity)\n $pager_first = $pager_current - $pager_middle + 1;\n // last is the last page listed by this pager piece (re quantity)\n $pager_last = $pager_current + $quantity - $pager_middle;\n // max is the maximum page number\n $pager_max = $pager_total[$element];\n // End of marker calculations.\n\n // Prepare for generation loop.\n $i = $pager_first;\n if ($pager_last > $pager_max) {\n // Adjust \"center\" if at end of query.\n $i = $i + ($pager_max - $pager_last);\n $pager_last = $pager_max;\n }\n if ($i <= 0) {\n // Adjust \"center\" if at start of query.\n $pager_last = $pager_last + (1 - $i);\n $i = 1;\n }\n // End of generation loop preparation.\n\n $li_first = theme('pager_first', (isset($tags[0]) ? $tags[0] : t('« first')), $limit, $element, $parameters);\n $li_previous = theme('pager_previous', (isset($tags[1]) ? $tags[1] : '<<'), $limit, $element, 1, $parameters);\n $li_next = theme('pager_next', (isset($tags[3]) ? $tags[3] : '>>'), $limit, $element, 1, $parameters);\n $li_last = theme('pager_last', (isset($tags[4]) ? $tags[4] : t('last »')), $limit, $element, $parameters);\n\n if ($pager_total[$element] > 1) {\n if ($li_first) {\n $items[] = array(\n 'class' => 'pager-first',\n 'data' => $li_first,\n );\n }\n if ($li_previous) {\n $items[] = array(\n 'class' => 'pager-previous',\n 'data' => $li_previous,\n );\n }\n\n // When there is more than one page, create the pager list.\n if ($i != $pager_max) {\n if ($i > 1) {\n $items[] = array(\n 'class' => 'pager-ellipsis',\n 'data' => '…',\n );\n }\n $first = TRUE;\n // Now generate the actual pager piece.\n for (; $i <= $pager_last && $i <= $pager_max; $i++) {\n if ($i < $pager_current) {\n $items[] = array(\n 'class' => 'pager-item pager-number',\n 'data' => theme('pager_previous', $i, $limit, $element, ($pager_current - $i), $parameters),\n );\n }\n if ($i == $pager_current) {\n $items[] = array(\n 'class' => 'pager-current pager-number',\n 'data' => $i,\n );\n }\n if ($i > $pager_current) {\n $items[] = array( \n 'class' => 'pager-item pager-number',\n 'data' => theme('pager_next', $i, $limit, $element, ($i - $pager_current), $parameters),\n );\n }\n if ($first) {\n $items[sizeof($items) - 1]['class'] .= ' pager-number-first';\n\t $first = FALSE;\n }\n }\n if ($i < $pager_max) {\n $items[] = array(\n 'class' => 'pager-ellipsis',\n 'data' => '…',\n );\n }\n }\n $items[sizeof($items) - 1]['class'] .= ' pager-number-last';\n // End generation.\n if ($li_next) {\n $items[] = array(\n 'class' => 'pager-next',\n 'data' => $li_next,\n );\n }\n if ($li_last) {\n $items[] = array(\n 'class' => 'pager-last',\n 'data' => $li_last,\n );\n }\n return theme('item_list', $items, NULL, 'ul', array('class' => 'pager'));\n }\n}", "title": "" }, { "docid": "46d851a6343661421ddbf02668bc9de5", "score": "0.60865283", "text": "public function getPager() {\n if (!isset($this->pager)) {\n $this->initPager();\n }\n\n return $this->pager;\n }", "title": "" }, { "docid": "8dbe6e4221cdece37f4d40943dfa6a3a", "score": "0.6072421", "text": "public function render()\n {\n return Html::div([\n $this->getPreviousPageButton(),\n $this->getPagesSelect(),\n $this->getNextPageButton(),\n ])->addClass('pagination');\n }", "title": "" }, { "docid": "1aeec1bce6c441a4224e0c05fbdd469f", "score": "0.6055354", "text": "public function updatePagerToHtml(Pagerfanta $pager) \n {\n if ($pager->getNbPages() == 1) {\n return '';\n }\n \n $routeGenerator = function($page) {\n return $this->router->getGenerator()->generate(\n 'composition-update-list', \n ['page' => $page]);\n };\n\n $view = new TwitterBootstrapView();\n \n $options = array(\n 'prev_message' => 'Пред',\n 'next_message' => 'След'\n );\n \n $html = $view->render($pager, $routeGenerator, $options);\n \n return $html;\n }", "title": "" }, { "docid": "05e91597320e3d72709ff8ef9235b157", "score": "0.6031483", "text": "public function getHTML();", "title": "" }, { "docid": "05e91597320e3d72709ff8ef9235b157", "score": "0.6031483", "text": "public function getHTML();", "title": "" }, { "docid": "2d0c198f91ba11385975ce36c21aff48", "score": "0.60242677", "text": "function apigee_base_pager($variables) {\n $tags = $variables['tags'];\n $element = $variables['element'];\n $parameters = $variables['parameters'];\n $quantity = $variables['quantity'];\n global $pager_page_array, $pager_total;\n\n // Calculate various markers within this pager piece:\n // Middle is used to \"center\" pages around the current page.\n $pager_middle = ceil($quantity / 2);\n // current is the page we are currently paged to\n $pager_current = $pager_page_array[$element] + 1;\n // first is the first page listed by this pager piece (re quantity)\n $pager_first = $pager_current - $pager_middle + 1;\n // last is the last page listed by this pager piece (re quantity)\n $pager_last = $pager_current + $quantity - $pager_middle;\n // max is the maximum page number\n $pager_max = $pager_total[$element];\n // End of marker calculations.\n\n // Prepare for generation loop.\n $i = $pager_first;\n if ($pager_last > $pager_max) {\n // Adjust \"center\" if at end of query.\n $i = $i + ($pager_max - $pager_last);\n $pager_last = $pager_max;\n }\n if ($i <= 0) {\n // Adjust \"center\" if at start of query.\n $pager_last = $pager_last + (1 - $i);\n $i = 1;\n }\n // End of generation loop preparation.\n\n $li_first = theme('pager_first', array('text' => (isset($tags[0]) ? $tags[0] : t('« first')), 'element' => $element, 'parameters' => $parameters));\n $li_previous = theme('pager_previous', array('text' => (isset($tags[1]) ? $tags[1] : t('‹ previous')), 'element' => $element, 'interval' => 1, 'parameters' => $parameters));\n $li_next = theme('pager_next', array('text' => (isset($tags[3]) ? $tags[3] : t('next ›')), 'element' => $element, 'interval' => 1, 'parameters' => $parameters));\n $li_last = theme('pager_last', array('text' => (isset($tags[4]) ? $tags[4] : t('last »')), 'element' => $element, 'parameters' => $parameters));\n $items = array();\n\n if ($pager_total[$element] > 1) {\n if ($li_first) {\n $items[] = array(\n 'class' => array('pager-first'),\n 'data' => $li_first,\n );\n }\n if ($li_previous) {\n $items[] = array(\n 'class' => array('prev'),\n 'data' => $li_previous,\n );\n }\n\n // When there is more than one page, create the pager list.\n if ($i != $pager_max) {\n // Now generate the actual pager piece.\n for (; $i <= $pager_last && $i <= $pager_max; $i++) {\n if ($i < $pager_current) {\n $items[] = array(\n 'class' => array('pager-item'),\n 'data' => theme('pager_previous', array('text' => $i, 'element' => $element, 'interval' => ($pager_current - $i), 'parameters' => $parameters)),\n );\n }\n if ($i == $pager_current) {\n $items[] = array(\n 'class' => array('active'), // Add the active class\n 'data' => l($i, '#', array('fragment' => '', 'external' => TRUE)),\n );\n }\n if ($i > $pager_current) {\n $items[] = array(\n 'class' => array('pager-item'),\n 'data' => theme('pager_next', array('text' => $i, 'element' => $element, 'interval' => ($i - $pager_current), 'parameters' => $parameters)),\n );\n }\n }\n }\n // End generation.\n if ($li_next) {\n $items[] = array(\n 'class' => array('next'),\n 'data' => $li_next,\n );\n }\n if ($li_last) {\n $items[] = array(\n 'class' => array('pager-last'),\n 'data' => $li_last,\n );\n }\n\n if (empty($items)) {\n return '';\n }\n\n return '<div class=\"pagination\">' . theme('item_list', array(\n 'items' => $items,\n // pager class is used for rounded, bubbly boxes in Bootstrap\n //'attributes' => array('class' => array('pager')),\n )) . '</div>';\n }\n}", "title": "" }, { "docid": "13eacb8df417c9976b940ff54ba36656", "score": "0.59710693", "text": "function air_pager_list($vars) {\n $tags = $vars['tags'];\n $element = $vars['element'];\n $parameters = $vars['parameters'];\n $quantity = $vars['quantity'];\n\n global $pager_page_array, $pager_total;\n if ($pager_total[$element] > 1) {\n // Calculate various markers within this pager piece:\n // Middle is used to \"center\" pages around the current page.\n $pager_middle = ceil($quantity / 2);\n // current is the page we are currently paged to\n $pager_current = $pager_page_array[$element] + 1;\n // first is the first page listed by this pager piece (re quantity)\n $pager_first = $pager_current - $pager_middle + 1;\n // last is the last page listed by this pager piece (re quantity)\n $pager_last = $pager_current + $quantity - $pager_middle;\n // max is the maximum page number\n $pager_max = $pager_total[$element];\n // End of marker calculations.\n\n // Prepare for generation loop.\n $i = $pager_first;\n if ($pager_last > $pager_max) {\n // Adjust \"center\" if at end of query.\n $i = $i + ($pager_max - $pager_last);\n $pager_last = $pager_max;\n }\n if ($i <= 0) {\n // Adjust \"center\" if at start of query.\n $pager_last = $pager_last + (1 - $i);\n $i = 1;\n }\n // End of generation loop preparation.\n\n $links = array();\n\n // When there is more than one page, create the pager list.\n if ($i != $pager_max) {\n // Now generate the actual pager piece.\n for ($i; $i <= $pager_last && $i <= $pager_max; $i++) {\n if ($i < $pager_current) {\n $links[\"$i pager-item\"] = theme('pager_previous', array(\n 'text' => $i,\n 'element' => $element,\n 'interval' => ($pager_current - $i),\n 'parameters' => $parameters\n ));\n }\n if ($i == $pager_current) {\n $links[\"$i pager-current\"] = array('title' => $i);\n }\n if ($i > $pager_current) {\n $links[\"$i pager-item\"] = theme('pager_next', array(\n 'text' => $i,\n 'element' => $element,\n 'interval' => ($i - $pager_current),\n 'parameters' => $parameters\n ));\n }\n }\n return theme('links', array(\n 'links' => $links,\n 'attributes' => array('class' => 'links pager pager-list')\n ));\n }\n }\n return '';\n}", "title": "" }, { "docid": "6c30189cf015342438377aae79ef269c", "score": "0.5958173", "text": "public function getHtml();", "title": "" }, { "docid": "244b18f2213f3b1140025699f0a2bd3a", "score": "0.5947081", "text": "function showSitePaging($reccnt, $pagesize, $m, $start){\n\t\t\t$page_str = \"\";\n\t\t\tif($reccnt!=0){\t\n\t\t\t$pagenum\t= $reccnt/$pagesize;\n\t\t\t$PHP_SELF\t= $_SERVER['PHP_SELF'];\n\n\n\t\t\t$qry_str\t= $_SERVER['argv'];\n\n\t\t\tif(count($_SERVER['argv'])>0){\n\t\t\t$qry_str\t= $_SERVER['argv'];\n\t\t\t}\n\n\t\t\t//$m\t\t\t= $_GET;\n\t\t\tunset($m['start']);\n\t\t\t$qry_str\t= $this->qry_str($m);\n\t\t\t\tif($pagenum>40){\n\t\t\t\t\t$j\t= $start/$pagesize;\t\t\n\t\t\t\t\t$k\t= $j+40;\n\t\t\t\t\tif($k>$pagenum){\n\t\t\t\t\t\t$k=$pagenum;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$j\t= 0;\n\t\t\t\t\t$k\t= $pagenum;\n\t\t\t\t}\n\t\t\n\t\tif($pagenum>1){\n\t\t\t//\t$page_str .='<table width=\"100%\" height=\"26\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">';\t\n\t\t\t//\t$page_str .='<tr> <td align=\"left\" >&nbsp;</td> ';\t\n\t\t\t//\t$page_str .=' <td height=\"20\"><b>';\t\n\t\t\t\t\n\t\t\t//\t$page_str .='</b></td>';\t\n\t\t\t//\t$page_str .='<td align=\"right\"><b>';\t\n\n\t\t\t\tif($start!=0){\n\t\t\t\t$page_str .='<a href=\"'.$PHP_SELF.$qry_str.'&start='.($start-$pagesize).'\" style=\"text-decoration:none;\" ><b>&laquo; Previous</b></a>';\n\t\t\t\t}else{\n\t\t\t\t$page_str .='';\n //$page_str .='<a href=\"#\"><b>&laquo; Previous</b></a>';\n\t\t\t\t}\n\n\t\t\t\tfor($i=$j;$i<$k;$i++){\n\t\t\t\tif($i==$j)$page_str .= \" |&nbsp;Page : \";\n\t\t\t\t\tif(($pagesize*($i))!=$start){\n\t\t\t\t\t\t$page_str .= '<a href=\"'.$PHP_SELF.$qry_str.'&start='.$pagesize*($i).'\" style=\"text-decoration:none;\" >';\n\t\t\t\t\t\t$page_str .= $i+1;\n\t\t\t\t\t\t$page_str .= '</a>&nbsp;';\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$page_str .= '<span style=\"color:#ff9625; font-size:14px;\"><b>'.($i+1).'</b></span>';\n\t\t\t\t\t\t$page_str .= '&nbsp;';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$page_str .='&nbsp;&nbsp;|&nbsp;&nbsp;';\n\t\t\t\tif($start+$pagesize < $reccnt){\n\t\t\t\t\t\n\t\t\t\t$page_str .='<a href=\"'.$PHP_SELF.$qry_str.'&start='.($start+$pagesize).'\" style=\"text-decoration:none;\" ><b>Next &raquo;</b></a>';\n\t\t\t\t}else{\n\t\t\t\t$page_str .='<a href=\"#\"><b>Next &raquo;</b></a>';\t\n\t\t\t\t}\n\t\t//\t\t$page_str .=' </b>&nbsp;&nbsp;</td></tr>';\n\t\t//\t\t$page_str .=' </table>';\n\t\t\t\t}else{\n\t\t\t\t$page_str = \"<BR />\";\n\t\t\t\t}\n\t\t\t}\n\t\treturn $page_str;\n\t}", "title": "" }, { "docid": "425a89d326163fb09ebce3c8432c440a", "score": "0.5931591", "text": "function pager($params, $url) {\n\t\t$span1 = $this->Html->tag(\"span\", \"&laquo; Previous\");\n\t\t$options = array();\n\t\tif ($params[\"prevPage\"]) {\n\t\t\tif($params['page'] - 1 == 1) {\n\t\t\t\t$options[\"href\"] = $url;\n\t\t\t} else {\n\t\t\t\t$options[\"href\"] = $url.\"/page:\".($params['page'] - 1);\n\t\t\t}\n\t\t\t$options[\"class\"] = \"page-link\";\n\t\t\t$a1 = $this->Html->tag(\"a\", $span1, $options);\n\t\t\t$options = array();\n\t\t\t$options[\"class\"] = \"page-item col-sm-6 text-center\";\n\t\t\t$li1 = $this->Html->tag(\"li\", $a1, $options);\n\t\t} else {\n\t\t\t$options[\"href\"] = \"#\";\n\t\t\t$options[\"class\"] = \"page-link\";\n\t\t\t$a1 = $this->Html->tag(\"a\", $span1, $options);\n\t\t\t$options = array();\n\t\t\t$options[\"class\"] = \"page-item disabled col-sm-6 text-center\";\n\t\t\t$li1 = $this->Html->tag(\"li\", $a1, $options);\n\t\t}\n\t\t$span2 = $this->Html->tag(\"span\", \"Next &raquo;\");\n\t\t$options = array();\n\t\tif ($params[\"nextPage\"]) {\n\t\t\t$options[\"href\"] = $url.\"/page:\".($params['page'] + 1);\n\t\t\t$options[\"class\"] = \"page-link\";\n\t\t\t$a2 = $this->Html->tag(\"a\", $span2, $options);\n\t\t\t$options = array();\n\t\t\t$options[\"class\"] = \"page-item col-sm-6 text-center\";\n\t\t\t$li2 = $this->Html->tag(\"li\", $a2, $options);\n\t\t} else {\n\t\t\t$options[\"href\"] = \"#\";\n\t\t\t$options[\"class\"] = \"page-link\";\n\t\t\t$a2 = $this->Html->tag(\"a\", $span2, $options);\n\t\t\t$options = array();\n\t\t\t$options[\"class\"] = \"page-item disabled col-sm-6 text-center\";\n\t\t\t$li2 = $this->Html->tag(\"li\", $a2, $options);\n\t\t}\n\n\t\t$options = array();\n\t\t$options[\"class\"] = \"pagination\";\n\t\t$ul = $this->Html->tag(\"ul\", $li1.$li2, $options);\n\n\t\treturn $this->Html->tag(\"nav\", $ul); \n\t}", "title": "" }, { "docid": "dbe2f25df692ba81d007860ce848f684", "score": "0.5910015", "text": "public function showPagination()\r\n { \r\n \r\n $pagestotal = ($this->total > $this->itemsperpage) ? ceil($this->total / $this->itemsperpage) : 1;\r\n\r\n if($this->total > $this->itemsperpage){\r\n\r\n ob_start();\r\n echo '<div class=\"row d-flex justify-content-center\">';\r\n echo '<ul class=\"pagination\">';\r\n\r\n //prev\r\n if ($this->currentpage > 1) {\r\n echo '<li class=\"page-item\"><a class=\"page-link\" href=\"/' . $this->uri . '/'. ($this->currentpage - 1) . '\">Previous</a></li>';\r\n }\r\n\r\n if($pagestotal > $this->range){ \r\n $start = ($this->currentpage <= $this->range) ? 1 : ($this->currentpage - $this->range);\r\n $end = ($pagestotal - $this->currentpage >= $this->range) ? ($this->currentpage+$this->range) : $pagestotal;\r\n }else{\r\n $start = 1;\r\n $end = $pagestotal;\r\n } \r\n //pages\r\n for ($i = $start; $i <= $end; $i++) {\r\n $active = (($i==$this->currentpage) || ($this->currentpage == 0 && $i==1)) ? ' active' : NULL; \r\n echo '<li class=\"page-item' . $active . '\"><a class=\"page-link\" href=\"/' . $this->uri . '/'. $i . '\">' . $i . '</a></li>';\r\n }\r\n\r\n //if total pages are more than the current page\r\n if ($this->currentpage < $pagestotal && $pagestotal != 1) {\r\n echo '<li class=\"page-item\"><a class=\"page-link\" href=\"/' . $this->uri . '/'. ($this->currentpage < 1 ? 2 : $this->currentpage + 1) . '\">Next</a></li>';\r\n }\r\n \r\n echo '</ul>';\r\n echo '</div>';\r\n\r\n return ob_get_clean();\r\n\r\n }\r\n\r\n }", "title": "" }, { "docid": "e5fbbca9159334ea16ec4ce63e2dc366", "score": "0.59069586", "text": "function getPageNavigation() {\n if ($this->getPageCount() <= 1 || $this->isLimitActive() != true) {\n return new Text(\"\");\n }\n\n $maxPage = $this->getPageCount();\n\n $div = new Div();\n $label = new Text(\"Seite: \");\n $label->setFontsize(2);\n $div->add($label);\n\n for ($i = 1; $i <= $maxPage; $i++) {\n $txt = $i;\n $link = new Link(\"?changeDbPage\" . $this->TABLENAME . \"=\" . $i, $txt, false);\n\n if ($this->CURRENT_PAGE == $i) {\n $ft = new FontType();\n $ft->setFontsize(2);\n $ft->setColor($_SESSION['config']->COLORS['hover']);\n $link->setFontType($ft);\n\n }\n\n $div->add($link);\n\n if ($i < $maxPage) {\n $label = new Text(\", \");\n $label->setFontsize(2);\n $div->add($label);\n }\n }\n return $div;\n }", "title": "" }, { "docid": "5d3277a46f95d018e1f9da17bf84602f", "score": "0.58868575", "text": "public function getPagerComment()\n\t{\n\t\treturn $this->pager_comment;\n\t}", "title": "" }, { "docid": "223bd82959ee193445a46429565f6e45", "score": "0.5864498", "text": "public function getPage() { return $this->page; }", "title": "" }, { "docid": "8048795fbf614b79af3ebc1841d912c9", "score": "0.58625174", "text": "public function run()\n\t{\n\t\treturn $this->render('@frenzelgmbh/sblog/widgets/views/_post_pagination',['model'=>$this->model]);\n\t}", "title": "" }, { "docid": "cd3d9bc1a33afa61a0607b11aab5df66", "score": "0.5862396", "text": "protected function getPageLinks() {\n\t\t// Namespaces: links for 'content' and 'talk' for namespaces with talkpages. Otherwise is just the content.\n\t\t// Usually rendered as tabs on the top of the page.\n\t\t$html = $this->getPortlet(\n\t\t\t'namespaces',\n\t\t\t$this->data['content_navigation']['namespaces']\n\t\t);\n\t\t// Variants: Language variants. Displays list for converting between different scripts in the same language,\n\t\t// if using a language where this is applicable.\n\t\t$html .= $this->getPortlet(\n\t\t\t'variants',\n\t\t\t$this->data['content_navigation']['variants']\n\t\t);\n\t\t// 'View' actions for the page: view, edit, view history, etc\n\t\t$html .= $this->getPortlet(\n\t\t\t'views',\n\t\t\t$this->data['content_navigation']['views']\n\t\t);\n\t\t// Other actions for the page: move, delete, protect, everything else\n\t\t$html .= $this->getPortlet(\n\t\t\t'actions',\n\t\t\t$this->data['content_navigation']['actions']\n\t\t);\n\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "5376650bfe324e26f2d83f3b0f6a3825", "score": "0.5847921", "text": "function pagination_html( $page,$totalPages ){\n if(\n ! ctype_digit( (string)$page )\n || ! ctype_digit( (string)$totalPages )\n || $page > $totalPages\n ){\n return false;\n }\n\n // no \"prev\" link if on first page\n if( $page > 1 ){\n $prev = '<li><a href=\"international?page='.($page - 1).'\" rel=\"previous\">Previous</a></li>';\n }else {\n\t $prev=\"\"; }\n // no \"next\" link on last page\n if( $page < $totalPages ){\n $next = '<li><a href=\"international?page='.($page + 1).'\" rel=\"next\">Next</a></li>';\n } else {\n\t $next=\"\"; }\n // done\n echo '<ul class=\"pager\">';\n echo $prev;\n echo $next;\n echo \"</ul>\";\n return;\n}", "title": "" }, { "docid": "042194c727e78f280a855b62b87604cb", "score": "0.58434725", "text": "public function getPagination();", "title": "" }, { "docid": "042194c727e78f280a855b62b87604cb", "score": "0.58434725", "text": "public function getPagination();", "title": "" }, { "docid": "ef787ffdc31f73aa3d9861a4490b0164", "score": "0.58430415", "text": "public function renderPager($exposed_input) {\n if ($this->usePager()) {\n return $this->pager->render($exposed_input);\n }\n\n return '';\n }", "title": "" }, { "docid": "fbb8ff8a8d9e13dba7011417a1728ec1", "score": "0.58403164", "text": "public function pagination_one() { \n\t\n\t\t// Maximum number of links per page. If exceeded, google style pagination is generated\n\t\t$max_links = 6; \n\t\t$h = 1; \n\t\tif($this->page > $max_links) { \n\t\t\n\t\t\t$h=(($h + $this->page) - $max_links); \n\t\t} \n\t\tif($this->page >= 1) {\n \n\t\t\t$max_links = $max_links + ($this->page - 1); \n\t\t} \n\t\tif($max_links > $this->total_pages) {\n \n\t\t\t$max_links = $this->total_pages + 1; \n\t\t} \n\t\t\n\t\t$paging = '';\n\t\t\n\t\t$paging .= '<div class=\"page_numbers\"> \n\t\t <ul class=\"pagination\">'; \n\t\t \n\t\tif($this->page > \"1\") { \n\t\t\n\t\t\t$paging .= '<li class=\"current\"><a href=\"'.URL.$this->webpage.'/'.$this->type.'/1\">First</a></li> \n\t\t\t\t <li class=\"current\"><a href=\"'.URL.$this->webpage.'/'.$this->type.'/'.($this->page - 1).'\">Prev</a></li> '; \n\t\t} \n\t\t \n\t\tif($this->total_pages != 1) { \n\t\t\n\t\t\tfor ($i=$h; $i < $max_links; $i++) { \n\t\t\t\n\t\t\t\tif($i == $this->page) { \n\t\t\t\t\n\t\t\t\t\t$paging .= '<li class=\"active\"><a>'.$i.'</a></li>'; \n\t\t\t\t} \n\t\t\t\telse { \n\t\t\t\t\n\t\t\t\t\t$paging .= '<li><a href=\"'.URL.$this->webpage.'/'.$this->type.'/'.$i.'\">'.$i.'</a> </li>'; \n\t\t\t\t} \n\t\t\t} \n\t\t} \n\t\t \n\t\tif(($this->page >= \"1\" ) && ($this->page != $this->total_pages)) {\n \n\t\t\t$paging .= '<li class=\"current\"><a href=\"'.URL.$this->webpage.'/'.$this->type.'/'.($this->page + 1).'\">Next</a></li> \n\t\t\t\t <li class=\"current\"><a href=\"'.URL.$this->webpage.'/'.$this->type.'/'.$this->total_pages.'\">Last</a></li>'; \n\t\t} \n\t\t \n\t\t$paging .= '</ul> </div>'; \n\t\t\n\t\treturn $paging;\n\t}", "title": "" }, { "docid": "e8196bc96e461a149d9c12d538291a85", "score": "0.583871", "text": "function resources_print_pager($courseid, $repo, $nbrpages, $page, $offset = 0, $isediting = false){\n\techo '<center><b>';\n\tif($courseid){\n\t\tfor($i = 1 ; $i <= $nbrpages ; $i++){\n\t\t\t$pageoffset = ($i - 1)*$page;\n\t\t\t$pagestyle = ($pageoffset == $offset) ? 'color:black;font-size:14pt' : 'color:grey;font-size:12pt' ;\n\t\t\techo \"<a style=\\\"{$pagestyle}\\\" name=\\\"page{$i}\\\" href=\\\"index.php?course={$courseid}&amp;repo={$repo}&amp;offset={$pageoffset}&amp;isediting={$isediting}\\\">$i</a>\";\n\t\t}\n\t} else {\n\t\tfor($i = 1 ; $i <= $nbrpages ; $i++){\n\t\t\t$pageoffset = ($i - 1)*$page;\n\t\t\t$pagestyle = ($pageoffset == $offset) ? 'color:black;font-size:14pt' : 'color:grey;font-size:12pt' ;\n\t\t\techo \"<a style=\\\"{$pagestyle}\\\" name=\\\"page{$i}\\\" href=\\\"index.php?repo={$repo}&amp;offset={$pageoffset}&amp;isediting={$isediting}\\\">$i</a>\";\n\t\t}\n\t}\n\techo '</center>';\n}", "title": "" }, { "docid": "abb9bd27bc5d57ecdb056a25092a9ef1", "score": "0.58385646", "text": "public function getPage(): int;", "title": "" }, { "docid": "abb9bd27bc5d57ecdb056a25092a9ef1", "score": "0.58385646", "text": "public function getPage(): int;", "title": "" }, { "docid": "0a2aae901571008aa4703321c8188e06", "score": "0.58058727", "text": "function pager_navigation($pager, $uri, $anchor = null)\n{\n $navigation = '';\n if ($pager->haveToPaginate())\n {\n $navigation = '<div class=\"w-pager\">';\n $uri .= (preg_match('/\\?/', $uri) ? '&' : '?').'page=';\n\n // First and previous page\n if ($pager->getPage() != 1)\n {\n $navigation .= link_to(__('first'), $uri . '1' . $anchor, 'class=\"pager first\"');\n $navigation .= link_to(__('previous'), $uri . $pager->getPreviousPage() . $anchor, 'class=\"pager prev\"');\n }\n\n $navigation .= \"<ol>\";\n\n if ($pager->getPage() > 5)\n {\n $navigation .= '<li>' . link_to(\"1\", $uri . '1' . $anchor) . '</li>';\n $navigation .= '<li>&hellip;</li>';\n }\n // Pages one by one\n foreach ($pager->getLinks() as $page)\n {\n if ($page == $pager->getPage())\n $navigation .= '<li class=\"current pager\">'.$page;\n else\n $navigation .= '<li>' . link_to($page, $uri . $page . $anchor, 'class=\"pager\"');\n $navigation .= '</li>';\n }\n\n if (($pager->getPage() < ($pager->getLastPage() - 5)))\n {\n $navigation .= '<li>&hellip;</li>';\n $navigation .= '<li>' .link_to($pager->getLastPage(), $uri . $pager->getLastPage() . $anchor, 'class=\"pager\"') . '</li>';\n }\n\n $navigation .= \"</ol>\";\n\n // Next and last page\n if ($pager->getPage() != $pager->getLastPage())\n {\n $navigation .= link_to(__('next'), $uri . $pager->getNextPage() . $anchor, 'class=\"pager next\"');\n $navigation .= link_to(__('last'), $uri . $pager->getLastPage() . $anchor, 'class=\"pager last\"');\n }\n\n $navigation .= \" </div>\";\n }\n\n return $navigation;\n}", "title": "" }, { "docid": "abc3987c5f4f5699ee6774c8a331add6", "score": "0.58019614", "text": "public function getPageData();", "title": "" }, { "docid": "a19783683495c82fa2a706698a3d3cd7", "score": "0.57955694", "text": "public function getPage() \n {\n return $this->page;\n }", "title": "" }, { "docid": "4477cf311c05c12bace636a96bdb6ed9", "score": "0.57945037", "text": "public function render()\n {\n\n if( ! $this->hasPages())\n return '';\n\n return sprintf('<nav class=\"pagination\"><ul>%s</ul></nav>', trim($this->getLinks())).' '.sprintf('<nav class=\"pagination\"><ul>%s</ul></nav>', trim($this->getLinks()));\n }", "title": "" }, { "docid": "872a5e46b891a53150f0628de64162c8", "score": "0.5779704", "text": "public function getHtml()\n\t{\n\t\t// code to create html goes here\n\t}", "title": "" }, { "docid": "d04770760406a8e34b9ba35fdd31fcac", "score": "0.57586426", "text": "abstract function getHtml();", "title": "" }, { "docid": "1a85612d11684536c55cc83123fe9f84", "score": "0.57530546", "text": "public function render()\n {\n $html = '';\n\n if ($this->hasPages()) {\n $html .= new HtmlString(sprintf(\n '<div class=\"pull-right\"><ul class=\"pagination\">%s %s %s</ul></div>',\n $this->getPreviousButton(),\n $this->getLinks(),\n $this->getNextButton()\n ));\n }\n\n if ((bool) $this->paginator->total()) {\n $html .= new HtmlString(sprintf(\n '<div class=\"pull-left\"><div class=\"dropdown\">%s %s</div></div>',\n $this->getActiveLimitWrapper(),\n $this->getLimitLinks()\n ));\n }\n\n return $html . '<div class=\"clearfix\"></div>';\n }", "title": "" }, { "docid": "a9cbbb1630a304dbd2a7b6481df87f4a", "score": "0.5749724", "text": "private function getPage() {\n return ($this->page == null) ? $this->page = self::c(self::BASEURL . '/torrent/' . $this->id) : '';\n }", "title": "" }, { "docid": "f1d832148eb22704371ec280ad1df2f8", "score": "0.57410294", "text": "function anovim_pager($tags = array(), $limit = 10, $element = 0, $parameters = array(), $quantity = 9) {\r\n global $pager_page_array, $pager_total;\r\n \r\n// if(arg(0)==\"blog\" || arg(0)==\"blogs\" || arg(0)==\"forum\") {\r\n\t // Calculate various markers within this pager piece:\r\n\t // Middle is used to \"center\" pages around the current page.\r\n\t $pager_middle = ceil($quantity / 2);\r\n\t // current is the page we are currently paged to\r\n\t $pager_current = $pager_page_array[$element] + 1;\r\n\t // first is the first page listed by this pager piece (re quantity)\r\n\t $pager_first = $pager_current - $pager_middle + 1;\r\n\t // last is the last page listed by this pager piece (re quantity)\r\n\t $pager_last = $pager_current + $quantity - $pager_middle;\r\n\t // max is the maximum page number\r\n\t $pager_max = $pager_total[$element];\r\n\t // End of marker calculations.\r\n\t\r\n\t // Prepare for generation loop.\r\n\t $i = $pager_first;\r\n\t if ($pager_last > $pager_max) {\r\n\t // Adjust \"center\" if at end of query.\r\n\t $i = $i + ($pager_max - $pager_last);\r\n\t $pager_last = $pager_max;\r\n\t }\r\n\t if ($i <= 0) {\r\n\t // Adjust \"center\" if at start of query.\r\n\t $pager_last = $pager_last + (1 - $i);\r\n\t $i = 1;\r\n\t }\r\n\t // End of generation loop preparation.\r\n\t\r\n\t $li_first = theme('pager_first', (isset($tags[0]) ? $tags[0] : t('First')), $limit, $element, $parameters);\r\n\t $li_previous = theme('pager_previous', (isset($tags[1]) ? $tags[1] : t('Previous')), $limit, $element, 1, $parameters);\r\n\t $li_next = theme('pager_next', (isset($tags[3]) ? $tags[3] : t('Next')), $limit, $element, 1, $parameters);\r\n\t $li_last = theme('pager_last', (isset($tags[4]) ? $tags[4] : t('Last')), $limit, $element, $parameters);\r\n\t\r\n\t if ($pager_total[$element] > 1) {\r\n\t if ($li_first) {\r\n\t $items[] = array(\r\n\t 'class' => 'pager-first',\r\n\t 'data' => $li_first,\r\n\t );\r\n\t }\r\n\t if ($li_previous) {\r\n\t $items[] = array(\r\n\t 'class' => 'pager-previous',\r\n\t 'data' => $li_previous,\r\n\t );\r\n\t }\r\n\t if ($li_next) {\r\n\t $items[] = array(\r\n\t 'class' => 'pager-next',\r\n\t 'data' => $li_next,\r\n\t );\r\n\t }\r\n\t // When there is more than one page, create the pager list.\r\n\t if ($i != $pager_max) {\r\n\t if ($i > 1) {\r\n\t $items[] = array(\r\n\t 'class' => 'pager-ellipsis',\r\n\t 'data' => '…',\r\n\t );\r\n\t }\r\n\t // Now generate the actual pager piece.\r\n\t for (; $i <= $pager_last && $i <= $pager_max; $i++) {\r\n\t if ($i < $pager_current) {\r\n\t $items[] = array(\r\n\t 'class' => 'pager-item',\r\n\t 'data' => theme('pager_previous', $i, $limit, $element, ($pager_current - $i), $parameters),\r\n\t );\r\n\t }\r\n\t if ($i == $pager_current) {\r\n\t $items[] = array(\r\n\t 'class' => 'pager-current',\r\n\t 'data' => $i,\r\n\t );\r\n\t }\r\n\t if ($i > $pager_current) {\r\n\t $items[] = array(\r\n\t 'class' => 'pager-item',\r\n\t 'data' => theme('pager_next', $i, $limit, $element, ($i - $pager_current), $parameters),\r\n\t );\r\n\t }\r\n\t }\r\n\t if ($i < $pager_max) {\r\n\t $items[] = array(\r\n\t 'class' => 'pager-ellipsis',\r\n\t 'data' => '…',\r\n\t );\r\n\t }\r\n\t }\r\n\t // End generation.\r\n\t //NEXT is HERE.. ORIGINALLY\r\n\t if ($li_last) {\r\n\t $items[] = array(\r\n\t 'class' => 'pager-last',\r\n\t 'data' => $li_last,\r\n\t );\r\n\t }\r\n\t return theme('item_list', $items, NULL, 'ul', array('class' => 'pager'));\r\n\t } \t\r\n// } // end if blog...\r\n}", "title": "" }, { "docid": "6b9fbb3d188ae3a1aae34dad68118605", "score": "0.5735266", "text": "function pintaPaginacion(){\r\n\t\t\t$html = '';\r\n\t\t\tif ($this->paginaActual() > $this->primeraPagina() )\r\n\t\t\t\t//include(\"primeraPagina.inc.html\");\r\n\t\t\t\t$html.= $this->firstPage;\r\n\t\t\tif ($this->paginaActual() > $this->primeraPagina() )\r\n\t\t\t\t//include(\"anteriorPagina.inc.html\");\r\n\t\t\t\t$html.= $this->prevPage;\r\n\t\t\t$html.= 'P&aacute;gina '.$this->paginaActual().' de '.$this->ultimaPagina().' ('.$this->totalRegistros().' registros)';\r\n\t\t\tif ($this->paginaActual() < $this->ultimaPagina() )\r\n\t\t\t\t//include(\"siguientePagina.inc.html\");\r\n\t\t\t\t$html.= $this->nextPage;\r\n\t\t\tif ($this->paginaActual() < $this->ultimaPagina() )\r\n\t\t\t\t//include(\"ultimaPagina.inc.html\");\r\n\t\t\t\t$html.= $this->lastPage;\r\n\t\t\tif ( $this->ultimaPagina()==0 )\r\n\t\t\t\t$html='No hay datos';\r\n\t\t\techo $html;\r\n\t\t}", "title": "" }, { "docid": "8e2802fcc1aaf94ecdbce3e30939c874", "score": "0.5734177", "text": "public function getPage()\n\t{\n\t\treturn $this->page; \n\n\t}", "title": "" }, { "docid": "83bb42e46befdc1e947a6821f95ed3b8", "score": "0.57324743", "text": "protected function pageList()\n {\n $p = $this->config['pagekey'];\n\n $url = $this->url();\n\n $linkPage = '';\n\n for ($i = 1; $i <= $this->pageButtonNumber; $i++) {\n $_ = $this->currentPage - $this->centerNum;\n\n if ($_ <= 0) {\n $_ = 0;\n } elseif ($this->currentPage + $this->centerNum >= $this->totalPages) {\n $_ = $this->totalPages - $this->pageButtonNumber;\n $_ = $_ < 0 ? 0 : $_;\n }\n $page = $_ + $i;\n\n if ($page != $this->currentPage) {\n if ($page <= $this->totalPages) {\n $linkPage .= \"{$this->config['itemEle']}<{$this->config['ele']} class='{$this->config['class']}' \n href='$url&$p=$page' data-page='$page'> $page </{$this->config['ele']}>{$this->config['itemEleEnd']}\";\n } else {\n break;\n }\n } else {\n if ($this->totalPages != 1) {\n $linkPage .=\n \"{$this->config['activeItemEle']}<span class='{$this->config['class']}'>$page</span>{$this->config['itemEleEnd']}\";\n }\n }\n }\n\n return $linkPage;\n }", "title": "" }, { "docid": "89c498565be5835de552feb5004a445a", "score": "0.57252836", "text": "public function pager($value) {\n return $this->setProperty('pager', $value);\n }", "title": "" }, { "docid": "89c498565be5835de552feb5004a445a", "score": "0.57252836", "text": "public function pager($value) {\n return $this->setProperty('pager', $value);\n }", "title": "" }, { "docid": "01c20525467e0cd56d082fdf87f68fd6", "score": "0.5725066", "text": "public function renderPageSize()\n {\n $input = Html::dropDownList(\n 'per-page',\n $this->pagination->getPageSize(),\n $this->pageSizeList,\n ['class' => 'grid-pager-field grid-pager-size form-control']\n ) . ' ' . Html::tag('span',yii::t('app', 'per page'),['class'=>'pagination-per-page-dropdown']);\n $form = Html::tag('div', $input, ['class' => 'pager-form']);\n return Html::tag('li', $form, ['class' => 'page-size col-sm-3 col-xs-3']);\n }", "title": "" }, { "docid": "656fad99be9fd7fe6d7620252677d30b", "score": "0.57086986", "text": "function display_db_pager(&$pager) {\n global\t$use_popup_windows, $use_date_picker, $path_to_root;\n\n\t$pager->select_records();\n\n\tdiv_start(\"_{$pager->name}_span\");\n $headers = array();\n\n\tforeach($pager->columns as $num_col=>$col) {\n\t\t// record status control column is displayed only when control checkbox is on\n \tif (isset($col['head']) && ($col['type']!='inactive' || get_post('show_inactive'))) {\n\t\t\tif (!isset($col['ord']))\n\t\t\t\t$headers[] = $col['head'];\n\t\t\telse {\n\t \t\t\t$icon = (($col['ord'] == 'desc') ? 'sort_desc.gif' : \n\t\t\t\t\t($col['ord'] == 'asc' ? 'sort_asc.gif' : 'sort_none.gif'));\n\t\t\t\t$headers[] = navi_button($pager->name.'_sort_'.$num_col, \n\t\t\t\t\t$col['head'], true, $icon);\n\t\t\t}\n \t\t}\n\t}\n /* show a table of records returned by the sql */\n start_table(TABLESTYLE, \"width=$pager->width\");\n table_header($headers);\n\n\tif($pager->header_fun) {\t// if set header handler\n\t\tstart_row(\"class='{$pager->header_class}'\");\n\t\t$fun = $pager->header_fun;\n\t\tif (method_exists($pager, $fun)) { \n\t\t\t$h = $pager->$fun($pager);\n \t\t} elseif (function_exists($fun)) {\n\t\t\t$h = $fun($pager);\n\t\t}\n\t\t\n\t\tforeach($h as $c) {\t // draw header columns\n\t\t\t$pars = isset($c[1]) ? $c[1] : '';\n\t\t\tlabel_cell($c[0], $pars);\n\t\t}\n\t\tend_row();\n\t}\n\n\t$cc = 0; //row colour counter\n \tforeach($pager->data as $line_no => $row) {\t\n\n\t\t$marker = $pager->marker;\n\t if ($marker && $marker($row)) \n \tstart_row(\"class='$pager->marker_class'\");\n\t else\t\n\t\t\talt_table_row_color($cc);\n\t foreach ($pager->columns as $k=>$col) {\n\t\t $coltype = $col['type'];\n\t\t $cell = isset($col['name']) ? $row[$col['name']] : '';\n\n\t\t if (isset($col['fun'])) { // use data input function if defined\n\t\t $fun = $col['fun']; \n\t\t if (method_exists($pager, $fun)) { \n\t\t\t\t$cell = $pager->$fun($row, $cell);\n \t\t\t} elseif (function_exists($fun)) {\n\t\t\t\t$cell = $fun($row, $cell);\n\t\t\t} else\n\t\t\t\t$cell = '';\n\t\t }\n\t\t switch($coltype) { // format column\n\t\t case 'time':\n\t\t \t label_cell($cell, \"width=40\"); break;\n\t\t case 'date':\n\t\t \t label_cell(sql2date($cell), \"align='center' nowrap\"); break;\n\t\t case 'dstamp':\t// time stamp displayed as date\n\t\t \t label_cell(sql2date(substr($cell, 0, 10)), \"align='center' nowrap\"); break;\n\t\t case 'tstamp':\t// time stamp - FIX user format\n\t\t \t label_cell(sql2date(substr($cell, 0, 10)).\n\t\t\t ' '. substr($cell, 10), \"align='center'\"); break;\n\t\t case 'percent':\n\t\t \t percent_cell($cell); break;\n\t\t case 'amount':\n\t\t\t if ($cell=='')\n\t\t\t \tlabel_cell('');\n\t\t\t else\n\t\t \t \tamount_cell($cell, false); break;\n\t\t case 'qty':\n\t\t\t if ($cell=='')\n\t\t\t \tlabel_cell('');\n\t\t\t else\n\t\t \t \tqty_cell($cell, false, isset($col['dec']) ? $col['dec'] : null); break;\n\t\t\tcase 'email':\n\t\t\t\temail_cell($cell,isset( $col['align']) ? \"align='\" . $col['align'] . \"'\" : null);\n\t\t\t\tbreak;\n\t\t case 'rate':\n\t\t\t\tlabel_cell(number_format2($cell, user_exrate_dec()), \"align=center\"); break;\n\t\t\tcase 'inactive':\n\t\t\t\tif(get_post('show_inactive'))\n\t\t\t\t\t$pager->inactive_control_cell($row); break;\n\t\t default:\n//\t\t case 'text':\n\t\t\t if (isset( $col['align']))\n\t\t\t \t label_cell($cell, \"align='\" . $col['align'] . \"'\");\n\t\t\t else\n\t\t\t \t label_cell($cell);\n\t\t case 'skip':\t// column not displayed\n\t \t }\n\t }\n\t end_row();\n\t}\n\t//end of while loop\n\n\tif($pager->footer_fun) {\t// if set footer handler\n\t\tstart_row(\"class='{$pager->footer_class}'\");\n\t\t$fun = $pager->footer_fun;\n\t\tif (method_exists($pager, $fun)) { \n\t\t\t$h = $pager->$fun($pager);\n \t\t} elseif (function_exists($fun)) {\n\t\t\t$h = $fun($pager);\n\t\t}\n\t\t\n\t\tforeach($h as $c) {\t // draw footer columns\n\t\t\t$pars = isset($c[1]) ? $c[1] : '';\n\t\t\tlabel_cell($c[0], $pars);\n\t\t}\n\t\tend_row();\n\t}\n\n\tstart_row(\"class='navibar'\");\n\t$colspan = count($pager->columns);\n\t\t$inact = @$pager->inactive_ctrl==true \n\t\t\t? ' '.checkbox(null, 'show_inactive', null, true). _(\"Show also Inactive\") : '';\n\t if($pager->rec_count) {\n\t\techo \"<td colspan=$colspan class='navibar' style='border:none;padding:3px;'>\";\n\t\techo \"<div style='float:right;'>\";\n\t\t$but_pref = $pager->name.'_page_';\n\t start_table();\n\t\tstart_row();\n\t\tif (@$pager->inactive_ctrl) \n\t\t\t\tsubmit('Update', _('Update'), true, '', null); // inactive update\n\t\techo navi_button_cell($but_pref.'first', _('First'), $pager->first_page, 'right');\n\t\techo navi_button_cell($but_pref.'prev', _('Prev'), $pager->prev_page,'right');\n\t\techo navi_button_cell($but_pref.'next', _('Next'), $pager->next_page,'right');\n\t\techo navi_button_cell($but_pref.'last', _('Last'), $pager->last_page, 'right');\n\t\tend_row(); \n\t\tend_table();\n\t\techo \"</div>\";\n\t\t$from = ($pager->curr_page-1)*$pager->page_len+1;\n\t\t$to = $from + $pager->page_len - 1;\n\t\tif ($to > $pager->rec_count)\n\t\t $to = $pager->rec_count;\n\t\t$all = $pager->rec_count;\n\t\techo sprintf( _('Records %d-%d of %d'), $from, $to, $all);\n\t\techo $inact;\n\t\techo \"</td>\";\n\t} else {\n\t label_cell( _('No records') . $inact, \"colspan=$colspan class='navibar'\");\n\t}\n\n\tend_row();\n\n\tend_table();\n\n if (isset($pager->marker_txt))\n \t\tdisplay_note($pager->marker_txt, 0, 1, \"class='$pager->notice_class'\");\n\n div_end();\n return true;\n}", "title": "" }, { "docid": "705ea33e3027eaef0806e749b8191a26", "score": "0.57014877", "text": "public function renderPageFiled()\n {\n $pagenation = [];\n $pageCount = $this->pagination->getPageCount();\n $currentPage = $this->pagination->getPage();\n // prev page\n if ($this->prevPageLabel !== false) {\n if (($page = $currentPage - 1) < 0) {\n $page = 0;\n }\n $pagenation[] = $this->renderPageButton(\n $this->prevPageLabel,\n $page,\n $this->prevPageCssClass,\n $currentPage <= 0,\n false\n );\n }\n\n $input = Html::input(\n 'text',\n 'page',\n $this->pagination->getPage() + 1,\n ['class' => 'grid-pager-input grid-pager-field form-control']\n ) . Html::tag('span', yii::t(\n 'app',\n 'of {pageCount}',\n [\n 'pageCount' => $this->pagination->getPageCount(),\n 'recordsCount' => $this->totalCount\n ]\n ), ['class'=>'grid-pager-content']);\n $pagenation[] = Html::tag('div', $input, ['class' => 'pager-form col-md-8 col-sm-6 col-xs-8']);\n\n // next page\n if ($this->nextPageLabel !== false) {\n if (($page = $currentPage + 1) >= $pageCount - 1) {\n $page = $pageCount - 1;\n }\n $pagenation[] = $this->renderPageButton(\n $this->nextPageLabel,\n $page,\n $this->nextPageCssClass,\n $currentPage >= $pageCount - 1,\n false\n );\n }\n return Html::tag('li', implode(\"\\n\", $pagenation), ['class' => 'page-list col-sm-9 col-xs-9']);\n }", "title": "" }, { "docid": "483632a52d8b0328db20f393bc0bfbf2", "score": "0.56977826", "text": "private function get_page_content():string {\n\t\t\\ob_start();\n\t\t$this->page->show();\n\n\t\treturn \\ob_get_clean();\n\t}", "title": "" }, { "docid": "c9e0b8360ba59236bd45a1ec345c74d1", "score": "0.5687902", "text": "public function getPage() {\r\n\t\treturn floor($this->offset / $this->limit)+1;\r\n\t}", "title": "" }, { "docid": "4c0c190cd3f7e5622e24ef075ed0f02f", "score": "0.5682102", "text": "public function single_pagination_html() {\n\t\t\t$pagination_style = $this->get_option($this->prefix.'_pagination_style', 'fixed');\n\t\t\tif($pagination_style != 'off') {\n\t\t\t\techo '<div class=\"dfd-single-pagination mobile-hide '.esc_attr($pagination_style).'\">';\n\t\t\t\t\tget_template_part('templates/inside-pagination');\n\t\t\t\t\tif($pagination_style != 'fixed') {\n\t\t\t\t\t\tget_template_part('templates/entry-meta/folio-top-link');\n\t\t\t\t\t}\n\t\t\t\techo '</div>';\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "964aec37338566743ec755a5ce5e562b", "score": "0.567556", "text": "function dispPages ($total,$PageSize,$p,$Param){\n if ($total>0){\n if (!is_numeric($p) || $p<1) $p=1;\n $NumOfPages=ceil($total/$PageSize);\n if ($NumOfPages>1){\n if ($p>1) echo \"<a href='$PHP_SELF?p=\",$p-1,\"&$Param'>Back</a>\";\n for ($i=1;$i<=$NumOfPages;$i++)\n if ($i!=intval($p)) echo \" <a href='$PHP_SELF?p=$i&$Param'>$i</a> \"; else echo \" <b>[$i]</b> \";\n if ($p<$NumOfPages) echo \"<a href='$PHP_SELF?p=\",$p+1,\"&$Param'>Next</a>\";\n }\n }\n}", "title": "" }, { "docid": "72e2c41d9322a3e5cf8343be72ef63e5", "score": "0.5675385", "text": "protected function pagination( $which ) \n {\n if ( empty( $this->_pagination_args ) ) {\n return;\n }\n\n $total_items = $this->_pagination_args['total_items'];\n $total_pages = $this->_pagination_args['total_pages'];\n $infinite_scroll = false;\n if ( isset( $this->_pagination_args['infinite_scroll'] ) ) {\n $infinite_scroll = $this->_pagination_args['infinite_scroll'];\n }\n\n $output = '<span class=\"displaying-num\">' . sprintf( _n( '%s item', '%s items', $total_items ), number_format_i18n( $total_items ) ) . '</span>';\n\n $current = $this->get_pagenum();\n $removable_query_args = wp_removable_query_args();\n\n $current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );\n\n $current_url = remove_query_arg( $removable_query_args, $current_url );\n\n $page_links = array();\n\n $total_pages_before = '<span class=\"paging-input\">';\n $total_pages_after = '</span></span>';\n\n $disable_first = $disable_last = $disable_prev = $disable_next = false;\n\n if ( $current == 1 ) {\n $disable_first = true;\n $disable_prev = true;\n }\n if ( $current == 2 ) {\n $disable_first = true;\n }\n if ( $current == $total_pages ) {\n $disable_last = true;\n $disable_next = true;\n }\n if ( $current == $total_pages - 1 ) {\n $disable_last = true;\n }\n\n if ( $disable_first ) {\n $page_links[] = '<span class=\"tablenav-pages-navspan\" aria-hidden=\"true\">&laquo;</span>';\n } else {\n $page_links[] = sprintf( \"<a class='first-page' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>\",\n esc_url( remove_query_arg( 'paged', $current_url ) ),\n __( 'First page' ),\n '&laquo;'\n );\n }\n\n if ( $disable_prev ) {\n $page_links[] = '<span class=\"tablenav-pages-navspan\" aria-hidden=\"true\">&lsaquo;</span>';\n } else {\n $page_links[] = sprintf( \"<a class='prev-page' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>\",\n esc_url( add_query_arg( 'paged', max( 1, $current-1 ), $current_url ) ),\n __( 'Previous page' ),\n '&lsaquo;'\n );\n }\n\n if ( 'bottom' === $which ) {\n $html_current_page = $current;\n $total_pages_before = '<span class=\"screen-reader-text\">' . __( 'Current Page' ) . '</span><span id=\"table-paging\" class=\"paging-input\"><span class=\"tablenav-paging-text\">';\n } else {\n $html_current_page = sprintf( \"%s<input class='current-page' id='current-page-selector' type='text' name='paged' value='%s' size='%d' aria-describedby='table-paging' /><span class='tablenav-paging-text'>\",\n '<label for=\"current-page-selector\" class=\"screen-reader-text\">' . __( 'Current Page' ) . '</label>',\n $current,\n strlen( $total_pages )\n );\n }\n $html_total_pages = sprintf( \"<span class='total-pages'>%s</span>\", number_format_i18n( $total_pages ) );\n $page_links[] = $total_pages_before . sprintf( _x( '%1$s of %2$s', 'paging' ), $html_current_page, $html_total_pages ) . $total_pages_after;\n\n if ( $disable_next ) {\n $page_links[] = '<span class=\"tablenav-pages-navspan\" aria-hidden=\"true\">&rsaquo;</span>';\n } else {\n $page_links[] = sprintf( \"<a class='next-page' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>\",\n esc_url( add_query_arg( 'paged', min( $total_pages, $current+1 ), $current_url ) ),\n __( 'Next page' ),\n '&rsaquo;'\n );\n }\n\n if ( $disable_last ) {\n $page_links[] = '<span class=\"tablenav-pages-navspan\" aria-hidden=\"true\">&raquo;</span>';\n } else {\n $page_links[] = sprintf( \"<a class='last-page' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>\",\n esc_url( add_query_arg( 'paged', $total_pages, $current_url ) ),\n __( 'Last page' ),\n '&raquo;'\n );\n }\n\n $pagination_links_class = 'pagination-links';\n if ( ! empty( $infinite_scroll ) ) {\n $pagination_links_class = ' hide-if-js';\n }\n $output .= \"\\n<span class='$pagination_links_class'>\" . join( \"\\n\", $page_links ) . '</span>';\n\n if ( $total_pages ) {\n $page_class = $total_pages < 2 ? ' one-page' : '';\n } else {\n $page_class = ' no-pages';\n }\n $this->_pagination = \"<div class='tablenav-pages{$page_class}'>$output</div>\";\n\n echo $this->_pagination;\n }", "title": "" }, { "docid": "b7fe06a5a5c758dbc7157d585eaf28b5", "score": "0.56729156", "text": "public function getPageUrl() {\n\t\treturn $this->_url;\n\t}", "title": "" }, { "docid": "0da092554e1436819a70ef465007a4ca", "score": "0.5662397", "text": "function HTMLPage ($params) {\n if (!isset($params['total-count'])) {\n return '';\n }\n\n //REQUEST_URIを解析\n $uris = @explode(\"?\", $_SERVER['REQUEST_URI']);\n $base_url = $uris[0];\n $query_params = array();\n if (count($uris)>1) {\n $querys = @explode(\"&\", $uris[1]);\n $query_params = array();\n foreach ($querys as $query) {\n $tmp_params = @explode(\"=\", $query);\n $query_params[$tmp_params[0]] = $tmp_params[1];\n }\n }\n $now_page = 1;\n if (isset($query_params['pager_id'])) {\n $now_page = $query_params['pager_id'];\n }\n unset($query_params['pager_id']);\n\n //POSTデータから条件を設定する「s_」を対象とする仕様。\n foreach ($_POST as $key=>$val) {\n if (substr($key, 0 ,2)=='s_') {\n if (is_array($val)) {\n $i=0;\n foreach ($val as $k=>$v) {\n if (is_null($k)) {\n $k = $i++;\n }\n $str = $key.\"[\".$k.\"]\";\n $query_params[$str] = htmlentities($v);\n }\n }\n else {\n $query_params[$key] = htmlentities($val);\n }\n }\n }\n\n //再構成\n $base_url = site_url($base_url);\n if (count($query_params)>0) {\n $querys = array();\n foreach ($query_params as $key=>$val) {\n $querys[] = $key . '=' . $val;\n }\n $base_url = $base_url . \"?\" . @implode('&', $querys);\n }\n\n //全ページ数を算出\n $total_page = ceil($params['total-count'] / SC_PAGE_COUNT);\n $total_pages = array();\n for ($i=1; $i<=$total_page; $i++) {\n $total_pages[$i] = $i;\n }\n //現在ページから最大5つページ番号を表示するための制御\n $page_data = array();\n for ($i=($now_page-5); $i<=($now_page+5); $i++) {\n if (isset($total_pages[$i])) {\n $page_data[$i] = $base_url . '?pager_id=' . $i;\n if (count($query_params)>0) {\n $page_data[$i] = $base_url . '&pager_id=' . $i;\n }\n }\n }\n\n //固定部生成\n $next_page = $now_page + 1;\n if ($next_page > $total_page) {\n $next_page = $total_page;\n }\n $prev_page = $now_page - 1;\n if ($prev_page < 1) {\n $prev_page = 1;\n }\n $link1 = $base_url . '?pager_id=1';\n if (count($query_params)>0) {\n $link1 = $base_url . '&pager_id=1';\n }\n $link2 = $base_url . '?pager_id=' . $prev_page;\n if (count($query_params)>0) {\n $link2 = $base_url . '&pager_id=' . $prev_page;\n }\n $link3 = $base_url . '?pager_id=' . $next_page;\n if (count($query_params)>0) {\n $link3 = $base_url . '&pager_id=' . $next_page;\n }\n $link4 = $base_url . '?pager_id=' . $total_page;\n if (count($query_params)>0) {\n $link4 = $base_url . '&pager_id=' . $total_page;\n }\n\n $page_html = array();\n if ($total_page > 0) {\n $page_html[] = ImageVoteFunctions::HTMLLink(array('href'=>$link1, 'value'=>__(SCLNG_PAGER_FIRST, SC_DOMAIN)));\n $page_html[] = ImageVoteFunctions::HTMLLink(array('href'=>$link2, 'value'=>__(SCLNG_PAGER_PREV, SC_DOMAIN)));\n foreach ($page_data as $key=>$data) {\n if ($key == $now_page) {\n $page_html[] = $key;\n }\n else {\n $page_html[] = ImageVoteFunctions::HTMLLink(array('href'=>$data, 'value'=>$key));\n }\n }\n $page_html[] = ImageVoteFunctions::HTMLLink(array('href'=>$link3, 'value'=>__(SCLNG_PAGER_NEXT, SC_DOMAIN)));\n $page_html[] = ImageVoteFunctions::HTMLLink(array('href'=>$link4, 'value'=>__(SCLNG_PAGER_LAST, SC_DOMAIN)));\n }\n $page_html[] = __(SCLNG_PAGER_TOTAL, SC_DOMAIN);\n $page_html[] = \":\";\n $page_html[] = $params['total-count'];\n return @implode(' ', $page_html);\n }", "title": "" }, { "docid": "e84d012bda52d00f6c04bc92882e9814", "score": "0.56614625", "text": "function getPage() {\n\t\treturn $this->page;\n\t}", "title": "" }, { "docid": "e84d012bda52d00f6c04bc92882e9814", "score": "0.56614625", "text": "function getPage() {\n\t\treturn $this->page;\n\t}", "title": "" }, { "docid": "e84d012bda52d00f6c04bc92882e9814", "score": "0.56614625", "text": "function getPage() {\n\t\treturn $this->page;\n\t}", "title": "" }, { "docid": "794b184a5992a40bad741b4672f6b8b8", "score": "0.5660161", "text": "function get_paging($xtraParams = ''){ $maxPage = $this->cat_total_pages;\r\n $rowsPerPage = PER_PAGE;\r\n $pageNum = $this->cat_page;\r\n\r\n $self = $_SERVER['PHP_SELF'];\r\n\r\n // creating 'previous' and 'next' link\r\n // plus 'first page' and 'last page' link\r\n\r\n // print 'previous' link only if we're not\r\n // on page one\r\n if ($pageNum > 1){\r\n $page = $pageNum - 1;\r\n $prev = '<a href=\"'.HTTP_SERVER.'category/'.$this->cat_name.'/'.$page.'\">[Prev]</a> ';\r\n\t\t $first = '<a href=\"'.HTTP_SERVER.'category/'.$this->cat_name.'/1\">[First Page]</a> ';\r\n } /*else{\r\n $prev = ' [Prev] '; // we're on page one, don't enable 'previous' link\r\n $first = ' [First Page] '; // nor 'first page' link\r\n }*/\r\n\r\n // print 'next' link only if we're not\r\n // on the last page\r\n if ($pageNum < $maxPage){\r\n $page = $pageNum + 1;\r\n\t\t $next = '<a href=\"'.HTTP_SERVER.'category/'.$this->cat_name.'/'.$page.'\">[Next]</a> ';\r\n\t\t $last = '<a href=\"'.HTTP_SERVER.'category/'.$this->cat_name.'/'.$maxPage.'\">[Last Page]</a> ';\r\n } /*else{\r\n $next = ' [Next] '; // we're on the last page, don't enable 'next' link\r\n $last = ' [Last Page] '; // nor 'last page' link\r\n }*/\r\n\r\n // print the page navigation link\r\n return $first . $prev . \" Page <strong>$pageNum</strong> of <strong>$maxPage</strong> page(s) \" . $next . $last;\r\n\t}", "title": "" }, { "docid": "107aa761b6e6698769fa60659dc2b0cc", "score": "0.565698", "text": "public function getPerPage();", "title": "" }, { "docid": "2e8e4920131c7b430787608f5385b934", "score": "0.56565464", "text": "public function getSlidePager()\r\n {\r\n $storeScope = \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE;\r\n return $this->scopeConfig->getValue('promotion_bar/general/slide_pager', $storeScope);\r\n }", "title": "" }, { "docid": "904bcf011b885d13683460d79515b074", "score": "0.56509954", "text": "public function getHtml() {\n\t\treturn $this->_cleanHtml($this->_engine->fetch($this->getTemplate(), $this->getCacheId()));\n\t}", "title": "" }, { "docid": "fa9d89cd29e52ccaddcc0d3cbd168bd0", "score": "0.564664", "text": "public function getCurrentPageNumber();", "title": "" }, { "docid": "6622c9a0b62f87e71bb22ee764988ec2", "score": "0.56365776", "text": "public function getPagination(){\n\t\treturn View::make('dirPagination');\n\t}", "title": "" }, { "docid": "f78591189493790997325e3c37efc3bb", "score": "0.56339353", "text": "public function getPage()\n {\n return $this->page;\n }", "title": "" }, { "docid": "f78591189493790997325e3c37efc3bb", "score": "0.56339353", "text": "public function getPage()\n {\n return $this->page;\n }", "title": "" }, { "docid": "f78591189493790997325e3c37efc3bb", "score": "0.56339353", "text": "public function getPage()\n {\n return $this->page;\n }", "title": "" }, { "docid": "f78591189493790997325e3c37efc3bb", "score": "0.56339353", "text": "public function getPage()\n {\n return $this->page;\n }", "title": "" }, { "docid": "f78591189493790997325e3c37efc3bb", "score": "0.56339353", "text": "public function getPage()\n {\n return $this->page;\n }", "title": "" }, { "docid": "f78591189493790997325e3c37efc3bb", "score": "0.56339353", "text": "public function getPage()\n {\n return $this->page;\n }", "title": "" }, { "docid": "f78591189493790997325e3c37efc3bb", "score": "0.56339353", "text": "public function getPage()\n {\n return $this->page;\n }", "title": "" }, { "docid": "f78591189493790997325e3c37efc3bb", "score": "0.56339353", "text": "public function getPage()\n {\n return $this->page;\n }", "title": "" }, { "docid": "ef10941070e5ddb0127e7773ece5444b", "score": "0.56239927", "text": "private function renderPagination() {\n\n\t // init vars\n\t $max_pages = (int)$this->getMaxPages();\n\t $current_page_url = $_SERVER['REQUEST_URI'];\n\n\t $current_page = isset( $_GET['pagi'] )\n && is_numeric($_GET['pagi'] )\n && $_GET['pagi'] > 0\n ? (int)$_GET['pagi']\n : 1;\n\n\n\t\t$min_range = ($current_page - 2);\n\t\t$max_range = ($current_page + 2);\n\n\t\t$lower_flex = $min_range - 1;\n\t\t$higher_flex = $min_range + 1;\n\n\n\t // Remove pagi from the URL (this is added on each link, as required)\n\t if ( isset( $_GET['pagi'] ) )\n\t\t $current_page_url = remove_query_arg('pagi', $current_page_url );\n\n\t $i = 1;\n\n\t // only display pagination if there are more than one pages needed\n\t if ( $max_pages > 1 ) : ?>\n\n <ul class=\"tablenav-pages ocf-tablenav-pages\">\n <?php while ( $i <= $max_pages ) :\n\n if (\n $i === 1\n || filter_var(\n\t $i,\n FILTER_VALIDATE_INT,\n array(\n 'options' => array(\n 'min_range' => $min_range,\n 'max_range' => $max_range\n )\n )\n )\n || $i === $max_pages\n ) :\n\n $pagi_url = add_query_arg( 'pagi', $i, $current_page_url );\n\n // only add link to item if it is not the current page\n if ( $current_page === $i || ( $current_page === 1 && $i === 1 ) ) : ?>\n <li class=\"current-pagi\"><?php echo $i; ?></li><?php\n else : ?>\n <li><a href=\"<?php echo $pagi_url; ?>\"><?php echo $i; ?></a></li><?php\n endif;\n\n elseif ( $i === 2 || $i === $max_pages - 1) : ?>\n\n <li class=\"ellip-item\">&hellip;</li><?php\n\n endif;\n\n $i++;\n\n endwhile; ?>\n </ul>\n\n\n <?php endif;\n\n }", "title": "" }, { "docid": "bbd7b7e353db38f1fc3a23def4705c34", "score": "0.56146556", "text": "function showpages(){\n\t\techo _PAGING_PAGES . \" : \";\n\t\t// Show first and previous if this is not first.\n\t\tif($this->page != 1){\n\t\t\techo $this->first();\n\t\t\techo $this->previous();\n\t\t}\n\t\t// Show pages\n\t\techo $this->pages();\n\t\t\n\t\t// Show next and last if this is not the last page.\n\t\tif($this->page != $this->max_page){\n\t\t\techo $this->next();\n\t\t\techo $this->last();\n\t\t}\n\t}", "title": "" }, { "docid": "4c3f3bf976ac91d340f580f2424418bf", "score": "0.5610291", "text": "public function getPageContent() {\n return $this->pageContent;\n }", "title": "" }, { "docid": "460846bf4488a244fbbd2c187d7809a6", "score": "0.5603237", "text": "public function currentPage();", "title": "" }, { "docid": "2c23cd0be457625295bc8949b6ffadfa", "score": "0.5601345", "text": "protected function getPage()\n {\n return $this->page;\n }", "title": "" }, { "docid": "1bd960bbfa3cccbbd76d06a803172352", "score": "0.5598791", "text": "public function render()\r\n\t{\r\n\t\t// process given information\r\n\t\t$this->process();\r\n\r\n\t\t// build pagination\r\n\t\t$html = \"\";\r\n\r\n\t\t// display the previous page?\r\n\t\tif ($this->currentPage > 1) {\r\n\t\t\t$html .= $this->writePage(\r\n\t\t\t\t$this->previousPage,\r\n\t\t\t\tnull,\r\n\t\t\t\t$this->template['previous']\r\n\t\t\t);\r\n\t\t} else {\r\n\t\t\t$html .= $this->writeLabel(\r\n\t\t\t\t$this->template['previous'],\r\n\t\t\t\t\"disabled\"\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\t// build links\r\n\t\tif ($this->lastPage < 7 + ($this->stages*2)) {\r\n\t\t\t// write the pages\r\n\t\t\tfor ($pages = 1; $pages <= $this->lastPage; ++$pages) {\r\n\t\t\t\t$html .= $this->writePage(\r\n\t\t\t\t\t$pages,\r\n\t\t\t\t\t($pages == $this->currentPage ? \"active\": \"\")\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t} else if ($this->lastPage > 5 + ($this->stages*2)) {\r\n\t\t\tif ($this->currentPage < 1+($this->stages*2)) {\r\n\t\t\t\t// write the pages\r\n\t\t\t\tfor ($pages = 1; $pages < 2+($this->stages*2); ++$pages) {\r\n\t\t\t\t\t$html .= $this->writePage(\r\n\t\t\t\t\t\t$pages,\r\n\t\t\t\t\t\t($pages == $this->currentPage ? \"active\": \"\")\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// write last 2 pages\r\n\t\t\t\t$html .= $this->writeLabel(\"..\", \"disabled\");\r\n\t\t\t\t$html .= $this->writePage($this->lastPage-1);\r\n\t\t\t\t$html .= $this->writePage($this->lastPage);\r\n\t\t\t} else if ($this->lastPage - ($this->stages*2) > $this->currentPage && $this->currentPage > $this->stages*2) {\r\n\t\t\t\t// write first 2 pages\r\n\t\t\t\t$html .= $this->writePage(1);\r\n\t\t\t\t$html .= $this->writePage(2);\r\n\t\t\t\t$html .= $this->writeLabel(\"..\", \"disabled\");\r\n\r\n\t\t\t\t// write the pages\r\n\t\t\t\tfor ($pages = ($this->currentPage-$this->stages); $pages < ($this->currentPage+$this->stages)+1; ++$pages) {\r\n\t\t\t\t\t$html .= $this->writePage(\r\n\t\t\t\t\t\t$pages,\r\n\t\t\t\t\t\t($pages == $this->currentPage ? \"active\": \"\")\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// write the last 2 pages\r\n\t\t\t\t$html .= $this->writeLabel(\"..\", \"disabled\");\r\n\t\t\t\t$html .= $this->writePage($this->lastPage-1);\r\n\t\t\t\t$html .= $this->writePage($this->lastPage);\r\n\t\t\t} else {\r\n\t\t\t\t// write the first 2 pages\r\n\t\t\t\t$html .= $this->writePage(1);\r\n\t\t\t\t$html .= $this->writePage(2);\r\n\t\t\t\t$html .= $this->writeLabel(\"..\", \"disabled\");\r\n\r\n\t\t\t\t// write the pages\r\n\t\t\t\tfor ($pages = ($this->lastPage-($this->stages*2)); $pages <= $this->lastPage; ++$pages) {\r\n\t\t\t\t\t$html .= $this->writePage(\r\n\t\t\t\t\t\t$pages,\r\n\t\t\t\t\t\t($pages == $this->currentPage ? \"active\": \"\")\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// display next button\r\n\t\tif ($this->currentPage < $pages-1) {\r\n\t\t\t$html .= $this->writePage(\r\n\t\t\t\t$this->nextPage,\r\n\t\t\t\tnull,\r\n\t\t\t\t$this->template['next']\r\n\t\t\t);\r\n\t\t} else {\r\n\t\t\t$html .= $this->writeLabel(\r\n\t\t\t\t$this->template['next'],\r\n\t\t\t\t\"disabled\"\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\t// final processing\r\n\t\t$html = sprintf($this->template['container'], $html);\r\n\t\t$html = sprintf($this->template['wrapper'], $html);\r\n\t\treturn $html;\r\n\t}", "title": "" }, { "docid": "5fb8a521f1d1671a8f3cff5cabf66704", "score": "0.55953157", "text": "private function infoPaging(object $controller): string\n {\n return sprintf('Showing %s - %s of %s results', $controller->tableGrid->getCurrentPage(), $controller->tableGrid->getTotalPages(), $controller->tableGrid->getTotalRecords());\n }", "title": "" }, { "docid": "6ea99c4421a1eaab7155f9f81eb6c50c", "score": "0.5589552", "text": "public function getPage() {\n return $this->page;\n }", "title": "" } ]
4d9bbbf3cba6fa1bb4cdc7717913bd37
Determine if the user is authorized to make this request.
[ { "docid": "8eebf425ce52b4bb228e70caffb79698", "score": "0.0", "text": "public function authorize()\n {\n return true;\n }", "title": "" } ]
[ { "docid": "adc35a96694d73041eb8bde60a1a3a34", "score": "0.8355789", "text": "public function authorize()\n {\n // Only authenticated user can make this request\n if (Auth()->check())\n {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "61b6850924368e14814b635e85110c7f", "score": "0.8344406", "text": "public function authorize()\n {\n return $this->user() != null;\n }", "title": "" }, { "docid": "266882932e546005ce5e72a1dfcad4a3", "score": "0.8311813", "text": "public function authorize()\n {\n // Only authenticated users can make this request\n if (Auth()->check())\n {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "6376534de447322dc42273a919390fb2", "score": "0.8263114", "text": "public function authorize()\n {\n if ($this->isUserAdmin()) {\n return true;\n }\n\n return $this->isUserOwner($this->resourcesData);\n }", "title": "" }, { "docid": "a2f400e9b8822b6190b4dfb53c9dfb58", "score": "0.8225883", "text": "public function authorize()\n {\n return $this->user()->id === $this->user->id;\n }", "title": "" }, { "docid": "c68c0b9aa3d35004ad103595a7134e0d", "score": "0.81748027", "text": "public function authorize()\n {\n return $this->user() === Auth::user();\n }", "title": "" }, { "docid": "afe5d08385357718fec642473a52aac5", "score": "0.8172868", "text": "public function authorize() {\n $user = $this->route('user');\n return Auth::id() == $user->id;\n }", "title": "" }, { "docid": "1d9d94d60f24f4ee69318fc43d74c4c6", "score": "0.8141564", "text": "public function authorize()\n {\n return (bool) $this->user();\n }", "title": "" }, { "docid": "1d9d94d60f24f4ee69318fc43d74c4c6", "score": "0.8141564", "text": "public function authorize()\n {\n return (bool) $this->user();\n }", "title": "" }, { "docid": "cd17c9e8a5fd125380008a18703accec", "score": "0.80771476", "text": "public function isAuthorized()\n {\n if ($this->api && method_exists($this->api, 'authorize')) {\n return $this->api->authorize();\n }\n\n return true;\n }", "title": "" }, { "docid": "ee7af7835fdae0f354ca4a681cfddbe7", "score": "0.8070438", "text": "public function isAuthorized();", "title": "" }, { "docid": "d88bc6352a6cb4cb86862a898807e468", "score": "0.80206347", "text": "public function authorize()\n {\n if (!empty(auth()->user())) return true;\n else return false;\n }", "title": "" }, { "docid": "07cf3e15d6a143b44b4d698b2d356d9d", "score": "0.7993011", "text": "public function authorize()\n {\n return request()->user()->id == auth()->user()->id;\n }", "title": "" }, { "docid": "df9c1983d1c3dc60d4f28281676c0a52", "score": "0.79590464", "text": "public function authorize()\n {\n $user = current_user();\n\n return $user === null || ! $user->isOwner();\n }", "title": "" }, { "docid": "d39cd74dd19725b319038fd93b77c139", "score": "0.7939632", "text": "public function authorize()\n {\n return !$this->user();\n }", "title": "" }, { "docid": "7f8b051ebd168a6c68f0514f0d8df105", "score": "0.79341745", "text": "public function isAuthorized() {\n\t\treturn !empty($this->auth_token);\n\t}", "title": "" }, { "docid": "7fa31e51d5d3fad2b2ee2dd759855dcd", "score": "0.7881839", "text": "public function authorize()\n {\n if(Session::has('is_user') || Session::get('is_user') === true){\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "935a0da134c0bfa79ad09ddb3e7615c5", "score": "0.78689", "text": "public function authorize()\n {\n return request()->session()->has('api_credential');\n }", "title": "" }, { "docid": "c8aacf9b7e9a68d571413875cf1baf9d", "score": "0.78665614", "text": "public function authorize()\n {\n return ($this->user() && $this->user()->isAdmin());\n }", "title": "" }, { "docid": "24d55f30f5c79b4402d7c629fe5c3737", "score": "0.7856002", "text": "public function authorize()\n {\n return Auth::user()->is_admin || $this->user()->id == Auth::user()->id;\n }", "title": "" }, { "docid": "5e6c586881f51e616e13fcb15a106181", "score": "0.78541803", "text": "public function authorize()\n {\n if (auth()->user()) {\n return true;\n }\n }", "title": "" }, { "docid": "340d335aaf485d507323dbdd50bd4d12", "score": "0.78414804", "text": "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "title": "" }, { "docid": "77744da8ec1c5d94f9fb4197ac00dd07", "score": "0.78403324", "text": "public function authorize()\n {\n return auth()->user()->id == $this->request->get('id') && (auth()->user()->hasRole('admin') || auth()->user()->hasRole('employee'));\n }", "title": "" }, { "docid": "738aafc40c5c974391a1185db2419767", "score": "0.7837965", "text": "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 }", "title": "" }, { "docid": "b46b972356ffaf201da7c88abba560a5", "score": "0.78105783", "text": "public function authorize()\n {\n return $this->user()->is_admin && $this->user()->isPro();\n }", "title": "" }, { "docid": "fee0af343c9cfbc2d23e99952d86be99", "score": "0.7810181", "text": "public function isAuthorized() {\n return parent::isAuthorized();\n }", "title": "" }, { "docid": "9f7c39634419f2fce8c1349fddeee2cd", "score": "0.7809632", "text": "public function authorize()\n {\n if($this->user()->isAdmin())\n return true;\n\n return false;\n }", "title": "" }, { "docid": "c35d64e364414093c2211107d6ba2cd7", "score": "0.7797828", "text": "public function authorize()\n {\n switch($this->method()) {\n case 'GET':\n return false;\n case 'POST':\n $user = User::findOrFail($this->id);\n return $this->user()->can('update', [User::class, $user]);\n case 'PUT':\n case 'PATCH': \n case 'DELETE':\n return false;\n default:\n break;\n }\n }", "title": "" }, { "docid": "0e0f88dd62b79b349871769f0c5ee5c0", "score": "0.7775089", "text": "function isAuthorized() {\n // Currently we do all meaningful checks in beforeFilter().\n \n return true;\n }", "title": "" }, { "docid": "166e1a3b11b8a0bf836a729ad64c740d", "score": "0.7769981", "text": "public function authorize()\n {\n $categoryOwner = Operation::find($this->route('id'))\n ->category()\n ->first()\n ->user()\n ->first();\n\n if ($categoryOwner->id === \\Auth::id())\n return true;\n\n return false;\n }", "title": "" }, { "docid": "96de3a0bca7b2354dce8c6c6a9ae7654", "score": "0.77589947", "text": "public function authorize()\n {\n $user = $this->user();\n return $user || $user->isAdmin();\n }", "title": "" }, { "docid": "f2dd197bc28c2a41168d4d4579952d22", "score": "0.77469796", "text": "public function authorize()\n {\n $subscriber = Subscriber::find($this->route('id'));\n\n return $subscriber && $subscriber->user_id == Auth::guard('api')->user()->id;\n }", "title": "" }, { "docid": "537138e05319644656ed0ed47b3d1d1a", "score": "0.7741953", "text": "public function authorize()\n {\n // @todo should anyone really be able to update a check-in?\n $check_in = CheckIn::query()->where('scheduled_checkin_id', '=', $this->route('id'))->first();\n if ($this->user()->isAdmin($check_in->organization_id)) {\n return true;\n }\n\n if ($this->user()->role === 'author' &&\n $this->user()->organization_id === $this->input('organization')) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "7b4f0f2f385e53224f8389cbfe400983", "score": "0.774003", "text": "public function authorize(): bool\n {\n if (! parent::authorize()) {\n return false;\n }\n\n // If there is a subuser present in the URL, validate that it is not the same as the\n // current request user. You're not allowed to modify yourself.\n if ($this->route()->hasParameter('subuser')) {\n if ($this->endpointSubuser()->user_id === $this->user()->id) {\n return false;\n }\n }\n\n // If this is a POST request, validate that the user can even assign the permissions they\n // have selected to assign.\n if ($this->method() === Request::METHOD_POST && $this->has('permissions')) {\n $this->validatePermissionsCanBeAssigned(\n $this->input('permissions') ?? []\n );\n }\n\n return true;\n }", "title": "" }, { "docid": "5b4c01003b40c31053fde7580331e0fc", "score": "0.77388614", "text": "public function authorize()\n {\n if (Auth::user()) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "ab2a1df217316960e99099a4734e0bf9", "score": "0.77383286", "text": "public function authorize()\n {\n if (!Auth::user())\n {\n return false;\n }\n if ($this->id && (Auth::id() !== $this->id) && !Auth::user()->is_admin)\n {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "ca4822d69ec5ae164a06238db46726f9", "score": "0.7727606", "text": "public function authorize()\n {\n // only allow if the user is logged in\n // return auth()->check();\n\n return true;\n }", "title": "" }, { "docid": "6867e5f786ce616034ffe506750fcb9c", "score": "0.7727508", "text": "public function authorize()\n {\n $dataSource = DataSource::find($this->route('datasource'));\n $dataSource = $dataSource ? $dataSource->first() : null;\n return $this->user()\n && ($dataSource ? $this->user()->id === $dataSource->owner->id : true);\n }", "title": "" }, { "docid": "f7f59a6d41ea922d7696cf92de80b77e", "score": "0.770588", "text": "public function authorize(): bool\n {\n return !! $this->user();\n }", "title": "" }, { "docid": "6d721947f3ade89e55924a2597b229ca", "score": "0.77030694", "text": "public function authorize()\n {\n $user = App::call( [ $this, 'findUser' ] );\n if ( is_null( $user ) )\n {\n return false;\n }\n\n $this -> merge( [ 'user' => $user ] );\n return true;\n }", "title": "" }, { "docid": "7adcf640538c1fd36664f332bcebca74", "score": "0.77019715", "text": "public function isAuthorized()\n {\n return ($_SESSION['user']['logged'] === true);\n }", "title": "" }, { "docid": "703f36ee75d24db3d967d5886b237643", "score": "0.76944697", "text": "public function authorize()\n {\n if($this->route('accounts') == auth()->user()->id) {\n return true;\n }\n\n return false;\n \n }", "title": "" }, { "docid": "1c2a0175bb5e73473c311c83d1588f13", "score": "0.769402", "text": "public function authorize()\n\t{\n if(!$this->has(\"user_id\") || !is_int((integer)$this->get(\"user_id\")) ||\n !$this->has(\"recommendation_id\") || !is_int((integer)$this->get(\"recommendation_id\")))\n {\n return false;\n }\n\t\treturn true;\n\t}", "title": "" }, { "docid": "9f176845cb818d4b52c1e0514e271b22", "score": "0.7687097", "text": "public function isAuthorized(){\n\t\treturn $this->authorized;\n\t}", "title": "" }, { "docid": "2d7c531ed28d1966e92137472df2320d", "score": "0.768582", "text": "public function authorize()\n {\n return $this->session()->has('jukebox.user');\n }", "title": "" }, { "docid": "a0ef39a48a6c1c6cd6f90576ccb029ed", "score": "0.7682679", "text": "public function authorize()\n {\n // If user_id is not empty it means admin views user's tasks\n // and we need to check permissions\n if(!empty($this->get('user_id'))) {\n return $this->user()->hasRole('admin');\n }\n\n return true;\n }", "title": "" }, { "docid": "3c54a64b7e414471108d31b4b58854b5", "score": "0.7674501", "text": "function is_authorized() {\n return ($this->access_token != NULL);\n }", "title": "" }, { "docid": "c4b2873df4aef92e1d39bd3f24ab9a6f", "score": "0.7668482", "text": "public function authorize()\n {\n return (auth()->check() && ! auth()->user()->finished_profile && auth()->user()->role != 'admin') ? true : false;\n }", "title": "" }, { "docid": "376844043f0222ed7a2a8aa3623b474f", "score": "0.7668466", "text": "public function authorize() {\n if ($this->getMethod() === 'PATCH') {\n return $this->user()->can('update', User::class);\n }\n\n return !auth()->check();\n }", "title": "" }, { "docid": "fb8dd0b89ad69c80bd32219b331d467a", "score": "0.76649845", "text": "function isAuthorized() {\r\n if ($this->isAdminRequest()) {\r\n if ($this->Auth->user('is_admin') != true) {\r\n return false;\r\n }\r\n }\r\r\n if (empty($this->params['prefix'])) {\r\n return true;\r\n }\r\r\n return true;\r\n }", "title": "" }, { "docid": "5f40d948a5e4ffe4776811ba667a52cf", "score": "0.7650565", "text": "private function isUserAuthorized(Request $request)\n {\n return $request->user->id == $this->auth->id();\n }", "title": "" }, { "docid": "ac3b3a019df28e1b6b5065c0839a12f8", "score": "0.7642991", "text": "public function authorize()\n {\n if (!$this->isRegister())\n return $this->user()->can('update', $this->route('user'));\n return true;\n }", "title": "" }, { "docid": "893fefcaa8f0bbabe2639b6e2fc59c84", "score": "0.76401085", "text": "public function authorize()\n {\n if (Auth::check()) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "d7c5080318027df1643993babed950ea", "score": "0.7632217", "text": "public function authorize()\n {\n if ($this->user()->hasRole('admin')) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "8c554c521daa52ec235580f10b15f4a8", "score": "0.76313287", "text": "public function authorize()\n {\n return app('Authority')->checkAuthority(134) || app('Authority')->checkAuthority(194);\n }", "title": "" }, { "docid": "1b700c9f91296110fce91a91292b658a", "score": "0.76300305", "text": "public function isAuthorized(): bool\n {\n return $this->authorized;\n }", "title": "" }, { "docid": "46db0b1864bc02cb5f1e50e7206d17bd", "score": "0.76140994", "text": "public function authorize()\n {\n if (Auth::check())\n {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "4060b7cebfc007f78995973323198b2c", "score": "0.76068926", "text": "public function authorize()\n {\n return ((\\Auth::check() && (\\Auth::user()->hasRole(\"admin\"))) || (\\Auth::check() && (\\Auth::user()->hasRole(\"owner\"))));\n }", "title": "" }, { "docid": "91f75f102cf6d36a864c523d88b43a90", "score": "0.7603521", "text": "function authorised() {\n\n\t\tglobal $api_config;\n\n\t\t$request = OAuthRequest::from_request();\n\n\t\t$api_config->oauth_parameters = $request->get_parameters();\n\n\t\tif (\t!isset($api_config->oauth_parameters['oauth_consumer_key']) ||\n\t\t\t\t!isset($api_config->oauth_parameters['oauth_signature']) ||\n\t\t\t\t!isset($api_config->oauth_parameters['oauth_timestamp']) ||\n\t\t\t\t!isset($api_config->oauth_parameters['oauth_nonce'])\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$consumer_key = $api_config->oauth_parameters['oauth_consumer_key'];\n\t\t$consumer_secret = lookup_secret($consumer_key);\n\t\t$consumer = new OAuthConsumer($consumer_key, $consumer_secret);\n\n\t\t$signature_method = new OAuthSignatureMethod_HMAC_SHA1;\n\t\t$signature = $api_config->oauth_parameters['oauth_signature'];\n\n\t\t$timestamp = $api_config->oauth_parameters['oauth_timestamp'];\n\t\t$request_expired = (abs(time() - $timestamp) > 300);\n\n\t\treturn !$request_expired && valid_nonce() && $signature_method->check_signature($request, $consumer, null, $signature);\n\t}", "title": "" }, { "docid": "4c54020c6c60ab51e81a9670d68b022b", "score": "0.7582351", "text": "public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin', 'hrmanager', 'hruser', 'hrassistant'])) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "ff794c28a968dce69d0449efe84e5bcc", "score": "0.7572131", "text": "public function authorize()\n {\n /*$robot = Robot::find($this->route('robot'));\n if ($robot) {\n return $this->user()->can('update', $robot);\n } else {\n return true;\n }*/\n return true;\n }", "title": "" }, { "docid": "10df13ce9600b5fb3463bbea159e1143", "score": "0.7571812", "text": "public function authorize(): bool\n {\n $user = Auth::user();\n return\n $user->can(\"create\", User::class) ||\n $user->can(\"update\", $user);\n }", "title": "" }, { "docid": "9fccab535480cb881f9768d3da7420e9", "score": "0.7570924", "text": "public function authorize()\n {\n try {\n $this->user = User::findOrFail(session('2fa:user:id'));\n } catch (\\Exception $ex) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "a0d3d7ca67a2980e7b293d330995059b", "score": "0.75684065", "text": "public function authorize()\n\t{\n\t\tif ( $this->alert != null ) {\n\t\t\treturn Auth::user()->isMyAlert( $this->alert );\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "1f5d34d0d7fcc23ad0e79bb7bba1d111", "score": "0.7567948", "text": "public function authorize()\n {\n $user = $this->user();\n $entry = $this->entry;\n if (strtoupper($this->method()) === 'POST') {\n return true;\n } else {\n return $user->can('update', $entry);\n }\n }", "title": "" }, { "docid": "ddf07a2b01ff2619fc5c7deaa69edc81", "score": "0.7561511", "text": "public function authorize()\n {\n if (Auth::check())\n {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "353a39cee7ff65acadebf163114c0a91", "score": "0.7560446", "text": "public function authorize()\n {\n return Task::find($this->route()->parameters['id'])->user_id == Auth::id();\n }", "title": "" }, { "docid": "a12451b6af79fdf13141f94195a42ad0", "score": "0.7549059", "text": "public function authorize()\n {\n $user = User::where('id', Auth::id());\n\n return $user->exists() &&\n $user->first()->verified;\n }", "title": "" }, { "docid": "8c83d334e99dd9618951155e97f8687f", "score": "0.75449353", "text": "public function authorize()\n {\n switch ($this->method()){\n case 'POST':\n case 'GET':\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n return $this->isAdmin();\n default:\n return false;\n\n }\n\n }", "title": "" }, { "docid": "f08d4c8687c0a867f9a48d889466aa39", "score": "0.7542998", "text": "public function authorize()\n {\n return $this->user()->is_dispatcher() && $this->user()->ownsOrder($this->id);\n }", "title": "" }, { "docid": "e9765550fc338490263d3391dd22e987", "score": "0.7533661", "text": "public function authorize()\n {\n if(!$this->route('comment')){\n return true;\n }\n\n $this->comment = Comment::find($this->route('comment'));\n\n if(!$this->comment){\n return false;\n }\n\n return $this->user()->isSuperAdmin() || $this->user()->id === $this->comment->user_id ;\n }", "title": "" }, { "docid": "c20f97fc4daa02e4cab5f9c7fba1fcea", "score": "0.75300336", "text": "public function authorize()\n {\n return Auth::check() && Auth::user()->user_role == 0;\n }", "title": "" }, { "docid": "ee75d6f38863c6db4488059a2d5f573b", "score": "0.75222874", "text": "function isAuthorized() {\n return true;\n }", "title": "" }, { "docid": "3064bebbce0683cd6210741cc8a3be57", "score": "0.75160164", "text": "public function authorize()\n {\n if (env('APP_ENV') == 'testing'):\n return true;\n endif;\n switch ($this->getMethod()):\n case \"POST\":\n case \"PUT\":\n return true;\n break;\n endswitch;\n return false;\n }", "title": "" }, { "docid": "cdc68b6902017dd60a773f887cf373d5", "score": "0.7512349", "text": "public function authorize()\n {\n $ticket = $this->route('ticket');\n\n return $ticket->property->landlord->id == $this->user()->landlord->id;\n }", "title": "" }, { "docid": "1f3b80daa6a71180d2bf0f924cbc93c4", "score": "0.75095665", "text": "public function authorize()\n {\n return auth()->user()->id === $this->route('comment')->user_id;\n }", "title": "" }, { "docid": "747a3cadb25faf5ef11b197c54891130", "score": "0.75075424", "text": "public function authorize()\n {\n if ($this->can('view-building')) {\n return true;\n }\n\n // permit residents to see their building\n $building = Building::where('id', $this->route('id'))->first();\n $resident = $this->user()->resident ?? null;\n\n\n return $resident && $resident->relations()->where('building_id', $building->id)->exists();\n }", "title": "" }, { "docid": "9cf7062eba5e301eed991dbfc61484f2", "score": "0.7502618", "text": "public function authorize()\n {\n\t\t// only allow updates if the user is logged in\n\t\treturn backpack_auth()->check();\n }", "title": "" }, { "docid": "2aceba7cfd4e8124409fc03af5d896d8", "score": "0.75019586", "text": "function isAuthorized() {\n //if( isset($this->params['prefix']))\n // return (strcasecmp($this->params['prefix'],$this->Auth->user('role'))===0);\n if (!$this->isLogin()) return false;\n return true;\n \n //shouldn't get here, better be safe than sorry\n //return false;\n }", "title": "" }, { "docid": "b8c138dfbf0a96d5b19051c395e3e939", "score": "0.7501601", "text": "public function authorize()\n {\n //TODO check if the authenticated user actually has the authority to update a given resource.\n return true;\n }", "title": "" }, { "docid": "61a127d26cc95b5414689c2525a7cf17", "score": "0.74994856", "text": "public function authorize()\n {\n if (Auth::check() && Auth::user()->level === 'admin') {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "e60c253b47ba2de673da9b9ed8b83d5b", "score": "0.74960023", "text": "public function authorize()\n {\n if(Auth::check())\n return true;\n else\n return false;\n }", "title": "" }, { "docid": "f9da0a87a777ed1680f5bdaddb08aaff", "score": "0.74959165", "text": "public function authorize()\n {\n $advert = $this->route('advert');\n\n return Auth::id() === $advert->user_id || Auth::user()->isAdministrator();\n }", "title": "" }, { "docid": "0cc11ac92ea784b1757a30c9ec928e22", "score": "0.74956346", "text": "public function authorize()\n {\n return Auth::check() && Auth::user()->is_contractor;\n }", "title": "" }, { "docid": "9320f8ef578ca5b72252eaed0363faab", "score": "0.74941915", "text": "public function authorize()\n {\n return (auth()->check() && auth()->user()->is_admin);\n }", "title": "" }, { "docid": "4f62804fddb1c64b11f8c844b4d80ca8", "score": "0.74888283", "text": "public function authorize()\n {\n if (Auth::user()->roles()->first()->role === 'admin' && Auth::check()) return true;\n return false;\n }", "title": "" }, { "docid": "b57952e918adf46f4d6781431945241d", "score": "0.74884", "text": "public function authorize()\n {\n // in-case csrf has somehow been bypassed, ensure request is from this server\n return ($this->header('referer') == config('app.url'));\n }", "title": "" }, { "docid": "7591eba5812efb48cc00fe833e0023cd", "score": "0.7485698", "text": "public function authorize()\n {\n return $this->api_token &&\n \\DB::table('user')->where(['api_token' => $this->api_token])->first()==true;\n }", "title": "" }, { "docid": "94f792385fcb99b051b81a861c1dd2df", "score": "0.7483596", "text": "public function authorize() {\n if (auth()->check() && Gate::allows('access-admin', auth()->user())) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "94f792385fcb99b051b81a861c1dd2df", "score": "0.7483596", "text": "public function authorize() {\n if (auth()->check() && Gate::allows('access-admin', auth()->user())) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "f6a9e336b24566d18d73e703514851ae", "score": "0.74829066", "text": "public function authorize()\n\t{\n\t\tif ( ! \\Auth::check() )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "42853719f6e9216772324775de4e90fb", "score": "0.74825495", "text": "public function authorize(): bool\n {\n return (bool) Auth::user();\n }", "title": "" }, { "docid": "96c9a6c7ec361f4005653c1f39cdb7d9", "score": "0.74794936", "text": "public function authorize ()\n {\n return TRUE;\n }", "title": "" }, { "docid": "8760c099bc57f5fa8739c65c1c696ac7", "score": "0.7476589", "text": "public function authorize()\n {\n // Already authorized by middleware on route.\n // No policy or gate defined for this resource thus returns true.\n return true;\n }", "title": "" }, { "docid": "7c346768ea98baf86426671339aa4d81", "score": "0.74726367", "text": "public function authorize()\n {\n return $this->user()->isSuperAdmin();\n }", "title": "" }, { "docid": "0f70212b6c7687c65179463bab4debd8", "score": "0.74722385", "text": "public function authorize()\n {\n //Should add check for user but for now just allow anyone to edit request.\n return true;\n }", "title": "" }, { "docid": "c953f72310cdb772858a87f750d36293", "score": "0.7468519", "text": "public function authorize()\n {\n $this->customer = (new FetchCustomer)\n ->actingAs($this->user())\n ->run([\n 'encoded_id' => $this->customer_id,\n ]);\n\n return $this->runningAs('object') || $this->user()->can('update', $this->customer);\n }", "title": "" }, { "docid": "a48586bdce6587a1b8d4007145196dac", "score": "0.7466968", "text": "public function authorize()\n {\n //TODO:: return true if user is admin\n return true;\n }", "title": "" }, { "docid": "8fe3797f9541eefa98c79fb818d6fb8e", "score": "0.7464665", "text": "public function authorize()\n {\n if ($this->isGet()) {\n return true;\n }\n if ($this->isPost()) {\n return auth()->user()->can('create', OrderItem::class);\n }\n if ($this->isPut()) {\n return auth()->user()->can('update', $this->route('orderItem'));\n }\n if ($this->isDelete()) {\n return auth()->user()->can('delete', $this->route('orderItem'));\n }\n\n return true;\n }", "title": "" }, { "docid": "f12f375cfb24327a150def25274a505e", "score": "0.7455374", "text": "public function authorize()\n {\n $reply = $this->route('reply');\n return $reply && $this->user()->can('updateOrDelete', $reply);\n }", "title": "" }, { "docid": "998aee2b24522e93c8d64676eed7b6d8", "score": "0.7455313", "text": "public function authorize() : bool\n {\n return $this->user()->can('viewAny', Contact::class);\n }", "title": "" } ]
a9cafd8c4e332256315a6c232ebebf89
Create request for operation 'getCustomerRegistration'
[ { "docid": "b3c1b471f95310e0dda52e0fc8740e1b", "score": "0.70680094", "text": "protected function getCustomerRegistrationRequest($customer_id)\n {\n // verify the required parameter 'customer_id' is set\n if ($customer_id === null || (is_array($customer_id) && count($customer_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $customer_id when calling getCustomerRegistration'\n );\n }\n\n $resourcePath = '/customers/{customerId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($customer_id !== null) {\n $resourcePath = str_replace(\n '{' . 'customerId' . '}',\n ObjectSerializer::toPathValue($customer_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/vnd.optile.payment.enterprise-v1-extensible+json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/vnd.optile.payment.enterprise-v1-extensible+json'],\n ['application/vnd.optile.payment.enterprise-v1-extensible+json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires HTTP basic authentication\n if ($this->config->getUsername() !== null || $this->config->getPassword() !== null) {\n $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . \":\" . $this->config->getPassword());\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" } ]
[ { "docid": "bdf462d5105c160c49a5131a036e45c5", "score": "0.6891116", "text": "public function actionCreate()\n {\n $request = Yii::app()->request;\n\n if (!$request->isPostRequest) {\n return $this->renderJson(array(\n 'status' => 'error',\n 'error' => Yii::t('api', 'Only POST requests allowed for this endpoint.')\n ), 400);\n }\n\n $options = Yii::app()->options;\n if ($options->get('system.customer_registration.enabled', 'no') != 'yes') {\n return $this->renderJson(array(\n 'status' => 'error',\n 'error' => Yii::t('api', 'Customer creation is disabled.')\n ), 400);\n }\n\n $customer = new Customer('register');\n $company = new CustomerCompany('register');\n $customerPost = (array)$request->getPost('customer', array());\n $companyPost = (array)$request->getPost('company', array());\n\n if (isset($customerPost['password'])) {\n $customerPost['fake_password'] = $customerPost['password'];\n unset($customerPost['password']);\n }\n\n $customer->attributes = $customerPost;\n $customer->tc_agree = true;\n $customer->status = Customer::STATUS_PENDING_CONFIRM;\n $companyRequired = $options->get('system.customer_registration.company_required', 'no') == 'yes';\n \n $requireApproval = $options->get('system.customer_registration.require_approval', 'no') == 'yes';\n if (!$requireApproval) {\n $customer->status = Customer::STATUS_ACTIVE;\n }\n \n if (!$customer->save()) {\n return $this->renderJson(array(\n 'status' => 'error',\n 'error' => array(\n 'general' => $customer->shortErrors->getAll()\n ),\n ), 422);\n }\n\n if ($companyRequired) {\n $country = null;\n if (!empty($companyPost['country'])) {\n $country = Country::model()->findByAttributes(array('name' => $companyPost['country']));\n if (empty($country)) {\n $customer->delete();\n return $this->renderJson(array(\n 'status' => 'error',\n 'error' => array(\n 'company' => array(\n 'country_id' => Yii::t('api', 'Unable to find the specified country, please double check the spelling!'),\n ),\n ),\n ), 422);\n }\n $companyPost['country_id'] = $country->country_id;\n unset($companyPost['country']);\n }\n if (!empty($companyPost['zone'])) {\n if (!empty($country)) {\n $zone = Zone::model()->findByAttributes(array(\n 'country_id' => $country->country_id,\n 'name' => $companyPost['zone']\n ));\n if (empty($zone)) {\n $customer->delete();\n return $this->renderJson(array(\n 'status' => 'error',\n 'error' => array(\n 'company' => array(\n 'zone_id' => Yii::t('api', 'Unable to find the specified zone, please double check the spelling!'),\n ),\n ),\n ), 422);\n }\n $companyPost['zone_id'] = $zone->zone_id;\n }\n unset($companyPost['zone']);\n }\n\n $company->attributes = $companyPost;\n $company->customer_id = $customer->customer_id;\n\n if (!$company->save()) {\n $customer->delete();\n return $this->renderJson(array(\n 'status' => 'error',\n 'error' => array(\n 'company' => $company->shortErrors->getAll()\n ),\n ), 422);\n }\n }\n\n $this->_sendRegistrationConfirmationEmail($customer, $company);\n $this->_sendNewCustomerNotifications($customer, $company);\n\n return $this->renderJson(array(\n 'status' => 'success',\n 'customer_uid' => $customer->customer_uid,\n ), 201);\n }", "title": "" }, { "docid": "45d336fba15bc001036f5b52f58bc611", "score": "0.6847226", "text": "public static function ToRegisterCustomer()\n {\n return self::Build('register-customer/', 'https');\n }", "title": "" }, { "docid": "23aed22ef2a3712864c78d3a4fe248df", "score": "0.6625268", "text": "protected function customersGetRequest()\n {\n\n $resourcePath = '/customers';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires Bearer token\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "c519f7f4e6e450b5117d1eee26aaf94f", "score": "0.6360696", "text": "public function actionGetCustomer() {\n $purifier = Purifier::getInstance();\n $response = JsonResponse::getInstance();\n $data = $purifier->purify(Yii::app()->request->getParam('data', []));\n if ($data) {\n $model = Customers::model()->find('customer_nit=:nit AND customer_document_type=:type', [\n ':type' => $data['document_type'],\n ':nit' => $data['document_number'],\n ]\n );\n if ($model) {\n $companyCustomer = CompaniesCustomers::getByNit($data['document_number']);\n if ($companyCustomer) {\n $response->error('Ya tiene registrado el cliente ' . $data['document_number'])\n ->output();\n }\n $attributes = $model->attributes;\n unset($attributes['customer_nit'], $attributes['customer_document_type']);\n $response->model = $attributes;\n }\n }\n\n $response->output();\n }", "title": "" }, { "docid": "2f9435383c42bc655fef48fc8db2cc0c", "score": "0.61617327", "text": "public function registerCustomer($request){\n \ttry{\n // DB::beginTransaction();\n $post = array_except($request->all(),['_token','password_confirmation','captcha']);\n\t\t\t$result = $this->Make_Login('customer/signup',$post);\n if($result->status){\n $response['url'] = url('/');\n\t\t\t\t$response['message'] = trans('messages.user_registered');\n\t\t\t\t$response['delayTime'] = 5000;\n\t\t\t\treturn $this->getSuccessResponse($response);\n }else{\n\t\t\t\t// return $this->getErrorResponse(trans('messages.error'));\n\t\t\t\treturn $this->getErrorResponse($result->message);\n }\n }catch(\\Exception $e){\n // DB::rollback();\n return $this->getErrorResponse($e->getMessage());\n } \n }", "title": "" }, { "docid": "1f28e1fc6b1b8fffeceb2554f948c5ee", "score": "0.6132704", "text": "public function register_customer($data)\n {\n \t$query = $this->db->select('customer', $data);\n \treturn $query;\n\t}", "title": "" }, { "docid": "951d2f4df1153027c914865afe4320a5", "score": "0.6060202", "text": "protected function deleteCustomerRegistrationRequest($customer_id)\n {\n // verify the required parameter 'customer_id' is set\n if ($customer_id === null || (is_array($customer_id) && count($customer_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $customer_id when calling deleteCustomerRegistration'\n );\n }\n\n $resourcePath = '/customers/{customerId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($customer_id !== null) {\n $resourcePath = str_replace(\n '{' . 'customerId' . '}',\n ObjectSerializer::toPathValue($customer_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/vnd.optile.payment.enterprise-v1-extensible+json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/vnd.optile.payment.enterprise-v1-extensible+json'],\n ['application/vnd.optile.payment.enterprise-v1-extensible+json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'DELETE',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "38e6642028adc7462844240bc6d5bc71", "score": "0.5988244", "text": "public function register()\n {\n \t$this->db->select('cu_fullname, cu_username, cu_password, cu_email, cu_address,\n \t\t\t\t\t cu_tel_no');\n \t$query = $this->db->get('customer');\n\n \treturn $query->result_array();\n }", "title": "" }, { "docid": "32ad6894a3734271a05aca65c5d84d77", "score": "0.59850305", "text": "public static function customer($request)\n {\n return self::gatewayRequest('POST', '/api/customer', $request);\n }", "title": "" }, { "docid": "8ca528f149efc25a17a937a373ba6343", "score": "0.5927762", "text": "private function registration(){\n\n\t\tif ($this->get_request_method() != \"POST\") {\n\t\t\t$this->response($this->json(array('status' => 'false','status_code' => 405, 'message' => 'Only POST methods allowed.')), 405);\n\t\t}\n\t\t\n\t\tif (isset($this->_request['token'])) {\n\t\t\t$token = $this->_request['token'];\n\t\t\t$key = 'AAAAB3NzaC1yc2EAAAABJQAAAQEA4iLjh8691V6SUtzh17mgRua5zTOBhQ+KMyE6YOc2pB7E4jl5oy66UNfrb1RGoqpnI8ni5KGypRUxAXqT+aCM3kGbsrNeTmw8tL0ThHGg2y3D3Kvto97FwX+dRhCDWdjntvr6deAwPoaxfvGMJU1u9/GH3MFLYDIVHE4dGc8uw87Gdaw18KV76YZE4ipkJ2MoupAnoi8KAtRYLct42smmGwRiMpp/dpSbrHkEJxqQyH/7iFAYnWYzbxVMZcghXwkjwWD51pAXlsz65rd/AyyAOOweT9jbvi/QxnDFBtHeLDoRHuTzO muVTx44UqmdSx13fJQIkm4M1MFjkPWpvh0Bw';\n\n\t\t\tif(!$token == $key){\n\t\t\t\t$this->response($this->json(array('status' => 'false','status_code' => 203, 'message' => 'You are not authorized to perform this request.')), 203);\n\t\t\t}else{\n\t\t\n\t\t\tif (isset($this->_request['account_id'])&& !empty($this->_request['account_id'])) {\n\n\t\t\t\t\t$account_id = $this->_request['account_id'];\n\t\t\t\t\t$name = $this->_request['name'];\n\t\t\t\t\t$phone = $this->_request['phone'];\n\t\t\t\t\t$email = $this->_request['email'];\n\t\t\t\t\t$entry_date = $this->_request['entry_date'];\n\t\t\t\t\t$last_visit = $this->_request['last_visit'];\n\t\t\t\t\t$customer_store_id = $this->_request['customer_store_id'];\n\n\t\t\t\t\tdate_default_timezone_set('Africa/Nairobi');\n\t\t\t\t\t$Trans_date = date('Y-m-d H:i:s');\t\n\t\t\t\t\t$month = date('m');\t\n\t\t\t\t\t$year = date('Y');\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$R_ID = \"INSERT INTO `member_contact` (`created_at`, `created_by`,`customer_store_id`,`member_id`, `member_name`,`mobile_number`, `email_address`,`entry_date`,`last_visit`) VALUES ('$Trans_date', 'CC','$customer_store_id', '$account_id', '$name','$phone', '$email','$entry_date', '$last_visit');\";\n\t\t\t\t\t\n\t\t\t\t\t$Rresult = (mysqli_query(Connect_Database(),$R_ID))? 1:0;\n\t\t\t\t\t\n\t\t\t\t\tif($Rresult == 0){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t $res = array('status' => 'false','status_code' => 404,'Content-Type' => 'application/x-www-form-urlencoded', 'message' => 'Member Registration error', 'Account ID' => $account_id, 'SQL ' => $R_ID, 'query_date' => $Trans_date.' Africa.Nairobi ');\n\t\t\t\t\t\t $this->response($this->json($res), 200);\n\t\t\t\t\t\t \n\t\t\t\t\t}else{\n\t\t\t\t\t\t $res = array('status' => 'true','status_code' => 200, 'query_date' => $Trans_date.' Africa.Nairobi ','message' => ' Member registration successful.','Content-Type' => 'application/x-www-form-urlencoded','Account ID' => $account_id,'Registration Date'=> $entry_date);\n\t\t\t\t\t\t $this->response($this->json($res), 200);\n\t\t\t\t\t}\n\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$error = array('status' => 'false','status_code' => 405, 'message' => 'You are not authorized to perform this request.', 405);\n $this->response($this->json($error), 405);\n\t}", "title": "" }, { "docid": "c0dffb8ac5e566468a85857b7da451cc", "score": "0.5851553", "text": "public function getCustomer()\n {\n // Retrieve customer details.\n $details = (array) Auth::user();\n\n // Make sure we only return those fields specified by the main API and that are\n // relevant to the requesting client.\n $keep = ['id', 'email', 'postcode', 'name', 'locale', 'language', 'phone'];\n\n // Remove unwanted fields.\n return $this->send(array_only($details, $keep));\n }", "title": "" }, { "docid": "8a4f6200f8c2571417eb66f0e70df430", "score": "0.58430636", "text": "protected function customersCustomerIdGetRequest($customerId)\n {\n // verify the required parameter 'customerId' is set\n if ($customerId === null || (is_array($customerId) && count($customerId) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $customerId when calling customersCustomerIdGet'\n );\n }\n\n $resourcePath = '/customers/{customerId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($customerId !== null) {\n $resourcePath = str_replace(\n '{' . 'customerId' . '}',\n ObjectSerializer::toPathValue($customerId),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires Bearer token\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "17a99b37eaecafc0cd46a8d340b0c882", "score": "0.5841635", "text": "public function getCustomer() {\n $users = User::where('role_id', '=', $this->customer->id)->get();\n\n $res = [\n 'type' => 'success',\n 'message' => 'Get customer information successfully.',\n 'data' => UserResource::collection($users)\n ];\n\n return response($res, 200);\n }", "title": "" }, { "docid": "bc18bee429dce88480973ff51e0b5d1b", "score": "0.5800691", "text": "public function createCustomer($data);", "title": "" }, { "docid": "8891982fb01b5035f050ca7425cf801a", "score": "0.5767969", "text": "public function createCustomer($data)\n {\n return $this->post('customers', $data);\n }", "title": "" }, { "docid": "b4b51a190427587edca1906bbb30f409", "score": "0.57066065", "text": "protected function generate_customer_request( $args = array() ) {\n $args += array(\n 'merchantNo' => $this->merchant_no,\n 'storeNo' => $this->store_no,\n );\n\n return $args;\n }", "title": "" }, { "docid": "147d96e0c4831e169b74db13e63bb9fe", "score": "0.56696135", "text": "public function createCustomer(Request $request) {\n $response = array();\n $parameters = $request->json()->all();\n \n $rules = array(\n 'name' => 'required'\n );\n $customer_name = $parameters['name'];\n \n $messages = array(\n 'name.required' => 'name is required.'\n );\n \n $validator = \\Validator::make(array('name' => $customer_name), $rules, $messages);\n if(!$validator->fails()) {\n $response = Customer::create($parameters);\n \n return Helper::jsonpSuccess($response);\n } else {\n $errors = $validator->errors();\n return Helper::jsonpError('Validation error(s) occurred', 400, 400, $errors->all());\n }\n }", "title": "" }, { "docid": "b26f4176d4dbeff4992090cea6f90fbe", "score": "0.5665972", "text": "function register($firstname, $lastname, $username, $email, $password)\n{\n $request = array();\n\n $request['type'] = \"Register\";\n $request['firstname'] = $firstname;\n $request['lastname'] = $lastname;\n $request['username'] = $username;\n $request['password'] = $password;\n $request['email'] = $email;\n\n $returnedValue = createClientRequest($request);\n\n return $returnedValue;\n}", "title": "" }, { "docid": "e080b598cb2037549b90b7840a5d5ecc", "score": "0.5652474", "text": "public function customerReg()\n {\n return view('admin.customerRegistation');\n }", "title": "" }, { "docid": "3f7e98d360badf831eeecbff90dddc7a", "score": "0.5650779", "text": "function createCustomer($passwd, $lastname, $firstname, $email) {\n\n //Here we take the customer schema and add our datas\n $webService = new PrestaShopWebservice(PS_SHOP_PATH, PS_WS_AUTH_KEY, DEBUG);\n $xml = $webService->get(array('url' => PS_SHOP_PATH . '/api/customers?schema=blank'));\n $resources = $xml->children()->children();\n $resources->id_default_group = 3;\n $resources->passwd = $passwd;\n $resources->lastname = $lastname;\n $resources->firstname = $firstname;\n $resources->email = $email;\n $resources->active = true;\n $resources->associations->groups->group->id = 3;\n\n //Here we call to add a new customer\n try {\n $opt = array('resource' => 'customers');\n $opt['postXml'] = $xml->asXML();\n $xml_request = $webService->add($opt);\n\n } catch (PrestaShopWebserviceException $ex) {\n\n echo '<b>Error : '.$ex->getMessage().'</b>';\n $trace = $ex->getTrace();\n print_r($trace);\n\n }\n}", "title": "" }, { "docid": "8d66356a4a2d2415081fee752f619029", "score": "0.56289566", "text": "public function registeredBy(Request $request, $value) \n {\n $result = \"\";\n \n $api_client = new ApiClient();\n if ($api_client->get(\"/api/customers/registeredby/$value\")) {\n $result = $api_client->getBody();\n } else {\n Log::error(\"AJAX get customer registeredBy with request: \" . $api_client->getUrl());\n return response()->json(['error' => '获取不到信息!'], 500);\n }\n\n return $result;\n }", "title": "" }, { "docid": "9830561f5b2cc091652014e29c945d76", "score": "0.56285805", "text": "public function customerAction()\n {\n $orderId = $this->apiRequest->getId();\n if (\n !Zend_Validate::is(trim($this->apiRequest->getEmail()), 'EmailAddress') ||\n !is_numeric($orderId)\n ) {\n $this->sendResponse(['error' => 'invalid parmas']);\n return;\n }\n\n $account = Mage::getSingleton('swell/account');\n $customer = $account->getCustomer(\n $this->apiRequest->getSharedSecret(),\n $this->apiRequest->getId(),\n $this->apiRequest->getEmail()\n );\n\n $this->sendResponse($customer);\n }", "title": "" }, { "docid": "902c60df0e3b4a72488423631438a622", "score": "0.5623752", "text": "public function get() {\n\n return $this->httpGet('/api/v3/Customer');\n }", "title": "" }, { "docid": "8b2fd86ad00f8bfd09073216679cf6c1", "score": "0.5605546", "text": "public function createAction()\n {\n Mage::getSingleton('core/session')->getMessages(true);\n\n if (version_compare(Mage::getVersion(),\"1.9.2.2\",\">=\"))\n {\n // Only from 1.9.2.2\n if (!$this->_validateFormKey()) {\n return;\n }\n }\n\n $session = Mage::getSingleton('customer/session');\n\n if ($session->isLoggedIn()) {\n return;\n }\n\n $session->setEscapeMessages(true); // prevent XSS injection in user input\n if (!$this->getRequest()->isPost()) {\n return;\n }\n\n $result = array(\n 'success' => false\n );\n\n $customer = $this->_getCustomer();\n\n try {\n $errors = $this->_getCustomerErrors($customer);\n\n if (empty($errors)) {\n if (version_compare(Mage::getVersion(),\"1.9.1.0\",\">=\"))\n {\n // Only from 1.9.1.0\n $customer->cleanPasswordsValidationData();\n }\n $customer->save();\n Mage::dispatchEvent('customer_register_success',\n array('account_controller' => $this, 'customer' => $customer)\n );\n $result['redirect'] = $this->_successProcessRegistration($customer);\n $result['success'] = true;\n } else {\n $result['error'] = $errors;\n $this->_addSessionError($errors);\n }\n } catch (Mage_Core_Exception $e) {\n $session->setCustomerFormData($this->getRequest()->getPost());\n if ($e->getCode() === Mage_Customer_Model_Customer::EXCEPTION_EMAIL_EXISTS) {\n $url = Mage::getUrl('customer/account/forgotpassword');\n $message = $this->__('There is already an account with this email address. If you are sure that it is your email address, <a href=\"%s\">click here</a> to get your password and access your account.', $url);\n $session->setEscapeMessages(false);\n } else {\n $message = $e->getMessage();\n }\n $result['error'] = $message;\n } catch (Exception $e) {\n $result['error'] = $this->__('Cannot save the customer.');\n }\n\n $this->getResponse()\n ->setHeader('Access-Control-Allow-Origin', rtrim(Mage::getUrl(''),'/'))\n ->setHeader('Access-Control-Allow-Headers', 'Access-Control-Allow-Origin')\n ->setHeader('Access-Control-Expose-Headers', 'x-json')\n ->setHeader('Access-Control-Allow-Credentials', 'true')\n ->setBody(Mage::helper('core')->jsonEncode($result));\n }", "title": "" }, { "docid": "1a67c15b0c477d01bd0cd463fac2d4ed", "score": "0.560345", "text": "public function getCustomer();", "title": "" }, { "docid": "1a67c15b0c477d01bd0cd463fac2d4ed", "score": "0.560345", "text": "public function getCustomer();", "title": "" }, { "docid": "1a67c15b0c477d01bd0cd463fac2d4ed", "score": "0.560345", "text": "public function getCustomer();", "title": "" }, { "docid": "1a67c15b0c477d01bd0cd463fac2d4ed", "score": "0.560345", "text": "public function getCustomer();", "title": "" }, { "docid": "14c7e3ecc0dfe0ee713f4b09e887ab34", "score": "0.55005807", "text": "public function run($data){\n /** @var RegisterRequest $request */\n $request = RegisterRequest::parseFromString($data);\n /** @var CustomerResponse $response */\n $response = false;\n //判断验证码是否正确\n /** @var VerifyCode $verify */\n $verify = VerifyCode::find()\n ->where(['phone' => $request->getPhone(), 'verify_type' => CustomerSms::SMS_TYPE_REGISTER])\n ->orderBy(['created_at' => SORT_DESC])\n ->one();\n //用户名不能为纯数字\n if(is_numeric($request->getUsername())){\n CustomerException::customerRegisterUsernameNumeric();\n }\n if ($verify && $verify['code'] == $request->getCode()) {\n if($request->getUsername() != '' && LeCustomers::checkUserByUserName($request->getUsername())){\n CustomerException::customerUsernameAlreadyRegistered();\n }\n if(LeCustomers::checkUserByPhone($request->getPhone())){\n CustomerException::customerPhoneAlreadyRegistered();\n }\n /* @var LeCustomers $customer */\n $customer = new LeCustomers();\n $customer->username = $request->getUsername();\n $customer->phone = $request->getPhone();\n $customer->password = Security::passwordHash($request->getPassword());\n $customer->auth_token = UserTools::getRandomString(16);\n $customer->created_at = date('Y-m-d H:i:s');\n $customer->updated_at = date('Y-m-d H:i:s');\n if($customer->save()){\n $response = $this->getCustomerInfo($customer);\n }else{\n Tools::logException(print_r($customer->errors,true));\n CustomerException::customerRegisterFailed();\n }\n } else {\n CustomerException::verifyCodeError();\n }\n return $response;\n }", "title": "" }, { "docid": "d17145c6a44c204751860c45dd8b9f6d", "score": "0.5493081", "text": "function create_customer(){\n\t\t$this->simple_page(\"new_customer\");\n\t}", "title": "" }, { "docid": "60034dde85ed8c6337b1843bf0d8845d", "score": "0.54829013", "text": "public function getCustomers()\n {\n $this->endpoint = 'admin/customers.json';\n $this->method = 'GET';\n $this->query = '';\n\n return $this->submit();\n }", "title": "" }, { "docid": "54d10763f5753e98bcf409134031a378", "score": "0.5472375", "text": "public function createCustomer(array $params)\n {\n $client = $params['client'];\n $country = \\Country::where('name', '=', $client->country)->first();\n\n // Extract the country code from the telephone number.\n $phone = $this->formatPhone($client->phone, $country->iso_code);\n\n $customer_params = array(\n 'username' => $client->email,\n 'passwd' => substr(md5(\\App::get('str')->random()), 0, 15),\n 'name' => $client->first_name.' '.$client->last_name,\n 'company' => ($client->company !='' ? $client->company : 'None'),\n 'address-line-1' => $client->address1,\n 'city' => $client->city,\n 'state' => $client->state,\n 'country' => $country->iso_code,\n 'zipcode' => $client->postcode,\n 'phone-cc' => $phone['cc'],\n 'phone' => $phone['number'],\n 'lang-pref' => 'en', // Hardcoded as we dont need multi-lingual support for api calls\n );\n\n $customer_id = $this->post('/customers/signup.json', $customer_params);\n if(isset($customer_id->status) && $customer_id->status == 'ERROR') {\n return $customer_id->message;\n }\n $params['customer-id'] = $customer_id;\n // Customer is now registered, now create the default contact details for them.\n $contact = $this->createContact($params);\n\n return $customer_id;\n }", "title": "" }, { "docid": "869c7dfaa1f6200ae2e34e54de77c2e4", "score": "0.5466926", "text": "public function allCustomer($limit=null, $page_no=null, $customer_id=null, $email=null, $name=null, $company=null, $city=null, $state=null, $country_code=null, $status=null, $creation_date_start=null, $creation_date_end=null, $total_receipts_start=null, $total_receipts_end=null)\n {\n\n\n // parse inputs\n $resourcePath = \"/customers\";\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n $method = \"GET\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = ApiClient::selectHeaderAccept(array());\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());\n\n // query params\n if ($limit !== null) {\n $queryParams['limit'] = $this->apiClient->getSerializer()->toQueryValue($limit);\n }// query params\n if ($page_no !== null) {\n $queryParams['page_no'] = $this->apiClient->getSerializer()->toQueryValue($page_no);\n }// query params\n if ($customer_id !== null) {\n $queryParams['customer_id'] = $this->apiClient->getSerializer()->toQueryValue($customer_id);\n }// query params\n if ($email !== null) {\n $queryParams['email'] = $this->apiClient->getSerializer()->toQueryValue($email);\n }// query params\n if ($name !== null) {\n $queryParams['name'] = $this->apiClient->getSerializer()->toQueryValue($name);\n }// query params\n if ($company !== null) {\n $queryParams['company'] = $this->apiClient->getSerializer()->toQueryValue($company);\n }// query params\n if ($city !== null) {\n $queryParams['city'] = $this->apiClient->getSerializer()->toQueryValue($city);\n }// query params\n if ($state !== null) {\n $queryParams['state'] = $this->apiClient->getSerializer()->toQueryValue($state);\n }// query params\n if ($country_code !== null) {\n $queryParams['country_code'] = $this->apiClient->getSerializer()->toQueryValue($country_code);\n }// query params\n if ($status !== null) {\n $queryParams['status'] = $this->apiClient->getSerializer()->toQueryValue($status);\n }// query params\n if ($creation_date_start !== null) {\n $queryParams['creation_date_start'] = $this->apiClient->getSerializer()->toQueryValue($creation_date_start);\n }// query params\n if ($creation_date_end !== null) {\n $queryParams['creation_date_end'] = $this->apiClient->getSerializer()->toQueryValue($creation_date_end);\n }// query params\n if ($total_receipts_start !== null) {\n $queryParams['total_receipts_start'] = $this->apiClient->getSerializer()->toQueryValue($total_receipts_start);\n }// query params\n if ($total_receipts_end !== null) {\n $queryParams['total_receipts_end'] = $this->apiClient->getSerializer()->toQueryValue($total_receipts_end);\n }\n\n\n\n\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } else if (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n\n // make the API Call\n try\n {\n list($response, $httpHeader) = $this->apiClient->callApi(\n $resourcePath, $method,\n $queryParams, $httpBody,\n $headerParams\n );\n\n return array($response, $httpHeader);\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n\n throw $e;\n }\n\n }", "title": "" }, { "docid": "6d5e0490659e49194cf03bcded58f070", "score": "0.5455766", "text": "private function requestCreateOrder() {\n\t\t$data = [\"CREATESO\"];\n\t\t$this->requestDplus($data, $addcustID = false);\n\t}", "title": "" }, { "docid": "c43d893b435e2dd0a846cbeb87f2cadd", "score": "0.5451542", "text": "public function createCustomer($data)\n {\n $this->queryUrl = $this->baseUrl . \"customers.json\";\n /** @var Response $response */\n $response = $this->postData($data);\n if($this->responseObj){\n //Return response obj if set to true\n return $response;\n } else {\n return json_decode($response->getBody(), true);\n }\n }", "title": "" }, { "docid": "2295f0f84374e3670e703e3982a122b0", "score": "0.5418915", "text": "public function createAction(Request $request)\n {\n $form = $this->createForm(new CustomerType());\n $form->bind($request);\n\n if ($form->isValid()) {\n $entity = $form->getData();\n\n try {\n /** @var $factory \\Terramar\\Bundle\\CustomerBundle\\Factory\\CustomerFactoryInterface */\n $factory = $this->get('terramar.customer.factory.customer');\n $factory->buildCustomer($entity);\n\n $profile = $this->get('terramar.sales.factory.customer_sales_profile')->create($entity, $this->getCurrentOffice());\n\n $em = $this->getDoctrine()->getManager();\n $em->persist($profile);\n $em->persist($entity);\n $em->flush();\n\n $this->getSession()->getFlashBag()->set('success', 'The customer has been created successfully.');\n\n return $this->redirect($this->generateUrl('customers'));\n } catch (DuplicateEmailException $e) {\n $form->get('emailAddress')->addError(new FormError('This email address is in use by another customer.'));\n }\n }\n\n return array(\n 'form' => $form->createView()\n );\n }", "title": "" }, { "docid": "cfc6a97b9dc77bb3c06764ace338db21", "score": "0.54147017", "text": "public function create() {\n\n\t\tif(!empty(Input::get('email_address_2'))) return false;\n\n\t\t$create_customer = Braintree_Customer::create([\n\t\t\t\"firstName\" => Input::get('first_name'),\n\t\t\t\"lastName\" => Input::get('last_name'),\n\t\t\t'email' => Input::get('email_address'),\n\t\t\t\"creditCard\" => [\n\t\t\t \"number\" => Input::get('card_number'),\n\t\t\t \"expirationMonth\" => Input::get('expiration_month'),\n\t\t\t \"expirationYear\" => Input::get('expiration_year'),\n\t\t\t \"cvv\" => Input::get('cvv'),\n\t\t\t \"billingAddress\" => [\n\t\t\t \"postalCode\" => Input::get('postal_code'),\n\t\t\t \"streetAddress\" => Input::get('mailing_address'),\n\t\t\t \"locality\" => Input::get('city'),\n\t\t\t \"region\" => Input::get('state')\n\t\t\t ]\n\t\t\t]\n\n\t\t]);\n\n\t\t$amount = Input::get('selector');\n\n\t\tif ($create_customer->success) {\n\n\t\t\tLog::info(\"creating a customer was a success\");\n\n\t\t\treturn Redirect::route('subscribeCustomer', ['customerId' => $create_customer->customer->id, 'amount' => $amount]);\n\n\t\t} else {\n\n\t\t\techo(\"Validation errors:<br/>\");\n\n\t\t\tforeach ($create_customer->errors->deepAll() as $error) {\n\t\t\t echo(\"- \" . $error->message . \"<br/>\");\n\t\t\t}\n\n\t\t\techo(\"</br><a href='javascript:javascript:history.go(-1)'>Go Back</a>\");\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "d10beafb0ca5662a9463e7e32cb21f66", "score": "0.5396097", "text": "public function create_customer($id_user)\n {\n $whitelist = array('127.0.0.1', '::1');\n if (in_array($_SERVER['REMOTE_ADDR'], $whitelist)) {\n return 1;\n }\n $setting_global = $this->db->get('settings_global')->row_array();\n $data_user = $this->db->where('id', $id_user)->get('users')->row();\n $organization_id = $setting_global['zoho_organization_id'];\n $authtoken = $setting_global['zoho_authtoken'];\n //replace your organization_id , authtoken and subscription_id with your values\n $hdrarray = array(\n 'X-com-zoho-subscriptions-organizationid: '.$organization_id,\n 'Authorization: Zoho-authtoken '.$authtoken,\n 'Content-Type: application/json;charset=UTF-8', );\n // create a new cURL resource\n if ($data_user->role == 1) {\n $display_name = $data_user->firstname.' '.$data_user->lastname;\n } elseif ($data_user->role == 2) {\n $display_name = $data_user->fan_name;\n if (empty($display_name)) {\n $display_name = $data_user->firstname.' '.$data_user->lastname;\n }\n }\n $param_post = '{\n \"display_name\": \"'.$display_name.'\",\n \"first_name\": \"'.$data_user->firstname.'\",\n \"last_name\": \"'.$data_user->lastname.'\",\n \"email\": \"'.$data_user->email.'\",\n \"company_name\": \"\"\n }';\n $ch = curl_init('https://subscriptions.zoho.com/api/v1/customers ');\n // set URL and other appropriate options\n curl_setopt($ch, CURLOPT_HTTPHEADER, $hdrarray);\n curl_setopt($ch, CURLOPT_POST, true);\n curl_setopt($ch, CURLOPT_POSTFIELDS, ($param_post));\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $result = curl_exec($ch);\n $data_json = json_decode($result);\n curl_close($ch);\n if ($data_json->code == 0) {\n //The customer has been created\n $customer_id = $data_json->customer->customer_id;\n $this->db->where('id', $id_user)->update('users', array('id_zoho' => $customer_id));\n }\n }", "title": "" }, { "docid": "9a907e9c1de8db7845fa977ce2fac579", "score": "0.53777564", "text": "public static function customerSearch($request)\n {\n return self::gatewayRequest('POST', '/api/customer-search', $request);\n }", "title": "" }, { "docid": "cc25297901a2a42c5b4e3abd760c2231", "score": "0.5370818", "text": "protected function listSubAccountsRequest()\n {\n\n $resourcePath = '/sub_accounts';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires Gate APIv4 authentication\n $signHeaders = $this->config->buildSignHeaders('GET', $resourcePath, $queryParams, $httpBody);\n $headers = array_merge($headers, $signHeaders);\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "0a86279c3bbe1ee7fe3ca3f12d1d4fda", "score": "0.535908", "text": "public function preconditionsCreateCustomer()\n {\n $userData = $this->loadData('generic_customer_account');\n $this->navigate('manage_customers');\n $this->customerHelper()->createCustomer($userData);\n $this->assertMessagePresent('success', 'success_saved_customer');\n return array('email' => $userData['email'],\n 'password' => $userData['password']);\n }", "title": "" }, { "docid": "ad75f5338f37e83ef0bb60dd851f334c", "score": "0.53536546", "text": "public function testCreateCustomer(): void\n {\n $authToken = $this->getAuthToken();\n\n $response = static::createClient()->request(\n Request::METHOD_POST,\n '/api/customers',\n ['auth_bearer' => $authToken, 'json' => [\n 'type' => 'PERSON',\n 'firstname' => 'Firstname-test',\n 'lastname' => 'Lastname-test',\n 'email' => '[email protected]',\n 'address' => '119 avenue Aléatoire',\n 'city' => 'Paris',\n 'postalCode' => 75000,\n 'country' => 'FRA',\n ]]\n );\n\n $this->assertResponseIsSuccessful();\n $this->assertResponseStatusCodeSame(Response::HTTP_CREATED);\n $this->assertJsonContains([\n '@context' => '/api/contexts/Customer',\n '@type' => 'Customer',\n 'type' => 'PERSON',\n 'firstname' => 'Firstname-test',\n 'lastname' => 'Lastname-test',\n 'email' => '[email protected]',\n 'address' => '119 avenue Aléatoire',\n 'city' => 'Paris',\n 'postalCode' => 75000,\n 'country' => 'FRA',\n ]);\n $this->assertMatchesRegularExpression('~^/api/customers/\\d+$~', $response->toArray()['@id']);\n $this->assertMatchesResourceItemJsonSchema(Customer::class);\n }", "title": "" }, { "docid": "672ef287ffa74111dd8f51a85e6e4aa9", "score": "0.5352328", "text": "public function getCustomer($optParams = [])\n {\n $params = [];\n $params = array_merge($params, $optParams);\n return $this->call('getCustomer', [$params], CustomerSettings::class);\n }", "title": "" }, { "docid": "95a40ad039cdf2dbeb3de5e1e755b26d", "score": "0.53452915", "text": "public function getAddCustomers($request, $id);", "title": "" }, { "docid": "b89fb39392ff539d739a9d2f2dcd7098", "score": "0.53141296", "text": "public function get_customer() {\n\t $name = '';\n\t $email = '';\n\t $user_id = 0;\n\t\n\t if ( $order = $this->get_order() ) {\n\t $first_name = is_callable( array( $order, 'get_billing_first_name' ) ) ? $order->get_billing_first_name() : $order->billing_first_name;\n\t $last_name = is_callable( array( $order, 'get_billing_last_name' ) ) ? $order->get_billing_last_name() : $order->billing_last_name;\n\t $name = trim( $first_name . ' ' . $last_name );\n\t $email = is_callable( array( $order, 'get_billing_email' ) ) ? $order->get_billing_email() : $order->billing_email;\n\t $user_id = is_callable( array( $order, 'get_customer_id' ) ) ? $order->get_customer_id() : $order->customer_user;\n\t $name \t\t= 0 !== absint( $user_id ) ? $name : sprintf( _x( '%s (Guest)', 'Guest string with name from booking order in brackets', 'woocommerce-bookings' ), $name );\n\t } elseif ( $this->get_customer_id() ) {\n\t $user = get_user_by( 'id', $this->get_customer_id() );\n\t $name = $user->display_name;\n\t $email = $user->user_email;\n\t $user_id = $this->get_customer_id();\n\t }\n\t return (object) array(\n\t 'name' => $name,\n\t 'email' => $email,\n\t 'user_id' => $user_id,\n\t );\n\t}", "title": "" }, { "docid": "50fb7fa3a1330b77f3cdcdb8aa719143", "score": "0.5296782", "text": "protected function getCustomerRequest($x_sds_service_token, $customer_id, $x_sds_date_format = null, $include_attributes = null)\n {\n // verify the required parameter 'x_sds_service_token' is set\n if ($x_sds_service_token === null || (is_array($x_sds_service_token) && count($x_sds_service_token) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $x_sds_service_token when calling getCustomer'\n );\n }\n // verify the required parameter 'customer_id' is set\n if ($customer_id === null || (is_array($customer_id) && count($customer_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $customer_id when calling getCustomer'\n );\n }\n\n $resourcePath = '/v4/provisioning/customers/{customer_id}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($include_attributes !== null) {\n $queryParams['include_attributes'] = ObjectSerializer::toQueryValue($include_attributes);\n }\n // header params\n if ($x_sds_date_format !== null) {\n $headerParams['X-Sds-Date-Format'] = ObjectSerializer::toHeaderValue($x_sds_date_format);\n }\n // header params\n if ($x_sds_service_token !== null) {\n $headerParams['X-Sds-Service-Token'] = ObjectSerializer::toHeaderValue($x_sds_service_token);\n }\n\n // path params\n if ($customer_id !== null) {\n $resourcePath = str_replace(\n '{' . 'customer_id' . '}',\n ObjectSerializer::toPathValue($customer_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json;charset=UTF-8']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json;charset=UTF-8'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "9831f47daecbcb8ebee2b5d1e3e438f9", "score": "0.52932614", "text": "public function check_customer()\r\n\t{\r\n\t\t$email \t\t\t= $this->input->post('email');\r\n\t\t$obj \t\t\t= new stdClass();\r\n\t\t$obj->customer \t= $this->db->get_where('customers', ['_email' => $email])->row();\r\n\t\t$obj->boolean \t= $obj->customer !== NULL;\r\n\r\n\t\t# if customer does not exist generate user\r\n\t\treturn $obj;\r\n\t}", "title": "" }, { "docid": "e7773e88088e403de2f33b44810bea3e", "score": "0.5292372", "text": "protected function customersCustomerIdBillingAddressesGetRequest($customerId)\n {\n // verify the required parameter 'customerId' is set\n if ($customerId === null || (is_array($customerId) && count($customerId) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $customerId when calling customersCustomerIdBillingAddressesGet'\n );\n }\n\n $resourcePath = '/customers/{customerId}/billing-addresses';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($customerId !== null) {\n $resourcePath = str_replace(\n '{' . 'customerId' . '}',\n ObjectSerializer::toPathValue($customerId),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires Bearer token\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "d64fc763b92a6f74031ab704e496b0d3", "score": "0.52907556", "text": "public function customerAction(){\n\n\t\t\n\n\t\t$this->view->filteruser = (isset($this->Request['username'])) ? $this->Request['username'] :'' ;\n\n\t\t$this->view->filtercompany = (isset($this->Request['company'])) ? $this->Request['company'] :'' ;\n\n\t\t$this->view->filterpostcode = (isset($this->Request['postcode'])) ? $this->Request['postcode'] :'' ;\n\n\t\t$this->view->filterdepot = (isset($this->Request['filterdepot'])) ? $this->Request['filterdepot'] :'' ;\n\n\t\t\n\n\t\t$record = $this->AccountObj->customerList($this->Request);\n\n\t\t$this->view->records = \t$record;\n\n\t\t$this->view->depots = $this->AccountObj->getDepotList();\t// depot list\n\n\t\t$this->view->customerList = $this->AccountObj->getCustomerList();\n\n\t}", "title": "" }, { "docid": "cf8c71a0ab7a319ee01e822d9b2035f1", "score": "0.5290083", "text": "public function actionCreate()\n {\n $model = new Customer([\n 'scenario' => Customer::SCENARIO_ADMIN_CREATE\n ]);\n\n if ($model->load(request()->post()) && $model->save()) {\n $model->sendRegistrationEmail();\n notify()->addSuccess(t('app','Your action is complete.'));\n return $this->redirect(['view', 'id' => $model->customer_id]);\n } else {\n return $this->render('form', [\n 'action'=> 'create',\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "d1bb6637360ceadf0ba165622290ed5c", "score": "0.52743375", "text": "protected function indexCustomersRequest($company_name = null, $search = null)\n {\n\n $resourcePath = '/customers';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($company_name !== null) {\n $queryParams['company_name'] = ObjectSerializer::toQueryValue($company_name);\n }\n // query params\n if ($search !== null) {\n $queryParams['search'] = ObjectSerializer::toQueryValue($search);\n }\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers= $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "de4f10e6f6b1cd6b99056aed2498e3ad", "score": "0.5249424", "text": "public function create()\n {\n\n //We get the ruleset from here, so we don't have to write it twice :\n $registrationRequest = new \\App\\Http\\Requests\\Registration();\n $registrationRequestRules = $registrationRequest->rules();\n\n foreach (array_keys($registrationRequestRules) as $field) {\n $successArray[] = $field;\n }\n return Response::json($successArray, 200);\n }", "title": "" }, { "docid": "dd5fbd8fc857879d4d1d1c4bcf4a1dc1", "score": "0.5239794", "text": "public function getCustomer($customer_id);", "title": "" }, { "docid": "b3b4622d686c65e1c81330528b0e6f59", "score": "0.52379096", "text": "protected function showCustomerRequest($number)\n {\n // verify the required parameter 'number' is set\n if ($number === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $number when calling showCustomer'\n );\n }\n\n $resourcePath = '/customers/{number}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($number !== null) {\n $resourcePath = str_replace(\n '{' . 'number' . '}',\n ObjectSerializer::toPathValue($number),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers= $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "e08733182e4c67ccb04e9b99b8e8971a", "score": "0.523549", "text": "protected function customersPostRequest($body = null)\n {\n\n $resourcePath = '/customers';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires Bearer token\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "79e57eeaeca01504b2feaa9042ea5f58", "score": "0.5229387", "text": "protected function _createCustomer()\r\n\t{\r\n\t\t$customer = Mage::getModel('customer/customer');\r\n\t\t$customer->setWebsiteId($this->_websiteId)\r\n\t\t\t->setStore($this->_store)\r\n\t\t\t->setFirstname('John')\r\n\t\t\t->setLastname('Doe')\r\n\t\t\t->setEmail('[email protected]')\r\n\t\t\t->setPassword('_password12345_');\r\n\r\n\t\t$customer->save();\r\n\r\n\t\t$region = Mage::getModel('directory/region')->loadByCode('CA', 'US');\r\n\r\n\t\t$address = Mage::getModel(\"customer/address\");\r\n\t\t$address->setCustomerId($customer->getId())\r\n\t\t\t->setFirstname($customer->getFirstname())\r\n\t\t\t->setLastname($customer->getLastname())\r\n\t\t\t->setCountryId('US')\r\n\t\t\t->setPostcode('90024')\r\n\t\t\t->setCity('Los Angeles')\r\n\t\t\t->setRegionId($region->getRegionId())\r\n\t\t\t->setTelephone('00112233445566')\r\n\t\t\t->setFax('00112233445566')\r\n\t\t\t->setStreet('123 Main St')\r\n\t\t\t->setIsDefaultBilling(1)\r\n\t\t\t->setIsDefaultShipping(1)\r\n\t\t\t->setSaveInAddressBook(1);\r\n\r\n\t\t$address->save();\r\n\r\n\t\t// Reset address cache\r\n\t\t$customer->cleanAllAddresses();\r\n\r\n\t\treturn $customer->load($customer->getId());\r\n\t}", "title": "" }, { "docid": "1763f13f12ff7a567cfdd6f1f6bc8db0", "score": "0.5224764", "text": "function registerCustomer($customer_data, $address_data, $company_data = null) {\n\t\t\n\t\trequire_once('models/client/client_address.php');\n\t\trequire_once('models/client/client_company.php');\n\t\t\n\t\t$Address = new client_address();\n\t\t$address_data['delivery']['customer_id'] = 0;\n\t\t$Address->setAll($address_data['delivery']);\n\t\t\n\t\tif ($Address->getValid() && $customer_data = $this->prepareToRegister($customer_data)) {\n\t\t\t\n\t\t\t$id = $this->insertCustomer($customer_data);\n\t\t\t\n\t\t\tif ($id) {\n\t\t\t\n\t\t\t\t$customer_data['id'] = $id;\n\t\t\t\t\n\t\t\t\t/**\n\t\t\t\t * insert company and update customer data\n\t\t\t\t */\n\t\t\t\t \n\t\t\t\tif(strlen(trim($company_data['name']))) {\n\t\t\t\t\t$company_data['customer_id'] = $customer_data['id'];\n\t\t\t\t\t$Company = new client_company($company_data);\n\t\t\t\t\tif ($company_id = $Company->insert($company_data)) {\n\t\t\t\t\t\t$customer_data['company_id'] = $company_id;\n\t\t\t\t\t\t$this->update($customer_data);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/**\n\t\t\t\t * send notification email\n\t\t\t\t */\n\t\t\t\t \n\t\t\t\trequire_once('models/common/common_email.php');\n \t\t\t$EmailForm = new common_email();\n \t\t\t\n \t\t\t//this allows use customer data and company data in the mail template\n \t\t\t//is passed as DATA to template in common_email->_format\n \t\t\t$GLOBALS['common_email']['customer'] = $customer_data;\n \t\t\t$GLOBALS['common_email']['company'] = $company_data;\n \t\t\t\n \t\t\tif (!$EmailForm->sendEmail('registration', 'n/a', $customer_data['email'], $customer_data['first_name'] . \" \" . $customer_data['last_name'])) {\n \t\t\t\tmsg('New customer email sending failed.', 'error');\n \t\t\t}\n \t\t\t\n \t\t\t//send it to the customer registration admin email\n \t\t\t/*\n \t\t\tif ($GLOBALS['onxshop_conf']['global']['admin_email'] != $this->conf['registration_mail_to_address']) {\n \t\t\t\tif (!$EmailForm->sendEmail('registration', 'n/a', $this->conf['registration_mail_to_address'], $this->conf['registration_mail_to_name'])) {\n \t\t\t\t\tmsg('New customer email sending failed.', 'error');\n \t\t\t\t}\n \t\t\t}*/\n \n \t\t\t//send notification to admin\n \t\t\tif (!$EmailForm->sendEmail('registration_notify', 'n/a', $this->conf['registration_mail_to_address'], $this->conf['registration_mail_to_name'])) {\n \t\t\t\t\tmsg('Admin notification email sending failed.', 'error');\n \t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t/**\n\t\t\t\t * insert delivery address\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\t$address_data['delivery']['customer_id'] = $id;\n \t\t\t\n\t\t\t\tif ($delivery_address_id = $Address->insert($address_data['delivery'])) {\n\t\t\t\t\t$customer_data['delivery_address_id'] = $delivery_address_id;\n\t\t\t\t} else {\n\t\t\t\t\tmsg(\"Your delivery address is not set!\", 'error');\n\t\t\t\t}\n\t\t\n\t\t\t\t/**\n\t\t\t\t * insert invoice address\n\t\t\t\t */\n\t\t\t\t \n\t\t\t\tif (trim($address_data['invoices']['city']) != '') {\n\t\t\t\t\n\t\t\t\t\t$address_data['invoices']['customer_id'] = $id;\n\t\t\t\t\t\n\t\t\t\t\tif ($invoices_address_id = $Address->insert($address_data['invoices'])) {\n\t\t\t\t\t\t$customer_data['invoices_address_id'] = $invoices_address_id;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmsg(\"Your invoices address is not set! If your invoices address is same as the delivery address, please leave the invoices address fields empty.\", 'error');\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$customer_data['invoices_address_id'] = $delivery_address_id;\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t/**\n\t\t\t\t * update customer record after setting addresses id\n\t\t\t\t */\n\t\t\t\t \n\t\t\t\t$this->update($customer_data);\n\t\t\t\t\n\t\t\t\tmsg(\"client_customer.registerCustomer() of customer ID $id was successful.\", 'ok', 1);\n\t\t\t\t\n\t\t\t\treturn $id;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "222e467c21fc360a01b24d644892bb56", "score": "0.52244943", "text": "public function create()\n {\n $registrations = CoRegistration::latest()->paginate();\n return view('system.companies.registrations.create',compact(['registrations']));\n }", "title": "" }, { "docid": "58ba664b193cb5faafa4755a6dcb1466", "score": "0.5221698", "text": "private function getCustomerRequest($customerInfo, $addressRequest)\n {\n $customerRequest = new CreateCustomerRequest(\n $customerInfo['name'],\n $customerInfo['email'],\n '',\n null,\n '',\n $addressRequest,\n array('module' => 'opencart')\n );\n\n return $customerRequest;\n }", "title": "" }, { "docid": "58ba664b193cb5faafa4755a6dcb1466", "score": "0.5221698", "text": "private function getCustomerRequest($customerInfo, $addressRequest)\n {\n $customerRequest = new CreateCustomerRequest(\n $customerInfo['name'],\n $customerInfo['email'],\n '',\n null,\n '',\n $addressRequest,\n array('module' => 'opencart')\n );\n\n return $customerRequest;\n }", "title": "" }, { "docid": "4ca9895742bfecca00533d474243e214", "score": "0.52144444", "text": "function get_customer( $resource ){\n\n $customer = get( 'customers', $resource );\n\n echo json_encode( $customer );\n exit;\n\n}", "title": "" }, { "docid": "e960b051900bec593de8a1cb52b810b4", "score": "0.52129483", "text": "public function customer_registration()\n {\n $customer_registration=view('pages.customer_registration');\n return view('master')->with('content',$customer_registration);\n }", "title": "" }, { "docid": "8edd1d50276c8083197ef3be6f1dc426", "score": "0.5210621", "text": "public function create() {\n\t\n\n\t\treturn view('merchantDashbaord.customers.create');\n\t}", "title": "" }, { "docid": "632e1656af1c5a551be0588a5dcd5c53", "score": "0.5198727", "text": "public function testGETCustomerIdCustomerSubscriptions()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "d22a667c95ced058473bc059ef0bfb66", "score": "0.5197219", "text": "static public function getContactsByCustomer($rest) {\n\n $data = array();\n \n $h = $rest->getHierarchy(); \n $vars = $rest->getRequestVars();\n \n $errors = Validation::required(array(\"customer_id\"), $vars);\n\n // do we have any errors\n if (count($errors)) {\n\n echo json_encode(array(\n \"success\" => false,\n \"error\" => \"Missing the following fields: \".implode($errors, \", \")\n ));\n\n }\n\n else {\n\n // create the contact\n $contacts = Contact::getContactsByCustomer($vars['customer_id']);\n\n $res = array(\n \"success\" => true,\n \"contacts\" => $contacts\n );\n\n echo json_encode($res);\n\n }\n\n }", "title": "" }, { "docid": "8419effe8f7d8b591116cb1d7f9cce27", "score": "0.51949096", "text": "public function customer_registration()\n {\n $customer_registration= view('pages.customer_registration');\n \n return view('master')\n ->with('checkout_view',$customer_registration);\n }", "title": "" }, { "docid": "eb58d39b373008b9b28a362331c3978b", "score": "0.51900566", "text": "public function getVehicleInformationByRegistration()\n {\n //Expects GET data of name 'registration'\n if(\\Input::has('registration'))\n {\n //Call web client service with registration number\n $dmrServiceClient = new \\App\\Models\\Webservice\\DmrServiceClient(\n new \\App\\Models\\SoapClient\\DmrService(),\n new \\App\\Models\\Db\\Car()\n );\n\n $result = $dmrServiceClient->getVehicleInformationByReg(\\Input::get('registration'));\n\n //If web client found a match for the registration number\n if($result !== false)\n {\n //We fetch a list of 10 vehicules from our database\n $webServiceResult = $dmrServiceClient->getResult();\n $carDbResults = $this->dbTable->getPreciseList($webServiceResult->getMaerke(),\n $webServiceResult->getModel(),\n $webServiceResult->getModelNummer(),\n $webServiceResult->getFoersteRegistreringDato()->format('Y'));\n //Generate Car List Html\n $carListHtml = \\View::make('carlist',['webServiceResult'=>(array)$webServiceResult,'list'=>$carDbResults])->render();\n\n return \\Response::make($carListHtml);\n }\n else\n {\n //404 not found\n return \\Response::make(\"Unable to find a match to the registration number\",404);\n }\n }\n else\n {\n return \\Response::make(\"Please enter the registration number\",400);\n }\n\n return \\Response::make(\"Unable to process your request at this time. Please try again.\",500);\n }", "title": "" }, { "docid": "df8d5c8111d8978345b1cb19773bd30b", "score": "0.51873446", "text": "public function get()\n {\n return $this->client->get('customers/'.$this->reference);\n }", "title": "" }, { "docid": "96407e447ad013e6e6c56c74957d7799", "score": "0.5187031", "text": "function regRegisterCustomer( $login, $cust_password, $Email, $first_name,\n $last_name, $subscribed4news, $additional_field_values, $affiliateLogin = '')\n{\n $affiliateID = 0;\n\n if ($affiliateLogin){\n\n $sql = \"select customerID FROM \".CUSTOMERS_TABLE.\"\n WHERE Login='\".xToText(trim($affiliateLogin)).\"'\";\n list($affiliateID) = db_fetch_row(db_query($sql));\n }\n\n foreach( $additional_field_values as $key => $val)\n $additional_field_values[$key] = $val;\n\n\n $currencyID = CONF_DEFAULT_CURRENCY;\n\n\n $cust_password = cryptPasswordCrypt( $cust_password, null );\n // add customer to CUSTOMERS_TABLE\n\n $custgroupID = CONF_DEFAULT_CUSTOMER_GROUP;\n if ( $custgroupID == 0 )\n $custgroupID = \"NULL\";\n /**\n * Activation code\n */\n $ActivationCode = '';\n if(CONF_ENABLE_REGCONFIRMATION){\n\n $CodeExists = true;\n while ($CodeExists) {\n\n $ActivationCode = generateRndCode(16);\n $sql = 'SELECT 1 FROM '.CUSTOMERS_TABLE.'\n WHERE ActivationCode=\"'.xEscapeSQLstring($ActivationCode).'\"';\n @list($CodeExists) = db_fetch_row(db_query($sql));\n }\n }\n db_query(\"insert into \".CUSTOMERS_TABLE.\n \"( Login, cust_password, Email, first_name, last_name, subscribed4news, reg_datetime, CID, custgroupID, affiliateID, ActivationCode )\".\n \"values( '\".xToText(trim($login)).\"', '\".xEscSQL(trim($cust_password)).\"', '\".xToText(trim($Email)).\"', \".\n \" '\".xToText(trim($first_name)).\"', '\".xToText(trim($last_name)).\"', '\".(int)$subscribed4news.\"', '\".xEscSQL(get_current_time()).\"', \".\n (int)$currencyID.\", \".(int)$custgroupID.\", \".xEscSQL(trim($affiliateID)).\", '\".xEscSQL(trim($ActivationCode)).\"' )\" );\n\n // add additional values to CUSTOMER_REG_FIELDS_TABLE\n foreach( $additional_field_values as $key => $val )\n SetRegField($key, $login, $val[\"additional_field\"]);\n\n $customerID = regGetIdByLogin($login);\n //db_query(\"update \".CUSTOMERS_TABLE.\" set addressID='\".$addressID.\n // \"' where Login='\".$login.\"'\" );\n\n if ( $subscribed4news )\n subscrAddRegisteredCustomerEmail( $customerID );\n\n return true;\n}", "title": "" }, { "docid": "4648483ae93067737a28749e5d9ef654", "score": "0.5179654", "text": "public function gETMerchantsRequest()\n {\n\n $resourcePath = '/merchants';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n []\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n [],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "726cfb3771fcf6730f5283e0533013b1", "score": "0.51751494", "text": "public function create()\n {\n return view ('customer.addcustomer');\n }", "title": "" }, { "docid": "ba6958afd4ad2d197affbc521f313e66", "score": "0.51577544", "text": "protected function getCustomerPaymentAccountsRequest($customer_id)\n {\n // verify the required parameter 'customer_id' is set\n if ($customer_id === null || (is_array($customer_id) && count($customer_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $customer_id when calling getCustomerPaymentAccounts'\n );\n }\n\n $resourcePath = '/customers/{customerId}/accounts';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($customer_id !== null) {\n $resourcePath = str_replace(\n '{' . 'customerId' . '}',\n ObjectSerializer::toPathValue($customer_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/vnd.optile.payment.enterprise-v1-extensible+json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/vnd.optile.payment.enterprise-v1-extensible+json'],\n ['application/vnd.optile.payment.enterprise-v1-extensible+json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires HTTP basic authentication\n if ($this->config->getUsername() !== null || $this->config->getPassword() !== null) {\n $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . \":\" . $this->config->getPassword());\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "63c297b145fca5f82177ae4a95995829", "score": "0.5157182", "text": "public function generateCustomerForSalesOrder()\n {\n $customer = $this->getCustomerById($_GET['id']);\n if (isset($customer)) {\n return $customer;\n }\n return json_encode($customer);\n }", "title": "" }, { "docid": "064e8dc6eae7849b1cec0b09f7cc7428", "score": "0.515236", "text": "public function getCustomerAddressAction();", "title": "" }, { "docid": "abe0e0bf6246ba8eda294fc84d111c0b", "score": "0.5145175", "text": "public function getCustomer() \n {\n return $this -> getRequired(\n $this->prot->customer_id, \n 'protocol_customer'\n );\n }", "title": "" }, { "docid": "0d48e4b19a124e5afcf0f25b6c6a0d9c", "score": "0.5140558", "text": "public function create()\n {\n return view('registry.customers.create')->render();\n }", "title": "" }, { "docid": "0cbb2a152e4cf3412c7a69d45b25fbc2", "score": "0.513961", "text": "public function RegisterCustomer(Request $request){\n $this->validate($request,[\n 'name' => 'required',\n 'email' => 'required|email|max:255',\n 'creditcard' => 'required',\n 'address1' => 'required',\n 'address2' => 'required',\n 'city' => 'required',\n 'region' => 'required',\n 'postalcode' => 'required',\n 'country' => 'required',\n 'dayphone' => 'required',\n 'evephone' => 'required',\n 'mobphone' => 'required',\n 'password' => ['required', 'string', 'min:6', 'confirmed'],\n ]);\n \n $customer = new Customer;\n\n $customer->name = $request->name;\n $customer->email = $request->email;\n $customer->credit_card = $request->creditcard;\n $customer->address_1= $request->address1;\n $customer->address_2= $request->address2;\n $customer->city= $request->city;\n $customer->region = $request->region;\n $customer->country = $request->country;\n $customer->postal_code = $request->postalcode;\n $customer->day_phone = $request->dayphone;\n $customer->eve_phone = $request->evephone;\n $customer->mob_phone = $request->mobphone;\n $customer->password = bcrypt($request->password);\n\n $customer->save();\n\n return redirect('/login');\n }", "title": "" }, { "docid": "333af8b78637c76e2f5d387f6c4d2a93", "score": "0.51371294", "text": "protected function registerRequest($name, $include_password = TRUE, $include_email = TRUE) {\n\n $user_register_url = Url::fromRoute('user.register')\n ->setRouteParameter('_format', static::$format);\n $request_body = $this->createRequestBody($name, $include_password, $include_email);\n $request_options = $this->createRequestOptions($request_body);\n $response = $this->request('POST', $user_register_url, $request_options);\n\n return $response;\n }", "title": "" }, { "docid": "15896a1aea9e4166dcb5e7b9f4d9e5b7", "score": "0.5131411", "text": "public function getCustomer()\n {\n return Controllers\\CustomerController::getInstance();\n }", "title": "" }, { "docid": "3ff9bbd31412f88e6b3b8eec207ab1ad", "score": "0.51160705", "text": "public function CustomerRegisterForm(){\n return view('admin.customer.add');\n }", "title": "" }, { "docid": "61b32b2717a9698d19547dc8c659c446", "score": "0.5114871", "text": "public function create()\n {\n //\n return view('Customer/customerCreate');\n }", "title": "" }, { "docid": "51d955bff44b517bfb90335edcb1b973", "score": "0.51116365", "text": "public function create(array $customer)\n {\n return $this->client->post('customers', [\n 'body' => $customer\n ]);\n }", "title": "" }, { "docid": "ff53aeeb4d1772375c25b65d5d22bb5c", "score": "0.51106274", "text": "public function get_customers(){\n $order_column = array(null,\"name\",\"email\",null,null);\n \n $this->customer_query();\n \n //Search\n if(isset($_POST['search']['value'])){\n $this->db->like('fname',$_POST['search']['value']);\n $this->db->like('lname',$_POST['search']['value']);\n $this->db->or_like('email',$_POST['search']['value']);\n }\n\n //Order by\n if(isset($_POST['order'])){\n $this->db->order_by($order_column[$_POST['order'][0]['column']],$_POST['order'][0]['dir']);\n }else{\n $this->db->order_by(\"id\",\"DESC\");\n }\n\n //Limit\n if($_POST['length'] != -1){\n $this->db->limit($_POST['length'],$_POST['start']);\n }\n \n $this->db->where('user_type',1);\n $query = $this->db->get();\n\n return array(\n 'recordsTotal' => $this->all_customer_records(),\n 'recordsFiltered' => $query->num_rows(),\n 'result' => $query->result()\n );\n }", "title": "" }, { "docid": "45624ce0e1d4801d663579e2e52a79fa", "score": "0.5109604", "text": "public function create()\n {\n //\n\n return view('users.customer.create');\n }", "title": "" }, { "docid": "b6e6d3afcdf7c793f6c016fa63c92f1f", "score": "0.5103358", "text": "function createCustomer(){\n\t\n\t\tif($_SESSION['agent_id']){\n\t\t\t$agent_id = $_SESSION['agent_id'];\n\t\t}else{\n\t\t\t$agent_id = $_SESSION['temp_agent_id'];\n\t\t}\n\t\n\t\t// Check if this customer exists\n\t\t$stripe_cust_id = result(\"SELECT `stripe_cust_id` FROM `agents` WHERE `agent_id` = '\".esc($agent_id).\"'\");\n\t\tif($stripe_cust_id){return false;}\n\t\n\t\t\\Stripe\\Stripe::setApiKey($GLOBALS['secret_key']);\n\t\t$token = $_POST['stripeToken'];\n\t\t$email = result(\"SELECT `email` FROM `agents` WHERE `agent_id` = '\".esc($agent_id).\"'\");\n\t\t$customer = \\Stripe\\Customer::create(array(\n\t\t \"source\" => $token,\n\t\t \"email\" => $email,\n\t\t \"description\" => \"Agent ID: \".$agent_id)\n\t\t);\n\t\tquery(\"UPDATE `agents` SET `stripe_cust_id` = '\".esc($customer->id).\"', `contract_start` = \".time().\" WHERE `agent_id` = '\".esc($agent_id).\"'\");\n\t}", "title": "" }, { "docid": "8c7f3963222e3bb1c453d0c349c49aea", "score": "0.51025355", "text": "public function customersAction()\n {\n $page = $this->apiRequest->getPage();\n if (!is_numeric($page)) {\n $page = 1;\n }\n\n $pageSize = $this->apiRequest->getPageSize();\n if (!is_numeric($pageSize)) {\n $pageSize = 250;\n }\n\n $account = Mage::getSingleton('swell/account');\n $customers = $account->getCustomers(\n $this->apiRequest->getSharedSecret(),\n $page,\n $pageSize\n );\n\n $this->sendResponse($customers);\n }", "title": "" }, { "docid": "cb02590204e1d6a808c58ebf1fbd51c8", "score": "0.51021516", "text": "public function getCustomerRegisterUrlUrl()\n {\n return $this->getUrl('customer/account/create');\n }", "title": "" }, { "docid": "3484c9ba581041704363c62c545031ff", "score": "0.50999707", "text": "public function testGetCustomerWithValidParameters() {\n\n $zaiusClient = $this->getZaiusClient(ZAIUS_PRIVATE_API_KEY);\n\n $filter = ['email'=>'[email protected]'];\n $profile = $zaiusClient->getCustomer($filter);\n $this->assertInternalType('array',$profile);\n\n $filter = ['customer_id'=>'99'];\n $profile = $zaiusClient->getCustomer($filter);\n $this->assertInternalType('array',$profile);\n\n }", "title": "" }, { "docid": "84131d03d8b7ededb8630f318830948c", "score": "0.5094091", "text": "public function getRegistration()\n {\n return [\n 'id' => $this->getId(),\n 'email' => $this->getEmail(),\n 'application_id' => $this->getApplication()->getId()\n ];\n }", "title": "" }, { "docid": "c9596d1dc05cb801a284cc89c0c88d0f", "score": "0.5093412", "text": "private function createNewPlexCustomer( $customerId ){\n\t\ttry{\n\t\t\t$plexServiceRequestObject = new plexServiceRequest();\n\t\t\t$responseHandlerObject = new ResponseHandler();\n\t \t\t$user_info = get_userdata($customerId);\n\t \t\t$plexuserUserId = 'PWPU'.str_pad($customerId, 6, '0', STR_PAD_LEFT);\n\n\t \t\t/*request parameter*/\n\t \t\t$paramArray = array(\n\n\t\t\t\t\t\t\t\tarray(\n\n\t\t\t\t\t\t\t\t\t\t'Name'\t\t=>\t'PCN',\n\n\t\t\t\t\t\t\t\t\t\t'Value'\t\t=>\t$plexuserUserId,\n\n\t\t\t\t\t\t\t\t\t\t'Required'\t=>\t'false',\n\n\t\t\t\t\t\t\t\t\t\t'Output'\t=> 'false'\n\n\t\t\t\t\t\t\t\t\t),\n\n\t\t\t\t\t\t\t\tarray(\n\n\t\t\t\t\t\t\t\t\t\t'Name'\t\t=>\t'Customer_Code',\n\n\t\t\t\t\t\t\t\t\t\t'Value'\t\t=>\t$plexuserUserId,\n\n\t\t\t\t\t\t\t\t\t\t'Required'\t=>\t'false',\n\n\t\t\t\t\t\t\t\t\t\t'Output'\t=> 'false'\n\n\t\t\t\t\t\t\t\t\t),\n\n\t\t\t\t\t\t\t\tarray(\n\n\t\t\t\t\t\t\t\t\t\t'Name'\t\t=>\t'Name',\n\n\t\t\t\t\t\t\t\t\t\t'Value'\t\t=>\tget_user_meta( $customerId, 'billing_first_name', true ).' '.get_user_meta( $customerId, 'billing_last_name', true ),\n\n\t\t\t\t\t\t\t\t\t\t'Required'\t=>\t'false',\n\n\t\t\t\t\t\t\t\t\t\t'Output'\t=> 'false'\n\n\t\t\t\t\t\t\t\t\t),\n\n\t\t\t\t\t\t\t\tarray(\n\n\t\t\t\t\t\t\t\t\t\t'Name'\t\t=>\t'Customer_Type',\n\n\t\t\t\t\t\t\t\t\t\t'Value'\t\t=>\t'Consumer',\n\n\t\t\t\t\t\t\t\t\t\t'Required'\t=>\t'false',\n\n\t\t\t\t\t\t\t\t\t\t'Output'\t=> 'false'\n\n\t\t\t\t\t\t\t\t\t),\n\n\t\t\t\t\t\t\t\tarray(\n\n\t\t\t\t\t\t\t\t\t\t'Name'\t\t=>\t'Phone',\n\n\t\t\t\t\t\t\t\t\t\t'Value'\t\t=>\tget_user_meta( $customerId, 'billing_phone', true ),\n\n\t\t\t\t\t\t\t\t\t\t'Required'\t=>\t'false',\n\n\t\t\t\t\t\t\t\t\t\t'Output'\t=> 'false'\n\n\t\t\t\t\t\t\t\t\t),\n\n\t\t\t\t\t\t\t\tarray(\n\n\t\t\t\t\t\t\t\t\t\t'Name'\t\t=>\t'Email',\n\n\t\t\t\t\t\t\t\t\t\t'Value'\t\t=>\t$user_info->data->user_email,\n\n\t\t\t\t\t\t\t\t\t\t'Required'\t=>\t'false',\n\n\t\t\t\t\t\t\t\t\t\t'Output'\t=> 'false'\n\n\t\t\t\t\t\t\t\t\t),\n\n\t\t\t\t\t\t\t\tarray(\n\n\t\t\t\t\t\t\t\t\t\t'Name'\t\t=>\t'Customer_Category',\n\n\t\t\t\t\t\t\t\t\t\t'Value'\t\t=>\t'Customer',\n\n\t\t\t\t\t\t\t\t\t\t'Required'\t=>\t'false',\n\n\t\t\t\t\t\t\t\t\t\t'Output'\t=> 'false'\n\n\t\t\t\t\t\t\t\t\t),\n\n\t\t\t\t\t\t\t\tarray(\n\n\t\t\t\t\t\t\t\t\t\t'Name'\t\t=>\t'Terms',\n\n\t\t\t\t\t\t\t\t\t\t'Value'\t\t=>\t'Credit Card Web',\n\n\t\t\t\t\t\t\t\t\t\t'Required'\t=>\t'false',\n\n\t\t\t\t\t\t\t\t\t\t'Output'\t=> 'false'\n\n\t\t\t\t\t\t\t\t\t),\n\n\t\t\t\t\t\t\t\tarray(\n\n\t\t\t\t\t\t\t\t\t\t'Name'\t\t=>\t'Customer_Since',\n\n\t\t\t\t\t\t\t\t\t\t'Value'\t\t=>\tdate('m/d/Y',strtotime($user_info->data->user_registered)),\n\n\t\t\t\t\t\t\t\t\t\t'Required'\t=>\t'false',\n\n\t\t\t\t\t\t\t\t\t\t'Output'\t=> 'false'\n\n\t\t\t\t\t\t\t\t\t),\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\tarray(\n\n\t\t\t\t\t\t\t\t\t\t'Name'\t\t=>\t'Drop_Ship_Email',\n\n\t\t\t\t\t\t\t\t\t\t'Value'\t\t=>\t'1',\n\n\t\t\t\t\t\t\t\t\t\t'Required'\t=>\t'false',\n\n\t\t\t\t\t\t\t\t\t\t'Output'\t=> 'false'\n\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tarray(\n\n\t\t\t\t\t\t\t\t\t\t'Name'\t\t=>\t'Customer_Parent_Code',\n\n\t\t\t\t\t\t\t\t\t\t'Value'\t\t=>\t'Consumer Parent',\n\n\t\t\t\t\t\t\t\t\t\t'Required'\t=>\t'false',\n\n\t\t\t\t\t\t\t\t\t\t'Output'\t=> 'false'\n\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tarray(\n\n\t\t\t\t\t\t\t\t\t\t'Name'\t\t=>\t'resultcode',\n\n\t\t\t\t\t\t\t\t\t\t'Value'\t\t=>\t'',\n\n\t\t\t\t\t\t\t\t\t\t'Required'\t=>\t'false',\n\n\t\t\t\t\t\t\t\t\t\t'Output'\t=> 'false'\n\n\t\t\t\t\t\t\t\t\t),\n\n\t\t\t\t\t\t\t\tarray(\n\n\t\t\t\t\t\t\t\t\t\t'Name'\t\t=>\t'ResultMessage',\n\n\t\t\t\t\t\t\t\t\t\t'Value'\t\t=>\t'',\n\n\t\t\t\t\t\t\t\t\t\t'Required'\t=>\t'false',\n\n\t\t\t\t\t\t\t\t\t\t'Output'\t=> 'false'\n\n\t\t\t\t\t\t\t\t\t)\n\n\t\t\t\t);\n\n\t\t\tforeach ($paramArray as $key => $value) {\n \t\t\tPlexLog::addLog(' Info =>() customer creation paramArray => '.$value[\"Name\"].' : '.$value[\"Value\"]);\n\t \t\t}\n\n\t\t\t/* creating new customer in plex*/\n\t\t\t$rawResponse = $plexServiceRequestObject->call('ExecuteDataSource' ,PLEX_WRITE_NEW_CUSTOMER, $paramArray);\n\n\t\t\tPlexLog::addLog(' Info =>('.$customerId.') A new Plex customer added ('.$plexuserUserId.') ');\n\n\t\t\treturn $rawResponse;\n\n\t\t}catch(Exception $exec){\n\n\t \tPlexLog::addLog(' Error =>('.$customerId.') Exception occure whilecreating new plex customer. Message :'.$exec->getMessage());\n\n\t\t\treturn 0;\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "3fd6336dc4a90237cb9247d8e475a56c", "score": "0.50889736", "text": "public function register_get()\n\t{\n\n\t\t$data = $this->api->getMembers()->result();\n\t\t$count = $this->api->getMembers()->num_rows();\n\n\t\t$this->response([\n\t\t\t'status' => 'success',\n\t\t\t'total' => $count,\n\t\t\t'message' => $data\n\t\t], REST_Controller::HTTP_ACCEPTED);\n\t}", "title": "" }, { "docid": "f360a1c04a20f147062dd5a1d7620059", "score": "0.5082636", "text": "protected function customersCustomerIdOrderServicesGetRequest($customerId)\n {\n // verify the required parameter 'customerId' is set\n if ($customerId === null || (is_array($customerId) && count($customerId) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $customerId when calling customersCustomerIdOrderServicesGet'\n );\n }\n\n $resourcePath = '/customers/{customerId}/order-services';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($customerId !== null) {\n $resourcePath = str_replace(\n '{' . 'customerId' . '}',\n ObjectSerializer::toPathValue($customerId),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires Bearer token\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "0a4cbacb7f04436f12d4711df62abdad", "score": "0.50747114", "text": "function viewmyCustRequest($CustomerID){\r\n $request = new RequestServiceModel();\r\n $request->CustomerID = $CustomerID;\r\n return $request->viewmyRequest();\r\n }", "title": "" }, { "docid": "116dd3f17fcee7d7cdad060fedb65f73", "score": "0.5067049", "text": "function AddCustomer(H2OCustomer $customer)\r\r\n\t{\r\r\n\t\t// make sure the array is filled properly\r\r\n\t\t$customer->order[\"AdditionalProducts\"] \t= $customer->products;\r\r\n\r\r\n\t\t$this->Credentials();\t\t// updates request array with \"Request\" Element containing credentials\r\r\n\t\t$this->request[\"Request\"][\"Customer\"] = $customer->customer;\r\r\n\t\t$this->request[\"Request\"][\"Order\"] = $customer->order;\r\r\n\t\t\r\r\n\t\t$resp = $this->soap->NewCustomers_Create($this->request);\r\r\n\t\t$this->SoapDebug($resp);\r\r\n\t\t\r\r\n\t\t$respHdr = $resp->NewCustomers_CreateResult->Header;\r\r\n\t\t$ret = false;\r\r\n\t\tif ($respHdr->Success == '1')\r\r\n\t\t{\r\r\n\t\t\t$ret = true;\r\r\n\t\t\t$customer->customer_id = $resp->NewCustomers_CreateResult->Customer_ID;\r\r\n\t\t\t$customer->line_id = $resp->NewCustomers_CreateResult->Lines->Line;\r\r\n\t\t\t$customer->order_id = $resp->NewCustomers_CreateResult->Orders->Order;\r\r\n\t\t\t$customer->status = $resp->NewCustomers_CreateResult->Status;\r\r\n\t\t\t\r\r\n\t\t\t// add the tn separately\r\r\n\t\t\t\r\r\n\t\t\t$ret = $this->AddTn($customer);\r\r\n\t\t}\r\r\n\t\telse\r\r\n\t\t{\r\r\n\t\t\t$customer->status = 'Failed';\r\r\n\t\t\tif (isset($respHdr->Error_Code))\r\r\n\t\t\t{\r\r\n\t\t\t\t$this->error_code = $respHdr->Error_Code;\r\r\n\t\t\t\t$this->error_description = $respHdr->Error_Description;\r\r\n\t\t\t}\r\r\n\t\t\telse\r\r\n\t\t\t{\r\r\n\t\t\t\t$this->error_code = -1;\r\r\n\t\t\t\t$this->error_description = $respHdr->Message;\r\r\n\t\t\t}\r\r\n\t\t}\r\r\n\t\t\t\r\r\n\t\t\r\r\n\t\treturn $ret;\r\r\n\t}", "title": "" }, { "docid": "4c8d448a9282f799d86d15dc4480be41", "score": "0.50477207", "text": "public function actionCustomerList()\n {\n $data = [];\n if (Yii::$app->request->isAjax) {\n $model = new Customer();\n\n if (Yii::$app->request->post()) {\n $request = Yii::$app->request->post('Customer');\n if ($request['full_name'] || $request['phone']) {\n $data = Customer::find()\n ->select(['id', 'full_name', 'phone', 'address'])\n ->andFilterWhere(['like', 'full_name', $request['full_name']])\n ->andFilterWhere(['like', 'phone', $request['phone']])\n ->asArray()\n ->all();\n }\n return Json::encode($data);\n }\n\n return $this->renderAjax('customer-list', [\n 'model' => $model,\n ]);\n }\n\n return false;\n }", "title": "" }, { "docid": "d4daa7f6b984e09188e88f3a54c5abf6", "score": "0.5043654", "text": "public function create()\n {\n\t\t\t$Code = Request()->code;\n\t\t\t$Customer = \\App\\Models\\Customer::whereCode($Code)->with('Connections')->get();\n\t\t\t$Customer = $Customer->isNotEmpty()?$Customer->first():false;\n\t\t\treturn view('crc.form',compact('Customer'));\n }", "title": "" }, { "docid": "f743e5de6b6454d2410c408fb995f694", "score": "0.50400984", "text": "public function create()\n {\n\t\t// $user = Auth::getUser();\n// dd(auth()->id());\n\t\t\t$this->authorize('create', Customer::class);\n\t\t\t$action = 'customer.create';\n\t\t\treturn view( 'customer.customer-mask', compact( 'action' ) );\n\n\t\n }", "title": "" }, { "docid": "c910e1109fbbc29a8db4c33682cd23d3", "score": "0.5035713", "text": "public function create()\n {\n return view('customer::create');\n }", "title": "" }, { "docid": "c910e1109fbbc29a8db4c33682cd23d3", "score": "0.5035713", "text": "public function create()\n {\n return view('customer::create');\n }", "title": "" }, { "docid": "322402559b54fd6a4f10ce5d1737750c", "score": "0.5025471", "text": "public function create(array $data)\n {\n\n $this->settings(array(\n 'url' => 'customers',\n 'method' => 'POST',\n 'data' => $data\n ));\n \n $this->addValidator(new NotEmptyString($data['referenceId'],'referenceId is required' ));\n return $this->result();\n }", "title": "" } ]