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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
7,100 | phlexible/phlexible | src/Phlexible/Bundle/CmsBundle/Twig/Extension/MiscExtension.php | MiscExtension.age | public function age($date1, $date2 = null)
{
$formatter = new AgeFormatter();
return $formatter->formatDate($date1, $date2);
} | php | public function age($date1, $date2 = null)
{
$formatter = new AgeFormatter();
return $formatter->formatDate($date1, $date2);
} | [
"public",
"function",
"age",
"(",
"$",
"date1",
",",
"$",
"date2",
"=",
"null",
")",
"{",
"$",
"formatter",
"=",
"new",
"AgeFormatter",
"(",
")",
";",
"return",
"$",
"formatter",
"->",
"formatDate",
"(",
"$",
"date1",
",",
"$",
"date2",
")",
";",
"... | Return age string for given date.
@param string $date1
@param string|null $date2
@return string | [
"Return",
"age",
"string",
"for",
"given",
"date",
"."
] | 132f24924c9bb0dbb6c1ea84db0a463f97fa3893 | https://github.com/phlexible/phlexible/blob/132f24924c9bb0dbb6c1ea84db0a463f97fa3893/src/Phlexible/Bundle/CmsBundle/Twig/Extension/MiscExtension.php#L90-L95 |
7,101 | wasabi-cms/cms | src/Controller/MenusController.php | MenusController.index | public function index()
{
$menus = $this->Filter->filter($this->Menus->find('all'))->hydrate(false);
$this->set('menus', $menus);
} | php | public function index()
{
$menus = $this->Filter->filter($this->Menus->find('all'))->hydrate(false);
$this->set('menus', $menus);
} | [
"public",
"function",
"index",
"(",
")",
"{",
"$",
"menus",
"=",
"$",
"this",
"->",
"Filter",
"->",
"filter",
"(",
"$",
"this",
"->",
"Menus",
"->",
"find",
"(",
"'all'",
")",
")",
"->",
"hydrate",
"(",
"false",
")",
";",
"$",
"this",
"->",
"set"... | index action
GET | [
"index",
"action",
"GET"
] | 2787b6422ea1d719cf49951b3253fd0ac31d22ca | https://github.com/wasabi-cms/cms/blob/2787b6422ea1d719cf49951b3253fd0ac31d22ca/src/Controller/MenusController.php#L73-L77 |
7,102 | wasabi-cms/cms | src/Controller/MenusController.php | MenusController.deleteItem | public function deleteItem($id)
{
$this->request->allowMethod('post');
$menuItem = $this->MenuItems->get($id);
if ($this->MenuItems->delete($menuItem)) {
$this->Flash->success(__d('wasabi_core', 'The menu item <strong>{0}</strong> has been deleted.', $menuItem->get('name')));
... | php | public function deleteItem($id)
{
$this->request->allowMethod('post');
$menuItem = $this->MenuItems->get($id);
if ($this->MenuItems->delete($menuItem)) {
$this->Flash->success(__d('wasabi_core', 'The menu item <strong>{0}</strong> has been deleted.', $menuItem->get('name')));
... | [
"public",
"function",
"deleteItem",
"(",
"$",
"id",
")",
"{",
"$",
"this",
"->",
"request",
"->",
"allowMethod",
"(",
"'post'",
")",
";",
"$",
"menuItem",
"=",
"$",
"this",
"->",
"MenuItems",
"->",
"get",
"(",
"$",
"id",
")",
";",
"if",
"(",
"$",
... | Delete a menu item.
POST
@param string $id | [
"Delete",
"a",
"menu",
"item",
".",
"POST"
] | 2787b6422ea1d719cf49951b3253fd0ac31d22ca | https://github.com/wasabi-cms/cms/blob/2787b6422ea1d719cf49951b3253fd0ac31d22ca/src/Controller/MenusController.php#L230-L243 |
7,103 | wasabi-cms/cms | src/Controller/MenusController.php | MenusController.reorderItems | public function reorderItems()
{
if (!$this->request->isAll(['ajax', 'post'])) {
throw new MethodNotAllowedException();
}
if (empty($this->request->data)) {
throw new BadRequestException();
}
$this->request->data = Hash::map($this->request->data, '{n... | php | public function reorderItems()
{
if (!$this->request->isAll(['ajax', 'post'])) {
throw new MethodNotAllowedException();
}
if (empty($this->request->data)) {
throw new BadRequestException();
}
$this->request->data = Hash::map($this->request->data, '{n... | [
"public",
"function",
"reorderItems",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"request",
"->",
"isAll",
"(",
"[",
"'ajax'",
",",
"'post'",
"]",
")",
")",
"{",
"throw",
"new",
"MethodNotAllowedException",
"(",
")",
";",
"}",
"if",
"(",
"empt... | reorderItems action
AJAX POST | [
"reorderItems",
"action",
"AJAX",
"POST"
] | 2787b6422ea1d719cf49951b3253fd0ac31d22ca | https://github.com/wasabi-cms/cms/blob/2787b6422ea1d719cf49951b3253fd0ac31d22ca/src/Controller/MenusController.php#L249-L293 |
7,104 | thecodingmachine/utils.i18n.fine.file-translator | src/FileTranslator.php | FileTranslator.getPath | private function getPath() {
if(strpos($this->i18nMessagePath, '/') === 0 || strpos($this->i18nMessagePath, ':/') === 1) {
return $this->i18nMessagePath;
}
return ROOT_PATH.$this->i18nMessagePath;
} | php | private function getPath() {
if(strpos($this->i18nMessagePath, '/') === 0 || strpos($this->i18nMessagePath, ':/') === 1) {
return $this->i18nMessagePath;
}
return ROOT_PATH.$this->i18nMessagePath;
} | [
"private",
"function",
"getPath",
"(",
")",
"{",
"if",
"(",
"strpos",
"(",
"$",
"this",
"->",
"i18nMessagePath",
",",
"'/'",
")",
"===",
"0",
"||",
"strpos",
"(",
"$",
"this",
"->",
"i18nMessagePath",
",",
"':/'",
")",
"===",
"1",
")",
"{",
"return",... | This function return the real path set in parameter.
@return string | [
"This",
"function",
"return",
"the",
"real",
"path",
"set",
"in",
"parameter",
"."
] | 67b180fed62562b36d28d6d61707fde4f62abf9a | https://github.com/thecodingmachine/utils.i18n.fine.file-translator/blob/67b180fed62562b36d28d6d61707fde4f62abf9a/src/FileTranslator.php#L81-L86 |
7,105 | thecodingmachine/utils.i18n.fine.file-translator | src/FileTranslator.php | FileTranslator.getMessageFile | private function getMessageFile($language) {
if(!isset($this->messageFile[$language])) {
$this->messageFile[$language] = new MessageFileLanguage($this->getPath(), $language);
}
return $this->messageFile[$language];
} | php | private function getMessageFile($language) {
if(!isset($this->messageFile[$language])) {
$this->messageFile[$language] = new MessageFileLanguage($this->getPath(), $language);
}
return $this->messageFile[$language];
} | [
"private",
"function",
"getMessageFile",
"(",
"$",
"language",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"messageFile",
"[",
"$",
"language",
"]",
")",
")",
"{",
"$",
"this",
"->",
"messageFile",
"[",
"$",
"language",
"]",
"=",
"new"... | Return the instance of the MessageFileLanguage
Each MessageFileLanguage is link to one language
@param string $language
@return MessageFileLanguage | [
"Return",
"the",
"instance",
"of",
"the",
"MessageFileLanguage",
"Each",
"MessageFileLanguage",
"is",
"link",
"to",
"one",
"language"
] | 67b180fed62562b36d28d6d61707fde4f62abf9a | https://github.com/thecodingmachine/utils.i18n.fine.file-translator/blob/67b180fed62562b36d28d6d61707fde4f62abf9a/src/FileTranslator.php#L95-L100 |
7,106 | thecodingmachine/utils.i18n.fine.file-translator | src/FileTranslator.php | FileTranslator.getTranslationsForLanguage | public function getTranslationsForLanguage($language) {
if (!isset($this->messages[$language])) {
$messageLanguage = $this->getMessageFile($language);
$this->messages[$language] = $messageLanguage->getAllMessages();
}
return $this->messages[$language];
} | php | public function getTranslationsForLanguage($language) {
if (!isset($this->messages[$language])) {
$messageLanguage = $this->getMessageFile($language);
$this->messages[$language] = $messageLanguage->getAllMessages();
}
return $this->messages[$language];
} | [
"public",
"function",
"getTranslationsForLanguage",
"(",
"$",
"language",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"messages",
"[",
"$",
"language",
"]",
")",
")",
"{",
"$",
"messageLanguage",
"=",
"$",
"this",
"->",
"getMessageFile",
"... | Return a list of all message for a language.
@param string $language Language
@return array<string, string> List with key value of translation | [
"Return",
"a",
"list",
"of",
"all",
"message",
"for",
"a",
"language",
"."
] | 67b180fed62562b36d28d6d61707fde4f62abf9a | https://github.com/thecodingmachine/utils.i18n.fine.file-translator/blob/67b180fed62562b36d28d6d61707fde4f62abf9a/src/FileTranslator.php#L175-L181 |
7,107 | thecodingmachine/utils.i18n.fine.file-translator | src/FileTranslator.php | FileTranslator.getTranslationsForKey | public function getTranslationsForKey($key) {
$this->getAllTranslationByLanguage();
$translations = [];
foreach ($this->messages as $language => $messages) {
foreach ($messages as $messageKey => $message) {
if($key == $messageKey) {
$translations[$language] = $message;
}
}
}
return $transla... | php | public function getTranslationsForKey($key) {
$this->getAllTranslationByLanguage();
$translations = [];
foreach ($this->messages as $language => $messages) {
foreach ($messages as $messageKey => $message) {
if($key == $messageKey) {
$translations[$language] = $message;
}
}
}
return $transla... | [
"public",
"function",
"getTranslationsForKey",
"(",
"$",
"key",
")",
"{",
"$",
"this",
"->",
"getAllTranslationByLanguage",
"(",
")",
";",
"$",
"translations",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"this",
"->",
"messages",
"as",
"$",
"language",
"=>",
... | Return a list of all message for a key, by language.
@param string $key Key of translation
@return array<string, string> List with key value of translation | [
"Return",
"a",
"list",
"of",
"all",
"message",
"for",
"a",
"key",
"by",
"language",
"."
] | 67b180fed62562b36d28d6d61707fde4f62abf9a | https://github.com/thecodingmachine/utils.i18n.fine.file-translator/blob/67b180fed62562b36d28d6d61707fde4f62abf9a/src/FileTranslator.php#L189-L200 |
7,108 | thecodingmachine/utils.i18n.fine.file-translator | src/FileTranslator.php | FileTranslator.deleteTranslation | public function deleteTranslation($key, $language = null) {
if($language === null) {
$languages = $this->getLanguageList();
}
else {
$languages = array($language);
}
foreach ($languages as $language) {
$messageFile = $this->getMessageFile($language);
$messageFile->deleteMessage($key);
$messageF... | php | public function deleteTranslation($key, $language = null) {
if($language === null) {
$languages = $this->getLanguageList();
}
else {
$languages = array($language);
}
foreach ($languages as $language) {
$messageFile = $this->getMessageFile($language);
$messageFile->deleteMessage($key);
$messageF... | [
"public",
"function",
"deleteTranslation",
"(",
"$",
"key",
",",
"$",
"language",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"language",
"===",
"null",
")",
"{",
"$",
"languages",
"=",
"$",
"this",
"->",
"getLanguageList",
"(",
")",
";",
"}",
"else",
"{"... | Delete a translation for a language. If the language is not set or null, this function deletes the translation for all language.
@param string $key Key to remove
@param string|null $language Language to remove key or null for all | [
"Delete",
"a",
"translation",
"for",
"a",
"language",
".",
"If",
"the",
"language",
"is",
"not",
"set",
"or",
"null",
"this",
"function",
"deletes",
"the",
"translation",
"for",
"all",
"language",
"."
] | 67b180fed62562b36d28d6d61707fde4f62abf9a | https://github.com/thecodingmachine/utils.i18n.fine.file-translator/blob/67b180fed62562b36d28d6d61707fde4f62abf9a/src/FileTranslator.php#L208-L222 |
7,109 | thecodingmachine/utils.i18n.fine.file-translator | src/FileTranslator.php | FileTranslator.setTranslation | public function setTranslation($key, $value, $language) {
$messageFile = $this->getMessageFile($language);
$messageFile->setMessage($key, $value);
$messageFile->save();
$this->messages[$language][$key] = $value;
} | php | public function setTranslation($key, $value, $language) {
$messageFile = $this->getMessageFile($language);
$messageFile->setMessage($key, $value);
$messageFile->save();
$this->messages[$language][$key] = $value;
} | [
"public",
"function",
"setTranslation",
"(",
"$",
"key",
",",
"$",
"value",
",",
"$",
"language",
")",
"{",
"$",
"messageFile",
"=",
"$",
"this",
"->",
"getMessageFile",
"(",
"$",
"language",
")",
";",
"$",
"messageFile",
"->",
"setMessage",
"(",
"$",
... | Add or change a translation
@param string $key Key of translation
@param string $value Message of translation
@param string $language Language to add translation | [
"Add",
"or",
"change",
"a",
"translation"
] | 67b180fed62562b36d28d6d61707fde4f62abf9a | https://github.com/thecodingmachine/utils.i18n.fine.file-translator/blob/67b180fed62562b36d28d6d61707fde4f62abf9a/src/FileTranslator.php#L231-L237 |
7,110 | thecodingmachine/utils.i18n.fine.file-translator | src/FileTranslator.php | FileTranslator.getLanguageList | public function getLanguageList() {
$files = glob($this->getPath().'messages_*.php');
$startAt = strlen('messages_');
$languages = array();
foreach ($files as $file) {
$base = basename($file);
$languages[] = substr($base, $startAt, strrpos($base, '.php') - $startAt);
}
return $languages;
} | php | public function getLanguageList() {
$files = glob($this->getPath().'messages_*.php');
$startAt = strlen('messages_');
$languages = array();
foreach ($files as $file) {
$base = basename($file);
$languages[] = substr($base, $startAt, strrpos($base, '.php') - $startAt);
}
return $languages;
} | [
"public",
"function",
"getLanguageList",
"(",
")",
"{",
"$",
"files",
"=",
"glob",
"(",
"$",
"this",
"->",
"getPath",
"(",
")",
".",
"'messages_*.php'",
")",
";",
"$",
"startAt",
"=",
"strlen",
"(",
"'messages_'",
")",
";",
"$",
"languages",
"=",
"arra... | Liste of all language supported
@return array<string> | [
"Liste",
"of",
"all",
"language",
"supported"
] | 67b180fed62562b36d28d6d61707fde4f62abf9a | https://github.com/thecodingmachine/utils.i18n.fine.file-translator/blob/67b180fed62562b36d28d6d61707fde4f62abf9a/src/FileTranslator.php#L272-L282 |
7,111 | budkit/budkit-framework | src/Budkit/Helper/Time.php | Time.difference | public static function difference($time, $now = NULL, $opt = array())
{
//calculates the difference between two times
//could be a string, or language
//default now is NULL
//Solve the 4 decades issue
if (date('Y-m-d H:i:s', $time) == "0000-00-00 00:00:00" || empty($time)) {
... | php | public static function difference($time, $now = NULL, $opt = array())
{
//calculates the difference between two times
//could be a string, or language
//default now is NULL
//Solve the 4 decades issue
if (date('Y-m-d H:i:s', $time) == "0000-00-00 00:00:00" || empty($time)) {
... | [
"public",
"static",
"function",
"difference",
"(",
"$",
"time",
",",
"$",
"now",
"=",
"NULL",
",",
"$",
"opt",
"=",
"array",
"(",
")",
")",
"{",
"//calculates the difference between two times",
"//could be a string, or language",
"//default now is NULL",
"//Solve the ... | Get time difference between 2 times
@param string $time
@param string $now
@param array $options
@return string | [
"Get",
"time",
"difference",
"between",
"2",
"times"
] | 0635061815fe07a8c63f9514b845d199b3c0d485 | https://github.com/budkit/budkit-framework/blob/0635061815fe07a8c63f9514b845d199b3c0d485/src/Budkit/Helper/Time.php#L61-L111 |
7,112 | novuso/common | src/Domain/Value/Identifier/Url.php | Url.normalizeQuery | protected static function normalizeQuery(?string $query): ?string
{
if (null === $query) {
return null;
}
if ('' === $query) {
return '';
}
$parts = [];
$order = [];
// sort query params by key and remove missing keys
foreach... | php | protected static function normalizeQuery(?string $query): ?string
{
if (null === $query) {
return null;
}
if ('' === $query) {
return '';
}
$parts = [];
$order = [];
// sort query params by key and remove missing keys
foreach... | [
"protected",
"static",
"function",
"normalizeQuery",
"(",
"?",
"string",
"$",
"query",
")",
":",
"?",
"string",
"{",
"if",
"(",
"null",
"===",
"$",
"query",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"''",
"===",
"$",
"query",
")",
"{",
"retu... | Normalizes the query
Sorts query by key and removes values without keys.
@param string|null $query The query
@return string|null | [
"Normalizes",
"the",
"query"
] | 7d0e5a4f4c79c9622e068efc8b7c70815c460863 | https://github.com/novuso/common/blob/7d0e5a4f4c79c9622e068efc8b7c70815c460863/src/Domain/Value/Identifier/Url.php#L33-L59 |
7,113 | edunola13/enolaphp-framework | src/Http/HttpCore.php | HttpCore.mappingController | public function mappingController($uriapp = NULL, $method = NULL){
$controllers= $this->app->context->getControllersDefinition();
$maps= FALSE;
//Recorre todos los controladores principales hasta que uno coincida con la URI actual
foreach ($controllers as $url => $controller_esp) { ... | php | public function mappingController($uriapp = NULL, $method = NULL){
$controllers= $this->app->context->getControllersDefinition();
$maps= FALSE;
//Recorre todos los controladores principales hasta que uno coincida con la URI actual
foreach ($controllers as $url => $controller_esp) { ... | [
"public",
"function",
"mappingController",
"(",
"$",
"uriapp",
"=",
"NULL",
",",
"$",
"method",
"=",
"NULL",
")",
"{",
"$",
"controllers",
"=",
"$",
"this",
"->",
"app",
"->",
"context",
"->",
"getControllersDefinition",
"(",
")",
";",
"$",
"maps",
"=",
... | Retorna la especificacion del controlador que mapea con la URI actual
Levanta error 404 si ningun controlador mapea
@param string $uriapp
@return array | [
"Retorna",
"la",
"especificacion",
"del",
"controlador",
"que",
"mapea",
"con",
"la",
"URI",
"actual",
"Levanta",
"error",
"404",
"si",
"ningun",
"controlador",
"mapea"
] | a962bfcd53d7bc129d8c9946aaa71d264285229d | https://github.com/edunola13/enolaphp-framework/blob/a962bfcd53d7bc129d8c9946aaa71d264285229d/src/Http/HttpCore.php#L45-L71 |
7,114 | edunola13/enolaphp-framework | src/Http/HttpCore.php | HttpCore.mapsController | private function mapsController($controller, $uriapp = NULL, $method = NULL, $parentController = NULL){
$httpMethod= isset($controller['httpMethod']) ? $controller['httpMethod'] : '*';
if($parentController != NULL){
$controller['url']= rtrim($parentController['url'], '/') . '/' . ltrim($cont... | php | private function mapsController($controller, $uriapp = NULL, $method = NULL, $parentController = NULL){
$httpMethod= isset($controller['httpMethod']) ? $controller['httpMethod'] : '*';
if($parentController != NULL){
$controller['url']= rtrim($parentController['url'], '/') . '/' . ltrim($cont... | [
"private",
"function",
"mapsController",
"(",
"$",
"controller",
",",
"$",
"uriapp",
"=",
"NULL",
",",
"$",
"method",
"=",
"NULL",
",",
"$",
"parentController",
"=",
"NULL",
")",
"{",
"$",
"httpMethod",
"=",
"isset",
"(",
"$",
"controller",
"[",
"'httpMe... | Controla si el controlador pasado mapea con la url y el metodo actual.
En caso de mapear arma la especificacion del controlador.
@param mixed $controller
@param string $uriapp
@param string $method
@param mixed $parentController
@return mixed | [
"Controla",
"si",
"el",
"controlador",
"pasado",
"mapea",
"con",
"la",
"url",
"y",
"el",
"metodo",
"actual",
".",
"En",
"caso",
"de",
"mapear",
"arma",
"la",
"especificacion",
"del",
"controlador",
"."
] | a962bfcd53d7bc129d8c9946aaa71d264285229d | https://github.com/edunola13/enolaphp-framework/blob/a962bfcd53d7bc129d8c9946aaa71d264285229d/src/Http/HttpCore.php#L81-L115 |
7,115 | edunola13/enolaphp-framework | src/Http/HttpCore.php | HttpCore.executeHttpRequest | public function executeHttpRequest($actualController = NULL, $uriapp = NULL, $filter = TRUE){
//Si no se paso controlador, se busca el correspondiente
if($actualController == NULL){
$actualController= $this->mappingController($uriapp);
}
//Ejecuto los filtros pre-procesamient... | php | public function executeHttpRequest($actualController = NULL, $uriapp = NULL, $filter = TRUE){
//Si no se paso controlador, se busca el correspondiente
if($actualController == NULL){
$actualController= $this->mappingController($uriapp);
}
//Ejecuto los filtros pre-procesamient... | [
"public",
"function",
"executeHttpRequest",
"(",
"$",
"actualController",
"=",
"NULL",
",",
"$",
"uriapp",
"=",
"NULL",
",",
"$",
"filter",
"=",
"TRUE",
")",
"{",
"//Si no se paso controlador, se busca el correspondiente",
"if",
"(",
"$",
"actualController",
"==",
... | Ejecuta la especificacion de controlador pasada como parametro en base a una URI ejecutando o no filtros. En caso de
que no se le pase el controlador lo consigue en base a la URI y en caso de que no se pase la URI especifica se usa
la de la peticion actual.
@param array $actualController
@param string $uriapp
@param bo... | [
"Ejecuta",
"la",
"especificacion",
"de",
"controlador",
"pasada",
"como",
"parametro",
"en",
"base",
"a",
"una",
"URI",
"ejecutando",
"o",
"no",
"filtros",
".",
"En",
"caso",
"de",
"que",
"no",
"se",
"le",
"pase",
"el",
"controlador",
"lo",
"consigue",
"en... | a962bfcd53d7bc129d8c9946aaa71d264285229d | https://github.com/edunola13/enolaphp-framework/blob/a962bfcd53d7bc129d8c9946aaa71d264285229d/src/Http/HttpCore.php#L124-L143 |
7,116 | edunola13/enolaphp-framework | src/Http/HttpCore.php | HttpCore.executeFilters | protected function executeFilters($filters, $uriapp = NULL){
//Analizo los filtros y los aplico en caso de que corresponda
foreach ($filters as $filter_esp) {
$filter= UrlUri::mapsActualUrl($filter_esp['filtered'], $uriapp);
//Si debe filtrar carga el filtro correspondiente y rea... | php | protected function executeFilters($filters, $uriapp = NULL){
//Analizo los filtros y los aplico en caso de que corresponda
foreach ($filters as $filter_esp) {
$filter= UrlUri::mapsActualUrl($filter_esp['filtered'], $uriapp);
//Si debe filtrar carga el filtro correspondiente y rea... | [
"protected",
"function",
"executeFilters",
"(",
"$",
"filters",
",",
"$",
"uriapp",
"=",
"NULL",
")",
"{",
"//Analizo los filtros y los aplico en caso de que corresponda",
"foreach",
"(",
"$",
"filters",
"as",
"$",
"filter_esp",
")",
"{",
"$",
"filter",
"=",
"UrlU... | Analiza los filtros que mapean con la URI pasada y ejecuta los que correspondan. En caso de no pasar URI se utiliza
la de la peticion actual.
@param array[array] $filters
@param string $uriapp | [
"Analiza",
"los",
"filtros",
"que",
"mapean",
"con",
"la",
"URI",
"pasada",
"y",
"ejecuta",
"los",
"que",
"correspondan",
".",
"En",
"caso",
"de",
"no",
"pasar",
"URI",
"se",
"utiliza",
"la",
"de",
"la",
"peticion",
"actual",
"."
] | a962bfcd53d7bc129d8c9946aaa71d264285229d | https://github.com/edunola13/enolaphp-framework/blob/a962bfcd53d7bc129d8c9946aaa71d264285229d/src/Http/HttpCore.php#L150-L184 |
7,117 | edunola13/enolaphp-framework | src/Http/HttpCore.php | HttpCore.executeMiddlewares | protected function executeMiddlewares($middlewares){
//Analizo los filtros y los aplico en caso de que corresponda
$middlewaresDefinition = $this->app->context->getMiddlewaresDefinition();
foreach ($middlewares as $middlewareName) {
if (! isset($middlewaresDefinition[$middlewareName]... | php | protected function executeMiddlewares($middlewares){
//Analizo los filtros y los aplico en caso de que corresponda
$middlewaresDefinition = $this->app->context->getMiddlewaresDefinition();
foreach ($middlewares as $middlewareName) {
if (! isset($middlewaresDefinition[$middlewareName]... | [
"protected",
"function",
"executeMiddlewares",
"(",
"$",
"middlewares",
")",
"{",
"//Analizo los filtros y los aplico en caso de que corresponda",
"$",
"middlewaresDefinition",
"=",
"$",
"this",
"->",
"app",
"->",
"context",
"->",
"getMiddlewaresDefinition",
"(",
")",
";"... | Se ejecutan los middlewares que se pasan como parametro
@param array[string] $filters
@param string $uriapp | [
"Se",
"ejecutan",
"los",
"middlewares",
"que",
"se",
"pasan",
"como",
"parametro"
] | a962bfcd53d7bc129d8c9946aaa71d264285229d | https://github.com/edunola13/enolaphp-framework/blob/a962bfcd53d7bc129d8c9946aaa71d264285229d/src/Http/HttpCore.php#L190-L227 |
7,118 | edunola13/enolaphp-framework | src/Http/HttpCore.php | HttpCore.executeController | protected function executeController($controller_esp, $uriapp = NULL) {
if (count($controller_esp['middlewares']) > 0) {
if ($this->executeMiddlewares($controller_esp['middlewares']) === false) {
return;
}
}
$dir= $this->buildDir($controller_esp);... | php | protected function executeController($controller_esp, $uriapp = NULL) {
if (count($controller_esp['middlewares']) > 0) {
if ($this->executeMiddlewares($controller_esp['middlewares']) === false) {
return;
}
}
$dir= $this->buildDir($controller_esp);... | [
"protected",
"function",
"executeController",
"(",
"$",
"controller_esp",
",",
"$",
"uriapp",
"=",
"NULL",
")",
"{",
"if",
"(",
"count",
"(",
"$",
"controller_esp",
"[",
"'middlewares'",
"]",
")",
">",
"0",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"exec... | Ejecuta el controlador que mapeo anteriormente. Segun su definicion en la configuracion se ejecutara al estilo REST
o mediante nombre de funciones
@param array $controller_esp
@param string $uriapp | [
"Ejecuta",
"el",
"controlador",
"que",
"mapeo",
"anteriormente",
".",
"Segun",
"su",
"definicion",
"en",
"la",
"configuracion",
"se",
"ejecutara",
"al",
"estilo",
"REST",
"o",
"mediante",
"nombre",
"de",
"funciones"
] | a962bfcd53d7bc129d8c9946aaa71d264285229d | https://github.com/edunola13/enolaphp-framework/blob/a962bfcd53d7bc129d8c9946aaa71d264285229d/src/Http/HttpCore.php#L234-L283 |
7,119 | mijohansen/php-gae-util | src/JWT.php | JWT.get | static public function get($email = null, $type) {
static $cache;
if (is_null($email)) {
/**
* Creating a token with the current module identity for reference.
*/
$email = Util::getModuleId() . "@" . Util::getApplicationId();
}
if (is_nul... | php | static public function get($email = null, $type) {
static $cache;
if (is_null($email)) {
/**
* Creating a token with the current module identity for reference.
*/
$email = Util::getModuleId() . "@" . Util::getApplicationId();
}
if (is_nul... | [
"static",
"public",
"function",
"get",
"(",
"$",
"email",
"=",
"null",
",",
"$",
"type",
")",
"{",
"static",
"$",
"cache",
";",
"if",
"(",
"is_null",
"(",
"$",
"email",
")",
")",
"{",
"/**\n * Creating a token with the current module identity for ref... | Returns a valid JWT token for this account | [
"Returns",
"a",
"valid",
"JWT",
"token",
"for",
"this",
"account"
] | dfa7a1a4d61aa435351d6a5b1b120c0e23d81dde | https://github.com/mijohansen/php-gae-util/blob/dfa7a1a4d61aa435351d6a5b1b120c0e23d81dde/src/JWT.php#L34-L51 |
7,120 | mijohansen/php-gae-util | src/JWT.php | JWT.getInternalToken | static public function getInternalToken() {
static $token;
if (is_null($token)) {
$payload = [
"exp" => time() + Moment::ONEHOUR,
"sub" => Util::getModuleId() . "@" . Util::getApplicationId()
];
$secret = self::getSecret(self::CONF_INTE... | php | static public function getInternalToken() {
static $token;
if (is_null($token)) {
$payload = [
"exp" => time() + Moment::ONEHOUR,
"sub" => Util::getModuleId() . "@" . Util::getApplicationId()
];
$secret = self::getSecret(self::CONF_INTE... | [
"static",
"public",
"function",
"getInternalToken",
"(",
")",
"{",
"static",
"$",
"token",
";",
"if",
"(",
"is_null",
"(",
"$",
"token",
")",
")",
"{",
"$",
"payload",
"=",
"[",
"\"exp\"",
"=>",
"time",
"(",
")",
"+",
"Moment",
"::",
"ONEHOUR",
",",
... | Get Token used for service to service communication.
Setting standard time to 5 seconds for internal service to service communication.
@return string
@throws \Exception | [
"Get",
"Token",
"used",
"for",
"service",
"to",
"service",
"communication",
".",
"Setting",
"standard",
"time",
"to",
"5",
"seconds",
"for",
"internal",
"service",
"to",
"service",
"communication",
"."
] | dfa7a1a4d61aa435351d6a5b1b120c0e23d81dde | https://github.com/mijohansen/php-gae-util/blob/dfa7a1a4d61aa435351d6a5b1b120c0e23d81dde/src/JWT.php#L60-L71 |
7,121 | studyportals/Cache | src/FileCache.php | FileCache._getFileName | protected function _getFileName($name){
$name = trim($name);
$name = iconv('ISO-8859-1', 'ASCII//TRANSLIT', $name);
$name = preg_replace('/[^a-z0-9\-:]+/i', '_', $name);
$name = str_replace(':', '.', $name);
if($name == ''){
throw new CacheException('Cache-entry name cannot be empty');
}
return "{... | php | protected function _getFileName($name){
$name = trim($name);
$name = iconv('ISO-8859-1', 'ASCII//TRANSLIT', $name);
$name = preg_replace('/[^a-z0-9\-:]+/i', '_', $name);
$name = str_replace(':', '.', $name);
if($name == ''){
throw new CacheException('Cache-entry name cannot be empty');
}
return "{... | [
"protected",
"function",
"_getFileName",
"(",
"$",
"name",
")",
"{",
"$",
"name",
"=",
"trim",
"(",
"$",
"name",
")",
";",
"$",
"name",
"=",
"iconv",
"(",
"'ISO-8859-1'",
",",
"'ASCII//TRANSLIT'",
",",
"$",
"name",
")",
";",
"$",
"name",
"=",
"preg_r... | Get a cache-entry filename based upon the string provided.
@param string $name
@return string
@throws CacheException | [
"Get",
"a",
"cache",
"-",
"entry",
"filename",
"based",
"upon",
"the",
"string",
"provided",
"."
] | f24264b18bea49e97fa8a630cdda595d5b026600 | https://github.com/studyportals/Cache/blob/f24264b18bea49e97fa8a630cdda595d5b026600/src/FileCache.php#L60-L74 |
7,122 | studyportals/Cache | src/FileCache.php | FileCache._clearExpired | protected function _clearExpired($time = null){
if($time === null) $time = time();
$files = glob("{$this->_cache_path}*.cache");
$cleared = 0;
if(is_array($files)){
foreach($files as $file){
$path = $this->_cache_path . basename($file);
$mtime = @filemtime($path);
// Remove expired files
... | php | protected function _clearExpired($time = null){
if($time === null) $time = time();
$files = glob("{$this->_cache_path}*.cache");
$cleared = 0;
if(is_array($files)){
foreach($files as $file){
$path = $this->_cache_path . basename($file);
$mtime = @filemtime($path);
// Remove expired files
... | [
"protected",
"function",
"_clearExpired",
"(",
"$",
"time",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"time",
"===",
"null",
")",
"$",
"time",
"=",
"time",
"(",
")",
";",
"$",
"files",
"=",
"glob",
"(",
"\"{$this->_cache_path}*.cache\"",
")",
";",
"$",
... | Clear expired cache-entries from the cache-path.
<p>The optional parameter {@link $time} can be used to provide a
reference time for the expiry. When omitted, the current time is
used.</p>
<p>Returns the number of expired items cleared from the cache.</p>
@param integer $time
@return integer | [
"Clear",
"expired",
"cache",
"-",
"entries",
"from",
"the",
"cache",
"-",
"path",
"."
] | f24264b18bea49e97fa8a630cdda595d5b026600 | https://github.com/studyportals/Cache/blob/f24264b18bea49e97fa8a630cdda595d5b026600/src/FileCache.php#L89-L114 |
7,123 | studyportals/Cache | src/FileCache.php | FileCache.set | public function set($name, $value, $ttl = 0){
if($ttl <= 0) $ttl = self::TTL_FUTURE;
if(is_resource($value)){
throw new CacheException('Cannot cache values of type "resource"');
}
if(!$this->validateValueSize($value)){
ExceptionHandler::notice("Value in $name is too big to be stored in file cache.");... | php | public function set($name, $value, $ttl = 0){
if($ttl <= 0) $ttl = self::TTL_FUTURE;
if(is_resource($value)){
throw new CacheException('Cannot cache values of type "resource"');
}
if(!$this->validateValueSize($value)){
ExceptionHandler::notice("Value in $name is too big to be stored in file cache.");... | [
"public",
"function",
"set",
"(",
"$",
"name",
",",
"$",
"value",
",",
"$",
"ttl",
"=",
"0",
")",
"{",
"if",
"(",
"$",
"ttl",
"<=",
"0",
")",
"$",
"ttl",
"=",
"self",
"::",
"TTL_FUTURE",
";",
"if",
"(",
"is_resource",
"(",
"$",
"value",
")",
... | Add an entry to the FileCache.
<p>Due to the way FileCache keeps track of expiry dates, setting {@link
$ttl} to zero will set the expiry time to FileCache::TTL_FUTURE which by
default is set to 365 days in the future.</p>
<p>Every successful "set" has a chance of triggering {@link
FileCache::_clearExpired()} which cl... | [
"Add",
"an",
"entry",
"to",
"the",
"FileCache",
"."
] | f24264b18bea49e97fa8a630cdda595d5b026600 | https://github.com/studyportals/Cache/blob/f24264b18bea49e97fa8a630cdda595d5b026600/src/FileCache.php#L138-L178 |
7,124 | studyportals/Cache | src/FileCache.php | FileCache.get | public function get($name, &$error = false){
// If disabled, return nothing so that this cache is overwritten
if(!$this->_enabled){
return null;
}
try{
$file = $this->_getFileName($name);
}
catch(CacheException $e){
$error = true;
return null;
}
if(time() > @filemtime($this->_cache_p... | php | public function get($name, &$error = false){
// If disabled, return nothing so that this cache is overwritten
if(!$this->_enabled){
return null;
}
try{
$file = $this->_getFileName($name);
}
catch(CacheException $e){
$error = true;
return null;
}
if(time() > @filemtime($this->_cache_p... | [
"public",
"function",
"get",
"(",
"$",
"name",
",",
"&",
"$",
"error",
"=",
"false",
")",
"{",
"// If disabled, return nothing so that this cache is overwritten",
"if",
"(",
"!",
"$",
"this",
"->",
"_enabled",
")",
"{",
"return",
"null",
";",
"}",
"try",
"{"... | Get an entry from the FileCache.
@param string $name
@param boolean &$error
@return mixed
@see Cache::get() | [
"Get",
"an",
"entry",
"from",
"the",
"FileCache",
"."
] | f24264b18bea49e97fa8a630cdda595d5b026600 | https://github.com/studyportals/Cache/blob/f24264b18bea49e97fa8a630cdda595d5b026600/src/FileCache.php#L189-L237 |
7,125 | studyportals/Cache | src/FileCache.php | FileCache.delete | public function delete($name){
try{
$file = $this->_getFileName($name);
}
catch(CacheException $e){
return false;
}
return @unlink($this->_cache_path . $file);
} | php | public function delete($name){
try{
$file = $this->_getFileName($name);
}
catch(CacheException $e){
return false;
}
return @unlink($this->_cache_path . $file);
} | [
"public",
"function",
"delete",
"(",
"$",
"name",
")",
"{",
"try",
"{",
"$",
"file",
"=",
"$",
"this",
"->",
"_getFileName",
"(",
"$",
"name",
")",
";",
"}",
"catch",
"(",
"CacheException",
"$",
"e",
")",
"{",
"return",
"false",
";",
"}",
"return",... | Delete an entry from the FileCache.
@param string $name
@return boolean
@see Cache::delete() | [
"Delete",
"an",
"entry",
"from",
"the",
"FileCache",
"."
] | f24264b18bea49e97fa8a630cdda595d5b026600 | https://github.com/studyportals/Cache/blob/f24264b18bea49e97fa8a630cdda595d5b026600/src/FileCache.php#L247-L259 |
7,126 | schnittstabil/psr7-middleware-stack | src/MiddlewareStackTrait.php | MiddlewareStackTrait.push | protected function push(callable $newTopMiddleware)
{
$oldStack = $this->middlewareStack;
if ($oldStack === null) {
$this->middlewareStack = $newTopMiddleware;
return $this;
}
$this->middlewareStack = function ($request, $response, callable $next) use ($old... | php | protected function push(callable $newTopMiddleware)
{
$oldStack = $this->middlewareStack;
if ($oldStack === null) {
$this->middlewareStack = $newTopMiddleware;
return $this;
}
$this->middlewareStack = function ($request, $response, callable $next) use ($old... | [
"protected",
"function",
"push",
"(",
"callable",
"$",
"newTopMiddleware",
")",
"{",
"$",
"oldStack",
"=",
"$",
"this",
"->",
"middlewareStack",
";",
"if",
"(",
"$",
"oldStack",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"middlewareStack",
"=",
"$",
"ne... | Push a middleware onto the top of this stack.
@param callable $newTopMiddleware the middleware to be pushed onto the top.
@return static $this | [
"Push",
"a",
"middleware",
"onto",
"the",
"top",
"of",
"this",
"stack",
"."
] | e62da0bf1dae2c92014e254baef0c8b7e8c342e6 | https://github.com/schnittstabil/psr7-middleware-stack/blob/e62da0bf1dae2c92014e254baef0c8b7e8c342e6/src/MiddlewareStackTrait.php#L19-L36 |
7,127 | phlexible/phlexible | src/Phlexible/Bundle/UserBundle/Controller/GroupsController.php | GroupsController.listAction | public function listAction()
{
$groupManager = $this->get('phlexible_user.group_manager');
$groups = [];
foreach ($groupManager->findAll() as $group) {
$members = [];
foreach ($group->getUsers() as $user) {
$members[] = $user->getDisplayName();
... | php | public function listAction()
{
$groupManager = $this->get('phlexible_user.group_manager');
$groups = [];
foreach ($groupManager->findAll() as $group) {
$members = [];
foreach ($group->getUsers() as $user) {
$members[] = $user->getDisplayName();
... | [
"public",
"function",
"listAction",
"(",
")",
"{",
"$",
"groupManager",
"=",
"$",
"this",
"->",
"get",
"(",
"'phlexible_user.group_manager'",
")",
";",
"$",
"groups",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"groupManager",
"->",
"findAll",
"(",
")",
"as... | List groups.
@return JsonResponse
@Route("", name="users_groups_list")
@Method("GET")
@ApiDoc(
description="Returns a list of groups"
) | [
"List",
"groups",
"."
] | 132f24924c9bb0dbb6c1ea84db0a463f97fa3893 | https://github.com/phlexible/phlexible/blob/132f24924c9bb0dbb6c1ea84db0a463f97fa3893/src/Phlexible/Bundle/UserBundle/Controller/GroupsController.php#L43-L65 |
7,128 | phlexible/phlexible | src/Phlexible/Bundle/UserBundle/Controller/GroupsController.php | GroupsController.createAction | public function createAction(Request $request)
{
$name = $request->get('name');
$groupManager = $this->get('phlexible_user.group_manager');
$group = $groupManager->create()
->setName($name)
->setCreateUserId($this->getUser()->getId())
->setCreatedAt(new ... | php | public function createAction(Request $request)
{
$name = $request->get('name');
$groupManager = $this->get('phlexible_user.group_manager');
$group = $groupManager->create()
->setName($name)
->setCreateUserId($this->getUser()->getId())
->setCreatedAt(new ... | [
"public",
"function",
"createAction",
"(",
"Request",
"$",
"request",
")",
"{",
"$",
"name",
"=",
"$",
"request",
"->",
"get",
"(",
"'name'",
")",
";",
"$",
"groupManager",
"=",
"$",
"this",
"->",
"get",
"(",
"'phlexible_user.group_manager'",
")",
";",
"... | Create new group.
@param Request $request
@return JsonResponse
@Route("", name="users_groups_create")
@Method("POST")
@ApiDoc(
description="Create new group",
requirements={
{"name"="name", "dataType"="string", "required"=true, "description"="New group name"}
}
) | [
"Create",
"new",
"group",
"."
] | 132f24924c9bb0dbb6c1ea84db0a463f97fa3893 | https://github.com/phlexible/phlexible/blob/132f24924c9bb0dbb6c1ea84db0a463f97fa3893/src/Phlexible/Bundle/UserBundle/Controller/GroupsController.php#L82-L101 |
7,129 | phlexible/phlexible | src/Phlexible/Bundle/UserBundle/Controller/GroupsController.php | GroupsController.renameAction | public function renameAction(Request $request, $groupId)
{
$name = $request->get('name');
$groupManager = $this->get('phlexible_user.group_manager');
$group = $groupManager->find($groupId);
$oldName = $group->getName();
$group
->setName($name)
->setM... | php | public function renameAction(Request $request, $groupId)
{
$name = $request->get('name');
$groupManager = $this->get('phlexible_user.group_manager');
$group = $groupManager->find($groupId);
$oldName = $group->getName();
$group
->setName($name)
->setM... | [
"public",
"function",
"renameAction",
"(",
"Request",
"$",
"request",
",",
"$",
"groupId",
")",
"{",
"$",
"name",
"=",
"$",
"request",
"->",
"get",
"(",
"'name'",
")",
";",
"$",
"groupManager",
"=",
"$",
"this",
"->",
"get",
"(",
"'phlexible_user.group_m... | Rename group.
@param Request $request
@param string $groupId
@return JsonResponse
@Route("/{groupId}", name="users_groups_rename")
@Method("PATCH")
@ApiDoc(
description="Rename group",
requirements={
{"name"="name", "dataType"="string", "required"=true, "description"="Rename name"}
}
) | [
"Rename",
"group",
"."
] | 132f24924c9bb0dbb6c1ea84db0a463f97fa3893 | https://github.com/phlexible/phlexible/blob/132f24924c9bb0dbb6c1ea84db0a463f97fa3893/src/Phlexible/Bundle/UserBundle/Controller/GroupsController.php#L119-L138 |
7,130 | phlexible/phlexible | src/Phlexible/Bundle/UserBundle/Controller/GroupsController.php | GroupsController.deleteAction | public function deleteAction($groupId)
{
$groupManager = $this->get('phlexible_user.group_manager');
$group = $groupManager->find($groupId);
$name = $group->getName();
$groupManager->deleteGroup($group);
$this->get('phlexible_message.message_poster')
->post(Use... | php | public function deleteAction($groupId)
{
$groupManager = $this->get('phlexible_user.group_manager');
$group = $groupManager->find($groupId);
$name = $group->getName();
$groupManager->deleteGroup($group);
$this->get('phlexible_message.message_poster')
->post(Use... | [
"public",
"function",
"deleteAction",
"(",
"$",
"groupId",
")",
"{",
"$",
"groupManager",
"=",
"$",
"this",
"->",
"get",
"(",
"'phlexible_user.group_manager'",
")",
";",
"$",
"group",
"=",
"$",
"groupManager",
"->",
"find",
"(",
"$",
"groupId",
")",
";",
... | Delete group.
@param string $groupId
@return JsonResponse
@Route("/{groupId}", name="users_groups_delete")
@Method("DELETE")
@ApiDoc(
description="Delete group"
) | [
"Delete",
"group",
"."
] | 132f24924c9bb0dbb6c1ea84db0a463f97fa3893 | https://github.com/phlexible/phlexible/blob/132f24924c9bb0dbb6c1ea84db0a463f97fa3893/src/Phlexible/Bundle/UserBundle/Controller/GroupsController.php#L152-L165 |
7,131 | agalbourdin/agl-core | src/Db/Query/Count/CountAbstract.php | CountAbstract.setField | public function setField($pField, $pDistinct = false)
{
Agl::validateParams(array(
'String' => $pField,
'Bool' => $pDistinct
));
$this->_field = array(
static::FIELD_NAME => $pField,
static::FIELD_DISTINCT => $pDistinct
);
... | php | public function setField($pField, $pDistinct = false)
{
Agl::validateParams(array(
'String' => $pField,
'Bool' => $pDistinct
));
$this->_field = array(
static::FIELD_NAME => $pField,
static::FIELD_DISTINCT => $pDistinct
);
... | [
"public",
"function",
"setField",
"(",
"$",
"pField",
",",
"$",
"pDistinct",
"=",
"false",
")",
"{",
"Agl",
"::",
"validateParams",
"(",
"array",
"(",
"'String'",
"=>",
"$",
"pField",
",",
"'Bool'",
"=>",
"$",
"pDistinct",
")",
")",
";",
"$",
"this",
... | Set the main field of the count query.
@param array $pField Field name
@param bool $pDistinct Don't count duplicated fields
@return InsertAbstract | [
"Set",
"the",
"main",
"field",
"of",
"the",
"count",
"query",
"."
] | 1db556f9a49488aa9fab6887fefb7141a79ad97d | https://github.com/agalbourdin/agl-core/blob/1db556f9a49488aa9fab6887fefb7141a79ad97d/src/Db/Query/Count/CountAbstract.php#L75-L87 |
7,132 | laasti/application | src/Http/Application.php | Application.run | public function run(RequestInterface $request = null, ResponseInterface $response = null)
{
if (is_null($request)) {
if (!$this->getContainer()->has('request')) {
if ($this->getContainer()->has('Psr\Http\Message\ServerRequestInterface')) {
$this->getContainer... | php | public function run(RequestInterface $request = null, ResponseInterface $response = null)
{
if (is_null($request)) {
if (!$this->getContainer()->has('request')) {
if ($this->getContainer()->has('Psr\Http\Message\ServerRequestInterface')) {
$this->getContainer... | [
"public",
"function",
"run",
"(",
"RequestInterface",
"$",
"request",
"=",
"null",
",",
"ResponseInterface",
"$",
"response",
"=",
"null",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"request",
")",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"getContai... | Handles the request and delivers the response through the stack
@param RequestInterface|null $request Request to process
@param ResponseInterface|null $response Response to process | [
"Handles",
"the",
"request",
"and",
"delivers",
"the",
"response",
"through",
"the",
"stack"
] | f68b310f3ca189283c22c0f2eabdc7c608721019 | https://github.com/laasti/application/blob/f68b310f3ca189283c22c0f2eabdc7c608721019/src/Http/Application.php#L80-L112 |
7,133 | laasti/application | src/Http/Application.php | Application.getLogger | public function getLogger()
{
if (is_null($this->logger)) {
if ($this->getContainer()->has('logger')) {
return $this->getContainer()->get('logger');
} else if ($this->getContainer()->has('Psr\Log\LoggerInterface')) {
return $this->getContainer()->get('... | php | public function getLogger()
{
if (is_null($this->logger)) {
if ($this->getContainer()->has('logger')) {
return $this->getContainer()->get('logger');
} else if ($this->getContainer()->has('Psr\Log\LoggerInterface')) {
return $this->getContainer()->get('... | [
"public",
"function",
"getLogger",
"(",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"this",
"->",
"logger",
")",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"getContainer",
"(",
")",
"->",
"has",
"(",
"'logger'",
")",
")",
"{",
"return",
"$",
"this",
"... | Returns application logger
@return LoggerInterface | [
"Returns",
"application",
"logger"
] | f68b310f3ca189283c22c0f2eabdc7c608721019 | https://github.com/laasti/application/blob/f68b310f3ca189283c22c0f2eabdc7c608721019/src/Http/Application.php#L118-L133 |
7,134 | fezfez/keep-update | src/KeepUpdate/PropertyDAO.php | PropertyDAO.getSynchronizedProperty | public function getSynchronizedProperty(\JsonSerializable $classInstance, array $data)
{
$keys = array_keys($classInstance->jsonSerialize());
$sync = array();
// Check if all key are there
foreach ($keys as $key) {
$camelCaseKey = $this->toCamelCase($key);
i... | php | public function getSynchronizedProperty(\JsonSerializable $classInstance, array $data)
{
$keys = array_keys($classInstance->jsonSerialize());
$sync = array();
// Check if all key are there
foreach ($keys as $key) {
$camelCaseKey = $this->toCamelCase($key);
i... | [
"public",
"function",
"getSynchronizedProperty",
"(",
"\\",
"JsonSerializable",
"$",
"classInstance",
",",
"array",
"$",
"data",
")",
"{",
"$",
"keys",
"=",
"array_keys",
"(",
"$",
"classInstance",
"->",
"jsonSerialize",
"(",
")",
")",
";",
"$",
"sync",
"=",... | Retrieve the synchorinized property with return data by jsonSerialize
@param JsonSerializable $classInstance
@param array $data
@return array | [
"Retrieve",
"the",
"synchorinized",
"property",
"with",
"return",
"data",
"by",
"jsonSerialize"
] | 43a6080e8649fbad9e7edf8a18186e81f2cd145d | https://github.com/fezfez/keep-update/blob/43a6080e8649fbad9e7edf8a18186e81f2cd145d/src/KeepUpdate/PropertyDAO.php#L22-L39 |
7,135 | okaufmann/google-movies-client | src/GoogleMoviesClient/Helpers/ParseHelper.php | ParseHelper.getParamFromLink | public static function getParamFromLink($url, $paramName)
{
if (!$url) {
throw new \InvalidArgumentException('url');
}
if (!$paramName) {
throw new \InvalidArgumentException('paramName');
}
$parts = parse_url(html_entity_decode($url));
if (is... | php | public static function getParamFromLink($url, $paramName)
{
if (!$url) {
throw new \InvalidArgumentException('url');
}
if (!$paramName) {
throw new \InvalidArgumentException('paramName');
}
$parts = parse_url(html_entity_decode($url));
if (is... | [
"public",
"static",
"function",
"getParamFromLink",
"(",
"$",
"url",
",",
"$",
"paramName",
")",
"{",
"if",
"(",
"!",
"$",
"url",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"'url'",
")",
";",
"}",
"if",
"(",
"!",
"$",
"paramName",... | Get value of a passes param in a query.
@param $url
@param $paramName
@return null | [
"Get",
"value",
"of",
"a",
"passes",
"param",
"in",
"a",
"query",
"."
] | 70ad4d3c640016cf24a0fd45ed8509029a6c02c6 | https://github.com/okaufmann/google-movies-client/blob/70ad4d3c640016cf24a0fd45ed8509029a6c02c6/src/GoogleMoviesClient/Helpers/ParseHelper.php#L15-L34 |
7,136 | romeOz/rock-template | src/template/Html.php | Html.beginForm | public static function beginForm($action = null, $method = 'post', $name = null, $options = [])
{
$hiddenInputs = [];
$action = (array)$action;
if (!isset($url['@scheme'])) {
$action['@scheme'] = Url::ABS;
}
$action = Url::modify($action);
$request = Insta... | php | public static function beginForm($action = null, $method = 'post', $name = null, $options = [])
{
$hiddenInputs = [];
$action = (array)$action;
if (!isset($url['@scheme'])) {
$action['@scheme'] = Url::ABS;
}
$action = Url::modify($action);
$request = Insta... | [
"public",
"static",
"function",
"beginForm",
"(",
"$",
"action",
"=",
"null",
",",
"$",
"method",
"=",
"'post'",
",",
"$",
"name",
"=",
"null",
",",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"hiddenInputs",
"=",
"[",
"]",
";",
"$",
"action",
... | Generates a form start tag.
@param array|string $action the form action URL. This parameter
will be processed by {@see \rock\url\Url::getAbsoluteUrl()}.
@param string $method the form submission method, such as "post", "get", "put", "delete" (case-insensitive).
Since most browsers only support "post" and "get", if oth... | [
"Generates",
"a",
"form",
"start",
"tag",
"."
] | fcb7bd6dd923d11f02a1c71a63065f3f49728e92 | https://github.com/romeOz/rock-template/blob/fcb7bd6dd923d11f02a1c71a63065f3f49728e92/src/template/Html.php#L312-L367 |
7,137 | romeOz/rock-template | src/template/Html.php | Html.checkbox | public static function checkbox($name, $checked = false, $options = [])
{
$options['checked'] = (boolean)$checked;
$value = array_key_exists('value', $options) ? $options['value'] : '1';
if (isset($options['uncheck'])) {
// add a hidden field so that if the checkbox is not select... | php | public static function checkbox($name, $checked = false, $options = [])
{
$options['checked'] = (boolean)$checked;
$value = array_key_exists('value', $options) ? $options['value'] : '1';
if (isset($options['uncheck'])) {
// add a hidden field so that if the checkbox is not select... | [
"public",
"static",
"function",
"checkbox",
"(",
"$",
"name",
",",
"$",
"checked",
"=",
"false",
",",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"options",
"[",
"'checked'",
"]",
"=",
"(",
"boolean",
")",
"$",
"checked",
";",
"$",
"value",
"=",
... | Generates a checkbox input.
@param string $name the name attribute.
@param boolean $checked whether the checkbox should be checked.
@param array $options the tag options in terms of name-value pairs. The following options are specially handled:
- uncheck: string, the value associated with the uncheck state of the che... | [
"Generates",
"a",
"checkbox",
"input",
"."
] | fcb7bd6dd923d11f02a1c71a63065f3f49728e92 | https://github.com/romeOz/rock-template/blob/fcb7bd6dd923d11f02a1c71a63065f3f49728e92/src/template/Html.php#L769-L789 |
7,138 | romeOz/rock-template | src/template/Html.php | Html.removeCssClass | public static function removeCssClass(&$options, $class)
{
if (isset($options['class'])) {
$classes = array_unique(preg_split('/\s+/', $options['class'] . ' ' . $class, -1, PREG_SPLIT_NO_EMPTY));
if (($index = array_search($class, $classes)) !== false) {
unset($classe... | php | public static function removeCssClass(&$options, $class)
{
if (isset($options['class'])) {
$classes = array_unique(preg_split('/\s+/', $options['class'] . ' ' . $class, -1, PREG_SPLIT_NO_EMPTY));
if (($index = array_search($class, $classes)) !== false) {
unset($classe... | [
"public",
"static",
"function",
"removeCssClass",
"(",
"&",
"$",
"options",
",",
"$",
"class",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"options",
"[",
"'class'",
"]",
")",
")",
"{",
"$",
"classes",
"=",
"array_unique",
"(",
"preg_split",
"(",
"'/\\s+/'... | Removes a CSS class from the specified options.
@param array $options the options to be modified.
@param string $class the CSS class to be removed | [
"Removes",
"a",
"CSS",
"class",
"from",
"the",
"specified",
"options",
"."
] | fcb7bd6dd923d11f02a1c71a63065f3f49728e92 | https://github.com/romeOz/rock-template/blob/fcb7bd6dd923d11f02a1c71a63065f3f49728e92/src/template/Html.php#L1265-L1278 |
7,139 | romeOz/rock-template | src/template/Html.php | Html.addCssStyle | public static function addCssStyle(&$options, $style, $overwrite = true)
{
if (!empty($options['style'])) {
$oldStyle = static::cssStyleToArray($options['style']);
$newStyle = is_array($style) ? $style : static::cssStyleToArray($style);
if (!$overwrite) {
... | php | public static function addCssStyle(&$options, $style, $overwrite = true)
{
if (!empty($options['style'])) {
$oldStyle = static::cssStyleToArray($options['style']);
$newStyle = is_array($style) ? $style : static::cssStyleToArray($style);
if (!$overwrite) {
... | [
"public",
"static",
"function",
"addCssStyle",
"(",
"&",
"$",
"options",
",",
"$",
"style",
",",
"$",
"overwrite",
"=",
"true",
")",
"{",
"if",
"(",
"!",
"empty",
"(",
"$",
"options",
"[",
"'style'",
"]",
")",
")",
"{",
"$",
"oldStyle",
"=",
"stati... | Adds the specified CSS style to the HTML options.
If the options already contain a `style` element, the new style will be merged
with the existing one. If a CSS property exists in both the new and the old styles,
the old one may be overwritten if `$overwrite` is true.
For example,
```php
Html::addCssStyle($options, ... | [
"Adds",
"the",
"specified",
"CSS",
"style",
"to",
"the",
"HTML",
"options",
"."
] | fcb7bd6dd923d11f02a1c71a63065f3f49728e92 | https://github.com/romeOz/rock-template/blob/fcb7bd6dd923d11f02a1c71a63065f3f49728e92/src/template/Html.php#L1302-L1317 |
7,140 | romeOz/rock-template | src/template/Html.php | Html.removeCssStyle | public static function removeCssStyle(&$options, $properties)
{
if (!empty($options['style'])) {
$style = static::cssStyleToArray($options['style']);
foreach ((array)$properties as $property) {
unset($style[$property]);
}
$options['style'] = st... | php | public static function removeCssStyle(&$options, $properties)
{
if (!empty($options['style'])) {
$style = static::cssStyleToArray($options['style']);
foreach ((array)$properties as $property) {
unset($style[$property]);
}
$options['style'] = st... | [
"public",
"static",
"function",
"removeCssStyle",
"(",
"&",
"$",
"options",
",",
"$",
"properties",
")",
"{",
"if",
"(",
"!",
"empty",
"(",
"$",
"options",
"[",
"'style'",
"]",
")",
")",
"{",
"$",
"style",
"=",
"static",
"::",
"cssStyleToArray",
"(",
... | Removes the specified CSS style from the HTML options.
For example,
```php
Html::removeCssStyle($options, ['width', 'height']);
```
@param array $options the HTML options to be modified.
@param string|array $properties the CSS properties to be removed. You may use a string
if you are removing a single property.
@see... | [
"Removes",
"the",
"specified",
"CSS",
"style",
"from",
"the",
"HTML",
"options",
"."
] | fcb7bd6dd923d11f02a1c71a63065f3f49728e92 | https://github.com/romeOz/rock-template/blob/fcb7bd6dd923d11f02a1c71a63065f3f49728e92/src/template/Html.php#L1333-L1342 |
7,141 | romeOz/rock-template | src/template/Html.php | Html.fromArray | public static function fromArray(array $data)
{
$result = '';
foreach ($data as $name => $value) {
$value = StringHelper::toString($value, "'", Serialize::SERIALIZE_JSON);
$result .= "$name=$value; ";
}
return $result === '' ? null : rtrim($result);
} | php | public static function fromArray(array $data)
{
$result = '';
foreach ($data as $name => $value) {
$value = StringHelper::toString($value, "'", Serialize::SERIALIZE_JSON);
$result .= "$name=$value; ";
}
return $result === '' ? null : rtrim($result);
} | [
"public",
"static",
"function",
"fromArray",
"(",
"array",
"$",
"data",
")",
"{",
"$",
"result",
"=",
"''",
";",
"foreach",
"(",
"$",
"data",
"as",
"$",
"name",
"=>",
"$",
"value",
")",
"{",
"$",
"value",
"=",
"StringHelper",
"::",
"toString",
"(",
... | Converts a array into a string representation.
For example,
```php
print_r(Html::fromArray(['width' => '100px', 'height' => '200px']));
// will display: 'width=100px; height=200px;'
```
@param array $data list data
@return string | [
"Converts",
"a",
"array",
"into",
"a",
"string",
"representation",
"."
] | fcb7bd6dd923d11f02a1c71a63065f3f49728e92 | https://github.com/romeOz/rock-template/blob/fcb7bd6dd923d11f02a1c71a63065f3f49728e92/src/template/Html.php#L1357-L1366 |
7,142 | lemonphp/cli | src/App.php | App.boot | protected function boot()
{
if ($this->booted) {
return;
}
$this->booted = true;
foreach ($this->eventSubscribers as $subscriber) {
$this->container['eventDispatcher']->addSubscriber($subscriber);
}
} | php | protected function boot()
{
if ($this->booted) {
return;
}
$this->booted = true;
foreach ($this->eventSubscribers as $subscriber) {
$this->container['eventDispatcher']->addSubscriber($subscriber);
}
} | [
"protected",
"function",
"boot",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"booted",
")",
"{",
"return",
";",
"}",
"$",
"this",
"->",
"booted",
"=",
"true",
";",
"foreach",
"(",
"$",
"this",
"->",
"eventSubscribers",
"as",
"$",
"subscriber",
")",
... | Boots the Application by calling boot on every provider added and then subscribe
in order to add listeners.
@return void | [
"Boots",
"the",
"Application",
"by",
"calling",
"boot",
"on",
"every",
"provider",
"added",
"and",
"then",
"subscribe",
"in",
"order",
"to",
"add",
"listeners",
"."
] | 55b11789621f106ba33f6f6dec88d12ad953b625 | https://github.com/lemonphp/cli/blob/55b11789621f106ba33f6f6dec88d12ad953b625/src/App.php#L105-L115 |
7,143 | lemonphp/cli | src/App.php | App.run | public function run(InputInterface $input = null, OutputInterface $output = null)
{
$this->boot();
return $this->container['console']->run($input, $output);
} | php | public function run(InputInterface $input = null, OutputInterface $output = null)
{
$this->boot();
return $this->container['console']->run($input, $output);
} | [
"public",
"function",
"run",
"(",
"InputInterface",
"$",
"input",
"=",
"null",
",",
"OutputInterface",
"$",
"output",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"boot",
"(",
")",
";",
"return",
"$",
"this",
"->",
"container",
"[",
"'console'",
"]",
"->"... | Executes this application
@param \Symfony\Component\Console\Input\InputInterface|null $input
@param \Symfony\Component\Console\Output\OutputInterface|null $output
@return int | [
"Executes",
"this",
"application"
] | 55b11789621f106ba33f6f6dec88d12ad953b625 | https://github.com/lemonphp/cli/blob/55b11789621f106ba33f6f6dec88d12ad953b625/src/App.php#L124-L129 |
7,144 | diatem-net/jin-com | src/Com/WebService/WSClient.php | WSClient.service | public function service($fonction, $listArgument = array())
{
try {
return $this->client->__soapCall($fonction, $listArgument);
} catch (\Exception $e) {
throw new \Exception('Erreur lors de l\'appel de la méthode ' . $fonction . ' du webservice : ' . $e->getMessage());
return nu... | php | public function service($fonction, $listArgument = array())
{
try {
return $this->client->__soapCall($fonction, $listArgument);
} catch (\Exception $e) {
throw new \Exception('Erreur lors de l\'appel de la méthode ' . $fonction . ' du webservice : ' . $e->getMessage());
return nu... | [
"public",
"function",
"service",
"(",
"$",
"fonction",
",",
"$",
"listArgument",
"=",
"array",
"(",
")",
")",
"{",
"try",
"{",
"return",
"$",
"this",
"->",
"client",
"->",
"__soapCall",
"(",
"$",
"fonction",
",",
"$",
"listArgument",
")",
";",
"}",
"... | Permet d'appeler une fonction du webservice
@param string $fonction Fonction du webservice à utiliser
@param array $listArgument Tableau associatifs d'arguments pour la fonction (cle => valeur)
@return object Renvoie le résultat de la fonction du webservice utilisée | [
"Permet",
"d",
"appeler",
"une",
"fonction",
"du",
"webservice"
] | 7449f555676cc058130377d74c845ff91b6b286f | https://github.com/diatem-net/jin-com/blob/7449f555676cc058130377d74c845ff91b6b286f/src/Com/WebService/WSClient.php#L44-L52 |
7,145 | mvlabs/MvlabsLumber | src/MvlabsLumber/Service/Logger.php | Logger.getChannel | public function getChannel($s_channelName) {
if (!array_key_exists($s_channelName, $this->aI_channels)) {
throw new \UnexpectedValueException('Channel ' . $s_channelName . ' does not exist');
}
return $this->aI_channels[$s_channelName];
} | php | public function getChannel($s_channelName) {
if (!array_key_exists($s_channelName, $this->aI_channels)) {
throw new \UnexpectedValueException('Channel ' . $s_channelName . ' does not exist');
}
return $this->aI_channels[$s_channelName];
} | [
"public",
"function",
"getChannel",
"(",
"$",
"s_channelName",
")",
"{",
"if",
"(",
"!",
"array_key_exists",
"(",
"$",
"s_channelName",
",",
"$",
"this",
"->",
"aI_channels",
")",
")",
"{",
"throw",
"new",
"\\",
"UnexpectedValueException",
"(",
"'Channel '",
... | Gets a spcific channel
@param string $s_channelName Channel name | [
"Gets",
"a",
"spcific",
"channel"
] | b9491b5b6f3a68ed18018408243cdd594424c5e2 | https://github.com/mvlabs/MvlabsLumber/blob/b9491b5b6f3a68ed18018408243cdd594424c5e2/src/MvlabsLumber/Service/Logger.php#L126-L133 |
7,146 | mvlabs/MvlabsLumber | src/MvlabsLumber/Service/Logger.php | Logger.removeChannel | public function removeChannel($s_channelName) {
if (!array_key_exists($s_channelName, $this->aI_channels)) {
throw new \UnexpectedValueException('Channel ' . $s_channelName . ' does not exist. Cannot remove it');
}
unset($this->aI_channels[$s_channelName]);
} | php | public function removeChannel($s_channelName) {
if (!array_key_exists($s_channelName, $this->aI_channels)) {
throw new \UnexpectedValueException('Channel ' . $s_channelName . ' does not exist. Cannot remove it');
}
unset($this->aI_channels[$s_channelName]);
} | [
"public",
"function",
"removeChannel",
"(",
"$",
"s_channelName",
")",
"{",
"if",
"(",
"!",
"array_key_exists",
"(",
"$",
"s_channelName",
",",
"$",
"this",
"->",
"aI_channels",
")",
")",
"{",
"throw",
"new",
"\\",
"UnexpectedValueException",
"(",
"'Channel '"... | Removes a channel from list of registered ones
@param string $s_channelName Channel name | [
"Removes",
"a",
"channel",
"from",
"list",
"of",
"registered",
"ones"
] | b9491b5b6f3a68ed18018408243cdd594424c5e2 | https://github.com/mvlabs/MvlabsLumber/blob/b9491b5b6f3a68ed18018408243cdd594424c5e2/src/MvlabsLumber/Service/Logger.php#L141-L148 |
7,147 | mvlabs/MvlabsLumber | src/MvlabsLumber/Service/Logger.php | Logger.log | public function log($s_message, $s_level = 'notice', array $am_context = array()) {
if (!$this->isValidSeverityLevel($s_level)) {
throw new \OutOfRangeException('Severity level ' . $s_level . ' is invalid and can not be used');
}
foreach ($this->aI_channels as $s_channelName => $I_channel) {
... | php | public function log($s_message, $s_level = 'notice', array $am_context = array()) {
if (!$this->isValidSeverityLevel($s_level)) {
throw new \OutOfRangeException('Severity level ' . $s_level . ' is invalid and can not be used');
}
foreach ($this->aI_channels as $s_channelName => $I_channel) {
... | [
"public",
"function",
"log",
"(",
"$",
"s_message",
",",
"$",
"s_level",
"=",
"'notice'",
",",
"array",
"$",
"am_context",
"=",
"array",
"(",
")",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"isValidSeverityLevel",
"(",
"$",
"s_level",
")",
")",
"{"... | Logs with severity level to all registered channels
@param string $s_message Main message content
@param mixed $s_level Message severity level. Default is null, which will result in info, as commonly found in logger implementations
@param array $am_context Message context - IE Additional information
@return null | [
"Logs",
"with",
"severity",
"level",
"to",
"all",
"registered",
"channels"
] | b9491b5b6f3a68ed18018408243cdd594424c5e2 | https://github.com/mvlabs/MvlabsLumber/blob/b9491b5b6f3a68ed18018408243cdd594424c5e2/src/MvlabsLumber/Service/Logger.php#L159-L169 |
7,148 | face-orm/face | lib/Face/DiORM.php | DiORM.select | public function select(Sql\Query\FQuery $fQuery, $useGlobalInstanceKeeper = false)
{
$statement=$fQuery->execute($this->config->getPdo());
if($useGlobalInstanceKeeper){
$instanceKeeper = $this->instancesKeeper;
}else{
$instanceKeeper = new InstancesKeeper();
... | php | public function select(Sql\Query\FQuery $fQuery, $useGlobalInstanceKeeper = false)
{
$statement=$fQuery->execute($this->config->getPdo());
if($useGlobalInstanceKeeper){
$instanceKeeper = $this->instancesKeeper;
}else{
$instanceKeeper = new InstancesKeeper();
... | [
"public",
"function",
"select",
"(",
"Sql",
"\\",
"Query",
"\\",
"FQuery",
"$",
"fQuery",
",",
"$",
"useGlobalInstanceKeeper",
"=",
"false",
")",
"{",
"$",
"statement",
"=",
"$",
"fQuery",
"->",
"execute",
"(",
"$",
"this",
"->",
"config",
"->",
"getPdo"... | Execute a select query, parse the result and returns a resultSet
@param \Face\Sql\Query\FQuery $fQuery
@return Sql\Result\ResultSet | [
"Execute",
"a",
"select",
"query",
"parse",
"the",
"result",
"and",
"returns",
"a",
"resultSet"
] | 85b412c66ff41d0fe73b7e7b69bc9a5ac5f7f428 | https://github.com/face-orm/face/blob/85b412c66ff41d0fe73b7e7b69bc9a5ac5f7f428/lib/Face/DiORM.php#L84-L101 |
7,149 | face-orm/face | lib/Face/DiORM.php | DiORM.simpleInsert | public function simpleInsert($entity){
$simpleInsert = new SimpleInsert($entity,$this->getConfig());
return $this->insert($simpleInsert);
} | php | public function simpleInsert($entity){
$simpleInsert = new SimpleInsert($entity,$this->getConfig());
return $this->insert($simpleInsert);
} | [
"public",
"function",
"simpleInsert",
"(",
"$",
"entity",
")",
"{",
"$",
"simpleInsert",
"=",
"new",
"SimpleInsert",
"(",
"$",
"entity",
",",
"$",
"this",
"->",
"getConfig",
"(",
")",
")",
";",
"return",
"$",
"this",
"->",
"insert",
"(",
"$",
"simpleIn... | performs a SimpleInsert query for the given entity
@param $entity
@return InsertResult | [
"performs",
"a",
"SimpleInsert",
"query",
"for",
"the",
"given",
"entity"
] | 85b412c66ff41d0fe73b7e7b69bc9a5ac5f7f428 | https://github.com/face-orm/face/blob/85b412c66ff41d0fe73b7e7b69bc9a5ac5f7f428/lib/Face/DiORM.php#L119-L122 |
7,150 | face-orm/face | lib/Face/DiORM.php | DiORM.simpleUpdate | public function simpleUpdate($entity){
$simpleUpdate = new SimpleUpdate($entity,$this->getConfig());
return $this->update($simpleUpdate);
} | php | public function simpleUpdate($entity){
$simpleUpdate = new SimpleUpdate($entity,$this->getConfig());
return $this->update($simpleUpdate);
} | [
"public",
"function",
"simpleUpdate",
"(",
"$",
"entity",
")",
"{",
"$",
"simpleUpdate",
"=",
"new",
"SimpleUpdate",
"(",
"$",
"entity",
",",
"$",
"this",
"->",
"getConfig",
"(",
")",
")",
";",
"return",
"$",
"this",
"->",
"update",
"(",
"$",
"simpleUp... | performs a SimpleUpdate query for the given entity
@param $entity
@return UpdateResult | [
"performs",
"a",
"SimpleUpdate",
"query",
"for",
"the",
"given",
"entity"
] | 85b412c66ff41d0fe73b7e7b69bc9a5ac5f7f428 | https://github.com/face-orm/face/blob/85b412c66ff41d0fe73b7e7b69bc9a5ac5f7f428/lib/Face/DiORM.php#L140-L143 |
7,151 | face-orm/face | lib/Face/DiORM.php | DiORM.simpleDelete | public function simpleDelete($entity){
$simpleDelete = new SimpleDelete($entity,$this->getConfig());
return $this->delete($simpleDelete);
} | php | public function simpleDelete($entity){
$simpleDelete = new SimpleDelete($entity,$this->getConfig());
return $this->delete($simpleDelete);
} | [
"public",
"function",
"simpleDelete",
"(",
"$",
"entity",
")",
"{",
"$",
"simpleDelete",
"=",
"new",
"SimpleDelete",
"(",
"$",
"entity",
",",
"$",
"this",
"->",
"getConfig",
"(",
")",
")",
";",
"return",
"$",
"this",
"->",
"delete",
"(",
"$",
"simpleDe... | performs a SimpleDelete query for the given entity
@param $entity
@return DeleteResult | [
"performs",
"a",
"SimpleDelete",
"query",
"for",
"the",
"given",
"entity"
] | 85b412c66ff41d0fe73b7e7b69bc9a5ac5f7f428 | https://github.com/face-orm/face/blob/85b412c66ff41d0fe73b7e7b69bc9a5ac5f7f428/lib/Face/DiORM.php#L166-L169 |
7,152 | squire-assistant/process | Process.php | Process.getCommandLine | public function getCommandLine()
{
return is_array($this->commandline) ? implode(' ', array_map(array($this, 'escapeArgument'), $this->commandline)) : $this->commandline;
} | php | public function getCommandLine()
{
return is_array($this->commandline) ? implode(' ', array_map(array($this, 'escapeArgument'), $this->commandline)) : $this->commandline;
} | [
"public",
"function",
"getCommandLine",
"(",
")",
"{",
"return",
"is_array",
"(",
"$",
"this",
"->",
"commandline",
")",
"?",
"implode",
"(",
"' '",
",",
"array_map",
"(",
"array",
"(",
"$",
"this",
",",
"'escapeArgument'",
")",
",",
"$",
"this",
"->",
... | Gets the command line to be executed.
@return string The command to execute | [
"Gets",
"the",
"command",
"line",
"to",
"be",
"executed",
"."
] | 472d47ef8f312fc0c6c1eb26df1e508550aea243 | https://github.com/squire-assistant/process/blob/472d47ef8f312fc0c6c1eb26df1e508550aea243/Process.php#L937-L940 |
7,153 | squire-assistant/process | Process.php | Process.setOptions | public function setOptions(array $options)
{
@trigger_error(sprintf('The %s() method is deprecated since version 3.3 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED);
$this->options = $options;
return $this;
} | php | public function setOptions(array $options)
{
@trigger_error(sprintf('The %s() method is deprecated since version 3.3 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED);
$this->options = $options;
return $this;
} | [
"public",
"function",
"setOptions",
"(",
"array",
"$",
"options",
")",
"{",
"@",
"trigger_error",
"(",
"sprintf",
"(",
"'The %s() method is deprecated since version 3.3 and will be removed in 4.0.'",
",",
"__METHOD__",
")",
",",
"E_USER_DEPRECATED",
")",
";",
"$",
"this... | Sets the options for proc_open.
@param array $options The new options
@return self The current Process instance
@deprecated since version 3.3, to be removed in 4.0. | [
"Sets",
"the",
"options",
"for",
"proc_open",
"."
] | 472d47ef8f312fc0c6c1eb26df1e508550aea243 | https://github.com/squire-assistant/process/blob/472d47ef8f312fc0c6c1eb26df1e508550aea243/Process.php#L1204-L1211 |
7,154 | squire-assistant/process | Process.php | Process.setEnhanceWindowsCompatibility | public function setEnhanceWindowsCompatibility($enhance)
{
@trigger_error(sprintf('The %s() method is deprecated since version 3.3 and will be removed in 4.0. Enhanced Windows compatibility will always be enabled.', __METHOD__), E_USER_DEPRECATED);
$this->enhanceWindowsCompatibility = (bool) $enhan... | php | public function setEnhanceWindowsCompatibility($enhance)
{
@trigger_error(sprintf('The %s() method is deprecated since version 3.3 and will be removed in 4.0. Enhanced Windows compatibility will always be enabled.', __METHOD__), E_USER_DEPRECATED);
$this->enhanceWindowsCompatibility = (bool) $enhan... | [
"public",
"function",
"setEnhanceWindowsCompatibility",
"(",
"$",
"enhance",
")",
"{",
"@",
"trigger_error",
"(",
"sprintf",
"(",
"'The %s() method is deprecated since version 3.3 and will be removed in 4.0. Enhanced Windows compatibility will always be enabled.'",
",",
"__METHOD__",
... | Sets whether or not Windows compatibility is enabled.
@param bool $enhance
@return self The current Process instance
@deprecated since version 3.3, to be removed in 4.0. Enhanced Windows compatibility will always be enabled. | [
"Sets",
"whether",
"or",
"not",
"Windows",
"compatibility",
"is",
"enabled",
"."
] | 472d47ef8f312fc0c6c1eb26df1e508550aea243 | https://github.com/squire-assistant/process/blob/472d47ef8f312fc0c6c1eb26df1e508550aea243/Process.php#L1238-L1245 |
7,155 | squire-assistant/process | Process.php | Process.setEnhanceSigchildCompatibility | public function setEnhanceSigchildCompatibility($enhance)
{
@trigger_error(sprintf('The %s() method is deprecated since version 3.3 and will be removed in 4.0. Sigchild compatibility will always be enabled.', __METHOD__), E_USER_DEPRECATED);
$this->enhanceSigchildCompatibility = (bool) $enhance;
... | php | public function setEnhanceSigchildCompatibility($enhance)
{
@trigger_error(sprintf('The %s() method is deprecated since version 3.3 and will be removed in 4.0. Sigchild compatibility will always be enabled.', __METHOD__), E_USER_DEPRECATED);
$this->enhanceSigchildCompatibility = (bool) $enhance;
... | [
"public",
"function",
"setEnhanceSigchildCompatibility",
"(",
"$",
"enhance",
")",
"{",
"@",
"trigger_error",
"(",
"sprintf",
"(",
"'The %s() method is deprecated since version 3.3 and will be removed in 4.0. Sigchild compatibility will always be enabled.'",
",",
"__METHOD__",
")",
... | Activates sigchild compatibility mode.
Sigchild compatibility mode is required to get the exit code and
determine the success of a process when PHP has been compiled with
the --enable-sigchild option
@param bool $enhance
@return self The current Process instance
@deprecated since version 3.3, to be removed in 4.0. | [
"Activates",
"sigchild",
"compatibility",
"mode",
"."
] | 472d47ef8f312fc0c6c1eb26df1e508550aea243 | https://github.com/squire-assistant/process/blob/472d47ef8f312fc0c6c1eb26df1e508550aea243/Process.php#L1274-L1281 |
7,156 | SergioMadness/framework | framework/basic/RouteHandler.php | RouteHandler.getHandlerByName | public static function getHandlerByName($name)
{
return isset(self::$namedRoutes[$name]) ? self::$namedRoutes[$name][1] : null;
} | php | public static function getHandlerByName($name)
{
return isset(self::$namedRoutes[$name]) ? self::$namedRoutes[$name][1] : null;
} | [
"public",
"static",
"function",
"getHandlerByName",
"(",
"$",
"name",
")",
"{",
"return",
"isset",
"(",
"self",
"::",
"$",
"namedRoutes",
"[",
"$",
"name",
"]",
")",
"?",
"self",
"::",
"$",
"namedRoutes",
"[",
"$",
"name",
"]",
"[",
"1",
"]",
":",
... | Get handler by name
@param string $name
@return string | [
"Get",
"handler",
"by",
"name"
] | a5038eb926a5038b9a331d0cb6a68d7fc3cf1f1e | https://github.com/SergioMadness/framework/blob/a5038eb926a5038b9a331d0cb6a68d7fc3cf1f1e/framework/basic/RouteHandler.php#L81-L84 |
7,157 | SergioMadness/framework | framework/basic/RouteHandler.php | RouteHandler.getHandlerByPath | public static function getHandlerByPath($path)
{
$result = null;
$path = self::prepareRoute('/'.trim($path, " /"));
foreach (static::$routes as $key => $handler) {
$matches = [];
if (preg_match('#'.$key.'$#i', $path, $matches)) {
foreach ($matches a... | php | public static function getHandlerByPath($path)
{
$result = null;
$path = self::prepareRoute('/'.trim($path, " /"));
foreach (static::$routes as $key => $handler) {
$matches = [];
if (preg_match('#'.$key.'$#i', $path, $matches)) {
foreach ($matches a... | [
"public",
"static",
"function",
"getHandlerByPath",
"(",
"$",
"path",
")",
"{",
"$",
"result",
"=",
"null",
";",
"$",
"path",
"=",
"self",
"::",
"prepareRoute",
"(",
"'/'",
".",
"trim",
"(",
"$",
"path",
",",
"\" /\"",
")",
")",
";",
"foreach",
"(",
... | Get handler by path
@param string $path
@return string | [
"Get",
"handler",
"by",
"path"
] | a5038eb926a5038b9a331d0cb6a68d7fc3cf1f1e | https://github.com/SergioMadness/framework/blob/a5038eb926a5038b9a331d0cb6a68d7fc3cf1f1e/framework/basic/RouteHandler.php#L92-L110 |
7,158 | SergioMadness/framework | framework/basic/RouteHandler.php | RouteHandler.parseRoute | public static function parseRoute($url)
{
$result = null;
$parts = explode('/', trim($url, '/'));
if (count($parts) === 1) {
$parts[0] = $parts[0] === '' ? self::DEFAULT_CONTROLLER : $parts[0];
$parts[1] = self::DEFAULT_ACTION;
}
$action ... | php | public static function parseRoute($url)
{
$result = null;
$parts = explode('/', trim($url, '/'));
if (count($parts) === 1) {
$parts[0] = $parts[0] === '' ? self::DEFAULT_CONTROLLER : $parts[0];
$parts[1] = self::DEFAULT_ACTION;
}
$action ... | [
"public",
"static",
"function",
"parseRoute",
"(",
"$",
"url",
")",
"{",
"$",
"result",
"=",
"null",
";",
"$",
"parts",
"=",
"explode",
"(",
"'/'",
",",
"trim",
"(",
"$",
"url",
",",
"'/'",
")",
")",
";",
"if",
"(",
"count",
"(",
"$",
"parts",
... | Parse url to callable
@param string $url
@return string | [
"Parse",
"url",
"to",
"callable"
] | a5038eb926a5038b9a331d0cb6a68d7fc3cf1f1e | https://github.com/SergioMadness/framework/blob/a5038eb926a5038b9a331d0cb6a68d7fc3cf1f1e/framework/basic/RouteHandler.php#L118-L138 |
7,159 | SergioMadness/framework | framework/basic/RouteHandler.php | RouteHandler.preparePart | public static function preparePart($part, $firstLower = false)
{
$result = str_replace(' ', '', ucwords(str_replace('-', ' ', $part)));
if ($firstLower && mb_strlen($result) > 0) {
$result[0] = mb_strtolower($result[0]);
}
return $result;
} | php | public static function preparePart($part, $firstLower = false)
{
$result = str_replace(' ', '', ucwords(str_replace('-', ' ', $part)));
if ($firstLower && mb_strlen($result) > 0) {
$result[0] = mb_strtolower($result[0]);
}
return $result;
} | [
"public",
"static",
"function",
"preparePart",
"(",
"$",
"part",
",",
"$",
"firstLower",
"=",
"false",
")",
"{",
"$",
"result",
"=",
"str_replace",
"(",
"' '",
",",
"''",
",",
"ucwords",
"(",
"str_replace",
"(",
"'-'",
",",
"' '",
",",
"$",
"part",
"... | Converts main-action to mainAction
@param string $part
@return string | [
"Converts",
"main",
"-",
"action",
"to",
"mainAction"
] | a5038eb926a5038b9a331d0cb6a68d7fc3cf1f1e | https://github.com/SergioMadness/framework/blob/a5038eb926a5038b9a331d0cb6a68d7fc3cf1f1e/framework/basic/RouteHandler.php#L146-L153 |
7,160 | Stratadox/HydrationMapper | src/Instruction/Is.php | Is.type | private static function type(
string $className,
string $constructor = self::SAME_KEY,
string $key = null
): DefinesTheType {
return new Is($className, $constructor, [], $key);
} | php | private static function type(
string $className,
string $constructor = self::SAME_KEY,
string $key = null
): DefinesTheType {
return new Is($className, $constructor, [], $key);
} | [
"private",
"static",
"function",
"type",
"(",
"string",
"$",
"className",
",",
"string",
"$",
"constructor",
"=",
"self",
"::",
"SAME_KEY",
",",
"string",
"$",
"key",
"=",
"null",
")",
":",
"DefinesTheType",
"{",
"return",
"new",
"Is",
"(",
"$",
"classNa... | Declare that the property is of the type.
@param string $className Class name of the property mapping.
@param string $constructor Constructor name to use.
@param string|null $key Data key to use.
@return DefinesTheType The mapping instruction. | [
"Declare",
"that",
"the",
"property",
"is",
"of",
"the",
"type",
"."
] | d9bf1f10b7626312e0a2466a2ef255ec972acb41 | https://github.com/Stratadox/HydrationMapper/blob/d9bf1f10b7626312e0a2466a2ef255ec972acb41/src/Instruction/Is.php#L137-L143 |
7,161 | Stratadox/HydrationMapper | src/Instruction/Is.php | Is.decoratedType | private static function decoratedType(
string $className,
string $constructor,
array $decorators,
string $key = null
): DefinesTheType {
return new Is($className, $constructor, $decorators, $key);
} | php | private static function decoratedType(
string $className,
string $constructor,
array $decorators,
string $key = null
): DefinesTheType {
return new Is($className, $constructor, $decorators, $key);
} | [
"private",
"static",
"function",
"decoratedType",
"(",
"string",
"$",
"className",
",",
"string",
"$",
"constructor",
",",
"array",
"$",
"decorators",
",",
"string",
"$",
"key",
"=",
"null",
")",
":",
"DefinesTheType",
"{",
"return",
"new",
"Is",
"(",
"$",... | Declare that the property is of the decorated type.
@param string $className Class name of the property mapping.
@param string $constructor Constructor name to use.
@param string[] $decorators Decorator full constructor names.
@param string|null $key Data key to use.
@return DefinesTheType ... | [
"Declare",
"that",
"the",
"property",
"is",
"of",
"the",
"decorated",
"type",
"."
] | d9bf1f10b7626312e0a2466a2ef255ec972acb41 | https://github.com/Stratadox/HydrationMapper/blob/d9bf1f10b7626312e0a2466a2ef255ec972acb41/src/Instruction/Is.php#L154-L161 |
7,162 | coolms/common | src/View/Helper/Decorator/Decorator.php | Decorator.prepare | protected function prepare($markup, $decorators)
{
$param_arr = func_get_args();
if (is_array($decorators)) {
$param_arr[1] = new \ArrayObject($decorators);
}
$order = 0;
$sortAux = [];
foreach ($param_arr[1] as $decorator => $options) {
if (... | php | protected function prepare($markup, $decorators)
{
$param_arr = func_get_args();
if (is_array($decorators)) {
$param_arr[1] = new \ArrayObject($decorators);
}
$order = 0;
$sortAux = [];
foreach ($param_arr[1] as $decorator => $options) {
if (... | [
"protected",
"function",
"prepare",
"(",
"$",
"markup",
",",
"$",
"decorators",
")",
"{",
"$",
"param_arr",
"=",
"func_get_args",
"(",
")",
";",
"if",
"(",
"is_array",
"(",
"$",
"decorators",
")",
")",
"{",
"$",
"param_arr",
"[",
"1",
"]",
"=",
"new"... | Sorts decorators according to 'order' option
@param string $markup
@param array|\Traversable $decorators
@return array | [
"Sorts",
"decorators",
"according",
"to",
"order",
"option"
] | 3572993cdcdb2898cdde396a2f1de9864b193660 | https://github.com/coolms/common/blob/3572993cdcdb2898cdde396a2f1de9864b193660/src/View/Helper/Decorator/Decorator.php#L151-L197 |
7,163 | n0m4dz/laracasa | Zend/Gdata/Spreadsheets.php | Zend_Gdata_Spreadsheets.getSpreadsheetFeed | public function getSpreadsheetFeed($location = null)
{
if ($location == null) {
$uri = self::SPREADSHEETS_FEED_URI;
} else if ($location instanceof Zend_Gdata_Spreadsheets_DocumentQuery) {
if ($location->getDocumentType() == null) {
$location->setDocumentType(... | php | public function getSpreadsheetFeed($location = null)
{
if ($location == null) {
$uri = self::SPREADSHEETS_FEED_URI;
} else if ($location instanceof Zend_Gdata_Spreadsheets_DocumentQuery) {
if ($location->getDocumentType() == null) {
$location->setDocumentType(... | [
"public",
"function",
"getSpreadsheetFeed",
"(",
"$",
"location",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"location",
"==",
"null",
")",
"{",
"$",
"uri",
"=",
"self",
"::",
"SPREADSHEETS_FEED_URI",
";",
"}",
"else",
"if",
"(",
"$",
"location",
"instanceof... | Gets a spreadsheet feed.
@param mixed $location A DocumentQuery or a string URI specifying the feed location.
@return Zend_Gdata_Spreadsheets_SpreadsheetFeed | [
"Gets",
"a",
"spreadsheet",
"feed",
"."
] | 6141f0c16c7d4453275e3b74be5041f336085c91 | https://github.com/n0m4dz/laracasa/blob/6141f0c16c7d4453275e3b74be5041f336085c91/Zend/Gdata/Spreadsheets.php#L137-L151 |
7,164 | n0m4dz/laracasa | Zend/Gdata/Spreadsheets.php | Zend_Gdata_Spreadsheets.getWorksheetFeed | public function getWorksheetFeed($location)
{
if ($location instanceof Zend_Gdata_Spreadsheets_DocumentQuery) {
if ($location->getDocumentType() == null) {
$location->setDocumentType('worksheets');
}
$uri = $location->getQueryUrl();
} else if ($loc... | php | public function getWorksheetFeed($location)
{
if ($location instanceof Zend_Gdata_Spreadsheets_DocumentQuery) {
if ($location->getDocumentType() == null) {
$location->setDocumentType('worksheets');
}
$uri = $location->getQueryUrl();
} else if ($loc... | [
"public",
"function",
"getWorksheetFeed",
"(",
"$",
"location",
")",
"{",
"if",
"(",
"$",
"location",
"instanceof",
"Zend_Gdata_Spreadsheets_DocumentQuery",
")",
"{",
"if",
"(",
"$",
"location",
"->",
"getDocumentType",
"(",
")",
"==",
"null",
")",
"{",
"$",
... | Gets a worksheet feed.
@param mixed $location A DocumentQuery, SpreadsheetEntry, or a string URI
@return Zend_Gdata_Spreadsheets_WorksheetFeed The feed of worksheets | [
"Gets",
"a",
"worksheet",
"feed",
"."
] | 6141f0c16c7d4453275e3b74be5041f336085c91 | https://github.com/n0m4dz/laracasa/blob/6141f0c16c7d4453275e3b74be5041f336085c91/Zend/Gdata/Spreadsheets.php#L179-L193 |
7,165 | n0m4dz/laracasa | Zend/Gdata/Spreadsheets.php | Zend_Gdata_Spreadsheets.GetWorksheetEntry | public function GetWorksheetEntry($location)
{
if ($location instanceof Zend_Gdata_Spreadsheets_DocumentQuery) {
if ($location->getDocumentType() == null) {
$location->setDocumentType('worksheets');
}
$uri = $location->getQueryUrl();
} else {
... | php | public function GetWorksheetEntry($location)
{
if ($location instanceof Zend_Gdata_Spreadsheets_DocumentQuery) {
if ($location->getDocumentType() == null) {
$location->setDocumentType('worksheets');
}
$uri = $location->getQueryUrl();
} else {
... | [
"public",
"function",
"GetWorksheetEntry",
"(",
"$",
"location",
")",
"{",
"if",
"(",
"$",
"location",
"instanceof",
"Zend_Gdata_Spreadsheets_DocumentQuery",
")",
"{",
"if",
"(",
"$",
"location",
"->",
"getDocumentType",
"(",
")",
"==",
"null",
")",
"{",
"$",
... | Gets a worksheet entry.
@param string $location A DocumentQuery or a URI specifying the entry location.
@return WorksheetEntry | [
"Gets",
"a",
"worksheet",
"entry",
"."
] | 6141f0c16c7d4453275e3b74be5041f336085c91 | https://github.com/n0m4dz/laracasa/blob/6141f0c16c7d4453275e3b74be5041f336085c91/Zend/Gdata/Spreadsheets.php#L201-L213 |
7,166 | n0m4dz/laracasa | Zend/Gdata/Spreadsheets.php | Zend_Gdata_Spreadsheets.getCellFeed | public function getCellFeed($location)
{
if ($location instanceof Zend_Gdata_Spreadsheets_CellQuery) {
$uri = $location->getQueryUrl();
} else if ($location instanceof Zend_Gdata_Spreadsheets_WorksheetEntry) {
$uri = $location->getLink(self::CELL_FEED_LINK_URI)->href;
... | php | public function getCellFeed($location)
{
if ($location instanceof Zend_Gdata_Spreadsheets_CellQuery) {
$uri = $location->getQueryUrl();
} else if ($location instanceof Zend_Gdata_Spreadsheets_WorksheetEntry) {
$uri = $location->getLink(self::CELL_FEED_LINK_URI)->href;
... | [
"public",
"function",
"getCellFeed",
"(",
"$",
"location",
")",
"{",
"if",
"(",
"$",
"location",
"instanceof",
"Zend_Gdata_Spreadsheets_CellQuery",
")",
"{",
"$",
"uri",
"=",
"$",
"location",
"->",
"getQueryUrl",
"(",
")",
";",
"}",
"else",
"if",
"(",
"$",... | Gets a cell feed.
@param string $location A CellQuery, WorksheetEntry or a URI specifying the feed location.
@return CellFeed | [
"Gets",
"a",
"cell",
"feed",
"."
] | 6141f0c16c7d4453275e3b74be5041f336085c91 | https://github.com/n0m4dz/laracasa/blob/6141f0c16c7d4453275e3b74be5041f336085c91/Zend/Gdata/Spreadsheets.php#L221-L231 |
7,167 | n0m4dz/laracasa | Zend/Gdata/Spreadsheets.php | Zend_Gdata_Spreadsheets.getCellEntry | public function getCellEntry($location)
{
if ($location instanceof Zend_Gdata_Spreadsheets_CellQuery) {
$uri = $location->getQueryUrl();
} else {
$uri = $location;
}
return parent::getEntry($uri, 'Zend_Gdata_Spreadsheets_CellEntry');
} | php | public function getCellEntry($location)
{
if ($location instanceof Zend_Gdata_Spreadsheets_CellQuery) {
$uri = $location->getQueryUrl();
} else {
$uri = $location;
}
return parent::getEntry($uri, 'Zend_Gdata_Spreadsheets_CellEntry');
} | [
"public",
"function",
"getCellEntry",
"(",
"$",
"location",
")",
"{",
"if",
"(",
"$",
"location",
"instanceof",
"Zend_Gdata_Spreadsheets_CellQuery",
")",
"{",
"$",
"uri",
"=",
"$",
"location",
"->",
"getQueryUrl",
"(",
")",
";",
"}",
"else",
"{",
"$",
"uri... | Gets a cell entry.
@param string $location A CellQuery or a URI specifying the entry location.
@return CellEntry | [
"Gets",
"a",
"cell",
"entry",
"."
] | 6141f0c16c7d4453275e3b74be5041f336085c91 | https://github.com/n0m4dz/laracasa/blob/6141f0c16c7d4453275e3b74be5041f336085c91/Zend/Gdata/Spreadsheets.php#L239-L248 |
7,168 | n0m4dz/laracasa | Zend/Gdata/Spreadsheets.php | Zend_Gdata_Spreadsheets.getListFeed | public function getListFeed($location)
{
if ($location instanceof Zend_Gdata_Spreadsheets_ListQuery) {
$uri = $location->getQueryUrl();
} else if ($location instanceof Zend_Gdata_Spreadsheets_WorksheetEntry) {
$uri = $location->getLink(self::LIST_FEED_LINK_URI)->href;
... | php | public function getListFeed($location)
{
if ($location instanceof Zend_Gdata_Spreadsheets_ListQuery) {
$uri = $location->getQueryUrl();
} else if ($location instanceof Zend_Gdata_Spreadsheets_WorksheetEntry) {
$uri = $location->getLink(self::LIST_FEED_LINK_URI)->href;
... | [
"public",
"function",
"getListFeed",
"(",
"$",
"location",
")",
"{",
"if",
"(",
"$",
"location",
"instanceof",
"Zend_Gdata_Spreadsheets_ListQuery",
")",
"{",
"$",
"uri",
"=",
"$",
"location",
"->",
"getQueryUrl",
"(",
")",
";",
"}",
"else",
"if",
"(",
"$",... | Gets a list feed.
@param mixed $location A ListQuery, WorksheetEntry or string URI specifying the feed location.
@return ListFeed | [
"Gets",
"a",
"list",
"feed",
"."
] | 6141f0c16c7d4453275e3b74be5041f336085c91 | https://github.com/n0m4dz/laracasa/blob/6141f0c16c7d4453275e3b74be5041f336085c91/Zend/Gdata/Spreadsheets.php#L256-L267 |
7,169 | n0m4dz/laracasa | Zend/Gdata/Spreadsheets.php | Zend_Gdata_Spreadsheets.getListEntry | public function getListEntry($location)
{
if ($location instanceof Zend_Gdata_Spreadsheets_ListQuery) {
$uri = $location->getQueryUrl();
} else {
$uri = $location;
}
return parent::getEntry($uri, 'Zend_Gdata_Spreadsheets_ListEntry');
} | php | public function getListEntry($location)
{
if ($location instanceof Zend_Gdata_Spreadsheets_ListQuery) {
$uri = $location->getQueryUrl();
} else {
$uri = $location;
}
return parent::getEntry($uri, 'Zend_Gdata_Spreadsheets_ListEntry');
} | [
"public",
"function",
"getListEntry",
"(",
"$",
"location",
")",
"{",
"if",
"(",
"$",
"location",
"instanceof",
"Zend_Gdata_Spreadsheets_ListQuery",
")",
"{",
"$",
"uri",
"=",
"$",
"location",
"->",
"getQueryUrl",
"(",
")",
";",
"}",
"else",
"{",
"$",
"uri... | Gets a list entry.
@param string $location A ListQuery or a URI specifying the entry location.
@return ListEntry | [
"Gets",
"a",
"list",
"entry",
"."
] | 6141f0c16c7d4453275e3b74be5041f336085c91 | https://github.com/n0m4dz/laracasa/blob/6141f0c16c7d4453275e3b74be5041f336085c91/Zend/Gdata/Spreadsheets.php#L275-L284 |
7,170 | n0m4dz/laracasa | Zend/Gdata/Spreadsheets.php | Zend_Gdata_Spreadsheets.updateCell | public function updateCell($row, $col, $inputValue, $key, $wkshtId = 'default')
{
$cell = 'R'.$row.'C'.$col;
$query = new Zend_Gdata_Spreadsheets_CellQuery();
$query->setSpreadsheetKey($key);
$query->setWorksheetId($wkshtId);
$query->setCellId($cell);
$entry = $this... | php | public function updateCell($row, $col, $inputValue, $key, $wkshtId = 'default')
{
$cell = 'R'.$row.'C'.$col;
$query = new Zend_Gdata_Spreadsheets_CellQuery();
$query->setSpreadsheetKey($key);
$query->setWorksheetId($wkshtId);
$query->setCellId($cell);
$entry = $this... | [
"public",
"function",
"updateCell",
"(",
"$",
"row",
",",
"$",
"col",
",",
"$",
"inputValue",
",",
"$",
"key",
",",
"$",
"wkshtId",
"=",
"'default'",
")",
"{",
"$",
"cell",
"=",
"'R'",
".",
"$",
"row",
".",
"'C'",
".",
"$",
"col",
";",
"$",
"qu... | Updates an existing cell.
@param int $row The row containing the cell to update
@param int $col The column containing the cell to update
@param int $inputValue The new value for the cell
@param string $key The key for the spreadsheet to be updated
@param string $wkshtId (optional) The worksheet to be updated
@return C... | [
"Updates",
"an",
"existing",
"cell",
"."
] | 6141f0c16c7d4453275e3b74be5041f336085c91 | https://github.com/n0m4dz/laracasa/blob/6141f0c16c7d4453275e3b74be5041f336085c91/Zend/Gdata/Spreadsheets.php#L296-L309 |
7,171 | n0m4dz/laracasa | Zend/Gdata/Spreadsheets.php | Zend_Gdata_Spreadsheets.insertRow | public function insertRow($rowData, $key, $wkshtId = 'default')
{
$newEntry = new Zend_Gdata_Spreadsheets_ListEntry();
$newCustomArr = array();
foreach ($rowData as $k => $v) {
$newCustom = new Zend_Gdata_Spreadsheets_Extension_Custom();
$newCustom->setText($v)->setCo... | php | public function insertRow($rowData, $key, $wkshtId = 'default')
{
$newEntry = new Zend_Gdata_Spreadsheets_ListEntry();
$newCustomArr = array();
foreach ($rowData as $k => $v) {
$newCustom = new Zend_Gdata_Spreadsheets_Extension_Custom();
$newCustom->setText($v)->setCo... | [
"public",
"function",
"insertRow",
"(",
"$",
"rowData",
",",
"$",
"key",
",",
"$",
"wkshtId",
"=",
"'default'",
")",
"{",
"$",
"newEntry",
"=",
"new",
"Zend_Gdata_Spreadsheets_ListEntry",
"(",
")",
";",
"$",
"newCustomArr",
"=",
"array",
"(",
")",
";",
"... | Inserts a new row with provided data.
@param array $rowData An array of column header to row data
@param string $key The key of the spreadsheet to modify
@param string $wkshtId (optional) The worksheet to modify
@return ListEntry The inserted row | [
"Inserts",
"a",
"new",
"row",
"with",
"provided",
"data",
"."
] | 6141f0c16c7d4453275e3b74be5041f336085c91 | https://github.com/n0m4dz/laracasa/blob/6141f0c16c7d4453275e3b74be5041f336085c91/Zend/Gdata/Spreadsheets.php#L319-L337 |
7,172 | n0m4dz/laracasa | Zend/Gdata/Spreadsheets.php | Zend_Gdata_Spreadsheets.updateRow | public function updateRow($entry, $newRowData)
{
$newCustomArr = array();
foreach ($newRowData as $k => $v) {
$newCustom = new Zend_Gdata_Spreadsheets_Extension_Custom();
$newCustom->setText($v)->setColumnName($k);
$newCustomArr[] = $newCustom;
}
$... | php | public function updateRow($entry, $newRowData)
{
$newCustomArr = array();
foreach ($newRowData as $k => $v) {
$newCustom = new Zend_Gdata_Spreadsheets_Extension_Custom();
$newCustom->setText($v)->setColumnName($k);
$newCustomArr[] = $newCustom;
}
$... | [
"public",
"function",
"updateRow",
"(",
"$",
"entry",
",",
"$",
"newRowData",
")",
"{",
"$",
"newCustomArr",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"newRowData",
"as",
"$",
"k",
"=>",
"$",
"v",
")",
"{",
"$",
"newCustom",
"=",
"new",
"Ze... | Updates an existing row with provided data.
@param ListEntry $entry The row entry to update
@param array $newRowData An array of column header to row data | [
"Updates",
"an",
"existing",
"row",
"with",
"provided",
"data",
"."
] | 6141f0c16c7d4453275e3b74be5041f336085c91 | https://github.com/n0m4dz/laracasa/blob/6141f0c16c7d4453275e3b74be5041f336085c91/Zend/Gdata/Spreadsheets.php#L345-L356 |
7,173 | n0m4dz/laracasa | Zend/Gdata/Spreadsheets.php | Zend_Gdata_Spreadsheets.getSpreadsheetListFeedContents | public function getSpreadsheetListFeedContents($location)
{
$listFeed = $this->getListFeed($location);
$listFeed = $this->retrieveAllEntriesForFeed($listFeed);
$spreadsheetContents = array();
foreach ($listFeed as $listEntry) {
$rowContents = array();
$customA... | php | public function getSpreadsheetListFeedContents($location)
{
$listFeed = $this->getListFeed($location);
$listFeed = $this->retrieveAllEntriesForFeed($listFeed);
$spreadsheetContents = array();
foreach ($listFeed as $listEntry) {
$rowContents = array();
$customA... | [
"public",
"function",
"getSpreadsheetListFeedContents",
"(",
"$",
"location",
")",
"{",
"$",
"listFeed",
"=",
"$",
"this",
"->",
"getListFeed",
"(",
"$",
"location",
")",
";",
"$",
"listFeed",
"=",
"$",
"this",
"->",
"retrieveAllEntriesForFeed",
"(",
"$",
"l... | Returns the content of all rows as an associative array
@param mixed $location A ListQuery or string URI specifying the feed location.
@return array An array of rows. Each element of the array is an associative array of data | [
"Returns",
"the",
"content",
"of",
"all",
"rows",
"as",
"an",
"associative",
"array"
] | 6141f0c16c7d4453275e3b74be5041f336085c91 | https://github.com/n0m4dz/laracasa/blob/6141f0c16c7d4453275e3b74be5041f336085c91/Zend/Gdata/Spreadsheets.php#L374-L388 |
7,174 | coolms/authentication | src/View/Helper/LoginWidget.php | LoginWidget.getForm | public function getForm()
{
if (null === $this->form) {
$this->setForm($this->getUserService()->getLoginForm());
}
return $this->form;
} | php | public function getForm()
{
if (null === $this->form) {
$this->setForm($this->getUserService()->getLoginForm());
}
return $this->form;
} | [
"public",
"function",
"getForm",
"(",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"this",
"->",
"form",
")",
"{",
"$",
"this",
"->",
"setForm",
"(",
"$",
"this",
"->",
"getUserService",
"(",
")",
"->",
"getLoginForm",
"(",
")",
")",
";",
"}",
"return"... | Retrieve Login form
@return Login | [
"Retrieve",
"Login",
"form"
] | 4563cc4cc3a4d777db45977bd179cc5bd3f57cd8 | https://github.com/coolms/authentication/blob/4563cc4cc3a4d777db45977bd179cc5bd3f57cd8/src/View/Helper/LoginWidget.php#L100-L107 |
7,175 | aryelgois/utils | src/Validation.php | Validation.sanitizeArray | public static function sanitizeArray(&$arr)
{
foreach ($arr as $k => $v) {
if (is_string($v)) {
$arr[$k] = self::sanitizeInput($v);
}
}
} | php | public static function sanitizeArray(&$arr)
{
foreach ($arr as $k => $v) {
if (is_string($v)) {
$arr[$k] = self::sanitizeInput($v);
}
}
} | [
"public",
"static",
"function",
"sanitizeArray",
"(",
"&",
"$",
"arr",
")",
"{",
"foreach",
"(",
"$",
"arr",
"as",
"$",
"k",
"=>",
"$",
"v",
")",
"{",
"if",
"(",
"is_string",
"(",
"$",
"v",
")",
")",
"{",
"$",
"arr",
"[",
"$",
"k",
"]",
"=",
... | Sanitizes all strings of an array
@param mixed[] &$arr Only strings are sanitized | [
"Sanitizes",
"all",
"strings",
"of",
"an",
"array"
] | 683a4685de166592aadd0fe7ebec828b99f0cbdc | https://github.com/aryelgois/utils/blob/683a4685de166592aadd0fe7ebec828b99f0cbdc/src/Validation.php#L41-L48 |
7,176 | aryelgois/utils | src/Validation.php | Validation.cnpj | public static function cnpj($cnpj)
{
// Extract numbers
$cnpj = preg_replace('/[^\d]/', '', $cnpj);
// Check amount of numbers
if (strlen($cnpj) > 14) {
return false;
}
$cnpj = str_pad($cnpj, 14, '0', STR_PAD_LEFT);
// Check for same digit sequen... | php | public static function cnpj($cnpj)
{
// Extract numbers
$cnpj = preg_replace('/[^\d]/', '', $cnpj);
// Check amount of numbers
if (strlen($cnpj) > 14) {
return false;
}
$cnpj = str_pad($cnpj, 14, '0', STR_PAD_LEFT);
// Check for same digit sequen... | [
"public",
"static",
"function",
"cnpj",
"(",
"$",
"cnpj",
")",
"{",
"// Extract numbers",
"$",
"cnpj",
"=",
"preg_replace",
"(",
"'/[^\\d]/'",
",",
"''",
",",
"$",
"cnpj",
")",
";",
"// Check amount of numbers",
"if",
"(",
"strlen",
"(",
"$",
"cnpj",
")",
... | Validates Brazilian CNPJ
@param string $cnpj Up to 14 digits, anything else is discarded
@return string validated (only numbers)
@return false if invalid | [
"Validates",
"Brazilian",
"CNPJ"
] | 683a4685de166592aadd0fe7ebec828b99f0cbdc | https://github.com/aryelgois/utils/blob/683a4685de166592aadd0fe7ebec828b99f0cbdc/src/Validation.php#L96-L132 |
7,177 | aryelgois/utils | src/Validation.php | Validation.cpf | public static function cpf($cpf)
{
// Extract numbers
$cpf = preg_replace('/[^\d]/', '', $cpf);
// Check amount of numbers
if (strlen($cpf) > 11) {
return false;
}
$cpf = str_pad($cpf, 11, '0', STR_PAD_LEFT);
// Check for same digit sequence
... | php | public static function cpf($cpf)
{
// Extract numbers
$cpf = preg_replace('/[^\d]/', '', $cpf);
// Check amount of numbers
if (strlen($cpf) > 11) {
return false;
}
$cpf = str_pad($cpf, 11, '0', STR_PAD_LEFT);
// Check for same digit sequence
... | [
"public",
"static",
"function",
"cpf",
"(",
"$",
"cpf",
")",
"{",
"// Extract numbers",
"$",
"cpf",
"=",
"preg_replace",
"(",
"'/[^\\d]/'",
",",
"''",
",",
"$",
"cpf",
")",
";",
"// Check amount of numbers",
"if",
"(",
"strlen",
"(",
"$",
"cpf",
")",
">"... | Validate Brazilian CPF
@author rafael-neri (modified)
@link https://gist.github.com/rafael-neri/ab3e58803a08cb4def059fce4e3c0e40
@param string $cpf Up to 11 digits, anything else is discarded
@return string validated (only numbers) or false if invalid | [
"Validate",
"Brazilian",
"CPF"
] | 683a4685de166592aadd0fe7ebec828b99f0cbdc | https://github.com/aryelgois/utils/blob/683a4685de166592aadd0fe7ebec828b99f0cbdc/src/Validation.php#L144-L172 |
7,178 | aryelgois/utils | src/Validation.php | Validation.mod11Pre | public static function mod11Pre($number, $base = 9)
{
$checksum = 0;
$factor = 2;
foreach (str_split(strrev((string) $number)) as $d) {
$checksum += $d * $factor;
if (++$factor > $base) {
$factor = 2;
}
}
return $checksum;
... | php | public static function mod11Pre($number, $base = 9)
{
$checksum = 0;
$factor = 2;
foreach (str_split(strrev((string) $number)) as $d) {
$checksum += $d * $factor;
if (++$factor > $base) {
$factor = 2;
}
}
return $checksum;
... | [
"public",
"static",
"function",
"mod11Pre",
"(",
"$",
"number",
",",
"$",
"base",
"=",
"9",
")",
"{",
"$",
"checksum",
"=",
"0",
";",
"$",
"factor",
"=",
"2",
";",
"foreach",
"(",
"str_split",
"(",
"strrev",
"(",
"(",
"string",
")",
"$",
"number",
... | Calculates modulus 11 but do not apply the modulus
Useful when some calculation is required before '% 11'
@param mixed $number Numeric value whose check digit will be calculated
@param integer $base Maximum multiplication value
@return integer | [
"Calculates",
"modulus",
"11",
"but",
"do",
"not",
"apply",
"the",
"modulus"
] | 683a4685de166592aadd0fe7ebec828b99f0cbdc | https://github.com/aryelgois/utils/blob/683a4685de166592aadd0fe7ebec828b99f0cbdc/src/Validation.php#L292-L303 |
7,179 | bishopb/vanilla | library/database/class.dataset.php | Gdn_DataSet._FetchAllRows | protected function _FetchAllRows($DatasetType = FALSE) {
if(!is_null($this->_Result))
return;
if($DatasetType)
$this->_DatasetType = $DatasetType;
$Result = array();
if (is_null($this->_PDOStatement)) {
$this->_Result = $Result;
return;
}
$Result = $this->_... | php | protected function _FetchAllRows($DatasetType = FALSE) {
if(!is_null($this->_Result))
return;
if($DatasetType)
$this->_DatasetType = $DatasetType;
$Result = array();
if (is_null($this->_PDOStatement)) {
$this->_Result = $Result;
return;
}
$Result = $this->_... | [
"protected",
"function",
"_FetchAllRows",
"(",
"$",
"DatasetType",
"=",
"FALSE",
")",
"{",
"if",
"(",
"!",
"is_null",
"(",
"$",
"this",
"->",
"_Result",
")",
")",
"return",
";",
"if",
"(",
"$",
"DatasetType",
")",
"$",
"this",
"->",
"_DatasetType",
"="... | Fetches all rows from the PDOStatement object into the resultset.
@param string $DatasetType The format in which the result should be returned: object or array.
It will fill a different array depending on which type is specified. | [
"Fetches",
"all",
"rows",
"from",
"the",
"PDOStatement",
"object",
"into",
"the",
"resultset",
"."
] | 8494eb4a4ad61603479015a8054d23ff488364e8 | https://github.com/bishopb/vanilla/blob/8494eb4a4ad61603479015a8054d23ff488364e8/library/database/class.dataset.php#L140-L162 |
7,180 | bishopb/vanilla | library/database/class.dataset.php | Gdn_DataSet.& | public function &FirstRow($DatasetType = FALSE) {
$Result = &$this->Result($DatasetType);
if(count($Result) == 0)
return $this->_EOF;
return $Result[0];
} | php | public function &FirstRow($DatasetType = FALSE) {
$Result = &$this->Result($DatasetType);
if(count($Result) == 0)
return $this->_EOF;
return $Result[0];
} | [
"public",
"function",
"&",
"FirstRow",
"(",
"$",
"DatasetType",
"=",
"FALSE",
")",
"{",
"$",
"Result",
"=",
"&",
"$",
"this",
"->",
"Result",
"(",
"$",
"DatasetType",
")",
";",
"if",
"(",
"count",
"(",
"$",
"Result",
")",
"==",
"0",
")",
"return",
... | Returns the first row or FALSE if there are no rows to return.
@param string $DatasetType The format in which the result should be returned: object or array. | [
"Returns",
"the",
"first",
"row",
"or",
"FALSE",
"if",
"there",
"are",
"no",
"rows",
"to",
"return",
"."
] | 8494eb4a4ad61603479015a8054d23ff488364e8 | https://github.com/bishopb/vanilla/blob/8494eb4a4ad61603479015a8054d23ff488364e8/library/database/class.dataset.php#L169-L175 |
7,181 | bishopb/vanilla | library/database/class.dataset.php | Gdn_DataSet.Format | public function Format($FormatMethod) {
$Result = &$this->Result();
foreach($Result as $Index => $Value) {
$Result[$Index] = Gdn_Format::To($Value, $FormatMethod);
}
return $this;
} | php | public function Format($FormatMethod) {
$Result = &$this->Result();
foreach($Result as $Index => $Value) {
$Result[$Index] = Gdn_Format::To($Value, $FormatMethod);
}
return $this;
} | [
"public",
"function",
"Format",
"(",
"$",
"FormatMethod",
")",
"{",
"$",
"Result",
"=",
"&",
"$",
"this",
"->",
"Result",
"(",
")",
";",
"foreach",
"(",
"$",
"Result",
"as",
"$",
"Index",
"=>",
"$",
"Value",
")",
"{",
"$",
"Result",
"[",
"$",
"In... | Format the resultset with the given method.
@param string $FormatMethod The method to use with Gdn_Format::To().
@return Gdn_Dataset $this pointer for chaining. | [
"Format",
"the",
"resultset",
"with",
"the",
"given",
"method",
"."
] | 8494eb4a4ad61603479015a8054d23ff488364e8 | https://github.com/bishopb/vanilla/blob/8494eb4a4ad61603479015a8054d23ff488364e8/library/database/class.dataset.php#L183-L189 |
7,182 | bishopb/vanilla | library/database/class.dataset.php | Gdn_DataSet.Index | public static function Index($Data, $Columns, $Options = array()) {
$Columns = (array)$Columns;
$Result = array();
$Options = array_change_key_case($Options);
if (is_string($Options))
$Options = array('sep' => $Options);
$Sep = GetValue('sep', $Options, '|');
$Unique = Get... | php | public static function Index($Data, $Columns, $Options = array()) {
$Columns = (array)$Columns;
$Result = array();
$Options = array_change_key_case($Options);
if (is_string($Options))
$Options = array('sep' => $Options);
$Sep = GetValue('sep', $Options, '|');
$Unique = Get... | [
"public",
"static",
"function",
"Index",
"(",
"$",
"Data",
",",
"$",
"Columns",
",",
"$",
"Options",
"=",
"array",
"(",
")",
")",
"{",
"$",
"Columns",
"=",
"(",
"array",
")",
"$",
"Columns",
";",
"$",
"Result",
"=",
"array",
"(",
")",
";",
"$",
... | Index a result array.
@param array $Data The array to index. It is formatted similar to the array returned by Gdn_DataSet::Result().
@param string|array $Columns The name of the column to index on or an array of columns to index on.
@param array $Options An array of options for the method.
- <b>Sep</b>: The string to s... | [
"Index",
"a",
"result",
"array",
"."
] | 8494eb4a4ad61603479015a8054d23ff488364e8 | https://github.com/bishopb/vanilla/blob/8494eb4a4ad61603479015a8054d23ff488364e8/library/database/class.dataset.php#L220-L244 |
7,183 | bishopb/vanilla | library/database/class.dataset.php | Gdn_DataSet.& | public function &LastRow($DatasetType = FALSE) {
$Result = &$this->Result($DatasetType);
if (count($Result) == 0)
return $this->_EOF;
return $Result[count($Result) - 1];
} | php | public function &LastRow($DatasetType = FALSE) {
$Result = &$this->Result($DatasetType);
if (count($Result) == 0)
return $this->_EOF;
return $Result[count($Result) - 1];
} | [
"public",
"function",
"&",
"LastRow",
"(",
"$",
"DatasetType",
"=",
"FALSE",
")",
"{",
"$",
"Result",
"=",
"&",
"$",
"this",
"->",
"Result",
"(",
"$",
"DatasetType",
")",
";",
"if",
"(",
"count",
"(",
"$",
"Result",
")",
"==",
"0",
")",
"return",
... | Returns the last row in the or FALSE if there are no rows to return.
@param string $DatasetType The format in which the result should be returned: object or array. | [
"Returns",
"the",
"last",
"row",
"in",
"the",
"or",
"FALSE",
"if",
"there",
"are",
"no",
"rows",
"to",
"return",
"."
] | 8494eb4a4ad61603479015a8054d23ff488364e8 | https://github.com/bishopb/vanilla/blob/8494eb4a4ad61603479015a8054d23ff488364e8/library/database/class.dataset.php#L415-L421 |
7,184 | bishopb/vanilla | library/database/class.dataset.php | Gdn_DataSet.& | public function &NextRow($DatasetType = FALSE ) {
$Result = &$this->Result($DatasetType);
++$this->_Cursor;
if(isset($Result[$this->_Cursor]))
return $Result[$this->_Cursor];
return $this->_EOF;
} | php | public function &NextRow($DatasetType = FALSE ) {
$Result = &$this->Result($DatasetType);
++$this->_Cursor;
if(isset($Result[$this->_Cursor]))
return $Result[$this->_Cursor];
return $this->_EOF;
} | [
"public",
"function",
"&",
"NextRow",
"(",
"$",
"DatasetType",
"=",
"FALSE",
")",
"{",
"$",
"Result",
"=",
"&",
"$",
"this",
"->",
"Result",
"(",
"$",
"DatasetType",
")",
";",
"++",
"$",
"this",
"->",
"_Cursor",
";",
"if",
"(",
"isset",
"(",
"$",
... | Returns the next row or FALSE if there are no more rows.
@param string $DatasetType The format in which the result should be returned: object or array. | [
"Returns",
"the",
"next",
"row",
"or",
"FALSE",
"if",
"there",
"are",
"no",
"more",
"rows",
"."
] | 8494eb4a4ad61603479015a8054d23ff488364e8 | https://github.com/bishopb/vanilla/blob/8494eb4a4ad61603479015a8054d23ff488364e8/library/database/class.dataset.php#L428-L435 |
7,185 | bishopb/vanilla | library/database/class.dataset.php | Gdn_DataSet.& | public function &PreviousRow($DatasetType = FALSE) {
$Result = &$this->Result($DatasetType);
--$this->_Cursor;
if (isset($Result[$this->_Cursor])) {
return $Result[$this->_Cursor];
}
return $this->_EOF;
} | php | public function &PreviousRow($DatasetType = FALSE) {
$Result = &$this->Result($DatasetType);
--$this->_Cursor;
if (isset($Result[$this->_Cursor])) {
return $Result[$this->_Cursor];
}
return $this->_EOF;
} | [
"public",
"function",
"&",
"PreviousRow",
"(",
"$",
"DatasetType",
"=",
"FALSE",
")",
"{",
"$",
"Result",
"=",
"&",
"$",
"this",
"->",
"Result",
"(",
"$",
"DatasetType",
")",
";",
"--",
"$",
"this",
"->",
"_Cursor",
";",
"if",
"(",
"isset",
"(",
"$... | Returns the previous row in the requested format.
@param string $DatasetType The format in which the result should be returned: object or array. | [
"Returns",
"the",
"previous",
"row",
"in",
"the",
"requested",
"format",
"."
] | 8494eb4a4ad61603479015a8054d23ff488364e8 | https://github.com/bishopb/vanilla/blob/8494eb4a4ad61603479015a8054d23ff488364e8/library/database/class.dataset.php#L460-L467 |
7,186 | bishopb/vanilla | library/database/class.dataset.php | Gdn_DataSet.& | public function &Row($RowIndex) {
$Result = &$this->Result();
if(isset($Result[$RowIndex]))
return $Result[$RowIndex];
return $this->_EOF;
} | php | public function &Row($RowIndex) {
$Result = &$this->Result();
if(isset($Result[$RowIndex]))
return $Result[$RowIndex];
return $this->_EOF;
} | [
"public",
"function",
"&",
"Row",
"(",
"$",
"RowIndex",
")",
"{",
"$",
"Result",
"=",
"&",
"$",
"this",
"->",
"Result",
"(",
")",
";",
"if",
"(",
"isset",
"(",
"$",
"Result",
"[",
"$",
"RowIndex",
"]",
")",
")",
"return",
"$",
"Result",
"[",
"$... | Returns the requested row index as the requested row type.
@param int $RowIndex The row to return from the result set. It is zero-based.
@return mixed The row at the given index or FALSE if there is no row at the index. | [
"Returns",
"the",
"requested",
"row",
"index",
"as",
"the",
"requested",
"row",
"type",
"."
] | 8494eb4a4ad61603479015a8054d23ff488364e8 | https://github.com/bishopb/vanilla/blob/8494eb4a4ad61603479015a8054d23ff488364e8/library/database/class.dataset.php#L508-L513 |
7,187 | bishopb/vanilla | library/database/class.dataset.php | Gdn_DataSet.PDOStatement | public function PDOStatement(&$PDOStatement = FALSE) {
if ($PDOStatement === FALSE)
return $this->_PDOStatement;
else
$this->_PDOStatement = $PDOStatement;
} | php | public function PDOStatement(&$PDOStatement = FALSE) {
if ($PDOStatement === FALSE)
return $this->_PDOStatement;
else
$this->_PDOStatement = $PDOStatement;
} | [
"public",
"function",
"PDOStatement",
"(",
"&",
"$",
"PDOStatement",
"=",
"FALSE",
")",
"{",
"if",
"(",
"$",
"PDOStatement",
"===",
"FALSE",
")",
"return",
"$",
"this",
"->",
"_PDOStatement",
";",
"else",
"$",
"this",
"->",
"_PDOStatement",
"=",
"$",
"PD... | Assigns the pdostatement object to this object.
@param PDOStatement $PDOStatement The PDO Statement Object being assigned. | [
"Assigns",
"the",
"pdostatement",
"object",
"to",
"this",
"object",
"."
] | 8494eb4a4ad61603479015a8054d23ff488364e8 | https://github.com/bishopb/vanilla/blob/8494eb4a4ad61603479015a8054d23ff488364e8/library/database/class.dataset.php#L540-L545 |
7,188 | bishopb/vanilla | library/database/class.dataset.php | Gdn_DataSet.Unserialize | public function Unserialize($Fields = array('Attributes', 'Data')) {
$Result =& $this->Result();
$First = TRUE;
foreach ($Result as $Row) {
if ($First) {
// Check which fields are in the dataset.
foreach ($Fields as $Index => $Field) {
if (GetValu... | php | public function Unserialize($Fields = array('Attributes', 'Data')) {
$Result =& $this->Result();
$First = TRUE;
foreach ($Result as $Row) {
if ($First) {
// Check which fields are in the dataset.
foreach ($Fields as $Index => $Field) {
if (GetValu... | [
"public",
"function",
"Unserialize",
"(",
"$",
"Fields",
"=",
"array",
"(",
"'Attributes'",
",",
"'Data'",
")",
")",
"{",
"$",
"Result",
"=",
"&",
"$",
"this",
"->",
"Result",
"(",
")",
";",
"$",
"First",
"=",
"TRUE",
";",
"foreach",
"(",
"$",
"Res... | Unserialize the fields in the dataset.
@param array $Fields
@since 2.1 | [
"Unserialize",
"the",
"fields",
"in",
"the",
"dataset",
"."
] | 8494eb4a4ad61603479015a8054d23ff488364e8 | https://github.com/bishopb/vanilla/blob/8494eb4a4ad61603479015a8054d23ff488364e8/library/database/class.dataset.php#L552-L577 |
7,189 | bishopb/vanilla | library/database/class.dataset.php | Gdn_DataSet.Value | public function Value($ColumnName, $DefaultValue = NULL) {
if($Row = $this->NextRow()) {
if(is_array($ColumnName)) {
$Result = array();
foreach($ColumnName as $Name => $Default) {
if(is_object($Row) && property_exists($Row, $Name))
return $Row->... | php | public function Value($ColumnName, $DefaultValue = NULL) {
if($Row = $this->NextRow()) {
if(is_array($ColumnName)) {
$Result = array();
foreach($ColumnName as $Name => $Default) {
if(is_object($Row) && property_exists($Row, $Name))
return $Row->... | [
"public",
"function",
"Value",
"(",
"$",
"ColumnName",
",",
"$",
"DefaultValue",
"=",
"NULL",
")",
"{",
"if",
"(",
"$",
"Row",
"=",
"$",
"this",
"->",
"NextRow",
"(",
")",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"ColumnName",
")",
")",
"{",
"$... | Advances to the next row and returns the value rom a column.
@param string $ColumnName The name of the column to get the value from.
@param string $DefaultValue The value to return if there is no data.
@return mixed The value from the column or $DefaultValue. | [
"Advances",
"to",
"the",
"next",
"row",
"and",
"returns",
"the",
"value",
"rom",
"a",
"column",
"."
] | 8494eb4a4ad61603479015a8054d23ff488364e8 | https://github.com/bishopb/vanilla/blob/8494eb4a4ad61603479015a8054d23ff488364e8/library/database/class.dataset.php#L586-L609 |
7,190 | netcore/translations | src/Router.php | Router.apiRoutes | public static function apiRoutes(\Illuminate\Routing\Router $router)
{
$router->group(['prefix' => 'translations'], function (\Illuminate\Routing\Router $router) {
$router->get('/index', [
'as' => 'translations.api.index',
'uses' => ApiController::class . '@ind... | php | public static function apiRoutes(\Illuminate\Routing\Router $router)
{
$router->group(['prefix' => 'translations'], function (\Illuminate\Routing\Router $router) {
$router->get('/index', [
'as' => 'translations.api.index',
'uses' => ApiController::class . '@ind... | [
"public",
"static",
"function",
"apiRoutes",
"(",
"\\",
"Illuminate",
"\\",
"Routing",
"\\",
"Router",
"$",
"router",
")",
"{",
"$",
"router",
"->",
"group",
"(",
"[",
"'prefix'",
"=>",
"'translations'",
"]",
",",
"function",
"(",
"\\",
"Illuminate",
"\\",... | Register API routes
@return void | [
"Register",
"API",
"routes"
] | 0f0c8d8b4748ee161921bfdc30683391c4fe7d7e | https://github.com/netcore/translations/blob/0f0c8d8b4748ee161921bfdc30683391c4fe7d7e/src/Router.php#L15-L24 |
7,191 | netcore/translations | src/Router.php | Router.adminRoutes | public static function adminRoutes(\Illuminate\Routing\Router $router)
{
$router->group(['prefix' => 'translations'], function (\Illuminate\Routing\Router $router) {
$router->get('/export', [
'as' => 'translations.export',
'uses' => TranslationsController::cla... | php | public static function adminRoutes(\Illuminate\Routing\Router $router)
{
$router->group(['prefix' => 'translations'], function (\Illuminate\Routing\Router $router) {
$router->get('/export', [
'as' => 'translations.export',
'uses' => TranslationsController::cla... | [
"public",
"static",
"function",
"adminRoutes",
"(",
"\\",
"Illuminate",
"\\",
"Routing",
"\\",
"Router",
"$",
"router",
")",
"{",
"$",
"router",
"->",
"group",
"(",
"[",
"'prefix'",
"=>",
"'translations'",
"]",
",",
"function",
"(",
"\\",
"Illuminate",
"\\... | Register admin routes
@return void | [
"Register",
"admin",
"routes"
] | 0f0c8d8b4748ee161921bfdc30683391c4fe7d7e | https://github.com/netcore/translations/blob/0f0c8d8b4748ee161921bfdc30683391c4fe7d7e/src/Router.php#L31-L70 |
7,192 | freialib/fenrir.tools | src/Pdx.php | Pdx.rm | function rm($dryrun = false, $harduninstall = false) {
if ($this->locked) {
return [null, 400];
}
else { // database is not locked
$channels = $this->channels();
$config = [ 'tables' => [] ];
if ( ! $harduninstall) {
list($history) = $this->history();
// generate table list based on histo... | php | function rm($dryrun = false, $harduninstall = false) {
if ($this->locked) {
return [null, 400];
}
else { // database is not locked
$channels = $this->channels();
$config = [ 'tables' => [] ];
if ( ! $harduninstall) {
list($history) = $this->history();
// generate table list based on histo... | [
"function",
"rm",
"(",
"$",
"dryrun",
"=",
"false",
",",
"$",
"harduninstall",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"locked",
")",
"{",
"return",
"[",
"null",
",",
"400",
"]",
";",
"}",
"else",
"{",
"// database is not locked",
"$",
... | Removes all tables.
@return boolean true if successful, false if not permitted | [
"Removes",
"all",
"tables",
"."
] | 3e6359103a640bd2fcb9708d6874fb0aeebbf7c5 | https://github.com/freialib/fenrir.tools/blob/3e6359103a640bd2fcb9708d6874fb0aeebbf7c5/src/Pdx.php#L278-L345 |
7,193 | freialib/fenrir.tools | src/Pdx.php | Pdx.sync | function sync($dryrun = false) {
$channels = $this->channels();
$status = [
// ordered list of versions in processing order
'history' => [],
// current version for each channel
'state' => [],
// active channels
'active' => [],
// checklist of version requirements
'checklist' => $this->gene... | php | function sync($dryrun = false) {
$channels = $this->channels();
$status = [
// ordered list of versions in processing order
'history' => [],
// current version for each channel
'state' => [],
// active channels
'active' => [],
// checklist of version requirements
'checklist' => $this->gene... | [
"function",
"sync",
"(",
"$",
"dryrun",
"=",
"false",
")",
"{",
"$",
"channels",
"=",
"$",
"this",
"->",
"channels",
"(",
")",
";",
"$",
"status",
"=",
"[",
"// ordered list of versions in processing order",
"'history'",
"=>",
"[",
"]",
",",
"// current vers... | Move the database forward. | [
"Move",
"the",
"database",
"forward",
"."
] | 3e6359103a640bd2fcb9708d6874fb0aeebbf7c5 | https://github.com/freialib/fenrir.tools/blob/3e6359103a640bd2fcb9708d6874fb0aeebbf7c5/src/Pdx.php#L350-L410 |
7,194 | freialib/fenrir.tools | src/Pdx.php | Pdx.conf | protected function conf($confpath, $dependencies = []) {
$conf = $this->confs->read($confpath);
if (isset($conf['require'])) {
throw new Panic("The paradox configuration $confpath must not contain a require key. Only the main paradox configuration should specify dependencies.");
}
return array_merge($conf... | php | protected function conf($confpath, $dependencies = []) {
$conf = $this->confs->read($confpath);
if (isset($conf['require'])) {
throw new Panic("The paradox configuration $confpath must not contain a require key. Only the main paradox configuration should specify dependencies.");
}
return array_merge($conf... | [
"protected",
"function",
"conf",
"(",
"$",
"confpath",
",",
"$",
"dependencies",
"=",
"[",
"]",
")",
"{",
"$",
"conf",
"=",
"$",
"this",
"->",
"confs",
"->",
"read",
"(",
"$",
"confpath",
")",
";",
"if",
"(",
"isset",
"(",
"$",
"conf",
"[",
"'req... | Normalize configuration entry
@return array | [
"Normalize",
"configuration",
"entry"
] | 3e6359103a640bd2fcb9708d6874fb0aeebbf7c5 | https://github.com/freialib/fenrir.tools/blob/3e6359103a640bd2fcb9708d6874fb0aeebbf7c5/src/Pdx.php#L433-L442 |
7,195 | freialib/fenrir.tools | src/Pdx.php | Pdx.shout | protected function shout($op, $channel, $version, $note = null) {
! $this->verbose or $this->log(sprintf($this->step_format()."\n", $op, $version, $channel, $note));
return true; // allow use in shorthand conditionals
} | php | protected function shout($op, $channel, $version, $note = null) {
! $this->verbose or $this->log(sprintf($this->step_format()."\n", $op, $version, $channel, $note));
return true; // allow use in shorthand conditionals
} | [
"protected",
"function",
"shout",
"(",
"$",
"op",
",",
"$",
"channel",
",",
"$",
"version",
",",
"$",
"note",
"=",
"null",
")",
"{",
"!",
"$",
"this",
"->",
"verbose",
"or",
"$",
"this",
"->",
"log",
"(",
"sprintf",
"(",
"$",
"this",
"->",
"step_... | Step information for verbose output
@return boolean | [
"Step",
"information",
"for",
"verbose",
"output"
] | 3e6359103a640bd2fcb9708d6874fb0aeebbf7c5 | https://github.com/freialib/fenrir.tools/blob/3e6359103a640bd2fcb9708d6874fb0aeebbf7c5/src/Pdx.php#L485-L488 |
7,196 | freialib/fenrir.tools | src/Pdx.php | Pdx.dependency_race_error | protected function dependency_race_error(array $status, $channel, $version) {
// provide feedback on loop
! $this->verbose or $this->log("\n");
$this->log(" Race backtrace:\n");
foreach ($status['active'] as $activeinfo) {
$this->log(" - {$activeinfo['channel']} {$activeinfo['version']}\n");
}
$this->lo... | php | protected function dependency_race_error(array $status, $channel, $version) {
// provide feedback on loop
! $this->verbose or $this->log("\n");
$this->log(" Race backtrace:\n");
foreach ($status['active'] as $activeinfo) {
$this->log(" - {$activeinfo['channel']} {$activeinfo['version']}\n");
}
$this->lo... | [
"protected",
"function",
"dependency_race_error",
"(",
"array",
"$",
"status",
",",
"$",
"channel",
",",
"$",
"version",
")",
"{",
"// provide feedback on loop",
"!",
"$",
"this",
"->",
"verbose",
"or",
"$",
"this",
"->",
"log",
"(",
"\"\\n\"",
")",
";",
"... | Error report for situation where dependencies race against each other
and a channels fall behind another in the requirement war. | [
"Error",
"report",
"for",
"situation",
"where",
"dependencies",
"race",
"against",
"each",
"other",
"and",
"a",
"channels",
"fall",
"behind",
"another",
"in",
"the",
"requirement",
"war",
"."
] | 3e6359103a640bd2fcb9708d6874fb0aeebbf7c5 | https://github.com/freialib/fenrir.tools/blob/3e6359103a640bd2fcb9708d6874fb0aeebbf7c5/src/Pdx.php#L609-L619 |
7,197 | freialib/fenrir.tools | src/Pdx.php | Pdx.rm__load_tables | protected function rm__load_tables(array &$config, array $handlers) {
if (isset($handlers['configure'])) {
$conf = $handlers['configure'];
if (is_array($conf)) {
if (isset($conf['tables'])) {
foreach ($conf['tables'] as $table) {
$config['tables'][] = $table;
}
}
}
else { // callba... | php | protected function rm__load_tables(array &$config, array $handlers) {
if (isset($handlers['configure'])) {
$conf = $handlers['configure'];
if (is_array($conf)) {
if (isset($conf['tables'])) {
foreach ($conf['tables'] as $table) {
$config['tables'][] = $table;
}
}
}
else { // callba... | [
"protected",
"function",
"rm__load_tables",
"(",
"array",
"&",
"$",
"config",
",",
"array",
"$",
"handlers",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"handlers",
"[",
"'configure'",
"]",
")",
")",
"{",
"$",
"conf",
"=",
"$",
"handlers",
"[",
"'configure... | Loads tables from configuration | [
"Loads",
"tables",
"from",
"configuration"
] | 3e6359103a640bd2fcb9708d6874fb0aeebbf7c5 | https://github.com/freialib/fenrir.tools/blob/3e6359103a640bd2fcb9708d6874fb0aeebbf7c5/src/Pdx.php#L1000-L1014 |
7,198 | hnhdigital-os/bluora-shared-api-traits | src/EnvironmentVariablesTrait.php | EnvironmentVariablesTrait.hasConfig | public function hasConfig($name)
{
if (property_exists($this, 'client_'.$name)) {
$name = 'client_'.$name;
return !empty($this->$name);
}
return false;
} | php | public function hasConfig($name)
{
if (property_exists($this, 'client_'.$name)) {
$name = 'client_'.$name;
return !empty($this->$name);
}
return false;
} | [
"public",
"function",
"hasConfig",
"(",
"$",
"name",
")",
"{",
"if",
"(",
"property_exists",
"(",
"$",
"this",
",",
"'client_'",
".",
"$",
"name",
")",
")",
"{",
"$",
"name",
"=",
"'client_'",
".",
"$",
"name",
";",
"return",
"!",
"empty",
"(",
"$"... | Check if this client has been provided a property value.
@param $name
@return bool | [
"Check",
"if",
"this",
"client",
"has",
"been",
"provided",
"a",
"property",
"value",
"."
] | bf5f25e938492f5bdd05db092d84f35fc3b035ad | https://github.com/hnhdigital-os/bluora-shared-api-traits/blob/bf5f25e938492f5bdd05db092d84f35fc3b035ad/src/EnvironmentVariablesTrait.php#L39-L46 |
7,199 | hnhdigital-os/bluora-shared-api-traits | src/EnvironmentVariablesTrait.php | EnvironmentVariablesTrait.setConfig | public function setConfig($name, $value)
{
if (property_exists($this, 'client_'.$name) && !empty($value)) {
$name = 'client_'.$name;
$this->$name = $value;
}
return $this;
} | php | public function setConfig($name, $value)
{
if (property_exists($this, 'client_'.$name) && !empty($value)) {
$name = 'client_'.$name;
$this->$name = $value;
}
return $this;
} | [
"public",
"function",
"setConfig",
"(",
"$",
"name",
",",
"$",
"value",
")",
"{",
"if",
"(",
"property_exists",
"(",
"$",
"this",
",",
"'client_'",
".",
"$",
"name",
")",
"&&",
"!",
"empty",
"(",
"$",
"value",
")",
")",
"{",
"$",
"name",
"=",
"'c... | Set a config variable.
@param string $name
@param string $value
@return IsbnPlus | [
"Set",
"a",
"config",
"variable",
"."
] | bf5f25e938492f5bdd05db092d84f35fc3b035ad | https://github.com/hnhdigital-os/bluora-shared-api-traits/blob/bf5f25e938492f5bdd05db092d84f35fc3b035ad/src/EnvironmentVariablesTrait.php#L56-L64 |
Subsets and Splits
Yii Code Samples
Gathers all records from test, train, and validation sets that contain the word 'yii', providing a basic filtered view of the dataset relevant to Yii-related content.