id int32 0 241k | repo stringlengths 6 63 | path stringlengths 5 140 | func_name stringlengths 3 151 | original_string stringlengths 84 13k | language stringclasses 1
value | code stringlengths 84 13k | code_tokens list | docstring stringlengths 3 47.2k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 91 247 |
|---|---|---|---|---|---|---|---|---|---|---|---|
33,300 | clue/reactphp-zenity | src/Dialog/AbstractDialog.php | AbstractDialog.getArgs | public function getArgs()
{
$args = array(
'--' . $this->getType()
);
foreach ($this as $name => $value) {
if (!in_array($name, array('inbuffer')) && $value !== null && $value !== false && !is_array($value)) {
$name = $this->decamelize($name);
... | php | public function getArgs()
{
$args = array(
'--' . $this->getType()
);
foreach ($this as $name => $value) {
if (!in_array($name, array('inbuffer')) && $value !== null && $value !== false && !is_array($value)) {
$name = $this->decamelize($name);
... | [
"public",
"function",
"getArgs",
"(",
")",
"{",
"$",
"args",
"=",
"array",
"(",
"'--'",
".",
"$",
"this",
"->",
"getType",
"(",
")",
")",
";",
"foreach",
"(",
"$",
"this",
"as",
"$",
"name",
"=>",
"$",
"value",
")",
"{",
"if",
"(",
"!",
"in_arr... | Returns an array of arguments to pass to the zenity bin to produce the current dialog.
Internally, this will automatically fetch all properties of the current
instance and format them accordingly to zenity arguments.
@return string[]
@internal | [
"Returns",
"an",
"array",
"of",
"arguments",
"to",
"pass",
"to",
"the",
"zenity",
"bin",
"to",
"produce",
"the",
"current",
"dialog",
"."
] | f49e18fc0443f454c2e4cd270f0fc7a5f0cd3964 | https://github.com/clue/reactphp-zenity/blob/f49e18fc0443f454c2e4cd270f0fc7a5f0cd3964/src/Dialog/AbstractDialog.php#L168-L189 |
33,301 | clue/reactphp-zenity | src/Zen/ListZen.php | ListZen.parseValue | public function parseValue($value)
{
if (trim($value) === '') {
// TODO: move logic
return false;
}
// always split on separator, even if we only return a single value (explicitly or a checklist)
// work around an issue in zenity 3.8: https://bugzilla.gnome.o... | php | public function parseValue($value)
{
if (trim($value) === '') {
// TODO: move logic
return false;
}
// always split on separator, even if we only return a single value (explicitly or a checklist)
// work around an issue in zenity 3.8: https://bugzilla.gnome.o... | [
"public",
"function",
"parseValue",
"(",
"$",
"value",
")",
"{",
"if",
"(",
"trim",
"(",
"$",
"value",
")",
"===",
"''",
")",
"{",
"// TODO: move logic",
"return",
"false",
";",
"}",
"// always split on separator, even if we only return a single value (explicitly or a... | Parses the string returned from the dialog
Usually, this will return a single string.
If the `setMultiple(true)` option is active or this is a checklist, this
will return an array of strings instead. The size of the array depends on
the number of rows selected by the user.
@internal
@see parent::parseValue()
@return... | [
"Parses",
"the",
"string",
"returned",
"from",
"the",
"dialog"
] | f49e18fc0443f454c2e4cd270f0fc7a5f0cd3964 | https://github.com/clue/reactphp-zenity/blob/f49e18fc0443f454c2e4cd270f0fc7a5f0cd3964/src/Zen/ListZen.php#L32-L46 |
33,302 | clue/reactphp-zenity | src/Dialog/FormsDialog.php | FormsDialog.addList | public function addList($name, array $values, array $columns = null, $showHeaders = null)
{
$this->fields[] = '--add-list=' . $name;
$this->fields[] = '--list-values=' . implode('|', $values);
// columns given => show headers if it's not explicitly disabled
if ($columns !== null &&... | php | public function addList($name, array $values, array $columns = null, $showHeaders = null)
{
$this->fields[] = '--add-list=' . $name;
$this->fields[] = '--list-values=' . implode('|', $values);
// columns given => show headers if it's not explicitly disabled
if ($columns !== null &&... | [
"public",
"function",
"addList",
"(",
"$",
"name",
",",
"array",
"$",
"values",
",",
"array",
"$",
"columns",
"=",
"null",
",",
"$",
"showHeaders",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"fields",
"[",
"]",
"=",
"'--add-list='",
".",
"$",
"name",
... | Add a new List in forms dialog.
Only one single row can be selected in the list. The default selection is
the first row.
A simple list can be added like this:
<code>
$values = array('blue', 'red');
$dialog->addList('Favorite color', $values);
</code>
Selecting a value in this list will return either 'blue' (which is... | [
"Add",
"a",
"new",
"List",
"in",
"forms",
"dialog",
"."
] | f49e18fc0443f454c2e4cd270f0fc7a5f0cd3964 | https://github.com/clue/reactphp-zenity/blob/f49e18fc0443f454c2e4cd270f0fc7a5f0cd3964/src/Dialog/FormsDialog.php#L120-L140 |
33,303 | clue/reactphp-zenity | src/Launcher.php | Launcher.waitFor | public function waitFor(AbstractDialog $dialog)
{
$done = false;
$ret = null;
$loop = $this->loop;
$process = $this->launch($dialog);
$process->then(function ($result) use (&$ret, &$done, $loop) {
$ret = $result;
$done = true;
$loop->st... | php | public function waitFor(AbstractDialog $dialog)
{
$done = false;
$ret = null;
$loop = $this->loop;
$process = $this->launch($dialog);
$process->then(function ($result) use (&$ret, &$done, $loop) {
$ret = $result;
$done = true;
$loop->st... | [
"public",
"function",
"waitFor",
"(",
"AbstractDialog",
"$",
"dialog",
")",
"{",
"$",
"done",
"=",
"false",
";",
"$",
"ret",
"=",
"null",
";",
"$",
"loop",
"=",
"$",
"this",
"->",
"loop",
";",
"$",
"process",
"=",
"$",
"this",
"->",
"launch",
"(",
... | Block while waiting for the given dialog to return
If the dialog is already closed, this returns immediately, without doing
much at all. If the dialog is not yet opened, it will be opened and this
method will wait for the dialog to be handled (i.e. either completed or
closed). Clicking "ok" will result in a boolean tr... | [
"Block",
"while",
"waiting",
"for",
"the",
"given",
"dialog",
"to",
"return"
] | f49e18fc0443f454c2e4cd270f0fc7a5f0cd3964 | https://github.com/clue/reactphp-zenity/blob/f49e18fc0443f454c2e4cd270f0fc7a5f0cd3964/src/Launcher.php#L81-L106 |
33,304 | clue/reactphp-zenity | src/Zen/FileSelectionZen.php | FileSelectionZen.parseValue | public function parseValue($value)
{
if ($this->multiple) {
$ret = array();
foreach(explode($this->separator, $value) as $path) {
$ret[] = new SplFileInfo($path);
}
return $ret;
}
return new SplFileInfo($value);
} | php | public function parseValue($value)
{
if ($this->multiple) {
$ret = array();
foreach(explode($this->separator, $value) as $path) {
$ret[] = new SplFileInfo($path);
}
return $ret;
}
return new SplFileInfo($value);
} | [
"public",
"function",
"parseValue",
"(",
"$",
"value",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"multiple",
")",
"{",
"$",
"ret",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"explode",
"(",
"$",
"this",
"->",
"separator",
",",
"$",
"value",
")",
... | Parses the path string returned from the dialog into a SplFileInfo object
Usually, this will return a single SplFileInfo object.
If the `setMultiple(true)` option is active, this will return an array
of SplFileInfo objects instead. The size of the array depends on the
number of files selected by the user.
@internal
... | [
"Parses",
"the",
"path",
"string",
"returned",
"from",
"the",
"dialog",
"into",
"a",
"SplFileInfo",
"object"
] | f49e18fc0443f454c2e4cd270f0fc7a5f0cd3964 | https://github.com/clue/reactphp-zenity/blob/f49e18fc0443f454c2e4cd270f0fc7a5f0cd3964/src/Zen/FileSelectionZen.php#L33-L45 |
33,305 | kktsvetkov/krumo | class.krumo.php | krumo.headers | public static function headers()
{
// disabled ?
//
if (!self::_debug())
{
return false;
}
if (!function_exists('getallheaders'))
{
function getallheaders()
{
$headers = array ();
foreach ($_SERVER as $name => $value)
{
if (substr($name, 0, 5) == 'HTTP_')
... | php | public static function headers()
{
// disabled ?
//
if (!self::_debug())
{
return false;
}
if (!function_exists('getallheaders'))
{
function getallheaders()
{
$headers = array ();
foreach ($_SERVER as $name => $value)
{
if (substr($name, 0, 5) == 'HTTP_')
... | [
"public",
"static",
"function",
"headers",
"(",
")",
"{",
"// disabled ?\r",
"//\r",
"if",
"(",
"!",
"self",
"::",
"_debug",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"!",
"function_exists",
"(",
"'getallheaders'",
")",
")",
"{",
"fun... | Prints a list of all HTTP request headers. | [
"Prints",
"a",
"list",
"of",
"all",
"HTTP",
"request",
"headers",
"."
] | fc8bfbb350ca481446820a665afe93ab98423e1e | https://github.com/kktsvetkov/krumo/blob/fc8bfbb350ca481446820a665afe93ab98423e1e/class.krumo.php#L213-L253 |
33,306 | kktsvetkov/krumo | class.krumo.php | krumo.fetch | public static function fetch($data)
{
// disabled ?
//
if (!self::_debug())
{
return false;
}
ob_start();
call_user_func_array(
array(__CLASS__, 'dump'),
func_get_args()
);
return ob_get_clean();
} | php | public static function fetch($data)
{
// disabled ?
//
if (!self::_debug())
{
return false;
}
ob_start();
call_user_func_array(
array(__CLASS__, 'dump'),
func_get_args()
);
return ob_get_clean();
} | [
"public",
"static",
"function",
"fetch",
"(",
"$",
"data",
")",
"{",
"// disabled ?\r",
"//\r",
"if",
"(",
"!",
"self",
"::",
"_debug",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"ob_start",
"(",
")",
";",
"call_user_func_array",
"(",
"array",
"(... | Return the dump information about a variable
@param mixed $data,... | [
"Return",
"the",
"dump",
"information",
"about",
"a",
"variable"
] | fc8bfbb350ca481446820a665afe93ab98423e1e | https://github.com/kktsvetkov/krumo/blob/fc8bfbb350ca481446820a665afe93ab98423e1e/class.krumo.php#L649-L665 |
33,307 | kktsvetkov/krumo | class.krumo.php | krumo.& | private static function &_hive(&$bee)
{
static $_ = array();
// new bee ?
//
if (!is_null($bee))
{
// stain it
//
$_recursion_marker = self::_marker();
(is_object($bee))
? (empty($bee->$_recursion_marker)
? $bee->$_recursion_marker = 1
: $bee->$_recursion_marker++
... | php | private static function &_hive(&$bee)
{
static $_ = array();
// new bee ?
//
if (!is_null($bee))
{
// stain it
//
$_recursion_marker = self::_marker();
(is_object($bee))
? (empty($bee->$_recursion_marker)
? $bee->$_recursion_marker = 1
: $bee->$_recursion_marker++
... | [
"private",
"static",
"function",
"&",
"_hive",
"(",
"&",
"$",
"bee",
")",
"{",
"static",
"$",
"_",
"=",
"array",
"(",
")",
";",
"// new bee ?\r",
"//\r",
"if",
"(",
"!",
"is_null",
"(",
"$",
"bee",
")",
")",
"{",
"// stain it\r",
"//\r",
"$",
"_rec... | Adds a variable to the hive of arrays and objects which
are tracked for whether they have recursive entries
@param mixed &$bee either array or object, not a scallar vale
@return array all the bees | [
"Adds",
"a",
"variable",
"to",
"the",
"hive",
"of",
"arrays",
"and",
"objects",
"which",
"are",
"tracked",
"for",
"whether",
"they",
"have",
"recursive",
"entries"
] | fc8bfbb350ca481446820a665afe93ab98423e1e | https://github.com/kktsvetkov/krumo/blob/fc8bfbb350ca481446820a665afe93ab98423e1e/class.krumo.php#L944-L972 |
33,308 | netgen-layouts/content-browser | bundle/EventListener/SetCurrentBackendListener.php | SetCurrentBackendListener.onKernelRequest | public function onKernelRequest(GetResponseEvent $event): void
{
if (!$event->isMasterRequest()) {
return;
}
$attributes = $event->getRequest()->attributes;
if ($attributes->get(SetIsApiRequestListener::API_FLAG_NAME) !== true) {
return;
}
if... | php | public function onKernelRequest(GetResponseEvent $event): void
{
if (!$event->isMasterRequest()) {
return;
}
$attributes = $event->getRequest()->attributes;
if ($attributes->get(SetIsApiRequestListener::API_FLAG_NAME) !== true) {
return;
}
if... | [
"public",
"function",
"onKernelRequest",
"(",
"GetResponseEvent",
"$",
"event",
")",
":",
"void",
"{",
"if",
"(",
"!",
"$",
"event",
"->",
"isMasterRequest",
"(",
")",
")",
"{",
"return",
";",
"}",
"$",
"attributes",
"=",
"$",
"event",
"->",
"getRequest"... | Injects the current backend into container. | [
"Injects",
"the",
"current",
"backend",
"into",
"container",
"."
] | 34403d59b73b0e804f12746d4418ba44e4991d74 | https://github.com/netgen-layouts/content-browser/blob/34403d59b73b0e804f12746d4418ba44e4991d74/bundle/EventListener/SetCurrentBackendListener.php#L39-L56 |
33,309 | zicht/symfony-util | src/Zicht/SymfonyUtil/HttpKernel/Kernel.php | Kernel.getConfigFiles | protected function getConfigFiles()
{
$ret = [];
foreach ($this->getCandidateConfigFiles() as $configFile) {
if (is_file($configFile)) {
$ret[]= $configFile;
break;
}
}
$configFile = join(
'/',
[
... | php | protected function getConfigFiles()
{
$ret = [];
foreach ($this->getCandidateConfigFiles() as $configFile) {
if (is_file($configFile)) {
$ret[]= $configFile;
break;
}
}
$configFile = join(
'/',
[
... | [
"protected",
"function",
"getConfigFiles",
"(",
")",
"{",
"$",
"ret",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"this",
"->",
"getCandidateConfigFiles",
"(",
")",
"as",
"$",
"configFile",
")",
"{",
"if",
"(",
"is_file",
"(",
"$",
"configFile",
")",
")",... | Get all config files which should be loaded. Can be overridden for custom logic.
By default, following files are loaded (relativy to `getRootDir()`)
- if `config/config_local.yml` exists, load that.
- if `config/config_local.yml` does not exist, load `config/config_{environment}.yml`
- additionally: `config/kernel_{n... | [
"Get",
"all",
"config",
"files",
"which",
"should",
"be",
"loaded",
".",
"Can",
"be",
"overridden",
"for",
"custom",
"logic",
"."
] | ba6ea81a7d4d12b2ed953d2b1a5cd2aa7b518c1d | https://github.com/zicht/symfony-util/blob/ba6ea81a7d4d12b2ed953d2b1a5cd2aa7b518c1d/src/Zicht/SymfonyUtil/HttpKernel/Kernel.php#L126-L147 |
33,310 | zicht/symfony-util | src/Zicht/SymfonyUtil/HttpKernel/Kernel.php | Kernel.attachSession | protected function attachSession(Request $request)
{
// TODO consider generating this code based on the ContainerBuilder / PhpDumper from Symfony DI.
$container = $this->bootLightweightContainer();
if ($this->sessionConfig && @is_readable($this->getRootDir() . '/' . $this->sessionConfig)) {... | php | protected function attachSession(Request $request)
{
// TODO consider generating this code based on the ContainerBuilder / PhpDumper from Symfony DI.
$container = $this->bootLightweightContainer();
if ($this->sessionConfig && @is_readable($this->getRootDir() . '/' . $this->sessionConfig)) {... | [
"protected",
"function",
"attachSession",
"(",
"Request",
"$",
"request",
")",
"{",
"// TODO consider generating this code based on the ContainerBuilder / PhpDumper from Symfony DI.",
"$",
"container",
"=",
"$",
"this",
"->",
"bootLightweightContainer",
"(",
")",
";",
"if",
... | Attach a session to the request.
@param Request $request
@return void | [
"Attach",
"a",
"session",
"to",
"the",
"request",
"."
] | ba6ea81a7d4d12b2ed953d2b1a5cd2aa7b518c1d | https://github.com/zicht/symfony-util/blob/ba6ea81a7d4d12b2ed953d2b1a5cd2aa7b518c1d/src/Zicht/SymfonyUtil/HttpKernel/Kernel.php#L187-L218 |
33,311 | zicht/symfony-util | src/Zicht/SymfonyUtil/HttpKernel/Kernel.php | Kernel.bootLightweightContainer | protected function bootLightweightContainer()
{
if (null === $this->lightweightContainer) {
$this->lightweightContainer
= $container
= new Container();
foreach ($this->getKernelParameters() as $param => $value) {
$this->lightweightCont... | php | protected function bootLightweightContainer()
{
if (null === $this->lightweightContainer) {
$this->lightweightContainer
= $container
= new Container();
foreach ($this->getKernelParameters() as $param => $value) {
$this->lightweightCont... | [
"protected",
"function",
"bootLightweightContainer",
"(",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"this",
"->",
"lightweightContainer",
")",
"{",
"$",
"this",
"->",
"lightweightContainer",
"=",
"$",
"container",
"=",
"new",
"Container",
"(",
")",
";",
"fore... | Boot a lightweight container which can be used for early request handling
@return null|Container | [
"Boot",
"a",
"lightweight",
"container",
"which",
"can",
"be",
"used",
"for",
"early",
"request",
"handling"
] | ba6ea81a7d4d12b2ed953d2b1a5cd2aa7b518c1d | https://github.com/zicht/symfony-util/blob/ba6ea81a7d4d12b2ed953d2b1a5cd2aa7b518c1d/src/Zicht/SymfonyUtil/HttpKernel/Kernel.php#L225-L237 |
33,312 | netgen-layouts/content-browser | bundle/Controller/API/LoadConfig.php | LoadConfig.getAvailableColumns | private function getAvailableColumns(): array
{
$availableColumns = [];
foreach ($this->config->getColumns() as $identifier => $columnData) {
$availableColumns[] = [
'id' => $identifier,
'name' => $this->translator->trans($columnData['name'], [], 'ngcb'),... | php | private function getAvailableColumns(): array
{
$availableColumns = [];
foreach ($this->config->getColumns() as $identifier => $columnData) {
$availableColumns[] = [
'id' => $identifier,
'name' => $this->translator->trans($columnData['name'], [], 'ngcb'),... | [
"private",
"function",
"getAvailableColumns",
"(",
")",
":",
"array",
"{",
"$",
"availableColumns",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"this",
"->",
"config",
"->",
"getColumns",
"(",
")",
"as",
"$",
"identifier",
"=>",
"$",
"columnData",
")",
"{",... | Returns the list of available columns from configuration. | [
"Returns",
"the",
"list",
"of",
"available",
"columns",
"from",
"configuration",
"."
] | 34403d59b73b0e804f12746d4418ba44e4991d74 | https://github.com/netgen-layouts/content-browser/blob/34403d59b73b0e804f12746d4418ba44e4991d74/bundle/Controller/API/LoadConfig.php#L76-L88 |
33,313 | PhpGt/Input | src/Input.php | Input.contains | public function contains(string $key, string $method = null):bool {
if(is_null($method)) {
$method = self::DATA_COMBINED;
}
switch($method) {
case self::DATA_QUERYSTRING:
$isset = $this->containsQueryStringParameter($key);
break;
case self::DATA_BODY:
$isset =$this->containsBodyParameter($key);
... | php | public function contains(string $key, string $method = null):bool {
if(is_null($method)) {
$method = self::DATA_COMBINED;
}
switch($method) {
case self::DATA_QUERYSTRING:
$isset = $this->containsQueryStringParameter($key);
break;
case self::DATA_BODY:
$isset =$this->containsBodyParameter($key);
... | [
"public",
"function",
"contains",
"(",
"string",
"$",
"key",
",",
"string",
"$",
"method",
"=",
"null",
")",
":",
"bool",
"{",
"if",
"(",
"is_null",
"(",
"$",
"method",
")",
")",
"{",
"$",
"method",
"=",
"self",
"::",
"DATA_COMBINED",
";",
"}",
"sw... | Does the input contain the specified key? | [
"Does",
"the",
"input",
"contain",
"the",
"specified",
"key?"
] | 2a93bb01d1cb05a958309c0d777bd0085726a198 | https://github.com/PhpGt/Input/blob/2a93bb01d1cb05a958309c0d777bd0085726a198/src/Input.php#L146-L173 |
33,314 | PhpGt/Input | src/Input.php | Input.with | public function with(string...$keys):Trigger {
foreach($keys as $key) {
if(!$this->parameters->contains($key)) {
throw new MissingInputParameterException($key);
}
}
return $this->newTrigger("with", ...$keys);
} | php | public function with(string...$keys):Trigger {
foreach($keys as $key) {
if(!$this->parameters->contains($key)) {
throw new MissingInputParameterException($key);
}
}
return $this->newTrigger("with", ...$keys);
} | [
"public",
"function",
"with",
"(",
"string",
"...",
"$",
"keys",
")",
":",
"Trigger",
"{",
"foreach",
"(",
"$",
"keys",
"as",
"$",
"key",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"parameters",
"->",
"contains",
"(",
"$",
"key",
")",
")",
"{",... | Return a Trigger that will only pass the provided keys to its callback. | [
"Return",
"a",
"Trigger",
"that",
"will",
"only",
"pass",
"the",
"provided",
"keys",
"to",
"its",
"callback",
"."
] | 2a93bb01d1cb05a958309c0d777bd0085726a198 | https://github.com/PhpGt/Input/blob/2a93bb01d1cb05a958309c0d777bd0085726a198/src/Input.php#L234-L242 |
33,315 | netgen-layouts/content-browser | lib/Form/Type/ContentBrowserMultipleType.php | ContentBrowserMultipleType.getItems | private function getItems($itemValues, string $itemType): array
{
$items = [];
foreach ((array) $itemValues as $itemValue) {
try {
$backend = $this->backendRegistry->getBackend($itemType);
$item = $backend->loadItem($itemValue);
$items[$it... | php | private function getItems($itemValues, string $itemType): array
{
$items = [];
foreach ((array) $itemValues as $itemValue) {
try {
$backend = $this->backendRegistry->getBackend($itemType);
$item = $backend->loadItem($itemValue);
$items[$it... | [
"private",
"function",
"getItems",
"(",
"$",
"itemValues",
",",
"string",
"$",
"itemType",
")",
":",
"array",
"{",
"$",
"items",
"=",
"[",
"]",
";",
"foreach",
"(",
"(",
"array",
")",
"$",
"itemValues",
"as",
"$",
"itemValue",
")",
"{",
"try",
"{",
... | Returns the array of items for all provided item values.
@param mixed $itemValues
@param string $itemType
@return array | [
"Returns",
"the",
"array",
"of",
"items",
"for",
"all",
"provided",
"item",
"values",
"."
] | 34403d59b73b0e804f12746d4418ba44e4991d74 | https://github.com/netgen-layouts/content-browser/blob/34403d59b73b0e804f12746d4418ba44e4991d74/lib/Form/Type/ContentBrowserMultipleType.php#L130-L145 |
33,316 | netgen-layouts/content-browser | bundle/EventListener/SetCurrentConfigListener.php | SetCurrentConfigListener.onKernelRequest | public function onKernelRequest(GetResponseEvent $event): void
{
if (!$event->isMasterRequest()) {
return;
}
$request = $event->getRequest();
$attributes = $request->attributes;
if ($attributes->get(SetIsApiRequestListener::API_FLAG_NAME) !== true) {
... | php | public function onKernelRequest(GetResponseEvent $event): void
{
if (!$event->isMasterRequest()) {
return;
}
$request = $event->getRequest();
$attributes = $request->attributes;
if ($attributes->get(SetIsApiRequestListener::API_FLAG_NAME) !== true) {
... | [
"public",
"function",
"onKernelRequest",
"(",
"GetResponseEvent",
"$",
"event",
")",
":",
"void",
"{",
"if",
"(",
"!",
"$",
"event",
"->",
"isMasterRequest",
"(",
")",
")",
"{",
"return",
";",
"}",
"$",
"request",
"=",
"$",
"event",
"->",
"getRequest",
... | Injects the current config into container. | [
"Injects",
"the",
"current",
"config",
"into",
"container",
"."
] | 34403d59b73b0e804f12746d4418ba44e4991d74 | https://github.com/netgen-layouts/content-browser/blob/34403d59b73b0e804f12746d4418ba44e4991d74/bundle/EventListener/SetCurrentConfigListener.php#L45-L82 |
33,317 | netgen-layouts/content-browser | bundle/EventListener/SetCurrentConfigListener.php | SetCurrentConfigListener.loadConfig | private function loadConfig(string $itemType): Configuration
{
$service = 'netgen_content_browser.config.' . $itemType;
if (!$this->container->has($service)) {
throw new InvalidArgumentException(
sprintf(
'Configuration for "%s" item type does not exi... | php | private function loadConfig(string $itemType): Configuration
{
$service = 'netgen_content_browser.config.' . $itemType;
if (!$this->container->has($service)) {
throw new InvalidArgumentException(
sprintf(
'Configuration for "%s" item type does not exi... | [
"private",
"function",
"loadConfig",
"(",
"string",
"$",
"itemType",
")",
":",
"Configuration",
"{",
"$",
"service",
"=",
"'netgen_content_browser.config.'",
".",
"$",
"itemType",
";",
"if",
"(",
"!",
"$",
"this",
"->",
"container",
"->",
"has",
"(",
"$",
... | Loads the configuration for provided item type from the container.
@throws \Netgen\ContentBrowser\Exceptions\InvalidArgumentException If config could not be found | [
"Loads",
"the",
"configuration",
"for",
"provided",
"item",
"type",
"from",
"the",
"container",
"."
] | 34403d59b73b0e804f12746d4418ba44e4991d74 | https://github.com/netgen-layouts/content-browser/blob/34403d59b73b0e804f12746d4418ba44e4991d74/bundle/EventListener/SetCurrentConfigListener.php#L89-L113 |
33,318 | netgen-layouts/content-browser | lib/Item/ColumnProvider/ColumnProvider.php | ColumnProvider.provideColumn | private function provideColumn(ItemInterface $item, array $columnConfig): string
{
if (isset($columnConfig['template'])) {
return $this->itemRenderer->renderItem(
$item,
$columnConfig['template']
);
}
if (!isset($this->columnValueProvi... | php | private function provideColumn(ItemInterface $item, array $columnConfig): string
{
if (isset($columnConfig['template'])) {
return $this->itemRenderer->renderItem(
$item,
$columnConfig['template']
);
}
if (!isset($this->columnValueProvi... | [
"private",
"function",
"provideColumn",
"(",
"ItemInterface",
"$",
"item",
",",
"array",
"$",
"columnConfig",
")",
":",
"string",
"{",
"if",
"(",
"isset",
"(",
"$",
"columnConfig",
"[",
"'template'",
"]",
")",
")",
"{",
"return",
"$",
"this",
"->",
"item... | Provides the column with specified identifier for selected item.
@throws \Netgen\ContentBrowser\Exceptions\InvalidArgumentException If value provider for the column does not exist | [
"Provides",
"the",
"column",
"with",
"specified",
"identifier",
"for",
"selected",
"item",
"."
] | 34403d59b73b0e804f12746d4418ba44e4991d74 | https://github.com/netgen-layouts/content-browser/blob/34403d59b73b0e804f12746d4418ba44e4991d74/lib/Item/ColumnProvider/ColumnProvider.php#L65-L88 |
33,319 | netgen-layouts/content-browser | lib/Form/Type/ContentBrowserDynamicType.php | ContentBrowserDynamicType.getEnabledItemTypes | private function getEnabledItemTypes(array $itemTypes): array
{
$allItemTypes = array_flip(
array_map(
static function (Configuration $config): string {
return $config->getItemName();
},
$this->configRegistry->getConfigs()
... | php | private function getEnabledItemTypes(array $itemTypes): array
{
$allItemTypes = array_flip(
array_map(
static function (Configuration $config): string {
return $config->getItemName();
},
$this->configRegistry->getConfigs()
... | [
"private",
"function",
"getEnabledItemTypes",
"(",
"array",
"$",
"itemTypes",
")",
":",
"array",
"{",
"$",
"allItemTypes",
"=",
"array_flip",
"(",
"array_map",
"(",
"static",
"function",
"(",
"Configuration",
"$",
"config",
")",
":",
"string",
"{",
"return",
... | Returns the enabled item types based on provided list. | [
"Returns",
"the",
"enabled",
"item",
"types",
"based",
"on",
"provided",
"list",
"."
] | 34403d59b73b0e804f12746d4418ba44e4991d74 | https://github.com/netgen-layouts/content-browser/blob/34403d59b73b0e804f12746d4418ba44e4991d74/lib/Form/Type/ContentBrowserDynamicType.php#L147-L168 |
33,320 | netgen-layouts/content-browser | bundle/EventListener/ExceptionSerializerListener.php | ExceptionSerializerListener.onException | public function onException(GetResponseForExceptionEvent $event): void
{
if (!$event->isMasterRequest()) {
return;
}
$attributes = $event->getRequest()->attributes;
if ($attributes->get(SetIsApiRequestListener::API_FLAG_NAME) !== true) {
return;
}
... | php | public function onException(GetResponseForExceptionEvent $event): void
{
if (!$event->isMasterRequest()) {
return;
}
$attributes = $event->getRequest()->attributes;
if ($attributes->get(SetIsApiRequestListener::API_FLAG_NAME) !== true) {
return;
}
... | [
"public",
"function",
"onException",
"(",
"GetResponseForExceptionEvent",
"$",
"event",
")",
":",
"void",
"{",
"if",
"(",
"!",
"$",
"event",
"->",
"isMasterRequest",
"(",
")",
")",
"{",
"return",
";",
"}",
"$",
"attributes",
"=",
"$",
"event",
"->",
"get... | Serializes the exception. | [
"Serializes",
"the",
"exception",
"."
] | 34403d59b73b0e804f12746d4418ba44e4991d74 | https://github.com/netgen-layouts/content-browser/blob/34403d59b73b0e804f12746d4418ba44e4991d74/bundle/EventListener/ExceptionSerializerListener.php#L45-L89 |
33,321 | netgen-layouts/content-browser | bundle/EventListener/ExceptionSerializerListener.php | ExceptionSerializerListener.logException | private function logException(Exception $exception): void
{
if ($exception instanceof HttpExceptionInterface && $exception->getStatusCode() < 500) {
return;
}
$this->logger->critical(
sprintf(
'Uncaught PHP Exception %s: "%s" at %s line %s',
... | php | private function logException(Exception $exception): void
{
if ($exception instanceof HttpExceptionInterface && $exception->getStatusCode() < 500) {
return;
}
$this->logger->critical(
sprintf(
'Uncaught PHP Exception %s: "%s" at %s line %s',
... | [
"private",
"function",
"logException",
"(",
"Exception",
"$",
"exception",
")",
":",
"void",
"{",
"if",
"(",
"$",
"exception",
"instanceof",
"HttpExceptionInterface",
"&&",
"$",
"exception",
"->",
"getStatusCode",
"(",
")",
"<",
"500",
")",
"{",
"return",
";... | Logs all critical errors. | [
"Logs",
"all",
"critical",
"errors",
"."
] | 34403d59b73b0e804f12746d4418ba44e4991d74 | https://github.com/netgen-layouts/content-browser/blob/34403d59b73b0e804f12746d4418ba44e4991d74/bundle/EventListener/ExceptionSerializerListener.php#L94-L110 |
33,322 | netgen-layouts/content-browser | bundle/Controller/API/LoadSubItems.php | LoadSubItems.buildPath | private function buildPath(LocationInterface $location): array
{
$path = [];
while (true) {
$path[] = [
'id' => $location->getLocationId(),
'name' => $location->getName(),
];
if ($location->getParentId() === null) {
... | php | private function buildPath(LocationInterface $location): array
{
$path = [];
while (true) {
$path[] = [
'id' => $location->getLocationId(),
'name' => $location->getName(),
];
if ($location->getParentId() === null) {
... | [
"private",
"function",
"buildPath",
"(",
"LocationInterface",
"$",
"location",
")",
":",
"array",
"{",
"$",
"path",
"=",
"[",
"]",
";",
"while",
"(",
"true",
")",
"{",
"$",
"path",
"[",
"]",
"=",
"[",
"'id'",
"=>",
"$",
"location",
"->",
"getLocation... | Builds the path array for specified item. | [
"Builds",
"the",
"path",
"array",
"for",
"specified",
"item",
"."
] | 34403d59b73b0e804f12746d4418ba44e4991d74 | https://github.com/netgen-layouts/content-browser/blob/34403d59b73b0e804f12746d4418ba44e4991d74/bundle/Controller/API/LoadSubItems.php#L82-L104 |
33,323 | koolkode/bpmn | src/Runtime/RuntimeService.php | RuntimeService.startProcessInstance | public function startProcessInstance(ProcessDefinition $def, $businessKey = null, array $variables = [])
{
$startNode = $def->findNoneStartEvent();
$id = $this->engine->executeCommand(new StartProcessInstanceCommand($def, $startNode, $businessKey, $variables));
return $this... | php | public function startProcessInstance(ProcessDefinition $def, $businessKey = null, array $variables = [])
{
$startNode = $def->findNoneStartEvent();
$id = $this->engine->executeCommand(new StartProcessInstanceCommand($def, $startNode, $businessKey, $variables));
return $this... | [
"public",
"function",
"startProcessInstance",
"(",
"ProcessDefinition",
"$",
"def",
",",
"$",
"businessKey",
"=",
"null",
",",
"array",
"$",
"variables",
"=",
"[",
"]",
")",
"{",
"$",
"startNode",
"=",
"$",
"def",
"->",
"findNoneStartEvent",
"(",
")",
";",... | Start a process from the given definition using a singular
@param ProcessDefinition $def
@param string $businessKey
@param array<string, mixed> $variables
@return HistoricProcessInstance | [
"Start",
"a",
"process",
"from",
"the",
"given",
"definition",
"using",
"a",
"singular"
] | 49ff924fa97e0bbe1b74e914393b22760dcf7281 | https://github.com/koolkode/bpmn/blob/49ff924fa97e0bbe1b74e914393b22760dcf7281/src/Runtime/RuntimeService.php#L107-L114 |
33,324 | koolkode/bpmn | src/Runtime/RuntimeService.php | RuntimeService.startProcessInstanceByKey | public function startProcessInstanceByKey($processDefinitionKey, $businessKey = null, array $variables = [])
{
$query = $this->engine->getRepositoryService()->createProcessDefinitionQuery();
$def = $query->processDefinitionKey($processDefinitionKey)->latestVersion()->findOne();
retu... | php | public function startProcessInstanceByKey($processDefinitionKey, $businessKey = null, array $variables = [])
{
$query = $this->engine->getRepositoryService()->createProcessDefinitionQuery();
$def = $query->processDefinitionKey($processDefinitionKey)->latestVersion()->findOne();
retu... | [
"public",
"function",
"startProcessInstanceByKey",
"(",
"$",
"processDefinitionKey",
",",
"$",
"businessKey",
"=",
"null",
",",
"array",
"$",
"variables",
"=",
"[",
"]",
")",
"{",
"$",
"query",
"=",
"$",
"this",
"->",
"engine",
"->",
"getRepositoryService",
... | Start a process using the latest version of the given process definition.
@param string $processDefinitionKey
@param string $businessKey
@param array<string, mixed> $variables
@return HistoricProcessInstance | [
"Start",
"a",
"process",
"using",
"the",
"latest",
"version",
"of",
"the",
"given",
"process",
"definition",
"."
] | 49ff924fa97e0bbe1b74e914393b22760dcf7281 | https://github.com/koolkode/bpmn/blob/49ff924fa97e0bbe1b74e914393b22760dcf7281/src/Runtime/RuntimeService.php#L124-L130 |
33,325 | koolkode/bpmn | src/Runtime/RuntimeService.php | RuntimeService.startProcessInstanceByMessage | public function startProcessInstanceByMessage($messageName, $businessKey = null, array $variables = [])
{
$query = $this->engine->getRepositoryService()->createProcessDefinitionQuery();
$def = $query->messageEventSubscriptionName($messageName)->latestVersion()->findOne();
$startNode = $def->... | php | public function startProcessInstanceByMessage($messageName, $businessKey = null, array $variables = [])
{
$query = $this->engine->getRepositoryService()->createProcessDefinitionQuery();
$def = $query->messageEventSubscriptionName($messageName)->latestVersion()->findOne();
$startNode = $def->... | [
"public",
"function",
"startProcessInstanceByMessage",
"(",
"$",
"messageName",
",",
"$",
"businessKey",
"=",
"null",
",",
"array",
"$",
"variables",
"=",
"[",
"]",
")",
"{",
"$",
"query",
"=",
"$",
"this",
"->",
"engine",
"->",
"getRepositoryService",
"(",
... | Start a process instance by message start event.
@param string $messageName
@param string $businessKey
@param array<string, mixed> $variables
@return HistoricProcessInstance | [
"Start",
"a",
"process",
"instance",
"by",
"message",
"start",
"event",
"."
] | 49ff924fa97e0bbe1b74e914393b22760dcf7281 | https://github.com/koolkode/bpmn/blob/49ff924fa97e0bbe1b74e914393b22760dcf7281/src/Runtime/RuntimeService.php#L140-L149 |
33,326 | koolkode/bpmn | src/Engine/ProcessEngine.php | ProcessEngine.scheduleJob | public function scheduleJob(UUID $executionId, string $handlerType, $data, ?\DateTimeImmutable $runAt = null): ?JobInterface
{
if ($this->jobExecutor !== null) {
return $this->jobExecutor->scheduleJob($executionId, $handlerType, $data, $runAt);
}
} | php | public function scheduleJob(UUID $executionId, string $handlerType, $data, ?\DateTimeImmutable $runAt = null): ?JobInterface
{
if ($this->jobExecutor !== null) {
return $this->jobExecutor->scheduleJob($executionId, $handlerType, $data, $runAt);
}
} | [
"public",
"function",
"scheduleJob",
"(",
"UUID",
"$",
"executionId",
",",
"string",
"$",
"handlerType",
",",
"$",
"data",
",",
"?",
"\\",
"DateTimeImmutable",
"$",
"runAt",
"=",
"null",
")",
":",
"?",
"JobInterface",
"{",
"if",
"(",
"$",
"this",
"->",
... | Schedule a job for execution.
This method will not cause an error in case of a missing job executor!
@param UUID $executionId Target execution being used by the job.
@param string $handlerType The name of the job handler.
@param mixed $data Arbitrary data to be passed to the job handler.
@param \DateTimeImmutable $ru... | [
"Schedule",
"a",
"job",
"for",
"execution",
"."
] | 49ff924fa97e0bbe1b74e914393b22760dcf7281 | https://github.com/koolkode/bpmn/blob/49ff924fa97e0bbe1b74e914393b22760dcf7281/src/Engine/ProcessEngine.php#L218-L223 |
33,327 | koolkode/bpmn | migration/Version20150212110141.php | Version20150212110141.down | public function down()
{
$def = $this->table('#__bpmn_process_definition');
$def->removeColumn('resource_id');
$def->update();
$subscription = $this->table('#__bpmn_event_subscription');
$subscription->removeColumn('job_id');
$subscription->removeColumn('boun... | php | public function down()
{
$def = $this->table('#__bpmn_process_definition');
$def->removeColumn('resource_id');
$def->update();
$subscription = $this->table('#__bpmn_event_subscription');
$subscription->removeColumn('job_id');
$subscription->removeColumn('boun... | [
"public",
"function",
"down",
"(",
")",
"{",
"$",
"def",
"=",
"$",
"this",
"->",
"table",
"(",
"'#__bpmn_process_definition'",
")",
";",
"$",
"def",
"->",
"removeColumn",
"(",
"'resource_id'",
")",
";",
"$",
"def",
"->",
"update",
"(",
")",
";",
"$",
... | Migrate down. | [
"Migrate",
"down",
"."
] | 49ff924fa97e0bbe1b74e914393b22760dcf7281 | https://github.com/koolkode/bpmn/blob/49ff924fa97e0bbe1b74e914393b22760dcf7281/migration/Version20150212110141.php#L64-L76 |
33,328 | koolkode/bpmn | src/Job/Scheduler/AbstractJobScheduler.php | AbstractJobScheduler.markJobAsScheduled | protected function markJobAsScheduled(Job $job, ?string $externalId = null): void
{
$stmt = $this->engine->prepareQuery("UPDATE `#__bpmn_job` SET `scheduled_at` = :scheduled, `external_id` = :ex WHERE `id` = :id");
$stmt->bindValue('scheduled', \time());
$stmt->bindValue('ex', $externalId);
... | php | protected function markJobAsScheduled(Job $job, ?string $externalId = null): void
{
$stmt = $this->engine->prepareQuery("UPDATE `#__bpmn_job` SET `scheduled_at` = :scheduled, `external_id` = :ex WHERE `id` = :id");
$stmt->bindValue('scheduled', \time());
$stmt->bindValue('ex', $externalId);
... | [
"protected",
"function",
"markJobAsScheduled",
"(",
"Job",
"$",
"job",
",",
"?",
"string",
"$",
"externalId",
"=",
"null",
")",
":",
"void",
"{",
"$",
"stmt",
"=",
"$",
"this",
"->",
"engine",
"->",
"prepareQuery",
"(",
"\"UPDATE `#__bpmn_job` SET `scheduled_a... | Marks the job is being scheduled by writing a timestamp to the DB.
@param Job $job | [
"Marks",
"the",
"job",
"is",
"being",
"scheduled",
"by",
"writing",
"a",
"timestamp",
"to",
"the",
"DB",
"."
] | 49ff924fa97e0bbe1b74e914393b22760dcf7281 | https://github.com/koolkode/bpmn/blob/49ff924fa97e0bbe1b74e914393b22760dcf7281/src/Job/Scheduler/AbstractJobScheduler.php#L41-L48 |
33,329 | koolkode/bpmn | src/Engine/AbstractScopeActivity.php | AbstractScopeActivity.interrupt | public function interrupt(VirtualExecution $execution, ?array $transitions = null): void
{
$this->leave($execution, $transitions, true);
} | php | public function interrupt(VirtualExecution $execution, ?array $transitions = null): void
{
$this->leave($execution, $transitions, true);
} | [
"public",
"function",
"interrupt",
"(",
"VirtualExecution",
"$",
"execution",
",",
"?",
"array",
"$",
"transitions",
"=",
"null",
")",
":",
"void",
"{",
"$",
"this",
"->",
"leave",
"(",
"$",
"execution",
",",
"$",
"transitions",
",",
"true",
")",
";",
... | Interrupt the scope activity. | [
"Interrupt",
"the",
"scope",
"activity",
"."
] | 49ff924fa97e0bbe1b74e914393b22760dcf7281 | https://github.com/koolkode/bpmn/blob/49ff924fa97e0bbe1b74e914393b22760dcf7281/src/Engine/AbstractScopeActivity.php#L88-L91 |
33,330 | koolkode/bpmn | src/Engine/AbstractScopeActivity.php | AbstractScopeActivity.leaveConcurrent | public function leaveConcurrent(VirtualExecution $execution, ?Node $node = null, ?array $transitions = null): VirtualExecution
{
$root = $execution->getScope();
$parent = $root->getParentExecution();
$exec = $parent->createExecution(true);
$exec->setNode(($node === null) ? $... | php | public function leaveConcurrent(VirtualExecution $execution, ?Node $node = null, ?array $transitions = null): VirtualExecution
{
$root = $execution->getScope();
$parent = $root->getParentExecution();
$exec = $parent->createExecution(true);
$exec->setNode(($node === null) ? $... | [
"public",
"function",
"leaveConcurrent",
"(",
"VirtualExecution",
"$",
"execution",
",",
"?",
"Node",
"$",
"node",
"=",
"null",
",",
"?",
"array",
"$",
"transitions",
"=",
"null",
")",
":",
"VirtualExecution",
"{",
"$",
"root",
"=",
"$",
"execution",
"->",... | Create a new execution concurrent to the given execution and have it take the given transitions.
If the given execution is concurrent this method will create a new child execution from the parent execution.
Otherwise a new concurrent root will be introduced as parent of the given execution. | [
"Create",
"a",
"new",
"execution",
"concurrent",
"to",
"the",
"given",
"execution",
"and",
"have",
"it",
"take",
"the",
"given",
"transitions",
"."
] | 49ff924fa97e0bbe1b74e914393b22760dcf7281 | https://github.com/koolkode/bpmn/blob/49ff924fa97e0bbe1b74e914393b22760dcf7281/src/Engine/AbstractScopeActivity.php#L129-L144 |
33,331 | koolkode/bpmn | src/Engine/AbstractScopeActivity.php | AbstractScopeActivity.findAttachedBoundaryActivities | public function findAttachedBoundaryActivities(VirtualExecution $execution): array
{
$model = $execution->getProcessModel();
$activities = [];
foreach ($model->findNodes() as $node) {
$behavior = $node->getBehavior();
if ($behavior instanceof Abs... | php | public function findAttachedBoundaryActivities(VirtualExecution $execution): array
{
$model = $execution->getProcessModel();
$activities = [];
foreach ($model->findNodes() as $node) {
$behavior = $node->getBehavior();
if ($behavior instanceof Abs... | [
"public",
"function",
"findAttachedBoundaryActivities",
"(",
"VirtualExecution",
"$",
"execution",
")",
":",
"array",
"{",
"$",
"model",
"=",
"$",
"execution",
"->",
"getProcessModel",
"(",
")",
";",
"$",
"activities",
"=",
"[",
"]",
";",
"foreach",
"(",
"$"... | Collect all boundary events connected to the activity of the given execution. | [
"Collect",
"all",
"boundary",
"events",
"connected",
"to",
"the",
"activity",
"of",
"the",
"given",
"execution",
"."
] | 49ff924fa97e0bbe1b74e914393b22760dcf7281 | https://github.com/koolkode/bpmn/blob/49ff924fa97e0bbe1b74e914393b22760dcf7281/src/Engine/AbstractScopeActivity.php#L149-L165 |
33,332 | koolkode/bpmn | src/Runtime/Command/AbstractCreateSubscriptionCommand.php | AbstractCreateSubscriptionCommand.createSubscription | protected function createSubscription(ProcessEngine $engine, ?Job $job = null): void
{
$execution = $engine->findExecution($this->executionId);
$nodeId = ($this->nodeId === null) ? null : $execution->getProcessModel()->findNode($this->nodeId)->getId();
$data = [
'id' => ... | php | protected function createSubscription(ProcessEngine $engine, ?Job $job = null): void
{
$execution = $engine->findExecution($this->executionId);
$nodeId = ($this->nodeId === null) ? null : $execution->getProcessModel()->findNode($this->nodeId)->getId();
$data = [
'id' => ... | [
"protected",
"function",
"createSubscription",
"(",
"ProcessEngine",
"$",
"engine",
",",
"?",
"Job",
"$",
"job",
"=",
"null",
")",
":",
"void",
"{",
"$",
"execution",
"=",
"$",
"engine",
"->",
"findExecution",
"(",
"$",
"this",
"->",
"executionId",
")",
... | Create an event subscription entry in the DB. | [
"Create",
"an",
"event",
"subscription",
"entry",
"in",
"the",
"DB",
"."
] | 49ff924fa97e0bbe1b74e914393b22760dcf7281 | https://github.com/koolkode/bpmn/blob/49ff924fa97e0bbe1b74e914393b22760dcf7281/src/Runtime/Command/AbstractCreateSubscriptionCommand.php#L96-L118 |
33,333 | koolkode/bpmn | src/Engine/AbstractActivity.php | AbstractActivity.leave | public function leave(VirtualExecution $execution, ?array $transitions = null): void
{
$execution->getEngine()->notify(new ActivityCompletedEvent($execution->getNode()->getId(), $execution, $execution->getEngine()));
$this->clearEventSubscriptions($execution, $execution->getNode()->getId())... | php | public function leave(VirtualExecution $execution, ?array $transitions = null): void
{
$execution->getEngine()->notify(new ActivityCompletedEvent($execution->getNode()->getId(), $execution, $execution->getEngine()));
$this->clearEventSubscriptions($execution, $execution->getNode()->getId())... | [
"public",
"function",
"leave",
"(",
"VirtualExecution",
"$",
"execution",
",",
"?",
"array",
"$",
"transitions",
"=",
"null",
")",
":",
"void",
"{",
"$",
"execution",
"->",
"getEngine",
"(",
")",
"->",
"notify",
"(",
"new",
"ActivityCompletedEvent",
"(",
"... | Have the given execution leave the activity. | [
"Have",
"the",
"given",
"execution",
"leave",
"the",
"activity",
"."
] | 49ff924fa97e0bbe1b74e914393b22760dcf7281 | https://github.com/koolkode/bpmn/blob/49ff924fa97e0bbe1b74e914393b22760dcf7281/src/Engine/AbstractActivity.php#L133-L140 |
33,334 | koolkode/bpmn | src/Engine/AbstractActivity.php | AbstractActivity.passVariablesToExecution | protected function passVariablesToExecution(VirtualExecution $execution, array $variables): void
{
foreach ($variables as $k => $v) {
$execution->setVariable($k, $v);
}
} | php | protected function passVariablesToExecution(VirtualExecution $execution, array $variables): void
{
foreach ($variables as $k => $v) {
$execution->setVariable($k, $v);
}
} | [
"protected",
"function",
"passVariablesToExecution",
"(",
"VirtualExecution",
"$",
"execution",
",",
"array",
"$",
"variables",
")",
":",
"void",
"{",
"foreach",
"(",
"$",
"variables",
"as",
"$",
"k",
"=>",
"$",
"v",
")",
"{",
"$",
"execution",
"->",
"setV... | Pass all variables given to the execution setting them in the executions's scope. | [
"Pass",
"all",
"variables",
"given",
"to",
"the",
"execution",
"setting",
"them",
"in",
"the",
"executions",
"s",
"scope",
"."
] | 49ff924fa97e0bbe1b74e914393b22760dcf7281 | https://github.com/koolkode/bpmn/blob/49ff924fa97e0bbe1b74e914393b22760dcf7281/src/Engine/AbstractActivity.php#L145-L150 |
33,335 | koolkode/bpmn | src/Engine/AbstractActivity.php | AbstractActivity.delegateSignal | protected function delegateSignal(VirtualExecution $execution, ?string $signal, array $variables, array $delegation): bool
{
if (empty($delegation['nodeId'])) {
return false;
}
$node = $execution->getProcessModel()->findNode($delegation['nodeId']);
$exec... | php | protected function delegateSignal(VirtualExecution $execution, ?string $signal, array $variables, array $delegation): bool
{
if (empty($delegation['nodeId'])) {
return false;
}
$node = $execution->getProcessModel()->findNode($delegation['nodeId']);
$exec... | [
"protected",
"function",
"delegateSignal",
"(",
"VirtualExecution",
"$",
"execution",
",",
"?",
"string",
"$",
"signal",
",",
"array",
"$",
"variables",
",",
"array",
"$",
"delegation",
")",
":",
"bool",
"{",
"if",
"(",
"empty",
"(",
"$",
"delegation",
"["... | Delegate signal to a target node using the same execution.
@param VirtualExecution $execution
@param string $signal
@param array $variables
@param array $delegation
@return boolean Returns true if the signal could be delegated. | [
"Delegate",
"signal",
"to",
"a",
"target",
"node",
"using",
"the",
"same",
"execution",
"."
] | 49ff924fa97e0bbe1b74e914393b22760dcf7281 | https://github.com/koolkode/bpmn/blob/49ff924fa97e0bbe1b74e914393b22760dcf7281/src/Engine/AbstractActivity.php#L161-L180 |
33,336 | koolkode/bpmn | src/Repository/DeploymentBuilder.php | DeploymentBuilder.addExtensions | public function addExtensions($extensions): self
{
$this->fileExtensions = \array_unique(\array_merge($this->fileExtensions, \array_map('strtolower', (array) $extensions)));
return $this;
} | php | public function addExtensions($extensions): self
{
$this->fileExtensions = \array_unique(\array_merge($this->fileExtensions, \array_map('strtolower', (array) $extensions)));
return $this;
} | [
"public",
"function",
"addExtensions",
"(",
"$",
"extensions",
")",
":",
"self",
"{",
"$",
"this",
"->",
"fileExtensions",
"=",
"\\",
"array_unique",
"(",
"\\",
"array_merge",
"(",
"$",
"this",
"->",
"fileExtensions",
",",
"\\",
"array_map",
"(",
"'strtolowe... | Add a file extension that shoul be parsed for BPMN 2.0 process definitions.
The deployment mechanism will parse ".bpmn" files by default. | [
"Add",
"a",
"file",
"extension",
"that",
"shoul",
"be",
"parsed",
"for",
"BPMN",
"2",
".",
"0",
"process",
"definitions",
"."
] | 49ff924fa97e0bbe1b74e914393b22760dcf7281 | https://github.com/koolkode/bpmn/blob/49ff924fa97e0bbe1b74e914393b22760dcf7281/src/Repository/DeploymentBuilder.php#L60-L65 |
33,337 | koolkode/bpmn | src/Repository/DeploymentBuilder.php | DeploymentBuilder.isProcessResource | public function isProcessResource(string $name): bool
{
return \in_array(\strtolower(\pathinfo($name, \PATHINFO_EXTENSION)), $this->fileExtensions);
} | php | public function isProcessResource(string $name): bool
{
return \in_array(\strtolower(\pathinfo($name, \PATHINFO_EXTENSION)), $this->fileExtensions);
} | [
"public",
"function",
"isProcessResource",
"(",
"string",
"$",
"name",
")",
":",
"bool",
"{",
"return",
"\\",
"in_array",
"(",
"\\",
"strtolower",
"(",
"\\",
"pathinfo",
"(",
"$",
"name",
",",
"\\",
"PATHINFO_EXTENSION",
")",
")",
",",
"$",
"this",
"->",... | Check if the given file will be parsed for BPMN 2.0 process definitions. | [
"Check",
"if",
"the",
"given",
"file",
"will",
"be",
"parsed",
"for",
"BPMN",
"2",
".",
"0",
"process",
"definitions",
"."
] | 49ff924fa97e0bbe1b74e914393b22760dcf7281 | https://github.com/koolkode/bpmn/blob/49ff924fa97e0bbe1b74e914393b22760dcf7281/src/Repository/DeploymentBuilder.php#L70-L73 |
33,338 | koolkode/bpmn | src/Repository/DeploymentBuilder.php | DeploymentBuilder.addResource | public function addResource(string $name, $resource): self
{
if ($resource instanceof StreamInterface) {
$in = $resource;
} elseif (\is_resource($resource)) {
$in = new ResourceInputStream($resource);
} else {
$resource = (string) $resource;
... | php | public function addResource(string $name, $resource): self
{
if ($resource instanceof StreamInterface) {
$in = $resource;
} elseif (\is_resource($resource)) {
$in = new ResourceInputStream($resource);
} else {
$resource = (string) $resource;
... | [
"public",
"function",
"addResource",
"(",
"string",
"$",
"name",
",",
"$",
"resource",
")",
":",
"self",
"{",
"if",
"(",
"$",
"resource",
"instanceof",
"StreamInterface",
")",
"{",
"$",
"in",
"=",
"$",
"resource",
";",
"}",
"elseif",
"(",
"\\",
"is_res... | Add a resource to the deployment.
@param string $name Local path and filename of the resource within the deployment.
@param mixed $resource Deployable resource (file), that can be loaded using a stream. | [
"Add",
"a",
"resource",
"to",
"the",
"deployment",
"."
] | 49ff924fa97e0bbe1b74e914393b22760dcf7281 | https://github.com/koolkode/bpmn/blob/49ff924fa97e0bbe1b74e914393b22760dcf7281/src/Repository/DeploymentBuilder.php#L81-L100 |
33,339 | koolkode/bpmn | src/Repository/DeploymentBuilder.php | DeploymentBuilder.addArchive | public function addArchive(string $file): self
{
if (!\is_file($file)) {
throw new \InvalidArgumentException(\sprintf('Archive not found: "%s"', $file));
}
if (!\is_readable($file)) {
throw new \RuntimeException(\sprintf('Archive not readable: "%s"', $file));... | php | public function addArchive(string $file): self
{
if (!\is_file($file)) {
throw new \InvalidArgumentException(\sprintf('Archive not found: "%s"', $file));
}
if (!\is_readable($file)) {
throw new \RuntimeException(\sprintf('Archive not readable: "%s"', $file));... | [
"public",
"function",
"addArchive",
"(",
"string",
"$",
"file",
")",
":",
"self",
"{",
"if",
"(",
"!",
"\\",
"is_file",
"(",
"$",
"file",
")",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"\\",
"sprintf",
"(",
"'Archive not found: \"%s\... | Add a ZIP archives file contents to the deployment.
@throws \InvalidArgumentException When the given archive could not be found.
@throws \RuntimeException When the given archive could not be read. | [
"Add",
"a",
"ZIP",
"archives",
"file",
"contents",
"to",
"the",
"deployment",
"."
] | 49ff924fa97e0bbe1b74e914393b22760dcf7281 | https://github.com/koolkode/bpmn/blob/49ff924fa97e0bbe1b74e914393b22760dcf7281/src/Repository/DeploymentBuilder.php#L108-L153 |
33,340 | koolkode/bpmn | src/Repository/DeploymentBuilder.php | DeploymentBuilder.collectFiles | protected function collectFiles(string $dir, string $basePath): array
{
$files = [];
$dh = \opendir($dir);
try {
while (false !== ($entry = \readdir($dh))) {
if ($entry == '.' || $entry == '..') {
continue;
}
... | php | protected function collectFiles(string $dir, string $basePath): array
{
$files = [];
$dh = \opendir($dir);
try {
while (false !== ($entry = \readdir($dh))) {
if ($entry == '.' || $entry == '..') {
continue;
}
... | [
"protected",
"function",
"collectFiles",
"(",
"string",
"$",
"dir",
",",
"string",
"$",
"basePath",
")",
":",
"array",
"{",
"$",
"files",
"=",
"[",
"]",
";",
"$",
"dh",
"=",
"\\",
"opendir",
"(",
"$",
"dir",
")",
";",
"try",
"{",
"while",
"(",
"f... | Collect all files from the directory, uses recursion to grab files from sub-directories. | [
"Collect",
"all",
"files",
"from",
"the",
"directory",
"uses",
"recursion",
"to",
"grab",
"files",
"from",
"sub",
"-",
"directories",
"."
] | 49ff924fa97e0bbe1b74e914393b22760dcf7281 | https://github.com/koolkode/bpmn/blob/49ff924fa97e0bbe1b74e914393b22760dcf7281/src/Repository/DeploymentBuilder.php#L183-L209 |
33,341 | koolkode/bpmn | src/Engine/ExecutionInterceptorChain.php | ExecutionInterceptorChain.performExecution | public function performExecution()
{
if (!$this->interceptors->isEmpty()) {
return $this->interceptors->extract()->interceptExecution($this, $this->executionDepth);
}
return ($this->callback)();
} | php | public function performExecution()
{
if (!$this->interceptors->isEmpty()) {
return $this->interceptors->extract()->interceptExecution($this, $this->executionDepth);
}
return ($this->callback)();
} | [
"public",
"function",
"performExecution",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"interceptors",
"->",
"isEmpty",
"(",
")",
")",
"{",
"return",
"$",
"this",
"->",
"interceptors",
"->",
"extract",
"(",
")",
"->",
"interceptExecution",
"(",
"$",... | Delegate to the next interceptor or actually perform the queued execution.
@return mixed The result of the command execution. | [
"Delegate",
"to",
"the",
"next",
"interceptor",
"or",
"actually",
"perform",
"the",
"queued",
"execution",
"."
] | 49ff924fa97e0bbe1b74e914393b22760dcf7281 | https://github.com/koolkode/bpmn/blob/49ff924fa97e0bbe1b74e914393b22760dcf7281/src/Engine/ExecutionInterceptorChain.php#L45-L52 |
33,342 | koolkode/bpmn | src/Job/Executor/JobExecutor.php | JobExecutor.findJobHandler | protected function findJobHandler(Job $job)
{
foreach ($this->handlers as $type => $handler) {
if ($job->getHandlerType() == $type) {
return $handler;
}
}
throw new \OutOfBoundsException(\sprintf('Job handler "%s" not found for job %s', $job->... | php | protected function findJobHandler(Job $job)
{
foreach ($this->handlers as $type => $handler) {
if ($job->getHandlerType() == $type) {
return $handler;
}
}
throw new \OutOfBoundsException(\sprintf('Job handler "%s" not found for job %s', $job->... | [
"protected",
"function",
"findJobHandler",
"(",
"Job",
"$",
"job",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"handlers",
"as",
"$",
"type",
"=>",
"$",
"handler",
")",
"{",
"if",
"(",
"$",
"job",
"->",
"getHandlerType",
"(",
")",
"==",
"$",
"type",... | Find a handler for the given job by matching the handler type value of the job.
@param Job $job
@return JobHandlerInterface
@throws \OutOfBoundsException When no handler for the job could be resolved. | [
"Find",
"a",
"handler",
"for",
"the",
"given",
"job",
"by",
"matching",
"the",
"handler",
"type",
"value",
"of",
"the",
"job",
"."
] | 49ff924fa97e0bbe1b74e914393b22760dcf7281 | https://github.com/koolkode/bpmn/blob/49ff924fa97e0bbe1b74e914393b22760dcf7281/src/Job/Executor/JobExecutor.php#L291-L300 |
33,343 | LaravelCollective/iron-queue | src/IronQueueServiceProvider.php | IronQueueServiceProvider.registerIronRequestBinder | protected function registerIronRequestBinder()
{
$this->app->rebinding('request', function ($app, $request) {
if ($app['queue']->connected('iron')) {
$app['queue']->connection('iron')->setRequest($request);
}
});
} | php | protected function registerIronRequestBinder()
{
$this->app->rebinding('request', function ($app, $request) {
if ($app['queue']->connected('iron')) {
$app['queue']->connection('iron')->setRequest($request);
}
});
} | [
"protected",
"function",
"registerIronRequestBinder",
"(",
")",
"{",
"$",
"this",
"->",
"app",
"->",
"rebinding",
"(",
"'request'",
",",
"function",
"(",
"$",
"app",
",",
"$",
"request",
")",
"{",
"if",
"(",
"$",
"app",
"[",
"'queue'",
"]",
"->",
"conn... | Register the request rebinding event for the Iron queue.
@return void | [
"Register",
"the",
"request",
"rebinding",
"event",
"for",
"the",
"Iron",
"queue",
"."
] | a873575da0ebec506db3631b9835074e06543060 | https://github.com/LaravelCollective/iron-queue/blob/a873575da0ebec506db3631b9835074e06543060/src/IronQueueServiceProvider.php#L28-L35 |
33,344 | LaravelCollective/iron-queue | src/IronQueue.php | IronQueue.deleteMessage | public function deleteMessage($queue, $id, $reservation_id)
{
$this->iron->deleteMessage($queue, $id, $reservation_id);
} | php | public function deleteMessage($queue, $id, $reservation_id)
{
$this->iron->deleteMessage($queue, $id, $reservation_id);
} | [
"public",
"function",
"deleteMessage",
"(",
"$",
"queue",
",",
"$",
"id",
",",
"$",
"reservation_id",
")",
"{",
"$",
"this",
"->",
"iron",
"->",
"deleteMessage",
"(",
"$",
"queue",
",",
"$",
"id",
",",
"$",
"reservation_id",
")",
";",
"}"
] | Delete a message from the Iron queue.
@param string $queue
@param string $id
@param string $reservation_id
@return void | [
"Delete",
"a",
"message",
"from",
"the",
"Iron",
"queue",
"."
] | a873575da0ebec506db3631b9835074e06543060 | https://github.com/LaravelCollective/iron-queue/blob/a873575da0ebec506db3631b9835074e06543060/src/IronQueue.php#L167-L170 |
33,345 | brainworxx/kreXX | src/Analyse/Callback/Iterate/ThroughGetter.php | ThroughGetter.callMe | public function callMe()
{
$output = $this->dispatchStartEvent();
$this->parameters[static::CURRENT_PREFIX] = 'get';
$output .= $this->goThroughMethodList($this->parameters[static::PARAM_NORMAL_GETTER]);
$this->parameters[static::CURRENT_PREFIX] = 'is';
$output .= $this->go... | php | public function callMe()
{
$output = $this->dispatchStartEvent();
$this->parameters[static::CURRENT_PREFIX] = 'get';
$output .= $this->goThroughMethodList($this->parameters[static::PARAM_NORMAL_GETTER]);
$this->parameters[static::CURRENT_PREFIX] = 'is';
$output .= $this->go... | [
"public",
"function",
"callMe",
"(",
")",
"{",
"$",
"output",
"=",
"$",
"this",
"->",
"dispatchStartEvent",
"(",
")",
";",
"$",
"this",
"->",
"parameters",
"[",
"static",
"::",
"CURRENT_PREFIX",
"]",
"=",
"'get'",
";",
"$",
"output",
".=",
"$",
"this",... | Try to get the possible result of all getter methods.
@return string
The generated markup. | [
"Try",
"to",
"get",
"the",
"possible",
"result",
"of",
"all",
"getter",
"methods",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Analyse/Callback/Iterate/ThroughGetter.php#L107-L119 |
33,346 | brainworxx/kreXX | src/Analyse/Callback/Iterate/ThroughGetter.php | ThroughGetter.goThroughMethodList | protected function goThroughMethodList(array $methodList)
{
$output = '';
/** @var \ReflectionMethod $reflectionMethod */
foreach ($methodList as $reflectionMethod) {
// Back to level 0, we reset the deep counter.
$this->deep = 0;
// Now we have three po... | php | protected function goThroughMethodList(array $methodList)
{
$output = '';
/** @var \ReflectionMethod $reflectionMethod */
foreach ($methodList as $reflectionMethod) {
// Back to level 0, we reset the deep counter.
$this->deep = 0;
// Now we have three po... | [
"protected",
"function",
"goThroughMethodList",
"(",
"array",
"$",
"methodList",
")",
"{",
"$",
"output",
"=",
"''",
";",
"/** @var \\ReflectionMethod $reflectionMethod */",
"foreach",
"(",
"$",
"methodList",
"as",
"$",
"reflectionMethod",
")",
"{",
"// Back to level ... | Iterating through a list of reflection methods.
@param array $methodList
The list of methods we are going through, consisting of \ReflectionMethod
@return string
The generated DOM. | [
"Iterating",
"through",
"a",
"list",
"of",
"reflection",
"methods",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Analyse/Callback/Iterate/ThroughGetter.php#L130-L171 |
33,347 | brainworxx/kreXX | src/Analyse/Callback/Iterate/ThroughGetter.php | ThroughGetter.retrievePropertyValue | protected function retrievePropertyValue(\ReflectionMethod $reflectionMethod, Model $model)
{
/** @var \Brainworxx\Krexx\Service\Reflection\ReflectionClass $reflectionClass */
$reflectionClass = $this->parameters[static::PARAM_REF];
$refProp = $this->getReflectionProperty($reflectionClass, $... | php | protected function retrievePropertyValue(\ReflectionMethod $reflectionMethod, Model $model)
{
/** @var \Brainworxx\Krexx\Service\Reflection\ReflectionClass $reflectionClass */
$reflectionClass = $this->parameters[static::PARAM_REF];
$refProp = $this->getReflectionProperty($reflectionClass, $... | [
"protected",
"function",
"retrievePropertyValue",
"(",
"\\",
"ReflectionMethod",
"$",
"reflectionMethod",
",",
"Model",
"$",
"model",
")",
"{",
"/** @var \\Brainworxx\\Krexx\\Service\\Reflection\\ReflectionClass $reflectionClass */",
"$",
"reflectionClass",
"=",
"$",
"this",
... | Try to get a possible return value and render the result.
@param \ReflectionMethod $reflectionMethod
A reflection ot the method we are analysing
@param Model $model
The model so far.
@return string
The rendered markup. | [
"Try",
"to",
"get",
"a",
"possible",
"return",
"value",
"and",
"render",
"the",
"result",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Analyse/Callback/Iterate/ThroughGetter.php#L184-L230 |
33,348 | brainworxx/kreXX | src/Analyse/Callback/Iterate/ThroughGetter.php | ThroughGetter.preparePropertyName | protected function preparePropertyName(\ReflectionMethod $reflectionMethod)
{
$currentPrefix = $this->parameters[static::CURRENT_PREFIX];
// Get the name and remove the 'get' . . .
$getterName = $reflectionMethod->getName();
if (strpos($getterName, $currentPrefix) === 0) {
... | php | protected function preparePropertyName(\ReflectionMethod $reflectionMethod)
{
$currentPrefix = $this->parameters[static::CURRENT_PREFIX];
// Get the name and remove the 'get' . . .
$getterName = $reflectionMethod->getName();
if (strpos($getterName, $currentPrefix) === 0) {
... | [
"protected",
"function",
"preparePropertyName",
"(",
"\\",
"ReflectionMethod",
"$",
"reflectionMethod",
")",
"{",
"$",
"currentPrefix",
"=",
"$",
"this",
"->",
"parameters",
"[",
"static",
"::",
"CURRENT_PREFIX",
"]",
";",
"// Get the name and remove the 'get' . . .",
... | Get a first impression ot the possible property name for the getter.
@param \ReflectionMethod $reflectionMethod
A reflection of the getter method we are analysing.
@return string
The first impression of the property name. | [
"Get",
"a",
"first",
"impression",
"ot",
"the",
"possible",
"property",
"name",
"for",
"the",
"getter",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Analyse/Callback/Iterate/ThroughGetter.php#L329-L346 |
33,349 | brainworxx/kreXX | src/Analyse/Callback/Iterate/ThroughGetter.php | ThroughGetter.findIt | protected function findIt(array $searchArray, $haystack)
{
// Defining our regex.
$regex = '/(?<=###0###).*?(?=###1###)/';
// Regex escaping our search stuff
$searchArray[0] = $this->regexEscaping($searchArray[0]);
$searchArray[1] = $this->regexEscaping($searchArray[1]);
... | php | protected function findIt(array $searchArray, $haystack)
{
// Defining our regex.
$regex = '/(?<=###0###).*?(?=###1###)/';
// Regex escaping our search stuff
$searchArray[0] = $this->regexEscaping($searchArray[0]);
$searchArray[1] = $this->regexEscaping($searchArray[1]);
... | [
"protected",
"function",
"findIt",
"(",
"array",
"$",
"searchArray",
",",
"$",
"haystack",
")",
"{",
"// Defining our regex.",
"$",
"regex",
"=",
"'/(?<=###0###).*?(?=###1###)/'",
";",
"// Regex escaping our search stuff",
"$",
"searchArray",
"[",
"0",
"]",
"=",
"$"... | Searching for stuff via regex.
Yay, dynamic regex stuff for fun and profit!
@param array $searchArray
The search definition.
@param string $haystack
The haystack, obviously.
@return array
The findings. | [
"Searching",
"for",
"stuff",
"via",
"regex",
".",
"Yay",
"dynamic",
"regex",
"stuff",
"for",
"fun",
"and",
"profit!"
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Analyse/Callback/Iterate/ThroughGetter.php#L432-L451 |
33,350 | silverorange/swat | Swat/SwatAccordion.php | SwatAccordion.getInlineJavaScript | protected function getInlineJavaScript()
{
$javascript = sprintf(
"var %1\$s_obj = new %2\$s('%1\$s', %3\$s);",
$this->id,
$this->getJavascriptClassName(),
$this->animate ? 'true' : 'false'
);
$javascript .= sprintf(
"\n%s_obj.anim... | php | protected function getInlineJavaScript()
{
$javascript = sprintf(
"var %1\$s_obj = new %2\$s('%1\$s', %3\$s);",
$this->id,
$this->getJavascriptClassName(),
$this->animate ? 'true' : 'false'
);
$javascript .= sprintf(
"\n%s_obj.anim... | [
"protected",
"function",
"getInlineJavaScript",
"(",
")",
"{",
"$",
"javascript",
"=",
"sprintf",
"(",
"\"var %1\\$s_obj = new %2\\$s('%1\\$s', %3\\$s);\"",
",",
"$",
"this",
"->",
"id",
",",
"$",
"this",
"->",
"getJavascriptClassName",
"(",
")",
",",
"$",
"this",... | Gets the inline JavaScript used by this accordion view
@return string the inline JavaScript used by this accordion view. | [
"Gets",
"the",
"inline",
"JavaScript",
"used",
"by",
"this",
"accordion",
"view"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatAccordion.php#L138-L160 |
33,351 | brainworxx/kreXX | src/Service/Misc/Encoding.php | Encoding.encodeString | public function encodeString($data, $code = false)
{
// We will not encode an empty string.
if ($data === '') {
return '';
}
// Initialize the encoding configuration.
if ($code === true) {
// We encoding @, because we need them for our chunks.
... | php | public function encodeString($data, $code = false)
{
// We will not encode an empty string.
if ($data === '') {
return '';
}
// Initialize the encoding configuration.
if ($code === true) {
// We encoding @, because we need them for our chunks.
... | [
"public",
"function",
"encodeString",
"(",
"$",
"data",
",",
"$",
"code",
"=",
"false",
")",
"{",
"// We will not encode an empty string.",
"if",
"(",
"$",
"data",
"===",
"''",
")",
"{",
"return",
"''",
";",
"}",
"// Initialize the encoding configuration.",
"if"... | Sanitizes a string, by completely encoding it.
Should work with mixed encoding.
@param string $data
The data which needs to be sanitized.
@param boolean $code
Do we need to format the string as code?
@return string
The encoded string. | [
"Sanitizes",
"a",
"string",
"by",
"completely",
"encoding",
"it",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Service/Misc/Encoding.php#L151-L206 |
33,352 | brainworxx/kreXX | src/Service/Misc/Encoding.php | Encoding.mbStrLen | public function mbStrLen($string, $encoding = null)
{
// Meh, the original mb_strlen interprets a null here as an empty string.
if ($encoding === null) {
return mb_strlen($string);
}
return mb_strlen($string, $encoding);
} | php | public function mbStrLen($string, $encoding = null)
{
// Meh, the original mb_strlen interprets a null here as an empty string.
if ($encoding === null) {
return mb_strlen($string);
}
return mb_strlen($string, $encoding);
} | [
"public",
"function",
"mbStrLen",
"(",
"$",
"string",
",",
"$",
"encoding",
"=",
"null",
")",
"{",
"// Meh, the original mb_strlen interprets a null here as an empty string.",
"if",
"(",
"$",
"encoding",
"===",
"null",
")",
"{",
"return",
"mb_strlen",
"(",
"$",
"s... | Wrapper around mb_strlen, to circumvent a not installed
mb_string php extension.
@param string $string
The string we want to analyse
@param string $encoding
The known encoding of the string, if known.
@return integer
The result. | [
"Wrapper",
"around",
"mb_strlen",
"to",
"circumvent",
"a",
"not",
"installed",
"mb_string",
"php",
"extension",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Service/Misc/Encoding.php#L239-L246 |
33,353 | silverorange/swat | Swat/SwatCalendar.php | SwatCalendar.display | public function display()
{
if (!$this->visible) {
return;
}
parent::display();
$container_div_tag = new SwatHtmlTag('div');
$container_div_tag->id = $this->id;
$container_div_tag->class = $this->getCSSClassString();
$container_div_tag->open();
... | php | public function display()
{
if (!$this->visible) {
return;
}
parent::display();
$container_div_tag = new SwatHtmlTag('div');
$container_div_tag->id = $this->id;
$container_div_tag->class = $this->getCSSClassString();
$container_div_tag->open();
... | [
"public",
"function",
"display",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"visible",
")",
"{",
"return",
";",
"}",
"parent",
"::",
"display",
"(",
")",
";",
"$",
"container_div_tag",
"=",
"new",
"SwatHtmlTag",
"(",
"'div'",
")",
";",
"$",
... | Displays this calendar widget | [
"Displays",
"this",
"calendar",
"widget"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatCalendar.php#L63-L95 |
33,354 | silverorange/swat | Swat/SwatCalendar.php | SwatCalendar.getInlineJavaScript | protected function getInlineJavaScript()
{
static $shown = false;
if (!$shown) {
$javascript = $this->getInlineJavaScriptTranslations();
$shown = true;
} else {
$javascript = '';
}
if (isset($this->valid_range_start)) {
$start... | php | protected function getInlineJavaScript()
{
static $shown = false;
if (!$shown) {
$javascript = $this->getInlineJavaScriptTranslations();
$shown = true;
} else {
$javascript = '';
}
if (isset($this->valid_range_start)) {
$start... | [
"protected",
"function",
"getInlineJavaScript",
"(",
")",
"{",
"static",
"$",
"shown",
"=",
"false",
";",
"if",
"(",
"!",
"$",
"shown",
")",
"{",
"$",
"javascript",
"=",
"$",
"this",
"->",
"getInlineJavaScriptTranslations",
"(",
")",
";",
"$",
"shown",
"... | Gets inline calendar JavaScript
Inline JavaScript is the majority of the calendar code. | [
"Gets",
"inline",
"calendar",
"JavaScript"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatCalendar.php#L121-L158 |
33,355 | rhoone/yii2-rhoone | Module.php | Module.bootstrapExtensions | protected function bootstrapExtensions($app)
{
$rhoone = Yii::$app->rhoone;
/* @var $rhoone \rhoone\base\Rhoone */
$extensions = $rhoone->extensions;
if (empty($extensions)) {
return 0;
}
foreach ($extensions as $id => $extension) {
if ($extens... | php | protected function bootstrapExtensions($app)
{
$rhoone = Yii::$app->rhoone;
/* @var $rhoone \rhoone\base\Rhoone */
$extensions = $rhoone->extensions;
if (empty($extensions)) {
return 0;
}
foreach ($extensions as $id => $extension) {
if ($extens... | [
"protected",
"function",
"bootstrapExtensions",
"(",
"$",
"app",
")",
"{",
"$",
"rhoone",
"=",
"Yii",
"::",
"$",
"app",
"->",
"rhoone",
";",
"/* @var $rhoone \\rhoone\\base\\Rhoone */",
"$",
"extensions",
"=",
"$",
"rhoone",
"->",
"extensions",
";",
"if",
"(",... | Bootstrap with Extensions.
@param \yii\base\Application $app
@return int | [
"Bootstrap",
"with",
"Extensions",
"."
] | f6ae90d466ea6f34bba404be0aba03e37ef369ad | https://github.com/rhoone/yii2-rhoone/blob/f6ae90d466ea6f34bba404be0aba03e37ef369ad/Module.php#L104-L145 |
33,356 | silverorange/swat | Swat/SwatSelectList.php | SwatSelectList.display | public function display()
{
$options = $this->getOptions();
if (!$this->visible || count($options) === 0) {
return;
}
SwatWidget::display();
$this->getForm()->addHiddenField($this->id . '_submitted', 1);
$select_tag = new SwatHtmlTag('select');
... | php | public function display()
{
$options = $this->getOptions();
if (!$this->visible || count($options) === 0) {
return;
}
SwatWidget::display();
$this->getForm()->addHiddenField($this->id . '_submitted', 1);
$select_tag = new SwatHtmlTag('select');
... | [
"public",
"function",
"display",
"(",
")",
"{",
"$",
"options",
"=",
"$",
"this",
"->",
"getOptions",
"(",
")",
";",
"if",
"(",
"!",
"$",
"this",
"->",
"visible",
"||",
"count",
"(",
"$",
"options",
")",
"===",
"0",
")",
"{",
"return",
";",
"}",
... | Displays this select list | [
"Displays",
"this",
"select",
"list"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatSelectList.php#L27-L61 |
33,357 | rhoone/yii2-rhoone | base/ExtensionHelperTrait.php | ExtensionHelperTrait.getModel | public static function getModel($class)
{
if ($class instanceof \rhoone\extension\Extension) {
$class = $class->className();
}
if (is_string($class)) {
return \rhoone\models\Extension::find()->where(['classname' => static::normalizeClass($class)])->one();
}
... | php | public static function getModel($class)
{
if ($class instanceof \rhoone\extension\Extension) {
$class = $class->className();
}
if (is_string($class)) {
return \rhoone\models\Extension::find()->where(['classname' => static::normalizeClass($class)])->one();
}
... | [
"public",
"static",
"function",
"getModel",
"(",
"$",
"class",
")",
"{",
"if",
"(",
"$",
"class",
"instanceof",
"\\",
"rhoone",
"\\",
"extension",
"\\",
"Extension",
")",
"{",
"$",
"class",
"=",
"$",
"class",
"->",
"className",
"(",
")",
";",
"}",
"i... | Get extension model.
@param string|\rhoone\extension\Extension|\rhoone\models\Extension $class
@return \rhoone\models\Extension | [
"Get",
"extension",
"model",
"."
] | f6ae90d466ea6f34bba404be0aba03e37ef369ad | https://github.com/rhoone/yii2-rhoone/blob/f6ae90d466ea6f34bba404be0aba03e37ef369ad/base/ExtensionHelperTrait.php#L123-L135 |
33,358 | rhoone/yii2-rhoone | base/ExtensionHelperTrait.php | ExtensionHelperTrait.validate | public static function validate($class)
{
if ($class instanceof \rhoone\extension\Extension) {
$class = $class->className();
}
if ($class instanceof \rhoone\models\Extension) {
$class = $class->classname;
}
if (!is_string($class)) {
Yii::er... | php | public static function validate($class)
{
if ($class instanceof \rhoone\extension\Extension) {
$class = $class->className();
}
if ($class instanceof \rhoone\models\Extension) {
$class = $class->classname;
}
if (!is_string($class)) {
Yii::er... | [
"public",
"static",
"function",
"validate",
"(",
"$",
"class",
")",
"{",
"if",
"(",
"$",
"class",
"instanceof",
"\\",
"rhoone",
"\\",
"extension",
"\\",
"Extension",
")",
"{",
"$",
"class",
"=",
"$",
"class",
"->",
"className",
"(",
")",
";",
"}",
"i... | Validate extension class.
@param string|\rhoone\extension\Extension|\rhoone\models\Extension $class
`string` if extension class name.
`\rhoone\extension\Extension` if extension instance.
`\rhoone\models\Extension` if extension record.
@return \rhoone\extension\Extension
@throws InvalidParamException | [
"Validate",
"extension",
"class",
"."
] | f6ae90d466ea6f34bba404be0aba03e37ef369ad | https://github.com/rhoone/yii2-rhoone/blob/f6ae90d466ea6f34bba404be0aba03e37ef369ad/base/ExtensionHelperTrait.php#L271-L289 |
33,359 | rhoone/yii2-rhoone | base/ExtensionHelperTrait.php | ExtensionHelperTrait.deregister | public static function deregister($class, $force = false)
{
$model = static::getModel($class);
if (!$model) {
throw new InvalidParamException("`$class` does not exist.");
}
if ($model->isEnabled && !$force) {
throw new InvalidParamException("Unable to remove t... | php | public static function deregister($class, $force = false)
{
$model = static::getModel($class);
if (!$model) {
throw new InvalidParamException("`$class` does not exist.");
}
if ($model->isEnabled && !$force) {
throw new InvalidParamException("Unable to remove t... | [
"public",
"static",
"function",
"deregister",
"(",
"$",
"class",
",",
"$",
"force",
"=",
"false",
")",
"{",
"$",
"model",
"=",
"static",
"::",
"getModel",
"(",
"$",
"class",
")",
";",
"if",
"(",
"!",
"$",
"model",
")",
"{",
"throw",
"new",
"Invalid... | Deregister extension.
@param string|\rhoone\extension\Extension|\rhoone\models\Extension $class
@return boolean True if extension deregistered. | [
"Deregister",
"extension",
"."
] | f6ae90d466ea6f34bba404be0aba03e37ef369ad | https://github.com/rhoone/yii2-rhoone/blob/f6ae90d466ea6f34bba404be0aba03e37ef369ad/base/ExtensionHelperTrait.php#L296-L306 |
33,360 | silverorange/swat | SwatI18N/SwatI18NLocale.php | SwatI18NLocale.get | public static function get($locale = null)
{
$locale_object = null;
if ($locale === null) {
$locale_key = self::setlocale(LC_ALL, '0');
if (array_key_exists($locale_key, self::$locales)) {
$locale_object = self::$locales[$locale_key];
}
} ... | php | public static function get($locale = null)
{
$locale_object = null;
if ($locale === null) {
$locale_key = self::setlocale(LC_ALL, '0');
if (array_key_exists($locale_key, self::$locales)) {
$locale_object = self::$locales[$locale_key];
}
} ... | [
"public",
"static",
"function",
"get",
"(",
"$",
"locale",
"=",
"null",
")",
"{",
"$",
"locale_object",
"=",
"null",
";",
"if",
"(",
"$",
"locale",
"===",
"null",
")",
"{",
"$",
"locale_key",
"=",
"self",
"::",
"setlocale",
"(",
"LC_ALL",
",",
"'0'",... | Gets a locale object
@param array|string $locale the locale identifier of this locale object.
If the locale is not valid for the current
operating system, an exception is thrown.
If no locale is specified, the current
locale is used. Multiple locale identifiers
may be specified in an array. In this case,
the first val... | [
"Gets",
"a",
"locale",
"object"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/SwatI18N/SwatI18NLocale.php#L106-L143 |
33,361 | silverorange/swat | SwatI18N/SwatI18NLocale.php | SwatI18NLocale.setlocale | public static function setlocale($category, $locale)
{
$return = false;
static $categories = array(
'LC_COLLATE' => LC_COLLATE,
'LC_CTYPE' => LC_CTYPE,
'LC_MONETARY' => LC_MONETARY,
'LC_NUMERIC' => LC_NUMERIC,
'LC_TIME' => LC_TIME,
... | php | public static function setlocale($category, $locale)
{
$return = false;
static $categories = array(
'LC_COLLATE' => LC_COLLATE,
'LC_CTYPE' => LC_CTYPE,
'LC_MONETARY' => LC_MONETARY,
'LC_NUMERIC' => LC_NUMERIC,
'LC_TIME' => LC_TIME,
... | [
"public",
"static",
"function",
"setlocale",
"(",
"$",
"category",
",",
"$",
"locale",
")",
"{",
"$",
"return",
"=",
"false",
";",
"static",
"$",
"categories",
"=",
"array",
"(",
"'LC_COLLATE'",
"=>",
"LC_COLLATE",
",",
"'LC_CTYPE'",
"=>",
"LC_CTYPE",
",",... | Sets the current locale
This is a wrapper for the system setlocale() function that provides
extra compatibility.
@param integer $category optional. The lc-type constant specifying the
category of functions affected by setting
the system locale.
@param array|string $locale the locale identifier. Use '0' to return
the ... | [
"Sets",
"the",
"current",
"locale"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/SwatI18N/SwatI18NLocale.php#L166-L200 |
33,362 | silverorange/swat | SwatI18N/SwatI18NLocale.php | SwatI18NLocale.set | public function set($category = LC_ALL)
{
$this->old_locale_by_category[$category] = self::setlocale(
$category,
'0'
);
self::setlocale($category, $this->locale);
} | php | public function set($category = LC_ALL)
{
$this->old_locale_by_category[$category] = self::setlocale(
$category,
'0'
);
self::setlocale($category, $this->locale);
} | [
"public",
"function",
"set",
"(",
"$",
"category",
"=",
"LC_ALL",
")",
"{",
"$",
"this",
"->",
"old_locale_by_category",
"[",
"$",
"category",
"]",
"=",
"self",
"::",
"setlocale",
"(",
"$",
"category",
",",
"'0'",
")",
";",
"self",
"::",
"setlocale",
"... | Sets the system locale to this locale
@param integer $category optional. The lc-type constant specifying the
category of functions affected by setting the
system locale. If not specified, defaults to
LC_ALL. | [
"Sets",
"the",
"system",
"locale",
"to",
"this",
"locale"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/SwatI18N/SwatI18NLocale.php#L213-L221 |
33,363 | silverorange/swat | SwatI18N/SwatI18NLocale.php | SwatI18NLocale.formatNumber | public function formatNumber(
$value,
$decimals = null,
array $format = array()
) {
$value = (float) $value;
$format = $this->getNumberFormat()->override($format);
if ($decimals === null) {
$decimals = $this->getFractionalPrecision($value);
}
... | php | public function formatNumber(
$value,
$decimals = null,
array $format = array()
) {
$value = (float) $value;
$format = $this->getNumberFormat()->override($format);
if ($decimals === null) {
$decimals = $this->getFractionalPrecision($value);
}
... | [
"public",
"function",
"formatNumber",
"(",
"$",
"value",
",",
"$",
"decimals",
"=",
"null",
",",
"array",
"$",
"format",
"=",
"array",
"(",
")",
")",
"{",
"$",
"value",
"=",
"(",
"float",
")",
"$",
"value",
";",
"$",
"format",
"=",
"$",
"this",
"... | Formats a numeric value for this locale
This methods uses the POSIX.2 LC_NUMERIC specification for formatting
numeric values.
Numeric values are rounded to the specified number of fractional digits
using a round-half-up rounding method (PHP's default round).
@param float $value the numeric value to format.
@param in... | [
"Formats",
"a",
"numeric",
"value",
"for",
"this",
"locale"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/SwatI18N/SwatI18NLocale.php#L562-L589 |
33,364 | silverorange/swat | SwatI18N/SwatI18NLocale.php | SwatI18NLocale.parseFloat | public function parseFloat($string)
{
$value = null;
$lc = $this->getLocaleInfo();
$string = $this->parseNegativeNotation($string);
$search = array(
$lc['thousands_sep'],
$lc['decimal_point'],
$lc['positive_sign'],
' '
);
... | php | public function parseFloat($string)
{
$value = null;
$lc = $this->getLocaleInfo();
$string = $this->parseNegativeNotation($string);
$search = array(
$lc['thousands_sep'],
$lc['decimal_point'],
$lc['positive_sign'],
' '
);
... | [
"public",
"function",
"parseFloat",
"(",
"$",
"string",
")",
"{",
"$",
"value",
"=",
"null",
";",
"$",
"lc",
"=",
"$",
"this",
"->",
"getLocaleInfo",
"(",
")",
";",
"$",
"string",
"=",
"$",
"this",
"->",
"parseNegativeNotation",
"(",
"$",
"string",
"... | Parses a numeric string formatted for this locale into a floating-point
number
Note: The number does not have to be formatted exactly correctly to be
parsed. Checking too closely how well a formatted number matches its
locale would be annoying for users. For example, '1000' should not be
rejected because it wasn't for... | [
"Parses",
"a",
"numeric",
"string",
"formatted",
"for",
"this",
"locale",
"into",
"a",
"floating",
"-",
"point",
"number"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/SwatI18N/SwatI18NLocale.php#L657-L681 |
33,365 | silverorange/swat | SwatI18N/SwatI18NLocale.php | SwatI18NLocale.parseInteger | public function parseInteger($string)
{
$value = null;
$lc = $this->getLocaleInfo();
$string = $this->parseNegativeNotation($string);
$search = array($lc['thousands_sep'], $lc['positive_sign'], ' ');
$replace = array('', '', '');
$string = str_replace($search, $r... | php | public function parseInteger($string)
{
$value = null;
$lc = $this->getLocaleInfo();
$string = $this->parseNegativeNotation($string);
$search = array($lc['thousands_sep'], $lc['positive_sign'], ' ');
$replace = array('', '', '');
$string = str_replace($search, $r... | [
"public",
"function",
"parseInteger",
"(",
"$",
"string",
")",
"{",
"$",
"value",
"=",
"null",
";",
"$",
"lc",
"=",
"$",
"this",
"->",
"getLocaleInfo",
"(",
")",
";",
"$",
"string",
"=",
"$",
"this",
"->",
"parseNegativeNotation",
"(",
"$",
"string",
... | Parses a numeric string formatted for this locale into an integer number
If the string has fractional digits, the returned integer value is
rounded according to the rounding rules for
{@link http://php.net/manual/en/function.intval.php intval()}.
Note: The number does not have to be formatted exactly correctly to be
... | [
"Parses",
"a",
"numeric",
"string",
"formatted",
"for",
"this",
"locale",
"into",
"an",
"integer",
"number"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/SwatI18N/SwatI18NLocale.php#L710-L745 |
33,366 | silverorange/swat | SwatI18N/SwatI18NLocale.php | SwatI18NLocale.detectCharacterEncoding | protected function detectCharacterEncoding()
{
$encoding = null;
if (function_exists('nl_langinfo') && is_callable('nl_langinfo')) {
$encoding = nl_langinfo(CODESET);
} else {
// try to detect encoding from locale identifier
$lc_ctype = null;
... | php | protected function detectCharacterEncoding()
{
$encoding = null;
if (function_exists('nl_langinfo') && is_callable('nl_langinfo')) {
$encoding = nl_langinfo(CODESET);
} else {
// try to detect encoding from locale identifier
$lc_ctype = null;
... | [
"protected",
"function",
"detectCharacterEncoding",
"(",
")",
"{",
"$",
"encoding",
"=",
"null",
";",
"if",
"(",
"function_exists",
"(",
"'nl_langinfo'",
")",
"&&",
"is_callable",
"(",
"'nl_langinfo'",
")",
")",
"{",
"$",
"encoding",
"=",
"nl_langinfo",
"(",
... | Detects the character encoding used by this locale
@return string the character encoding used by this locale. If the
encoding could not be detected, null is returned. | [
"Detects",
"the",
"character",
"encoding",
"used",
"by",
"this",
"locale"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/SwatI18N/SwatI18NLocale.php#L854-L890 |
33,367 | silverorange/swat | SwatI18N/SwatI18NLocale.php | SwatI18NLocale.buildNumberFormat | protected function buildNumberFormat()
{
$lc = $this->getLocaleInfo();
$format = new SwatI18NNumberFormat();
$format->decimal_separator = $lc['decimal_point'];
$format->thousands_separator = $lc['thousands_sep'];
$format->grouping = $lc['grouping'];
$this->number_f... | php | protected function buildNumberFormat()
{
$lc = $this->getLocaleInfo();
$format = new SwatI18NNumberFormat();
$format->decimal_separator = $lc['decimal_point'];
$format->thousands_separator = $lc['thousands_sep'];
$format->grouping = $lc['grouping'];
$this->number_f... | [
"protected",
"function",
"buildNumberFormat",
"(",
")",
"{",
"$",
"lc",
"=",
"$",
"this",
"->",
"getLocaleInfo",
"(",
")",
";",
"$",
"format",
"=",
"new",
"SwatI18NNumberFormat",
"(",
")",
";",
"$",
"format",
"->",
"decimal_separator",
"=",
"$",
"lc",
"[... | Builds the number format of this locale | [
"Builds",
"the",
"number",
"format",
"of",
"this",
"locale"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/SwatI18N/SwatI18NLocale.php#L937-L948 |
33,368 | silverorange/swat | SwatI18N/SwatI18NLocale.php | SwatI18NLocale.buildNationalCurrencyFormat | protected function buildNationalCurrencyFormat()
{
$lc = $this->getLocaleInfo();
$format = new SwatI18NCurrencyFormat();
$format->fractional_digits = $lc['frac_digits'];
$format->p_cs_precedes = $lc['p_cs_precedes'];
$format->n_cs_precedes = $lc['n_cs_precedes'];
$f... | php | protected function buildNationalCurrencyFormat()
{
$lc = $this->getLocaleInfo();
$format = new SwatI18NCurrencyFormat();
$format->fractional_digits = $lc['frac_digits'];
$format->p_cs_precedes = $lc['p_cs_precedes'];
$format->n_cs_precedes = $lc['n_cs_precedes'];
$f... | [
"protected",
"function",
"buildNationalCurrencyFormat",
"(",
")",
"{",
"$",
"lc",
"=",
"$",
"this",
"->",
"getLocaleInfo",
"(",
")",
";",
"$",
"format",
"=",
"new",
"SwatI18NCurrencyFormat",
"(",
")",
";",
"$",
"format",
"->",
"fractional_digits",
"=",
"$",
... | Builds the national currency format of this locale | [
"Builds",
"the",
"national",
"currency",
"format",
"of",
"this",
"locale"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/SwatI18N/SwatI18NLocale.php#L956-L993 |
33,369 | silverorange/swat | SwatI18N/SwatI18NLocale.php | SwatI18NLocale.buildInternationalCurrencyFormat | protected function buildInternationalCurrencyFormat()
{
$lc = $this->getLocaleInfo();
$format = new SwatI18NCurrencyFormat();
$format->fractional_digits = $lc['int_frac_digits'];
$format->p_cs_precedes = $lc['p_cs_precedes'];
$format->n_cs_precedes = $lc['n_cs_precedes'];
... | php | protected function buildInternationalCurrencyFormat()
{
$lc = $this->getLocaleInfo();
$format = new SwatI18NCurrencyFormat();
$format->fractional_digits = $lc['int_frac_digits'];
$format->p_cs_precedes = $lc['p_cs_precedes'];
$format->n_cs_precedes = $lc['n_cs_precedes'];
... | [
"protected",
"function",
"buildInternationalCurrencyFormat",
"(",
")",
"{",
"$",
"lc",
"=",
"$",
"this",
"->",
"getLocaleInfo",
"(",
")",
";",
"$",
"format",
"=",
"new",
"SwatI18NCurrencyFormat",
"(",
")",
";",
"$",
"format",
"->",
"fractional_digits",
"=",
... | Builds the internatiobal currency format for this locale | [
"Builds",
"the",
"internatiobal",
"currency",
"format",
"for",
"this",
"locale"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/SwatI18N/SwatI18NLocale.php#L1001-L1026 |
33,370 | silverorange/swat | SwatI18N/SwatI18NLocale.php | SwatI18NLocale.formatIntegerGroupings | protected function formatIntegerGroupings(
$value,
SwatI18NNumberFormat $format
) {
// group integer part with thousands separators
$grouping_values = array();
$groupings = $format->grouping;
$grouping_total = intval(floor(abs($value)));
if (
count... | php | protected function formatIntegerGroupings(
$value,
SwatI18NNumberFormat $format
) {
// group integer part with thousands separators
$grouping_values = array();
$groupings = $format->grouping;
$grouping_total = intval(floor(abs($value)));
if (
count... | [
"protected",
"function",
"formatIntegerGroupings",
"(",
"$",
"value",
",",
"SwatI18NNumberFormat",
"$",
"format",
")",
"{",
"// group integer part with thousands separators",
"$",
"grouping_values",
"=",
"array",
"(",
")",
";",
"$",
"groupings",
"=",
"$",
"format",
... | Formats the integer part of a value according to format-specific numeric
groupings
This is a number formatting helper method. It is responsible for
grouping integer-part digits. Grouped digits are separated using the
thousands separator character specified by the format object.
@param float $value the value to format... | [
"Formats",
"the",
"integer",
"part",
"of",
"a",
"value",
"according",
"to",
"format",
"-",
"specific",
"numeric",
"groupings"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/SwatI18N/SwatI18NLocale.php#L1044-L1140 |
33,371 | silverorange/swat | SwatI18N/SwatI18NLocale.php | SwatI18NLocale.formatFractionalPart | protected function formatFractionalPart(
$value,
$fractional_digits,
SwatI18NNumberFormat $format
) {
if ($fractional_digits === 0) {
$formatted_value = '';
} else {
$frac_part = abs(fmod($value, 1));
$frac_part = round($frac_part * pow(10,... | php | protected function formatFractionalPart(
$value,
$fractional_digits,
SwatI18NNumberFormat $format
) {
if ($fractional_digits === 0) {
$formatted_value = '';
} else {
$frac_part = abs(fmod($value, 1));
$frac_part = round($frac_part * pow(10,... | [
"protected",
"function",
"formatFractionalPart",
"(",
"$",
"value",
",",
"$",
"fractional_digits",
",",
"SwatI18NNumberFormat",
"$",
"format",
")",
"{",
"if",
"(",
"$",
"fractional_digits",
"===",
"0",
")",
"{",
"$",
"formatted_value",
"=",
"''",
";",
"}",
"... | Formats the fractional part of a value
@param float $value the value to format.
@param integer $fractional_digits the number of fractional digits to
include in the returned string.
@param SwatI18NNumberFormat $format the number formatting object to use
to format the fractional digits.
@return string the formatted fr... | [
"Formats",
"the",
"fractional",
"part",
"of",
"a",
"value"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/SwatI18N/SwatI18NLocale.php#L1159-L1180 |
33,372 | silverorange/swat | SwatI18N/SwatI18NLocale.php | SwatI18NLocale.parseNegativeNotation | protected function parseNegativeNotation(
$string,
$n_sign = null,
$n_sign_position = 1
) {
$lc = $this->getLocaleInfo();
$negative = false;
if ($n_sign == '') {
if ($lc['negative_sign'] == '') {
$negative_sign = '-';
} else {... | php | protected function parseNegativeNotation(
$string,
$n_sign = null,
$n_sign_position = 1
) {
$lc = $this->getLocaleInfo();
$negative = false;
if ($n_sign == '') {
if ($lc['negative_sign'] == '') {
$negative_sign = '-';
} else {... | [
"protected",
"function",
"parseNegativeNotation",
"(",
"$",
"string",
",",
"$",
"n_sign",
"=",
"null",
",",
"$",
"n_sign_position",
"=",
"1",
")",
"{",
"$",
"lc",
"=",
"$",
"this",
"->",
"getLocaleInfo",
"(",
")",
";",
"$",
"negative",
"=",
"false",
";... | Parses the negative notation for a numeric string formatted in this
locale
@param string $string the formatted string.
@param string $n_sign optional. The negative sign to parse. If not
specified, the negative sign for this locale is
used.
@param integer $n_sign_position optional. The position of the negative
sign in ... | [
"Parses",
"the",
"negative",
"notation",
"for",
"a",
"numeric",
"string",
"formatted",
"in",
"this",
"locale"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/SwatI18N/SwatI18NLocale.php#L1204-L1252 |
33,373 | silverorange/swat | SwatI18N/SwatI18NLocale.php | SwatI18NLocale.getFractionalPrecision | protected function getFractionalPrecision($value)
{
/*
* This is a bit hacky (and probably slow). We get the string
* representation and then count the number of digits after the decimal
* separator. This may or may not be faster than the equivalent
* IEEE-754 decompositi... | php | protected function getFractionalPrecision($value)
{
/*
* This is a bit hacky (and probably slow). We get the string
* representation and then count the number of digits after the decimal
* separator. This may or may not be faster than the equivalent
* IEEE-754 decompositi... | [
"protected",
"function",
"getFractionalPrecision",
"(",
"$",
"value",
")",
"{",
"/*\n * This is a bit hacky (and probably slow). We get the string\n * representation and then count the number of digits after the decimal\n * separator. This may or may not be faster than the eq... | Gets the fractional precision of a floating point number
This gets the number of digits after the decimal point.
@param float $value the value for which to get the fractional precision.
@return integer the fractional precision of the value. | [
"Gets",
"the",
"fractional",
"precision",
"of",
"a",
"floating",
"point",
"number"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/SwatI18N/SwatI18NLocale.php#L1266-L1300 |
33,374 | silverorange/swat | SwatI18N/SwatI18NLocale.php | SwatI18NLocale.iconvArray | private function iconvArray($from, $to, array $array)
{
if ($from != $to) {
foreach ($array as $key => $value) {
if (is_array($value)) {
$array[$key] = $this->iconvArray($from, $to, $value);
} elseif (is_string($value)) {
$o... | php | private function iconvArray($from, $to, array $array)
{
if ($from != $to) {
foreach ($array as $key => $value) {
if (is_array($value)) {
$array[$key] = $this->iconvArray($from, $to, $value);
} elseif (is_string($value)) {
$o... | [
"private",
"function",
"iconvArray",
"(",
"$",
"from",
",",
"$",
"to",
",",
"array",
"$",
"array",
")",
"{",
"if",
"(",
"$",
"from",
"!=",
"$",
"to",
")",
"{",
"foreach",
"(",
"$",
"array",
"as",
"$",
"key",
"=>",
"$",
"value",
")",
"{",
"if",
... | Recursivly converts the character encoding of all strings in an array
@param string $from the character encoding to convert from.
@param string $to the character encoding to convert to.
@param array $array the array to convert.
@return array a new array with all strings converted to the given
character encoding.
@th... | [
"Recursivly",
"converts",
"the",
"character",
"encoding",
"of",
"all",
"strings",
"in",
"an",
"array"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/SwatI18N/SwatI18NLocale.php#L1406-L1430 |
33,375 | brainworxx/kreXX | src/Controller/ErrorController.php | ErrorController.errorAction | public function errorAction(array $errorData)
{
$this->pool->reset();
// Get the main part.
$main = $this->pool->render->renderFatalMain(
$errorData[static::TRACE_TYPE],
$errorData[static::TRACE_ERROR_STRING],
$errorData[static::TRACE_ERROR_FILE],
... | php | public function errorAction(array $errorData)
{
$this->pool->reset();
// Get the main part.
$main = $this->pool->render->renderFatalMain(
$errorData[static::TRACE_TYPE],
$errorData[static::TRACE_ERROR_STRING],
$errorData[static::TRACE_ERROR_FILE],
... | [
"public",
"function",
"errorAction",
"(",
"array",
"$",
"errorData",
")",
"{",
"$",
"this",
"->",
"pool",
"->",
"reset",
"(",
")",
";",
"// Get the main part.",
"$",
"main",
"=",
"$",
"this",
"->",
"pool",
"->",
"render",
"->",
"renderFatalMain",
"(",
"$... | Renders the info to the error, warning or notice.
@param array $errorData
The data from the error. This should be a backtrace
with code samples.
@return $this
Return $this for chaining | [
"Renders",
"the",
"info",
"to",
"the",
"error",
"warning",
"or",
"notice",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Controller/ErrorController.php#L56-L104 |
33,376 | brainworxx/kreXX | src/Controller/ErrorController.php | ErrorController.registerFatalAction | public function registerFatalAction()
{
// As of PHP Version 7.0.2, the register_tick_function() causes PHP to
// crash, with a connection reset! We need to check the version to avoid
// this, and then tell the dev what happened.
// Not to mention that fatals got removed anyway.
... | php | public function registerFatalAction()
{
// As of PHP Version 7.0.2, the register_tick_function() causes PHP to
// crash, with a connection reset! We need to check the version to avoid
// this, and then tell the dev what happened.
// Not to mention that fatals got removed anyway.
... | [
"public",
"function",
"registerFatalAction",
"(",
")",
"{",
"// As of PHP Version 7.0.2, the register_tick_function() causes PHP to",
"// crash, with a connection reset! We need to check the version to avoid",
"// this, and then tell the dev what happened.",
"// Not to mention that fatals got remo... | Register the fatal error handler.
@return $this
Return $this for chaining | [
"Register",
"the",
"fatal",
"error",
"handler",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Controller/ErrorController.php#L112-L144 |
33,377 | brainworxx/kreXX | src/Controller/ErrorController.php | ErrorController.unregisterFatalAction | public function unregisterFatalAction()
{
$this->fatalShouldActive = false;
if ($this::$krexxFatal === null) {
// There is no fatal error handler to begin with.
return $this;
}
// Now we need to tell the shutdown function, that is must
// not do anyt... | php | public function unregisterFatalAction()
{
$this->fatalShouldActive = false;
if ($this::$krexxFatal === null) {
// There is no fatal error handler to begin with.
return $this;
}
// Now we need to tell the shutdown function, that is must
// not do anyt... | [
"public",
"function",
"unregisterFatalAction",
"(",
")",
"{",
"$",
"this",
"->",
"fatalShouldActive",
"=",
"false",
";",
"if",
"(",
"$",
"this",
"::",
"$",
"krexxFatal",
"===",
"null",
")",
"{",
"// There is no fatal error handler to begin with.",
"return",
"$",
... | "Unregister" the fatal error handler.
Actually we can not unregister it. We simply tell it to not activate
and we unregister the tick function which provides us with the
backtrace.
@return $this
Return $this for chaining | [
"Unregister",
"the",
"fatal",
"error",
"handler",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Controller/ErrorController.php#L156-L170 |
33,378 | silverorange/swat | Swat/SwatTableViewInputRow.php | SwatTableViewInputRow.init | public function init()
{
parent::init();
$this->createEmbeddedWidgets();
$this->enter_another_link->title = $this->enter_text;
$this->enter_another_link->link = sprintf(
"javascript:%s_obj.addRow();",
$this->getId()
);
$this->enter_another_li... | php | public function init()
{
parent::init();
$this->createEmbeddedWidgets();
$this->enter_another_link->title = $this->enter_text;
$this->enter_another_link->link = sprintf(
"javascript:%s_obj.addRow();",
$this->getId()
);
$this->enter_another_li... | [
"public",
"function",
"init",
"(",
")",
"{",
"parent",
"::",
"init",
"(",
")",
";",
"$",
"this",
"->",
"createEmbeddedWidgets",
"(",
")",
";",
"$",
"this",
"->",
"enter_another_link",
"->",
"title",
"=",
"$",
"this",
"->",
"enter_text",
";",
"$",
"this... | Initializes this input row
This initializes each input cell in this row.
@see SwatTableViewRow::init() | [
"Initializes",
"this",
"input",
"row"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableViewInputRow.php#L128-L167 |
33,379 | silverorange/swat | Swat/SwatTableViewInputRow.php | SwatTableViewInputRow.process | public function process()
{
parent::process();
// process input cells
foreach ($this->replicators as $replicator_id) {
foreach ($this->input_cells as $cell) {
$cell->process($replicator_id);
}
}
} | php | public function process()
{
parent::process();
// process input cells
foreach ($this->replicators as $replicator_id) {
foreach ($this->input_cells as $cell) {
$cell->process($replicator_id);
}
}
} | [
"public",
"function",
"process",
"(",
")",
"{",
"parent",
"::",
"process",
"(",
")",
";",
"// process input cells",
"foreach",
"(",
"$",
"this",
"->",
"replicators",
"as",
"$",
"replicator_id",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"input_cells",
"a... | Processes this input row
This gets the replicator ids of rows the user entered as well as
processing all cloned widgets in input cells that the user submitted. | [
"Processes",
"this",
"input",
"row"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableViewInputRow.php#L178-L188 |
33,380 | silverorange/swat | Swat/SwatTableViewInputRow.php | SwatTableViewInputRow.display | public function display()
{
if (!$this->isVisible()) {
return;
}
parent::display();
if (count($this->replicators) < $this->number) {
$diff = $this->number - count($this->replicators);
$next_replicator =
count($this->replicators) =... | php | public function display()
{
if (!$this->isVisible()) {
return;
}
parent::display();
if (count($this->replicators) < $this->number) {
$diff = $this->number - count($this->replicators);
$next_replicator =
count($this->replicators) =... | [
"public",
"function",
"display",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"isVisible",
"(",
")",
")",
"{",
"return",
";",
"}",
"parent",
"::",
"display",
"(",
")",
";",
"if",
"(",
"count",
"(",
"$",
"this",
"->",
"replicators",
")",
"<",... | Displays this row
Uses widget cloning inside {@link SwatInputCell} to display rows and
also displays the 'enter-another-row' button. The number of rows
displayed is set either through {SwatTableViewInputRow::$number} or
by the number of rows the user submitted. When a user submits a
different number of rows than {Swat... | [
"Displays",
"this",
"row"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableViewInputRow.php#L225-L253 |
33,381 | silverorange/swat | Swat/SwatTableViewInputRow.php | SwatTableViewInputRow.getWidget | public function getWidget($column_id, $row_identifier, $widget_id = null)
{
if (isset($this->input_cells[$column_id])) {
return $this->input_cells[$column_id]->getWidget(
$row_identifier,
$widget_id
);
}
throw new SwatException(
... | php | public function getWidget($column_id, $row_identifier, $widget_id = null)
{
if (isset($this->input_cells[$column_id])) {
return $this->input_cells[$column_id]->getWidget(
$row_identifier,
$widget_id
);
}
throw new SwatException(
... | [
"public",
"function",
"getWidget",
"(",
"$",
"column_id",
",",
"$",
"row_identifier",
",",
"$",
"widget_id",
"=",
"null",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"input_cells",
"[",
"$",
"column_id",
"]",
")",
")",
"{",
"return",
"$",
"... | Gets a particular widget in this row
This method is used to get or set properties of specific cloned widgets
within this input row. The most common case is when you want to
iterate through the user submitted data in this input row.
@param string $column_id the unique identifier of the table-view column
the widget res... | [
"Gets",
"a",
"particular",
"widget",
"in",
"this",
"row"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableViewInputRow.php#L314-L327 |
33,382 | silverorange/swat | Swat/SwatTableViewInputRow.php | SwatTableViewInputRow.getPrototypeWidget | public function getPrototypeWidget($column_id)
{
if (isset($this->input_cells[$column_id])) {
return $this->input_cells[$column_id]->getPrototypeWidget();
}
throw new SwatException(
'The specified column does not have an input ' .
'cell bound to this ... | php | public function getPrototypeWidget($column_id)
{
if (isset($this->input_cells[$column_id])) {
return $this->input_cells[$column_id]->getPrototypeWidget();
}
throw new SwatException(
'The specified column does not have an input ' .
'cell bound to this ... | [
"public",
"function",
"getPrototypeWidget",
"(",
"$",
"column_id",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"input_cells",
"[",
"$",
"column_id",
"]",
")",
")",
"{",
"return",
"$",
"this",
"->",
"input_cells",
"[",
"$",
"column_id",
"]",
"... | Gets the prototype widget for a column attached to this row
Note: The UI tree must be inited before this method works correctly.
This is because the column identifiers are not finalized until
init() has run and this method uses colum identifiers for lookup.
This method is useful for setting properties on the prototyp... | [
"Gets",
"the",
"prototype",
"widget",
"for",
"a",
"column",
"attached",
"to",
"this",
"row"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableViewInputRow.php#L353-L363 |
33,383 | silverorange/swat | Swat/SwatTableViewInputRow.php | SwatTableViewInputRow.removeReplicatedRow | public function removeReplicatedRow($replicator_id)
{
$this->replicators = array_diff($this->replicators, array(
$replicator_id
));
foreach ($this->input_cells as $cell) {
$cell->unsetWidget($replicator_id);
}
} | php | public function removeReplicatedRow($replicator_id)
{
$this->replicators = array_diff($this->replicators, array(
$replicator_id
));
foreach ($this->input_cells as $cell) {
$cell->unsetWidget($replicator_id);
}
} | [
"public",
"function",
"removeReplicatedRow",
"(",
"$",
"replicator_id",
")",
"{",
"$",
"this",
"->",
"replicators",
"=",
"array_diff",
"(",
"$",
"this",
"->",
"replicators",
",",
"array",
"(",
"$",
"replicator_id",
")",
")",
";",
"foreach",
"(",
"$",
"this... | Removes a row from this input row by its replicator id
This also unsets any cloned widgets from this row's input cells.
@param integer $replicator_id the replicator id of the row to remove. | [
"Removes",
"a",
"row",
"from",
"this",
"input",
"row",
"by",
"its",
"replicator",
"id"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableViewInputRow.php#L375-L384 |
33,384 | silverorange/swat | Swat/SwatTableViewInputRow.php | SwatTableViewInputRow.rowHasMessage | public function rowHasMessage($replicator_id)
{
$row_has_message = false;
foreach ($this->input_cells as $cell) {
if ($cell->getWidget($replicator_id)->hasMessage()) {
$row_has_message = true;
break;
}
}
return $row_has_messag... | php | public function rowHasMessage($replicator_id)
{
$row_has_message = false;
foreach ($this->input_cells as $cell) {
if ($cell->getWidget($replicator_id)->hasMessage()) {
$row_has_message = true;
break;
}
}
return $row_has_messag... | [
"public",
"function",
"rowHasMessage",
"(",
"$",
"replicator_id",
")",
"{",
"$",
"row_has_message",
"=",
"false",
";",
"foreach",
"(",
"$",
"this",
"->",
"input_cells",
"as",
"$",
"cell",
")",
"{",
"if",
"(",
"$",
"cell",
"->",
"getWidget",
"(",
"$",
"... | Gets whether or not a given replicated row has messages
@param integer $replicator_id the replicator id of the row to check for
messages.
@return boolean true if the replicated row has one or more messages and
false if it does not. | [
"Gets",
"whether",
"or",
"not",
"a",
"given",
"replicated",
"row",
"has",
"messages"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableViewInputRow.php#L418-L430 |
33,385 | silverorange/swat | Swat/SwatTableViewInputRow.php | SwatTableViewInputRow.getMessages | public function getMessages()
{
$messages = array();
foreach ($this->replicators as $replicator_id) {
foreach ($this->input_cells as $cell) {
$messages = array_merge(
$messages,
$cell->getWidget($replicator_id)->getMessages()
... | php | public function getMessages()
{
$messages = array();
foreach ($this->replicators as $replicator_id) {
foreach ($this->input_cells as $cell) {
$messages = array_merge(
$messages,
$cell->getWidget($replicator_id)->getMessages()
... | [
"public",
"function",
"getMessages",
"(",
")",
"{",
"$",
"messages",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"replicators",
"as",
"$",
"replicator_id",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"input_cells",
"as",
"$",
"cell... | Gathers all messages from this table-view row
@return array an array of {@link SwatMessage} objects. | [
"Gathers",
"all",
"messages",
"from",
"this",
"table",
"-",
"view",
"row"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableViewInputRow.php#L440-L454 |
33,386 | silverorange/swat | Swat/SwatTableViewInputRow.php | SwatTableViewInputRow.getInlineJavaScript | public function getInlineJavaScript()
{
/*
* Encode row string
*
* Mimize entities so that we do not have to specify a DTD when parsing
* the final XML string. If we specify a DTD, Internet Explorer takes a
* long time to strictly parse everything. If we do not s... | php | public function getInlineJavaScript()
{
/*
* Encode row string
*
* Mimize entities so that we do not have to specify a DTD when parsing
* the final XML string. If we specify a DTD, Internet Explorer takes a
* long time to strictly parse everything. If we do not s... | [
"public",
"function",
"getInlineJavaScript",
"(",
")",
"{",
"/*\n * Encode row string\n *\n * Mimize entities so that we do not have to specify a DTD when parsing\n * the final XML string. If we specify a DTD, Internet Explorer takes a\n * long time to strictly pa... | Creates a JavaScript object to control the client behaviour of this
input row
@return string the inline JavaScript required by this row. | [
"Creates",
"a",
"JavaScript",
"object",
"to",
"control",
"the",
"client",
"behaviour",
"of",
"this",
"input",
"row"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableViewInputRow.php#L490-L518 |
33,387 | silverorange/swat | Swat/SwatTableViewInputRow.php | SwatTableViewInputRow.getHtmlHeadEntrySet | public function getHtmlHeadEntrySet()
{
$set = parent::getHtmlHeadEntrySet();
$this->createEmbeddedWidgets();
$set->addEntrySet($this->enter_another_link->getHtmlHeadEntrySet());
return $set;
} | php | public function getHtmlHeadEntrySet()
{
$set = parent::getHtmlHeadEntrySet();
$this->createEmbeddedWidgets();
$set->addEntrySet($this->enter_another_link->getHtmlHeadEntrySet());
return $set;
} | [
"public",
"function",
"getHtmlHeadEntrySet",
"(",
")",
"{",
"$",
"set",
"=",
"parent",
"::",
"getHtmlHeadEntrySet",
"(",
")",
";",
"$",
"this",
"->",
"createEmbeddedWidgets",
"(",
")",
";",
"$",
"set",
"->",
"addEntrySet",
"(",
"$",
"this",
"->",
"enter_an... | Gets the SwatHtmlHeadEntry objects needed by this input row
@return SwatHtmlHeadEntrySet the SwatHtmlHeadEntry objects needed by
this input row.
@see SwatUIObject::getHtmlHeadEntrySet() | [
"Gets",
"the",
"SwatHtmlHeadEntry",
"objects",
"needed",
"by",
"this",
"input",
"row"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableViewInputRow.php#L531-L539 |
33,388 | silverorange/swat | Swat/SwatTableViewInputRow.php | SwatTableViewInputRow.getAvailableHtmlHeadEntrySet | public function getAvailableHtmlHeadEntrySet()
{
$set = parent::getAvailableHtmlHeadEntrySet();
$this->createEmbeddedWidgets();
$set->addEntrySet(
$this->enter_another_link->getAvailableHtmlHeadEntrySet()
);
return $set;
} | php | public function getAvailableHtmlHeadEntrySet()
{
$set = parent::getAvailableHtmlHeadEntrySet();
$this->createEmbeddedWidgets();
$set->addEntrySet(
$this->enter_another_link->getAvailableHtmlHeadEntrySet()
);
return $set;
} | [
"public",
"function",
"getAvailableHtmlHeadEntrySet",
"(",
")",
"{",
"$",
"set",
"=",
"parent",
"::",
"getAvailableHtmlHeadEntrySet",
"(",
")",
";",
"$",
"this",
"->",
"createEmbeddedWidgets",
"(",
")",
";",
"$",
"set",
"->",
"addEntrySet",
"(",
"$",
"this",
... | Gets the SwatHtmlHeadEntry objects that may be needed by this input row
@return SwatHtmlHeadEntrySet the SwatHtmlHeadEntry objects that may be
needed by this input row.
@see SwatUIObject::getAvailableHtmlHeadEntrySet() | [
"Gets",
"the",
"SwatHtmlHeadEntry",
"objects",
"that",
"may",
"be",
"needed",
"by",
"this",
"input",
"row"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableViewInputRow.php#L552-L562 |
33,389 | silverorange/swat | Swat/SwatTableViewInputRow.php | SwatTableViewInputRow.displayInputRows | private function displayInputRows()
{
$columns = $this->parent->getVisibleColumns();
foreach ($this->replicators as $replicator_id) {
$messages = array();
$row_has_messages = false;
foreach ($this->input_cells as $cell) {
if ($cell->getWidget($re... | php | private function displayInputRows()
{
$columns = $this->parent->getVisibleColumns();
foreach ($this->replicators as $replicator_id) {
$messages = array();
$row_has_messages = false;
foreach ($this->input_cells as $cell) {
if ($cell->getWidget($re... | [
"private",
"function",
"displayInputRows",
"(",
")",
"{",
"$",
"columns",
"=",
"$",
"this",
"->",
"parent",
"->",
"getVisibleColumns",
"(",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"replicators",
"as",
"$",
"replicator_id",
")",
"{",
"$",
"messages",
... | Displays the actual XHTML input rows for this input row
Displays a row for each replicator id in this input row. Each row is
displayed using cloned widgets inside {@link SwatInputCell} objects.
@see SwatTableViewInputRow::display() | [
"Displays",
"the",
"actual",
"XHTML",
"input",
"rows",
"for",
"this",
"input",
"row"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableViewInputRow.php#L589-L679 |
33,390 | silverorange/swat | Swat/SwatTableViewInputRow.php | SwatTableViewInputRow.createEmbeddedWidgets | private function createEmbeddedWidgets()
{
if (!$this->widgets_created) {
$this->enter_another_link = new SwatToolLink();
$this->enter_another_link->parent = $this;
$this->enter_another_link->stock_id = 'add';
$this->enter_another_link->classes[] =
... | php | private function createEmbeddedWidgets()
{
if (!$this->widgets_created) {
$this->enter_another_link = new SwatToolLink();
$this->enter_another_link->parent = $this;
$this->enter_another_link->stock_id = 'add';
$this->enter_another_link->classes[] =
... | [
"private",
"function",
"createEmbeddedWidgets",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"widgets_created",
")",
"{",
"$",
"this",
"->",
"enter_another_link",
"=",
"new",
"SwatToolLink",
"(",
")",
";",
"$",
"this",
"->",
"enter_another_link",
"->",
... | Instantiates the tool-link for this input row | [
"Instantiates",
"the",
"tool",
"-",
"link",
"for",
"this",
"input",
"row"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableViewInputRow.php#L687-L698 |
33,391 | silverorange/swat | Swat/SwatTableViewInputRow.php | SwatTableViewInputRow.displayEnterAnotherRow | private function displayEnterAnotherRow()
{
$columns = $this->parent->getVisibleColumns();
$this->createEmbeddedWidgets();
/*
* Get column position of enter-a-new-row text. The text is displayed
* underneath the first input cell that is not blank. If all cells are
... | php | private function displayEnterAnotherRow()
{
$columns = $this->parent->getVisibleColumns();
$this->createEmbeddedWidgets();
/*
* Get column position of enter-a-new-row text. The text is displayed
* underneath the first input cell that is not blank. If all cells are
... | [
"private",
"function",
"displayEnterAnotherRow",
"(",
")",
"{",
"$",
"columns",
"=",
"$",
"this",
"->",
"parent",
"->",
"getVisibleColumns",
"(",
")",
";",
"$",
"this",
"->",
"createEmbeddedWidgets",
"(",
")",
";",
"/*\n * Get column position of enter-a-new-... | Displays the enter-another-row row | [
"Displays",
"the",
"enter",
"-",
"another",
"-",
"row",
"row"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableViewInputRow.php#L706-L763 |
33,392 | silverorange/swat | Swat/SwatTableViewInputRow.php | SwatTableViewInputRow.getRowString | private function getRowString()
{
$columns = $this->parent->getVisibleColumns();
ob_start();
// properties of the dynamic tr's are set in javascript
$tr_tag = new SwatHtmlTag('tr');
$tr_tag->open();
foreach ($columns as $column) {
$td_attributes = $colu... | php | private function getRowString()
{
$columns = $this->parent->getVisibleColumns();
ob_start();
// properties of the dynamic tr's are set in javascript
$tr_tag = new SwatHtmlTag('tr');
$tr_tag->open();
foreach ($columns as $column) {
$td_attributes = $colu... | [
"private",
"function",
"getRowString",
"(",
")",
"{",
"$",
"columns",
"=",
"$",
"this",
"->",
"parent",
"->",
"getVisibleColumns",
"(",
")",
";",
"ob_start",
"(",
")",
";",
"// properties of the dynamic tr's are set in javascript",
"$",
"tr_tag",
"=",
"new",
"Sw... | Gets this input row as an XHTML table row with the row identifier as a
placeholder '%s'
Returning the row identifier as a placeholder means we can use this
function to display multiple copies of this row just by substituting
a new identifier.
@return string this input row as an XHTML table row with the row
identifier... | [
"Gets",
"this",
"input",
"row",
"as",
"an",
"XHTML",
"table",
"row",
"with",
"the",
"row",
"identifier",
"as",
"a",
"placeholder",
"%s"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableViewInputRow.php#L779-L812 |
33,393 | silverorange/swat | Swat/SwatFileEntry.php | SwatFileEntry.process | public function process()
{
parent::process();
// The $_FILES[$this->id] array is always set unless the POST data
// was greater than the PHP's post_max_size ini setting.
if (!isset($_FILES[$this->id]) || !$this->isSensitive()) {
return;
}
if ($_FILES[$t... | php | public function process()
{
parent::process();
// The $_FILES[$this->id] array is always set unless the POST data
// was greater than the PHP's post_max_size ini setting.
if (!isset($_FILES[$this->id]) || !$this->isSensitive()) {
return;
}
if ($_FILES[$t... | [
"public",
"function",
"process",
"(",
")",
"{",
"parent",
"::",
"process",
"(",
")",
";",
"// The $_FILES[$this->id] array is always set unless the POST data",
"// was greater than the PHP's post_max_size ini setting.",
"if",
"(",
"!",
"isset",
"(",
"$",
"_FILES",
"[",
"$... | Processes this file entry widget
If any validation type errors occur, an error message is attached to
this entry widget. | [
"Processes",
"this",
"file",
"entry",
"widget"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatFileEntry.php#L163-L194 |
33,394 | silverorange/swat | Swat/SwatFileEntry.php | SwatFileEntry.getNote | public function getNote()
{
$message = null;
if ($this->accept_mime_types !== null && $this->display_mime_types) {
$displayable_types = $this->getDisplayableTypes();
$message = new SwatMessage(
sprintf(
Swat::ngettext(
... | php | public function getNote()
{
$message = null;
if ($this->accept_mime_types !== null && $this->display_mime_types) {
$displayable_types = $this->getDisplayableTypes();
$message = new SwatMessage(
sprintf(
Swat::ngettext(
... | [
"public",
"function",
"getNote",
"(",
")",
"{",
"$",
"message",
"=",
"null",
";",
"if",
"(",
"$",
"this",
"->",
"accept_mime_types",
"!==",
"null",
"&&",
"$",
"this",
"->",
"display_mime_types",
")",
"{",
"$",
"displayable_types",
"=",
"$",
"this",
"->",... | Gets a note specifying the mime types this file entry accepts
The file types are only returned if
{@link SwatFileEntry::$display_mime_types} is set to true and
{@link SwatFileEntry::$accept_mime_types} has entries. If
{@link SwatFileEntry::$human_file_types} is set, the note displays the
human-readable file types wher... | [
"Gets",
"a",
"note",
"specifying",
"the",
"mime",
"types",
"this",
"file",
"entry",
"accepts"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatFileEntry.php#L214-L233 |
33,395 | silverorange/swat | Swat/SwatFileEntry.php | SwatFileEntry.getMimeType | public function getMimeType()
{
if ($this->isUploaded() && $this->mime_type === null) {
$temp_file_name = $this->getTempFileName();
if (file_exists($temp_file_name)) {
if (extension_loaded('fileinfo')) {
// Use the fileinfo extension if available.
... | php | public function getMimeType()
{
if ($this->isUploaded() && $this->mime_type === null) {
$temp_file_name = $this->getTempFileName();
if (file_exists($temp_file_name)) {
if (extension_loaded('fileinfo')) {
// Use the fileinfo extension if available.
... | [
"public",
"function",
"getMimeType",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"isUploaded",
"(",
")",
"&&",
"$",
"this",
"->",
"mime_type",
"===",
"null",
")",
"{",
"$",
"temp_file_name",
"=",
"$",
"this",
"->",
"getTempFileName",
"(",
")",
";",
... | Gets the mime type of the uploaded file
@return mixed the mime type of the uploaded file or null if no file was
uploaded. | [
"Gets",
"the",
"mime",
"type",
"of",
"the",
"uploaded",
"file"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatFileEntry.php#L329-L359 |
33,396 | silverorange/swat | Swat/SwatFileEntry.php | SwatFileEntry.saveFile | public function saveFile($dst_dir, $dst_filename = null)
{
if (!$this->isUploaded()) {
return false;
}
if ($dst_filename === null) {
$dst_filename = $this->getUniqueFileName($dst_dir);
}
if (is_dir($dst_dir)) {
return move_uploaded_file(
... | php | public function saveFile($dst_dir, $dst_filename = null)
{
if (!$this->isUploaded()) {
return false;
}
if ($dst_filename === null) {
$dst_filename = $this->getUniqueFileName($dst_dir);
}
if (is_dir($dst_dir)) {
return move_uploaded_file(
... | [
"public",
"function",
"saveFile",
"(",
"$",
"dst_dir",
",",
"$",
"dst_filename",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"isUploaded",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"$",
"dst_filename",
"===",
"null",
... | Saves the uploaded file to the server
@param string $dst_dir the directory on the server to save the uploaded
file in.
@param string $dst_filename an optional filename to save the file under.
If no filename is specified, the file is
saved with the original filename.
@return boolean true if the file was saved correctl... | [
"Saves",
"the",
"uploaded",
"file",
"to",
"the",
"server"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatFileEntry.php#L378-L399 |
33,397 | silverorange/swat | Swat/SwatFileEntry.php | SwatFileEntry.getValidationMessage | protected function getValidationMessage($id)
{
switch ($id) {
case 'mime-type':
$displayable_types = $this->getDisplayableTypes();
if ($this->show_field_title_in_messages) {
$text = sprintf(
Swat::ngettext(
... | php | protected function getValidationMessage($id)
{
switch ($id) {
case 'mime-type':
$displayable_types = $this->getDisplayableTypes();
if ($this->show_field_title_in_messages) {
$text = sprintf(
Swat::ngettext(
... | [
"protected",
"function",
"getValidationMessage",
"(",
"$",
"id",
")",
"{",
"switch",
"(",
"$",
"id",
")",
"{",
"case",
"'mime-type'",
":",
"$",
"displayable_types",
"=",
"$",
"this",
"->",
"getDisplayableTypes",
"(",
")",
";",
"if",
"(",
"$",
"this",
"->... | Gets a validation message for this file entry
Can be used by sub-classes to change the validation messages.
@param string $id the string identifier of the validation message.
@return SwatMessage the validation message. | [
"Gets",
"a",
"validation",
"message",
"for",
"this",
"file",
"entry"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatFileEntry.php#L453-L518 |
33,398 | silverorange/swat | Swat/SwatFileEntry.php | SwatFileEntry.hasValidMimeType | protected function hasValidMimeType()
{
$valid = false;
if ($this->isUploaded()) {
// Some container formats can contain return multiple mime-types.
// If any of the contained types are valid, we consider the file
// valid.
$mime_types = explode(' ', ... | php | protected function hasValidMimeType()
{
$valid = false;
if ($this->isUploaded()) {
// Some container formats can contain return multiple mime-types.
// If any of the contained types are valid, we consider the file
// valid.
$mime_types = explode(' ', ... | [
"protected",
"function",
"hasValidMimeType",
"(",
")",
"{",
"$",
"valid",
"=",
"false",
";",
"if",
"(",
"$",
"this",
"->",
"isUploaded",
"(",
")",
")",
"{",
"// Some container formats can contain return multiple mime-types.",
"// If any of the contained types are valid, w... | Whether or not the uploaded file's mime type is valid
Gets whether or not the upload file's mime type matches the accepted
mime types of this widget. Valid mime types for this widget are stored in
the {@link SwatFileEntry::$accept_mime_types} array. If the
<kbd>$accept_mime_types</kbd> array is empty, the uploaded fil... | [
"Whether",
"or",
"not",
"the",
"uploaded",
"file",
"s",
"mime",
"type",
"is",
"valid"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatFileEntry.php#L553-L574 |
33,399 | silverorange/swat | Swat/SwatFileEntry.php | SwatFileEntry.getDisplayableTypes | protected function getDisplayableTypes()
{
$displayable_types = array();
foreach ($this->accept_mime_types as $mime_type) {
$displayable_type = isset($this->human_file_types[$mime_type])
? $this->human_file_types[$mime_type]
: $mime_type;
// ... | php | protected function getDisplayableTypes()
{
$displayable_types = array();
foreach ($this->accept_mime_types as $mime_type) {
$displayable_type = isset($this->human_file_types[$mime_type])
? $this->human_file_types[$mime_type]
: $mime_type;
// ... | [
"protected",
"function",
"getDisplayableTypes",
"(",
")",
"{",
"$",
"displayable_types",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"accept_mime_types",
"as",
"$",
"mime_type",
")",
"{",
"$",
"displayable_type",
"=",
"isset",
"(",
"$",
... | Gets a unique array of acceptable human-readable file and mime types for
display.
If {@link SwatFileEntry::$human_file_types} is set, and the mime type
exists within it, we display the corresponding human-readable file type.
Otherwise we fall back to the mime type.
@return array unique mime and human-readable file ty... | [
"Gets",
"a",
"unique",
"array",
"of",
"acceptable",
"human",
"-",
"readable",
"file",
"and",
"mime",
"types",
"for",
"display",
"."
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatFileEntry.php#L621-L635 |
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.