repository_name
stringlengths
5
67
func_path_in_repository
stringlengths
4
234
func_name
stringlengths
0
314
whole_func_string
stringlengths
52
3.87M
language
stringclasses
6 values
func_code_string
stringlengths
52
3.87M
func_code_tokens
listlengths
15
672k
func_documentation_string
stringlengths
1
47.2k
func_documentation_tokens
listlengths
1
3.92k
split_name
stringclasses
1 value
func_code_url
stringlengths
85
339
fccn/oai-pmh-core
src/schemas/ands_lom.php
LOM_DataHolder.combine
public function combine($another) { debug_message(__CLASS__.'.'.__FUNCTION__." LLOM_DataHolder class is ".LOM_DataHolder::getKlass()); debug_message(__CLASS__.'.'.__FUNCTION__." another is ".get_class($another)); if (is_a($another, LOM_DataHolder::getKlass())) { debug_message('en...
php
public function combine($another) { debug_message(__CLASS__.'.'.__FUNCTION__." LLOM_DataHolder class is ".LOM_DataHolder::getKlass()); debug_message(__CLASS__.'.'.__FUNCTION__." another is ".get_class($another)); if (is_a($another, LOM_DataHolder::getKlass())) { debug_message('en...
[ "public", "function", "combine", "(", "$", "another", ")", "{", "debug_message", "(", "__CLASS__", ".", "'.'", ".", "__FUNCTION__", ".", "\" LLOM_DataHolder class is \"", ".", "LOM_DataHolder", "::", "getKlass", "(", ")", ")", ";", "debug_message", "(", "__CLASS...
Combines this object with another LOM_DataHolder object
[ "Combines", "this", "object", "with", "another", "LOM_DataHolder", "object" ]
train
https://github.com/fccn/oai-pmh-core/blob/a9c6852482c7bd7c48911a2165120325ecc27ea2/src/schemas/ands_lom.php#L319-L354
fccn/oai-pmh-core
src/schemas/ands_lom.php
LOM_DataHolder.addElement
private function addElement($elem, $to_add) { //debug_var_dump("to_add->$elem", $to_add->$elem); if (isset($to_add->$elem) && !empty($to_add->$elem) && $to_add->$elem != ' ') {//&& !empty(str_replace(' ', '', $to_add->$elem)) ){ $elem_to_add = str_replace('&', '-and-', $to_add->$elem); /...
php
private function addElement($elem, $to_add) { //debug_var_dump("to_add->$elem", $to_add->$elem); if (isset($to_add->$elem) && !empty($to_add->$elem) && $to_add->$elem != ' ') {//&& !empty(str_replace(' ', '', $to_add->$elem)) ){ $elem_to_add = str_replace('&', '-and-', $to_add->$elem); /...
[ "private", "function", "addElement", "(", "$", "elem", ",", "$", "to_add", ")", "{", "//debug_var_dump(\"to_add->$elem\", $to_add->$elem);", "if", "(", "isset", "(", "$", "to_add", "->", "$", "elem", ")", "&&", "!", "empty", "(", "$", "to_add", "->", "$", ...
adds a db element only if it is new
[ "adds", "a", "db", "element", "only", "if", "it", "is", "new" ]
train
https://github.com/fccn/oai-pmh-core/blob/a9c6852482c7bd7c48911a2165120325ecc27ea2/src/schemas/ands_lom.php#L359-L369
fccn/oai-pmh-core
src/schemas/ands_lom.php
LOM_DataHolder.to_array
public function to_array() { debug_message('entering function '.__FUNCTION__.' in '.__CLASS__); //lomdata $lomdata = array( 'general' => array( 'identifier' => array( 'catalog' => $this->catalog, 'entry' => $this->identifier...
php
public function to_array() { debug_message('entering function '.__FUNCTION__.' in '.__CLASS__); //lomdata $lomdata = array( 'general' => array( 'identifier' => array( 'catalog' => $this->catalog, 'entry' => $this->identifier...
[ "public", "function", "to_array", "(", ")", "{", "debug_message", "(", "'entering function '", ".", "__FUNCTION__", ".", "' in '", ".", "__CLASS__", ")", ";", "//lomdata", "$", "lomdata", "=", "array", "(", "'general'", "=>", "array", "(", "'identifier'", "=>"...
puts db information in LOM format as an array
[ "puts", "db", "information", "in", "LOM", "format", "as", "an", "array" ]
train
https://github.com/fccn/oai-pmh-core/blob/a9c6852482c7bd7c48911a2165120325ecc27ea2/src/schemas/ands_lom.php#L376-L579
fccn/oai-pmh-core
src/schemas/ands_lom.php
LOM_DataHolder.asVcard
private function asVcard($name) { $name = preg_replace('/\s\s+/i', '', $name); //remove extra white spaces $name = preg_replace('/[^A-Za-z0-9\x{002D}\x{002E}\x{00C0}-\x{00FF} -]/', '', $name); //remove special chars $name = trim($name); // trim $nm_expl = explode(' ', $name); ...
php
private function asVcard($name) { $name = preg_replace('/\s\s+/i', '', $name); //remove extra white spaces $name = preg_replace('/[^A-Za-z0-9\x{002D}\x{002E}\x{00C0}-\x{00FF} -]/', '', $name); //remove special chars $name = trim($name); // trim $nm_expl = explode(' ', $name); ...
[ "private", "function", "asVcard", "(", "$", "name", ")", "{", "$", "name", "=", "preg_replace", "(", "'/\\s\\s+/i'", ",", "''", ",", "$", "name", ")", ";", "//remove extra white spaces", "$", "name", "=", "preg_replace", "(", "'/[^A-Za-z0-9\\x{002D}\\x{002E}\\x{...
turns the elements into a string formatted for VCard
[ "turns", "the", "elements", "into", "a", "string", "formatted", "for", "VCard" ]
train
https://github.com/fccn/oai-pmh-core/blob/a9c6852482c7bd7c48911a2165120325ecc27ea2/src/schemas/ands_lom.php#L582-L595
fccn/oai-pmh-core
src/schemas/ands_lom.php
LOM_DataHolder.extractCommonWords
private function extractCommonWords($string) { debug_message('entering function '.__FUNCTION__.' in '.__CLASS__); $stopWords = array('i','a','about','an','and','-and-','are','as','at','be','by','com','de','en','for','from','how','in','is','it','la','of','on','or','that','the','this','to','was','what...
php
private function extractCommonWords($string) { debug_message('entering function '.__FUNCTION__.' in '.__CLASS__); $stopWords = array('i','a','about','an','and','-and-','are','as','at','be','by','com','de','en','for','from','how','in','is','it','la','of','on','or','that','the','this','to','was','what...
[ "private", "function", "extractCommonWords", "(", "$", "string", ")", "{", "debug_message", "(", "'entering function '", ".", "__FUNCTION__", ".", "' in '", ".", "__CLASS__", ")", ";", "$", "stopWords", "=", "array", "(", "'i'", ",", "'a'", ",", "'about'", "...
TODO include this in keyword generation
[ "TODO", "include", "this", "in", "keyword", "generation" ]
train
https://github.com/fccn/oai-pmh-core/blob/a9c6852482c7bd7c48911a2165120325ecc27ea2/src/schemas/ands_lom.php#L598-L661
php-lug/lug
src/Bundle/ResourceBundle/DataFixtures/ORM/AbstractDriverFixture.php
AbstractDriverFixture.load
public function load(ObjectManager $manager) { if ($this->getResource()->getDriver() === $this->getDriver()) { $this->doLoad($manager); } }
php
public function load(ObjectManager $manager) { if ($this->getResource()->getDriver() === $this->getDriver()) { $this->doLoad($manager); } }
[ "public", "function", "load", "(", "ObjectManager", "$", "manager", ")", "{", "if", "(", "$", "this", "->", "getResource", "(", ")", "->", "getDriver", "(", ")", "===", "$", "this", "->", "getDriver", "(", ")", ")", "{", "$", "this", "->", "doLoad", ...
{@inheritdoc}
[ "{" ]
train
https://github.com/php-lug/lug/blob/81c109f187eba0a60f17e8cc59984ebb31841db7/src/Bundle/ResourceBundle/DataFixtures/ORM/AbstractDriverFixture.php#L24-L29
Laralum/Events
src/Migrations/2017_04_30_233148_create_laralum_events.php
CreateLaralumEvents.up
public function up() { Schema::create('laralum_events', function (Blueprint $table) { $table->increments('id'); $table->integer('user_id'); $table->string('title'); $table->string('color')->nullable(); $table->string('place')->nullable(); ...
php
public function up() { Schema::create('laralum_events', function (Blueprint $table) { $table->increments('id'); $table->integer('user_id'); $table->string('title'); $table->string('color')->nullable(); $table->string('place')->nullable(); ...
[ "public", "function", "up", "(", ")", "{", "Schema", "::", "create", "(", "'laralum_events'", ",", "function", "(", "Blueprint", "$", "table", ")", "{", "$", "table", "->", "increments", "(", "'id'", ")", ";", "$", "table", "->", "integer", "(", "'user...
Run the migrations. @return void
[ "Run", "the", "migrations", "." ]
train
https://github.com/Laralum/Events/blob/9dc36468f4253e7d040863a115ea94cded0e6aa5/src/Migrations/2017_04_30_233148_create_laralum_events.php#L14-L31
inhere/php-librarys
src/Files/Directory.php
Directory.simpleInfo
public static function simpleInfo($dir, $ext = null, $recursive = false): array { $list = []; $dir = self::pathFormat($dir); $ext = \is_array($ext) ? implode('|', $ext) : trim($ext); if (!is_dir($dir)) { throw new NotFoundException("directory not exists! DIR: $dir"); ...
php
public static function simpleInfo($dir, $ext = null, $recursive = false): array { $list = []; $dir = self::pathFormat($dir); $ext = \is_array($ext) ? implode('|', $ext) : trim($ext); if (!is_dir($dir)) { throw new NotFoundException("directory not exists! DIR: $dir"); ...
[ "public", "static", "function", "simpleInfo", "(", "$", "dir", ",", "$", "ext", "=", "null", ",", "$", "recursive", "=", "false", ")", ":", "array", "{", "$", "list", "=", "[", "]", ";", "$", "dir", "=", "self", "::", "pathFormat", "(", "$", "dir...
获得目录下的文件,可选择类型、是否遍历子文件夹 @param string $dir string 目标目录 @param string|array $ext array('css','html','php') css|html|php @param bool $recursive int|bool 是否包含子目录 @return array @throws NotFoundException
[ "获得目录下的文件,可选择类型、是否遍历子文件夹" ]
train
https://github.com/inhere/php-librarys/blob/e6ca598685469794f310e3ab0e2bc19519cd0ae6/src/Files/Directory.php#L183-L212
inhere/php-librarys
src/Files/Directory.php
Directory.getFiles
public static function getFiles($path, $ext = null, $recursive = false, $parent = null, array $list = []): array { $path = self::pathFormat($path); if (!is_dir($path)) { throw new NotFoundException("directory not exists! DIR: $path"); } $len = \strlen($path); $e...
php
public static function getFiles($path, $ext = null, $recursive = false, $parent = null, array $list = []): array { $path = self::pathFormat($path); if (!is_dir($path)) { throw new NotFoundException("directory not exists! DIR: $path"); } $len = \strlen($path); $e...
[ "public", "static", "function", "getFiles", "(", "$", "path", ",", "$", "ext", "=", "null", ",", "$", "recursive", "=", "false", ",", "$", "parent", "=", "null", ",", "array", "$", "list", "=", "[", "]", ")", ":", "array", "{", "$", "path", "=", ...
获得目录下的文件,可选择类型、是否遍历子文件夹 @param string $path string 目标目录 @param array|string $ext array('css','html','php') css|html|php @param bool $recursive 是否包含子目录 @param null|string $parent @param array $list @return array @throws NotFoundException
[ "获得目录下的文件,可选择类型、是否遍历子文件夹" ]
train
https://github.com/inhere/php-librarys/blob/e6ca598685469794f310e3ab0e2bc19519cd0ae6/src/Files/Directory.php#L224-L248
inhere/php-librarys
src/Files/Directory.php
Directory.getFilesInfo
public static function getFilesInfo($path, $ext = null, $recursive = 0, &$list): array { $path = self::pathFormat($path); if (!is_dir($path)) { throw new NotFoundException("directory not exists! DIR: $path"); } $ext = \is_array($ext) ? implode('|', $ext) : trim($ext); ...
php
public static function getFilesInfo($path, $ext = null, $recursive = 0, &$list): array { $path = self::pathFormat($path); if (!is_dir($path)) { throw new NotFoundException("directory not exists! DIR: $path"); } $ext = \is_array($ext) ? implode('|', $ext) : trim($ext); ...
[ "public", "static", "function", "getFilesInfo", "(", "$", "path", ",", "$", "ext", "=", "null", ",", "$", "recursive", "=", "0", ",", "&", "$", "list", ")", ":", "array", "{", "$", "path", "=", "self", "::", "pathFormat", "(", "$", "path", ")", "...
获得目录下的文件以及详细信息,可选择类型、是否遍历子文件夹 @param $path string 目标目录 @param array|string $ext array('css','html','php') css|html|php @param $recursive int|bool 是否包含子目录 @param array $list @return array @throws \InvalidArgumentException @throws NotFoundException
[ "获得目录下的文件以及详细信息,可选择类型、是否遍历子文件夹" ]
train
https://github.com/inhere/php-librarys/blob/e6ca598685469794f310e3ab0e2bc19519cd0ae6/src/Files/Directory.php#L274-L301
inhere/php-librarys
src/Files/Directory.php
Directory.copy
public static function copy($oldDir, $newDir): bool { $oldDir = self::pathFormat($oldDir); $newDir = self::pathFormat($newDir); if (!is_dir($oldDir)) { throw new NotFoundException('复制失败:' . $oldDir . ' 不存在!'); } $newDir = self::create($newDir); foreach ...
php
public static function copy($oldDir, $newDir): bool { $oldDir = self::pathFormat($oldDir); $newDir = self::pathFormat($newDir); if (!is_dir($oldDir)) { throw new NotFoundException('复制失败:' . $oldDir . ' 不存在!'); } $newDir = self::create($newDir); foreach ...
[ "public", "static", "function", "copy", "(", "$", "oldDir", ",", "$", "newDir", ")", ":", "bool", "{", "$", "oldDir", "=", "self", "::", "pathFormat", "(", "$", "oldDir", ")", ";", "$", "newDir", "=", "self", "::", "pathFormat", "(", "$", "newDir", ...
复制目录内容 @param $oldDir @param $newDir @return bool @throws NotFoundException
[ "复制目录内容" ]
train
https://github.com/inhere/php-librarys/blob/e6ca598685469794f310e3ab0e2bc19519cd0ae6/src/Files/Directory.php#L322-L350
inhere/php-librarys
src/Files/Directory.php
Directory.comparePath
public static function comparePath($newPath, $oldPath): string { $oldDirName = basename(rtrim($oldPath, '/')); $newPath_arr = explode('/', rtrim($newPath, '/')); $oldPath_arr = explode('/', rtrim($oldPath, '/')); $reOne = array_diff($newPath_arr, $oldPath_arr); $numOne = \co...
php
public static function comparePath($newPath, $oldPath): string { $oldDirName = basename(rtrim($oldPath, '/')); $newPath_arr = explode('/', rtrim($newPath, '/')); $oldPath_arr = explode('/', rtrim($oldPath, '/')); $reOne = array_diff($newPath_arr, $oldPath_arr); $numOne = \co...
[ "public", "static", "function", "comparePath", "(", "$", "newPath", ",", "$", "oldPath", ")", ":", "string", "{", "$", "oldDirName", "=", "basename", "(", "rtrim", "(", "$", "oldPath", ",", "'/'", ")", ")", ";", "$", "newPath_arr", "=", "explode", "(",...
比较文件路径 @param $newPath @param $oldPath @return string
[ "比较文件路径" ]
train
https://github.com/inhere/php-librarys/blob/e6ca598685469794f310e3ab0e2bc19519cd0ae6/src/Files/Directory.php#L381-L420
nabab/bbn
src/bbn/mvc/view.php
view.get
public function get(array $data=null) { if ( $this->check() ){ if ( \is_null($this->content) ){ $this->content = file_get_contents($this->file); } if ( empty($this->content) ){ return ''; } if ( $this->checkers ){ $st = ''; foreach ( $this->checkers as $chk ){ $st .= file_get_...
php
public function get(array $data=null) { if ( $this->check() ){ if ( \is_null($this->content) ){ $this->content = file_get_contents($this->file); } if ( empty($this->content) ){ return ''; } if ( $this->checkers ){ $st = ''; foreach ( $this->checkers as $chk ){ $st .= file_get_...
[ "public", "function", "get", "(", "array", "$", "data", "=", "null", ")", "{", "if", "(", "$", "this", "->", "check", "(", ")", ")", "{", "if", "(", "\\", "is_null", "(", "$", "this", "->", "content", ")", ")", "{", "$", "this", "->", "content"...
Processes the controller and checks whether it has been routed or not. @return bool
[ "Processes", "the", "controller", "and", "checks", "whether", "it", "has", "been", "routed", "or", "not", "." ]
train
https://github.com/nabab/bbn/blob/439fea2faa0de22fdaae2611833bab8061f40c37/src/bbn/mvc/view.php#L88-L144
odiaseo/pagebuilder
src/PageBuilder/Model/AbstractModelFactory.php
AbstractModelFactory.canCreate
public function canCreate(ContainerInterface $container, $requestedName) { if (substr($requestedName, 0, strlen($this->_configPrefix)) != $this->_configPrefix) { return false; } return true; }
php
public function canCreate(ContainerInterface $container, $requestedName) { if (substr($requestedName, 0, strlen($this->_configPrefix)) != $this->_configPrefix) { return false; } return true; }
[ "public", "function", "canCreate", "(", "ContainerInterface", "$", "container", ",", "$", "requestedName", ")", "{", "if", "(", "substr", "(", "$", "requestedName", ",", "0", ",", "strlen", "(", "$", "this", "->", "_configPrefix", ")", ")", "!=", "$", "t...
@param ContainerInterface $container @param string $requestedName @return bool
[ "@param", "ContainerInterface", "$container", "@param", "string", "$requestedName" ]
train
https://github.com/odiaseo/pagebuilder/blob/88ef7cccf305368561307efe4ca07fac8e5774f3/src/PageBuilder/Model/AbstractModelFactory.php#L32-L39
odiaseo/pagebuilder
src/PageBuilder/Model/AbstractModelFactory.php
AbstractModelFactory.resolveEntityClassName
private function resolveEntityClassName(ContainerInterface $serviceLocator, $id, $default) { /** @var $sampleService \SynergyCommon\Service\BaseService */ $reverseFilter = new CamelCaseToDash(); $entityId = strtolower($reverseFilter->filter($id)); $sampleService = $se...
php
private function resolveEntityClassName(ContainerInterface $serviceLocator, $id, $default) { /** @var $sampleService \SynergyCommon\Service\BaseService */ $reverseFilter = new CamelCaseToDash(); $entityId = strtolower($reverseFilter->filter($id)); $sampleService = $se...
[ "private", "function", "resolveEntityClassName", "(", "ContainerInterface", "$", "serviceLocator", ",", "$", "id", ",", "$", "default", ")", "{", "/** @var $sampleService \\SynergyCommon\\Service\\BaseService */", "$", "reverseFilter", "=", "new", "CamelCaseToDash", "(", ...
@param ContainerInterface $serviceLocator @param $id @param $default @return mixed
[ "@param", "ContainerInterface", "$serviceLocator", "@param", "$id", "@param", "$default" ]
train
https://github.com/odiaseo/pagebuilder/blob/88ef7cccf305368561307efe4ca07fac8e5774f3/src/PageBuilder/Model/AbstractModelFactory.php#L82-L95
songshenzong/log
src/SymfonyHttpDriver.php
SymfonyHttpDriver.setSessionValue
public function setSessionValue($name, $value) { // In Laravel 5.4 the session changed to use their own custom implementation // instead of the one from Symfony. One of the changes was the set method // that was changed to put. Here we check if we are using the new one. if (method_ex...
php
public function setSessionValue($name, $value) { // In Laravel 5.4 the session changed to use their own custom implementation // instead of the one from Symfony. One of the changes was the set method // that was changed to put. Here we check if we are using the new one. if (method_ex...
[ "public", "function", "setSessionValue", "(", "$", "name", ",", "$", "value", ")", "{", "// In Laravel 5.4 the session changed to use their own custom implementation", "// instead of the one from Symfony. One of the changes was the set method", "// that was changed to put. Here we check if...
Sets a value in the session @param string $name @param string $value
[ "Sets", "a", "value", "in", "the", "session" ]
train
https://github.com/songshenzong/log/blob/b1e01f7994da47737866eabf82367490eab17c46/src/SymfonyHttpDriver.php#L63-L73
Eresus/EresusCMS
src/core/classes.php
ContentPlugin.__item
public function __item($item = null) { $result = parent::__item($item); $result['content'] = true; return $result; }
php
public function __item($item = null) { $result = parent::__item($item); $result['content'] = true; return $result; }
[ "public", "function", "__item", "(", "$", "item", "=", "null", ")", "{", "$", "result", "=", "parent", "::", "__item", "(", "$", "item", ")", ";", "$", "result", "[", "'content'", "]", "=", "true", ";", "return", "$", "result", ";", "}" ]
Возвращает информацию о плагине @param array $item Предыдущая версия информации (по умолчанию null) @return array Массив информации, пригодный для записи в БД
[ "Возвращает", "информацию", "о", "плагине" ]
train
https://github.com/Eresus/EresusCMS/blob/b0afc661105f0a2f65d49abac13956cc93c5188d/src/core/classes.php#L76-L81
Eresus/EresusCMS
src/core/classes.php
ContentPlugin.onSectionDelete
public function onSectionDelete($id, $table = '') { if (count($this->dbTable($table))) { $this->dbDelete($table, $id, 'section'); } }
php
public function onSectionDelete($id, $table = '') { if (count($this->dbTable($table))) { $this->dbDelete($table, $id, 'section'); } }
[ "public", "function", "onSectionDelete", "(", "$", "id", ",", "$", "table", "=", "''", ")", "{", "if", "(", "count", "(", "$", "this", "->", "dbTable", "(", "$", "table", ")", ")", ")", "{", "$", "this", "->", "dbDelete", "(", "$", "table", ",", ...
Действия при удалении раздела данного типа @param int $id Идентификатор удаляемого раздела @param string $table Имя таблицы
[ "Действия", "при", "удалении", "раздела", "данного", "типа" ]
train
https://github.com/Eresus/EresusCMS/blob/b0afc661105f0a2f65d49abac13956cc93c5188d/src/core/classes.php#L88-L94
Eresus/EresusCMS
src/core/classes.php
ContentPlugin.updateContent
public function updateContent($content) { $db = Eresus_CMS::getLegacyKernel()->db; $item = $db->selectItem('pages', "`id`='".Eresus_Kernel::app()->getPage()->id."'"); $item['content'] = $content; $db->updateItem('pages', $item, "`id`='".Eresus_Kernel::app()->getPage()->id."'"); }
php
public function updateContent($content) { $db = Eresus_CMS::getLegacyKernel()->db; $item = $db->selectItem('pages', "`id`='".Eresus_Kernel::app()->getPage()->id."'"); $item['content'] = $content; $db->updateItem('pages', $item, "`id`='".Eresus_Kernel::app()->getPage()->id."'"); }
[ "public", "function", "updateContent", "(", "$", "content", ")", "{", "$", "db", "=", "Eresus_CMS", "::", "getLegacyKernel", "(", ")", "->", "db", ";", "$", "item", "=", "$", "db", "->", "selectItem", "(", "'pages'", ",", "\"`id`='\"", ".", "Eresus_Kerne...
Обновляет контент страницы в БД @param string $content Контент
[ "Обновляет", "контент", "страницы", "в", "БД" ]
train
https://github.com/Eresus/EresusCMS/blob/b0afc661105f0a2f65d49abac13956cc93c5188d/src/core/classes.php#L101-L107
Eresus/EresusCMS
src/core/classes.php
ContentPlugin.clientRenderContent
public function clientRenderContent() { /** @var TClientUI $page */ $page = Eresus_Kernel::app()->getPage(); $request = Eresus_CMS::getLegacyKernel()->request; /* Если в URL указано что-либо кроме адреса раздела, отправляет ответ 404 */ if ($request['file'] || $request['query...
php
public function clientRenderContent() { /** @var TClientUI $page */ $page = Eresus_Kernel::app()->getPage(); $request = Eresus_CMS::getLegacyKernel()->request; /* Если в URL указано что-либо кроме адреса раздела, отправляет ответ 404 */ if ($request['file'] || $request['query...
[ "public", "function", "clientRenderContent", "(", ")", "{", "/** @var TClientUI $page */", "$", "page", "=", "Eresus_Kernel", "::", "app", "(", ")", "->", "getPage", "(", ")", ";", "$", "request", "=", "Eresus_CMS", "::", "getLegacyKernel", "(", ")", "->", "...
Отрисовка клиентской части @return string Контент @throws Eresus_CMS_Exception_NotFound
[ "Отрисовка", "клиентской", "части" ]
train
https://github.com/Eresus/EresusCMS/blob/b0afc661105f0a2f65d49abac13956cc93c5188d/src/core/classes.php#L125-L138
Eresus/EresusCMS
src/core/classes.php
ContentPlugin.adminRenderContent
public function adminRenderContent() { if (arg('action') == 'update') $this->adminUpdate(); $item = Eresus_CMS::getLegacyKernel()->db->selectItem('pages', "`id`='". Eresus_Kernel::app()->getPage()->id."'"); $form = array( 'name' => 'editForm', 'caption' =>...
php
public function adminRenderContent() { if (arg('action') == 'update') $this->adminUpdate(); $item = Eresus_CMS::getLegacyKernel()->db->selectItem('pages', "`id`='". Eresus_Kernel::app()->getPage()->id."'"); $form = array( 'name' => 'editForm', 'caption' =>...
[ "public", "function", "adminRenderContent", "(", ")", "{", "if", "(", "arg", "(", "'action'", ")", "==", "'update'", ")", "$", "this", "->", "adminUpdate", "(", ")", ";", "$", "item", "=", "Eresus_CMS", "::", "getLegacyKernel", "(", ")", "->", "db", "-...
Отрисовка административной части @return string Контент
[ "Отрисовка", "административной", "части" ]
train
https://github.com/Eresus/EresusCMS/blob/b0afc661105f0a2f65d49abac13956cc93c5188d/src/core/classes.php#L145-L165
Eresus/EresusCMS
src/core/classes.php
EresusExtensionConnector.replaceMacros
protected function replaceMacros($text) { $request = Eresus_CMS::getLegacyKernel()->request; $text = str_replace( array( '$(httpHost)', '$(httpPath)', '$(httpRoot)', '$(styleRoot)', '$(dataRoot)', ...
php
protected function replaceMacros($text) { $request = Eresus_CMS::getLegacyKernel()->request; $text = str_replace( array( '$(httpHost)', '$(httpPath)', '$(httpRoot)', '$(styleRoot)', '$(dataRoot)', ...
[ "protected", "function", "replaceMacros", "(", "$", "text", ")", "{", "$", "request", "=", "Eresus_CMS", "::", "getLegacyKernel", "(", ")", "->", "request", ";", "$", "text", "=", "str_replace", "(", "array", "(", "'$(httpHost)'", ",", "'$(httpPath)'", ",", ...
Заменяет глобальные макросы @param string $text @return string
[ "Заменяет", "глобальные", "макросы" ]
train
https://github.com/Eresus/EresusCMS/blob/b0afc661105f0a2f65d49abac13956cc93c5188d/src/core/classes.php#L208-L230
Eresus/EresusCMS
src/core/classes.php
EresusExtensionConnector.proxy
function proxy() { if (!UserRights(EDITOR)) die; $filename = Eresus_CMS::getLegacyKernel()->request['path'] . Eresus_CMS::getLegacyKernel()->request['file']; $filename = Eresus_CMS::getLegacyKernel()->froot . substr($filename, strlen(Eresus_CMS::getLe...
php
function proxy() { if (!UserRights(EDITOR)) die; $filename = Eresus_CMS::getLegacyKernel()->request['path'] . Eresus_CMS::getLegacyKernel()->request['file']; $filename = Eresus_CMS::getLegacyKernel()->froot . substr($filename, strlen(Eresus_CMS::getLe...
[ "function", "proxy", "(", ")", "{", "if", "(", "!", "UserRights", "(", "EDITOR", ")", ")", "die", ";", "$", "filename", "=", "Eresus_CMS", "::", "getLegacyKernel", "(", ")", "->", "request", "[", "'path'", "]", ".", "Eresus_CMS", "::", "getLegacyKernel",...
Метод вызывается при проксировании прямых запросов к расширению
[ "Метод", "вызывается", "при", "проксировании", "прямых", "запросов", "к", "расширению" ]
train
https://github.com/Eresus/EresusCMS/blob/b0afc661105f0a2f65d49abac13956cc93c5188d/src/core/classes.php#L236-L296
Eresus/EresusCMS
src/core/classes.php
EresusExtensions.get_name
function get_name($class, $function, $name = null) { $result = false; if (isset(Eresus_CMS::getLegacyKernel()->conf['extensions'])) { if (isset(Eresus_CMS::getLegacyKernel()->conf['extensions'][$class])) { if (isset(Eresus_CMS::getLegacyKernel()->conf[...
php
function get_name($class, $function, $name = null) { $result = false; if (isset(Eresus_CMS::getLegacyKernel()->conf['extensions'])) { if (isset(Eresus_CMS::getLegacyKernel()->conf['extensions'][$class])) { if (isset(Eresus_CMS::getLegacyKernel()->conf[...
[ "function", "get_name", "(", "$", "class", ",", "$", "function", ",", "$", "name", "=", "null", ")", "{", "$", "result", "=", "false", ";", "if", "(", "isset", "(", "Eresus_CMS", "::", "getLegacyKernel", "(", ")", "->", "conf", "[", "'extensions'", "...
Определение имени расширения @param string $class Класс расширения @param string $function Расширяемая функция @param string $name Имя расширения @return mixed Имя расширения или false если подходящего расширения не найдено
[ "Определение", "имени", "расширения" ]
train
https://github.com/Eresus/EresusCMS/blob/b0afc661105f0a2f65d49abac13956cc93c5188d/src/core/classes.php#L324-L341
Eresus/EresusCMS
src/core/classes.php
EresusExtensions.load
function load($class, $function, $name = null) { $result = false; $name = $this->get_name($class, $function, $name); if (isset($this->items[$name])) { $result = $this->items[$name]; } else { $filename = Eresus_CMS::getLegacyKernel()->f...
php
function load($class, $function, $name = null) { $result = false; $name = $this->get_name($class, $function, $name); if (isset($this->items[$name])) { $result = $this->items[$name]; } else { $filename = Eresus_CMS::getLegacyKernel()->f...
[ "function", "load", "(", "$", "class", ",", "$", "function", ",", "$", "name", "=", "null", ")", "{", "$", "result", "=", "false", ";", "$", "name", "=", "$", "this", "->", "get_name", "(", "$", "class", ",", "$", "function", ",", "$", "name", ...
Загрузка расширения @param string $class Класс расширения @param string $function Расширяемая функция @param string $name Имя расширения @return mixed Экземпляр класса EresusExtensionConnector или false если не удалось загрузить расширение
[ "Загрузка", "расширения" ]
train
https://github.com/Eresus/EresusCMS/blob/b0afc661105f0a2f65d49abac13956cc93c5188d/src/core/classes.php#L352-L377
SergioMadness/query-builder
src/traits/SelectBuilder.php
SelectBuilder.union
public function union(\pwf\components\querybuilder\interfaces\QueryBuilder $query) { $this->union[] = $query; return $this; }
php
public function union(\pwf\components\querybuilder\interfaces\QueryBuilder $query) { $this->union[] = $query; return $this; }
[ "public", "function", "union", "(", "\\", "pwf", "\\", "components", "\\", "querybuilder", "\\", "interfaces", "\\", "QueryBuilder", "$", "query", ")", "{", "$", "this", "->", "union", "[", "]", "=", "$", "query", ";", "return", "$", "this", ";", "}" ]
Add union @param \pwf\components\querybuilder\interfaces\QueryBuilder $query @return \pwf\components\querybuilder\interfaces\SelectBuilder
[ "Add", "union" ]
train
https://github.com/SergioMadness/query-builder/blob/95b7a46bba4c4d369101c6f0d37f133fecb3956d/src/traits/SelectBuilder.php#L180-L184
SergioMadness/query-builder
src/traits/SelectBuilder.php
SelectBuilder.join
public function join($table, $condition, $joinType = self::JOIN_LEFT) { $this->join[] = [ 'table' => $table, 'condition' => $condition, 'jointType' => $joinType ]; return $this; }
php
public function join($table, $condition, $joinType = self::JOIN_LEFT) { $this->join[] = [ 'table' => $table, 'condition' => $condition, 'jointType' => $joinType ]; return $this; }
[ "public", "function", "join", "(", "$", "table", ",", "$", "condition", ",", "$", "joinType", "=", "self", "::", "JOIN_LEFT", ")", "{", "$", "this", "->", "join", "[", "]", "=", "[", "'table'", "=>", "$", "table", ",", "'condition'", "=>", "$", "co...
Join table @param string $table @param mixed $condition @param int $joinType @return \pwf\components\querybuilder\interfaces\SelectBuilder
[ "Join", "table" ]
train
https://github.com/SergioMadness/query-builder/blob/95b7a46bba4c4d369101c6f0d37f133fecb3956d/src/traits/SelectBuilder.php#L204-L212
chubbyphp/chubbyphp-model-doctrine-dbal
src/Command/RunSqlCommand.php
RunSqlCommand.getSql
private function getSql(InputInterface $input): string { if (($sql = $input->getArgument('sql')) === null) { throw new \RuntimeException("Argument 'SQL' is required in order to execute this command correctly."); } return $sql; }
php
private function getSql(InputInterface $input): string { if (($sql = $input->getArgument('sql')) === null) { throw new \RuntimeException("Argument 'SQL' is required in order to execute this command correctly."); } return $sql; }
[ "private", "function", "getSql", "(", "InputInterface", "$", "input", ")", ":", "string", "{", "if", "(", "(", "$", "sql", "=", "$", "input", "->", "getArgument", "(", "'sql'", ")", ")", "===", "null", ")", "{", "throw", "new", "\\", "RuntimeException"...
@param InputInterface $input @return string
[ "@param", "InputInterface", "$input" ]
train
https://github.com/chubbyphp/chubbyphp-model-doctrine-dbal/blob/1079c28f5bffc2e2bec04122742d5008464c167f/src/Command/RunSqlCommand.php#L57-L64
chubbyphp/chubbyphp-model-doctrine-dbal
src/Command/RunSqlCommand.php
RunSqlCommand.getDepth
private function getDepth(InputInterface $input): int { $depth = $input->getOption('depth'); if (!is_numeric($depth)) { throw new \InvalidArgumentException("Option 'depth' must contains an integer value"); } return (int) $depth; }
php
private function getDepth(InputInterface $input): int { $depth = $input->getOption('depth'); if (!is_numeric($depth)) { throw new \InvalidArgumentException("Option 'depth' must contains an integer value"); } return (int) $depth; }
[ "private", "function", "getDepth", "(", "InputInterface", "$", "input", ")", ":", "int", "{", "$", "depth", "=", "$", "input", "->", "getOption", "(", "'depth'", ")", ";", "if", "(", "!", "is_numeric", "(", "$", "depth", ")", ")", "{", "throw", "new"...
@param InputInterface $input @return int
[ "@param", "InputInterface", "$input" ]
train
https://github.com/chubbyphp/chubbyphp-model-doctrine-dbal/blob/1079c28f5bffc2e2bec04122742d5008464c167f/src/Command/RunSqlCommand.php#L71-L80
gregorybesson/PlaygroundCms
src/Form/Admin/Page.php
Page.getCmsCategories
public function getCmsCategories() { $categories = array('' => 'No category'); $results = $this->getEventManager() ->trigger(__FUNCTION__, $this, array( 'categories' => $categories )) ->last(); if ($results) { $categories = $resul...
php
public function getCmsCategories() { $categories = array('' => 'No category'); $results = $this->getEventManager() ->trigger(__FUNCTION__, $this, array( 'categories' => $categories )) ->last(); if ($results) { $categories = $resul...
[ "public", "function", "getCmsCategories", "(", ")", "{", "$", "categories", "=", "array", "(", "''", "=>", "'No category'", ")", ";", "$", "results", "=", "$", "this", "->", "getEventManager", "(", ")", "->", "trigger", "(", "__FUNCTION__", ",", "$", "th...
An event is triggered so that the modules wishing to associate a category to a CMS page can add their own categories without adherence between the 2 modules @return array
[ "An", "event", "is", "triggered", "so", "that", "the", "modules", "wishing", "to", "associate", "a", "category", "to", "a", "CMS", "page", "can", "add", "their", "own", "categories", "without", "adherence", "between", "the", "2", "modules" ]
train
https://github.com/gregorybesson/PlaygroundCms/blob/e929a283f2a6e82d4f248c930f7aa454ce20cbc3/src/Form/Admin/Page.php#L208-L223
Eresus/EresusCMS
src/core/framework/core/3rdparty/ezcomponents/DatabaseSchema/src/schema.php
ezcDbSchema.checkSchemaReader
static private function checkSchemaReader( ezcDbSchemaReader $obj, $type ) { if ( !( ( $obj->getReaderType() & $type ) == $type ) ) { throw new ezcDbSchemaInvalidReaderClassException( get_class( $obj ), $type ); } }
php
static private function checkSchemaReader( ezcDbSchemaReader $obj, $type ) { if ( !( ( $obj->getReaderType() & $type ) == $type ) ) { throw new ezcDbSchemaInvalidReaderClassException( get_class( $obj ), $type ); } }
[ "static", "private", "function", "checkSchemaReader", "(", "ezcDbSchemaReader", "$", "obj", ",", "$", "type", ")", "{", "if", "(", "!", "(", "(", "$", "obj", "->", "getReaderType", "(", ")", "&", "$", "type", ")", "==", "$", "type", ")", ")", "{", ...
Checks whether the object in $obj implements the correct $type of reader handler. @throws ezcDbSchemaInvalidReaderClassException if the object in $obj is not a schema reader of the correct type. @param ezcDbSchemaReader $obj @param int $type
[ "Checks", "whether", "the", "object", "in", "$obj", "implements", "the", "correct", "$type", "of", "reader", "handler", "." ]
train
https://github.com/Eresus/EresusCMS/blob/b0afc661105f0a2f65d49abac13956cc93c5188d/src/core/framework/core/3rdparty/ezcomponents/DatabaseSchema/src/schema.php#L124-L130
Eresus/EresusCMS
src/core/framework/core/3rdparty/ezcomponents/DatabaseSchema/src/schema.php
ezcDbSchema.createFromFile
static public function createFromFile( $format, $file ) { $className = ezcDbSchemaHandlerManager::getReaderByFormat( $format ); $reader = new $className(); self::checkSchemaReader( $reader, self::FILE ); return $reader->loadFromFile( $file ); }
php
static public function createFromFile( $format, $file ) { $className = ezcDbSchemaHandlerManager::getReaderByFormat( $format ); $reader = new $className(); self::checkSchemaReader( $reader, self::FILE ); return $reader->loadFromFile( $file ); }
[ "static", "public", "function", "createFromFile", "(", "$", "format", ",", "$", "file", ")", "{", "$", "className", "=", "ezcDbSchemaHandlerManager", "::", "getReaderByFormat", "(", "$", "format", ")", ";", "$", "reader", "=", "new", "$", "className", "(", ...
Factory method to create a ezcDbSchema object from the file $file with the format $format. @throws ezcDbSchemaInvalidReaderClassException if the handler associated with the $format is not a file schema reader. @param string $format @param string $file
[ "Factory", "method", "to", "create", "a", "ezcDbSchema", "object", "from", "the", "file", "$file", "with", "the", "format", "$format", "." ]
train
https://github.com/Eresus/EresusCMS/blob/b0afc661105f0a2f65d49abac13956cc93c5188d/src/core/framework/core/3rdparty/ezcomponents/DatabaseSchema/src/schema.php#L141-L147
Eresus/EresusCMS
src/core/framework/core/3rdparty/ezcomponents/DatabaseSchema/src/schema.php
ezcDbSchema.createFromDb
static public function createFromDb( ezcDbHandler $db ) { self::initOptions(); $className = ezcDbSchemaHandlerManager::getReaderByFormat( $db->getName() ); $reader = new $className(); self::checkSchemaReader( $reader, self::DATABASE ); return $reader->loadFromDb( $db ); }
php
static public function createFromDb( ezcDbHandler $db ) { self::initOptions(); $className = ezcDbSchemaHandlerManager::getReaderByFormat( $db->getName() ); $reader = new $className(); self::checkSchemaReader( $reader, self::DATABASE ); return $reader->loadFromDb( $db ); }
[ "static", "public", "function", "createFromDb", "(", "ezcDbHandler", "$", "db", ")", "{", "self", "::", "initOptions", "(", ")", ";", "$", "className", "=", "ezcDbSchemaHandlerManager", "::", "getReaderByFormat", "(", "$", "db", "->", "getName", "(", ")", ")...
Factory method to create a ezcDbSchema object from the database $db. @throws ezcDbSchemaInvalidReaderClassException if the handler associated with the $format is not a database schema reader. @param ezcDbHandler $db
[ "Factory", "method", "to", "create", "a", "ezcDbSchema", "object", "from", "the", "database", "$db", "." ]
train
https://github.com/Eresus/EresusCMS/blob/b0afc661105f0a2f65d49abac13956cc93c5188d/src/core/framework/core/3rdparty/ezcomponents/DatabaseSchema/src/schema.php#L157-L164
Eresus/EresusCMS
src/core/framework/core/3rdparty/ezcomponents/DatabaseSchema/src/schema.php
ezcDbSchema.checkSchemaWriter
static private function checkSchemaWriter( $obj, $type ) { if ( !( ( $obj->getWriterType() & $type ) == $type ) ) { throw new ezcDbSchemaInvalidWriterClassException( get_class( $obj ), $type ); } }
php
static private function checkSchemaWriter( $obj, $type ) { if ( !( ( $obj->getWriterType() & $type ) == $type ) ) { throw new ezcDbSchemaInvalidWriterClassException( get_class( $obj ), $type ); } }
[ "static", "private", "function", "checkSchemaWriter", "(", "$", "obj", ",", "$", "type", ")", "{", "if", "(", "!", "(", "(", "$", "obj", "->", "getWriterType", "(", ")", "&", "$", "type", ")", "==", "$", "type", ")", ")", "{", "throw", "new", "ez...
Checks whether the object in $obj implements the correct $type of writer handler. @throws ezcDbSchemaInvalidWriterClassException if the object in $obj is not a schema writer of the correct type. @param ezcDbSchemaWriter $obj @param int $type
[ "Checks", "whether", "the", "object", "in", "$obj", "implements", "the", "correct", "$type", "of", "writer", "handler", "." ]
train
https://github.com/Eresus/EresusCMS/blob/b0afc661105f0a2f65d49abac13956cc93c5188d/src/core/framework/core/3rdparty/ezcomponents/DatabaseSchema/src/schema.php#L175-L181
Eresus/EresusCMS
src/core/framework/core/3rdparty/ezcomponents/DatabaseSchema/src/schema.php
ezcDbSchema.writeToFile
public function writeToFile( $format, $file ) { $className = ezcDbSchemaHandlerManager::getWriterByFormat( $format ); $reader = new $className(); self::checkSchemaWriter( $reader, self::FILE ); $reader->saveToFile( $file, $this ); }
php
public function writeToFile( $format, $file ) { $className = ezcDbSchemaHandlerManager::getWriterByFormat( $format ); $reader = new $className(); self::checkSchemaWriter( $reader, self::FILE ); $reader->saveToFile( $file, $this ); }
[ "public", "function", "writeToFile", "(", "$", "format", ",", "$", "file", ")", "{", "$", "className", "=", "ezcDbSchemaHandlerManager", "::", "getWriterByFormat", "(", "$", "format", ")", ";", "$", "reader", "=", "new", "$", "className", "(", ")", ";", ...
Writes the schema to the file $file in format $format. @throws ezcDbSchemaInvalidWriterClassException if the handler associated with the $format is not a file schema writer. @param string $format Available formats are at least: 'array' and 'xml'. @param string $file
[ "Writes", "the", "schema", "to", "the", "file", "$file", "in", "format", "$format", "." ]
train
https://github.com/Eresus/EresusCMS/blob/b0afc661105f0a2f65d49abac13956cc93c5188d/src/core/framework/core/3rdparty/ezcomponents/DatabaseSchema/src/schema.php#L192-L198
Eresus/EresusCMS
src/core/framework/core/3rdparty/ezcomponents/DatabaseSchema/src/schema.php
ezcDbSchema.writeToDb
public function writeToDb( ezcDbHandler $db ) { self::initOptions(); $className = ezcDbSchemaHandlerManager::getWriterByFormat( $db->getName() ); $writer = new $className(); self::checkSchemaWriter( $writer, self::DATABASE ); $writer->saveToDb( $db, $this ); }
php
public function writeToDb( ezcDbHandler $db ) { self::initOptions(); $className = ezcDbSchemaHandlerManager::getWriterByFormat( $db->getName() ); $writer = new $className(); self::checkSchemaWriter( $writer, self::DATABASE ); $writer->saveToDb( $db, $this ); }
[ "public", "function", "writeToDb", "(", "ezcDbHandler", "$", "db", ")", "{", "self", "::", "initOptions", "(", ")", ";", "$", "className", "=", "ezcDbSchemaHandlerManager", "::", "getWriterByFormat", "(", "$", "db", "->", "getName", "(", ")", ")", ";", "$"...
Creates the tables defined in the schema into the database specified through $db. @throws ezcDbSchemaInvalidWriterClassException if the handler associated with the $format is not a database schema writer. @param ezcDbHandler $db
[ "Creates", "the", "tables", "defined", "in", "the", "schema", "into", "the", "database", "specified", "through", "$db", "." ]
train
https://github.com/Eresus/EresusCMS/blob/b0afc661105f0a2f65d49abac13956cc93c5188d/src/core/framework/core/3rdparty/ezcomponents/DatabaseSchema/src/schema.php#L208-L215
Eresus/EresusCMS
src/core/framework/core/3rdparty/ezcomponents/DatabaseSchema/src/schema.php
ezcDbSchema.convertToDDL
public function convertToDDL( $db ) { self::initOptions(); if ( $db instanceof ezcDbHandler ) { $db = $db->getName(); } $className = ezcDbSchemaHandlerManager::getDiffWriterByFormat( $db ); $writer = new $className(); self::checkSchemaWriter( $writ...
php
public function convertToDDL( $db ) { self::initOptions(); if ( $db instanceof ezcDbHandler ) { $db = $db->getName(); } $className = ezcDbSchemaHandlerManager::getDiffWriterByFormat( $db ); $writer = new $className(); self::checkSchemaWriter( $writ...
[ "public", "function", "convertToDDL", "(", "$", "db", ")", "{", "self", "::", "initOptions", "(", ")", ";", "if", "(", "$", "db", "instanceof", "ezcDbHandler", ")", "{", "$", "db", "=", "$", "db", "->", "getName", "(", ")", ";", "}", "$", "classNam...
Returns the $db specific SQL queries that would create the tables defined in the schema. The database type can be given as both a database handler (instanceof ezcDbHandler) or the name of the database as string as retrieved through calling getName() on the database handler object. @see ezcDbHandler::getName() @throw...
[ "Returns", "the", "$db", "specific", "SQL", "queries", "that", "would", "create", "the", "tables", "defined", "in", "the", "schema", "." ]
train
https://github.com/Eresus/EresusCMS/blob/b0afc661105f0a2f65d49abac13956cc93c5188d/src/core/framework/core/3rdparty/ezcomponents/DatabaseSchema/src/schema.php#L233-L244
Eresus/EresusCMS
src/core/framework/core/3rdparty/ezcomponents/DatabaseSchema/src/schema.php
ezcDbSchema.createNewTable
static public function createNewTable( $fields, $indexes ) { self::initOptions(); $className = ezcDbSchema::$options->tableClassName; return new $className( $fields, $indexes ); }
php
static public function createNewTable( $fields, $indexes ) { self::initOptions(); $className = ezcDbSchema::$options->tableClassName; return new $className( $fields, $indexes ); }
[ "static", "public", "function", "createNewTable", "(", "$", "fields", ",", "$", "indexes", ")", "{", "self", "::", "initOptions", "(", ")", ";", "$", "className", "=", "ezcDbSchema", "::", "$", "options", "->", "tableClassName", ";", "return", "new", "$", ...
Returns an object to represent a table in the schema. @param array(string=>ezcDbSchemaField) $fields @param array(string=>ezcDbSchemaIndex) $indexes @return ezcDbSchemaTable or an inherited class
[ "Returns", "an", "object", "to", "represent", "a", "table", "in", "the", "schema", "." ]
train
https://github.com/Eresus/EresusCMS/blob/b0afc661105f0a2f65d49abac13956cc93c5188d/src/core/framework/core/3rdparty/ezcomponents/DatabaseSchema/src/schema.php#L304-L309
Eresus/EresusCMS
src/core/framework/core/3rdparty/ezcomponents/DatabaseSchema/src/schema.php
ezcDbSchema.createNewField
static public function createNewField( $fieldType, $fieldLength, $fieldNotNull, $fieldDefault, $fieldAutoIncrement, $fieldUnsigned ) { self::initOptions(); $className = ezcDbSchema::$options->fieldClassName; return new $className( $fieldType, $fieldLength, $fieldNotNull, $fieldDefault, $fiel...
php
static public function createNewField( $fieldType, $fieldLength, $fieldNotNull, $fieldDefault, $fieldAutoIncrement, $fieldUnsigned ) { self::initOptions(); $className = ezcDbSchema::$options->fieldClassName; return new $className( $fieldType, $fieldLength, $fieldNotNull, $fieldDefault, $fiel...
[ "static", "public", "function", "createNewField", "(", "$", "fieldType", ",", "$", "fieldLength", ",", "$", "fieldNotNull", ",", "$", "fieldDefault", ",", "$", "fieldAutoIncrement", ",", "$", "fieldUnsigned", ")", "{", "self", "::", "initOptions", "(", ")", ...
Returns an object to represent a table's field in the schema. @param string $fieldType @param integer $fieldLength @param bool $fieldNotNull @param mixed $fieldDefault @param bool $fieldAutoIncrement @param bool $fieldUnsigned @return ezcDbSchemaField or an inherited class
[ "Returns", "an", "object", "to", "represent", "a", "table", "s", "field", "in", "the", "schema", "." ]
train
https://github.com/Eresus/EresusCMS/blob/b0afc661105f0a2f65d49abac13956cc93c5188d/src/core/framework/core/3rdparty/ezcomponents/DatabaseSchema/src/schema.php#L322-L327
Eresus/EresusCMS
src/core/framework/core/3rdparty/ezcomponents/DatabaseSchema/src/schema.php
ezcDbSchema.createNewIndex
static public function createNewIndex( $fields, $primary, $unique ) { self::initOptions(); $className = ezcDbSchema::$options->indexClassName; return new $className( $fields, $primary, $unique ); }
php
static public function createNewIndex( $fields, $primary, $unique ) { self::initOptions(); $className = ezcDbSchema::$options->indexClassName; return new $className( $fields, $primary, $unique ); }
[ "static", "public", "function", "createNewIndex", "(", "$", "fields", ",", "$", "primary", ",", "$", "unique", ")", "{", "self", "::", "initOptions", "(", ")", ";", "$", "className", "=", "ezcDbSchema", "::", "$", "options", "->", "indexClassName", ";", ...
Returns an object to represent a table's field in the schema. @param array(string=>ezcDbSchemaIndexField) $fields @param bool $primary @param bool $unique @return ezcDbSchemaIndex or an inherited class
[ "Returns", "an", "object", "to", "represent", "a", "table", "s", "field", "in", "the", "schema", "." ]
train
https://github.com/Eresus/EresusCMS/blob/b0afc661105f0a2f65d49abac13956cc93c5188d/src/core/framework/core/3rdparty/ezcomponents/DatabaseSchema/src/schema.php#L337-L342
Eresus/EresusCMS
src/core/framework/core/3rdparty/ezcomponents/DatabaseSchema/src/schema.php
ezcDbSchema.createNewIndexField
static public function createNewIndexField( $sorting = null ) { self::initOptions(); $className = ezcDbSchema::$options->indexFieldClassName; return new $className( $sorting ); }
php
static public function createNewIndexField( $sorting = null ) { self::initOptions(); $className = ezcDbSchema::$options->indexFieldClassName; return new $className( $sorting ); }
[ "static", "public", "function", "createNewIndexField", "(", "$", "sorting", "=", "null", ")", "{", "self", "::", "initOptions", "(", ")", ";", "$", "className", "=", "ezcDbSchema", "::", "$", "options", "->", "indexFieldClassName", ";", "return", "new", "$",...
Returns an object to represent a table's field in the schema. @param int $sorting @return ezcDbSchemaIndexField or an inherited class
[ "Returns", "an", "object", "to", "represent", "a", "table", "s", "field", "in", "the", "schema", "." ]
train
https://github.com/Eresus/EresusCMS/blob/b0afc661105f0a2f65d49abac13956cc93c5188d/src/core/framework/core/3rdparty/ezcomponents/DatabaseSchema/src/schema.php#L350-L355
oroinc/OroLayoutComponent
Extension/Theme/ThemeExtension.php
ThemeExtension.loadLayoutUpdates
protected function loadLayoutUpdates(ContextInterface $context) { if ($context->getOr(self::THEME_KEY)) { $paths = $this->getPaths($context); $files = $this->resourceProvider->findApplicableResources($paths); foreach ($files as $file) { $this->loadLayoutUp...
php
protected function loadLayoutUpdates(ContextInterface $context) { if ($context->getOr(self::THEME_KEY)) { $paths = $this->getPaths($context); $files = $this->resourceProvider->findApplicableResources($paths); foreach ($files as $file) { $this->loadLayoutUp...
[ "protected", "function", "loadLayoutUpdates", "(", "ContextInterface", "$", "context", ")", "{", "if", "(", "$", "context", "->", "getOr", "(", "self", "::", "THEME_KEY", ")", ")", "{", "$", "paths", "=", "$", "this", "->", "getPaths", "(", "$", "context...
{@inheritdoc}
[ "{" ]
train
https://github.com/oroinc/OroLayoutComponent/blob/682a96672393d81c63728e47c4a4c3618c515be0/Extension/Theme/ThemeExtension.php#L66-L81
oroinc/OroLayoutComponent
Extension/Theme/ThemeExtension.php
ThemeExtension.loadLayoutUpdate
protected function loadLayoutUpdate($file) { $update = $this->loader->load($file); if ($update) { $el = $update instanceof ElementDependentLayoutUpdateInterface ? $update->getElement() : 'root'; $this->updates[$el][] = $update; $th...
php
protected function loadLayoutUpdate($file) { $update = $this->loader->load($file); if ($update) { $el = $update instanceof ElementDependentLayoutUpdateInterface ? $update->getElement() : 'root'; $this->updates[$el][] = $update; $th...
[ "protected", "function", "loadLayoutUpdate", "(", "$", "file", ")", "{", "$", "update", "=", "$", "this", "->", "loader", "->", "load", "(", "$", "file", ")", ";", "if", "(", "$", "update", ")", "{", "$", "el", "=", "$", "update", "instanceof", "El...
@param string $file @return array
[ "@param", "string", "$file" ]
train
https://github.com/oroinc/OroLayoutComponent/blob/682a96672393d81c63728e47c4a4c3618c515be0/Extension/Theme/ThemeExtension.php#L88-L99
oroinc/OroLayoutComponent
Extension/Theme/ThemeExtension.php
ThemeExtension.getPaths
protected function getPaths(ContextInterface $context) { if ($this->pathProvider instanceof ContextAwareInterface) { $this->pathProvider->setContext($context); } return $this->pathProvider->getPaths([]); }
php
protected function getPaths(ContextInterface $context) { if ($this->pathProvider instanceof ContextAwareInterface) { $this->pathProvider->setContext($context); } return $this->pathProvider->getPaths([]); }
[ "protected", "function", "getPaths", "(", "ContextInterface", "$", "context", ")", "{", "if", "(", "$", "this", "->", "pathProvider", "instanceof", "ContextAwareInterface", ")", "{", "$", "this", "->", "pathProvider", "->", "setContext", "(", "$", "context", "...
Return paths that comes from provider and returns array of resource files @param ContextInterface $context @return array
[ "Return", "paths", "that", "comes", "from", "provider", "and", "returns", "array", "of", "resource", "files" ]
train
https://github.com/oroinc/OroLayoutComponent/blob/682a96672393d81c63728e47c4a4c3618c515be0/Extension/Theme/ThemeExtension.php#L108-L115
inhere/php-librarys
src/Helpers/CurlHelper.php
CurlHelper.get
public static function get($url, array $params = [], array $headers = []) { if ($params) { $url .= (strpos($url, '?') ? '&' : '?') . http_build_query($params); } // $headers = [ 'Content-Type: application/json' ]; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL...
php
public static function get($url, array $params = [], array $headers = []) { if ($params) { $url .= (strpos($url, '?') ? '&' : '?') . http_build_query($params); } // $headers = [ 'Content-Type: application/json' ]; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL...
[ "public", "static", "function", "get", "(", "$", "url", ",", "array", "$", "params", "=", "[", "]", ",", "array", "$", "headers", "=", "[", "]", ")", "{", "if", "(", "$", "params", ")", "{", "$", "url", ".=", "(", "strpos", "(", "$", "url", "...
send GET request @param string $url url @param array $params url params @param array $headers HEADER info @return string
[ "send", "GET", "request" ]
train
https://github.com/inhere/php-librarys/blob/e6ca598685469794f310e3ab0e2bc19519cd0ae6/src/Helpers/CurlHelper.php#L89-L106
inhere/php-librarys
src/Helpers/CurlHelper.php
CurlHelper.post
public static function post($url, array $data = [], array $headers = []) { // $headers = [ 'Content-Type: application/json' ]; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); // 发送数据 ...
php
public static function post($url, array $data = [], array $headers = []) { // $headers = [ 'Content-Type: application/json' ]; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); // 发送数据 ...
[ "public", "static", "function", "post", "(", "$", "url", ",", "array", "$", "data", "=", "[", "]", ",", "array", "$", "headers", "=", "[", "]", ")", "{", "// $headers = [ 'Content-Type: application/json' ];", "$", "ch", "=", "curl_init", "(", ")", ";", "...
send POST request @param string $url submit url @param array|string $data post data. array: form data, string: json data @param array $headers HEADER info @return string
[ "send", "POST", "request" ]
train
https://github.com/inhere/php-librarys/blob/e6ca598685469794f310e3ab0e2bc19519cd0ae6/src/Helpers/CurlHelper.php#L115-L129
inhere/php-librarys
src/Helpers/CurlHelper.php
CurlHelper.execute
public static function execute($ch, $retries = 3, $closeAfterDone = true) { $ret = ''; while ($retries--) { if (($ret = curl_exec($ch)) === false) { $curlErrNo = curl_errno($ch); if (false === \in_array($curlErrNo, self::$canRetryErrorCodes, true) || !$re...
php
public static function execute($ch, $retries = 3, $closeAfterDone = true) { $ret = ''; while ($retries--) { if (($ret = curl_exec($ch)) === false) { $curlErrNo = curl_errno($ch); if (false === \in_array($curlErrNo, self::$canRetryErrorCodes, true) || !$re...
[ "public", "static", "function", "execute", "(", "$", "ch", ",", "$", "retries", "=", "3", ",", "$", "closeAfterDone", "=", "true", ")", "{", "$", "ret", "=", "''", ";", "while", "(", "$", "retries", "--", ")", "{", "if", "(", "(", "$", "ret", "...
Executes a CURL request with optional retries and exception on failure @param resource $ch curl handler @param int $retries 重试 @param bool $closeAfterDone @return string @throws \RuntimeException
[ "Executes", "a", "CURL", "request", "with", "optional", "retries", "and", "exception", "on", "failure" ]
train
https://github.com/inhere/php-librarys/blob/e6ca598685469794f310e3ab0e2bc19519cd0ae6/src/Helpers/CurlHelper.php#L139-L166
php-lug/lug
src/Bundle/GridBundle/Form/Type/GridLimitType.php
GridLimitType.configureOptions
public function configureOptions(OptionsResolver $resolver) { $resolver ->setDefaults([ 'label' => 'lug.limit', 'empty_data' => function (Options $options) { $grid = $options['grid']; return $grid->hasOption('limit_def...
php
public function configureOptions(OptionsResolver $resolver) { $resolver ->setDefaults([ 'label' => 'lug.limit', 'empty_data' => function (Options $options) { $grid = $options['grid']; return $grid->hasOption('limit_def...
[ "public", "function", "configureOptions", "(", "OptionsResolver", "$", "resolver", ")", "{", "$", "resolver", "->", "setDefaults", "(", "[", "'label'", "=>", "'lug.limit'", ",", "'empty_data'", "=>", "function", "(", "Options", "$", "options", ")", "{", "$", ...
{@inheritdoc}
[ "{" ]
train
https://github.com/php-lug/lug/blob/81c109f187eba0a60f17e8cc59984ebb31841db7/src/Bundle/GridBundle/Form/Type/GridLimitType.php#L29-L52
adman9000/laravel-bittrex
src/BittrexAPI.php
BittrexAPI.marketRequest
public function marketRequest($segment, array $parameters=[]) { $baseUrl = $this->market_url; return $this->privateRequest($baseUrl, $segment, $parameters); }
php
public function marketRequest($segment, array $parameters=[]) { $baseUrl = $this->market_url; return $this->privateRequest($baseUrl, $segment, $parameters); }
[ "public", "function", "marketRequest", "(", "$", "segment", ",", "array", "$", "parameters", "=", "[", "]", ")", "{", "$", "baseUrl", "=", "$", "this", "->", "market_url", ";", "return", "$", "this", "->", "privateRequest", "(", "$", "baseUrl", ",", "$...
Execute a market API request @param $segment @param array $parameters @return array
[ "Execute", "a", "market", "API", "request" ]
train
https://github.com/adman9000/laravel-bittrex/blob/bd82b7926b23bd5e450b0a4232a91f176a78072d/src/BittrexAPI.php#L324-L327
adman9000/laravel-bittrex
src/BittrexAPI.php
BittrexAPI.accountRequest
public function accountRequest($segment, array $parameters=[]) { $baseUrl = $this->account_url; return $this->privateRequest($baseUrl, $segment, $parameters); }
php
public function accountRequest($segment, array $parameters=[]) { $baseUrl = $this->account_url; return $this->privateRequest($baseUrl, $segment, $parameters); }
[ "public", "function", "accountRequest", "(", "$", "segment", ",", "array", "$", "parameters", "=", "[", "]", ")", "{", "$", "baseUrl", "=", "$", "this", "->", "account_url", ";", "return", "$", "this", "->", "privateRequest", "(", "$", "baseUrl", ",", ...
Execute an account API request @param $segment @param array $parameters @return array
[ "Execute", "an", "account", "API", "request" ]
train
https://github.com/adman9000/laravel-bittrex/blob/bd82b7926b23bd5e450b0a4232a91f176a78072d/src/BittrexAPI.php#L336-L339
Eresus/EresusCMS
src/core/lib/templates.php
Templates.enum
public function enum($type = '') { $result = array(); $legacyKernel = Eresus_Kernel::app()->getLegacyKernel(); $dir = $legacyKernel->froot . 'templates/'; if ($type) { $dir .= "$type/"; } $list = glob("$dir*.html"); if ($list) { ...
php
public function enum($type = '') { $result = array(); $legacyKernel = Eresus_Kernel::app()->getLegacyKernel(); $dir = $legacyKernel->froot . 'templates/'; if ($type) { $dir .= "$type/"; } $list = glob("$dir*.html"); if ($list) { ...
[ "public", "function", "enum", "(", "$", "type", "=", "''", ")", "{", "$", "result", "=", "array", "(", ")", ";", "$", "legacyKernel", "=", "Eresus_Kernel", "::", "app", "(", ")", "->", "getLegacyKernel", "(", ")", ";", "$", "dir", "=", "$", "legacy...
Возвращает список шаблонов @param string $type Тип шаблонов (соответствует поддиректории в /templates) @return array
[ "Возвращает", "список", "шаблонов" ]
train
https://github.com/Eresus/EresusCMS/blob/b0afc661105f0a2f65d49abac13956cc93c5188d/src/core/lib/templates.php#L77-L105
Eresus/EresusCMS
src/core/lib/templates.php
Templates.get
public function get($name = '', $type = '', $array = false) { $filename = $this->composeFilename($name, $type); if (!file_exists($filename)) { return false; } $result = file_get_contents($filename); if ($array) { $desc = preg_match($thi...
php
public function get($name = '', $type = '', $array = false) { $filename = $this->composeFilename($name, $type); if (!file_exists($filename)) { return false; } $result = file_get_contents($filename); if ($array) { $desc = preg_match($thi...
[ "public", "function", "get", "(", "$", "name", "=", "''", ",", "$", "type", "=", "''", ",", "$", "array", "=", "false", ")", "{", "$", "filename", "=", "$", "this", "->", "composeFilename", "(", "$", "name", ",", "$", "type", ")", ";", "if", "(...
Возвращает содержимое шаблона Если имя ($name) не указано, будет использовано имя «default». Если шаблон не найден и имя ($name) НЕ «default», будет предпринята попытка загрузить шаблон с именем «default» из той же папки ($type). @param string $name имя шаблона @param string $type тип шаблона (соответствует подд...
[ "Возвращает", "содержимое", "шаблона" ]
train
https://github.com/Eresus/EresusCMS/blob/b0afc661105f0a2f65d49abac13956cc93c5188d/src/core/lib/templates.php#L121-L146
Eresus/EresusCMS
src/core/lib/templates.php
Templates.load
public function load($name = '', $type = '') { $filename = $this->composeFilename($name, $type); if (!file_exists($filename)) { return null; } $template = Eresus_Template::loadFromFile($filename); return $template; }
php
public function load($name = '', $type = '') { $filename = $this->composeFilename($name, $type); if (!file_exists($filename)) { return null; } $template = Eresus_Template::loadFromFile($filename); return $template; }
[ "public", "function", "load", "(", "$", "name", "=", "''", ",", "$", "type", "=", "''", ")", "{", "$", "filename", "=", "$", "this", "->", "composeFilename", "(", "$", "name", ",", "$", "type", ")", ";", "if", "(", "!", "file_exists", "(", "$", ...
Возвращает шаблон Если имя ($name) не указано, будет использовано имя «default». Если шаблон не найден и имя ($name) НЕ «default», будет предпринята попытка загрузить шаблон с именем «default» из той же папки ($type). @param string $name имя шаблона @param string $type тип шаблона (соответствует поддиректории в ...
[ "Возвращает", "шаблон" ]
train
https://github.com/Eresus/EresusCMS/blob/b0afc661105f0a2f65d49abac13956cc93c5188d/src/core/lib/templates.php#L163-L172
Eresus/EresusCMS
src/core/lib/templates.php
Templates.add
public function add($name, $type, $code, $desc = '') { $legacyKernel = Eresus_Kernel::app()->getLegacyKernel(); $filename = $legacyKernel->froot . 'templates/'; if ($type) { $filename .= "$type/"; } $filename .= "$name.html"; $content = "{* $desc *...
php
public function add($name, $type, $code, $desc = '') { $legacyKernel = Eresus_Kernel::app()->getLegacyKernel(); $filename = $legacyKernel->froot . 'templates/'; if ($type) { $filename .= "$type/"; } $filename .= "$name.html"; $content = "{* $desc *...
[ "public", "function", "add", "(", "$", "name", ",", "$", "type", ",", "$", "code", ",", "$", "desc", "=", "''", ")", "{", "$", "legacyKernel", "=", "Eresus_Kernel", "::", "app", "(", ")", "->", "getLegacyKernel", "(", ")", ";", "$", "filename", "="...
Новый шаблон @param string $name Имя шаблона @param string $type Тип шаблона (соответствует поддиректории в /templates) @param string $code Содержимое шаблона @param string $desc Описание шаблона (необязательно) @return bool Результат выполнения
[ "Новый", "шаблон" ]
train
https://github.com/Eresus/EresusCMS/blob/b0afc661105f0a2f65d49abac13956cc93c5188d/src/core/lib/templates.php#L183-L195
Eresus/EresusCMS
src/core/lib/templates.php
Templates.update
public function update($name, $type, $code, $desc = null) { $legacyKernel = Eresus_Kernel::app()->getLegacyKernel(); $filename = $legacyKernel->froot . 'templates/'; if ($type) { $filename .= "$type/"; } $filename .= "$name.html"; $item = $this->ge...
php
public function update($name, $type, $code, $desc = null) { $legacyKernel = Eresus_Kernel::app()->getLegacyKernel(); $filename = $legacyKernel->froot . 'templates/'; if ($type) { $filename .= "$type/"; } $filename .= "$name.html"; $item = $this->ge...
[ "public", "function", "update", "(", "$", "name", ",", "$", "type", ",", "$", "code", ",", "$", "desc", "=", "null", ")", "{", "$", "legacyKernel", "=", "Eresus_Kernel", "::", "app", "(", ")", "->", "getLegacyKernel", "(", ")", ";", "$", "filename", ...
Изменяет шаблон @param string $name Имя шаблона @param string $type Тип шаблона (соответствует поддиректории в /templates) @param string $code Содержимое шаблона @param string $desc Описание шаблона (необязательно) @return bool Результат выполнения
[ "Изменяет", "шаблон" ]
train
https://github.com/Eresus/EresusCMS/blob/b0afc661105f0a2f65d49abac13956cc93c5188d/src/core/lib/templates.php#L206-L224
Eresus/EresusCMS
src/core/lib/templates.php
Templates.delete
public function delete($name, $type = '') { $legacyKernel = Eresus_Kernel::app()->getLegacyKernel(); $filename = $legacyKernel->froot . 'templates/'; if ($type) { $filename .= "$type/"; } $filename .= "$name.html"; $result = filedelete($filename); ...
php
public function delete($name, $type = '') { $legacyKernel = Eresus_Kernel::app()->getLegacyKernel(); $filename = $legacyKernel->froot . 'templates/'; if ($type) { $filename .= "$type/"; } $filename .= "$name.html"; $result = filedelete($filename); ...
[ "public", "function", "delete", "(", "$", "name", ",", "$", "type", "=", "''", ")", "{", "$", "legacyKernel", "=", "Eresus_Kernel", "::", "app", "(", ")", "->", "getLegacyKernel", "(", ")", ";", "$", "filename", "=", "$", "legacyKernel", "->", "froot",...
Удаляет шаблон @param string $name Имя шаблона @param string $type Тип шаблона (соответствует поддиректории в /templates) @return bool Результат выполнения
[ "Удаляет", "шаблон" ]
train
https://github.com/Eresus/EresusCMS/blob/b0afc661105f0a2f65d49abac13956cc93c5188d/src/core/lib/templates.php#L234-L245
Eresus/EresusCMS
src/core/lib/templates.php
Templates.composeFilename
private function composeFilename($name, $type) { if (empty($name)) { $name = 'default'; } $folder = Eresus_Kernel::app()->getFsRoot() . '/templates/'; if ($type) { $folder .= $type . '/'; } $filename = $folder . $name . '.html';...
php
private function composeFilename($name, $type) { if (empty($name)) { $name = 'default'; } $folder = Eresus_Kernel::app()->getFsRoot() . '/templates/'; if ($type) { $folder .= $type . '/'; } $filename = $folder . $name . '.html';...
[ "private", "function", "composeFilename", "(", "$", "name", ",", "$", "type", ")", "{", "if", "(", "empty", "(", "$", "name", ")", ")", "{", "$", "name", "=", "'default'", ";", "}", "$", "folder", "=", "Eresus_Kernel", "::", "app", "(", ")", "->", ...
Строит имя файла по правилам, описанным в {@link get()} @param string $name имя шаблона @param string $type тип шаблона @return string @since 3.01
[ "Строит", "имя", "файла", "по", "правилам", "описанным", "в", "{", "@link", "get", "()", "}" ]
train
https://github.com/Eresus/EresusCMS/blob/b0afc661105f0a2f65d49abac13956cc93c5188d/src/core/lib/templates.php#L264-L281
99designs/ergo-http
src/Transport.php
Transport._curlConnection
private function _curlConnection($request) { // create a new curl resource $curl = curl_init(); $method = $request->getRequestMethod(); $headers = array('Expect:'); // add existing headers into a flat string format foreach ($request->getHeaders() as $header) { ...
php
private function _curlConnection($request) { // create a new curl resource $curl = curl_init(); $method = $request->getRequestMethod(); $headers = array('Expect:'); // add existing headers into a flat string format foreach ($request->getHeaders() as $header) { ...
[ "private", "function", "_curlConnection", "(", "$", "request", ")", "{", "// create a new curl resource", "$", "curl", "=", "curl_init", "(", ")", ";", "$", "method", "=", "$", "request", "->", "getRequestMethod", "(", ")", ";", "$", "headers", "=", "array",...
Initializes the curl connection
[ "Initializes", "the", "curl", "connection" ]
train
https://github.com/99designs/ergo-http/blob/979b789f2e011a1cb70a00161e6b7bcd0d2e9c71/src/Transport.php#L75-L129
99designs/ergo-http
src/Transport.php
Transport._buildResponse
private function _buildResponse($response) { $sections = explode("\r\n\r\n", $response, 2); $body = isset($sections[1]) ? $sections[1] : NULL; $headers = array(); $headerlines = explode("\n", $sections[0]); // process status list($http, $code, $message) = explode(' '...
php
private function _buildResponse($response) { $sections = explode("\r\n\r\n", $response, 2); $body = isset($sections[1]) ? $sections[1] : NULL; $headers = array(); $headerlines = explode("\n", $sections[0]); // process status list($http, $code, $message) = explode(' '...
[ "private", "function", "_buildResponse", "(", "$", "response", ")", "{", "$", "sections", "=", "explode", "(", "\"\\r\\n\\r\\n\"", ",", "$", "response", ",", "2", ")", ";", "$", "body", "=", "isset", "(", "$", "sections", "[", "1", "]", ")", "?", "$"...
Parses a response into headers and a body
[ "Parses", "a", "response", "into", "headers", "and", "a", "body" ]
train
https://github.com/99designs/ergo-http/blob/979b789f2e011a1cb70a00161e6b7bcd0d2e9c71/src/Transport.php#L134-L152
mothership-ec/composer
src/Composer/Util/RemoteFilesystem.php
RemoteFilesystem.get
protected function get($originUrl, $fileUrl, $additionalOptions = array(), $fileName = null, $progress = true) { if (strpos($originUrl, '.github.com') === (strlen($originUrl) - 11)) { $originUrl = 'github.com'; } $this->bytesMax = 0; $this->originUrl = $originUrl; ...
php
protected function get($originUrl, $fileUrl, $additionalOptions = array(), $fileName = null, $progress = true) { if (strpos($originUrl, '.github.com') === (strlen($originUrl) - 11)) { $originUrl = 'github.com'; } $this->bytesMax = 0; $this->originUrl = $originUrl; ...
[ "protected", "function", "get", "(", "$", "originUrl", ",", "$", "fileUrl", ",", "$", "additionalOptions", "=", "array", "(", ")", ",", "$", "fileName", "=", "null", ",", "$", "progress", "=", "true", ")", "{", "if", "(", "strpos", "(", "$", "originU...
Get file content or copy action. @param string $originUrl The origin URL @param string $fileUrl The file URL @param array $additionalOptions context options @param string $fileName the local filename @param boolean $progress Display the progression @throws TransportException|\...
[ "Get", "file", "content", "or", "copy", "action", "." ]
train
https://github.com/mothership-ec/composer/blob/fa6ad031a939d8d33b211e428fdbdd28cfce238c/src/Composer/Util/RemoteFilesystem.php#L120-L280
mothership-ec/composer
src/Composer/Util/RemoteFilesystem.php
RemoteFilesystem.callbackGet
protected function callbackGet($notificationCode, $severity, $message, $messageCode, $bytesTransferred, $bytesMax) { switch ($notificationCode) { case STREAM_NOTIFY_FAILURE: case STREAM_NOTIFY_AUTH_REQUIRED: if (401 === $messageCode) { // Bail if t...
php
protected function callbackGet($notificationCode, $severity, $message, $messageCode, $bytesTransferred, $bytesMax) { switch ($notificationCode) { case STREAM_NOTIFY_FAILURE: case STREAM_NOTIFY_AUTH_REQUIRED: if (401 === $messageCode) { // Bail if t...
[ "protected", "function", "callbackGet", "(", "$", "notificationCode", ",", "$", "severity", ",", "$", "message", ",", "$", "messageCode", ",", "$", "bytesTransferred", ",", "$", "bytesMax", ")", "{", "switch", "(", "$", "notificationCode", ")", "{", "case", ...
Get notification action. @param integer $notificationCode The notification code @param integer $severity The severity level @param string $message The message @param integer $messageCode The message code @param integer $bytesTransferred...
[ "Get", "notification", "action", "." ]
train
https://github.com/mothership-ec/composer/blob/fa6ad031a939d8d33b211e428fdbdd28cfce238c/src/Composer/Util/RemoteFilesystem.php#L293-L345
thelia-modules/CustomerGroup
EventListener/CustomerCustomerGroup.php
CustomerCustomerGroup.addCustomer
public function addCustomer(AddCustomerToCustomerGroupEvent $event) { (new CustomerCustomerGroupQuery()) ->filterByCustomerId($event->getCustomerId()) ->filterByCustomerGroupId($event->getCustomerGroupId()) ->findOneOrCreate() ->save(); }
php
public function addCustomer(AddCustomerToCustomerGroupEvent $event) { (new CustomerCustomerGroupQuery()) ->filterByCustomerId($event->getCustomerId()) ->filterByCustomerGroupId($event->getCustomerGroupId()) ->findOneOrCreate() ->save(); }
[ "public", "function", "addCustomer", "(", "AddCustomerToCustomerGroupEvent", "$", "event", ")", "{", "(", "new", "CustomerCustomerGroupQuery", "(", ")", ")", "->", "filterByCustomerId", "(", "$", "event", "->", "getCustomerId", "(", ")", ")", "->", "filterByCustom...
Add a customer to a customer group. @param AddCustomerToCustomerGroupEvent $event
[ "Add", "a", "customer", "to", "a", "customer", "group", "." ]
train
https://github.com/thelia-modules/CustomerGroup/blob/672cc64c686812f6a95cf0d702111f93d8c0e850/EventListener/CustomerCustomerGroup.php#L42-L49
thelia-modules/CustomerGroup
EventListener/CustomerCustomerGroup.php
CustomerCustomerGroup.addDefaultCustomerGroupToCustomer
public function addDefaultCustomerGroupToCustomer(CustomerEvent $event) { $defaultCustomerGroup = CustomerGroupQuery::create()->findOneByIsDefault(true); if (null === $defaultCustomerGroup) { return; } (new CustomerCustomerGroupQuery()) ->filterByCustomerId($...
php
public function addDefaultCustomerGroupToCustomer(CustomerEvent $event) { $defaultCustomerGroup = CustomerGroupQuery::create()->findOneByIsDefault(true); if (null === $defaultCustomerGroup) { return; } (new CustomerCustomerGroupQuery()) ->filterByCustomerId($...
[ "public", "function", "addDefaultCustomerGroupToCustomer", "(", "CustomerEvent", "$", "event", ")", "{", "$", "defaultCustomerGroup", "=", "CustomerGroupQuery", "::", "create", "(", ")", "->", "findOneByIsDefault", "(", "true", ")", ";", "if", "(", "null", "===", ...
Add the customer to the default customer group (if there is one). @todo Only if there is no customer group in the event ! @param CustomerEvent $event
[ "Add", "the", "customer", "to", "the", "default", "customer", "group", "(", "if", "there", "is", "one", ")", "." ]
train
https://github.com/thelia-modules/CustomerGroup/blob/672cc64c686812f6a95cf0d702111f93d8c0e850/EventListener/CustomerCustomerGroup.php#L56-L68
thelia-modules/CustomerGroup
EventListener/CustomerCustomerGroup.php
CustomerCustomerGroup.addCustomerGroupToSession
public function addCustomerGroupToSession(CustomerLoginEvent $event) { $customerGroup = CustomerGroupQuery::create() ->useCustomerCustomerGroupQuery() ->filterByCustomerId($event->getCustomer()->getId()) ->endUse() ->findOne(); if ($customerGroup === n...
php
public function addCustomerGroupToSession(CustomerLoginEvent $event) { $customerGroup = CustomerGroupQuery::create() ->useCustomerCustomerGroupQuery() ->filterByCustomerId($event->getCustomer()->getId()) ->endUse() ->findOne(); if ($customerGroup === n...
[ "public", "function", "addCustomerGroupToSession", "(", "CustomerLoginEvent", "$", "event", ")", "{", "$", "customerGroup", "=", "CustomerGroupQuery", "::", "create", "(", ")", "->", "useCustomerCustomerGroupQuery", "(", ")", "->", "filterByCustomerId", "(", "$", "e...
Add customer group information for the customer in the session. Only information on the first group is added. Group information is added to the session attributes with this module code as a key. Structure: "id" => group id "code" => group code "default" => whether the group is the default group @param CustomerLoginEve...
[ "Add", "customer", "group", "information", "for", "the", "customer", "in", "the", "session", ".", "Only", "information", "on", "the", "first", "group", "is", "added", ".", "Group", "information", "is", "added", "to", "the", "session", "attributes", "with", "...
train
https://github.com/thelia-modules/CustomerGroup/blob/672cc64c686812f6a95cf0d702111f93d8c0e850/EventListener/CustomerCustomerGroup.php#L83-L102
nabab/bbn
src/bbn/time.php
time.get_interval
private function get_interval(string $interval = '') { if ( !empty($interval) ){ $this->interval = new \DateInterval($interval); return $this->interval; } else { return $this->interval; } }
php
private function get_interval(string $interval = '') { if ( !empty($interval) ){ $this->interval = new \DateInterval($interval); return $this->interval; } else { return $this->interval; } }
[ "private", "function", "get_interval", "(", "string", "$", "interval", "=", "''", ")", "{", "if", "(", "!", "empty", "(", "$", "interval", ")", ")", "{", "$", "this", "->", "interval", "=", "new", "\\", "DateInterval", "(", "$", "interval", ")", ";",...
Return the property $interval if it is set @param string $interval @return void
[ "Return", "the", "property", "$interval", "if", "it", "is", "set" ]
train
https://github.com/nabab/bbn/blob/439fea2faa0de22fdaae2611833bab8061f40c37/src/bbn/time.php#L55-L64
nabab/bbn
src/bbn/time.php
time.format
public function format($format = '') { if ( !empty($format) ){ return $this->time->format($format); } else { return $this->time->format('Y-m-d H:i:s'); } }
php
public function format($format = '') { if ( !empty($format) ){ return $this->time->format($format); } else { return $this->time->format('Y-m-d H:i:s'); } }
[ "public", "function", "format", "(", "$", "format", "=", "''", ")", "{", "if", "(", "!", "empty", "(", "$", "format", ")", ")", "{", "return", "$", "this", "->", "time", "->", "format", "(", "$", "format", ")", ";", "}", "else", "{", "return", ...
return the date in the given $format of in 'Y-m-d H:i:s' format if no argument is given to the function @param string $format @return void
[ "return", "the", "date", "in", "the", "given", "$format", "of", "in", "Y", "-", "m", "-", "d", "H", ":", "i", ":", "s", "format", "if", "no", "argument", "is", "given", "to", "the", "function" ]
train
https://github.com/nabab/bbn/blob/439fea2faa0de22fdaae2611833bab8061f40c37/src/bbn/time.php#L72-L80
nabab/bbn
src/bbn/time.php
time.compare
public function compare($date, $comparator) { //check if the argument $date is an instance of this class if ( $date instanceof $this){ $tmp = $date; } else { $tmp = new \bbn\time($date); } switch ( $comparator ){ case $comparator === '>': return $this->get_time() > ...
php
public function compare($date, $comparator) { //check if the argument $date is an instance of this class if ( $date instanceof $this){ $tmp = $date; } else { $tmp = new \bbn\time($date); } switch ( $comparator ){ case $comparator === '>': return $this->get_time() > ...
[ "public", "function", "compare", "(", "$", "date", ",", "$", "comparator", ")", "{", "//check if the argument $date is an instance of this class", "if", "(", "$", "date", "instanceof", "$", "this", ")", "{", "$", "tmp", "=", "$", "date", ";", "}", "else", "{...
Compares two dates @param [String|Object] $date the string of the date to compare or an object of this class @param [String] $comparator allowed comparators '>','>=', '<','<=', '=' @return Boolean
[ "Compares", "two", "dates" ]
train
https://github.com/nabab/bbn/blob/439fea2faa0de22fdaae2611833bab8061f40c37/src/bbn/time.php#L98-L124
nabab/bbn
src/bbn/time.php
time.is_before
public function is_before($date) { //check if the argument $date is an instance of this class if ( $date instanceof $this){ $tmp = $date; } else { $tmp = new \bbn\time($date); } return $this->get_time() < $tmp->get_time(); }
php
public function is_before($date) { //check if the argument $date is an instance of this class if ( $date instanceof $this){ $tmp = $date; } else { $tmp = new \bbn\time($date); } return $this->get_time() < $tmp->get_time(); }
[ "public", "function", "is_before", "(", "$", "date", ")", "{", "//check if the argument $date is an instance of this class", "if", "(", "$", "date", "instanceof", "$", "this", ")", "{", "$", "tmp", "=", "$", "date", ";", "}", "else", "{", "$", "tmp", "=", ...
Return if $this->time is before of the given $date @param [String|Object] $date the string of the date to compare or an object of this class @return boolean
[ "Return", "if", "$this", "-", ">", "time", "is", "before", "of", "the", "given", "$date" ]
train
https://github.com/nabab/bbn/blob/439fea2faa0de22fdaae2611833bab8061f40c37/src/bbn/time.php#L132-L142
nabab/bbn
src/bbn/time.php
time.is_after
public function is_after($date) { //check if the argument $date is an instance of this class if ( $date instanceof $this){ $tmp = $date; } else { $tmp = new \bbn\time($date); } return $this->get_time() > $tmp->get_time(); }
php
public function is_after($date) { //check if the argument $date is an instance of this class if ( $date instanceof $this){ $tmp = $date; } else { $tmp = new \bbn\time($date); } return $this->get_time() > $tmp->get_time(); }
[ "public", "function", "is_after", "(", "$", "date", ")", "{", "//check if the argument $date is an instance of this class", "if", "(", "$", "date", "instanceof", "$", "this", ")", "{", "$", "tmp", "=", "$", "date", ";", "}", "else", "{", "$", "tmp", "=", "...
Return if $this->time is after of the given $date @param [String|Object] $date the string of the date to compare or an object of this class @return boolean
[ "Return", "if", "$this", "-", ">", "time", "is", "after", "of", "the", "given", "$date" ]
train
https://github.com/nabab/bbn/blob/439fea2faa0de22fdaae2611833bab8061f40c37/src/bbn/time.php#L151-L161
nabab/bbn
src/bbn/time.php
time.is_same
public function is_same($date) { //check if the argument $date is an instance of this class if ( $date instanceof $this){ $tmp = $date; } else { $tmp = new \bbn\time($date); } return $this->get_time() == $tmp->get_time(); }
php
public function is_same($date) { //check if the argument $date is an instance of this class if ( $date instanceof $this){ $tmp = $date; } else { $tmp = new \bbn\time($date); } return $this->get_time() == $tmp->get_time(); }
[ "public", "function", "is_same", "(", "$", "date", ")", "{", "//check if the argument $date is an instance of this class", "if", "(", "$", "date", "instanceof", "$", "this", ")", "{", "$", "tmp", "=", "$", "date", ";", "}", "else", "{", "$", "tmp", "=", "n...
Return if $this->time is the same of the given $date @param [String|Object] $date the string of the date to compare or an object of this class @return boolean
[ "Return", "if", "$this", "-", ">", "time", "is", "the", "same", "of", "the", "given", "$date" ]
train
https://github.com/nabab/bbn/blob/439fea2faa0de22fdaae2611833bab8061f40c37/src/bbn/time.php#L170-L180
nabab/bbn
src/bbn/time.php
time.add
public function add(string $interval, $format = ''){ $tmp = new \bbn\time($this->format()); $tmp->time->add($this->get_interval($interval)); return $tmp->format($format); }
php
public function add(string $interval, $format = ''){ $tmp = new \bbn\time($this->format()); $tmp->time->add($this->get_interval($interval)); return $tmp->format($format); }
[ "public", "function", "add", "(", "string", "$", "interval", ",", "$", "format", "=", "''", ")", "{", "$", "tmp", "=", "new", "\\", "bbn", "\\", "time", "(", "$", "this", "->", "format", "(", ")", ")", ";", "$", "tmp", "->", "time", "->", "add"...
Add an the given $interval to $this->time and return a reference to the original object If the argument $format is not given it returns the sql format 'Y-m-d H:i:s' @param string $interval @param string $format optional @return void
[ "Add", "an", "the", "given", "$interval", "to", "$this", "-", ">", "time", "and", "return", "a", "reference", "to", "the", "original", "object", "If", "the", "argument", "$format", "is", "not", "given", "it", "returns", "the", "sql", "format", "Y", "-", ...
train
https://github.com/nabab/bbn/blob/439fea2faa0de22fdaae2611833bab8061f40c37/src/bbn/time.php#L191-L195
nabab/bbn
src/bbn/time.php
time.modif
public function modif($modif, $format = '') { $tmp = new \bbn\time($this->format()); $tmp->time->modify($modif); return $tmp->format($format); }
php
public function modif($modif, $format = '') { $tmp = new \bbn\time($this->format()); $tmp->time->modify($modif); return $tmp->format($format); }
[ "public", "function", "modif", "(", "$", "modif", ",", "$", "format", "=", "''", ")", "{", "$", "tmp", "=", "new", "\\", "bbn", "\\", "time", "(", "$", "this", "->", "format", "(", ")", ")", ";", "$", "tmp", "->", "time", "->", "modify", "(", ...
Return a reference to $this->time modified of the $modif @param [type] $modif @param string $format @return void
[ "Return", "a", "reference", "to", "$this", "-", ">", "time", "modified", "of", "the", "$modif" ]
train
https://github.com/nabab/bbn/blob/439fea2faa0de22fdaae2611833bab8061f40c37/src/bbn/time.php#L218-L223
nabab/bbn
src/bbn/time.php
time.end_of_month
public function end_of_month(){ $m = $this->get_month(); $y = $this->get_year(); return cal_days_in_month(CAL_GREGORIAN, $m, $y); }
php
public function end_of_month(){ $m = $this->get_month(); $y = $this->get_year(); return cal_days_in_month(CAL_GREGORIAN, $m, $y); }
[ "public", "function", "end_of_month", "(", ")", "{", "$", "m", "=", "$", "this", "->", "get_month", "(", ")", ";", "$", "y", "=", "$", "this", "->", "get_year", "(", ")", ";", "return", "cal_days_in_month", "(", "CAL_GREGORIAN", ",", "$", "m", ",", ...
return the end of the month of $this->time @return Number
[ "return", "the", "end", "of", "the", "month", "of", "$this", "-", ">", "time" ]
train
https://github.com/nabab/bbn/blob/439fea2faa0de22fdaae2611833bab8061f40c37/src/bbn/time.php#L230-L234
AbuseIO/parser-webiron
src/Webiron.php
Webiron.parse
public function parse() { /** * Try to find ARF report. * Some notification emails do not contain an ARF report. Instead they * contain a 'table row'-ish with abuse info. In that case we jump down * and parse the email body. */ $foundArf = false; ...
php
public function parse() { /** * Try to find ARF report. * Some notification emails do not contain an ARF report. Instead they * contain a 'table row'-ish with abuse info. In that case we jump down * and parse the email body. */ $foundArf = false; ...
[ "public", "function", "parse", "(", ")", "{", "/**\n * Try to find ARF report.\n * Some notification emails do not contain an ARF report. Instead they\n * contain a 'table row'-ish with abuse info. In that case we jump down\n * and parse the email body.\n */",...
Parse attachments @return array Returns array with failed or success data (See parser-common/src/Parser.php) for more info.
[ "Parse", "attachments" ]
train
https://github.com/AbuseIO/parser-webiron/blob/e54f43b940f8c1ec12ead3d7e16faabc59342612/src/Webiron.php#L29-L144
wenbinye/PhalconX
src/Session/Adapter/Cache.php
Cache.write
public function write($sessionId, $data) { $this->cache->save($this->prefix . $sessionId, $data, $this->lifetime); }
php
public function write($sessionId, $data) { $this->cache->save($this->prefix . $sessionId, $data, $this->lifetime); }
[ "public", "function", "write", "(", "$", "sessionId", ",", "$", "data", ")", "{", "$", "this", "->", "cache", "->", "save", "(", "$", "this", "->", "prefix", ".", "$", "sessionId", ",", "$", "data", ",", "$", "this", "->", "lifetime", ")", ";", "...
Writes the data to the table @param string $sessionId @param string $data
[ "Writes", "the", "data", "to", "the", "table" ]
train
https://github.com/wenbinye/PhalconX/blob/0d2e1480e722dde56ccd23b2e8a5c8ac6ac2f8e1/src/Session/Adapter/Cache.php#L94-L97
wenbinye/PhalconX
src/Session/Adapter/Cache.php
Cache.destroy
public function destroy($session_id = null) { @session_unset(); if ($session_id === null) { $session_id = $this->getId(); } return $this->cache->delete($this->prefix.$session_id); }
php
public function destroy($session_id = null) { @session_unset(); if ($session_id === null) { $session_id = $this->getId(); } return $this->cache->delete($this->prefix.$session_id); }
[ "public", "function", "destroy", "(", "$", "session_id", "=", "null", ")", "{", "@", "session_unset", "(", ")", ";", "if", "(", "$", "session_id", "===", "null", ")", "{", "$", "session_id", "=", "$", "this", "->", "getId", "(", ")", ";", "}", "ret...
Destroyes the session
[ "Destroyes", "the", "session" ]
train
https://github.com/wenbinye/PhalconX/blob/0d2e1480e722dde56ccd23b2e8a5c8ac6ac2f8e1/src/Session/Adapter/Cache.php#L103-L110
PHPPowertools/HTML5
src/PowerTools/HTML5/Serializer/OutputRules.php
HTML5_Serializer_OutputRules.text
public function text($ele) { if (isset($ele->parentNode) && isset($ele->parentNode->tagName) && HTML5_Elements::isA($ele->parentNode->localName, HTML5_Elements::TEXT_RAW)) { $this->wr($ele->data); return; } // FIXME: This probably needs some flags set. $this->wr(...
php
public function text($ele) { if (isset($ele->parentNode) && isset($ele->parentNode->tagName) && HTML5_Elements::isA($ele->parentNode->localName, HTML5_Elements::TEXT_RAW)) { $this->wr($ele->data); return; } // FIXME: This probably needs some flags set. $this->wr(...
[ "public", "function", "text", "(", "$", "ele", ")", "{", "if", "(", "isset", "(", "$", "ele", "->", "parentNode", ")", "&&", "isset", "(", "$", "ele", "->", "parentNode", "->", "tagName", ")", "&&", "HTML5_Elements", "::", "isA", "(", "$", "ele", "...
Write a text node. @param \DOMText $ele The text node to write.
[ "Write", "a", "text", "node", "." ]
train
https://github.com/PHPPowertools/HTML5/blob/4ea8caf5b2618a82ca5061dcbb7421b31065c1c7/src/PowerTools/HTML5/Serializer/OutputRules.php#L244-L252
PHPPowertools/HTML5
src/PowerTools/HTML5/Serializer/OutputRules.php
HTML5_Serializer_OutputRules.namespaceAttrs
protected function namespaceAttrs($ele) { if (!$this->xpath || $this->xpath->document !== $ele->ownerDocument) { $this->xpath = new \DOMXPath($ele->ownerDocument); } foreach ($this->xpath->query('namespace::*[not(.=../../namespace::*)]', $ele) as $nsNode) { if (!in_array...
php
protected function namespaceAttrs($ele) { if (!$this->xpath || $this->xpath->document !== $ele->ownerDocument) { $this->xpath = new \DOMXPath($ele->ownerDocument); } foreach ($this->xpath->query('namespace::*[not(.=../../namespace::*)]', $ele) as $nsNode) { if (!in_array...
[ "protected", "function", "namespaceAttrs", "(", "$", "ele", ")", "{", "if", "(", "!", "$", "this", "->", "xpath", "||", "$", "this", "->", "xpath", "->", "document", "!==", "$", "ele", "->", "ownerDocument", ")", "{", "$", "this", "->", "xpath", "=",...
Write the namespace attributes @param \DOMNode $ele The element being written.
[ "Write", "the", "namespace", "attributes" ]
train
https://github.com/PHPPowertools/HTML5/blob/4ea8caf5b2618a82ca5061dcbb7421b31065c1c7/src/PowerTools/HTML5/Serializer/OutputRules.php#L280-L290
PHPPowertools/HTML5
src/PowerTools/HTML5/Serializer/OutputRules.php
HTML5_Serializer_OutputRules.closeTag
protected function closeTag($ele) { if ($this->outputMode == static::IM_IN_HTML || $ele->hasChildNodes()) { $this->wr('</')->wr($this->traverser->isLocalElement($ele) ? $ele->localName : $ele->tagName)->wr('>'); } }
php
protected function closeTag($ele) { if ($this->outputMode == static::IM_IN_HTML || $ele->hasChildNodes()) { $this->wr('</')->wr($this->traverser->isLocalElement($ele) ? $ele->localName : $ele->tagName)->wr('>'); } }
[ "protected", "function", "closeTag", "(", "$", "ele", ")", "{", "if", "(", "$", "this", "->", "outputMode", "==", "static", "::", "IM_IN_HTML", "||", "$", "ele", "->", "hasChildNodes", "(", ")", ")", "{", "$", "this", "->", "wr", "(", "'</'", ")", ...
Write the closing tag. Tags for HTML, MathML, and SVG are in the local name. Otherwise, use the qualified name (8.3). @param \DOMNode $ele The element being written.
[ "Write", "the", "closing", "tag", "." ]
train
https://github.com/PHPPowertools/HTML5/blob/4ea8caf5b2618a82ca5061dcbb7421b31065c1c7/src/PowerTools/HTML5/Serializer/OutputRules.php#L415-L419
PHPPowertools/HTML5
src/PowerTools/HTML5/Serializer/OutputRules.php
HTML5_Serializer_OutputRules.enc
protected function enc($text, $attribute = false) { // Escape the text rather than convert to named character references. if (!$this->encode) { return $this->escape($text, $attribute); } // If we are in PHP 5.4+ we can use the native html5 entity functionality to //...
php
protected function enc($text, $attribute = false) { // Escape the text rather than convert to named character references. if (!$this->encode) { return $this->escape($text, $attribute); } // If we are in PHP 5.4+ we can use the native html5 entity functionality to //...
[ "protected", "function", "enc", "(", "$", "text", ",", "$", "attribute", "=", "false", ")", "{", "// Escape the text rather than convert to named character references.", "if", "(", "!", "$", "this", "->", "encode", ")", "{", "return", "$", "this", "->", "escape"...
Encode text. When encode is set to false, the default value, the text passed in is escaped per section 8.3 of the html5 spec. For details on how text is escaped see the escape() method. When encoding is set to true the text is converted to named character references where appropriate. Section 8.1.4 Character referenc...
[ "Encode", "text", "." ]
train
https://github.com/PHPPowertools/HTML5/blob/4ea8caf5b2618a82ca5061dcbb7421b31065c1c7/src/PowerTools/HTML5/Serializer/OutputRules.php#L473-L490
zhouyl/mellivora
Mellivora/Encryption/Crypt.php
Crypt.padText
protected function padText($text, $mode, $blockSize, $paddingType) { $paddingSize = 0; $padding = ''; if ($mode === 'cbc' || $mode === 'ecb') { $paddingSize = $blockSize - (strlen($text) % $blockSize); if ($paddingSize >= 256) { throw new InvalidA...
php
protected function padText($text, $mode, $blockSize, $paddingType) { $paddingSize = 0; $padding = ''; if ($mode === 'cbc' || $mode === 'ecb') { $paddingSize = $blockSize - (strlen($text) % $blockSize); if ($paddingSize >= 256) { throw new InvalidA...
[ "protected", "function", "padText", "(", "$", "text", ",", "$", "mode", ",", "$", "blockSize", ",", "$", "paddingType", ")", "{", "$", "paddingSize", "=", "0", ";", "$", "padding", "=", "''", ";", "if", "(", "$", "mode", "===", "'cbc'", "||", "$", ...
Pads texts before encryption @see http://www.di-mgt.com.au/cryptopad.html @param mixed $text @param mixed $mode @param mixed $blockSize @param mixed $paddingType
[ "Pads", "texts", "before", "encryption" ]
train
https://github.com/zhouyl/mellivora/blob/79f844c5c9c25ffbe18d142062e9bc3df00b36a1/Mellivora/Encryption/Crypt.php#L121-L177
zhouyl/mellivora
Mellivora/Encryption/Crypt.php
Crypt.unpadText
protected function unpadText($text, $mode, $blockSize, $paddingType) { $paddingSize = 0; $length = strlen(text); if ($length > 0 && ($length % $blockSize === 0) && ($mode === 'cbc' || $mode === 'ecb')) { switch ($paddingType) { case self::PADDING_ANSI_X_923: ...
php
protected function unpadText($text, $mode, $blockSize, $paddingType) { $paddingSize = 0; $length = strlen(text); if ($length > 0 && ($length % $blockSize === 0) && ($mode === 'cbc' || $mode === 'ecb')) { switch ($paddingType) { case self::PADDING_ANSI_X_923: ...
[ "protected", "function", "unpadText", "(", "$", "text", ",", "$", "mode", ",", "$", "blockSize", ",", "$", "paddingType", ")", "{", "$", "paddingSize", "=", "0", ";", "$", "length", "=", "strlen", "(", "text", ")", ";", "if", "(", "$", "length", ">...
Removes padding @a padding_type from @a text If the function detects that the text was not padded, it will return it unmodified @param string text Message to be unpadded @param string mode Encryption mode; unpadding is applied only in CBC or ECB mode @param int $blockSize Cipher block size @param i...
[ "Removes", "padding", "@a", "padding_type", "from", "@a", "text", "If", "the", "function", "detects", "that", "the", "text", "was", "not", "padded", "it", "will", "return", "it", "unmodified" ]
train
https://github.com/zhouyl/mellivora/blob/79f844c5c9c25ffbe18d142062e9bc3df00b36a1/Mellivora/Encryption/Crypt.php#L190-L273
zhouyl/mellivora
Mellivora/Encryption/Crypt.php
Crypt.encrypt
public function encrypt($text, $key = null) { if (!function_exists('openssl_cipher_iv_length')) { throw new RuntimeException('openssl extension is required'); } if ($key === null) { $encryptKey = $this->key; } else { $encryptKey = $key; } ...
php
public function encrypt($text, $key = null) { if (!function_exists('openssl_cipher_iv_length')) { throw new RuntimeException('openssl extension is required'); } if ($key === null) { $encryptKey = $this->key; } else { $encryptKey = $key; } ...
[ "public", "function", "encrypt", "(", "$", "text", ",", "$", "key", "=", "null", ")", "{", "if", "(", "!", "function_exists", "(", "'openssl_cipher_iv_length'", ")", ")", "{", "throw", "new", "RuntimeException", "(", "'openssl extension is required'", ")", ";"...
Encrypts a text <code> $encrypted = $crypt->encrypt("Ultra-secret text", "encrypt password"); </code> @param mixed $text @param null|mixed $key
[ "Encrypts", "a", "text" ]
train
https://github.com/zhouyl/mellivora/blob/79f844c5c9c25ffbe18d142062e9bc3df00b36a1/Mellivora/Encryption/Crypt.php#L285-L325
zhouyl/mellivora
Mellivora/Encryption/Crypt.php
Crypt.decrypt
public function decrypt($text, $key = null) { if (!function_exists('openssl_cipher_iv_length')) { throw new RuntimeException('openssl extension is required'); } if ($key === null) { $decryptKey = $this->key; } else { $decryptKey = $key; } ...
php
public function decrypt($text, $key = null) { if (!function_exists('openssl_cipher_iv_length')) { throw new RuntimeException('openssl extension is required'); } if ($key === null) { $decryptKey = $this->key; } else { $decryptKey = $key; } ...
[ "public", "function", "decrypt", "(", "$", "text", ",", "$", "key", "=", "null", ")", "{", "if", "(", "!", "function_exists", "(", "'openssl_cipher_iv_length'", ")", ")", "{", "throw", "new", "RuntimeException", "(", "'openssl extension is required'", ")", ";"...
Decrypts an encrypted text <code> echo $crypt->decrypt($encrypted, "decrypt password"); </code> @param mixed $text @param null|mixed $key
[ "Decrypts", "an", "encrypted", "text" ]
train
https://github.com/zhouyl/mellivora/blob/79f844c5c9c25ffbe18d142062e9bc3df00b36a1/Mellivora/Encryption/Crypt.php#L337-L376
zhouyl/mellivora
Mellivora/Encryption/Crypt.php
Crypt.encryptBase64
public function encryptBase64($text, $key = null, $safe = false) { if ($safe === true) { return strtr(base64_encode($this->encrypt($text, $key)), '+/', '-_'); } return base64_encode($this->encrypt($text, $key)); }
php
public function encryptBase64($text, $key = null, $safe = false) { if ($safe === true) { return strtr(base64_encode($this->encrypt($text, $key)), '+/', '-_'); } return base64_encode($this->encrypt($text, $key)); }
[ "public", "function", "encryptBase64", "(", "$", "text", ",", "$", "key", "=", "null", ",", "$", "safe", "=", "false", ")", "{", "if", "(", "$", "safe", "===", "true", ")", "{", "return", "strtr", "(", "base64_encode", "(", "$", "this", "->", "encr...
Encrypts a text returning the result as a base64 string @param mixed $text @param null|mixed $key @param mixed $safe
[ "Encrypts", "a", "text", "returning", "the", "result", "as", "a", "base64", "string" ]
train
https://github.com/zhouyl/mellivora/blob/79f844c5c9c25ffbe18d142062e9bc3df00b36a1/Mellivora/Encryption/Crypt.php#L385-L392
zhouyl/mellivora
Mellivora/Encryption/Crypt.php
Crypt.decryptBase64
public function decryptBase64($text, $key = null, $safe = false) { if ($safe === true) { return $this->decrypt(base64_decode(strtr($text, '-_', '+/')), $key); } return $this->decrypt(base64_decode($text), $key); }
php
public function decryptBase64($text, $key = null, $safe = false) { if ($safe === true) { return $this->decrypt(base64_decode(strtr($text, '-_', '+/')), $key); } return $this->decrypt(base64_decode($text), $key); }
[ "public", "function", "decryptBase64", "(", "$", "text", ",", "$", "key", "=", "null", ",", "$", "safe", "=", "false", ")", "{", "if", "(", "$", "safe", "===", "true", ")", "{", "return", "$", "this", "->", "decrypt", "(", "base64_decode", "(", "st...
Decrypt a text that is coded as a base64 string @param mixed $text @param null|mixed $key @param mixed $safe
[ "Decrypt", "a", "text", "that", "is", "coded", "as", "a", "base64", "string" ]
train
https://github.com/zhouyl/mellivora/blob/79f844c5c9c25ffbe18d142062e9bc3df00b36a1/Mellivora/Encryption/Crypt.php#L401-L408
grozzzny/catalog
models/Category.php
Category.queryFilter
public static function queryFilter(ActiveQuery &$query, array $get) { if(!empty($get['text'])){ $query->andFilterWhere(['LIKE', 'title', $get['text']]); }else{ if(!empty($get['category_id'])){ $query->andFilterWhere(['parent_id' => $get['category_id']]); ...
php
public static function queryFilter(ActiveQuery &$query, array $get) { if(!empty($get['text'])){ $query->andFilterWhere(['LIKE', 'title', $get['text']]); }else{ if(!empty($get['category_id'])){ $query->andFilterWhere(['parent_id' => $get['category_id']]); ...
[ "public", "static", "function", "queryFilter", "(", "ActiveQuery", "&", "$", "query", ",", "array", "$", "get", ")", "{", "if", "(", "!", "empty", "(", "$", "get", "[", "'text'", "]", ")", ")", "{", "$", "query", "->", "andFilterWhere", "(", "[", "...
Фильтр @param $query @param $get
[ "Фильтр" ]
train
https://github.com/grozzzny/catalog/blob/ff1cac10a5f3a89f3ef2767f9ede6b2d74e1849a/models/Category.php#L162-L173
grozzzny/catalog
models/Category.php
Category.querySort
public function querySort(&$provider) { $sort = []; $attributes = [ 'id', 'status', 'title', 'slug', 'order_num' ]; if(self::ORDER_NUM){ $sort = $sort + ['defaultOrder' => ['order_num' => SORT_DESC]]; ...
php
public function querySort(&$provider) { $sort = []; $attributes = [ 'id', 'status', 'title', 'slug', 'order_num' ]; if(self::ORDER_NUM){ $sort = $sort + ['defaultOrder' => ['order_num' => SORT_DESC]]; ...
[ "public", "function", "querySort", "(", "&", "$", "provider", ")", "{", "$", "sort", "=", "[", "]", ";", "$", "attributes", "=", "[", "'id'", ",", "'status'", ",", "'title'", ",", "'slug'", ",", "'order_num'", "]", ";", "if", "(", "self", "::", "OR...
Сортировка @param $provider
[ "Сортировка" ]
train
https://github.com/grozzzny/catalog/blob/ff1cac10a5f3a89f3ef2767f9ede6b2d74e1849a/models/Category.php#L205-L225
grozzzny/catalog
models/Category.php
Category.getListItems
public function getListItems() { $item_arr = []; foreach ($this->items as $item) { $item_arr[$item->id] = $item->title; } return $item_arr; }
php
public function getListItems() { $item_arr = []; foreach ($this->items as $item) { $item_arr[$item->id] = $item->title; } return $item_arr; }
[ "public", "function", "getListItems", "(", ")", "{", "$", "item_arr", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "items", "as", "$", "item", ")", "{", "$", "item_arr", "[", "$", "item", "->", "id", "]", "=", "$", "item", "->", "title"...
For special widget
[ "For", "special", "widget" ]
train
https://github.com/grozzzny/catalog/blob/ff1cac10a5f3a89f3ef2767f9ede6b2d74e1849a/models/Category.php#L293-L301
zhouyl/mellivora
Mellivora/Support/Arr.php
Arr.convert
public static function convert($object, $recursive = false) { if ($object instanceof \Traversable) { $array = iterator_to_array($object); } elseif (method_exists($object, 'toArray')) { $array = $object->toArray(); } elseif (method_exists($object, 'asArray')) { ...
php
public static function convert($object, $recursive = false) { if ($object instanceof \Traversable) { $array = iterator_to_array($object); } elseif (method_exists($object, 'toArray')) { $array = $object->toArray(); } elseif (method_exists($object, 'asArray')) { ...
[ "public", "static", "function", "convert", "(", "$", "object", ",", "$", "recursive", "=", "false", ")", "{", "if", "(", "$", "object", "instanceof", "\\", "Traversable", ")", "{", "$", "array", "=", "iterator_to_array", "(", "$", "object", ")", ";", "...
将对像转换为数组 @param mixed $object @param bool $recursive @return array
[ "将对像转换为数组" ]
train
https://github.com/zhouyl/mellivora/blob/79f844c5c9c25ffbe18d142062e9bc3df00b36a1/Mellivora/Support/Arr.php#L565-L595
heidelpay/PhpDoc
src/phpDocumentor/Descriptor/Builder/Reflector/FunctionAssembler.php
FunctionAssembler.mapReflectorPropertiesOntoDescriptor
protected function mapReflectorPropertiesOntoDescriptor($reflector, $descriptor) { $packages = new Collection(); $package = $this->extractPackageFromDocBlock($reflector->getDocBlock()); if ($package) { $tag = new TagDescriptor('package'); $tag->setDescription($package...
php
protected function mapReflectorPropertiesOntoDescriptor($reflector, $descriptor) { $packages = new Collection(); $package = $this->extractPackageFromDocBlock($reflector->getDocBlock()); if ($package) { $tag = new TagDescriptor('package'); $tag->setDescription($package...
[ "protected", "function", "mapReflectorPropertiesOntoDescriptor", "(", "$", "reflector", ",", "$", "descriptor", ")", "{", "$", "packages", "=", "new", "Collection", "(", ")", ";", "$", "package", "=", "$", "this", "->", "extractPackageFromDocBlock", "(", "$", ...
Maps the properties of the Function reflector onto the Descriptor. @param FunctionReflector $reflector @param FunctionDescriptor $descriptor @return void
[ "Maps", "the", "properties", "of", "the", "Function", "reflector", "onto", "the", "Descriptor", "." ]
train
https://github.com/heidelpay/PhpDoc/blob/5ac9e842cbd4cbb70900533b240c131f3515ee02/src/phpDocumentor/Descriptor/Builder/Reflector/FunctionAssembler.php#L62-L77
heidelpay/PhpDoc
src/phpDocumentor/Descriptor/Builder/Reflector/FunctionAssembler.php
FunctionAssembler.createArgumentDescriptor
protected function createArgumentDescriptor($functionDescriptor, $argument) { $params = $functionDescriptor->getTags()->get('param', array()); if (!$this->argumentAssembler->getBuilder()) { $this->argumentAssembler->setBuilder($this->builder); } return $this->argumentAs...
php
protected function createArgumentDescriptor($functionDescriptor, $argument) { $params = $functionDescriptor->getTags()->get('param', array()); if (!$this->argumentAssembler->getBuilder()) { $this->argumentAssembler->setBuilder($this->builder); } return $this->argumentAs...
[ "protected", "function", "createArgumentDescriptor", "(", "$", "functionDescriptor", ",", "$", "argument", ")", "{", "$", "params", "=", "$", "functionDescriptor", "->", "getTags", "(", ")", "->", "get", "(", "'param'", ",", "array", "(", ")", ")", ";", "i...
Creates a new ArgumentDescriptor from the given Reflector and Param. @param FunctionDescriptor $functionDescriptor @param FunctionReflector\ArgumentReflector $argument @return ArgumentDescriptor
[ "Creates", "a", "new", "ArgumentDescriptor", "from", "the", "given", "Reflector", "and", "Param", "." ]
train
https://github.com/heidelpay/PhpDoc/blob/5ac9e842cbd4cbb70900533b240c131f3515ee02/src/phpDocumentor/Descriptor/Builder/Reflector/FunctionAssembler.php#L118-L127
php-lug/lug
src/Bundle/LocaleBundle/DependencyInjection/LugLocaleExtension.php
LugLocaleExtension.loadBundle
protected function loadBundle(array $config, ContainerBuilder $container) { $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); foreach (['context', 'event_subscriber', 'form', 'negotiator', 'provider', 'validator'] as $resource) { $loader->load($re...
php
protected function loadBundle(array $config, ContainerBuilder $container) { $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); foreach (['context', 'event_subscriber', 'form', 'negotiator', 'provider', 'validator'] as $resource) { $loader->load($re...
[ "protected", "function", "loadBundle", "(", "array", "$", "config", ",", "ContainerBuilder", "$", "container", ")", "{", "$", "loader", "=", "new", "XmlFileLoader", "(", "$", "container", ",", "new", "FileLocator", "(", "__DIR__", ".", "'/../Resources/config'", ...
{@inheritdoc}
[ "{" ]
train
https://github.com/php-lug/lug/blob/81c109f187eba0a60f17e8cc59984ebb31841db7/src/Bundle/LocaleBundle/DependencyInjection/LugLocaleExtension.php#L28-L38
jakubkratina/larachartie
src/DataTable/Factory/CellsFactory.php
CellsFactory.create
public function create($value, $format = null) { if (is_array($value)) { return $this->create($value['value'], $value['format']); } if ($value instanceof Carbon) { return new CarbonCell($value, $format); } return new Cell($value, $format); }
php
public function create($value, $format = null) { if (is_array($value)) { return $this->create($value['value'], $value['format']); } if ($value instanceof Carbon) { return new CarbonCell($value, $format); } return new Cell($value, $format); }
[ "public", "function", "create", "(", "$", "value", ",", "$", "format", "=", "null", ")", "{", "if", "(", "is_array", "(", "$", "value", ")", ")", "{", "return", "$", "this", "->", "create", "(", "$", "value", "[", "'value'", "]", ",", "$", "value...
{@inheritdoc}
[ "{" ]
train
https://github.com/jakubkratina/larachartie/blob/96c535650d61a2a6c1c1b12d374e5e59d33239f6/src/DataTable/Factory/CellsFactory.php#L18-L29
kecik-framework/kecik
Kecik/Kecik.php
Kecik.autoload
public function autoload( $class ) { $ClassArray = explode( '\\', $class ); if ( count( $ClassArray ) > 1 ) { if ( php_sapi_name() == 'cli' ) { $MvcPath = $this->config->get( 'path.basepath' ) . $this->config->get( 'path.mvc' ); } else { $MvcPath = $this->config->get( 'path.mvc' ); } ...
php
public function autoload( $class ) { $ClassArray = explode( '\\', $class ); if ( count( $ClassArray ) > 1 ) { if ( php_sapi_name() == 'cli' ) { $MvcPath = $this->config->get( 'path.basepath' ) . $this->config->get( 'path.mvc' ); } else { $MvcPath = $this->config->get( 'path.mvc' ); } ...
[ "public", "function", "autoload", "(", "$", "class", ")", "{", "$", "ClassArray", "=", "explode", "(", "'\\\\'", ",", "$", "class", ")", ";", "if", "(", "count", "(", "$", "ClassArray", ")", ">", "1", ")", "{", "if", "(", "php_sapi_name", "(", ")",...
Autoload for MVC/HMVC concept @param $class
[ "Autoload", "for", "MVC", "/", "HMVC", "concept" ]
train
https://github.com/kecik-framework/kecik/blob/fa87e593affe1c9c51a2acd264b85ec06df31d7c/Kecik/Kecik.php#L207-L239
kecik-framework/kecik
Kecik/Kecik.php
Kecik.setCallable
private function setCallable( $args ) { $route = array_shift( $args ); $RealParams = array(); // Before Middleware if ( is_array( $args[0] ) && isset( $args[0][0] ) ) { $this->middleware['before'] = array_shift( $args ); } if ( ! is_callable( $args[0] ) && ! is_string( $args[0] ) && ! is_...
php
private function setCallable( $args ) { $route = array_shift( $args ); $RealParams = array(); // Before Middleware if ( is_array( $args[0] ) && isset( $args[0][0] ) ) { $this->middleware['before'] = array_shift( $args ); } if ( ! is_callable( $args[0] ) && ! is_string( $args[0] ) && ! is_...
[ "private", "function", "setCallable", "(", "$", "args", ")", "{", "$", "route", "=", "array_shift", "(", "$", "args", ")", ";", "$", "RealParams", "=", "array", "(", ")", ";", "// Before Middleware\r", "if", "(", "is_array", "(", "$", "args", "[", "0",...
Set Callback variable for execute when route is matched @param $args
[ "Set", "Callback", "variable", "for", "execute", "when", "route", "is", "matched" ]
train
https://github.com/kecik-framework/kecik/blob/fa87e593affe1c9c51a2acd264b85ec06df31d7c/Kecik/Kecik.php#L246-L366
kecik-framework/kecik
Kecik/Kecik.php
Kecik.createCallbackFromString
private function createCallbackFromString( $callFunc, $params ) { if ( is_string( $callFunc ) ) { $callFunc = function () use ( $callFunc, $params ) { $controllerParts = explode( '@', $callFunc ); $controllerParts[0] = explode( '\\', $controllerParts[0] ); $hmvc = ''; $cont...
php
private function createCallbackFromString( $callFunc, $params ) { if ( is_string( $callFunc ) ) { $callFunc = function () use ( $callFunc, $params ) { $controllerParts = explode( '@', $callFunc ); $controllerParts[0] = explode( '\\', $controllerParts[0] ); $hmvc = ''; $cont...
[ "private", "function", "createCallbackFromString", "(", "$", "callFunc", ",", "$", "params", ")", "{", "if", "(", "is_string", "(", "$", "callFunc", ")", ")", "{", "$", "callFunc", "=", "function", "(", ")", "use", "(", "$", "callFunc", ",", "$", "para...
Create Callback from string @param $callFunc @param $params @return Closure
[ "Create", "Callback", "from", "string" ]
train
https://github.com/kecik-framework/kecik/blob/fa87e593affe1c9c51a2acd264b85ec06df31d7c/Kecik/Kecik.php#L376-L410
kecik-framework/kecik
Kecik/Kecik.php
Kecik.get
public function get() { $this->RoutedStatus = FALSE; if ( ! $this->route->isGet() ) { return $this; } if ( is_callable( $this->callable ) ) { //$this->RoutedStatus = FALSE; return $this; } $this->middleware = array( 'before' => array(), 'after' => array() ); self::$FullRender = ''...
php
public function get() { $this->RoutedStatus = FALSE; if ( ! $this->route->isGet() ) { return $this; } if ( is_callable( $this->callable ) ) { //$this->RoutedStatus = FALSE; return $this; } $this->middleware = array( 'before' => array(), 'after' => array() ); self::$FullRender = ''...
[ "public", "function", "get", "(", ")", "{", "$", "this", "->", "RoutedStatus", "=", "FALSE", ";", "if", "(", "!", "$", "this", "->", "route", "->", "isGet", "(", ")", ")", "{", "return", "$", "this", ";", "}", "if", "(", "is_callable", "(", "$", ...
Set route for Get Method request @return $this
[ "Set", "route", "for", "Get", "Method", "request" ]
train
https://github.com/kecik-framework/kecik/blob/fa87e593affe1c9c51a2acd264b85ec06df31d7c/Kecik/Kecik.php#L417-L447
kecik-framework/kecik
Kecik/Kecik.php
Kecik.group
public function group() { if ( is_callable( $this->callable ) ) { //$this->RoutedStatus = FALSE; return $this; } self::$FullRender = ''; $args = func_get_args(); self::$group .= $args[0] . '/'; if ( is_callable( $args[1] ) ) { $this->GroupFunc = Closure::bind( $args[1], $...
php
public function group() { if ( is_callable( $this->callable ) ) { //$this->RoutedStatus = FALSE; return $this; } self::$FullRender = ''; $args = func_get_args(); self::$group .= $args[0] . '/'; if ( is_callable( $args[1] ) ) { $this->GroupFunc = Closure::bind( $args[1], $...
[ "public", "function", "group", "(", ")", "{", "if", "(", "is_callable", "(", "$", "this", "->", "callable", ")", ")", "{", "//$this->RoutedStatus = FALSE;\r", "return", "$", "this", ";", "}", "self", "::", "$", "FullRender", "=", "''", ";", "$", "args", ...
Set of Group route @return $this
[ "Set", "of", "Group", "route" ]
train
https://github.com/kecik-framework/kecik/blob/fa87e593affe1c9c51a2acd264b85ec06df31d7c/Kecik/Kecik.php#L639-L656
kecik-framework/kecik
Kecik/Kecik.php
Kecik.template
public function template( $template, $replace = FALSE ) { if ( $this->RoutedStatus || $replace === TRUE ) { self::$FullRender = $template; } return $this; }
php
public function template( $template, $replace = FALSE ) { if ( $this->RoutedStatus || $replace === TRUE ) { self::$FullRender = $template; } return $this; }
[ "public", "function", "template", "(", "$", "template", ",", "$", "replace", "=", "FALSE", ")", "{", "if", "(", "$", "this", "->", "RoutedStatus", "||", "$", "replace", "===", "TRUE", ")", "{", "self", "::", "$", "FullRender", "=", "$", "template", "...
Set template before render @param $template @param bool $replace @return $this
[ "Set", "template", "before", "render" ]
train
https://github.com/kecik-framework/kecik/blob/fa87e593affe1c9c51a2acd264b85ec06df31d7c/Kecik/Kecik.php#L693-L699