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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
33,600 | silverorange/swat | Swat/SwatTableViewOrderableColumn.php | SwatTableViewOrderableColumn.initFromGetVariables | private function initFromGetVariables()
{
$key_orderby = $this->getLinkPrefix() . 'orderby';
$key_orderbydir = $this->getLinkPrefix() . 'orderbydir';
if (isset($_GET[$key_orderby]) && $_GET[$key_orderby] == $this->id) {
$this->view->orderby_column = $this;
if (isset... | php | private function initFromGetVariables()
{
$key_orderby = $this->getLinkPrefix() . 'orderby';
$key_orderbydir = $this->getLinkPrefix() . 'orderbydir';
if (isset($_GET[$key_orderby]) && $_GET[$key_orderby] == $this->id) {
$this->view->orderby_column = $this;
if (isset... | [
"private",
"function",
"initFromGetVariables",
"(",
")",
"{",
"$",
"key_orderby",
"=",
"$",
"this",
"->",
"getLinkPrefix",
"(",
")",
".",
"'orderby'",
";",
"$",
"key_orderbydir",
"=",
"$",
"this",
"->",
"getLinkPrefix",
"(",
")",
".",
"'orderbydir'",
";",
... | Process GET variables and set class variables | [
"Process",
"GET",
"variables",
"and",
"set",
"class",
"variables"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableViewOrderableColumn.php#L475-L487 |
33,601 | zeroem/ZeroemCurlBundle | Curl/MultiManager.php | MultiManager.addRequest | public function addRequest(Request $request) {
$oid = spl_object_hash($request);
if(!isset($this->requests[$oid])) {
$this->requests[$oid] = $request;
curl_multi_add_handle($this->handle, $request->getHandle());
}
return $this;
} | php | public function addRequest(Request $request) {
$oid = spl_object_hash($request);
if(!isset($this->requests[$oid])) {
$this->requests[$oid] = $request;
curl_multi_add_handle($this->handle, $request->getHandle());
}
return $this;
} | [
"public",
"function",
"addRequest",
"(",
"Request",
"$",
"request",
")",
"{",
"$",
"oid",
"=",
"spl_object_hash",
"(",
"$",
"request",
")",
";",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"requests",
"[",
"$",
"oid",
"]",
")",
")",
"{",
"$",
... | Add a cURL request to be processed in parallel
Alias of the curl_multi_add_handle function
@param Request $request A Request object to be executed
@return MultiManager $this | [
"Add",
"a",
"cURL",
"request",
"to",
"be",
"processed",
"in",
"parallel"
] | 1045e2093bec5a013ff9458828721e581725f1a0 | https://github.com/zeroem/ZeroemCurlBundle/blob/1045e2093bec5a013ff9458828721e581725f1a0/Curl/MultiManager.php#L86-L95 |
33,602 | zeroem/ZeroemCurlBundle | Curl/MultiManager.php | MultiManager.removeRequest | public function removeRequest(Request $request) {
$oid = spl_object_hash($request);
$result = false;
if(isset($this->requests[$oid])) {
unset($this->requests[$oid]);
$result = $request;
curl_multi_remove_handle($this->handle, $request->getHandle());
}... | php | public function removeRequest(Request $request) {
$oid = spl_object_hash($request);
$result = false;
if(isset($this->requests[$oid])) {
unset($this->requests[$oid]);
$result = $request;
curl_multi_remove_handle($this->handle, $request->getHandle());
}... | [
"public",
"function",
"removeRequest",
"(",
"Request",
"$",
"request",
")",
"{",
"$",
"oid",
"=",
"spl_object_hash",
"(",
"$",
"request",
")",
";",
"$",
"result",
"=",
"false",
";",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"requests",
"[",
"$",
"o... | Remove a request from the execution stack
Analogous to the curl_multi_remove_handle function
@param Request $request The Request to be removed
@return Request|boolean the request that was removed or false if the request isn't managed by this object | [
"Remove",
"a",
"request",
"from",
"the",
"execution",
"stack"
] | 1045e2093bec5a013ff9458828721e581725f1a0 | https://github.com/zeroem/ZeroemCurlBundle/blob/1045e2093bec5a013ff9458828721e581725f1a0/Curl/MultiManager.php#L105-L116 |
33,603 | zeroem/ZeroemCurlBundle | Curl/MultiManager.php | MultiManager.execute | public function execute() {
if($this->blocking) {
return $this->executeBlocking();
} else {
return $this->errorCheck(
curl_multi_exec($this->handle,$active)
);
}
} | php | public function execute() {
if($this->blocking) {
return $this->executeBlocking();
} else {
return $this->errorCheck(
curl_multi_exec($this->handle,$active)
);
}
} | [
"public",
"function",
"execute",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"blocking",
")",
"{",
"return",
"$",
"this",
"->",
"executeBlocking",
"(",
")",
";",
"}",
"else",
"{",
"return",
"$",
"this",
"->",
"errorCheck",
"(",
"curl_multi_exec",
"(",... | Execute the registered Request objects in parallel
Analogous to curl_multi_exec
@return int the result of curl_multi_exec
@throws CurlErrorException | [
"Execute",
"the",
"registered",
"Request",
"objects",
"in",
"parallel"
] | 1045e2093bec5a013ff9458828721e581725f1a0 | https://github.com/zeroem/ZeroemCurlBundle/blob/1045e2093bec5a013ff9458828721e581725f1a0/Curl/MultiManager.php#L138-L146 |
33,604 | zeroem/ZeroemCurlBundle | Curl/MultiManager.php | MultiManager.processInfo | private function processInfo(array $info) {
$request = $this->findRequest($info["handle"]);
if(isset($this->dispatcher) && false !== $request) {
$this->dispatcher->dispatch(
CurlEvents::MULTI_INFO,
new MultiInfoEvent(
$this,
... | php | private function processInfo(array $info) {
$request = $this->findRequest($info["handle"]);
if(isset($this->dispatcher) && false !== $request) {
$this->dispatcher->dispatch(
CurlEvents::MULTI_INFO,
new MultiInfoEvent(
$this,
... | [
"private",
"function",
"processInfo",
"(",
"array",
"$",
"info",
")",
"{",
"$",
"request",
"=",
"$",
"this",
"->",
"findRequest",
"(",
"$",
"info",
"[",
"\"handle\"",
"]",
")",
";",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"dispatcher",
")",
"&&",... | Process and callbacks associated with the handle returned by
curl_multi_info_read
@param array $info data array from curl_multi_info_read | [
"Process",
"and",
"callbacks",
"associated",
"with",
"the",
"handle",
"returned",
"by",
"curl_multi_info_read"
] | 1045e2093bec5a013ff9458828721e581725f1a0 | https://github.com/zeroem/ZeroemCurlBundle/blob/1045e2093bec5a013ff9458828721e581725f1a0/Curl/MultiManager.php#L192-L205 |
33,605 | zeroem/ZeroemCurlBundle | Curl/MultiManager.php | MultiManager.findRequest | public function findRequest($handle) {
foreach($this->requests as $request) {
if($handle === $request->getHandle()) {
return $request;
}
}
return false;
} | php | public function findRequest($handle) {
foreach($this->requests as $request) {
if($handle === $request->getHandle()) {
return $request;
}
}
return false;
} | [
"public",
"function",
"findRequest",
"(",
"$",
"handle",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"requests",
"as",
"$",
"request",
")",
"{",
"if",
"(",
"$",
"handle",
"===",
"$",
"request",
"->",
"getHandle",
"(",
")",
")",
"{",
"return",
"$",
... | Given a cURL handle, locate the request object associated with it
@param resource $handle a cURL handle
@return Request|boolean the associated Request object or false if it is not found | [
"Given",
"a",
"cURL",
"handle",
"locate",
"the",
"request",
"object",
"associated",
"with",
"it"
] | 1045e2093bec5a013ff9458828721e581725f1a0 | https://github.com/zeroem/ZeroemCurlBundle/blob/1045e2093bec5a013ff9458828721e581725f1a0/Curl/MultiManager.php#L213-L221 |
33,606 | brainworxx/kreXX | src/Service/Factory/Event.php | Event.dispatch | public function dispatch($name, AbstractCallback $callback, Model $model = null)
{
if (isset($this->register[$name]) === false) {
// No registered handler. Early return.
return '';
}
$output = '';
// Got to handel them all.
foreach ($this->register[$... | php | public function dispatch($name, AbstractCallback $callback, Model $model = null)
{
if (isset($this->register[$name]) === false) {
// No registered handler. Early return.
return '';
}
$output = '';
// Got to handel them all.
foreach ($this->register[$... | [
"public",
"function",
"dispatch",
"(",
"$",
"name",
",",
"AbstractCallback",
"$",
"callback",
",",
"Model",
"$",
"model",
"=",
"null",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"register",
"[",
"$",
"name",
"]",
")",
"===",
"false",
")",
... | Dispatches an event.
@param string $name
The name of the event.
@param AbstractCallback $callback
The parameters for the callback.
@param \Brainworxx\Krexx\Analyse\Model|null $model
The model so far, if available.
@return string
The generated markup from the event handlers
This will only get dispatched, if you use th... | [
"Dispatches",
"an",
"event",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Service/Factory/Event.php#L90-L105 |
33,607 | TypiCMS/Menus | src/Repositories/EloquentMenu.php | EloquentMenu.prepare | public function prepare($items = null)
{
$items->each(function ($item) {
$item->items = collect();
if ($item->has_categories) {
$item->items = $this->prepare(ProjectCategories::allForMenu($item->page->uri()));
}
$item->href = $this->setHref($it... | php | public function prepare($items = null)
{
$items->each(function ($item) {
$item->items = collect();
if ($item->has_categories) {
$item->items = $this->prepare(ProjectCategories::allForMenu($item->page->uri()));
}
$item->href = $this->setHref($it... | [
"public",
"function",
"prepare",
"(",
"$",
"items",
"=",
"null",
")",
"{",
"$",
"items",
"->",
"each",
"(",
"function",
"(",
"$",
"item",
")",
"{",
"$",
"item",
"->",
"items",
"=",
"collect",
"(",
")",
";",
"if",
"(",
"$",
"item",
"->",
"has_cate... | Set href and classes for each items in collection.
@param $items
@return \TypiCMS\NestableCollection | [
"Set",
"href",
"and",
"classes",
"for",
"each",
"items",
"in",
"collection",
"."
] | 628211bf23dfd035c85140e5a6ad28882bed50cb | https://github.com/TypiCMS/Menus/blob/628211bf23dfd035c85140e5a6ad28882bed50cb/src/Repositories/EloquentMenu.php#L82-L94 |
33,608 | TypiCMS/Menus | src/Repositories/EloquentMenu.php | EloquentMenu.setHref | public function setHref($menulink)
{
if ($menulink->url) {
return $menulink->url;
}
if ($menulink->page) {
return $menulink->page->uri();
}
return '/';
} | php | public function setHref($menulink)
{
if ($menulink->url) {
return $menulink->url;
}
if ($menulink->page) {
return $menulink->page->uri();
}
return '/';
} | [
"public",
"function",
"setHref",
"(",
"$",
"menulink",
")",
"{",
"if",
"(",
"$",
"menulink",
"->",
"url",
")",
"{",
"return",
"$",
"menulink",
"->",
"url",
";",
"}",
"if",
"(",
"$",
"menulink",
"->",
"page",
")",
"{",
"return",
"$",
"menulink",
"->... | 1. If menulink has url field, take it.
2. If menulink has a page, take the uri of the page in the current locale.
@param $menulink
@return string uri | [
"1",
".",
"If",
"menulink",
"has",
"url",
"field",
"take",
"it",
".",
"2",
".",
"If",
"menulink",
"has",
"a",
"page",
"take",
"the",
"uri",
"of",
"the",
"page",
"in",
"the",
"current",
"locale",
"."
] | 628211bf23dfd035c85140e5a6ad28882bed50cb | https://github.com/TypiCMS/Menus/blob/628211bf23dfd035c85140e5a6ad28882bed50cb/src/Repositories/EloquentMenu.php#L104-L114 |
33,609 | TypiCMS/Menus | src/Repositories/EloquentMenu.php | EloquentMenu.setClass | public function setClass($menulink)
{
$classArray = preg_split('/ /', $menulink->class, null, PREG_SPLIT_NO_EMPTY);
// add active class if current uri is equal to item uri or contains
// item uri and is bigger than 3 to avoid homepage link always active ('/', '/lg')
$pattern = $menul... | php | public function setClass($menulink)
{
$classArray = preg_split('/ /', $menulink->class, null, PREG_SPLIT_NO_EMPTY);
// add active class if current uri is equal to item uri or contains
// item uri and is bigger than 3 to avoid homepage link always active ('/', '/lg')
$pattern = $menul... | [
"public",
"function",
"setClass",
"(",
"$",
"menulink",
")",
"{",
"$",
"classArray",
"=",
"preg_split",
"(",
"'/ /'",
",",
"$",
"menulink",
"->",
"class",
",",
"null",
",",
"PREG_SPLIT_NO_EMPTY",
")",
";",
"// add active class if current uri is equal to item uri or ... | Take the classes from field and add active if needed.
@param $menulink
@return string classes | [
"Take",
"the",
"classes",
"from",
"field",
"and",
"add",
"active",
"if",
"needed",
"."
] | 628211bf23dfd035c85140e5a6ad28882bed50cb | https://github.com/TypiCMS/Menus/blob/628211bf23dfd035c85140e5a6ad28882bed50cb/src/Repositories/EloquentMenu.php#L123-L137 |
33,610 | FreeDSx/Socket | src/FreeDSx/Socket/Socket.php | Socket.create | public static function create(string $host, array $options = []) : Socket
{
return (new self(null, $options))->connect($host);
} | php | public static function create(string $host, array $options = []) : Socket
{
return (new self(null, $options))->connect($host);
} | [
"public",
"static",
"function",
"create",
"(",
"string",
"$",
"host",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
":",
"Socket",
"{",
"return",
"(",
"new",
"self",
"(",
"null",
",",
"$",
"options",
")",
")",
"->",
"connect",
"(",
"$",
"host",... | Create a socket by connecting to a specific host.
@param string $host
@param array $options
@return Socket
@throws ConnectionException | [
"Create",
"a",
"socket",
"by",
"connecting",
"to",
"a",
"specific",
"host",
"."
] | d74683bf8b827e91a8ca051805c55dacaf64f93d | https://github.com/FreeDSx/Socket/blob/d74683bf8b827e91a8ca051805c55dacaf64f93d/src/FreeDSx/Socket/Socket.php#L264-L267 |
33,611 | FreeDSx/Socket | src/FreeDSx/Socket/Socket.php | Socket.tcp | public static function tcp(string $host, array $options = []) : Socket
{
return self::create($host, \array_merge($options, ['transport' => 'tcp']));
} | php | public static function tcp(string $host, array $options = []) : Socket
{
return self::create($host, \array_merge($options, ['transport' => 'tcp']));
} | [
"public",
"static",
"function",
"tcp",
"(",
"string",
"$",
"host",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
":",
"Socket",
"{",
"return",
"self",
"::",
"create",
"(",
"$",
"host",
",",
"\\",
"array_merge",
"(",
"$",
"options",
",",
"[",
"'... | Create a TCP based socket.
@param string $host
@param array $options
@return Socket
@throws ConnectionException | [
"Create",
"a",
"TCP",
"based",
"socket",
"."
] | d74683bf8b827e91a8ca051805c55dacaf64f93d | https://github.com/FreeDSx/Socket/blob/d74683bf8b827e91a8ca051805c55dacaf64f93d/src/FreeDSx/Socket/Socket.php#L277-L280 |
33,612 | FreeDSx/Socket | src/FreeDSx/Socket/Socket.php | Socket.udp | public static function udp(string $host, array $options = []) : Socket
{
return self::create($host, \array_merge($options, [
'transport' => 'udp',
'buffer_size' => 65507,
]));
} | php | public static function udp(string $host, array $options = []) : Socket
{
return self::create($host, \array_merge($options, [
'transport' => 'udp',
'buffer_size' => 65507,
]));
} | [
"public",
"static",
"function",
"udp",
"(",
"string",
"$",
"host",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
":",
"Socket",
"{",
"return",
"self",
"::",
"create",
"(",
"$",
"host",
",",
"\\",
"array_merge",
"(",
"$",
"options",
",",
"[",
"'... | Create a UDP based socket.
@param string $host
@param array $options
@return Socket
@throws ConnectionException | [
"Create",
"a",
"UDP",
"based",
"socket",
"."
] | d74683bf8b827e91a8ca051805c55dacaf64f93d | https://github.com/FreeDSx/Socket/blob/d74683bf8b827e91a8ca051805c55dacaf64f93d/src/FreeDSx/Socket/Socket.php#L290-L296 |
33,613 | silverorange/swat | Swat/SwatListEntry.php | SwatListEntry.display | public function display()
{
if (!$this->visible) {
return;
}
// Do not have a maxlength on the XHTML input tag. This relies on
// internal knowledge of the parent::display() method.
$old_maxlength = $this->maxlength;
$this->maxlength = null;
pare... | php | public function display()
{
if (!$this->visible) {
return;
}
// Do not have a maxlength on the XHTML input tag. This relies on
// internal knowledge of the parent::display() method.
$old_maxlength = $this->maxlength;
$this->maxlength = null;
pare... | [
"public",
"function",
"display",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"visible",
")",
"{",
"return",
";",
"}",
"// Do not have a maxlength on the XHTML input tag. This relies on",
"// internal knowledge of the parent::display() method.",
"$",
"old_maxlength",
... | Displays this list entry | [
"Displays",
"this",
"list",
"entry"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatListEntry.php#L98-L112 |
33,614 | silverorange/swat | Swat/SwatListEntry.php | SwatListEntry.setState | public function setState($values)
{
if (is_array($values)) {
$this->values = $values;
} else {
$this->values = $this->splitValues($values);
}
} | php | public function setState($values)
{
if (is_array($values)) {
$this->values = $values;
} else {
$this->values = $this->splitValues($values);
}
} | [
"public",
"function",
"setState",
"(",
"$",
"values",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"values",
")",
")",
"{",
"$",
"this",
"->",
"values",
"=",
"$",
"values",
";",
"}",
"else",
"{",
"$",
"this",
"->",
"values",
"=",
"$",
"this",
"->",... | Sets the current state of this list entry widget
@param string $state the new state of this list entry widget.
@see SwatState::setState() | [
"Sets",
"the",
"current",
"state",
"of",
"this",
"list",
"entry",
"widget"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatListEntry.php#L260-L267 |
33,615 | silverorange/swat | Swat/SwatListEntry.php | SwatListEntry.getDisplayValue | protected function getDisplayValue($value)
{
if ($this->trim_whitespace && $this->delimiter != ' ') {
return implode($this->delimiter . ' ', $this->values);
} else {
return implode($this->delimiter, $this->values);
}
} | php | protected function getDisplayValue($value)
{
if ($this->trim_whitespace && $this->delimiter != ' ') {
return implode($this->delimiter . ' ', $this->values);
} else {
return implode($this->delimiter, $this->values);
}
} | [
"protected",
"function",
"getDisplayValue",
"(",
"$",
"value",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"trim_whitespace",
"&&",
"$",
"this",
"->",
"delimiter",
"!=",
"' '",
")",
"{",
"return",
"implode",
"(",
"$",
"this",
"->",
"delimiter",
".",
"' '",
... | Gets the value displayed in the XHTML input
For list entry, this is a delimiter separated string containing the
elements of {@link SwatListEntry::$values}.
@param array $value the value to format for display.
@return string the values displayed in the XHTML input. | [
"Gets",
"the",
"value",
"displayed",
"in",
"the",
"XHTML",
"input"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatListEntry.php#L282-L289 |
33,616 | silverorange/swat | Swat/SwatListEntry.php | SwatListEntry.getNote | public function getNote()
{
$message = null;
$locale = SwatI18NLocale::get();
if (
$this->max_entries !== null &&
$this->max_entries > 0 &&
$this->min_entries === null
) {
$message = new SwatMessage(
sprintf(
... | php | public function getNote()
{
$message = null;
$locale = SwatI18NLocale::get();
if (
$this->max_entries !== null &&
$this->max_entries > 0 &&
$this->min_entries === null
) {
$message = new SwatMessage(
sprintf(
... | [
"public",
"function",
"getNote",
"(",
")",
"{",
"$",
"message",
"=",
"null",
";",
"$",
"locale",
"=",
"SwatI18NLocale",
"::",
"get",
"(",
")",
";",
"if",
"(",
"$",
"this",
"->",
"max_entries",
"!==",
"null",
"&&",
"$",
"this",
"->",
"max_entries",
">... | Gets a note describing the rules on this list entry
This note informs the user what numbers of entries are valid for this
list entry. This note does not mention anything about what type of
delimiter is used. Developers are responsible for ensuring that users
are notified what type of delimiters are used.
@return Swat... | [
"Gets",
"a",
"note",
"describing",
"the",
"rules",
"on",
"this",
"list",
"entry"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatListEntry.php#L306-L357 |
33,617 | silverorange/swat | Swat/SwatListEntry.php | SwatListEntry.splitValues | protected function splitValues($value)
{
$delimiter = preg_quote($this->delimiter, '/');
if ($this->trim_whitespace) {
$expression = '/\s*' . $delimiter . '\s*/u';
} else {
$expression = '/' . $delimiter . '/u';
}
return preg_split($expression, $valu... | php | protected function splitValues($value)
{
$delimiter = preg_quote($this->delimiter, '/');
if ($this->trim_whitespace) {
$expression = '/\s*' . $delimiter . '\s*/u';
} else {
$expression = '/' . $delimiter . '/u';
}
return preg_split($expression, $valu... | [
"protected",
"function",
"splitValues",
"(",
"$",
"value",
")",
"{",
"$",
"delimiter",
"=",
"preg_quote",
"(",
"$",
"this",
"->",
"delimiter",
",",
"'/'",
")",
";",
"if",
"(",
"$",
"this",
"->",
"trim_whitespace",
")",
"{",
"$",
"expression",
"=",
"'/\... | Splits a value string with entries separated by delimiters into
an array
If {@link SwatListEntry::$trim_whitespace} is set to true, whitespace
is not included in the split values.
@param string $value the string to split.
@return array the string of delimiter separated values split into an
array of values. | [
"Splits",
"a",
"value",
"string",
"with",
"entries",
"separated",
"by",
"delimiters",
"into",
"an",
"array"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatListEntry.php#L374-L385 |
33,618 | silverorange/swat | Swat/SwatHtmlTag.php | SwatHtmlTag.addAttributes | public function addAttributes($attributes)
{
if (is_array($attributes)) {
$this->attributes = array_merge($this->attributes, $attributes);
}
} | php | public function addAttributes($attributes)
{
if (is_array($attributes)) {
$this->attributes = array_merge($this->attributes, $attributes);
}
} | [
"public",
"function",
"addAttributes",
"(",
"$",
"attributes",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"attributes",
")",
")",
"{",
"$",
"this",
"->",
"attributes",
"=",
"array_merge",
"(",
"$",
"this",
"->",
"attributes",
",",
"$",
"attributes",
")",... | Adds an array of attributes to this XHTML tag
If entries in the attributes array coincide with existing attributes of
this XHTML tag, the attributes in the array overwrite the existing
attributes.
@param array an array of attribute-value pairs of the form
'attribute' => 'value'. | [
"Adds",
"an",
"array",
"of",
"attributes",
"to",
"this",
"XHTML",
"tag"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatHtmlTag.php#L103-L108 |
33,619 | silverorange/swat | Swat/SwatHtmlTag.php | SwatHtmlTag.display | public function display()
{
if ($this->content === null) {
$this->openInternal(true);
} else {
$this->openInternal(false);
$this->displayContent();
$this->close();
}
} | php | public function display()
{
if ($this->content === null) {
$this->openInternal(true);
} else {
$this->openInternal(false);
$this->displayContent();
$this->close();
}
} | [
"public",
"function",
"display",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"content",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"openInternal",
"(",
"true",
")",
";",
"}",
"else",
"{",
"$",
"this",
"->",
"openInternal",
"(",
"false",
")",
";",... | Displays this tag
Output the opening tag including all its attributes and implicitly
close the tag. If explicit closing is desired, use
{@link SwatHtmlTag::open()} and {@link SwatHtmlTag::close()} instead.
If {@link SwatHtmlTag::content} is set then the content is displayed
between an opening and closing tag, otherwis... | [
"Displays",
"this",
"tag"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatHtmlTag.php#L141-L150 |
33,620 | silverorange/swat | Swat/SwatHtmlTag.php | SwatHtmlTag.displayContent | public function displayContent()
{
if ($this->content !== null) {
if ($this->content_type === 'text/plain') {
echo SwatString::minimizeEntities($this->content);
} else {
echo $this->content;
}
}
} | php | public function displayContent()
{
if ($this->content !== null) {
if ($this->content_type === 'text/plain') {
echo SwatString::minimizeEntities($this->content);
} else {
echo $this->content;
}
}
} | [
"public",
"function",
"displayContent",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"content",
"!==",
"null",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"content_type",
"===",
"'text/plain'",
")",
"{",
"echo",
"SwatString",
"::",
"minimizeEntities",
"(",
"... | Displays the content of this tag
If {@link SwatHtmlTag::content} is set then the content is displayed.
@see SwatHtmlTag::display() | [
"Displays",
"the",
"content",
"of",
"this",
"tag"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatHtmlTag.php#L162-L171 |
33,621 | silverorange/swat | Swat/SwatHtmlTag.php | SwatHtmlTag.openInternal | private function openInternal($self_closing = false)
{
echo '<', $this->tag_name;
foreach ($this->attributes as $attribute => $value) {
if ($value !== null) {
echo ' ',
$attribute,
'="',
SwatString::minimizeEnti... | php | private function openInternal($self_closing = false)
{
echo '<', $this->tag_name;
foreach ($this->attributes as $attribute => $value) {
if ($value !== null) {
echo ' ',
$attribute,
'="',
SwatString::minimizeEnti... | [
"private",
"function",
"openInternal",
"(",
"$",
"self_closing",
"=",
"false",
")",
"{",
"echo",
"'<'",
",",
"$",
"this",
"->",
"tag_name",
";",
"foreach",
"(",
"$",
"this",
"->",
"attributes",
"as",
"$",
"attribute",
"=>",
"$",
"value",
")",
"{",
"if"... | Outputs opening tag and all attributes
This is a helper method that does the attribute displaying when opening
this tag. This method can also display self-closing XHTML tags.
@param boolean $self_closing whether this tag should be displayed as a
self-closing tag. | [
"Outputs",
"opening",
"tag",
"and",
"all",
"attributes"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatHtmlTag.php#L309-L328 |
33,622 | rollun-com/rollun-datastore | src/DataStore/src/DataStore/DataStoreAbstract.php | DataStoreAbstract.getKeys | protected function getKeys()
{
$identifier = $this->getIdentifier();
$query = new Query();
$selectNode = new Node\SelectNode([$identifier]);
$query->setSelect($selectNode);
$queryResult = $this->query($query);
$keysArray = [];
foreach ($queryResult as $row) ... | php | protected function getKeys()
{
$identifier = $this->getIdentifier();
$query = new Query();
$selectNode = new Node\SelectNode([$identifier]);
$query->setSelect($selectNode);
$queryResult = $this->query($query);
$keysArray = [];
foreach ($queryResult as $row) ... | [
"protected",
"function",
"getKeys",
"(",
")",
"{",
"$",
"identifier",
"=",
"$",
"this",
"->",
"getIdentifier",
"(",
")",
";",
"$",
"query",
"=",
"new",
"Query",
"(",
")",
";",
"$",
"selectNode",
"=",
"new",
"Node",
"\\",
"SelectNode",
"(",
"[",
"$",
... | Return array of keys or empty array
@return array | [
"Return",
"array",
"of",
"keys",
"or",
"empty",
"array"
] | ef433b58b94e1c311123ad1b2a0360e95a636bd1 | https://github.com/rollun-com/rollun-datastore/blob/ef433b58b94e1c311123ad1b2a0360e95a636bd1/src/DataStore/src/DataStore/DataStoreAbstract.php#L494-L509 |
33,623 | silverorange/swat | Swat/SwatHtmlHeadEntrySet.php | SwatHtmlHeadEntrySet.addEntry | public function addEntry($entry)
{
if (is_string($entry)) {
$class = $this->getClassFromType($entry);
if ($class === null) {
throw new SwatClassNotFoundException(
'SwatHtmlHeadEntry class not found for entry string of "' .
... | php | public function addEntry($entry)
{
if (is_string($entry)) {
$class = $this->getClassFromType($entry);
if ($class === null) {
throw new SwatClassNotFoundException(
'SwatHtmlHeadEntry class not found for entry string of "' .
... | [
"public",
"function",
"addEntry",
"(",
"$",
"entry",
")",
"{",
"if",
"(",
"is_string",
"(",
"$",
"entry",
")",
")",
"{",
"$",
"class",
"=",
"$",
"this",
"->",
"getClassFromType",
"(",
"$",
"entry",
")",
";",
"if",
"(",
"$",
"class",
"===",
"null",
... | Adds a HTML head entry to this set
@param SwatHtmlHeadEntry|string $entry the entry to add. | [
"Adds",
"a",
"HTML",
"head",
"entry",
"to",
"this",
"set"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatHtmlHeadEntrySet.php#L62-L91 |
33,624 | silverorange/swat | Swat/SwatHtmlHeadEntrySet.php | SwatHtmlHeadEntrySet.addEntrySet | public function addEntrySet(SwatHtmlHeadEntrySet $set)
{
$this->entries = array_merge($this->entries, $set->entries);
} | php | public function addEntrySet(SwatHtmlHeadEntrySet $set)
{
$this->entries = array_merge($this->entries, $set->entries);
} | [
"public",
"function",
"addEntrySet",
"(",
"SwatHtmlHeadEntrySet",
"$",
"set",
")",
"{",
"$",
"this",
"->",
"entries",
"=",
"array_merge",
"(",
"$",
"this",
"->",
"entries",
",",
"$",
"set",
"->",
"entries",
")",
";",
"}"
] | Adds a set of HTML head entries to this set
@param SwatHtmlHeadEntrySet $set the set to add. | [
"Adds",
"a",
"set",
"of",
"HTML",
"head",
"entries",
"to",
"this",
"set"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatHtmlHeadEntrySet.php#L101-L104 |
33,625 | silverorange/swat | Swat/SwatHtmlHeadEntrySet.php | SwatHtmlHeadEntrySet.getByType | public function getByType($type)
{
$class = __CLASS__;
$set = new $class();
foreach ($this->entries as $entry) {
if ($entry->getType() === $type) {
$set->addEntry($entry);
}
}
return $set;
} | php | public function getByType($type)
{
$class = __CLASS__;
$set = new $class();
foreach ($this->entries as $entry) {
if ($entry->getType() === $type) {
$set->addEntry($entry);
}
}
return $set;
} | [
"public",
"function",
"getByType",
"(",
"$",
"type",
")",
"{",
"$",
"class",
"=",
"__CLASS__",
";",
"$",
"set",
"=",
"new",
"$",
"class",
"(",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"entries",
"as",
"$",
"entry",
")",
"{",
"if",
"(",
"$",
... | Gets a subset of this set by the entry type
@param string $type the type of HTML head entry to get. For example,
'SwatJavaScriptHtmlHeadEntry'.
@return SwatHtmlHeadEntrySet a subset of this set containing only
entries of the specified type. If no such
entries exist, an empty set is returned. | [
"Gets",
"a",
"subset",
"of",
"this",
"set",
"by",
"the",
"entry",
"type"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatHtmlHeadEntrySet.php#L189-L199 |
33,626 | brainworxx/kreXX | src/Analyse/Callback/Iterate/ThroughMethodAnalysis.php | ThroughMethodAnalysis.callMe | public function callMe()
{
$output = $this->dispatchStartEvent();
foreach ($this->parameters[static::PARAM_DATA] as $key => $string) {
/** @var Model $model */
$model = $this->pool->createClass('Brainworxx\\Krexx\\Analyse\\Model')
->setData($string)
... | php | public function callMe()
{
$output = $this->dispatchStartEvent();
foreach ($this->parameters[static::PARAM_DATA] as $key => $string) {
/** @var Model $model */
$model = $this->pool->createClass('Brainworxx\\Krexx\\Analyse\\Model')
->setData($string)
... | [
"public",
"function",
"callMe",
"(",
")",
"{",
"$",
"output",
"=",
"$",
"this",
"->",
"dispatchStartEvent",
"(",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"parameters",
"[",
"static",
"::",
"PARAM_DATA",
"]",
"as",
"$",
"key",
"=>",
"$",
"string",
... | Renders the info of a single method.
@return string
The generated markup. | [
"Renders",
"the",
"info",
"of",
"a",
"single",
"method",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Analyse/Callback/Iterate/ThroughMethodAnalysis.php#L61-L88 |
33,627 | brainworxx/kreXX | src/Service/Config/From/Ini.php | Ini.loadIniFile | public function loadIniFile($path)
{
$this->iniSettings = (array)parse_ini_string(
$this->pool->fileService->getFileContents($path, false),
true
);
return $this;
} | php | public function loadIniFile($path)
{
$this->iniSettings = (array)parse_ini_string(
$this->pool->fileService->getFileContents($path, false),
true
);
return $this;
} | [
"public",
"function",
"loadIniFile",
"(",
"$",
"path",
")",
"{",
"$",
"this",
"->",
"iniSettings",
"=",
"(",
"array",
")",
"parse_ini_string",
"(",
"$",
"this",
"->",
"pool",
"->",
"fileService",
"->",
"getFileContents",
"(",
"$",
"path",
",",
"false",
"... | Setter for the ini path.
@param string $path
The path to the ini file.
@return $this
Return $this, for chaining. | [
"Setter",
"for",
"the",
"ini",
"path",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Service/Config/From/Ini.php#L82-L91 |
33,628 | brainworxx/kreXX | src/Service/Config/From/Ini.php | Ini.getFeConfig | public function getFeConfig($name)
{
// Load it from the file.
$filevalue = $this->getFeConfigFromFile($name);
// Do we have a value?
if (empty($filevalue) === true) {
// Fallback to factory settings.
if (isset($this->feConfigFallback[$name]) === true) {
... | php | public function getFeConfig($name)
{
// Load it from the file.
$filevalue = $this->getFeConfigFromFile($name);
// Do we have a value?
if (empty($filevalue) === true) {
// Fallback to factory settings.
if (isset($this->feConfigFallback[$name]) === true) {
... | [
"public",
"function",
"getFeConfig",
"(",
"$",
"name",
")",
"{",
"// Load it from the file.",
"$",
"filevalue",
"=",
"$",
"this",
"->",
"getFeConfigFromFile",
"(",
"$",
"name",
")",
";",
"// Do we have a value?",
"if",
"(",
"empty",
"(",
"$",
"filevalue",
")",... | Get the configuration of the frontend config form.
@param string $name
The parameter name you want to render.
@return array
The configuration (is it editable, a dropdown, a textfield, ...) | [
"Get",
"the",
"configuration",
"of",
"the",
"frontend",
"config",
"form",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Service/Config/From/Ini.php#L102-L125 |
33,629 | brainworxx/kreXX | src/Service/Config/From/Ini.php | Ini.getFeConfigFromFile | public function getFeConfigFromFile($parameterName)
{
// Get the human readable stuff from the ini file.
$value = $this->getConfigFromFile('feEditing', $parameterName);
if (empty($value) === true) {
// Sorry, no value stored.
return null;
}
// Get th... | php | public function getFeConfigFromFile($parameterName)
{
// Get the human readable stuff from the ini file.
$value = $this->getConfigFromFile('feEditing', $parameterName);
if (empty($value) === true) {
// Sorry, no value stored.
return null;
}
// Get th... | [
"public",
"function",
"getFeConfigFromFile",
"(",
"$",
"parameterName",
")",
"{",
"// Get the human readable stuff from the ini file.",
"$",
"value",
"=",
"$",
"this",
"->",
"getConfigFromFile",
"(",
"'feEditing'",
",",
"$",
"parameterName",
")",
";",
"if",
"(",
"em... | Get the config of the frontend config form from the file.
@param string $parameterName
The parameter you want to render.
@return array|null
The configuration (is it editable, a dropdown, a textfield, ...) | [
"Get",
"the",
"config",
"of",
"the",
"frontend",
"config",
"form",
"from",
"the",
"file",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Service/Config/From/Ini.php#L136-L176 |
33,630 | brainworxx/kreXX | src/Service/Config/From/Ini.php | Ini.getConfigFromFile | public function getConfigFromFile($group, $name)
{
// Do we have a value in the ini?
// Does it validate?
if (isset($this->iniSettings[$group][$name]) === true &&
$this->security->evaluateSetting($group, $name, $this->iniSettings[$group][$name]) === true
) {
r... | php | public function getConfigFromFile($group, $name)
{
// Do we have a value in the ini?
// Does it validate?
if (isset($this->iniSettings[$group][$name]) === true &&
$this->security->evaluateSetting($group, $name, $this->iniSettings[$group][$name]) === true
) {
r... | [
"public",
"function",
"getConfigFromFile",
"(",
"$",
"group",
",",
"$",
"name",
")",
"{",
"// Do we have a value in the ini?",
"// Does it validate?",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"iniSettings",
"[",
"$",
"group",
"]",
"[",
"$",
"name",
"]",
"... | Returns settings from the ini file.
@param string $group
The group name inside of the ini.
@param string $name
The name of the setting.
@return string
The value from the file. | [
"Returns",
"settings",
"from",
"the",
"ini",
"file",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Service/Config/From/Ini.php#L189-L200 |
33,631 | rollun-com/rollun-datastore | src/DataStore/src/DataStore/ConditionBuilder/ConditionBuilderAbstract.php | ConditionBuilderAbstract.makeAbstractQueryOperator | public function makeAbstractQueryOperator(AbstractQueryNode $queryNode)
{
switch (true) {
case ($queryNode instanceof AbstractScalarOperatorNode):
return $this->makeScalarOperator($queryNode);
case ($queryNode instanceof AbstractLogicOperatorNode):
ret... | php | public function makeAbstractQueryOperator(AbstractQueryNode $queryNode)
{
switch (true) {
case ($queryNode instanceof AbstractScalarOperatorNode):
return $this->makeScalarOperator($queryNode);
case ($queryNode instanceof AbstractLogicOperatorNode):
ret... | [
"public",
"function",
"makeAbstractQueryOperator",
"(",
"AbstractQueryNode",
"$",
"queryNode",
")",
"{",
"switch",
"(",
"true",
")",
"{",
"case",
"(",
"$",
"queryNode",
"instanceof",
"AbstractScalarOperatorNode",
")",
":",
"return",
"$",
"this",
"->",
"makeScalarO... | Make string with conditions for not null Query
@param AbstractQueryNode $queryNode
@return string
@throws DataStoreException | [
"Make",
"string",
"with",
"conditions",
"for",
"not",
"null",
"Query"
] | ef433b58b94e1c311123ad1b2a0360e95a636bd1 | https://github.com/rollun-com/rollun-datastore/blob/ef433b58b94e1c311123ad1b2a0360e95a636bd1/src/DataStore/src/DataStore/ConditionBuilder/ConditionBuilderAbstract.php#L65-L79 |
33,632 | rollun-com/rollun-datastore | src/DataStore/src/DataStore/ConditionBuilder/ConditionBuilderAbstract.php | ConditionBuilderAbstract.makeBinaryOperator | public function makeBinaryOperator(BinaryOperatorNodeAbstract $node)
{
$nodeName = $node->getNodeName();
if (!isset($this->literals['BinaryOperator'][$nodeName])) {
throw new DataStoreException(
'The Binary Operator not supported: ' . $nodeName
);
}
... | php | public function makeBinaryOperator(BinaryOperatorNodeAbstract $node)
{
$nodeName = $node->getNodeName();
if (!isset($this->literals['BinaryOperator'][$nodeName])) {
throw new DataStoreException(
'The Binary Operator not supported: ' . $nodeName
);
}
... | [
"public",
"function",
"makeBinaryOperator",
"(",
"BinaryOperatorNodeAbstract",
"$",
"node",
")",
"{",
"$",
"nodeName",
"=",
"$",
"node",
"->",
"getNodeName",
"(",
")",
";",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"literals",
"[",
"'BinaryOperator'",... | Make string with conditions for binary operators
@param BinaryOperatorNodeAbstract $node
@return string | [
"Make",
"string",
"with",
"conditions",
"for",
"binary",
"operators"
] | ef433b58b94e1c311123ad1b2a0360e95a636bd1 | https://github.com/rollun-com/rollun-datastore/blob/ef433b58b94e1c311123ad1b2a0360e95a636bd1/src/DataStore/src/DataStore/ConditionBuilder/ConditionBuilderAbstract.php#L87-L102 |
33,633 | rollun-com/rollun-datastore | src/DataStore/src/DataStore/ConditionBuilder/ConditionBuilderAbstract.php | ConditionBuilderAbstract.getValueFromGlob | public function getValueFromGlob(Glob $globNode)
{
$reflection = new \ReflectionClass($globNode);
$globProperty = $reflection->getProperty('glob');
$globProperty->setAccessible(true);
$glob = $globProperty->getValue($globNode);
$globProperty->setAccessible(false);
re... | php | public function getValueFromGlob(Glob $globNode)
{
$reflection = new \ReflectionClass($globNode);
$globProperty = $reflection->getProperty('glob');
$globProperty->setAccessible(true);
$glob = $globProperty->getValue($globNode);
$globProperty->setAccessible(false);
re... | [
"public",
"function",
"getValueFromGlob",
"(",
"Glob",
"$",
"globNode",
")",
"{",
"$",
"reflection",
"=",
"new",
"\\",
"ReflectionClass",
"(",
"$",
"globNode",
")",
";",
"$",
"globProperty",
"=",
"$",
"reflection",
"->",
"getProperty",
"(",
"'glob'",
")",
... | Return value from Glob
I have no idea why, but Xiag\Rql\Parser\DataType\Glob
have not method getValue(). We fix it/
@see Glob
@param Glob $globNode
@return string | [
"Return",
"value",
"from",
"Glob"
] | ef433b58b94e1c311123ad1b2a0360e95a636bd1 | https://github.com/rollun-com/rollun-datastore/blob/ef433b58b94e1c311123ad1b2a0360e95a636bd1/src/DataStore/src/DataStore/ConditionBuilder/ConditionBuilderAbstract.php#L173-L182 |
33,634 | rollun-com/rollun-datastore | src/DataStore/src/DataStore/ConditionBuilder/ConditionBuilderAbstract.php | ConditionBuilderAbstract.makeLogicOperator | public function makeLogicOperator(AbstractLogicOperatorNode $node)
{
$nodeName = $node->getNodeName();
if (!isset($this->literals['LogicOperator'][$nodeName])) {
throw new DataStoreException(
'The Logic Operator not supported: ' . $nodeName
);
}
... | php | public function makeLogicOperator(AbstractLogicOperatorNode $node)
{
$nodeName = $node->getNodeName();
if (!isset($this->literals['LogicOperator'][$nodeName])) {
throw new DataStoreException(
'The Logic Operator not supported: ' . $nodeName
);
}
... | [
"public",
"function",
"makeLogicOperator",
"(",
"AbstractLogicOperatorNode",
"$",
"node",
")",
"{",
"$",
"nodeName",
"=",
"$",
"node",
"->",
"getNodeName",
"(",
")",
";",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"literals",
"[",
"'LogicOperator'",
... | Make string with conditions for LogicOperatorNode
@param AbstractLogicOperatorNode $node
@return string
@throws DataStoreException | [
"Make",
"string",
"with",
"conditions",
"for",
"LogicOperatorNode"
] | ef433b58b94e1c311123ad1b2a0360e95a636bd1 | https://github.com/rollun-com/rollun-datastore/blob/ef433b58b94e1c311123ad1b2a0360e95a636bd1/src/DataStore/src/DataStore/ConditionBuilder/ConditionBuilderAbstract.php#L191-L214 |
33,635 | rollun-com/rollun-datastore | src/DataStore/src/DataStore/ConditionBuilder/ConditionBuilderAbstract.php | ConditionBuilderAbstract.makeArrayOperator | public function makeArrayOperator(AbstractArrayOperatorNode $node)
{
$nodeName = $node->getNodeName();
if (!isset($this->literals['ArrayOperator'][$nodeName])) {
throw new DataStoreException(
'The Array Operator not supported: ' . $nodeName
);
}
... | php | public function makeArrayOperator(AbstractArrayOperatorNode $node)
{
$nodeName = $node->getNodeName();
if (!isset($this->literals['ArrayOperator'][$nodeName])) {
throw new DataStoreException(
'The Array Operator not supported: ' . $nodeName
);
}
... | [
"public",
"function",
"makeArrayOperator",
"(",
"AbstractArrayOperatorNode",
"$",
"node",
")",
"{",
"$",
"nodeName",
"=",
"$",
"node",
"->",
"getNodeName",
"(",
")",
";",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"literals",
"[",
"'ArrayOperator'",
... | Make string with conditions for ArrayOperatorNode
@param AbstractArrayOperatorNode $node
@return string
@throws DataStoreException | [
"Make",
"string",
"with",
"conditions",
"for",
"ArrayOperatorNode"
] | ef433b58b94e1c311123ad1b2a0360e95a636bd1 | https://github.com/rollun-com/rollun-datastore/blob/ef433b58b94e1c311123ad1b2a0360e95a636bd1/src/DataStore/src/DataStore/ConditionBuilder/ConditionBuilderAbstract.php#L223-L248 |
33,636 | silverorange/swat | Swat/SwatToolLink.php | SwatToolLink.display | public function display()
{
if (!$this->visible) {
return;
}
parent::display();
$tag = $this->isSensitive()
? $this->getSensitiveTag()
: $this->getInsensitiveTag();
$tag->open();
$icon_span = new SwatHtmlTag('span');
if... | php | public function display()
{
if (!$this->visible) {
return;
}
parent::display();
$tag = $this->isSensitive()
? $this->getSensitiveTag()
: $this->getInsensitiveTag();
$tag->open();
$icon_span = new SwatHtmlTag('span');
if... | [
"public",
"function",
"display",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"visible",
")",
"{",
"return",
";",
"}",
"parent",
"::",
"display",
"(",
")",
";",
"$",
"tag",
"=",
"$",
"this",
"->",
"isSensitive",
"(",
")",
"?",
"$",
"this",
... | Displays this tool link | [
"Displays",
"this",
"tool",
"link"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatToolLink.php#L148-L181 |
33,637 | silverorange/swat | Swat/SwatToolLink.php | SwatToolLink.setFromStock | public function setFromStock($stock_id, $overwrite_properties = true)
{
switch ($stock_id) {
case 'create':
$title = Swat::_('Create');
$class = 'swat-tool-link-create';
break;
case 'add':
$title = Swat::_('Add');
... | php | public function setFromStock($stock_id, $overwrite_properties = true)
{
switch ($stock_id) {
case 'create':
$title = Swat::_('Create');
$class = 'swat-tool-link-create';
break;
case 'add':
$title = Swat::_('Add');
... | [
"public",
"function",
"setFromStock",
"(",
"$",
"stock_id",
",",
"$",
"overwrite_properties",
"=",
"true",
")",
"{",
"switch",
"(",
"$",
"stock_id",
")",
"{",
"case",
"'create'",
":",
"$",
"title",
"=",
"Swat",
"::",
"_",
"(",
"'Create'",
")",
";",
"$"... | Sets the values of this tool link to a stock type
Valid stock type ids are:
- create
- add
- edit
- delete
- cancel
- preview
- change-order
- help
- print
- email
@param string $stock_id the identifier of the stock type to use.
@param boolean $overwrite_properties whether to overwrite properties if
they are already... | [
"Sets",
"the",
"values",
"of",
"this",
"tool",
"link",
"to",
"a",
"stock",
"type"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatToolLink.php#L208-L279 |
33,638 | silverorange/swat | Swat/SwatToolLink.php | SwatToolLink.getCSSClassNames | protected function getCSSClassNames()
{
$classes = array('swat-tool-link');
if (!$this->isSensitive()) {
$classes[] = 'swat-tool-link-insensitive';
}
if ($this->stock_class !== null) {
$classes[] = $this->stock_class;
}
$classes = array_merg... | php | protected function getCSSClassNames()
{
$classes = array('swat-tool-link');
if (!$this->isSensitive()) {
$classes[] = 'swat-tool-link-insensitive';
}
if ($this->stock_class !== null) {
$classes[] = $this->stock_class;
}
$classes = array_merg... | [
"protected",
"function",
"getCSSClassNames",
"(",
")",
"{",
"$",
"classes",
"=",
"array",
"(",
"'swat-tool-link'",
")",
";",
"if",
"(",
"!",
"$",
"this",
"->",
"isSensitive",
"(",
")",
")",
"{",
"$",
"classes",
"[",
"]",
"=",
"'swat-tool-link-insensitive'"... | Gets the array of CSS classes that are applied to this tool link
@return array the array of CSS classes that are applied to this tool
link. | [
"Gets",
"the",
"array",
"of",
"CSS",
"classes",
"that",
"are",
"applied",
"to",
"this",
"tool",
"link"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatToolLink.php#L290-L305 |
33,639 | silverorange/swat | Swat/SwatToolLink.php | SwatToolLink.getSensitiveTag | protected function getSensitiveTag()
{
$tag = new SwatHtmlTag('a');
$tag->id = $this->id;
$tag->class = $this->getCSSClassString();
if ($this->target !== null) {
$tag->target = $this->target;
}
if ($this->value === null) {
$tag->href = $this... | php | protected function getSensitiveTag()
{
$tag = new SwatHtmlTag('a');
$tag->id = $this->id;
$tag->class = $this->getCSSClassString();
if ($this->target !== null) {
$tag->target = $this->target;
}
if ($this->value === null) {
$tag->href = $this... | [
"protected",
"function",
"getSensitiveTag",
"(",
")",
"{",
"$",
"tag",
"=",
"new",
"SwatHtmlTag",
"(",
"'a'",
")",
";",
"$",
"tag",
"->",
"id",
"=",
"$",
"this",
"->",
"id",
";",
"$",
"tag",
"->",
"class",
"=",
"$",
"this",
"->",
"getCSSClassString",... | Gets the tag used to display this tool link when it is sensitive
@return SwatHtmlTag the tag used to display this tool link when it is
sensitive. | [
"Gets",
"the",
"tag",
"used",
"to",
"display",
"this",
"tool",
"link",
"when",
"it",
"is",
"sensitive"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatToolLink.php#L316-L342 |
33,640 | silverorange/swat | Swat/SwatToolLink.php | SwatToolLink.getInsensitiveTag | protected function getInsensitiveTag()
{
$tag = new SwatHtmlTag('span');
$tag->id = $this->id;
$tag->class = $this->getCSSClassString();
if ($this->tooltip !== null) {
$tag->title = $this->tooltip;
}
return $tag;
} | php | protected function getInsensitiveTag()
{
$tag = new SwatHtmlTag('span');
$tag->id = $this->id;
$tag->class = $this->getCSSClassString();
if ($this->tooltip !== null) {
$tag->title = $this->tooltip;
}
return $tag;
} | [
"protected",
"function",
"getInsensitiveTag",
"(",
")",
"{",
"$",
"tag",
"=",
"new",
"SwatHtmlTag",
"(",
"'span'",
")",
";",
"$",
"tag",
"->",
"id",
"=",
"$",
"this",
"->",
"id",
";",
"$",
"tag",
"->",
"class",
"=",
"$",
"this",
"->",
"getCSSClassStr... | Gets the tag used to display this tool link when it is not sensitive
@return SwatHtmlTag the tag used to display this tool link when it is
not sensitive. | [
"Gets",
"the",
"tag",
"used",
"to",
"display",
"this",
"tool",
"link",
"when",
"it",
"is",
"not",
"sensitive"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatToolLink.php#L353-L365 |
33,641 | silverorange/swat | Swat/SwatNullTextCellRenderer.php | SwatNullTextCellRenderer.render | public function render()
{
if (!$this->visible) {
return;
}
$is_null = $this->strict ? $this->text === null : $this->text == null;
if ($is_null) {
$this->text = $this->null_text;
echo '<span class="swat-null-text-cell-renderer">';
pa... | php | public function render()
{
if (!$this->visible) {
return;
}
$is_null = $this->strict ? $this->text === null : $this->text == null;
if ($is_null) {
$this->text = $this->null_text;
echo '<span class="swat-null-text-cell-renderer">';
pa... | [
"public",
"function",
"render",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"visible",
")",
"{",
"return",
";",
"}",
"$",
"is_null",
"=",
"$",
"this",
"->",
"strict",
"?",
"$",
"this",
"->",
"text",
"===",
"null",
":",
"$",
"this",
"->",
... | Renders this cell renderer | [
"Renders",
"this",
"cell",
"renderer"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatNullTextCellRenderer.php#L53-L73 |
33,642 | silverorange/swat | Swat/SwatActionItem.php | SwatActionItem.setWidget | public function setWidget(SwatWidget $widget)
{
if ($this->widget !== null) {
throw new SwatException(
'SwatUI: Only one widget can be nested ' .
'within a SwatActionItem'
);
}
$this->widget = $widget;
$widget->parent = $th... | php | public function setWidget(SwatWidget $widget)
{
if ($this->widget !== null) {
throw new SwatException(
'SwatUI: Only one widget can be nested ' .
'within a SwatActionItem'
);
}
$this->widget = $widget;
$widget->parent = $th... | [
"public",
"function",
"setWidget",
"(",
"SwatWidget",
"$",
"widget",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"widget",
"!==",
"null",
")",
"{",
"throw",
"new",
"SwatException",
"(",
"'SwatUI: Only one widget can be nested '",
".",
"'within a SwatActionItem'",
")",... | Sets the widget to use for this item
Each SwatActionItem can have one associated SwatWidget. This method
sets the widget for this item.
@param SwatWidget $widget the widget associated with this action.
@throws SwatException | [
"Sets",
"the",
"widget",
"to",
"use",
"for",
"this",
"item"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatActionItem.php#L87-L98 |
33,643 | silverorange/swat | Swat/SwatRadioNoteBook.php | SwatRadioNoteBook.getPage | public function getPage($id)
{
$found_page = null;
foreach ($this->pages as $page) {
if ($page->id == $id) {
$found_page = $page;
break;
}
}
return $found_page;
} | php | public function getPage($id)
{
$found_page = null;
foreach ($this->pages as $page) {
if ($page->id == $id) {
$found_page = $page;
break;
}
}
return $found_page;
} | [
"public",
"function",
"getPage",
"(",
"$",
"id",
")",
"{",
"$",
"found_page",
"=",
"null",
";",
"foreach",
"(",
"$",
"this",
"->",
"pages",
"as",
"$",
"page",
")",
"{",
"if",
"(",
"$",
"page",
"->",
"id",
"==",
"$",
"id",
")",
"{",
"$",
"found_... | Gets a page in this notebook
Retrieves a page from the list of pages in this notebook based on
the unique identifier of the page.
@param string $id the unique id of the page to look for.
@return SwatNoteBookPage the found page or null if not found. | [
"Gets",
"a",
"page",
"in",
"this",
"notebook"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatRadioNoteBook.php#L132-L144 |
33,644 | silverorange/swat | Swat/SwatRadioNoteBook.php | SwatRadioNoteBook.init | public function init()
{
parent::init();
foreach ($this->children as $child) {
$child->init();
foreach ($child->getPages() as $page) {
$this->addPage($page);
}
}
foreach ($this->pages as $page) {
$page->init();
... | php | public function init()
{
parent::init();
foreach ($this->children as $child) {
$child->init();
foreach ($child->getPages() as $page) {
$this->addPage($page);
}
}
foreach ($this->pages as $page) {
$page->init();
... | [
"public",
"function",
"init",
"(",
")",
"{",
"parent",
"::",
"init",
"(",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"children",
"as",
"$",
"child",
")",
"{",
"$",
"child",
"->",
"init",
"(",
")",
";",
"foreach",
"(",
"$",
"child",
"->",
"getPa... | Initializes this notebook | [
"Initializes",
"this",
"notebook"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatRadioNoteBook.php#L152-L166 |
33,645 | silverorange/swat | Swat/SwatRadioNoteBook.php | SwatRadioNoteBook.process | public function process()
{
parent::process();
if (!$this->processValue()) {
return;
}
if (
$this->required &&
$this->isSensitive() &&
$this->selected_page == ''
) {
$this->addMessage($this->getValidationMessage('r... | php | public function process()
{
parent::process();
if (!$this->processValue()) {
return;
}
if (
$this->required &&
$this->isSensitive() &&
$this->selected_page == ''
) {
$this->addMessage($this->getValidationMessage('r... | [
"public",
"function",
"process",
"(",
")",
"{",
"parent",
"::",
"process",
"(",
")",
";",
"if",
"(",
"!",
"$",
"this",
"->",
"processValue",
"(",
")",
")",
"{",
"return",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"required",
"&&",
"$",
"this",
"->"... | Processes this notebook | [
"Processes",
"this",
"notebook"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatRadioNoteBook.php#L174-L195 |
33,646 | silverorange/swat | Swat/SwatRadioNoteBook.php | SwatRadioNoteBook.getMessages | public function getMessages()
{
$messages = parent::getMessages();
foreach ($this->pages as $page) {
$messages = array_merge($messages, $page->getMessages());
}
return $messages;
} | php | public function getMessages()
{
$messages = parent::getMessages();
foreach ($this->pages as $page) {
$messages = array_merge($messages, $page->getMessages());
}
return $messages;
} | [
"public",
"function",
"getMessages",
"(",
")",
"{",
"$",
"messages",
"=",
"parent",
"::",
"getMessages",
"(",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"pages",
"as",
"$",
"page",
")",
"{",
"$",
"messages",
"=",
"array_merge",
"(",
"$",
"messages",
... | Gets all messaages
Gathers all messages from pages of this notebook and from this notebook
itself.
@return array an array of {@link SwatMessage} objects.
@see SwatMessage | [
"Gets",
"all",
"messaages"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatRadioNoteBook.php#L276-L285 |
33,647 | silverorange/swat | Swat/SwatRadioNoteBook.php | SwatRadioNoteBook.processValue | public function processValue()
{
$form = $this->getForm();
if ($form->getHiddenField($this->id . '_submitted') === null) {
return false;
}
$data = &$form->getFormData();
if (isset($data[$this->id])) {
// get selected page id, strip off this id prefi... | php | public function processValue()
{
$form = $this->getForm();
if ($form->getHiddenField($this->id . '_submitted') === null) {
return false;
}
$data = &$form->getFormData();
if (isset($data[$this->id])) {
// get selected page id, strip off this id prefi... | [
"public",
"function",
"processValue",
"(",
")",
"{",
"$",
"form",
"=",
"$",
"this",
"->",
"getForm",
"(",
")",
";",
"if",
"(",
"$",
"form",
"->",
"getHiddenField",
"(",
"$",
"this",
"->",
"id",
".",
"'_submitted'",
")",
"===",
"null",
")",
"{",
"re... | Processes the value of this radio list from user-submitted form data
This method can be used to process the list value without processing
the selected page widget sub-tree.
@return boolean true if the value was processed from form data | [
"Processes",
"the",
"value",
"of",
"this",
"radio",
"list",
"from",
"user",
"-",
"submitted",
"form",
"data"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatRadioNoteBook.php#L524-L545 |
33,648 | silverorange/swat | Swat/SwatRadioNoteBook.php | SwatRadioNoteBook.displayPage | protected function displayPage(SwatNoteBookPage $page, $count = 0)
{
echo '<tr class="swat-radio-note-book-option-row">';
echo '<td>';
$radio = new SwatHtmlTag('input');
$radio->type = 'radio';
$radio->name = $this->id;
$radio->id = $this->id . '_' . $page->id;
... | php | protected function displayPage(SwatNoteBookPage $page, $count = 0)
{
echo '<tr class="swat-radio-note-book-option-row">';
echo '<td>';
$radio = new SwatHtmlTag('input');
$radio->type = 'radio';
$radio->name = $this->id;
$radio->id = $this->id . '_' . $page->id;
... | [
"protected",
"function",
"displayPage",
"(",
"SwatNoteBookPage",
"$",
"page",
",",
"$",
"count",
"=",
"0",
")",
"{",
"echo",
"'<tr class=\"swat-radio-note-book-option-row\">'",
";",
"echo",
"'<td>'",
";",
"$",
"radio",
"=",
"new",
"SwatHtmlTag",
"(",
"'input'",
... | Displays an individual page in this radio notebook
@param SwatNoteBookPage $page the page to display
@param integer $count the ordinal idnex of the page being displayed
starting at 1. | [
"Displays",
"an",
"individual",
"page",
"in",
"this",
"radio",
"notebook"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatRadioNoteBook.php#L557-L605 |
33,649 | silverorange/swat | Swat/SwatRadioNoteBook.php | SwatRadioNoteBook.displaySinglePage | protected function displaySinglePage(SwatNoteBookPage $page)
{
$container = new SwatHtmlTag('div');
$container->id = $this->id;
$container->class = 'swat-radio-note-book';
$container->open();
$div = new SwatHtmlTag('div');
$div->class = 'swat-radio-note-book-page';
... | php | protected function displaySinglePage(SwatNoteBookPage $page)
{
$container = new SwatHtmlTag('div');
$container->id = $this->id;
$container->class = 'swat-radio-note-book';
$container->open();
$div = new SwatHtmlTag('div');
$div->class = 'swat-radio-note-book-page';
... | [
"protected",
"function",
"displaySinglePage",
"(",
"SwatNoteBookPage",
"$",
"page",
")",
"{",
"$",
"container",
"=",
"new",
"SwatHtmlTag",
"(",
"'div'",
")",
";",
"$",
"container",
"->",
"id",
"=",
"$",
"this",
"->",
"id",
";",
"$",
"container",
"->",
"c... | Displays the only page of this notebook if this notebook contains only
one page
@param SwatNoteBookPage $page the page to display. | [
"Displays",
"the",
"only",
"page",
"of",
"this",
"notebook",
"if",
"this",
"notebook",
"contains",
"only",
"one",
"page"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatRadioNoteBook.php#L616-L637 |
33,650 | honey-comb/core | src/Models/HCUser.php | HCUser.updateLastLogin | public function updateLastLogin(string $time = null): void
{
$this->timestamps = false;
$this->last_login = is_null($time) ? $this->freshTimestamp() : $time;
$this->save();
$this->updateLastActivity();
} | php | public function updateLastLogin(string $time = null): void
{
$this->timestamps = false;
$this->last_login = is_null($time) ? $this->freshTimestamp() : $time;
$this->save();
$this->updateLastActivity();
} | [
"public",
"function",
"updateLastLogin",
"(",
"string",
"$",
"time",
"=",
"null",
")",
":",
"void",
"{",
"$",
"this",
"->",
"timestamps",
"=",
"false",
";",
"$",
"this",
"->",
"last_login",
"=",
"is_null",
"(",
"$",
"time",
")",
"?",
"$",
"this",
"->... | Update last login timestamp
@param null|string $time
@throws \Exception | [
"Update",
"last",
"login",
"timestamp"
] | 5c12aba31cae092e9681f0ae3e3664ed3fcec956 | https://github.com/honey-comb/core/blob/5c12aba31cae092e9681f0ae3e3664ed3fcec956/src/Models/HCUser.php#L154-L161 |
33,651 | honey-comb/core | src/Models/HCUser.php | HCUser.updateLastActivity | public function updateLastActivity(string $time = null): void
{
$this->timestamps = false;
$this->last_activity = is_null($time) ? $this->freshTimestamp() : $time;
$this->save();
} | php | public function updateLastActivity(string $time = null): void
{
$this->timestamps = false;
$this->last_activity = is_null($time) ? $this->freshTimestamp() : $time;
$this->save();
} | [
"public",
"function",
"updateLastActivity",
"(",
"string",
"$",
"time",
"=",
"null",
")",
":",
"void",
"{",
"$",
"this",
"->",
"timestamps",
"=",
"false",
";",
"$",
"this",
"->",
"last_activity",
"=",
"is_null",
"(",
"$",
"time",
")",
"?",
"$",
"this",... | Update last activity timestamp
@param null|string $time
@throws \Exception | [
"Update",
"last",
"activity",
"timestamp"
] | 5c12aba31cae092e9681f0ae3e3664ed3fcec956 | https://github.com/honey-comb/core/blob/5c12aba31cae092e9681f0ae3e3664ed3fcec956/src/Models/HCUser.php#L169-L174 |
33,652 | silverorange/swat | Swat/SwatMoneyEntry.php | SwatMoneyEntry.display | public function display()
{
if (!$this->visible) {
return;
}
parent::display();
if ($this->display_currency) {
$locale = SwatI18NLocale::get($this->locale);
echo SwatString::minimizeEntities(
' ' . $locale->getInternationalCurrenc... | php | public function display()
{
if (!$this->visible) {
return;
}
parent::display();
if ($this->display_currency) {
$locale = SwatI18NLocale::get($this->locale);
echo SwatString::minimizeEntities(
' ' . $locale->getInternationalCurrenc... | [
"public",
"function",
"display",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"visible",
")",
"{",
"return",
";",
"}",
"parent",
"::",
"display",
"(",
")",
";",
"if",
"(",
"$",
"this",
"->",
"display_currency",
")",
"{",
"$",
"locale",
"=",
... | Displays this money entry widget
The widget is displayed as an input box and an optional currency symbol. | [
"Displays",
"this",
"money",
"entry",
"widget"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatMoneyEntry.php#L53-L67 |
33,653 | silverorange/swat | Swat/SwatMoneyEntry.php | SwatMoneyEntry.process | public function process()
{
parent::process();
if ($this->value === null) {
return;
}
$locale = SwatI18NLocale::get($this->locale);
$format = $locale->getNationalCurrencyFormat();
$max_decimal_places =
$this->decimal_places === null
... | php | public function process()
{
parent::process();
if ($this->value === null) {
return;
}
$locale = SwatI18NLocale::get($this->locale);
$format = $locale->getNationalCurrencyFormat();
$max_decimal_places =
$this->decimal_places === null
... | [
"public",
"function",
"process",
"(",
")",
"{",
"parent",
"::",
"process",
"(",
")",
";",
"if",
"(",
"$",
"this",
"->",
"value",
"===",
"null",
")",
"{",
"return",
";",
"}",
"$",
"locale",
"=",
"SwatI18NLocale",
"::",
"get",
"(",
"$",
"this",
"->",... | Processes this money entry widget
If the value of this widget is not a monetary value or the number of
fractional decimal places is not within the allowed range, an error
message is attached to this money entry widget. | [
"Processes",
"this",
"money",
"entry",
"widget"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatMoneyEntry.php#L79-L174 |
33,654 | silverorange/swat | Swat/SwatMoneyEntry.php | SwatMoneyEntry.getDisplayValue | protected function getDisplayValue($value)
{
// if the value is valid, format accordingly
if (!$this->hasMessage() && is_numeric($value)) {
$value = SwatI18NLocale::get($this->locale)->formatCurrency(
$value,
false,
array('fractional_digits... | php | protected function getDisplayValue($value)
{
// if the value is valid, format accordingly
if (!$this->hasMessage() && is_numeric($value)) {
$value = SwatI18NLocale::get($this->locale)->formatCurrency(
$value,
false,
array('fractional_digits... | [
"protected",
"function",
"getDisplayValue",
"(",
"$",
"value",
")",
"{",
"// if the value is valid, format accordingly",
"if",
"(",
"!",
"$",
"this",
"->",
"hasMessage",
"(",
")",
"&&",
"is_numeric",
"(",
"$",
"value",
")",
")",
"{",
"$",
"value",
"=",
"Swat... | Formats a monetary value to display
@param string $value the value to format for display.
@return string the formatted value. | [
"Formats",
"a",
"monetary",
"value",
"to",
"display"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatMoneyEntry.php#L186-L198 |
33,655 | silverorange/swat | Swat/SwatMoneyEntry.php | SwatMoneyEntry.getValidationMessage | protected function getValidationMessage($id)
{
switch ($id) {
case 'float':
$locale = SwatI18NLocale::get($this->locale);
$currency = $locale->getInternationalCurrencySymbol();
$example = $locale->formatCurrency(1036.95, false, array(
... | php | protected function getValidationMessage($id)
{
switch ($id) {
case 'float':
$locale = SwatI18NLocale::get($this->locale);
$currency = $locale->getInternationalCurrencySymbol();
$example = $locale->formatCurrency(1036.95, false, array(
... | [
"protected",
"function",
"getValidationMessage",
"(",
"$",
"id",
")",
"{",
"switch",
"(",
"$",
"id",
")",
"{",
"case",
"'float'",
":",
"$",
"locale",
"=",
"SwatI18NLocale",
"::",
"get",
"(",
"$",
"this",
"->",
"locale",
")",
";",
"$",
"currency",
"=",
... | Gets a validation message for this money entry widget
@see SwatEntry::getValidationMessage()
@param string $id the string identifier of the validation message.
@return SwatMessage the validation message. | [
"Gets",
"a",
"validation",
"message",
"for",
"this",
"money",
"entry",
"widget"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatMoneyEntry.php#L227-L279 |
33,656 | spiral/dumper | src/System.php | System.isColorsSupported | public static function isColorsSupported($stream = STDOUT): bool
{
if ('Hyper' === getenv('TERM_PROGRAM')) {
return true;
}
try {
if (\DIRECTORY_SEPARATOR === '\\') {
return (
function_exists('sapi_windows_vt100_support')
... | php | public static function isColorsSupported($stream = STDOUT): bool
{
if ('Hyper' === getenv('TERM_PROGRAM')) {
return true;
}
try {
if (\DIRECTORY_SEPARATOR === '\\') {
return (
function_exists('sapi_windows_vt100_support')
... | [
"public",
"static",
"function",
"isColorsSupported",
"(",
"$",
"stream",
"=",
"STDOUT",
")",
":",
"bool",
"{",
"if",
"(",
"'Hyper'",
"===",
"getenv",
"(",
"'TERM_PROGRAM'",
")",
")",
"{",
"return",
"true",
";",
"}",
"try",
"{",
"if",
"(",
"\\",
"DIRECT... | Returns true if the STDOUT supports colorization.
@codeCoverageIgnore
@link https://github.com/symfony/Console/blob/master/Output/StreamOutput.php#L94
@param mixed $stream
@return bool | [
"Returns",
"true",
"if",
"the",
"STDOUT",
"supports",
"colorization",
"."
] | 87bc579b0ecd69754197804b1fc5e0d5b3293bd3 | https://github.com/spiral/dumper/blob/87bc579b0ecd69754197804b1fc5e0d5b3293bd3/src/System.php#L45-L76 |
33,657 | brainworxx/kreXX | src/Service/Reflection/ReflectionClass.php | ReflectionClass.retrieveValue | public function retrieveValue(\ReflectionProperty $refProperty)
{
$propName = $refProperty->getName();
if (array_key_exists("\0*\0" . $propName, $this->objectArray)) {
// Protected or a private
return $this->objectArray["\0*\0" . $propName];
}
if (array_key_... | php | public function retrieveValue(\ReflectionProperty $refProperty)
{
$propName = $refProperty->getName();
if (array_key_exists("\0*\0" . $propName, $this->objectArray)) {
// Protected or a private
return $this->objectArray["\0*\0" . $propName];
}
if (array_key_... | [
"public",
"function",
"retrieveValue",
"(",
"\\",
"ReflectionProperty",
"$",
"refProperty",
")",
"{",
"$",
"propName",
"=",
"$",
"refProperty",
"->",
"getName",
"(",
")",
";",
"if",
"(",
"array_key_exists",
"(",
"\"\\0*\\0\"",
".",
"$",
"propName",
",",
"$",... | Retrieve the value from the object, if possible.
@param \ReflectionProperty $refProperty
The reflection of the property we are analysing.
@return mixed;
The retrieved value. | [
"Retrieve",
"the",
"value",
"from",
"the",
"object",
"if",
"possible",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Service/Reflection/ReflectionClass.php#L84-L117 |
33,658 | silverorange/swat | Swat/SwatError.php | SwatError.process | public function process()
{
if (ini_get('display_errors')) {
$this->display();
}
if (ini_get('log_errors')) {
$this->log();
}
if ($this->severity & self::$fatal_severity) {
exit(1);
}
} | php | public function process()
{
if (ini_get('display_errors')) {
$this->display();
}
if (ini_get('log_errors')) {
$this->log();
}
if ($this->severity & self::$fatal_severity) {
exit(1);
}
} | [
"public",
"function",
"process",
"(",
")",
"{",
"if",
"(",
"ini_get",
"(",
"'display_errors'",
")",
")",
"{",
"$",
"this",
"->",
"display",
"(",
")",
";",
"}",
"if",
"(",
"ini_get",
"(",
"'log_errors'",
")",
")",
"{",
"$",
"this",
"->",
"log",
"(",... | Processes this error
Processing involves displaying errors, logging errors and sending
error message emails.
If a fatal error has occured, this calls exit to ensure no further
processing is done. | [
"Processes",
"this",
"error"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatError.php#L202-L215 |
33,659 | silverorange/swat | Swat/SwatError.php | SwatError.log | public function log()
{
if (count(self::$loggers) === 0) {
error_log($this->getSummary(), 0);
} else {
foreach (self::$loggers as $logger) {
$logger->log($this);
}
}
} | php | public function log()
{
if (count(self::$loggers) === 0) {
error_log($this->getSummary(), 0);
} else {
foreach (self::$loggers as $logger) {
$logger->log($this);
}
}
} | [
"public",
"function",
"log",
"(",
")",
"{",
"if",
"(",
"count",
"(",
"self",
"::",
"$",
"loggers",
")",
"===",
"0",
")",
"{",
"error_log",
"(",
"$",
"this",
"->",
"getSummary",
"(",
")",
",",
"0",
")",
";",
"}",
"else",
"{",
"foreach",
"(",
"se... | Logs this error
The error is logged to the webserver error log. | [
"Logs",
"this",
"error"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatError.php#L277-L286 |
33,660 | silverorange/swat | Swat/SwatError.php | SwatError.getSummary | public function getSummary()
{
ob_start();
printf(
"%s error in file '%s' line %s",
$this->getSeverityString(),
$this->file,
$this->line
);
return ob_get_clean();
} | php | public function getSummary()
{
ob_start();
printf(
"%s error in file '%s' line %s",
$this->getSeverityString(),
$this->file,
$this->line
);
return ob_get_clean();
} | [
"public",
"function",
"getSummary",
"(",
")",
"{",
"ob_start",
"(",
")",
";",
"printf",
"(",
"\"%s error in file '%s' line %s\"",
",",
"$",
"this",
"->",
"getSeverityString",
"(",
")",
",",
"$",
"this",
"->",
"file",
",",
"$",
"this",
"->",
"line",
")",
... | Gets a one-line short text summary of this error
This summary is useful for log entries and error email titles.
@return string a one-line summary of this error. | [
"Gets",
"a",
"one",
"-",
"line",
"short",
"text",
"summary",
"of",
"this",
"error"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatError.php#L315-L327 |
33,661 | silverorange/swat | Swat/SwatError.php | SwatError.toString | public function toString()
{
ob_start();
printf(
"%s:\n\nMessage:\n\t%s\n\n" . "In file '%s' on line %s.\n\n",
$this->getSeverityString(),
$this->message,
$this->file,
$this->line
);
echo "Stack Trace:\n";
$count =... | php | public function toString()
{
ob_start();
printf(
"%s:\n\nMessage:\n\t%s\n\n" . "In file '%s' on line %s.\n\n",
$this->getSeverityString(),
$this->message,
$this->file,
$this->line
);
echo "Stack Trace:\n";
$count =... | [
"public",
"function",
"toString",
"(",
")",
"{",
"ob_start",
"(",
")",
";",
"printf",
"(",
"\"%s:\\n\\nMessage:\\n\\t%s\\n\\n\"",
".",
"\"In file '%s' on line %s.\\n\\n\"",
",",
"$",
"this",
"->",
"getSeverityString",
"(",
")",
",",
"$",
"this",
"->",
"message",
... | Gets this error as a nicely formatted text block
This is useful for text-based logs and emails.
@return string this error formatted as text. | [
"Gets",
"this",
"error",
"as",
"a",
"nicely",
"formatted",
"text",
"block"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatError.php#L339-L387 |
33,662 | silverorange/swat | Swat/SwatError.php | SwatError.toXHTML | public function toXHTML()
{
ob_start();
$this->displayStyleSheet();
echo '<div class="swat-exception">';
printf(
'<h3>%s</h3>' .
'<div class="swat-exception-body">' .
'Message:<div class="swat-exception-message">%s</div>' .
... | php | public function toXHTML()
{
ob_start();
$this->displayStyleSheet();
echo '<div class="swat-exception">';
printf(
'<h3>%s</h3>' .
'<div class="swat-exception-body">' .
'Message:<div class="swat-exception-message">%s</div>' .
... | [
"public",
"function",
"toXHTML",
"(",
")",
"{",
"ob_start",
"(",
")",
";",
"$",
"this",
"->",
"displayStyleSheet",
"(",
")",
";",
"echo",
"'<div class=\"swat-exception\">'",
";",
"printf",
"(",
"'<h3>%s</h3>'",
".",
"'<div class=\"swat-exception-body\">'",
".",
"'... | Gets this error as a nicely formatted XHTML fragment
This is nice for debugging errors on a staging server.
@return string this error formatted as XHTML. | [
"Gets",
"this",
"error",
"as",
"a",
"nicely",
"formatted",
"XHTML",
"fragment"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatError.php#L399-L456 |
33,663 | silverorange/swat | Swat/SwatError.php | SwatError.handle | public static function handle($errno, $errstr, $errfile, $errline)
{
// only handle error if error reporting is not suppressed
if (error_reporting() != 0) {
$error = new SwatError($errno, $errstr, $errfile, $errline);
$error->process();
}
} | php | public static function handle($errno, $errstr, $errfile, $errline)
{
// only handle error if error reporting is not suppressed
if (error_reporting() != 0) {
$error = new SwatError($errno, $errstr, $errfile, $errline);
$error->process();
}
} | [
"public",
"static",
"function",
"handle",
"(",
"$",
"errno",
",",
"$",
"errstr",
",",
"$",
"errfile",
",",
"$",
"errline",
")",
"{",
"// only handle error if error reporting is not suppressed",
"if",
"(",
"error_reporting",
"(",
")",
"!=",
"0",
")",
"{",
"$",
... | Handles an error
When an error occurs, a SwatError object is created and processed.
@param integer $errno the severity code of the handled error.
@param string $errstr the message of the handled error.
@param string $errfile the file ther handled error occurred in.
@param integer $errline the line the handled error o... | [
"Handles",
"an",
"error"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatError.php#L471-L478 |
33,664 | silverorange/swat | Swat/SwatError.php | SwatError.getArguments | protected function getArguments($args, $function = null, $class = null)
{
$params = array();
$method = null;
// try to get function or method parameter list using reflection
if ($class !== null && $function !== null && class_exists($class)) {
$class_reflector = new Refle... | php | protected function getArguments($args, $function = null, $class = null)
{
$params = array();
$method = null;
// try to get function or method parameter list using reflection
if ($class !== null && $function !== null && class_exists($class)) {
$class_reflector = new Refle... | [
"protected",
"function",
"getArguments",
"(",
"$",
"args",
",",
"$",
"function",
"=",
"null",
",",
"$",
"class",
"=",
"null",
")",
"{",
"$",
"params",
"=",
"array",
"(",
")",
";",
"$",
"method",
"=",
"null",
";",
"// try to get function or method parameter... | Formats a method call's arguments
This method is also responsible for filtering sensitive parameters
out of the final stack trace.
@param array $args an array of arguments.
@param string $method optional. The current method or function.
@param string $class optional. The current class name.
@return string the argume... | [
"Formats",
"a",
"method",
"call",
"s",
"arguments"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatError.php#L495-L536 |
33,665 | silverorange/swat | Swat/SwatError.php | SwatError.getSeverityString | protected function getSeverityString()
{
static $error_types = array(
E_WARNING => 'Warning',
E_NOTICE => 'Notice',
E_USER_ERROR => 'User Fatal Error',
E_USER_WARNING => 'User Warning',
E_USER_NOTICE => 'User Notice',
E_STRICT => 'Forwa... | php | protected function getSeverityString()
{
static $error_types = array(
E_WARNING => 'Warning',
E_NOTICE => 'Notice',
E_USER_ERROR => 'User Fatal Error',
E_USER_WARNING => 'User Warning',
E_USER_NOTICE => 'User Notice',
E_STRICT => 'Forwa... | [
"protected",
"function",
"getSeverityString",
"(",
")",
"{",
"static",
"$",
"error_types",
"=",
"array",
"(",
"E_WARNING",
"=>",
"'Warning'",
",",
"E_NOTICE",
"=>",
"'Notice'",
",",
"E_USER_ERROR",
"=>",
"'User Fatal Error'",
",",
"E_USER_WARNING",
"=>",
"'User Wa... | Gets a string representation of this error's severity
@return string a string representation of this error's severity. | [
"Gets",
"a",
"string",
"representation",
"of",
"this",
"error",
"s",
"severity"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatError.php#L663-L680 |
33,666 | silverorange/swat | Swat/SwatError.php | SwatError.isSensitiveParameter | protected function isSensitiveParameter(
ReflectionFunctionAbstract $method,
$name
) {
$sensitive = false;
$exp =
'/^.*@sensitive\s+\$([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*).*$/';
$documentation = $method->getDocComment();
$documentation = str_replace... | php | protected function isSensitiveParameter(
ReflectionFunctionAbstract $method,
$name
) {
$sensitive = false;
$exp =
'/^.*@sensitive\s+\$([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*).*$/';
$documentation = $method->getDocComment();
$documentation = str_replace... | [
"protected",
"function",
"isSensitiveParameter",
"(",
"ReflectionFunctionAbstract",
"$",
"method",
",",
"$",
"name",
")",
"{",
"$",
"sensitive",
"=",
"false",
";",
"$",
"exp",
"=",
"'/^.*@sensitive\\s+\\$([a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*).*$/'",
";",
"$",
"d... | Detects whether or not a parameter is sensitive from the method-level
documentation of the parameter's method
Parameters with the following docblock tag are considered sensitive:
<code>
<?php
/**
* @sensitive $parameter_name
*\/
?>
</code>
@param ReflectionFunctionAbstract $method the method the parameter to
which th... | [
"Detects",
"whether",
"or",
"not",
"a",
"parameter",
"is",
"sensitive",
"from",
"the",
"method",
"-",
"level",
"documentation",
"of",
"the",
"parameter",
"s",
"method"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatError.php#L705-L729 |
33,667 | brainworxx/kreXX | src/Analyse/Callback/AbstractCallback.php | AbstractCallback.dispatchEventWithModel | protected function dispatchEventWithModel($name, Model $model)
{
$this->pool->eventService->dispatch(
static::$eventPrefix . '::' . $name,
$this,
$model
);
return $model;
} | php | protected function dispatchEventWithModel($name, Model $model)
{
$this->pool->eventService->dispatch(
static::$eventPrefix . '::' . $name,
$this,
$model
);
return $model;
} | [
"protected",
"function",
"dispatchEventWithModel",
"(",
"$",
"name",
",",
"Model",
"$",
"model",
")",
"{",
"$",
"this",
"->",
"pool",
"->",
"eventService",
"->",
"dispatch",
"(",
"static",
"::",
"$",
"eventPrefix",
".",
"'::'",
".",
"$",
"name",
",",
"$"... | Dispatches an event where the modes is available.
@param string $name
The name of the event.
@param Model $model
The model so far.
@return Model
Return the model for chaining. | [
"Dispatches",
"an",
"event",
"where",
"the",
"modes",
"is",
"available",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Analyse/Callback/AbstractCallback.php#L147-L156 |
33,668 | brainworxx/kreXX | src/Analyse/Callback/AbstractCallback.php | AbstractCallback.isPropertyNameNormal | protected function isPropertyNameNormal($propName)
{
static $cache = array();
if (isset($cache[$propName])) {
return $cache[$propName];
}
// The first regex detects all allowed characters.
// For some reason, they also allow BOM characters.
return $cache... | php | protected function isPropertyNameNormal($propName)
{
static $cache = array();
if (isset($cache[$propName])) {
return $cache[$propName];
}
// The first regex detects all allowed characters.
// For some reason, they also allow BOM characters.
return $cache... | [
"protected",
"function",
"isPropertyNameNormal",
"(",
"$",
"propName",
")",
"{",
"static",
"$",
"cache",
"=",
"array",
"(",
")",
";",
"if",
"(",
"isset",
"(",
"$",
"cache",
"[",
"$",
"propName",
"]",
")",
")",
"{",
"return",
"$",
"cache",
"[",
"$",
... | Check for special chars in properties.
AFAIK this is only possible for dynamically declared properties
or some magical stuff from __get()
@see https://stackoverflow.com/questions/29019484/validate-a-php-variable
@author AbraCadaver
@param $propName
The property name we want to check.
@return bool
Whether we have a s... | [
"Check",
"for",
"special",
"chars",
"in",
"properties",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Analyse/Callback/AbstractCallback.php#L172-L184 |
33,669 | brainworxx/kreXX | src/Analyse/Comment/AbstractComment.php | AbstractComment.prettifyComment | protected function prettifyComment($comment)
{
if (empty($comment) === true) {
return '';
}
// We split our comment into single lines and remove the unwanted
// comment chars with the array_map callback.
// We skip lines with /** and */
$result = array();... | php | protected function prettifyComment($comment)
{
if (empty($comment) === true) {
return '';
}
// We split our comment into single lines and remove the unwanted
// comment chars with the array_map callback.
// We skip lines with /** and */
$result = array();... | [
"protected",
"function",
"prettifyComment",
"(",
"$",
"comment",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"comment",
")",
"===",
"true",
")",
"{",
"return",
"''",
";",
"}",
"// We split our comment into single lines and remove the unwanted",
"// comment chars with the ... | Removes the comment-chars from the comment string.
@param string $comment
The original comment from code.
@return string
The better readable comment | [
"Removes",
"the",
"comment",
"-",
"chars",
"from",
"the",
"comment",
"string",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Analyse/Comment/AbstractComment.php#L99-L119 |
33,670 | silverorange/swat | Swat/SwatTimeZoneEntry.php | SwatTimeZoneEntry.display | public function display()
{
if (!$this->visible) {
return;
}
parent::display();
$areas_flydown = $this->getCompositeWidget('areas_flydown');
$regions_flydown = $this->getCompositeWidget('regions_flydown');
$div_tag = new SwatHtmlTag('div');
$div... | php | public function display()
{
if (!$this->visible) {
return;
}
parent::display();
$areas_flydown = $this->getCompositeWidget('areas_flydown');
$regions_flydown = $this->getCompositeWidget('regions_flydown');
$div_tag = new SwatHtmlTag('div');
$div... | [
"public",
"function",
"display",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"visible",
")",
"{",
"return",
";",
"}",
"parent",
"::",
"display",
"(",
")",
";",
"$",
"areas_flydown",
"=",
"$",
"this",
"->",
"getCompositeWidget",
"(",
"'areas_flydo... | Displays this time zone entry widget
Outputs a cascading list of time zones. | [
"Displays",
"this",
"time",
"zone",
"entry",
"widget"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTimeZoneEntry.php#L84-L108 |
33,671 | silverorange/swat | Swat/SwatTimeZoneEntry.php | SwatTimeZoneEntry.process | public function process()
{
parent::process();
$areas_flydown = $this->getCompositeWidget('areas_flydown');
$regions_flydown = $this->getCompositeWidget('regions_flydown');
if ($areas_flydown->value === 'UTC') {
$this->value = 'UTC';
} elseif (
$area... | php | public function process()
{
parent::process();
$areas_flydown = $this->getCompositeWidget('areas_flydown');
$regions_flydown = $this->getCompositeWidget('regions_flydown');
if ($areas_flydown->value === 'UTC') {
$this->value = 'UTC';
} elseif (
$area... | [
"public",
"function",
"process",
"(",
")",
"{",
"parent",
"::",
"process",
"(",
")",
";",
"$",
"areas_flydown",
"=",
"$",
"this",
"->",
"getCompositeWidget",
"(",
"'areas_flydown'",
")",
";",
"$",
"regions_flydown",
"=",
"$",
"this",
"->",
"getCompositeWidge... | Processes this time zone entry widget
If any validation type errors occur, an error message is attached to
this entry widget. | [
"Processes",
"this",
"time",
"zone",
"entry",
"widget"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTimeZoneEntry.php#L119-L151 |
33,672 | silverorange/swat | Swat/SwatTimeZoneEntry.php | SwatTimeZoneEntry.parseAreaWhitelist | private function parseAreaWhitelist($area_whitelist)
{
$areas = array();
$whitelist = 0;
foreach ($area_whitelist as $area) {
$whitelist = $whitelist | $area;
}
$tz_data = DateTimeZone::listIdentifiers($whitelist);
foreach ($tz_data as $id) {
... | php | private function parseAreaWhitelist($area_whitelist)
{
$areas = array();
$whitelist = 0;
foreach ($area_whitelist as $area) {
$whitelist = $whitelist | $area;
}
$tz_data = DateTimeZone::listIdentifiers($whitelist);
foreach ($tz_data as $id) {
... | [
"private",
"function",
"parseAreaWhitelist",
"(",
"$",
"area_whitelist",
")",
"{",
"$",
"areas",
"=",
"array",
"(",
")",
";",
"$",
"whitelist",
"=",
"0",
";",
"foreach",
"(",
"$",
"area_whitelist",
"as",
"$",
"area",
")",
"{",
"$",
"whitelist",
"=",
"$... | Parses a whitelist of valid areas
Filters the full list of areas down to a select list and returns a
tree-structured array of areas, regions, and subregions.
@param array area_whitelist an array of valid area names.
@return array a tree-structured array of areas regions and subregions
inside the specified whitelist ... | [
"Parses",
"a",
"whitelist",
"of",
"valid",
"areas"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTimeZoneEntry.php#L236-L258 |
33,673 | silverorange/swat | Swat/SwatTimeZoneEntry.php | SwatTimeZoneEntry.getArea | private function getArea($time_zone)
{
$area = null;
if ($time_zone === 'UTC') {
$area = 'UTC';
} elseif ($time_zone !== null) {
$parts = explode('/', $time_zone, 2);
$area = reset($parts);
}
return $area;
} | php | private function getArea($time_zone)
{
$area = null;
if ($time_zone === 'UTC') {
$area = 'UTC';
} elseif ($time_zone !== null) {
$parts = explode('/', $time_zone, 2);
$area = reset($parts);
}
return $area;
} | [
"private",
"function",
"getArea",
"(",
"$",
"time_zone",
")",
"{",
"$",
"area",
"=",
"null",
";",
"if",
"(",
"$",
"time_zone",
"===",
"'UTC'",
")",
"{",
"$",
"area",
"=",
"'UTC'",
";",
"}",
"elseif",
"(",
"$",
"time_zone",
"!==",
"null",
")",
"{",
... | Gets an area from a time zone identifier
Returns the area part of a full time zone.
@param string $time_zone the time zone identifier to get the area from.
@return string an area name. | [
"Gets",
"an",
"area",
"from",
"a",
"time",
"zone",
"identifier"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTimeZoneEntry.php#L333-L345 |
33,674 | silverorange/swat | Swat/SwatTimeZoneEntry.php | SwatTimeZoneEntry.getRegion | private function getRegion($time_zone)
{
$region = null;
if ($time_zone === 'UTC') {
$region = 'Coordinated_Universal_Time'; // fake region for UTC
} elseif ($time_zone !== null) {
$parts = explode('/', $time_zone, 2);
$region = end($parts);
}
... | php | private function getRegion($time_zone)
{
$region = null;
if ($time_zone === 'UTC') {
$region = 'Coordinated_Universal_Time'; // fake region for UTC
} elseif ($time_zone !== null) {
$parts = explode('/', $time_zone, 2);
$region = end($parts);
}
... | [
"private",
"function",
"getRegion",
"(",
"$",
"time_zone",
")",
"{",
"$",
"region",
"=",
"null",
";",
"if",
"(",
"$",
"time_zone",
"===",
"'UTC'",
")",
"{",
"$",
"region",
"=",
"'Coordinated_Universal_Time'",
";",
"// fake region for UTC",
"}",
"elseif",
"("... | Gets a region from a time zone identifier
@param string $time_zone the time zone identifier from which to get the
region.
@return string the region part of a full time zone indentifier. | [
"Gets",
"a",
"region",
"from",
"a",
"time",
"zone",
"identifier"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTimeZoneEntry.php#L358-L370 |
33,675 | silverorange/swat | Swat/SwatTimeZoneEntry.php | SwatTimeZoneEntry.getRegionTitle | private function getRegionTitle($region)
{
$region = str_replace('_', ' ', $region);
$region = explode('/', $region);
$title = array_shift($region);
foreach ($region as $part) {
$title .= ' (' . $part . ')';
}
return $title;
} | php | private function getRegionTitle($region)
{
$region = str_replace('_', ' ', $region);
$region = explode('/', $region);
$title = array_shift($region);
foreach ($region as $part) {
$title .= ' (' . $part . ')';
}
return $title;
} | [
"private",
"function",
"getRegionTitle",
"(",
"$",
"region",
")",
"{",
"$",
"region",
"=",
"str_replace",
"(",
"'_'",
",",
"' '",
",",
"$",
"region",
")",
";",
"$",
"region",
"=",
"explode",
"(",
"'/'",
",",
"$",
"region",
")",
";",
"$",
"title",
"... | Gets a formatted region title from the region part of a time zone
identifier
@param string $region the region part of the time zone identifier.
@return string the formatted region title. | [
"Gets",
"a",
"formatted",
"region",
"title",
"from",
"the",
"region",
"part",
"of",
"a",
"time",
"zone",
"identifier"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTimeZoneEntry.php#L383-L394 |
33,676 | brainworxx/kreXX | src/Analyse/Callback/Iterate/ThroughProperties.php | ThroughProperties.callMe | public function callMe()
{
$output = $this->dispatchStartEvent();
// I need to preprocess them, since I do not want to render a
// reflection property.
/** @var \Brainworxx\Krexx\Service\Reflection\ReflectionClass $ref */
$ref = $this->parameters[static::PARAM_REF];
... | php | public function callMe()
{
$output = $this->dispatchStartEvent();
// I need to preprocess them, since I do not want to render a
// reflection property.
/** @var \Brainworxx\Krexx\Service\Reflection\ReflectionClass $ref */
$ref = $this->parameters[static::PARAM_REF];
... | [
"public",
"function",
"callMe",
"(",
")",
"{",
"$",
"output",
"=",
"$",
"this",
"->",
"dispatchStartEvent",
"(",
")",
";",
"// I need to preprocess them, since I do not want to render a",
"// reflection property.",
"/** @var \\Brainworxx\\Krexx\\Service\\Reflection\\ReflectionCla... | Renders the properties of a class.
@return string
The generated markup. | [
"Renders",
"the",
"properties",
"of",
"a",
"class",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Analyse/Callback/Iterate/ThroughProperties.php#L85-L166 |
33,677 | brainworxx/kreXX | src/Analyse/Callback/Iterate/ThroughProperties.php | ThroughProperties.getAdditionalData | protected function getAdditionalData(\ReflectionProperty $refProperty, \ReflectionClass $ref)
{
// Now that we have the key and the value, we can analyse it.
// Stitch together our additional info about the data:
// public access, protected access, private access, static declaration.
... | php | protected function getAdditionalData(\ReflectionProperty $refProperty, \ReflectionClass $ref)
{
// Now that we have the key and the value, we can analyse it.
// Stitch together our additional info about the data:
// public access, protected access, private access, static declaration.
... | [
"protected",
"function",
"getAdditionalData",
"(",
"\\",
"ReflectionProperty",
"$",
"refProperty",
",",
"\\",
"ReflectionClass",
"$",
"ref",
")",
"{",
"// Now that we have the key and the value, we can analyse it.",
"// Stitch together our additional info about the data:",
"// publ... | Adding declaration keywords to our data in the additional field.
@param \ReflectionProperty $refProperty
A reflection of the property we ara analysing.
@param \ReflectionClass $ref
A reflection of the class we are analysing.
@return string | [
"Adding",
"declaration",
"keywords",
"to",
"our",
"data",
"in",
"the",
"additional",
"field",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Analyse/Callback/Iterate/ThroughProperties.php#L178-L205 |
33,678 | brainworxx/kreXX | src/Analyse/Callback/Iterate/ThroughProperties.php | ThroughProperties.retrieveDeclarationPlace | protected function retrieveDeclarationPlace(\ReflectionProperty $refProperty)
{
static $declarationCache = array();
// Early return from the cache.
$declaringClass = $refProperty->getDeclaringClass();
$key = $refProperty->name . '::' . $declaringClass->name;
if (isset($decla... | php | protected function retrieveDeclarationPlace(\ReflectionProperty $refProperty)
{
static $declarationCache = array();
// Early return from the cache.
$declaringClass = $refProperty->getDeclaringClass();
$key = $refProperty->name . '::' . $declaringClass->name;
if (isset($decla... | [
"protected",
"function",
"retrieveDeclarationPlace",
"(",
"\\",
"ReflectionProperty",
"$",
"refProperty",
")",
"{",
"static",
"$",
"declarationCache",
"=",
"array",
"(",
")",
";",
"// Early return from the cache.",
"$",
"declaringClass",
"=",
"$",
"refProperty",
"->",... | Retrieve the declaration place of a property.
@param \ReflectionProperty $refProperty
@return string | [
"Retrieve",
"the",
"declaration",
"place",
"of",
"a",
"property",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Analyse/Callback/Iterate/ThroughProperties.php#L213-L255 |
33,679 | rollun-com/rollun-datastore | src/DataStore/src/DataStore/Aspect/AspectTyped.php | AspectTyped.dtoToArray | protected function dtoToArray(BaseDto $dto)
{
$itemData = [];
foreach ($this->scheme as $fieldName => $fieldInfo) {
$getter = 'get' . ucfirst($fieldName);
if (!method_exists($dto, $getter)) {
throw new RuntimeException("Undefined method '$getter' in " . get_... | php | protected function dtoToArray(BaseDto $dto)
{
$itemData = [];
foreach ($this->scheme as $fieldName => $fieldInfo) {
$getter = 'get' . ucfirst($fieldName);
if (!method_exists($dto, $getter)) {
throw new RuntimeException("Undefined method '$getter' in " . get_... | [
"protected",
"function",
"dtoToArray",
"(",
"BaseDto",
"$",
"dto",
")",
"{",
"$",
"itemData",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"this",
"->",
"scheme",
"as",
"$",
"fieldName",
"=>",
"$",
"fieldInfo",
")",
"{",
"$",
"getter",
"=",
"'get'",
".",... | Convert BaseDto object to array
@param BaseDto $dto
@return array | [
"Convert",
"BaseDto",
"object",
"to",
"array"
] | ef433b58b94e1c311123ad1b2a0360e95a636bd1 | https://github.com/rollun-com/rollun-datastore/blob/ef433b58b94e1c311123ad1b2a0360e95a636bd1/src/DataStore/src/DataStore/Aspect/AspectTyped.php#L183-L201 |
33,680 | rollun-com/rollun-datastore | src/DataStore/src/DataStore/Aspect/AspectTyped.php | AspectTyped.arrayToDto | protected function arrayToDto(array $itemData)
{
foreach ($itemData as $field => $value) {
if (!isset($this->scheme[$field])) {
throw new InvalidArgumentException("Undefined field '$field' in scheme");
}
$typeService = $this->scheme[$field]['type'];
... | php | protected function arrayToDto(array $itemData)
{
foreach ($itemData as $field => $value) {
if (!isset($this->scheme[$field])) {
throw new InvalidArgumentException("Undefined field '$field' in scheme");
}
$typeService = $this->scheme[$field]['type'];
... | [
"protected",
"function",
"arrayToDto",
"(",
"array",
"$",
"itemData",
")",
"{",
"foreach",
"(",
"$",
"itemData",
"as",
"$",
"field",
"=>",
"$",
"value",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"scheme",
"[",
"$",
"field",
"]",
")... | Convert array to BaseDto object
@param array $itemData
@return BaseDto | [
"Convert",
"array",
"to",
"BaseDto",
"object"
] | ef433b58b94e1c311123ad1b2a0360e95a636bd1 | https://github.com/rollun-com/rollun-datastore/blob/ef433b58b94e1c311123ad1b2a0360e95a636bd1/src/DataStore/src/DataStore/Aspect/AspectTyped.php#L209-L221 |
33,681 | brainworxx/kreXX | src/Analyse/Callback/Analyse/Objects/AbstractObjectAnalysis.php | AbstractObjectAnalysis.getReflectionPropertiesData | protected function getReflectionPropertiesData(array $refProps, ReflectionClass $ref, $label = null)
{
// We are dumping public properties direct into the main-level, without
// any "abstraction level", because they can be accessed directly.
/** @var Model $model */
$model = $this->p... | php | protected function getReflectionPropertiesData(array $refProps, ReflectionClass $ref, $label = null)
{
// We are dumping public properties direct into the main-level, without
// any "abstraction level", because they can be accessed directly.
/** @var Model $model */
$model = $this->p... | [
"protected",
"function",
"getReflectionPropertiesData",
"(",
"array",
"$",
"refProps",
",",
"ReflectionClass",
"$",
"ref",
",",
"$",
"label",
"=",
"null",
")",
"{",
"// We are dumping public properties direct into the main-level, without",
"// any \"abstraction level\", because... | Gets the properties from a reflection property of the object.
@param array $refProps
The list of the reflection properties.
@param ReflectionClass $ref
The reflection of the object we are currently analysing.
@param string $label
The additional part of the template file. If set, we will use a wrapper
around the analys... | [
"Gets",
"the",
"properties",
"from",
"a",
"reflection",
"property",
"of",
"the",
"object",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Analyse/Callback/Analyse/Objects/AbstractObjectAnalysis.php#L83-L113 |
33,682 | brainworxx/kreXX | src/Analyse/Callback/Analyse/Objects/AbstractObjectAnalysis.php | AbstractObjectAnalysis.reflectionSorting | protected function reflectionSorting(\Reflector $reflectionA, \Reflector $reflectionB)
{
/** @var \ReflectionMethod | \ReflectionProperty $reflectionA */
/** @var \ReflectionMethod | \ReflectionProperty $reflectionB */
return strcmp($reflectionA->getName(), $reflectionB->getName());
} | php | protected function reflectionSorting(\Reflector $reflectionA, \Reflector $reflectionB)
{
/** @var \ReflectionMethod | \ReflectionProperty $reflectionA */
/** @var \ReflectionMethod | \ReflectionProperty $reflectionB */
return strcmp($reflectionA->getName(), $reflectionB->getName());
} | [
"protected",
"function",
"reflectionSorting",
"(",
"\\",
"Reflector",
"$",
"reflectionA",
",",
"\\",
"Reflector",
"$",
"reflectionB",
")",
"{",
"/** @var \\ReflectionMethod | \\ReflectionProperty $reflectionA */",
"/** @var \\ReflectionMethod | \\ReflectionProperty $reflectionB */",
... | Simple sorting callback for reflections.
@param \Reflector $reflectionA
The first reflection.
@param \Reflector $reflectionB
The second reflection.
@return int | [
"Simple",
"sorting",
"callback",
"for",
"reflections",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Analyse/Callback/Analyse/Objects/AbstractObjectAnalysis.php#L124-L129 |
33,683 | brainworxx/kreXX | src/Service/Config/Security.php | Security.evaluateSetting | public function evaluateSetting($group, $name, $value)
{
if ($group === 'feEditing') {
// Logging options can never be changed in the frontend.
// The debug methods will also not be editable.
return !in_array($name, $this->feConfigNoEdit);
}
// We simply ... | php | public function evaluateSetting($group, $name, $value)
{
if ($group === 'feEditing') {
// Logging options can never be changed in the frontend.
// The debug methods will also not be editable.
return !in_array($name, $this->feConfigNoEdit);
}
// We simply ... | [
"public",
"function",
"evaluateSetting",
"(",
"$",
"group",
",",
"$",
"name",
",",
"$",
"value",
")",
"{",
"if",
"(",
"$",
"group",
"===",
"'feEditing'",
")",
"{",
"// Logging options can never be changed in the frontend.",
"// The debug methods will also not be editabl... | Evaluate a single setting from the cookies or the ini file.
@param string $group
The group value in the ini.
@param string $name
The name of the setting.
@param string $value
The value to evaluate.
@return bool
If it was evaluated. | [
"Evaluate",
"a",
"single",
"setting",
"from",
"the",
"cookies",
"or",
"the",
"ini",
"file",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Service/Config/Security.php#L78-L89 |
33,684 | brainworxx/kreXX | src/Service/Config/Security.php | Security.evalDevHandle | protected function evalDevHandle($value, $name)
{
$result = preg_match('/[^a-zA-Z]/', $value) === 0;
if ($result === false) {
$this->pool->messages->addMessage(static::KEY_CONFIG_ERROR . ucfirst($name));
}
return $result;
} | php | protected function evalDevHandle($value, $name)
{
$result = preg_match('/[^a-zA-Z]/', $value) === 0;
if ($result === false) {
$this->pool->messages->addMessage(static::KEY_CONFIG_ERROR . ucfirst($name));
}
return $result;
} | [
"protected",
"function",
"evalDevHandle",
"(",
"$",
"value",
",",
"$",
"name",
")",
"{",
"$",
"result",
"=",
"preg_match",
"(",
"'/[^a-zA-Z]/'",
",",
"$",
"value",
")",
"===",
"0",
";",
"if",
"(",
"$",
"result",
"===",
"false",
")",
"{",
"$",
"this",... | We check the dev handle for a-z and A-Z.
@param string $value
The value we want to evaluate
@param string $name
The name of the value we are checking, needed for the feedback text.
@return boolean
Whether it does evaluate or not. | [
"We",
"check",
"the",
"dev",
"handle",
"for",
"a",
"-",
"z",
"and",
"A",
"-",
"Z",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Service/Config/Security.php#L102-L110 |
33,685 | brainworxx/kreXX | src/Service/Config/Security.php | Security.evalSkin | protected function evalSkin($value, $name)
{
$result = isset($this->skinConfiguration[$value]) &&
class_exists($this->skinConfiguration[$value][static::SKIN_CLASS]) &&
$this->pool->fileService->fileIsReadable(
$this->skinConfiguration[$value][static::SKIN_DIRECTORY] .... | php | protected function evalSkin($value, $name)
{
$result = isset($this->skinConfiguration[$value]) &&
class_exists($this->skinConfiguration[$value][static::SKIN_CLASS]) &&
$this->pool->fileService->fileIsReadable(
$this->skinConfiguration[$value][static::SKIN_DIRECTORY] .... | [
"protected",
"function",
"evalSkin",
"(",
"$",
"value",
",",
"$",
"name",
")",
"{",
"$",
"result",
"=",
"isset",
"(",
"$",
"this",
"->",
"skinConfiguration",
"[",
"$",
"value",
"]",
")",
"&&",
"class_exists",
"(",
"$",
"this",
"->",
"skinConfiguration",
... | We check the configuration for this skin.
@param string $value
The value we want to evaluate
@param string $name
The name of the value we are checking, needed for the feedback text.
@return boolean
Whether it does evaluate or not. | [
"We",
"check",
"the",
"configuration",
"for",
"this",
"skin",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Service/Config/Security.php#L123-L136 |
33,686 | brainworxx/kreXX | src/Service/Config/Security.php | Security.evalDestination | protected function evalDestination($value, $name)
{
$result = ($value === static::VALUE_BROWSER || $value === 'file');
if ($result === false) {
$this->pool->messages->addMessage(static::KEY_CONFIG_ERROR . ucfirst($name));
}
return $result;
} | php | protected function evalDestination($value, $name)
{
$result = ($value === static::VALUE_BROWSER || $value === 'file');
if ($result === false) {
$this->pool->messages->addMessage(static::KEY_CONFIG_ERROR . ucfirst($name));
}
return $result;
} | [
"protected",
"function",
"evalDestination",
"(",
"$",
"value",
",",
"$",
"name",
")",
"{",
"$",
"result",
"=",
"(",
"$",
"value",
"===",
"static",
"::",
"VALUE_BROWSER",
"||",
"$",
"value",
"===",
"'file'",
")",
";",
"if",
"(",
"$",
"result",
"===",
... | We are expecting 'browser' or 'file'.
@param string $value
The value we want to evaluate
@param string $name
The name of the value we are checking, needed for the feedback text.
@return boolean
Whether it does evaluate or not. | [
"We",
"are",
"expecting",
"browser",
"or",
"file",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Service/Config/Security.php#L149-L157 |
33,687 | brainworxx/kreXX | src/Service/Config/Security.php | Security.evalIpRange | protected function evalIpRange($value, $name)
{
$result = empty($value);
if ($result === true) {
$this->pool->messages->addMessage(static::KEY_CONFIG_ERROR . ucfirst($name));
}
return !$result;
} | php | protected function evalIpRange($value, $name)
{
$result = empty($value);
if ($result === true) {
$this->pool->messages->addMessage(static::KEY_CONFIG_ERROR . ucfirst($name));
}
return !$result;
} | [
"protected",
"function",
"evalIpRange",
"(",
"$",
"value",
",",
"$",
"name",
")",
"{",
"$",
"result",
"=",
"empty",
"(",
"$",
"value",
")",
";",
"if",
"(",
"$",
"result",
"===",
"true",
")",
"{",
"$",
"this",
"->",
"pool",
"->",
"messages",
"->",
... | Evaluating the IP range, by testing that it is not empty.
@param string $value
The value we want to evaluate
@param string $name
The name of the value we are checking, needed for the feedback text.
@return boolean
Whether it does evaluate or not. | [
"Evaluating",
"the",
"IP",
"range",
"by",
"testing",
"that",
"it",
"is",
"not",
"empty",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Service/Config/Security.php#L170-L178 |
33,688 | brainworxx/kreXX | src/Service/Config/Security.php | Security.evalMaxRuntime | protected function evalMaxRuntime($value, $name, $group)
{
// Check for integer first.
if ($this->evalInt($value, $name, $group) === false) {
return false;
}
$maxTime = (int)ini_get('max_execution_time');
// We need a maximum runtime in the first place
//... | php | protected function evalMaxRuntime($value, $name, $group)
{
// Check for integer first.
if ($this->evalInt($value, $name, $group) === false) {
return false;
}
$maxTime = (int)ini_get('max_execution_time');
// We need a maximum runtime in the first place
//... | [
"protected",
"function",
"evalMaxRuntime",
"(",
"$",
"value",
",",
"$",
"name",
",",
"$",
"group",
")",
"{",
"// Check for integer first.",
"if",
"(",
"$",
"this",
"->",
"evalInt",
"(",
"$",
"value",
",",
"$",
"name",
",",
"$",
"group",
")",
"===",
"fa... | Evaluation the maximum runtime, by looking at the server settings, as
well as checking for an integer value.
@param string $value
The value we want to evaluate
@param string $name
The name of the value we are checking, needed for the feedback text.
@param string $group
The name of the group that we are evaluating, nee... | [
"Evaluation",
"the",
"maximum",
"runtime",
"by",
"looking",
"at",
"the",
"server",
"settings",
"as",
"well",
"as",
"checking",
"for",
"an",
"integer",
"value",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Service/Config/Security.php#L195-L220 |
33,689 | brainworxx/kreXX | src/Service/Config/Security.php | Security.evalBool | protected function evalBool($value, $name, $group)
{
$result = ($value === static::VALUE_TRUE || $value === static::VALUE_FALSE);
if ($result === false) {
$this->pool->messages->addMessage(static::KEY_CONFIG_ERROR_BOOL, array($group, $name));
}
return $result;
} | php | protected function evalBool($value, $name, $group)
{
$result = ($value === static::VALUE_TRUE || $value === static::VALUE_FALSE);
if ($result === false) {
$this->pool->messages->addMessage(static::KEY_CONFIG_ERROR_BOOL, array($group, $name));
}
return $result;
} | [
"protected",
"function",
"evalBool",
"(",
"$",
"value",
",",
"$",
"name",
",",
"$",
"group",
")",
"{",
"$",
"result",
"=",
"(",
"$",
"value",
"===",
"static",
"::",
"VALUE_TRUE",
"||",
"$",
"value",
"===",
"static",
"::",
"VALUE_FALSE",
")",
";",
"if... | Evaluates a string of 'true' or 'false'.
@param string $value
The string we want to evaluate.
@param string $name
The name of the value we are checking, needed for the feedback text.
@param string $group
The name of the group that we are evaluating, needed for the feedback
text.
@return bool
Whether it does evaluate ... | [
"Evaluates",
"a",
"string",
"of",
"true",
"or",
"false",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Service/Config/Security.php#L236-L244 |
33,690 | brainworxx/kreXX | src/Service/Config/Security.php | Security.evalInt | protected function evalInt($value, $name, $group)
{
$result = ((int) $value) > 0;
if ($result === false) {
$this->pool->messages->addMessage(static::KEY_CONFIG_ERROR_INT, array($group, $name));
}
return $result;
} | php | protected function evalInt($value, $name, $group)
{
$result = ((int) $value) > 0;
if ($result === false) {
$this->pool->messages->addMessage(static::KEY_CONFIG_ERROR_INT, array($group, $name));
}
return $result;
} | [
"protected",
"function",
"evalInt",
"(",
"$",
"value",
",",
"$",
"name",
",",
"$",
"group",
")",
"{",
"$",
"result",
"=",
"(",
"(",
"int",
")",
"$",
"value",
")",
">",
"0",
";",
"if",
"(",
"$",
"result",
"===",
"false",
")",
"{",
"$",
"this",
... | Evaluates a string of integer.
It must be greater than 0 and smaller than 101.
@param string $value
The string we want to evaluate.
@param string $name
The name of the value we are checking, needed for the feedback text.
@param string $group
The name of the group that we are evaluating, needed for the feedback
text.
... | [
"Evaluates",
"a",
"string",
"of",
"integer",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Service/Config/Security.php#L262-L270 |
33,691 | brainworxx/kreXX | src/Service/Config/Security.php | Security.evalDebugMethods | protected function evalDebugMethods($value, $name, $group)
{
$list = explode(',', $value);
foreach ($list as $entry) {
// Test for whitespace and the blacklist.
if (in_array($entry, $this->methodBlacklist)) {
$this->pool->messages->addMessage(
... | php | protected function evalDebugMethods($value, $name, $group)
{
$list = explode(',', $value);
foreach ($list as $entry) {
// Test for whitespace and the blacklist.
if (in_array($entry, $this->methodBlacklist)) {
$this->pool->messages->addMessage(
... | [
"protected",
"function",
"evalDebugMethods",
"(",
"$",
"value",
",",
"$",
"name",
",",
"$",
"group",
")",
"{",
"$",
"list",
"=",
"explode",
"(",
"','",
",",
"$",
"value",
")",
";",
"foreach",
"(",
"$",
"list",
"as",
"$",
"entry",
")",
"{",
"// Test... | Sanity check, if the supplied debug methods are not obviously flawed.
@param string $value
Comma separated list of debug methods.
@param string $name
The name of the value we are checking, needed for the feedback text.
@param string $group
The name of the group that we are evaluating, needed for the feedback
text.
@r... | [
"Sanity",
"check",
"if",
"the",
"supplied",
"debug",
"methods",
"are",
"not",
"obviously",
"flawed",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Service/Config/Security.php#L297-L320 |
33,692 | silverorange/swat | Swat/SwatLinkCellRenderer.php | SwatLinkCellRenderer.renderSensitive | protected function renderSensitive()
{
$anchor_tag = new SwatHtmlTag('a');
$anchor_tag->setContent($this->getText(), $this->content_type);
$anchor_tag->href = $this->getLink();
$anchor_tag->title = $this->getTitle();
$anchor_tag->class = $this->getCSSClassString();
$a... | php | protected function renderSensitive()
{
$anchor_tag = new SwatHtmlTag('a');
$anchor_tag->setContent($this->getText(), $this->content_type);
$anchor_tag->href = $this->getLink();
$anchor_tag->title = $this->getTitle();
$anchor_tag->class = $this->getCSSClassString();
$a... | [
"protected",
"function",
"renderSensitive",
"(",
")",
"{",
"$",
"anchor_tag",
"=",
"new",
"SwatHtmlTag",
"(",
"'a'",
")",
";",
"$",
"anchor_tag",
"->",
"setContent",
"(",
"$",
"this",
"->",
"getText",
"(",
")",
",",
"$",
"this",
"->",
"content_type",
")"... | Renders this link as sensitive | [
"Renders",
"this",
"link",
"as",
"sensitive"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatLinkCellRenderer.php#L122-L130 |
33,693 | silverorange/swat | Swat/SwatLinkCellRenderer.php | SwatLinkCellRenderer.renderInsensitive | protected function renderInsensitive()
{
$span_tag = new SwatHtmlTag('span');
$span_tag->setContent($this->getText(), $this->content_type);
$span_tag->title = $this->getTitle();
$span_tag->class = $this->getCSSClassString();
$span_tag->display();
} | php | protected function renderInsensitive()
{
$span_tag = new SwatHtmlTag('span');
$span_tag->setContent($this->getText(), $this->content_type);
$span_tag->title = $this->getTitle();
$span_tag->class = $this->getCSSClassString();
$span_tag->display();
} | [
"protected",
"function",
"renderInsensitive",
"(",
")",
"{",
"$",
"span_tag",
"=",
"new",
"SwatHtmlTag",
"(",
"'span'",
")",
";",
"$",
"span_tag",
"->",
"setContent",
"(",
"$",
"this",
"->",
"getText",
"(",
")",
",",
"$",
"this",
"->",
"content_type",
")... | Renders this link as not sensitive | [
"Renders",
"this",
"link",
"as",
"not",
"sensitive"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatLinkCellRenderer.php#L138-L145 |
33,694 | brainworxx/kreXX | src/Analyse/AbstractModel.php | AbstractModel.addToJson | public function addToJson($key, $value)
{
// Remove leftover linebreaks.
$value = trim(preg_replace("/\r|\n/", "", $value));
if ($value === '') {
unset($this->json[$key]);
} else {
$this->json[$key] = $value;
}
return $this;
} | php | public function addToJson($key, $value)
{
// Remove leftover linebreaks.
$value = trim(preg_replace("/\r|\n/", "", $value));
if ($value === '') {
unset($this->json[$key]);
} else {
$this->json[$key] = $value;
}
return $this;
} | [
"public",
"function",
"addToJson",
"(",
"$",
"key",
",",
"$",
"value",
")",
"{",
"// Remove leftover linebreaks.",
"$",
"value",
"=",
"trim",
"(",
"preg_replace",
"(",
"\"/\\r|\\n/\"",
",",
"\"\"",
",",
"$",
"value",
")",
")",
";",
"if",
"(",
"$",
"value... | We simply add more info to our info json.
Leftover linebreaks will be removed.
If the value is empty, we will remove a possible previous entry to this key.
@param string $key
The array key.
@param string $value
The value we want to set.
@return $this
$this for chaining. | [
"We",
"simply",
"add",
"more",
"info",
"to",
"our",
"info",
"json",
".",
"Leftover",
"linebreaks",
"will",
"be",
"removed",
".",
"If",
"the",
"value",
"is",
"empty",
"we",
"will",
"remove",
"a",
"possible",
"previous",
"entry",
"to",
"this",
"key",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Analyse/AbstractModel.php#L173-L184 |
33,695 | silverorange/swat | SwatDB/SwatDBRecordsetWrapper.php | SwatDBRecordsetWrapper.duplicate | public function duplicate()
{
$class = get_class($this);
$new_wrapper = new $class();
foreach ($this->getArray() as $object) {
$object->setDatabase($this->db);
$duplicate_object = $object->duplicate();
$duplicate_object->setDatabase($this->db);
... | php | public function duplicate()
{
$class = get_class($this);
$new_wrapper = new $class();
foreach ($this->getArray() as $object) {
$object->setDatabase($this->db);
$duplicate_object = $object->duplicate();
$duplicate_object->setDatabase($this->db);
... | [
"public",
"function",
"duplicate",
"(",
")",
"{",
"$",
"class",
"=",
"get_class",
"(",
"$",
"this",
")",
";",
"$",
"new_wrapper",
"=",
"new",
"$",
"class",
"(",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"getArray",
"(",
")",
"as",
"$",
"object",... | Duplicates this record set wrapper
@return SwatDBRecordsetWrapper a duplicate of this object.
@see SwatDBDataobject::duplicate() | [
"Duplicates",
"this",
"record",
"set",
"wrapper"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/SwatDB/SwatDBRecordsetWrapper.php#L177-L192 |
33,696 | silverorange/swat | SwatDB/SwatDBRecordsetWrapper.php | SwatDBRecordsetWrapper.setOptions | public function setOptions($options, $value = null)
{
// if options passed as string then second param is option value
if (is_string($options)) {
$options = array($options => $value);
}
if (!is_array($options)) {
throw new InvalidArgumentException(
... | php | public function setOptions($options, $value = null)
{
// if options passed as string then second param is option value
if (is_string($options)) {
$options = array($options => $value);
}
if (!is_array($options)) {
throw new InvalidArgumentException(
... | [
"public",
"function",
"setOptions",
"(",
"$",
"options",
",",
"$",
"value",
"=",
"null",
")",
"{",
"// if options passed as string then second param is option value",
"if",
"(",
"is_string",
"(",
"$",
"options",
")",
")",
"{",
"$",
"options",
"=",
"array",
"(",
... | Sets one or more options for this recordset wrapper
Subclasses may define additional options. The default options are:
- <kbd>boolean read_only</kbd> if true, records are initialized as
read only. Defaults to false.
@param array|string $options either an array containing key-value pairs
or a string cotnaining the op... | [
"Sets",
"one",
"or",
"more",
"options",
"for",
"this",
"recordset",
"wrapper"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/SwatDB/SwatDBRecordsetWrapper.php#L213-L231 |
33,697 | silverorange/swat | SwatDB/SwatDBRecordsetWrapper.php | SwatDBRecordsetWrapper.copyEmpty | public function copyEmpty()
{
$class_name = get_class($this);
$wrapper = new $class_name();
$wrapper->row_wrapper_class = $this->row_wrapper_class;
$wrapper->index_field = $this->index_field;
$wrapper->options = $this->options;
return $wrapper;
} | php | public function copyEmpty()
{
$class_name = get_class($this);
$wrapper = new $class_name();
$wrapper->row_wrapper_class = $this->row_wrapper_class;
$wrapper->index_field = $this->index_field;
$wrapper->options = $this->options;
return $wrapper;
} | [
"public",
"function",
"copyEmpty",
"(",
")",
"{",
"$",
"class_name",
"=",
"get_class",
"(",
"$",
"this",
")",
";",
"$",
"wrapper",
"=",
"new",
"$",
"class_name",
"(",
")",
";",
"$",
"wrapper",
"->",
"row_wrapper_class",
"=",
"$",
"this",
"->",
"row_wra... | Creates a new empty copy of this recordset wrapper
@return SwatDBRecordsetWrapper a new empty copy of this wrapper. | [
"Creates",
"a",
"new",
"empty",
"copy",
"of",
"this",
"recordset",
"wrapper"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/SwatDB/SwatDBRecordsetWrapper.php#L265-L275 |
33,698 | silverorange/swat | SwatDB/SwatDBRecordsetWrapper.php | SwatDBRecordsetWrapper.instantiateRowWrapperObject | protected function instantiateRowWrapperObject($row)
{
if ($this->row_wrapper_class === null) {
$object = $row;
} else {
$object = new $this->row_wrapper_class(
$row,
$this->getOption('read_only')
);
}
return $objec... | php | protected function instantiateRowWrapperObject($row)
{
if ($this->row_wrapper_class === null) {
$object = $row;
} else {
$object = new $this->row_wrapper_class(
$row,
$this->getOption('read_only')
);
}
return $objec... | [
"protected",
"function",
"instantiateRowWrapperObject",
"(",
"$",
"row",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"row_wrapper_class",
"===",
"null",
")",
"{",
"$",
"object",
"=",
"$",
"row",
";",
"}",
"else",
"{",
"$",
"object",
"=",
"new",
"$",
"this"... | Creates a new dataobject
@param stdClass $row the data row to use.
@return mixed the instantiated data object or the original object if
no <i>$row_wrapper_class</i> is defined for this
recordset wrapper. | [
"Creates",
"a",
"new",
"dataobject"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/SwatDB/SwatDBRecordsetWrapper.php#L289-L301 |
33,699 | silverorange/swat | SwatDB/SwatDBRecordsetWrapper.php | SwatDBRecordsetWrapper.offsetExists | public function offsetExists($offset)
{
if ($this->index_field === null) {
return isset($this->objects[$offset]);
}
return isset($this->objects_by_index[$offset]);
} | php | public function offsetExists($offset)
{
if ($this->index_field === null) {
return isset($this->objects[$offset]);
}
return isset($this->objects_by_index[$offset]);
} | [
"public",
"function",
"offsetExists",
"(",
"$",
"offset",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"index_field",
"===",
"null",
")",
"{",
"return",
"isset",
"(",
"$",
"this",
"->",
"objects",
"[",
"$",
"offset",
"]",
")",
";",
"}",
"return",
"isset",... | Gets whether or not a value exists for the given offset
@param mixed $offset the offset to check. If this recordset has a
defined index field, the offset is an index
value. Otherwise, the offset is an ordinal value.
@return boolean true if this recordset has a value for the given offset
and false if it does not. | [
"Gets",
"whether",
"or",
"not",
"a",
"value",
"exists",
"for",
"the",
"given",
"offset"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/SwatDB/SwatDBRecordsetWrapper.php#L355-L362 |
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.