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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
26,000 | SagittariusX/Beluga.Translation | src/Beluga/Translation/Locale.php | Locale.TryParseArray | public static function TryParseArray(
&$refLocale, array $requestData, array $acceptedKeys = [ 'locale', 'language', 'lang', 'loc', 'lc', 'lng' ] )
: bool
{
if ( \count( $requestData ) < 1 )
{
return false;
}
$requestData = \array_change_key_case( $requestData , \CASE_... | php | public static function TryParseArray(
&$refLocale, array $requestData, array $acceptedKeys = [ 'locale', 'language', 'lang', 'loc', 'lc', 'lng' ] )
: bool
{
if ( \count( $requestData ) < 1 )
{
return false;
}
$requestData = \array_change_key_case( $requestData , \CASE_... | [
"public",
"static",
"function",
"TryParseArray",
"(",
"&",
"$",
"refLocale",
",",
"array",
"$",
"requestData",
",",
"array",
"$",
"acceptedKeys",
"=",
"[",
"'locale'",
",",
"'language'",
",",
"'lang'",
",",
"'loc'",
",",
"'lc'",
",",
"'lng'",
"]",
")",
"... | Tries to create a new Locale instance from defined array. It accepts one of the following array keys
to declare an
@param \Beluga\Translation\Locale $refLocale Returns the Locale instance if the method return TRUE.
@param array $requestData The array with the data that should be used for getting local info from.
@re... | [
"Tries",
"to",
"create",
"a",
"new",
"Locale",
"instance",
"from",
"defined",
"array",
".",
"It",
"accepts",
"one",
"of",
"the",
"following",
"array",
"keys",
"to",
"declare",
"an"
] | 8f66c4fef6fa4494413972ca56bd8e13f5a7e444 | https://github.com/SagittariusX/Beluga.Translation/blob/8f66c4fef6fa4494413972ca56bd8e13f5a7e444/src/Beluga/Translation/Locale.php#L389-L431 |
26,001 | itkg/core | src/Itkg/Core/Cache/Adapter/Chain/UseFirstWorkingStrategy.php | UseFirstWorkingStrategy.get | public function get(array $adapters, CacheableInterface $item)
{
foreach ($adapters as $adapter) {
try {
return $adapter->get($item);
} catch (\Exception $e) {
continue;
}
}
throw new UnhandledCacheException('No cache syste... | php | public function get(array $adapters, CacheableInterface $item)
{
foreach ($adapters as $adapter) {
try {
return $adapter->get($item);
} catch (\Exception $e) {
continue;
}
}
throw new UnhandledCacheException('No cache syste... | [
"public",
"function",
"get",
"(",
"array",
"$",
"adapters",
",",
"CacheableInterface",
"$",
"item",
")",
"{",
"foreach",
"(",
"$",
"adapters",
"as",
"$",
"adapter",
")",
"{",
"try",
"{",
"return",
"$",
"adapter",
"->",
"get",
"(",
"$",
"item",
")",
"... | Get cache from first up adapter
@param array $adapters
@param CacheableInterface $item
@throws UnhandledCacheException
@return mixed | [
"Get",
"cache",
"from",
"first",
"up",
"adapter"
] | e5e4efb05feb4d23b0df41f2b21fd095103e593b | https://github.com/itkg/core/blob/e5e4efb05feb4d23b0df41f2b21fd095103e593b/src/Itkg/Core/Cache/Adapter/Chain/UseFirstWorkingStrategy.php#L38-L49 |
26,002 | itkg/core | src/Itkg/Core/Cache/Adapter/Chain/UseFirstWorkingStrategy.php | UseFirstWorkingStrategy.remove | public function remove(array $adapters, CacheableInterface $item)
{
foreach ($adapters as $adapter) {
$adapter->remove($item);
}
} | php | public function remove(array $adapters, CacheableInterface $item)
{
foreach ($adapters as $adapter) {
$adapter->remove($item);
}
} | [
"public",
"function",
"remove",
"(",
"array",
"$",
"adapters",
",",
"CacheableInterface",
"$",
"item",
")",
"{",
"foreach",
"(",
"$",
"adapters",
"as",
"$",
"adapter",
")",
"{",
"$",
"adapter",
"->",
"remove",
"(",
"$",
"item",
")",
";",
"}",
"}"
] | Remove cache from all adapters
@param array $adapters
@param CacheableInterface $item
@return void | [
"Remove",
"cache",
"from",
"all",
"adapters"
] | e5e4efb05feb4d23b0df41f2b21fd095103e593b | https://github.com/itkg/core/blob/e5e4efb05feb4d23b0df41f2b21fd095103e593b/src/Itkg/Core/Cache/Adapter/Chain/UseFirstWorkingStrategy.php#L80-L85 |
26,003 | congraphcms/core | Repositories/RelationLoader.php | RelationLoader.queueUnresolvedObjects | public function queueUnresolvedObjects($data, $relations)
{
if( is_object($data) )
{
if( $data instanceof Model )
{
$data = $data->getData();
}
if( !$this->resolved($data) )
{
$this->addToQueue($data, $relations);
return;
}
$data = get_object_vars($data);
}
if( is_array($da... | php | public function queueUnresolvedObjects($data, $relations)
{
if( is_object($data) )
{
if( $data instanceof Model )
{
$data = $data->getData();
}
if( !$this->resolved($data) )
{
$this->addToQueue($data, $relations);
return;
}
$data = get_object_vars($data);
}
if( is_array($da... | [
"public",
"function",
"queueUnresolvedObjects",
"(",
"$",
"data",
",",
"$",
"relations",
")",
"{",
"if",
"(",
"is_object",
"(",
"$",
"data",
")",
")",
"{",
"if",
"(",
"$",
"data",
"instanceof",
"Model",
")",
"{",
"$",
"data",
"=",
"$",
"data",
"->",
... | Add unresovled objects to load queue
@param mixed $data data to be parsed
@param array | integer $relations relations to be loaded
@return void | [
"Add",
"unresovled",
"objects",
"to",
"load",
"queue"
] | d017d3951b446fb2ac93b8fcee120549bb125b17 | https://github.com/congraphcms/core/blob/d017d3951b446fb2ac93b8fcee120549bb125b17/Repositories/RelationLoader.php#L92-L127 |
26,004 | congraphcms/core | Repositories/RelationLoader.php | RelationLoader.resolved | protected function resolved($obj)
{
if( ! is_object($obj) )
{
return true;
}
$data = get_object_vars($obj);
if( count($data) == 2
&& array_key_exists('id', $data)
&& array_key_exists('type', $data)
)
{
return false;
}
return true;
} | php | protected function resolved($obj)
{
if( ! is_object($obj) )
{
return true;
}
$data = get_object_vars($obj);
if( count($data) == 2
&& array_key_exists('id', $data)
&& array_key_exists('type', $data)
)
{
return false;
}
return true;
} | [
"protected",
"function",
"resolved",
"(",
"$",
"obj",
")",
"{",
"if",
"(",
"!",
"is_object",
"(",
"$",
"obj",
")",
")",
"{",
"return",
"true",
";",
"}",
"$",
"data",
"=",
"get_object_vars",
"(",
"$",
"obj",
")",
";",
"if",
"(",
"count",
"(",
"$",... | Check if object is resolved
@param stdClass $obj object to check
@return boolean | [
"Check",
"if",
"object",
"is",
"resolved"
] | d017d3951b446fb2ac93b8fcee120549bb125b17 | https://github.com/congraphcms/core/blob/d017d3951b446fb2ac93b8fcee120549bb125b17/Repositories/RelationLoader.php#L136-L153 |
26,005 | congraphcms/core | Repositories/RelationLoader.php | RelationLoader.addToQueue | protected function addToQueue($object, $relations)
{
if( ! array_key_exists($object->type, self::$loadQueue) )
{
self::$loadQueue[$object->type] = [];
}
$relationsKey = base64_encode(json_encode($relations));
if( ! array_key_exists($relationsKey, self::$loadQueue[$object->type]) )
{
self::$loadQueue[... | php | protected function addToQueue($object, $relations)
{
if( ! array_key_exists($object->type, self::$loadQueue) )
{
self::$loadQueue[$object->type] = [];
}
$relationsKey = base64_encode(json_encode($relations));
if( ! array_key_exists($relationsKey, self::$loadQueue[$object->type]) )
{
self::$loadQueue[... | [
"protected",
"function",
"addToQueue",
"(",
"$",
"object",
",",
"$",
"relations",
")",
"{",
"if",
"(",
"!",
"array_key_exists",
"(",
"$",
"object",
"->",
"type",
",",
"self",
"::",
"$",
"loadQueue",
")",
")",
"{",
"self",
"::",
"$",
"loadQueue",
"[",
... | Add object to loadQueue if it's specified in relations
@param stdClass $object object to add
@param array | int $relations relations to check
@return void | [
"Add",
"object",
"to",
"loadQueue",
"if",
"it",
"s",
"specified",
"in",
"relations"
] | d017d3951b446fb2ac93b8fcee120549bb125b17 | https://github.com/congraphcms/core/blob/d017d3951b446fb2ac93b8fcee120549bb125b17/Repositories/RelationLoader.php#L163-L176 |
26,006 | imsamurai/CakePHP-AdvancedShell | Console/Command/Task/AdvancedTask.php | AdvancedTask._scheduleVars | protected function _scheduleVars() {
global $argv;
$path = $argv[2] . DS;
$shellName = $argv[3];
$taskName = $argv[4];
if (isset($this->args[0]) && $this->hasMethod($this->args[0])) {
$methodName = $this->args[0];
array_shift($this->args);
} else {
$methodName = null;
}
$command = implode(' '... | php | protected function _scheduleVars() {
global $argv;
$path = $argv[2] . DS;
$shellName = $argv[3];
$taskName = $argv[4];
if (isset($this->args[0]) && $this->hasMethod($this->args[0])) {
$methodName = $this->args[0];
array_shift($this->args);
} else {
$methodName = null;
}
$command = implode(' '... | [
"protected",
"function",
"_scheduleVars",
"(",
")",
"{",
"global",
"$",
"argv",
";",
"$",
"path",
"=",
"$",
"argv",
"[",
"2",
"]",
".",
"DS",
";",
"$",
"shellName",
"=",
"$",
"argv",
"[",
"3",
"]",
";",
"$",
"taskName",
"=",
"$",
"argv",
"[",
"... | Returns variables for schedule
@global array $argv
@return array | [
"Returns",
"variables",
"for",
"schedule"
] | 087d483742e2a76bee45e35b8d94957b0d20f857 | https://github.com/imsamurai/CakePHP-AdvancedShell/blob/087d483742e2a76bee45e35b8d94957b0d20f857/Console/Command/Task/AdvancedTask.php#L181-L225 |
26,007 | imsamurai/CakePHP-AdvancedShell | Console/Command/Task/AdvancedTask.php | AdvancedTask._schedule | protected function _schedule($command, $path, array $arguments, array $options) {
$TaskClient = ClassRegistry::init('Task.TaskClient');
$task = $TaskClient->add($command, $path, $arguments, $options);
if ($task) {
$waitFor = empty($options['dependsOn']) ? 'none' : implode(', ', $options['dependsOn']) . ' task(... | php | protected function _schedule($command, $path, array $arguments, array $options) {
$TaskClient = ClassRegistry::init('Task.TaskClient');
$task = $TaskClient->add($command, $path, $arguments, $options);
if ($task) {
$waitFor = empty($options['dependsOn']) ? 'none' : implode(', ', $options['dependsOn']) . ' task(... | [
"protected",
"function",
"_schedule",
"(",
"$",
"command",
",",
"$",
"path",
",",
"array",
"$",
"arguments",
",",
"array",
"$",
"options",
")",
"{",
"$",
"TaskClient",
"=",
"ClassRegistry",
"::",
"init",
"(",
"'Task.TaskClient'",
")",
";",
"$",
"task",
"... | Adds script to sceduler
@param string $command
@param string $path
@param array $arguments
@param array $options | [
"Adds",
"script",
"to",
"sceduler"
] | 087d483742e2a76bee45e35b8d94957b0d20f857 | https://github.com/imsamurai/CakePHP-AdvancedShell/blob/087d483742e2a76bee45e35b8d94957b0d20f857/Console/Command/Task/AdvancedTask.php#L235-L245 |
26,008 | imsamurai/CakePHP-AdvancedShell | Console/Command/Task/AdvancedTask.php | AdvancedTask._getInterval | protected function _getInterval($interval) {
if ($interval !== null) {
return $interval;
} elseif (!empty($this->params['interval'])) {
return $this->params['interval'];
} else {
return '1 day';
}
} | php | protected function _getInterval($interval) {
if ($interval !== null) {
return $interval;
} elseif (!empty($this->params['interval'])) {
return $this->params['interval'];
} else {
return '1 day';
}
} | [
"protected",
"function",
"_getInterval",
"(",
"$",
"interval",
")",
"{",
"if",
"(",
"$",
"interval",
"!==",
"null",
")",
"{",
"return",
"$",
"interval",
";",
"}",
"elseif",
"(",
"!",
"empty",
"(",
"$",
"this",
"->",
"params",
"[",
"'interval'",
"]",
... | Returns interval value specified by parameter or default value
@param string $interval If not null method return this value
@return string | [
"Returns",
"interval",
"value",
"specified",
"by",
"parameter",
"or",
"default",
"value"
] | 087d483742e2a76bee45e35b8d94957b0d20f857 | https://github.com/imsamurai/CakePHP-AdvancedShell/blob/087d483742e2a76bee45e35b8d94957b0d20f857/Console/Command/Task/AdvancedTask.php#L302-L310 |
26,009 | ekyna/Sale | PriceableTrait.php | PriceableTrait.getTaxesAmounts | public function getTaxesAmounts()
{
$amounts = new TaxesAmounts();
$amounts->addTaxAmount(new TaxAmount($this->tax, $this->getTaxAmount()));
return $amounts;
} | php | public function getTaxesAmounts()
{
$amounts = new TaxesAmounts();
$amounts->addTaxAmount(new TaxAmount($this->tax, $this->getTaxAmount()));
return $amounts;
} | [
"public",
"function",
"getTaxesAmounts",
"(",
")",
"{",
"$",
"amounts",
"=",
"new",
"TaxesAmounts",
"(",
")",
";",
"$",
"amounts",
"->",
"addTaxAmount",
"(",
"new",
"TaxAmount",
"(",
"$",
"this",
"->",
"tax",
",",
"$",
"this",
"->",
"getTaxAmount",
"(",
... | Returns the taxes amounts.
@return TaxesAmounts | [
"Returns",
"the",
"taxes",
"amounts",
"."
] | 434093b658628e88b59a156e21239df0b1855e89 | https://github.com/ekyna/Sale/blob/434093b658628e88b59a156e21239df0b1855e89/PriceableTrait.php#L89-L94 |
26,010 | 975L/ConfigBundle | Twig/Config.php | Config.config | public function config($parameter)
{
$value = $this->configService->getParameter($parameter);
return is_array($value) ? json_encode($value) : $value;
} | php | public function config($parameter)
{
$value = $this->configService->getParameter($parameter);
return is_array($value) ? json_encode($value) : $value;
} | [
"public",
"function",
"config",
"(",
"$",
"parameter",
")",
"{",
"$",
"value",
"=",
"$",
"this",
"->",
"configService",
"->",
"getParameter",
"(",
"$",
"parameter",
")",
";",
"return",
"is_array",
"(",
"$",
"value",
")",
"?",
"json_encode",
"(",
"$",
"... | Returns the specified parameter
@return string | [
"Returns",
"the",
"specified",
"parameter"
] | 1f9a9e937dbb79ad06fe5d456e7536d58bd56e19 | https://github.com/975L/ConfigBundle/blob/1f9a9e937dbb79ad06fe5d456e7536d58bd56e19/Twig/Config.php#L48-L53 |
26,011 | black-lamp/blcms-payment | frontend/controllers/DefaultController.php | DefaultController.actionGetPaymentMethodInfo | public function actionGetPaymentMethodInfo($id) {
if (\Yii::$app->request->isAjax) {
if (!empty($id)) {
$method = PaymentMethod::findOne($id);
$methodTranslation = $method->translation;
$method = ArrayHelper::toArray($method);
$metho... | php | public function actionGetPaymentMethodInfo($id) {
if (\Yii::$app->request->isAjax) {
if (!empty($id)) {
$method = PaymentMethod::findOne($id);
$methodTranslation = $method->translation;
$method = ArrayHelper::toArray($method);
$metho... | [
"public",
"function",
"actionGetPaymentMethodInfo",
"(",
"$",
"id",
")",
"{",
"if",
"(",
"\\",
"Yii",
"::",
"$",
"app",
"->",
"request",
"->",
"isAjax",
")",
"{",
"if",
"(",
"!",
"empty",
"(",
"$",
"id",
")",
")",
"{",
"$",
"method",
"=",
"PaymentM... | Returns payment method model if request is Ajax.
@param integer $id
@return PaymentMethod
@throws NotFoundHttpException | [
"Returns",
"payment",
"method",
"model",
"if",
"request",
"is",
"Ajax",
"."
] | 6d139e0bb5a4e7733382cc6fe083173551905b92 | https://github.com/black-lamp/blcms-payment/blob/6d139e0bb5a4e7733382cc6fe083173551905b92/frontend/controllers/DefaultController.php#L25-L45 |
26,012 | MichaelJ2324/PHP-REST-Client | src/Storage/StaticStorage.php | StaticStorage.getItem | public static function getItem($namespace,$key){
if (isset(static::$_STORAGE[$namespace])){
if (isset(static::$_STORAGE[$namespace][$key])){
return static::$_STORAGE[$namespace][$key];
}
}
return NULL;
} | php | public static function getItem($namespace,$key){
if (isset(static::$_STORAGE[$namespace])){
if (isset(static::$_STORAGE[$namespace][$key])){
return static::$_STORAGE[$namespace][$key];
}
}
return NULL;
} | [
"public",
"static",
"function",
"getItem",
"(",
"$",
"namespace",
",",
"$",
"key",
")",
"{",
"if",
"(",
"isset",
"(",
"static",
"::",
"$",
"_STORAGE",
"[",
"$",
"namespace",
"]",
")",
")",
"{",
"if",
"(",
"isset",
"(",
"static",
"::",
"$",
"_STORAG... | Get an Item from the Static Storage array
@param $namespace
@param $key
@return mixed|null | [
"Get",
"an",
"Item",
"from",
"the",
"Static",
"Storage",
"array"
] | b8a2caaf6456eccaa845ba5c5098608aa9645c92 | https://github.com/MichaelJ2324/PHP-REST-Client/blob/b8a2caaf6456eccaa845ba5c5098608aa9645c92/src/Storage/StaticStorage.php#L46-L53 |
26,013 | MichaelJ2324/PHP-REST-Client | src/Storage/StaticStorage.php | StaticStorage.setItem | public static function setItem($namespace,$key,$value){
if (!isset(static::$_STORAGE[$namespace])){
static::$_STORAGE[$namespace] = array();
}
static::$_STORAGE[$namespace][$key] = $value;
return TRUE;
} | php | public static function setItem($namespace,$key,$value){
if (!isset(static::$_STORAGE[$namespace])){
static::$_STORAGE[$namespace] = array();
}
static::$_STORAGE[$namespace][$key] = $value;
return TRUE;
} | [
"public",
"static",
"function",
"setItem",
"(",
"$",
"namespace",
",",
"$",
"key",
",",
"$",
"value",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"static",
"::",
"$",
"_STORAGE",
"[",
"$",
"namespace",
"]",
")",
")",
"{",
"static",
"::",
"$",
"_STORAGE... | Set an Item in the Static Storage array for a particular Namespace
@param $namespace
@param $key
@return bool | [
"Set",
"an",
"Item",
"in",
"the",
"Static",
"Storage",
"array",
"for",
"a",
"particular",
"Namespace"
] | b8a2caaf6456eccaa845ba5c5098608aa9645c92 | https://github.com/MichaelJ2324/PHP-REST-Client/blob/b8a2caaf6456eccaa845ba5c5098608aa9645c92/src/Storage/StaticStorage.php#L61-L67 |
26,014 | railken/lem | src/Result.php | Result.addErrors | public function addErrors(Collection $errors)
{
$this->errors = $this->getErrors()->merge($errors);
return $this;
} | php | public function addErrors(Collection $errors)
{
$this->errors = $this->getErrors()->merge($errors);
return $this;
} | [
"public",
"function",
"addErrors",
"(",
"Collection",
"$",
"errors",
")",
"{",
"$",
"this",
"->",
"errors",
"=",
"$",
"this",
"->",
"getErrors",
"(",
")",
"->",
"merge",
"(",
"$",
"errors",
")",
";",
"return",
"$",
"this",
";",
"}"
] | Add errors.
@param Collection $errors
@return $this | [
"Add",
"errors",
"."
] | cff1efcd090a9504b2faf5594121885786dea67a | https://github.com/railken/lem/blob/cff1efcd090a9504b2faf5594121885786dea67a/src/Result.php#L104-L109 |
26,015 | phossa/phossa-cache | src/Phossa/Cache/CachePool.php | CachePool.createItem | protected function createItem(/*# string */ $key)/*# : CacheItemInterface */
{
// validate key first
$this->validateKey($key);
// use item factory
if (is_callable($this->item_factory)) {
$func = $this->item_factory;
$item = $func($key, $this, $this->item_conf... | php | protected function createItem(/*# string */ $key)/*# : CacheItemInterface */
{
// validate key first
$this->validateKey($key);
// use item factory
if (is_callable($this->item_factory)) {
$func = $this->item_factory;
$item = $func($key, $this, $this->item_conf... | [
"protected",
"function",
"createItem",
"(",
"/*# string */",
"$",
"key",
")",
"/*# : CacheItemInterface */",
"{",
"// validate key first",
"$",
"this",
"->",
"validateKey",
"(",
"$",
"key",
")",
";",
"// use item factory",
"if",
"(",
"is_callable",
"(",
"$",
"this... | Create item object
@param string $key item key
@return CacheItemInterface
@throws Exception\InvalidArgumentException
@access protected | [
"Create",
"item",
"object"
] | ad86bee9c5c646fbae09f6f58a346b379d16276e | https://github.com/phossa/phossa-cache/blob/ad86bee9c5c646fbae09f6f58a346b379d16276e/src/Phossa/Cache/CachePool.php#L306-L322 |
26,016 | picturae/php-composition-utils | src/WithArrayTransform.php | WithArrayTransform.toArray | public function toArray()
{
$classData = [];
foreach ($this->getReflector()->getProperties(\ReflectionProperty::IS_PROTECTED) as $reflectionProperty) {
if (!$reflectionProperty->isStatic()) {
$reflectionProperty->setAccessible(true);
$classData[$reflection... | php | public function toArray()
{
$classData = [];
foreach ($this->getReflector()->getProperties(\ReflectionProperty::IS_PROTECTED) as $reflectionProperty) {
if (!$reflectionProperty->isStatic()) {
$reflectionProperty->setAccessible(true);
$classData[$reflection... | [
"public",
"function",
"toArray",
"(",
")",
"{",
"$",
"classData",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"this",
"->",
"getReflector",
"(",
")",
"->",
"getProperties",
"(",
"\\",
"ReflectionProperty",
"::",
"IS_PROTECTED",
")",
"as",
"$",
"reflectionProp... | Fetch the array representation of the protected properties of an object.
@return array | [
"Fetch",
"the",
"array",
"representation",
"of",
"the",
"protected",
"properties",
"of",
"an",
"object",
"."
] | 59a8191066c27687daabc8c5b33addb3599826ab | https://github.com/picturae/php-composition-utils/blob/59a8191066c27687daabc8c5b33addb3599826ab/src/WithArrayTransform.php#L30-L40 |
26,017 | picturae/php-composition-utils | src/WithArrayTransform.php | WithArrayTransform.fromArray | public function fromArray(array $source)
{
foreach ($this->getReflector()->getProperties(\ReflectionProperty::IS_PROTECTED) as $reflectionProperty) {
if (!$reflectionProperty->isStatic() && isset($source[$reflectionProperty->getName()])) {
$reflectionProperty->setAccessible(true)... | php | public function fromArray(array $source)
{
foreach ($this->getReflector()->getProperties(\ReflectionProperty::IS_PROTECTED) as $reflectionProperty) {
if (!$reflectionProperty->isStatic() && isset($source[$reflectionProperty->getName()])) {
$reflectionProperty->setAccessible(true)... | [
"public",
"function",
"fromArray",
"(",
"array",
"$",
"source",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"getReflector",
"(",
")",
"->",
"getProperties",
"(",
"\\",
"ReflectionProperty",
"::",
"IS_PROTECTED",
")",
"as",
"$",
"reflectionProperty",
")",
"{... | Set protected propertie according to provided source.
@param array source data.
@return $this | [
"Set",
"protected",
"propertie",
"according",
"to",
"provided",
"source",
"."
] | 59a8191066c27687daabc8c5b33addb3599826ab | https://github.com/picturae/php-composition-utils/blob/59a8191066c27687daabc8c5b33addb3599826ab/src/WithArrayTransform.php#L47-L56 |
26,018 | picturae/php-composition-utils | src/WithArrayTransform.php | WithArrayTransform.getFieldsConfig | public function getFieldsConfig()
{
if (null === $this->fieldsConfigList) {
$this->fieldsConfigList = [];
foreach ($this->getFields() as $field) {
$reflectionProperty = $this->getReflector()->getProperty($field);
$docBlock = $reflectionProperty->getDo... | php | public function getFieldsConfig()
{
if (null === $this->fieldsConfigList) {
$this->fieldsConfigList = [];
foreach ($this->getFields() as $field) {
$reflectionProperty = $this->getReflector()->getProperty($field);
$docBlock = $reflectionProperty->getDo... | [
"public",
"function",
"getFieldsConfig",
"(",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"this",
"->",
"fieldsConfigList",
")",
"{",
"$",
"this",
"->",
"fieldsConfigList",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"this",
"->",
"getFields",
"(",
")",
"as"... | Fetch the var metadata for a field and store it in the config.
@return array | [
"Fetch",
"the",
"var",
"metadata",
"for",
"a",
"field",
"and",
"store",
"it",
"in",
"the",
"config",
"."
] | 59a8191066c27687daabc8c5b33addb3599826ab | https://github.com/picturae/php-composition-utils/blob/59a8191066c27687daabc8c5b33addb3599826ab/src/WithArrayTransform.php#L80-L98 |
26,019 | picturae/php-composition-utils | src/WithArrayTransform.php | WithArrayTransform.getFieldType | public function getFieldType($field)
{
return isset($this->getFieldsConfig()[$field]) ? $this->getFieldsConfig()[$field]['type'] : null;
} | php | public function getFieldType($field)
{
return isset($this->getFieldsConfig()[$field]) ? $this->getFieldsConfig()[$field]['type'] : null;
} | [
"public",
"function",
"getFieldType",
"(",
"$",
"field",
")",
"{",
"return",
"isset",
"(",
"$",
"this",
"->",
"getFieldsConfig",
"(",
")",
"[",
"$",
"field",
"]",
")",
"?",
"$",
"this",
"->",
"getFieldsConfig",
"(",
")",
"[",
"$",
"field",
"]",
"[",
... | Fetch a field type according to var metadata.
@param string $field
@return string | [
"Fetch",
"a",
"field",
"type",
"according",
"to",
"var",
"metadata",
"."
] | 59a8191066c27687daabc8c5b33addb3599826ab | https://github.com/picturae/php-composition-utils/blob/59a8191066c27687daabc8c5b33addb3599826ab/src/WithArrayTransform.php#L105-L108 |
26,020 | hamjoint/mustard-media | src/lib/Photo.php | Photo.getUrlAttribute | public function getUrlAttribute($suffix = '')
{
if (!$this->exists) {
return Cache::rememberForever('missing_photo', function () {
return static::placeholder('No photo provided');
});
}
if (!$this->processed) {
return Cache::rememberForeve... | php | public function getUrlAttribute($suffix = '')
{
if (!$this->exists) {
return Cache::rememberForever('missing_photo', function () {
return static::placeholder('No photo provided');
});
}
if (!$this->processed) {
return Cache::rememberForeve... | [
"public",
"function",
"getUrlAttribute",
"(",
"$",
"suffix",
"=",
"''",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"exists",
")",
"{",
"return",
"Cache",
"::",
"rememberForever",
"(",
"'missing_photo'",
",",
"function",
"(",
")",
"{",
"return",
"static... | Return the public URL for the photo.
@param string $suffix
@return string | [
"Return",
"the",
"public",
"URL",
"for",
"the",
"photo",
"."
] | d3c799dbc3578e1e1022bb4eccae7a20e285ba06 | https://github.com/hamjoint/mustard-media/blob/d3c799dbc3578e1e1022bb4eccae7a20e285ba06/src/lib/Photo.php#L94-L111 |
26,021 | hamjoint/mustard-media | src/lib/Photo.php | Photo.delete | public function delete()
{
$disk = Storage::disk(config('mustard.storage.disk', 'local'));
$disk->delete($this->getPath());
$disk->delete($this->getSmallPath());
$disk->delete($this->getLargePath());
parent::delete();
} | php | public function delete()
{
$disk = Storage::disk(config('mustard.storage.disk', 'local'));
$disk->delete($this->getPath());
$disk->delete($this->getSmallPath());
$disk->delete($this->getLargePath());
parent::delete();
} | [
"public",
"function",
"delete",
"(",
")",
"{",
"$",
"disk",
"=",
"Storage",
"::",
"disk",
"(",
"config",
"(",
"'mustard.storage.disk'",
",",
"'local'",
")",
")",
";",
"$",
"disk",
"->",
"delete",
"(",
"$",
"this",
"->",
"getPath",
"(",
")",
")",
";",... | Delete the record and data from the filesystem.
@return void | [
"Delete",
"the",
"record",
"and",
"data",
"from",
"the",
"filesystem",
"."
] | d3c799dbc3578e1e1022bb4eccae7a20e285ba06 | https://github.com/hamjoint/mustard-media/blob/d3c799dbc3578e1e1022bb4eccae7a20e285ba06/src/lib/Photo.php#L138-L147 |
26,022 | hamjoint/mustard-media | src/lib/Photo.php | Photo.placeholder | private static function placeholder($text)
{
$image_manager = new ImageManager(['driver' => 'imagick']);
$image = $image_manager->canvas(640, 480, '#efefef');
$image->text($text, 320, 240 - (70 * substr_count($text, "\n")), function ($font) {
$font->file(base_path('vendor/webfo... | php | private static function placeholder($text)
{
$image_manager = new ImageManager(['driver' => 'imagick']);
$image = $image_manager->canvas(640, 480, '#efefef');
$image->text($text, 320, 240 - (70 * substr_count($text, "\n")), function ($font) {
$font->file(base_path('vendor/webfo... | [
"private",
"static",
"function",
"placeholder",
"(",
"$",
"text",
")",
"{",
"$",
"image_manager",
"=",
"new",
"ImageManager",
"(",
"[",
"'driver'",
"=>",
"'imagick'",
"]",
")",
";",
"$",
"image",
"=",
"$",
"image_manager",
"->",
"canvas",
"(",
"640",
","... | Return a placeholder image containing the provided text.
@param string $text
@return string | [
"Return",
"a",
"placeholder",
"image",
"containing",
"the",
"provided",
"text",
"."
] | d3c799dbc3578e1e1022bb4eccae7a20e285ba06 | https://github.com/hamjoint/mustard-media/blob/d3c799dbc3578e1e1022bb4eccae7a20e285ba06/src/lib/Photo.php#L166-L183 |
26,023 | hamjoint/mustard-media | src/lib/Photo.php | Photo.upload | public static function upload($file)
{
$photo = self::create();
$image_manager = new ImageManager(['driver' => 'imagick']);
$disk = Storage::disk(config('mustard.storage.disk', 'local'));
if (!file_exists($file)) {
RuntimeException("File $file does not exist");
... | php | public static function upload($file)
{
$photo = self::create();
$image_manager = new ImageManager(['driver' => 'imagick']);
$disk = Storage::disk(config('mustard.storage.disk', 'local'));
if (!file_exists($file)) {
RuntimeException("File $file does not exist");
... | [
"public",
"static",
"function",
"upload",
"(",
"$",
"file",
")",
"{",
"$",
"photo",
"=",
"self",
"::",
"create",
"(",
")",
";",
"$",
"image_manager",
"=",
"new",
"ImageManager",
"(",
"[",
"'driver'",
"=>",
"'imagick'",
"]",
")",
";",
"$",
"disk",
"="... | Process a photo and create a record.
@param string $file
@return self | [
"Process",
"a",
"photo",
"and",
"create",
"a",
"record",
"."
] | d3c799dbc3578e1e1022bb4eccae7a20e285ba06 | https://github.com/hamjoint/mustard-media/blob/d3c799dbc3578e1e1022bb4eccae7a20e285ba06/src/lib/Photo.php#L192-L250 |
26,024 | fivesqrd/mutex | src/Laravel/MutexServiceProvider.php | MutexServiceProvider.boot | public function boot()
{
$source = realpath($raw = __DIR__ . '/Config.php') ?: $raw;
if ($this->app instanceof LaravelApplication && $this->app->runningInConsole()) {
$this->publishes([$source => config_path('mutex.php')]);
} elseif ($this->app instanceof LumenApplication) {
... | php | public function boot()
{
$source = realpath($raw = __DIR__ . '/Config.php') ?: $raw;
if ($this->app instanceof LaravelApplication && $this->app->runningInConsole()) {
$this->publishes([$source => config_path('mutex.php')]);
} elseif ($this->app instanceof LumenApplication) {
... | [
"public",
"function",
"boot",
"(",
")",
"{",
"$",
"source",
"=",
"realpath",
"(",
"$",
"raw",
"=",
"__DIR__",
".",
"'/Config.php'",
")",
"?",
":",
"$",
"raw",
";",
"if",
"(",
"$",
"this",
"->",
"app",
"instanceof",
"LaravelApplication",
"&&",
"$",
"t... | Bootstrap the configuration
@return void | [
"Bootstrap",
"the",
"configuration"
] | 46ec93b5503e5c142da97379e744e4006a717643 | https://github.com/fivesqrd/mutex/blob/46ec93b5503e5c142da97379e744e4006a717643/src/Laravel/MutexServiceProvider.php#L22-L33 |
26,025 | dsv-su/daisy-api-client-php | src/Employee.php | Employee.find | public static function find(array $query)
{
$employees = Client::get("employee", $query);
return array_map(function ($data) { return new self($data); }, $employees);
} | php | public static function find(array $query)
{
$employees = Client::get("employee", $query);
return array_map(function ($data) { return new self($data); }, $employees);
} | [
"public",
"static",
"function",
"find",
"(",
"array",
"$",
"query",
")",
"{",
"$",
"employees",
"=",
"Client",
"::",
"get",
"(",
"\"employee\"",
",",
"$",
"query",
")",
";",
"return",
"array_map",
"(",
"function",
"(",
"$",
"data",
")",
"{",
"return",
... | Retrieve an array of Employee objects according to a search query.
@param array $query The query.
@return Employee[] | [
"Retrieve",
"an",
"array",
"of",
"Employee",
"objects",
"according",
"to",
"a",
"search",
"query",
"."
] | aa6817ed45fdf3629c9683ea8a8e70a80f59b441 | https://github.com/dsv-su/daisy-api-client-php/blob/aa6817ed45fdf3629c9683ea8a8e70a80f59b441/src/Employee.php#L62-L66 |
26,026 | dsv-su/daisy-api-client-php | src/Employee.php | Employee.getWorkPhone | public function getWorkPhone()
{
if (!isset($this->workPhone)) {
$wp = trim($this->getRawWorkPhone());
if (empty($wp)) {
$this->workPhone = null;
} else {
if (preg_match('/^\+?[-\d\s()]+/', $wp, $matches)) {
$wp = $match... | php | public function getWorkPhone()
{
if (!isset($this->workPhone)) {
$wp = trim($this->getRawWorkPhone());
if (empty($wp)) {
$this->workPhone = null;
} else {
if (preg_match('/^\+?[-\d\s()]+/', $wp, $matches)) {
$wp = $match... | [
"public",
"function",
"getWorkPhone",
"(",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"workPhone",
")",
")",
"{",
"$",
"wp",
"=",
"trim",
"(",
"$",
"this",
"->",
"getRawWorkPhone",
"(",
")",
")",
";",
"if",
"(",
"empty",
"(",
"$",... | Get work phone number of this employee. Try to parse it to a
PhoneNumber, otherwise return the raw string.
@return PhoneNumber|string|null The work phone number, or null if missing. | [
"Get",
"work",
"phone",
"number",
"of",
"this",
"employee",
".",
"Try",
"to",
"parse",
"it",
"to",
"a",
"PhoneNumber",
"otherwise",
"return",
"the",
"raw",
"string",
"."
] | aa6817ed45fdf3629c9683ea8a8e70a80f59b441 | https://github.com/dsv-su/daisy-api-client-php/blob/aa6817ed45fdf3629c9683ea8a8e70a80f59b441/src/Employee.php#L105-L133 |
26,027 | PatrolServer/patrolsdk-php | lib/Software.php | Software.find | public function find($id, $scopes = []) {
return $this->_get('servers/' . $this->server_id . '/software/' . $id, null, $scopes);
} | php | public function find($id, $scopes = []) {
return $this->_get('servers/' . $this->server_id . '/software/' . $id, null, $scopes);
} | [
"public",
"function",
"find",
"(",
"$",
"id",
",",
"$",
"scopes",
"=",
"[",
"]",
")",
"{",
"return",
"$",
"this",
"->",
"_get",
"(",
"'servers/'",
".",
"$",
"this",
"->",
"server_id",
".",
"'/software/'",
".",
"$",
"id",
",",
"null",
",",
"$",
"s... | Gets a single software object on the server
@param integer $id
@param array $scopes optional
@return Software | [
"Gets",
"a",
"single",
"software",
"object",
"on",
"the",
"server"
] | 2451f0d2ba2bb5bc3d7e47cfc110f7f272620db2 | https://github.com/PatrolServer/patrolsdk-php/blob/2451f0d2ba2bb5bc3d7e47cfc110f7f272620db2/lib/Software.php#L38-L40 |
26,028 | PatrolServer/patrolsdk-php | lib/Software.php | Software.exploits | public function exploits($scopes = []) {
if (!$this->id) {
throw new Exception("The software has no ID, can\'t get exploits");
}
if (!$this->server_id) {
throw new Exception("The software has no server ID, can\'t get exploits");
}
$exploit = new Exploit(... | php | public function exploits($scopes = []) {
if (!$this->id) {
throw new Exception("The software has no ID, can\'t get exploits");
}
if (!$this->server_id) {
throw new Exception("The software has no server ID, can\'t get exploits");
}
$exploit = new Exploit(... | [
"public",
"function",
"exploits",
"(",
"$",
"scopes",
"=",
"[",
"]",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"id",
")",
"{",
"throw",
"new",
"Exception",
"(",
"\"The software has no ID, can\\'t get exploits\"",
")",
";",
"}",
"if",
"(",
"!",
"$",
... | Gets a list of exploits from this software
@param array $scopes optional
@return array List of PatrolSdk\Exploit | [
"Gets",
"a",
"list",
"of",
"exploits",
"from",
"this",
"software"
] | 2451f0d2ba2bb5bc3d7e47cfc110f7f272620db2 | https://github.com/PatrolServer/patrolsdk-php/blob/2451f0d2ba2bb5bc3d7e47cfc110f7f272620db2/lib/Software.php#L49-L66 |
26,029 | PatrolServer/patrolsdk-php | lib/Software.php | Software.__valueSet | protected function __valueSet($key, $value) {
if ($key === "exploits") {
$casted = [];
foreach ($value as $exploit) {
$casted[] = new Exploit($this->patrol, $exploit);
}
return $casted;
}
return $value;
} | php | protected function __valueSet($key, $value) {
if ($key === "exploits") {
$casted = [];
foreach ($value as $exploit) {
$casted[] = new Exploit($this->patrol, $exploit);
}
return $casted;
}
return $value;
} | [
"protected",
"function",
"__valueSet",
"(",
"$",
"key",
",",
"$",
"value",
")",
"{",
"if",
"(",
"$",
"key",
"===",
"\"exploits\"",
")",
"{",
"$",
"casted",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"value",
"as",
"$",
"exploit",
")",
"{",
"$",
"ca... | This is a casting hook, when a new value is set in PatrolModel, this hook will be called,
in this case, when "exploits" are set in the model, cast them to a PatrolSdk\Exploit object
@param string $key
@param object $value
@return object $value Can be casted | [
"This",
"is",
"a",
"casting",
"hook",
"when",
"a",
"new",
"value",
"is",
"set",
"in",
"PatrolModel",
"this",
"hook",
"will",
"be",
"called",
"in",
"this",
"case",
"when",
"exploits",
"are",
"set",
"in",
"the",
"model",
"cast",
"them",
"to",
"a",
"Patro... | 2451f0d2ba2bb5bc3d7e47cfc110f7f272620db2 | https://github.com/PatrolServer/patrolsdk-php/blob/2451f0d2ba2bb5bc3d7e47cfc110f7f272620db2/lib/Software.php#L77-L87 |
26,030 | DaemonAlchemist/atp-core | src/ATPCore/Lessc.php | Lessc.deduplicate | protected function deduplicate($lines) {
$unique = array();
$comments = array();
foreach($lines as $line) {
if (strpos($line, '/*') === 0) {
$comments[] = $line;
continue;
}
if (!in_array($line, $unique)) {
$unique[] = $line;
}
array_splice($unique, array_search($line, $unique), 0, $comments);
$comments =... | php | protected function deduplicate($lines) {
$unique = array();
$comments = array();
foreach($lines as $line) {
if (strpos($line, '/*') === 0) {
$comments[] = $line;
continue;
}
if (!in_array($line, $unique)) {
$unique[] = $line;
}
array_splice($unique, array_search($line, $unique), 0, $comments);
$comments =... | [
"protected",
"function",
"deduplicate",
"(",
"$",
"lines",
")",
"{",
"$",
"unique",
"=",
"array",
"(",
")",
";",
"$",
"comments",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"lines",
"as",
"$",
"line",
")",
"{",
"if",
"(",
"strpos",
"(",
"$... | Deduplicate lines in a block. Comments are not deduplicated. If a
duplicate rule is detected, the comments immediately preceding each
occurence are consolidated. | [
"Deduplicate",
"lines",
"in",
"a",
"block",
".",
"Comments",
"are",
"not",
"deduplicated",
".",
"If",
"a",
"duplicate",
"rule",
"is",
"detected",
"the",
"comments",
"immediately",
"preceding",
"each",
"occurence",
"are",
"consolidated",
"."
] | 47efa734b882c27aa2a59fbcba34653b4d2125c7 | https://github.com/DaemonAlchemist/atp-core/blob/47efa734b882c27aa2a59fbcba34653b4d2125c7/src/ATPCore/Lessc.php#L295-L311 |
26,031 | DaemonAlchemist/atp-core | src/ATPCore/Lessc.php | Lessc.findBlocks | protected function findBlocks($searchIn, $path, $orderedArgs, $keywordArgs, $seen=array()) {
if ($searchIn == null) return null;
if (isset($seen[$searchIn->id])) return null;
$seen[$searchIn->id] = true;
$name = $path[0];
if (isset($searchIn->children[$name])) {
$blocks = $searchIn->children[$name];
if (coun... | php | protected function findBlocks($searchIn, $path, $orderedArgs, $keywordArgs, $seen=array()) {
if ($searchIn == null) return null;
if (isset($seen[$searchIn->id])) return null;
$seen[$searchIn->id] = true;
$name = $path[0];
if (isset($searchIn->children[$name])) {
$blocks = $searchIn->children[$name];
if (coun... | [
"protected",
"function",
"findBlocks",
"(",
"$",
"searchIn",
",",
"$",
"path",
",",
"$",
"orderedArgs",
",",
"$",
"keywordArgs",
",",
"$",
"seen",
"=",
"array",
"(",
")",
")",
"{",
"if",
"(",
"$",
"searchIn",
"==",
"null",
")",
"return",
"null",
";",... | attempt to find blocks matched by path and args | [
"attempt",
"to",
"find",
"blocks",
"matched",
"by",
"path",
"and",
"args"
] | 47efa734b882c27aa2a59fbcba34653b4d2125c7 | https://github.com/DaemonAlchemist/atp-core/blob/47efa734b882c27aa2a59fbcba34653b4d2125c7/src/ATPCore/Lessc.php#L597-L631 |
26,032 | DaemonAlchemist/atp-core | src/ATPCore/Lessc.php | Lessc.lib_data_uri | protected function lib_data_uri($value) {
$mime = ($value[0] === 'list') ? $value[2][0][2] : null;
$url = ($value[0] === 'list') ? $value[2][1][2][0] : $value[2][0];
$fullpath = $this->findImport($url);
if($fullpath && ($fsize = filesize($fullpath)) !== false) {
// IE8 can't handle data uris larger than 32KB
... | php | protected function lib_data_uri($value) {
$mime = ($value[0] === 'list') ? $value[2][0][2] : null;
$url = ($value[0] === 'list') ? $value[2][1][2][0] : $value[2][0];
$fullpath = $this->findImport($url);
if($fullpath && ($fsize = filesize($fullpath)) !== false) {
// IE8 can't handle data uris larger than 32KB
... | [
"protected",
"function",
"lib_data_uri",
"(",
"$",
"value",
")",
"{",
"$",
"mime",
"=",
"(",
"$",
"value",
"[",
"0",
"]",
"===",
"'list'",
")",
"?",
"$",
"value",
"[",
"2",
"]",
"[",
"0",
"]",
"[",
"2",
"]",
":",
"null",
";",
"$",
"url",
"=",... | Given an url, decide whether to output a regular link or the base64-encoded contents of the file
@param array $value either an argument list (two strings) or a single string
@return string formatted url(), either as a link or base64-encoded | [
"Given",
"an",
"url",
"decide",
"whether",
"to",
"output",
"a",
"regular",
"link",
"or",
"the",
"base64",
"-",
"encoded",
"contents",
"of",
"the",
"file"
] | 47efa734b882c27aa2a59fbcba34653b4d2125c7 | https://github.com/DaemonAlchemist/atp-core/blob/47efa734b882c27aa2a59fbcba34653b4d2125c7/src/ATPCore/Lessc.php#L994-L1019 |
26,033 | DaemonAlchemist/atp-core | src/ATPCore/Lessc.php | Lessc.toRGB | protected function toRGB($color) {
if ($color[0] == 'color') return $color;
$H = $color[1] / 360;
$S = $color[2] / 100;
$L = $color[3] / 100;
if ($S == 0) {
$r = $g = $b = $L;
} else {
$temp2 = $L < 0.5 ?
$L*(1.0 + $S) :
$L + $S - $L * $S;
$temp1 = 2.0 * $L - $temp2;
$r = $this->toRGB_helper($H + 1/... | php | protected function toRGB($color) {
if ($color[0] == 'color') return $color;
$H = $color[1] / 360;
$S = $color[2] / 100;
$L = $color[3] / 100;
if ($S == 0) {
$r = $g = $b = $L;
} else {
$temp2 = $L < 0.5 ?
$L*(1.0 + $S) :
$L + $S - $L * $S;
$temp1 = 2.0 * $L - $temp2;
$r = $this->toRGB_helper($H + 1/... | [
"protected",
"function",
"toRGB",
"(",
"$",
"color",
")",
"{",
"if",
"(",
"$",
"color",
"[",
"0",
"]",
"==",
"'color'",
")",
"return",
"$",
"color",
";",
"$",
"H",
"=",
"$",
"color",
"[",
"1",
"]",
"/",
"360",
";",
"$",
"S",
"=",
"$",
"color"... | Converts a hsl array into a color value in rgb.
Expects H to be in range of 0 to 360, S and L in 0 to 100 | [
"Converts",
"a",
"hsl",
"array",
"into",
"a",
"color",
"value",
"in",
"rgb",
".",
"Expects",
"H",
"to",
"be",
"in",
"range",
"of",
"0",
"to",
"360",
"S",
"and",
"L",
"in",
"0",
"to",
"100"
] | 47efa734b882c27aa2a59fbcba34653b4d2125c7 | https://github.com/DaemonAlchemist/atp-core/blob/47efa734b882c27aa2a59fbcba34653b4d2125c7/src/ATPCore/Lessc.php#L1362-L1387 |
26,034 | DaemonAlchemist/atp-core | src/ATPCore/Lessc.php | Lessc.funcToColor | protected function funcToColor($func) {
$fname = $func[1];
if ($func[2][0] != 'list') return false; // need a list of arguments
$rawComponents = $func[2][2];
if ($fname == 'hsl' || $fname == 'hsla') {
$hsl = array('hsl');
$i = 0;
foreach ($rawComponents as $c) {
$val = $this->reduce($c);
$val = isset($val[1]... | php | protected function funcToColor($func) {
$fname = $func[1];
if ($func[2][0] != 'list') return false; // need a list of arguments
$rawComponents = $func[2][2];
if ($fname == 'hsl' || $fname == 'hsla') {
$hsl = array('hsl');
$i = 0;
foreach ($rawComponents as $c) {
$val = $this->reduce($c);
$val = isset($val[1]... | [
"protected",
"function",
"funcToColor",
"(",
"$",
"func",
")",
"{",
"$",
"fname",
"=",
"$",
"func",
"[",
"1",
"]",
";",
"if",
"(",
"$",
"func",
"[",
"2",
"]",
"[",
"0",
"]",
"!=",
"'list'",
")",
"return",
"false",
";",
"// need a list of arguments\r"... | Convert the rgb, rgba, hsl color literals of function type
as returned by the parser into values of color type. | [
"Convert",
"the",
"rgb",
"rgba",
"hsl",
"color",
"literals",
"of",
"function",
"type",
"as",
"returned",
"by",
"the",
"parser",
"into",
"values",
"of",
"color",
"type",
"."
] | 47efa734b882c27aa2a59fbcba34653b4d2125c7 | https://github.com/DaemonAlchemist/atp-core/blob/47efa734b882c27aa2a59fbcba34653b4d2125c7/src/ATPCore/Lessc.php#L1397-L1447 |
26,035 | DaemonAlchemist/atp-core | src/ATPCore/Lessc.php | Lessc.get | protected function get($name) {
$current = $this->env;
$isArguments = $name == $this->vPrefix . 'arguments';
while ($current) {
if ($isArguments && isset($current->arguments)) {
return array('list', ' ', $current->arguments);
}
if (isset($current->store[$name]))
return $current->store[$name];
else {
$curr... | php | protected function get($name) {
$current = $this->env;
$isArguments = $name == $this->vPrefix . 'arguments';
while ($current) {
if ($isArguments && isset($current->arguments)) {
return array('list', ' ', $current->arguments);
}
if (isset($current->store[$name]))
return $current->store[$name];
else {
$curr... | [
"protected",
"function",
"get",
"(",
"$",
"name",
")",
"{",
"$",
"current",
"=",
"$",
"this",
"->",
"env",
";",
"$",
"isArguments",
"=",
"$",
"name",
"==",
"$",
"this",
"->",
"vPrefix",
".",
"'arguments'",
";",
"while",
"(",
"$",
"current",
")",
"{... | get the highest occurrence entry for a name | [
"get",
"the",
"highest",
"occurrence",
"entry",
"for",
"a",
"name"
] | 47efa734b882c27aa2a59fbcba34653b4d2125c7 | https://github.com/DaemonAlchemist/atp-core/blob/47efa734b882c27aa2a59fbcba34653b4d2125c7/src/ATPCore/Lessc.php#L1837-L1855 |
26,036 | DaemonAlchemist/atp-core | src/ATPCore/Lessc.php | lessc_parser.propertyValue | public function propertyValue(&$value, $keyName = null) {
$values = array();
if ($keyName !== null) $this->env->currentProperty = $keyName;
$s = null;
while ($this->expressionList($v)) {
$values[] = $v;
$s = $this->seek();
if (!$this->literal(',')) break;
}
if ($s) $this->seek($s);
if ($keyName !== nu... | php | public function propertyValue(&$value, $keyName = null) {
$values = array();
if ($keyName !== null) $this->env->currentProperty = $keyName;
$s = null;
while ($this->expressionList($v)) {
$values[] = $v;
$s = $this->seek();
if (!$this->literal(',')) break;
}
if ($s) $this->seek($s);
if ($keyName !== nu... | [
"public",
"function",
"propertyValue",
"(",
"&",
"$",
"value",
",",
"$",
"keyName",
"=",
"null",
")",
"{",
"$",
"values",
"=",
"array",
"(",
")",
";",
"if",
"(",
"$",
"keyName",
"!==",
"null",
")",
"$",
"this",
"->",
"env",
"->",
"currentProperty",
... | consume a list of values for a property | [
"consume",
"a",
"list",
"of",
"values",
"for",
"a",
"property"
] | 47efa734b882c27aa2a59fbcba34653b4d2125c7 | https://github.com/DaemonAlchemist/atp-core/blob/47efa734b882c27aa2a59fbcba34653b4d2125c7/src/ATPCore/Lessc.php#L2671-L2691 |
26,037 | DaemonAlchemist/atp-core | src/ATPCore/Lessc.php | lessc_parser.tag | protected function tag(&$tag, $simple = false) {
if ($simple)
$chars = '^@,:;{}\][>\(\) "\'';
else
$chars = '^@,;{}["\'';
$s = $this->seek();
$hasExpression = false;
$parts = array();
while ($this->tagBracket($parts, $hasExpression));
$oldWhite = $this->eatWhiteDefault;
$this->eatWhiteDefault = false;
... | php | protected function tag(&$tag, $simple = false) {
if ($simple)
$chars = '^@,:;{}\][>\(\) "\'';
else
$chars = '^@,;{}["\'';
$s = $this->seek();
$hasExpression = false;
$parts = array();
while ($this->tagBracket($parts, $hasExpression));
$oldWhite = $this->eatWhiteDefault;
$this->eatWhiteDefault = false;
... | [
"protected",
"function",
"tag",
"(",
"&",
"$",
"tag",
",",
"$",
"simple",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"simple",
")",
"$",
"chars",
"=",
"'^@,:;{}\\][>\\(\\) \"\\''",
";",
"else",
"$",
"chars",
"=",
"'^@,;{}[\"\\''",
";",
"$",
"s",
"=",
"$... | a space separated list of selectors | [
"a",
"space",
"separated",
"list",
"of",
"selectors"
] | 47efa734b882c27aa2a59fbcba34653b4d2125c7 | https://github.com/DaemonAlchemist/atp-core/blob/47efa734b882c27aa2a59fbcba34653b4d2125c7/src/ATPCore/Lessc.php#L3215-L3276 |
26,038 | DaemonAlchemist/atp-core | src/ATPCore/Lessc.php | lessc_parser.func | protected function func(&$func) {
$s = $this->seek();
if ($this->match('(%|[\w\-_][\w\-_:\.]+|[\w_])', $m) && $this->literal('(')) {
$fname = $m[1];
$sPreArgs = $this->seek();
$args = array();
while (true) {
$ss = $this->seek();
// this ugly nonsense is for ie filter properties
if ($this->keyword($name) ... | php | protected function func(&$func) {
$s = $this->seek();
if ($this->match('(%|[\w\-_][\w\-_:\.]+|[\w_])', $m) && $this->literal('(')) {
$fname = $m[1];
$sPreArgs = $this->seek();
$args = array();
while (true) {
$ss = $this->seek();
// this ugly nonsense is for ie filter properties
if ($this->keyword($name) ... | [
"protected",
"function",
"func",
"(",
"&",
"$",
"func",
")",
"{",
"$",
"s",
"=",
"$",
"this",
"->",
"seek",
"(",
")",
";",
"if",
"(",
"$",
"this",
"->",
"match",
"(",
"'(%|[\\w\\-_][\\w\\-_:\\.]+|[\\w_])'",
",",
"$",
"m",
")",
"&&",
"$",
"this",
"-... | a css function | [
"a",
"css",
"function"
] | 47efa734b882c27aa2a59fbcba34653b4d2125c7 | https://github.com/DaemonAlchemist/atp-core/blob/47efa734b882c27aa2a59fbcba34653b4d2125c7/src/ATPCore/Lessc.php#L3279-L3319 |
26,039 | DaemonAlchemist/atp-core | src/ATPCore/Lessc.php | lessc_parser.assign | protected function assign($name = null) {
if ($name) $this->currentProperty = $name;
return $this->literal(':') || $this->literal('=');
} | php | protected function assign($name = null) {
if ($name) $this->currentProperty = $name;
return $this->literal(':') || $this->literal('=');
} | [
"protected",
"function",
"assign",
"(",
"$",
"name",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"name",
")",
"$",
"this",
"->",
"currentProperty",
"=",
"$",
"name",
";",
"return",
"$",
"this",
"->",
"literal",
"(",
"':'",
")",
"||",
"$",
"this",
"->",
... | Consume an assignment operator
Can optionally take a name that will be set to the current property name | [
"Consume",
"an",
"assignment",
"operator",
"Can",
"optionally",
"take",
"a",
"name",
"that",
"will",
"be",
"set",
"to",
"the",
"current",
"property",
"name"
] | 47efa734b882c27aa2a59fbcba34653b4d2125c7 | https://github.com/DaemonAlchemist/atp-core/blob/47efa734b882c27aa2a59fbcba34653b4d2125c7/src/ATPCore/Lessc.php#L3344-L3347 |
26,040 | DaemonAlchemist/atp-core | src/ATPCore/Lessc.php | lessc_parser.append | protected function append($prop, $pos = null) {
if ($pos !== null) $prop[-1] = $pos;
$this->env->props[] = $prop;
} | php | protected function append($prop, $pos = null) {
if ($pos !== null) $prop[-1] = $pos;
$this->env->props[] = $prop;
} | [
"protected",
"function",
"append",
"(",
"$",
"prop",
",",
"$",
"pos",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"pos",
"!==",
"null",
")",
"$",
"prop",
"[",
"-",
"1",
"]",
"=",
"$",
"pos",
";",
"$",
"this",
"->",
"env",
"->",
"props",
"[",
"]",
... | append a property to the current block | [
"append",
"a",
"property",
"to",
"the",
"current",
"block"
] | 47efa734b882c27aa2a59fbcba34653b4d2125c7 | https://github.com/DaemonAlchemist/atp-core/blob/47efa734b882c27aa2a59fbcba34653b4d2125c7/src/ATPCore/Lessc.php#L3584-L3587 |
26,041 | pdyn/httpclient | HttpClientResponse.php | HttpClientResponse.instance_from_curl | public static function instance_from_curl($ch, $body) {
$transfer_info = curl_getinfo($ch);
$statuscode = (!empty($transfer_info['http_code'])) ? (int)$transfer_info['http_code'] : 404;
$errors = [];
$err = static::decode_error_code(curl_errno($ch));
if ($err !== 'SUCCESS') {
$errors[] = $err;
}
$mim... | php | public static function instance_from_curl($ch, $body) {
$transfer_info = curl_getinfo($ch);
$statuscode = (!empty($transfer_info['http_code'])) ? (int)$transfer_info['http_code'] : 404;
$errors = [];
$err = static::decode_error_code(curl_errno($ch));
if ($err !== 'SUCCESS') {
$errors[] = $err;
}
$mim... | [
"public",
"static",
"function",
"instance_from_curl",
"(",
"$",
"ch",
",",
"$",
"body",
")",
"{",
"$",
"transfer_info",
"=",
"curl_getinfo",
"(",
"$",
"ch",
")",
";",
"$",
"statuscode",
"=",
"(",
"!",
"empty",
"(",
"$",
"transfer_info",
"[",
"'http_code'... | Create an instance from a curl handle and body.
@param resource $ch An active curl handle.
@param string $body The returned body.
@return HttpClientResponse A response object. | [
"Create",
"an",
"instance",
"from",
"a",
"curl",
"handle",
"and",
"body",
"."
] | 9714796945db4908605be6f19c31ded1ee813c70 | https://github.com/pdyn/httpclient/blob/9714796945db4908605be6f19c31ded1ee813c70/HttpClientResponse.php#L77-L90 |
26,042 | pdyn/httpclient | HttpClientResponse.php | HttpClientResponse.get_debug_string | public function get_debug_string() {
return 'status: '.$this->statuscode.' body:'.htmlentities($this->body).' errors: '.print_r($this->errors, true);
} | php | public function get_debug_string() {
return 'status: '.$this->statuscode.' body:'.htmlentities($this->body).' errors: '.print_r($this->errors, true);
} | [
"public",
"function",
"get_debug_string",
"(",
")",
"{",
"return",
"'status: '",
".",
"$",
"this",
"->",
"statuscode",
".",
"' body:'",
".",
"htmlentities",
"(",
"$",
"this",
"->",
"body",
")",
".",
"' errors: '",
".",
"print_r",
"(",
"$",
"this",
"->",
... | Get a string with some basic information about the request. Usually put into the logs.
@return string A string containing debug information. | [
"Get",
"a",
"string",
"with",
"some",
"basic",
"information",
"about",
"the",
"request",
".",
"Usually",
"put",
"into",
"the",
"logs",
"."
] | 9714796945db4908605be6f19c31ded1ee813c70 | https://github.com/pdyn/httpclient/blob/9714796945db4908605be6f19c31ded1ee813c70/HttpClientResponse.php#L106-L108 |
26,043 | pdyn/httpclient | HttpClientResponse.php | HttpClientResponse.status_type | public function status_type() {
$status_code_type = (!empty($this->statuscode))
? (int)mb_substr($this->statuscode, 0, 1)
: 0;
if ($status_code_type === 1) {
$status_type = 'informational';
} elseif ($status_code_type === 2) {
$status_type = 'success';
} elseif ($status_code_type === 3) {
$statu... | php | public function status_type() {
$status_code_type = (!empty($this->statuscode))
? (int)mb_substr($this->statuscode, 0, 1)
: 0;
if ($status_code_type === 1) {
$status_type = 'informational';
} elseif ($status_code_type === 2) {
$status_type = 'success';
} elseif ($status_code_type === 3) {
$statu... | [
"public",
"function",
"status_type",
"(",
")",
"{",
"$",
"status_code_type",
"=",
"(",
"!",
"empty",
"(",
"$",
"this",
"->",
"statuscode",
")",
")",
"?",
"(",
"int",
")",
"mb_substr",
"(",
"$",
"this",
"->",
"statuscode",
",",
"0",
",",
"1",
")",
"... | Get the status type.
@return string The status type. | [
"Get",
"the",
"status",
"type",
"."
] | 9714796945db4908605be6f19c31ded1ee813c70 | https://github.com/pdyn/httpclient/blob/9714796945db4908605be6f19c31ded1ee813c70/HttpClientResponse.php#L115-L134 |
26,044 | DavidePastore/paris-model-generator | src/DavidePastore/ParisModelGenerator/ParisGeneratorCommand.php | ParisGeneratorCommand.generateCode | private function generateCode($className, $primaryKey){
$tags = $this->config->getTags();
$class = new ClassGenerator();
$docblock = DocBlockGenerator::fromArray(array(
'shortDescription' => ucfirst($className) .' model class',
'longDescription' => 'This is a model class generated with DavidePastore\... | php | private function generateCode($className, $primaryKey){
$tags = $this->config->getTags();
$class = new ClassGenerator();
$docblock = DocBlockGenerator::fromArray(array(
'shortDescription' => ucfirst($className) .' model class',
'longDescription' => 'This is a model class generated with DavidePastore\... | [
"private",
"function",
"generateCode",
"(",
"$",
"className",
",",
"$",
"primaryKey",
")",
"{",
"$",
"tags",
"=",
"$",
"this",
"->",
"config",
"->",
"getTags",
"(",
")",
";",
"$",
"class",
"=",
"new",
"ClassGenerator",
"(",
")",
";",
"$",
"docblock",
... | Generate the code for the given className and primaryKey and write it in a file.
@param string $className The class name.
@param string $primaryKey The primary key. | [
"Generate",
"the",
"code",
"for",
"the",
"given",
"className",
"and",
"primaryKey",
"and",
"write",
"it",
"in",
"a",
"file",
"."
] | cd056dd7a2218b1c56fa17dcc6311e01a2570030 | https://github.com/DavidePastore/paris-model-generator/blob/cd056dd7a2218b1c56fa17dcc6311e01a2570030/src/DavidePastore/ParisModelGenerator/ParisGeneratorCommand.php#L204-L282 |
26,045 | ScaraMVC/Framework | src/Scara/Session/Cookie.php | Cookie.set | public function set($key, $value, $expire = 3600, $path = '/')
{
if ($expire == false) {
setcookie($key, serialize($value), false, $path);
} else {
setcookie($key, serialize($value), time() + $expire, $path);
}
} | php | public function set($key, $value, $expire = 3600, $path = '/')
{
if ($expire == false) {
setcookie($key, serialize($value), false, $path);
} else {
setcookie($key, serialize($value), time() + $expire, $path);
}
} | [
"public",
"function",
"set",
"(",
"$",
"key",
",",
"$",
"value",
",",
"$",
"expire",
"=",
"3600",
",",
"$",
"path",
"=",
"'/'",
")",
"{",
"if",
"(",
"$",
"expire",
"==",
"false",
")",
"{",
"setcookie",
"(",
"$",
"key",
",",
"serialize",
"(",
"$... | Adds to the session.
@param string $key - Key given to session
@param string $value - Value given to session's $key
@param mixed $expire - Sets expiration of cookie
@param stirng $path - The path the cookie should be set to
@return mixed | [
"Adds",
"to",
"the",
"session",
"."
] | 199b08b45fadf5dae14ac4732af03b36e15bbef2 | https://github.com/ScaraMVC/Framework/blob/199b08b45fadf5dae14ac4732af03b36e15bbef2/src/Scara/Session/Cookie.php#L32-L39 |
26,046 | graze/data-node | src/NodeCollection.php | NodeCollection.first | public function first(callable $fn = null, $default = null)
{
if (is_null($fn)) {
return count($this->items) > 0 ? reset($this->items) : $default;
}
foreach ($this->getIterator() as $value) {
if (call_user_func($fn, $value)) {
return $value;
... | php | public function first(callable $fn = null, $default = null)
{
if (is_null($fn)) {
return count($this->items) > 0 ? reset($this->items) : $default;
}
foreach ($this->getIterator() as $value) {
if (call_user_func($fn, $value)) {
return $value;
... | [
"public",
"function",
"first",
"(",
"callable",
"$",
"fn",
"=",
"null",
",",
"$",
"default",
"=",
"null",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"fn",
")",
")",
"{",
"return",
"count",
"(",
"$",
"this",
"->",
"items",
")",
">",
"0",
"?",
"re... | Retrieve the first element that matches the optional callback
@param callable|null $fn
@param mixed|null $default
@return mixed|null | [
"Retrieve",
"the",
"first",
"element",
"that",
"matches",
"the",
"optional",
"callback"
] | e604d8062b1e18046f23c6dc20341b368e88697e | https://github.com/graze/data-node/blob/e604d8062b1e18046f23c6dc20341b368e88697e/src/NodeCollection.php#L92-L105 |
26,047 | graze/data-node | src/NodeCollection.php | NodeCollection.last | public function last(callable $fn = null, $default = null)
{
if (is_null($fn)) {
return count($this->items) > 0 ? end($this->items) : $default;
}
foreach (array_reverse($this->items) as $value) {
if (call_user_func($fn, $value)) {
return $value;
... | php | public function last(callable $fn = null, $default = null)
{
if (is_null($fn)) {
return count($this->items) > 0 ? end($this->items) : $default;
}
foreach (array_reverse($this->items) as $value) {
if (call_user_func($fn, $value)) {
return $value;
... | [
"public",
"function",
"last",
"(",
"callable",
"$",
"fn",
"=",
"null",
",",
"$",
"default",
"=",
"null",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"fn",
")",
")",
"{",
"return",
"count",
"(",
"$",
"this",
"->",
"items",
")",
">",
"0",
"?",
"end... | Receive the last element that matches the optional callback
@param callable|null $fn
@param mixed|null $default
@return mixed|null | [
"Receive",
"the",
"last",
"element",
"that",
"matches",
"the",
"optional",
"callback"
] | e604d8062b1e18046f23c6dc20341b368e88697e | https://github.com/graze/data-node/blob/e604d8062b1e18046f23c6dc20341b368e88697e/src/NodeCollection.php#L115-L128 |
26,048 | tdebatty/php-noorm | src/noorm/Persistent.php | Persistent.One | public static function One($id) {
$class = get_called_class();
if (! isset(self::$refs[$class][$id])) {
$file = self::File($id);
$obj = unserialize(file_get_contents($file));
self::$refs[$class][$id] = $obj;
}
return self::$refs[$class][$id];
} | php | public static function One($id) {
$class = get_called_class();
if (! isset(self::$refs[$class][$id])) {
$file = self::File($id);
$obj = unserialize(file_get_contents($file));
self::$refs[$class][$id] = $obj;
}
return self::$refs[$class][$id];
} | [
"public",
"static",
"function",
"One",
"(",
"$",
"id",
")",
"{",
"$",
"class",
"=",
"get_called_class",
"(",
")",
";",
"if",
"(",
"!",
"isset",
"(",
"self",
"::",
"$",
"refs",
"[",
"$",
"class",
"]",
"[",
"$",
"id",
"]",
")",
")",
"{",
"$",
"... | Fetch one saved object by id
@param int $id
@return Persistent | [
"Fetch",
"one",
"saved",
"object",
"by",
"id"
] | ba33e2f0efaed71693c3013e73315d3c019d7f05 | https://github.com/tdebatty/php-noorm/blob/ba33e2f0efaed71693c3013e73315d3c019d7f05/src/noorm/Persistent.php#L59-L69 |
26,049 | tdebatty/php-noorm | src/noorm/Persistent.php | Persistent.SetDirectory | public static function SetDirectory($dir) {
if (!is_dir($dir)) {
if (!@\mkdir($dir, 0700, TRUE)) {
throw new \InvalidArgumentException("dir $dir does not exist and could not be created");
}
}
self::$DIR = realpath($dir);
} | php | public static function SetDirectory($dir) {
if (!is_dir($dir)) {
if (!@\mkdir($dir, 0700, TRUE)) {
throw new \InvalidArgumentException("dir $dir does not exist and could not be created");
}
}
self::$DIR = realpath($dir);
} | [
"public",
"static",
"function",
"SetDirectory",
"(",
"$",
"dir",
")",
"{",
"if",
"(",
"!",
"is_dir",
"(",
"$",
"dir",
")",
")",
"{",
"if",
"(",
"!",
"@",
"\\",
"mkdir",
"(",
"$",
"dir",
",",
"0700",
",",
"TRUE",
")",
")",
"{",
"throw",
"new",
... | Set directory where all persistent objects and relations will be saved.
@param String $dir
@throws \InvalidArgumentException | [
"Set",
"directory",
"where",
"all",
"persistent",
"objects",
"and",
"relations",
"will",
"be",
"saved",
"."
] | ba33e2f0efaed71693c3013e73315d3c019d7f05 | https://github.com/tdebatty/php-noorm/blob/ba33e2f0efaed71693c3013e73315d3c019d7f05/src/noorm/Persistent.php#L95-L103 |
26,050 | tdebatty/php-noorm | src/noorm/Persistent.php | Persistent.Save | public function Save() {
if (!$this->Validate()) {
throw new \Exception("Validation failed");
}
$file = self::File($this->id);
if (!is_dir(dirname($file))) {
mkdir(dirname($file), 0755, true);
}
file_put_contents($file, serialize($this), LOCK_EX);
return $this;
} | php | public function Save() {
if (!$this->Validate()) {
throw new \Exception("Validation failed");
}
$file = self::File($this->id);
if (!is_dir(dirname($file))) {
mkdir(dirname($file), 0755, true);
}
file_put_contents($file, serialize($this), LOCK_EX);
return $this;
} | [
"public",
"function",
"Save",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"Validate",
"(",
")",
")",
"{",
"throw",
"new",
"\\",
"Exception",
"(",
"\"Validation failed\"",
")",
";",
"}",
"$",
"file",
"=",
"self",
"::",
"File",
"(",
"$",
"this"... | Save this object.
@return boolean true on success | [
"Save",
"this",
"object",
"."
] | ba33e2f0efaed71693c3013e73315d3c019d7f05 | https://github.com/tdebatty/php-noorm/blob/ba33e2f0efaed71693c3013e73315d3c019d7f05/src/noorm/Persistent.php#L187-L199 |
26,051 | t3v/t3v_core | Classes/Utility/ExtensionUtility.php | ExtensionUtility.extensionIdentifier | public static function extensionIdentifier(string $extensionKey): string {
$extensionIdentifier = GeneralUtility::underscoredToUpperCamelCase($extensionKey);
$extensionIdentifier = mb_strtolower($extensionIdentifier);
return $extensionIdentifier;
} | php | public static function extensionIdentifier(string $extensionKey): string {
$extensionIdentifier = GeneralUtility::underscoredToUpperCamelCase($extensionKey);
$extensionIdentifier = mb_strtolower($extensionIdentifier);
return $extensionIdentifier;
} | [
"public",
"static",
"function",
"extensionIdentifier",
"(",
"string",
"$",
"extensionKey",
")",
":",
"string",
"{",
"$",
"extensionIdentifier",
"=",
"GeneralUtility",
"::",
"underscoredToUpperCamelCase",
"(",
"$",
"extensionKey",
")",
";",
"$",
"extensionIdentifier",
... | Gets an extension identifier from an extension key.
@param string $extensionKey The extension key
@return string The extension identifier | [
"Gets",
"an",
"extension",
"identifier",
"from",
"an",
"extension",
"key",
"."
] | 8c04b7688cc2773f11fcc87fda3f7cd53d80a980 | https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Utility/ExtensionUtility.php#L18-L23 |
26,052 | t3v/t3v_core | Classes/Utility/ExtensionUtility.php | ExtensionUtility.extensionSignature | public static function extensionSignature(string $namespace, string $extensionKey, string $separator = '.'): string {
$namespace = GeneralUtility::underscoredToUpperCamelCase($namespace);
$extensionKey = GeneralUtility::underscoredToUpperCamelCase($extensionKey);
return "${namespace}${separator}${extens... | php | public static function extensionSignature(string $namespace, string $extensionKey, string $separator = '.'): string {
$namespace = GeneralUtility::underscoredToUpperCamelCase($namespace);
$extensionKey = GeneralUtility::underscoredToUpperCamelCase($extensionKey);
return "${namespace}${separator}${extens... | [
"public",
"static",
"function",
"extensionSignature",
"(",
"string",
"$",
"namespace",
",",
"string",
"$",
"extensionKey",
",",
"string",
"$",
"separator",
"=",
"'.'",
")",
":",
"string",
"{",
"$",
"namespace",
"=",
"GeneralUtility",
"::",
"underscoredToUpperCam... | Gets an extension signature from a namespace and extension key.
@param string $namespace The namespace
@param string $extensionKey The extension key
@param string $separator The optional separator, defaults to `.`
@return string The extension signature | [
"Gets",
"an",
"extension",
"signature",
"from",
"a",
"namespace",
"and",
"extension",
"key",
"."
] | 8c04b7688cc2773f11fcc87fda3f7cd53d80a980 | https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Utility/ExtensionUtility.php#L43-L48 |
26,053 | t3v/t3v_core | Classes/Utility/ExtensionUtility.php | ExtensionUtility.getExtensionSignature | public static function getExtensionSignature(string $namespace, string $extensionKey, string $separator = '.'): string {
return self::extensionSignature($namespace, $extensionKey, $separator);
} | php | public static function getExtensionSignature(string $namespace, string $extensionKey, string $separator = '.'): string {
return self::extensionSignature($namespace, $extensionKey, $separator);
} | [
"public",
"static",
"function",
"getExtensionSignature",
"(",
"string",
"$",
"namespace",
",",
"string",
"$",
"extensionKey",
",",
"string",
"$",
"separator",
"=",
"'.'",
")",
":",
"string",
"{",
"return",
"self",
"::",
"extensionSignature",
"(",
"$",
"namespa... | Alias for the `extensionSignature` function.
@param string $namespace The namespace
@param string $extensionKey The extension key
@param string $separator The optional separator, defaults to `.`
@return string The extension signature | [
"Alias",
"for",
"the",
"extensionSignature",
"function",
"."
] | 8c04b7688cc2773f11fcc87fda3f7cd53d80a980 | https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Utility/ExtensionUtility.php#L58-L60 |
26,054 | t3v/t3v_core | Classes/Utility/ExtensionUtility.php | ExtensionUtility.locallang | public static function locallang(string $extensionKey, string $fileName = 'locallang.xlf', string $prefix = 'LLL:EXT:', string $separator = ':'): string {
$languageFolder = self::languageFolder($extensionKey, $prefix);
return "${languageFolder}/${fileName}${separator}";
} | php | public static function locallang(string $extensionKey, string $fileName = 'locallang.xlf', string $prefix = 'LLL:EXT:', string $separator = ':'): string {
$languageFolder = self::languageFolder($extensionKey, $prefix);
return "${languageFolder}/${fileName}${separator}";
} | [
"public",
"static",
"function",
"locallang",
"(",
"string",
"$",
"extensionKey",
",",
"string",
"$",
"fileName",
"=",
"'locallang.xlf'",
",",
"string",
"$",
"prefix",
"=",
"'LLL:EXT:'",
",",
"string",
"$",
"separator",
"=",
"':'",
")",
":",
"string",
"{",
... | Gets the locallang file from an extension key.
@param string $extensionKey The extension key
@param string $prefix The optional file name of the locallang file, defaults to `locallang.xlf`
@param string $prefix The optional prefix, defaults to `LLL:EXT:`
@param string $separator The optional separator, defaults to `:`... | [
"Gets",
"the",
"locallang",
"file",
"from",
"an",
"extension",
"key",
"."
] | 8c04b7688cc2773f11fcc87fda3f7cd53d80a980 | https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Utility/ExtensionUtility.php#L71-L75 |
26,055 | t3v/t3v_core | Classes/Utility/ExtensionUtility.php | ExtensionUtility.getConfigurationFolder | public static function getConfigurationFolder(string $extensionKey, string $prefix = 'FILE:EXT:'): string {
return self::configurationFolder($extensionKey, $prefix);
} | php | public static function getConfigurationFolder(string $extensionKey, string $prefix = 'FILE:EXT:'): string {
return self::configurationFolder($extensionKey, $prefix);
} | [
"public",
"static",
"function",
"getConfigurationFolder",
"(",
"string",
"$",
"extensionKey",
",",
"string",
"$",
"prefix",
"=",
"'FILE:EXT:'",
")",
":",
"string",
"{",
"return",
"self",
"::",
"configurationFolder",
"(",
"$",
"extensionKey",
",",
"$",
"prefix",
... | Alias for the `configurationFolder` function.
@param string $extensionKey The extension key
@param string $prefix The optional prefix, defaults to `FILE:EXT:`
@return string The configuration folder | [
"Alias",
"for",
"the",
"configurationFolder",
"function",
"."
] | 8c04b7688cc2773f11fcc87fda3f7cd53d80a980 | https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Utility/ExtensionUtility.php#L121-L123 |
26,056 | t3v/t3v_core | Classes/Utility/ExtensionUtility.php | ExtensionUtility.flexFormsFolder | public static function flexFormsFolder(string $extensionKey, string $prefix = 'FILE:EXT:'): string {
$configurationFolder = self::configurationFolder($extensionKey, $prefix);
return "${configurationFolder}/FlexForms";
} | php | public static function flexFormsFolder(string $extensionKey, string $prefix = 'FILE:EXT:'): string {
$configurationFolder = self::configurationFolder($extensionKey, $prefix);
return "${configurationFolder}/FlexForms";
} | [
"public",
"static",
"function",
"flexFormsFolder",
"(",
"string",
"$",
"extensionKey",
",",
"string",
"$",
"prefix",
"=",
"'FILE:EXT:'",
")",
":",
"string",
"{",
"$",
"configurationFolder",
"=",
"self",
"::",
"configurationFolder",
"(",
"$",
"extensionKey",
",",... | Gets the FlexForms folder from an extension key.
@param string $extensionKey The extension key
@param string $prefix The optional prefix, defaults to `FILE:EXT:`
@return string The FlexForms folder | [
"Gets",
"the",
"FlexForms",
"folder",
"from",
"an",
"extension",
"key",
"."
] | 8c04b7688cc2773f11fcc87fda3f7cd53d80a980 | https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Utility/ExtensionUtility.php#L132-L136 |
26,057 | t3v/t3v_core | Classes/Utility/ExtensionUtility.php | ExtensionUtility.getFlexFormsFolder | public static function getFlexFormsFolder(string $extensionKey, string $prefix = 'FILE:EXT:'): string {
return self::flexFormsFolder($extensionKey, $prefix);
} | php | public static function getFlexFormsFolder(string $extensionKey, string $prefix = 'FILE:EXT:'): string {
return self::flexFormsFolder($extensionKey, $prefix);
} | [
"public",
"static",
"function",
"getFlexFormsFolder",
"(",
"string",
"$",
"extensionKey",
",",
"string",
"$",
"prefix",
"=",
"'FILE:EXT:'",
")",
":",
"string",
"{",
"return",
"self",
"::",
"flexFormsFolder",
"(",
"$",
"extensionKey",
",",
"$",
"prefix",
")",
... | Alias for the `flexFormsFolder` function.
@param string $extensionKey The extension key
@param string $prefix The optional prefix, defaults to `FILE:EXT:`
@return string The FlexForms folder | [
"Alias",
"for",
"the",
"flexFormsFolder",
"function",
"."
] | 8c04b7688cc2773f11fcc87fda3f7cd53d80a980 | https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Utility/ExtensionUtility.php#L145-L147 |
26,058 | t3v/t3v_core | Classes/Utility/ExtensionUtility.php | ExtensionUtility.getResourcesFolder | public static function getResourcesFolder(string $extensionKey, string $prefix = 'EXT:'): string {
return self::resourcesFolder($extensionKey, $prefix);
} | php | public static function getResourcesFolder(string $extensionKey, string $prefix = 'EXT:'): string {
return self::resourcesFolder($extensionKey, $prefix);
} | [
"public",
"static",
"function",
"getResourcesFolder",
"(",
"string",
"$",
"extensionKey",
",",
"string",
"$",
"prefix",
"=",
"'EXT:'",
")",
":",
"string",
"{",
"return",
"self",
"::",
"resourcesFolder",
"(",
"$",
"extensionKey",
",",
"$",
"prefix",
")",
";",... | Alias for the `resourcesFolder` function.
@param string $extensionKey The extension key
@param string $prefix The optional prefix, defaults to `EXT:`
@return string The resources folder | [
"Alias",
"for",
"the",
"resourcesFolder",
"function",
"."
] | 8c04b7688cc2773f11fcc87fda3f7cd53d80a980 | https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Utility/ExtensionUtility.php#L167-L169 |
26,059 | t3v/t3v_core | Classes/Utility/ExtensionUtility.php | ExtensionUtility.privateFolder | public static function privateFolder(string $extensionKey, string $prefix = 'EXT:'): string {
$resourcesFolder = self::resourcesFolder($extensionKey, $prefix);
return "${resourcesFolder}/Private";
} | php | public static function privateFolder(string $extensionKey, string $prefix = 'EXT:'): string {
$resourcesFolder = self::resourcesFolder($extensionKey, $prefix);
return "${resourcesFolder}/Private";
} | [
"public",
"static",
"function",
"privateFolder",
"(",
"string",
"$",
"extensionKey",
",",
"string",
"$",
"prefix",
"=",
"'EXT:'",
")",
":",
"string",
"{",
"$",
"resourcesFolder",
"=",
"self",
"::",
"resourcesFolder",
"(",
"$",
"extensionKey",
",",
"$",
"pref... | Gets the private folder from an extension key.
@param string $extensionKey The extension key
@param string $prefix The optional prefix, defaults to `EXT:`
@return string The private folder | [
"Gets",
"the",
"private",
"folder",
"from",
"an",
"extension",
"key",
"."
] | 8c04b7688cc2773f11fcc87fda3f7cd53d80a980 | https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Utility/ExtensionUtility.php#L178-L182 |
26,060 | t3v/t3v_core | Classes/Utility/ExtensionUtility.php | ExtensionUtility.getPrivateFolder | public static function getPrivateFolder(string $extensionKey, string $prefix = 'EXT:'): string {
return self::privateFolder($extensionKey, $prefix);
} | php | public static function getPrivateFolder(string $extensionKey, string $prefix = 'EXT:'): string {
return self::privateFolder($extensionKey, $prefix);
} | [
"public",
"static",
"function",
"getPrivateFolder",
"(",
"string",
"$",
"extensionKey",
",",
"string",
"$",
"prefix",
"=",
"'EXT:'",
")",
":",
"string",
"{",
"return",
"self",
"::",
"privateFolder",
"(",
"$",
"extensionKey",
",",
"$",
"prefix",
")",
";",
"... | Alias for the `privateFolder` function.
@param string $extensionKey The extension key
@param string $prefix The optional prefix, defaults to `EXT:`
@return string The private folder | [
"Alias",
"for",
"the",
"privateFolder",
"function",
"."
] | 8c04b7688cc2773f11fcc87fda3f7cd53d80a980 | https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Utility/ExtensionUtility.php#L191-L193 |
26,061 | t3v/t3v_core | Classes/Utility/ExtensionUtility.php | ExtensionUtility.languageFolder | public static function languageFolder(string $extensionKey, string $prefix = 'EXT:'): string {
$privateFolder = self::privateFolder($extensionKey, $prefix);
return "${privateFolder}/Language";
} | php | public static function languageFolder(string $extensionKey, string $prefix = 'EXT:'): string {
$privateFolder = self::privateFolder($extensionKey, $prefix);
return "${privateFolder}/Language";
} | [
"public",
"static",
"function",
"languageFolder",
"(",
"string",
"$",
"extensionKey",
",",
"string",
"$",
"prefix",
"=",
"'EXT:'",
")",
":",
"string",
"{",
"$",
"privateFolder",
"=",
"self",
"::",
"privateFolder",
"(",
"$",
"extensionKey",
",",
"$",
"prefix"... | Gets the language folder from an extension key.
@param string $extensionKey The extension key
@param string $prefix The optional prefix, defaults to `EXT:`
@return string The language folder | [
"Gets",
"the",
"language",
"folder",
"from",
"an",
"extension",
"key",
"."
] | 8c04b7688cc2773f11fcc87fda3f7cd53d80a980 | https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Utility/ExtensionUtility.php#L202-L206 |
26,062 | t3v/t3v_core | Classes/Utility/ExtensionUtility.php | ExtensionUtility.getLanguageFolder | public static function getLanguageFolder(string $extensionKey, string $prefix = 'EXT:'): string {
return self::languageFolder($extensionKey, $prefix);
} | php | public static function getLanguageFolder(string $extensionKey, string $prefix = 'EXT:'): string {
return self::languageFolder($extensionKey, $prefix);
} | [
"public",
"static",
"function",
"getLanguageFolder",
"(",
"string",
"$",
"extensionKey",
",",
"string",
"$",
"prefix",
"=",
"'EXT:'",
")",
":",
"string",
"{",
"return",
"self",
"::",
"languageFolder",
"(",
"$",
"extensionKey",
",",
"$",
"prefix",
")",
";",
... | Alias for the `languageFolder` function.
@param string $extensionKey The extension key
@param string $prefix The optional prefix, defaults to `EXT:`
@return string The language folder | [
"Alias",
"for",
"the",
"languageFolder",
"function",
"."
] | 8c04b7688cc2773f11fcc87fda3f7cd53d80a980 | https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Utility/ExtensionUtility.php#L215-L217 |
26,063 | t3v/t3v_core | Classes/Utility/ExtensionUtility.php | ExtensionUtility.locallangFolder | public static function locallangFolder(string $extensionKey, string $prefix = 'LLL:EXT:'): string {
return self::languageFolder($extensionKey, $prefix);
} | php | public static function locallangFolder(string $extensionKey, string $prefix = 'LLL:EXT:'): string {
return self::languageFolder($extensionKey, $prefix);
} | [
"public",
"static",
"function",
"locallangFolder",
"(",
"string",
"$",
"extensionKey",
",",
"string",
"$",
"prefix",
"=",
"'LLL:EXT:'",
")",
":",
"string",
"{",
"return",
"self",
"::",
"languageFolder",
"(",
"$",
"extensionKey",
",",
"$",
"prefix",
")",
";",... | Gets the locallang folder from an extension key.
Alias for the `languageFolder` function with `LLL:EXT:` as prefix.
@param string $extensionKey The extension key
@param string $prefix The optional prefix, defaults to `LLL:EXT:`
@return string The locallang folder | [
"Gets",
"the",
"locallang",
"folder",
"from",
"an",
"extension",
"key",
"."
] | 8c04b7688cc2773f11fcc87fda3f7cd53d80a980 | https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Utility/ExtensionUtility.php#L228-L230 |
26,064 | t3v/t3v_core | Classes/Utility/ExtensionUtility.php | ExtensionUtility.publicFolder | public static function publicFolder(string $extensionKey, string $prefix = 'EXT:'): string {
$resourcesFolder = self::resourcesFolder($extensionKey, $prefix);
return "${resourcesFolder}/Public";
} | php | public static function publicFolder(string $extensionKey, string $prefix = 'EXT:'): string {
$resourcesFolder = self::resourcesFolder($extensionKey, $prefix);
return "${resourcesFolder}/Public";
} | [
"public",
"static",
"function",
"publicFolder",
"(",
"string",
"$",
"extensionKey",
",",
"string",
"$",
"prefix",
"=",
"'EXT:'",
")",
":",
"string",
"{",
"$",
"resourcesFolder",
"=",
"self",
"::",
"resourcesFolder",
"(",
"$",
"extensionKey",
",",
"$",
"prefi... | Gets the public folder from an extension key.
@param string $extensionKey The extension key
@param string $prefix The optional prefix, defaults to `EXT:`
@return string The public folder | [
"Gets",
"the",
"public",
"folder",
"from",
"an",
"extension",
"key",
"."
] | 8c04b7688cc2773f11fcc87fda3f7cd53d80a980 | https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Utility/ExtensionUtility.php#L261-L265 |
26,065 | t3v/t3v_core | Classes/Utility/ExtensionUtility.php | ExtensionUtility.getPublicFolder | public static function getPublicFolder(string $extensionKey, string $prefix = 'EXT:'): string {
return self::publicFolder($extensionKey, $prefix);
} | php | public static function getPublicFolder(string $extensionKey, string $prefix = 'EXT:'): string {
return self::publicFolder($extensionKey, $prefix);
} | [
"public",
"static",
"function",
"getPublicFolder",
"(",
"string",
"$",
"extensionKey",
",",
"string",
"$",
"prefix",
"=",
"'EXT:'",
")",
":",
"string",
"{",
"return",
"self",
"::",
"publicFolder",
"(",
"$",
"extensionKey",
",",
"$",
"prefix",
")",
";",
"}"... | Alias for the `publicFolder` function.
@param string $extensionKey The extension key
@param string $prefix The optional prefix, defaults to `EXT:`
@return string The public folder | [
"Alias",
"for",
"the",
"publicFolder",
"function",
"."
] | 8c04b7688cc2773f11fcc87fda3f7cd53d80a980 | https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Utility/ExtensionUtility.php#L274-L276 |
26,066 | t3v/t3v_core | Classes/Utility/ExtensionUtility.php | ExtensionUtility.assetsFolder | public static function assetsFolder(string $extensionKey, string $prefix = 'EXT:'): string {
$publicFolder = self::publicFolder($extensionKey, $prefix);
return "${publicFolder}/Assets";
} | php | public static function assetsFolder(string $extensionKey, string $prefix = 'EXT:'): string {
$publicFolder = self::publicFolder($extensionKey, $prefix);
return "${publicFolder}/Assets";
} | [
"public",
"static",
"function",
"assetsFolder",
"(",
"string",
"$",
"extensionKey",
",",
"string",
"$",
"prefix",
"=",
"'EXT:'",
")",
":",
"string",
"{",
"$",
"publicFolder",
"=",
"self",
"::",
"publicFolder",
"(",
"$",
"extensionKey",
",",
"$",
"prefix",
... | Gets the assets folder from an extension key.
@param string $extensionKey The extension key
@param string $prefix The optional prefix, defaults to `EXT:`
@return string The assets folder | [
"Gets",
"the",
"assets",
"folder",
"from",
"an",
"extension",
"key",
"."
] | 8c04b7688cc2773f11fcc87fda3f7cd53d80a980 | https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Utility/ExtensionUtility.php#L285-L289 |
26,067 | t3v/t3v_core | Classes/Utility/ExtensionUtility.php | ExtensionUtility.getAssetsFolder | public static function getAssetsFolder(string $extensionKey, string $prefix = 'EXT:'): string {
return self::assetsFolder($extensionKey, $prefix);
} | php | public static function getAssetsFolder(string $extensionKey, string $prefix = 'EXT:'): string {
return self::assetsFolder($extensionKey, $prefix);
} | [
"public",
"static",
"function",
"getAssetsFolder",
"(",
"string",
"$",
"extensionKey",
",",
"string",
"$",
"prefix",
"=",
"'EXT:'",
")",
":",
"string",
"{",
"return",
"self",
"::",
"assetsFolder",
"(",
"$",
"extensionKey",
",",
"$",
"prefix",
")",
";",
"}"... | Alias for the `assetsFolder` function.
@param string $extensionKey The extension key
@param string $prefix The optional prefix, defaults to `EXT:`
@return string The assets folder | [
"Alias",
"for",
"the",
"assetsFolder",
"function",
"."
] | 8c04b7688cc2773f11fcc87fda3f7cd53d80a980 | https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Utility/ExtensionUtility.php#L298-L300 |
26,068 | t3v/t3v_core | Classes/Utility/ExtensionUtility.php | ExtensionUtility.iconsFolder | public static function iconsFolder(string $extensionKey, string $prefix = 'EXT:'): string {
$publicFolder = self::publicFolder($extensionKey, $prefix);
return "${publicFolder}/Icons";
} | php | public static function iconsFolder(string $extensionKey, string $prefix = 'EXT:'): string {
$publicFolder = self::publicFolder($extensionKey, $prefix);
return "${publicFolder}/Icons";
} | [
"public",
"static",
"function",
"iconsFolder",
"(",
"string",
"$",
"extensionKey",
",",
"string",
"$",
"prefix",
"=",
"'EXT:'",
")",
":",
"string",
"{",
"$",
"publicFolder",
"=",
"self",
"::",
"publicFolder",
"(",
"$",
"extensionKey",
",",
"$",
"prefix",
"... | Gets the icons folder from an extension key.
@param string $extensionKey The extension key
@param string $prefix The optional prefix, defaults to `EXT:`
@return string The icons folder | [
"Gets",
"the",
"icons",
"folder",
"from",
"an",
"extension",
"key",
"."
] | 8c04b7688cc2773f11fcc87fda3f7cd53d80a980 | https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Utility/ExtensionUtility.php#L309-L313 |
26,069 | t3v/t3v_core | Classes/Utility/ExtensionUtility.php | ExtensionUtility.getIconsFolder | public static function getIconsFolder(string $extensionKey, string $prefix = 'EXT:'): string {
return self::iconsFolder($extensionKey, $prefix);
} | php | public static function getIconsFolder(string $extensionKey, string $prefix = 'EXT:'): string {
return self::iconsFolder($extensionKey, $prefix);
} | [
"public",
"static",
"function",
"getIconsFolder",
"(",
"string",
"$",
"extensionKey",
",",
"string",
"$",
"prefix",
"=",
"'EXT:'",
")",
":",
"string",
"{",
"return",
"self",
"::",
"iconsFolder",
"(",
"$",
"extensionKey",
",",
"$",
"prefix",
")",
";",
"}"
] | Alias for the `iconsFolder` function.
@param string $extensionKey The extension key
@param string $prefix The optional prefix, defaults to `EXT:`
@return string The icons folder | [
"Alias",
"for",
"the",
"iconsFolder",
"function",
"."
] | 8c04b7688cc2773f11fcc87fda3f7cd53d80a980 | https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Utility/ExtensionUtility.php#L322-L324 |
26,070 | t3v/t3v_core | Classes/Utility/ExtensionUtility.php | ExtensionUtility.placeholdersFolder | public static function placeholdersFolder(string $extensionKey, string $prefix = 'EXT:'): string {
$publicFolder = self::publicFolder($extensionKey, $prefix);
return "${publicFolder}/Placeholders";
} | php | public static function placeholdersFolder(string $extensionKey, string $prefix = 'EXT:'): string {
$publicFolder = self::publicFolder($extensionKey, $prefix);
return "${publicFolder}/Placeholders";
} | [
"public",
"static",
"function",
"placeholdersFolder",
"(",
"string",
"$",
"extensionKey",
",",
"string",
"$",
"prefix",
"=",
"'EXT:'",
")",
":",
"string",
"{",
"$",
"publicFolder",
"=",
"self",
"::",
"publicFolder",
"(",
"$",
"extensionKey",
",",
"$",
"prefi... | Gets the placeholders folder from an extension key.
@param string $extensionKey The extension key
@param string $prefix The optional prefix, defaults to `EXT:`
@return string The placeholders folder | [
"Gets",
"the",
"placeholders",
"folder",
"from",
"an",
"extension",
"key",
"."
] | 8c04b7688cc2773f11fcc87fda3f7cd53d80a980 | https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Utility/ExtensionUtility.php#L333-L337 |
26,071 | t3v/t3v_core | Classes/Utility/ExtensionUtility.php | ExtensionUtility.getPlaceholdersFolder | public static function getPlaceholdersFolder(string $extensionKey, string $prefix = 'EXT:'): string {
return self::placeholdersFolder($extensionKey, $prefix);
} | php | public static function getPlaceholdersFolder(string $extensionKey, string $prefix = 'EXT:'): string {
return self::placeholdersFolder($extensionKey, $prefix);
} | [
"public",
"static",
"function",
"getPlaceholdersFolder",
"(",
"string",
"$",
"extensionKey",
",",
"string",
"$",
"prefix",
"=",
"'EXT:'",
")",
":",
"string",
"{",
"return",
"self",
"::",
"placeholdersFolder",
"(",
"$",
"extensionKey",
",",
"$",
"prefix",
")",
... | Alias for the `placeholdersFolder` function.
@param string $extensionKey The extension key
@param string $prefix The optional prefix, defaults to `EXT:`
@return string The placeholders folder | [
"Alias",
"for",
"the",
"placeholdersFolder",
"function",
"."
] | 8c04b7688cc2773f11fcc87fda3f7cd53d80a980 | https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Utility/ExtensionUtility.php#L346-L348 |
26,072 | t3v/t3v_core | Classes/Utility/ExtensionUtility.php | ExtensionUtility.samplesFolder | public static function samplesFolder(string $extensionKey, string $prefix = 'EXT:'): string {
$publicFolder = self::publicFolder($extensionKey, $prefix);
return "${publicFolder}/Samples";
} | php | public static function samplesFolder(string $extensionKey, string $prefix = 'EXT:'): string {
$publicFolder = self::publicFolder($extensionKey, $prefix);
return "${publicFolder}/Samples";
} | [
"public",
"static",
"function",
"samplesFolder",
"(",
"string",
"$",
"extensionKey",
",",
"string",
"$",
"prefix",
"=",
"'EXT:'",
")",
":",
"string",
"{",
"$",
"publicFolder",
"=",
"self",
"::",
"publicFolder",
"(",
"$",
"extensionKey",
",",
"$",
"prefix",
... | Gets the samples folder from an extension key.
@param string $extensionKey The extension key
@param string $prefix The optional prefix, defaults to `EXT:`
@return string The samples folder | [
"Gets",
"the",
"samples",
"folder",
"from",
"an",
"extension",
"key",
"."
] | 8c04b7688cc2773f11fcc87fda3f7cd53d80a980 | https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Utility/ExtensionUtility.php#L357-L361 |
26,073 | t3v/t3v_core | Classes/Utility/ExtensionUtility.php | ExtensionUtility.getSamplesFolder | public static function getSamplesFolder(string $extensionKey, string $prefix = 'EXT:'): string {
return self::samplesFolder($extensionKey, $prefix);
} | php | public static function getSamplesFolder(string $extensionKey, string $prefix = 'EXT:'): string {
return self::samplesFolder($extensionKey, $prefix);
} | [
"public",
"static",
"function",
"getSamplesFolder",
"(",
"string",
"$",
"extensionKey",
",",
"string",
"$",
"prefix",
"=",
"'EXT:'",
")",
":",
"string",
"{",
"return",
"self",
"::",
"samplesFolder",
"(",
"$",
"extensionKey",
",",
"$",
"prefix",
")",
";",
"... | Alias for the `samplesFolder` function.
@param string $extensionKey The extension key
@param string $prefix The optional prefix, defaults to `EXT:`
@return string The samples folder | [
"Alias",
"for",
"the",
"samplesFolder",
"function",
"."
] | 8c04b7688cc2773f11fcc87fda3f7cd53d80a980 | https://github.com/t3v/t3v_core/blob/8c04b7688cc2773f11fcc87fda3f7cd53d80a980/Classes/Utility/ExtensionUtility.php#L370-L372 |
26,074 | ciims/ciims-modules-dashboard | components/CiiDashboardController.php | CiiDashboardController.getAsset | public function getAsset($dist=false)
{
return Yii::app()->assetManager->publish(YiiBase::getPathOfAlias('application.modules.dashboard.assets'), true, -1, YII_DEBUG);
} | php | public function getAsset($dist=false)
{
return Yii::app()->assetManager->publish(YiiBase::getPathOfAlias('application.modules.dashboard.assets'), true, -1, YII_DEBUG);
} | [
"public",
"function",
"getAsset",
"(",
"$",
"dist",
"=",
"false",
")",
"{",
"return",
"Yii",
"::",
"app",
"(",
")",
"->",
"assetManager",
"->",
"publish",
"(",
"YiiBase",
"::",
"getPathOfAlias",
"(",
"'application.modules.dashboard.assets'",
")",
",",
"true",
... | Retrieve assetManager from anywhere without having to instatiate this code
@return CAssetManager | [
"Retrieve",
"assetManager",
"from",
"anywhere",
"without",
"having",
"to",
"instatiate",
"this",
"code"
] | 94b89239e9ee34ac3b9c398e8d1ba67a08c68c11 | https://github.com/ciims/ciims-modules-dashboard/blob/94b89239e9ee34ac3b9c398e8d1ba67a08c68c11/components/CiiDashboardController.php#L12-L15 |
26,075 | ciims/ciims-modules-dashboard | components/CiiDashboardController.php | CiiDashboardController.beforeAction | public function beforeAction($action)
{
// Redirect to SSL if this is set in the dashboard
if (!Yii::app()->getRequest()->isSecureConnection && Cii::getConfig('forceSecureSSL', false))
$this->redirect('https://' . Yii::app()->getRequest()->serverName . Yii::app()->getRequest()->requestUri);
Yi... | php | public function beforeAction($action)
{
// Redirect to SSL if this is set in the dashboard
if (!Yii::app()->getRequest()->isSecureConnection && Cii::getConfig('forceSecureSSL', false))
$this->redirect('https://' . Yii::app()->getRequest()->serverName . Yii::app()->getRequest()->requestUri);
Yi... | [
"public",
"function",
"beforeAction",
"(",
"$",
"action",
")",
"{",
"// Redirect to SSL if this is set in the dashboard",
"if",
"(",
"!",
"Yii",
"::",
"app",
"(",
")",
"->",
"getRequest",
"(",
")",
"->",
"isSecureConnection",
"&&",
"Cii",
"::",
"getConfig",
"(",... | Before action method
@param CAction $action The aciton
@return boolean | [
"Before",
"action",
"method"
] | 94b89239e9ee34ac3b9c398e8d1ba67a08c68c11 | https://github.com/ciims/ciims-modules-dashboard/blob/94b89239e9ee34ac3b9c398e8d1ba67a08c68c11/components/CiiDashboardController.php#L22-L30 |
26,076 | pluf/discount | src/Discount/Engine/SpecialPercent.php | Discount_Engine_SpecialPercent.getPrice | public function getPrice($price, $discount, $request)
{
if(!$this->isValid($discount, $request))
throw new Discount_Exception_InvalidDiscount();
$newPrice = $price - ($price * $discount->off_value / 100);
return $newPrice;
} | php | public function getPrice($price, $discount, $request)
{
if(!$this->isValid($discount, $request))
throw new Discount_Exception_InvalidDiscount();
$newPrice = $price - ($price * $discount->off_value / 100);
return $newPrice;
} | [
"public",
"function",
"getPrice",
"(",
"$",
"price",
",",
"$",
"discount",
",",
"$",
"request",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"isValid",
"(",
"$",
"discount",
",",
"$",
"request",
")",
")",
"throw",
"new",
"Discount_Exception_InvalidDiscou... | Compute new price after use given discount.
@param int $price
@param Discount_Discount $discount
@param Pluf_HTTP_Request $request | [
"Compute",
"new",
"price",
"after",
"use",
"given",
"discount",
"."
] | b0006d6b25dd61241f51b5b098d7d546b470de26 | https://github.com/pluf/discount/blob/b0006d6b25dd61241f51b5b098d7d546b470de26/src/Discount/Engine/SpecialPercent.php#L13-L19 |
26,077 | SysControllers/Admin | src/app/Http/Controllers/Admin/FormularioContactoController.php | FormularioContactoController.index | public function index(Request $request)
{
$mensajes = $this->contactoMensajeRepo->findMessageAndPaginate($request);
return view('admin.formularios.contacto.list', compact('mensajes'));
} | php | public function index(Request $request)
{
$mensajes = $this->contactoMensajeRepo->findMessageAndPaginate($request);
return view('admin.formularios.contacto.list', compact('mensajes'));
} | [
"public",
"function",
"index",
"(",
"Request",
"$",
"request",
")",
"{",
"$",
"mensajes",
"=",
"$",
"this",
"->",
"contactoMensajeRepo",
"->",
"findMessageAndPaginate",
"(",
"$",
"request",
")",
";",
"return",
"view",
"(",
"'admin.formularios.contacto.list'",
",... | Show the form for editing the specified adminconfig.
@param Request $request
@return Response
@internal param int $id | [
"Show",
"the",
"form",
"for",
"editing",
"the",
"specified",
"adminconfig",
"."
] | 8f1df46aca422b87f2f522fbba610dcfa0c5f7f3 | https://github.com/SysControllers/Admin/blob/8f1df46aca422b87f2f522fbba610dcfa0c5f7f3/src/app/Http/Controllers/Admin/FormularioContactoController.php#L26-L31 |
26,078 | itkg/core | src/Itkg/Core/KernelAbstract.php | KernelAbstract.loadConfig | protected function loadConfig()
{
$this->container['app']->getConfig()->load($this->getConfigFiles());
$this->dispatchEvent(KernelEvents::CONFIG_LOADED, new KernelEvent($this->container));
} | php | protected function loadConfig()
{
$this->container['app']->getConfig()->load($this->getConfigFiles());
$this->dispatchEvent(KernelEvents::CONFIG_LOADED, new KernelEvent($this->container));
} | [
"protected",
"function",
"loadConfig",
"(",
")",
"{",
"$",
"this",
"->",
"container",
"[",
"'app'",
"]",
"->",
"getConfig",
"(",
")",
"->",
"load",
"(",
"$",
"this",
"->",
"getConfigFiles",
"(",
")",
")",
";",
"$",
"this",
"->",
"dispatchEvent",
"(",
... | Load Config from config files
@return $this | [
"Load",
"Config",
"from",
"config",
"files"
] | e5e4efb05feb4d23b0df41f2b21fd095103e593b | https://github.com/itkg/core/blob/e5e4efb05feb4d23b0df41f2b21fd095103e593b/src/Itkg/Core/KernelAbstract.php#L75-L80 |
26,079 | rollerworks/search-doctrine-orm | DoctrineOrmFactory.php | DoctrineOrmFactory.createConditionGenerator | public function createConditionGenerator($query, SearchCondition $searchCondition)
{
if ($query instanceof NativeQuery) {
return new NativeQueryConditionGenerator($query, $searchCondition);
}
if ($query instanceof Query || $query instanceof QueryBuilder) {
return new... | php | public function createConditionGenerator($query, SearchCondition $searchCondition)
{
if ($query instanceof NativeQuery) {
return new NativeQueryConditionGenerator($query, $searchCondition);
}
if ($query instanceof Query || $query instanceof QueryBuilder) {
return new... | [
"public",
"function",
"createConditionGenerator",
"(",
"$",
"query",
",",
"SearchCondition",
"$",
"searchCondition",
")",
"{",
"if",
"(",
"$",
"query",
"instanceof",
"NativeQuery",
")",
"{",
"return",
"new",
"NativeQueryConditionGenerator",
"(",
"$",
"query",
",",... | Creates a new ConditionGenerator for the SearchCondition.
Conversions are applied using the 'doctrine_dbal_conversion' option (when present).
@param NativeQuery|Query|QueryBuilder $query Doctrine ORM (Native)Query object
@param SearchCondition $searchCondition SearchCondition object
@return ... | [
"Creates",
"a",
"new",
"ConditionGenerator",
"for",
"the",
"SearchCondition",
"."
] | d4d7e9cfc6591d34e9d00f084c35f109f971ac4f | https://github.com/rollerworks/search-doctrine-orm/blob/d4d7e9cfc6591d34e9d00f084c35f109f971ac4f/DoctrineOrmFactory.php#L52-L65 |
26,080 | rollerworks/search-doctrine-orm | DoctrineOrmFactory.php | DoctrineOrmFactory.createCachedConditionGenerator | public function createCachedConditionGenerator($conditionGenerator, $ttl = null): ConditionGenerator
{
if (null === $this->cacheDriver) {
return $conditionGenerator;
}
if ($conditionGenerator instanceof DqlConditionGenerator) {
return new CachedDqlConditionGenerator(... | php | public function createCachedConditionGenerator($conditionGenerator, $ttl = null): ConditionGenerator
{
if (null === $this->cacheDriver) {
return $conditionGenerator;
}
if ($conditionGenerator instanceof DqlConditionGenerator) {
return new CachedDqlConditionGenerator(... | [
"public",
"function",
"createCachedConditionGenerator",
"(",
"$",
"conditionGenerator",
",",
"$",
"ttl",
"=",
"null",
")",
":",
"ConditionGenerator",
"{",
"if",
"(",
"null",
"===",
"$",
"this",
"->",
"cacheDriver",
")",
"{",
"return",
"$",
"conditionGenerator",
... | Creates a new CachedConditionGenerator instance for the ConditionGenerator.
@param DqlConditionGenerator|NativeQueryConditionGenerator $conditionGenerator
@param int|\DateInterval|null $ttl Optional. The TTL value of this item. If no value is sent and
the driver supports TTL... | [
"Creates",
"a",
"new",
"CachedConditionGenerator",
"instance",
"for",
"the",
"ConditionGenerator",
"."
] | d4d7e9cfc6591d34e9d00f084c35f109f971ac4f | https://github.com/rollerworks/search-doctrine-orm/blob/d4d7e9cfc6591d34e9d00f084c35f109f971ac4f/DoctrineOrmFactory.php#L75-L90 |
26,081 | dmj/PicaRecord | src/HAB/Pica/Record/Helper.php | Helper.mapMethod | public static function mapMethod (array $sequence, $method, array $arguments = array())
{
if (empty($arguments)) {
$f = function ($element) use ($method) {
return $element->$method();
};
} else {
$f = function ($element) use ($method, $arguments) {... | php | public static function mapMethod (array $sequence, $method, array $arguments = array())
{
if (empty($arguments)) {
$f = function ($element) use ($method) {
return $element->$method();
};
} else {
$f = function ($element) use ($method, $arguments) {... | [
"public",
"static",
"function",
"mapMethod",
"(",
"array",
"$",
"sequence",
",",
"$",
"method",
",",
"array",
"$",
"arguments",
"=",
"array",
"(",
")",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"arguments",
")",
")",
"{",
"$",
"f",
"=",
"function",
"... | Return an array of the results of calling a method for each element of a
sequence.
@param array $sequence Sequence of objects
@param string $method Name of the method
@param array $arguments Optional array of method arguments
@return array Result of calling method on each element of sequence | [
"Return",
"an",
"array",
"of",
"the",
"results",
"of",
"calling",
"a",
"method",
"for",
"each",
"element",
"of",
"a",
"sequence",
"."
] | bd5577b9a4333aa6156398b94cc870a9377061b8 | https://github.com/dmj/PicaRecord/blob/bd5577b9a4333aa6156398b94cc870a9377061b8/src/HAB/Pica/Record/Helper.php#L56-L68 |
26,082 | dmj/PicaRecord | src/HAB/Pica/Record/Helper.php | Helper.some | public static function some (array $sequence, $predicate)
{
foreach ($sequence as $element) {
if (call_user_func($predicate, $element)) {
return true;
}
}
return false;
} | php | public static function some (array $sequence, $predicate)
{
foreach ($sequence as $element) {
if (call_user_func($predicate, $element)) {
return true;
}
}
return false;
} | [
"public",
"static",
"function",
"some",
"(",
"array",
"$",
"sequence",
",",
"$",
"predicate",
")",
"{",
"foreach",
"(",
"$",
"sequence",
"as",
"$",
"element",
")",
"{",
"if",
"(",
"call_user_func",
"(",
"$",
"predicate",
",",
"$",
"element",
")",
")",
... | Return TRUE if at leat one element of sequence matches predicate.
@todo Make FALSE and TRUE self-evaluating, maybe
@param array $sequence Sequence
@param callback $predicate Predicate
@return boolean TRUE if at least one element matches predicate | [
"Return",
"TRUE",
"if",
"at",
"leat",
"one",
"element",
"of",
"sequence",
"matches",
"predicate",
"."
] | bd5577b9a4333aa6156398b94cc870a9377061b8 | https://github.com/dmj/PicaRecord/blob/bd5577b9a4333aa6156398b94cc870a9377061b8/src/HAB/Pica/Record/Helper.php#L90-L98 |
26,083 | dmj/PicaRecord | src/HAB/Pica/Record/Helper.php | Helper.every | public static function every (array $sequence, $predicate)
{
foreach ($sequence as $element) {
if (!call_user_func($predicate, $element)) {
return false;
}
}
return true;
} | php | public static function every (array $sequence, $predicate)
{
foreach ($sequence as $element) {
if (!call_user_func($predicate, $element)) {
return false;
}
}
return true;
} | [
"public",
"static",
"function",
"every",
"(",
"array",
"$",
"sequence",
",",
"$",
"predicate",
")",
"{",
"foreach",
"(",
"$",
"sequence",
"as",
"$",
"element",
")",
"{",
"if",
"(",
"!",
"call_user_func",
"(",
"$",
"predicate",
",",
"$",
"element",
")",... | Return TRUE if every element of sequence fullfills predicate.
@todo Make FALSE and TRUE self-evaluating, maybe
@param array $sequence Sequence
@param callback $predicate Predicate
@return boolean TRUE if every element fullfills predicate | [
"Return",
"TRUE",
"if",
"every",
"element",
"of",
"sequence",
"fullfills",
"predicate",
"."
] | bd5577b9a4333aa6156398b94cc870a9377061b8 | https://github.com/dmj/PicaRecord/blob/bd5577b9a4333aa6156398b94cc870a9377061b8/src/HAB/Pica/Record/Helper.php#L109-L117 |
26,084 | dmj/PicaRecord | src/HAB/Pica/Record/Helper.php | Helper.flatten | public static function flatten (array $sequence)
{
$flat = array();
array_walk_recursive($sequence, function ($element) use (&$flat) { $flat []= $element; });
return $flat;
} | php | public static function flatten (array $sequence)
{
$flat = array();
array_walk_recursive($sequence, function ($element) use (&$flat) { $flat []= $element; });
return $flat;
} | [
"public",
"static",
"function",
"flatten",
"(",
"array",
"$",
"sequence",
")",
"{",
"$",
"flat",
"=",
"array",
"(",
")",
";",
"array_walk_recursive",
"(",
"$",
"sequence",
",",
"function",
"(",
"$",
"element",
")",
"use",
"(",
"&",
"$",
"flat",
")",
... | Flatten sequence.
@param array $sequence Sequence
@return array Flattend sequence | [
"Flatten",
"sequence",
"."
] | bd5577b9a4333aa6156398b94cc870a9377061b8 | https://github.com/dmj/PicaRecord/blob/bd5577b9a4333aa6156398b94cc870a9377061b8/src/HAB/Pica/Record/Helper.php#L125-L130 |
26,085 | zodream/database | src/Command.php | Command.addPrefix | public function addPrefix($table) {
if (strpos($table, '`') !== false) {
return $table;
}
preg_match('/([\w_\.]+)( (as )?[\w_]+)?/i', $table, $match);
$table = count($match) == 2 ? $table : $match[1];
$alias = '';
if (count($match) > 2) {
$alias = ... | php | public function addPrefix($table) {
if (strpos($table, '`') !== false) {
return $table;
}
preg_match('/([\w_\.]+)( (as )?[\w_]+)?/i', $table, $match);
$table = count($match) == 2 ? $table : $match[1];
$alias = '';
if (count($match) > 2) {
$alias = ... | [
"public",
"function",
"addPrefix",
"(",
"$",
"table",
")",
"{",
"if",
"(",
"strpos",
"(",
"$",
"table",
",",
"'`'",
")",
"!==",
"false",
")",
"{",
"return",
"$",
"table",
";",
"}",
"preg_match",
"(",
"'/([\\w_\\.]+)( (as )?[\\w_]+)?/i'",
",",
"$",
"table... | ADD TABLE PREFIX
@param string $table
@return string
@throws \Exception | [
"ADD",
"TABLE",
"PREFIX"
] | 03712219c057799d07350a3a2650c55bcc92c28e | https://github.com/zodream/database/blob/03712219c057799d07350a3a2650c55bcc92c28e/src/Command.php#L63-L86 |
26,086 | KDF5000/EasyThink | src/ThinkPHP/Library/Vendor/SmartTemplate/class.smarttemplatedebugger.php | SmartTemplateDebugger.vardump | function vardump($var, $depth = 0)
{
if (is_array($var))
{
$result = "Array (" . count($var) . ")<BR>";
foreach(array_keys($var) as $key)
{
$result .= $this->tab[$depth] . "<B>$key</B>: " . $this->vardump($var[$key], $depth+1);
... | php | function vardump($var, $depth = 0)
{
if (is_array($var))
{
$result = "Array (" . count($var) . ")<BR>";
foreach(array_keys($var) as $key)
{
$result .= $this->tab[$depth] . "<B>$key</B>: " . $this->vardump($var[$key], $depth+1);
... | [
"function",
"vardump",
"(",
"$",
"var",
",",
"$",
"depth",
"=",
"0",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"var",
")",
")",
"{",
"$",
"result",
"=",
"\"Array (\"",
".",
"count",
"(",
"$",
"var",
")",
".",
"\")<BR>\"",
";",
"foreach",
"(",
... | Recursive Variable Display Output
@param mixed $var Content
@param int $depth Incremented Indent Counter for Recursive Calls
@return string Variable Content
@access private
@desc Recursive Variable Display Output | [
"Recursive",
"Variable",
"Display",
"Output"
] | 86efc9c8a0d504e01e2fea55868227fdc8928841 | https://github.com/KDF5000/EasyThink/blob/86efc9c8a0d504e01e2fea55868227fdc8928841/src/ThinkPHP/Library/Vendor/SmartTemplate/class.smarttemplatedebugger.php#L384-L400 |
26,087 | KDF5000/EasyThink | src/ThinkPHP/Library/Vendor/SmartTemplate/class.smarttemplatedebugger.php | SmartTemplateDebugger.highlight_html | function highlight_html ( $code )
{
$code = htmlentities($code);
$code = preg_replace('/([a-zA-Z_]+)=/', '<font color="#FF0000">$1=</font>', $code);
$code = preg_replace('/(<[\/a-zA-Z0-9&;]+)/', '<font color="#0000FF">$1</font>', $code);
$code = str_replace('<!--', '<font color="#008080... | php | function highlight_html ( $code )
{
$code = htmlentities($code);
$code = preg_replace('/([a-zA-Z_]+)=/', '<font color="#FF0000">$1=</font>', $code);
$code = preg_replace('/(<[\/a-zA-Z0-9&;]+)/', '<font color="#0000FF">$1</font>', $code);
$code = str_replace('<!--', '<font color="#008080... | [
"function",
"highlight_html",
"(",
"$",
"code",
")",
"{",
"$",
"code",
"=",
"htmlentities",
"(",
"$",
"code",
")",
";",
"$",
"code",
"=",
"preg_replace",
"(",
"'/([a-zA-Z_]+)=/'",
",",
"'<font color=\"#FF0000\">$1=</font>'",
",",
"$",
"code",
")",
";",
"$",
... | Highlight HTML Source
@param string $code HTML Source
@return string Hightlighte HTML Source
@access private
@desc Highlight HTML Source | [
"Highlight",
"HTML",
"Source"
] | 86efc9c8a0d504e01e2fea55868227fdc8928841 | https://github.com/KDF5000/EasyThink/blob/86efc9c8a0d504e01e2fea55868227fdc8928841/src/ThinkPHP/Library/Vendor/SmartTemplate/class.smarttemplatedebugger.php#L445-L454 |
26,088 | ndavison/groundwork-framework | src/Groundwork/Classes/Response.php | Response.send | public function send($code, $body = '')
{
if (!isset($this->codes[$code])) {
$statusCode = 500;
$body = 'API attempted to return an unknown HTTP status.';
}
// if the body wasn't defined, default to the inbuilt response
if (!$body) $body = $this->codes[$code];... | php | public function send($code, $body = '')
{
if (!isset($this->codes[$code])) {
$statusCode = 500;
$body = 'API attempted to return an unknown HTTP status.';
}
// if the body wasn't defined, default to the inbuilt response
if (!$body) $body = $this->codes[$code];... | [
"public",
"function",
"send",
"(",
"$",
"code",
",",
"$",
"body",
"=",
"''",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"codes",
"[",
"$",
"code",
"]",
")",
")",
"{",
"$",
"statusCode",
"=",
"500",
";",
"$",
"body",
"=",
"'API... | Output a JSON formatted response of the supplied body param, along with
the supplied code param as the HTTP status code.
@param int $code
@param mixed $body | [
"Output",
"a",
"JSON",
"formatted",
"response",
"of",
"the",
"supplied",
"body",
"param",
"along",
"with",
"the",
"supplied",
"code",
"param",
"as",
"the",
"HTTP",
"status",
"code",
"."
] | c3d22a1410c8d8a07b4ca1f99a35a1181516cd6c | https://github.com/ndavison/groundwork-framework/blob/c3d22a1410c8d8a07b4ca1f99a35a1181516cd6c/src/Groundwork/Classes/Response.php#L46-L58 |
26,089 | deesoft/yii2-rest | BasicController.php | BasicController.viewDetail | protected function viewDetail($id, $field)
{
$model = $this->findModel($id);
$definition = array_merge($model->fields(), $model->extraFields());
if (isset($definition[$field])) {
return is_string($definition[$field]) ? $model->{$definition[$field]} : call_user_func($definition[$f... | php | protected function viewDetail($id, $field)
{
$model = $this->findModel($id);
$definition = array_merge($model->fields(), $model->extraFields());
if (isset($definition[$field])) {
return is_string($definition[$field]) ? $model->{$definition[$field]} : call_user_func($definition[$f... | [
"protected",
"function",
"viewDetail",
"(",
"$",
"id",
",",
"$",
"field",
")",
"{",
"$",
"model",
"=",
"$",
"this",
"->",
"findModel",
"(",
"$",
"id",
")",
";",
"$",
"definition",
"=",
"array_merge",
"(",
"$",
"model",
"->",
"fields",
"(",
")",
","... | Displays a single filed of model.
@param integer $id
@return mixed | [
"Displays",
"a",
"single",
"filed",
"of",
"model",
"."
] | c33f145fbfa2bc138dffdd2f9408a2a461153128 | https://github.com/deesoft/yii2-rest/blob/c33f145fbfa2bc138dffdd2f9408a2a461153128/BasicController.php#L72-L82 |
26,090 | Danack/Jig | src/Jig/JigBase.php | JigBase.callFunction | protected function callFunction($functionName)
{
$functionArgs = func_get_args();
$params = array_splice($functionArgs, 1);
foreach ($this->plugins as $plugin) {
$functionList = $plugin->getFunctionList();
if (in_array($functionName, $functionList) === true) ... | php | protected function callFunction($functionName)
{
$functionArgs = func_get_args();
$params = array_splice($functionArgs, 1);
foreach ($this->plugins as $plugin) {
$functionList = $plugin->getFunctionList();
if (in_array($functionName, $functionList) === true) ... | [
"protected",
"function",
"callFunction",
"(",
"$",
"functionName",
")",
"{",
"$",
"functionArgs",
"=",
"func_get_args",
"(",
")",
";",
"$",
"params",
"=",
"array_splice",
"(",
"$",
"functionArgs",
",",
"1",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"p... | Used to call a function in a template
@param $functionName
@return mixed
@throws JigException | [
"Used",
"to",
"call",
"a",
"function",
"in",
"a",
"template"
] | b11106bc7d634add9873bf246eda1dadb059ed7a | https://github.com/Danack/Jig/blob/b11106bc7d634add9873bf246eda1dadb059ed7a/src/Jig/JigBase.php#L59-L72 |
26,091 | Danack/Jig | src/Jig/JigBase.php | JigBase.startRenderBlock | protected function startRenderBlock($blockName, $segmentText)
{
foreach ($this->plugins as $plugin) {
$blockRenderList = $plugin->getBlockRenderList();
if (in_array($blockName, $blockRenderList) === true) {
echo $plugin->callBlockRenderStart($blockName, $segmentText);... | php | protected function startRenderBlock($blockName, $segmentText)
{
foreach ($this->plugins as $plugin) {
$blockRenderList = $plugin->getBlockRenderList();
if (in_array($blockName, $blockRenderList) === true) {
echo $plugin->callBlockRenderStart($blockName, $segmentText);... | [
"protected",
"function",
"startRenderBlock",
"(",
"$",
"blockName",
",",
"$",
"segmentText",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"plugins",
"as",
"$",
"plugin",
")",
"{",
"$",
"blockRenderList",
"=",
"$",
"plugin",
"->",
"getBlockRenderList",
"(",
... | Called when a block is started in a template.
@param $blockName
@param $segmentText
@throws JigException | [
"Called",
"when",
"a",
"block",
"is",
"started",
"in",
"a",
"template",
"."
] | b11106bc7d634add9873bf246eda1dadb059ed7a | https://github.com/Danack/Jig/blob/b11106bc7d634add9873bf246eda1dadb059ed7a/src/Jig/JigBase.php#L81-L92 |
26,092 | Danack/Jig | src/Jig/JigBase.php | JigBase.endRenderBlock | protected function endRenderBlock($blockName)
{
$contents = ob_get_contents();
ob_end_clean();
foreach ($this->plugins as $plugin) {
$blockRenderList = $plugin->getBlockRenderList();
if (in_array($blockName, $blockRenderList) === true) {
echo $plugin->... | php | protected function endRenderBlock($blockName)
{
$contents = ob_get_contents();
ob_end_clean();
foreach ($this->plugins as $plugin) {
$blockRenderList = $plugin->getBlockRenderList();
if (in_array($blockName, $blockRenderList) === true) {
echo $plugin->... | [
"protected",
"function",
"endRenderBlock",
"(",
"$",
"blockName",
")",
"{",
"$",
"contents",
"=",
"ob_get_contents",
"(",
")",
";",
"ob_end_clean",
"(",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"plugins",
"as",
"$",
"plugin",
")",
"{",
"$",
"blockRen... | Called when a block is ended in a template.
@param $blockName
@throws JigException | [
"Called",
"when",
"a",
"block",
"is",
"ended",
"in",
"a",
"template",
"."
] | b11106bc7d634add9873bf246eda1dadb059ed7a | https://github.com/Danack/Jig/blob/b11106bc7d634add9873bf246eda1dadb059ed7a/src/Jig/JigBase.php#L99-L112 |
26,093 | oliverde8/MPDedicatedServerBundle | Service/DedicatedServer.php | DedicatedServer.getServerInfo | public function getServerInfo($login)
{
static $lockAcquired = false;
if (isset($this->servers[$login])) {
$cacheKey = $this->_getServerInfoCacheKey($login);
$cacheResult = $this->serverInfoCache->fetch($cacheKey);
if ($cacheResult) {
return $cach... | php | public function getServerInfo($login)
{
static $lockAcquired = false;
if (isset($this->servers[$login])) {
$cacheKey = $this->_getServerInfoCacheKey($login);
$cacheResult = $this->serverInfoCache->fetch($cacheKey);
if ($cacheResult) {
return $cach... | [
"public",
"function",
"getServerInfo",
"(",
"$",
"login",
")",
"{",
"static",
"$",
"lockAcquired",
"=",
"false",
";",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"servers",
"[",
"$",
"login",
"]",
")",
")",
"{",
"$",
"cacheKey",
"=",
"$",
"this",
"... | Returns server information. If server information not in cache will make call to the dedicated server.
Try to use this with ajax calls in order to have a faster website.
@param string $login Login of the server
@return ServerInfo|null | [
"Returns",
"server",
"information",
".",
"If",
"server",
"information",
"not",
"in",
"cache",
"will",
"make",
"call",
"to",
"the",
"dedicated",
"server",
".",
"Try",
"to",
"use",
"this",
"with",
"ajax",
"calls",
"in",
"order",
"to",
"have",
"a",
"faster",
... | c0cab0b0089a1273032ddf4bbf0287e7aee8fceb | https://github.com/oliverde8/MPDedicatedServerBundle/blob/c0cab0b0089a1273032ddf4bbf0287e7aee8fceb/Service/DedicatedServer.php#L73-L107 |
26,094 | oliverde8/MPDedicatedServerBundle | Service/DedicatedServer.php | DedicatedServer.getServerChatLines | public function getServerChatLines($login)
{
static $lockAcquired = false;
if (isset($this->servers[$login])) {
$cacheKey = $this->_getServerChatCacheKey($login);
$cacheResult = $this->serverInfoCache->fetch($cacheKey);
if ($cacheResult) {
return ... | php | public function getServerChatLines($login)
{
static $lockAcquired = false;
if (isset($this->servers[$login])) {
$cacheKey = $this->_getServerChatCacheKey($login);
$cacheResult = $this->serverInfoCache->fetch($cacheKey);
if ($cacheResult) {
return ... | [
"public",
"function",
"getServerChatLines",
"(",
"$",
"login",
")",
"{",
"static",
"$",
"lockAcquired",
"=",
"false",
";",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"servers",
"[",
"$",
"login",
"]",
")",
")",
"{",
"$",
"cacheKey",
"=",
"$",
"this"... | Returns chat lines.
Try to use this with ajax calls in order to have a faster website.
@param string $login Login of the server
@return ServerInfo|null | [
"Returns",
"chat",
"lines",
".",
"Try",
"to",
"use",
"this",
"with",
"ajax",
"calls",
"in",
"order",
"to",
"have",
"a",
"faster",
"website",
"."
] | c0cab0b0089a1273032ddf4bbf0287e7aee8fceb | https://github.com/oliverde8/MPDedicatedServerBundle/blob/c0cab0b0089a1273032ddf4bbf0287e7aee8fceb/Service/DedicatedServer.php#L117-L158 |
26,095 | oliverde8/MPDedicatedServerBundle | Service/DedicatedServer.php | DedicatedServer.getMapList | public function getMapList($login) {
static $lockAcquired = false;
if (isset($this->servers[$login])) {
$cacheKey = $this->_getServerMapsCacheKey($login);
$cacheResult = $this->serverInfoCache->fetch($cacheKey);
if ($cacheResult) {
return $cacheResult... | php | public function getMapList($login) {
static $lockAcquired = false;
if (isset($this->servers[$login])) {
$cacheKey = $this->_getServerMapsCacheKey($login);
$cacheResult = $this->serverInfoCache->fetch($cacheKey);
if ($cacheResult) {
return $cacheResult... | [
"public",
"function",
"getMapList",
"(",
"$",
"login",
")",
"{",
"static",
"$",
"lockAcquired",
"=",
"false",
";",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"servers",
"[",
"$",
"login",
"]",
")",
")",
"{",
"$",
"cacheKey",
"=",
"$",
"this",
"->"... | Returns list of maps on the server. If list of map not in cache will make a call to the dedicatd server.
Try to use this with ajax calls in order to have a faster website.
@param string $login Login of the server
@return \Maniaplanet\DedicatedServer\Structures\Map[] | [
"Returns",
"list",
"of",
"maps",
"on",
"the",
"server",
".",
"If",
"list",
"of",
"map",
"not",
"in",
"cache",
"will",
"make",
"a",
"call",
"to",
"the",
"dedicatd",
"server",
".",
"Try",
"to",
"use",
"this",
"with",
"ajax",
"calls",
"in",
"order",
"to... | c0cab0b0089a1273032ddf4bbf0287e7aee8fceb | https://github.com/oliverde8/MPDedicatedServerBundle/blob/c0cab0b0089a1273032ddf4bbf0287e7aee8fceb/Service/DedicatedServer.php#L168-L207 |
26,096 | oliverde8/MPDedicatedServerBundle | Service/DedicatedServer.php | DedicatedServer.getServerNames | public function getServerNames() {
$serverNames = array();
foreach($this->servers as $login => $data) {
$serverNames[$login] = $data['name'];
}
return $serverNames;
} | php | public function getServerNames() {
$serverNames = array();
foreach($this->servers as $login => $data) {
$serverNames[$login] = $data['name'];
}
return $serverNames;
} | [
"public",
"function",
"getServerNames",
"(",
")",
"{",
"$",
"serverNames",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"servers",
"as",
"$",
"login",
"=>",
"$",
"data",
")",
"{",
"$",
"serverNames",
"[",
"$",
"login",
"]",
"=",
... | Returns login, server name association.
This is the name you defined in the config and therfore won't make any dedicated calls.
@return String[] | [
"Returns",
"login",
"server",
"name",
"association",
".",
"This",
"is",
"the",
"name",
"you",
"defined",
"in",
"the",
"config",
"and",
"therfore",
"won",
"t",
"make",
"any",
"dedicated",
"calls",
"."
] | c0cab0b0089a1273032ddf4bbf0287e7aee8fceb | https://github.com/oliverde8/MPDedicatedServerBundle/blob/c0cab0b0089a1273032ddf4bbf0287e7aee8fceb/Service/DedicatedServer.php#L215-L221 |
26,097 | oliverde8/MPDedicatedServerBundle | Service/DedicatedServer.php | DedicatedServer.getConnection | public function getConnection($login) {
if (isset($this->servers[$login])) {
if (!isset($this->connections[$login])) {
$conf = $this->servers[$login];
$this->connections[$login] = Connection::factory($conf['host'], $conf['port'], 1, $conf['user'], $conf['password']);... | php | public function getConnection($login) {
if (isset($this->servers[$login])) {
if (!isset($this->connections[$login])) {
$conf = $this->servers[$login];
$this->connections[$login] = Connection::factory($conf['host'], $conf['port'], 1, $conf['user'], $conf['password']);... | [
"public",
"function",
"getConnection",
"(",
"$",
"login",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"servers",
"[",
"$",
"login",
"]",
")",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"connections",
"[",
"$",
"login",
"... | Connects to the dedicated server API, if connection already established will send existing connextion
@param string $login Server to connect to
@return Connection | [
"Connects",
"to",
"the",
"dedicated",
"server",
"API",
"if",
"connection",
"already",
"established",
"will",
"send",
"existing",
"connextion"
] | c0cab0b0089a1273032ddf4bbf0287e7aee8fceb | https://github.com/oliverde8/MPDedicatedServerBundle/blob/c0cab0b0089a1273032ddf4bbf0287e7aee8fceb/Service/DedicatedServer.php#L301-L312 |
26,098 | balintsera/evista-perform | src/FormMarkupTranspiler.php | FormMarkupTranspiler.findFormClassName | public function findFormClassName()
{
$this->runIfNotCached(
'formClassName',
function () {
return $this->findFormTag()->attr(self:: FORM_CLASS_NAME_ATTR_NAME);
}
);
return $this->formClassName;
} | php | public function findFormClassName()
{
$this->runIfNotCached(
'formClassName',
function () {
return $this->findFormTag()->attr(self:: FORM_CLASS_NAME_ATTR_NAME);
}
);
return $this->formClassName;
} | [
"public",
"function",
"findFormClassName",
"(",
")",
"{",
"$",
"this",
"->",
"runIfNotCached",
"(",
"'formClassName'",
",",
"function",
"(",
")",
"{",
"return",
"$",
"this",
"->",
"findFormTag",
"(",
")",
"->",
"attr",
"(",
"self",
"::",
"FORM_CLASS_NAME_ATT... | Get class-name for the form | [
"Get",
"class",
"-",
"name",
"for",
"the",
"form"
] | 2b8723852ebe824ed721f30293e1e0d2c14f4b21 | https://github.com/balintsera/evista-perform/blob/2b8723852ebe824ed721f30293e1e0d2c14f4b21/src/FormMarkupTranspiler.php#L70-L80 |
26,099 | balintsera/evista-perform | src/FormMarkupTranspiler.php | FormMarkupTranspiler.transpileFields | private function transpileFields()
{
$formElements = 'input, select, textarea, button';
$this->findFormTag()->filter($formElements)->each(
function (Crawler $node, $i) {
// If it has a type attr, use as type
if (null !== $node->attr('type')) {
... | php | private function transpileFields()
{
$formElements = 'input, select, textarea, button';
$this->findFormTag()->filter($formElements)->each(
function (Crawler $node, $i) {
// If it has a type attr, use as type
if (null !== $node->attr('type')) {
... | [
"private",
"function",
"transpileFields",
"(",
")",
"{",
"$",
"formElements",
"=",
"'input, select, textarea, button'",
";",
"$",
"this",
"->",
"findFormTag",
"(",
")",
"->",
"filter",
"(",
"$",
"formElements",
")",
"->",
"each",
"(",
"function",
"(",
"Crawler... | Find fields in markup | [
"Find",
"fields",
"in",
"markup"
] | 2b8723852ebe824ed721f30293e1e0d2c14f4b21 | https://github.com/balintsera/evista-perform/blob/2b8723852ebe824ed721f30293e1e0d2c14f4b21/src/FormMarkupTranspiler.php#L112-L161 |
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.