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,500 | silverorange/swat | Swat/SwatMessageDisplay.php | SwatMessageDisplay.display | public function display()
{
if (!$this->visible) {
return;
}
if ($this->getMessageCount() === 0) {
return;
}
parent::display();
$wrapper_div = new SwatHtmlTag('div');
$wrapper_div->id = $this->id;
$wrapper_div->class = $this-... | php | public function display()
{
if (!$this->visible) {
return;
}
if ($this->getMessageCount() === 0) {
return;
}
parent::display();
$wrapper_div = new SwatHtmlTag('div');
$wrapper_div->id = $this->id;
$wrapper_div->class = $this-... | [
"public",
"function",
"display",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"visible",
")",
"{",
"return",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"getMessageCount",
"(",
")",
"===",
"0",
")",
"{",
"return",
";",
"}",
"parent",
"::",
"disp... | Displays messages in this message display
The CSS class of each message is determined by the message being
displayed. | [
"Displays",
"messages",
"in",
"this",
"message",
"display"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatMessageDisplay.php#L153-L193 |
33,501 | silverorange/swat | Swat/SwatMessageDisplay.php | SwatMessageDisplay.displayMessage | protected function displayMessage(
$message_id,
SwatMessage $message,
$first = false,
$last = false
) {
$message_div = new SwatHtmlTag('div');
$container_div = new SwatHtmlTag('div');
$message_div->id = $this->id . '_' . $message_id;
$message_div->cla... | php | protected function displayMessage(
$message_id,
SwatMessage $message,
$first = false,
$last = false
) {
$message_div = new SwatHtmlTag('div');
$container_div = new SwatHtmlTag('div');
$message_div->id = $this->id . '_' . $message_id;
$message_div->cla... | [
"protected",
"function",
"displayMessage",
"(",
"$",
"message_id",
",",
"SwatMessage",
"$",
"message",
",",
"$",
"first",
"=",
"false",
",",
"$",
"last",
"=",
"false",
")",
"{",
"$",
"message_div",
"=",
"new",
"SwatHtmlTag",
"(",
"'div'",
")",
";",
"$",
... | Display a single message of this message display
@param integer $message_id a unique identifier for the message within
this message display.
@param SwatMessage $message the message to display.
@param boolean $first optional. Whether or not the message is the first
message in this message display.
@param boolean $last ... | [
"Display",
"a",
"single",
"message",
"of",
"this",
"message",
"display"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatMessageDisplay.php#L242-L289 |
33,502 | silverorange/swat | Swat/SwatMessageDisplay.php | SwatMessageDisplay.getInlineJavaScript | protected function getInlineJavaScript()
{
static $shown = false;
if (!$shown) {
$javascript = $this->getInlineJavaScriptTranslations();
$shown = true;
} else {
$javascript = '';
}
$dismissable_messages =
'[' . implode(', ', $... | php | protected function getInlineJavaScript()
{
static $shown = false;
if (!$shown) {
$javascript = $this->getInlineJavaScriptTranslations();
$shown = true;
} else {
$javascript = '';
}
$dismissable_messages =
'[' . implode(', ', $... | [
"protected",
"function",
"getInlineJavaScript",
"(",
")",
"{",
"static",
"$",
"shown",
"=",
"false",
";",
"if",
"(",
"!",
"$",
"shown",
")",
"{",
"$",
"javascript",
"=",
"$",
"this",
"->",
"getInlineJavaScriptTranslations",
"(",
")",
";",
"$",
"shown",
"... | Gets the inline JavaScript for hiding messages | [
"Gets",
"the",
"inline",
"JavaScript",
"for",
"hiding",
"messages"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatMessageDisplay.php#L326-L349 |
33,503 | silverorange/swat | Swat/SwatReplicableFrame.php | SwatReplicableFrame.init | public function init()
{
$children = array();
foreach ($this->children as $child_widget) {
$children[] = $this->remove($child_widget);
}
$frame = new SwatFrame();
$frame->id = $frame->getUniqueId();
$prototype_id = $frame->id;
foreach ($children ... | php | public function init()
{
$children = array();
foreach ($this->children as $child_widget) {
$children[] = $this->remove($child_widget);
}
$frame = new SwatFrame();
$frame->id = $frame->getUniqueId();
$prototype_id = $frame->id;
foreach ($children ... | [
"public",
"function",
"init",
"(",
")",
"{",
"$",
"children",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"children",
"as",
"$",
"child_widget",
")",
"{",
"$",
"children",
"[",
"]",
"=",
"$",
"this",
"->",
"remove",
"(",
"$",
... | Initilizes this replicable frame | [
"Initilizes",
"this",
"replicable",
"frame"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatReplicableFrame.php#L23-L48 |
33,504 | silverorange/swat | SwatDB/SwatDBClassMap.php | SwatDBClassMap.add | public static function add($from_class_name, $to_class_name)
{
// check for circular dependency
if (array_key_exists($to_class_name, self::$map)) {
$class_name = $to_class_name;
$child_class_names = array($class_name);
while (array_key_exists($class_name, self::$m... | php | public static function add($from_class_name, $to_class_name)
{
// check for circular dependency
if (array_key_exists($to_class_name, self::$map)) {
$class_name = $to_class_name;
$child_class_names = array($class_name);
while (array_key_exists($class_name, self::$m... | [
"public",
"static",
"function",
"add",
"(",
"$",
"from_class_name",
",",
"$",
"to_class_name",
")",
"{",
"// check for circular dependency",
"if",
"(",
"array_key_exists",
"(",
"$",
"to_class_name",
",",
"self",
"::",
"$",
"map",
")",
")",
"{",
"$",
"class_nam... | Maps a class name to another class name
Subsequent calls to {@link SwatDBClassMap::get()} using the
<i>$from_class_name</i> will return the <i>$to_class_name</i>. Class
names may be mapped to already mapped class names. For example:
<code>
SwatDBClassMap::add('Object', 'MyObject');
SwatDBClassMap::add('MyObject', 'My... | [
"Maps",
"a",
"class",
"name",
"to",
"another",
"class",
"name"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/SwatDB/SwatDBClassMap.php#L68-L91 |
33,505 | silverorange/swat | SwatDB/SwatDBClassMap.php | SwatDBClassMap.get | public static function get($from_class_name)
{
$to_class_name = $from_class_name;
while (array_key_exists($from_class_name, self::$map)) {
$to_class_name = self::$map[$from_class_name];
if (!is_subclass_of($to_class_name, $from_class_name)) {
throw new SwatI... | php | public static function get($from_class_name)
{
$to_class_name = $from_class_name;
while (array_key_exists($from_class_name, self::$map)) {
$to_class_name = self::$map[$from_class_name];
if (!is_subclass_of($to_class_name, $from_class_name)) {
throw new SwatI... | [
"public",
"static",
"function",
"get",
"(",
"$",
"from_class_name",
")",
"{",
"$",
"to_class_name",
"=",
"$",
"from_class_name",
";",
"while",
"(",
"array_key_exists",
"(",
"$",
"from_class_name",
",",
"self",
"::",
"$",
"map",
")",
")",
"{",
"$",
"to_clas... | Resolves a class name from the class map
@param string $from_class_name the name of the class to resolve.
@return string the resolved class name. If no class mapping exists for
for the given class name, the same class name is
returned.
@throws SwatInvalidClassException if a mapped class is not a subclass of
its orig... | [
"Resolves",
"a",
"class",
"name",
"from",
"the",
"class",
"map"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/SwatDB/SwatDBClassMap.php#L108-L130 |
33,506 | silverorange/swat | SwatDB/SwatDBClassMap.php | SwatDBClassMap.addPath | public static function addPath($search_path)
{
if (!in_array($search_path, self::$search_paths, true)) {
// add path to front of array since it is more likely we will find
// class-definitions in manually added search paths
array_unshift(self::$search_paths, $search_path)... | php | public static function addPath($search_path)
{
if (!in_array($search_path, self::$search_paths, true)) {
// add path to front of array since it is more likely we will find
// class-definitions in manually added search paths
array_unshift(self::$search_paths, $search_path)... | [
"public",
"static",
"function",
"addPath",
"(",
"$",
"search_path",
")",
"{",
"if",
"(",
"!",
"in_array",
"(",
"$",
"search_path",
",",
"self",
"::",
"$",
"search_paths",
",",
"true",
")",
")",
"{",
"// add path to front of array since it is more likely we will fi... | Adds a search path for class-definition files
When an undefined class is resolved, the class map attempts to find
and require a class-definition file for the class.
All search paths are relative to the PHP include path. The empty search
path ('.') is included by default.
@param string $search_path the path to search... | [
"Adds",
"a",
"search",
"path",
"for",
"class",
"-",
"definition",
"files"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/SwatDB/SwatDBClassMap.php#L148-L155 |
33,507 | silverorange/swat | SwatDB/SwatDBClassMap.php | SwatDBClassMap.removePath | public static function removePath($search_path)
{
$index = array_search($search_path, self::$search_paths);
if ($index !== false) {
array_splice(self::$search_paths, $index, 1);
}
} | php | public static function removePath($search_path)
{
$index = array_search($search_path, self::$search_paths);
if ($index !== false) {
array_splice(self::$search_paths, $index, 1);
}
} | [
"public",
"static",
"function",
"removePath",
"(",
"$",
"search_path",
")",
"{",
"$",
"index",
"=",
"array_search",
"(",
"$",
"search_path",
",",
"self",
"::",
"$",
"search_paths",
")",
";",
"if",
"(",
"$",
"index",
"!==",
"false",
")",
"{",
"array_splic... | Removes a search path for class-definition files
@param string $search_path the path to remove.
@see SwatDBClassMap::addPath() | [
"Removes",
"a",
"search",
"path",
"for",
"class",
"-",
"definition",
"files"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/SwatDB/SwatDBClassMap.php#L167-L173 |
33,508 | silverorange/swat | SwatDB/SwatDBClassMap.php | SwatDBClassMap.addMapping | public function addMapping($package_class_name, $class_name)
{
$this->mappings[$package_class_name] = $class_name;
self::add($package_class_name, $class_name);
} | php | public function addMapping($package_class_name, $class_name)
{
$this->mappings[$package_class_name] = $class_name;
self::add($package_class_name, $class_name);
} | [
"public",
"function",
"addMapping",
"(",
"$",
"package_class_name",
",",
"$",
"class_name",
")",
"{",
"$",
"this",
"->",
"mappings",
"[",
"$",
"package_class_name",
"]",
"=",
"$",
"class_name",
";",
"self",
"::",
"add",
"(",
"$",
"package_class_name",
",",
... | Adds a class-mapping to the class-mapping object
@param string $package_class_name the name of the package class to
override.
@param string $class_name the name of the site-specific class.
@deprecated Use the static method {@link SwatDBClassMap::add()}. | [
"Adds",
"a",
"class",
"-",
"mapping",
"to",
"the",
"class",
"-",
"mapping",
"object"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/SwatDB/SwatDBClassMap.php#L251-L255 |
33,509 | TeknooSoftware/states | src/State/StateTrait.php | StateTrait.getReflectionClass | private function getReflectionClass(): \ReflectionClass
{
if (null === $this->reflectionClass) {
$this->reflectionClass = new \ReflectionClass(\get_class($this));
}
return $this->reflectionClass;
} | php | private function getReflectionClass(): \ReflectionClass
{
if (null === $this->reflectionClass) {
$this->reflectionClass = new \ReflectionClass(\get_class($this));
}
return $this->reflectionClass;
} | [
"private",
"function",
"getReflectionClass",
"(",
")",
":",
"\\",
"ReflectionClass",
"{",
"if",
"(",
"null",
"===",
"$",
"this",
"->",
"reflectionClass",
")",
"{",
"$",
"this",
"->",
"reflectionClass",
"=",
"new",
"\\",
"ReflectionClass",
"(",
"\\",
"get_cla... | To build the ReflectionClass for the current object.
@api
@return \ReflectionClass
@throws \ReflectionException | [
"To",
"build",
"the",
"ReflectionClass",
"for",
"the",
"current",
"object",
"."
] | 0c675b768781ee3a3a15c2663cffec5d50c1d5fd | https://github.com/TeknooSoftware/states/blob/0c675b768781ee3a3a15c2663cffec5d50c1d5fd/src/State/StateTrait.php#L139-L146 |
33,510 | TeknooSoftware/states | src/State/StateTrait.php | StateTrait.checkVisibilityProtected | private function checkVisibilityProtected(string &$methodName, string &$statedClassOrigin): bool
{
if (false === $this->reflectionsMethods[$methodName]->isPrivate()
&& !empty($statedClassOrigin)
&& ($statedClassOrigin === $this->statedClassName
|| \is_subclass_of($sta... | php | private function checkVisibilityProtected(string &$methodName, string &$statedClassOrigin): bool
{
if (false === $this->reflectionsMethods[$methodName]->isPrivate()
&& !empty($statedClassOrigin)
&& ($statedClassOrigin === $this->statedClassName
|| \is_subclass_of($sta... | [
"private",
"function",
"checkVisibilityProtected",
"(",
"string",
"&",
"$",
"methodName",
",",
"string",
"&",
"$",
"statedClassOrigin",
")",
":",
"bool",
"{",
"if",
"(",
"false",
"===",
"$",
"this",
"->",
"reflectionsMethods",
"[",
"$",
"methodName",
"]",
"-... | Can not access to private methods, only public and protected.
@param string $methodName
@param string $statedClassOrigin
@return bool | [
"Can",
"not",
"access",
"to",
"private",
"methods",
"only",
"public",
"and",
"protected",
"."
] | 0c675b768781ee3a3a15c2663cffec5d50c1d5fd | https://github.com/TeknooSoftware/states/blob/0c675b768781ee3a3a15c2663cffec5d50c1d5fd/src/State/StateTrait.php#L178-L189 |
33,511 | TeknooSoftware/states | src/State/StateTrait.php | StateTrait.checkVisibilityPublic | private function checkVisibilityPublic(string &$methodName): bool
{
if (true === $this->reflectionsMethods[$methodName]->isPublic()) {
//It's a public method, do like if there is no method
return true;
}
return false;
} | php | private function checkVisibilityPublic(string &$methodName): bool
{
if (true === $this->reflectionsMethods[$methodName]->isPublic()) {
//It's a public method, do like if there is no method
return true;
}
return false;
} | [
"private",
"function",
"checkVisibilityPublic",
"(",
"string",
"&",
"$",
"methodName",
")",
":",
"bool",
"{",
"if",
"(",
"true",
"===",
"$",
"this",
"->",
"reflectionsMethods",
"[",
"$",
"methodName",
"]",
"->",
"isPublic",
"(",
")",
")",
"{",
"//It's a pu... | Can not access to protect and private method.
@param string $methodName
@return bool | [
"Can",
"not",
"access",
"to",
"protect",
"and",
"private",
"method",
"."
] | 0c675b768781ee3a3a15c2663cffec5d50c1d5fd | https://github.com/TeknooSoftware/states/blob/0c675b768781ee3a3a15c2663cffec5d50c1d5fd/src/State/StateTrait.php#L198-L206 |
33,512 | brainworxx/kreXX | src/Analyse/Routing/Process/ProcessString.php | ProcessString.process | public function process(Model $model)
{
$data = $model->getData();
// Check if this is a possible callback.
// We are not going to analyse this further, because modern systems
// do not use these anymore.
if (function_exists($data) === true) {
$model->setIsCallba... | php | public function process(Model $model)
{
$data = $model->getData();
// Check if this is a possible callback.
// We are not going to analyse this further, because modern systems
// do not use these anymore.
if (function_exists($data) === true) {
$model->setIsCallba... | [
"public",
"function",
"process",
"(",
"Model",
"$",
"model",
")",
"{",
"$",
"data",
"=",
"$",
"model",
"->",
"getData",
"(",
")",
";",
"// Check if this is a possible callback.",
"// We are not going to analyse this further, because modern systems",
"// do not use these any... | Render a dump for a string value.
@param Model $model
The data we are analysing.
@return string
The rendered markup. | [
"Render",
"a",
"dump",
"for",
"a",
"string",
"value",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Analyse/Routing/Process/ProcessString.php#L79-L132 |
33,513 | silverorange/swat | Swat/SwatRemoveInputCell.php | SwatRemoveInputCell.init | public function init()
{
$row = $this->getInputRow();
if ($row === null) {
throw new SwatException(
'Remove input-cells can only be used ' .
'inside table-views with an input-row.'
);
}
$content = new SwatContentBlock();
... | php | public function init()
{
$row = $this->getInputRow();
if ($row === null) {
throw new SwatException(
'Remove input-cells can only be used ' .
'inside table-views with an input-row.'
);
}
$content = new SwatContentBlock();
... | [
"public",
"function",
"init",
"(",
")",
"{",
"$",
"row",
"=",
"$",
"this",
"->",
"getInputRow",
"(",
")",
";",
"if",
"(",
"$",
"row",
"===",
"null",
")",
"{",
"throw",
"new",
"SwatException",
"(",
"'Remove input-cells can only be used '",
".",
"'inside tab... | Sets the remove widget for this input cell
In SwatRemoveInputCell objects the remove widget is automatically set to
a SwatContentBlock with predefined content for the remove link.
@throws SwatException | [
"Sets",
"the",
"remove",
"widget",
"for",
"this",
"input",
"cell"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatRemoveInputCell.php#L32-L65 |
33,514 | silverorange/swat | Swat/SwatRemoveInputCell.php | SwatRemoveInputCell.display | public function display($replicator_id)
{
$widget = $this->getClonedWidget($replicator_id);
// substitute the replicator_id into the content block's contents
$widget->content = str_replace('%s', $replicator_id, $widget->content);
$widget->display();
} | php | public function display($replicator_id)
{
$widget = $this->getClonedWidget($replicator_id);
// substitute the replicator_id into the content block's contents
$widget->content = str_replace('%s', $replicator_id, $widget->content);
$widget->display();
} | [
"public",
"function",
"display",
"(",
"$",
"replicator_id",
")",
"{",
"$",
"widget",
"=",
"$",
"this",
"->",
"getClonedWidget",
"(",
"$",
"replicator_id",
")",
";",
"// substitute the replicator_id into the content block's contents",
"$",
"widget",
"->",
"content",
... | Displays this remove input cell given a numeric row identifier
@param integer $replicator_id the numeric identifier of the input row
that is being displayed.
@see SwatInputCell::display() | [
"Displays",
"this",
"remove",
"input",
"cell",
"given",
"a",
"numeric",
"row",
"identifier"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatRemoveInputCell.php#L78-L84 |
33,515 | brainworxx/kreXX | src/Errorhandler/AbstractError.php | AbstractError.translateErrorType | protected function translateErrorType($errorint)
{
if (isset($this->errorTranslation[$errorint]) === true) {
return $this->errorTranslation[$errorint];
}
// Fallback to 'unknown'.
return array('Unknown error', 'unknown');
} | php | protected function translateErrorType($errorint)
{
if (isset($this->errorTranslation[$errorint]) === true) {
return $this->errorTranslation[$errorint];
}
// Fallback to 'unknown'.
return array('Unknown error', 'unknown');
} | [
"protected",
"function",
"translateErrorType",
"(",
"$",
"errorint",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"errorTranslation",
"[",
"$",
"errorint",
"]",
")",
"===",
"true",
")",
"{",
"return",
"$",
"this",
"->",
"errorTranslation",
"[",
... | Translates the error number into human readable text.
It also includes the corresponding config
setting, so we can decide if we want to output
anything.
@param int $errorint
The error number.
@return array
The translated type and the setting. | [
"Translates",
"the",
"error",
"number",
"into",
"human",
"readable",
"text",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Errorhandler/AbstractError.php#L133-L141 |
33,516 | silverorange/swat | Swat/SwatCheckAll.php | SwatCheckAll.display | public function display()
{
if (!$this->visible) {
return;
}
$div_tag = new SwatHtmlTag('div');
$div_tag->id = $this->id;
$div_tag->class = $this->getCSSClassString();
$div_tag->open();
$label_tag = new SwatHtmlTag('label');
$label_tag->f... | php | public function display()
{
if (!$this->visible) {
return;
}
$div_tag = new SwatHtmlTag('div');
$div_tag->id = $this->id;
$div_tag->class = $this->getCSSClassString();
$div_tag->open();
$label_tag = new SwatHtmlTag('label');
$label_tag->f... | [
"public",
"function",
"display",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"visible",
")",
"{",
"return",
";",
"}",
"$",
"div_tag",
"=",
"new",
"SwatHtmlTag",
"(",
"'div'",
")",
";",
"$",
"div_tag",
"->",
"id",
"=",
"$",
"this",
"->",
"id... | Displays this check-all widget | [
"Displays",
"this",
"check",
"-",
"all",
"widget"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatCheckAll.php#L100-L139 |
33,517 | zeroem/ZeroemCurlBundle | Curl/CurlOptions.php | CurlOptions.loadOptions | static private function loadOptions() {
if (static::$option_value_types) {
return;
}
$options = array(
'CURLOPT_AUTOREFERER' => "bool",
'CURLOPT_BINARYTRANSFER' => "bool",
'CURLOPT_COOKIESESSION' => "bool",
'CURLOPT_CERTINFO' => "bool... | php | static private function loadOptions() {
if (static::$option_value_types) {
return;
}
$options = array(
'CURLOPT_AUTOREFERER' => "bool",
'CURLOPT_BINARYTRANSFER' => "bool",
'CURLOPT_COOKIESESSION' => "bool",
'CURLOPT_CERTINFO' => "bool... | [
"static",
"private",
"function",
"loadOptions",
"(",
")",
"{",
"if",
"(",
"static",
"::",
"$",
"option_value_types",
")",
"{",
"return",
";",
"}",
"$",
"options",
"=",
"array",
"(",
"'CURLOPT_AUTOREFERER'",
"=>",
"\"bool\"",
",",
"'CURLOPT_BINARYTRANSFER'",
"=... | Checks which cURL constants is defined and loads them as valid options | [
"Checks",
"which",
"cURL",
"constants",
"is",
"defined",
"and",
"loads",
"them",
"as",
"valid",
"options"
] | 1045e2093bec5a013ff9458828721e581725f1a0 | https://github.com/zeroem/ZeroemCurlBundle/blob/1045e2093bec5a013ff9458828721e581725f1a0/Curl/CurlOptions.php#L23-L146 |
33,518 | zeroem/ZeroemCurlBundle | Curl/CurlOptions.php | CurlOptions.checkOptionValue | static public function checkOptionValue($option, $value, $throw = true) {
if (!static::$option_value_types) {
static::loadOptions();
}
if(static::isValidOption($option)) {
$result = static::checkType($value, static::$option_value_types[$option]);
if(!$resul... | php | static public function checkOptionValue($option, $value, $throw = true) {
if (!static::$option_value_types) {
static::loadOptions();
}
if(static::isValidOption($option)) {
$result = static::checkType($value, static::$option_value_types[$option]);
if(!$resul... | [
"static",
"public",
"function",
"checkOptionValue",
"(",
"$",
"option",
",",
"$",
"value",
",",
"$",
"throw",
"=",
"true",
")",
"{",
"if",
"(",
"!",
"static",
"::",
"$",
"option_value_types",
")",
"{",
"static",
"::",
"loadOptions",
"(",
")",
";",
"}",... | Check whether or not the value is a valid type for the given option
@param int $option An integer flag
@param mixed $value the value to be set to the integer flag
@return boolean Whether or not the value is of the correct type
@throws \InvalidArgumentException if the $option _is_not_ a valid cURL option | [
"Check",
"whether",
"or",
"not",
"the",
"value",
"is",
"a",
"valid",
"type",
"for",
"the",
"given",
"option"
] | 1045e2093bec5a013ff9458828721e581725f1a0 | https://github.com/zeroem/ZeroemCurlBundle/blob/1045e2093bec5a013ff9458828721e581725f1a0/Curl/CurlOptions.php#L172-L189 |
33,519 | silverorange/swat | Swat/SwatAbstractOverlay.php | SwatAbstractOverlay.display | public function display()
{
if (!$this->visible) {
return;
}
parent::display();
$container_div_tag = new SwatHtmlTag('div');
$container_div_tag->id = $this->id;
$container_div_tag->class = $this->getCSSClassString();
$container_div_tag->open();
... | php | public function display()
{
if (!$this->visible) {
return;
}
parent::display();
$container_div_tag = new SwatHtmlTag('div');
$container_div_tag->id = $this->id;
$container_div_tag->class = $this->getCSSClassString();
$container_div_tag->open();
... | [
"public",
"function",
"display",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"visible",
")",
"{",
"return",
";",
"}",
"parent",
"::",
"display",
"(",
")",
";",
"$",
"container_div_tag",
"=",
"new",
"SwatHtmlTag",
"(",
"'div'",
")",
";",
"$",
... | Displays this overlay widget | [
"Displays",
"this",
"overlay",
"widget"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatAbstractOverlay.php#L73-L98 |
33,520 | rollun-com/rollun-datastore | src/Uploader/src/Iterator/DataStorePack.php | DataStorePack.getQuery | protected function getQuery()
{
$query = new Query();
if ($this->valid()) {
$query->setQuery(new GtNode($this->dataStore->getIdentifier(), $this->key()));
}
$query->setLimit(new LimitNode($this->limit));
$query->setSort(new SortNode([$this->dataStore->getIdentif... | php | protected function getQuery()
{
$query = new Query();
if ($this->valid()) {
$query->setQuery(new GtNode($this->dataStore->getIdentifier(), $this->key()));
}
$query->setLimit(new LimitNode($this->limit));
$query->setSort(new SortNode([$this->dataStore->getIdentif... | [
"protected",
"function",
"getQuery",
"(",
")",
"{",
"$",
"query",
"=",
"new",
"Query",
"(",
")",
";",
"if",
"(",
"$",
"this",
"->",
"valid",
"(",
")",
")",
"{",
"$",
"query",
"->",
"setQuery",
"(",
"new",
"GtNode",
"(",
"$",
"this",
"->",
"dataSt... | Return query with limit and offset | [
"Return",
"query",
"with",
"limit",
"and",
"offset"
] | ef433b58b94e1c311123ad1b2a0360e95a636bd1 | https://github.com/rollun-com/rollun-datastore/blob/ef433b58b94e1c311123ad1b2a0360e95a636bd1/src/Uploader/src/Iterator/DataStorePack.php#L64-L76 |
33,521 | rollun-com/rollun-datastore | src/DataStore/src/DataStore/HttpClient.php | HttpClient.initHttpClient | protected function initHttpClient(string $method, string $uri, $ifMatch = false)
{
$httpClient = clone $this->client;
$httpClient->setUri($uri);
$httpClient->setOptions($this->options);
$headers['Content-Type'] = 'application/json';
$headers['Accept'] = 'application/json';
... | php | protected function initHttpClient(string $method, string $uri, $ifMatch = false)
{
$httpClient = clone $this->client;
$httpClient->setUri($uri);
$httpClient->setOptions($this->options);
$headers['Content-Type'] = 'application/json';
$headers['Accept'] = 'application/json';
... | [
"protected",
"function",
"initHttpClient",
"(",
"string",
"$",
"method",
",",
"string",
"$",
"uri",
",",
"$",
"ifMatch",
"=",
"false",
")",
"{",
"$",
"httpClient",
"=",
"clone",
"$",
"this",
"->",
"client",
";",
"$",
"httpClient",
"->",
"setUri",
"(",
... | Create http client
@param string $method ('GET', 'HEAD', 'POST', 'PUT', 'DELETE')
@param string $uri
@param bool $ifMatch
@return Client | [
"Create",
"http",
"client"
] | ef433b58b94e1c311123ad1b2a0360e95a636bd1 | https://github.com/rollun-com/rollun-datastore/blob/ef433b58b94e1c311123ad1b2a0360e95a636bd1/src/DataStore/src/DataStore/HttpClient.php#L110-L132 |
33,522 | silverorange/swat | Swat/SwatReplicableNoteBookPage.php | SwatReplicableNoteBookPage.init | public function init()
{
$children = array();
foreach ($this->children as $child_widget) {
$children[] = $this->remove($child_widget);
}
$page = new SwatNoteBookPage();
$page->id = $page->getUniqueId();
$page_prototype_id = $page->id;
foreach ($c... | php | public function init()
{
$children = array();
foreach ($this->children as $child_widget) {
$children[] = $this->remove($child_widget);
}
$page = new SwatNoteBookPage();
$page->id = $page->getUniqueId();
$page_prototype_id = $page->id;
foreach ($c... | [
"public",
"function",
"init",
"(",
")",
"{",
"$",
"children",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"children",
"as",
"$",
"child_widget",
")",
"{",
"$",
"children",
"[",
"]",
"=",
"$",
"this",
"->",
"remove",
"(",
"$",
... | Initilizes this replicable notebook page | [
"Initilizes",
"this",
"replicable",
"notebook",
"page"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatReplicableNoteBookPage.php#L24-L56 |
33,523 | silverorange/swat | Swat/SwatGroupedFlydown.php | SwatGroupedFlydown.display | public function display()
{
if (!$this->visible) {
return;
}
SwatWidget::display();
// tree is copied for display so we can add a blank node if show_blank
// is true
$display_tree = $this->getDisplayTree();
$count = count($display_tree) - 1;
... | php | public function display()
{
if (!$this->visible) {
return;
}
SwatWidget::display();
// tree is copied for display so we can add a blank node if show_blank
// is true
$display_tree = $this->getDisplayTree();
$count = count($display_tree) - 1;
... | [
"public",
"function",
"display",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"visible",
")",
"{",
"return",
";",
"}",
"SwatWidget",
"::",
"display",
"(",
")",
";",
"// tree is copied for display so we can add a blank node if show_blank",
"// is true",
"$",
... | Displays this grouped flydown
Displays this flydown as a XHTML select. Level 1 tree nodes are
displayed as optgroups if their value is null, they have children and
they are not dividers. | [
"Displays",
"this",
"grouped",
"flydown"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatGroupedFlydown.php#L43-L80 |
33,524 | silverorange/swat | Swat/SwatGroupedFlydown.php | SwatGroupedFlydown.checkTree | protected function checkTree(SwatTreeFlydownNode $tree, $level = 0)
{
if ($level > 2) {
throw new SwatException(
'SwatGroupedFlydown tree must not be ' .
'more than 3 levels including the root node.'
);
}
foreach ($tree->getChildre... | php | protected function checkTree(SwatTreeFlydownNode $tree, $level = 0)
{
if ($level > 2) {
throw new SwatException(
'SwatGroupedFlydown tree must not be ' .
'more than 3 levels including the root node.'
);
}
foreach ($tree->getChildre... | [
"protected",
"function",
"checkTree",
"(",
"SwatTreeFlydownNode",
"$",
"tree",
",",
"$",
"level",
"=",
"0",
")",
"{",
"if",
"(",
"$",
"level",
">",
"2",
")",
"{",
"throw",
"new",
"SwatException",
"(",
"'SwatGroupedFlydown tree must not be '",
".",
"'more than ... | Checks a tree to ensure it is valid for a grouped flydown
@param SwatTreeFlydownNode the tree to check.
@throws SwatException if the tree is not valid for a grouped flydown. | [
"Checks",
"a",
"tree",
"to",
"ensure",
"it",
"is",
"valid",
"for",
"a",
"grouped",
"flydown"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatGroupedFlydown.php#L92-L104 |
33,525 | silverorange/swat | Swat/SwatGroupedFlydown.php | SwatGroupedFlydown.displayNode | protected function displayNode(
SwatTreeFlydownNode $node,
$level = 0,
$selected = false
) {
$children = $node->getChildren();
$flydown_option = $node->getOption();
if (
$level == 1 &&
count($children) > 0 &&
end($flydown_option->v... | php | protected function displayNode(
SwatTreeFlydownNode $node,
$level = 0,
$selected = false
) {
$children = $node->getChildren();
$flydown_option = $node->getOption();
if (
$level == 1 &&
count($children) > 0 &&
end($flydown_option->v... | [
"protected",
"function",
"displayNode",
"(",
"SwatTreeFlydownNode",
"$",
"node",
",",
"$",
"level",
"=",
"0",
",",
"$",
"selected",
"=",
"false",
")",
"{",
"$",
"children",
"=",
"$",
"node",
"->",
"getChildren",
"(",
")",
";",
"$",
"flydown_option",
"=",... | Displays a grouped tree flydown node and its child nodes
Level 1 tree nodes are displayed as optgroups if their value is null,
they have children and they are not dividers.
@param SwatTreeFlydownNode $node the node to display.
@param integer $level the current level of the tree node.
@param array $path an array of va... | [
"Displays",
"a",
"grouped",
"tree",
"flydown",
"node",
"and",
"its",
"child",
"nodes"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatGroupedFlydown.php#L122-L183 |
33,526 | silverorange/swat | Swat/SwatGroupedFlydown.php | SwatGroupedFlydown.buildDisplayTree | protected function buildDisplayTree(
SwatTreeFlydownNode $tree,
SwatTreeFlydownNode $parent,
$path = array()
) {
$flydown_option = $tree->getOption();
$path[] = $flydown_option->value;
$new_node = new SwatTreeFlydownNode($path, $flydown_option->title);
$paren... | php | protected function buildDisplayTree(
SwatTreeFlydownNode $tree,
SwatTreeFlydownNode $parent,
$path = array()
) {
$flydown_option = $tree->getOption();
$path[] = $flydown_option->value;
$new_node = new SwatTreeFlydownNode($path, $flydown_option->title);
$paren... | [
"protected",
"function",
"buildDisplayTree",
"(",
"SwatTreeFlydownNode",
"$",
"tree",
",",
"SwatTreeFlydownNode",
"$",
"parent",
",",
"$",
"path",
"=",
"array",
"(",
")",
")",
"{",
"$",
"flydown_option",
"=",
"$",
"tree",
"->",
"getOption",
"(",
")",
";",
... | Builds this grouped flydown's display tree by copying nodes from this
grouped flydown's tree
@param SwatTreeFlydownNode $tree the source tree node to build from.
@param SwatTreeFlydownNode $parent the destination parent node to add
display tree nodes to.
@param array $path the current path of the display tree. | [
"Builds",
"this",
"grouped",
"flydown",
"s",
"display",
"tree",
"by",
"copying",
"nodes",
"from",
"this",
"grouped",
"flydown",
"s",
"tree"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatGroupedFlydown.php#L197-L210 |
33,527 | silverorange/swat | Swat/SwatGroupedFlydown.php | SwatGroupedFlydown.getDisplayTree | protected function getDisplayTree()
{
$display_tree = new SwatTreeFlydownNode(null, 'root');
if ($this->show_blank) {
$display_tree->addChild(
new SwatTreeFlydownNode(null, $this->blank_title)
);
}
foreach ($this->tree->getChildren() as $child... | php | protected function getDisplayTree()
{
$display_tree = new SwatTreeFlydownNode(null, 'root');
if ($this->show_blank) {
$display_tree->addChild(
new SwatTreeFlydownNode(null, $this->blank_title)
);
}
foreach ($this->tree->getChildren() as $child... | [
"protected",
"function",
"getDisplayTree",
"(",
")",
"{",
"$",
"display_tree",
"=",
"new",
"SwatTreeFlydownNode",
"(",
"null",
",",
"'root'",
")",
";",
"if",
"(",
"$",
"this",
"->",
"show_blank",
")",
"{",
"$",
"display_tree",
"->",
"addChild",
"(",
"new",... | Gets the display tree of this grouped flydown
The display tree is copied from this grouped flydown's tree. If
{@link SwatGroupedFlydown::$show_blank} is true, a blank node is
inserted as the first child of the root node of the display tree.
The value of a display tree node is set to an array representing the
path to ... | [
"Gets",
"the",
"display",
"tree",
"of",
"this",
"grouped",
"flydown"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatGroupedFlydown.php#L227-L241 |
33,528 | silverorange/swat | Swat/SwatCellRendererContainer.php | SwatCellRendererContainer.addMappingToRenderer | public function addMappingToRenderer(
$renderer,
$data_field,
$property,
$object = null
) {
if ($object !== null) {
$property = $renderer->getPropertyNameToMap($object, $property);
}
$mapping = new SwatCellRendererMapping($property, $data_field);
... | php | public function addMappingToRenderer(
$renderer,
$data_field,
$property,
$object = null
) {
if ($object !== null) {
$property = $renderer->getPropertyNameToMap($object, $property);
}
$mapping = new SwatCellRendererMapping($property, $data_field);
... | [
"public",
"function",
"addMappingToRenderer",
"(",
"$",
"renderer",
",",
"$",
"data_field",
",",
"$",
"property",
",",
"$",
"object",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"object",
"!==",
"null",
")",
"{",
"$",
"property",
"=",
"$",
"renderer",
"->",... | Links a data-field to a cell renderer property of a cell renderer
within this container
@param SwatCellRenderer $renderer the cell renderer in this container
onto which the data-field is to be
mapped.
@param string $data_field the field of the data model to map to the cell
renderer property.
@param string $property th... | [
"Links",
"a",
"data",
"-",
"field",
"to",
"a",
"cell",
"renderer",
"property",
"of",
"a",
"cell",
"renderer",
"within",
"this",
"container"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatCellRendererContainer.php#L57-L75 |
33,529 | silverorange/swat | Swat/SwatCellRendererContainer.php | SwatCellRendererContainer.addRenderer | public function addRenderer(SwatCellRenderer $renderer)
{
$this->renderers->addRenderer($renderer);
$renderer->parent = $this;
} | php | public function addRenderer(SwatCellRenderer $renderer)
{
$this->renderers->addRenderer($renderer);
$renderer->parent = $this;
} | [
"public",
"function",
"addRenderer",
"(",
"SwatCellRenderer",
"$",
"renderer",
")",
"{",
"$",
"this",
"->",
"renderers",
"->",
"addRenderer",
"(",
"$",
"renderer",
")",
";",
"$",
"renderer",
"->",
"parent",
"=",
"$",
"this",
";",
"}"
] | Adds a cell renderer to this container's set of renderers
@param SwatCellRenderer $renderer the renderer to add. | [
"Adds",
"a",
"cell",
"renderer",
"to",
"this",
"container",
"s",
"set",
"of",
"renderers"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatCellRendererContainer.php#L85-L89 |
33,530 | silverorange/swat | Swat/SwatCellRendererContainer.php | SwatCellRendererContainer.getRenderers | public function getRenderers()
{
$out = array();
$renderers = clone $this->renderers;
foreach ($renderers as $renderer) {
$out[] = $renderer;
}
return $out;
} | php | public function getRenderers()
{
$out = array();
$renderers = clone $this->renderers;
foreach ($renderers as $renderer) {
$out[] = $renderer;
}
return $out;
} | [
"public",
"function",
"getRenderers",
"(",
")",
"{",
"$",
"out",
"=",
"array",
"(",
")",
";",
"$",
"renderers",
"=",
"clone",
"$",
"this",
"->",
"renderers",
";",
"foreach",
"(",
"$",
"renderers",
"as",
"$",
"renderer",
")",
"{",
"$",
"out",
"[",
"... | Gets the cell renderers of this container
@return array an array containing the cell renderers in this container. | [
"Gets",
"the",
"cell",
"renderers",
"of",
"this",
"container"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatCellRendererContainer.php#L99-L108 |
33,531 | silverorange/swat | Swat/SwatCellRendererContainer.php | SwatCellRendererContainer.getHtmlHeadEntrySet | public function getHtmlHeadEntrySet()
{
$set = parent::getHtmlHeadEntrySet();
$renderers = $this->getRenderers();
foreach ($renderers as $renderer) {
$set->addEntrySet($renderer->getHtmlHeadEntrySet());
}
return $set;
} | php | public function getHtmlHeadEntrySet()
{
$set = parent::getHtmlHeadEntrySet();
$renderers = $this->getRenderers();
foreach ($renderers as $renderer) {
$set->addEntrySet($renderer->getHtmlHeadEntrySet());
}
return $set;
} | [
"public",
"function",
"getHtmlHeadEntrySet",
"(",
")",
"{",
"$",
"set",
"=",
"parent",
"::",
"getHtmlHeadEntrySet",
"(",
")",
";",
"$",
"renderers",
"=",
"$",
"this",
"->",
"getRenderers",
"(",
")",
";",
"foreach",
"(",
"$",
"renderers",
"as",
"$",
"rend... | Gets the SwatHtmlHeadEntry objects needed by this cell renderer
container
@return SwatHtmlHeadEntrySet the SwatHtmlHeadEntry objects needed by
this cell renderer container.
@see SwatUIObject::getHtmlHeadEntrySet() | [
"Gets",
"the",
"SwatHtmlHeadEntry",
"objects",
"needed",
"by",
"this",
"cell",
"renderer",
"container"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatCellRendererContainer.php#L337-L347 |
33,532 | silverorange/swat | Swat/SwatCellRendererContainer.php | SwatCellRendererContainer.getAvailableHtmlHeadEntrySet | public function getAvailableHtmlHeadEntrySet()
{
$set = parent::getAvailableHtmlHeadEntrySet();
$renderers = $this->getRenderers();
foreach ($renderers as $renderer) {
$set->addEntrySet($renderer->getAvailableHtmlHeadEntrySet());
}
return $set;
} | php | public function getAvailableHtmlHeadEntrySet()
{
$set = parent::getAvailableHtmlHeadEntrySet();
$renderers = $this->getRenderers();
foreach ($renderers as $renderer) {
$set->addEntrySet($renderer->getAvailableHtmlHeadEntrySet());
}
return $set;
} | [
"public",
"function",
"getAvailableHtmlHeadEntrySet",
"(",
")",
"{",
"$",
"set",
"=",
"parent",
"::",
"getAvailableHtmlHeadEntrySet",
"(",
")",
";",
"$",
"renderers",
"=",
"$",
"this",
"->",
"getRenderers",
"(",
")",
";",
"foreach",
"(",
"$",
"renderers",
"a... | Gets the SwatHtmlHeadEntry objects that may be needed by this cell
renderer container
@return SwatHtmlHeadEntrySet the SwatHtmlHeadEntry objects that may be
needed by this cell renderer container.
@see SwatUIObject::getAvailableHtmlHeadEntrySet() | [
"Gets",
"the",
"SwatHtmlHeadEntry",
"objects",
"that",
"may",
"be",
"needed",
"by",
"this",
"cell",
"renderer",
"container"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatCellRendererContainer.php#L361-L370 |
33,533 | silverorange/swat | Swat/SwatCellRendererContainer.php | SwatCellRendererContainer.getRendererInlineJavaScript | public function getRendererInlineJavaScript()
{
$javascript = '';
foreach ($this->getRenderers() as $renderer) {
$renderer_javascript = $renderer->getInlineJavaScript();
if ($renderer_javascript != '') {
$javascript = "\n" . $renderer_javascript;
... | php | public function getRendererInlineJavaScript()
{
$javascript = '';
foreach ($this->getRenderers() as $renderer) {
$renderer_javascript = $renderer->getInlineJavaScript();
if ($renderer_javascript != '') {
$javascript = "\n" . $renderer_javascript;
... | [
"public",
"function",
"getRendererInlineJavaScript",
"(",
")",
"{",
"$",
"javascript",
"=",
"''",
";",
"foreach",
"(",
"$",
"this",
"->",
"getRenderers",
"(",
")",
"as",
"$",
"renderer",
")",
"{",
"$",
"renderer_javascript",
"=",
"$",
"renderer",
"->",
"ge... | Gets inline JavaScript used by all cell renderers within this cell
renderer container
@return string the inline JavaScript used by all cell renderers within
this cell renderer container. | [
"Gets",
"inline",
"JavaScript",
"used",
"by",
"all",
"cell",
"renderers",
"within",
"this",
"cell",
"renderer",
"container"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatCellRendererContainer.php#L382-L394 |
33,534 | silverorange/swat | Swat/SwatNumber.php | SwatNumber.roundUp | public static function roundUp($value, $fractional_digits)
{
$power = pow(10, $fractional_digits);
$value = ceil($value * $power) / $power;
return $value;
} | php | public static function roundUp($value, $fractional_digits)
{
$power = pow(10, $fractional_digits);
$value = ceil($value * $power) / $power;
return $value;
} | [
"public",
"static",
"function",
"roundUp",
"(",
"$",
"value",
",",
"$",
"fractional_digits",
")",
"{",
"$",
"power",
"=",
"pow",
"(",
"10",
",",
"$",
"fractional_digits",
")",
";",
"$",
"value",
"=",
"ceil",
"(",
"$",
"value",
"*",
"$",
"power",
")",... | Rounds a number to the specified number of fractional digits using the
round-half-up rounding method
See {@link http://en.wikipedia.org/wiki/Rounding#Round_half_up}.
@param float $value the value to round.
@param integer $fractional_digits the number of fractional digits in the
rounded result.
@return float the roun... | [
"Rounds",
"a",
"number",
"to",
"the",
"specified",
"number",
"of",
"fractional",
"digits",
"using",
"the",
"round",
"-",
"half",
"-",
"up",
"rounding",
"method"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatNumber.php#L26-L32 |
33,535 | rhoone/yii2-rhoone | base/Rhoone.php | Rhoone.search | public function search($keyword = "")
{
Yii::trace("Begin searching...", __METHOD__);
$matches = $this->match($keyword);
$results = [];
foreach ($matches as $extension) {
$results[$extension->extension->id()] = $extension->extension->search($keyword);
}
re... | php | public function search($keyword = "")
{
Yii::trace("Begin searching...", __METHOD__);
$matches = $this->match($keyword);
$results = [];
foreach ($matches as $extension) {
$results[$extension->extension->id()] = $extension->extension->search($keyword);
}
re... | [
"public",
"function",
"search",
"(",
"$",
"keyword",
"=",
"\"\"",
")",
"{",
"Yii",
"::",
"trace",
"(",
"\"Begin searching...\"",
",",
"__METHOD__",
")",
";",
"$",
"matches",
"=",
"$",
"this",
"->",
"match",
"(",
"$",
"keyword",
")",
";",
"$",
"results"... | Search for result to the keywords.
@param string $keyword | [
"Search",
"for",
"result",
"to",
"the",
"keywords",
"."
] | f6ae90d466ea6f34bba404be0aba03e37ef369ad | https://github.com/rhoone/yii2-rhoone/blob/f6ae90d466ea6f34bba404be0aba03e37ef369ad/base/Rhoone.php#L141-L150 |
33,536 | silverorange/swat | Swat/SwatRadioButtonCellRenderer.php | SwatRadioButtonCellRenderer.process | public function process()
{
$form = $this->getForm();
if ($form !== null && $form->isSubmitted()) {
$data = $form->getFormData();
if (isset($data[$this->id])) {
$this->selected_value = $data[$this->id];
$view = $this->getFirstAncestor('SwatVie... | php | public function process()
{
$form = $this->getForm();
if ($form !== null && $form->isSubmitted()) {
$data = $form->getFormData();
if (isset($data[$this->id])) {
$this->selected_value = $data[$this->id];
$view = $this->getFirstAncestor('SwatVie... | [
"public",
"function",
"process",
"(",
")",
"{",
"$",
"form",
"=",
"$",
"this",
"->",
"getForm",
"(",
")",
";",
"if",
"(",
"$",
"form",
"!==",
"null",
"&&",
"$",
"form",
"->",
"isSubmitted",
"(",
")",
")",
"{",
"$",
"data",
"=",
"$",
"form",
"->... | Processes this radio button cell renderer | [
"Processes",
"this",
"radio",
"button",
"cell",
"renderer"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatRadioButtonCellRenderer.php#L101-L119 |
33,537 | silverorange/swat | Swat/SwatRadioButtonCellRenderer.php | SwatRadioButtonCellRenderer.render | public function render()
{
if (!$this->visible) {
return;
}
parent::render();
if ($this->title !== null) {
$label_tag = new SwatHtmlTag('label');
$label_tag->for = $this->id . '_radio_button_' . $this->value;
$label_tag->setContent($t... | php | public function render()
{
if (!$this->visible) {
return;
}
parent::render();
if ($this->title !== null) {
$label_tag = new SwatHtmlTag('label');
$label_tag->for = $this->id . '_radio_button_' . $this->value;
$label_tag->setContent($t... | [
"public",
"function",
"render",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"visible",
")",
"{",
"return",
";",
"}",
"parent",
"::",
"render",
"(",
")",
";",
"if",
"(",
"$",
"this",
"->",
"title",
"!==",
"null",
")",
"{",
"$",
"label_tag",
... | Renders this radio button cell renderer | [
"Renders",
"this",
"radio",
"button",
"cell",
"renderer"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatRadioButtonCellRenderer.php#L127-L168 |
33,538 | silverorange/swat | Swat/SwatRadioButtonCellRenderer.php | SwatRadioButtonCellRenderer.getInlineJavaScript | public function getInlineJavaScript()
{
$view = $this->getFirstAncestor('SwatView');
if ($view !== null) {
$javascript = sprintf(
"var %s = new SwatRadioButtonCellRenderer('%s', %s);",
$this->id,
$this->id,
$view->id
... | php | public function getInlineJavaScript()
{
$view = $this->getFirstAncestor('SwatView');
if ($view !== null) {
$javascript = sprintf(
"var %s = new SwatRadioButtonCellRenderer('%s', %s);",
$this->id,
$this->id,
$view->id
... | [
"public",
"function",
"getInlineJavaScript",
"(",
")",
"{",
"$",
"view",
"=",
"$",
"this",
"->",
"getFirstAncestor",
"(",
"'SwatView'",
")",
";",
"if",
"(",
"$",
"view",
"!==",
"null",
")",
"{",
"$",
"javascript",
"=",
"sprintf",
"(",
"\"var %s = new SwatR... | Gets the inline JavaScript required by this radio button cell renderer
@return string the inline JavaScript required by this radio button cell
renderer. | [
"Gets",
"the",
"inline",
"JavaScript",
"required",
"by",
"this",
"radio",
"button",
"cell",
"renderer"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatRadioButtonCellRenderer.php#L194-L209 |
33,539 | silverorange/swat | Swat/SwatGroupingFormField.php | SwatGroupingFormField.getTitleTag | protected function getTitleTag()
{
$legend_tag = new SwatHtmlTag('legend');
$legend_tag->setContent($this->title, $this->title_content_type);
return $legend_tag;
} | php | protected function getTitleTag()
{
$legend_tag = new SwatHtmlTag('legend');
$legend_tag->setContent($this->title, $this->title_content_type);
return $legend_tag;
} | [
"protected",
"function",
"getTitleTag",
"(",
")",
"{",
"$",
"legend_tag",
"=",
"new",
"SwatHtmlTag",
"(",
"'legend'",
")",
";",
"$",
"legend_tag",
"->",
"setContent",
"(",
"$",
"this",
"->",
"title",
",",
"$",
"this",
"->",
"title_content_type",
")",
";",
... | Get a SwatHtmlTag to display the title.
Subclasses can change this to change their appearance.
@return SwatHtmlTag a tag object containing the title. | [
"Get",
"a",
"SwatHtmlTag",
"to",
"display",
"the",
"title",
"."
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatGroupingFormField.php#L24-L30 |
33,540 | brainworxx/kreXX | src/Analyse/Callback/Analyse/Objects/ProtectedProperties.php | ProtectedProperties.callMe | public function callMe()
{
$output = $this->dispatchStartEvent();
/** @var \Brainworxx\Krexx\Service\Reflection\ReflectionClass $ref */
$ref = $this->parameters[static::PARAM_REF];
$refProps = $ref->getProperties(\ReflectionProperty::IS_PROTECTED);
if (empty($refProps) === t... | php | public function callMe()
{
$output = $this->dispatchStartEvent();
/** @var \Brainworxx\Krexx\Service\Reflection\ReflectionClass $ref */
$ref = $this->parameters[static::PARAM_REF];
$refProps = $ref->getProperties(\ReflectionProperty::IS_PROTECTED);
if (empty($refProps) === t... | [
"public",
"function",
"callMe",
"(",
")",
"{",
"$",
"output",
"=",
"$",
"this",
"->",
"dispatchStartEvent",
"(",
")",
";",
"/** @var \\Brainworxx\\Krexx\\Service\\Reflection\\ReflectionClass $ref */",
"$",
"ref",
"=",
"$",
"this",
"->",
"parameters",
"[",
"static",
... | Dump all protected properties.
@return string
The generated HTML markup | [
"Dump",
"all",
"protected",
"properties",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Analyse/Callback/Analyse/Objects/ProtectedProperties.php#L60-L79 |
33,541 | silverorange/swat | Swat/SwatDate.php | SwatDate.format | public function format($format, $tz_format = null)
{
if (is_int($format)) {
$format = self::getFormatById($format);
}
$out = parent::format($format);
if ($tz_format !== null) {
$out .= ' ' . $this->formatTZ($tz_format);
}
return $out;
} | php | public function format($format, $tz_format = null)
{
if (is_int($format)) {
$format = self::getFormatById($format);
}
$out = parent::format($format);
if ($tz_format !== null) {
$out .= ' ' . $this->formatTZ($tz_format);
}
return $out;
} | [
"public",
"function",
"format",
"(",
"$",
"format",
",",
"$",
"tz_format",
"=",
"null",
")",
"{",
"if",
"(",
"is_int",
"(",
"$",
"format",
")",
")",
"{",
"$",
"format",
"=",
"self",
"::",
"getFormatById",
"(",
"$",
"format",
")",
";",
"}",
"$",
"... | Formats this date given either a format string or a format id
Note: The results of this method are not localized. For a localized
formatted date, use {@link SwatDate::formatLikeIntl()} or
{@link SwatDate::formatLikeStrftime()}.
@param mixed $format either a format string or an integer format id.
@param integer $tz_fo... | [
"Formats",
"this",
"date",
"given",
"either",
"a",
"format",
"string",
"or",
"a",
"format",
"id"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatDate.php#L351-L364 |
33,542 | silverorange/swat | Swat/SwatDate.php | SwatDate.formatLikeIntl | public function formatLikeIntl($format, $tz_format = null, $locale = null)
{
if (is_int($format)) {
$format = self::getFormatLikeIntlById($format);
}
if ($locale == '') {
$locale = setlocale(LC_TIME, 0);
}
static $formatters = array();
if (!... | php | public function formatLikeIntl($format, $tz_format = null, $locale = null)
{
if (is_int($format)) {
$format = self::getFormatLikeIntlById($format);
}
if ($locale == '') {
$locale = setlocale(LC_TIME, 0);
}
static $formatters = array();
if (!... | [
"public",
"function",
"formatLikeIntl",
"(",
"$",
"format",
",",
"$",
"tz_format",
"=",
"null",
",",
"$",
"locale",
"=",
"null",
")",
"{",
"if",
"(",
"is_int",
"(",
"$",
"format",
")",
")",
"{",
"$",
"format",
"=",
"self",
"::",
"getFormatLikeIntlById"... | Formats this date using the ICU IntlDateFormater given either a format
string or a format id
This method returns localized results.
@param mixed $format either a format string or an integer format id.
@param integer $tz_format optional. A time zone format id.
@param string $locale optional. The locale to use to forma... | [
"Formats",
"this",
"date",
"using",
"the",
"ICU",
"IntlDateFormater",
"given",
"either",
"a",
"format",
"string",
"or",
"a",
"format",
"id"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatDate.php#L426-L458 |
33,543 | silverorange/swat | Swat/SwatDate.php | SwatDate.formatTZ | public function formatTZ($format)
{
$out = '';
switch ($format) {
case self::TZ_ID:
$out = $this->format('e');
break;
case self::TZ_SHORT:
case self::TZ_LONG:
$id = $this->format('e');
$abbreviation... | php | public function formatTZ($format)
{
$out = '';
switch ($format) {
case self::TZ_ID:
$out = $this->format('e');
break;
case self::TZ_SHORT:
case self::TZ_LONG:
$id = $this->format('e');
$abbreviation... | [
"public",
"function",
"formatTZ",
"(",
"$",
"format",
")",
"{",
"$",
"out",
"=",
"''",
";",
"switch",
"(",
"$",
"format",
")",
"{",
"case",
"self",
"::",
"TZ_ID",
":",
"$",
"out",
"=",
"$",
"this",
"->",
"format",
"(",
"'e'",
")",
";",
"break",
... | Formats the time zone part of this date
@param integer $format an integer time zone format id.
@return string the formatted time zone. | [
"Formats",
"the",
"time",
"zone",
"part",
"of",
"this",
"date"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatDate.php#L470-L526 |
33,544 | silverorange/swat | Swat/SwatDate.php | SwatDate.getFormatById | public static function getFormatById($id)
{
// Note: The format() method does not localize results, so these
// format codes are _not_ wrapped in gettext calls.
switch ($id) {
case self::DF_MDY:
return 'm/d/y';
case self::DF_MDY_SHORT:
... | php | public static function getFormatById($id)
{
// Note: The format() method does not localize results, so these
// format codes are _not_ wrapped in gettext calls.
switch ($id) {
case self::DF_MDY:
return 'm/d/y';
case self::DF_MDY_SHORT:
... | [
"public",
"static",
"function",
"getFormatById",
"(",
"$",
"id",
")",
"{",
"// Note: The format() method does not localize results, so these",
"// format codes are _not_ wrapped in gettext calls.",
"switch",
"(",
"$",
"id",
")",
"{",
"case",
"self",
"::",
"DF_MDY",
":",
"... | Gets a date format string by id
@param integer $id the id of the format string to retrieve.
@return string the formatting string that was requested.
@throws SwatException | [
"Gets",
"a",
"date",
"format",
"string",
"by",
"id"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatDate.php#L647-L690 |
33,545 | silverorange/swat | Swat/SwatDate.php | SwatDate.getTimeZoneAbbreviations | public static function getTimeZoneAbbreviations()
{
static $shortnames = null;
if (self::$tz_abbreviations === null) {
self::$tz_abbreviations = array();
$abbreviations = DateTimeZone::listAbbreviations();
foreach ($abbreviations as $abbreviation => $time_zones)... | php | public static function getTimeZoneAbbreviations()
{
static $shortnames = null;
if (self::$tz_abbreviations === null) {
self::$tz_abbreviations = array();
$abbreviations = DateTimeZone::listAbbreviations();
foreach ($abbreviations as $abbreviation => $time_zones)... | [
"public",
"static",
"function",
"getTimeZoneAbbreviations",
"(",
")",
"{",
"static",
"$",
"shortnames",
"=",
"null",
";",
"if",
"(",
"self",
"::",
"$",
"tz_abbreviations",
"===",
"null",
")",
"{",
"self",
"::",
"$",
"tz_abbreviations",
"=",
"array",
"(",
"... | Gets a mapping of time zone names to time zone abbreviations
Note: the data generated by this method is cached in a static array. The
first call will be relatively expensive but subsequent calls won't do
additional calculation.
@return array an array where the array key is a time zone name and the
array value is an a... | [
"Gets",
"a",
"mapping",
"of",
"time",
"zone",
"names",
"to",
"time",
"zone",
"abbreviations"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatDate.php#L815-L844 |
33,546 | silverorange/swat | Swat/SwatDate.php | SwatDate.getTimeZoneAbbreviation | public static function getTimeZoneAbbreviation(DateTimeZone $time_zone)
{
$abbreviations = self::getTimeZoneAbbreviations();
$key = $time_zone->getName();
if (array_key_exists($key, $abbreviations)) {
$abbreviation = $abbreviations[$key];
}
return $abbreviation;... | php | public static function getTimeZoneAbbreviation(DateTimeZone $time_zone)
{
$abbreviations = self::getTimeZoneAbbreviations();
$key = $time_zone->getName();
if (array_key_exists($key, $abbreviations)) {
$abbreviation = $abbreviations[$key];
}
return $abbreviation;... | [
"public",
"static",
"function",
"getTimeZoneAbbreviation",
"(",
"DateTimeZone",
"$",
"time_zone",
")",
"{",
"$",
"abbreviations",
"=",
"self",
"::",
"getTimeZoneAbbreviations",
"(",
")",
";",
"$",
"key",
"=",
"$",
"time_zone",
"->",
"getName",
"(",
")",
";",
... | Gets an array of time zone abbreviations for a specific time zone
@param DateTimeZone $time_zone the new time zone.
@return array an array containing one or both of
- 'st' for the standard time abbreviation, and
- 'dt' for the daylight time abbreviation. | [
"Gets",
"an",
"array",
"of",
"time",
"zone",
"abbreviations",
"for",
"a",
"specific",
"time",
"zone"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatDate.php#L858-L868 |
33,547 | silverorange/swat | Swat/SwatDate.php | SwatDate.compare | public static function compare(DateTime $date1, DateTime $date2)
{
// Not using getTimestamp() here because it is clamped to the 32-bit
// signed integer range. Float compaison should be safe here as the
// number are within the double-precision offered by floats and can
// be repres... | php | public static function compare(DateTime $date1, DateTime $date2)
{
// Not using getTimestamp() here because it is clamped to the 32-bit
// signed integer range. Float compaison should be safe here as the
// number are within the double-precision offered by floats and can
// be repres... | [
"public",
"static",
"function",
"compare",
"(",
"DateTime",
"$",
"date1",
",",
"DateTime",
"$",
"date2",
")",
"{",
"// Not using getTimestamp() here because it is clamped to the 32-bit",
"// signed integer range. Float compaison should be safe here as the",
"// number are within the ... | Compares two SwatDates
This method is provided for backwards compatibility with PEAR::Date.
@param DateTime $date1 the first date to compare.
@param DateTime $date2 the second date to compare.
@return integer a tri-value where -1 indicates $date1 is before $date2,
0 indicates $date1 is equivalent to $date2 and 1
ind... | [
"Compares",
"two",
"SwatDates"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatDate.php#L885-L903 |
33,548 | silverorange/swat | Swat/SwatDate.php | SwatDate.getIntervalFromSeconds | public static function getIntervalFromSeconds($seconds)
{
// don't care about micro-seconds.
$seconds = floor(abs($seconds));
$minute = 60;
$hour = $minute * 60;
$day = $hour * 24;
$month = $day * 30;
$year = $day * 365;
$interval_spec = 'P';
... | php | public static function getIntervalFromSeconds($seconds)
{
// don't care about micro-seconds.
$seconds = floor(abs($seconds));
$minute = 60;
$hour = $minute * 60;
$day = $hour * 24;
$month = $day * 30;
$year = $day * 365;
$interval_spec = 'P';
... | [
"public",
"static",
"function",
"getIntervalFromSeconds",
"(",
"$",
"seconds",
")",
"{",
"// don't care about micro-seconds.",
"$",
"seconds",
"=",
"floor",
"(",
"abs",
"(",
"$",
"seconds",
")",
")",
";",
"$",
"minute",
"=",
"60",
";",
"$",
"hour",
"=",
"$... | Gets a date interval with appropriate values for the specified
number of seconds
As this method applies on seconds, no time zone considerations
are made. Years are assumed to be 365 days. Months are assumed
to be 30 days.
@param integer $seconds seconds for which to get interval.
@return DateInterval a date interval... | [
"Gets",
"a",
"date",
"interval",
"with",
"appropriate",
"values",
"for",
"the",
"specified",
"number",
"of",
"seconds"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatDate.php#L921-L971 |
33,549 | silverorange/swat | Swat/SwatDate.php | SwatDate.getISO8601 | public function getISO8601($options = 5)
{
if (($options & self::ISO_EXTENDED) === self::ISO_EXTENDED) {
$format = self::DF_ISO_8601_EXTENDED;
} else {
$format = self::DF_ISO_8601_BASIC;
}
if (($options & self::ISO_MICROTIME) === self::ISO_MICROTIME) {
... | php | public function getISO8601($options = 5)
{
if (($options & self::ISO_EXTENDED) === self::ISO_EXTENDED) {
$format = self::DF_ISO_8601_EXTENDED;
} else {
$format = self::DF_ISO_8601_BASIC;
}
if (($options & self::ISO_MICROTIME) === self::ISO_MICROTIME) {
... | [
"public",
"function",
"getISO8601",
"(",
"$",
"options",
"=",
"5",
")",
"{",
"if",
"(",
"(",
"$",
"options",
"&",
"self",
"::",
"ISO_EXTENDED",
")",
"===",
"self",
"::",
"ISO_EXTENDED",
")",
"{",
"$",
"format",
"=",
"self",
"::",
"DF_ISO_8601_EXTENDED",
... | Gets this date formatted as an ISO 8601 timestamp
Options are:
- <kbd>{@link SwatDate::ISO_EXTENDED}</kbd> - include '-' and ':'
separators.
- <kbd>{@link SwatDate::ISO_MICROTIME}</kbd> - include microseconds.
- <kbd>{@link SwatDate::ISO_TIME_ZONE}</kbd> - include time zone.
@param integer $options optional. A bitw... | [
"Gets",
"this",
"date",
"formatted",
"as",
"an",
"ISO",
"8601",
"timestamp"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatDate.php#L1083-L1102 |
33,550 | silverorange/swat | Swat/SwatDate.php | SwatDate.getFormattedOffsetById | public function getFormattedOffsetById($id)
{
switch ($id) {
case self::DF_ISO_8601_BASIC:
case self::DF_ISO_8601_EXTENDED:
case self::DF_RFC_2822:
$offset = $this->getOffset();
$offset = intval(floor($offset / 60)); // minutes
... | php | public function getFormattedOffsetById($id)
{
switch ($id) {
case self::DF_ISO_8601_BASIC:
case self::DF_ISO_8601_EXTENDED:
case self::DF_RFC_2822:
$offset = $this->getOffset();
$offset = intval(floor($offset / 60)); // minutes
... | [
"public",
"function",
"getFormattedOffsetById",
"(",
"$",
"id",
")",
"{",
"switch",
"(",
"$",
"id",
")",
"{",
"case",
"self",
"::",
"DF_ISO_8601_BASIC",
":",
"case",
"self",
"::",
"DF_ISO_8601_EXTENDED",
":",
"case",
"self",
"::",
"DF_RFC_2822",
":",
"$",
... | Returns this date's timezone offset from GMT using a format id.
@param integer $format an integer date format id.
@return string the formatted timezone offset. | [
"Returns",
"this",
"date",
"s",
"timezone",
"offset",
"from",
"GMT",
"using",
"a",
"format",
"id",
"."
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatDate.php#L1129-L1155 |
33,551 | silverorange/swat | Swat/SwatDate.php | SwatDate.setTZ | public function setTZ(DateTimeZone $time_zone)
{
$this->addSeconds($this->format('Z'));
$result = $this->setTimezone($time_zone);
$this->subtractSeconds($this->format('Z'));
return $result;
} | php | public function setTZ(DateTimeZone $time_zone)
{
$this->addSeconds($this->format('Z'));
$result = $this->setTimezone($time_zone);
$this->subtractSeconds($this->format('Z'));
return $result;
} | [
"public",
"function",
"setTZ",
"(",
"DateTimeZone",
"$",
"time_zone",
")",
"{",
"$",
"this",
"->",
"addSeconds",
"(",
"$",
"this",
"->",
"format",
"(",
"'Z'",
")",
")",
";",
"$",
"result",
"=",
"$",
"this",
"->",
"setTimezone",
"(",
"$",
"time_zone",
... | Sets the time zone for this date and updates this date's time so the
hours are the same as with the old time zone
@param DateTimeZone $time_zone the new time zone.
@return mixed this object on success, or false if the time zone name is
invalid. | [
"Sets",
"the",
"time",
"zone",
"for",
"this",
"date",
"and",
"updates",
"this",
"date",
"s",
"time",
"so",
"the",
"hours",
"are",
"the",
"same",
"as",
"with",
"the",
"old",
"time",
"zone"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatDate.php#L1329-L1335 |
33,552 | silverorange/swat | Swat/SwatDate.php | SwatDate.addYears | public function addYears($years)
{
$years = (int) $years;
$interval = new DateInterval('P' . abs($years) . 'Y');
if ($years < 0) {
$interval->invert = 1;
}
return $this->add($interval);
} | php | public function addYears($years)
{
$years = (int) $years;
$interval = new DateInterval('P' . abs($years) . 'Y');
if ($years < 0) {
$interval->invert = 1;
}
return $this->add($interval);
} | [
"public",
"function",
"addYears",
"(",
"$",
"years",
")",
"{",
"$",
"years",
"=",
"(",
"int",
")",
"$",
"years",
";",
"$",
"interval",
"=",
"new",
"DateInterval",
"(",
"'P'",
".",
"abs",
"(",
"$",
"years",
")",
".",
"'Y'",
")",
";",
"if",
"(",
... | Adds the specified number of years to this date
@param integer $years the number of years to add.
@return this object on success or false on failure. | [
"Adds",
"the",
"specified",
"number",
"of",
"years",
"to",
"this",
"date"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatDate.php#L1394-L1404 |
33,553 | silverorange/swat | Swat/SwatDate.php | SwatDate.subtractYears | public function subtractYears($years)
{
$years = (int) $years;
$years = -$years;
return $this->addYears($years);
} | php | public function subtractYears($years)
{
$years = (int) $years;
$years = -$years;
return $this->addYears($years);
} | [
"public",
"function",
"subtractYears",
"(",
"$",
"years",
")",
"{",
"$",
"years",
"=",
"(",
"int",
")",
"$",
"years",
";",
"$",
"years",
"=",
"-",
"$",
"years",
";",
"return",
"$",
"this",
"->",
"addYears",
"(",
"$",
"years",
")",
";",
"}"
] | Subtracts the specified number of years from this date
@param integer $years the number of years to subtract.
@return this object on success or false on failure. | [
"Subtracts",
"the",
"specified",
"number",
"of",
"years",
"from",
"this",
"date"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatDate.php#L1416-L1421 |
33,554 | silverorange/swat | Swat/SwatDate.php | SwatDate.addMonths | public function addMonths($months)
{
$months = (int) $months;
$interval = new DateInterval('P' . abs($months) . 'M');
if ($months < 0) {
$interval->invert = 1;
}
return $this->add($interval);
} | php | public function addMonths($months)
{
$months = (int) $months;
$interval = new DateInterval('P' . abs($months) . 'M');
if ($months < 0) {
$interval->invert = 1;
}
return $this->add($interval);
} | [
"public",
"function",
"addMonths",
"(",
"$",
"months",
")",
"{",
"$",
"months",
"=",
"(",
"int",
")",
"$",
"months",
";",
"$",
"interval",
"=",
"new",
"DateInterval",
"(",
"'P'",
".",
"abs",
"(",
"$",
"months",
")",
".",
"'M'",
")",
";",
"if",
"(... | Adds the specified number of months to this date
@param integer $months the number of months to add.
@return this object on success or false on failure. | [
"Adds",
"the",
"specified",
"number",
"of",
"months",
"to",
"this",
"date"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatDate.php#L1433-L1443 |
33,555 | silverorange/swat | Swat/SwatDate.php | SwatDate.subtractMonths | public function subtractMonths($months)
{
$months = (int) $months;
$months = -$months;
return $this->addMonths($months);
} | php | public function subtractMonths($months)
{
$months = (int) $months;
$months = -$months;
return $this->addMonths($months);
} | [
"public",
"function",
"subtractMonths",
"(",
"$",
"months",
")",
"{",
"$",
"months",
"=",
"(",
"int",
")",
"$",
"months",
";",
"$",
"months",
"=",
"-",
"$",
"months",
";",
"return",
"$",
"this",
"->",
"addMonths",
"(",
"$",
"months",
")",
";",
"}"
... | Subtracts the specified number of months from this date
@param integer $months the number of months to subtract.
@return this object on success or false on failure. | [
"Subtracts",
"the",
"specified",
"number",
"of",
"months",
"from",
"this",
"date"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatDate.php#L1455-L1460 |
33,556 | silverorange/swat | Swat/SwatDate.php | SwatDate.addDays | public function addDays($days)
{
$days = (int) $days;
$interval = new DateInterval('P' . abs($days) . 'D');
if ($days < 0) {
$interval->invert = 1;
}
return $this->add($interval);
} | php | public function addDays($days)
{
$days = (int) $days;
$interval = new DateInterval('P' . abs($days) . 'D');
if ($days < 0) {
$interval->invert = 1;
}
return $this->add($interval);
} | [
"public",
"function",
"addDays",
"(",
"$",
"days",
")",
"{",
"$",
"days",
"=",
"(",
"int",
")",
"$",
"days",
";",
"$",
"interval",
"=",
"new",
"DateInterval",
"(",
"'P'",
".",
"abs",
"(",
"$",
"days",
")",
".",
"'D'",
")",
";",
"if",
"(",
"$",
... | Adds the specified number of days to this date
@param integer $days the number of days to add.
@return this object on success or false on failure. | [
"Adds",
"the",
"specified",
"number",
"of",
"days",
"to",
"this",
"date"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatDate.php#L1472-L1482 |
33,557 | silverorange/swat | Swat/SwatDate.php | SwatDate.subtractDays | public function subtractDays($days)
{
$days = (int) $days;
$days = -$days;
return $this->addDays($days);
} | php | public function subtractDays($days)
{
$days = (int) $days;
$days = -$days;
return $this->addDays($days);
} | [
"public",
"function",
"subtractDays",
"(",
"$",
"days",
")",
"{",
"$",
"days",
"=",
"(",
"int",
")",
"$",
"days",
";",
"$",
"days",
"=",
"-",
"$",
"days",
";",
"return",
"$",
"this",
"->",
"addDays",
"(",
"$",
"days",
")",
";",
"}"
] | Subtracts the specified number of days from this date
@param integer $days the number of days to subtract.
@return this object on success or false on failure. | [
"Subtracts",
"the",
"specified",
"number",
"of",
"days",
"from",
"this",
"date"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatDate.php#L1494-L1499 |
33,558 | silverorange/swat | Swat/SwatDate.php | SwatDate.addHours | public function addHours($hours)
{
$hours = (int) $hours;
$interval = new DateInterval('PT' . abs($hours) . 'H');
if ($hours < 0) {
$interval->invert = 1;
}
return $this->add($interval);
} | php | public function addHours($hours)
{
$hours = (int) $hours;
$interval = new DateInterval('PT' . abs($hours) . 'H');
if ($hours < 0) {
$interval->invert = 1;
}
return $this->add($interval);
} | [
"public",
"function",
"addHours",
"(",
"$",
"hours",
")",
"{",
"$",
"hours",
"=",
"(",
"int",
")",
"$",
"hours",
";",
"$",
"interval",
"=",
"new",
"DateInterval",
"(",
"'PT'",
".",
"abs",
"(",
"$",
"hours",
")",
".",
"'H'",
")",
";",
"if",
"(",
... | Adds the specified number of hours to this date
@param integer $hours the number of hours to add.
@return this object on success or false on failure. | [
"Adds",
"the",
"specified",
"number",
"of",
"hours",
"to",
"this",
"date"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatDate.php#L1511-L1521 |
33,559 | silverorange/swat | Swat/SwatDate.php | SwatDate.subtractHours | public function subtractHours($hours)
{
$hours = (int) $hours;
$hours = -$hours;
return $this->addHours($hours);
} | php | public function subtractHours($hours)
{
$hours = (int) $hours;
$hours = -$hours;
return $this->addHours($hours);
} | [
"public",
"function",
"subtractHours",
"(",
"$",
"hours",
")",
"{",
"$",
"hours",
"=",
"(",
"int",
")",
"$",
"hours",
";",
"$",
"hours",
"=",
"-",
"$",
"hours",
";",
"return",
"$",
"this",
"->",
"addHours",
"(",
"$",
"hours",
")",
";",
"}"
] | Subtracts the specified number of hours from this date
@param integer $hours the number of hours to subtract.
@return this object on success or false on failure. | [
"Subtracts",
"the",
"specified",
"number",
"of",
"hours",
"from",
"this",
"date"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatDate.php#L1533-L1538 |
33,560 | silverorange/swat | Swat/SwatDate.php | SwatDate.addMinutes | public function addMinutes($minutes)
{
$minutes = (int) $minutes;
$interval = new DateInterval('PT' . abs($minutes) . 'M');
if ($minutes < 0) {
$interval->invert = 1;
}
return $this->add($interval);
} | php | public function addMinutes($minutes)
{
$minutes = (int) $minutes;
$interval = new DateInterval('PT' . abs($minutes) . 'M');
if ($minutes < 0) {
$interval->invert = 1;
}
return $this->add($interval);
} | [
"public",
"function",
"addMinutes",
"(",
"$",
"minutes",
")",
"{",
"$",
"minutes",
"=",
"(",
"int",
")",
"$",
"minutes",
";",
"$",
"interval",
"=",
"new",
"DateInterval",
"(",
"'PT'",
".",
"abs",
"(",
"$",
"minutes",
")",
".",
"'M'",
")",
";",
"if"... | Adds the specified number of minutes to this date
@param integer $minutes the number of minutes to add.
@return this object on success or false on failure. | [
"Adds",
"the",
"specified",
"number",
"of",
"minutes",
"to",
"this",
"date"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatDate.php#L1550-L1560 |
33,561 | silverorange/swat | Swat/SwatDate.php | SwatDate.subtractMinutes | public function subtractMinutes($minutes)
{
$minutes = (int) $minutes;
$minutes = -$minutes;
return $this->addMinutes($minutes);
} | php | public function subtractMinutes($minutes)
{
$minutes = (int) $minutes;
$minutes = -$minutes;
return $this->addMinutes($minutes);
} | [
"public",
"function",
"subtractMinutes",
"(",
"$",
"minutes",
")",
"{",
"$",
"minutes",
"=",
"(",
"int",
")",
"$",
"minutes",
";",
"$",
"minutes",
"=",
"-",
"$",
"minutes",
";",
"return",
"$",
"this",
"->",
"addMinutes",
"(",
"$",
"minutes",
")",
";"... | Subtracts the specified number of minutes from this date
@param integer $minutes the number of minutes to subtract.
@return this object on success or false on failure. | [
"Subtracts",
"the",
"specified",
"number",
"of",
"minutes",
"from",
"this",
"date"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatDate.php#L1572-L1577 |
33,562 | silverorange/swat | Swat/SwatDate.php | SwatDate.addSeconds | public function addSeconds($seconds)
{
$seconds = (float) $seconds;
$interval = new DateInterval('PT' . abs($seconds) . 'S');
if ($seconds < 0) {
$interval->invert = 1;
}
return $this->add($interval);
} | php | public function addSeconds($seconds)
{
$seconds = (float) $seconds;
$interval = new DateInterval('PT' . abs($seconds) . 'S');
if ($seconds < 0) {
$interval->invert = 1;
}
return $this->add($interval);
} | [
"public",
"function",
"addSeconds",
"(",
"$",
"seconds",
")",
"{",
"$",
"seconds",
"=",
"(",
"float",
")",
"$",
"seconds",
";",
"$",
"interval",
"=",
"new",
"DateInterval",
"(",
"'PT'",
".",
"abs",
"(",
"$",
"seconds",
")",
".",
"'S'",
")",
";",
"i... | Adds the specified number of seconds to this date
@param float $seconds the number of seconds to add.
@return this object on success or false on failure. | [
"Adds",
"the",
"specified",
"number",
"of",
"seconds",
"to",
"this",
"date"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatDate.php#L1589-L1599 |
33,563 | silverorange/swat | Swat/SwatDate.php | SwatDate.subtractSeconds | public function subtractSeconds($seconds)
{
$seconds = (float) $seconds;
$seconds = -$seconds;
return $this->addSeconds($seconds);
} | php | public function subtractSeconds($seconds)
{
$seconds = (float) $seconds;
$seconds = -$seconds;
return $this->addSeconds($seconds);
} | [
"public",
"function",
"subtractSeconds",
"(",
"$",
"seconds",
")",
"{",
"$",
"seconds",
"=",
"(",
"float",
")",
"$",
"seconds",
";",
"$",
"seconds",
"=",
"-",
"$",
"seconds",
";",
"return",
"$",
"this",
"->",
"addSeconds",
"(",
"$",
"seconds",
")",
"... | Subtracts the specified number of seconds from this date
@param float $seconds the number of seconds to subtract.
@return this object on success or false on failure. | [
"Subtracts",
"the",
"specified",
"number",
"of",
"seconds",
"from",
"this",
"date"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatDate.php#L1611-L1616 |
33,564 | silverorange/swat | Swat/SwatDate.php | SwatDate.setDate | public function setDate($year, $month, $day)
{
if (!checkdate($month, $day, $year)) {
return false;
}
return parent::setDate($year, $month, $day);
} | php | public function setDate($year, $month, $day)
{
if (!checkdate($month, $day, $year)) {
return false;
}
return parent::setDate($year, $month, $day);
} | [
"public",
"function",
"setDate",
"(",
"$",
"year",
",",
"$",
"month",
",",
"$",
"day",
")",
"{",
"if",
"(",
"!",
"checkdate",
"(",
"$",
"month",
",",
"$",
"day",
",",
"$",
"year",
")",
")",
"{",
"return",
"false",
";",
"}",
"return",
"parent",
... | Sets the date fields for this date
This differs from PHP's DateTime in that it returns false if the
parameters are not a valid date (i.e. February 31st).
@param integer $year the year.
@param integer $month the month.
@param integer $day the day.
@return mixed either this object on success, or false if the resulting... | [
"Sets",
"the",
"date",
"fields",
"for",
"this",
"date"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatDate.php#L1634-L1641 |
33,565 | silverorange/swat | Swat/SwatDate.php | SwatDate.addStrictMonths | public function addStrictMonths($months)
{
$months = (int) $months;
$years = (int) ($months / 12);
$months = $months % 12;
$year = $this->getYear() + $years;
$month = $this->getMonth() + $months;
if ($month < 1) {
$year -= 1;
$month += 12;
... | php | public function addStrictMonths($months)
{
$months = (int) $months;
$years = (int) ($months / 12);
$months = $months % 12;
$year = $this->getYear() + $years;
$month = $this->getMonth() + $months;
if ($month < 1) {
$year -= 1;
$month += 12;
... | [
"public",
"function",
"addStrictMonths",
"(",
"$",
"months",
")",
"{",
"$",
"months",
"=",
"(",
"int",
")",
"$",
"months",
";",
"$",
"years",
"=",
"(",
"int",
")",
"(",
"$",
"months",
"/",
"12",
")",
";",
"$",
"months",
"=",
"$",
"months",
"%",
... | Adds months to this date without affecting the day of the month
This differs from {@link SwatDate::addMonths()} in how dates at the end
of a month are handled. In SwatDate::addMonths(), if one month is added
to January 31, the resulting date will be March 2 or 3 depending on
if it is a leap year.
In this method, if o... | [
"Adds",
"months",
"to",
"this",
"date",
"without",
"affecting",
"the",
"day",
"of",
"the",
"month"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatDate.php#L1836-L1867 |
33,566 | silverorange/swat | Swat/SwatDate.php | SwatDate.unserialize | public function unserialize($serialized)
{
$data = unserialize($serialized);
// Calling __construct here is required to avoid PHP warnings. See
// PHP bug #65151. DateTime objects that are created through
// unserialization are not properly initialized until __construct() is
... | php | public function unserialize($serialized)
{
$data = unserialize($serialized);
// Calling __construct here is required to avoid PHP warnings. See
// PHP bug #65151. DateTime objects that are created through
// unserialization are not properly initialized until __construct() is
... | [
"public",
"function",
"unserialize",
"(",
"$",
"serialized",
")",
"{",
"$",
"data",
"=",
"unserialize",
"(",
"$",
"serialized",
")",
";",
"// Calling __construct here is required to avoid PHP warnings. See",
"// PHP bug #65151. DateTime objects that are created through",
"// un... | Unserializes this date
@param string $serialized the serialized date data. | [
"Unserializes",
"this",
"date"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatDate.php#L1920-L1932 |
33,567 | brainworxx/kreXX | src/Analyse/Callback/Iterate/ThroughResource.php | ThroughResource.callMe | public function callMe()
{
// Allow the start event to change the provided meta data.
$output = $this->dispatchStartEvent();
// Temporarily disable code gen.
$isAllowedCodeGen = $this->pool->codegenHandler->getAllowCodegen();
$this->pool->codegenHandler->setAllowCodegen(fals... | php | public function callMe()
{
// Allow the start event to change the provided meta data.
$output = $this->dispatchStartEvent();
// Temporarily disable code gen.
$isAllowedCodeGen = $this->pool->codegenHandler->getAllowCodegen();
$this->pool->codegenHandler->setAllowCodegen(fals... | [
"public",
"function",
"callMe",
"(",
")",
"{",
"// Allow the start event to change the provided meta data.",
"$",
"output",
"=",
"$",
"this",
"->",
"dispatchStartEvent",
"(",
")",
";",
"// Temporarily disable code gen.",
"$",
"isAllowedCodeGen",
"=",
"$",
"this",
"->",
... | Renders the info of a resource.
@return string
The generated markup. | [
"Renders",
"the",
"info",
"of",
"a",
"resource",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Analyse/Callback/Iterate/ThroughResource.php#L60-L82 |
33,568 | brainworxx/kreXX | src/Service/Factory/Pool.php | Pool.checkEnvironment | protected function checkEnvironment()
{
// Check chunk folder is writable.
// If not, give feedback!
$chunkFolder = $this->config->getChunkDir();
if (is_writeable($chunkFolder) === false) {
$chunkFolder = $this->fileService->filterFilePath($chunkFolder);
$this... | php | protected function checkEnvironment()
{
// Check chunk folder is writable.
// If not, give feedback!
$chunkFolder = $this->config->getChunkDir();
if (is_writeable($chunkFolder) === false) {
$chunkFolder = $this->fileService->filterFilePath($chunkFolder);
$this... | [
"protected",
"function",
"checkEnvironment",
"(",
")",
"{",
"// Check chunk folder is writable.",
"// If not, give feedback!",
"$",
"chunkFolder",
"=",
"$",
"this",
"->",
"config",
"->",
"getChunkDir",
"(",
")",
";",
"if",
"(",
"is_writeable",
"(",
"$",
"chunkFolder... | Check if the environment is as it should be. | [
"Check",
"if",
"the",
"environment",
"is",
"as",
"it",
"should",
"be",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Service/Factory/Pool.php#L200-L226 |
33,569 | silverorange/swat | Swat/SwatReplicableContainer.php | SwatReplicableContainer.init | public function init()
{
// TODO: remove this when deprecated $replicators property is removed
if ($this->replication_ids === null && $this->replicators !== null) {
$this->replication_ids = array_keys($this->replicators);
}
if ($this->replication_ids === null) {
... | php | public function init()
{
// TODO: remove this when deprecated $replicators property is removed
if ($this->replication_ids === null && $this->replicators !== null) {
$this->replication_ids = array_keys($this->replicators);
}
if ($this->replication_ids === null) {
... | [
"public",
"function",
"init",
"(",
")",
"{",
"// TODO: remove this when deprecated $replicators property is removed",
"if",
"(",
"$",
"this",
"->",
"replication_ids",
"===",
"null",
"&&",
"$",
"this",
"->",
"replicators",
"!==",
"null",
")",
"{",
"$",
"this",
"->"... | Initilizes this replicable container
Goes through the internal widgets, clones them, and adds them to the
widget tree. | [
"Initilizes",
"this",
"replicable",
"container"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatReplicableContainer.php#L68-L89 |
33,570 | silverorange/swat | Swat/SwatReplicableContainer.php | SwatReplicableContainer.getWidget | public function getWidget($widget_id, $replicator_id)
{
$widget = null;
if (isset($this->widgets[$replicator_id][$widget_id])) {
$widget = $this->widgets[$replicator_id][$widget_id];
}
return $widget;
} | php | public function getWidget($widget_id, $replicator_id)
{
$widget = null;
if (isset($this->widgets[$replicator_id][$widget_id])) {
$widget = $this->widgets[$replicator_id][$widget_id];
}
return $widget;
} | [
"public",
"function",
"getWidget",
"(",
"$",
"widget_id",
",",
"$",
"replicator_id",
")",
"{",
"$",
"widget",
"=",
"null",
";",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"widgets",
"[",
"$",
"replicator_id",
"]",
"[",
"$",
"widget_id",
"]",
")",
")... | Retrives a reference to a replicated widget
@param string $widget_id the unique id of the original widget
@param string $replicator_id the replicator id of the replicated widget
@return SwatWidget a reference to the replicated widget, or null if the
widget is not found. | [
"Retrives",
"a",
"reference",
"to",
"a",
"replicated",
"widget"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatReplicableContainer.php#L138-L147 |
33,571 | brainworxx/kreXX | src/Analyse/Routing/Process/ProcessOther.php | ProcessOther.process | public function process(Model $model)
{
// Unknown type, better encode it, just to be sure.
$type = $this->pool->encodingService->encodeString(gettype($model->getData()));
return $this->pool->render->renderSingleChild(
$model->setType($type)
->setNormal('Unhandled... | php | public function process(Model $model)
{
// Unknown type, better encode it, just to be sure.
$type = $this->pool->encodingService->encodeString(gettype($model->getData()));
return $this->pool->render->renderSingleChild(
$model->setType($type)
->setNormal('Unhandled... | [
"public",
"function",
"process",
"(",
"Model",
"$",
"model",
")",
"{",
"// Unknown type, better encode it, just to be sure.",
"$",
"type",
"=",
"$",
"this",
"->",
"pool",
"->",
"encodingService",
"->",
"encodeString",
"(",
"gettype",
"(",
"$",
"model",
"->",
"ge... | Render a 'dump' for a other type.
@param Model $model
The model with the data for the output.
@return string
The rendered markup. | [
"Render",
"a",
"dump",
"for",
"a",
"other",
"type",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Analyse/Routing/Process/ProcessOther.php#L58-L67 |
33,572 | silverorange/swat | Swat/SwatTreeNode.php | SwatTreeNode.& | public function &getPath()
{
$path = array($this->index);
$parent = $this->parent;
while ($parent !== null) {
$path[] = $parent->index;
$parent = $parent->parent;
}
// we built the path backwards
$path = array_reverse($path);
return ... | php | public function &getPath()
{
$path = array($this->index);
$parent = $this->parent;
while ($parent !== null) {
$path[] = $parent->index;
$parent = $parent->parent;
}
// we built the path backwards
$path = array_reverse($path);
return ... | [
"public",
"function",
"&",
"getPath",
"(",
")",
"{",
"$",
"path",
"=",
"array",
"(",
"$",
"this",
"->",
"index",
")",
";",
"$",
"parent",
"=",
"$",
"this",
"->",
"parent",
";",
"while",
"(",
"$",
"parent",
"!==",
"null",
")",
"{",
"$",
"path",
... | Gets the path to this node
This method travels up the tree until it reaches a node with a parent
of 'null', building a path of ids along the way.
@return array an array of indexes that is the path to the given node
from the root of the current tree. | [
"Gets",
"the",
"path",
"to",
"this",
"node"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTreeNode.php#L94-L108 |
33,573 | silverorange/swat | Swat/SwatTreeNode.php | SwatTreeNode.count | public function count()
{
$count = 1;
foreach ($this->children as $child) {
$count += count($child);
}
return $count;
} | php | public function count()
{
$count = 1;
foreach ($this->children as $child) {
$count += count($child);
}
return $count;
} | [
"public",
"function",
"count",
"(",
")",
"{",
"$",
"count",
"=",
"1",
";",
"foreach",
"(",
"$",
"this",
"->",
"children",
"as",
"$",
"child",
")",
"{",
"$",
"count",
"+=",
"count",
"(",
"$",
"child",
")",
";",
"}",
"return",
"$",
"count",
";",
... | Gets the number of nodes in this tree or subtree
This method is needed to fulfill the Countable interface.
@return integer the number of nodes in this tree or subtree. | [
"Gets",
"the",
"number",
"of",
"nodes",
"in",
"this",
"tree",
"or",
"subtree"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTreeNode.php#L261-L269 |
33,574 | brainworxx/kreXX | src/View/Output/Chunks.php | Chunks.chunkMe | public function chunkMe($string)
{
if ($this->useChunks === true && strlen($string) > 10000) {
// Get the key.
$key = $this->genKey();
// Detect the encoding in the chunk.
$this->detectEncoding($string);
// Write the key to the chunks folder.
... | php | public function chunkMe($string)
{
if ($this->useChunks === true && strlen($string) > 10000) {
// Get the key.
$key = $this->genKey();
// Detect the encoding in the chunk.
$this->detectEncoding($string);
// Write the key to the chunks folder.
... | [
"public",
"function",
"chunkMe",
"(",
"$",
"string",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"useChunks",
"===",
"true",
"&&",
"strlen",
"(",
"$",
"string",
")",
">",
"10000",
")",
"{",
"// Get the key.",
"$",
"key",
"=",
"$",
"this",
"->",
"genKey",... | Splits a string into small chunks.
The chunks are saved to disk and later on.
@param string $string
The data we want to split into chunks.
@return string
The key to the chunk, wrapped up in @@@@@@. | [
"Splits",
"a",
"string",
"into",
"small",
"chunks",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/View/Output/Chunks.php#L160-L175 |
33,575 | brainworxx/kreXX | src/View/Output/Chunks.php | Chunks.dechunkMe | protected function dechunkMe($key)
{
$filename = $this->chunkDir . $key . '.Krexx.tmp';
// Read the file.
$string = $this->pool->fileService->getFileContents($filename);
// Delete it, we don't need it anymore.
$this->pool->fileService->deleteFile($filename);
return $s... | php | protected function dechunkMe($key)
{
$filename = $this->chunkDir . $key . '.Krexx.tmp';
// Read the file.
$string = $this->pool->fileService->getFileContents($filename);
// Delete it, we don't need it anymore.
$this->pool->fileService->deleteFile($filename);
return $s... | [
"protected",
"function",
"dechunkMe",
"(",
"$",
"key",
")",
"{",
"$",
"filename",
"=",
"$",
"this",
"->",
"chunkDir",
".",
"$",
"key",
".",
"'.Krexx.tmp'",
";",
"// Read the file.",
"$",
"string",
"=",
"$",
"this",
"->",
"pool",
"->",
"fileService",
"->"... | Gets the original data from the string.
Reads the data from a file in the chunks folder.
The output may contain other chunk keys.
nothing more then a wrapper for file_get_contents()
@param string $key
The key of the chunk of which we want to get the data.
@return string
The original date | [
"Gets",
"the",
"original",
"data",
"from",
"the",
"string",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/View/Output/Chunks.php#L205-L213 |
33,576 | brainworxx/kreXX | src/View/Output/Chunks.php | Chunks.isOutputHtml | protected function isOutputHtml()
{
static $result;
if ($result !== null) {
return $result;
}
if ($this->pool->config->getSetting(Fallback::SETTING_DETECT_AJAX) === Fallback::VALUE_FALSE) {
// We ignore the heades and send everything.
$result = t... | php | protected function isOutputHtml()
{
static $result;
if ($result !== null) {
return $result;
}
if ($this->pool->config->getSetting(Fallback::SETTING_DETECT_AJAX) === Fallback::VALUE_FALSE) {
// We ignore the heades and send everything.
$result = t... | [
"protected",
"function",
"isOutputHtml",
"(",
")",
"{",
"static",
"$",
"result",
";",
"if",
"(",
"$",
"result",
"!==",
"null",
")",
"{",
"return",
"$",
"result",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"pool",
"->",
"config",
"->",
"getSetting",
"(",... | Is the output so far HTML?
This one gets called during the shutdown phase of PHP. There is a high
chance, that the header was already set.
@return bool
Well? Is it? | [
"Is",
"the",
"output",
"so",
"far",
"HTML?"
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/View/Output/Chunks.php#L266-L293 |
33,577 | brainworxx/kreXX | src/View/Output/Chunks.php | Chunks.cleanupOldChunks | protected function cleanupOldChunks()
{
if ($this->useChunks === false) {
// We have no write access. Do nothing.
return;
}
static $beenHere = false;
// We only do this once.
if ($beenHere === true) {
return;
}
$beenHere ... | php | protected function cleanupOldChunks()
{
if ($this->useChunks === false) {
// We have no write access. Do nothing.
return;
}
static $beenHere = false;
// We only do this once.
if ($beenHere === true) {
return;
}
$beenHere ... | [
"protected",
"function",
"cleanupOldChunks",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"useChunks",
"===",
"false",
")",
"{",
"// We have no write access. Do nothing.",
"return",
";",
"}",
"static",
"$",
"beenHere",
"=",
"false",
";",
"// We only do this once."... | Deletes chunk files older then 1 hour, in case there are some left. | [
"Deletes",
"chunk",
"files",
"older",
"then",
"1",
"hour",
"in",
"case",
"there",
"are",
"some",
"left",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/View/Output/Chunks.php#L354-L380 |
33,578 | brainworxx/kreXX | src/View/Output/Chunks.php | Chunks.cleanupOldLogs | protected function cleanupOldLogs($logDir)
{
if ($this->useLogging === false) {
// We have no write access. Do nothing.
return;
}
// Cleanup old logfiles to prevent a overflow.
$logList = glob($logDir . '*.Krexx.html');
if (empty($logList) === true) {... | php | protected function cleanupOldLogs($logDir)
{
if ($this->useLogging === false) {
// We have no write access. Do nothing.
return;
}
// Cleanup old logfiles to prevent a overflow.
$logList = glob($logDir . '*.Krexx.html');
if (empty($logList) === true) {... | [
"protected",
"function",
"cleanupOldLogs",
"(",
"$",
"logDir",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"useLogging",
"===",
"false",
")",
"{",
"// We have no write access. Do nothing.",
"return",
";",
"}",
"// Cleanup old logfiles to prevent a overflow.",
"$",
"logLis... | Deletes old logfiles.
@param string $logDir
The directory with the logfiles. | [
"Deletes",
"old",
"logfiles",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/View/Output/Chunks.php#L388-L418 |
33,579 | brainworxx/kreXX | src/View/Output/Chunks.php | Chunks.detectEncoding | public function detectEncoding($string)
{
$encoding = $this->pool->encodingService->mbDetectEncoding($string);
// We need to decide, if we need to change the official encoding of
// the HTML output with a meta tag. We ignore everything in the
// doNothingEncoding array.
if (... | php | public function detectEncoding($string)
{
$encoding = $this->pool->encodingService->mbDetectEncoding($string);
// We need to decide, if we need to change the official encoding of
// the HTML output with a meta tag. We ignore everything in the
// doNothingEncoding array.
if (... | [
"public",
"function",
"detectEncoding",
"(",
"$",
"string",
")",
"{",
"$",
"encoding",
"=",
"$",
"this",
"->",
"pool",
"->",
"encodingService",
"->",
"mbDetectEncoding",
"(",
"$",
"string",
")",
";",
"// We need to decide, if we need to change the official encoding of... | Simple wrapper around mb_detect_encoding.
We also try to track the encoding we need to add to the output, so
people can use unicode function names.
We are not using it above, because there we are only handling broken
string encoding by completely encoding it, every char in there.
@see \Brainworxx\Krexx\Analyse\Routin... | [
"Simple",
"wrapper",
"around",
"mb_detect_encoding",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/View/Output/Chunks.php#L486-L496 |
33,580 | rhoone/yii2-rhoone | models/Extension.php | Extension.setHeadwords | public function setHeadwords($headwords)
{
$results = [];
foreach ($headwords as $headword) {
$results[] = $this->setHeadword($headword);
}
return $results;
} | php | public function setHeadwords($headwords)
{
$results = [];
foreach ($headwords as $headword) {
$results[] = $this->setHeadword($headword);
}
return $results;
} | [
"public",
"function",
"setHeadwords",
"(",
"$",
"headwords",
")",
"{",
"$",
"results",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"headwords",
"as",
"$",
"headword",
")",
"{",
"$",
"results",
"[",
"]",
"=",
"$",
"this",
"->",
"setHeadword",
"(",
"$",
... | Add headwords.
@param string[]|Headword[] $headwords
@return mixed | [
"Add",
"headwords",
"."
] | f6ae90d466ea6f34bba404be0aba03e37ef369ad | https://github.com/rhoone/yii2-rhoone/blob/f6ae90d466ea6f34bba404be0aba03e37ef369ad/models/Extension.php#L228-L235 |
33,581 | honey-comb/core | src/Services/HCUserService.php | HCUserService.restore | public function restore(array $userIds): void
{
$this->getRepository()->restore($userIds);
event(new HCUserRestored($userIds));
} | php | public function restore(array $userIds): void
{
$this->getRepository()->restore($userIds);
event(new HCUserRestored($userIds));
} | [
"public",
"function",
"restore",
"(",
"array",
"$",
"userIds",
")",
":",
"void",
"{",
"$",
"this",
"->",
"getRepository",
"(",
")",
"->",
"restore",
"(",
"$",
"userIds",
")",
";",
"event",
"(",
"new",
"HCUserRestored",
"(",
"$",
"userIds",
")",
")",
... | Restore soft deleted users
@param array $userIds | [
"Restore",
"soft",
"deleted",
"users"
] | 5c12aba31cae092e9681f0ae3e3664ed3fcec956 | https://github.com/honey-comb/core/blob/5c12aba31cae092e9681f0ae3e3664ed3fcec956/src/Services/HCUserService.php#L364-L369 |
33,582 | rollun-com/rollun-datastore | src/DataStore/src/Rql/RqlParser.php | RqlParser.rqlDecode | public static function rqlDecode($rqlQueryString)
{
$rqlQueryString = RqlParser::encodedStrQuery($rqlQueryString);
$rqlQueryString = RqlParser::prepareStringRql($rqlQueryString);
$parser = new self();
$result = $parser->decode($rqlQueryString);
unset($parser);
return... | php | public static function rqlDecode($rqlQueryString)
{
$rqlQueryString = RqlParser::encodedStrQuery($rqlQueryString);
$rqlQueryString = RqlParser::prepareStringRql($rqlQueryString);
$parser = new self();
$result = $parser->decode($rqlQueryString);
unset($parser);
return... | [
"public",
"static",
"function",
"rqlDecode",
"(",
"$",
"rqlQueryString",
")",
"{",
"$",
"rqlQueryString",
"=",
"RqlParser",
"::",
"encodedStrQuery",
"(",
"$",
"rqlQueryString",
")",
";",
"$",
"rqlQueryString",
"=",
"RqlParser",
"::",
"prepareStringRql",
"(",
"$"... | Static method for decode qrl string. Work without rawurlencode str
@param $rqlQueryString .
@return Query | [
"Static",
"method",
"for",
"decode",
"qrl",
"string",
".",
"Work",
"without",
"rawurlencode",
"str"
] | ef433b58b94e1c311123ad1b2a0360e95a636bd1 | https://github.com/rollun-com/rollun-datastore/blob/ef433b58b94e1c311123ad1b2a0360e95a636bd1/src/DataStore/src/Rql/RqlParser.php#L76-L85 |
33,583 | silverorange/swat | SwatDB/SwatDBReadaheadIterator.php | SwatDBReadaheadIterator.iterate | public function iterate()
{
$this->current = $this->getNext();
$this->key = $this->getNextKey();
$valid = $this->current !== null;
if ($valid) {
$this->iterator->next();
}
return $valid;
} | php | public function iterate()
{
$this->current = $this->getNext();
$this->key = $this->getNextKey();
$valid = $this->current !== null;
if ($valid) {
$this->iterator->next();
}
return $valid;
} | [
"public",
"function",
"iterate",
"(",
")",
"{",
"$",
"this",
"->",
"current",
"=",
"$",
"this",
"->",
"getNext",
"(",
")",
";",
"$",
"this",
"->",
"key",
"=",
"$",
"this",
"->",
"getNextKey",
"(",
")",
";",
"$",
"valid",
"=",
"$",
"this",
"->",
... | Iterates over this readahead iterator
@return boolean true if there is a next item. | [
"Iterates",
"over",
"this",
"readahead",
"iterator"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/SwatDB/SwatDBReadaheadIterator.php#L164-L176 |
33,584 | silverorange/swat | SwatDB/SwatDBReadaheadIterator.php | SwatDBReadaheadIterator.rewind | public function rewind()
{
$this->iterator->rewind();
$this->current = null;
$this->key = null;
} | php | public function rewind()
{
$this->iterator->rewind();
$this->current = null;
$this->key = null;
} | [
"public",
"function",
"rewind",
"(",
")",
"{",
"$",
"this",
"->",
"iterator",
"->",
"rewind",
"(",
")",
";",
"$",
"this",
"->",
"current",
"=",
"null",
";",
"$",
"this",
"->",
"key",
"=",
"null",
";",
"}"
] | Rewinds this readahead iterator back to the start | [
"Rewinds",
"this",
"readahead",
"iterator",
"back",
"to",
"the",
"start"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/SwatDB/SwatDBReadaheadIterator.php#L184-L189 |
33,585 | silverorange/swat | Swat/SwatYUI.php | SwatYUI.buildHtmlHeadEntrySet | private function buildHtmlHeadEntrySet(array $component_ids, $mode)
{
$set = new SwatHtmlHeadEntrySet();
foreach ($component_ids as $component_id) {
$set->addEntrySet(
self::$components[$component_id]->getHtmlHeadEntrySet($mode)
);
}
$set->ad... | php | private function buildHtmlHeadEntrySet(array $component_ids, $mode)
{
$set = new SwatHtmlHeadEntrySet();
foreach ($component_ids as $component_id) {
$set->addEntrySet(
self::$components[$component_id]->getHtmlHeadEntrySet($mode)
);
}
$set->ad... | [
"private",
"function",
"buildHtmlHeadEntrySet",
"(",
"array",
"$",
"component_ids",
",",
"$",
"mode",
")",
"{",
"$",
"set",
"=",
"new",
"SwatHtmlHeadEntrySet",
"(",
")",
";",
"foreach",
"(",
"$",
"component_ids",
"as",
"$",
"component_id",
")",
"{",
"$",
"... | Builds the HTML head entry set required for the YUI components of this
object
@param array $component_ids an array of YUI component ids to build
HTML head entries for.
@param string $mode the YUI component mode to use.
@return SwatHtmlHeadEntrySet the full constructed set of HTML head
entries. | [
"Builds",
"the",
"HTML",
"head",
"entry",
"set",
"required",
"for",
"the",
"YUI",
"components",
"of",
"this",
"object"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatYUI.php#L117-L130 |
33,586 | brainworxx/kreXX | src/View/Output/Browser.php | Browser.shutdownCallback | public function shutdownCallback()
{
// Output our chunks.
// Every output is split into 4 chunk strings (header, messages,
// data, footer).
foreach ($this->chunkStrings as $chunkString) {
// Send it to the browser.
$this->pool->chunks->sendDechunkedToBrowser... | php | public function shutdownCallback()
{
// Output our chunks.
// Every output is split into 4 chunk strings (header, messages,
// data, footer).
foreach ($this->chunkStrings as $chunkString) {
// Send it to the browser.
$this->pool->chunks->sendDechunkedToBrowser... | [
"public",
"function",
"shutdownCallback",
"(",
")",
"{",
"// Output our chunks.",
"// Every output is split into 4 chunk strings (header, messages,",
"// data, footer).",
"foreach",
"(",
"$",
"this",
"->",
"chunkStrings",
"as",
"$",
"chunkString",
")",
"{",
"// Send it to the... | The shutdown callback.
It gets called when PHP is shutting down. It will render
out kreXX output, to guarantee minimal interference with
the hosting CMS. | [
"The",
"shutdown",
"callback",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/View/Output/Browser.php#L82-L91 |
33,587 | honey-comb/core | src/Console/HCGenerateFormsCommand.php | HCGenerateFormsCommand.handle | public function handle(): void
{
$this->comment('Scanning form items..');
$filePaths = $this->helper->getConfigFilesSorted();
$formHolder = [];
foreach ($filePaths as $filePath) {
$file = json_decode(file_get_contents($filePath), true);
if (isset($file['f... | php | public function handle(): void
{
$this->comment('Scanning form items..');
$filePaths = $this->helper->getConfigFilesSorted();
$formHolder = [];
foreach ($filePaths as $filePath) {
$file = json_decode(file_get_contents($filePath), true);
if (isset($file['f... | [
"public",
"function",
"handle",
"(",
")",
":",
"void",
"{",
"$",
"this",
"->",
"comment",
"(",
"'Scanning form items..'",
")",
";",
"$",
"filePaths",
"=",
"$",
"this",
"->",
"helper",
"->",
"getConfigFilesSorted",
"(",
")",
";",
"$",
"formHolder",
"=",
"... | Get all honeycomb form config files and add it to cache | [
"Get",
"all",
"honeycomb",
"form",
"config",
"files",
"and",
"add",
"it",
"to",
"cache"
] | 5c12aba31cae092e9681f0ae3e3664ed3fcec956 | https://github.com/honey-comb/core/blob/5c12aba31cae092e9681f0ae3e3664ed3fcec956/src/Console/HCGenerateFormsCommand.php#L75-L97 |
33,588 | brainworxx/kreXX | src/View/AbstractRender.php | AbstractRender.renderCaller | protected function renderCaller($file, $line)
{
return str_replace(
array(
static::MARKER_CALLER_FILE,
static::MARKER_CALLER_LINE,
),
array(
$file,
$line,
),
$this->getTemplateFileCont... | php | protected function renderCaller($file, $line)
{
return str_replace(
array(
static::MARKER_CALLER_FILE,
static::MARKER_CALLER_LINE,
),
array(
$file,
$line,
),
$this->getTemplateFileCont... | [
"protected",
"function",
"renderCaller",
"(",
"$",
"file",
",",
"$",
"line",
")",
"{",
"return",
"str_replace",
"(",
"array",
"(",
"static",
"::",
"MARKER_CALLER_FILE",
",",
"static",
"::",
"MARKER_CALLER_LINE",
",",
")",
",",
"array",
"(",
"$",
"file",
",... | Renders the footer part, where we display from where krexx was called.
@param string $file
The file from where krexx was called.
@param string $line
The line number from where krexx was called.
@return string
The generated markup from the template files. | [
"Renders",
"the",
"footer",
"part",
"where",
"we",
"display",
"from",
"where",
"krexx",
"was",
"called",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/View/AbstractRender.php#L127-L140 |
33,589 | brainworxx/kreXX | src/View/AbstractRender.php | AbstractRender.renderHelp | protected function renderHelp(Model $model)
{
$data = $model->getJson();
// Test if we have anything to display at all.
if (empty($data) === true) {
return '';
}
// We have at least something to display here.
$helpRow = $this->getTemplateFileContent(stat... | php | protected function renderHelp(Model $model)
{
$data = $model->getJson();
// Test if we have anything to display at all.
if (empty($data) === true) {
return '';
}
// We have at least something to display here.
$helpRow = $this->getTemplateFileContent(stat... | [
"protected",
"function",
"renderHelp",
"(",
"Model",
"$",
"model",
")",
"{",
"$",
"data",
"=",
"$",
"model",
"->",
"getJson",
"(",
")",
";",
"// Test if we have anything to display at all.",
"if",
"(",
"empty",
"(",
"$",
"data",
")",
"===",
"true",
")",
"{... | Renders the helptext.
@param Model $model
The ID of the helptext.
@see Usage
@return string
The generated markup from the template files. | [
"Renders",
"the",
"helptext",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/View/AbstractRender.php#L153-L177 |
33,590 | brainworxx/kreXX | src/View/AbstractRender.php | AbstractRender.renderSearch | protected function renderSearch()
{
return str_replace(
static::MARKER_KREXX_ID,
$this->pool->recursionHandler->getMarker(),
$this->getTemplateFileContent(static::FILE_SEARCH)
);
} | php | protected function renderSearch()
{
return str_replace(
static::MARKER_KREXX_ID,
$this->pool->recursionHandler->getMarker(),
$this->getTemplateFileContent(static::FILE_SEARCH)
);
} | [
"protected",
"function",
"renderSearch",
"(",
")",
"{",
"return",
"str_replace",
"(",
"static",
"::",
"MARKER_KREXX_ID",
",",
"$",
"this",
"->",
"pool",
"->",
"recursionHandler",
"->",
"getMarker",
"(",
")",
",",
"$",
"this",
"->",
"getTemplateFileContent",
"(... | Renders the search button and the search menu.
@return string
The generated markup from the template files. | [
"Renders",
"the",
"search",
"button",
"and",
"the",
"search",
"menu",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/View/AbstractRender.php#L203-L210 |
33,591 | brainworxx/kreXX | src/View/AbstractRender.php | AbstractRender.renderPluginList | protected function renderPluginList()
{
$result = '';
$template = $this->getTemplateFileContent(static::FILE_SI_PLUGIN);
foreach (SettingsGetter::getPlugins() as $plugin) {
if ($plugin[SettingsGetter::IS_ACTIVE] === true) {
$activeClass = 'kisactive';
... | php | protected function renderPluginList()
{
$result = '';
$template = $this->getTemplateFileContent(static::FILE_SI_PLUGIN);
foreach (SettingsGetter::getPlugins() as $plugin) {
if ($plugin[SettingsGetter::IS_ACTIVE] === true) {
$activeClass = 'kisactive';
... | [
"protected",
"function",
"renderPluginList",
"(",
")",
"{",
"$",
"result",
"=",
"''",
";",
"$",
"template",
"=",
"$",
"this",
"->",
"getTemplateFileContent",
"(",
"static",
"::",
"FILE_SI_PLUGIN",
")",
";",
"foreach",
"(",
"SettingsGetter",
"::",
"getPlugins",... | Render a list of all registered plugins.
@return string
The generated markup from the template files. | [
"Render",
"a",
"list",
"of",
"all",
"registered",
"plugins",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/View/AbstractRender.php#L218-L245 |
33,592 | brainworxx/kreXX | src/View/AbstractRender.php | AbstractRender.renderNest | protected function renderNest(Model $model, $isExpanded = false)
{
// Get the dom id.
$domid = $model->getDomid();
if ($domid !== '') {
$domid = 'id="' . $domid . '"';
}
// Are we expanding this one?
if ($isExpanded === true) {
$style = '';
... | php | protected function renderNest(Model $model, $isExpanded = false)
{
// Get the dom id.
$domid = $model->getDomid();
if ($domid !== '') {
$domid = 'id="' . $domid . '"';
}
// Are we expanding this one?
if ($isExpanded === true) {
$style = '';
... | [
"protected",
"function",
"renderNest",
"(",
"Model",
"$",
"model",
",",
"$",
"isExpanded",
"=",
"false",
")",
"{",
"// Get the dom id.",
"$",
"domid",
"=",
"$",
"model",
"->",
"getDomid",
"(",
")",
";",
"if",
"(",
"$",
"domid",
"!==",
"''",
")",
"{",
... | Renders a nest with a anonymous function in the middle.
@param Model $model
The model, which hosts all the data we need.
@param boolean $isExpanded
The only expanded nest is the settings menu, when we render only the
settings menu.
@return string
The generated markup from the template files. | [
"Renders",
"a",
"nest",
"with",
"a",
"anonymous",
"function",
"in",
"the",
"middle",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/View/AbstractRender.php#L269-L297 |
33,593 | brainworxx/kreXX | src/View/AbstractRender.php | AbstractRender.getTemplateFileContent | protected function getTemplateFileContent($what)
{
static $fileCache = array();
if (isset($fileCache[$what]) === true) {
return $fileCache[$what];
}
$fileCache[$what] = preg_replace(
'/\s+/',
' ',
$this->pool->fileService->getFileCont... | php | protected function getTemplateFileContent($what)
{
static $fileCache = array();
if (isset($fileCache[$what]) === true) {
return $fileCache[$what];
}
$fileCache[$what] = preg_replace(
'/\s+/',
' ',
$this->pool->fileService->getFileCont... | [
"protected",
"function",
"getTemplateFileContent",
"(",
"$",
"what",
")",
"{",
"static",
"$",
"fileCache",
"=",
"array",
"(",
")",
";",
"if",
"(",
"isset",
"(",
"$",
"fileCache",
"[",
"$",
"what",
"]",
")",
"===",
"true",
")",
"{",
"return",
"$",
"fi... | Loads a template file from the skin folder.
@param string $what
Filename in the skin folder without the ".html" at the end.
@return string
The template file, without whitespaces. | [
"Loads",
"a",
"template",
"file",
"from",
"the",
"skin",
"folder",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/View/AbstractRender.php#L308-L322 |
33,594 | silverorange/swat | Swat/SwatTableViewOrderableColumn.php | SwatTableViewOrderableColumn.setDirection | public function setDirection($direction)
{
$this->direction = $direction;
$this->default_direction = $direction;
if ($this->view->orderby_column === null) {
$this->view->orderby_column = $this;
}
$this->view->default_orderby_column = $this;
$this->initF... | php | public function setDirection($direction)
{
$this->direction = $direction;
$this->default_direction = $direction;
if ($this->view->orderby_column === null) {
$this->view->orderby_column = $this;
}
$this->view->default_orderby_column = $this;
$this->initF... | [
"public",
"function",
"setDirection",
"(",
"$",
"direction",
")",
"{",
"$",
"this",
"->",
"direction",
"=",
"$",
"direction",
";",
"$",
"this",
"->",
"default_direction",
"=",
"$",
"direction",
";",
"if",
"(",
"$",
"this",
"->",
"view",
"->",
"orderby_co... | Sets the direction of ordering
This method sets the direction of ordering of the column, either asc,
desc, or none. Valid directions are:
- {@link SwatTableViewOrderableColumn::ORDER_BY_DIR_NONE},
- {@link SwatTableViewOrderableColumn::ORDER_BY_DIR_DESCENDING}, and
- {@link SwatTableViewOrderableColumn::ORDER_BY_DIR_... | [
"Sets",
"the",
"direction",
"of",
"ordering"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableViewOrderableColumn.php#L160-L172 |
33,595 | silverorange/swat | Swat/SwatTableViewOrderableColumn.php | SwatTableViewOrderableColumn.displayHeader | public function displayHeader()
{
$anchor = new SwatHtmlTag('a');
$anchor->href = $this->getLink();
$anchor->class = 'swat-table-view-orderable-column';
// Set direction-specific CSS class on the anchor.
if ($this->direction == self::ORDER_BY_DIR_DESCENDING) {
$a... | php | public function displayHeader()
{
$anchor = new SwatHtmlTag('a');
$anchor->href = $this->getLink();
$anchor->class = 'swat-table-view-orderable-column';
// Set direction-specific CSS class on the anchor.
if ($this->direction == self::ORDER_BY_DIR_DESCENDING) {
$a... | [
"public",
"function",
"displayHeader",
"(",
")",
"{",
"$",
"anchor",
"=",
"new",
"SwatHtmlTag",
"(",
"'a'",
")",
";",
"$",
"anchor",
"->",
"href",
"=",
"$",
"this",
"->",
"getLink",
"(",
")",
";",
"$",
"anchor",
"->",
"class",
"=",
"'swat-table-view-or... | Displays the column header for this table view column
This method displays an appropriate header based on the current
direction of ordering of this table view column. If the column has been
ordered, an image indicating the ordering is also displayed in the
header. | [
"Displays",
"the",
"column",
"header",
"for",
"this",
"table",
"view",
"column"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableViewOrderableColumn.php#L185-L216 |
33,596 | silverorange/swat | Swat/SwatTableViewOrderableColumn.php | SwatTableViewOrderableColumn.getDirectionAsString | public function getDirectionAsString(
$direction_id = null,
$include_nulls_ordering = true
) {
if ($direction_id === null) {
$direction_id = $this->direction;
}
switch ($direction_id) {
case self::ORDER_BY_DIR_NONE:
$direction = '';
... | php | public function getDirectionAsString(
$direction_id = null,
$include_nulls_ordering = true
) {
if ($direction_id === null) {
$direction_id = $this->direction;
}
switch ($direction_id) {
case self::ORDER_BY_DIR_NONE:
$direction = '';
... | [
"public",
"function",
"getDirectionAsString",
"(",
"$",
"direction_id",
"=",
"null",
",",
"$",
"include_nulls_ordering",
"=",
"true",
")",
"{",
"if",
"(",
"$",
"direction_id",
"===",
"null",
")",
"{",
"$",
"direction_id",
"=",
"$",
"this",
"->",
"direction",... | Gets the direction of ordering as a string
Retrieves the current ordering direction of this column or an arbitrary
direction constant as a string. The string is returned the lowercase
abbreviated form 'asc' or 'desc'.
@param integer $direction_id an optional direction constant to convert
to a string rather than using... | [
"Gets",
"the",
"direction",
"of",
"ordering",
"as",
"a",
"string"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableViewOrderableColumn.php#L237-L285 |
33,597 | silverorange/swat | Swat/SwatTableViewOrderableColumn.php | SwatTableViewOrderableColumn.getNextDirection | protected function getNextDirection()
{
switch ($this->direction) {
case self::ORDER_BY_DIR_NONE:
return self::ORDER_BY_DIR_ASCENDING;
case self::ORDER_BY_DIR_ASCENDING:
return self::ORDER_BY_DIR_DESCENDING;
case self::ORDER_BY_DIR_DESCEN... | php | protected function getNextDirection()
{
switch ($this->direction) {
case self::ORDER_BY_DIR_NONE:
return self::ORDER_BY_DIR_ASCENDING;
case self::ORDER_BY_DIR_ASCENDING:
return self::ORDER_BY_DIR_DESCENDING;
case self::ORDER_BY_DIR_DESCEN... | [
"protected",
"function",
"getNextDirection",
"(",
")",
"{",
"switch",
"(",
"$",
"this",
"->",
"direction",
")",
"{",
"case",
"self",
"::",
"ORDER_BY_DIR_NONE",
":",
"return",
"self",
"::",
"ORDER_BY_DIR_ASCENDING",
";",
"case",
"self",
"::",
"ORDER_BY_DIR_ASCEND... | Gets the next direction or ordering in the rotation
As a user clicks on the comun headers the direction of ordering changes
from NONE => ASCSENDING => DESCENDING => NONE in a loop.
@return integer the next direction of ordering for this column. | [
"Gets",
"the",
"next",
"direction",
"or",
"ordering",
"in",
"the",
"rotation"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableViewOrderableColumn.php#L360-L379 |
33,598 | silverorange/swat | Swat/SwatTableViewOrderableColumn.php | SwatTableViewOrderableColumn.setDirectionByString | private function setDirectionByString($direction)
{
$direction = mb_strtolower($direction);
switch ($direction) {
case 'ascending':
case 'asc':
$this->direction = self::ORDER_BY_DIR_ASCENDING;
break;
case 'descending':
... | php | private function setDirectionByString($direction)
{
$direction = mb_strtolower($direction);
switch ($direction) {
case 'ascending':
case 'asc':
$this->direction = self::ORDER_BY_DIR_ASCENDING;
break;
case 'descending':
... | [
"private",
"function",
"setDirectionByString",
"(",
"$",
"direction",
")",
"{",
"$",
"direction",
"=",
"mb_strtolower",
"(",
"$",
"direction",
")",
";",
"switch",
"(",
"$",
"direction",
")",
"{",
"case",
"'ascending'",
":",
"case",
"'asc'",
":",
"$",
"this... | Sets direction of ordering by a string
Sets the current ordering direction of this column.
@param string $direction ordering direction as a string. The direction
is case insensitive and may be the short form
'asc' or 'desc' or the long form 'ascending'
or 'descending'. | [
"Sets",
"direction",
"of",
"ordering",
"by",
"a",
"string"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableViewOrderableColumn.php#L394-L412 |
33,599 | silverorange/swat | Swat/SwatTableViewOrderableColumn.php | SwatTableViewOrderableColumn.getLink | private function getLink()
{
// unset GET vars that we want to ignore
$vars = $_GET;
foreach ($vars as $name => $value) {
if (in_array($name, $this->unset_get_vars)) {
unset($vars[$name]);
}
}
$key_orderby = $this->getLinkPrefix() . '... | php | private function getLink()
{
// unset GET vars that we want to ignore
$vars = $_GET;
foreach ($vars as $name => $value) {
if (in_array($name, $this->unset_get_vars)) {
unset($vars[$name]);
}
}
$key_orderby = $this->getLinkPrefix() . '... | [
"private",
"function",
"getLink",
"(",
")",
"{",
"// unset GET vars that we want to ignore",
"$",
"vars",
"=",
"$",
"_GET",
";",
"foreach",
"(",
"$",
"vars",
"as",
"$",
"name",
"=>",
"$",
"value",
")",
"{",
"if",
"(",
"in_array",
"(",
"$",
"name",
",",
... | Gets the link for this column's header
This method builds the link by appending special GET variables and
unsetting other ones.
@return string the link for this column's header. | [
"Gets",
"the",
"link",
"for",
"this",
"column",
"s",
"header"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableViewOrderableColumn.php#L425-L467 |
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.