id
int32
0
241k
repo
stringlengths
6
63
path
stringlengths
5
140
func_name
stringlengths
3
151
original_string
stringlengths
84
13k
language
stringclasses
1 value
code
stringlengths
84
13k
code_tokens
list
docstring
stringlengths
3
47.2k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
91
247
194,400
LeadPages/php_pages_component
src/Pages/LeadpagesPages.php
LeadpagesPages.getAllUserPages
public function getAllUserPages($returnResponse = array(), $cursor = false) { if (empty($this->login->apiKey)) { $this->login->getApiKey(); } //get & parse response $response = $this->getPages($cursor); $response = json_decode($response['response'], true); ...
php
public function getAllUserPages($returnResponse = array(), $cursor = false) { if (empty($this->login->apiKey)) { $this->login->getApiKey(); } //get & parse response $response = $this->getPages($cursor); $response = json_decode($response['response'], true); ...
[ "public", "function", "getAllUserPages", "(", "$", "returnResponse", "=", "array", "(", ")", ",", "$", "cursor", "=", "false", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "login", "->", "apiKey", ")", ")", "{", "$", "this", "->", "login", ...
Recursive function to get all of a users pages @param array $returnResponse @param bool $cursor @return mixed
[ "Recursive", "function", "to", "get", "all", "of", "a", "users", "pages" ]
1be2742c402793ddacb3730d28058f6b418abeb4
https://github.com/LeadPages/php_pages_component/blob/1be2742c402793ddacb3730d28058f6b418abeb4/src/Pages/LeadpagesPages.php#L97-L146
194,401
LeadPages/php_pages_component
src/Pages/LeadpagesPages.php
LeadpagesPages.stripB3NonPublished
public function stripB3NonPublished($pages) { foreach ($pages['_items'] as $index => $page) { if ($page['isBuilderThreePage'] && !$page['isBuilderThreePublished']) { unset($pages['_items'][$index]); } } return $pages; }
php
public function stripB3NonPublished($pages) { foreach ($pages['_items'] as $index => $page) { if ($page['isBuilderThreePage'] && !$page['isBuilderThreePublished']) { unset($pages['_items'][$index]); } } return $pages; }
[ "public", "function", "stripB3NonPublished", "(", "$", "pages", ")", "{", "foreach", "(", "$", "pages", "[", "'_items'", "]", "as", "$", "index", "=>", "$", "page", ")", "{", "if", "(", "$", "page", "[", "'isBuilderThreePage'", "]", "&&", "!", "$", "...
Remove non published B3 pages @param mixed $pages @return mixed
[ "Remove", "non", "published", "B3", "pages" ]
1be2742c402793ddacb3730d28058f6b418abeb4
https://github.com/LeadPages/php_pages_component/blob/1be2742c402793ddacb3730d28058f6b418abeb4/src/Pages/LeadpagesPages.php#L156-L165
194,402
LeadPages/php_pages_component
src/Pages/LeadpagesPages.php
LeadpagesPages.sortPages
public function sortPages($pages) { usort($pages['_items'], function ($a, $b) { //need to convert them to lowercase strings for equal comparison return strcmp(strtolower($a["name"]), strtolower($b["name"])); }); return $pages; }
php
public function sortPages($pages) { usort($pages['_items'], function ($a, $b) { //need to convert them to lowercase strings for equal comparison return strcmp(strtolower($a["name"]), strtolower($b["name"])); }); return $pages; }
[ "public", "function", "sortPages", "(", "$", "pages", ")", "{", "usort", "(", "$", "pages", "[", "'_items'", "]", ",", "function", "(", "$", "a", ",", "$", "b", ")", "{", "//need to convert them to lowercase strings for equal comparison", "return", "strcmp", "...
sort pages in alphabetical user @param mixed $pages @return mixed
[ "sort", "pages", "in", "alphabetical", "user" ]
1be2742c402793ddacb3730d28058f6b418abeb4
https://github.com/LeadPages/php_pages_component/blob/1be2742c402793ddacb3730d28058f6b418abeb4/src/Pages/LeadpagesPages.php#L174-L182
194,403
LeadPages/php_pages_component
src/Pages/LeadpagesPages.php
LeadpagesPages.getSinglePageDownloadUrl
public function getSinglePageDownloadUrl($pageId) { try { $response = $this->client->get($this->PagesUrl . '/' . $pageId, [ 'headers' => ['Authorization' => 'Bearer '. $this->login->apiKey], 'verify' => $this->certFile, ]); $body = json_de...
php
public function getSinglePageDownloadUrl($pageId) { try { $response = $this->client->get($this->PagesUrl . '/' . $pageId, [ 'headers' => ['Authorization' => 'Bearer '. $this->login->apiKey], 'verify' => $this->certFile, ]); $body = json_de...
[ "public", "function", "getSinglePageDownloadUrl", "(", "$", "pageId", ")", "{", "try", "{", "$", "response", "=", "$", "this", "->", "client", "->", "get", "(", "$", "this", "->", "PagesUrl", ".", "'/'", ".", "$", "pageId", ",", "[", "'headers'", "=>",...
Get the url to download the page url from @param string $pageId @return array
[ "Get", "the", "url", "to", "download", "the", "page", "url", "from" ]
1be2742c402793ddacb3730d28058f6b418abeb4
https://github.com/LeadPages/php_pages_component/blob/1be2742c402793ddacb3730d28058f6b418abeb4/src/Pages/LeadpagesPages.php#L191-L241
194,404
LeadPages/php_pages_component
src/Pages/LeadpagesPages.php
LeadpagesPages.downloadPageHtml
public function downloadPageHtml($pageId, $isRetry = false) { if (is_null($this->login->apiKey)) { $this->login->apiKey = $this->login->getApiKey(); } $response = $this->getSinglePageDownloadUrl($pageId); if ($response['error']) { return $response; ...
php
public function downloadPageHtml($pageId, $isRetry = false) { if (is_null($this->login->apiKey)) { $this->login->apiKey = $this->login->getApiKey(); } $response = $this->getSinglePageDownloadUrl($pageId); if ($response['error']) { return $response; ...
[ "public", "function", "downloadPageHtml", "(", "$", "pageId", ",", "$", "isRetry", "=", "false", ")", "{", "if", "(", "is_null", "(", "$", "this", "->", "login", "->", "apiKey", ")", ")", "{", "$", "this", "->", "login", "->", "apiKey", "=", "$", "...
get url for page, then use a get request to get the html for the page @todo refactor this @todo at sometime this should be replaced with a single call to get the html this requires two calls @param string $pageId Leadpages Page id not wordpress post_id @param bool $isRetry true downgrades to http @return mixed
[ "get", "url", "for", "page", "then", "use", "a", "get", "request", "to", "get", "the", "html", "for", "the", "page" ]
1be2742c402793ddacb3730d28058f6b418abeb4
https://github.com/LeadPages/php_pages_component/blob/1be2742c402793ddacb3730d28058f6b418abeb4/src/Pages/LeadpagesPages.php#L254-L314
194,405
cinnamonlab/redis
src/Framework/Redis/Redis.php
Redis.connection
public function connection($name = 'default') { if ( ! isset($this) ) return self::getInstance()->clients[Config::get("redis.$name")]; return $this->clients[ Config::get("redis.$name") ]; }
php
public function connection($name = 'default') { if ( ! isset($this) ) return self::getInstance()->clients[Config::get("redis.$name")]; return $this->clients[ Config::get("redis.$name") ]; }
[ "public", "function", "connection", "(", "$", "name", "=", "'default'", ")", "{", "if", "(", "!", "isset", "(", "$", "this", ")", ")", "return", "self", "::", "getInstance", "(", ")", "->", "clients", "[", "Config", "::", "get", "(", "\"redis.$name\"",...
Get a specific Redis connection instance. @param string $name @return \Predis\ClientInterface|null
[ "Get", "a", "specific", "Redis", "connection", "instance", "." ]
3b5841321441b26d624fb025b8f9a54c23aed40b
https://github.com/cinnamonlab/redis/blob/3b5841321441b26d624fb025b8f9a54c23aed40b/src/Framework/Redis/Redis.php#L79-L83
194,406
zapheus/zapheus
src/Http/Message/MessageFactory.php
MessageFactory.write
public function write($output) { $resource = fopen('php://temp', 'r+'); ! $resource && $resource = null; $stream = new Stream($resource); $stream->write((string) $output); $this->stream = $stream; return $this; }
php
public function write($output) { $resource = fopen('php://temp', 'r+'); ! $resource && $resource = null; $stream = new Stream($resource); $stream->write((string) $output); $this->stream = $stream; return $this; }
[ "public", "function", "write", "(", "$", "output", ")", "{", "$", "resource", "=", "fopen", "(", "'php://temp'", ",", "'r+'", ")", ";", "!", "$", "resource", "&&", "$", "resource", "=", "null", ";", "$", "stream", "=", "new", "Stream", "(", "$", "r...
Writes data directly to the stream. @param string $output @return self
[ "Writes", "data", "directly", "to", "the", "stream", "." ]
96618b5cee7d20b6700d0475e4334ae4b5163a6b
https://github.com/zapheus/zapheus/blob/96618b5cee7d20b6700d0475e4334ae4b5163a6b/src/Http/Message/MessageFactory.php#L138-L151
194,407
AnonymPHP/Anonym-Database
Pagination/Render.php
Render.simpleRendeArray
public function simpleRendeArray() { $array = []; $count = $this->paginator->getCount(); $url = $this->path; $current = $this->paginator->getCurrentPage(); // create appends string $appends = $this->createAppendString($this->paginator->getAppends()); // crea...
php
public function simpleRendeArray() { $array = []; $count = $this->paginator->getCount(); $url = $this->path; $current = $this->paginator->getCurrentPage(); // create appends string $appends = $this->createAppendString($this->paginator->getAppends()); // crea...
[ "public", "function", "simpleRendeArray", "(", ")", "{", "$", "array", "=", "[", "]", ";", "$", "count", "=", "$", "this", "->", "paginator", "->", "getCount", "(", ")", ";", "$", "url", "=", "$", "this", "->", "path", ";", "$", "current", "=", "...
create pagination with only previous and next buttons @return array
[ "create", "pagination", "with", "only", "previous", "and", "next", "buttons" ]
4d034219e0e3eb2833fa53204e9f52a74a9a7e4b
https://github.com/AnonymPHP/Anonym-Database/blob/4d034219e0e3eb2833fa53204e9f52a74a9a7e4b/Pagination/Render.php#L136-L171
194,408
AnonymPHP/Anonym-Database
Pagination/Render.php
Render.createBeforeButton
private function createBeforeButton($current, $url, $class, $fragments) { if ($this->isAvaibleCurrentPage($current) && $current > 1) { $page = $current - 1; return $this->buildChieldString("«", $url, $class, $fragments, $page); } else { return false; ...
php
private function createBeforeButton($current, $url, $class, $fragments) { if ($this->isAvaibleCurrentPage($current) && $current > 1) { $page = $current - 1; return $this->buildChieldString("«", $url, $class, $fragments, $page); } else { return false; ...
[ "private", "function", "createBeforeButton", "(", "$", "current", ",", "$", "url", ",", "$", "class", ",", "$", "fragments", ")", "{", "if", "(", "$", "this", "->", "isAvaibleCurrentPage", "(", "$", "current", ")", "&&", "$", "current", ">", "1", ")", ...
build before button string @param int $current @param string $url @param string $class @return bool|string
[ "build", "before", "button", "string" ]
4d034219e0e3eb2833fa53204e9f52a74a9a7e4b
https://github.com/AnonymPHP/Anonym-Database/blob/4d034219e0e3eb2833fa53204e9f52a74a9a7e4b/Pagination/Render.php#L193-L205
194,409
AnonymPHP/Anonym-Database
Pagination/Render.php
Render.createAfterButton
private function createAfterButton($current, $limit, $url, $class, $fragments) { if ($this->isAvaibleCurrentPage($current) && $current < $limit) { $page = $current - 1; return $this->buildChieldString("&laquo;", $url, $class, $fragments, $page); } else { return ...
php
private function createAfterButton($current, $limit, $url, $class, $fragments) { if ($this->isAvaibleCurrentPage($current) && $current < $limit) { $page = $current - 1; return $this->buildChieldString("&laquo;", $url, $class, $fragments, $page); } else { return ...
[ "private", "function", "createAfterButton", "(", "$", "current", ",", "$", "limit", ",", "$", "url", ",", "$", "class", ",", "$", "fragments", ")", "{", "if", "(", "$", "this", "->", "isAvaibleCurrentPage", "(", "$", "current", ")", "&&", "$", "current...
&raquo; build next button string @param int $current @param int $limit @param string $url @param string $class @return bool|string
[ "&raquo", ";", "build", "next", "button", "string" ]
4d034219e0e3eb2833fa53204e9f52a74a9a7e4b
https://github.com/AnonymPHP/Anonym-Database/blob/4d034219e0e3eb2833fa53204e9f52a74a9a7e4b/Pagination/Render.php#L216-L226
194,410
AnonymPHP/Anonym-Database
Pagination/Render.php
Render.buildChieldString
private function buildChieldString($page, $url, $pageName, $fragments, $i) { settype($page, 'string'); $add = $this->buildAddUrl($url); $string = $url . $add . $i . $fragments; return sprintf("<li><a href='%s' class='%s'>%s</a></li>", $string, $pageName, $page); }
php
private function buildChieldString($page, $url, $pageName, $fragments, $i) { settype($page, 'string'); $add = $this->buildAddUrl($url); $string = $url . $add . $i . $fragments; return sprintf("<li><a href='%s' class='%s'>%s</a></li>", $string, $pageName, $page); }
[ "private", "function", "buildChieldString", "(", "$", "page", ",", "$", "url", ",", "$", "pageName", ",", "$", "fragments", ",", "$", "i", ")", "{", "settype", "(", "$", "page", ",", "'string'", ")", ";", "$", "add", "=", "$", "this", "->", "buildA...
create chield string @param string $page @param string $url @return string
[ "create", "chield", "string" ]
4d034219e0e3eb2833fa53204e9f52a74a9a7e4b
https://github.com/AnonymPHP/Anonym-Database/blob/4d034219e0e3eb2833fa53204e9f52a74a9a7e4b/Pagination/Render.php#L235-L242
194,411
SlabPHP/controllers
src/Page.php
Page.fetchSubTemplateName
protected function fetchSubTemplateName() { if (!empty($this->subTemplate)) return; $className = get_called_class(); if (mb_strpos($className, 'Controllers') === false) { $this->system->log()->notice("Fully qualified Controller class name does not contain 'Controllers' ...
php
protected function fetchSubTemplateName() { if (!empty($this->subTemplate)) return; $className = get_called_class(); if (mb_strpos($className, 'Controllers') === false) { $this->system->log()->notice("Fully qualified Controller class name does not contain 'Controllers' ...
[ "protected", "function", "fetchSubTemplateName", "(", ")", "{", "if", "(", "!", "empty", "(", "$", "this", "->", "subTemplate", ")", ")", "return", ";", "$", "className", "=", "get_called_class", "(", ")", ";", "if", "(", "mb_strpos", "(", "$", "classNam...
Fetch sub template name
[ "Fetch", "sub", "template", "name" ]
a1c4fded0265100a85904dd664b972a7f8687652
https://github.com/SlabPHP/controllers/blob/a1c4fded0265100a85904dd664b972a7f8687652/src/Page.php#L126-L154
194,412
judus/minimal-database
src/Connectors/PDO.php
PDO.connection
public function connection($config = null, $forceConnect = false) { if ($this->connection && !$forceConnect) { return $this->connection; } !isset($config) || $this->config($config); $ref = new \ReflectionClass($this->getHandler()); try { ...
php
public function connection($config = null, $forceConnect = false) { if ($this->connection && !$forceConnect) { return $this->connection; } !isset($config) || $this->config($config); $ref = new \ReflectionClass($this->getHandler()); try { ...
[ "public", "function", "connection", "(", "$", "config", "=", "null", ",", "$", "forceConnect", "=", "false", ")", "{", "if", "(", "$", "this", "->", "connection", "&&", "!", "$", "forceConnect", ")", "{", "return", "$", "this", "->", "connection", ";",...
Returns a PDO connection @param null $config @param bool $forceConnect @return \PDO @throws DatabaseException
[ "Returns", "a", "PDO", "connection" ]
e6f8cb46eab41c3f1b6cabe0da5ccd0926727279
https://github.com/judus/minimal-database/blob/e6f8cb46eab41c3f1b6cabe0da5ccd0926727279/src/Connectors/PDO.php#L359-L383
194,413
KDF5000/EasyThink
src/ThinkPHP/Library/Vendor/Smarty/sysplugins/smarty_internal_compilebase.php
Smarty_Internal_CompileBase.closeTag
public function closeTag($compiler, $expectedTag) { if (count($compiler->_tag_stack) > 0) { // get stacked info list($_openTag, $_data) = array_pop($compiler->_tag_stack); // open tag must match with the expected ones if (in_array($_openTag, (array) $expectedT...
php
public function closeTag($compiler, $expectedTag) { if (count($compiler->_tag_stack) > 0) { // get stacked info list($_openTag, $_data) = array_pop($compiler->_tag_stack); // open tag must match with the expected ones if (in_array($_openTag, (array) $expectedT...
[ "public", "function", "closeTag", "(", "$", "compiler", ",", "$", "expectedTag", ")", "{", "if", "(", "count", "(", "$", "compiler", "->", "_tag_stack", ")", ">", "0", ")", "{", "// get stacked info", "list", "(", "$", "_openTag", ",", "$", "_data", ")...
Pop closing tag Raise an error if this stack-top doesn't match with expected opening tags @param object $compiler compiler object @param array|string $expectedTag the expected opening tag names @return mixed any type the opening tag's name or saved data
[ "Pop", "closing", "tag" ]
86efc9c8a0d504e01e2fea55868227fdc8928841
https://github.com/KDF5000/EasyThink/blob/86efc9c8a0d504e01e2fea55868227fdc8928841/src/ThinkPHP/Library/Vendor/Smarty/sysplugins/smarty_internal_compilebase.php#L150-L172
194,414
infusephp/cron
src/Libs/Lock.php
Lock.acquire
public function acquire($expires) { // do not lock if expiry time is 0 if ($expires <= 0) { return true; } $k = $this->getName(); $this->lock = $this->factory->createLock($k, $expires); return $this->lock->acquire(); }
php
public function acquire($expires) { // do not lock if expiry time is 0 if ($expires <= 0) { return true; } $k = $this->getName(); $this->lock = $this->factory->createLock($k, $expires); return $this->lock->acquire(); }
[ "public", "function", "acquire", "(", "$", "expires", ")", "{", "// do not lock if expiry time is 0", "if", "(", "$", "expires", "<=", "0", ")", "{", "return", "true", ";", "}", "$", "k", "=", "$", "this", "->", "getName", "(", ")", ";", "$", "this", ...
Attempts to acquire the global lock for this job. @param int $expires time in seconds after which the lock expires @return bool
[ "Attempts", "to", "acquire", "the", "global", "lock", "for", "this", "job", "." ]
783f6078b455a48415efeba0a6ee97ab17a3a903
https://github.com/infusephp/cron/blob/783f6078b455a48415efeba0a6ee97ab17a3a903/src/Libs/Lock.php#L71-L82
194,415
rzajac/phptools
src/Helper/File.php
File.splitFile
public function splitFile($dstDir, $chunkSize = 2048) { $dstDir = rtrim($dstDir, DIRECTORY_SEPARATOR); $srcFile = fopen($this->filePath, 'r'); $totalSize = filesize($this->filePath); $chunksNo = ceil($totalSize / $chunkSize); $lastChunkSize = $totalSize % $chunkSize; ...
php
public function splitFile($dstDir, $chunkSize = 2048) { $dstDir = rtrim($dstDir, DIRECTORY_SEPARATOR); $srcFile = fopen($this->filePath, 'r'); $totalSize = filesize($this->filePath); $chunksNo = ceil($totalSize / $chunkSize); $lastChunkSize = $totalSize % $chunkSize; ...
[ "public", "function", "splitFile", "(", "$", "dstDir", ",", "$", "chunkSize", "=", "2048", ")", "{", "$", "dstDir", "=", "rtrim", "(", "$", "dstDir", ",", "DIRECTORY_SEPARATOR", ")", ";", "$", "srcFile", "=", "fopen", "(", "$", "this", "->", "filePath"...
Split file into chunks and save it to destination. @param string $dstDir The destination folder path @param int $chunkSize @return array The array of chunk names
[ "Split", "file", "into", "chunks", "and", "save", "it", "to", "destination", "." ]
3cbece7645942d244603c14ba897d8a676ee3088
https://github.com/rzajac/phptools/blob/3cbece7645942d244603c14ba897d8a676ee3088/src/Helper/File.php#L76-L112
194,416
yuncms/yuncms-core
helpers/UUIDHelper.php
UUIDHelper.v4
public static function v4() { return // 32 bits for "time_low" bin2hex(Yii::$app->security->generateRandomKey(4)) . "-" . // 16 bits for "time_mid" bin2hex(Yii::$app->security->generateRandomKey(2)) . "-" . // 16 bits for "time_hi_and_version", ...
php
public static function v4() { return // 32 bits for "time_low" bin2hex(Yii::$app->security->generateRandomKey(4)) . "-" . // 16 bits for "time_mid" bin2hex(Yii::$app->security->generateRandomKey(2)) . "-" . // 16 bits for "time_hi_and_version", ...
[ "public", "static", "function", "v4", "(", ")", "{", "return", "// 32 bits for \"time_low\"", "bin2hex", "(", "Yii", "::", "$", "app", "->", "security", "->", "generateRandomKey", "(", "4", ")", ")", ".", "\"-\"", ".", "// 16 bits for \"time_mid\"", "bin2hex", ...
Creates an v4 UUID @return string @throws \yii\base\Exception
[ "Creates", "an", "v4", "UUID" ]
bfaf61c38e48979036c3ede3a0f2beb637500df5
https://github.com/yuncms/yuncms-core/blob/bfaf61c38e48979036c3ede3a0f2beb637500df5/helpers/UUIDHelper.php#L26-L42
194,417
stubbles/stubbles-peer
src/main/php/http/HttpUri.php
HttpUri.fromParts
public static function fromParts( string $scheme, string $host, int $port = null, string $path = '/', string $queryString = null ): self { return self::fromString( $scheme . '://' . $host ...
php
public static function fromParts( string $scheme, string $host, int $port = null, string $path = '/', string $queryString = null ): self { return self::fromString( $scheme . '://' . $host ...
[ "public", "static", "function", "fromParts", "(", "string", "$", "scheme", ",", "string", "$", "host", ",", "int", "$", "port", "=", "null", ",", "string", "$", "path", "=", "'/'", ",", "string", "$", "queryString", "=", "null", ")", ":", "self", "{"...
creates http uri from given uri parts @param string $scheme scheme of http uri, must be either http or https @param string $host host name of http uri @param int $port optional port of http uri @param string $path optional path of http uri, defaults to / @param string ...
[ "creates", "http", "uri", "from", "given", "uri", "parts" ]
dc8b0a517dc4c84b615cc3c88f0d64a2b742f9cc
https://github.com/stubbles/stubbles-peer/blob/dc8b0a517dc4c84b615cc3c88f0d64a2b742f9cc/src/main/php/http/HttpUri.php#L36-L51
194,418
stubbles/stubbles-peer
src/main/php/http/HttpUri.php
HttpUri.castFrom
public static function castFrom($value, string $name = 'Uri'): self { if ($value instanceof self) { return $value; } if (is_string($value)) { return self::fromString($value); } throw new \InvalidArgumentException( $name . ' must be a ...
php
public static function castFrom($value, string $name = 'Uri'): self { if ($value instanceof self) { return $value; } if (is_string($value)) { return self::fromString($value); } throw new \InvalidArgumentException( $name . ' must be a ...
[ "public", "static", "function", "castFrom", "(", "$", "value", ",", "string", "$", "name", "=", "'Uri'", ")", ":", "self", "{", "if", "(", "$", "value", "instanceof", "self", ")", "{", "return", "$", "value", ";", "}", "if", "(", "is_string", "(", ...
casts given value to an instance of HttpUri @param string|\stubbles\peer\http\HttpUri $value value to cast to HttpUri @param string $name optional name of parameter to cast from @return \stubbles\peer\http\HttpUri @throws \InvalidArgumentException @since 4.0.0
[ "casts", "given", "value", "to", "an", "instance", "of", "HttpUri" ]
dc8b0a517dc4c84b615cc3c88f0d64a2b742f9cc
https://github.com/stubbles/stubbles-peer/blob/dc8b0a517dc4c84b615cc3c88f0d64a2b742f9cc/src/main/php/http/HttpUri.php#L88-L103
194,419
stubbles/stubbles-peer
src/main/php/http/HttpUri.php
HttpUri.isValidForRfc
private function isValidForRfc(string $rfc): bool { if ($this->parsedUri->hasUser() && Http::RFC_7230 === $rfc) { throw new MalformedUri( 'The URI ' . $this->parsedUri->asString() . ' is not a valid HTTP URI according to ' . Http::RFC_7230 ...
php
private function isValidForRfc(string $rfc): bool { if ($this->parsedUri->hasUser() && Http::RFC_7230 === $rfc) { throw new MalformedUri( 'The URI ' . $this->parsedUri->asString() . ' is not a valid HTTP URI according to ' . Http::RFC_7230 ...
[ "private", "function", "isValidForRfc", "(", "string", "$", "rfc", ")", ":", "bool", "{", "if", "(", "$", "this", "->", "parsedUri", "->", "hasUser", "(", ")", "&&", "Http", "::", "RFC_7230", "===", "$", "rfc", ")", "{", "throw", "new", "MalformedUri",...
checks if uri is valid according to given rfc @param string $rfc @return bool @throws \stubbles\peer\MalformedUri
[ "checks", "if", "uri", "is", "valid", "according", "to", "given", "rfc" ]
dc8b0a517dc4c84b615cc3c88f0d64a2b742f9cc
https://github.com/stubbles/stubbles-peer/blob/dc8b0a517dc4c84b615cc3c88f0d64a2b742f9cc/src/main/php/http/HttpUri.php#L112-L123
194,420
stubbles/stubbles-peer
src/main/php/http/HttpUri.php
HttpUri.exists
public static function exists($httpUri, callable $checkWith = null): bool { if ($httpUri instanceof self) { return $httpUri->hasDnsRecord($checkWith); } if (empty($httpUri) || !is_string($httpUri)) { return false; } try { return self::fro...
php
public static function exists($httpUri, callable $checkWith = null): bool { if ($httpUri instanceof self) { return $httpUri->hasDnsRecord($checkWith); } if (empty($httpUri) || !is_string($httpUri)) { return false; } try { return self::fro...
[ "public", "static", "function", "exists", "(", "$", "httpUri", ",", "callable", "$", "checkWith", "=", "null", ")", ":", "bool", "{", "if", "(", "$", "httpUri", "instanceof", "self", ")", "{", "return", "$", "httpUri", "->", "hasDnsRecord", "(", "$", "...
checks whether given http uri exists, i.e. has a DNS entry @param string $httpUri @param callable $checkWith optional function to check dns record with @return bool @since 7.1.0
[ "checks", "whether", "given", "http", "uri", "exists", "i", ".", "e", ".", "has", "a", "DNS", "entry" ]
dc8b0a517dc4c84b615cc3c88f0d64a2b742f9cc
https://github.com/stubbles/stubbles-peer/blob/dc8b0a517dc4c84b615cc3c88f0d64a2b742f9cc/src/main/php/http/HttpUri.php#L133-L148
194,421
stubbles/stubbles-peer
src/main/php/http/HttpUri.php
HttpUri.isValid
public static function isValid($httpUri): bool { if ($httpUri instanceof self) { return true; } if (empty($httpUri) || !is_string($httpUri)) { return false; } try { self::fromString($httpUri); } catch (MalformedUri $murle) { ...
php
public static function isValid($httpUri): bool { if ($httpUri instanceof self) { return true; } if (empty($httpUri) || !is_string($httpUri)) { return false; } try { self::fromString($httpUri); } catch (MalformedUri $murle) { ...
[ "public", "static", "function", "isValid", "(", "$", "httpUri", ")", ":", "bool", "{", "if", "(", "$", "httpUri", "instanceof", "self", ")", "{", "return", "true", ";", "}", "if", "(", "empty", "(", "$", "httpUri", ")", "||", "!", "is_string", "(", ...
checks whether given http uri is syntactically valid @param mixed $httpUri @return bool @since 7.1.0
[ "checks", "whether", "given", "http", "uri", "is", "syntactically", "valid" ]
dc8b0a517dc4c84b615cc3c88f0d64a2b742f9cc
https://github.com/stubbles/stubbles-peer/blob/dc8b0a517dc4c84b615cc3c88f0d64a2b742f9cc/src/main/php/http/HttpUri.php#L157-L174
194,422
stubbles/stubbles-peer
src/main/php/http/HttpUri.php
HttpUri.isSyntacticallyValid
protected function isSyntacticallyValid(): bool { if (!parent::isSyntacticallyValid()) { return false; } if (!$this->parsedUri->schemeEquals(Http::SCHEME) && !$this->parsedUri->schemeEquals(Http::SCHEME_SSL)) { return false; } return true; ...
php
protected function isSyntacticallyValid(): bool { if (!parent::isSyntacticallyValid()) { return false; } if (!$this->parsedUri->schemeEquals(Http::SCHEME) && !$this->parsedUri->schemeEquals(Http::SCHEME_SSL)) { return false; } return true; ...
[ "protected", "function", "isSyntacticallyValid", "(", ")", ":", "bool", "{", "if", "(", "!", "parent", "::", "isSyntacticallyValid", "(", ")", ")", "{", "return", "false", ";", "}", "if", "(", "!", "$", "this", "->", "parsedUri", "->", "schemeEquals", "(...
Checks whether URI is a correct URI. @return bool
[ "Checks", "whether", "URI", "is", "a", "correct", "URI", "." ]
dc8b0a517dc4c84b615cc3c88f0d64a2b742f9cc
https://github.com/stubbles/stubbles-peer/blob/dc8b0a517dc4c84b615cc3c88f0d64a2b742f9cc/src/main/php/http/HttpUri.php#L181-L193
194,423
stubbles/stubbles-peer
src/main/php/http/HttpUri.php
HttpUri.hasDnsRecord
public function hasDnsRecord(callable $checkWith = null): bool { $checkdnsrr = null === $checkWith ? 'checkdnsrr': $checkWith; if ($this->parsedUri->isLocalHost() || $checkdnsrr($this->parsedUri->hostname(), 'A') || $checkdnsrr($this->parsedUri->hostname(), 'AAAA') || $...
php
public function hasDnsRecord(callable $checkWith = null): bool { $checkdnsrr = null === $checkWith ? 'checkdnsrr': $checkWith; if ($this->parsedUri->isLocalHost() || $checkdnsrr($this->parsedUri->hostname(), 'A') || $checkdnsrr($this->parsedUri->hostname(), 'AAAA') || $...
[ "public", "function", "hasDnsRecord", "(", "callable", "$", "checkWith", "=", "null", ")", ":", "bool", "{", "$", "checkdnsrr", "=", "null", "===", "$", "checkWith", "?", "'checkdnsrr'", ":", "$", "checkWith", ";", "if", "(", "$", "this", "->", "parsedUr...
checks whether host of uri is listed in dns @param callable $checkWith optional function to check dns record with @return bool
[ "checks", "whether", "host", "of", "uri", "is", "listed", "in", "dns" ]
dc8b0a517dc4c84b615cc3c88f0d64a2b742f9cc
https://github.com/stubbles/stubbles-peer/blob/dc8b0a517dc4c84b615cc3c88f0d64a2b742f9cc/src/main/php/http/HttpUri.php#L201-L212
194,424
stubbles/stubbles-peer
src/main/php/http/HttpUri.php
HttpUri.hasDefaultPort
public function hasDefaultPort(): bool { if (!$this->parsedUri->hasPort()) { return true; } if ($this->isHttp() && $this->parsedUri->portEquals(Http::PORT)) { return true; } if ($this->isHttps() && $this->parsedUri->portEquals(Http::PORT_SSL)) { ...
php
public function hasDefaultPort(): bool { if (!$this->parsedUri->hasPort()) { return true; } if ($this->isHttp() && $this->parsedUri->portEquals(Http::PORT)) { return true; } if ($this->isHttps() && $this->parsedUri->portEquals(Http::PORT_SSL)) { ...
[ "public", "function", "hasDefaultPort", "(", ")", ":", "bool", "{", "if", "(", "!", "$", "this", "->", "parsedUri", "->", "hasPort", "(", ")", ")", "{", "return", "true", ";", "}", "if", "(", "$", "this", "->", "isHttp", "(", ")", "&&", "$", "thi...
checks whether the uri uses a default port or not Default ports are 80 for http and 443 for https @return bool
[ "checks", "whether", "the", "uri", "uses", "a", "default", "port", "or", "not" ]
dc8b0a517dc4c84b615cc3c88f0d64a2b742f9cc
https://github.com/stubbles/stubbles-peer/blob/dc8b0a517dc4c84b615cc3c88f0d64a2b742f9cc/src/main/php/http/HttpUri.php#L231-L246
194,425
stubbles/stubbles-peer
src/main/php/http/HttpUri.php
HttpUri.toHttp
public function toHttp(int $port = null): self { if ($this->isHttp()) { if (null !== $port && !$this->parsedUri->portEquals($port)) { return new ConstructedHttpUri($this->parsedUri->transpose(['port' => $port])); } return $this; } $change...
php
public function toHttp(int $port = null): self { if ($this->isHttp()) { if (null !== $port && !$this->parsedUri->portEquals($port)) { return new ConstructedHttpUri($this->parsedUri->transpose(['port' => $port])); } return $this; } $change...
[ "public", "function", "toHttp", "(", "int", "$", "port", "=", "null", ")", ":", "self", "{", "if", "(", "$", "this", "->", "isHttp", "(", ")", ")", "{", "if", "(", "null", "!==", "$", "port", "&&", "!", "$", "this", "->", "parsedUri", "->", "po...
transposes uri to http @param int $port optional new port to use, defaults to 80 @return \stubbles\peer\http\HttpUri @since 2.0.0
[ "transposes", "uri", "to", "http" ]
dc8b0a517dc4c84b615cc3c88f0d64a2b742f9cc
https://github.com/stubbles/stubbles-peer/blob/dc8b0a517dc4c84b615cc3c88f0d64a2b742f9cc/src/main/php/http/HttpUri.php#L307-L323
194,426
stubbles/stubbles-peer
src/main/php/http/HttpUri.php
HttpUri.toHttps
public function toHttps(int $port = null): self { if ($this->isHttps()) { if (null !== $port && !$this->parsedUri->portEquals($port)) { return new ConstructedHttpUri($this->parsedUri->transpose(['port' => $port])); } return $this; } $chan...
php
public function toHttps(int $port = null): self { if ($this->isHttps()) { if (null !== $port && !$this->parsedUri->portEquals($port)) { return new ConstructedHttpUri($this->parsedUri->transpose(['port' => $port])); } return $this; } $chan...
[ "public", "function", "toHttps", "(", "int", "$", "port", "=", "null", ")", ":", "self", "{", "if", "(", "$", "this", "->", "isHttps", "(", ")", ")", "{", "if", "(", "null", "!==", "$", "port", "&&", "!", "$", "this", "->", "parsedUri", "->", "...
transposes uri to https @param int $port optional new port to use, defaults to 443 @return \stubbles\peer\http\HttpUri @since 2.0.0
[ "transposes", "uri", "to", "https" ]
dc8b0a517dc4c84b615cc3c88f0d64a2b742f9cc
https://github.com/stubbles/stubbles-peer/blob/dc8b0a517dc4c84b615cc3c88f0d64a2b742f9cc/src/main/php/http/HttpUri.php#L332-L348
194,427
stubbles/stubbles-peer
src/main/php/http/HttpUri.php
HttpUri.createSocket
public function createSocket(): Socket { return new Socket( $this->hostname(), $this->port(), (($this->isHttps()) ? ('ssl://') : (null)) ); }
php
public function createSocket(): Socket { return new Socket( $this->hostname(), $this->port(), (($this->isHttps()) ? ('ssl://') : (null)) ); }
[ "public", "function", "createSocket", "(", ")", ":", "Socket", "{", "return", "new", "Socket", "(", "$", "this", "->", "hostname", "(", ")", ",", "$", "this", "->", "port", "(", ")", ",", "(", "(", "$", "this", "->", "isHttps", "(", ")", ")", "?"...
creates a socket to this uri @return \stubbles\peer\Socket @since 6.0.0
[ "creates", "a", "socket", "to", "this", "uri" ]
dc8b0a517dc4c84b615cc3c88f0d64a2b742f9cc
https://github.com/stubbles/stubbles-peer/blob/dc8b0a517dc4c84b615cc3c88f0d64a2b742f9cc/src/main/php/http/HttpUri.php#L375-L382
194,428
stubbles/stubbles-peer
src/main/php/http/HttpUri.php
HttpUri.openSocket
public function openSocket(int $timeout = 5, callable $openWith = null): Stream { $socket = $this->createSocket(); if (null !== $openWith) { $socket->openWith($openWith); } return $socket->connect()->setTimeout($timeout); }
php
public function openSocket(int $timeout = 5, callable $openWith = null): Stream { $socket = $this->createSocket(); if (null !== $openWith) { $socket->openWith($openWith); } return $socket->connect()->setTimeout($timeout); }
[ "public", "function", "openSocket", "(", "int", "$", "timeout", "=", "5", ",", "callable", "$", "openWith", "=", "null", ")", ":", "Stream", "{", "$", "socket", "=", "$", "this", "->", "createSocket", "(", ")", ";", "if", "(", "null", "!==", "$", "...
opens socket to this uri @param int $timeout connection timeout @param callable $openWith optional open port with this function @return \stubbles\peer\Stream @since 2.0.0
[ "opens", "socket", "to", "this", "uri" ]
dc8b0a517dc4c84b615cc3c88f0d64a2b742f9cc
https://github.com/stubbles/stubbles-peer/blob/dc8b0a517dc4c84b615cc3c88f0d64a2b742f9cc/src/main/php/http/HttpUri.php#L392-L400
194,429
NukaCode/users
src/NukaCode/Users/Http/Controllers/SocialAuthController.php
SocialAuthController.register
private function register($socialUser) { $names = explode(' ', $socialUser->getName()); $username = is_null($socialUser->getNickname()) ? $socialUser->getEmail() : $socialUser->getNickname(); $userDetails = [ 'username' => $username, 'email' => $socialU...
php
private function register($socialUser) { $names = explode(' ', $socialUser->getName()); $username = is_null($socialUser->getNickname()) ? $socialUser->getEmail() : $socialUser->getNickname(); $userDetails = [ 'username' => $username, 'email' => $socialU...
[ "private", "function", "register", "(", "$", "socialUser", ")", "{", "$", "names", "=", "explode", "(", "' '", ",", "$", "socialUser", "->", "getName", "(", ")", ")", ";", "$", "username", "=", "is_null", "(", "$", "socialUser", "->", "getNickname", "(...
Create a new user from a social user. @param $socialUser @return mixed
[ "Create", "a", "new", "user", "from", "a", "social", "user", "." ]
d827b8e6ba3faf27c85d867ec1d7e0a426968551
https://github.com/NukaCode/users/blob/d827b8e6ba3faf27c85d867ec1d7e0a426968551/src/NukaCode/Users/Http/Controllers/SocialAuthController.php#L98-L118
194,430
LartTyler/PHP-DaybreakCommons
src/DaybreakStudios/Common/IO/FileReader.php
FileReader.eof
public function eof() { if (!$this->hasRead) { $this->mark(); $ret = fgetc($this->handle); if ($ret === false) return true; $this->reset(); } return feof($this->handle); }
php
public function eof() { if (!$this->hasRead) { $this->mark(); $ret = fgetc($this->handle); if ($ret === false) return true; $this->reset(); } return feof($this->handle); }
[ "public", "function", "eof", "(", ")", "{", "if", "(", "!", "$", "this", "->", "hasRead", ")", "{", "$", "this", "->", "mark", "(", ")", ";", "$", "ret", "=", "fgetc", "(", "$", "this", "->", "handle", ")", ";", "if", "(", "$", "ret", "===", ...
Returns true if the end of the stream has been reached. @return boolean true if the end of the stream has been reached
[ "Returns", "true", "if", "the", "end", "of", "the", "stream", "has", "been", "reached", "." ]
db25b5d6cea9b5a1d5afc4c5548a2cbc3018bc0d
https://github.com/LartTyler/PHP-DaybreakCommons/blob/db25b5d6cea9b5a1d5afc4c5548a2cbc3018bc0d/src/DaybreakStudios/Common/IO/FileReader.php#L30-L43
194,431
agentmedia/phine-core
src/Core/Logic/Tree/PageParamListProvider.php
PageParamListProvider.TopMost
public function TopMost() { $sql = Access::SqlBuilder(); $tblParams = PageUrlParameter::Schema()->Table(); $where = $sql->Equals($tblParams->Field('PageUrl'), $sql->Value($this->pageUrl->GetID())) ->And_($sql->IsNull($tblParams->Field('Previous'))); return Pa...
php
public function TopMost() { $sql = Access::SqlBuilder(); $tblParams = PageUrlParameter::Schema()->Table(); $where = $sql->Equals($tblParams->Field('PageUrl'), $sql->Value($this->pageUrl->GetID())) ->And_($sql->IsNull($tblParams->Field('Previous'))); return Pa...
[ "public", "function", "TopMost", "(", ")", "{", "$", "sql", "=", "Access", "::", "SqlBuilder", "(", ")", ";", "$", "tblParams", "=", "PageUrlParameter", "::", "Schema", "(", ")", "->", "Table", "(", ")", ";", "$", "where", "=", "$", "sql", "->", "E...
Gets the first page url parameter @return PageUrlParameter Returns the first parameter or null if none exists
[ "Gets", "the", "first", "page", "url", "parameter" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Logic/Tree/PageParamListProvider.php#L63-L71
194,432
ezra-obiwale/dSCore
src/Stdlib/Table.php
Table.init
public static function init(array $attributes = array()) { self::$table_attributes = array(); self::$rows = array(); self::$row_data = array(); self::$headers = array(); self::$footers = array(); self::setAttributes($attributes); }
php
public static function init(array $attributes = array()) { self::$table_attributes = array(); self::$rows = array(); self::$row_data = array(); self::$headers = array(); self::$footers = array(); self::setAttributes($attributes); }
[ "public", "static", "function", "init", "(", "array", "$", "attributes", "=", "array", "(", ")", ")", "{", "self", "::", "$", "table_attributes", "=", "array", "(", ")", ";", "self", "::", "$", "rows", "=", "array", "(", ")", ";", "self", "::", "$"...
Sets up a new table @param array $attributes [optional] Array of attr => value
[ "Sets", "up", "a", "new", "table" ]
dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d
https://github.com/ezra-obiwale/dSCore/blob/dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d/src/Stdlib/Table.php#L20-L28
194,433
ezra-obiwale/dSCore
src/Stdlib/Table.php
Table.setHeaders
public static function setHeaders(array $data, array $attributes = array()) { foreach ($data as $header) { self::addHeader($header, $attributes); } }
php
public static function setHeaders(array $data, array $attributes = array()) { foreach ($data as $header) { self::addHeader($header, $attributes); } }
[ "public", "static", "function", "setHeaders", "(", "array", "$", "data", ",", "array", "$", "attributes", "=", "array", "(", ")", ")", "{", "foreach", "(", "$", "data", "as", "$", "header", ")", "{", "self", "::", "addHeader", "(", "$", "header", ","...
Sets header data @param array $data Array of labels for each column @param array $attributes Array of attr => value to apply to each column
[ "Sets", "header", "data" ]
dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d
https://github.com/ezra-obiwale/dSCore/blob/dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d/src/Stdlib/Table.php#L51-L55
194,434
ezra-obiwale/dSCore
src/Stdlib/Table.php
Table.setFooters
public static function setFooters(array $data, array $attributes = array()) { foreach ($data as $footer) { self::addFooter($footer, $attributes); } }
php
public static function setFooters(array $data, array $attributes = array()) { foreach ($data as $footer) { self::addFooter($footer, $attributes); } }
[ "public", "static", "function", "setFooters", "(", "array", "$", "data", ",", "array", "$", "attributes", "=", "array", "(", ")", ")", "{", "foreach", "(", "$", "data", "as", "$", "footer", ")", "{", "self", "::", "addFooter", "(", "$", "footer", ","...
Sets footer data @param array $data Array of labels for each column @param array $attributes Array of attr => value to apply to each column
[ "Sets", "footer", "data" ]
dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d
https://github.com/ezra-obiwale/dSCore/blob/dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d/src/Stdlib/Table.php#L89-L93
194,435
ezra-obiwale/dSCore
src/Stdlib/Table.php
Table.newRow
public static function newRow(array $attrs = array()) { if (!empty(self::$row_data)) self::$rows[count(self::$rows) - 1][] = self::$row_data; self::$row_data = array(); self::$rows[][] = $attrs; return count(self::$rows); }
php
public static function newRow(array $attrs = array()) { if (!empty(self::$row_data)) self::$rows[count(self::$rows) - 1][] = self::$row_data; self::$row_data = array(); self::$rows[][] = $attrs; return count(self::$rows); }
[ "public", "static", "function", "newRow", "(", "array", "$", "attrs", "=", "array", "(", ")", ")", "{", "if", "(", "!", "empty", "(", "self", "::", "$", "row_data", ")", ")", "self", "::", "$", "rows", "[", "count", "(", "self", "::", "$", "rows"...
Signals beginning of a new row @param array $attrs Array of attr => value to apply to the row
[ "Signals", "beginning", "of", "a", "new", "row" ]
dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d
https://github.com/ezra-obiwale/dSCore/blob/dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d/src/Stdlib/Table.php#L99-L105
194,436
ezra-obiwale/dSCore
src/Stdlib/Table.php
Table.render
public static function render() { self::newRow(); ob_start(); ?> <table <?php echo (!empty(self::$table_attributes)) ? self::parseAttributes(self::$table_attributes) : ""; ?>> <?php if (!empty(self::$headers)) { ?> <thead> ...
php
public static function render() { self::newRow(); ob_start(); ?> <table <?php echo (!empty(self::$table_attributes)) ? self::parseAttributes(self::$table_attributes) : ""; ?>> <?php if (!empty(self::$headers)) { ?> <thead> ...
[ "public", "static", "function", "render", "(", ")", "{", "self", "::", "newRow", "(", ")", ";", "ob_start", "(", ")", ";", "?>\n\n <table <?php", "echo", "(", "!", "empty", "(", "self", "::", "$", "table_attributes", ")", ")", "?", "self", "::", ...
Renders the HTML Table @return HTMLContent
[ "Renders", "the", "HTML", "Table" ]
dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d
https://github.com/ezra-obiwale/dSCore/blob/dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d/src/Stdlib/Table.php#L119-L192
194,437
Wedeto/HTTP
src/Forms/TransformStore.php
TransformStore.getTransformer
public function getTransformer(string $target_class) { if (isset($this->transformers[$target_class])) return $this->transformers[$target_class]; foreach ($this->transformers as $class => $transformer) { $inherit_mode = $transformer->getInheritMode(); if (...
php
public function getTransformer(string $target_class) { if (isset($this->transformers[$target_class])) return $this->transformers[$target_class]; foreach ($this->transformers as $class => $transformer) { $inherit_mode = $transformer->getInheritMode(); if (...
[ "public", "function", "getTransformer", "(", "string", "$", "target_class", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "transformers", "[", "$", "target_class", "]", ")", ")", "return", "$", "this", "->", "transformers", "[", "$", "target_class"...
Get a transformer that converts to the target class. If a direct version is available, that is returned. Otherwise, a transformer registered to transform to a superclass of the target may be returned instead. @param string $target_class The class to transform to @return Transformer A suitable transformer @throws Trans...
[ "Get", "a", "transformer", "that", "converts", "to", "the", "target", "class", ".", "If", "a", "direct", "version", "is", "available", "that", "is", "returned", ".", "Otherwise", "a", "transformer", "registered", "to", "transform", "to", "a", "superclass", "...
7318eff1b81a3c103c4263466d09b7f3593b70b9
https://github.com/Wedeto/HTTP/blob/7318eff1b81a3c103c4263466d09b7f3593b70b9/src/Forms/TransformStore.php#L53-L71
194,438
koolkode/stream
src/ChunkEncodedOutputStream.php
ChunkEncodedOutputStream.flush
public function flush() { if($this->stream === NULL) { throw new \RuntimeException(sprintf('Cannot flush detached stream')); } if(strlen($this->buffer)) { $this->stream->write(sprintf("%X\r\n%s\r\n", strlen($this->buffer), $this->buffer)); $this->buffer = ''; } }
php
public function flush() { if($this->stream === NULL) { throw new \RuntimeException(sprintf('Cannot flush detached stream')); } if(strlen($this->buffer)) { $this->stream->write(sprintf("%X\r\n%s\r\n", strlen($this->buffer), $this->buffer)); $this->buffer = ''; } }
[ "public", "function", "flush", "(", ")", "{", "if", "(", "$", "this", "->", "stream", "===", "NULL", ")", "{", "throw", "new", "\\", "RuntimeException", "(", "sprintf", "(", "'Cannot flush detached stream'", ")", ")", ";", "}", "if", "(", "strlen", "(", ...
Flush the current write buffer to the underlying output stream. Does nothing if the write buffer is empty. @throws \RuntimeException When the stream has been detached.
[ "Flush", "the", "current", "write", "buffer", "to", "the", "underlying", "output", "stream", "." ]
05e83efd76e1cb9e40a972711986b4a7e38bc141
https://github.com/koolkode/stream/blob/05e83efd76e1cb9e40a972711986b4a7e38bc141/src/ChunkEncodedOutputStream.php#L136-L148
194,439
bseddon/XPath20
DOM/XmlSchemaSet.php
XmlSchemaSet.AddSchema
public function AddSchema( $schema ) { if ( is_null( $schema ) ) throw new \lyquidity\xml\exceptions\ArgumentNullException(); if ( ! $schema instanceof XmlSchema ) throw new XmlSchemaException( "The parameter is not a valid XmlSchema instance" ); $this->schemas[ $schema->getTargetNamespace() ] = $schema; ...
php
public function AddSchema( $schema ) { if ( is_null( $schema ) ) throw new \lyquidity\xml\exceptions\ArgumentNullException(); if ( ! $schema instanceof XmlSchema ) throw new XmlSchemaException( "The parameter is not a valid XmlSchema instance" ); $this->schemas[ $schema->getTargetNamespace() ] = $schema; ...
[ "public", "function", "AddSchema", "(", "$", "schema", ")", "{", "if", "(", "is_null", "(", "$", "schema", ")", ")", "throw", "new", "\\", "lyquidity", "\\", "xml", "\\", "exceptions", "\\", "ArgumentNullException", "(", ")", ";", "if", "(", "!", "$", ...
Adds the given XmlSchema to the XmlSchemaSet. @param XmlSchema $schema The XmlSchema object to add to the XmlSchemaSet. @return XmlSchema An XmlSchema object if the schema is valid otherwise, an XmlSchemaException is thrown. @throws XmlSchemaException A schema in the XmlSchemaSet is not valid. ArgumentNullException...
[ "Adds", "the", "given", "XmlSchema", "to", "the", "XmlSchemaSet", "." ]
69882b6efffaa5470a819d5fdd2f6473ddeb046d
https://github.com/bseddon/XPath20/blob/69882b6efffaa5470a819d5fdd2f6473ddeb046d/DOM/XmlSchemaSet.php#L196-L202
194,440
naucon/Utility
src/EnumeratorAbstract.php
EnumeratorAbstract.set
public function set($key, $value) { if (!is_null($key) && is_scalar($key) ) { return $this->_items[$key] = $value; } else { // given index name is not valid throw new EnumeratorException('Element could not be added to list. Index is not valid.'...
php
public function set($key, $value) { if (!is_null($key) && is_scalar($key) ) { return $this->_items[$key] = $value; } else { // given index name is not valid throw new EnumeratorException('Element could not be added to list. Index is not valid.'...
[ "public", "function", "set", "(", "$", "key", ",", "$", "value", ")", "{", "if", "(", "!", "is_null", "(", "$", "key", ")", "&&", "is_scalar", "(", "$", "key", ")", ")", "{", "return", "$", "this", "->", "_items", "[", "$", "key", "]", "=", "...
add or replace a value with a specified key @param mixed $key key @param mixed $value value @return mixed value @throws EnumeratorException
[ "add", "or", "replace", "a", "value", "with", "a", "specified", "key" ]
d225bb5d09d82400917f710c9d502949a66442c4
https://github.com/naucon/Utility/blob/d225bb5d09d82400917f710c9d502949a66442c4/src/EnumeratorAbstract.php#L59-L69
194,441
nails/module-blog
blog/models/blog_model.php
NAILS_Blog_model.getAssociations
public function getAssociations($post_id = null) { $oConfig = Factory::service('Config'); $oDb = Factory::service('Database'); $_associations = $oConfig->item('blog_post_associations'); if (!$_associations) { return array(); } // --------...
php
public function getAssociations($post_id = null) { $oConfig = Factory::service('Config'); $oDb = Factory::service('Database'); $_associations = $oConfig->item('blog_post_associations'); if (!$_associations) { return array(); } // --------...
[ "public", "function", "getAssociations", "(", "$", "post_id", "=", "null", ")", "{", "$", "oConfig", "=", "Factory", "::", "service", "(", "'Config'", ")", ";", "$", "oDb", "=", "Factory", "::", "service", "(", "'Database'", ")", ";", "$", "_associations...
Fetch all the associations for a particular post @param int $post_id The ID f the post @return array
[ "Fetch", "all", "the", "associations", "for", "a", "particular", "post" ]
7b369c5209f4343fff7c7e2a22c237d5a95c8c24
https://github.com/nails/module-blog/blob/7b369c5209f4343fff7c7e2a22c237d5a95c8c24/blog/models/blog_model.php#L77-L121
194,442
nails/module-blog
blog/models/blog_model.php
NAILS_Blog_model.getBlogUrl
public function getBlogUrl($blogId) { if (isset($this->blogUrl[$blogId])) { return $this->blogUrl[$blogId]; } else { $url = appSetting('url', 'blog-' . $blogId); $url = $url ? $url : 'blog/'; $url = site_url($url); $this->blogUrl[$blogI...
php
public function getBlogUrl($blogId) { if (isset($this->blogUrl[$blogId])) { return $this->blogUrl[$blogId]; } else { $url = appSetting('url', 'blog-' . $blogId); $url = $url ? $url : 'blog/'; $url = site_url($url); $this->blogUrl[$blogI...
[ "public", "function", "getBlogUrl", "(", "$", "blogId", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "blogUrl", "[", "$", "blogId", "]", ")", ")", "{", "return", "$", "this", "->", "blogUrl", "[", "$", "blogId", "]", ";", "}", "else", "{...
Get the URL of a blog @param int $blogId The ID of the blog who's URL to get @return string
[ "Get", "the", "URL", "of", "a", "blog" ]
7b369c5209f4343fff7c7e2a22c237d5a95c8c24
https://github.com/nails/module-blog/blob/7b369c5209f4343fff7c7e2a22c237d5a95c8c24/blog/models/blog_model.php#L130-L146
194,443
fridge-project/dbal
src/Fridge/DBAL/Schema/Comparator/TableComparator.php
TableComparator.compare
public function compare(Table $oldTable, Table $newTable) { $createdColumns = $this->getCreatedColumns($oldTable, $newTable); $alteredColumns = $this->getAlteredColumns($oldTable, $newTable); $droppedColumns = $this->getDroppedColumns($oldTable, $newTable); $this->detectRenamedColum...
php
public function compare(Table $oldTable, Table $newTable) { $createdColumns = $this->getCreatedColumns($oldTable, $newTable); $alteredColumns = $this->getAlteredColumns($oldTable, $newTable); $droppedColumns = $this->getDroppedColumns($oldTable, $newTable); $this->detectRenamedColum...
[ "public", "function", "compare", "(", "Table", "$", "oldTable", ",", "Table", "$", "newTable", ")", "{", "$", "createdColumns", "=", "$", "this", "->", "getCreatedColumns", "(", "$", "oldTable", ",", "$", "newTable", ")", ";", "$", "alteredColumns", "=", ...
Compares two tables. @param \Fridge\DBAL\Schema\Table $oldTable The old table. @param \Fridge\DBAL\Schema\Table $newTable The new table. @return \Fridge\DBAL\Schema\Diff\TableDiff The difference between the two tables.
[ "Compares", "two", "tables", "." ]
d0b8c3551922d696836487aa0eb1bd74014edcd4
https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/Schema/Comparator/TableComparator.php#L47-L70
194,444
fridge-project/dbal
src/Fridge/DBAL/Schema/Comparator/TableComparator.php
TableComparator.comparePrimaryKeys
public function comparePrimaryKeys(PrimaryKey $oldPrimaryKey, PrimaryKey $newPrimaryKey) { return ($oldPrimaryKey->getName() !== $newPrimaryKey->getName()) || ($oldPrimaryKey->getColumnNames() !== $newPrimaryKey->getColumnNames()); }
php
public function comparePrimaryKeys(PrimaryKey $oldPrimaryKey, PrimaryKey $newPrimaryKey) { return ($oldPrimaryKey->getName() !== $newPrimaryKey->getName()) || ($oldPrimaryKey->getColumnNames() !== $newPrimaryKey->getColumnNames()); }
[ "public", "function", "comparePrimaryKeys", "(", "PrimaryKey", "$", "oldPrimaryKey", ",", "PrimaryKey", "$", "newPrimaryKey", ")", "{", "return", "(", "$", "oldPrimaryKey", "->", "getName", "(", ")", "!==", "$", "newPrimaryKey", "->", "getName", "(", ")", ")",...
Compares two primary keys. @param \Fridge\DBAL\Schema\PrimaryKey $oldPrimaryKey The old primary key. @param \Fridge\DBAL\Schema\PrimaryKey $newPrimaryKey The new primary key. @return boolean TRUE if the primary keys are different else FALSE.
[ "Compares", "two", "primary", "keys", "." ]
d0b8c3551922d696836487aa0eb1bd74014edcd4
https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/Schema/Comparator/TableComparator.php#L80-L84
194,445
fridge-project/dbal
src/Fridge/DBAL/Schema/Comparator/TableComparator.php
TableComparator.compareForeignKeys
public function compareForeignKeys(ForeignKey $oldForeignKey, ForeignKey $newForeignKey) { return ($oldForeignKey->getName() !== $newForeignKey->getName()) || ($oldForeignKey->getLocalColumnNames() !== $newForeignKey->getLocalColumnNames()) || ($oldForeignKey->getForeignTableName() !...
php
public function compareForeignKeys(ForeignKey $oldForeignKey, ForeignKey $newForeignKey) { return ($oldForeignKey->getName() !== $newForeignKey->getName()) || ($oldForeignKey->getLocalColumnNames() !== $newForeignKey->getLocalColumnNames()) || ($oldForeignKey->getForeignTableName() !...
[ "public", "function", "compareForeignKeys", "(", "ForeignKey", "$", "oldForeignKey", ",", "ForeignKey", "$", "newForeignKey", ")", "{", "return", "(", "$", "oldForeignKey", "->", "getName", "(", ")", "!==", "$", "newForeignKey", "->", "getName", "(", ")", ")",...
Compares two foreign keys. @param \Fridge\DBAL\Schema\ForeignKey $oldForeignKey The old foreign key. @param \Fridge\DBAL\Schema\ForeignKey $newForeignKey The new foreign key. @return boolean TRUE if foreign keys are different else FALSE.
[ "Compares", "two", "foreign", "keys", "." ]
d0b8c3551922d696836487aa0eb1bd74014edcd4
https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/Schema/Comparator/TableComparator.php#L94-L102
194,446
fridge-project/dbal
src/Fridge/DBAL/Schema/Comparator/TableComparator.php
TableComparator.compareIndexes
public function compareIndexes(Index $oldIndex, Index $newIndex) { return ($oldIndex->getName() !== $newIndex->getName()) || ($oldIndex->getColumnNames() !== $newIndex->getColumnNames()) || ($oldIndex->isUnique() !== $newIndex->isUnique()); }
php
public function compareIndexes(Index $oldIndex, Index $newIndex) { return ($oldIndex->getName() !== $newIndex->getName()) || ($oldIndex->getColumnNames() !== $newIndex->getColumnNames()) || ($oldIndex->isUnique() !== $newIndex->isUnique()); }
[ "public", "function", "compareIndexes", "(", "Index", "$", "oldIndex", ",", "Index", "$", "newIndex", ")", "{", "return", "(", "$", "oldIndex", "->", "getName", "(", ")", "!==", "$", "newIndex", "->", "getName", "(", ")", ")", "||", "(", "$", "oldIndex...
Compares two indexes. @param \Fridge\DBAL\Schema\Index $oldIndex The old index. @param \Fridge\DBAL\Schema\Index $newIndex The new index. @return boolean TRUE if indexes are different else FALSE.
[ "Compares", "two", "indexes", "." ]
d0b8c3551922d696836487aa0eb1bd74014edcd4
https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/Schema/Comparator/TableComparator.php#L112-L117
194,447
fridge-project/dbal
src/Fridge/DBAL/Schema/Comparator/TableComparator.php
TableComparator.compareChecks
public function compareChecks(Check $oldCheck, Check $newCheck) { return ($oldCheck->getName() !== $newCheck->getName()) || ($oldCheck->getDefinition() !== $newCheck->getDefinition()); }
php
public function compareChecks(Check $oldCheck, Check $newCheck) { return ($oldCheck->getName() !== $newCheck->getName()) || ($oldCheck->getDefinition() !== $newCheck->getDefinition()); }
[ "public", "function", "compareChecks", "(", "Check", "$", "oldCheck", ",", "Check", "$", "newCheck", ")", "{", "return", "(", "$", "oldCheck", "->", "getName", "(", ")", "!==", "$", "newCheck", "->", "getName", "(", ")", ")", "||", "(", "$", "oldCheck"...
Compares two checks. @param \Fridge\DBAL\Schema\Check $oldCheck The old check. @param \Fridge\DBAL\Schema\Check $newCheck The new check. @return boolean TRUE if checks are different else FALSE.
[ "Compares", "two", "checks", "." ]
d0b8c3551922d696836487aa0eb1bd74014edcd4
https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/Schema/Comparator/TableComparator.php#L127-L131
194,448
fridge-project/dbal
src/Fridge/DBAL/Schema/Comparator/TableComparator.php
TableComparator.detectRenamedColumns
private function detectRenamedColumns(array &$createdColumns, array &$droppedColumns, array &$alteredColumns) { foreach ($createdColumns as $createdIndex => $createdColumn) { foreach ($droppedColumns as $droppedIndex => $droppedColumn) { $columnDiff = $this->columnComparator->com...
php
private function detectRenamedColumns(array &$createdColumns, array &$droppedColumns, array &$alteredColumns) { foreach ($createdColumns as $createdIndex => $createdColumn) { foreach ($droppedColumns as $droppedIndex => $droppedColumn) { $columnDiff = $this->columnComparator->com...
[ "private", "function", "detectRenamedColumns", "(", "array", "&", "$", "createdColumns", ",", "array", "&", "$", "droppedColumns", ",", "array", "&", "$", "alteredColumns", ")", "{", "foreach", "(", "$", "createdColumns", "as", "$", "createdIndex", "=>", "$", ...
Detects and rewrites renamed columns. @param array &$createdColumns The create columns. @param array &$droppedColumns The dropped columns. @param array &$alteredColumns The altered columns.
[ "Detects", "and", "rewrites", "renamed", "columns", "." ]
d0b8c3551922d696836487aa0eb1bd74014edcd4
https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/Schema/Comparator/TableComparator.php#L207-L223
194,449
itkg/core
src/Itkg/Core/Command/DatabaseUpdate/Query.php
Query.parse
protected function parse() { $query = preg_replace('/OR\s+REPLACE/', '', $this->value); /** * @TODO : Grant parse */ if (preg_match( '/(CREATE|UPDATE|DELETE|ALTER|INSERT|DROP|SELECT|GRANT)\s+(SEQUENCE|INDEX|SYNONYM|TABLE|INTO|FROM|VIEW|)\s*([a-zA-Z-_]*)\s*/im', ...
php
protected function parse() { $query = preg_replace('/OR\s+REPLACE/', '', $this->value); /** * @TODO : Grant parse */ if (preg_match( '/(CREATE|UPDATE|DELETE|ALTER|INSERT|DROP|SELECT|GRANT)\s+(SEQUENCE|INDEX|SYNONYM|TABLE|INTO|FROM|VIEW|)\s*([a-zA-Z-_]*)\s*/im', ...
[ "protected", "function", "parse", "(", ")", "{", "$", "query", "=", "preg_replace", "(", "'/OR\\s+REPLACE/'", ",", "''", ",", "$", "this", "->", "value", ")", ";", "/**\n * @TODO : Grant parse\n */", "if", "(", "preg_match", "(", "'/(CREATE|UPDATE|...
Parse query Extract type & extra data
[ "Parse", "query", "Extract", "type", "&", "extra", "data" ]
e5e4efb05feb4d23b0df41f2b21fd095103e593b
https://github.com/itkg/core/blob/e5e4efb05feb4d23b0df41f2b21fd095103e593b/src/Itkg/Core/Command/DatabaseUpdate/Query.php#L87-L108
194,450
sndsgd/http
src/http/data/decoder/DecoderOptions.php
DecoderOptions.getMaxFileSize
public function getMaxFileSize(): int { if ($this->maxFileSize === null) { $value = ini_get("upload_max_filesize"); $units = "BKMGT"; $unit = preg_replace("/[^$units]/i", "", $value); $value = floatval($value); if ($unit) { $value *...
php
public function getMaxFileSize(): int { if ($this->maxFileSize === null) { $value = ini_get("upload_max_filesize"); $units = "BKMGT"; $unit = preg_replace("/[^$units]/i", "", $value); $value = floatval($value); if ($unit) { $value *...
[ "public", "function", "getMaxFileSize", "(", ")", ":", "int", "{", "if", "(", "$", "this", "->", "maxFileSize", "===", "null", ")", "{", "$", "value", "=", "ini_get", "(", "\"upload_max_filesize\"", ")", ";", "$", "units", "=", "\"BKMGT\"", ";", "$", "...
Retrieve the `upload_max_filesize` ini setting @return int
[ "Retrieve", "the", "upload_max_filesize", "ini", "setting" ]
e7f82010a66c6d3241a24ea82baf4593130c723b
https://github.com/sndsgd/http/blob/e7f82010a66c6d3241a24ea82baf4593130c723b/src/http/data/decoder/DecoderOptions.php#L59-L72
194,451
rawphp/RawConsole
src/RawPHP/RawConsole/Command.php
Command.init
public function init( $config = NULL ) { $option = new Option(); $option->shortCode = 'h'; $option->longCode = 'help'; $option->isOptional = TRUE; $option->type = Type::BOOLEAN; $option->shortDescription = 'Show the h...
php
public function init( $config = NULL ) { $option = new Option(); $option->shortCode = 'h'; $option->longCode = 'help'; $option->isOptional = TRUE; $option->type = Type::BOOLEAN; $option->shortDescription = 'Show the h...
[ "public", "function", "init", "(", "$", "config", "=", "NULL", ")", "{", "$", "option", "=", "new", "Option", "(", ")", ";", "$", "option", "->", "shortCode", "=", "'h'", ";", "$", "option", "->", "longCode", "=", "'help'", ";", "$", "option", "->"...
This method adds the help and verbose options to the command. You can optionally remove these options by clearing the command options array before adding your own commands. @param array $config optional configuration array
[ "This", "method", "adds", "the", "help", "and", "verbose", "options", "to", "the", "command", "." ]
602bedd10f24962305a7ac1979ed326852f4224a
https://github.com/rawphp/RawConsole/blob/602bedd10f24962305a7ac1979ed326852f4224a/src/RawPHP/RawConsole/Command.php#L98-L117
194,452
rawphp/RawConsole
src/RawPHP/RawConsole/Command.php
Command.removeOption
public function removeOption( $longCode ) { $retVal = FALSE; $i = 0; foreach ( $this->options as $option ) { if ( $longCode === $option->longCode ) { break; } $i++; } if ( $i !== count( $this->options...
php
public function removeOption( $longCode ) { $retVal = FALSE; $i = 0; foreach ( $this->options as $option ) { if ( $longCode === $option->longCode ) { break; } $i++; } if ( $i !== count( $this->options...
[ "public", "function", "removeOption", "(", "$", "longCode", ")", "{", "$", "retVal", "=", "FALSE", ";", "$", "i", "=", "0", ";", "foreach", "(", "$", "this", "->", "options", "as", "$", "option", ")", "{", "if", "(", "$", "longCode", "===", "$", ...
Removes an option by its long code. @param string $longCode option long code @return bool TRUE on success, FALSE on failure
[ "Removes", "an", "option", "by", "its", "long", "code", "." ]
602bedd10f24962305a7ac1979ed326852f4224a
https://github.com/rawphp/RawConsole/blob/602bedd10f24962305a7ac1979ed326852f4224a/src/RawPHP/RawConsole/Command.php#L150-L174
194,453
rawphp/RawConsole
src/RawPHP/RawConsole/Command.php
Command.getOption
public static function getOption( Command $command, $longCode ) { foreach ( $command->options as $op ) { if ( '--' === substr( $longCode, 0, 2 ) ) { $longCode = substr( $longCode, 2 ); } elseif ( '-' === substr( $longCode, 0, 1 ) ) ...
php
public static function getOption( Command $command, $longCode ) { foreach ( $command->options as $op ) { if ( '--' === substr( $longCode, 0, 2 ) ) { $longCode = substr( $longCode, 2 ); } elseif ( '-' === substr( $longCode, 0, 1 ) ) ...
[ "public", "static", "function", "getOption", "(", "Command", "$", "command", ",", "$", "longCode", ")", "{", "foreach", "(", "$", "command", "->", "options", "as", "$", "op", ")", "{", "if", "(", "'--'", "===", "substr", "(", "$", "longCode", ",", "0...
Gets an option either by short or long code. @param Command $command the command @param string $longCode the command name (code) @return Option the option @throws CommandException if option is not found
[ "Gets", "an", "option", "either", "by", "short", "or", "long", "code", "." ]
602bedd10f24962305a7ac1979ed326852f4224a
https://github.com/rawphp/RawConsole/blob/602bedd10f24962305a7ac1979ed326852f4224a/src/RawPHP/RawConsole/Command.php#L186-L206
194,454
Vectrex/vxPHP
src/Template/SimpleTemplate.php
SimpleTemplate.getParentTemplateFilename
public function getParentTemplateFilename() { if(empty($this->parentTemplateFilename)) { if(preg_match($this->extendRex, $this->bufferInstance->__rawContents, $matches)) { $this->parentTemplateFilename = $matches[1]; } } return $this->parentTemplateFilename; }
php
public function getParentTemplateFilename() { if(empty($this->parentTemplateFilename)) { if(preg_match($this->extendRex, $this->bufferInstance->__rawContents, $matches)) { $this->parentTemplateFilename = $matches[1]; } } return $this->parentTemplateFilename; }
[ "public", "function", "getParentTemplateFilename", "(", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "parentTemplateFilename", ")", ")", "{", "if", "(", "preg_match", "(", "$", "this", "->", "extendRex", ",", "$", "this", "->", "bufferInstance", "...
get filename of parent template @return string
[ "get", "filename", "of", "parent", "template" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Template/SimpleTemplate.php#L179-L192
194,455
Vectrex/vxPHP
src/Template/SimpleTemplate.php
SimpleTemplate.assign
public function assign($var, $value = null) { $invalidProperties = ['__rawContents']; if(is_array($var)) { foreach($var as $k => $v) { if(in_array($k, $invalidProperties)) { throw new SimpleTemplateException("Tried to assign invalid property '%s'", $k); } $this->buff...
php
public function assign($var, $value = null) { $invalidProperties = ['__rawContents']; if(is_array($var)) { foreach($var as $k => $v) { if(in_array($k, $invalidProperties)) { throw new SimpleTemplateException("Tried to assign invalid property '%s'", $k); } $this->buff...
[ "public", "function", "assign", "(", "$", "var", ",", "$", "value", "=", "null", ")", "{", "$", "invalidProperties", "=", "[", "'__rawContents'", "]", ";", "if", "(", "is_array", "(", "$", "var", ")", ")", "{", "foreach", "(", "$", "var", "as", "$"...
assign value to variable, which is then available within template @param string | array $var @param mixed $value @return SimpleTemplate @throws SimpleTemplateException
[ "assign", "value", "to", "variable", "which", "is", "then", "available", "within", "template" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Template/SimpleTemplate.php#L227-L249
194,456
Vectrex/vxPHP
src/Template/SimpleTemplate.php
SimpleTemplate.blockFilter
public function blockFilter($filterId) { if(!in_array($filterId, $this->blockedFilters)) { $this->blockedFilters[] = $filterId; } return $this; }
php
public function blockFilter($filterId) { if(!in_array($filterId, $this->blockedFilters)) { $this->blockedFilters[] = $filterId; } return $this; }
[ "public", "function", "blockFilter", "(", "$", "filterId", ")", "{", "if", "(", "!", "in_array", "(", "$", "filterId", ",", "$", "this", "->", "blockedFilters", ")", ")", "{", "$", "this", "->", "blockedFilters", "[", "]", "=", "$", "filterId", ";", ...
block a pre-configured filter @param string $filterId @return $this
[ "block", "a", "pre", "-", "configured", "filter" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Template/SimpleTemplate.php#L271-L279
194,457
Vectrex/vxPHP
src/Template/SimpleTemplate.php
SimpleTemplate.display
public function display($defaultFilters = null) { $this->extend(); $this->fillBuffer(); // check whether pre-configured filters are already in place if(is_null($defaultFilters)) { // add default filters $this->defaultFilters = [ new AnchorHref(), new ImageCache(), // new AssetsPath() ...
php
public function display($defaultFilters = null) { $this->extend(); $this->fillBuffer(); // check whether pre-configured filters are already in place if(is_null($defaultFilters)) { // add default filters $this->defaultFilters = [ new AnchorHref(), new ImageCache(), // new AssetsPath() ...
[ "public", "function", "display", "(", "$", "defaultFilters", "=", "null", ")", "{", "$", "this", "->", "extend", "(", ")", ";", "$", "this", "->", "fillBuffer", "(", ")", ";", "// check whether pre-configured filters are already in place", "if", "(", "is_null", ...
output parsed template @param SimpleTemplateFilterInterface [] @return string @throws SimpleTemplateException @throws \vxPHP\Application\Exception\ApplicationException
[ "output", "parsed", "template" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Template/SimpleTemplate.php#L289-L366
194,458
Vectrex/vxPHP
src/Template/SimpleTemplate.php
SimpleTemplate.extend
private function extend() { if(preg_match($this->extendRex, $this->bufferInstance->__rawContents, $matches)) { $blockRegExp = '~<!--\s*\{\s*block\s*:\s*' . $matches[2] . '\s*\}\s*-->~'; $extendedContent = file_get_contents(Application::getInstance()->getRootPath() . (defined('TPL_PATH') ? str_replace('/', DI...
php
private function extend() { if(preg_match($this->extendRex, $this->bufferInstance->__rawContents, $matches)) { $blockRegExp = '~<!--\s*\{\s*block\s*:\s*' . $matches[2] . '\s*\}\s*-->~'; $extendedContent = file_get_contents(Application::getInstance()->getRootPath() . (defined('TPL_PATH') ? str_replace('/', DI...
[ "private", "function", "extend", "(", ")", "{", "if", "(", "preg_match", "(", "$", "this", "->", "extendRex", ",", "$", "this", "->", "bufferInstance", "->", "__rawContents", ",", "$", "matches", ")", ")", "{", "$", "blockRegExp", "=", "'~<!--\\s*\\{\\s*bl...
allow extension of a parent template with current template searches in current rawContents for <!-- { extend: parent_template.php @ content_block } --> and in template to extend for <!-- { block: content_block } --> current rawContents is then replaced by parent rawContents with current rawContents filled in @throws...
[ "allow", "extension", "of", "a", "parent", "template", "with", "current", "template" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Template/SimpleTemplate.php#L381-L407
194,459
Vectrex/vxPHP
src/Template/SimpleTemplate.php
SimpleTemplate.applyFilters
private function applyFilters() { // handle default and pre-configured filters first foreach($this->defaultFilters as $f) { $f->apply($this->contents); } // handle added custom filters last foreach($this->filters as $f) { $f->apply($this->contents); } }
php
private function applyFilters() { // handle default and pre-configured filters first foreach($this->defaultFilters as $f) { $f->apply($this->contents); } // handle added custom filters last foreach($this->filters as $f) { $f->apply($this->contents); } }
[ "private", "function", "applyFilters", "(", ")", "{", "// handle default and pre-configured filters first", "foreach", "(", "$", "this", "->", "defaultFilters", "as", "$", "f", ")", "{", "$", "f", "->", "apply", "(", "$", "this", "->", "contents", ")", ";", ...
applies all stacked filters to template before output
[ "applies", "all", "stacked", "filters", "to", "template", "before", "output" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Template/SimpleTemplate.php#L412-L426
194,460
Vectrex/vxPHP
src/Template/SimpleTemplate.php
SimpleTemplate.fillBuffer
private function fillBuffer() { // wrap bufferInstance in closure to allow the use of $this in template $closure = function($outer) { ob_start(); /* @deprecated use $this when accessing assigned variables */ $tpl = $this; eval('?>' . $this->__rawContents);...
php
private function fillBuffer() { // wrap bufferInstance in closure to allow the use of $this in template $closure = function($outer) { ob_start(); /* @deprecated use $this when accessing assigned variables */ $tpl = $this; eval('?>' . $this->__rawContents);...
[ "private", "function", "fillBuffer", "(", ")", "{", "// wrap bufferInstance in closure to allow the use of $this in template", "$", "closure", "=", "function", "(", "$", "outer", ")", "{", "ob_start", "(", ")", ";", "/* @deprecated use $this when accessing assigned variables ...
fetches template file and evals content immediate output supressed by output buffering
[ "fetches", "template", "file", "and", "evals", "content", "immediate", "output", "supressed", "by", "output", "buffering" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Template/SimpleTemplate.php#L432-L453
194,461
fridge-project/dbal
src/Fridge/DBAL/SchemaManager/SQLCollector/DropTableSQLCollector.php
DropTableSQLCollector.collect
public function collect(Table $table) { foreach ($table->getForeignKeys() as $foreignKey) { $this->dropForeignKeyQueries = array_merge( $this->dropForeignKeyQueries, $this->platform->getDropForeignKeySQLQueries($foreignKey, $table->getName()) ); ...
php
public function collect(Table $table) { foreach ($table->getForeignKeys() as $foreignKey) { $this->dropForeignKeyQueries = array_merge( $this->dropForeignKeyQueries, $this->platform->getDropForeignKeySQLQueries($foreignKey, $table->getName()) ); ...
[ "public", "function", "collect", "(", "Table", "$", "table", ")", "{", "foreach", "(", "$", "table", "->", "getForeignKeys", "(", ")", "as", "$", "foreignKey", ")", "{", "$", "this", "->", "dropForeignKeyQueries", "=", "array_merge", "(", "$", "this", "-...
Collects queries to drop tables. @param \Fridge\DBAL\Schema\Table $table The table.
[ "Collects", "queries", "to", "drop", "tables", "." ]
d0b8c3551922d696836487aa0eb1bd74014edcd4
https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/SchemaManager/SQLCollector/DropTableSQLCollector.php#L83-L96
194,462
Erebot/URI
src/URI.php
URI.parseURI
protected function parseURI($uri, $relative) { $result = array(); if (!$relative) { // Parse scheme. $pos = strpos($uri, ':'); if (!$pos) { // An URI starting with ":" is also invalid. throw new \InvalidArgumentException('No scheme...
php
protected function parseURI($uri, $relative) { $result = array(); if (!$relative) { // Parse scheme. $pos = strpos($uri, ':'); if (!$pos) { // An URI starting with ":" is also invalid. throw new \InvalidArgumentException('No scheme...
[ "protected", "function", "parseURI", "(", "$", "uri", ",", "$", "relative", ")", "{", "$", "result", "=", "array", "(", ")", ";", "if", "(", "!", "$", "relative", ")", "{", "// Parse scheme.", "$", "pos", "=", "strpos", "(", "$", "uri", ",", "':'",...
Parses an URI using the grammar defined in RFC 3986. \param string $uri URI to parse. \param bool $relative Whether $uri must be considered as an absolute URI (\b false) or a relative reference (\b true). \retval array An associative array containing the different components that could be parsed out of this URI. It ...
[ "Parses", "an", "URI", "using", "the", "grammar", "defined", "in", "RFC", "3986", "." ]
f8277882f1251da9a9acb69ae04777e377e02ce8
https://github.com/Erebot/URI/blob/f8277882f1251da9a9acb69ae04777e377e02ce8/src/URI.php#L136-L207
194,463
Erebot/URI
src/URI.php
URI.normalizePercentReal
public static function normalizePercentReal($hexchr) { // 6.2.2.1. Case Normalization // Percent-encoded characters must use uppercase letters. // 6.2.2.2. Percent-Encoding Normalization $unreserved = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'. 'abcdefghijklmnopqrstuvwx...
php
public static function normalizePercentReal($hexchr) { // 6.2.2.1. Case Normalization // Percent-encoded characters must use uppercase letters. // 6.2.2.2. Percent-Encoding Normalization $unreserved = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'. 'abcdefghijklmnopqrstuvwx...
[ "public", "static", "function", "normalizePercentReal", "(", "$", "hexchr", ")", "{", "// 6.2.2.1. Case Normalization", "// Percent-encoded characters must use uppercase letters.", "// 6.2.2.2. Percent-Encoding Normalization", "$", "unreserved", "=", "'ABCDEFGHIJKLMNOPQRSTUVWXYZ'", ...
Performs normalization of a percent-encoded character. \param string $hexchr One percent-encoded character that needs to be normalized. \retval string The same text, after percent-encoding normalization.
[ "Performs", "normalization", "of", "a", "percent", "-", "encoded", "character", "." ]
f8277882f1251da9a9acb69ae04777e377e02ce8
https://github.com/Erebot/URI/blob/f8277882f1251da9a9acb69ae04777e377e02ce8/src/URI.php#L241-L255
194,464
Erebot/URI
src/URI.php
URI.merge
protected function merge($path) { // 5.2.3. Merge Paths if ($this->host !== null && $this->path == '') { return '/'.$path; } $pos = strrpos($this->path, '/'); if ($pos === false) { return $path; } return substr($this->path, 0, $pos + ...
php
protected function merge($path) { // 5.2.3. Merge Paths if ($this->host !== null && $this->path == '') { return '/'.$path; } $pos = strrpos($this->path, '/'); if ($pos === false) { return $path; } return substr($this->path, 0, $pos + ...
[ "protected", "function", "merge", "(", "$", "path", ")", "{", "// 5.2.3. Merge Paths", "if", "(", "$", "this", "->", "host", "!==", "null", "&&", "$", "this", "->", "path", "==", "''", ")", "{", "return", "'/'", ".", "$", "path", ";", "}", "$", "p...
Merges the given path with the current URI's path. \param string $path Path to merge into the current path. \retval string Result of that merge. \note Despite its name, this method does not modify the given $path nor the current object.
[ "Merges", "the", "given", "path", "with", "the", "current", "URI", "s", "path", "." ]
f8277882f1251da9a9acb69ae04777e377e02ce8
https://github.com/Erebot/URI/blob/f8277882f1251da9a9acb69ae04777e377e02ce8/src/URI.php#L539-L551
194,465
Erebot/URI
src/URI.php
URI.validatePath
protected function validatePath($path, $relative) { /* path = path-abempty ; begins with "/" or is empty / path-absolute ; begins with "/" but not "//" / path-noscheme ; begins with a non-colon segment / path-rootless ...
php
protected function validatePath($path, $relative) { /* path = path-abempty ; begins with "/" or is empty / path-absolute ; begins with "/" but not "//" / path-noscheme ; begins with a non-colon segment / path-rootless ...
[ "protected", "function", "validatePath", "(", "$", "path", ",", "$", "relative", ")", "{", "/*\n path = path-abempty ; begins with \"/\" or is empty\n / path-absolute ; begins with \"/\" but not \"//\"\n / path-noscheme ; begins ...
Validates the given path. \param string $path Path to validate. \param bool $relative Whether the given $path is relative (\b true) or not (\b false). \retval bool \b true if the given $path is valid, \b false otherwise.
[ "Validates", "the", "given", "path", "." ]
f8277882f1251da9a9acb69ae04777e377e02ce8
https://github.com/Erebot/URI/blob/f8277882f1251da9a9acb69ae04777e377e02ce8/src/URI.php#L579-L629
194,466
Erebot/URI
src/URI.php
URI.realSetPath
protected function realSetPath($path, $relative) { if (!is_string($path) || !$this->validatePath($path, $relative)) { throw new \InvalidArgumentException( 'Invalid path; use relative() for relative paths' ); } $this->path = $path; }
php
protected function realSetPath($path, $relative) { if (!is_string($path) || !$this->validatePath($path, $relative)) { throw new \InvalidArgumentException( 'Invalid path; use relative() for relative paths' ); } $this->path = $path; }
[ "protected", "function", "realSetPath", "(", "$", "path", ",", "$", "relative", ")", "{", "if", "(", "!", "is_string", "(", "$", "path", ")", "||", "!", "$", "this", "->", "validatePath", "(", "$", "path", ",", "$", "relative", ")", ")", "{", "thro...
Sets the current URI's path. \param string $path New path for this URI. \param bool $relative Whether the given $path is relative (\b true) or not (\b false). \throw ::InvalidArgumentException The given $path is not valid.
[ "Sets", "the", "current", "URI", "s", "path", "." ]
f8277882f1251da9a9acb69ae04777e377e02ce8
https://github.com/Erebot/URI/blob/f8277882f1251da9a9acb69ae04777e377e02ce8/src/URI.php#L644-L652
194,467
BenGorUser/DoctrineODMMongoDBBridge
src/BenGorUser/DoctrineODMMongoDBBridge/Infrastructure/Persistence/DocumentManagerFactory.php
DocumentManagerFactory.build
public function build(Connection $aConnection = null) { Type::addType('user_email', UserEmailType::class); Type::addType('user_id', UserIdType::class); Type::addType('user_password', UserPasswordType::class); Type::addType('user_roles', UserRolesType::class); Type::addType('u...
php
public function build(Connection $aConnection = null) { Type::addType('user_email', UserEmailType::class); Type::addType('user_id', UserIdType::class); Type::addType('user_password', UserPasswordType::class); Type::addType('user_roles', UserRolesType::class); Type::addType('u...
[ "public", "function", "build", "(", "Connection", "$", "aConnection", "=", "null", ")", "{", "Type", "::", "addType", "(", "'user_email'", ",", "UserEmailType", "::", "class", ")", ";", "Type", "::", "addType", "(", "'user_id'", ",", "UserIdType", "::", "c...
Creates an document manager instance enabling mappings and custom types. @param Connection|null $aConnection The MongoDB connection, it can be null @return DocumentManager
[ "Creates", "an", "document", "manager", "instance", "enabling", "mappings", "and", "custom", "types", "." ]
be1ef0641ab179ef429388cef81c287f33a61108
https://github.com/BenGorUser/DoctrineODMMongoDBBridge/blob/be1ef0641ab179ef429388cef81c287f33a61108/src/BenGorUser/DoctrineODMMongoDBBridge/Infrastructure/Persistence/DocumentManagerFactory.php#L40-L57
194,468
agentmedia/phine-core
src/Core/Logic/Access/Backend/GroupFinder.php
GroupFinder.FindContentGroup
static function FindContentGroup(Content $content) { $result = null; $currContent = $content; do { $result = $currContent->GetUserGroup(); $currContent = ContentTreeUtil::ParentOf($currContent); } while (!$result && $currContent); if (...
php
static function FindContentGroup(Content $content) { $result = null; $currContent = $content; do { $result = $currContent->GetUserGroup(); $currContent = ContentTreeUtil::ParentOf($currContent); } while (!$result && $currContent); if (...
[ "static", "function", "FindContentGroup", "(", "Content", "$", "content", ")", "{", "$", "result", "=", "null", ";", "$", "currContent", "=", "$", "content", ";", "do", "{", "$", "result", "=", "$", "currContent", "->", "GetUserGroup", "(", ")", ";", "...
Finds the user group by searching in element tree @param Content $content The content @return Usergroup The assigned user group
[ "Finds", "the", "user", "group", "by", "searching", "in", "element", "tree" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Logic/Access/Backend/GroupFinder.php#L19-L34
194,469
agentmedia/phine-core
src/Core/Logic/Access/Backend/GroupFinder.php
GroupFinder.GetUpperContentGroup
private static function GetUpperContentGroup(Content $content) { if ($content->GetPageContent()) { return self::FindPageGroup($content->GetPageContent()->GetPage()); } else if ($content->GetLayoutContent()) { return $content->GetLayoutContent()-> ...
php
private static function GetUpperContentGroup(Content $content) { if ($content->GetPageContent()) { return self::FindPageGroup($content->GetPageContent()->GetPage()); } else if ($content->GetLayoutContent()) { return $content->GetLayoutContent()-> ...
[ "private", "static", "function", "GetUpperContentGroup", "(", "Content", "$", "content", ")", "{", "if", "(", "$", "content", "->", "GetPageContent", "(", ")", ")", "{", "return", "self", "::", "FindPageGroup", "(", "$", "content", "->", "GetPageContent", "(...
Gets the upper countent user group @param Content $content The content @return Usergroup Gets the content rights of the upper, containing element (layout, page, container)
[ "Gets", "the", "upper", "countent", "user", "group" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Logic/Access/Backend/GroupFinder.php#L41-L58
194,470
agentmedia/phine-core
src/Core/Logic/Access/Backend/GroupFinder.php
GroupFinder.FindPageGroup
static function FindPageGroup(Page $page) { $currPage = $page; $result = null; do { $result = $currPage->GetUserGroup(); $currPage = $currPage->GetParent(); } while (!$result && $currPage); if (!$result && $page->GetSite()) { ...
php
static function FindPageGroup(Page $page) { $currPage = $page; $result = null; do { $result = $currPage->GetUserGroup(); $currPage = $currPage->GetParent(); } while (!$result && $currPage); if (!$result && $page->GetSite()) { ...
[ "static", "function", "FindPageGroup", "(", "Page", "$", "page", ")", "{", "$", "currPage", "=", "$", "page", ";", "$", "result", "=", "null", ";", "do", "{", "$", "result", "=", "$", "currPage", "->", "GetUserGroup", "(", ")", ";", "$", "currPage", ...
Gets the page's user group @param Page $page @return Usergroup
[ "Gets", "the", "page", "s", "user", "group" ]
38c1be8d03ebffae950d00a96da3c612aff67832
https://github.com/agentmedia/phine-core/blob/38c1be8d03ebffae950d00a96da3c612aff67832/src/Core/Logic/Access/Backend/GroupFinder.php#L65-L80
194,471
ibonly/Potato-ORM
src/Helper/GetData.php
GetData.DESC
protected function DESC($limit = NULL) { $value = array_reverse($this->value); if ($limit === NULL) { return $value; } else { return array_slice($value, 0, $limit); } }
php
protected function DESC($limit = NULL) { $value = array_reverse($this->value); if ($limit === NULL) { return $value; } else { return array_slice($value, 0, $limit); } }
[ "protected", "function", "DESC", "(", "$", "limit", "=", "NULL", ")", "{", "$", "value", "=", "array_reverse", "(", "$", "this", "->", "value", ")", ";", "if", "(", "$", "limit", "===", "NULL", ")", "{", "return", "$", "value", ";", "}", "else", ...
Reverse the json data @param [int] $limit
[ "Reverse", "the", "json", "data" ]
644962a99e1c0191b732d7729cd466d52c5d8652
https://github.com/ibonly/Potato-ORM/blob/644962a99e1c0191b732d7729cd466d52c5d8652/src/Helper/GetData.php#L28-L36
194,472
ibonly/Potato-ORM
src/Helper/GetData.php
GetData.toJson
public function toJson($all = false) { return $all ? json_encode($this->getAllData()) : json_encode($this->toArray()); }
php
public function toJson($all = false) { return $all ? json_encode($this->getAllData()) : json_encode($this->toArray()); }
[ "public", "function", "toJson", "(", "$", "all", "=", "false", ")", "{", "return", "$", "all", "?", "json_encode", "(", "$", "this", "->", "getAllData", "(", ")", ")", ":", "json_encode", "(", "$", "this", "->", "toArray", "(", ")", ")", ";", "}" ]
Convert the fetched row to json
[ "Convert", "the", "fetched", "row", "to", "json" ]
644962a99e1c0191b732d7729cd466d52c5d8652
https://github.com/ibonly/Potato-ORM/blob/644962a99e1c0191b732d7729cd466d52c5d8652/src/Helper/GetData.php#L66-L69
194,473
Polosa/shade-framework-core
app/Controller.php
Controller.render
protected function render($templates, array $data = array()) { $content = $this->view->render($templates, $data); $response = new Response(); $response->setContent($content); return $response; }
php
protected function render($templates, array $data = array()) { $content = $this->view->render($templates, $data); $response = new Response(); $response->setContent($content); return $response; }
[ "protected", "function", "render", "(", "$", "templates", ",", "array", "$", "data", "=", "array", "(", ")", ")", "{", "$", "content", "=", "$", "this", "->", "view", "->", "render", "(", "$", "templates", ",", "$", "data", ")", ";", "$", "response...
Render template and get Response @param string|array $templates Path to template or array of paths to template and layouts @param array $data Data for templates @return \Shade\Response
[ "Render", "template", "and", "get", "Response" ]
d735d3e8e0616fb9cf4ffc25b8425762ed07940f
https://github.com/Polosa/shade-framework-core/blob/d735d3e8e0616fb9cf4ffc25b8425762ed07940f/app/Controller.php#L188-L195
194,474
phossa/phossa-di
src/Phossa/Di/Definition/Reference/ReferenceActionTrait.php
ReferenceActionTrait.dereferenceArray
protected function dereferenceArray(array &$arrayData) { try { foreach ($arrayData as $idx => $data) { // go deeper if is array if (is_array($data)) { $this->dereferenceArray($arrayData[$idx]); // dereference if it is a referen...
php
protected function dereferenceArray(array &$arrayData) { try { foreach ($arrayData as $idx => $data) { // go deeper if is array if (is_array($data)) { $this->dereferenceArray($arrayData[$idx]); // dereference if it is a referen...
[ "protected", "function", "dereferenceArray", "(", "array", "&", "$", "arrayData", ")", "{", "try", "{", "foreach", "(", "$", "arrayData", "as", "$", "idx", "=>", "$", "data", ")", "{", "// go deeper if is array", "if", "(", "is_array", "(", "$", "data", ...
Replace all the references in the array with values @param array &$arrayData @return void @throws LogicException if something goes wrong @access protected
[ "Replace", "all", "the", "references", "in", "the", "array", "with", "values" ]
bbe1e95b081068e2bc49c6cd465f38aab0374be5
https://github.com/phossa/phossa-di/blob/bbe1e95b081068e2bc49c6cd465f38aab0374be5/src/Phossa/Di/Definition/Reference/ReferenceActionTrait.php#L47-L63
194,475
phossa/phossa-di
src/Phossa/Di/Definition/Reference/ReferenceActionTrait.php
ReferenceActionTrait.getReferenceValue
protected function getReferenceValue( ReferenceAbstract $reference, /*# int */ $level = 0 ) { $name = $reference->getName(); // loop found if ($level > 2) { throw new NotFoundException( Message::get(Message::PARAMETER_LOOP_FOUND, $name), ...
php
protected function getReferenceValue( ReferenceAbstract $reference, /*# int */ $level = 0 ) { $name = $reference->getName(); // loop found if ($level > 2) { throw new NotFoundException( Message::get(Message::PARAMETER_LOOP_FOUND, $name), ...
[ "protected", "function", "getReferenceValue", "(", "ReferenceAbstract", "$", "reference", ",", "/*# int */", "$", "level", "=", "0", ")", "{", "$", "name", "=", "$", "reference", "->", "getName", "(", ")", ";", "// loop found", "if", "(", "$", "level", ">"...
Get the reference value @param ReferenceAbstract $reference @param int $level current recursive level @return mixed @access protected
[ "Get", "the", "reference", "value" ]
bbe1e95b081068e2bc49c6cd465f38aab0374be5
https://github.com/phossa/phossa-di/blob/bbe1e95b081068e2bc49c6cd465f38aab0374be5/src/Phossa/Di/Definition/Reference/ReferenceActionTrait.php#L73-L99
194,476
phossa/phossa-di
src/Phossa/Di/Definition/Reference/ReferenceActionTrait.php
ReferenceActionTrait.isReference
protected function isReference($data) { // is a reference object if (is_object($data) && $data instanceof ReferenceAbstract) { return $data; // is string and matches reference pattern } elseif (is_string($data)) { $pat = '/^(@|%)([^\s]+)\1$/'; $ma...
php
protected function isReference($data) { // is a reference object if (is_object($data) && $data instanceof ReferenceAbstract) { return $data; // is string and matches reference pattern } elseif (is_string($data)) { $pat = '/^(@|%)([^\s]+)\1$/'; $ma...
[ "protected", "function", "isReference", "(", "$", "data", ")", "{", "// is a reference object", "if", "(", "is_object", "(", "$", "data", ")", "&&", "$", "data", "instanceof", "ReferenceAbstract", ")", "{", "return", "$", "data", ";", "// is string and matches r...
Is a reference string or reference object. convert to object @param mixed $data data to check @return ReferenceAbstract|false @access protected
[ "Is", "a", "reference", "string", "or", "reference", "object", ".", "convert", "to", "object" ]
bbe1e95b081068e2bc49c6cd465f38aab0374be5
https://github.com/phossa/phossa-di/blob/bbe1e95b081068e2bc49c6cd465f38aab0374be5/src/Phossa/Di/Definition/Reference/ReferenceActionTrait.php#L108-L142
194,477
nice-php/benchmark
src/Benchmark.php
Benchmark.execute
public function execute() { $this->resultPrinter->printBenchmarkIntro($this); $results = array(); foreach ($this->tests as $test) { $testResults = array(); for ($i = 0; $i < $this->iterations; $i++) { $start = time() + microtime(); $te...
php
public function execute() { $this->resultPrinter->printBenchmarkIntro($this); $results = array(); foreach ($this->tests as $test) { $testResults = array(); for ($i = 0; $i < $this->iterations; $i++) { $start = time() + microtime(); $te...
[ "public", "function", "execute", "(", ")", "{", "$", "this", "->", "resultPrinter", "->", "printBenchmarkIntro", "(", "$", "this", ")", ";", "$", "results", "=", "array", "(", ")", ";", "foreach", "(", "$", "this", "->", "tests", "as", "$", "test", "...
Execute the registered tests and display the results
[ "Execute", "the", "registered", "tests", "and", "display", "the", "results" ]
2084c77dbb88cd76006abbfe85b2b704f6bbd1cf
https://github.com/nice-php/benchmark/blob/2084c77dbb88cd76006abbfe85b2b704f6bbd1cf/src/Benchmark.php#L79-L102
194,478
dmitrya2e/filtration-bundle
CallableFunction/Validator/BaseFunctionValidator.php
BaseFunctionValidator.doValidate
protected function doValidate() { if ($this->argumentTypes === false) { throw new CallableFunctionValidatorException('Variable $argumentTypes must be defined.'); } $argumentCount = count($this->argumentTypes); $reflectionFunction = new \ReflectionFunction($this-...
php
protected function doValidate() { if ($this->argumentTypes === false) { throw new CallableFunctionValidatorException('Variable $argumentTypes must be defined.'); } $argumentCount = count($this->argumentTypes); $reflectionFunction = new \ReflectionFunction($this-...
[ "protected", "function", "doValidate", "(", ")", "{", "if", "(", "$", "this", "->", "argumentTypes", "===", "false", ")", "{", "throw", "new", "CallableFunctionValidatorException", "(", "'Variable $argumentTypes must be defined.'", ")", ";", "}", "$", "argumentCount...
Validates callable function arguments. @throws CallableFunctionValidatorException @throws \InvalidArgumentException
[ "Validates", "callable", "function", "arguments", "." ]
fed5764af4e43871835744fb84957b2a76e9a215
https://github.com/dmitrya2e/filtration-bundle/blob/fed5764af4e43871835744fb84957b2a76e9a215/CallableFunction/Validator/BaseFunctionValidator.php#L106-L151
194,479
ValkSystems/bootbuilder
src/bootbuilder/Validation/Validator.php
Validator.save
public static function save($form, $formid, $prepare = true) { if($prepare) { self::prepareSession(); } // Save in session $_SESSION['bbforms'][$formid] = $form; }
php
public static function save($form, $formid, $prepare = true) { if($prepare) { self::prepareSession(); } // Save in session $_SESSION['bbforms'][$formid] = $form; }
[ "public", "static", "function", "save", "(", "$", "form", ",", "$", "formid", ",", "$", "prepare", "=", "true", ")", "{", "if", "(", "$", "prepare", ")", "{", "self", "::", "prepareSession", "(", ")", ";", "}", "// Save in session", "$", "_SESSION", ...
Save Form into session, and prepare it for validation later on @param \bootbuilder\Form $form @param int $formid @param boolean $prepare prepare the sesison, false on unittesting
[ "Save", "Form", "into", "session", "and", "prepare", "it", "for", "validation", "later", "on" ]
7601a403f42eba47ce4cf02a3c852d5196b1d860
https://github.com/ValkSystems/bootbuilder/blob/7601a403f42eba47ce4cf02a3c852d5196b1d860/src/bootbuilder/Validation/Validator.php#L21-L28
194,480
ValkSystems/bootbuilder
src/bootbuilder/Validation/Validator.php
Validator.load
public function load($parameters, $prepare = true) { $this->parameters = $parameters; if($prepare) { $this->prepareSession(); } if (isset($parameters['bootbuilder-form']) && isset($_SESSION['bbforms']) && isset($_SESSION['bbforms'][$parameters['bootbuilder-form']])) { ...
php
public function load($parameters, $prepare = true) { $this->parameters = $parameters; if($prepare) { $this->prepareSession(); } if (isset($parameters['bootbuilder-form']) && isset($_SESSION['bbforms']) && isset($_SESSION['bbforms'][$parameters['bootbuilder-form']])) { ...
[ "public", "function", "load", "(", "$", "parameters", ",", "$", "prepare", "=", "true", ")", "{", "$", "this", "->", "parameters", "=", "$", "parameters", ";", "if", "(", "$", "prepare", ")", "{", "$", "this", "->", "prepareSession", "(", ")", ";", ...
Load previous form from session @param array $parameters POST/GET parameters array @param boolean $prepare Prepare session, false on unittesting @return \bootbuilder\Validation\Validator
[ "Load", "previous", "form", "from", "session" ]
7601a403f42eba47ce4cf02a3c852d5196b1d860
https://github.com/ValkSystems/bootbuilder/blob/7601a403f42eba47ce4cf02a3c852d5196b1d860/src/bootbuilder/Validation/Validator.php#L36-L54
194,481
ValkSystems/bootbuilder
src/bootbuilder/Validation/Validator.php
Validator.validate
public function validate() { $status = new ValidationResult(); // Check if the form is loaded if (!$this->form instanceof \bootbuilder\Form) { $status->setError(true); return $status; } // Validate form controls (and panes) foreach ($this->form->...
php
public function validate() { $status = new ValidationResult(); // Check if the form is loaded if (!$this->form instanceof \bootbuilder\Form) { $status->setError(true); return $status; } // Validate form controls (and panes) foreach ($this->form->...
[ "public", "function", "validate", "(", ")", "{", "$", "status", "=", "new", "ValidationResult", "(", ")", ";", "// Check if the form is loaded", "if", "(", "!", "$", "this", "->", "form", "instanceof", "\\", "bootbuilder", "\\", "Form", ")", "{", "$", "sta...
Validate the form controls, validates by the required status, and some specific control validations such as email control @return \bootbuilder\Validation\ValidationResult
[ "Validate", "the", "form", "controls", "validates", "by", "the", "required", "status", "and", "some", "specific", "control", "validations", "such", "as", "email", "control" ]
7601a403f42eba47ce4cf02a3c852d5196b1d860
https://github.com/ValkSystems/bootbuilder/blob/7601a403f42eba47ce4cf02a3c852d5196b1d860/src/bootbuilder/Validation/Validator.php#L61-L81
194,482
SlaxWeb/Hooks
src/Hook.php
Hook.create
public function create(string $name, callable $definition) { $this->_name = $name; $this->_definition = $definition; }
php
public function create(string $name, callable $definition) { $this->_name = $name; $this->_definition = $definition; }
[ "public", "function", "create", "(", "string", "$", "name", ",", "callable", "$", "definition", ")", "{", "$", "this", "->", "_name", "=", "$", "name", ";", "$", "this", "->", "_definition", "=", "$", "definition", ";", "}" ]
Create the Hook Create the hook by adding its name and definition to the protected properties. @param string $name Name of the hook @param callable $definition Definition of the hook @return void
[ "Create", "the", "Hook" ]
678f4d5425c27e0dd2a61b68d59bfb2793955b91
https://github.com/SlaxWeb/Hooks/blob/678f4d5425c27e0dd2a61b68d59bfb2793955b91/src/Hook.php#L69-L73
194,483
Wedeto/DB
src/Query/UpdateField.php
UpdateField.toSQL
public function toSQL(Parameters $params, bool $inner_clause) { $drv = $params->getDriver(); $fieldname = $drv->toSQL($params, $this->getField()); $value = $drv->toSQL($params, $this->getValue()); return $fieldname . ' = ' . $value; }
php
public function toSQL(Parameters $params, bool $inner_clause) { $drv = $params->getDriver(); $fieldname = $drv->toSQL($params, $this->getField()); $value = $drv->toSQL($params, $this->getValue()); return $fieldname . ' = ' . $value; }
[ "public", "function", "toSQL", "(", "Parameters", "$", "params", ",", "bool", "$", "inner_clause", ")", "{", "$", "drv", "=", "$", "params", "->", "getDriver", "(", ")", ";", "$", "fieldname", "=", "$", "drv", "->", "toSQL", "(", "$", "params", ",", ...
Write a update assignment as SQL query syntax @param Parameters $params THe query parameters: tables and placeholder values @param UpdateField $update The field to update and the new value @param bool $inner_clause Unused @return string The generated SQL
[ "Write", "a", "update", "assignment", "as", "SQL", "query", "syntax" ]
715f8f2e3ae6b53c511c40b620921cb9c87e6f62
https://github.com/Wedeto/DB/blob/715f8f2e3ae6b53c511c40b620921cb9c87e6f62/src/Query/UpdateField.php#L71-L78
194,484
cubicmushroom/valueobjects
src/Web/QueryString.php
QueryString.toDictionary
public function toDictionary() { $value = \ltrim($this->toNative(), '?'); \parse_str($value, $data); return Dictionary::fromNative($data); }
php
public function toDictionary() { $value = \ltrim($this->toNative(), '?'); \parse_str($value, $data); return Dictionary::fromNative($data); }
[ "public", "function", "toDictionary", "(", ")", "{", "$", "value", "=", "\\", "ltrim", "(", "$", "this", "->", "toNative", "(", ")", ",", "'?'", ")", ";", "\\", "parse_str", "(", "$", "value", ",", "$", "data", ")", ";", "return", "Dictionary", "::...
Returns a Dictionary structured representation of the query string @return Dictionary
[ "Returns", "a", "Dictionary", "structured", "representation", "of", "the", "query", "string" ]
4554239ab75d65eeb9773219aa5b07e9fbfabb92
https://github.com/cubicmushroom/valueobjects/blob/4554239ab75d65eeb9773219aa5b07e9fbfabb92/src/Web/QueryString.php#L30-L36
194,485
Vectrex/vxPHP
src/Observer/EventDispatcher.php
EventDispatcher.removeSubscriber
public function removeSubscriber(SubscriberInterface $instance) { // check for object hash if(FALSE !== ($pos = array_search(spl_object_hash($instance), $this->registeredHashes))) { // remove instance from registry before re-inserting unset($this->registeredHashes[$pos]); foreach($instance::getEv...
php
public function removeSubscriber(SubscriberInterface $instance) { // check for object hash if(FALSE !== ($pos = array_search(spl_object_hash($instance), $this->registeredHashes))) { // remove instance from registry before re-inserting unset($this->registeredHashes[$pos]); foreach($instance::getEv...
[ "public", "function", "removeSubscriber", "(", "SubscriberInterface", "$", "instance", ")", "{", "// check for object hash", "if", "(", "FALSE", "!==", "(", "$", "pos", "=", "array_search", "(", "spl_object_hash", "(", "$", "instance", ")", ",", "$", "this", "...
remove a subscriber from the registry @param SubscriberInterface $instance
[ "remove", "a", "subscriber", "from", "the", "registry" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Observer/EventDispatcher.php#L91-L118
194,486
Vectrex/vxPHP
src/Observer/EventDispatcher.php
EventDispatcher.addSubscriber
public function addSubscriber(SubscriberInterface $instance) { // make sure that an already registered object is removed before re-registering $this->removeSubscriber($instance); // register object hash $this->registeredHashes[] = spl_object_hash($instance); // parameters contain at least a method name...
php
public function addSubscriber(SubscriberInterface $instance) { // make sure that an already registered object is removed before re-registering $this->removeSubscriber($instance); // register object hash $this->registeredHashes[] = spl_object_hash($instance); // parameters contain at least a method name...
[ "public", "function", "addSubscriber", "(", "SubscriberInterface", "$", "instance", ")", "{", "// make sure that an already registered object is removed before re-registering", "$", "this", "->", "removeSubscriber", "(", "$", "instance", ")", ";", "// register object hash", "...
register a subscriber for event types provided by subscriber @param SubscriberInterface $instance
[ "register", "a", "subscriber", "for", "event", "types", "provided", "by", "subscriber" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Observer/EventDispatcher.php#L125-L161
194,487
Vectrex/vxPHP
src/Observer/EventDispatcher.php
EventDispatcher.getListeners
public function getListeners($eventName = null) { if ($eventName) { if (empty($this->registry[$eventName])) { return []; } return $this->getSortedRegistry($eventName); } foreach ($this->registry as $eventName => $listeners) { $...
php
public function getListeners($eventName = null) { if ($eventName) { if (empty($this->registry[$eventName])) { return []; } return $this->getSortedRegistry($eventName); } foreach ($this->registry as $eventName => $listeners) { $...
[ "public", "function", "getListeners", "(", "$", "eventName", "=", "null", ")", "{", "if", "(", "$", "eventName", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "registry", "[", "$", "eventName", "]", ")", ")", "{", "return", "[", "]", ";", ...
get all listeners registered for a given event name if no event name is supplied this will return all registered listeners grouped by event name and sorted by priority @param null $eventName @return array
[ "get", "all", "listeners", "registered", "for", "a", "given", "event", "name", "if", "no", "event", "name", "is", "supplied", "this", "will", "return", "all", "registered", "listeners", "grouped", "by", "event", "name", "and", "sorted", "by", "priority" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Observer/EventDispatcher.php#L202-L220
194,488
Vectrex/vxPHP
src/Observer/EventDispatcher.php
EventDispatcher.hasListeners
public function hasListeners($eventName = null) { if($eventName) { return !empty($this->registry[$eventName]); } foreach($this->registry as $eventName => $listeners) { if(!empty($listeners)) { return true; } } return false; ...
php
public function hasListeners($eventName = null) { if($eventName) { return !empty($this->registry[$eventName]); } foreach($this->registry as $eventName => $listeners) { if(!empty($listeners)) { return true; } } return false; ...
[ "public", "function", "hasListeners", "(", "$", "eventName", "=", "null", ")", "{", "if", "(", "$", "eventName", ")", "{", "return", "!", "empty", "(", "$", "this", "->", "registry", "[", "$", "eventName", "]", ")", ";", "}", "foreach", "(", "$", "...
check whether listeners for a given event name are registered if no event name is supplied this will evaluate to true if there any listeners registered @param string $eventName @return bool
[ "check", "whether", "listeners", "for", "a", "given", "event", "name", "are", "registered", "if", "no", "event", "name", "is", "supplied", "this", "will", "evaluate", "to", "true", "if", "there", "any", "listeners", "registered" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Observer/EventDispatcher.php#L230-L244
194,489
Vectrex/vxPHP
src/Observer/EventDispatcher.php
EventDispatcher.getSortedRegistry
private function getSortedRegistry($eventName) { if(!isset($this->sortedRegistry[$eventName])) { $this->sortedRegistry[$eventName] = []; if (isset($this->registry[$eventName])) { // sort reverse by priority key krsort($this->registry[$eventName]); // merge the sorted arrays int...
php
private function getSortedRegistry($eventName) { if(!isset($this->sortedRegistry[$eventName])) { $this->sortedRegistry[$eventName] = []; if (isset($this->registry[$eventName])) { // sort reverse by priority key krsort($this->registry[$eventName]); // merge the sorted arrays int...
[ "private", "function", "getSortedRegistry", "(", "$", "eventName", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "sortedRegistry", "[", "$", "eventName", "]", ")", ")", "{", "$", "this", "->", "sortedRegistry", "[", "$", "eventName", "]", ...
helper method to collect all listener callbacks for a named event into one array observing priorities @param string $eventName @return array
[ "helper", "method", "to", "collect", "all", "listener", "callbacks", "for", "a", "named", "event", "into", "one", "array", "observing", "priorities" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Observer/EventDispatcher.php#L254-L274
194,490
wb-crowdfusion/crowdfusion
system/core/classes/mvc/filters/LinkFilterer.php
LinkFilterer.noReferer
public function noReferer() { if ($this->getParameter('url') == null) return; if ($this->getParameter('service') == null) return "http://hiderefer.com/?" . $this->getParameter('url'); return $this->getParameter('service') . $this->getParameter('url'); }
php
public function noReferer() { if ($this->getParameter('url') == null) return; if ($this->getParameter('service') == null) return "http://hiderefer.com/?" . $this->getParameter('url'); return $this->getParameter('service') . $this->getParameter('url'); }
[ "public", "function", "noReferer", "(", ")", "{", "if", "(", "$", "this", "->", "getParameter", "(", "'url'", ")", "==", "null", ")", "return", ";", "if", "(", "$", "this", "->", "getParameter", "(", "'service'", ")", "==", "null", ")", "return", "\"...
Returns a url safe from referers Expected Params: url string A url to be filtered through hiderefer.com @return string The specified url filtered through hiderefer.com
[ "Returns", "a", "url", "safe", "from", "referers" ]
8cad7988f046a6fefbed07d026cb4ae6706c1217
https://github.com/wb-crowdfusion/crowdfusion/blob/8cad7988f046a6fefbed07d026cb4ae6706c1217/system/core/classes/mvc/filters/LinkFilterer.php#L112-L121
194,491
wb-crowdfusion/crowdfusion
system/core/classes/mvc/filters/LinkFilterer.php
LinkFilterer.appendQueryString
public function appendQueryString() { $url = $this->getParameter('url'); $params = $this->getParameters(); unset($params['url']); return URLUtils::appendQueryString($url, $params); }
php
public function appendQueryString() { $url = $this->getParameter('url'); $params = $this->getParameters(); unset($params['url']); return URLUtils::appendQueryString($url, $params); }
[ "public", "function", "appendQueryString", "(", ")", "{", "$", "url", "=", "$", "this", "->", "getParameter", "(", "'url'", ")", ";", "$", "params", "=", "$", "this", "->", "getParameters", "(", ")", ";", "unset", "(", "$", "params", "[", "'url'", "]...
Constructs a URL with query string arguments from the given base url and parameters Expected Params: url string the URL to build a query string from [params] mixed any additional parameters serve as query string arguments @return string a complete url
[ "Constructs", "a", "URL", "with", "query", "string", "arguments", "from", "the", "given", "base", "url", "and", "parameters" ]
8cad7988f046a6fefbed07d026cb4ae6706c1217
https://github.com/wb-crowdfusion/crowdfusion/blob/8cad7988f046a6fefbed07d026cb4ae6706c1217/system/core/classes/mvc/filters/LinkFilterer.php#L146-L153
194,492
lasallecms/lasallecms-l5-helpers-pkg
src/HTML/HTMLHelper.php
HTMLHelper.getTitleById
public static function getTitleById($table, $id) { //return "table = ".$table." and id = ".$id; // Special handling for users if ($table == "users") { return self::getUserForIndexListing($id); } // Special handling for posts (for post updates listing) if ($...
php
public static function getTitleById($table, $id) { //return "table = ".$table." and id = ".$id; // Special handling for users if ($table == "users") { return self::getUserForIndexListing($id); } // Special handling for posts (for post updates listing) if ($...
[ "public", "static", "function", "getTitleById", "(", "$", "table", ",", "$", "id", ")", "{", "//return \"table = \".$table.\" and id = \".$id;", "// Special handling for users", "if", "(", "$", "table", "==", "\"users\"", ")", "{", "return", "self", "::", "getUserFo...
Grab the title by ID @param string $table @param int $id @return string
[ "Grab", "the", "title", "by", "ID" ]
733967ce3fd81a1efba5265e11663c324ff983c4
https://github.com/lasallecms/lasallecms-l5-helpers-pkg/blob/733967ce3fd81a1efba5265e11663c324ff983c4/src/HTML/HTMLHelper.php#L146-L184
194,493
lasallecms/lasallecms-l5-helpers-pkg
src/HTML/HTMLHelper.php
HTMLHelper.getPostForIndexListing
public static function getPostForIndexListing($id) { // Actually, it's dangerous and confusing to have the link to the post's EDIT // form display in the post update's create/edit form. So, I am omitting // the link; and, instead, am displaying the post's title with the post's // ID in ...
php
public static function getPostForIndexListing($id) { // Actually, it's dangerous and confusing to have the link to the post's EDIT // form display in the post update's create/edit form. So, I am omitting // the link; and, instead, am displaying the post's title with the post's // ID in ...
[ "public", "static", "function", "getPostForIndexListing", "(", "$", "id", ")", "{", "// Actually, it's dangerous and confusing to have the link to the post's EDIT", "// form display in the post update's create/edit form. So, I am omitting", "// the link; and, instead, am displaying the post's ...
Grab the Post info from the "posts" table. Created specifically for the "Post Updates" index listing @param int $id @return string
[ "Grab", "the", "Post", "info", "from", "the", "posts", "table", ".", "Created", "specifically", "for", "the", "Post", "Updates", "index", "listing" ]
733967ce3fd81a1efba5265e11663c324ff983c4
https://github.com/lasallecms/lasallecms-l5-helpers-pkg/blob/733967ce3fd81a1efba5265e11663c324ff983c4/src/HTML/HTMLHelper.php#L217-L235
194,494
lasallecms/lasallecms-l5-helpers-pkg
src/HTML/HTMLHelper.php
HTMLHelper.finagleVarcharFieldTypeForIndexListing
public static function finagleVarcharFieldTypeForIndexListing($field, $data) { if (empty($field['persist_wash'])) { return $data; } if (strtolower($field['persist_wash']) == "url") { $prefacedURL = self::prefaceURLwithHTTP($data); return '<a href="'.$prefaced...
php
public static function finagleVarcharFieldTypeForIndexListing($field, $data) { if (empty($field['persist_wash'])) { return $data; } if (strtolower($field['persist_wash']) == "url") { $prefacedURL = self::prefaceURLwithHTTP($data); return '<a href="'.$prefaced...
[ "public", "static", "function", "finagleVarcharFieldTypeForIndexListing", "(", "$", "field", ",", "$", "data", ")", "{", "if", "(", "empty", "(", "$", "field", "[", "'persist_wash'", "]", ")", ")", "{", "return", "$", "data", ";", "}", "if", "(", "strtol...
Need a helper method to finagle the varchar field in the index listing. @param array $field @param string $data @return string
[ "Need", "a", "helper", "method", "to", "finagle", "the", "varchar", "field", "in", "the", "index", "listing", "." ]
733967ce3fd81a1efba5265e11663c324ff983c4
https://github.com/lasallecms/lasallecms-l5-helpers-pkg/blob/733967ce3fd81a1efba5265e11663c324ff983c4/src/HTML/HTMLHelper.php#L245-L256
194,495
lasallecms/lasallecms-l5-helpers-pkg
src/HTML/HTMLHelper.php
HTMLHelper.categoryParentSingleSelectCreate
public static function categoryParentSingleSelectCreate($categories) { // STEP 1: Initiatize the html select tag $html = ""; $html .= '<select name="parent_id" id="parent_id" size="6" class="form-control" >'; $html .= '<option '; $html .= 'value="'; $html .= 0; ...
php
public static function categoryParentSingleSelectCreate($categories) { // STEP 1: Initiatize the html select tag $html = ""; $html .= '<select name="parent_id" id="parent_id" size="6" class="form-control" >'; $html .= '<option '; $html .= 'value="'; $html .= 0; ...
[ "public", "static", "function", "categoryParentSingleSelectCreate", "(", "$", "categories", ")", "{", "// STEP 1: Initiatize the html select tag", "$", "html", "=", "\"\"", ";", "$", "html", ".=", "'<select name=\"parent_id\" id=\"parent_id\" size=\"6\" class=\"form-control\" >'"...
Create a dropdown with a single select for the parent category @param collection $categories Laravel collection object of category @return string
[ "Create", "a", "dropdown", "with", "a", "single", "select", "for", "the", "parent", "category" ]
733967ce3fd81a1efba5265e11663c324ff983c4
https://github.com/lasallecms/lasallecms-l5-helpers-pkg/blob/733967ce3fd81a1efba5265e11663c324ff983c4/src/HTML/HTMLHelper.php#L287-L314
194,496
lasallecms/lasallecms-l5-helpers-pkg
src/HTML/HTMLHelper.php
HTMLHelper.categoryParentSingleSelectEdit
public static function categoryParentSingleSelectEdit($categories, $parent_id, $category_id) { // STEP 1: Initiatize the html select tag $html = ""; $html .= '<select name="parent_id" id="parent_id" size="6" class="form-control">'; $html .= '<option '; if ( $parent_id == 0) {...
php
public static function categoryParentSingleSelectEdit($categories, $parent_id, $category_id) { // STEP 1: Initiatize the html select tag $html = ""; $html .= '<select name="parent_id" id="parent_id" size="6" class="form-control">'; $html .= '<option '; if ( $parent_id == 0) {...
[ "public", "static", "function", "categoryParentSingleSelectEdit", "(", "$", "categories", ",", "$", "parent_id", ",", "$", "category_id", ")", "{", "// STEP 1: Initiatize the html select tag", "$", "html", "=", "\"\"", ";", "$", "html", ".=", "'<select name=\"parent_i...
Create a multiple select drop down for tags that have the existing tags for that post already selected There is only one parent_id per category @param collection $categories All categories @param int $parent id category's parent id @param int $category id catego...
[ "Create", "a", "multiple", "select", "drop", "down", "for", "tags", "that", "have", "the", "existing", "tags", "for", "that", "post", "already", "selected" ]
733967ce3fd81a1efba5265e11663c324ff983c4
https://github.com/lasallecms/lasallecms-l5-helpers-pkg/blob/733967ce3fd81a1efba5265e11663c324ff983c4/src/HTML/HTMLHelper.php#L327-L372
194,497
lasallecms/lasallecms-l5-helpers-pkg
src/HTML/HTMLHelper.php
HTMLHelper.adminPageTitle
public static function adminPageTitle($package_title, $table_type_plural, $extra_title='') { $table_type_plural = self::properPlural($table_type_plural); $html = ''; $html .= '<br /><br />'; $html .= '<div class="row">'; $html .= ' <div class="oaerror info">'; $html...
php
public static function adminPageTitle($package_title, $table_type_plural, $extra_title='') { $table_type_plural = self::properPlural($table_type_plural); $html = ''; $html .= '<br /><br />'; $html .= '<div class="row">'; $html .= ' <div class="oaerror info">'; $html...
[ "public", "static", "function", "adminPageTitle", "(", "$", "package_title", ",", "$", "table_type_plural", ",", "$", "extra_title", "=", "''", ")", "{", "$", "table_type_plural", "=", "self", "::", "properPlural", "(", "$", "table_type_plural", ")", ";", "$",...
Page title for admin pages @param string $package_title package's title @param string $table_type_plural table's type, in the plural @param string $extra_title extra text to append to the table's title @return string
[ "Page", "title", "for", "admin", "pages" ]
733967ce3fd81a1efba5265e11663c324ff983c4
https://github.com/lasallecms/lasallecms-l5-helpers-pkg/blob/733967ce3fd81a1efba5265e11663c324ff983c4/src/HTML/HTMLHelper.php#L426-L442
194,498
lasallecms/lasallecms-l5-helpers-pkg
src/HTML/HTMLHelper.php
HTMLHelper.adminPageSubTitle
public static function adminPageSubTitle($record = null, $modelClass, $show=false) { $modelClass = self::properPlural($modelClass); $html = ''; $html .= '<div class="row">'; $html .= '<div class="col-md-3"></div>'; $html .= '<div class="col-md-6">'; $html .= '<h1>'; ...
php
public static function adminPageSubTitle($record = null, $modelClass, $show=false) { $modelClass = self::properPlural($modelClass); $html = ''; $html .= '<div class="row">'; $html .= '<div class="col-md-3"></div>'; $html .= '<div class="col-md-6">'; $html .= '<h1>'; ...
[ "public", "static", "function", "adminPageSubTitle", "(", "$", "record", "=", "null", ",", "$", "modelClass", ",", "$", "show", "=", "false", ")", "{", "$", "modelClass", "=", "self", "::", "properPlural", "(", "$", "modelClass", ")", ";", "$", "html", ...
Display button with a label describing what the form is doing. @param object $record Optional record from the database @param string $modelClass The model's classname @param bool $show True when from controller SHOW @return string
[ "Display", "button", "with", "a", "label", "describing", "what", "the", "form", "is", "doing", "." ]
733967ce3fd81a1efba5265e11663c324ff983c4
https://github.com/lasallecms/lasallecms-l5-helpers-pkg/blob/733967ce3fd81a1efba5265e11663c324ff983c4/src/HTML/HTMLHelper.php#L452-L490
194,499
lasallecms/lasallecms-l5-helpers-pkg
src/HTML/HTMLHelper.php
HTMLHelper.adminFormFieldLabel
public static function adminFormFieldLabel($field) { // Does the field have an alternate name? $name = $field['name']; if (!empty($field['alternate_form_name'])) { $name = $field['alternate_form_name']; } if ($name == "id") return "ID"; $html = str_replac...
php
public static function adminFormFieldLabel($field) { // Does the field have an alternate name? $name = $field['name']; if (!empty($field['alternate_form_name'])) { $name = $field['alternate_form_name']; } if ($name == "id") return "ID"; $html = str_replac...
[ "public", "static", "function", "adminFormFieldLabel", "(", "$", "field", ")", "{", "// Does the field have an alternate name?", "$", "name", "=", "$", "field", "[", "'name'", "]", ";", "if", "(", "!", "empty", "(", "$", "field", "[", "'alternate_form_name'", ...
Transform the field name into a format suitable for a form label @param array $field Form field array from the model @return string
[ "Transform", "the", "field", "name", "into", "a", "format", "suitable", "for", "a", "form", "label" ]
733967ce3fd81a1efba5265e11663c324ff983c4
https://github.com/lasallecms/lasallecms-l5-helpers-pkg/blob/733967ce3fd81a1efba5265e11663c324ff983c4/src/HTML/HTMLHelper.php#L504-L518