id int32 0 241k | repo stringlengths 6 63 | path stringlengths 5 140 | func_name stringlengths 3 151 | original_string stringlengths 84 13k | language stringclasses 1
value | code stringlengths 84 13k | code_tokens list | docstring stringlengths 3 47.2k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 91 247 |
|---|---|---|---|---|---|---|---|---|---|---|---|
194,900 | mikebarlow/result | src/Result.php | Result.success | public static function success($code = '', $message = '', $errors = [], $extras = [])
{
return self::loadResult(self::SUCCESS, $code, $message, $errors, $extras);
} | php | public static function success($code = '', $message = '', $errors = [], $extras = [])
{
return self::loadResult(self::SUCCESS, $code, $message, $errors, $extras);
} | [
"public",
"static",
"function",
"success",
"(",
"$",
"code",
"=",
"''",
",",
"$",
"message",
"=",
"''",
",",
"$",
"errors",
"=",
"[",
"]",
",",
"$",
"extras",
"=",
"[",
"]",
")",
"{",
"return",
"self",
"::",
"loadResult",
"(",
"self",
"::",
"SUCC... | initiate a success result
@param string $code
@param string $message
@param array $errors
@param array $extras
@return Result $Result | [
"initiate",
"a",
"success",
"result"
] | 412efe97c32434b986be7373b936b643748ace64 | https://github.com/mikebarlow/result/blob/412efe97c32434b986be7373b936b643748ace64/src/Result.php#L39-L42 |
194,901 | mikebarlow/result | src/Result.php | Result.fail | public static function fail($code = '', $message = '', $errors = [], $extras = [])
{
return self::loadResult(self::FAIL, $code, $message, $errors, $extras);
} | php | public static function fail($code = '', $message = '', $errors = [], $extras = [])
{
return self::loadResult(self::FAIL, $code, $message, $errors, $extras);
} | [
"public",
"static",
"function",
"fail",
"(",
"$",
"code",
"=",
"''",
",",
"$",
"message",
"=",
"''",
",",
"$",
"errors",
"=",
"[",
"]",
",",
"$",
"extras",
"=",
"[",
"]",
")",
"{",
"return",
"self",
"::",
"loadResult",
"(",
"self",
"::",
"FAIL",
... | initiate a fail result
@param string $code
@param string $message
@param array $errors
@param array $extras
@return Result $Result | [
"initiate",
"a",
"fail",
"result"
] | 412efe97c32434b986be7373b936b643748ace64 | https://github.com/mikebarlow/result/blob/412efe97c32434b986be7373b936b643748ace64/src/Result.php#L53-L56 |
194,902 | mikebarlow/result | src/Result.php | Result.loadResult | protected static function loadResult($status, $code, $message, $errors, $extras)
{
$Result = new static($status);
if (! empty($code)) {
$Result->setCode($code);
}
if (! empty($message)) {
$Result->setMessage($message);
}
if (! empty($errors)... | php | protected static function loadResult($status, $code, $message, $errors, $extras)
{
$Result = new static($status);
if (! empty($code)) {
$Result->setCode($code);
}
if (! empty($message)) {
$Result->setMessage($message);
}
if (! empty($errors)... | [
"protected",
"static",
"function",
"loadResult",
"(",
"$",
"status",
",",
"$",
"code",
",",
"$",
"message",
",",
"$",
"errors",
",",
"$",
"extras",
")",
"{",
"$",
"Result",
"=",
"new",
"static",
"(",
"$",
"status",
")",
";",
"if",
"(",
"!",
"empty"... | load up the result object
@param bool $status
@param string $code
@param string $message
@param array $errors
@param array $extras
@return Result $Result | [
"load",
"up",
"the",
"result",
"object"
] | 412efe97c32434b986be7373b936b643748ace64 | https://github.com/mikebarlow/result/blob/412efe97c32434b986be7373b936b643748ace64/src/Result.php#L68-L89 |
194,903 | mikebarlow/result | src/Result.php | Result.addError | public function addError($error)
{
if (is_array($error)) {
$this->errors += $error;
} else {
$this->errors[] = $error;
}
return $this;
} | php | public function addError($error)
{
if (is_array($error)) {
$this->errors += $error;
} else {
$this->errors[] = $error;
}
return $this;
} | [
"public",
"function",
"addError",
"(",
"$",
"error",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"error",
")",
")",
"{",
"$",
"this",
"->",
"errors",
"+=",
"$",
"error",
";",
"}",
"else",
"{",
"$",
"this",
"->",
"errors",
"[",
"]",
"=",
"$",
"er... | add an error message to the list
@param mixed $error
@return Result $this | [
"add",
"an",
"error",
"message",
"to",
"the",
"list"
] | 412efe97c32434b986be7373b936b643748ace64 | https://github.com/mikebarlow/result/blob/412efe97c32434b986be7373b936b643748ace64/src/Result.php#L197-L206 |
194,904 | mikebarlow/result | src/Result.php | Result.getExtra | public function getExtra($key)
{
if (array_key_exists($key, $this->extras)) {
return $this->extras[$key];
}
return false;
} | php | public function getExtra($key)
{
if (array_key_exists($key, $this->extras)) {
return $this->extras[$key];
}
return false;
} | [
"public",
"function",
"getExtra",
"(",
"$",
"key",
")",
"{",
"if",
"(",
"array_key_exists",
"(",
"$",
"key",
",",
"$",
"this",
"->",
"extras",
")",
")",
"{",
"return",
"$",
"this",
"->",
"extras",
"[",
"$",
"key",
"]",
";",
"}",
"return",
"false",
... | get individual extra items
@param string $key
@return mixed | [
"get",
"individual",
"extra",
"items"
] | 412efe97c32434b986be7373b936b643748ace64 | https://github.com/mikebarlow/result/blob/412efe97c32434b986be7373b936b643748ace64/src/Result.php#L224-L231 |
194,905 | linpax/microphp-framework | src/form/Form.php | Form.label | public function label(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
return Html::label($model->getLabel($property), $element['id'], $options);
} | php | public function label(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
return Html::label($model->getLabel($property), $element['id'], $options);
} | [
"public",
"function",
"label",
"(",
"IFormModel",
"$",
"model",
",",
"$",
"property",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"element",
"=",
"$",
"this",
"->",
"getField",
"(",
"$",
"model",
",",
"$",
"property",
")",
";",
"ret... | Render label tag
@access public
@param IFormModel $model model
@param string $property model property
@param array $options attributes array
@return string | [
"Render",
"label",
"tag"
] | 11f3370f3f64c516cce9b84ecd8276c6e9ae8df9 | https://github.com/linpax/microphp-framework/blob/11f3370f3f64c516cce9b84ecd8276c6e9ae8df9/src/form/Form.php#L32-L37 |
194,906 | linpax/microphp-framework | src/form/Form.php | Form.getField | protected function getField(IFormModel $model, $property)
{
$cl = get_class($model);
$smallName = substr($cl, strrpos($cl, '\\') + 1);
return [
'id' => $smallName.'_'.$property,
'name' => $smallName.'['.$property.']',
'value' => property_exists($model, $p... | php | protected function getField(IFormModel $model, $property)
{
$cl = get_class($model);
$smallName = substr($cl, strrpos($cl, '\\') + 1);
return [
'id' => $smallName.'_'.$property,
'name' => $smallName.'['.$property.']',
'value' => property_exists($model, $p... | [
"protected",
"function",
"getField",
"(",
"IFormModel",
"$",
"model",
",",
"$",
"property",
")",
"{",
"$",
"cl",
"=",
"get_class",
"(",
"$",
"model",
")",
";",
"$",
"smallName",
"=",
"substr",
"(",
"$",
"cl",
",",
"strrpos",
"(",
"$",
"cl",
",",
"'... | Get model field data
@access private
@param IFormModel $model model
@param string $property model property
@return array | [
"Get",
"model",
"field",
"data"
] | 11f3370f3f64c516cce9b84ecd8276c6e9ae8df9 | https://github.com/linpax/microphp-framework/blob/11f3370f3f64c516cce9b84ecd8276c6e9ae8df9/src/form/Form.php#L49-L59 |
194,907 | linpax/microphp-framework | src/form/Form.php | Form.hiddenField | public function hiddenField(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
return Html::hiddenField($element['name'], $element['value'], $options);
} | php | public function hiddenField(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
return Html::hiddenField($element['name'], $element['value'], $options);
} | [
"public",
"function",
"hiddenField",
"(",
"IFormModel",
"$",
"model",
",",
"$",
"property",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"element",
"=",
"$",
"this",
"->",
"getField",
"(",
"$",
"model",
",",
"$",
"property",
")",
";",
... | Render hidden field tag
@access public
@param IFormModel $model model
@param string $property model property
@param array $options attributes array
@return string | [
"Render",
"hidden",
"field",
"tag"
] | 11f3370f3f64c516cce9b84ecd8276c6e9ae8df9 | https://github.com/linpax/microphp-framework/blob/11f3370f3f64c516cce9b84ecd8276c6e9ae8df9/src/form/Form.php#L72-L77 |
194,908 | linpax/microphp-framework | src/form/Form.php | Form.getBlock | protected function getBlock($name, array &$options)
{
$block = [];
/** @noinspection ReferenceMismatchInspection */
if (array_key_exists($name, $options)) {
$block = $options[$name];
unset($options[$name]);
}
return $block;
} | php | protected function getBlock($name, array &$options)
{
$block = [];
/** @noinspection ReferenceMismatchInspection */
if (array_key_exists($name, $options)) {
$block = $options[$name];
unset($options[$name]);
}
return $block;
} | [
"protected",
"function",
"getBlock",
"(",
"$",
"name",
",",
"array",
"&",
"$",
"options",
")",
"{",
"$",
"block",
"=",
"[",
"]",
";",
"/** @noinspection ReferenceMismatchInspection */",
"if",
"(",
"array_key_exists",
"(",
"$",
"name",
",",
"$",
"options",
")... | Get block from options
@access protected
@param string $name Block name
@param array $options Options array
@return array | [
"Get",
"block",
"from",
"options"
] | 11f3370f3f64c516cce9b84ecd8276c6e9ae8df9 | https://github.com/linpax/microphp-framework/blob/11f3370f3f64c516cce9b84ecd8276c6e9ae8df9/src/form/Form.php#L151-L162 |
194,909 | linpax/microphp-framework | src/form/Form.php | Form.fileFieldRow | public function fileFieldRow(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
return Html::openTag('div', $this->getBlock('block', $options)).
Html::label($model->getLabel($property), $element['id'],... | php | public function fileFieldRow(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
return Html::openTag('div', $this->getBlock('block', $options)).
Html::label($model->getLabel($property), $element['id'],... | [
"public",
"function",
"fileFieldRow",
"(",
"IFormModel",
"$",
"model",
",",
"$",
"property",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"element",
"=",
"$",
"this",
"->",
"getField",
"(",
"$",
"model",
",",
"$",
"property",
")",
";",... | Render file field row
@access public
@param IFormModel $model model
@param string $property model property
@param array $options attribute array
@return string | [
"Render",
"file",
"field",
"row"
] | 11f3370f3f64c516cce9b84ecd8276c6e9ae8df9 | https://github.com/linpax/microphp-framework/blob/11f3370f3f64c516cce9b84ecd8276c6e9ae8df9/src/form/Form.php#L194-L203 |
194,910 | linpax/microphp-framework | src/form/Form.php | Form.imageFieldRow | public function imageFieldRow(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
return Html::openTag('div', $this->getBlock('block', $options)).
Html::label($model->getLabel($property), $element['id']... | php | public function imageFieldRow(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
return Html::openTag('div', $this->getBlock('block', $options)).
Html::label($model->getLabel($property), $element['id']... | [
"public",
"function",
"imageFieldRow",
"(",
"IFormModel",
"$",
"model",
",",
"$",
"property",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"element",
"=",
"$",
"this",
"->",
"getField",
"(",
"$",
"model",
",",
"$",
"property",
")",
";"... | Render image field row
@access public
@param IFormModel $model model
@param string $property model property
@param array $options attribute array
@return string | [
"Render",
"image",
"field",
"row"
] | 11f3370f3f64c516cce9b84ecd8276c6e9ae8df9 | https://github.com/linpax/microphp-framework/blob/11f3370f3f64c516cce9b84ecd8276c6e9ae8df9/src/form/Form.php#L235-L244 |
194,911 | linpax/microphp-framework | src/form/Form.php | Form.imageField | public function imageField(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
$image = !empty($options['image']) ? $options['image'] : [];
return Html::imageField($element['name'], $element['value'], $... | php | public function imageField(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
$image = !empty($options['image']) ? $options['image'] : [];
return Html::imageField($element['name'], $element['value'], $... | [
"public",
"function",
"imageField",
"(",
"IFormModel",
"$",
"model",
",",
"$",
"property",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"element",
"=",
"$",
"this",
"->",
"getField",
"(",
"$",
"model",
",",
"$",
"property",
")",
";",
... | Render image field tag
@access public
@param IFormModel $model model
@param string $property model property
@param array $options attributes array
@return string | [
"Render",
"image",
"field",
"tag"
] | 11f3370f3f64c516cce9b84ecd8276c6e9ae8df9 | https://github.com/linpax/microphp-framework/blob/11f3370f3f64c516cce9b84ecd8276c6e9ae8df9/src/form/Form.php#L257-L264 |
194,912 | linpax/microphp-framework | src/form/Form.php | Form.passwordFieldRow | public function passwordFieldRow(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
return Html::openTag('div', $this->getBlock('block', $options)).
Html::label($model->getLabel($property), $element['i... | php | public function passwordFieldRow(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
return Html::openTag('div', $this->getBlock('block', $options)).
Html::label($model->getLabel($property), $element['i... | [
"public",
"function",
"passwordFieldRow",
"(",
"IFormModel",
"$",
"model",
",",
"$",
"property",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"element",
"=",
"$",
"this",
"->",
"getField",
"(",
"$",
"model",
",",
"$",
"property",
")",
... | Render password field row
@access public
@param IFormModel $model model
@param string $property model property
@param array $options attribute array
@return string | [
"Render",
"password",
"field",
"row"
] | 11f3370f3f64c516cce9b84ecd8276c6e9ae8df9 | https://github.com/linpax/microphp-framework/blob/11f3370f3f64c516cce9b84ecd8276c6e9ae8df9/src/form/Form.php#L277-L286 |
194,913 | linpax/microphp-framework | src/form/Form.php | Form.textAreaFieldRow | public function textAreaFieldRow(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
return Html::openTag('div', $this->getBlock('block', $options)).
Html::label($model->getLabel($property), $element['i... | php | public function textAreaFieldRow(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
return Html::openTag('div', $this->getBlock('block', $options)).
Html::label($model->getLabel($property), $element['i... | [
"public",
"function",
"textAreaFieldRow",
"(",
"IFormModel",
"$",
"model",
",",
"$",
"property",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"element",
"=",
"$",
"this",
"->",
"getField",
"(",
"$",
"model",
",",
"$",
"property",
")",
... | Render textArea field row
@access public
@param IFormModel $model model
@param string $property model property
@param array $options attribute array
@return string | [
"Render",
"textArea",
"field",
"row"
] | 11f3370f3f64c516cce9b84ecd8276c6e9ae8df9 | https://github.com/linpax/microphp-framework/blob/11f3370f3f64c516cce9b84ecd8276c6e9ae8df9/src/form/Form.php#L318-L327 |
194,914 | linpax/microphp-framework | src/form/Form.php | Form.textAreaField | public function textAreaField(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
return Html::textArea($element['name'], $element['value'], $options);
} | php | public function textAreaField(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
return Html::textArea($element['name'], $element['value'], $options);
} | [
"public",
"function",
"textAreaField",
"(",
"IFormModel",
"$",
"model",
",",
"$",
"property",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"element",
"=",
"$",
"this",
"->",
"getField",
"(",
"$",
"model",
",",
"$",
"property",
")",
";"... | Render textarea tag
@access public
@param IFormModel $model model
@param string $property model property
@param array $options attributes array
@return string | [
"Render",
"textarea",
"tag"
] | 11f3370f3f64c516cce9b84ecd8276c6e9ae8df9 | https://github.com/linpax/microphp-framework/blob/11f3370f3f64c516cce9b84ecd8276c6e9ae8df9/src/form/Form.php#L340-L346 |
194,915 | linpax/microphp-framework | src/form/Form.php | Form.checkboxFieldRow | public function checkboxFieldRow(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
return Html::openTag('div', $this->getBlock('block', $options)).
Html::label($model->getLabel($property), $element['i... | php | public function checkboxFieldRow(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
return Html::openTag('div', $this->getBlock('block', $options)).
Html::label($model->getLabel($property), $element['i... | [
"public",
"function",
"checkboxFieldRow",
"(",
"IFormModel",
"$",
"model",
",",
"$",
"property",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"element",
"=",
"$",
"this",
"->",
"getField",
"(",
"$",
"model",
",",
"$",
"property",
")",
... | Render checkbox field row
@access public
@param IFormModel $model model
@param string $property model property
@param array $options attribute array
@return string | [
"Render",
"checkbox",
"field",
"row"
] | 11f3370f3f64c516cce9b84ecd8276c6e9ae8df9 | https://github.com/linpax/microphp-framework/blob/11f3370f3f64c516cce9b84ecd8276c6e9ae8df9/src/form/Form.php#L359-L368 |
194,916 | linpax/microphp-framework | src/form/Form.php | Form.listBoxFieldRow | public function listBoxFieldRow(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
return Html::openTag('div', $this->getBlock('block', $options)).
Html::label($model->getLabel($property), $element['id... | php | public function listBoxFieldRow(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
return Html::openTag('div', $this->getBlock('block', $options)).
Html::label($model->getLabel($property), $element['id... | [
"public",
"function",
"listBoxFieldRow",
"(",
"IFormModel",
"$",
"model",
",",
"$",
"property",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"element",
"=",
"$",
"this",
"->",
"getField",
"(",
"$",
"model",
",",
"$",
"property",
")",
"... | Render listBox field row
@access public
@param IFormModel $model model
@param string $property model property
@param array $options attribute array
@return string | [
"Render",
"listBox",
"field",
"row"
] | 11f3370f3f64c516cce9b84ecd8276c6e9ae8df9 | https://github.com/linpax/microphp-framework/blob/11f3370f3f64c516cce9b84ecd8276c6e9ae8df9/src/form/Form.php#L402-L411 |
194,917 | linpax/microphp-framework | src/form/Form.php | Form.listBoxField | public function listBoxField(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
$options['selected'] = $element['value'];
if (empty($options['size'])) {
$options['size'] = 3;
}
... | php | public function listBoxField(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
$options['selected'] = $element['value'];
if (empty($options['size'])) {
$options['size'] = 3;
}
... | [
"public",
"function",
"listBoxField",
"(",
"IFormModel",
"$",
"model",
",",
"$",
"property",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"element",
"=",
"$",
"this",
"->",
"getField",
"(",
"$",
"model",
",",
"$",
"property",
")",
";",... | Render list box tag
@access public
@param IFormModel $model model
@param string $property model property
@param array $options attributes array
@return string | [
"Render",
"list",
"box",
"tag"
] | 11f3370f3f64c516cce9b84ecd8276c6e9ae8df9 | https://github.com/linpax/microphp-framework/blob/11f3370f3f64c516cce9b84ecd8276c6e9ae8df9/src/form/Form.php#L424-L435 |
194,918 | linpax/microphp-framework | src/form/Form.php | Form.dropDownListField | public function dropDownListField(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
if (!empty($element['value'])) {
$options['selected'] = $element['value'];
}
return Html::dropD... | php | public function dropDownListField(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
if (!empty($element['value'])) {
$options['selected'] = $element['value'];
}
return Html::dropD... | [
"public",
"function",
"dropDownListField",
"(",
"IFormModel",
"$",
"model",
",",
"$",
"property",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"element",
"=",
"$",
"this",
"->",
"getField",
"(",
"$",
"model",
",",
"$",
"property",
")",
... | Render drop down list tag
@access public
@param IFormModel $model model
@param string $property model property
@param array $options attribute array
@return string | [
"Render",
"drop",
"down",
"list",
"tag"
] | 11f3370f3f64c516cce9b84ecd8276c6e9ae8df9 | https://github.com/linpax/microphp-framework/blob/11f3370f3f64c516cce9b84ecd8276c6e9ae8df9/src/form/Form.php#L470-L480 |
194,919 | linpax/microphp-framework | src/form/Form.php | Form.checkBoxListField | public function checkBoxListField(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$checkboxes = !empty($options['checkboxes']) ? $options['checkboxes'] : [];
$format = !empty($options['format']) ? $options['format'] : '<p>%check% %text%</p>... | php | public function checkBoxListField(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$checkboxes = !empty($options['checkboxes']) ? $options['checkboxes'] : [];
$format = !empty($options['format']) ? $options['format'] : '<p>%check% %text%</p>... | [
"public",
"function",
"checkBoxListField",
"(",
"IFormModel",
"$",
"model",
",",
"$",
"property",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"element",
"=",
"$",
"this",
"->",
"getField",
"(",
"$",
"model",
",",
"$",
"property",
")",
... | Render check box list tag
@access public
@param IFormModel $model model
@param string $property property model
@param array $options options array
@return string | [
"Render",
"check",
"box",
"list",
"tag"
] | 11f3370f3f64c516cce9b84ecd8276c6e9ae8df9 | https://github.com/linpax/microphp-framework/blob/11f3370f3f64c516cce9b84ecd8276c6e9ae8df9/src/form/Form.php#L515-L522 |
194,920 | linpax/microphp-framework | src/form/Form.php | Form.radioButtonListField | public function radioButtonListField(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$radios = !empty($options['radios']) ? $options['radios'] : [];
$format = !empty($options['format']) ? $options['format'] : '<p>%radio% %text%</p>';
... | php | public function radioButtonListField(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$radios = !empty($options['radios']) ? $options['radios'] : [];
$format = !empty($options['format']) ? $options['format'] : '<p>%radio% %text%</p>';
... | [
"public",
"function",
"radioButtonListField",
"(",
"IFormModel",
"$",
"model",
",",
"$",
"property",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"element",
"=",
"$",
"this",
"->",
"getField",
"(",
"$",
"model",
",",
"$",
"property",
")"... | Render radio button list tag
@access public
@param IFormModel $model model
@param string $property model property
@param array $options options array
@return string | [
"Render",
"radio",
"button",
"list",
"tag"
] | 11f3370f3f64c516cce9b84ecd8276c6e9ae8df9 | https://github.com/linpax/microphp-framework/blob/11f3370f3f64c516cce9b84ecd8276c6e9ae8df9/src/form/Form.php#L557-L564 |
194,921 | linpax/microphp-framework | src/form/Form.php | Form.colorFieldRow | public function colorFieldRow(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
return Html::openTag('div', $this->getBlock('block', $options)).
Html::label($model->getLabel($property), $element['id']... | php | public function colorFieldRow(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
return Html::openTag('div', $this->getBlock('block', $options)).
Html::label($model->getLabel($property), $element['id']... | [
"public",
"function",
"colorFieldRow",
"(",
"IFormModel",
"$",
"model",
",",
"$",
"property",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"element",
"=",
"$",
"this",
"->",
"getField",
"(",
"$",
"model",
",",
"$",
"property",
")",
";"... | Render color field row
@access public
@param IFormModel $model model
@param string $property model property
@param array $options attribute array
@return string | [
"Render",
"color",
"field",
"row"
] | 11f3370f3f64c516cce9b84ecd8276c6e9ae8df9 | https://github.com/linpax/microphp-framework/blob/11f3370f3f64c516cce9b84ecd8276c6e9ae8df9/src/form/Form.php#L579-L588 |
194,922 | linpax/microphp-framework | src/form/Form.php | Form.dateTimeFieldRow | public function dateTimeFieldRow(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
return Html::openTag('div', $this->getBlock('block', $options)).
Html::label($model->getLabel($property), $element['i... | php | public function dateTimeFieldRow(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
return Html::openTag('div', $this->getBlock('block', $options)).
Html::label($model->getLabel($property), $element['i... | [
"public",
"function",
"dateTimeFieldRow",
"(",
"IFormModel",
"$",
"model",
",",
"$",
"property",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"element",
"=",
"$",
"this",
"->",
"getField",
"(",
"$",
"model",
",",
"$",
"property",
")",
... | Render datetime field row
@access public
@param IFormModel $model model
@param string $property model property
@param array $options attribute array
@return string | [
"Render",
"datetime",
"field",
"row"
] | 11f3370f3f64c516cce9b84ecd8276c6e9ae8df9 | https://github.com/linpax/microphp-framework/blob/11f3370f3f64c516cce9b84ecd8276c6e9ae8df9/src/form/Form.php#L661-L670 |
194,923 | linpax/microphp-framework | src/form/Form.php | Form.dateTimeField | public function dateTimeField(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
return Html::datetimeField($element['name'], $element['value'], $options);
} | php | public function dateTimeField(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
return Html::datetimeField($element['name'], $element['value'], $options);
} | [
"public",
"function",
"dateTimeField",
"(",
"IFormModel",
"$",
"model",
",",
"$",
"property",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"element",
"=",
"$",
"this",
"->",
"getField",
"(",
"$",
"model",
",",
"$",
"property",
")",
";"... | Render datetime field tag
@access public
@param IFormModel $model model
@param string $property model property
@param array $options attributes array
@return string | [
"Render",
"datetime",
"field",
"tag"
] | 11f3370f3f64c516cce9b84ecd8276c6e9ae8df9 | https://github.com/linpax/microphp-framework/blob/11f3370f3f64c516cce9b84ecd8276c6e9ae8df9/src/form/Form.php#L683-L689 |
194,924 | linpax/microphp-framework | src/form/Form.php | Form.dateTimeLocalFieldRow | public function dateTimeLocalFieldRow(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
return Html::openTag('div', $this->getBlock('block', $options)).
Html::label($model->getLabel($property), $eleme... | php | public function dateTimeLocalFieldRow(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
return Html::openTag('div', $this->getBlock('block', $options)).
Html::label($model->getLabel($property), $eleme... | [
"public",
"function",
"dateTimeLocalFieldRow",
"(",
"IFormModel",
"$",
"model",
",",
"$",
"property",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"element",
"=",
"$",
"this",
"->",
"getField",
"(",
"$",
"model",
",",
"$",
"property",
")... | Render datetime-local field row
@access public
@param IFormModel $model model
@param string $property model property
@param array $options attribute array
@return string | [
"Render",
"datetime",
"-",
"local",
"field",
"row"
] | 11f3370f3f64c516cce9b84ecd8276c6e9ae8df9 | https://github.com/linpax/microphp-framework/blob/11f3370f3f64c516cce9b84ecd8276c6e9ae8df9/src/form/Form.php#L702-L711 |
194,925 | linpax/microphp-framework | src/form/Form.php | Form.dateTimeLocalField | public function dateTimeLocalField(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
return Html::datetimeLocalField($element['name'], $element['value'], $options);
} | php | public function dateTimeLocalField(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
return Html::datetimeLocalField($element['name'], $element['value'], $options);
} | [
"public",
"function",
"dateTimeLocalField",
"(",
"IFormModel",
"$",
"model",
",",
"$",
"property",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"element",
"=",
"$",
"this",
"->",
"getField",
"(",
"$",
"model",
",",
"$",
"property",
")",
... | Render datetime-local field tag
@access public
@param IFormModel $model model
@param string $property model property
@param array $options attributes array
@return string | [
"Render",
"datetime",
"-",
"local",
"field",
"tag"
] | 11f3370f3f64c516cce9b84ecd8276c6e9ae8df9 | https://github.com/linpax/microphp-framework/blob/11f3370f3f64c516cce9b84ecd8276c6e9ae8df9/src/form/Form.php#L724-L730 |
194,926 | linpax/microphp-framework | src/form/Form.php | Form.emailFieldRow | public function emailFieldRow(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
return Html::openTag('div', $this->getBlock('block', $options)).
Html::label($model->getLabel($property), $element['id']... | php | public function emailFieldRow(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
return Html::openTag('div', $this->getBlock('block', $options)).
Html::label($model->getLabel($property), $element['id']... | [
"public",
"function",
"emailFieldRow",
"(",
"IFormModel",
"$",
"model",
",",
"$",
"property",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"element",
"=",
"$",
"this",
"->",
"getField",
"(",
"$",
"model",
",",
"$",
"property",
")",
";"... | Render email field row
@access public
@param IFormModel $model model
@param string $property model property
@param array $options attribute array
@return string | [
"Render",
"email",
"field",
"row"
] | 11f3370f3f64c516cce9b84ecd8276c6e9ae8df9 | https://github.com/linpax/microphp-framework/blob/11f3370f3f64c516cce9b84ecd8276c6e9ae8df9/src/form/Form.php#L743-L752 |
194,927 | linpax/microphp-framework | src/form/Form.php | Form.rangeFieldRow | public function rangeFieldRow(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
return Html::openTag('div', $this->getBlock('block', $options)).
Html::label($model->getLabel($property), $element['id']... | php | public function rangeFieldRow(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
return Html::openTag('div', $this->getBlock('block', $options)).
Html::label($model->getLabel($property), $element['id']... | [
"public",
"function",
"rangeFieldRow",
"(",
"IFormModel",
"$",
"model",
",",
"$",
"property",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"element",
"=",
"$",
"this",
"->",
"getField",
"(",
"$",
"model",
",",
"$",
"property",
")",
";"... | Render range field row
@access public
@param IFormModel $model model
@param string $property model property
@param array $options attribute array
@return string | [
"Render",
"range",
"field",
"row"
] | 11f3370f3f64c516cce9b84ecd8276c6e9ae8df9 | https://github.com/linpax/microphp-framework/blob/11f3370f3f64c516cce9b84ecd8276c6e9ae8df9/src/form/Form.php#L825-L834 |
194,928 | linpax/microphp-framework | src/form/Form.php | Form.searchFieldRow | public function searchFieldRow(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
return Html::openTag('div', $this->getBlock('block', $options)).
Html::label($model->getLabel($property), $element['id'... | php | public function searchFieldRow(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
return Html::openTag('div', $this->getBlock('block', $options)).
Html::label($model->getLabel($property), $element['id'... | [
"public",
"function",
"searchFieldRow",
"(",
"IFormModel",
"$",
"model",
",",
"$",
"property",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"element",
"=",
"$",
"this",
"->",
"getField",
"(",
"$",
"model",
",",
"$",
"property",
")",
";... | Render search field row
@access public
@param IFormModel $model model
@param string $property model property
@param array $options attribute array
@return string | [
"Render",
"search",
"field",
"row"
] | 11f3370f3f64c516cce9b84ecd8276c6e9ae8df9 | https://github.com/linpax/microphp-framework/blob/11f3370f3f64c516cce9b84ecd8276c6e9ae8df9/src/form/Form.php#L866-L875 |
194,929 | linpax/microphp-framework | src/form/Form.php | Form.telFieldRow | public function telFieldRow(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
return Html::openTag('div', $this->getBlock('block', $options)).
Html::label($model->getLabel($property), $element['id'], ... | php | public function telFieldRow(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
return Html::openTag('div', $this->getBlock('block', $options)).
Html::label($model->getLabel($property), $element['id'], ... | [
"public",
"function",
"telFieldRow",
"(",
"IFormModel",
"$",
"model",
",",
"$",
"property",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"element",
"=",
"$",
"this",
"->",
"getField",
"(",
"$",
"model",
",",
"$",
"property",
")",
";",
... | Render telephone field row
@access public
@param IFormModel $model model
@param string $property model property
@param array $options attribute array
@return string | [
"Render",
"telephone",
"field",
"row"
] | 11f3370f3f64c516cce9b84ecd8276c6e9ae8df9 | https://github.com/linpax/microphp-framework/blob/11f3370f3f64c516cce9b84ecd8276c6e9ae8df9/src/form/Form.php#L907-L916 |
194,930 | linpax/microphp-framework | src/form/Form.php | Form.telField | public function telField(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
return Html::telField($element['name'], $element['value'], $options);
} | php | public function telField(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
return Html::telField($element['name'], $element['value'], $options);
} | [
"public",
"function",
"telField",
"(",
"IFormModel",
"$",
"model",
",",
"$",
"property",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"element",
"=",
"$",
"this",
"->",
"getField",
"(",
"$",
"model",
",",
"$",
"property",
")",
";",
"... | Render telephone tag
@access public
@param IFormModel $model model
@param string $property model property
@param array $options attributes array
@return string | [
"Render",
"telephone",
"tag"
] | 11f3370f3f64c516cce9b84ecd8276c6e9ae8df9 | https://github.com/linpax/microphp-framework/blob/11f3370f3f64c516cce9b84ecd8276c6e9ae8df9/src/form/Form.php#L929-L935 |
194,931 | linpax/microphp-framework | src/form/Form.php | Form.timeFieldRow | public function timeFieldRow(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
return Html::openTag('div', $this->getBlock('block', $options)).
Html::label($model->getLabel($property), $element['id'],... | php | public function timeFieldRow(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
return Html::openTag('div', $this->getBlock('block', $options)).
Html::label($model->getLabel($property), $element['id'],... | [
"public",
"function",
"timeFieldRow",
"(",
"IFormModel",
"$",
"model",
",",
"$",
"property",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"element",
"=",
"$",
"this",
"->",
"getField",
"(",
"$",
"model",
",",
"$",
"property",
")",
";",... | Render time field row
@access public
@param IFormModel $model model
@param string $property model property
@param array $options attribute array
@return string | [
"Render",
"time",
"field",
"row"
] | 11f3370f3f64c516cce9b84ecd8276c6e9ae8df9 | https://github.com/linpax/microphp-framework/blob/11f3370f3f64c516cce9b84ecd8276c6e9ae8df9/src/form/Form.php#L948-L957 |
194,932 | linpax/microphp-framework | src/form/Form.php | Form.urlFieldRow | public function urlFieldRow(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
return Html::openTag('div', $this->getBlock('block', $options)).
Html::label($model->getLabel($property), $element['id'], ... | php | public function urlFieldRow(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
return Html::openTag('div', $this->getBlock('block', $options)).
Html::label($model->getLabel($property), $element['id'], ... | [
"public",
"function",
"urlFieldRow",
"(",
"IFormModel",
"$",
"model",
",",
"$",
"property",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"element",
"=",
"$",
"this",
"->",
"getField",
"(",
"$",
"model",
",",
"$",
"property",
")",
";",
... | Render url field row
@access public
@param IFormModel $model model
@param string $property model property
@param array $options attribute array
@return string | [
"Render",
"url",
"field",
"row"
] | 11f3370f3f64c516cce9b84ecd8276c6e9ae8df9 | https://github.com/linpax/microphp-framework/blob/11f3370f3f64c516cce9b84ecd8276c6e9ae8df9/src/form/Form.php#L989-L998 |
194,933 | linpax/microphp-framework | src/form/Form.php | Form.monthFieldRow | public function monthFieldRow(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
return Html::openTag('div', $this->getBlock('block', $options)).
Html::label($model->getLabel($property), $element['id']... | php | public function monthFieldRow(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
return Html::openTag('div', $this->getBlock('block', $options)).
Html::label($model->getLabel($property), $element['id']... | [
"public",
"function",
"monthFieldRow",
"(",
"IFormModel",
"$",
"model",
",",
"$",
"property",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"element",
"=",
"$",
"this",
"->",
"getField",
"(",
"$",
"model",
",",
"$",
"property",
")",
";"... | Render month field row
@access public
@param IFormModel $model model
@param string $property model property
@param array $options attribute array
@return string | [
"Render",
"month",
"field",
"row"
] | 11f3370f3f64c516cce9b84ecd8276c6e9ae8df9 | https://github.com/linpax/microphp-framework/blob/11f3370f3f64c516cce9b84ecd8276c6e9ae8df9/src/form/Form.php#L1030-L1039 |
194,934 | linpax/microphp-framework | src/form/Form.php | Form.weekFieldRow | public function weekFieldRow(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
return Html::openTag('div', $this->getBlock('block', $options)).
Html::label($model->getLabel($property), $element['id'],... | php | public function weekFieldRow(IFormModel $model, $property, array $options = [])
{
$element = $this->getField($model, $property);
$options['id'] = $element['id'];
return Html::openTag('div', $this->getBlock('block', $options)).
Html::label($model->getLabel($property), $element['id'],... | [
"public",
"function",
"weekFieldRow",
"(",
"IFormModel",
"$",
"model",
",",
"$",
"property",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"element",
"=",
"$",
"this",
"->",
"getField",
"(",
"$",
"model",
",",
"$",
"property",
")",
";",... | Render week field row
@access public
@param IFormModel $model model
@param string $property model property
@param array $options attribute array
@return string | [
"Render",
"week",
"field",
"row"
] | 11f3370f3f64c516cce9b84ecd8276c6e9ae8df9 | https://github.com/linpax/microphp-framework/blob/11f3370f3f64c516cce9b84ecd8276c6e9ae8df9/src/form/Form.php#L1071-L1080 |
194,935 | Xiphe/THETOOLS | src/Xiphe/THETOOLS.php | THETOOLS.makeFile | public static function makeFile($file, $chmod = 0777, $touchTime = null)
{
if (!file_exists($file)) {
if (!is_dir(dirname($file))) {
mkdir(dirname($file), 0777, true);
}
$h = fopen($file, 'w');
if ($h) {
fclose($h);
... | php | public static function makeFile($file, $chmod = 0777, $touchTime = null)
{
if (!file_exists($file)) {
if (!is_dir(dirname($file))) {
mkdir(dirname($file), 0777, true);
}
$h = fopen($file, 'w');
if ($h) {
fclose($h);
... | [
"public",
"static",
"function",
"makeFile",
"(",
"$",
"file",
",",
"$",
"chmod",
"=",
"0777",
",",
"$",
"touchTime",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"file_exists",
"(",
"$",
"file",
")",
")",
"{",
"if",
"(",
"!",
"is_dir",
"(",
"dirname",
... | Recursively generate directories if not existent and place a empty file inside it.
@param string $file full path to the required file
@param integer $chmod chmod for the generated folders
@param integer $touchTime timestamp for the filemtime
@return null | [
"Recursively",
"generate",
"directories",
"if",
"not",
"existent",
"and",
"place",
"a",
"empty",
"file",
"inside",
"it",
"."
] | 16e90e9523272ab48ca44e61d25f56aa1e7fa612 | https://github.com/Xiphe/THETOOLS/blob/16e90e9523272ab48ca44e61d25f56aa1e7fa612/src/Xiphe/THETOOLS.php#L133-L148 |
194,936 | Xiphe/THETOOLS | src/Xiphe/THETOOLS.php | THETOOLS.normalizeUrl | public static function normalizeUrl($url) {
if (!class_exists('URLNormalizer')) {
require_once(realpath(__DIR__.'/../../classes').'/URLNormalizer.php');
}
$un = new \URLNormalizer();
$un->setUrl($url);
return $un->normalize();
} | php | public static function normalizeUrl($url) {
if (!class_exists('URLNormalizer')) {
require_once(realpath(__DIR__.'/../../classes').'/URLNormalizer.php');
}
$un = new \URLNormalizer();
$un->setUrl($url);
return $un->normalize();
} | [
"public",
"static",
"function",
"normalizeUrl",
"(",
"$",
"url",
")",
"{",
"if",
"(",
"!",
"class_exists",
"(",
"'URLNormalizer'",
")",
")",
"{",
"require_once",
"(",
"realpath",
"(",
"__DIR__",
".",
"'/../../classes'",
")",
".",
"'/URLNormalizer.php'",
")",
... | Use Glen Scotts UrlNormalizer to normalize the passed url.
@param string $url
@return string | [
"Use",
"Glen",
"Scotts",
"UrlNormalizer",
"to",
"normalize",
"the",
"passed",
"url",
"."
] | 16e90e9523272ab48ca44e61d25f56aa1e7fa612 | https://github.com/Xiphe/THETOOLS/blob/16e90e9523272ab48ca44e61d25f56aa1e7fa612/src/Xiphe/THETOOLS.php#L204-L212 |
194,937 | Xiphe/THETOOLS | src/Xiphe/THETOOLS.php | THETOOLS.encrypt | public static function encrypt($string, $key) {
$result = '';
for ($i=0; $i<strlen ($string); $i++) {
$char = substr($string, $i, 1);
$keychar = substr($key, ($i % strlen($key))-1, 1);
$char = chr(ord($char)+ord($keychar));
$result .= $char;
}
... | php | public static function encrypt($string, $key) {
$result = '';
for ($i=0; $i<strlen ($string); $i++) {
$char = substr($string, $i, 1);
$keychar = substr($key, ($i % strlen($key))-1, 1);
$char = chr(ord($char)+ord($keychar));
$result .= $char;
}
... | [
"public",
"static",
"function",
"encrypt",
"(",
"$",
"string",
",",
"$",
"key",
")",
"{",
"$",
"result",
"=",
"''",
";",
"for",
"(",
"$",
"i",
"=",
"0",
";",
"$",
"i",
"<",
"strlen",
"(",
"$",
"string",
")",
";",
"$",
"i",
"++",
")",
"{",
"... | Basic encryption method.
http://www.tfonfara.de/php-encryptdecrypt-funktion-mit-base64-und-schlussel.xhtml
@param string $string the string that needs encryption.
@param string $key a key string for the encryption.
@return string the encrypted string. | [
"Basic",
"encryption",
"method",
"."
] | 16e90e9523272ab48ca44e61d25f56aa1e7fa612 | https://github.com/Xiphe/THETOOLS/blob/16e90e9523272ab48ca44e61d25f56aa1e7fa612/src/Xiphe/THETOOLS.php#L224-L234 |
194,938 | Xiphe/THETOOLS | src/Xiphe/THETOOLS.php | THETOOLS.decrypt | public static function decrypt($string, $key) {
$result = '';
$string = base64_decode($string);
for ($i=0; $i<strlen($string); $i++) {
$char = substr($string, $i, 1);
$keychar = substr($key, ($i % strlen($key))-1, 1);
$char = chr(ord($char)-ord($keychar));
... | php | public static function decrypt($string, $key) {
$result = '';
$string = base64_decode($string);
for ($i=0; $i<strlen($string); $i++) {
$char = substr($string, $i, 1);
$keychar = substr($key, ($i % strlen($key))-1, 1);
$char = chr(ord($char)-ord($keychar));
... | [
"public",
"static",
"function",
"decrypt",
"(",
"$",
"string",
",",
"$",
"key",
")",
"{",
"$",
"result",
"=",
"''",
";",
"$",
"string",
"=",
"base64_decode",
"(",
"$",
"string",
")",
";",
"for",
"(",
"$",
"i",
"=",
"0",
";",
"$",
"i",
"<",
"str... | Basic decryption method.
http://www.tfonfara.de/php-encryptdecrypt-funktion-mit-base64-und-schlussel.xhtml
@param string $string a string encrypted by THETOOLS::encrypt().
@param string $key a key string for the decryption.
@return string the decrypted string. | [
"Basic",
"decryption",
"method",
"."
] | 16e90e9523272ab48ca44e61d25f56aa1e7fa612 | https://github.com/Xiphe/THETOOLS/blob/16e90e9523272ab48ca44e61d25f56aa1e7fa612/src/Xiphe/THETOOLS.php#L246-L258 |
194,939 | Xiphe/THETOOLS | src/Xiphe/THETOOLS.php | THETOOLS.getPathsBase | public static function getPathsBase(&$a, &$b, $modify = false, $DS = DIRECTORY_SEPARATOR) {
if ($modify) {
$str1 = &$a;
$str2 = &$b;
} else {
$str1 = $a;
$str2 = $b;
}
$str1 = explode($DS, self::unify_slashes($str1, $DS));
$str2 = ... | php | public static function getPathsBase(&$a, &$b, $modify = false, $DS = DIRECTORY_SEPARATOR) {
if ($modify) {
$str1 = &$a;
$str2 = &$b;
} else {
$str1 = $a;
$str2 = $b;
}
$str1 = explode($DS, self::unify_slashes($str1, $DS));
$str2 = ... | [
"public",
"static",
"function",
"getPathsBase",
"(",
"&",
"$",
"a",
",",
"&",
"$",
"b",
",",
"$",
"modify",
"=",
"false",
",",
"$",
"DS",
"=",
"DIRECTORY_SEPARATOR",
")",
"{",
"if",
"(",
"$",
"modify",
")",
"{",
"$",
"str1",
"=",
"&",
"$",
"a",
... | Return the folder on with the both given paths split.
@param string $a first path
@param string $b second path
@param boolean $modify set true to directly shorten the passed paths to be relative to the return values
@param string $DS the directory separator that should be used.
@return string | [
"Return",
"the",
"folder",
"on",
"with",
"the",
"both",
"given",
"paths",
"split",
"."
] | 16e90e9523272ab48ca44e61d25f56aa1e7fa612 | https://github.com/Xiphe/THETOOLS/blob/16e90e9523272ab48ca44e61d25f56aa1e7fa612/src/Xiphe/THETOOLS.php#L269-L293 |
194,940 | Xiphe/THETOOLS | src/Xiphe/THETOOLS.php | THETOOLS.buildDir | public static function buildDir($path, $chmod = 0775) {
deprecated('mkdir($dir, null, true);');
if (is_dir($path)) {
return true;
}
$dir = DIRECTORY_SEPARATOR;
foreach(explode(DIRECTORY_SEPARATOR, self::unify_slashes($path, DIRECTORY_SEPARATOR, true)) as $f) {
... | php | public static function buildDir($path, $chmod = 0775) {
deprecated('mkdir($dir, null, true);');
if (is_dir($path)) {
return true;
}
$dir = DIRECTORY_SEPARATOR;
foreach(explode(DIRECTORY_SEPARATOR, self::unify_slashes($path, DIRECTORY_SEPARATOR, true)) as $f) {
... | [
"public",
"static",
"function",
"buildDir",
"(",
"$",
"path",
",",
"$",
"chmod",
"=",
"0775",
")",
"{",
"deprecated",
"(",
"'mkdir($dir, null, true);'",
")",
";",
"if",
"(",
"is_dir",
"(",
"$",
"path",
")",
")",
"{",
"return",
"true",
";",
"}",
"$",
... | Checks if the given Path is existent and generates missing folders.
@param string $path the path
@param integer $chmod chmod for new folders
@return boolean true if path is available false if not. | [
"Checks",
"if",
"the",
"given",
"Path",
"is",
"existent",
"and",
"generates",
"missing",
"folders",
"."
] | 16e90e9523272ab48ca44e61d25f56aa1e7fa612 | https://github.com/Xiphe/THETOOLS/blob/16e90e9523272ab48ca44e61d25f56aa1e7fa612/src/Xiphe/THETOOLS.php#L303-L325 |
194,941 | Xiphe/THETOOLS | src/Xiphe/THETOOLS.php | THETOOLS.arrayWrap | public static function arrayWrap($input, $wrap)
{
$w1 = '';
$w2 = '';
if (is_array($wrap)) {
$w1 = $wrap[0];
if (isset($wrap[1])) {
$w2 = $wrap[1];
}
} elseif (!is_string($wrap)) {
throw new \Exception(sprintf('Invalid T... | php | public static function arrayWrap($input, $wrap)
{
$w1 = '';
$w2 = '';
if (is_array($wrap)) {
$w1 = $wrap[0];
if (isset($wrap[1])) {
$w2 = $wrap[1];
}
} elseif (!is_string($wrap)) {
throw new \Exception(sprintf('Invalid T... | [
"public",
"static",
"function",
"arrayWrap",
"(",
"$",
"input",
",",
"$",
"wrap",
")",
"{",
"$",
"w1",
"=",
"''",
";",
"$",
"w2",
"=",
"''",
";",
"if",
"(",
"is_array",
"(",
"$",
"wrap",
")",
")",
"{",
"$",
"w1",
"=",
"$",
"wrap",
"[",
"0",
... | Wrap each entry of an array
@param array $input the array
@param array|string $wrap the wrap
@return array | [
"Wrap",
"each",
"entry",
"of",
"an",
"array"
] | 16e90e9523272ab48ca44e61d25f56aa1e7fa612 | https://github.com/Xiphe/THETOOLS/blob/16e90e9523272ab48ca44e61d25f56aa1e7fa612/src/Xiphe/THETOOLS.php#L396-L419 |
194,942 | Xiphe/THETOOLS | src/Xiphe/THETOOLS.php | THETOOLS.post | public static function post($url, $params)
{
if (!is_array($params)) {
$params = self::ar($params);
}
$query = http_build_query($params);
/*
* open connection.
*/
$ch = curl_init();
/*
* set the url, number of POST vars, POST ... | php | public static function post($url, $params)
{
if (!is_array($params)) {
$params = self::ar($params);
}
$query = http_build_query($params);
/*
* open connection.
*/
$ch = curl_init();
/*
* set the url, number of POST vars, POST ... | [
"public",
"static",
"function",
"post",
"(",
"$",
"url",
",",
"$",
"params",
")",
"{",
"if",
"(",
"!",
"is_array",
"(",
"$",
"params",
")",
")",
"{",
"$",
"params",
"=",
"self",
"::",
"ar",
"(",
"$",
"params",
")",
";",
"}",
"$",
"query",
"=",
... | Performs a post request to given url passing given parameters.
@param string $url the url
@param mixed $params array, class or string parameter. See THETOOLS::ar()
@return string the output of the requested url. | [
"Performs",
"a",
"post",
"request",
"to",
"given",
"url",
"passing",
"given",
"parameters",
"."
] | 16e90e9523272ab48ca44e61d25f56aa1e7fa612 | https://github.com/Xiphe/THETOOLS/blob/16e90e9523272ab48ca44e61d25f56aa1e7fa612/src/Xiphe/THETOOLS.php#L609-L641 |
194,943 | Xiphe/THETOOLS | src/Xiphe/THETOOLS.php | THETOOLS.ar | public static function ar($a, $b = null, $deep = false)
{
$r = array();
if (is_array($a) || is_object($a)) {
foreach ($a as $k => $v) {
if ($deep == true && (is_array($v) || is_object($v))) {
$v = self::ar($v, null, true);
}
... | php | public static function ar($a, $b = null, $deep = false)
{
$r = array();
if (is_array($a) || is_object($a)) {
foreach ($a as $k => $v) {
if ($deep == true && (is_array($v) || is_object($v))) {
$v = self::ar($v, null, true);
}
... | [
"public",
"static",
"function",
"ar",
"(",
"$",
"a",
",",
"$",
"b",
"=",
"null",
",",
"$",
"deep",
"=",
"false",
")",
"{",
"$",
"r",
"=",
"array",
"(",
")",
";",
"if",
"(",
"is_array",
"(",
"$",
"a",
")",
"||",
"is_object",
"(",
"$",
"a",
"... | Converts arrays, objects, integers or strings into arrays.
@access public
@param mixed $a the variable to be converted or the key if $b is set.
@param mixed $b the value for key $a.
@param mixed $deep flag if the converting should be limited on first layer or
also be appended to deeper objects.
@return arr... | [
"Converts",
"arrays",
"objects",
"integers",
"or",
"strings",
"into",
"arrays",
"."
] | 16e90e9523272ab48ca44e61d25f56aa1e7fa612 | https://github.com/Xiphe/THETOOLS/blob/16e90e9523272ab48ca44e61d25f56aa1e7fa612/src/Xiphe/THETOOLS.php#L653-L671 |
194,944 | Xiphe/THETOOLS | src/Xiphe/THETOOLS.php | THETOOLS.pq | public static function pq($html, $contentType = null)
{
self::initPhpQuery();
return \phpQuery::newDocument($html, $contentType);
} | php | public static function pq($html, $contentType = null)
{
self::initPhpQuery();
return \phpQuery::newDocument($html, $contentType);
} | [
"public",
"static",
"function",
"pq",
"(",
"$",
"html",
",",
"$",
"contentType",
"=",
"null",
")",
"{",
"self",
"::",
"initPhpQuery",
"(",
")",
";",
"return",
"\\",
"phpQuery",
"::",
"newDocument",
"(",
"$",
"html",
",",
"$",
"contentType",
")",
";",
... | Sets a new "DOM" for PHPQuery.
@access public
@param string $html
@param string $contentType
@return void | [
"Sets",
"a",
"new",
"DOM",
"for",
"PHPQuery",
"."
] | 16e90e9523272ab48ca44e61d25f56aa1e7fa612 | https://github.com/Xiphe/THETOOLS/blob/16e90e9523272ab48ca44e61d25f56aa1e7fa612/src/Xiphe/THETOOLS.php#L724-L728 |
194,945 | Xiphe/THETOOLS | src/Xiphe/THETOOLS.php | THETOOLS.switchVars | public static function switchVars(array $vars)
{
$i = 0;
foreach ($vars as $k => $v) {
if ($i == 0) {
$pk = $k;
$pv = $v;
} else {
return array($pk => $v, $k => $pv);
}
$i++;
}
} | php | public static function switchVars(array $vars)
{
$i = 0;
foreach ($vars as $k => $v) {
if ($i == 0) {
$pk = $k;
$pv = $v;
} else {
return array($pk => $v, $k => $pv);
}
$i++;
}
} | [
"public",
"static",
"function",
"switchVars",
"(",
"array",
"$",
"vars",
")",
"{",
"$",
"i",
"=",
"0",
";",
"foreach",
"(",
"$",
"vars",
"as",
"$",
"k",
"=>",
"$",
"v",
")",
"{",
"if",
"(",
"$",
"i",
"==",
"0",
")",
"{",
"$",
"pk",
"=",
"$"... | Switches the first two variables of an array while leaving its keys.
@param array $vars
@return array | [
"Switches",
"the",
"first",
"two",
"variables",
"of",
"an",
"array",
"while",
"leaving",
"its",
"keys",
"."
] | 16e90e9523272ab48ca44e61d25f56aa1e7fa612 | https://github.com/Xiphe/THETOOLS/blob/16e90e9523272ab48ca44e61d25f56aa1e7fa612/src/Xiphe/THETOOLS.php#L736-L748 |
194,946 | Xiphe/THETOOLS | src/Xiphe/THETOOLS.php | THETOOLS.get_randomString | public static function get_randomString($length = 12, $type = 'pAan', $additional = '')
{
$sources = array(
'p' => '!#$%&()=?*+-_:.;,<>', // Punctuation
'a' => 'abcdefghijklmnopqrstuvwxyz', // alpha
'A' => 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', // Alpha
'n' => '... | php | public static function get_randomString($length = 12, $type = 'pAan', $additional = '')
{
$sources = array(
'p' => '!#$%&()=?*+-_:.;,<>', // Punctuation
'a' => 'abcdefghijklmnopqrstuvwxyz', // alpha
'A' => 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', // Alpha
'n' => '... | [
"public",
"static",
"function",
"get_randomString",
"(",
"$",
"length",
"=",
"12",
",",
"$",
"type",
"=",
"'pAan'",
",",
"$",
"additional",
"=",
"''",
")",
"{",
"$",
"sources",
"=",
"array",
"(",
"'p'",
"=>",
"'!#$%&()=?*+-_:.;,<>'",
",",
"// Punctuation",... | Generates a passwordish random string
@access public
@param integer $length the length of the string
@param string $type keys of chartypes to be used. See beginning of declaration.
@param string $additional optional string containing additional chars to use beside the ones in $type
@return string | [
"Generates",
"a",
"passwordish",
"random",
"string"
] | 16e90e9523272ab48ca44e61d25f56aa1e7fa612 | https://github.com/Xiphe/THETOOLS/blob/16e90e9523272ab48ca44e61d25f56aa1e7fa612/src/Xiphe/THETOOLS.php#L775-L807 |
194,947 | Xiphe/THETOOLS | src/Xiphe/THETOOLS.php | THETOOLS.get_browserObj | public static function get_browserObj()
{
if (!class_exists('\Ikimea\Browser\Browser')) {
throw new THETOOLSException("Browser Class could not be loaded");
}
if (self::$s_BrowserObj === null) {
self::$s_BrowserObj = new \Ikimea\Browser\Browser;
self::$s_b... | php | public static function get_browserObj()
{
if (!class_exists('\Ikimea\Browser\Browser')) {
throw new THETOOLSException("Browser Class could not be loaded");
}
if (self::$s_BrowserObj === null) {
self::$s_BrowserObj = new \Ikimea\Browser\Browser;
self::$s_b... | [
"public",
"static",
"function",
"get_browserObj",
"(",
")",
"{",
"if",
"(",
"!",
"class_exists",
"(",
"'\\Ikimea\\Browser\\Browser'",
")",
")",
"{",
"throw",
"new",
"THETOOLSException",
"(",
"\"Browser Class could not be loaded\"",
")",
";",
"}",
"if",
"(",
"self"... | Generates and caches the Browser-Object
@access private
@return object | [
"Generates",
"and",
"caches",
"the",
"Browser",
"-",
"Object"
] | 16e90e9523272ab48ca44e61d25f56aa1e7fa612 | https://github.com/Xiphe/THETOOLS/blob/16e90e9523272ab48ca44e61d25f56aa1e7fa612/src/Xiphe/THETOOLS.php#L967-L980 |
194,948 | Xiphe/THETOOLS | src/Xiphe/THETOOLS.php | THETOOLS.minify | public static function minify($string, $noSpace = false)
{
$string = preg_replace("/\s+/", ' ', $string);
return $noSpace ? str_replace(' ', '', $string) : $string;
} | php | public static function minify($string, $noSpace = false)
{
$string = preg_replace("/\s+/", ' ', $string);
return $noSpace ? str_replace(' ', '', $string) : $string;
} | [
"public",
"static",
"function",
"minify",
"(",
"$",
"string",
",",
"$",
"noSpace",
"=",
"false",
")",
"{",
"$",
"string",
"=",
"preg_replace",
"(",
"\"/\\s+/\"",
",",
"' '",
",",
"$",
"string",
")",
";",
"return",
"$",
"noSpace",
"?",
"str_replace",
"(... | deletes linebreaks and tabs from string
@access public
@param string $string
@param bool $noSpace if true spaces will be deleted, too
@return string | [
"deletes",
"linebreaks",
"and",
"tabs",
"from",
"string"
] | 16e90e9523272ab48ca44e61d25f56aa1e7fa612 | https://github.com/Xiphe/THETOOLS/blob/16e90e9523272ab48ca44e61d25f56aa1e7fa612/src/Xiphe/THETOOLS.php#L1071-L1075 |
194,949 | Xiphe/THETOOLS | src/Xiphe/THETOOLS.php | THETOOLS.replace_subdomain | public static function replace_subdomain($url, $newSubdomain)
{
$url = parse_url($url);
if(substr_count($url['host'], '.') >= 2) {
$url['host'] = (str_replace(
substr($url['host'], 0, strpos($url['host'], '.')),
$newSubdomain,
$url['host']
... | php | public static function replace_subdomain($url, $newSubdomain)
{
$url = parse_url($url);
if(substr_count($url['host'], '.') >= 2) {
$url['host'] = (str_replace(
substr($url['host'], 0, strpos($url['host'], '.')),
$newSubdomain,
$url['host']
... | [
"public",
"static",
"function",
"replace_subdomain",
"(",
"$",
"url",
",",
"$",
"newSubdomain",
")",
"{",
"$",
"url",
"=",
"parse_url",
"(",
"$",
"url",
")",
";",
"if",
"(",
"substr_count",
"(",
"$",
"url",
"[",
"'host'",
"]",
",",
"'.'",
")",
">=",
... | Replaces the subdomain of given url or adds it.
@access public
@param string $url
@param string $newSubdomain
@return string | [
"Replaces",
"the",
"subdomain",
"of",
"given",
"url",
"or",
"adds",
"it",
"."
] | 16e90e9523272ab48ca44e61d25f56aa1e7fa612 | https://github.com/Xiphe/THETOOLS/blob/16e90e9523272ab48ca44e61d25f56aa1e7fa612/src/Xiphe/THETOOLS.php#L1085-L1098 |
194,950 | Xiphe/THETOOLS | src/Xiphe/THETOOLS.php | THETOOLS.unparse_url | public static function unparse_url($parsedUrl)
{
$scheme = isset($parsedUrl['scheme']) ? $parsedUrl['scheme'] . '://' : '';
$host = isset($parsedUrl['host']) ? $parsedUrl['host'] : '';
$port = isset($parsedUrl['port']) ? ':' . $parsedUrl['port'] : '';
$user = isset($par... | php | public static function unparse_url($parsedUrl)
{
$scheme = isset($parsedUrl['scheme']) ? $parsedUrl['scheme'] . '://' : '';
$host = isset($parsedUrl['host']) ? $parsedUrl['host'] : '';
$port = isset($parsedUrl['port']) ? ':' . $parsedUrl['port'] : '';
$user = isset($par... | [
"public",
"static",
"function",
"unparse_url",
"(",
"$",
"parsedUrl",
")",
"{",
"$",
"scheme",
"=",
"isset",
"(",
"$",
"parsedUrl",
"[",
"'scheme'",
"]",
")",
"?",
"$",
"parsedUrl",
"[",
"'scheme'",
"]",
".",
"'://'",
":",
"''",
";",
"$",
"host",
"="... | reverses the result array of parse_url into an url string.
@access public
@param array $parsedUrl a parsed url
@return string a unparsed url | [
"reverses",
"the",
"result",
"array",
"of",
"parse_url",
"into",
"an",
"url",
"string",
"."
] | 16e90e9523272ab48ca44e61d25f56aa1e7fa612 | https://github.com/Xiphe/THETOOLS/blob/16e90e9523272ab48ca44e61d25f56aa1e7fa612/src/Xiphe/THETOOLS.php#L1107-L1119 |
194,951 | Xiphe/THETOOLS | src/Xiphe/THETOOLS.php | THETOOLS.get_currentUrl | public static function get_currentUrl($filter = array(), $queryFilter = array(), $queryFilterMethod = 'remove')
{
if (!is_array($filter) && !empty($filter)) {
$filter = array($filter);
}
if (!empty(self::$fakeCurrentUrl)) {
$pageURL = self::$fakeCurrentUrl;
}... | php | public static function get_currentUrl($filter = array(), $queryFilter = array(), $queryFilterMethod = 'remove')
{
if (!is_array($filter) && !empty($filter)) {
$filter = array($filter);
}
if (!empty(self::$fakeCurrentUrl)) {
$pageURL = self::$fakeCurrentUrl;
}... | [
"public",
"static",
"function",
"get_currentUrl",
"(",
"$",
"filter",
"=",
"array",
"(",
")",
",",
"$",
"queryFilter",
"=",
"array",
"(",
")",
",",
"$",
"queryFilterMethod",
"=",
"'remove'",
")",
"{",
"if",
"(",
"!",
"is_array",
"(",
"$",
"filter",
")"... | curPageURL returns the current url
@param string|array $filter part or parts of the url structure that should be ignored.
@return string the current URL | [
"curPageURL",
"returns",
"the",
"current",
"url"
] | 16e90e9523272ab48ca44e61d25f56aa1e7fa612 | https://github.com/Xiphe/THETOOLS/blob/16e90e9523272ab48ca44e61d25f56aa1e7fa612/src/Xiphe/THETOOLS.php#L1128-L1188 |
194,952 | Xiphe/THETOOLS | src/Xiphe/THETOOLS.php | THETOOLS.recursive_get | public static function recursive_get($obj, $path)
{
foreach (explode('|', $path) as $key) {
if (is_object($obj)) {
if (isset($obj->$key)) {
$obj = $obj->$key;
} else {
return null;
}
} elseif ... | php | public static function recursive_get($obj, $path)
{
foreach (explode('|', $path) as $key) {
if (is_object($obj)) {
if (isset($obj->$key)) {
$obj = $obj->$key;
} else {
return null;
}
} elseif ... | [
"public",
"static",
"function",
"recursive_get",
"(",
"$",
"obj",
",",
"$",
"path",
")",
"{",
"foreach",
"(",
"explode",
"(",
"'|'",
",",
"$",
"path",
")",
"as",
"$",
"key",
")",
"{",
"if",
"(",
"is_object",
"(",
"$",
"obj",
")",
")",
"{",
"if",
... | Handy function to dive into an array or object without knowing what it is
nested keys can be separated by a pipe so it's possible to get a deeper
key with only one call
@access public
@param mixed $obj array or object
@param string $path the key or key-path (foo|bar)
@return mixed the keys value or null if ... | [
"Handy",
"function",
"to",
"dive",
"into",
"an",
"array",
"or",
"object",
"without",
"knowing",
"what",
"it",
"is",
"nested",
"keys",
"can",
"be",
"separated",
"by",
"a",
"pipe",
"so",
"it",
"s",
"possible",
"to",
"get",
"a",
"deeper",
"key",
"with",
"... | 16e90e9523272ab48ca44e61d25f56aa1e7fa612 | https://github.com/Xiphe/THETOOLS/blob/16e90e9523272ab48ca44e61d25f56aa1e7fa612/src/Xiphe/THETOOLS.php#L1241-L1257 |
194,953 | Xiphe/THETOOLS | src/Xiphe/THETOOLS.php | THETOOLS.recursive_unset | public static function recursive_unset(&$obj, $path)
{
$i = 1;
foreach (($l = explode('|', $path)) as $key) {
if (is_object($obj)) {
if (isset($obj->$key)) {
if (count($l) === $i) {
unset($obj->$key);
ret... | php | public static function recursive_unset(&$obj, $path)
{
$i = 1;
foreach (($l = explode('|', $path)) as $key) {
if (is_object($obj)) {
if (isset($obj->$key)) {
if (count($l) === $i) {
unset($obj->$key);
ret... | [
"public",
"static",
"function",
"recursive_unset",
"(",
"&",
"$",
"obj",
",",
"$",
"path",
")",
"{",
"$",
"i",
"=",
"1",
";",
"foreach",
"(",
"(",
"$",
"l",
"=",
"explode",
"(",
"'|'",
",",
"$",
"path",
")",
")",
"as",
"$",
"key",
")",
"{",
"... | Handy function to unset a deep value of a class or an array.
@access public
@param mixed $obj the class or array containing the value to be unset.
@param string $path the key or key-path (foo|bar|some|thing)
@return mixed true if unset, false if key does not exist, null if key is invalid. | [
"Handy",
"function",
"to",
"unset",
"a",
"deep",
"value",
"of",
"a",
"class",
"or",
"an",
"array",
"."
] | 16e90e9523272ab48ca44e61d25f56aa1e7fa612 | https://github.com/Xiphe/THETOOLS/blob/16e90e9523272ab48ca44e61d25f56aa1e7fa612/src/Xiphe/THETOOLS.php#L1340-L1368 |
194,954 | Xiphe/THETOOLS | src/Xiphe/THETOOLS.php | THETOOLS.unSlash | public static function unSlash($str, $unify = false)
{
return self::_slash($str, '/', false, false, $unify);
} | php | public static function unSlash($str, $unify = false)
{
return self::_slash($str, '/', false, false, $unify);
} | [
"public",
"static",
"function",
"unSlash",
"(",
"$",
"str",
",",
"$",
"unify",
"=",
"false",
")",
"{",
"return",
"self",
"::",
"_slash",
"(",
"$",
"str",
",",
"'/'",
",",
"false",
",",
"false",
",",
"$",
"unify",
")",
";",
"}"
] | remove potential slash from the end of the string.
@access public
@param string $str the string to be unslashed
@param boolean $unify set true to unify all slashes in $str
@return string the unslashed string | [
"remove",
"potential",
"slash",
"from",
"the",
"end",
"of",
"the",
"string",
"."
] | 16e90e9523272ab48ca44e61d25f56aa1e7fa612 | https://github.com/Xiphe/THETOOLS/blob/16e90e9523272ab48ca44e61d25f56aa1e7fa612/src/Xiphe/THETOOLS.php#L1481-L1484 |
194,955 | Xiphe/THETOOLS | src/Xiphe/THETOOLS.php | THETOOLS.unDS | public static function unDS($str, $unify = false)
{
return self::_slash($str, DIRECTORY_SEPARATOR, false, false, $unify);
} | php | public static function unDS($str, $unify = false)
{
return self::_slash($str, DIRECTORY_SEPARATOR, false, false, $unify);
} | [
"public",
"static",
"function",
"unDS",
"(",
"$",
"str",
",",
"$",
"unify",
"=",
"false",
")",
"{",
"return",
"self",
"::",
"_slash",
"(",
"$",
"str",
",",
"DIRECTORY_SEPARATOR",
",",
"false",
",",
"false",
",",
"$",
"unify",
")",
";",
"}"
] | remove potential DIRECTORY_SEPARATOR from the end of the string.
@access public
@param string $str the string to be unslashed
@param boolean $unify set true to unify all slashes in $str
@return string the unslashed string | [
"remove",
"potential",
"DIRECTORY_SEPARATOR",
"from",
"the",
"end",
"of",
"the",
"string",
"."
] | 16e90e9523272ab48ca44e61d25f56aa1e7fa612 | https://github.com/Xiphe/THETOOLS/blob/16e90e9523272ab48ca44e61d25f56aa1e7fa612/src/Xiphe/THETOOLS.php#L1494-L1497 |
194,956 | Xiphe/THETOOLS | src/Xiphe/THETOOLS.php | THETOOLS.unBackSlash | public static function unBackSlash($str, $unify = false)
{
return self::_slash($str, '\\', false, false, $unify);
} | php | public static function unBackSlash($str, $unify = false)
{
return self::_slash($str, '\\', false, false, $unify);
} | [
"public",
"static",
"function",
"unBackSlash",
"(",
"$",
"str",
",",
"$",
"unify",
"=",
"false",
")",
"{",
"return",
"self",
"::",
"_slash",
"(",
"$",
"str",
",",
"'\\\\'",
",",
"false",
",",
"false",
",",
"$",
"unify",
")",
";",
"}"
] | remove potential backslash from the end of the string.
@access public
@param string $str the string to be unbackslashed
@param boolean $unify set true to unify all slashes in $str
@return string the unbackslashed string | [
"remove",
"potential",
"backslash",
"from",
"the",
"end",
"of",
"the",
"string",
"."
] | 16e90e9523272ab48ca44e61d25f56aa1e7fa612 | https://github.com/Xiphe/THETOOLS/blob/16e90e9523272ab48ca44e61d25f56aa1e7fa612/src/Xiphe/THETOOLS.php#L1507-L1510 |
194,957 | Xiphe/THETOOLS | src/Xiphe/THETOOLS.php | THETOOLS.slash | public static function slash($str, $unify = false)
{
return self::_slash($str, '/', false, true, $unify);
} | php | public static function slash($str, $unify = false)
{
return self::_slash($str, '/', false, true, $unify);
} | [
"public",
"static",
"function",
"slash",
"(",
"$",
"str",
",",
"$",
"unify",
"=",
"false",
")",
"{",
"return",
"self",
"::",
"_slash",
"(",
"$",
"str",
",",
"'/'",
",",
"false",
",",
"true",
",",
"$",
"unify",
")",
";",
"}"
] | add slash to the end of the string.
@access public
@param string $str the string to be slashed
@param boolean $unify set true to unify all slashes in $str
@return string the slashed string | [
"add",
"slash",
"to",
"the",
"end",
"of",
"the",
"string",
"."
] | 16e90e9523272ab48ca44e61d25f56aa1e7fa612 | https://github.com/Xiphe/THETOOLS/blob/16e90e9523272ab48ca44e61d25f56aa1e7fa612/src/Xiphe/THETOOLS.php#L1520-L1523 |
194,958 | Xiphe/THETOOLS | src/Xiphe/THETOOLS.php | THETOOLS.DS | public static function DS($str, $unify = false)
{
return self::_slash($str, DIRECTORY_SEPARATOR, false, true, $unify);
} | php | public static function DS($str, $unify = false)
{
return self::_slash($str, DIRECTORY_SEPARATOR, false, true, $unify);
} | [
"public",
"static",
"function",
"DS",
"(",
"$",
"str",
",",
"$",
"unify",
"=",
"false",
")",
"{",
"return",
"self",
"::",
"_slash",
"(",
"$",
"str",
",",
"DIRECTORY_SEPARATOR",
",",
"false",
",",
"true",
",",
"$",
"unify",
")",
";",
"}"
] | add DIRECTORY_SEPARATOR to the end of the string.
@access public
@param string $str the string to be slashed
@param boolean $unify set true to unify all slashes in $str
@return string the slashed string | [
"add",
"DIRECTORY_SEPARATOR",
"to",
"the",
"end",
"of",
"the",
"string",
"."
] | 16e90e9523272ab48ca44e61d25f56aa1e7fa612 | https://github.com/Xiphe/THETOOLS/blob/16e90e9523272ab48ca44e61d25f56aa1e7fa612/src/Xiphe/THETOOLS.php#L1533-L1536 |
194,959 | Xiphe/THETOOLS | src/Xiphe/THETOOLS.php | THETOOLS.backSlash | public static function backSlash($str, $unify = false)
{
return self::_slash($str, '\\', false, true, $unify);
} | php | public static function backSlash($str, $unify = false)
{
return self::_slash($str, '\\', false, true, $unify);
} | [
"public",
"static",
"function",
"backSlash",
"(",
"$",
"str",
",",
"$",
"unify",
"=",
"false",
")",
"{",
"return",
"self",
"::",
"_slash",
"(",
"$",
"str",
",",
"'\\\\'",
",",
"false",
",",
"true",
",",
"$",
"unify",
")",
";",
"}"
] | add backslash to the end of the string.
@access public
@param string $str the string to be backslash
@param boolean $unify set true to unify all slashes in $str
@return string the backslashed string | [
"add",
"backslash",
"to",
"the",
"end",
"of",
"the",
"string",
"."
] | 16e90e9523272ab48ca44e61d25f56aa1e7fa612 | https://github.com/Xiphe/THETOOLS/blob/16e90e9523272ab48ca44e61d25f56aa1e7fa612/src/Xiphe/THETOOLS.php#L1546-L1549 |
194,960 | Xiphe/THETOOLS | src/Xiphe/THETOOLS.php | THETOOLS.unPreSlash | public static function unPreSlash($str, $unify = false)
{
return self::_slash($str, '/', true, false, $unify);
} | php | public static function unPreSlash($str, $unify = false)
{
return self::_slash($str, '/', true, false, $unify);
} | [
"public",
"static",
"function",
"unPreSlash",
"(",
"$",
"str",
",",
"$",
"unify",
"=",
"false",
")",
"{",
"return",
"self",
"::",
"_slash",
"(",
"$",
"str",
",",
"'/'",
",",
"true",
",",
"false",
",",
"$",
"unify",
")",
";",
"}"
] | remove potential slash from the front of the string.
@access public
@param string $str the string to be unslashed
@param boolean $unify set true to unify all slashes in $str
@return string the unslashed string | [
"remove",
"potential",
"slash",
"from",
"the",
"front",
"of",
"the",
"string",
"."
] | 16e90e9523272ab48ca44e61d25f56aa1e7fa612 | https://github.com/Xiphe/THETOOLS/blob/16e90e9523272ab48ca44e61d25f56aa1e7fa612/src/Xiphe/THETOOLS.php#L1559-L1562 |
194,961 | Xiphe/THETOOLS | src/Xiphe/THETOOLS.php | THETOOLS.unPreDS | public static function unPreDS($str, $unify = false)
{
return self::_slash($str, DIRECTORY_SEPARATOR, true, false, $unify);
} | php | public static function unPreDS($str, $unify = false)
{
return self::_slash($str, DIRECTORY_SEPARATOR, true, false, $unify);
} | [
"public",
"static",
"function",
"unPreDS",
"(",
"$",
"str",
",",
"$",
"unify",
"=",
"false",
")",
"{",
"return",
"self",
"::",
"_slash",
"(",
"$",
"str",
",",
"DIRECTORY_SEPARATOR",
",",
"true",
",",
"false",
",",
"$",
"unify",
")",
";",
"}"
] | remove potential DIRECTORY_SEPARATOR from the front of the string.
@access public
@param string $str the string to be unslashed
@param boolean $unify set true to unify all slashes in $str
@return string the unslashed string | [
"remove",
"potential",
"DIRECTORY_SEPARATOR",
"from",
"the",
"front",
"of",
"the",
"string",
"."
] | 16e90e9523272ab48ca44e61d25f56aa1e7fa612 | https://github.com/Xiphe/THETOOLS/blob/16e90e9523272ab48ca44e61d25f56aa1e7fa612/src/Xiphe/THETOOLS.php#L1572-L1575 |
194,962 | Xiphe/THETOOLS | src/Xiphe/THETOOLS.php | THETOOLS.unPreBackSlash | public static function unPreBackSlash($str, $unify = false)
{
return self::_slash($str, '\\', true, false, $unify);
} | php | public static function unPreBackSlash($str, $unify = false)
{
return self::_slash($str, '\\', true, false, $unify);
} | [
"public",
"static",
"function",
"unPreBackSlash",
"(",
"$",
"str",
",",
"$",
"unify",
"=",
"false",
")",
"{",
"return",
"self",
"::",
"_slash",
"(",
"$",
"str",
",",
"'\\\\'",
",",
"true",
",",
"false",
",",
"$",
"unify",
")",
";",
"}"
] | remove potential backslash from the front of the string.
@access public
@param string $str the string to be unbackslashed
@param boolean $unify set true to unify all slashes in $str
@return string the unbackslashed string | [
"remove",
"potential",
"backslash",
"from",
"the",
"front",
"of",
"the",
"string",
"."
] | 16e90e9523272ab48ca44e61d25f56aa1e7fa612 | https://github.com/Xiphe/THETOOLS/blob/16e90e9523272ab48ca44e61d25f56aa1e7fa612/src/Xiphe/THETOOLS.php#L1585-L1588 |
194,963 | Xiphe/THETOOLS | src/Xiphe/THETOOLS.php | THETOOLS.preSlash | public static function preSlash($str, $unify = false)
{
return self::_slash($str, '/', true, true, $unify);
} | php | public static function preSlash($str, $unify = false)
{
return self::_slash($str, '/', true, true, $unify);
} | [
"public",
"static",
"function",
"preSlash",
"(",
"$",
"str",
",",
"$",
"unify",
"=",
"false",
")",
"{",
"return",
"self",
"::",
"_slash",
"(",
"$",
"str",
",",
"'/'",
",",
"true",
",",
"true",
",",
"$",
"unify",
")",
";",
"}"
] | add slash to the front of the string.
@access public
@param string $str the string to be slashed
@param boolean $unify set true to unify all slashes in $str
@return string the slashed string | [
"add",
"slash",
"to",
"the",
"front",
"of",
"the",
"string",
"."
] | 16e90e9523272ab48ca44e61d25f56aa1e7fa612 | https://github.com/Xiphe/THETOOLS/blob/16e90e9523272ab48ca44e61d25f56aa1e7fa612/src/Xiphe/THETOOLS.php#L1598-L1601 |
194,964 | Xiphe/THETOOLS | src/Xiphe/THETOOLS.php | THETOOLS.preDS | public static function preDS($str, $unify = false)
{
return self::_slash($str, DIRECTORY_SEPARATOR, true, true, $unify);
} | php | public static function preDS($str, $unify = false)
{
return self::_slash($str, DIRECTORY_SEPARATOR, true, true, $unify);
} | [
"public",
"static",
"function",
"preDS",
"(",
"$",
"str",
",",
"$",
"unify",
"=",
"false",
")",
"{",
"return",
"self",
"::",
"_slash",
"(",
"$",
"str",
",",
"DIRECTORY_SEPARATOR",
",",
"true",
",",
"true",
",",
"$",
"unify",
")",
";",
"}"
] | add DIRECTORY_SEPARATOR to the front of the string.
@access public
@param string $str the string to be slashed
@param boolean $unify set true to unify all slashes in $str
@return string the slashed string | [
"add",
"DIRECTORY_SEPARATOR",
"to",
"the",
"front",
"of",
"the",
"string",
"."
] | 16e90e9523272ab48ca44e61d25f56aa1e7fa612 | https://github.com/Xiphe/THETOOLS/blob/16e90e9523272ab48ca44e61d25f56aa1e7fa612/src/Xiphe/THETOOLS.php#L1611-L1614 |
194,965 | Xiphe/THETOOLS | src/Xiphe/THETOOLS.php | THETOOLS.preBackSlash | public static function preBackSlash($str, $unify = false)
{
return self::_slash($str, '\\', true, true, $unify);
} | php | public static function preBackSlash($str, $unify = false)
{
return self::_slash($str, '\\', true, true, $unify);
} | [
"public",
"static",
"function",
"preBackSlash",
"(",
"$",
"str",
",",
"$",
"unify",
"=",
"false",
")",
"{",
"return",
"self",
"::",
"_slash",
"(",
"$",
"str",
",",
"'\\\\'",
",",
"true",
",",
"true",
",",
"$",
"unify",
")",
";",
"}"
] | add backslash to the front of the string.
@access public
@param string $str the string to be backslashed
@param boolean $unify set true to unify all slashes in $str
@return string the backslashed string | [
"add",
"backslash",
"to",
"the",
"front",
"of",
"the",
"string",
"."
] | 16e90e9523272ab48ca44e61d25f56aa1e7fa612 | https://github.com/Xiphe/THETOOLS/blob/16e90e9523272ab48ca44e61d25f56aa1e7fa612/src/Xiphe/THETOOLS.php#L1624-L1627 |
194,966 | Xiphe/THETOOLS | src/Xiphe/THETOOLS.php | THETOOLS.is_cleanPath | public static function is_cleanPath($path, $clean = false, $regex = '!_-\w\/\\\ ')
{
if ($clean === true) {
$path = self::get_directPath($path);
}
if (preg_match('/[^' . $regex . ']/', $path)) {
return false;
}
return $path;
} | php | public static function is_cleanPath($path, $clean = false, $regex = '!_-\w\/\\\ ')
{
if ($clean === true) {
$path = self::get_directPath($path);
}
if (preg_match('/[^' . $regex . ']/', $path)) {
return false;
}
return $path;
} | [
"public",
"static",
"function",
"is_cleanPath",
"(",
"$",
"path",
",",
"$",
"clean",
"=",
"false",
",",
"$",
"regex",
"=",
"'!_-\\w\\/\\\\\\ '",
")",
"{",
"if",
"(",
"$",
"clean",
"===",
"true",
")",
"{",
"$",
"path",
"=",
"self",
"::",
"get_directPath... | Checks if the path has invalid characters.
@access public
@param string $path
@param bool $clean set true to call self::get_directPath() on $path
@param string $regex the regex of valid chars
@return void | [
"Checks",
"if",
"the",
"path",
"has",
"invalid",
"characters",
"."
] | 16e90e9523272ab48ca44e61d25f56aa1e7fa612 | https://github.com/Xiphe/THETOOLS/blob/16e90e9523272ab48ca44e61d25f56aa1e7fa612/src/Xiphe/THETOOLS.php#L1653-L1662 |
194,967 | Xiphe/THETOOLS | src/Xiphe/THETOOLS.php | THETOOLS.get_static_var | public static function get_static_var($classname, $key)
{
$vars = get_class_vars($classname);
if (isset($vars[$key])) {
return $vars[$key];
}
} | php | public static function get_static_var($classname, $key)
{
$vars = get_class_vars($classname);
if (isset($vars[$key])) {
return $vars[$key];
}
} | [
"public",
"static",
"function",
"get_static_var",
"(",
"$",
"classname",
",",
"$",
"key",
")",
"{",
"$",
"vars",
"=",
"get_class_vars",
"(",
"$",
"classname",
")",
";",
"if",
"(",
"isset",
"(",
"$",
"vars",
"[",
"$",
"key",
"]",
")",
")",
"{",
"ret... | Getter for Static Variables of Named Classes
@access public
@param string $classname
@param string $key
@return mixed | [
"Getter",
"for",
"Static",
"Variables",
"of",
"Named",
"Classes"
] | 16e90e9523272ab48ca44e61d25f56aa1e7fa612 | https://github.com/Xiphe/THETOOLS/blob/16e90e9523272ab48ca44e61d25f56aa1e7fa612/src/Xiphe/THETOOLS.php#L1744-L1750 |
194,968 | Xiphe/THETOOLS | src/Xiphe/THETOOLS.php | THETOOLS.get_dirArray | public static function get_dirArray($dir, $filenameKey = false, $filter = null, $positive = false)
{
/*
* Normalize the Filter.
*/
if (empty($filter)) {
$filter = array('.', '_');
} elseif(is_object($filter)) {
$filter = self::ar($filter, null, true)... | php | public static function get_dirArray($dir, $filenameKey = false, $filter = null, $positive = false)
{
/*
* Normalize the Filter.
*/
if (empty($filter)) {
$filter = array('.', '_');
} elseif(is_object($filter)) {
$filter = self::ar($filter, null, true)... | [
"public",
"static",
"function",
"get_dirArray",
"(",
"$",
"dir",
",",
"$",
"filenameKey",
"=",
"false",
",",
"$",
"filter",
"=",
"null",
",",
"$",
"positive",
"=",
"false",
")",
"{",
"/*\n * Normalize the Filter.\n */",
"if",
"(",
"empty",
"(",... | returns an array of files in a specific folder, excluding files starting with . or _
The default filter can be adjusted as a third parameter.
Accepted is an array with the amount of chars that will be filtered at the beginning
of the file or folder name on the first index. The second index have to be another
array con... | [
"returns",
"an",
"array",
"of",
"files",
"in",
"a",
"specific",
"folder",
"excluding",
"files",
"starting",
"with",
".",
"or",
"_"
] | 16e90e9523272ab48ca44e61d25f56aa1e7fa612 | https://github.com/Xiphe/THETOOLS/blob/16e90e9523272ab48ca44e61d25f56aa1e7fa612/src/Xiphe/THETOOLS.php#L1769-L1810 |
194,969 | Xiphe/THETOOLS | src/Xiphe/THETOOLS.php | THETOOLS.getRequiredArgsError | public static function getRequiredArgsError($args, $requiredArgs)
{
if (!is_array($args) && !is_object($args)) {
return sprintf(__('invalid type "%s" for $args', 'themaster'), gettype($args));
}
if (!is_array($requiredArgs) && !is_object($args)) {
return sprintf(__('i... | php | public static function getRequiredArgsError($args, $requiredArgs)
{
if (!is_array($args) && !is_object($args)) {
return sprintf(__('invalid type "%s" for $args', 'themaster'), gettype($args));
}
if (!is_array($requiredArgs) && !is_object($args)) {
return sprintf(__('i... | [
"public",
"static",
"function",
"getRequiredArgsError",
"(",
"$",
"args",
",",
"$",
"requiredArgs",
")",
"{",
"if",
"(",
"!",
"is_array",
"(",
"$",
"args",
")",
"&&",
"!",
"is_object",
"(",
"$",
"args",
")",
")",
"{",
"return",
"sprintf",
"(",
"__",
... | Checks if Array 1 has all required keys, specified by Array 2
@access public
@param array $args the array to be checked.
@param array $requiredArgs the required keys.
@return string|false Error string or false if no Error found. | [
"Checks",
"if",
"Array",
"1",
"has",
"all",
"required",
"keys",
"specified",
"by",
"Array",
"2"
] | 16e90e9523272ab48ca44e61d25f56aa1e7fa612 | https://github.com/Xiphe/THETOOLS/blob/16e90e9523272ab48ca44e61d25f56aa1e7fa612/src/Xiphe/THETOOLS.php#L1836-L1867 |
194,970 | Xiphe/THETOOLS | src/Xiphe/THETOOLS.php | THETOOLS.filter_urlQuery | public static function filter_urlQuery(&$url, $filterArr, $method = null, array $add = array()) {
if ($method === null) {
$method = 'remove';
}
$pUrl = parse_url($url);
$qry;
if (isset($pUrl['query'])) {
parse_str($pUrl['query'], $qry);
} else {
... | php | public static function filter_urlQuery(&$url, $filterArr, $method = null, array $add = array()) {
if ($method === null) {
$method = 'remove';
}
$pUrl = parse_url($url);
$qry;
if (isset($pUrl['query'])) {
parse_str($pUrl['query'], $qry);
} else {
... | [
"public",
"static",
"function",
"filter_urlQuery",
"(",
"&",
"$",
"url",
",",
"$",
"filterArr",
",",
"$",
"method",
"=",
"null",
",",
"array",
"$",
"add",
"=",
"array",
"(",
")",
")",
"{",
"if",
"(",
"$",
"method",
"===",
"null",
")",
"{",
"$",
"... | Parses an url adds and removes get-query arguments and rebuilds the url.
@param string $url the url string
@param array $filterArr Array of query keys that should be removed or kept.
@param string $method 'remove' deletes all $filterArr keys from query,
'keep' deletes all args that are not in $filterArr
@par... | [
"Parses",
"an",
"url",
"adds",
"and",
"removes",
"get",
"-",
"query",
"arguments",
"and",
"rebuilds",
"the",
"url",
"."
] | 16e90e9523272ab48ca44e61d25f56aa1e7fa612 | https://github.com/Xiphe/THETOOLS/blob/16e90e9523272ab48ca44e61d25f56aa1e7fa612/src/Xiphe/THETOOLS.php#L1922-L1942 |
194,971 | Xiphe/THETOOLS | src/Xiphe/THETOOLS.php | THETOOLS.filter_data | public static function filter_data(&$data, $filterArr, $method = null, $add = false)
{
if ($method === null) {
$method = 'keep';
}
foreach ($data as $k => $v) {
if (($method == 'remove' && in_array($k, $filterArr))
|| ($method == 'keep' && !in_array($k, ... | php | public static function filter_data(&$data, $filterArr, $method = null, $add = false)
{
if ($method === null) {
$method = 'keep';
}
foreach ($data as $k => $v) {
if (($method == 'remove' && in_array($k, $filterArr))
|| ($method == 'keep' && !in_array($k, ... | [
"public",
"static",
"function",
"filter_data",
"(",
"&",
"$",
"data",
",",
"$",
"filterArr",
",",
"$",
"method",
"=",
"null",
",",
"$",
"add",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"method",
"===",
"null",
")",
"{",
"$",
"method",
"=",
"'keep'",
... | Filters entries of an array.
@param string $data the source
@param array $filterArr Array of keys keys that should be removed or kept.
@param string $method 'remove' deletes all $filterArr keys from $data,
'keep' deletes all keys that are not in $filterArr
@param array $add optional array of values to ... | [
"Filters",
"entries",
"of",
"an",
"array",
"."
] | 16e90e9523272ab48ca44e61d25f56aa1e7fa612 | https://github.com/Xiphe/THETOOLS/blob/16e90e9523272ab48ca44e61d25f56aa1e7fa612/src/Xiphe/THETOOLS.php#L1954-L1977 |
194,972 | Xiphe/THETOOLS | src/Xiphe/THETOOLS.php | THETOOLS.merge_data | public static function merge_data($a, $b)
{
$args = func_get_args();
$t = $args[0];
$array = is_array($t);
foreach ($args as $k => $a) {
$args[$k] = self::ar($a);
}
$args = call_user_func_array('array_merge', $args);
if (!$array) {
... | php | public static function merge_data($a, $b)
{
$args = func_get_args();
$t = $args[0];
$array = is_array($t);
foreach ($args as $k => $a) {
$args[$k] = self::ar($a);
}
$args = call_user_func_array('array_merge', $args);
if (!$array) {
... | [
"public",
"static",
"function",
"merge_data",
"(",
"$",
"a",
",",
"$",
"b",
")",
"{",
"$",
"args",
"=",
"func_get_args",
"(",
")",
";",
"$",
"t",
"=",
"$",
"args",
"[",
"0",
"]",
";",
"$",
"array",
"=",
"is_array",
"(",
"$",
"t",
")",
";",
"f... | Allows merging of arrays and objects. same usage
as array_merge.
@param array|object $a target
@param array|object $b addition
@return array|object same type as $a | [
"Allows",
"merging",
"of",
"arrays",
"and",
"objects",
".",
"same",
"usage",
"as",
"array_merge",
"."
] | 16e90e9523272ab48ca44e61d25f56aa1e7fa612 | https://github.com/Xiphe/THETOOLS/blob/16e90e9523272ab48ca44e61d25f56aa1e7fa612/src/Xiphe/THETOOLS.php#L1988-L2005 |
194,973 | Xiphe/THETOOLS | src/Xiphe/THETOOLS.php | THETOOLS.merge_data_recursive | public static function merge_data_recursive($a, $b)
{
$args = func_get_args();
$t = $args[0];
$array = is_array($t);
foreach ($args as $k => $a) {
$args[$k] = self::ar($a, null, true);
}
$args = call_user_func_array('array_merge_recursive', $args);
... | php | public static function merge_data_recursive($a, $b)
{
$args = func_get_args();
$t = $args[0];
$array = is_array($t);
foreach ($args as $k => $a) {
$args[$k] = self::ar($a, null, true);
}
$args = call_user_func_array('array_merge_recursive', $args);
... | [
"public",
"static",
"function",
"merge_data_recursive",
"(",
"$",
"a",
",",
"$",
"b",
")",
"{",
"$",
"args",
"=",
"func_get_args",
"(",
")",
";",
"$",
"t",
"=",
"$",
"args",
"[",
"0",
"]",
";",
"$",
"array",
"=",
"is_array",
"(",
"$",
"t",
")",
... | Allows deep merging of arrays and objects. same usage
as array_merge_recursive.
@param array|object $a target
@param array|object $b addition
@return array|object same type as $a | [
"Allows",
"deep",
"merging",
"of",
"arrays",
"and",
"objects",
".",
"same",
"usage",
"as",
"array_merge_recursive",
"."
] | 16e90e9523272ab48ca44e61d25f56aa1e7fa612 | https://github.com/Xiphe/THETOOLS/blob/16e90e9523272ab48ca44e61d25f56aa1e7fa612/src/Xiphe/THETOOLS.php#L2016-L2033 |
194,974 | Facebook-Anonymous-Publisher/shortener | src/ShortenerManager.php | ShortenerManager.driver | public function driver($driver = null)
{
$shortener = $this->app['config']['shortener'];
$driver = $driver ?: $shortener['default'];
$driverMethod = 'create'.ucfirst($driver).'Driver';
if (method_exists($this, $driverMethod)) {
return $this->{$driverMethod}($shortener)... | php | public function driver($driver = null)
{
$shortener = $this->app['config']['shortener'];
$driver = $driver ?: $shortener['default'];
$driverMethod = 'create'.ucfirst($driver).'Driver';
if (method_exists($this, $driverMethod)) {
return $this->{$driverMethod}($shortener)... | [
"public",
"function",
"driver",
"(",
"$",
"driver",
"=",
"null",
")",
"{",
"$",
"shortener",
"=",
"$",
"this",
"->",
"app",
"[",
"'config'",
"]",
"[",
"'shortener'",
"]",
";",
"$",
"driver",
"=",
"$",
"driver",
"?",
":",
"$",
"shortener",
"[",
"'de... | Get a shortener driver instance.
@param string|null $driver
@return Base | [
"Get",
"a",
"shortener",
"driver",
"instance",
"."
] | 3b2e49d9cdd96758d35cf57a7a27659d2b6682aa | https://github.com/Facebook-Anonymous-Publisher/shortener/blob/3b2e49d9cdd96758d35cf57a7a27659d2b6682aa/src/ShortenerManager.php#L36-L49 |
194,975 | shrink0r/php-schema | src/Property/EnumProperty.php | EnumProperty.validate | public function validate($value)
{
$result = Ok::unit();
foreach ($this->allowedTypes as $type) {
$typeChecker = preg_match('/^&/', $type) ? $this->getCustomType($type) : $this->createProperty($type);
$result = $typeChecker->validate($value);
if ($result instanc... | php | public function validate($value)
{
$result = Ok::unit();
foreach ($this->allowedTypes as $type) {
$typeChecker = preg_match('/^&/', $type) ? $this->getCustomType($type) : $this->createProperty($type);
$result = $typeChecker->validate($value);
if ($result instanc... | [
"public",
"function",
"validate",
"(",
"$",
"value",
")",
"{",
"$",
"result",
"=",
"Ok",
"::",
"unit",
"(",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"allowedTypes",
"as",
"$",
"type",
")",
"{",
"$",
"typeChecker",
"=",
"preg_match",
"(",
"'/^&/'"... | Tells if a given value adhere's to one of the property's allowed types.
@param mixed $value
@return ResultInterface Returns Ok if the value is valid, otherwise an Error is returned. | [
"Tells",
"if",
"a",
"given",
"value",
"adhere",
"s",
"to",
"one",
"of",
"the",
"property",
"s",
"allowed",
"types",
"."
] | 94293fe897af376dd9d05962e2c516079409dd29 | https://github.com/shrink0r/php-schema/blob/94293fe897af376dd9d05962e2c516079409dd29/src/Property/EnumProperty.php#L39-L52 |
194,976 | shrink0r/php-schema | src/Property/EnumProperty.php | EnumProperty.getCustomType | protected function getCustomType($type)
{
$root = $this;
while ($cur = $root->getParent()) {
$root = $cur;
}
$customTypes = $root->getSchema()->getCustomTypes();
$type = ltrim($type, '&');
if (isset($customTypes[$type])) {
return $customTypes[... | php | protected function getCustomType($type)
{
$root = $this;
while ($cur = $root->getParent()) {
$root = $cur;
}
$customTypes = $root->getSchema()->getCustomTypes();
$type = ltrim($type, '&');
if (isset($customTypes[$type])) {
return $customTypes[... | [
"protected",
"function",
"getCustomType",
"(",
"$",
"type",
")",
"{",
"$",
"root",
"=",
"$",
"this",
";",
"while",
"(",
"$",
"cur",
"=",
"$",
"root",
"->",
"getParent",
"(",
")",
")",
"{",
"$",
"root",
"=",
"$",
"cur",
";",
"}",
"$",
"customTypes... | Retrieves a custom type definition by name, that will be used to proxy the property's validation to.
@param string $type The name/key of the type prefixed with a '&'.
@return SchemaInterface | [
"Retrieves",
"a",
"custom",
"type",
"definition",
"by",
"name",
"that",
"will",
"be",
"used",
"to",
"proxy",
"the",
"property",
"s",
"validation",
"to",
"."
] | 94293fe897af376dd9d05962e2c516079409dd29 | https://github.com/shrink0r/php-schema/blob/94293fe897af376dd9d05962e2c516079409dd29/src/Property/EnumProperty.php#L61-L75 |
194,977 | shrink0r/php-schema | src/Property/EnumProperty.php | EnumProperty.createProperty | protected function createProperty($type)
{
return $this->getSchema()->getFactory()->createProperty(
[ 'type' => $type, 'name' => $this->getName().'_item', 'required' => true ],
$this->getSchema(),
$this
);
} | php | protected function createProperty($type)
{
return $this->getSchema()->getFactory()->createProperty(
[ 'type' => $type, 'name' => $this->getName().'_item', 'required' => true ],
$this->getSchema(),
$this
);
} | [
"protected",
"function",
"createProperty",
"(",
"$",
"type",
")",
"{",
"return",
"$",
"this",
"->",
"getSchema",
"(",
")",
"->",
"getFactory",
"(",
")",
"->",
"createProperty",
"(",
"[",
"'type'",
"=>",
"$",
"type",
",",
"'name'",
"=>",
"$",
"this",
"-... | Creates a child-property that will be used as a proxy-target for the parent property's validation.
@param string $type The type key of the property to create.
@return PropertyInterface | [
"Creates",
"a",
"child",
"-",
"property",
"that",
"will",
"be",
"used",
"as",
"a",
"proxy",
"-",
"target",
"for",
"the",
"parent",
"property",
"s",
"validation",
"."
] | 94293fe897af376dd9d05962e2c516079409dd29 | https://github.com/shrink0r/php-schema/blob/94293fe897af376dd9d05962e2c516079409dd29/src/Property/EnumProperty.php#L84-L91 |
194,978 | dSpaceLabs/http-client | src/Client.php | Client.parse | public function parse($raw)
{
$lines = explode("\n", $raw);
// Status Line
preg_match('/HTTP\/(\d\.\d) (\d\d\d) (.*)/', $lines[0], $statusLine);
$response = (new Response())
->withProtocolVersion($statusLine[1])
->withStatus($statusLine[2], $statusLine[3]);
... | php | public function parse($raw)
{
$lines = explode("\n", $raw);
// Status Line
preg_match('/HTTP\/(\d\.\d) (\d\d\d) (.*)/', $lines[0], $statusLine);
$response = (new Response())
->withProtocolVersion($statusLine[1])
->withStatus($statusLine[2], $statusLine[3]);
... | [
"public",
"function",
"parse",
"(",
"$",
"raw",
")",
"{",
"$",
"lines",
"=",
"explode",
"(",
"\"\\n\"",
",",
"$",
"raw",
")",
";",
"// Status Line",
"preg_match",
"(",
"'/HTTP\\/(\\d\\.\\d) (\\d\\d\\d) (.*)/'",
",",
"$",
"lines",
"[",
"0",
"]",
",",
"$",
... | Parses a Raw HTTP response and converts it into a response object
@param string $raw
@return \Psr\Http\Message\Response | [
"Parses",
"a",
"Raw",
"HTTP",
"response",
"and",
"converts",
"it",
"into",
"a",
"response",
"object"
] | 8e2a39f1db2a209012aa14f2828149c11761f2ae | https://github.com/dSpaceLabs/http-client/blob/8e2a39f1db2a209012aa14f2828149c11761f2ae/src/Client.php#L98-L127 |
194,979 | Erebot/Module_IrcTracker | src/IrcTracker/Token.php | Token.getNick | public function getNick()
{
return $this->tracker->getInfo(
$this->token,
\Erebot\Module\IrcTracker::INFO_NICK
);
} | php | public function getNick()
{
return $this->tracker->getInfo(
$this->token,
\Erebot\Module\IrcTracker::INFO_NICK
);
} | [
"public",
"function",
"getNick",
"(",
")",
"{",
"return",
"$",
"this",
"->",
"tracker",
"->",
"getInfo",
"(",
"$",
"this",
"->",
"token",
",",
"\\",
"Erebot",
"\\",
"Module",
"\\",
"IrcTracker",
"::",
"INFO_NICK",
")",
";",
"}"
] | Returns the nickname of the user
represented by this identity.
\retval mixed
This user's nickname or NULL if unavailable. | [
"Returns",
"the",
"nickname",
"of",
"the",
"user",
"represented",
"by",
"this",
"identity",
"."
] | 50eaf5d3e35cf4bb31259819cd3d4fba3279bc5d | https://github.com/Erebot/Module_IrcTracker/blob/50eaf5d3e35cf4bb31259819cd3d4fba3279bc5d/src/IrcTracker/Token.php#L55-L61 |
194,980 | Erebot/Module_IrcTracker | src/IrcTracker/Token.php | Token.getIdent | public function getIdent()
{
return $this->tracker->getInfo(
$this->token,
\Erebot\Module\IrcTracker::INFO_IDENT
);
} | php | public function getIdent()
{
return $this->tracker->getInfo(
$this->token,
\Erebot\Module\IrcTracker::INFO_IDENT
);
} | [
"public",
"function",
"getIdent",
"(",
")",
"{",
"return",
"$",
"this",
"->",
"tracker",
"->",
"getInfo",
"(",
"$",
"this",
"->",
"token",
",",
"\\",
"Erebot",
"\\",
"Module",
"\\",
"IrcTracker",
"::",
"INFO_IDENT",
")",
";",
"}"
] | Returns the identity string of the user
represented by this identity.
\retval mixed
This user's identity string or NULL if unavailable.
\note
The name of this method is somewhat misleading,
as it returns the "identity" as defined by the
user in his/her client.
This is not the same as the "identity" represented
here (... | [
"Returns",
"the",
"identity",
"string",
"of",
"the",
"user",
"represented",
"by",
"this",
"identity",
"."
] | 50eaf5d3e35cf4bb31259819cd3d4fba3279bc5d | https://github.com/Erebot/Module_IrcTracker/blob/50eaf5d3e35cf4bb31259819cd3d4fba3279bc5d/src/IrcTracker/Token.php#L80-L86 |
194,981 | Erebot/Module_IrcTracker | src/IrcTracker/Token.php | Token.getHost | public function getHost($canonical)
{
return $this->tracker->getInfo(
$this->token,
\Erebot\Module\IrcTracker::INFO_HOST,
array($canonical)
);
} | php | public function getHost($canonical)
{
return $this->tracker->getInfo(
$this->token,
\Erebot\Module\IrcTracker::INFO_HOST,
array($canonical)
);
} | [
"public",
"function",
"getHost",
"(",
"$",
"canonical",
")",
"{",
"return",
"$",
"this",
"->",
"tracker",
"->",
"getInfo",
"(",
"$",
"this",
"->",
"token",
",",
"\\",
"Erebot",
"\\",
"Module",
"\\",
"IrcTracker",
"::",
"INFO_HOST",
",",
"array",
"(",
"... | Returns the host of the user
represented by this identity.
\param opaque $canonical
Either Erebot::Interfaces::Identity::CANON_IPV4 or
Erebot::Interfaces::Identity::CANON_IPV6, indicating
the type of IP canonicalization to use.
\retval string
This user's hostname or NULL if unavailable. | [
"Returns",
"the",
"host",
"of",
"the",
"user",
"represented",
"by",
"this",
"identity",
"."
] | 50eaf5d3e35cf4bb31259819cd3d4fba3279bc5d | https://github.com/Erebot/Module_IrcTracker/blob/50eaf5d3e35cf4bb31259819cd3d4fba3279bc5d/src/IrcTracker/Token.php#L100-L107 |
194,982 | Erebot/Module_IrcTracker | src/IrcTracker/Token.php | Token.getMask | public function getMask($canonical)
{
return $this->tracker->getInfo(
$this->token,
\Erebot\Module\IrcTracker::INFO_MASK,
array($canonical)
);
} | php | public function getMask($canonical)
{
return $this->tracker->getInfo(
$this->token,
\Erebot\Module\IrcTracker::INFO_MASK,
array($canonical)
);
} | [
"public",
"function",
"getMask",
"(",
"$",
"canonical",
")",
"{",
"return",
"$",
"this",
"->",
"tracker",
"->",
"getInfo",
"(",
"$",
"this",
"->",
"token",
",",
"\\",
"Erebot",
"\\",
"Module",
"\\",
"IrcTracker",
"::",
"INFO_MASK",
",",
"array",
"(",
"... | Returns a mask which can later be used
to match against this user.
\param opaque $canonical
Either Erebot::Interfaces::Identity::CANON_IPV4 or
Erebot::Interfaces::Identity::CANON_IPV6, indicating
the type of IP canonicalization to use.
\retval string
A mask matching against this user.
\note
Fields for which no value... | [
"Returns",
"a",
"mask",
"which",
"can",
"later",
"be",
"used",
"to",
"match",
"against",
"this",
"user",
"."
] | 50eaf5d3e35cf4bb31259819cd3d4fba3279bc5d | https://github.com/Erebot/Module_IrcTracker/blob/50eaf5d3e35cf4bb31259819cd3d4fba3279bc5d/src/IrcTracker/Token.php#L127-L134 |
194,983 | Erebot/Module_IrcTracker | src/IrcTracker/Token.php | Token.isOn | public function isOn()
{
return $this->tracker->getInfo(
$this->token,
\Erebot\Module\IrcTracker::INFO_ISON
);
} | php | public function isOn()
{
return $this->tracker->getInfo(
$this->token,
\Erebot\Module\IrcTracker::INFO_ISON
);
} | [
"public",
"function",
"isOn",
"(",
")",
"{",
"return",
"$",
"this",
"->",
"tracker",
"->",
"getInfo",
"(",
"$",
"this",
"->",
"token",
",",
"\\",
"Erebot",
"\\",
"Module",
"\\",
"IrcTracker",
"::",
"INFO_ISON",
")",
";",
"}"
] | Indicates whether the person associated with this token
is still connected.
\retval bool
TRUE if the user associated with this token is
still online, FALSE otherwise. | [
"Indicates",
"whether",
"the",
"person",
"associated",
"with",
"this",
"token",
"is",
"still",
"connected",
"."
] | 50eaf5d3e35cf4bb31259819cd3d4fba3279bc5d | https://github.com/Erebot/Module_IrcTracker/blob/50eaf5d3e35cf4bb31259819cd3d4fba3279bc5d/src/IrcTracker/Token.php#L144-L150 |
194,984 | mpf-soft/admin-widgets | form/fields/Autocomplete.php | Autocomplete.getInput | public function getInput() {
$options = $this->htmlOptions;
$options['class'] = (isset($options['class']) ? $options['class'] . ' ' : '') . 'input autocomplete';
$options['autc_ajax'] = ($this->ajaxUpdate?'1':'0');
$options['autc_url'] = $this->ajaxURL;
$options['autc_for'] = str... | php | public function getInput() {
$options = $this->htmlOptions;
$options['class'] = (isset($options['class']) ? $options['class'] . ' ' : '') . 'input autocomplete';
$options['autc_ajax'] = ($this->ajaxUpdate?'1':'0');
$options['autc_url'] = $this->ajaxURL;
$options['autc_for'] = str... | [
"public",
"function",
"getInput",
"(",
")",
"{",
"$",
"options",
"=",
"$",
"this",
"->",
"htmlOptions",
";",
"$",
"options",
"[",
"'class'",
"]",
"=",
"(",
"isset",
"(",
"$",
"options",
"[",
"'class'",
"]",
")",
"?",
"$",
"options",
"[",
"'class'",
... | Get the input;
@return string | [
"Get",
"the",
"input",
";"
] | 92597f9a09d086664268d6b7e0111d5a5586d8c7 | https://github.com/mpf-soft/admin-widgets/blob/92597f9a09d086664268d6b7e0111d5a5586d8c7/form/fields/Autocomplete.php#L60-L79 |
194,985 | rawphp/RawLog | src/RawPHP/RawLog/Handler/MailHandler.php | MailHandler.init | public function init( $config = [ ] )
{
foreach ( $config as $key => $value )
{
switch ( $key )
{
case 'level':
$this->_level = ( int ) $value;
break;
case 'mailer':
$this->_mailer = ... | php | public function init( $config = [ ] )
{
foreach ( $config as $key => $value )
{
switch ( $key )
{
case 'level':
$this->_level = ( int ) $value;
break;
case 'mailer':
$this->_mailer = ... | [
"public",
"function",
"init",
"(",
"$",
"config",
"=",
"[",
"]",
")",
"{",
"foreach",
"(",
"$",
"config",
"as",
"$",
"key",
"=>",
"$",
"value",
")",
"{",
"switch",
"(",
"$",
"key",
")",
"{",
"case",
"'level'",
":",
"$",
"this",
"->",
"_level",
... | Initialises the handler.
@param array $config configuration array | [
"Initialises",
"the",
"handler",
"."
] | caee6c1ae92015c9b8481302d0bda5bf4ef9d1b6 | https://github.com/rawphp/RawLog/blob/caee6c1ae92015c9b8481302d0bda5bf4ef9d1b6/src/RawPHP/RawLog/Handler/MailHandler.php#L84-L107 |
194,986 | shadowfax/zf2-asset-manager | src/AssetManager/Asset/Resolver/AssetPathStack.php | AssetPathStack.normalizePath | public static function normalizePath($path)
{
$path = rtrim($path, '/');
$path = rtrim($path, '\\');
$path .= DIRECTORY_SEPARATOR;
return $path;
} | php | public static function normalizePath($path)
{
$path = rtrim($path, '/');
$path = rtrim($path, '\\');
$path .= DIRECTORY_SEPARATOR;
return $path;
} | [
"public",
"static",
"function",
"normalizePath",
"(",
"$",
"path",
")",
"{",
"$",
"path",
"=",
"rtrim",
"(",
"$",
"path",
",",
"'/'",
")",
";",
"$",
"path",
"=",
"rtrim",
"(",
"$",
"path",
",",
"'\\\\'",
")",
";",
"$",
"path",
".=",
"DIRECTORY_SEPA... | Normalize a path for insertion in the stack
@param string $path
@return string | [
"Normalize",
"a",
"path",
"for",
"insertion",
"in",
"the",
"stack"
] | adbdc40417c6fddbba1a8c8b675e59ce1a25ad65 | https://github.com/shadowfax/zf2-asset-manager/blob/adbdc40417c6fddbba1a8c8b675e59ce1a25ad65/src/AssetManager/Asset/Resolver/AssetPathStack.php#L113-L119 |
194,987 | shadowfax/zf2-asset-manager | src/AssetManager/Asset/Resolver/AssetPathStack.php | AssetPathStack.resolve | public function resolve($name)
{
if (preg_match('#\.\.[\\\/]#', $name)) {
throw new Exception\DomainException(
'Requested asset may not include parent directory traversal ("../", "..\\" notation)'
);
}
// Check if we have paths
if (!count($t... | php | public function resolve($name)
{
if (preg_match('#\.\.[\\\/]#', $name)) {
throw new Exception\DomainException(
'Requested asset may not include parent directory traversal ("../", "..\\" notation)'
);
}
// Check if we have paths
if (!count($t... | [
"public",
"function",
"resolve",
"(",
"$",
"name",
")",
"{",
"if",
"(",
"preg_match",
"(",
"'#\\.\\.[\\\\\\/]#'",
",",
"$",
"name",
")",
")",
"{",
"throw",
"new",
"Exception",
"\\",
"DomainException",
"(",
"'Requested asset may not include parent directory traversal... | Retrieve the filesystem path to a view script
@param string $name
@param null|Renderer $renderer
@return string
@throws Exception\DomainException | [
"Retrieve",
"the",
"filesystem",
"path",
"to",
"a",
"view",
"script"
] | adbdc40417c6fddbba1a8c8b675e59ce1a25ad65 | https://github.com/shadowfax/zf2-asset-manager/blob/adbdc40417c6fddbba1a8c8b675e59ce1a25ad65/src/AssetManager/Asset/Resolver/AssetPathStack.php#L177-L234 |
194,988 | gplcart/cli | controllers/commands/ProductClassField.php | ProductClassField.cmdGetProductClassField | public function cmdGetProductClassField()
{
$result = $this->getListProductClassField();
$this->outputFormat($result);
$this->outputFormatTableProductClassField($result);
$this->output();
} | php | public function cmdGetProductClassField()
{
$result = $this->getListProductClassField();
$this->outputFormat($result);
$this->outputFormatTableProductClassField($result);
$this->output();
} | [
"public",
"function",
"cmdGetProductClassField",
"(",
")",
"{",
"$",
"result",
"=",
"$",
"this",
"->",
"getListProductClassField",
"(",
")",
";",
"$",
"this",
"->",
"outputFormat",
"(",
"$",
"result",
")",
";",
"$",
"this",
"->",
"outputFormatTableProductClass... | Callback for "product-class-field-get" command | [
"Callback",
"for",
"product",
"-",
"class",
"-",
"field",
"-",
"get",
"command"
] | e57dba53e291a225b4bff0c0d9b23d685dd1c125 | https://github.com/gplcart/cli/blob/e57dba53e291a225b4bff0c0d9b23d685dd1c125/controllers/commands/ProductClassField.php#L40-L46 |
194,989 | gplcart/cli | controllers/commands/ProductClassField.php | ProductClassField.cmdUpdateProductClassField | public function cmdUpdateProductClassField()
{
$params = $this->getParam();
if (empty($params[0]) || count($params) < 2) {
$this->errorAndExit($this->text('Invalid command'));
}
if (!is_numeric($params[0])) {
$this->errorAndExit($this->text('Invalid argument... | php | public function cmdUpdateProductClassField()
{
$params = $this->getParam();
if (empty($params[0]) || count($params) < 2) {
$this->errorAndExit($this->text('Invalid command'));
}
if (!is_numeric($params[0])) {
$this->errorAndExit($this->text('Invalid argument... | [
"public",
"function",
"cmdUpdateProductClassField",
"(",
")",
"{",
"$",
"params",
"=",
"$",
"this",
"->",
"getParam",
"(",
")",
";",
"if",
"(",
"empty",
"(",
"$",
"params",
"[",
"0",
"]",
")",
"||",
"count",
"(",
"$",
"params",
")",
"<",
"2",
")",
... | Callback for "product-class-field-update" command | [
"Callback",
"for",
"product",
"-",
"class",
"-",
"field",
"-",
"update",
"command"
] | e57dba53e291a225b4bff0c0d9b23d685dd1c125 | https://github.com/gplcart/cli/blob/e57dba53e291a225b4bff0c0d9b23d685dd1c125/controllers/commands/ProductClassField.php#L116-L134 |
194,990 | gplcart/cli | controllers/commands/ProductClassField.php | ProductClassField.getListProductClassField | protected function getListProductClassField()
{
$id = $this->getParam(0);
if (!isset($id)) {
return $this->product_class_field->getList(array('limit' => $this->getLimit()));
}
if ($this->getParam('class')) {
return $this->product_class_field->getList(array('... | php | protected function getListProductClassField()
{
$id = $this->getParam(0);
if (!isset($id)) {
return $this->product_class_field->getList(array('limit' => $this->getLimit()));
}
if ($this->getParam('class')) {
return $this->product_class_field->getList(array('... | [
"protected",
"function",
"getListProductClassField",
"(",
")",
"{",
"$",
"id",
"=",
"$",
"this",
"->",
"getParam",
"(",
"0",
")",
";",
"if",
"(",
"!",
"isset",
"(",
"$",
"id",
")",
")",
"{",
"return",
"$",
"this",
"->",
"product_class_field",
"->",
"... | Returns an array of product class fields
@return array | [
"Returns",
"an",
"array",
"of",
"product",
"class",
"fields"
] | e57dba53e291a225b4bff0c0d9b23d685dd1c125 | https://github.com/gplcart/cli/blob/e57dba53e291a225b4bff0c0d9b23d685dd1c125/controllers/commands/ProductClassField.php#L140-L167 |
194,991 | gplcart/cli | controllers/commands/ProductClassField.php | ProductClassField.addProductClassField | protected function addProductClassField()
{
if (!$this->isError()) {
$id = $this->product_class_field->add($this->getSubmitted());
if (empty($id)) {
$this->errorAndExit($this->text('Unexpected result'));
}
$this->line($id);
}
} | php | protected function addProductClassField()
{
if (!$this->isError()) {
$id = $this->product_class_field->add($this->getSubmitted());
if (empty($id)) {
$this->errorAndExit($this->text('Unexpected result'));
}
$this->line($id);
}
} | [
"protected",
"function",
"addProductClassField",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"isError",
"(",
")",
")",
"{",
"$",
"id",
"=",
"$",
"this",
"->",
"product_class_field",
"->",
"add",
"(",
"$",
"this",
"->",
"getSubmitted",
"(",
")",
... | Add a new product class field | [
"Add",
"a",
"new",
"product",
"class",
"field"
] | e57dba53e291a225b4bff0c0d9b23d685dd1c125 | https://github.com/gplcart/cli/blob/e57dba53e291a225b4bff0c0d9b23d685dd1c125/controllers/commands/ProductClassField.php#L203-L212 |
194,992 | gplcart/cli | controllers/commands/ProductClassField.php | ProductClassField.updateProductClassField | protected function updateProductClassField($product_class_field_id)
{
if (!$this->isError() && !$this->product_class_field->update($product_class_field_id, $this->getSubmitted())) {
$this->errorAndExit($this->text('Unexpected result'));
}
} | php | protected function updateProductClassField($product_class_field_id)
{
if (!$this->isError() && !$this->product_class_field->update($product_class_field_id, $this->getSubmitted())) {
$this->errorAndExit($this->text('Unexpected result'));
}
} | [
"protected",
"function",
"updateProductClassField",
"(",
"$",
"product_class_field_id",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"isError",
"(",
")",
"&&",
"!",
"$",
"this",
"->",
"product_class_field",
"->",
"update",
"(",
"$",
"product_class_field_id",
"... | Updates a product class field
@param string $product_class_field_id | [
"Updates",
"a",
"product",
"class",
"field"
] | e57dba53e291a225b4bff0c0d9b23d685dd1c125 | https://github.com/gplcart/cli/blob/e57dba53e291a225b4bff0c0d9b23d685dd1c125/controllers/commands/ProductClassField.php#L218-L223 |
194,993 | gplcart/cli | controllers/commands/ProductClassField.php | ProductClassField.submitAddProductClassField | protected function submitAddProductClassField()
{
$this->setSubmitted(null, $this->getParam());
$this->validateComponent('product_class_field');
$this->addProductClassField();
} | php | protected function submitAddProductClassField()
{
$this->setSubmitted(null, $this->getParam());
$this->validateComponent('product_class_field');
$this->addProductClassField();
} | [
"protected",
"function",
"submitAddProductClassField",
"(",
")",
"{",
"$",
"this",
"->",
"setSubmitted",
"(",
"null",
",",
"$",
"this",
"->",
"getParam",
"(",
")",
")",
";",
"$",
"this",
"->",
"validateComponent",
"(",
"'product_class_field'",
")",
";",
"$",... | Add a new product class field at once | [
"Add",
"a",
"new",
"product",
"class",
"field",
"at",
"once"
] | e57dba53e291a225b4bff0c0d9b23d685dd1c125 | https://github.com/gplcart/cli/blob/e57dba53e291a225b4bff0c0d9b23d685dd1c125/controllers/commands/ProductClassField.php#L228-L233 |
194,994 | gplcart/cli | controllers/commands/ProductClassField.php | ProductClassField.wizardAddProductClassField | protected function wizardAddProductClassField()
{
// Required
$this->validatePrompt('product_class_id', $this->text('Product class'), 'product_class_field');
$this->validatePrompt('field_id', $this->text('Field ID'), 'product_class_field');
// Optional
$this->validatePrompt(... | php | protected function wizardAddProductClassField()
{
// Required
$this->validatePrompt('product_class_id', $this->text('Product class'), 'product_class_field');
$this->validatePrompt('field_id', $this->text('Field ID'), 'product_class_field');
// Optional
$this->validatePrompt(... | [
"protected",
"function",
"wizardAddProductClassField",
"(",
")",
"{",
"// Required",
"$",
"this",
"->",
"validatePrompt",
"(",
"'product_class_id'",
",",
"$",
"this",
"->",
"text",
"(",
"'Product class'",
")",
",",
"'product_class_field'",
")",
";",
"$",
"this",
... | Add a new product class field step by step | [
"Add",
"a",
"new",
"product",
"class",
"field",
"step",
"by",
"step"
] | e57dba53e291a225b4bff0c0d9b23d685dd1c125 | https://github.com/gplcart/cli/blob/e57dba53e291a225b4bff0c0d9b23d685dd1c125/controllers/commands/ProductClassField.php#L238-L250 |
194,995 | phpffcms/ffcms-core | src/Network/Request/MvcFeatures.php | MvcFeatures.searchRedirect | private function searchRedirect(): void
{
// calculated depend of language
$pathway = $this->getPathInfo();
/** @var array $routing */
$routing = App::$Properties->getAll('Routing');
if (!Any::isArray($routing) || !isset($routing['Redirect']) || !Any::isArray($routing['Redir... | php | private function searchRedirect(): void
{
// calculated depend of language
$pathway = $this->getPathInfo();
/** @var array $routing */
$routing = App::$Properties->getAll('Routing');
if (!Any::isArray($routing) || !isset($routing['Redirect']) || !Any::isArray($routing['Redir... | [
"private",
"function",
"searchRedirect",
"(",
")",
":",
"void",
"{",
"// calculated depend of language",
"$",
"pathway",
"=",
"$",
"this",
"->",
"getPathInfo",
"(",
")",
";",
"/** @var array $routing */",
"$",
"routing",
"=",
"App",
"::",
"$",
"Properties",
"->"... | Check if current url in redirect map
@return void | [
"Check",
"if",
"current",
"url",
"in",
"redirect",
"map"
] | 44a309553ef9f115ccfcfd71f2ac6e381c612082 | https://github.com/phpffcms/ffcms-core/blob/44a309553ef9f115ccfcfd71f2ac6e381c612082/src/Network/Request/MvcFeatures.php#L24-L46 |
194,996 | phpffcms/ffcms-core | src/Network/Request/MvcFeatures.php | MvcFeatures.setPathdata | private function setPathdata(?array $pathArray = null): void
{
if (!Any::isArray($pathArray) || count($pathArray) < 1) {
return;
}
// extract controller info from full path array
$this->controller = ucfirst(Str::lowerCase(array_shift($pathArray)));
if (count($pat... | php | private function setPathdata(?array $pathArray = null): void
{
if (!Any::isArray($pathArray) || count($pathArray) < 1) {
return;
}
// extract controller info from full path array
$this->controller = ucfirst(Str::lowerCase(array_shift($pathArray)));
if (count($pat... | [
"private",
"function",
"setPathdata",
"(",
"?",
"array",
"$",
"pathArray",
"=",
"null",
")",
":",
"void",
"{",
"if",
"(",
"!",
"Any",
"::",
"isArray",
"(",
"$",
"pathArray",
")",
"||",
"count",
"(",
"$",
"pathArray",
")",
"<",
"1",
")",
"{",
"retur... | Working with path array data
@param array|null $pathArray
@return void | [
"Working",
"with",
"path",
"array",
"data"
] | 44a309553ef9f115ccfcfd71f2ac6e381c612082 | https://github.com/phpffcms/ffcms-core/blob/44a309553ef9f115ccfcfd71f2ac6e381c612082/src/Network/Request/MvcFeatures.php#L53-L72 |
194,997 | ScaraMVC/Framework | src/Scara/Http/Controller.php | Controller.add | public function add($key, $value = null)
{
$this->_view->with($key, $value);
return $this;
} | php | public function add($key, $value = null)
{
$this->_view->with($key, $value);
return $this;
} | [
"public",
"function",
"add",
"(",
"$",
"key",
",",
"$",
"value",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"_view",
"->",
"with",
"(",
"$",
"key",
",",
"$",
"value",
")",
";",
"return",
"$",
"this",
";",
"}"
] | Adds data to the view class that will pass on to
the view.
@param string $key - Data's key
@param mixed $value - $key's value
@return \Scara\Http\Controller | [
"Adds",
"data",
"to",
"the",
"view",
"class",
"that",
"will",
"pass",
"on",
"to",
"the",
"view",
"."
] | 199b08b45fadf5dae14ac4732af03b36e15bbef2 | https://github.com/ScaraMVC/Framework/blob/199b08b45fadf5dae14ac4732af03b36e15bbef2/src/Scara/Http/Controller.php#L82-L87 |
194,998 | ScaraMVC/Framework | src/Scara/Http/Controller.php | Controller.withErrors | public function withErrors($validator)
{
foreach ($validator->errors() as $key => $value) {
if (count($value) > 1) {
for ($i = 0; $i < count($value); $i++) {
$data[$key][$i] = $value[$i];
}
} else {
$data[$key] = $va... | php | public function withErrors($validator)
{
foreach ($validator->errors() as $key => $value) {
if (count($value) > 1) {
for ($i = 0; $i < count($value); $i++) {
$data[$key][$i] = $value[$i];
}
} else {
$data[$key] = $va... | [
"public",
"function",
"withErrors",
"(",
"$",
"validator",
")",
"{",
"foreach",
"(",
"$",
"validator",
"->",
"errors",
"(",
")",
"as",
"$",
"key",
"=>",
"$",
"value",
")",
"{",
"if",
"(",
"count",
"(",
"$",
"value",
")",
">",
"1",
")",
"{",
"for"... | Flash errors grabbed from a request.
@param \Scara\Validation\Validator $validator - Validation object
@return \Scara\Http\Controller | [
"Flash",
"errors",
"grabbed",
"from",
"a",
"request",
"."
] | 199b08b45fadf5dae14ac4732af03b36e15bbef2 | https://github.com/ScaraMVC/Framework/blob/199b08b45fadf5dae14ac4732af03b36e15bbef2/src/Scara/Http/Controller.php#L126-L142 |
194,999 | ScaraMVC/Framework | src/Scara/Http/Controller.php | Controller.renderWithData | public function renderWithData($path, $data = [])
{
foreach ($data as $key => $value) {
$this->add($key, $value);
}
$this->render($path);
return $this;
} | php | public function renderWithData($path, $data = [])
{
foreach ($data as $key => $value) {
$this->add($key, $value);
}
$this->render($path);
return $this;
} | [
"public",
"function",
"renderWithData",
"(",
"$",
"path",
",",
"$",
"data",
"=",
"[",
"]",
")",
"{",
"foreach",
"(",
"$",
"data",
"as",
"$",
"key",
"=>",
"$",
"value",
")",
"{",
"$",
"this",
"->",
"add",
"(",
"$",
"key",
",",
"$",
"value",
")",... | Renders a view with data to pass on to the view.
@param string $path - View's path
@param array $data - The data to render with
@return \Scara\Http\Controller | [
"Renders",
"a",
"view",
"with",
"data",
"to",
"pass",
"on",
"to",
"the",
"view",
"."
] | 199b08b45fadf5dae14ac4732af03b36e15bbef2 | https://github.com/ScaraMVC/Framework/blob/199b08b45fadf5dae14ac4732af03b36e15bbef2/src/Scara/Http/Controller.php#L177-L186 |
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.